// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
require({cache:{"jimu/dijit/GpSource":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/GpSource.html dojo/_base/lang dojo/_base/html dojo/on dojo/Evented jimu/dijit/GpChooserFromPortal jimu/dijit/_GpServiceChooserContent jimu/portalUrlUtils dijit/form/RadioButton".split(" "),function(H,e,m,n,q,d,c,a,b,h,g,k){var f=0;return H([e,m,n,b],{templateString:q,baseClass:"jimu-gp-source",declaredClass:"jimu.dijit.GpSource",nls:null,
multiple:!1,portalUrl:null,uniqueID:null,mode:null,constructor:function(){this.inherited(arguments);this.uniqueID=++f},postMixInProperties:function(){this.nls=window.jimuNls.gpSource;this.portalUrl=k.getStandardPortalUrl(this.portalUrl)},postCreate:function(){this.inherited(arguments);this._initSelf()},getSelectedItems:function(){var l=[];this.portalRadio.checked?l=this.gpcPortal.getSelectedItems():this.urlRadio.checked&&(l=this.gpcUrl.getSelectedItems());return l},startup:function(){this._started||
(this.inherited(arguments),this.gpcPortal.startup(),this.gpcUrl.startup());this._started=!0},_initSelf:function(){this._initRadios();this._createGpChooserFromPortal();this._createGpServiceChooserContent();this._onRadioClicked("url");this.own(a(this.urlRadio,"click",d.hitch(this,function(){this._onRadioClicked("url")})));this.own(a(this.portalRadio,"click",d.hitch(this,function(){this._onRadioClicked("portal")})))},_createGpChooserFromPortal:function(){this.gpcPortal=new h({multiple:this.multiple,
portalUrl:this.portalUrl,style:{width:"100%",height:"100%"}});this.gpcPortal.operationTip=this.nls.chooseItem;this.gpcPortal.placeAt(this.hflcContainer);this.own(a(this.gpcPortal,"next",d.hitch(this,function(){this.gpcPortal.operationTip=this.nls.chooseItem+" -\x3e "+this.nls.chooseTask;this._updateOperationTip()})));this.own(a(this.gpcPortal,"back",d.hitch(this,function(){this.gpcPortal.operationTip=this.nls.chooseItem;this._updateOperationTip()})));this.own(a(this.gpcPortal,"ok",d.hitch(this,function(l){l&&
0<l.length&&this.emit("ok",l)})));this.own(a(this.gpcPortal,"cancel",d.hitch(this,function(){this.emit("cancel")})));0<=(this.portalUrl||"").toLowerCase().indexOf(".arcgis.com")?this.portalLabel.innerHTML=this.nls.selectFromOnline:this.portalLabel.innerHTML=this.nls.selectFromPortal},_createGpServiceChooserContent:function(){this.gpcUrl=new g({multiple:this.multiple,style:{width:"100%",height:"100%"}});this.gpcUrl.operationTip=this.nls.setServiceUrl;this.gpcUrl.placeAt(this.flscContainer);this.own(a(this.gpcUrl,
"ok",d.hitch(this,function(l){l&&0<l.length&&this.emit("ok",l)})));this.own(a(this.gpcUrl,"cancel",d.hitch(this,function(){this.emit("cancel")})))},_initRadios:function(){var l="gpSourceRadios_"+this._getRandomString();this.portalRadio.name=l;c.setAttr(this.portalRadio,"id","portalRadio_"+this._getRandomString());c.setAttr(this.portalLabel,"for",this.portalRadio.id);this.urlRadio.name=l;c.setAttr(this.urlRadio,"id","urlRadio_"+this._getRandomString());c.setAttr(this.urlLabel,"for",this.urlRadio.id)},
_getRandomString:function(){var l=Math.random().toString();return l=l.slice(2,l.length)},_onRadioClicked:function(l){this.mode!==l&&(this.mode=l,"portal"===l?(this.portalRadio.set("checked",!0),this.urlRadio.set("checked",!1),c.setStyle(this.hflcContainer,"display","block"),c.setStyle(this.flscContainer,"display","none"),this.operationTip.innerHTML=this.nls.chooseItem):"url"===l&&(this.portalRadio.set("checked",!1),this.urlRadio.set("checked",!0),c.setStyle(this.hflcContainer,"display","none"),c.setStyle(this.flscContainer,
"display","block"),this.operationTip.innerHTML=this.nls.setServiceUrl,setTimeout(d.hitch(this,function(){this.gpcUrl.focusInput()}),50)),this._updateOperationTip())},_updateOperationTip:function(){if(this.portalRadio.checked){this.operationTip.innerHTML=this.gpcPortal.operationTip;var l=this.gpcPortal.browserContainer;l.style.top=0;var p=this.operationTip.clientHeight;19<=p&&(l.style.top=p-19+"px")}else this.urlRadio.checked&&(this.operationTip.innerHTML=this.gpcUrl.operationTip)}})})},"jimu/dijit/GpChooserFromPortal":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/GpChooserFromPortal.html dojo/_base/lang dojo/_base/html dojo/_base/array dojo/on dojo/query dojo/Deferred dojo/Evented dojo/promise/all jimu/dijit/ItemSelector jimu/dijit/GpServiceBrowser jimu/portalUrlUtils esri/request".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w){return H([e,m,n,k],{templateString:q,declaredClass:"jimu.dijit.GpChooserFromPortal",baseClass:"jimu-gp-chooser-from-portal",_serviceDef:null,portalUrl:null,multiple:!1,postMixInProperties:function(){this.nls=d.mixin({},window.jimuNls.common);this.portalUrl=r.getStandardPortalUrl(this.portalUrl)},postCreate:function(){this.inherited(arguments);this._initSelf()},getSelectedItems:function(){return this.gpServiceBrowser.getSelectedItems()},_initSelf:function(){this.selector=
new l({portalUrl:this.portalUrl,itemTypes:["Geoprocessing Service"],onlyShowOnlineFeaturedItems:!1});this.own(b(this.selector,"item-selected",d.hitch(this,this._onItemSelected)));this.own(b(this.selector,"none-item-selected",d.hitch(this,this._onNoneItemSelected)));this.selector.placeAt(this.selectorContainer);this.selector.startup();this.gpServiceBrowser._onTreeClick=d.hitch(this,this._onBrowserClicked)},_onItemSelected:function(){c.removeClass(this.btnNext,"jimu-state-disabled")},_onNoneItemSelected:function(){c.addClass(this.btnNext,
"jimu-state-disabled")},_onBtnBackClicked:function(){this._serviceDef&&!this._serviceDef.isFulfilled()&&this._serviceDef.cancel();c.setStyle(this.btnOk,"display","none");c.setStyle(this.btnNext,"display","block");c.setStyle(this.btnBack,"display","none");c.addClass(this.btnOk,"jimu-state-disabled");c.setStyle(this.selectorContainer,"display","block");c.setStyle(this.browserContainer,"display","none");this._reset();this.emit("back")},_onBtnOkClicked:function(){var u=this.getSelectedItems();0<u.length&&
this.emit("ok",u)},_onBtnNextClicked:function(){var u=this.selector.getSelectedItem();u&&(this._reset(),c.setStyle(this.btnNext,"display","none"),c.setStyle(this.btnBack,"display","block"),c.setStyle(this.btnOk,"display","block"),c.addClass(this.btnOk,"jimu-state-disabled"),c.setStyle(this.selectorContainer,"display","none"),c.setStyle(this.browserContainer,"display","block"),this.gpServiceBrowser.setUrl(u.url||u.item).then(d.hitch(this,function(){0<this.getSelectedItems().length&&c.removeClass(this.btnOk,
"jimu-state-disabled")})),this.emit("next"))},_reset:function(){this.gpServiceBrowser.reset()},_onBrowserClicked:function(){0<this.gpServiceBrowser.getSelectedItems().length?c.removeClass(this.btnOk,"jimu-state-disabled"):c.addClass(this.btnOk,"jimu-state-disabled")},_onBtnCancelClicked:function(){this.emit("cancel")}})})},"jimu/dijit/ItemSelector":function(){define("dojo/_base/declare dojo/topic dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/ItemSelector.html dojo/Evented dojo/_base/lang dojo/_base/config dojo/_base/array dojo/_base/html dojo/_base/Deferred dojo/promise/all dojo/query dojo/on dojo/dom-style jimu/utils jimu/portalUtils jimu/tokenUtils jimu/portalUrlUtils jimu/dijit/ViewStack jimu/dijit/Search jimu/dijit/TabContainer3 jimu/dijit/_ItemTable jimu/dijit/BindLabelPropsMixin dijit/form/RadioButton".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D,G,A){return H([m,n,q,A,c],{templateString:d,declaredClass:"jimu.dijit.ItemSelector",baseClass:"jimu-item-selector",tab:null,_user:null,_group:null,_allPublicPortalQuery:null,_filterPublicPortalQuery:null,_allPublicOnlineQuery:null,_filterPublicOnlineQuery:null,_allOrganizationQuery:null,_filterOrganizationQuery:null,_allMyContentQuery:null,_filterMyContentQuery:null,_allGroupQuery:null,_filterGroupQuery:null,_isPublicTabShow:!1,_signIn:!1,_itemTypeQueryString:"",
_typeKeywordQueryString:"",portalUrl:null,itemTypes:"",typeKeywords:"",showOnlineItems:!0,onlyShowOnlineFeaturedItems:!1,showMyContent:!0,showMyOrganization:!0,showMyGroups:!0,showPublic:!0,showOnlyEditableGroups:!1,postMixInProperties:function(){this.portalUrl=x.getStandardPortalUrl(this.portalUrl);this.showOnlineItems=!1===this.showOnlineItems?!1:!0;this.itemTypes&&0<this.itemTypes.length||(this.itemTypes=[]);this._itemTypes="";h.forEach(this.itemTypes,a.hitch(this,function(t,v){this._itemTypes+=
'"'+t+'"';v!==this.itemTypes.length-1&&(this._itemTypes+=",")}));this._itemTypes="["+this._itemTypes+"]";this.typeKeywords&&0<this.typeKeywords.length||(this.typeKeywords=[]);this._typeKeywords="";h.forEach(this.typeKeywords,a.hitch(this,function(t,v){this._typeKeywords+='"'+t+'"';v!==this.typeKeywords.length-1&&(this._typeKeywords+=",")}));this._typeKeywords="["+this._typeKeywords+"]";this.nls=window.jimuNls.itemSelector},postCreate:function(){this.inherited(arguments);var t=this._getPortalUrl();
this.portal=u.getPortal(t);this._initOptions();this._initSearchQuery();this._initTabs();this._initPortalRadio();this._initItemTables();this._initPublic();this._initPrivate();this._updateUIbySignIn()},_initOptions:function(){this._itemTypeQueryString=w.getItemQueryStringByTypes(this.itemTypes);this._typeKeywordQueryString=w.getItemQueryStringByTypeKeywords(this.typeKeywords)},_initTabs:function(){var t={title:this.nls.myContent,content:this.mycontentTabNode},v={title:this.nls.myOrganization,content:this.organizationTabNode},
C={title:this.nls.myGroup,content:this.groupTabNode},J={title:this.nls.publicMap,content:this.publicTabNode};r.set(this.mycontentTabNode,"display","none");r.set(this.organizationTabNode,"display","none");r.set(this.groupTabNode,"display","none");r.set(this.publicTabNode,"display","none");var L=[];this.showMyContent&&(L.push(t),r.set(this.mycontentTabNode,"display","block"));this.showMyOrganization&&(L.push(v),r.set(this.organizationTabNode,"display","block"));this.showMyGroups&&(L.push(C),r.set(this.groupTabNode,
"display","block"));this.showPublic&&(L.push(J),r.set(this.publicTabNode,"display","block"));this.tab=new D({tabs:L},this.tabNode);this.own(p(this.tab,"tabChanged",a.hitch(this,function(S){g.setStyle(this.signinSection,"display","none");S!==this.nls.publicMap?(this._isPublicTabShow=!1,this._updateUIbySignIn()):this._isPublicTabShow=!0})))},_updateUIbySignIn:function(){g.setStyle(this.signinSection,"display","none");var t=l(".organization-tab-content-main,.group-tab-content-main,.mycontent-tab-content-main",
this.domNode);B.userHaveSignInPortal(this._getPortalUrl())?t.style("display","block"):(t.style("display","none"),this._isPublicTabShow||g.setStyle(this.signinSection,"display","block"))},_initPortalRadio:function(){var t=this._getPortalUrl();t=x.getServerByUrl(t);this.portalPublicRaido.set("disabled",!1);this.onlinePublicRaido.set("disabled",!1);this.portalPublicRaido.set("checked",!0);var v=!1;x.isArcGIScom(t)?(v=!0,this.portalPublicLabel.innerHTML="ArcGIS.com"):(this.portalPublicLabel.innerHTML=
t,v=this.showOnlineItems?!1:!0);v&&(this.onlinePublicRaido.set("disabled",!0),g.setStyle(this.onlinePublicRaido,"display","none"),g.setStyle(this.onlinePublicLabel,"display","none"))},_initSearchQuery:function(){var t="esri_"+(b.locale&&b.locale.slice(0,2)||"en").toLowerCase(),v=h.filter("esri_he esri_fr esri_ja esri_nl esri_th esri_tr esri_nb esri_ro esri_it esri_pl esri_po esri_ru esri_pt esri_en esri_ar esri_et esri_es esri_ko esri_cs esri_da esri_zh esri_sv esri_lt esri_fi esri_lv esri_de esri_vi".split(" "),
a.hitch(this,function(J){return J!==t})),C="";h.forEach(v,a.hitch(this,function(J){C+=" -owner:"+J+" "}));v=" ";this.portal&&this.portal.user&&this.portal.user.orgId&&(v=" orgid:"+this.portal.user.orgId+" ");v=v+this._itemTypeQueryString+" AND access:public "+C+" "+this._typeKeywordQueryString;this._allPublicPortalQuery=this._getQuery({sortField:"numViews",sortOrder:"desc",q:v});this._filterPublicPortalQuery=this._getQuery({q:v,basicQ:v});this._allPublicOnlineQuery=this._getQuery({sortField:"numViews",
sortOrder:"desc",q:(this.onlyShowOnlineFeaturedItems?' (group:"c755678be14e4a0984af36a15f5b643e"  OR group:"b8787a74b4d74f7fb9b8fac918735153") ':" ")+this._itemTypeQueryString+" AND access:public "+this._typeKeywordQueryString});this._filterPublicOnlineQuery=this._getQuery({q:this._itemTypeQueryString+" AND access:public "+this._typeKeywordQueryString});this._allOrganizationQuery=this._getQuery();this._filterOrganizationQuery=this._getQuery();this._allMyContentQuery=this._getQuery();this._filterMyContentQuery=
this._getQuery();this._allGroupQuery=this._getQuery();this._filterGroupQuery=this._getQuery()},_getQuery:function(t){return a.mixin({start:1,num:16,f:"json"},t||{})},_getPortalUrl:function(){return x.getStandardPortalUrl(this.portalUrl)},_initItemTables:function(){"function"===typeof this.onCreateItemContent&&(this.mycontentItemTable.onCreateItemContent=this.onCreateItemContent,this.organizationItemTable.onCreateItemContent=this.onCreateItemContent,this.groupItemTable.onCreateItemContent=this.onCreateItemContent,
this.publicPortalItemTable.onCreateItemContent=this.onCreateItemContent,this.publicOnlineItemTable.onCreateItemContent=this.onCreateItemContent);this.own(p(this.publicPortalItemTable,"item-dom-clicked",a.hitch(this,this._onItemDomClicked)));this.own(p(this.publicOnlineItemTable,"item-dom-clicked",a.hitch(this,this._onItemDomClicked)));this.own(p(this.organizationItemTable,"item-dom-clicked",a.hitch(this,this._onItemDomClicked)));this.own(p(this.groupItemTable,"item-dom-clicked",a.hitch(this,this._onItemDomClicked)));
this.own(p(this.mycontentItemTable,"item-dom-clicked",a.hitch(this,this._onItemDomClicked)));this.own(p(this.publicPortalItemTable,"update",a.hitch(this,this._onItemTableUpdate)));this.own(p(this.publicOnlineItemTable,"update",a.hitch(this,this._onItemTableUpdate)));this.own(p(this.organizationItemTable,"update",a.hitch(this,this._onItemTableUpdate)));this.own(p(this.groupItemTable,"update",a.hitch(this,this._onItemTableUpdate)));this.own(p(this.mycontentItemTable,"update",a.hitch(this,this._onItemTableUpdate)));
var t=this._getPortalUrl();this.portalPublicRaido.get("disabled")||(this.publicPortalItemTable.set("portalUrl",t),this.publicPortalItemTable.searchAllItems(this._allPublicPortalQuery),this.publicPortalItemTable.set("filteredQuery",this._filterPublicPortalQuery));this.onlinePublicRaido.get("disabled")||(this.publicOnlineItemTable.set("portalUrl",window.location.protocol+"//www.arcgis.com"),this.publicOnlineItemTable.searchAllItems(this._allPublicOnlineQuery),this.publicOnlineItemTable.set("filteredQuery",
this._filterPublicOnlineQuery))},_initPublic:function(){this.own(p(this.portalPublicRaido,"click",a.hitch(this,this._onPublicRaidoClicked)));this.own(p(this.onlinePublicRaido,"click",a.hitch(this,this._onPublicRaidoClicked)));this._onPublicRaidoClicked()},_onPublicRaidoClicked:function(){this.portalPublicRaido.get("checked")?(this.publicPortalItemTable.show(),this.publicOnlineItemTable.hide()):this.onlinePublicRaido.get("checked")&&(this.publicPortalItemTable.hide(),this.publicOnlineItemTable.show())},
_onPublicSearch:function(t){(t=t&&a.trim(t))?(this.publicPortalItemTable.showFilterItemsSection(),this.publicOnlineItemTable.showFilterItemsSection(),this.portalPublicRaido.get("checked")?(this._filterPublicPortalQuery.q=t+" "+this._filterPublicPortalQuery.basicQ,this._filterPublicPortalQuery.start=1,this.publicPortalItemTable.searchFilteredItems(this._filterPublicPortalQuery)):this.onlinePublicRaido.get("checked")&&(this._filterPublicOnlineQuery.q=t+" "+this._itemTypeQueryString+" AND access:public "+
this._typeKeywordQueryString,this._filterPublicOnlineQuery.start=1,this.publicOnlineItemTable.searchFilteredItems(this._filterPublicOnlineQuery))):(this.publicPortalItemTable.showAllItemsSection(),this.publicOnlineItemTable.showAllItemsSection())},_initPrivate:function(){this._resetPortalMaps();this.own(p(this.groupsSelect,"change",a.hitch(this,this._onGroupsSelectChange)));var t=x.getServerByUrl(this._getPortalUrl());x.isArcGIScom(t)&&(t="ArcGIS.com");B.userHaveSignInPortal(this._getPortalUrl())&&
this._onSignIn()},_onOrganizationSearch:function(t){if(t=t&&a.trim(t)){if(this._allOrganizationQuery){var v=this._allOrganizationQuery.q;v&&(this._filterOrganizationQuery.q=t+" "+v,this._filterOrganizationQuery.start=1,this.organizationItemTable.searchFilteredItems(this._filterOrganizationQuery))}}else this.organizationItemTable.showAllItemsSection()},_onMyContentSearch:function(t){if(t=t&&a.trim(t)){if(this._allMyContentQuery){var v=this._allMyContentQuery.q;v&&(this._filterMyContentQuery.q=t+" "+
v,this._filterMyContentQuery.start=1,this.mycontentItemTable.searchFilteredItems(this._filterMyContentQuery))}}else this.mycontentItemTable.showAllItemsSection()},_onGroupSearch:function(t){if(t=t&&a.trim(t)){if(this._allGroupQuery){var v=this._allGroupQuery.q;v&&(this._filterGroupQuery.q=t+" "+v,this._filterGroupQuery.start=1,this.groupItemTable.searchFilteredItems(this._filterGroupQuery))}}else this.groupItemTable.showAllItemsSection()},_onSignIn:function(){this._updateUIbySignIn();if(!this._signIn){this._signIn=
!0;var t=this._getPortalUrl();u.getPortal(t).getUser().then(a.hitch(this,function(v){this.domNode&&(this._resetPortalMaps(),this._searchOrganization(v),this._searchMyContent(v),this._searchGroups(v))}))}},_onSignOut:function(){this._signIn=!1;this._resetPortalMaps();this._updateUIbySignIn()},_resetPortalMaps:function(){this.organizationItemTable.clear();this.mycontentItemTable.clear();this._resetGroupsSection()},_searchOrganization:function(t){this.organizationItemTable.clear();t=" orgid:"+t.orgId+
" AND "+this._itemTypeQueryString+" AND (access:org OR access:public) "+this._typeKeywordQueryString;var v=this._getPortalUrl();this._allOrganizationQuery=this._getQuery({q:t});this._filterOrganizationQuery=this._getQuery({q:t});this.organizationItemTable.set("portalUrl",v);this.organizationItemTable.searchAllItems(this._allOrganizationQuery)},_searchMyContent:function(t){this.mycontentItemTable.clear();var v=this._getPortalUrl();t="owner:"+t.username+" AND "+this._itemTypeQueryString+" "+this._typeKeywordQueryString;
this._allMyContentQuery=this._getQuery({q:t});this._filterMyContentQuery=this._getQuery({q:t});this.mycontentItemTable.set("portalUrl",v);this.mycontentItemTable.searchAllItems(this._allMyContentQuery)},_searchGroups:function(t){this._resetGroupsSection();g.setStyle(this.groupsSection,"display","flex");t=t.getGroups();if(0<t.length){g.setStyle(this.groupSearch.domNode,"display","block");this.groupItemTable.show();g.empty(this.groupsSelect);for(var v=0;v<t.length;v++){var C=t[v];g.create("option",
{value:C.id,innerHTML:C.title},this.groupsSelect)}this._onGroupsSelectChange()}this._updateUIbyGroups(t.length)},_resetGroupsSection:function(){g.setStyle(this.groupsSection,"display","none");g.empty(this.groupsSelect);g.create("option",{value:"nodata",innerHTML:this.nls.noneGroups},this.groupsSelect);this.groupItemTable.clear();g.setStyle(this.groupSearch.domNode,"display","none");this.groupItemTable.hide();this._updateUIbyGroups(0)},_updateUIbyGroups:function(t){0===t?g.setStyle(this.groupsSection,
"top","15px"):g.setStyle(this.groupsSection,"top","50px")},_onGroupsSelectChange:function(){var t=this.groupsSelect.value;this.groupItemTable.clear();if("nodata"===t)g.setStyle(this.groupSearch,"display","none"),this.groupItemTable.hide();else{g.setStyle(this.groupSearch,"display","block");this.groupItemTable.show();var v=this._getPortalUrl();t="group:"+t+" AND "+this._itemTypeQueryString+" "+this._typeKeywordQueryString;this._allGroupQuery=this._getQuery({q:t});this._filterGroupQuery=this._getQuery({q:t});
this.groupItemTable.set("portalUrl",v);this.groupItemTable.searchAllItems(this._allGroupQuery)}},_onItemTableUpdate:function(){this.emit("update")},_onItemDomClicked:function(t){var v=g.hasClass(t,"jimu-state-active");l(".item.jimu-state-active",this.domNode).removeClass("jimu-state-active");v&&g.addClass(t,"jimu-state-active");(t=this.getSelectedItem())?this.emit("item-selected",t):this.emit("none-item-selected")},getSelectedItem:function(){var t=null,v=l(".item.jimu-state-active",this.domNode);
0<v.length&&(t=a.mixin({},v[0].item));return t}})})},"jimu/dijit/_ItemTable":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/_ItemTable.html dojo/Evented dojo/_base/lang dojo/_base/array dojo/_base/html dojo/_base/Deferred dojo/query dojo/on jimu/utils jimu/portalUtils jimu/portalUrlUtils jimu/dijit/LoadingIndicator".split(" "),function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r){return H([e,m,n,d],{templateString:q,declaredClass:"jimu.dijit.ItemTable",
baseClass:"jimu-item-table",query:null,filteredQuery:null,portalUrl:null,hidden:!1,nls:null,types:"",typeKeywords:"",_defaultThumbnail:{"Web Mapping Application":"desktopapp.png","Mobile Application":"mobileapp.png"},postMixInProperties:function(){this.nls=window.jimuNls.itemSelector},postCreate:function(){this.inherited(arguments);this._initSelf()},_initSelf:function(){this.types&&0<this.types.length||(this.types=[]);(this.hidden=!0===this.hidden)&&this.hide();this.portalUrl&&(this.portalUrl=p.getStandardPortalUrl(this.portalUrl));
this.showAllItemsSection();this.searchAllItems()},show:function(){b.setStyle(this.domNode,"display","block")},hide:function(){b.setStyle(this.domNode,"display","none")},searchAllItems:function(w){this.showAllItemsSection();w&&(this.query=c.mixin({},w),this.query.start=1,this.clearAllItemsSection());this.portalUrl&&this.query&&0<this.query.start&&(this.allItemsShelter.show(),l.getPortal(this.portalUrl).queryItems(this.query).then(c.hitch(this,function(u){this.domNode&&(this.allItemsShelter.hide(),
this.query.start=u.nextStart,this._createItems(u,this.allItemTbody))}),c.hitch(this,function(u){console.error(u);this.domNode&&this.allItemsShelter.hide()})))},searchFilteredItems:function(w){this.showFilterItemsSection();w&&(this.filteredQuery=c.clone(w),this.filteredQuery.start=1,this.clearFilteredItemsSection());this.portalUrl&&this.filteredQuery&&0<this.filteredQuery.start&&(this.filteredItemShelter.show(),l.getPortal(this.portalUrl).queryItems(this.filteredQuery).then(c.hitch(this,function(u){this.domNode&&
(this.showFilterItemsSection(),w&&this.clearFilteredItemsSection(),this.filteredQuery.start=u.nextStart,this._createItems(u,this.filteredItemsTbody),this._filterItemCallback())}),c.hitch(this,function(u){console.error(u);this.domNode&&this._filterItemCallback()})))},_filterItemCallback:function(){this.filteredItemShelter.hide();0<this._getItemCount(this.filteredItemsTbody)?(b.setStyle(this.filteredItemsTableDiv,"display","block"),b.setStyle(this.searchNoneTipSection,"display","none")):(b.setStyle(this.filteredItemsTableDiv,
"display","none"),b.setStyle(this.searchNoneTipSection,"display","block"))},clear:function(){this.clearAllItemsSection();this.clearFilteredItemsSection()},clearAllItemsSection:function(){b.empty(this.allItemTbody)},clearFilteredItemsSection:function(){b.empty(this.filteredItemsTbody)},showAllItemsSection:function(){b.setStyle(this.allItemsSection,"display","block");b.setStyle(this.filteredItemsSection,"display","none")},showFilterItemsSection:function(){b.setStyle(this.allItemsSection,"display","none");
b.setStyle(this.filteredItemsSection,"display","block");b.setStyle(this.filteredItemsTableDiv,"display","block");b.setStyle(this.searchNoneTipSection,"display","none")},_onAllItemsSectionScroll:function(){this._isScrollToBottom(this.allItemsTableDiv)&&this.searchAllItems()},_onFilteredItemsSectionScroll:function(){this._isScrollToBottom(this.filteredItemsTableDiv)&&this.searchFilteredItems()},_isScrollToBottom:function(w){return f.isScrollToBottom(w)},_createItems:function(w,u){w=w.results;var B=
a.map(this.types,c.hitch(this,function(t){return t.toLowerCase()}));w=a.filter(w,c.hitch(this,function(t){t=t.type&&t.type.toLowerCase()||"";return 0<=a.indexOf(B,t)}));if(0!==w.length){var x=g("td.empty",u),E;if(0<x.length){var y=Math.min(w.length,x.length),D=w.splice(0,y);for(E=0;E<y;E++){var G=x[E];var A=this._createItem(D[E]);b.place(A,G);b.removeClass(G,"empty")}}if(0!==w.length){x=Math.ceil(w.length/2);for(E=0;E<x;E++)for(A=b.toDom("\x3ctr\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3c/tr\x3e"),
b.place(A,u),y=g("td",A),D=0;D<y.length;D++)G=y[D],(A=w[2*E+D])?(A=this._createItem(A),b.place(A,G)):b.addClass(G,"empty");this.emit("update")}}},_getItemCount:function(w){return g(".item",w).length},_createItem:function(w){var u=b.toDom('\x3cdiv class\x3d"item"\x3e\x3cdiv class\x3d"item-border"\x3e\x3c/div\x3e\x3cdiv class\x3d"item-thumbnail jimu-auto-vertical"\x3e\x3cdiv class\x3d"none-thumbnail-tip jimu-auto-vertical-content"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"item-info"\x3e\x3cdiv class\x3d"item-name"\x3e\x3c/div\x3e\x3cdiv class\x3d"item-type-owner"\x3e\x3c/div\x3e\x3cdiv class\x3d"item-date"\x3e\x3c/div\x3e\x3ca class\x3d"item-details" target\x3d"_blank"\x3e\x3c/a\x3e\x3c/div\x3e\x3c/div\x3e');
u.item=w;var B=g(".item-thumbnail",u)[0],x=g(".item-name",u)[0],E=g(".item-type-owner",u)[0],y=g(".item-date",u)[0],D=g(".item-details",u)[0],G=g(".none-thumbnail-tip",u)[0];if(!w.thumbnailUrl){var A=this._defaultThumbnail[w.type];A&&(w.thumbnailUrl=require.toUrl("jimu")+"/images/"+A)}w.thumbnailUrl?b.setStyle(B,"backgroundImage","url("+w.thumbnailUrl+")"):G.innerHTML=this.nls.noneThumbnail;"function"===typeof this.onCreateItemContent?(y=g(".item-info",u)[0],this.onCreateItemContent(w,y)):(x.innerHTML=
w.title,x.title=x.innerHTML,E.innerHTML=w.type+" by "+w.owner,E.title=E.innerHTML,B=new Date,B.setTime(w.modified),y.innerHTML=B.toLocaleString(),y.title=y.innerHTML,D.innerHTML=this.nls.moreDetails,D.href=w.detailsPageUrl||"#");return u},_onItemsTableClicked:function(w){var u=w.target||w.srcElement;w=null;b.hasClass(u,"item-thumbnail")?w=u.parentNode:b.hasClass(u,"none-thumbnail-tip")&&(w=u.parentNode.parentNode);w&&(u=b.hasClass(w,"jimu-state-active"),g(".item.jimu-state-active",this.domNode).removeClass("jimu-state-active"),
u?b.removeClass(w,"jimu-state-active"):b.addClass(w,"jimu-state-active"),this.emit("item-dom-clicked",w))},getSelectedItem:function(){var w=null,u=g(".item.jimu-state-active",this.domNode);0<u.length&&(w=c.mixin({},u[0].item));return w}})})},"jimu/dijit/GpServiceBrowser":function(){define(["dojo/_base/declare","./_BasicServiceBrowser","dojo/_base/lang","dojo/_base/array","jimu/serviceBrowserRuleUtils"],function(H,e,m,n,q){return H([e],{baseClass:"jimu-gp-service-browser",declaredClass:"jimu.dijit.GpServiceBrowser",
url:"",multiple:!1,postMixInProperties:function(){this.inherited(arguments);this.rule=q.getGpServiceBrowserRule()},getSelectedItems:function(){var d=this.inherited(arguments);return d=n.map(d,m.hitch(this,function(c){return{name:c.name,url:c.url}}))}})})},"jimu/dijit/_BasicServiceBrowser":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/Evented dojo/_base/lang dojo/_base/html dojo/_base/array dojo/Deferred dojo/promise/all dojo/store/Memory dojo/store/Observable dijit/tree/ObjectStoreModel jimu/utils jimu/dijit/_Tree jimu/dijit/LoadingIndicator".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p){return H([e,m,n,q],{templateString:'\x3cdiv style\x3d"width:100%;"\x3e\x3cdiv data-dojo-attach-point\x3d"shelter"  data-dojo-type\x3d"jimu/dijit/LoadingIndicator" data-dojo-props\x3d"hidden:true"\x3e\x3c/div\x3e\x3c/div\x3e',_store:null,_id:0,_currentUrl:"",_treeClass:"service-browser-tree",_def:null,url:"",multiple:!1,rule:null,postMixInProperties:function(){this.nls=window.jimuNls.basicServiceBrowser},postCreate:function(){this.inherited(arguments);c.addClass(this.domNode,
"jimu-basic-service-browser");this.multiple=!!this.multiple;this._createTree();this.url&&"string"===typeof this.url&&this.setUrl(this.url)},reset:function(){this.url="";this._clear()},getSelectedItems:function(){return this.tree.getSelectedItems()},setUrl:function(r){this._def&&(this._def.isFulfilled()||this._def.cancel(),this._def=null);this._def=new b;r&&"string"===typeof r&&r.replace(/\/*$/g,"")||this._def.reject();r=r.replace(/\/*$/g,"");r=d.trim(r);var w=r.match(/^http(s?):\/\//gi);w&&0<w.length||
(r="http://"+r);if(!(0>=r.search(/\/rest\/services/i))&&(this._clear(),this._currentUrl=r))return r=this._getRootItem(),r=l.isStringEndWith(this._currentUrl,"rest/services")?this._searchBaseServiceUrl(this._currentUrl,r):this._isUrlContainsServiceType(this._currentUrl)?this._searchServiceUrl(this._currentUrl,r):this._searchFolderServiceUrl(this._currentUrl,r),this.shelter.show(),r.then(d.hitch(this,function(u){this.domNode&&this.shelter.hide();var B=this.tree.getAllLeafTreeNodeWidgets();1===B.length&&
B[0].select();this._def.resolve(u)}),d.hitch(this,function(u){this.domNode&&this.shelter.hide();this._showRequestError();this._def.reject(u)})),this._def;this._def.reject()},_getItem:function(r){return this.rule.getItem(r)},_getSubItemUrls:function(r){return this.rule.getSubItemUrls(r)},_getSubItems:function(r){var w=new b;this._getSubItemUrls(r).then(d.hitch(this,function(u){u=a.map(u,d.hitch(this,function(B){return this._getItem(B)}));h(u).then(d.hitch(this,function(B){B=a.filter(B,d.hitch(this,
function(x){return x&&"object"===typeof x}));w.resolve(B)}),d.hitch(this,function(B){w.reject(B)}))}),d.hitch(this,function(u){w.reject(u)}));return w},_selectFirstLeafTreeNodeWidget:function(){var r=this.tree.getAllLeafTreeNodeWidgets();1===r.length&&r[0].select()},isLeafItem:function(r){return 0<=this.rule.leafTypes.indexOf(r.type)},isServiceTypeSupported:function(r){return this.rule.isServiceTypeSupported(r)},_getStringEndWith:function(r,w){var u="",B=r.indexOf(w);0<=B&&(u=r.slice(0,B+w.length));
return u},_isUrlContainsServiceType:function(r){return this.rule.isUrlContainsServiceType(r)},_getBaseServiceUrl:function(){return this._getStringEndWith(this._currentUrl,"rest/services")},_getServiceName:function(r){var w="";r=r.split("/");return w=r[r.length-1]},_searchBaseServiceUrl:function(r,w){var u=new b;this._getRestInfo(r).then(d.hitch(this,function(B){if(this.domNode){var x=[];a.map(B.folders,d.hitch(this,function(E){var y={name:E,type:"folder",url:r+"/"+E,parent:w.id};this._addItem(y);
var D=new b;this._doSearchFolderServiceUrl(y.url,y.id).then(d.hitch(this,function(G){0<G.length?a.forEach(G,d.hitch(this,function(A){A.parent=y.id;this._addItem(A)})):this._removeItem(y.id);D.resolve()}),d.hitch(this,function(G){D.reject(G)}));x.push(D);return D}));a.forEach(B.services,d.hitch(this,function(E){if(this.isServiceTypeSupported(E.type)){E=r+"/"+E.name+"/"+E.type;var y=new b;this.rule.getItem(E).then(d.hitch(this,function(D){D&&(D.parent=w.id,this._addItem(D));y.resolve()}),d.hitch(this,
function(D){console.error(D);y.reject(D)}));x.push(y)}}));h(x).then(d.hitch(this,function(){this.domNode&&u.resolve()}),d.hitch(this,function(E){console.error(E);this.domNode&&u.reject(E)}))}}),d.hitch(this,function(B){console.error(B);this.domNode&&u.reject({errorCode:"NETWORK_ERROR",error:B})}));return u},_searchFolderServiceUrl:function(r,w){var u=new b;this._doSearchFolderServiceUrl(r,w).then(d.hitch(this,function(B){this.domNode&&(a.forEach(B,d.hitch(this,function(x){x.parent=w.id;this._addItem(x)})),
u.resolve())}),d.hitch(this,function(B){console.error(B);this.domNode&&u.reject({errorCode:"NETWORK_ERROR",error:B})}));return u},_doSearchFolderServiceUrl:function(r){var w=new b,u=this._getBaseServiceUrl();this._getRestInfo(r).then(d.hitch(this,function(B){B=B.services;var x=[];B&&0<B.length&&a.forEach(B,d.hitch(this,function(E){this.isServiceTypeSupported(E.type)&&(E=this.rule.getItem(u+"/"+E.name+"/"+E.type),x.push(E))}));h(x).then(d.hitch(this,function(E){E=a.filter(E,d.hitch(this,function(y){return y}));
w.resolve(E)}),d.hitch(this,function(E){console.error(E);w.reject(E)}))}),d.hitch(this,function(B){console.error(B);w.reject(B)}));return w},_searchServiceUrl:function(r,w){var u=new b;this._getSubItems(r).then(d.hitch(this,function(B){B&&0<B.length?(a.forEach(B,d.hitch(this,function(x){x.parent=w.id;this._addItem(x)})),u.resolve()):this._getItem(r).then(d.hitch(this,function(x){x&&(x.parent=w.id,this._addItem(x));u.resolve()}),d.hitch(this,function(x){u.reject(x)}))}),d.hitch(this,function(B){u.reject(B)}));
return u},_getRestInfo:function(r){var w=new b;this.rule.getRestInfo(r).then(d.hitch(this,function(u){this.domNode&&w.resolve(u)}),d.hitch(this,function(u){this.domNode&&w.reject(u)}));return w},_clear:function(){var r=this._store.query({parent:"root"});a.forEach(r,d.hitch(this,function(w){w&&"root"!==w.id&&this._store.remove(w.id)}))},_showRequestError:function(){this.emit("error",this.nls.invalidUrlTip)},_addItem:function(r){this._id++;r.id=this._id.toString();this._store.add(r);return r},_removeItem:function(r){this._store.remove(r)},
_getRootItem:function(){return{id:"root",name:"Services Root",type:"root"}},_createTree:function(){var r=this._getRootItem();r=new g({data:[r],getChildren:function(w){return this.query({parent:w.id})}});this._store=new k(r);r=new f({store:this._store,query:{id:"root"},mayHaveChildren:d.hitch(this,this._mayHaveChildren)});this.tree=new p({multiple:this.multiple,model:r,showRoot:!1,style:{width:"100%"},isLeafItem:d.hitch(this,this.isLeafItem),onOpen:d.hitch(this,function(w,u){this._onTreeOpen(w,u);
this.emit("tree-open",w,u)}),onClick:d.hitch(this,function(w,u,B){this._onTreeClick(w,u,B);this.emit("tree-click",w,u,B)}),getIconStyle:d.hitch(this,function(w,u){var B=null;if(!w)return null;var x={width:"20px",height:"20px",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundImage:""},E=window.location.protocol+"//"+window.location.host+require.toUrl("jimu"),y=this._getIconImageName(w,u);y||("folder"===w.type?y=u?"folder_open_default.png":"folder_close_default.png":this.isServiceTypeSupported(w.type)&&
(y=u?"folder_open_default.png":"folder_close_default.png"));y&&(x.backgroundImage="url("+E+"/css/images/"+y+")",B=x);return B})});c.addClass(this.tree.domNode,this._treeClass);this.tree.placeAt(this.domNode)},_getIconImageName:function(r,w){var u="";"function"===typeof this.rule.getIconImageName&&(u=this.rule.getIconImageName(r,w));return u},_mayHaveChildren:function(r){return"root"===r.type?!0:!this.isLeafItem(r)},_onTreeOpen:function(r,w){"root"===r.id||0<this._store.query({parent:r.id}).length||
r.checking||r.checked||(r.checking=!0,this._getSubItems(r.url).then(d.hitch(this,function(u){a.forEach(u,d.hitch(this,function(B){B.parent=r.id;this._addItem(B)}));r.checking=!1;r.checked=!0}),d.hitch(this,function(u){console.error(u);r.checking=!1;r.checked=!0})))},_onTreeClick:function(r,w,u){},destroy:function(){this.shelter&&(this.shelter.destroy(),this.shelter=null);this.inherited(arguments)}})})},"dijit/tree/ObjectStoreModel":function(){define("dojo/_base/array dojo/aspect dojo/_base/declare dojo/Deferred dojo/_base/lang dojo/when ../Destroyable".split(" "),
function(H,e,m,n,q,d,c){return m("dijit.tree.ObjectStoreModel",c,{store:null,labelAttr:"name",labelType:"text",root:null,query:null,constructor:function(a){q.mixin(this,a);this.childrenCache={}},getRoot:function(a,b){if(this.root)a(this.root);else{var h=this.store.query(this.query);h.then&&this.own(h);d(h,q.hitch(this,function(g){if(1!=g.length)throw Error("dijit.tree.ObjectStoreModel: root query returned "+g.length+" items, but must return exactly one");this.root=g[0];a(this.root);h.observe&&h.observe(q.hitch(this,
function(k){this.onChange(k)}),!0)}),b)}},mayHaveChildren:function(){return!0},getChildren:function(a,b,h){var g=this.store.getIdentity(a);if(this.childrenCache[g])d(this.childrenCache[g],b,h);else{var k=this.childrenCache[g]=this.store.getChildren(a);k.then&&this.own(k);k.observe&&this.own(k.observe(q.hitch(this,function(f,l,p){this.onChange(f);l!=p&&d(k,q.hitch(this,"onChildrenChange",a))}),!0));d(k,b,h)}},isItem:function(){return!0},getIdentity:function(a){return this.store.getIdentity(a)},getLabel:function(a){return a[this.labelAttr]},
newItem:function(a,b,h,g){return this.store.put(a,{parent:b,before:g})},pasteItem:function(a,b,h,g,k,f){var l=new n;if(b===h&&!g&&!f)return l.resolve(!0),l;b&&!g?this.getChildren(b,q.hitch(this,function(p){p=[].concat(p);var r=H.indexOf(p,a);p.splice(r,1);this.onChildrenChange(b,p);l.resolve(this.store.put(a,{overwrite:!0,parent:h,oldParent:b,before:f,isCopy:!1}))})):l.resolve(this.store.put(a,{overwrite:!0,parent:h,oldParent:b,before:f,isCopy:!0}));return l},onChange:function(){},onChildrenChange:function(){},
onDelete:function(){}})})},"jimu/dijit/_Tree":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dojo/text!./templates/_TreeNode.html dojo/_base/lang dojo/_base/html dojo/_base/array dojo/_base/event dojo/query dojo/aspect dojo/on dojo/keys dojo/Evented dijit/registry dijit/Tree jimu/utils".split(" "),function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r){var w=H([p._TreeNode,f],{templateString:n,declaredClass:"jimu._TreeNode",isLeaf:!1,groupId:"",postCreate:function(){this.inherited(arguments);
d.addClass(this.domNode,"jimu-tree-node");this.isLeaf=!!this.isLeaf;this.groupId?(this.checkNode=d.toDom('\x3cinput type\x3d"radio" /\x3e'),this.checkNode.name=this.groupId):this.checkNode=d.toDom('\x3cinput type\x3d"checkbox" /\x3e');d.addClass(this.checkNode,"jimu-tree-check-node");d.place(this.checkNode,this.contentNode,"first");this.own(g(this.checkNode,"click",q.hitch(this,this._onClick)));this.own(g(this.rowNode,"keydown",q.hitch(this,function(u,B){B.target=u;B.keyCode!==k.ENTER&&B.keyCode!==
k.SPACE||this._onClick(B)},this.checkNode)));this.isLeaf?this.groupId?d.setStyle(this.checkNode,"display","none"):d.setStyle(this.checkNode,"display","inline"):d.setStyle(this.checkNode,"display","none");this.isLeaf?d.addClass(this.domNode,"jimu-tree-leaf-node"):d.addClass(this.domNode,"jimu-tree-not-leaf-node")},select:function(){this.isLeaf&&(this.checkNode.checked=!0,d.addClass(this.domNode,"jimu-tree-selected-leaf-node"))},unselect:function(){this.isLeaf&&(this.checkNode.checked=!1,d.removeClass(this.domNode,
"jimu-tree-selected-leaf-node"))},toggleSelect:function(){this.isLeaf&&(this.checkNode.checked?this.unselect():this.select())},_onClick:function(u){(u.target||u.srcElement)===this.checkNode?this.tree._onCheckNodeClick(this,this.checkNode.checked,u):this.tree._onClick(this,u)},_onChange:function(){this.isLeaf&&setTimeout(q.hitch(this,function(){this.checkNode.checked?this.emit("tn-select",this):this.emit("tn-unselect",this)}),100)},destroy:function(){delete this.tree;this.inherited(arguments)}});return H([p,
f],{declaredClass:"jimu._Tree",openOnClick:!0,multiple:!0,uniqueId:"",showRoot:!1,postMixInProperties:function(){this.inherited(arguments);this.uniqueId="tree_"+r.getRandomString()},postCreate:function(){this.inherited(arguments);d.addClass(this.domNode,"jimu-tree");this.own(h.before(this,"onClick",q.hitch(this,this._jimuBeforeClick)));this.rootLoadingIndicator&&d.setStyle(this.rootLoadingIndicator,"display","none");this.dndController.singular=!0;d.setAttr(this.domNode,"tabindex",0)},removeItem:function(u){this.model.store.remove(u)},
getAllItems:function(){var u=this.getAllTreeNodeWidgets();return c.map(u,q.hitch(this,function(B){var x=B.item;x.selected=B.checkNode.checked;return x}))},getSelectedItems:function(){var u=this.getAllTreeNodeWidgets();u=c.filter(u,q.hitch(this,function(B){return B.checkNode.checked}));return c.map(u,q.hitch(this,function(B){return B.item}))},getFilteredItems:function(u){var B=this.getAllTreeNodeWidgets();B=c.map(B,q.hitch(this,function(x){var E=x.item;E.selected=x.checkNode.checked;return E}));return c.filter(B,
q.hitch(this,function(x){return u(x)}))},getTreeNodeByItemId:function(u){for(var B=this._getAllTreeNodeDoms(),x=0;x<B.length;x++){var E=l.byNode(B[x]);if(E.item.id.toString()===u.toString())return E}return null},selectItem:function(u){(u=this.getTreeNodeByItemId(u))&&u.isLeaf&&this.selectNodeWidget(u)},unselectItem:function(u){(u=this.getTreeNodeByItemId(u))&&u.isLeaf&&u.unselect()},getAllLeafTreeNodeWidgets:function(){var u=this.getAllTreeNodeWidgets();return c.filter(u,q.hitch(this,function(B){return B.isLeaf}))},
getAllTreeNodeWidgets:function(){var u=this._getAllTreeNodeDoms();return c.map(u,q.hitch(this,function(B){return l.byNode(B)}))},isLeafItem:function(u){return u&&u.isLeaf},_getAllTreeNodeDoms:function(){return b(".dijitTreeNode",this.domNode)},_createTreeNode:function(u){u.isLeaf=this.isLeafItem(u.item);this.multiple||(u.groupId=this.uniqueId);return new w(u)},_onTreeNodeSelect:function(u){this.emit("item-select",{item:u.item,treeNode:u})},_onTreeNodeUnselect:function(u){this.emit("item-unselect",
{item:u.item,treeNode:u})},selectNodeWidget:function(u){this.multiple||this.unselectAllLeafNodeWidgets();u.select()},_jimuBeforeClick:function(u,B,x){B.isLeaf&&(d.hasClass(x.target||x.srcElement,"jimu-tree-check-node")||(this.multiple?B.toggleSelect():this.selectNodeWidget(B)));return arguments},_onCheckNodeClick:function(u,B,x){!this.multiple&&B&&this.unselectAllLeafNodeWidgets();a.stop(x);this.focusNode(u);setTimeout(q.hitch(this,function(){B?this.selectNodeWidget(u):u.unselect();this.onClick(u.item,
u,x)}),0)},unselectAllLeafNodeWidgets:function(){var u=this.getAllLeafTreeNodeWidgets();c.forEach(u,q.hitch(this,function(B){B.unselect()}))}})})},"dijit/Tree":function(){define("dojo/_base/array dojo/aspect dojo/cookie dojo/_base/declare dojo/Deferred dojo/promise/all dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/errors/create dojo/fx dojo/has dojo/_base/kernel dojo/keys dojo/_base/lang dojo/on dojo/topic dojo/touch dojo/when ./a11yclick ./focus ./registry ./_base/manager ./_Widget ./_TemplatedMixin ./_Container ./_Contained ./_CssStateMixin ./_KeyNavMixin dojo/text!./templates/TreeNode.html dojo/text!./templates/Tree.html ./tree/TreeStoreModel ./tree/ForestStoreModel ./tree/_dndSelector dojo/query!css2".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D,G,A,t,v,C,J,L,S,U,aa,ea,ba){function oa(R){return r.delegate(R.promise||R,{addCallback:function(W){this.then(W)},addErrback:function(W){this.otherwise(W)}})}var da=n("dijit._TreeNode",[A,t,v,C,J],{item:null,isTreeNode:!0,label:"",_setLabelAttr:function(R){this.labelNode["html"==this.labelType?"innerHTML":"innerText"in this.labelNode?"innerText":"textContent"]=R;this._set("label",R);f("dojo-bidi")&&this.applyTextDir(this.labelNode)},labelType:"text",
isExpandable:null,isExpanded:!1,state:"NotLoaded",templateString:S,baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow"},_setTooltipAttr:{node:"rowNode",type:"attribute",attribute:"title"},buildRendering:function(){this.inherited(arguments);this._setExpando();this._updateItemClasses(this.item);this.isExpandable&&this.labelNode.setAttribute("aria-expanded",this.isExpanded);this.setSelected(!1)},_setIndentAttr:function(R){var W=Math.max(R,0)*this.tree._nodePixelIndent+"px";h.set(this.domNode,
"backgroundPosition",W+" 0px");h.set(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",W);H.forEach(this.getChildren(),function(la){la.set("indent",R+1)});this._set("indent",R)},markProcessing:function(){this.state="Loading";this._setExpando(!0)},unmarkProcessing:function(){this._setExpando(!1)},_updateItemClasses:function(R){var W=this.tree,la=W.model;W._v10Compat&&R===la.root&&(R=null);this._applyClassAndStyle(R,"icon","Icon");this._applyClassAndStyle(R,"label","Label");this._applyClassAndStyle(R,
"row","Row");this.tree._startPaint(!0)},_applyClassAndStyle:function(R,W,la){var K="_"+W+"Class";W+="Node";var O=this[K];this[K]=this.tree["get"+la+"Class"](R,this.isExpanded);a.replace(this[W],this[K]||"",O||"");h.set(this[W],this.tree["get"+la+"Style"](R,this.isExpanded)||{})},_updateLayout:function(){var R=this.getParent();R=!R||!R.rowNode||"none"==R.rowNode.style.display;a.toggle(this.domNode,"dijitTreeIsRoot",R);a.toggle(this.domNode,"dijitTreeIsLast",!R&&!this.getNextSibling())},_setExpando:function(R){var W=
["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"];R=R?0:this.isExpandable?this.isExpanded?1:2:3;a.replace(this.expandoNode,W[R],W);this.expandoNodeText.innerHTML=["*","-","+","*"][R]},expand:function(){if(this._expandDeferred)return oa(this._expandDeferred);this._collapseDeferred&&(this._collapseDeferred.cancel(),delete this._collapseDeferred);this.isExpanded=!0;this.labelNode.setAttribute("aria-expanded","true");(this.tree.showRoot||this!==this.tree.rootNode)&&
this.containerNode.setAttribute("role","group");a.add(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);this==this.tree.rootNode&&this.tree.showRoot&&this.tree.domNode.setAttribute("aria-expanded","true");var R=k.wipeIn({node:this.containerNode,duration:G.defaultDuration}),W=this._expandDeferred=new q(function(){R.stop()});e.after(R,"onEnd",function(){W.resolve(!0)},!0);R.play();return oa(W)},collapse:function(){if(this._collapseDeferred)return oa(this._collapseDeferred);
this._expandDeferred&&(this._expandDeferred.cancel(),delete this._expandDeferred);this.isExpanded=!1;this.labelNode.setAttribute("aria-expanded","false");this==this.tree.rootNode&&this.tree.showRoot&&this.tree.domNode.setAttribute("aria-expanded","false");a.remove(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);var R=k.wipeOut({node:this.containerNode,duration:G.defaultDuration}),W=this._collapseDeferred=new q(function(){R.stop()});e.after(R,"onEnd",
function(){W.resolve(!0)},!0);R.play();return oa(W)},indent:0,setChildItems:function(R){var W=this.tree,la=W.model,K=[],O=W.focusedChild,F=this.getChildren();H.forEach(F,function(M){v.prototype.removeChild.call(this,M)},this);this.defer(function(){H.forEach(F,function(M){if(!M._destroyed&&!M.getParent()){W.dndController.removeTreeNode(M);(function ja(ka){var Q=la.getIdentity(ka.item),ha=W._itemNodesMap[Q];1==ha.length?delete W._itemNodesMap[Q]:(Q=H.indexOf(ha,ka),-1!=Q&&ha.splice(Q,1));H.forEach(ka.getChildren(),
ja)})(M);if(W.persist){var N=H.map(M.getTreePath(),function(ka){return W.model.getIdentity(ka)}).join("/"),V;for(V in W._openedNodes)V.substr(0,N.length)==N&&delete W._openedNodes[V];W._saveExpandedNodes()}W.lastFocusedChild&&!c.isDescendant(W.lastFocusedChild.domNode,W.domNode)&&delete W.lastFocusedChild;O&&!c.isDescendant(O.domNode,W.domNode)&&W.focus();M.destroyRecursive()}})});this.state="Loaded";R&&0<R.length?(this.isExpandable=!0,H.forEach(R,function(M){var N=la.getIdentity(M),V=W._itemNodesMap[N];
if(V)for(var Y=0;Y<V.length;Y++)if(V[Y]&&!V[Y].getParent()){var ka=V[Y];ka.set("indent",this.indent+1);break}ka||(ka=this.tree._createTreeNode({item:M,tree:W,isExpandable:la.mayHaveChildren(M),label:W.getLabel(M),labelType:W.model&&W.model.labelType||"text",tooltip:W.getTooltip(M),ownerDocument:W.ownerDocument,dir:W.dir,lang:W.lang,textDir:W.textDir,indent:this.indent+1}),V?V.push(ka):W._itemNodesMap[N]=[ka]);this.addChild(ka);(this.tree.autoExpand||this.tree._state(ka))&&K.push(W._expandNode(ka))},
this),H.forEach(this.getChildren(),function(M){M._updateLayout()})):this.isExpandable=!1;this._setExpando&&this._setExpando(!1);this._updateItemClasses(this.item);R=d(K);this.tree._startPaint(R);return oa(R)},getTreePath:function(){for(var R=this,W=[];R&&R!==this.tree.rootNode;)W.unshift(R.item),R=R.getParent();W.unshift(this.tree.rootNode.item);return W},getIdentity:function(){return this.tree.model.getIdentity(this.item)},removeChild:function(R){this.inherited(arguments);var W=this.getChildren();
0==W.length&&(this.isExpandable=!1,this.collapse());H.forEach(W,function(la){la._updateLayout()})},makeExpandable:function(){this.isExpandable=!0;this._setExpando(!1)},setSelected:function(R){this.labelNode.setAttribute("aria-selected",R?"true":"false");a.toggle(this.rowNode,"dijitTreeRowSelected",R)},focus:function(){y.focus(this.focusNode)}});f("dojo-bidi")&&da.extend({_setTextDirAttr:function(R){!R||this.textDir==R&&this._created||(this._set("textDir",R),this.applyTextDir(this.labelNode),H.forEach(this.getChildren(),
function(W){W.set("textDir",R)},this))}});var fa=n("dijit.Tree",[A,L,t,J],{baseClass:"dijitTree",store:null,model:null,query:null,label:"",showRoot:!0,childrenAttr:["children"],paths:[],path:[],selectedItems:null,selectedItem:null,openOnClick:!1,openOnDblClick:!1,templateString:U,persist:!1,autoExpand:!1,dndController:ba,dndParams:"onDndDrop itemCreator onDndCancel checkAcceptance checkItemAcceptance dragThreshold betweenThreshold".split(" "),onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,
checkItemAcceptance:null,dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(R,W){u.publish(this.id,r.mixin({tree:this,event:R},W||{}))},postMixInProperties:function(){this.tree=this;this.autoExpand&&(this.persist=!1);this._itemNodesMap={};!this.cookieName&&this.id&&(this.cookieName=this.id+"SaveStateCookie");this.expandChildrenDeferred=new q;this.pendingCommandsPromise=this.expandChildrenDeferred.promise;this.inherited(arguments)},postCreate:function(){this._initState();var R=
this;this.own(w(this.containerNode,w.selector(".dijitTreeNode",B.enter),function(K){R._onNodeMouseEnter(D.byNode(this),K)}),w(this.containerNode,w.selector(".dijitTreeNode",B.leave),function(K){R._onNodeMouseLeave(D.byNode(this),K)}),w(this.containerNode,w.selector(".dijitTreeRow",E.press),function(K){R._onNodePress(D.getEnclosingWidget(this),K)}),w(this.containerNode,w.selector(".dijitTreeRow",E),function(K){R._onClick(D.getEnclosingWidget(this),K)}),w(this.containerNode,w.selector(".dijitTreeRow",
"dblclick"),function(K){R._onDblClick(D.getEnclosingWidget(this),K)}));this.model||this._store2model();this.own(e.after(this.model,"onChange",r.hitch(this,"_onItemChange"),!0),e.after(this.model,"onChildrenChange",r.hitch(this,"_onItemChildrenChange"),!0),e.after(this.model,"onDelete",r.hitch(this,"_onItemDelete"),!0));this.inherited(arguments);if(this.dndController){r.isString(this.dndController)&&(this.dndController=r.getObject(this.dndController));for(var W={},la=0;la<this.dndParams.length;la++)this[this.dndParams[la]]&&
(W[this.dndParams[la]]=this[this.dndParams[la]]);this.dndController=new this.dndController(this,W)}this._load();this.onLoadDeferred=oa(this.pendingCommandsPromise);this.onLoadDeferred.then(r.hitch(this,"onLoad"))},_store2model:function(){this._v10Compat=!0;l.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");var R={id:this.id+"_ForestStoreModel",store:this.store,query:this.query,childrenAttrs:this.childrenAttr};this.params.mayHaveChildren&&(R.mayHaveChildren=
r.hitch(this,"mayHaveChildren"));this.params.getItemChildren&&(R.getChildren=r.hitch(this,function(W,la,K){this.getItemChildren(this._v10Compat&&W===this.model.root?null:W,la,K)}));this.model=new ea(R);this.showRoot=!!this.label},onLoad:function(){},_load:function(){this.model.getRoot(r.hitch(this,function(R){var W=this.rootNode=this.tree._createTreeNode({item:R,tree:this,isExpandable:!0,label:this.label||this.getLabel(R),labelType:this.model.labelType||"text",textDir:this.textDir,indent:this.showRoot?
0:-1});this.showRoot?(this.domNode.setAttribute("aria-multiselectable",!this.dndController.singular),this.rootLoadingIndicator.style.display="none"):(W.rowNode.style.display="none",this.domNode.setAttribute("role","presentation"),this.domNode.removeAttribute("aria-expanded"),this.domNode.removeAttribute("aria-multiselectable"),this["aria-label"]?(W.containerNode.setAttribute("aria-label",this["aria-label"]),this.domNode.removeAttribute("aria-label")):this["aria-labelledby"]&&(W.containerNode.setAttribute("aria-labelledby",
this["aria-labelledby"]),this.domNode.removeAttribute("aria-labelledby")),W.labelNode.setAttribute("role","presentation"),W.labelNode.removeAttribute("aria-selected"),W.containerNode.setAttribute("role","tree"),W.containerNode.setAttribute("aria-expanded","true"),W.containerNode.setAttribute("aria-multiselectable",!this.dndController.singular));this.containerNode.appendChild(W.domNode);R=this.model.getIdentity(R);this._itemNodesMap[R]?this._itemNodesMap[R].push(W):this._itemNodesMap[R]=[W];W._updateLayout();
this._expandNode(W).then(r.hitch(this,function(){this._destroyed||(this.rootLoadingIndicator.style.display="none",this.expandChildrenDeferred.resolve(!0))}))}),r.hitch(this,function(R){console.error(this,": error loading root: ",R)}))},getNodesByItem:function(R){if(!R)return[];R=r.isString(R)?R:this.model.getIdentity(R);return[].concat(this._itemNodesMap[R])},_setSelectedItemAttr:function(R){this.set("selectedItems",[R])},_setSelectedItemsAttr:function(R){var W=this;return this.pendingCommandsPromise=
this.pendingCommandsPromise.always(r.hitch(this,function(){var la=H.map(R,function(O){return!O||r.isString(O)?O:W.model.getIdentity(O)}),K=[];H.forEach(la,function(O){K=K.concat(W._itemNodesMap[O]||[])});this.set("selectedNodes",K)}))},_setPathAttr:function(R){return R.length?oa(this.set("paths",[R]).then(function(W){return W[0]})):oa(this.set("paths",[]).then(function(W){return W[0]}))},_setPathsAttr:function(R){function W(K,O){var F=K.shift(),M=H.filter(O,function(N){return N.getIdentity()==F})[0];
if(M)return K.length?la._expandNode(M).then(function(){return W(K,M.getChildren())}):M;throw new fa.PathError("Could not expand path at "+F);}var la=this;return oa(this.pendingCommandsPromise=this.pendingCommandsPromise.always(function(){return d(H.map(R,function(K){K=H.map(K,function(O){return O&&r.isObject(O)?la.model.getIdentity(O):O});if(K.length)return W(K,[la.rootNode]);throw new fa.PathError("Empty path");}))}).then(function(K){la.set("selectedNodes",K);return la.paths}))},_setSelectedNodeAttr:function(R){this.set("selectedNodes",
[R])},_setSelectedNodesAttr:function(R){this.dndController.setSelection(R)},expandAll:function(){function R(la){return W._expandNode(la).then(function(){var K=H.filter(la.getChildren()||[],function(O){return O.isExpandable});return d(H.map(K,R))})}var W=this;return oa(R(this.rootNode))},collapseAll:function(){function R(la){var K=H.filter(la.getChildren()||[],function(O){return O.isExpandable});K=d(H.map(K,R));return!la.isExpanded||la==W.rootNode&&!W.showRoot?K:K.then(function(){return W._collapseNode(la)})}
var W=this;return oa(R(this.rootNode))},mayHaveChildren:function(){},getItemChildren:function(){},getLabel:function(R){return this.model.getLabel(R)},getIconClass:function(R,W){return!R||this.model.mayHaveChildren(R)?W?"dijitFolderOpened":"dijitFolderClosed":"dijitLeaf"},getLabelClass:function(){},getRowClass:function(){},getIconStyle:function(){},getLabelStyle:function(){},getRowStyle:function(){},getTooltip:function(){return""},_onDownArrow:function(R,W){(R=this._getNext(W))&&R.isTreeNode&&this.focusNode(R)},
_onUpArrow:function(R,W){if(R=W.getPreviousSibling())for(W=R;W.isExpandable&&W.isExpanded&&W.hasChildren();)W=W.getChildren(),W=W[W.length-1];else if(R=W.getParent(),this.showRoot||R!==this.rootNode)W=R;W&&W.isTreeNode&&this.focusNode(W)},_onRightArrow:function(R,W){W.isExpandable&&!W.isExpanded?this._expandNode(W):W.hasChildren()&&(W=W.getChildren()[0])&&W.isTreeNode&&this.focusNode(W)},_onLeftArrow:function(R,W){W.isExpandable&&W.isExpanded?this._collapseNode(W):(R=W.getParent())&&R.isTreeNode&&
(this.showRoot||R!==this.rootNode)&&this.focusNode(R)},focusLastChild:function(){var R=this._getLast();R&&R.isTreeNode&&this.focusNode(R)},_getFirst:function(){return this.showRoot?this.rootNode:this.rootNode.getChildren()[0]},_getLast:function(){for(var R=this.rootNode;R.isExpanded;){var W=R.getChildren();if(!W.length)break;R=W[W.length-1]}return R},_getNext:function(R){if(R.isExpandable&&R.isExpanded&&R.hasChildren())return R.getChildren()[0];for(;R&&R.isTreeNode;){var W=R.getNextSibling();if(W)return W;
R=R.getParent()}return null},childSelector:".dijitTreeRow",isExpandoNode:function(R,W){return c.isDescendant(R,W.expandoNode)||c.isDescendant(R,W.expandoNodeText)},_onNodePress:function(R,W){this.focusNode(R)},__click:function(R,W,la,K){var O=this.isExpandoNode(W.target,R);R.isExpandable&&(la||O)?this._onExpandoClick({node:R}):(this._publish("execute",{item:R.item,node:R,evt:W}),this[K](R.item,R,W),this.focusNode(R));W.stopPropagation();W.preventDefault()},_onClick:function(R,W){this.__click(R,W,
this.openOnClick,"onClick")},_onDblClick:function(R,W){this.__click(R,W,this.openOnDblClick,"onDblClick")},_onExpandoClick:function(R){R=R.node;this.focusNode(R);R.isExpanded?this._collapseNode(R):this._expandNode(R)},onClick:function(){},onDblClick:function(){},onOpen:function(){},onClose:function(){},_getNextNode:function(R){l.deprecated(this.declaredClass+"::_getNextNode(node) is deprecated. Use _getNext(node) instead.","","2.0");return this._getNext(R)},_getRootOrFirstNode:function(){l.deprecated(this.declaredClass+
"::_getRootOrFirstNode() is deprecated. Use _getFirst() instead.","","2.0");return this._getFirst()},_collapseNode:function(R){R._expandNodeDeferred&&delete R._expandNodeDeferred;if("Loading"!=R.state&&R.isExpanded){var W=R.collapse();this.onClose(R.item,R);this._state(R,!1);this._startPaint(W);return W}},_expandNode:function(R){if(R._expandNodeDeferred)return R._expandNodeDeferred;var W=this.model,la=R.item,K=this;R._loadDeferred||(R.markProcessing(),R._loadDeferred=new q,W.getChildren(la,function(O){R.unmarkProcessing();
R.setChildItems(O).then(function(){R._loadDeferred.resolve(O)})},function(O){console.error(K,": error loading "+R.label+" children: ",O);R._loadDeferred.reject(O)}));W=R._loadDeferred.then(r.hitch(this,function(){var O=R.expand();this.onOpen(R.item,R);this._state(R,!0);return O}));this._startPaint(W);return W},focusNode:function(R){for(var W=[],la=this.domNode;la&&la.tagName&&"IFRAME"!==la.tagName.toUpperCase();la=la.parentNode)W.push({domNode:la.contentWindow||la,scrollLeft:la.scrollLeft||0,scrollTop:la.scrollTop||
0});this.focusChild(R);this.defer(function(){for(var K=0,O=W.length;K<O;K++)W[K].domNode.scrollLeft=W[K].scrollLeft,W[K].domNode.scrollTop=W[K].scrollTop},0)},_onNodeMouseEnter:function(){},_onNodeMouseLeave:function(){},_onItemChange:function(R){var W=this.model.getIdentity(R);if(W=this._itemNodesMap[W]){var la=this.getLabel(R),K=this.getTooltip(R);H.forEach(W,function(O){O.set({item:R,label:la,tooltip:K});O._updateItemClasses(R)})}},_onItemChildrenChange:function(R,W){R=this.model.getIdentity(R);
(R=this._itemNodesMap[R])&&H.forEach(R,function(la){la.setChildItems(W)})},_onItemDelete:function(R){R=this.model.getIdentity(R);var W=this._itemNodesMap[R];W&&(H.forEach(W,function(la){this.dndController.removeTreeNode(la);var K=la.getParent();K&&K.removeChild(la);this.lastFocusedChild&&!c.isDescendant(this.lastFocusedChild.domNode,this.domNode)&&delete this.lastFocusedChild;this.focusedChild&&!c.isDescendant(this.focusedChild.domNode,this.domNode)&&this.focus();la.destroyRecursive()},this),delete this._itemNodesMap[R])},
_initState:function(){this._openedNodes={};if(this.persist&&this.cookieName){var R=m(this.cookieName);R&&H.forEach(R.split(","),function(W){this._openedNodes[W]=!0},this)}},_state:function(R,W){if(!this.persist)return!1;var la=H.map(R.getTreePath(),function(K){return this.model.getIdentity(K)},this).join("/");if(1===arguments.length)return this._openedNodes[la];W?this._openedNodes[la]=!0:delete this._openedNodes[la];this._saveExpandedNodes()},_saveExpandedNodes:function(){if(this.persist&&this.cookieName){var R=
[],W;for(W in this._openedNodes)R.push(W);m(this.cookieName,R.join(","),{expires:365})}},destroy:function(){this._curSearch&&(this._curSearch.timer.remove(),delete this._curSearch);this.rootNode&&this.rootNode.destroyRecursive();this.dndController&&!r.isString(this.dndController)&&this.dndController.destroy();this.rootNode=null;this.inherited(arguments)},destroyRecursive:function(){this.destroy()},resize:function(R){R&&b.setMarginBox(this.domNode,R);this._nodePixelIndent=b.position(this.tree.indentDetector).w||
this._nodePixelIndent;this.expandChildrenDeferred.then(r.hitch(this,function(){this.rootNode.set("indent",this.showRoot?0:-1);this._adjustWidths()}))},_outstandingPaintOperations:0,_startPaint:function(R){this._outstandingPaintOperations++;this._adjustWidthsTimer&&(this._adjustWidthsTimer.remove(),delete this._adjustWidthsTimer);var W=r.hitch(this,function(){this._outstandingPaintOperations--;0>=this._outstandingPaintOperations&&!this._adjustWidthsTimer&&this._started&&(this._adjustWidthsTimer=this.defer("_adjustWidths"))});
x(R,W,W)},_adjustWidths:function(){this._adjustWidthsTimer&&(this._adjustWidthsTimer.remove(),delete this._adjustWidthsTimer);this.containerNode.style.width="auto";this.containerNode.style.width=this.domNode.scrollWidth>this.domNode.offsetWidth?"auto":"100%"},_createTreeNode:function(R){return new da(R)},focus:function(){this.lastFocusedChild?this.focusNode(this.lastFocusedChild):this.focusFirstChild()}});f("dojo-bidi")&&fa.extend({_setTextDirAttr:function(R){R&&this.textDir!=R&&(this._set("textDir",
R),this.rootNode.set("textDir",R))}});fa.PathError=g("TreePathError");fa._TreeNode=da;return fa})},"dijit/tree/TreeStoreModel":function(){define(["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/_base/lang"],function(H,e,m,n){return m("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:!1,constructor:function(q){n.mixin(this,q);this.connects=[];q=this.store;if(!q.getFeatures()["dojo.data.api.Identity"])throw Error("dijit.tree.TreeStoreModel: store must support dojo.data.Identity");
q.getFeatures()["dojo.data.api.Notification"]&&(this.connects=this.connects.concat([e.after(q,"onNew",n.hitch(this,"onNewItem"),!0),e.after(q,"onDelete",n.hitch(this,"onDeleteItem"),!0),e.after(q,"onSet",n.hitch(this,"onSetItem"),!0)]))},destroy:function(){for(var q;q=this.connects.pop();)q.remove()},getRoot:function(q,d){this.root?q(this.root):this.store.fetch({query:this.query,onComplete:n.hitch(this,function(c){if(1!=c.length)throw Error("dijit.tree.TreeStoreModel: root query returned "+c.length+
" items, but must return exactly one");this.root=c[0];q(this.root)}),onError:d})},mayHaveChildren:function(q){return H.some(this.childrenAttrs,function(d){return this.store.hasAttribute(q,d)},this)},getChildren:function(q,d,c){var a=this.store;if(a.isItemLoaded(q)){for(var b=[],h=0;h<this.childrenAttrs.length;h++){var g=a.getValues(q,this.childrenAttrs[h]);b=b.concat(g)}var k=0;this.deferItemLoadingUntilExpand||H.forEach(b,function(l){a.isItemLoaded(l)||k++});0==k?d(b):H.forEach(b,function(l,p){a.isItemLoaded(l)||
a.loadItem({item:l,onItem:function(r){b[p]=r;0==--k&&d(b)},onError:c})})}else{var f=n.hitch(this,arguments.callee);a.loadItem({item:q,onItem:function(l){f(l,d,c)},onError:c})}},isItem:function(q){return this.store.isItem(q)},fetchItemByIdentity:function(q){this.store.fetchItemByIdentity(q)},getIdentity:function(q){return this.store.getIdentity(q)},getLabel:function(q){return this.labelAttr?this.store.getValue(q,this.labelAttr):this.store.getLabel(q)},newItem:function(q,d,c){var a={parent:d,attribute:this.childrenAttrs[0]},
b;this.newItemIdAttr&&q[this.newItemIdAttr]?this.fetchItemByIdentity({identity:q[this.newItemIdAttr],scope:this,onItem:function(h){h?this.pasteItem(h,null,d,!0,c):(b=this.store.newItem(q,a))&&void 0!=c&&this.pasteItem(b,d,d,!1,c)}}):(b=this.store.newItem(q,a))&&void 0!=c&&this.pasteItem(b,d,d,!1,c)},pasteItem:function(q,d,c,a,b){var h=this.store,g=this.childrenAttrs[0];d&&H.forEach(this.childrenAttrs,function(f){if(h.containsValue(d,f,q)){if(!a){var l=H.filter(h.getValues(d,f),function(p){return p!=
q});h.setValues(d,f,l)}g=f}});if(c)if("number"==typeof b){var k=h.getValues(c,g).slice();k.splice(b,0,q);h.setValues(c,g,k)}else h.setValues(c,g,h.getValues(c,g).concat(q))},onChange:function(){},onChildrenChange:function(){},onDelete:function(){},onNewItem:function(q,d){d&&this.getChildren(d.item,n.hitch(this,function(c){this.onChildrenChange(d.item,c)}))},onDeleteItem:function(q){this.onDelete(q)},onSetItem:function(q,d){if(-1!=H.indexOf(this.childrenAttrs,d))this.getChildren(q,n.hitch(this,function(c){this.onChildrenChange(q,
c)}));else this.onChange(q)}})})},"dijit/tree/ForestStoreModel":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/kernel","dojo/_base/lang","./TreeStoreModel"],function(H,e,m,n,q){return e("dijit.tree.ForestStoreModel",q,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(d){this.root={store:this,root:!0,id:d.rootId,label:d.rootLabel,children:d.rootChildren}},mayHaveChildren:function(d){return d===this.root||this.inherited(arguments)},getChildren:function(d,c,a){d===
this.root?this.root.children?c(this.root.children):this.store.fetch({query:this.query,onComplete:n.hitch(this,function(b){this.root.children=b;c(b)}),onError:a}):this.inherited(arguments)},isItem:function(d){return d===this.root?!0:this.inherited(arguments)},fetchItemByIdentity:function(d){if(d.identity==this.root.id){var c=d.scope||m.global;d.onItem&&d.onItem.call(c,this.root)}else this.inherited(arguments)},getIdentity:function(d){return d===this.root?this.root.id:this.inherited(arguments)},getLabel:function(d){return d===
this.root?this.root.label:this.inherited(arguments)},newItem:function(d,c,a){return c===this.root?(this.onNewRootItem(d),this.store.newItem(d)):this.inherited(arguments)},onNewRootItem:function(){},pasteItem:function(d,c,a,b,h){if(c===this.root&&!b)this.onLeaveRoot(d);this.inherited(arguments,[d,c===this.root?null:c,a===this.root?null:a,b,h]);if(a===this.root)this.onAddToRoot(d)},onAddToRoot:function(d){console.log(this,": item ",d," added to root")},onLeaveRoot:function(d){console.log(this,": item ",
d," removed from root")},_requeryTop:function(){var d=this.root.children||[];this.store.fetch({query:this.query,onComplete:n.hitch(this,function(c){this.root.children=c;if(d.length!=c.length||H.some(d,function(a,b){return c[b]!=a}))this.onChildrenChange(this.root,c)})})},onNewItem:function(d,c){this._requeryTop();this.inherited(arguments)},onDeleteItem:function(d){-1!=H.indexOf(this.root.children,d)&&this._requeryTop();this.inherited(arguments)},onSetItem:function(d,c,a,b){this._requeryTop();this.inherited(arguments)}})})},
"dijit/tree/_dndSelector":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/dnd/common dojo/dom dojo/mouse dojo/on dojo/touch ../a11yclick ./_dndContainer".split(" "),function(H,e,m,n,q,d,c,a,b,h,g){return e("dijit.tree._dndSelector",g,{constructor:function(){this.selection={};this.anchor=null;this.events.push(a(this.tree.domNode,b.press,n.hitch(this,"onMouseDown")),a(this.tree.domNode,b.release,n.hitch(this,"onMouseUp")),a(this.tree.domNode,b.move,n.hitch(this,
"onMouseMove")),a(this.tree.domNode,h.press,n.hitch(this,"onClickPress")),a(this.tree.domNode,h.release,n.hitch(this,"onClickRelease")))},singular:!1,getSelectedTreeNodes:function(){var k=[],f=this.selection,l;for(l in f)k.push(f[l]);return k},selectNone:function(){this.setSelection([]);return this},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null},addTreeNode:function(k,f){this.setSelection(this.getSelectedTreeNodes().concat([k]));f&&(this.anchor=k);return k},removeTreeNode:function(k){var f=
H.filter(this.getSelectedTreeNodes(),function(l){return!d.isDescendant(l.domNode,k.domNode)});this.setSelection(f);return k},isTreeNodeSelected:function(k){return k.id&&!!this.selection[k.id]},setSelection:function(k){var f=this.getSelectedTreeNodes();H.forEach(this._setDifference(f,k),n.hitch(this,function(l){l.setSelected(!1);this.anchor==l&&delete this.anchor;delete this.selection[l.id]}));H.forEach(this._setDifference(k,f),n.hitch(this,function(l){l.setSelected(!0);this.selection[l.id]=l}));this._updateSelectionProperties()},
_setDifference:function(k,f){H.forEach(f,function(l){l.__exclude__=!0});k=H.filter(k,function(l){return!l.__exclude__});H.forEach(f,function(l){delete l.__exclude__});return k},_updateSelectionProperties:function(){var k=this.getSelectedTreeNodes(),f=[],l=[];H.forEach(k,function(p){var r=p.getTreePath();l.push(p);f.push(r)},this);k=H.map(l,function(p){return p.item});this.tree._set("paths",f);this.tree._set("path",f[0]||[]);this.tree._set("selectedNodes",l);this.tree._set("selectedNode",l[0]||null);
this.tree._set("selectedItems",k);this.tree._set("selectedItem",k[0]||null)},onClickPress:function(k){if(!(this.current&&this.current.isExpandable&&this.tree.isExpandoNode(k.target,this.current))){"mousedown"==k.type&&c.isLeft(k)&&k.preventDefault();var f="keydown"==k.type?this.tree.focusedChild:this.current;if(f){var l=q.getCopyKeyState(k),p=f.id;this.singular||k.shiftKey||!this.selection[p]?(this._doDeselect=!1,this.userSelect(f,l,k.shiftKey)):this._doDeselect=!0}}},onClickRelease:function(k){this._doDeselect&&
(this._doDeselect=!1,this.userSelect("keyup"==k.type?this.tree.focusedChild:this.current,q.getCopyKeyState(k),k.shiftKey))},onMouseMove:function(){this._doDeselect=!1},onMouseDown:function(){},onMouseUp:function(){},_compareNodes:function(k,f){if(k===f)return 0;if("sourceIndex"in document.documentElement)return k.sourceIndex-f.sourceIndex;if("compareDocumentPosition"in document.documentElement)return k.compareDocumentPosition(f)&2?1:-1;if(document.createRange){var l=doc.createRange();l.setStartBefore(k);
k=doc.createRange();k.setStartBefore(f);return l.compareBoundaryPoints(l.END_TO_END,k)}throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");},userSelect:function(k,f,l){if(this.singular)this.anchor==k&&f?this.selectNone():(this.setSelection([k]),this.anchor=k);else if(l&&this.anchor){f=this._compareNodes(this.anchor.rowNode,k.rowNode);l=this.anchor;0>f?f=l:(f=k,k=l);for(l=[];f!=k;)l.push(f),f=this.tree._getNext(f);l.push(k);this.setSelection(l)}else this.selection[k.id]&&
f?this.removeTreeNode(k):f?this.addTreeNode(k,!0):(this.setSelection([k]),this.anchor=k)},getItem:function(k){return{data:this.selection[k],type:["treeNode"]}},forInSelectedItems:function(k,f){f=f||m.global;for(var l in this.selection)k.call(f,this.getItem(l),l,this)}})})},"dijit/tree/_dndContainer":function(){define("dojo/aspect dojo/_base/declare dojo/dom-class dojo/_base/lang dojo/on dojo/touch".split(" "),function(H,e,m,n,q,d){return e("dijit.tree._dndContainer",null,{constructor:function(c,a){this.tree=
c;this.node=c.domNode;n.mixin(this,a);this.containerState="";m.add(this.node,"dojoDndContainer");this.events=[q(this.node,d.enter,n.hitch(this,"onOverEvent")),q(this.node,d.leave,n.hitch(this,"onOutEvent")),H.after(this.tree,"_onNodeMouseEnter",n.hitch(this,"onMouseOver"),!0),H.after(this.tree,"_onNodeMouseLeave",n.hitch(this,"onMouseOut"),!0),q(this.node,"dragstart, selectstart",function(b){b.preventDefault()})]},destroy:function(){for(var c;c=this.events.pop();)c.remove();this.node=this.parent=
null},onMouseOver:function(c){this.current=c},onMouseOut:function(){this.current=null},_changeState:function(c,a){var b="dojoDnd"+c;c=c.toLowerCase()+"State";m.replace(this.node,b+a,b+this[c]);this[c]=a},_addItemClass:function(c,a){m.add(c,"dojoDndItem"+a)},_removeItemClass:function(c,a){m.remove(c,"dojoDndItem"+a)},onOverEvent:function(){this._changeState("Container","Over")},onOutEvent:function(){this._changeState("Container","")}})})},"jimu/serviceBrowserRuleUtils":function(){define(["dojo/_base/lang",
"dojo/_base/array","dojo/Deferred","jimu/utils","jimu/ServiceBrowserRule"],function(H,e,m,n,q){var d={combineRules:function(c){var a=new q;e.forEach(c,function(b){e.forEach(b.leafTypes,function(h){0>a.leafTypes.indexOf(h)&&a.leafTypes.push(h)});e.forEach(b.serviceTypes,function(h){0>a.serviceTypes.indexOf(h)&&a.serviceTypes.push(h)})});a.getMatchedRule=function(b){var h=null;e.some(c,function(g){return g.isUrlContainsServiceType(b)?(h=g,!0):!1});return h};a.getItem=function(b){var h=null;return h=
(h=a.getMatchedRule(b))?h.getItem(b):a.defaultGetItem(b)};a.getSubItemUrls=function(b){var h=null;return h=(h=a.getMatchedRule(b))?h.getSubItemUrls(b):a.defaultGetSubItemUrls(b)};a.getIconImageName=function(b,h){var g="";if(b.url){var k=a.getMatchedRule(b.url);k&&"function"===typeof k.getIconImageName&&(g=k.getIconImageName(b,h))}return g};return a},getFeaturelayerServiceBrowserRule:function(c,a,b){c=H.clone(c);var h=["point","polyline","polygon"];H.isArrayLike(c)&&0<c.length?(c=e.filter(c,function(g){return 0<=
h.indexOf(g)}),0===c.length&&(c=h)):c=h;return d._getFeaturelayerServiceBrowserRule(c,a,b)},_getFeaturelayerServiceBrowserRule:function(c,a,b){return new q({types:c,leafTypes:["Feature Layer","Table"],serviceTypes:["MapServer","FeatureServer"],_groupLayerType:"Group Layer",_featureLayerType:"Feature Layer",_tableType:"Table",getItem:function(h){var g=new m;this.isUrlEndWithServiceType(h,this.serviceTypes)?g=this.defaultGetItem(h):this.getRestInfo(h).then(H.hitch(this,function(k){k=this._getItemByLayerDefinition(h,
k);g.resolve(k)}),H.hitch(this,function(k){g.reject(k)}));return g},getSubItemUrls:function(h){var g=new m;return g=this.isUrlEndWithServiceType(h)?this._getSubUrlsByServiceUrl(h):this._getSubUrlsByGroupUrl(h)},getIconImageName:function(h,g){var k="";"MapServer"===h.type||"FeatureServer"===h.type?k=g?"mapserver_open.png":"mapserver_close.png":h.type===this._groupLayerType?k=g?"group_layer2.png":"group_layer1.png":h.type===this._featureLayerType?(h=n.getTypeByGeometryType(h.definition&&h.definition.geometryType),
"point"===h?k="point_layer1.png":"polyline"===h?k="line_layer1.png":"polygon"===h&&(k="polygon_layer1.png")):h.type===this._tableType?k="table.png":"root"===h.type&&this._currentUrl&&e.some(this.serviceTypes,H.hitch(this,function(f){return n.isStringEndWith(this._currentUrl,"/"+f)}))&&(k=g?"mapserver_open.png":"mapserver_close.png");return k},_getSubUrlsByServiceUrl:function(h){var g=new m;this.getRestInfo(h).then(H.hitch(this,function(k){var f=[];e.forEach(k.layers,H.hitch(this,function(l){0<=l.parentLayerId||
f.push(h+"/"+l.id)}));b&&e.forEach(k.tables,H.hitch(this,function(l){0<=l.parentLayerId||f.push(h+"/"+l.id)}));g.resolve(f)}),H.hitch(this,function(k){g.reject(k)}));return g},_getSubUrlsByGroupUrl:function(h){var g=new m;this.getRestInfo(h).then(H.hitch(this,function(k){var f=[];if(k.type===this._groupLayerType){var l=this._getServiceUrlByLayerUrl(h);f=e.map(k.subLayers||[],H.hitch(this,function(p){return l+"/"+p.id}))}g.resolve(f)}),H.hitch(this,function(k){g.reject(k)}));return g},_getItemByLayerDefinition:function(h,
g){var k=null,f=g.type;if(f===this._groupLayerType)k={name:g.name,type:f,url:h,definition:g};else if(f===this._featureLayerType||f===this._tableType){var l=!1;f===this._featureLayerType?l=this._validateEsriGeometryType(g.geometryType):f===this._tableType&&(l=!0);l&&(l=!1,(l=a?n.isFeaturelayerUrlSupportQuery(h,g.capabilities):!0)&&(k={name:g.name,type:f,url:h,definition:g}))}return k},_validateEsriGeometryType:function(h){h=n.getTypeByGeometryType(h);return 0<=this.types.indexOf(h)},_getServiceUrlByLayerUrl:function(h){for(var g=
"",k=0;k<this.serviceTypes.length;k++){var f=this.serviceTypes[k].toLowerCase(),l=h.toLowerCase().lastIndexOf("/"+f+"/");if(0<=l){g=h.slice(0,l+f.length+1);break}}return g}})},getGeocodeServiceBrowserRule:function(){return new q({leafTypes:["GeocodeServer"],serviceTypes:["GeocodeServer"]})},getGpServiceBrowserRule:function(){return new q({leafTypes:["GPTask"],serviceTypes:["GPServer"],getItem:function(c){var a=new m;this.isUrlEndWithServiceType(c)?a=this.defaultGetItem(c):this.getRestInfo(c).then(H.hitch(this,
function(b){a.resolve({name:b.displayName||b.name,type:"GPTask",url:c,definition:b})}),H.hitch(this,function(b){a.reject(b)}));return a},getSubItemUrls:function(c){var a=new m;this.isUrlEndWithServiceType(c)?this.getRestInfo(c).then(H.hitch(this,function(b){b=e.map(b.tasks||[],H.hitch(this,function(h){return c+"/"+h}));a.resolve(b)}),H.hitch(this,function(b){a.reject(b)})):a.resolve([]);return a},getIconImageName:function(c,a){a="";"GPServer"===c.type?a="toolbox.png":"GPTask"===c.type&&(a="tool.png");
return a}})},getImageServiceBrowserRule:function(c){return new q({leafTypes:["ImageServer"],serviceTypes:["ImageServer"],getItem:function(a){var b=new m;this.isUrlEndWithServiceType(a)?this.defaultGetItem(a).then(H.hitch(this,function(h){c?n.isImageServiceSupportQuery(h.definition.capabilities)?b.resolve(h):b.resolve(null):b.resolve(h)}),H.hitch(this,function(h){b.reject(h)})):b.resolve(null);return b},getIconImageName:function(a,b){b="";"ImageServer"===a.type&&(b="image_layer.png");return b}})},
getQueryableServiceBrowserRule:function(){var c=d.getFeaturelayerServiceBrowserRule(["point","polyline","polygon"],!0,!0),a=d.getImageServiceBrowserRule(!0);return d.combineRules([c,a])}};return d})},"jimu/ServiceBrowserRule":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Deferred jimu/utils esri/request esri/IdentityManager".split(" "),function(H,e,m,n,q,d,c){return H([],{leafTypes:null,serviceTypes:null,_restInfoCache:{},constructor:function(a){e.mixin(this,a);e.isArrayLike(this.leafTypes)||
(this.leafTypes=[]);e.isArrayLike(this.serviceTypes)||(this.serviceTypes=[])},getItem:function(a){return this.defaultGetItem(a)},getSubItemUrls:function(a){return this.defaultGetSubItemUrls(a)},getIconImageName:function(a,b){return""},defaultGetItem:function(a){var b=new n;a=a.replace(/\/*$/g,"");if(this.isUrlEndWithServiceType(a)){var h=a.split("/"),g=h[h.length-1],k=h[h.length-2];this.getRestInfo(a).then(e.hitch(this,function(f){b.resolve({name:k,type:g,url:a,definition:f})}),e.hitch(this,function(f){console.error(f);
b.reject({errorCode:"NETWORK_ERROR",error:f})}))}else b.resolve(null);return b},defaultGetSubItemUrls:function(a){a=new n;a.resolve([]);return a},getRestInfo:function(a){var b=new n;a=a.replace(/\/*$/g,"");var h=this._restInfoCache[a];if(h)b.resolve(h);else{h={url:a,content:{f:"json"},handleAs:"json",callbackParamName:"callback",timeout:2E4};var g=c.findCredential(a);g&&g.token&&(h.content.token=g.token);d(h).then(e.hitch(this,function(k){this._restInfoCache[a]=k;b.resolve(k)}),function(k){b.reject(k)})}return b},
isServiceTypeSupported:function(a){a=a.toLowerCase();return m.some(this.serviceTypes,e.hitch(this,function(b){return b.toLowerCase()===a}))},isUrlEndWithServiceType:function(a){return m.some(this.serviceTypes,e.hitch(this,function(b){return q.isStringEndWith(a,"/"+b)}))},isUrlContainsServiceType:function(a){a=a.toLowerCase();return m.some(this.serviceTypes,e.hitch(this,function(b){b=b.toLowerCase();return 0<=a.indexOf("/"+b)}))}})})},"jimu/dijit/_GpServiceChooserContent":function(){define(["dojo/_base/declare",
"./_BasicServiceChooserContent","./GpServiceBrowser"],function(H,e,m){return H([e],{baseClass:"jimu-gp-service-chooser-content",_examples:["http://myserver/arcgis/rest/services","http://myserver/arcgis/rest/services/myservice/GpServer","http://sampleserver6.arcgisonline.com/arcgis/rest/services/Elevation/ESRI_Elevation_World/GPServer/Viewshed"],_createServiceBrowser:function(n){return new m(n)}})})},"jimu/dijit/_BasicServiceChooserContent":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/_BasicServiceChooserContent.html dojo/Evented dojo/Deferred dojo/_base/html dojo/_base/array dojo/_base/lang dojo/on dojo/aspect dojo/promise/all jimu/dijit/URLInput jimu/dijit/LoadingIndicator".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p){return H([e,m,n,d],{templateString:q,_examples:["http://myserver/arcgis/rest/services","http://myserver/arcgis/rest/services/folder","http://myserver/arcgis/rest/services/myservice/servicetype"],multiple:!1,url:"",getSelectedItems:function(){return this.serviceBrowser.getSelectedItems()},postMixInProperties:function(){this.nls=h.mixin({},window.jimuNls.common);this.nls=h.mixin(this.nls,window.jimuNls.basicServiceChooser)},postCreate:function(){this.inherited(arguments);
a.addClass(this.domNode,"jimu-basic-service-chooser-content");this.multiple=!!this.multiple;this._initSelf();this.exampleTd.innerHTML=this.exampleTd.innerHTML},setUrl:function(r){var w=new c;(this.url=r)&&"string"===typeof this.url?(this.urlInput.set("value",this.url),w=this._onBtnValidateClick()):w.reject();return w},focusInput:function(){this.urlInput.focus()},_initSelf:function(){this._examples&&0<this._examples.length?b.forEach(this._examples,h.hitch(this,function(w){a.create("div",{innerHTML:w,
"class":"example-url"},this.exampleTd)})):a.setStyle(this.exampleTr,"display","none");var r={multiple:this.multiple,_onTreeClick:h.hitch(this,this._onTreeClick)};this.serviceBrowser=this._createServiceBrowser(r);this.serviceBrowser.placeAt(this.serviceBrowserContainer);this.serviceBrowser.startup();this.own(k.after(this.urlInput,"validator",h.hitch(this,this._afterUrlValidate)));this.url&&"string"===typeof this.url&&this.urlInput.set("value",this.url);this.own(g(this.serviceBrowser,"error",h.hitch(this,
this._onServiceBrowserError)))},_createServiceBrowser:function(r){},_validateUrl:function(r){r=r.replace(/\/*$/g,"");if((r=r.match(/\/rest\/services\/*(.*)/gi))&&0<r.length)if(r=r[0].replace(/\/rest\/services\/*/,"")){var w=r.split("/");if(1===w.length)return!0;if(2===w.length)return this.serviceBrowser.isServiceTypeSupported(w[1]);if(3<=w.length)return r=this.serviceBrowser.isServiceTypeSupported(w[1]),w=this.serviceBrowser.isServiceTypeSupported(w[2]),r||w}else return!0;else return!1},_afterUrlValidate:function(r){r&&
(r=this.urlInput.get("value"),r=this._validateUrl(r));r?a.removeClass(this.btnValidate,"jimu-state-disabled"):a.addClass(this.btnValidate,"jimu-state-disabled");return r},_onServiceBrowserError:function(r){this._showErrorMessage(r)},_showErrorMessage:function(r){r&&"string"===typeof r?(this.errorNode.innerHTML=r,a.addClass(this.errorSection,"visible")):a.removeClass(this.errorSection,"visible")},_clearErrorMessage:function(){this.errorNode.innerHTML="";a.removeClass(this.errorSection,"visible")},
_onBtnValidateClick:function(){this._clearErrorMessage();var r=new c;if(this.urlInput.validate()){var w=this.urlInput.get("value");this.serviceBrowser.setUrl(w).then(h.hitch(this,function(){this.domNode&&this._checkSelectedItemsNumber();r.resolve()}),h.hitch(this,function(){this.domNode&&this._checkSelectedItemsNumber();r.reject()}));this.emit("validate-click")}else r.reject();return r},_checkSelectedItemsNumber:function(){0<this.getSelectedItems().length?a.removeClass(this.btnOk,"jimu-state-disabled"):
a.addClass(this.btnOk,"jimu-state-disabled")},_onTreeClick:function(){this._checkSelectedItemsNumber()},_onBtnOkClick:function(){var r=this.getSelectedItems();0<r.length&&this.emit("ok",r)},_onBtnCancelClick:function(){this.emit("cancel")}})})},"widgets/Geoprocessing/setting/SettingDetail":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/_base/array dojo/on dojo/query dojo/Deferred dojo/text!./SettingDetail.html dijit/_WidgetBase dijit/_TemplatedMixin dijit/TitlePane jimu/dijit/ViewStack jimu/dijit/LoadingIndicator jimu/dijit/Message ./ParamSetting ./ParamNodeList ./LayerOrder ./Options ../utils".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B){return H([b,h],{baseClass:"jimu-widget-setting-gp-detail",templateString:a,postCreate:function(){this.inherited(arguments);this.paramSetting=new p({map:this.map,nls:this.nls});this.layerOrder=new w({nls:this.nls});this.options=new u({nls:this.nls});this.own(q(this.options,"result-map-service",e.hitch(this,function(x){this._outputInResultMap(x)})));this.viewStack=new k({viewType:"dijit",views:[this.paramSetting,this.layerOrder,this.options]},this.settingPaneNode);
this.loadingCover=new f({hidden:!0});this.loadingCover.placeAt(this.domNode);this.loadingCover.startup()},startup:function(){this.inherited(arguments);this.viewStack.startup()},setConfig:function(x){x=e.clone(x);this.hasInputParam=!0;this.config&&this.config.taskUrl===x.taskUrl?(this.config=x,"serverInfo"in x&&(!this.config.serverInfo.hasResultMapServer||this.config.serverInfo.resultMapServerName)?this._initNavPane():(this.loadingCover.show(),B.getServiceDescription(this.config.taskUrl).then(e.hitch(this,
function(E){this.loadingCover.hide();this.config.serverInfo=E.serverInfo;this._initNavPane()})))):(this.config=x,this.loadingCover.show(),B.getServiceDescription(this.config.taskUrl).then(e.hitch(this,function(E){this.loadingCover.hide();this._changeTaskInfoToConfig(E);this._initNavPane()})))},getConfig:function(){if(!this.config.taskUrl)return new l({message:this.nls.serviceURLPlaceholder}),!1;this.paramSetting.param&&this.paramSetting.acceptValue();this.layerOrder.acceptValue();this.options.acceptValue();
this.config.inputParams=this.inputParamNodes.getConfig();this.config.outputParams=this.outputParamNodes.getConfig();return this.config},_changeTaskInfoToConfig:function(x){var E=this.config.taskUrl;this.config=x;this.config.taskUrl=E;this.config.isSynchronous="esriExecutionTypeSynchronous"===this.config.executionType?!0:!1;delete this.config.executionType;this.config.inputParams=[];this.config.outputParams=[];n.forEach(x.parameters,function(y){y.label=y.displayName;delete y.displayName;"esriGPParameterDirectionInput"===
y.direction?this.config.inputParams.push(y):this.config.outputParams.push(y);delete y.direction;y.visible=!0;y.required="esriGPParameterTypeRequired"===y.parameterType?!0:!1;delete y.parameterType;"GPFeatureRecordSetLayer"===y.dataType?y.featureSetMode="layers":"GPRecordSet"===y.dataType&&(y.recordSetMode="table")},this);this.config.shareResults=B.allowShareResult(this.config);delete this.config.parameters},_initNavPane:function(){m.empty(this.navPaneNode);this._createParamsSection("input").then(e.hitch(this,
function(){return this._createParamsSection("output")})).then(e.hitch(this,function(){this._createLayerOrderNode();this._createOptionsNode();this.layerOrder.setConfig(this.config);this.options.setConfig(this.config);this.paramSetting.setConfig(this.config);this.inputParamNodes&&0<this.inputParamNodes.getSize()?this.inputParamNodes.selectDefault():this.outputParamNodes&&0<this.outputParamNodes.getSize()&&this.outputParamNodes.selectDefault()}))},_onParamChange:function(x,E){d(".jimu-state-active",
this.domNode).removeClass("jimu-state-active");"input"===E?this._clearParamSelection("output"):this._clearParamSelection("input");this.paramSetting.param&&this.paramSetting.acceptValue();this.layerOrder.acceptValue();this.options.acceptValue();"none"===m.getStyle(this.viewStack.domNode,"display")&&m.setStyle(this.viewStack.domNode,"display","");this.viewStack.switchView(this.paramSetting);this.paramSetting.setParam(x,E)},_setActiveLinkNode:function(x){d(".jimu-state-active",this.domNode).removeClass("jimu-state-active");
this._clearParamSelection();m.addClass(x,"jimu-state-active")},_createParamsSection:function(x){var E=new c,y="input"===x?this.config.inputParams:this.config.outputParams;if("output"===x&&this.config.serverInfo.resultMapServerName&&!n.some(y,function(D){return"MapServiceLayer"===D.dataType}))return B.getResultMapLayers(this.config.taskUrl,this.config.serverInfo.resultMapServerName).then(e.hitch(this,function(D){y.push({name:this.config.serverInfo.resultMapServerName,label:this.config.serverInfo.resultMapServerName,
tooltip:this.config.serverInfo.resultMapServerName,dataType:"MapServiceLayer",layerNames:D,visible:!0,required:""});this._doCreateParamsSection(y,x);E.resolve()})),E;this._doCreateParamsSection(y,x);E.resolve();return E},_doCreateParamsSection:function(x,E){x=new r({params:x,nls:this.nls,direction:E,useResultMapServer:this.config.useResultMapServer});this.own(q(x,"select-param",e.hitch(this,this._onParamChange)));"input"===E?this.inputParamNodes=x:this.outputParamNodes=x;(new g({title:this.nls[E],
content:x.domNode,open:0<this.inputParamNodes.getSize()?"input"===E:"output"===E})).placeAt(this.navPaneNode)},_createLayerOrderNode:function(){var x=m.create("div",{"class":"link-action-node nav-pane-node layer-order-node",innerHTML:this.nls.layerOrder},this.navPaneNode);this.own(q(x,"click",e.hitch(this,function(){this.options.acceptValue();this.paramSetting.param&&this.paramSetting.acceptValue();this._setActiveLinkNode(x);this.layerOrder.setConfig(this.config);this.viewStack.switchView(this.layerOrder)})))},
_createOptionsNode:function(){var x=m.create("div",{"class":"link-action-node nav-pane-node options-node",innerHTML:this.nls.options},this.navPaneNode);this.own(q(x,"click",e.hitch(this,function(){this.paramSetting.param&&this.paramSetting.acceptValue();this.layerOrder.acceptValue();this._setActiveLinkNode(x);this.viewStack.switchView(this.options)})))},_clearParamSelection:function(x){("input"===x||"undefined"===typeof x)&&this.inputParamNodes&&0<this.inputParamNodes.getSize()&&this.inputParamNodes.clearSelection();
("output"===x||"undefined"===typeof x)&&this.outputParamNodes&&0<this.outputParamNodes.getSize()&&this.outputParamNodes.clearSelection()},_outputInResultMap:function(x){!0===x?this.outputParamNodes.hideOutputInResultMap():this.outputParamNodes.showOutputInResultMap()}})})},"dijit/TitlePane":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/fx dojo/has dojo/_base/kernel dojo/keys ./_CssStateMixin ./_TemplatedMixin ./layout/ContentPane dojo/text!./templates/TitlePane.html ./_base/manager ./a11yclick".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p){e=e("dijit.TitlePane",[f,k,g],{title:"",_setTitleAttr:{node:"titleNode",type:"innerHTML"},open:!0,toggleable:!0,tabIndex:"0",duration:p.defaultDuration,baseClass:"dijitTitlePane",templateString:l,doLayout:!1,_setTooltipAttr:{node:"focusNode",type:"attribute",attribute:"title"},buildRendering:function(){this.inherited(arguments);m.setSelectable(this.titleNode,!1)},postCreate:function(){this.inherited(arguments);this.toggleable&&this._trackMouseState(this.titleBarNode,
this.baseClass+"Title");var r=this.hideNode,w=this.wipeNode;this._wipeIn=c.wipeIn({node:w,duration:this.duration,beforeBegin:function(){r.style.display=""}});this._wipeOut=c.wipeOut({node:w,duration:this.duration,onEnd:function(){r.style.display="none"}})},_setOpenAttr:function(r,w){H.forEach([this._wipeIn,this._wipeOut],function(u){u&&"playing"==u.status()&&u.stop()});w?this[r?"_wipeIn":"_wipeOut"].play():this.hideNode.style.display=this.wipeNode.style.display=r?"":"none";if(this._started)if(r)this._onShow();
else this.onHide();this.containerNode.setAttribute("aria-hidden",r?"false":"true");this.focusNode.setAttribute("aria-pressed",r?"true":"false");this._set("open",r);this._setCss()},_setToggleableAttr:function(r){this.focusNode.setAttribute("role",r?"button":"heading");r?(this.focusNode.setAttribute("aria-controls",this.id+"_pane"),this.focusNode.setAttribute("tabIndex",this.tabIndex),this.focusNode.setAttribute("aria-pressed",this.open)):(n.remove(this.focusNode,"aria-controls"),n.remove(this.focusNode,
"tabIndex"),n.remove(this.focusNode,"aria-pressed"));this._set("toggleable",r);this._setCss()},_setContentAttr:function(r){this.open&&this._wipeOut&&"playing"!=this._wipeOut.status()?(this._wipeIn&&"playing"==this._wipeIn.status()&&this._wipeIn.stop(),d.setMarginBox(this.wipeNode,{h:d.getMarginBox(this.wipeNode).h}),this.inherited(arguments),this._wipeIn?this._wipeIn.play():this.hideNode.style.display=""):this.inherited(arguments)},toggle:function(){this._setOpenAttr(!this.open,!0)},_setCss:function(){var r=
this.titleBarNode||this.focusNode,w=this._titleBarClass;this._titleBarClass=this.baseClass+"Title"+(this.toggleable?"":"Fixed")+(this.open?"Open":"Closed");q.replace(r,this._titleBarClass,w||"");q.replace(r,this._titleBarClass.replace("TitlePaneTitle",""),(w||"").replace("TitlePaneTitle",""));this.arrowNodeInner.innerHTML=this.open?"-":"+"},_onTitleKey:function(r){r.keyCode==h.DOWN_ARROW&&this.open&&(this.containerNode.focus(),r.preventDefault())},_onTitleClick:function(){this.toggleable&&this.toggle()},
setTitle:function(r){b.deprecated("dijit.TitlePane.setTitle() is deprecated.  Use set('title', ...) instead.","","2.0");this.set("title",r)}});a("dojo-bidi")&&e.extend({_setTitleAttr:function(r){this._set("title",r);this.titleNode.innerHTML=r;this.applyTextDir(this.titleNode)},_setTooltipAttr:function(r){this._set("tooltip",r);this.textDir&&(r=this.enforceTextDirWithUcc(null,r));n.set(this.focusNode,"title",r)},_setTextDirAttr:function(r){this._created&&this.textDir!=r&&(this._set("textDir",r),this.set("title",
this.title),this.set("tooltip",this.tooltip))}});return e})},"widgets/Geoprocessing/setting/ParamSetting":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/on dojo/text!./ParamSetting.html dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin jimu/dijit/Popup jimu/utils ../editorManager ../EditorChooser ../utils dijit/form/TextBox jimu/dijit/CheckBox".split(" "),function(H,e,m,n,q,d,c,a,b,h,g,k,f){return H([d,c,a],{baseClass:"jimu-widget-setting-gp-param",
templateString:q,postCreate:function(){this.inherited(arguments);g.setMap(this.map);g.setNls(this.nls);this.own(n(this.useDynamicSchema,"change",e.hitch(this,function(l){this.spart&&this.spart.domNode&&(l?m.setStyle(this.spart.domNode,"display","none"):m.setStyle(this.spart.domNode,"display","block"))})));this.own(n(this.ignore,"change",e.hitch(this,this._updateStatus)))},_updateStatus:function(l){l?(this.layerInvisible.setStatus(!1),this.useDynamicSchema.setStatus(!1),this.spart&&this.spart.domNode&&
m.setStyle(this.spart.domNode,"display","none")):(this.layerInvisible.setStatus(!0),this.useDynamicSchema.setStatus(!0),this.spart&&this.spart.domNode&&(this.useDynamicSchema.getValue()?m.setStyle(this.spart.domNode,"display","none"):m.setStyle(this.spart.domNode,"display","block")))},setParam:function(l,p){this.param=l;this.direction=p;void 0===l.label&&(l.label="");this.label.setValue(l.label);void 0===l.tooltip&&(l.tooltip=void 0===l.label?"":l.label);this.tooltip.setValue(l.tooltip);this.spart&&
(this.spart.destroy(),m.destroy(this.spartLabelNode),m.destroy(this.changeEditorNode));this._createSpecialPart();"output"===p?(m.setStyle(this.visibleDiv,"display","none"),m.setStyle(this.ignoreDiv,"display","block"),this.ignore.setValue(l.ignore),"GPFeatureRecordSetLayer"===this.param.dataType||"MapServiceLayer"===this.param.dataType?(this.layerInvisible.setStatus(!0),m.setStyle(this.layerVisibleDiv,"display","block"),this.layerInvisible.setValue(l.layerInvisible)):m.setStyle(this.layerVisibleDiv,
"display","none"),"GPFeatureRecordSetLayer"===this.param.dataType||"GPRecordSet"===this.param.dataType?(this.useDynamicSchema.setStatus(!0),this.useDynamicSchema.setValue(f.useDynamicSchema(this.param,this.config)),m.setStyle(this.dynamicSchemaDiv,"display","block")):m.setStyle(this.dynamicSchemaDiv,"display","none"),this._updateStatus(!0===l.ignore)):(this.visible.setValue(l.visible),m.setStyle(this.visibleDiv,"display","block"),m.setStyle(this.ignoreDiv,"display","none"),m.setStyle(this.layerVisibleDiv,
"display","none"),m.setStyle(this.dynamicSchemaDiv,"display","none"))},acceptValue:function(){if(this.param){this.param.label=this.label.getValue();this.param.tooltip=this.tooltip.getValue();if(this.spart.getValue){var l=this.spart.getValue();"GPFeatureRecordSetLayer"===this.param.dataType||"GPRecordSet"===this.param.dataType?e.mixin(this.param,l):this.param.defaultValue=l}if("output"===this.direction){if("GPFeatureRecordSetLayer"===this.param.dataType||"GPRecordSet"===this.param.dataType)this.param.useDynamicSchema=
this.useDynamicSchema.getValue();this.param.ignore=this.ignore.getValue();this.param.layerInvisible="GPFeatureRecordSetLayer"===this.param.dataType||"MapServiceLayer"===this.param.dataType?this.layerInvisible.getValue():!0}else this.param.visible=this.visible.getValue()}},setConfig:function(l){this.config=l},_createSpecialPart:function(){if("input"===this.direction&&"GPFeatureRecordSetLayer"===this.param.dataType)var l=this.nls.inputFeatureBy;else"input"===this.direction&&"GPRecordSet"===this.param.dataType?
l=this.nls.inputRecordBy:"input"===this.direction?l=this.nls.defaultValue:"output"===this.direction&&"GPFeatureRecordSetLayer"===this.param.dataType?l="":"output"===this.direction&&(l=this.nls.displayType);this.spart=g.createEditor(this.param,this.direction,"setting",{config:this.config});this.spartLabelNode=m.create("div",{"class":"input-label",innerHTML:h.sanitizeHTML(l),style:{display:""===l?"none":"inline-block"}},this.specialSectionNode);this.spart.placeAt(this.specialSectionNode);this.changeEditorNode&&
m.place(this.changeEditorNode,this.spartLabelNode,"after");this.spart.startup()},_createChangeEditorNode:function(){var l=m.create("div",{"class":"change-editor",innerHTML:"Change",style:{display:"inline-block"}});this.own(n(l,"click",e.hitch(this,function(){var p=new k({inputParams:this.config.inputParams});new b({titleLabel:"Choose Editor",content:p,container:"main-page",buttons:[{label:this.nls.ok,onClick:e.hitch(this,this._onEditorChange,p)},{label:this.nls.cancel,classNames:["jimu-btn-vacation"]}]});
p.startup()})));return l},_onEditorChange:function(l){this.param.editorName!==l.selectedEditor.name&&(l.popup.close(),this.param.editorName=l.selectedEditor.name,l.selectedEditor.dependParam&&(this.param.editorDependParamName=l.selectedEditor.dependParam),this.spart.destroy(),this.spart=g.createEditor(this.param,"input","setting",{config:this.config}),m.place(this.spart.domNode,this.specialSectionNode))}})})},"widgets/Geoprocessing/editorManager":function(){define("dojo/_base/array dojo/on dojo/aspect dijit/form/Select dijit/form/TextBox jimu/dijit/CheckBox jimu/dijit/URLInput jimu/utils ./editors/simpleEditors ./editors/FeatureSetEditorChooser ./editors/FeatureSetResultEditor ./editors/SelectFeatureSetFromUrl ./editors/SelectFeatureSetFromLayer ./editors/SelectFeatureSetFromFile ./editors/SelectFeatureSetFromDraw ./editors/DataFileEditor ./editors/RasterLayerEditor ./editors/RecordSetEditor ./editors/RecordSetEditorChooser ./editors/SelectRecordSetFromTable".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x){function E(t,v,C){return t.editorName&&0>t.dataType.indexOf("GPMultiValue")?t.editorName:"input"===v?"GPMultiValue:GPFeatureRecordSetLayer"===t.dataType?"UnsupportEditor":-1<t.dataType.indexOf("GPMultiValue")&&t.choiceList&&0<t.choiceList.length?"MultiValueChooser":-1<t.dataType.indexOf("GPMultiValue")&&(!t.choiceList||0===t.choiceList.length)?"MultiValueEditor":"GPLong"===t.dataType?"LongNumberTextBox":"GPDouble"===t.dataType?"DoubleNumberTextBox":
"GPString"===t.dataType?t.choiceList&&0<t.choiceList.length?"Select":"TextBox":"GPBoolean"===t.dataType?"CheckBox":"GPLinearUnit"===t.dataType?"LinerUnitEditor":"GPDate"===t.dataType?"DateTimeEditor":"GPDataFile"===t.dataType?"DataFileEditor":"GPRasterDataLayer"===t.dataType?"RasterLayerEditor":"GPRecordSet"===t.dataType?"setting"===C?"RecordSetEditorChooser":"json"===t.recordSetMode?"SimpleJsonEditor":"table"===t.recordSetMode?"SelectRecordSetFromTable":"UnsupportEditor":"GPFeatureRecordSetLayer"===
t.dataType?"setting"===C?"FeatureSetEditorChooser":"draw"===t.featureSetMode?"SelectFeatureSetFromDraw":"layers"===t.featureSetMode?"SelectFeatureSetFromLayer":"url"===t.featureSetMode?"SelectFeatureSetFromUrl":"file"===t.featureSetMode?"SelectFeatureSetFromFile":"map"===t.featureSetMode?"SelectFeatureSetFromMap":"UnsupportEditor":"UnsupportEditor":"GPFeatureRecordSetLayer"===t.dataType?"FeatureSetResultEditor":"GPRecordSet"===t.dataType?"RecordSetEditor":"MapServiceLayer"===t.dataType?"MapServiceLayer":
"ShowMessage"}var y={},D,G=[],A;y.createEditor=function(t,v,C,J){v=E(t,v,C);C={param:t,widgetUID:J?J.uid:void 0,config:J?J.config:void 0,appConfig:J?J.appConfig:void 0,map:D,nls:A,context:C,editorManager:y,style:{width:"100%"}};if("UnsupportEditor"===v){C.message="type "+t.dataType+" is not supported for now.";var L=new b.UnsupportEditor(C)}else"ShowMessage"===v?(C.message="GPRecordSet"===t.dataType?"table":"GPDataFile"===t.dataType||"GPRasterDataLayer"===t.dataType?"link":"text",L=new b.UnsupportEditor(C)):
"MapServiceLayer"===v?(C.message=A.useResultMapService,L=new b.UnsupportEditor(C)):"RecordSetEditor"===v?L=new u(C):"MultiValueChooser"===v?L=new b.MultiValueChooser(C):"MultiValueEditor"===v?L=new b.MultiValueEditor(C):"LongNumberTextBox"===v?L=new b.LongNumberEditor(C):"DoubleNumberTextBox"===v?L=new b.DoubleNumberEditor(C):"Select"===v?(C.gEditor=new n({options:H.map(t.choiceList,function(S){return{label:S,value:S}}),value:void 0===t.defaultValue?"":t.defaultValue}),C.editorName="Select",L=new b.GeneralEditorWrapperEditor(C)):
"TextBox"===v?(C.gEditor=new q({value:void 0===t.defaultValue?"":t.defaultValue}),L=new b.GeneralEditorWrapperEditor(C)):"CheckBox"===v?(C.gEditor=new d({checked:void 0===t.defaultValue?!1:t.defaultValue}),L=new b.GeneralEditorWrapperEditor(C)):"LinerUnitEditor"===v?L=new b.LinerUnitEditor(C):"DateTimeEditor"===v?L=new b.DateTimeEditor(C):"URLInput"===v?(C.gEditor=new c({value:void 0===t.defaultValue?"":t.defaultValue}),L=new b.GeneralEditorWrapperEditor(C)):"ObjectUrlEditor"===v?(t.defaultValue&&
"string"===typeof t.defaultValue&&(C.value=t.defaultValue),L=new b.ObjectUrlEditor(C)):"SimpleJsonEditor"===v?(t.defaultValue&&(C.value=t.defaultValue),L=new b.SimpleJsonEditor(C)):"DataFileEditor"===v?(t.defaultValue&&(C.value=t.defaultValue),L=new r(C)):"RasterLayerEditor"===v?(t.defaultValue&&(C.value=t.defaultValue),L=new w(C)):"SelectFeatureSetFromMap"===v?(C.message=A.currentMapExtent,L=new b.currentExtentEditor(C)):"SelectFeatureSetFromDraw"===v?void 0===t.defaultValue?(C.message="No defaultValue property.",
L=new b.UnsupportEditor(C)):(t.defaultValue&&t.defaultValue.geometryType&&(J=a.getTypeByGeometryType(t.defaultValue.geometryType),C.types=[J]),C.showClear=!0,L=new p(C)):"SelectFeatureSetFromLayer"===v?(t.defaultValue&&(C.value=t.defaultValue),L=new f(C)):"SelectFeatureSetFromUrl"===v?(C.querySetting=t.defaultValue,L=new k(C)):"SelectFeatureSetFromFile"===v?L=new l(C):"FeatureSetEditorChooser"===v?L=new h(C):"RecordSetEditorChooser"===v?L=new B(C):"SelectRecordSetFromTable"===v?L=new x(C):"FeatureSetResultEditor"===
v?L=new g(C):"GetUrlObjectFromLayer"===v?(t.defaultValue&&(C.value=t.defaultValue),L=new b.GetUrlObjectFromLayer(C)):(C.message="wrong editorName."+v,L=new b.UnsupportEditor(C));t.editorDependParamName&&(L.dependParam=t.editorDependParamName);m.before(L,"destroy",function(){G.splice(G.indexOf(L),1)});L.dependParam&&H.forEach(G,function(S){S.param.name===L.dependParam&&L.update(S.getValue())});"SelectFeatureSetFromLayer"===v&&e(L,"change",function(){H.forEach(G,function(S){S.dependParam===t.name&&
S.update(L.getValue())})});G.push(L);return L};y.setMap=function(t){D=t};y.setNls=function(t){A=t};return y})},"widgets/Geoprocessing/editors/simpleEditors":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/html dojo/on dojo/Deferred dojo/promise/all dojo/json dijit/form/NumberTextBox dijit/form/Select dijit/form/Textarea dijit/form/DateTextBox dijit/form/TimeTextBox jimu/dijit/CheckBox jimu/dijit/URLInput jimu/utils esri/tasks/LinearUnit esri/tasks/FeatureSet esri/geometry/Polygon esri/graphic ../BaseEditor".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E){function y(t,v){return new h({value:v,options:m.map(t,function(C){return{label:C,value:C}})})}function D(t){return t.filter&&t.filter.type?t.filter.type.toLowerCase():null}function G(t){if(t.list&&2===t.list.length){var v=+t.list[0];t=+t.list[1]}else v=t.minimum,t=t.maximum;return isNaN(v)||isNaN(t)?null:(v=Math.min(v,t),t=Math.max(v,t),[v,t])}var A={};A.UnsupportEditor=H(E,{baseClass:"jimu-gp-editor-base jimu-gp-editor-unsupport",editorName:"UnsupportEditor",
postCreate:function(){this.inherited(arguments);n.setAttr(this.domNode,"innerHTML",r.sanitizeHTML(this.message))},getValue:function(){return null}});A.ShowMessage=H(E,{baseClass:"jimu-gp-editor-base jimu-gp-editor-message",editorName:"ShowMessage",postCreate:function(){this.inherited(arguments);n.setAttr(this.domNode,"innerHTML",r.sanitizeHTML(this.message))},getValue:function(){return null}});A.GeneralEditorWrapperEditor=H(E,{baseClass:"jimu-gp-editor-base jimu-gp-editor-wrapper",editorName:"GeneralEditorWrapperEditor",
postCreate:function(){this.inherited(arguments);n.setStyle(this.gEditor.domNode,"width","100%");"Select"===this.editorName?n.addClass(this.gEditor.domNode,"restrict-select-width"):"valuelist"===D(this.param)&&this.param.filter.list&&0<this.param.filter.list.length&&(this.gEditor=y(this.param.filter.list,this.param.defaultValue),n.addClass(this.gEditor.domNode,"restrict-select-width"));this.gEditor.placeAt(this.domNode)},reset:function(){this.gEditor.set("value","")},getValue:function(){var t=this.gEditor.getValue();
return"string"===typeof t&&""===e.trim(t)?null:t}});A.LongNumberEditor=H(E,{baseClass:"jimu-gp-editor-base jimu-gp-editor-long",editorName:"LongNumberEditor",postCreate:function(){this.inherited(arguments);this.value=isNaN(this.param.defaultValue)?NaN:this.param.defaultValue;var t=D(this.param);if("range"===t){if(t=G(this.param.filter))this.editor=new b({value:this.value,constraints:{places:0,min:t[0],max:t[1]}})}else"valuelist"===t&&this.param.filter.list&&0<this.param.filter.list.length&&(this.editor=
y(this.param.filter.list,this.param.defaultValue));this.editor||(this.editor=new b({value:this.value,constraints:{places:0}}));this.editor.placeAt(this.domNode)},reset:function(){this.editor.set("value",NaN)},getValue:function(){var t=this.editor.get("value");return isNaN(t)?null:t}});A.DoubleNumberEditor=H(E,{baseClass:"jimu-gp-editor-base jimu-gp-editor-double",editorName:"DoubleNumberEditor",postCreate:function(){this.inherited(arguments);this.value=isNaN(this.param.defaultValue)?NaN:this.param.defaultValue;
var t=D(this.param);if("range"===t){if(t=G(this.param.filter))this.editor=new b({value:this.value,constraints:{places:"0,15",min:t[0],max:t[1]}})}else"valuelist"===t&&this.param.filter.list&&0<this.param.filter.list.length&&(this.editor=y(this.param.filter.list,this.param.defaultValue));this.editor||(this.editor=new b({value:this.value,constraints:{places:"0,15"}}));this.editor.placeAt(this.domNode)},reset:function(){this.editor.set("value",NaN)},getValue:function(){var t=this.editor.get("value");
return isNaN(t)?null:t}});A.MultiValueChooser=H(E,{baseClass:"jimu-gp-editor-base jimu-gp-editor-multivalue-chooser",editorName:"MultiValueChooser",postCreate:function(){this.inherited(arguments);this.checkBoxs=[];m.forEach(this.param.choiceList,function(t){t=new l({label:t,checked:this.param.defaultValue&&-1<this.param.defaultValue.indexOf(t)?!0:!1});t.placeAt(this.domNode);this.checkBoxs.push(t)},this)},getValue:function(){var t=[];m.forEach(this.checkBoxs,function(v){v.checked&&t.push(v.label)},
this);return t}});A.MultiValueEditor=H(E,{baseClass:"jimu-gp-editor-base jimu-gp-editor-multivalue",editorName:"MultiValueEditor",postCreate:function(){this.inherited(arguments);this.editors=[];var t=n.create("div",{"class":"input-list"},this.domNode),v=e.clone(this.param,t);v.dataType=this.param.dataType.substr(13,this.param.dataType.length);v.originParam=this.param;this._initChildEditors(v,t);this._createAddInputNode(v,t)},_initChildEditors:function(t,v){this.param.defaultValue&&0<this.param.defaultValue.length?
m.forEach(this.param.defaultValue,function(C){t.defaultValue=C;this._createSingleInputContainerNode(t,v)},this):(delete t.defaultValue,this._createSingleInputContainerNode(t,v))},getValue:function(){var t=[];m.forEach(this.editors,function(v){(v=v.getValue())&&t.push(v)},this);return t},getGPValue:function(){var t=new d,v=[];m.forEach(this.editors,function(C){v.push(C.getGPValue())},this);c(v).then(function(C){t.resolve(C)},function(C){t.reject(C)});return t},destroy:function(){m.forEach(this.editors,
function(t){t.destroy()});this.editors=[];this.inherited(arguments)},_createSingleInputContainerNode:function(t,v){v=n.create("div",{"class":"single-input"},v);t=this.editorManager.createEditor(t,"input",this.context,{widgetUID:this.widgetUID,config:this.config});t.placeAt(v);this._createRemoveInputNode(v);v.inputEditor=t;this.editors.push(t);return v},_createRemoveInputNode:function(t){var v=n.create("div",{"class":"remove",innerHTML:"-"},t);this.own(q(v,"click",e.hitch(this,function(){this.editors.splice(this.editors.indexOf(t.inputEditor),
1);t.inputEditor.destroy();n.destroy(t)})));return v},_createAddInputNode:function(t,v){var C=n.create("div",{"class":"add-input"},this.domNode),J=n.create("div",{"class":"add-btn",innerHTML:"+"},C);this.own(q(J,"click",e.hitch(this,function(){this._createSingleInputContainerNode(t,v)})));return C}});A.LinerUnitEditor=H(E,{baseClass:"jimu-gp-editor-base jimu-gp-editor-liner-unit",editorName:"LinerUnitEditor",postCreate:function(){this.inherited(arguments);this.distance=this.param.defaultValue?this.param.defaultValue.distance:
0;this.units=this.param.defaultValue?this.param.defaultValue.units:"esriMeters";this.inputDijit=new b({value:this.distance,constraints:{places:"0,15"}});this.selectDijit=new h({value:this.units,options:[{label:this.nls.meters,value:"esriMeters"},{label:this.nls.kilometers,value:"esriKilometers"},{label:this.nls.feet,value:"esriFeet"},{label:this.nls.miles,value:"esriMiles"},{label:this.nls.nauticalMiles,value:"esriNauticalMiles"},{label:this.nls.yards,value:"esriYards"}]});n.addClass(this.selectDijit.domNode,
"restrict-select-width");this.inputDijit.placeAt(this.domNode);this.selectDijit.placeAt(this.domNode)},getValue:function(){var t=new w;t.distance=this.inputDijit.getValue();t.units=this.selectDijit.getValue();return t}});A.DateTimeEditor=H(E,{baseClass:"jimu-gp-editor-base jimu-gp-editor-datatime",editorName:"DateTimeEditor",postCreate:function(){var t=new Date(this.param.defaultValue);this.value=this.param.defaultValue?new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),
t.getSeconds()):null;this.inherited(arguments);this.dateDijit=new k({value:this.value,style:{width:"60%"}});this.timeDijit=new f({value:this.value,style:{width:"40%"},constraints:{timePattern:"HH:mm:ss",clickableIncrement:"T00:15:00",visibleIncrement:"T00:15:00"}});this.dateDijit.placeAt(this.domNode);this.timeDijit.placeAt(this.domNode)},startup:function(){this.dateDijit.startup();this.timeDijit.startup()},reset:function(){this.dateDijit.set("value",void 0);this.timeDijit.set("value",void 0)},getValue:function(){var t=
new Date,v=this.dateDijit.getValue(),C=this.timeDijit.getValue();return null!==v&&null!==C?(t.setFullYear(v.getFullYear()),t.setMonth(v.getMonth()),t.setDate(v.getDate()),t.setHours(C.getHours()),t.setMinutes(C.getMinutes()),t.setSeconds(C.getSeconds()),t.getTime()):null}});A.GetUrlObjectFromLayer=H([E,h],{editorName:"GetUrlObjectFromLayer",postCreate:function(){this.options=[];m.forEach(this.map.graphicsLayerIds,function(t){t=this.map.getLayer(t);"esri.layers.FeatureLayer"!==t.declaredClass||this.geometryType&&
t.geometryType!==this.geometryType||this.options.push({label:t.label||t.title||t.name||t.id,value:t.id})},this);this.inherited(arguments);this.setValue(this.value);n.addClass(this.domNode,"jimu-gp-editor-sffl");n.addClass(this.domNode,"jimu-gp-editor-base")},getValue:function(){return this.value},getGPValue:function(){var t;m.forEach(this.map.graphicsLayerIds,function(C){var J=this.map.getLayer(C);C===this.getValue()&&(t=J.url)},this);var v={url:t};v=this.wrapGPValue(v);return this.wrapValueToDeferred(v)}});
A.ObjectUrlEditor=H([E,p],{editorName:"ObjectUrlEditor",postCreate:function(){this.rest=!1;this.inherited(arguments);n.addClass(this.domNode,"jimu-gp-editor-ourl");n.addClass(this.domNode,"jimu-gp-editor-base")},getValue:function(){return this.value},getGPValue:function(){var t=this.getValue()?{url:this.getValue()}:null;t=this.wrapGPValue(t);return this.wrapValueToDeferred(t)}});A.SimpleJsonEditor=H([E,g],{editorName:"SimpleJsonEditor",postMixInProperties:function(){this.inherited(arguments);"object"===
typeof this.value&&(this.value=a.stringify(this.value))},postCreate:function(){this.inherited(arguments);n.addClass(this.domNode,"jimu-gp-editor-json");n.addClass(this.domNode,"jimu-gp-editor-base");this.set("placeholder",this.nls.jsonPlaceholder)},getValue:function(){return this.value},getGPValue:function(){var t=this.getValue()?a.parse(this.getValue()):null;t=this.wrapGPValue(t);return this.wrapValueToDeferred(t)}});A.currentExtentEditor=H(E,{editorName:"SelectFeatureSetFromMap",postCreate:function(){this.inherited(arguments);
n.setAttr(this.domNode,"innerHTML",this.message)},getValue:function(){var t=new u,v=[new x(B.fromExtent(this.map.extent))];t.features=v;return t}});return A})},"dijit/form/Textarea":function(){define(["dojo/_base/declare","dojo/dom-style","./_ExpandingTextAreaMixin","./SimpleTextarea"],function(H,e,m,n){return H("dijit.form.Textarea",[n,m],{baseClass:"dijitTextBox dijitTextArea dijitExpandingTextArea",cols:"",buildRendering:function(){this.inherited(arguments);e.set(this.textbox,{overflowY:"hidden",
overflowX:"auto",boxSizing:"border-box",MsBoxSizing:"border-box",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box"})}})})},"dijit/form/_ExpandingTextAreaMixin":function(){define("dojo/_base/declare dojo/dom-construct dojo/has dojo/_base/lang dojo/on dojo/_base/window ../Viewport".split(" "),function(H,e,m,n,q,d,c){m.add("textarea-needs-help-shrinking",function(){var a=d.body(),b=e.create("textarea",{rows:"5",cols:"20",value:" ",style:{zoom:1,fontSize:"12px",height:"96px",overflow:"hidden",visibility:"hidden",
position:"absolute",border:"5px solid white",margin:"0",padding:"0",boxSizing:"border-box",MsBoxSizing:"border-box",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box"}},a,"last"),h=b.scrollHeight>=b.clientHeight;a.removeChild(b);return h});return H("dijit.form._ExpandingTextAreaMixin",null,{_setValueAttr:function(){this.inherited(arguments);this.resize()},postCreate:function(){this.inherited(arguments);var a=this.textbox;a.style.overflowY="hidden";this.own(q(a,"focus, resize",n.hitch(this,"_resizeLater")))},
startup:function(){this.inherited(arguments);this.own(c.on("resize",n.hitch(this,"_resizeLater")));this._resizeLater()},_onInput:function(a){this.inherited(arguments);this.resize()},_estimateHeight:function(){var a=this.textbox;a.rows=(a.value.match(/\n/g)||[]).length+1},_resizeLater:function(){this.defer("resize")},resize:function(){function a(){var r=!1;""===b.value&&(b.value=" ",r=!0);var w=b.scrollHeight;r&&(b.value="");return w}var b=this.textbox;"hidden"==b.style.overflowY&&(b.scrollTop=0);
if(!this.busyResizing){this.busyResizing=!0;if(a()||b.offsetHeight){var h=a()+Math.max(b.offsetHeight-b.clientHeight,0),g=h+"px";g!=b.style.height&&(b.style.height=g,b.rows=1);if(m("textarea-needs-help-shrinking")){var k=a(),f=b.style.minHeight,l=4,p=b.scrollTop;b.style.minHeight=g;for(b.style.height="auto";0<h;){b.style.minHeight=Math.max(h-l,4)+"px";g=a();k-=g;h-=k;if(k<l)break;k=g;l<<=1}b.style.height=h+"px";b.style.minHeight=f;b.scrollTop=p}b.style.overflowY=a()>b.clientHeight?"auto":"hidden";
"hidden"==b.style.overflowY&&(b.scrollTop=0)}else this._estimateHeight();this.busyResizing=!1}}})})},"esri/tasks/LinearUnit":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(H,e,m,n){H=H(null,{declaredClass:"esri.tasks.LinearUnit",constructor:function(q){q&&e.mixin(this,q)},distance:0,units:null,toJson:function(){var q={};this.distance&&(q.distance=this.distance);this.units&&(q.units=this.units);return q}});m("extend-esri")&&e.setObject("tasks.LinearUnit",
H,n);return H})},"widgets/Geoprocessing/BaseEditor":function(){define(["dojo/_base/declare","dojo/Deferred","dijit/_WidgetBase","dijit/_TemplatedMixin"],function(H,e,m){return H([m],{baseClass:"jimu-gp-editor-base",editorName:"BaseEditor",dependParam:"",postCreate:function(){this.inherited(arguments)},getValue:function(){},reset:function(){},getGPValue:function(){var n=new e;n.resolve(this.getValue());return n},wrapGPValue:function(n){if(!n)return n;n.toJson||(n.toJson=function(){return n});return n},
wrapValueToDeferred:function(n){var q=new e;q.resolve(n);return q},update:function(n){}})})},"widgets/Geoprocessing/editors/FeatureSetEditorChooser":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/on dojo/text!./FeatureSetEditorChooser.html dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin jimu/dijit/SymbolChooser jimu/dijit/CheckBox jimu/utils esri/symbols/jsonUtils ../BaseEditor dijit/form/RadioButton".split(" "),function(H,e,m,n,q,d,c,a,b,h,g,k){return H([k,d,c],{baseClass:"jimu-gp-editor-base jimu-gp-editor-fsec",
templateString:q,editorName:"FeatureSetEditorChooser",postCreate:function(){this.inherited(arguments);this.value={};this.featureSetUrl.set("placeholder",this.nls.urlPlaceholder);this.visibleCheckbox=new b({checked:"url"===this.param.featureSetMode&&this.param.showUrlContent,label:this.nls.showLayerContent,onChange:e.hitch(this,this._viewLayerContent)});this.visibleCheckbox.placeAt(this.visibleCheckboxDiv);this.layerOptionCheckbox=new b({checked:"layers"===this.param.featureSetMode&&this.param.useFeatureCollection,
label:this.nls.useFeatureCollection,onChange:e.hitch(this,this._layerOptionChanged)});this.layerOptionCheckbox.placeAt(this.layerOptionCheckboxDiv);this.param.defaultValue&&"esriGeometryPolygon"===this.param.defaultValue.geometryType?m.setStyle(this.mapModeWrapper,"display","block"):m.setStyle(this.mapModeWrapper,"display","none");"url"===this.param.featureSetMode&&this.param.featureSetUrl&&this.featureSetUrl.setValue(this.param.featureSetUrl);this.own(n(this.mapMode,"click",e.hitch(this,this._onMapModeSelect)));
this.own(n(this.drawMode,"click",e.hitch(this,this._onDrawModeSelect)));this.own(n(this.fileMode,"click",e.hitch(this,this._onFileModeSelect)));this.own(n(this.layersMode,"click",e.hitch(this,this._onLayersModeSelect)));this.own(n(this.urlMode,"click",e.hitch(this,this._onUrlModeSelect)));switch(this.param.featureSetMode){case "map":this.mapMode.set("checked",!0);this._onMapModeSelect();break;case "draw":this.drawMode.set("checked",!0);this._onDrawModeSelect();break;case "file":this.fileMode.set("checked",
!0);this._onFileModeSelect();break;case "layers":this.layersMode.set("checked",!0);this._onLayersModeSelect();break;case "url":this.urlMode.set("checked",!0),this._onUrlModeSelect()}},getValue:function(){this.featureSetUrl.value&&(this.value.featureSetUrl=this.featureSetUrl.value);this.symbolChooser&&"block"===m.getStyle(this.symbolChooserSection,"display")&&(this.value.symbol=this.symbolChooser.getSymbol().toJson());"url"===this.value.featureSetMode&&(this.value.showUrlContent=this.visibleCheckbox.getValue());
"layers"===this.value.featureSetMode&&(this.value.useFeatureCollection=this.layerOptionCheckbox.getValue());return this.value},_onMapModeSelect:function(){m.setStyle(this.symbolChooserSection,"display","none");m.setStyle(this.urlOptionsDiv,"display","none");m.setStyle(this.layerOptionSection,"display","none");this.value.featureSetMode="map"},_onDrawModeSelect:function(){this._showSymbolChooser();m.setStyle(this.urlOptionsDiv,"display","none");m.setStyle(this.layerOptionSection,"display","none");this.value.featureSetMode=
"draw"},_showSymbolChooser:function(){if(this.param.defaultValue&&this.param.defaultValue.geometryType){if(!this.symbolChooser){var f={};this.param.symbol?f.symbol=g.fromJson(this.param.symbol):f.type=h.getSymbolTypeByGeometryType(this.param.defaultValue.geometryType);this.symbolChooser=new a(f,this.symbolChooserNode);this.symbolChooser.startup()}m.setStyle(this.symbolChooserSection,"display","block")}else m.setStyle(this.symbolChooserSection,"display","none")},_onLayersModeSelect:function(){m.setStyle(this.symbolChooserSection,
"display","none");m.setStyle(this.urlOptionsDiv,"display","none");m.setStyle(this.layerOptionSection,"display","");this.value.featureSetMode="layers"},_onFileModeSelect:function(){m.setStyle(this.symbolChooserSection,"display","none");m.setStyle(this.urlOptionsDiv,"display","none");m.setStyle(this.layerOptionSection,"display","none");this.value.featureSetMode="file"},_onUrlModeSelect:function(){m.setStyle(this.urlOptionsDiv,"display","");m.setStyle(this.layerOptionSection,"display","none");this.visibleCheckbox.getValue()?
this._showSymbolChooser():m.setStyle(this.symbolChooserSection,"display","none");this.value.featureSetMode="url"},_viewLayerContent:function(f){f?this._showSymbolChooser():m.setStyle(this.symbolChooserSection,"display","none")}})})},"widgets/Geoprocessing/editors/FeatureSetResultEditor":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/on dojo/text!./FeatureSetResultEditor.html dijit/_TemplatedMixin ../BaseEditor ./FeatureSetRendererEditor ../PopupConfig jimu/dijit/TabContainer jimu/dijit/CheckBox".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g){return H([c,d],{baseClass:"jimu-gp-editor-base jimu-gp-editor-fsrse",editorName:"FeatureSetResultEditor",templateString:q,featureSetRendererEditor:null,popupConfig:null,tab:null,args:null,constructor:function(k){this.args=e.mixin({},k)},postCreate:function(){this.inherited(arguments);this.tab=new h({tabs:[{title:this.nls.renderer,content:this.rendererTab},{title:this.nls.popup,content:this.popupConfigTab}],isNested:!0});this.tab.placeAt(this.domNode);this.tab.startup();
this.featureSetRendererEditor=new a(this.args);this.featureSetRendererEditor.placeAt(this.rendererTab);this.featureSetRendererEditor.startup();var k={};if(this.args&&this.args.param){this.args.param.defaultValue&&(k.fields=e.clone(this.args.param.defaultValue.fields||[]));var f=this.args.param.popup;if(f){if(f.fields.length!==k.fields.length){var l=m.map(f.fields,function(p){return p.name});k.fields=m.map(k.fields,function(p){var r=0<=m.indexOf(l,p.name);p.visible=r;m.some(f.fields,function(w){if(w.name===
p.name)return p.alias=w.alias||p.alias,!0});return p})}else k.fields=f.fields;k.title=f.title}}this.popupConfig=new b(k);this.popupConfig.placeAt(this.popupConfigTab);this.popupConfig.startup();this.own(n(this.popupConfig,"noVisibleField",e.hitch(this,function(){this.enablePopup.setValue(!1);this.enablePopup.setStatus(!1)})));this.own(n(this.popupConfig,"hasVisibleField",e.hitch(this,function(){this.enablePopup.setStatus(!0)})));this.enablePopup=new g({checked:!this.args.param.popup||this.args.param.popup&&
this.args.param.popup.enablePopup},this.enablePopupNode);this.enablePopup.startup()},destroy:function(){this.featureSetRendererEditor&&(this.featureSetRendererEditor.destroy(),this.featureSetRendererEditor=null);this.popupConfig&&(this.popupConfig.destroy(),this.popupConfig=null);this.inherited(arguments)},getValue:function(){var k={renderer:null,popup:this.popupConfig.getConfig()};k.popup.enablePopup=this.enablePopup.checked?!0:!1;var f=this.featureSetRendererEditor.getValue();f&&(k.renderer=f.renderer);
return k}})})},"widgets/Geoprocessing/editors/FeatureSetRendererEditor":function(){define("dojo/_base/declare dojo/_base/array esri/renderers/jsonUtils jimu/dijit/RendererChooser ../BaseEditor ./simpleEditors".split(" "),function(H,e,m,n,q,d){return H([q],{baseClass:"jimu-gp-editor-base jimu-gp-editor-fsre",editorName:"FeatureSetRendererEditor",postCreate:function(){this.inherited(arguments);var c={};if(this.param.renderer)c.renderer=m.fromJson(this.param.renderer),this.param.renderer._colorType&&
(c.renderer._colorType=this.param.renderer._colorType),c.renderer._showOthersSymbol=void 0!==this.param.renderer._showOthersSymbol?this.param.renderer._showOthersSymbol:!0;else if(c.type=this._getSymbolType(),!c.type){(new d.UnsupportEditor({message:this.nls.unSupportGeometryType})).placeAt(this.domNode);return}c.fields=e.map(this.param.defaultValue.fields,function(a){return a.name});this.renderer=new n(c);this.renderer.placeAt(this.domNode);this.renderer.startup()},getValue:function(){if(this.renderer){var c=
this.renderer.getRenderer(),a={renderer:c.toJson()};c._colorType&&(a.renderer._colorType=c._colorType);void 0!==c._showOthersSymbol&&(a.renderer._showOthersSymbol=!!c._showOthersSymbol);return a}return null},_getSymbolType:function(){switch(this.param.defaultValue.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":return"marker";case "esriGeometryPolyline":return"line";case "esriGeometryPolygon":return"fill"}}})})},"jimu/dijit/RendererChooser":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/RendererChooser.html dojo/_base/lang dojo/_base/html dojo/_base/array dojo/on dojo/query dojox/gfx dojo/_base/Color jimu/symbolUtils jimu/rendererUtils esri/renderers/SimpleRenderer esri/renderers/UniqueValueRenderer esri/renderers/ClassBreaksRenderer esri/symbols/jsonUtils esri/symbols/SimpleMarkerSymbol jimu/dijit/CheckBox jimu/dijit/Message dijit/form/Select dijit/form/ComboBox dijit/form/NumberSpinner dijit/form/NumberTextBox jimu/dijit/SymbolChooser".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E){return H([e,m,n],{templateString:q,baseClass:"jimu-renderer-chooser",declaredClass:"jimu.dijit.RendererChooser",renderer:null,type:null,nls:null,fields:null,_uniqueColors:{color1:"#fce138 #fff799 #fcd27e #f1983c #a553b7 #b1a9d0 #6ecffc #4c81cd #fc6f84 #fc3e5a #69f488 #48885c".split(" "),color2:"#102432 #144d59 #ffc754 #ea9010 #a54e1d #661510 #d8341a #b31515 #4a0932 #8c213f #18382e #2c6954".split(" "),color3:"#be9626 #607100 #00734c #704489 #01acca #024e76 #f09100 #ea311f #c6004b #7570b3 #666666 #333333".split(" "),
color4:"#fffa00 #f5cb11 #9fd40c #46e29c #32b8a6 #7ff2fa #ad00f2 #c461ea #eb7200 #e8a784 #bf2e2e #6c7000".split(" "),color5:"#191921 #11495c #78b1c2 #454f4b #8f8f82 #99dbbc #87b051 #f7ec88 #ebdcc1 #dbb658 #c43541 #75351e".split(" "),color6:"#332424 #751555 #d47013 #d68989 #211173 #82aad6 #7bfaeb #6ec9a8 #6b6408 #e9da40 #ccc54a #1fc235".split(" ")},_classBreaksColors:{color1:["#eaf0fd","#03519e"],color2:["#ebf9e7","#046e2e"],color3:["#f5f5f5","#2a2a2a"],color4:["#ffeddd","#a83a00"],color5:["#f2eef6",
"#582890"],color6:["#ffe3d7","#a71713"],color7:["#ecf7fb","#006d2a"],color8:["#edf8fa","#83067e"],color9:["#eef9e8","#0167af"],color10:["#fff1d7","#b80201"],color11:["#f0eef6","#015b90"],color12:["#f5eff7","#006dfa"],color13:["#f1eef7","#9c0042"],color14:["#ffebe2","#7d0078"],color15:["#ffffc9","#016a35"],color16:["#ffffcb","#253197"],color17:["#fffed1","#9e3601"],color18:["#ffffad","#c20120"],color19:["#a9620d","#038772"],color20:["#d3168c","#46ae1b"],color21:["#7c2d96","#048936"],color22:["#eb6300",
"#603b9b"],color23:["#cc0117","#0471b2"],color24:["#ce0118","#424242"],color25:["#db1a10","#287cba"],color26:["#da1baf","#03983e"],color27:["#db1a10","#2483bb"]},_selectedUniqueValueTr:null,_selectedClassBreakTr:null,_isDrawing:!1,_showOthersSymbol:!0,_jimuUrl:window.location.protocol+"//"+window.location.host+require.toUrl("jimu"),postMixInProperties:function(){this.fields||(this.fields=[]);this.nls=d.mixin({},window.jimuNls.common,window.jimuNls.rendererChooser);this.inherited(arguments)},postCreate:function(){this.inherited(arguments);
this._initFields();this.own(b(this.rendererSelect,"change",d.hitch(this,this._onRendererSelectChange)));this.own(b(this.defaultSymbolChooser,"change",d.hitch(this,this._onDefaultSymbolChange)));this.own(b(this.selectedSymbolChooser,"change",d.hitch(this,this._onSelectedSymbolChange)));this._bindUniqueSettingEvents();this._bindClassBreaksEvents();this.renderer?(this._showOthersSymbol=!!this.renderer._showOthersSymbol,this.showByRenderer(this.renderer)):this.type&&this.showByType(this.type);this._onRendererSelectChange()},
getRenderer:function(){var y=null,D=this.rendererSelect.get("value");if("simple"===D)y=this._getSimpleRenderer();else if("unique"===D)y=this._getUniqueValueRenderer();else if("color"===D||"size"===D)y=this._getClassBreaksRenderer();return y},reset:function(){this.type=this.renderer=null;c.setStyle(this.domNode,"display","none")},showByRenderer:function(y){this.reset();c.setStyle(this.domNode,"display","block");this.renderer=y;this.type=null;this._setDefaultSymbol(this.renderer&&(this.renderer.defaultSymbol||
this.renderer.symbol));this._updateRendererSelect();l.isSimpleRenderer(this.renderer)?this.rendererSelect.set("value","simple"):l.isUniqueValueRenderer(this.renderer)?this._showUniqueValueRenderer(this.renderer):l.isClassBreaksRenderer(this.renderer)?this._showClassBreaksRenderer(this.renderer):this.showByType(this.type);(y=this.defaultSymbolChooser.getSymbol())&&this._onDefaultSymbolChange(y)},showByType:function(y){this.reset();this.type=this.renderer=null;if("marker"===y||"line"===y||"fill"===
y)c.setStyle(this.domNode,"display","block"),this.type=y,this.defaultSymbolChooser.showByType(y),this._updateRendererSelect(),(y=this.defaultSymbolChooser.getSymbol())&&this._onDefaultSymbolChange(y)},_setDefaultSymbol:function(y){this.type=null;y&&(f.isSimpleMarkerSymbol(y)||f.isPictureMarkerSymbol(y)?this.type="marker":f.isSimpleLineSymbol(y)?this.type="line":f.isSimpleFillSymbol(y)&&(this.type="fill"),this.type&&this.defaultSymbolChooser.showBySymbol(y))},_getDefaultSymbolTr:function(){var y=this.rendererSelect.get("value");
if("unique"===y)var D=this.uniqueSysTbody;else if("color"===y||"size"===y)D=this.classBreaksTbody;if(!D)return null;y=h(".default-symbol-tr",D);return 0===y.length?null:y[0]},_onDefaultSymbolChange:function(y){var D=this._getDefaultSymbolTr();D&&(D.symbol=y,D=h(".symbol-div",D)[0],this._drawSymbolPreview(D,y))},_setDefaultSymbolStatus:function(y){var D=this._getDefaultSymbolTr();D&&D.checkbox.getStatus()!==y&&(y||(this._showOthersSymbol=!0,D.checkbox.setValue(!0)),D.checkbox.setStatus(y))},_updateRendererSelect:function(){var y=
this.rendererSelect.getOptions("size");"marker"===this.type?y||this.rendererSelect.addOption({value:"size",label:"Size"}):("line"===this.type||"fill"===this.type)&&y&&this.rendererSelect.removeOption(y)},_initFields:function(){if(this.fields&&0<this.fields.length){var y="";a.forEach(this.fields,d.hitch(this,function(D){D&&"string"===typeof D&&(y||(y=D),this._addField(D))}));y&&!this.fieldComboBox.get("displayedValue")&&this.fieldComboBox.set("displayedValue",y)}},_addField:function(y){this.fieldComboBox.get("store").add({name:y})},
_onRendererSelectChange:function(){var y=this.rendererSelect.get("value");this._showDefaultSymbol();"simple"===y?(c.setStyle(this.fieldSelectTr,"display","none"),c.setStyle(this.colorBlockTr,"display","none"),c.setStyle(this.colorBarTr,"display","none"),c.setStyle(this.domainTr,"display","none"),c.setStyle(this.classCountTr,"display","none"),c.setStyle(this.uniqueSetting,"display","none"),c.setStyle(this.classBreaksSetting,"display","none"),c.setStyle(this.symbolSizeDomainTr,"display","none")):"unique"===
y?(c.setStyle(this.fieldSelectTr,"display","table-row"),c.setStyle(this.colorBlockTr,"display","table-row"),c.setStyle(this.colorBarTr,"display","none"),c.setStyle(this.domainTr,"display","none"),c.setStyle(this.classCountTr,"display","none"),c.setStyle(this.uniqueSetting,"display","block"),c.setStyle(this.classBreaksSetting,"display","none"),c.setStyle(this.symbolSizeDomainTr,"display","none"),this._updateUniqueValueDivVisibility()):"color"===y?(c.setStyle(this.fieldSelectTr,"display","table-row"),
c.setStyle(this.colorBlockTr,"display","none"),c.setStyle(this.classCountTr,"display","table-row"),c.setStyle(this.domainTr,"display","table-row"),c.setStyle(this.colorBarTr,"display","table-row"),c.setStyle(this.uniqueSetting,"display","none"),c.setStyle(this.symbolSizeDomainTr,"display","none"),this._updateClassBreaksSettingVisibility()):"size"===y&&(c.setStyle(this.fieldSelectTr,"display","table-row"),c.setStyle(this.colorBlockTr,"display","none"),c.setStyle(this.colorBarTr,"display","none"),c.setStyle(this.domainTr,
"display","table-row"),c.setStyle(this.classCountTr,"display","table-row"),c.setStyle(this.uniqueSetting,"display","none"),c.setStyle(this.symbolSizeDomainTr,"display","table-row"),this._updateClassBreaksSettingVisibility())},_showDefaultSymbol:function(){c.setStyle(this.defaultSymSection,"display","block");c.setStyle(this.selectedSymSection,"display","none")},_showSelectedSymbol:function(y){c.setStyle(this.defaultSymSection,"display","none");c.setStyle(this.selectedSymSection,"display","block");
var D=this.rendererSelect.get("value");if("simple"===D)c.setStyle(this.uniqueSelectedSymInfoSet,"display","none"),c.setStyle(this.classBreaksSelectedInfoSet,"display","none");else if("unique"===D)c.setStyle(this.uniqueSelectedSymInfoSet,"display","block"),c.setStyle(this.classBreaksSelectedInfoSet,"display","none");else if("color"===D||"size"===D)c.setStyle(this.uniqueSelectedSymInfoSet,"display","none"),c.setStyle(this.classBreaksSelectedInfoSet,"display","block");this.selectedSymbolChooser.showBySymbol(y)},
_onSelectedSymbolChange:function(y){var D=this.rendererSelect.get("value");"unique"===D?this._onUniqueSelectedSymbolChange(y):"color"===D?this._onClassBreakSelectedSymbolChange(y):"size"===D&&this._onClassBreakSelectedSymbolChange(y)},_cloneSymbol:function(y){if(!y)return null;y=y.toJson();return u.fromJson(y)},_drawSymbolPreview:function(y,D){var G=this._cloneSymbol(D);c.empty(y);D=80;var A=30;if("simplemarkersymbol"===G.type)A=D=Math.min(G.size+12,125);else if("picturemarkersymbol"===G.type){if(!G.url||
"http://"===G.url||-1===G.url.indexOf("http://")&&-1===G.url.indexOf("https://")&&-1===G.url.indexOf("data:"))return;A=D=Math.min(Math.max(G.width,G.height),125)}else if("simplelinesymbol"===G.type||"cartographiclinesymbol"===G.type)D=190,A=20;60<D&&(D=60);y=g.createSurface(y,D,A);if("vml"===g.renderer){var t=y.getEventSource();c.setStyle(t,"position","relative");c.setStyle(t.parentNode,"position","relative")}t=null;t=u.getShapeDescriptors(G);try{var v=y.createShape(t.defaultShape).setFill(t.fill).setStroke(t.stroke)}catch(J){y.clear();
y.destroy();return}G=y.getDimensions();G={dx:G.width/2,dy:G.height/2};var C=v.getBoundingBox();t=C.width;C=C.height;if(t>D||C>A)D=((D<A?D:A)-5)/(t>C?t:C),d.mixin(G,{xx:D,yy:D});v.applyTransform(G);return y},_getSimpleRenderer:function(){var y=this.defaultSymbolChooser.getSymbol();return new p(y)},_bindUniqueSettingEvents:function(){this.own(b(this.btnAddUniqueValue,"click",d.hitch(this,this._onAddUniqueValue)));this.own(b(this.uniqueSelectedValue,"change",d.hitch(this,this._onUniqueSelectedValueChange)));
this.own(b(this.uniqueSelectedLabel,"change",d.hitch(this,this._onUniqueSelectedLabelChange)));this.own(b(this.uniqueColorSelect,"change",d.hitch(this,this._onUniqueColorSelectChange)))},_showUniqueValueRenderer:function(y){this.rendererSelect.set("value","unique");this.fieldComboBox.set("displayedValue",y.attributeField);y._colorType&&this.uniqueColorSelect.set("value",y._colorType);c.empty(this.uniqueSysTbody);a.forEach(y.infos,d.hitch(this,function(D){this._addUniqueValueTr(D.symbol,D.value,D.label||
D.value)}));this._addDefaultValueTr(this.uniqueSysTbody)},_getUniqueValueRenderer:function(){var y=this.defaultSymbolChooser.getSymbol(),D=this.fieldComboBox.get("value"),G=new r(y,D);y=h(".unique-symbol-tr",this.uniqueSysTbody);a.forEach(y,d.hitch(this,function(A){G.addValue({value:A.value,symbol:A.symbol,label:A.label,description:A.label})}));G._colorType=this.uniqueColorSelect.get("value");G._showOthersSymbol=this._showOthersSymbol;return G},_onUniqueColorSelectChange:function(){var y=this._getSelectedUniqueColors(),
D=h(".unique-symbol-tr",this.uniqueSysTbody);a.forEach(D,d.hitch(this,function(G,A){G.symbol&&!f.isPictureMarkerSymbol(G.symbol)&&(G.symbol.setColor(y[A%y.length]),A=h(".symbol-div",G)[0],this._drawSymbolPreview(A,G.symbol),this._selectedUniqueValueTr===G&&this._showSelectedSymbol(G.symbol))}))},_onUniqueSelectedValueChange:function(){var y=this._selectedUniqueValueTr,D=this.uniqueSelectedValue.value;if(y&&D!==y.value){var G=h(".unique-symbol-tr",this.uniqueSysTbody);if(a.some(G,function(t){return t.value===
D})){var A=new E({message:this.nls.duplicatedValue.replace("${value}",D),buttons:[{label:this.nls.ok,onClick:function(){A.close()}}]});this.uniqueSelectedValue.value=y.value}else y.value=this.uniqueSelectedValue.value}},_onUniqueSelectedLabelChange:function(){var y=this._selectedUniqueValueTr;y&&(y.label=this.uniqueSelectedLabel.value,h(".label-div",y)[0].innerHTML=y.label)},_onUniqueSelectedSymbolChange:function(y){var D=this._selectedUniqueValueTr;D&&(D.symbol=y,(D=h(".symbol-div",D)[0])&&this._drawSymbolPreview(D,
y))},_onAddUniqueValue:function(){var y=d.trim(this.uniqueEditValue.value);if(y){var D=h(".unique-symbol-tr",this.uniqueSysTbody);if(a.some(D,function(t){return t.value===y}))var G=new E({message:this.nls.duplicatedValue.replace("${value}",y),buttons:[{label:this.nls.ok,onClick:function(){G.close()}}]});else{var A=this._getSelectedUniqueColors();D=this._getUniqueSymbol(A[D.length%A.length]);this._addUniqueValueTr(D,y,y);this._setDefaultSymbolStatus(!0)}}this.uniqueEditValue.value=""},_addUniqueValueTr:function(y,
D,G){D=d.trim(D);var A=c.toDom('\x3ctr class\x3d"unique-symbol-tr"\x3e\x3ctd class\x3d"symbol-td"\x3e\x3cdiv class\x3d"symbol-div"\x3e\x3c/div\x3e\x3c/td\x3e\x3ctd class\x3d"edit-td"\x3e\x3cdiv wrap class\x3d"label-div"\x3e\x3c/div\x3e\x3c/td\x3e\x3ctd class\x3d"delete-td"\x3e\x3cdiv class\x3d"delete-div jimu-icon jimu-icon-delete"\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e'),t=h(".default-symbol-tr",this.uniqueSysTbody);0<t.length?c.place(A,t[0],"before"):c.place(A,this.uniqueSysTbody);this._updateUniqueSymTableStyle();
t=h(".symbol-div",A)[0];var v=h(".label-div",A)[0],C=h(".delete-div",A)[0];v.innerHTML=G;this.own(b(A,"click",d.hitch(this,function(){this._selectUniqueValueTr(A)})));this.own(b(C,"click",d.hitch(this,function(J){J.stopPropagation();this._selectedUniqueValueTr===A&&(this._selectedUniqueValueTr=null);c.destroy(A);this._updateUniqueSymTableStyle();this._updateUniqueValueDivVisibility()})));this._drawSymbolPreview(t,y);A.symbol=y;A.value=D;A.label=G;this._selectUniqueValueTr(A);c.setStyle(this.uniqueValueDiv,
"display","block")},_selectUniqueValueTr:function(y){h("tr",this.uniqueSysTbody).removeClass("selected");c.addClass(y,"selected");this._selectedUniqueValueTr=y;this.uniqueSelectedValue.value=y.value;this.uniqueSelectedLabel.value=y.label;this._showSelectedSymbol(y.symbol)},_updateUniqueSymTableStyle:function(){},_getSelectedUniqueColors:function(){var y=this.uniqueColorSelect.get("value");return a.map(this._uniqueColors[y],d.hitch(this,function(D){return new k(D)}))},_getUniqueSymbol:function(y){var D=
null;if("marker"===this.type)D=new B({style:"esriSMSCircle",color:[0,0,128,128],name:"Circle",outline:{color:[191,151,39,255],width:1},type:"esriSMS",size:18}),D.setColor(y);else if("line"===this.type||"fill"===this.type)D=this.defaultSymbolChooser.getSymbol(),D=u.fromJson(D.toJson()),D.setColor(y);return D},_updateUniqueValueDivVisibility:function(){var y=h("tr",this.uniqueSysTbody);0===y.length?(this._addDefaultValueTr(this.uniqueSysTbody),this._setDefaultSymbolStatus(!1)):1===y.length&&c.hasClass(y[0],
"default-symbol-tr")&&this._setDefaultSymbolStatus(!1);y.removeClass("selected");h(".default-symbol-tr",this.uniqueSysTbody).addClass("selected");c.setStyle(this.uniqueValueDiv,"display","block")},_bindClassBreaksEvents:function(){this.own(b(this.minDomain,"change",d.hitch(this,this._updateClassBreaksTable)));this.own(b(this.maxDomain,"change",d.hitch(this,this._updateClassBreaksTable)));this.own(b(this.classCount,"change",d.hitch(this,this._updateClassBreaksTable)));this.own(b(this.selectedFrom,
"change",d.hitch(this,this._onSelectedRangeChange)));this.own(b(this.selectedTo,"change",d.hitch(this,this._onSelectedRangeChange)));this.own(b(this.classBreakSelectedLabel,"change",d.hitch(this,this._onClassBreakSelectedLabelChange)));this.own(b(this.classBreaksColorSelect,"change",d.hitch(this,this._updateClassBreaksTable)));this.own(b(this.minSymbolSize,"change",d.hitch(this,this._updateClassBreaksTable)));this.own(b(this.maxSymbolSize,"change",d.hitch(this,this._updateClassBreaksTable)))},_showClassBreaksRenderer:function(y){this._isDrawing=
!0;this.rendererSelect.set("value","color");y._colorType&&this.classBreaksColorSelect.set("value",y._colorType);var D=Infinity,G=-Infinity;this.fieldComboBox.set("displayedValue",y.attributeField);this.classCount.set("value",y.infos.length);c.empty(this.classBreaksTbody);a.forEach(y.infos,d.hitch(this,function(C){var J=C.minValue,L=C.maxValue;this._addClassBreaksTr(C.symbol,J,L,C.label?C.label:C.minValue+" \u2014\u2014 "+C.maxValue);D=Math.min(D,J);G=Math.max(G,L)}));this.minDomain.set("value",D);
this.maxDomain.set("value",G);this._addDefaultValueTr(this.classBreaksTbody);if("marker"===this.type){var A=Infinity,t=-Infinity;a.forEach(y.infos,d.hitch(this,function(C){C=C.symbol;C=f.isPictureMarkerSymbol(C)?C.width:C.size;A=Math.min(C,A);t=Math.max(C,t)}));this.minSymbolSize.set("value",A);this.maxSymbolSize.set("value",t);this.minSymSize!==this.maxSymSize&&this.rendererSelect.set("value","size")}var v=this;setTimeout(function(){v._isDrawing=!1},1E3)},_getClassBreaksRenderer:function(){var y=
this.defaultSymbolChooser.getSymbol(),D=this.fieldComboBox.get("value"),G=new w(y,D);y=h(".class-breaks-tr",this.classBreaksTbody);a.forEach(y,d.hitch(this,function(A){G.addBreak({minValue:A.from,maxValue:A.to,symbol:A.symbol,label:A.label})}));G._colorType=this.classBreaksColorSelect.get("value");G._showOthersSymbol=this._showOthersSymbol;return G},_onClassBreakSelectedSymbolChange:function(y){var D=this._selectedClassBreakTr;D&&(D.symbol=y,D=h(".symbol-div",D)[0],this._drawSymbolPreview(D,y))},
_onSelectedRangeChange:function(){var y=parseFloat(this.selectedFrom.get("value")),D=parseFloat(this.selectedTo.get("value"));if(y>D){var G=y;y=D;D=G;this.selectedFrom.set("value",y);this.selectedTo.set("value",D)}!(G=this._selectedClassBreakTr)||G.from===y&&G.to===D||(G.from=y,G.to=D,y=y+" \u2014 "+D,G.label=y,this.classBreakSelectedLabel.value=y,h(".label-div",G)[0].innerHTML=y)},_onClassBreakSelectedLabelChange:function(){var y=this._selectedClassBreakTr;if(y){var D=this.classBreakSelectedLabel.value;
y.label=D;h(".label-div",y)[0].innerHTML=D}},_updateClassBreaksTable:function(){if(!this._isDrawing){c.setStyle(this.classBreaksSetting,"display","none");c.empty(this.classBreaksTbody);var y=parseFloat(this.minDomain.get("value")),D=parseFloat(this.maxDomain.get("value"));if(y>D){var G=y;y=D;D=G;this.minDomain.set("value",y);this.maxDomain.set("value",D)}else if(y===D)return;var A=parseFloat(this.minSymbolSize.get("value")),t=parseFloat(this.maxSymbolSize.get("value"));A>t&&(G=A,A=t,t=G,this.minSymbolSize.set("value",
A),this.maxSymbolSize.set("value",t));G=parseInt(this.classCount.get("value"),10);var v=(D-y)/G;D=[];var C;for(C=0;C<=G;C++){var J=y+v*C;J=parseFloat(J.toFixed(4));D.push(J)}C=this.rendererSelect.get("value");y=[];"color"===C?y=this._createColorClassBreaksSymbols(G):"size"===C&&(y=this._createSizeClassBreaksSymbols(G,A,t));for(C=0;C<G;C++)A=D[C],t=D[C+1],this._addClassBreaksTr(y[C],A,t,A+" \u2014 "+t);this._addDefaultValueTr(this.classBreaksTbody);this._updateClassBreaksSettingVisibility()}},_selectClassBreaksTr:function(y){h("tr",
this.classBreaksTbody).removeClass("selected");c.addClass(y,"selected");this._selectedClassBreakTr=y;var D=y.symbol,G=parseFloat(y.from),A=parseFloat(y.to);y=y.label;this.selectedFrom.set("value",G);this.selectedTo.set("value",A);this.classBreakSelectedLabel.value=y;this._showSelectedSymbol(D)},_addClassBreaksTr:function(y,D,G,A){var t=c.toDom('\x3ctr class\x3d"class-breaks-tr"\x3e\x3ctd class\x3d"symbol-td"\x3e\x3cdiv class\x3d"symbol-div"\x3e\x3c/div\x3e\x3c/td\x3e\x3ctd class\x3d"label-td"\x3e\x3cdiv wrap class\x3d"label-div"\x3e\x3c/div\x3e\x3c/td\x3e\x3ctd class\x3d"delete-td"\x3e\x3cdiv class\x3d"delete-div jimu-icon jimu-icon-delete"\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e'),
v=h(".default-symbol-tr",this.classBreaksTbody);0<v.length?c.place(t,v[0],"before"):c.place(t,this.classBreaksTbody);t.symbol=y;t.from=D;t.to=G;t.label=A;D=h(".symbol-div",t)[0];G=h(".label-div",t)[0];v=h(".delete-div",t)[0];this._drawSymbolPreview(D,y);G.innerHTML=A;this.own(b(t,"click",d.hitch(this,function(){this._selectClassBreaksTr(t)})));this.own(b(v,"click",d.hitch(this,function(C){C.stopPropagation();this._selectClassBreaksTr===t&&(this._selectClassBreaksTr=null);c.destroy(t);this._updateClassBreaksSettingVisibility()})));
this._updateClassBreaksTableStyle();this._showDefaultSymbol();c.setStyle(this.classBreaksSetting,"display","block")},_addDefaultValueTr:function(y){if(!(0<h(".default-symbol-tr",y).length)){var D=this.defaultSymbolChooser.getSymbol(),G=this.nls.defaultSymbol,A=c.toDom('\x3ctr class\x3d"default-symbol-tr"\x3e\x3ctd class\x3d"symbol-td"\x3e\x3cdiv class\x3d"symbol-div"\x3e\x3c/div\x3e\x3c/td\x3e\x3ctd class\x3d"label-td"\x3e\x3cdiv wrap class\x3d"label-div"\x3e\x3c/div\x3e\x3c/td\x3e\x3ctd class\x3d"check-td"\x3e\x3cdiv class\x3d"check-div"\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e');
c.place(A,y);var t=h(".symbol-div",A)[0],v=h(".label-div",A)[0],C=h(".check-div",A)[0];c.setAttr(C,"title",this.nls.othersSymbolTip);var J=new x({checked:this._showOthersSymbol});J.placeAt(C);J.startup();v.innerHTML=this.nls.othersSymbol;this.own(b(A,"click",d.hitch(this,function(){h("tr",y).removeClass("selected");c.addClass(A,"selected");this._showDefaultSymbol()})));this.own(b(J,"change",d.hitch(this,function(L){this._showOthersSymbol=L})));this._drawSymbolPreview(t,D);A.symbol=D;A.label=G;A.checkbox=
J;c.setStyle(this.uniqueValueDiv,"display","block")}},_updateClassBreaksTableStyle:function(){},_updateClassBreaksSettingVisibility:function(){var y=h("tr",this.classBreaksTbody);0===y.length?(this._addDefaultValueTr(this.classBreaksTbody),this._setDefaultSymbolStatus(!1)):1===y.length&&c.hasClass(y[0],"default-symbol-tr")&&this._setDefaultSymbolStatus(!1);y.removeClass("selected");h(".default-symbol-tr",this.classBreaksTbody).addClass("selected");c.setStyle(this.classBreaksSetting,"display","block")},
_createColorClassBreaksSymbols:function(y){for(var D=[],G=this._createClassBreaksColors(y),A=0;A<y;A++){var t=G[A],v=null;if("marker"===this.type)v=new B({style:"esriSMSCircle",color:[0,0,128,128],name:"Circle",outline:{color:[191,151,39,255],width:1},type:"esriSMS",size:18}),v.setColor(t);else if("line"===this.type||"fill"===this.type)v=this.defaultSymbolChooser.getSymbol(),v=u.fromJson(v.toJson()),v.setColor(t);D.push(v)}return D},_createClassBreaksColors:function(y){var D=[],G=this.classBreaksColorSelect.get("value"),
A=this._classBreaksColors[G];G=new k(A[0]);var t=new k(A[1]);A=Math.floor((t.r-G.r)/y);var v=Math.floor((t.g-G.g)/y);t=Math.floor((t.b-G.b)/y);for(var C=0;C<y;C++){var J=new k([G.r+A*C,G.g+v*C,G.b+t*C,255]);D.push(J)}return D},_createSizeClassBreaksSymbols:function(y,D,G){var A=this.defaultSymbolChooser.getSymbol(),t=[];G=(G-D)/(y-1);for(var v=0;v<y;v++){var C=Math.round(D+G*v),J=A.toJson();J=u.fromJson(J);f.isPictureMarkerSymbol(J)?(J.setWidth(C),J.setHeight(C)):J.setSize(C);t.push(J)}return t}})})},
"jimu/rendererUtils":function(){define(["esri/renderers/jsonUtils"],function(H){return{cloneRenderer:function(e){if(!e)return null;var m=null;try{var n=e.toJson();m=H.fromJson(n)}catch(q){console.error(q)}return m},isSimpleRenderer:function(e){return e&&"esri.renderer.SimpleRenderer"===e.declaredClass},isUniqueValueRenderer:function(e){return e&&"esri.renderer.UniqueValueRenderer"===e.declaredClass},isClassBreaksRenderer:function(e){return e&&"esri.renderer.ClassBreaksRenderer"===e.declaredClass},
isDotDensityRenderer:function(e){return e&&"esri.renderer.DotDensityRenderer"===e.declaredClass},isScaleDependentRenderer:function(e){return e&&"esri.renderer.ScaleDependentRenderer"===e.declaredClass},isTemporalRenderer:function(e){return e&&"esri.renderer.TemporalRenderer"===e.declaredClass}}})},"widgets/Geoprocessing/PopupConfig":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./PopupConfig.html dojo/_base/lang dojo/_base/html dojo/_base/array dojo/Evented esri/request dijit/MenuItem jimu/dijit/SimpleTable dijit/form/TextBox dijit/form/DropDownButton dijit/TooltipDialog dijit/Menu".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k){return H([e,m,n,b],{_def:null,declaredClass:"jimu.dijit.PopupConfig",baseClass:"jimu-dijit-popup-config",templateString:q,url:null,title:null,fields:null,config:null,showTitle:!0,postMixInProperties:function(){this.nls=window.jimuNls.popupConfig},postCreate:function(){this.inherited(arguments);this._initFieldsTable();this.clear();this.showTitle?(c.setStyle(this.titleTR,"display",""),this.title&&this.titleTextBox.set("value",this.title)):c.setStyle(this.titleTR,"display",
"none");this.fields?this.setFields(this.fields):this.url&&this.setUrl(this.url)},getConfig:function(){var f={title:d.trim(this.titleTextBox.get("value")),fields:[]},l=this.fieldsTable.getRows();a.forEach(l,d.hitch(this,function(p){var r=this.fieldsTable.getRowData(p);f.fields.push({name:r.name,alias:r.alias,type:p.fieldType,visible:r.visibility})}));return f},setUrl:function(f){if("string"===typeof f)return this.url=f=d.trim(f),this.clear(),this._requestLayerInfo(f)},setFields:function(f){f instanceof
Array&&this._setFields(f)},clear:function(){this.fieldsTable.clear();this._resetMenu();this._addEmptyMenuItem()},_initFieldsTable:function(){c.empty(this.fieldsTableTd);var f=[{name:"visibility",title:this.nls.visibility,type:"checkbox",onChange:d.hitch(this,this._onFieldVisibleChange)},{name:"name",title:this.nls.name,type:"text",editable:!1},{name:"alias",title:this.nls.alias,type:"text",editable:!0},{name:"actions",title:this.nls.actions,type:"actions",actions:["up","down"]}];this.fieldsTable=
new k({fields:f});this.fieldsTable.placeAt(this.fieldsTableTd)},_onFieldVisibleChange:function(){var f=this.fieldsTable.getRows();a.every(f,function(l){return!1===this.fieldsTable.getRowData(l).visibility},this)?this.emit("noVisibleField"):this.emit("hasVisibleField")},_resetMenu:function(){var f=this.menu.getChildren();a.forEach(f,d.hitch(this,function(l){this.menu.removeChild(l)}))},_addEmptyMenuItem:function(){var f=new g({label:this.nls.noField,onClick:d.hitch(this,function(){var l=this.menu.getParent();
c.setStyle(l.domNode.parentNode,"display","none")})});this.menu.addChild(f)},_setFields:function(f){this._resetMenu();this.fields=a.filter(f,function(l){return"esriFieldTypeGeometry"!==l.type});0<this.fields.length?a.forEach(this.fields,d.hitch(this,function(l){this._addMenuItem(l);this._addRow(l)})):this._addEmptyMenuItem()},_requestLayerInfo:function(f){this._def&&this._def.cancel();this._def=h({url:f,content:{f:"json"},handleAs:"json",callbackParamName:"callback"});this._def.then(d.hitch(this,
function(l){l&&l.fields&&this._setFields(l.fields)}),d.hitch(this,function(l){console.error("request layer info failed",l)}));return this._def},_addMenuItem:function(f){var l=new g({label:f.name+" {"+f.name+"}",onClick:d.hitch(this,function(){var p=this.titleTextBox.get("value")+"${"+f.name+"}";this.titleTextBox.set("value",p);p=this.menu.getParent();c.setStyle(p.domNode.parentNode,"display","none")})});this.menu.addChild(l)},_addRow:function(f){var l=this.fieldsTable.addRow({visibility:!1!==f.visible,
name:f.name,alias:f.alias||f.name});l.success&&(l.tr.fieldType=f.type)}})})},"widgets/Geoprocessing/editors/SelectFeatureSetFromUrl":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin jimu/dijit/CheckBox jimu/dijit/LoadingIndicator jimu/dijit/Message esri/tasks/query esri/layers/GraphicsLayer esri/SpatialReference esri/tasks/QueryTask esri/symbols/jsonUtils esri/renderers/SimpleRenderer ./BaseFeatureSetEditor dojo/text!./SelectFeatureSetFromUrl.html jimu/dijit/URLInput".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r){return H([p,n,q],{baseClass:"jimu-gp-editor-base jimu-gp-editor-url",templateString:r,editorName:"SelectFeatureSetFromUrl",postCreate:function(){this.inherited(arguments);this.featureSetUrl.set("placeholder",this.nls.urlPlaceholder);this.inputLayer=new h;if(this.param.symbol){var w=new l(f.fromJson(this.param.symbol));this.inputLayer.setRenderer(w)}this.map.addLayer(this.inputLayer);this.param.featureSetUrl&&this.featureSetUrl.set("value",this.param.featureSetUrl);
this.param.showUrlContent&&(this.visibleCheckbox=new d({checked:!1,label:this.nls.showLayerContent,onChange:e.hitch(this,this.viewLayerContent)}),this.visibleCheckbox.placeAt(this.visibleCheckboxDiv));this.loading=new c({hidden:!0},this.loadingNode);this.loading.startup()},viewLayerContent:function(w){w?this.featureSetUrl.isValid()?(this._showLoading(),w=new b,w.geometry=this.map.extent,w.spatialRelationship=b.SPATIAL_REL_INTERSECTS,w.returnGeometry=!0,w.outFields=["*"],w.outSpatialReference=new g(this.map.spatialReference.wkid),
this.queryTask=new k(this.getValue()),this.queryTask.execute(w,e.hitch(this,this._addToLayer),e.hitch(this,this._queryError))):new a({message:this.nls.invalidUrl}):this.inputLayer.clear()},_showLoading:function(){this.visibleCheckbox.setStatus(!1);this.loading.show()},_hideLoading:function(){this.visibleCheckbox.setStatus(!0);this.loading.hide()},_queryError:function(w){this._hideLoading();new a({message:w.message})},_addToLayer:function(w){m.forEach(w.features,function(u){this.inputLayer.add(u)},
this);this._hideLoading()},destroy:function(){this.inputLayer.clear();this.map.removeLayer(this.inputLayer)},getValue:function(){return 0===this.activeViewIndex?this.featureSetUrl.get("value"):this.getFeatureSet()},getGPValue:function(){if(0===this.activeViewIndex){var w=new b;w.where="1\x3d1";w.returnGeometry=!0;w.outFields=["*"];w.outSpatialReference=new g(this.querySetting.spatialReference.wkid);this.queryTask=new k(this.getValue());return this.queryTask.execute(w)}return this.wrapValueToDeferred(this.getFeatureSet())}})})},
"widgets/Geoprocessing/editors/BaseFeatureSetEditor":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/on jimu/dijit/ViewStack ../BaseEditor ./SelectFeatureSetFromSelection".split(" "),function(H,e,m,n,q,d,c){return H([d],{editorName:"BaseFeatureSetEditor",viewStack:null,activeViewIndex:0,postCreate:function(){this.inherited(arguments);this.viewStack=new q({viewType:"dom",views:[this.inputNode,this.featuresetNode]});m.place(this.viewStack.domNode,this.domNode);this.viewStack.startup();
this.switchView(0)},switchView:function(a){this.activeViewIndex=a;this.viewStack.switchView(a)},setFeatureSet:function(a,b){a.features&&0<a.features.length&&(m.empty(this.featuresetNode),this.featuresetDijit=new c({featureset:a,nls:this.nls}),m.place(this.featuresetDijit.domNode,this.featuresetNode),this.featuresetDijit.startup(),this.own(n(this.featuresetDijit,"close",e.hitch(this,function(){this.switchView(0)}))),this.switchView(1))},getFeatureSet:function(){return this.featuresetDijit?this.featuresetDijit.getValue():
null}})})},"widgets/Geoprocessing/editors/SelectFeatureSetFromSelection":function(){define("dojo/_base/declare dojo/_base/lang dojo/on dojo/Evented dijit/_TemplatedMixin ../BaseEditor".split(" "),function(H,e,m,n,q,d){return H([d,q,n],{baseClass:"jimu-gp-editor-selection",templateString:'\x3cdiv\x3e\x3cdiv class\x3d"label"\x3e${nls.useSelectedFeatureset}\x3c/div\x3e\x3cdiv class\x3d"icon" data-dojo-attach-point\x3d"closeBtn" title\x3d"${nls.closeSelectedFeatureset}"\x3e\x3cdiv class\x3d"feature-action icon-close"\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e',
editorName:"SelectFeatureSetFromSelection",postCreate:function(){this.inherited(arguments);this.own(m(this.closeBtn,"click",e.hitch(this,function(){this.emit("close")})))},getValue:function(){return this.featureset},getGPValue:function(){return this.wrapValueToDeferred(this.featureset)}})})},"widgets/Geoprocessing/editors/SelectFeatureSetFromLayer":function(){define("dojo/_base/declare dojo/Deferred dijit/_TemplatedMixin jimu/dijit/SpatialFilterByFeatures jimu/utils ./BaseFeatureSetEditor dojo/text!./SelectFeatureSetFromLayer.html esri/dijit/analysis/utils esri/tasks/query".split(" "),
function(H,e,m,n,q,d,c,a,b){var h=H(null,{constructor:function(g){this.layerObject=g},layerObject:0,toJson:function(){return this.layerObject}});return H([d,m],{templateString:c,editorName:"SelectFeatureSetFromLayer",postCreate:function(){this.inherited(arguments);this.spatialFilterByFeatures=new n({map:this.map,types:this.param.defaultValue&&this.param.defaultValue.geometryType?[q.getTypeByGeometryType(this.param.defaultValue.geometryType)]:["point","polyline","polygon"]});this.spatialFilterByFeatures.placeAt(this.layerChooseNode);
this.spatialFilterByFeatures.startup()},getGPValue:function(){if(0===this.activeViewIndex){var g=new e,k=this.spatialFilterByFeatures.getSelectedLayer();if(k){var f=this.spatialFilterByFeatures.featureSetChooserForSingleLayer.syncGetFeatures();f&&0<f.length?(k=q.getFeatureSetByLayerAndFeatures(k,f),g.resolve(k)):this.param.useFeatureCollection?k.url?(f=new b,f.where="1\x3d1",k.queryFeatures(f).then(function(l){g.resolve(l)},function(l){g.reject(l)})):(k=q.getFeatureSetByLayerAndFeatures(k,k.graphics),
g.resolve(k)):g.resolve(new h(a.constructAnalysisInputLyrObj(k)))}else g.resolve(null);return g}return this.wrapValueToDeferred(this.getFeatureSet())}})})},"jimu/dijit/SpatialFilterByFeatures":function(){define("dojo/_base/array dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/SpatialFilterByFeatures.html dojo/on dojo/Evented dojo/Deferred dojo/_base/html dojo/_base/lang jimu/utils jimu/Query jimu/dijit/CheckBox jimu/dijit/FeaturelayerChooserFromMap jimu/dijit/LayerChooserFromMapWithDropbox jimu/dijit/SearchDistance jimu/LayerInfos/LayerInfos esri/graphic esri/tasks/query esri/symbols/jsonUtils esri/layers/GraphicsLayer esri/renderers/SimpleRenderer esri/geometry/geometryEngine jimu/dijit/FeatureSetChooserForSingleLayer".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D,G,A){e=e([m,n,q,a],{baseClass:"jimu-dijit-spatial-filter-features",templateString:d,_bufferLayer:null,_defaultRelationship:"SPATIAL_REL_INTERSECTS",drawBox:null,selectionRadio:null,_selectionHandle:null,layerInfosObj:null,_layerAllFeaturesCache:null,map:null,types:null,enableBuffer:!1,distance:0,unit:"",showLoading:!1,ignoredFeaturelayerIds:null,postMixInProperties:function(){this.inherited(arguments);this.nls=window.jimuNls.spatialFilterByFeatures;
this.ignoredFeaturelayerIds||(this.ignoredFeaturelayerIds=[]);this._layerAllFeaturesCache={}},postCreate:function(){this.inherited(arguments);this.selectionRadio=new l({label:this.nls.selectedFeatures});this.selectionRadio.placeAt(this.selectionOptionDiv);this.selectionRadio.setStatus(!1);this.own(c(this.selectionRadio,"change",g.hitch(this,this._onRadioChanged)));h.setStyle(this.domNode,"position","relative");var t=E.fromJson({style:"esriSFSSolid",color:[79,129,189,77],type:"esriSFS",outline:{style:"esriSLSSolid",
color:[54,93,141,255],width:1.5,type:"esriSLS"}});t=new D(t);this._bufferLayer=new y;this._bufferLayer.setRenderer(t);this.map.addLayer(this._bufferLayer);t=new p({createMapResponse:this.map.webMapResponse,types:this.types,showLayerFromFeatureSet:!0,onlyShowVisible:!1,updateWhenLayerInfosIsShowInMapChanged:!0,ignoredFeaturelayerIds:this.ignoredFeaturelayerIds});this.layerChooserFromMapWithDropbox=new r({label:this.nls.relatedLayer,layerChooser:t});this.layerChooserFromMapWithDropbox.placeAt(this.layerSelectDiv);
this.own(c(this.layerChooserFromMapWithDropbox,"selection-change",g.hitch(this,this._onLayerChanged)));this.layerInfosObj=u.getInstanceSync();this.own(c(this.layerInfosObj,"layerInfosIsShowInMapChanged",g.hitch(this,this._onLayerInfosIsShowInMapChanged)));this.searchDistance=new w({tip:window.jimuNls.searchDistance.applySearchDistanceToFeatures,distance:this.distance,unit:this.unit});this.searchDistance.placeAt(this.searchDistanceDiv);this.enableBuffer?(this.searchDistance.enable(),this.own(c(this.searchDistance,
"change",g.hitch(this,this._onSearchDistanceChange)))):(this.searchDistance.disable(),h.setStyle(this.searchDistanceDiv,"display","none"));this._onLayerChanged()},reset:function(t){t&&(this.searchDistance.reset(),this.searchDistance.setDistance(this.distance),this.searchDistance.setUnit(this.unit));this.clearAllGraphics()},hideTempLayers:function(){this._bufferLayer&&this._bufferLayer.hide();this.drawBox&&this.drawBox.hideLayer();this.featureSetChooserForSingleLayer&&this.featureSetChooserForSingleLayer.hideMiddleFeatureLayer()},
showTempLayers:function(){this._bufferLayer&&this._bufferLayer.show();this.drawBox&&this.drawBox.showLayer();this.featureSetChooserForSingleLayer&&this.featureSetChooserForSingleLayer.showMiddleFeatureLayer()},disable:function(t){t&&this._hideAllLayers()},enable:function(){this._showAllLayers()},deactivate:function(){this.featureSetChooserForSingleLayer&&this.featureSetChooserForSingleLayer.deactivate()},clearAllGraphics:function(){this._clearBufferLayer();this.featureSetChooserForSingleLayer&&this.featureSetChooserForSingleLayer.clearAllGraphics()},
setSelectedLayer:function(t){return this.layerChooserFromMapWithDropbox.setSelectedLayer(t)},getSelectedLayer:function(){return this._getSelectedLayerInfomation().layer},checkSelectedFeaturesRadio:function(){this.selectionRadio.getValue()||this.selectionRadio.check()},uncheckSelectedFeaturesRadio:function(){this.selectionRadio.getValue()&&this.selectionRadio.uncheck()},isValidSearchDistance:function(){return 0<=this.searchDistance.getStatus()},getGeometryInfo:function(t){var v=new b,C={status:null,
geometry:null};this._updateBuffer();if(0===this._getSelectedLayerInfomation().type)return C.status=-1,v.resolve(C),v;if(0>this.searchDistance.getData().status)return C.status=-2,v.resolve(C),v;this._getFeatures(t).then(g.hitch(this,function(){C.geometry=this._updateBuffer();C.status=C.geometry?1:0;v.resolve(C)}),g.hitch(this,function(J){v.reject(J)}));return v},getFeatureSet:function(t){var v=new b,C=null,J=this._getSelectedLayerInfomation().layer;J?this._getFeatures(t).then(g.hitch(this,function(L){C=
k.getFeatureSetByLayerAndFeatures(J,L);v.resolve(C)}),g.hitch(this,function(L){v.reject(L)})):v.resolve(C);return v},_getFeatures:function(){var t=new b,v=[],C=this._getSelectedLayerInfomation(),J=C.type;0===J?t.resolve(v):this.selectionRadio.getStatus()&&this.selectionRadio.getValue()?(v=C.layer.getSelectedFeatures(),t.resolve(v)):this.featureSetChooserForSingleLayer.isLoading()?t=this.featureSetChooserForSingleLayer.getFeatures():(v=this.featureSetChooserForSingleLayer.syncGetFeatures(),0<v.length?
t.resolve(v):3===J?(v=C.layer.graphics,t.resolve(v)):t=this._getAllFeaturesFromFeaturelayer(C.layer));return t},_getAllFeaturesFromFeaturelayer:function(t){var v=new b;if(this._layerAllFeaturesCache[t.id])v.resolve(this._layerAllFeaturesCache[t.id]);else{var C=k.getFeatureLayerDefinition(t);C||(C={currentVersion:t.currentVersion,fields:g.clone(t.fields)});this.emit("loading");C=new x;C.where=t.getDefinitionExpression()||"1\x3d1";C.geometry=null;C.outSpatialReference=this.map.spatialReference;C.returnGeometry=
!0;(new f({url:t.url,query:C})).getAllFeatures().then(g.hitch(this,function(J){this.emit("unloading");J?(J=J.features||[],this._layerAllFeaturesCache[t.id]=J,v.resolve(J)):v.reject("Can't get all features from featureLayer "+t.id)}),g.hitch(this,function(J){this.emit("unloading");v.reject(J)}))}return v},_syncGetFeatures:function(){var t=[],v=this._getSelectedLayerInfomation(),C=v.type;0!==C&&(this.selectionRadio.getStatus()&&this.selectionRadio.getValue()?t=v.layer.getSelectedFeatures():(t=this.featureSetChooserForSingleLayer.syncGetFeatures(),
0===t.length&&(3===C?t=v.layer.graphics:(v=this._layerAllFeaturesCache[v.layer.id])&&(t=v))));return t},isLoading:function(){return this.featureSetChooserForSingleLayer&&this.featureSetChooserForSingleLayer.isLoading()},_onLoading:function(){this.showLoading&&this.loading.show();this.emit("loading")},_onUnloading:function(){this.loading.hide();this.emit("unloading")},_showAllLayers:function(){this._bufferLayer&&this._bufferLayer.show()},_hideAllLayers:function(){this._bufferLayer&&this._bufferLayer.hide()},
_onRadioChanged:function(){this.selectionRadio.getValue()&&this.featureSetChooserForSingleLayer&&(this.featureSetChooserForSingleLayer.deactivate(),this.featureSetChooserForSingleLayer.clearAllGraphics());this._updateBuffer()},_getSelectedLayerInfomation:function(){var t=0,v=null,C=null,J=this.layerChooserFromMapWithDropbox.getSelectedItems();0<J.length&&(v=J[0]);v&&(C=v.layerInfo.layerObject,t=C.url?0<=this.map.graphicsLayerIds.indexOf(C.id)?1:2:3);return{type:t,layerItem:v,layer:C}},_onLayerChanged:function(){this.clearAllGraphics();
this._clearSelectionHandle();this._updateSelectedFeaturesCount();this.featureSetChooserForSingleLayer&&this.featureSetChooserForSingleLayer.destroy();this.featureSetChooserForSingleLayer=null;var t=this._getSelectedLayerInfomation();0<t.type&&(this.featureSetChooserForSingleLayer=new A({map:this.map,featureLayer:t.layer,updateSelection:!1}),this._selectionHandle=c(t.layer,"selection-complete",g.hitch(this,function(){var v=this.selectionRadio.getStatus()&&this.selectionRadio.getValue();this._updateSelectedFeaturesCount();
v&&this._updateBuffer()})),this.own(c(this.featureSetChooserForSingleLayer,"user-clear",g.hitch(this,this._onUserClear))),this.own(c(this.featureSetChooserForSingleLayer,"loading",g.hitch(this,g.hitch(this,function(){this._clearBufferLayer();this._onLoading()})))),this.own(c(this.featureSetChooserForSingleLayer,"unloading",g.hitch(this,g.hitch(this,function(){this._onUnloading();this._updateBuffer()})))),this.featureSetChooserForSingleLayer.placeAt(this.featureSetChooserDiv),this.own(c(this.featureSetChooserForSingleLayer,
"draw-activate",g.hitch(this,function(){this.uncheckSelectedFeaturesRadio()}))));this._updateFeatureSetChooserForSingleLayerStatus();this._updateBuffer()},_onLayerInfosIsShowInMapChanged:function(){this._updateFeatureSetChooserForSingleLayerStatus()},_onSearchDistanceChange:function(){this._updateBuffer();this.emit("search-distance-change")},_updateFeatureSetChooserForSingleLayerStatus:function(){if(this.featureSetChooserForSingleLayer){var t=!1,v=this.featureSetChooserForSingleLayer.getFeatureLayer();
(v=this.layerInfosObj.getLayerInfoById(v.id))&&(t=v.isShowInMap());t?(this.featureSetChooserForSingleLayer.enable(),h.removeClass(this.featureSetChooserForSingleLayer.domNode,"not-visible")):(this.featureSetChooserForSingleLayer.disable(),this.featureSetChooserForSingleLayer.clearAllGraphics(),h.addClass(this.featureSetChooserForSingleLayer.domNode,"not-visible"),this._updateBuffer())}},_updateBuffer:function(){this._clearBufferLayer();var t=this.searchDistance.getData(),v=t.status,C=t.distance;t=
t.bufferUnit;if(0>v)return null;var J=this._syncGetFeatures(),L=null,S=[];H.forEach(J,g.hitch(this,function(U){U&&U.geometry&&S.push(U.geometry)}));0<S.length&&(L="polygon"===S[0].type?G.union(S):k.combineGeometries(S));return 0===v?L:L?(L=G.simplify(L),J=L.spatialReference,v=null,v=J.isWebMercator()||4326===J.wkid?G.geodesicBuffer(L,C,t,!0):G.buffer(L,C,t,!0),C=new B(v),this._bufferLayer.add(C),v):null},_onUserClear:function(){this.clearAllGraphics()},_clearBufferLayer:function(){this._bufferLayer&&
this._bufferLayer.clear()},_updateSelectedFeaturesCount:function(){this.selectionRadio.setStatus(!0);var t=this._getSelectedLayerInfomation(),v=0;t.layer&&(t=t.layer.getSelectedFeatures())&&(v=t.length);0===v?(this.selectionRadio.getValue()&&this.selectionRadio.uncheck(),this.selectionRadio.setStatus(!1),h.addClass(this.selectionOptionDiv,"not-visible")):h.removeClass(this.selectionOptionDiv,"not-visible");this.selectionRadio.setLabel(this.nls.selectedFeatures+(window.isRTL?"\x26rlm;":" ")+"("+v+
")")},_clearSelectionHandle:function(){this._selectionHandle&&this._selectionHandle.remove();this._selectionHandle=null},destroy:function(){this._bufferLayer&&this.map.removeLayer(this._bufferLayer);this._bufferLayer=null;this._clearSelectionHandle();this.inherited(arguments)}});e.NONE_SELECTED_FEATURES_NOT_DRAW_SHAPES="NONE_SELECTED_FEATURES_NOT_DRAW_SHAPES";return e})},"jimu/dijit/FeaturelayerChooserFromMap":function(){define(["dojo/_base/declare","dojo/Deferred","dojo/_base/html","dojo/_base/lang",
"./LayerChooserFromMap"],function(H,e,m,n,q){return H([q],{baseClass:"jimu-featurelayer-chooser-from-map",declaredClass:"jimu.dijit.FeaturelayerChooserFromMap",types:null,showLayerFromFeatureSet:!1,showTable:!1,onlyShowVisible:!1,ignoredFeaturelayerIds:null,mustSupportStatistics:!1,ignoreVirtualLayer:!1,postMixInProperties:function(){this.inherited(arguments);this.ignoredFeaturelayerIds||(this.ignoredFeaturelayerIds=[]);this.basicFilter=n.hitch(this,this.basicFilter);this.filter=q.createFeaturelayerFilter(this.types,
this.showLayerFromFeatureSet,this.showTable,this.mustSupportStatistics);this.ignoreVirtualLayer&&(this.filter=q.andCombineFilters([this.filter,n.hitch(this,this._ignoreVirtualLayerFilter)]))},postCreate:function(){this.inherited(arguments);m.addClass(this.domNode,"jimu-basic-layer-chooser-from-map")},_ignoreVirtualLayerFilter:function(d){return d.getLayerType().then(function(c){return!("ArcGISDynamicMapServiceLayer"===c||"ArcGISTiledMapServiceLayer"===c||"GroupLayer"===c)})},basicFilter:function(d){var c=
new e;0<=this.ignoredFeaturelayerIds.indexOf(d.id)?c.resolve(!1):this.onlyShowVisible&&"Table"!==d.getLayerType()?c.resolve(d.isShowInMap()):c.resolve(!0);return c},getHandledItem:function(d){var c=this.inherited(arguments),a=d&&d.layerInfo;a=a&&a.layerObject;c.url=a&&a.url||"";return c}})})},"jimu/dijit/LayerChooserFromMap":function(){define("dojo/on dojo/Evented dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/store/Memory dojo/Deferred dojo/store/Observable dijit/tree/ObjectStoreModel dojo/promise/all dojo/_base/lang dojo/_base/html dojo/_base/array jimu/utils jimu/dijit/_Tree jimu/LayerInfos/LayerInfos jimu/dijit/LoadingIndicator".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u){var B=m([n,q,d,e],{templateString:'\x3cdiv style\x3d"width:100%;"\x3e\x3cdiv data-dojo-attach-point\x3d"errorTipSection" class\x3d"error-tip-section"\x3e\x3cspan class\x3d"jimu-icon jimu-icon-error"\x3e\x3c/span\x3e\x3cspan class\x3d"jimu-state-error-text" data-dojo-attach-point\x3d"errTip"\x3e${nls.noLayersTip}\x3c/span\x3e\x3c/div\x3e\x3c/div\x3e',_store:null,_id:0,_treeClass:"layer-chooser-tree",createMapResponse:null,multiple:!1,onlyShowVisible:!1,
updateWhenLayerInfosIsShowInMapChanged:!1,onlyShowWebMapLayers:!1,displayTooltipForTreeNode:!1,onlyFilterCurrentLayerWhenAddItem:!1,postMixInProperties:function(){this.nls=window.jimuNls.basicLayerChooserFromMap},postCreate:function(){this.inherited(arguments);f.addClass(this.domNode,"jimu-basic-layer-chooser-from-map");this.multiple=!!this.multiple;this.shelter=new u({hidden:!0});this.shelter.placeAt(this.domNode);this.shelter.startup();this._createTree();this.basicFilter=k.hitch(this,this.basicFilter);
this.filter=B.andCombineFilters([this.basicFilter,this.filter]);this.createMapResponse&&this.setCreateMapResponse(this.createMapResponse)},basicFilter:function(x){var E=new a;this.onlyShowVisible?E.resolve(x.isShowInMap()):E.resolve(!0);return E},filter:function(x){x=new a;x.resolve(!0);return x},getSelectedItems:function(){var x=this.tree.getSelectedItems();return l.map(x,k.hitch(this,function(E){return this.getHandledItem(E)}))},getAllItems:function(){var x=this.tree.getAllItems(),E=[];l.forEach(x,
k.hitch(this,function(y){"root"!==y.id&&(y=this.getHandledItem(y),E.push(y))}));return E},getHandledItem:function(x){return{name:x.name,layerInfo:x.layerInfo}},_isLeafItem:function(x){return x.isLeaf},setCreateMapResponse:function(x){this.createMapResponse=x;w.getInstance(this.createMapResponse.map,this.createMapResponse.itemInfo).then(k.hitch(this,function(E){this.layerInfosObj=E;this.own(H(this.layerInfosObj,"layerInfosChanged",k.hitch(this,this._onLayerInfosChanged)));this.updateWhenLayerInfosIsShowInMapChanged&&
this.own(H(this.layerInfosObj,"layerInfosIsShowInMapChanged",k.hitch(this,this._onLayerInfosIsShowInMapChanged)));this._buildTree(this.layerInfosObj)}))},_onLayerInfosChanged:function(x,E){this._buildTree(this.layerInfosObj);this.emit("update")},_onLayerInfosIsShowInMapChanged:function(x){this._buildTree(this.layerInfosObj);this.emit("update")},_buildTree:function(x){this._clear();f.setStyle(this.errorTipSection,"display","block");var E=[];this.onlyShowWebMapLayers?(E=x.getLayerInfoArrayOfWebmap(),
E=E.concat(x.getTableInfoArrayOfWebmap())):(E=x.getLayerInfoArray(),E=E.concat(x.getTableInfoArray()));0!==E.length&&(f.setStyle(this.errorTipSection,"display","none"),l.forEach(E,k.hitch(this,function(y){this._addDirectLayerInfo(y)})))},_addDirectLayerInfo:function(x){x&&x.getLayerObject().then(k.hitch(this,function(){this._addItem("root",x)}),k.hitch(this,function(E){console.error(E)}))},_clear:function(){var x=this._store.query({parent:"root"});l.forEach(x,k.hitch(this,function(E){E&&"root"!==
E.id&&this._store.remove(E.id)}))},_addItem:function(x,E){var y=null,D=E.getLayerType(),G=this.filter(E);g({layerType:D,valid:G}).then(k.hitch(this,function(A){if(A.valid){var t=k.hitch(this,function(L,S){this._id++;y={name:E.title||"",parent:x,layerInfo:E,type:A.layerType,layerClass:E.layerObject.declaredClass,id:this._id.toString(),isLeaf:L,hasChildren:S};this._store.add(y)}),v=E.getSubLayers(),C=0===v.length,J=!0;this.onlyFilterCurrentLayerWhenAddItem?(C&&(J=!1),t(C,J)):C?t(C,!1):(v=l.map(v,k.hitch(this,
function(L){return this.filter(L)})),g(v).then(k.hitch(this,function(L){(L=l.some(L,function(S){return S}))&&t(C,L)})))}}))},_getRootItem:function(){return{id:"root",name:"Map Root",type:"root",isLeaf:!1,hasChildren:!0}},_createTree:function(){var x=this._getRootItem();x=new c({data:[x],getChildren:function(E){return this.query({parent:E.id})}});this._store=new b(x);x=new h({store:this._store,query:{id:"root"},mayHaveChildren:k.hitch(this,this._mayHaveChildren)});this.tree=new r({multiple:this.multiple,
model:x,showRoot:!1,isLeafItem:k.hitch(this,this._isLeafItem),style:{width:"100%"},onOpen:k.hitch(this,function(E,y){"root"!==E.id&&this._onTreeOpen(E,y)}),onClick:k.hitch(this,function(E,y,D){this._onTreeClick(E,y,D);this.emit("tree-click",E,y,D)}),getIconStyle:k.hitch(this,function(E,y){var D=null;if(!E||"root"===E.id)return null;var G={width:"20px",height:"20px",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundImage:""},A=window.location.protocol+"//"+window.location.host+
require.toUrl("jimu");if(E=this._getIconInfo(E,y).imageName)G.backgroundImage="url("+A+"/css/images/"+E+")",D=G;return D}),getIconClass:k.hitch(this,function(E,y){return this._getIconInfo(E,y).className}),getTooltip:k.hitch(this,function(E){return this.displayTooltipForTreeNode?E.layerInfo.title:""})});f.addClass(this.tree.domNode,this._treeClass);this.tree.placeAt(this.shelter.domNode,"before")},_mayHaveChildren:function(x){return x.hasChildren},_getIconInfo:function(x,E){var y="",D="";"ArcGISDynamicMapServiceLayer"===
x.type||"ArcGISTiledMapServiceLayer"===x.type?E?(y="mapserver_open.png",D="mapservice-layer-icon open"):(y="mapserver_close.png",D="mapservice-layer-icon close"):"GroupLayer"===x.type?E?(y="group_layer2.png",D="group-layer-icon open"):(y="group_layer1.png",D="group-layer-icon close"):"FeatureLayer"===x.type?(x=p.getTypeByGeometryType(x.layerInfo.layerObject.geometryType),"point"===x?(y="point_layer1.png",D="point-layer-icon"):"polyline"===x?(y="line_layer1.png",D="line-layer-icon"):"polygon"===x&&
(y="polygon_layer1.png",D="polygon-layer-icon")):"Table"===x.type?(y="table.png",D="table-icon"):"ArcGISImageServiceLayer"===x.type||"ArcGISImageServiceVectorLayer"===x.type?(y="image_layer.png",D="iamge-layer-icon"):E?(y="mapserver_open.png",D="mapservice-layer-icon open"):(y="mapserver_close.png",D="mapservice-layer-icon close");return{imageName:y,className:D}},_onTreeOpen:function(x,E){if("root"!==x.id){var y=[];E=[];y=x.layerInfo.getSubLayers();x.checked||(this.shelter.show(),E=l.map(y,k.hitch(this,
function(D){return D.getLayerObject()})),g(E).then(k.hitch(this,function(){this.domNode&&(l.forEach(y,k.hitch(this,function(D){this._addItem(x.id,D)})),x.checked=!0,this.shelter.hide())}),k.hitch(this,function(D){console.error(D);this.shelter.hide()})))}},_onTreeClick:function(x,E,y){},destroy:function(){this.shelter&&(this.shelter.destroy(),this.shelter=null);this.tree&&this.tree.destroy();this.inherited(arguments)}});B.createFilterByLayerType=function(x){k.isArrayLike(x)||(x=[]);return function(E){var y=
new a;if(0===x.length)y.resolve(!0);else{var D=[];E.traversal(function(G){D.push(G.getLayerType())});g(D).then(function(G){for(var A=0;A<G.length;A++)for(var t=0;t<x.length;t++)if(G[A]===x[t]){y.resolve(!0);return}y.resolve(!1)},function(G){console.error(G);y.reject(G)})}return y}};B.createFeaturelayerFilter=function(x,E,y,D){var G=["point","polyline","polygon"];x&&0<x.length?(x=l.filter(x,function(A){return 0<=G.indexOf(A)}),0===x.length&&(x=G)):x=G;return function(A){var t=A.getLayerType();A=A.getLayerObject();
return g({layerType:t,layerObject:A}).then(function(v){var C=v.layerType;v=v.layerObject;if("ArcGISDynamicMapServiceLayer"===C||"ArcGISTiledMapServiceLayer"===C||"GroupLayer"===C||"FeatureCollection"===C)return!0;if("FeatureLayer"===C){C=p.getTypeByGeometryType(v.geometryType);C=0<=l.indexOf(x,C);var J=B._shouldPassStatisticsCheck(D,v);return v.url?(v=p.isFeaturelayerUrlSupportQuery(v.url,v.capabilities),C&&v&&J):E&&C}return"Table"===C?(C=p.isFeaturelayerUrlSupportQuery(v.url,v.capabilities),v=B._shouldPassStatisticsCheck(D,
v),y&&C&&v):!1})}};B.createImageServiceLayerFilter=function(x,E){return function(y){var D=y.getLayerType();y=y.getLayerObject();return g({layerType:D,layerObject:y}).then(function(G){var A=G.layerType,t=G.layerObject;return"ArcGISImageServiceLayer"===A||"ArcGISImageServiceVectorLayer"===A?x?p.isImageServiceSupportQuery(G.layerObject.capabilities)?E?B._shouldPassStatisticsCheck(E,t):!0:!1:!0:!1})}};B._shouldPassStatisticsCheck=function(x,E){return x?(x=!1,x=E.advancedQueryCapabilities?!!E.advancedQueryCapabilities.supportsStatistics:
!!E.supportsStatistics):!0};B.createQueryableLayerFilter=function(x){var E=B.createFeaturelayerFilter(["point","polyline","polygon"],!1,!0,x);x=B.createImageServiceLayerFilter(!0,x);return B.orCombineFilters([E,x])};B.andCombineFilters=function(x){return B._combineFilters(x,!0)};B.orCombineFilters=function(x){return B._combineFilters(x,!1)};B._combineFilters=function(x,E){return function(y){var D=new a,G=l.map(x,function(A){return A(y)});g(G).then(function(A){var t=!1;t=E?l.every(A,function(v){return v}):
l.some(A,function(v){return v});D.resolve(t)},function(A){console.error(A);D.reject(A)});return D}};return B})},"jimu/dijit/LayerChooserFromMapWithDropbox":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/on dojo/keys dojo/Evented dojo/Deferred dijit/popup dijit/_WidgetBase dijit/_TemplatedMixin dojo/text!./templates/LayerChooserFromMapWithDropbox.html jimu/LayerInfos/LayerInfos".split(" "),function(H,e,m,n,q,d,c,a,b,h,g,k){return H([b,h,d],{templateString:g,baseClass:"jimu-layer-chooser-from-map-withdropbox",
declaredClass:"jimu.dijit.LayerChooserFromMapWithDropbox",_selectedItem:null,_isLayerChooserShow:!1,layerInfosObj:null,layerChooser:null,customClass:"",postMixInProperties:function(){this.inherited(arguments);this.nls=window.jimuNls.queryableLayerSource;this.nls.customSelectLayer=this.label?this.label:this.nls.selectLayer},postCreate:function(){this.inherited(arguments);this.layerInfosObj=k.getInstanceSync();this.layerChooser.domNode.style.zIndex=1;this.layerChooser.tree.domNode.style.borderTop="0";
this.layerChooser.tree.domNode.style.maxHeight="290px";this.own(n(this.layerChooser,"tree-click",e.hitch(this,this._onTreeClick)));this.own(n(this.layerChooser,"update",e.hitch(this,this._onLayerChooserUpdate)));this.own(n(document.body,"click",e.hitch(this,this._onBodyClicked)));this.own(n(document.body,"keydown",e.hitch(this,function(f){f.keyCode===q.ENTER&&this._onBodyClicked(f)})));this.own(n(this.layerChooser.domNode,"keydown",e.hitch(this,function(f){f.keyCode===q.ESCAPE&&this.hideLayerChooser()})))},
destroy:function(){this.hideLayerChooser();this.layerChooser&&this.layerChooser.destroy();this.layerChooser=null;this.inherited(arguments)},getLayerChooser:function(){return this.layerChooser},setSelectedLayer:function(f){var l=new c;if(f){var p=this.layerInfosObj.getLayerOrTableInfoById(f.id);p?this.layerChooser.filter(p).then(e.hitch(this,function(r){r?(this._onSelectNewItem({layerInfo:p,name:p.title,url:f.url}),l.resolve(!0)):l.resolve(!1)}),e.hitch(this,function(){l.resolve(!1)})):l.resolve(!1)}else this._onSelectNewItem(null),
l.resolve(!0);return l},getSelectedItem:function(){return this._selectedItem},getSelectedItems:function(){return[this._selectedItem]},_onBodyClicked:function(f){f=f.target||f.srcElement;f===this.domNode||m.isDescendant(f,this.domNode)||f===this.layerChooser.domNode||m.isDescendant(f,this.layerChooser.domNode)||this.hideLayerChooser()},_onDropDownClick:function(f){f.stopPropagation();f.preventDefault();this._isLayerChooserShow?this.hideLayerChooser():(this.isActive=!0,this.showLayerChooser())},_onDropDownKeydown:function(f){f.keyCode===
q.ENTER&&this._onDropDownClick(f)},_getSelectedItems:function(){return this.layerChooser.getSelectedItems()},showLayerChooser:function(){this.layerChooser.domNode.style.minWidth=this.domNode.clientWidth+2+"px";a.open({parent:this,popup:this.layerChooser,around:this.domNode});var f=this.layerChooser.domNode.parentNode;f&&(m.addClass(f,"jimu-layer-chooser-from-map-withdropbox-popup"),this.customClass&&m.addClass(f,this.customClass),this.layerChooser.tree.domNode.focus());this._isLayerChooserShow=!0},
hideLayerChooser:function(){a.close(this.layerChooser);this._isLayerChooserShow=!1;this.isActive&&(this.dropDownBtn.focus(),this.isActive=!1)},_onLayerChooserUpdate:function(){this._selectedItem&&this.layerChooser.onlyShowVisible&&!this._selectedItem.layerInfo.isShowInMap()&&(this._selectedItem=null,this.emit("selection-change",[]))},_onSelectNewItem:function(f){var l=e.getObject("layerInfo.id",!1,this._selectedItem)||-1,p=e.getObject("layerInfo.id",!1,f)||-1;l=l!==p;this._selectedItem=f;this.hideLayerChooser();
f=e.getObject("layerInfo.title",!1,this._selectedItem)||"";this.layerNameNode.innerHTML=f;m.setAttr(this.layerNameNode,"title",f);f=e.getObject("layerInfo.layerObject",!1,this._selectedItem);l&&this.emit("selection-change",[f])},_onTreeClick:function(){var f=this._getSelectedItems();this._onSelectNewItem(0<f.length?f[0]:null)}})})},"jimu/dijit/SearchDistance":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/SearchDistance.html dojo/Evented dojo/_base/lang jimu/utils jimu/dijit/CheckBox esri/tasks/GeometryService jimu/dijit/formSelect dijit/form/NumberTextBox".split(" "),
function(H,e,m,n,q,d,c,a,b,h){return H([e,m,n,d],{baseClass:"jimu-dijit-searchdistance",templateString:q,lastMeters:0,tip:"",distance:0,unit:"",postMixInProperties:function(){this.inherited(arguments);this.nls=c.clone(window.jimuNls.units);this.tip||(this.tip=window.jimuNls.searchDistance.applySearchDistance)},postCreate:function(){this.inherited(arguments);this.cbx=new b({label:this.tip,onChange:c.hitch(this,this._onCbxChanged)});this.cbx.placeAt(this.cbxDiv);this.reset();this.setDistance(this.distance);
this.setUnit(this.unit);this.lastMeters=this.getMeters()},enable:function(){this.cbx.check()},disable:function(){this.cbx.uncheck()},isEnabled:function(){return this.cbx.getValue()},reset:function(){this.numberTextBox.set("value",0);this.unitSelect.set("value","MILES")},getData:function(){return{status:this.getStatus(),isEnabled:this.isEnabled(),distance:this.getDistance(),unit:this.getUnit(),bufferUnit:this.getUnitToBuffer(),meters:this.getMeters()}},getStatus:function(){if(this.isEnabled()){var g=
this.getDistance();g=0<g?1:0===g?0:-1}else g=0;return g},getMeters:function(){var g=0,k=this.getStatus();if(0<k){k=this.getDistance();var f=this.getUnit();"MILES"===f?g=1609.344*k:"KILOMETERS"===f?g=1E3*k:"FEET"===f?g=.3048*k:"METERS"===f?g=k:"YARDS"===f?g=.9144*k:"NAUTICAL_MILES"===f&&(g=1852*k);g=parseFloat(g.toFixed(3))}else 0===k?g=0:0>k&&(g=-1);return g},setDistance:function(g){"number"===typeof g&&0<=g&&this.numberTextBox.set("value",g)},setUnit:function(g){g&&"string"===typeof g&&this.unitSelect.set("value",
g)},tryShowValidationError:function(){this.numberTextBox.validate()||a.showValidationErrorTipForFormDijit(this.numberTextBox)},getDistance:function(){return this.numberTextBox.validate()?this.numberTextBox.get("value"):(a.showValidationErrorTipForFormDijit(this.numberTextBox),-1)},getUnit:function(){return this.unitSelect.get("value")},getUnitToBuffer:function(){var g="";switch(this.unitSelect.get("value")){case "MILES":g=h.UNIT_STATUTE_MILE;break;case "KILOMETERS":g=h.UNIT_KILOMETER;break;case "FEET":g=
h.UNIT_FOOT;break;case "METERS":g=h.UNIT_METER;break;case "YARDS":g=h.UNIT_INTERNATIONAL_YARD;break;case "NAUTICAL_MILES":g=h.UNIT_NAUTICAL_MILE}return g},_onCbxChanged:function(){this.cbx.getValue()?(this.numberTextBox.set("disabled",!1),this.unitSelect.set("disabled",!1)):(this.numberTextBox.set("disabled",!0),this.unitSelect.set("disabled",!0));this._emitEvent()},_onNumberTextBoxChanged:function(){this._emitEvent()},_onUnitSelectChanged:function(){this._emitEvent()},_emitEvent:function(){var g=
this.getData();g.meters!==this.lastMeters&&(this.lastMeters=g.meters,this.emit("change",g))}})})},"jimu/dijit/FeatureSetChooserForSingleLayer":function(){define("dojo/on dojo/Evented dojo/_base/lang dojo/_base/array dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin jimu/dijit/DrawBox jimu/dijit/_FeatureSetChooserCore esri/symbols/jsonUtils".split(" "),function(H,e,m,n,q,d,c,a,b,h,g){return q([d,c,a,e],{baseClass:"jimu-single-layer-featureset-chooser",templateString:"\x3cdiv\x3e\x3c/div\x3e",
drawBox:null,map:null,featureLayer:null,updateSelection:!1,postCreate:function(){this.inherited(arguments);var k=g.fromJson({style:"esriSFSSolid",color:[79,129,189,77],type:"esriSFS",outline:{style:"esriSLSSolid",color:[54,93,141,255],width:1.5,type:"esriSLS"}});this.drawBox=new b({map:this.map,showClear:!0,keepOneGraphic:!0,geoTypes:["EXTENT"]});this.drawBox.setPolygonSymbol(k);k=this.drawBox.getDrawItemIcons();n.forEach(k,m.hitch(this,function(f){f.title=""}));this.drawBox.extentIcon.title=window.jimuNls.spatialFilterByFeatures.drawShapesTip;
this.drawBox.placeAt(this.domNode);this.own(H(this.drawBox,"user-clear",m.hitch(this,this._onDrawBoxUserClear)));this.own(H(this.drawBox,"draw-activate",m.hitch(this,function(){this.emit("draw-activate")})));this.own(H(this.drawBox,"draw-deactivate",m.hitch(this,function(){this.emit("draw-deactivate")})));this.own(H(this.drawBox,"draw-end",m.hitch(this,this._onDrawEnd)));this.featureSetChooserCore=new h({map:this.map,featureLayer:this.featureLayer,drawBox:this.drawBox,updateSelection:this.updateSelection});
this.own(H(this.featureSetChooserCore,"loading",m.hitch(this,function(){this.emit("loading")})));this.own(H(this.featureSetChooserCore,"unloading",m.hitch(this,function(){this.emit("unloading")})));this.own(H(this.featureLayer,"visibility-change",m.hitch(this,function(){this.featureLayer.visible?this.drawBox.enable():this.drawBox.disable()})))},getFeatures:function(){return this.featureSetChooserCore.getFeatures()},syncGetFeatures:function(){return this.featureSetChooserCore.syncGetFeatures()},disable:function(){this.drawBox.disable()},
enable:function(){this.drawBox.enable()},deactivate:function(){this.drawBox.deactivate()},clearAllGraphics:function(){this.featureSetChooserCore.clear(!1)},isLoading:function(){return this.featureSetChooserCore.isLoading()},getFeatureLayer:function(){return this.featureLayer},destroy:function(){this.featureSetChooserCore&&this.featureSetChooserCore.destroy();this.featureSetChooserCore=null;this.inherited(arguments)},_onDrawEnd:function(){this.drawBox.clear()},_onDrawBoxUserClear:function(){this.clearAllGraphics();
this.emit("user-clear")},showMiddleFeatureLayer:function(){this.featureSetChooserCore&&this.featureSetChooserCore.showMiddleFeatureLayer()},hideMiddleFeatureLayer:function(){this.featureSetChooserCore&&this.featureSetChooserCore.hideMiddleFeatureLayer()}})})},"jimu/dijit/_FeatureSetChooserCore":function(){define("dojo/on dojo/sniff dojo/Evented dojo/Deferred dojo/_base/lang dojo/_base/array dojo/_base/declare jimu/utils jimu/symbolUtils jimu/SelectionManager jimu/LayerInfos/LayerInfos esri/graphic esri/tasks/query esri/tasks/QueryTask esri/layers/FeatureLayer esri/symbols/jsonUtils esri/geometry/geometryEngine".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w){return c([m],{baseClass:"jimu-featureset-chooser-core",_middleFeatureLayer:null,_isLoading:!1,_def:null,_isDestroyed:!1,_handles:null,selectionManager:null,layerInfosObj:null,layerInfo:null,map:null,featureLayer:null,drawBox:null,updateSelection:!1,fullyWithin:!1,constructor:function(u){q.mixin(this,u);this.layerInfosObj=g.getInstanceSync();this.selectionManager=h.getInstance();this.featureLayer.getSelectionSymbol()||this.selectionManager.setSelectionSymbol(this.featureLayer);
u=a.getFeatureLayerDefinition(this.featureLayer);delete u.id;this._middleFeatureLayer=new p({layerDefinition:u,featureSet:null},{id:"featureLayer_"+a.getRandomString()});u=null;var B=this._middleFeatureLayer.geometryType;"esriGeometryPoint"===B?u=b.getDefaultMarkerSymbol():"esriGeometryPolyline"===B?u=b.getDefaultLineSymbol():"esriGeometryPolygon"===B&&(u=r.fromJson({style:"esriSFSSolid",color:[79,129,189,77],type:"esriSFS",outline:{style:"esriSLSSolid",color:[54,93,141,255],width:1.5,type:"esriSLS"}}));
this._middleFeatureLayer.setSelectionSymbol(u);u=H(this.drawBox,"user-clear",q.hitch(this,this._onDrawBoxUserClear));B=H(this.drawBox,"draw-end",q.hitch(this,this._onDrawEnd));this._handles=[u,B];if(this.layerInfo=this.layerInfosObj.getLayerInfoById(this.featureLayer.id))u=H(this.layerInfo,"filterChanged",q.hitch(this,this._handleFilterChange)),this._handles.push(u)},hideMiddleFeatureLayer:function(){if(this._middleFeatureLayer){this._middleFeatureLayer.hide();var u=this.selectionManager.getDisplayLayer(this._middleFeatureLayer.id);
u&&u.hide()}},showMiddleFeatureLayer:function(){if(this._middleFeatureLayer){this._middleFeatureLayer.show();var u=this.selectionManager.getDisplayLayer(this._middleFeatureLayer.id);u&&u.show()}},clear:function(u){this.drawBox.clear();this._clearMiddleFeatureLayer();u&&this.selectionManager.clearSelection(this.featureLayer)},getFeatures:function(){var u=new n,B=q.hitch(this,function(){var E=this.syncGetFeatures();u.resolve(E)}),x=q.hitch(this,function(E){u.reject(E)});1===this._getDeferredStatus(this._def)?
this._def.then(B,x):B();return u},syncGetFeatures:function(){return(this.updateSelection?this.featureLayer:this._middleFeatureLayer).getSelectedFeatures()},isLoading:function(){return 1===this._getDeferredStatus(this._def)},_onLoading:function(){this.drawBox.deactivate();this.emit("loading")},_onUnloading:function(){this.emit("unloading")},_getDeferredStatus:function(u){var B=0;return B=u?u.isResolved()?2:u.isRejected()?-1:1:0},_onDrawEnd:function(u,B,x,E,y,D){if(this.isLoading())throw"should not draw when loading";
if(this.featureLayer.visible){var G=new n;this._def=G;var A=p.SELECTION_NEW;E&&(A=p.SELECTION_ADD);e("mac")?D&&(A=p.SELECTION_SUBTRACT):y&&(A=p.SELECTION_SUBTRACT);this.emit("loading");this._getFeaturesByGeometry(u.geometry).then(q.hitch(this,function(t){this.selectionManager.updateSelectionByFeatures(this.updateSelection?this.featureLayer:this._middleFeatureLayer,t,A);this._onUnloading();G.resolve(t)}),q.hitch(this,function(t){console.error(t);this._onUnloading();G.reject(t)}))}},_addTolerance:function(u){var B=
2.54*this.map.getScale()/9600;return w.buffer(u,10*B,"meters")},_getFeaturesByGeometry:function(u){"point"!==u.type&&"polyline"!==u.type||"esriGeometryPoint"!==this.featureLayer.geometryType||(u=this._addTolerance(u));var B=new n,x=[];if(this.featureLayer.getMap()&&this.featureLayer.mode!==p.MODE_SELECTION)u=this.selectionManager.getClientFeaturesByGeometry(this.featureLayer,u,this.fullyWithin),0<u.length&&(x=d.map(u,q.hitch(this,function(y){return new k(y.toJson())}))),B.resolve(x);else{x=new f;
x.geometry=u;x.outSpatialReference=this.map.spatialReference;x.returnGeometry=!0;x.spatialRelationship=this.fullyWithin?f.SPATIAL_REL_CONTAINS:f.SPATIAL_REL_INTERSECTS;(u=this.featureLayer.getDefinitionExpression())||(u="1\x3d1");if(this.layerInfo){var E=this.layerInfo.getFilter();E&&(u="("+u+") AND ("+E+")")}u&&(x.where=u);x.outFields=["*"];(new l(this.featureLayer.url)).execute(x).then(q.hitch(this,function(y){B.resolve(y.features)}),q.hitch(this,function(y){B.reject(y)}))}return B},_onDrawBoxUserClear:function(){this.clear()},
_clearMiddleFeatureLayer:function(){this._middleFeatureLayer&&(this._middleFeatureLayer.clear(),this.selectionManager.clearSelection(this._middleFeatureLayer))},_handleFilterChange:function(){var u=this.layerInfo.getFilter()||"1\x3d1",B=this.featureLayer.getSelectedFeatures(),x=this.featureLayer.objectIdField;if(B&&0<B.length){var E=d.map(B,function(D){return D.attributes[x]}),y=new f;y.where=x+" in ("+E.join(",")+") AND "+u;(new l(this.featureLayer.url)).executeForIds(y).then(q.hitch(this,function(D){d.forEach(B,
function(G){0<=D.indexOf(G.attributes[x])?G.show():G.hide()});this.selectionManager._isLayerNeedDisplayLayer(this.featureLayer)&&this.selectionManager._updateDisplayLayer(this.featureLayer,B,p.SELECTION_NEW);this.featureLayer.emit("selection-complete",{features:this.featureLayer.getSelectedFeatures()})}),q.hitch(this,function(D){console.error(D)}))}},destroy:function(){this._isDestroyed||(d.forEach(this._handles,q.hitch(this,function(u){u.remove()})),this._handles=null,this.clear());this._isDestroyed=
!0}})})},"esri/dijit/analysis/utils":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/event dojo/_base/fx dojo/_base/json dojo/_base/kernel dojo/dom-attr dojo/has dojo/i18n dojo/io-query dojo/i18n!../../nls/jsapi dojo/json dojo/string dojo/query dojo/date/locale dojo/dom-style dojo/dom-class dojo/dom-construct dojo/Deferred dojo/promise/all dojo/fx/easing dojo/number dojo/_base/window dojo/when dojo/dom dojo/on dojo/data/ItemFileWriteStore dojo/topic dojo/store/Memory dojox/mvc/equals dijit/registry dijit/Dialog dijit/form/CheckBox ../../kernel ../../lang ../../units ../../request ./HelpWindow ../../tasks/query ../../dijit/BrowseItems ../../layers/FeatureLayer ./PluginAnalysisLayers ../../tasks/Geoprocessor ../../dijit/SingleFilter ./FeatureRecordSetLayer ./PluginLayers ./PCSList ./ItemTypes ../../layers/ArcGISImageServiceLayer ../../layers/RasterXLayer ../../layers/RasterFunction ./AnalysisRegistry ../RasterFunctionEditor/utils".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D,G,A,t,v,C,J,L,S,U,aa,ea,ba,oa,da,fa,R,W,la,K,O,F,M,N,V,Y,ka,ja,Q,ha,qa,ia,pa){H={};e.mixin(H,{_helpDialog:null,systemRFTGroupName:"Raster Function Templates",i18n:null,UNITSMAP:{Feet:"esriFeet",Yards:"esriYards",Miles:"esriMiles",Meters:"esriMeters",Kilometers:"esriKilometers",NauticalMiles:"esriNauticalMiles"},initHelpLinks:function(z,I,T){if(z){var P=aa.byNode(z),Z=P?P.get("helpFileName"):T&&T.helpFileName?T.helpFileName:null,X=P?P.get("isSingleTenant"):
T&&T.isSingleTenant?T.isSingleTenant:!1,ca=ia.Modes.standard,ma=P&&P.portalSelf?P.portalSelf.helpBase:T&&T.helpBase?T.helpBase:null,na=P&&P.portalSelf;this._helpDialog||(this._helpDialog=new W({isPortal:X,portalSelf:na}));P&&(P.showGeoAnalyticsParams||P.showBigData)||T&&T.analysisMode&&T.analysisMode===ia.Modes.Bigdata?(Z+="_bd",ca=ia.Modes.Bigdata):T&&T.analysisMode&&"raster"===T.analysisMode&&(Z+="_ra",ca=ia.Modes.Raster);r("[esriHelpTopic]",z).forEach(function(sa,Ba,wa){sa&&(u.set(sa,"display",
da.isDefined(I)&&!0!==I?"none":""),da.isDefined(sa._helpClickHandler)&&(sa._helpClickHandler.remove(),sa._helpClickHandler=null),sa._helpClickHandler=C(sa,"click",e.hitch(this,function(ta){q.stop(ta);T&&T.showHelpFromUrl&&T.helpUrl?this._helpDialog.show(ta,{showHelpFromUrl:T.showHelpFromUrl,helpUrl:T.helpUrl}):this._helpDialog.show(ta,{helpId:b.get(sa,"esriHelpTopic"),helpFileName:Z,analysisGpServer:T&&T.analysisGpServer?T.analysisGpServer:null,helpParentNode:z,isPortal:X,analysisMode:ca,helpBase:ma,
portalSelf:P&&P.portalSelf})})))},this)}},constructAnalysisFeatColl:function(z){var I={},T;I.featureCollection=z.layerDefinition;for(T in I.featureCollection)I.featureCollection.hasOwnProperty(T)&&"objectIdField"===T&&(I.featureCollection.objectIdFieldName=e.clone(I.featureCollection.objectIdField),delete I.featureCollection.objectIdField);I.featureCollection.features=z.featureSet.features;return I},constructAnalysisInputLyrObj:function(z,I,T){if(z instanceof Q||"Image Service"===z.type||"esri.layers.RasterXLayer"===
z.declaredClass)return pa.getRasterJsonFromLayer(z);var P={},Z="";da.isDefined(T)||(T=!0);if(z.getMap)var X=z.getMap();else z._map&&(X=z._map);if(z.url&&!z._collection)P={url:z.url},this.isHostedService(z.url),z.getDefinitionExpression&&z.getDefinitionExpression()?P.filter=z.getDefinitionExpression():da.isDefined(z.definitionExpression)&&""!==z.definitionExpression&&(P.filter=z.definitionExpression),z.useMapTime&&z.timeInfo&&X&&X.timeExtent&&T&&(X.timeExtent.startTime?(Z+=X.timeExtent.startTime.getTime(),
X.timeExtent.endTime&&(Z+=","+X.timeExtent.endTime.getTime())):X.timeExtent.endTime&&(Z+=X.timeExtent.endTime.getTime()),Z&&(P.time=Z)),z.credential&&(P.serviceToken=z.credential.token),-1!==P.url.indexOf("?")&&(T=P.url.substring(P.url.indexOf("?")+1,P.url.length),T=k.queryToObject(T),e.mixin(P,T),P.url=P.url.substring(0,P.url.indexOf("?")));else if(!z.url||z._collection)try{P=z.toJson()}catch(ca){z._json=l.parse(z._json),P=z.toJson()}P.name=z.name;I&&(P=new V(P));return P},formatDate:function(z){return w.format(z,
{datePattern:"yyyy-MM-dd",selector:"date"})+" "+w.format(z,{selector:"time",timePattern:"HH:mm:ss"})},isHostedService:function(z){if(!z)return!1;var I=-1!==z.indexOf(".arcgis.com/");z=-1!==z.indexOf("/services")||-1!==z.indexOf("//tiles")||-1!==z.indexOf("//features");return I&&z},isPortalHostedService:function(z){return z?-1!==z.toLowerCase().indexOf("/hosted/"):!1},isTimeEnabled:function(z){var I=10.2<=z.version&&z._useStandardizedQueries;return z.useMapTime&&z.timeInfo&&(I||10.2<=z.version)||da.isDefined(z.time)},
isTimeInstantLayer:function(z){return da.isDefined(z.timeInfo)&&da.isDefined(z.timeInfo.startTimeField)&&!da.isDefined(z.timeInfo.endTimeField)||da.isDefined(z.time)&&da.isDefined(z.time.timeType)&&"instant"===z.time.timeType},buildReport:function(z,I){var T="";I||(I={},e.mixin(I,f.analysisMsgCodes));m.forEach(z,function(P,Z){if("string"===typeof P.message){var X=da.isDefined(I[P.messageCode])?I[P.messageCode]:P.message;T+=P.style.substring(0,P.style.indexOf("\x3c/"))+(this._isEmptyObject(P.params)?
X:p.substitute(X,P.params))+P.style.substring(P.style.indexOf("\x3c/"))}else if(e.isArray(P.message)){var ca=[];var ma=e.clone(P.style);m.forEach(P.message,function(na,sa){ma=ma.replace(/<\//,"${"+sa+"}");X=da.isDefined(I[P.messageCode+"_"+sa])?I[P.messageCode+"_"+sa]:na;X=this._isEmptyObject(P.params)?X:p.substitute(X,P.params);"string"===typeof X&&(X=this.safetagsReplace(X));ca.push(X+"\x3c/")},this);ma=p.substitute(ma,ca);T+=ma}},this);return T},getLayerFeatureCount:function(z,I){var T=new la,
P=new E;I||(I={});T.geometry=I.geometry;T.geometryType=I.geometryType||"esriGeometryEnvelope";z.url||T.geometry?(z.url&&(T.where=I.where||"1\x3d1",z.getDefinitionExpression&&z.getDefinitionExpression()&&!I.where?T.where=z.getDefinitionExpression():da.isDefined(z.definitionExpression)&&""!==z.definitionExpression&&!I.where&&(T.where=z.definitionExpression)),P=z.queryCount(T)):P.resolve(z.graphics.length);return P.promise},createPolygonFeatureCollection:function(z){var I={layerDefinition:null,featureSet:{features:[],
geometryType:ia.GeometryTypes.Polygon}};I.layerDefinition={currentVersion:10.2,copyrightText:"",defaultVisibility:!0,relationships:[],isDataVersioned:!1,supportsRollbackOnFailureParameter:!0,supportsStatistics:!0,supportsAdvancedQueries:!0,geometryType:ia.GeometryTypes.Polygon,minScale:0,maxScale:0,objectIdField:"OBJECTID",templates:[],type:"Feature Layer",displayField:"TITLE",visibilityField:"VISIBLE",name:z,hasAttachments:!1,typeIdField:"TYPEID",capabilities:"Query",allowGeometryUpdates:!0,htmlPopupType:"",
hasM:!1,hasZ:!1,globalIdField:"",supportedQueryFormats:"JSON",hasStaticData:!1,maxRecordCount:-1,indexes:[],types:[],drawingInfo:{renderer:{type:"simple",symbol:{color:[0,0,0,255],outline:{color:[0,0,0,255],width:3,type:"esriSLS",style:"esriSLSSolid"},type:"esriSFS",style:"esriSFSNull"},label:"",description:""},transparency:0,labelingInfo:null,fixedSymbols:!0},fields:[{alias:"OBJECTID",name:"OBJECTID",type:"esriFieldTypeOID",editable:!1},{alias:"Title",name:"TITLE",length:50,type:"esriFieldTypeString",
editable:!0},{alias:"Visible",name:"VISIBLE",type:"esriFieldTypeInteger",editable:!0},{alias:"Description",name:"DESCRIPTION",length:1073741822,type:"esriFieldTypeString",editable:!0},{alias:"Type ID",name:"TYPEID",type:"esriFieldTypeInteger",editable:!0}]};return I},createPointFeatureCollection:function(z){var I={layerDefinition:null,featureSet:{features:[],geometryType:ia.GeometryTypes.Point}};I.layerDefinition={objectIdField:"OBJECTID",templates:[],type:"Feature Layer",drawingInfo:{renderer:{field1:"TYPEID",
type:"simple",symbol:{height:24,xoffset:0,yoffset:12,width:24,contentType:"image/png",type:"esriPMS",url:"http://static.arcgis.com/images/Symbols/Basic/GreenStickpin.png"},description:"",value:"0",label:"Stickpin"}},displayField:"TITLE",visibilityField:"VISIBLE",name:z,hasAttachments:!1,typeIdField:"TYPEID",capabilities:"Query",types:[],geometryType:ia.GeometryTypes.Point,fields:[{alias:"OBJECTID",name:"OBJECTID",type:"esriFieldTypeOID",editable:!1},{alias:"Title",name:"TITLE",length:50,type:"esriFieldTypeString",
editable:!0},{alias:"Visible",name:"VISIBLE",type:"esriFieldTypeInteger",editable:!0},{alias:"Description",name:"DESCRIPTION",length:1073741822,type:"esriFieldTypeString",editable:!0},{alias:"Type ID",name:"TYPEID",type:"esriFieldTypeInteger",editable:!0}]};return I},createFolderStore:function(z,I){var T=new J({data:{identifier:"id",label:"name",items:[]}});T.newItem({name:I,id:""});m.forEach(z,function(P){T.newItem({name:P.title,id:P.id})});return T},setupFoldersUI:function(z){z.folderSelect.set("store",
z.folderStore);z.folderSelect.set("required",!0);z.folderSelect.set("searchAttr","name");da.isDefined(z.folderId)?z.folderStore.get(z.folderId).then(e.hitch(this,function(I){da.isDefined(I)?z.folderSelect.set("item",I):z.folderStore.get("").then(function(T){z.folderSelect.set("item",T)},this)})):z.folderName?z.folderStore.fetch({query:{name:z.folderName},onComplete:e.hitch(this,function(I){da.isDefined(I)&&0<I.length?z.folderSelect.set("item",I[0]):z.folderStore.get("").then(function(T){z.folderSelect.set("item",
T)},this)})}):z.username?z.folderSelect.set("displayedValue",z.username):z.folderStore.get("").then(function(I){z.folderSelect.set("item",I)},this)},_isEmptyObject:function(z){for(var I in z)if(z.hasOwnProperty(I))return!1;return!0},validateServiceName:function(z,I){var T=/(:|&|<|>|%|#|\?|\\|"|\/|\+|=|\*|@|'|;|\||,)/g.test(z),P=!0,Z=!0;if(da.isDefined(I)&&I.textInput)var X=I.textInput;da.isDefined(I)&&da.isDefined(I.isItem)&&(Z=I.isItem);this.initI18n();if(0===z.length||0===p.trim(z).length){var ca=
this.i18n.requiredValue;P=!1}else if(T)ca=this.i18n.invalidServiceName,P=!1;else if(Z&&98<z.length)ca=this.i18n.invalidServiceNameLength,P=!1;else if(Z&&170<encodeURIComponent(z).length){for(z+="";170<encodeURIComponent(z).length;)z=z.substring(0,z.length-1);ca=p.substitute(this.i18n.suggestedServiceNameLength,{count:z.length});P=!1}X&&!P&&X.set("invalidMessage",ca);return P},getStepNumber:function(z){r(".esriAnalysisNumberLabel",z).forEach(function(I,T){T=this._getNumberLabel(T);b.set(I,"innerHTML",
T)},this)},_getNumberLabel:function(z){var I="";this.initI18n();switch(z){case 0:I=this.i18n.oneLabel;break;case 1:I=this.i18n.twoLabel;break;case 2:I=this.i18n.threeLabel;break;case 3:I=this.i18n.fourLabel;break;case 4:I=this.i18n.fiveLabel;break;case 5:I=this.i18n.sixLabel;break;case 6:I=this.i18n.sevenLabel;break;case 7:I=this.i18n.eightLabel;break;case 8:I=this.i18n.nineLabel;break;case 9:I=this.i18n.tenLabel;break;case 10:I=this.i18n.elevenLabel;break;case 11:I=this.i18n.twelveLabel;break;case 12:I=
this.i18n.thirteenLabel}return I},populateAnalysisLayers:function(z,I,T,P){if(z){var Z=[],X=z.get(I);I=P&&P.layerSelect?P.layerSelect:z._analysisSelect;z.rerun&&!X&&(P||(P={}),P.chooseBlank=!0);z._titleRow&&u.set(z._titleRow,"display","none");z._analysisLabelRow&&u.set(z._analysisLabelRow,"display","table-row");z._selectAnalysisRow&&(u.set(z._selectAnalysisRow,"display","table-row"),u.set(z._analysisSelect.domNode.parentNode,"padding-bottom","1em"));z.domNode&&this.getStepNumber(z.domNode);da.isDefined(P)&&
P.chooseLabel&&Z.push({value:-1,label:this.i18n.chooseLabel});da.isDefined(P)&&P.chooseBlank&&Z.push({value:"  ",label:""});da.isDefined(P)&&da.isDefined(P.posIncrement)||(da.isDefined(P)||(P={}),P.posIncrement=0);z.get(T)||z.set(T,[]);m.forEach(z.get(T),function(ca,ma){ma+=P.posIncrement;ma={value:da.isDefined(P)&&P.chooseLabel?""+ma+1:""+ma,label:ca.name};X&&(ca.name===X.name||ca.url&&X.url&&ca.url===X.url)&&(ma.selected=!0);Z.push(ma)},this);I.addOption(Z);I.set("required",!0);P.chooseBlank&&"  "===
I.get("value")&&setTimeout(e.hitch(this,this._validateSelectUI,I),100)}},isValidAnalysisLayer:function(z){var I="",T=!0;var P={isValid:T,validationMessage:I};var Z,X,ca=0,ma=0,na=0,sa,Ba,wa,ta=!0;if(!da.isDefined(z)||!da.isDefined(z.toolName))return P;this.initI18n();P=z.toolName;var ua=z.layers;var ra=z.analysisLayer;var va=P.charAt(0).toLowerCase()+P.substring(1);var za=this.i18n;z=z.showReadyToUseLayers||!1;m.forEach(ua,function(Aa){ta=!1;if(Aa instanceof Q||"esri.layers.RasterXLayer"===Aa.declaredClass)sa=
!0;sa&&1<Aa.bandCount&&(Ba=!0);sa&&1===Aa.bandCount&&(wa=!0);Aa.geometryType===ia.GeometryTypes.Point&&(Ea=!0,ca++);if(Aa.geometryType===ia.GeometryTypes.Point||Aa.geometryType===ia.GeometryTypes.MultiPoint)Z=!0;Aa.geometryType===ia.GeometryTypes.Line&&(X=!0,na++);Aa.geometryType===ia.GeometryTypes.Polygon&&(Oa=!0,ma++)},this);if(-1!==m.indexOf(["CreateDriveTimeAreas","PlanRoutes","ConnectOriginsToDestinations"],P)&&(!Ea||ra&&ra.geometryType!==ia.GeometryTypes.Point))I=p.substitute(this.i18n.selectPointLayer,
{toolName:za[va]}),T=!1;else if("AggregatePoints"!==P&&"InterpolatePoints"!==P||(!ra||ra.geometryType===ia.GeometryTypes.Point||ra.geometryType===ia.GeometryTypes.MultiPoint)&&Z)if("CalculateDensity"===P&&(!Z&&!X||ra&&ra.geometryType!==ia.GeometryTypes.Point&&ra.geometryType!==ia.GeometryTypes.MultiPoint&&ra.geometryType!==ia.GeometryTypes.Line))I=p.substitute(this.i18n.areaFeatureInvalidMsg,{toolName:za[va]}),T=!1;else if("FindHotSpots"!==P&&"FindOutliers"!==P||z||!(!Z&&!Oa||ra&&ra.geometryType!==
ia.GeometryTypes.Point&&ra.geometryType!==ia.GeometryTypes.MultiPoint&&ra.geometryType!==ia.GeometryTypes.Polygon))if("OverlayLayers"!==P&&"AggregatePoints"!==P&&"SummarizeWithin"!==P&&"SummarizeNearby"!==P&&"FindNearest"!==P&&"MergeLayers"!==P||z||0!==ua.length&&(1!==ua.length||ua[0]!==ra&&da.isDefined(ra)))if("ConnectOriginsToDestinations"===P&&!z&&(ta||2>ca))I=p.substitute(this.i18n.odPointMsg,{toolName:za[va]}),T=!1;else if(this.isFindCentroids(P)&&this.isPointLayer(ra))I=p.substitute(this.i18n.selectNoPointLayer,
{toolName:za[va]}),T=!1;else if("AggregatePoints"===P&&!z&&1<ua.length){var Oa=m.some(ua,function(Aa){return Aa.geometryType===ia.GeometryTypes.Polygon});Oa||(I=p.substitute(this.i18n.aggregatePolyMsg,{toolName:za[va]}),T=!1)}else if("MergeLayers"===P&&!z&&1<ua.length)1<ca||1<na||1<ma||(I=this.i18n.mergeValidationMsg,T=!1);else if("SummarizeWithin"!==P&&"DissolveBoundaries"!==P||(!ra||ra.geometryType===ia.GeometryTypes.Polygon)&&Oa||z)if("ExtractData"===P)(T=m.some(ua,function(Aa){return-1!==Aa.capabilities.indexOf("Extract")}))||
(I=p.substitute(this.i18n.extractValidationMsg));else if(("ConnectOriginsToDestinations"===P||P===ia.Tools.ChooseBestFacilities)&&1<ua.length){var Ea=m.some(ua,function(Aa){var Wa=da.isDefined(ra)&&ra.id===Aa.id;return Aa.geometryType===ia.GeometryTypes.Point&&!Wa});Ea||(I=p.substitute(P===ia.Tools.ChooseBestFacilities?this.i18n.selectPointLayer:this.i18n.odPointMsg,{toolName:za[va]}),T=!1)}else"CalculateSlope"===P||"DeriveAspect"===P||"RemapValues"===P?sa?wa||(T=!1,I=p.substitute(this.i18n.noSingleBandISMsg,
{toolName:za[va]})):(T=!1,I=p.substitute(this.i18n.noImageServiceMsg,{toolName:za[va]})):"ExtractRaster"===P?sa||(T=!1,I=p.substitute(this.i18n.noImageServiceMsg,{toolName:za[va]})):"MonitorVegetation"===P&&(sa?Ba||(T=!1,I=p.substitute(this.i18n.noMultiBandISMsg,{toolName:za[va]})):(T=!1,I=p.substitute(this.i18n.noImageServiceMsg,{toolName:za[va]})));else I=p.substitute(this.i18n.selectPolyLayer,{toolName:za[va]}),T=!1;else I=p.substitute(this.i18n.overlayValidationMsg,{toolName:za[va]}),T=!1;else I=
p.substitute(this.i18n.hotspotsLineFeatureMsg,{toolName:za[va]}),T=!1;else I=p.substitute(this.i18n.selectPointLayer,{toolName:za[va]}),T=!1;return P={isValid:T,validationMessage:I}},isFindCentroids:function(z){return z===ia.Tools.FindCentroids},isPointLayer:function(z){return z&&z.geometryType===ia.GeometryTypes.Point},initI18n:function(){this.i18n||(this.i18n={},e.mixin(this.i18n,f.common),e.mixin(this.i18n,f.analysisTools),e.mixin(this.i18n,f.analysisMsgCodes),e.mixin(this.i18n,f.browseLayersDlg),
e.mixin(this.i18n,f.driveTimes),e.mixin(this.i18n,f.calculateFields))},addBrowseAnalysisDialog:function(z){if(z&&z.widget){this.i18n||this.initI18n();var I="esri/dijit/analysis/PluginAnalysisLayers",T=function(ua){return"\x3cimg class\x3d'grid-item galleryThumbnail' width\x3d'120px' height\x3d'80px' alt\x3d'' src\x3d'"+(ua.thumbnailUrl||this._portal.staticImagesUrl+"/desktopapp.png")+"'\x3e"},P=function(ua){return'\x3cdiv class\x3d"galleryLabelContainer"\x3e\x3cspan alt\x3d\''+(ua.title||ua.name||
"\x3cNo Title\x3e")+"'\x3e"+(ua.title.replace(/_/g," ")||ua.name.replace(/_/g," ")||"\x3cNo Title\x3e")+"\x3c/span\x3e\x3c/div\x3e"},Z=function(ua){return"\x3cimg class\x3d'grid-item-thumb' width\x3d'16px' height\x3d'16px' alt\x3d'' src\x3d'"+ua.iconUrl+"'/\x3e"},X=function(ua){return"\x3cimg class\x3d'grid-item-thumb' width\x3d'16px' height\x3d'16px' alt\x3d'' src\x3d'"+ua.iconUrl+"'/\x3e"},ca=A.doc.createDocumentFragment();ca=x.create("div",{style:"width:100%;height:100%;"},ca);var ma=x.create("div",
{style:"width:100%;height:10%;","class":""}),na=x.create("div",{style:"width:100%"},ca),sa=this._isCustomAnalysisQuery(z.widget);1===z.browseType?(I="esri/dijit/analysis/PluginLayers",I={portalUrl:z.widget.get("portalUrl"),message:"",plugin:I,sortDescending:!0,sort:"title",self:z.widget.get("portalSelf"),itemsPerPage:100,demandList:!0,extent:z.widget.get("map").extent,useExtent:!1,fetchTimeout:600,galleryTemplate:"\x3cdiv class\x3d'listServiceTitle'\x3e\x3ctable cellpadding\x3d'0' cellspacing\x3d'0' width\x3d'100%'\x3e\x3ctr width\x3d'100%'\x3e\x3ctd nowrap\x3d'nowrap'\x3e  \x3cdiv  style\x3d\"position:absolute;left:80px; top:10px; width:1px; height:1px; background: transparent;\"\x3e\x3c/div\x3e\x3cdiv style\x3d'overflow:hidden;'\x3e\x3ca style\x3d\"height:16px;\"\x3e${item.title}\x3c/a\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3ctable cellpadding\x3d'0' cellspacing\x3d'0' width\x3d'100%'\x3e\x3ctr width\x3d'100%' class\x3d'bottomRowTable'\x3e\x3ctd width\x3d'20'\x3e  \x3cspan class\x3d'esriAlignLeading'\x3e${item:_formatThumbnail}\x3c/span\x3e\x3c/td\x3e\x3ctd nowrap\x3d'nowrap'\x3e  \x3cspan class\x3d'esriAlignLeading' style\x3d'color:#656565;'\x3e${item.owner}\x3c/span\x3e\x3c/td\x3e\x3ctd style\x3d'padding-right:5px;padding-left:3px;'\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e",
showInfoPanel:!0,isAutoClose:!1,checkIsButtonEnabled:!0,formatThumbnail:X,formatInfoPanelImage:Z,"class":"esriAnalysisLayersItems"}):I={portalUrl:z.widget.get("portalUrl"),message:"",plugin:I,sortDescending:!0,sort:"title",self:z.widget.get("portalSelf"),pagingLinks:1,rowsPerPage:6,"class":"esriBrowseAnalysisLayers itemsGallery esriFloatLeading",extent:z.widget.get("map").extent,useExtent:!sa,fetchTimeout:600,galleryTemplate:'\x3cdiv style\x3d\'opacity:1;\' class\x3d\'grid-item gallery-view galleryNode\'\x3e${item:_formatItemTitle}${item:_formatThumbnail}\x3cdiv class\x3d"linksDiv" style\x3d\'display:none;\'\x3e\x3cdiv class\x3d"esriItemLinks"\x3e\x3cdiv class\x3d"esriFloatLeading"\x3e\x3ca style\x3d"text-decoration: none;"\x3e\x3cspan\x3eAdd layer to analysis\x3c/span\x3e\x3cdiv class\x3d"dijitReset dijitInline esriArrows"\x3e\x3c/div\x3e\x3c/a\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e',
formatItemTitle:P,showInfoPanel:!1,showTooltip:!0,formatThumbnail:T,style:"width:48em;height:100%;clear:both;"};P=x.toDom('\x3cdiv class\x3d"esriBrowseOptions"\x3e');x.place(P,ma);T=x.create("div",{"class":"esriBrowseOption"},P);if(!z.browseType||1!==z.browseType){P=x.create("div",{"class":"esriBrowseOption"},P);var Ba=new ba({name:"addlayer",id:z.widget.id+(z.browseType?z.browseType:"")+"_addlayercheck","class":"",value:!1,checked:!1},x.create("input",{},P));x.create("label",{"for":z.widget.id+"_addlayercheck",
"class":"esriBrowseOption_label",innerHTML:this.i18n.addLayer},P)}P=!0;z.browseType&&1===z.browseType?P=!1:sa&&(P=!1);P=new ba({name:"extentcheck",id:z.widget.id+(z.browseType?z.browseType:"")+"_addextentcheck","class":"",value:P,checked:P},x.create("input",{},T));x.create("label",{"for":z.widget.id+(z.browseType?z.browseType:"")+"_addextentcheck","class":"esriBrowseOption_label",innerHTML:this.i18n.withinMapArea},T);I.messageRight=ma;var wa=new K(I,na);P.on("change",e.hitch(this,function(ua){wa.set("useExtent",
ua)}));var ta=new ea({title:1===z.browseType?this.i18n.browseLayers:sa?this.i18n.browseAnalysisLayers:this.i18n.browseAnalysisTitle,content:ca,browseItems:wa,addlayerCheckBox:Ba,style:z.browseType&&1===z.browseType?"":"padding:.75em 0;background-color: #fff;width:50em;"});z.widget.own(ta.on("hide",e.hitch(ta,function(ua){ta.browseItems.reset()})));return ta}},addAnalysisReadyLayer:function(z,I){function T(wa){var ta;if("Feature Service"===X.type){var ua=new O(X.url,{outFields:["*"]});e.mixin(X,ua)}"Image Service"===
X.type&&(ua=-1<wa.capabilities.indexOf("TilesOnly")?new ha(X.url,{outFields:["*"]}):new Q(X.url,{outFields:["*"]}),e.mixin(X,ua));e.mixin(X,wa);X.id=X.title+"_"+wa.id;X.title=z.item.selectedLayer?X.title+"-"+wa.name:X.title.replace(/_/g," ");X.name=X.title;X.version=X.currentVersion;if(ma&&z.widget.showBrowseLayers){var ra=(ta=z.layersSelect.get("store"))&&ta.data;ta=2;ta=ra.splice(ra.length-ta,ta);var va={id:ra.length,label:X.title,name:X.title,url:X.url};ra.push(va);ra=ra.concat(ta);ta=new S({data:ra,
idProperty:"id"});z.layersSelect.set("store",ta);z.layersSelect.set("value",va.name)}else{ra=z.layersSelect.getOptions();if(z.widget.useArcGISComponents&&(z.widget.showBrowseLayers||z.widget.showReadyToUseLayers))ta=2;else if(z.widget.showBrowseLayers&&z.widget.showReadyToUseLayers)ta=3;else if(z.widget.showBrowseLayers||z.widget.showReadyToUseLayers)ta=2;ta=ra.splice(ra.length-ta,ta);z.layersSelect.removeOption(ta);ra=z.layers.length;z.posIncrement&&(ra+=z.posIncrement);ra=""+ra;ta.unshift({value:ra,
label:X.title,selected:!0});z.layersSelect.addOption(ta);z.layersSelect.set("value",ra)}ua&&(X.lyr=ua,ua.name=X.name);X.linfo=wa;z.layers.push(X);if(z.browseDialog.addlayerCheckBox&&z.browseDialog.addlayerCheckBox.get("checked")||ca||I)this._addLayerHandle&&this._addLayerHandle.remove(),this._addLayerHandle=z.widget.map.on("layer-add",e.hitch(this,function(za){this._addLayerHandle.remove();z.widget.emit("add-ready-to-use-layer",{layer:za.layer,layerInfo:wa,item:X})})),z.widget.map.addLayer(ua);z.browseDialog.browseItems&&
z.browseDialog.browseItems.clear()}if(da.isDefined(z)&&da.isDefined(z.item)&&da.isDefined(z.layersSelect)&&da.isDefined(z.layers)&&da.isDefined(z.browseDialog)){z.browseDialog.hide&&z.browseDialog.hide();var P,Z;(P=!z.item.selectedLayer&&z.item.url?z.item.type===ja.IS?z.item.url:z.item.url+"/0":z.item.selectedLayer.url)&&-1!==window.location.protocol.indexOf("https:")&&(P=P.replace("http:","https:"));var X={url:P,itemId:z.item.id,title:z.item.title,type:z.item.type,analysisReady:!0};P=m.some(z.layers,
function(wa,ta){var ua=wa.analysisReady&&X.analysisReady&&wa.itemId===X.itemId;z.item.selectedLayer&&z.item.selectedLayer.url&&(ua=wa.itemId&&X.itemId?wa.itemId===X.itemId&&wa.url===X.url:wa.url===X.url);ua&&(Z=ta);return ua});var ca;z.browseDialog.browseItems&&r(".js-add-layer-checkbox",z.browseDialog.browseItems.infoPanel).forEach(function(wa){ca=wa.checked});var ma=-1!==z.layersSelect.baseClass.indexOf("dijitComboBox");var na=new E;var sa="sync";if(P){z.posIncrement&&(Z+=z.posIncrement);if(z.browseDialog.addlayerCheckBox&&
z.browseDialog.addlayerCheckBox.get("checked")||ca||I){z.posIncrement||(z.posIncrement=0);var Ba=z.layers[Z-z.posIncrement];z.widget.map.getLayer(Ba.lyr.id)||(this._addLayerHandle&&this._addLayerHandle.remove(),this._addLayerHandle=z.widget.map.on("layer-add",e.hitch(this,function(wa){this._addLayerHandle.remove();z.widget.emit("add-ready-to-use-layer",{layer:wa.layer,layerInfo:Ba.linfo,item:Ba})})),z.widget.map.addLayer(Ba.lyr))}ma?z.layersSelect.set("value",z.layers[Z-1].name):z.layersSelect.set("value",
""+Z);z.browseDialog.browseItems&&z.browseDialog.browseItems.clear();na.resolve()}else z.item.selectedLayer?(X.url=z.item.selectedLayer.url,na.then(e.hitch(this,T)),setTimeout(function(){na.resolve(z.item.selectedLayer)},500)):(sa=z.item.itemDataUrl?R({url:z.item.itemDataUrl,content:{f:"json"}}):"sync",t(sa,e.hitch(this,function(wa){wa&&wa.layers&&wa.layers[0].id&&(X.url=X.url.substring(0,X.url.lastIndexOf("/0"))+"/"+wa.layers[0].id);R({url:X.url,content:{f:"json"}}).then(e.hitch(this,function(ta){T(ta);
na.resolve()}))})));return na.promise}},addReadyToUseLayerOption:function(z,I){z&&(z.showReadyToUseLayers||z.showBrowseLayers)&&(I||(I=[]),z.signInPromise||(z.signInPromise=new E,setTimeout(e.hitch(this,function(){z.signInPromise.resolve()}),100)),z.i18n||(this.initI18n(),z.i18n=this.i18n),z.signInPromise.then(e.hitch(this,function(){m.forEach(I,function(T){var P=T.select||T;if(-1!==P.baseClass.indexOf("dijitComboBox")&&z.showBrowseLayers){if(T=P.get("store"))T.put({id:"separator",name:"separator",
label:"\x3chr\x3e"}),T.put({id:"browselayers",name:"browselayers",label:z.i18n.browseLayers})}else{var Z=P.getOptions();m.some(Z,function(X){return"separator"===X.type},this)||!z.showReadyToUseLayers&&!z.showBrowseLayers||P.addOption({type:"separator",value:""});this.addBrowseOptionForTool({select:P,disableLAAL:T.disableLAAL},z)}},this);z.showReadyToUseLayers&&!da.isDefined(z._browsedlg)&&(z._browsedlg=this.addBrowseAnalysisDialog({widget:z}),z.own(z._browsedlg.browseItems.on("select-change",e.hitch(z,
z._handleBrowseItemsSelect)),z._browsedlg.on("hide",e.hitch(z,function(){m.forEach(I,function(T){"browse"===T.get("value")&&T.reset()});z.layersSelect&&z.layersSelect.reset()}))));z.showBrowseLayers&&!da.isDefined(z._browseLyrsdlg)&&(z._browseLyrsdlg=this.addBrowseAnalysisDialog({widget:z,browseType:1}),z.own(z._browseLyrsdlg.on("browseitems-close",e.hitch(this,function(T){"add-layer"===T.action&&(z._browseLyrsdlg.browseItems.plugIn._grid&&(T.selection.selectedLayer=z._browseLyrsdlg.browseItems.plugIn._selectedLayer,
z._handleBrowseItemsSelect({dialog:z._browseLyrsdlg,selection:T.selection})),z._browseLyrsdlg.browseItems.closeInfoPanel())})),z._browseLyrsdlg.on("hide",e.hitch(z,function(){m.forEach(I,function(T){"browselayers"===T.get("value")&&T.reset()})}))))})))},addBrowseOptionForTool:function(z,I){var T=z.select,P=z.disableLAAL||!1,Z=T.getOptions();z=[];var X=!1;if(!m.some(Z,function(ca){return"browselayers"===ca.value||"browse"===ca.value},this)){if(0<Z.length&&"separator"!==Z[Z.length-1].type||0===Z.length)z.push({type:"separator"}),
X=!0;I.useArcGISComponents&&(I.showBrowseLayers||I.showReadyToUseLayers)?z.push({value:"browselayers",label:I.i18n.browseAnalysisLayers}):(!P&&I.showReadyToUseLayers&&(P=I.i18n.browseAnalysisTitle,this._isCustomAnalysisQuery(I)&&(P=I.i18n.browseAnalysisLayers),z.push({value:"browse",label:P})),I.showBrowseLayers&&z.push({value:"browselayers",label:I.i18n.browseLayers}));(!0===X&&1<z.length||!1===X&&0<z.length)&&T.addOption(z)}},_isCustomAnalysisQuery:function(z){var I='title:"Living Atlas Analysis Layers" AND owner:esri',
T=!1;z&&z.isSingleTenant&&(I='title:"Living Atlas Analysis Layers" AND owner:esri_livingatlas');z.portalSelf&&z.portalSelf.analysisLayersGroupQuery&&z.portalSelf.analysisLayersGroupQuery!==I?T=!0:z._portal&&z._portal.analysisLayersGroupQuery&&z._portal.analysisLayersGroupQuery!==I&&(T=!0);return T},getMaxInputByMode:function(z){if(z&&z.units&&z.type&&z.limits&&z.travelMode){var I,T=z.limits.maximumBreakDistanceValue,P=z.limits.maximumBreakDistanceValueUnits,Z=z.limits.maximumBreakTimeValue,X=z.limits.maximumBreakTimeValueUnits,
ca=this.isWalkingTravelMode(z.travelMode.travelMode);ca&&(T=z.limits.maximumBreakWalkingDistanceValue,P=z.limits.maximumBreakWalkingDistanceValueUnits,Z=z.limits.maximumBreakWalkingTimeValue,X=z.limits.maximumBreakWalkingTimeValueUnits);"reachableStreets"===z.alternateLimits&&(X=this.generateLimitsForReachableStreets({limits:z.limits,isWalking:ca}),T=X.driveDistanceLimit,P=X.driveDistanceUnit,Z=X.driveTimeLimit,X=X.driveTimeUnit);"unreachableAreas"===z.alternateLimits&&(X=this.generateLimitsForUnreachableAreas({limits:z.limits,
isWalking:ca}),T=X.driveDistanceLimit,P=X.driveDistanceUnit,Z=X.driveTimeLimit,X=X.driveTimeUnit);Z*=this.perMinute(X);T*=this.perMile(P);"StraightLine"===z.type?"Miles"===z.units?I=1E3:"Yards"===z.units?I=176E4:"Kilometers"===z.units?I=G.format(1609.344,{places:2}):"Meters"===z.units?I=G.format(1609344,{places:2}):"Feet"===z.units&&(I=528E4):this.isDistanceMode(z.travelMode)?"Miles"===z.units?I=T:"Yards"===z.units?I=1760*T:"Kilometers"===z.units?I=G.format(1.609344*T,{places:2}):"Meters"===z.units?
I=G.format(1609.344*T,{places:2}):"Feet"===z.units&&(I=5280*T):this.isTimeMode(z.travelMode)&&("Minutes"===z.units?I=Z:"Seconds"===z.units?I=60*Z:"Hours"===z.units&&(I=Z/60));return"string"===typeof I?G.parse(I):parseFloat(I)}},isWalkingTravelMode:function(z){if(z&&z.restrictionAttributeNames)return z.restrictionAttributeNames.some(function(I){return"walking"===I.toLowerCase()})},isDistanceMode:function(z){return"Distance"===z.units},isTimeMode:function(z){return"Time"===z.units},generateLimitsForUnreachableAreas:function(z){var I=
{driveDistanceLimit:null,driveDistanceUnit:null,driveTimeLimit:null,driveTimeUnit:null};z.isWalking?(I.driveDistanceLimit=z.limits.maximumBreakWalkingDistanceValueDetailedPolygons,I.driveDistanceUnit=z.limits.maximumBreakWalkingDistanceValueUnitsDetailedPolygons,I.driveTimeLimit=z.limits.maximumBreakWalkingTimeValueDetailedPolygons,I.driveTimeUnit=z.limits.maximumBreakWalkingTimeValueUnitsDetailedPolygons):(I.driveDistanceLimit=z.limits.maximumBreakDistanceValueDetailedPolygons,I.driveDistanceUnit=
z.limits.maximumBreakDistanceValueUnitsDetailedPolygons,I.driveTimeLimit=z.limits.maximumBreakTimeValueDetailedPolygons,I.driveTimeUnit=z.limits.maximumBreakTimeValueUnitsDetailedPolygons);return I},generateLimitsForReachableStreets:function(z){var I={driveDistanceLimit:null,driveDistanceUnit:null,driveTimeLimit:null,driveTimeUnit:null};z.isWalking?(I.driveDistanceLimit=z.limits.maximumBreakWalkingDistanceValueServiceAreaLines,I.driveDistanceUnit=z.limits.maximumBreakWalkingDistanceValueUnitsServiceAreaLines,
I.driveTimeLimit=z.limits.maximumBreakWalkingTimeValueServiceAreaLines,I.driveTimeUnit=z.limits.maximumBreakWalkingTimeValueUnitsServiceAreaLines):(I.driveDistanceLimit=z.limits.maximumBreakDistanceValueServiceAreaLines,I.driveDistanceUnit=z.limits.maximumBreakDistanceValueUnitsServiceAreaLines,I.driveTimeLimit=z.limits.maximumBreakTimeValueServiceAreaLines,I.driveTimeUnit=z.limits.maximumBreakTimeValueUnitsServiceAreaLines);return I},updateModeConstraints:function(z){if(z&&z.validateWidget&&z.units&&
z.type&&z.travelMode){var I=z.validateWidget.get("constraints");I.max=this.getMaxInputByMode(z);z.validateWidget.set(I)}},getTravelModes:function(z){var I=new E,T,P,Z,X;da.isDefined(this.travelModes)&&0<this.travelModes.length?I.resolve(this.travelModes):z&&z.widget?z.widget.signInPromise.then(e.hitch(this,function(ca){(X=z.widget.get("helperServices"))&&X.routingUtilities?(Z=X.routingUtilities.url,T="sync"):T=z.widget._getSelf(z.widget.portalUrl);t(T,e.hitch(this,function(ma){ma&&ma.helperServices&&
ma.helperServices.routingUtilities&&(Z=ma.helperServices.routingUtilities.url);da.isDefined(Z)?(P=new M(Z+"/GetTravelModes"),P.execute({}).then(e.hitch(this,function(na){this.travelModes=m.map(na[0].value&&na[0].value.features,function(sa){return c.fromJson(sa.attributes.TravelMode)});na[1]&&na[1].paramName&&"defaultTravelMode"===na[1].paramName&&(this.defaultTravelModeId=na[1].value);I.resolve(this.travelModes)}),e.hitch(this,function(na){I.reject(na)}))):I.reject(Error("Missing Routing Utility Service to get Travel Modes"))}),
function(ma){I.reject(ma)})})):I.reject(Error("Missing parameter: params.widget required parameter"));return I.promise},populateTravelModes:function(z){if(z&&z.selectWidget&&z.widget){var I=[],T=z.allowmode||"all",P=!1;this.initI18n();z.addStraightLine&&I.push({value:"StraightLine",label:'\x3cdiv class\x3d"esriFloatLeading bufferIcon esriStraightLineDistanceIcon"\x3e\x3c/div\x3e\x3cdiv class\x3d"esriLeadingMargin4" style\x3d"height:20px;margin-top:10px;"\x3e'+this.i18n.straightLineDistance+"\x3c/div\x3e",
selected:z.value&&"StraightLine"===z.value});this.getTravelModes({widget:z.widget}).then(e.hitch(this,function(Z){var X=da.isDefined(z.enableTravelModes)&&!z.enableTravelModes;m.forEach(Z,function(ca,ma){ma=this.createOptionForTravelMode(ca,{name:ca.name,disabled:X,separator:z.separator});this.isTravelModeAllowed(T,ma.units)&&("all"!==T&&(ma.value=ma.value.replace(ma.units,"")),z.value&&z.value.id===ca.id?U(z.value,ca)&&(ma.selected=!ma.disabled,P=!0):!z.value&&z.selectDefaultMode&&this.defaultTravelModeId&&
this.defaultTravelModeId===ca.id&&(ma.selected=!0),I.push(ma))},this);!P&&this.isRequiredToAddTravelMode(z)&&this.isTravelModeAllowed(T,this.getTravelModeUnits(z.value))&&I.push(this.getOptionForCustomTravelMode(z,X));z.selectWidget.removeOption();z.selectWidget.addOption(I);z.widget.emit("travelmodes-added",{travelOptions:I})}),e.hitch(this,function(Z){I&&0<I.length&&(z.selectWidget.removeOption(),z.selectWidget.addOption(I),z.widget.emit("travelmodes-added",{travelOptions:I}))}))}},getTravelModeLabel:function(z,
I){I=I?I:z.name;return'\x3cdiv class\x3d"esriFloatLeading bufferIcon esri'+this.getTravelModei18nKey(z.type)+this.getTravelModeUnits(z)+'Icon"\x3e\x3c/div\x3e\x3cdiv class\x3d"esriLeadingMargin4" style\x3d"height:20px;margin-top:10px;" title\x3d"'+z.description+'"\x3e'+I+"\x3c/div\x3e"},getTravelModeUnits:function(z){var I=z.units||name.split(/\s/)[1];return I=z.impedanceAttributeName===z.timeAttributeName?"Time":z.impedanceAttributeName===z.distanceAttributeName?"Distance":"Other"},getTravelModeValue:function(z,
I){return z.replace(/\s/g,I||"")},getTravelModei18nKey:function(z){return"AUTOMOBILE"===z?"Driving":"TRUCK"===z?"Trucking":"WALK"===z?"Walking":"Other"},isTravelModeAllowed:function(z,I){return"all"===z||z.toLowerCase()===I.toLowerCase()},isRequiredToAddTravelMode:function(z){return z.widget.rerun&&"StraightLine"!==z.value},isTrafficBasedTravelMode:function(z){var I=this.getTravelModei18nKey(z.type).toLowerCase();return"time"===this.getTravelModeUnits(z).toLowerCase()&&("driving"===I||"trucking"===
I)},getOptionForCustomTravelMode:function(z,I){z=this.createOptionForTravelMode(z.value,{name:"\x26lt"+z.value.name+"\x26gt",disabled:I,separator:z.separator});z.selected=!0;return z},createOptionForTravelMode:function(z,I){return{label:this.getTravelModeLabel(z,I.name),value:this.getTravelModeValue(I.name,I.separator),travelMode:z,disabled:I.disabled,modei18nKey:this.getTravelModei18nKey(z.type).toLowerCase(),units:this.getTravelModeUnits(z)}},updateDisplay:function(z,I,T){(new r.NodeList(z)).style("display",
I?T?T:"block":"none")},isGreaterThanZero:function(){return 0<this.get("value")},getExprFunctions:function(){this.i18n||this.initI18n();this.exprFunctions||(this.exprFunctions=[{type:"NumType",label:p.substitute(this.i18n.asMetersFunc,{functionName:"as_meters(\x3ci\x3enumber\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"as_meters()"},{type:"NumType",label:p.substitute(this.i18n.asKilometersFunc,{functionName:"as_kilometers(\x3ci\x3enumber\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"as_kilometers()"},
{type:"NumType",label:p.substitute(this.i18n.asFeetFunc,{functionName:"as_feet(\x3ci\x3enumber\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"as_feet()"},{type:"NumType",label:p.substitute(this.i18n.asYardsFunc,{functionName:"as_yards(\x3ci\x3enumber\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"as_yards()"},{type:"NumType",label:p.substitute(this.i18n.asMilesFunc,{functionName:"as_miles(\x3ci\x3enumber\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"as_miles()"},{type:"NumType",label:p.substitute(this.i18n.asNuaticalMilesFunc,
{functionName:"as_nautical_miles(\x3ci\x3enumber\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"as_nautical_miles()"},{type:"NumType",label:p.substitute(this.i18n.absFunc,{functionName:"abs(\x3ci\x3enumber\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"abs()"},{type:"NumType",label:p.substitute(this.i18n.logFunc,{functionName:"log(\x3ci\x3enumber\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"log()"},{type:"NumType",label:p.substitute(this.i18n.sinFunc,{functionName:"sin(\x3ci\x3enumber\x3c/i\x3e)",
num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"sin()"},{type:"NumType",label:p.substitute(this.i18n.cosFunc,{functionName:"cos(\x3ci\x3enumber\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"cos()"},{type:"NumType",label:p.substitute(this.i18n.tanFunc,{functionName:"tan(\x3ci\x3enumber\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"tan()"},{type:"NumType",label:p.substitute(this.i18n.squareRootFunc,{functionName:"sqrt(\x3ci\x3enumber\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"sqrt()"},
{type:"NumType",label:p.substitute(this.i18n.minFunc,{functionName:"min(\x3ci\x3enumber\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"min()"},{type:"NumType",label:p.substitute(this.i18n.maxFunc,{functionName:"max(\x3ci\x3enumber\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"max()"},{type:"NumType",label:p.substitute(this.i18n.constrainFunc,{functionName:"constrain(\x3ci\x3enumber\x3c/i\x3e, \x3ci\x3elow\x3c/i\x3e, \x3ci\x3ehigh\x3c/i\x3e",num:"\x3ci\x3enumber\x3c/i\x3e",low:"\x3ci\x3elow\x3c/i\x3e",
high:"\x3ci\x3ehigh\x3c/i\x3e"}),name:"constrain(,,)"},{type:"NumType",label:p.substitute(this.i18n.iffFunc,{functionName:"iif(\x3ci\x3econdition\x3c/i\x3e,\x3ci\x3evalue if TRUE\x3c/i\x3e,\x3ci\x3evalue if FALSE\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"iif(,,)"},{type:"NumType",label:p.substitute(this.i18n.whenFunc,{functionName:"when(\x3ci\x3enumber\x3c/i\x3e)",num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"when(,)"},{type:"NumType",label:p.substitute(this.i18n.decodeFunc,{functionName:"decode(\x3ci\x3eexpression\x3c/i\x3e, \x3ci\x3ecase1,return1,..caseN,returnN\x3c/i\x3e, \x3ci\x3edefault\x3c/i\x3e)",
num:"\x3ci\x3enumber\x3c/i\x3e"}),name:"decode(,,,)"}]);return this.exprFunctions},addAttributeOptions:function(z){this.initI18n();da.isDefined(z.allowSelectLabel)||(z.allowSelectLabel=!0);var I=[],T=da.isDefined(z.emptyValue)?z.emptyValue:"";if(z.allowNumericType||void 0===z.allowNumericType)I=[ia.FieldTypes.Short,ia.FieldTypes.Integer,ia.FieldTypes.Float,ia.FieldTypes.Double];var P=z.layer;var Z=z.selectWidget;var X=P?P.fields:[];Z.removeOption(Z.getOptions());z.allowSelectLabel&&Z.addOption({value:T,
label:this.i18n.attribute});z.allowStringType&&I.push(ia.FieldTypes.String);z.allowDateType&&I.push(ia.FieldTypes.Date);var ca=[];m.forEach(X,function(ma){-1!==m.indexOf(I,ma.type)&&ma.name!==P.objectIdField&&ca.push({value:ma.name,label:da.isDefined(ma.alias)&&""!==ma.alias?ma.alias:ma.name,type:ma.type===ia.FieldTypes.String?ia.PseudoFieldTypes.String:ma.type===ia.FieldTypes.Date?ia.PseudoFieldTypes.Date:ia.PseudoFieldTypes.Number})},this);if(0===ca.length)return!1;Z.addOption(ca);da.isDefined(z.priorityChange)?
Z.set("value",T,z.priorityChange):Z.set("value",T);Z.set("disabled",!P||0===P.fields.length);return!0},addStatisticsOptions:function(z){this.initI18n();var I=z.selectWidget,T=[{value:"SUM",label:this.i18n.sum},{value:"MIN",label:this.i18n.minimum},{value:"MAX",label:this.i18n.maximum},{value:"MEAN",label:z.showGeoAnalyticsParams?this.i18n.mean:this.i18n.average},{value:"STDDEV",label:this.i18n.standardDev}],P=[{value:"MIN",label:this.i18n.minimum},{value:"MAX",label:this.i18n.maximum}],Z=[{value:"First",
label:this.i18n.first},{value:"Last",label:this.i18n.last}],X=da.isDefined(z.emptyValue)?z.emptyValue:"";I.removeOption(I.getOptions());I.addOption([{value:X,label:this.i18n.statistic}]);z.showGeoAnalyticsParams&&(I.addOption({value:"COUNT",label:this.i18n.count}),T.push({value:"VARIANCE",label:this.i18n.variance}),T.splice(4,0,{value:"RANGE",label:this.i18n.range}));z.showFirstLastStats&&I.addOption(Z);z.type&&"number"!==z.type?z.type&&"string"===z.type?(I.addOption({value:"ANY",label:this.i18n.any}),
z.selectWidget.optionsType="string"):z.type&&"date"===z.type&&(I.addOption(P),z.selectWidget.optionsType="date"):(I.addOption(T),z.selectWidget.optionsType="number");I.set("value",X)},addFillOptions:function(z){var I=z.selectWidget,T=[{value:"ZEROES",label:this.i18n.zeroes},{value:"SPATIAL_NEIGHBORS",label:this.i18n.spatialneighbhors},{value:"SPACE_TIME_NEIGHBORS",label:this.i18n.spacetimeneighbors},{value:"TEMPORAL_TREND",label:this.i18n.temporaltrend}];I.removeOption(I.getOptions());I.addOption([{value:"0",
label:this.i18n.fill}]);z.type&&"number"!==z.type||I.addOption(T)},perMeter:function(z){var I=1;switch(z){case fa.MILLIMETERS:I=1E3;break;case fa.CENTIMETERS:I=100;break;case fa.DECIMETERS:I=10;break;case fa.METERS:I=1;break;case fa.KILOMETERS:I=.001;break;case fa.INCHES:I=39.370079;break;case fa.FEET:I=3.2808399;break;case fa.YARDS:I=1.0936133;break;case fa.MILES:I=6.2137119E-4;break;case fa.NAUTICAL_MILES:I=5.399568E-4;break;case fa.ACRES:I=2.4710538E-4;break;case fa.ARES:I=.01;break;case fa.HECTARES:I=
1E-4;break;case fa.SQUARE_INCHES:I=1550.0031;break;case fa.SQUARE_FEET:I=10.7639104;break;case fa.SQUARE_YARDS:I=1.19599005;break;case fa.SQUARE_MILES:I=3.86102159E-7;break;case fa.SQUARE_NAUTICAL_MILES:I=2.9155335E-7;break;case fa.SQUARE_MILLIMETERS:I=1E6;break;case fa.SQUARE_CENTIMETERS:I=1E4;break;case fa.SQUARE_DECIMETERS:I=100;break;case fa.SQUARE_METERS:I=1;break;case fa.SQUARE_KILOMETERS:I=1E-6}return I},perMile:function(z){var I=1;switch(z){case "Feet":I=1.89394E-4;break;case "Yards":I=5.68182E-4;
break;case "Meters":I=6.21371E-4;break;case "Kilometers":I=.621371}return I},perMinute:function(z){var I=1;switch(z){case "Seconds":I=.0166667;break;case "Hours":I=60}return I},getType:function(z){var I=null;switch(z){case fa.ACRES:I=2;break;case fa.ARES:I=2;break;case fa.CENTIMETERS:I=1;break;case fa.DECIMETERS:I=1;break;case fa.FEET:I=1;break;case fa.HECTARES:I=2;break;case fa.INCHES:I=1;break;case fa.KILOMETERS:I=1;break;case fa.METERS:I=1;break;case fa.MILES:I=1;break;case fa.MILLIMETERS:I=1;
break;case fa.NAUTICAL_MILES:I=1;break;case fa.SQUARE_CENTIMETERS:I=2;break;case fa.SQUARE_DECIMETERS:I=2;break;case fa.SQUARE_FEET:I=2;break;case fa.SQUARE_INCHES:I=2;break;case fa.SQUARE_KILOMETERS:I=2;break;case fa.SQUARE_METERS:I=2;break;case fa.SQUARE_MILES:I=2;break;case fa.SQUARE_MILLIMETERS:I=2;break;case fa.SQUARE_NAUTICAL_MILES:I=2;break;case fa.SQUARE_YARDS:I=2;break;case fa.YARDS:I=1;break;default:I=0}return I},unitConversion:function(z,I,T){var P=!0;da.isDefined(z)||(this.emitError("The 'From' Value must be a valid numeric value: "+
z),P=!1);da.isDefined(I)||(this.emitError("The 'From' Units must be defined: "+I),P=!1);da.isDefined(T)||(this.emitError("The 'To' Units must be defined: "+T),P=!1);z instanceof Array&&(this.emitError("Only single 'From' Value supported: "+z),P=!1);I instanceof Array&&(this.emitError("Only single 'From' Units supported: "+I),P=!1);T instanceof Array&&(this.emitError("Only single 'To' Units supported: "+T),P=!1);var Z=this.getType(I),X=this.getType(T);0===Z&&(this.emitError("Unsupported 'From' Units: "+
I),P=!1);0===X&&(this.emitError("Unsupported 'To' Units: "+T),P=!1);Z!==X&&(this.emitError("Incompatible 'From' and 'To' Units: "+I+" and "+T),P=!1);return P?I===T?+z:+z/this.perMeter(I)*this.perMeter(T):Number.NaN},emitError:function(z){console.log("error",Error(z))},isEmpty:function(z){for(var I in z)if(z.hasOwnProperty(I))return!1;return l.stringify(z)===l.stringify({})},getRoutingUtilities:function(z){var I=new E,T={},P,Z,X,ca;z||I.reject(Error("Missing parameter: widget required parameter"));
-1!==m.indexOf(["CreateDriveTimeAreas","EnrichLayer","SummarizeNearby"],z.toolName)?e.mixin(T,{toolName:"GenerateServiceAreas",serviceName:"asyncServiceArea"}):z.toolName===ia.Tools.ChooseBestFacilities?e.mixin(T,{toolName:"SolveLocationAllocation",serviceName:"asyncLocationAllocation"}):"PlanRoutes"===z.toolName?e.mixin(T,{toolName:"SolveVehicleRoutingProblem",serviceName:"asyncVRP"}):"FindNearest"===z.toolName?e.mixin(T,{toolName:"FindClosestFacilities",serviceName:"asyncClosestFacility"}):"ConnectOriginsToDestinations"===
z.toolName&&e.mixin(T,{toolName:"FindRoutes",serviceName:"asyncRoute"});this.routingUtilities||(this.routingUtilities={});this.routingUtilities&&this.routingUtilities[z.toolName]?I.resolve(this.routingUtilities[z.toolName]):z.signInPromise.then(e.hitch(this,function(ma){(ca=z.get("helperServices"))&&ca.routingUtilities?(X=ca.routingUtilities.url,P="sync"):P=z._getSelf(z.portalUrl);t(P,e.hitch(this,function(na){na&&na.helperServices&&na.helperServices.routingUtilities&&(X=na.helperServices.routingUtilities.url);
da.isDefined(X)||I.reject(Error("Missing Routing Utility Service to get Network Analysis Service Limits."));Z=new M(X+"/GetToolInfo");Z.execute(T).then(e.hitch(this,function(sa){sa&&0<sa.length&&sa[0].value?(this.routingUtilities[z.toolName]=sa[0].value,I.resolve(sa[0].value)):I.reject("Routing Utility Service 'GetToolInfo' job did not return service limits.")}),function(sa){I.reject(sa)})}))}),function(ma){I.reject(ma)});return I.promise},getNetworkAnalysisLimits:function(z){var I=new E;z||I.reject(Error("Missing parameter: widget required parameter"));
this.getRoutingUtilities(z).then(e.hitch(this,function(T){T.serviceLimits?I.resolve(T.serviceLimits):I.reject()}),function(T){I.reject(T)});return I.promise},isEsriWorldGeocoder:function(z){var I=this.isAgoWorldGeocodeServer(z);z=this.isAgoWorldGeocodeServerProxy(z);return I||z},isAgoWorldGeocodeServer:function(z){return z&&!!z.match(/(arcgis.com\/arcgis\/rest\/services\/world\/geocodeserver).*/ig)},isCustomGeoEnrichmentServer:function(z,I){var T=(z||"").toLowerCase();z=-1<T.indexOf("/geoenrichmentserver")&&
-1<T.indexOf("/servers/")&&-1<T.indexOf("/rest/services/");I=!I&&T.indexOf("utility")&&-1<T.indexOf(".arcgis.com");return z&&I},isAgoWorldGeocodeServerProxy:function(z){return z&&!!z.match(/(\/servers\/[\da-z\.-]+\/rest\/services\/world\/geocodeserver).*/ig)},isWorldGeoLocator:function(z){return z&&!!z.match(/(\/rest\/services\/world\/geocodeserver).*/ig)},showMessages:function(z,I,T){b.set(I,"innerHTML",z);d.fadeIn({node:T,easing:D.quadIn,onEnd:e.hitch(this,function(){u.set(T,{display:""})})}).play()},
hideMessages:function(z){d.fadeOut({node:z,easing:D.quadOut,onEnd:function(){u.set(z,{display:"none"})}}).play()},getHelpUrl:function(z){if(z.topic&&z.widget){var I;z.widget.portalSelf&&z.widget.portalSelf.helpBase?I=z.widget.portalSelf.helpBase+"index.html#":!z.widget.isSingleTenant||z.widget.portalSelf&&z.widget.portalSelf.helpBase||(I="http://server.arcgis.com/en/portal/latest/use/");"BufferExpression"===z.topic&&(I+="Use_expressions_with_GeoAnalytics_Tools/019300000183000000/");return I}},isPCS:function(z){return!!z&&
!!ka&&-1!==m.indexOf(ka,z)},isPCSByLayerType:function(z){var I=!!z&&!!z.fullExtent&&this.isPCS(z.fullExtent.spatialReference.wkid);!I&&z.extent&&(I=!!z&&!!z.extent&&this.isPCS(z.extent.spatialReference.wkid));!I&&z.spatialReference&&(I=!!z&&!!z.spatialReference&&this.isPCS(z.spatialReference.wkid));return I},checkPCSforAnalysis:function(z){var I=z.widget&&z.widget.toolName,T=!!z.widget&&!!z.widget.context&&!!z.widget.context.processSR&&this.isPCS(z.widget.context.processSR.wkid),P=!0,Z=z.jobParams||
z.widget.jobParams,X=!!z.widget&&!!z.widget.context&&!!z.widget.context.processSR&&!!z.widget.context.processSR.wkid;if(!I||!Z||!z.widget.showGeoAnalyticsParams)return!1;var ca="\x3ca  href\x3d'#' id\x3d'"+z.widget.id+"_warn_settings_link'\x3e"+z.widget.i18n.analysisSettings+"\x3c/a\x3e\x3cdiv class\x3d'esriAnalysisSettingsIcon'\x3e\x3c/div\x3e";var ma=p.substitute(z.widget.i18n.PCSReqMsg,{defaultSpatialRef:z.widget.i18n.worldCylindrical,settingsIcon:ca});"FindHotSpots"!==I&&"FindPointClusters"!==
I||T?"CalculateDensity"!==I&&"FindPointClusters"!==I&&"GeographicallyWeightedRegression"!==I||T?"AggregatePoints"!==I||-1===m.indexOf(["HEXAGON","SQUARE"],Z.binType)||T?"SummarizeWithin"===I&&Z.summaryPolygons&&!T?P=this.isPCSByLayerType(z.widget.sumWithinLayer):"SummarizeWithin"!==I||-1===m.indexOf(["HEXAGON","SQUARE"],Z.binType)||T?"JoinFeatures"===I&&Z.spatialNearDistance&&"Near"===Z.spatialRelationship&&!T?(P=this.isPCSByLayerType(z.widget.targetLayer))||(ma=p.substitute(z.widget.i18n.JFPCSReqMsg,
{settingsIcon:ca})):"BuildMultiVariableGrid"!==I||T?"CalculateMotionStatistics"===I&&"Planar"===Z.distanceMethod&&(1<Z.motionStatistics.split(",").length||1===Z.motionStatistics.split(",").length&&-1===Z.motionStatistics.indexOf("Duration"))&&!T?(P=this.isPCSByLayerType(z.widget.inputLayer))||(ma=p.substitute(z.widget.i18n.CMSPCSReqMsg,{settingsIcon:ca})):"TraceProximityEvents"!==I||"Planar"!==Z.distanceMethod||T||(P=this.isPCSByLayerType(z.widget.inputLayer))||(ma=p.substitute(z.widget.i18n.TPEPCSReqMsg,
{settingsIcon:ca})):P=m.every(z.inputLayers,function(na){return this.isPCSByLayerType(na)},this):P=this.isPCSByLayerType(z.widget.summaryLayer):P=this.isPCSByLayerType(z.widget.pointLayer):(P=this.isPCSByLayerType(z.widget.inputLayer),"GeographicallyWeightedRegression"!==I||P||(ma=p.substitute(z.widget.i18n.GWRPCSReqMsg,{settingsIcon:ca}))):(P=this.isPCSByLayerType(z.widget.analysisLayer),"FindPointClusters"!==I||P||(ma=p.substitute(z.widget.i18n.FPCSReqMsg,{settingsIcon:ca})));P||z.hasPCSWarnShown||
(z.widget.set("disableRunAnalysis",P),this.settingsVM&&this.settingsDlg&&z.widget._bodyNode&&z.widget._errorMessagePane&&(this.showMessages(ma,z.widget._bodyNode,z.widget._errorMessagePane),v.byId(z.widget.id+"_warn_settings_link")&&C(v.byId(z.widget.id+"_warn_settings_link"),"click",e.hitch(z.widget,z.widget.showSettingsDlg))));!P&&z.hasPCSWarnShown&&X&&(P=!0);return P},tryParseJSON:function(z){try{var I=l.parse(z);if(I&&"object"===typeof I&&null!==I)return I}catch(T){}return!1},decodeTag:function(z){return{"\x26lt;":"\x3c",
"\x26gt;":"\x3e"}[z]||z},stringDecode:function(z){return z.replace(/(&lt;|&gt;)/g,this.decodeTag)},jobParamsToWidgetProps:function(z){if(z&&z.jobParams){var I=z.jobParams,T=new E,P=[],Z=[],X;for(X in I){var ca;I.hasOwnProperty(X)&&("string"===typeof I[X]&&-1!==I[X].search(/(&lt;|&gt;)/g)&&(I[X]=this.stringDecode(I[X])),ca="string"===typeof I[X]?this.tryParseJSON(I[X]):I[X])&&(-1!==X.toLowerCase().indexOf("layer")&&"object"===typeof ca?Z.push({key:X,obj:ca}):ca&&(ca.Raster||ca.url)&&Z.push({key:X,
obj:ca}),I[X]=ca)}for(X=0;X<Z.length;X++){ca=Z[X].obj;var ma=Z[X].key;"object"===typeof ca&&ca.length?(I[ma]=[],m.forEach(ca,function(na,sa){this._getFlayers(na,ma,I,P,!0,sa)},this)):"object"===typeof ca&&ca.Raster?(ca.url=ca.Raster.url,this._getFlayers(ca,ma,I,P,!0,"Raster")):this._getFlayers(ca,ma,I,P)}y(P).then(e.hitch(this,function(){T.resolve(z)}),e.hitch(this,function(){T.resolve(z)}));return T.promise}},_getLayerType:function(z){return z?-1!==z.indexOf("BigDataCatalogServer")?ja.BIGDATA:-1!==
z.indexOf("ImageServer")?ja.IS:ja.FS:null},_getFlayers:function(z,I,T,P,Z,X){if(z.url){var ca=R({url:z.url,content:{f:"json"}});var ma=new E;P.push(ma);ca.then(e.hitch(this,function(na,sa,Ba,wa,ta){var ua=this._getLayerType(na.url);if(ua===ja.FS){var ra=new O(na.url,{mode:O.MODE_ONDEMAND,outFields:["*"],resourceInfo:ta});na.filter&&ra.setDefinitionExpression(na.filter);ra.filter=na.filter}else ua===ja.BIGDATA?(ra=ta,e.mixin(ra,na)):ua===ja.IS&&(ta=na.Raster||na,ra=new Q(ta.url),ta.renderingRule&&
ra.setRenderingRule(new qa(ta.renderingRule)),ta.name&&(ra.name=ta.name),na.Raster&&na.Raster.url===na.url&&delete na.url);na.name&&(ra.name=na.name);Z?T[sa][wa]=ra:Z&&ua===ja.IS?e.mixin(T[sa][wa],ra):T[sa]=ra;Ba.resolve()},z,I,ma,X),e.hitch(this,function(na,sa,Ba,wa,ta){na={name:na.name,empty:!0};Z?T[sa][wa]=na:T[sa]=na;Ba.resolve()},z,I,ma,X))}else P=new O(z,{outFields:["*"]}),z.name&&(P.name=z.name),Z?T[I][X]=P:T[I]=P},isLayerInLayers:function(z,I){return m.some(I,function(T){return this.isSameLayer(z,
T)},this)},addBlankOption:function(z,I){I&&I.length?I.push({value:"  ",label:""}):z.addOption({value:"  ",label:""});setTimeout(e.hitch(this,this._validateSelectUI,z),100)},_validateSelectUI:function(z){z._hasBeenBlurred=!0;z.set("focused",!0);z.validate();z.set("focused",!1);z._hasBeenBlurred=!1;setTimeout(e.hitch(this,function(){z.reset()}),1E3)},updateExpressions:function(z){z&&z.selectedInputLayers&&z.inputLayers&&z.data&&z.expressions&&(m.forEach(z.selectedInputLayers,function(I,T){m.forEach(z.inputLayers,
function(P,Z){P&&I&&(!I.url&&!P.url&&I.name===P.name||I.url&&P.url&&I.url===P.url)&&(I._oldIndex=T,I._newIndex=Z)})}),m.forEach(z.data,function(I,T){0<T&&I&&(T=z.expressions[T-1],da.isDefined(I.layer)&&(I.layer=T&&T.layer),da.isDefined(I.selectingLayer)&&(I.selectingLayer=T&&T.selectingLayer))}),m.forEach(z.data,function(I){var T=!1,P=!1;m.forEach(z.selectedInputLayers,function(Z){da.isDefined(I.layer)&&I.layer===Z._oldIndex&&!T&&(I.layer=Z._newIndex,T=!0);da.isDefined(I.selectingLayer)&&I.selectingLayer===
Z._oldIndex&&!P&&(I.selectingLayer=Z._newIndex,P=!0)},this)},this))},isBigDataTypeTobeAdded:function(z){return-1==m.indexOf(z,'type:"Big Data File Share"')?!0:!1},removeDuplicates:function(z,I){for(var T=[],P={},Z=0;Z<z.length;Z++)P[z[Z]]?P[z[Z]]+=1:(T.push(z[Z]),P[z[Z]]=1);return I?P:T},isPoint:function(z){return z&&z.geometryType===ia.GeometryTypes.Point},isLine:function(z){return z&&z.geometryType===ia.GeometryTypes.Line},isPolygon:function(z){return z&&z.geometryType===ia.GeometryTypes.Polygon},
isSameLayer:function(z,I){return z&&I&&(z.name&&I.name&&z.name===I.name||z.url&&I.url&&z.url===I.url)},getTimeType:function(z){return z?da.isDefined(z.timeInfo)&&da.isDefined(z.timeInfo.startTimeField)&&!da.isDefined(z.timeInfo.endTimeField)?ia.TimeTypes.Instant:da.isDefined(z.timeInfo)&&da.isDefined(z.timeInfo.startTimeField)&&da.isDefined(z.timeInfo.endTimeField)?ia.TimeTypes.Interval:da.isDefined(z.time)&&da.isDefined(z.time.timeType)?z.time.timeType:!1:!1},fetchGroupForRFT:function(z){var I=new E,
T=a.locale,P=T?T.substring(0,2):"en";T=this.systemRFTGroupName+" owner: ("+("en"===P?["esri_en"]:["esri_en","esri_"+P]).join(" OR ")+")";z.queryGroups({q:T},!0).then(function(Z){0<Z.total&&Z.results?(Z=Z.results,Z=this.findRFTLocaleGroup(Z,P)||this.findRFTLocaleGroup(Z,"en"),I.resolve(Z)):I.resolve(null)}.bind(this));return I},findRFTLocaleGroup:function(z,I){var T;z.some(function(P){var Z=P.owner;if(Z&&Z.substring(Z.length-2)===I)return T=P,!0});return T},updateOptions:function(z,I){if(z){for(;0<
z.getOptions().length;)z.removeOption(z.getOptions());z._setDisplay("");I&&0<I.length&&z.addOption(I)}},addOptionsFromLayers:function(z){z.select&&z.layers&&(z.customOptions=z.customOptions||[],z.forbiddenLayers=z.forbiddenLayers||[],z.layers.forEach(function(I,T){this.isLayerInLayers(I,z.forbiddenLayers)||z.customOptions.push({value:T.toString(),label:I.name,selected:z.selectedOption&&this.isSameLayer(z.selectedOption,I)})},this),this.updateOptions(z.select,z.customOptions),this.addBrowseOptionForTool({select:z.select,
disableLAAL:!0},z.widget))},replaceTag:function(z){return{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;"}[z]||z},safetagsReplace:function(z){return z.replace(/[<>]/g,this.replaceTag)}});h("extend-esri")&&e.setObject("dijit.analysis.utils",H,oa);return H})},"dojo/fx/easing":function(){define(["../_base/lang"],function(H){var e={linear:function(m){return m},quadIn:function(m){return Math.pow(m,2)},quadOut:function(m){return m*(m-2)*-1},quadInOut:function(m){m*=2;return 1>m?Math.pow(m,2)/2:-1*(--m*
(m-2)-1)/2},cubicIn:function(m){return Math.pow(m,3)},cubicOut:function(m){return Math.pow(m-1,3)+1},cubicInOut:function(m){m*=2;return 1>m?Math.pow(m,3)/2:(Math.pow(m-2,3)+2)/2},quartIn:function(m){return Math.pow(m,4)},quartOut:function(m){return-1*(Math.pow(m-1,4)-1)},quartInOut:function(m){m*=2;return 1>m?Math.pow(m,4)/2:-.5*(Math.pow(m-2,4)-2)},quintIn:function(m){return Math.pow(m,5)},quintOut:function(m){return Math.pow(m-1,5)+1},quintInOut:function(m){m*=2;return 1>m?Math.pow(m,5)/2:(Math.pow(m-
2,5)+2)/2},sineIn:function(m){return-1*Math.cos(Math.PI/2*m)+1},sineOut:function(m){return Math.sin(Math.PI/2*m)},sineInOut:function(m){return-1*(Math.cos(Math.PI*m)-1)/2},expoIn:function(m){return 0==m?0:Math.pow(2,10*(m-1))},expoOut:function(m){return 1==m?1:-1*Math.pow(2,-10*m)+1},expoInOut:function(m){if(0==m)return 0;if(1==m)return 1;m*=2;if(1>m)return Math.pow(2,10*(m-1))/2;--m;return(-1*Math.pow(2,-10*m)+2)/2},circIn:function(m){return-1*(Math.sqrt(1-Math.pow(m,2))-1)},circOut:function(m){return Math.sqrt(1-
Math.pow(m-1,2))},circInOut:function(m){m*=2;return 1>m?-.5*(Math.sqrt(1-Math.pow(m,2))-1):.5*(Math.sqrt(1-Math.pow(m-2,2))+1)},backIn:function(m){return Math.pow(m,2)*(2.70158*m-1.70158)},backOut:function(m){--m;return Math.pow(m,2)*(2.70158*m+1.70158)+1},backInOut:function(m){m*=2;if(1>m)return Math.pow(m,2)*(3.5949095*m-2.5949095)/2;m-=2;return(Math.pow(m,2)*(3.5949095*m+2.5949095)+2)/2},elasticIn:function(m){if(0==m||1==m)return m;--m;return-1*Math.pow(2,10*m)*Math.sin(2*(m-.075)*Math.PI/.3)},
elasticOut:function(m){return 0==m||1==m?m:Math.pow(2,-10*m)*Math.sin(2*(m-.075)*Math.PI/.3)+1},elasticInOut:function(m){if(0==m)return 0;m*=2;if(2==m)return 1;var n=.3*1.5,q=n/4;if(1>m)return--m,-.5*Math.pow(2,10*m)*Math.sin(2*(m-q)*Math.PI/n);--m;return.5*Math.pow(2,-10*m)*Math.sin(2*(m-q)*Math.PI/n)+1},bounceIn:function(m){return 1-e.bounceOut(1-m)},bounceOut:function(m){return m<1/2.75?7.5625*Math.pow(m,2):m<2/2.75?7.5625*Math.pow(m-1.5/2.75,2)+.75:m<2.5/2.75?7.5625*Math.pow(m-2.25/2.75,2)+.9375:
7.5625*Math.pow(m-2.625/2.75,2)+.984375},bounceInOut:function(m){return.5>m?e.bounceIn(2*m)/2:e.bounceOut(2*m-1)/2+.5}};H.setObject("dojo.fx.easing",e);return e})},"dojox/mvc/equals":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/Stateful","./StatefulArray"],function(H,e,m,n){var q=function(d,c,a){a=a||q;var b=[a.getType(d),a.getType(c)];return b[0]!=b[1]?!1:a["equals"+b[0].replace(/^[a-z]/,function(h){return h.toUpperCase()})](d,c)};return e.setObject("dojox.mvc.equals",e.mixin(q,
{getType:function(d){return e.isArray(d)?"array":e.isFunction((d||{}).getTime)?"date":null!=d&&("[object Object]"=={}.toString.call(d)||e.isFunction((d||{}).set)&&e.isFunction((d||{}).watch))?"object":"value"},equalsArray:function(d,c){for(var a=0,b=Math.max(d.length,c.length);a<b;a++)if(!q(d[a],c[a]))return!1;return!0},equalsDate:function(d,c){return d.getTime()==c.getTime()},equalsObject:function(d,c){var a=e.mixin({},d,c),b;for(b in a)if(!(b in m.prototype||"_watchCallbacks"==b||q(d[b],c[b])))return!1;
return!0},equalsValue:function(d,c){return d===c}}))})},"dojox/mvc/StatefulArray":function(){define(["dojo/_base/lang","dojo/Stateful"],function(H,e){function m(q){q._watchElementCallbacks&&q._watchElementCallbacks(void 0,[],[]);return q}var n=function(q){q=H._toArray(q||[]);q.constructor=n;return H.mixin(q,{pop:function(){return this.splice(this.get("length")-1,1)[0]},push:function(){this.splice.apply(this,[this.get("length"),0].concat(H._toArray(arguments)));return this.get("length")},reverse:function(){return m([].reverse.apply(this,
H._toArray(arguments)))},shift:function(){return this.splice(0,1)[0]},sort:function(){return m([].sort.apply(this,H._toArray(arguments)))},splice:function(d,c){var a=this.get("length");d+=0>d?a:0;var b=Math.min(d,a),h=this.slice(d,d+c),g=H._toArray(arguments).slice(2);[].splice.apply(this,[d,c].concat(Array(g.length)));for(var k=0;k<g.length;k++)this[b+k]=g[k];this._watchElementCallbacks&&this._watchElementCallbacks(d,h,g);this._watchCallbacks&&this._watchCallbacks("length",a,a-h.length+g.length);
return h},unshift:function(){this.splice.apply(this,[0,0].concat(H._toArray(arguments)));return this.get("length")},concat:function(d){return new n([].concat.apply(this,arguments))},join:function(d){for(var c=[],a=this.get("length"),b=0;b<a;b++)c.push(this.get(b));return c.join(d)},slice:function(d,c){var a=this.get("length");c=(void 0===c?a:c)+(0>c?a:0);var b=[];for(d=d+(0>d?a:0)||0;d<Math.min(c,this.get("length"));d++)b.push(this.get(d));return new n(b)},watchElements:function(d){var c=this._watchElementCallbacks,
a=this;c||(c=this._watchElementCallbacks=function(h,g,k){for(var f=[].concat(c.list),l=0;l<f.length;l++)f[l].call(a,h,g,k)},c.list=[]);c.list.push(d);var b={};b.unwatch=b.remove=function(){for(var h=c.list,g=0;g<h.length;g++)if(h[g]==d){h.splice(g,1);break}};return b}},e.prototype,{set:function(d,c){if("length"==d)d=this.get("length"),d<c?this.splice.apply(this,[d,0].concat(Array(c-d))):c<d&&this.splice.apply(this,[c,d-c]);else{var a=this.length;e.prototype.set.call(this,d,c);a!=this.length&&e.prototype.set.call(this,
"length",this.length)}return this},isInstanceOf:function(d){return e.prototype.isInstanceOf.apply(this,arguments)||d==n}})};n._meta={bases:[e]};return H.setObject("dojox.mvc.StatefulArray",n)})},"esri/dijit/analysis/HelpWindow":function(){define("require dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/_base/connect dojo/_base/event dojo/_base/kernel dojo/aspect dojo/has dojo/dom-construct dojo/dom-class dojo/dom-attr dojo/dom-style dojo/query dojo/window dojo/dom-geometry dijit/_Widget dijit/TooltipDialog dijit/popup ../../kernel ../../lang ../../urlUtils ../../request ../_EventedWidget dojo/i18n!../../nls/jsapi".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D,G,A){m=m([w],{declaredClass:"esri.dijit.analysis.HelpWindow",i18n:null,onlineHelpMap:null,showLearnMore:!1,"class":"esriAnalyisHelpWindow",constructor:function(t){this.isPortal=t&&t.isPortal},postMixInProperties:function(){this.inherited(arguments);this.i18n={};n.mixin(this.i18n,A.common);n.mixin(this.i18n,A.analysisHelp)},postCreate:function(){this.inherited(arguments);var t=["ar","he"],v;this.onlineHelpMap={};for(v=0;v<t.length;v+=1){var C=
t[v];c.locale&&-1!==c.locale.indexOf(C)&&(-1!==c.locale.indexOf("-")?-1!==c.locale.indexOf(C+"-")&&(this._isRightToLeft=!0):this._isRightToLeft=!0)}t=H.toUrl(this.isPortal?"./help/helpmap_enterprise.json":"./help/helpmap.json");D({url:t}).then(n.hitch(this,function(J){this.onlineHelpMap=J.map}));this._initSelfHelpMap()},_getAbsoluteUrl:function(t){var v=y.getProtocolForWebResource();if(/^https?:/i.test(t))return t;if(/^\/\//i.test(t))return v+t;if(/^\//i.test(t))return v+"//"+window.location.host+
t},_computeSize:function(t){var v={w:400,h:200};b("esri-mobile")?v={w:"50%",h:"90%"}:-1!==t.indexOf("Category")?(v.w=400,v.h=320):-1!==t.indexOf("Tool")?(v.w=400,v.h=320):-1!==t.indexOf("toolDescription")&&(v.w=400,v.h=520);return v},_initSelfHelpMap:function(){this.isPortal&&this.portalSelf&&this.portalSelf.helpMap&&(this.selfHelpMap=this.portalSelf.helpMap.m)},_setHelpTopicAttr:function(t){this.tooltipHelpDlg&&(B.close(this.tooltipHelpDlg),this.tooltipHelpDlg.destroy(),this.tooltipHelpDlg=null);
var v="";this.showLearnMore=!1;var C=this._analysisGpServer&&-1!==this._analysisGpServer.indexOf("dev")?"dev":this._analysisGpServer&&-1!==this._analysisGpServer.indexOf("qa")?"uat":"";v=this.isPortal?"-PortalOnly":"-OnlineOnly";var J=n.clone(c.locale);var L="es-es es-mx fr-fr fr-ch it-ch it-it de-de de-ch".split(" ");"nb"===J?J="no":-1!==e.indexOf(L,J)&&(J=J.split("-")[0]);var S="ar bs ca cs da de es el et fi fr he hr hu id it ja ko lt lv ru nl no pl pt-br pt-pt ro sl sk sv sr th tr uk vi zh-cn zh-hk zh-tw".split(" ");
var U="ar de es fr it ja ko ru pl pt-br zh-cn".split(" ");if("SHOWHELPURL"===t)L=this.helpIdUrl,this.showLearnMore=!1;else{L=H.toUrl("esri/dijit/analysis/help/"+this.helpFileName+".html");var aa=this.helpFileName;if(E.isDefined(this.onlineHelpMap[aa])&&E.isDefined(this.onlineHelpMap[aa][t])){this.showLearnMore=!0;var ea="https://doc"+C+".arcgis.com/en/arcgis-online/analyze/"+this.onlineHelpMap[aa][t];this.isPortal&&this.helpBase&&this.selfHelpMap&&(ea=this.helpBase+this.selfHelpMap[this.onlineHelpMap[aa][t]])}-1!==
e.indexOf(S,J)&&(-1!==J.indexOf("-")&&(J=J.split("-"),J=J[0]+"-"+J[1].toUpperCase()),L=H.toUrl("esri/dijit/analysis/help/"+J+"/"+this.helpFileName+".html"));-1!==e.indexOf(U,J)&&this.showLearnMore&&(ea="https://doc"+C+".arcgis.com/"+J+"/arcgis-online/analyze/"+this.onlineHelpMap[aa][t],this.isPortal&&this.helpBase&&this.selfHelpMap?ea=this.helpBase+this.selfHelpMap[this.onlineHelpMap[aa][t]]:this.isPortal&&!this.helpBase&&(ea="https://server"+C+".arcgis.com/"+J+"/portal/latest/use/"+this.onlineHelpMap[aa][t]))}this._size=
C=this._computeSize(t);this.tooltipHelpDlg=new u({preload:!0,content:"\x3cdiv class\x3d'' style\x3d'position:relative'\x3cdiv class\x3d'sizer content'\x3e\x3cdiv class\x3d'contentPane'\x3e\x3cdiv class\x3d'esriFloatTrailing' style\x3d'padding:0;'\x3e\x3ca href\x3d'#' class\x3d'esriAnalysisCloseIcon' title\x3d'"+this.i18n.close+"'\x3e\x3c/a\x3e\x3c/div\x3e\x3ciframe frameborder\x3d'0'  id\x3d'"+t+"' src\x3d'"+L+"#"+t+v+"' width\x3d'"+C.w+"' height\x3d'"+C.h+"' marginheight\x3d'0' marginwidth\x3d'0'\x3e\x3c/iframe\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'sizer'\x3e\x3cdiv class\x3d'actionsPane'\x3e\x3cdiv class\x3d'actionList"+
(this.showLearnMore?"'\x3e":" hidden'\x3e")+"\x3ca class\x3d'action zoomTo' href\x3d'"+(this.showLearnMore?ea:"#")+"' target\x3d'_help'\x3e"+this.i18n.learnMore+"\x3c/a\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e","class":"esriHelpPopup esriHelpPopupWrapper esriAnalyisHelpWindow"});this.tooltipHelpDlg.startup()},show:function(t,v){this.helpFileName=v.helpFileName;this._analysisGpServer=v.analysisGpServer;this.isPortal=v.isPortal;this.helpBase=v.helpBase;v.portalSelf&&(this.portalSelf=
v.portalSelf);this.selfHelpMap||this._initSelfHelpMap();v.analysisMode&&(this.analysisMode=v.analysisMode);v.showHelpFromUrl&&v.helpUrl&&(this.showHelpFromUrl=v.showHelpFromUrl,this.helpIdUrl=v.helpUrl,v.helpId="SHOWHELPURL");this.set("helpTopic",v.helpId);var C=a.after(B,"open",n.hitch(this,function(){l(".esriAnalysisCloseIcon",this.tooltipHelpDlg.domNode).on("click",n.hitch(this,this.close));C.remove()})),J=t.pageX,L=p.getBox(),S;var U=!1;if(v.helpParentNode)var aa=v.helpParentNode;aa&&(S=r.position(aa));
S&&L.w-t.pageX<S.w?(U=!0,J=S.x-this._size.w-10,this._isRightToLeft&&(J-=10)):this._isRightToLeft&&J-40<this._size.w&&(J=S.w+this._size.w+80);B.open({popup:this.tooltipHelpDlg,x:!0===this._isRightToLeft||U?J-40:J+40,y:t.screenY-t.pageY+10,onCancel:n.hitch(this,function(){this.close()}),onExecute:function(){this.close()}});this.tooltipHelpDlg.domNode.parentNode&&f.set(this.tooltipHelpDlg.domNode.parentNode,"overflowY","hidden")},close:function(t,v){B.close(this.tooltipHelpDlg)}});b("extend-esri")&&
n.setObject("dijit.analysis.HelpWindow",m,x);return m})},"esri/dijit/BrowseItems":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/window dojo/_base/event dojo/dom-class dojo/dom-style dojo/dom-attr dojo/string dojo/on dojo/aspect dojo/has dojo/dom dojo/dom-construct dojo/mouse dojo/topic dojo/query dojo/parser dijit/registry dijit/TooltipDialog dijit/popup dojo/promise/all dojo/Deferred dgrid/Grid dgrid/extensions/Pagination dgrid/extensions/DijitRegistry dgrid/OnDemandGrid dgrid/Selection dgrid/selector dgrid/Keyboard dgrid/util/mouse dgrid/util/touch put-selector/put dojo/store/Observable dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin ../arcgis/Portal ../Evented ../PluginTarget dojo/i18n!../nls/jsapi ./_AppTemplateFiltersMixin ./_RefreshMixin ../kernel ../lang ../config ../geometry/webMercatorUtils ../tasks/GeometryService ../SpatialReference dojo/NodeList-dom".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D,G,A,t,v,C,J,L,S,U,aa,ea,ba,oa,da,fa,R,W,la,K,O,F,M,N,V,Y,ka){var ja=H(null,{idProperty:"id",constructor:function(Q){H.safeMixin(this,Q)},get:function(Q,ha){return fa.PortalUtil.request(this.portalUrl+"content/items/"+Q,ha).then(function(qa){return new fa.PortalItem(e.mixin(qa,{portal:this.portal}))})},getIdentity:function(Q){return Q[this.idProperty]},query:function(Q,ha){Q=e.isObject(Q)?Q:{q:Q};var qa=null;if(ha){Q=e.mixin(Q,{num:ha.count,start:(ha.start||
0)+1});if(ha.sort&&ha.sort.length){var ia=ha.sort[0];Q=e.mixin(Q,{sortField:encodeURIComponent("created"===ia.attribute?"uploaded":ia.attribute),sortOrder:ia.descending?"desc":"asc"})}ha.useExtent&&ha.extent&&(Q.bbox=ha.extent);ha.queryType&&"group"===ha.queryType&&(qa="group")}ha="group"===qa?this.portal.queryGroups(Q,!0).then(function(pa){pa.results.total=pa.total;return pa.results}):this.portal.queryItems(Q,!0).then(function(pa){pa.results.total=pa.total;return pa.results});return fa.PortalResult(ha)}});
n=H([ba,oa,da,W],{templateString:'\x3cdiv\x3e\x3cdiv class\x3d"top-bar"\x3e\x3cdiv  class\x3d"esriFloatLeading instructions"\x3e\x3cspan class\x3d"messageLeft hide" data-dojo-attach-point\x3d"messageNodeLeft"\x3e\x3c/span\x3e\x3cspan class\x3d"messageRight hide" data-dojo-attach-point\x3d"messageNodeRight"\x3e\x3c/span\x3e\x3ca tabIndex\x3d"-1" data-dojo-attach-point\x3d"helpLink" class\x3d"esriHelpIcon hide" title\x3d"${i18n.browseItems.learnMoreConfigurableApps}" href\x3d"#" target\x3d"_blank"\x3e\x3c/a\x3e\x3c/div\x3e\x3cdiv id\x3d"${id}_search"class\x3d"searchBar esriFloatTrailing"\x3e\x3cinput tabIndex\x3d"1" placeholder\x3d"${i18n.browseItems.searchTitle}" class\x3d"esriSearchBox dijitTextBox" type\x3d"search"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"gallery"\x3e\x3cdiv class\x3d"gallery-left  quiet-scroll"\x3e\x3cul class\x3d"filters"\x3e\x3c/ul\x3e\x3c/div\x3e\x3cdiv class\x3d"templates gallery-right"\x3e\x3cp id\x3d"${id}_filterTitle" class\x3d"filter-title hide" data-dojo-attach-point\x3d"filterDescription"\x3e\x3c/p\x3e\x3cdiv id\x3d"${id}_grid"class\x3d"dgrid-autoheight quiet-scroll"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv  class\x3d"loaderWrap" data-dojo-attach-point\x3d"loaderWrap"\x3e\x3c/div\x3e\x3cdiv  class\x3d"js-info-panel templateInfoPanel" data-dojo-attach-point\x3d"infoPanel"\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e',
galleryTemplate:"\x3cdiv style\x3d'opacity:1;' class\x3d'grid-item gallery-view'\x3e${item:_formatThumbnail}${item:_formatItemTitle}\x3cp class\x3d\"template-overlay\" style\x3d\"display:none;\"\x3e${i18n.browseItems.selectDetails}\x3c/p\x3e\x3c/div\x3e",infoPanelTemplate:'\x3cdiv\x3e\x3cdiv class\x3d"template-info-showing"\x3e\x3cdiv class\x3d"thumbnail"\x3e\x3cimg src\x3d"${item:_formatInfoPanelImage}"\x3e\x3c/div\x3e\x3ch4\x3e${item.title}\x3c/h4\x3e\x3cdiv class\x3d"template-info"\x3e\x3cp class\x3d"quiet-scroll"\x3e${item.snippet}\x3c/p\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"panel-actions"\x3e\x3cbutton class\x3d"btn blue btn-main" id\x3d"on-next"\x3e${i18n.browseItems.configure}\x3c/button\x3e\x3cbutton class\x3d"btn btn-cancel" id\x3d"close-panel"\x3e${i18n.common.close}\x3c/button\x3e\x3c/div\x3e\x3cdiv\x3e',
_popupTemplate:'\x3cdiv class\x3d"esriBrowsePopup quiet-scroll"\x3e\x3cp\x3e{summary}\x3c/p\x3e\x3c/div\x3e',showInfoPanel:!0,isAutoClose:!0,showTooltip:!1,filterWithinGroup:!0,checkIsButtonEnabled:!1,baseClass:"esriBrowseItemsCtr",i18n:la,postMixInProperties:function(){this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this.self?(this._portal=new fa.Portal({url:this.portalUrl,self:this.self}),this._init(),this._portal.on("load",e.hitch(this,function(){this.emit("portal-load",
{portal:this._portal});this._fetchData()}))):(this._portal=new fa.Portal(this.portalUrl),this._portal.signIn().then(e.hitch(this,function(){this.emit("portal-load",{portal:this._portal});this._init();this._fetchData()})))},_init:function(){this._canSearchPublic=this.self?this.self.canSearchPublic:this._portal.canSearchPublic;this.query=e.mixin(this.query||{},{get:function(Q){return this[Q]&&this[Q].length?"("+this[Q].join(" OR ")+") ":""},toString:function(){return{q:this.get("groups")+this.get("tags")+
this.get("persistentTypekeywords")+this.get("typekeywords")+this.get("types")+this.get("owners")+this.get("orgids")+this.get("custom")+(this.query||"")+(this.search||"")+' -type:"Attachment" -tags:"mature support"'}}});this.self?this.self.canSearchPublic=!0:this._portal.canSearchPublic=!0;this.galleryTemplate=this.plugIn&&this.plugIn.galleryTemplate||this.galleryTemplate;this.infoPanelTemplate=this.plugIn&&this.plugIn.infoPanelTemplate||this.infoPanelTemplate;if(this.helpLinkUrl=this.plugIn&&this.plugIn.helpLinkUrl||
"")a.set(this.helpLink,"href",this.helpLinkUrl),d.remove(this.helpLink,"hide");w(".templates",this.domNode).addClass("fade");w(".dgrid-footer",this.domNode).addClass("hide");c.set(this.infoPanel,"display","none")},destroy:function(){this.inherited(arguments);this._grid&&this._grid.destroy();this._img_connect&&(this._img_connect.remove(),this._img_connect_error.remove());this._queryTimer&&clearTimeout(this._queryTimer);this._grid=this._portal=null},closeInfoPanel:function(){f.byId("close-panel").click()},
_setItemQueryAttr:function(Q){this.itemQuery=Q},_setPluginAttr:function(Q){this.addPlugin(Q)},_setMessageAttr:function(Q){this.set("messageRight",Q)},_setMessageRightAttr:function(Q){"string"===typeof Q?a.set(this.messageNodeRight,"innerHTML",Q):Q instanceof HTMLElement&&l.place(Q,this.messageNodeRight);d.remove(this.messageNodeRight,"hide")},_setMessageLeftAttr:function(Q){"string"===typeof Q?a.set(this.messageNodeLeft,"innerHTML",Q):Q instanceof HTMLElement&&l.place(Q,this.messageNodeLeft);d.remove(this.messageNodeLeft,
"hide")},_setDisabledAttr:function(Q){var ha=B.findWidgets(this.domNode).concat(B.findWidgets(this._content));m.forEach(ha,function(qa){qa.set("disabled",Q)});d[Q?"add":"remove"](this._interval.domNode,"dijitTextBoxDisabled")},_setSortAttr:function(Q){this.sortAttribute=Q},_setSortDescendingAttr:function(Q){this.sortDescending=Q},_getSelectionAttr:function(){var Q=this._grid.selection,ha;for(ha in Q)if(Q.hasOwnProperty(ha))break;return ha&&this._grid.row(ha).data},_setGalleryTemplateAttr:function(Q){M.isDefined(Q)&&
(this.galleryTemplate=Q)},_setFormatThumbnailAttr:function(Q){M.isDefined(Q)&&"function"===typeof Q&&(this._formatThumbnail=Q)},_setFormatItemTitleAttr:function(Q){M.isDefined(Q)&&"function"===typeof Q&&(this._formatItemTitle=Q)},_setRowsPerPageAttr:function(Q){this._set("rowsPerPage",Q)},_setPagingLinksAttr:function(Q){this._set("pagingLinks",Q)},_getQueryAttr:function(){return this.query},_setQueryAttr:function(Q){this._set("query",Q);this._grid&&this._grid.set("query",Q.toString())},_setExtentAttr:function(Q){Q&&
this._set("extent",this._extentToString(Q))},_setUseExtentAttr:function(Q){this._set("useExtent",Q)},_setQueryTypeAttr:function(Q){this._set("queryType",Q)},_setFetchTimeoutAttr:function(Q){this._set("fetchTimeout",Q)},_setShowInfoPanelAttr:function(Q){this._set("showInfoPanel",Q)},_setSelectionModeAttr:function(Q){-1===m.indexOf(["extended","toggle","multiple","single","none"],Q)&&(console.log("Incorrect Value provided for selectionMode. It is one of the following: extended, toggle, multiple, single, none"),
Q="single");this._set("selectionMode",Q)},_setDemandListAttr:function(Q){this._set("demandList",Q)},_validate:function(){return!!this.get("selection")},reset:function(){w(".esriSearchBox",f.byId(this.id+"_search")).forEach(function(pa){a.set(pa,"value","")});this.query.search="";if(this.plugIn.filters){var Q=[],ha=[],qa=[],ia=[];w("li.active",this.domNode).forEach(function(pa){d.remove(pa,"active");var z=this.plugIn.filters[pa.childNodes[0].id];pa=m.map(z.tags,function(P){return'tags:"'+P+'"'},this);
var I=m.map(z.owners,function(P){return'owner:"'+P+'"'},this),T=m.map(z.orgids,function(P){return'orgid:"'+P+'"'},this);z=m.map(z.typekeywords,function(P){return'typekeywords:"'+P+'"'},this);Q.push(pa);qa.push(I);ia.push(T);ha.push(z)},this);this.query.tags=m.filter(this.query.tags,function(pa){return-1!==m.indexOf(Q,pa)});this.query.owners=m.filter(this.query.owners,function(pa){return-1!==m.indexOf(qa,pa)});this.query.orgids=m.filter(this.query.orgids,function(pa){return-1!==m.indexOf(ia,pa)});
this.query.typekeywords=m.filter(this.query.typekeywords,function(pa){return-1!==m.indexOf(ha,pa)});f.byId("all").click()}},_showPopup:function(Q){if(!this._isInsideTooltipDialog){this._closePopup();var ha=this._grid.row(Q);Q=w("img",ha.element)[0];if(ha={summary:ha.data.snippet},ha.summary)this._tooltip=new x({content:e.replace(this._popupTemplate,ha),onMouseEnter:e.hitch(this,function(){this._isInsideTooltipDialog=!0}),onMouseLeave:e.hitch(this,function(){this._isInsideTooltipDialog=!1;this._closePopup()})}),
E.open({className:"esriBrowsePopupCtr",popup:this._tooltip,around:Q,orient:["after-centered","before-centered"]}),this._onCloseConnect=w(".dijitDialogCloseIcon",this._tooltip.domNode).on("click",e.hitch(this,function(qa){qa.preventDefault();this._closePopup()}))}},_closePopup:function(){this._tooltip&&(this._onCloseConnect&&this._onCloseConnect.remove(),E.close(this._tooltip),this._tooltip.destroyRecursive(),this._tooltip=this._onCloseConnect=void 0)},_clearQueryTimeout:function(){clearTimeout(this._queryTimer);
this._queryTimer=null},_clearClosePanelTimeout:function(){clearTimeout(this._panelClosing);this._panelClosing=null;m.forEach(this._panelClickHandles,"item.remove();");l.empty(this.infoPanel)},_createGrid:function(){var Q=H([G,A,C,O,t]),ha=new ea(new ja({portal:this._portal})),qa=this.query,ia=e.hitch(this,function(I){I.snippet=I.snippet||"";var T=aa("div");I=b.substitute(this.galleryTemplate,{item:I,i18n:this.i18n},null,this);l.place(I,T);return T}),pa={};this.get("demandList")&&(Q=H([G,v,C,O,t]));
this.get("useExtent")&&(pa.extent=this.get("extent"),pa.useExtent=this.get("useExtent"));this.get("queryType")&&(pa.queryType=this.get("queryType"));var z={store:ha,query:qa.toString(),selectionMode:this.selectionMode||"single",pagingLinks:this.get("pagingLinks")||2,rowsPerPage:this.plugIn&&this.plugIn.rowsPerPage||this.get("itemsPerPage")||6,loadingMessage:"Loading items...",showLoadingMessage:!1,renderRow:ia,noDataMessage:this.i18n.gallery.noItemsToDisplay,deselectOnRefresh:!("multiple"===this.selectionMode||
"extended"===this.selectionMode||"toggle"===this.selectionMode),sort:[{attribute:this.sortAttribute||"title",descending:this.sortDescending||!1}],queryOptions:pa};this.get("demandList")&&(z={store:ha,query:qa.toString(),minRowsPerPage:this.plugIn&&this.plugIn.rowsPerPage||this.get("itemsPerPage")||50,selectionMode:this.selectionMode||"single",loadingMessage:"Loading items...",showLoadingMessage:!1,renderRow:ia,pagingMethod:"throttleDelayed",noDataMessage:this.i18n.gallery.noItemsToDisplay,deselectOnRefresh:!("multiple"===
this.selectionMode||"extended"===this.selectionMode||"toggle"===this.selectionMode),sort:[{attribute:this.sortAttribute||"title",descending:this.sortDescending||!1}],queryOptions:pa});this._grid=new Q(z,this.id+"_grid");this._grid.startup();this.own(h(this.domNode,"click",e.hitch(this,function(I){f.byId("close-panel")&&this.isAutoClose&&f.byId("close-panel").click()})),this._grid.on(S.enterRow,e.hitch(this,function(I){!1===d.contains(this.domNode,"showing")&&this.showInfoPanel&&this._showOverlay(!0,
I);this.showTooltip&&!this.showInfoPanel&&this._showPopup(I)})),this._grid.on(S.leaveRow,e.hitch(this,function(I){this._showOverlay(!1,I);this.showTooltip&&!this.showInfoPanel&&this._closePopup(I)})),this._grid.on(".dgrid-row:click",e.hitch(this,function(I){this.emit("grid-row-click",I);if(!1===d.contains(this.domNode,"showing")&&this.showInfoPanel){I.preventDefault();q.stop(I);this._clearClosePanelTimeout();var T=this.get("selection");this._showOverlay(!1,I);this.showInfoPanel&&this.infoPanelTemplate?
(c.set(this.infoPanel,"display","block"),l.place(b.substitute(this.infoPanelTemplate,{item:T,i18n:this.i18n},function(P){return M.isDefined(P)?P:""},this),this.infoPanel)):c.set(this.infoPanel,"display","none");this.emit("show-info-panel");d.add(this.domNode,"showing");this._panelClickHandles=[w(".template-info-showing .thumbnail img",this.domNode).on("error",e.hitch(this,function(P){a.set(P.target,"src",T.thumbnailUrl)})),w(".panel-actions .btn").on("click",e.hitch(this,function(P){P.preventDefault();
q.stop(P);this.checkIsButtonEnabled&&d.contains(P.target,"disabled")||("close-panel"===P.target.id?(d.remove(this.domNode,"showing"),c.set(this.infoPanel,"display","none"),this._panelClosing=setTimeout(e.hitch(this,function(){m.forEach(void 0,"item.remove();");l.empty(this.infoPanel)},250))):(r.publish("/esri/browseitems/close",P.target.id,this.get("selection")),P={selection:this.get("selection"),action:P.target.id},this.emit("browseitems-close",P)))})),w(".js-info-panel",this.domNode).on("click",
e.hitch(this,function(P){this.isAutoClose&&(P.preventDefault(),q.stop(P))})),h(w(".dgrid-footer,.dgrid-header",this._grid.domNode),p.leave,e.hitch(this,function(P){this.showTooltip&&!this.showInfoPanel&&this._closePopup()}))]}})),this._grid.on("dgrid-refresh-complete",e.hitch(this,function(I){w(".templates",this.domNode).removeClass("fade");w(".loaderWrap",this.domNode).addClass("hide");w(".dgrid-footer",this.domNode)[this._grid._total<=this._grid.rowsPerPage?"addClass":"removeClass"]("hide");this.showTooltip&&
!this.showInfoPanel&&this._closePopup()})),this._grid.on("refresh",e.hitch(this,function(){this.showTooltip&&!this.showInfoPanel&&this._closePopup();this._img_connect&&(this._img_connect.remove(),this._img_connect_error.remove(),this._img_connect_error=this._img_connect=null);this._img_connect=w(".grid-item-thumb",this._grid.domNode).on("load",e.hitch(this,function(I){(I=this._grid.row(I))&&I.element&&w(".grid-item",I.element).addClass("fadeIn").style("opacity","1")}));this._img_connect_error=w(".grid-item-thumb",
this._grid.domNode).on("error",e.hitch(this,function(I){a.set(I.target,"src",this._portal.staticImagesUrl+"/desktopapp.png")}))})),h(f.byId(this.id+"_search"),"keyup",e.hitch(this,function(I){I.preventDefault();this._clearQueryTimeout();this._queryTimer=setTimeout(e.hitch(this,function(){this.query.search=a.get(I.target,"value");this._fetchItems(this.query).then(e.hitch(this,function(){this._clearQueryTimeout()}))}),this.searchKeypressDelay||450)})),h(f.byId(this.id+"_search"),"search",e.hitch(this,
function(I){this._queryTimer||(I.preventDefault(),this.query.search=a.get(I.target,"value"),this._fetchItems(this.query))})),this.watch("extent",e.hitch(this,function(I,T,P){this._grid.queryOptions.extent=this.get("extent");this._grid.queryOptions.useExtent=this.get("useExtent");this._grid.query.bbox=this._grid.queryOptions.useExtent?this._grid.queryOptions.extent:"";this._grid.refresh()})),this.watch("useExtent",e.hitch(this,function(I,T,P){this._grid.queryOptions.extent=this.get("extent");this._grid.queryOptions.useExtent=
P;this._grid.query.bbox=this._grid.queryOptions.useExtent?this._grid.queryOptions.extent:"";this._grid.refresh()})));this.showInfoPanel||("single"===this._grid.selectionMode?this.own(this._grid.on("dgrid-select,dgrid-deselect",e.hitch(this,function(I){I={selection:this.get("selection")};this.emit("select-change",I)}))):-1!==m.indexOf(["toggle","multiple","extended"],this._grid.selectionMode)&&this.own(this._grid.on("dgrid-select,dgrid-deselect",e.hitch(this,function(I){I=I.grid.selection;var T,P=
[];for(T in I)I[T]&&P.push(this._grid.row(T).data);this.emit("select-change",{selection:P})}))));this.emit("grid-ready",{grid:this._grid,ready:!0})},_createFilters:function(){if(this.plugIn&&this.plugIn.filters){var Q=this.plugIn.filters,ha=this.plugIn.filterStrings,qa,ia=w(".filters",this.domNode)[0];for(qa in Q)l.create("li",{"class":"all"===qa?"active":"",innerHTML:"\x3ca id\x3d'"+qa+"'  href\x3d'#'\x3e"+ha[qa].title+"\x3c/a\x3e"},ia);this.own(h(ia,"li a:click",e.hitch(this,function(pa){pa.preventDefault();
var z=pa.target;w(".active",ia).removeClass("active");d.add(z.parentNode,"active");w(".templates",this.domNode).addClass("fade");setTimeout(e.hitch(this,function(){d["all"===z.id?"add":"remove"](this.filterDescription,"hide");a.set(this.filterDescription,"innerHTML",ha[z.id].description||"")}),225);pa=e.mixin({},Q[z.id]||{});this.query.tags=m.map(pa.tags||[],function(I){return'tags:"'+I+'"'});this.query.owners=m.map(pa.owners,function(I){return'owner:"'+I+'"'});this.query.orgids=m.map(pa.orgids,function(I){return'orgid:"'+
I+'"'});this.query.typekeywords=[].concat(m.map(pa.typekeywords||[],function(I){return'typekeywords:"'+I+'"'}));this.filterWithinGroup||(this.query.groups=m.map(pa.groups,function(I){return'group:"'+I+'"'}));this._fetchItems(this.query)})));d.add(this.domNode,"filters");d.remove(this.domNode,"nofilters")}else d.add(this.domNode,"nofilters"+(this.plugIn&&this.plugIn.extraClasses?" "+this.plugIn.extraClasses.join(" "):"")),d.remove(this.domNode,"filters")},_showOverlay:function(Q,ha){(ha=this._grid.row(ha))&&
w(".template-overlay",ha.element).style("display",Q?"":"none")},_fetchData:function(){this._user=this._portal.getPortalUser();return this.plugIn&&this.plugIn.fetchData?this.plugIn.fetchData():this._fetchItems(this.itemQuery)},_fetchItems:function(Q,ha){var qa={sort:[{attribute:this.sortAttribute||"title",descending:this.sortDescending||!1}]},ia=new D;this.get("useExtent")&&(qa.extent=this.get("extent"),qa.useExtent=this.get("useExtent"));this.get("queryType")&&(qa.queryType=this.get("queryType"));
w(".templates",this.domNode).addClass("fade");w(".dgrid-footer",this.domNode).addClass("hide");w(".loaderWrap",this.domNode).removeClass("hide");setTimeout(e.hitch(this,function(){this.query=e.mixin(this.query,Q);this._grid?this._grid.set("query",this.query.toString(),qa):(this._createFilters(),this._createGrid());ia.resolve(this._grid)}),60);return ia},_formatThumbnail:function(Q){var ha=Q.thumbnailUrl||this._portal.staticImagesUrl+"/desktopapp.png";Q.thumbnailUrl=ha;return"\x3cimg class\x3d'grid-item-thumb' width\x3d'187px' height\x3d'125px' alt\x3d'' src\x3d'"+
ha+"'\x3e"},_formatInfoPanelImage:function(Q){var ha=Q.screenshots&&Q.screenshots.length?Q.screenshots[0]:null;return ha?Q.itemUrl+"/info/"+ha:Q.thumbnailUrl},_formatItemTitle:function(Q){return"\x3ch5\x3e"+(Q.title||Q.name||"\x3cNo Title\x3e")+"\x3c/h5\x3e"},clear:function(){this._grid.clearSelection()},doProject:function(Q,ha){var qa=[102113,102100,3857],ia=new D;var pa=function(I,T){!(I&&0<I.length&&I[0]&&"extent"==I[0].type)||isNaN(I[0].xmin)||isNaN(I[0].ymin)||isNaN(I[0].xmax)||isNaN(I[0].ymax)?
I&&0<I.length&&I[0]&&"point"==I[0].type&&!isNaN(I[0].x)&&!isNaN(I[0].y)&&ia.resolve(I,T):ia.resolve(I,T)};if(null!=Q.spatialReference.wkid&&4326==Q.spatialReference.wkid&&null!=ha.wkid&&this.contains(qa,ha.wkid)){Q.ymin=Math.max(Q.ymin,-89.99);Q.ymax=Math.min(Q.ymax,89.99);Q=V.geographicToWebMercator(Q);if((qa=Q.spatialReference._getInfo())&&Q.xmin>Q.xmax){pa=qa.valid[1]-Q.xmin;var z=Q.xmax-qa.valid[0];pa>z?Q.xmax=qa.valid[1]+z:Q.xmin=qa.valid[0]-pa}Q.spatialReference.wkid=ha.wkid;ia.resolve([Q])}else null!=
Q.spatialReference.wkid&&this.contains(qa,Q.spatialReference.wkid)&&null!=ha.wkid&&4326==ha.wkid?(Q=V.webMercatorToGeographic(Q),(qa=Q.spatialReference._getInfo())&&Q.xmin>Q.xmax&&(pa=qa.valid[1]-Q.xmin,z=Q.xmax-qa.valid[0],pa>z?Q.xmax=qa.valid[1]+z:Q.xmin=qa.valid[0]-pa),ia.resolve([Q])):(this.geometryService||(this.geometryService=new Y(N.defaults.geometryService)),this.geometryService.project([Q],ha,pa));return ia},contains:function(Q,ha){for(var qa=Q.length;qa--;)if(Q[qa]===ha)return!0;return!1},
_extentToGCS:function(Q){Q=Q.shiftCentralMeridian(!0);return V.webMercatorToGeographic(Q)},_extentToString:function(Q){var ha="";null!=Q&&(Q=this._extentToGCS(Q),ha=this._roundValue(Q.xmin,1E4)+","+this._roundValue(Q.ymin,1E4)+","+this._roundValue(Q.xmax,1E4)+","+this._roundValue(Q.ymax,1E4));return ha},_roundValue:function(Q,ha){return Math.round(Q*ha)/ha}});k("extend-esri")&&e.setObject("dijit.BrowseItems",n,F);return n})},"dgrid/extensions/Pagination":function(){define("../_StoreMixin dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/_base/Deferred dojo/on dojo/query dojo/string dojo/has put-selector/put ../util/misc dojo/i18n!./nls/pagination dojo/_base/sniff xstyle/css!../css/extensions/Pagination.css".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k){function f(p){p.noDataNode?(h(p.noDataNode,"!"),delete p.noDataNode):p.cleanup();p.contentNode.innerHTML=""}function l(p){if(p.loadingNode)h(p.loadingNode,"!"),delete p.loadingNode;else if(p._oldPageNodes){for(var r in p._oldPageNodes)p.removeRow(p._oldPageNodes[r]);delete p._oldPageNodes;p._oldPageObserver&&(p._oldPageObserver.cancel(),p._numObservers--,delete p._oldPageObserver)}delete p._isLoading}return e("dgrid.extensions.Pagination",H,{rowsPerPage:10,pagingTextBox:!1,
previousNextArrows:!0,firstLastArrows:!1,pagingLinks:2,pageSizeOptions:null,showLoadingMessage:!0,i18nPagination:k,showFooter:!0,_currentPage:1,_total:0,buildRendering:function(){this.inherited(arguments);var p=this,r=this.paginationNode=h(this.footerNode,"div.dgrid-pagination"),w=this.paginationStatusNode=h(r,"div.dgrid-status"),u=this.i18nPagination;w.tabIndex=0;this._updatePaginationSizeSelect();this._updateRowsPerPageOption();w.innerHTML=a.substitute(u.status,{start:1,end:1,total:0});r=this.paginationNavigationNode=
h(r,"div.dgrid-navigation");this.firstLastArrows&&(w=this.paginationFirstNode=h(r,"span.dgrid-first.dgrid-page-link","\u00ab"),w.setAttribute("aria-label",u.gotoFirst),w.tabIndex=0);this.previousNextArrows&&(w=this.paginationPreviousNode=h(r,"span.dgrid-previous.dgrid-page-link","\u2039"),w.setAttribute("aria-label",u.gotoPrev),w.tabIndex=0);this.paginationLinksNode=h(r,"span.dgrid-pagination-links");this.previousNextArrows&&(w=this.paginationNextNode=h(r,"span.dgrid-next.dgrid-page-link","\u203a"),
w.setAttribute("aria-label",u.gotoNext),w.tabIndex=0);this.firstLastArrows&&(w=this.paginationLastNode=h(r,"span.dgrid-last.dgrid-page-link","\u00bb"),w.setAttribute("aria-label",u.gotoLast),w.tabIndex=0);this._listeners.push(d(r,".dgrid-page-link:click,.dgrid-page-link:keydown",function(B){if("keydown"!==B.type||13===B.keyCode)if(B=this.className,!(p._isLoading||-1<B.indexOf("dgrid-page-disabled"))){var x=p._currentPage;var E=Math.ceil(p._total/p.rowsPerPage);this===p.paginationPreviousNode?p.gotoPage(x-
1):this===p.paginationNextNode?p.gotoPage(x+1):this===p.paginationFirstNode?p.gotoPage(1):this===p.paginationLastNode?p.gotoPage(E):"dgrid-page-link"===B&&p.gotoPage(+this.innerHTML)}}))},destroy:function(){this.inherited(arguments);this._pagingTextBoxHandle&&this._pagingTextBoxHandle.remove()},_updatePaginationSizeSelect:function(){var p=this.pageSizeOptions,r=this.paginationSizeSelect;if(p&&p.length){if(!r){r=this.paginationSizeSelect=h(this.paginationNode,"select.dgrid-page-size[aria-label\x3d"+
this.i18nPagination.rowsPerPage+"]");var w=this._paginationSizeChangeHandle=d(r,"change",n.hitch(this,function(){this.set("rowsPerPage",+this.paginationSizeSelect.value)}));this._listeners.push(w)}for(w=r.options.length=0;w<p.length;w++)h(r,"option",p[w],{value:p[w],selected:this.rowsPerPage===p[w]});this._updateRowsPerPageOption()}else p&&p.length||!r||(h(r,"!"),this.paginationSizeSelect=null,this._paginationSizeChangeHandle.remove())},_setPageSizeOptions:function(p){this.pageSizeOptions=p&&p.sort(function(r,
w){return r-w});this._updatePaginationSizeSelect()},_updateRowsPerPageOption:function(){var p=this.rowsPerPage,r=this.pageSizeOptions,w=this.paginationSizeSelect;w&&(0>m.indexOf(r,p)?this._setPageSizeOptions(r.concat([p])):w.value=""+p)},_setRowsPerPage:function(p){this.rowsPerPage=p;this._updateRowsPerPageOption();this.gotoPage(1)},_updateNavigation:function(){function p(C,J){if(w.pagingTextBox&&C==x&&1<D)J=h(B,"input.dgrid-page-input[type\x3dtext][value\x3d$]",x),J.setAttribute("aria-label",u.jumpPage),
w._pagingTextBoxHandle=d(J,"change",function(){var S=+this.value;!isNaN(S)&&0<S&&S<=D&&w.gotoPage(+this.value)}),A&&"INPUT"===A.tagName&&J.focus();else{var L=C===x;J=h(B,"span"+(L?".dgrid-page-disabled":"")+".dgrid-page-link",C+(J?" ":""));J.setAttribute("aria-label",u.gotoPage);J.tabIndex=L?-1:0;t===C&&(L?C<D?t++:v.focus():J.focus());L||(v=J)}}function r(C,J){h(C,(J?".":"!")+"dgrid-page-disabled");C.tabIndex=J?-1:0}var w=this,u=this.i18nPagination,B=this.paginationLinksNode,x=this._currentPage,E=
this.pagingLinks,y=this.paginationNavigationNode,D=Math.ceil(this._total/this.rowsPerPage),G=this._pagingTextBoxHandle,A=document.activeElement,t,v;A&&g.contains(this.paginationNavigationNode,A)?"dgrid-page-link"===A.className&&(t=+A.innerHTML):A=null;G&&G.remove();B.innerHTML="";c(".dgrid-first, .dgrid-previous",y).forEach(function(C){r(C,1===x)});c(".dgrid-last, .dgrid-next",y).forEach(function(C){r(C,x>=D)});if(E&&0<D){p(1,!0);y=x-E;for(2<y?h(B,"span.dgrid-page-skip","..."):y=2;y<Math.min(x+E+
1,D);y++)p(y,!0);x+E+1<D&&h(B,"span.dgrid-page-skip","...");1<D&&p(D)}else w.pagingTextBox&&p(x);A&&-1===A.tabIndex&&(E=c("[tabindex\x3d'0']",this.paginationNavigationNode),A===this.paginationPreviousNode||A===this.paginationFirstNode?A=E[0]:E.length&&(A=E[E.length-1]),A&&A.focus())},refresh:function(){var p=this;this.inherited(arguments);if(this.store)return this.gotoPage(1).then(function(r){setTimeout(function(){d.emit(p.domNode,"dgrid-refresh-complete",{bubbles:!0,cancelable:!1,grid:p,results:r})},
0);return r});console.warn("Pagination requires a store to operate.")},_onNotification:function(p){p.length!==this._rowsOnPage&&this.gotoPage(this._currentPage)},renderArray:function(p,r){var w=this,u=this.inherited(arguments);this._lastCollection=null;r||(this._topLevelRequest&&this._topLevelRequest!==p&&(this._topLevelRequest.cancel(),delete this._topLevelRequest),"function"===typeof p.cancel&&(this._topLevelRequest=p),q.when(p,function(){w._topLevelRequest&&delete w._topLevelRequest}));return u},
insertRow:function(){var p=this._oldPageNodes,r=this.inherited(arguments);p&&r===p[r.id]&&delete p[r.id];return r},gotoPage:function(p){var r=this,w=new q;this._trackError(function(){var u=r.rowsPerPage,B=(p-1)*u,x=n.mixin(r.get("queryOptions"),{start:B,count:u}),E=r.contentNode,y;if(r.showLoadingMessage){f(r);var D=r.loadingNode=h(E,"div.dgrid-loading");D.innerHTML=r.loadingMessage}else{r._oldPageNodes=D={};E=E.children;var G=0;for(y=E.length;G<y;G++)D[E[G].id]=E[G];r._oldPageObserver=r.observers.pop()}r._isLoading=
!0;var A=r.store.query(r.query,x);q.when(r.renderArray(A,null,x),function(t){l(r);r.scrollTo({y:0});q.when(A.total,function(v){v||(r.noDataNode&&(h(r.noDataNode,"!"),delete r.noDataNode),r.noDataNode=h(r.contentNode,"div.dgrid-no-data"),r.noDataNode.innerHTML=r.noDataMessage);r.paginationStatusNode.innerHTML=a.substitute(r.i18nPagination.status,{start:Math.min(B+1,v),end:Math.min(v,B+u),total:v});r._total=v;r._currentPage=p;r._rowsOnPage=t.length;r._updateNavigation()});(7>b("ie")||b("ie")&&b("quirks"))&&
r.resize();w.resolve(A)},function(t){l(r);w.reject(t)});return w.promise})||w.reject();return w.promise}})})},"dgrid/extensions/DijitRegistry":function(){define(["dojo/_base/declare","dojo/dom-geometry","dijit/registry"],function(H,e,m){return H("dgrid.extensions.DijitRegistry",null,{minSize:0,maxSize:Infinity,layoutPriority:0,showTitle:!0,buildRendering:function(){m.add(this);this.inherited(arguments);this.domNode.setAttribute("widgetId",this.id)},startup:function(){if(!this._started){this.inherited(arguments);
var n=m.getEnclosingWidget(this.domNode.parentNode);n&&n.isLayoutContainer&&this._resizeHandle.remove()}},destroyRecursive:function(){this.destroy()},destroy:function(){this.inherited(arguments);m.remove(this.id)},getChildren:function(){return[]},isLeftToRight:function(){return!this.isRTL},resize:function(n){n&&e.setMarginBox(this.domNode,n);this.inherited(arguments)},_set:function(n,q){this[n]=q},watch:function(){},getParent:function(){return m.getEnclosingWidget(this.domNode.parentNode)}})})},"dgrid/selector":function(){define("dojo/_base/kernel dojo/_base/array dojo/_base/lang dojo/on dojo/aspect dojo/_base/sniff put-selector/put".split(" "),
function(H,e,m,n,q,d,c){m.getObject("dgrid.selector",!0);return dgrid.selector=function(a,b){function h(u){return!p.allowSelect(p.row(u))}function g(u){return function(B){var x=B.rows,E=x.length;B="false";var y;for(y=0;y<E;y++){var D=p.cell(x[y],a.id).element;D&&(D=(D.contents||D).input)&&!D.disabled&&(D.checked=u,D.setAttribute("aria-checked",u))}if("checkbox"==r.type){x=p.selection;E=!1;for(y in x)if(x[y]!=p.allSelected){E=!0;break}r.indeterminate=E;r.checked=p.allSelected;E?B="mixed":p.allSelected&&
(B="true");r.setAttribute("aria-checked",B)}}}function k(u){if("click"==u.type||32==u.keyCode||!d("opera")&&13==u.keyCode||0===u.keyCode){var B=p.row(u);p._selectionTriggerEvent=u;if(B){if(p.allowSelect(B)){var x=p._lastSelected&&p.row(p._lastSelected);"radio"==b?x&&x.id==B.id||(p.clearSelection(),p.select(B,null,!0),p._lastSelected=B.element):B&&(u.shiftKey?g(!0)({rows:[B]}):x=null,x=u.shiftKey?x:null,p.select(x||B,B,x?void 0:null),p._lastSelected=B.element)}}else c(this,(p.allSelected?"!":".")+
"dgrid-select-all"),p[p.allSelected?"clearSelection":"selectAll"]();p._selectionTriggerEvent=null}}function f(){p._hasSelectorInputListener=!0;l.push(p.on(".dgrid-selector:click,.dgrid-selector:keydown",k));var u=p._handleSelect;p._handleSelect=function(E){this.cell(E).column!=a&&u.apply(this,arguments)};if("function"==typeof a.disabled){var B=p.allowSelect,x=a.disabled;p.allowSelect=function(E){var y=B.call(this,E);return x===h?y:y&&!x.call(a,E.data)}}a.disabled=h;l.push(p.on("dgrid-select",g(!0)));
l.push(p.on("dgrid-deselect",g(!1)))}var l=[],p,r;a||(a={});a.type&&(a.selectorType=a.type,H.deprecated("columndef.type","use columndef.selectorType instead","dgrid 0.4"));a.selectorType=b=b||a.selectorType||"checkbox";a.sortable=!1;var w="function"==typeof b?b:function(u,B,x){var E=B.parentNode;p._hasSelectorInputListener||f();var y=a.disabled;c(E&&E.contents?E:B,".dgrid-selector");B=B.input||(B.input=c(B,"input[type\x3d"+b+"]",{tabIndex:isNaN(a.tabIndex)?-1:a.tabIndex,disabled:y&&("function"==typeof y?
y.call(a,x):y),checked:u}));B.setAttribute("aria-checked",!!u);return B};q.after(a,"init",function(){p=a.grid});q.after(a,"destroy",function(){e.forEach(l,function(u){u.remove()});p._hasSelectorInputListener=!1});a.renderCell=function(u,B,x,E,y){B=(B=u&&p.row(u))&&p.selection[B.id];w(B,x,u)};a.renderHeaderCell=function(u){var B="label"in a?a.label:a.field||"";"radio"!=b&&p.allowSelectAll?w(!1,u,{}):(u.appendChild(document.createTextNode(B)),p._hasSelectorInputListener||f());r=u.lastChild};return a}})},
"dgrid/Keyboard":function(){define("dojo/_base/declare dojo/aspect dojo/on dojo/_base/lang dojo/has put-selector/put ./util/misc dojo/_base/Deferred dojo/_base/sniff".split(" "),function(H,e,m,n,q,d,c,a){function b(A){A.preventDefault()}var h={checkbox:1,radio:1,button:1},g=/\bdgrid-cell\b/,k=/\bdgrid-row\b/,f=H("dgrid.Keyboard",null,{pageSkip:10,tabIndex:0,keyMap:null,headerKeyMap:null,postMixInProperties:function(){this.inherited(arguments);this.keyMap||(this.keyMap=n.mixin({},f.defaultKeyMap));
this.headerKeyMap||(this.headerKeyMap=n.mixin({},f.defaultHeaderKeyMap))},postCreate:function(){function A(C){var J=C.target;return J.type&&(!h[J.type]||32==C.keyCode)}function t(C){function J(){v._focusedHeaderNode&&(v._focusedHeaderNode.tabIndex=-1);if(v.showHeader){if(L)for(var ea=0,ba,oa=v.headerNode.getElementsByTagName("th");ba=oa[ea];++ea){if(S.test(ba.className)){v._focusedHeaderNode=aa=ba;break}}else v._focusedHeaderNode=aa=v.headerNode;aa&&(aa.tabIndex=v.tabIndex)}}var L=v.cellNavigation,
S=L?g:k,U=C===v.headerNode,aa=C;U?(J(),e.after(v,"renderHeader",J,!0)):e.after(v,"renderArray",function(ea){return a.when(ea,function(ba){var oa=v._focusedNode||aa;if(S.test(oa.className)&&c.contains(C,oa))return ba;for(var da=0,fa=C.getElementsByTagName("*"),R;R=fa[da];++da)if(S.test(R.className)){oa=v._focusedNode=R;break}oa.tabIndex=v.tabIndex;return ba})});v._listeners.push(m(C,"mousedown",function(ea){A(ea)||v._focusOnNode(ea.target,U,ea)}));v._listeners.push(m(C,"keydown",function(ea){if(!ea.metaKey&&
!ea.altKey){var ba=v[U?"headerKeyMap":"keyMap"][ea.keyCode];ba&&!A(ea)&&ba.call(v,ea)}}))}this.inherited(arguments);var v=this;this.tabableHeader&&(t(this.headerNode),this._listeners.push(m(this.headerNode,"dgrid-cellfocusin",function(){v.scrollTo({x:this.scrollLeft})})));t(this.contentNode);this._debouncedEnsureScroll=c.debounce(this._ensureScroll,this)},removeRow:function(A){if(!this._focusedNode)return this.inherited(arguments);var t=this,v=document.activeElement===this._focusedNode,C=this[this.cellNavigation?
"cell":"row"](this._focusedNode),J=C.row||C,L;A=A.element||A;A===J.element&&((L=this.down(J,!0))&&L.element!==A||(L=this.up(J,!0)),this._removedFocus={active:v,rowId:J.id,columnId:C.column&&C.column.id,siblingId:L&&L.element!==A?L.id:void 0},setTimeout(function(){t._removedFocus&&t._restoreFocus(J.id)},0),this._focusedNode=null);this.inherited(arguments)},insertRow:function(A){var t=this.inherited(arguments);this._removedFocus&&!this._removedFocus.wait&&this._restoreFocus(t);return t},_restoreFocus:function(A){var t=
this._removedFocus,v;if((A=(A=A&&this.row(A))&&A.element&&A.id===t.rowId?A:"undefined"!==typeof t.siblingId&&this.row(t.siblingId))&&A.element){if(!A.element.parentNode.parentNode){t.wait=!0;return}"undefined"!==typeof t.columnId&&(v=this.cell(A,t.columnId))&&v.element&&(A=v);t.active&&0!==A.element.offsetHeight?this._focusOnNode(A,!1,null):(d(A.element,".dgrid-focus"),A.element.tabIndex=this.tabIndex,this._focusedNode=A.element)}delete this._removedFocus},addKeyHandler:function(A,t,v){return e.after(this[v?
"headerKeyMap":"keyMap"],A,t,!0)},_ensureRowScroll:function(A){var t=this.getScrollPosition().y;t>A.offsetTop?this.scrollTo({y:A.offsetTop}):t+this.contentNode.offsetHeight<A.offsetTop+A.offsetHeight&&this.scrollTo({y:A.offsetTop-this.contentNode.offsetHeight+A.offsetHeight})},_ensureColumnScroll:function(A){var t=this.getScrollPosition().x,v=A.offsetLeft;if(t>v)this.scrollTo({x:v});else{var C=this.bodyNode.clientWidth;A=A.offsetWidth;var J=v+A;t+C<J&&this.scrollTo({x:C>A?J-C:v})}},_ensureScroll:function(A,
t){this.cellNavigation&&(this.columnSets||1<this.subRows.length)&&!t&&this._ensureRowScroll(A.row.element);this.bodyNode.clientWidth<this.contentNode.offsetWidth&&this._ensureColumnScroll(A.element)},_focusOnNode:function(A,t,v){var C="_focused"+(t?"Header":"")+"Node",J=this[C],L=this.cellNavigation?"cell":"row",S=this[L](A),U;if(A=S&&S.element){if(this.cellNavigation){var aa=A.getElementsByTagName("input");var ea=0;for(U=aa.length;ea<U;ea++){var ba=aa[ea];if((-1!=ba.tabIndex||"_dgridLastValue"in
ba)&&!ba.disabled){8>q("ie")&&(ba.style.position="relative");ba.focus();8>q("ie")&&(ba.style.position="");var oa=!0;break}}}null!==v&&(v=n.mixin({grid:this},v),v.type&&(v.parentType=v.type),v.bubbles||(v.bubbles=!0));J&&(d(J,"!dgrid-focus[!tabIndex]"),8>q("ie")&&(J.style.position=""),v&&(v[L]=this[L](J),m.emit(J,"dgrid-cellfocusout",v)));J=this[C]=A;v&&(v[L]=S);C=this.cellNavigation?g:k;!oa&&C.test(A.className)&&(8>q("ie")&&(A.style.position="relative"),A.tabIndex=this.tabIndex,A.focus());d(A,".dgrid-focus");
v&&m.emit(J,"dgrid-cellfocusin",v);this._debouncedEnsureScroll(S,t)}},focusHeader:function(A){this._focusOnNode(A||this._focusedHeaderNode,!0)},focus:function(A){(A=A||this._focusedNode)?this._focusOnNode(A,!1):this.contentNode.focus()}}),l=f.moveFocusVertical=function(A,t){if(this._focusOnNode&&A.target!==this.contentNode){var v=this.cellNavigation,C=this[v?"cell":"row"](A);C=v&&C.column.id;t=this.down(this._focusedNode,t,!0);v&&(t=this.cell(t,C));this._focusOnNode(t,!1,A);A.preventDefault()}};H=
f.moveFocusUp=function(A){l.call(this,A,-1)};var p=f.moveFocusDown=function(A){l.call(this,A,1)},r=f.moveFocusPageUp=function(A){l.call(this,A,-this.pageSkip)},w=f.moveFocusPageDown=function(A){l.call(this,A,this.pageSkip)},u=f.moveFocusHorizontal=function(A,t){if(this.cellNavigation&&A.target!==this.contentNode){var v=!this.row(A);this._focusOnNode(this.right(this["_focused"+(v?"Header":"")+"Node"],t),v,A);A.preventDefault()}},B=f.moveFocusLeft=function(A){u.call(this,A,-1)},x=f.moveFocusRight=function(A){u.call(this,
A,1)},E=f.moveHeaderFocusEnd=function(A,t){if(this.cellNavigation){var v=this.headerNode.getElementsByTagName("th");this._focusOnNode(v[t?0:v.length-1],!0,A)}A.preventDefault()},y=f.moveHeaderFocusHome=function(A){E.call(this,A,!0)},D=f.moveFocusEnd=function(A,t){var v=this,C=this.cellNavigation,J=this.contentNode,L=J.scrollTop+(t?0:J.scrollHeight);J=J[t?"firstChild":"lastChild"];var S=-1<J.className.indexOf("dgrid-preload"),U=S?J[(t?"next":"previous")+"Sibling"]:J,aa=U.offsetTop+(t?0:U.offsetHeight);
if(S){for(;U&&0>U.className.indexOf("dgrid-row");)U=U[(t?"next":"previous")+"Sibling"];if(!U)return}if(!S||1>J.offsetHeight)C&&(U=this.cell(U,this.cell(A).column.id)),this._focusOnNode(U,!1,A);else{q("dom-addeventlistener")||(A=n.mixin({},A));var ea=e.after(this,"renderArray",function(ba){ea.remove();return a.when(ba,function(oa){oa=oa[t?0:oa.length-1];C&&(oa=v.cell(oa,v.cell(A).column.id));v._focusOnNode(oa,!1,A)})})}L===aa&&A.preventDefault()},G=f.moveFocusHome=function(A){D.call(this,A,!0)};f.defaultKeyMap=
{32:b,33:r,34:w,35:D,36:G,37:B,38:H,39:x,40:p};f.defaultHeaderKeyMap={32:b,35:E,36:y,37:B,39:x};return f})},"dgrid/util/mouse":function(){define(["dojo/_base/lang","dojo/on","dojo/dom","dojo/query"],function(H,e,m){function n(d,c){return function(a,b){return e(a,d+":"+c,function(h){if(!m.isDescendant(h.relatedTarget,this))return b.call(this,h)})}}var q={enterRow:n(".dgrid-content .dgrid-row","mouseover"),enterCell:n(".dgrid-content .dgrid-cell","mouseover"),enterHeaderCell:n(".dgrid-header .dgrid-cell",
"mouseover"),leaveRow:n(".dgrid-content .dgrid-row","mouseout"),leaveCell:n(".dgrid-content .dgrid-cell","mouseout"),leaveHeaderCell:n(".dgrid-header .dgrid-cell","mouseout"),createDelegatingHandler:n};H.getObject("dgrid.util.mouse",!0);H.mixin(dgrid.util.mouse,q);return q})},"dgrid/util/touch":function(){define(["dojo/on","dojo/query"],function(H,e){function m(q,d,c,a){if(!(1<c.targetTouches.length)){var b=c.changedTouches[0],h=b.screenX,g=b.screenY;a&&c.preventDefault();var k=H(q,"touchend",function(f){var l=
f.changedTouches[0];f.targetTouches.length||(Math.abs(l.screenX-h)<n.tapRadius&&Math.abs(l.screenY-g)<n.tapRadius&&(a&&f.preventDefault(),d.call(this,f)),k.remove())})}}var n={tapRadius:10,dbltapTime:250,selector:function(q,d,c){return function(a,b){var h=d.bubble;h?d=h:!1!==c&&(c=!0);return H(a,d,function(g){var k=g.target;3==k.nodeType&&(k=k.parentNode);for(;!e.matches(k,q,a);)if(k==a||!c||!(k=k.parentNode))return;return b.call(k,g)})}},countCurrentTouches:function(q,d){if(!("touches"in q))return-1;
var c,a,b;for(a=c=0;b=q.touches[c];++c)d.contains(b.target)&&++a;return a},tap:function(q,d){return H(q,"touchstart",function(c){m(q,d,c)})},dbltap:function(q,d){var c,a;return H(q,"touchstart",function(b){c?m(q,function(h){if(c){var g=h.changedTouches[0];Math.abs(g.screenX-c.screenX)<n.tapRadius&&Math.abs(g.screenY-c.screenY)<n.tapRadius&&(a&&clearTimeout(a),c=a=null,d.call(this,h))}},b,!0):m(q,function(h){c=h.changedTouches[0];a=setTimeout(function(){c=a=null},n.dbltapTime)},b)})}};return n})},
"esri/dijit/_AppTemplateFiltersMixin":function(){define(["dojo/_base/declare"],function(){return{rootNodes:{app:{all:{},narrate:{typekeywords:["story"]},collect:{typekeywords:["collect"]},compare:{typekeywords:["compare"]},"3dscene":{typekeywords:["3Dscene"]},analyze:{typekeywords:["summarize"]},present:{typekeywords:["gallery"]},social:{typekeywords:["social"]},local:{typekeywords:["local"]},route:{typekeywords:["route"]},showcase:{typekeywords:["showcase"]}}}}})},"esri/dijit/_RefreshMixin":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/on dojo/has ../kernel".split(" "),
function(H,e,m,n,q,d){function c(a){"object"!==typeof a&&(a=Error(a));a.grid=this;n.emit(this.domNode,"dgrid-error",{grid:this,error:a,cancelable:!0,bubbles:!0})&&console.error(a)}H=H(null,{_trackError:function(a){"string"===typeof a&&(a=e.hitch(this,a));try{var b=a()}catch(h){c.call(this,h)}return m.when(b,e.hitch(this,function(){n.emit(this.domNode,"refresh",{cancelable:!0,bubbles:!0})}),e.hitch(this,c))}});q("extend-esri")&&e.setObject("dijit._RefreshMixin",H,d);return H})},"esri/dijit/analysis/PluginAnalysisLayers":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/promise/all dojo/has ../../kernel dojo/i18n!../../nls/jsapi".split(" "),
function(H,e,m,n,q,d,c){var a=H(null,{filters:{all:{},categoryBoundaries:{tags:["boundaries","places"]},subCategoryBoundaries:{tags:["boundaries"]},subCategoryPlaces:{tags:["places"]},categoryHexBins:{tags:["hex"]},categoryTransportation:{tags:["transportation"]}},constructor:function(b){e.mixin(this,b);this.i18n=e.mixin({},c.browseLayersDlg);this.filterStrings={all:{title:this.i18n.categoryAll},categoryBoundaries:{title:this.i18n.categoryBoundaries},subCategoryBoundaries:{title:"\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;"+
this.i18n.subCategoryBoundaries},subCategoryPlaces:{title:"\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;"+this.i18n.subCategoryPlaces},categoryHexBins:{title:this.i18n.categoryHexBins},categoryTransportation:{title:this.i18n.categoryTransportation}}},fetchData:function(){this._portal=this.parent._portal;var b;return this._fetchGroups().then(e.hitch(this,function(h){b=m.map(h||[],function(g){if(g)return'group:"'+g.id+'"'});return this._fetchGroupItems(b)}))},_fetchGroup:function(b,h){this._groups=this._groups||
[];return this._groups[b]||this._portal.queryGroups(h,!0).then(e.hitch(this,function(g){0<g.total&&g.results&&(this._groups[b]=g.results);return this._groups[b]||[]}))},_fetchGroupItems:function(b,h){var g=this._isCustom?['-typekeywords:"Multilayer"']:['typekeywords:"Analysis Ready"'];this._portal&&this._portal.user&&this._portal.user.demographics||g.push('-typekeywords:"Requires Credits"');return this.parent._fetchItems({groups:b,query:h,types:['type:"Map Service"','type:"Feature Service"'],typekeywords:g})},
_fetchGroups:function(){return this._fetchEsriAnalysisLayers()},_fetchEsriAnalysisLayers:function(){if(this._portal&&this._portal.analysisLayersGroupQuery){var b=this._portal.analysisLayersGroupQuery;this._isCustomAnalysisQuery()&&(this.filterStrings=this.filters=null)}return this._fetchGroup("esriAnalysisLayers",{q:b,num:100,start:0}).then(e.hitch(this,function(h){h&&0<h.length&&(this.parent.sortAttribute=h[0].sortField,this.parent.sortDescending="asc"!==h[0].sortOrder);return h}))},_isCustomAnalysisQuery:function(){var b=
'title:"Living Atlas Analysis Layers" AND owner:esri',h=!1;this._portal&&this._portal.isPortal&&(b='title:"Living Atlas Analysis Layers" AND owner:esri_livingatlas');this._portal&&this._portal.analysisLayersGroupQuery&&this._portal.analysisLayersGroupQuery!==b&&(h=!0);return this._isCustom=h}});e.mixin(a,{add:function(b,h){b.plugIn||(h=h||{},h.parent=b,b.plugIn=new a(h))},remove:function(b){b.plugIn&&(b.plugIn.destroy(),delete b.plugIn)}});q("extend-esri")&&e.setObject("dijit.analysis.PluginAnalysisLayers",
a,d);return a})},"esri/tasks/Geoprocessor":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/Deferred dojo/_base/json dojo/has dojo/io-query ../kernel ../request ../deferredUtils ../geometry/normalizeUtils ./Task ./FeatureSet ./JobInfo ./GPMessage ./LinearUnit ./DataFile ./RasterData ./Date ./ParameterValue ./GPResultImageLayer ../layers/ArcGISDynamicMapServiceLayer ../layers/MapImage".split(" "),function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D){H=H(k,{declaredClass:"esri.tasks.Geoprocessor",
_eventMap:{"execute-complete":["results","messages"],"get-result-data-complete":["result"],"get-result-image-complete":["mapImage"],"get-result-image-layer-complete":["layer"],"job-cancel":["jobInfo"],"job-complete":["jobInfo"],"status-update":["jobInfo"]},constructor:function(G){this._jobUpdateHandler=e.hitch(this,this._jobUpdateHandler);this._getJobStatus=e.hitch(this,this._getJobStatus);this._getResultDataHandler=e.hitch(this,this._getResultDataHandler);this._getResultImageHandler=e.hitch(this,
this._getResultImageHandler);this._executeHandler=e.hitch(this,this._executeHandler);this._updateTimers=[];this.registerConnectEvents()},updateDelay:1E3,processSpatialReference:null,outputSpatialReference:null,outSpatialReference:null,setUpdateDelay:function(G){this.updateDelay=G},setProcessSpatialReference:function(G){this.processSpatialReference=G},setOutputSpatialReference:function(G){this._setOutSR(G)},setOutSpatialReference:function(G){this._setOutSR(G)},__msigns:[{n:"execute",c:3,a:[{i:0,p:["*"]}],
e:2,f:1},{n:"submitJob",c:4,a:[{i:0,p:["*"]}],e:3}],_setOutSR:function(G){this.outSpatialReference=this.outputSpatialReference=G},_getOutSR:function(){return this.outSpatialReference||this.outputSpatialReference},_gpEncode:function(G,A,t){for(var v in G){var C=G[v];e.isArray(C)?G[v]=q.toJson(m.map(C,function(J){return this._gpEncode({item:J},!0).item},this)):C instanceof Date&&(G[v]=C.getTime())}return this._encode(G,A,t)},_decode:function(G){var A=G.dataType,t=new x(G);if(-1!==m.indexOf(["GPBoolean",
"GPDouble","GPLong","GPString"],A))return t;if("GPLinearUnit"===A)t.value=new r(t.value);else if("GPFeatureRecordSetLayer"===A||"GPRecordSet"===A)t.value=new f(t.value);else if("GPDataFile"===A)t.value=new w(t.value);else if("GPDate"===A)G=t.value,e.isString(G)?t.value=new B({date:G}):t.value=new Date(G);else if("GPRasterData"===A||"GPRasterDataLayer"===A)G=G.value.mapImage,t.value=G?new D(G):new u(t.value);else if(-1!==A.indexOf("GPMultiValue:")){var v=A.split(":")[1];G=t.value;t.value=m.map(G,function(C){return this._decode({paramName:"_name",
dataType:v,value:C}).value},this)}else console.log(this.declaredClass+" : GP Data type not handled. : "+t.dataType),t=null;return t},submitJob:function(G,A,t,v,C){var J=this._getOutSR(),L=C.assembly;G=this._gpEncode(e.mixin({},this._url.query,{f:"json","env:outSR":J?J.wkid||q.toJson(J.toJson()):null,"env:processSR":this.processSpatialReference?this.processSpatialReference.wkid||q.toJson(this.processSpatialReference.toJson()):null},G),null,L&&L[0]);var S=this._jobUpdateHandler,U=this._errorHandler;
return b({url:this._url.path+"/submitJob",content:G,callbackParamName:"callback",load:function(aa,ea){S(aa,ea,!1,A,t,C.dfd)},error:function(aa){U(aa,v,C.dfd)}})},_jobUpdateHandler:function(G,A,t,v,C,J){var L=G.jobId;A=new l(G);this._successHandler([A],"onStatusUpdate",C,t&&J);if(!t)switch(clearTimeout(this._updateTimers[L]),this._updateTimers[L]=null,J&&J.progress(A),G.jobStatus){case l.STATUS_SUBMITTED:case l.STATUS_EXECUTING:case l.STATUS_WAITING:case l.STATUS_NEW:var S=this._getJobStatus;this._updateTimers[L]=
setTimeout(function(){S(L,t,v,C,J)},this.updateDelay);break;default:this._successHandler([A],"onJobComplete",v,J)}},_getJobStatus:function(G,A,t,v,C){var J=this._jobUpdateHandler;b({url:this._url.path+"/jobs/"+G,content:e.mixin({},this._url.query,{f:"json"}),callbackParamName:"callback",load:function(L,S){J(L,S,A,t,v,C)},error:this._errorHandler})},_getResultDataHandler:function(G,A,t,v,C){try{var J=this._decode(G);this._successHandler([J],"onGetResultDataComplete",t,C)}catch(L){this._errorHandler(L,
v,C)}},getResultData:function(G,A,t,v){var C=this._getResultDataHandler,J=this._errorHandler,L=new n(h._dfdCanceller);L._pendingDfd=b({url:this._url.path+"/jobs/"+G+"/results/"+A,content:e.mixin({},this._url.query,{f:"json",returnType:"data"}),callbackParamName:"callback",load:function(S,U){C(S,U,t,v,L)},error:function(S){J(S,v,L)}});return L},checkJobStatus:function(G,A,t){var v=this._jobUpdateHandler,C=this._errorHandler,J=new n(h._dfdCanceller);J._pendingDfd=b({url:this._url.path+"/jobs/"+G,content:e.mixin({},
this._url.query,{f:"json"}),callbackParamName:"callback",load:function(L,S){v(L,S,!0,null,A,J)},error:function(L){C(L,t,J)}});return J},cancelJob:function(G,A,t){var v=this._errorHandler,C=new n(h._dfdCanceller);C._pendingDfd=b({url:this._url.path+"/jobs/"+G+"/cancel",content:e.mixin({},this._url.query,{f:"json"}),callbackParamName:"callback",load:e.hitch(this,function(J,L){this._successHandler([J],"onJobCancel",A,C)}),error:function(J){v(J,t,C)}});return C},execute:function(G,A,t,v){var C=this._getOutSR(),
J=v.assembly;G=this._gpEncode(e.mixin({},this._url.query,{f:"json","env:outSR":C?C.wkid||q.toJson(C.toJson()):null,"env:processSR":this.processSpatialReference?this.processSpatialReference.wkid||q.toJson(this.processSpatialReference.toJson()):null},G),null,J&&J[0]);var L=this._executeHandler,S=this._errorHandler;return b({url:this._url.path+"/execute",content:G,callbackParamName:"callback",load:function(U,aa){L(U,aa,A,t,v.dfd)},error:function(U){S(U,t,v.dfd)}})},_executeHandler:function(G,A,t,v,C){try{var J=
G.results,L,S=G.messages;var U=0;for(L=J.length;U<L;U++)J[U]=this._decode(J[U]);U=0;for(L=S.length;U<L;U++)S[U]=new p(S[U]);this._successHandler([J,S],"onExecuteComplete",t,C)}catch(aa){this._errorHandler(aa,v,C)}},_getResultImageHandler:function(G,A,t,v,C){try{var J=this._decode(G);this._successHandler([J],"onGetResultImageComplete",t,C)}catch(L){this._errorHandler(L,v,C)}},getResultImage:function(G,A,t,v,C){var J=this._getResultImageHandler,L=this._errorHandler;t=this._gpEncode(e.mixin({},this._url.query,
{f:"json"},t.toJson()));var S=new n(h._dfdCanceller);S._pendingDfd=b({url:this._url.path+"/jobs/"+G+"/results/"+A,content:t,callbackParamName:"callback",load:function(U,aa){J(U,aa,v,C,S)},error:function(U){L(U,C,S)}});return S},cancelJobStatusUpdates:function(G){clearTimeout(this._updateTimers[G]);this._updateTimers[G]=null},getResultImageLayer:function(G,A,t,v){if(null==A){var C=this._url.path.indexOf("/GPServer/");G=this._url.path.substring(0,C)+"/MapServer/jobs/"+G}else G=this._url.path+"/jobs/"+
G+"/results/"+A;this._url.query&&(G+="?"+c.objectToQuery(this._url.query));A=null==A?new y(G,{imageParameters:t}):new E(G,{imageParameters:t},!0);this.onGetResultImageLayerComplete(A);v&&v(A);return A},onStatusUpdate:function(){},onJobComplete:function(){},onExecuteComplete:function(){},onGetResultDataComplete:function(){},onGetResultImageComplete:function(){},onGetResultImageLayerComplete:function(){},onJobCancel:function(){}});g._createWrappers(H);d("extend-esri")&&e.setObject("tasks.Geoprocessor",
H,a);return H})},"esri/tasks/JobInfo":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","./GPMessage"],function(H,e,m,n,q){H=H(null,{declaredClass:"esri.tasks.JobInfo",constructor:function(d){this.messages=[];e.mixin(this,d);d=this.messages;var c,a=d.length;for(c=0;c<a;c++)d[c]=new q(d[c])},jobId:"",jobStatus:""});e.mixin(H,{STATUS_CANCELLED:"esriJobCancelled",STATUS_CANCELLING:"esriJobCancelling",STATUS_DELETED:"esriJobDeleted",STATUS_DELETING:"esriJobDeleting",STATUS_EXECUTING:"esriJobExecuting",
STATUS_FAILED:"esriJobFailed",STATUS_NEW:"esriJobNew",STATUS_SUBMITTED:"esriJobSubmitted",STATUS_SUCCEEDED:"esriJobSucceeded",STATUS_TIMED_OUT:"esriJobTimedOut",STATUS_WAITING:"esriJobWaiting"});m("extend-esri")&&e.setObject("tasks.JobInfo",H,n);return H})},"esri/tasks/GPMessage":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(H,e,m,n){H=H(null,{declaredClass:"esri.tasks.GPMessage",constructor:function(q){e.mixin(this,q)}});e.mixin(H,{TYPE_INFORMATIVE:"esriJobMessageTypeInformative",
TYPE_PROCESS_DEFINITION:"esriJobMessageTypeProcessDefinition",TYPE_PROCESS_START:"esriJobMessageTypeProcessStart",TYPE_PROCESS_STOP:"esriJobMessageTypeProcessStop",TYPE_WARNING:"esriJobMessageTypeWarning",TYPE_ERROR:"esriJobMessageTypeError",TYPE_EMPTY:"esriJobMessageTypeEmpty",TYPE_ABORT:"esriJobMessageTypeAbort"});m("extend-esri")&&e.setObject("tasks.GPMessage",H,n);return H})},"esri/tasks/DataFile":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(H,e,m,
n){H=H(null,{declaredClass:"esri.tasks.DataFile",constructor:function(q){q&&e.mixin(this,q)},url:null,itemID:null,toJson:function(){var q={};this.url&&(q.url=this.url);this.itemID&&(q.itemID=this.itemID);return q}});m("extend-esri")&&e.setObject("tasks.DataFile",H,n);return H})},"esri/tasks/RasterData":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(H,e,m,n){H=H(null,{declaredClass:"esri.tasks.RasterData",constructor:function(q){q&&e.mixin(this,q)},url:null,
format:null,itemID:null,toJson:function(){var q={};this.url&&(q.url=this.url);this.format&&(q.format=this.format);this.itemID&&(q.itemID=this.itemID);return q}});m("extend-esri")&&e.setObject("tasks.RasterData",H,n);return H})},"esri/tasks/Date":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/date/locale","dojo/has","../kernel"],function(H,e,m,n,q){H=H(null,{declaredClass:"esri.tasks.Date",constructor:function(d){d&&(d.format&&(this.format=d.format),this.date=m.parse(d.date,{selector:"date",
datePattern:this.format}))},date:new Date,format:"EEE MMM dd HH:mm:ss zzz yyyy",toJson:function(){return{date:m.format(this.date,{selector:"date",datePattern:this.format}),format:this.format}}});n("extend-esri")&&e.setObject("tasks.Date",H,q);return H})},"esri/tasks/ParameterValue":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(H,e,m,n){H=H(null,{declaredClass:"esri.tasks.ParameterValue",constructor:function(q){e.mixin(this,q)}});m("extend-esri")&&e.setObject("tasks.ParameterValue",
H,n);return H})},"esri/tasks/GPResultImageLayer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/json dojo/has dojo/io-query ../kernel ../layers/ArcGISDynamicMapServiceLayer".split(" "),function(H,e,m,n,q,d,c){H=H(c,{declaredClass:"esri.tasks._GPResultImageLayer",constructor:function(a,b){b&&b.imageParameters&&b.imageParameters.extent&&(this.initialExtent=this.fullExtent=b.imageParameters.extent,this.spatialReference=this.initialExtent.spatialReference);this.getImageUrl=e.hitch(this,
this.getImageUrl);this.loaded=!0;this.onLoad(this)},getImageUrl:function(a,b,h,g){var k=a.spatialReference.wkid;g(this._url.path+"?"+q.objectToQuery(e.mixin(this._params,{f:"image",bbox:m.toJson(a.toJson()),bboxSR:k,imageSR:k,size:b+","+h})))}});n("extend-esri")&&e.setObject("tasks._GPResultImageLayer",H,d);return H})},"esri/dijit/SingleFilter":function(){define("require dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/json dojo/has dojo/json dojo/string dojo/number dojo/dom dojo/dom-style dojo/dom-attr dojo/dom-construct dojo/query dojo/dom-class dojo/_base/event dojo/Evented dojo/data/ItemFileWriteStore dojo/date/locale dojo/parser dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dijit/_OnDijitClickMixin dijit/_FocusMixin dijit/registry dijit/form/TextBox dijit/form/FilteringSelect dijit/form/RadioButton dijit/form/DateTextBox dijit/form/NumberTextBox ../config ../kernel ../lang ../tasks/GenerateRendererTask ../tasks/UniqueValueDefinition ../tasks/GenerateRendererParameters ../layers/FeatureLayer ../layers/GeoRSSLayer ./analysis/ItemTypes dojo/i18n!../nls/jsapi dojo/text!./templates/SingleFilter.html".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D,G,A,t,v,C,J,L,S,U,aa,ea,ba,oa,da,fa,R,W,la,K,O){H=e([y,D,G,A,t,u],{declaredClass:"esri.dijit.SingleFilter",widgetsInTemplate:!0,templateString:O,valueHandlers:[],onFieldChangeEnabled:!0,onOperatorChangeEnabled:!0,onPromptChangeHandler:null,onHintChangeHandler:null,fieldDomains:{},fieldsStore:null,fieldsInfo:{stringFieldsCount:0,numberFieldsCount:0,dateFieldsCount:0},stringOperatorStore:null,dateOperatorStore:null,numberOperatorStore:null,uniqueValuesStore:null,
isEnableInteractiveFilter:!0,uniqueValuesResults:{},partsObj:null,dayInMS:86399E3,allowAllDateTypes:!1,showUnique:!0,postMixInProperties:function(){this.inherited(arguments);this.i18n={};this.i18n=m.mixin(this.i18n,K.filterDlg)},parseExpressionTemplate:function(){var F=function(qa,ia){g.byId(ia).className="attributeValueContainer";"field_dropdown"===qa?g.byId(ia).innerHTML=M:"operator_dropdown"===qa?g.byId(ia).innerHTML=N:"values_input"===qa?g.byId(ia).innerHTML=V+Y:console.error("problem with expressionTemplate from localization file")},
M='\x3cselect id\x3d"'+this.id+'.fieldsList" class\x3d"attributeField" data-dojo-type\x3d"dijit/form/FilteringSelect" maxHeight\x3d"150" sortByLabel\x3d"true"\x3e\x3c/select\x3e',N='\x3cselect id\x3d"'+this.id+'.operatorList" class\x3d"operator" data-dojo-type\x3d"dijit/form/FilteringSelect" maxHeight\x3d"150" sortByLabel\x3d"false"\x3e\x3c/select\x3e',V='\x3cdiv id\x3d"'+this.id+'.attributeValueContainer"\x3e\x3c/div\x3e',Y='\x3cdiv class\x3d"attributeValueOptions"\x3e\x3ctable cellpadding\x3d"0" cellspacing\x3d"0"\x3e  \x3ctbody\x3e    \x3ctr\x3e      \x3ctd nowrap\x3d"nowrap"\x3e        \x3cinput id\x3d"'+
this.id+'.radioValue" class\x3d"radioValue attributeValueRadio" checked\x3d"checked" name\x3d"'+this.id+'.inputOption" data-dojo-type\x3d"dijit/form/RadioButton" title\x3d"'+this.i18n.valueTooltip+'"/\x3e        \x3clabel class\x3d"labels" title\x3d"'+this.i18n.valueTooltip+'"\x3e'+this.i18n.value+'        \x3c/label\x3e      \x3c/td\x3e      \x3ctd nowrap\x3d"nowrap" class\x3d"esriLeadingPadding05"\x3e        \x3cinput id\x3d"'+this.id+'.radioFields" class\x3d"radioFields attributeValueRadio" name\x3d"'+
this.id+'.inputOption" data-dojo-type\x3d"dijit/form/RadioButton" title\x3d"'+this.i18n.fieldTooltip+'"/\x3e        \x3clabel class\x3d"labels" title\x3d"'+this.i18n.fieldTooltip+'"\x3e'+this.i18n.field+'        \x3c/label\x3e      \x3c/td\x3e      \x3ctd id\x3d"'+this.id+'.radioUniqueColumn" nowrap\x3d"nowrap" class\x3d"esriLeadingPadding05"\x3e        \x3cinput id\x3d"'+this.id+'.radioUnique" class\x3d"radioUnique attributeValueRadio" name\x3d"'+this.id+'.inputOption" data-dojo-type\x3d"dijit/form/RadioButton" title\x3d"'+
this.i18n.uniqueValueTooltip+'"/\x3e        \x3clabel class\x3d"labels" title\x3d"'+this.i18n.uniqueValueTooltip+'"\x3e'+this.i18n.uniqueValues+"        \x3c/label\x3e      \x3c/td\x3e    \x3c/tr\x3e  \x3c/tbody\x3e\x3c/table\x3e\x3c/div\x3e",ka=this.i18n.expressionTemplate,ja=ka.indexOf("${"),Q=ka.substring(0,ja).trim();g.byId(this.id+".column1").innerHTML=Q.length?"\x3cdiv class\x3d'attributeText'\x3e"+Q+"\x3c/div\x3e":"";Q=ka.indexOf("}",ja+1);var ha=ka.substring(ja+2,Q);F(ha,this.id+".column2");
ja=ka.indexOf("${",ja+1);Q=ka.substring(Q+1,ja).trim();g.byId(this.id+".column3").innerHTML=Q.length?"\x3cdiv class\x3d'attributeText'\x3e"+Q+"\x3c/div\x3e":"";Q=ka.indexOf("}",ja+1);ha=ka.substring(ja+2,Q);F(ha,this.id+".column4");ja=ka.indexOf("${",ja+1);Q=ka.substring(Q+1,ja).trim();g.byId(this.id+".column5").innerHTML=Q.length?"\x3cdiv class\x3d'attributeText'\x3e"+Q+"\x3c/div\x3e":"";Q=ka.indexOf("}",ja+1);ha=ka.substring(ja+2,Q);F(ha,this.id+".column6");Q=ka.substring(Q+1,ka.length).trim();
g.byId(this.id+".column7").innerHTML=Q.length?"\x3cdiv class\x3d'attributeText'\x3e"+Q+"\x3c/div\x3e":""},postCreate:function(){this.inherited(arguments);this.parseExpressionTemplate();this.createOperatorStores();this.createFieldsStore(this.fields);this.readCodedValues();E.parse(g.byId(this.id+".exprTable")).then(m.hitch(this,function(F){q.connect(this.getFieldsList(),"onChange",this,"onChangeField");q.connect(this.getOperatorList(),"onChange",this,"onChangeOperator");q.connect(v.byId(this.id+".radioValue"),
"onClick",this,"showValueInput");q.connect(v.byId(this.id+".radioFields"),"onClick",this,"showFields");q.connect(v.byId(this.id+".radioUnique"),"onClick",this,"showUniqueList");this.version&&10.1>this.version&&this.mapLayer.url&&this.showUnique&&k.set(g.byId(this.id+".radioUniqueColumn"),"display","none");q.connect(g.byId(this.id+".deleteExpression"),"onclick",this,"onClickDeleteExpression");q.connect(this.interactiveCheck,"onclick",this,"onInteractiveClick");q.connect(this.interactiveArrow,"onclick",
this,"onClickShowHideInteractive");this.enableInteractiveHandlers();this.isEnableInteractiveFilter||k.set(this._interactiveFilterRow,"display","none");k.set(g.byId(this.id+".radioUniqueColumn"),"display",this.showUnique?"block":"none");this.own(this.watch("showUnique",m.hitch(this,function(M,N,V){k.set(g.byId(this.id+".radioUniqueColumn"),"display",V?"block":"none")})))}))},constructor:function(F,M){this.id=F.id||"";this.owner=F.owner;this.version=F.version;this.part=F.part;this.fields=F.fields;this.mapLayer=
F.mapLayer;!1===F.enableEvents&&(this.onOperatorChangeEnabled=this.onFieldChangeEnabled=!1)},init:function(F){if(!F.part||this.mapLayer&&F.mapLayer&&this.mapLayer.id!==F.mapLayer.id)this.clearAttributeValueDijits(),this.mapLayer=F.mapLayer,this.version=F.version,this.fields=F.fields,this.createOperatorStores(),this.createFieldsStore(this.fields),this.readCodedValues(),this.fillFieldsList(this.fieldsStore),this.onChangeField();F.part&&(this.part=F.part,this.onOperatorChangeEnabled=this.onFieldChangeEnabled=
!1,this.buildEditUIField(this.part,this))},destroy:function(){this.onOperatorChangeEnabled=this.onFieldChangeEnabled=!1;this.clearAttributeValueDijits();n.forEach(v.findWidgets(g.byId(this.id)),function(F){F.destroyRecursive()});this.inherited(arguments)},toJson:function(){var F=null;this.isInteractiveChecked()&&(F={prompt:this.promptText.attr("value"),hint:this.hintText.attr("value")});return{fieldObj:this.getField(),operator:this.getOperator(),valueObj:this.getValue(),interactiveObj:F}},buildFriendlyTextExpr:function(F){var M=
this.i18n.expressionTemplate,N=function(ka,ja,Q){return b.substitute(M,{field_dropdown:ka,operator_dropdown:ja,values_input:Q})};if(!1===F.valueObj.isValid)return"\x26lt;expression is missing value\x26gt;";var V="";if("string"===F.fieldObj.shortType)F.operator===this.i18n.stringOperatorIsBlank||F.operator===this.i18n.stringOperatorIsNotBlank?V=N(F.fieldObj.label,F.operator,""):"field"===F.valueObj.type?V=N(F.fieldObj.label,F.operator,F.valueObj.label):(V=this.getDecodedValue(F.interactiveObj?F.interactiveObj.value:
F.valueObj.value,F.fieldObj.name),V=N(F.fieldObj.label,F.operator,"'"+V+"'"));else if("number"===F.fieldObj.shortType)if(F.operator===this.i18n.numberOperatorIsBetween||F.operator===this.i18n.numberOperatorIsNotBetween)V=F.interactiveObj?F.interactiveObj.value2:F.valueObj.value2,V=N(F.fieldObj.label,F.operator,h.format(F.interactiveObj?F.interactiveObj.value1:F.valueObj.value1,{pattern:"#####0.##########"})+" "+this.i18n.andBetweenValues+" "+h.format(V,{pattern:"#####0.##########"}));else if(F.operator===
this.i18n.numberOperatorIsBlank||F.operator===this.i18n.numberOperatorIsNotBlank)V=N(F.fieldObj.label,F.operator,"");else if("field"===F.valueObj.type)V=N(F.fieldObj.label,F.operator,F.valueObj.label);else{V=F.interactiveObj?F.interactiveObj.value:F.valueObj.value;var Y=this.getDecodedValue(V,F.fieldObj.name);V=N(F.fieldObj.label,F.operator,V!==Y?"'"+Y+"'":h.format(V,{pattern:"#####0.##########"}))}else ba.isDefined(F.valueObj.value)&&"field"!==F.valueObj.type&&"string"===typeof F.valueObj.value&&
(F.valueObj.value=new Date(F.valueObj.value)),V=F.operator===this.i18n.dateOperatorIsBetween||F.operator===this.i18n.dateOperatorIsNotBetween?N(F.fieldObj.label,F.operator,(F.interactiveObj?this.formatFriendlyDate(F.interactiveObj.value1):this.formatFriendlyDate(F.valueObj.value1))+" "+this.i18n.andBetweenValues+" "+(F.interactiveObj?this.formatFriendlyDate(F.interactiveObj.value2):this.formatFriendlyDate(this.addDay(F.valueObj.value2)))):F.operator===this.i18n.dateOperatorIsBlank||F.operator===this.i18n.dateOperatorIsNotBlank?
N(F.fieldObj.label,F.operator,""):"field"===F.valueObj.type?N(F.fieldObj.label,F.operator,F.valueObj.label):N(F.fieldObj.label,F.operator,F.interactiveObj?this.formatFriendlyDate(F.interactiveObj.value):this.formatFriendlyDate(F.valueObj.value));return V},builtSingleFilterString:function(F,M){if(ba.isDefined(F.valueObj.isValid)&&!F.valueObj.isValid)return{whereClause:null};var N=F.valueObj.value,V=F.valueObj.value1,Y=F.valueObj.value2,ka=!1;if(F.interactiveObj){if(!F.interactiveObj.prompt||!F.interactiveObj.hint)return{whereClause:null};
ba.isDefined(M)&&(ka=!0,ba.isDefined(F.valueObj.value)&&(N="{"+M+"}"),ba.isDefined(F.valueObj.value1)&&(V="{"+M+"}"),ba.isDefined(F.valueObj.value2)&&(Y="{"+(M+1)+"}"))}var ja="",Q=F.fieldObj.name;this.mapLayer&&this.mapLayer.url&&-1!==this.mapLayer.url.indexOf("BigDataCatalogServer")&&this.hasWhiteSpace(Q)&&(Q='"'+Q+'"');if("string"===F.fieldObj.shortType)switch(M="",N&&"field"!==F.valueObj.type&&this.isHostedService(this.mapLayer.url)&&this.containsNonLatinCharacter(N)&&(M="N"),F.operator){case this.i18n.stringOperatorIs:ja=
"field"===F.valueObj.type?Q+" \x3d "+N:Q+" \x3d "+M+"'"+N.replace(/'/g,"''")+"'";break;case this.i18n.stringOperatorIsNot:ja="field"===F.valueObj.type?Q+" \x3c\x3e "+N:Q+" \x3c\x3e "+M+"'"+N.replace(/'/g,"''")+"'";break;case this.i18n.stringOperatorStartsWith:ja=Q+" LIKE "+M+"'"+N.replace(/'/g,"''")+"%'";break;case this.i18n.stringOperatorEndsWith:ja=Q+" LIKE "+M+"'%"+N.replace(/'/g,"''")+"'";break;case this.i18n.stringOperatorContains:ja=Q+" LIKE "+M+"'%"+N.replace(/'/g,"''")+"%'";break;case this.i18n.stringOperatorDoesNotContain:ja=
Q+" NOT LIKE "+M+"'%"+N.replace(/'/g,"''")+"%'";break;case this.i18n.stringOperatorIsBlank:ja=Q+" IS NULL";break;case this.i18n.stringOperatorIsNotBlank:ja=Q+" IS NOT NULL"}else if("number"===F.fieldObj.shortType)switch(F.operator){case this.i18n.numberOperatorIs:ja=Q+" \x3d "+N;break;case this.i18n.numberOperatorIsNot:ja=Q+" \x3c\x3e "+N;break;case this.i18n.numberOperatorIsAtLeast:ja=Q+" \x3e\x3d "+N;break;case this.i18n.numberOperatorIsLessThan:ja=Q+" \x3c "+N;break;case this.i18n.numberOperatorIsAtMost:ja=
Q+" \x3c\x3d "+N;break;case this.i18n.numberOperatorIsGreaterThan:ja=Q+" \x3e "+N;break;case this.i18n.numberOperatorIsBetween:ja=Q+" BETWEEN "+V+" AND "+Y;break;case this.i18n.numberOperatorIsNotBetween:ja=Q+" NOT BETWEEN "+V+" AND "+Y;break;case this.i18n.numberOperatorIsBlank:ja=Q+" IS NULL";break;case this.i18n.numberOperatorIsNotBlank:ja=Q+" IS NOT NULL"}else switch(ba.isDefined(N)&&"field"!==F.valueObj.type&&"string"===typeof N&&(N=this.parseFriendlyDate(N)),F.operator){case this.i18n.dateOperatorIsOn:ja=
"field"===F.valueObj.type?Q+" \x3d "+N:ka?Q+" BETWEEN "+(this.supportsStandardizedQuery?"timestamp ":"")+"'{"+M+"}' AND "+(this.supportsStandardizedQuery?"timestamp ":"")+"'{"+(M+1)+"}'":Q+" BETWEEN "+(this.supportsStandardizedQuery?"timestamp ":"")+"'"+this.formatDate(N)+"' AND "+(this.supportsStandardizedQuery?"timestamp ":"")+"'"+this.formatDate(this.addDay(N))+"'";break;case this.i18n.dateOperatorIsNotOn:ja="field"===F.valueObj.type?Q+" \x3c\x3e "+N:ka?Q+" NOT BETWEEN "+(this.supportsStandardizedQuery?
"timestamp ":"")+"'{"+M+"}' AND "+(this.supportsStandardizedQuery?"timestamp ":"")+"'{"+(M+1)+"}'":Q+" NOT BETWEEN "+(this.supportsStandardizedQuery?"timestamp ":"")+"'"+this.formatDate(N)+"' AND "+(this.supportsStandardizedQuery?"timestamp ":"")+"'"+this.formatDate(this.addDay(N))+"'";break;case this.i18n.dateOperatorIsBefore:ja="field"===F.valueObj.type?Q+" \x3c "+N:Q+" \x3c "+(this.supportsStandardizedQuery?"timestamp ":"")+"'"+this.formatDate(N)+"'";break;case this.i18n.dateOperatorIsAfter:ja=
"field"===F.valueObj.type?Q+" \x3e "+N:Q+" \x3e "+(this.supportsStandardizedQuery?"timestamp ":"")+"'"+this.formatDate(this.addDay(N))+"'";break;case this.i18n.dateOperatorIsBetween:ja=ka?Q+" BETWEEN '"+V+"' AND '"+Y+"'":Q+" BETWEEN "+(this.supportsStandardizedQuery?"timestamp ":"")+"'"+this.formatDate(V)+"' AND "+(this.supportsStandardizedQuery?"timestamp ":"")+"'"+this.formatDate(this.addDay(Y))+"'";break;case this.i18n.dateOperatorIsNotBetween:ja=ka?Q+" NOT BETWEEN '"+V+"' AND '"+Y+"'":Q+" NOT BETWEEN "+
(this.supportsStandardizedQuery?"timestamp ":"")+"'"+this.formatDate(V)+"' AND "+(this.supportsStandardizedQuery?"timestamp ":"")+"'"+this.formatDate(this.addDay(Y))+"'";break;case this.i18n.dateOperatorIsBlank:ja=Q+" IS NULL";break;case this.i18n.dateOperatorIsNotBlank:ja=Q+" IS NOT NULL"}return{whereClause:ja}},showDeleteIcon:function(){k.set(g.byId(this.id+".deleteExpression"),"display","block")},hideDeleteIcon:function(){k.set(g.byId(this.id+".deleteExpression"),"display","none")},createFieldsStore:function(F){if(F&&
F.length){F=m.clone(F);F=F.sort(function(N,V){N.label=N.alias||N.name;V.label=V.alias||V.name;return N.label<V.label?-1:N.label>V.label?1:0});var M=this.isHostedService(this.mapLayer.url);this.supportsStandardizedQuery=10.2<=this.mapLayer.version&&(this.mapLayer.useStandardizedQueries||this.isBigDataLayer(this.mapLayer));F=n.filter(F,function(N,V){return"esriFieldTypeString"===N.type||"esriFieldTypeDouble"===N.type||"esriFieldTypeSingle"===N.type||"esriFieldTypeInteger"===N.type||"esriFieldTypeSmallInteger"===
N.type||"esriFieldTypeDate"===N.type&&(this.allowAllDateTypes||M||this.supportsStandardizedQuery)?!0:!1},this);F=n.map(F,function(N,V){switch(N.type){case "esriFieldTypeString":var Y="string";this.fieldsInfo.stringFieldsCount++;break;case "esriFieldTypeDate":Y="date";this.fieldsInfo.dateFieldsCount++;break;default:Y="number",this.fieldsInfo.numberFieldsCount++}return{id:V,label:N.label,shortType:Y,alias:N.alias,editable:N.editable,name:N.name,nullable:N.nullable,type:N.type}},this);F.length&&(this.fieldsStore=
new B({data:{identifier:"id",label:"label",items:F}}))}},createOperatorStores:function(){var F=[];F.push({name:this.i18n.stringOperatorIs,name_:this.i18n.stringOperatorIs,id:0});F.push({name:this.i18n.stringOperatorIsNot,name_:this.i18n.stringOperatorIsNot,id:1});F.push({name:this.i18n.stringOperatorStartsWith,name_:this.i18n.stringOperatorStartsWith,id:2});F.push({name:this.i18n.stringOperatorEndsWith,name_:this.i18n.stringOperatorEndsWith,id:3});F.push({name:this.i18n.stringOperatorContains,name_:this.i18n.stringOperatorContains,
id:4});F.push({name:this.i18n.stringOperatorDoesNotContain,name_:this.i18n.stringOperatorDoesNotContain,id:5});F.push({name:this.i18n.stringOperatorIsBlank,name_:this.i18n.stringOperatorIsBlank,id:6});F.push({name:this.i18n.stringOperatorIsNotBlank,name_:this.i18n.stringOperatorIsNotBlank,id:7});this.stringOperatorStore=new B({data:{label:"name",identifier:"id",items:F}});F=[];F.push({name:this.i18n.dateOperatorIsOn,id:0});F.push({name:this.i18n.dateOperatorIsNotOn,id:1});F.push({name:this.i18n.dateOperatorIsBefore,
id:2});F.push({name:this.i18n.dateOperatorIsAfter,id:3});F.push({name:this.i18n.dateOperatorIsBetween,id:6});F.push({name:this.i18n.dateOperatorIsNotBetween,id:7});F.push({name:this.i18n.dateOperatorIsBlank,id:8});F.push({name:this.i18n.dateOperatorIsNotBlank,id:9});this.dateOperatorStore=new B({data:{label:"name",identifier:"id",items:F}});F=[];F.push({name:this.i18n.numberOperatorIs,name_:this.i18n.numberOperatorIs,id:0});F.push({name:this.i18n.numberOperatorIsNot,name_:this.i18n.numberOperatorIsNot,
id:1});F.push({name:this.i18n.numberOperatorIsAtLeast,name_:this.i18n.numberOperatorIsAtLeast,id:2});F.push({name:this.i18n.numberOperatorIsLessThan,name_:this.i18n.numberOperatorIsLessThan,id:3});F.push({name:this.i18n.numberOperatorIsAtMost,name_:this.i18n.numberOperatorIsAtMost,id:4});F.push({name:this.i18n.numberOperatorIsGreaterThan,name_:this.i18n.numberOperatorIsGreaterThan,id:5});F.push({name:this.i18n.numberOperatorIsBetween,name_:this.i18n.numberOperatorIsBetween,id:6});F.push({name:this.i18n.numberOperatorIsNotBetween,
name_:this.i18n.numberOperatorIsNotBetween,id:7});F.push({name:this.i18n.numberOperatorIsBlank,name_:this.i18n.numberOperatorIsBlank,id:8});F.push({name:this.i18n.numberOperatorIsNotBlank,name_:this.i18n.numberOperatorIsNotBlank,id:9});this.numberOperatorStore=new B({data:{label:"name",identifier:"id",items:F}})},readCodedValues:function(){n.forEach(this.mapLayer.fields,function(F){F.domain&&F.domain.codedValues&&(this.fieldDomains[F.name]=F.domain.codedValues)},this)},getDecodedValue:function(F,
M){M=this.getCodedValues(M);var N;if(M)for(N=0;N<M.length;N+=1){var V=M[N];if(V.code===F)return V.name}return F},getCodedValues:function(F){return this.fieldDomains[F]},getFieldsList:function(){return v.byId(this.id+".fieldsList")},getOperatorList:function(){return v.byId(this.id+".operatorList")},getValueFieldsList:function(){return v.byId(this.id+".valueFields")},getAttrValContNode:function(){return g.byId(this.id+".attributeValueContainer")},getField:function(){var F=this.getFieldsList();return{name:F.store.getValue(F.item,
"name"),label:F.store.getValue(F.item,"label"),shortType:F.store.getValue(F.item,"shortType"),type:F.store.getValue(F.item,"type")}},getOperator:function(){var F=this.getOperatorList();return F.item?F.store.getValue(F.item,"name"):""},getValue:function(){return{}},isInteractiveChecked:function(){return this.interactiveCheck.checked},setInteractiveSection:function(F,M,N){this.disableInteractiveHandlers();this.interactiveCheck.checked=F;this.promptText.attr("value",M);this.hintText.attr("value",N);
k.set(this.interactiveSpace,"display","block");this.interactiveArrow.innerHTML="\x26nbsp;\x26#9650;";this.enableInteractiveHandlers()},enableInteractiveHandlers:function(){this.onPromptChangeHandler=q.connect(this.promptText,"onChange",this,"onChangeInteractive");this.onHintchangeHandler=q.connect(this.hintText,"onChange",this,"onChangeInteractive")},disableInteractiveHandlers:function(){q.disconnect(this.onPromptChangeHandler);q.disconnect(this.onHintChangeHandler)},fillFieldsList:function(F){var M=
this.getFieldsList();M.set("labelAttr","label");M.set("searchAttr","label");M.set("store",F);M.set("value",0)},fillOperatorList:function(F,M,N){var V=this.getOperatorList();V.set("labelAttr","name");V.set("searchAttr","name");V.set("query",N?N:{});V.set("store",F);if(M){var Y=!1;for(N=0;20>N&&(F.fetchItemByIdentity({identity:N,onItem:m.hitch(this,function(ka){ka&&ka.name[0]===M&&(V.set("value",ka.id[0]),Y=!0)})}),!Y);N++);}else V.set("value",0)},createValueString:function(F){var M=this.getAttrValContNode();
this.clearAttributeValueDijits();l.empty(M);if(F){M=new J({id:this.id+".value","class":"attributeValue",maxHeight:150,sortByLabel:!0},l.create("div",{},M));var N=this.buildCodedValuesStore(F);M.set("store",N);M.set("value",0);this.valueHandlers.push(q.connect(M,"onChange",this,"onValueChange"))}else M=new C({id:this.id+".value","class":"attributeValue",required:!0,placeHolder:"",intermediateChanges:!0},l.create("div",{},M)),this.valueHandlers.push(q.connect(M,"onChange",this,"onValueChange"));this.checkDefaultOption();
this.getValue=function(){var V=v.byId(this.id+".value"),Y=!0;F?V.item?V=V.item.code[0]:(V="",Y=!1):Y=V=V.get("value");return{value:V,isValid:Y}}},createValueDate:function(){var F=this.getAttrValContNode();this.clearAttributeValueDijits();l.empty(F);F=new S({id:this.id+".value","class":"attributeValue",trim:!0,required:!0,placeHolder:"",constraints:{formatLength:"short"}},l.create("div",{},F));this.checkDefaultOption();this.valueHandlers.push(q.connect(F,"onChange",this,"onValueChange"));this.getValue=
function(){var M=v.byId(this.id+".value").get("value");return{value:M,isValid:ba.isDefined(M)}}},createValueNumber:function(F){var M=this.getAttrValContNode();this.clearAttributeValueDijits();l.empty(M);if(F){M=new J({id:this.id+".value","class":"attributeValue",maxHeight:150,sortByLabel:!0},l.create("div",{},M));var N=this.buildCodedValuesStore(F);M.set("store",N);M.set("value",0);this.valueHandlers.push(q.connect(M,"onChange",this,"onValueChange"))}else M=new U({id:this.id+".value","class":"attributeValue",
required:!0,placeHolder:"",intermediateChanges:!0,constraints:{pattern:"#####0.##########"}},l.create("div",{},M)),this.valueHandlers.push(q.connect(M,"onChange",this,"onValueChange"));this.checkDefaultOption();this.getValue=function(){var V=v.byId(this.id+".value"),Y=!0;F?V.item?V=V.item.code[0]:(V="",Y=!1):(V=V.get("value"),Y=ba.isDefined(V)&&!isNaN(V));return{value:V,isValid:Y}}},createValueBetweenDate:function(){var F=this.getAttrValContNode();this.clearAttributeValueDijits();l.empty(F);var M=
new S({id:this.id+".value1","class":"attributeValue1",trim:!0,required:!0,placeHolder:"",constraints:{formatLength:"short"}},l.create("div",{},F));l.create("span",{innerHTML:this.i18n.andBetweenValues,"class":"attributeBetweenValues"},F);F=new S({id:this.id+".value2","class":"attributeValue2",trim:!0,required:!0,placeHolder:"",constraints:{formatLength:"short"}},l.create("div",{},F));this.checkDefaultOption();this.valueHandlers.push(q.connect(M,"onChange",this,"onValueChange"));this.valueHandlers.push(q.connect(F,
"onChange",this,"onValueChange"));this.getValue=function(){var N=v.byId(this.id+".value1").get("value"),V=v.byId(this.id+".value2").get("value");return{value1:N,value2:V,isValid:ba.isDefined(N)&&ba.isDefined(V)}}},createValueBetweenNumber:function(){var F=this.getAttrValContNode();this.clearAttributeValueDijits();l.empty(F);var M=new U({id:this.id+".value1","class":"attributeValue1",required:!0,placeHolder:"",intermediateChanges:!0,constraints:{pattern:"#####0.##########"}},l.create("div",{},F));
l.create("span",{innerHTML:this.i18n.andBetweenValues,"class":"attributeBetweenValues"},F);F=new U({id:this.id+".value2","class":"attributeValue2",required:!0,placeHolder:"",intermediateChanges:!0,constraints:{pattern:"#####0.##########"}},l.create("div",{},F));this.checkDefaultOption();this.valueHandlers.push(q.connect(M,"onChange",this,"onValueChange"));this.valueHandlers.push(q.connect(F,"onChange",this,"onValueChange"));this.getValue=function(){var N=v.byId(this.id+".value1").get("value"),V=v.byId(this.id+
".value2").get("value");return{value1:N,value2:V,isValid:ba.isDefined(N)&&ba.isDefined(V)&&!isNaN(N)&&!isNaN(V)&&N<=V}}},createValueInTheLastDate:function(){},createValueIsBlank:function(){var F=this.getAttrValContNode();this.clearAttributeValueDijits();l.empty(F);F.innerHTML="\x3cinput id\x3d'"+this.id+".value' class\x3d'attributeValue' type\x3d'text' disabled\x3d'true'/\x3e";this.checkDefaultOption();this.getValue=function(){return{value:null,isValid:!0}}},createValueFields:function(F,M,N){var V=
this.getAttrValContNode();this.clearAttributeValueDijits();l.empty(V);var Y=new J({id:this.id+".valueFields","class":"attributeValue",maxHeight:150,labelAttr:"label",searchAttr:"label",store:F,query:M},l.create("div",{},V));if(N){var ka=!1;for(V=0;100>V&&(F.fetchItemByIdentity({identity:V,onItem:m.hitch(this,function(ja){ja&&ja.shortType[0]===M.shortType&&ja.name[0]!==N&&(Y.set("value",ja.id),ka=!0)})}),!ka);V++);}this.valueHandlers.push(q.connect(Y,"onChange",this,"onValueChange"));this.getValue=
function(){var ja=v.byId(this.id+".valueFields");return{value:ja.store.getValue(ja.item,"name"),label:ja.store.getValue(ja.item,"label"),type:"field",isValid:!0}}},createValueUnique:function(F){var M=this.getAttrValContNode();this.clearAttributeValueDijits();l.empty(M);F=new J({id:this.id+".valueUnique","class":"attributeValue",maxHeight:150,store:F},l.create("div",{},M));F.set("value",0);this.valueHandlers.push(q.connect(F,"onChange",this,"onValueChange"));this.getValue=function(){var N=v.byId(this.id+
".valueUnique");return{value:N.store.getValue(N.item,"value"),isValid:!0}}},setValue:function(F,M){if(M)for(var N=0;N<M.length;N++){if(F===M[N].code){v.byId(this.id+".value").set("value",N);break}}else"date"===this.part.fieldObj.shortType?v.byId(this.id+".value").set("value",new Date(F)):("number"===this.part.fieldObj.shortType&&(F=Number(F)),v.byId(this.id+".value").set("value",F))},setValue1:function(F){"date"===this.part.fieldObj.shortType?F=new Date(F):"number"===this.part.fieldObj.shortType&&
(F=Number(F));v.byId(this.id+".value1").set("value",F)},setValue2:function(F){"date"===this.part.fieldObj.shortType?F=new Date(F):"number"===this.part.fieldObj.shortType&&(F=Number(F));v.byId(this.id+".value2").set("value",F)},setValueFieldById:function(F){this.getValueFieldsList().set("value",F)},enableOnFieldChange:function(){this.onFieldChangeEnabled=!0},enableOnOperatorChange:function(){this.onOperatorChangeEnabled=!0},onChangeField:function(F){this.onFieldChangeEnabled&&this._onChangeField(this.getFieldsList(),
this)},onChangeOperator:function(F){this.onOperatorChangeEnabled&&this._onChangeOperator(this.getOperatorList(),this)},onClickDeleteExpression:function(F){this._deleteExpression(this)},_onChangeField:function(F,M,N){var V=!!this.mapLayer&&this.isPortalHostedService(this.mapLayer.url);this.isBigDataLayer(this.mapLayer)||V&&"esriFieldTypeDate"===this.fieldsStore.getValue(F.item,"type")?k.set(g.byId(this.id+".radioUniqueColumn"),"display","none"):k.set(g.byId(this.id+".radioUniqueColumn"),"display",
"");V=M.getOperatorList();switch(this.fieldsStore.getValue(F.item,"type")){case "esriFieldTypeString":var Y=null;F=this.fieldsStore.getValue(F.item,"name");this.getCodedValues(F)&&(Y=this.i18n.stringOperatorStartsWith,Y+="|"+this.i18n.stringOperatorEndsWith,Y+="|"+this.i18n.stringOperatorContains,Y+="|"+this.i18n.stringOperatorDoesNotContain,Y={name_:new RegExp("^(?!("+Y+")$)")});V.attr("value")===this.i18n.stringOperatorIs?(M.fillOperatorList(this.stringOperatorStore,this.i18n.stringOperatorIs,Y),
this.onChangeOperator(V,M,N)):M.fillOperatorList(this.stringOperatorStore,this.i18n.stringOperatorIs,Y);M.createValueString(this.getCodedValues(F));break;case "esriFieldTypeDate":M.fillOperatorList(this.dateOperatorStore,this.i18n.dateOperatorIsOn);M.createValueDate();break;default:Y=null,F=this.fieldsStore.getValue(F.item,"name"),this.getCodedValues(F)&&(Y=this.i18n.numberOperatorIsBetween,Y+="|"+this.i18n.numberOperatorIsNotBetween,Y+="|"+this.i18n.numberOperatorIsAtLeast,Y+="|"+this.i18n.numberOperatorIsLessThan,
Y+="|"+this.i18n.numberOperatorIsAtMost,Y+="|"+this.i18n.numberOperatorIsGreaterThan,Y={name_:new RegExp("^(?!("+Y+")$)")}),V.attr("value")===this.i18n.numberOperatorIs?(M.fillOperatorList(this.numberOperatorStore,this.i18n.numberOperatorIs,Y),this.onChangeOperator(V,M,N)):M.fillOperatorList(this.numberOperatorStore,this.i18n.numberOperatorIs,Y),M.createValueNumber(this.getCodedValues(F))}"date"===this.fieldsStore.getValue(M.getFieldsList().item,"shortType")?M.disableInteractiveCheck():M.enableInteractiveCheck();
q.publish("filter-expression-change",this)},_onChangeOperator:function(F,M,N){F=F.item?F.item.name[0]:F.value;N=this.fieldsStore.getValue(M.getFieldsList().item,"shortType");var V=this.fieldsStore.getValue(M.getFieldsList().item,"name");M.enableOptions();if("date"!==N&&"number"!==N||F!==this.i18n.dateOperatorIsBetween&&F!==this.i18n.numberOperatorIsBetween&&F!==this.i18n.dateOperatorIsNotBetween&&F!==this.i18n.numberOperatorIsNotBetween)if("date"!==N||F!==this.i18n.dateOperatorInTheLast&&F!==this.i18n.dateOperatorNotInTheLast)if(F===
this.i18n.stringOperatorIsBlank||F===this.i18n.dateOperatorIsBlank||F===this.i18n.numberOperatorIsBlank||F===this.i18n.stringOperatorIsNotBlank||F===this.i18n.dateOperatorIsNotBlank||F===this.i18n.numberOperatorIsNotBlank)M.createValueIsBlank(),M.disableOptions();else switch(N){case "string":M.createValueString(this.getCodedValues(V));break;case "date":M.createValueDate();break;default:M.createValueNumber(this.getCodedValues(V))}else M.disableOptions(),M.createValueInTheLastDate();else M.disableOptions(),
"date"===N?M.createValueBetweenDate():M.createValueBetweenNumber();q.publish("filter-expression-change",this)},onInteractiveClick:function(F){this.isInteractiveChecked()?(k.set(this.interactiveSpace,"display","block"),this.interactiveArrow.innerHTML="\x26nbsp;\x26#9650;"):(k.set(this.interactiveSpace,"display","none"),this.interactiveArrow.innerHTML="\x26nbsp;\x26#9660;");q.publish("filter-expression-change",this)},onClickShowHideInteractive:function(F){this.interactiveCheck.disabled||("none"===k.set(this.interactiveSpace,
"display")?(k.set(this.interactiveSpace,"display","block"),this.interactiveArrow.innerHTML="\x26nbsp;\x26#9650;"):(k.set(this.interactiveSpace,"display","none"),this.interactiveArrow.innerHTML="\x26nbsp;\x26#9660;"))},onChangeInteractive:function(){q.publish("filter-expression-change",this)},showValueInput:function(F){this._showValueInput(v.byNode(F.target),this)},showFields:function(F){this._showFields(v.byNode(F.target),this)},showUniqueList:function(F){this._showUniqueList(v.byNode(F.target),this)},
onValueChange:function(){this.onValueChangeHandler&&clearTimeout(this.onValueChangeHandler);this.onValueChangeHandler=setTimeout(m.hitch(this,function(){this.onValueChangeHandler=null;q.publish("filter-expression-change",this)}),800)},_showValueInput:function(F,M,N){M.onChangeOperator(F,M,N);M.enableInteractiveCheck()},_showFields:function(F,M,N){N=M.getFieldsList().item;F=this.fieldsStore.getValue(N,"shortType");N=this.fieldsStore.getValue(N,"name");M.createValueFields(this.fieldsStore,{shortType:F,
name:new RegExp("^(?!"+N+"$)")},N);M.disableInteractiveCheck()},_showUniqueList:function(F,M,N){this.uniqueValuesStore&&delete this.uniqueValuesStore;N=this.fieldsStore.getValue(M.getFieldsList().item,"name");if(10.1<=this.version||!this.mapLayer.url){var V=null;this.mapLayer.queryServiceUrl?V=this.mapLayer.queryServiceUrl:this.mapLayer.itemLayers&&n.forEach(this.mapLayer.itemLayers,function(Y){Y.id===this.layerInfo.id&&Y.layerUrl&&(V=Y.layerUrl)},this);V||(V=this.mapLayer.url);if(this.uniqueValuesResults[this.mapLayer.id+
"_"+N])this.onGenerateRendererResults(M,F,this.uniqueValuesResults[this.mapLayer.id+"_"+N]);else this.generateRendererUniqueValues(N,V,m.hitch(this,"onGenerateRendererResults",M,F),m.hitch(this,function(){this.showValueInput(F,M)}))}else F&&this.showValueInput(F,M)},onGenerateRendererResults:function(F,M,N){var V=this.fieldsStore.getValue(F.getFieldsList().item,"name"),Y=this.fieldsStore.getValue(F.getFieldsList().item,"shortType"),ka=this.fieldsStore.getValue(F.getFieldsList().item,"type");this.uniqueValuesResults[this.mapLayer.id+
"_"+V]=N;var ja=null;n.forEach(this.mapLayer.fields,function(Q){Q.name===V&&Q.domain&&(ja=Q.domain)});N=n.filter(N,function(Q,ha){return"string"===Y?"\x3cNull\x3e"!==Q&&""!==Q.trim():"\x3cNull\x3e"!==Q&&""!==Q});N.length?("date"===Y?(N=n.map(N,function(Q){return new Date(Q)}),N=N.sort(function(Q,ha){Q=Q.getTime();ha=ha.getTime();return Q<ha?-1:Q>ha?1:0}),N=n.map(N,function(Q){return this.formatFriendlyDate(Q)},this)):"number"===Y?(N=n.map(N,function(Q){return"esriFieldTypeDouble"===ka||"esriFieldTypeSingle"===
ka?parseFloat(Q):parseInt(Q,10)}),N=N.sort(function(Q,ha){return Q<ha?-1:Q>ha?1:0})):N=N.sort(function(Q,ha){return Q<ha?-1:Q>ha?1:0}),M=n.map(N,function(Q,ha){var qa=Q;"string"===Y&&(qa=""===Q?"\x3c"+this.i18n.emptyString+"\x3e":Q);if(ja&&ja.codedValues){for(var ia=0;ia<ja.codedValues.length;ia++){var pa=ja.codedValues[ia];if(Q===pa.code)return{id:ha,name:pa.name||qa,value:Q}}return{id:ha,name:""+qa,value:Q}}if("esriFieldTypeDouble"===ka||"esriFieldTypeSingle"===ka)qa=h.format(Q,{pattern:"#####0.##########"});
return{id:ha,name:""+qa,value:Q}},this),this.uniqueValuesStore=new B({data:{label:"name",identifier:"id",items:M}}),F.createValueUnique(this.uniqueValuesStore)):this.showValueInput(M,F)},generateRendererUniqueValues:function(F,M,N,V){F instanceof Array&&(F=F.toString());var Y=new da;Y.attributeField=F;F=new fa;F.classificationDefinition=Y;this.mapLayer instanceof W?M=new oa(this.mapLayer):this.mapLayer instanceof R&&!this.mapLayer.url?M=new oa(this.mapLayer):this.hasDynamicLayers(this.mapLayer)?(Y=
this.mapLayer.layerDefinitions&&this.mapLayer.layerDefinitions[this.mapLayer.id]?this.mapLayer.layerDefinitions[this.mapLayer.id]:null,F.where=Y?Y:null,M=new oa(this.mapLayer.url+"/dynamicLayer",{source:this.layerInfo.source})):(Y=this.mapLayer.getDefinitionExpression(),F.where=Y?Y:null,M=new oa(M));aa.defaults.io.timeout=1E4;M.execute(F,function(ka){aa.defaults.io.timeout=6E4;ka=n.map(ka.infos,function(ja){return ja.value});N(ka)},m.hitch(this,function(ka){aa.defaults.io.timeout=6E4;V()}))},hasDynamicLayers:function(F){return F&&
F.supportsDynamicLayers?!0:!1},formatDate:function(F){return x.format(F,{datePattern:"yyyy-MM-dd",selector:"date"})+" "+x.format(F,{selector:"time",timePattern:"HH:mm:ss"})},formatFriendlyDate:function(F){return x.format(F,{formatLength:"short",selector:"date"})},parseFriendlyDate:function(F){return x.parse(F,{formatLength:"short",selector:"date"})},parseDate:function(F){var M=x.parse(F,{datePattern:"yyyy-MM-dd",timePattern:"HH:mm:ss"});M||(M=x.parse(F.replace(" ",", "),{datePattern:"yyyy-MM-dd",
timePattern:"HH:mm:ss"}))||(M=x.parse(F.replace(" "," - "),{datePattern:"yyyy-MM-dd",timePattern:"HH:mm:ss"}));return M},addDay:function(F){return new Date(F.getTime()+this.dayInMS)},subtractDay:function(F){return new Date(F.getTime()-this.dayInMS)},containsNonLatinCharacter:function(F){for(var M=0;M<F.length;M++)if(255<F.charCodeAt(M))return!0;return!1},hasWhiteSpace:function(F){return/\s/g.test(F)},buildCodedValuesStore:function(F){F=n.map(F,function(M,N){return{name:M.name,code:M.code,id:N}});
return new B({data:{label:"name",identifier:"id",items:F}})},clearAttributeValueDijits:function(){this.valueHandlers&&0!==this.valueHandlers.length&&(n.forEach(this.valueHandlers,m.hitch(this,function(F){q.disconnect(F);F=null})),this.valueHandlers=[],v.byId(this.id+".value")?v.byId(this.id+".value").destroy():g.byId(this.id+".value")&&this.getAttrValContNode().removeChild(g.byId(this.id+".value")),v.byId(this.id+".value1")?v.byId(this.id+".value1").destroy():g.byId(this.id+".value1")&&this.getAttrValContNode().removeChild(g.byId(this.id+
".value1")),v.byId(this.id+".value2")?v.byId(this.id+".value2").destroy():g.byId(this.id+".value2")&&this.getAttrValContNode().removeChild(g.byId(this.id+".value2")),v.byId(this.id+".valueFields")&&v.byId(this.id+".valueFields").destroy(),v.byId(this.id+".valueUnique")&&v.byId(this.id+".valueUnique").destroy())},checkDefaultOption:function(){p(".attributeValueOptions .attributeValueRadio",this.domNode).forEach(function(F){v.byNode(F).set("checked",-1<F.className.indexOf("radioValue"))})},disableOptions:function(){p(".attributeValueOptions .attributeValueRadio",
this.domNode).forEach(function(F){v.byNode(F).set("disabled",!0)})},enableOptions:function(){p(".attributeValueOptions .attributeValueRadio",this.domNode).forEach(function(F){v.byNode(F).set("disabled",!1)})},checkFieldOption:function(){v.byId(this.id+".radioFields").set("checked",!0)},disableFieldOption:function(){v.byId(this.id+".radioFields").set("disabled",!0)},disableUniqueOption:function(){v.byId(this.id+".radioUnique").set("disabled",!0)},enableInteractiveCheck:function(){this.interactiveCheck.disabled=
!1},disableInteractiveCheck:function(){this.interactiveCheck.checked=!1;this.interactiveCheck.disabled=!0},isBigDataLayer:function(F){return!!F.url&&-1!==F.url.indexOf("BigDataCatalogServer")&&("featureClass"===F.type||"table"===F.type)},isPortalHostedService:function(F){return F?-1!==F.toLowerCase().indexOf("/hosted/"):!1},isHostedService:function(F){if(!F)return!1;var M=-1!==F.indexOf(".arcgis.com/");F=-1!==F.indexOf("//services")||-1!==F.indexOf("//tiles")||-1!==F.indexOf("//features");return M&&
F},buildEditUIField:function(F,M,N){this.getFieldItemByName({name:F.fieldObj.name},m.hitch(this,function(V){M.getFieldsList().set("value",V.id[0],!1);this.buildEditUIOperator(F,M,N)}),m.hitch(this,function(){M.getFieldsList().set("value",0);this.buildEditUIOperator(F,M,N)}))},buildEditUIOperator:function(F,M,N){switch(F.fieldObj.shortType){case "string":M.fillOperatorList(this.stringOperatorStore,F.operator);break;case "date":M.fillOperatorList(this.dateOperatorStore,F.operator);break;default:M.fillOperatorList(this.numberOperatorStore,
F.operator)}setTimeout(m.hitch(this,function(){this.getOperatorItemByName(M.getOperatorList().store,{name:F.operator},m.hitch(this,function(V){M.getOperatorList().set("value",V.id[0],!1);this.buildEditUIValue(F,M,N)}),m.hitch(this,function(){M.getOperatorList().set("value",0);this.buildEditUIValue(F,M,N)}))}),100)},buildEditUIValue:function(F,M,N){this.onOperatorChangeEnabled=this.onFieldChangeEnabled=!0;var V=F.operator;this.onChangeOperator(M.getOperatorList(),M);M.enableOptions();setTimeout(m.hitch(this,
function(){V===this.i18n.stringOperatorIsBlank||V===this.i18n.dateOperatorIsBlank||V===this.i18n.numberOperatorIsBlank||V===this.i18n.stringOperatorIsNotBlank||V===this.i18n.dateOperatorIsNotBlank||V===this.i18n.numberOperatorIsNotBlank?(M.createValueIsBlank(),M.disableOptions()):"field"===F.valueObj.type?(M.createValueFields(this.fieldsStore,{shortType:F.fieldObj.shortType,name:new RegExp("^(?!"+F.fieldObj.name+"$)")}),M.checkFieldOption(),this.getFieldItemByName({name:F.valueObj.value},m.hitch(this,
function(Y){M.setValueFieldById(Y.id[0])}),m.hitch(this,function(){M.setValueFieldById(0)}))):ba.isDefined(F.valueObj.value1)?(M.setValue1(F.valueObj.value1),M.setValue2(F.valueObj.value2)):M.setValue(F.valueObj.value,this.getCodedValues(F.fieldObj.name))}),100)},getFieldItemByName:function(F,M,N){this.fieldsStore.fetch({query:F,onComplete:m.hitch(this,function(V){V&&V.length?M(V[0]):N()})})},getOperatorItemByName:function(F,M,N,V){F.fetch({query:M,onComplete:m.hitch(this,function(Y){Y&&Y.length?
N(Y[0]):V()})})}});c("extend-esri")&&m.setObject("dijit.SingleFilter",H,ea);return H})},"esri/tasks/GenerateRendererTask":function(){define("require dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/number dojo/_base/json dojo/_base/Deferred dojo/has ../kernel ../request ../deferredUtils ../urlUtils ../renderers/jsonUtils ./StatisticDefinition ./Task ./QueryTask ./query dojo/has!extend-esri?./GenerateRendererParameters dojo/has!extend-esri?./ClassificationDefinition dojo/has!extend-esri?./ClassBreaksDefinition dojo/has!extend-esri?./UniqueValueDefinition dojo/has!extend-esri?./ColorRamp dojo/has!extend-esri?./AlgorithmicColorRamp dojo/has!extend-esri?./MultipartColorRamp".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w){e=e(p,{declaredClass:"esri.tasks.GenerateRendererTask",_eventMap:{complete:["renderer"]},constructor:function(u,B){!m.isObject(u)||"esri.layers.FeatureLayer"!==u.declaredClass&&"esri.layers.CSVLayer"!==u.declaredClass?(this.url=u,this._url.path+="/generateRenderer"):u.url&&m.isString(u.url)&&"esri.layers.CSVLayer"!==u.declaredClass?(this.url=u.url,this._url=k.urlToObject(this.url),this._url.path+="/generateRenderer"):this._features=u.graphics;this._handler=
m.hitch(this,this._handler);this.source=B&&B.source;this.gdbVersion=B&&B.gdbVersion;this.checkValueRange=B&&B.checkValueRange;this.registerConnectEvents()},_handler:function(u,B,x,E,y){try{if("esri.renderer.ClassBreaksRenderer"===u.declaredClass||"esri.renderer.UniqueValueRenderer"===u.declaredClass)var D=u;else D=f.fromJson(u),"classBreaks"===u.type&&D.setMaxInclusive(!0);if(this.checkValueRange){var G=new r(this.url),A=new w,t=new l;t.statisticType="min";t.onStatisticField=this._field;var v=new l;
v.statisticType="max";v.onStatisticField=this._field;A.outStatistics=[t,v];G.execute(A).then(m.hitch(this,function(C){C=C.features[0].attributes;for(var J in C)if(0===J.toLowerCase().indexOf("min"))var L=C[J];else var S=C[J];D=this._processRenderer(D,this._prefix,this._unitLabel,this._formatLabel,this._precision,L,S);this._successHandler([D],"onComplete",x,y)}))}else D=this._processRenderer(D,this._prefix,this._unitLabel,this._formatLabel,this._precision),this._successHandler([D],"onComplete",x,y)}catch(C){this._errorHandler(C,
E,y)}},_processRenderer:function(u,B,x,E,y,D,G){"esri.renderer.ClassBreaksRenderer"===u.declaredClass?n.forEach(u.infos,function(A,t){0===t&&void 0!==D&&null!==D&&(A.minValue=D);t===u.infos.length-1&&void 0!==G&&null!==G&&(A.classMaxValue=A.maxValue=G);y&&(A.classMaxValue=A.maxValue=Math.round(A.maxValue/y)*y,A.minValue=Math.round(A.minValue/y)*y);E&&(A.label=q.format(A.minValue)+" - "+q.format(A.maxValue));B&&(A.label=B+" "+A.label);x&&(A.label=A.label+" "+x)}):n.forEach(u.infos,function(A,t){0===
t&&void 0!==D&&null!==D&&(A.value=D);t===u.infos.length-1&&void 0!==G&&null!==G&&(A.value=G);E&&(A.label=q.format(A.value));B&&(A.label=B+" "+A.label);x&&(A.label=A.label+" "+x)});return u},execute:function(u,B,x){var E=this._handler,y=this._errorHandler;this._precision=u.precision;this._prefix=u.prefix;this._unitLabel=u.unitLabel;this._formatLabel=u.formatLabel;if(this._features=u.features||this._features){var D=new c;var G=this._features;H(["./generateRenderer"],function(v){var C;"esri.tasks.ClassBreaksDefinition"===
u.classificationDefinition.declaredClass?C=v.createClassBreaksRenderer({features:G,definition:u.classificationDefinition}):"esri.tasks.UniqueValueDefinition"===u.classificationDefinition.declaredClass&&(C=v.createUniqueValueRenderer({features:G,definition:u.classificationDefinition}));C?E(C,null,B,x,D):y(null,x,D)})}else{var A=m.mixin(u.toJson(),{f:"json"});this._field="esri.tasks.ClassBreaksDefinition"===u.classificationDefinition.declaredClass?u.classificationDefinition.classificationField:u.classificationDefinition.attributeField;
if(this.source){var t={source:this.source.toJson()};A.layer=d.toJson(t)}this.gdbVersion&&(A.gdbVersion=this.gdbVersion);D=new c(g._dfdCanceller);D._pendingDfd=h({url:this._url.path,content:A,callbackParamName:"callback",load:function(v,C){E(v,C,B,x,D)},error:function(v){y(v,x,D)}})}return D},onComplete:function(){}});a("extend-esri")&&m.setObject("tasks.GenerateRendererTask",e,b);return e})},"esri/tasks/UniqueValueDefinition":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel",
"./ClassificationDefinition"],function(H,e,m,n,q){H=H(q,{declaredClass:"esri.tasks.UniqueValueDefinition",type:"uniqueValueDef",attributeField:null,attributeField2:null,attributeField3:null,fieldDelimiter:null,toJson:function(){var d=this.inherited(arguments);this.uniqueValueFields=[];this.attributeField&&this.uniqueValueFields.push(this.attributeField);this.attributeField2&&this.uniqueValueFields.push(this.attributeField2);this.attributeField3&&this.uniqueValueFields.push(this.attributeField3);e.mixin(d,
{type:this.type,uniqueValueFields:this.uniqueValueFields});this.fieldDelimiter&&e.mixin(d,{fieldDelimiter:this.fieldDelimiter});return d}});m("extend-esri")&&e.setObject("tasks.UniqueValueDefinition",H,n);return H})},"esri/tasks/ClassificationDefinition":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(H,e,m,n){H=H(null,{declaredClass:"esri.tasks.ClassificationDefinition",type:null,baseSymbol:null,colorRamp:null,toJson:function(){var q={};this.baseSymbol&&
e.mixin(q,{baseSymbol:this.baseSymbol.toJson()});this.colorRamp&&!e.isString(this.colorRamp)&&e.mixin(q,{colorRamp:this.colorRamp.toJson()});return q}});m("extend-esri")&&e.setObject("tasks.ClassificationDefinition",H,n);return H})},"esri/tasks/GenerateRendererParameters":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/json","dojo/has","../kernel"],function(H,e,m,n,q){H=H(null,{declaredClass:"esri.tasks.GenerateRendererParameters",classificationDefinition:null,where:null,precision:null,
prefix:null,unitLabel:null,formatLabel:null,toJson:function(){return{classificationDef:m.toJson(this.classificationDefinition.toJson()),where:this.where}}});n("extend-esri")&&e.setObject("tasks.GenerateRendererParameters",H,q);return H})},"esri/layers/GeoRSSLayer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/json dojo/has ../kernel ../config ../request ../urlUtils ./ServiceGeneratedFeatureCollection".split(" "),function(H,e,m,n,q,d,c,a,b){H=H([b],{declaredClass:"esri.layers.GeoRSSLayer",
serviceUrl:a.getProtocolForWebResource()+"//utility.arcgis.com/sharing/rss",constructor:function(h,g){this._url=a.urlToObject(this.url=h);d.defaults.geoRSSService&&(this.serviceUrl=d.defaults.geoRSSService);this._createLayer()},parse:function(){return this._io=c({url:this.serviceUrl,content:{url:this.url,refresh:this.loaded?!0:void 0,outSR:this._outSR?m.toJson(this._outSR.toJson()):void 0},callbackParamName:"callback"})},_initLayer:function(h){this.inherited(arguments);this.loaded||(this.loaded=!0,
this.onLoad(this))}});n("extend-esri")&&e.setObject("layers.GeoRSSLayer",H,q);return H})},"esri/layers/ServiceGeneratedFeatureCollection":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array dojo/dom-construct dojo/dom-style dojo/has ../kernel ../SpatialReference ../geometry/Extent ../geometry/webMercatorUtils ../renderers/SimpleRenderer ./layer ./FeatureLayer ../dijit/PopupTemplate".split(" "),function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p){H=H([f],{declaredClass:"esri.layers._ServiceGeneratedFeatureCollection",
constructor:function(r,w){this.pointSymbol=w&&w.pointSymbol;this.polylineSymbol=w&&w.polylineSymbol;this.polygonSymbol=w&&w.polygonSymbol;this._outSR=w&&(w.outSpatialReference||w.outSR)||new b({wkid:4326});this._options=m.mixin({},w)},parse:function(){console.error("parse function has not been implemented")},getFeatureLayers:function(){var r=[];this._fLayers&&(r=r.concat(this._fLayers));return r},onRefresh:function(){},onOpacityChange:function(){},refresh:function(){this.loaded&&this._map&&!this._io&&
this.visible&&this._createLayer()},_createLayer:function(r){var w=this;this._fireUpdateStart();r=this.parse(r);r.addCallback(function(u){w._io=null;w._initLayer(u)});r.addErrback(function(u){w._io=null;u=m.mixin(Error(),u);u.message="Unable to load resource: "+w.url+" "+(u.message||"");w._fireUpdateEnd(u);w.onError(u)})},_initLayer:function(r){this.loaded&&this._removeInternalLayers();this.name=r.name;this.description=r.description;this.snippet=r.snippet;this.featureInfos=r.featureInfos;this.fullExtent=
this.initialExtent=new h(r.lookAtExtent);this.copyright=r.author||r.copyright;var w;(r=m.getObject("featureCollection.layers",!1,r))&&0<r.length&&(this._fLayers=[],n.forEach(r,function(u,B){var x=m.getObject("featureSet.features",!1,u);x&&0<x.length&&(w=m.mixin({outFields:["*"],infoTemplate:u.popupInfo?new p(u.popupInfo):null,editable:!1},this._options),w.id&&(w.id=w.id+"_"+B),w.webgl=!1,u.layerDefinition.capabilities="Query,Data",u=new l(u,w),u.geometryType&&(this["_"+u.geometryType]=u),this._fLayers.push(u))},
this),0===this._fLayers.length&&delete this._fLayers);this.items=[];this._esriGeometryPoint&&(this.items=this.items.concat(this._esriGeometryPoint.graphics),this.pointSymbol&&(r=new k(this.pointSymbol),this._esriGeometryPoint.setRenderer(r)));this._esriGeometryPolyline&&(this.items=this.items.concat(this._esriGeometryPolyline.graphics),this.polylineSymbol&&(r=new k(this.polylineSymbol),this._esriGeometryPolyline.setRenderer(r)));this._esriGeometryPolygon&&(this.items=this.items.concat(this._esriGeometryPolygon.graphics),
this.polygonSymbol&&(r=new k(this.polygonSymbol),this._esriGeometryPolygon.setRenderer(r)));this._fireUpdateEnd();this.loaded&&(this._addInternalLayers(),this.onRefresh())},_addInternalLayers:function(){var r=this._map;this._fireUpdateStart();var w=r.spatialReference,u=this._outSR;if(w.wkid)var B=w._isWebMercator()&&u._isWebMercator()||w.wkid===u.wkid;else if(w.wkt)B=w.wkt===u.wkt;else{console.log("_setMap - map has invalid spatial reference");return}if(!B)if(w._isWebMercator()&&4326===u.wkid)this._converter=
g.geographicToWebMercator;else if(u._isWebMercator()&&4326===w.wkid)this._converter=g.webMercatorToGeographic;else{console.log("_setMap - unsupported workflow. Spatial reference of the map and layer do not match, and the conversion cannot be done on the client.");return}(w=this._fLayers)&&0<w.length&&n.forEach(w,function(x){if(this._converter){var E=x.graphics,y,D,G=E?E.length:0;for(y=0;y<G;y++)(D=E[y].geometry)&&E[y].setGeometry(this._converter(D))}r.addLayer(x)},this);this.setVisibility(this.visible);
this._fireUpdateEnd()},_removeInternalLayers:function(){var r=this._map;r&&n.forEach(this.getFeatureLayers(),r.removeLayer,r)},setScaleRange:function(r,w){this.inherited(arguments);n.forEach(this.getFeatureLayers(),function(u){u.setScaleRange(r,w)});this._options.minScale=this.minScale;this._options.maxScale=this.maxScale},setOpacity:function(r){this.opacity!=r&&(n.forEach(this.getFeatureLayers(),function(w){w.setOpacity(r)}),this.opacity=this._options.opacity=r,this.onOpacityChange(r))},onVisibilityChange:function(r){this._fireUpdateStart();
n.forEach(this.getFeatureLayers(),function(w){w.setVisibility(r)});this._fireUpdateEnd()},_setMap:function(r,w){this.inherited(arguments);this._map=r;var u=this._div=q.create("div",null,w);d.set(u,"position","absolute");this._addInternalLayers();this.evaluateSuspension();return u},_unsetMap:function(r,w){this._io&&this._io.cancel();e.disconnect(this._extChgHandle);delete this._extChgHandle;this._removeInternalLayers();var u=this._div;u&&(w.removeChild(u),q.destroy(u));this._div=null;this.inherited(arguments)}});
c("extend-esri")&&m.setObject("layers._ServiceGeneratedFeatureCollection",H,a);return H})},"esri/dijit/analysis/ItemTypes":function(){define(["dojo/_base/lang","dojo/has","../../kernel"],function(H,e,m){var n={BIGDATA:"Big Data File Share",CSV:"CSV",XLS:"Microsoft Excel",FS:"Feature Service",MS:"Map Service",IS:"Image Service",FLAYER:"Feature Layer",BDATAFEATURE:"featureClass",TABLE:"Table",BTABLE:"table",FLAYERVIEW:"FeatureLayerView",MVGRID:"Multi-Variable Grid",GPSERVICE:"Geoprocessing Service",
RFT:"Raster function template",BDFSTEMPLATE:"bdfstemplate",DLPK:"Deep Learning Package",FILE:"files",DOC:"documents",IMG:"images",PDF:"pdfs",CSVS:"csvs"};e("extend-esri")&&H.setObject("dijit.analysis.itemTypes",n,m);return n})},"esri/dijit/analysis/FeatureRecordSetLayer":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../../tasks/DataFile","../../kernel"],function(H,e,m,n,q){H=H(n,{declaredClass:"esri.dijit.analysis.FeatureRecordSetLayer",constructor:function(d){d&&e.mixin(this,
d)},toJson:function(){var d={};this.url&&(d.url=this.url);this.filter&&(d.filter=this.filter);this.serviceToken&&(d.serviceToken=this.serviceToken);this.featureSet&&(d.featureSet=this.featureSet);this.layerDefinition&&(d.layerDefinition=this.layerDefinition);this.time&&(d.time=this.time);return d}});m("extend-esri")&&e.setObject("dijit.analysis.FeatureRecordSetLayer",H,q);return H})},"esri/dijit/analysis/PluginLayers":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/dom-construct dojo/Deferred dojo/promise/all dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-style dojo/query dojo/store/Memory dojo/store/Observable dojo/Evented dojo/has ./ItemTypes ../../request ../../kernel ../../lang dgrid/OnDemandGrid dgrid/Selection ./AnalysisRegistry dojo/i18n!../../nls/jsapi".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D){var G=H([l],{infoPanelTemplate:'\x3cdiv\x3e\x3cdiv class\x3d"template-info-showing"\x3e\x3cdiv\x3e\x3cimg width\x3d\'16px\' height\x3d\'16px\' alt\x3d\'\' src\x3d\'${item.iconUrl}\'\x3e\x3c/div\x3e\x3ch4\x3e${item.title}\x3c/h4\x3e\x3cdiv class\x3d"template-info"\x3e\x3cp class\x3d""\x3e${item.snippet}\x3c/p\x3e${item:plugIn._showLayers}\x3cdiv id\x3d"${item.id}_details" class\x3d"quiet-scroll layer-container"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"panel-actions"\x3e${item:plugIn._addLayerToMap}\x3cbutton class\x3d"btn blue btn-main disabled" id\x3d"add-layer"\x3e${i18n.common.addLayerBtnLabel}\x3c/button\x3e\x3cbutton class\x3d"btn btn-cancel" id\x3d"close-panel"\x3e${i18n.common.close}\x3c/button\x3e\x3c/div\x3e\x3cdiv\x3e',
geometryTypes:[y.GeometryTypes.Point,y.GeometryTypes.Point.MultiPoint,y.GeometryTypes.Line,y.GeometryTypes.Polygon],layerTypes:[r.FLAYER,r.BDATAFEATURE,r.BTABLE,r.TABLE],timeTypes:[y.TimeTypes.Instant,y.TimeTypes.Interval],checkGeometryType:!0,checkLayerType:!1,checkTimeFilter:!1,fetchType:['type:"'+r.MS+'"','type:"'+r.FS+'"'],constructor:function(A){e.mixin(this,A);this.filters={all:{},mycontent:{owners:this.self?[this.self.user.username]:[]},esriBoundaryLayers:{owners:["esri_boundaries"]}};this.i18n=
e.mixin({},D.browseLayersDlg);e.mixin(this.i18n,D.browseItems);e.mixin(this.i18n,D.common);this.filterStrings={all:{title:this.self&&this.self.isPortal?this.i18n.items.portalOrg:this.i18n.items.organizationLabel},mycontent:{title:this.i18n.items.contentLabel},esriBoundaryLayers:{title:this.i18n.esriBoundaryLayers}}},fetchData:function(){this._portal=this.parent._portal;this._user=this._portal.getPortalUser();this.filters.mycontent.owner=this._user;this.parent.fetchType&&(this.fetchType=this.parent.fetchType);
return this._fetchItems()},_fetchItems:function(){return this.parent._fetchItems({types:this.fetchType})},_fetchServiceInfo:function(A){var t=new q,v,C={f:"json"};A.url?(-1!==window.location.protocol.indexOf("https:")&&(A.url=A.url.replace("http:","https:")),w({url:A.url,content:C}).then(function(J){t.resolve(J)},e.hitch(this,function(J){v=J.details&&J.details.length?J.details.shift():"";J&&403===J.httpCode&&-1<v.indexOf("SSL Required")?(A.set("url",A.url.replace("http:","https:")),this._fetchServiceInfo(A).then(function(L){t.resolve(L)})):
(A.isLoaded=!0,t.resolve({error:J}))}))):t.resolve(null);return t},_addLayerToMap:function(A){return A.type===r.BIGDATA||A.type===r.CSV||A.type===r.XLS?"":'\x3cdiv class\x3d"esriFloatLeading esriLeadingPadding1 padding-trailer-half js-add-layer-node"\x3e\x3clabel\x3e\x3cinput name\x3d"addlayertomap" class\x3d"js-add-layer-checkbox" type\x3d"checkbox"\x3e\x3cspan class\x3d"esriLeadingPadding1"\x3e'+this.i18n.common.addLayer+"\x3c/span\x3e\x3c/label\x3e\x3c/div\x3e"},_showLayers:function(A){if(A&&-1!==
m.indexOf([r.FS,r.MS,r.IS,r.BIGDATA,r.CSV,r.XLS],A.type)){if(A.type===r.CSV||A.type===r.XLS)A.url=A.itemUrl;this.plugIn._fetchServiceInfo(A).then(e.hitch(this,function(t){var v=[],C={f:"json"};t.layers&&(v=[].concat(v).concat(t.layers));t.tables&&0<t.tables.length&&(v=[].concat(v).concat(t.tables));t.children&&(v=t.children);!A||A.type!==r.CSV&&A.type!==r.XLS&&A.type!==r.IS||(v=[A]);if(!v.length)var J=this.plugIn.i18n.noDataMessages.noItemInfo;this.plugIn._createLayerGrid(n.create("div",null,c.byId(A.id+
"_details")),J);m.forEach(v,function(L,S){A.type===r.BIGDATA?(L.url=A.url+"/"+L.name,L.url=encodeURI(L.url)):L.url=A.type===r.CSV?A.itemUrl:A.type===r.IS?A.url:A.url+"/"+S;-1!==window.location.protocol.indexOf("https:")&&(L.url=L.url.replace("http:","https:"));w({url:L.url,content:C}).then(e.hitch(this,function(U){L=e.mixin(L,U);this.plugIn._store.put(L);this.plugIn._grid.refresh()}),e.hitch(this,function(U){this.plugIn._grid.noDataMessage=this.plugIn.i18n.noDataMessages.noLayerInfo;this.plugIn._grid.refresh()}))},
this)}))}return""},_getLayerHead:function(){return"\x3ctr\x3e\x3cth\x3e\x3c/th\x3e\x3cth\x3eLayer Name\x3c/th\x3e\x3cth\x3e Geometry Type\x3c/th\x3e\x3c/tr\x3e"},_getLayerNode:function(A,t,v){t=A.name;var C='\x3ctr\x3e\x3ctd\x3e\x3cinput type\x3d"checkbox" class\x3d"js-layer-check" name\x3d"layers" value\x3d"'+t+' checked"\x3e\x3c/td\x3e\x3ctd\x3e',J="\x3c/td\x3e\x3ctd\x3e"+A.geometryType+"\x3c/td\x3e\x3c/tr\x3e";return A.itemUrl||A.url?C+'\x3ca class\x3d"'+(v||"")+'"\x3e'+t+"\x3c/a\x3e"+J:C+t+J},
_createLayerGrid:function(A,t){var v=H([x,E]);this._store=f(new k({idProperty:"name"}));this._atleastALayerAvailable=!1;this._grid=new v({store:this._store,query:e.hitch(this,function(C){var J=!0,L=!0,S=!0,U=!0;this.checkGeometryType&&C.type!==r.IS&&(S=-1!==m.indexOf(this.geometryTypes,C.geometryType));this.checkTimeFilter&&(J=-1!==m.indexOf(this.timeTypes,this.getTimeType(C)));this.checkLayerType&&(L=-1!==m.indexOf(this.layerTypes,C.type));"function"===typeof this.customCheckHandler&&(U=this.customCheckHandler(C));
C=C&&S&&J&&L&&U;C||(this._grid.noDataMessage=this.getNoDataMessage({geomCheck:S,timeCheck:J,typeCheck:L,customCheck:U}));!this._atleastALayerAvailable&&C&&(this._atleastALayerAvailable=C);g(".js-add-layer-checkbox",this.parent.infoPanel).forEach(function(aa){a.set(aa,"disabled",!this._atleastALayerAvailable)},this);return C}),selectionMode:"single","class":"esriAnalysisLayersGrid quiet-scroll",noDataMessage:t||this.i18n.noValidLayerMsg,allowSelect:e.hitch(this,function(C){var J;this.checkLayerType&&
C.data&&(J=-1!==m.indexOf(this.layerTypes,C.data.type));J=C.data.geometryType?-1!==m.indexOf(this.geometryTypes,C.data.geometryType)||this.checkLayerType&&J:!0;return C&&C.data&&J}),renderRow:e.hitch(this,this._renderer)},A);this._grid.startup();this._grid.on("dgrid-select,dgrid-deselect",e.hitch(this,function(C){C=C.grid.selection;var J=[];for(L in C)C[L]&&J.push(this._grid.row(L).data);var L={selection:J};g(".panel-actions .btn-main",this.parent.infoPanel).forEach(function(S){b.toggle(S,"disabled",
0===J.length)},this);J[0]&&(this._selectedLayer=J[0]);this.emit("layer-change",L)}))},hasTimeInfo:function(A){return A&&A.timeInfo},getTimeType:function(A){return A?B.isDefined(A.timeInfo)&&B.isDefined(A.timeInfo.startTimeField)&&!B.isDefined(A.timeInfo.endTimeField)?y.TimeTypes.Instant:B.isDefined(A.timeInfo)&&B.isDefined(A.timeInfo.startTimeField)&&B.isDefined(A.timeInfo.endTimeField)?y.TimeTypes.Interval:B.isDefined(A.time)&&B.isDefined(A.time.timeType)?A.time.timeType:!1:!1},getNoDataMessage:function(A){if(A.geomCheck)if(A.timeCheck){if(!A.typeCheck)return this.i18n.noDataMessages.typeCheckFailure;
if(!A.customCheck)return this.customCheckFailureMessage}else return this.i18n.noDataMessages.timeCheckFailure;else return this.i18n.noDataMessages.geomCheckFailure},getDateFields:function(A){return m.filter(A&&A.fields||[],function(t){return t&&"esriFieldTypeDate"===t.type})},_renderer:function(A){A.snippet=A.snippet||"";var t=n.create("div"),v=this._getLabel(A);n.place('\x3cdiv class\x3d"panel panel-white panel-bordered panel-compact border-bottom-clear"\x3e\x3ch5 class\x3d"trailer-0 font-size-0 word-break"\x3e\x3ca\x3e'+
A.name+'\x3c/a\x3e\x3c/h5\x3e\x3cnav class\x3d"inline-block"\x3e\x3ca class\x3d"link-gray font-size--2 esriTrailingPadding1 esriTrailingMargin05"\x3e\x3cspan class\x3d"'+v.icon+'"\x3e\x3c/span\x3e'+v.name+"\x3c/a\x3e"+(A.timeInfo||A.time&&"instant"===A.time.timeType?'\x3ca class\x3d"link-gray font-size--2 esriTrailingPadding1" data-action\x3d"timeSettings" data-layerid\x3d"0"\x3e\x3cspan class\x3d"esri-icon-time-clock"\x3e\x3c/span\x3e'+this.i18n.timeEnabled+"\x3c/a\x3e":'\x3ca class\x3d"esriTrailingPadding1"\x3e\x3c/a\x3e')+
"\x3c/nav\x3e\x3c/div\x3e",t);return t},_getLabel:function(A){var t={icon:"",name:""},v=A.geometryType;v===y.GeometryTypes.Point||v===y.GeometryTypes.MultiPoint?(t.name=this.i18n.points,t.icon="esri-icon-map-pin"):v===y.GeometryTypes.Polygon?(t.name=this.i18n.areas,t.icon="esri-icon-polygon"):v===y.GeometryTypes.Line?(t.name=this.i18n.lines,t.icon="esri-icon-polyline"):A.type===r.IS?(t.name=this.i18n.imageService,t.icon="esri-icon-layers"):(t.name=this.i18n.table,t.icon="esri-icon-table");return t}});
e.mixin(G,{add:function(A,t){A.plugIn||(t=t||{},t.parent=A,t.self=A.self,A.plugIn=new G(t))},remove:function(A){A.plugIn&&(A.plugIn.destroy(),delete A.plugIn)}});p("extend-esri")&&e.setObject("dijit.analysis.PluginLayers",G,u);return G})},"esri/dijit/analysis/AnalysisRegistry":function(){define(["dojo/_base/lang","dojo/has","../../kernel"],function(H,e,m){var n={Modes:{Raster:"raster",Bigdata:"bigdata",Standard:"standard",Feature:"feature"},Tools:{FindCentroids:"FindCentroids",ChooseBestFacilities:"ChooseBestFacilities"},
ProcessInfoTools:{DescribeDataset:{Name:"DescribeDataset",Gax:!0,Std:!1},GeneralizedLinearRegression:{Name:"GeneralizedLinearRegression",Gax:!0,Std:!1},ForestBasedClassificationAndRegression:{Name:"ForestBasedClassificationAndRegression",Gax:!0,Std:!1},GeographicallyWeightedRegression:{Name:"GeographicallyWeightedRegression",Gax:!0,Std:!1},FindSimilarLocations:{Name:"FindSimilarLocations",Gax:!0,Std:!0},FindHotSpots:{Name:"FindHotSpots",Gax:!1,Std:!0},FindOutliers:{Name:"FindOutliers",Gax:!0,Std:!0}},
ToolCategory:{Gax:"GeoAnalyticsTools",Std:"SpatialAnalysisTools"},GeometryTypes:{Polygon:"esriGeometryPolygon",Line:"esriGeometryPolyline",Point:"esriGeometryPoint",MultiPoint:"esriGeometryMultipoint"},PseudoGeometryTypes:{Point:"point",Line:"line",Polygon:"polygon"},TimeTypes:{Instant:"instant",Interval:"interval"},FieldTypes:{ObjectId:"esriFieldTypeOID",String:"esriFieldTypeString",Short:"esriFieldTypeSmallInteger",Integer:"esriFieldTypeInteger",Float:"esriFieldTypeSingle",Double:"esriFieldTypeDouble",
Date:"esriFieldTypeDate"},PseudoFieldTypes:{Number:"number",String:"string",Date:"date"},Shapes:{square:"SQUARE",hexagon:"HEXAGON",transverseHexagon:"TRANSVERSEHEXAGON",triangle:"TRIANGLE",diamond:"DIAMOND"},DistanceMethods:{geodesic:"Geodesic",planar:"Planar"}};e("extend-esri")&&H.setObject("dijit.analysis.AnalysisRegistry",n,m);return n})},"esri/dijit/analysis/PCSList":function(){define(["dojo/_base/lang","dojo/has","../../kernel"],function(H,e,m){var n=[2E3,2001,2002,2003,2004,2005,2006,2007,2008,
2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2070,2071,2072,2073,2074,2075,2076,2077,2078,2079,2080,2081,2082,2083,2084,2085,2086,2087,2088,2089,2090,2091,2092,2093,2094,2095,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,2118,2119,
2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2137,2138,2139,2140,2141,2142,2143,2144,2145,2146,2147,2148,2149,2150,2151,2152,2153,2154,2155,2157,2158,2159,2160,2161,2162,2163,2164,2165,2166,2167,2168,2169,2170,2172,2173,2174,2175,2176,2177,2178,2179,2180,2181,2182,2183,2184,2185,2186,2187,2188,2189,2190,2191,2192,2193,2195,2196,2197,2198,2200,2201,2202,2203,2204,2205,2206,2207,2208,2209,2210,2211,2212,2213,2214,2215,2216,2217,2219,2220,2222,2223,2224,2225,2226,
2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2245,2246,2247,2248,2249,2250,2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2290,2291,2292,2294,2295,2308,2309,2310,2311,2312,2313,2314,2315,2316,2317,2318,2319,2320,2321,2322,2323,2324,2325,2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,
2341,2342,2343,2344,2345,2346,2347,2348,2349,2350,2351,2352,2353,2354,2355,2356,2357,2358,2359,2360,2361,2362,2363,2364,2365,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2384,2385,2386,2387,2388,2389,2390,2391,2392,2393,2394,2395,2396,2397,2398,2399,2400,2401,2402,2403,2404,2405,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2416,2417,2418,2419,2420,2421,2422,2423,2424,2425,2426,2427,2428,2429,2430,2431,2432,2433,2434,2435,2436,2437,2438,2439,2440,2441,
2442,2443,2444,2445,2446,2447,2448,2449,2450,2451,2452,2453,2454,2455,2456,2457,2458,2459,2460,2461,2462,2463,2464,2465,2466,2467,2468,2469,2470,2471,2472,2473,2474,2475,2476,2477,2478,2479,2480,2481,2482,2483,2484,2485,2486,2487,2488,2489,2490,2491,2494,2495,2496,2497,2498,2499,2500,2501,2502,2503,2504,2505,2506,2507,2508,2509,2510,2511,2512,2513,2514,2515,2516,2517,2518,2519,2520,2521,2522,2523,2524,2525,2526,2527,2528,2529,2530,2531,2532,2533,2534,2535,2536,2537,2538,2539,2540,2541,2542,2543,2544,
2545,2546,2547,2548,2549,2550,2551,2552,2553,2554,2555,2556,2557,2558,2559,2560,2561,2562,2563,2564,2565,2566,2567,2568,2569,2570,2571,2572,2573,2574,2575,2576,2577,2578,2579,2580,2581,2582,2583,2584,2585,2586,2587,2588,2589,2590,2591,2592,2593,2594,2595,2596,2597,2598,2599,2600,2601,2602,2603,2604,2605,2606,2607,2608,2609,2610,2611,2612,2613,2614,2615,2616,2617,2618,2619,2620,2621,2622,2623,2624,2625,2626,2627,2628,2629,2630,2631,2632,2633,2634,2635,2636,2637,2638,2639,2640,2641,2642,2643,2644,2645,
2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2658,2659,2660,2661,2662,2663,2664,2665,2666,2667,2668,2669,2670,2671,2672,2673,2674,2675,2676,2677,2678,2679,2680,2681,2682,2683,2684,2685,2686,2687,2688,2689,2690,2691,2692,2693,2694,2695,2696,2697,2698,2699,2700,2701,2702,2703,2704,2705,2706,2707,2708,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,2719,2720,2721,2722,2723,2724,2725,2726,2727,2728,2729,2730,2731,2732,2733,2734,2735,2736,2737,2738,2739,2740,2741,2742,2743,2744,2745,2746,
2747,2748,2749,2750,2751,2752,2753,2754,2755,2756,2757,2758,2759,2760,2761,2762,2763,2764,2765,2766,2767,2768,2769,2770,2771,2772,2773,2774,2775,2776,2777,2778,2779,2780,2781,2782,2783,2784,2785,2786,2787,2788,2789,2790,2791,2792,2793,2794,2795,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,2810,2811,2812,2813,2814,2815,2816,2817,2818,2819,2820,2821,2822,2823,2824,2825,2826,2827,2828,2829,2830,2831,2832,2833,2834,2835,2836,2837,2838,2839,2840,2841,2842,2843,2844,2845,2846,2847,
2848,2849,2850,2851,2852,2853,2854,2855,2856,2857,2858,2859,2860,2861,2862,2863,2864,2865,2866,2867,2868,2869,2870,2871,2872,2873,2874,2875,2876,2877,2878,2879,2880,2881,2882,2883,2884,2885,2886,2887,2888,2891,2892,2893,2894,2895,2896,2897,2898,2899,2900,2901,2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914,2915,2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,2931,2932,2933,2934,2935,2936,2937,2938,2939,2940,2941,2942,2943,2944,2945,2946,2947,2948,2949,2950,
2951,2952,2953,2954,2955,2956,2957,2958,2959,2960,2961,2962,2964,2965,2966,2967,2968,2969,2970,2971,2972,2973,2975,2976,2977,2978,2979,2980,2981,2982,2983,2984,2985,2986,2987,2988,2989,2990,2991,2992,2993,2994,2995,2996,2997,2998,2999,3E3,3001,3002,3003,3004,3005,3006,3007,3008,3009,3010,3011,3012,3013,3014,3015,3016,3017,3018,3019,3020,3021,3022,3023,3024,3025,3026,3027,3028,3029,3030,3031,3032,3033,3034,3035,3036,3037,3038,3039,3040,3041,3042,3043,3044,3045,3046,3047,3048,3049,3050,3051,3054,3055,
3056,3057,3058,3059,3060,3061,3062,3063,3064,3065,3066,3067,3068,3069,3070,3071,3072,3073,3074,3075,3076,3077,3078,3079,3080,3081,3082,3083,3084,3085,3086,3087,3088,3089,3090,3091,3092,3093,3094,3095,3096,3097,3098,3099,3100,3101,3102,3106,3107,3108,3109,3110,3111,3112,3113,3114,3115,3116,3117,3118,3119,3120,3121,3122,3123,3124,3125,3126,3127,3128,3129,3130,3131,3132,3133,3134,3135,3136,3137,3138,3141,3142,3146,3147,3148,3149,3150,3151,3153,3154,3155,3156,3157,3158,3159,3160,3161,3162,3163,3164,3165,
3166,3167,3168,3169,3170,3171,3172,3174,3175,3176,3177,3178,3179,3180,3181,3182,3183,3184,3185,3186,3187,3188,3189,3190,3191,3192,3193,3194,3195,3196,3197,3198,3199,3200,3201,3202,3203,3294,3295,3296,3297,3298,3299,3300,3301,3302,3303,3304,3305,3306,3307,3308,3309,3310,3311,3312,3313,3314,3315,3316,3317,3318,3319,3320,3321,3322,3323,3324,3325,3326,3327,3328,3329,3330,3331,3332,3333,3334,3335,3336,3337,3338,3339,3340,3341,3342,3343,3344,3345,3346,3347,3348,3349,3350,3351,3352,3353,3354,3355,3356,3357,
3358,3359,3360,3361,3362,3363,3364,3365,3366,3367,3368,3369,3370,3371,3372,3373,3374,3375,3376,3377,3378,3379,3380,3381,3382,3383,3384,3385,3386,3387,3388,3389,3390,3391,3392,3393,3394,3395,3396,3397,3398,3399,3400,3401,3402,3403,3404,3405,3406,3407,3408,3409,3410,3411,3412,3413,3414,3415,3416,3417,3418,3419,3420,3421,3422,3423,3424,3425,3426,3427,3428,3429,3430,3431,3432,3433,3434,3435,3436,3437,3438,3439,3440,3441,3442,3443,3444,3445,3446,3447,3448,3449,3450,3451,3452,3453,3454,3455,3456,3457,3458,
3459,3460,3461,3462,3463,3464,3465,3466,3467,3468,3469,3470,3471,3472,3473,3474,3475,3476,3477,3478,3479,3480,3481,3482,3483,3484,3485,3486,3487,3488,3489,3490,3491,3492,3493,3494,3495,3496,3497,3498,3499,3500,3501,3502,3503,3504,3505,3506,3507,3508,3509,3510,3511,3512,3513,3514,3515,3516,3517,3518,3519,3520,3521,3522,3523,3524,3525,3526,3527,3528,3529,3530,3531,3532,3533,3534,3535,3536,3537,3538,3539,3540,3541,3542,3543,3544,3545,3546,3547,3548,3549,3550,3551,3552,3553,3554,3555,3556,3557,3558,3559,
3560,3561,3562,3563,3564,3565,3566,3567,3568,3569,3570,3571,3572,3573,3574,3575,3576,3577,3578,3579,3580,3581,3582,3583,3584,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,3643,3644,3645,3646,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,
3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,3676,3677,3678,3679,3680,3681,3682,3683,3684,3685,3686,3687,3688,3689,3690,3691,3692,3693,3694,3695,3696,3697,3698,3699,3700,3701,3702,3703,3704,3705,3706,3707,3708,3709,3710,3711,3712,3713,3714,3715,3716,3717,3718,3719,3720,3721,3722,3723,3724,3725,3726,3727,3728,3729,3730,3731,3732,3733,3734,3735,3736,3737,3738,3739,3740,3741,3742,3743,3744,3745,3746,3747,3748,3749,3750,3751,3753,3754,3755,3756,3757,3758,3759,3760,3761,3762,
3763,3764,3765,3766,3767,3768,3769,3770,3771,3772,3773,3775,3776,3777,3779,3780,3781,3783,3784,3785,3788,3789,3790,3791,3793,3794,3797,3798,3799,3800,3801,3802,3812,3814,3815,3816,3825,3826,3827,3828,3829,3832,3833,3834,3835,3836,3837,3838,3839,3840,3841,3844,3845,3846,3847,3848,3849,3850,3851,3852,3854,3857,3873,3874,3875,3876,3877,3878,3879,3880,3881,3882,3883,3884,3885,3890,3891,3892,3893,3907,3908,3909,3910,3911,3912,3920,3942,3943,3944,3945,3946,3947,3948,3949,3950,3968,3969,3970,3973,3974,3975,
3976,3978,3979,3986,3987,3988,3989,3991,3992,3994,3995,3996,3997,4026,4037,4038,4048,4049,4050,4051,4056,4057,4058,4059,4060,4061,4062,4063,4071,4082,4083,4087,4088,4093,4094,4095,4096,4217,4390,4391,4392,4393,4394,4395,4396,4397,4398,4399,4400,4401,4402,4403,4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4414,4415,4417,4418,4419,4420,4421,4422,4423,4424,4425,4426,4427,4428,4429,4430,4431,4432,4433,4434,4437,4438,4439,4455,4456,4457,4462,4467,4471,4474,4484,4485,4486,4487,4488,4489,4491,4492,4493,
4494,4495,4496,4497,4498,4499,4500,4501,4502,4503,4504,4505,4506,4507,4508,4509,4510,4511,4512,4513,4514,4515,4516,4517,4518,4519,4520,4521,4522,4523,4524,4525,4526,4527,4528,4529,4530,4531,4532,4533,4534,4535,4536,4537,4538,4539,4540,4541,4542,4543,4544,4545,4546,4547,4548,4549,4550,4551,4552,4553,4554,4559,4568,4569,4570,4571,4572,4573,4574,4575,4576,4577,4578,4579,4580,4581,4582,4583,4584,4585,4586,4587,4588,4589,4647,4652,4653,4654,4655,4656,4766,4767,4768,4769,4770,4771,4772,4773,4774,4775,4776,
4777,4778,4779,4780,4781,4782,4783,4784,4785,4786,4787,4788,4789,4790,4791,4792,4793,4794,4795,4796,4797,4798,4799,4800,4822,4826,4839,5014,5015,5016,5018,5048,5069,5070,5071,5072,5105,5106,5107,5108,5109,5110,5111,5112,5113,5114,5115,5116,5117,5118,5119,5120,5121,5122,5123,5124,5125,5126,5127,5128,5129,5130,5167,5168,5173,5174,5175,5176,5177,5178,5179,5180,5181,5182,5183,5184,5185,5186,5187,5188,5221,5223,5234,5235,5243,5247,5253,5254,5255,5256,5257,5258,5259,5266,5269,5270,5271,5272,5273,5274,5275,
5292,5293,5294,5295,5296,5297,5298,5299,5300,5301,5302,5303,5304,5305,5306,5307,5308,5309,5310,5311,5316,5320,5321,5325,5329,5330,5331,5337,5343,5344,5345,5346,5347,5348,5349,5355,5356,5357,5361,5362,5367,5382,5383,5387,5388,5389,5396,5456,5457,5459,5460,5461,5462,5463,5469,5472,5479,5480,5481,5482,5490,5513,5514,5518,5519,5520,5523,5530,5531,5532,5533,5534,5535,5536,5537,5538,5539,5550,5551,5552,5559,5562,5563,5564,5565,5566,5567,5568,5569,5570,5571,5572,5573,5574,5575,5576,5577,5578,5579,5580,5581,
5582,5583,5588,5589,5596,5623,5624,5625,5627,5629,5631,5632,5633,5634,5635,5636,5637,5638,5639,5641,5643,5644,5646,5649,5650,5651,5652,5653,5654,5655,5659,5663,5664,5665,5666,5667,5668,5669,5670,5671,5672,5673,5674,5675,5676,5677,5678,5679,5680,5682,5683,5684,5685,5700,5825,5836,5837,5839,5842,5844,5858,5875,5876,5877,5879,5880,5887,5890,5921,5922,5923,5924,5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,5936,5937,5938,5939,5940,6050,6051,6052,6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,
6063,6064,6065,6066,6067,6068,6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080,6081,6082,6083,6084,6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096,6097,6098,6099,6100,6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,6111,6112,6113,6114,6115,6116,6117,6118,6119,6120,6121,6122,6123,6124,6125,6128,6129,6141,6204,6210,6211,6244,6245,6246,6247,6248,6249,6250,6251,6252,6253,6254,6255,6256,6257,6258,6259,6260,6261,6262,6263,6264,6265,6266,6267,6268,6269,6270,6271,6272,6273,6274,6275,
6307,6312,6316,6328,6329,6330,6331,6332,6333,6334,6335,6336,6337,6338,6339,6340,6341,6342,6343,6344,6345,6346,6347,6348,6350,6351,6352,6353,6354,6355,6356,6362,6366,6367,6368,6369,6370,6371,6372,6381,6382,6383,6384,6385,6386,6387,6391,6393,6394,6395,6396,6397,6398,6399,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,6411,6412,6413,6414,6415,6416,6417,6418,6419,6420,6421,6422,6423,6424,6425,6426,6427,6428,6429,6430,6431,6432,6433,6434,6435,6436,6437,6438,6439,6440,6441,6442,6443,6444,6445,6446,
6447,6448,6449,6450,6451,6452,6453,6454,6455,6456,6457,6458,6459,6460,6461,6462,6463,6464,6465,6466,6467,6468,6469,6470,6471,6472,6473,6474,6475,6476,6477,6478,6479,6480,6481,6482,6483,6484,6485,6486,6487,6488,6489,6490,6491,6492,6493,6494,6495,6496,6497,6498,6499,6500,6501,6502,6503,6504,6505,6506,6507,6508,6509,6510,6511,6512,6513,6514,6515,6516,6518,6519,6520,6521,6522,6523,6524,6525,6526,6527,6528,6529,6530,6531,6532,6533,6534,6535,6536,6537,6538,6539,6540,6541,6542,6543,6544,6545,6546,6547,6548,
6549,6550,6551,6552,6553,6554,6555,6556,6557,6558,6559,6560,6561,6562,6563,6564,6565,6566,6567,6568,6569,6570,6571,6572,6573,6574,6575,6576,6577,6578,6579,6580,6581,6582,6583,6584,6585,6586,6587,6588,6589,6590,6591,6592,6593,6594,6595,6596,6597,6598,6599,6600,6601,6602,6603,6605,6606,6607,6608,6609,6610,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,6622,6623,6624,6625,6626,6627,6628,6629,6630,6631,6632,6633,6634,6635,6636,6637,6646,6669,6670,6671,6672,6673,6674,6675,6676,6677,6678,6679,6680,
6681,6682,6683,6684,6685,6686,6687,6688,6689,6690,6691,6692,6703,6707,6708,6709,6720,6721,6722,6723,6732,6733,6734,6735,6736,6737,6738,6784,6785,6786,6787,6788,6789,6790,6791,6792,6793,6794,6795,6796,6797,6798,6799,6800,6801,6802,6803,6804,6805,6806,6807,6808,6809,6810,6811,6812,6813,6814,6815,6816,6817,6818,6819,6820,6821,6822,6823,6824,6825,6826,6827,6828,6829,6830,6831,6832,6833,6834,6835,6836,6837,6838,6839,6840,6841,6842,6843,6844,6845,6846,6847,6848,6849,6850,6851,6852,6853,6854,6855,6856,6857,
6858,6859,6860,6861,6862,6863,6867,6868,6870,6875,6876,6879,6880,6884,6885,6886,6887,6915,6922,6923,6924,6925,6931,6932,6933,6956,6957,6958,6959,6962,6984,6991,7005,7006,7007,7057,7058,7059,7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,7074,7075,7076,7077,7078,7079,7080,7081,7082,7109,7110,7111,7112,7113,7114,7115,7116,7117,7118,7119,7120,7121,7122,7123,7124,7125,7126,7127,7128,7131,7132,7257,7258,7259,7260,7261,7262,7263,7264,7265,7266,7267,7268,7269,7270,7271,7272,7273,7274,7275,7276,7277,
7278,7279,7280,7281,7282,7283,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293,7294,7295,7296,7297,7298,7299,7300,7301,7302,7303,7304,7305,7306,7307,7308,7309,7310,7311,7312,7313,7314,7315,7316,7317,7318,7319,7320,7321,7322,7323,7324,7325,7326,7327,7328,7329,7330,7331,7332,7333,7334,7335,7336,7337,7338,7339,7340,7341,7342,7343,7344,7345,7346,7347,7348,7349,7350,7351,7352,7353,7354,7355,7356,7357,7358,7359,7360,7361,7362,7363,7364,7365,7366,7367,7368,7369,7370,7374,7375,7376,7528,7529,7530,7531,7532,
7533,7534,7535,7536,7537,7538,7539,7540,7541,7542,7543,7544,7545,7546,7547,7548,7549,7550,7551,7552,7553,7554,7555,7556,7557,7558,7559,7560,7561,7562,7563,7564,7565,7566,7567,7568,7569,7570,7571,7572,7573,7574,7575,7576,7577,7578,7579,7580,7581,7582,7583,7584,7585,7586,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598,7599,7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614,7615,7616,7617,7618,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628,7629,7630,7631,7632,7633,
7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,7845,7846,7847,7848,7849,7850,7851,7852,7853,7854,7855,7856,7857,7858,7859,20002,20003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20013,20014,20015,20016,20017,20018,20019,20020,20021,20022,20023,20024,20025,20026,20027,20028,20029,20030,20031,20032,20062,20063,20064,20065,20066,20067,20068,20069,20070,20071,20072,20073,20074,20075,20076,20077,20078,20079,20080,20081,20082,20083,20084,20085,20086,20087,20088,20089,20090,20091,
20092,20135,20136,20137,20138,20248,20249,20250,20251,20252,20253,20254,20255,20256,20257,20258,20348,20349,20350,20351,20352,20353,20354,20355,20356,20357,20358,20436,20437,20438,20439,20440,20499,20538,20539,20790,20791,20822,20823,20824,20934,20935,20936,21035,21036,21037,21095,21096,21097,21148,21149,21150,21291,21292,21413,21414,21415,21416,21417,21418,21419,21420,21421,21422,21423,21473,21474,21475,21476,21477,21478,21479,21480,21481,21482,21483,21500,21780,21781,21782,21817,21818,21891,21892,
21893,21894,21896,21897,21898,21899,22032,22033,22091,22092,22171,22172,22173,22174,22175,22176,22177,22181,22182,22183,22184,22185,22186,22187,22191,22192,22193,22194,22195,22196,22197,22234,22235,22236,22332,22391,22392,22521,22522,22523,22524,22525,22700,22770,22780,22832,22991,22992,22993,22994,23028,23029,23030,23031,23032,23033,23034,23035,23036,23037,23038,23090,23095,23239,23240,23433,23700,23830,23831,23832,23833,23834,23835,23836,23837,23838,23839,23840,23841,23842,23843,23844,23845,23846,
23847,23848,23849,23850,23851,23852,23853,23866,23867,23868,23869,23870,23871,23872,23877,23878,23879,23880,23881,23882,23883,23884,23886,23887,23888,23889,23890,23891,23892,23893,23894,23946,23947,23948,24047,24048,24100,24200,24305,24306,24311,24312,24313,24342,24343,24344,24345,24346,24347,24370,24371,24372,24373,24374,24375,24376,24377,24378,24379,24380,24381,24382,24383,24500,24547,24548,24571,24600,24718,24719,24720,24721,24817,24818,24819,24820,24821,24877,24878,24879,24880,24881,24882,24891,
24892,24893,25E3,25231,25391,25392,25393,25394,25395,25828,25829,25830,25831,25832,25833,25834,25835,25836,25837,25838,25884,25932,26191,26192,26193,26194,26195,26237,26331,26332,26391,26392,26393,26432,26591,26592,26632,26692,26701,26702,26703,26704,26705,26706,26707,26708,26709,26710,26711,26712,26713,26714,26715,26716,26717,26718,26719,26720,26721,26722,26729,26730,26731,26732,26733,26734,26735,26736,26737,26738,26739,26740,26741,26742,26743,26744,26745,26746,26747,26748,26749,26750,26751,26752,
26753,26754,26755,26756,26757,26758,26759,26760,26761,26762,26763,26764,26765,26766,26767,26768,26769,26770,26771,26772,26773,26774,26775,26776,26777,26778,26779,26780,26781,26782,26783,26784,26785,26786,26787,26788,26789,26790,26791,26792,26793,26794,26795,26796,26797,26798,26799,26801,26802,26803,26811,26812,26813,26847,26848,26849,26850,26851,26852,26853,26854,26855,26856,26857,26858,26859,26860,26861,26862,26863,26864,26865,26866,26867,26868,26869,26870,26891,26892,26893,26894,26895,26896,26897,
26898,26899,26901,26902,26903,26904,26905,26906,26907,26908,26909,26910,26911,26912,26913,26914,26915,26916,26917,26918,26919,26920,26921,26922,26923,26929,26930,26931,26932,26933,26934,26935,26936,26937,26938,26939,26940,26941,26942,26943,26944,26945,26946,26948,26949,26950,26951,26952,26953,26954,26955,26956,26957,26958,26959,26960,26961,26962,26963,26964,26965,26966,26967,26968,26969,26970,26971,26972,26973,26974,26975,26976,26977,26978,26979,26980,26981,26982,26983,26984,26985,26986,26987,26988,
26989,26990,26991,26992,26993,26994,26995,26996,26997,26998,27037,27038,27039,27040,27120,27200,27205,27206,27207,27208,27209,27210,27211,27212,27213,27214,27215,27216,27217,27218,27219,27220,27221,27222,27223,27224,27225,27226,27227,27228,27229,27230,27231,27232,27258,27259,27260,27291,27292,27391,27392,27393,27394,27395,27396,27397,27398,27429,27492,27493,27500,27561,27562,27563,27564,27571,27572,27573,27574,27581,27582,27583,27584,27591,27592,27593,27594,27700,28191,28192,28193,28232,28348,28349,
28350,28351,28352,28353,28354,28355,28356,28357,28358,28402,28403,28404,28405,28406,28407,28408,28409,28410,28411,28412,28413,28414,28415,28416,28417,28418,28419,28420,28421,28422,28423,28424,28425,28426,28427,28428,28429,28430,28431,28432,28462,28463,28464,28465,28466,28467,28468,28469,28470,28471,28472,28473,28474,28475,28476,28477,28478,28479,28480,28481,28482,28483,28484,28485,28486,28487,28488,28489,28490,28491,28492,28600,28991,28992,29100,29101,29118,29119,29120,29121,29122,29168,29169,29170,
29171,29172,29177,29178,29179,29180,29181,29182,29183,29184,29185,29187,29188,29189,29190,29191,29192,29193,29194,29195,29220,29221,29333,29635,29636,29701,29738,29739,29849,29850,29871,29872,29873,29900,29901,29902,29903,30161,30162,30163,30164,30165,30166,30167,30168,30169,30170,30171,30172,30173,30174,30175,30176,30177,30178,30179,30200,30339,30340,30491,30492,30493,30494,30591,30592,30729,30730,30731,30732,30791,30792,30800,31028,31121,31154,31170,31171,31251,31252,31253,31254,31255,31256,31257,
31258,31259,31265,31266,31267,31268,31275,31276,31277,31278,31279,31281,31282,31283,31284,31285,31286,31287,31288,31289,31290,31291,31292,31293,31294,31295,31296,31297,31370,31461,31462,31463,31464,31465,31466,31467,31468,31469,31491,31492,31493,31494,31495,31528,31529,31600,31700,31838,31839,31900,31901,31917,31918,31919,31920,31921,31922,31965,31966,31967,31968,31969,31970,31971,31972,31973,31974,31975,31976,31977,31978,31979,31980,31981,31982,31983,31984,31985,31986,31987,31988,31989,31990,31991,
31992,31993,31994,31995,31996,31997,31998,31999,32E3,32001,32002,32003,32005,32006,32007,32008,32009,32010,32011,32012,32013,32014,32015,32016,32017,32018,32019,32020,32021,32022,32023,32024,32025,32026,32027,32028,32029,32030,32031,32033,32034,32035,32036,32037,32038,32039,32040,32041,32042,32043,32044,32045,32046,32047,32048,32049,32050,32051,32052,32053,32054,32055,32056,32057,32058,32059,32060,32061,32062,32064,32065,32066,32067,32074,32075,32076,32077,32081,32082,32083,32084,32085,32086,32098,
32099,32100,32104,32107,32108,32109,32110,32111,32112,32113,32114,32115,32116,32117,32118,32119,32120,32121,32122,32123,32124,32125,32126,32127,32128,32129,32130,32133,32134,32135,32136,32137,32138,32139,32140,32141,32142,32143,32144,32145,32146,32147,32148,32149,32150,32151,32152,32153,32154,32155,32156,32157,32158,32161,32164,32165,32166,32167,32180,32181,32182,32183,32184,32185,32186,32187,32188,32189,32190,32191,32192,32193,32194,32195,32196,32197,32198,32199,32201,32202,32203,32204,32205,32206,
32207,32208,32209,32210,32211,32212,32213,32214,32215,32216,32217,32218,32219,32220,32221,32222,32223,32224,32225,32226,32227,32228,32229,32230,32231,32232,32233,32234,32235,32236,32237,32238,32239,32240,32241,32242,32243,32244,32245,32246,32247,32248,32249,32250,32251,32252,32253,32254,32255,32256,32257,32258,32259,32260,32301,32302,32303,32304,32305,32306,32307,32308,32309,32310,32311,32312,32313,32314,32315,32316,32317,32318,32319,32320,32321,32322,32323,32324,32325,32326,32327,32328,32329,32330,
32331,32332,32333,32334,32335,32336,32337,32338,32339,32340,32341,32342,32343,32344,32345,32346,32347,32348,32349,32350,32351,32352,32353,32354,32355,32356,32357,32358,32359,32360,32601,32602,32603,32604,32605,32606,32607,32608,32609,32610,32611,32612,32613,32614,32615,32616,32617,32618,32619,32620,32621,32622,32623,32624,32625,32626,32627,32628,32629,32630,32631,32632,32633,32634,32635,32636,32637,32638,32639,32640,32641,32642,32643,32644,32645,32646,32647,32648,32649,32650,32651,32652,32653,32654,
32655,32656,32657,32658,32659,32660,32661,32662,32664,32665,32666,32667,32701,32702,32703,32704,32705,32706,32707,32708,32709,32710,32711,32712,32713,32714,32715,32716,32717,32718,32719,32720,32721,32722,32723,32724,32725,32726,32727,32728,32729,32730,32731,32732,32733,32734,32735,32736,32737,32738,32739,32740,32741,32742,32743,32744,32745,32746,32747,32748,32749,32750,32751,32752,32753,32754,32755,32756,32757,32758,32759,32760,32761,32766,53001,53002,53003,53004,53008,53009,53010,53011,53012,53013,
53014,53015,53016,53017,53018,53019,53021,53022,53023,53024,53025,53026,53027,53028,53029,53030,53031,53032,53034,53042,53043,53044,53045,53046,53048,53049,53074,53075,53076,53077,53078,53079,53080,54001,54002,54003,54004,54008,54009,54010,54011,54012,54013,54014,54015,54016,54017,54018,54019,54021,54022,54023,54024,54025,54026,54027,54028,54029,54030,54031,54032,54034,54042,54043,54044,54045,54046,54048,54049,54050,54051,54052,54053,54074,54075,54076,54077,54078,54079,54080,65061,65062,65161,65163,
102001,102002,102003,102004,102005,102006,102007,102008,102009,102010,102011,102012,102013,102014,102015,102016,102017,102018,102019,102020,102021,102022,102023,102024,102025,102026,102027,102028,102029,102030,102031,102032,102033,102034,102035,102036,102037,102038,102039,102040,102041,102042,102043,102044,102045,102046,102047,102048,102049,102050,102051,102052,102053,102054,102055,102056,102057,102058,102059,102060,102061,102062,102063,102064,102065,102066,102067,102068,102069,102070,102071,102072,
102073,102074,102075,102076,102077,102078,102079,102080,102081,102082,102083,102084,102085,102086,102087,102088,102089,102090,102091,102092,102093,102094,102095,102096,102097,102098,102099,102100,102101,102102,102103,102104,102105,102106,102107,102108,102109,102110,102111,102112,102113,102114,102115,102116,102117,102118,102119,102120,102121,102122,102123,102124,102125,102126,102127,102128,102129,102130,102131,102132,102133,102134,102135,102136,102137,102138,102139,102140,102141,102142,102143,102144,
102145,102146,102147,102148,102149,102150,102151,102152,102153,102154,102155,102156,102157,102158,102159,102160,102161,102162,102163,102164,102165,102166,102167,102168,102169,102170,102171,102172,102173,102174,102175,102176,102177,102178,102179,102180,102181,102182,102183,102184,102185,102186,102187,102188,102189,102190,102191,102192,102193,102194,102195,102196,102197,102198,102199,102200,102201,102202,102203,102204,102205,102206,102207,102208,102209,102210,102211,102212,102213,102214,102215,102216,
102217,102218,102219,102220,102221,102222,102223,102224,102225,102226,102227,102228,102229,102230,102231,102232,102233,102234,102235,102236,102237,102238,102239,102240,102241,102242,102243,102244,102245,102246,102247,102248,102249,102250,102251,102252,102253,102254,102255,102256,102257,102258,102259,102260,102261,102262,102263,102264,102265,102266,102267,102268,102269,102270,102271,102272,102273,102274,102275,102276,102277,102278,102279,102280,102281,102282,102283,102284,102285,102286,102287,102288,
102289,102290,102291,102292,102293,102294,102295,102296,102297,102298,102299,102300,102301,102302,102303,102304,102305,102306,102307,102308,102309,102310,102311,102312,102313,102314,102315,102316,102317,102318,102319,102320,102321,102322,102323,102324,102325,102326,102327,102328,102329,102330,102331,102332,102333,102334,102335,102336,102337,102338,102339,102340,102341,102342,102343,102344,102345,102346,102347,102348,102349,102350,102351,102352,102353,102354,102355,102356,102357,102358,102359,102360,
102361,102362,102363,102364,102365,102366,102367,102368,102369,102370,102371,102372,102373,102374,102375,102376,102377,102378,102379,102380,102381,102382,102383,102384,102385,102386,102387,102388,102389,102390,102391,102392,102393,102394,102395,102396,102397,102398,102399,102400,102401,102402,102403,102404,102405,102406,102407,102408,102409,102410,102411,102412,102413,102414,102415,102416,102417,102418,102419,102420,102421,102422,102423,102424,102425,102426,102427,102428,102429,102430,102431,102432,
102433,102434,102435,102436,102437,102438,102439,102440,102441,102442,102443,102444,102445,102446,102447,102448,102449,102450,102451,102452,102453,102454,102455,102456,102457,102458,102459,102460,102461,102462,102463,102464,102465,102466,102467,102468,102469,102470,102471,102472,102473,102474,102475,102476,102477,102478,102479,102480,102481,102482,102483,102484,102485,102486,102487,102488,102489,102490,102491,102492,102493,102494,102495,102496,102500,102501,102502,102503,102504,102505,102506,102507,
102508,102509,102510,102511,102512,102513,102514,102515,102516,102517,102518,102519,102520,102521,102522,102523,102524,102525,102526,102527,102528,102529,102530,102531,102532,102533,102534,102535,102536,102537,102538,102539,102540,102541,102542,102543,102544,102545,102546,102547,102548,102549,102550,102551,102552,102553,102554,102555,102556,102557,102558,102559,102560,102561,102570,102571,102572,102573,102574,102575,102576,102577,102578,102579,102580,102581,102582,102583,102584,102585,102586,102587,
102588,102589,102590,102591,102592,102593,102594,102595,102596,102597,102598,102599,102600,102601,102602,102603,102604,102605,102606,102607,102608,102609,102610,102611,102612,102613,102614,102615,102616,102617,102618,102619,102620,102621,102622,102623,102624,102625,102626,102627,102628,102629,102630,102631,102632,102633,102634,102635,102636,102637,102638,102639,102640,102641,102642,102643,102644,102645,102646,102647,102648,102649,102650,102651,102652,102653,102654,102655,102656,102657,102658,102659,
102660,102661,102662,102663,102664,102665,102666,102667,102668,102669,102670,102671,102672,102673,102674,102675,102676,102677,102678,102679,102680,102681,102682,102683,102684,102685,102686,102687,102688,102689,102690,102691,102692,102693,102694,102695,102696,102697,102698,102699,102700,102701,102702,102703,102704,102705,102706,102707,102708,102709,102710,102711,102712,102713,102714,102715,102716,102717,102718,102719,102720,102721,102722,102723,102724,102725,102726,102727,102728,102729,102730,102733,
102734,102735,102736,102737,102738,102739,102740,102741,102742,102743,102744,102745,102746,102747,102748,102749,102750,102751,102752,102753,102754,102755,102756,102757,102758,102761,102762,102763,102764,102765,102766,102767,102768,102769,102770,102771,102772,102773,102774,102775,102776,102777,102778,102779,102780,102781,102782,102783,102784,102785,102786,102787,102788,102789,102790,102791,102792,102793,102794,102795,102796,102797,102798,102962,102963,102965,102966,102967,102968,102969,102970,102971,
102972,102973,102974,102975,102976,102977,102978,102979,102980,102981,102982,102983,102984,102985,102986,102987,102988,102989,102990,102991,102992,102993,102994,102995,102996,102997,102998,102999,103E3,103001,103002,103003,103004,103005,103006,103007,103008,103009,103010,103011,103012,103013,103014,103015,103016,103017,103018,103019,103020,103021,103022,103023,103024,103025,103026,103027,103028,103029,103030,103031,103032,103033,103034,103035,103036,103037,103038,103039,103040,103041,103042,103043,
103044,103045,103046,103047,103048,103049,103050,103051,103052,103053,103054,103055,103056,103057,103058,103059,103060,103061,103062,103063,103064,103065,103066,103067,103068,103069,103070,103071,103072,103073,103074,103075,103076,103077,103078,103079,103080,103081,103082,103083,103084,103085,103086,103087,103088,103089,103090,103091,103092,103093,103094,103095,103096,103097,103098,103099,103100,103101,103102,103103,103104,103105,103106,103107,103108,103109,103110,103111,103112,103113,103114,103115,
103116,103117,103118,103119,103120,103121,103122,103123,103124,103125,103126,103127,103128,103129,103130,103131,103132,103133,103134,103135,103136,103137,103138,103139,103140,103141,103142,103143,103144,103145,103146,103147,103148,103149,103150,103151,103152,103153,103154,103155,103156,103157,103158,103159,103160,103161,103162,103163,103164,103165,103166,103167,103168,103169,103170,103171,103172,103173,103174,103175,103176,103177,103178,103179,103180,103181,103182,103183,103184,103185,103186,103187,
103188,103189,103190,103191,103192,103193,103194,103195,103196,103197,103198,103199,103200,103201,103202,103203,103204,103205,103206,103207,103208,103209,103210,103211,103212,103213,103214,103215,103216,103217,103218,103219,103220,103221,103222,103223,103224,103225,103226,103227,103228,103229,103230,103231,103232,103233,103234,103235,103236,103237,103238,103239,103240,103241,103242,103243,103244,103245,103246,103247,103248,103249,103250,103251,103252,103253,103254,103255,103256,103257,103258,103259,
103260,103261,103262,103263,103264,103265,103266,103267,103268,103269,103270,103271,103272,103273,103274,103275,103276,103277,103278,103279,103280,103281,103282,103283,103284,103285,103286,103287,103288,103289,103290,103291,103292,103293,103294,103295,103296,103297,103298,103299,103300,103301,103302,103303,103304,103305,103306,103307,103308,103309,103310,103311,103312,103313,103314,103315,103316,103317,103318,103319,103320,103321,103322,103323,103324,103325,103326,103327,103328,103329,103330,103331,
103332,103333,103334,103335,103336,103337,103338,103339,103340,103341,103342,103343,103344,103345,103346,103347,103348,103349,103350,103351,103352,103353,103354,103355,103356,103357,103358,103359,103360,103361,103362,103363,103364,103365,103366,103367,103368,103369,103370,103371,103372,103373,103374,103375,103376,103377,103378,103379,103380,103381,103382,103383,103384,103385,103386,103387,103388,103389,103390,103391,103392,103393,103394,103395,103396,103397,103398,103399,103400,103401,103402,103403,
103404,103405,103406,103407,103408,103409,103410,103411,103412,103413,103414,103415,103416,103417,103418,103419,103420,103421,103422,103423,103424,103425,103426,103427,103428,103429,103430,103431,103432,103433,103434,103435,103436,103437,103438,103439,103440,103441,103442,103443,103444,103445,103446,103447,103448,103449,103450,103451,103452,103453,103454,103455,103456,103457,103458,103459,103460,103461,103462,103463,103464,103465,103466,103467,103468,103469,103470,103471,103472,103473,103474,103475,
103476,103477,103478,103479,103480,103481,103482,103483,103484,103485,103486,103487,103488,103489,103490,103491,103492,103493,103494,103495,103496,103497,103498,103499,103500,103501,103502,103503,103504,103505,103506,103507,103508,103509,103510,103511,103512,103513,103514,103515,103516,103517,103518,103519,103520,103521,103522,103523,103524,103525,103526,103527,103528,103529,103530,103531,103532,103533,103534,103535,103536,103537,103538,103539,103540,103541,103542,103543,103544,103545,103546,103547,
103548,103549,103550,103551,103552,103553,103554,103555,103556,103557,103558,103559,103560,103561,103562,103563,103564,103565,103566,103567,103568,103569,103570,103571,103572,103573,103574,103575,103576,103577,103578,103579,103580,103581,103582,103583,103584,103585,103600,103601,103602,103603,103604,103605,103606,103607,103608,103609,103610,103611,103612,103613,103614,103615,103616,103617,103618,103619,103620,103621,103622,103623,103624,103625,103626,103627,103628,103629,103630,103631,103632,103633,
103634,103635,103636,103637,103638,103639,103640,103641,103642,103643,103644,103645,103646,103647,103648,103649,103650,103651,103652,103653,103654,103655,103656,103657,103658,103659,103660,103661,103662,103663,103664,103665,103666,103667,103668,103669,103670,103671,103672,103673,103674,103675,103676,103677,103678,103679,103680,103681,103682,103683,103684,103685,103686,103687,103688,103689,103690,103691,103692,103693,103694,103695,103700,103701,103702,103703,103704,103705,103706,103707,103708,103709,
103710,103711,103712,103713,103714,103715,103716,103717,103718,103719,103720,103721,103722,103723,103724,103725,103726,103727,103728,103729,103730,103731,103732,103733,103734,103735,103736,103737,103738,103739,103740,103741,103742,103743,103744,103745,103746,103747,103748,103749,103750,103751,103752,103753,103754,103755,103756,103757,103758,103759,103760,103761,103762,103763,103764,103765,103766,103767,103768,103769,103770,103771,103772,103773,103774,103775,103776,103777,103778,103779,103780,103781,
103782,103783,103784,103785,103786,103787,103788,103789,103790,103791,103792,103793,103794,103795,103796,103797,103798,103799,103800,103801,103802,103803,103804,103805,103806,103807,103808,103809,103810,103811,103812,103813,103814,103815,103816,103817,103818,103819,103820,103821,103822,103823,103824,103825,103826,103827,103828,103829,103830,103831,103832,103833,103834,103835,103836,103837,103838,103839,103840,103841,103842,103843,103844,103845,103846,103847,103848,103849,103850,103851,103852,103853,
103854,103855,103856,103857,103858,103859,103860,103861,103862,103863,103864,103865,103866,103867,103868,103869,103870,103871,103900,103901,103902,103903,103904,103905,103906,103907,103908,103909,103910,103911,103912,103913,103914,103915,103916,103917,103918,103919,103920,103921,103922,103923,103924,103925,103926,103927,103928,103929,103930,103931,103932,103933,103934,103935,103936,103937,103938,103939,103940,103941,103942,103943,103944,103945,103946,103947,103948,103949,103950,103951,103952,103953,
103954,103955,103956,103957,103958,103959,103960,103961,103962,103963,103964,103965,103966,103967,103968,103969,103970,103971];e("extend-esri")&&H.setObject("dijit.analysis.PCSList",n,m);return n})},"esri/layers/RasterXLayer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/connect dojo/_base/array dojo/_base/Deferred dojo/sniff dojo/dom-construct dojo/dom-style dojo/on dojox/gfx/matrix dojo/when dojo/DeferredList ../kernel ../config ../lang ../domUtils ../urlUtils ../graphic ../request ../renderers/ClassBreaksRenderer ../renderers/StretchRenderer ../renderers/UniqueValueRenderer ../renderers/ColormapRenderer ../renderers/ShadedReliefRenderer ../geometry/Extent ../SpatialReference ../geometry/Point ./Field ./TimeInfo ./MosaicRule ./DimensionalDefinition ./PixelBlock ./ImageServiceLayerMixin ./rasterLib/raster/rasterFactory ./rasterLib/raster/rasterProjectionHelper ./rasterLib/renderer/rasterRendererHelper ./rasterLib/tile/RasterTileInfo ./rasterLib/tile/RasterTileManager ./rasterLib/tile/RasterHandler ./layer".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D,G,A,t,v,C,J,L,S,U,aa,ea,ba,oa,da,fa,R,W){var la=l.defaults.map.zoomDuration;H=H([W],{declaredClass:"esri.layers.RasterXLayer",managedSuspension:!0,opacity:1,tileMode:!0,useWebGL:!0,drawMode:!0,_eventMap:{"raster-change":!0,"renderer-change":!0},_lastPopup:[],_rasterFieldPrefix:"Raster.",_cachedVariableStats:{},_cachedVariableHistogram:{},constructor:function(K,O){O=O||{};this.tileMode=null!=O.tileMode?O.tileMode:this.tileMode;this.useWebGL=null!=
O.useWebGL?O.useWebGL:this.useWebGL;this.roaming=null!=O.roaming?O.roaming:this.roaming;this.drawMode=null!=O.drawMode?O.drawMode:this.drawMode;this.bandIds=O.bandIds&&0<O.bandIds.length?O.bandIds:null;this.renderer=O.renderer;this._customModules=O.customModules;this.useMapTime=O.useMapTime;if(O.multidimensionalDefinition&&0<O.multidimensionalDefinition.length){var F=new L;F.multidimensionalDefinition=O.multidimensionalDefinition.map(function(M){return M.toJson?M:new S(M)});F.method=L.METHOD_NONE;
this.mosaicRule=F}this.infoTemplate=O.infoTemplate;this.drawMode||(this._contextType=O._contextType||O.drawType);this._supportLegacyPropMethods=!1!==O.legacySupport;this._rasterHandler=new R({customModules:this._customModules});this._workInitPromise=this._rasterHandler.start();this.pixelData=null;this._initialize(K,O);b(this,"load",e.hitch(this,function(){g(this._rasterHandler._connected||this._rasterHandler._connectionPromise,e.hitch(this,function(){this._rasterHandler.setLayer({layerId:this.id,
raster:{rasterInfo:this.raster.rasterInfo,rasterFunction:this.raster.rasterFunction&&this.raster.rasterFunction.toJson()},bandCount:this.raster.rasterInfo.bandCount});this.raster.rasterFunction&&this._rasterHandler.setRasterFunction({layerId:this.id,data:this.raster.rasterFunction.toJson(!0)});this._rasterRenderer&&this._rasterHandler.setRasterRenderer({layerId:this.id,data:this._rasterRenderer.toJson(!0)})}))}));this._animatePan2d=e.hitch(this,this._animatePan2d)},setOpacity:function(K){this.opacity!==
K&&(this.opacity=K,this.onOpacityChange(K))},onOpacityChange:function(){},onRendererChange:function(){},refresh:function(){if(this.loaded&&this._map)if(!this._canDraw()||10>d("ie"))this.onError(Error("Unable to refresh. This layer is not supported in the current browser."));else this._map&&this._extentChangeHandler(this._map.extent)},clear:function(K,O,F,M){this._canDraw()&&(this.useWebGL||(F?this._context.clearRect(K,O,F,M):this._context.clearRect(0,0,this._map.width,this._map.height)))},getContext:function(){return this._context},
onResume:function(){this.inherited(arguments);this._toggleTime();r.show(this._div);if("css-transforms"===this._map.navigationMode){var K=this._map.__visibleDelta;this._left=this._tdx=K.x;this._top=this._tdy=K.y;a.set(this._div,f._css.names.transform,f._css.translate(this._left,this._top))}this._displayTimer=this._displayTimer||setTimeout(e.hitch(this,function(){this._extentChangeHandler(this._map.extent,null,!0)}),0)},onSuspend:function(){this.inherited(arguments);this._fireUpdateEnd();this._toggleTime();
r.hide(this._div);clearTimeout(this._displayTimer);this._displayTimer=null},redraw:function(){this.useWebGL&&this._glSetting&&(this._glSetting.hasNewTexture=!1);var K=this.tileMode?this.tileManager.originalPixelData:this.originalPixelData;if(this.tileMode?K&&(K.src||K.texture):K)if(this.tileMode)if(this.useWebGL)this._updateAllTilesOnce(K);else{this.tileManager.tiles.forEach(function(F){F&&(F.update=null,F.completed=!1,F.processedPixelBlock=null,F.renderedPixelBlock=null)});K.processedPixelBlock=
null;var O=this.raster.rasterFunction?this.raster.rasterFunction.read(K):{extent:K.extent,pixelBlock:K.src[this.tileManager.identifiers[0]]&&K.src[this.tileManager.identifiers[0]].pixelBlock};K.renderedPixelBlock=null;K=this._rasterRenderer?this._rasterRenderer.draw(O):O;this._drawOneFrame(K)}else this._supportLegacyPropMethods&&this.pixelFilter?this._setPixelData(this.originalPixelData):(K.processedPixelBlock=null,O=this.raster.rasterFunction?this.raster.rasterFunction.read(K):{extent:K.extent,pixelBlock:K.src?
K.src[this.tileManager.identifiers[0]]&&K.src[this.tileManager.identifiers[0]].pixelBlock:K.pixelBlock},K.renderedPixelBlock=null,K=this._rasterRenderer?this._rasterRenderer.draw(O):O,this._drawOneFrame(K))},getCurrentResolution:function(){var K=this._map.extent;return new v((K.xmax-K.xmin)/this._map.width,(K.ymax-K.ymin)/this._map.height,K.spatialReference)},getCustomRasterFields:function(K){var O=K?K.rasterAttributeTableFieldPrefix:this._rasterFieldPrefix,F={name:this._rasterFieldPrefix+"ServicePixelValue",
alias:"Pixel Value",domain:null,editable:!1,length:50,type:10.3<=this.version?"esriFieldTypeDouble":"esriFieldTypeString"};K=this.fields?e.clone(this.fields):[];K.push(F);(F=this.rasterAttributeTable&&this.rasterAttributeTable.fields)&&0<F.length&&(F=n.filter(F,function(M){return"esriFieldTypeOID"!==M.type&&"value"!==M.name.toLowerCase()}),F=n.map(F,function(M){var N=e.clone(M);N.name=O+M.name;return N}),K=K.concat(F));return K},setRenderer:function(K,O){if(this.loaded&&K){if(K.declaredClass&&-1<
K.declaredClass.indexOf("esri.layers.rasterLib")){this._rasterRenderer=K;this._rasterRenderer.bind({layer:this});var F=this.bandIds=K.bandIndex;this.raster&&this.raster.setFetchParameters({bandIds:F});this._params&&(this._params.bandIds=F&&0<F.length?F.join(","):null);this.renderer=this._getCommonRenderer(K)}else F=e.clone(K.toJson?K.toJson():K),"rasterStretch"===F.type&&(F.bandIndex=this.bandIds,F.bandIndex&&1<F.bandIndex.length||!F.bandIndex&&this.raster&&1<this.raster.rasterInfo.bandCount)&&(F.type=
"rgb"),this._rasterRenderer=oa.create(F),this.renderer=K.declaredClass?K:this._getCommonRenderer(this._rasterRenderer),this._rasterRenderer.bind({layer:this});if(this._map){if(this.loaded&&this._rasterHandler._connected){var M=this._rasterHandler.setRasterRenderer({layerId:this.id,data:this._rasterRenderer.toJson(!0)});this._updateTilingEffects()}O||(M?M.then(e.hitch(this,function(){this.redraw()})):this.redraw());this.onRendererChange()}}},setBandIds:function(K,O){this.bandIds=K;this.raster&&this.raster.setFetchParameters({bandIds:K});
this._params&&(this._params.bandIds=K&&0<K.length?K.join(","):null);this.setRenderer(this.renderer,O)},_setTime:function(K){K=K?K.toJson():null;this._params&&(this._params.time=K);this.raster.setFetchParameters({time:K});this.tileManager&&this.tileManager.tiles&&this.tileManager.resetTiles()},setInfoTemplate:function(K){this.infoTemplate=K;this._updateInfoTemplateFields(this.fields)},setMultiDimensionalDefinition:function(K,O){var F=K&&K.multidimensionalDefinition;if(F&&this.loaded){var M=F&&F[0].variableName;
""===M&&(M=this._multidimensionalInfo.variables[0].name,F.forEach(function(V){V.variableName=M}));if("ImageService"===this.raster.sourceType){var N=this.raster._getAllDimensionDefinition(F,M);N.defChanged&&(K.multidimensionalDefinition=N.definition,this.setMosaicRule(K,!0))}this.raster.setFetchParameters({multidimensionalDefinition:F});this.tileManager&&this.tileManager.tiles&&this.tileManager.resetTiles();M&&this._updateRasterInfo(M);O||this.refresh()}},_updateRasterInfo:function(K){var O=this.raster.rasterInfo,
F=this.getHistograms(K);K=this.getStatistics(K);(new k([F,K])).then(e.hitch(this,function(M){M[0][0]&&(O.histograms=M[0][1].histograms);M[1][0]&&(O.statistics=M[1][1]);this.refresh()}))},_updateInfoTemplateFields:function(K){if(K&&!(1>K.length)&&this.infoTemplate&&this.infoTemplate.info&&this.infoTemplate.info.fieldInfos&&!(1>this.infoTemplate.info.fieldInfos.length)){var O,F;var M=this.infoTemplate.info.fieldInfos;for(O=0;O<K.length;O++){var N=K[O];for(F=0;F<M.length;F++)if(M[F].fieldName.toLowerCase()===
N.name.toLowerCase()&&M[F].fieldName!==N.name){M[F].fieldName=N.name;break}}}},getPixelData:function(K){return this.tileMode?K?this.tileManager.originalPixelData.src&&this.tileManager.originalPixelData.src[this.tileManager.identifiers[0]]:null:this.inherited(arguments)},fetchPopupFromTiles:function(K){var O=new q;this.identify(K.geometry).then(function(F){var M=F.pixelValue;this.hasStdTime()&&M&&M.length&&null!=M[0]&&(M=M.map(function(Y){return this.getStdTimeValue(Y)}.bind(this)).join(", "));if(M){F=
{ObjectId:0,"Raster.ServicePixelValue":M};var N=this.rasterAttributeTable&&this.rasterAttributeTable.features;if(N&&0<N.length&&(N=n.filter(N,function(Y){if(Y&&Y.attributes)return Y.attributes.hasOwnProperty("Value")?Y.attributes.Value==M:Y.attributes.VALUE==M}),0<N.length&&(N=e.clone(N[0]))))for(var V in N.attributes)N.attributes.hasOwnProperty(V)&&(F[this._rasterFieldPrefix+V]=N.attributes[V]);V=new u(new A(this.projectedFullExtent||this.fullExtent),null,F);V.setInfoTemplate(this.infoTemplate);
V._layer=this;this._lastPopup=[V];O.resolve([V])}else this._lastPopup=[],O.resolve()}.bind(this),function(F){this._lastPopup=[];O.resolve(F)});return O},getPopupFromTiles:function(){return this._lastPopup},identify:function(K,O){return this.raster?this.raster.identify(K):(K=new q,K.reject("layer must be initialized to identify"),K.promise)},_getCommonRenderer:function(K){switch(K.rendererName){case "RGB":case "Stretch":return new E(K.toCommonRendererJson());case "UniqueValue":return new y(K.toCommonRendererJson());
case "ClassBreaks":return new x(K.toCommonRendererJson());case "Colormap":return new D(K.toCommonRendererJson());case "ShadedRelief":return new G(K.toCommonRendererJson())}},_getProjectedFullExtent:function(K){return this.raster.getProjectedFullExtent(K).then(e.hitch(this,function(O){this.projectedFullExtent=O}))},_initialize:function(K,O){O=O||{};this._supportLegacyPropMethods&&this.constructor._onMap&&(this.constructor._onMap["rendering-change"]={method:"onRenderingChange"},this.constructor._onMap["mosaic-rule-change"]=
{method:"onMosaicRuleChange"},this.constructor._onMap["spatial-reference-change"]={method:"onSpatialReferenceChange"});this.raster={};var F=O.raster?O.raster.url:K;F&&-1<F.toLowerCase().indexOf("/imageserver")&&this._supportLegacyPropMethods&&this._addLegacySupport(F,O);var M=e.hitch(this,function(){this.loaded=!0;this.mosaicRule&&this.mosaicRule.multidimensionalDefinition&&0<this.mosaicRule.multidimensionalDefinition.length&&this.setMultiDimensionalDefinition(this.mosaicRule,!0);this.raster._setRasterHandler(this._rasterHandler);
this.onLoad(this);var N=this._loadCallback;N&&(delete this._loadCallback,N(this))});(K?ea.create(e.mixin({url:K},O)):O.raster&&O.raster.open()).then(e.hitch(this,function(N){if(N){this.raster=N;var V=this._getSourceImageServiceRaster();this.url||(this.url=V&&V.url);this.url&&(this._url=w.urlToObject(K));var Y=O.minScale,ka=O.maxScale,ja=N.tileInfo&&"Raster"===N.tileInfo.tileType;null==ka&&(ka=ja&&O.zoomFactor?N.tileInfo.lods[N.tileInfo.lods.length-1].scale/O.zoomFactor:this.maxScale);null==Y&&(Y=
ja&&O.zoomFactor?N.tileInfo.lods[0].scale*O.zoomFactor:this.minScale);V&&"ImageService"===V.sourceType&&this._supportLegacyPropMethods&&this._addGeneralProperties(K,O);this.initialExtent=this.fullExtent=this.extent=this.raster.rasterInfo.extent;this.spatialReference=this.extent.spatialReference;this.timeInfo=this.raster.rasterInfo.timeInfo?new J(this.raster.rasterInfo.timeInfo):null;this.rasterAttributeTable=this.raster.rasterInfo.vat;this._multidimensionalInfo=this.raster.rasterInfo.multidimensionalInfo;
this.rasterAttributeTable&&(this._rasterAttributeTableFields=this.rasterAttributeTable.fields);this.mosaicRule&&this.raster.setFetchParameters({multidimensionalDefinition:this.mosaicRule.multidimensionalDefinition});this._multidimensionalInfo&&(this._getDefaultMultidimensionalDefinition(this._multidimensionalInfo,!0,!0),this.mosaicRule||(this.mosaicRule=this.defaultMosaicRule,this.raster.setFetchParameters({multidimensionalDefinition:this._defaultMultidimensionalDefinition})),this.raster.defaultMultidimensionalDefinition=
this._defaultMultidimensionalDefinition);null==Y||this._hasMin||this.setMinScale(Y);null==ka||this._hasMax||this.setMaxScale(ka);this._workInitPromise?this._workInitPromise.then(M,M):M()}else console.error("cannot create rasterx layer as the raster data source cannot be opened")}),this._errorHandler)},_getSourceImageServiceRaster:function(){var K=this.raster&&"Function"===this.raster.sourceType?1===this.raster.getMemberRasters().length?this.raster.getMemberRasters()[0]:null:this.raster;if(K&&"ImageService"===
K.sourceType)return K},_addLegacySupport:function(K,O){this._url=w.urlToObject(K);O=O||{};this.format=(K=O.imageServiceParameters)&&K.format;this.compressionTolerance=K&&K.compressionTolerance?K.compressionTolerance:.01;this.interpolation=K?K.interpolation:null;this.compressionQuality=K?K.compressionQuality:null;this.bandIds=K&&K.bandIds||O&&O.bandIds||null;this.mosaicRule||(this.mosaicRule=K?K.mosaicRule:null);this.renderingRule||(this.renderingRule=K?K.renderingRule:null);this.useMapDimensionValue=
O.hasOwnProperty("useMapDimensionValue")?!!O.useMapDimensionValue:!0;this.hasImageFilter=O.hasImageFilter;this.activeMapDimensions=O.activeMapDimensions;this._params=e.mixin({},this._url.query,{f:"image",interpolation:this.interpolation,format:this.format,compressionQuality:this.compressionQuality,bandIds:this.bandIds?this.bandIds.join(","):null},K?K.toJson():{});this.pixelFilter=O.pixelFilter;this.originalPixelData=this.pixelData=null;this._queryVisibleRastersHandler=e.hitch(this,this._queryVisibleRastersHandler);
this._useRenderingRuleAttributeTable=!1;this._rasterFunctionTemplateInfos={};this._customRenderingRuleId={};this._setDefaultFilter=function(){};var F={setInterpolation:"interpolation",setCompressionQuality:"compressionQuality",setCompressionTolerance:"compressionTolerance",setBandIds:"bandIds",setDefaultBandIds:"bandIds",setMosaicRule:"mosaicRule",setRenderingRule:"renderingRule",setImageFormat:"format"},M,N=new aa;Object.keys(F).forEach(e.hitch(this,function(V){this[V]=e.hitch(this,function(Y,ka){M=
{};M[F[V]]=Y;this.raster&&(this.raster.setFetchParameters(M),N[V].bind(this)(Y,ka))})}));this.setDisableClientCaching=function(V){N.setDisableClientCaching.bind(this)(V);var Y=this._getSourceImageServiceRaster();Y?Y.disableClientCaching=V:null}.bind(this);this.setDefinitionExpression=N.setDefinitionExpression.bind(this);this.setUseMapTime=N.setUseMapTime.bind(this);this._toggleTime=N._toggleTime.bind(this);this._onTimeExtentChangeHandler=N._onTimeExtentChangeHandler.bind(this);this.setPixelFilter=
N.setPixelFilter.bind(this);this.getHistograms=N.getHistograms.bind(this);this.getRasterFunctionInfos=N.getRasterFunctionInfos.bind(this);this.getKeyProperties=N.getKeyProperties.bind(this);this.getRasterAttributeTable=N.getRasterAttributeTable.bind(this);this.getRenderingRuleServiceInfo=N.getRenderingRuleServiceInfo.bind(this);this._getRenderingRuleId=N._getRenderingRuleId.bind(this);this._isRenderingRuleAProcessingTemplate=N._isRenderingRuleAProcessingTemplate.bind(this);this.handleSpatialReferenceChange=
N.handleSpatialReferenceChange.bind(this);this.onRenderingChange=this.onRenderingChange||function(){};this.onSpatialReferenceChange=this.onSpatialReferenceChange||function(){};this.onMosaicRuleChange=this.onMosaicRuleChange||function(V){};this.setRasterRenderer=this.setRenderer;this.getMultidimensionalInfo=N.getMultidimensionalInfo.bind(this);this.getColormap=N.getColormap.bind(this);this.getRenderingRuleColormap=N.getRenderingRuleColormap.bind(this);this.getDefaultMultidimensionalDefinition=N.getDefaultMultidimensionalDefinition.bind(this);
this._getDefaultMultidimensionalDefinition=N._getDefaultMultidimensionalDefinition.bind(this);this._getDefaultDimensionValue=N._getDefaultDimensionValue.bind(this);this.getStatistics=N.getStatistics.bind(this)},_addGeneralProperties:function(){var K=this._getSourceImageServiceRaster();if(K){var O=["minScale","maxScale","tileInfo"];Object.keys(K.serviceInfo).forEach(function(N){null==this[N]&&-1===O.indexOf(N)&&(this[N]=K.serviceInfo[N])}.bind(this));this.pixelSizeX=parseFloat(this.pixelSizeX);this.pixelSizeY=
parseFloat(this.pixelSizeY);this.bands=K.rasterInfo.statistics;var F,M=[];this.fields=this.fields||[];for(F=0;F<this.fields.length;F++)M.push(new C(this.fields[F]));this.fields=M;this.version=this.currentVersion;this.defaultMosaicRule=K.serviceInfo.defaultMosaicRule}},setDefaultRenderer:function(){if(this.loaded&&this._canvas&&!this.pixelFilter){var K=oa.createDefaultRenderer(this);if(null!=K){var O=this.mosaicRule&&this.mosaicRule.multidimensionalDefinition&&0<this.mosaicRule.multidimensionalDefinition.length;
if(this._multidimensionalInfo&&O&&"Stretch"===K.rendererName){var F=this.mosaicRule.multidimensionalDefinition[0].variableName;(O=this._multidimensionalInfo.variables.filter(function(M){return M.name===F})[0])&&O.histograms&&O.histograms.length&&(K.histograms=O.histograms,6===K.stretchType&&(K.dra=!1));O&&O.statistics&&O.statistics.length&&(K.statistics=O.statistics.map(function(M){return[M.min,M.max,M.mean,M.stddev||M.standardDeviation]}),6!==K.stretchType&&(K.dra=!1))}this.setRenderer(K,!0)}}},
setDefaultInterpolation:function(){if(this.loaded&&this._canvas){var K=this.raster.serviceInfo&&this.raster.serviceInfo.defaultResamplingMethod;if(K)switch(K.toLowerCase()){case "bilinear":this.interpolation="RSP_BilinearInterpolation";break;case "cubic":this.interpolation="RSP_CubicConvolution";break;case "majority":this.interpolation="RSP_Majority";break;case "nearest":this.interpolation="RSP_NearestNeighbor"}else{K=this.raster.dataType&&this.raster.dataType.toLowerCase();var O=!!this.raster.rasterInfo.colormap;
this.raster.rasterInfo.vat||O||"thematic"===K||"StdTime"===K?"RSP_NearestNeighbor":"RSP_BilinearInterpolation"}}},_toggleTime:function(){},_updateTilingEffects:function(){(this._hasTilingEffects=this._rasterRenderer&&this._rasterRenderer.hasTilingEffects()||this.raster&&this.raster.rasterFunction&&this.raster.rasterFunction.hasTilingEffects())&&this._map&&this.tileMode&&this.useWebGL&&this.tileManager&&(this._hasTilingEffects=!1)},_setMap:function(K,O){this.inherited(arguments);K.spatialReference&&
(K.spatialReference.ics||K.spatialReference.icsId)&&(this.roaming=this.useWebGL=this.tileMode=!1);if(this.tileMode){this.virtualTileInfo=new da(null,{refTileInfo:K.tileInfo,spatialReference:K.spatialReference,extent:this.raster.rasterInfo.extent});var F=this.raster.tileInfo&&(-1<["Elevation","Raster"].indexOf(this.raster.tileInfo.tileType)||3===this.raster.rasterInfo.bandCount&&"U8"===this.raster.rasterInfo.pixelType)?this.raster.tileInfo:this.virtualTileInfo;this._tileParams=this._tileParams||{};
this._tileParams.size=F.cols+","+F.rows;this.tileManager=new fa({tileInfo:F,layer:this,mapSR:K.spatialReference})}this._dragOrigin={x:0,y:0};F=this._div=c.create("div",null,O);var M={width:K.width+"px",height:K.height+"px",position:"absolute"};"css-transforms"===K.navigationMode?this.roaming&&this.tileMode&&this.useWebGL||(M[f._css.names.transform]=f._css.translate(K.__visibleDelta.x,K.__visibleDelta.y),this._left=K.__visibleDelta.x,this._top=K.__visibleDelta.y):this._left=this._top=0;a.set(F,M);
this._canvas=c.create("canvas",{width:K.width+"px",height:K.height+"px",style:"position: absolute;"},F);p.isDefined(this.opacity)&&a.set(F,"opacity",this.opacity);this._contextType?(this._context=this._canvas.getContext(this._contextType,null),this.useWebGL=this._context instanceof WebGLRenderingContext):this.useWebGL?(this._context=this._canvas.getContext("webgl",null)||this._canvas.getContext("experimental-webgl",null),this.drawMode=!1):(this._context=this._canvas.getContext("2d"),this.drawMode=
!0);this._context||console.error("Unable to create the context. This browser might not support \x3ccanvas\x3e elements.");this.useWebGL&&(K.acquireWebGLContext(this),this._glSetting={gl:this._context,branchCount:this.raster.rasterFunction?this.raster.rasterFunction.branchCount:0,pingpong:null,branches:null,drawMesh:this._drawMesh,programUniforms:{}});this.raster.rasterFunction&&(this._updateTilingEffects(),this.raster.setProcessingContext({layer:this}));this.setRenderer(this.renderer,!0);this._rasterRenderer||
this.setDefaultRenderer();this.interpolation||this.setDefaultInterpolation();this._mapWidth=K.width;this._mapHeight=K.height;this._connects=[];this._connects.push(m.connect(K,"onPan",this,this._panHandler));this._connects.push(m.connect(K,"onPanEnd",this,this._panEndHandler));"css-transforms"===K.navigationMode?this._connects.push(m.connect(K,"onScale",this,this._onScaleHandler)):(this._connects.push(m.connect(K,"onZoom",this,this._onZoomHandler)),this._connects.push(m.connect(K,"onZoomEnd",this,
this._onZoomEndHandler)));this._connects.push(m.connect(K,"onResize",this,this._onResizeHandler));this._connects.push(m.connect(K,"onExtentChange",this,this._extentChangeHandler));this._connects.push(m.connect(this,"onVisibilityChange",this,this._visibilityChangeHandler));this._connects.push(m.connect(this,"onOpacityChange",this,this._opacityChangeHandler));this._startRect={left:0,top:0,width:K.width,height:K.height};this.evaluateSuspension();if(this.suspended&&!K.loaded)var N=m.connect(K,"onLoad",
this,function(){m.disconnect(N);N=null;this.evaluateSuspension()});return F},_unsetMap:function(K,O){this.useWebGL&&K.releaseWebGLContext(this);n.forEach(this._connects,m.disconnect,this);var F=this._div;F&&(O.removeChild(F),c.destroy(F));this._map=this._canvas=this._context=this.data=this._connects=null;clearTimeout(this._displayTimer);this._displayTimer=null;this.inherited(arguments)},_canDraw:function(){return!!(this._map&&this._canvas&&this._context)},_requestDataErrorHandler:function(K){"CancelError"!==
K.name&&(this.clear(),this.onError(K))},_clonePixelData:function(K){if(null===K||K.texture)return K;var O={};K.extent&&(O.extent=e.clone(K.extent));var F=K.pixelBlock;null!=F&&(O.pixelBlock=F.clone());O.texture=K.texture;return O},_setPixelData:function(K){if(K){K=this._clonePixelData(K);this.pixelFilter&&(this.pixelFilter.filter?(this.pixelFilter.renderTexture=!0,this.pixelFilter.filter(K)):this.pixelFilter(K));this.pixelData=K;if(this._rasterReadPromise&&this._rasterReadPromise.isCanceled())return;
this._drawPixelData()}this._rasterReadPromise=null},_requestData:function(K,O,F){this._rasterReadPromise&&this._rasterReadPromise.cancel();K=e.clone(K)._normalize(!0);this._rasterReadPromise=this.raster.read({extent:K,width:this._map.width,height:this._map.height});this._rasterReadPromise.then(e.hitch(this,function(M){this._rasterReadPromise&&this._rasterReadPromise.isCanceled()||(this.originalPixelData=M&&M.srcData?{extent:M.extent,src:M.srcData}:M,this.useWebGL&&this._glSetting&&(this._glSetting.hasNewTexture=
!0),this._setPixelData(M))}),e.hitch(this,this._requestDataErrorHandler));return this._rasterReadPromise},_drawPixelData:function(K){a.set(this._canvas,{left:"0px",top:"0px",width:this._map.width+"px",height:this._map.height+"px"});this._startRect={left:0,top:0,width:this._map.width,height:this._map.height};this.drawMode||"css-transforms"!==this._map.navigationMode||(this._tdx=this._left,this._tdy=this._top,this._multiply=null,a.set(this._div,f._css.names.transform,f._css.translate(this._left,this._top)),
a.set(this._canvas,f._css.names.transform,f._css.translate(-this._left,-this._top)),this._dragOrigin={x:0,y:0});this.useWebGL&&this._rasterRenderer&&this._rasterRenderer.draw(this.pixelData);if(this._canDraw()&&this.drawMode&&this.drawMode&&(K=K||this.pixelData)&&K.pixelBlock){var O=this.pixelFilter?this.pixelData:this._rasterRenderer?this._rasterRenderer.draw(K):K;K=O.pixelBlock;var F=this._context,M=F.createImageData(K.width,K.height);M.data.set(K.getAsRGBA());O=O.extent;var N=this._map.extent,
V=this.getCurrentResolution(),Y=0,ka=0;Math.abs(O.xmin-N.xmin)>V.x&&(Y=Math.round((O.xmin-N.xmin)/V.x));Math.abs(N.ymax-O.ymax)>V.y&&(ka=Math.round((N.ymax-O.ymax)/V.y));"css-transforms"===this._map.navigationMode?(this._tdx=this._left,this._tdy=this._top,this._multiply=null,a.set(this._div,f._css.names.transform,f._css.translate(this._left,this._top)),a.set(this._canvas,f._css.names.transform,f._css.translate(-this._left,-this._top))):(a.set(this._div,{left:"0px",top:"0px",width:this._map.width+
"px",height:this._map.height+"px"}),a.set(this._canvas,{left:"0px",top:"0px",width:this._map.width+"px",height:this._map.height+"px"}));this._dragOrigin={x:0,y:0};this.tileMode?this.clear(Y,ka,K.width,K.height):this.clear();F.putImageData(M,Y,ka,0,0,K.width,K.height);this._fireUpdateEnd()}},hasStdTime:function(){if(!this.hasMultidimensions||"StdTime"!==this.raster.dataType)return!1;var K=this.mosaicRule&&this.mosaicRule.multidimensionalDefinition,O=K&&K.length?K[0].variableName:this._defaultMultidimensionalDefinition[0].variableName;
return this.raster.rasterInfo.multidimensionalInfo.variables.some(function(F){if(F.name===O)return F.dimensions.some(function(M){return"StdTime"===M.name})})},getStdTimeValue:function(K){return(new Date(864E5*(K-25569))).toString()},_animatePan2d:function(){this._oldDelta&&this._delta.x===this._oldDelta.x&&this._delta.y===this._oldDelta.y||(this.tileManager.updateTile(this.tileManager.originalPixelData,!0),this._oldDelta={x:this._delta.x,y:this._delta.y});this._roamingAnimation&&this.tileMode&&this.useWebGL&&
(this._roamingAnimation=requestAnimationFrame(this._animatePan2d))},_cancelAnimation:function(){this._animation&&(cancelAnimationFrame(this._animation),this._animation=null)},_updateAllTilesOnce:function(K,O){return this.tileManager.updateTile(K,!0).then(e.hitch(this,function(F){(this._hasTilingEffects||this.useWebGL||O)&&this._drawOneFrame(F)}))},_drawOneFrame:function(K,O){if(!(this.suspended||!this._map||this.tileMode&&!this._drawTile||(this.tileMode&&this.useWebGL&&this.tileManager.originalPixelData.isEmpty&&
this._context.clear(this._context.COLOR_BUFFER_BIT),this.tileMode&&this.useWebGL&&this.tileManager.xformSetting&&this.tileManager.xformSetting.requireProjection&&!this.tileManager.xformSetting.gridConfig))){if(!this._resetCss||this._levelChange)this._levelChange=!1,this._resetDrawing();if(K&&(K.renderedPixelBlock||K.pixelBlock)&&this._canDraw()&&this.drawMode){O=K.extent;var F=this._map.extent;if(!this._isExtentOutSide(O,F)){var M=K.pixelBlock||K.renderedPixelBlock,N=this._context,V=N.createImageData(M.width,
M.height);V.data.set((K.renderedPixelBlock||K.pixelBlock).getAsRGBA());K=this.getCurrentResolution();var Y=0,ka=0;Math.abs(O.xmin-F.xmin)>K.x&&(Y=Math.round((O.xmin-F.xmin)/K.x));Math.abs(F.ymax-O.ymax)>K.y&&(ka=Math.round((F.ymax-O.ymax)/K.y));N.putImageData(V,Y,ka,0,0,M.width,M.height)}}else this._fireUpdateEnd()}},_isExtentOutSide:function(K,O){return K.xmax<=O.xmin||K.xmin>=O.xmax||K.ymax<=O.ymin||K.ymin>=O.ymax},_resetDrawing:function(){this._resetCss=!0;if(!this.useWebGL)if(this._multiply||
this._startRect.width!==this._map.width||this._startRect.height!==this._map.height)this.clear();else{var K=this._context.getImageData(0,0,this._map.width,this._map.height);this.clear();this._context.putImageData(K,this._startRect.left,this._startRect.top)}this._dragOrigin={x:0,y:0};this._startRect={left:0,top:0,width:this._map.width,height:this._map.height};a.set(this._canvas,{left:"0px",top:"0px",width:this._map.width+"px",height:this._map.height+"px"});"css-transforms"===this._map.navigationMode?
(this.roaming&&this.tileMode&&this.useWebGL&&(this._delta=null),this._tdx=this._left,this._tdy=this._top,this._multiply=null,a.set(this._div,f._css.names.transform,f._css.translate(this._left,this._top)),a.set(this._canvas,f._css.names.transform,f._css.translate(-this._left,-this._top))):(a.set(this._div,{left:"0px",top:"0px",width:this._map.width+"px",height:this._map.height+"px"}),a.set(this._canvas,{left:"0px",top:"0px",width:this._map.width+"px",height:this._map.height+"px"}))},_drawAllFrames:function(){if(!this.suspended&&
this._map&&(!this.tileMode||this._drawTile))if(this._resetCss){var K=this._frames,O=0,F;for(F=0;F<K.length;F++)if(K[F].completed)O++;else if(K[F].tileData.renderedPixelBlock){K[F].completed=!0;var M=K[F].tileData;break}else if(K[F].tileData._fetched&&!K[F].tileData.src){K[F].completed=!0;break}else if(K[F].tileData.update&&K[F].tileData.update.isFulfilled()&&!K[F].tileData.renderedPixelBlock){K[F].completed=!0;break}else K[F].tileData.fetch&&(!0===K[F].tileData.fetch||K[F].tileData.fetch.isCanceled()||
K[F].tileData.fetch.isRejected())?(K[F].completed=!0,O++):this._isExtentOutSide(K[F].tileData.extent,this._map.extent)&&(K[F].completed=!0,O++);if(M){O++;var N=M.extent,V=this._map.extent,Y=this.getCurrentResolution(),ka=F=0;Math.abs(N.xmin-V.xmin)>Y.x&&(F=Math.round((N.xmin-V.xmin)/Y.x));Math.abs(V.ymax-N.ymax)>Y.y&&(ka=Math.round((V.ymax-N.ymax)/Y.y));M.renderedPixelBlock?(N=M.renderedPixelBlock,V=this._context.createImageData(N.width,N.height),V.data.set(M.renderedPixelBlock.getAsRGBA()),this._context.putImageData(V,
F,ka,0,0,N.width,N.height)):this.clear(F,ka,M.width,M.height)}O===K.length?(this._animation=null,this._fireUpdateEnd()):this._animation=requestAnimationFrame(e.hitch(this,this._drawAllFrames))}else this._resetDrawing(),this._animation=requestAnimationFrame(e.hitch(this,this._drawAllFrames))},_fetchTiles:function(K,O){if(!this.suspended&&this.loaded){this._cancelAnimation();var F=this.tileManager,M=!(F.xformSetting.requireProjection&&F.xformSetting.requirePE)||ba.load();g(M,e.hitch(this,function(){F.updateExtent(K,
this.getCurrentResolution());this._resetCss=!1;F.fetchTiles(O);O&&(this._hasTilingEffects||this.useWebGL?this.useWebGL&&0<F.tiles.length?(F.fillupTiles(),F._validateRawPixelBlocks(F.originalPixelData)?this._updateAllTilesOnce(F.originalPixelData):F.originalPixelData&&F.originalPixelData.src&&F.tiles.some(function(N){return N.updateCompleted})&&this._context.clear(this._context.COLOR_BUFFER_BIT),F.tiles.forEach(e.hitch(this,function(N){N.update&&!N.updateCompleted&&N.update.then(function(V){N.updateCompleted||
(N.updateCompleted=!0);(this._hasTilingEffects||this.useWebGL)&&this._drawOneFrame(V)}.bind(this))}))):this._hasTilingEffects&&g(F.fetchAllCompleted.isResolved()||F.fetchAllCompleted,e.hitch(this,function(){this._updateAllTilesOnce(F.originalPixelData)})):(this._frames=F.tiles.map(function(N){return{completed:!1,tileData:N}}),this._drawAllFrames()))}))}},_redrawTiles:function(){this._fetchTiles(this._map.extent,!0)},_panHandler:function(K,O){this._drawTile=!1;"css-transforms"===this._map.navigationMode?
this.roaming&&this.tileMode&&this.useWebGL?(this._delta=O,!this._roamingAnimation&&this.tileMode&&(this._roamingAnimation=requestAnimationFrame(this._animatePan2d))):(this._left=this._map.__visibleDelta.x+O.x,this._top=this._map.__visibleDelta.y+O.y,a.set(this._div,f._css.names.transform,f._css.translate(this._left,this._top))):a.set(this._div,{left:this._startRect.left+O.x+"px",top:this._startRect.top+O.y+"px"});this.tileMode&&this._fetchTiles(K)},_panEndHandler:function(K,O){O&&(this._startRect.left+=
O.x,this._startRect.top+=O.y);this.oldData=null;this._roamingAnimation&&(cancelAnimationFrame(this._roamingAnimation),this._oldDelta=this._roamingAnimation=null)},_onScaleHandler:function(K,O){var F={},M=f._css.names;a.set(this._canvas,M.transition,O?"none":M.transformName+" "+la+"ms ease");this._matrix=K;K=this._multiply?h.multiply(K,this._multiply):K;if(this._tdx||this._tdy)K=h.multiply(K,{xx:1,xy:0,yx:0,yy:1,dx:-this._tdx,dy:-this._tdy});F[M.transform]=f._css.matrix(K);a.set(this._canvas,F)},_onZoomHandler:function(K,
O,F){var M=this._startRect;K=M.width*O;O*=M.height;var N=M.left-(K-M.width)*(F.x-M.left)/M.width;F=M.top-(O-M.height)*(F.y-M.top)/M.height;a.set(this._canvas,{left:N+"px",top:F+"px",width:K+"px",height:O+"px"});this._endRect={left:N,top:F,width:K,height:O}},_onZoomEndHandler:function(){this._endRect&&(this._startRect=this._endRect)},_onResizeHandler:function(K,O,F){a.set(this._div,{width:O+"px",height:F+"px"});a.set(this._canvas,{width:O+"px",height:F+"px"});this._startRect.width=this._canvas.width=
O;this._startRect.height=this._canvas.height=F;this.useWebGL&&this._glSetting&&(this._glSetting.pingpong=null,this._glSetting.branches=null)},_extentChangeHandler:function(K,O,F,M){if(this.loaded&&!this.suspended&&(!O||0!==O.x||0!==O.y||F)){this._drawTile=!0;"css-transforms"===this._map.navigationMode&&(O&&(this._dragOrigin.x+=O.x,this._dragOrigin.y+=O.y),this._left=this._map.__visibleDelta.x,this._top=this._map.__visibleDelta.y,this.roaming&&this.tileMode&&this.useWebGL||F||a.set(this._div,f._css.names.transform,
f._css.translate(this._left,this._top)),F&&(a.set(this._canvas,f._css.names.transition,"none"),this._multiply=this._multiply?h.multiply(this._matrix,this._multiply):this._matrix,this._levelChange=!0));this._fireUpdateStart();var N=this._map;O=this.raster.rasterFunction?this.raster.getMemberRasters().map(function(Y){return Y._rasterId}):[this.raster._rasterId];var V={};this.tileMode?((this.roaming||this.useWebGL)&&this.tileMode||(O.forEach(function(Y,ka){V[Y]={extent:N.extent,pixelBlock:new U({width:N.width,
height:N.height,pixels:[],pixelType:"",mask:null,statistics:[]})}}),this.tileManager.originalPixelData={extent:N.extent,src:V}),this.projectedFullExtent?this._fetchTiles(K,!0):this._getProjectedFullExtent(N.spatialReference).then(e.hitch(this,function(){this._fetchTiles(K,!0)}))):this._requestData(N.extent,N.width,N.height)}},_visibilityChangeHandler:function(K){K?r.show(this._div):r.hide(this._div)},_opacityChangeHandler:function(K){a.set(this._div,"opacity",K)}});d("extend-esri")&&e.setObject("layers.RasterXLayer",
H,f);return H})},"esri/layers/rasterLib/raster/rasterFactory":function(){define("require dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/_base/array dojo/_base/config dojo/sniff dojo/when ../../../kernel ../../../Evented ../../../request ../../../deferredUtils ../../../urlUtils ./ImageServiceRaster ./TileServiceRaster ./TileRaster ./FunctionRaster".split(" "),function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w){H={customDrivers:[],create:function(u){if(u){if(u.url){var B=f.urlToObject(u.url);var x=
B.path;var E=B.query}B=u.serviceInfo;var y=u.rasterFxArgs||{},D=new n,G=m.hitch(this,function(C){console.error(C);this._trycustomDrivers(m.mixin({url:x},u),0,D)});if(x)if(-1===x.toLowerCase().indexOf("imageserver")&&-1===x.toLowerCase().indexOf("mapserver")){var A=new r(m.mixin({},u,{url:x}));u.rasterFx&&(A=new w({rasterFx:u.rasterFx,rasterFxArgs:m.mixin({},y,{raster:A})}));var t=A}else{t=new n;B=B||this._getServiceInfo(x,E);var v=m.hitch(this,function(C){C.bandCount?A=C.capabilities&&-1<C.capabilities.toLowerCase().indexOf("tileonly")?
new p(m.mixin({},{serviceInfo:C},E,u,{url:x})):new l(m.mixin({},{serviceInfo:C},E,u,{url:x})):C.tileInfo&&(A=new p(m.mixin({},{serviceInfo:C},E,this._options,{url:x})));u.rasterFx&&(A=new w({rasterFx:u.rasterFx,rasterFxArgs:m.mixin({},y,{raster:A})}));t.resolve(A)});a(B,v,G)}else t=A=new w({rasterFx:u.rasterFx,rasterFxArgs:m.mixin({},y,{raster:A})});a(t,m.hitch(this,function(C){C?C.open().then(m.hitch(this,function(J){D.resolve(C)}),G):G(Error("There is no raster to open"))}),G);return D.promise}},
register:function(u){this.customDrivers=this.customDrivers||[];0<this.customDrivers.filter(function(B){return B.sourceType===u.prototype.sourceType}).length||this.customDrivers.push(u)},_trycustomDrivers:function(u,B,x){x=x||new n;var E=this.customDrivers[B];if(E){var y=new E(u);y.open().then(m.hitch(this,function(D){x.resolve(y)}),m.hitch(this,function(D){this._trycustomDrivers(u,B+1,x)}))}else x.reject("cannot load layer "+(u&&u.url||""));return x.promise},_getServiceInfo:function(u,B){B=B||{};
var x=B.bandIds;B=B.renderingRule;var E=new n(k._dfdCanceller),y={f:"json"};x&&(y.bandIds=x);B&&(y.renderingRule=B.toJson?JSON.stringify(B.toJson()):JSON.stringify(B));E._pendingDfd=g({url:u,content:y,handleAs:"json",callbackParamName:"callback"});E._pendingDfd.then(function(D){E.callback(D)},function(D){E.errback(D)});return E.promise}};c("extend-esri")&&m.setObject("layers.rasterLib.raster.rasterFactory",H,b);return H})},"esri/layers/rasterLib/raster/ImageServiceRaster":function(){define("require dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/_base/array dojo/_base/config dojo/_base/json dojo/sniff dojo/DeferredList dojo/when ../../../kernel ../../../Evented ../../../request ../../../geometry/Extent ../../../geometry/Point ../../../SpatialReference ../../../WKIDUnitConversion ../../../deferredUtils ../../../urlUtils ../../MosaicRule ../../ImageServiceParameters ../../PixelBlock ./RasterInfo ./BasicRaster ../../rasterFormats/rasterCodec ../tile/RasterTileInfo".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D,G,A,t){H=e([G],{declaredClass:"esri.layers.rasterLib.raster.ImageServiceRaster",sourceType:"ImageService",constructor:function(v){v&&(this._imageServiceParams=v.imageServiceParameters,this._commonReqParams=v._commonReqParams,this._imageServiceParams||(this._imageServiceParams={interpolation:v.interpolation,pixelType:v.pixelType,format:v.format||"lerc",compressionQuality:v.compressionQuality,bandIds:v.bandIds,noDataInterpretation:v.noDataInterpretation,
adjustAspectRatio:v.adjustAspectRatio,mosaicRule:v.mosaicRule,renderingRule:v.interpolation}))},open:function(){var v=new n;if(this.serviceInfo&&this.rasterInfo)return this.loaded=!0,this._findCredential(),this.setFetchParameters(this._imageServiceParams),v.resolve(this),v.promise;var C=this.serviceInfo||this._generateServiceInfo(this._imageServiceParams&&this._imageServiceParams.renderingRule),J=m.hitch(this,function(S){this._fixServiceInfo(S);this.serviceInfo=S;this._findCredential();var U=this._parseRasterInfo(S),
aa={};S.defaultMosaicMethod?(aa.method=S.defaultMosaicMethod,aa.operation=S.mosaicOperator,aa.sortField=S.sortField,aa.sortValue=S.sortValue):aa.method=x.METHOD_NONE;this.serviceInfo.defaultMosaicRule=new x(aa);this.serviceInfo.defaultMosaicRule.ascending=!0;S=this._getColormap(this);aa=this._getHistograms(this);var ea=this._getRasterAttributeTable(this),ba=this._getKeyProperties(this),oa=this._getMultidimensionalInfo(),da=this._getSlices();(new b([S,aa,ea,ba,oa,da])).then(m.hitch(this,function(fa){fa[0][0]&&
(U.colormap=fa[0][1]);fa[1][0]&&(U.histograms=fa[1][1]);fa[2][0]&&(U.vat=fa[2][1]);fa[3][0]&&(U.keyProperties=fa[3][1]);fa[4][0]&&(U.multidimensionalInfo=fa[4][1]);this._slices=fa[5][0]?fa[5][1]:null;U.keyProperties&&U.keyProperties.DataType&&(this.dataType=U.keyProperties.DataType);this.loaded=!0;this.rasterInfo=U;this.setFetchParameters(this._imageServiceParams);v.resolve(this)}))}),L=m.hitch(this,function(S){this.loaded=!0;v.reject(S)});h(C,J,L);return v.promise},setFetchParameters:function(v,
C){if(C)this.imageServiceParams=v;else{var J=this.imageServiceParams;J&&v?Object.keys(v).forEach(function(L){J[L]=v[L]}):this.imageServiceParams=v}this._constructGetImageParams();this._getRasterIdentifier(!0)},read:function(v){if(v.pixelBlock||v.texture){var C=new n;C.resolve(v);return C.promise}if(!1===v.virtual&&this.tileInfo&&!this.tileInfo.virtual)return this.readTile(v);if(this._slices){var J=this._getSliceId();if(null==J)return C=new n,C.resolve(v),C.promise}var L=v.extent,S=L.spatialReference.wkid||
c.toJson(L.spatialReference.toJson(!1)),U=v.timeExtent?v.timeExtent.toJson().join(","):null;C=this.url+"/exportImage";var aa={};this._slices&&(aa.sliceid=J);this.disableClientCaching&&(aa._ts=(new Date).getTime());J=m.mixin({},this._commonReqParams,{bbox:L.xmin+","+L.ymin+","+L.xmax+","+L.ymax,imageSR:S,bboxSR:S,size:v.width+","+v.height,time:U},aa);return this._requestPixels({url:C,payload:J,decodeParams:{width:v.width,height:v.height,planes:null,pixelType:null,format:null,decodeFunc:null,isPoint:!1},
tileOptions:v})},readTile:function(v){var C=this.tileBoundary&&this.tileBoundary[v.level];if(C&&(C.minRow>v.row||C.maxRow<v.row||C.minCol>v.col||C.maxCol<v.col)){var J=new n;J.resolve(v);return J.promise}if(this._slices&&(J=this._getSliceId(),null==J))return J=new n,J.resolve(v),J.promise;C=this.url+"/tile/"+v.level+"/"+v.row+"/"+v.col;var L={width:this.tileInfo.cols,height:this.tileInfo.rows,planes:null,pixelType:null,format:null,decodeFunc:null,isPoint:"elevation"===v.tileType.toLowerCase()?!0:
!1};J=this._slices?"sliceid\x3d"+J+"\x26":"";J=this.disableClientCaching?"_ts\x3d "+(new Date).getTime():J.replace(/&$/,"");return this._requestPixels({url:C+(0<J.length?"?"+J:""),payload:{},decodeParams:L,tileOptions:v})},toJson:function(){return{url:this.url,tileInfo:this.tileInfo,rasterInfo:this.rasterInfo,serviceInfo:this.serviceInfo,sourceType:this.sourceType,_commonReqParams:this._commonReqParams,_rasterId:this._rasterId}},_getSliceId:function(){var v=m.clone(this._imageServiceParams.multidimensionalDefinition),
C=m.clone(this._imageServiceParams.time);if(null==this._slices||null==C&&(null==v||0===v.length))return 0;var J=v||this.defaultMultidimensionalDefinition,L=J[0].variableName;J=this._getAllDimensionDefinition(J,L).definition;v=null;if(null==J||0===J.length)return null;if(C&&this.serviceInfo.timeInfo){if(null==C[1]||C[1]===C[0])var S=C[0];else{var U=this.serviceInfo.timeInfo.startTimeField;S=this.rasterInfo.multidimensionalInfo.variables.find(function(ba){return ba.name===L}).dimensions.find(function(ba){return ba.name===
U}).values.filter(function(ba){return Array.isArray(ba)?Math.max(ba[0],C[0])<Math.min(ba[1],C[1]):ba>=C[0]&&ba<=C[1]}).sort(function(ba,oa){ba=Array.isArray(ba)?ba[1]:ba;oa=Array.isArray(oa)?ba[1]:oa;return Math.abs(C[1]-ba)-Math.abs(C[1]-oa)})[0]||[C[1]]}J.some(function(ba){if(ba.dimensionName===U)return ba.values[0]=S,!0;if(!ba.dimensionName)return ba.dimensionName=U,ba.isSlice=!0,ba.values=[S],!0})||J.push({variableName:L,dimensionName:U,isSlice:!0,values:[S]})}for(var aa=0;aa<this._slices.length;aa++){var ea=
this._slices[aa].multidimensionalDefinition;if(ea.length===J.length&&!ea.some(function(ba){var oa=J.filter(function(fa){return ba.variableName===fa.variableName&&fa.dimensionName===ba.dimensionName})[0];if(!oa)return!0;var da=Array.isArray(ba.values[0])?ba.values[0][0]:ba.values[0];oa=Array.isArray(oa.values[0])?oa.values[0][0]:oa.values[0];return da!==oa})){v=aa;break}}return v},_getAllDimensionDefinition:function(v,C){var J=v.map(function(S){return S.dimensionName}),L=!1;this.rasterInfo.multidimensionalInfo.variables.forEach(function(S){S.name!==
C||S.dimensions.length===v.length&&J[0]||(S.dimensions.forEach(function(U){0>J.indexOf(U.name)&&(J[0]?v.push({variableName:C,dimensionName:U.name,values:[U.values[0]]}):(v[0].dimensionName=U.name,v[0].values=[U.values[0]],U[0]=U.name))}),L=!0)},this);return{defChanged:L,definition:v}},_generateServiceInfo:function(v){var C=this.url,J=new n(u._dfdCanceller);J._pendingDfd=f({url:C,content:{f:"json",renderingRule:v?c.toJson(v.toJson()):null},handleAs:"json",callbackParamName:"callback"});J._pendingDfd.then(function(L){J.callback(L)},
function(L){J.errback(L)});return J},_fixServiceInfo:function(v){var C=v.spatialReference.wkid;v.tileInfo&&0===v.extent.xmin&&360===v.extent.xmax&&C&&null==w[C]&&(v.tileInfo.applyGCS360Transform=!0)},_parseRasterInfo:function(v){var C=new D;C.bandCount=v.bandCount;C.extent=new l(v.fullExtent);C.spatialReference=v.spatialReference;C.pixelType=v.pixelType;C.width=Math.floor((v.fullExtent.xmax-v.fullExtent.xmin)/v.pixelSizeX+.5);C.height=Math.floor((v.fullExtent.ymax-v.fullExtent.ymin)/v.pixelSizeY+
.5);C.cellSize=new p({x:v.pixelSizeX,y:v.pixelSizeY,spatialReference:v.spatialReference});var J;if(v.minValues&&0<v.minValues.length&&v.maxValues&&v.stdvValues&&v.meanValues){var L=[];for(J=0;J<v.minValues.length;J++)L.push({min:v.minValues[J],max:v.maxValues[J],mean:v.meanValues[J],stddev:v.stdvValues[J]});v.bandCount!==L.length&&(L=null)}this.dataType=v.serviceDataType?v.serviceDataType.replace("esriImageServiceDataType",""):"Generic";C.statistics=L;v.objectIdField&&v.fields&&(C.catalogInfo={objectIdField:v.objectIdField,
fields:v.fields});C.timeInfo=v.timeInfo;if(v.tileInfo){this.tileInfo=new t(v.tileInfo);this.tileInfo.tileType=v.cacheType||"Map";C.tileInfo=this.tileInfo;var S=C.extent,U=this.tileInfo.origin,aa=this.tileInfo.cols,ea=this.tileInfo.rows;this.tileBoundary=this.tileInfo.lods.map(function(ba){return{minCol:Math.floor((S.xmin-U.x+.1*ba.resolution)/aa/ba.resolution),maxCol:Math.floor((S.xmax-U.x-.1*ba.resolution)/aa/ba.resolution),minRow:Math.floor((U.y-S.ymax+.1*ba.resolution)/ea/ba.resolution),maxRow:Math.floor((U.y-
S.ymin-.1*ba.resolution)/ea/ba.resolution)}})}return C},_getColormap:function(v){v=this.url+"/colormap";var C=new n(u._dfdCanceller),J={f:"json"},L=this.serviceInfo.hasColormap||this.rasterInfo&&this.rasterInfo.hasColormap;10<this.serviceInfo.currentVersion&&L?(C._pendingDfd=f({url:v,content:J,handleAs:"json",callbackParamName:"callback"}),C._pendingDfd.then(function(S){C.callback(S.colormap)},function(S){C.errback(S)})):C.callback(null);return C},_getHistograms:function(v){var C=this.url+"/histograms",
J=new n(u._dfdCanceller),L={f:"json"},S=this.serviceInfo.hasHistograms||this.rasterInfo&&this.rasterInfo.hasHistograms;v&&v.renderingRule&&(L.renderingRule=c.toJson(v.renderingRule.toJson()),S=!0);10<this.serviceInfo.currentVersion&&S?(J._pendingDfd=f({url:C,content:L,handleAs:"json",callbackParamName:"callback"}),J._pendingDfd.then(function(U){J.callback(U.histograms)},function(U){J.errback(U)})):J.callback(null);return J},_getRasterAttributeTable:function(v){var C=this.url+"/rasterAttributeTable",
J=new n(u._dfdCanceller),L={f:"json"},S=this.serviceInfo.hasRasterAttributeTable;v&&v.renderingRule&&(L.renderingRule=c.toJson(v.renderingRule.toJson()),S=!0);10<this.serviceInfo.currentVersion&&S?(J._pendingDfd=f({url:C,content:L,handleAs:"json",callbackParamName:"callback"}),J._pendingDfd.then(function(U){J.callback(U)},function(U){J.errback(U)})):J.callback(null);return J},_getKeyProperties:function(v){var C=this.url+"/keyProperties",J=new n(u._dfdCanceller),L={f:"json"};v&&v.renderingRule&&(L.renderingRule=
c.toJson(v.renderingRule.toJson()));10<this.serviceInfo.currentVersion?(J._pendingDfd=f({url:C,content:L,handleAs:"json",callbackParamName:"callback"}),J._pendingDfd.then(function(S){J.callback(S)},function(S){J.errback(S)})):J.callback(null);return J},_getMultidimensionalInfo:function(){var v=this.url+"/multidimensionalInfo",C=new n(u._dfdCanceller);10.3<=this.serviceInfo.currentVersion&&this.serviceInfo.hasMultidimensions?(C._pendingDfd=f({url:v,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}),
C._pendingDfd.then(m.hitch(this,function(J){C.callback(J.multidimensionalInfo)}),function(J){C.errback(J)})):C.callback(null);return C},_getSlices:function(){var v=this.url+"/slices",C=new n(u._dfdCanceller);this.serviceInfo.hasMultidimensions?(C._pendingDfd=f({url:v,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}),C._pendingDfd.then(m.hitch(this,function(J){C.callback(J.slices)}),function(J){C.errback(J)})):C.callback(null);return C},_initializationFailed:function(){},_constructGetImageParams:function(){var v=
this.imageServiceParams||{},C=m.mixin({},this._query,{f:"image",interpolation:v.interpolation,pixelType:v.pixelType,format:v.format||"lerc",compressionQuality:v.compressionQuality,bandIds:v.bandIds?v.bandIds.join(","):null,noData:null!=v.noData?v.noData.join(","):null,noDataInterpretation:v.noDataInterpretation,adjustAspectRatio:null==v.adjustAspectRatio?null:v.adjustAspectRatio,mosaicRule:v.mosaicRule?c.toJson(v.mosaicRule.toJson()):null,renderingRule:v.renderingRule?c.toJson(v.renderingRule.toJson()):
null,token:this.credential&&this.credential.token||null});"lerc"===C.format.toLowerCase()?(C.compressionTolerance=v.compressionTolerance,10.5<=this.serviceInfo.currentVersion&&(C.lercVersion=v.lercVersion||2)):"tiff"===C.format.toLowerCase()?C.compression=v.compression:-1<["jpg","jpeg","jpg","jpgpng"].indexOf(C.format.toLowerCase())&&(C.compression=v.compression);this._commonReqParams=C},_getRasterIdentifier:function(v){if(this._rasterId)return this._rasterId;v=this.url.replace("http:","").replace("https:",
"");var C=[],J=this.imageServiceParams||{};C.push(v);C.push(J.interpolation);C.push(J.pixelType);C.push(J.compressionQuality);C.push(J.bandIds?J.bandIds.join(","):"");C.push(J.mosaicRule?c.toJson(J.mosaicRule.toJson()):"");C.push(J.renderingRule?c.toJson(J.renderingRule.toJson()):"");v=C.join("|");return this._rasterId=this._computeSignature(v)},_wrapExtent:function(v){var C=v.spatialReference._getInfo();if(C){var J=C.valid[0];C=C.valid[1];if(v.xmin<J-this.resolution.x||v.xmax>C+this.resolution.y){var L=
new l((v.xmin-J)%(C-J),v.ymin,(v.xmax-C)%(C-J),v.ymax,v.spatialReference);L.xmax<L.xmin&&(L=null)}}return L||v}});a("extend-esri")&&m.setObject("layers.rasterLib.raster.ImageServiceRaster",H,g);return H})},"esri/layers/ImageServiceParameters":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/json dojo/has ../kernel ../lang".split(" "),function(H,e,m,n,q,d){H=H(null,{declaredClass:"esri.layers.ImageServiceParameters",extent:null,width:null,height:null,imageSpatialReference:null,format:null,
interpolation:null,compressionQuality:null,bandIds:null,timeExtent:null,mosaicRule:null,renderingRule:null,renderer:null,noData:null,compressionTolerance:null,adjustAspectRatio:null,lercVersion:null,toJson:function(c){var a=this.bbox||this.extent;c=(a=a&&c&&a._normalize(!0))?a.spatialReference.wkid||m.toJson(a.spatialReference.toJson()):null;var b=this.imageSpatialReference;a={bbox:a?a.xmin+","+a.ymin+","+a.xmax+","+a.ymax:null,bboxSR:c,size:null!==this.width&&null!==this.height?this.width+","+this.height:
null,imageSR:b?b.wkid||m.toJson(b.toJson()):c,format:this.format,interpolation:this.interpolation,compressionQuality:this.compressionQuality,bandIds:this.bandIds?this.bandIds.join(","):null,mosaicRule:this.mosaicRule?m.toJson(this.mosaicRule.toJson()):null,renderingRule:this.renderingRule?m.toJson(this.renderingRule.toJson()):null,renderer:this.renderer?m.toJson(this.renderer.toJson()):null,noData:this.noData,noDataInterpretation:this.noDataInterpretation,compressionTolerance:this.compressionTolerance,
adjustAspectRatio:this.adjustAspectRatio,lercVersion:this.lercVersion};c=this.timeExtent;a.time=c?c.toJson().join(","):null;return d.filter(a,function(h){if(null!==h&&void 0!==h)return!0})}});e.mixin(H,{INTERPOLATION_BILINEAR:"RSP_BilinearInterpolation",INTERPOLATION_CUBICCONVOLUTION:"RSP_CubicConvolution",INTERPOLATION_MAJORITY:"RSP_Majority",INTERPOLATION_NEARESTNEIGHBOR:"RSP_NearestNeighbor",NODATA_MATCH_ALL:"esriNoDataMatchAll",NODATA_MATCH_ANY:"esriNoDataMatchAny"});n("extend-esri")&&e.setObject("layers.ImageServiceParameters",
H,q);return H})},"esri/layers/rasterLib/raster/RasterInfo":function(){define(["dojo/_base/declare","dojo/_base/lang","../../../geometry/Extent","../../../SpatialReference","../tile/RasterTileInfo"],function(H,e,m,n,q){return H(null,{declaredClass:"esri.layers.rasterLib.raster.RasterInfo",bandCount:null,pixelType:null,extent:null,spatialReference:null,width:null,height:null,colormap:null,attributeTable:null,multiDimensionalInfo:null,statistics:null,histograms:null,catalogInfo:null,keyProperties:null,
cellSize:null,format:null,compression:null,compressionQuality:null,packetSize:null,geodataXform:null,constructor:function(d){e.mixin(this,d);this.extent=this.extent?this.extent.toJson?this.extent:new m(this.extent):null;this.spatialReference=this.spatialReference?this.spatialReference.toJson?this.spatialReference:new n(this.spatialReference):null;this.tileInfo=this.tileInfo?this.tileInfo.toJson?this.tileInfo:new q(this.tileInfo):null},toJson:function(){return{bandCount:this.bandCount,pixelType:this.pixelType,
extent:this.extent&&this.extent.toJson?this.extent.toJson():this.extent,spatialReference:this.spatialReference&&this.spatialReference.toJson?this.spatialReference.toJson():this.spatialReference,width:this.width,height:this.height,colormap:this.colormap?e.clone(this.colormap):null,attributeTable:this.attributeTable?e.clone(this.attributeTable):null,multiDimensionalInfo:this.multiDimensionalInfo?e.clone(this.multiDimensionalInfo):null,statistics:this.statistics?e.clone(this.statistics):null,histograms:this.histograms?
e.clone(this.histograms):null,catalogInfo:this.catalogInfo?e.clone(this.catalogInfo):null,keyProperties:this.keyProperties?e.clone(this.keyProperties):null,cellSize:this.cellSize&&this.cellSize.toJson?this.cellSize.toJson():this.cellSize,tileInfo:this.tileInfo&&this.tileInfo.toJson?this.tileInfo.toJson():this.tileInfo,format:this.format,compression:this.compression,compressionQuality:this.compressionQuality,packetSize:this.packetSize,geodataXform:this.geodataXform?e.clone(this.geodataXform):null}},
clone:function(){return new this.constructor(this.toJson())}})})},"esri/layers/rasterLib/tile/RasterTileInfo":function(){define("dojo/_base/declare dojo/_base/lang ../../../geometry/Extent ../../../SpatialReference ../../../geometry/Point ../../../lang ../../TileInfo".split(" "),function(H,e,m,n,q,d,c){return H([c],{declaredClass:"esri.layers.rasterLib.tile.RasterTileInfo",rows:512,cols:512,compressionQuality:95,lercError:.01,spatialReference:null,origin:null,virtual:!0,tileType:"Raster",constructor:function(a,
b){if(a||b){var h=b&&b.refTileInfo;a?this.virtual=!1:(this.virtual=!0,e.mixin(this,{rows:b.rows||this.rows,cols:b.cols||this.cols,compressionQuality:b.compressionQuality||95,lercError:b.compressionTolerance||.01,spatialReference:b.spatialReference,origin:b.origin}),this.width=this.cols,this.height=this.rows,this.origin||(h?this.origin=h.origin:b.spatialReference.isWebMercator()||b.extent&&360<=Math.max(Math.abs(b.extent.xmin),Math.abs(b.extent.xmax))?this.origin={x:-2.0037508342787E7,y:2.0037508342787E7}:
-1<[4326,4269].indexOf(b.spatialReference.wkid)||360>Math.max(Math.abs(b.extent.xmin),Math.abs(b.extent.xmax))?this.origin={x:-180,y:90}:this.origin={x:b.extent.xmin,y:b.extent.ymax}))}},toJson:function(){var a=c.prototype.toJson.apply(this);a.tileType=this.tileType;a.virtual=this.virtual;a.lercError=this.lercError;return a},clone:function(){return new this.prototype(this.toJson())}})})},"esri/layers/rasterLib/raster/BasicRaster":function(){define("require dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/_base/array dojo/_base/config dojo/_base/json dojo/sniff dojo/DeferredList dojo/when ../../../kernel ../../../Evented ../../../request ../../../geometry/Extent ../../../geometry/Point ../../../SpatialReference ../../../deferredUtils ../../../urlUtils ../../MosaicRule ../../ImageServiceParameters ../../PixelBlock ../../rasterFormats/rasterCodec ../tile/RasterHandler ./rasterProjectionHelper ./RasterInfo".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D,G,A){return e([k],{url:null,dataType:null,rasterInfo:null,tileInfo:null,serviceInfo:null,loaded:null,constructor:function(t){if(t){var v=t.url;v&&(v=u.urlToObject(v),this.url=v.path,this._query=v.query);this.dataType=t.dataType;this.serviceInfo=t.serviceInfo;this.rasterInfo=t.rasterInfo;this.tileInfo=t.tileInfo;this.serviceInfo=t.serviceInfo}},open:function(){},read:function(t){},identify:function(t){var v=new n,C=this.rasterInfo.extent;if(G.requirePE(C.spatialReference,
t.spatialReference))G.load().then(m.hitch(this,function(){J=G.project(t,C.spatialReference);v.resolve(J)}),function(){v.reject(Error("cannot project into this spatial reference"))});else{var J=G.project(t,C.spatialReference);v.resolve(J)}return v.then(m.hitch(this,function(L){var S=this.tileInfo,U=S.origin,aa=S.lods[S.lods.length-1],ea=(L.x-U.x)/S.cols/aa.resolution;L=(U.y-L.y)/S.rows/aa.resolution;var ba=Math.round((L-Math.floor(L))*S.rows)*S.cols+Math.round((ea-Math.floor(ea))*S.cols);U=new l(U.x+
aa.resolution*S.cols*ea,U.y-aa.resolution*S.rows*(L+1),U.x+aa.resolution*S.cols*(ea+1),U.y-aa.resolution*S.rows*L,C.spatialReference);var oa=this.getMemberRasters?this.getMemberRasters()[0]:this;return oa.read({level:aa.level,row:Math.floor(L),col:Math.floor(ea),extent:U,width:S.cols,height:S.rows,virtual:oa.tileInfo.virtual,tileType:oa.tileInfo.tileType}).then(function(da){return(da=da&&da.pixelBlock)&&da.pixels&&0<da.pixels.length&&(!da.mask||da.mask[ba])?{pixelValue:da.pixels.map(function(fa){return fa[ba]})}:
{pixelValue:null}})}))},getProjectedFullExtent:function(t,v){var C=new n;if(this.projectedFullExtent&&!v)return C.resolve(this.projectedFullExtent),C.promise;var J=this.rasterInfo.extent;if(G.requirePE(this.rasterInfo.extent.spatialReference,t))G.load().then(m.hitch(this,function(){L=G.project(J,t);this.projectedFullExtent=L=new l(L.toJson());C.resolve(L)}),function(){C.reject(Error("cannot project into this spatial reference"))});else{var L=G.project(J,t);this.projectedFullExtent=L=new l(L.toJson());
C.resolve(L)}return C.promise},setFetchParameters:function(t,v){},_setRasterHandler:function(t){this._rasterHandler=t;this.getMemberRasters&&this.getMemberRasters().forEach(m.hitch(this,function(v){v._rasterHandler=t}))},_findCredential:function(){this.url&&((this._credential=g.id&&g.id.findCredential(this.url))&&this._credential.ssl||this.serviceInfo&&this.serviceInfo._ssl)&&(this.url=this.url.replace(/^http:/i,"https:"))},_initWorker:function(){this._rasterHandler=new D;this._rasterHandler.start().then(function(){this._rasterHandlerInitialized=
!0}.bind(this))},_requestPixels:function(t){var v=t.url,C=t.payload,J=t.decodeParams,L=t.tileOptions,S=new n(w._dfdCanceller);this._rasterHandler||this._initWorker();var U=this._rasterHandler,aa={};v={url:v,handleAs:"arraybuffer",content:C};t.headers&&(v.headers=t.headers);S._pendingDfd=f(v).then(m.hitch(this,function(ea){(U&&this._rasterHandlerInitialized?U.decode({encodedData:ea,decodeParams:J}):y.decode(ea,J)).then(function(ba){aa.pixelBlock=new E(ba);aa.extent=L.extent;aa.level=L.level;aa.row=
L.row;aa.col=L.col;aa.width=L.width;aa.height=L.height;w._resDfd(S,[aa])},function(ba){w._resDfd(S,[ba],!0)})}),function(ea){w._resDfd(S,[ea],!0)});return S},_computeSignature:function(t){if("string"===typeof t){for(var v=new Uint8Array(t.length),C=0;C<t.length;C++)v[C]=t.charCodeAt(C);t=v}C=v=65535;for(var J=t.length,L=Math.floor(J/2),S=0;L;){var U=359<=L?359:L;L-=U;do v+=t[S++]<<8,C+=v+=t[S++];while(--U);v=(v&65535)+(v>>>16);C=(C&65535)+(C>>>16)}J&1&&(C+=v+=t[S]<<8);return((C&65535)+(C>>>16)<<16|
(v&65535)+(v>>>16))>>>0}})})},"esri/layers/rasterFormats/rasterCodec":function(){define("require dojo/_base/declare dojo/_base/lang dojo/_base/Deferred ../PixelBlock ./LercCodec ./Lerc2Codec ./JpgPlus ./Png ./Raw ./TiffDecoder".split(" "),function(H,e,m,n,q,d,c,a,b,h,g){return{validPixelTypes:"U1 U2 U4 U8 U16 U32 S8 S16 S32 F32".split(" "),supportedFormats:"lerc jpeg jpg jpgpng png png8 png24 png32 bip bsq tiff".split(" "),_isPlatformLittleEndian:function(){var k=new ArrayBuffer(4),f=new Uint8Array(k);
(new Uint32Array(k))[0]=1;return 1===f[0]}(),decode:function(k,f){if(void 0===f||null===f)throw"missing decode options";var l;f.format&&(l=f.format.toUpperCase());"BSQ"!==l&&"BIP"!==l&&(l=this._getFormat(k));var p=f.decodeFunc;if(void 0===p||null===p)p=this._getFormatDecoderDfd(l);return p(k,f)},_getFormatDecoderDfd:function(k){var f=null;switch(k){case "LERC":f=this._decodeLerc;break;case "LERC2":f=this._decodeLerc2;break;case "JPEG":f=this._decodeJpeg;break;case "PNG":f=this._decodePng;break;case "BSQ":f=
this._decodeBsq;break;case "BIP":f=this._decodeBip;break;case "TIFF":f=this._decodeTiff;break;default:f=function(l,p){throw"The raster format is not supported";}}f=m.hitch(this,f);return function(l,p){var r=new n;p.isPoint&&p.width&&(p.width++,p.height++);l=f(l,p);p.isPoint&&p.width&&(this._interpolatePointGrid(l),p.width--,p.height--);r.resolve(l);return r}.bind(this)},_getFormat:function(k){k=new Uint8Array(k,0,10);var f="";if(255===k[0]&&216===k[1])f="JPEG";else if(137===k[0]&&80===k[1]&&78===
k[2]&&71===k[3])f="PNG";else if(67===k[0]&&110===k[1]&&116===k[2]&&90===k[3]&&73===k[4]&&109===k[5]&&97===k[6]&&103===k[7]&&101===k[8]&&32===k[9])f="LERC";else if(76===k[0]&&101===k[1]&&114===k[2]&&99===k[3]&&50===k[4]&&32===k[5])f="LERC2";else if(-1<String.fromCharCode.apply(null,k).toLowerCase().indexOf("error"))f="ERROR";else if(73===k[0]&&73===k[1]&&42===k[2]&&0===k[3]||77===k[0]&&77===k[1]&&0===k[2]&&42===k[3])f="TIFF";return f},_validateDecodeParams:function(k){if(!k.height||Math.floor(k.height)!==
k.height)throw"Height not provided.";if(!k.width||Math.floor(k.width)!==k.width)throw"Width not provided.";},_decodeJpeg:function(k,f){if(!a)throw"The jpeg decoder module is not loaded.";this._validateDecodeParams(f);k=(new a).decode(k);if(!this._verifyResult(k,f))throw"The decoded image dimensions are incorrect.";f=new q({width:k.width,height:k.height,pixels:k.pixels,pixelType:"U8",mask:k.mask,statistics:null});f.calculateStatistics();return f},_decodePng:function(k,f){if(!b)throw"The png decoder module is not loaded.";
this._validateDecodeParams(f);k=new Uint8Array(k);var l=new b(k);k=new Uint8Array(f.width*f.height*4);l.copyToImageData(k,l.decodePixels());var p=l=0;p=new Uint8Array(f.width*f.height);for(l=0;l<f.width*f.height;l++)p[l]=k[4*l+3];var r=new q({width:f.width,height:f.height,pixels:[],pixelType:"U8",mask:p,statistics:[]});for(l=0;3>l;l++){var w=new Uint8Array(f.width*f.height);for(p=0;p<f.width*f.height;p++)w[p]=k[4*p+l];r.addData({pixels:w})}r.calculateStatistics();return r},_decodeBsq:function(k,f){if(!h)throw"The bsq decoder module is not loaded.";
this._validateDecodeParams(f);var l=f.noDataValue;f.pixelType=this._getpixelTypeAndNoData(f.pixelType);k=h.decodeBSQ(k,{bandCount:f.planes,width:f.width,height:f.height,pixelType:f.pixelType,noDataValue:l});f=new q({width:f.width,height:f.height,pixels:k.pixels,pixelType:f.pixelType,mask:k.maskData,statistics:null});f.calculateStatistics();return f},_decodeBip:function(k,f){this._validateDecodeParams(f);var l=f.noDataValue;f.pixelType=this._getpixelTypeAndNoData(f.pixelType);k=h.decodeBIP(k,{bandCount:f.planes,
width:f.width,height:f.height,pixelType:f.pixelType,noDataValue:l});f=new q({width:f.width,height:f.height,pixels:k.pixels,pixelType:f.pixelType,mask:k.maskData,statistics:null});f.calculateStatistics();return f},_decodeTiff:function(k,f){this._validateDecodeParams(f);f.pixelType=this._getpixelTypeAndNoData(f.pixelType);k=g.decode(k);k=new q({width:k.width,height:k.height,pixels:k.pixels,pixelType:k.pixelType,mask:k.maskData,statistics:null});k.calculateStatistics();return k},_decodeLerc:function(k,
f){if(!this._isPlatformLittleEndian)throw"lerc decoder is not supported on big endian platform";this._validateDecodeParams(f);var l=f.noDataValue;f.pixelType=this._getpixelTypeAndNoData(f.pixelType);for(var p=0,r,w=0,u,B=k.byteLength-10;w<B;){var x=d.decode(k,{inputOffset:w,encodedMaskData:r,returnMask:0===p?!0:!1,returnEncodedMask:0===p?!0:!1,returnFileInfo:!0,pixelType:f.pixelType,noDataValue:l});w=x.fileInfo.eofOffset;0===p&&(r=x.encodedMaskData,u=new q({width:f.width,height:f.height,pixels:[],
pixelType:f.pixelType,mask:x.maskData,statistics:[]}));p++;if(!this._verifyResult(x,f))throw"The decoded image dimensions are incorrect";u.addData({pixels:x.pixelData,statistics:{minValue:x.minValue,maxValue:x.maxValue,noDataValue:x.noDataValue}})}return u},_decodeLerc2:function(k,f){if(!this._isPlatformLittleEndian)throw"lerc2 decoder is not supported on big endian platform";this._validateDecodeParams(f);f.pixelType=this._getpixelTypeAndNoData(f.pixelType);for(var l=0,p,r,w,u=0,B,x=k.byteLength-
10,E=[],y,D=0;u<x;){r=c.decode(k,{inputOffset:u,maskData:p,returnFileInfo:!0});u=r.fileInfo.eofOffset;p=r.maskData;0===l&&(w=r.fileInfo.numValidPixel,B=new q({width:f.width,height:f.height,pixels:[],dimCount:r.dimCount||1,pixelType:r.fileInfo.pixelType,mask:p,statistics:[]}));r.fileInfo.mask&&0<r.fileInfo.mask.numBytes&&D++;p&&E.push(p);l++;if(!this._verifyResult(r,f))throw"The decoded image dimensions are incorrect";B.addData({pixels:r.pixelData,statistics:{minValue:r.minValue,maxValue:r.maxValue,
noDataValue:r.noDataValue,dimStats:r.dimStats}})}if(1<D){f=B.width*B.height;B.bandMasks=E;p=new Uint8Array(f);p.set(E[0]);for(w=1;w<E.length;w++)for(y=E[w],k=0;k<f;k++)p[k]&=y[k];for(k=w=0;k<f;k++)w+=y[k];B.mask=p}B.validPixelCount=w;return B},_interpolatePointGrid:function(k,f){var l=k.pixels;if(l&&0!==l.length){var p=l.length,r=k.width,w=k.mask,u=r-1,B=k.height-1,x=[],E,y;if(0===(null==f?1:f)){for(f=0;f<p;f++){var D=l[f];var G=new D.constructor(u*B);for(E=0;E<B;E++){var A=E*r;for(y=0;y<u;y++)G[E*
u+y]=D[A+y]}x.push(G)}if(w){var t=new Uint8Array(u*B);for(E=0;E<B;E++)for(A=E*r,y=0;y<u;y++)t[E*u+y]=w[A+y]}}else{for(f=0;f<p;f++){D=l[f];G=new D.constructor(u*B);for(E=0;E<B;E++)for(A=E*r,y=0;y<u;y++)G[E*u+y]=(D[A+y]+D[A+y+1]+D[A+r+y]+D[A+r+y+1])/4;x.push(G)}if(w)for(t=new Uint8Array(u*B),E=0;E<B;E++)for(A=E*r,y=0;y<u;y++)t[E*u+y]=Math.min.apply(null,[w[A+y],w[A+y+1],w[A+r+y],w[A+r+y+1]])}k.width=u;k.height=B;k.mask=t;k.pixels=x;return k}},_getpixelTypeAndNoData:function(k){return"U1"===k||"U2"===
k||"U4"===k||"U8"===k?"U8":k},_verifyResult:function(k,f){return k.height!==f.height||k.width!==f.width?!1:!0}}})},"esri/layers/rasterFormats/JpgPlus":function(){define(["dojo/_base/declare","./Zlib","./Jpg"],function(H,e,m){return H(null,{constructor:function(){},decode:function(n){var q=new Uint8Array(n);n=new m;n.parse(q);var d=n.numComponents,c=n.getData(n.width,n.height,!0),a=n.width*n.height,b=n.eof,h=0,g=0,k=0;if(b<q.length-1){g=(new e(q.subarray(b))).getBytes();var f=new Uint8Array(a);for(h=
q=0;h<g.length;h++)for(k=7;0<=k;k--)f[q++]=g[h]>>k&1}q=[];if(1===d)q=[c,c,c];else{for(h=0;3>h;h++)d=new Uint8Array(a),q.push(d);for(g=k=0;g<a;g++)for(h=0;3>h;h++)q[h][g]=c[k++]}return{width:n.width,height:n.height,pixels:q,mask:f}}})})},"esri/layers/rasterFormats/Zlib":function(){define([],function(){var H=function(){function e(){this.bufferLength=this.pos=0;this.eof=!1;this.buffer=null}e.prototype={ensureBuffer:function(m){var n=this.buffer,q=n?n.byteLength:0;if(m<q)return n;for(var d=512;d<m;)d<<=
1;m=new Uint8Array(d);for(d=0;d<q;++d)m[d]=n[d];return this.buffer=m},getByte:function(){for(var m=this.pos;this.bufferLength<=m;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(m){var n=this.pos;if(m){this.ensureBuffer(n+m);for(m=n+m;!this.eof&&this.bufferLength<m;)this.readBlock();var q=this.bufferLength;m>q&&(m=q)}else{for(;!this.eof;)this.readBlock();m=this.bufferLength}this.pos=m;return this.buffer.subarray(n,m)},lookChar:function(){for(var m=this.pos;this.bufferLength<=
m;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var m=this.pos;this.bufferLength<=m;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(m,n,q){for(var d=m+n;this.bufferLength<=d&&!this.eof;)this.readBlock();return new Stream(this.buffer,m,n,q)},skip:function(m){m||(m=1);this.pos+=m},reset:function(){this.pos=0}};return e}();return function(){function e(b){throw Error(b);
}function m(b){var h=0,g=b[h++],k=b[h++];-1!=g&&-1!=k||e("Invalid header in flate stream");8!=(g&15)&&e("Unknown compression method in flate stream");0!=((g<<8)+k)%31&&e("Bad FCHECK in flate stream");k&32&&e("FDICT bit set in flate stream");this.bytes=b;this.bytesPos=h;this.codeBuf=this.codeSize=0;H.call(this)}if(!self||!self.Uint32Array)return null;var n=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),q=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,
131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),d=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),c=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,
459020,524392,524328,59E4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,
459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,
459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,
459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,
459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,
459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,
459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],a=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,
327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];m.prototype=Object.create(H.prototype);m.prototype.getBits=function(b){for(var h=this.codeSize,g=this.codeBuf,k=this.bytes,f=this.bytesPos,l;h<b;)"undefined"==typeof(l=k[f++])&&e("Bad encoding in flate stream"),g|=l<<h,h+=8;this.codeBuf=g>>b;this.codeSize=h-=b;this.bytesPos=f;return g&(1<<b)-1};m.prototype.getCode=function(b){var h=b[0],g=b[1];b=this.codeSize;for(var k=
this.codeBuf,f=this.bytes,l=this.bytesPos;b<g;){var p;"undefined"==typeof(p=f[l++])&&e("Bad encoding in flate stream");k|=p<<b;b+=8}g=h[k&(1<<g)-1];h=g>>16;g&=65535;(0==b||b<h||0==h)&&e("Bad encoding in flate stream");this.codeBuf=k>>h;this.codeSize=b-h;this.bytesPos=l;return g};m.prototype.generateHuffmanTable=function(b){for(var h=b.length,g=0,k=0;k<h;++k)b[k]>g&&(g=b[k]);for(var f=1<<g,l=new Uint32Array(f),p=1,r=0,w=2;p<=g;++p,r<<=1,w<<=1)for(var u=0;u<h;++u)if(b[u]==p){var B=0,x=r;for(k=0;k<p;++k)B=
B<<1|x&1,x>>=1;for(k=B;k<f;k+=w)l[k]=p<<16|u;++r}return[l,g]};m.prototype.readBlock=function(){function b(B,x,E,y,D){for(B=B.getBits(E)+y;0<B--;)x[r++]=D}var h=this.getBits(3);h&1&&(this.eof=!0);h>>=1;if(0==h){var g=this.bytes,k=this.bytesPos,f;"undefined"==typeof(f=g[k++])&&e("Bad block header in flate stream");var l=f;"undefined"==typeof(f=g[k++])&&e("Bad block header in flate stream");l|=f<<8;"undefined"==typeof(f=g[k++])&&e("Bad block header in flate stream");h=f;"undefined"==typeof(f=g[k++])&&
e("Bad block header in flate stream");(h|f<<8)!=(~l&65535)&&e("Bad uncompressed block length in flate stream");this.codeSize=this.codeBuf=0;f=this.bufferLength;h=this.ensureBuffer(f+l);this.bufferLength=l=f+l;for(var p=f;p<l;++p){if("undefined"==typeof(f=g[k++])){this.eof=!0;break}h[p]=f}this.bytesPos=k}else{if(1==h)k=c,f=a;else if(2==h){h=this.getBits(5)+257;f=this.getBits(5)+1;g=this.getBits(4)+4;k=Array(n.length);for(var r=0;r<g;)k[n[r++]]=this.getBits(3);k=this.generateHuffmanTable(k);r=g=0;f=
h+f;for(l=Array(f);r<f;)p=this.getCode(k),16==p?b(this,l,2,3,g):17==p?b(this,l,3,3,g=0):18==p?b(this,l,7,11,g=0):l[r++]=g=p;k=this.generateHuffmanTable(l.slice(0,h));f=this.generateHuffmanTable(l.slice(h,f))}else e("Unknown block type in flate stream");l=(h=this.buffer)?h.length:0;for(p=this.bufferLength;;){var w=this.getCode(k);if(256>w)p+1>=l&&(h=this.ensureBuffer(p+1),l=h.length),h[p++]=w;else{if(256==w){this.bufferLength=p;break}w-=257;w=q[w];var u=w>>16;0<u&&(u=this.getBits(u));g=(w&65535)+u;
w=this.getCode(f);w=d[w];u=w>>16;0<u&&(u=this.getBits(u));w=(w&65535)+u;p+g>=l&&(h=this.ensureBuffer(p+g),l=h.length);for(u=0;u<g;++u,++p)h[p]=h[p-w]}}}};return m}()})},"esri/layers/rasterFormats/Jpg":function(){define([],function(){var H=function(){function e(m){this.message="JPEG error: "+m}e.prototype=Error();e.prototype.name="JpegError";return e.constructor=e}();return function(){function e(){this.decodeTransform=null;this.colorTransform=-1}function m(a,b){for(var h=0,g=[],k,f,l=16;0<l&&!a[l-
1];)l--;g.push({children:[],index:0});var p=g[0],r;for(k=0;k<l;k++){for(f=0;f<a[k];f++){p=g.pop();for(p.children[p.index]=b[h];0<p.index;)p=g.pop();p.index++;for(g.push(p);g.length<=k;)g.push(r={children:[],index:0}),p.children[p.index]=r.children,p=r;h++}k+1<l&&(g.push(r={children:[],index:0}),p.children[p.index]=r.children,p=r)}return g[0].children}function n(a,b,h,g,k,f,l,p,r){function w(){if(0<J)return J--,C>>J&1;C=a[b++];if(255===C){var O=a[b++];if(O)throw new H("unexpected marker "+(C<<8|O).toString(16));
}J=7;return C>>>7}function u(O){for(;;){O=O[w()];if("number"===typeof O)return O;if("object"!==typeof O)throw new H("invalid huffman sequence");}}function B(O){for(var F=0;0<O;)F=F<<1|w(),O--;return F}function x(O){if(1===O)return 1===w()?1:-1;var F=B(O);return F>=1<<O-1?F:F+(-1<<O)+1}function E(O,F){var M=u(O.huffmanTableDC);M=0===M?0:x(M);O.blockData[F]=O.pred+=M;for(M=1;64>M;){var N=u(O.huffmanTableAC),V=N&15;N>>=4;if(0===V){if(15>N)break;M+=16}else M+=N,O.blockData[F+c[M]]=x(V),M++}}function y(O,
F){var M=u(O.huffmanTableDC);M=0===M?0:x(M)<<r;O.blockData[F]=O.pred+=M}function D(O,F){O.blockData[F]|=w()<<r}function G(O,F){if(0<L)L--;else for(var M=f;M<=l;){var N=u(O.huffmanTableAC),V=N&15;N>>=4;if(0===V){if(15>N){L=B(N)+(1<<N)-1;break}M+=16}else M+=N,O.blockData[F+c[M]]=x(V)*(1<<r),M++}}function A(O,F){for(var M=f,N=0,V;M<=l;){V=c[M];switch(S){case 0:N=u(O.huffmanTableAC);V=N&15;N>>=4;if(0===V)15>N?(L=B(N)+(1<<N),S=4):(N=16,S=1);else{if(1!==V)throw new H("invalid ACn encoding");U=x(V);S=N?
2:3}continue;case 1:case 2:O.blockData[F+V]?O.blockData[F+V]+=w()<<r:(N--,0===N&&(S=2===S?3:0));break;case 3:O.blockData[F+V]?O.blockData[F+V]+=w()<<r:(O.blockData[F+V]=U<<r,S=0);break;case 4:O.blockData[F+V]&&(O.blockData[F+V]+=w()<<r)}M++}4===S&&(L--,0===L&&(S=0))}var t=h.mcusPerLine,v=b,C=0,J=0,L=0,S=0,U,aa=g.length,ea,ba,oa,da;p=h.progressive?0===f?0===p?y:D:0===p?G:A:E;var fa=0;h=1===aa?g[0].blocksPerLine*g[0].blocksPerColumn:t*h.mcusPerColumn;for(var R,W;fa<h;){var la=k?Math.min(h-fa,k):h;for(ea=
0;ea<aa;ea++)g[ea].pred=0;L=0;if(1===aa){var K=g[0];for(da=0;da<la;da++)p(K,64*((K.blocksPerLine+1)*(fa/K.blocksPerLine|0)+fa%K.blocksPerLine)),fa++}else for(da=0;da<la;da++){for(ea=0;ea<aa;ea++)for(K=g[ea],R=K.h,W=K.v,ba=0;ba<W;ba++)for(oa=0;oa<R;oa++)p(K,64*((K.blocksPerLine+1)*((fa/t|0)*K.v+ba)+(fa%t*K.h+oa)));fa++}J=0;(K=d(a,b))&&K.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+K.invalid),b=K.offset);K=K&&K.marker;if(!K||65280>=K)throw new H("marker was not found");
if(65488<=K&&65495>=K)b+=2;else break}(K=d(a,b))&&K.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+K.invalid),b=K.offset);return b-v}function q(a,b){a=b.blocksPerLine;for(var h=b.blocksPerColumn,g=new Int16Array(64),k=0;k<h;k++)for(var f=0;f<a;f++){var l=void 0,p=void 0,r=void 0,w=void 0,u=void 0,B=void 0,x=void 0,E=void 0,y=u=B=w=p=l=void 0,D=void 0,G=void 0,A=void 0,t=64*((b.blocksPerLine+1)*k+f),v=g,C=b.quantizationTable,J=b.blockData;if(!C)throw new H("missing required Quantization Table.");
for(var L=0;64>L;L+=8)l=J[t+L],E=J[t+L+1],x=J[t+L+2],B=J[t+L+3],u=J[t+L+4],w=J[t+L+5],r=J[t+L+6],p=J[t+L+7],l*=C[L],0===(E|x|B|u|w|r|p)?(l=5793*l+512>>10,v[L]=l,v[L+1]=l,v[L+2]=l,v[L+3]=l,v[L+4]=l,v[L+5]=l,v[L+6]=l,v[L+7]=l):(E*=C[L+1],x*=C[L+2],B*=C[L+3],u*=C[L+4],w*=C[L+5],r*=C[L+6],p*=C[L+7],A=5793*l+128>>8,G=5793*u+128>>8,D=x,y=r,u=2896*(E-p)+128>>8,p=2896*(E+p)+128>>8,B<<=4,w<<=4,A=A+G+1>>1,G=A-G,l=3784*D+1567*y+128>>8,D=1567*D-3784*y+128>>8,y=l,u=u+w+1>>1,w=u-w,p=p+B+1>>1,B=p-B,A=A+y+1>>1,y=
A-y,G=G+D+1>>1,D=G-D,l=2276*u+3406*p+2048>>12,u=3406*u-2276*p+2048>>12,p=l,l=799*B+4017*w+2048>>12,B=4017*B-799*w+2048>>12,w=l,v[L]=A+p,v[L+7]=A-p,v[L+1]=G+w,v[L+6]=G-w,v[L+2]=D+B,v[L+5]=D-B,v[L+3]=y+u,v[L+4]=y-u);for(C=0;8>C;++C)l=v[C],E=v[C+8],x=v[C+16],B=v[C+24],u=v[C+32],w=v[C+40],r=v[C+48],p=v[C+56],0===(E|x|B|u|w|r|p)?(l=5793*l+8192>>14,l=-2040>l?0:2024<=l?255:l+2056>>4,J[t+C]=l,J[t+C+8]=l,J[t+C+16]=l,J[t+C+24]=l,J[t+C+32]=l,J[t+C+40]=l,J[t+C+48]=l,J[t+C+56]=l):(A=5793*l+2048>>12,G=5793*u+2048>>
12,D=x,y=r,u=2896*(E-p)+2048>>12,p=2896*(E+p)+2048>>12,A=(A+G+1>>1)+4112,G=A-G,l=3784*D+1567*y+2048>>12,D=1567*D-3784*y+2048>>12,y=l,u=u+w+1>>1,w=u-w,p=p+B+1>>1,B=p-B,A=A+y+1>>1,y=A-y,G=G+D+1>>1,D=G-D,l=2276*u+3406*p+2048>>12,u=3406*u-2276*p+2048>>12,p=l,l=799*B+4017*w+2048>>12,B=4017*B-799*w+2048>>12,w=l,l=A+p,p=A-p,E=G+w,r=G-w,x=D+B,w=D-B,B=y+u,u=y-u,l=16>l?0:4080<=l?255:l>>4,E=16>E?0:4080<=E?255:E>>4,x=16>x?0:4080<=x?255:x>>4,B=16>B?0:4080<=B?255:B>>4,u=16>u?0:4080<=u?255:u>>4,w=16>w?0:4080<=w?
255:w>>4,r=16>r?0:4080<=r?255:r>>4,p=16>p?0:4080<=p?255:p>>4,J[t+C]=l,J[t+C+8]=E,J[t+C+16]=x,J[t+C+24]=B,J[t+C+32]=u,J[t+C+40]=w,J[t+C+48]=r,J[t+C+56]=p)}return b.blockData}function d(a,b,h){var g=a.length-1;h=h<b?h:b;if(b>=g)return null;var k=a[b]<<8|a[b+1];if(65472<=k&&65534>=k)return{invalid:null,marker:k,offset:b};for(b=a[h]<<8|a[h+1];!(65472<=b&&65534>=b);){if(++h>=g)return null;b=a[h]<<8|a[h+1]}return{invalid:k.toString(16),marker:b,offset:h}}if(!self||!self.Uint8ClampedArray)return null;var c=
new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);e.prototype={parse:function(a){function b(){var C=a[k]<<8|a[k+1];k+=2;return C}function h(){var C=b();C=k+C-2;var J=d(a,C,k);J&&J.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+J.invalid),C=J.offset);C=a.subarray(k,C);k+=C.length;return C}function g(C){for(var J=Math.ceil(C.samplesPerLine/
8/C.maxH),L=Math.ceil(C.scanLines/8/C.maxV),S=0;S<C.components.length;S++){v=C.components[S];var U=Math.ceil(Math.ceil(C.samplesPerLine/8)*v.h/C.maxH),aa=Math.ceil(Math.ceil(C.scanLines/8)*v.v/C.maxV);v.blockData=new Int16Array(64*L*v.v*(J*v.h+1));v.blocksPerLine=U;v.blocksPerColumn=aa}C.mcusPerLine=J;C.mcusPerColumn=L}var k=0,f=null,l=null,p=[],r=[],w=[],u=b();if(65496!==u)throw new H("SOI not found");for(u=b();65497!==u;){switch(u){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var B=
h();65504===u&&74===B[0]&&70===B[1]&&73===B[2]&&70===B[3]&&0===B[4]&&(f={version:{major:B[5],minor:B[6]},densityUnits:B[7],xDensity:B[8]<<8|B[9],yDensity:B[10]<<8|B[11],thumbWidth:B[12],thumbHeight:B[13],thumbData:B.subarray(14,14+3*B[12]*B[13])});65518===u&&65===B[0]&&100===B[1]&&111===B[2]&&98===B[3]&&101===B[4]&&(l={version:B[5]<<8|B[6],flags0:B[7]<<8|B[8],flags1:B[9]<<8|B[10],transformCode:B[11]});break;case 65499:u=b()+k-2;for(var x;k<u;){var E=a[k++],y=new Uint16Array(64);if(0===E>>4)for(B=
0;64>B;B++)x=c[B],y[x]=a[k++];else if(1===E>>4)for(B=0;64>B;B++)x=c[B],y[x]=b();else throw new H("DQT - invalid table spec");p[E&15]=y}break;case 65472:case 65473:case 65474:if(D)throw new H("Only single frame JPEGs supported");b();var D={};D.extended=65473===u;D.progressive=65474===u;D.precision=a[k++];D.scanLines=b();D.samplesPerLine=b();D.components=[];D.componentIds={};B=a[k++];for(u=y=E=0;u<B;u++){x=a[k];var G=a[k+1]>>4;var A=a[k+1]&15;E<G&&(E=G);y<A&&(y=A);G=D.components.push({h:G,v:A,quantizationId:a[k+
2],quantizationTable:null});D.componentIds[x]=G-1;k+=3}D.maxH=E;D.maxV=y;g(D);break;case 65476:x=b();for(u=2;u<x;){E=a[k++];y=new Uint8Array(16);for(B=G=0;16>B;B++,k++)G+=y[B]=a[k];A=new Uint8Array(G);for(B=0;B<G;B++,k++)A[B]=a[k];u+=17+G;(0===E>>4?w:r)[E&15]=m(y,A)}break;case 65501:b();var t=b();break;case 65498:b();x=a[k++];B=[];for(u=0;u<x;u++){E=D.componentIds[a[k++]];var v=D.components[E];E=a[k++];v.huffmanTableDC=w[E>>4];v.huffmanTableAC=r[E&15];B.push(v)}u=a[k++];x=a[k++];E=a[k++];u=n(a,k,
D,B,t,u,x,E>>4,E&15);k+=u;break;case 65535:255!==a[k]&&k--;break;default:if(255===a[k-3]&&192<=a[k-2]&&254>=a[k-2])k-=3;else throw new H("unknown marker "+u.toString(16));}u=b()}this.width=D.samplesPerLine;this.height=D.scanLines;this.jfif=f;this.eof=k;this.adobe=l;this.components=[];for(u=0;u<D.components.length;u++){v=D.components[u];if(f=p[v.quantizationId])v.quantizationTable=f;this.components.push({output:q(D,v),scaleX:v.h/D.maxH,scaleY:v.v/D.maxV,blocksPerLine:v.blocksPerLine,blocksPerColumn:v.blocksPerColumn})}this.numComponents=
this.components.length},_getLinearizedBlockData:function(a,b){var h=this.width/a,g=this.height/b,k,f,l=0,p=this.components.length,r=a*b*p,w=new Uint8ClampedArray(r),u=new Uint32Array(a);for(f=0;f<p;f++){var B=this.components[f];var x=B.scaleX*h;var E=B.scaleY*g;l=f;var y=B.output;var D=B.blocksPerLine+1<<3;for(k=0;k<a;k++)B=0|k*x,u[k]=(B&4294967288)<<3|B&7;for(x=0;x<b;x++)for(B=0|x*E,B=D*(B&4294967288)|(B&7)<<3,k=0;k<a;k++)w[l]=y[B+u[k]],l+=p}if(b=this.decodeTransform)for(f=0;f<r;)for(a=B=0;B<p;B++,
f++,a+=2)w[f]=(w[f]*b[a]>>8)+b[a+1];return w},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0===this.colorTransform?!1:!0:1===this.colorTransform?!0:!1},_convertYccToRgb:function(a){for(var b,h,g,k=0,f=a.length;k<f;k+=3)b=a[k],h=a[k+1],g=a[k+2],a[k]=b-179.456+1.402*g,a[k+1]=b+135.459-.344*h-.714*g,a[k+2]=b-226.816+1.772*h;return a},_convertYcckToRgb:function(a){for(var b,h,g,k,f=0,l=0,p=a.length;l<p;l+=4)b=a[l],h=a[l+1],g=a[l+2],k=a[l+3],a[f++]=
-122.67195406894+h*(-6.60635669420364E-5*h+4.37130475926232E-4*g-5.4080610064599E-5*b+4.8449797120281E-4*k-.154362151871126)+g*(-9.57964378445773E-4*g+8.17076911346625E-4*b-.00477271405408747*k+1.53380253221734)+b*(9.61250184130688E-4*b-.00266257332283933*k+.48357088451265)+k*(-3.36197177618394E-4*k+.484791561490776),a[f++]=107.268039397724+h*(2.19927104525741E-5*h-6.40992018297945E-4*g+6.59397001245577E-4*b+4.26105652938837E-4*k-.176491792462875)+g*(-7.78269941513683E-4*g+.00130872261408275*b+7.70482631801132E-4*
k-.151051492775562)+b*(.00126935368114843*b-.00265090189010898*k+.25802910206845)+k*(-3.18913117588328E-4*k-.213742400323665),a[f++]=-20.810012546947+h*(-5.70115196973677E-4*h-2.63409051004589E-5*g+.0020741088115012*b-.00288260236853442*k+.814272968359295)+g*(-1.53496057440975E-5*g-1.32689043961446E-4*b+5.60833691242812E-4*k-.195152027534049)+b*(.00174418132927582*b-.00255243321439347*k+.116935020465145)+k*(-3.43531996510555E-4*k+.24165260232407);return a},_convertYcckToCmyk:function(a){for(var b,
h,g,k=0,f=a.length;k<f;k+=4)b=a[k],h=a[k+1],g=a[k+2],a[k]=434.456-b-1.402*g,a[k+1]=119.541-b+.344*h+.714*g,a[k+2]=481.816-b-1.772*h;return a},_convertCmykToRgb:function(a){for(var b,h,g,k,f=0,l=1/255,p=0,r=a.length;p<r;p+=4)b=a[p]*l,h=a[p+1]*l,g=a[p+2]*l,k=a[p+3]*l,a[f++]=255+b*(-4.387332384609988*b+54.48615194189176*h+18.82290502165302*g+212.25662451639585*k-285.2331026137004)+h*(1.7149763477362134*h-5.6096736904047315*g-17.873870861415444*k-5.497006427196366)+g*(-2.5217340131683033*g-21.248923337353073*
k+17.5119270841813)-k*(21.86122147463605*k+189.48180835922747),a[f++]=255+b*(8.841041422036149*b+60.118027045597366*h+6.871425592049007*g+31.159100130055922*k-79.2970844816548)+h*(-15.310361306967817*h+17.575251261109482*g+131.35250912493976*k-190.9453302588951)+g*(4.444339102852739*g+9.8632861493405*k-24.86741582555878)-k*(20.737325471181034*k+187.80453709719578),a[f++]=255+b*(.8842522430003296*b+8.078677503112928*h+30.89978309703729*g-.23883238689178934*k-14.183576799673286)+h*(10.49593273432072*
h+63.02378494754052*g+50.606957656360734*k-112.23884253719248)+g*(.03296041114873217*g+115.60384449646641*k-193.58209356861505)-k*(22.33816807309886*k+180.12613974708367);return a},getData:function(a,b,h){if(4<this.numComponents)throw new H("Unsupported color mode");a=this._getLinearizedBlockData(a,b);if(1===this.numComponents&&h){h=a.length;b=new Uint8ClampedArray(3*h);for(var g=0,k=0;k<h;k++){var f=a[k];b[g++]=f;b[g++]=f;b[g++]=f}return b}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(a);
if(4===this.numComponents){if(this._isColorConversionNeeded())return h?this._convertYcckToRgb(a):this._convertYcckToCmyk(a);if(h)return this._convertCmykToRgb(a)}return a}};return e}()})},"esri/layers/rasterFormats/Png":function(){define(["./Zlib"],function(H){return function(){function e(n){var q,d;this.data=n;this.pos=8;this.palette=[];this.imgData=[];this.transparency={};this.animation=null;this.text={};for(d=null;;){var c=this.readUInt32();var a=n=void 0;n=[];for(a=0;4>a;++a)n.push(String.fromCharCode(this.data[this.pos++]));
n=n.join("");switch(n){case "IHDR":this.width=this.readUInt32();this.height=this.readUInt32();this.bits=this.data[this.pos++];this.colorType=this.data[this.pos++];this.compressionMethod=this.data[this.pos++];this.filterMethod=this.data[this.pos++];this.interlaceMethod=this.data[this.pos++];break;case "acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||Infinity,frames:[]};break;case "PLTE":this.palette=this.read(c);break;case "fcTL":d&&this.animation.frames.push(d);this.pos+=
4;d={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()};n=this.readUInt16();c=this.readUInt16()||100;d.delay=1E3*n/c;d.disposeOp=this.data[this.pos++];d.blendOp=this.data[this.pos++];d.data=[];break;case "IDAT":case "fdAT":"fdAT"===n&&(this.pos+=4,c-=4);n=(null!=d?d.data:void 0)||this.imgData;for(a=0;0<=c?a<c:a>c;0<=c?++a:--a)n.push(this.data[this.pos++]);break;case "tRNS":this.transparency={};switch(this.colorType){case 3:this.transparency.indexed=
this.read(c);c=255-this.transparency.indexed.length;if(0<c)for(n=0;0<=c?n<c:n>c;0<=c?++n:--n)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(c)[0];break;case 2:this.transparency.rgb=this.read(c)}break;case "tEXt":a=this.read(c);c=a.indexOf(0);n=String.fromCharCode.apply(String,a.slice(0,c));this.text[n]=String.fromCharCode.apply(String,a.slice(c+1));break;case "IEND":d&&this.animation.frames.push(d);a:{switch(this.colorType){case 0:case 3:case 4:d=1;break a;
case 2:case 6:d=3;break a}d=void 0}this.colors=d;this.hasAlphaChannel=4===(q=this.colorType)||6===q;q=this.colors+(this.hasAlphaChannel?1:0);this.pixelBitlength=this.bits*q;a:{switch(this.colors){case 1:q="DeviceGray";break a;case 3:q="DeviceRGB";break a}q=void 0}this.colorSpace=q;this.imgData=new Uint8Array(this.imgData);return;default:this.pos+=c}this.pos+=4;if(this.pos>this.data.length)throw Error("Incomplete or corrupt PNG file");}}e.load=function(n,q,d){"function"===typeof q&&(d=q);var c=new XMLHttpRequest;
c.open("GET",n,!0);c.responseType="arraybuffer";c.onload=function(){var a=new Uint8Array(c.response||c.mozResponseArrayBuffer);a=new e(a);"function"===typeof(null!=q?q.getContext:void 0)&&a.render(q);return"function"===typeof d?d(a):void 0};return c.send(null)};e.prototype.read=function(n){var q;var d=[];for(q=0;0<=n?q<n:q>n;0<=n?++q:--q)d.push(this.data[this.pos++]);return d};e.prototype.readUInt32=function(){var n=this.data[this.pos++]<<24;var q=this.data[this.pos++]<<16;var d=this.data[this.pos++]<<
8;var c=this.data[this.pos++];return n|q|d|c};e.prototype.readUInt16=function(){var n=this.data[this.pos++]<<8;var q=this.data[this.pos++];return n|q};e.prototype.decodePixels=function(n){var q,d,c,a,b,h,g,k;null==n&&(n=this.imgData);if(0===n.length)return new Uint8Array(0);n=new H(n);n=n.getBytes();var f=this.pixelBitlength/8;var l=f*this.width;var p=new Uint8Array(l*this.height);var r=n.length;for(d=a=b=0;a<r;){switch(n[a++]){case 0:for(c=q=0;q<l;c=q+=1)p[d++]=n[a++];break;case 1:for(c=h=0;h<l;c=
h+=1){q=n[a++];var w=c<f?0:p[d-f];p[d++]=(q+w)%256}break;case 2:for(c=w=0;w<l;c=w+=1){q=n[a++];var u=(c-c%f)/f;h=b&&p[(b-1)*l+u*f+c%f];p[d++]=(h+q)%256}break;case 3:for(c=k=0;k<l;c=k+=1)q=n[a++],u=(c-c%f)/f,w=c<f?0:p[d-f],h=b&&p[(b-1)*l+u*f+c%f],p[d++]=(q+Math.floor((w+h)/2))%256;break;case 4:for(c=k=0;k<l;c=k+=1){q=n[a++];u=(c-c%f)/f;w=c<f?0:p[d-f];0===b?h=g=0:(h=p[(b-1)*l+u*f+c%f],g=u&&p[(b-1)*l+(u-1)*f+c%f]);var B=w+h-g;c=Math.abs(B-w);u=Math.abs(B-h);B=Math.abs(B-g);w=c<=u&&c<=B?w:u<=B?h:g;p[d++]=
(q+w)%256}break;default:throw Error("Invalid filter algorithm: "+n[a-1]);}b++}return p};e.prototype.decodePalette=function(){var n,q,d,c,a;var b=this.palette;var h=this.transparency.indexed||[];var g=new Uint8Array((h.length||0)+b.length);var k=d=n=q=0;for(c=b.length;d<c;k=d+=3)g[q++]=b[k],g[q++]=b[k+1],g[q++]=b[k+2],g[q++]=null!=(a=h[n++])?a:255;return g};e.prototype.copyToImageData=function(n,q){var d,c;var a=this.colors;var b=null;var h=this.hasAlphaChannel;this.palette.length&&(b=null!=(d=this._decodedPalette)?
d:this._decodedPalette=this.decodePalette(),a=4,h=!0);n=n.data||n;var g=n.length;var k=b||q;d=c=0;if(1===a)for(;d<g;)a=b?4*q[d/4]:c,c=k[a++],n[d++]=c,n[d++]=c,n[d++]=c,n[d++]=h?k[a++]:this.transparency.grayscale&&this.transparency.grayscale===c?0:255,c=a;else for(;d<g;)a=b?4*q[d/4]:c,n[d++]=k[a++],n[d++]=k[a++],n[d++]=k[a++],n[d++]=h?k[a++]:this.transparency.rgb&&this.transparency.rgb[1]===k[a-3]&&this.transparency.rgb[3]===k[a-2]&&this.transparency.rgb[5]===k[a-1]?0:255,c=a};e.prototype.decode=function(){var n=
new Uint8Array(this.width*this.height*4);this.copyToImageData(n,this.decodePixels());return n};var m=function(n){(void 0).clearRect(0,0,n.width,n.height);(void 0).putImageData(n,0,0);n=new Image;n.src=(void 0).toDataURL();return n};e.prototype.decodeFrames=function(n){var q,d;if(this.animation){var c=this.animation.frames;var a=[];var b=q=0;for(d=c.length;q<d;b=++q){b=c[b];var h=n.createImageData(b.width,b.height);var g=this.decodePixels(new Uint8Array(b.data));this.copyToImageData(h,g);b.imageData=
h;a.push(b.image=m(h))}return a}};e.prototype.renderFrame=function(n,q){var d=this.animation.frames;var c=d[q];d=d[q-1];0===q&&n.clearRect(0,0,this.width,this.height);1===(null!=d?d.disposeOp:void 0)?n.clearRect(d.xOffset,d.yOffset,d.width,d.height):2===(null!=d?d.disposeOp:void 0)&&n.putImageData(d.imageData,d.xOffset,d.yOffset);0===c.blendOp&&n.clearRect(c.xOffset,c.yOffset,c.width,c.height);return n.drawImage(c.image,c.xOffset,c.yOffset)};e.prototype.animate=function(n){var q,d=this;var c=0;var a=
this.animation;var b=a.numFrames;var h=a.frames;var g=a.numPlays;return(q=function(){var k=c++%b;var f=h[k];d.renderFrame(n,k);if(1<b&&c/b<g)return d.animation._timeout=setTimeout(q,f.delay)})()};e.prototype.stopAnimation=function(){var n;return clearTimeout(null!=(n=this.animation)?n._timeout:void 0)};e.prototype.render=function(n){n._png&&n._png.stopAnimation();n._png=this;n.width=this.width;n.height=this.height;n=n.getContext("2d");if(this.animation)return this.decodeFrames(n),this.animate(n);
var q=n.createImageData(this.width,this.height);this.copyToImageData(q,this.decodePixels());return n.putImageData(q,0,0)};return e}()})},"esri/layers/rasterFormats/Raw":function(){define([],function(){return{decodeBIP:function(H,e){var m=e.pixelType,n=e.bandCount,q=[],d=e.width*e.height,c=this.getBandCount(H,e);n=n||c;var a=H.byteLength-H.byteLength%(d*this._getPixelLength(m)),b=new m(H,0,d*c),h,g,k;for(h=0;h<n;h++){var f=new m(d);for(g=0;g<d;g++)f[g]=b[g*c+h];q.push(f)}a<H.byteLength-1&&(k=this._decodeMask(H.slice(a),
e));return{pixels:q,maskData:k}},decodeBSQ:function(H,e){var m=e.pixelType,n=e.bandCount;if(void 0===n||null===n)n=this.getBandCount(H,e);var q=[],d=e.width*e.height,c=d*n,a=H.byteLength-H.byteLength%(d*this._getPixelLength(m));m=new m(H,0,c);var b;for(c=0;c<n;c++)q.push(m.subarray(c*d,(c+1)*d));a<H.byteLength-1&&(b=this._decodeMask(H.slice(a),e));return{pixels:q,maskData:b}},getBandCount:function(H,e){return Math.floor(H.byteLength/(e.width*e.height*this._getPixelLength(e.pixelType)))},_getPixelLength:function(H){var e=
1;switch(H){case Uint8Array:case Int8Array:case Uint8ClampedArray:e=1;break;case Uint16Array:case Int16Array:e=2;break;case Uint32Array:case Int32Array:case Float32Array:e=4;break;case Float64Array:e=8}return e},_decodeMask:function(H,e){var m=e.width*e.height;if(8*H.byteLength<m)return null;H=new Uint8Array(H,0,Math.ceil(m/8));e=new Uint8Array(e.width*e.height);var n=0,q=0,d=0,c=0;for(d=0;d<H.length-1;d++)for(q=H[d],c=7;0<=c;c--)e[n++]=q>>c&1;for(c=7;n<m-1;)q=H[H.length-1],e[n++]=q>>c&1,c--;return e}}})},
"esri/layers/rasterFormats/TiffDecoder":function(){define(["./Jpg","./Zlib"],function(H,e){var m=function(){var c=new ArrayBuffer(4),a=new Uint8Array(c);c=new Uint32Array(c);a[0]=1;a[1]=2;a[2]=3;a[3]=4;return 67305985===c[0]},n=function(){var c=[];c[254]="NEWSUBFILETYPE";c[255]="SUBFILETYPE";c[256]="IMAGEWIDTH";c[257]="IMAGELENGTH";c[258]="BITSPERSAMPLE";c[259]="COMPRESSION";c[262]="PHOTOMETRICINTERPRETATION";c[263]="THRESHHOLDING";c[264]="CELLWIDTH";c[265]="CELLLENGTH";c[266]="FILLORDER";c[269]=
"DOCUMENTNAME";c[270]="IMAGEDESCRIPTION";c[271]="MAKE";c[272]="MODEL";c[273]="STRIPOFFSETS";c[274]="ORIENTATION";c[277]="SAMPLESPERPIXEL";c[278]="ROWSPERSTRIP";c[279]="STRIPBYTECOUNTS";c[280]="MINSAMPLEVALUE";c[281]="MAXSAMPLEVALUE";c[282]="XRESOLUTION";c[283]="YRESOLUTION";c[284]="PLANARCONFIGURATION";c[285]="PAGENAME";c[286]="XPOSITION";c[287]="YPOSITION";c[288]="FREEOFFSETS";c[289]="FREEBYTECOUNTS";c[290]="GRAYRESPONSEUNIT";c[291]="GRAYRESPONSECURVE";c[292]="T4OPTIONS";c[293]="T6OPTIONS";c[296]=
"RESOLUTIONUNIT";c[297]="PAGENUMBER";c[300]="COLORRESPONSEUNIT";c[301]="TRANSFERFUNCTION";c[305]="SOFTWARE";c[306]="DATETIME";c[315]="ARTIST";c[316]="HOSTCOMPUTER";c[317]="PREDICTOR";c[318]="WHITEPOINT";c[319]="PRIMARYCHROMATICITIES";c[320]="COLORMAP";c[321]="HALFTONEHINTS";c[322]="TILEWIDTH";c[323]="TILELENGTH";c[324]="TILEOFFSETS";c[325]="TILEBYTECOUNTS";c[326]="BADFAXLINES";c[327]="CLEANFAXDATA";c[328]="CONSECUTIVEBADFAXLINES";c[330]="SUBIFD";c[332]="INKSET";c[333]="INKNAMES";c[334]="NUMBEROFINKS";
c[336]="DOTRANGE";c[337]="TARGETPRINTER";c[338]="EXTRASAMPLES";c[339]="SAMPLEFORMAT";c[340]="SMINSAMPLEVALUE";c[341]="SMAXSAMPLEVALUE";c[342]="TRANSFERRANGE";c[347]="JPEGTABLES";c[512]="JPEGPROC";c[513]="JPEGIFOFFSET";c[514]="JPEGIFBYTECOUNT";c[515]="JPEGRESTARTINTERVAL";c[517]="JPEGLOSSLESSPREDICTORS";c[518]="JPEGPOINTTRANSFORM";c[519]="JPEGQTABLES";c[520]="JPEGDCTABLES";c[521]="JPEGACTABLES";c[529]="YCBCRCOEFFICIENTS";c[530]="YCBCRSUBSAMPLING";c[531]="YCBCRPOSITIONING";c[532]="REFERENCEBLACKWHITE";
c[33550]="GEOPIXELSCALE";c[33922]="GEOTIEPOINTS";c[33432]="COPYRIGHT";c[42112]="GDAL_METADATA";c[42113]="GDAL_NODATA";c[50844]="RPCCOEFFICIENT";c[34735]="GEOKEYDIRECTORY";c[34736]="GEODOUBLEPARAMS";c[34737]="GEOASCIIPARAMS";return c}(),q=[0,1,1,2,4,8,1,1,2,4,8,4,8],d=function(c,a){var b="UNKNOWN";3===c?b="F32":1===c?8>=a?b="U8":16>=a?b="U16":32>=a&&(b="U32"):2===c&&(8>=a?b="S8":16>=a?b="S16":32>=a&&(b="S32"));return b};return{decode:function(c){var a=new DataView(c,0,8),b=a.getUint16(0,!1);if(18761===
b)var h=!0;else if(19789===b)h=!1;else throw"unexpected endianess byte";if(42!==a.getUint16(2,h))throw"unexpected tiff identifier";var g=a.getUint32(4,h);var k=h;var f,l;var p=g;for(var r=[];p;){var w=(new DataView(c,p,2)).getUint16(0,k);var u=p+2;p=(new DataView(c,u+12*w,4)).getUint32(0,k);var B={};for(f=0;f<w;f++){var x=new DataView(c,u,12);var E=x.getUint16(0,k);var y=x.getUint16(2,k);var D=x.getUint32(4,k);var G=x.getUint32(8,k);u+=12;if(!(7===y||12<y)){var A=l={fieldTag:E,fieldType:y,fieldValueCount:D,
fieldValueOffset:G},t=void 0,v=void 0,C=c,J=k,L=[],S=l.fieldType,U=l.fieldValueCount,aa=l.fieldValueOffset,ea=aa,ba=q[S],oa=8*ba,da=U*ba,fa=U*q[S]*8;if(32>=fa)if(J||(aa>>>=32-fa),1===U)L=[aa];else for(t=0;t<U;t++)L.push(aa<<oa*t>>>32-oa);else for(ea=aa;ea<aa+da;ea+=ba){switch(S){case 1:v=(new DataView(C,ea,1)).getUint8(0);break;case 2:v=(new DataView(C,ea,1)).getUint8(0);break;case 3:v=(new DataView(C,ea,2)).getUint16(0,J);break;case 4:v=(new DataView(C,ea,4)).getUint32(0,J);break;case 5:v=(new DataView(C,
ea,4)).getUint32(0,J)/(new DataView(C,ea+4,4)).getUint32(0,J);break;case 6:v=(new DataView(C,ea,1)).getInt8(0);break;case 8:v=(new DataView(C,ea,2)).getInt16(0,J);break;case 9:v=(new DataView(C,ea,4)).getInt32(0,J);break;case 10:v=(new DataView(C,ea,4)).getInt32(0,J)/(new DataView(C,ea+4,4)).getInt32(0,J);break;case 11:v=(new DataView(C,ea,4)).getFloat32(0,J);break;case 12:v=(new DataView(C,ea,8)).getFloat64(0,J);break;case 7:v=null;break;default:v=null}L.push(v)}if(2===S){var R="",W=L;L=[];for(t=
0;t<W.length;t++)0===W[t]&&""!==R?(L.push(R),R=""):R+=String.fromCharCode(W[t]);""===R&&0!==L.length||L.push(R)}A.fieldValues=L;var la=B,K=n[E];void 0===K&&(K="unknown"+E);la[K]={type:y,values:l.fieldValues}}}r.push(B)}if(0===r.length)throw"no valid image file directory";var O,F=r[0],M=void 0===F.GDAL_NODATA||null===F.GDAL_NODATA?null:parseFloat(F.GDAL_NODATA.values[0]);if(F.TILEOFFSETS){var N=m()===k,V=F.TILEOFFSETS?F.TILEOFFSETS.values:void 0;if(void 0===V)var Y=void 0;else{var ka=F.TILEBYTECOUNTS.values,
ja=F.TILEWIDTH.values[0],Q=F.TILELENGTH.values[0],ha=F.IMAGEWIDTH.values[0],qa=F.IMAGELENGTH.values[0],ia=ha*qa,pa=F.BITSPERSAMPLE.values[0],z=F.SAMPLESPERPIXEL.values[0],I=F.SAMPLEFORMAT?F.SAMPLEFORMAT.values[0]:1,T=d(I,pa);if(1!==(F.PLANARCONFIGURATION?F.PLANARCONFIGURATION.values[0]:1))throw console.log("can only handle PLANARCONFIGURATION\x3d1"),"can only handle PLANARCONFIGURATION\x3d1";var P=F.COMPRESSION?F.COMPRESSION.values[0]:1;if(1!==P&&6!==P&&8!==P&&32946!==P)throw console.log("this compression is not supported at this moment"),
"this compression is not supported at this moment";if(3<I)Y=void 0;else{if(3===I){var Z=new Float32Array(ia*z);var X=Float32Array}else 1===I?8>=pa?(Z=new Uint8Array(ia*z),X=Uint8Array):16>=pa?(Z=new Uint16Array(ia*z),X=Uint16Array):32>=pa&&(Z=new Uint32Array(ia*z),X=Uint32Array):2===I&&(8>=pa?(Z=new Int8Array(ia*z),X=Int8Array):16>=pa?(Z=new Int16Array(ia*z),X=Int16Array):32>=pa&&(Z=new Int32Array(ia*z),X=Int32Array));var ca,ma,na,sa,Ba,wa=Math.ceil(ha/ja);if(0===pa%8)for(ca=0;ca<V.length;ca++){var ta=
Math.floor(ca/wa)*Q;var ua=ca%wa*ja;var ra=(ta*ha+ua)*z;if("U8"===T||"S8"===T||N)if(8===P||32946===P){var va=new Uint8Array(c,V[ca],ka[ca]);var za=new e(va);var Oa=za.getBytes();var Ea=new ArrayBuffer(Oa.length);va=new Uint8Array(Ea);va.set(Oa);va.length!==ja*Q*z*pa/8&&console.log("tile byte counts is different than expected")}else if(6===P){va=new Uint8Array(c,V[ca],ka[ca]);var Aa=new H;Aa.parse(va);var Wa=Aa.getData(Aa.width,Aa.height);Ea=new ArrayBuffer(Wa.length);va=new Uint8Array(Ea);va.set(Wa)}else 1===
P&&(ka[ca]!==ja*Q*z*pa/8&&console.log("tile byte counts is different than expected"),Ea=c.slice(V[ca],V[ca]+ka[ca]));else{if(8===P||32946===P){va=new Uint8Array(c,V[ca],ka[ca]);za=new e(va);va=za.getBytes();Ea=new ArrayBuffer(va.length);var Pa=new Uint8Array(Ea);va.length!==ja*Q*z*pa/8&&console.log("tile byte counts is different than expected")}else 1===P&&(ka[ca]!==ja*Q*z*pa/8&&console.log("tile byte counts is different than expected"),Ea=new ArrayBuffer(ka[ca]),va=new Uint8Array(c,V[ca],ka[ca]),
Pa=new Uint8Array(Ea));switch(T){case "U16":case "S16":for(na=0;na<va.length;na+=2)Pa[na]=va[na+1],Pa[na+1]=va[na];break;case "U32":case "S32":case "F32":for(na=0;na<va.length;na+=4)Pa[na]=va[na+3],Pa[na+1]=va[na+2],Pa[na+2]=va[na+1],Pa[na+3]=va[na]}}var hb=new X(Ea);var ab=0;var bb=ra;var ib=Math.min(ja,ha-ua);var jb=Math.min(Q,qa-ta);for(sa=0;sa<jb;sa++)for(bb=ra+sa*ha*z,ab=sa*ja*z,Ba=0;Ba<ib*z;Ba++,bb++,ab++)Z[bb]=hb[ab]}var Xa={width:ha,height:qa,pixelType:T};if(1===z)Xa.pixels=[Z];else for(Xa.pixels=
[],ca=0;ca<z;ca++){var db=new X(ia);for(ma=0;ma<ia;ma++)db[ma]=Z[ma*z+ca];Xa.pixels.push(db)}Y=Xa}}}else if(F.STRIPOFFSETS){var kb=m()===k,Ja=F.STRIPOFFSETS?F.STRIPOFFSETS.values:void 0;if(void 0===Ja)Y=void 0;else{var Ka=F.STRIPBYTECOUNTS.values,Ra=F.ROWSPERSTRIP.values,La=F.IMAGEWIDTH.values[0],Sa=F.IMAGELENGTH.values[0],Ma=La*Sa,Fa=F.BITSPERSAMPLE.values[0],Da=F.SAMPLESPERPIXEL.values[0],Ta=F.SAMPLEFORMAT?F.SAMPLEFORMAT.values[0]:1,Ya=d(Ta,Fa);if(1!==(F.PLANARCONFIGURATION?F.PLANARCONFIGURATION.values[0]:
1))throw console.log("can only handle PLANARCONFIGURATION\x3d1"),"can only handle PLANARCONFIGURATION\x3d1";var Ga=F.COMPRESSION?F.COMPRESSION.values[0]:1;if(1!==Ga&&6!==Ga&&8!==Ga&&32946!==Ga)throw console.log("compressed tiff is not supported at this moment"),"compressed tiff is not supported at this moment";if(3<Ta)Y=void 0;else{if(3===Ta){var Ha=new Float32Array(Ma*Da);var Na=Float32Array}else 1===Ta?8>=Fa?(Ha=new Uint8Array(Ma*Da),Na=Uint8Array):16>=Fa?(Ha=new Uint16Array(Ma*Da),Na=Uint16Array):
32>=Fa&&(Ha=new Uint32Array(Ma*Da),Na=Uint32Array):2===Ta&&(8>=Fa?(Ha=new Int8Array(Ma*Da),Na=Int8Array):16>=Fa?(Ha=new Int16Array(Ma*Da),Na=Int16Array):32>=Fa&&(Ha=new Int32Array(La*Sa*Da),Na=Int32Array));var xa,Ua,Ca,Va=Ra;if(0===Fa%8)for(xa=0;xa<Ja.length;xa++){var lb=xa*Ra*La*Da;Va=(xa+1)*Ra>Sa?Sa-xa*Ra:Ra;if("U8"===Ya||"S8"===Ya||kb)if(8===Ga||32946===Ga){var ya=new Uint8Array(c,Ja[xa],Ka[xa]);var cb=new e(ya);var eb=cb.getBytes();var Ia=new ArrayBuffer(eb.length);ya=new Uint8Array(Ia);ya.set(eb);
ya.length!==Va*La*Da*Fa/8&&console.log("strip byte counts is different than expected")}else if(6===Ga){ya=new Uint8Array(c,Ja[xa],Ka[xa]);var Za=new H;Za.parse(ya);var fb=Za.getData(Za.width,Za.height);Ia=new ArrayBuffer(fb.length);ya=new Uint8Array(Ia);ya.set(fb)}else 1===Ga&&(Ka[xa]!==Va*La*Da*Fa/8&&console.log("strip byte counts is different than expected"),Ia=c.slice(Ja[xa],Ja[xa]+Ka[xa]));else{if(6===Ga||8===Ga||32946===Ga){ya=new Uint8Array(c,Ja[xa],Ka[xa]);cb=new e(ya);ya=cb.getBytes();Ia=
new ArrayBuffer(ya.length);var Qa=new Uint8Array(Ia);ya.length!==Va*La*Da*Fa/8&&console.log("strip byte counts is different than expected")}else 1===Ga&&(Ka[xa]!==Va*La*Da*Fa/8&&console.log("strip byte counts is different than expected"),Ia=new ArrayBuffer(Ka[xa]),ya=new Uint8Array(c,Ja[xa],Ka[xa]),Qa=new Uint8Array(Ia));switch(Ya){case "U16":case "S16":for(Ca=0;Ca<ya.length;Ca+=2)Qa[Ca]=ya[Ca+1],Qa[Ca+1]=ya[Ca];break;case "U32":case "S32":case "F32":for(Ca=0;Ca<ya.length;Ca+=4)Qa[Ca]=ya[Ca+3],Qa[Ca+
1]=ya[Ca+2],Qa[Ca+2]=ya[Ca+1],Qa[Ca+3]=ya[Ca]}}var mb=new Na(Ia);Ha.set(mb,lb)}var $a={width:La,height:Sa,pixelType:Ya};if(1===Da)$a.pixels=[Ha];else for($a.pixels=[],xa=0;xa<Da;xa++){var gb=new Na(Ma);for(Ua=0;Ua<Ma;Ua++)gb[Ua]=Ha[Ua*Da+xa];$a.pixels.push(gb)}Y=$a}}}if(null!==M){Y.maskData=new Uint8Array(Y.width*Y.height);if(1E24<Math.abs(M))for(O=0;O<Y.width*Y.height;O++)Y.maskData[O]=1E-6>Math.abs((Y.pixels[0][O]-M)/M)?0:1;else for(O=0;O<Y.width*Y.height;O++)Y.maskData[O]=Y.pixels[0][O]===M?0:
1;Y.noDataValue=M}return Y}}})},"esri/layers/rasterLib/tile/RasterHandler":function(){define("require exports module dojo/Deferred dojo/promise/all ../../PixelBlock ../../vectorTiles/core/workers ../../vectorTiles/core/promiseUtils ../../vectorTiles/core/requireUtils ../../vectorTiles/request ../../rasterLib/function/rasterFunctionHelper ../../rasterLib/renderer/rasterRendererHelper".split(" "),function(H,e,m,n,q,d,c,a,b,h,g,k){function f(l){var p=new n;q(l).then(function(r){p.resolve()});return p.promise}
return function(){function l(p){this.customModules=p&&p.customModules}l.prototype.destroy=function(){this.stop();this.customModules=this.rasterLayer=null};l.prototype.start=function(){this.stop();var p=new n,r=0,w=this.customModules?this.customModules.length+1:1,u=b.getAbsMid("esri/layers/rasterLib/tile/RasterWorker",H,m),B=c.open(u,{client:this}).then(function(x){this._connection=x;r++;r===w&&(this._connected=!0,p.resolve())}.bind(this));this._openDL=[B];this.customModules&&this.customModules.forEach(function(x){B=
c.open(x,{client:this}).then(function(E){r++;r===w&&(this._connected=!0,p.resolve())});this._openDL.push(B);console.log(x)}.bind(this));return this._connectionPromise=p.promise};l.prototype.stop=function(){this._openDL?this._openDL.forEach(function(p){p.isFulfilled()||p.cancel()}.bind(this)):this._connectionPromise&&!this._connectionPromise.isFulfilled()&&this._connectionPromise.cancel();this._connection&&(this._connection.close(),this._connection=null)};l.prototype.decode=function(p){if(!this._connectionPromise.isFulfilled()||
!this._connection)return a.reject(Error("no connection"));var r={id:null};return this._connection.invoke("decode",p,[],r).then(function(w){w.targetWorker=r;return w})};l.prototype.process=function(p){if(!this._connectionPromise.isFulfilled()||!this._connection)return a.reject(Error("no connection"));var r={id:null};p.layerId=this.rasterLayer.layerId;var w=new n;this._connection.invoke("process",p,[],r).then(function(u){u.targetWorker=r;u.src?Object.keys(u.src).forEach(function(B){u.src[B].pixelBlock=
new d(u.src[B].pixelBlock)}):u.src=null;u.pixelBlock&&(u.pixelBlock=new d(u.pixelBlock));w.resolve(u)});return w.promise};l.prototype.render=function(p){if(!this._connectionPromise.isFulfilled()||!this._connection)return a.reject(Error("no connection"));var r={id:null};p.layerId=this.rasterLayer.layerId;return this._connection.invoke("render",p,[],r).then(function(w){w.targetWorker=r;w.pixelBlock=w.pixelBlock?new d(w.pixelBlock):null;return w})};l.prototype.setLayer=function(p){if(!this._connectionPromise.isFulfilled()||
!this._connection)return a.reject(Error("no connection"));this.rasterLayer=p;p=this._connection.broadcast("setLayer",p,[],{id:null});return f(p)};l.prototype.setRasterFunction=function(p){if(!this._connectionPromise.isFulfilled()||!this._connection)return a.reject(Error("no connection"));p=this._connection.broadcast("setRasterFunction",p,[],{id:null});return f(p)};l.prototype.setRasterRenderer=function(p){if(!this._connectionPromise.isFulfilled()||!this._connection)return a.reject(Error("no connection"));
p=this._connection.broadcast("setRasterRenderer",p,[],{id:null});return f(p)};return l}()})},"esri/layers/vectorTiles/core/workers":function(){define(["require","exports","./workers/workers"],function(H,e,m){Object.defineProperty(e,"__esModule",{value:!0});for(var n in m)e.hasOwnProperty(n)||(e[n]=m[n])})},"esri/layers/vectorTiles/core/workers/workers":function(){define("require exports dojo/sniff dojo/promise/all ../Logger ../promiseUtils ./Connection ./RemoteClient ./WorkerOwner".split(" "),function(H,
e,m,n,q,d,c,a,b){function h(){if(r)return r;for(var w=g+k,u=[],B=function(E){var y=b.create(E).then(function(D){return p[E]=D});u.push(y)},x=0;x<w;x++)B(x);return r=n(u).then(function(){})}Object.defineProperty(e,"__esModule",{value:!0});e.Connection=c;e.RemoteClient=a;(c=navigator.hardwareConcurrency)||(c=m("safari")&&m("mac")||m("trident")?8:2);var g=m("esri-workers-debug")?1:Math.max(1,Math.ceil(c/2)),k=m("esri-workers-debug")?1:Math.max(1,Math.floor(c/2)),f=q.getLogger("esri.core.workers"),l=
0,p=[];e.initialize=function(){h()};e.open=function(w,u,B){void 0===u&&(u={});if(Array.isArray(w))return new e.Connection(w.map(function(y){return new e.RemoteClient(y,u.client)}));if("string"!==typeof w){f.warn("workers-open:signature-deprecated","DEPRECATED: workers.open() changed signature.");var x=w;w=u;u={client:x,strategy:B?"dedicated":"distributed"}}var E=u.strategy||"distributed";return"local"===E?d.create(function(y){H([w],function(D){y(e.RemoteClient.connect(D))})}).then(function(y){return new e.Connection([new e.RemoteClient(y,
u.client)])}):h().then(function(){if("dedicated"===E){var y=g+l++;l%=k;return p[y].open(w).then(function(D){return new e.Connection([new e.RemoteClient(D,u.client)])})}return d.all(p.map(function(D){return D.open(w)})).then(function(D){return new e.Connection(D.map(function(G){return new e.RemoteClient(G,u.client)}))})})};e.terminate=function(){for(var w=0;w<p.length;w++)p[w]&&p[w].terminate();p.length=0};var r})},"esri/layers/vectorTiles/core/Logger":function(){define(["require","exports","dojo/has"],
function(H,e,m){var n={info:0,warn:1,error:2};H=function(){function q(d){void 0===d&&(d={});this.module=d.module||"";this.writer=d.writer||null;this.level=d.level||null;null!=d.enabled&&(this.enabled=!!d.enabled);q._loggers[this.module]=this;d=this.module.lastIndexOf(".");-1!==d&&(this.parent=q.getLogger(this.module.slice(0,d)))}q.prototype.log=function(d){for(var c=[],a=1;a<arguments.length;a++)c[a-1]=arguments[a];this._isEnabled()&&this._matchLevel(d)&&(a=this._inheritedWriter())&&a.apply(void 0,
[d,this.module].concat(c))};q.prototype.error=function(){for(var d=[],c=0;c<arguments.length;c++)d[c]=arguments[c];this.log.apply(this,["error"].concat(d))};q.prototype.warn=function(){for(var d=[],c=0;c<arguments.length;c++)d[c]=arguments[c];this.log.apply(this,["warn"].concat(d))};q.prototype.info=function(){for(var d=[],c=0;c<arguments.length;c++)d[c]=arguments[c];this.log.apply(this,["info"].concat(d))};q.prototype.getLogger=function(d){return q.getLogger(this.module+"."+d)};q.getLogger=function(d){var c=
q._loggers[d];c||(c=new q({module:d}));return c};q.prototype._parentWithMember=function(d,c){for(var a=this;a&&null==a[d];)a=a.parent;return a?a[d]:c};q.prototype._inheritedWriter=function(){return this._parentWithMember("writer",this._consoleWriter)};q.prototype._consoleWriter=function(d,c){for(var a=[],b=2;b<arguments.length;b++)a[b-2]=arguments[b];console[d].apply(console,["["+c+"]"].concat(a))};q.prototype._matchLevel=function(d){return n[this._parentWithMember("level","error")]<=n[d]};q.prototype._isEnabled=
function(){return this._parentWithMember("enabled",!0)};q._loggers={};return q}();e=H.getLogger("esri");m("dojo-debug-messages")?e.level="info":e.level="warn";return H})},"esri/layers/vectorTiles/core/promiseUtils":function(){define("require exports dojo/Deferred dojo/when dojo/promise/all ./Error".split(" "),function(H,e,m,n,q,d){function c(a){if(a){if("function"!==typeof a.forEach){var b=Object.keys(a),h=b.map(function(l){return a[l]});return c(h).then(function(l){var p={};b.forEach(function(r,
w){return p[r]=l[w]});return p})}var g=new m,k=[],f=a.length;0===f&&g.resolve(k);a.forEach(function(l){var p={promise:l};k.push(p);l.then(function(r){p.value=r}).catch(function(r){p.error=r}).then(function(){--f;0===f&&g.resolve(k)})});return g.promise}}Object.defineProperty(e,"__esModule",{value:!0});e.all=function(a){return q(a)};e.filter=function(a,b){var h=a.slice();return q(a.map(function(g,k){return b(g,k)})).then(function(g){return h.filter(function(k,f){return g[f]})})};e.eachAlways=c;e.create=
function(a,b){var h=new m(b);a(function(g){void 0===g&&(g=null);return n(g).then(h.resolve)},h.reject);return h.promise};e.reject=function(a){var b=new m;b.reject(a);return b.promise};e.resolve=function(a){void 0===a&&(a=null);var b=new m;b.resolve(a);return b.promise};e.after=function(a,b){void 0===b&&(b=null);var h=0,g=new m(function(){h&&(clearTimeout(h),h=0)});h=setTimeout(function(){g.resolve(b)},a);return g.promise};e.timeout=function(a,b,h){var g=0,k=new m(a.cancel);a.then(function(f){k.isFulfilled()||
(k.resolve(f),g&&(clearTimeout(g),g=0))});a.catch(function(f){k.isFulfilled()||(k.reject(f),g&&(clearTimeout(g),g=0))});g=setTimeout(function(){var f=h||new d("promiseUtils:timeout","The wrapped promise did not resolve within "+b+" ms");k.reject(f)},b);return k.promise};e.wrapCallback=function(a){var b=!1,h=new m(function(){return b=!0});a(function(g){b||h.resolve(g)});return h.promise};e.isThenable=function(a){return a&&"function"===typeof a.then};e.when=function(a){return n(a)}})},"esri/layers/vectorTiles/core/Error":function(){define(["require",
"exports","./tsSupport/extendsHelper","./lang","./Message"],function(H,e,m,n,q){H=function(d){function c(a,b,h){var g=d.call(this,a,b,h)||this;return g instanceof c?g:new c(a,b,h)}m(c,d);c.prototype.toJSON=function(){return{name:this.name,message:this.message,details:n.clone(this.details),dojoType:this.dojoType}};c.fromJSON=function(a){var b=new c(a.name,a.message,a.details);null!=a.dojoType&&(b.dojoType=a.dojoType);return b};return c}(q);H.prototype.type="error";return H})},"esri/layers/vectorTiles/core/tsSupport/extendsHelper":function(){define([],
function(){return function(){var H=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,m){e.__proto__=m}||function(e,m){for(var n in m)m.hasOwnProperty(n)&&(e[n]=m[n])};return function(e,m){function n(){this.constructor=e}H(e,m);e.prototype=null===m?Object.create(m):(n.prototype=m.prototype,new n)}}()})},"esri/layers/vectorTiles/core/lang":function(){define("dojo/_base/kernel dojo/_base/lang dojo/date dojo/number dojo/date/locale dojo/i18n!../nls/common".split(" "),function(H,e,m,n,
q,d){function c(l){return void 0!==l&&null!==l}function a(l){return c(l)?l:""}function b(l,p,r){var w=r.match(/([^\(]+)(\([^\)]+\))?/i),u=e.trim(w[1]);r=p[l];w=JSON.parse((w[2]?e.trim(w[2]):"{}").replace(/^\(/,"{").replace(/\)$/,"}").replace(/([{,])\s*([0-9a-zA-Z_]+)\s*:/gi,'$1"$2":').replace(/"\s*:\s*'/gi,'":"').replace(/'\s*(,|\})/gi,'"$1'));var B=w.utcOffset;if(-1===k.indexOf(u))u=e.getObject(u),e.isFunction(u)&&(r=u(r,l,p,w));else if("number"===typeof r||"string"===typeof r&&r&&!isNaN(Number(r)))switch(r=
Number(r),u){case "NumberFormat":l=e.mixin({},w);p=parseFloat(l.places);if(isNaN(p)||0>p)l.places=Infinity;return n.format(r,l);case "DateString":r=new Date(r);if(w.local||w.systemLocale)return w.systemLocale?r.toLocaleDateString()+(w.hideTime?"":" "+r.toLocaleTimeString()):r.toDateString()+(w.hideTime?"":" "+r.toTimeString());r=r.toUTCString();w.hideTime&&(r=r.replace(/\s+\d\d:\d\d:\d\d\s+(utc|gmt)/i,""));return r;case "DateFormat":return r=new Date(r),c(B)&&(r=m.add(r,"minute",r.getTimezoneOffset()-
B)),q.format(r,w)}return a(r)}function h(l,p){var r;if(p)for(r in l)l.hasOwnProperty(r)&&(void 0===l[r]?delete l[r]:l[r]instanceof Object&&h(l[r],!0));else for(r in l)l.hasOwnProperty(r)&&void 0===l[r]&&delete l[r];return l}function g(l){if(!l||"object"!=typeof l||e.isFunction(l))return l;if(l instanceof Int8Array||l instanceof Uint8Array||l instanceof Uint8ClampedArray||l instanceof Int16Array||l instanceof Int32Array||l instanceof Uint16Array||l instanceof Uint32Array||l instanceof Float32Array||
l instanceof Float64Array||l instanceof Date)return new l.constructor(l);if(l instanceof ArrayBuffer)return l.slice(0,l.byteLength);if("function"===typeof l.clone)l=l.clone();else if("function"===typeof l.map&&"function"===typeof l.forEach)l=l.map(g);else if("function"===typeof l.notifyChange&&"function"===typeof l.watch)l=l.clone();else{var p={},r,w={};for(r in l){var u=l[r];var B=!(r in w)||w[r]!==u;if(!(r in p)||p[r]!==u&&B)p[r]=g?g(u):u}l=p}return l}var k=["NumberFormat","DateString","DateFormat"],
f=/<\/?[^>]+>/g;return{equals:function(l,p){return l===p||"number"===typeof l&&isNaN(l)&&"number"===typeof p&&isNaN(p)||e.isFunction((l||{}).getTime)&&e.isFunction((p||{}).getTime)&&l.getTime()==p.getTime()||e.isFunction((l||{}).equals)&&l.equals(p)||e.isFunction((p||{}).equals)&&p.equals(l)||!1},mixin:e.mixin,valueOf:function(l,p){for(var r in l)if(l[r]==p)return r;return null},stripTags:function(l){if(l){var p=typeof l;if("string"===p)l=l.replace(f,"");else if("object"===p)for(var r in l)(p=l[r])&&
"string"===typeof p&&(p=p.replace(f,"")),l[r]=p}return l},substitute:function(l,p,r){if(c(r))if(e.isObject(r)){var w=r.first;var u=r.dateFormat;var B=r.numberFormat}else w=r;if(p&&"{*}"!==p)return e.replace(p,e.hitch({obj:l},function(E,y){E=y.split(":");return 1<E.length?(y=E[0],E.shift(),b(y,this.obj,E.join(":"))):u&&-1!==(u.properties||[]).indexOf(y)?b(y,this.obj,u.formatter||"DateString"):B&&-1!==(B.properties||[]).indexOf(y)?b(y,this.obj,B.formatter||"NumberFormat"):a(this.obj[y])}));p=[];var x;
p.push('\x3ctable class\x3d"esri-widget__table" summary\x3d"'+d.fieldsSummary+'"\x3e\x3ctbody\x3e');for(x in l)if(r=l[x],u&&-1!==(u.properties||[]).indexOf(x)?r=b(x,l,u.formatter||"DateString"):B&&-1!==(B.properties||[]).indexOf(x)&&(r=b(x,l,B.formatter||"NumberFormat")),p.push("\x3ctr\x3e\x3cth\x3e"+x+"\x3c/th\x3e\x3ctd\x3e"+a(r)+"\x3c/td\x3e\x3c/tr\x3e"),w)break;p.push("\x3c/tbody\x3e\x3c/table\x3e");return p.join("")},filter:function(l,p,r){p=[e.isString(l)?l.split(""):l,r||H.global,e.isString(p)?
new Function("item","index","array",p):p];r={};var w;l=p[0];for(w in l)p[2].call(p[w],l[w],w,l)&&(r[w]=l[w]);return r},startsWith:function(l,p,r){r=r||0;return l.indexOf(p,r)===r},endsWith:function(l,p,r){if("number"!==typeof r||!isFinite(r)||Math.floor(r)!==r||r>l.length)r=l.length;r-=p.length;l=l.indexOf(p,r);return-1!==l&&l===r},isDefined:c,fixJson:h,clone:g}})},"esri/layers/vectorTiles/core/Message":function(){define(["require","exports","dojo/string"],function(H,e,m){return function(){function n(q,
d,c){this instanceof n&&(this.name=q,this.message=d&&m.substitute(d,c,function(a){return null==a?"":a})||"",this.details=c)}n.prototype.toString=function(){return"["+this.name+"]: "+this.message};return n}()})},"esri/layers/vectorTiles/core/workers/Connection":function(){define(["require","exports","../promiseUtils"],function(H,e,m){return function(){function n(q){this._clientIdx=0;this._clients=q}n.prototype.broadcast=function(q,d,c){for(var a=[],b=0,h=this._clients;b<h.length;b++)a.push(h[b].invoke(q,
d,c));return a};n.prototype.close=function(){for(var q=0,d=this._clients;q<d.length;q++)d[q].close();this._clients=[]};n.prototype.invoke=function(q,d,c,a){var b=a&&a.client;if(!this._clients||!this._clients.length)return m.reject(Error("Connection closed"));null!=b&&-1!==this._clients.indexOf(b)||this._clients.some(function(h){return h.isBusy()?!1:(b=h,!0)})||(this._clientIdx=(this._clientIdx+1)%this._clients.length,b=this._clients[this._clientIdx]);q=b.invoke(q,d,c);a&&(a.client=b);return q};n.prototype.openPorts=
function(){return m.all(this._clients.map(function(q){return q.openPort()}))};return n}()})},"esri/layers/vectorTiles/core/workers/RemoteClient":function(){define("require exports dojo/Deferred ../Error ../promiseUtils ./utils".split(" "),function(H,e,m,n,q,d){function c(l,p){l["delete"](p)}var a=d.MessageType.CLOSE,b=d.MessageType.CANCEL,h=d.MessageType.INVOKE,g=d.MessageType.RESPONSE,k=d.MessageType.OPEN_PORT,f=function(){function l(p){this._timer=null;this._cancelledJobIds=new Set;this._invokeMessages=
[];this._invoke=p;this._timer=null;this._process=this._process.bind(this)}l.prototype.push=function(p){p.type===d.MessageType.CANCEL?this._cancelledJobIds.add(p.jobId):(this._invokeMessages.push(p),null===this._timer&&(this._timer=setTimeout(this._process,0)))};l.prototype.clear=function(){this._invokeMessages.length=0;this._cancelledJobIds.clear();this._timer=null};l.prototype._process=function(){this._timer=null;for(var p=0,r=this._invokeMessages;p<r.length;p++){var w=r[p];this._cancelledJobIds.has(w.jobId)||
this._invoke(w)}this._cancelledJobIds.clear();this._invokeMessages.length=0};return l}();return function(){function l(p,r,w){this._outJobs=new Map;this._inJobs=new Map;this._queue=new f(this._onInvoke.bind(this));this._onMessage=this._onMessage.bind(this);this._client=r;this._port=p;this._port.addEventListener("message",this._onMessage);this._port.start();this._channel=w}l.connect=function(p){var r=new MessageChannel;p="function"===typeof p?new p:"default"in p&&"function"===typeof p.default?new p.default:
p;p.remoteClient=new l(r.port1,p,r);return r.port2};l.prototype.close=function(){this._post({type:a});this._close()};l.prototype.isBusy=function(){return 0<this._outJobs.size};l.prototype.invoke=function(p,r,w){var u=this;if(!this._port)return q.reject(new n("remote-client:port-closed","Can't invoke(), port is closed"));var B=d.newJobId(),x=new m(function(){c(u._outJobs,B);u._post({type:b,jobId:B})});this._outJobs.set(B,x);this._post({type:h,jobId:B,methodName:p},r,w);return x.promise};l.prototype.openPort=
function(){var p=this,r=d.newJobId(),w=new m(function(){c(p._outJobs,r);p._post({type:b,jobId:r})});this._outJobs.set(r,w);this._post({type:k,jobId:r});return w.promise};l.prototype._close=function(){this._channel&&(this._channel=null);this._port.removeEventListener("message",this._onMessage);this._port.close();this._outJobs.forEach(function(p){p.cancel()});this._inJobs.clear();this._outJobs.clear();this._queue.clear();this._port=this._client=null};l.prototype._onMessage=function(p){if(p=d.receiveMessage(p))switch(p.type){case g:this._onResponse(p);
break;case h:this._queue.push(p);break;case b:this._onCancel(p);break;case a:this._close();break;case k:this._onOpenPort(p)}};l.prototype._onCancel=function(p){var r=this._inJobs,w=p.jobId,u=r.get(w);this._queue.push(p);u&&(c(r,w),u.cancel())};l.prototype._onInvoke=function(p){var r=this,w=p.methodName,u=p.jobId;p=p.data;var B=this._inJobs,x=this._client,E=x[w];try{if(!E&&w&&-1!==w.indexOf("."))for(var y=w.split("."),D=0;D<y.length-1;D++)x=x[y[D]],E=x[y[D+1]];if("function"!==typeof E)throw new TypeError(w+
" is not a function");var G=E.call(x,p,this)}catch(A){this._post({type:g,jobId:u,error:d.toInvokeError(A)});return}q.isThenable(G)?(B.set(u,G),G.then(function(A){B.has(u)&&(c(B,u),r._post({type:g,jobId:u},A))}).catch(function(A){B.has(u)&&(c(B,u),A&&"cancel"===A.dojoType||r._post({type:g,jobId:u,error:d.toInvokeError(A||{message:"Error encountered at method "+w})}))})):this._post({type:g,jobId:u},G)};l.prototype._onOpenPort=function(p){var r=new MessageChannel;new l(r.port1,this._client);this._post({type:g,
jobId:p.jobId},r.port2,[r.port2])};l.prototype._onResponse=function(p){var r=p.jobId,w=p.error;p=p.data;var u=this._outJobs;if(u.has(r)){var B=u.get(r);c(u,r);w?B.reject(n.fromJSON(JSON.parse(w))):B.resolve(p)}};l.prototype._post=function(p,r,w){return d.postMessage(this._port,p,r,w)};return l}()})},"esri/layers/vectorTiles/core/workers/utils":function(){define(["require","exports","dojo/has"],function(H,e,m){function n(d){return d&&"object"===typeof d&&("result"in d||"transferList"in d)}Object.defineProperty(e,
"__esModule",{value:!0});(function(d){d[d.HANDSHAKE=0]="HANDSHAKE";d[d.CONFIGURE=1]="CONFIGURE";d[d.CONFIGURED=2]="CONFIGURED";d[d.OPEN=3]="OPEN";d[d.OPENED=4]="OPENED";d[d.RESPONSE=5]="RESPONSE";d[d.INVOKE=6]="INVOKE";d[d.CANCEL=7]="CANCEL";d[d.CLOSE=8]="CLOSE";d[d.OPEN_PORT=9]="OPEN_PORT"})(e.MessageType||(e.MessageType={}));var q=0;e.newJobId=function(){return q++};e.isTranferableResult=n;e.toInvokeError=function(d){return d?d.toJSON?JSON.stringify(d):JSON.stringify({name:d.name,message:d.message,
details:d.details,stack:d.stack}):null};e.postMessage=function(d,c,a,b){2===arguments.length||void 0===a&&void 0===b?d.postMessage(c):(m("esri-workers-supports-transfer-arraybuffer")||(b?(b=b.filter(function(h){return!(h instanceof ArrayBuffer)}),b.length||(b=null)):n(a)&&a.transferList&&(a.transferList=a.transferList.filter(function(h){return!(h instanceof ArrayBuffer)}),a.transferList.length||(a.transferList=null))),b?(c.data=a,d.postMessage(c,b)):n(a)?(c.data=a.result,a.transferList?d.postMessage(c,
a.transferList):d.postMessage(c)):(c.data=a,d.postMessage(c)))};e.receiveMessage=function(d){return d?(d=d.data)?"string"===typeof d?JSON.parse(d):d:null:null}})},"esri/layers/vectorTiles/core/workers/WorkerOwner":function(){define("require exports dojo/Deferred ../../kernel ../Error ../Logger ../promiseUtils ./utils ./workerFactory".split(" "),function(H,e,m,n,q,d,c,a,b){var h=d.getLogger("esri.core.workers"),g=a.MessageType.CANCEL,k=a.MessageType.INVOKE,f=a.MessageType.OPEN,l=a.MessageType.OPENED,
p=a.MessageType.RESPONSE;return function(){function r(w,u){this._outJobs=new Map;this._inJobs=new Map;this.worker=w;this.id=u;w.addEventListener("message",this._onMessage.bind(this));w.addEventListener("error",function(B){B.preventDefault();h.error(B)})}r.create=function(w){return b.createWorker().then(function(u){return new r(u,w)})};r.prototype.terminate=function(){this.worker.terminate()};r.prototype.open=function(w){var u=this,B=a.newJobId(),x=new m(function(E){u._outJobs["delete"](B);u._post({type:g,
jobId:B})});this._outJobs.set(B,x);this._post({type:f,jobId:B,modulePath:w});return x.promise};r.prototype._onMessage=function(w){if(w=a.receiveMessage(w))switch(w.type){case l:case p:this._onResponse(w);break;case g:this._onCancel(w);break;case k:this._onInvoke(w)}};r.prototype._onCancel=function(w){(w=this._inJobs.get(w.jobId))&&w.cancel()};r.prototype._onInvoke=function(w){var u=this,B=w.methodName,x=w.jobId;w=w.data;var E=this._inJobs,y=n.workerMessages[B];try{if("function"!==typeof y)throw new TypeError(B+
" is not a function");var D=y.call(null,w)}catch(G){this._post({type:p,jobId:x,error:a.toInvokeError(G)});return}c.isThenable(D)?(E.set(x,D),D.then(function(G){E["delete"](x);u._post({type:p,jobId:x},G)}).catch(function(G){E["delete"](x);G||(G={message:"Error encountered at method"+B});G.dojoType&&"cancel"===G.dojoType||u._post({type:p,jobId:x,error:a.toInvokeError(G)})})):this._post({type:p,jobId:x},D)};r.prototype._onResponse=function(w){var u=w.jobId,B=w.error;w=w.data;var x=this._outJobs.get(u);
x&&(this._outJobs["delete"](u),B?x.reject(q.fromJSON(JSON.parse(B))):x.resolve(w))};r.prototype._post=function(w,u,B){return a.postMessage(this.worker,w,u,B)};return r}()})},"esri/layers/vectorTiles/core/workers/workerFactory":function(){define("require exports ../tsSupport/assignHelper dojo/_base/kernel ../../config ../../request ../Logger ../promiseUtils ../sniff ../urlUtils ./loaderConfig ./utils ./WorkerFallback".split(" "),function(H,e,m,n,q,d,c,a,b,h,g,k,f){function l(y){return a.create(function(D){function G(t){if(t=
k.receiveMessage(t))switch(t.type){case E:t=y;var v=q.workers.loaderUrl||g.DEFAULT_LOADER_URL;if(null!=q["default"]){var C=m({},q);delete C["default"];C=JSON.parse(JSON.stringify(C))}else C=JSON.parse(JSON.stringify(q));var J=q.workers.loaderConfig;J=g.default({baseUrl:J.baseUrl,locale:n.locale,has:m({"config-deferredInstrumentation":0,"dojo-test-sniff":0,"esri-cors":1,"esri-secure-context":b("esri-secure-context"),"esri-workers-supports-transfer-arraybuffer":b("esri-workers-supports-transfer-arraybuffer"),
"events-keypress-typed":0,"host-webworker":1},J.has),map:m({},J.map),paths:m({},J.paths),packages:J.packages||[]});t.postMessage({type:x,configure:{esriConfig:C,loaderUrl:v,loaderConfig:J}});break;case B:y.removeEventListener("message",G),y.removeEventListener("error",A),D(y)}}function A(t){t.preventDefault();y.removeEventListener("message",G);y.removeEventListener("error",A);w.warn("Failed to create Worker. Fallback to execute module in main thread",t);y=new f;y.addEventListener("message",G);y.addEventListener("error",
A)}y.addEventListener("message",G);y.addEventListener("error",A)})}Object.defineProperty(e,"__esModule",{value:!0});var p=h.normalize(H.toUrl("./worker.js")),r=!h.hasSameOrigin(p,location.href),w=c.getLogger("esri.core.workers"),u=null,B=k.MessageType.CONFIGURED,x=k.MessageType.CONFIGURE,E=k.MessageType.HANDSHAKE;e.createWorker=function(){if(!b("esri-workers"))return l(new f);if(!r){var y=void 0;try{y=new Worker(p)}catch(D){w.warn("Failed to create Worker. Fallback to execute module in main thread",
event),y=new f}return l(y)}u||(u=d(p,{responseType:"text"}));return u.then(function(D){return new Worker(URL.createObjectURL(new Blob([D.data],{type:"text/javascript"})))}).catch(function(D){w.warn("Failed to create Worker. Fallback to execute module in main thread",D);return new f}).then(function(D){return l(D)})}})},"esri/layers/vectorTiles/core/tsSupport/assignHelper":function(){define([],function(){return Object.assign||function(H){for(var e,m=1,n=arguments.length;m<n;m++){e=arguments[m];for(var q in e)Object.prototype.hasOwnProperty.call(e,
q)&&(H[q]=e[q])}return H}})},"esri/layers/vectorTiles/config":function(){define(["require","exports","esri/config"],function(H,e,m){Object.defineProperty(m,"workers",{get:function(){return m.defaults.workers},set:function(n){return m.defaults.workers=n}});return m})},"esri/layers/vectorTiles/request":function(){define(["require","exports","esri/request","dojo/_base/lang","dojo/Deferred"],function(H,e,m,n,q){return function(d,c){d=n.mixin({},{url:d,failOk:!0},c);"array-buffer"===c.responseType?(d.handleAs=
"arraybuffer",delete d.responseType):c.responseType&&(d.handleAs=c.responseType,delete d.responseType);null!==c.query&&(d.content=d.query,delete d.query);if(c.hasOwnProperty("allowImageDataAccess")){var a={allowImageDataAccess:c.allowImageDataAccess};delete d.allowImageDataAccess}var b=new q(function(){h.isFulfilled()||h.cancel()});var h=m(d,a).then(function(g){b.resolve({data:g})}).catch(function(g){g&&null!=g.httpCode&&(g.details=g.details||{},g.details.httpStatus=g.httpCode);b.reject(g)});return b.promise}})},
"esri/layers/vectorTiles/core/sniff":function(){define(["require","exports","dojo/sniff","./global","../views/webgl/context-util"],function(H,e,m,n,q){function d(){var h={available:!1,version:0,majorPerformanceCaveat:!1,supportsHighPrecisionFragment:!1,supportsVertexShaderSamplers:!1,supportsElementIndexUint:!1,supportsStandardDerivatives:!1},g=document.createElement("canvas");if(!g)return h;var k=q.createContext(g,{failIfMajorPerformanceCaveat:!0},"webgl");!k&&(k=q.createContext(g,{},"webgl"))&&
(h.majorPerformanceCaveat=!0);if(!k)return h;g=k.getParameter(k.VERSION);if(!g)return h;if(g=g.match(/^WebGL\s+([\d.]*)/))h.version=parseFloat(g[1]),h.available=.94<=h.version,g=k.getShaderPrecisionFormat(k.FRAGMENT_SHADER,k.HIGH_FLOAT),h.supportsHighPrecisionFragment=g&&0<g.precision,h.supportsVertexShaderSamplers=0<k.getParameter(k.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h.supportsElementIndexUint=null!==k.getExtension("OES_element_index_uint"),h.supportsStandardDerivatives=null!==k.getExtension("OES_standard_derivatives");
return h}function c(){var h={available:!1,version:0},g=document.createElement("canvas");if(!g)return h;g=q.createContext(g,{},"webgl2");if(!g)return h;h.available=!0;g=g.getParameter(g.VERSION);if(!g)return h;if(g=g.match(/^WebGL\s+([\d.]*)/))h.version=parseFloat(g[1]);return h}(function(){var h=navigator.userAgent,g=h.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i);h=h.match(/iPhone/i);g&&m.add("esri-mobile",g);h&&m.add("esri-iPhone",h);m.add("esri-phonegap",!!n.cordova);
m.add("esri-cors",m("esri-phonegap")||"XMLHttpRequest"in n&&"withCredentials"in new XMLHttpRequest);m.add("esri-geolocation",function(){return!!navigator.geolocation});m.add("esri-canvas-svg-support",function(){return!(m("trident")||m("ie"))});m.add("esri-secure-context",function(){if("isSecureContext"in n)return n.isSecureContext;if(n.location&&n.location.origin)return 0===n.location.origin.indexOf("https:")});m.add("esri-wasm","WebAssembly"in n);m("host-webworker")||(m.add("esri-workers","Worker"in
n),m.add("esri-script-sandbox",function(){return"MessageChannel"in n&&"HTMLIFrameElement"in n&&"sandbox"in HTMLIFrameElement.prototype}),m.add("esri-url-encodes-apostrophe",function(){var k=n.document.createElement("a");k.href="?'";return-1<k.href.indexOf("?%27")}),a||(a=d()),m.add("esri-webgl",a.available),m.add("esri-webgl-high-precision-fragment",a.supportsHighPrecisionFragment),m.add("esri-webgl-vertex-shader-samplers",a.supportsVertexShaderSamplers),m.add("esri-webgl-element-index-uint",a.supportsElementIndexUint),
m.add("esri-webgl-standard-derivatives",a.supportsStandardDerivatives),m.add("esri-webgl-major-performance-caveat",a.majorPerformanceCaveat),m.add("esri-featurelayer-webgl-labeling",!0),b||(b=c()),m.add("esri-webgl2",b.available))})();var a=null,b=null;return m})},"esri/layers/vectorTiles/core/global":function(){define(["require","exports"],function(H,e){return function(){if("undefined"!==typeof global)return global;if("undefined"!==typeof window)return window;if("undefined"!==typeof self)return self}()})},
"esri/layers/vectorTiles/views/webgl/context-util":function(){define(["require","exports"],function(H,e){function m(c,a,b){void 0===a&&(a={});switch(b){case "webgl":var h=["webgl","experimental-webgl","webkit-3d","moz-webgl"];break;case "webgl2":h=["webgl2"];break;default:h=["webgl","experimental-webgl","webkit-3d","moz-webgl"]}b=null;for(var g=0;g<h.length;g++){var k=h[g];try{b=c.getContext(k,a)}catch(f){}if(b)break}return b}function n(c,a){(c=c.parentNode)&&(c.innerHTML='\x3ctable style\x3d"background-color: #8CE; width: 100%; height: 100%;"\x3e\x3ctr\x3e\x3ctd align\x3d"center"\x3e\x3cdiv style\x3d"display: table-cell; vertical-align: middle;"\x3e\x3cdiv style\x3d""\x3e'+
a+"\x3c/div\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e")}Object.defineProperty(e,"__esModule",{value:!0});e.createContextOrErrorHTML=function(c,a,b){void 0===a&&(a={});if(!window.WebGLRenderingContext)return n(c,q),null;a=m(c,a,b);return a?a:(n(c,d),null)};e.createContext=m;var q='This page requires a browser that supports WebGL.\x3cbr/\x3e\x3ca href\x3d"http://get.webgl.org"\x3eClick here to upgrade your browser.\x3c/a\x3e',d='It doesn\'t appear your computer can support WebGL.\x3cbr/\x3e\x3ca href\x3d"http://get.webgl.org/troubleshooting/"\x3eClick here for more information.\x3c/a\x3e'})},
"esri/layers/vectorTiles/core/urlUtils":function(){define(["require","exports","esri/urlUtils","dojo/_base/url"],function(H,e,m,n){function q(x){return m.normalize(x)}function d(x){return"data:"===x.slice(0,5)}function c(x){return a(x)||u.test(x)}function a(x){return x&&"/"===x[0]&&"/"===x[1]}function b(x){return m.urlToObject(x)}function h(x){if("string"===typeof x)return new n(k(x));x.scheme||(x.scheme=e.appUrl.scheme);return x}function g(x){if(d(x))return null;var E=x.indexOf("://");if(-1===E&&
a(x))E=2;else if(-1!==E)E+=3;else return null;E=x.indexOf("/",E);return-1===E?x:x.slice(0,E)}function k(x,E,y){void 0===E&&(E=e.appBaseUrl);if(a(x))return y&&y.preserveProtocolRelative?x:"http"===e.appUrl.scheme&&e.appUrl.authority===g(x).slice(2)?"http:"+x:"https:"+x;if(u.test(x))return x;"/"===x[0]&&(y=E.indexOf("//"),y=E.indexOf("/",y+2),E=-1===y?E:E.slice(0,y));return l(E,x)}function f(x,E,y){void 0===y&&(y=!1);x=h(x);E=h(E);return y||x.scheme===E.scheme?x.host.toLowerCase()===E.host.toLowerCase()&&
x.port===E.port:!1}function l(){for(var x=[],E=0;E<arguments.length;E++)x[E]=arguments[E];if(x&&x.length){E=[];if(c(x[0])){var y=x[0],D=y.indexOf("//");E.push(y.slice(0,D+1));w.test(x[0])&&(E[0]+="/");x[0]=y.slice(D+2)}else"/"===x[0][0]&&E.push("");x=x.reduce(function(G,A){return A?G.concat(A.split("/")):G},[]);for(y=0;y<x.length;y++)D=x[y],".."===D&&0<E.length?E.pop():!D||"."===D&&0!==E.length||E.push(D);return E.join("/")}}function p(x,E,y){if(!(E&&y&&x&&c(x)))return x;var D=x.indexOf("//"),G=x.indexOf("/",
D+2),A=x.indexOf(":",D+2);G=Math.min(0>G?x.length:G,0>A?x.length:A);if(x.slice(D+2,G).toLowerCase()!==E.toLowerCase())return x;E=x.slice(0,D+2);x=x.slice(G);return""+E+y+x}function r(x,E,y){void 0===E&&(E=e.appBaseUrl);if(!c(x))return x;var D=q(x),G=D.toLowerCase();E=q(E).toLowerCase().replace(/\/+$/,"");if((y=y?q(y).toLowerCase().replace(/\/+$/,""):null)&&0!==E.indexOf(y))return x;for(var A=function(C,J,L){L=C.indexOf(J,L);return-1===L?C.length:L},t=A(G,"/",G.indexOf("//")+2),v=-1;G.slice(0,t+1)===
E.slice(0,t)+"/";){v=t+1;if(t===G.length)break;t=A(G,"/",t+1)}if(-1===v||y&&v<y.length)return x;x=D.slice(v);D=E.slice(v-1).replace(/[^/]+/g,"").length;if(0<D)for(G=0;G<D;G++)x="../"+x;else x="./"+x;return x}Object.defineProperty(e,"__esModule",{value:!0});e.normalize=q;e.canUseXhr=function(x){return m.canUseXhr(x)};e.removeTrailingSlash=function(x){return x.replace(/\/+$/,"")};H=Function("return this")();e.appUrl=new n(H.location);e.appBaseUrl=function(){var x=e.appUrl.path;x=x.substring(0,x.lastIndexOf(x.split("/")[x.split("/").length-
1]));return e.appUrl.scheme+"://"+e.appUrl.host+(null!=e.appUrl.port?":"+e.appUrl.port:"")+x}();var w=/^\s*file:/i,u=/^\s*[a-z][a-z0-9-+.]*:[^0-9]/i;e.isDataProtocol=d;e.isAbsolute=c;e.isProtocolRelative=a;e.urlToObject=b;e.getOrigin=g;e.makeAbsolute=k;e.hasSameOrigin=f;e.join=l;e.removeFile=function(x){var E=0;if(c(x)){var y=x.indexOf("//");-1!==y&&(E=y+2)}y=x.lastIndexOf("/");return y<E?x:x.slice(0,y+1)};e.addProxy=function(x){return m.addProxy(x)};e.makeData=function(x){return x.isBase64?"data:"+
x.mediaType+";base64,"+x.data:"data:"+x.mediaType+","+x.data};var B=/^data:(.*?)(;base64)?,(.*)$/;e.dataComponents=function(x){return(x=x.match(B))?{mediaType:x[1],isBase64:!!x[2],data:x[3]}:null};e.changeDomain=p;e.read=function(x,E){var y=E&&E.url&&E.url.path;x&&y&&(x=k(x,y,{preserveProtocolRelative:!0}));(E=E&&E.portal)&&!E.isPortal&&E.urlKey&&E.customBaseUrl?(y=E.urlKey+"."+E.customBaseUrl,E=f(e.appUrl,e.appUrl.scheme+"://"+y)?p(x,E.portalHostname,y):p(x,y,E.portalHostname)):E=x;return E};e.write=
function(x,E){if(!x)return x;!c(x)&&E&&E.blockedRelativeUrls&&E.blockedRelativeUrls.push(x);var y=k(x);if(E){var D=E.verifyItemRelativeUrls&&E.verifyItemRelativeUrls.rootPath||E.url&&E.url.path;D&&(y=r(y,D,D),y!==x&&E.verifyItemRelativeUrls&&E.verifyItemRelativeUrls.writtenUrls.push(y))}x=y;y=(E=E&&E.portal)&&!E.isPortal&&E.urlKey&&E.customBaseUrl?p(x,E.urlKey+"."+E.customBaseUrl,E.portalHostname):x;return y};e.makeRelative=r;e.removeQueryParameters=function(x){x=b(x);Object.keys(x.query||{});return x.path}})},
"esri/layers/vectorTiles/core/workers/loaderConfig":function(){define(["require","exports","../tsSupport/assignHelper","dojo/has","../urlUtils"],function(H,e,m,n,q){Object.defineProperty(e,"__esModule",{value:!0});e.DEFAULT_LOADER_URL=q.makeAbsolute(q.removeQueryParameters(H.toUrl("./worker-init.js")));e.DEFAULT_CONFIG={baseUrl:function(){var d=q.removeQueryParameters(H.toUrl("dojo/x.js"));return q.makeAbsolute(d.slice(0,d.length-5))}(),packages:[{name:"esri"},{name:"dojo"},{name:"dojox"},{name:"dstore"},
{name:"moment",main:"moment"},{name:"@dojo"},{name:"cldrjs",main:"dist/cldr"},{name:"globalize",main:"dist/globalize"},{name:"maquette",main:"dist/maquette.umd"},{name:"maquette-css-transitions",main:"dist/maquette-css-transitions.umd"},{name:"maquette-jsx",main:"dist/maquette-jsx.umd"},{name:"tslib",main:"tslib"}],map:{globalize:{cldr:"cldrjs/dist/cldr","cldr/event":"cldrjs/dist/cldr/event","cldr/supplemental":"cldrjs/dist/cldr/supplemental","cldr/unresolved":"cldrjs/dist/cldr/unresolved"}}};e.default=
function(d){var c={async:d.async,isDebug:d.isDebug,locale:d.locale,baseUrl:d.baseUrl,has:m({},d.has),map:m({},d.map),packages:d.packages&&d.packages.concat()||[],paths:m({},d.paths)};d.hasOwnProperty("async")||(c.async=!0);d.hasOwnProperty("isDebug")||(c.isDebug=!1);d.baseUrl||(c.baseUrl=e.DEFAULT_CONFIG.baseUrl);e.DEFAULT_CONFIG.packages.forEach(function(g){a:{for(var k=c.packages,f=0;f<k.length;f++)if(k[f].name===g.name)break a;g=m({},g);f=q.removeQueryParameters(H.toUrl(g.name+"/x.js"));f=f.slice(0,
f.length-5);g.location=q.makeAbsolute(f);k.push(g)}});d=c.map=c.map||{};for(var a=0,b=Object.keys(e.DEFAULT_CONFIG.map);a<b.length;a++){var h=b[a];d[h]||(d[h]=e.DEFAULT_CONFIG.map[h])}return c}})},"esri/layers/vectorTiles/core/workers/WorkerFallback":function(){define(["require","exports","dojo/has","../global","./utils"],function(H,e,m,n,q){var d=function(){return function(){var b=this,h=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach(function(g){b[g]=
function(){for(var k=[],f=0;f<arguments.length;f++)k[f]=arguments[f];return h[g].apply(h,k)}})}}(),c=n.MutationObserver||n.WebKitMutationObserver,a=function(){if(n.process&&n.process.nextTick)var b=function(k){n.process.nextTick(k)};else if(n.Promise)b=function(k){n.Promise.resolve().then(k)};else if(c){var h=[],g=document.createElement("div");(new c(function(){for(;0<h.length;)h.shift()()})).observe(g,{attributes:!0});b=function(k){h.push(k);g.setAttribute("queueStatus","1")}}return b}();return function(){function b(){this._dispatcher=
new d;this._isInitialized=!1;this._workerPostMessage({type:q.MessageType.HANDSHAKE})}b.prototype.terminate=function(){};Object.defineProperty(b.prototype,"onmessage",{get:function(){return this._onmessageHandler},set:function(h){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler);(this._onmessageHandler=h)&&this.addEventListener("message",h)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"onerror",{get:function(){return this._onerrorHandler},set:function(h){this._onerrorHandler&&
this.removeEventListener("error",this._onerrorHandler);(this._onerrorHandler=h)&&this.addEventListener("error",h)},enumerable:!0,configurable:!0});b.prototype.postMessage=function(h,g){var k=this;a(function(){k._workerMessageHandler(new MessageEvent("message",{data:h}))})};b.prototype.dispatchEvent=function(h){return this._dispatcher.dispatchEvent(h)};b.prototype.addEventListener=function(h,g,k){this._dispatcher.addEventListener(h,g,k)};b.prototype.removeEventListener=function(h,g,k){this._dispatcher.removeEventListener(h,
g,k)};b.prototype._workerPostMessage=function(h,g){var k=this;a(function(){k.dispatchEvent(new MessageEvent("message",{data:h}))})};b.prototype._workerMessageHandler=function(h){var g=this;if(h=q.receiveMessage(h)){var k=h.jobId;switch(h.type){case q.MessageType.CONFIGURE:this._isInitialized||this._workerPostMessage({type:q.MessageType.CONFIGURED});break;case q.MessageType.OPEN:h=h.modulePath,m("esri-webpack")?H(["esri/core/workers/RemoteClient","esri/views/vectorTiles/WorkerTileHandler","esri/views/2d/layers/features/Pipeline",
"esri/views/3d/layers/PointCloudWorker","esri/views/3d/layers/SceneLayerWorker","esri/layers/graphics/sources/support/CSVSourceWorker","esri/views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker",h],function(f,l,p,r,w,u,B,x){switch(x){case "esri/views/vectorTiles/WorkerTileHandler":break;case "esri/views/2d/layers/features/Pipeline":l=p;break;case "esri/views/3d/layers/PointCloudWorker":l=r;break;case "esri/views/3d/layers/SceneLayerWorker":l=w;break;case "esri/layers/graphics/sources/support/CSVSourceWorker":l=
u;break;case "esri/views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker":l=B;break;default:l=x}f=f.connect(l);g._workerPostMessage({type:q.MessageType.OPENED,jobId:k,data:f})}):H(["./RemoteClient",h],function(f,l){f=f.connect(l);g._workerPostMessage({type:q.MessageType.OPENED,jobId:k,data:f})})}}};return b}()})},"esri/layers/vectorTiles/core/requireUtils":function(){define(["require","exports","dojo/Deferred"],function(H,e,m){function n(q,d){if(Array.isArray(d)){var c=new m;q(d,function(){for(var a=
[],b=0;b<arguments.length;b++)a[b]=arguments[b];c.resolve(a)});return c.promise}return n(q,[d]).then(function(a){return a[0]})}Object.defineProperty(e,"__esModule",{value:!0});e.when=n;e.getAbsMid=function(q,d,c){return d.toAbsMid?d.toAbsMid(q):c.id.replace(/\/[^\/]*$/gi,"/")+q}})},"esri/layers/rasterLib/function/rasterFunctionHelper":function(){define(["dojo/_base/declare","dojo/_base/lang","./rasterFunctionRegistry"],function(H,e,m){return{create:function(n,q){if(n){var d=n.renderTexture,c=Object.keys(n);
if(n.read&&!q)return n;n.read&&q&&(n=n.toJson());-1<c.indexOf("name")&&c.indexOf(!1)?(n=e.mixin({},n),q=this._parseV2(n,q)):(n="esri.layers.RasterFunction"===n.declaredClass?n.toJson():e.mixin({},n),q=this._parseV1(n,q));q.branchCount=q.updateBranchStructure();q.renderTexture||(q.renderTexture=!!d);return q}},_parseV1:function(n,q){var d=n.rasterFunction,c=n.rasterFunctionArguments,a=n.renderTexture||n.rasterFunctionArguments.renderTexture||!1,b,h,g,k,f,l,p;(k=c.raster||c.Raster)&&k.rasterFunction&&
(b=this._parseV1(k,q));(k=c.raster2||c.Raster2)&&k.rasterFunction&&(h=this._parseV1(k,q));(k=c.rasters||c.Rasters)&&0<k.length&&(g=k.map(e.hitch(this,function(r){return r&&r.rasterFunction?this._parseV1(r,q):r})));(k=c.dem||c.DEM)&&(k.functionName||k.rasterFunction)&&(f=this._parseV1(k,q));(k=c.fillRaster||c.FillRaster)&&(k.functionName||k.rasterFunction)&&(l=this._parseV1(k,q));k=m.functions[d];if(!k)return console.error("Function is not currently supported: "+d),null;d=new k(c);d.variableName&&
(k=c[d.variableName])&&(k.functionName||k.rasterFunction)&&(p=this._parseV1(k,q));n.outputPixelType&&(d.pixelType=n.outputPixelType);"$$"===b?d.functionArguments.raster=q&&q.raster:null!=b?d.functionArguments.raster=b:d.functionArguments.raster||(d.functionArguments.raster=q&&q.raster);null!=h&&(d.functionArguments.raster2=h);null!=g&&(d.functionArguments.rasters=g.map(function(r){"$$"===r&&(r=q&&q.raster);return r}));null!=f&&(d.functionArguments.dem=f);null!=l&&(d.functionArguments.fillRaster=l);
null!=p&&(d.functionArguments[d.variableName]=p);d.renderTexture=a;return d},_parseV2:function(n,q){if(!n)return null;n=e.clone(n);this._bindV2Args(n,q);var d={};this._convertTov1(n,d);return this._parseV1(d,q)},_bindV2Args:function(n,q){(n||q)&&Object.keys(n).forEach(function(d){n[d]["function"]&&n[d].arguments?this._bindV2Args(n[d].arguments,q):null!=q[n[d].name]&&(n[d].value=q[n[d].name])}.bind(this))},_convertV2Types:function(n){if(!n)return null;"ArgumentArray"===n.type?n.elements&&"RasterStatistics"===
n.elements[0].type&&(n=n.elements):n instanceof Array&&0===n.length&&(n=null);return n},_convertTov1:function(n,q){if((n||q)&&n["function"]){var d=n["function"],c=n.arguments;q.rasterFunction=d.type.replace("Function","");q.outputPixelType="UNKNOWN"===d.pixelType?"Unknown":d.pixelType;q.rasterFunctionArguments={};var a;Object.keys(c).forEach(function(b){c[b]["function"]&&c[b].arguments?(q.rasterFunctionArguments[b]={},this._convertTov1(c[b],q.rasterFunctionArguments[b])):(a=c[b].value,q.rasterFunctionArguments[b]=
"object"!==typeof a||a.functionArguments?a:this._convertV2Types(a))}.bind(this))}}}})},"esri/layers/rasterLib/function/rasterFunctionRegistry":function(){define("dojo/_base/declare dojo/_base/lang ../../rasterLib/function/AspectFunction ../../rasterLib/function/BandArithmeticFunction ../../rasterLib/function/ColormapFunction ../../rasterLib/function/CompositeBandFunction ../../rasterLib/function/ContrastBrightnessFunction ../../rasterLib/function/ConvolutionFunction ../../rasterLib/function/ExtractBandFunction ../../rasterLib/function/HillshadeFunction ../../rasterLib/function/LocalFunction ../../rasterLib/function/MaskFunction ../../rasterLib/function/NDVIFunction ../../rasterLib/function/SlopeFunction ../../rasterLib/function/StretchFunction ../../rasterLib/function/RemapFunction ../../rasterLib/function/IdentityFunction ../../rasterLib/function/ResampleFunction".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u){return function(){function B(D){D.prototype.supportWebGL&&(E[D.prototype.functionName]=D);D.prototype.support2D&&(x[D.prototype.functionName]=D);y[D.prototype.functionName]=D}var x={},E={},y={};B(m);B(n);B(q);B(d);B(c);B(a);B(b);B(h);B(g);B(k);B(f);B(l);B(p);B(r);B(w);B(u);return{cpu:x,gpu:E,functions:y,register:B,getFunction:function(D){return y[D]},support:function(D,G){return!!("gpu"===G?E:"cpu"===G?x:y)[D]}}}()})},"esri/layers/rasterLib/function/AspectFunction":function(){define("dojo/_base/declare dojo/_base/lang ./RasterFunctionX ../../../WKIDUnitConversion ../../PixelBlock ./pixelShaders ./RasterFunctionWebGLMixin ./surfaceUtils".split(" "),
function(H,e,m,n,q,d,c,a){return H([m,c],{declaredClass:"esri.layers.rasterLib.function.AspectFunction",functionName:"Aspect",supportWebGL:!0,support2D:!0,constructor:function(b){this.functionArguments=this.mixinIgnoreCase({raster:null},b)},bind:function(){var b=this.getSourceRasterInfo();if(!b.raster)return Error("The raster input to aspect function is invalid.");this.rasterInfo=e.mixin(b.raster,{bandCount:1,pixelType:this._calculatePixelType(this.pixelType,"F32"),statistics:[{min:0,max:360}],histograms:null});
this.rasterInfo.keyProperties=this.rasterInfo.keyProperties||{};this.rasterInfo.keyProperties.DataType="Generic";return!0},read2D:function(b){this._performance.start();b=a.aspect(b.raster);this._addPerformanceMetric(this._performance.elapsed());return b},readGL:function(b){this._performance.start();this._initializeProgram({fragment:d.aspect,fragmentName:"Aspect"});var h=this._setupTextureData(b.raster),g=this.bindFrameBuffer(),k=this.gl,f=k.drawingBufferWidth;k=k.drawingBufferHeight;var l=h.extent;
this._setUniforms({u_resolution:b&&b.raster&&b.raster.pixelBlock?[1/b.raster.pixelBlock.width,1/b.raster.pixelBlock.height]:[1/f,1/k],u_cellSize:[(l.xmax-l.xmin)/f,(l.ymax-l.ymin)/k]});this._bindTexture(h.texture,"u_image");this._drawGL();this._addPerformanceMetric(this._performance.elapsed());return{extent:h.extent,texture:g.texture}}})})},"esri/layers/rasterLib/function/RasterFunctionX":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/config ../raster/RasterInfo ../../../geometry/Extent ../../PixelBlock".split(" "),
function(H,e,m,n,q,d){return H(null,{functionName:null,functionArguments:null,pixelType:"Unknown",rasterInfo:null,constructor:function(c){c&&(this.pixelType=c.outputPixelType||c.OutputPixelType||this.pixelType,this.renderTexture=c.renderTexture,this._initFunction())},mixinIgnoreCase:function(c,a){var b=Object.keys(c),h=Object.keys(a),g,k,f=b.length;for(g=0;g<h.length;g++){var l=a[h[g]];if(null!=l)for(k=0;k<f;k++)if(b[k].toLowerCase()===h[g].toLowerCase()){c[b[k]]=l;break}}return c},bind:function(c){},
setProcessingContext:function(c){if(!c)throw"cannot bind to layer without options";this.useWebGL=!!c.useWebGL;this._tileMode=!!c.tileMode;this._glSetting=c.glSetting;this._rawRasterInfo=c.rawRasterInfo;this._xformSetting=c.xformSetting||this._xformSetting;if(!this.useWebGL||this._glSetting&&this._glSetting.gl){this.gl=this.useWebGL?this._glSetting.gl:null;this._glSetting&&(this._glSetting.pingpong=null,this._glSetting.branches=null);var a=this.functionArguments.raster,b=this.functionArguments.raster2,
h=this.functionArguments.dem,g=this.functionArguments.fillRaster,k=this.functionArguments.rasters;a&&a.functionArguments&&a.setProcessingContext(c);b&&b.functionArguments&&b.setProcessingContext(c);h&&h.functionArguments&&h.setProcessingContext(c);g&&g.functionArguments&&g.setProcessingContext(c);if(k)for(a=0;a<k.length;a++)k[a]&&k[a].functionArguments&&k[a].setProcessingContext(c);this.bind()}},updateBranchStructure:function(){var c=0,a=this.functionArguments;a.raster&&a.raster.read&&a.raster.functionArguments&&
(c+=a.raster.updateBranchStructure());a.raster2&&a.raster2.read&&a.raster2.functionArguments&&(c+=a.raster2.updateBranchStructure(),a.raster2.isBranch=!0,a.raster&&a.raster.read&&(a.raster.isBranch=!0));a.rasters&&(c=a.rasters.length,a.rasters.forEach(function(b){b.read&&b.functionArguments&&(b.isBranch=!0)}));a.dem&&a.dem.read&&a.dem.functionArguments&&(c+=a.dem.updateBranchStructure());return 1===c?0:c},read:function(c){c=this.processRasterArgument(c);return this.useWebGL?this.readGL(c):this.read2D(c)},
hasTilingEffects:function(){return!1},read2D:function(){},readGL:function(){},getSourceRasterInfo:function(){var c,a={};if(this.functionArguments.raster2)a.functionArguments.raster=this._bindRaster(this.functionArguments.raster),a.functionArguments.raster2=this._bindRaster(this.functionArguments.raster2);else if(this.functionArguments.rasters)for(a.rasters=[],c=0;c<this.functionArguments.rasters.length;c++)a.rasters[c]=this._bindRaster(this.functionArguments.rasters[c]);else a.raster=this._bindRaster(this.functionArguments.raster);
return this.sourceRasterInfo=a},processRasterArgument:function(c){var a=this.bind();if(!0!==a)throw a;var b={};if(this.functionArguments.raster2)b.raster=this._readRaster(this.functionArguments.raster,c),b.raster2=this._readRaster(this.functionArguments.raster2,c);else if(this.functionArguments.rasters)for(b.rasters=[],a=0;a<this.functionArguments.rasters.length;a++)b.rasters[a]=this._readRaster(this.functionArguments.rasters[a],c);else b.raster=this._readRaster(this.functionArguments.raster,c);return b},
toJson:function(){var c=this.functionArguments,a=c.raster,b=c.raster2;c=c.rasters;a=a?a.toJson?a.toJson():a:null;b=b?b.toJson?b.toJson():b:null;var h;c&&0<c.length&&(h=c.map(function(g){return g.toJson?g.toJson():g}));c=e.mixin({},this.functionArguments);c.raster=a;c.raster2=b;c.rasters=h;c=this._fixRasterFunctionJson(c);return{rasterFunction:this.functionName,rasterFunctionArguments:c,outputPixelType:this.pixelType}},_initFunction:function(c){},_getIntegerRange:function(c){switch(c){case "U8":var a=
[0,255];break;case "U16":a=[0,65535];break;case "U32":a=[0,4294967295];break;case "S8":a=[-128,127];break;case "S16":a=[-32768,32767];break;case "S32":a=[-2147483648,2147483647]}return a},_calculatePixelType:function(c,a){return c&&"unknown"!==c.toLowerCase()?c:a},_clonePixelData:function(c){if(null==c)return c;var a={};c.extent&&(a.extent=new q(c.extent.xmin,c.extent.ymin,c.extent.xmax,c.extent.ymax,c.extent.spatialReference));c=c.pixelBlock;if(null==c)return a;a.pixelBlock=c.clone?c.clone():d.prototype.clone(c);
return a},_readRaster:function(c,a){if(null==c||"$$"===c)var b=this._clonePixelData(a.src[Object.keys(a.src)[0]]);else c&&c.rasterInfo&&!c.functionArguments?b=this._clonePixelData(a.src[c._rasterId]):isNaN(c)?c.read&&(b=c.functionArguments?c.read(a):this._clonePixelData(a)):(b=a.src?a.src[Object.keys(a.src)[0]]:a,a=b.pixelBlock,a=new Float32Array(a.width*a.height),a.fill(parseFloat(c)),b=this._clonePixelData(b),b.pixelBlock.pixels=[a],b.isConstant=!0);return b},_bindRaster:function(c){if(c&&"$$"!==
c)isNaN(c)?c.rasterInfo?a=c.rasterInfo:c.bind&&c.bind()&&(a=c.rasterInfo):a={};else var a=this._rawRasterInfo;a&&(a=a.clone?a.clone():new n(a),a.bandCount=a.bandCount||3);return a},_getOutputBand:function(c,a){switch(c){case "U8":c=new Uint8Array(a);break;case "U16":c=new Uint16Array(a);break;case "U32":c=new Uint32Array(a);break;case "S8":c=new Int8Array(a);break;case "S16":c=new Int16Array(a);break;case "S32":c=new Int32Array(a);break;case "U32":c=new Uint32Array(a);break;case "F32":c=new Float32Array(a);
break;case "F64":c=new Float64Array(a);break;default:c=new Float32Array(a)}return c},_clampBand:function(c,a,b){if(("F64"===a||"F32"===a)&&!b)return c;var h,g=this._getIntegerRange(a),k=c.length;if(g)for(b=g[1],g=g[0],a=this._getOutputBand(a,k),h=0;h<k;h++){var f=c[h];a[h]=f>b?b:f<g?g:f}else a=c;return a},_performance:{start:function(){return this._start=self.performance&&self.performance.now()||new Date}.bind(this),elapsed:function(){return(self.performance&&self.performance.now()||new Date)-this._start}.bind(this)},
_addPerformanceMetric:function(c){m.isDebug&&(self.rasterFunctionPerformance||(self.rasterFunctionPerformance=[]),self.rasterFunctionPerformance.push(c),50<self.rasterFunctionPerformance.length&&self.rasterFunctionPerformance.shift())},_fixRasterFunctionJson:function(c){for(var a in c)c.hasOwnProperty(a)&&(null==c[a]?delete c[a]:c[a]instanceof Object&&!c[a].sourceType&&this._fixRasterFunctionJson(c[a],!0));return c}})})},"esri/layers/rasterLib/function/pixelShaders":function(){define(["dojo/_base/declare",
"dojo/_base/lang","./pixelShaderScripts"],function(H,e,m){H={shaderType:"fragment",getShader:function(n,q){var d=n.createShader(n.FRAGMENT_SHADER);n.shaderSource(d,q);n.compileShader(d);n.getShaderParameter(d,n.COMPILE_STATUS)||(d=null);return d}};e.mixin(H,m);return H})},"esri/layers/rasterLib/function/pixelShaderScripts":function(){define([],function(){return{aspect:"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texCoord;\nuniform vec2 u_resolution;\nuniform vec2 u_cellSize;\nfloat getNeighborHoodAlpha(float a, float b, float c, float d, float e, float f, float g, float h, float i){\nif (a \x3d\x3d 0.0 || a \x3d\x3d 0.0 || a\x3d\x3d0.0 || a \x3d\x3d 0.0 || a \x3d\x3d 0.0 || a\x3d\x3d0.0 || a \x3d\x3d 0.0 || a \x3d\x3d 0.0 || a\x3d\x3d0.0) {\nreturn 0.0;\n}\nelse {\nreturn e;\n}\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\nfloat pi \x3d 3.141592653589793238;\nfloat dz_dx \x3d 0.0;\nfloat dz_dy \x3d 0.0;\nvec4 va, vb, vc,vd,ve,vf,vg,vh,vi;\nvec2 axy \x3d vec2(-1.0,-1.0);\nvec2 bxy \x3d vec2(0.0, -1.0);\nvec2 cxy \x3d vec2(1.0, -1.0);\nvec2 dxy \x3d vec2(-1.0, 0.0);\nvec2 fxy \x3d vec2(1.0, 0.0);\nvec2 gxy \x3d vec2(-1.0, 1.0);\nvec2 hxy \x3d vec2(0.0, 1.0);\nvec2 ixy \x3d vec2(1.0, 1.0);\nif (v_texCoord.s \x3c u_resolution.s)\n{\naxy[0] \x3d 1.0;\ndxy[0] \x3d 1.0;\ngxy[0] \x3d 1.0;\n}\nif (v_texCoord.t \x3c u_resolution.t)\n{\naxy[1] \x3d 1.0;\nbxy[1] \x3d 1.0;\ncxy[1] \x3d 1.0;\n}\nif (v_texCoord.s \x3e1.0-u_resolution.s)\n{\ncxy[0] \x3d -1.0;\nfxy[0] \x3d -1.0;\nixy[0] \x3d -1.0;\n}\nif (v_texCoord.t \x3e 1.0- u_resolution.t)\n{\ngxy[1] \x3d -1.0;\nhxy[1] \x3d -1.0;\nixy[1] \x3d -1.0;\n}\nif (v_texCoord.s \x3e\x3d u_resolution.s \x26\x26 (1.0-u_resolution.s)\x3e\x3dv_texCoord.s \x26\x26 v_texCoord.t \x3e\x3d u_resolution.t \x26\x26 (1.0-u_resolution.t)\x3e\x3dv_texCoord.t)\n{\nva \x3d texture2D(u_image, v_texCoord + u_resolution* axy);\nvb \x3d texture2D(u_image, v_texCoord + u_resolution* bxy);\nvc \x3d texture2D(u_image, v_texCoord + u_resolution* cxy);\nvd \x3d texture2D(u_image, v_texCoord + u_resolution* dxy);\nve \x3d texture2D(u_image, v_texCoord + u_resolution* vec2(0, 0));\nvf \x3d texture2D(u_image, v_texCoord + u_resolution* fxy);\nvg \x3d texture2D(u_image, v_texCoord + u_resolution* gxy);\nvh \x3d texture2D(u_image, v_texCoord + u_resolution* hxy);\nvi \x3d texture2D(u_image, v_texCoord + u_resolution* ixy);\n}\ndz_dx \x3d (vc+2.0*vf+vi - va - 2.0*vd - vg).r/(8.0*u_cellSize[0]);\ndz_dy \x3d -(vg+2.0*vh+vi - va - 2.0*vb - vc).r/(8.0*u_cellSize[1]);\nfloat alpha \x3d getNeighborHoodAlpha(va.a, vb.a, vc.a, vd.a, ve.a, vf.a, vg.a, vh.a, vi.a);\nfloat aspect_rad \x3d 0.0;\nif (dz_dx \x3d\x3d 0.0)\n{\nif (dz_dy \x3e 0.0)\naspect_rad \x3d 0.5 * pi;\nelse if (dz_dy \x3c 0.0)\naspect_rad \x3d 1.5 * pi;\nelse\nalpha \x3d 0.0;//undefined make it nodata\n}\nelse\n{\naspect_rad \x3d 0.5*pi + atan(dz_dy, -dz_dx);\nif (aspect_rad \x3c 0.0)\naspect_rad \x3d 2.0*pi + aspect_rad;\n}\nfloat aspect \x3d aspect_rad * 180.0 / pi;\ngl_FragColor \x3d vec4(aspect, aspect, aspect, alpha);\n}",
bandArithmetic:"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texCoord;\nuniform int u_bandId_nir;\nuniform int u_bandId_red;\nuniform bool u_scaled;\nuniform int u_bandCount;\nuniform int u_method;\nuniform float u_constants[6];\nvec4 calculateNDVI() {\nvec4 currentPixel \x3d texture2D(u_image, v_texCoord);\nfloat red \x3d float(u_bandId_red \x3d\x3d 0 ? currentPixel.r : (u_bandId_red \x3d\x3d 1 ? currentPixel.g : currentPixel.b));\nfloat nir \x3d float(u_bandId_nir \x3d\x3d 0 ? currentPixel.r : (u_bandId_nir \x3d\x3d 1 ? currentPixel.g : currentPixel.b));\nfloat ndvi_denom \x3d nir + red;\nfloat ndvi;\nif (ndvi_denom \x3d\x3d 0.0) {\nndvi \x3d 0.0;\n} else {\nndvi \x3d (nir - red) / ndvi_denom;\nif (u_scaled) {\nndvi \x3d float(floor(ndvi * 100.0 + 100.5));\n}\n}\nreturn vec4(ndvi, ndvi, ndvi, currentPixel.a);\n}\nvec4 calculateSAVI() {\nvec4 currentPixel \x3d texture2D(u_image, v_texCoord);\nfloat red \x3d float(u_bandId_red \x3d\x3d 0 ? currentPixel.r : (u_bandId_red \x3d\x3d 1 ? currentPixel.g : currentPixel.b));\nfloat nir \x3d float(u_bandId_nir \x3d\x3d 0 ? currentPixel.r : (u_bandId_nir \x3d\x3d 1 ? currentPixel.g : currentPixel.b));\nfloat savi_denom \x3d nir + red + u_constants[0];\nfloat savi;\nif (savi_denom \x3d\x3d 0.0) {\nsavi \x3d 0.0;\n} else {\nsavi \x3d (nir - red) / savi_denom * (1.0 + u_constants[0]);\n}\nreturn vec4(savi, savi, savi, currentPixel.a);\n}\nvec4 calculateMSAVI() {\nvec4 currentPixel \x3d texture2D(u_image, v_texCoord);\nfloat red \x3d float(u_bandId_red \x3d\x3d 0 ? currentPixel.r : (u_bandId_red \x3d\x3d 1 ? currentPixel.g : currentPixel.b));\nfloat nir \x3d float(u_bandId_nir \x3d\x3d 0 ? currentPixel.r : (u_bandId_nir \x3d\x3d 1 ? currentPixel.g : currentPixel.b));\nfloat msavi \x3d 0.5 * (2.0 * (nir + 1.0) - sqrt(pow((2.0 * nir + 1.0), 2.0) - 8.0 * (nir - red)));\nreturn vec4(msavi, msavi, msavi, currentPixel.a);\n}\nvec4 calculateTSAVI() {\nvec4 currentPixel \x3d texture2D(u_image, v_texCoord);\nfloat red \x3d float(u_bandId_red \x3d\x3d 0 ? currentPixel.r : (u_bandId_red \x3d\x3d 1 ? currentPixel.g : currentPixel.b));\nfloat nir \x3d float(u_bandId_nir \x3d\x3d 0 ? currentPixel.r : (u_bandId_nir \x3d\x3d 1 ? currentPixel.g : currentPixel.b));\nfloat s \x3d u_constants[0];\nfloat a \x3d u_constants[1];\nfloat x \x3d u_constants[2];\nfloat tsavi_denom \x3d a * nir + red - a * s + x * (1.0 + s * s);\nfloat tsavi;\nif (tsavi_denom \x3d\x3d 0.0) {\ntsavi \x3d 0.0;\n} else {\ntsavi \x3d s * (nir - s * red - a) / tsavi_denom;\n}\nreturn vec4(tsavi, tsavi, tsavi, currentPixel.a);\n}\nvec4 calculatePVI() {\nvec4 currentPixel \x3d texture2D(u_image, v_texCoord);\nfloat red \x3d float(u_bandId_red \x3d\x3d 0 ? currentPixel.r : (u_bandId_red \x3d\x3d 1 ? currentPixel.g : currentPixel.b));\nfloat nir \x3d float(u_bandId_nir \x3d\x3d 0 ? currentPixel.r : (u_bandId_nir \x3d\x3d 1 ? currentPixel.g : currentPixel.b));\nfloat a \x3d u_constants[0];\nfloat b \x3d u_constants[1];\nfloat pvi \x3d (nir - a * red - b) / sqrt(1.0 + a * 2.0);\nreturn vec4(pvi, pvi, pvi, currentPixel.a);\n}\nvec4 calculateGEMI() {\nvec4 currentPixel \x3d texture2D(u_image, v_texCoord);\nfloat red \x3d float(u_bandId_red \x3d\x3d 0 ? currentPixel.r : (u_bandId_red \x3d\x3d 1 ? currentPixel.g : currentPixel.b));\nfloat nir \x3d float(u_bandId_nir \x3d\x3d 0 ? currentPixel.r : (u_bandId_nir \x3d\x3d 1 ? currentPixel.g : currentPixel.b));\nfloat gemi;\nif (red \x3d\x3d 1.0) {\ngemi \x3d 0.0;\n} else {\nfloat eta \x3d (2.0 * (nir * nir - red * red) + 1.5 * nir + 0.5 * red) / (nir + red + 0.5);\nfloat gemi \x3d eta * (1.0 - 0.25*eta) - (red - 0.125) / (1.0 - red);\n}\nreturn vec4(gemi, gemi, gemi, currentPixel.a);\n}\nvec4 calculateVARI() {\nvec4 currentPixel \x3d texture2D(u_image, v_texCoord);\nfloat red \x3d float(currentPixel.r);\nfloat green \x3d float(currentPixel.g);\nfloat blue \x3d float(currentPixel.b);\nfloat vari \x3d (green - red) /(green + red - blue);\nreturn vec4(vari, vari, vari, currentPixel.a);\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\nvec4 pv;\nif (u_method \x3c 4) {\nif (u_method \x3d\x3d 1) {\npv \x3d calculateNDVI();\n} else if (u_method \x3d\x3d 2) {\npv \x3d calculateSAVI();\n} else if (u_method \x3d\x3d 3) {\npv \x3d calculateTSAVI();\n} else if (u_method \x3d\x3d 4) {\npv \x3d calculateMSAVI();\n}\n} else {\nif (u_method \x3d\x3d 5) {\npv \x3d calculateGEMI();\n} else if (u_method \x3d\x3d 6) {\npv \x3d calculatePVI();\n} else if (u_method \x3d\x3d 7) {\npv \x3d calculateGEMI();\n} else if (u_method \x3d\x3d 9) {\npv \x3d calculateVARI();\n}\n}\ngl_FragColor \x3d pv;\n}",
colormap:"precision mediump float;\nuniform sampler2D u_image;\nuniform sampler2D u_image1;\nvarying vec2 v_texCoord;\nuniform float u_indexedColormapOffset;\nuniform float u_indexedColormapMaxIndex;\nvec4 colorize() {\nvec4 currentPixel \x3d texture2D(u_image, v_texCoord);\nfloat clrIndex \x3d currentPixel.r - u_indexedColormapOffset;\nvec4 result;\nif (currentPixel.a \x3d\x3d 0.0 || clrIndex \x3e u_indexedColormapMaxIndex) {\nresult \x3d vec4(0.0, 0.0, 0.0, 0.0);\n}\nelse {\nvec2 clrPosition \x3d vec2(clrIndex / u_indexedColormapMaxIndex, 0.0);\nvec4 color \x3d texture2D(u_image1, clrPosition);\nresult \x3d vec4(color.r, color.g, color.b, color.a);\n}\nreturn result;\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\ngl_FragColor \x3d colorize();\n}",
compositeBand:"precision mediump float;\nuniform sampler2D u_image;\nuniform sampler2D u_image1;\nuniform sampler2D u_image2;\nvarying vec2 v_texCoord;\nuniform int u_rasterCount;\nvec4 composite() {\nvec4 p0, p1, p2;\np0 \x3d texture2D(u_image, v_texCoord);\nvec4 result;\nif (u_rasterCount \x3d\x3d 1){\nresult \x3d p0;\n}\nelse if (u_rasterCount \x3d\x3d 2){\np1 \x3d texture2D(u_image1, v_texCoord);\nresult \x3d vec4(p0.r,p1.r,0.0,min(p0.a,p1.a));\n}\nelse if (u_rasterCount \x3d\x3d 3){\np1 \x3d texture2D(u_image1, v_texCoord);\np2 \x3d texture2D(u_image2, v_texCoord);\nresult \x3d vec4(p0.r,p1.r,p2.r,min(min(p0.a,p1.a),p2.a));\n}\nreturn result;\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\ngl_FragColor \x3d composite();\n}",
constant:"precision mediump float;\nuniform vec4 u_color;\nvoid main() {\ngl_FragColor \x3d u_color;\n}",contrastBrightness:"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texCoord;\nuniform float u_contrastOffset;\nuniform float u_brightnessOffset;\nuniform float u_scaleFactor;\nvec4 adjustContrastBrightness() {\nvec4 currentPixel \x3d texture2D(u_image, v_texCoord);\nfloat c \x3d u_contrastOffset;\nfloat b \x3d u_brightnessOffset;\nfloat maxI \x3d 255.0;\nfloat mid \x3d 128.0;\nvec4 v;\nif (c \x3e 0.0 \x26\x26 c \x3c 100.0) {\nv \x3d (200.0 * currentPixel - 100.0 * maxI + 2.0 * maxI * b) / (2.0 * (100.0 - c)) + mid;\n} else if (c \x3c\x3d 0.0 \x26\x26 c \x3e -100.0) {\nv \x3d (200.0 * currentPixel - 100.0 * maxI + 2.0 * maxI * b) * (100.0 + c) / 20000.0 + mid;\n} else if (c \x3d\x3d 100.0) {\nv \x3d (200.0 * currentPixel - 100.0 * maxI + (maxI + 1.0) * (100.0 - c) + 2.0 * maxI * b);\nv \x3d (sign(v) + 1.0) / 2.0; //binary contrast with extra mid tone at 0.5\n} else if (c \x3d\x3d -100.0) {\nv \x3d vec4(mid, mid, mid, currentPixel.a); //no contrast\n}\nreturn vec4(v.r / u_scaleFactor, v.g / u_scaleFactor, v.b / u_scaleFactor, currentPixel.a);\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\ngl_FragColor \x3d adjustContrastBrightness();\n}",
convolution:"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texCoord;\nuniform vec2 u_resolution;\nuniform float u_kernel[25];\nuniform int u_kernelSize;\nvec4 convolve33(){\nvec4 vp11, vp12, vp13, vp21, vp22, vp23, vp31, vp32, vp33;\nvec2 xy11 \x3d vec2(-1.0, -1.0);\nvec2 xy12 \x3d vec2(0.0, -1.0);\nvec2 xy13 \x3d vec2(1.0, -1.0);\nvec2 xy21 \x3d vec2(-1.0, 0.0);\nvec2 xy23 \x3d vec2(1.0, 0.0);\nvec2 xy31 \x3d vec2(-1.0, 1.0);\nvec2 xy32 \x3d vec2(0.0, 1.0);\nvec2 xy33 \x3d vec2(1.0, 1.0);\nif (v_texCoord.s \x3c u_resolution.s) {\nxy11[0] \x3d 1.0;\nxy21[0] \x3d 1.0;\nxy31[0] \x3d 1.0;\n}\nif (v_texCoord.t \x3c u_resolution.t) {\nxy11[1] \x3d 1.0;\nxy12[1] \x3d 1.0;\nxy13[1] \x3d 1.0;\n}\nif (v_texCoord.s \x3e 1.0 - u_resolution.s) {\nxy13[0] \x3d -1.0;\nxy23[0] \x3d -1.0;\nxy33[0] \x3d -1.0;\n}\nif (v_texCoord.t \x3e 1.0 - u_resolution.t) {\nxy31[1] \x3d -1.0;\nxy32[1] \x3d -1.0;\nxy33[1] \x3d -1.0;\n}\nvec4 convolResult \x3d\ntexture2D(u_image, v_texCoord + u_resolution * xy11) * u_kernel[0] +\ntexture2D(u_image, v_texCoord + u_resolution * xy12) * u_kernel[1] +\ntexture2D(u_image, v_texCoord + u_resolution * xy13) * u_kernel[2] +\ntexture2D(u_image, v_texCoord + u_resolution * xy21) * u_kernel[3] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(0, 0)) * u_kernel[4] +\ntexture2D(u_image, v_texCoord + u_resolution * xy23) * u_kernel[5] +\ntexture2D(u_image, v_texCoord + u_resolution * xy31) * u_kernel[6] +\ntexture2D(u_image, v_texCoord + u_resolution * xy32) * u_kernel[7] +\ntexture2D(u_image, v_texCoord + u_resolution * xy33) * u_kernel[8];\nreturn vec4(convolResult.rgb, texture2D(u_image, v_texCoord).a);\n}\nvec4 convolve55(){\nvec4 vp11, vp12, vp13, vp21, vp22, vp23, vp31, vp32, vp33;\nfloat xdif[5];//https://www.opengl.org/wiki/Data_Type_(GLSL) array constructor ES3.0\nfloat ydif[5];\nfloat a \x3d -2.0;\nfor (int i\x3d0; i\x3c5; i++){\nxdif[i] \x3d a;\nydif[i] \x3d a;\na++;\n}\nif (v_texCoord.s \x3c u_resolution.s *2.0) { //2 pixel\nxdif[0] \x3d 2.0;\nif (v_texCoord.s \x3c u_resolution.s) { //1 pixel\nxdif[1] \x3d 1.0;\n}\n}\nelse if (v_texCoord.s \x3e 1.0 - u_resolution.s *2.0) {\nxdif[0] \x3d -2.0;\nif (v_texCoord.s \x3e 1.0 - u_resolution.s) {\nxdif[1] \x3d -1.0;\n}\n}\nif (v_texCoord.t \x3c u_resolution.t *2.0) {\nydif[0] \x3d 2.0;\nif (v_texCoord.t \x3c u_resolution.t) {\nydif[1] \x3d 1.0;\n}\n}\nelse if (v_texCoord.t \x3e 1.0 - u_resolution.t*2.0) {\nydif[0] \x3d -2.0;\nif (v_texCoord.t \x3e 1.0 - u_resolution.t) {\nydif[1] \x3d -1.0;\n}\n}\nvec4 convolResult \x3d\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[0], ydif[0])) * u_kernel[0] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[1], ydif[0])) * u_kernel[1] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[2], ydif[0])) * u_kernel[2] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[3], ydif[0])) * u_kernel[3] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[4], ydif[0])) * u_kernel[4] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[0], ydif[1])) * u_kernel[5] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[1], ydif[1])) * u_kernel[6] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[2], ydif[1])) * u_kernel[7] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[3], ydif[1])) * u_kernel[8] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[4], ydif[1])) * u_kernel[9] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[0], ydif[2])) * u_kernel[10] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[1], ydif[2])) * u_kernel[11] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[2], ydif[2])) * u_kernel[12] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[3], ydif[2])) * u_kernel[13] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[4], ydif[2])) * u_kernel[14] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[0], ydif[3])) * u_kernel[15] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[1], ydif[3])) * u_kernel[16] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[2], ydif[3])) * u_kernel[17] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[3], ydif[3])) * u_kernel[18] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[4], ydif[3])) * u_kernel[19] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[0], ydif[4])) * u_kernel[20] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[1], ydif[4])) * u_kernel[21] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[2], ydif[4])) * u_kernel[22] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[3], ydif[4])) * u_kernel[23] +\ntexture2D(u_image, v_texCoord + u_resolution * vec2(xdif[4], ydif[4])) * u_kernel[24];\nreturn vec4(convolResult.rgb, texture2D(u_image, v_texCoord).a);\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\nif (u_kernelSize \x3d\x3d 9){\ngl_FragColor \x3d convolve33();\n}\nelse {\ngl_FragColor \x3d convolve55();\n}\n}",
extractBand:"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texCoord;\nuniform int u_bandIDs[3];\nuniform bool u_alterBand;\nvec4 extractBand() {\nvec4 p \x3d texture2D(u_image, v_texCoord);\nif (!u_alterBand){\nreturn p;\n}\nfloat r, g, b;\nif (u_bandIDs[0] \x3d\x3d0){\nr \x3d p.r;\n}\nelse if (u_bandIDs[0] \x3d\x3d1){\nr \x3d p.g;\n}\nelse if (u_bandIDs[0] \x3d\x3d2){\nr \x3d p.b;\n}\nif (u_bandIDs[1] \x3d\x3d0){\ng \x3d p.r;\n}\nelse if (u_bandIDs[1] \x3d\x3d1){\ng \x3d p.g;\n}\nelse if (u_bandIDs[1] \x3d\x3d2){\ng \x3d p.b;\n}\nif (u_bandIDs[2] \x3d\x3d0){\nb \x3d p.r;\n}\nelse if (u_bandIDs[2] \x3d\x3d1){\nb \x3d p.g;\n}\nelse if (u_bandIDs[2] \x3d\x3d2){\nb \x3d p.b;\n}\nreturn vec4(r, g, b, p.a);\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\ngl_FragColor \x3d extractBand();\n}",
hillshade:"precision mediump float;\nuniform sampler2D u_image;\nuniform sampler2D u_image1;\nvarying vec2 v_texCoord;\nuniform vec2 u_resolution;\nuniform int u_slopeType;\nuniform int u_hillshadeType;\nuniform int u_lightSourceCount;\nuniform float u_sinZcosA;\nuniform float u_sinZsinA;\nuniform float u_cosZ;\nuniform float u_sinZcosAs[6];\nuniform float u_sinZsinAs[6];\nuniform float u_cosZs[6];\nuniform float u_weights[6];\nuniform float u_xFactor;\nuniform float u_yFactor;\nuniform bool u_scaled;\nuniform float u_minValue;\nuniform float u_maxValue;\nuniform bool u_applyColorramp;\nuniform float u_indexedColormapOffset;\nuniform float u_indexedColormapMaxIndex;\nuniform vec2 u_rawResolution;\nuniform int u_resampling;\nvec4 getPixelValue(vec2 coords) {\nif (u_resampling \x3d\x3d 0) {\nreturn texture2D(u_image, coords);\n}\nvec2 pos_ul \x3d floor(coords / u_rawResolution) * u_rawResolution;\nvec2 pos_ur \x3d pos_ul + vec2(1.0, 0.0) * u_rawResolution;\nvec2 pos_ll \x3d pos_ul + vec2(0.0, 1.0) * u_rawResolution;\nvec2 pos_lr \x3d pos_ul + vec2(1.0, 1.0) * u_rawResolution;\nvec2 weight \x3d fract(coords / u_rawResolution);\nvec4 vp_ul \x3d texture2D(u_image, pos_ul);\nvec4 vp_ur \x3d texture2D(u_image, pos_ur);\nvec4 vp_ll \x3d texture2D(u_image, pos_ll);\nvec4 vp_lr \x3d texture2D(u_image, pos_lr);\nvec4 vp \x3d mix(mix(vp_ul, vp_ur, weight.x), mix(vp_ll, vp_lr, weight.x), weight.y);\nreturn vp;\n}\nfloat getNeighborHoodAlpha(float a, float b, float c, float d, float e, float f, float g, float h, float i){\nif (a \x3d\x3d 0.0 || a \x3d\x3d 0.0 || a\x3d\x3d0.0 || a \x3d\x3d 0.0 || a \x3d\x3d 0.0 || a\x3d\x3d0.0 || a \x3d\x3d 0.0 || a \x3d\x3d 0.0 || a\x3d\x3d0.0) {\nreturn 0.0;\n}\nelse {\nreturn e;\n}\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvec3 rgb2hsv(vec3 c) {\nvec4 K \x3d vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\nvec4 p \x3d c.g \x3c c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy);\nvec4 q \x3d c.r \x3c p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx);\nfloat d \x3d q.x - min(q.w, q.y);\nfloat e \x3d 1.0e-10;\nreturn vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), min(d / (q.x + e), 1.0), q.x);\n}\nvec3 hsv2rgb(vec3 c) {\nvec4 K \x3d vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\nvec3 p \x3d abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\nreturn c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\nvec4 overlay(float val, float minValue, float maxValue, float hillshade, float alpha) {\nfloat clrIndex \x3d clamp((val - minValue) / (maxValue - minValue), 0.0, 1.0);\nvec4 rgb \x3d texture2D(u_image1, vec2(clrIndex, 0.0));\nvec3 hsv \x3d rgb2hsv(rgb.xyz);\nhsv.z \x3d hillshade;\nreturn vec4(hsv2rgb(hsv) * alpha, alpha);\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\nvec4 va, vb, vc, vd, ve, vf, vg, vh, vi;\nvec2 axy \x3d vec2(-1.0, -1.0);\nvec2 bxy \x3d vec2(0.0, -1.0);\nvec2 cxy \x3d vec2(1.0, -1.0);\nvec2 dxy \x3d vec2(-1.0, 0.0);\nvec2 fxy \x3d vec2(1.0, 0.0);\nvec2 gxy \x3d vec2(-1.0, 1.0);\nvec2 hxy \x3d vec2(0.0, 1.0);\nvec2 ixy \x3d vec2(1.0, 1.0);\nif (v_texCoord.s \x3c u_resolution.s) {\naxy[0] \x3d 1.0;\ndxy[0] \x3d 1.0;\ngxy[0] \x3d 1.0;\n}\nif (v_texCoord.t \x3c u_resolution.t) {\naxy[1] \x3d 1.0;\nbxy[1] \x3d 1.0;\ncxy[1] \x3d 1.0;\n}\nif (v_texCoord.s \x3e 1.0 - u_resolution.s) {\ncxy[0] \x3d -1.0;\nfxy[0] \x3d -1.0;\nixy[0] \x3d -1.0;\n}\nif (v_texCoord.t \x3e 1.0 - u_resolution.t) {\ngxy[1] \x3d -1.0;\nhxy[1] \x3d -1.0;\nixy[1] \x3d -1.0;\n}\nva \x3d texture2D(u_image, v_texCoord + u_resolution * axy);\nvb \x3d texture2D(u_image, v_texCoord + u_resolution * bxy);\nvc \x3d texture2D(u_image, v_texCoord + u_resolution * cxy);\nvd \x3d texture2D(u_image, v_texCoord + u_resolution * dxy);\nve \x3d texture2D(u_image, v_texCoord + u_resolution * vec2(0, 0));\nvf \x3d texture2D(u_image, v_texCoord + u_resolution * fxy);\nvg \x3d texture2D(u_image, v_texCoord + u_resolution * gxy);\nvh \x3d texture2D(u_image, v_texCoord + u_resolution * hxy);\nvi \x3d texture2D(u_image, v_texCoord + u_resolution * ixy);\nfloat alpha \x3d getNeighborHoodAlpha(va.a, vb.a, vc.a, vd.a, ve.a, vf.a, vg.a, vh.a, vi.a);\nfloat dzx \x3d (vc + 2.0 * vf + vi - va - 2.0 * vd - vg).r * u_xFactor;\nfloat dzy \x3d (vg + 2.0 * vh + vi - va - 2.0 * vb - vc).r * u_yFactor; //flip\nfloat s2 \x3d sqrt(1.0 + dzx * dzx + dzy * dzy);\nfloat hillshade \x3d 0.0;\nif (u_hillshadeType \x3d\x3d 0){\nfloat cosDelta \x3d u_sinZsinA * dzy - u_sinZcosA * dzx;\nfloat z \x3d (u_cosZ + cosDelta) / s2;\nif (z \x3c 0.0)  z \x3d 0.0;\nhillshade \x3d z;\n}\nelse if (u_hillshadeType \x3d\x3d 1){\nfor (int k \x3d 0; k \x3c 6; k++) {\nfloat cosDelta \x3d u_sinZsinAs[k] * dzy - u_sinZcosAs[k] * dzx;\nfloat z \x3d (u_cosZs[k] + cosDelta) / s2;\nif (z \x3c 0.0) z \x3d 0.0;\nhillshade \x3d hillshade + z * u_weights[k];\nif (k \x3d\x3d u_lightSourceCount-1) break;\n}\n}\nif (u_applyColorramp) {\nvec4 result \x3d overlay(ve.r, u_minValue, u_maxValue, hillshade, alpha);\nif (u_scaled) {\nresult \x3d vec4(result.rgb * 255.0, result.a);\n}\ngl_FragColor \x3d result;\n} else {\nif (u_scaled) {\nhillshade \x3d hillshade * 255.0;\nif (hillshade\x3e 255.0) {\nhillshade \x3d 255.0;\n}\n}\ngl_FragColor \x3d vec4(hillshade, hillshade, hillshade, alpha);\n}\n}",
identity:"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texCoord;\nuniform int u_bandCount;\nfloat shift_right(float v, float amt) {\nv \x3d floor(v) + 0.5;\nreturn floor(v / exp2(amt));\n}\nfloat shift_left(float v, float amt) {\nreturn floor(v * exp2(amt) + 0.5);\n}\nfloat mask_last(float v, float bits) {\nreturn mod(v, shift_left(1.0, bits));\n}\nfloat extract_bits(float num, float from, float to) {\nfrom \x3d floor(from + 0.5);\nto \x3d floor(to + 0.5);\nreturn mask_last(shift_right(num, from), to - from);\n}\nvec4 encode_float(float val) {\nif (val \x3d\x3d 0.0)\nreturn vec4(0, 0, 0, 0);\nfloat sign \x3d val \x3e 0.0 ? 0.0 : 1.0;\nval \x3d abs(val);\nfloat exponent \x3d floor(log2(val));\nfloat biased_exponent \x3d exponent + 127.0;\nfloat fraction \x3d ((val / exp2(exponent)) - 1.0) * 8388608.0;\nfloat t \x3d biased_exponent / 2.0;\nfloat last_bit_of_biased_exponent \x3d fract(t) * 2.0;\nfloat remaining_bits_of_biased_exponent \x3d floor(t);\nfloat byte4 \x3d extract_bits(fraction, 0.0, 8.0) / 255.0;\nfloat byte3 \x3d extract_bits(fraction, 8.0, 16.0) / 255.0;\nfloat byte2 \x3d (last_bit_of_biased_exponent * 128.0 + extract_bits(fraction, 16.0, 23.0)) / 255.0;\nfloat byte1 \x3d (sign * 128.0 + remaining_bits_of_biased_exponent) / 255.0;\nreturn vec4(byte4, byte3, byte2, byte1);\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\nvec4 currentPixel \x3d  texture2D(u_image, v_texCoord);\ngl_FragColor \x3d vec4( currentPixel.rgb, currentPixel.a); //encode_float(currentPixel.r);\n}",
local:"precision mediump float;\nuniform sampler2D u_image;\nuniform sampler2D u_image1;\nuniform sampler2D u_image2;\nvarying vec2 v_texCoord;\nuniform int u_rasterCount;\nvec4 polyfill;\nvec4 localOp1() {\nvec4 a \x3d texture2D(u_image, v_texCoord);\nvec4 result;\nvec4 replaceme1;\nreturn result;\n}\nvec4 localOp2() {\nvec4 a \x3d texture2D(u_image, v_texCoord);\nvec4 b \x3d texture2D(u_image1, v_texCoord);\nvec4 result;\nvec4 replaceme2;\nreturn result;\n}\nvec4 localOp3() {\nvec4 a \x3d texture2D(u_image, v_texCoord);\nvec4 b \x3d texture2D(u_image1, v_texCoord);\nvec4 c \x3d texture2D(u_image2, v_texCoord);\nvec4 result;\nvec4 replaceme3;\nreturn result;\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\ngl_FragColor \x3d localOp1();\n}",
local0:"precision mediump float;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_texCoord;\nuniform float u_minCutOff[3];\nuniform float u_maxCutOff[3];\nuniform float u_minOutput[3];\nuniform float u_maxOutput[3];\nuniform float u_factor[3];\nuniform int u_operation;\nuniform int u_constant[3];\nuniform vec4 gamma;\nfloat localOperate1(float a, float b, float c){\nfloat result;\nif (u_operation \x3d\x3d 1){\nresult \x3d a + b;\n}\nelse if (u_operation \x3d\x3d 2){\nresult \x3d a - b;\n}\nelse if (u_operation \x3d\x3d3){\nresult \x3d a * b;\n}\nelse if (u_operation \x3d\x3d4){\nresult \x3d sqrt(a);\n}\nelse if (u_operation \x3d\x3d5){\nresult \x3d pow(a, b);\n}\nelse if (u_operation \x3d\x3d6){\nresult \x3d acos(a);\n}\nelse if (u_operation \x3d\x3d7){\nresult \x3d asin(a);\n}\nelse if (u_operation \x3d\x3d8){\nresult \x3d atan(a);\n}\nelse if (u_operation \x3d\x3d9){\nresult \x3d 999.0; //atanh not available\n}\nelse if (u_operation \x3d\x3d10){\nresult \x3d abs(a);\n}\nelse if (u_operation \x3d\x3d13){\nresult \x3d 999.0; //bitwise not available\n}\nelse if (u_operation \x3d\x3d17){\nresult \x3d a !\x3d 0.0 \x26\x26 b !\x3d0.0;\n}\nelse if (u_operation \x3d\x3d18){\nresult \x3d a \x3d\x3d0.0? 1.0:0.0;\n}\nelse if (u_operation \x3d\x3d19){\nresult \x3d a !\x3d 0.0 || b !\x3d0.0;\n}\nelse if (u_operation \x3d\x3d20){\nresult \x3d a !\x3d 0.0 ^^ b !\x3d0.0; //exclusive or\n}\nelse if (u_operation \x3d\x3d21){\nresult \x3d cos(a);\n}\nelse if (u_operation \x3d\x3d23){\nresult \x3d a / b;\n}\nelse if (u_operation \x3d\x3d24){\nresult \x3d a \x3d\x3d b ? 1.0:0.0;\n}\nelse if (u_operation \x3d\x3d25){\nresult \x3d exp(a);\n}\nelse if (u_operation \x3d\x3d26){\nresult \x3d pow(10.0, a);\n}\nelse if (u_operation \x3d\x3d27){\nresult \x3d exp2(a);\n}\nelse if (u_operation \x3d\x3d28){\nresult \x3d a \x3e b? 1.0 : 0.0;\n}\nelse if (u_operation \x3d\x3d29){\nresult \x3d  a \x3e\x3d b? 1.0 : 0.0;\n}\nelse if (u_operation \x3d\x3d30){\nresult \x3d floor(a); //int\n}\nelse if (u_operation \x3d\x3d31){\nresult \x3d a \x3d\x3d0? 1.0:0.0; //null pass mask\n}\nelse if (u_operation \x3d\x3d32){\nresult \x3d a; //float\n}\nelse if (u_operation \x3d\x3d33){\nresult \x3d a \x3c b? 1.0 : 0.0;\n}\nelse if (u_operation \x3d\x3d34){\nresult \x3d a \x3c\x3d b? 1.0 : 0.0;\n}\nelse if (u_operation \x3d\x3d35){\nresult \x3d log(a);\n}\nelse if (u_operation \x3d\x3d36){\nresult \x3d log2(a) / log2(10.0);\n}\nelse if (u_operation \x3d\x3d37){\nresult \x3d log2(a);\n}\nelse if (u_operation \x3d\x3d44){\nresult \x3d mod(a, b);\n}\nelse if (u_operation \x3d\x3d45){\nresult \x3d -a;\n}\nelse if (u_operation \x3d\x3d46){\nresult \x3d a !\x3d b? 1.0 : 0.0;\n}\nelse if (u_operation \x3d\x3d48){\nresult \x3d ceil(a);\n}\nelse if (u_operation \x3d\x3d49){\nresult \x3d floor(a);\n}\nelse if (u_operation \x3d\x3d51){\nresult \x3d sin(a);\n}\nelse if (u_operation \x3d\x3d53){\nresult \x3d a * a;\n}\nelse if (u_operation \x3d\x3d56){\nresult \x3d tan(a);\n}\nelse if (u_operation \x3d\x3d57){\nresult \x3d 999.0; //tanh not available\n}\nelse if (u_operation \x3d\x3d59){\nresult \x3d 999.0; //acosh not available\n}\nelse if (u_operation \x3d\x3d60){\nresult \x3d 999.0; //asinh not available\n}\nelse if (u_operation \x3d\x3d61){\nresult \x3d atan(a, b);\n}\nelse if (u_operation \x3d\x3d64){\nresult \x3d a / b;\n}\nelse if (u_operation \x3d\x3d65){\nresult \x3d floor(a/b);\n}\nelse if (u_operation \x3d\x3d76){\nresult \x3d a !\x3d0? b:c;\n}\n}\nvoid main() {\nvec4 currentPixel0 \x3d  texture2D(u_image0, v_texCoord);\nfloat graya, reda, greena, bluea;\nif (u_bandCount \x3d\x3d 1) {\ngraya \x3d stretchOneaue(float(currentPixel.r), u_minCutOff[0], u_maxCutOff[0], u_minOutput[0], u_maxOutput[0], u_factor[0]);\ngl_FragColor \x3d vec4(graya, graya, graya, currentPixel.a);\n}\nelse if (u_bandCount \x3d\x3d 3) {\nreda \x3d stretchOneaue(float(currentPixel.r), u_minCutOff[0], u_maxCutOff[0], u_minOutput[0], u_maxOutput[0], u_factor[0]);\ngreena \x3d stretchOneaue(float(currentPixel.g), u_minCutOff[1], u_maxCutOff[1], u_minOutput[1], u_maxOutput[1], u_factor[1]);\nbluea \x3d stretchOneaue(float(currentPixel.b), u_minCutOff[2], u_maxCutOff[2], u_minOutput[2], u_maxOutput[2], u_factor[2]);\ngl_FragColor \x3d vec4(reda, greena, bluea, currentPixel.a);\n}\n}",
mask:"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texCoord;\nuniform float u_includedRanges[6];\nuniform bool u_includedRanges_specified;\nuniform float u_noDataValues[6];\nuniform bool u_noDataValues_specified;\nuniform int u_noDataInterpretation;\nuniform int u_bandCount;\nvec4 mask() {\nvec4 currentPixel \x3d texture2D(u_image, v_texCoord);\nvec4 processedPixel \x3d currentPixel;\nif (u_includedRanges_specified) {\nif (u_bandCount \x3d\x3d 1) {\nif (currentPixel.r \x3e u_includedRanges[0] \x26\x26 currentPixel.r \x3c u_includedRanges[1])\nprocessedPixel \x3d vec4(currentPixel.rgb, currentPixel.a);\nelse\nprocessedPixel \x3d vec4(currentPixel.rgb, 0);\n} else if (u_bandCount \x3d\x3d 3) {\nif (currentPixel.r \x3e u_includedRanges[0] \x26\x26 currentPixel.r \x3c u_includedRanges[1] \x26\x26 currentPixel.g \x3e u_includedRanges[2] \x26\x26 currentPixel.g \x3c u_includedRanges[3] \x26\x26 currentPixel.b \x3e u_includedRanges[4] \x26\x26 currentPixel.b \x3c u_includedRanges[5])\nprocessedPixel \x3d vec4(currentPixel.rgb, currentPixel.a);\nelse\nprocessedPixel \x3d vec4(currentPixel.rgb, 0);\n}\n}\nif (u_noDataValues_specified) {\nif (u_bandCount \x3d\x3d 1) {\nif (processedPixel.r \x3d\x3d u_noDataValues[0])\nprocessedPixel \x3d vec4(processedPixel.rgb, 0);\nelse\nprocessedPixel \x3d vec4(processedPixel.rgb, processedPixel.a);\n} else if (u_bandCount \x3d\x3d 3) {\nif (u_noDataInterpretation \x3d\x3d1 \x26\x26 processedPixel.r \x3d\x3d u_noDataValues[0] \x26\x26 processedPixel.g \x3d\x3d u_noDataValues[1] \x26\x26 processedPixel.b \x3d\x3d u_noDataValues[2])\nprocessedPixel \x3d vec4(processedPixel.rgb, 0);\nelse if (processedPixel.r \x3d\x3d u_noDataValues[0] || processedPixel.g \x3d\x3d u_noDataValues[1] || processedPixel.b \x3d\x3d u_noDataValues[2])\nprocessedPixel \x3d vec4(processedPixel.rgb, 0);\nelse\nprocessedPixel \x3d vec4(processedPixel.rgb, processedPixel.a);\n}\n}\nreturn processedPixel;\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\ngl_FragColor \x3d mask();\n}",
ndvi:"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texCoord;\nuniform int u_bandId_red;\nuniform int u_bandId_nir;\nuniform bool u_scaled;\nuniform int u_bandCount;\nvec4 calculateNDVI(){\nvec4 currentPixel \x3d texture2D(u_image, v_texCoord);\nfloat red \x3d float(u_bandId_red \x3d\x3d 0 ? currentPixel.r : (u_bandId_red \x3d\x3d 1 ? currentPixel.g : currentPixel.b));\nfloat nir \x3d float(u_bandId_nir \x3d\x3d 0 ? currentPixel.r : (u_bandId_nir \x3d\x3d 1 ? currentPixel.g : currentPixel.b));\nfloat ndvi_denom \x3d nir + red;\nfloat ndvi;\nif (ndvi_denom \x3d\x3d 0.0) {\nndvi \x3d 0.0;\n}\nelse {\nndvi \x3d (nir - red) / ndvi_denom;\nif (u_scaled) {\nndvi \x3d float(floor(ndvi * 100.0 + 100.5));\n}\n}\nreturn vec4(ndvi, ndvi, ndvi, currentPixel.a);\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\ngl_FragColor \x3d calculateNDVI();\n}",
remap:"precision mediump float;\nuniform sampler2D u_image;\nuniform sampler2D u_image1;\nvarying vec2 v_texCoord;\nuniform float u_indexedColormapOffset;\nuniform float u_indexedColormapMaxIndex;\nuniform float u_breaks[16];\nuniform vec2 u_rawResolution;\nuniform int u_resampling;\nvec4 getPixelValue(vec2 coords) {\nif (u_resampling \x3d\x3d 0) {\nreturn texture2D(u_image, coords);\n}\nvec2 pos_ul \x3d floor(coords / u_rawResolution) * u_rawResolution;\nvec2 pos_ur \x3d pos_ul + vec2(1.0, 0.0) * u_rawResolution;\nvec2 pos_ll \x3d pos_ul + vec2(0.0, 1.0) * u_rawResolution;\nvec2 pos_lr \x3d pos_ul + vec2(1.0, 1.0) * u_rawResolution;\nvec2 weight \x3d fract(coords / u_rawResolution);\nvec4 vp_ul \x3d texture2D(u_image, pos_ul);\nvec4 vp_ur \x3d texture2D(u_image, pos_ur);\nvec4 vp_ll \x3d texture2D(u_image, pos_ll);\nvec4 vp_lr \x3d texture2D(u_image, pos_lr);\nvec4 vp \x3d mix(mix(vp_ul, vp_ur, weight.x), mix(vp_ll, vp_lr, weight.x), weight.y);\nreturn vp;\n}\nfloat getRemapIndex(float pixelValue) {\nif (pixelValue \x3c u_breaks[0] || pixelValue \x3e u_breaks[15]) {\nreturn -1.0;\n}\nfor (int i \x3d 0; i \x3c 16; i++) {\nif (pixelValue \x3c u_breaks[i]) {\nreturn float(i - 1);\n}\n}\nif (pixelValue \x3d\x3d u_breaks[15]) {\nreturn 15.0;\n}\nreturn 0.0;\n}\nvec4 colorize(float pv) {\nfloat clrIndex \x3d pv - u_indexedColormapOffset;\nvec4 result;\nif (clrIndex \x3e u_indexedColormapMaxIndex) {\nresult \x3d vec4(0.0, 0.0, 0.0, 0.0);\n}\nelse {\nvec2 clrPosition \x3d vec2(clrIndex / u_indexedColormapMaxIndex, 0.0);\nvec4 color \x3d texture2D(u_image1, clrPosition);\nresult \x3d vec4(color.r, color.g, color.b, color.a);\n}\nreturn result;\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\nvec4 currentPixel \x3d texture2D(u_image, v_texCoord);\nif (currentPixel.a \x3d\x3d 0.0) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn;\n}\nfloat remappedIndex \x3d getRemapIndex(currentPixel.r);\nif (remappedIndex \x3c 0.0) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn;\n}\ngl_FragColor \x3d colorize(remappedIndex);\n}",
resample:"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texCoord;\nuniform vec2 u_resamplingRatio;\nuniform int u_resamplingType;\nuniform vec2 u_anchor;\nuniform vec2 u_resolution;\nvec4 resample(){\nvec2 pos_nn, pos_ul, pos_ur, pos_ll, pos_lr, pos_offset;\nfloat weight,weight_total, weight_ul, weight_ur, weight_ll, weight_lr;\nvec4 vp;  //v_texCoord is canvas space 0-1\nvec2 originalResolution \x3d vec2(u_resolution.s*u_resamplingRatio.s, u_resolution.t*u_resamplingRatio.t);\nvec2 pos \x3d vec2(u_anchor.s+(v_texCoord.s-u_anchor.s),(u_anchor.t+(v_texCoord.t-u_anchor.t)));\nif (u_resamplingType \x3d\x3d 0)\n{//shift and scaling, y \x3d ax+b so x \x3d (y-b)/a\npos_nn \x3d vec2(floor(pos.s/originalResolution.s+0.5)*originalResolution.s,floor(pos.t/originalResolution.t+0.5)*originalResolution.t);\nif (pos_nn.s \x3c0.0 || pos_nn.s \x3e 1.0 || pos_nn.t \x3c0.0 || pos_nn.t \x3e 1.0){\nvp \x3d vec4(1.0, 0.0, 0.0, 1.0);//vec4(0.0, 1.0, 0.0, vp.a);\n}\nelse {\nvp \x3d texture2D(u_image, vec2(pos_nn.s, pos_nn.t));\n}\n}\nelse if (u_resamplingType \x3d\x3d 1)\n{//shift and scaling, 4 neighbors y \x3d ax+b so x \x3d (y-b)/a\npos_ul \x3d vec2(floor(pos.s/originalResolution.s)*originalResolution.s,floor(pos.t/originalResolution.t)*originalResolution.t);\npos_ur \x3d vec2(pos_ul.s+originalResolution.s, pos_ul.t);\npos_ll \x3d vec2(pos_ul.s, pos_ul.t+originalResolution.t);\npos_lr \x3d vec2(pos_ul.s+originalResolution.s, pos_ul.t+originalResolution.t);\npos_offset \x3d vec2(pos.s - floor(pos_ul.s),pos.t - floor(pos_ul.t));\nweight_lr \x3d sqrt(pow(pos_offset.s,2.0) + pow(pos_offset.t,2.0));\nweight_ul \x3d sqrt(pow( originalResolution.s- pos_offset.s,2.0)+ pow(originalResolution.t- pos_offset.t,2.0));\nweight_ur \x3d sqrt(pow( pos_offset.s,2.0)+ 1.0- pow(originalResolution.t - pos_offset.t,2.0));\nweight_ll \x3d sqrt(pow( originalResolution.s- pos_offset.s,2.0)+ pow(pos_offset.t,2.0));\nvp \x3d (texture2D(u_image, pos_ul) * weight_ul + texture2D(u_image, pos_ur) * weight_ur + texture2D(u_image, pos_ll) * weight_ll + texture2D(u_image, pos_lr) * weight_lr)/(weight_ul+weight_ur+weight_ll+weight_lr);\n}\nelse if (u_resamplingType \x3d\x3d 2)\n{//shift and scaling, 16 neighbors\nweight_total \x3d 0.0;\nvp \x3d vec4(0.0,0.0,0.0,0.0);\npos_ul \x3d vec2(floor(pos.s/originalResolution.s)*originalResolution.s-originalResolution.s,floor(pos.t/originalResolution.t)*originalResolution.t-originalResolution.t);\npos_offset \x3d vec2(pos.s - floor(pos_ul.s),pos.t - floor(pos_ul.t));\nfor (int i\x3d0; i\x3c4; i++){//row\nfor (int j\x3d0; j\x3c4; j++){//col\nweight \x3d sqrt(pow(pos_offset.s-float(j),2.0)+ pow(pos_offset.t-float(i),2.0));\nvp +\x3dtexture2D(u_image, vec2(pos_ul.s+float(i)*originalResolution.s,pos_ul.t+float(j)*originalResolution.t)) * weight;\nweight_total +\x3d weight;\n}\n}\nvp \x3d vp/weight_total;\n}\nreturn vp;\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\ngl_FragColor \x3d resample();\n}",
slope:"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texCoord;\nuniform vec2 u_resolution;\nuniform vec2 u_cellSize;\nuniform float u_zfactor;\nuniform float u_altitude;\nuniform float u_azimuth;\nfloat shift_right(float v, float amt) {\nv \x3d floor(v) + 0.5;\nreturn floor(v / exp2(amt));\n}\nfloat shift_left(float v, float amt) {\nreturn floor(v * exp2(amt) + 0.5);\n}\nfloat mask_last(float v, float bits) {\nreturn mod(v, shift_left(1.0, bits));\n}\nfloat extract_bits(float num, float from, float to) {\nfrom \x3d floor(from + 0.5);\nto \x3d floor(to + 0.5);\nreturn mask_last(shift_right(num, from), to - from);\n}\nvec4 encode_float(float val) {\nif (val \x3d\x3d 0.0)\nreturn vec4(0, 0, 0, 0);\nfloat sign \x3d val \x3e 0.0 ? 0.0 : 1.0;\nval \x3d abs(val);\nfloat exponent \x3d floor(log2(val));\nfloat biased_exponent \x3d exponent + 127.0;\nfloat fraction \x3d ((val / exp2(exponent)) - 1.0) * 8388608.0;\nfloat t \x3d biased_exponent / 2.0;\nfloat last_bit_of_biased_exponent \x3d fract(t) * 2.0;\nfloat remaining_bits_of_biased_exponent \x3d floor(t);\nfloat byte4 \x3d extract_bits(fraction, 0.0, 8.0) / 255.0;\nfloat byte3 \x3d extract_bits(fraction, 8.0, 16.0) / 255.0;\nfloat byte2 \x3d (last_bit_of_biased_exponent * 128.0 + extract_bits(fraction, 16.0, 23.0)) / 255.0;\nfloat byte1 \x3d (sign * 128.0 + remaining_bits_of_biased_exponent) / 255.0;\nreturn vec4(byte4, byte3, byte2, byte1);\n}\nfloat getNeighborHoodAlpha(float a, float b, float c, float d, float e, float f, float g, float h, float i){\nif (a \x3d\x3d 0.0 || a \x3d\x3d 0.0 || a\x3d\x3d0.0 || a \x3d\x3d 0.0 || a \x3d\x3d 0.0 || a\x3d\x3d0.0 || a \x3d\x3d 0.0 || a \x3d\x3d 0.0 || a\x3d\x3d0.0) {\nreturn 0.0;\n}\nelse {\nreturn e;\n}\n}\nvec4 calculateSlope() {\nfloat pi \x3d 3.141592653589793238;\nfloat dzx \x3d 0.0;\nfloat dzy \x3d 0.0;\nvec4 va,  vb,  vc,  vd,  ve,  vf,  vg,  vh,  vi;\nvec2 axy \x3d vec2(-1.0, -1.0);\nvec2 bxy \x3d vec2(0.0, -1.0);\nvec2 cxy \x3d vec2(1.0, -1.0);\nvec2 dxy \x3d vec2(-1.0, 0.0);\nvec2 fxy \x3d vec2(1.0, 0.0);\nvec2 gxy \x3d vec2(-1.0, 1.0);\nvec2 hxy \x3d vec2(0.0, 1.0);\nvec2 ixy \x3d vec2(1.0, 1.0);\nif (v_texCoord.s \x3c u_resolution.s) {\naxy[0] \x3d 1.0;\ndxy[0] \x3d 1.0;\ngxy[0] \x3d 1.0;\n}\nif (v_texCoord.t \x3c u_resolution.t) {\naxy[1] \x3d 1.0;\nbxy[1] \x3d 1.0;\ncxy[1] \x3d 1.0;\n}\nif (v_texCoord.s \x3e 1.0 - u_resolution.s) {\ncxy[0] \x3d -1.0;\nfxy[0] \x3d -1.0;\nixy[0] \x3d -1.0;\n}\nif (v_texCoord.t \x3e 1.0 - u_resolution.t) {\ngxy[1] \x3d -1.0;\nhxy[1] \x3d -1.0;\nixy[1] \x3d -1.0;\n}\nif (v_texCoord.s \x3e\x3d u_resolution.s \x26\x26 (1.0 - u_resolution.s) \x3e\x3d v_texCoord.s \x26\x26 v_texCoord.t \x3e\x3d u_resolution.t \x26\x26 (1.0 - u_resolution.t) \x3e\x3d v_texCoord.t) {\nva \x3d texture2D(u_image, v_texCoord + u_resolution * axy);\nvb \x3d texture2D(u_image, v_texCoord + u_resolution * bxy);\nvc \x3d texture2D(u_image, v_texCoord + u_resolution * cxy);\nvd \x3d texture2D(u_image, v_texCoord + u_resolution * dxy);\nve \x3d texture2D(u_image, v_texCoord + u_resolution * vec2(0, 0));\nvf \x3d texture2D(u_image, v_texCoord + u_resolution * fxy);\nvg \x3d texture2D(u_image, v_texCoord + u_resolution * gxy);\nvh \x3d texture2D(u_image, v_texCoord + u_resolution * hxy);\nvi \x3d texture2D(u_image, v_texCoord + u_resolution * ixy);\n}\ndzx \x3d (vc + 2.0 * vf + vi - va - 2.0 * vd - vg).r / (8.0 * u_cellSize[0]);\ndzy \x3d -(vg + 2.0 * vh + vi - va - 2.0 * vb - vc).r / (8.0 * u_cellSize[1]);\nfloat alpha \x3d getNeighborHoodAlpha(va.a, vb.a, vc.a, vd.a, ve.a, vf.a, vg.a, vh.a, vi.a);\nfloat slope \x3d atan(u_zfactor * sqrt(dzx * dzx + dzy * dzy)) * 57.2957795;\nreturn vec4(slope, slope, slope, alpha);\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\ngl_FragColor \x3d calculateSlope();\n}",
stretch:"precision mediump float;\nuniform sampler2D u_image;\nuniform sampler2D u_image1;\nuniform sampler2D u_image2;\nvarying vec2 v_texCoord;\nuniform float u_minCutOff[3];\nuniform float u_maxCutOff[3];\nuniform float u_minOutput[3];\nuniform float u_maxOutput[3];\nuniform float u_factor[3];\nuniform int u_bandCount;\nuniform vec2 u_sourceDim;\nuniform vec2 u_targetDim;\nuniform int u_state;\nuniform bool u_minMaxTexture;\nuniform bool u_useGamma;\nuniform float u_gamma[4];\nuniform float u_gammaCorrection[4];\nuniform bool u_scaled;\nuniform vec2 u_rawResolution;\nuniform int u_resampling;\nvec4 getPixelValue(vec2 coords) {\nif (u_resampling \x3d\x3d 0) {\nreturn texture2D(u_image, coords);\n}\nvec2 pos_ul \x3d floor(coords / u_rawResolution) * u_rawResolution;\nvec2 pos_ur \x3d pos_ul + vec2(1.0, 0.0) * u_rawResolution;\nvec2 pos_ll \x3d pos_ul + vec2(0.0, 1.0) * u_rawResolution;\nvec2 pos_lr \x3d pos_ul + vec2(1.0, 1.0) * u_rawResolution;\nvec2 weight \x3d fract(coords / u_rawResolution);\nvec4 vp_ul \x3d texture2D(u_image, pos_ul);\nvec4 vp_ur \x3d texture2D(u_image, pos_ur);\nvec4 vp_ll \x3d texture2D(u_image, pos_ll);\nvec4 vp_lr \x3d texture2D(u_image, pos_lr);\nvec4 vp \x3d mix(mix(vp_ul, vp_ur, weight.x), mix(vp_ll, vp_lr, weight.x), weight.y);\nif (u_bandCount \x3d\x3d 1) {\nfloat alpha \x3d vp_ul.a * vp_ur.a * vp_ll.a * vp_lr.a;\nvec4 vp_nn \x3d texture2D(u_image, coords);\nreturn alpha \x3d\x3d 0.0 ? vp_nn : vec4(vp.rgb, alpha);\n}\nreturn vp;\n}\nvec4 findMin(vec4 p1, vec4 p2) {\nif (p1.a \x3d\x3d 0.0) {\nreturn p2;\n} else if (p2.a \x3d\x3d 0.0) {\nreturn p1;\n} else {\nreturn vec4(min(p1.r, p2.r),min(p1.g, p2.g),min(p1.b, p2.b),p1.a);\n}\n}\nvec4 findMax(vec4 p1, vec4 p2) {\nif (p1.a \x3d\x3d 0.0) {\nreturn p2;\n} else if (p2.a \x3d\x3d 0.0) {\nreturn p1;\n} else {\nreturn vec4(max(p1.r, p2.r),max(p1.g, p2.g),max(p1.b, p2.b),p1.a);\n}\n}\nvec4 findMinMax(vec4 p1, vec4 p2) {\nif (p1.a \x3d\x3d 0.0) {\nreturn p2;\n} else if (p2.a \x3d\x3d 0.0) {\nreturn p1;\n} else {\nreturn vec4(min(p1.r, p2.r), max(p1.g, p2.g), 0.0, p1.a);\n}\n}\nvec4 minMax(int state) {\nvec2 pixelFract \x3d fract(v_texCoord * u_sourceDim);\nfloat xshift \x3d ((pixelFract.s \x3e\x3d 0.5 || pixelFract.s \x3d\x3d 0.0) ? -1.0 : 1.0) / u_sourceDim.s; //take left pixel if \x3e 0.5\nfloat yshift \x3d ((pixelFract.s \x3e\x3d 0.5 || pixelFract.s \x3d\x3d 0.0) ? -1.0 : 1.0) / u_sourceDim.t; //take bottom pixel if \x3e 0.5\nif (u_sourceDim.s \x3d\x3d 1.0) {\nxshift \x3d 0.0;\n}\nif (u_sourceDim.t \x3d\x3d 1.0) {\nyshift \x3d 0.0;\n}\nvec4 p1 \x3d texture2D(u_image, v_texCoord);\nvec4 p2 \x3d texture2D(u_image, v_texCoord + vec2(xshift, 0.0));\nvec4 p3 \x3d texture2D(u_image, v_texCoord + vec2(0.0, yshift));\nvec4 p4 \x3d texture2D(u_image, v_texCoord + vec2(xshift, yshift));\nvec4 pval;\nif (state \x3d\x3d 2) {\npval \x3d findMinMax(findMinMax(p1, p2), findMinMax(p3, p4));\n} else if (state \x3d\x3d 1) {\npval \x3d findMax(findMax(p1, p2), findMax(p3, p4));\n} else if (state \x3d\x3d 0) {\npval \x3d findMin(findMin(p1, p2), findMin(p3, p4));\n}\nreturn pval;\n}\nfloat stretchOneValue(float val, float minCutOff, float maxCutOff, float minOutput, float maxOutput, float factor, bool scaled) {\nfloat stretchedVal;\nif (val \x3e minCutOff \x26\x26 val \x3c maxCutOff) {\nstretchedVal \x3d minOutput + (val - minCutOff) * factor;\n} else if (val \x3e\x3d maxCutOff) {\nstretchedVal \x3d maxOutput;\n} else {\nstretchedVal \x3d minOutput;\n}\nif (scaled) {\nreturn stretchedVal;\n}\nelse {\nreturn stretchedVal / maxOutput; //0-1\n}\n}\nfloat stretchOneValueGamma(float val, float minCutOff, float maxCutOff, float minOutput, float maxOutput, float factor, float gamma, float gammaCorrection, bool scaled) {\nfloat stretchedVal;\nfloat tempf \x3d 1.0;\nfloat outRange \x3d maxOutput - minOutput;\nfloat relativeVal \x3d (val - minCutOff) / (maxCutOff - minCutOff);\nif (val \x3e minCutOff \x26\x26 val \x3c maxCutOff) {\nif (gamma \x3e 1.0) {\ntempf -\x3d pow(1.0 / outRange, relativeVal * gammaCorrection);\n}\nstretchedVal \x3d floor(tempf * outRange * pow(relativeVal, 1.0 / gamma)) + minOutput;\n}\nelse if (val \x3e\x3d maxCutOff) {\nstretchedVal \x3d maxOutput;\n} else {\nstretchedVal \x3d minOutput;\n}\nif (scaled) {\nreturn stretchedVal;\n}\nelse {\nreturn stretchedVal / maxOutput; //0-1\n}\n}\nbool isOutside(){\nif (v_texCoord.t\x3e1.00001 ||v_texCoord.t\x3c-0.00001 || v_texCoord.s\x3e1.00001 ||v_texCoord.s\x3c-0.00001) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn true;\n}\nelse {\nreturn false;\n}\n}\nvoid main() {\nif (isOutside()) {\nreturn;\n}\nif (u_state \x3d\x3d 100) {\nvec4 currentPixel \x3d getPixelValue(v_texCoord);\nfloat grayVal,\nredVal,\ngreenVal,\nblueVal;\nfloat min0,\nmax0,\nmin1,\nmax1,\nmin2,\nmax2,\nfactor0,\nfactor1,\nfactor2;\nvec4 minV, maxV;\nif (u_minMaxTexture) {\nif (u_bandCount \x3d\x3d 1) {\nminV \x3d texture2D(u_image1, v_texCoord);\nmin0 \x3d minV.r;\nmax0 \x3d minV.g;\nfactor0 \x3d (u_maxOutput[0] - u_minOutput[0]) / (max0 - min0);\n} else {\nminV \x3d texture2D(u_image1, v_texCoord);\nmaxV \x3d texture2D(u_image2, v_texCoord);\nmin0 \x3d minV.r;\nmax0 \x3d maxV.r;\nmin1 \x3d minV.g;\nmax1 \x3d maxV.g;\nmin2 \x3d minV.b;\nmax2 \x3d maxV.b;\nfactor0 \x3d (u_maxOutput[0] - u_minOutput[0]) / (max0 - min0);\nfactor1 \x3d (u_maxOutput[1] - u_minOutput[1]) / (max1 - min1);\nfactor2 \x3d (u_maxOutput[2] - u_minOutput[2]) / (max2 - min2);\n}\n} else {\nmin0 \x3d u_minCutOff[0];\nmax0 \x3d u_maxCutOff[0];\nmin1 \x3d u_minCutOff[1];\nmax1 \x3d u_maxCutOff[1];\nmin2 \x3d u_minCutOff[2];\nmax2 \x3d u_maxCutOff[2];\nfactor0 \x3d u_factor[0];\nfactor1 \x3d u_factor[1];\nfactor2 \x3d u_factor[2];\n}\nif (u_useGamma){\nif (u_bandCount \x3d\x3d 1) {\ngrayVal \x3d stretchOneValueGamma(float(currentPixel.r), min0, max0, u_minOutput[0], u_maxOutput[0], factor0, u_gamma[0], u_gammaCorrection[0], u_scaled);\ngl_FragColor \x3d vec4(grayVal, grayVal, grayVal, currentPixel.a);\n} else {\nredVal \x3d stretchOneValueGamma(float(currentPixel.r), min0, max0, u_minOutput[0], u_maxOutput[0], factor0, u_gamma[0], u_gammaCorrection[0], u_scaled);\ngreenVal \x3d stretchOneValueGamma(float(currentPixel.g), min1, max1, u_minOutput[1], u_maxOutput[1], factor1, u_gamma[1], u_gammaCorrection[1], u_scaled);\nblueVal \x3d stretchOneValueGamma(float(currentPixel.b), min2, max2, u_minOutput[2], u_maxOutput[2], factor2, u_gamma[1], u_gammaCorrection[2], u_scaled);\ngl_FragColor \x3d vec4(redVal, greenVal, blueVal, currentPixel.a);\n}\n}\nelse {\nif (u_bandCount \x3d\x3d 1) {\ngrayVal \x3d stretchOneValue(float(currentPixel.r), min0, max0, u_minOutput[0], u_maxOutput[0], factor0, u_scaled);\ngl_FragColor \x3d vec4(grayVal, grayVal, grayVal, currentPixel.a);\n} else {\nredVal \x3d stretchOneValue(float(currentPixel.r), min0, max0, u_minOutput[0], u_maxOutput[0], factor0, u_scaled);\ngreenVal \x3d stretchOneValue(float(currentPixel.g), min1, max1, u_minOutput[1], u_maxOutput[1], factor1, u_scaled);\nblueVal \x3d stretchOneValue(float(currentPixel.b), min2, max2, u_minOutput[2], u_maxOutput[2], factor2, u_scaled);\ngl_FragColor \x3d vec4(redVal, greenVal, blueVal, currentPixel.a);\n}\n}\n} else {\nvec4 currentPixel \x3d minMax(u_state);\ngl_FragColor \x3d currentPixel;\n}\n}"}})},
"esri/layers/rasterLib/function/RasterFunctionWebGLMixin":function(){define("dojo/_base/declare dojo/_base/lang ./RasterFunctionX ./pixelShaders ./vertexShaders ./webglHelper ./convolutionKernel".split(" "),function(H,e,m,n,q,d,c){return H(null,{gl:null,rgbaFloatData:null,originalTexture:null,lastTexture:null,renderTexture:!1,constructor:function(a){this._isProgramInitialized=!1;this.gl=a&&a.gl;a&&a.renderTexture&&(this.renderTexture=a.renderTexture);this._xformSetting=a&&a._xformSetting||{requireProjection:!1,
meshSize:[20,20]}},bindFrameBuffer:function(){var a=this.gl;this._setupPingPongTextures();this._setupBranchingTextures();var b=this._glSetting;this.isBranch?(b.branchIndex=(b.branchIndex+1)%b.branchCount,b=b.branches[b.branchIndex]):(b.pingpongIndex=(b.pingpongIndex+1)%b.pingpong.length,b=b.pingpong[b.pingpongIndex]);a.bindFramebuffer(a.FRAMEBUFFER,b.frameBuffer);a.viewport(0,0,a.drawingBufferWidth,a.drawingBufferHeight);return b},_initializeProgram:function(a){if(this.gl)try{var b=this.gl;b.viewport(0,
0,b.drawingBufferWidth,b.drawingBufferHeight);var h=this._glSetting.programUniforms,g="local"===this.functionName?"local"+this.functionArguments.operation:this.functionName,k=h[g];if(k)this._uniforms=k.uniforms,this.rasterProgram=k.program;else{var f=(this._useMesh=this._tileMode&&this._xformSetting.requireProjection)?q.mesh:q.basic,l=q.getShader(b,a.vertex||f),p=n.getShader(b,a.fragment),r=this._loadProgram(l,p),w={rasterProgram:d.getUniforms(b,r)};h[g]={uniforms:w,program:r};this.rasterProgram=
r;this._uniforms=w}b.useProgram(this.rasterProgram);var u=b.getAttribLocation(this.rasterProgram,"a_texCoord"),B=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,B);var x=d.createMesh(this._xformSetting.meshSize);b.bufferData(b.ARRAY_BUFFER,x,b.STATIC_DRAW);b.enableVertexAttribArray(u);b.vertexAttribPointer(u,2,b.FLOAT,!1,0,0);b.disable(b.DEPTH_TEST);b.blendFunc(b.SRC_ALPHA,b.ZERO);b.disable(b.BLEND);b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,!1);this._shaderInfo=
{fragment:a.fragmentName}}catch(E){console.error("webgl exception: "+E.message)}else console.error("WebGL is required.")},_setUniform:function(a,b,h){null!=b&&(h&&!this._uniforms[h]&&(this._uniforms[h]=d.getUniforms(this.gl,this[h])),h=h?this._uniforms[h]:this._uniforms.rasterProgram,(a=h[a]||h[a+"[0]"])&&d.setUniform(this.gl,a,b))},_setUniforms:function(a,b){var h=Object.keys(a),g,k=h.length;for(g=0;g<k;g++)this._setUniform(h[g],a[h[g]],b);this.rawInput?this._setUniform("u_flipY",!0,b):this._setUniform("u_flipY",
!1,b);this._tileMode?(this.rawInput?(a=this._xformSetting.offset,h=this._xformSetting.scale):(a=[0,0],h=[1,1]),this._setUniform("u_xformOffset",a,b),this._setUniform("u_xformScale",h,b),this._xformSetting.requireProjection&&(this.rawInput?(this._setupXformTexture(),this._setUniform("u_projection",!0,b),this._setUniform("u_transformGridSize",this._xformSetting.gridConfig.size,b),this._setUniform("u_transformSpacing",this._xformSetting.gridConfig.spacing,b),this._setUniform("u_targetImageSize",new Float32Array([this.gl.drawingBufferWidth,
this.gl.drawingBufferHeight]),b)):this._setUniform("u_projection",!1,b))):(a=[0,0],h=[1,1],this._setUniform("u_xformOffset",a,b),this._setUniform("u_xformScale",h,b));this.rawInput&&this._rawResolution&&("RSP_BilinearInterpolation"===this.interpolation||"RSP_CubicConvolution"===this.interpolation)?(this._setUniform("u_resampling",1),this._setUniform("u_rawResolution",this._rawResolution)):this._setUniform("u_resampling",0)},_setupTextureData:function(a,b){if(a.texture)return a;a.raster&&a.raster.pixelBlock&&
(a=a.raster);this.rawInput=!0;var h=b&&b.notOriginal,g=b&&b.bandIDs;b&&b.reCreate?b=!1:(b=this._tileMode?!this._xformSetting.hasNewTexture:!this._glSetting.hasNewTexture)&&this._originalBandIDs&&(b=g?this._originalBandIDs.join("")===g.join(""):!1);0<this._glSetting.branchCount&&(b=!1);if(b&&this.originalTexture)return{extent:a.extent,texture:this.originalTexture};b=this._createTexture();h||(this.originalTexture=b,this._originalBandIDs=g);h=this.gl;var k=a.pixelBlock;this._rawResolution=k?[1/a.pixelBlock.width,
1/a.pixelBlock.height]:[1/this.gl.drawingBufferWidth,1/this.gl.drawingBufferHeight];var f=0;g&&0<g.length&&k&&(f=Math.max.apply(null,g),k.pixels.length>f&&g&&(k.pixels=g.map(function(p){return k.pixels[p]}),k.statistics&&(k.statistics=g.map(function(p){return k.statistics[p]}))));g=k.width;f=k.height;h.getExtension("OES_texture_float");var l=k.getAsRGBAFloat();h.texImage2D(h.TEXTURE_2D,0,h.RGBA,g,f,0,h.RGBA,h.FLOAT,l);return{extent:a.extent,texture:b}},_setupPingPongTextures:function(){var a=this._glSetting;
if(!a||!a.pingpong){a.pingpong=[];var b=d.createBufferTexture(this.gl,!1);a.pingpong.push(b);b=d.createBufferTexture(this.gl,!1);a.pingpong.push(b);a.pingpongIndex=1}},_setupBranchingTextures:function(){var a=this._glSetting;if(!a||!a.branches){a.branches=[];var b=0,h=a.branchCount;if(0<h){for(b=0;b<h;b++){var g=d.createBufferTexture(this.gl,!1);a.branches.push(g)}a.branchIndex=h-1}}},_setupXformTexture:function(a){for(var b=this._createTexture(),h=this.gl,g=4*this._xformSetting.gridConfig.size[0],
k=this._xformSetting.gridConfig.size[1],f=new Float32Array(g*k*4),l=0,p=0;p<this._xformSetting.gridConfig.coefficients.length;p++)f[l++]=this._xformSetting.gridConfig.coefficients[p],2===p%3&&(f[l++]=1);h.getExtension("OES_texture_float");h.texImage2D(h.TEXTURE_2D,0,h.RGBA,g,k,0,h.RGBA,h.FLOAT,f);this._bindTexture(b,"u_transformGrid",a)},_createTexture:function(a){return d.createTexture(this.gl,a)},_bindTexture:function(a,b,h){b=b||"u_image";h=this._uniforms[h||"rasterProgram"];var g=this._getTextureIndex(b);
if(-1!==g){var k=this.gl;k.uniform1i(h[b].location,g);k.activeTexture(k.TEXTURE0+g);k.bindTexture(k.TEXTURE_2D,a)}},_getTextureIndex:function(a,b){b=this._uniforms[b||"rasterProgram"];if(!b||!b[a]||b[a].info.type!==this.gl.SAMPLER_2D)return-1;if("u_transformGrid"===a)return 0;a="u_image"===a?0:parseInt(a.replace("u_image",""));return this._xformSetting.requireProjection?a+1:a},_drawGL:function(a){var b=this.gl;this.renderTexture?(b.enable(b.BLEND),b.bindFramebuffer(b.FRAMEBUFFER,null)):b.disable(b.BLEND);
a||b.viewport(0,0,b.drawingBufferWidth,b.drawingBufferHeight);a=this._xformSetting.meshSize||[1,1];b.drawArrays(b.TRIANGLES,0,a[0]*a[1]*6);this._drawMesh()},_drawMesh:function(){if(this.renderTexture&&this._glSetting.drawMesh){this.meshProgram=this.meshProgram||this._setupMeshProgram();var a=this.gl;a.useProgram(this.meshProgram);a.bindFramebuffer(a.FRAMEBUFFER,null);var b=a.getAttribLocation(this.meshProgram,"a_texCoord"),h=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,h);h=this._xformSetting.meshSize||
[1,1];var g=d.createMesh(h,!0);a.bufferData(a.ARRAY_BUFFER,g,a.STATIC_DRAW);a.enableVertexAttribArray(b);a.vertexAttribPointer(b,2,a.FLOAT,!1,0,0);a.disable(a.DEPTH_TEST);a.blendFunc(a.ONE,a.ZERO);this._setUniforms({u_color:[0,0,1,1],u_drawMeshLines:!0},"meshProgram");a.drawArrays(a.LINES,0,h[0]*h[1]*10)}},_setupMeshProgram:function(){var a=q.getShader(this.gl,q.mesh),b=n.getShader(this.gl,n.constant);return this._loadProgram(a,b)},_loadProgram:function(a,b){return d.loadProgram(this.gl,a,b)},_getShaderScript:function(a,
b){b=document.getElementById(b);if(!b)return null;a="";for(b=b.firstChild;b;)3==b.nodeType&&(a+=b.textContent),b=b.nextSibling;return a}})})},"esri/layers/rasterLib/function/vertexShaders":function(){define(["dojo/_base/declare","dojo/_base/lang","./vertexShaderScripts"],function(H,e,m){H={shaderType:"vertex",getShader:function(n,q){var d=n.createShader(n.VERTEX_SHADER);n.shaderSource(d,q);n.compileShader(d);n.getShaderParameter(d,n.COMPILE_STATUS)||(d=null);return d}};e.mixin(H,m);return H})},"esri/layers/rasterLib/function/vertexShaderScripts":function(){define([],
function(){return{basic:"varying vec2 v_texCoord;\nattribute vec2 a_texCoord;\nuniform vec2 u_xformOffset;\nuniform vec2 u_xformScale;\nuniform bool u_flipY;\nvoid main() {\nv_texCoord \x3d u_xformOffset + a_texCoord * u_xformScale;\nif (u_flipY) {\nv_texCoord.t \x3d 1.0 - v_texCoord.t;\n}\nvec2 position \x3d a_texCoord * 2.0 - 1.0;\ngl_Position \x3d vec4(position, 0.0, 1.0);\n}",histogram:"attribute float a_pixelIndex;\nuniform sampler2D u_image;\nuniform sampler2D u_image1;\nuniform sampler2D u_image2;\nuniform vec2 u_sourceDim;\nuniform vec2 u_halfPixel;\nuniform vec4 u_bandSelection;\nuniform vec4 u_mins;\nuniform vec4 u_factors;\nuniform float u_size;\nuniform int u_bandCount;\nuniform bool u_minMaxTexture;\nvoid main() {\nfloat row \x3d a_pixelIndex/u_sourceDim.s;\nvec2 coord \x3d vec2(fract(row), floor(row)/u_sourceDim.t);\nvec4 pv \x3d texture2D(u_image, coord + u_halfPixel);\nvec4 minVal, maxVal, pvm;\nif (u_minMaxTexture){\nif (u_bandCount \x3d\x3d1){ //min \x3d red, max \x3d green\nvec4 minmax \x3d texture2D(u_image1, vec2(0.5,0.5));\nminVal \x3d vec4(minmax.r, minmax.r, minmax.r, 0.0);\nmaxVal \x3d vec4(minmax.g, minmax.g, minmax.g, 0.0);\n}\nelse if (u_bandCount \x3d\x3d3){ //min \x3d red, max \x3d green\nminVal \x3d texture2D(u_image1, vec2(0.5,0.5));\nmaxVal \x3d texture2D(u_image2, vec2(0.5,0.5));\n}\nvec4 factors \x3d u_size/(maxVal-minVal+vec4(0.0,0.0,0.0,1.0)) * u_factors;\npvm \x3d (pv - minVal) * factors;\n}\nelse {\npvm \x3d (pv - u_mins) * u_factors;\n}\nfloat histVal \x3d min(floor(pvm.r+pvm.g+pvm.b), u_size-1.0);\nhistVal \x3d pv.a \x3d\x3d 1.0? histVal: u_size;\ngl_Position \x3d vec4((histVal+0.1) / (u_size+1.0) * 2.0 - 1.0, 0.5, 0, 1);\ngl_PointSize \x3d 1.0;\n}",
mesh:"varying vec2 v_texCoord;\nattribute vec2 a_texCoord;\nuniform bool u_drawMeshLines;\nuniform bool u_flipY;\nuniform vec2 u_xformOffset;\nuniform vec2 u_xformScale;\nuniform sampler2D u_transformGrid;\nuniform vec2 u_transformSpacing;\nuniform vec2 u_transformGridSize;\nuniform vec2 u_targetImageSize;\nuniform vec2 u_srcImageSize;\nuniform bool u_projection;\nvec2 projectPixelLocation(vec2 coords) {\nvec2 index_image \x3d floor(coords * u_targetImageSize);\nvec2 oneTransformPixel \x3d vec2(0.25 / u_transformGridSize.s, 1.0 / u_transformGridSize.t);\nvec2 index_transform \x3d floor(index_image / u_transformSpacing) / u_transformGridSize;\nvec2 pos \x3d fract((index_image + vec2(0.5, 0.5)) / u_transformSpacing);\nvec2 srcLocation;\nvec2 transform_location \x3d index_transform + oneTransformPixel * 0.5;\nif (pos.s \x3c\x3d pos.t) {\nvec4 ll_abc \x3d texture2D(u_transformGrid, vec2(transform_location.s, transform_location.t));\nvec4 ll_def \x3d texture2D(u_transformGrid, vec2(transform_location.s + oneTransformPixel.s, transform_location.t));\nsrcLocation.s \x3d dot(ll_abc.rgb, vec3(pos, 1.0));\nsrcLocation.t \x3d dot(ll_def.rgb, vec3(pos, 1.0));\n} else {\nvec4 ur_abc \x3d texture2D(u_transformGrid, vec2(transform_location.s + 2.0 * oneTransformPixel.s, transform_location.t));\nvec4 ur_def \x3d texture2D(u_transformGrid, vec2(transform_location.s + 3.0 * oneTransformPixel.s, transform_location.t));\nsrcLocation.s \x3d dot(ur_abc.rgb, vec3(pos, 1.0));\nsrcLocation.t \x3d dot(ur_def.rgb, vec3(pos, 1.0));\n}\nreturn srcLocation;// + halfPixel;\n}\nvoid main() {\nif (u_projection) {\nv_texCoord \x3d projectPixelLocation(a_texCoord);\n} else {\nv_texCoord \x3d u_xformOffset + a_texCoord * u_xformScale;\n}\nif (u_flipY) {\nv_texCoord.t \x3d 1.0 - v_texCoord.t;\n}\nvec2 position \x3d a_texCoord * 2.0 - 1.0;\nif (u_drawMeshLines){\nvec2 adjustedPos \x3d (v_texCoord - u_xformOffset) / u_xformScale;\ngl_Position \x3d vec4( adjustedPos * 2.0 - 1.0, 0.0, 1.0);\n}\nelse {\ngl_Position \x3d vec4(position, 0.0, 1.0);\n}\n}"}})},
"esri/layers/rasterLib/function/webglHelper":function(){define([],function(){var H={getUniforms:function(e,m){var n=e.getProgramParameter(m,e.ACTIVE_UNIFORMS),q,d,c={};for(q=0;q<n;q++)(d=e.getActiveUniform(m,q))&&(c[d.name]={location:e.getUniformLocation(m,d.name),info:d});return c},setUniform:function(e,m,n){var q=m.info,d=m.location,c=q.type;if(null==n)console.log("uniform "+m.info.name+" has null or undefined value");else switch(c){case e.FLOAT:1<q.size?0===n.length?console.log("uniform "+m.info.name+
" has length 0"):e.uniform1fv(d,n):e.uniform1f(d,n);break;case e.FLOAT_VEC2:if(0===n.length){console.log("uniform "+m.info.name+" has length 0");break}e.uniform2fv(d,n);break;case e.FLOAT_VEC3:if(0===n.length){console.log("uniform "+m.info.name+" has length 0");break}e.uniform3fv(d,n);break;case e.FLOAT_VEC4:if(0===n.length){console.log("uniform "+m.info.name+" has length 0");break}e.uniform4fv(d,n);break;case e.INT:case e.BOOL:1<q.size?0===n.length?console.log("uniform "+m.info.name+" has length 0"):
e.uniform1iv(d,n):e.uniform1i(d,n);break;case e.INT_VEC2:case e.BOOL_VEC2:if(0===n.length){console.log("uniform "+m.info.name+" has length 0");break}e.uniform2iv(d,n);break;case e.INT_VEC3:case e.BOOL_VEC3:if(0===n.length){console.log("uniform "+m.info.name+" has length 0");break}e.uniform3iv(d,n);break;case e.INT_VEC4:case e.BOOL_VEC4:0===n.length?console.log("uniform "+m.info.name+" has length 0"):e.uniform4iv(d,n)}},createTexture:function(e,m){var n=e.createTexture();e.bindTexture(e.TEXTURE_2D,
n);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,m?e.LINEAR:e.NEAREST);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,m?e.LINEAR:e.NEAREST);return n},createBufferTexture:function(e,m,n){m=H.createTexture(e,m);e.getExtension("OES_texture_float");n=n||[e.drawingBufferWidth,e.drawingBufferHeight];e.texImage2D(e.TEXTURE_2D,0,e.RGBA,n[0],n[1],0,e.RGBA,e.FLOAT,null);n=e.createFramebuffer();
e.bindFramebuffer(e.FRAMEBUFFER,n);e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,m,0);return{texture:m,frameBuffer:n}},getShader:function(e,m,n){n=n?e.createShader(e.VERTEX_SHADER):e.createShader(e.FRAGMENT_SHADER);e.shaderSource(n,m);e.compileShader(n);e.getShaderParameter(n,e.COMPILE_STATUS)||(console.log(e.getShaderInfoLog(n)),n=null);return n},loadProgram:function(e,m,n){var q=e.createProgram();e.attachShader(q,m);e.attachShader(q,n);e.linkProgram(q);e.getProgramParameter(q,
e.LINK_STATUS)||(console.warn("failed to load webgl program: "+e.getProgramInfoLog(q)),e.deleteProgram(q),q=null);return q},createMesh:function(e,m){if(!e||1===e[0]&&1===e[1])return new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]);var n=e&&m?new Float32Array(e[0]*e[1]*20):new Float32Array(e[0]*e[1]*12);var q=.9998/e[1],d=.9998/e[0],c,a,b=0;for(c=0;c<e[1];c++)for(a=0;a<e[0];a++){var h=1E-4+q*c;var g=1E-4+d*a;e&&!m?(n[b++]=h,n[b++]=g,n[b++]=h+q,n[b++]=g,n[b++]=h,n[b++]=g+d,n[b++]=h,n[b++]=g+d,n[b++]=h+q,
n[b++]=g,n[b++]=h+q,n[b++]=g+d):(n[b++]=h,n[b++]=g,n[b++]=h,n[b++]=g+d,n[b++]=h,n[b++]=g+d,n[b++]=h+q,n[b++]=g+d,n[b++]=h+q,n[b++]=g+d,n[b++]=h+q,n[b++]=g,n[b++]=h,n[b++]=g,n[b++]=h+q,n[b++]=g,n[b++]=h,n[b++]=g+d,n[b++]=h+q,n[b++]=g)}return n}};return H})},"esri/layers/rasterLib/function/convolutionKernel":function(){define([],function(){var H={Default:[0,0,0,0,1,0,0,0,0],LineDetectionHorizontal:[-1,-1,-1,2,2,2,-1,-1,-1],LineDetectionVertical:[-1,2,-1,-1,2,-1,-1,2,-1],LineDetectionLeftDiagonal:[2,
-1,-1,-1,2,-1,-1,-1,2],LineDetectionRightDiagonal:[-1,-1,2,-1,2,-1,2,-1,-1],GradientNorth:[-1,-2,-1,0,0,0,1,2,1],GradientWest:[-1,0,1,-2,0,2,-1,0,1],GradientEast:[1,0,-1,2,0,-2,1,0,-1],GradientSouth:[1,2,1,0,0,0,-1,-2,-1],GradientNorthEast:[0,-1,-2,1,0,-1,2,1,0],GradientNorthWest:[-2,-1,0,-1,0,1,0,1,2],SmoothArithmeticMean:[.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111],Smoothing3x3:[.0625,.125,.0625,.125,.25,.125,.0625,
.125,.0625],Smoothing5x5:[1,1,1,1,1,1,4,4,4,1,1,4,12,4,1,1,4,4,4,1,1,1,1,1,1],Sharpening3x3:[-1,-1,-1,-1,9,-1,-1,-1,-1],Sharpening5x5:[-1,-3,-4,-3,-1,-3,0,6,0,-3,-4,6,21,6,-4,-3,0,6,0,-3,-1,-3,-4,-3,-1],Laplacian3x3:[0,-1,0,-1,4,-1,0,-1,0],Laplacian5x5:[0,0,-1,0,0,0,-1,-2,-1,0,-1,-2,17,-2,-1,0,-1,-2,-1,0,0,0,-1,0,0],SobelHorizontal:[-1,-2,-1,0,0,0,1,2,1],SobelVertical:[-1,0,1,-2,0,2,-1,0,1],Sharpen:[0,-.25,0,-.25,2,-.25,0,-.25,0],Sharpen2:[-.25,-.25,-.25,-.25,3,-.25,-.25,-.25,-.25],PointSpread:[-.627,
.352,-.627,.352,2.923,.352,-.627,.352,-.627],getKernel:function(e){switch(e){case 0:return H.LineDetectionHorizontal;case 1:return H.LineDetectionVertical;case 2:return H.LineDetectionLeftDiagonal;case 3:return H.LineDetectionRightDiagonal;case 4:return H.GradientNorth;case 5:return H.GradientWest;case 6:return H.GradientEast;case 7:return H.GradientSouth;case 8:return H.GradientNorthEast;case 9:return H.GradientNorthWest;case 10:return H.SmoothArithmeticMean;case 11:return H.Smoothing3x3;case 12:return H.Smoothing5x5;
case 13:return H.Sharpening3x3;case 14:return H.Sharpening5x5;case 15:return H.Laplacian3x3;case 16:return H.Laplacian5x5;case 17:return H.SobelHorizontal;case 18:return H.SobelVertical;case 19:return H.Sharpen;case 20:return H.Sharpen2;case 21:return H.PointSpread;default:return H.Default}}};return H})},"esri/layers/rasterLib/function/surfaceUtils":function(){define(["dojo/_base/lang"],function(H){return{hillshade:function(e,m){if(null!==e&&null!==e.pixelBlock&&null!==e.pixelBlock.pixels){var n=
this._clonePixelBlock(e.pixelBlock),q=m.altitude,d=m.azimuth,c=m.zFactor,a=m.psPower,b=m.psFactor,h=m.hillshadeType,g=m.slopeType,k=m.isGCS;1===h&&(c*=2);m=n.width;var f=n.height,l=n.pixels[0],p=n.mask,r=new Uint8Array(m*f);p&&r.set(p);var w=new Uint8Array(m*f),u=(e.extent.xmax-e.extent.xmin)/m,B=(e.extent.ymax-e.extent.ymin)/f,x=c/(8*u),E=c/(8*B);.001<c&&k&&(x/=111E3,E/=111E3);3===g&&(k?(x=111E3*u,E=111E3*B,x=(c+Math.pow(x,a)*b)/(8*x),E=(c+Math.pow(E,a)*b)/(8*E)):(x=(c+Math.pow(u,a)*b)/(8*u),E=(c+
Math.pow(B,a)*b)/(8*B)));k=(90-q)*Math.PI/180;q=Math.cos(k);var y=(360-d+90)*Math.PI/180;d=Math.sin(k)*Math.cos(y);k=Math.sin(k)*Math.sin(y);c=[];a=[];b=[];u=[315,270,225,360,180,0];var D=[60,60,60,60,60,90];g=[3,5,3,2,1,4];var G=g.reduce(function(aa,ea){return aa+ea});B=g.map(function(aa){return aa/G});if(1===h){var A=u.length;for(g=0;g<A;g++)q=D[g],d=u[g],k=(90-q)*Math.PI/180,q=Math.cos(k),y=(360-d+90)*Math.PI/180,d=Math.sin(k)*Math.cos(y),k=Math.sin(k)*Math.sin(y),c.push(q),a.push(d),b.push(k)}var t=
0;for(g=1;g<f-1;g++)for(D=g*m,u=1;u<m-1;u++)if(p&&!p[D+u])w[D+u]=0;else{y=0;if(p&&(y=p[D-m+u-1]+p[D-m+u]+p[D-m+u+1]+p[D+u-1]+p[D+u+1]+p[D+m+u-1]+p[D+m+u]+p[D+m+u+1],7>y)){w[D+u]=0;r[D+u]=0;continue}if(7===y){var v=p[D-m+u-1]?l[D-m+u-1]:l[D+u];var C=p[D-m+u]?l[D-m+u]:l[D+u];var J=p[D-m+u+1]?l[D-m+u+1]:l[D+u];y=p[D+u-1]?l[D+u-1]:l[D+u];var L=p[D+u+1]?l[D+u+1]:l[D+u];t=p[D+m+u-1]?l[D+m+u-1]:l[D+u];var S=p[D+m+u]?l[D+m+u]:l[D+u];var U=p[D+m+u+1]?l[D+m+u+1]:l[D+u]}else v=l[D-m+u-1],C=l[D-m+u],J=l[D-m+
u+1],y=l[D+u-1],L=l[D+u+1],t=l[D+m+u-1],S=l[D+m+u],U=l[D+m+u+1];y=(J+L+L+U-(v+y+y+t))*x;C=(t+S+S+U-(v+C+C+J))*E;J=Math.sqrt(1+y*y+C*C);t=0;if(0===h)S=k*C-d*y,S=255*(q+S)/J,0>S&&(S=0),t=S;else if(1===h)for(v=0;v<A;v++)S=b[v]*C-a[v]*y,S=255*(c[v]+S)/J,0>S&&(S=0),t+=S*B[v];w[D+u]=t}for(g=0;g<f;g++)w[g*m]=w[g*m+1],w[(g+1)*m-1]=w[(g+1)*m-2];for(g=1;g<m-1;g++)w[g]=w[g+m],w[g+(f-1)*m]=w[g+(f-2)*m];n.pixelType="U8";n.pixels=[w];n.statistics=[{minValue:0,maxValue:255}];p&&(n.mask=r);return{extent:e.extent,
pixelBlock:n}}},slope:function(e,m){if(null!==e&&null!==e.pixelBlock&&null!==e.pixelBlock.pixels){var n=this._clonePixelBlock(e.pixelBlock),q=m.zFactor,d=m.psPower,c=m.psFactor,a=m.slopeType,b=m.isGCS;m=n.width;var h=n.height,g=n.pixels[0],k=n.mask,f=new Uint8Array(m*h);k&&f.set(k);var l=new Float32Array(m*h),p=(e.extent.xmax-e.extent.xmin)/m,r=(e.extent.ymax-e.extent.ymin)/h,w=q/(8*p),u=q/(8*r);1E-4>Math.abs(q-1)&&b&&(w/=111E3,u/=111E3);3===a&&(b?(w=111E3*p,u=111E3*r,w=(q+Math.pow(w,d)*c)/(8*w),
u=(q+Math.pow(u,d)*c)/(8*u)):(w=(q+Math.pow(p,d)*c)/(8*p),u=(q+Math.pow(r,d)*c)/(8*r)));for(q=1;q<h-1;q++)for(c=q*m,d=1;d<m-1;d++)if(k&&!k[c+d])l[c+d]=0;else{r=0;if(k&&(r=k[c-m+d-1]+k[c-m+d]+k[c-m+d+1]+k[c+d-1]+k[c+d+1]+k[c+m+d-1]+k[c+m+d]+k[c+m+d+1],7>r)){l[c+d]=0;f[c+d]=0;continue}if(7===r){r=k[c-m+d-1]?g[c-m+d-1]:g[c+d];b=k[c-m+d]?g[c-m+d]:g[c+d];p=k[c-m+d+1]?g[c-m+d+1]:g[c+d];var B=k[c+d-1]?g[c+d-1]:g[c+d];var x=k[c+d+1]?g[c+d+1]:g[c+d];var E=k[c+m+d-1]?g[c+m+d-1]:g[c+d];var y=k[c+m+d]?g[c+m+
d]:g[c+d];var D=k[c+m+d+1]?g[c+m+d+1]:g[c+d]}else r=g[c-m+d-1],b=g[c-m+d],p=g[c-m+d+1],B=g[c+d-1],x=g[c+d+1],E=g[c+m+d-1],y=g[c+m+d],D=g[c+m+d+1];B=(p+x+x+D-(r+B+B+E))*w;r=(E+y+y+D-(r+b+b+p))*u;r=Math.sqrt(B*B+r*r);l[c+d]=1===a||3===a?57.2957795*Math.atan(r):100*r}for(q=0;q<h;q++)l[q*m]=l[q*m+1],l[(q+1)*m-1]=l[(q+1)*m-2];for(q=1;q<m-1;q++)l[q]=l[q+m],l[q+(h-1)*m]=l[q+(h-2)*m];n.pixelType="F32";n.pixels=[l];n.statistics=[{minValue:0,maxValue:255}];k&&(n.mask=f);return{extent:e.extent,pixelBlock:n}}},
aspect:function(e){if(null!==e&&null!==e.pixelBlock&&null!==e.pixelBlock.pixels){var m=this._clonePixelBlock(e.pixelBlock),n=m.width,q=m.height,d=m.pixels[0],c=m.mask,a=new Uint8Array(n*q);c&&a.set(c);var b=new Float32Array(n*q),h=1/((e.extent.xmax-e.extent.xmin)/n),g=1/((e.extent.ymax-e.extent.ymin)/q),k,f;for(k=1;k<q-1;k++){var l=k*n;for(f=1;f<n-1;f++)if(c&&!c[l+f])b[l+f]=0;else{var p=0;if(c&&(p=c[l-n+f-1]+c[l-n+f]+c[l-n+f+1]+c[l+f-1]+c[l+f+1]+c[l+n+f-1]+c[l+n+f]+c[l+n+f+1],7>p)){b[l+f]=0;a[l+f]=
0;continue}if(7===p){p=c[l-n+f-1]?d[l-n+f-1]:d[l+f];var r=c[l-n+f]?d[l-n+f]:d[l+f];var w=c[l-n+f+1]?d[l-n+f+1]:d[l+f];var u=c[l+f-1]?d[l+f-1]:d[l+f];var B=c[l+f+1]?d[l+f+1]:d[l+f];var x=c[l+n+f-1]?d[l+n+f-1]:d[l+f];var E=c[l+n+f]?d[l+n+f]:d[l+f];var y=c[l+n+f+1]?d[l+n+f+1]:d[l+f]}else p=d[l-n+f-1],r=d[l-n+f],w=d[l-n+f+1],u=d[l+f-1],B=d[l+f+1],x=d[l+n+f-1],E=d[l+n+f],y=d[l+n+f+1];u=(w+B+B+y-(p+u+u+x))*h;p=(x+E+E+y-(p+r+r+w))*g;0===u&&0===p?p=-1:(p=90-57.29578*Math.atan2(p,-u),0>p&&(p+=360),360===p?
p=0:360<p&&(p%=360));b[l+f]=p}}for(k=0;k<q;k++)b[k*n]=b[k*n+1],b[(k+1)*n-1]=b[(k+1)*n-2];for(k=1;k<n-1;k++)b[k]=b[k+n],b[k+(q-1)*n]=b[k+(q-2)*n];m.pixelType="F32";m.pixels=[b];m.statistics={minValue:0,maxValue:360};c&&(m.mask=a);return{extent:e.extent,pixelBlock:m}}},_clonePixelBlock:function(e){return e.clone?e.clone():H.clone(e)}}})},"esri/layers/rasterLib/function/BandArithmeticFunction":function(){define("dojo/_base/declare dojo/_base/lang ./RasterFunctionX ../../PixelBlock ./pixelShaders ./RasterFunctionWebGLMixin ./rasterIndex".split(" "),
function(H,e,m,n,q,d,c){return H([m,d],{declaredClass:"esri.layers.rasterLib.function.BandArithmeticFunction",functionName:"BandArithmetic",supportWebGL:!0,support2D:!0,constructor:function(a){this.functionArguments=this.mixinIgnoreCase({method:1,bandIndexes:"",raster:null},a)},bind:function(a){a=this.getSourceRasterInfo(a);if(!a.raster)return Error("The raster input to band arithmetic function is invalid.");this.rasterInfo=e.mixin(a.raster,{bandCount:8===this.functionArguments.method?a.raster.bandCount:
1,pixelType:this._calculatePixelType(this.pixelType,"F32"),statistics:null,histograms:null});this.rasterInfo.keyProperties=this.rasterInfo.keyProperties||{};this.rasterInfo.keyProperties.DataType="Generic";return!0},read2D:function(a){this._performance.start();a=a.raster;var b=c.calculate(a.pixelBlock,{bandIndexes:this.functionArguments.bandIndexes,method:this.functionArguments.method});this._addPerformanceMetric(this._performance.elapsed());"Unknown"!==this.pixelType&&(b.pixelType=this.pixelType);
return{extent:a.extent,pixelBlock:b}},readGL:function(a){this._performance.start();this._initializeProgram({fragment:q.bandArithmetic,fragmentName:"bandArithmetic"});var b=this.functionArguments.bandIndexes.trim().split(" ").map(function(f){return parseInt(f,10)});this._infraredBandID=b[0]-1;this._visibleBandID=b[1]-1;this._alterBand=2<Math.max(this._infraredBandID,this._visibleBandID)?!0:!1;a=this._setupTextureData(a.raster,this._alterBand&&2==b.length?{bandIDs:[this._infraredBandID,this._visibleBandID,
this._infraredBandID]}:{bandIDs:[b[0]-1,b[1]-1,b[2]-1]});var h=this.bindFrameBuffer(),g=this.functionArguments.method,k=2<b.length?b.slice(2):null;this._alterBand?this._setUniforms({u_method:g,u_bandId_nir:0,u_bandId_red:1,u_constants:k}):this._setUniforms({u_method:g,u_bandId_nir:b[0]-1,u_bandId_red:b[1]-1,u_constants:k});this._bindTexture(a.texture,"u_image");this._drawGL();this._addPerformanceMetric(this._performance.elapsed());return{extent:a.extent,texture:h.texture}}})})},"esri/layers/rasterLib/function/rasterIndex":function(){define(["dojo/_base/lang"],
function(H){return{calculate:function(e,m){if(e&&e.pixels&&e.pixels.length){var n=m&&m.bandIndexes;m=m&&m.method;var q=n.trim().split(" ").map(function(a){return parseInt(a,10)}).filter(function(a){return null!=a});e=this._clonePixelBlock(e);var d=e.pixels,c=e.mask;switch(m){case 1:d=this._calculateNDVI(c,d[q[0]-1],d[q[1]-1]);break;case 2:d=this._calculateSAVI(c,d[q[0]-1],d[q[1]-1],q[2]);break;case 3:d=this._calculateTSAVI(c,d[q[0]-1],d[q[1]-1],q[2],q[3],q[4]);break;case 4:d=this._calculateMSAVI(c,
d[q[0]-1],d[q[1]-1]);break;case 5:d=this._calculateGEMI(c,d[q[0]-1],d[q[1]-1]);break;case 6:d=this._calculatePVI(c,d[q[0]-1],d[q[1]-1],q[2],q[3]);break;case 7:d=this._calculateGVITM(c,d[q[0]-1],d[q[1]-1],d[q[2]-1],d[q[3]-1],d[q[4]-1],d[q[5]-1]);break;case 8:d=this._calculateSultan(c,d[q[0]-1],d[q[1]-1],d[q[2]-1],d[q[3]-1],d[q[4]-1],d[q[5]-1]);break;case 9:d=this._calculateVARI(c,d[q[0]-1],d[q[1]-1],d[q[2]-1]);break;case 0:d=this._calculateUserDefined(c,d,n)}e.pixels=d;e.pixelType="F32";e.calculateStatistics();
return e}},_clonePixelBlock:function(e){return e.clone?e.clone():H.clone(e)},_parseUserDefined:function(e,m){e=e.replace(" ","");0===e.indexOf("-")&&(e="0"+e);0===e.indexOf("+")&&(e=e.slice(1,e.length));e=e.split("");var n=[],q=[],d="+-*/()".split(""),c,a="";for(c=0;c<e.length;c++){var b=e[c];d.some(function(h){return h===b})?(""!==a&&q.push(parseFloat(a)),n.push(b),a=""):"b"===b.toLowerCase()?(c++,a=b.concat(e[c]),q.push(m[parseInt(a[1],10)-1]),a=""):(a=a.concat(b),c===e.length-1&&q.push(parseFloat(a)))}return{ops:n,
nums:q}},_op:function(e,m,n,q){if(n.constructor===Number&&q.constructor===Number)return n+q;var d;if(n.constructor===Number){var c=q.length;var a=n;n=new Float32Array(c);for(d=0;d<c;d++)n[d]=a}else if(c=n.length,q.constructor===Number)for(a=q,q=new Float32Array(c),d=0;d<c;d++)q[d]=a;a=new Float32Array(c);if(null==e)if("+"===m)for(d=0;d<c;d++)a[d]=n[d]+q[d];else if("-"===m)for(d=0;d<c;d++)a[d]=n[d]-q[d];else if("*"===m)for(d=0;d<c;d++)a[d]=n[d]*q[d];else{if("/"===m)for(d=0;d<c;d++)a[d]=n[d]/q[d]}else if("+"===
m)for(d=0;d<c;d++)e[d]&&(a[d]=n[d]+q[d]);else if("-"===m)for(d=0;d<c;d++)e[d]&&(a[d]=n[d]-q[d]);else if("*"===m)for(d=0;d<c;d++)e[d]&&(a[d]=n[d]*q[d]);else if("/"===m)for(d=0;d<c;d++)e[d]&&(a[d]=n[d]/q[d]);return a},_shrinkOp:function(e,m){e.splice(m,1);var n=m=0,q=0;do{for(m=q=n=0;m<e.length;m++)if("("===e[m])n=m;else if(")"===e[m]){q=m;break}q===n+1&&e.splice(n,2)}while(q===n+1);return e},_getPriorityOpIndex:function(e,m){if(1===e.length)return{opIndex:0,numIndex:0};var n=m=0,q=0,d=-1,c=0;for(m=
0;m<e.length;m++)if("("===e[m])n=m;else if(")"===e[m]){q=m;break}var a=0===q?e:e.slice(n+1,q);for(m=0;m<a.length;m++)if("*"===a[m]||"/"===a[m]){d=m;break}if(!(-1<d))for(m=0;m<a.length;m++)if("+"===a[m]||"-"===a[m]){d=m;break}0<q&&(d+=n+1);for(m=0;m<d;m++)"("===e[m]&&c++;return{opIndex:d,numIndex:d-c}},_calculateUserDefined:function(e,m,n){m=this._parseUserDefined(n,m);n=m.ops;for(var q=m.nums,d,c,a;0<n.length&&(m=this._getPriorityOpIndex(n,q),d=n[m.opIndex],c=q[m.numIndex],a=q[m.numIndex+1],d=this._op(e,
d,c,a),1!==n.length);)n=this._shrinkOp(n,m.opIndex),q.splice(m.numIndex,2,d);return[d]},_calculateNDVI:function(e,m,n){var q=n.length,d=new Float32Array(q),c;if(null==e)for(c=0;c<q;c++){var a=n[c];var b=m[c];d[c]=(b-a)/(b+a)}else for(c=0;c<q;c++)e[c]&&(a=n[c],b=m[c],d[c]=(b-a)/(b+a));return[d]},_calculateSAVI:function(e,m,n,q){var d=n.length,c=new Float32Array(d),a;if(null==e)for(a=0;a<d;a++){var b=n[a];var h=m[a];c[a]=(h-b)/(h+b+q)*(1+q)}else for(a=0;a<d;a++)e[a]&&(b=n[a],h=m[a],c[a]=(h-b)/(h+b+
q)*(1+q));return[c]},_calculateTSAVI:function(e,m,n,q,d,c){var a=n.length,b=new Float32Array(a),h=-d*q+c*(1+q*q);if(null==e)for(c=0;c<a;c++){var g=n[c];var k=m[c];b[c]=q*(k-q*g-d)/(d*k+g+h)}else for(c=0;c<a;c++)e[c]&&(g=n[c],k=m[c],b[c]=q*(k-q*g-d)/(d*k+g+h));return[b]},_calculateMSAVI:function(e,m,n){var q=n.length,d=new Float32Array(q),c;if(null==e)for(c=0;c<q;c++){var a=n[c];var b=m[c];d[c]=.5*(2*(b+1)-Math.sqrt(Math.pow(2*b+1,2)-8*(b-a)))}else for(c=0;c<q;c++)e[c]&&(d[c]=.5*(2*(b+1)-Math.sqrt(Math.pow(2*
b+1,2)-8*(b-a))));return[d]},_calculateGEMI:function(e,m,n){var q=n.length,d=new Float32Array(q),c;if(null==e)for(c=0;c<q;c++){var a=n[c];var b=m[c];b=(2*(b*b-a*a)+1.5*b+.5*a)/(b+a+.5);d[c]=b*(1-.25*b)-(a-.125)/(1-a)}else for(c=0;c<q;c++)e[c]&&(a=n[c],b=m[c],b=(2*(b*b-a*a)+1.5*b+.5*a)/(b+a+.5),d[c]=b*(1-.25*b)-(a-.125)/(1-a));return[d]},_calculatePVI:function(e,m,n,q,d){var c=n.length,a=new Float32Array(c),b,h=Math.sqrt(1+q*q);if(null==e)for(b=0;b<c;b++){var g=n[b];var k=m[b];a[b]=(k-q*g-d)/h}else for(b=
0;b<c;b++)e[b]&&(g=n[b],k=m[b],a[b]=(k-q*g-d)/h);return[a]},_calculateGVITM:function(e,m,n,q,d,c,a){var b=m.length,h=new Float32Array(b),g;if(null==e)for(g=0;g<b;g++)h[g]=-.2848*m[g]-.2435*n[g]-.5436*q[g]+.7243*d[g]+.084*c[g]-1.18*a[g];else for(g=0;g<b;g++)e[g]&&(h[g]=-.2848*m[g]-.2435*n[g]-.5436*q[g]+.7243*d[g]+.084*c[g]-1.18*a[g]);return[h]},_calculateSultan:function(e,m,n,q,d,c,a){n=m.length;var b=new Float32Array(n),h=new Float32Array(n),g=new Float32Array(n),k;if(null==e)for(k=0;k<n;k++)b[k]=
c[k]/a[k]*100,h[k]=c[k]/m[k]*100,g[k]=q[k]/d[k]*(c[k]/d[k])*100;else for(k=0;k<n;k++)e[k]&&(b[k]=c[k]/a[k]*100,h[k]=c[k]/m[k]*100,g[k]=q[k]/d[k]*(c[k]/d[k])*100);return[b,h,g]},_calculateVARI:function(e,m,n,q){var d=m.length,c=new Float32Array(d),a;if(null==e)for(a=0;a<d;a++){var b=m[a];var h=n[a];var g=q[a];c[a]=(h-b)/(h+b-g)}else for(a=0;a<d;a++)if(e[a])for(a=0;a<d;a++)b=m[a],h=n[a],g=q[a],c[a]=(h-b)/(h+b-g);return[c]}}})},"esri/layers/rasterLib/function/ColormapFunction":function(){define("dojo/_base/declare dojo/_base/lang ../../../renderers/colorRampGenerator ./RasterFunctionX ./pixelShaders ./RasterFunctionWebGLMixin ./rasterUtils".split(" "),
function(H,e,m,n,q,d,c){return H([n,d],{declaredClass:"esri.layers.rasterLib.function.ColormapFunction",functionName:"Colormap",pixelType:"U8",renderTexture:!1,supportWebGL:!0,support2D:!0,constructor:function(a){this.functionArguments=this.mixinIgnoreCase({colormap:null,colorRampName:null,colorRamp:null,colorMapName:null,raster:null},a);this.invert=a&&a.invert;a=a.colormap||a.Colormap;if(a){if(a.features||a[0].attributes){a=a.features||a;var b=Object.keys(a[0].attributes);var h=b.filter(function(r){return"alpha"===
r.toLowerCase()})[0];var g=b.filter(function(r){return"value"===r.toLowerCase()})[0];var k=b.filter(function(r){return"red"===r.toLowerCase()})[0];var f=b.filter(function(r){return"green"===r.toLowerCase()})[0];var l=b.filter(function(r){return"blue"===r.toLowerCase()})[0];if(!(g&&k&&f&&l))throw"invalid colormap";a=a.map(function(r){return h?[r.attributes[g],r.attributes[k],r.attributes[f],r.attributes[l],r.attributes[h]]:[r.attributes[g],r.attributes[k],r.attributes[f],r.attributes[l]]});var p=1.1>
Math.max.apply(null,a.map(function(r){return r[1]}));b=h&&1.1>Math.max.apply(null,a.map(function(r){return r[4]}));if(p)for(p=0;p<a.length;p++)a[p][1]=Math.round(255*a[p][1]),a[p][2]=Math.round(255*a[p][2]),a[p][3]=Math.round(255*a[p][3]),b&&(a[p][4]=Math.round(255*a[p][4]))}this.functionArguments.colormap=this._sortClr(a)}this._initialize()},bind:function(a){this._initialize();a=this.getSourceRasterInfo(a);if(!a.raster||"F32"===a.raster.pixelType)return Error("The raster input to colormap function is invalid. It must be integer type.");
this.rasterInfo=e.mixin(a.raster,{bandCount:3,pixelType:this._calculatePixelType(this.pixelType,"U8"),statistics:null,histograms:null});this.rasterInfo.keyProperties=this.rasterInfo.keyProperties||{};this.rasterInfo.keyProperties.DataType="Processed";return!0},read2D:function(a){return this._colorize(a.raster)},readGL:function(a){return this._colorizeGL(a.raster)},_colorize:function(a){this._performance.start();var b=c.colorize(a.pixelBlock,{indexedColormap:this._indexedColormap,indexedColormapOffset:this._indexedColormapOffset,
indexed2DColormap:this._indexed2DColormap,alphaSpecified:this._alphaSpecified});this._addPerformanceMetric(this._performance.elapsed());return{extent:a.extent,pixelBlock:b}},_binarySearchClr:function(a,b){for(var h=0,g=a.length-1,k=0,f=0;h<g;)if(k=Math.floor((h+g)/2),f=a[k],f[0]<b)h=k;else if(f[0]>b)g=k;else return f.slice(1);return null},_sortClr:function(a,b){var h,g=[];for(h=0;h<a.length;h++)g.push(a[h]);for(h=0;h<g.length-1;h++){var k=g[h];for(a=h+1;a<g.length;a++)k[0]>g[a][0]&&(k=g[a],g[a]=g[h],
g[h]=k)}if(b)for(h=0;h<g.length/2;h++)k=g[h],g[g.length-1-h]=g[h],g[h]=k;return g},_invertColorRamp:function(a){if(!a)return a;var b={type:a.type};"random"===a.type?b=a:"multipart"===a.type?b.colorRamps=a.colorRamps.map(function(h){return{fromColor:h.toColor,toColor:h.fromColor}}).reverse():(b.fromColor=a.toColor,b.toColor=a.fromColor);return b},_initialize:function(){this._indexedColormapOffset=0;if(this.functionArguments.colormap){var a=c.buildIndexedColormap(this.functionArguments.colormap);this._alphaSpecified=
a&&a.alphaSpecified;this._indexedColormap=a&&a.indexedColormap;this._indexedColormapOffset=a&&a.offset;this._indexedColormap||(this._indexed2DColormap=this._getIndexed2DColormap())}else this.functionArguments.colorRamp?this._indexedColormap="multipart"===this.functionArguments.colorRamp.type?this.invert?m.createMultiPartColorRamp(this._invertColorRamp(this.functionArguments.colorRamp)):m.createMultiPartColorRamp(this.functionArguments.colorRamp):this.invert?m.createAlgorithmicColorRamp(this._invertColorRamp(this.functionArguments.colorRamp)):
m.createAlgorithmicColorRamp(this.functionArguments.colorRamp):this.functionArguments.colormapName&&"random"===this.functionArguments.colormapName.toLowerCase()&&(this._indexedColormap=m.createRandomColorRamp())},_getIndexed2DColormap:function(){var a=this.functionArguments.colormap;if(!a)return null;var b=0;0>a[0][0]&&(b=a[0][0]);var h=[],g=5===a[0].length,k;for(k=0;k<a.length;k++)h[a[k][0]-b]=g?a[k].slice(1):a[k].slice(1).concat([255]);return h},_colorizeGL:function(a){this._performance.start();
this._initializeProgram({fragment:q.colormap,fragmentName:"Colormap"});var b=this._indexedColormap,h=this._indexedColormapOffset;this._clrTexture||(this._clrTexture=this._setupColormapTexture(b));var g=this._clrTexture,k=this.bindFrameBuffer();a=this._setupTextureData(a);this._setUniforms({u_indexedColormapOffset:h,u_indexedColormapMaxIndex:b.length/4-1});this._bindTexture(g,"u_image1");this._bindTexture(a.texture,"u_image");this._drawGL();return{extent:a.extent,texture:k.texture}},_setupColormapTexture:function(a){var b=
this._createTexture(),h=this.gl,g=a.length/4,k=new Float32Array(a.length),f,l=this.renderTexture?255:1;for(f=0;f<a.length;f++)k[f]=a[f]/l;h.getExtension("OES_texture_float");h.texImage2D(h.TEXTURE_2D,0,h.RGBA,g,1,0,h.RGBA,h.FLOAT,k);return b}})})},"esri/renderers/colorRampGenerator":function(){define(["dojo/_base/declare","dojo/_base/lang","../renderers/colorUtils"],function(H,e,m){return{createAlgorithmicColorRamp:function(n,q){if(!n)return null;var d=n.fromColor,c=n.toColor;if(!d||!c)return null;
void 0===d.r&&3<=d.length&&(d={r:d[0],g:d[1],b:d[2]});void 0===c.r&&3<=c.length&&(c={r:c[0],g:c[1],b:c[2]});var a=n.size||256;n=n.algorithm||"cie-lab";if(1===a)var b=[d.r,d.g,d.b,255];else if(2===a)b=[d.r,d.g,d.b,255,c.r,c.g,d.b,255];else if(-1<n.toLowerCase().indexOf("hsv")){b=m.toHSV(d);c=m.toHSV(c);a=a||256;var h=0===b.s,g=0===c.s;d=b.h;n=c.h;h&&!g?d=b.h=n:g&&!h&&(n=c.h=d);h=Math.abs(n-d);180>h?n=(n-d)/(a-1):(h=360-h,n=d>n?h/(a-1):-h/(a-1));h=(c.s-b.s)/(a-1);g=(c.v-b.v)/(a-1);var k=b.s;b=b.v;var f,
l=new Uint8Array(4*a);for(f=0;f<a-1;f++){var p=m.toRGB({h:d,s:k,v:b});l[4*f]=p.r;l[4*f+1]=p.g;l[4*f+2]=p.b;l[4*f+3]=255;d+=n;k+=h;b+=g;360<d?d-=360:0>d&&(d+=360)}p=m.toRGB(c);l[4*(a-1)]=p.r;l[4*(a-1)+1]=p.g;l[4*(a-1)+2]=p.b;l[4*(a-1)+3]=255;b=l}else if(-1<n.toLowerCase().indexOf("lch")){k=m.toLCH(d);c=m.toLCH(c);a=a||256;b=(c.l-k.l)/(a-1);d=(c.c-k.c)/(a-1);n=(c.h-k.h)/(a-1);h=k.l;g=k.c;k=k.h;l=new Uint8Array(4*a);for(f=0;f<a-1;f++)p=m.toRGB({l:h,c:g,h:k}),l[4*f]=p.r,l[4*f+1]=p.g,l[4*f+2]=p.b,l[4*
f+3]=255,h+=b,g+=d,k+=n;p=m.toRGB(c);l[4*(a-1)]=p.r;l[4*(a-1)+1]=p.g;l[4*(a-1)+2]=p.b;l[4*(a-1)+3]=255;b=l}else if(-1<n.toLowerCase().indexOf("lab")){k=m.toLAB(d);c=m.toLAB(c);a=a||256;b=(c.l-k.l)/(a-1);d=(c.a-k.a)/(a-1);n=(c.b-k.b)/(a-1);h=k.l;g=k.a;k=k.b;l=new Uint8Array(4*a);for(f=0;f<a-1;f++)p=m.toRGB({l:h,a:g,b:k}),l[4*f]=p.r,l[4*f+1]=p.g,l[4*f+2]=p.b,l[4*f+3]=255,h+=b,g+=d,k+=n;p=m.toRGB(c);l[4*(a-1)]=p.r;l[4*(a-1)+1]=p.g;l[4*(a-1)+2]=p.b;l[4*(a-1)+3]=255;b=l}if(q&&!1===q.flattened)for(q=b,
b=[],c=0;c<b/4;c++)b[c]=q.slice(4*c,4*c+4);return b},createMultiPartColorRamp:function(n,q){if(!n)return null;q=q&&e.clone(q)||{flattened:!0};var d=n.colorRamps;if(!d||0===d.length)return null;var c=n.size||256;n=Math.max(Math.floor(c/d.length),1);var a=Math.max(n,c-(d.length-1)*n),b=!1!==q.flattened;q.flattened=!0;c=(d.length-1)*n+a;var h=new Uint8Array(4*c);for(c=0;c<d.length;c++){var g={fromColor:d[c].fromColor,toColor:d[c].toColor,size:c===d.length-1?a:n};h instanceof Array?h.concat(this.createAlgorithmicColorRamp(g,
q)):h.set(this.createAlgorithmicColorRamp(g,q),n*c*4)}if(!b)for(q=h,h=[],c=0;c<h/4;c++)h[c]=q.slice(4*c,4*c+4);return h},createRandomColorRamp:function(n){n=n||{};var q=n.size||256,d=!1===n.flattened;var c=d?new Uint8Array(4*q):[];for(n=0;n<q;n++)d?(c[4*n]=Math.round(255*Math.random()),c[4*n+1]=Math.round(255*Math.random()),c[4*n+2]=Math.round(255*Math.random()),c[4*n+3]=255):c[n]=[Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random()),255];return c}}})},"esri/layers/rasterLib/function/rasterUtils":function(){define(["dojo/_base/lang"],
function(H){return{mask:function(e,m){if(e&&e.pixels&&e.pixels.length){e=this._clonePixelBlock(e);var n=m.includedRanges,q=m.noDataInterpretation;m=m.noDataValues;if(null===n&&null===m)return e;var d=e.pixels,c=e.mask,a=e.width*e.height,b=d.length,h;if(null!==m&&m.length!==b)throw"expect "+b+" elements in noDataValues";if(null!==n&&n.length!==2*b)throw"expect "+2*b+" elements in IncludeRanges";if(null==c){c=new Uint8Array(a);for(h=0;h<a;h++)c[h]=1;e.mask=c}if(0===q)for(q=0;q<b;q++){var g=d[q];var k=
null===n?null:n[2*q];var f=null===n?null:n[2*q+1];var l=null===m?null:parseFloat(m[q]);if(null===k||null===f)for(h=0;h<a;h++){if(c[h]){var p=g[h];p===l&&(c[h]=0)}}else if(null===l)for(h=0;h<a;h++)c[h]&&(p=g[h],p<k||p>f)&&(c[h]=0);else for(h=0;h<a;h++)c[h]&&(p=g[h],p<k||p>f||p===l)&&(c[h]=0)}else{var r=new Uint8Array(a);for(h=0;h<a;h++)r[h]=c[h];for(q=0;q<b;q++)if(g=d[q],k=null===n?null:n[2*q],f=null===n?null:n[2*q+1],l=null===m?null:parseFloat(m[q]),null===k||null===f)for(h=0;h<a;h++)r[h]&&(p=g[h],
p!==l&&(r=0));else if(null===l)for(h=0;h<a;h++)r[h]&&(p=g[h],p<=k&&p<=f&&(r=0));else for(h=0;h<a;h++)r[h]&&(p=g[h],p<=k&&p<=f&&p!==l&&(r=0));for(h=0;h<a;h++)c[h]&&r[h]&&(c[h]=0)}return e}},calculateStatisticsHistograms:function(e,m){e=this._clonePixelBlock(e);m=e.pixelType;var n=e.pixels,q=e.mask,d=n.length,c,a,b=[],h;for(c=0;c<d;c++){var g={min:-.5,max:255.5,size:256,counts:new Uint32Array(256)};var k=g.counts;var f=n[c];if("U8"===m)if(q)for(a=0;a<e.width*e.height;a++)q[a]&&k[f[a]]++;else for(a=
0;a<e.width*e.height;a++)k[f[a]]++;else{var l=e.statistics[c].minValue;var p=e.statistics[c].maxValue;g.min=l;g.max=p;p=(p-l)/256;var r=new Uint32Array(257);if(q)for(a=0;a<e.width*e.height;a++)q[a]&&r[Math.floor((f[a]-l)/p)]++;else for(a=0;a<e.width*e.height;a++)r[Math.floor((f[a]-l)/p)]++;for(a=0;255>a;a++)k[a]=r[a];k[255]=r[255]+r[256]}b.push(g);l=e.statistics[c].minValue;p=e.statistics[c].maxValue;for(a=r=h=f=0;a<g.size;a++)f+=k[a],h+=a*k[a];h/=f;for(a=0;a<g.size;a++)r+=k[a]*Math.pow(a-h,2);k=
Math.sqrt(r/(f-1));a=(h+.5)*(g.max-g.min)/g.size+g.min;g=k*(g.max-g.min)/g.size;e.statistics[c]={min:l,minValue:l,max:p,maxValue:p,mean:a,stddev:g}}e.histograms=b;return e},buildIndexedColormap:function(e,m){if(!e)return null;var n=0;0>e[0][0]&&(n=e[0][0]);var q=Math.max(256,e[e.length-1][0]-n);if(65536<q)return null;var d=new Uint8Array(4*q),c=[],a=0,b=5===e[0].length;if(m)for(c=e[a],m=c[0]-n;m<q;m++)d[4*m]=c[1],d[4*m+1]=c[2],d[4*m+2]=c[3],d[4*m+3]=b?c[4]:255,m===c[0]-n&&(c=a===e.length-1?c:e[++a]);
else for(m=0;m<e.length;m++)c=e[m],a=4*(c[0]-n),d[a]=c[1],d[a+1]=c[2],d[a+2]=c[3],d[a+3]=b?c[4]:255;return{indexedColormap:d,offset:n,alphaSpecified:b}},colorize:function(e,m){if(null!==e&&null!==e.pixels){e=this._clonePixelBlock(e);var n=e.pixels,q=e.width*e.height,d=e.mask,c=m.indexedColormap,a=m.indexedColormapOffset,b=c&&c.length-1,h=m.indexed2DColormap;m=m.alphaSpecified;if(3<=n.length)throw"colormap only works on single band image";var g=n[0],k=new Uint8Array(g.length),f=new Uint8Array(g.length),
l=new Uint8Array(g.length),p=0;if(c)if(d)for(n=0;n<q;n++)d[n]&&(p=4*(g[n]-a),p<a||p>b?d[n]=0:(k[n]=c[p],f[n]=c[p+1],l[n]=c[p+2],d[n]=c[p+3]));else{d=new Uint8Array(q);for(n=0;n<q;n++)p=4*(g[n]-a),p<a||p>b?d[n]=0:(k[n]=c[p],f[n]=c[p+1],l[n]=c[p+2],d[n]=c[p+3]);e.mask=d}else if(d)for(n=0;n<q;n++)d[n]&&(c=h[g[n]],k[n]=c[0],f[n]=c[1],l[n]=c[2],d[n]=c[3]);else{d=new Uint8Array(q);for(n=0;n<q;n++)c=h[g[n]],k[n]=c[0],f[n]=c[1],l[n]=c[2],d[n]=c[3];e.mask=d}e.pixels=[k,f,l];e.statistics=null;e.pixelType="U8";
e.maskIsAlpha=m;return e}},convolute:function(e,m){e=this._clonePixelBlock(e);var n=e.pixels,q=e.width,d=e.height,c=q*d,a=n.length,b,h,g,k,f=[],l=[],p=m.normalizedKernel,r=m.kernelRows,w=m.kernelCols;for(m=0;m<a;m++){var u=n[m];var B=new Float32Array(c);B.set(u);for(g=1;g<d-1;g++){var x=g*q;for(k=1;k<q-1;k++){for(b=l=0;b<r;b++)for(h=0;h<w;h++)l+=u[x+k+(b-1)*q+h-1]*p[b*w+h];B[x+k]=l}}f.push(B)}e.pixels=f;return e},contrastBrightnessStretch:function(e,m){if(null!==e&&null!==e.pixels){e=this._clonePixelBlock(e);
var n=e.pixels,q=e.mask,d=e.width*e.height,c=n.length;var a=m&&m.contrastOffset;m=m&&m.brightnessOffset;if("U8"!==e.pixelType)throw"the contrast and brightness function only supports 8 bit unsigned integer data";var b=this._createContrastBrightnessLUT(a,m);if(null==q)for(a=0;a<d;a++)for(m=0;m<c;m++)n[m][a]=b[n[m][a]];else for(a=0;a<d;a++)if(q[a])for(m=0;m<c;m++)n[m][a]=b[n[m][a]];e.pixelType="U8";return e}},isNull:function(e,m){if(null!==e&&null!==e.pixels){e=this._clonePixelBlock(e);m=e.mask;var n=
e.pixels[0],q=n.length,d;if(m){for(d=0;d<q;d++)n[d]=m[d]?0:1;e.mask=null}else if(n.fill)n.fill(0);else for(d=0;d<q;d++)n[d]=0;return e}},setNull:function(e){if(null!==m&&null!==m.pixels){var m=this._clonePixelBlock(e);e=m.mask;var n=m.pixels[0],q=n.length,d;e=e||new Uint8Array(q);for(d=0;d<q;d++)e[d]=n[d]?0:1;m.mask=e;return m}},local:function(e,m){if(!m)return e[0];var n=m.rasterCountNeeded;m=m.functor;var q=this._clonePixelBlock(e[0]);if(null!==q&&null!==q.pixels){var d=q.width*q.height,c;e=(c=
e[1])&&c.pixels[0];var a=c&&c.mask,b=q.mask,h=q.pixels[0];if(2===n)if(!b&&a)b=a;else if(b&&a)for(c=0;c<d;c++)b[c]=b[c]&&a[c]?1:0;q.mask=b;if(1===n)if(null==b)for(c=0;c<d;c++)h[c]=m(h[c]);else for(c=0;c<d;c++)b[c]&&(h[c]=m(h[c]));else if(2===n)if(null==b)for(c=0;c<d;c++)h[c]=m(h[c],e[c]);else for(c=0;c<d;c++)b[c]&&(h[c]=m(h[c],e[c]));q.mask=b;q.calculateStatistics();return q}},remapColor:function(e,m){e=this._clonePixelBlock(e);var n=e.width*e.height,q=m.length,d=Math.floor(q/2),c=m[Math.floor(d)],
a=m[0].value,b=m[m.length-1].value,h=e.pixels[0],g,k,f=!1,l=new Uint8Array(n),p=new Uint8Array(n),r=new Uint8Array(n),w=e.mask,u=4===m[0].mappedColor.length;w&&0!==w.length||(w=new Uint8Array(n),w.fill(u?255:1),e.mask=w);for(k=0;k<n;k++)if(w[k]){var B=h[k];if(B<a||B>b)l[k]=p[k]=r[k]=w[k]=0;else{f=!1;var x=d;var E=c;var y=0;for(g=q-1;1<g-y;){if(B===E.value){f=!0;break}B>E.value?y=x:g=x;x=Math.floor((y+g)/2);E=m[Math.floor(x)]}f||(E=B===m[g].value?m[g]:m[y]);l[k]=E.mappedColor[0];p[k]=E.mappedColor[1];
r[k]=E.mappedColor[2];w[k]=E.mappedColor[3]}}e.pixels=[l,p,r];e.mask=w;e.pixelType="u8";e.maskIsAlpha=u;return e},_clonePixelBlock:function(e){if(e.clone)return e.clone();var m=H.clone(e),n;if(e.pixels&&e.pixels[0]&&0<e.pixels[0].length&&!(m.pixels&&m.pixels[0]&&0<m.pixels[0].length)){m.pixels=[];var q=e.pixels.length;for(n=0;n<q;n++)m.pixels[n]=new e.pixels[n].constructor(e.pixels[n])}if(e.statistics)for(m.statistics=[],q=e.statistics.length,n=0;n<q;n++)m.statistics[n]=H.clone(e.statistics[n]);e.mask&&
(m.mask=new Uint8Array(e.mask));return m},_createContrastBrightnessLUT:function(e,m){if(this._contrastCache&&this._contrastCache.contrastOffset===e&&this._contrastCache.brightnessOffset===m)return this._contrastCache.lut;var n=Math.min(Math.max(e,-100),100),q=Math.min(Math.max(m,-100),100),d,c=new Uint8Array(256);for(d=0;256>d;d++){if(0<n&&100>n)var a=(200*d-25500+510*q)/(2*(100-n))+128;else 0>=n&&-100<n?a=(200*d-25500+510*q)*(100+n)/2E4+128:100===n?(a=200*d-25500+256*(100-n)+510*q,a=0<a?255:0):-100===
n&&(a=128);c[d]=255<a?255:0>a?0:a}this._contrastCache={contrastOffset:e,brightnessOffset:m,lut:c};return c}}})},"esri/layers/rasterLib/function/CompositeBandFunction":function(){define("dojo/_base/declare dojo/_base/lang ./RasterFunctionX ../../PixelBlock ./pixelShaders ./RasterFunctionWebGLMixin".split(" "),function(H,e,m,n,q,d){return H([m,d],{declaredClass:"esri.layers.rasterLib.function.CompositeBandFunction",functionName:"CompositeBand",supportWebGL:!0,support2D:!0,constructor:function(c){this.functionArguments=
this.mixinIgnoreCase({rasters:null},c)},bind:function(c){c=this.getSourceRasterInfo(c);if(!c.rasters)return Error("The rasters input to composite band function is invalid.");var a=[],b=[],h=c.rasters.length,g;if(c.rasters[0].statistics)for(g=0;g<h;g++)a.push(c.rasters[g].statistics[0]);if(c.rasters[0].histograms)for(g=0;g<h;g++)b.push(c.rasters[g].histograms[0]);this.rasterInfo=e.mixin(c.rasters[0],{bandCount:h,pixelType:this._calculatePixelType(this.pixelType,c.rasters[0].pixelType),statistics:a,
histograms:b});return!0},read2D:function(c){c=c.rasters;if(null!=c&&0!==c.length){var a=this._clonePixelData(c[0]),b=a.pixelBlock,h=[],g=[];for(k=0;k<c.length;k++)h.push(c[k].pixelBlock.pixels[0]),g.push(c[k].pixelBlock.statistics[0]);b.pixels=h;b.stackedStatistics=g;b.planes=c.length;var k;g=b.width*b.height;for(k=0;k<c.length;k++)if(b=c[k].pixelBlock.mask,f&&b)for(h=0;h<g;h++)f[h]&=b[h];else var f=f||b;a.maks=f;return a}},readGL:function(c){this._performance.start();this._initializeProgram({fragment:q.compositeBand,
fragmentName:"CompositeBand"});var a=c.rasters;if(null!=a&&0!==a.length){a=a.length;var b,h=this.bindFrameBuffer();for(b=0;b<a;b++){var g=this._setupTextureData(c.rasters[b],{notOriginal:0<b});var k=0<b?b.toString():"";this._bindTexture(g.texture,"u_image"+k)}this._setUniforms({u_rasterCount:a});this._drawGL();this._addPerformanceMetric(this._performance.elapsed());return{extent:g.extent,texture:h.texture}}}})})},"esri/layers/rasterLib/function/ContrastBrightnessFunction":function(){define("dojo/_base/declare dojo/_base/lang ./RasterFunctionX ../../PixelBlock ./pixelShaders ./RasterFunctionWebGLMixin ./rasterUtils".split(" "),
function(H,e,m,n,q,d,c){return H([m,d],{declaredClass:"esri.layers.rasterLib.function.ContrastBrightnessFunction",renderTexture:!0,functionName:"ContrastBrightness",supportWebGL:!0,support2D:!0,pixelType:"U8",constructor:function(a){this.functionArguments=this.mixinIgnoreCase({contrastOffset:0,brightnessOffset:0,raster:null},a)},bind:function(a){a=this.getSourceRasterInfo(a);if(!a.raster)return Error("The raster input to contrast and brightness function is invalid.");this.rasterInfo=e.mixin(a.raster,
{bandCount:a.raster.bandCount,pixelType:this._calculatePixelType(this.pixelType,"U8"),statistics:null,histograms:null});this.rasterInfo.keyProperties=this.rasterInfo.keyProperties||{};this.rasterInfo.keyProperties.DataType="Processed";return!0},read2D:function(a){a=a.raster;if(null!==a&&null!==a.pixelBlock&&null!==a.pixelBlock.pixels){var b=c.contrastBrightnessStretch(a.pixelBlock,{contrastOffset:this.functionArguments.contrastOffset,brightnessOffset:this.functionArguments.brightnessOffset});"Unknown"!==
this.pixelType&&(b.pixelType=this.pixelType,b.pixels=b.pixels.map(e.hitch(this,function(h){return this._clampBand(h,b.pixelType)})));return{extent:a.extent,pixelBlock:b}}},readGL:function(a){return this._cbGL(a.raster)},_cbGL:function(a){this._performance.start();this._initializeProgram({fragment:q.contrastBrightness,fragmentName:"ContrastBrightness"});a=this._setupTextureData(a);this._setUniforms({u_contrastOffset:Math.min(Math.max(this.functionArguments.contrastOffset,-100),100),u_brightnessOffset:Math.min(Math.max(this.functionArguments.brightnessOffset,
-100),100),u_scaleFactor:this.renderTexture?255:1});this._bindTexture(a.texture,"u_image");var b=this.bindFrameBuffer();this._drawGL();this._addPerformanceMetric(this._performance.elapsed());return{extent:a.extent,texture:b.texture}}})})},"esri/layers/rasterLib/function/ConvolutionFunction":function(){define("dojo/_base/declare dojo/_base/lang ./RasterFunctionX ../../PixelBlock ./convolutionKernel ./pixelShaders ./RasterFunctionWebGLMixin ./rasterUtils".split(" "),function(H,e,m,n,q,d,c,a){return H([m,
c],{declaredClass:"esri.layers.rasterLib.function.ConvolutionFunction",functionName:"Convolution",supportWebGL:!0,support2D:!0,constructor:function(b){this.functionArguments=this.mixinIgnoreCase({columns:3,rows:3,type:0,kernel:null,raster:null},b)},bind:function(b){b=this.getSourceRasterInfo(b);if(!b.raster)return Error("The raster input to convolution function is invalid.");this.rasterInfo=e.mixin(b.raster,{bandCount:b.raster.bandCount,pixelType:this._calculatePixelType(this.pixelType,b.raster.pixelType),
statistics:b.raster.statistics,histograms:b.raster.histograms});this.rasterInfo.keyProperties=this.rasterInfo.keyProperties||{};this.rasterInfo.keyProperties.DataType="Generic";return!0},read2D:function(b){this._performance.start();b=b.raster;var h=this._analyzeKernel(),g=a.convolute(b.pixelBlock,{normalizedKernel:h.normalizedKernel,kernelCols:this.functionArguments.columns,kernelRows:this.functionArguments.rows});this._addPerformanceMetric(this._performance.elapsed());"Unknown"!==this.pixelType&&
(g.pixelType=this.pixelType);g.pixels=g.pixels.map(e.hitch(this,function(k){return this._clampBand(k,g.pixelType)}));return{extent:b.extent,pixelBlock:g}},readGL:function(b){this._performance.start();this._initializeProgram({fragment:d.convolution,fragmentName:"Convolution"});var h=this._setupTextureData(b.raster),g=this.bindFrameBuffer(),k=this.gl,f=k.drawingBufferWidth;k=k.drawingBufferHeight;var l=this.functionArguments.kernel;this._setUniforms({u_resolution:b&&b.raster&&b.raster.pixelBlock?[1/
b.raster.pixelBlock.width,1/b.raster.pixelBlock.height]:[1/f,1/k],u_kernel:l,u_kernelSize:l.length});this._bindTexture(h.texture,"u_image");this._drawGL();this._addPerformanceMetric(this._performance.elapsed());return{extent:h.extent,texture:g.texture}},_analyzeKernel:function(){var b=this.functionArguments.kernel,h=b.reduce(function(f,l){return f+l});0!==h&&1!==h&&(b=b.map(function(f){return f/h}));var g,k=[];for(g=0;g<b.length;g++)k.some(function(f){return f===b[g]})||k.push(b[g]);return{normalizedKernel:b,
distinctValues:k}},_analyzeKernelPattern:function(){var b=this.functionArguments.rows,h=this.functionArguments.columns,g=this.functionArguments.kernel,k=[],f,l;for(f=0;f<b;f++)k.push({weights:g.slice(f*h,(f+1)*h)});var p;for(f=1;f<b;f++){var r=k[f].weights;for(g=0;g<f;g++)if(p=k[g].weights){var w=r[0]/p[0];for(l=1;l<h;l++)r[l]/p[l]!==w&&(w=null);null!==w&&(k[f]={row:g,factor:w})}}return k}})})},"esri/layers/rasterLib/function/ExtractBandFunction":function(){define("dojo/_base/declare dojo/_base/lang ./RasterFunctionX ../../PixelBlock ./pixelShaders ./RasterFunctionWebGLMixin".split(" "),
function(H,e,m,n,q,d){return H([m,d],{declaredClass:"esri.layers.rasterLib.function.ExtractBandFunction",functionName:"ExtractBand",supportWebGL:!0,support2D:!0,constructor:function(c){this.functionArguments=this.mixinIgnoreCase({bandIDs:[],missingBandAction:0,raster:null},c)},bind:function(c){c=this.getSourceRasterInfo(c);if(!c.raster)return Error("The raster input to extract band function is invalid.");var a=[],b=c.raster.statistics,h=[],g=c.raster.histograms,k=this.functionArguments.bandIDs.length||
c.raster.bandCount;this.functionArguments.bandIDs.forEach(e.hitch(this,function(f){if(f>=k-1){if(1===this.functionArguments.missingBandAction)return Error("missing band "+f);f=k-1}if(0>f)return Error("missing band "+f);void 0!==b&&null!==b&&0<b.length&&a.push(b[f]);void 0!==g&&null!==g&&0<g.length&&h.push(g[f])}));this.rasterInfo=e.mixin(c.raster,{bandCount:k,pixelType:this._calculatePixelType(this.pixelType,c.raster.pixelType),statistics:a,histograms:h});return!0},read2D:function(c){c=this._clonePixelData(c.raster);
if(null!==c&&null!==c.pixelBlock&&null!==c.pixelBlock.pixels){this._performance.start();var a=c.pixelBlock,b=a.statistics,h=a.pixels,g=h.length;if(null==this.functionArguments.bandIDs)throw"missing bandIDs parameter";if(0===this.functionArguments.bandIDs.length)return c;var k=[],f=[];this.functionArguments.bandIDs.forEach(function(l){if(l>=g-1){if(1===this.functionArguments.missingBandAction)throw"missing band "+l;l=g-1}if(0>l)throw"missing band "+l;k.push(h[l]);void 0!==b&&null!==b&&0<b.length&&
f.push(b[l])});a.pixels=k;a.statistics=f;a.planes=this.functionArguments.bandIDs.length;return c}},readGL:function(c){this._performance.start();if(null==this.functionArguments.bandIDs)throw"missing bandIDs parameter";if(3<this.functionArguments.bandIDs.length)throw"this version does not support more than 3 bands yet";this._initializeProgram({fragment:q.extractBand,fragmentName:"ExtractBand"});var a=this.functionArguments.bandIDs;1===a.length&&(a=[a[0],a[0],a[0]]);this._bandIDs=a;this._alterBand=!(0===
this.functionArguments.bandIDs.length||0===a[0]&&1===a[1]&&2===a[2]);var b=!!(this._alterBand&&c.raster&&c.raster.texture);c=this._setupTextureData(c.raster,{bandIDs:a});var h=this.bindFrameBuffer();b?this._setUniforms({u_bandIDs:a,u_alterBand:this._alterBand}):this._setUniforms({u_bandIDs:a,u_alterBand:!1});this._bindTexture(c.texture,"u_image");this._drawGL();this._addPerformanceMetric(this._performance.elapsed());return{extent:c.extent,texture:h.texture}}})})},"esri/layers/rasterLib/function/HillshadeFunction":function(){define("dojo/_base/declare dojo/_base/lang ./RasterFunctionX ../../../renderers/colorRampGenerator ../../../WKIDUnitConversion ../../PixelBlock ./pixelShaders ./RasterFunctionWebGLMixin ./surfaceUtils ./rasterUtils".split(" "),
function(H,e,m,n,q,d,c,a,b,h){return H([m,a],{declaredClass:"esri.layers.rasterLib.function.HillshadeFunction",functionName:"Hillshade",supportWebGL:!0,support2D:!0,renderTexture:!0,constructor:function(g){this.functionArguments=this.mixinIgnoreCase({hillshadeType:0,altitude:45,azimuth:315,zFactor:1,slopeType:1,psPower:.664,psFactor:.024,colorRamp:null,raster:null},g);this._azimuths=[315,270,225,360,180,0];this._altitudes=[60,60,60,60,60,90];this._weights=[3,5,3,2,1,4];var k=this._weights.reduce(function(f,
l){return f+l});this._weights=this._weights.map(function(f){return f/k})},bind:function(g){g=this.getSourceRasterInfo(g);if(!g.raster)return Error("The raster input to hillshade function is invalid.");g.raster.statistics&&(this.srcStatistics=g.raster.statistics);this.rasterInfo=e.mixin(g.raster,{bandCount:1,pixelType:this._calculatePixelType(this.pixelType,"U8"),statistics:[{min:0,max:255}],histograms:null});this.rasterInfo.keyProperties=this.rasterInfo.keyProperties||{};this.rasterInfo.keyProperties.DataType=
"Generic";this._initializeColormap();return!0},read2D:function(g){this._performance.start();g=g.raster;g=b.hillshade(g,{altitude:this.functionArguments.altitude,azimuth:this.functionArguments.azimuth,zFactor:this.functionArguments.zFactor,psPower:this.functionArguments.psPower,psFactor:this.functionArguments.psFactor,hillshadeType:this.functionArguments.hillshadeType,slopeType:this.functionArguments.slopeType,isGCS:g.extent.spatialReference.wkid&&null==q[g.extent.spatialReference.wkid]});this._addPerformanceMetric(this._performance.elapsed());
return g},readGL:function(g){this._performance.start();this._initializeProgram({fragment:c.hillshade,fragmentName:"Hillshade"});this.functionArguments.colorRamp&&this._indexedColormap&&!this._clrTexture&&(this._clrTexture=this._setupColormapTexture(this._indexedColormap));var k=this._setupTextureData(g.raster),f=this.bindFrameBuffer(),l=this.gl,p=l.drawingBufferWidth;l=l.drawingBufferHeight;var r=k.extent,w=(r.xmax-r.xmin)/p,u=(r.ymax-r.ymin)/l,B=this.functionArguments.altitude,x=this.functionArguments.azimuth,
E=this.functionArguments.zFactor;1===this.functionArguments.hillshadeType&&(E*=2);var y=E/(8*w),D=E/(8*u);.001<E&&r.spatialReference.wkid&&null==q[r.spatialReference.wkid]&&(y/=111E3,D/=111E3);var G=this.functionArguments.psPower,A=this.functionArguments.psFactor;3===this.functionArguments.slopeType&&((y=r.spatialReference.wkid&&null==q[r.spatialReference.wkid])?(y=111E3*w,D=111E3*u,y=(E+Math.pow(y,G)*A)/(8*y),D=(E+Math.pow(D,G)*A)/(8*D)):(y=(E+Math.pow(w,G)*A)/(8*w),D=(E+Math.pow(u,G)*A)/(8*u)));
var t=(90-B)*Math.PI/180;B=Math.cos(t);var v=(360-x+90)*Math.PI/180;x=Math.sin(t)*Math.cos(v);t=Math.sin(t)*Math.sin(v);G=Array(6);A=Array(6);r=Array(6);var C=this._weights,J;if(1===this.functionArguments.hillshadeType){var L=this._azimuths.length;for(J=0;J<L;J++)B=this._altitudes[J],x=this._azimuths[J],t=(90-B)*Math.PI/180,B=Math.cos(t),v=(360-x+90)*Math.PI/180,x=Math.sin(t)*Math.cos(v),t=Math.sin(t)*Math.sin(v),G[J]=B,A[J]=x,r[J]=t}else G[0]=B,A[0]=x,r[0]=t;G=G.map(function(S){return parseFloat(S)});
A=A.map(function(S){return parseFloat(S)});r=r.map(function(S){return parseFloat(S)});this._setUniforms({u_cellSize:[w,u],u_zfactor:E,u_xFactor:y,u_yFactor:D,u_sinZcosA:x,u_sinZsinA:t,u_cosZ:B,u_sinZcosAs:A,u_sinZsinAs:r,u_cosZs:G,u_weights:C,u_hillshadeType:this.functionArguments.hillshadeType,u_resolution:g&&g.raster&&g.raster.pixelBlock?[1/g.raster.pixelBlock.width,1/g.raster.pixelBlock.height]:[1/p,1/l],u_scaled:!this.renderTexture,u_applyColorramp:this._clrTexture?!0:!1,u_minValue:this.srcStatistics[0].min,
u_maxValue:this.srcStatistics[0].max,u_indexedColormapOffset:this._indexedColormapOffset||0,u_indexedColormapMaxIndex:this._indexedColormap?this._indexedColormap.length/4-1:0});this._clrTexture&&this._bindTexture(this._clrTexture,"u_image1");this._bindTexture(k.texture,"u_image");this._drawGL();this._addPerformanceMetric(this._performance.elapsed());return{extent:k.extent,texture:f.texture}},_initializeColormap:function(){this._indexedColormapOffset=0;var g=this._indexedColormap,k=this.functionArguments.colorRamp;
this.functionArguments.colormap?(this._alphaSpecified=(k=h.buildIndexedColormap(this.functionArguments.colormap))&&k.alphaSpecified,this._indexedColormap=k&&k.indexedColormap,this._indexedColormapOffset=k&&k.offset):k?(this._indexedColormap="multipart"===k.type?this.invert?n.createMultiPartColorRamp(this._invertColorRamp(k)):n.createMultiPartColorRamp(k):this.invert?n.createAlgorithmicColorRamp(this._invertColorRamp(k)):n.createAlgorithmicColorRamp(k),k.fromColor&&k.toColor&&"000"===k.fromColor.slice(0,
3).join("")&&"255255255"===k.toColor.slice(0,3).join("")&&(this._clrTexture=this._indexedColormap=null)):this.functionArguments.colormapName?"random"===this.functionArguments.colormapName.toLowerCase()&&(this._indexedColormap=n.createRandomColorRamp()):this._clrTexture=this._indexedColormap=null;if(g&&this._indexedColormap){k=!0;for(var f=0;f<g.length;f++)if(g[f]!==this._indexedColormap[f]){k=!1;break}k||(this._clrTexture=null)}},_setupColormapTexture:function(g){var k=this._createTexture(),f=this.gl,
l=g.length/4,p=new Float32Array(g.length),r;for(r=0;r<g.length;r++)p[r]=g[r]/255;f.getExtension("OES_texture_float");f.texImage2D(f.TEXTURE_2D,0,f.RGBA,l,1,0,f.RGBA,f.FLOAT,p);return k}})})},"esri/layers/rasterLib/function/LocalFunction":function(){define("dojo/_base/declare dojo/_base/lang ./RasterFunctionX ../../PixelBlock ./pixelShaders ./RasterFunctionWebGLMixin ./rasterUtils".split(" "),function(H,e,m,n,q,d,c){return H([m,d],{declaredClass:"esri.layers.rasterLib.function.LocalFunction",functionName:"Local",
supportWebGL:!0,support2D:!0,constructor:function(a){this.functionArguments=this.mixinIgnoreCase({operation:null,rasters:null},a)},bind:function(a){a=this.getSourceRasterInfo(a);var b=0;a.raster?b=a.raster.bandCount:a.rasters&&(b=Math.max.apply(null,a.rasters.map(function(h){return h.bandCount})));if(0===b)return Error("The raster input to local function is invalid. It only takes single band input.");a=a.raster||a.rasters.filter(function(h){return!!h.extent})[0];this.rasterInfo=e.mixin(a,{bandCount:1,
pixelType:this._calculatePixelType(this.pixelType,"F32"),statistics:null,histograms:null});this.rasterInfo.keyProperties=this.rasterInfo.keyProperties||{};this.rasterInfo.keyProperties.DataType="Generic";return!0},read2D:function(a){var b=[];b=a.raster?a.raster2?[a.raster,a.raster2]:[a.raster]:a.rasters;a=b.map(function(l){return l.pixelBlock});var h=this.functionArguments.operation;if(null===h)return b[0];this._performance.start();var g=this._getOperations(),k=g.operators[h-1];g=g.functors[h-1];
if(!this.functionArguments.rasters){if(1!==k)throw"no sufficient rasters, require "+k;}else if(999!==k&&this.functionArguments.rasters.length!==k)throw"number of rasters does not meet (short or exceed) the operation requirment, require "+k;var f=31===h?c.isNull(a[0]):50===h?c.setNull(a[0]):c.local(a,{rasterCountNeeded:k,functor:g});"Unknown"!==this.pixelType&&(f.pixelType=this.pixelType,f.pixels=f.pixels.map(e.hitch(this,function(l){return this._clampBand(l,f.pixelType)})));f.statistics||f.calculateStatistics();
return{extent:b[0].extent,pixelBlock:f}},readGL:function(a){this._performance.start();var b=this.functionArguments.operation,h=this._getWebGLOperations(),g=h.operators[b-1],k=q.local;h="result\x3d"+h.functors[b-1]+";";31!==b&&50!==b&&(h+="result \x3d vec4(result.rgb, a.a);");k=k.replace("vec4 replaceme"+g+";",h);h=this.gl.getParameter(this.gl.VERSION);var f="";if(-1<h.toLowerCase().indexOf("webgl 1.0")||-1<h.toLowerCase().indexOf("webgl 0."))f=this._getPolyfill(b);k=k.replace("vec4 polyfill;",f);
1<g&&(k=k.replace("gl_FragColor \x3d localOp1();","gl_FragColor \x3d localOp1();".replace("1",g.toString())));this._initializeProgram({fragment:k,fragmentName:"Local"});b=a.rasters;if(null!=b&&0!==b.length){b=b.length;h=this.bindFrameBuffer();for(g=0;g<b;g++){k=0<g?g.toString():"";var l=this._setupTextureData(a.rasters[g],{reCreate:!0});this._bindTexture(l.texture,"u_image"+k)}this._setUniforms({});this._drawGL();this._addPerformanceMetric(this._performance.elapsed());return{extent:l.extent,texture:h.texture}}},
_getOperations:function(){return{operators:[2,2,2,1,2,1,1,1,1,1,2,2,1,2,2,2,2,1,2,2,1,1,2,2,1,1,1,2,2,1,1,1,2,2,1,1,1,999,999,999,999,999,999,2,1,2,999,1,1,1,1,1,1,999,999,1,1,999,1,1,2,2,2,999,999,999,999,999,999,999,999,999,999,3],functors:[function(a,b){return a+b},function(a,b){return a-b},function(a,b){return a*b},function(a){return Math.sqrt(a)},function(a,b){return Math.pow(a,b)},function(a){return Math.acos(a)},function(a){return Math.asin(a)},function(a){return Math.atan(a)},function(a){return Math.atanh(a)},
function(a){return Math.abs(a)},function(a,b){return a&b},function(a,b){return a<<b},function(a){return~a},function(a,b){return a|b},function(a,b){return a>>b},function(a,b){return a^b},function(a,b){return a&&b},function(a){return!a},function(a,b){return a||b},function(a,b){return a!=b},function(a){return Math.cos(a)},function(a,b){return Math.cosh(a)},function(a,b){return a/b},function(a,b){return a==b},function(a){return Math.exp(a)},function(a){return Math.pow(10,a)},function(a){return Math.pow(2,
a)},function(a,b){return a>b?1:0},function(a,b){return a>=b?1:0},function(a,b){return Math.floor(a)},function(a){return!a},function(a){return a},function(a,b){return a<b?1:0},function(a,b){return a<=b?1:0},function(a){return Math.log(a)},function(a,b){return Math.log10(a)},function(a,b){return Math.log2(a)},999,999,999,999,999,999,function(a,b){return a%b},function(a){return-a},function(a,b){return a!=b?1:0},999,function(a,b){return Math.floor(a)},function(a,b){return Math.ceil(a)},function(a,b){return b?
0:a},function(a,b){return Math.sin(a)},function(a,b){return Math.sinh(a)},function(a,b){return a*a},999,999,function(a){return Math.tan(a)},function(a){return Math.tanh(a)},999,function(a){return Math.acosh(a)},function(a){return Math.asinh(a)},function(a,b){return Math.atan2(a,b)},function(a,b){return a/b},function(a,b){return Math.floor(a/b)},999,999,999,999,999,999,999,999,999,999,function(a,b,h){return a?b:h}]}},_polyfill:{sinh:"vec4 sinh(vec4 x) {\nvec4 halfexp \x3d exp(x)/2.0;\nreturn halfexp - 1.0/halfexp;\n}",
asinh:"vec4 asinh(vec4 x) {\nvec4 halfexp \x3d exp(x)/2.0;\nreturn 1.0/(halfexp - 1.0/halfexp);\n}",cosh:"vec4 cosh(vec4 x) {\nvec4 halfexp \x3d exp(x)/2.0;\nreturn halfexp + 1.0/halfexp;\n}",acosh:"vec4 acosh(vec4 x) {\nvec4 halfexp \x3d exp(x)/2.0;\nreturn 1.0/(halfexp + 1.0/halfexp);\n}",tanh:"vec4 tanh(vec4 x) {\nvec4 expx \x3d exp(x);\nreturn (expx - 1.0/expx)/(expx + 1.0/expx);\n}",atanh:"vec4 atanh(vec4 x) {\nvec4 expx \x3d exp(x);\nreturn (expx + 1.0/expx)/(expx - 1.0/expx);\n}"},_getPolyfill:function(a){var b=
"";switch(a){case 9:b=this._polyfill.atanh;break;case 22:b=this._polyfill.cosh;break;case 52:b=this._polyfill.sinh;break;case 57:b=this._polyfill.tanh;break;case 59:b=this._polyfill.acosh;break;case 60:b=this._polyfill.asinh}return b},_getWebGLOperations:function(){return{operators:[2,2,2,1,2,1,1,1,1,1,2,2,1,2,2,2,2,1,2,2,1,1,2,2,1,1,1,2,2,1,1,1,2,2,1,1,1,999,999,999,999,999,999,2,1,2,999,1,1,1,1,1,1,999,999,1,1,999,1,1,2,2,2,999,999,999,999,999,999,999,999,999,999,3],functors:["(a + b)","(a - b)",
"(a * b)","sqrt(a)","pow(a, b)","acos(a)","asin(a)","atan(a)","atanh(a)","abs(a)","a","a","a","a","a","a","(a.r\x3d\x3d0.0 || b.r\x3d\x3d0.0) ? vec4(0.0,0.0,0.0,a.a) : vec4(1.0,1.0,1.0,a.a)","a.r\x3d\x3d0.0?vec4(1.0,1.0,1.0,a.a) : vec4(0.0,0.0,0.0,a.a)","(a.r\x3d\x3d0.0 \x26\x26 b.r\x3d\x3d0.0) ? vec4(0.0,0.0,0.0,a.a) : vec4(1.0,1.0,1.0,a.a)","(a.r\x3d\x3d0.0 ^^ b.r\x3d\x3d0.0) ? vec4(1.0,1.0,1.0,a.a) : vec4(0.0,0.0,0.0,a.a)","cos(a)","cosh(a)","a / b","a.r \x3d\x3d b.r? vec4(1.0,1.0,1.0,a.a) : vec4(0.0,0.0,0.0,a.a)",
"exp(a)","pow(10.0, a)","pow(2.0, a)","a.r \x3e b.r ? vec4(1.0,1.0,1.0,a.a) : vec4(0.0,0.0,0.0,a.a)","a.r \x3e\x3d b.r ? vec4(1.0,1.0,1.0,a.a) : vec4(0.0,0.0,0.0,a.a)","floor(a)","a.a \x3d\x3d 0.0? vec4(1.0,1.0,1.0,1.0) : vec4(0.0,0.0,0.0,1.0)","a","a.r \x3c b.r ? vec4(1.0,1.0,1.0,a.a) : vec4(0.0,0.0,0.0,a.a)","a.r \x3c\x3d b.r ? vec4(1.0,1.0,1.0,a.a) : vec4(0.0,0.0,0.0,a.a)","log(a)","log2(a) / log2(10.0)","log2(a)",999,999,999,999,999,999,"mod(a, b)","-a","a.r !\x3d b.r ? vec4(1.0,1.0,1.0,a.a) : vec4(0.0,0.0,0.0,a.a)",
999,"floor(a)","ceil(a)","a.r !\x3d 0.0 ? vec4(0.0,0.0,0.0,0.0) : a","sin(a)","sinh(a)","a * a",999,999,"tan(a)","tanh(a)",999,"acosh(a)","asinh(a)","atan(a, b)","a / b","floor(a / b)",999,999,999,999,999,999,999,999,999,999,"a.r!\x3d0 ? b : c"]}}})})},"esri/layers/rasterLib/function/MaskFunction":function(){define("dojo/_base/declare dojo/_base/lang ./RasterFunctionX ../../PixelBlock ./pixelShaders ./RasterFunctionWebGLMixin ./rasterUtils".split(" "),function(H,e,m,n,q,d,c){return H([m,d],{declaredClass:"esri.layers.rasterLib.function.MaskFunction",
functionName:"Mask",supportWebGL:!0,support2D:!0,constructor:function(a){this.functionArguments=this.mixinIgnoreCase({includedRanges:null,noDataInterpretation:0,noDataValues:null,raster:null},a)},bind:function(a){a=this.getSourceRasterInfo(a);if(!a.raster)return Error("The raster input to mask function is invalid.");this.rasterInfo=e.mixin(a.raster,{bandCount:a.raster.bandCount,pixelType:this._calculatePixelType(this.pixelType,a.raster.pixelType),statistics:a.raster.statistics,histograms:a.raster.histograms});
return!0},read2D:function(a){this._performance.start();a=a.raster;var b=c.mask(a.pixelBlock,{includedRanges:this.functionArguments.includedRanges,noDataInterpretation:this.functionArguments.noDataInterpretation,noDataValues:this.functionArguments.noDataValues});this._addPerformanceMetric(this._performance.elapsed());"Unknown"!==this.pixelType&&(b.pixelType=this.pixelType);return{extent:a.extent,pixelBlock:b}},readGL:function(a){this._performance.start();this._initializeProgram({fragment:q.mask,fragmentName:"Mask"});
a=this._setupTextureData(a.raster);var b=this.bindFrameBuffer(),h=this.functionArguments.includedRanges,g=this.functionArguments.noDataValues?this.functionArguments.noDataValues.map(function(k){return parseFloat(k,10)}):null;this._setUniforms({u_includedRanges:h,u_includedRanges_specified:h?!0:!1,u_noDataValues:g,u_noDataValues_specified:g?!0:!1,u_noDataInterpretation:this.functionArguments.noDataInterpretation,u_bandCount:Math.min(this.sourceRasterInfo.raster.bandCount,3)});this._bindTexture(a.texture,
"u_image");this._drawGL();this._addPerformanceMetric(this._performance.elapsed());return{extent:a.extent,texture:b.texture}}})})},"esri/layers/rasterLib/function/NDVIFunction":function(){define("dojo/_base/declare dojo/_base/lang ./RasterFunctionX ../../PixelBlock ./pixelShaders ./RasterFunctionWebGLMixin ./rasterIndex".split(" "),function(H,e,m,n,q,d,c){return H([m,d],{declaredClass:"esri.layers.rasterLib.function.NDVIFunction",functionName:"NDVI",supportWebGL:!0,support2D:!0,constructor:function(a){this.functionArguments=
this.mixinIgnoreCase({visibleBandID:1,infraredBandID:2,scaled:!0,raster:null},a)},bind:function(a){a=this.getSourceRasterInfo(a);if(!(a.raster&&1<a.raster.bandCount))return Error("The raster input to ndvi function is invalid. It requires more than 1 band.");this.rasterInfo=e.mixin(a.raster,{bandCount:1,pixelType:this._calculatePixelType(this.pixelType,this.scaled?"U8":"F32"),statistics:this.scaled?[{min:0,max:200}]:[{min:-1,max:1}],histograms:null});this.rasterInfo.keyProperties=this.rasterInfo.keyProperties||
{};this.rasterInfo.keyProperties.DataType="Generic";return!0},read2D:function(a){this._performance.start();a=a.raster;var b=c.calculate(a.pixelBlock,{bandIndexes:[this.functionArguments.infraredBandID+1,this.functionArguments.visibleBandID+1].join(" "),method:1}),h;if(this.functionArguments.scaled){var g=b.pixels[0];var k=b.mask;var f=g.length;var l=new Uint8Array(f);if(null==k)for(h=0;h<f;h++)l[h]=100*g[h]+100&255;else for(h=0;h<f;h++)k[h]&&(l[h]=100*g[h]+100&255);b.pixels[0]=l;b.pixelType="U8"}this._addPerformanceMetric(this._performance.elapsed());
"Unknown"!==this.pixelType&&(b.pixelType=this.pixelType);return{extent:a.extent,pixelBlock:b}},readGL:function(a){this._performance.start();this._initializeProgram({fragment:q.ndvi,fragmentName:"NDVI"});var b=this.functionArguments.visibleBandID,h=this.functionArguments.infraredBandID,g=this.functionArguments.scaled||!1;this._alterBand=2<Math.max(h,b)?!0:!1;a=this._setupTextureData(a.raster,{bandIDs:this._alterBand?{bandIDs:[h,b,h]}:null});var k=this.bindFrameBuffer();this._alterBand?this._setUniforms({u_bandId_nir:0,
u_bandId_red:1,u_scaled:g}):this._setUniforms({u_bandId_nir:h,u_bandId_red:b,u_scaled:g});this._bindTexture(a.texture,"u_image");this._drawGL();this._addPerformanceMetric(this._performance.elapsed());return{extent:a.extent,texture:k.texture}}})})},"esri/layers/rasterLib/function/SlopeFunction":function(){define("dojo/_base/declare dojo/_base/lang ./RasterFunctionX ../../../WKIDUnitConversion ../../PixelBlock ./pixelShaders ./RasterFunctionWebGLMixin ./surfaceUtils".split(" "),function(H,e,m,n,q,d,
c,a){return H([m,c],{declaredClass:"esri.layers.rasterLib.function.SlopeFunction",functionName:"Slope",supportWebGL:!0,support2D:!0,constructor:function(b){this.functionArguments=this.mixinIgnoreCase({zFactor:1,slopeType:1,psPower:.664,psFactor:.024,raster:null},b)},bind:function(b){b=this.getSourceRasterInfo(b);if(!b.raster)return Error("The raster input to slope function is invalid.");this.rasterInfo=e.mixin(b.raster,{bandCount:1,pixelType:this._calculatePixelType(this.outputPixelType,"F32"),statistics:1===
this.slopeType||3===this.slopeType?[{min:0,max:90}]:null,histograms:null});this.rasterInfo.keyProperties=this.rasterInfo.keyProperties||{};this.rasterInfo.keyProperties.DataType="Generic";return!0},read2D:function(b){this._performance.start();b=b.raster;b=a.slope(b,{zFactor:this.functionArguments.zFactor,psPower:this.functionArguments.psPower,psFactor:this.functionArguments.psFactor,slopeType:this.functionArguments.slopeType,isGCS:b.extent.spatialReference.wkid&&null==n[b.extent.spatialReference.wkid]});
this._addPerformanceMetric(this._performance.elapsed());return b},readGL:function(b){this._performance.start();this._initializeProgram({fragment:d.slope,fragmentName:"Slope"});var h=this._setupTextureData(b.raster),g=this.bindFrameBuffer(),k=this.gl,f=k.drawingBufferWidth;k=k.drawingBufferHeight;var l=h.extent;this._setUniforms({u_resolution:b&&b.raster&&b.raster.pixelBlock?[1/b.raster.pixelBlock.width,1/b.raster.pixelBlock.height]:[1/f,1/k],u_cellSize:[(l.xmax-l.xmin)/f,(l.ymax-l.ymin)/k],u_zfactor:this.functionArguments.zFactor});
this._bindTexture(h.texture,"u_image");this._drawGL();this._addPerformanceMetric(this._performance.elapsed());return{extent:h.extent,texture:g.texture}}})})},"esri/layers/rasterLib/function/StretchFunction":function(){define("dojo/_base/declare dojo/_base/lang ./RasterFunctionX ../../PixelBlock ./vertexShaders ./pixelShaders ./RasterFunctionWebGLMixin".split(" "),function(H,e,m,n,q,d,c){return H([m,c],{declaredClass:"esri.layers.rasterLib.function.StretchFunction",functionName:"Stretch",supportWebGL:!0,
support2D:!0,constructor:function(a){this.functionArguments=this.mixinIgnoreCase({stretchType:0,min:0,max:255,numberOfStandardDeviations:2,statistics:null,histograms:null,dra:!1,minPercent:.25,maxPercent:.5,useGamma:!1,gamma:null,raster:null,computeGamma:!1},a);this.functionArguments.statistics=this._convertStats(this.functionArguments.statistics);-1===[0,3,5,6].indexOf(this.functionArguments.stretchType)&&(console.error("The specific stretch type has not been implemented: "+this.functionArguments.stretchType),
this.functionArguments.stretchType=5);this.min=null==this.min?0:this.min;this.max=null==this.max?255:this.max},bind:function(a){a=this.getSourceRasterInfo(a);if(!a.raster)return Error("The raster input to stretch function is invalid.");a.raster.statistics&&(this.srcStatistics=this._convertStats(a.raster.statistics));a.raster.histograms&&(this.srcHistograms=a.raster.histograms);this.rasterInfo=e.mixin({},a.raster,{bandCount:a.raster.bandCount,pixelType:this._calculatePixelType(this.pixelType,"U8"),
statistics:null,histograms:null});this.rasterInfo.keyProperties=this.rasterInfo.keyProperties||{};this.rasterInfo.keyProperties.DataType="Generic";return!0},read2D:function(a){a=a.raster;this._stretch(a);return a},hasTilingEffects:function(a){a=a||this.functionArguments;return!!(a.dra||a.raster&&"object"===typeof a.raster&&a.raster.dra)},_convertStats:function(a){return a?a.map(function(b){return b&&null!=b.min?[b.min,b.max,b.mean,b.stddev]:b}):null},_updateStatistisHistograms:function(a){var b=this.functionArguments,
h=b.histograms||this.srcHistograms;if(a&&a.pixelBlock&&a.pixelBlock.pixels){if(0===b.stretchType)this._statistics=b.statistics&&0<b.statistics.length?b.statistics:this.srcStatistics,this._histograms=h;else{var g=a.pixelBlock,k=g.pixels.length,f=6===b.stretchType&&(b.dra||!h)||3===b.stretchType&&b.dra;f&&(g.statistics||g.calculateStatistics(),this._calculateStatisticsHistograms(a));if(b.dra)if(g.statistics||g.calculateStatistics(),f)this._statistics=g.statistics,this._histograms=g.histograms;else for(b=
g.statistics,this._statistics=[],a=0;a<k;a++)this._statistics[a]=[b[a].minValue,b[a].maxValue,0,0];else this._statistics=b.statistics&&0<b.statistics.length?b.statistics:this.srcStatistics,this._histograms=h}this._statistics=this._convertStats(this._statistics);this._gammaCorrection=this._getGammaCorrection()}else this._statistics=b.statistics&&0<b.statistics.length?b.statistics:this.srcStatistics,this._histograms=h,this._gammaCorrection=this._getGammaCorrection(),this._statistics=this._convertStats(this._statistics)},
_getGammaCorrection:function(){var a=this.functionArguments.gamma;if(a){var b=[],h;for(h=0;h<a.length;h++)b[h]=1<a[h]?2<a[h]?6.5+Math.pow(a[h]-2,2.5):6.5+100*Math.pow(2-a[h],4):1;return b}},_stretch:function(a){if(null!==a&&null!==a.pixelBlock&&null!==a.pixelBlock.pixels&&0!==this.functionArguments.stretchType){this._updateStatistisHistograms(a);var b=a.pixelBlock,h=b.pixels;b=b.width*b.height;var g=h.length,k,f;this._createLUT(a);if(null==this.LUT)return this._filterNoLUT(a);var l=this.LUT,p=this.LUTOffset;
for(k=0;k<g;k++){var r=l[k];for(f=0;f<b;f++){var w=h[k][f];h[k][f]=r[w-p]}}a.pixelBlock.pixelType="U8"}},_calculateStatisticsHistograms:function(a){a=a.pixelBlock;var b=a.pixelType,h=a.pixels,g=a.mask,k=h.length,f,l,p=function(A){this.min=-.5;this.max=255.5;this.size=256;e.mixin(this,A);this.counts=this.counts||new Uint32Array(this.size)},r=[],w,u;for(f=0;f<k;f++){var B=new p;var x=B.counts;var E=h[f];if("U8"===b)if(g)for(l=0;l<a.width*a.height;l++)g[l]&&x[E[l]]++;else for(l=0;l<a.width*a.height;l++)x[E[l]]++;
else{var y=a.statistics[f].minValue;var D=a.statistics[f].maxValue;B.min=y;B.max=D;D=(D-y)/256;var G=new Uint32Array(257);if(g)for(l=0;l<a.width*a.height;l++)g[l]&&G[Math.floor((E[l]-y)/D)]++;else for(l=0;l<a.width*a.height;l++)G[Math.floor((E[l]-y)/D)]++;for(l=0;255>l;l++)x[l]=G[l];x[255]=G[255]+G[256]}r.push(B);E=[];y=a.statistics[f].minValue;D=a.statistics[f].maxValue;for(l=u=w=G=0;l<B.size;l++)G+=x[l],w+=l*x[l];w/=G;for(l=0;l<B.size;l++)u+=x[l]*Math.pow(l-w,2);x=Math.sqrt(u/(G-1));l=(w+.5)*(B.max-
B.min)/B.size+B.min;B=x*(B.max-B.min)/B.size;E.push(y);E.push(D);E.push(l);E.push(B);a.statistics[f]={min:y,minValue:y,max:D,maxValue:D,mean:l,stddev:B}}a.histograms=r},_getCutOffPoints:function(a){var b=this.functionArguments,h=999;a&&a.pixelBlock?h=a.pixelBlock.pixels.length:a&&a.texture&&(h=3);a=Math.min(h,this._statistics.length);var g=[],k=[],f,l;switch(b.stretchType){case 5:for(f=0;f<a;f++)g[f]=this._statistics[f][0],k[f]=this._statistics[f][1];break;case 3:for(f=0;f<a;f++)g[f]=this._statistics[f][2]-
b.numberOfStandardDeviations*this._statistics[f][3],k[f]=this._statistics[f][2]+b.numberOfStandardDeviations*this._statistics[f][3],g[f]<this._statistics[f][0]&&(g[f]=this._statistics[f][0]),k[f]>this._statistics[f][1]&&(k[f]=this._statistics[f][1]);break;case 6:for(f=0;f<a;f++){h=this._histograms[f];var p=new Uint32Array(h.size);var r=h.counts;var w=0;var u=-.5===h.min&&1===(h.max-h.min)/r?.5:0;for(l=0;l<h.size;l++)w+=r[l],p[l]=w;r=b.minPercent*w/100;for(l=0;l<h.size;l++)if(p[l]>r){g[f]=h.min+(h.max-
h.min)/h.size*(l+u);break}r=(1-b.maxPercent/100)*w;for(l=h.size-2;0<=l;l--)if(p[l]<r){k[f]=h.min+(h.max-h.min)/h.size*(l+2-u);break}}break;default:for(f=0;f<h;f++)g[f]=0,k[f]=255}return{minCutOff:g,maxCutOff:k}},_createLUT:function(a){var b=this.functionArguments,h=a.pixelBlock,g=h.pixelType;if("U8"===g||"U16"===g||"S8"===g||"S16"===g){if(this._LUTSignature&&(g=this._computeLutSignature(),g.length===this._LUTSignature.length&&!g.some(function(t,v){return t!==this._LUTSignature[v]}.bind(this))))return;
g=h.pixels.length;var k=[],f=[],l=b.max,p=b.min,r=b.gamma,w=l-p,u=this._getCutOffPoints(a);a=u.minCutOff;u=u.maxCutOff;var B=0,x=256;"S8"===h.pixelType?B=-127:"S16"===h.pixelType&&(B=-32767);if("U16"===h.pixelType||"S16"===h.pixelType)x=65536;for(h=0;h<g;h++)k[h]=u[h]-a[h];var E=this._gammaCorrection;if(b.useGamma)for(h=0;h<g;h++){var y=[];for(b=0;b<x;b++){var D=b+B;var G=(D-a[h])/k[h];var A=1;1<r[h]&&(A-=Math.pow(1/w,G*E[h]));D<u[h]&&D>a[h]?y[b]=Math.floor(A*w*Math.pow(G,1/r[h]))+p:D>u[h]?y[b]=l:
D<a[h]&&(y[b]=p)}f[h]=y}else for(h=0;h<g;h++){y=[];for(b=0;b<x;b++)D=b+B,y[b]=D<a[h]?p:D>u[h]?l:Math.floor((D-a[h])/k[h]*w)+p;f[h]=y}this.LUT=f;this.LUTOffset=B;this._LUTSignature=this._computeLutSignature()}},_computeLutSignature:function(){var a=this.functionArguments,b=[],h,g;b.push(a.stretchType);b.push(a.min);b.push(a.max);b.push(a.numberOfStandardDeviations);if(this._statistics)for(h=0;h<this._statistics.length;h++)for(g=0;g<this._statistics[h].length;g++)b.push(this._statistics[h][g]);b.push(a.dra?
1:0);b.push(a.minPercent);b.push(a.maxPercent);if(a.gamma)for(h=0;h<this._statistics.length;h++)b.push(a.gamma[h]);b.push(a.useGamma?1:0);return b},_filterNoLUT:function(a){if(null!==a&&null!==a.pixelBlock&&null!==a.pixelBlock.pixels){var b=this.functionArguments,h=a.pixelBlock,g=h.pixels,k=h.mask;h=h.width*h.height;var f=g.length,l=[],p=[],r=b.max,w=b.min,u=b.gamma,B=r-w;var x=this._getCutOffPoints(a);var E=x.minCutOff,y=x.maxCutOff;for(x=0;x<f;x++)l[x]=y[x]-E[x];if(b.useGamma&&null!==u&&u.length>=
f)for(x=0;x<f;x++)p[x]=1<u[x]?2<u[x]?6.5+Math.pow(u[x]-2,2.5):6.5+100*Math.pow(2-u[x],4):1;if(b.useGamma)if(void 0!==k&&null!==k)for(b=0;b<h;b++){if(k[b])for(x=0;x<f;x++){var D=g[x][b];var G=(D-E[x])/l[x];var A=1;1<u[x]&&(A-=Math.pow(1/B,G*p[x]));D<y[x]&&D>E[x]?g[x][b]=Math.floor(A*B*Math.pow(G,1/u[x]))+w:D>y[x]?g[x][b]=r:D<E[x]&&(g[x][b]=w)}}else for(b=0;b<h;b++)for(x=0;x<f;x++)D=g[x][b],G=(D-E[x])/l[x],A=1,1<u[x]&&(A-=Math.pow(1/B,G*p[x])),D<y[x]&&D>E[x]?g[x][b]=Math.floor(A*B*Math.pow(G,1/u[x]))+
w:D>y[x]?g[x][b]=r:D<E[x]&&(g[x][b]=w);else if(void 0!==k&&null!==k)for(b=0;b<h;b++){if(k[b])for(x=0;x<f;x++)D=g[x][b],D<y[x]&&D>E[x]?g[x][b]=Math.floor((D-E[x])/l[x]*B)+w:D>y[x]?g[x][b]=r:D<E[x]&&(g[x][b]=w)}else for(b=0;b<h;b++)for(x=0;x<f;x++)D=g[x][b],D<y[x]&&D>E[x]?g[x][b]=Math.floor((D-E[x])/l[x]*B)+w:D>y[x]?g[x][b]=r:D<E[x]&&(g[x][b]=w);a.pixelBlock.pixelType="U8";return a}},_computeGammaValues:function(a){var b=this._statistics.length,h,g=[];for(h=0;h<b;h++){var k=this._statistics[h][2];"U8"!==
a&&(k=255*(k-this._statistics[h][0])/(this._statistics[h][1]-this._statistics[h][0]));g.push(this._computeGammaValue(k))}return g},_computeGammaValue:function(a){if(0!==a&&!(255<a||0>a)){var b=0;0<a&&150!=a&&255>a&&(b=150>=a?45*Math.cos(.01047*a):17*Math.sin(.021*a));b=Math.log((a+b)/255);if(0!==b&&(a=Math.log(a/255)/b,!isNaN(a)))return Math.min(9.9,Math.max(.01,a))}},readGL:function(a){return this._stretchGL(a.raster)},_stretchGL:function(a){this._performance.start();var b=this.renderTexture,h,g=
a.pixelBlock&&a.pixelBlock.pixels&&a.pixelBlock.pixels.length||this.sourceRasterInfo.raster.bandCount,k=a.pixelBlock,f=this.gl,l=f.drawingBufferWidth,p=f.drawingBufferHeight;if(!k&&this.functionArguments.dra){var r=new Float32Array(l*p*4),w=new Uint8Array(l*p);var u=new Float32Array(l*p);var B=new Float32Array(l*p);var x=new Float32Array(l*p);f.checkFramebufferStatus(f.FRAMEBUFFER)==f.FRAMEBUFFER_COMPLETE&&f.readPixels(0,0,l,p,f.RGBA,f.FLOAT,r);for(h=0;h<l*p;h++)u[h]=r[4*h],B[h]=r[4*h+1],x[h]=r[4*
h+2],w[h]=r[4*h+3];a.pixelBlock=new n({width:l,height:p,pixels:[u,B,x],mask:w});a.pixelBlock.calculateStatistics()}!k&&this.functionArguments.dra&&this._useGPUStats?(u=new Float32Array(g),B=new Float32Array(g)):(this._updateStatistisHistograms(a),r=this._getCutOffPoints(a),u=new Float32Array(g),B=new Float32Array(g),u.set(r.minCutOff.slice(0,g)),B.set(r.maxCutOff.slice(0,g)));this._initializeProgram({fragment:d.stretch,fragmentName:"Stretch"});r=this._setupTextureData(a);w=this.bindFrameBuffer();
this.renderTexture=!1;this._performance.start();if(!k&&this.functionArguments.dra&&this._useGPUStats){this._setUniforms({u_sourceDim:[l,p],u_bandCount:g});if(1===g)var E=this._readMinMax(r,2);else{E=this._readMinMax(r,0);var y=this._readMinMax(r,1)}if(6===this.functionArguments.stretchType||3===this.functionArguments.stretchType&&this.functionArguments.dra)h=this._readHistogram(E,y,a),u=h.minCutOff||u,B=h.minCutOff||B}x=this.functionArguments.max-this.functionArguments.min;a=new Float32Array(g);for(h=
0;h<g;h++)a[h]=x/(B[h]-u[h]);this._useGPUStats&&this._initializeProgram({fragment:d.stretch,fragmentName:"Stretch"});f.blendFunc(f.SRC_ALPHA,f.ZERO);x=new Float32Array(3);var D=new Float32Array(3);for(h=0;3>h;h++)x[h]=this.functionArguments.min,D[h]=this.functionArguments.max;h=this.functionArguments.useGamma;var G=this.functionArguments.gamma,A=this._gammaCorrection;Array.isArray(G)&&G.length>=g||(h=!1);this._setUniforms({u_sourceDim:[l,p],u_bandCount:g,u_minOutput:x,u_maxOutput:D,u_minCutOff:u,
u_maxCutOff:B,u_factor:a,u_state:100,u_useGamma:h,u_gamma:G,u_scaled:!b,u_gammaCorrection:A,u_minMaxTexture:!k&&this.functionArguments.dra&&this._useGPUStats?!0:!1});this.renderTexture=b;f.viewport(0,0,l,p);this._bindTexture(r.texture,"u_image");!k&&this.functionArguments.dra&&this._useGPUStats&&(b=f.getUniformLocation(this.rasterProgram,"u_image1"),f.uniform1i(b,1),f.activeTexture(f.TEXTURE1),f.bindTexture(f.TEXTURE_2D,E.texture),1<g&&(g=f.getUniformLocation(this.rasterProgram,"u_image2"),f.uniform1i(g,
2),f.activeTexture(f.TEXTURE2),f.bindTexture(f.TEXTURE_2D,y.texture)));this._drawGL();return{extent:r.extent,texture:w.texture}},_readMinMax:function(a,b){var h=this.gl,g=a.width||h.drawingBufferWidth,k=a.height||h.drawingBufferHeight;this._setUniforms({u_state:b});this.renderTexture=!1;var f=a.texture;for(h.activeTexture(h.TEXTURE0);1<g||1<k;){var l=this._createTexture();b=Math.max(Math.ceil(g/2),1);var p=Math.max(Math.ceil(k/2),1);h.getExtension("OES_texture_float");h.texImage2D(h.TEXTURE_2D,0,
h.RGBA,b,p,0,h.RGBA,h.FLOAT,null);a=h.createFramebuffer();h.bindFramebuffer(h.FRAMEBUFFER,a);h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,l,0);h.viewport(0,0,b,p);h.bindTexture(h.TEXTURE_2D,f);this._setUniforms({u_sourceDim:[g,k]});g=b;k=p;this._drawGL(!0);f=l}a=new Float32Array(g*k*4);h.checkFramebufferStatus(h.FRAMEBUFFER)==h.FRAMEBUFFER_COMPLETE&&h.readPixels(0,0,g,k,h.RGBA,h.FLOAT,a);return{texture:l,minmax:a}},_readHistogram:function(a,b,h){if(a)try{var g=this.gl,k=g.drawingBufferWidth,
f=g.drawingBufferHeight,l,p,r;if(a.texture instanceof WebGLTexture){var w=!0;var u=[1,0,0,1];if(b){var B=a.minmax;var x=b.minmax}else B=[a.minmax[0]],x=[a.minmax[1]]}else for(x=b,B=a,u=new Float32Array(x.length),l=0;l<x.length;l++)u[l]=256/(x[l]-B[l]);var E=new Float32Array(k*f);for(r=0;r<E.length;r++)E[r]=r;if(!this.histogramProgram){var y=q.getShader(g,q.histogram),D=d.getShader(g,d.constant);this.histogramProgram=this._loadProgram(y,D)}g.blendFunc(g.ONE,g.ONE);g.enable(g.BLEND);g.useProgram(this.histogramProgram);
var G=g.getAttribLocation(this.histogramProgram,"a_pixelIndex"),A=g.createBuffer();g.bindBuffer(g.ARRAY_BUFFER,A);g.bufferData(g.ARRAY_BUFFER,E,g.STATIC_DRAW);g.enableVertexAttribArray(G);g.vertexAttribPointer(G,1,g.FLOAT,!1,0,0);var t=this._setupHistTexture(h),v=this._createTexture();g.getExtension("OES_texture_float");g.texImage2D(g.TEXTURE_2D,0,g.RGBA,257,1,0,g.RGBA,g.FLOAT,null);var C=g.createFramebuffer();g.bindFramebuffer(g.FRAMEBUFFER,C);g.framebufferTexture2D(g.FRAMEBUFFER,g.COLOR_ATTACHMENT0,
g.TEXTURE_2D,v,0);g.viewport(0,0,257,1);var J=g.getUniformLocation(this.histogramProgram,"u_image");g.uniform1i(J,0);g.activeTexture(g.TEXTURE0);g.bindTexture(g.TEXTURE_2D,t);var L=g.getUniformLocation(this.histogramProgram,"u_sourceDim");g.uniform2f(L,k,f);var S=g.getUniformLocation(this.histogramProgram,"u_bandCount");g.uniform1i(S,3);var U=g.getUniformLocation(this.histogramProgram,"u_halfPixel");g.uniform2f(U,.5/k,.5/f);var aa=g.getUniformLocation(this.histogramProgram,"u_minMaxTexture");if(w){g.uniform1i(aa,
1);var ea=g.getUniformLocation(this.histogramProgram,"u_image1");g.uniform1i(ea,1);g.activeTexture(g.TEXTURE1);g.bindTexture(g.TEXTURE_2D,a.texture);if(b){var ba=g.getUniformLocation(this.histogramProgram,"u_image2");g.uniform1i(ba,2);g.activeTexture(g.TEXTURE2);g.bindTexture(g.TEXTURE_2D,b.texture)}}else{var oa=g.getUniformLocation(this.histogramProgram,"u_mins");g.uniform4f(oa,B[0],B[0],B[0],B[0]);g.uniform1i(aa,0)}var da=g.getUniformLocation(this.histogramProgram,"u_color"),fa=g.getUniformLocation(this.histogramProgram,
"u_factors"),R=g.getUniformLocation(this.histogramProgram,"u_size");g.uniform1f(R,256);a=[];b=[];g.uniform4fv(da,[1,0,0,1]);g.uniform4fv(fa,[u[0],0,0,1]);g.drawArrays(g.POINTS,0,E.length);var W=this.sourceRasterInfo.raster.bandCount;1<W&&(g.uniform4fv(da,[0,1,0,1]),g.uniform4fv(fa,[0,u[0],0,1]),g.drawArrays(g.POINTS,0,E.length),g.uniform4fv(da,[0,0,1,1]),g.uniform4fv(fa,[0,0,u[0],1]),g.drawArrays(g.POINTS,0,E.length));if(g.checkFramebufferStatus(g.FRAMEBUFFER)==g.FRAMEBUFFER_COMPLETE){var la=new Float32Array(1028);
g.readPixels(0,0,257,1,g.RGBA,g.FLOAT,la);g=0;var K=-.5===B[0]&&1===(x[0]-B[0])/256?.5:0;for(l=0;l<W;l++){var O=new Float32Array(257);var F=new Float32Array(257);for(r=g=0;256>r;r++)g+=la[4*r+l],O[r]=g,F[r]=la[4*r+l];F[256]=la[1024+l];O[256]=g+la[1024+l];var M=this.functionArguments.minPercent*g/100;if(x){for(p=0;256>p;p++)if(O[p]>M){a[l]=B[0]+(x[0]-B[0])/256*(p+K);break}M=(1-this.functionArguments.maxPercent/100)*g;for(p=254;0<=p;p--)if(O[p]<M){b[l]=B[0]+(x[0]-B[0])/256*(p+2-K);break}}}}return{histogram:la,
minCutOff:a,maxCutOff:b}}catch(N){console.debug("webgl filter exception: "+N.message)}},_setupHistTexture:function(a){if(a instanceof WebGLTexture)return a;var b=this.originalHistTexture=this._createTexture(),h=this.gl;a=a.pixelBlock;var g=a.width,k=a.height;h.getExtension("OES_texture_float");this.rgbaFloatData=a.getAsRGBAFloat();h.texImage2D(h.TEXTURE_2D,0,h.RGBA,g,k,0,h.RGBA,h.FLOAT,this.rgbaFloatData);return b}})})},"esri/layers/rasterLib/function/RemapFunction":function(){define("dojo/_base/declare dojo/_base/lang ../../../renderers/colorRampGenerator ./RasterFunctionX ./pixelShaders ./RasterFunctionWebGLMixin ./rasterUtils".split(" "),
function(H,e,m,n,q,d,c){return H([n,d],{declaredClass:"esri.layers.rasterLib.function.RemapFunction",functionName:"Remap",pixelType:"U8",renderTexture:!1,supportWebGL:!0,support2D:!0,constructor:function(a){this.functionArguments=this.mixinIgnoreCase({inputRanges:null,outputValues:null,outputColors:null,colorBreaks:null,raster:null},a)},bind:function(a){a=this.getSourceRasterInfo(a);if(!a.raster)return Error("The raster input is not available.");var b=!(!this.functionArguments.outputColors&&!this.functionArguments.colorBreaks);
this.rasterInfo=e.mixin(a.raster,{bandCount:b?3:1,pixelType:this._calculatePixelType(this.pixelType,"U8"),statistics:null,histograms:null});this.rasterInfo.keyProperties=this.rasterInfo.keyProperties||{};this.rasterInfo.keyProperties.DataType=b?"Processed":"Thematic";return!0},read2D:function(a){return this._remap(a.raster)},readGL:function(a){return this._remapGL(a.raster)},_remap:function(a){this._performance.start();var b=c.remapColor(a.pixelBlock,this.functionArguments.colorBreaks);this._addPerformanceMetric(this._performance.elapsed());
return{extent:a.extent,pixelBlock:b}},_remapGL:function(a){this._performance.start();this._initializeProgram({fragment:q.remap,fragmentName:"Remap"});var b=new Uint8Array(64),h=this.functionArguments.colorBreaks;h.forEach(function(l,p){b[4*p]=l.mappedColor[0];b[4*p+1]=l.mappedColor[1];b[4*p+2]=l.mappedColor[2];b[4*p+3]=1>=l.mappedColor[3]?255*l.mappedColor[3]:l.mappedColor[3]});var g=h[h.length-1],k=g.mappedColor;b[60]=k[0];b[61]=k[1];b[62]=k[2];b[63]=1>=k[3]?255*k[3]:k[3];var f=new Float32Array(16);
h.forEach(function(l,p){f[p]=l.value});f[15]=g.value;this._clrTexture||(this._clrTexture=this._setupColormapTexture(b));h=this._clrTexture;g=this.bindFrameBuffer();a=this._setupTextureData(a);this._setUniforms({u_indexedColormapOffset:0,u_indexedColormapMaxIndex:b.length/4-1,u_breaks:f});this._bindTexture(h,"u_image1");this._bindTexture(a.texture,"u_image");this._drawGL();return{extent:a.extent,texture:g.texture}},_setupColormapTexture:function(a){var b=this._createTexture(),h=a.length/4,g=new Float32Array(a.length),
k=this.renderTexture?255:1,f,l=this.gl;for(f=0;f<a.length;f++)g[f]=a[f]/k;l.getExtension("OES_texture_float");l.texImage2D(l.TEXTURE_2D,0,l.RGBA,h,1,0,l.RGBA,l.FLOAT,g);return b}})})},"esri/layers/rasterLib/function/IdentityFunction":function(){define(["dojo/_base/declare","dojo/_base/lang","./pixelShaders","./RasterFunctionX","./RasterFunctionWebGLMixin"],function(H,e,m,n,q){return H([n,q],{declaredClass:"esri.layers.rasterLib.function.IdentityFunction",functionName:"Identity",supportWebGL:!0,support2D:!0,
constructor:function(d){this.functionArguments={raster:null}},bind:function(d){d=this.getSourceRasterInfo(d);if(!d.raster)return Error("The raster input to identity function is invalid.");this.rasterInfo=e.mixin(d.raster,{});return!0},read2D:function(d){return d.raster},readGL:function(d){this._initializeProgram({fragment:m.identity,fragmentName:"identity"});d=this._setupTextureData(d.raster);var c=this.bindFrameBuffer();this._bindTexture(d.texture,"u_image");this._drawGL();return{extent:d.extent,
texture:c.texture}}})})},"esri/layers/rasterLib/function/ResampleFunction":function(){define(["dojo/_base/declare","dojo/_base/lang","./pixelShaders","./RasterFunctionX","./RasterFunctionWebGLMixin"],function(H,e,m,n,q){return H([n,q],{declaredClass:"esri.layers.rasterLib.function.ResampleFunction",renderTexture:!0,resamplingOrigin:null,resamplingRatio:null,zFactor:1,functionName:"Resample",supportWebGL:!0,support2D:!1,constructor:function(d){this.functionArguments=this.mixinIgnoreCase({resamplingType:0},
d)},bind:function(d){d=this.getSourceRasterInfo(d);if(!d.raster)return Error("The raster input to convolution function is invalid.");this.rasterInfo=e.mixin(d.raster,{bandCount:d.raster.bandCount,pixelType:this._calculatePixelType(this.pixelType,d.raster.pixelType),statistics:d.raster.statistics,histograms:d.raster.histograms});this.rasterInfo.keyProperties=this.rasterInfo.keyProperties||{};return!0},readGL:function(d){this._performance.start();this._initializeProgram({fragment:m.resample,fragmentName:"Resample"});
var c=this._setupTextureData(d.raster),a=this.bindFrameBuffer(),b=this.gl,h=b.drawingBufferWidth;b=b.drawingBufferHeight;var g=d.raster;void 0!==g.pixelBlock?(c=c||this._setupTextureData(g),d=g.pixelBlock.width,g=g.pixelBlock.height):(c=c||g,d=h,g=b);this._setUniforms({u_resamplingRatio:this.resamplingRatio||[d/h,g/b],u_anchor:this.resamplingOrigin||[0,1],u_resamplingType:this.functionArguments.resamplingType,u_resolution:[1/h,1/b]});this._drawGL();this._addPerformanceMetric(this._performance.elapsed());
return{extent:c.extent,texture:a.texture}}})})},"esri/layers/rasterLib/renderer/rasterRendererHelper":function(){define("dojo/_base/declare dojo/_base/lang ../../PixelBlock ./RasterColormapRenderer ./RasterUniqueValueRenderer ./RasterRGBRenderer ./RasterStretchColorRampRenderer ./RasterClassBreaksRenderer ./RasterShadedReliefRenderer".split(" "),function(H,e,m,n,q,d,c,a,b){var h=function(){function g(f){k[f.prototype.rendererName]=f}var k={};g(n);g(d);g(c);g(q);g(a);g(b);return k}();return{wellKnownRenderers:h,
isSupported:function(g){if(!g)return!1;var k=!0;h[g.rendererName]||(k=!1);return k},create:function(g){if(!g)return null;if(g.rendererName){var k=g.rendererName;g=g.rendererArguments}else k="uniqueValue rasterStretch rasterShadedRelief rgb rasterColormap classBreaks".split(" ").indexOf(g.type),k="UniqueValue Stretch ShadedRelief RGB Colormap ClassBreaks".split(" ")[k],"rasterStretch"===g.type&&g.bandIndex&&1<g.bandIndex.length&&(k="RGB");return(k=h[k])?new k(g):null},createDefaultRenderer:function(g){if(g&&
g.raster){var k=g.raster.rasterInfo,f=g.raster.dataType;if(k){var l=g.raster.rasterFunction,p=["Stretch","Colormap","ContrastAndBrightness"];if(l&&"U8"===k.pixelType&&-1<p.indexOf(l.functionName))l.renderTexture=!0;else if("Processed"!==f||!(g.useWebGL&&l&&l.renderTexture||!g.useWebGL&&"U8"===k.pixelType)){l&&(k=l.rasterInfo);l=k.bandCount;var r=k.colormap,w=k.vat;p=k.histograms;p&&0===p.length&&(p=null);var u=k.statistics&&k.statistics.map(function(E){return[E.min,E.max,E.mean,E.stddev]});if(1===
l&&r&&0<r.length)var B=this._getDefaultColormapRenderer(w,r);else if(1===l&&w&&w.features&&0<w.features.length)B=new q({});else{r=0;w=!1;f||!g.raster||!g.raster.tileInfo||void 0!==g.raster.tileInfo.tileType&&"Map"!==g.raster.tileInfo.tileType?"U8"===k.pixelType&&"Processed"===f?(r=5,u=u||[[0,255,0,0],[0,255,0,0],[0,255,0,0]],w=!1):"U8"===k.pixelType||"Elevation"===f?(r=5,w=u?!1:!0):"Scientific"===f||"StdTime"===f?(r=5,w=u?!1:!0,B=this._getDefaultScientificColorRamp()):p&&0<p.length?(r=6,w=!1):u?(r=
5,w=!1):(r=6,w=!0):(u=[[0,255,0,0],[0,255,0,0],[0,255,0,0]],r=5,w=!1);u||(r=5,w=!0);var x;3<=l&&!(g.bandIds||g.raster&&g.raster.imageServiceParams&&g.raster.imageServiceParams.bandIds)&&(x=this.getDefaultBandCombination(k));x&&(u=x.map(function(E){return u[E]}));g={stretchType:r,min:0,max:255,dra:w,minPercent:.25,maxPercent:.25,useGamma:!1,computeGamma:!1,statistics:u,histograms:p,numberOfStandardDeviations:2.5,bandIndex:x};1===l||x&&1===x.length?(B&&(g.colorRamp=B,g.invert=!1),B=new c(g)):B=new d(g)}return B}}}},
getDefaultBandCombination:function(g){var k=g.bandCount;if(1===k)return null;if(2===k)return[0];var f=(g=g.keyProperties)&&g.ChangeAnalysisParameters&&g.ChangeAnalysisParameters.AnalysisType;if(f&&("ccdc"===f.toLowerCase()||"landtrendr"===f.toLowerCase()))return[0];g=g&&g.BandProperties;var l;if(g&&g.length===k){var p=this.getWellKnownBandIndexes(g);g=p.red;f=p.green;var r=p.blue;p=p.nir;null!=g&&null!=f&&null!=r?l=[g,f,r]:null!=p&&null!=g&&null!=f&&(l=[p,g,f])}!l&&3<=k&&(l=[0,1,2]);return l},getWellKnownBandIndexes:function(g){for(var k=
{},f=0;f<g.length;f++){var l=g[f],p=l.BandName&&l.BandName.toLowerCase();"red"===p?k.red=f:"green"===p?k.green=f:"blue"===p?k.blue=f:"nearinfrared"===p||"nearinfrared_1"===p||"nir"===p?k.nir=f:l.WavelengthMax&&l.WavelengthMin&&(p=l.WavelengthMin,l=l.WavelengthMax,null==k.blue&&410<=p&&480>=p&&480<=l&&540>=l?k.blue=f:null==k.green&&490<=p&&560>=p&&560<=l&&610>=l?k.green=f:null==k.red&&595<=p&&670>=p&&660<=l&&730>=l?k.red=f:null==k.nir&&700<=p&&860>=p&&800<=l&&950>=l&&(k.nir=f))}return k},_getDefaultColormapRenderer:function(g,
k){if(k||k.length){var f=[],l=this._ratContainsColormap(g);if(l)var p=this._getRATValueClassNameMap(g);k.forEach(function(r){var w=p?p[r[0]]:r[0];f.push({color:[r[1],r[2],r[3]],value:r[0],label:l?null!=w?w:"":r[0]})});return new n({colormapInfos:f})}},_ratContainsColormap:function(g){if(!g||!g.fields)return!1;var k,f,l;return g.fields.some(function(p){p&&p.name&&(p=p.name.toLowerCase(),"red"===p&&(k=!0),"green"===p&&(f=!0),"blue"===p&&(l=!0));return k&&f&&l})},_getRATValueClassNameMap:function(g){if(!g||
!g.fields)return null;var k={},f,l;g.fields.forEach(function(p){if("classname"===p.name.toLowerCase()||"class_name"===p.name.toLowerCase())f=p.name;"value"===p.name.toLowerCase()&&(l=p.name)});g.features.forEach(function(p){p=p.attributes;k[p[l]]=f?p[f]:p[l]});return k},_getDefaultScientificColorRamp:function(){return{type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}].map(function(g){return{fromColor:g.toColor,
toColor:g.fromColor}}).reverse()}}}})},"esri/layers/rasterLib/renderer/RasterColormapRenderer":function(){define(["dojo/_base/declare","dojo/_base/lang","./RasterRenderer","../function/ColormapFunction"],function(H,e,m,n){return H([m],{declaredClass:"esri.layers.rasterLib.renderer.RasterColormapRenderer",rendererName:"Colormap",renderTexture:!0,constructor:function(q){q&&q.colormapInfos&&(q.colormap=q.colormapInfos.map(function(d){return[d.value].concat(d.color)}));this._function=new n(q);this._function.outputPixelType=
"U8";this._function.renderTexture=!0},draw2D:function(q){this._updateColormapParameters();q=this._clonePixelData(q);return q=this._function._colorize(q)},drawGL:function(q){this._updateColormapParameters();this._function._colorizeGL(q)},toJson:function(){var q=this._function.toJson().rasterFunctionArguments;return{rendererName:this.rendererName,rendererArguments:q}},toCommonRendererJson:function(){return{type:"rasterColormap",colormapInfos:this.colormapInfos||this.colormap.map(function(q){return{value:q[0],
color:q.slice(1),label:q[0]}})}},_updateColormapParameters:function(){var q=this._function.functionArguments;q.colormap=this.colormap;q.colormapName=this.colormapName;q.colorRamp=this.colorRamp;q.colorRampName=this.colorRampName}})})},"esri/layers/rasterLib/renderer/RasterRenderer":function(){define(["dojo/_base/declare","dojo/_base/lang","../../../geometry/Extent","../../PixelBlock"],function(H,e,m,n){return H(null,{declaredClass:"esri.layers.rasterLib.renderer.RasterRenderer",raster:null,constructor:function(q){q=
q||{};this.raster=q.raster||q.Raster||this.raster;this.draw=e.hitch(this,this.draw);this.bind=e.hitch(this,this.bind);q=e.clone(q);Object.keys(q).forEach(function(d){null==q[d]&&delete q[d]});e.mixin(this,q)},bind:function(q){if(!q)throw"failed to bind without options";var d=q;q.layer&&(q=q.layer,d={id:q.id,rawRasterInfo:q.raster.rasterInfo,glSetting:q._glSetting,xformSetting:q.tileManager&&q.tileManager.xformSetting,useWebGL:q.useWebGL,resampling:q.tileMode&&q.tileManager&&q.tileManager.xformSetting.requireProjection&&
!q._hasTilingEffects&&"Thematic"!==q.raster.dataType?1:0,tileMode:q.tileMode});this._rawRasterInfo=d.rawRasterInfo;this.useWebGL=d.useWebGL;this._function&&this._function.setProcessingContext(e.mixin({useProcessedData:!0},d));this._processingContext=d},hasTilingEffects:function(){},draw:function(q){return this.useWebGL?this.drawGL(q):this.draw2D(q)},toJson:function(){},_clonePixelData:function(q){if(null==q)return q;var d={};q.extent&&(d.extent=new m(q.extent.xmin,q.extent.ymin,q.extent.xmax,q.extent.ymax,
q.extent.spatialReference));q=q.processedPixelBlock||q.pixelBlock;if(null==q)return d;d.pixelBlock=q.clone?q.clone():n.prototype.clone(q);return d}})})},"esri/layers/rasterLib/renderer/RasterUniqueValueRenderer":function(){define(["dojo/_base/declare","dojo/_base/lang","./RasterRenderer","../function/ColormapFunction","../../../renderers/colorRampGenerator"],function(H,e,m,n,q){return H([m],{declaredClass:"esri.layers.rasterLib.renderer.RasterUniqueValueRenderer",rendererName:"UniqueValue",field:"",
alias:"",uniqueValueInfos:null,constructor:function(d){d&&d.colormap&&(this.colormap=d.colormap,this._function=new n(d),this._function.outputPixelType="U8",this._function.renderTexture=!0)},bind:function(d){this.inherited(arguments);if(!this._function){var c=(this.raster&&this.raster.rasterInfo||this._rawRasterInfo).vat;if(!c)throw"uv renderer requires data source to have raster attribute table";var a=this.attributeField||this.field1||this.field,b=this.infos||this.uniqueValueInfos;this.defaultColor=
this.defaultColor||this.defaultSymbol&&this.defaultSymbol.color;var h=c.fields.filter(function(B){return"value"===B.name.toLowerCase()})[0];if(h)var g=h.name;a||((a=c.fields.filter(function(B){return-1<["classname","category"].indexOf(B.name.toLowerCase())})[0])||(a=c.fields.filter(function(B){return"esriFieldTypeString"===B.type})[0]),this.alias=(this.field=a=a&&a.name||g)&&a.alias||g);var k=[],f;if(!b){b=[];var l=c.fields.filter(function(B){return"alpha"===B.name.toLowerCase()})[0];var p=c.fields.filter(function(B){return"red"===
B.name.toLowerCase()})[0];var r=c.fields.filter(function(B){return"green"===B.name.toLowerCase()})[0];var w=c.fields.filter(function(B){return"blue"===B.name.toLowerCase()})[0];for(h=0;h<c.features.length;h++){var u=c.features[h].attributes;(f=b.some(function(B){B.value===u[a]}))||(l&&p&&r&&w?b.push({value:u[a],alias:u[a],color:[u[p.name],u[r.name],u[w.name],u[l.name]]}):p&&r&&w?b.push({value:u[a],alias:u[a],color:[u[p.name],u[r.name],u[w.name]]}):b.push({value:u[a],alias:u[a]}))}if(!(p&&r&&w))for(f=
q.createRandomColorRamp({size:b.length}),h=0;h<b.length;h++)b[h].color=f[h];this.uniqueValueInfos=b}if(b)b.forEach(function(B){k=k.concat(c.features.filter(function(x){return B.value==x.attributes[a]}).map(function(x){return[x.attributes[g]].concat(B.color||B.symbol&&B.symbol.color)}))}),this.defaultColor&&c.features.filter(function(B){k.some(function(x){return x[0]===B.attributes[g]})||k.push([B.attributes[g]].concat(this.defaultColor))});else throw"missing uniqueValueInfos property";this._function=
new n({colormap:k});this.colormap=k;this._function.outputPixelType="U8";this._function.renderTexture=!0;this._function.setProcessingContext(this._processingContext)}},draw2D:function(d){d=this._clonePixelData(d);return d=this._function._colorize(d)},drawGL:function(d){this._function._colorizeGL(d)},toJson:function(d){var c={field:this.field,uniqueValueInfos:this.uniqueValueInfos,defaultColor:this.defaultColor};d&&(c.colormap=this.colormap);return{rendererName:this.rendererName,rendererArguments:c}},
toCommonRendererJson:function(){var d=this.attributeField||this.field1||this.field,c=(this.infos||this.uniqueValueInfos).map(function(a){return{value:a.value,label:a.alias+"",symbol:{color:3===a.color.length?a.color.concat([255]):a.color,type:"esriSFS",style:"esriSFSSolid"}}});return{type:"uniqueValue",field1:d,uniqueValueInfos:c}}})})},"esri/layers/rasterLib/renderer/RasterRGBRenderer":function(){define("dojo/_base/declare dojo/_base/lang ./RasterRenderer ../function/StretchFunction ../function/ContrastBrightnessFunction ../function/rasterUtils".split(" "),
function(H,e,m,n,q,d){return H([m],{declaredClass:"esri.layers.rasterLib.renderer.RasterRGBRenderer",rendererName:"RGB",bandIndex:null,stretchType:0,min:0,max:255,numberOfStandardDeviations:2,statistics:null,histograms:null,dra:!1,minPercent:.25,maxPercent:.5,useGamma:!1,gamma:null,computeGamma:!1,sigmoidStrengthLevel:1,constructor:function(c){this.stretchType="number"===typeof this.stretchType?this.stretchType:"none   standardDeviation histogramEqualization minMax percentClip   sigmoid".split(" ").indexOf(this.stretchType);
c=e.mixin({},c,{stretchType:this.stretchType});this._stretchFunction=new n(c);this._stretchFunction.outputPixelType="U8";this._stretchFunction.renderTexture=!1;this.bandIndex=c.bandIndex||c.BandIndex;this._function=new q(c);this._function.functionArguments.raster=this._stretchFunction;this._function.renderTexture=!0},hasTilingEffects:function(){return this._stretchFunction.hasTilingEffects()},draw2D:function(c){this._updateStretchParameters();c=this._clonePixelData(c);if("U8"===c.pixelBlock.pixelType&&
!this.contrastOffset&&!this.brightnessOffset)return c;this._stretchFunction._stretch(c);var a=c.pixelBlock,b=this.bandIndex,h=Math.max.apply(null,b);a&&a.pixels.length>h&&b&&(a.pixels=b.map(function(g){return a.pixels[g]}),a.statistics&&(a.statistics=b.map(function(g){return a.statistics[g]})));if(this.contrastOffset||this.brightnessOffset)c.pixelBlock=d.contrastBrightnessStretch(c.pixelBlock,{contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset});return c},drawGL:function(c){this._updateStretchParameters();
c.pixelBlock&&(c=this._clonePixelData(c));var a=c.pixelBlock,b=this.bandIndex,h=Math.max.apply(null,b),g=this.statistics&&0<this.statistics.length?this.statistics:this._stretchFunction&&this._stretchFunction.srcStatistics,k=this.histograms&&0<this.histograms.length?this.histograms:this._stretchFunction&&this._stretchFunction.srcHistograms,f,l;a&&a.pixels.length>h&&b&&(a.pixels=b.map(function(p){return a.pixels[p]}),a.statistics&&(a.statistics=b.map(function(p){return a.statistics[p]})),g&&0<g.length&&
g.length!==b.length&&(f=b.map(function(p){return g[p]})),k&&0<k.length&&k.length!==b.length&&(l=b.map(function(p){return k[p]})));this._stretchFunction.functionArguments.statistics=f||g;this._stretchFunction.functionArguments.histograms=l||k;this.contrastOffset||this.brightnessOffset?(this._stretchFunction.renderTexture=!1,this._function.renderTexture=!0,c=this._stretchFunction._stretchGL(c),this._function._cbGL(c)):(this._stretchFunction.renderTexture=!0,this._stretchFunction._stretchGL(c))},toJson:function(){var c=
this._stretchFunction.toJson().rasterFunctionArguments;c.bandIndex=this.bandIndex;c.contrastOffset=this.contrastOffset;c.brightnessOffset=this.brightnessOffset;return{rendererName:this.rendererName,rendererArguments:c}},toCommonRendererJson:function(){return{type:"rasterStretch",stretchType:"none   standardDeviation histogramEqualization minMax percentClip   sigmoid".split(" ")[this.stretchType]||"minMax",min:this.min,max:this.max,numberOfStandardDeviations:this.numberOfStandardDeviations,statistics:e.clone(this.statistics),
dra:this.dra,minPercent:this.minPercent,maxPercent:this.maxPercent,useGamma:this.useGamma,gamma:e.clone(this.gamma),computeGamma:this.computeGamma,sigmoidStrengthLevel:this.sigmoidStrengthLevel}},_updateStretchParameters:function(){var c=this._stretchFunction.functionArguments;c.stretchType=this.stretchType;c.min=this.min;c.max=this.max;c.numberOfStandardDeviations=this.numberOfStandardDeviations;c.statistics=this.statistics;c.histograms=this.histograms;c.dra=this.dra;c.minPercent=this.minPercent;
c.maxPercent=this.maxPercent;c.useGamma=this.useGamma;c.gamma=this.gamma;c.computeGamma=this.computeGamma;this._stretchFunction.interpolation=this.interpolation}})})},"esri/layers/rasterLib/renderer/RasterStretchColorRampRenderer":function(){define("dojo/_base/declare dojo/_base/lang ./RasterRenderer ../function/ResampleFunction ../function/StretchFunction ../function/ContrastBrightnessFunction ../function/ColormapFunction ../function/rasterUtils".split(" "),function(H,e,m,n,q,d,c,a){return H([m],
{declaredClass:"esri.layers.rasterLib.renderer.RasterStretchColorRampRenderer",rendererName:"Stretch",bandIndex:[0],colorRamp:null,invert:!1,stretchType:0,min:0,max:255,numberOfStandardDeviations:2,statistics:null,histograms:null,dra:!1,minPercent:.25,maxPercent:.5,useGamma:!1,gamma:null,computeGamma:!1,sigmoidStrengthLevel:1,constructor:function(b){this.stretchType="number"===typeof this.stretchType?this.stretchType:"none   standardDeviation histogramEqualization minMax percentClip   sigmoid".split(" ").indexOf(this.stretchType);
b=e.mixin({},b,{stretchType:this.stretchType});Object.keys(b).forEach(function(h){null==b[h]&&delete b[h]});this._function=new d(b);this._stretchFunction=new q(b);this._stretchFunction.outputPixelType="U8";this._stretchFunction.renderTexture=!1;this._clrFunction=new c(b);this._clrFunction.functionArguments.raster=this._stretchFunction;this._clrFunction.renderTexture=!1;this._function.functionArguments.raster=this._clrFunction},hasTilingEffects:function(){return this._stretchFunction.hasTilingEffects()},
draw2D:function(b){this._updateStretchParameters();b=this._clonePixelData(b);if("U8"===b.pixelBlock.pixelType&&!(this.contrastOffset||this.brightnessOffset||this.colorRamp))return b;this._stretchFunction._stretch(b);var h=b.pixelBlock,g=this.bandIndex?this.bandIndex[0]:0;h&&1<h.pixels.length&&h.pixels.length>g&&(h.pixels=[h.pixels[g]],h.statistics&&(h.statistics=[h.statistics[g]]));this.colorRamp&&(b=this._clrFunction._colorize(b));if(this.contrastOffset||this.brightnessOffset)b.pixelBlock=a.contrastBrightnessStretch(b.pixelBlock,
{contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset});return b},drawGL:function(b){this._updateStretchParameters();b.pixelBlock&&(b=this._clonePixelData(b));var h=b.pixelBlock,g=this.bandIndex?this.bandIndex[0]||0:0,k=this.statistics&&0<this.statistics.length?this.statistics:this._stretchFunction&&this._stretchFunction.srcStatistics,f=this.histograms&&0<this.histograms.length?this.histograms:this._stretchFunction&&this._stretchFunction.srcHistograms,l,p;h&&1<h.pixels.length&&
h.pixels.length>g&&(h.pixels=[h.pixels[g]],h.statistics&&(h.statistics=[h.statistics[g]]),k&&k.length>g&&(l=[k[g]]),f&&f.length>g&&(p=[f[g]]));this._stretchFunction.functionArguments.statistics=l||k;this._stretchFunction.functionArguments.histograms=p||f;h=!!this.colorRamp;this.contrastOffset||this.brightnessOffset?(this._stretchFunction.renderTexture=!1,this._clrFunction.renderTexture=!1,this._function.renderTexture=!0,b=this._stretchFunction._stretchGL(b),h&&(b=this._clrFunction._colorizeGL(b)),
this._function._cbGL(b)):h?(this._stretchFunction.renderTexture=!1,this._clrFunction.renderTexture=!0,b=this._stretchFunction._stretchGL(b),this._clrFunction._colorizeGL(b)):(this._stretchFunction.renderTexture=!0,this._stretchFunction._stretchGL(b))},toJson:function(){var b=this._stretchFunction.toJson().rasterFunctionArguments;b.colorRamp=this.colorRamp||"";this.invert&&(b.invert=!0);b.contrastOffset=this.contrastOffset;b.brightnessOffset=this.brightnessOffset;return{rendererName:this.rendererName,
rendererArguments:b}},toCommonRendererJson:function(){return{type:"rasterStretch",stretchType:"none   standardDeviation histogramEqualization minMax percentClip   sigmoid".split(" ")[this.stretchType]||"minMax",colorRamp:this.colorRamp&&this.colorRamp.toJson?this.colorRamp.toJson():this.colorRamp,min:this.min,max:this.max,numberOfStandardDeviations:this.numberOfStandardDeviations,statistics:e.clone(this.statistics),dra:this.dra,minPercent:this.minPercent,maxPercent:this.maxPercent,useGamma:this.useGamma,
gamma:e.clone(this.gamma),computeGamma:this.computeGamma,sigmoidStrengthLevel:this.sigmoidStrengthLevel}},_updateStretchParameters:function(){var b=this._stretchFunction.functionArguments;b.stretchType=this.stretchType;b.min=this.min;b.max=this.max;b.numberOfStandardDeviations=this.numberOfStandardDeviations;b.statistics=this.statistics;b.histograms=this.histograms;b.dra=this.dra;b.minPercent=this.minPercent;b.maxPercent=this.maxPercent;b.useGamma=this.useGamma;b.gamma=this.gamma;b.computeGamma=this.computeGamma;
this._stretchFunction.interpolation=this.interpolation}})})},"esri/layers/rasterLib/renderer/RasterClassBreaksRenderer":function(){define(["dojo/_base/declare","dojo/_base/lang","./RasterRenderer","../function/ColormapFunction","../function/RemapFunction"],function(H,e,m,n,q){return H([m],{declaredClass:"esri.layers.rasterLib.renderer.RasterClassBreaksRenderer",rendererName:"ClassBreaks",renderTexture:!0,constructor:function(d){d=d||{};this._function=new q(d);this._function.outputPixelType="U8";var c=
d.classBreakInfos;d=d.minValue;null!=d&&c&&(this._function.functionArguments.colorBreaks=this._getSortedColorBreaks(d,c))},bind:function(d){this.inherited(arguments);this.isColormapFunction=!1;var c=this.raster&&this.raster.rasterInfo||this._rawRasterInfo,a=c&&c.vat;if(a&&"u8"===c.pixelType.toLowerCase()&&this.classBreakInfos){var b=this.field;if(c=a.fields.filter(function(p){return"value"===p.name.toLowerCase()})[0])var h=c.name;var g=a.features.sort(function(p,r){return parseFloat(p.attributes[b])-
parseFloat(r.attributes[b])})[0].attributes[b];this.isColormapFunction=!0;var k=[],f=this.field,l=this.classBreakInfos;l.forEach(function(p,r){a.features.forEach(function(w){var u=l[r-1]&&l[r-1].classMaxValue||g;w.attributes[f]<=p.classMaxValue&&(w.attributes[f]>u||w.attributes[f]===g)&&(u=p.symbol.color,k.some(function(B){return B[0]===w.attributes[h]})||k.push([w.attributes[h]].concat(u)))})});this._function=new n({colormap:k});this.colormap=k;this._function.outputPixelType="U8";this._function.renderTexture=
!0}this._function&&this._function.setProcessingContext(e.mixin({useProcessedData:!0},this._processingContext))},draw2D:function(d){if(this.isColormapFunction)return this._updateColormapParameters(),d=this._clonePixelData(d),d=this._function._colorize(d);this._updateRemapParameters();return this._function._remap(d)},drawGL:function(d){this.isColormapFunction?(this._updateColormapParameters(),this._function._colorizeGL(d)):(this._function.renderTexture=!0,this._updateRemapParameters(),this._function._remapGL(d))},
toJson:function(){var d=this._function.toJson().rasterFunctionArguments;return{rendererName:this.rendererName,rendererArguments:d}},toCommonRendererJson:function(){var d,c=this.classBreakInfos,a=this.colorBreaks;if(null==c&&a)for(c=[],d=0;d<a.length-1;d++)c.push({classMaxValue:a[d+1].value,symbol:{color:a[d].mappedColor,type:"esriSFS",style:"esriSFSSolid"},label:a[d].value+" - "+a[d+1].value});return{type:"classBreaks",field:"Value",minValue:null!=this.minValue?this.minValue:a[0].value,classBreakInfos:c}},
_updateRemapParameters:function(){var d=this.classBreakInfos,c=this.minValue;null!=c&&d&&(this._function.functionArguments.colorBreaks=this._getSortedColorBreaks(c,d))},_getSortedColorBreaks:function(d,c){c=c.map(function(b){return{maxValue:b.classMaxValue,color:b.symbol.color}}).sort(function(b,h){return b.maxValue-h.maxValue});var a=[{value:d,mappedColor:c[0].color}];for(d=0;d<c.length;d++)a.push({value:c[d].maxValue,mappedColor:d===c.length-1?c[d].color:c[d+1].color});return a},_updateColormapParameters:function(){this._function.functionArguments.colormap=
this.colormap;this._function.interpolation=this.interpolation}})})},"esri/layers/rasterLib/renderer/RasterShadedReliefRenderer":function(){define("dojo/_base/declare dojo/_base/lang ./RasterRenderer ../function/HillshadeFunction ../function/ContrastBrightnessFunction ../function/ColormapFunction ../function/rasterUtils".split(" "),function(H,e,m,n,q,d,c){return H([m],{declaredClass:"esri.layers.rasterLib.renderer.RasterShadedReliefRenderer",rendererName:"ShadedRelief",hillshadeType:null,azimuth:315,
altitude:45,zFactor:1,slopeType:null,psPower:.664,psFactor:.024,raster:null,constructor:function(a){this.hillshadeType="number"===typeof this.hillshadeType?this.hillshadeType:["traditional","multi-directional"].indexOf(this.hillshadeType);a&&a.scalingType&&(this.slopeType="adjusted"===a.scalingType?3:1);a&&a.pixelSizePower&&(this.psPower=a.pixelSizePower);a&&a.pixelSizeFactor&&(this.psFactor=a.pixelSizeFactor);a=e.mixin({},a,{hillshadeType:this.hillshadeType,psPower:this.psPower,psFactor:this.psFactor,
slopeType:this.slopeType});Object.keys(a).forEach(function(b){null==a[b]&&delete a[b]});this._function=new q(a);this._hillshadeFunction=new n(a);this._hillshadeFunction.outputPixelType="U8";this._hillshadeFunction.renderTexture=!1;this._function.functionArguments.raster=this._hillshadeFunction},hasTilingEffects:function(){return this._hillshadeFunction.hasTilingEffects()},draw2D:function(a){this._updateHillshadeParameters();a=this._clonePixelData(a);a=this._hillshadeFunction.read2D({raster:a});if(this.contrastOffset||
this.brightnessOffset)a.pixelBlock=c.contrastBrightnessStretch(a.pixelBlock,{contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset});return a},drawGL:function(a){this._updateHillshadeParameters();this.contrastOffset||this.brightnessOffset?(this._hillshadeFunction.renderTexture=!1,this._function.renderTexture=!0,a=this._hillshadeFunction.readGL({raster:a}),this._function._cbGL(a)):(this._hillshadeFunction.renderTexture=!0,this._hillshadeFunction.readGL({raster:a}))},toJson:function(){var a=
this._hillshadeFunction.toJson().rasterFunctionArguments;a.colorRamp=this.colorRamp||"";this.invert&&(a.invert=!0);a.contrastOffset=this.contrastOffset;a.brightnessOffset=this.brightnessOffset;return{rendererName:this.rendererName,rendererArguments:a}},toCommonRendererJson:function(){return{type:"rasterShadedRelief",hillshadeType:["traditional","multi-directional"][this.hillshadeType]||"traditional",azimuth:this.azimuth,altitude:this.altitude,zFactor:this.zFactor,scalingType:3===this.slopeType?"adjusted":
"none",pixelSizePower:this.psPower,pixelSizeFactor:this.psFactor,colorRamp:this.colorRamp&&this.colorRamp.toJson?this.colorRamp.toJson():this.colorRamp}},_updateHillshadeParameters:function(){var a=this._hillshadeFunction.functionArguments;a.hillshadeType=this.hillshadeType;a.azimuth=this.azimuth;a.altitude=this.altitude;a.zFactor=this.zFactor;a.slopeType=this.slopeType;a.psPower=this.psPower;a.psFactor=this.psFactor}})})},"esri/layers/rasterLib/raster/rasterProjectionHelper":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/sniff ../../../kernel ../../../WKIDUnitConversion ../../../geometry/Extent ../../../geometry/projection ../../../geometry/webMercatorUtils ../../../SpatialReference ../../../geometry/Point".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g){H={requirePE:function(f,l){return!(f.equals(l)||f._canProject(l))},load:function(){var f=new m;if(!this._loadPromise)if(a.isSupported())this._loadPromise=a.load();else{var l=new m;l.reject("projection engine is not supported on this version of the browser, please try with a modern browser");this._loadPromise=l.promise}this._loadPromise.isFulfilled()?this._loadPromise.isResolved()?f.resolve():this._loadPromise.isRejected()&&f.resolve():(this._pendingdfds=this._pendingdfds||
[],this._pendingdfds.push(f),this._loadPromise.then(e.hitch(this,function(){this._pendingdfds.forEach(function(p){p.isFulfilled()||p.resolve()})}),e.hitch(this,function(){this._pendingdfds.forEach(function(p){p.isFulfilled()||p.reject()})})));return f.promise},computeError:function(f,l){return[Math.abs((f[0]+f[4]+f[4*l.rows]+f[4*l.rows+4])/4-f[2*l.rows+2]),Math.abs((f[1]+f[5]+f[4*l.rows+1]+f[4*l.rows+5])/4-f[2*l.rows+3])]},getDefaultDatumTransformationForDataset:function(f,l,p){if(!(l&&f.spatialReference&&
this.requirePE(f.spatialReference,l)&&a.isLoaded()))return null;f=new c(f.toJson());l=new h(l.toJson());return p?a.getTransformation(l,f.spatialReference,f):a.getTransformation(f.spatialReference,l,f)},project:function(f,l,p){if(!l||f.spatialReference.equals(l))return f;var r=a.isLoaded()?a:b;"esri.geometry.Extent"===f.declaredClass?f=new c(f.toJson()):"esri.geometry.Point"===f.declaredClass&&(f=new g(f.toJson()));l=new h(l.toJson());(f=r.project(f,l))&&"esri.geometry.Extent"===f.declaredClass?(f=
new c(f.toJson()),p&&(1E-5>Math.abs(f.xmin+180)&&1E-5>Math.abs(f.xmax-180)?(f.xmin=0,f.xmax=360):(0>f.xmin&&(f.xmin+=360,f.xmax+=360),0>f.xmax&&(f.xmax+=360)))):f&&"esri.geometry.Point"===f.declaredClass&&(f=new g(f.toJson()),p&&0>f.x&&(f.x+=360));return f},projectResolution:function(f,l,p){var r=p.xmin+(p.xmax-p.xmin)/2;p=p.ymin+(p.ymax-p.ymin)/2;f=new c(r,p,r+f.x,p+f.y,f.spatialReference);f=this.project(f,l);return new g(f.xmax-f.xmin,f.ymax-f.ymin,l)},getProjectionOffsetGrid:function(f,l,p,r,w,
u,B){null==B&&(B=[32,32]);var x=f.xmin,E=f.ymin,y=f.xmax,D=f.ymax,G=f.spatialReference,A=l.spatialReference,t=a.isLoaded()?a:b,v=w?-w:null,C=B[0]*p.x,J=B[1]*p.y;y={cols:Math.ceil((y-x)/C)+1,rows:Math.ceil((D-E)/J)+1};f=[];for(D=0;D<y.cols;D++){var L=S;var S=[];for(p=0;p<y.rows;p++){var U=new g({x:x+C*D,y:E+J*p,spatialReference:G});U=t.project(U,A,u);if(!U)return null;r&&0>U.x&&(U.x+=360);S.push(U);0<D&&null!=v&&U.x<L[p].x&&(U.x+=w-v,U.x<L[p].x&&(U.x+=w-v));f.push((U.x-l.xmin)/(l.xmax-l.xmin));f.push((U.y-
l.ymin)/(l.ymax-l.ymin))}}l=this.computeError(f,y);r=new Float32Array((y.cols-1)*(y.rows-1)*12);w=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]);u=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(D=0;D<y.cols-1;D++)for(p=0;p<y.rows-1;p++){C=D*y.rows*2+2*p;x=f[C];E=f[C+1];S=f[C+2];G=f[C+3];C+=2*y.rows;A=f[C];t=f[C+1];v=f[C+2];J=f[C+3];L=0;U=12*(p*(y.cols-1)+D);for(C=0;3>C;C++)r[U++]=w[L++]*x+w[L++]*S+w[L++]*v;for(C=L=0;3>C;C++)r[U++]=w[L++]*E+w[L++]*G+w[L++]*J;for(C=L=0;3>C;C++)r[U++]=u[L++]*x+u[L++]*A+u[L++]*
v;for(C=L=0;3>C;C++)r[U++]=u[L++]*E+u[L++]*t+u[L++]*J}return{offsets:f,error:l,coefficients:r,spacing:B,size:[y.cols-1,y.rows-1]}},getHalfWorldWidth:function(f){var l=f&&f.wkid;if(null!=l)return f.isWebMercator()&&(l=3857),null==d[l]?180:k[l]}};n("extend-esri")&&e.setObject("layers.rasterLib.raster.rasterProjectionHelper",H,q);var k={3395:2.0037508342789244E7,3410:1.7334193943686873E7,3832:3339584.723798206,3857:2.0037508342788905E7,3975:1.7367530445161372E7,4087:2.0037508342789244E7,4088:2.0015108787169147E7,
6933:1.7367530445161372E7,8858:7396237.374497803,8859:2465412.4581659334,32662:2.0037508342789244E7,53001:2.001508679602057E7,53002:1.000754339801029E7,53003:2.001508679602057E7,53004:2.001508679602057E7,53016:1.4152803599503474E7,53017:1.7333573624304302E7,53025:7276828.3848298555,53031:1.0384677558821043E7,53034:2.001508679602057E7,53036:7389443.187332862,53037:2463147.729110953,53079:2.0015114352186374E7,53080:2.0015114352186374E7,54001:2.0037508342789244E7,54002:1.0018754171394624E7,54003:2.0037508342789244E7,
54004:2.0037508342789244E7,54016:1.4168658027268292E7,54017:1.736753044516137E7,54025:7311399.09166516,54031:1.0396310810074743E7,54034:2.0037508342789244E7,54050:808820.9223376509,54053:1920897.3915568967,54079:2.0037508342789244E7,54080:2.0037508342789244E7,54099:1.3524439768288724E7,54100:2.0037508342789244E7,54101:2.0037508342789244E7,102038:4297258.582585486,102299:5013965.117483125};return H})},"esri/geometry/projection":function(){define("require exports dojo/Deferred ./pe ../SpatialReference ./GeographicTransformation".split(" "),
function(H,e,m,n,q,d){function c(k,f,l,p,r){void 0===p&&(p=null);void 0===r&&(r=!1);if(null===p){var w=d.cacheKey(f,l);void 0!==g[w]?p=g[w]:(p=a(f,l,null),null===p&&(p=new d),g[w]=p)}return b._project(k,f,l instanceof q||!1===r?l:new q(l),p,r)}function a(k,f,l){void 0===l&&(l=null);k=b._getTransformation(k,f,l);return null!==k?d.fromGE(k):null}Object.defineProperty(e,"__esModule",{value:!0});var b=null;e.isLoaded=function(){return!!b&&n.isLoaded()};e.isSupported=function(){return n.isSupported()};
var h=null;e.load=function(){if(h)return h.promise;h=new m;var k=n.load();H(["./geometryEngine"],function(f){b=f;k.then(function(){b._enableProjection(n);h.resolve()},function(l){h.reject(l)})});return h.promise};e.project=function(k,f,l){void 0===l&&(l=null);return k instanceof Array?0===k.length?[]:c(k,k[0].spatialReference,f,l):c([k],k.spatialReference,f,l)[0]};var g={};e.projectMany=c;e.getTransformation=a;e.getTransformations=function(k,f,l){void 0===l&&(l=null);k=b._getTransformationBySuitability(k,
f,l);if(null!==k){f=[];for(l=0;l<k.length;l++)f.push(d.fromGE(k[l]));return f}return[]}})},"esri/geometry/pe":function(){define(["require","exports","../core/tsSupport/extendsHelper","dojo/Deferred","../core/sniff"],function(H,e,m,n,q){function d(w){function u(y,D,G){y[D]=G(y[D])}e._pe=w;k.init();f.init();l.init();p.init();r.init();e.PeGCSExtent=function(y){function D(){return null!==y&&y.apply(this,arguments)||this}m(D,y);D.prototype.destroy=function(){e._pe.destroy(this)};return D}(e._pe.PeGCSExtent);
for(var B=0,x=[e._pe.PeDatum,e._pe.PeGeogcs,e._pe.PeGeogtran,e._pe.PeObject,e._pe.PeParameter,e._pe.PePrimem,e._pe.PeProjcs,e._pe.PeSpheroid,e._pe.PeUnit];B<x.length;B++)w=x[B],u(w.prototype,"getName",function(y){return function(){return y.call(this,Array(k.PE_NAME_MAX))}});B=0;for(x=[e._pe.PeGeogtran,e._pe.PeProjcs];B<x.length;B++)w=x[B],u(w.prototype,"getParameters",function(y){return function(){for(var D=Array(k.PE_PARM_MAX),G=y.call(this),A=0;A<D.length;A++){var t=e._pe.getValue(G,"*");D[A]=t?
e._pe.wrapPointer(t,e._pe.PeParameter):null;G+=Int32Array.BYTES_PER_ELEMENT}return D}});u(e._pe.PeHorizon.prototype,"getCoord",function(y){return function(){var D=this.getSize();if(!D)return null;var G=[],A=y.call(this);h(G,D,A);return G}});u(e._pe.PeGTlistExtendedEntry.prototype,"getEntries",function(y){var D=e._pe._pe_getPeGTlistExtendedGTsSize();return function(){var G=null,A=y.call(this);if(!e._pe.compare(A,e._pe.NULL)){G=[A];var t=this.getSteps();if(1<t){A=e._pe.getPointer(A);for(var v=1;v<t;v++)G.push(e._pe.wrapPointer(A+
D*v,e._pe.PeGTlistExtendedGTs))}}return G}});var E=e._pe._pe_getPeHorizonSize();w=function(y){return function(){var D=this._cache;D||(this._cache=D=new Map);if(D.has(y))return D.get(y);var G=null,A=y.call(this);if(!e._pe.compare(A,e._pe.NULL)){G=[A];var t=A.getNump();if(1<t){A=e._pe.getPointer(A);for(var v=1;v<t;v++)G.push(e._pe.wrapPointer(A+E*v,e._pe.PeHorizon))}}D.set(y,G);return G}};u(e._pe.PeProjcs.prototype,"horizonGcsGenerate",w);u(e._pe.PeProjcs.prototype,"horizonPcsGenerate",w);e._pe.PeObject.prototype.toString=
function(y){void 0===y&&(y=k.PE_STR_OPTS_NONE);e._pe.ensureCache.prepare();var D=e._pe.getPointer(this),G=e._pe.ensureInt8(Array(k.PE_BUFFER_MAX));return e._pe.UTF8ToString(e._pe._pe_object_to_string_ext(D,y,G))}}function c(w){if(w){var u=e._pe.getClass(w);u&&(u=e._pe.getCache(u))&&(w=e._pe.getPointer(w))&&delete u[w]}}function a(w,u){var B=[];u=Array(u);for(var x=0;x<w;x++)B.push(e._pe.ensureInt8(u));return B}function b(w){if(Array.isArray(w[0])){var u=[];w.forEach(function(B){u.push(B[0],B[1])})}else u=
w;return u}function h(w,u,B,x){void 0===x&&(x=!1);if(x)for(x=0;x<2*u;x++)w[x]=e._pe.getValue(B+x*Float64Array.BYTES_PER_ELEMENT,"double");else{var E=0===w.length;for(x=0;x<u;x++)E&&(w[x]=Array(2)),w[x][0]=e._pe.getValue(B,"double"),w[x][1]=e._pe.getValue(B+Float64Array.BYTES_PER_ELEMENT,"double"),B+=2*Float64Array.BYTES_PER_ELEMENT}}Object.defineProperty(e,"__esModule",{value:!0});var g;e._pe=null;e.isLoaded=function(){return!!e._pe};e.isSupported=function(){return!!q("esri-wasm")};e.load=function(){if(g)return g.promise;
g=new n;H(["./support/pe-wasm"],function(w){w({locateFile:function(u){return H.toUrl("./support/"+u)},onAbort:function(u){g.reject(Error(u))}}).then(function(u){d(u);g.resolve()})});return g.promise};(function(w){function u(E,y,D){e._pe.ensureCache.prepare();var G=b(D),A=D===G;G=e._pe.ensureFloat64(G);(E=e._pe._pe_geog_to_proj(e._pe.getPointer(E),y,G))&&h(D,y,G,A);return E}function B(E,y,D){return x(E,y,D,0)}function x(E,y,D,G){e._pe.ensureCache.prepare();var A=b(D),t=D===A;A=e._pe.ensureFloat64(A);
(E=e._pe._pe_proj_to_geog_center(e._pe.getPointer(E),y,A,G))&&h(D,y,A,t);return E}w.geogToProj=u;w.projGeog=function(E,y,D,G){switch(G){case k.PE_TRANSFORM_P_TO_G:return B(E,y,D);case k.PE_TRANSFORM_G_TO_P:return u(E,y,D)}return 0};w.projToGeog=B;w.projToGeogCenter=x})(e.PeCSTransformations||(e.PeCSTransformations={}));var k;(function(w){w.init=function(){w.PE_BUFFER_MAX=e._pe.PeDefs.prototype.PE_BUFFER_MAX;w.PE_NAME_MAX=e._pe.PeDefs.prototype.PE_NAME_MAX;w.PE_MGRS_MAX=e._pe.PeDefs.prototype.PE_MGRS_MAX;
w.PE_USNG_MAX=e._pe.PeDefs.prototype.PE_USNG_MAX;w.PE_DD_MAX=e._pe.PeDefs.prototype.PE_DD_MAX;w.PE_DDM_MAX=e._pe.PeDefs.prototype.PE_DDM_MAX;w.PE_DMS_MAX=e._pe.PeDefs.prototype.PE_DMS_MAX;w.PE_UTM_MAX=e._pe.PeDefs.prototype.PE_UTM_MAX;w.PE_PARM_MAX=e._pe.PeDefs.prototype.PE_PARM_MAX;w.PE_TYPE_NONE=e._pe.PeDefs.prototype.PE_TYPE_NONE;w.PE_TYPE_GEOGCS=e._pe.PeDefs.prototype.PE_TYPE_GEOGCS;w.PE_TYPE_PROJCS=e._pe.PeDefs.prototype.PE_TYPE_PROJCS;w.PE_TYPE_GEOGTRAN=e._pe.PeDefs.prototype.PE_TYPE_GEOGTRAN;
w.PE_TYPE_COORDSYS=e._pe.PeDefs.prototype.PE_TYPE_COORDSYS;w.PE_TYPE_UNIT=e._pe.PeDefs.prototype.PE_TYPE_UNIT;w.PE_STR_OPTS_NONE=e._pe.PeDefs.prototype.PE_STR_OPTS_NONE;w.PE_STR_AUTH_NONE=e._pe.PeDefs.prototype.PE_STR_AUTH_NONE;w.PE_STR_AUTH_TOP=e._pe.PeDefs.prototype.PE_STR_AUTH_TOP;w.PE_STR_NAME_CANON=e._pe.PeDefs.prototype.PE_STR_NAME_CANON;w.PE_PARM_X0=e._pe.PeDefs.prototype.PE_PARM_X0;w.PE_PARM_ND=e._pe.PeDefs.prototype.PE_PARM_ND;w.PE_TRANSFORM_1_TO_2=e._pe.PeDefs.prototype.PE_TRANSFORM_1_TO_2;
w.PE_TRANSFORM_2_TO_1=e._pe.PeDefs.prototype.PE_TRANSFORM_2_TO_1;w.PE_TRANSFORM_P_TO_G=e._pe.PeDefs.prototype.PE_TRANSFORM_P_TO_G;w.PE_TRANSFORM_G_TO_P=e._pe.PeDefs.prototype.PE_TRANSFORM_G_TO_P;w.PE_HORIZON_RECT=e._pe.PeDefs.prototype.PE_HORIZON_RECT;w.PE_HORIZON_POLY=e._pe.PeDefs.prototype.PE_HORIZON_POLY;w.PE_HORIZON_LINE=e._pe.PeDefs.prototype.PE_HORIZON_LINE;w.PE_HORIZON_DELTA=e._pe.PeDefs.prototype.PE_HORIZON_DELTA}})(k=e.PeDefs||(e.PeDefs={}));(function(w){function u(y,D){var G=null,A=x[y];
A||(A={},x[y]=A);A.hasOwnProperty(String(D))?G=A[D]:(y=e._pe.PeFactory.prototype.factoryByType(y,D),e._pe.compare(y,e._pe.NULL)||(G=y,A[D]=G));return G=B(G)}function B(y){if(y){var D=y.getType();switch(D){case k.PE_TYPE_GEOGCS:y=e._pe.castObject(y,e._pe.PeGeogcs);break;case k.PE_TYPE_PROJCS:y=e._pe.castObject(y,e._pe.PeProjcs);break;case k.PE_TYPE_GEOGTRAN:y=e._pe.castObject(y,e._pe.PeGeogtran);break;default:D&k.PE_TYPE_UNIT&&(y=e._pe.castObject(y,e._pe.PeUnit))}}return y}var x={},E={};w.initialize=
function(){e._pe.PeFactory.prototype.initialize(null)};w.coordsys=function(y){return u(k.PE_TYPE_COORDSYS,y)};w.factoryByType=u;w.fromString=function(y,D){var G=null,A=E[y];A||(A={},E[y]=A);A.hasOwnProperty(D)?G=A[D]:(y=e._pe.PeFactory.prototype.fromString(y,D),e._pe.compare(y,e._pe.NULL)||(G=y,A[D]=G));return G=B(G)};w.geogcs=function(y){return u(k.PE_TYPE_GEOGCS,y)};w.geogtran=function(y){return u(k.PE_TYPE_GEOGTRAN,y)};w.getCode=function(y){return e._pe.PeFactory.prototype.getCode(y)};w.projcs=
function(y){return u(k.PE_TYPE_PROJCS,y)};w.unit=function(y){return u(k.PE_TYPE_UNIT,y)}})(e.PeFactory||(e.PeFactory={}));e.PeGCSExtent=null;var f;(function(w){var u;w.init=function(){w.PE_GTLIST_OPTS_COMMON=e._pe.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON;u=e._pe._pe_getPeGTlistExtendedEntrySize()};w.getGTlist=function(B,x,E,y,D,G){var A=null,t=new e._pe.PeInteger(G);try{var v=e._pe.PeGTlistExtended.prototype.getGTlist(B,x,E,y,D,t);if(G=t.val)if(A=[v],1<G){var C=e._pe.getPointer(v);for(B=1;B<
G;B++)A.push(e._pe.wrapPointer(C+u*B,e._pe.PeGTlistExtendedEntry))}}finally{e._pe.destroy(t)}return A}})(f=e.PeGTlistExtended||(e.PeGTlistExtended={}));(function(w){w.destroy=function(u){if(u&&u.length){for(var B=0;B<u.length;B++){var x=u[B];c(x);x.getEntries().forEach(function(E){c(E);E=E.getGeogtran();c(E);E.getParameters().forEach(c);[E.getGeogcs1(),E.getGeogcs2()].forEach(function(y){c(y);var D=y.getDatum();c(D);c(D.getSpheroid());c(y.getPrimem());c(y.getUnit())})})}e._pe.PeGTlistExtendedEntry.prototype.Delete(u[0])}}})(e.PeGTlistExtendedEntry||
(e.PeGTlistExtendedEntry={}));(function(w){w.geogToGeog=function(u,B,x,E,y){e._pe.ensureCache.prepare();var D=b(x),G=x===D;D=e._pe.ensureFloat64(D);var A=0;E&&(A=e._pe.ensureFloat64(E));(u=e._pe._pe_geog_to_geog(e._pe.getPointer(u),B,D,A,y))&&h(x,B,D,G);return u}})(e.PeGTTransformations||(e.PeGTTransformations={}));(function(w){function u(x,E,y,D,G,A){e._pe.ensureCache.prepare();switch(x){case "dd":var t=e._pe._pe_geog_to_dd;var v=k.PE_DD_MAX;break;case "ddm":t=e._pe._pe_geog_to_ddm;v=k.PE_DDM_MAX;
break;case "dms":t=e._pe._pe_geog_to_dms,v=k.PE_DMS_MAX}x=0;E&&(x=e._pe.getPointer(E));E=b(D);E=e._pe.ensureFloat64(E);v=a(y,v);D=e._pe.ensureInt32(v);if(G=t(x,y,E,G,D))for(t=0;t<y;t++)A[t]=e._pe.UTF8ToString(v[t]);return G}function B(x,E,y,D,G){e._pe.ensureCache.prepare();switch(x){case "dd":var A=e._pe._pe_dd_to_geog;break;case "ddm":A=e._pe._pe_ddm_to_geog;break;case "dms":A=e._pe._pe_dms_to_geog}x=0;E&&(x=e._pe.getPointer(E));E=D.map(function(t){return e._pe.ensureString(t)});D=e._pe.ensureInt32(E);
E=e._pe.ensureFloat64(Array(2*y));(A=A(x,y,D,E))&&h(G,y,E);return A}w.geog_to_dms=function(x,E,y,D,G){return u("dms",x,E,y,D,G)};w.dms_to_geog=function(x,E,y,D){return B("dms",x,E,y,D)};w.geog_to_ddm=function(x,E,y,D,G){return u("ddm",x,E,y,D,G)};w.ddm_to_geog=function(x,E,y,D){return B("ddm",x,E,y,D)};w.geog_to_dd=function(x,E,y,D,G){return u("dd",x,E,y,D,G)};w.dd_to_geog=function(x,E,y,D){return B("dd",x,E,y,D)}})(e.PeNotationDms||(e.PeNotationDms={}));var l;(function(w){w.init=function(){w.PE_MGRS_STYLE_NEW=
e._pe.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW;w.PE_MGRS_STYLE_OLD=e._pe.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD;w.PE_MGRS_STYLE_AUTO=e._pe.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO;w.PE_MGRS_180_ZONE_1_PLUS=e._pe.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS;w.PE_MGRS_ADD_SPACES=e._pe.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES};w.geog_to_mgrs_extended=function(u,B,x,E,y,D,G){e._pe.ensureCache.prepare();var A=0;u&&(A=e._pe.getPointer(u));u=b(x);x=e._pe.ensureFloat64(u);u=a(B,k.PE_MGRS_MAX);
var t=e._pe.ensureInt32(u);if(E=e._pe._pe_geog_to_mgrs_extended(A,B,x,E,y,D,t))for(y=0;y<B;y++)G[y]=e._pe.UTF8ToString(u[y]);return E};w.mgrs_to_geog_extended=function(u,B,x,E,y){e._pe.ensureCache.prepare();var D=0;u&&(D=e._pe.getPointer(u));u=x.map(function(G){return e._pe.ensureString(G)});x=e._pe.ensureInt32(u);u=e._pe.ensureFloat64(Array(2*B));(E=e._pe._pe_mgrs_to_geog_extended(D,B,x,E,u))&&h(y,B,u);return E}})(l=e.PeNotationMgrs||(e.PeNotationMgrs={}));(function(w){w.geog_to_usng=function(u,
B,x,E,y,D,G){e._pe.ensureCache.prepare();var A=0;u&&(A=e._pe.getPointer(u));u=b(x);x=e._pe.ensureFloat64(u);u=a(B,k.PE_MGRS_MAX);var t=e._pe.ensureInt32(u);if(E=e._pe._pe_geog_to_usng(A,B,x,E,y,D,t))for(y=0;y<B;y++)G[y]=e._pe.UTF8ToString(u[y]);return E};w.usng_to_geog=function(u,B,x,E){e._pe.ensureCache.prepare();var y=0;u&&(y=e._pe.getPointer(u));u=x.map(function(D){return e._pe.ensureString(D)});x=e._pe.ensureInt32(u);u=e._pe.ensureFloat64(Array(2*B));(y=e._pe._pe_usng_to_geog(y,B,x,u))&&h(E,B,
u);return y}})(e.PeNotationUsng||(e.PeNotationUsng={}));var p;(function(w){w.init=function(){w.PE_UTM_OPTS_NONE=e._pe.PeNotationUtm.prototype.PE_UTM_OPTS_NONE;w.PE_UTM_OPTS_ADD_SPACES=e._pe.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES;w.PE_UTM_OPTS_NS=e._pe.PeNotationUtm.prototype.PE_UTM_OPTS_NS};w.geog_to_utm=function(u,B,x,E,y){e._pe.ensureCache.prepare();var D=0;u&&(D=e._pe.getPointer(u));u=b(x);x=e._pe.ensureFloat64(u);u=a(B,k.PE_UTM_MAX);var G=e._pe.ensureInt32(u);if(E=e._pe._pe_geog_to_utm(D,
B,x,E,G))for(D=0;D<B;D++)y[D]=e._pe.UTF8ToString(u[D]);return E};w.utm_to_geog=function(u,B,x,E,y){e._pe.ensureCache.prepare();var D=0;u&&(D=e._pe.getPointer(u));u=x.map(function(G){return e._pe.ensureString(G)});x=e._pe.ensureInt32(u);u=e._pe.ensureFloat64(Array(2*B));(E=e._pe._pe_utm_to_geog(D,B,x,E,u))&&h(y,B,u);return E}})(p=e.PeNotationUtm||(e.PeNotationUtm={}));var r;(function(w){var u=new Map;w.init=function(){w.PE_PCSINFO_OPTION_NONE=e._pe.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE;w.PE_PCSINFO_OPTION_DOMAIN=
e._pe.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN;w.PE_POLE_OUTSIDE_BOUNDARY=e._pe.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY;w.PE_POLE_POINT=e._pe.PePCSInfo.prototype.PE_POLE_POINT};w.generate=function(B,x){void 0===x&&(x=w.PE_PCSINFO_OPTION_DOMAIN);var E;if(u.has(B)){var y=u.get(B);y[x]&&(E=y[x])}E||(E=e._pe.PePCSInfo.prototype.generate(B,x),y||(y=[],u.set(B,y)),y[x]=E);return E}})(r=e.PePCSInfo||(e.PePCSInfo={}));(function(w){w.version_string=function(){return e._pe.PeVersion.prototype.version_string()}})(e.PeVersion||
(e.PeVersion={}));e._init=d})},"esri/core/tsSupport/extendsHelper":function(){define([],function(){return function(){var H=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,m){e.__proto__=m}||function(e,m){for(var n in m)m.hasOwnProperty(n)&&(e[n]=m[n])};return function(e,m){function n(){this.constructor=e}H(e,m);e.prototype=null===m?Object.create(m):(n.prototype=m.prototype,new n)}}()})},"esri/geometry/GeographicTransformation":function(){define(["require","exports","./GeographicTransformationStep"],
function(H,e,m){return function(){function n(q){this.steps=[];this._cached_projection={};this._chain="";this._gtlistentry=null;if(q&&q.steps){var d=0;for(q=q.steps;d<q.length;d++){var c=q[d];c instanceof m?this.steps.push(c):this.steps.push(new m({wkid:c.wkid,wkt:c.wkt,isInverse:c.isInverse}))}}}n.cacheKey=function(q,d){return[void 0!==q.wkid&&null!==q.wkid?q.wkid.toString():"-1",void 0!==q.wkt&&null!==q.wkt?q.wkt.toString():"",void 0!==d.wkid&&null!==d.wkid?d.wkid.toString():"-1",void 0!==d.wkt&&
null!==d.wkt?d.wkt.toString():""].join()};n.fromGE=function(q){var d=new n,c="",a=0;for(q=q.steps;a<q.length;a++){var b=m.fromGE(q[a]);d.steps.push(b);c+=b.uid.toString()+","}d._cached_projection={};d._gtlistentry=null;d._chain=c;return d};n.prototype.getInverse=function(){var q=new n;q.steps=[];for(var d=this.steps.length-1;0<=d;d--)q.steps.push(this.steps[d].getInverse());return q};n.prototype.getGTListEntry=function(){for(var q="",d=0,c=this.steps;d<c.length;d++)q+=c[d].uid.toString()+",";q!==
this._chain&&(this._gtlistentry=null,this._cached_projection={},this._chain=q);return this._gtlistentry};n.prototype.assignCachedGe=function(q,d,c){this._cached_projection[n.cacheKey(q,d)]=c};n.prototype.getCachedGeTransformation=function(q,d){for(var c="",a=0,b=this.steps;a<b.length;a++)c+=b[a].uid.toString()+",";c!==this._chain&&(this._gtlistentry=null,this._cached_projection={},this._chain=c);q=this._cached_projection[n.cacheKey(q,d)];return void 0===q?null:q};return n}()})},"esri/geometry/GeographicTransformationStep":function(){define(["require",
"exports"],function(H,e){var m=0;return function(){function n(q){void 0===q&&(q=null);this.uid=m++;q?(this._wkt=void 0!==q.wkt?q.wkt:null,this._wkid=void 0!==q.wkid?q.wkid:-1,this._isInverse=void 0!==q.isInverse?!0===q.isInverse:!1):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}n.fromGE=function(q){var d=new n;d._wkt=q.wkt;d._wkid=q.wkid;d._isInverse=q.isInverse;return d};Object.defineProperty(n.prototype,"wkt",{get:function(){return this._wkt},set:function(q){this._wkt=q;this.uid=m++},enumerable:!0,
configurable:!0});Object.defineProperty(n.prototype,"wkid",{get:function(){return this._wkid},set:function(q){this._wkid=q;this.uid=m++},enumerable:!0,configurable:!0});Object.defineProperty(n.prototype,"isInverse",{get:function(){return this._isInverse},set:function(q){this._isInverse=q;this.uid=m++},enumerable:!0,configurable:!0});n.prototype.getInverse=function(){var q=new n;q._wkt=this.wkt;q._wkid=this._wkid;q._isInverse=!this.isInverse;return q};return n}()})},"esri/layers/rasterLib/raster/TileServiceRaster":function(){define("require dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/_base/array dojo/_base/config dojo/_base/json dojo/sniff dojo/DeferredList dojo/when ../../../kernel ../../../Evented ../../../request ../../../geometry/Extent ../../../geometry/Point ../../../SpatialReference ../../../deferredUtils ../../../urlUtils ../../PixelBlock ../../rasterFormats/rasterCodec ../tile/RasterTileInfo ./RasterInfo ./BasicRaster".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D){H=e([D],{declaredClass:"esri.layers.rasterLib.raster.TileServiceRaster",constructor:function(G){},open:function(){var G=new n,A=this.serviceInfo||this._getServiceInfo(null),t=m.hitch(this,function(C){this.serviceInfo=C;this.version=C.currentVersion;this.rasterInfo=this._parseRasterInfo(C);this.loaded=!0;this._getRasterIdentifier();G.resolve(this)}),v=m.hitch(this,function(C){this.loaded=!0;this._getRasterIdentifier();G.reject(C)});h(A,t,v);return G.promise},
read:function(G){var A=this.url+"/tile/"+G.level+"/"+G.row+"/"+G.col,t={width:this.tileInfo.cols,height:this.tileInfo.rows,planes:null,pixelType:null,format:null,decodeFunc:null,isPoint:"elevation"===this.tileType.toLowerCase()?!0:!1};return this._requestPixels({url:A+(this.disableClientCaching?"?_ts\x3d "+(new Date).getTime():""),payload:{},decodeParams:t,tileOptions:G})},identify:function(G,A){null==A&&(A=this.tileInfo.lods[this.tileInfo.lods.length-1].level);var t=(G.x-this.tileInfo.origin.x)/
this.tileInfo.lods[A].resolution/this.tileInfo.cols;G=(this.tileInfo.origin.y-G.y)/this.tileInfo.lods[A].resolution/this.tileInfo.rows;var v=Math.floor(t),C=Math.floor(G),J=Math.floor((t-v)*this.tileInfo.cols);J=Math.min(J,this.tileInfo.cols-1);var L=Math.floor((G-C)*this.tileInfo.rows);L=Math.min(L,this.tileInfo.rows-1);var S=new n;this.read({level:A,row:C,col:v}).then(function(U){var aa=L*U.width+J;U&&U.pixels&&0<U.pixels.length?(U=U.mask?U.mask[aa]?U.pixels.map(function(ea){return ea[aa]}):null:
U.pixels.map(function(ea){return ea[aa]}),S.resolve(U)):S.reject("no valid data")},function(U){S.reject(U)});return S.promise},setFetchParameters:function(G,A){},_getRasterIdentifier:function(){this._rasterId||(this._rasterId=this.url.replace("http:","").replace("https:",""));return this._rasterId},_getServiceInfo:function(){var G=this.url,A=new n(w._dfdCanceller);A._pendingDfd=f({url:G,content:{f:"json"},handleAs:"json",callbackParamName:"callback"});A._pendingDfd.then(function(t){A.callback(t)},
function(t){A.errback(t)});return A},_parseRasterInfo:function(G){var A=new y;A.extent=new l(G.fullExtent);A.spatialReference=new r(G.spatialReference);this.tileType=G.cacheType||"Map";switch(this.tileType){case "Map":A.bandCount=3;A.pixelType="U8";this.dataType="Processed";break;case "Elevation":A.bandCount=1;A.pixelType=G.pixelType||"F32";this.dataType="Elevation";break;case "Raster":A.bandCount=null,A.pixelType=null,this.dataType=G.serviceDataType&&G.serviceDataType.replace("esriImageServiceDataType",
"")||"Generic"}var t=G.tileInfo;A.width=Math.floor((G.fullExtent.xmax-G.fullExtent.xmin)/t.lods[t.lods.length-1].resolution+.5);A.height=Math.floor((G.fullExtent.ymax-G.fullExtent.ymin)/t.lods[t.lods.length-1].resolution+.5);A.cellSize=new p({x:t.lods[t.lods.length-1].resolution,y:t.lods[t.lods.length-1].resolution,spatialReference:G.spatialReference});this.tileInfo=new E(t);this.tileInfo.tileType=this.tileType;return A}});a("extend-esri")&&m.setObject("layers.rasterLib.raster.TileServiceRaster",
H,g);return H})},"esri/layers/rasterLib/raster/TileRaster":function(){define("require dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/_base/array dojo/_base/config dojo/_base/json dojo/sniff dojo/DeferredList dojo/when ../../../kernel ../../../Evented ../../../request ../../../geometry/Extent ../../../geometry/Point ../../../SpatialReference ../../../deferredUtils ../../../urlUtils ../../PixelBlock ../../rasterFormats/rasterCodec ../tile/RasterTileInfo ./RasterInfo ./BasicRaster".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D){H=e([D],{declaredClass:"esri.layers.rasterLib.raster.TileRaster",sourceType:"TileCache",_RECORD_SIZE:8,constructor:function(G){this._cloudBlobStorage=G&&G._cloudBlobStorage},open:function(){var G=new n,A=this.datasetInfo||this._getDatasetInfo(null),t=m.hitch(this,function(C){this.datasetInfo=C;this.rasterInfo=C=this._parseRasterInfo(C);this.tileType="Cache/LERC"===C.format?"Elevation":"Cache/MIXED"===C.format||"Cache/JPEG"===C.format||"Cache/PNG"===
C.format?"Map":"Raster";this.tileInfo=C.tileInfo;this.dataType=["Generic","Elevation","Processed"][["Raster","Elevation","Map"].indexOf(this.tileType)];this._HEADER_SIZE=C.packetSize*C.packetSize*this._RECORD_SIZE+64;this.loaded=!0;this._cloudBlobStorage=this._cloudBlobStorage||-1<this.url.toLowerCase().indexOf("s3.amazonaws.com")||-1<this.url.toLowerCase().indexOf("windows.net")||-1<this.url.toLowerCase().indexOf("googleapis.com");this._getRasterIdentifier();G.resolve(this)}),v=m.hitch(this,function(C){this.loaded=
!0;this._getRasterIdentifier();G.reject(C)});h(A,t,v);return G.promise},read:function(G){var A=new n,t=G.level,v=G.row,C=G.col,J=this._buildCacheFilePath(this.url,t,v,C),L=this._getIndexRecordFromBundle(t,v,C);f({url:J,content:{},headers:{Range:"bytes\x3d0-"+(this._HEADER_SIZE-1).toString()},handleAs:"arraybuffer"}).then(m.hitch(this,function(S,U){if(!A.isCanceled()){console.log("time in ms request "+(new Date-aa));var aa=new Date;S=new Uint8Array(S);S=this._getTileEndAndContentType(S,L);U={width:this.tileInfo.cols,
height:this.tileInfo.rows,planes:null,pixelType:null,format:null,decodeFunc:null,isPoint:"elevation"===this.tileType.toLowerCase()?!0:!1};this._requestPixels({url:J+(this.disableClientCaching?"?_ts\x3d "+(new Date).getTime():""),payload:{},headers:{Range:"bytes\x3d"+S.position.toString()+"-"+(S.position+S.recordSize).toString()},decodeParams:U,tileOptions:G}).then(function(ea){A.isCanceled()||A.resolve(ea)},function(ea){A.isCanceled()||A.reject(ea)})}}));return A.promise},identify:function(){return null},
setFetchParameters:function(G,A){},toJson:function(){return{url:this.url,tileInfo:this.tileInfo.toJson(),rasterInfo:this.rasterInfo.toJson(),datasetInfo:this.datasetInfo,sourceType:this.sourceType,tileType:this.tileType,_rasterId:this._rasterId}},_getDatasetInfo:function(){return f({url:this.url+"/conf.json",handleAs:"json",content:{}})},_parseRasterInfo:function(G){var A=new y;switch(G.pixelType){case 1:var t="U1";break;case 1:t="U2";break;case 2:t="U4";break;case 3:t="U8";break;case 4:t="S8";break;
case 5:t="U16";break;case 6:t="S16";break;case 7:t="U32";break;case 8:t="S32";break;case 9:t="F32";break;default:t="F32"}var v,C=[],J=G.LODInfos;for(v=0;v<J.levels.length;v++)C.push({level:J.levels[v],resolution:J.resolutions[v],scale:96/.0254*J.resolutions[v]});v=new r(G.extent.spatialReference||G.geodataXform.spatialReference);C=new E({rows:G.blockHeight,cols:G.blockWidth,dpi:96,format:G.format,compressionQuality:0,origin:G.origin,spatialReference:v,lods:C});A.pixelType=t;A.bandCount=G.bandCount;
A.spatialReference=v;A.extent=new l({xmin:G.extent.xmin,ymin:G.extent.ymin,xmax:G.extent.xmax,ymax:G.extent.ymax,spatialReference:v});A.cellSize=new p({x:G.pixelSizeX,y:G.pixelSizeY,spatialReference:v});A.width=Math.floor((A.extent.xmax-A.extent.xmin)/A.cellSize.x+.5);A.height=Math.floor((A.extent.ymax-A.extent.ymin)/A.cellSize.y+.5);A.statistics=G.statistics.map(function(L){Object.keys(L).forEach(function(S){isNaN(L[S])&&(L[S]=null)});return L});A.histograms=G.histograms;A.geodataXform=G.geodataXform;
A.packetSize=G.packetSize;A.format=G.format;A.compressionQuality=G.compressionQuality;A.tileInfo=C;return A},_getRasterIdentifier:function(){this._rasterId||(this._rasterId=this.url.replace("http:","").replace("https:",""));return this._rasterId},_buildCacheFilePath:function(G,A,t,v){var C=this.rasterInfo.packetSize;v=Math.floor(v/C)*C;t="R"+this._toHexString4(Math.floor(t/C)*C)+"C"+this._toHexString4(v);C="L";C=10<=A?C+A.toString():C+("0"+A.toString());return this._cloudBlobStorage?G+"/_alllayers/"+
C+"/"+t+".bundle":G+"/"+C+"_"+t+"/bundle"},_getIndexRecordFromBundle:function(G,A,t){G=this.rasterInfo.packetSize;A=A%G*G+t%G;if(0>A)throw"Invalid level / row / col";return A*this._RECORD_SIZE+64},_getTileEndAndContentType:function(G,A){G=G.subarray(A,A+8);A=0;var t;for(t=0;5>t;t++)A|=(G[t]&255)<<8*t;var v=A&0xffffffffff;A=0;for(t=5;8>t;t++)A|=(G[t]&255)<<8*(t-5);return{position:v,recordSize:A&0xffffffffff}},_toHexString4:function(G){G=G.toString(16);if(4!=G.length)for(var A=4-G.length;0<A--;)G="0"+
G;return G}});a("extend-esri")&&m.setObject("layers.rasterLib.raster.TileRaster",H,g);return H})},"esri/layers/rasterLib/raster/FunctionRaster":function(){define("require dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/_base/array dojo/_base/config dojo/_base/json dojo/sniff ../DeferredList2 dojo/when ../../../kernel ../../../Evented ../../../request ../../../deferredUtils ../../../geometry/Extent ../../../geometry/Point ../../../SpatialReference ../../../deferredUtils ../../../urlUtils ../../rasterFormats/rasterCodec ./RasterInfo ./BasicRaster ../../rasterLib/function/rasterFunctionHelper".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y,D){H=e([y],{declaredClass:"esri.layers.rasterLib.raster.FunctionRaster",rasterFunction:null,sourceType:"Function",constructor:function(G){G&&G.rasterFx&&this._init(G.rasterFx,G.rasterFxArgs)},open:function(){var G=this.getMemberRasters().map(function(t){return t.open()});this.identifiers=this.getMemberRasters().map(function(t){return t._rasterId});var A=new n;(new b(G,null,null,!0)).then(function(t){t.some(function(v){return!v[0]})?A.reject(t):
(this.rasterFunction.bind(),this.rasterInfo=this.rasterFunction.rasterInfo,this.dataType=this.rasterInfo.keyProperties&&this.rasterInfo.keyProperties.DataType||"Generic",this.tileInfo=t[0][1].tileInfo,A.resolve(this))}.bind(this));return A.promise},getProjectedFullExtent:function(G){var A=new n;this.getMemberRasters()[0].getProjectedFullExtent(G).then(m.hitch(this,function(t){this.projectedFullExtent=t;A.resolve(t)}));return A.promise},setProcessingContext:function(G){var A=G;G.layer&&(G=G.layer,
A={id:G.id,rawRasterInfo:G.raster.rasterInfo,glSetting:G._glSetting,xformSetting:G.tileManager&&G.tileManager.xformSetting,useWebGL:G.useWebGL,resampling:G.tileMode&&G.tileManager&&G.tileManager.xformSetting.requireProjection&&!G._hasTilingEffects&&"Thematic"!==G.raster.dataType?1:0,tileMode:G.tileMode});this.rasterFunction.setProcessingContext(A);this._layerOptions=A},alterDefinition:function(G){if(G=G||this.rasterFunction)1===this.memberRasters.length&&!G._bindComplete&&(this.rasterFunction=D.create(G,
{raster:this.memberRasters[0]}))&&(this.rasterFunction.bind(),this.rasterInfo=this.rasterFunction.rasterInfo,this.dataType=this.rasterInfo.keyProperties&&this.rasterInfo.keyProperties.DataType||"Generic",this.rasterFunction.setProcessingContext(this._layerOptions)),this._rasterHandler&&this._rasterHandler._connected&&this.rasterFunction&&this._rasterHandler.setRasterFunction({layerId:this._layerOptions.id,data:this.rasterFunction.toJson(!0)})},setFetchParameters:function(G,A){var t=this.getMemberRasters();
t&&1===t.length&&t[0].setFetchParameters(G,A)},getMemberRasters:function(){this.memberRasters||(this.memberRasters=[],this._getMemberRasters(this.rasterFunction.functionArguments,this.memberRasters));return this.memberRasters},read:function(G){var A=new n(l._dfdCanceller);if(G.src){var t=this.rasterFunction.read(G);A.resolve(t);return A.promise}var v=this.getMemberRasters().map(function(S){return S.read(G)});v=new b(v);var C,J,L=this.identifiers;A._pendingDfd=v;v.then(m.hitch(this,function(S){if(C=
S.some(function(U){return U[0]}))J={},S.forEach(function(U,aa){J[L[aa]]=U[0]?U[1]:null});t=J?this.rasterFunction.read({extent:G.extent,src:J}):null;t.srcData=J;A.resolve(t)}));return A},_init:function(G,A){if(this.rasterFunction=D.create(G,A))this.rasterFunction._bindComplete=!0;else throw"Cannot initialize a function raster without a raster function";},_getMemberRasters:function(G,A){var t=Object.keys(G),v,C,J;for(v=0;v<t.length;v++)if(J=G[t[v]]){var L=J instanceof Array?J:[J];for(C=0;C<L.length;C++)(J=
L[C])&&("function"===typeof J||"object"===typeof J)&&J.read&&(J.functionArguments?this._getMemberRasters(J.functionArguments,A):J.sourceType&&"Function"!==J.sourceType&&(J._identifier=J._getRasterIdentifier(),A.some(function(S){return S._identifier===J._identifier})||A.push(J)))}return A}});a("extend-esri")&&m.setObject("layers.rasterLib.raster.FunctionRaster",H,g);return H})},"esri/layers/rasterLib/DeferredList2":function(){define(["dojo/DeferredList"],function(H){return function(e,m,n,q,d){this.list=
e;m=new H(e,m,n,q,d);var c=m.resolve.bind(m),a=m.cancel.bind(m);m.cancel=function(){e&&e.forEach(function(b){b.cancel&&b.cancel()});a.apply(this,arguments)}.bind(m);m.resolve=function(){this.isFulfilled()||c.apply(this,arguments)}.bind(m);return m}})},"esri/layers/rasterLib/tile/RasterTileManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/Deferred dojo/when ../DeferredList2 ../../../geometry/Extent ../../../SpatialReference ../../../geometry/Point ../../PixelBlock ./RasterTileInfo ../raster/rasterProjectionHelper".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g){var k=function(f,l){var p;for(p=0;p<f.length;p++)if(l(f[p]))return p;return-1};return H(null,{declaredClass:"esri.layers.rasterLib.tile.RasterTileManager",count:null,fullBoundary:null,tileBoundary:null,tiles:null,resolution:null,virtual:!0,prefetchBufferSize:0,_progressiveGlobal:!1,_MAX_TILES:128,_defaultMatrixResolution:20,constructor:function(f){this.tiles=[];this.xformSetting={};this.mapSpatialReference=f&&f.mapSR;this.layer=f&&f.layer;this.identifiers=this.layer.raster.rasterFunction?
this.layer.raster.getMemberRasters().map(function(l){return l._rasterId}):[this.layer.raster._rasterId];(f=f&&f.tileInfo)&&this.setTileInfo(f)},setTileInfo:function(f){this.tileInfo=f;this.virtual=f.virtual;this.mapResolution=null;this.tiles.length=0;this.xformSetting.requireProjection=!this.virtual&&!this.mapSpatialReference.equals(this.tileInfo.spatialReference);this.xformSetting.requirePE=g.requirePE(this.mapSpatialReference,this.tileInfo.spatialReference);this.xformSetting.meshSize=this.xformSetting.requireProjection?
[this._defaultMatrixResolution,this._defaultMatrixResolution]:[1,1];this.halfWorldWidth=g.getHalfWorldWidth(f.spatialReference)},updateResolution:function(f,l){if(!(this.mapResolution&&f&&this._resolutionEqual(this.mapResolution.x,f.x)&&this._resolutionEqual(this.mapResolution.y,f.y))){this.resetTiles();var p=this.xformSetting.requireProjection;this.mapResolution=this.resolution=f;p&&(this.resolution=g.projectResolution(f,this.tileInfo.spatialReference,this.layer.projectedFullExtent||l));this._resolution=
this.resolution;f=this.resolution;if(!this.tileInfo.virtual){p=.75*Math.min(f.x,f.y)+.25*Math.max(f.x,f.y);if(p>=this.tileInfo.lods[0].resolution){var r=this.tileInfo.lods[0];this.ooe=!0}else{if(p<=this.tileInfo.lods[this.tileInfo.lods.length-1].resolution)r=this.tileInfo.lods[this.tileInfo.lods.length-1];else for(f=0;f<this.tileInfo.lods.length-1;f++)if(r=this.tileInfo.lods[f],l=this.tileInfo.lods[f+1],r.resolution>=p&&l.resolution<=p){r.resolution-p>p-l.resolution&&(r=l);break}this.ooe=!1}this.level=
r&&r.level;f=this.resolution=new a({x:r.resolution,y:r.resolution,spatialReference:this.tileInfo.spatialReference})}p=this.layer.raster.rasterInfo.extent;r=this.tileInfo.origin;l=this.tileInfo.cols;var w=this.tileInfo.rows;this.fullBoundary={rowStart:Math.floor((r.y-p.ymax)/f.y/w),rowEnd:Math.floor((r.y-p.ymin-f.y)/f.y/w),colStart:Math.floor((p.xmin-r.x)/f.x/l),colEnd:Math.floor((p.xmax-r.x-f.x)/f.x/l)};if(p=this.halfWorldWidth){w=Math.ceil(p/f.x/(l/2));var u=this.tileInfo.applyGCS360Transform?360:
p,B=Math.round(l-(u-r.x)/f.x%l);B===l&&(B=0);this.fullBoundary.colRange=w;this.fullBoundary.paddingRight=B;this.fullBoundary.paddingLeft=Math.round((w*l*f.x+r.x-u-(this.tileInfo.applyGCS360Transform?0:r.x+p))/f.x)}this.hasNewData=!0}},getXformGrid:function(){var f=this.mapExtent,l=this.layer._hasTilingEffects?this.extent:this.fullExtent,p=this.layer.getCurrentResolution(),r=JSON.stringify(f.toJson())+JSON.stringify(l.toJson());this._datumTransformationInitialized||(this._datumTransformationInitialized=
!0,this._datumTransformation=g.getDefaultDatumTransformationForDataset(this.layer.raster.rasterInfo.extent,f.spatialReference,!0));this._cachedExtentString&&this._cachedExtentString===r||(this._cachedExtentString=r,this._xformGrid=f=g.getProjectionOffsetGrid(f,l,p,this.tileInfo.applyGCS360Transform,this.halfWorldWidth,this._datumTransformation));f=this._xformGrid;this.xformSetting.meshSize=f&&f.size;return f},getWrapTimes:function(f){var l=g.getHalfWorldWidth(f.spatialReference);if(!l)return 0;var p=
2*l;l=this.tileInfo.applyGCS360Transform?0:-l;return Math.floor((f.xmax-l)/p)-Math.floor((f.xmin-l)/p)},normalizeCoordinate:function(f,l){if(!l)return 0;var p=2*l;if(0<f){for(;f>l;)f-=p;return f}for(;f<-l;)f+=p;return f},resetTiles:function(){this.tiles.forEach(e.hitch(this,function(f){f.fetch&&!f.fetch.isCanceled()&&f.fetch.cancel();f.update&&!f.update.isCanceled()&&f.update.cancel()}));this.tiles.length=0},updateExtent:function(f,l){this.mapExtent=this.extent=f;var p=this.xformSetting.requireProjection;
if(p){this.extent=g.project(f,this.tileInfo.spatialReference,this.tileInfo.applyGCS360Transform);if(!this.extent)return;this.extent.spatialReference=new c(this.extent.spatialReference.toJson())}this.updateResolution(l,f);var r=this.extent,w=this.tileInfo,u=w.cols,B=w.rows;l=this.resolution;var x=r;p=p?this.layer.raster.rasterInfo.extent:this.layer.raster.projectedFullExtent;this.ooe&&(x=this._getIntersect(r,p));var E=Math.floor((x.xmin-w.origin.x)/l.x/u)-this.prefetchBufferSize,y=Math.floor((x.xmax-
w.origin.x)/l.x/u)+this.prefetchBufferSize,D=null;f=this.getWrapTimes(f);var G=this.fullBoundary&&this.fullBoundary.colRange;f&&this.halfWorldWidth&&(y===E&&(D=E),y+=f*G);var A=this.halfWorldWidth&&this.tiles.length&&(f!==this.wrapTimes||D!==this._circlularColId);A&&(this._wrapSwitchCount=this._wrapSwitchCount?this._wrapSwitchCount+1:1);this.wrapTimes=f;this._circlularColId=D;var t=Math.floor((w.origin.y-x.ymax)/l.y/B)-this.prefetchBufferSize;D=Math.floor((w.origin.y-x.ymin)/l.y/B)+this.prefetchBufferSize;
this.tileBoundary={rowStart:t,rowEnd:D,colStart:E,colEnd:y};var v,C;((x=(D-t+1)*(y-E+1)>this._MAX_TILES||!this.virtual&&this._resolution.x>8*this.tileInfo.lods[0].resolution)||2<f||A)&&this.resetTiles();if(!(x||2<f)){A=this.tiles;x=!1;for(v=A.length-1;0<=v;v--){var J=A[v].row;var L=A[v].wrapCol;if(J<t||J>D||L<E||L>y)A[v].fetch&&!A[v].fetch.isCanceled()&&A[v].fetch.cancel(),A[v].update&&!A[v].update.isCanceled()&&A[v].update.cancel(),A.splice(v,1),x=!0}for(v=t;v<=D;v++)for(C=E;C<=y;C++){t=new d(w.origin.x+
l.x*u*C,w.origin.y-l.y*B*(v+1),w.origin.x+l.x*u*(C+1),w.origin.y-l.y*B*v,r.spatialReference);var S=f&&G?0<=C?C%G:G- -C%G:C;J=k(A,function(U){return U.row===v&&U.col===S&&U.wrapCol===C});L=p.xmax>=t.xmax?u:Math.round((p.xmax-t.xmin)/l.x);-1===J&&(A.push({row:v,col:S,wrapCol:C,cellsizeX:l.x,cellsizeY:l.y,width:u,height:B,actualWidth:L,extent:t,normalizedExtent:this._wrapExtent(t,S),pixelBlock:null,virtual:this.virtual,level:this.level,tileType:this.tileInfo.tileType||"Raster"}),x=!0)}x&&this._sortTiles();
l=this.tileInfo.rows*(this.tileBoundary.rowEnd-this.tileBoundary.rowStart+1);this.width=this.tileInfo.cols*(this.tileBoundary.colEnd-this.tileBoundary.colStart+1);this.height=l;this.count=A.length;l=Math.min.apply(null,A.map(function(U){return U.extent.xmin}));w=Math.max.apply(null,A.map(function(U){return U.extent.xmax}));u=Math.min.apply(null,A.map(function(U){return U.extent.ymin}));B=Math.max.apply(null,A.map(function(U){return U.extent.ymax}));l=this.fullExtent=new d(l,u,w,B,r.spatialReference);
if(this.layer.roaming||this.layer.useWebGL)this.layer._hasTilingEffects?(this.xformSetting.offset=[0,0],this.xformSetting.scale=[1,1]):(x&&(this._tilesChanged=!0),this.xformSetting.offset=[(r.xmin-l.xmin)/(l.xmax-l.xmin),-(l.ymin-r.ymin)/(l.ymax-l.ymin)],this.xformSetting.scale=[(r.xmax-r.xmin)/(l.xmax-l.xmin),(r.ymax-r.ymin)/(l.ymax-l.ymin)])}},fetchTiles:function(f){(this._tilesChanged||f)&&this._fetchTiles(f)},_fetchTiles:function(f){this._fetchCounter=0;var l=this.extent;this.fetchAllCompleted=
f?new m:null;(this._tilesChanged||f&&this.layer._hasTilingEffects)&&this.tiles.forEach(e.hitch(this,function(r){r.updateCompleted=!1}));var p={};!this.layer.roaming&&this.layer._hasTilingEffects&&f?(this.identifiers.forEach(function(r,w){p[r]={extent:this.extent,pixelBlock:new b({width:this.layer._map.width,height:this.layer._map.height,pixels:[],pixelType:"",mask:null,statistics:[]})}}.bind(this)),this.originalPixelData={extent:this.extent,src:p,isEmpty:!0}):this._tilesChanged&&(this.identifiers.forEach(function(r,
w){p[r]={extent:this.fullExtent,pixelBlock:new b({width:128,height:128,pixels:[],pixelType:"",mask:null,statistics:[]})}}.bind(this)),this.originalPixelData={extent:this.fullExtent,src:p,isEmpty:!0});this.tiles.forEach(e.hitch(this,function(r){if(r.fetch)r.update||(r.update=this.updateTile(r));else{if(this._isTileOutSide(r,l)){r.updateCompleted=!0;return}this._requestTile(r)}this.layer.roaming&&this.layer.useWebGL?this._fillPixelData(r):r.src&&f&&(this.layer._hasTilingEffects||this.layer.useWebGL)&&
(this._fillPixelData(r),this.layer._hasTilingEffects&&(r.updateCompleted=!0),r.processedPixelBlock=null,r.renderedPixelBlock=null)}));0===this._fetchCounter&&(this._fetched=!0);this._tilesChanged=!1;f&&this._updateFetchStatus()},updateTile:function(f,l){var p=new m;if(!f.src&&!f.fetch)return p.resolve(f),p.promise;n(f.src||f._fetched||f.fetch,e.hitch(this,function(){var r=this.layer.tileMode&&this.layer._rasterHandler&&!(this.layer._hasTilingEffects||this.layer.useWebGL),w=this.layer._drawTile,u=
this._validateRawPixelBlocks(f);this.layer._hasTilingEffects&&!this.layer.useWebGL&&(w=w&&(this._progressiveGlobal||l));if((l||!l&&u)&&(r||w||this.layer.roaming)){if(this.xformSetting.requireProjection&&this.layer.useWebGL&&(this.xformSetting.gridConfig=this.getXformGrid(),null==this.xformSetting.gridConfig))return p.cancel(),p.promise;this._processTile(f,l).then(e.hitch(this,function(B){p.isCanceled()||this._renderTile(B,l).then(e.hitch(this,function(x){this.hasNewData=!1;p.isCanceled()||p.resolve(x)}))}))}else l||
u||(f.updateCompleted=!0),this.layer.useWebGL||this.layer._hasTilingEffects?p.resolve(this.originalPixelData):p.resolve()}));return p.promise},setLayer:function(f){this.layer=f},fillupTiles:function(){this.tiles.forEach(e.hitch(this,function(f){f.update&&f.updateCompleted&&!f.filled&&(f.updateCompleted=!1,this._fillPixelData(f),f.updateCompleted=!0)}))},_validateRawPixelBlocks:function(f){return f&&f.src&&!this.identifiers.some(function(l){return!(f.src[l].pixelBlock&&0!==f.src[l].pixelBlock.validPixelCount&&
f.src[l].pixelBlock.pixels&&0<f.src[l].pixelBlock.pixels.length)})},_wrapExtent:function(f,l){if(f){if(this.tileInfo.applyGCS360Transform){var p=this.normalizeCoordinate(f.xmin,180);0>p&&(p+=360);return new d({xmin:p,ymin:f.ymin,xmax:f.xmax-f.xmin+p,ymax:f.ymax,spatialReference:f.spatialReference})}if(this.halfWorldWidth){p=null!=l?new d({xmin:this.tileInfo.origin.x+this.tileInfo.cols*l*this.resolution.x,ymin:f.ymin,xmax:this.tileInfo.origin.x+this.tileInfo.cols*(l+1)*this.resolution.x,ymax:f.ymax,
spatialReference:f.spatialReference}):new d({xmin:f.xmin,ymin:f.ymin,xmax:f.xmax,ymax:f.ymax,spatialReference:f.spatialReference});l=this.normalizeCoordinate(p.xmin,this.halfWorldWidth);var r=l-p.xmin;.01<Math.abs(r)&&(p.xmin=l,p.xmax+=r)}return p||f}},_getIntersect:function(f,l){return new d(Math.max(f.xmin,l.xmin),Math.max(f.ymin,l.ymin),Math.min(f.xmax,l.xmax),Math.min(f.ymax,l.ymax),f.spatialReference)},_isTileOutSide:function(f,l){var p=!1;if(f.virtual){var r=f.normalizedExtent;if(l=l||(this.xformSetting.requireProjection?
this.layer.raster.rasterInfo.extent:this.layer.raster.projectedFullExtent)){f=r.xmin-this.prefetchBufferSize*this.tileInfo.cols*this.resolution.x;p=r.ymin-this.prefetchBufferSize*this.tileInfo.rows*this.resolution.y;var w=r.xmax+this.prefetchBufferSize*this.tileInfo.cols*this.resolution.x;r=r.ymax+this.prefetchBufferSize*this.tileInfo.rows*this.resolution.y;p=w<=l.xmin||f>=l.xmax||r<=l.ymin||p>=l.ymax}else p=!1}else p=0>f.level||f.row<this.fullBoundary.rowStart||f.row>this.fullBoundary.rowEnd||f.col<
this.fullBoundary.colStart||f.col>this.fullBoundary.colEnd;return p},_resolutionEqual:function(f,l){return f===l||f&&l&&Math.abs(f-l)<Math.abs(l/1E4)?!0:!1},_requestTile:function(f){var l=this.identifiers,p;if(this._isTileOutSide(f)){var r=new m;f.updateCompleted=!0;r.resolve(null);r=r.promise}else r=this.layer.raster.rasterFunction?new q(this.layer.raster.getMemberRasters().map(function(w){return w.read(f)})):new q([this.layer.raster.read(f)]);f.fetch=r;this._fetchCounter++;n(f.src||f._fetched||
r,e.hitch(this,function(w){if(p=w&&w.some(function(B){return B[0]})){var u={};w.forEach(function(B,x){u[l[x]]=B[0]&&B[1]?{extent:B[1].extent,pixelBlock:B[1].pixelBlock,width:B[1].width,height:B[1].height}:null});f.src=u}else f.src=null;this._fetchCounter--;0===this._fetchCounter&&(this._fetched=!0);f._fetched=!0;this._updateFetchStatus()}),e.hitch(this,function(){this._fetchCounter--;0===this._fetchCounter&&(this._fetched=!0);f._fetched=!0;this._updateFetchStatus()}));f.update=this.updateTile(f)},
_updateFetchStatus:function(){this.layer._drawTile&&this.fetchAllCompleted&&!this.fetchAllCompleted.isResolved()&&!this.tiles.some(function(f){return!f._fetched})&&(this.tiles.forEach(e.hitch(this,function(f){this._fillPixelData(f)})),this.fetchAllCompleted.resolve())},_fillPixelData:function(f,l){if(f&&!f.updateCompleted)if(Math.abs(f.cellsizeX-this.resolution.x)>f.cellsizeX/10)f.updateCompleted=!0;else if(!1===this._validateRawPixelBlocks(f))f.updateCompleted=!0;else{var p=f.extent;if(this.layer.roaming||
this.layer.useWebGL&&!this.layer._hasTilingEffects){var r=this.fullExtent;var w=this.tileInfo.cols*(this.tileBoundary.colEnd-this.tileBoundary.colStart+1);var u=this.tileInfo.rows*(this.tileBoundary.rowEnd-this.tileBoundary.rowStart+1);l?this.originalPixelData.renderedPixelBlock||(this.originalPixelData.renderedPixelBlock=new b({width:w,height:u,pixels:[],pixelType:"",mask:null,statistics:[]})):this.identifiers.forEach(e.hitch(this,function(x){this.originalPixelData.src[x].pixelBlock.width=w;this.originalPixelData.src[x].pixelBlock.height=
u}))}else r=this.extent,w=this.layer._map.width,u=this.layer._map.height,l?this.originalPixelData.renderedPixelBlock||(this.originalPixelData.renderedPixelBlock=new b({width:w,height:u,pixels:[],pixelType:"",mask:null,statistics:[]})):this.identifiers.forEach(e.hitch(this,function(x){this.originalPixelData.src[x].pixelBlock.width=w;this.originalPixelData.src[x].pixelBlock.height=u}));if(r.xmax<=p.xmin||r.xmin>=p.xmax||r.ymax<=p.ymin||r.ymin>=p.ymax)return null;var B=this.originalPixelData.isEmpty=
!1;this.identifiers.forEach(e.hitch(this,function(x){f.src&&(this._fillPixelBlock(f.src[x],this.originalPixelData.src[x],{extent:r,width:w,height:u,normalizedExtent:f.normalizedExtent},!1),B=!0)}));f.filled=B;this.hasNewData=!0}},_fillPixelBlock:function(f,l,p,r){var w=f.extent,u=p.extent;r=p.width;var B=p.height;if(f.pixelBlock&&f.pixelBlock.pixels&&f.pixelBlock.pixels[0]){var x=(w.xmax-w.xmin)/f.width,E=Math.max(w.xmin,u.xmin),y=Math.min(w.ymax,u.ymax),D=Math.round((E-w.xmin)/x),G=f.width-Math.round(Math.abs(w.xmax-
Math.min(w.xmax,u.xmax))/x),A=Math.round(Math.abs(w.ymax-y)/x),t=f.height-Math.round((Math.max(w.ymin,u.ymin)-w.ymin)/x),v=this.halfWorldWidth;E=Math.round((E-u.xmin)/x);p=p.normalizedExtent;if(!(this.wrapTimes&&v&&w.xmin<-v)){if(this.wrapTimes&&v){if(this.tileInfo.applyGCS360Transform)360<w.xmin&&(E-=this.fullBoundary.paddingLeft);else if(w.xmin>v){E-=this.fullBoundary.paddingLeft;var C=this.normalizeCoordinate(w.xmin,v);var J=this.normalizeCoordinate(w.xmax,v)}else C=w.xmin,J=w.xmax;this.tileInfo.applyGCS360Transform?
p&&360>p.xmin&&360<p.xmax&&(G-=this.fullBoundary.paddingRight):p&&p.xmin<v&&p.xmax>v?G-=this.fullBoundary.paddingRight:C<v&&J>v&&(G-=this.fullBoundary.paddingRight)}C=Math.round(Math.abs(u.ymax-y)/x);J=f.pixelBlock.pixels.length;l=l.pixelBlock;p=f.width;w=l.mask||new Uint8Array(r*B);var L=f.pixelBlock,S=L.mask,U=0;for(x=0;x<J;x++){y=L.pixels[x];v=l.pixels[x]||new y.constructor(r*B);for(f=A;f<t;f++)for(U=(C+f-A)*r+E,u=D;u<G;u++)v[U+u-D]=y[f*p+u];l.pixels[x]=v}if(S)for(f=A;f<t;f++)for(U=(C+f-A)*r+E,
u=D;u<G;u++)w[U+u-D]=S[f*p+u];else for(f=A;f<t;f++)for(U=(C+f-A)*r+E,u=D;u<G;u++)w[U+u-D]=1;l.pixelType=l.pixelType||L.pixelType;l.mask=w;if(!(l.statistics&&0<l.statistics.length))for(l.statistics=[],f=0;f<L.statistics.length;f++)l.statistics[f]={minValue:L.statistics[f].minValue,maxValue:L.statistics[f].maxValue};else if(L.statistics&&l.statistics)for(f=0;f<l.statistics.length;f++)l.statistics[f].minValue=Math.min(L.statistics[f].minValue,l.statistics[f].minValue),l.statistics[f].maxValue=Math.max(L.statistics[f].maxValue,
l.statistics[f].maxValue)}}},_processTile:function(f,l){var p=new m,r=this.layer._hasTilingEffects,w=this.layer.useWebGL,u=r||w,B=this.layer.raster.rasterFunction&&f&&(r||w||!f.processedPixelBlock);if(l)var x=f;else this._fillPixelData(f),x=u?this.originalPixelData:f;this.xformSetting.hasNewTexture=this.hasNewData;var E;B?(this.identifiers.forEach(function(y){if(0===x.src[y].pixelBlock.pixels.length||0===x.src[y].pixelBlock.pixels[0].length)E=!0}),E?p.resolve({extent:x.extent,processedPixelBlock:x.src[this.identifiers[0]],
pixelBlock:x.src[this.identifiers[0]]}):w?(this.processedPixelData=this.layer.raster.rasterFunction.read(x),p.resolve(this.processedPixelData)):this.layer._rasterHandler?this.layer._rasterHandler.process({extent:x.extent,src:x.src}).then(function(y){r?(this.processedPixelData=y,p.resolve(this.processedPixelData)):(f.processedPixelBlock=y.pixelBlock,p.resolve(f))}):(l=this.layer.raster.rasterFunction.read(f),f.processedPixelBlock=l.pixelBlock,p.resolve(f))):u?p.resolve(x.src[this.identifiers[0]]):
(f.pixelBlock=x.src[this.identifiers[0]]&&x.src[this.identifiers[0]].pixelBlock,p.resolve(f));return p.promise},_renderTile:function(f){var l=new m,p=this.layer._hasTilingEffects,r=this.layer.useWebGL,w=Math.abs((f.extent.xmax-f.extent.xmin)/f.width-this.layer.getCurrentResolution().x)>this.resolution.x/10;w=this.layer.useWebGL&&(w||this._isTileOutSide(f,this.layer._map.extent));this.xformSetting.hasNewTexture=this.hasNewData;this.layer._rasterRenderer&&f&&(f.texture||f.src||f.pixelBlock||f.processedPixelBlock)?
(this.layer._rasterRenderer.interpolation=this.layer.interpolation,r&&!w?(this.layer.raster.rasterFunction&&this.layer.raster.rasterFunction.renderTexture||this.layer._rasterRenderer.draw(f),l.resolve(f)):this.layer._rasterHandler?this.layer._rasterHandler.render({extent:f.extent,pixelBlock:f.processedPixelBlock||f.pixelBlock}).then(function(u){p?(u.renderedPixelBlock=u.pixelBlock,l.resolve(u)):(f.renderedPixelBlock=u.pixelBlock,l.resolve(f))}.bind(this)):(f.renderedPixelBlock=this.layer._rasterRenderer.draw(f).pixelBlock,
l.resolve(f))):(f.renderedPixelBlock=f.processedPixelBlock||f.pixelBlock,l.resolve(f));return l.promise},_sortTiles:function(){this.tiles.sort(function(f,l){return f.row<l.row||f.row==l.row&&f.col<l.col?-1:1})}})})},"esri/dijit/RasterFunctionEditor/utils":function(){define("dojo/_base/lang dojo/_base/url dojo/has dojo/on dojo/Deferred dojo/_base/array ../../kernel ../../request ../../lang ../../config ../../layers/ArcGISImageServiceLayer ../../layers/ImageServiceParameters ../../layers/MosaicRule ../../layers/RasterFunction ../../tasks/Geoprocessor ../../tasks/JobInfo ../../renderers/colorUtils ../../renderers/colorRampUtils".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u){function B(t){if(t){var v=d.map([t.FromColor,t.ToColor],function(C){C=w.toRGB({h:C.Hue,s:C.Saturation,v:C.Value});return[C.r,C.g,C.b]});return{fromColor:v[0],toColor:v[1],type:"algorithmic",algorithm:t.Algorithm}}}function x(t){if(t)return t=w.toHSV(w.getDojoColor(t)),{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function E(t){if(t){var v=t.toJson?t.toJson():void 0;return{Algorithm:v&&v.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",
FromColor:x(t.fromColor),ToColor:x(t.toColor)}}}var y={},D,G,A;H.mixin(y,{fetchRFT:function(t,v,C,J,L){var S=new q;var U=(U=(U=t.name)&&U.slice(-8))&&".rft.xml"===U.toLowerCase();return t&&t.itemDataUrl?U?L?this.convertRFT({url:L+"/ConvertRasterFunctionTemplate",rft:{itemId:t.id},format:"json"},v,J,C):(C("errorUtilitiesServiceNotAvailable"),S.reject(Error("errorUtilitiesServiceNotAvailable")),S.promise):a({url:t.itemDataUrl,callbackParamName:"callback",content:{f:"json"},handleAs:"json",load:v,error:C}).then(J):
(C("errorRetrievingRFTItem"),S.reject(Error("errorRetrievingRFTItem")),S.promise)},convertRFT:function(t,v,C,J){var L=t.url,S=function(){A&&(A.remove(),A=null);G&&(G.remove(),G=null)};D||(D=new p(L),n(D,"error",S));G=n(D,"job-complete",function(U){G&&(G.remove(),G=null);U.jobInfo.jobStatus!==r.STATUS_SUCCEEDED?(S(),J(U)):D.getResultData(U.jobInfo.jobId,"outputRasterFunction")});A=n(D,"get-result-data-complete",function(U){A&&(A.remove(),A=null);var aa=U&&U.result&&U.result.value;aa&&aa.url&&(U={url:aa.url,
handleAs:"json",load:C,error:J},aa=(new e(aa.url)).authority,-1===h.defaults.io.corsEnabledServers.indexOf(aa)&&h.defaults.io.corsEnabledServers.push(aa),a(U))});t={inputRasterFunction:JSON.stringify(t.rft),format:t.format};return D.submitJob(t,v,null,J)},getRasterJsonFromLayer:function(t){if(!t)return null;var v=t.url;v&&0<v.indexOf("?token\x3d")&&(v=v.slice(0,v.indexOf("?token\x3d")));var C=t.credential||v&&c.id.findCredential(v);b.isDefined(C)&&(v=v+"?token\x3d"+C.token,C.referer&&(v+=C.referer));
v={url:v,name:t.name};t.renderingRule&&(v.renderingRule=t.renderingRule.toJson?t.renderingRule.toJson():t.renderingRule);t.mosaicRule&&(v.mosaicRule=t.mosaicRule.toJson?t.mosaicRule.toJson():t.mosaicRule);return v},getLayerIdfromRasterValue:function(t,v){if(t&&v){var C;d.some(v,function(J){if(J&&J.url===t.url&&J.name===t.name&&t.name)return C=J.id,!0});return C}},getColorRampFromArg:function(t){if(t){var v;if(t.type&&-1<t.type.toLowerCase().indexOf("colorramp"))var C=t;else t.value&&-1<t.value.type.toLowerCase().indexOf("colorramp")&&
(C=t.value);if(C)return t=C.type.toLowerCase(),"multipartcolorramp"===t?v=u.fromJson({type:"multipart",colorRamps:d.map(C.ArrayOfColorRamp,function(J){return B(J)})}):"algorithmiccolorramp"===t&&(v=u.fromJson(B(C))),v.id=v.name=C.Name,v}},getRFxArgColorRampValue:function(t){if(t){if(t.fromColor&&t.toColor)return H.mixin(E(t),{Name:t.name});if(t.colorRamps){var v=d.map(t.colorRamps,E);return{type:"MultiPartColorRamp",NumColorRamps:v.length,ArrayOfColorRamp:v,Name:t.name}}}},RFX_VARIABLE_TYPE:"RasterFunctionVariable",
RFX_TEMPLATE_TYPE:"RasterFunctionTemplate",ARGUMENT_ARRAY_TYPE:"ArgumentArray",getArgRFT:function(t){if(t){if("RasterFunctionTemplate"===t.type)return t;if(t.value&&"RasterFunctionTemplate"===t.value.type)return t.value}},getEnumData:function(t,v,C){if(Array.isArray(t))return t.forEach(function(J){J.key=J.key.toString()}),t},getImageServiceTitle:function(t){t=t.split("/");return t[t.length-2]},isReferencedObject:function(t){if(t&&b.isDefined(t._object_ref_id))return!0},functionTypes:{local:"LocalFunction",
gpAdapter:"GPAdapterFunction",pythonAdapter:"PythonAdapterFunction"},defaultRasterNodeProps:{name:"Raster",isDataset:!0,isPublic:!1,type:"RasterFunctionVariable"},getArcGISImageServiceLayerItem:function(t){if(t){t=H.clone(t);t.name||(t.name=this.getImageServiceTitle(t.url));var v=new k;t.mosaicRule&&(v.mosaicRule=new f(t.mosaicRule));t.renderingRule&&(v.renderingRule=new l(t.renderingRule));v=new g(t.url,{id:t.name+(new Date).toString(),imageServiceParameters:v});v.name=t.name;return v}},filterMDInfoIfMosiacRuleIsSet:function(t){var v=
H.clone(t.multidimensionalInfo),C=[],J=t.mosaicRule&&t.mosaicRule.multidimensionalDefinition;if(J&&0<J.length){var L=v.variables.filter(function(S){return J[0].variableName===S.name}.bind(this));if(!L||0===L.length)return v;L=L[0];C=H.clone(L);C.dimensions=[];J.forEach(function(S){var U=L.dimensions.filter(function(da){return S.dimensionName===da.name}.bind(this));if(U&&0!==U.length){var aa=(U=U[0])&&U.values,ea=0,ba=1,oa=S.values&&S.values.length;switch(S.values&&S.values[0].length||oa){case 1:ea=
aa.indexOf(S.values[0]);ba=ea+1;break;case 2:ea=aa.indexOf(S.values[0][0]),ba=aa.indexOf(S.values[0][1])+1}aa=aa.slice(ea,ba);U.values=aa;C.dimensions.push(U)}else C.dimensions=H.clone(L.dimensions)}.bind(this));v.variables=[C]}return v}});m("extend-esri")&&H.setObject("dijit.RasterFunctionEditor.utils",y,c);return y})},"widgets/Geoprocessing/editors/SelectFeatureSetFromFile":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-attr dojo/dom-style dojo/on dojo/json dojo/text!./SelectFeatureSetFromFile.html dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin esri/request esri/geometry/scaleUtils esri/InfoTemplate esri/layers/FeatureLayer esri/renderers/SimpleRenderer esri/tasks/FeatureSet jimu/dijit/Message jimu/dijit/CheckBox jimu/portalUrlUtils jimu/symbolUtils jimu/utils ./BaseFeatureSetEditor ../utils dijit/form/Form dijit/form/Select".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u,B,x,E,y){return H([E,a,b],{baseClass:"jimu-gp-editor-base jimu-gp-editor-file",templateString:c,editorName:"SelectFeatureSetFromFile",layer:void 0,constructor:function(){this.uniqueID=y.uniqueId()},postCreate:function(){this.inherited(arguments);n.set(this.clearLink,"display","none");n.set(this.uploadStatus,"display","none");this.uploadStatus.src=require.toUrl("jimu")+"/images/loading_circle.gif";this.generalizeCheckbox=new w({checked:!0,label:this.nls.generalize});
this.generalizeCheckbox.placeAt(this.checkboxNode)},destroy:function(){this._clear()},getValue:function(){if(0===this.activeViewIndex){if(this.layer){var D=new p;D.features=this.layer.graphics;return D}return null}return this.getFeatureSet()},_onUpload:function(){if(m.get(this.fileInput,"value")){var D=m.get(this.fileInput,"value");D=D.replace(/\\/g,"/");D=D.substr(D.lastIndexOf("/")+1);this.fileInfo.innerHTML=x.sanitizeHTML(D);n.set(this.uploadStatus,"display","");D={name:D,targetSR:this.map.spatialReference,
maxRecordCount:4E3,enforceInputFileSizeLimit:!0,enforceOutputJsonSizeLimit:!0};var G;if(this.generalizeCheckbox.getValue()){var A=g.getExtentForScale(this.map,4E4);A=A.getWidth()/this.map.width;D.generalize=!0;D.maxAllowableOffset=A;A/=10}else A=g.getExtentForScale(this.map,400),A=A.getWidth()/this.map.width;for(G=0;1>A;)A*=10,G++;D.reducePrecision=!0;D.numberOfDigitsAfterDecimal=G;h({url:this._getPortalUrl()+"/sharing/rest/content/features/generate",content:{filetype:"shapefile",publishParameters:d.stringify(D),
f:"json"},form:this.fileForm.domNode,handleAs:"json",load:e.hitch(this,function(t){n.set(this.uploadStatus,"display","none");t.error?new r({message:t.error.message||t.error}):this.addToMap(t.featureCollection)}),error:e.hitch(this,function(){n.set(this.uploadStatus,"display","none");var t=this.nls.generateShapefileError+this._getPortalUrl()+"/sharing/rest/content/features/generate";new r({message:t})})})}else new r({message:this.nls.noFileSelected})},addToMap:function(D){this._clear();D=D.layers[0];
var G=new k("Details","${*}");this.layer=new f(D,{infoTemplate:G});this.own(q(this.layer,"click",e.hitch(this,function(A){this.map.infoWindow.setFeatures([A.graphic])})));this.changeRenderer();D=this.layer.fullExtent;this.map.addLayer(this.layer);this.map.setExtent(D.expand(1.25),!0);n.set(this.clearLink,"display","")},changeRenderer:function(){var D=null;switch(this.layer.geometryType){case "esriGeometryPoint":D=B.getDefaultMarkerSymbol();break;case "esriGeometryPolyline":D=B.getDefaultLineSymbol();
break;case "esriGeometryPolygon":D=B.getDefaultFillSymbol()}D&&this.layer.setRenderer(new l(D))},_getPortalUrl:function(){return u.getStandardPortalUrl(this.appConfig.portalUrl)},_clear:function(){this.layer&&(this.layer.clear(),this.map.removeLayer(this.layer),this.fileInfo.innerHTML="",m.set(this.fileInput,"value",""),n.set(this.clearLink,"display","none"))}})})},"widgets/Geoprocessing/utils":function(){define(["dojo/_base/array","dojo/Deferred","esri/request"],function(H,e,m){var n={},q=0;n.promisifyGetValue=
function(d){var c=d.getValue;d.getValue=function(){var a=c.apply(d);if(null!==a&&a.then)return a;var b=new e;b.resolve(a);return b}};n.allowShareResult=function(d){return H.some(d.outputParams,function(c){return"GPRecordSet"===c.dataType||"GPFeatureRecordSetLayer"===c.dataType&&c.defaultValue&&c.defaultValue.geometryType})};n.getServiceDescription=function(d){var c;return m({url:d,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}).then(function(a){c=a;return n.getGPServerDescription(d).then(function(b){c.serverInfo=
b;c.useResultMapServer=b.hasResultMapServer;return n.uploadSupported(b).then(function(h){c.serverInfo.supportsUpload=h.supportsUpload;"maxUploadFileSize"in h&&(c.serverInfo.maxUploadFileSize=h.maxUploadFileSize);return c})})})};n.getGPServerDescription=function(d){var c={url:n.getGPServerUrl(d),content:{f:"json"},handleAs:"json",callbackParamName:"callback"};return m(c,{useProxy:!1}).then(function(a){var b={};b.currentVersion=a.currentVersion||0;b.url=c.url;b.hasResultMapServer="esriExecutionTypeAsynchronous"===
a.executionType&&"resultMapServerName"in a&&""!==a.resultMapServerName;b.resultMapServerName=a.resultMapServerName;return b})};n.getGPServerUrl=function(d){if(!/\/GPServer\/.+$/.test(d))return"";var c=d.lastIndexOf("/");return d.substr(0,c+1)};n.getResultMapServerUrl=function(d,c){if(!/\/rest\/services\//.test(d))return"";var a=d.search(/\/rest\/services\//);return d.substr(0,a+15)+c+"/MapServer"};n.uploadSupported=function(d){if(10.1<=d.currentVersion)return m({url:d.url+"uploads/info",content:{f:"json"},
handleAs:"json"}).then(function(c){return{supportsUpload:!0,maxUploadFileSize:c.maxUploadFileSize}},function(){return{supportsUpload:!1}});d=new e;d.resolve({supportsUpload:!1});return d};n.getResultMapLayers=function(d,c){d={url:n.getResultMapServerUrl(d,c),content:{f:"json"},handleAs:"json",callbackParamName:"callback"};return m(d,{useProxy:!1}).then(function(a){var b=H.map(a.layers,function(h){return h.name});H.forEach(a.tables,function(h){b.push(h.name)});return b})};n.useDynamicSchema=function(d,
c){return"useDynamicSchema"in d?!0===d.useDynamicSchema:!0===c.useDynamicSchema};n.uniqueId=function(){var d=Date.now();d<=q?d=++q:q=d;return d};return n})},"widgets/Geoprocessing/editors/SelectFeatureSetFromDraw":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/html dijit/_TemplatedMixin jimu/dijit/DrawBox esri/symbols/jsonUtils esri/tasks/FeatureSet esri/geometry/Polygon esri/graphic esri/graphicsUtils ./BaseFeatureSetEditor dojo/text!./SelectFeatureSetFromDraw.html ../LayerOrderUtil".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l){return H([k,q],{editorName:"SelectFeatureSetFromDraw",templateString:f,constructor:function(p){this.inherited(arguments);this.paramName=p.param.name;this.drawLayerId=p.widgetUID+p.param.name},postCreate:function(){this.inherited(arguments);n.addClass(this.domNode,"jimu-gp-editor-draw");n.addClass(this.domNode,"jimu-gp-editor-base");var p={types:this.types,drawLayerId:this.drawLayerId,showClear:this.showClear,map:this.map};this.param.symbol&&(p[this.types[0]+"Symbol"]=
c.fromJson(this.param.symbol));this.drawBox=new d(p);n.place(this.drawBox.domNode,this.inputNode);this.drawBox.startup();try{(new l(this.config,this.map)).calculateLayerIndex(this.paramName,this.widgetUID).then(e.hitch(this,function(r){-1!==r&&this.map.reorderLayer(this.drawBox.drawLayer,r)}))}catch(r){console.error(r.message)}this.startup()},getValue:function(){return 0===this.activeViewIndex?this.drawBox.drawLayer&&0<this.drawBox.drawLayer.graphics.length?this._createFeatureSet(this.drawBox.drawLayer.graphics):
null:this.getFeatureSet()},_createFeatureSet:function(p){var r=new a,w=[];p=g.getGeometries(p);m.forEach(p,function(u){u="extent"===u.type?new h(b.fromExtent(u)):new h(u);w.push(u)});r.features=w;return r}})})},"widgets/Geoprocessing/LayerOrderUtil":function(){define(["dojo/_base/declare","dojo/_base/array","dojo/Deferred","jimu/LayerInfos/LayerInfos"],function(H,e,m,n){return H(null,{config:null,constructor:function(q,d){this.config=q;this.map=d;"layerOrder"in this.config&&0!==this.config.layerOrder.length||
(this.config.layerOrder=this.getCandidateParamNames(!1))},getCandidateParamNames:function(q){var d=[];if(!this.config)return d;e.forEach(this.config.outputParams,function(c){"GPFeatureRecordSetLayer"!==c.dataType||q&&!0===this.config.useResultMapServer||d.push(c.name)},this);e.forEach(this.config.inputParams,function(c){"GPFeatureRecordSetLayer"!==c.dataType||q&&"draw"!==c.featureSetMode||d.push(c.name)},this);return d},getOrderableInput:function(){var q=[];if(!this.config)return q;e.forEach(this.config.inputParams,
function(d){"GPFeatureRecordSetLayer"===d.dataType&&"draw"===d.featureSetMode&&q.push(d.name)},this);return e.filter(this.config.layerOrder,function(d){return-1!==e.indexOf(q,d)},this)},getOrderableOutput:function(){var q=[];if(!this.config)return q;e.forEach(this.config.outputParams,function(d){"GPFeatureRecordSetLayer"===d.dataType&&!0!==this.config.useResultMapServer&&q.push(d.name)},this);return e.filter(this.config.layerOrder,function(d){return-1!==e.indexOf(q,d)},this)},calculateLayerIndex:function(q,
d){if(!this.map)throw Error("The map cannot be null in LayerOrderUtil.calculateLayerIndex");var c=new m,a=this.config.layerOrder;var b=e.indexOf(a,q);if(-1===b)throw Error(q+"cannot be found in the orderable params");for(q=b-1;0<=q;q--){var h=e.indexOf(this.map.graphicsLayerIds,d+a[q]);if(-1!==h)return c.resolve(h),c}q=b+1;for(b=a.length;q<b;q++)if(h=e.indexOf(this.map.graphicsLayerIds,d+a[q]),-1!==h)return c.resolve(h+1),c;c.isResolved()||n.getInstance(this.map,this.map.itemInfo).then(function(g){g=
g.getMapNotesLayerInfoArray();if(0===g.length)c.resolve(-1);else{g=g[g.length-1];var k=g.getSubLayers();g=0===k.length?g.layerObject.id:k[k.length-1].layerObject.id;h=e.indexOf(this.map.graphicsLayerIds,g);c.resolve(h)}});return c}})})},"widgets/Geoprocessing/editors/DataFileEditor":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/_base/array dojo/dom-style dojo/dom-attr dojo/on dojo/Deferred dojo/text!./DataFileEditor.html dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin esri/tasks/DataFile esri/request jimu/dijit/ViewStack jimu/dijit/Message jimu/utils ../BaseEditor ../utils dijit/form/Form jimu/dijit/URLInput dijit/form/RadioButton".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r,w,u){return H([w,h,g],{baseClass:"jimu-gp-editor-base jimu-gp-editor-datafile",templateString:b,editorName:"DataFileEditor",mode:"url",_url:"",_itemID:null,uniqueID:null,constructor:function(){this.inherited(arguments);this.uniqueID=u.uniqueId()},postCreate:function(){this.inherited(arguments);this.value&&this.parseDefaultValue();d.set(this.urlEditor,"tooltip",this.param.tooltip);"setting"===this.context?(this.viewStack=null,q.set(this.fileNode,"display","none")):
(this.viewStack=new l({viewType:"dom",views:[this.urlNode,this.fileNode]}),this.viewStack.placeAt(this.settingNode),this.viewStack.startup());!0===this.config.serverInfo.supportsUpload&&q.set(this.modeSelection,"display","");this.own(c(this.urlMode,"click",e.hitch(this,this._onUrlModeSelect)));this.own(c(this.itemMode,"click",e.hitch(this,this._onItemModeSelect)));"item"===this.mode&&this.config.serverInfo.supportsUpload?(this.itemMode.set("checked",!0),this._onItemModeSelect()):(this.urlMode.set("checked",
!0),this._onUrlModeSelect(),this.urlEditor.set("value",this._url));if(this.param.filter&&this.param.filter.type&&"file"===this.param.filter.type.toLowerCase()&&this.param.filter.list&&0<this.param.filter.list.length){var B=n.map(this.param.filter.list,function(x){return"."+x});m.setAttr(this.fileInput,"accept",B.join(","))}},parseDefaultValue:function(){0===this.value.indexOf("itemID:")?this.mode="item":(0===this.value.indexOf("url:")&&(this._url=this.value.substring(4)),this.mode="url")},hasValidValue:function(){if("item"===
this.mode)return!0;if("url"===this.mode)return this.urlEditor.isValid()},getValue:function(){return"url"===this.mode?"url:"+this._getUrl():"item"===this.mode?"itemID:":""},getGPValue:function(){var B=new a,x=new k;"url"===this.mode?x.url=this._getUrl():x.itemID=this.itemIDInput;x.url||x.itemID?B.resolve(x):B.resolve(null);return B},_getUrl:function(){return this.urlEditor.isValid()?this.urlEditor.get("value"):""},_onUrlModeSelect:function(){this.mode="url";this.viewStack?this.viewStack.switchView(0):
q.set(this.urlNode,"display","block")},_onItemModeSelect:function(){this.mode="item";this.viewStack?this.viewStack.switchView(1):q.set(this.urlNode,"display","none")},_onUpload:function(){d.get(this.fileInput,"value")&&this._doUpload().then(e.hitch(this,function(B){B&&new p({message:this.nls.uploadSuccess})}),function(B){new p({message:B.message||B})})},_doUpload:function(){var B=new a,x=d.get(this.fileInput,"value");x=x.replace(/\\/g,"/");x=x.substr(x.lastIndexOf("/")+1);f({url:this.config.serverInfo.url+
"uploads/upload",form:this.fileForm.domNode,handleAs:"json"}).then(e.hitch(this,function(E){E.success&&(this.itemIDInput=E.item.itemID,d.set(this.fileInput,"value",""),d.set(this.uploadFileName,"innerHTML",r.sanitizeHTML(x)));B.resolve(E.success)}),function(E){B.reject(E)});return B}})})},"widgets/Geoprocessing/editors/RasterLayerEditor":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/dom-style dojo/dom-attr dojo/on dojo/Deferred dojo/text!./RasterLayerEditor.html dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin esri/tasks/RasterData esri/request jimu/dijit/ViewStack jimu/dijit/Message ../BaseEditor ../utils dijit/form/TextBox jimu/dijit/URLInput dijit/form/RadioButton".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l,p,r){return H([p,b,h],{baseClass:"jimu-gp-editor-base jimu-gp-editor-wrapper",templateString:a,editorName:"RasterLayerEditor",mode:"url",_url:"",_format:"",_itemID:null,uniqueID:null,constructor:function(){this.inherited(arguments);this.uniqueID=r.uniqueId()},postCreate:function(){this.inherited(arguments);this.value&&this.parseDefaultValue();q.set(this.urlEditor,"tooltip",this.param.tooltip);"setting"===this.context?(this.viewStack=null,n.set(this.fileNode,"display",
"none")):(this.viewStack=new f({viewType:"dom",views:[this.urlNode,this.fileNode]}),this.viewStack.placeAt(this.settingNode),this.viewStack.startup());this.config.serverInfo.supportsUpload&&n.set(this.modeSelection,"display","");this.own(d(this.urlMode,"click",e.hitch(this,this._onUrlModeSelect)));this.own(d(this.itemMode,"click",e.hitch(this,this._onItemModeSelect)));"item"===this.mode&&this.config.serverInfo.supportsUpload?(this.itemMode.set("checked",!0),this._onItemModeSelect()):(this.urlMode.set("checked",
!0),this._onUrlModeSelect(),this.rasterFormatInput.set("value",this._format),this.urlEditor.set("value",this._url))},parseDefaultValue:function(){if(0===this.value.indexOf("itemID:"))this.mode="item";else{if(0===this.value.indexOf("url:")||0===this.value.indexOf("format:")){var w=this.value.split(",");m.forEach(w,function(u){0===u.indexOf("url:")?this._url=u.substring(4):u.indexOf(!1)&&(this._format=u.substring(7))},this)}this.mode="url"}},hasValidValue:function(){if("item"===this.mode)return!0;if("url"===
this.mode)return this.urlEditor.isValid()},getValue:function(){return"url"===this.mode?"url:"+this._getUrl()+",format:"+this.rasterFormatInput.get("value"):"item"===this.mode?"itemID:":""},getGPValue:function(){var w=new c,u=new g;"url"===this.mode?(u.url=this._getUrl(),u.format=this.rasterFormatInput.get("value")):u.itemID=this.itemIDInput;u.url||u.itemID?w.resolve(u):w.resolve(null);return w},_getUrl:function(){return this.urlEditor.isValid()?this.urlEditor.get("value"):""},_onUrlModeSelect:function(){this.mode=
"url";this.viewStack?this.viewStack.switchView(0):n.set(this.urlNode,"display","block")},_onItemModeSelect:function(){this.mode="item";this.viewStack?this.viewStack.switchView(1):n.set(this.urlNode,"display","none")},_onUpload:function(){if(q.get(this.fileInput,"value")){var w=q.get(this.fileInput,"value");w=w.replace(/\\/g,"/");w=w.substr(w.lastIndexOf("/")+1);k({url:this.config.serverInfo.url+"uploads/upload",form:this.fileForm.domNode,handleAs:"json"}).then(e.hitch(this,function(u){u.success&&
(this.itemIDInput=u.item.itemID,q.set(this.fileInput,"value",""),q.set(this.uploadFileName,"innerHTML",w),new l({message:this.nls.uploadSuccess}))}),e.hitch(this,function(u){new l({message:u.message||u})}))}}})})},"widgets/Geoprocessing/editors/RecordSetEditor":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","../BaseEditor","../PopupConfig"],function(H,e,m,n,q){return H([n],{baseClass:"jimu-gp-editor-base jimu-gp-editor-rse",editorName:"RecordSetEditor",popupConfig:null,
args:null,constructor:function(d){this.args=e.mixin({},d)},postCreate:function(){this.inherited(arguments);this.value={};var d={showTitle:!1};if(this.args&&this.args.param&&this.args.param.defaultValue){this.value=e.clone(this.args.param.defaultValue);var c=this.value.fields;if(this.value.output&&this.value.output.fields)if(this.value.output.fields.length!==c.length){var a=m.map(this.value.output.fields,function(b){return b.name});m.forEach(c,function(b){0<=a.indexOf(b.name)?b.visible=!0:b.visible=
!1})}else c=this.value.output.fields;d.fields=c;this.popupConfig=new q(d);this.popupConfig.placeAt(this.domNode);this.popupConfig.startup()}else this.domNode.innerHTML="table"},destroy:function(){this.popupConfig&&(this.popupConfig.destroy(),this.popupConfig=null);this.inherited(arguments)},getValue:function(){if(this.popupConfig){var d=this.popupConfig.getConfig();this.value.output={title:d.title,fields:d.fields};this.value.fields=this.args.param.defaultValue.fields}return this.value}})})},"widgets/Geoprocessing/editors/RecordSetEditorChooser":function(){define("dojo/_base/declare dojo/_base/html dojo/_base/lang dojo/on dojo/text!./RecordSetEditorChooser.html dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin ../BaseEditor ./simpleEditors dojo/i18n!../nls/strings dijit/form/RadioButton".split(" "),
function(H,e,m,n,q,d,c,a,b,h){return H([a,d,c],{baseClass:"jimu-gp-editor-base jimu-gp-editor-rsec",templateString:q,editorName:"RecordSetEditorChooser",postMixInProperties:function(){this.inherited(arguments);m.mixin(this.nls,h)},postCreate:function(){this.inherited(arguments);this.value={};this.own(n(this.jsonMode,"click",m.hitch(this,this._onJSONModeSelect)));this.own(n(this.tableMode,"click",m.hitch(this,this._onTableModeSelect)));"json"===this.param.recordSetMode?(this.jsonMode.set("checked",
!0),this._onJSONModeSelect()):"table"===this.param.recordSetMode&&(this.tableMode.set("checked",!0),this._onTableModeSelect());this.editor=new b.SimpleJsonEditor({value:this.param.defaultValue,nls:this.nls});this.editor.placeAt(this.jsonEditorDiv)},getValue:function(){"json"===this.value.recordSetMode&&(this.value.defaultValue=this.editor.getValue());return this.value},_onJSONModeSelect:function(){this.value.recordSetMode="json";e.setStyle(this.defaultJSONDiv,"display","block")},_onTableModeSelect:function(){this.value.recordSetMode=
"table";e.setStyle(this.defaultJSONDiv,"display","none")}})})},"widgets/Geoprocessing/editors/SelectRecordSetFromTable":function(){define("dojo/_base/declare dojo/Deferred dojo/_base/lang dojo/_base/array jimu/LayerInfos/LayerInfos dijit/form/Select esri/tasks/query esri/tasks/QueryTask dijit/_TemplatedMixin ../BaseEditor".split(" "),function(H,e,m,n,q,d,c,a,b,h){return H([h,b],{templateString:'\x3cdiv\x3e\x3cdiv class\x3d"recordset-editor" data-dojo-attach-point\x3d"tableChooseNode"\x3e\x3c/div\x3e\x3c/div\x3e',
editorName:"SelectRecordSetFromTable",postCreate:function(){this.inherited(arguments);var g=q.getInstanceSync().getTableInfoArray(),k=[{label:this.nls.chooseATable,value:"",selected:!0}];n.forEach(g,function(f){k.push({label:f.title||f.name,value:f})});this.selectDijit=new d({name:"tableSelctor","class":"table-select",options:k});this.selectDijit.placeAt(this.tableChooseNode).startup()},getGPValue:function(){var g=new e,k=this.selectDijit.get("value");k?k.getLayerObject().then(m.hitch(this,function(f){if(f)if(f.featureCollectionData)g.resolve(f.featureCollectionData);
else if(f.url){f=new a(f.url);var l=new c;l.where="1\x3d1";l.outFields=["*"];f.execute(l,function(p){g.resolve(p)},function(p){g.reject(p)})}else g.resolve(null);else g.resolve(null)})):g.resolve(null);return g}})})},"widgets/Geoprocessing/EditorChooser":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/_base/array dojo/on dojo/query dijit/_WidgetBase dijit/form/Select jimu/utils".split(" "),function(H,e,m,n,q,d,c,a,b){return H([c],{baseClass:"jimu-gp-editor-chooser",editors:[{name:"NumberTextBox",
label:"NumberTextBox",description:""},{name:"URLInput",label:"URLInput",description:""},{name:"CheckBox",label:"CheckBox",description:""},{name:"DateTimeEditor",label:"DateTime Chooser",description:""},{name:"LinerUnitEditor",label:"LinerUnit Editor",description:""},{name:"SelectFeatureSetFromLayer",label:"SelectFeatureSetFromLayer",description:""},{name:"SelectFeatureSetFromUrl",label:"SelectFeatureSetFromUrl",description:""},{name:"GetUrlObjectFromLayer",label:"GetUrlObjectFromLayer",description:""},
{name:"LayerFieldChooser",label:"LayerFieldChooser",description:""}],postCreate:function(){this.inherited(arguments);this._createEditorNodes()},_createEditorNodes:function(){n.forEach(this.editors,function(h){this._createEditorNode(h)},this)},_createEditorNode:function(h){var g=m.create("div",{"class":"editor-node"},this.domNode);this.box=m.create("div",{"class":"node-box"},g);m.create("img",{src:h.img},this.box);m.create("div",{"class":"node-label",innerHTML:b.sanitizeHTML(h.label)},g);if("LayerFieldChooser"===
h.name){var k=new a({options:n.map(this.inputParams,function(f){return{label:f.name,value:f.name}}),style:{position:"absolute",right:0,bottom:0}});k.placeAt(this.box)}this.own(q(g,"click",e.hitch(this,function(){d(".editor-node").removeClass("jimu-state-selected");m.addClass(g,"jimu-state-selected");this.selectedEditor=h;k&&(this.selectedEditor.dependParam=k.getValue())})));return g}})})},"widgets/Geoprocessing/setting/ParamNodeList":function(){define("dojo/_base/declare dojo/_base/lang dojo/string dojo/aspect dojo/on dojo/dom-class dojo/dom-style dojo/dom dojo/Evented dojo/dnd/Source dojo/dom-construct dijit/_WidgetBase dojo/text!./ParamNode.html dojo/text!./ParamNodeAvatar.html".split(" "),
function(H,e,m,n,q,d,c,a,b,h,g,k,f,l){return H([k,b],{params:void 0,nls:void 0,direction:void 0,useResultMapServer:!1,postCreate:function(){this.inherited(arguments);this.dndObj=new h(this.domNode,{singular:!0,withHandles:!0,accept:[this.direction],creator:e.hitch(this,this._paramNodeCreator)});this.dndObj.insertNodes(!1,this.params);!0===this.useResultMapServer&&"output"===this.direction?this.hideOutputInResultMap():this.showOutputInResultMap();this.own(q(this.domNode,"click",e.hitch(this,this.select)));
n.after(this.dndObj,"onDrop",e.hitch(this,this.handleDrop))},_paramNodeCreator:function(p,r){return{node:"avatar"===r?g.toDom(m.substitute(l,{param_name:p.name})):g.toDom(m.substitute(f,{nls_name:this.nls.name,nls_type:this.nls.type,nls_required:this.nls.required,param_name:p.name,param_dataType:p.dataType,param_required:p.required})),data:p,type:[this.direction]}},getSize:function(){return this.params.length},selectDefault:function(){var p=this.dndObj.getAllNodes()[0],r=this.dndObj.getItem(p.id);
d.add(p,"dojoDndItemAnchor");this.emit("select-param",r.data,this.direction)},select:function(p){var r=p.target||p.srcElement,w;this.dndObj.getAllNodes().forEach(function(u){a.isDescendant(r,u)?(w=u,d.add(u,"dojoDndItemAnchor")):d.remove(u,"dojoDndItemAnchor")});w&&(p=this.dndObj.getItem(w.id),this.emit("select-param",p.data,this.direction))},clearSelection:function(){this.dndObj.getAllNodes().forEach(function(p){d.remove(p,"dojoDndItemAnchor")})},handleDrop:function(p,r){var w=r[1][0];this.dndObj.getAllNodes().forEach(function(u){u.id!==
w.id&&d.remove(u,"dojoDndItemAnchor")});p=this.dndObj.getItem(w.id);this.emit("select-param",p.data,this.direction)},getConfig:function(){var p=[];this.dndObj.getAllNodes().forEach(function(r){r=this.dndObj.getItem(r.id);p.push(r.data)},this);return p},hideOutputInResultMap:function(){this.dndObj.getAllNodes().forEach(function(p){var r=this.dndObj.getItem(p.id);"GPFeatureRecordSetLayer"!==r.data.dataType&&"GPRasterDataLayer"!==r.data.dataType&&"GPRecordSet"!==r.data.dataType||c.set(p,"display","none");
"MapServiceLayer"===r.data.dataType&&c.set(p,"display","")},this)},showOutputInResultMap:function(){this.dndObj.getAllNodes().forEach(function(p){var r=this.dndObj.getItem(p.id);"GPFeatureRecordSetLayer"!==r.data.dataType&&"GPRasterDataLayer"!==r.data.dataType&&"GPRecordSet"!==r.data.dataType||c.set(p,"display","");"MapServiceLayer"===r.data.dataType&&c.set(p,"display","none")},this)}})})},"widgets/Geoprocessing/setting/LayerOrder":function(){define(["dojo/_base/declare","dojo/_base/array","dijit/_WidgetBase",
"jimu/dijit/SimpleTable","../LayerOrderUtil"],function(H,e,m,n,q){return H([m],{baseClass:"jimu-widget-setting-gp-layer-order",postCreate:function(){this.inherited(arguments);this.table=new n({fields:[{name:"layerName",title:this.nls.layer,type:"text"},{name:"actions",title:this.nls.action,type:"actions",actions:["up","down"]}]});this.table.placeAt(this.domNode)},startup:function(){this.inherited(arguments);this.table.startup()},setConfig:function(d){this.config=d;this.table.clear();this.layerOrderUtil=
new q(this.config,null);0===this.config.layerOrder.length&&(this.config.layerOrder=this.layerOrderUtil.getCandidateParamNames(!1));0<this.config.layerOrder.length&&this._initLayerTable()},acceptValue:function(){if(this.config){var d,c;if(0<this.config.layerOrder.length){var a=e.map(this.table.getData(),function(g){return g.layerName});if(0<a.length){var b=d=0;for(c=this.config.layerOrder.length;b<c;b++){var h=this.config.layerOrder[b];-1!==e.indexOf(a,h)&&(this.config.layerOrder[b]=a[d],d+=1)}}}}},
_initLayerTable:function(){var d=[],c=this.layerOrderUtil.getCandidateParamNames(!0);d=e.filter(this.config.layerOrder,function(a){return-1!==e.indexOf(c,a)},this);e.forEach(d,function(a){this.table.addRow({layerName:a})},this)}})})},"widgets/Geoprocessing/setting/Options":function(){define("dojo/_base/declare dojo/text!./Options.html dojo/_base/lang dojo/Evented dojo/on dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin ../utils dijit/form/TextBox jimu/dijit/CheckBox".split(" "),
function(H,e,m,n,q,d,c,a,b){return H([d,c,a,n],{baseClass:"jimu-widget-setting-gp-options",templateString:e,setConfig:function(h){this.config=h;this.helpUrl.setValue(h.helpUrl);b.allowShareResult(h)?(this.shareResults.setStatus(!0),this.shareResults.setValue(!!h.shareResults)):(this.shareResults.setValue(!1),this.shareResults.setStatus(!1));h.serverInfo.hasResultMapServer?(this.useResultMapServer.setStatus(!0),this.useResultMapServer.setValue(!!h.useResultMapServer),this.setUserResultMapServer(this.useResultMapServer.getValue()),
this.own(q(this.useResultMapServer,"change",m.hitch(this,function(g){this.setUserResultMapServer(g);this.emit("result-map-service",g)})))):(this.useResultMapServer.setValue(!1),this.useResultMapServer.setStatus(!1));this.showExport.setValue(!!h.showExportButton)},setUserResultMapServer:function(h){h?(this.shareResults.setValue(!0),this.shareResults.setStatus(!1)):this.shareResults.setStatus(!0)},acceptValue:function(){this.config&&(this.config.helpUrl=this.helpUrl.getValue(),this.useResultMapServer.status&&
(this.config.useResultMapServer=this.useResultMapServer.getValue()),this.config.shareResults=this.shareResults.getValue(),this.config.showExportButton=this.showExport.getValue())}})})},"widgets/Geoprocessing/setting/_build-generate_module":function(){define(["dojo/text!./Setting.html","dojo/text!./css/style.css","dojo/i18n!./nls/strings"],function(){})},"url:jimu/dijit/templates/GpSource.html":'\x3cdiv\x3e\r\n  \x3cdiv style\x3d"display: flex;"\x3e\r\n    \x3cdiv\x3e\r\n      \x3cinput name\x3d"gpsource_mode" id\x3d"gpsource_fromportal_${uniqueID}" data-dojo-attach-point\x3d"portalRadio" data-dojo-type\x3d"dijit/form/RadioButton"/\x3e\r\n      \x3clabel for\x3d"gpsource_fromportal_${uniqueID}" data-dojo-attach-point\x3d"portalLabel"\x3e${nls.selectFromPortal}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv style\x3d"margin-left: 20px;"\x3e\r\n      \x3cinput name\x3d"gpsource_mode" id\x3d"gpsource_fromurl_${uniqueID}" data-dojo-attach-point\x3d"urlRadio" data-dojo-type\x3d"dijit/form/RadioButton"/\x3e\r\n      \x3clabel for\x3d"gpsource_fromurl_${uniqueID}" data-dojo-attach-point\x3d"urlLabel"\x3e${nls.addServiceUrl}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"source-content"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"operationTip" class\x3d"operation-tip"\x3e\x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"hflcContainer" class\x3d"dijit-container hflc-container" style\x3d"display:none;"\x3e\x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"flscContainer" class\x3d"dijit-container flsc-container" style\x3d"display:none;"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e',
"url:jimu/dijit/templates/GpChooserFromPortal.html":'\x3cdiv\x3e\r\n\t\x3cdiv class\x3d"selector-container" data-dojo-attach-point\x3d"selectorContainer"\x3e\x3c/div\x3e\r\n\t\x3cdiv class\x3d"layers" data-dojo-attach-point\x3d"browserContainer"\x3e\r\n\t\t\x3cdiv data-dojo-type\x3d"jimu/dijit/GpServiceBrowser" data-dojo-attach-point\x3d"gpServiceBrowser"\x3e\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv class\x3d"footer"\x3e\r\n\t\t\x3cdiv class\x3d"jimu-btn  jimu-float-trailing cancel" data-dojo-attach-point\x3d"btnCancel" data-dojo-attach-event\x3d"onclick:_onBtnCancelClicked"\x3e${nls.cancel}\x3c/div\x3e\r\n\t\t\x3cdiv class\x3d"jimu-btn  jimu-float-trailing next jimu-state-disabled" data-dojo-attach-point\x3d"btnNext" data-dojo-attach-event\x3d"onclick:_onBtnNextClicked"\x3e${nls.next}\x3c/div\x3e\r\n\t\t\x3cdiv class\x3d"jimu-btn  jimu-float-trailing ok jimu-state-disabled" data-dojo-attach-point\x3d"btnOk" data-dojo-attach-event\x3d"onclick:_onBtnOkClicked"\x3e${nls.ok}\x3c/div\x3e\r\n\t\t\x3cdiv class\x3d"jimu-btn  jimu-float-trailing back" data-dojo-attach-point\x3d"btnBack" data-dojo-attach-event\x3d"onclick:_onBtnBackClicked"\x3e${nls.back}\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\x3c/div\x3e',
"url:jimu/dijit/templates/ItemSelector.html":'\r\n\x3cdiv\x3e\r\n\t\x3cdiv class\x3d"setting-tab-container"\x3e\r\n\t\t\x3cdiv data-dojo-attach-point\x3d"tabNode"\x3e\x3c/div\x3e\r\n\r\n\t\t\x3cdiv class\x3d"tab-content mycontent-tab" data-dojo-attach-point\x3d"mycontentTabNode"\x3e\r\n\t\t\t\x3cdiv class\x3d"tab-content-main mycontent-tab-content-main"\x3e\r\n\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"mycontentSearch" data-dojo-type\x3d"jimu/dijit/Search" data-dojo-props\x3d\'searchWhenInput:false\' data-dojo-attach-event\x3d"onSearch:_onMyContentSearch" style\x3d"position:absolute;width:100%;top:0;"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"mycontentItemTable" data-dojo-type\x3d"jimu/dijit/_ItemTable" data-dojo-props\x3d\'types:${_itemTypes},typeKeywords:${_typeKeywords}\' style\x3d"top:50px;"\x3e\x3c/div\x3e\r\n\t\t\t\x3c/div\x3e\r\n\t\t\x3c/div\x3e\r\n\r\n\t\t\x3cdiv class\x3d"tab-content organization-tab" data-dojo-attach-point\x3d"organizationTabNode"\x3e\r\n\t\t\t\x3cdiv class\x3d"tab-content-main organization-tab-content-main"\x3e\r\n\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"organizationSearch" data-dojo-type\x3d"jimu/dijit/Search" data-dojo-props\x3d\'searchWhenInput:false\' data-dojo-attach-event\x3d"onSearch:_onOrganizationSearch" style\x3d"position:absolute;width:100%;top:0;"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"organizationItemTable" data-dojo-type\x3d"jimu/dijit/_ItemTable" data-dojo-props\x3d\'types:${_itemTypes},typeKeywords:${_typeKeywords}\' style\x3d"top:50px;"\x3e\x3c/div\x3e\r\n\t\t\t\x3c/div\x3e\r\n\t\t\x3c/div\x3e\r\n\r\n\t\t\x3cdiv class\x3d"tab-content group-tab" data-dojo-attach-point\x3d"groupTabNode"\x3e\r\n\t\t\t\x3cdiv class\x3d"tab-content-main group-tab-content-main"\x3e\r\n\t\t\t\t\x3cdiv class\x3d"groups-section" data-dojo-attach-point\x3d"groupsSection"\x3e\r\n\t\t\t\t\t\x3cdiv\x3e${nls.groups}:\x3c/div\x3e\r\n\t\t\t\t\t\x3cselect class\x3d"groups-select" data-dojo-attach-point\x3d"groupsSelect"\x3e\r\n\t\t\t\t\t\t\x3coption value\x3d"nodata"\x3e${nls.noneGroups}\x3c/option\x3e\r\n\t\t\t\t\t\x3c/select\x3e\r\n\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"groupSearch" data-dojo-type\x3d"jimu/dijit/Search" data-dojo-props\x3d\'searchWhenInput:false\' data-dojo-attach-event\x3d"onSearch:_onGroupSearch" style\x3d"position:absolute;width:100%;top:0;"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"groupItemTable" data-dojo-type\x3d"jimu/dijit/_ItemTable" data-dojo-props\x3d\'types:${_itemTypes},typeKeywords:${_typeKeywords}\' style\x3d"top:85px;"\x3e\x3c/div\x3e\r\n\t\t\t\x3c/div\x3e\r\n\t\t\x3c/div\x3e\r\n\r\n\t\t\x3cdiv class\x3d"tab-content public-tab" data-dojo-attach-point\x3d"publicTabNode"\x3e\r\n\t\t\t\x3cdiv class\x3d"tab-content-main public-tab-content-main"\x3e\r\n\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"publicSearch" data-dojo-type\x3d"jimu/dijit/Search" data-dojo-props\x3d\'searchWhenInput:false\' data-dojo-attach-event\x3d"onSearch:_onPublicSearch" style\x3d"position:absolute;width:100%;top:0;"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3cdiv class\x3d"public-search-radios"\x3e\r\n\t\t\t\t\t\x3cfieldset id\x3d"publicSearchRaido"\x3e\r\n\t\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"portalPublicRaido" data-dojo-type\x3d"dijit/form/RadioButton" \r\n\t\t\t\t\t\t\tdata-label-id\x3d"portalPublicRaido" name\x3d"publicSearchRaido" class\x3d"jimu-float-leading portal-public-radio" /\x3e\r\n\t\t\t\t\t\t\x3clabel data-dojo-attach-point\x3d"portalPublicLabel" data-label-for\x3d"portalPublicRaido" class\x3d"jimu-float-leading portal-public-label"\x3ePortal\x3c/label\x3e\r\n\r\n\t\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"onlinePublicRaido" data-dojo-type\x3d"dijit/form/RadioButton"\r\n\t\t\t\t\t\t\tdata-label-id\x3d"onlinePublicRaido" name\x3d"publicSearchRaido" class\x3d"jimu-float-leading online-public-radio" /\x3e\r\n\t\t\t\t\t\t\x3clabel data-dojo-attach-point\x3d"onlinePublicLabel" data-label-for\x3d"onlinePublicRaido" class\x3d"jimu-float-leading portal-public-label"\x3eArcGIS Online\x3c/label\x3e\r\n\t\t\t\t\t\x3c/fieldset\x3e\r\n\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"publicItemSection" class\x3d"public-item-section"\x3e\r\n\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"publicPortalItemTable" data-dojo-type\x3d"jimu/dijit/_ItemTable" data-dojo-props\x3d\'types:${_itemTypes},typeKeywords:${_typeKeywords}\'\x3e\x3c/div\x3e\r\n\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"publicOnlineItemTable" data-dojo-type\x3d"jimu/dijit/_ItemTable" data-dojo-props\x3d\'types:${_itemTypes},typeKeywords:${_typeKeywords}\'\x3e\x3c/div\x3e\r\n\t\t\t\t\x3c/div\x3e\r\n\t\t\t\x3c/div\x3e\r\n\t\t\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv class\x3d"signin-section" data-dojo-attach-point\x3d"signinSection" style\x3d"display:none;"\x3e\r\n\t\t\x3cdiv class\x3d"signin-tip"\x3e${nls.signInTip}\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\x3c/div\x3e',
"url:jimu/dijit/templates/_ItemTable.html":'\x3cdiv\x3e\r\n\t\x3cdiv class\x3d"items-section all-items-section" data-dojo-attach-point\x3d"allItemsSection"\x3e\r\n\t\t\x3cdiv class\x3d"items-table-div" data-dojo-attach-point\x3d"allItemsTableDiv" data-dojo-attach-event\x3d"onscroll:_onAllItemsSectionScroll"\x3e\r\n\t\t\t\x3ctable class\x3d"items-table" cellpadding\x3d"10" data-dojo-attach-point\x3d"allItemsTable" data-dojo-attach-event\x3d"onclick:_onItemsTableClicked"\x3e\r\n\t\t\t\t\x3ctbody data-dojo-attach-point\x3d"allItemTbody"\x3e\x3c/tbody\x3e\r\n\t\t\t\x3c/table\x3e\r\n\t\t\x3c/div\x3e\r\n\t\t\x3cdiv data-dojo-type\x3d"jimu/dijit/LoadingIndicator" data-dojo-attach-point\x3d"allItemsShelter" data-dojo-props\x3d\'hidden:true\'\x3e\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv class\x3d"items-section filtered-items-section" data-dojo-attach-point\x3d"filteredItemsSection"\x3e\r\n\t\t\x3cdiv class\x3d"items-table-div" data-dojo-attach-point\x3d"filteredItemsTableDiv" data-dojo-attach-event\x3d"onscroll:_onFilteredItemsSectionScroll"\x3e\r\n\t\t\t\x3ctable class\x3d"items-table" cellpadding\x3d"10" data-dojo-attach-point\x3d"filteredItemsTable" data-dojo-attach-event\x3d"onclick:_onItemsTableClicked"\x3e\r\n\t\t\t\t\x3ctbody data-dojo-attach-point\x3d"filteredItemsTbody"\x3e\x3c/tbody\x3e\r\n\t\t\t\x3c/table\x3e\r\n\t\t\x3c/div\x3e\r\n\t\t\x3cdiv class\x3d"search-none-tip-section" data-dojo-attach-point\x3d"searchNoneTipSection" style\x3d"display:none;"\x3e\r\n\t\t\t\x3cspan class\x3d"search-none-icon jimu-icon jimu-icon-error"\x3e\x3c/span\x3e\r\n\t\t\t\x3cspan class\x3d"search-none-tip jimu-state-error-text"\x3e${nls.searchNone}\x3c/span\x3e\r\n\t\t\x3c/div\x3e\r\n\t\t\x3cdiv data-dojo-type\x3d"jimu/dijit/LoadingIndicator" data-dojo-attach-point\x3d"filteredItemShelter" data-dojo-props\x3d\'hidden:true\'\x3e\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\x3c/div\x3e',
"url:jimu/dijit/templates/_TreeNode.html":'\x3cdiv class\x3d"dijitTreeNode" role\x3d"presentation"\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"rowNode" class\x3d"dijitTreeRow" role\x3d"presentation"\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"expandoNode" class\x3d"dijitInline dijitTreeExpando" role\x3d"presentation"\x3e\x3c/span\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"expandoNodeText" class\x3d"dijitExpandoText" role\x3d"presentation"\x3e\x3c/span\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"contentNode" class\x3d"dijitTreeContent" role\x3d"presentation"\x3e\r\n\t\t\t\x3cspan role\x3d"presentation" class\x3d"dijitInline dijitIcon dijitTreeIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\x3e\r\n\t\t\t\x3cspan data-dojo-attach-point\x3d"labelNode,focusNode" class\x3d"dijitTreeLabel" role\x3d"treeitem" tabindex\x3d"-1" aria-selected\x3d"false"\x3e\x3c/span\x3e\r\n\t\t\x3c/span\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitTreeNodeContainer" role\x3d"presentation" style\x3d"display: none;"\x3e\x3c/div\x3e\r\n\x3c/div\x3e',
"url:dijit/templates/TreeNode.html":'\x3cdiv class\x3d"dijitTreeNode" role\x3d"presentation"\r\n\t\x3e\x3cdiv data-dojo-attach-point\x3d"rowNode" class\x3d"dijitTreeRow" role\x3d"presentation"\r\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"expandoNode" class\x3d"dijitInline dijitTreeExpando" role\x3d"presentation"\x3e\x3c/span\r\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"expandoNodeText" class\x3d"dijitExpandoText" role\x3d"presentation"\x3e\x3c/span\r\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"contentNode"\r\n\t\t\tclass\x3d"dijitTreeContent" role\x3d"presentation"\x3e\r\n\t\t\t\x3cspan role\x3d"presentation" class\x3d"dijitInline dijitIcon dijitTreeIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan data-dojo-attach-point\x3d"labelNode,focusNode" class\x3d"dijitTreeLabel" role\x3d"treeitem"\r\n\t\t\t\t   tabindex\x3d"-1" aria-selected\x3d"false" id\x3d"${id}_label"\x3e\x3c/span\x3e\r\n\t\t\x3c/span\r\n\t\x3e\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitTreeNodeContainer" role\x3d"presentation"\r\n\t\t style\x3d"display: none;" aria-labelledby\x3d"${id}_label"\x3e\x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:dijit/templates/Tree.html":'\x3cdiv role\x3d"tree"\x3e\r\n\t\x3cdiv class\x3d"dijitInline dijitTreeIndent" style\x3d"position: absolute; top: -9999px" data-dojo-attach-point\x3d"indentDetector"\x3e\x3c/div\x3e\r\n\t\x3cdiv class\x3d"dijitTreeExpando dijitTreeExpandoLoading" data-dojo-attach-point\x3d"rootLoadingIndicator"\x3e\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitTreeContainer" role\x3d"presentation"\x3e\r\n\t\x3c/div\x3e\r\n\x3c/div\x3e\r\n',"url:jimu/dijit/templates/_BasicServiceChooserContent.html":'\x3cdiv\x3e\r\n\t\x3cdiv class\x3d"content-section"\x3e\r\n\t\t\x3ctable class\x3d"layout"\x3e\r\n\t\t\t\x3ccolgroup\x3e\r\n\t\t\t\t\x3ccol width\x3d"80px" align\x3d"right"\x3e\x3c/col\x3e\r\n\t\t\t\t\x3ccol width\x3d"auto"\x3e\x3c/col\x3e\r\n\t\t\t\t\x3ccol width\x3d"170px"\x3e\x3c/col\x3e\r\n\t\t\t\x3c/colgroup\x3e\r\n\t\t\t\x3ctbody\x3e\r\n\t\t\t\t\x3ctr\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"first-td"\x3e\r\n\t\t\t\t\t\t\x3cspan\x3eURL:\x3c/span\x3e\r\n\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"urlInput" data-dojo-type\x3d"jimu/dijit/URLInput" style\x3d"width:100%;"\x3e\x3c/div\x3e\r\n\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\x3cdiv class\x3d"jimu-btn jimu-state-disabled validate-btn jimu-float-trailing" data-dojo-attach-point\x3d"btnValidate" data-dojo-attach-event\x3d"onclick:_onBtnValidateClick"\x3e${nls.validate}\x3c/div\x3e\r\n\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\x3ctr data-dojo-attach-point\x3d"exampleTr" class\x3d"example-tr"\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"first-td" style\x3d"padding-top:5px;"\x3e\r\n\t\t\t\t\t\t\x3cspan title\x3d"${nls.example}:"\x3e${nls.example}:\x3c/span\x3e\r\n\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd data-dojo-attach-point\x3d"exampleTd" colspan\x3d"2" style\x3d"padding-top:5px;font-style:italic;color:#ccc;"\x3e\r\n\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\x3c/tbody\x3e\r\n\t\t\x3c/table\x3e\r\n\t\t\x3cdiv class\x3d"service-browser-container" data-dojo-attach-point\x3d"serviceBrowserContainer"\x3e\r\n\t\t\t\x3cdiv class\x3d"error-section" data-dojo-attach-point\x3d"errorSection"\x3e\r\n\t\t\t\t\x3cspan class\x3d"jimu-icon jimu-icon-error"\x3e\x3c/span\x3e\r\n\t\t\t\t\x3cspan class\x3d"error-message" data-dojo-attach-point\x3d"errorNode"\x3e\x3c/span\x3e\r\n\t\t\t\x3c/div\x3e\r\n\t\t\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv class\x3d"operations"\x3e\r\n\t\t\x3cdiv class\x3d"jimu-btn jimu-float-trailing cancel jimu-btn-vacation" data-dojo-attach-event\x3d"onclick:_onBtnCancelClick"\x3e${nls.cancel}\x3c/div\x3e\r\n\t\t\x3cdiv class\x3d"jimu-btn jimu-float-trailing jimu-state-disabled ok" data-dojo-attach-point\x3d"btnOk" data-dojo-attach-event\x3d"onclick:_onBtnOkClick"\x3e${nls.ok}\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"loading" data-dojo-type\x3d"jimu/dijit/LoadingIndicator" data-dojo-props\x3d\'hidden:true\'\x3e\x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/Geoprocessing/setting/SettingDetail.html":'\x3cdiv\x3e\r\n\t\x3cdiv class\x3d"nav-pane jimu-float-leading" data-dojo-attach-point\x3d"navPaneNode"\x3e\x3c/div\x3e\r\n\t\x3cdiv class\x3d"setting-pane jimu-float-trailing" data-dojo-attach-point\x3d"settingPaneNode" style\x3d"display:none"\x3e\x3c/div\x3e\r\n\x3c/div\x3e\r\n',"url:dijit/templates/TitlePane.html":'\x3cdiv\x3e\r\n\t\x3cdiv data-dojo-attach-event\x3d"ondijitclick:_onTitleClick, onkeydown:_onTitleKey"\r\n\t\t\tclass\x3d"dijitTitlePaneTitle" data-dojo-attach-point\x3d"titleBarNode" id\x3d"${id}_titleBarNode"\x3e\r\n\t\t\x3cdiv class\x3d"dijitTitlePaneTitleFocus" data-dojo-attach-point\x3d"focusNode"\x3e\r\n\t\t\t\x3cspan data-dojo-attach-point\x3d"arrowNode" class\x3d"dijitInline dijitArrowNode" role\x3d"presentation"\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan data-dojo-attach-point\x3d"arrowNodeInner" class\x3d"dijitArrowNodeInner"\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan data-dojo-attach-point\x3d"titleNode" class\x3d"dijitTitlePaneTextNode"\x3e\x3c/span\x3e\r\n\t\t\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv class\x3d"dijitTitlePaneContentOuter" data-dojo-attach-point\x3d"hideNode" role\x3d"presentation"\x3e\r\n\t\t\x3cdiv class\x3d"dijitReset" data-dojo-attach-point\x3d"wipeNode" role\x3d"presentation"\x3e\r\n\t\t\t\x3cdiv class\x3d"dijitTitlePaneContentInner" data-dojo-attach-point\x3d"containerNode" role\x3d"region" id\x3d"${id}_pane" aria-labelledby\x3d"${id}_titleBarNode"\x3e\r\n\t\t\t\t\x3c!-- nested divs because wipeIn()/wipeOut() doesn\'t work right on node w/padding etc.  Put padding on inner div. --\x3e\r\n\t\t\t\x3c/div\x3e\r\n\t\t\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/Geoprocessing/setting/ParamSetting.html":'\x3cdiv\x3e\r\n\t\x3cdiv class\x3d"section common-property"\x3e\r\n    \x3cdiv class\x3d"field"\x3e\r\n      \x3clabel class\x3d"jimu-ellipsis" title\x3d"${nls.label}"\x3e${nls.label}:\x3c/label\x3e\r\n      \x3cinput data-dojo-type\x3d"dijit/form/TextBox" data-dojo-attach-point\x3d"label" class\x3d"common-input"\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"field"\x3e\r\n      \x3clabel class\x3d"jimu-ellipsis" title\x3d"${nls.tooltip}"\x3e${nls.tooltip}:\x3c/label\x3e\r\n      \x3cinput data-dojo-type\x3d"dijit/form/TextBox" data-dojo-attach-point\x3d"tooltip" class\x3d"common-input"\x3e\r\n    \x3c/div\x3e\r\n    \x3c!-- for input parameter --\x3e\r\n    \x3cdiv class\x3d"field" data-dojo-attach-point\x3d"visibleDiv"\x3e\r\n      \x3cdiv data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-attach-point\x3d"visible" class\x3d"visibleCheck"\x3e\x3c/div\x3e\r\n      \x3clabel class\x3d"visibleLabel"\x3e${nls.visible}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n    \x3c!-- for output parameter --\x3e\r\n    \x3cdiv class\x3d"field" data-dojo-attach-point\x3d"ignoreDiv"\x3e\r\n      \x3cdiv data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-attach-point\x3d"ignore" class\x3d"visibleCheck"\x3e\x3c/div\x3e\r\n      \x3clabel class\x3d"visibleLabel"\x3e${nls.ignoreOutput}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"field" data-dojo-attach-point\x3d"layerVisibleDiv"\x3e\r\n      \x3cdiv data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-attach-point\x3d"layerInvisible" class\x3d"visibleCheck"\x3e\x3c/div\x3e\r\n      \x3clabel class\x3d"visibleLabel"\x3e${nls.turnOffOutput}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"field" data-dojo-attach-point\x3d"dynamicSchemaDiv"\x3e\r\n      \x3cdiv data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-attach-point\x3d"useDynamicSchema" class\x3d"visibleCheck"\x3e\x3c/div\x3e\r\n      \x3clabel class\x3d"visibleLabel jimu-ellipsis" title\x3d"${nls.useDynamicSchema}"\x3e${nls.useDynamicSchema}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n\t\x3cdiv class\x3d"section special-property" data-dojo-attach-point\x3d"specialSectionNode"\x3e\x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/Geoprocessing/editors/FeatureSetEditorChooser.html":'\x3cdiv\x3e\r\n  \x3cdiv class\x3d"field" data-dojo-attach-point\x3d"mapModeWrapper"\x3e\r\n    \x3cinput id\x3d"gpFSModeMap" name\x3d"mode" data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-attach-point\x3d"mapMode" class\x3d"jimu-leading-margin10"\x3e\r\n    \x3clabel for\x3d"gpFSModeMap" style\x3d"width: auto;" class\x3d"jimu-leading-margin025"\x3e${nls.useCurrentMapExtent}\x3c/label\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"field"\x3e\r\n    \x3cinput id\x3d"gpFSModeDraw" name\x3d"mode" data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-attach-point\x3d"drawMode" class\x3d"jimu-leading-margin10"\x3e\r\n    \x3clabel for\x3d"gpFSModeDraw" style\x3d"width: auto;" class\x3d"jimu-leading-margin025"\x3e${nls.drawOnMap}\x3c/label\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"field"\x3e\r\n    \x3cinput id\x3d"gpFSModeFile" name\x3d"mode" data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-attach-point\x3d"fileMode" class\x3d"jimu-leading-margin10"\x3e\r\n    \x3clabel for\x3d"gpFSModeFile" style\x3d" width: auto;" class\x3d"jimu-leading-margin025"\x3e${nls.useShapefile}\x3c/label\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"field"\x3e\r\n    \x3cinput id\x3d"gpFSModeLayer" name\x3d"mode" data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-attach-point\x3d"layersMode" class\x3d"jimu-leading-margin10"\x3e\r\n    \x3clabel for\x3d"gpFSModeLayer" style\x3d" width: auto;" class\x3d"jimu-leading-margin025"\x3e${nls.selectLayer}\x3c/label\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"field" style\x3d"height: 60px;"\x3e\r\n    \x3cinput id\x3d"gpFSModeURL" name\x3d"mode" data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-attach-point\x3d"urlMode" class\x3d"jimu-leading-margin10"\x3e\r\n    \x3clabel for\x3d"gpFSModeURL" style\x3d"width: auto" class\x3d"jimu-leading-margin025"\x3e${nls.url}\x3c/label\x3e\r\n    \x3cdiv style\x3d"margin-top:5px;display:none;" data-dojo-attach-point\x3d"urlOptionsDiv"\x3e\r\n      \x3cinput name\x3d"mode" data-dojo-type\x3d"jimu/dijit/URLInput" data-dojo-attach-point\x3d"featureSetUrl" class\x3d"jimu-leading-margin10" style\x3d"display: inline-block;"\x3e\r\n      \x3cdiv data-dojo-attach-point\x3d"visibleCheckboxDiv" style\x3d"display: inline-block;"\x3e\x3c/div\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"symbolChooserSection"\x3e\r\n    \x3clabel\x3e${nls.symbol}:\x3c/label\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"symbolChooserNode"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"layerOptionSection"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"layerOptionCheckboxDiv"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/Geoprocessing/editors/FeatureSetResultEditor.html":'\x3cdiv\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"rendererTab"\x3e\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"popupConfigTab"\x3e\r\n    \x3cdiv style\x3d"margin: 10px"\x3e\r\n      \x3cdiv data-dojo-attach-point\x3d"enablePopupNode"\x3e\x3c/div\x3e \x3clabel\x3e${nls.enablePopup}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e',"url:jimu/dijit/templates/RendererChooser.html":'\x3cdiv\x3e\r\n\t\x3ctable\x3e\r\n\t\t\x3ctbody\x3e\r\n\t\t\t\x3ctr\x3e\r\n\t\t\t\t\x3ctd class\x3d"leading-td"\x3e\r\n\t\t\t\t\t\x3cdiv class\x3d"setting-section" style\x3d"display:inline-block;width:263px;"\x3e\r\n\t\t\t\t\t\t\x3ctable class\x3d"renderer-setting-table" cellpadding\x3d"0" cellspacing\x3d"0"\x3e\r\n\t\t\t\t\t\t\t\x3ccolgroup\x3e\r\n\t\t\t\t\t\t\t\t\x3ccol width\x3d"auto"\x3e\x3c/col\x3e\r\n\t\t\t\t\t\t\t\t\x3ccol width\x3d"180px"\x3e\x3c/col\x3e\r\n\t\t\t\t\t\t    \x3c/colgroup\x3e\r\n\t\t\t\t\t\t\t\x3ctbody\x3e\r\n\t\t\t\t\t\t\t\t\x3ctr data-dojo-attach-point\x3d"rendererSelectTr"\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctd class\x3d"first-td"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cspan\x3e${nls.use}:\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cselect data-dojo-attach-point\x3d"rendererSelect" class\x3d"render-select" data-dojo-type\x3d"dijit/form/Select" style\x3d"width:100%;height:30px;"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3coption value\x3d"simple" selected\x3dtrue\x3e${nls.singleSymbol}\x3c/option\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3coption value\x3d"unique"\x3e${nls.uniqueSymbol}\x3c/option\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3coption value\x3d"color"\x3e${nls.color}\x3c/option\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3coption value\x3d"size"\x3e${nls.size}\x3c/option\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3c/select\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\t\t\t\t\x3ctr data-dojo-attach-point\x3d"fieldSelectTr" style\x3d"display:none;"\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctd class\x3d"first-td"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cspan\x3e${nls.toShow}:\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctd class\x3d"field-combobox-td"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"fieldComboBox" data-dojo-type\x3d"dijit/form/ComboBox" class\x3d"dijit-form-CombBox" style\x3d"width:100%;"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\t\t\t\t\x3ctr data-dojo-attach-point\x3d"colorBlockTr" style\x3d"display:none;"\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctd class\x3d"first-td"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cspan\x3e${nls.colors}:\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"uniqueColorSelect" data-dojo-type\x3d"dijit/form/Select" style\x3d"width:100%;height:30px;"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d\'color1\'\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg  style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/c1.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d\'color2\'\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg  style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/c2.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d\'color3\'\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg  style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/c3.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d\'color4\'\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg  style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/c4.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d\'color5\'\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg  style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/c5.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d\'color6\'\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg  style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/c6.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\t\t\t\t\x3ctr data-dojo-attach-point\x3d"domainTr" style\x3d"display:none;"\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctd class\x3d"first-td"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cspan\x3e${nls.domain}:\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"minDomain" type\x3d"text" data-dojo-type\x3d"dijit/form/NumberTextBox" required\x3d"true" value\x3d"0"\r\n\t\t\t\t\t\t\t\t\t\t style\x3d"width:60px;" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cspan\x3e  \u2014  \x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"maxDomain" type\x3d"text" data-dojo-type\x3d"dijit/form/NumberTextBox" required\x3d"true" value\x3d"0"\r\n\t\t\t\t\t\t\t\t\t\t style\x3d"width:60px;" /\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\t\t\t\t\x3ctr data-dojo-attach-point\x3d"classCountTr" style\x3d"display:none;"\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctd class\x3d"first-td"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cspan\x3e${nls.classes}:\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"classCount" data-dojo-type\x3d"dijit/form/NumberSpinner" style\x3d"display:inline-block;width:100px;"\r\n\t\t\t\t\t\t\t\t\t\tdata-dojo-props\x3d\'value:5,smallDelta:1,constraints:{min:2,max:20},intermediateChanges:true\' /\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\t\t\t\t\x3ctr data-dojo-attach-point\x3d"colorBarTr" style\x3d"display:none;"\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctd class\x3d"first-td"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cspan\x3e${nls.colors}:\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"classBreaksColorSelect" data-dojo-type\x3d"dijit/form/Select" style\x3d"width:100%;height:30px;"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color1"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb1.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color2"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb2.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color3"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb3.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color4"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb4.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color5"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb5.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color6"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb6.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color7"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb7.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color8"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb8.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color9"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb9.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color10"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb10.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color11"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb11.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color12"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb12.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color13"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb13.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color14"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb14.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color15"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb15.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color16"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb16.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color17"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb17.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color18"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb18.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color19"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb19.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color20"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb20.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color21"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb21.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color22"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb22.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color23"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb23.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color24"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb24.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color25"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb25.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color26"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb26.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-value\x3d"color27"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cimg style\x3d"width:140px;height:20px;vertical-align: middle;margin-top: 1px;margin-bottom:1px;" src\x3d"${_jimuUrl}/css/images/symbol/cb27.png" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\t\t\t\t\x3ctr data-dojo-attach-point\x3d"symbolSizeDomainTr" style\x3d"display:none;"\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctd class\x3d"first-td"\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cspan\x3e${nls.symbolSize}:\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"minSymbolSize" type\x3d"text" data-dojo-type\x3d"dijit/form/NumberTextBox" required\x3d"true" value\x3d"5" data-dojo-props\x3d"constraints:{min:1,max:50,places:0}" style\x3d"width:60px;" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cspan\x3e  \u2014  \x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"maxSymbolSize" type\x3d"text" data-dojo-type\x3d"dijit/form/NumberTextBox" required\x3d"true" value\x3d"30" data-dojo-props\x3d"constraints:{min:1,max:50,places:0}"  style\x3d"width:60px;" /\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\t\t\t\x3c/tbody\x3e\r\n\t\t\t\t\t\t\x3c/table\x3e\r\n\t\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"uniqueSetting" style\x3d"display:none;"\x3e\r\n\t\t\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"uniqueValueDiv" class\x3d"unique-value-div"\x3e\r\n\t\t\t\t\t\t\t\t\x3ctable class\x3d"unique-symbol-table" style\x3d"width:100%;"\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctbody data-dojo-attach-point\x3d"uniqueSysTbody"\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/tbody\x3e\r\n\t\t\t\t\t\t\t\t\x3c/table\x3e\r\n\t\t\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\t\t\t\x3cdiv\x3e\r\n\t\t\t\t\t\t\t\t\x3cdiv style\x3d"padding-top:20px; margin-bottom:5px;"\x3e${nls.addValue}:\x3c/div\x3e\r\n\t\t\t\t\t\t\t\t\x3cdiv\x3e\r\n\t\t\t\t\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"uniqueEditValue" type\x3d"text" /\x3e\r\n\t\t\t\t\t\t\t\t\t\x3cspan data-dojo-attach-point\x3d"btnAddUniqueValue" class\x3d"jimu-icon jimu-icon-add"\r\n\t\t\t\t\t\t\t\t\t style\x3d\'cursor:pointer;position:relative;top:3px;\'\x3e\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\t\t\x3cdiv class\x3d"class-breaks-div" data-dojo-attach-point\x3d"classBreaksSetting" style\x3d"display:none;"\x3e\r\n\t\t\t\t\t\t\t\x3ctable class\x3d"class-breaks-table" style\x3d"width:100%;"\x3e\r\n\t\t\t\t\t\t\t\t\x3ctbody data-dojo-attach-point\x3d"classBreaksTbody"\x3e\r\n\t\t\t\t\t\t\t\t\x3c/tbody\x3e\r\n\t\t\t\t\t\t\t\x3c/table\x3e\r\n\t\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3ctd class\x3d"trailing-td"\x3e\r\n\t\t\t\t\t\x3cdiv class\x3d"symbol-section" style\x3d"display:inline-block;"\x3e\r\n\t\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"defaultSymSection"\x3e\r\n\t\t\t\t\t\t\t\x3cdiv\x3e${nls.defaultSymbol}\x3c/div\x3e\r\n\t\t\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"defaultSymbolChooser" data-dojo-type\x3d"jimu/dijit/SymbolChooser"\x3e\x3c/div\x3e\r\n\t\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"selectedSymSection" style\x3d"display:none;"\x3e\r\n\t\t\t\t\t\t\t\x3cdiv\x3e${nls.selectedSymbol}\x3c/div\x3e\r\n\t\t\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"uniqueSelectedSymInfoSet" style\x3d"display:none;"\x3e\r\n\t\t\t\t\t\t\t\t\x3ctable style\x3d"width:100%;"\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctbody\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3ctr\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cspan\x3e${nls.value}:\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"uniqueSelectedValue" type\x3d"text" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3ctr\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cspan\x3e${nls.label}:\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"uniqueSelectedLabel" type\x3d"text" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/tbody\x3e\r\n\t\t\t\t\t\t\t\t\x3c/table\x3e\r\n\t\t\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"classBreaksSelectedInfoSet" style\x3d"display:none;"\x3e\r\n\t\t\t\t\t\t\t\t\x3ctable style\x3d"width:100%;margin-top:10px;"\x3e\r\n\t\t\t\t\t\t\t\t\t\x3ctbody\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3ctr\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cspan\x3e${nls.range}:\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"selectedFrom" type\x3d"text" data-dojo-type\x3d"dijit/form/NumberTextBox" required\x3d"true" value\x3d"0" style\x3d"width:60px;" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cspan\x3e  \u2014  \x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"selectedTo" type\x3d"text" data-dojo-type\x3d"dijit/form/NumberTextBox" required\x3d"true" value\x3d"0"  style\x3d"width:60px;" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3ctr\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cspan\x3e${nls.label}:\x3c/span\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"classBreakSelectedLabel" type\x3d"text" /\x3e\r\n\t\t\t\t\t\t\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\t\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\t\t\t\t\t\x3c/tbody\x3e\r\n\t\t\t\t\t\t\t\t\x3c/table\x3e\r\n\t\t\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"selectedSymbolChooser" data-dojo-type\x3d"jimu/dijit/SymbolChooser"\x3e\x3c/div\x3e\r\n\t\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\x3c/tr\x3e\r\n\t\t\x3c/tbody\x3e\r\n\t\x3c/table\x3e\r\n\x3c/div\x3e',
"url:widgets/Geoprocessing/PopupConfig.html":'\x3cdiv style\x3d"width:560px;"\x3e\r\n\t\x3ctable class\x3d"popup-config-layout" style\x3d"width:100%;table-layout:fixed;"\x3e\r\n\t\t\x3ccolgroup\x3e\r\n\t\t\t\x3ccol width\x3d"auto"\x3e\x3c/col\x3e\r\n\t\t\t\x3ccol width\x3d"370px"\x3e\x3c/col\x3e\r\n\t\t\t\x3ccol width\x3d"70px"\x3e\x3c/col\x3e\r\n\t\t\x3c/colgroup\x3e\r\n\t\t\x3ctbody\x3e\r\n\t\t\t\x3ctr data-dojo-attach-point\x3d"titleTR"\x3e\r\n\t\t\t\t\x3ctd nowrap\x3e\r\n\t\t\t\t\t\x3cspan\x3e${nls.title}\x3c/span\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"titleTextBox" data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width:100%;" /\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"btnAdd" data-dojo-type\x3d"dijit/form/DropDownButton"\x3e\r\n\t\t\t\t\t\t\x3cspan\x3e${nls.add}\x3c/span\x3e\r\n\t\t\t\t\t\t\x3cdiv data-dojo-type\x3d"dijit/TooltipDialog"\x3e\r\n\t\t\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"menu" data-dojo-type\x3d"dijit/Menu"\x3e\x3c/div\x3e\r\n\t\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\x3c/tr\x3e\r\n\t\t\t\x3ctr data-dojo-attach-point\x3d"fieldsTR"\x3e\r\n\t\t\t\t\x3ctd nowrap\x3e\r\n\t\t\t\t\t\x3cspan\x3e${nls.fields}\x3c/span\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3ctd colspan\x3d"2" data-dojo-attach-point\x3d"fieldsTableTd"\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\x3c/tr\x3e\r\n\t\t\x3c/tbody\x3e\r\n\t\x3c/table\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/Geoprocessing/editors/SelectFeatureSetFromUrl.html":'\x3cdiv\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"inputNode"\x3e\r\n    \x3cinput name\x3d"url" data-dojo-type\x3d"jimu/dijit/URLInput" data-dojo-attach-point\x3d"featureSetUrl"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"loadingNode" class\x3d"loading"\x3e\x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"visibleCheckboxDiv"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"featuresetNode"\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:jimu/dijit/templates/SpatialFilterByFeatures.html":'\x3cdiv\x3e\r\n\t\x3cdiv class\x3d"layer-tip second-stress" data-dojo-attach-point\x3d"tipNode"\x3e${nls.relatedLayer}\x3c/div\x3e\r\n\t\x3ctable\x3e\r\n\t\t\x3ccolgroup\x3e\r\n\t\t\t\x3ccol width\x3d"auto"\x3e\x3c/col\x3e\r\n\t\t\t\x3ccol width\x3d"100"\x3e\x3c/col\x3e\r\n\t\t\x3c/colgroup\x3e\r\n\t\t\x3ctbody\x3e\r\n\t\t\t\x3ctr\x3e\r\n\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\x3cdiv class\x3d"layers-select-div" data-dojo-attach-point\x3d"layerSelectDiv"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\x3cdiv class\x3d"jimu-float-trailing" data-dojo-attach-point\x3d"featureSetChooserDiv"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\x3c/tr\x3e\r\n\t\t\x3c/tbody\x3e\r\n\t\x3c/table\x3e\r\n\r\n\t\x3cdiv class\x3d"selection-option not-visible" data-dojo-attach-point\x3d"selectionOptionDiv"\x3e\x3c/div\x3e\r\n\r\n\t\x3cdiv class\x3d"search-distance-div" data-dojo-attach-point\x3d"searchDistanceDiv"\x3e\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"loading" data-dojo-type\x3d"jimu/dijit/LoadingShelter" data-dojo-props\x3d\'hidden:true\'\x3e\x3c/div\x3e\r\n\x3c/div\x3e',
"url:jimu/dijit/templates/LayerChooserFromMapWithDropbox.html":'\x3cdiv\x3e\r\n\x3ctable role\x3d"listbox" aria-haspopup\x3d"true" data-dojo-attach-point\x3d"dropDownBtn" data-dojo-attach-event\x3d"onclick: _onDropDownClick,onkeydown: _onDropDownKeydown"\r\n  tabindex\x3d"0" title\x3d"${nls.customSelectLayer}" aria-label\x3d"${nls.customSelectLayer}"\x3e\r\n    \x3ccaption class\x3d"screen-readers-only-no-position"\x3e${nls.customSelectLayer}\x3c/caption\x3e\r\n    \x3ccolgroup\x3e\r\n      \x3ccol width\x3d"10px"\x3e\x3c/col\x3e\r\n      \x3ccol width\x3d"auto"\x3e\x3c/col\x3e\r\n      \x3ccol width\x3d"30px"\x3e\x3c/col\x3e\r\n    \x3c/colgroup\x3e\r\n    \x3ctbody\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd\x3e\x3c/td\x3e\r\n        \x3ctd\x3e\r\n          \x3cdiv class\x3d"layer-name jimu-ellipsis" data-dojo-attach-point\x3d"layerNameNode"\x3e\x3c/div\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd\x3e\r\n          \x3cdiv class\x3d"drop-select jimu-float-trailing" data-dojo-attach-point\x3d"dropArrowNode"\x3e\r\n            \x3cdiv class\x3d"jimu-icon jimu-icon-down-arrow-8"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n    \x3c/tbody\x3e\r\n  \x3c/table\x3e\r\n\x3c/div\x3e\r\n',
"url:jimu/dijit/templates/SearchDistance.html":'\x3cdiv\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"cbxDiv"\x3e\x3c/div\x3e\r\n\t\x3ctable style\x3d"table-layout:fixed;width:100%;"\x3e\r\n\t\t\x3ccolgroup\x3e\r\n\t\t\t\x3ccol width\x3d"auto"\x3e\x3c/col\x3e\r\n\t\t\t\x3ccol width\x3d"15px"\x3e\x3c/col\x3e\r\n\t\t\t\x3ccol width\x3d"auto"\x3e\x3c/col\x3e\r\n\t\t\x3c/colgroup\x3e\r\n\t\t\x3ctbody\x3e\r\n\t\t\t\x3ctr\x3e\r\n\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\x3cinput data-dojo-attach-point\x3d"numberTextBox" data-dojo-type\x3d"dijit/form/NumberTextBox"\r\n\t\t\t\t\t data-dojo-props\x3d\'"required":true,intermediateChanges:false,constraints:{min:0,pattern:"#####0.##########"}\'\r\n\t\t\t\t\t style\x3d"width:100%;" data-dojo-attach-event\x3d"change:_onNumberTextBoxChanged" /\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3ctd\x3e\x3c/td\x3e\r\n\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\x3cselect data-dojo-type\x3d"jimu/dijit/formSelect" data-dojo-attach-point\x3d"unitSelect"\r\n\t\t\t\t\tdata-dojo-attach-event\x3d"change:_onUnitSelectChanged" style\x3d"width:100%;"\x3e\r\n\t\t\t\t\t\t\x3coption value\x3d"MILES" selected\x3e${nls.miles}\x3c/option\x3e\r\n\t\t\t\t\t\t\x3coption value\x3d"KILOMETERS"\x3e${nls.kilometers}\x3c/option\x3e\r\n\t\t\t\t\t\t\x3coption value\x3d"FEET"\x3e${nls.feet}\x3c/option\x3e\r\n\t\t\t\t\t\t\x3coption value\x3d"METERS"\x3e${nls.meters}\x3c/option\x3e\r\n\t\t\t\t\t\t\x3coption value\x3d"YARDS"\x3e${nls.yards}\x3c/option\x3e\r\n\t\t\t\t\t\t\x3coption value\x3d"NAUTICAL_MILES"\x3e${nls.nauticalMiles}\x3c/option\x3e\r\n\t\t\t\t\t\x3c/select\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\x3c/tr\x3e\r\n\t\t\x3c/tbody\x3e\r\n\t\x3c/table\x3e\r\n\x3c/div\x3e',
"url:widgets/Geoprocessing/editors/SelectFeatureSetFromLayer.html":'\x3cdiv\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"inputNode"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"layerChooseNode"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"featuresetNode"\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e',"url:esri/dijit/templates/SingleFilter.html":'\x3cdiv class\x3d"esriSingleFilterForm singleFilter" id\x3d"${id}.singleFilter"\x3e\r\n  \x3cdiv\x3e\r\n    \x3ctable id\x3d"${id}.exprTable" class\x3d"rowTable" cellpadding\x3d"0" cellspacing\x3d"0"\x3e\r\n      \x3ctbody\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd valign\x3d"top" nowrap\x3e\r\n            \x3cdiv id\x3d"${id}.column1"\x3e\r\n            \x3c/div\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd valign\x3d"top" nowrap\x3e\r\n            \x3cdiv id\x3d"${id}.column2"\x3e\r\n            \x3c/div\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd valign\x3d"top" nowrap\x3e\r\n            \x3cdiv id\x3d"${id}.column3"\x3e\r\n            \x3c/div\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd valign\x3d"top" nowrap\x3e\r\n            \x3cdiv id\x3d"${id}.column4"\x3e\r\n            \x3c/div\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd valign\x3d"top" nowrap\x3e\r\n            \x3cdiv id\x3d"${id}.column5"\x3e\r\n            \x3c/div\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd valign\x3d"top" nowrap\x3e\r\n            \x3cdiv id\x3d"${id}.column6"\x3e\r\n            \x3c/div\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd valign\x3d"top" nowrap\x3e\r\n            \x3cdiv id\x3d"${id}.column7"\x3e\r\n            \x3c/div\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd valign\x3d"top" nowrap\x3e\r\n            \x3ca id\x3d"${id}.deleteExpression" href\x3d"JavaScript:void(0);" style\x3d"margin:0 5px;display:none;" class\x3d"esriAGOFilterRemoveIcon" title\x3d"${i18n.deleteExpression}"\x3e\x3c/a\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n        \x3ctr data-dojo-attach-point\x3d"_interactiveFilterRow"\x3e\r\n          \x3ctd colspan\x3d"8"\x3e\r\n            \x3ctable cellpadding\x3d"0" cellspacing\x3d"0" class\x3d"interactiveFilter"\x3e\r\n              \x3ctbody\x3e\r\n                \x3ctr\x3e\r\n                  \x3ctd nowrap\x3d"nowrap"\x3e\r\n                    \x3ctable cellpadding\x3d"0" cellspacing\x3d"0"\x3e\r\n                      \x3ctbody\x3e\r\n                        \x3ctr\x3e\r\n                          \x3ctd nowrap\x3d"nowrap"\x3e\r\n                            \x3cinput dojoAttachPoint\x3d"interactiveCheck" type\x3d"checkbox" class\x3d"promptCheckBox" title\x3d"${i18n.promptMsg}"/\x3e\r\n                          \x3c/td\x3e\r\n                          \x3ctd nowrap\x3d"nowrap"\x3e\r\n                            \x3clabel class\x3d"labels" for\x3d"promptCheckBox"\x3e\r\n                              \x26nbsp;\x26nbsp;${i18n.askForValues}\r\n                            \x3c/label\x3e\r\n                          \x3c/td\x3e\r\n                          \x3ctd\x3e\r\n                            \x3cspan dojoAttachPoint\x3d"interactiveArrow" style\x3d"color:#cbcbcb;cursor:pointer;" class\x3d"showHidePromptDiv"\x3e\x26nbsp;\x26#9660;\x3c/span\x3e\r\n                          \x3c/td\x3e\r\n                        \x3c/tr\x3e\r\n                      \x3c/tbody\x3e\r\n                    \x3c/table\x3e\r\n                  \x3c/td\x3e\r\n                \x3c/tr\x3e\r\n                \x3ctr dojoAttachPoint\x3d"interactiveSpace" style\x3d"display:none"\x3e\r\n                  \x3ctd nowrap\x3d"nowrap"\x3e\r\n                    \x3ctable cellpadding\x3d"0" cellspacing\x3d"0"\x3e\r\n                      \x3ctbody\x3e\r\n                        \x3ctr\x3e\r\n                          \x3ctd nowrap\x3d"nowrap"\x3e\r\n                            ${i18n.prompt}\r\n                          \x3c/td\x3e\r\n                          \x3ctd width\x3d"10"\x3e\r\n                            \x26nbsp;\r\n                          \x3c/td\x3e\r\n                          \x3ctd\x3e\r\n                            \x3cdiv dojoAttachPoint\x3d"promptText" dojotype\x3d"dijit.form.TextBox" intermediateChanges\x3d"true" style\x3d"width:250px;"\x3e\r\n                            \x3c/div\x3e\r\n                          \x3c/td\x3e\r\n                        \x3c/tr\x3e\r\n                        \x3ctr\x3e\r\n                          \x3ctd nowrap\x3d"nowrap"\x3e\r\n                            ${i18n.hint}\r\n                          \x3c/td\x3e\r\n                          \x3ctd width\x3d"10"\x3e\r\n                            \x26nbsp;\r\n                          \x3c/td\x3e\r\n                          \x3ctd\x3e\r\n                            \x3cdiv dojoAttachPoint\x3d"hintText" dojotype\x3d"dijit.form.TextBox" intermediateChanges\x3d"true" style\x3d"width:250px;"\x3e\r\n                            \x3c/div\x3e\r\n                          \x3c/td\x3e\r\n                        \x3c/tr\x3e\r\n                      \x3c/tbody\x3e\r\n                    \x3c/table\x3e\r\n                  \x3c/td\x3e\r\n                \x3c/tr\x3e\r\n              \x3c/tbody\x3e\r\n            \x3c/table\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n      \x3c/tbody\x3e\r\n    \x3c/table\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"promptDiv" style\x3d"display:none;padding:10px 0px;"\x3e\r\n    \x3clabel class\x3d"labels promptLabels" for\x3d"txtPrompt"\x3e\r\n      ${i18n.prompt}\r\n    \x3c/label\x3e\r\n    \x3cinput class\x3d"promptFields txtPrompt" type\x3d"text"/\x3e\r\n    \x3cbr/\x3e\r\n    \x3clabel class\x3d"labels promptLabels" for\x3d"txtHint"\x3e\r\n      ${i18n.hint}\r\n    \x3c/label\x3e\r\n    \x3cinput class\x3d"promptFields txtHint" type\x3d"text" /\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/Geoprocessing/editors/SelectFeatureSetFromFile.html":'\x3cdiv\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"inputNode"\x3e\r\n    \x3cdiv class\x3d"jimu-r-row" style\x3d"margin-top: 10px;"\x3e\r\n      \x3cdiv class\x3d"col-1-2"\x3e\r\n        \x3cform data-dojo-attach-point\x3d"fileForm"\r\n            enctype\x3d"multipart/form-data"\r\n            method\x3d"POST" data-dojo-type\x3d"dijit/form/Form"\x3e\r\n          \x3cinput id\x3d"${uniqueID}_fs_file" type\x3d"file" multiple\x3d"false" name\x3d"file"\r\n            data-dojo-attach-point\x3d"fileInput" accept\x3d"application/zip"\r\n            data-dojo-attach-event\x3d"onChange: _onUpload" style\x3d"display:none"/\x3e\r\n          \x3cdiv class\x3d"jimu-btn jimu-leading-margin10 jimu-float-leading"\x3e\r\n            \x3clabel class\x3d"file-input-label" for\x3d"${uniqueID}_fs_file"\x3e\r\n              ${nls.addShapefile}\r\n            \x3c/label\x3e\r\n          \x3c/div\x3e\r\n          \x3cinput type\x3d"hidden" name\x3d"f" value\x3d"json"/\x3e\r\n        \x3c/form\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv class\x3d"col-1-2"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"clearLink"\r\n          data-dojo-attach-event\x3d"onClick: _clear"\r\n          class\x3d"jimu-float-trailing shp-clear"\x3e${nls.clear}\x3c/div\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"jimu-r-row" style\x3d"margin-top: 10px;"\x3e\r\n      \x3cdiv data-dojo-attach-point\x3d"checkboxNode"/\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"jimu-r-row shp-info"\x3e\r\n      \x3cimg data-dojo-attach-point\x3d"uploadStatus" class\x3d"upload-status" src\x3d""/\x3e\r\n      \x3cspan data-dojo-attach-point\x3d"fileInfo"\x3e\x3c/span\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"featuresetNode"\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/Geoprocessing/editors/SelectFeatureSetFromDraw.html":'\x3cdiv\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"inputNode"\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"featuresetNode"\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e\r\n',"url:widgets/Geoprocessing/editors/DataFileEditor.html":'\x3cdiv\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"modeSelection" style\x3d"display:none"\x3e\r\n    \x3cdiv class\x3d"field"\x3e\r\n      \x3cinput name\x3d"${uniqueID}_dataFileMode" data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-attach-point\x3d"urlMode"\r\n        style\x3d"font-size: 12px;" id\x3d"${uniqueID}_gpSettingFileUrl"\x3e\r\n        \x3clabel style\x3d"width: auto;" for\x3d"${uniqueID}_gpSettingFileUrl" class\x3d"jimu-leading-margin05"\x3e${nls.useUrlForGPInput}\x3c/label\x3e\r\n      \x3cinput name\x3d"${uniqueID}_dataFileMode" data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-attach-point\x3d"itemMode"\r\n        style\x3d"font-size: 12px;" class\x3d"jimu-leading-margin35" id\x3d"${uniqueID}_gpSettingFileItem"\x3e\r\n      \x3clabel style\x3d"width: auto;"\r\n        class\x3d"jimu-leading-margin05" for\x3d"${uniqueID}_gpSettingFileItem"\x3e${nls.useUploadForGPInput}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"settingNode"\x3e\r\n      \x3cdiv data-dojo-attach-point\x3d"urlNode" data-dojo-props\x3d"label:urlNode"\x3e\r\n        \x3cdiv\x3e\r\n          \x3cinput type\x3d"text" data-dojo-attach-point\x3d"urlEditor" style\x3d"width:100%"\r\n            data-dojo-type\x3d"jimu/dijit/URLInput" data-dojo-props\x3d"rest:false" class\x3d"common-input"/\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv data-dojo-attach-point\x3d"fileNode" data-dojo-props\x3d"label:fileNode"\x3e\r\n        \x3cdiv\x3e\r\n          \x3cform data-dojo-attach-point\x3d"fileForm"\r\n                enctype\x3d"multipart/form-data"\r\n                method\x3d"POST" data-dojo-type\x3d"dijit/form/Form"\x3e\r\n            \x3cinput id\x3d"${uniqueID}_file" type\x3d"file" multiple\x3d"false" name\x3d"file"\r\n              data-dojo-attach-point\x3d"fileInput"\r\n              data-dojo-attach-event\x3d"onChange: _onUpload" style\x3d"display:none"/\x3e\r\n            \x3cdiv class\x3d"jimu-btn jimu-leading-margin10 jimu-float-leading"\x3e\r\n              \x3clabel class\x3d"file-input-label" for\x3d"${uniqueID}_file"\x3e\r\n                ${nls.selectFileToUpload}\r\n              \x3c/label\x3e\r\n            \x3c/div\x3e\r\n            \x3cinput type\x3d"hidden" name\x3d"f" value\x3d"json"/\x3e\r\n          \x3c/form\x3e\r\n          \x3cspan data-dojo-attach-point\x3d"uploadFileName" class\x3d"jimu-leading-margin2"\x3e\x3c/span\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/Geoprocessing/editors/RasterLayerEditor.html":'\x3cdiv\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"modeSelection" style\x3d"display:none"\x3e\r\n    \x3cdiv class\x3d"field"\x3e\r\n      \x3cinput id\x3d"${uniqueID}_gpRasterModeURL" name\x3d"${uniqueID}_rasterDataMode" data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-attach-point\x3d"urlMode"\r\n        style\x3d"font-size: 10px;" class\x3d"jimu-leading-margin10"\x3e\r\n      \x3clabel for\x3d"${uniqueID}_gpRasterModeURL" style\x3d"width: auto;" class\x3d"jimu-leading-margin025"\x3e${nls.useUrlForGPInput}\x3c/label\x3e\r\n      \x3cinput id\x3d"${uniqueID}_gpRasterModeItem" name\x3d"${uniqueID}_rasterDataMode" data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-attach-point\x3d"itemMode"\r\n        style\x3d"font-size: 10px;" class\x3d"jimu-leading-margin2"\x3e\r\n      \x3clabel for\x3d"${uniqueID}_gpRasterModeItem" style\x3d" width: auto;" class\x3d"jimu-leading-margin025"\x3e${nls.useUploadForGPInput}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"settingNode"\x3e\r\n      \x3cdiv data-dojo-attach-point\x3d"urlNode" data-dojo-props\x3d"label:urlNode"\x3e\r\n        \x3ctable\x3e\r\n          \x3ctr\x3e\r\n            \x3ctd\x3e\x3clabel title\x3d"${nls.rasterFormat}"\x3e${nls.rasterFormat}\x3c/label\x3e\x3c/td\x3e\r\n            \x3ctd\x3e\x3cinput type\x3d"text" data-dojo-attach-point\x3d"rasterFormatInput"\r\n                data-dojo-type\x3d"dijit/form/TextBox" class\x3d"common-input"/\x3e\x3c/td\x3e\r\n          \x3c/tr\x3e\r\n          \x3ctr\x3e\r\n            \x3ctd\x3e\x3clabel title\x3d"${nls.url}"\x3e${nls.url}\x3c/label\x3e\x3c/td\x3e\r\n            \x3ctd\x3e\r\n            \x3cinput data-dojo-type\x3d"jimu/dijit/URLInput" data-dojo-props\x3d"rest:false"\r\n              data-dojo-attach-point\x3d"urlEditor" class\x3d"common-input"\x3e\x3c/td\x3e\r\n          \x3c/tr\x3e\r\n        \x3c/table\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv data-dojo-attach-point\x3d"fileNode" data-dojo-props\x3d"label:fileNode"\x3e\r\n        \x3cdiv\x3e\r\n          \x3cform data-dojo-attach-point\x3d"fileForm"\r\n                enctype\x3d"multipart/form-data"\r\n                method\x3d"POST" data-dojo-type\x3d"dijit/form/Form"\x3e\r\n            \x3cinput id\x3d"${uniqueID}_raster" type\x3d"file" multiple\x3d"false" name\x3d"file"\r\n              data-dojo-attach-point\x3d"fileInput" style\x3d"display:none"\r\n              data-dojo-attach-event\x3d"onChange: _onUpload"/\x3e\r\n            \x3cdiv class\x3d"jimu-btn jimu-leading-margin10 jimu-float-leading"\x3e\r\n              \x3clabel class\x3d"file-input-label" for\x3d"${uniqueID}_raster"\x3e\r\n                ${nls.selectFileToUpload}\r\n              \x3c/label\x3e\r\n            \x3c/div\x3e\r\n            \x3cinput type\x3d"hidden" name\x3d"f" value\x3d"json"/\x3e\r\n          \x3c/form\x3e\r\n          \x3cspan data-dojo-attach-point\x3d"uploadFileName" class\x3d"jimu-leading-margin2"\x3e\x3c/span\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/Geoprocessing/editors/RecordSetEditorChooser.html":'\x3cdiv\x3e\r\n  \x3cdiv class\x3d"field"\x3e\r\n    \x3cinput id\x3d"gpRecordModeJSON" name\x3d"mode" data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-attach-point\x3d"jsonMode" data-dojo-attach-event\x3d"onclick: _onJSONModeSelect" class\x3d"jimu-leading-margin10"\x3e\r\n    \x3clabel for\x3d"gpRecordModeJSON" style\x3d"width: auto;" class\x3d"jimu-leading-margin025"\x3e${nls.inputJSONString}\x3c/label\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"field"\x3e\r\n    \x3cinput id\x3d"gpRecordModeTable" name\x3d"mode" data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-attach-point\x3d"tableMode" data-dojo-attach-event\x3d"onclick: _onTableModeSelect" class\x3d"jimu-leading-margin10"\x3e\r\n    \x3clabel for\x3d"gpRecordModeTable" style\x3d" width: auto;" class\x3d"jimu-leading-margin025"\x3e${nls.selectTable}\x3c/label\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv style\x3d"margin-top:5px;display:none;" data-dojo-attach-point\x3d"defaultJSONDiv"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"jsonEditorDiv"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/Geoprocessing/setting/ParamNode.html":'\x3cdiv class\x3d"link-action-node param-node" data-dojo-attach-point\x3d"displayNode"\x3e\r\n  \x3cdiv\x3e\r\n    \x3cspan\x3e${nls_name}:\x3c/span\x3e\r\n    \x3cspan style\x3d"margin: 2px"\x3e${param_name}\x3c/span\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv\x3e\r\n    \x3cspan\x3e${nls_type}:\x3c/span\x3e\r\n    \x3cspan style\x3d"margin: 2px"\x3e${param_dataType}\x3c/span\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv\x3e\r\n    \x3cspan\x3e${nls_required}:\x3c/span\x3e\r\n    \x3cspan style\x3d"margin: 2px"\x3e${param_required}\x3c/span\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"action-group dojoDndHandle" data-dojo-attach-point\x3d"actionNode"\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/Geoprocessing/setting/ParamNodeAvatar.html":'\x3cspan class\x3d"avatarText"\x3e${param_name}\x3c/span\x3e',"url:widgets/Geoprocessing/setting/Options.html":'\x3cdiv\x3e\r\n\t\x3cdiv class\x3d"field"\x3e\r\n    \x3clabel class\x3d"option-help-label"\x3e${nls.helpUrl}:\x3c/label\x3e\x3cinput data-dojo-type\x3d"dijit/form/TextBox" data-dojo-attach-point\x3d"helpUrl" class\x3d"option-help-url"\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"field"\x3e\r\n    \x3cdiv data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-attach-point\x3d"useResultMapServer"\x3e\x3c/div\x3e\x3clabel class\x3d"jimu-leading-margin05 jimu-ellipsis" title\x3d"${nls.useResultMapService}"\x3e${nls.useResultMapService}\x3c/label\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"field"\x3e\r\n    \x3cdiv data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-attach-point\x3d"shareResults"\x3e\x3c/div\x3e\x3clabel class\x3d"jimu-leading-margin05 jimu-ellipsis" title\x3d"${nls.shareResults}"\x3e${nls.shareResults}\x3c/label\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"field"\x3e\r\n    \x3cdiv data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-attach-point\x3d"showExport"\x3e\x3c/div\x3e\x3clabel class\x3d"jimu-leading-margin05 jimu-ellipsis" title\x3d"${nls.allowToExport}"\x3e${nls.allowToExport}\x3c/label\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/Geoprocessing/setting/Setting.html":'\x3cdiv\x3e\r\n\t\x3cdiv class\x3d"url-section"\x3e\r\n\t\t\x3cdiv class\x3d"label jimu-float-leading" title\x3d"${nls.taskUrl}"\x3e${nls.taskUrl}\x3c/div\x3e\r\n\t\t\x3cdiv class\x3d"service-browser jimu-float-trailing"\x3e\r\n      \x3ctable cellpadding\x3d"0" cellspacing\x3d"0" style\x3d"width:100%;border-collapse:collapse;"\x3e\r\n        \x3ctbody\x3e\r\n          \x3ctr\x3e\r\n            \x3ctd style\x3d"width:auto;"\x3e\r\n              \x3cdiv data-dojo-attach-point\x3d"urlTextBox" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-props\x3d\'required:true,trim:true,disabled:true\' style\x3d"width:100%;"\x3e\x3c/div\x3e\r\n            \x3c/td\x3e\r\n            \x3ctd style\x3d"width:120px;"\x3e\r\n              \x3cdiv data-dojo-attach-event\x3d"onclick:_onChooseTaskClicked" class\x3d"jimu-btn jimu-float-trailing"\x3e${nls.setTask}\x3c/div\x3e\r\n            \x3c/td\x3e\r\n          \x3c/tr\x3e\r\n        \x3c/tbody\x3e\r\n      \x3c/table\x3e\r\n    \x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv class\x3d"stack-section" data-dojo-attach-point\x3d"stackNode"\x3e\r\n\t\t\x3cdiv data-dojo-attach-point\x3d"settingDetailNode"\x3e\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/Geoprocessing/setting/css/style.css":'.jimu-gp-editor-base{display: inline-block;}.jimu-gp-editor-multivalue .single-input{margin-top: 5px; display: flex;}.jimu-gp-editor-multivalue .jimu-gp-editor-base {width: calc(100% - 33px) !important;}.jimu-gp-editor-multivalue .remove{background-color: #24B9F0; width: 20px; height: 20px; border-radius: 10px; color: white; font-size: 20px; font-weight: bold; line-height: 19px; margin-left: auto; display: inline-block; cursor: pointer; text-align: center;}.jimu-rtl .jimu-gp-editor-multivalue .remove{margin-left: 0; margin-right: auto;}.jimu-gp-editor-multivalue .add-input{text-align: initial; display: flex;}.jimu-gp-editor-multivalue .add-input .add-btn{background-color: #24B9F0; width: 20px; height: 20px; border-radius: 10px; color: white; font-size: 20px; font-weight: bold; line-height: 19px; margin-left: auto; display: inline-block; cursor: pointer; text-align: center;}.jimu-rtl .jimu-gp-editor-multivalue .add-input .add-btn{margin-left: 0; margin-right: auto;}.jimu-gp-editor-sffl{height: 30px; position: relative;}.jimu-widget-setting-gp{height: 100%; overflow: hidden; font-size: 14px;}.jimu-widget-setting-gp .section.common-property{overflow: hidden;}.jimu-widget-setting-gp .url-section{position: relative; height: 40px; line-height: 40px;}.jimu-widget-setting-gp .url-section .label{left: 0; top:5px; height:36px; width: 110px; position: relative; top: 50%; -ms-transform: translateY(-50%); -webkit-transform: translateY(-50%); transform: translateY(-50%);}.jimu-widget-setting-gp .url-section .jimu-btn{height: 30px; line-height: 30px;}.jimu-widget-setting-gp .service-browser{width: 850px;}.jimu-widget-setting-gp .stack-section{}.jimu-widget-setting-gp .jimu-widget-setting-gp-detail{overflow: hidden; position: relative; height: 100%;}.jimu-widget-setting-gp .nav-pane{width: 250px; height: 100%; overflow-x: hidden; overflow-y: auto;}.claro .jimu-widget-setting-gp .nav-pane .dijitTitlePaneTitleClosed,.jimu-widget-setting-gp .nav-pane .nav-pane-node{background-color: #fafafc; border: 1px solid #d2dae2; border-radius: 4px;}.claro .jimu-widget-setting-gp .nav-pane .dijitTitlePaneTitleClosed,.jimu-widget-setting-gp .nav-pane .nav-pane-node,.claro .jimu-widget-setting-gp .nav-pane .dijitTitlePaneTitleOpen{margin-top: 10px; height: 35px;}.jimu-widget-setting-gp .nav-pane .nav-pane-node{padding: 7px; vertical-align: middle;}.jimu-widget-setting-gp .nav-pane .link-action-node{cursor: pointer;}.jimu-widget-setting-gp .nav-pane .link-action-node span{white-space: nowrap;}.jimu-widget-setting-gp .nav-pane .param-node{padding: 5px 5px 5px 15px; border-top: 1px solid #d2dae2;}.jimu-rtl .jimu-widget-setting-gp .nav-pane .param-node{padding: 5px 15px 5px 5px;}.claro .jimu-widget-setting-gp .nav-pane .dijitTitlePaneContentInner {padding: 0;}.jimu-widget-setting-gp .link-action-node.jimu-state-active{background-color: #e3ecf2; border-left: 3px solid #15A4FA; padding-left: 12px;}.jimu-widget-setting-gp .nav-pane .dijitTitlePaneContentOuter{border-radius: 0 0 4px 4px;}.claro .jimu-widget-setting-gp .nav-pane .dijitTitlePaneTitleOpen{background-color: #6f7e95; color: #fff; border:1px solid #6f7e95; border-radius: 4px 4px 0 0; background-image: linear-gradient(#6f7e95 0%, #6f7e95 100%);}.claro .jimu-widget-setting-gp .nav-pane .dijitTitlePaneTitleFocus{margin-top: 7px;}.claro .jimu-widget-setting-gp .nav-pane .dijitTitlePaneTitleOpen .dijitArrowNode{background-image: url("images/focusArrow.png");}.jimu-widget-setting-gp .setting-pane{overflow-x: hidden; overflow-y: auto; height: 100%; width: 685px;}.jimu-widget-setting-gp .field{position: relative; overflow: hidden;}.jimu-widget-setting-gp .field label{width: 90px; display: inline-block; vertical-align: middle; padding-right: 5px;}.jimu-rtl .jimu-widget-setting-gp .field label{padding-left: 5px; padding-right: 0;}.jimu-widget-setting-gp .common-property .field{height: 36px; margin-top: 10px; line-height: 36px;}.jimu-widget-setting-gp .common-property .field label.visibleLabel{max-width: 90%; width: auto;}.jimu-widget-setting-gp .common-property .jimu-checkbox{width: 115px;}.jimu-widget-setting-gp .common-property .jimu-checkbox.visibleCheck{width: 20px; margin-left:0; vertical-align: middle;}.jimu-widget-setting-gp .common-property .field .common-input{width: 570px;}.jimu-widget-setting-gp .special-property .field{height: 20px; margin-top: 5px;}.jimu-widget-setting-gp .special-property .field input{vertical-align: middle;}.jimu-widget-setting-gp .special-property .jimu-gp-editor-base{display: block;}.jimu-widget-setting-gp .special-property .input-label{margin: 10px 0px; display: inline-block;}.jimu-widget-setting-gp .special-property .change-editor{margin: 10px; text-decoration: underline; cursor: pointer;}.jimu-widget-setting-gp .jimu-widget-setting-gp-param .jimu-symbol-chooser{margin-left: 100px;}.jimu-rtl .jimu-widget-setting-gp .jimu-widget-setting-gp-param .jimu-symbol-chooser{margin-left: 0; margin-right: 100px;}.jimu-widget-setting-gp .jimu-widget-setting-gp-param .jimu-renderer-chooser .jimu-symbol-chooser{margin-left: 50px;}.jimu-rtl .jimu-widget-setting-gp .jimu-widget-setting-gp-param .jimu-renderer-chooser .jimu-symbol-chooser{margin-left: 0; margin-right: 50px;}.jimu-widget-setting-gp .jimu-widget-setting-gp-layer-order{width: 100%; height: auto; margin-top: 10px;}.jimu-widget-setting-gp .layer-node{overflow: hidden; margin-top: 10px;}.jimu-widget-setting-gp .layer-node .order{float: left;}.jimu-widget-setting-gp .layer-node .label{float: left;}.jimu-widget-setting-gp .layer-node .order-btn{cursor: pointer;}.jimu-widget-setting-gp .layer-node:first-child .up{color: rgba(0, 0, 0, 0.4);}.jimu-widget-setting-gp .layer-node:last-child .down{color: rgba(0, 0, 0, 0.4);}.jimu-widget-setting-gp .jimu-widget-setting-gp-options{width: 100%; height: auto; margin-top: 10px;}.jimu-widget-setting-gp .jimu-widget-setting-gp-options .field{margin-top: 10px; height: 36px;}.jimu-widget-setting-gp .jimu-widget-setting-gp-options .field label{width: auto; max-width: 90%;}.jimu-widget-setting-gp .jimu-widget-setting-gp-options .field .option-help-label{position: relative; top: 50%; -ms-transform: translateY(-50%); -webkit-transform: translateY(-50%); transform: translateY(-50%);}.jimu-widget-setting-gp .jimu-widget-setting-gp-options .field .option-help-url{position: absolute; left: 115px; right: 10px; top: 0px; bottom: 0px; width: auto;}.jimu-gp-editor-chooser .editor-node{display: inline-block; width: 165px; margin-left: 15px;}.jimu-gp-editor-chooser .editor-node .node-box{width: 100%; height: 105px; line-height: 105px; border: 1px solid #D4DCE3; text-align: center; position: relative; cursor: pointer;}.jimu-gp-editor-chooser img{vertical-align: middle;}.jimu-gp-editor-chooser .editor-node .node-label{display: inline-block; margin-top: 10px; width: 100%; text-align: center; overflow: hidden;}.jimu-gp-editor-chooser .editor-node.jimu-state-selected .node-box{border: 2px solid #15A4FA;}.jimu-rtl .jimu-widget-setting-gp .url-section .label{right: 0;}.jimu-rtl .jimu-widget-setting-gp .common-property .field .common-input{right: 115px; left: 10px;}.jimu-rtl .jimu-widget-setting-gp .jimu-widget-setting-gp-options .field .option-help-url{left: 10px; right: 115px;}.jimu-widget-setting-gp .param-node{border-left: 0; border-right: 0; position: relative;}.jimu-widget-setting-gp .param-node .action-group{position: absolute; width: 5px; height: 20px; left: 5px; top: 5px; background-image: none; background-repeat: no-repeat; background-position: -22px -101px; cursor: move;}.jimu-widget-setting-gp .dojoDndItemOver .action-group{background-image: url(images/ago_sprite.png);}.jimu-widget-setting-gp .dojoDndItemOver .action-group:hover{background-position: -38px -101px;}.jimu-rtl .jimu-widget-setting-gp .param-node .action-group{left: auto; right: 5px;}.jimu-widget-setting-gp .jimu-gp-editor-multivalue-chooser .jimu-checkbox {display: block;}.jimu-widget-setting-gp .jimu-gp-editor-multivalue-chooser .jimu-checkbox:not(:first-child) {margin-top: 5px;}.dojoDndAvatarHeader{display: none;}.dojoDndAvatarItem{display: block;}.jimu-item-selector .groups-section .groups-select{padding: 0 5px;}',
"*now":function(H){H(['dojo/i18n!*preload*widgets/Geoprocessing/setting/nls/Setting*["ar","bs","ca","cs","da","de","en","el","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nb","nl","pl","pt-br","pt-pt","ro","ru","sk","sl","sr","sv","th","tr","zh-cn","uk","vi","zh-hk","zh-tw","ROOT"]'])},"*noref":1}});
define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/html dojo/on dijit/_WidgetsInTemplateMixin jimu/BaseWidgetSetting jimu/dijit/GpSource jimu/dijit/ViewStack jimu/dijit/Popup jimu/utils ./SettingDetail ../utils dijit/form/ValidationTextBox".split(" "),function(H,e,m,n,q,d,c,a,b,h,g,k,f){return H([c,d],{baseClass:"jimu-widget-setting-gp",postMixInProperties:function(){this.inherited(arguments);e.mixin(this.nls,window.jimuNls.common);e.mixin(this.nls,window.jimuNls.units)},startup:function(){this.inherited(arguments);
this.settingDetail=new k({config:e.clone(this.config),nls:this.nls,map:this.map},this.settingDetailNode);this.viewStack=new b({viewType:"dijit",views:[this.settingDetail]},this.stackNode);this.viewStack.startup();this.setConfig(this.config);setTimeout(e.hitch(this,function(){this.resize();this.config.taskUrl||this._onChooseTaskClicked()}),100)},_onChooseTaskClicked:function(){var l=new a({portalUrl:this.appConfig.portalUrl}),p=new h({titleLabel:this.nls.setTaskTitle,width:830,height:560,content:l});
this.own(q(l,"ok",e.hitch(this,function(r){0!==r.length&&this.config.taskUrl!==r[0].url&&(this.config.taskUrl=r[0].url,this.urlTextBox.set("value",this.config.taskUrl),this.settingDetail.setConfig(this.config));p.close()})));this.own(q(l,"cancel",e.hitch(this,function(){p.close()})))},resize:function(){var l=n.getContentBox(this.domNode);n.setStyle(this.stackNode,{height:l.h-40-3+"px"})},setConfig:function(l){l.taskUrl&&(this.settingDetail.setConfig(l),this.urlTextBox.set("value",l.taskUrl))},getConfig:function(){return this.settingDetail.getConfig()},
getDataSources:function(){var l=this.getConfig();if(l.useResultMapServer)return[];var p=[];m.forEach(l.outputParams,function(r){r.visible&&("GPFeatureRecordSetLayer"===r.dataType||"GPRecordSet"===r.dataType)&&r.defaultValue&&r.defaultValue.fields&&(f.useDynamicSchema(r,l)||p.push({id:"filter-"+r.name,type:"Features",label:r.name,dataSchema:g.getDataSchemaFromLayerDefinition(r.defaultValue)}))});return p},_onServiceSelected:function(l){this.config.taskUrl!==l.url&&(this.config.taskUrl=l.url,this.settingDetail.setConfig(this.config))}})});