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

//>>built
require({cache:{"jimu/dijit/LayerChooserFromMapWithDropbox":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/on dojo/keys dojo/Evented dojo/Deferred dijit/popup dijit/_WidgetBase dijit/_TemplatedMixin dojo/text!./templates/LayerChooserFromMapWithDropbox.html jimu/LayerInfos/LayerInfos".split(" "),function(w,F,k,t,p,f,l,q,u,A,y,d){return w([u,A,f],{templateString:y,baseClass:"jimu-layer-chooser-from-map-withdropbox",declaredClass:"jimu.dijit.LayerChooserFromMapWithDropbox",
_selectedItem:null,_isLayerChooserShow:!1,layerInfosObj:null,layerChooser:null,customClass:"",postMixInProperties:function(){this.inherited(arguments);this.nls=window.jimuNls.queryableLayerSource;this.nls.customSelectLayer=this.label?this.label:this.nls.selectLayer},postCreate:function(){this.inherited(arguments);this.layerInfosObj=d.getInstanceSync();this.layerChooser.domNode.style.zIndex=1;this.layerChooser.tree.domNode.style.borderTop="0";this.layerChooser.tree.domNode.style.maxHeight="290px";
this.own(t(this.layerChooser,"tree-click",F.hitch(this,this._onTreeClick)));this.own(t(this.layerChooser,"update",F.hitch(this,this._onLayerChooserUpdate)));this.own(t(document.body,"click",F.hitch(this,this._onBodyClicked)));this.own(t(document.body,"keydown",F.hitch(this,function(h){h.keyCode===p.ENTER&&this._onBodyClicked(h)})));this.own(t(this.layerChooser.domNode,"keydown",F.hitch(this,function(h){h.keyCode===p.ESCAPE&&this.hideLayerChooser()})))},destroy:function(){this.hideLayerChooser();this.layerChooser&&
this.layerChooser.destroy();this.layerChooser=null;this.inherited(arguments)},getLayerChooser:function(){return this.layerChooser},setSelectedLayer:function(h){var m=new l;if(h){var H=this.layerInfosObj.getLayerOrTableInfoById(h.id);H?this.layerChooser.filter(H).then(F.hitch(this,function(K){K?(this._onSelectNewItem({layerInfo:H,name:H.title,url:h.url}),m.resolve(!0)):m.resolve(!1)}),F.hitch(this,function(){m.resolve(!1)})):m.resolve(!1)}else this._onSelectNewItem(null),m.resolve(!0);return m},getSelectedItem:function(){return this._selectedItem},
getSelectedItems:function(){return[this._selectedItem]},_onBodyClicked:function(h){h=h.target||h.srcElement;h===this.domNode||k.isDescendant(h,this.domNode)||h===this.layerChooser.domNode||k.isDescendant(h,this.layerChooser.domNode)||this.hideLayerChooser()},_onDropDownClick:function(h){h.stopPropagation();h.preventDefault();this._isLayerChooserShow?this.hideLayerChooser():(this.isActive=!0,this.showLayerChooser())},_onDropDownKeydown:function(h){h.keyCode===p.ENTER&&this._onDropDownClick(h)},_getSelectedItems:function(){return this.layerChooser.getSelectedItems()},
showLayerChooser:function(){this.layerChooser.domNode.style.minWidth=this.domNode.clientWidth+2+"px";q.open({parent:this,popup:this.layerChooser,around:this.domNode});var h=this.layerChooser.domNode.parentNode;h&&(k.addClass(h,"jimu-layer-chooser-from-map-withdropbox-popup"),this.customClass&&k.addClass(h,this.customClass),this.layerChooser.tree.domNode.focus());this._isLayerChooserShow=!0},hideLayerChooser:function(){q.close(this.layerChooser);this._isLayerChooserShow=!1;this.isActive&&(this.dropDownBtn.focus(),
this.isActive=!1)},_onLayerChooserUpdate:function(){this._selectedItem&&this.layerChooser.onlyShowVisible&&!this._selectedItem.layerInfo.isShowInMap()&&(this._selectedItem=null,this.emit("selection-change",[]))},_onSelectNewItem:function(h){var m=F.getObject("layerInfo.id",!1,this._selectedItem)||-1,H=F.getObject("layerInfo.id",!1,h)||-1;m=m!==H;this._selectedItem=h;this.hideLayerChooser();h=F.getObject("layerInfo.title",!1,this._selectedItem)||"";this.layerNameNode.innerHTML=h;k.setAttr(this.layerNameNode,
"title",h);h=F.getObject("layerInfo.layerObject",!1,this._selectedItem);m&&this.emit("selection-change",[h])},_onTreeClick:function(){var h=this._getSelectedItems();this._onSelectNewItem(0<h.length?h[0]:null)}})})},"widgets/Filter/CustomFeaturelayerChooserFromMap":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/Deferred","jimu/dijit/LayerChooserFromMap","jimu/dijit/QueryableLayerChooserFromMap"],function(w,F,k,t,p){return w([p],{postMixInProperties:function(){this.inherited(arguments);
this.filter=F.hitch(this,t.andCombineFilters([this.filter,F.hitch(this,this._customFilter)]));this.displayTooltipForTreeNode=!0},_customFilter:function(f){var l=new k;f.isTable?l.resolve(!1):f.getLayerObject().then(F.hitch(this,function(q){"esri.layers.ArcGISDynamicMapServiceLayer"===q.declaredClass?l.resolve(10<=q.version):"esri.layers.ArcGISTiledMapServiceLayer"===q.declaredClass?l.resolve(!1):l.resolve(!0)}),F.hitch(this,function(q){console.error(q);l.resolve(!1)}));return l}})})},"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(w,F,k,t,p,f,l,q,u,A,y,d,h,m,H,K,Q,x){var B=k([t,p,f,F],{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);h.addClass(this.domNode,"jimu-basic-layer-chooser-from-map");this.multiple=!!this.multiple;this.shelter=new x({hidden:!0});this.shelter.placeAt(this.domNode);this.shelter.startup();this._createTree();this.basicFilter=d.hitch(this,this.basicFilter);
this.filter=B.andCombineFilters([this.basicFilter,this.filter]);this.createMapResponse&&this.setCreateMapResponse(this.createMapResponse)},basicFilter:function(g){var r=new q;this.onlyShowVisible?r.resolve(g.isShowInMap()):r.resolve(!0);return r},filter:function(g){g=new q;g.resolve(!0);return g},getSelectedItems:function(){var g=this.tree.getSelectedItems();return m.map(g,d.hitch(this,function(r){return this.getHandledItem(r)}))},getAllItems:function(){var g=this.tree.getAllItems(),r=[];m.forEach(g,
d.hitch(this,function(C){"root"!==C.id&&(C=this.getHandledItem(C),r.push(C))}));return r},getHandledItem:function(g){return{name:g.name,layerInfo:g.layerInfo}},_isLeafItem:function(g){return g.isLeaf},setCreateMapResponse:function(g){this.createMapResponse=g;Q.getInstance(this.createMapResponse.map,this.createMapResponse.itemInfo).then(d.hitch(this,function(r){this.layerInfosObj=r;this.own(w(this.layerInfosObj,"layerInfosChanged",d.hitch(this,this._onLayerInfosChanged)));this.updateWhenLayerInfosIsShowInMapChanged&&
this.own(w(this.layerInfosObj,"layerInfosIsShowInMapChanged",d.hitch(this,this._onLayerInfosIsShowInMapChanged)));this._buildTree(this.layerInfosObj)}))},_onLayerInfosChanged:function(g,r){this._buildTree(this.layerInfosObj);this.emit("update")},_onLayerInfosIsShowInMapChanged:function(g){this._buildTree(this.layerInfosObj);this.emit("update")},_buildTree:function(g){this._clear();h.setStyle(this.errorTipSection,"display","block");var r=[];this.onlyShowWebMapLayers?(r=g.getLayerInfoArrayOfWebmap(),
r=r.concat(g.getTableInfoArrayOfWebmap())):(r=g.getLayerInfoArray(),r=r.concat(g.getTableInfoArray()));0!==r.length&&(h.setStyle(this.errorTipSection,"display","none"),m.forEach(r,d.hitch(this,function(C){this._addDirectLayerInfo(C)})))},_addDirectLayerInfo:function(g){g&&g.getLayerObject().then(d.hitch(this,function(){this._addItem("root",g)}),d.hitch(this,function(r){console.error(r)}))},_clear:function(){var g=this._store.query({parent:"root"});m.forEach(g,d.hitch(this,function(r){r&&"root"!==
r.id&&this._store.remove(r.id)}))},_addItem:function(g,r){var C=null,E=r.getLayerType(),N=this.filter(r);y({layerType:E,valid:N}).then(d.hitch(this,function(M){if(M.valid){var b=d.hitch(this,function(L,G){this._id++;C={name:r.title||"",parent:g,layerInfo:r,type:M.layerType,layerClass:r.layerObject.declaredClass,id:this._id.toString(),isLeaf:L,hasChildren:G};this._store.add(C)}),e=r.getSubLayers(),n=0===e.length,D=!0;this.onlyFilterCurrentLayerWhenAddItem?(n&&(D=!1),b(n,D)):n?b(n,!1):(e=m.map(e,d.hitch(this,
function(L){return this.filter(L)})),y(e).then(d.hitch(this,function(L){(L=m.some(L,function(G){return G}))&&b(n,L)})))}}))},_getRootItem:function(){return{id:"root",name:"Map Root",type:"root",isLeaf:!1,hasChildren:!0}},_createTree:function(){var g=this._getRootItem();g=new l({data:[g],getChildren:function(r){return this.query({parent:r.id})}});this._store=new u(g);g=new A({store:this._store,query:{id:"root"},mayHaveChildren:d.hitch(this,this._mayHaveChildren)});this.tree=new K({multiple:this.multiple,
model:g,showRoot:!1,isLeafItem:d.hitch(this,this._isLeafItem),style:{width:"100%"},onOpen:d.hitch(this,function(r,C){"root"!==r.id&&this._onTreeOpen(r,C)}),onClick:d.hitch(this,function(r,C,E){this._onTreeClick(r,C,E);this.emit("tree-click",r,C,E)}),getIconStyle:d.hitch(this,function(r,C){var E=null;if(!r||"root"===r.id)return null;var N={width:"20px",height:"20px",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundImage:""},M=window.location.protocol+"//"+window.location.host+
require.toUrl("jimu");if(r=this._getIconInfo(r,C).imageName)N.backgroundImage="url("+M+"/css/images/"+r+")",E=N;return E}),getIconClass:d.hitch(this,function(r,C){return this._getIconInfo(r,C).className}),getTooltip:d.hitch(this,function(r){return this.displayTooltipForTreeNode?r.layerInfo.title:""})});h.addClass(this.tree.domNode,this._treeClass);this.tree.placeAt(this.shelter.domNode,"before")},_mayHaveChildren:function(g){return g.hasChildren},_getIconInfo:function(g,r){var C="",E="";"ArcGISDynamicMapServiceLayer"===
g.type||"ArcGISTiledMapServiceLayer"===g.type?r?(C="mapserver_open.png",E="mapservice-layer-icon open"):(C="mapserver_close.png",E="mapservice-layer-icon close"):"GroupLayer"===g.type?r?(C="group_layer2.png",E="group-layer-icon open"):(C="group_layer1.png",E="group-layer-icon close"):"FeatureLayer"===g.type?(g=H.getTypeByGeometryType(g.layerInfo.layerObject.geometryType),"point"===g?(C="point_layer1.png",E="point-layer-icon"):"polyline"===g?(C="line_layer1.png",E="line-layer-icon"):"polygon"===g&&
(C="polygon_layer1.png",E="polygon-layer-icon")):"Table"===g.type?(C="table.png",E="table-icon"):"ArcGISImageServiceLayer"===g.type||"ArcGISImageServiceVectorLayer"===g.type?(C="image_layer.png",E="iamge-layer-icon"):r?(C="mapserver_open.png",E="mapservice-layer-icon open"):(C="mapserver_close.png",E="mapservice-layer-icon close");return{imageName:C,className:E}},_onTreeOpen:function(g,r){if("root"!==g.id){var C=[];r=[];C=g.layerInfo.getSubLayers();g.checked||(this.shelter.show(),r=m.map(C,d.hitch(this,
function(E){return E.getLayerObject()})),y(r).then(d.hitch(this,function(){this.domNode&&(m.forEach(C,d.hitch(this,function(E){this._addItem(g.id,E)})),g.checked=!0,this.shelter.hide())}),d.hitch(this,function(E){console.error(E);this.shelter.hide()})))}},_onTreeClick:function(g,r,C){},destroy:function(){this.shelter&&(this.shelter.destroy(),this.shelter=null);this.tree&&this.tree.destroy();this.inherited(arguments)}});B.createFilterByLayerType=function(g){d.isArrayLike(g)||(g=[]);return function(r){var C=
new q;if(0===g.length)C.resolve(!0);else{var E=[];r.traversal(function(N){E.push(N.getLayerType())});y(E).then(function(N){for(var M=0;M<N.length;M++)for(var b=0;b<g.length;b++)if(N[M]===g[b]){C.resolve(!0);return}C.resolve(!1)},function(N){console.error(N);C.reject(N)})}return C}};B.createFeaturelayerFilter=function(g,r,C,E){var N=["point","polyline","polygon"];g&&0<g.length?(g=m.filter(g,function(M){return 0<=N.indexOf(M)}),0===g.length&&(g=N)):g=N;return function(M){var b=M.getLayerType();M=M.getLayerObject();
return y({layerType:b,layerObject:M}).then(function(e){var n=e.layerType;e=e.layerObject;if("ArcGISDynamicMapServiceLayer"===n||"ArcGISTiledMapServiceLayer"===n||"GroupLayer"===n||"FeatureCollection"===n)return!0;if("FeatureLayer"===n){n=H.getTypeByGeometryType(e.geometryType);n=0<=m.indexOf(g,n);var D=B._shouldPassStatisticsCheck(E,e);return e.url?(e=H.isFeaturelayerUrlSupportQuery(e.url,e.capabilities),n&&e&&D):r&&n}return"Table"===n?(n=H.isFeaturelayerUrlSupportQuery(e.url,e.capabilities),e=B._shouldPassStatisticsCheck(E,
e),C&&n&&e):!1})}};B.createImageServiceLayerFilter=function(g,r){return function(C){var E=C.getLayerType();C=C.getLayerObject();return y({layerType:E,layerObject:C}).then(function(N){var M=N.layerType,b=N.layerObject;return"ArcGISImageServiceLayer"===M||"ArcGISImageServiceVectorLayer"===M?g?H.isImageServiceSupportQuery(N.layerObject.capabilities)?r?B._shouldPassStatisticsCheck(r,b):!0:!1:!0:!1})}};B._shouldPassStatisticsCheck=function(g,r){return g?(g=!1,g=r.advancedQueryCapabilities?!!r.advancedQueryCapabilities.supportsStatistics:
!!r.supportsStatistics):!0};B.createQueryableLayerFilter=function(g){var r=B.createFeaturelayerFilter(["point","polyline","polygon"],!1,!0,g);g=B.createImageServiceLayerFilter(!0,g);return B.orCombineFilters([r,g])};B.andCombineFilters=function(g){return B._combineFilters(g,!0)};B.orCombineFilters=function(g){return B._combineFilters(g,!1)};B._combineFilters=function(g,r){return function(C){var E=new q,N=m.map(g,function(M){return M(C)});y(N).then(function(M){var b=!1;b=r?m.every(M,function(e){return e}):
m.some(M,function(e){return e});E.resolve(b)},function(M){console.error(M);E.reject(M)});return E}};return B})},"dijit/tree/ObjectStoreModel":function(){define("dojo/_base/array dojo/aspect dojo/_base/declare dojo/Deferred dojo/_base/lang dojo/when ../Destroyable".split(" "),function(w,F,k,t,p,f,l){return k("dijit.tree.ObjectStoreModel",l,{store:null,labelAttr:"name",labelType:"text",root:null,query:null,constructor:function(q){p.mixin(this,q);this.childrenCache={}},getRoot:function(q,u){if(this.root)q(this.root);
else{var A=this.store.query(this.query);A.then&&this.own(A);f(A,p.hitch(this,function(y){if(1!=y.length)throw Error("dijit.tree.ObjectStoreModel: root query returned "+y.length+" items, but must return exactly one");this.root=y[0];q(this.root);A.observe&&A.observe(p.hitch(this,function(d){this.onChange(d)}),!0)}),u)}},mayHaveChildren:function(){return!0},getChildren:function(q,u,A){var y=this.store.getIdentity(q);if(this.childrenCache[y])f(this.childrenCache[y],u,A);else{var d=this.childrenCache[y]=
this.store.getChildren(q);d.then&&this.own(d);d.observe&&this.own(d.observe(p.hitch(this,function(h,m,H){this.onChange(h);m!=H&&f(d,p.hitch(this,"onChildrenChange",q))}),!0));f(d,u,A)}},isItem:function(){return!0},getIdentity:function(q){return this.store.getIdentity(q)},getLabel:function(q){return q[this.labelAttr]},newItem:function(q,u,A,y){return this.store.put(q,{parent:u,before:y})},pasteItem:function(q,u,A,y,d,h){var m=new t;if(u===A&&!y&&!h)return m.resolve(!0),m;u&&!y?this.getChildren(u,p.hitch(this,
function(H){H=[].concat(H);var K=w.indexOf(H,q);H.splice(K,1);this.onChildrenChange(u,H);m.resolve(this.store.put(q,{overwrite:!0,parent:A,oldParent:u,before:h,isCopy:!1}))})):m.resolve(this.store.put(q,{overwrite:!0,parent:A,oldParent:u,before:h,isCopy:!0}));return m},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(w,F,k,t,p,f,l,q,u,A,y,d,h,m,H,K){var Q=w([H._TreeNode,h],{templateString:t,declaredClass:"jimu._TreeNode",isLeaf:!1,groupId:"",postCreate:function(){this.inherited(arguments);f.addClass(this.domNode,"jimu-tree-node");this.isLeaf=!!this.isLeaf;this.groupId?(this.checkNode=f.toDom('\x3cinput type\x3d"radio" /\x3e'),this.checkNode.name=this.groupId):this.checkNode=f.toDom('\x3cinput type\x3d"checkbox" /\x3e');f.addClass(this.checkNode,"jimu-tree-check-node");f.place(this.checkNode,this.contentNode,
"first");this.own(y(this.checkNode,"click",p.hitch(this,this._onClick)));this.own(y(this.rowNode,"keydown",p.hitch(this,function(x,B){B.target=x;B.keyCode!==d.ENTER&&B.keyCode!==d.SPACE||this._onClick(B)},this.checkNode)));this.isLeaf?this.groupId?f.setStyle(this.checkNode,"display","none"):f.setStyle(this.checkNode,"display","inline"):f.setStyle(this.checkNode,"display","none");this.isLeaf?f.addClass(this.domNode,"jimu-tree-leaf-node"):f.addClass(this.domNode,"jimu-tree-not-leaf-node")},select:function(){this.isLeaf&&
(this.checkNode.checked=!0,f.addClass(this.domNode,"jimu-tree-selected-leaf-node"))},unselect:function(){this.isLeaf&&(this.checkNode.checked=!1,f.removeClass(this.domNode,"jimu-tree-selected-leaf-node"))},toggleSelect:function(){this.isLeaf&&(this.checkNode.checked?this.unselect():this.select())},_onClick:function(x){(x.target||x.srcElement)===this.checkNode?this.tree._onCheckNodeClick(this,this.checkNode.checked,x):this.tree._onClick(this,x)},_onChange:function(){this.isLeaf&&setTimeout(p.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 w([H,h],{declaredClass:"jimu._Tree",openOnClick:!0,multiple:!0,uniqueId:"",showRoot:!1,postMixInProperties:function(){this.inherited(arguments);this.uniqueId="tree_"+K.getRandomString()},postCreate:function(){this.inherited(arguments);f.addClass(this.domNode,"jimu-tree");this.own(A.before(this,"onClick",p.hitch(this,this._jimuBeforeClick)));
this.rootLoadingIndicator&&f.setStyle(this.rootLoadingIndicator,"display","none");this.dndController.singular=!0;f.setAttr(this.domNode,"tabindex",0)},removeItem:function(x){this.model.store.remove(x)},getAllItems:function(){var x=this.getAllTreeNodeWidgets();return l.map(x,p.hitch(this,function(B){var g=B.item;g.selected=B.checkNode.checked;return g}))},getSelectedItems:function(){var x=this.getAllTreeNodeWidgets();x=l.filter(x,p.hitch(this,function(B){return B.checkNode.checked}));return l.map(x,
p.hitch(this,function(B){return B.item}))},getFilteredItems:function(x){var B=this.getAllTreeNodeWidgets();B=l.map(B,p.hitch(this,function(g){var r=g.item;r.selected=g.checkNode.checked;return r}));return l.filter(B,p.hitch(this,function(g){return x(g)}))},getTreeNodeByItemId:function(x){for(var B=this._getAllTreeNodeDoms(),g=0;g<B.length;g++){var r=m.byNode(B[g]);if(r.item.id.toString()===x.toString())return r}return null},selectItem:function(x){(x=this.getTreeNodeByItemId(x))&&x.isLeaf&&this.selectNodeWidget(x)},
unselectItem:function(x){(x=this.getTreeNodeByItemId(x))&&x.isLeaf&&x.unselect()},getAllLeafTreeNodeWidgets:function(){var x=this.getAllTreeNodeWidgets();return l.filter(x,p.hitch(this,function(B){return B.isLeaf}))},getAllTreeNodeWidgets:function(){var x=this._getAllTreeNodeDoms();return l.map(x,p.hitch(this,function(B){return m.byNode(B)}))},isLeafItem:function(x){return x&&x.isLeaf},_getAllTreeNodeDoms:function(){return u(".dijitTreeNode",this.domNode)},_createTreeNode:function(x){x.isLeaf=this.isLeafItem(x.item);
this.multiple||(x.groupId=this.uniqueId);return new Q(x)},_onTreeNodeSelect:function(x){this.emit("item-select",{item:x.item,treeNode:x})},_onTreeNodeUnselect:function(x){this.emit("item-unselect",{item:x.item,treeNode:x})},selectNodeWidget:function(x){this.multiple||this.unselectAllLeafNodeWidgets();x.select()},_jimuBeforeClick:function(x,B,g){B.isLeaf&&(f.hasClass(g.target||g.srcElement,"jimu-tree-check-node")||(this.multiple?B.toggleSelect():this.selectNodeWidget(B)));return arguments},_onCheckNodeClick:function(x,
B,g){!this.multiple&&B&&this.unselectAllLeafNodeWidgets();q.stop(g);this.focusNode(x);setTimeout(p.hitch(this,function(){B?this.selectNodeWidget(x):x.unselect();this.onClick(x.item,x,g)}),0)},unselectAllLeafNodeWidgets:function(){var x=this.getAllLeafTreeNodeWidgets();l.forEach(x,p.hitch(this,function(B){B.unselect()}))}})})},"dijit/Tree":function(){define("dojo/_base/array dojo/aspect dojo/cookie dojo/_base/declare dojo/Deferred dojo/promise/all dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/errors/create dojo/fx dojo/has dojo/_base/kernel dojo/keys dojo/_base/lang dojo/on dojo/topic dojo/touch dojo/when ./a11yclick ./focus ./registry ./_base/manager ./_Widget ./_TemplatedMixin ./_Container ./_Contained ./_CssStateMixin ./_KeyNavMixin dojo/text!./templates/TreeNode.html dojo/text!./templates/Tree.html ./tree/TreeStoreModel ./tree/ForestStoreModel ./tree/_dndSelector dojo/query!css2".split(" "),
function(w,F,k,t,p,f,l,q,u,A,y,d,h,m,H,K,Q,x,B,g,r,C,E,N,M,b,e,n,D,L,G,U,X,V,R){function J(a){return K.delegate(a.promise||a,{addCallback:function(c){this.then(c)},addErrback:function(c){this.otherwise(c)}})}var O=t("dijit._TreeNode",[M,b,e,n,D],{item:null,isTreeNode:!0,label:"",_setLabelAttr:function(a){this.labelNode["html"==this.labelType?"innerHTML":"innerText"in this.labelNode?"innerText":"textContent"]=a;this._set("label",a);h("dojo-bidi")&&this.applyTextDir(this.labelNode)},labelType:"text",
isExpandable:null,isExpanded:!1,state:"NotLoaded",templateString:G,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(a){var c=Math.max(a,0)*this.tree._nodePixelIndent+"px";A.set(this.domNode,
"backgroundPosition",c+" 0px");A.set(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",c);w.forEach(this.getChildren(),function(v){v.set("indent",a+1)});this._set("indent",a)},markProcessing:function(){this.state="Loading";this._setExpando(!0)},unmarkProcessing:function(){this._setExpando(!1)},_updateItemClasses:function(a){var c=this.tree,v=c.model;c._v10Compat&&a===v.root&&(a=null);this._applyClassAndStyle(a,"icon","Icon");this._applyClassAndStyle(a,"label","Label");this._applyClassAndStyle(a,
"row","Row");this.tree._startPaint(!0)},_applyClassAndStyle:function(a,c,v){var z="_"+c+"Class";c+="Node";var I=this[z];this[z]=this.tree["get"+v+"Class"](a,this.isExpanded);q.replace(this[c],this[z]||"",I||"");A.set(this[c],this.tree["get"+v+"Style"](a,this.isExpanded)||{})},_updateLayout:function(){var a=this.getParent();a=!a||!a.rowNode||"none"==a.rowNode.style.display;q.toggle(this.domNode,"dijitTreeIsRoot",a);q.toggle(this.domNode,"dijitTreeIsLast",!a&&!this.getNextSibling())},_setExpando:function(a){var c=
["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"];a=a?0:this.isExpandable?this.isExpanded?1:2:3;q.replace(this.expandoNode,c[a],c);this.expandoNodeText.innerHTML=["*","-","+","*"][a]},expand:function(){if(this._expandDeferred)return J(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");q.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 a=d.wipeIn({node:this.containerNode,duration:N.defaultDuration}),c=this._expandDeferred=new p(function(){a.stop()});F.after(a,"onEnd",function(){c.resolve(!0)},!0);a.play();return J(c)},collapse:function(){if(this._collapseDeferred)return J(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");q.remove(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);var a=d.wipeOut({node:this.containerNode,duration:N.defaultDuration}),c=this._collapseDeferred=new p(function(){a.stop()});F.after(a,"onEnd",
function(){c.resolve(!0)},!0);a.play();return J(c)},indent:0,setChildItems:function(a){var c=this.tree,v=c.model,z=[],I=c.focusedChild,Z=this.getChildren();w.forEach(Z,function(P){e.prototype.removeChild.call(this,P)},this);this.defer(function(){w.forEach(Z,function(P){if(!P._destroyed&&!P.getParent()){c.dndController.removeTreeNode(P);(function da(T){var aa=v.getIdentity(T.item),ca=c._itemNodesMap[aa];1==ca.length?delete c._itemNodesMap[aa]:(aa=w.indexOf(ca,T),-1!=aa&&ca.splice(aa,1));w.forEach(T.getChildren(),
da)})(P);if(c.persist){var Y=w.map(P.getTreePath(),function(T){return c.model.getIdentity(T)}).join("/"),W;for(W in c._openedNodes)W.substr(0,Y.length)==Y&&delete c._openedNodes[W];c._saveExpandedNodes()}c.lastFocusedChild&&!l.isDescendant(c.lastFocusedChild.domNode,c.domNode)&&delete c.lastFocusedChild;I&&!l.isDescendant(I.domNode,c.domNode)&&c.focus();P.destroyRecursive()}})});this.state="Loaded";a&&0<a.length?(this.isExpandable=!0,w.forEach(a,function(P){var Y=v.getIdentity(P),W=c._itemNodesMap[Y];
if(W)for(var ba=0;ba<W.length;ba++)if(W[ba]&&!W[ba].getParent()){var T=W[ba];T.set("indent",this.indent+1);break}T||(T=this.tree._createTreeNode({item:P,tree:c,isExpandable:v.mayHaveChildren(P),label:c.getLabel(P),labelType:c.model&&c.model.labelType||"text",tooltip:c.getTooltip(P),ownerDocument:c.ownerDocument,dir:c.dir,lang:c.lang,textDir:c.textDir,indent:this.indent+1}),W?W.push(T):c._itemNodesMap[Y]=[T]);this.addChild(T);(this.tree.autoExpand||this.tree._state(T))&&z.push(c._expandNode(T))},this),
w.forEach(this.getChildren(),function(P){P._updateLayout()})):this.isExpandable=!1;this._setExpando&&this._setExpando(!1);this._updateItemClasses(this.item);a=f(z);this.tree._startPaint(a);return J(a)},getTreePath:function(){for(var a=this,c=[];a&&a!==this.tree.rootNode;)c.unshift(a.item),a=a.getParent();c.unshift(this.tree.rootNode.item);return c},getIdentity:function(){return this.tree.model.getIdentity(this.item)},removeChild:function(a){this.inherited(arguments);var c=this.getChildren();0==c.length&&
(this.isExpandable=!1,this.collapse());w.forEach(c,function(v){v._updateLayout()})},makeExpandable:function(){this.isExpandable=!0;this._setExpando(!1)},setSelected:function(a){this.labelNode.setAttribute("aria-selected",a?"true":"false");q.toggle(this.rowNode,"dijitTreeRowSelected",a)},focus:function(){C.focus(this.focusNode)}});h("dojo-bidi")&&O.extend({_setTextDirAttr:function(a){!a||this.textDir==a&&this._created||(this._set("textDir",a),this.applyTextDir(this.labelNode),w.forEach(this.getChildren(),
function(c){c.set("textDir",a)},this))}});var S=t("dijit.Tree",[M,L,b,D],{baseClass:"dijitTree",store:null,model:null,query:null,label:"",showRoot:!0,childrenAttr:["children"],paths:[],path:[],selectedItems:null,selectedItem:null,openOnClick:!1,openOnDblClick:!1,templateString:U,persist:!1,autoExpand:!1,dndController:R,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(a,c){x.publish(this.id,K.mixin({tree:this,event:a},c||{}))},postMixInProperties:function(){this.tree=this;this.autoExpand&&(this.persist=!1);this._itemNodesMap={};!this.cookieName&&this.id&&(this.cookieName=this.id+"SaveStateCookie");this.expandChildrenDeferred=new p;this.pendingCommandsPromise=this.expandChildrenDeferred.promise;this.inherited(arguments)},postCreate:function(){this._initState();var a=
this;this.own(Q(this.containerNode,Q.selector(".dijitTreeNode",B.enter),function(z){a._onNodeMouseEnter(E.byNode(this),z)}),Q(this.containerNode,Q.selector(".dijitTreeNode",B.leave),function(z){a._onNodeMouseLeave(E.byNode(this),z)}),Q(this.containerNode,Q.selector(".dijitTreeRow",r.press),function(z){a._onNodePress(E.getEnclosingWidget(this),z)}),Q(this.containerNode,Q.selector(".dijitTreeRow",r),function(z){a._onClick(E.getEnclosingWidget(this),z)}),Q(this.containerNode,Q.selector(".dijitTreeRow",
"dblclick"),function(z){a._onDblClick(E.getEnclosingWidget(this),z)}));this.model||this._store2model();this.own(F.after(this.model,"onChange",K.hitch(this,"_onItemChange"),!0),F.after(this.model,"onChildrenChange",K.hitch(this,"_onItemChildrenChange"),!0),F.after(this.model,"onDelete",K.hitch(this,"_onItemDelete"),!0));this.inherited(arguments);if(this.dndController){K.isString(this.dndController)&&(this.dndController=K.getObject(this.dndController));for(var c={},v=0;v<this.dndParams.length;v++)this[this.dndParams[v]]&&
(c[this.dndParams[v]]=this[this.dndParams[v]]);this.dndController=new this.dndController(this,c)}this._load();this.onLoadDeferred=J(this.pendingCommandsPromise);this.onLoadDeferred.then(K.hitch(this,"onLoad"))},_store2model:function(){this._v10Compat=!0;m.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");var a={id:this.id+"_ForestStoreModel",store:this.store,query:this.query,childrenAttrs:this.childrenAttr};this.params.mayHaveChildren&&(a.mayHaveChildren=
K.hitch(this,"mayHaveChildren"));this.params.getItemChildren&&(a.getChildren=K.hitch(this,function(c,v,z){this.getItemChildren(this._v10Compat&&c===this.model.root?null:c,v,z)}));this.model=new V(a);this.showRoot=!!this.label},onLoad:function(){},_load:function(){this.model.getRoot(K.hitch(this,function(a){var c=this.rootNode=this.tree._createTreeNode({item:a,tree:this,isExpandable:!0,label:this.label||this.getLabel(a),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"):(c.rowNode.style.display="none",this.domNode.setAttribute("role","presentation"),this.domNode.removeAttribute("aria-expanded"),this.domNode.removeAttribute("aria-multiselectable"),this["aria-label"]?(c.containerNode.setAttribute("aria-label",this["aria-label"]),this.domNode.removeAttribute("aria-label")):this["aria-labelledby"]&&(c.containerNode.setAttribute("aria-labelledby",
this["aria-labelledby"]),this.domNode.removeAttribute("aria-labelledby")),c.labelNode.setAttribute("role","presentation"),c.labelNode.removeAttribute("aria-selected"),c.containerNode.setAttribute("role","tree"),c.containerNode.setAttribute("aria-expanded","true"),c.containerNode.setAttribute("aria-multiselectable",!this.dndController.singular));this.containerNode.appendChild(c.domNode);a=this.model.getIdentity(a);this._itemNodesMap[a]?this._itemNodesMap[a].push(c):this._itemNodesMap[a]=[c];c._updateLayout();
this._expandNode(c).then(K.hitch(this,function(){this._destroyed||(this.rootLoadingIndicator.style.display="none",this.expandChildrenDeferred.resolve(!0))}))}),K.hitch(this,function(a){console.error(this,": error loading root: ",a)}))},getNodesByItem:function(a){if(!a)return[];a=K.isString(a)?a:this.model.getIdentity(a);return[].concat(this._itemNodesMap[a])},_setSelectedItemAttr:function(a){this.set("selectedItems",[a])},_setSelectedItemsAttr:function(a){var c=this;return this.pendingCommandsPromise=
this.pendingCommandsPromise.always(K.hitch(this,function(){var v=w.map(a,function(I){return!I||K.isString(I)?I:c.model.getIdentity(I)}),z=[];w.forEach(v,function(I){z=z.concat(c._itemNodesMap[I]||[])});this.set("selectedNodes",z)}))},_setPathAttr:function(a){return a.length?J(this.set("paths",[a]).then(function(c){return c[0]})):J(this.set("paths",[]).then(function(c){return c[0]}))},_setPathsAttr:function(a){function c(z,I){var Z=z.shift(),P=w.filter(I,function(Y){return Y.getIdentity()==Z})[0];
if(P)return z.length?v._expandNode(P).then(function(){return c(z,P.getChildren())}):P;throw new S.PathError("Could not expand path at "+Z);}var v=this;return J(this.pendingCommandsPromise=this.pendingCommandsPromise.always(function(){return f(w.map(a,function(z){z=w.map(z,function(I){return I&&K.isObject(I)?v.model.getIdentity(I):I});if(z.length)return c(z,[v.rootNode]);throw new S.PathError("Empty path");}))}).then(function(z){v.set("selectedNodes",z);return v.paths}))},_setSelectedNodeAttr:function(a){this.set("selectedNodes",
[a])},_setSelectedNodesAttr:function(a){this.dndController.setSelection(a)},expandAll:function(){function a(v){return c._expandNode(v).then(function(){var z=w.filter(v.getChildren()||[],function(I){return I.isExpandable});return f(w.map(z,a))})}var c=this;return J(a(this.rootNode))},collapseAll:function(){function a(v){var z=w.filter(v.getChildren()||[],function(I){return I.isExpandable});z=f(w.map(z,a));return!v.isExpanded||v==c.rootNode&&!c.showRoot?z:z.then(function(){return c._collapseNode(v)})}
var c=this;return J(a(this.rootNode))},mayHaveChildren:function(){},getItemChildren:function(){},getLabel:function(a){return this.model.getLabel(a)},getIconClass:function(a,c){return!a||this.model.mayHaveChildren(a)?c?"dijitFolderOpened":"dijitFolderClosed":"dijitLeaf"},getLabelClass:function(){},getRowClass:function(){},getIconStyle:function(){},getLabelStyle:function(){},getRowStyle:function(){},getTooltip:function(){return""},_onDownArrow:function(a,c){(a=this._getNext(c))&&a.isTreeNode&&this.focusNode(a)},
_onUpArrow:function(a,c){if(a=c.getPreviousSibling())for(c=a;c.isExpandable&&c.isExpanded&&c.hasChildren();)c=c.getChildren(),c=c[c.length-1];else if(a=c.getParent(),this.showRoot||a!==this.rootNode)c=a;c&&c.isTreeNode&&this.focusNode(c)},_onRightArrow:function(a,c){c.isExpandable&&!c.isExpanded?this._expandNode(c):c.hasChildren()&&(c=c.getChildren()[0])&&c.isTreeNode&&this.focusNode(c)},_onLeftArrow:function(a,c){c.isExpandable&&c.isExpanded?this._collapseNode(c):(a=c.getParent())&&a.isTreeNode&&
(this.showRoot||a!==this.rootNode)&&this.focusNode(a)},focusLastChild:function(){var a=this._getLast();a&&a.isTreeNode&&this.focusNode(a)},_getFirst:function(){return this.showRoot?this.rootNode:this.rootNode.getChildren()[0]},_getLast:function(){for(var a=this.rootNode;a.isExpanded;){var c=a.getChildren();if(!c.length)break;a=c[c.length-1]}return a},_getNext:function(a){if(a.isExpandable&&a.isExpanded&&a.hasChildren())return a.getChildren()[0];for(;a&&a.isTreeNode;){var c=a.getNextSibling();if(c)return c;
a=a.getParent()}return null},childSelector:".dijitTreeRow",isExpandoNode:function(a,c){return l.isDescendant(a,c.expandoNode)||l.isDescendant(a,c.expandoNodeText)},_onNodePress:function(a,c){this.focusNode(a)},__click:function(a,c,v,z){var I=this.isExpandoNode(c.target,a);a.isExpandable&&(v||I)?this._onExpandoClick({node:a}):(this._publish("execute",{item:a.item,node:a,evt:c}),this[z](a.item,a,c),this.focusNode(a));c.stopPropagation();c.preventDefault()},_onClick:function(a,c){this.__click(a,c,this.openOnClick,
"onClick")},_onDblClick:function(a,c){this.__click(a,c,this.openOnDblClick,"onDblClick")},_onExpandoClick:function(a){a=a.node;this.focusNode(a);a.isExpanded?this._collapseNode(a):this._expandNode(a)},onClick:function(){},onDblClick:function(){},onOpen:function(){},onClose:function(){},_getNextNode:function(a){m.deprecated(this.declaredClass+"::_getNextNode(node) is deprecated. Use _getNext(node) instead.","","2.0");return this._getNext(a)},_getRootOrFirstNode:function(){m.deprecated(this.declaredClass+
"::_getRootOrFirstNode() is deprecated. Use _getFirst() instead.","","2.0");return this._getFirst()},_collapseNode:function(a){a._expandNodeDeferred&&delete a._expandNodeDeferred;if("Loading"!=a.state&&a.isExpanded){var c=a.collapse();this.onClose(a.item,a);this._state(a,!1);this._startPaint(c);return c}},_expandNode:function(a){if(a._expandNodeDeferred)return a._expandNodeDeferred;var c=this.model,v=a.item,z=this;a._loadDeferred||(a.markProcessing(),a._loadDeferred=new p,c.getChildren(v,function(I){a.unmarkProcessing();
a.setChildItems(I).then(function(){a._loadDeferred.resolve(I)})},function(I){console.error(z,": error loading "+a.label+" children: ",I);a._loadDeferred.reject(I)}));c=a._loadDeferred.then(K.hitch(this,function(){var I=a.expand();this.onOpen(a.item,a);this._state(a,!0);return I}));this._startPaint(c);return c},focusNode:function(a){for(var c=[],v=this.domNode;v&&v.tagName&&"IFRAME"!==v.tagName.toUpperCase();v=v.parentNode)c.push({domNode:v.contentWindow||v,scrollLeft:v.scrollLeft||0,scrollTop:v.scrollTop||
0});this.focusChild(a);this.defer(function(){for(var z=0,I=c.length;z<I;z++)c[z].domNode.scrollLeft=c[z].scrollLeft,c[z].domNode.scrollTop=c[z].scrollTop},0)},_onNodeMouseEnter:function(){},_onNodeMouseLeave:function(){},_onItemChange:function(a){var c=this.model.getIdentity(a);if(c=this._itemNodesMap[c]){var v=this.getLabel(a),z=this.getTooltip(a);w.forEach(c,function(I){I.set({item:a,label:v,tooltip:z});I._updateItemClasses(a)})}},_onItemChildrenChange:function(a,c){a=this.model.getIdentity(a);
(a=this._itemNodesMap[a])&&w.forEach(a,function(v){v.setChildItems(c)})},_onItemDelete:function(a){a=this.model.getIdentity(a);var c=this._itemNodesMap[a];c&&(w.forEach(c,function(v){this.dndController.removeTreeNode(v);var z=v.getParent();z&&z.removeChild(v);this.lastFocusedChild&&!l.isDescendant(this.lastFocusedChild.domNode,this.domNode)&&delete this.lastFocusedChild;this.focusedChild&&!l.isDescendant(this.focusedChild.domNode,this.domNode)&&this.focus();v.destroyRecursive()},this),delete this._itemNodesMap[a])},
_initState:function(){this._openedNodes={};if(this.persist&&this.cookieName){var a=k(this.cookieName);a&&w.forEach(a.split(","),function(c){this._openedNodes[c]=!0},this)}},_state:function(a,c){if(!this.persist)return!1;var v=w.map(a.getTreePath(),function(z){return this.model.getIdentity(z)},this).join("/");if(1===arguments.length)return this._openedNodes[v];c?this._openedNodes[v]=!0:delete this._openedNodes[v];this._saveExpandedNodes()},_saveExpandedNodes:function(){if(this.persist&&this.cookieName){var a=
[],c;for(c in this._openedNodes)a.push(c);k(this.cookieName,a.join(","),{expires:365})}},destroy:function(){this._curSearch&&(this._curSearch.timer.remove(),delete this._curSearch);this.rootNode&&this.rootNode.destroyRecursive();this.dndController&&!K.isString(this.dndController)&&this.dndController.destroy();this.rootNode=null;this.inherited(arguments)},destroyRecursive:function(){this.destroy()},resize:function(a){a&&u.setMarginBox(this.domNode,a);this._nodePixelIndent=u.position(this.tree.indentDetector).w||
this._nodePixelIndent;this.expandChildrenDeferred.then(K.hitch(this,function(){this.rootNode.set("indent",this.showRoot?0:-1);this._adjustWidths()}))},_outstandingPaintOperations:0,_startPaint:function(a){this._outstandingPaintOperations++;this._adjustWidthsTimer&&(this._adjustWidthsTimer.remove(),delete this._adjustWidthsTimer);var c=K.hitch(this,function(){this._outstandingPaintOperations--;0>=this._outstandingPaintOperations&&!this._adjustWidthsTimer&&this._started&&(this._adjustWidthsTimer=this.defer("_adjustWidths"))});
g(a,c,c)},_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(a){return new O(a)},focus:function(){this.lastFocusedChild?this.focusNode(this.lastFocusedChild):this.focusFirstChild()}});h("dojo-bidi")&&S.extend({_setTextDirAttr:function(a){a&&this.textDir!=a&&(this._set("textDir",
a),this.rootNode.set("textDir",a))}});S.PathError=y("TreePathError");S._TreeNode=O;return S})},"dijit/tree/TreeStoreModel":function(){define(["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/_base/lang"],function(w,F,k,t){return k("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:!1,constructor:function(p){t.mixin(this,p);this.connects=[];p=this.store;if(!p.getFeatures()["dojo.data.api.Identity"])throw Error("dijit.tree.TreeStoreModel: store must support dojo.data.Identity");
p.getFeatures()["dojo.data.api.Notification"]&&(this.connects=this.connects.concat([F.after(p,"onNew",t.hitch(this,"onNewItem"),!0),F.after(p,"onDelete",t.hitch(this,"onDeleteItem"),!0),F.after(p,"onSet",t.hitch(this,"onSetItem"),!0)]))},destroy:function(){for(var p;p=this.connects.pop();)p.remove()},getRoot:function(p,f){this.root?p(this.root):this.store.fetch({query:this.query,onComplete:t.hitch(this,function(l){if(1!=l.length)throw Error("dijit.tree.TreeStoreModel: root query returned "+l.length+
" items, but must return exactly one");this.root=l[0];p(this.root)}),onError:f})},mayHaveChildren:function(p){return w.some(this.childrenAttrs,function(f){return this.store.hasAttribute(p,f)},this)},getChildren:function(p,f,l){var q=this.store;if(q.isItemLoaded(p)){for(var u=[],A=0;A<this.childrenAttrs.length;A++){var y=q.getValues(p,this.childrenAttrs[A]);u=u.concat(y)}var d=0;this.deferItemLoadingUntilExpand||w.forEach(u,function(m){q.isItemLoaded(m)||d++});0==d?f(u):w.forEach(u,function(m,H){q.isItemLoaded(m)||
q.loadItem({item:m,onItem:function(K){u[H]=K;0==--d&&f(u)},onError:l})})}else{var h=t.hitch(this,arguments.callee);q.loadItem({item:p,onItem:function(m){h(m,f,l)},onError:l})}},isItem:function(p){return this.store.isItem(p)},fetchItemByIdentity:function(p){this.store.fetchItemByIdentity(p)},getIdentity:function(p){return this.store.getIdentity(p)},getLabel:function(p){return this.labelAttr?this.store.getValue(p,this.labelAttr):this.store.getLabel(p)},newItem:function(p,f,l){var q={parent:f,attribute:this.childrenAttrs[0]},
u;this.newItemIdAttr&&p[this.newItemIdAttr]?this.fetchItemByIdentity({identity:p[this.newItemIdAttr],scope:this,onItem:function(A){A?this.pasteItem(A,null,f,!0,l):(u=this.store.newItem(p,q))&&void 0!=l&&this.pasteItem(u,f,f,!1,l)}}):(u=this.store.newItem(p,q))&&void 0!=l&&this.pasteItem(u,f,f,!1,l)},pasteItem:function(p,f,l,q,u){var A=this.store,y=this.childrenAttrs[0];f&&w.forEach(this.childrenAttrs,function(h){if(A.containsValue(f,h,p)){if(!q){var m=w.filter(A.getValues(f,h),function(H){return H!=
p});A.setValues(f,h,m)}y=h}});if(l)if("number"==typeof u){var d=A.getValues(l,y).slice();d.splice(u,0,p);A.setValues(l,y,d)}else A.setValues(l,y,A.getValues(l,y).concat(p))},onChange:function(){},onChildrenChange:function(){},onDelete:function(){},onNewItem:function(p,f){f&&this.getChildren(f.item,t.hitch(this,function(l){this.onChildrenChange(f.item,l)}))},onDeleteItem:function(p){this.onDelete(p)},onSetItem:function(p,f){if(-1!=w.indexOf(this.childrenAttrs,f))this.getChildren(p,t.hitch(this,function(l){this.onChildrenChange(p,
l)}));else this.onChange(p)}})})},"dijit/tree/ForestStoreModel":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/kernel","dojo/_base/lang","./TreeStoreModel"],function(w,F,k,t,p){return F("dijit.tree.ForestStoreModel",p,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(f){this.root={store:this,root:!0,id:f.rootId,label:f.rootLabel,children:f.rootChildren}},mayHaveChildren:function(f){return f===this.root||this.inherited(arguments)},getChildren:function(f,l,q){f===
this.root?this.root.children?l(this.root.children):this.store.fetch({query:this.query,onComplete:t.hitch(this,function(u){this.root.children=u;l(u)}),onError:q}):this.inherited(arguments)},isItem:function(f){return f===this.root?!0:this.inherited(arguments)},fetchItemByIdentity:function(f){if(f.identity==this.root.id){var l=f.scope||k.global;f.onItem&&f.onItem.call(l,this.root)}else this.inherited(arguments)},getIdentity:function(f){return f===this.root?this.root.id:this.inherited(arguments)},getLabel:function(f){return f===
this.root?this.root.label:this.inherited(arguments)},newItem:function(f,l,q){return l===this.root?(this.onNewRootItem(f),this.store.newItem(f)):this.inherited(arguments)},onNewRootItem:function(){},pasteItem:function(f,l,q,u,A){if(l===this.root&&!u)this.onLeaveRoot(f);this.inherited(arguments,[f,l===this.root?null:l,q===this.root?null:q,u,A]);if(q===this.root)this.onAddToRoot(f)},onAddToRoot:function(f){console.log(this,": item ",f," added to root")},onLeaveRoot:function(f){console.log(this,": item ",
f," removed from root")},_requeryTop:function(){var f=this.root.children||[];this.store.fetch({query:this.query,onComplete:t.hitch(this,function(l){this.root.children=l;if(f.length!=l.length||w.some(f,function(q,u){return l[u]!=q}))this.onChildrenChange(this.root,l)})})},onNewItem:function(f,l){this._requeryTop();this.inherited(arguments)},onDeleteItem:function(f){-1!=w.indexOf(this.root.children,f)&&this._requeryTop();this.inherited(arguments)},onSetItem:function(f,l,q,u){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(w,F,k,t,p,f,l,q,u,A,y){return F("dijit.tree._dndSelector",y,{constructor:function(){this.selection={};this.anchor=null;this.events.push(q(this.tree.domNode,u.press,t.hitch(this,"onMouseDown")),q(this.tree.domNode,u.release,t.hitch(this,"onMouseUp")),q(this.tree.domNode,u.move,t.hitch(this,
"onMouseMove")),q(this.tree.domNode,A.press,t.hitch(this,"onClickPress")),q(this.tree.domNode,A.release,t.hitch(this,"onClickRelease")))},singular:!1,getSelectedTreeNodes:function(){var d=[],h=this.selection,m;for(m in h)d.push(h[m]);return d},selectNone:function(){this.setSelection([]);return this},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null},addTreeNode:function(d,h){this.setSelection(this.getSelectedTreeNodes().concat([d]));h&&(this.anchor=d);return d},removeTreeNode:function(d){var h=
w.filter(this.getSelectedTreeNodes(),function(m){return!f.isDescendant(m.domNode,d.domNode)});this.setSelection(h);return d},isTreeNodeSelected:function(d){return d.id&&!!this.selection[d.id]},setSelection:function(d){var h=this.getSelectedTreeNodes();w.forEach(this._setDifference(h,d),t.hitch(this,function(m){m.setSelected(!1);this.anchor==m&&delete this.anchor;delete this.selection[m.id]}));w.forEach(this._setDifference(d,h),t.hitch(this,function(m){m.setSelected(!0);this.selection[m.id]=m}));this._updateSelectionProperties()},
_setDifference:function(d,h){w.forEach(h,function(m){m.__exclude__=!0});d=w.filter(d,function(m){return!m.__exclude__});w.forEach(h,function(m){delete m.__exclude__});return d},_updateSelectionProperties:function(){var d=this.getSelectedTreeNodes(),h=[],m=[];w.forEach(d,function(H){var K=H.getTreePath();m.push(H);h.push(K)},this);d=w.map(m,function(H){return H.item});this.tree._set("paths",h);this.tree._set("path",h[0]||[]);this.tree._set("selectedNodes",m);this.tree._set("selectedNode",m[0]||null);
this.tree._set("selectedItems",d);this.tree._set("selectedItem",d[0]||null)},onClickPress:function(d){if(!(this.current&&this.current.isExpandable&&this.tree.isExpandoNode(d.target,this.current))){"mousedown"==d.type&&l.isLeft(d)&&d.preventDefault();var h="keydown"==d.type?this.tree.focusedChild:this.current;if(h){var m=p.getCopyKeyState(d),H=h.id;this.singular||d.shiftKey||!this.selection[H]?(this._doDeselect=!1,this.userSelect(h,m,d.shiftKey)):this._doDeselect=!0}}},onClickRelease:function(d){this._doDeselect&&
(this._doDeselect=!1,this.userSelect("keyup"==d.type?this.tree.focusedChild:this.current,p.getCopyKeyState(d),d.shiftKey))},onMouseMove:function(){this._doDeselect=!1},onMouseDown:function(){},onMouseUp:function(){},_compareNodes:function(d,h){if(d===h)return 0;if("sourceIndex"in document.documentElement)return d.sourceIndex-h.sourceIndex;if("compareDocumentPosition"in document.documentElement)return d.compareDocumentPosition(h)&2?1:-1;if(document.createRange){var m=doc.createRange();m.setStartBefore(d);
d=doc.createRange();d.setStartBefore(h);return m.compareBoundaryPoints(m.END_TO_END,d)}throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");},userSelect:function(d,h,m){if(this.singular)this.anchor==d&&h?this.selectNone():(this.setSelection([d]),this.anchor=d);else if(m&&this.anchor){h=this._compareNodes(this.anchor.rowNode,d.rowNode);m=this.anchor;0>h?h=m:(h=d,d=m);for(m=[];h!=d;)m.push(h),h=this.tree._getNext(h);m.push(d);this.setSelection(m)}else this.selection[d.id]&&
h?this.removeTreeNode(d):h?this.addTreeNode(d,!0):(this.setSelection([d]),this.anchor=d)},getItem:function(d){return{data:this.selection[d],type:["treeNode"]}},forInSelectedItems:function(d,h){h=h||k.global;for(var m in this.selection)d.call(h,this.getItem(m),m,this)}})})},"dijit/tree/_dndContainer":function(){define("dojo/aspect dojo/_base/declare dojo/dom-class dojo/_base/lang dojo/on dojo/touch".split(" "),function(w,F,k,t,p,f){return F("dijit.tree._dndContainer",null,{constructor:function(l,q){this.tree=
l;this.node=l.domNode;t.mixin(this,q);this.containerState="";k.add(this.node,"dojoDndContainer");this.events=[p(this.node,f.enter,t.hitch(this,"onOverEvent")),p(this.node,f.leave,t.hitch(this,"onOutEvent")),w.after(this.tree,"_onNodeMouseEnter",t.hitch(this,"onMouseOver"),!0),w.after(this.tree,"_onNodeMouseLeave",t.hitch(this,"onMouseOut"),!0),p(this.node,"dragstart, selectstart",function(u){u.preventDefault()})]},destroy:function(){for(var l;l=this.events.pop();)l.remove();this.node=this.parent=
null},onMouseOver:function(l){this.current=l},onMouseOut:function(){this.current=null},_changeState:function(l,q){var u="dojoDnd"+l;l=l.toLowerCase()+"State";k.replace(this.node,u+q,u+this[l]);this[l]=q},_addItemClass:function(l,q){k.add(l,"dojoDndItem"+q)},_removeItemClass:function(l,q){k.remove(l,"dojoDndItem"+q)},onOverEvent:function(){this._changeState("Container","Over")},onOutEvent:function(){this._changeState("Container","")}})})},"jimu/dijit/QueryableLayerChooserFromMap":function(){define(["dojo/_base/lang",
"dojo/_base/html","dojo/_base/declare","./LayerChooserFromMap"],function(w,F,k,t){return k([t],{baseClass:"jimu-queryable-layer-chooser-from-map",declaredClass:"jimu.dijit.QueryableLayerChooserFromMap",showImageLayer:!0,mustSupportStatistics:!1,ignoreVirtualLayer:!1,postMixInProperties:function(){this.inherited(arguments);this.filter=this.showImageLayer?t.createQueryableLayerFilter(this.mustSupportStatistics):t.createFeaturelayerFilter(["point","polyline","polygon"],!1,!0,this.mustSupportStatistics);
this.ignoreVirtualLayer&&(this.filter=t.andCombineFilters([this.filter,w.hitch(this,this._ignoreVirtualLayerFilter)]))},_ignoreVirtualLayerFilter:function(p){return p.getLayerType().then(function(f){return!("ArcGISDynamicMapServiceLayer"===f||"ArcGISTiledMapServiceLayer"===f||"GroupLayer"===f)})},postCreate:function(){this.inherited(arguments);F.addClass(this.domNode,"jimu-basic-layer-chooser-from-map")},getHandledItem:function(p){var f=this.inherited(arguments),l=p&&p.layerInfo;l=l&&l.layerObject;
f.url=l&&l.url||"";return f}})})},"jimu/dijit/ToggleButton":function(){define("dojo/_base/declare dijit/_WidgetBase dojo/_base/lang dojo/_base/html dojo/on dojo/keys dojo/Evented".split(" "),function(w,F,k,t,p,f,l){return w([F,l],{baseClass:"jimu-toggle-button",declaredClass:"jimu.dijit.ToggleButton",checked:!1,postCreate:function(){var q=this.toggleTips?this.toggleTips:window.jimuNls.toggleButton;this.toggleTips={"true":q.toggleOn,"false":q.toggleOff};t.setAttr(this.domNode,"role","button");t.setAttr(this.domNode,
"tabindex","0");this._setDomNodeAttrs();this.innerNode=t.create("div",{"class":"inner"},this.domNode);this.checked&&t.addClass(this.domNode,"checked");this.own(p(this.domNode,"click",k.hitch(this,function(){this.toggle()})));this.own(p(this.domNode,"keydown",k.hitch(this,function(u){u.keyCode!==f.ENTER&&u.keyCode!==f.SPACE||this.toggle()})))},_setDomNodeAttrs:function(){t.setAttr(this.domNode,"aria-label",this.toggleTips[!this.checked+""]);t.setAttr(this.domNode,"aria-pressed",this.checked+"")},resetToggleTips:function(q){this.toggleTips=
{"true":q.toggleOn,"false":q.toggleOff};this._setDomNodeAttrs()},check:function(){this.checked=!0;t.addClass(this.domNode,"checked");this._setDomNodeAttrs();this.emit("change",this.checked)},uncheck:function(){this.checked=!1;t.removeClass(this.domNode,"checked");this._setDomNodeAttrs();this.emit("change",this.checked)},toggle:function(){this.checked?this.uncheck():this.check()},setValue:function(q){this.checked!==q&&this.toggle()}})})},"dojo/NodeList":function(){define(["./query"],function(w){return w.NodeList})},
"widgets/Filter/_build-generate_module":function(){define(["dojo/text!./Widget.html","dojo/text!./css/style.css","dojo/i18n!./nls/strings"],function(){})},"url:jimu/dijit/templates/LayerChooserFromMapWithDropbox.html":'\x3cdiv\x3e\r\n\x3ctable role\x3d"listbox" aria-haspopup\x3d"true" data-dojo-attach-point\x3d"dropDownBtn" data-dojo-attach-event\x3d"onclick: _onDropDownClick,onkeydown: _onDropDownKeydown"\r\n  tabindex\x3d"0" title\x3d"${nls.customSelectLayer}" aria-label\x3d"${nls.customSelectLayer}"\x3e\r\n    \x3ccaption class\x3d"screen-readers-only-no-position"\x3e${nls.customSelectLayer}\x3c/caption\x3e\r\n    \x3ccolgroup\x3e\r\n      \x3ccol width\x3d"10px"\x3e\x3c/col\x3e\r\n      \x3ccol width\x3d"auto"\x3e\x3c/col\x3e\r\n      \x3ccol width\x3d"30px"\x3e\x3c/col\x3e\r\n    \x3c/colgroup\x3e\r\n    \x3ctbody\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd\x3e\x3c/td\x3e\r\n        \x3ctd\x3e\r\n          \x3cdiv class\x3d"layer-name jimu-ellipsis" data-dojo-attach-point\x3d"layerNameNode"\x3e\x3c/div\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd\x3e\r\n          \x3cdiv class\x3d"drop-select jimu-float-trailing" data-dojo-attach-point\x3d"dropArrowNode"\x3e\r\n            \x3cdiv class\x3d"jimu-icon jimu-icon-down-arrow-8"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n    \x3c/tbody\x3e\r\n  \x3c/table\x3e\r\n\x3c/div\x3e\r\n',
"url:jimu/dijit/templates/_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:widgets/Filter/Widget.html":'\x3cdiv\x3e\r\n  \x3cdiv class\x3d"filter-list-container" data-dojo-attach-point\x3d"filterListContainerNode"\x3e\r\n    \x3cul class\x3d"filter-list" data-dojo-attach-point\x3d"filterList"\x3e\x3c/ul\x3e\r\n\r\n  \x3c/div\x3e\r\n  \x3cdiv role\x3d"button" aria-haspopup\x3d"true" class\x3d"action-icon group-icon absolute-icon" data-dojo-attach-point\x3d"showFilterActionsButtonNode" data-dojo-attach-event\x3d"onclick:_onShowFilterActionsClick, onkeydown:_onShowFilterActionsKeydown" title\x3d"${nls.filterActions}" tabindex\x3d"0"\x3e\x3c/div\x3e\r\n  \x3cdiv class\x3d"filter-actions-container" data-dojo-attach-point\x3d"filterActionsPopup"\x3e\r\n    \x3cdiv class\x3d"filter-actions-flex-container"\x3e\r\n      \x3cdiv role\x3d"button" class\x3d"action-icon turn-off-icon" data-dojo-attach-point\x3d"showTurnOffAllButtonNode" data-dojo-attach-event\x3d"onclick:_onShowTurnOffAllClick, onkeydown:_onShowTurnOffAllKeydown" title\x3d"${nls.turnOffAll}" tabindex\x3d"0"\x3e\x3c/div\x3e\r\n      \x3cdiv role\x3d"button" class\x3d"action-icon reset-all-icon" data-dojo-attach-point\x3d"showResetAllButtonNode" data-dojo-attach-event\x3d"onclick:_onShowResetAllClick, onkeydown:_onShowResetAllKeydown" title\x3d"${nls.resetAll}" tabindex\x3d"0"\x3e\x3c/div\x3e\r\n      \x3cdiv role\x3d"button" class\x3d"action-icon custom-icon" data-dojo-attach-point\x3d"showCustomButtonNode" data-dojo-attach-event\x3d"onclick:_onShowCustomClick, onkeydown:_onShowCustomKeydown" title\x3d"${nls.createCustomFilter}" tabindex\x3d"0"\x3e\x3c/div\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n\r\n  \x3cdiv class\x3d"custom-filter" data-dojo-attach-point\x3d"customFilterContainerNode"\x3e\r\n    \x3cdiv class\x3d"title-part"\x3e\r\n      \x3cspan role\x3d"button" tabindex\x3d"0" class\x3d"back-list" data-dojo-attach-point\x3d"customBackNode" data-dojo-attach-event\x3d"click:_onBackToListClick,keydown:_onBackToListKeydown"\x3e\x3c/span\x3e\r\n      \x3cspan\x3e${nls.customFilter}\x3c/span\x3e\r\n      \x3cdiv class\x3d"toggle-filter" data-dojo-type\x3d"jimu/dijit/ToggleButton" data-dojo-props\x3d"checked:true,toggleTips:{toggleOn:\'${nls.toggleOn}\',toggleOff:\'${nls.toggleOff}\'}" title\x3d"${nls.toggleCustomFilter}" data-dojo-attach-event\x3d"change:_onCustomFilterToggle" data-dojo-attach-point\x3d"customFilterToggleButton"\x3e\x3c/div\x3e\r\n    \x3c/div\x3e\r\n\r\n    \x3cdiv class\x3d"layer-part"\x3e\r\n      \x3cdiv class\x3d"layer-title"\x3e${jimuNls.common.layer}\x3c/div\x3e\r\n      \x3cdiv class\x3d"layer-select" data-dojo-attach-point\x3d"layerSelectNode"\x3e\x3c/div\x3e\r\n    \x3c/div\x3e\r\n\r\n    \x3cdiv class\x3d"custom-filter-node" data-dojo-attach-point\x3d"customFilterNode"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n\r\n\x3c/div\x3e',
"url:widgets/Filter/css/style.css":".jimu-widget-filter {position: relative; width: auto; margin: -14px; overflow-y: hidden; height: calc(100% + 10px);}.jimu-widget-filter.has-filter-actions{height: calc(100% + 22px);}.jimu-ismobile .jimu-widget-filter.has-filter-actions{height: 100%; margin-top: 0; margin-bottom: 0;}.jimu-widget-filter .filter-list-container{height: 100%;}.jimu-widget-filter.has-filter-actions .filter-list-container{height: calc(100% - 40px);}.jimu-widget-filter .filter-list{height: 100%; overflow-y: auto;}.jimu-widget-filter .filter-list,.jimu-widget-filter .filter-list li {margin: 0; padding: 0;}.jimu-widget-filter .filter-list li {list-style: none;}.jimu-widget-filter .filter-list .filter-item{border-bottom: 1px solid #eee; font-size: 12px; overflow: hidden;}.jimu-widget-filter .filter-list .filter-item.config-parameters{background-color: #f3f3f3;}.jimu-widget-filter .filter-list .filter-item.config-parameters + .filter-item.config-parameters{padding-top: 4px; background-clip: content-box;}.jimu-widget-filter .filter-list .filter-item .header{vertical-align: middle; padding: 12px 5px; min-height: 40px; cursor: pointer; position: relative;}.jimu-widget-filter .filter-list .filter-item .header:hover{background-color: #eee;}.jimu-widget-filter .filter-list .filter-item.config-parameters .header .item-title{font-family: 'Avenir Medium', Verdana, Geneva, sans-serif;}.jimu-widget-filter .filter-list .filter-item .body{display: none;}.jimu-widget-filter .filter-list .filter-item.config-parameters .body{display: block;}.jimu-widget-filter .filter-list .filter-item .header\x3e*{display: inline-block; vertical-align: middle; word-break: break-word;}.jimu-widget-filter .filter-list .filter-item .header\x3e.icon{vertical-align: top;}.jimu-widget-filter .filter-list .filter-item .header:after{content: \"\"; height: 100%; min-height: 16px; vertical-align: top; display: inline-block;}.jimu-widget-filter .filter-list .filter-item .header .icon{width: 16px; height: 16px; margin-right: 10px;}.jimu-widget-filter .filter-list .filter-item .header .symbolIcon{margin-top: 3px;}.jimu-rtl .jimu-widget-filter .filter-list .filter-item .header .icon{margin-right: 0; margin-left: 10px;}.jimu-widget-filter .filter-list .filter-item .header .icon img{width: 100%; height: 100%;}.jimu-widget-filter .filter-list .filter-item .header .toggle-filter{position: absolute; top: 14px; right: 0;}.jimu-rtl .jimu-widget-filter .filter-list .filter-item .header .toggle-filter{left: 0; right: auto;}.jimu-widget-filter .filter-list .filter-item .header .arrow{content: ''; border-radius: 50%; width: 16px; height: 16px; top: 12px; text-indent: -9999em; background: url('./images/arrow_normal.svg') no-repeat center; z-index: 10;}.jimu-widget-filter .filter-list .filter-item .header .arrow:hover{background: url('./images/arrow_hover.svg') no-repeat center;}.jimu-widget-filter .filter-list .filter-item.config-parameters .header .arrow{transform: rotate(90deg);}.jimu-widget-filter .filter-list .filter-item.not-has-ask-for-value .header .arrow{background: transparent !important;}.jimu-widget-filter .filter-list .filter-item .header .error{content: ''; width: 16px; height: 16px; top: 12px; text-indent: -9999em; background: url('./images/error_default.png') no-repeat center; z-index: 10;}.jimu-widget-filter .filter-list .filter-item .body .parameters{margin: 0 30px;}.jimu-widget-filter .filter-list .filter-item .body .jimu-btn{background: #fff; border-radius: 0; width: 82px; border: 1px solid #c7c7c7; color: #000; font-size: 12px; margin-bottom: 15px;}.jimu-widget-filter .filter-list .filter-item .body .jimu-btn:hover{border: 1px solid #000;}.jimu-widget-filter .jimu-loading-shelter .loading-container{width: auto;}.jimu-widget-filter.not-exist-ask-for-value .filter-list .filter-item .arrow{display: none;}.jimu-widget-filter .action-icon{width: 30px; height: 30px; border-radius: 20px; background-color: #333; border: 2px solid rgba(255, 255, 255, 0.5); background-position: center; background-repeat: no-repeat; cursor: pointer;}.jimu-widget-filter .action-icon:hover{background-color: #666;}.jimu-widget-filter .action-icon.group-icon{position: absolute; bottom: 1px; right: 20px; background-image: url(images/filter_actions.svg); display: none;}.jimu-ismobile .jimu-widget-filter .action-icon.group-icon{bottom: 4px;}.jimu-widget-filter .action-icon.group-icon.active{background-image: url(images/filter_actions_close.svg);}.jimu-rtl .jimu-widget-filter .action-icon.group-icon{left: 20px; right: auto;}.jimu-widget-filter .filter-actions-container{display: none; position: absolute; bottom: 1px; right: 55px;}.jimu-rtl .jimu-widget-filter .filter-actions-container{right: 0; right: auto; left: 55px;}.jimu-widget-filter .filter-actions-container .filter-actions-flex-container{display: flex;}.jimu-ismobile .jimu-widget-filter .filter-actions-container{bottom: 4px;}.jimu-widget-filter .filter-actions-container .action-icon{display: none; margin-left: 5px;}.jimu-rtl .jimu-widget-filter .filter-actions-container .action-icon{margin-left: 0; margin-right: 5px;}.jimu-widget-filter .filter-actions-container .action-icon.custom-icon{background-image: url(images/custom_filter.svg);}.jimu-widget-filter .filter-actions-container .action-icon.reset-all-icon{background-image: url(images/reset_all.svg);}.jimu-widget-filter .filter-actions-container .action-icon.turn-off-icon{background-image: url(images/turn_off_all.svg);}.jimu-rtl .jimu-widget-filter .filter-actions-container .action-icon.turn-off-icon{transform: rotateY(180deg);}.jimu-widget-filter .filter-actions-container .action-icon.absolute-icon{display: block; position: absolute; right: -35px; bottom: 0px;}.jimu-rtl .jimu-widget-filter .filter-actions-container .action-icon.absolute-icon{left: -35px; right: auto;}.jimu-widget-filter .custom-filter{display: none; height: 100%; position: relative;}.jimu-widget-filter .custom-filter .title-part{text-align: center; font-size: 16px; height: 50px; position: relative; border-bottom: 1px solid #ccc;}.jimu-widget-filter .custom-filter .title-part span{height: 50px; line-height: 50px;}.jimu-widget-filter .custom-filter .title-part .back-list{display: inline-block; height: 20px; width: 13px; position: absolute; left: 20px; cursor: pointer; margin-top: 15px; background: url(images/arrow_left_normal.svg);}.jimu-widget-filter .custom-filter .title-part .back-list:hover{background: url(images/arrow_left_hover.svg);}.jimu-rtl .jimu-widget-filter .custom-filter .title-part .back-list{right: 20px; left: auto; transform: rotate(180deg);}.jimu-widget-filter .custom-filter .custom-filter-node{height: calc(100% - 100px);}.jimu-widget-filter .custom-filter .layer-part{font-size: 14px; position: relative; margin: 10px 20px; display: flex;}.jimu-widget-filter .custom-filter .layer-part .layer-title{height: 30px; line-height: 30px; flex: 0 0 80px; white-space: nowrap;}.jimu-widget-filter .custom-filter .layer-part .layer-select{margin-left: 10px;}.jimu-widget-filter .custom-filter .toggle-filter{position: absolute; right: 20px; top: 15px;}.jimu-rtl .jimu-widget-filter .custom-filter .toggle-filter{left: 20px; right: auto;}.jimu-widget-filter .filter-list .filter-layer-name {color: #999; background: #fff; line-height: 44px; font-size: 14px; padding-left: 10px; border-bottom: 1px solid #eee; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}@-webkit-keyframes load8 {0% {-webkit-transform: rotate(0deg); transform: rotate(0deg);} 100% {-webkit-transform: rotate(360deg); transform: rotate(360deg);}}@-moz-keyframes load8 {0% {-moz-transform: rotate(0deg); transform: rotate(0deg);} 100% {-moz-transform: rotate(360deg); transform: rotate(360deg);}}@-ms-keyframes load8 {0% {-ms-transform: rotate(0deg); transform: rotate(0deg);} 100% {-ms-transform: rotate(360deg); transform: rotate(360deg);}}@keyframes load8 {0% {-webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); -moz-transform: rotate(0deg); transform: rotate(0deg);} 100% {-webkit-transform: rotate(360deg); -ms-transform: rotate(360deg); -moz-transform: rotate(360deg); transform: rotate(360deg);}}",
"*now":function(w){w(['dojo/i18n!*preload*widgets/Filter/nls/Widget*["ar","bs","ca","cs","da","de","en","el","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nb","nl","pl","pt-br","pt-pt","ro","ru","sk","sl","sr","sv","th","tr","zh-cn","uk","vi","zh-hk","zh-tw","ROOT"]'])},"*noref":1}});
define("dojo/_base/declare dojo/_base/array dojo/_base/html dojo/_base/lang dojo/topic esri/geometry/Extent esri/SpatialReference dojo dojo/query dojo/on dojo/keys dijit/focus dijit/_WidgetsInTemplateMixin jimu/utils jimu/BaseWidget jimu/filterUtils jimu/dijit/FilterParameters jimu/LayerInfos/LayerInfos jimu/FilterManager esri/symbols/jsonUtils jimu/symbolUtils jimu/dijit/LayerChooserFromMapWithDropbox jimu/dijit/Filter ./CustomFeaturelayerChooserFromMap jimu/dijit/ToggleButton dojo/NodeList dojo/NodeList-dom".split(" "),function(w,
F,k,t,p,f,l,q,u,A,y,d,h,m,H,K,Q,x,B,g,r,C,E,N,M){return w([H,h],{name:"Filter",baseClass:"jimu-widget-filter",_itemTemplate:'\x3cli class\x3d"filter-item" data-index\x3d"${index}"\x3e\x3cdiv class\x3d"header" \x3e\x3cspan class\x3d"arrow jimu-float-leading jimu-trailing-margin05" title\x3d"${toggleTip}" \x3e\x3c/span\x3e\x3cspan class\x3d"icon"\x3e\x3cimg src\x3d"${icon}" /\x3e\x3c/span\x3e\x3cspan class\x3d"icon symbolIcon" style\x3d"display:none;"\x3e\x3c/span\x3e\x3cspan class\x3d"item-title"\x3e${title}\x3c/span\x3e\x3cspan class\x3d"toggle-filter jimu-trailing-margin1"\x3e\x3c/span\x3e\x3c/div\x3e\x3cdiv class\x3d"body"\x3e\x3cdiv class\x3d"parameters"\x3e\x3c/div\x3e\x3c/div\x3e\x3c/li\x3e',
_store:null,homeExtent:null,postMixInProperties:function(){this.jimuNls=window.jimuNls},postCreate:function(){this.inherited(arguments);this._store={};this.layerInfosObj=x.getInstanceSync();this.filterUtils=new K;this.filterManager=B.getInstance();this.initFilterActions();this.initAllFilters()||k.addClass(this.domNode,"not-exist-ask-for-value");this.own(p.subscribe("appConfigChanged",t.hitch(this,this.onAppConfigChanged)))},onAppConfigChanged:function(b,e,n){"mapOptionsChange"===e&&n&&b&&n.extent&&
(this.homeExtent=new f(n.extent))},startup:function(){this.inherited(arguments);this.resize();var b=this.appConfig&&this.appConfig.map&&this.appConfig.map.mapOptions&&this.appConfig.map.mapOptions.extent;this.homeExtent=b?new f(b.xmin,b.ymin,b.xmax,b.ymax,new l(b.spatialReference)):this.map._initialExtent||this.map.extent},initFilterActions:function(){this.filterActions=[];this.config.allowTurnOffAll&&(k.setStyle(this.showTurnOffAllButtonNode,"display","block"),this.filterActions.push(this.showTurnOffAllButtonNode));
this.config.allowResetAll&&(k.setStyle(this.showResetAllButtonNode,"display","block"),this.filterActions.push(this.showResetAllButtonNode));this.config.allowCustom?(this.filterActions.push(this.showCustomButtonNode),k.setStyle(this.showCustomButtonNode,"display","block"),this.own(A(this.customFilterContainerNode,"keydown",t.hitch(this,function(e){e.keyCode===y.ESCAPE&&(e.stopPropagation(),d.focus(this.customBackNode))})))):(k.setAttr(this.showTurnOffAllButtonNode,"title",this.nls.turnOffAllForNoCustom),
k.setAttr(this.showResetAllButtonNode,"title",this.nls.resetAllForNoCustom));if(0!==this.filterActions.length){k.addClass(this.domNode,"has-filter-actions");if(1===this.filterActions.length){k.addClass(this.filterActions[0],"absolute-icon");k.setStyle(this.filterActionsPopup,"display","block");var b=this.filterActions[0]}else 1<this.filterActions.length&&(k.setStyle(this.showFilterActionsButtonNode,"display","block"),b=this.showFilterActionsButtonNode,this.own(A(this.filterActionsPopup,"keydown",
t.hitch(this,function(e){if(e.keyCode===y.TAB){var n=this.filterActions[this.filterActions.length-1];e.shiftKey&&e.target===this.filterActions[0]?(e.preventDefault(),n.focus()):e.shiftKey||e.target!==n||(e.preventDefault(),this.filterActions[0].focus())}else e.keyCode===y.ESCAPE&&(e.preventDefault(),e.stopPropagation(),this._onShowFilterActionsClick())}))),this.own(A(document.body,"click",t.hitch(this,function(e){if("block"===k.getStyle(this.filterActionsPopup,"display")){var n=k.isDescendant(e.target,
this.filterActionsPopup);e.target===this.showFilterActionsButtonNode||n||this._onShowFilterActionsClick()}}))));m.initLastFocusNode(this.domNode,b)}},_onShowFilterActionsClick:function(b){b&&b.preventDefault();k.hasClass(this.showFilterActionsButtonNode,"active")?(k.setAttr(this.showFilterActionsButtonNode,"title",this.nls.filterActions),k.removeClass(this.showFilterActionsButtonNode,"active"),k.setStyle(this.filterActionsPopup,"display","none"),d.focus(this.showFilterActionsButtonNode)):(k.setAttr(this.showFilterActionsButtonNode,
"title",this.jimuNls.common.close),k.addClass(this.showFilterActionsButtonNode,"active"),k.setStyle(this.filterActionsPopup,"display","block"),d.focus(this.filterActions[0]))},_onShowFilterActionsKeydown:function(b){b.keyCode!==y.ENTER&&b.keyCode!==y.SPACE||this._onShowFilterActionsClick(b)},initAllFilters:function(){var b=!1,e=this.config.filters;if(this.config.groupByLayer){var n={};F.forEach(e,function(U){n[U.layerId]||(n[U.layerId]=[]);n[U.layerId].push(U)},this);e="";for(var D in n)e=D;for(var L in n){D=
this.layerInfosObj.getLayerInfoById(L);var G=document.createElement("div");k.addClass(G,"filter-layer-name");G.innerText=D.title;k.place(G,this.filterList);b=this._initFilters(n[L],b,L===e?!0:!1)}}else b=this._initFilters(e,b,!0);return b},_initFilters:function(b,e,n){n=0<this.filterActions.length?!1:n;var D=0,L=b.length;F.forEach(b,function(G,U){var X=this.filterUtils.isAskForValues(G.filter);X&&(e=!0);var V={icon:G.icon?m.processUrlInWidgetConfig(G.icon,this.folderUrl):this.folderUrl+"/css/images/default_task_icon.png",
index:U,title:G.name,toggleTip:this.nls.toggleTip,hasValue:X?window.appInfo.isRunInMobile?"block !important":"":"none",isAskForValue:X,apply:t.getObject("jimuNls.common.apply",!1,window)||"Apply"};this._store[G.layerId]||(this._store[G.layerId]={mapFilterControls:{}});var R=t.replace(this._itemTemplate,V,/\$\{([^\}]+)\}/ig),J=k.toDom(R);k.place(J,this.filterList);J.currentLayerId=G.layerId;if(G.symbol){R=u(".icon",J);k.setStyle(R[0],"display","none");k.setStyle(R[1],"display","inline-block");var O=
g.fromJson(G.symbol),S=G.symbol.url||G.symbol.imageData;S?(O.setWidth(16),O.setHeight(16)):O.setSize(16);O=S?r.createSymbolNode(O):r.createSymbolNode(O,{width:17,height:17});k.place(O,R[1])}R=u(".toggle-filter",J)[0];O=new M({toggleTips:{toggleOn:G.name+" "+this.nls.toggleOn,toggleOff:G.name+" "+this.nls.toggleOff}},R);O.startup();J.toggleButton=O;O=u(".header",J);this.own(O.on("click",t.hitch(this,"toggleFilter",J,G,V)));this.own(O.on("keydown",t.hitch(this,function(a){var c=a.target||a.srcElement;
k.hasClass(c,"arrow")||k.hasClass(c,"error")||a.keyCode!==y.ENTER&&a.keyCode!==y.SPACE||(a.preventDefault(),this.toggleFilter(J,G,V))})));O=null;S=u(".arrow",J);X?(k.addClass(J,"has-ask-for-value"),k.setAttr(S[0],"tabindex",0),0===U&&(m.initFirstFocusNode(this.domNode,S[0]),O=S[0])):(k.addClass(J,"not-has-ask-for-value"),0===U&&(m.initFirstFocusNode(this.domNode,R),O=R));O&&this.own(A(O,"keydown",t.hitch(this,function(a){this.isLastFilterHidden&&a.shiftKey&&a.keyCode===y.TAB&&d.focus(this.lastToggleBtn)})));
n&&D===L-1&&k.setAttr(J,"data-isLastNode","yes");"none"!==V.hasValue?(this.own(S.on("click",t.hitch(this,"configFilter",J,G))),this.own(S.on("keydown",t.hitch(this,function(a){a.keyCode===y.ENTER&&this.configFilter(J,G)}))),k.addClass(J,"requesting"),this.configFilter(J,G,null,t.hitch(this,function(a,c){c?this._setFilterNodeError(J,G.layerId):(G.collapse&&k.removeClass(J,"config-parameters"),G.autoApplyWhenWidgetOpen&&this.toggleFilter(J,G,V),"yes"===k.getAttr(J,"data-isLastNode")&&(a.then(t.hitch(this,
function(v){m.initLastFocusNode(this.domNode,v[v.length-1].domNode)})),this.isLastFilterHidden=!1,(a=u(".arrow",J)[0])&&this.own(A(a,"keydown",t.hitch(this,function(v){v.keyCode===y.ENTER&&(this.isLastFilterHidden=!this.isLastFilterHidden)}))),this.lastToggleBtn=u(".toggle-filter",J)[0],this.own(A(this.lastToggleBtn,"keydown",t.hitch(this,function(v){this.isLastFilterHidden&&!v.shiftKey&&v.keyCode===y.TAB&&(v.preventDefault(),m.focusFirstFocusNode(this.domNode))})))))}))):(G.autoApplyWhenWidgetOpen&&
this.toggleFilter(J,G,V),"yes"===k.getAttr(J,"data-isLastNode")&&m.initLastFocusNode(this.domNode,R));D++},this);return e},_setFilterNodeError:function(b,e){e=this.jimuNls.map.layerLoadedError.replace("${layers}",e);k.setAttr(b,"aria-disabled","true");k.removeClass(b,"config-parameters");k.removeClass(b,"has-ask-for-value");k.addClass(b,"not-has-ask-for-value");b=u(".arrow",b)[0];k.removeClass(b,"arrow");k.addClass(b,"error");k.setAttr(b,"title",e);k.setStyle(b,"display","block")},_getPriorityOfMapFilter:function(b){b=
t.getObject(b+".mapFilterControls",!1,this._store);var e=0,n;for(n in b){var D=b[n];D.priority>e&&(e=D.priority)}return e},_getMapFilterControl:function(b){b=t.getObject(b+".mapFilterControls",!1,this._store);var e=!0,n;for(n in b){var D=b[n];0<D.priority&&(e=!!D.enable)}return e},_setItemFilter:function(b,e,n,D){if(!this._store[b])return!0;this._store[b]["filter_item_"+e]=n;n=this._getPriorityOfMapFilter(b);t.setObject(b+".mapFilterControls.filter_item_"+e,{enable:D,priority:n+1},this._store)},_removeItemFilter:function(b,
e){if(!this._store[b])return!0;delete this._store[b]["filter_item_"+e];delete this._store[b].mapFilterControls["filter_item_"+e]},_getExpr:function(b){if(!this._store[b])return null;var e=[];b=this._store[b];for(var n in b){var D=b[n];D&&"mapFilterControls"!==n&&e.push("("+D+")")}return e.join(" "+this.config.taskOper+" ")},toggleFilter:function(b,e,n){if("true"===k.getAttr(b,"aria-disabled"))k.removeClass(b,"applied"),b.toggleButton.uncheck();else if(!k.hasClass(b,"config-parameters")||b.filterParams&&
b.filterParams.getFilterExpr())if(!n.isAskForValue||b.filterParams&&b.filterParams.getFilterExpr()){var D=!1;n=e.layerId;D=k.getAttr(b,"data-index");var L=k.hasClass(b,"applied");L?(k.removeClass(b,"applied"),b.toggleButton.uncheck()):(k.addClass(b,"applied"),b.toggleButton.check());L?D=this._removeItemFilter(n,D):(L=this._getFilterExpr(b,e),D=this._setItemFilter(n,D,L,e.enableMapFilter));D?(this._setFilterNodeError(b,n),k.removeClass(b,"applied"),b.toggleButton.uncheck()):(D=this._getExpr(n),L=this._getMapFilterControl(n),
this.filterManager.applyWidgetFilter(n,this.id,D,L,null,this.config.zoomto),this._afterFilterApplied(e.layerId,!b.toggleButton.checked))}else this.configFilter(b,e)},configFilter:function(b,e,n,D){if(k.hasClass(b,"has-ask-for-value")){if(b.filterParams)k.hasClass(b,"config-parameters")?(k.removeClass(b,"config-parameters"),this._changeItemTitleWidth(b,window.appInfo.isRunInMobile?60:45)):(k.addClass(b,"config-parameters"),this._changeItemTitleWidth(b,60)),D&&D();else{var L=this.layerInfosObj.getLayerInfoById(e.layerId);
L?L.getLayerObject().then(t.hitch(this,function(G){k.addClass(b,"config-parameters");k.removeClass(b,"requesting");var U=u(".parameters",b)[0];b.handles=[];b.filterParams=new Q;var X=t.clone(e.filter),V=null;e.enableMapFilter&&(V=e.layerId);X.wId=(this.isOnScreen?"widgets_Filter_Widget"+this.id:this.id)+"_"+G.id+"_"+k.getAttr(b,"data-index");G=b.filterParams.build(e.url,G,X,V,this.id);this.own(A(b.filterParams,"change",t.hitch(this,function(R){R?b.expr=R:delete b.expr;b.toggleButton.checked&&this.applyFilterValues(b,
e)})));b.expr=b.filterParams.getFilterExpr();b.filterParams.placeAt(U);this._changeItemTitleWidth(b,60);D&&D(G)})):D&&D(null,!0)}n&&n.target&&n.stopPropagation()}},applyFilterValues:function(b,e,n){var D=this._getFilterExpr(b,e);if(D){b.expr=D;D=e.layerId;var L=k.getAttr(b,"data-index");k.addClass(b,"applied");this._setItemFilter(D,L,b.expr,e.enableMapFilter);b=this._getExpr(D);L=this._getMapFilterControl(D);this.filterManager.applyWidgetFilter(D,this.id,b,L,null,this.config.zoomto);this._afterFilterApplied(e.layerId)}n&&
n.stopPropagation()},_getFilterExpr:function(b,e){return b.filterParams?b.filterParams.getFilterExpr():this.filterUtils.hasVirtualDate(e.filter)?(this.filterUtils.isHosted=m.isHostedService(e.url),this.filterUtils.getExprByFilterObj(e.filter)):e.filter.expr},_afterFilterApplied:function(b,e){if(this.config.zoomto||this.config.zoombackto){var n=this.layerInfosObj.getLayerInfoById(b);e&&this.config.zoombackto&&this._checkIfAllOffByLayer(b)?this.map.setExtent(this.homeExtent):this.config.zoomto&&n&&
n.zoomTo()}},_checkIfAllOffByLayer:function(b){var e=!0;if(this.config.allowCustom&&this.customFilterToggleButton.checked&&this.customFilter&&this.customFilter.featureLayerId===b){var n=this.customFilter.toJson();if(n&&0<n.parts.length)return!e}n=u("li",this.filterList);for(var D=0;D<n.length;D++){var L=n[D];if(L.toggleButton.checked&&L.currentLayerId===b){e=!1;break}}return e},_isValidExtent:function(b){return!(isNaN(b.xmax)||isNaN(b.xmax)||isNaN(b.xmax)||isNaN(b.xmax))},resize:function(){this.inherited(arguments);
this._changeItemTitleWidth(this.domNode,window.appInfo.isRunInMobile?60:70);this.customFilter&&this.customFilter.resize()},_changeItemTitleWidth:function(b,e){e+=30;var n=u(".header",b)[0];n&&(e=k.getContentBox(n).w-e,0<e&&u(".header .item-title",b).style({maxWidth:e+"px"}))},_hideFilterActions:function(b){var e=b?"none":"block";1<this.filterActions.length&&k.setStyle(this.showFilterActionsButtonNode,"display",e);this.filterActions.forEach(function(n){k.setStyle(n,"display",e)})},_onShowCustomClick:function(b){k.setStyle(this.customFilterContainerNode,
"display","block");k.setStyle(this.filterListContainerNode,"display","none");this._hideFilterActions(!0);if(!this.layerChooserSelect){var e=new N({showLayerFromFeatureSet:!1,showTable:!1,onlyShowVisible:!1,createMapResponse:this.map.webMapResponse});this.layerChooserSelect=new C({layerChooser:e});this.layerChooserSelect.placeAt(this.layerSelectNode);this.own(A(this.layerChooserSelect,"selection-change",t.hitch(this,this._onLayerChanged)));this.own(A(this.layerChooserSelect.dropDownBtn,"keydown",t.hitch(this,
function(n){n.shiftKey||n.keyCode!==y.TAB||null!==this.layerChooserSelect._selectedItem||(n.preventDefault(),d.focus(this.customBackNode))})));this.layerChooserSelect.showLayerChooser()}b.preventDefault();d.focus(this.customFilterToggleButton.domNode)},_onShowResetAllClick:function(){this._destroyFilterParams();this._unapplyFilterByStore();this._store={};q.empty(this.filterList);this.map.setExtent(this.homeExtent);this.initAllFilters()},_onShowTurnOffAllClick:function(){var b=!1,e=u("li",this.filterList);
e.some(function(n){if(n.toggleButton.checked)return b=!0});b&&(this._unapplyFilterByStore(),e.forEach(function(n){if(n.toggleButton.checked){k.removeClass(n,"applied");n.toggleButton.uncheck();var D=k.getAttr(n,"data-index");this._removeItemFilter(n.currentLayerId,D)}},this),this.map.setExtent(this.homeExtent))},_onShowCustomKeydown:function(b){b.keyCode!==y.ENTER&&b.keyCode!==y.SPACE||this._onShowCustomClick(b)},_onShowResetAllKeydown:function(b){b.keyCode!==y.ENTER&&b.keyCode!==y.SPACE||this._onShowResetAllClick(b)},
_onShowTurnOffAllKeydown:function(b){b.keyCode!==y.ENTER&&b.keyCode!==y.SPACE||this._onShowTurnOffAllClick(b)},_onLayerChanged:function(){var b=this.layerChooserSelect.getSelectedItem();b&&(b=b.layerInfo.layerObject,this.customFilter?this._applyCustomFilter(!0):(this.customFilter=new E({enableAskForValues:!1,featureLayerId:b.id,runtime:!0,widgetId:this.id}),this.customFilter.placeAt(this.customFilterNode),this.own(A(this.customFilter,"change",t.hitch(this,this._onCustomFilterChange))),this.own(A(this.customFilter.btnAddSetMobile,
"keydown",t.hitch(this,this._btnAddSetToToggleBtn)))),this.customFilter.build({url:b.url,featureLayerId:b.id,layerDefinition:b}),this.selectedLayer=b)},_btnAddSetToToggleBtn:function(b){b.shiftKey||b.keyCode!==y.TAB||(b.preventDefault(),d.focus(this.customBackNode))},_getLayerDefinitionForFilterDijit:function(b){var e=null;"esri.layers.FeatureLayer"===b.declaredClass&&(e=m.getFeatureLayerDefinition(b));e||(e={currentVersion:b.currentVersion,fields:t.clone(b.fields)});return e},_onBackToListClick:function(){k.setStyle(this.customFilterContainerNode,
"display","none");k.setStyle(this.filterListContainerNode,"display","block");this._hideFilterActions(!1);d.focus(this.showCustomButtonNode)},_onBackToListKeydown:function(b){b.keyCode===y.ENTER||b.keyCode===y.SPACE?this._onBackToListClick():b.shiftKey&&b.keyCode===y.TAB&&(b.preventDefault(),null===this.layerChooserSelect._selectedItem?d.focus(this.layerChooserSelect.dropDownBtn):k.hasClass(this.customFilter.mobileAddSection,"hidden")||d.focus(this.customFilter.btnAddSetMobile))},_onCustomFilterToggle:function(b){this.customFilter&&
(b?this._applyCustomFilter():(this.filterManager.applyWidgetFilter(this.selectedLayer.id,this.id+"-custom-filter","1\x3d1",!0,null,this.config.zoomto),this._afterFilterApplied(this.selectedLayer.id,!0)))},_onCustomFilterChange:function(){this._applyCustomFilter()},_applyCustomFilter:function(b){if(this.customFilterToggleButton.checked){var e=this.id+"-custom-filter",n=this.filterManager.getWidgetFilter(this.selectedLayer.id,e);b=b?"1\x3d1":this.customFilter.toValidJson().expr;!n&&"1\x3d1"===b||n===
b||(this.filterManager.applyWidgetFilter(this.selectedLayer.id,e,b,!0,null,this.config.zoomto),this._afterFilterApplied(this.selectedLayer.id))}},_destroyFilterParams:function(){u(".filter-item",this.filterList).forEach(function(b){b.filterParams&&b.filterParams.destroy();delete b.expr})},_unapplyFilterByStore:function(){if(this._store)for(var b in this._store)b&&this.filterManager.applyWidgetFilter(b,this.id,"",null,null,this.config.zoomto)},destroy:function(){this._destroyFilterParams();this._unapplyFilterByStore();
this.inherited(arguments)}})});