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

//>>built
require({cache:{"widgets/Search/utils":function(){define("dojo/_base/lang dojo/_base/array dojo/Deferred dojo/when dojo/promise/all jimu/portalUtils esri/lang esri/request".split(" "),function(x,y,B,A,v,g,k,f){return{map:null,layerInfosObj:null,appConfig:null,_esriLocatorRegExp:/geocode(.){0,3}\.arcgis.com\/arcgis\/rest\/services\/World\/GeocodeServer/g,setMap:function(d){this.map=d},setLayerInfosObj:function(d){this.layerInfosObj=d},setAppConfig:function(d){this.appConfig=d},getConfigInfo:function(d){if(d&&
d.sources&&0<d.sources.length){var m=null;return this.searchLayer(this.map)&&d.upgradeFromGeocoder?(m=this.map.itemInfo.itemData.applicationProperties.viewing.search,m=y.map(m.layers,x.hitch(this,function(p,h){h.hintText=p;return this._getQueryTypeGeocoder(h)},m.hintText)),v(m).then(x.hitch(this,function(p){d.sources=[].concat(p).concat(d.sources);return d}))):d}return A(this._getSoucesFromPortalAndWebmap()).then(x.hitch(this,function(p){return{allPlaceholder:"",showInfoWindowOnSelect:!0,sources:p}}))},
_getSoucesFromPortalAndWebmap:function(){var d=[],m=null;this.searchLayer(this.map)&&(m=this.map.itemInfo.itemData.applicationProperties.viewing.search,y.forEach(m.layers,x.hitch(this,function(p,h){h.hintText=p;d.push(this._getQueryTypeGeocoder(h))},m.hintText)));return g.getPortalSelfInfo(this.appConfig.portalUrl).then(x.hitch(this,function(p){if((p=p.helperServices&&p.helperServices.geocode)&&0<p.length)for(var h=0,u=p.length;h<u;h++){var w=p[h];w&&d.push(this._processSingleLine(w))}return v(d).then(x.hitch(this,
function(C){for(var n=[],q=0;q<C.length;q++){var a=C[q];a&&(a&&"query"===a.type?n.push(a):(a={name:a.name||this._getGeocodeName(a.url),url:a.url,singleLineFieldName:a.singleLineFieldName,placeholder:a.placeholder||window.jimuNls.common.findAddressOrPlace||a.name||this._getGeocodeName(a.url),maxResults:6,searchInCurrentMapExtent:!1,type:"locator"},a.enableLocalSearch=this._isEsriLocator(a.url),a.localSearchMinScale=3E5,a.localSearchDistance=5E4,n.push(a)))}return n}))}))},_getQueryTypeGeocoder:function(d){var m=
this.map.getLayer(d.id),p=null,h=null,u=null;u=k.isDefined(d.subLayer)?d.id+"_"+d.subLayer:d.id;p=this.layerInfosObj.traversal(function(w){return w.id===u?(h=w,!0):!1});return m&&p&&h?(p=k.isDefined(d.subLayer)?h.url||m.url+"/"+d.subLayer:h.url||m.url,{name:h.title,layerId:u,url:p,placeholder:d.hintText||window.jimuNls.common.findAddressOrPlace,searchFields:[d.field.name],displayField:d.field.name,exactMatch:d.field.exactMatch||!1,maxResults:6,searchInCurrentMapExtent:!1,type:"query"}):null},_isEsriLocator:function(d){this._esriLocatorRegExp.lastIndex=
0;return this._esriLocatorRegExp.test(d)},_processSingleLine:function(d){if(d.singleLineFieldName)return d;if(this._isEsriLocator(d.url))return d.singleLineFieldName="SingleLine",d;var m=new B;f({url:d.url,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}).then(x.hitch(this,function(p){p.singleLineAddressField&&p.singleLineAddressField.name?(d.singleLineFieldName=p.singleLineAddressField.name,m.resolve(d)):(console.warn(d.url+"has no singleLineFieldName"),m.resolve(null))}),x.hitch(this,
function(p){console.error(p);m.resolve(null)}));return m.promise},_getGeocodeName:function(d){if("string"!==typeof d)return"geocoder";d=d.split("/");return d[d.length-2]||"geocoder"},getGeocoderName:function(d){return this._getGeocodeName(d)},hasAppSearchInfo:function(d){return d.itemInfo&&d.itemInfo.itemData&&d.itemInfo.itemData.applicationProperties&&d.itemInfo.itemData.applicationProperties.viewing&&d.itemInfo.itemData.applicationProperties.viewing.search},searchLayer:function(d){if(!this.hasAppSearchInfo(d))return!1;
d=d.itemInfo.itemData.applicationProperties.viewing.search;return d.enabled&&0!==d.layers.length?!0:!1}}})},"widgets/Search/setting/QuerySourceSetting":function(){define("dojo/_base/declare dojo/_base/html dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./QuerySourceSetting.html dojo/_base/lang dojo/_base/array dojo/on dojo/query dojo/Deferred dojo/Evented jimu/dijit/_FeaturelayerSourcePopup jimu/portalUrlUtils esri/request esri/lang jimu/utils jimu/dijit/Popup jimu/dijit/CheckBox jimu/dijit/LoadingShelter dijit/form/ValidationTextBox dojo/NodeList-data".split(" "),
function(x,y,B,A,v,g,k,f,d,m,p,h,u,w,C,n,q,a,t){return x([B,A,v,h],{baseClass:"jimu-widget-search-query-source-setting",templateString:g,nls:null,appConfig:null,map:null,tr:null,config:null,fieldsPopup:null,_layerDefinition:null,_fieldsCheckBox:null,_layerId:null,_suggestible:!1,_clickSet:!1,_defaultZoomScale:null,postCreate:function(){this.inherited(arguments);this.zoomScale.set("placeHolder",window.jimuNls.common.defaults);this.exactMatch=new t({checked:!1,label:this.nls.exactMatch},this.exactMatch);
this.searchInCurrentMapExtent=new t({checked:!1,label:this.nls.searchInCurrentMapExtent},this.searchInCurrentMapExtent);this._layerDefinition={};this._fieldsCheckBox=[];this._setMessageNodeContent("");this.own(d(this.panToRadio,"click",k.hitch(this,this._onRadioClicke)));this.own(d(this.zoomToRadio,"click",k.hitch(this,this._onRadioClicke)))},setDefinition:function(c){this._layerDefinition=c||{}},getDefinition:function(){return this._layerDefinition},setRelatedTr:function(c){this.tr=c},getRelatedTr:function(){return this.tr},
setConfig:function(c){if("[object Object]"===Object.prototype.toString.call(c)){var b=c.url;b&&(this.config=c,this.shelter.show(),this._layerDefinition.url!==b?this._getDefinitionFromRemote(b).then(k.hitch(this,function(r){b&&r&&"error"!==r.type?(this._layerDefinition=r,this._layerDefinition.url=b,this._setSourceItems(),this._setMessageNodeContent("")):b&&r&&"error"===r.type&&(this._setSourceItems(),this._disableSourceItems(),this._setMessageNodeContent(n.substitute({URL:r.url},k.clone(this.nls.invalidUrlTip)),
!0));this.shelter.hide()})):(this._setMessageNodeContent(""),this._setSourceItems(),this.shelter.hide()))}},isValidConfig:function(){var c=this.getConfig();return c.url&&c.name&&c.displayField?!0:!1},showValidationTip:function(){this._showValidationErrorTip(this.sourceUrl);this._showValidationErrorTip(this.sourceName)},getConfig:function(){return{layerId:this._layerId,url:this.sourceUrl.get("value"),name:q.stripHTML(this.sourceName.get("value")),placeholder:q.stripHTML(this.placeholder.get("value")),
searchFields:this._getSearchFields(),displayField:this.displayField.get("value"),exactMatch:this.exactMatch.getValue(),searchInCurrentMapExtent:this.searchInCurrentMapExtent.checked,panToScale:this.panToRadio.get("checked")?!0:!1,zoomScale:this.zoomScale.get("value")||this._defaultZoomScale,maxSuggestions:this.maxSuggestions.get("value"),maxResults:this.maxResults.get("value")||6,type:"query"}},destroy:function(){this.inherited(arguments);this.fieldsPopup&&(this.fieldsPopup.close(),this.fieldsPopup=
null);this.tr=this.nls=this.config=this._layerDefinition=null},_onSourceNameBlur:function(){this.sourceName.set("value",q.stripHTML(this.sourceName.get("value")))},_onPlaceholderBlur:function(){this.placeholder.set("value",q.stripHTML(this.placeholder.get("value")))},_disableSourceItems:function(){this.sourceName.set("disabled",!0);this.placeholder.set("disabled",!0);y.setStyle(this.fieldsSelectorNode,"display","none");this.displayField.set("disabled",!0);this.maxSuggestions.set("disabled",!0);this.maxResults.set("disabled",
!0);this.zoomScale.set("disabled",!0)},_enableSourceItems:function(){this.sourceName.set("disabled",!1);this.placeholder.set("disabled",!1);y.setStyle(this.fieldsSelectorNode,"display","inline-block");this.displayField.set("disabled",!1);this.maxSuggestions.set("disabled",!1);this.maxResults.set("disabled",!1);this._controlZoomScaleTextBox()},_setSourceItems:function(){this.sourceUrl.set("value",this.config.url);this.sourceName.set("value",q.stripHTML(this.config.name||""));this.placeholder.set("value",
q.stripHTML(this.config.placeholder||""));this._setSearchFields2Node();this.searchFields.set("value",this._getSearchFieldsAlias());this._setDisplayFieldOptions();this.displayField.set("value",this.config.displayField||"");this.exactMatch.setValue(!!this.config.exactMatch);this.searchInCurrentMapExtent.setValue(!!this.config.searchInCurrentMapExtent);this.config.panToScale?this.panToRadio.set("checked",!0):this.zoomToRadio.set("checked",!0);this.zoomScale.set("value",this.config.zoomScale||this._defaultZoomScale);
this.maxSuggestions.set("value",this.config.maxSuggestions);this.maxResults.set("value",this.config.maxResults||6);this._layerId=this.config.layerId;(this._suggestible=this._layerDefinition&&this._layerDefinition.advancedQueryCapabilities&&this._layerDefinition.advancedQueryCapabilities.supportsPagination)?this._hideSuggestibleTips():this._showSuggestibleTips();this._enableSourceItems()},_getDefinitionFromRemote:function(c){var b=new p,r=C({url:c,content:{f:"json"},handleAs:"json",callbackParamName:"callback"});
this.own(r);r.then(k.hitch(this,function(D){b.resolve(D)}),k.hitch(this,function(D){console.error(D);b.resolve({type:"error",url:this._getRequestUrl(c)})}));return b.promise},_setMessageNodeContent:function(c,b){y.empty(this.messageNode);c.nodeType||(c=y.toDom(c));y.place(c,this.messageNode);b?y.setStyle(this.messageTr,"display",""):y.setStyle(this.messageTr,"display","none")},_getRequestUrl:function(c){var b=window.location.protocol;return"http:"===b?w.setHttpProtocol(c):"https:"===b?w.setHttpsProtocol(c):
c},_setSearchFields2Node:function(){var c=null,b=this._layerDefinition&&this._layerDefinition.fields&&0<this._layerDefinition.fields.length;this.config&&this.config.searchFields&&0<this.config.searchFields.length||(c=[]);if(b){var r=this._layerDefinition.fields;c=f.filter(this.config.searchFields,function(D){return f.some(r,function(G){return G.name===D})})}else c=this.config.searchFields;this.searchFields.set("_fields",c)},_setDisplayFieldOptions:function(){var c=[];this._layerDefinition&&this._layerDefinition.fields&&
0<this._layerDefinition.fields.length?c=f.map(this._layerDefinition.fields,function(b){return{label:b.alias||b.name||"",value:b.name||""}}):this.config&&this.config.displayField&&(c=[{label:this.config.displayField,value:this.config.displayField}]);this.displayField.set("options",c)},_getSearchFieldsAlias:function(){var c=this._getSearchFields();if(!(c&&0<c.length))return"";if(this._layerDefinition&&this._layerDefinition.fields&&0<this._layerDefinition.fields.length){for(var b=this._layerDefinition.fields,
r=f.map(b,function(E){return E&&E.name}),D=[],G=0,I=c.length;G<I;G++){var z=r.indexOf(c[G]);-1<z&&D.push(b[z].alias)}return D.join(",")}return c.join(",")},_getSearchFields:function(){return this.searchFields.get("_fields")},_setSearchFields:function(c){this.searchFields.set("_fields",c)},_onSetSourceClick:function(){this._clickSet=!0;this._openServiceChooser()},_openQuerySourceChooser:function(){this._clickSet=!1;this._openServiceChooser()},_openServiceChooser:function(){var c=new u({titleLabel:this.nls.setLayerSource,
dijitArgs:{multiple:!1,createMapResponse:this.map.webMapResponse,portalUrl:this.appConfig.portalUrl,style:{height:"100%"}}});d.once(c,"ok",k.hitch(this,function(b){c.close();this.setDefinition(b.definition||{});this.setConfig({layerId:b.layerInfo&&b.layerInfo.id||null,url:b.url,name:b.name||"",placeholder:"",searchFields:[],displayField:this._layerDefinition.displayField||"",exactMatch:!1,zoomScale:this._defaultZoomScale,maxSuggestions:6,maxResults:6,type:"query"});c=null;this._setMessageNodeContent("");
this._clickSet?this.emit("reselect-query-source-ok",b):this.emit("select-query-source-ok",b)}));d.once(c,"cancel",k.hitch(this,function(){c.close();c=null;this.emit("select-query-source-cancel")}))},_onFieldsSelectorClick:function(){var c=y.create("div",{style:{maxHeight:"480px"}}),b=this._layerDefinition.fields;this._fieldsCheckBox=[];f.forEach(b,k.hitch(this,function(r,D){var G=new t({checked:this._isSearchable(r),label:r.alias||r.name});y.addClass(G.domNode,"fields-checkbox");y.addClass(G.labelNode,
"jimu-ellipsis");y.setAttr(G.domNode,{title:r.alias||r.name});0===D%3&&(window.isRTL?y.setStyle(G.domNode,"marginRight",0):y.setStyle(G.domNode,"marginLeft",0));G.placeAt(c);m(G.domNode).data("fieldName",r.name);this._fieldsCheckBox.push(G)}));this.fieldsPopup=new a({titleLabel:this.nls.setSearchFields,autoHeight:!0,content:c,container:window.jimuConfig.layoutId,width:640,maxHeight:600,buttons:[{label:this.nls.ok,onClick:k.hitch(this,"_onSearchFieldsOk")},{label:this.nls.cancel,classNames:["jimu-btn-vacation"]}],
onClose:k.hitch(this,function(){this.fieldsPopup=null})});y.addClass(this.fieldsPopup.domNode,"jimu-widget-search-query-source-setting-fields")},_onSearchFieldsOk:function(){var c=[];f.forEach(this._fieldsCheckBox,function(b){if(b.getValue()){var r=m(b.domNode).data("fieldName");c.push(r[0]);m(b.domNode).removeData()}});this._setSearchFields(c);this.searchFields.set("value",this._getSearchFieldsAlias());this.fieldsPopup.close()},_isSearchable:function(c){var b=this._getSearchFields();return f.some(b,
k.hitch(this,function(r){return c.name===r}))},_showSuggestibleTips:function(){y.addClass(this.tipsNode,"source-tips-show");y.setStyle(this.maxSuggestions.domNode,"display","none")},_hideSuggestibleTips:function(){y.removeClass(this.tipsNode,"source-tips-show");y.setStyle(this.maxSuggestions.domNode,"display","block")},_showValidationErrorTip:function(c){if(!c.validate()&&c.domNode&&c.focusNode){var b=c.get("disabled");b&&c.set("disabled",!1);c.focusNode.focus();setTimeout(k.hitch(this,function(){c.focusNode.blur();
b&&c.set("disabled",!0);c=null}),100)}},_controlZoomScaleTextBox:function(){this.panToRadio.get("checked")?this.zoomScale.set("disabled",!0):this.zoomToRadio.get("checked")&&this.zoomScale.set("disabled",!1)},_onRadioClicke:function(){this._controlZoomScaleTextBox()}})})},"jimu/dijit/_FeaturelayerSourcePopup":function(){define("dojo/_base/declare dojo/Evented dojo/on dojo/_base/lang dojo/_base/html jimu/dijit/Popup jimu/dijit/FeaturelayerSource jimu/dijit/LoadingIndicator esri/request".split(" "),
function(x,y,B,A,v,g,k,f,d){return x([g,y],{width:830,height:560,titleLabel:"",dijitArgs:null,postCreate:function(){this.inherited(arguments);v.addClass(this.domNode,"jimu-featurelayer-source-popup");this._initFls();this._initLoading()},getSelectedRadioType:function(){return this.fls.getSelectedRadioType()},_initFls:function(){this.fls=new k(this.dijitArgs);this.fls.placeAt(this.contentContainerNode);this.fls.startup();this.own(B(this.fls,"ok",A.hitch(this,function(m){if(0!==m.length){var p=m[0];
if(p.definition)try{p.definition.name=p.name,p.definition.url=p.url,this.emit("ok",p)}catch(h){console.error(h)}else this.loading.show(),d({url:p.url,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}).then(A.hitch(this,function(h){if(this.domNode){this.loading.hide();p.definition=h;try{p.definition.name=p.name,p.definition.url=p.url,this.emit("ok",p)}catch(u){console.error(u)}}}),A.hitch(this,function(h){console.error(h);this.domNode&&this.loading.hide()}))}})));this.own(B(this.fls,
"cancel",A.hitch(this,function(){try{this.emit("cancel")}catch(m){console.error(m)}})))},_initLoading:function(){this.loading=new f({hidden:!0});this.loading.placeAt(this.domNode);this.loading.startup()}})})},"jimu/dijit/FeaturelayerSource":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/FeaturelayerSource.html dojo/_base/lang dojo/_base/html dojo/on dojo/Evented jimu/dijit/RadioBtn jimu/dijit/_FeaturelayerChooserWithButtons jimu/dijit/FeaturelayerChooserFromPortal jimu/dijit/_FeaturelayerServiceChooserContent jimu/portalUrlUtils".split(" "),
function(x,y,B,A,v,g,k,f,d,m,p,h,u,w){return x([y,B,A,d],{templateString:v,baseClass:"jimu-layer-source jimu-featurelayer-source",declaredClass:"jimu.dijit.FeaturelayerSource",nls:null,multiple:!1,createMapResponse:null,portalUrl:null,layerChooserFromMap:null,postMixInProperties:function(){this.nls=window.jimuNls.featureLayerSource;this.portalUrl=w.getStandardPortalUrl(this.portalUrl)},postCreate:function(){this.inherited(arguments);this._initSelf()},getSelectedRadioType:function(){if(this.mapRadio.checked)return"map";
if(this.portalRadio.checked)return"portal";if(this.urlRadio.checked)return"url"},getSelectedItems:function(){var C=[];this.mapRadio.checked?C=this.flcMap.getSelectedItems():this.portalRadio.checked?C=this.flcPortal.getSelectedItems():this.urlRadio.checked&&(C=this.flcUrl.getSelectedItems());return C},startup:function(){this.inherited(arguments);this.flcMap.startup();this.flcPortal.startup();this.flcUrl.startup()},_initSelf:function(){this._initRadios();this._createFeaturelayerChooserWithButtons();
this._createFeaturelayerChooserFromPortal();this._createFeaturelayerServiceChooserContent();this._onRadioClicked()},_createFeaturelayerChooserWithButtons:function(){this.flcMap=new p({style:{width:"100%",height:"100%"},multiple:this.multiple,createMapResponse:this.createMapResponse,onlyShowWebMapLayers:!0,layerChooserFromMap:this.layerChooserFromMap});this.flcMap.operationTip=this.nls.selectLayer;this.flcMap.placeAt(this.flcContainer);this.own(f(this.flcMap,"ok",g.hitch(this,function(C){C&&0<C.length&&
this.emit("ok",C)})));this.own(f(this.flcMap,"cancel",g.hitch(this,function(){this.emit("cancel")})))},_createFeaturelayerChooserFromPortal:function(){this.flcPortal=new h({multiple:this.multiple,portalUrl:this.portalUrl,style:{width:"100%",height:"100%"}});this.flcPortal.operationTip=this.nls.chooseItem;this.flcPortal.placeAt(this.hflcContainer);this.own(f(this.flcPortal,"next",g.hitch(this,function(){this.flcPortal.operationTip=this.nls.chooseItem+" -\x3e "+this.nls.chooseLayer;this._updateOperationTip()})));
this.own(f(this.flcPortal,"back",g.hitch(this,function(){this.flcPortal.operationTip=this.nls.chooseItem;this._updateOperationTip()})));this.own(f(this.flcPortal,"ok",g.hitch(this,function(C){C&&0<C.length&&this.emit("ok",C)})));this.own(f(this.flcPortal,"cancel",g.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},_createFeaturelayerServiceChooserContent:function(){this.flcUrl=
new u({multiple:this.multiple,style:{width:"100%",height:"100%"}});this.flcUrl.operationTip=this.nls.setServiceUrl;this.flcUrl.placeAt(this.flscContainer);this.own(f(this.flcUrl,"ok",g.hitch(this,function(C){C&&0<C.length&&this.emit("ok",C)})));this.own(f(this.flcUrl,"cancel",g.hitch(this,function(){this.emit("cancel")})))},_initRadios:function(){var C="featureLayerSourceRadios_"+this._getRandomString(),n=g.hitch(this,this._onRadioClicked);this.mapRadio=new m({group:C,onStateChange:n,checked:!0});
this.mapRadio.placeAt(this.mapTd,"first");this.portalRadio=new m({group:C,onStateChange:n,checked:!1});this.portalRadio.placeAt(this.portalTd,"first");this.urlRadio=new m({group:C,onStateChange:n,checked:!1});this.urlRadio.placeAt(this.urlTd,"first");this.own(f(this.mapLabel,"click",g.hitch(this,function(){this.mapRadio.check()})));this.own(f(this.portalLabel,"click",g.hitch(this,function(){this.portalRadio.check()})));this.own(f(this.urlLabel,"click",g.hitch(this,function(){this.urlRadio.check()})))},
_getRandomString:function(){var C=Math.random().toString();return C=C.slice(2,C.length)},_onRadioClicked:function(){k.setStyle(this.flcContainer,"display","none");k.setStyle(this.hflcContainer,"display","none");k.setStyle(this.flscContainer,"display","none");this.mapRadio.checked?(k.setStyle(this.flcContainer,"display","block"),this.operationTip.innerHTML=this.nls.selectLayer):this.portalRadio.checked?(k.setStyle(this.hflcContainer,"display","block"),this.operationTip.innerHTML=this.nls.chooseItem):
this.urlRadio.checked&&(k.setStyle(this.flscContainer,"display","block"),this.operationTip.innerHTML=this.nls.setServiceUrl);this._updateOperationTip()},_updateOperationTip:function(){this.mapRadio.checked?this.operationTip.innerHTML=this.flcMap.operationTip:this.portalRadio.checked?this.operationTip.innerHTML=this.flcPortal.operationTip:this.urlRadio.checked&&(this.operationTip.innerHTML=this.flcUrl.operationTip)}})})},"jimu/dijit/_FeaturelayerChooserWithButtons":function(){define("dojo/on dojo/Evented dojo/_base/lang dojo/_base/html dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin jimu/dijit/FeaturelayerChooserFromMap".split(" "),
function(x,y,B,A,v,g,k,f,d){return v([g,k,f,y],{baseClass:"jimu-layer-chooser-with-buttons jimu-feature-layer-chooser-with-buttons",declaredClass:"jimu.dijit.FeaturelayerChooserWithButtons",templateString:'\x3cdiv\x3e\x3cdiv class\x3d"chooser-container" data-dojo-attach-point\x3d"chooserContainer"\x3e\x3c/div\x3e\x3cdiv class\x3d"footer"\x3e\x3cdiv class\x3d"jimu-btn jimu-float-trailing cancel jimu-btn-vacation" data-dojo-attach-point\x3d"btnCancel"\x3e${nls.cancel}\x3c/div\x3e\x3cdiv class\x3d"jimu-btn jimu-float-trailing ok jimu-trailing-margin1 jimu-state-disabled" data-dojo-attach-point\x3d"btnOk"\x3e${nls.ok}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e',
layerChooserFromMap:null,constructor:function(m){this.options=m},postMixInProperties:function(){this.nls=B.clone(window.jimuNls.common)},postCreate:function(){this.inherited(arguments);this.layerChooser=this.layerChooserFromMap?this.layerChooserFromMap:new d(this.options);this.layerChooser.placeAt(this.chooserContainer);A.setStyle(this.layerChooser.domNode,{width:"100%",height:"100%"});this.own(x(this.layerChooser,"tree-click",B.hitch(this,function(){0<this.getSelectedItems().length?A.removeClass(this.btnOk,
"jimu-state-disabled"):A.addClass(this.btnOk,"jimu-state-disabled")})));this.own(x(this.btnOk,"click",B.hitch(this,function(){var m=this.getSelectedItems();0<m.length&&this.emit("ok",m)})));this.own(x(this.btnCancel,"click",B.hitch(this,function(){this.emit("cancel")})))},getSelectedItems:function(){return this.layerChooser.getSelectedItems()},startup:function(){this.inherited(arguments);this.layerChooser.startup()}})})},"jimu/dijit/FeaturelayerChooserFromMap":function(){define(["dojo/_base/declare",
"dojo/Deferred","dojo/_base/html","dojo/_base/lang","./LayerChooserFromMap"],function(x,y,B,A,v){return x([v],{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=A.hitch(this,
this.basicFilter);this.filter=v.createFeaturelayerFilter(this.types,this.showLayerFromFeatureSet,this.showTable,this.mustSupportStatistics);this.ignoreVirtualLayer&&(this.filter=v.andCombineFilters([this.filter,A.hitch(this,this._ignoreVirtualLayerFilter)]))},postCreate:function(){this.inherited(arguments);B.addClass(this.domNode,"jimu-basic-layer-chooser-from-map")},_ignoreVirtualLayerFilter:function(g){return g.getLayerType().then(function(k){return!("ArcGISDynamicMapServiceLayer"===k||"ArcGISTiledMapServiceLayer"===
k||"GroupLayer"===k)})},basicFilter:function(g){var k=new y;0<=this.ignoredFeaturelayerIds.indexOf(g.id)?k.resolve(!1):this.onlyShowVisible&&"Table"!==g.getLayerType()?k.resolve(g.isShowInMap()):k.resolve(!0);return k},getHandledItem:function(g){var k=this.inherited(arguments),f=g&&g.layerInfo;f=f&&f.layerObject;k.url=f&&f.url||"";return k}})})},"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(x,y,B,A,v,g,k,f,d,m,p,h,u,w,C,n,q,a){var t=B([A,v,g,y],{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);u.addClass(this.domNode,"jimu-basic-layer-chooser-from-map");this.multiple=!!this.multiple;this.shelter=new a({hidden:!0});this.shelter.placeAt(this.domNode);this.shelter.startup();this._createTree();this.basicFilter=h.hitch(this,this.basicFilter);
this.filter=t.andCombineFilters([this.basicFilter,this.filter]);this.createMapResponse&&this.setCreateMapResponse(this.createMapResponse)},basicFilter:function(c){var b=new f;this.onlyShowVisible?b.resolve(c.isShowInMap()):b.resolve(!0);return b},filter:function(c){c=new f;c.resolve(!0);return c},getSelectedItems:function(){var c=this.tree.getSelectedItems();return w.map(c,h.hitch(this,function(b){return this.getHandledItem(b)}))},getAllItems:function(){var c=this.tree.getAllItems(),b=[];w.forEach(c,
h.hitch(this,function(r){"root"!==r.id&&(r=this.getHandledItem(r),b.push(r))}));return b},getHandledItem:function(c){return{name:c.name,layerInfo:c.layerInfo}},_isLeafItem:function(c){return c.isLeaf},setCreateMapResponse:function(c){this.createMapResponse=c;q.getInstance(this.createMapResponse.map,this.createMapResponse.itemInfo).then(h.hitch(this,function(b){this.layerInfosObj=b;this.own(x(this.layerInfosObj,"layerInfosChanged",h.hitch(this,this._onLayerInfosChanged)));this.updateWhenLayerInfosIsShowInMapChanged&&
this.own(x(this.layerInfosObj,"layerInfosIsShowInMapChanged",h.hitch(this,this._onLayerInfosIsShowInMapChanged)));this._buildTree(this.layerInfosObj)}))},_onLayerInfosChanged:function(c,b){this._buildTree(this.layerInfosObj);this.emit("update")},_onLayerInfosIsShowInMapChanged:function(c){this._buildTree(this.layerInfosObj);this.emit("update")},_buildTree:function(c){this._clear();u.setStyle(this.errorTipSection,"display","block");var b=[];this.onlyShowWebMapLayers?(b=c.getLayerInfoArrayOfWebmap(),
b=b.concat(c.getTableInfoArrayOfWebmap())):(b=c.getLayerInfoArray(),b=b.concat(c.getTableInfoArray()));0!==b.length&&(u.setStyle(this.errorTipSection,"display","none"),w.forEach(b,h.hitch(this,function(r){this._addDirectLayerInfo(r)})))},_addDirectLayerInfo:function(c){c&&c.getLayerObject().then(h.hitch(this,function(){this._addItem("root",c)}),h.hitch(this,function(b){console.error(b)}))},_clear:function(){var c=this._store.query({parent:"root"});w.forEach(c,h.hitch(this,function(b){b&&"root"!==
b.id&&this._store.remove(b.id)}))},_addItem:function(c,b){var r=null,D=b.getLayerType(),G=this.filter(b);p({layerType:D,valid:G}).then(h.hitch(this,function(I){if(I.valid){var z=h.hitch(this,function(M,R){this._id++;r={name:b.title||"",parent:c,layerInfo:b,type:I.layerType,layerClass:b.layerObject.declaredClass,id:this._id.toString(),isLeaf:M,hasChildren:R};this._store.add(r)}),E=b.getSubLayers(),K=0===E.length,O=!0;this.onlyFilterCurrentLayerWhenAddItem?(K&&(O=!1),z(K,O)):K?z(K,!1):(E=w.map(E,h.hitch(this,
function(M){return this.filter(M)})),p(E).then(h.hitch(this,function(M){(M=w.some(M,function(R){return R}))&&z(K,M)})))}}))},_getRootItem:function(){return{id:"root",name:"Map Root",type:"root",isLeaf:!1,hasChildren:!0}},_createTree:function(){var c=this._getRootItem();c=new k({data:[c],getChildren:function(b){return this.query({parent:b.id})}});this._store=new d(c);c=new m({store:this._store,query:{id:"root"},mayHaveChildren:h.hitch(this,this._mayHaveChildren)});this.tree=new n({multiple:this.multiple,
model:c,showRoot:!1,isLeafItem:h.hitch(this,this._isLeafItem),style:{width:"100%"},onOpen:h.hitch(this,function(b,r){"root"!==b.id&&this._onTreeOpen(b,r)}),onClick:h.hitch(this,function(b,r,D){this._onTreeClick(b,r,D);this.emit("tree-click",b,r,D)}),getIconStyle:h.hitch(this,function(b,r){var D=null;if(!b||"root"===b.id)return null;var G={width:"20px",height:"20px",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundImage:""},I=window.location.protocol+"//"+window.location.host+
require.toUrl("jimu");if(b=this._getIconInfo(b,r).imageName)G.backgroundImage="url("+I+"/css/images/"+b+")",D=G;return D}),getIconClass:h.hitch(this,function(b,r){return this._getIconInfo(b,r).className}),getTooltip:h.hitch(this,function(b){return this.displayTooltipForTreeNode?b.layerInfo.title:""})});u.addClass(this.tree.domNode,this._treeClass);this.tree.placeAt(this.shelter.domNode,"before")},_mayHaveChildren:function(c){return c.hasChildren},_getIconInfo:function(c,b){var r="",D="";"ArcGISDynamicMapServiceLayer"===
c.type||"ArcGISTiledMapServiceLayer"===c.type?b?(r="mapserver_open.png",D="mapservice-layer-icon open"):(r="mapserver_close.png",D="mapservice-layer-icon close"):"GroupLayer"===c.type?b?(r="group_layer2.png",D="group-layer-icon open"):(r="group_layer1.png",D="group-layer-icon close"):"FeatureLayer"===c.type?(c=C.getTypeByGeometryType(c.layerInfo.layerObject.geometryType),"point"===c?(r="point_layer1.png",D="point-layer-icon"):"polyline"===c?(r="line_layer1.png",D="line-layer-icon"):"polygon"===c&&
(r="polygon_layer1.png",D="polygon-layer-icon")):"Table"===c.type?(r="table.png",D="table-icon"):"ArcGISImageServiceLayer"===c.type||"ArcGISImageServiceVectorLayer"===c.type?(r="image_layer.png",D="iamge-layer-icon"):b?(r="mapserver_open.png",D="mapservice-layer-icon open"):(r="mapserver_close.png",D="mapservice-layer-icon close");return{imageName:r,className:D}},_onTreeOpen:function(c,b){if("root"!==c.id){var r=[];b=[];r=c.layerInfo.getSubLayers();c.checked||(this.shelter.show(),b=w.map(r,h.hitch(this,
function(D){return D.getLayerObject()})),p(b).then(h.hitch(this,function(){this.domNode&&(w.forEach(r,h.hitch(this,function(D){this._addItem(c.id,D)})),c.checked=!0,this.shelter.hide())}),h.hitch(this,function(D){console.error(D);this.shelter.hide()})))}},_onTreeClick:function(c,b,r){},destroy:function(){this.shelter&&(this.shelter.destroy(),this.shelter=null);this.tree&&this.tree.destroy();this.inherited(arguments)}});t.createFilterByLayerType=function(c){h.isArrayLike(c)||(c=[]);return function(b){var r=
new f;if(0===c.length)r.resolve(!0);else{var D=[];b.traversal(function(G){D.push(G.getLayerType())});p(D).then(function(G){for(var I=0;I<G.length;I++)for(var z=0;z<c.length;z++)if(G[I]===c[z]){r.resolve(!0);return}r.resolve(!1)},function(G){console.error(G);r.reject(G)})}return r}};t.createFeaturelayerFilter=function(c,b,r,D){var G=["point","polyline","polygon"];c&&0<c.length?(c=w.filter(c,function(I){return 0<=G.indexOf(I)}),0===c.length&&(c=G)):c=G;return function(I){var z=I.getLayerType();I=I.getLayerObject();
return p({layerType:z,layerObject:I}).then(function(E){var K=E.layerType;E=E.layerObject;if("ArcGISDynamicMapServiceLayer"===K||"ArcGISTiledMapServiceLayer"===K||"GroupLayer"===K||"FeatureCollection"===K)return!0;if("FeatureLayer"===K){K=C.getTypeByGeometryType(E.geometryType);K=0<=w.indexOf(c,K);var O=t._shouldPassStatisticsCheck(D,E);return E.url?(E=C.isFeaturelayerUrlSupportQuery(E.url,E.capabilities),K&&E&&O):b&&K}return"Table"===K?(K=C.isFeaturelayerUrlSupportQuery(E.url,E.capabilities),E=t._shouldPassStatisticsCheck(D,
E),r&&K&&E):!1})}};t.createImageServiceLayerFilter=function(c,b){return function(r){var D=r.getLayerType();r=r.getLayerObject();return p({layerType:D,layerObject:r}).then(function(G){var I=G.layerType,z=G.layerObject;return"ArcGISImageServiceLayer"===I||"ArcGISImageServiceVectorLayer"===I?c?C.isImageServiceSupportQuery(G.layerObject.capabilities)?b?t._shouldPassStatisticsCheck(b,z):!0:!1:!0:!1})}};t._shouldPassStatisticsCheck=function(c,b){return c?(c=!1,c=b.advancedQueryCapabilities?!!b.advancedQueryCapabilities.supportsStatistics:
!!b.supportsStatistics):!0};t.createQueryableLayerFilter=function(c){var b=t.createFeaturelayerFilter(["point","polyline","polygon"],!1,!0,c);c=t.createImageServiceLayerFilter(!0,c);return t.orCombineFilters([b,c])};t.andCombineFilters=function(c){return t._combineFilters(c,!0)};t.orCombineFilters=function(c){return t._combineFilters(c,!1)};t._combineFilters=function(c,b){return function(r){var D=new f,G=w.map(c,function(I){return I(r)});p(G).then(function(I){var z=!1;z=b?w.every(I,function(E){return E}):
w.some(I,function(E){return E});D.resolve(z)},function(I){console.error(I);D.reject(I)});return D}};return t})},"dijit/tree/ObjectStoreModel":function(){define("dojo/_base/array dojo/aspect dojo/_base/declare dojo/Deferred dojo/_base/lang dojo/when ../Destroyable".split(" "),function(x,y,B,A,v,g,k){return B("dijit.tree.ObjectStoreModel",k,{store:null,labelAttr:"name",labelType:"text",root:null,query:null,constructor:function(f){v.mixin(this,f);this.childrenCache={}},getRoot:function(f,d){if(this.root)f(this.root);
else{var m=this.store.query(this.query);m.then&&this.own(m);g(m,v.hitch(this,function(p){if(1!=p.length)throw Error("dijit.tree.ObjectStoreModel: root query returned "+p.length+" items, but must return exactly one");this.root=p[0];f(this.root);m.observe&&m.observe(v.hitch(this,function(h){this.onChange(h)}),!0)}),d)}},mayHaveChildren:function(){return!0},getChildren:function(f,d,m){var p=this.store.getIdentity(f);if(this.childrenCache[p])g(this.childrenCache[p],d,m);else{var h=this.childrenCache[p]=
this.store.getChildren(f);h.then&&this.own(h);h.observe&&this.own(h.observe(v.hitch(this,function(u,w,C){this.onChange(u);w!=C&&g(h,v.hitch(this,"onChildrenChange",f))}),!0));g(h,d,m)}},isItem:function(){return!0},getIdentity:function(f){return this.store.getIdentity(f)},getLabel:function(f){return f[this.labelAttr]},newItem:function(f,d,m,p){return this.store.put(f,{parent:d,before:p})},pasteItem:function(f,d,m,p,h,u){var w=new A;if(d===m&&!p&&!u)return w.resolve(!0),w;d&&!p?this.getChildren(d,v.hitch(this,
function(C){C=[].concat(C);var n=x.indexOf(C,f);C.splice(n,1);this.onChildrenChange(d,C);w.resolve(this.store.put(f,{overwrite:!0,parent:m,oldParent:d,before:u,isCopy:!1}))})):w.resolve(this.store.put(f,{overwrite:!0,parent:m,oldParent:d,before:u,isCopy:!0}));return w},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(x,y,B,A,v,g,k,f,d,m,p,h,u,w,C,n){var q=x([C._TreeNode,u],{templateString:A,declaredClass:"jimu._TreeNode",isLeaf:!1,groupId:"",postCreate:function(){this.inherited(arguments);g.addClass(this.domNode,"jimu-tree-node");this.isLeaf=!!this.isLeaf;this.groupId?(this.checkNode=g.toDom('\x3cinput type\x3d"radio" /\x3e'),this.checkNode.name=this.groupId):this.checkNode=g.toDom('\x3cinput type\x3d"checkbox" /\x3e');g.addClass(this.checkNode,"jimu-tree-check-node");g.place(this.checkNode,this.contentNode,
"first");this.own(p(this.checkNode,"click",v.hitch(this,this._onClick)));this.own(p(this.rowNode,"keydown",v.hitch(this,function(a,t){t.target=a;t.keyCode!==h.ENTER&&t.keyCode!==h.SPACE||this._onClick(t)},this.checkNode)));this.isLeaf?this.groupId?g.setStyle(this.checkNode,"display","none"):g.setStyle(this.checkNode,"display","inline"):g.setStyle(this.checkNode,"display","none");this.isLeaf?g.addClass(this.domNode,"jimu-tree-leaf-node"):g.addClass(this.domNode,"jimu-tree-not-leaf-node")},select:function(){this.isLeaf&&
(this.checkNode.checked=!0,g.addClass(this.domNode,"jimu-tree-selected-leaf-node"))},unselect:function(){this.isLeaf&&(this.checkNode.checked=!1,g.removeClass(this.domNode,"jimu-tree-selected-leaf-node"))},toggleSelect:function(){this.isLeaf&&(this.checkNode.checked?this.unselect():this.select())},_onClick:function(a){(a.target||a.srcElement)===this.checkNode?this.tree._onCheckNodeClick(this,this.checkNode.checked,a):this.tree._onClick(this,a)},_onChange:function(){this.isLeaf&&setTimeout(v.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 x([C,u],{declaredClass:"jimu._Tree",openOnClick:!0,multiple:!0,uniqueId:"",showRoot:!1,postMixInProperties:function(){this.inherited(arguments);this.uniqueId="tree_"+n.getRandomString()},postCreate:function(){this.inherited(arguments);g.addClass(this.domNode,"jimu-tree");this.own(m.before(this,"onClick",v.hitch(this,this._jimuBeforeClick)));
this.rootLoadingIndicator&&g.setStyle(this.rootLoadingIndicator,"display","none");this.dndController.singular=!0;g.setAttr(this.domNode,"tabindex",0)},removeItem:function(a){this.model.store.remove(a)},getAllItems:function(){var a=this.getAllTreeNodeWidgets();return k.map(a,v.hitch(this,function(t){var c=t.item;c.selected=t.checkNode.checked;return c}))},getSelectedItems:function(){var a=this.getAllTreeNodeWidgets();a=k.filter(a,v.hitch(this,function(t){return t.checkNode.checked}));return k.map(a,
v.hitch(this,function(t){return t.item}))},getFilteredItems:function(a){var t=this.getAllTreeNodeWidgets();t=k.map(t,v.hitch(this,function(c){var b=c.item;b.selected=c.checkNode.checked;return b}));return k.filter(t,v.hitch(this,function(c){return a(c)}))},getTreeNodeByItemId:function(a){for(var t=this._getAllTreeNodeDoms(),c=0;c<t.length;c++){var b=w.byNode(t[c]);if(b.item.id.toString()===a.toString())return b}return null},selectItem:function(a){(a=this.getTreeNodeByItemId(a))&&a.isLeaf&&this.selectNodeWidget(a)},
unselectItem:function(a){(a=this.getTreeNodeByItemId(a))&&a.isLeaf&&a.unselect()},getAllLeafTreeNodeWidgets:function(){var a=this.getAllTreeNodeWidgets();return k.filter(a,v.hitch(this,function(t){return t.isLeaf}))},getAllTreeNodeWidgets:function(){var a=this._getAllTreeNodeDoms();return k.map(a,v.hitch(this,function(t){return w.byNode(t)}))},isLeafItem:function(a){return a&&a.isLeaf},_getAllTreeNodeDoms:function(){return d(".dijitTreeNode",this.domNode)},_createTreeNode:function(a){a.isLeaf=this.isLeafItem(a.item);
this.multiple||(a.groupId=this.uniqueId);return new q(a)},_onTreeNodeSelect:function(a){this.emit("item-select",{item:a.item,treeNode:a})},_onTreeNodeUnselect:function(a){this.emit("item-unselect",{item:a.item,treeNode:a})},selectNodeWidget:function(a){this.multiple||this.unselectAllLeafNodeWidgets();a.select()},_jimuBeforeClick:function(a,t,c){t.isLeaf&&(g.hasClass(c.target||c.srcElement,"jimu-tree-check-node")||(this.multiple?t.toggleSelect():this.selectNodeWidget(t)));return arguments},_onCheckNodeClick:function(a,
t,c){!this.multiple&&t&&this.unselectAllLeafNodeWidgets();f.stop(c);this.focusNode(a);setTimeout(v.hitch(this,function(){t?this.selectNodeWidget(a):a.unselect();this.onClick(a.item,a,c)}),0)},unselectAllLeafNodeWidgets:function(){var a=this.getAllLeafTreeNodeWidgets();k.forEach(a,v.hitch(this,function(t){t.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(x,y,B,A,v,g,k,f,d,m,p,h,u,w,C,n,q,a,t,c,b,r,D,G,I,z,E,K,O,M,R,Z,da,aa,ba){function P(e){return n.delegate(e.promise||e,{addCallback:function(l){this.then(l)},addErrback:function(l){this.otherwise(l)}})}var Y=A("dijit._TreeNode",[I,z,E,K,O],{item:null,isTreeNode:!0,label:"",_setLabelAttr:function(e){this.labelNode["html"==this.labelType?"innerHTML":"innerText"in this.labelNode?"innerText":"textContent"]=e;this._set("label",e);u("dojo-bidi")&&this.applyTextDir(this.labelNode)},labelType:"text",
isExpandable:null,isExpanded:!1,state:"NotLoaded",templateString:R,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(e){var l=Math.max(e,0)*this.tree._nodePixelIndent+"px";m.set(this.domNode,
"backgroundPosition",l+" 0px");m.set(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",l);x.forEach(this.getChildren(),function(F){F.set("indent",e+1)});this._set("indent",e)},markProcessing:function(){this.state="Loading";this._setExpando(!0)},unmarkProcessing:function(){this._setExpando(!1)},_updateItemClasses:function(e){var l=this.tree,F=l.model;l._v10Compat&&e===F.root&&(e=null);this._applyClassAndStyle(e,"icon","Icon");this._applyClassAndStyle(e,"label","Label");this._applyClassAndStyle(e,
"row","Row");this.tree._startPaint(!0)},_applyClassAndStyle:function(e,l,F){var H="_"+l+"Class";l+="Node";var J=this[H];this[H]=this.tree["get"+F+"Class"](e,this.isExpanded);f.replace(this[l],this[H]||"",J||"");m.set(this[l],this.tree["get"+F+"Style"](e,this.isExpanded)||{})},_updateLayout:function(){var e=this.getParent();e=!e||!e.rowNode||"none"==e.rowNode.style.display;f.toggle(this.domNode,"dijitTreeIsRoot",e);f.toggle(this.domNode,"dijitTreeIsLast",!e&&!this.getNextSibling())},_setExpando:function(e){var l=
["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"];e=e?0:this.isExpandable?this.isExpanded?1:2:3;f.replace(this.expandoNode,l[e],l);this.expandoNodeText.innerHTML=["*","-","+","*"][e]},expand:function(){if(this._expandDeferred)return P(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");f.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 e=h.wipeIn({node:this.containerNode,duration:G.defaultDuration}),l=this._expandDeferred=new v(function(){e.stop()});y.after(e,"onEnd",function(){l.resolve(!0)},!0);e.play();return P(l)},collapse:function(){if(this._collapseDeferred)return P(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");f.remove(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);var e=h.wipeOut({node:this.containerNode,duration:G.defaultDuration}),l=this._collapseDeferred=new v(function(){e.stop()});y.after(e,"onEnd",
function(){l.resolve(!0)},!0);e.play();return P(l)},indent:0,setChildItems:function(e){var l=this.tree,F=l.model,H=[],J=l.focusedChild,U=this.getChildren();x.forEach(U,function(L){E.prototype.removeChild.call(this,L)},this);this.defer(function(){x.forEach(U,function(L){if(!L._destroyed&&!L.getParent()){l.dndController.removeTreeNode(L);(function ca(N){var V=F.getIdentity(N.item),X=l._itemNodesMap[V];1==X.length?delete l._itemNodesMap[V]:(V=x.indexOf(X,N),-1!=V&&X.splice(V,1));x.forEach(N.getChildren(),
ca)})(L);if(l.persist){var S=x.map(L.getTreePath(),function(N){return l.model.getIdentity(N)}).join("/"),Q;for(Q in l._openedNodes)Q.substr(0,S.length)==S&&delete l._openedNodes[Q];l._saveExpandedNodes()}l.lastFocusedChild&&!k.isDescendant(l.lastFocusedChild.domNode,l.domNode)&&delete l.lastFocusedChild;J&&!k.isDescendant(J.domNode,l.domNode)&&l.focus();L.destroyRecursive()}})});this.state="Loaded";e&&0<e.length?(this.isExpandable=!0,x.forEach(e,function(L){var S=F.getIdentity(L),Q=l._itemNodesMap[S];
if(Q)for(var W=0;W<Q.length;W++)if(Q[W]&&!Q[W].getParent()){var N=Q[W];N.set("indent",this.indent+1);break}N||(N=this.tree._createTreeNode({item:L,tree:l,isExpandable:F.mayHaveChildren(L),label:l.getLabel(L),labelType:l.model&&l.model.labelType||"text",tooltip:l.getTooltip(L),ownerDocument:l.ownerDocument,dir:l.dir,lang:l.lang,textDir:l.textDir,indent:this.indent+1}),Q?Q.push(N):l._itemNodesMap[S]=[N]);this.addChild(N);(this.tree.autoExpand||this.tree._state(N))&&H.push(l._expandNode(N))},this),x.forEach(this.getChildren(),
function(L){L._updateLayout()})):this.isExpandable=!1;this._setExpando&&this._setExpando(!1);this._updateItemClasses(this.item);e=g(H);this.tree._startPaint(e);return P(e)},getTreePath:function(){for(var e=this,l=[];e&&e!==this.tree.rootNode;)l.unshift(e.item),e=e.getParent();l.unshift(this.tree.rootNode.item);return l},getIdentity:function(){return this.tree.model.getIdentity(this.item)},removeChild:function(e){this.inherited(arguments);var l=this.getChildren();0==l.length&&(this.isExpandable=!1,
this.collapse());x.forEach(l,function(F){F._updateLayout()})},makeExpandable:function(){this.isExpandable=!0;this._setExpando(!1)},setSelected:function(e){this.labelNode.setAttribute("aria-selected",e?"true":"false");f.toggle(this.rowNode,"dijitTreeRowSelected",e)},focus:function(){r.focus(this.focusNode)}});u("dojo-bidi")&&Y.extend({_setTextDirAttr:function(e){!e||this.textDir==e&&this._created||(this._set("textDir",e),this.applyTextDir(this.labelNode),x.forEach(this.getChildren(),function(l){l.set("textDir",
e)},this))}});var T=A("dijit.Tree",[I,M,z,O],{baseClass:"dijitTree",store:null,model:null,query:null,label:"",showRoot:!0,childrenAttr:["children"],paths:[],path:[],selectedItems:null,selectedItem:null,openOnClick:!1,openOnDblClick:!1,templateString:Z,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(e,l){a.publish(this.id,n.mixin({tree:this,event:e},l||{}))},postMixInProperties:function(){this.tree=this;this.autoExpand&&(this.persist=!1);this._itemNodesMap={};!this.cookieName&&this.id&&(this.cookieName=this.id+"SaveStateCookie");this.expandChildrenDeferred=new v;this.pendingCommandsPromise=this.expandChildrenDeferred.promise;this.inherited(arguments)},postCreate:function(){this._initState();var e=this;this.own(q(this.containerNode,
q.selector(".dijitTreeNode",t.enter),function(H){e._onNodeMouseEnter(D.byNode(this),H)}),q(this.containerNode,q.selector(".dijitTreeNode",t.leave),function(H){e._onNodeMouseLeave(D.byNode(this),H)}),q(this.containerNode,q.selector(".dijitTreeRow",b.press),function(H){e._onNodePress(D.getEnclosingWidget(this),H)}),q(this.containerNode,q.selector(".dijitTreeRow",b),function(H){e._onClick(D.getEnclosingWidget(this),H)}),q(this.containerNode,q.selector(".dijitTreeRow","dblclick"),function(H){e._onDblClick(D.getEnclosingWidget(this),
H)}));this.model||this._store2model();this.own(y.after(this.model,"onChange",n.hitch(this,"_onItemChange"),!0),y.after(this.model,"onChildrenChange",n.hitch(this,"_onItemChildrenChange"),!0),y.after(this.model,"onDelete",n.hitch(this,"_onItemDelete"),!0));this.inherited(arguments);if(this.dndController){n.isString(this.dndController)&&(this.dndController=n.getObject(this.dndController));for(var l={},F=0;F<this.dndParams.length;F++)this[this.dndParams[F]]&&(l[this.dndParams[F]]=this[this.dndParams[F]]);
this.dndController=new this.dndController(this,l)}this._load();this.onLoadDeferred=P(this.pendingCommandsPromise);this.onLoadDeferred.then(n.hitch(this,"onLoad"))},_store2model:function(){this._v10Compat=!0;w.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");var e={id:this.id+"_ForestStoreModel",store:this.store,query:this.query,childrenAttrs:this.childrenAttr};this.params.mayHaveChildren&&(e.mayHaveChildren=n.hitch(this,"mayHaveChildren"));this.params.getItemChildren&&
(e.getChildren=n.hitch(this,function(l,F,H){this.getItemChildren(this._v10Compat&&l===this.model.root?null:l,F,H)}));this.model=new aa(e);this.showRoot=!!this.label},onLoad:function(){},_load:function(){this.model.getRoot(n.hitch(this,function(e){var l=this.rootNode=this.tree._createTreeNode({item:e,tree:this,isExpandable:!0,label:this.label||this.getLabel(e),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"):(l.rowNode.style.display="none",this.domNode.setAttribute("role","presentation"),this.domNode.removeAttribute("aria-expanded"),this.domNode.removeAttribute("aria-multiselectable"),this["aria-label"]?(l.containerNode.setAttribute("aria-label",this["aria-label"]),this.domNode.removeAttribute("aria-label")):this["aria-labelledby"]&&(l.containerNode.setAttribute("aria-labelledby",this["aria-labelledby"]),this.domNode.removeAttribute("aria-labelledby")),
l.labelNode.setAttribute("role","presentation"),l.labelNode.removeAttribute("aria-selected"),l.containerNode.setAttribute("role","tree"),l.containerNode.setAttribute("aria-expanded","true"),l.containerNode.setAttribute("aria-multiselectable",!this.dndController.singular));this.containerNode.appendChild(l.domNode);e=this.model.getIdentity(e);this._itemNodesMap[e]?this._itemNodesMap[e].push(l):this._itemNodesMap[e]=[l];l._updateLayout();this._expandNode(l).then(n.hitch(this,function(){this._destroyed||
(this.rootLoadingIndicator.style.display="none",this.expandChildrenDeferred.resolve(!0))}))}),n.hitch(this,function(e){console.error(this,": error loading root: ",e)}))},getNodesByItem:function(e){if(!e)return[];e=n.isString(e)?e:this.model.getIdentity(e);return[].concat(this._itemNodesMap[e])},_setSelectedItemAttr:function(e){this.set("selectedItems",[e])},_setSelectedItemsAttr:function(e){var l=this;return this.pendingCommandsPromise=this.pendingCommandsPromise.always(n.hitch(this,function(){var F=
x.map(e,function(J){return!J||n.isString(J)?J:l.model.getIdentity(J)}),H=[];x.forEach(F,function(J){H=H.concat(l._itemNodesMap[J]||[])});this.set("selectedNodes",H)}))},_setPathAttr:function(e){return e.length?P(this.set("paths",[e]).then(function(l){return l[0]})):P(this.set("paths",[]).then(function(l){return l[0]}))},_setPathsAttr:function(e){function l(H,J){var U=H.shift(),L=x.filter(J,function(S){return S.getIdentity()==U})[0];if(L)return H.length?F._expandNode(L).then(function(){return l(H,
L.getChildren())}):L;throw new T.PathError("Could not expand path at "+U);}var F=this;return P(this.pendingCommandsPromise=this.pendingCommandsPromise.always(function(){return g(x.map(e,function(H){H=x.map(H,function(J){return J&&n.isObject(J)?F.model.getIdentity(J):J});if(H.length)return l(H,[F.rootNode]);throw new T.PathError("Empty path");}))}).then(function(H){F.set("selectedNodes",H);return F.paths}))},_setSelectedNodeAttr:function(e){this.set("selectedNodes",[e])},_setSelectedNodesAttr:function(e){this.dndController.setSelection(e)},
expandAll:function(){function e(F){return l._expandNode(F).then(function(){var H=x.filter(F.getChildren()||[],function(J){return J.isExpandable});return g(x.map(H,e))})}var l=this;return P(e(this.rootNode))},collapseAll:function(){function e(F){var H=x.filter(F.getChildren()||[],function(J){return J.isExpandable});H=g(x.map(H,e));return!F.isExpanded||F==l.rootNode&&!l.showRoot?H:H.then(function(){return l._collapseNode(F)})}var l=this;return P(e(this.rootNode))},mayHaveChildren:function(){},getItemChildren:function(){},
getLabel:function(e){return this.model.getLabel(e)},getIconClass:function(e,l){return!e||this.model.mayHaveChildren(e)?l?"dijitFolderOpened":"dijitFolderClosed":"dijitLeaf"},getLabelClass:function(){},getRowClass:function(){},getIconStyle:function(){},getLabelStyle:function(){},getRowStyle:function(){},getTooltip:function(){return""},_onDownArrow:function(e,l){(e=this._getNext(l))&&e.isTreeNode&&this.focusNode(e)},_onUpArrow:function(e,l){if(e=l.getPreviousSibling())for(l=e;l.isExpandable&&l.isExpanded&&
l.hasChildren();)l=l.getChildren(),l=l[l.length-1];else if(e=l.getParent(),this.showRoot||e!==this.rootNode)l=e;l&&l.isTreeNode&&this.focusNode(l)},_onRightArrow:function(e,l){l.isExpandable&&!l.isExpanded?this._expandNode(l):l.hasChildren()&&(l=l.getChildren()[0])&&l.isTreeNode&&this.focusNode(l)},_onLeftArrow:function(e,l){l.isExpandable&&l.isExpanded?this._collapseNode(l):(e=l.getParent())&&e.isTreeNode&&(this.showRoot||e!==this.rootNode)&&this.focusNode(e)},focusLastChild:function(){var e=this._getLast();
e&&e.isTreeNode&&this.focusNode(e)},_getFirst:function(){return this.showRoot?this.rootNode:this.rootNode.getChildren()[0]},_getLast:function(){for(var e=this.rootNode;e.isExpanded;){var l=e.getChildren();if(!l.length)break;e=l[l.length-1]}return e},_getNext:function(e){if(e.isExpandable&&e.isExpanded&&e.hasChildren())return e.getChildren()[0];for(;e&&e.isTreeNode;){var l=e.getNextSibling();if(l)return l;e=e.getParent()}return null},childSelector:".dijitTreeRow",isExpandoNode:function(e,l){return k.isDescendant(e,
l.expandoNode)||k.isDescendant(e,l.expandoNodeText)},_onNodePress:function(e,l){this.focusNode(e)},__click:function(e,l,F,H){var J=this.isExpandoNode(l.target,e);e.isExpandable&&(F||J)?this._onExpandoClick({node:e}):(this._publish("execute",{item:e.item,node:e,evt:l}),this[H](e.item,e,l),this.focusNode(e));l.stopPropagation();l.preventDefault()},_onClick:function(e,l){this.__click(e,l,this.openOnClick,"onClick")},_onDblClick:function(e,l){this.__click(e,l,this.openOnDblClick,"onDblClick")},_onExpandoClick:function(e){e=
e.node;this.focusNode(e);e.isExpanded?this._collapseNode(e):this._expandNode(e)},onClick:function(){},onDblClick:function(){},onOpen:function(){},onClose:function(){},_getNextNode:function(e){w.deprecated(this.declaredClass+"::_getNextNode(node) is deprecated. Use _getNext(node) instead.","","2.0");return this._getNext(e)},_getRootOrFirstNode:function(){w.deprecated(this.declaredClass+"::_getRootOrFirstNode() is deprecated. Use _getFirst() instead.","","2.0");return this._getFirst()},_collapseNode:function(e){e._expandNodeDeferred&&
delete e._expandNodeDeferred;if("Loading"!=e.state&&e.isExpanded){var l=e.collapse();this.onClose(e.item,e);this._state(e,!1);this._startPaint(l);return l}},_expandNode:function(e){if(e._expandNodeDeferred)return e._expandNodeDeferred;var l=this.model,F=e.item,H=this;e._loadDeferred||(e.markProcessing(),e._loadDeferred=new v,l.getChildren(F,function(J){e.unmarkProcessing();e.setChildItems(J).then(function(){e._loadDeferred.resolve(J)})},function(J){console.error(H,": error loading "+e.label+" children: ",
J);e._loadDeferred.reject(J)}));l=e._loadDeferred.then(n.hitch(this,function(){var J=e.expand();this.onOpen(e.item,e);this._state(e,!0);return J}));this._startPaint(l);return l},focusNode:function(e){for(var l=[],F=this.domNode;F&&F.tagName&&"IFRAME"!==F.tagName.toUpperCase();F=F.parentNode)l.push({domNode:F.contentWindow||F,scrollLeft:F.scrollLeft||0,scrollTop:F.scrollTop||0});this.focusChild(e);this.defer(function(){for(var H=0,J=l.length;H<J;H++)l[H].domNode.scrollLeft=l[H].scrollLeft,l[H].domNode.scrollTop=
l[H].scrollTop},0)},_onNodeMouseEnter:function(){},_onNodeMouseLeave:function(){},_onItemChange:function(e){var l=this.model.getIdentity(e);if(l=this._itemNodesMap[l]){var F=this.getLabel(e),H=this.getTooltip(e);x.forEach(l,function(J){J.set({item:e,label:F,tooltip:H});J._updateItemClasses(e)})}},_onItemChildrenChange:function(e,l){e=this.model.getIdentity(e);(e=this._itemNodesMap[e])&&x.forEach(e,function(F){F.setChildItems(l)})},_onItemDelete:function(e){e=this.model.getIdentity(e);var l=this._itemNodesMap[e];
l&&(x.forEach(l,function(F){this.dndController.removeTreeNode(F);var H=F.getParent();H&&H.removeChild(F);this.lastFocusedChild&&!k.isDescendant(this.lastFocusedChild.domNode,this.domNode)&&delete this.lastFocusedChild;this.focusedChild&&!k.isDescendant(this.focusedChild.domNode,this.domNode)&&this.focus();F.destroyRecursive()},this),delete this._itemNodesMap[e])},_initState:function(){this._openedNodes={};if(this.persist&&this.cookieName){var e=B(this.cookieName);e&&x.forEach(e.split(","),function(l){this._openedNodes[l]=
!0},this)}},_state:function(e,l){if(!this.persist)return!1;var F=x.map(e.getTreePath(),function(H){return this.model.getIdentity(H)},this).join("/");if(1===arguments.length)return this._openedNodes[F];l?this._openedNodes[F]=!0:delete this._openedNodes[F];this._saveExpandedNodes()},_saveExpandedNodes:function(){if(this.persist&&this.cookieName){var e=[],l;for(l in this._openedNodes)e.push(l);B(this.cookieName,e.join(","),{expires:365})}},destroy:function(){this._curSearch&&(this._curSearch.timer.remove(),
delete this._curSearch);this.rootNode&&this.rootNode.destroyRecursive();this.dndController&&!n.isString(this.dndController)&&this.dndController.destroy();this.rootNode=null;this.inherited(arguments)},destroyRecursive:function(){this.destroy()},resize:function(e){e&&d.setMarginBox(this.domNode,e);this._nodePixelIndent=d.position(this.tree.indentDetector).w||this._nodePixelIndent;this.expandChildrenDeferred.then(n.hitch(this,function(){this.rootNode.set("indent",this.showRoot?0:-1);this._adjustWidths()}))},
_outstandingPaintOperations:0,_startPaint:function(e){this._outstandingPaintOperations++;this._adjustWidthsTimer&&(this._adjustWidthsTimer.remove(),delete this._adjustWidthsTimer);var l=n.hitch(this,function(){this._outstandingPaintOperations--;0>=this._outstandingPaintOperations&&!this._adjustWidthsTimer&&this._started&&(this._adjustWidthsTimer=this.defer("_adjustWidths"))});c(e,l,l)},_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(e){return new Y(e)},focus:function(){this.lastFocusedChild?this.focusNode(this.lastFocusedChild):this.focusFirstChild()}});u("dojo-bidi")&&T.extend({_setTextDirAttr:function(e){e&&this.textDir!=e&&(this._set("textDir",e),this.rootNode.set("textDir",e))}});T.PathError=p("TreePathError");T._TreeNode=Y;return T})},"dijit/tree/TreeStoreModel":function(){define(["dojo/_base/array",
"dojo/aspect","dojo/_base/declare","dojo/_base/lang"],function(x,y,B,A){return B("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:!1,constructor:function(v){A.mixin(this,v);this.connects=[];v=this.store;if(!v.getFeatures()["dojo.data.api.Identity"])throw Error("dijit.tree.TreeStoreModel: store must support dojo.data.Identity");v.getFeatures()["dojo.data.api.Notification"]&&(this.connects=this.connects.concat([y.after(v,
"onNew",A.hitch(this,"onNewItem"),!0),y.after(v,"onDelete",A.hitch(this,"onDeleteItem"),!0),y.after(v,"onSet",A.hitch(this,"onSetItem"),!0)]))},destroy:function(){for(var v;v=this.connects.pop();)v.remove()},getRoot:function(v,g){this.root?v(this.root):this.store.fetch({query:this.query,onComplete:A.hitch(this,function(k){if(1!=k.length)throw Error("dijit.tree.TreeStoreModel: root query returned "+k.length+" items, but must return exactly one");this.root=k[0];v(this.root)}),onError:g})},mayHaveChildren:function(v){return x.some(this.childrenAttrs,
function(g){return this.store.hasAttribute(v,g)},this)},getChildren:function(v,g,k){var f=this.store;if(f.isItemLoaded(v)){for(var d=[],m=0;m<this.childrenAttrs.length;m++){var p=f.getValues(v,this.childrenAttrs[m]);d=d.concat(p)}var h=0;this.deferItemLoadingUntilExpand||x.forEach(d,function(w){f.isItemLoaded(w)||h++});0==h?g(d):x.forEach(d,function(w,C){f.isItemLoaded(w)||f.loadItem({item:w,onItem:function(n){d[C]=n;0==--h&&g(d)},onError:k})})}else{var u=A.hitch(this,arguments.callee);f.loadItem({item:v,
onItem:function(w){u(w,g,k)},onError:k})}},isItem:function(v){return this.store.isItem(v)},fetchItemByIdentity:function(v){this.store.fetchItemByIdentity(v)},getIdentity:function(v){return this.store.getIdentity(v)},getLabel:function(v){return this.labelAttr?this.store.getValue(v,this.labelAttr):this.store.getLabel(v)},newItem:function(v,g,k){var f={parent:g,attribute:this.childrenAttrs[0]},d;this.newItemIdAttr&&v[this.newItemIdAttr]?this.fetchItemByIdentity({identity:v[this.newItemIdAttr],scope:this,
onItem:function(m){m?this.pasteItem(m,null,g,!0,k):(d=this.store.newItem(v,f))&&void 0!=k&&this.pasteItem(d,g,g,!1,k)}}):(d=this.store.newItem(v,f))&&void 0!=k&&this.pasteItem(d,g,g,!1,k)},pasteItem:function(v,g,k,f,d){var m=this.store,p=this.childrenAttrs[0];g&&x.forEach(this.childrenAttrs,function(u){if(m.containsValue(g,u,v)){if(!f){var w=x.filter(m.getValues(g,u),function(C){return C!=v});m.setValues(g,u,w)}p=u}});if(k)if("number"==typeof d){var h=m.getValues(k,p).slice();h.splice(d,0,v);m.setValues(k,
p,h)}else m.setValues(k,p,m.getValues(k,p).concat(v))},onChange:function(){},onChildrenChange:function(){},onDelete:function(){},onNewItem:function(v,g){g&&this.getChildren(g.item,A.hitch(this,function(k){this.onChildrenChange(g.item,k)}))},onDeleteItem:function(v){this.onDelete(v)},onSetItem:function(v,g){if(-1!=x.indexOf(this.childrenAttrs,g))this.getChildren(v,A.hitch(this,function(k){this.onChildrenChange(v,k)}));else this.onChange(v)}})})},"dijit/tree/ForestStoreModel":function(){define(["dojo/_base/array",
"dojo/_base/declare","dojo/_base/kernel","dojo/_base/lang","./TreeStoreModel"],function(x,y,B,A,v){return y("dijit.tree.ForestStoreModel",v,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(g){this.root={store:this,root:!0,id:g.rootId,label:g.rootLabel,children:g.rootChildren}},mayHaveChildren:function(g){return g===this.root||this.inherited(arguments)},getChildren:function(g,k,f){g===this.root?this.root.children?k(this.root.children):this.store.fetch({query:this.query,onComplete:A.hitch(this,
function(d){this.root.children=d;k(d)}),onError:f}):this.inherited(arguments)},isItem:function(g){return g===this.root?!0:this.inherited(arguments)},fetchItemByIdentity:function(g){if(g.identity==this.root.id){var k=g.scope||B.global;g.onItem&&g.onItem.call(k,this.root)}else this.inherited(arguments)},getIdentity:function(g){return g===this.root?this.root.id:this.inherited(arguments)},getLabel:function(g){return g===this.root?this.root.label:this.inherited(arguments)},newItem:function(g,k,f){return k===
this.root?(this.onNewRootItem(g),this.store.newItem(g)):this.inherited(arguments)},onNewRootItem:function(){},pasteItem:function(g,k,f,d,m){if(k===this.root&&!d)this.onLeaveRoot(g);this.inherited(arguments,[g,k===this.root?null:k,f===this.root?null:f,d,m]);if(f===this.root)this.onAddToRoot(g)},onAddToRoot:function(g){console.log(this,": item ",g," added to root")},onLeaveRoot:function(g){console.log(this,": item ",g," removed from root")},_requeryTop:function(){var g=this.root.children||[];this.store.fetch({query:this.query,
onComplete:A.hitch(this,function(k){this.root.children=k;if(g.length!=k.length||x.some(g,function(f,d){return k[d]!=f}))this.onChildrenChange(this.root,k)})})},onNewItem:function(g,k){this._requeryTop();this.inherited(arguments)},onDeleteItem:function(g){-1!=x.indexOf(this.root.children,g)&&this._requeryTop();this.inherited(arguments)},onSetItem:function(g,k,f,d){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(x,y,B,A,v,g,k,f,d,m,p){return y("dijit.tree._dndSelector",p,{constructor:function(){this.selection={};this.anchor=null;this.events.push(f(this.tree.domNode,d.press,A.hitch(this,"onMouseDown")),f(this.tree.domNode,d.release,A.hitch(this,"onMouseUp")),f(this.tree.domNode,d.move,A.hitch(this,"onMouseMove")),f(this.tree.domNode,m.press,A.hitch(this,"onClickPress")),f(this.tree.domNode,m.release,A.hitch(this,"onClickRelease")))},singular:!1,getSelectedTreeNodes:function(){var h=[],u=this.selection,
w;for(w in u)h.push(u[w]);return h},selectNone:function(){this.setSelection([]);return this},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null},addTreeNode:function(h,u){this.setSelection(this.getSelectedTreeNodes().concat([h]));u&&(this.anchor=h);return h},removeTreeNode:function(h){var u=x.filter(this.getSelectedTreeNodes(),function(w){return!g.isDescendant(w.domNode,h.domNode)});this.setSelection(u);return h},isTreeNodeSelected:function(h){return h.id&&!!this.selection[h.id]},
setSelection:function(h){var u=this.getSelectedTreeNodes();x.forEach(this._setDifference(u,h),A.hitch(this,function(w){w.setSelected(!1);this.anchor==w&&delete this.anchor;delete this.selection[w.id]}));x.forEach(this._setDifference(h,u),A.hitch(this,function(w){w.setSelected(!0);this.selection[w.id]=w}));this._updateSelectionProperties()},_setDifference:function(h,u){x.forEach(u,function(w){w.__exclude__=!0});h=x.filter(h,function(w){return!w.__exclude__});x.forEach(u,function(w){delete w.__exclude__});
return h},_updateSelectionProperties:function(){var h=this.getSelectedTreeNodes(),u=[],w=[];x.forEach(h,function(C){var n=C.getTreePath();w.push(C);u.push(n)},this);h=x.map(w,function(C){return C.item});this.tree._set("paths",u);this.tree._set("path",u[0]||[]);this.tree._set("selectedNodes",w);this.tree._set("selectedNode",w[0]||null);this.tree._set("selectedItems",h);this.tree._set("selectedItem",h[0]||null)},onClickPress:function(h){if(!(this.current&&this.current.isExpandable&&this.tree.isExpandoNode(h.target,
this.current))){"mousedown"==h.type&&k.isLeft(h)&&h.preventDefault();var u="keydown"==h.type?this.tree.focusedChild:this.current;if(u){var w=v.getCopyKeyState(h),C=u.id;this.singular||h.shiftKey||!this.selection[C]?(this._doDeselect=!1,this.userSelect(u,w,h.shiftKey)):this._doDeselect=!0}}},onClickRelease:function(h){this._doDeselect&&(this._doDeselect=!1,this.userSelect("keyup"==h.type?this.tree.focusedChild:this.current,v.getCopyKeyState(h),h.shiftKey))},onMouseMove:function(){this._doDeselect=
!1},onMouseDown:function(){},onMouseUp:function(){},_compareNodes:function(h,u){if(h===u)return 0;if("sourceIndex"in document.documentElement)return h.sourceIndex-u.sourceIndex;if("compareDocumentPosition"in document.documentElement)return h.compareDocumentPosition(u)&2?1:-1;if(document.createRange){var w=doc.createRange();w.setStartBefore(h);h=doc.createRange();h.setStartBefore(u);return w.compareBoundaryPoints(w.END_TO_END,h)}throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");
},userSelect:function(h,u,w){if(this.singular)this.anchor==h&&u?this.selectNone():(this.setSelection([h]),this.anchor=h);else if(w&&this.anchor){u=this._compareNodes(this.anchor.rowNode,h.rowNode);w=this.anchor;0>u?u=w:(u=h,h=w);for(w=[];u!=h;)w.push(u),u=this.tree._getNext(u);w.push(h);this.setSelection(w)}else this.selection[h.id]&&u?this.removeTreeNode(h):u?this.addTreeNode(h,!0):(this.setSelection([h]),this.anchor=h)},getItem:function(h){return{data:this.selection[h],type:["treeNode"]}},forInSelectedItems:function(h,
u){u=u||B.global;for(var w in this.selection)h.call(u,this.getItem(w),w,this)}})})},"dijit/tree/_dndContainer":function(){define("dojo/aspect dojo/_base/declare dojo/dom-class dojo/_base/lang dojo/on dojo/touch".split(" "),function(x,y,B,A,v,g){return y("dijit.tree._dndContainer",null,{constructor:function(k,f){this.tree=k;this.node=k.domNode;A.mixin(this,f);this.containerState="";B.add(this.node,"dojoDndContainer");this.events=[v(this.node,g.enter,A.hitch(this,"onOverEvent")),v(this.node,g.leave,
A.hitch(this,"onOutEvent")),x.after(this.tree,"_onNodeMouseEnter",A.hitch(this,"onMouseOver"),!0),x.after(this.tree,"_onNodeMouseLeave",A.hitch(this,"onMouseOut"),!0),v(this.node,"dragstart, selectstart",function(d){d.preventDefault()})]},destroy:function(){for(var k;k=this.events.pop();)k.remove();this.node=this.parent=null},onMouseOver:function(k){this.current=k},onMouseOut:function(){this.current=null},_changeState:function(k,f){var d="dojoDnd"+k;k=k.toLowerCase()+"State";B.replace(this.node,d+
f,d+this[k]);this[k]=f},_addItemClass:function(k,f){B.add(k,"dojoDndItem"+f)},_removeItemClass:function(k,f){B.remove(k,"dojoDndItem"+f)},onOverEvent:function(){this._changeState("Container","Over")},onOutEvent:function(){this._changeState("Container","")}})})},"jimu/dijit/FeaturelayerChooserFromPortal":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/FeaturelayerChooserFromPortal.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/FeaturelayerServiceBrowser jimu/portalUrlUtils esri/request".split(" "),
function(x,y,B,A,v,g,k,f,d,m,p,h,u,w,C,n,q){return x([y,B,A,h],{templateString:v,declaredClass:"jimu.dijit.FeaturelayerChooserFromPortal",baseClass:"jimu-service-chooser-from-portal jimu-featurelayer-chooser-from-portal",_serviceBrowserDef:null,portalUrl:null,multiple:!1,postMixInProperties:function(){this.nls=g.mixin({},window.jimuNls.common);this.nls=g.mixin(this.nls,window.jimuNls.featureLayerChooserFromPortal);this.portalUrl=n.getStandardPortalUrl(this.portalUrl);this.multiple=!0===this.multiple?
!0:!1},postCreate:function(){this.inherited(arguments);this._initSelf()},getSelectedItems:function(){return this.serviceBrowser.getSelectedItems()},_initSelf:function(){this.selector=new w({portalUrl:this.portalUrl,itemTypes:["Feature Service","Map Service"],onlyShowOnlineFeaturedItems:!1});this.own(d(this.selector,"item-selected",g.hitch(this,this._onItemSelected)));this.own(d(this.selector,"none-item-selected",g.hitch(this,this._onNoneItemSelected)));this.selector.placeAt(this.selectorContainer);
this.selector.startup();this.serviceBrowser=new C({multiple:this.multiple});this.own(d(this.serviceBrowser,"tree-click",g.hitch(this,this._onServiceBrowserClicked)));this.serviceBrowser.placeAt(this.serviceBrowserContainer);this.serviceBrowser.startup()},_onItemSelected:function(){k.removeClass(this.btnNext,"jimu-state-disabled")},_onNoneItemSelected:function(){k.addClass(this.btnNext,"jimu-state-disabled")},_onBtnBackClicked:function(){this._serviceBrowserDef&&!this._serviceBrowserDef.isFulfilled()&&
this._serviceBrowserDef.cancel();k.setStyle(this.btnOk,"display","none");k.setStyle(this.btnNext,"display","block");k.setStyle(this.btnBack,"display","none");k.addClass(this.btnOk,"jimu-state-disabled");k.setStyle(this.selectorContainer,"display","block");k.setStyle(this.serviceBrowserContainer,"display","none");this.serviceBrowser.reset();this.emit("back")},_onBtnOkClicked:function(){var a=this.getSelectedItems();0<a.length&&this.emit("ok",a)},_onBtnNextClicked:function(){var a=this.selector.getSelectedItem();
a&&(k.setStyle(this.btnNext,"display","none"),k.setStyle(this.btnBack,"display","block"),k.setStyle(this.btnOk,"display","block"),k.addClass(this.btnOk,"jimu-state-disabled"),k.setStyle(this.selectorContainer,"display","none"),k.setStyle(this.serviceBrowserContainer,"display","block"),this.serviceBrowser.reset(),this._serviceBrowserDef=this.serviceBrowser.setUrl(a.url||a.item),this._serviceBrowserDef.then(g.hitch(this,function(){this._serviceBrowserDef=null;this._setOkStateBySelectedItems()}),g.hitch(this,
function(){this._serviceBrowserDef=null})),this.emit("next"))},_setOkStateBySelectedItems:function(){0<this.serviceBrowser.getSelectedItems().length?k.removeClass(this.btnOk,"jimu-state-disabled"):k.addClass(this.btnOk,"jimu-state-disabled")},_onServiceBrowserClicked:function(){this._setOkStateBySelectedItems()},_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(x,y,B,A,v,g,k,f,d,m,p,h,u,w,C,n,q,a,t,c,b,r,D,G,I){return x([B,A,v,I,k],{templateString:g,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=c.getStandardPortalUrl(this.portalUrl);this.showOnlineItems=!1===this.showOnlineItems?!1:!0;this.itemTypes&&0<this.itemTypes.length||(this.itemTypes=[]);this._itemTypes="";m.forEach(this.itemTypes,f.hitch(this,function(z,E){this._itemTypes+=
'"'+z+'"';E!==this.itemTypes.length-1&&(this._itemTypes+=",")}));this._itemTypes="["+this._itemTypes+"]";this.typeKeywords&&0<this.typeKeywords.length||(this.typeKeywords=[]);this._typeKeywords="";m.forEach(this.typeKeywords,f.hitch(this,function(z,E){this._typeKeywords+='"'+z+'"';E!==this.typeKeywords.length-1&&(this._typeKeywords+=",")}));this._typeKeywords="["+this._typeKeywords+"]";this.nls=window.jimuNls.itemSelector},postCreate:function(){this.inherited(arguments);var z=this._getPortalUrl();
this.portal=a.getPortal(z);this._initOptions();this._initSearchQuery();this._initTabs();this._initPortalRadio();this._initItemTables();this._initPublic();this._initPrivate();this._updateUIbySignIn()},_initOptions:function(){this._itemTypeQueryString=q.getItemQueryStringByTypes(this.itemTypes);this._typeKeywordQueryString=q.getItemQueryStringByTypeKeywords(this.typeKeywords)},_initTabs:function(){var z={title:this.nls.myContent,content:this.mycontentTabNode},E={title:this.nls.myOrganization,content:this.organizationTabNode},
K={title:this.nls.myGroup,content:this.groupTabNode},O={title:this.nls.publicMap,content:this.publicTabNode};n.set(this.mycontentTabNode,"display","none");n.set(this.organizationTabNode,"display","none");n.set(this.groupTabNode,"display","none");n.set(this.publicTabNode,"display","none");var M=[];this.showMyContent&&(M.push(z),n.set(this.mycontentTabNode,"display","block"));this.showMyOrganization&&(M.push(E),n.set(this.organizationTabNode,"display","block"));this.showMyGroups&&(M.push(K),n.set(this.groupTabNode,
"display","block"));this.showPublic&&(M.push(O),n.set(this.publicTabNode,"display","block"));this.tab=new D({tabs:M},this.tabNode);this.own(C(this.tab,"tabChanged",f.hitch(this,function(R){p.setStyle(this.signinSection,"display","none");R!==this.nls.publicMap?(this._isPublicTabShow=!1,this._updateUIbySignIn()):this._isPublicTabShow=!0})))},_updateUIbySignIn:function(){p.setStyle(this.signinSection,"display","none");var z=w(".organization-tab-content-main,.group-tab-content-main,.mycontent-tab-content-main",
this.domNode);t.userHaveSignInPortal(this._getPortalUrl())?z.style("display","block"):(z.style("display","none"),this._isPublicTabShow||p.setStyle(this.signinSection,"display","block"))},_initPortalRadio:function(){var z=this._getPortalUrl();z=c.getServerByUrl(z);this.portalPublicRaido.set("disabled",!1);this.onlinePublicRaido.set("disabled",!1);this.portalPublicRaido.set("checked",!0);var E=!1;c.isArcGIScom(z)?(E=!0,this.portalPublicLabel.innerHTML="ArcGIS.com"):(this.portalPublicLabel.innerHTML=
z,E=this.showOnlineItems?!1:!0);E&&(this.onlinePublicRaido.set("disabled",!0),p.setStyle(this.onlinePublicRaido,"display","none"),p.setStyle(this.onlinePublicLabel,"display","none"))},_initSearchQuery:function(){var z="esri_"+(d.locale&&d.locale.slice(0,2)||"en").toLowerCase(),E=m.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(" "),
f.hitch(this,function(O){return O!==z})),K="";m.forEach(E,f.hitch(this,function(O){K+=" -owner:"+O+" "}));E=" ";this.portal&&this.portal.user&&this.portal.user.orgId&&(E=" orgid:"+this.portal.user.orgId+" ");E=E+this._itemTypeQueryString+" AND access:public "+K+" "+this._typeKeywordQueryString;this._allPublicPortalQuery=this._getQuery({sortField:"numViews",sortOrder:"desc",q:E});this._filterPublicPortalQuery=this._getQuery({q:E,basicQ:E});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(z){return f.mixin({start:1,num:16,f:"json"},z||{})},_getPortalUrl:function(){return c.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(C(this.publicPortalItemTable,"item-dom-clicked",f.hitch(this,this._onItemDomClicked)));this.own(C(this.publicOnlineItemTable,"item-dom-clicked",f.hitch(this,this._onItemDomClicked)));this.own(C(this.organizationItemTable,"item-dom-clicked",f.hitch(this,this._onItemDomClicked)));this.own(C(this.groupItemTable,"item-dom-clicked",f.hitch(this,this._onItemDomClicked)));
this.own(C(this.mycontentItemTable,"item-dom-clicked",f.hitch(this,this._onItemDomClicked)));this.own(C(this.publicPortalItemTable,"update",f.hitch(this,this._onItemTableUpdate)));this.own(C(this.publicOnlineItemTable,"update",f.hitch(this,this._onItemTableUpdate)));this.own(C(this.organizationItemTable,"update",f.hitch(this,this._onItemTableUpdate)));this.own(C(this.groupItemTable,"update",f.hitch(this,this._onItemTableUpdate)));this.own(C(this.mycontentItemTable,"update",f.hitch(this,this._onItemTableUpdate)));
var z=this._getPortalUrl();this.portalPublicRaido.get("disabled")||(this.publicPortalItemTable.set("portalUrl",z),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(C(this.portalPublicRaido,"click",f.hitch(this,this._onPublicRaidoClicked)));this.own(C(this.onlinePublicRaido,"click",f.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(z){(z=z&&f.trim(z))?(this.publicPortalItemTable.showFilterItemsSection(),this.publicOnlineItemTable.showFilterItemsSection(),this.portalPublicRaido.get("checked")?(this._filterPublicPortalQuery.q=z+" "+this._filterPublicPortalQuery.basicQ,this._filterPublicPortalQuery.start=1,this.publicPortalItemTable.searchFilteredItems(this._filterPublicPortalQuery)):this.onlinePublicRaido.get("checked")&&(this._filterPublicOnlineQuery.q=z+" "+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(C(this.groupsSelect,"change",f.hitch(this,this._onGroupsSelectChange)));var z=c.getServerByUrl(this._getPortalUrl());c.isArcGIScom(z)&&(z="ArcGIS.com");t.userHaveSignInPortal(this._getPortalUrl())&&
this._onSignIn()},_onOrganizationSearch:function(z){if(z=z&&f.trim(z)){if(this._allOrganizationQuery){var E=this._allOrganizationQuery.q;E&&(this._filterOrganizationQuery.q=z+" "+E,this._filterOrganizationQuery.start=1,this.organizationItemTable.searchFilteredItems(this._filterOrganizationQuery))}}else this.organizationItemTable.showAllItemsSection()},_onMyContentSearch:function(z){if(z=z&&f.trim(z)){if(this._allMyContentQuery){var E=this._allMyContentQuery.q;E&&(this._filterMyContentQuery.q=z+" "+
E,this._filterMyContentQuery.start=1,this.mycontentItemTable.searchFilteredItems(this._filterMyContentQuery))}}else this.mycontentItemTable.showAllItemsSection()},_onGroupSearch:function(z){if(z=z&&f.trim(z)){if(this._allGroupQuery){var E=this._allGroupQuery.q;E&&(this._filterGroupQuery.q=z+" "+E,this._filterGroupQuery.start=1,this.groupItemTable.searchFilteredItems(this._filterGroupQuery))}}else this.groupItemTable.showAllItemsSection()},_onSignIn:function(){this._updateUIbySignIn();if(!this._signIn){this._signIn=
!0;var z=this._getPortalUrl();a.getPortal(z).getUser().then(f.hitch(this,function(E){this.domNode&&(this._resetPortalMaps(),this._searchOrganization(E),this._searchMyContent(E),this._searchGroups(E))}))}},_onSignOut:function(){this._signIn=!1;this._resetPortalMaps();this._updateUIbySignIn()},_resetPortalMaps:function(){this.organizationItemTable.clear();this.mycontentItemTable.clear();this._resetGroupsSection()},_searchOrganization:function(z){this.organizationItemTable.clear();z=" orgid:"+z.orgId+
" AND "+this._itemTypeQueryString+" AND (access:org OR access:public) "+this._typeKeywordQueryString;var E=this._getPortalUrl();this._allOrganizationQuery=this._getQuery({q:z});this._filterOrganizationQuery=this._getQuery({q:z});this.organizationItemTable.set("portalUrl",E);this.organizationItemTable.searchAllItems(this._allOrganizationQuery)},_searchMyContent:function(z){this.mycontentItemTable.clear();var E=this._getPortalUrl();z="owner:"+z.username+" AND "+this._itemTypeQueryString+" "+this._typeKeywordQueryString;
this._allMyContentQuery=this._getQuery({q:z});this._filterMyContentQuery=this._getQuery({q:z});this.mycontentItemTable.set("portalUrl",E);this.mycontentItemTable.searchAllItems(this._allMyContentQuery)},_searchGroups:function(z){this._resetGroupsSection();p.setStyle(this.groupsSection,"display","flex");z=z.getGroups();if(0<z.length){p.setStyle(this.groupSearch.domNode,"display","block");this.groupItemTable.show();p.empty(this.groupsSelect);for(var E=0;E<z.length;E++){var K=z[E];p.create("option",
{value:K.id,innerHTML:K.title},this.groupsSelect)}this._onGroupsSelectChange()}this._updateUIbyGroups(z.length)},_resetGroupsSection:function(){p.setStyle(this.groupsSection,"display","none");p.empty(this.groupsSelect);p.create("option",{value:"nodata",innerHTML:this.nls.noneGroups},this.groupsSelect);this.groupItemTable.clear();p.setStyle(this.groupSearch.domNode,"display","none");this.groupItemTable.hide();this._updateUIbyGroups(0)},_updateUIbyGroups:function(z){0===z?p.setStyle(this.groupsSection,
"top","15px"):p.setStyle(this.groupsSection,"top","50px")},_onGroupsSelectChange:function(){var z=this.groupsSelect.value;this.groupItemTable.clear();if("nodata"===z)p.setStyle(this.groupSearch,"display","none"),this.groupItemTable.hide();else{p.setStyle(this.groupSearch,"display","block");this.groupItemTable.show();var E=this._getPortalUrl();z="group:"+z+" AND "+this._itemTypeQueryString+" "+this._typeKeywordQueryString;this._allGroupQuery=this._getQuery({q:z});this._filterGroupQuery=this._getQuery({q:z});
this.groupItemTable.set("portalUrl",E);this.groupItemTable.searchAllItems(this._allGroupQuery)}},_onItemTableUpdate:function(){this.emit("update")},_onItemDomClicked:function(z){var E=p.hasClass(z,"jimu-state-active");w(".item.jimu-state-active",this.domNode).removeClass("jimu-state-active");E&&p.addClass(z,"jimu-state-active");(z=this.getSelectedItem())?this.emit("item-selected",z):this.emit("none-item-selected")},getSelectedItem:function(){var z=null,E=w(".item.jimu-state-active",this.domNode);
0<E.length&&(z=f.mixin({},E[0].item));return z}})})},"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(x,y,B,A,v,g,k,f,d,m,p,h,u,w,C,n){return x([y,B,A,g],{templateString:v,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=C.getStandardPortalUrl(this.portalUrl));
this.showAllItemsSection();this.searchAllItems()},show:function(){d.setStyle(this.domNode,"display","block")},hide:function(){d.setStyle(this.domNode,"display","none")},searchAllItems:function(q){this.showAllItemsSection();q&&(this.query=k.mixin({},q),this.query.start=1,this.clearAllItemsSection());this.portalUrl&&this.query&&0<this.query.start&&(this.allItemsShelter.show(),w.getPortal(this.portalUrl).queryItems(this.query).then(k.hitch(this,function(a){this.domNode&&(this.allItemsShelter.hide(),
this.query.start=a.nextStart,this._createItems(a,this.allItemTbody))}),k.hitch(this,function(a){console.error(a);this.domNode&&this.allItemsShelter.hide()})))},searchFilteredItems:function(q){this.showFilterItemsSection();q&&(this.filteredQuery=k.clone(q),this.filteredQuery.start=1,this.clearFilteredItemsSection());this.portalUrl&&this.filteredQuery&&0<this.filteredQuery.start&&(this.filteredItemShelter.show(),w.getPortal(this.portalUrl).queryItems(this.filteredQuery).then(k.hitch(this,function(a){this.domNode&&
(this.showFilterItemsSection(),q&&this.clearFilteredItemsSection(),this.filteredQuery.start=a.nextStart,this._createItems(a,this.filteredItemsTbody),this._filterItemCallback())}),k.hitch(this,function(a){console.error(a);this.domNode&&this._filterItemCallback()})))},_filterItemCallback:function(){this.filteredItemShelter.hide();0<this._getItemCount(this.filteredItemsTbody)?(d.setStyle(this.filteredItemsTableDiv,"display","block"),d.setStyle(this.searchNoneTipSection,"display","none")):(d.setStyle(this.filteredItemsTableDiv,
"display","none"),d.setStyle(this.searchNoneTipSection,"display","block"))},clear:function(){this.clearAllItemsSection();this.clearFilteredItemsSection()},clearAllItemsSection:function(){d.empty(this.allItemTbody)},clearFilteredItemsSection:function(){d.empty(this.filteredItemsTbody)},showAllItemsSection:function(){d.setStyle(this.allItemsSection,"display","block");d.setStyle(this.filteredItemsSection,"display","none")},showFilterItemsSection:function(){d.setStyle(this.allItemsSection,"display","none");
d.setStyle(this.filteredItemsSection,"display","block");d.setStyle(this.filteredItemsTableDiv,"display","block");d.setStyle(this.searchNoneTipSection,"display","none")},_onAllItemsSectionScroll:function(){this._isScrollToBottom(this.allItemsTableDiv)&&this.searchAllItems()},_onFilteredItemsSectionScroll:function(){this._isScrollToBottom(this.filteredItemsTableDiv)&&this.searchFilteredItems()},_isScrollToBottom:function(q){return u.isScrollToBottom(q)},_createItems:function(q,a){q=q.results;var t=
f.map(this.types,k.hitch(this,function(z){return z.toLowerCase()}));q=f.filter(q,k.hitch(this,function(z){z=z.type&&z.type.toLowerCase()||"";return 0<=f.indexOf(t,z)}));if(0!==q.length){var c=p("td.empty",a),b;if(0<c.length){var r=Math.min(q.length,c.length),D=q.splice(0,r);for(b=0;b<r;b++){var G=c[b];var I=this._createItem(D[b]);d.place(I,G);d.removeClass(G,"empty")}}if(0!==q.length){c=Math.ceil(q.length/2);for(b=0;b<c;b++)for(I=d.toDom("\x3ctr\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3c/tr\x3e"),
d.place(I,a),r=p("td",I),D=0;D<r.length;D++)G=r[D],(I=q[2*b+D])?(I=this._createItem(I),d.place(I,G)):d.addClass(G,"empty");this.emit("update")}}},_getItemCount:function(q){return p(".item",q).length},_createItem:function(q){var a=d.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');
a.item=q;var t=p(".item-thumbnail",a)[0],c=p(".item-name",a)[0],b=p(".item-type-owner",a)[0],r=p(".item-date",a)[0],D=p(".item-details",a)[0],G=p(".none-thumbnail-tip",a)[0];if(!q.thumbnailUrl){var I=this._defaultThumbnail[q.type];I&&(q.thumbnailUrl=require.toUrl("jimu")+"/images/"+I)}q.thumbnailUrl?d.setStyle(t,"backgroundImage","url("+q.thumbnailUrl+")"):G.innerHTML=this.nls.noneThumbnail;"function"===typeof this.onCreateItemContent?(r=p(".item-info",a)[0],this.onCreateItemContent(q,r)):(c.innerHTML=
q.title,c.title=c.innerHTML,b.innerHTML=q.type+" by "+q.owner,b.title=b.innerHTML,t=new Date,t.setTime(q.modified),r.innerHTML=t.toLocaleString(),r.title=r.innerHTML,D.innerHTML=this.nls.moreDetails,D.href=q.detailsPageUrl||"#");return a},_onItemsTableClicked:function(q){var a=q.target||q.srcElement;q=null;d.hasClass(a,"item-thumbnail")?q=a.parentNode:d.hasClass(a,"none-thumbnail-tip")&&(q=a.parentNode.parentNode);q&&(a=d.hasClass(q,"jimu-state-active"),p(".item.jimu-state-active",this.domNode).removeClass("jimu-state-active"),
a?d.removeClass(q,"jimu-state-active"):d.addClass(q,"jimu-state-active"),this.emit("item-dom-clicked",q))},getSelectedItem:function(){var q=null,a=p(".item.jimu-state-active",this.domNode);0<a.length&&(q=k.mixin({},a[0].item));return q}})})},"jimu/dijit/FeaturelayerServiceBrowser":function(){define(["dojo/_base/declare","./_BasicServiceBrowser","dojo/_base/lang","dojo/_base/array","jimu/serviceBrowserRuleUtils"],function(x,y,B,A,v){return x([y],{baseClass:"jimu-featurelayer-service-browser",declaredClass:"jimu.dijit.FeaturelayerServiceBrowser",
url:"",multiple:!1,types:null,isSupportQuery:!0,postMixInProperties:function(){this.inherited(arguments);this.rule=v.getFeaturelayerServiceBrowserRule(this.types,this.isSupportQuery)},getSelectedItems:function(){var g=this.inherited(arguments);return g=A.map(g,B.hitch(this,function(k){return{name:k.name,url:k.url,definition:k.definition}}))}})})},"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(x,y,B,A,v,g,k,f,d,m,p,h,u,w,C){return x([y,B,A,v],{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);k.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(n){this._def&&(this._def.isFulfilled()||this._def.cancel(),this._def=null);this._def=new d;n&&"string"===typeof n&&n.replace(/\/*$/g,"")||this._def.reject();n=n.replace(/\/*$/g,"");n=g.trim(n);var q=n.match(/^http(s?):\/\//gi);q&&0<q.length||
(n="http://"+n);if(!(0>=n.search(/\/rest\/services/i))&&(this._clear(),this._currentUrl=n))return n=this._getRootItem(),n=w.isStringEndWith(this._currentUrl,"rest/services")?this._searchBaseServiceUrl(this._currentUrl,n):this._isUrlContainsServiceType(this._currentUrl)?this._searchServiceUrl(this._currentUrl,n):this._searchFolderServiceUrl(this._currentUrl,n),this.shelter.show(),n.then(g.hitch(this,function(a){this.domNode&&this.shelter.hide();var t=this.tree.getAllLeafTreeNodeWidgets();1===t.length&&
t[0].select();this._def.resolve(a)}),g.hitch(this,function(a){this.domNode&&this.shelter.hide();this._showRequestError();this._def.reject(a)})),this._def;this._def.reject()},_getItem:function(n){return this.rule.getItem(n)},_getSubItemUrls:function(n){return this.rule.getSubItemUrls(n)},_getSubItems:function(n){var q=new d;this._getSubItemUrls(n).then(g.hitch(this,function(a){a=f.map(a,g.hitch(this,function(t){return this._getItem(t)}));m(a).then(g.hitch(this,function(t){t=f.filter(t,g.hitch(this,
function(c){return c&&"object"===typeof c}));q.resolve(t)}),g.hitch(this,function(t){q.reject(t)}))}),g.hitch(this,function(a){q.reject(a)}));return q},_selectFirstLeafTreeNodeWidget:function(){var n=this.tree.getAllLeafTreeNodeWidgets();1===n.length&&n[0].select()},isLeafItem:function(n){return 0<=this.rule.leafTypes.indexOf(n.type)},isServiceTypeSupported:function(n){return this.rule.isServiceTypeSupported(n)},_getStringEndWith:function(n,q){var a="",t=n.indexOf(q);0<=t&&(a=n.slice(0,t+q.length));
return a},_isUrlContainsServiceType:function(n){return this.rule.isUrlContainsServiceType(n)},_getBaseServiceUrl:function(){return this._getStringEndWith(this._currentUrl,"rest/services")},_getServiceName:function(n){var q="";n=n.split("/");return q=n[n.length-1]},_searchBaseServiceUrl:function(n,q){var a=new d;this._getRestInfo(n).then(g.hitch(this,function(t){if(this.domNode){var c=[];f.map(t.folders,g.hitch(this,function(b){var r={name:b,type:"folder",url:n+"/"+b,parent:q.id};this._addItem(r);
var D=new d;this._doSearchFolderServiceUrl(r.url,r.id).then(g.hitch(this,function(G){0<G.length?f.forEach(G,g.hitch(this,function(I){I.parent=r.id;this._addItem(I)})):this._removeItem(r.id);D.resolve()}),g.hitch(this,function(G){D.reject(G)}));c.push(D);return D}));f.forEach(t.services,g.hitch(this,function(b){if(this.isServiceTypeSupported(b.type)){b=n+"/"+b.name+"/"+b.type;var r=new d;this.rule.getItem(b).then(g.hitch(this,function(D){D&&(D.parent=q.id,this._addItem(D));r.resolve()}),g.hitch(this,
function(D){console.error(D);r.reject(D)}));c.push(r)}}));m(c).then(g.hitch(this,function(){this.domNode&&a.resolve()}),g.hitch(this,function(b){console.error(b);this.domNode&&a.reject(b)}))}}),g.hitch(this,function(t){console.error(t);this.domNode&&a.reject({errorCode:"NETWORK_ERROR",error:t})}));return a},_searchFolderServiceUrl:function(n,q){var a=new d;this._doSearchFolderServiceUrl(n,q).then(g.hitch(this,function(t){this.domNode&&(f.forEach(t,g.hitch(this,function(c){c.parent=q.id;this._addItem(c)})),
a.resolve())}),g.hitch(this,function(t){console.error(t);this.domNode&&a.reject({errorCode:"NETWORK_ERROR",error:t})}));return a},_doSearchFolderServiceUrl:function(n){var q=new d,a=this._getBaseServiceUrl();this._getRestInfo(n).then(g.hitch(this,function(t){t=t.services;var c=[];t&&0<t.length&&f.forEach(t,g.hitch(this,function(b){this.isServiceTypeSupported(b.type)&&(b=this.rule.getItem(a+"/"+b.name+"/"+b.type),c.push(b))}));m(c).then(g.hitch(this,function(b){b=f.filter(b,g.hitch(this,function(r){return r}));
q.resolve(b)}),g.hitch(this,function(b){console.error(b);q.reject(b)}))}),g.hitch(this,function(t){console.error(t);q.reject(t)}));return q},_searchServiceUrl:function(n,q){var a=new d;this._getSubItems(n).then(g.hitch(this,function(t){t&&0<t.length?(f.forEach(t,g.hitch(this,function(c){c.parent=q.id;this._addItem(c)})),a.resolve()):this._getItem(n).then(g.hitch(this,function(c){c&&(c.parent=q.id,this._addItem(c));a.resolve()}),g.hitch(this,function(c){a.reject(c)}))}),g.hitch(this,function(t){a.reject(t)}));
return a},_getRestInfo:function(n){var q=new d;this.rule.getRestInfo(n).then(g.hitch(this,function(a){this.domNode&&q.resolve(a)}),g.hitch(this,function(a){this.domNode&&q.reject(a)}));return q},_clear:function(){var n=this._store.query({parent:"root"});f.forEach(n,g.hitch(this,function(q){q&&"root"!==q.id&&this._store.remove(q.id)}))},_showRequestError:function(){this.emit("error",this.nls.invalidUrlTip)},_addItem:function(n){this._id++;n.id=this._id.toString();this._store.add(n);return n},_removeItem:function(n){this._store.remove(n)},
_getRootItem:function(){return{id:"root",name:"Services Root",type:"root"}},_createTree:function(){var n=this._getRootItem();n=new p({data:[n],getChildren:function(q){return this.query({parent:q.id})}});this._store=new h(n);n=new u({store:this._store,query:{id:"root"},mayHaveChildren:g.hitch(this,this._mayHaveChildren)});this.tree=new C({multiple:this.multiple,model:n,showRoot:!1,style:{width:"100%"},isLeafItem:g.hitch(this,this.isLeafItem),onOpen:g.hitch(this,function(q,a){this._onTreeOpen(q,a);
this.emit("tree-open",q,a)}),onClick:g.hitch(this,function(q,a,t){this._onTreeClick(q,a,t);this.emit("tree-click",q,a,t)}),getIconStyle:g.hitch(this,function(q,a){var t=null;if(!q)return null;var c={width:"20px",height:"20px",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundImage:""},b=window.location.protocol+"//"+window.location.host+require.toUrl("jimu"),r=this._getIconImageName(q,a);r||("folder"===q.type?r=a?"folder_open_default.png":"folder_close_default.png":this.isServiceTypeSupported(q.type)&&
(r=a?"folder_open_default.png":"folder_close_default.png"));r&&(c.backgroundImage="url("+b+"/css/images/"+r+")",t=c);return t})});k.addClass(this.tree.domNode,this._treeClass);this.tree.placeAt(this.domNode)},_getIconImageName:function(n,q){var a="";"function"===typeof this.rule.getIconImageName&&(a=this.rule.getIconImageName(n,q));return a},_mayHaveChildren:function(n){return"root"===n.type?!0:!this.isLeafItem(n)},_onTreeOpen:function(n,q){"root"===n.id||0<this._store.query({parent:n.id}).length||
n.checking||n.checked||(n.checking=!0,this._getSubItems(n.url).then(g.hitch(this,function(a){f.forEach(a,g.hitch(this,function(t){t.parent=n.id;this._addItem(t)}));n.checking=!1;n.checked=!0}),g.hitch(this,function(a){console.error(a);n.checking=!1;n.checked=!0})))},_onTreeClick:function(n,q,a){},destroy:function(){this.shelter&&(this.shelter.destroy(),this.shelter=null);this.inherited(arguments)}})})},"jimu/serviceBrowserRuleUtils":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/Deferred",
"jimu/utils","jimu/ServiceBrowserRule"],function(x,y,B,A,v){var g={combineRules:function(k){var f=new v;y.forEach(k,function(d){y.forEach(d.leafTypes,function(m){0>f.leafTypes.indexOf(m)&&f.leafTypes.push(m)});y.forEach(d.serviceTypes,function(m){0>f.serviceTypes.indexOf(m)&&f.serviceTypes.push(m)})});f.getMatchedRule=function(d){var m=null;y.some(k,function(p){return p.isUrlContainsServiceType(d)?(m=p,!0):!1});return m};f.getItem=function(d){var m=null;return m=(m=f.getMatchedRule(d))?m.getItem(d):
f.defaultGetItem(d)};f.getSubItemUrls=function(d){var m=null;return m=(m=f.getMatchedRule(d))?m.getSubItemUrls(d):f.defaultGetSubItemUrls(d)};f.getIconImageName=function(d,m){var p="";if(d.url){var h=f.getMatchedRule(d.url);h&&"function"===typeof h.getIconImageName&&(p=h.getIconImageName(d,m))}return p};return f},getFeaturelayerServiceBrowserRule:function(k,f,d){k=x.clone(k);var m=["point","polyline","polygon"];x.isArrayLike(k)&&0<k.length?(k=y.filter(k,function(p){return 0<=m.indexOf(p)}),0===k.length&&
(k=m)):k=m;return g._getFeaturelayerServiceBrowserRule(k,f,d)},_getFeaturelayerServiceBrowserRule:function(k,f,d){return new v({types:k,leafTypes:["Feature Layer","Table"],serviceTypes:["MapServer","FeatureServer"],_groupLayerType:"Group Layer",_featureLayerType:"Feature Layer",_tableType:"Table",getItem:function(m){var p=new B;this.isUrlEndWithServiceType(m,this.serviceTypes)?p=this.defaultGetItem(m):this.getRestInfo(m).then(x.hitch(this,function(h){h=this._getItemByLayerDefinition(m,h);p.resolve(h)}),
x.hitch(this,function(h){p.reject(h)}));return p},getSubItemUrls:function(m){var p=new B;return p=this.isUrlEndWithServiceType(m)?this._getSubUrlsByServiceUrl(m):this._getSubUrlsByGroupUrl(m)},getIconImageName:function(m,p){var h="";"MapServer"===m.type||"FeatureServer"===m.type?h=p?"mapserver_open.png":"mapserver_close.png":m.type===this._groupLayerType?h=p?"group_layer2.png":"group_layer1.png":m.type===this._featureLayerType?(m=A.getTypeByGeometryType(m.definition&&m.definition.geometryType),"point"===
m?h="point_layer1.png":"polyline"===m?h="line_layer1.png":"polygon"===m&&(h="polygon_layer1.png")):m.type===this._tableType?h="table.png":"root"===m.type&&this._currentUrl&&y.some(this.serviceTypes,x.hitch(this,function(u){return A.isStringEndWith(this._currentUrl,"/"+u)}))&&(h=p?"mapserver_open.png":"mapserver_close.png");return h},_getSubUrlsByServiceUrl:function(m){var p=new B;this.getRestInfo(m).then(x.hitch(this,function(h){var u=[];y.forEach(h.layers,x.hitch(this,function(w){0<=w.parentLayerId||
u.push(m+"/"+w.id)}));d&&y.forEach(h.tables,x.hitch(this,function(w){0<=w.parentLayerId||u.push(m+"/"+w.id)}));p.resolve(u)}),x.hitch(this,function(h){p.reject(h)}));return p},_getSubUrlsByGroupUrl:function(m){var p=new B;this.getRestInfo(m).then(x.hitch(this,function(h){var u=[];if(h.type===this._groupLayerType){var w=this._getServiceUrlByLayerUrl(m);u=y.map(h.subLayers||[],x.hitch(this,function(C){return w+"/"+C.id}))}p.resolve(u)}),x.hitch(this,function(h){p.reject(h)}));return p},_getItemByLayerDefinition:function(m,
p){var h=null,u=p.type;if(u===this._groupLayerType)h={name:p.name,type:u,url:m,definition:p};else if(u===this._featureLayerType||u===this._tableType){var w=!1;u===this._featureLayerType?w=this._validateEsriGeometryType(p.geometryType):u===this._tableType&&(w=!0);w&&(w=!1,(w=f?A.isFeaturelayerUrlSupportQuery(m,p.capabilities):!0)&&(h={name:p.name,type:u,url:m,definition:p}))}return h},_validateEsriGeometryType:function(m){m=A.getTypeByGeometryType(m);return 0<=this.types.indexOf(m)},_getServiceUrlByLayerUrl:function(m){for(var p=
"",h=0;h<this.serviceTypes.length;h++){var u=this.serviceTypes[h].toLowerCase(),w=m.toLowerCase().lastIndexOf("/"+u+"/");if(0<=w){p=m.slice(0,w+u.length+1);break}}return p}})},getGeocodeServiceBrowserRule:function(){return new v({leafTypes:["GeocodeServer"],serviceTypes:["GeocodeServer"]})},getGpServiceBrowserRule:function(){return new v({leafTypes:["GPTask"],serviceTypes:["GPServer"],getItem:function(k){var f=new B;this.isUrlEndWithServiceType(k)?f=this.defaultGetItem(k):this.getRestInfo(k).then(x.hitch(this,
function(d){f.resolve({name:d.displayName||d.name,type:"GPTask",url:k,definition:d})}),x.hitch(this,function(d){f.reject(d)}));return f},getSubItemUrls:function(k){var f=new B;this.isUrlEndWithServiceType(k)?this.getRestInfo(k).then(x.hitch(this,function(d){d=y.map(d.tasks||[],x.hitch(this,function(m){return k+"/"+m}));f.resolve(d)}),x.hitch(this,function(d){f.reject(d)})):f.resolve([]);return f},getIconImageName:function(k,f){f="";"GPServer"===k.type?f="toolbox.png":"GPTask"===k.type&&(f="tool.png");
return f}})},getImageServiceBrowserRule:function(k){return new v({leafTypes:["ImageServer"],serviceTypes:["ImageServer"],getItem:function(f){var d=new B;this.isUrlEndWithServiceType(f)?this.defaultGetItem(f).then(x.hitch(this,function(m){k?A.isImageServiceSupportQuery(m.definition.capabilities)?d.resolve(m):d.resolve(null):d.resolve(m)}),x.hitch(this,function(m){d.reject(m)})):d.resolve(null);return d},getIconImageName:function(f,d){d="";"ImageServer"===f.type&&(d="image_layer.png");return d}})},
getQueryableServiceBrowserRule:function(){var k=g.getFeaturelayerServiceBrowserRule(["point","polyline","polygon"],!0,!0),f=g.getImageServiceBrowserRule(!0);return g.combineRules([k,f])}};return g})},"jimu/ServiceBrowserRule":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Deferred jimu/utils esri/request esri/IdentityManager".split(" "),function(x,y,B,A,v,g,k){return x([],{leafTypes:null,serviceTypes:null,_restInfoCache:{},constructor:function(f){y.mixin(this,f);y.isArrayLike(this.leafTypes)||
(this.leafTypes=[]);y.isArrayLike(this.serviceTypes)||(this.serviceTypes=[])},getItem:function(f){return this.defaultGetItem(f)},getSubItemUrls:function(f){return this.defaultGetSubItemUrls(f)},getIconImageName:function(f,d){return""},defaultGetItem:function(f){var d=new A;f=f.replace(/\/*$/g,"");if(this.isUrlEndWithServiceType(f)){var m=f.split("/"),p=m[m.length-1],h=m[m.length-2];this.getRestInfo(f).then(y.hitch(this,function(u){d.resolve({name:h,type:p,url:f,definition:u})}),y.hitch(this,function(u){console.error(u);
d.reject({errorCode:"NETWORK_ERROR",error:u})}))}else d.resolve(null);return d},defaultGetSubItemUrls:function(f){f=new A;f.resolve([]);return f},getRestInfo:function(f){var d=new A;f=f.replace(/\/*$/g,"");var m=this._restInfoCache[f];if(m)d.resolve(m);else{m={url:f,content:{f:"json"},handleAs:"json",callbackParamName:"callback",timeout:2E4};var p=k.findCredential(f);p&&p.token&&(m.content.token=p.token);g(m).then(y.hitch(this,function(h){this._restInfoCache[f]=h;d.resolve(h)}),function(h){d.reject(h)})}return d},
isServiceTypeSupported:function(f){f=f.toLowerCase();return B.some(this.serviceTypes,y.hitch(this,function(d){return d.toLowerCase()===f}))},isUrlEndWithServiceType:function(f){return B.some(this.serviceTypes,y.hitch(this,function(d){return v.isStringEndWith(f,"/"+d)}))},isUrlContainsServiceType:function(f){f=f.toLowerCase();return B.some(this.serviceTypes,y.hitch(this,function(d){d=d.toLowerCase();return 0<=f.indexOf("/"+d)}))}})})},"jimu/dijit/_FeaturelayerServiceChooserContent":function(){define(["dojo/_base/declare",
"./_BasicServiceChooserContent","./FeaturelayerServiceBrowser"],function(x,y,B){return x([y],{baseClass:"jimu-featurelayer-service-chooser-content",_examples:["http://myserver/arcgis/rest/services","http://myserver/arcgis/rest/services/folder","http://myserver/arcgis/rest/services/myservice/MapServer","http://myserver/arcgis/rest/services/myservice/FeatureServer"],_createServiceBrowser:function(A){return new B(A)}})})},"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(x,y,B,A,v,g,k,f,d,m,p,h,u,w,C){return x([y,B,A,g],{templateString:v,_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=m.mixin({},window.jimuNls.common);this.nls=m.mixin(this.nls,window.jimuNls.basicServiceChooser)},postCreate:function(){this.inherited(arguments);
f.addClass(this.domNode,"jimu-basic-service-chooser-content");this.multiple=!!this.multiple;this._initSelf();this.exampleTd.innerHTML=this.exampleTd.innerHTML},setUrl:function(n){var q=new k;(this.url=n)&&"string"===typeof this.url?(this.urlInput.set("value",this.url),q=this._onBtnValidateClick()):q.reject();return q},focusInput:function(){this.urlInput.focus()},_initSelf:function(){this._examples&&0<this._examples.length?d.forEach(this._examples,m.hitch(this,function(q){f.create("div",{innerHTML:q,
"class":"example-url"},this.exampleTd)})):f.setStyle(this.exampleTr,"display","none");var n={multiple:this.multiple,_onTreeClick:m.hitch(this,this._onTreeClick)};this.serviceBrowser=this._createServiceBrowser(n);this.serviceBrowser.placeAt(this.serviceBrowserContainer);this.serviceBrowser.startup();this.own(h.after(this.urlInput,"validator",m.hitch(this,this._afterUrlValidate)));this.url&&"string"===typeof this.url&&this.urlInput.set("value",this.url);this.own(p(this.serviceBrowser,"error",m.hitch(this,
this._onServiceBrowserError)))},_createServiceBrowser:function(n){},_validateUrl:function(n){n=n.replace(/\/*$/g,"");if((n=n.match(/\/rest\/services\/*(.*)/gi))&&0<n.length)if(n=n[0].replace(/\/rest\/services\/*/,"")){var q=n.split("/");if(1===q.length)return!0;if(2===q.length)return this.serviceBrowser.isServiceTypeSupported(q[1]);if(3<=q.length)return n=this.serviceBrowser.isServiceTypeSupported(q[1]),q=this.serviceBrowser.isServiceTypeSupported(q[2]),n||q}else return!0;else return!1},_afterUrlValidate:function(n){n&&
(n=this.urlInput.get("value"),n=this._validateUrl(n));n?f.removeClass(this.btnValidate,"jimu-state-disabled"):f.addClass(this.btnValidate,"jimu-state-disabled");return n},_onServiceBrowserError:function(n){this._showErrorMessage(n)},_showErrorMessage:function(n){n&&"string"===typeof n?(this.errorNode.innerHTML=n,f.addClass(this.errorSection,"visible")):f.removeClass(this.errorSection,"visible")},_clearErrorMessage:function(){this.errorNode.innerHTML="";f.removeClass(this.errorSection,"visible")},
_onBtnValidateClick:function(){this._clearErrorMessage();var n=new k;if(this.urlInput.validate()){var q=this.urlInput.get("value");this.serviceBrowser.setUrl(q).then(m.hitch(this,function(){this.domNode&&this._checkSelectedItemsNumber();n.resolve()}),m.hitch(this,function(){this.domNode&&this._checkSelectedItemsNumber();n.reject()}));this.emit("validate-click")}else n.reject();return n},_checkSelectedItemsNumber:function(){0<this.getSelectedItems().length?f.removeClass(this.btnOk,"jimu-state-disabled"):
f.addClass(this.btnOk,"jimu-state-disabled")},_onTreeClick:function(){this._checkSelectedItemsNumber()},_onBtnOkClick:function(){var n=this.getSelectedItems();0<n.length&&this.emit("ok",n)},_onBtnCancelClick:function(){this.emit("cancel")}})})},"dojo/NodeList-data":function(){define(["./_base/kernel","./query","./_base/lang","./_base/array","./dom-attr"],function(x,y,B,A,v){var g=y.NodeList,k={},f=0,d=function(h){var u=v.get(h,"data-dojo-dataid");u||(u="pid"+f++,v.set(h,"data-dojo-dataid",u));return u},
m=x._nodeData=function(h,u,w){var C=d(h),n;k[C]||(k[C]={});if(1==arguments.length)return k[C];"string"==typeof u?2<arguments.length?k[C][u]=w:n=k[C][u]:n=B.mixin(k[C],u);return n},p=x._removeNodeData=function(h,u){h=d(h);k[h]&&(u?delete k[h][u]:delete k[h])};g._gcNodeData=x._gcNodeData=function(){var h=y("[data-dojo-dataid]").map(d),u;for(u in k)0>A.indexOf(h,u)&&delete k[u]};B.extend(g,{data:g._adaptWithCondition(m,function(h){return 0===h.length||1==h.length&&"string"==typeof h[0]}),removeData:g._adaptAsForEach(p)});
return g})},"widgets/Search/setting/LocatorSourceSetting":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/on dojo/Evented dojo/Deferred dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin jimu/portalUrlUtils jimu/dijit/Message jimu/dijit/_GeocodeServiceChooserContent jimu/dijit/Popup jimu/dijit/LoadingShelter esri/request esri/lang ../utils jimu/utils dojo/text!./LocatorSourceSetting.html jimu/dijit/CheckBox dijit/form/ValidationTextBox dijit/form/RadioButton dijit/form/NumberTextBox".split(" "),
function(x,y,B,A,v,g,k,f,d,m,p,h,u,w,C,n,q,a,t,c){return x([k,f,d,v],{baseClass:"jimu-widget-search-locator-source-setting",tr:null,nls:null,config:null,singleLineFieldName:null,templateString:t,_suggestible:!1,_locatorDefinition:null,_esriLocatorRegExp:/http(s)?:\/\/geocode(.){0,3}\.arcgis.com\/arcgis\/rest\/services\/World\/GeocodeServer/g,serviceChooserContent:null,geocoderPopup:null,_clickSet:!1,_defaultZoomScale:null,postCreate:function(){this.inherited(arguments);this.zoomScale.set("placeHolder",
window.jimuNls.common.defaults);this.exampleHint=this.nls.locatorExample+": http://\x26lt;myServerName\x26gt;/arcgis/rest/services/World/GeocodeServer";this.searchInCurrentMapExtent=new c({checked:!1,label:this.nls.searchInCurrentMapExtent},this.searchInCurrentMapExtent);this.enableLocalSearch=new c({checked:!1,label:this.nls.enableLocalSearch},this.enableLocalSearch);this._processlocalSearchTable(!1);this.own(A(this.enableLocalSearch,"change",y.hitch(this,function(){this._processlocalSearchTable(this.enableLocalSearch.getValue())})));
B.setStyle(this.enableLocalSearch.domNode,"display","none");this._setMessageNodeContent(this.exampleHint);this.own(A(this.panToRadio,"click",y.hitch(this,this._onRadioClicke)));this.own(A(this.zoomToRadio,"click",y.hitch(this,this._onRadioClicke)));this.config=this.config?this.config:{};this.setConfig(this.config)},setRelatedTr:function(b){this.tr=b},getRelatedTr:function(){return this.tr},setDefinition:function(b){this._locatorDefinition=b||{}},getDefinition:function(){return this._locatorDefinition},
setConfig:function(b){if("[object Object]"===Object.prototype.toString.call(b)){var r=b.url;r?(this.config=b,this.shelter.show(),this._locatorDefinition.url!==r?this._getDefinitionFromRemote(r).then(y.hitch(this,function(D){r&&D&&"error"!==D.type?(this._locatorDefinition=D,this._locatorDefinition.url=r,this._setSourceItems(),this._setMessageNodeContent(this.exampleHint)):r&&D&&"error"===D.type&&(this._setSourceItems(),this._disableSourceItems(),this._setMessageNodeContent(n.substitute({URL:D.url},
y.clone(this.nls.invalidUrlTip)),!0));this.shelter.hide()})):(this._setSourceItems(),this._setMessageNodeContent(this.exampleHint),this.shelter.hide())):this.zoomToRadio.set("checked",!0)}},isValidConfig:function(){var b=this.getConfig();return b.url&&b.name&&b.singleLineFieldName?!0:!1},showValidationTip:function(){this._showValidationErrorTip(this.locatorUrl);this._showValidationErrorTip(this.locatorName)},getConfig:function(){return{url:this.locatorUrl.get("value"),name:a.stripHTML(this.locatorName.get("value")),
singleLineFieldName:this.singleLineFieldName,placeholder:a.stripHTML(this.placeholder.get("value")),countryCode:a.stripHTML(this.countryCode.get("value")),panToScale:this.panToRadio.get("checked")?!0:!1,zoomScale:this.zoomScale.get("value")||this._defaultZoomScale,maxSuggestions:this.maxSuggestions.get("value"),maxResults:this.maxResults.get("value")||6,searchInCurrentMapExtent:this.searchInCurrentMapExtent.checked,enableLocalSearch:this.enableLocalSearch.getValue(),localSearchMinScale:this.localSearchMinScale.get("value"),
localSearchDistance:this.localSearchDistance.get("value"),radiusUnit:this.radiusUnit.get("value"),type:"locator"}},_onLocatorNameBlur:function(){this.locatorName.set("value",a.stripHTML(this.locatorName.get("value")))},_onPlaceholderBlur:function(){this.placeholder.set("value",a.stripHTML(this.placeholder.get("value")))},_onCountryCodeBlur:function(){this.countryCode.set("value",a.stripHTML(this.countryCode.get("value")))},_disableSourceItems:function(){this.locatorName.set("disabled",!0);this.placeholder.set("disabled",
!0);this.countryCode.set("disabled",!0);this.maxSuggestions.set("disabled",!0);this.maxResults.set("disabled",!0);this.zoomScale.set("disabled",!0)},_enableSourceItems:function(){this.locatorName.set("disabled",!1);this.placeholder.set("disabled",!1);this.countryCode.set("disabled",!1);this.maxSuggestions.set("disabled",!1);this.maxResults.set("disabled",!1);this._controlZoomScaleTextBox()},_setSourceItems:function(){var b=this.config;b.url&&(this.locatorUrl.set("value",b.url),this._processCountryCodeRow(b.url));
b.name&&this.locatorName.set("value",a.stripHTML(b.name));b.singleLineFieldName&&(this.singleLineFieldName=b.singleLineFieldName);b.placeholder&&this.placeholder.set("value",a.stripHTML(b.placeholder));b.countryCode&&this.countryCode.set("value",a.stripHTML(b.countryCode));this._processLocalSearchRadiusUnit();"capabilities"in this._locatorDefinition?(B.setStyle(this.enableLocalSearch.domNode,"display",""),this._processlocalSearchTable(b.enableLocalSearch),this.enableLocalSearch.setValue(b.enableLocalSearch),
b.localSearchMinScale&&b.enableLocalSearch&&this.localSearchMinScale.set("value",b.localSearchMinScale),b.localSearchDistance&&b.enableLocalSearch&&this.localSearchDistance.set("value",b.localSearchDistance),this.radiusUnit.set("value",b.radiusUnit||"meter")):(this.enableLocalSearch.setValue(!1),B.setStyle(this.enableLocalSearch.domNode,"display","none"));(this._suggestible=this._locatorDefinition&&this._locatorDefinition.capabilities&&-1<this._locatorDefinition.capabilities.indexOf("Suggest"))?this._hideSuggestibleTips():
this._showSuggestibleTips();this.searchInCurrentMapExtent.setValue(!!b.searchInCurrentMapExtent);this.zoomToRadio.set("checked",!1);this.config.panToScale?this.panToRadio.set("checked",!0):this.zoomToRadio.set("checked",!0);this.zoomScale.set("value",b.zoomScale||this._defaultZoomScale);this.maxSuggestions.set("value",b.maxSuggestions);this.maxResults.set("value",b.maxResults||6);this._enableSourceItems()},_isEsriLocator:function(b){this._esriLocatorRegExp.lastIndex=0;return this._esriLocatorRegExp.test(b)},
_getDefinitionFromRemote:function(b){var r=new g;if(this._isEsriLocator(b))r.resolve({singleLineAddressField:{name:"SingleLine",type:"esriFieldTypeString",alias:"Single Line Input",required:!1,length:200,localizedNames:{},recognizedNames:{}},capabilities:"Geocode,ReverseGeocode,Suggest"});else{var D=C({url:b,content:{f:"json"},handleAs:"json",callbackParamName:"callback"});this.own(D);D.then(y.hitch(this,function(G){r.resolve(G)}),y.hitch(this,function(G){console.error(G);r.resolve({type:"error",
url:this._getRequestUrl(b)})}))}return r.promise},_setMessageNodeContent:function(b,r){B.empty(this.messageNode);b.nodeType||(b=B.toDom(b));B.place(b,this.messageNode);r?B.addClass(this.messageNode,"error-message"):B.removeClass(this.messageNode,"error-message")},_getRequestUrl:function(b){var r=window.location.protocol;return"http:"===r?m.setHttpProtocol(b):"https:"===r?m.setHttpsProtocol(b):b},_onSetLocatorUrlClick:function(){this._clickSet=!0;this._openServiceChooser()},_openLocatorChooser:function(){this._clickSet=
!1;this._openServiceChooser()},_openServiceChooser:function(){this.serviceChooserContent=new h({url:this.locatorUrl.get("value")||""});this.shelter=new w({hidden:!0});this.geocoderPopup=new u({titleLabel:this.nls.setGeocoderURL,autoHeight:!0,content:this.serviceChooserContent.domNode,container:window.jimuConfig.layoutId,width:640});this.shelter.placeAt(this.geocoderPopup.domNode);B.setStyle(this.serviceChooserContent.domNode,"width","580px");B.addClass(this.serviceChooserContent.domNode,"override-geocode-service-chooser-content");
this.serviceChooserContent.own(A(this.serviceChooserContent,"validate-click",y.hitch(this,function(){B.removeClass(this.serviceChooserContent.domNode,"override-geocode-service-chooser-content")})));this.serviceChooserContent.own(A(this.serviceChooserContent,"ok",y.hitch(this,"_onSelectLocatorUrlOk")));this.serviceChooserContent.own(A(this.serviceChooserContent,"cancel",y.hitch(this,"_onSelectLocatorUrlCancel")))},_onSelectLocatorUrlOk:function(b){b&&b[0]&&b[0].url&&this.domNode&&(this.shelter.show(),
C({url:b[0].url,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}).then(y.hitch(this,function(r){this.shelter.hide();r&&r.singleLineAddressField&&r.singleLineAddressField.name?(this._enableSourceItems(),this.locatorUrl.set("value",b[0].url),this.locatorName.get("value")||this.locatorName.set("value",q.getGeocoderName(b[0].url)),"capabilities"in r?(B.setStyle(this.enableLocalSearch.domNode,"display",""),this._isEsriLocator(b[0].url)?this.enableLocalSearch.setValue(!0):this.enableLocalSearch.setValue(!1)):
(this.enableLocalSearch.setValue(!1),B.setStyle(this.enableLocalSearch.domNode,"display","none")),this.singleLineFieldName=r.singleLineAddressField.name,this._processCountryCodeRow(b[0].url),this._locatorDefinition=r,this._locatorDefinition.url=b[0].url,(this._suggestible=r.capabilities&&-1<this._locatorDefinition.capabilities.indexOf("Suggest"))?this._hideSuggestibleTips():this._showSuggestibleTips(),this._clickSet?this.emit("reselect-locator-url-ok",this.getConfig()):this.emit("select-locator-url-ok",
this.getConfig()),this.geocoderPopup&&(this.geocoderPopup.close(),this.geocoderPopup=null),this._setMessageNodeContent(this.exampleHint)):new p({message:this.nls.locatorWarning})}),y.hitch(this,function(r){console.error(r);this.shelter.hide();new p({message:n.substitute({URL:this._getRequestUrl(b[0].url)},y.clone(this.nls.invalidUrlTip))})})))},_onSelectLocatorUrlCancel:function(){this.geocoderPopup&&(this.geocoderPopup.close(),this.geocoderPopup=null,this.emit("select-locator-url-cancel"))},_processLocalSearchRadiusUnit:function(){this.radiusUnit.set("options",
[{label:window.jimuNls.units.meters,value:"meter"},{label:window.jimuNls.units.kilometers,value:"kilometer"},{label:window.jimuNls.units.nauticalMiles,value:"nauticalMile"},{label:window.jimuNls.units.miles,value:"mile"},{label:window.jimuNls.units.yards,value:"yard"},{label:window.jimuNls.units.feet,value:"foot"}])},_processlocalSearchTable:function(b){b?(B.removeClass(this.minScaleNode,"hide-local-search-table"),B.removeClass(this.radiusNode,"hide-local-search-table"),b=B.getMarginBox(this.radiusHintNode),
B.setStyle(this.radiusHintNode.parentNode,"paddingBottom",(45<b.h?b.h+10:45)+"px")):(B.addClass(this.minScaleNode,"hide-local-search-table"),B.addClass(this.radiusNode,"hide-local-search-table"))},_processCountryCodeRow:function(b){this._isEsriLocator(b)?(this.countryCode.set("value",""),B.removeClass(this.countryCodeRow,"hide-country-code-row")):B.addClass(this.countryCodeRow,"hide-country-code-row")},_showSuggestibleTips:function(){B.addClass(this.tipsNode,"source-tips-show");B.setStyle(this.maxSuggestions.domNode,
"display","none")},_hideSuggestibleTips:function(){B.removeClass(this.tipsNode,"source-tips-show");B.setStyle(this.maxSuggestions.domNode,"display","block")},_showValidationErrorTip:function(b){if(!b.validate()&&b.domNode&&b.focusNode){var r=b.get("disabled");r&&b.set("disabled",!1);b.focusNode.focus();setTimeout(y.hitch(this,function(){b.focusNode.blur();r&&b.set("disabled",!0);b=null}),100)}},_controlZoomScaleTextBox:function(){this.panToRadio.get("checked")?this.zoomScale.set("disabled",!0):this.zoomToRadio.get("checked")&&
this.zoomScale.set("disabled",!1)},_onRadioClicke:function(){this._controlZoomScaleTextBox()}})})},"jimu/dijit/_GeocodeServiceChooserContent":function(){define(["dojo/_base/declare","./_BasicServiceChooserContent","./GeocodeServiceBrowser"],function(x,y,B){return x([y],{baseClass:"jimu-geocode-service-chooser-content",_examples:["http://myserver/arcgis/rest/services","http://myserver/arcgis/rest/services/folder","http://myserver/arcgis/rest/services/myservice/GeocodeServer"],_createServiceBrowser:function(A){return new B(A)}})})},
"jimu/dijit/GeocodeServiceBrowser":function(){define(["dojo/_base/declare","./_BasicServiceBrowser","dojo/_base/lang","dojo/_base/array","jimu/serviceBrowserRuleUtils"],function(x,y,B,A,v){return x([y],{baseClass:"jimu-geocode-service-browser",declaredClass:"jimu.dijit.GeocodeServiceBrowser",url:"",multiple:!1,postMixInProperties:function(){this.inherited(arguments);this.rule=v.getGeocodeServiceBrowserRule()},getSelectedItems:function(){var g=this.inherited(arguments);return g=A.map(g,B.hitch(this,
function(k){return{name:k.name,url:k.url}}))}})})},"widgets/Search/setting/_build-generate_module":function(){define(["dojo/text!./Setting.html","dojo/text!./css/style.css","dojo/i18n!./nls/strings"],function(){})},"url:widgets/Search/setting/QuerySourceSetting.html":'\x3cdiv\x3e\r\n  \x3cdiv class\x3d"source-url-section"\x3e\r\n    \x3ctable class\x3d"source-table"\x3e\r\n      \x3ctbody\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"first"\x3e\r\n            \x3cspan class\x3d"source-label"\x3e${nls.layerSource}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"sourceUrl" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-props\x3d"required:true,trim:true,disabled:true,style:{width:\'100%\'}"\x3e\x3c/div\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd class\x3d"third"\x3e\r\n            \x3cspan title\x3d"${nls.set}" class\x3d"jimu-btn" data-dojo-attach-event\x3d"click:_onSetSourceClick"\x3e${nls.set}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n        \x3ctr data-dojo-attach-point\x3d"messageTr"\x3e\r\n          \x3ctd class\x3d"first"\x3e\x3c/td\x3e\r\n          \x3ctd class\x3d"second" colspan\x3d"2"\x3e\r\n            \x3cspan data-dojo-attach-point\x3d"messageNode" class\x3d"tip error-message"\x3e\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/div\x3e\r\n  \x3cdiv class\x3d"source-details-section"\x3e\r\n    \x3ctable class\x3d"source-table"\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd class\x3d"first"\x3e\r\n          \x3cspan class\x3d"source-label"\x3e${nls.name}\x3c/span\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd class\x3d"second"\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"sourceName" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-attach-event\x3d"Blur:_onSourceNameBlur" data-dojo-props\x3d"trim:true,required:true,style:{width:\'100%\'}"\x3e\x3c/div\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd class\x3d"first"\x3e\r\n          \x3cspan class\x3d"source-label"\x3e${nls.placeholder}\x3c/span\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd class\x3d"second"\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"placeholder" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-attach-event\x3d"Blur:_onPlaceholderBlur" data-dojo-props\x3d"trim:true,style:{width:\'100%\'}"\x3e\x3c/div\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd class\x3d"first"\x3e\r\n          \x3cspan class\x3d"source-label"\x3e${nls.searchFields}\x3c/span\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd class\x3d"second"\x3e\r\n          \x3cdiv class\x3d"search-fields"\x3e\r\n            \x3c!-- \x3cspan class\x3d"fields jimu-float-leading" data-dojo-attach-point\x3d"fieldsNode"\x3e\x3c/span\x3e --\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"searchFields" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-props\x3d"required:true,trim:true,disabled:true,style:{width:\'95%\'}"\x3e\x3c/div\x3e\r\n            \x3cdiv class\x3d"search-fields-selector jimu-float-trailing" data-dojo-attach-point\x3d"fieldsSelectorNode" data-dojo-attach-event\x3d"click:_onFieldsSelectorClick"\x3e\x3c/div\x3e\r\n          \x3c/div\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd class\x3d"first"\x3e\r\n          \x3cspan class\x3d"source-label"\x3e${nls.displayField}\x3c/span\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd class\x3d"second"\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"displayField" data-dojo-type\x3d"dijit/form/Select" data-dojo-props\x3d\'style:{width:"100%"}\'\x3e\x3c/div\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd class\x3d"first"\x3e\r\n          \x3cspan class\x3d"source-label"\x3e${nls.maxSuggestions}\x3c/span\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd class\x3d"second"\x3e\r\n          \x3cdiv class\x3d"source-tips" title\x3d"${nls.searchLayerTips}" data-dojo-attach-point\x3d"tipsNode"\x3e\r\n            \x3cem\x3e${nls.searchLayerTips}\x3c/em\x3e\r\n          \x3c/div\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"maxSuggestions" data-dojo-type\x3d"dijit/form/NumberTextBox" data-dojo-props\x3d"constraints:{min:0,places:0},style:{width:\'100%\'},value:6"\x3e\x3c/div\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd class\x3d"first"\x3e\r\n          \x3cspan class\x3d"source-label"\x3e${nls.maxResults}\x3c/span\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd class\x3d"second"\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"maxResults" data-dojo-type\x3d"dijit/form/NumberTextBox" data-dojo-props\x3d"constraints:{min:1,places:0},style:{width:\'100%\'},value:6"\x3e\x3c/div\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n      \x3ctr data-dojo-attach-point\x3d"zoomScaleTr"\x3e\r\n        \x3ctd class\x3d"first"\x3e\r\n          \x3cspan class\x3d"source-label"\x3e${nls.locateResults}\x3c/span\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd class\x3d"second"\x3e\r\n          \x3ctable class\x3d""\x3e\r\n            \x3ctbody\x3e\r\n              \x3ctr\x3e\r\n                \x3ctd class\x3d"second-sub-td" style\x3d"width:30%;"\x3e\r\n                  \x3cinput data-dojo-attach-point\x3d"panToRadio" data-dojo-type\x3d"dijit/form/RadioButton" name\x3d"locateResults" type\x3d"radio" class\x3d"jimu-radio-btn"/\x3e\r\n                  \x3clabel\x3e${nls.panTo}\x3clabel\x3e\r\n                \x3c/td\x3e\r\n                \x3ctd class\x3d"second-sub-td" style\x3d"width:30%;"\x3e\r\n                  \x3cinput data-dojo-attach-point\x3d"zoomToRadio" data-dojo-type\x3d"dijit/form/RadioButton" name\x3d"locateResults" type\x3d"radio" class\x3d"jimu-radio-btn"/\x3e\r\n                  \x3clabel\x3e${nls.zoomToScale}\x3c/label\x3e\r\n                \x3c/td\x3e\r\n                \x3ctd class\x3d"second-sub-td" style\x3d"width:40%;"\x3e\r\n                  \x3cspan class\x3d"jimu-float-leading" style\x3d"line-height:30px;"\x3e1: \x3c/span\x3e\r\n                  \x3cdiv class\x3d"jimu-float-trailing" data-dojo-attach-point\x3d"zoomScale" data-dojo-type\x3d"dijit/form/NumberTextBox" data-dojo-props\x3d"constraints:{min:1},style:{width:\'85%\'}"\x3e\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/table\x3e\r\n    \x3ctable class\x3d"source-table"\x3e\r\n      \x3ctbody\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"first"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"exactMatch"\x3e\x3c/div\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"first"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"searchInCurrentMapExtent"\x3e\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  \x3cdiv data-dojo-attach-point\x3d"shelter" data-dojo-type\x3d"jimu/dijit/LoadingShelter" data-dojo-props\x3d"hidden:true"\x3e\x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:jimu/dijit/templates/FeaturelayerSource.html":'\x3cdiv\x3e\r\n\t\x3ctable class\x3d"radio-table" cellpadding\x3d"0" cellspacing\x3d"0"\x3e\r\n\t\t\x3ctbody\x3e\r\n\t\t\t\x3ctr\x3e\r\n\t\t\t\t\x3ctd class\x3d"map-td" nowrap data-dojo-attach-point\x3d"mapTd"\x3e\r\n\t\t\t\t\t\x3clabel data-dojo-attach-point\x3d"mapLabel"\x3e${nls.selectFromMap}\x3c/label\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3ctd class\x3d"portal-td" nowrap data-dojo-attach-point\x3d"portalTd"\x3e\r\n\t\t\t\t\t\x3clabel data-dojo-attach-point\x3d"portalLabel"\x3e${nls.selectFromPortal}\x3c/label\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3ctd class\x3d"url-td" nowrap data-dojo-attach-point\x3d"urlTd"\x3e\r\n\t\t\t\t\t\x3clabel data-dojo-attach-point\x3d"urlLabel"\x3e${nls.addServiceUrl}\x3c/label\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\t\x3cdiv class\x3d"source-content"\x3e\r\n\t\t\x3cdiv data-dojo-attach-point\x3d"operationTip" class\x3d"operation-tip"\x3e\x3c/div\x3e\r\n\t\t\x3cdiv data-dojo-attach-point\x3d"flcContainer" class\x3d"dijit-container map-dijit-container" style\x3d"display:none;"\x3e\x3c/div\x3e\r\n\t\t\x3cdiv data-dojo-attach-point\x3d"hflcContainer" class\x3d"dijit-container portal-dijit-container" style\x3d"display:none;"\x3e\x3c/div\x3e\r\n\t\t\x3cdiv data-dojo-attach-point\x3d"flscContainer" class\x3d"dijit-container url-dijit-container" style\x3d"display:none;"\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/FeaturelayerChooserFromPortal.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"service-browser-container" data-dojo-attach-point\x3d"serviceBrowserContainer"\x3e\x3c/div\x3e\r\n\t\x3cdiv class\x3d"footer"\x3e\r\n\t\t\x3cdiv class\x3d"jimu-btn jimu-float-trailing cancel jimu-btn-vacation" 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/_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/Search/setting/LocatorSourceSetting.html":'\x3cdiv\x3e\r\n  \x3cdiv class\x3d"source-url-section"\x3e\r\n    \x3ctable class\x3d"source-table" cellspacing\x3d"0"\x3e\r\n      \x3ctbody\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"first"\x3e\r\n            \x3cspan class\x3d"source-label"\x3e${nls.locatorUrl}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"locatorUrl" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-props\x3d"required:true,trim:true,disabled:true,style:{width:\'100%\'}"\x3e\x3c/div\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd class\x3d"third"\x3e\r\n            \x3cspan title\x3d"${nls.set}" class\x3d"jimu-btn" data-dojo-attach-event\x3d"click:_onSetLocatorUrlClick"\x3e${nls.set}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"first"\x3e\x3c/td\x3e\r\n          \x3ctd class\x3d"second" colspan\x3d"2"\x3e\r\n            \x3cspan data-dojo-attach-point\x3d"messageNode" class\x3d"tip"\x3e\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/div\x3e\r\n  \x3cdiv class\x3d"source-details-section" data-dojo-attach-point\x3d"detailsSection"\x3e\r\n    \x3ctable class\x3d"source-table" cellspacing\x3d"0"\x3e\r\n      \x3ctbody\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"first"\x3e${nls.locatorName}\x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-attach-point\x3d"locatorName" data-dojo-attach-event\x3d"Blur: _onLocatorNameBlur"\r\n            placeHolder\x3d"${nls.locatorName}"\r\n            required\x3d"true" data-dojo-props\x3d\'style:{width:"100%"}\'/\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"first"\x3e${nls.placeholder}\x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/TextBox" data-dojo-attach-point\x3d"placeholder"\r\n            data-dojo-attach-event\x3d"Blur: _onPlaceholderBlur"\r\n            placeHolder\x3d"${nls.placeholder}" data-dojo-props\x3d\'style:{width:"100%"}\'/\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n        \x3ctr class\x3d"hide-country-code-row country-code-row" data-dojo-attach-point\x3d"countryCodeRow"\x3e\r\n          \x3ctd class\x3d"first"\x3e${nls.countryCode}\x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/TextBox" data-dojo-attach-point\x3d"countryCode"\r\n            data-dojo-attach-event\x3d"Blur:_onCountryCodeBlur"\r\n            placeHolder\x3d"${nls.countryCodeEg} USA,CHN" data-dojo-props\x3d\'style:{width:"96%"}\'/\x3e\r\n            \x3ca class\x3d"jimu-float-trailing" target\x3d"_blank" href\x3d"https://developers.arcgis.com/rest/geocode/api-reference/geocode-coverage.htm" style\x3d"line-height:30px;"\x3e\r\n              \x3ci class\x3d"esri-icon-question"\x3e\x3c/i\x3e\r\n            \x3c/a\x3e\r\n            \x3cspan class\x3d"example"\x3e${nls.countryCodeHint}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"first"\x3e\r\n            \x3cspan class\x3d"source-label"\x3e${nls.maxSuggestions}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3cdiv class\x3d"source-tips" title\x3d"${nls.locatorTips}" data-dojo-attach-point\x3d"tipsNode"\x3e\r\n              ${nls.locatorTips}\r\n            \x3c/div\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"maxSuggestions" data-dojo-type\x3d"dijit/form/NumberTextBox" data-dojo-props\x3d"constraints:{min:0,places:0},style:{width:\'100%\'},value:6"\x3e\x3c/div\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"first"\x3e\r\n            \x3cspan class\x3d"source-label"\x3e${nls.maxResults}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"maxResults" data-dojo-type\x3d"dijit/form/NumberTextBox" data-dojo-props\x3d"constraints:{min:1,places:0},style:{width:\'100%\'},value:6"\x3e\x3c/div\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"first"\x3e\r\n            \x3cspan class\x3d"source-label"\x3e${nls.locateResults}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3ctable class\x3d""\x3e\r\n              \x3ctbody\x3e\r\n                \x3ctr\x3e\r\n                  \x3ctd class\x3d"second-sub-td" style\x3d"width:30%;"\x3e\r\n                    \x3cinput data-dojo-attach-point\x3d"panToRadio" data-dojo-type\x3d"dijit/form/RadioButton" name\x3d"locateResults" type\x3d"radio" class\x3d"jimu-radio-btn"/\x3e\r\n                    \x3clabel data-dojo-attach-point\x3d"PanToLabel" for\x3d"pan-to-radio"\x3e${nls.panTo}\x3c/label\x3e\r\n                  \x3c/td\x3e\r\n                  \x3ctd class\x3d"second-sub-td" style\x3d"width:30%;"\x3e\r\n                    \x3cinput data-dojo-attach-point\x3d"zoomToRadio" data-dojo-type\x3d"dijit/form/RadioButton" name\x3d"locateResults" type\x3d"radio" class\x3d"jimu-radio-btn"/\x3e\r\n                    \x3clabel data-dojo-attach-point\x3d"PanToLabel" for\x3d"zoom-to-radio"\x3e${nls.zoomToScale}\x3c/label\x3e\r\n                  \x3c/td\x3e\r\n                  \x3ctd class\x3d"second-sub-td" style\x3d"width:40%;"\x3e\r\n                    \x3cspan class\x3d"jimu-float-leading" style\x3d"line-height:30px;"\x3e1: \x3c/span\x3e\r\n                    \x3cdiv class\x3d"jimu-float-trailing" data-dojo-attach-point\x3d"zoomScale" data-dojo-type\x3d"dijit/form/NumberTextBox" data-dojo-props\x3d"constraints:{min:1},style:{width:\'85%\'}"\x3e\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        \x3ctr\x3e\r\n          \x3ctd class\x3d"first" colspan\x3d"2"\x3e\r\n            \x3cspan class\x3d"source-label" data-dojo-attach-point\x3d"enableLocalSearch"\x3e\x3c/span\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n        \x3ctr data-dojo-attach-point\x3d"minScaleNode" class\x3d"local-search-row"\x3e\r\n          \x3ctd class\x3d"first"\x3e\r\n            \x3cspan class\x3d"source-label"\x3e${nls.minScale}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3cspan class\x3d"jimu-float-leading" style\x3d"line-height:30px;"\x3e1: \x3c/span\x3e\r\n            \x3cdiv class\x3d"jimu-float-trailing" data-dojo-attach-point\x3d"localSearchMinScale" data-dojo-type\x3d"dijit/form/NumberTextBox" data-dojo-props\x3d"constraints:{min:1},style:{width:\'96%\'},value:300000"\x3e\x3c/div\x3e\r\n            \x3cspan class\x3d"example" title\x3d"${nls.minScaleHint}"\x3e${nls.minScaleHint}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n        \x3ctr data-dojo-attach-point\x3d"radiusNode" class\x3d"local-search-row"\x3e\r\n          \x3ctd class\x3d"first"\x3e\r\n            \x3cspan class\x3d"source-label"\x3e${nls.radius}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3cdiv class\x3d"jimu-float-leading" style\x3d"width:100%;"\x3e\r\n              \x3cdiv class\x3d"jimu-float-leading" data-dojo-attach-point\x3d"localSearchDistance" data-dojo-type\x3d"dijit/form/NumberTextBox" data-dojo-props\x3d"constraints:{min:1},style:{width:\'60%\', \'margin-right\':\'10px\'},value:50000"\x3e\x3c/div\x3e\r\n              \x3cdiv class\x3d"jimu-float-trailing" data-dojo-attach-point\x3d"radiusUnit" data-dojo-type\x3d"dijit/form/Select" data-dojo-props\x3d\'style:{width:"100px", height:"30px", float:"left"}\'\x3e\x3c/div\x3e\r\n              \x3c!--span class\x3d"jimu-float-trailing" style\x3d"line-height:30px;"\x3e${nls.meters}\x3c/span--\x3e\r\n            \x3c/div\x3e\r\n            \x3cspan class\x3d"example" data-dojo-attach-point\x3d"radiusHintNode" title\x3d"${nls.radiusHint}"\x3e${nls.radiusHint}\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    \x3ctable class\x3d"source-table" cellspacing\x3d"0"\x3e\r\n      \x3ctbody\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"first"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"searchInCurrentMapExtent"\x3e\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  \x3cdiv data-dojo-attach-point\x3d"shelter" data-dojo-type\x3d"jimu/dijit/LoadingShelter" data-dojo-props\x3d"hidden:true"\x3e\x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/Search/setting/Setting.html":'\x3cdiv\x3e\r\n  \x3cdiv class\x3d"sources-setting"\x3e\r\n    \x3cspan class\x3d"group-label"\x3e${nls.sourceSetting}\x3c/span\x3e\r\n    \x3cdiv class\x3d"instruction"\x3e\r\n      \x3cp\x3e${nls.instruction}\x3c/p\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"dropdown-button" role\x3d"button"\x3e\r\n      \x3cdiv class\x3d"button"\x3e\r\n        \x3cspan class\x3d"button-text"\x3e${nls.add}\x3c/span\x3e\r\n      \x3c/div\x3e\r\n      \x3cul class\x3d"dropdown-menu" role\x3d"menu" data-dojo-attach-event\x3d"click:_onMenuItemClick"\x3e\r\n        \x3cli class\x3d"dropdown-item" type\x3d"query"\x3e${nls.searchableLayer}\x3c/li\x3e\r\n        \x3cli class\x3d"dropdown-item" type\x3d"locator"\x3e${nls.geocoder}\x3c/li\x3e\r\n      \x3c/ul\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"sources"\x3e\r\n      \x3cdiv class\x3d"source-list jimu-float-leading"\x3e\r\n        \x3cdiv class\x3d"source-list-table" data-dojo-attach-point\x3d"sourceList" style\x3d"100%"\x3e\x3c/div\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv class\x3d"source-setting jimu-float-trailing" data-dojo-attach-point\x3d"sourceSettingNode"\x3e\x3c/div\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"general-setting"\x3e\r\n    \x3cspan class\x3d"group-label"\x3e${nls.generalSetting}\x3c/span\x3e\r\n    \x3ctable class\x3d"general-setting-table"\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd class\x3d"first"\x3e\r\n          \x3cspan class\x3d"source-label"\x3e${nls.allPlaceholder}\x3c/span\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd class\x3d"second"\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"allPlaceholder" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-attach-event\x3d"Blur:_onAllPlaceholderBlur" data-dojo-props\x3d"trim:true,style:{width:\'100%\'}"\x3e\x3c/div\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n    \x3c/table\x3e\r\n    \x3ctable class\x3d"general-setting-table"\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd class\x3d"first"\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"showInfoWindowOnSelect"\x3e\x3c/div\x3e\r\n        \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"shelter" data-dojo-type\x3d"jimu/dijit/LoadingIndicator" data-dojo-props\x3d"hidden:true"\x3e\x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/Search/setting/css/style.css":".jimu-widget-search-setting{overflow: hidden; width: 100%; margin-top: 10px; color: #596679; font-size: 14px;}.jimu-widget-search-setting .group-label{display: inline-block; margin-bottom: 10px; font-weight: bold;}.jimu-widget-search-setting .instruction{font-size: 12px;}.jimu-widget-search-setting .dropdown-button {margin: 8px 0; display: inline-block; position: relative; padding-left: 16px; color: #518dca; background: url(images/add_icon.png) no-repeat left; cursor: pointer;}.jimu-rtl .jimu-widget-search-setting .dropdown-button{padding-left: 0; padding-right: 16px; background-position: right;}.jimu-widget-search-setting .dropdown-button .dropdown-menu{position: absolute; display: none; list-style-type: none; top: 16px; left: 0; margin: 0; padding: 0; background: #fafafa; color: #7989a0; z-index: 999;}.jimu-rtl .jimu-widget-search-setting .dropdown-button .dropdown-menu{right: 0; left: auto;}.jimu-widget-search-setting .dropdown-button:hover .dropdown-menu{display: inline-block;}.jimu-widget-search-setting .dropdown-menu .dropdown-item{white-space: nowrap; height: 30px; padding: 0 25px; line-height: 30px;}.jimu-widget-search-setting .dropdown-menu .dropdown-item:hover{background: #edf2f5; color: #15a4fa;}.jimu-widget-search-setting .sources{height: 366px;}.jimu-widget-search-setting .source-list{width: 270px; height: 100%;}.jimu-widget-search-setting .source-setting{width: 660px; position: relative; height: 100%; overflow: auto; padding-right: 5px;}.jimu-widget-search-setting .source-setting .source-tips{display: none; font-size: 12px; color: #999;}.jimu-widget-search-setting .source-setting .source-tips-show{display: block;}.jimu-widget-search-setting .general-setting .group-label{margin-top: 15px; margin-bottom: 5px;}.jimu-widget-search-setting .source-table,.jimu-widget-search-setting .general-setting-table{width: 100%;}.jimu-widget-search-setting .search-fields-selector {display: inline-block; margin: 6px 0; width: 18px; height: 18px; background: url(images/selector.png) no-repeat center;}.jimu-widget-search-setting .jimu-widget-search-locator-source-setting .source-details-section .country-code-row td,.jimu-widget-search-setting .jimu-widget-search-locator-source-setting .source-details-section .local-search-row td{padding-bottom: 35px; position: relative;}.jimu-widget-search-setting .jimu-widget-search-locator-source-setting .source-details-section .local-search-row .dijitDownArrowButton td{padding-bottom: 0;}.jimu-widget-search-setting .jimu-widget-search-locator-source-setting .source-details-section .local-search-row .first{padding-left: 20px;}.jimu-widget-search-setting .jimu-widget-search-locator-source-setting .source-details-section .country-code-row a{text-decoration: none;}.jimu-widget-search-setting .jimu-widget-search-locator-source-setting .source-details-section .country-code-row .esri-icon-question{color: #485566; font-style: normal;}.jimu-rtl .jimu-widget-search-setting .jimu-widget-search-locator-source-setting .source-details-section .country-code-row .esri-icon-question{transform: rotateY(180deg); display: inline-block;}.jimu-widget-search-setting .jimu-widget-search-locator-source-setting .source-details-section .country-code-row .example,.jimu-widget-search-setting .jimu-widget-search-locator-source-setting .source-details-section .local-search-row .example{position: absolute; top: 35px; left: 0; font-size: 12px; color: #999;}.jimu-rtl .jimu-widget-search-setting .jimu-widget-search-locator-source-setting .source-details-section .country-code-row .example,.jimu-rtl .jimu-widget-search-setting .jimu-widget-search-locator-source-setting .source-details-section .local-search-row .example{left: auto; right: 0;}.jimu-widget-search-setting .jimu-widget-search-locator-source-setting .source-details-section .hide-country-code-row,.jimu-widget-search-setting .jimu-widget-search-locator-source-setting .hide-local-search-table {display: none;}.jimu-widget-search-setting .source-url-section .source-table \x3e tbody \x3e tr:first-child \x3e td {padding-bottom: 5px;}.jimu-widget-search-setting .source-table \x3e tbody \x3e tr \x3e td,.jimu-widget-search-setting .general-setting-table \x3e tbody \x3e tr \x3e td{padding-bottom: 10px;}.jimu-widget-search-setting .source-table \x3e tbody \x3e tr \x3e .first,.jimu-widget-search-setting .general-setting-table \x3e tbody \x3e tr \x3e .first{width: auto; text-align: left; padding-right: 10px; white-space: nowrap;}.jimu-widget-search-setting .source-table \x3e tbody \x3e tr \x3e .second{width:550px;}.jimu-widget-search-setting .general-setting-table \x3e tbody \x3e tr \x3e .second{width: 650px;}.jimu-widget-search-setting .source-table \x3e tbody \x3e tr \x3e .third{width: 70px; padding-left: 10px;}.jimu-rtl .jimu-widget-search-setting .source-table \x3e tbody \x3e tr \x3e .first,.jimu-rtl .jimu-widget-search-setting .general-setting-table \x3e tbody \x3e tr \x3e .first{padding-left: 10px; padding-right: 0;}.jimu-rtl .jimu-widget-search-setting .source-table \x3e tbody \x3e tr \x3e .first,.jimu-rtl .jimu-widget-search-setting .general-setting-table \x3e tbody \x3e tr \x3e .first{text-align: right; padding-left: 10px; padding-right: auto;}.jimu-rtl .jimu-widget-search-setting .source-table \x3e tbody \x3e tr \x3e .third{padding-left: 0; padding-right: 10px;}.jimu-widget-query-source-setting .source-url-section .source-table \x3e tbody \x3e tr \x3e .second {width: 455px;}.jimu-widget-search-setting .source-table .jimu-btn{padding: 0; line-height: 30px; width: 60px;}.jimu-widget-search-setting .source-table \x3e tbody \x3e tr \x3e .second .tip{font-size: 12px; color: #999; width: 100%; display: inline-block;}.jimu-widget-search-setting .source-table .error-message{color: #e84b4b !important;}.jimu-widget-search-setting .jimu-basic-service-chooser {width: auto;}.override-geocode-service-chooser-content {width: 580px !important; min-height: 150px !important;}.override-geocode-service-chooser-content .service-browser-container{display: none;}.jimu-widget-search-query-source-setting-fields .fields-checkbox{width: 167px; margin-bottom: 20px; color: #596679; font-size: 14px; margin-left: 30px;}.jimu-widget-search-query-source-setting-fields .fields-checkbox .label{width: 140px;}.jimu-rtl .jimu-widget-search-query-source-setting-fields .fields-checkbox{margin-right: 30px; margin-left: auto;}",
"*now":function(x){x(['dojo/i18n!*preload*widgets/Search/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/array dojo/_base/html dojo/_base/lang dojo/query dojo/on dojo/when esri/lang dijit/_WidgetsInTemplateMixin jimu/BaseWidgetSetting jimu/LayerInfos/LayerInfos ../utils jimu/utils ./QuerySourceSetting ./LocatorSourceSetting jimu/dijit/CheckBox jimu/dijit/SimpleTable jimu/dijit/LoadingIndicator".split(" "),function(x,y,B,A,v,g,k,f,d,m,p,h,u,w,C,n,q){return x([m,d],{baseClass:"jimu-widget-search-setting",_currentSourceSetting:null,_defaultZoomScale:null,postCreate:function(){this.inherited(arguments);
this.sourceList=new q({autoHeight:!1,selectable:!0,fields:[{name:"name",title:this.nls.name,width:"auto",type:"text",editable:!1},{name:"actions",title:"",width:"70px",type:"actions",actions:["up","down","delete"]}]},this.sourceList);B.setStyle(this.sourceList.domNode,"height","100%");this.sourceList.startup();this.own(g(this.sourceList,"row-select",A.hitch(this,this._onSourceItemSelected)));this.own(g(this.sourceList,"row-delete",A.hitch(this,this._onSourceItemRemoved)));this.own(g(this.sourceList,
"row-add",A.hitch(this,this._checkConfig)));this.showInfoWindowOnSelect=new n({checked:!0,label:this.nls.showInfoWindowOnSelect2},this.showInfoWindowOnSelect)},startup:function(){this.inherited(arguments);this.config&&this.config.sources||(this.config.sources=[]);this.shelter.show();p.getInstance(this.map,this.map.itemInfo).then(A.hitch(this,function(a){this.layerInfosObj=a;h.setMap(this.map);h.setLayerInfosObj(this.layerInfosObj);h.setAppConfig(this.appConfig);k(h.getConfigInfo(this.config)).then(A.hitch(this,
function(t){this.domNode&&(this.setConfig(t),this.shelter.hide())}))}))},setConfig:function(a){this.config=a;a=a.sources;this.allPlaceholder.set("value",u.stripHTML(this.config.allPlaceholder));this.showInfoWindowOnSelect.setValue(f.isDefined(this.config.showInfoWindowOnSelect)?!!this.config.showInfoWindowOnSelect:!0);y.forEach(a,A.hitch(this,function(t,c){var b=this.sourceList.addRow({name:t.name||""});b&&b.success?(this._setRelatedConfig(b.tr,t),0===c&&setTimeout(A.hitch(this,function(){this.sourceList.selectRow(b.tr)}),
100)):console.error("add row failed ",b)}))},getConfig:function(){this._currentSourceSetting&&this._closeSourceSetting();var a={allPlaceholder:u.stripHTML(this.allPlaceholder.get("value")),showInfoWindowOnSelect:this.showInfoWindowOnSelect.checked},t=this.sourceList.getRows(),c=[];y.forEach(t,A.hitch(this,function(b){var r=this._getRelatedConfig(b);delete r._definition;this._removeRelatedConfig(b);c.push(r)}));a.sources=c;return a},destroy:function(){h.setMap(null);h.setLayerInfosObj(null);h.setAppConfig(null);
this.inherited(arguments)},_onAllPlaceholderBlur:function(){this.allPlaceholder.set("value",u.stripHTML(this.allPlaceholder.get("value")))},_onMenuItemClick:function(a){this._currentSourceSetting&&!this._currentSourceSetting.isValidConfig()?this._currentSourceSetting.showValidationTip():(a=a&&a.target&&B.getAttr(a.target,"type"),"locator"===a?this._addNewLocator():"query"===a&&this._addNewQuerySource())},_addNewLocator:function(){this._createNewLocatorSourceSettingFromMenuItem({},{})},_addNewQuerySource:function(){this._createNewQuerySourceSettingFromMenuItem({},
{})},_setRelatedConfig:function(a,t){v(a).data("config",A.clone(t))},_getRelatedConfig:function(a){return v(a).data("config")[0]},_removeRelatedConfig:function(a){return v(a).removeData("config")},_createNewLocatorSourceSettingFromMenuItem:function(a,t){var c=new C({nls:this.nls,map:this.map});c.setDefinition(t);c.setConfig({url:a.url||"",name:a.name||"",singleLineFieldName:a.singleLineFieldName||"",placeholder:a.placeholder||"",countryCode:a.countryCode||"",panToScale:a.panToScale||!1,zoomScale:a.zoomScale||
this._defaultZoomScale,maxSuggestions:null===a.maxSuggestions||void 0===a.maxSuggestions?6:a.maxSuggestions,maxResults:a.maxResults||6,searchInCurrentMapExtent:!!a.searchInCurrentMapExtent,type:"locator"});c._openLocatorChooser();c.own(g(c,"select-locator-url-ok",A.hitch(this,function(b){(b=this.sourceList.addRow({name:b.name||"New Geocoder"},this.sourceList.getRows().length))&&b.success&&(this._currentSourceSetting&&this._closeSourceSetting(),c.setRelatedTr(b.tr),c.placeAt(this.sourceSettingNode),
this.sourceList.selectRow(b.tr),this._currentSourceSetting=c)})));c.own(g(c,"reselect-locator-url-ok",A.hitch(this,function(b){var r=this._currentSourceSetting.getRelatedTr();this.sourceList.editRow(r,{name:b.name})})));c.own(g(c,"select-locator-url-cancel",A.hitch(this,function(){this._currentSourceSetting!==c&&(c.destroy(),c=null)})))},_createNewLocatorSourceSettingFromSourceList:function(a,t,c){this._currentSourceSetting&&this._closeSourceSetting();this._currentSourceSetting=new C({nls:this.nls,
map:this.map});this._currentSourceSetting.setDefinition(t);this._currentSourceSetting.setConfig({url:a.url||"",name:a.name||"",singleLineFieldName:a.singleLineFieldName||"",placeholder:a.placeholder||"",countryCode:a.countryCode||"",panToScale:a.panToScale||!1,zoomScale:a.zoomScale||this._defaultZoomScale,maxSuggestions:null===a.maxSuggestions||void 0===a.maxSuggestions?6:a.maxSuggestions,maxResults:a.maxResults||6,searchInCurrentMapExtent:!!a.searchInCurrentMapExtent,enableLocalSearch:!!a.enableLocalSearch,
localSearchMinScale:a.localSearchMinScale,localSearchDistance:a.localSearchDistance,radiusUnit:a.radiusUnit,type:"locator"});this._currentSourceSetting.setRelatedTr(c);this._currentSourceSetting.placeAt(this.sourceSettingNode);this._currentSourceSetting._processlocalSearchTable(!!a.enableLocalSearch);this._currentSourceSetting.own(g(this._currentSourceSetting,"reselect-locator-url-ok",A.hitch(this,function(b){var r=this._currentSourceSetting.getRelatedTr();this.sourceList.editRow(r,{name:b.name})})))},
_closeSourceSetting:function(){var a=this._currentSourceSetting.getRelatedTr(),t=this._currentSourceSetting.getConfig();t._definition=this._currentSourceSetting.getDefinition();this._setRelatedConfig(a,t);this.sourceList.editRow(a,{name:t.name});this._currentSourceSetting.destroy()},_createNewQuerySourceSettingFromMenuItem:function(a,t){var c=new w({nls:this.nls,map:this.map,appConfig:this.appConfig});c.setDefinition(t);c.setConfig({url:a.url,name:a.name||"",layerId:a.layerId,placeholder:a.placeholder||
"",searchFields:a.searchFields||[],displayField:a.displayField||t.displayField||"",exactMatch:!!a.exactMatch,panToScale:a.panToScale||!1,zoomScale:a.zoomScale||this._defaultZoomScale,maxSuggestions:null===a.maxSuggestions||void 0===a.maxSuggestions?6:a.maxSuggestions,maxResults:a.maxResults||6,searchInCurrentMapExtent:!!a.searchInCurrentMapExtent,type:"query"});c._openQuerySourceChooser();c.own(g(c,"select-query-source-ok",A.hitch(this,function(b){(b=this.sourceList.addRow({name:b.name},0))&&b.success&&
(this._currentSourceSetting&&this._closeSourceSetting(),c.setRelatedTr(b.tr),c.placeAt(this.sourceSettingNode),this.sourceList.selectRow(b.tr),this._currentSourceSetting=c)})));c.own(g(c,"reselect-query-source-ok",A.hitch(this,function(b){var r=this._currentSourceSetting.getRelatedTr();this.sourceList.editRow(r,{name:b.name})})));c.own(g(c,"select-query-source-cancel",A.hitch(this,function(){this._currentSourceSetting!==c&&(c.destroy(),c=null)})))},_createNewQuerySourceSettingFromSourceList:function(a,
t,c){this._currentSourceSetting&&this._closeSourceSetting();this._currentSourceSetting=new w({nls:this.nls,map:this.map,appConfig:this.appConfig});this._currentSourceSetting.placeAt(this.sourceSettingNode);this._currentSourceSetting.setDefinition(t);this._currentSourceSetting.setConfig({url:a.url,name:a.name||"",layerId:a.layerId,placeholder:a.placeholder||"",searchFields:a.searchFields||[],displayField:a.displayField||t.displayField||"",exactMatch:!!a.exactMatch,panToScale:a.panToScale||!1,zoomScale:a.zoomScale||
this._defaultZoomScale,maxSuggestions:null===a.maxSuggestions||void 0===a.maxSuggestions?6:a.maxSuggestions,maxResults:a.maxResults||6,searchInCurrentMapExtent:!!a.searchInCurrentMapExtent,type:"query"});this._currentSourceSetting.setRelatedTr(c);this._currentSourceSetting.own(g(this._currentSourceSetting,"reselect-query-source",A.hitch(this,function(b){var r=this._currentSourceSetting.getRelatedTr();this.sourceList.editRow(r,{name:b.name})})))},_onSourceItemRemoved:function(a){this._checkConfig();
this._currentSourceSetting&&this._currentSourceSetting.getRelatedTr()===a&&(this._currentSourceSetting.destroy(),this._currentSourceSetting=null)},_onSourceItemSelected:function(a){var t=this._getRelatedConfig(a),c=this._currentSourceSetting&&this._currentSourceSetting.tr;t&&a!==c&&(this._currentSourceSetting&&!this._currentSourceSetting.isValidConfig()?(this._currentSourceSetting.showValidationTip(),this.sourceList.selectRow(c)):"query"===t.type?this._createNewQuerySourceSettingFromSourceList(t,
t._definition||{},a):"locator"===t.type&&this._createNewLocatorSourceSettingFromSourceList(t,t._definition||{},a))},_checkConfig:function(){0<this.sourceList.getRows().length?this.settingPagePopup.enableButton(0):this.settingPagePopup.disableButton(0)}})});