// 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/RelatedTableCharts/Search":function(){define("dojo/_base/declare dijit/_WidgetBase dojo/Evented dojo/_base/lang dojo/_base/array esri/dijit/Search dojo/dom-construct esri/tasks/locator esri/layers/FeatureLayer jimu/utils jimu/LayerInfos/LayerInfos ./searchSourceUtils dojo/when dojo/Deferred dojo/promise/all dojo/on esri/InfoTemplate dojo/query dojo/keys dojo/_base/event".split(" "),function(F,K,m,z,w,h,l,g,b,c,e,f,d,k,n,q,E,v,r,B){return F([K,m],{config:null,map:null,searchOptions:null,
layerInfosObj:null,_urlParams:{},constructor:function(u){z.mixin(this,u)},postCreate:function(){this._urlParams={}},startup:function(){this.inherited(arguments);e.getInstance(this.map,this.map.itemInfo).then(z.hitch(this,function(u){this.layerInfosObj=u;this.own(this.layerInfosObj.on("layerInfosFilterChanged",z.hitch(this,this.onLayerInfosFilterChanged)));f.setMap(this.map);f.setLayerInfosObj(this.layerInfosObj);f.setAppConfig(this.appConfig);d(f.getConfigInfo(this.config.searchSourceSettings)).then(z.hitch(this,
function(y){this.config.searchSourceSettings||(this.config.searchSourceSettings=y);return n(this._convertConfig(y)).then(function(G){return w.filter(G,function(I){return I})})})).then(z.hitch(this,function(y){this.domNode&&this._init(y)}))}))},_convertConfig:function(u){return w.map(u.sources,z.hitch(this,function(y){var G=new k;if(y&&y.url&&"locator"===y.type){var I={locator:new g(y.url||""),outFields:["*"],singleLineFieldName:y.singleLineFieldName||"",name:c.stripHTML(y.name||""),placeholder:c.stripHTML(y.placeholder||
""),countryCode:y.countryCode||"",maxSuggestions:y.maxSuggestions,maxResults:y.maxResults||6,zoomScale:y.zoomScale||5E4,useMapExtent:!!y.searchInCurrentMapExtent};y.enableLocalSearch&&(I.localSearchOptions={minScale:y.localSearchMinScale,distance:y.localSearchDistance});G.resolve(I)}else y&&y.url&&"query"===y.type?(I=new b(y.url||null,{outFields:["*"]}),this.own(q(I,"load",z.hitch(this,function(L){var M=L.layer;var S=this._getInfoTemplate(M,y,y.displayField);var X=null;y.searchFields&&0<y.searchFields.length?
X=y.searchFields:(X=[],w.forEach(M.fields,function(C){"esriFieldTypeOID"!==C.type&&C.name!==M.objectIdField&&"esriFieldTypeGeometry"!==C.type&&X.push(C.name)}));L={featureLayer:M,outFields:["*"],searchFields:X,displayField:y.displayField||"",exactMatch:!!y.exactMatch,name:c.stripHTML(y.name||""),placeholder:c.stripHTML(y.placeholder||""),maxSuggestions:y.maxSuggestions||6,maxResults:y.maxResults||6,zoomScale:y.zoomScale||5E4,infoTemplate:S,useMapExtent:!!y.searchInCurrentMapExtent,_featureLayerId:y.layerId};
S||delete L.infoTemplate;L._featureLayerId&&(S=this.layerInfosObj.getLayerInfoById(L._featureLayerId),M.setDefinitionExpression(S.getFilter()));G.resolve(L)}))),this.own(q(I,"error",function(){G.resolve(null)}))):G.resolve(null);return G}))},_getInfoTemplate:function(u,y,G){var I;var L=(I=this.layerInfosObj.getLayerInfoById(y.layerId))&&I.getInfoTemplate();var M=I&&L;if(I&&!M)return null;M||(L=new E,L.setTitle("\x26nbsp;"),L.setContent(z.hitch(this,"_formatContent",y.name,u,G)));return L},_init:function(u){var y=
1===u.length?0:"all";u={map:this.map,addLayersFromMap:!1,autoNavigate:!1,autoComplete:!0,minCharacters:0,searchDelay:100,enableInfoWindow:!0,enableHighlight:this.config.searchSourceSettings.showInfoWindowOnSelect,showInfoWindowOnSelect:this.config.searchSourceSettings.showInfoWindowOnSelect,allPlaceholder:c.stripHTML(this.config.searchSourceSettings.allPlaceholder),sources:u,activeSourceIndex:y};z.mixin(u,this.searchOptions);this._urlParams=this._getUrlParams();this.search=new h(u,l.create("div",
{"class":"searchControl"},this.domNode));this.own(this.search.on("load",z.hitch(this,this._load)));this.own(this.search.on("select-result",z.hitch(this,this._selectResult)));this.own(this.search.on("clear-search",z.hitch(this,this._clear)));this.own(this.search.on("search-results",z.hitch(this,this._results)));this.own(this.search.on("suggest-results",z.hitch(this,this._results)));this.search.startup()},_getUrlParams:function(){var u=c.urlToObject(document.location.href);u.query=u.query||{};return u.query},
setSearchText:function(u){this.search.set("value",u)},getSearchText:function(){return this.search.get("value")},getActiveSource:function(){return this.search.activeSource},clearSearchText:function(){this.search&&this.search.clear()},_setSearchString:function(){this._urlParams.find&&(this.search.set("value",this._urlParams.find),setTimeout(z.hitch(this,function(){this.search.search()}),1E3))},onLayerInfosFilterChanged:function(u){w.some(u,z.hitch(this,function(y){this.search&&this.search.sources&&
0<this.search.sources.length&&w.forEach(this.search.sources,function(G){G._featureLayerId===y.id&&G.featureLayer.setDefinitionExpression(y.getFilter())})}))},_load:function(u){this.emit("search-loaded",u);this._setSearchString()},_results:function(u){this.emit("search-results",u)},_clear:function(u){this.emit("clear-search",u)},_selectResult:function(u){this.search.blur();this.emit("select-result",u)},attachTabEventToSearchMenuItems:function(){if(this.search){var u=v(".sourcesMenu",this.search.domNode);
if(u&&0<u.length&&0<u[0].children.length&&(u=u[0].children[0])){var y=u.children;w.forEach(y,z.hitch(this,function(G,I){this.own(q(G,"keydown",z.hitch(this,function(L){L.keyCode===r.TAB&&I===y.length-1&&(B.stop(L),this.emit("setFirstFocusNode"))})))}))}}}})})},"esri/dijit/Search":function(){define("require dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Evented dojo/Deferred dojo/keys dojo/on dojo/query dojo/uacss dojo/regexp dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-style dojo/dom-construct dojo/date/locale dojo/i18n!../nls/jsapi dojo/text!./Search/templates/Search.html dijit/_WidgetBase dijit/_TemplatedMixin dijit/_FocusMixin dijit/a11yclick dijit/focus ../lang ../InfoTemplate ../kernel ../SpatialReference ../graphic ../promiseList ../symbols/PictureMarkerSymbol ../symbols/SimpleMarkerSymbol ../symbols/SimpleLineSymbol ../symbols/SimpleFillSymbol ../symbols/TextSymbol ../symbols/Font ../geometry/Point ../geometry/Extent ../geometry/normalizeUtils ../geometry/scaleUtils ../tasks/locator ../tasks/query ../Color ../styles/basic".split(" "),
function(F,K,m,z,w,h,l,g,b,c,e,f,d,k,n,q,E,v,r,B,u,y,G,I,L,M,S,X,C,H,O,R,P,N,Z,W,da,ia,ma,ca,ba,fa,na,oa){function x(a,p){a&&p&&(a._layer=p,a._sourceLayer=p)}K=K([B,u,y,w],{declaredClass:"esri.dijit.Search",templateString:r,reHostedFS:/https?:\/\/services.*\.arcgis\.com/i,constructor:function(a,p){this.css={searchGroup:"searchGroup",searchInput:"searchInput",searchInputGroup:"searchInputGroup",searchBtn:"searchBtn",searchSubmit:"searchSubmit",searchIcon:"searchIcon esri-icon-search",searchButtonText:"searchButtonText",
searchToggle:"searchToggle",searchToggleIcon:"searchIcon esri-icon-down-arrow",searchMenu:"searchMenu",searchMenuHeader:"menuHeader",searchClear:"searchClear",searchClearIcon:"searchIcon esri-icon-close searchClose",searchSpinner:"searchIcon esri-icon-loading-indicator searchSpinner",searchSourceName:"sourceName",suggestionsMenu:"suggestionsMenu",sourcesMenu:"sourcesMenu",activeSource:"active",hasValue:"hasValue",hasButtonMode:"hasButtonMode",hasMultipleSources:"hasMultipleSources",showSuggestions:"showSuggestions",
showSources:"showSources",showNoResults:"showNoResults",searchLoading:"searchLoading",latLonHeader:"searchLatLongHeader",searchMoreResults:"moreResults",searchMoreResultsList:"resultsList",searchMoreResultsHeader:"moreHeader",searchMoreResultsItem:"moreItem",searchMoreResultsListHeader:"popupHeader",searchShowMoreResults:"showMoreResults",searchNoResultsMenu:"noResultsMenu",searchNoResultsBody:"noResultsBody",searchNoResultsHeader:"noResultsHeader",searchNoValueIcon:"noValueIcon esri-icon-notice-triangle",
searchNoValueText:"noValueText",searchNoResultsText:"noResultsText",searchExpandContainer:"searchExpandContainer",searchAnimateContainer:"searchAnimate",searchExpanded:"searchExpanded",searchCollapsed:"searchCollapsed",searchClearFloat:"searchClearFloat"};this._allIndex="all";this._objectIdIdentifier="_objectId";this._deferreds=[];this._sourceNames=[];this.defaultSource={locator:new ba("//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"),singleLineFieldName:"SingleLine",outFields:["Addr_type",
"Match_addr","StAddr","City"],name:v.widgets.Search.main.esriLocatorName,localSearchOptions:{minScale:3E5,distance:5E4},placeholder:v.widgets.Search.main.placeholder,highlightSymbol:(new O(F.toUrl("./Search/images/search-pointer.png"),36,36)).setOffset(9,18)};this.options={map:null,theme:"arcgisSearch",visible:!0,value:"",allPlaceholder:"",sources:[this.defaultSource],activeSourceIndex:0,suggestionDelay:150,enableSourcesMenu:!0,enableSuggestionsMenu:!0,enableInfoWindow:!0,showInfoWindowOnSelect:!0,
enableSuggestions:!0,enableButtonMode:!1,autoNavigate:!0,autoSelect:!0,addLayersFromMap:!1,zoomScale:1E3,graphicsLayer:null,enableHighlight:!0,highlightGraphic:null,enableLabel:!1,labelSymbol:(new Z).setColor(new na([181,56,46,.9])).setFont(new W("14px",W.STYLE_NORMAL,W.VARIANT_NORMAL,W.WEIGHT_BOLD,"Arial")),labelGraphic:null,infoTemplate:new M(v.widgets.Search.main.searchResult,'\x3cdiv class\x3d"${searchTheme}"\x3e\x3cdiv id\x3d"${searchMoreResultsId}" class\x3d"${searchMoreResults}"\x3e\x3cdiv class\x3d"${searchMoreResultsItem}"\x3e${searchResult}\x3c/div\x3e\x3cdiv\x3e${searchMoreResultsHtml}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),
searchResults:null,suggestResults:null,selectedResult:null,magicKey:null,selectedFeatureId:null,expanded:!1,maxLength:128,maxResults:6,maxSuggestions:6,locationToAddressDistance:1500,minCharacters:3,enableSearchingAll:!0};a=m.mixin({},this.options,a);this.set(a);this._updateActiveSource();this._i18n=v;this._defaultSR=new X(4326);this.domNode=p},startup:function(){this.inherited(arguments);this.sources||(this.sources=[]);this._mapLoaded().then(m.hitch(this,this._init))},postCreate:function(){var a=
this;this.inherited(arguments);this._moreResultsId=this.id+"_more_results";this.own(g(this.submitNode,G,m.hitch(this,this._searchButton)));this.own(g(this.sourcesBtnNode,G,m.hitch(this,this._toggleSourcesMenu)));this.own(g(this.inputNode,G,m.hitch(this,this._inputClick)));this.own(g(this.clearNode,G,m.hitch(this,this._clearButton)));this.own(g(this.formNode,"submit",m.hitch(this,function(p){p.preventDefault();this._cancelSuggest();this.search()})));this.own(g(this.inputNode,"keyup",m.hitch(this,function(p){this._inputKey(p)})));
this.own(g(this.sourcesBtnNode,"keyup",m.hitch(this,function(p){this._sourceBtnKey(p)})));this.own(g(this.suggestionsNode,"li:click, li:keyup",function(p){a._suggestionsEvent(p,this)}));this.own(g(this.sourcesNode,"li:click, li:keyup",function(p){a._sourcesEvent(p,this)}));this.own(g(this.inputNode,"input, paste",m.hitch(this,function(){this._suggestDelay()})));this.map&&this.map.infoWindow&&this.map.infoWindow.domNode&&this.enableInfoWindow&&(this.own(g(this.map.infoWindow.domNode,"#"+this._moreResultsId+
"_show:click",m.hitch(this,function(p){this._showMoreResultsClick(p)}))),this.own(g(this.map.infoWindow.domNode,"#"+this._moreResultsId+"_list li a:click",m.hitch(this,function(p){this._moreResultsClick(p)}))),this.own(g(this.map.infoWindow.domNode,"#"+this._moreResultsId+" [data-switch-coordinates]:click",m.hitch(this,function(p){this._switchCoordinatesClick(p)}))));this.value&&this._checkStatus();this._hideMenus();this._updateVisible();this._insertSources(this.sources);this._setPlaceholder(this.activeSourceIndex);
this._updateButtonMode(this.enableButtonMode);this.toggle(this.expanded)},destroy:function(){this.clear();q.empty(this.domNode);this.inherited(arguments)},clear:function(){this.clearGraphics();d.get(this.inputNode,"value")&&d.set(this.inputNode,"value","");this._changeAttrValue("value","");this.set("searchResults",null);this.set("suggestResults",null);this.set("selectedResult",null);this.set("magicKey",null);this.set("selectedFeatureId",null);k.remove(this.containerNode,this.css.hasValue);d.set(this.clearNode,
"title","");this._hideMenus();this._closePopup();this._hideLoading();this.emit("clear-search")},show:function(){n.set(this.domNode,"display","block")},hide:function(){n.set(this.domNode,"display","none")},expand:function(){this.enableButtonMode&&(k.add(this.containerNode,this.css.searchExpanded),k.remove(this.containerNode,this.css.searchCollapsed),this._hideMenus(),this.set("expanded",!0))},collapse:function(){this.enableButtonMode&&(k.remove(this.containerNode,this.css.searchExpanded),k.add(this.containerNode,
this.css.searchCollapsed),this._hideMenus(),this.set("expanded",!1))},toggle:function(a){this.enableButtonMode&&("undefined"===typeof a&&(a=!this.expanded),a?this.expand():this.collapse())},search:function(a){var p=new h;this._mapLoaded().then(m.hitch(this,function(){this._searchDeferred(a).then(m.hitch(this,function(A){var t=A.results;this.set("searchResults",t);0===A.numResults&&(this._noResults(A.value),this._showNoResultsMenu());this._hideLoading();this.emit("search-results",A);this._selectFirstResult(t,
A.activeSourceIndex);p.resolve(t)}),m.hitch(this,function(A){p.reject(A)}))}));return p.promise},suggest:function(a){var p=new h;this._mapLoaded().then(m.hitch(this,function(){this._suggestDeferred(a).then(m.hitch(this,function(A){if(A){var t=A.results;this.set("suggestResults",t);this._insertSuggestions(t,A.value);this.emit("suggest-results",A);p.resolve(t)}}),m.hitch(this,function(A){p.reject(A)}))}));return p.promise},select:function(a){var p=this._getDefaultSymbol(a),A=this.labelSymbol,t=this.sources,
D=this.activeSourceIndex,J=this.enableHighlight,Q=this.enableLabel,U=this.autoNavigate,T=this.showInfoWindowOnSelect,Y=this.enableInfoWindow,V=this.infoTemplate,aa=a.feature?new C(a.feature.toJson()):null,ja=aa?a.feature._sourceLayer:null;x(aa,ja);if(D===this._allIndex){var ea=this._getSourceIndexOfResult(a);if(null!==ea){var ha=t[ea];D=ea}}else ha=t[D];ha&&(ha.hasOwnProperty("highlightSymbol")&&(p=ha.highlightSymbol),ha.hasOwnProperty("labelSymbol")&&(A=ha.labelSymbol),ha.hasOwnProperty("enableHighlight")&&
(J=ha.enableHighlight),ha.hasOwnProperty("enableLabel")&&(Q=ha.enableLabel),ha.hasOwnProperty("autoNavigate")&&(U=ha.autoNavigate),ha.hasOwnProperty("showInfoWindowOnSelect")&&(T=ha.showInfoWindowOnSelect),ha.hasOwnProperty("enableInfoWindow")&&(Y=ha.enableInfoWindow),ha.hasOwnProperty("infoTemplate")?V=ha.infoTemplate:ha.featureLayer&&ha.featureLayer.infoTemplate&&(V=ha.featureLayer.infoTemplate));this._hideMenus();this._hideLoading();if(aa){t=this.highlightGraphic;var la=this.graphicsLayer;ea=this.labelGraphic;
var ka=m.mixin({},aa.attributes,{searchTheme:this.theme,searchResult:this._searchResultHTML(a),searchMoreResults:this.css.searchMoreResults,searchMoreResultsItem:this.css.searchMoreResultsItem,searchMoreResultsId:this._moreResultsId,searchMoreResultsHtml:this._moreResultsHTML(a)}),pa=null;Y&&(pa=V);ea?(ea.setGeometry(aa.geometry),ea.setAttributes(ka),ea.setSymbol(A),A&&"textsymbol"===A.type&&ea.symbol.setText(a.name)):(ea=new C(aa.geometry,A,ka),x(ea,ja),A&&"textsymbol"===A.type&&ea.symbol.setText(a.name),
Q&&(la?la.add(ea):this.map&&this.map.graphics&&this.map.graphics.add(ea)));t?(t.setGeometry(aa.geometry),t.setAttributes(ka),t.setInfoTemplate(pa),t.setSymbol(p)):(t=new C(aa.geometry,p,ka,pa),x(t,ja),J&&(la?la.add(t):this.map&&this.map.graphics&&this.map.graphics.add(t)));t&&t.symbol&&"textsymbol"===t.symbol.type&&t.symbol.setText(a.name);this.map&&this.map.infoWindow&&Y&&T&&(this.map.infoWindow.setFeatures([t]),p=this._getPointFromGeometry(t.geometry),this.map.infoWindow.show(p));this.map&&U&&a&&
a.hasOwnProperty("extent")&&"function"===typeof this.map.setExtent&&this.map.setExtent(a.extent,!0);this.set("highlightGraphic",t);this.set("labelGraphic",ea)}this.set("selectedResult",a);this.emit("select-result",{result:a,source:ha,sourceIndex:D})},focus:function(){I.focus(this.inputNode)},blur:function(){this.inputNode.blur();I.curNode&&I.curNode.blur()},clearGraphics:function(){var a=this.highlightGraphic,p=this.graphicsLayer,A=this.labelGraphic;a&&(p?p.remove(a):this.map&&this.map.graphics&&
this.map.graphics.remove(a));A&&(p?p.remove(A):this.map&&this.map.graphics&&this.map.graphics.remove(A));this.set("labelGraphic",null);this.set("highlightGraphic",null)},_mapLoaded:function(){var a=new h;if(this.map)if(this.map.loaded)a.resolve();else g.once(this.map,"load",m.hitch(this,function(){a.resolve()}));else a.resolve();return a.promise},_init:function(){this._getMapLayers().then(m.hitch(this,function(){this.set("loaded",!0);this.emit("load")}))},_clearButton:function(){this.clear();I.focus(this.inputNode)},
_error:function(a){return Error(this.declaredClass+" "+a)},_searchDeferred:function(a){var p=new h,A=this.value,t=this.activeSourceIndex;a&&a.hasOwnProperty("index")&&(t=a.index);this._showLoading();this._hideMenus();this._closePopup();this.clearGraphics();var D={magicKey:this.magicKey,text:A};a?"string"===typeof a?(D.text=a,a=this._searchQueries(D)):a="object"===typeof a&&a.hasOwnProperty("magicKey")?this._searchQueries(a):"object"===typeof a&&a.hasOwnProperty("geometry")?this._searchQueries({geometry:a}):
"object"===typeof a&&a.hasOwnProperty(this._objectIdIdentifier)?this._searchQueries(a):"object"===typeof a&&"point"===a.type?this._searchQueries({point:a}):a instanceof Array&&2===a.length?this._searchQueries({latlon:a}):this._searchQueries(D):a=this._searchQueries(D);a.always(m.hitch(this,function(J){J=this._formatResults(J,t,A);p.resolve(J)}));return p.promise},_suggestDeferred:function(a){var p=new h;this._deferreds.push(p);a||(a=this.value);var A=this.activeSourceIndex;this._suggestQueries({text:a}).always(m.hitch(this,
function(t){var D;if(t)for(var J=0;J<t.length;J++)t[J]&&(D=!0);D?(t=this._formatResults(t,A,a),p.resolve(t)):p.resolve()}));return p.promise},_getDefaultSymbol:function(a){var p;this.map&&(p=this.map.getBasemap());p||(p="topo");if(a&&a.feature&&a.feature.geometry)var A=a.feature.geometry.type;"polyline"===A?A="line":"circle"===A||"extent"===A?A="polygon":"multipoint"===A&&(A="point");if(A){if(a=oa.getSchemes({theme:"default",basemap:p,geometryType:A}))var t=a.primaryScheme;if(t){t.color&&t.hasOwnProperty("opacity")&&
(t.color.a=t.opacity);var D=t;a=t.color;t=t.size;switch(A){case "point":var J=new R;J.setColor(a);J.setSize(null!==t?t:D.size);A=new P;A.setColor(D.outline.color);A.setWidth(D.outline.width);J.setOutline(A);break;case "line":J=new P;J.setColor(a);J.setWidth(null!==t?t:D.width);break;case "polygon":J=new N,J.setColor(a),A=new P,A.setColor(D.outline.color),A.setWidth(D.outline.width),J.setOutline(A)}D=J}}return D},_selectFirstResult:function(a,p){if(this.autoSelect&&a){var A;p===this._allIndex?A=this._getFirstResult(a):
a[p]&&a[p][0]&&(A=a[p][0]);A&&this.select(A)}},_getSourceIndexOfResult:function(a){var p=this.searchResults;if(p)for(var A in p)if(p[A]&&p[A].length)for(var t=0;t<p[A].length;t++)if(p[A][t]===a)return parseInt(A,10);return null},_getFirstResult:function(a){if(a)for(var p in a)if(a[p]&&a[p][0])return a[p][0];return!1},_onFocus:function(){this.map&&"function"===typeof this.map.disableKeyboardNavigation&&this.map.disableKeyboardNavigation();this.emit("focus");this.inherited(arguments)},_onBlur:function(){this._hideMenus();
this.map&&"function"===typeof this.map.enableKeyboardNavigation&&this.map.enableKeyboardNavigation();this.enableButtonMode&&this.loaded&&this.collapse();this.emit("blur");this.inherited(arguments)},_getMapLayers:function(){var a=new h;if(this.addLayersFromMap&&this.map){var p=[],A=this.map.graphicsLayerIds;if(A&&A.length){for(var t=0;t<A.length;t++){var D=this.map.getLayer(A[t]);D&&p.push(this._featureLayerLoaded(D))}H(p).always(m.hitch(this,function(J){for(var Q,U=this.sources,T=0;T<J.length;T++)J[T]&&
J[T].loaded&&"Feature Layer"===J[T].type&&(U.push({featureLayer:J[T],enableSuggestions:!0}),Q=!0);Q&&this.set("sources",U);a.resolve()}))}else a.resolve()}else a.resolve();return a.promise},_switchCoordinatesClick:function(a){a.preventDefault();if(a=d.get(a.target,"data-switch-coordinates"))this._cancelSuggest(),this.set("value",a),this.search()},_moreResultsClick:function(a){a.preventDefault();var p=a.target;a=parseInt(d.get(p,"data-source-index"),10);p=parseInt(d.get(p,"data-index"),10);var A=this.searchResults;
A&&A[a]&&(a=A[a][p])&&this.select(a)},_showMoreResultsClick:function(a){a.preventDefault();if(a=f.byId(this._moreResultsId)){k.toggle(a,this.css.searchShowMoreResults);var p=f.byId(this._moreResultsId+"_show");p&&(k.contains(a,this.css.searchShowMoreResults)?d.set(p,"textContent",v.widgets.Search.main.hideMoreResults):d.set(p,"textContent",v.widgets.Search.main.showMoreResults))}},_featureLayerLoaded:function(a){var p=new h;if(a.loaded)p.resolve(a);else if(a.loadError)p.reject(this._error("Layer failed to load."));
else{var A=g.once(a,"load",m.hitch(this,function(){t.remove();p.resolve(a)}));var t=g.once(a,"error",m.hitch(this,function(){A.remove();p.reject(this._error("Layer could not be loaded."))}))}return p.promise},_getObjectSize:function(a){var p=0,A;for(A in a)a.hasOwnProperty(A)&&p++;return p},_sourcesEvent:function(a,p){var A=d.get(p,"data-index"),t=b("li",this.sourcesNode);p=z.indexOf(t,p);A!==this._allIndex&&(A=parseInt(A,10));"click"===a.type||a.keyCode===l.ENTER?(this.set("activeSourceIndex",A),
I.focus(this.inputNode),this._hideSourcesMenu()):a.keyCode===l.UP_ARROW?(a.stopPropagation(),a.preventDefault(),a=p-1,0>a?I.focus(this.sourcesBtnNode):I.focus(t[a])):a.keyCode===l.DOWN_ARROW?(a.stopPropagation(),a.preventDefault(),a=p+1,a>=t.length?I.focus(this.sourcesBtnNode):I.focus(t[a])):a.keyCode===l.ESCAPE&&(this._hideSourcesMenu(),I.focus(this.inputNode))},_suggestionsEvent:function(a,p){var A=d.get(p,"data-source-index"),t=parseInt(d.get(p,"data-index"),10),D=b("li",this.suggestionsNode),
J=this.sources;p=z.indexOf(D,p);A!==this._allIndex&&(A=parseInt(A,10));var Q;this._clearQueryTimeout();"click"===a.type||a.keyCode===l.ENTER?((D=this.suggestResults)&&D[A]&&D[A][t]&&(Q=D[A][t]),Q&&(Q.index=A,J[A].featureLayer?(A=J[A].featureLayer.objectIdField,Q[this._objectIdIdentifier]=Q.feature.attributes[A],this.set("value",this._getSuggestionName(Q)),this.set("selectedFeatureId",Q.feature.attributes[A])):Q.magicKey&&Q.text&&(this.set("value",Q.text),this.set("magicKey",Q.magicKey)),this.search(Q),
I.focus(this.inputNode))):a.keyCode===l.BACKSPACE||a.keyCode===l.DELETE?I.focus(this.inputNode):a.keyCode===l.UP_ARROW?(a.stopPropagation(),a.preventDefault(),Q=p-1,0>Q?I.focus(this.inputNode):I.focus(D[Q])):a.keyCode===l.DOWN_ARROW?(a.stopPropagation(),a.preventDefault(),Q=p+1,Q>=D.length?I.focus(this.inputNode):I.focus(D[Q])):a.keyCode===l.ESCAPE&&(this._hideMenus(),I.focus(this.inputNode))},_getResultName:function(a){var p;a.hasOwnProperty("name")&&null!==a.name&&(p=a.name.toString());p||(p=v.widgets.Search.main.untitledResult);
return p},_getSuggestionName:function(a){var p;a.hasOwnProperty("name")&&null!==a.name&&(p=a.name.toString());a=a.text||p;a||(a=v.widgets.Search.main.untitledResult);return a},_searchResultHTML:function(a){var p="";if(a.feature&&a.feature.attributes&&a.feature.attributes.Addr_type&&"LatLong"===a.feature.attributes.Addr_type){var A=a.name.split(" ");if(2===A.length){var t=A[0];var D=A[1]}D&&t?(a=parseFloat(t),D=parseFloat(D),A=D+", "+a,p+='\x3cdiv class\x3d"'+this.css.searchMoreResultsItem+'"\x3e',
p+='\x3cdiv class\x3d"'+this.css.latLonHeader+'"\x3e'+v.widgets.Search.main.lonlat+"\x3c/div\x3e",p=p+(a+", "+D)+'\x3c/div\x3e\x3cdiv class\x3d"'+(this.css.searchMoreResultsItem+'"\x3e'),a===D||90<a||-90>a||180<D||-180>D||(p+='\x3cdiv class\x3d"'+this.css.latLonHeader+'"\x3e'+v.widgets.Search.main.reverseLonLatHeader+"\x3c/div\x3e",p+='\x3ca data-switch-coordinates\x3d"'+A+'" tabindex\x3d"0" href\x3d"#"\x3e'+A+"\x3c/a\x3e\x3c/div\x3e")):p=a.name}else p=a.name;return p},_moreResultsHTML:function(a){var p=
"",A="",t=this.searchResults,D=this.sources,J=0;if(t){A+='\x3cdiv class\x3d"'+this.css.searchMoreResultsItem+'"\x3e';A+='\x3ca href\x3d"#" id\x3d"'+this._moreResultsId+'_show"\x3e'+v.widgets.Search.main.showMoreResults+"\x3c/a\x3e";A=A+'\x3c/div\x3e\x3cdiv class\x3d"'+(this.css.searchMoreResultsList+'"\x3e');A+='\x3cdiv id\x3d"'+this._moreResultsId+'_list"\x3e';for(var Q in t)if(t[Q]){var U=t[Q].length;if(U){var T=1===U&&t[Q][0]===a;if(1<this._getObjectSize(t)&&!T){var Y=this._getSourceName(Q);A+=
'\x3cdiv class\x3d"'+this.css.searchMoreResultsListHeader+'"\x3e'+Y+"\x3c/div\x3e"}if(U&&!T){A+="\x3cul\x3e";Y=D[Q].maxResults||this.maxResults;for(T=0;T<U&&T<Y;++T)if(t[Q][T]!==a){var V=this._getResultName(t[Q][T]);A+='\x3cli\x3e\x3ca tabindex\x3d"0" data-index\x3d"'+T+'" data-source-index\x3d"'+Q+'" href\x3d"#"\x3e'+V+"\x3c/a\x3e\x3c/li\x3e";J++}A+="\x3c/ul\x3e"}}}A+="\x3c/div\x3e\x3c/div\x3e"}J&&(p+=A);return p},_validField:function(a,p){return a.getField(p)},_validFields:function(a,p){if(a&&p&&
p.length){for(var A=0;A<p.length;A++)if(!this._validField(a,p[A]))return!1;return!0}return!1},_getCodedName:function(a,p){if(a&&a.length)for(var A=0,t=a.length;A<t;A++){var D=a[A];if(D.code===p)return D.name}},_getCodedValue:function(a,p,A){if(a&&a.length)for(var t=0,D=a.length;t<D;t++){var J=a[t],Q=J.name,U=p;A||(Q=Q.toLowerCase(),U=U.toLowerCase());if(Q===U)return J.code}return!1},_whereClause:function(a,p,A,t){var D=null;if(a){var J="";this.reHostedFS.test(p.url)&&this._containsNonLatinCharacter(a)&&
(J="N");if(A&&A.length)for(var Q=0,U=A.length;Q<U;Q++){var T="",Y=a.replace(/'/g,"''");T=A[Q];var V=p.getField(T),aa=p.getDomain(T);aa&&"codedValue"===aa.type&&(Y=this._getCodedValue(aa.codedValues,Y,t));!1!==Y&&(V=V.type,"esriFieldTypeString"===V||"esriFieldTypeDate"===V?T=t?T+" \x3d "+J+"'"+Y+"'":"UPPER("+T+") LIKE "+J+"'%"+Y.toUpperCase()+"%'":"esriFieldTypeOID"===V||"esriFieldTypeSmallInteger"===V||"esriFieldTypeInteger"===V||"esriFieldTypeSingle"===V||"esriFieldTypeDouble"===V?(Y=parseFloat(Y),
T=isNaN(Y)?!1:T+" \x3d "+Y):T=T+" \x3d "+Y,T&&(D=D?D+" or ":"",D+=T))}}return D},_suggest:function(a){a||(a={index:this.activeSourceIndex,text:this.value});var p=new h,A=a.index,t=this.sources[A],D=this.enableSuggestions;t.hasOwnProperty("enableSuggestions")&&(D=t.enableSuggestions);var J=0;if(a.hasOwnProperty("text")&&a.text){var Q=m.trim(a.text);J=a.text.length}a=t.minCharacters||this.minCharacters;if(D&&Q&&J>=a&&this._supportsPagination(t)){var U="";t.prefix&&(U+=t.prefix);U+=Q;t.suffix&&(U+=t.suffix);
var T=this._defaultSR;this.map&&(T=this.map.spatialReference);D={};t.locator?(t.categories&&(D.categories=t.categories),t.locator.outSpatialReference=T,this.map&&t.localSearchOptions&&t.localSearchOptions.hasOwnProperty("distance")&&t.localSearchOptions.hasOwnProperty("minScale")&&(J=this._getScale(),!t.localSearchOptions.minScale||J&&J<=parseFloat(t.localSearchOptions.minScale))&&(D.location=this.map.extent.getCenter(),D.distance=t.localSearchOptions.distance),D.text=U,t.useMapExtent&&this.map&&
this.map.extent&&(D.searchExtent=this.map.extent),t.searchExtent&&(D.searchExtent=t.searchExtent),D.maxSuggestions=t.maxSuggestions||this.maxSuggestions,t.sourceCountry&&(D.countryCode=t.sourceCountry),t.countryCode&&(D.countryCode=t.countryCode),t.locator.suggestLocations(D).then(m.hitch(this,function(Y){p.resolve(Y)}),m.hitch(this,function(Y){Y||(Y=this._error("Locator suggestLocations could not be performed."));p.reject(Y)}))):t.featureLayer?this._featureLayerLoaded(t.featureLayer).then(m.hitch(this,
function(){var Y=this._getDisplayField(t),V=t.searchFields||[Y],aa=[];t.suggestionTemplate?t.suggestionTemplate.replace(/(?:\$\{([^}]+)\})/g,function(la,ka){aa.push(ka)}):aa=[Y];-1===z.indexOf(aa,t.featureLayer.objectIdField)&&aa.push(t.featureLayer.objectIdField);Y=this._validField(t.featureLayer,Y);var ja=this._validFields(t.featureLayer,aa),ea=this._validFields(t.featureLayer,V);if(Y&&ja&&ea){Y=new fa;t.hasOwnProperty("suggestQueryParams")&&m.mixin(Y,t.suggestQueryParams);Y.outSpatialReference=
T;Y.returnGeometry=!1;Y.num=t.maxSuggestions||this.maxSuggestions;Y.outFields=aa;t.useMapExtent&&this.map&&this.map.extent&&(Y.geometry=this.map.extent);t.searchExtent&&(Y.geometry=t.searchExtent);if(V=this._whereClause(U,t.featureLayer,V,!1)){Y.where=V;var ha=!0}ha?t.featureLayer.queryFeatures(Y,m.hitch(this,function(la){var ka;(la=la.features)&&(ka=this._hydrateResults(la,A,!0));p.resolve(ka)}),m.hitch(this,function(la){la||(la=this._error("FeatureLayer queryFeatures errored with suggestions"));
p.reject(la)})):p.resolve()}else p.reject(this._error("Invalid FeatureLayer field"))})):p.reject(this._error("Invalid source"))}else p.resolve();return p.promise},_supportsPagination:function(a){var p;a.locator?p=!0:a.featureLayer&&a.featureLayer.advancedQueryCapabilities&&a.featureLayer.advancedQueryCapabilities.supportsPagination&&(p=!0);return p},_suggestQueries:function(a){var p=this.sources,A=this.activeSourceIndex,t=[];if(A===this._allIndex)for(A=0;A<p.length;A++){var D=a;D.index=A;D=this._suggest(D);
t.push(D)}else a.index=A,D=this._suggest(a),t.push(D);return H(t)},_getPointFromGeometry:function(a){switch(a.type){case "extent":var p=a.getCenter();break;case "multipoint":p=a.getPoint(0);break;case "point":p=a;break;case "polygon":p=a.getCentroid();break;case "polyline":p=a.getPoint(0,0)}return p},_searchQueries:function(a){a.hasOwnProperty("index")||(a.index=this.activeSourceIndex);var p=[];if(a.index===this._allIndex)for(var A=this.sources,t=0;t<A.length;t++){var D=a;D.index=t;D=this._search(D);
p.push(D)}else a=this._search(a),p.push(a);return H(p)},_searchButton:function(){this.enableButtonMode&&!this.expanded?(this.expand(),I.focus(this.inputNode)):(this._cancelSuggest(),this.search())},_search:function(a){a||(a={text:this.value,magicKey:null,geometry:null,point:null,index:this.activeSourceIndex,latlon:null});this.selectedFeatureId&&(a.text=null,a[this._objectIdIdentifier]=this.selectedFeatureId);var p,A=new h,t=a.index,D=this.sources[t],J;a.hasOwnProperty("text")&&a.text&&(J=m.trim(a.text));
if(D){var Q="";D.prefix&&!a.magicKey&&(Q+=D.prefix);Q+=J;D.suffix&&!a.magicKey&&(Q+=D.suffix);var U=this._defaultSR;this.map&&(U=this.map.spatialReference);if(D.locator)if(a.hasOwnProperty("text")&&J){var T={};D.categories&&(T.categories=D.categories);D.locationType&&(T.locationType=D.locationType);U&&(D.locator.outSpatialReference=U);if(this.map&&D.localSearchOptions&&D.localSearchOptions.hasOwnProperty("distance")&&D.localSearchOptions.hasOwnProperty("minScale")){var Y=this._getScale();if(!D.localSearchOptions.minScale||
Y&&Y<=parseFloat(D.localSearchOptions.minScale))T.location=this.map.extent.getCenter(),T.distance=D.localSearchOptions.distance}T.address={};T.maxLocations=D.maxResults||this.maxResults;D.useMapExtent&&this.map&&this.map.extent&&(T.searchExtent=this.map.extent);D.searchExtent&&(T.searchExtent=D.searchExtent);D.sourceCountry&&(T.countryCode=D.sourceCountry);D.countryCode&&(T.countryCode=D.countryCode);a.magicKey&&(T.magicKey=a.magicKey);D.singleLineFieldName?T.address[D.singleLineFieldName]=Q:T.address["Single Line Input"]=
Q;D.outFields&&(T.outFields=D.outFields);D.locator.addressToLocations(T).then(m.hitch(this,function(V){V=this._hydrateResults(V,t,!1);A.resolve(V)}),m.hitch(this,function(V){V||(V=this._error("Locator addressToLocations could not be performed"));A.reject(V)}))}else a.geometry?(p=this._getPointFromGeometry(a.geometry.geometry))?this._reverseGeocodePoint(t,p).then(function(V){A.resolve(V)},function(V){A.reject(V)}):A.reject(this._error("Invalid point to reverse geocode")):a.point?this._reverseGeocodePoint(t,
a.point).then(function(V){A.resolve(V)},function(V){A.reject(V)}):a.latlon?(T=new da(a.latlon,this._defaultSR),this._reverseGeocodePoint(t,T).then(function(V){A.resolve(V)},function(V){A.reject(V)})):a.hasOwnProperty("text")&&!J?A.resolve([]):A.reject(this._error("Invalid query type for Locator"));else D.featureLayer?this._featureLayerLoaded(D.featureLayer).then(m.hitch(this,function(){var V=this._getDisplayField(D),aa=D.searchFields||[V];V=this._validField(D.featureLayer,V);var ja=this._validFields(D.featureLayer,
aa);if(V&&ja){V=new fa;D.hasOwnProperty("searchQueryParams")&&m.mixin(V,D.searchQueryParams);U&&(V.outSpatialReference=U,ja=this.map&&this.map.getMaxResolution()||1/ca.getUnitValueForSR(U))&&(V.maxAllowableOffset=ja);V.returnGeometry=!0;D.outFields&&(V.outFields=D.outFields);if(!a.hasOwnProperty(this._objectIdIdentifier)){this._supportsPagination(D)&&(V.num=D.maxResults||this.maxResults);D.useMapExtent&&this.map&&this.map.extent&&(V.geometry=this.map.extent);D.searchExtent&&(V.geometry=D.searchExtent);
var ea=D.exactMatch}a.hasOwnProperty("text")&&J?(aa=this._whereClause(Q,D.featureLayer,aa,ea))?(V.where=aa,aa=!0):aa=!1:a.hasOwnProperty(this._objectIdIdentifier)?(V.objectIds=[a[this._objectIdIdentifier]],aa=!0):a.geometry?(V.geometry=a.geometry,aa=!0):a.point?(V.geometry=a.point,aa=!0):a.latlon?(p=new da(a.latlon,this._defaultSR),V.geometry=p,aa=!0):(a.hasOwnProperty("text")&&!J?A.resolve([]):A.reject(this._error("Invalid query type for FeatureLayer")),aa=!1);aa?D.featureLayer.queryFeatures(V,m.hitch(this,
function(ha){ha=ha.features;var la;ha&&(la=this._hydrateResults(ha,t,!1));A.resolve(la)}),m.hitch(this,function(ha){ha||(ha=this._error("FeatureLayer queryFeatures could not be performed"));A.reject(ha)})):A.resolve()}else A.reject(this._error("Invalid FeatureLayer field"))})):A.reject(this._error("Invalid source"))}else A.reject(this._error("Source is undefined"));return A.promise},_clearQueryTimeout:function(){this._queryTimer&&clearTimeout(this._queryTimer)},_formatResults:function(a,p,A){A={activeSourceIndex:p,
value:A,numResults:0,numErrors:0,errors:null,results:null};var t={},D={};if(a)if(p===this._allIndex)for(p=0;p<a.length;p++)a[p]&&(a[p]instanceof Error?(t[p]=a[p],A.numErrors++):(D[p]=a[p],A.numResults+=a[p].length));else a[0]&&(a[0]instanceof Error?(t[p]=a[0],A.numErrors++):(D[p]=a[0],A.numResults+=a[0].length));A.numErrors&&(A.errors=t);A.numResults&&(A.results=D);return A},_reverseGeocodePoint:function(a,p){var A=new h,t=this.sources[a];if(p&&t){var D=t.locationToAddressDistance||this.locationToAddressDistance;
t.locator.outSpatialReference=this._defaultSR;this.map&&(t.locator.outSpatialReference=this.map.spatialReference);t.locator.locationToAddress(p,D,m.hitch(this,function(J){J=this._hydrateResults([J],a,!1);A.resolve(J)}),m.hitch(this,function(J){J||(J=this._error("Locator locationToAddress could not be performed"));A.reject(J)}))}else A.reject(this._error("No point or source defined for reverse geocoding"));return A.promise},_cancelDeferreds:function(){if(this._deferreds&&this._deferreds.length)for(var a=
0;a<this._deferreds.length;a++)this._deferreds[a].cancel(this.declaredClass+" cancelling request");this._deferreds=[]},_sourceBtnKey:function(a){if(a){var p=b("li",this.sourcesNode);a.keyCode===l.UP_ARROW?(a.stopPropagation(),a.preventDefault(),this._showSourcesMenu(),(a=p.length)&&I.focus(p[a-1])):a.keyCode===l.DOWN_ARROW&&(a.stopPropagation(),a.preventDefault(),this._showSourcesMenu(),p[0]&&I.focus(p[0]))}},_inputKey:function(a){if(a){var p=b("li",this.suggestionsNode),A=this.suggestResults;if(a.keyCode===
l.TAB||a.keyCode===l.ESCAPE)this._cancelSuggest(),this._hideMenus();else if(a.keyCode===l.UP_ARROW)a.stopPropagation(),a.preventDefault(),this._cancelSuggest(),A&&this._showSuggestionsMenu(),(a=p.length)&&I.focus(p[a-1]);else if(a.keyCode===l.DOWN_ARROW)a.stopPropagation(),a.preventDefault(),this._cancelSuggest(),A&&this._showSuggestionsMenu(),p[0]&&I.focus(p[0]);else{if(a.ctrlKey||a.metaKey||a.keyCode===l.copyKey||a.keyCode===l.LEFT_ARROW||a.keyCode===l.RIGHT_ARROW||a.keyCode===l.ENTER)return a;
this._suggestDelay()}}},_cancelSuggest:function(){this._cancelDeferreds();this._clearQueryTimeout()},_suggestDelay:function(){this._cancelSuggest();this._changeValue();this._queryTimer=setTimeout(m.hitch(this,function(){this.suggest()}),this.suggestionDelay)},_changeValue:function(){this.set("magicKey",null);this.set("selectedFeatureId",null);this._changeAttrValue("value",this.inputNode.value);this._checkStatus()},_inputClick:function(){this._hideSourcesMenu();this._hideNoResultsMenu()},_getSourceName:function(a){return this._sourceNames[a]},
_loadSources:function(a){a=z.filter(a,function(p){return!!p.featureLayer});a=z.map(a,function(p){return this._featureLayerLoaded(p.featureLayer)},this);return H(a)},_createSourceNameMap:function(a){return this._loadSources(a).then(m.hitch(this,function(){var p=z.map(a,function(A){return A.name||A.featureLayer&&A.featureLayer.name||v.widgets.Search.main.untitledSource});this._preventDuplicateSourceNames(a,p);return p}))},_getDuplicateSourceNameIndexes:function(a){var p={},A=[];z.forEach(a,function(t,
D){p.hasOwnProperty(t)?(-1===A.indexOf(p[t])&&A.push(p[t]),A.push(D)):a.lastIndexOf(t)!==D&&(p[t]=D)});return A},_preventDuplicateSourceNames:function(a,p){if(p&&1<p.length){var A=this._getDuplicateSourceNameIndexes(p);z.forEach(A,function(t){p[t]+=this._getFieldsString(a[t])},this)}},_getFieldsString:function(a){var p="",A=a.featureLayer;if(A){a=a.searchFields||[this._getDisplayField(a)];for(var t=0;t<a.length;t++){p=0===t?p+": ":p+", ";var D=a[t],J=A.getFieldLabel(D);p+=J||D}}return p},_splitResult:function(a,
p){p=e.escapeString(p);return a.replace(new RegExp("(^|)("+p+")(|$)","ig"),"$1|$2|$3").split("|")},_insertSuggestions:function(a,p){if(this.enableSuggestionsMenu&&this.suggestionsNode){this._hideSourcesMenu();this._hideNoResultsMenu();var A=this.sources;if(a){var t=q.create("div");for(var D in a)if(a[D]&&a[D].length){var J=this._getSourceName(D);1<A.length&&this.activeSourceIndex===this._allIndex&&q.create("div",{className:this.css.searchMenuHeader,textContent:J},t);J=q.create("ul",{role:"menu"},
t);for(var Q=A[D].maxSuggestions||this.maxSuggestions,U=0;U<a[D].length&&U<Q;++U){var T=q.create("li",{"data-index":U,"data-source-index":D,role:"menuitem",tabindex:0},J),Y=this._getSuggestionName(a[D][U]);Y=this._splitResult(Y,p);for(var V=Y.length,aa=0;aa<V;aa++){var ja=Y[aa];ja.toLowerCase()===p.toLowerCase()?q.create("strong",{textContent:ja},T):(ja=document.createTextNode(ja),q.place(ja,T))}}}}t?(q.place(t,this.suggestionsNode,"only"),this._showSuggestionsMenu()):(q.empty(this.suggestionsNode),
this._hideSuggestionsMenu())}},_insertSources:function(a){if(this.enableSourcesMenu&&a&&1<a.length){var p,A=this.activeSourceIndex,t=q.create("ul",{role:"menu"});if(this.enableSearchingAll){var D="";A===this._allIndex&&(D="active");q.create("li",{"data-index":this._allIndex,role:"menuitem",className:D,tabIndex:0,textContent:v.widgets.Search.main.all},t)}for(p=0;p<a.length;p++){D="";p===A&&(D=this.css.activeSource);var J=this._getSourceName(p);q.create("li",{"data-index":p,role:"menuitem",className:D,
tabIndex:0,textContent:J},t)}k.add(this.containerNode,this.css.hasMultipleSources);q.place(t,this.sourcesNode,"only")}else k.remove(this.containerNode,this.css.hasMultipleSources),q.empty(this.sourcesNode)},_showLoading:function(){k.add(this.containerNode,this.css.searchLoading)},_hideLoading:function(){k.remove(this.containerNode,this.css.searchLoading)},_checkStatus:function(){this.value?(k.add(this.containerNode,this.css.hasValue),d.set(this.clearNode,"title",v.widgets.Search.main.clearButtonTitle)):
this.clear()},_closePopup:function(){this.enableInfoWindow&&this.map&&this.map.infoWindow&&this.map.infoWindow.hide()},_noResults:function(a){var p;a&&(p=m.trim(a));var A=q.create("div",{className:this.css.searchNoResultsBody});a&&p?(q.create("div",{className:this.css.searchNoResultsHeader,textContent:v.widgets.Search.main.noResults},A),q.create("div",{className:this.css.searchNoResultsText,textContent:L.substitute({value:'"'+a+'"'},v.widgets.Search.main.noResultsFound)},A)):(a=q.create("div",{},
A),q.create("span",{"aria-hidden":"true",className:this.css.searchNoValueIcon},a),q.create("span",{className:this.css.searchNoValueText,textContent:v.widgets.Search.main.emptyValue},a));q.place(A,this.noResultsMenuNode,"only")},_hideMenus:function(){this._hideSourcesMenu();this._hideSuggestionsMenu();this._hideNoResultsMenu()},_hideNoResultsMenu:function(){k.remove(this.containerNode,this.css.showNoResults)},_showNoResultsMenu:function(){this._hideSourcesMenu();this._hideSuggestionsMenu();k.add(this.containerNode,
this.css.showNoResults)},_hideSourcesMenu:function(){k.remove(this.containerNode,this.css.showSources)},_hideSuggestionsMenu:function(){k.remove(this.containerNode,this.css.showSuggestions)},_showSourcesMenu:function(){this._hideSuggestionsMenu();this._hideNoResultsMenu();k.add(this.containerNode,this.css.showSources)},_showSuggestionsMenu:function(){this._hideSourcesMenu();this._hideNoResultsMenu();k.add(this.containerNode,this.css.showSuggestions)},_toggleSourcesMenu:function(){this._hideSuggestionsMenu();
this._hideNoResultsMenu();k.toggle(this.containerNode,this.css.showSources)},_getFirstStringField:function(a){if(a&&(a=a.fields)&&a.length)for(var p=0;p<a.length;p++){var A=a[p];if("esriFieldTypeString"===A.type)return A.name}return""},_getDisplayField:function(a){return a.displayField||a.featureLayer.displayField||this._getFirstStringField(a.featureLayer)},_validLocation:function(a){return a&&"number"===typeof a.x&&"number"===typeof a.y},_validExtent:function(a){return a&&"number"===typeof a.xmin&&
"number"===typeof a.ymin&&"number"===typeof a.xmax&&"number"===typeof a.ymax},_hydrateResult:function(a,p,A){var t={},D=this._defaultSR;p=this.sources[p];this.map&&(D=this.map.spatialReference);if(a.hasOwnProperty("text")&&a.hasOwnProperty("magicKey"))return a;if(a.hasOwnProperty("geometry")){var J=new C(a.toJson());t.feature=J;(J=t.feature.geometry)&&J.setSpatialReference(D)}else if(a.hasOwnProperty("location")&&this._validLocation(a.location)){var Q=new da(a.location.x,a.location.y,D);J={};a.hasOwnProperty("attributes")&&
(J=a.attributes);a.hasOwnProperty("address")&&"object"===typeof a.address&&m.mixin(J,a.address);a.hasOwnProperty("score")&&(J.score=a.score);t.feature=new C(Q,null,J,null)}!t.feature&&A&&(J={},a.hasOwnProperty("attributes")&&(J=a.attributes),a.hasOwnProperty("score")&&(J.score=a.score),t.feature=new C(null,null,J,null));if(t.feature){if(a.hasOwnProperty("extent")&&this._validExtent(a.extent))t.extent=new ia(a.extent),t.extent.setSpatialReference(D);else if(t.feature&&t.feature.geometry)switch(t.feature.geometry.type){case "extent":t.extent=
t.feature.geometry;break;case "multipoint":t.extent=ma.getDenormalizedExtent(t.feature.geometry);break;case "polygon":t.extent=ma.getDenormalizedExtent(t.feature.geometry);break;case "polyline":t.extent=ma.getDenormalizedExtent(t.feature.geometry);break;case "point":this.map?(D=this.zoomScale,p&&p.zoomScale&&(D=p.zoomScale),this._getScale()>D?t.extent=ca.getExtentForScale(this.map,D).centerAt(t.feature.geometry):t.extent=this.map.extent.centerAt(t.feature.geometry)):t.extent=new ia({xmin:t.feature.geometry.x-
.25,ymin:t.feature.geometry.y-.25,xmax:t.feature.geometry.x+.25,ymax:t.feature.geometry.y+.25,spatialReference:this._defaultSR})}else t.extent=null;t.name="";p.featureLayer?p.suggestionTemplate&&A?t.name=L.substitute(a.attributes,p.suggestionTemplate):p.searchTemplate?t.name=L.substitute(a.attributes,p.searchTemplate):(J=this._getDisplayField(p),A=p.featureLayer.getField(J),D=p.featureLayer.getDomain(J),J&&a.hasOwnProperty("attributes")&&a.attributes.hasOwnProperty(J)&&(a=a.attributes[J],D&&"codedValue"===
D.type?t.name=this._getCodedName(D.codedValues,a):A&&"esriFieldTypeDate"===A.type&&!isNaN(a)?t.name=E.format(new Date(a)):t.name=a)):a.address&&p.searchTemplate?t.name=L.substitute(a.address,p.searchTemplate):a.hasOwnProperty("name")?t.name=a.name:a.hasOwnProperty("attributes")&&"object"===typeof a.attributes&&a.attributes.LongLabel?t.name=a.attributes.LongLabel:a.hasOwnProperty("attributes")&&"object"===typeof a.attributes&&a.attributes.Match_addr?(t.name=a.attributes.Match_addr,a.attributes.Addr_type&&
"POI"===a.attributes.Addr_type&&a.attributes.StAddr&&a.attributes.City?t.name+=" - "+a.attributes.StAddr+", "+a.attributes.City:a.attributes.Addr_type&&"POI"===a.attributes.Addr_type&&a.attributes.City&&(t.name+=" - "+a.attributes.City)):a.hasOwnProperty("address")&&"string"===typeof a.address?t.name=a.address:a.hasOwnProperty("address")&&"object"===typeof a.address&&a.address.hasOwnProperty("Address")?a.address.hasOwnProperty("Match_addr")?t.name=a.address.Match_addr:a.address.hasOwnProperty("Address")&&
(t.name=a.address.Address):t.feature&&t.feature.geometry&&(t.name=t.feature.geometry.x+","+t.feature.geometry.y);p.featureLayer&&t.feature&&x(t.feature,p.featureLayer);return t}},_getScale:function(){var a;this.map&&"function"===typeof this.map.getScale&&(a=this.map.getScale());return a},_hydrateResults:function(a,p,A,t){t=[];var D=0;if(a&&a.length)for(D;D<a.length;D++){var J=this._hydrateResult(a[D],p,A);J&&t.push(J)}return t},_containsNonLatinCharacter:function(a){for(var p=0;p<a.length;p++)if(255<
a.charCodeAt(p))return!0;return!1},_setPlaceholder:function(a){var p="",A=this.sources[a];a===this._allIndex?p=this.allPlaceholder||v.widgets.Search.main.allPlaceholder:A&&A.placeholder&&(p=A.placeholder);var t=v.widgets.Search.main.all;A&&(t=this._getSourceName(a));d.set(this.sourceNameNode,"textContent",t);d.set(this.inputNode,"placeholder",p);d.set(this.inputNode,"title",p)},_updateActiveSource:function(){var a=this.sources,p=this.activeSourceIndex,A;a&&a[p]&&(A=a[p]);A?this.set("activeSource",
A):this.set("activeSource",null)},_updateVisible:function(){this.visible?this.show():this.hide()},_updateButtonMode:function(a){a?(k.toggle(this.containerNode,this.css.searchExpanded,this.expanded),k.toggle(this.containerNode,this.css.searchCollapsed,!this.expanded),k.add(this.containerNode,this.css.hasButtonMode)):(k.remove(this.containerNode,this.css.searchExpanded),k.remove(this.containerNode,this.css.searchCollapsed),k.remove(this.containerNode,this.css.hasButtonMode))},_setDefaultActiveSourceIndex:function(a){a&&
1===a.length||!this.enableSearchingAll?this.set("activeSourceIndex",0):this.set("activeSourceIndex",this._allIndex)},_setEnableSourcesMenuAttr:function(a){this._set("enableSourcesMenu",a);this._created&&this._insertSources(this.sources)},_setEnableSearchingAllAttr:function(a){this._set("enableSearchingAll",a);this._created&&(this._setDefaultActiveSourceIndex(this.sources),this._hideMenus(),this._insertSources(this.sources))},_setSourcesAttr:function(a){this._createSourceNameMap(a).then(m.hitch(this,
function(p){this._sourceNames=p;this._created&&(this._setDefaultActiveSourceIndex(a),this._hideMenus(),this._insertSources(a))}));this._set("sources",a)},_setAllPlaceholderAttr:function(a){this._set("allPlaceholder",a);this._created&&this._setPlaceholder(this.activeSourceIndex)},_setActiveSourceIndexAttr:function(a){this._set("activeSourceIndex",a);this._updateActiveSource();this._created&&(this._setPlaceholder(a),this._hideMenus(),this._insertSources(this.sources))},_setMaxLengthAttr:function(a){this._set("maxLength",
a);this._created&&d.set(this.inputNode,"maxLength",a)},_setValueAttr:function(a){this.set("magicKey",null);this.set("selectedFeatureId",null);this._set("value",a);this._created&&(d.set(this.inputNode,"value",a),this._checkStatus())},_setVisibleAttr:function(a){this._set("visible",a);this._created&&this._updateVisible()},_setEnableButtonModeAttr:function(a){this._set("enableButtonMode",a);this._created&&this._updateButtonMode(a)},_setThemeAttr:function(a){this._created&&(k.remove(this.domNode,this.theme),
k.add(this.domNode,a));this._set("theme",a)}});c("extend-esri")&&m.setObject("dijit.Search",K,S);return K})},"esri/tasks/locator":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/Deferred dojo/_base/json dojo/has ../kernel ../request ../deferredUtils ./Task ./AddressCandidate".split(" "),function(F,K,m,z,w,h,l,g,b,c,e){F=F(c,{declaredClass:"esri.tasks.Locator",_eventMap:{"address-to-locations-complete":["addresses"],"addresses-to-locations-complete":["addresses"],
"location-to-address-complete":["address"],"suggest-locations-complete":["suggestions"]},constructor:function(f){this._geocodeHandler=K.hitch(this,this._geocodeHandler);this._geocodeAddressesHandler=K.hitch(this,this._geocodeAddressesHandler);this._reverseGeocodeHandler=K.hitch(this,this._reverseGeocodeHandler);this.registerConnectEvents()},outSpatialReference:null,setOutSpatialReference:function(f){this.outSpatialReference=f},_geocodeHandler:function(f,d,k,n,q){try{var E=f.candidates;d=[];var v,
r=E.length,B=f.spatialReference,u;for(v=0;v<r;v++){var y=E[v];if(u=y.location)u.spatialReference=B;d[v]=new e(y)}this._successHandler([d],"onAddressToLocationsComplete",k,q)}catch(G){this._errorHandler(G,n,q)}},_geocodeAddressesHandler:function(f,d,k,n,q){try{var E=f.locations;d=[];var v,r=E.length,B=f.spatialReference,u;for(v=0;v<r;v++){if(u=E[v].location)u.spatialReference=B;d[v]=new e(E[v])}this._successHandler([d],"onAddressesToLocationsComplete",k,q)}catch(y){this._errorHandler(y,n,q)}},addressToLocations:function(f,
d,k,n,q){var E;if(f.address){n=k;k=d;d=f.outFields;q=f.searchExtent;var v=f.countryCode;var r=f.magicKey;var B=f.distance;var u=f.categories;f.location&&this.normalization&&(E=f.location.normalize());var y=f.locationType;var G=f.maxLocations;var I=f.forStorage;f=f.address}q&&(q=q.shiftCentralMeridian());var L=this.outSpatialReference;f=this._encode(K.mixin({},this._url.query,f,{f:"json",outSR:L&&w.toJson(L.toJson()),outFields:d&&d.join(",")||null,searchExtent:q&&w.toJson(q.toJson()),category:u&&u.join(",")||
null,countryCode:v||null,magicKey:r||null,distance:B||null,location:E||null,locationType:y||null,maxLocations:G||null,forStorage:I||null}));var M=this._geocodeHandler,S=this._errorHandler,X=new z(b._dfdCanceller);X._pendingDfd=g({url:this._url.path+"/findAddressCandidates",content:f,callbackParamName:"callback",load:function(C,H){M(C,H,k,n,X)},error:function(C){S(C,n,X)}});return X},suggestLocations:function(f){var d=new z(b._dfdCanceller);f.hasOwnProperty("location")&&this.normalization&&(f.location=
f.location.normalize());f.searchExtent&&(f.searchExtent=f.searchExtent.shiftCentralMeridian());f=this._encode(K.mixin({},this._url.query,{f:"json",text:f.text,maxSuggestions:f.maxSuggestions,searchExtent:f.searchExtent&&w.toJson(f.searchExtent.toJson()),category:f.categories&&f.categories.join(",")||null,countryCode:f.countryCode||null,location:f.location||null,distance:f.distance||null},{f:"json"}));f=g({url:this._url.path+"/suggest",content:f,callbackParamName:"callback"});d._pendingDfd=f;f.then(K.hitch(this,
function(k){k=k.suggestions||[];this.onSuggestLocationsComplete(k);d.resolve(k)}),K.hitch(this,function(k){this._errorHandler(k);d.reject(k)}));return d},addressesToLocations:function(f,d,k){var n=this.outSpatialReference,q=[],E=f.categories,v=f.locationType,r=f.countryCode;m.forEach(f.addresses,function(G,I){q.push({attributes:G})});f=this._encode(K.mixin({},this._url.query,{category:E&&E.join(",")||null,locationType:v||null,sourceCountry:r||null},{addresses:w.toJson({records:q})},{f:"json",outSR:n&&
w.toJson(n.toJson())}));var B=this._geocodeAddressesHandler,u=this._errorHandler,y=new z(b._dfdCanceller);y._pendingDfd=g({url:this._url.path+"/geocodeAddresses",content:f,callbackParamName:"callback",load:function(G,I){B(G,I,d,k,y)},error:function(G){u(G,k,y)}});return y},_reverseGeocodeHandler:function(f,d,k,n,q){try{var E=new e({address:f.address,location:f.location,score:100});this._successHandler([E],"onLocationToAddressComplete",k,q)}catch(v){this._errorHandler(v,n,q)}},locationToAddress:function(f,
d,k,n){f&&this.normalization&&(f=f.normalize());var q=this.outSpatialReference;f=this._encode(K.mixin({},this._url.query,{outSR:q&&w.toJson(q.toJson()),location:f&&w.toJson(f.toJson()),distance:d,f:"json"}));var E=this._reverseGeocodeHandler,v=this._errorHandler,r=new z(b._dfdCanceller);r._pendingDfd=g({url:this._url.path+"/reverseGeocode",content:f,callbackParamName:"callback",load:function(B,u){E(B,u,k,n,r)},error:function(B){v(B,n,r)}});return r},onSuggestLocationsComplete:function(){},onAddressToLocationsComplete:function(){},
onAddressesToLocationsComplete:function(){},onLocationToAddressComplete:function(){}});h("extend-esri")&&K.setObject("tasks.Locator",F,l);return F})},"esri/tasks/AddressCandidate":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","../geometry/Point"],function(F,K,m,z,w){F=F(null,{declaredClass:"esri.tasks.AddressCandidate",constructor:function(h){K.mixin(this,h);this.location=new w(this.location)}});m("extend-esri")&&K.setObject("tasks.AddressCandidate",F,z);return F})},
"esri/styles/basic":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/has","../kernel","../Color"],function(F,K,m,z,w){function h(e,f){if(e){var d={};d.color=new w(e.color);d.opacity=e.opacity||1;switch(f){case "point":d.outline={color:new w(e.outline.color),width:e.outline.width};d.size=e.size;break;case "line":d.width=e.width;break;case "polygon":d.outline={color:new w(e.outline.color),width:e.outline.width}}}return d}function l(e){if("esriGeometryPoint"===e||"esriGeometryMultipoint"===
e)e="point";else if("esriGeometryPolyline"===e)e="line";else if("esriGeometryPolygon"===e||"esriGeometryMultiPatch"===e)e="polygon";return e}var g={"default":{name:"default",label:"Default",description:"Default theme for basic visualization of features.",basemapGroups:{light:"streets gray topo terrain national-geographic oceans osm gray-vector streets-vector topo-vector streets-relief-vector streets-navigation-vector".split(" "),dark:["satellite","hybrid","dark-gray","dark-gray-vector","streets-night-vector"]},
pointSchemes:{light:{primary:{color:[77,77,77,1],outline:{color:[255,255,255,.25],width:1},size:8},secondary:[{color:[226,119,40,1],outline:{color:[255,255,255,.25],width:1},size:8},{color:[255,255,255,1],outline:{color:[51,51,51,.25],width:1},size:8}]},dark:{primary:{color:[255,255,255,1],outline:{color:[92,92,92,.25],width:1},size:8},secondary:[{color:[226,119,40,1],outline:{color:[255,255,255,.25],width:1},size:8},{color:[26,26,26,1],outline:{color:[178,178,178,.25],width:1},size:8}]}},lineSchemes:{light:{primary:{color:[77,
77,77,1],width:2},secondary:[{color:[226,119,40,1],width:2},{color:[255,255,255,1],width:2}]},dark:{primary:{color:[255,255,255,1],width:2},secondary:[{color:[226,119,40,1],width:2},{color:[26,26,26,1],width:2}]}},polygonSchemes:{light:{primary:{color:[227,139,79,1],outline:{color:[255,255,255,.25],width:1},opacity:.8},secondary:[{color:[128,128,128,1],outline:{color:[255,255,255,.25],width:1},opacity:.8},{color:[255,255,255,1],outline:{color:[128,128,128,.25],width:1},opacity:.8}]},dark:{primary:{color:[227,
139,79,1],outline:{color:[92,92,92,.25],width:1},opacity:.8},secondary:[{color:[178,178,178,1],outline:{color:[92,92,92,.25],width:1},opacity:.8},{color:[26,26,26,1],outline:{color:[128,128,128,.25],width:1},opacity:.8}]}}}},b={};(function(){var e,f,d;for(e in g){var k=g[e];var n=k.basemapGroups;var q=b[e]={basemaps:[].concat(n.light).concat(n.dark),point:{},line:{},polygon:{}};for(f in n){var E=n[f];for(d=0;d<E.length;d++){var v=E[d];k.pointSchemes&&(q.point[v]=k.pointSchemes[f]);k.lineSchemes&&
(q.line[v]=k.lineSchemes[f]);k.polygonSchemes&&(q.polygon[v]=k.polygonSchemes[f])}}}})();var c={getAvailableThemes:function(e){var f=[],d;for(d in g){var k=g[d];var n=b[d];e&&-1===F.indexOf(n.basemaps,e)||f.push({name:k.name,label:k.label,description:k.description,basemaps:n.basemaps.slice(0)})}return f},getSchemes:function(e){var f=e.theme,d=e.basemap,k=l(e.geometryType);e=b[f];var n;(e=(e=e&&e[k])&&e[d])&&(n={primaryScheme:h(e.primary,k),secondarySchemes:F.map(e.secondary,function(q){return h(q,
k)})});return n},cloneScheme:function(e){if(e){var f=K.mixin({},e);f.color&&(f.color=new w(f.color));f.outline&&(f.outline={color:f.outline.color&&new w(f.outline.color),width:f.outline.width})}return f}};m("extend-esri")&&K.setObject("styles.basic",c,z);return c})},"widgets/RelatedTableCharts/searchSourceUtils":function(){define("dojo/_base/lang dojo/_base/array dojo/Deferred dojo/when dojo/promise/all jimu/portalUtils esri/lang esri/request".split(" "),function(F,K,m,z,w,h,l,g){return{map:null,
layerInfosObj:null,appConfig:null,_esriLocatorRegExp:/geocode(.){0,3}\.arcgis.com\/arcgis\/rest\/services\/World\/GeocodeServer/g,setMap:function(b){this.map=b},setLayerInfosObj:function(b){this.layerInfosObj=b},setAppConfig:function(b){this.appConfig=b},getConfigInfo:function(b){if(b&&b.sources&&0<b.sources.length){var c=null;return this.searchLayer(this.map)&&b.upgradeFromGeocoder?(c=this.map.itemInfo.itemData.applicationProperties.viewing.search,c=K.map(c.layers,F.hitch(this,function(e,f){f.hintText=
e;return this._getQueryTypeGeocoder(f)},c.hintText)),w(c).then(F.hitch(this,function(e){b.sources=[].concat(e).concat(b.sources);return b}))):b}return z(this._getSoucesFromPortalAndWebmap()).then(F.hitch(this,function(e){return{allPlaceholder:"",showInfoWindowOnSelect:!0,sources:e}}))},_getSoucesFromPortalAndWebmap:function(){var b=[],c=null;this.searchLayer(this.map)&&(c=this.map.itemInfo.itemData.applicationProperties.viewing.search,K.forEach(c.layers,F.hitch(this,function(e,f){f.hintText=e;b.push(this._getQueryTypeGeocoder(f))},
c.hintText)));return h.getPortalSelfInfo(this.appConfig.portalUrl).then(F.hitch(this,function(e){if((e=e.helperServices&&e.helperServices.geocode)&&0<e.length)for(var f=0,d=e.length;f<d;f++){var k=e[f];k&&b.push(this._processSingleLine(k))}return w(b).then(F.hitch(this,function(n){for(var q=[],E=0;E<n.length;E++){var v=n[E];v&&(v&&"query"===v.type?q.push(v):(v={name:v.name||this._getGeocodeName(v.url),url:v.url,singleLineFieldName:v.singleLineFieldName,placeholder:v.placeholder||v.name||this._getGeocodeName(v.url),
maxResults:6,searchInCurrentMapExtent:!1,type:"locator"},v.enableLocalSearch=this._isEsriLocator(v.url),v.localSearchMinScale=3E5,v.localSearchDistance=5E4,q.push(v)))}return q}))}))},_getQueryTypeGeocoder:function(b){var c=this.map.getLayer(b.id),e=null,f=null,d=null;d=l.isDefined(b.subLayer)?b.id+"_"+b.subLayer:b.id;e=this.layerInfosObj.traversal(function(k){return k.id===d?(f=k,!0):!1});return c&&e&&f?(e=l.isDefined(b.subLayer)?f.url||c.url+"/"+b.subLayer:f.url||c.url,{name:f.title,layerId:d,url:e,
placeholder:b.hintText,searchFields:[b.field.name],displayField:b.field.name,exactMatch:b.field.exactMatch||!1,maxResults:6,searchInCurrentMapExtent:!1,type:"query"}):null},_isEsriLocator:function(b){this._esriLocatorRegExp.lastIndex=0;return this._esriLocatorRegExp.test(b)},_processSingleLine:function(b){if(b.singleLineFieldName)return b;if(this._isEsriLocator(b.url))return b.singleLineFieldName="SingleLine",b;var c=new m;g({url:b.url,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}).then(F.hitch(this,
function(e){e.singleLineAddressField&&e.singleLineAddressField.name?(b.singleLineFieldName=e.singleLineAddressField.name,c.resolve(b)):(console.warn(b.url+"has no singleLineFieldName"),c.resolve(null))}),F.hitch(this,function(e){console.error(e);c.resolve(null)}));return c.promise},_getGeocodeName:function(b){if("string"!==typeof b)return"geocoder";b=b.split("/");return b[b.length-2]||"geocoder"},getGeocoderName:function(b){return this._getGeocodeName(b)},hasAppSearchInfo:function(b){return b.itemInfo&&
b.itemInfo.itemData&&b.itemInfo.itemData.applicationProperties&&b.itemInfo.itemData.applicationProperties.viewing&&b.itemInfo.itemData.applicationProperties.viewing.search},searchLayer:function(b){if(!this.hasAppSearchInfo(b))return!1;b=b.itemInfo.itemData.applicationProperties.viewing.search;return b.enabled&&0!==b.layers.length?!0:!1}}})},"widgets/RelatedTableCharts/Accordion":function(){define("dijit/_WidgetBase dojo/_base/declare dojo/Evented dojo/_base/array dojo/_base/lang dojo/on dojo/query dojo/dom-construct dojo/dom-class dojo/dom-style dojo/dom-attr ./ChartLayout jimu/utils dojo/keys dijit/focus".split(" "),
function(F,K,m,z,w,h,l,g,b,c,e,f,d,k,n){return K([F,m],{openPanels:[],chartArray:[],constructor:function(){},postCreate:function(){this.inherited(arguments)},initAccordionPane:function(){var q,E;(this.config.charts.highlightedChartIndex||0===this.config.charts.highlightedChartIndex)&&-1===z.indexOf(this.openPanels,"Chart"+this.config.charts.highlightedChartIndex)&&this.openPanels.push("Chart"+this.config.charts.highlightedChartIndex);var v=g.create("div",{"class":"esriCTAccordionWrapper"},this.node);
this.chartArray=[];z.forEach(this.config.charts,w.hitch(this,function(B,u){var y="Chart"+u;var G=g.create("div",{"class":"esriCTChartRow",chartIndex:y},v);var I=d.sanitizeHTML(B.chartConfig.sectionTitle);I=g.create("div",{"class":"esriCTChartTitle",innerHTML:I,title:I,role:"button",tabindex:0,"aria-label":I,"aria-expanded":"false"},G);var L=g.create("div",{"class":"esriCTChartContent"},G);B.chartData&&B.selectedFeature?(q=new f({nls:this.nls,config:B},g.create("div",{},L)),this.own(h(q,"setFocusNodes",
w.hitch(this,function(){this.emit("setFocusNodes")}))),q.onChartCreated=w.hitch(this,function(){this.openPanels.length?-1===this.openPanels.indexOf(y)&&b.add(L,"esriCTHidden"):0!==u&&b.add(L,"esriCTHidden")}),q.onChartResize=w.hitch(this,function(){this.openPanels.length&&this._setFocusOnChart()}),this.chartArray.push(q),q.startup(),h(I,"click",w.hitch(this,function(M){this._expandChart(M,u)})),h(I,"keydown",w.hitch(this,function(M){M.keyCode!==k.ENTER&&M.keyCode!==k.SPACE||this._expandChart(M,u)}))):
(this.chartArray.push(null),b.add(G,"esriCTDisabledRow"),b.add(L,"esriCTHidden"));-1!==this.openPanels.indexOf(y)&&this._toggleSelectedChart(I,!1);0!==u||this.openPanels.length||(this.config.charts.highlightedChartIndex=u,this._toggleSelectedChart(I,!1))}));var r=l(".esriCTChartTitle",this.node);0<r.length&&(E=r[0]);""!==E&&null!==E&&void 0!==E&&n.focus(E)},_setFocusOnChart:function(){var q=this.config.charts.highlightedChartIndex;q=l(".esriCTChartRow",this.node)[q];var E=l(".esriCTResultsPanel")[0];
q&&E&&(E.scrollTop=q.offsetTop-81);this.emit("setFocusNodes")},_toggleSelectedChart:function(q,E){var v=l(".esriCTChartContent",q.parentElement)[0];var r=e.get(q.parentElement,"chartIndex");var B=r.split("Chart")[1];E?(b.add(v,"esriCTHidden"),b.remove(q,"esriCTChartSelected"),-1!==this.openPanels.indexOf(r)&&this.openPanels.splice(this.openPanels.indexOf(r),1),e.set(q,"aria-expanded","false")):(this.config.charts[B].chartData&&(b.remove(v,"esriCTHidden"),b.add(q,"esriCTChartSelected"),this.chartArray[B]&&
this.chartArray[B].resizeChart(0),this.config.charts.highlightedChartIndex===parseInt(B,10)&&this._highlightChart(q,B),e.set(q,"aria-expanded","true")),-1===this.openPanels.indexOf(r)&&this.openPanels.push(r));this.emit("setFocusNodes")},_highlightChart:function(q,E){this.emit("chartSelected",E);l(".esriCTChartHighlighted").length&&(b.remove(l(".esriCTChartHighlighted")[0],"esriCTSelectedChartBorder"),b.remove(l(".esriCTChartHighlighted")[0],"esriCTChartHighlighted"));b.add(q,"esriCTChartHighlighted");
b.add(q,"esriCTSelectedChartBorder");c.set(q,"border-color",this.config.selectedThemeColor)},resizeContents:function(){z.forEach(this.chartArray,w.hitch(this,function(q,E){q&&q.config.chartData&&-1!==this.openPanels.indexOf("Chart"+E)&&q.resizeChart(300)}))},_expandChart:function(q,E){b.contains(q.currentTarget,"esriCTChartSelected")?b.contains(q.currentTarget,"esriCTChartHighlighted")?this._toggleSelectedChart(q.currentTarget,!0):(this.config.charts.highlightedChartIndex=E,this._highlightChart(q.currentTarget,
E)):(this.config.charts.highlightedChartIndex=E,this._toggleSelectedChart(q.currentTarget,!1))}})})},"widgets/RelatedTableCharts/ChartLayout":function(){define("jimu/BaseWidgetSetting jimu/utils dojo/dom-attr dojo/dom-construct dojo/dom-style dojo/_base/declare dojo/_base/lang dijit/_WidgetsInTemplateMixin dojo/text!./ChartLayout.html dojox/charting/Chart dojox/charting/plot2d/Pie dojox/charting/action2d/Tooltip dojox/charting/action2d/Highlight dojox/charting/action2d/MoveSlice dojox/charting/plot2d/Spider dojox/charting/widget/SelectableLegend dojox/charting/action2d/Magnify dojo/_base/array dojox/charting/Theme dojo/Evented dojox/charting/plot2d/Bars dojox/charting/axis2d/Default dojox/charting/plot2d/Lines".split(" "),
function(F,K,m,z,w,h,l,g,b,c,e,f,d,k,n,q,E,v,r,B){return h([F,g,B],{baseClass:"jimu-widget-RelatedTableCharts-layout",templateString:b,postCreate:function(){this.inherited(arguments)},startup:function(){this._createChartLayout()},_createChartLayout:function(){this._setNodeValue(this.layoutHeaderTitle,this.config.chartConfig.chartTitle,!0);this._setNodeValue(this.chartDescription,this.config.chartConfig.description,!1);this._initChart()},resizeChart:function(u){this.chart&&setTimeout(l.hitch(this,
function(){"PieChart"!==this.config.chartConfig.chartType?this.chart.resize():this._initChart();this.onChartResize()}),u)},_setNodeValue:function(u,y,G){var I=y;this.config.isPreview||(I=this._getFieldValues(y,this.config.selectedFeature.attributes));I?(I=K.sanitizeHTML(I),m.set(u,"innerHTML",I),G&&m.set(u,"title",I)):w.set(u,"display","none")},_initChart:function(){switch(this.config.chartConfig.chartType){case "BarChart":this._createBarChart();break;case "PieChart":this._createPieChart();break;
case "PolarChart":this._createPolarChart();break;case "LineChart":this._createLineChart();break;default:m.set(this.chartContainer,"innerHTML",this.nls.errMsgNoFeaturesFound)}},_getBarChartContainerHeight:function(){var u=30;0<this.config.chartData.chartSeries.length&&(u=30*this.config.chartData.chartSeries.length);this.config.isPreview?150>=u&&(u+=150):150>=u&&(u+=100);return u+"px"},_createBarChart:function(){var u={},y={};u=40;var G={};z.empty(this.chartContainer);u=this._getBarChartContainerHeight();
var I=new c(z.create("div",{style:"overflow:hidden; width:100%; height:"+u},this.chartContainer));I.addPlot("default",{type:"Bars",gap:4,minBarSize:10,maxBarSize:15});y=w.get(this.chartDescription,"fontFamily");var L=w.get(this.chartDescription,"fontSize");var M=w.get(this.chartDescription,"color");u={labels:this.config.chartData.chartLabels,maxLabelCharCount:35,trailingSymbol:"...",natural:!0,majorTickStep:1,minorTicks:!1,fixUpper:!0,includeZero:!1,vertical:!0,titleFontColor:M,titleFont:"normal normal normal "+
L+" "+y,font:"normal normal normal 9px "+y};window.isRTL&&(u.leftBottom=!1,I.setDir("rtl"));y={fixLower:"major",fixUpper:"major",minorTicks:!1,includeZero:!0,titleFontColor:M,titleFont:"normal normal normal "+L+" "+y,font:"normal normal normal 9px "+y};this.config.isPreview?(y.titleGap=5,u.majorTick={length:0},y.majorTick={length:0},u.majorLabels=!1,y.majorLabels=!1,u.minorLabels=!1,y.minorLabels=!1,u.title=this.config.chartConfig.labelYAxis,y.title=this.config.chartConfig.labelXAxis,G.stroke={width:0}):
(new f(I,"default"),u.title=this._getFieldValues(this.config.chartConfig.labelYAxis,this.config.selectedFeature.attributes),y.title=this._getFieldValues(this.config.chartConfig.labelXAxis,this.config.selectedFeature.attributes),G.stroke={width:1});y.titleOrientation="away";I.addAxis("y",u);I.addAxis("x",y);this.config.chartData.selectedTheme&&I.setTheme(this.config.chartData.selectedTheme);this.config.chartData.fill&&(G.fill=this.config.chartData.fill);v.forEach(this.config.chartData.chartSeries,
function(S,X){S.x=X+1;S.y=S.y;I.addSeries(X+1,[S],G,{plot:"default"})},this);new d(I,"default");I.render();this.chart=I;this.onChartCreated()},_createLineChart:function(){var u={};u.marker=r.defaultMarkers.CIRCLE;u.markerStroke={width:1};z.empty(this.chartContainer);var y=new c(z.create("div",{style:"overflow:hidden; width:100%; height:"+(this.config.isPreview?"300px":"270px")},this.chartContainer));var G=w.get(this.chartDescription,"fontFamily");var I=w.get(this.chartDescription,"fontSize");var L=
w.get(this.chartDescription,"color");var M={maxLabelCharCount:30,trailingSymbol:"...",natural:!0,vertical:!0,titleGap:0,titleFontColor:L,titleFont:"normal normal normal "+I+" "+G,max:this._calculateMajorTickStep(!0,!0),majorLabels:!0,minorTicks:!0,minorLabels:!0,microTicks:!1,fixLower:"major",fixUpper:"major",majorTickStep:this._calculateMajorTickStep(!0,!1)};this._setLineChartYaxisMin(M);this.config.isPreview||(M.font="normal normal bold 9px "+G);window.isRTL&&(M.leftBottom=!1,y.setDir("rtl"));G=
{labels:this.config.chartData.chartLabels[0],maxLabelCharCount:35,trailingSymbol:"...",titleGap:0,titleFontColor:L,titleFont:"normal normal normal "+I+" "+G,font:"normal normal bold "+this._calculateXAxisLabelFontSize(this.config.chartData.chartLabels[0].length)+"px "+G,titleOrientation:"away",rotation:-90,minorLabels:!0,majorLabels:!0,minorTicks:!0,microTicks:!1,max:this.config.chartData.chartLabels[0].length+.5,min:.5};this.config.isPreview?(M.minorLabels=!1,M.majorLabels=!0,M.title=this.config.chartConfig.labelYAxis,
G.minorLabels=!0,G.majorLabels=!0,G.title=this.config.chartConfig.labelXAxis,G.max=11):(M.title=this._getFieldValues(this.config.chartConfig.labelYAxis,this.config.selectedFeature.attributes),G.title=this._getFieldValues(this.config.chartConfig.labelXAxis,this.config.selectedFeature.attributes));u.stroke={width:1};y.addPlot("default",{type:"Lines",markers:!0,styleFunc:l.hitch(this,function(C){return this.config.chartConfig.chartColor&&"ColorByFieldValue"===this.config.chartConfig.chartColor.colorType?
(C=this.config.chartConfig.chartColor.colorInfo.layerFieldValues[C])?{fill:C}:{fill:"#000000"}:this.config.isPreview?{fill:"#0000ff"}:{fill:"#000000"}})});y.addAxis("y",M);y.addAxis("x",G);this.config.chartData.selectedTheme&&y.setTheme(this.config.chartData.selectedTheme);this.config.chartData.fill&&(u.stroke.color=this.config.chartData.fill);var S=Object.keys(r.defaultMarkers);S[3]&&S[5]&&this.swap(S,3,5);S[4]&&S[6]&&this.swap(S,4,6);var X=S.length;v.forEach(this.config.chartData.chartSeries,l.hitch(this,
function(C,H){var O=C[0]&&C[0].seriesName?C[0].seriesName:this.nls.ChartSetting.layoutSeriesLabel+" "+H;if(this.config.chartConfig.chartColor&&"ColorByFieldValue"===this.config.chartConfig.chartColor.colorType||this.config.isPreview)u.stroke.color="#"+Math.floor(16777215*Math.random()).toString(16);this.config.chartData.fill&&(H<X?u.marker=r.defaultMarkers[S[H]]:(H%=X,u.marker=r.defaultMarkers[S[H]]));y.addSeries(O,C,l.clone(u))}));new f(y,"default");new d(y,"default");new E(y,"default");y.render();
this.chart=y;w.set(this.legendContainer,"display","block");1<this.config.chartData.chartSeries.length&&this._createChartLegend(y,!0);this.onChartCreated()},swap:function(u,y,G){var I=u[y];u[y]=u[G];u[G]=I},_calculateXAxisLabelFontSize:function(u){switch(!0){case 20>u:return 9;case 20<=u:return 9;default:return 9}},_calculateMajorTickStep:function(u,y){var G=[];u&&this.config.chartData.chartSeries.forEach(l.hitch(this,function(I){I.forEach(l.hitch(this,function(L){y?G.push(L.y):G.push(Math.abs(L.y))}))}));
if(0<G.length){u=Math.max.apply(null,G);if(y)return u+1;u/=20;u=Math.round(u)?Math.round(u):u}else u=null;return Math.abs(u)},_createPieChart:function(){var u={};z.empty(this.chartContainer);var y=z.create("div",{style:"width:100%; height:100%; overflow:auto"},this.chartContainer);y=new c(y);u={type:e,labels:!0,ticks:!0,fixed:!0,precision:0,labelWiring:"#ccc",labelStyle:"columns",htmlLabels:!0,startAngle:-10,maxLabelCharCount:20,trailingSymbol:"..."};"esriCTEmptyOption"===this.config.chartConfig.labelField&&
(u.labels=!1);y.addPlot("default",u);this.config.isPreview||new f(y,"default");this.config.chartData.fill?y.addSeries(this.config.chartConfig.dataSeriesField,this.config.chartData.chartSeries,{fill:this.config.chartData.fill},{plot:"default"}):y.addSeries(this.config.dataSeriesField,this.config.chartData.chartSeries,{plot:"default"});this.config.chartData.selectedTheme&&y.setTheme(this.config.chartData.selectedTheme);new k(y,"default");new d(y,"default");y.render();this.chart=y;this.onChartCreated()},
_createPolarChart:function(){var u,y=.2,G=!1;this.chart&&this.chart.destroy();z.empty(this.chartContainer);w.set(this.chartContainer,"direction","inherit");var I=z.create("div",{style:"width:100%; height:100%; overflow:hidden"},this.chartContainer);var L=w.get(this.chartDescription,"fontFamily");I=new c(I);this.config.chartConfig.showPolygonFill||(y=0);I.addPlot("default",{type:n,labelOffset:-10,divisions:5,seriesFillAlpha:y,markerSize:3,precision:0,spiderType:"polygon",axisFont:"normal normal normal 9px/25px "+
L});this.config.chartData.selectedTheme?I.setTheme(this.config.chartData.selectedTheme):this.config.chartConfig.chartColor.colorInfo&&this.config.chartConfig.chartColor.colorInfo.layerField&&(G=!0);for(y=0;y<this.config.chartData.chartSeries.length;y++)for(u in L=this.config.chartData.chartSeries[y],L)L.hasOwnProperty(u)&&(this.config.chartData.fill?I.addSeries(u,L[u],{fill:this.config.chartData.fill}):L[u].fill?I.addSeries(u,L[u],{fill:L[u].fill,legend:L[u].legendLabel}):I.addSeries(u,L[u]));this.config.isPreview||
new f(I,"default");new d(I,"default");new E(I,"default",{duration:800,scale:1.5});I.render();this.chart=I;!this.config.isPreview&&G&&(w.set(this.legendContainer,"display","block"),this._createChartLegend(I,!0));this.onChartCreated()},_createChartLegend:function(u,y){setTimeout(l.hitch(this,function(){this.legend&&(this.legend.destroy(),this.legend=null);z.empty(this.legendNode);this.legend=new q({chart:u,horizontal:y},z.create("div",{},this.legendNode));this.emit("setFocusNodes")}),1500)},onChartCreated:function(){},
onChartResize:function(){},_getFieldValues:function(u,y){var G="",I,L;u=u.replace(/(\n|\r|\r\n)/g,"\x3cbr\x3e");var M=u.split("{");for(I=0;I<M.length;I++)if(0===I)G+=M[I];else if(-1!==M[I].indexOf("}"))for(u=M[I].split("}"),L=0;L<u.length;L++)if(0===L){if(y[u[L]]||0===y[u[L]])G+=y[u[L]]}else G=1===L?G+u[L]:G+("}"+u[L]);else G+="{";return G},_setLineChartYaxisMin:function(u){var y=[];var G=[];v.forEach(this.config.chartData.chartSeries,l.hitch(this,function(L){v.forEach(L,l.hitch(this,function(M){0<=
M.y&&y.push(M.y);G.push(M.y)}))}));if(y.length===G.length)u.min=0;else{var I=Math.min.apply(null,G);u.min=I-1}}})})},"dojox/charting/Chart":function(){define("../main dojo/_base/lang dojo/_base/array dojo/_base/declare dojo/dom-style dojo/dom dojo/dom-geometry dojo/dom-construct dojo/_base/Color dojo/sniff ./Element ./SimpleTheme ./Series ./axis2d/common ./plot2d/common dojox/gfx/shape dojox/gfx dojo/has!dojo-bidi?./bidi/Chart dojox/lang/functional dojox/lang/functional/fold dojox/lang/functional/reversed".split(" "),
function(F,K,m,z,w,h,l,g,b,c,e,f,d,k,n,q,E,v,r){function B(C){return C.clear()}function u(C){return C.destroy()}function y(C){return C.dirty=!1}function G(C){return C.dirty=!0}function I(C){return C.name}function L(C,H){C&&H&&(C.min=Math.min(C.min,H.min),C.max=Math.max(C.max,H.max));return C||H}function M(C,H){var O={},R={};m.forEach(C,function(P){var N=O[P.name]=P.getSeriesStats();P.hAxis&&(R[P.hAxis]=L(R[P.hAxis],{min:N.hmin,max:N.hmax}));P.vAxis&&(R[P.vAxis]=L(R[P.vAxis],{min:N.vmin,max:N.vmax}))});
m.forEach(C,function(P){var N=O[P.name];if(P.hAxis){var Z=R[P.hAxis];N.hmin=Z.min;N.hmax=Z.max}P.vAxis&&(Z=R[P.vAxis],N.vmin=Z.min,N.vmax=Z.max);P.initializeScalers(H,N)})}var S=K.getObject("charting",!0,F),X={l:10,t:10,r:10,b:10};F=z(c("dojo-bidi")?"dojox.charting.NonBidiChart":"dojox.charting.Chart",null,{constructor:function(C,H){H||(H={});this.margins=H.margins||X;this._customMargins=!!H.margins;this.stroke=H.stroke;this.fill=H.fill;this.delayInMs=H.delayInMs||200;this.title=H.title;this.titleGap=
H.titleGap;this.titlePos=H.titlePos;this.titleFont=H.titleFont;this.titleFontColor=H.titleFontColor;this.titleAlign=H.titleAlign;this.chartTitle=null;this.htmlLabels=!0;"htmlLabels"in H&&(this.htmlLabels=H.htmlLabels);this.theme=null;this.axes={};this.stack=[];this.plots={};this.series=[];this.runs={};this.dirty=!0;this.node=h.byId(C);C=l.getMarginBox(C);this.surface=E.createSurface(this.node,C.w||400,C.h||300);-1==this.surface.declaredClass.indexOf("vml")&&(this._nativeClip=!0)},destroy:function(){m.forEach(this.series,
u);m.forEach(this.stack,u);r.forIn(this.axes,u);this.surface.destroy();this.chartTitle&&this.chartTitle.tagName&&g.destroy(this.chartTitle)},getCoords:function(){var C=this.node,H=w.getComputedStyle(C);H=l.getMarginBox(C,H);C=l.position(C,!0);H.x=C.x;H.y=C.y;return H},setTheme:function(C){this.theme=C.clone();this._customMargins||(this.margins=this.theme.chart.margins||X);this.dirty=!0;return this},addAxis:function(C,H){var O=H&&H.type||"Default";if("string"==typeof O){if(!S.axis2d||!S.axis2d[O])throw Error("Can't find axis: "+
O+" - Check require() dependencies.");H=new S.axis2d[O](this,H)}else H=new O(this,H);H.name=C;H.dirty=!0;C in this.axes&&this.axes[C].destroy();this.axes[C]=H;this.dirty=!0;return this},getAxis:function(C){return this.axes[C]},removeAxis:function(C){C in this.axes&&(this.axes[C].destroy(),delete this.axes[C],this.dirty=!0);return this},addPlot:function(C,H){var O=H&&H.type||"Default";if("string"==typeof O){if(!S.plot2d||!S.plot2d[O])throw Error("Can't find plot: "+O+" - didn't you forget to dojo.require() it?");
H=new S.plot2d[O](this,H)}else H=new O(this,H);H.name=C;H.dirty=!0;C in this.plots?(this.stack[this.plots[C]].destroy(),this.stack[this.plots[C]]=H):(this.plots[C]=this.stack.length,this.stack.push(H));this.dirty=!0;return this},getPlot:function(C){return this.stack[this.plots[C]]},removePlot:function(C){if(C in this.plots){var H=this.plots[C];delete this.plots[C];this.stack[H].destroy();this.stack.splice(H,1);r.forIn(this.plots,function(R,P,N){R>H&&(N[P]=R-1)});var O=m.filter(this.series,function(R){return R.plot!=
C});O.length<this.series.length&&(m.forEach(this.series,function(R){R.plot==C&&R.destroy()}),this.runs={},m.forEach(O,function(R,P){this.runs[R.plot]=P},this),this.series=O);this.dirty=!0}return this},getPlotOrder:function(){return r.map(this.stack,I)},setPlotOrder:function(C){var H={},O=r.filter(C,function(R){if(!(R in this.plots)||R in H)return!1;H[R]=1;return!0},this);O.length<this.stack.length&&r.forEach(this.stack,function(R){R=R.name;R in H||O.push(R)});C=r.map(O,function(R){return this.stack[this.plots[R]]},
this);r.forEach(C,function(R,P){this.plots[R.name]=P},this);this.stack=C;this.dirty=!0;return this},movePlotToFront:function(C){if(C in this.plots){var H=this.plots[C];if(H){var O=this.getPlotOrder();O.splice(H,1);O.unshift(C);return this.setPlotOrder(O)}}return this},movePlotToBack:function(C){if(C in this.plots){var H=this.plots[C];if(H<this.stack.length-1){var O=this.getPlotOrder();O.splice(H,1);O.push(C);return this.setPlotOrder(O)}}return this},addSeries:function(C,H,O){H=new d(this,H,O);H.name=
C;C in this.runs?(this.series[this.runs[C]].destroy(),this.series[this.runs[C]]=H):(this.runs[C]=this.series.length,this.series.push(H));this.dirty=!0;!("ymin"in H)&&"min"in H&&(H.ymin=H.min);!("ymax"in H)&&"max"in H&&(H.ymax=H.max);return this},getSeries:function(C){return this.series[this.runs[C]]},removeSeries:function(C){if(C in this.runs){var H=this.runs[C];delete this.runs[C];this.series[H].destroy();this.series.splice(H,1);r.forIn(this.runs,function(O,R,P){O>H&&(P[R]=O-1)});this.dirty=!0}return this},
updateSeries:function(C,H,O){C in this.runs&&(C=this.series[this.runs[C]],C.update(H),O?this.dirty=!0:(this._invalidateDependentPlots(C.plot,!1),this._invalidateDependentPlots(C.plot,!0)));return this},getSeriesOrder:function(C){return r.map(r.filter(this.series,function(H){return H.plot==C}),I)},setSeriesOrder:function(C){var H,O={},R=r.filter(C,function(P){if(!(P in this.runs)||P in O)return!1;var N=this.series[this.runs[P]];if(H){if(N.plot!=H)return!1}else H=N.plot;O[P]=1;return!0},this);r.forEach(this.series,
function(P){var N=P.name;N in O||P.plot!=H||R.push(N)});this.series=r.map(R,function(P){return this.series[this.runs[P]]},this).concat(r.filter(this.series,function(P){return P.plot!=H}));r.forEach(this.series,function(P,N){this.runs[P.name]=N},this);this.dirty=!0;return this},moveSeriesToFront:function(C){if(C in this.runs){var H=this.runs[C],O=this.getSeriesOrder(this.series[H].plot);if(C!=O[0])return O.splice(H,1),O.unshift(C),this.setSeriesOrder(O)}return this},moveSeriesToBack:function(C){if(C in
this.runs){var H=this.runs[C],O=this.getSeriesOrder(this.series[H].plot);if(C!=O[O.length-1])return O.splice(H,1),O.push(C),this.setSeriesOrder(O)}return this},resize:function(C,H){switch(arguments.length){case 1:l.setMarginBox(this.node,C);break;case 2:l.setMarginBox(this.node,{w:C,h:H})}var O=l.getMarginBox(this.node),R=this.surface.getDimensions();return R.width!=O.w||R.height!=O.h?(this.surface.setDimensions(O.w,O.h),this.dirty=!0,this.render()):this},getGeometry:function(){var C={};r.forIn(this.axes,
function(H){H.initialized()&&(C[H.name]={name:H.name,vertical:H.vertical,scaler:H.scaler,ticks:H.ticks})});return C},setAxisWindow:function(C,H,O,R){var P=this.axes[C];P&&(P.setWindow(H,O),m.forEach(this.stack,function(N){if(N.hAxis==C||N.vAxis==C)N.zoom=R}));return this},setWindow:function(C,H,O,R,P){"plotArea"in this||this.calculateGeometry();r.forIn(this.axes,function(N){var Z=N.getScaler().bounds;var W=Z.span/(Z.upper-Z.lower);N.vertical?(Z=H,W=R/W/Z):(Z=C,W=O/W/Z);N.setWindow(Z,W)});m.forEach(this.stack,
function(N){N.zoom=P});return this},zoomIn:function(C,H,O){var R=this.axes[C];if(R){R=R.getScaler().bounds;var P=Math.min(H[0],H[1]),N=Math.max(H[0],H[1]);P=H[0]<R.lower?R.lower:P;N=H[1]>R.upper?R.upper:N;this.setAxisWindow(C,(R.upper-R.lower)/(N-P),P-R.lower);O?this.delayedRender():this.render()}},calculateGeometry:function(){if(this.dirty)return this.fullGeometry();var C=m.filter(this.stack,function(H){return H.dirty||H.hAxis&&this.axes[H.hAxis].dirty||H.vAxis&&this.axes[H.vAxis].dirty},this);M(C,
this.plotArea);return this},fullGeometry:function(){this._makeDirty();m.forEach(this.stack,B);this.theme||this.setTheme(new f);m.forEach(this.series,function(P){if(!(P.plot in this.plots)){if(!S.plot2d||!S.plot2d.Default)throw Error("Can't find plot: Default - didn't you forget to dojo.require() it?");var N=new S.plot2d.Default(this,{});N.name=P.plot;this.plots[P.plot]=this.stack.length;this.stack.push(N)}this.stack[this.plots[P.plot]].addSeries(P)},this);m.forEach(this.stack,function(P){P.assignAxes&&
P.assignAxes(this.axes)},this);var C=this.dim=this.surface.getDimensions();C.width=E.normalizedLength(C.width);C.height=E.normalizedLength(C.height);r.forIn(this.axes,B);M(this.stack,C);var H=this.offsets={l:0,r:0,t:0,b:0},O=this;r.forIn(this.axes,function(P){c("dojo-bidi")&&O._resetLeftBottom(P);r.forIn(P.getOffsets(),function(N,Z){H[Z]=Math.max(N,H[Z])})});if(this.title){this.titleGap=0==this.titleGap?0:this.titleGap||this.theme.chart.titleGap||20;this.titlePos=this.titlePos||this.theme.chart.titlePos||
"top";this.titleFont=this.titleFont||this.theme.chart.titleFont;this.titleFontColor=this.titleFontColor||this.theme.chart.titleFontColor||"black";this.titleAlign=this.titleAlign||this.theme&&this.theme.chart&&this.theme.chart.titleAlign||"middle";var R=E.normalizedLength(E.splitFontString(this.titleFont).size);H["top"==this.titlePos?"t":"b"]+=R+this.titleGap}r.forIn(this.margins,function(P,N){H[N]+=P});this.plotArea={width:C.width-H.l-H.r,height:C.height-H.t-H.b};r.forIn(this.axes,B);M(this.stack,
this.plotArea);return this},render:function(){this._delayedRenderHandle&&(clearTimeout(this._delayedRenderHandle),this._delayedRenderHandle=null);this.theme&&this.theme.clear();if(this.dirty)return this.fullRender();this.calculateGeometry();r.forEachRev(this.stack,function(C){C.render(this.dim,this.offsets)},this);r.forIn(this.axes,function(C){C.render(this.dim,this.offsets)},this);this._makeClean();return this},fullRender:function(){this.fullGeometry();var C=this.offsets,H=this.dim,O=Math.max(0,
H.width-C.l-C.r),R=Math.max(0,H.height-C.t-C.b);m.forEach(this.series,n.purgeGroup);r.forIn(this.axes,n.purgeGroup);m.forEach(this.stack,n.purgeGroup);var P=this.surface.children;if(q.dispose)for(var N=0;N<P.length;++N)q.dispose(P[N]);this.chartTitle&&this.chartTitle.tagName&&g.destroy(this.chartTitle);this.surface.clear();this.chartTitle=null;this._renderChartBackground(H,C);this._renderPlotBackground(H,C,O,R);r.foldr(this.stack,function(Z,W){return W.render(H,C),0},0);this._nativeClip||this._renderChartBackground(H,
C);this.title&&this._renderTitle(H,C);r.forIn(this.axes,function(Z){Z.render(H,C)});this._makeClean();return this},_renderTitle:function(C,H){var O="canvas"==E.renderer&&this.htmlLabels||!c("ie")&&!c("opera")&&this.htmlLabels?"html":"gfx",R=E.normalizedLength(E.splitFontString(this.titleFont).size),P=E._base._getTextBox(this.title,{font:this.titleFont}),N=this.titleAlign,Z=c("dojo-bidi")&&this.isRightToLeft(),W=C.width/2;"edge"===N?(N="left",W=Z?C.width-(H.r+P.w):H.l):"middle"!=N&&(Z&&(N="left"===
N?"right":"left"),"left"===N?W=this.margins.l:"right"===N&&(N="left",W=C.width-(this.margins.l+P.w)));this.chartTitle=k.createText[O](this,this.surface,W,"top"==this.titlePos?R+this.margins.t:C.height-this.margins.b,N,this.title,this.titleFont,this.titleFontColor)},_renderChartBackground:function(C,H){var O=this.theme,R=void 0!==this.fill?this.fill:O.chart&&O.chart.fill;O=void 0!==this.stroke?this.stroke:O.chart&&O.chart.stroke;if("inherit"==R){var P=this.node;for(R=new b(w.get(P,"backgroundColor"));0==
R.a&&P!=document.documentElement;)R=new b(w.get(P,"backgroundColor")),P=P.parentNode}R&&(this._nativeClip?(R=e.prototype._shapeFill(e.prototype._plotFill(R,C),{x:0,y:0,width:C.width+1,height:C.height+1}),this.surface.createRect({width:C.width+1,height:C.height+1}).setFill(R)):(R=e.prototype._plotFill(R,C,H),H.l&&(P={x:0,y:0,width:H.l,height:C.height+1},this.surface.createRect(P).setFill(e.prototype._shapeFill(R,P))),H.r&&(P={x:C.width-H.r,y:0,width:H.r+1,height:C.height+2},this.surface.createRect(P).setFill(e.prototype._shapeFill(R,
P))),H.t&&(P={x:0,y:0,width:C.width+1,height:H.t},this.surface.createRect(P).setFill(e.prototype._shapeFill(R,P))),H.b&&(P={x:0,y:C.height-H.b,width:C.width+1,height:H.b+2},this.surface.createRect(P).setFill(e.prototype._shapeFill(R,P)))));O&&this.surface.createRect({width:C.width-1,height:C.height-1}).setStroke(O)},_renderPlotBackground:function(C,H,O,R){var P=this.theme,N=P.plotarea&&P.plotarea.fill;P=P.plotarea&&P.plotarea.stroke;var Z={x:H.l-1,y:H.t-1,width:O+2,height:R+2};N&&(N=e.prototype._shapeFill(e.prototype._plotFill(N,
C,H),Z),this.surface.createRect(Z).setFill(N));P&&this.surface.createRect({x:H.l,y:H.t,width:O+1,height:R+1}).setStroke(P)},delayedRender:function(){this._delayedRenderHandle||(this._delayedRenderHandle=setTimeout(K.hitch(this,function(){this.render()}),this.delayInMs));return this},connectToPlot:function(C,H,O){return C in this.plots?this.stack[this.plots[C]].connect(H,O):null},fireEvent:function(C,H,O){if(C in this.runs){var R=this.series[this.runs[C]].plot;R in this.plots&&(R=this.stack[this.plots[R]])&&
R.fireEvent(C,H,O)}return this},_makeClean:function(){m.forEach(this.axes,y);m.forEach(this.stack,y);m.forEach(this.series,y);this.dirty=!1},_makeDirty:function(){m.forEach(this.axes,G);m.forEach(this.stack,G);m.forEach(this.series,G);this.dirty=!0},_invalidateDependentPlots:function(C,H){if(C in this.plots){var O=this.stack[this.plots[C]],R=H?"vAxis":"hAxis";O[R]?(C=this.axes[O[R]])&&C.dependOnData()&&(C.dirty=!0,m.forEach(this.stack,function(P){P[R]&&P[R]==O[R]&&(P.dirty=!0)})):O.dirty=!0}},setDir:function(C){return this},
_resetLeftBottom:function(C){},formatTruncatedLabel:function(C,H,O){}});return c("dojo-bidi")?z("dojox.charting.Chart",[F,v]):F})},"dojox/charting/Element":function(){define(["dojo/_base/array","dojo/dom-construct","dojo/_base/declare","dojox/gfx","dojox/gfx/shape"],function(F,K,m,z,w){return m("dojox.charting.Element",null,{chart:null,group:null,htmlElements:null,dirty:!0,renderingOptions:null,constructor:function(h,l){this.chart=h;this.group=null;this.htmlElements=[];this.dirty=!0;this.trailingSymbol=
"...";this._events=[];l&&l.renderingOptions&&(this.renderingOptions=l.renderingOptions)},purgeGroup:function(){this.destroyHtmlElements();if(this.group){this.getGroup().removeShape();var h=this.getGroup().children;if(w.dispose)for(var l=0;l<h.length;++l)w.dispose(h[l],!0);this.getGroup().rawNode&&K.empty(this.getGroup().rawNode);this.getGroup().clear();w.dispose&&w.dispose(this.getGroup(),!0);this.getGroup()!=this.group&&(this.group.rawNode&&K.empty(this.group.rawNode),this.group.clear(),w.dispose&&
w.dispose(this.group,!0));this.group=null}this.dirty=!0;this._events.length&&(F.forEach(this._events,function(g){g.shape.disconnect(g.handle)}),this._events=[]);return this},cleanGroup:function(h){this.destroyHtmlElements();h||(h=this.chart.surface);if(this.group){h=this.getGroup().children;if(w.dispose)for(var l=0;l<h.length;++l)w.dispose(h[l],!0);if(this.getGroup().rawNode){var g=this.getGroup().bgNode;K.empty(this.getGroup().rawNode)}this.getGroup().clear();g&&this.getGroup().rawNode.appendChild(g)}else if(this.group=
h.createGroup(),this.renderingOptions&&this.group.rawNode&&"http://www.w3.org/2000/svg"==this.group.rawNode.namespaceURI)for(l in this.renderingOptions)this.group.rawNode.setAttribute(l,this.renderingOptions[l]);this.dirty=!0;return this},getGroup:function(){return this.group},destroyHtmlElements:function(){this.htmlElements.length&&(F.forEach(this.htmlElements,K.destroy),this.htmlElements=[])},destroy:function(){this.purgeGroup()},overrideShape:function(h,l){},getTextWidth:function(h,l){return z._base._getTextBox(h,
{font:l}).w||0},getTextWithLimitLength:function(h,l,g,b){if(!h||0>=h.length)return{text:"",truncated:b||!1};if(!g||0>=g)return{text:h,truncated:b||!1};var c=h.substring(0,1)+this.trailingSymbol,e=this.getTextWidth(c,l);if(g<=e)return{text:c,truncated:!0};if(this.getTextWidth(h,l)<=g)return{text:h,truncated:b||!1};b=0;for(c=h.length;b<c;){if(2>=c-b){for(;this.getTextWidth(h.substring(0,b)+this.trailingSymbol,l)>g;)--b;return{text:h.substring(0,b)+this.trailingSymbol,truncated:!0}}e=b+Math.round(.618*
(c-b));this.getTextWidth(h.substring(0,e),l)<g?b=e:c=e}},getTextWithLimitCharCount:function(h,l,g,b){return!h||0>=h.length?{text:"",truncated:b||!1}:!g||0>=g||h.length<=g?{text:h,truncated:b||!1}:{text:h.substring(0,g)+this.trailingSymbol,truncated:!0}},_plotFill:function(h,l,g){if(!h||!h.type||!h.space)return h;var b=h.space;switch(h.type){case "linear":if("plot"===b||"shapeX"===b||"shapeY"===b){h=z.makeParameters(z.defaultLinearGradient,h);h.space=b;if("plot"===b||"shapeX"===b){var c=l.height-g.t-
g.b;h.y1=g.t+c*h.y1/100;h.y2=g.t+c*h.y2/100}if("plot"===b||"shapeY"===b)c=l.width-g.l-g.r,h.x1=g.l+c*h.x1/100,h.x2=g.l+c*h.x2/100}break;case "radial":"plot"===b&&(h=z.makeParameters(z.defaultRadialGradient,h),h.space=b,b=l.width-g.l-g.r,l=l.height-g.t-g.b,h.cx=g.l+b*h.cx/100,h.cy=g.t+l*h.cy/100,h.r=h.r*Math.sqrt(b*b+l*l)/200);break;case "pattern":if("plot"===b||"shapeX"===b||"shapeY"===b){h=z.makeParameters(z.defaultPattern,h);h.space=b;if("plot"===b||"shapeX"===b)c=l.height-g.t-g.b,h.y=g.t+c*h.y/
100,h.height=c*h.height/100;if("plot"===b||"shapeY"===b)c=l.width-g.l-g.r,h.x=g.l+c*h.x/100,h.width=c*h.width/100}}return h},_shapeFill:function(h,l){if(!h||!h.space)return h;var g=h.space;switch(h.type){case "linear":if("shape"===g||"shapeX"===g||"shapeY"===g){h=z.makeParameters(z.defaultLinearGradient,h);h.space=g;if("shape"===g||"shapeX"===g){var b=l.width;h.x1=l.x+b*h.x1/100;h.x2=l.x+b*h.x2/100}if("shape"===g||"shapeY"===g)b=l.height,h.y1=l.y+b*h.y1/100,h.y2=l.y+b*h.y2/100}break;case "radial":"shape"===
g&&(h=z.makeParameters(z.defaultRadialGradient,h),h.space=g,h.cx=l.x+l.width/2,h.cy=l.y+l.height/2,h.r=h.r*l.width/200);break;case "pattern":if("shape"===g||"shapeX"===g||"shapeY"===g){h=z.makeParameters(z.defaultPattern,h);h.space=g;if("shape"===g||"shapeX"===g)b=l.width,h.x=l.x+b*h.x/100,h.width=b*h.width/100;if("shape"===g||"shapeY"===g)b=l.height,h.y=l.y+b*h.y/100,h.height=b*h.height/100}}return h},_pseudoRadialFill:function(h,l,g,b,c){if(!h||"radial"!==h.type||"shape"!==h.space)return h;var e=
h.space;h=z.makeParameters(z.defaultRadialGradient,h);h.space=e;if(4>arguments.length)return h.cx=l.x,h.cy=l.y,h.r=h.r*g/100,h;e=5>arguments.length?b:(c+b)/2;return{type:"linear",x1:l.x,y1:l.y,x2:l.x+h.r*g*Math.cos(e)/100,y2:l.y+h.r*g*Math.sin(e)/100,colors:h.colors}}})})},"dojox/gfx/shape":function(){define("./_base dojo/_base/lang dojo/_base/declare dojo/_base/kernel dojo/_base/sniff dojo/on dojo/_base/array dojo/dom-construct dojo/_base/Color ./matrix".split(" "),function(F,K,m,z,w,h,l,g,b,c){function e(d,
k){for(var n=d.length-1;k<n;)d[k]=d[++k];d.length=n}var f=F.shape={};f.Shape=m("dojox.gfx.shape.Shape",null,{constructor:function(){this.parentMatrix=this.parent=this.bbox=this.strokeStyle=this.fillStyle=this.matrix=this.shape=this.rawNode=null;if(w("gfxRegistry")){var d=f.register(this);this.getUID=function(){return d}}},destroy:function(){w("gfxRegistry")&&f.dispose(this);this.rawNode&&"__gfxObject__"in this.rawNode&&(this.rawNode.__gfxObject__=null);this.rawNode=null},getNode:function(){return this.rawNode},
getShape:function(){return this.shape},getTransform:function(){return this.matrix},getFill:function(){return this.fillStyle},getStroke:function(){return this.strokeStyle},getParent:function(){return this.parent},getBoundingBox:function(){return this.bbox},getTransformedBoundingBox:function(){var d=this.getBoundingBox();if(!d)return null;var k=this._getRealMatrix();return[c.multiplyPoint(k,d.x,d.y),c.multiplyPoint(k,d.x+d.width,d.y),c.multiplyPoint(k,d.x+d.width,d.y+d.height),c.multiplyPoint(k,d.x,
d.y+d.height)]},getEventSource:function(){return this.rawNode},setClip:function(d){this.clip=d},getClip:function(){return this.clip},setShape:function(d){this.shape=F.makeParameters(this.shape,d);this.bbox=null;return this},setFill:function(d){if(!d)return this.fillStyle=null,this;var k=null;if("object"==typeof d&&"type"in d)switch(d.type){case "linear":k=F.makeParameters(F.defaultLinearGradient,d);break;case "radial":k=F.makeParameters(F.defaultRadialGradient,d);break;case "pattern":k=F.makeParameters(F.defaultPattern,
d)}else k=F.normalizeColor(d);this.fillStyle=k;return this},setStroke:function(d){if(!d)return this.strokeStyle=null,this;if("string"==typeof d||K.isArray(d)||d instanceof b)d={color:d};d=this.strokeStyle=F.makeParameters(F.defaultStroke,d);d.color=F.normalizeColor(d.color);return this},setTransform:function(d){this.matrix=c.clone(d?c.normalize(d):c.identity);return this._applyTransform()},_applyTransform:function(){return this},moveToFront:function(){var d=this.getParent();d&&(d._moveChildToFront(this),
this._moveToFront());return this},moveToBack:function(){var d=this.getParent();d&&(d._moveChildToBack(this),this._moveToBack());return this},_moveToFront:function(){},_moveToBack:function(){},applyRightTransform:function(d){return d?this.setTransform([this.matrix,d]):this},applyLeftTransform:function(d){return d?this.setTransform([d,this.matrix]):this},applyTransform:function(d){return d?this.setTransform([this.matrix,d]):this},removeShape:function(d){this.parent&&this.parent.remove(this,d);return this},
_setParent:function(d,k){this.parent=d;return this._updateParentMatrix(k)},_updateParentMatrix:function(d){this.parentMatrix=d?c.clone(d):null;return this._applyTransform()},_getRealMatrix:function(){for(var d=this.matrix,k=this.parent;k;)k.matrix&&(d=c.multiply(k.matrix,d)),k=k.parent;return d}});f._eventsProcessing={on:function(d,k){return h(this.getEventSource(),d,f.fixCallback(this,F.fixTarget,k))},connect:function(d,k,n){"on"==d.substring(0,2)&&(d=d.substring(2));return this.on(d,n?K.hitch(k,
n):k)},disconnect:function(d){return d.remove()}};f.fixCallback=function(d,k,n,q){q||(q=n,n=null);if(K.isString(q)){n=n||z.global;if(!n[q])throw['dojox.gfx.shape.fixCallback: scope["',q,'"] is null (scope\x3d"',n,'")'].join("");return function(E){return k(E,d)?n[q].apply(n,arguments||[]):void 0}}return n?function(E){return k(E,d)?q.apply(n,arguments||[]):void 0}:function(E){return k(E,d)?q.apply(n,arguments):void 0}};K.extend(f.Shape,f._eventsProcessing);f.Container={_init:function(){this.children=
[];this._batch=0},openBatch:function(){return this},closeBatch:function(){return this},add:function(d){var k=d.getParent();k&&k.remove(d,!0);this.children.push(d);return d._setParent(this,this._getRealMatrix())},remove:function(d,k){for(var n=0;n<this.children.length;++n)if(this.children[n]==d){k||(d.parent=null,d.parentMatrix=null);e(this.children,n);break}return this},clear:function(d){for(var k,n=0;n<this.children.length;++n)k=this.children[n],k.parent=null,k.parentMatrix=null,d&&k.destroy();this.children=
[];return this},getBoundingBox:function(){if(this.children){var d=null;l.forEach(this.children,function(k){var n=k.getBoundingBox();n&&((k=k.getTransform())&&(n=c.multiplyRectangle(k,n)),d?(d.x=Math.min(d.x,n.x),d.y=Math.min(d.y,n.y),d.endX=Math.max(d.endX,n.x+n.width),d.endY=Math.max(d.endY,n.y+n.height)):d={x:n.x,y:n.y,endX:n.x+n.width,endY:n.y+n.height})});d&&(d.width=d.endX-d.x,d.height=d.endY-d.y);return d}return null},_moveChildToFront:function(d){for(var k=0;k<this.children.length;++k)if(this.children[k]==
d){e(this.children,k);this.children.push(d);break}return this},_moveChildToBack:function(d){for(var k=0;k<this.children.length;++k)if(this.children[k]==d){e(this.children,k);this.children.unshift(d);break}return this}};f.Surface=m("dojox.gfx.shape.Surface",null,{constructor:function(){this._parent=this.rawNode=null;this._nodes=[];this._events=[]},destroy:function(){l.forEach(this._nodes,g.destroy);this._nodes=[];l.forEach(this._events,function(d){d&&d.remove()});this._events=[];this.rawNode=null;
if(w("ie"))for(;this._parent.lastChild;)g.destroy(this._parent.lastChild);else this._parent.innerHTML="";this._parent=null},getEventSource:function(){return this.rawNode},_getRealMatrix:function(){return null},isLoaded:!0,onLoad:function(d){},whenLoaded:function(d,k){var n=K.hitch(d,k);if(this.isLoaded)n(this);else h.once(this,"load",function(q){n(q)})}});K.extend(f.Surface,f._eventsProcessing);f.Rect=m("dojox.gfx.shape.Rect",f.Shape,{constructor:function(d){this.shape=F.getDefault("Rect");this.rawNode=
d},getBoundingBox:function(){return this.shape}});f.Ellipse=m("dojox.gfx.shape.Ellipse",f.Shape,{constructor:function(d){this.shape=F.getDefault("Ellipse");this.rawNode=d},getBoundingBox:function(){if(!this.bbox){var d=this.shape;this.bbox={x:d.cx-d.rx,y:d.cy-d.ry,width:2*d.rx,height:2*d.ry}}return this.bbox}});f.Circle=m("dojox.gfx.shape.Circle",f.Shape,{constructor:function(d){this.shape=F.getDefault("Circle");this.rawNode=d},getBoundingBox:function(){if(!this.bbox){var d=this.shape;this.bbox={x:d.cx-
d.r,y:d.cy-d.r,width:2*d.r,height:2*d.r}}return this.bbox}});f.Line=m("dojox.gfx.shape.Line",f.Shape,{constructor:function(d){this.shape=F.getDefault("Line");this.rawNode=d},getBoundingBox:function(){if(!this.bbox){var d=this.shape;this.bbox={x:Math.min(d.x1,d.x2),y:Math.min(d.y1,d.y2),width:Math.abs(d.x2-d.x1),height:Math.abs(d.y2-d.y1)}}return this.bbox}});f.Polyline=m("dojox.gfx.shape.Polyline",f.Shape,{constructor:function(d){this.shape=F.getDefault("Polyline");this.rawNode=d},setShape:function(d,
k){d&&d instanceof Array?(this.inherited(arguments,[{points:d}]),k&&this.shape.points.length&&this.shape.points.push(this.shape.points[0])):this.inherited(arguments,[d]);return this},_normalizePoints:function(){var d=this.shape.points,k=d&&d.length;if(k&&"number"==typeof d[0]){for(var n=[],q=0;q<k;q+=2)n.push({x:d[q],y:d[q+1]});this.shape.points=n}},getBoundingBox:function(){if(!this.bbox&&this.shape.points.length){for(var d=this.shape.points,k=d.length,n=d[0],q=n.x,E=n.y,v=n.x,r=n.y,B=1;B<k;++B)n=
d[B],q>n.x&&(q=n.x),v<n.x&&(v=n.x),E>n.y&&(E=n.y),r<n.y&&(r=n.y);this.bbox={x:q,y:E,width:v-q,height:r-E}}return this.bbox}});f.Image=m("dojox.gfx.shape.Image",f.Shape,{constructor:function(d){this.shape=F.getDefault("Image");this.rawNode=d},getBoundingBox:function(){return this.shape},setStroke:function(){return this},setFill:function(){return this}});f.Text=m(f.Shape,{constructor:function(d){this.fontStyle=null;this.shape=F.getDefault("Text");this.rawNode=d},getFont:function(){return this.fontStyle},
setFont:function(d){this.fontStyle="string"==typeof d?F.splitFontString(d):F.makeParameters(F.defaultFont,d);this._setFont();return this},getBoundingBox:function(){var d=null;this.getShape().text&&(d=F._base._computeTextBoundingBox(this));return d}});f.Creator={createShape:function(d){switch(d.type){case F.defaultPath.type:return this.createPath(d);case F.defaultRect.type:return this.createRect(d);case F.defaultCircle.type:return this.createCircle(d);case F.defaultEllipse.type:return this.createEllipse(d);
case F.defaultLine.type:return this.createLine(d);case F.defaultPolyline.type:return this.createPolyline(d);case F.defaultImage.type:return this.createImage(d);case F.defaultText.type:return this.createText(d);case F.defaultTextPath.type:return this.createTextPath(d)}return null},createGroup:function(){return this.createObject(F.Group)},createRect:function(d){return this.createObject(F.Rect,d)},createEllipse:function(d){return this.createObject(F.Ellipse,d)},createCircle:function(d){return this.createObject(F.Circle,
d)},createLine:function(d){return this.createObject(F.Line,d)},createPolyline:function(d){return this.createObject(F.Polyline,d)},createImage:function(d){return this.createObject(F.Image,d)},createText:function(d){return this.createObject(F.Text,d)},createPath:function(d){return this.createObject(F.Path,d)},createTextPath:function(d){return this.createObject(F.TextPath,{}).setText(d)},createObject:function(d,k){return null}};return f})},"dojox/charting/SimpleTheme":function(){define("dojo/_base/lang dojo/_base/array dojo/_base/declare dojo/_base/Color dojox/lang/utils dojox/gfx/gradutils".split(" "),
function(F,K,m,z,w,h){var l=m("dojox.charting.SimpleTheme",null,{shapeSpaces:{shape:1,shapeX:1,shapeY:1},constructor:function(g){g=g||{};var b=l.defaultTheme;K.forEach("chart plotarea axis grid series marker indicator".split(" "),function(c){this[c]=F.delegate(b[c],g[c])},this);g.seriesThemes&&g.seriesThemes.length?(this.colors=null,this.seriesThemes=g.seriesThemes.slice(0)):(this.seriesThemes=null,this.colors=(g.colors||l.defaultColors).slice(0));this.markerThemes=null;g.markerThemes&&g.markerThemes.length&&
(this.markerThemes=g.markerThemes.slice(0));this.markers=g.markers?F.clone(g.markers):F.delegate(l.defaultMarkers);this.noGradConv=g.noGradConv;this.noRadialConv=g.noRadialConv;g.reverseFills&&this.reverseFills();this._current=0;this._buildMarkerArray()},clone:function(){var g=new this.constructor({chart:this.chart,plotarea:this.plotarea,axis:this.axis,grid:this.grid,series:this.series,marker:this.marker,colors:this.colors,markers:this.markers,indicator:this.indicator,seriesThemes:this.seriesThemes,
markerThemes:this.markerThemes,noGradConv:this.noGradConv,noRadialConv:this.noRadialConv,pieInnerRadius:this.pieInnerRadius});K.forEach("clone clear next skip addMixin post getTick".split(" "),function(b){this.hasOwnProperty(b)&&(g[b]=this[b])},this);return g},clear:function(){this._current=0},next:function(g,b,c){var e=w.merge;if(this.colors){var f=F.delegate(this.series);e=F.delegate(this.marker);var d=new z(this.colors[this._current%this.colors.length]);if(f.stroke&&f.stroke.color){f.stroke=F.delegate(f.stroke);
var k=new z(f.stroke.color);f.stroke.color=new z(d);f.stroke.color.a=k.a}else f.stroke={color:d};e.stroke&&e.stroke.color?(e.stroke=F.delegate(e.stroke),k=new z(e.stroke.color),e.stroke.color=new z(d),e.stroke.color.a=k.a):e.stroke={color:d};!f.fill||f.fill.type?f.fill=d:(k=new z(f.fill),f.fill=new z(d),f.fill.a=k.a);!e.fill||e.fill.type?e.fill=d:(k=new z(e.fill),e.fill=new z(d),e.fill.a=k.a)}else f=this.seriesThemes?e(this.series,this.seriesThemes[this._current%this.seriesThemes.length]):this.series,
e=this.markerThemes?e(this.marker,this.markerThemes[this._current%this.markerThemes.length]):f;f={series:f,marker:e,symbol:e&&e.symbol||this._markers[this._current%this._markers.length]};++this._current;b&&(f=this.addMixin(f,g,b));c&&(f=this.post(f,g));return f},skip:function(){++this._current},addMixin:function(g,b,c,e){if(F.isArray(c))K.forEach(c,function(d){g=this.addMixin(g,b,d)},this);else{var f={};"color"in c&&("line"==b||"area"==b?(F.setObject("series.stroke.color",c.color,f),F.setObject("marker.stroke.color",
c.color,f)):F.setObject("series.fill",c.color,f));K.forEach("stroke outline shadow fill filter font fontColor labelWiring".split(" "),function(d){var k="marker"+d.charAt(0).toUpperCase()+d.substr(1),n=k in c;d in c&&(F.setObject("series."+d,c[d],f),n||F.setObject("marker."+d,c[d],f));n&&F.setObject("marker."+d,c[k],f)});"marker"in c&&(f.symbol=c.marker,f.symbol=c.marker);g=w.merge(g,f)}e&&(g=this.post(g,b));return g},post:function(g,b){var c=g.series.fill,e;return!this.noGradConv&&this.shapeSpaces[c.space]&&
"linear"==c.type&&("bar"==b?e={x1:c.y1,y1:c.x1,x2:c.y2,y2:c.x2}:this.noRadialConv||"shape"!=c.space||"slice"!=b&&"circle"!=b||(e={type:"radial",cx:0,cy:0,r:100}),e)?w.merge(g,{series:{fill:e}}):g},getTick:function(g,b){var c=this.axis.tick;g+="Tick";var e=w.merge;c?this.axis[g]&&(c=e(c,this.axis[g])):c=this.axis[g];b&&(c?b[g]&&(c=e(c,b[g])):c=b[g]);return c},inspectObjects:function(g){K.forEach("chart plotarea axis grid series marker indicator".split(" "),function(b){g(this[b])},this);this.seriesThemes&&
K.forEach(this.seriesThemes,g);this.markerThemes&&K.forEach(this.markerThemes,g)},reverseFills:function(){this.inspectObjects(function(g){g&&g.fill&&(g.fill=h.reverse(g.fill))})},addMarker:function(g,b){this.markers[g]=b;this._buildMarkerArray()},setMarkers:function(g){this.markers=g;this._buildMarkerArray()},_buildMarkerArray:function(){this._markers=[];for(var g in this.markers)this._markers.push(this.markers[g])}});F.mixin(l,{defaultMarkers:{CIRCLE:"m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",SQUARE:"m-3,-3 l0,6 6,0 0,-6 z",
DIAMOND:"m0,-3 l3,3 -3,3 -3,-3 z",CROSS:"m0,-3 l0,6 m-3,-3 l6,0",X:"m-3,-3 l6,6 m0,-6 l-6,6",TRIANGLE:"m-3,3 l3,-6 3,6 z",TRIANGLE_INVERTED:"m-3,-3 l3,6 3,-6 z"},defaultColors:["#54544c","#858e94","#6e767a","#948585","#474747"],defaultTheme:{chart:{stroke:null,fill:"white",pageStyle:null,titleGap:20,titlePos:"top",titleFont:"normal normal bold 14pt Tahoma",titleFontColor:"#333",titleAlign:"middle"},plotarea:{stroke:null,fill:"white"},axis:{stroke:{color:"#333",width:1},tick:{color:"#666",position:"center",
font:"normal normal normal 7pt Tahoma",fontColor:"#333",labelGap:4},majorTick:{width:1,length:6},minorTick:{width:.8,length:3},microTick:{width:.5,length:1},title:{gap:15,font:"normal normal normal 11pt Tahoma",fontColor:"#333",orientation:"axis"}},series:{stroke:{width:1.5,color:"#333"},outline:{width:.1,color:"#ccc"},shadow:null,fill:"#ccc",font:"normal normal normal 8pt Tahoma",fontColor:"#000",labelWiring:{width:1,color:"#ccc"}},marker:{stroke:{width:1.5,color:"#333"},outline:{width:.1,color:"#ccc"},
shadow:null,fill:"#ccc",font:"normal normal normal 8pt Tahoma",fontColor:"#000"},indicator:{lineStroke:{width:1.5,color:"#333"},lineOutline:{width:.1,color:"#ccc"},lineShadow:null,lineFill:null,stroke:{width:1.5,color:"#333"},outline:{width:.1,color:"#ccc"},shadow:null,fill:"#ccc",radius:3,font:"normal normal normal 10pt Tahoma",fontColor:"#000",markerFill:"#ccc",markerSymbol:"m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",markerStroke:{width:1.5,color:"#333"},markerOutline:{width:.1,color:"#ccc"},markerShadow:null}}});
return l})},"dojox/lang/utils":function(){define(["..","dojo/_base/lang"],function(F,K){var m=K.getObject("lang.utils",!0,F),z={},w=Object.prototype.toString,h=function(l){if(l)switch(w.call(l)){case "[object Array]":return l.slice(0);case "[object Object]":return K.delegate(l)}return l};K.mixin(m,{coerceType:function(l,g){switch(typeof l){case "number":return Number(eval("("+g+")"));case "string":return String(g);case "boolean":return!!eval("("+g+")")}return eval("("+g+")")},updateWithObject:function(l,
g,b){if(!g)return l;for(var c in l)if(c in g&&!(c in z)){var e=l[c];e&&"object"==typeof e?m.updateWithObject(e,g[c],b):l[c]=b?m.coerceType(e,g[c]):h(g[c])}return l},updateWithPattern:function(l,g,b,c){if(!g||!b)return l;for(var e in b)e in g&&!(e in z)&&(l[e]=c?m.coerceType(b[e],g[e]):h(g[e]));return l},merge:function(l,g){if(g){var b=w.call(l),c=w.call(g);switch(c){case "[object Array]":if(c==b){b=Array(Math.max(l.length,g.length));var e=0;for(c=b.length;e<c;++e)b[e]=m.merge(l[e],g[e]);return b}return g.slice(0);
case "[object Object]":if(c==b&&l){b=K.delegate(l);for(e in g)if(e in l){c=l[e];var f=g[e];f!==c&&(b[e]=m.merge(c,f))}else b[e]=K.clone(g[e]);return b}return K.clone(g)}}return g}});return m})},"dojox/gfx/gradutils":function(){define(["./_base","dojo/_base/lang","./matrix","dojo/_base/Color"],function(F,K,m,z){function w(h,l){if(0>=h)return l[0].color;var g=l.length;if(1<=h)return l[g-1].color;for(var b=0;b<g;++b){var c=l[b];if(c.offset>=h)return b?(l=l[b-1],z.blendColors(new z(l.color),new z(c.color),
(h-l.offset)/(c.offset-l.offset))):c.color}return l[g-1].color}F=F.gradutils={};F.getColor=function(h,l){if(h){switch(h.type){case "linear":var g=m.rotate(-Math.atan2(h.y2-h.y1,h.x2-h.x1));var b=m.project(h.x2-h.x1,h.y2-h.y1);l=m.multiplyPoint(b,l);var c=m.multiplyPoint(b,h.x1,h.y1);b=m.multiplyPoint(b,h.x2,h.y2);b=m.multiplyPoint(g,b.x-c.x,b.y-c.y).x;g=m.multiplyPoint(g,l.x-c.x,l.y-c.y).x/b;break;case "radial":g=l.x-h.cx,l=l.y-h.cy,g=Math.sqrt(g*g+l*l)/h.r}return w(g,h.colors)}return new z(h||[0,
0,0,0])};F.reverse=function(h){if(h)switch(h.type){case "linear":case "radial":if(h=K.delegate(h),h.colors){for(var l=h.colors,g=l.length,b=0,c,e=h.colors=Array(l.length);b<g;++b)c=l[b],e[b]={offset:1-c.offset,color:c.color};e.sort(function(f,d){return f.offset-d.offset})}}return h};return F})},"dojox/charting/Series":function(){define(["dojo/_base/lang","dojo/_base/declare","./Element"],function(F,K,m){return K("dojox.charting.Series",m,{constructor:function(z,w,h){F.mixin(this,h);"string"!=typeof this.plot&&
(this.plot="default");this.update(w)},clear:function(){this.dyn={}},update:function(z){F.isArray(z)?this.data=z:(this.source=z,this.data=this.source.data,this.source.setSeriesObject&&this.source.setSeriesObject(this));this.dirty=!0;this.clear()}})})},"dojox/charting/axis2d/common":function(){define(["dojo/_base/lang","dojo/_base/window","dojo/dom-geometry","dojox/gfx","dojo/has"],function(F,K,m,z,w){var h=F.getObject("dojox.charting.axis2d.common",!0),l=function(g){g.marginLeft="0px";g.marginTop=
"0px";g.marginRight="0px";g.marginBottom="0px";g.paddingLeft="0px";g.paddingTop="0px";g.paddingRight="0px";g.paddingBottom="0px";g.borderLeftWidth="0px";g.borderTopWidth="0px";g.borderRightWidth="0px";g.borderBottomWidth="0px"};return F.mixin(h,{createText:{gfx:function(g,b,c,e,f,d,k,n){return b.createText({x:c,y:e,text:d,align:f}).setFont(k).setFill(n)},html:function(g,b,c,e,f,d,k,n,q){b=K.doc.createElement("div");var E=b.style;g.getTextDir&&(b.dir=g.getTextDir(d));l(E);E.font=k;b.innerHTML=String(d).replace(/\s/g,
"\x26nbsp;");E.color=n;E.position="absolute";E.left="-10000px";K.body().appendChild(b);var v=z.normalizedLength(z.splitFontString(k).size);if(!q)if(b.getBoundingClientRect){var r=b.getBoundingClientRect();r=r.width||r.right-r.left}else r=m.getMarginBox(b).w;"rtl"==b.dir&&(c+=q?q:r);K.body().removeChild(b);E.position="relative";if(q)switch(E.width=q+"px",f){case "middle":E.textAlign="center";E.left=c-q/2+"px";break;case "end":E.textAlign="right";E.left=c-q+"px";break;default:E.left=c+"px",E.textAlign=
"left"}else switch(f){case "middle":E.left=Math.floor(c-r/2)+"px";break;case "end":E.left=Math.floor(c-r)+"px";break;default:E.left=Math.floor(c)+"px"}E.top=Math.floor(e-v)+"px";E.whiteSpace="nowrap";q=K.doc.createElement("div");E=q.style;l(E);E.width="0px";E.height="0px";q.appendChild(b);g.node.insertBefore(q,g.node.firstChild);w("dojo-bidi")&&g.htmlElementsRegistry.push([q,c,e,f,d,k,n]);return q}}})})},"dojox/charting/plot2d/common":function(){define("dojo/_base/lang dojo/_base/array dojo/_base/Color dojox/gfx dojox/lang/functional ../scaler/common".split(" "),
function(F,K,m,z,w,h){var l=F.getObject("dojox.charting.plot2d.common",!0);return F.mixin(l,{doIfLoaded:h.doIfLoaded,makeStroke:function(g){if(!g)return g;if("string"==typeof g||g instanceof m)g={color:g};return z.makeParameters(z.defaultStroke,g)},augmentColor:function(g,b){g=new m(g);b=new m(b);b.a=g.a;return b},augmentStroke:function(g,b){if(g=l.makeStroke(g))g.color=l.augmentColor(g.color,b);return g},augmentFill:function(g,b){new m(b);return"string"==typeof g||g instanceof m?l.augmentColor(g,
b):g},defaultStats:{vmin:Number.POSITIVE_INFINITY,vmax:Number.NEGATIVE_INFINITY,hmin:Number.POSITIVE_INFINITY,hmax:Number.NEGATIVE_INFINITY},collectSimpleStats:function(g,b){for(var c=F.delegate(l.defaultStats),e=0;e<g.length;++e)for(var f=g[e],d=0;d<f.data.length;d++)if(!b(f.data[d])){if("number"==typeof f.data[d]){d=c.vmin;var k=c.vmax;K.forEach(f.data,function(E,v){b(E)||(v+=1,isNaN(E)&&(E=0),c.hmin=Math.min(c.hmin,v),c.hmax=Math.max(c.hmax,v),c.vmin=Math.min(c.vmin,E),c.vmax=Math.max(c.vmax,E))})}else{var n=
c.hmin,q=c.hmax;d=c.vmin;k=c.vmax;"xmin"in f&&"xmax"in f&&"ymin"in f&&"ymax"in f||K.forEach(f.data,function(E,v){b(E)||(v="x"in E?E.x:v+1,E=E.y,isNaN(v)&&(v=0),isNaN(E)&&(E=0),c.hmin=Math.min(c.hmin,v),c.hmax=Math.max(c.hmax,v),c.vmin=Math.min(c.vmin,E),c.vmax=Math.max(c.vmax,E))});"xmin"in f&&(c.hmin=Math.min(n,f.xmin));"xmax"in f&&(c.hmax=Math.max(q,f.xmax))}"ymin"in f&&(c.vmin=Math.min(d,f.ymin));"ymax"in f&&(c.vmax=Math.max(k,f.ymax));break}return c},calculateBarSize:function(g,b,c){c||(c=1);
var e=(g-2*b.gap)/c;"minBarSize"in b&&(e=Math.max(e,b.minBarSize));"maxBarSize"in b&&(e=Math.min(e,b.maxBarSize));e=Math.max(e,1);return{size:e,gap:(g-e*c)/2}},collectStackedStats:function(g){var b=F.clone(l.defaultStats);if(g.length){b.hmin=Math.min(b.hmin,1);b.hmax=w.foldl(g,"seed, run -\x3e Math.max(seed, run.data.length)",b.hmax);for(var c=0;c<b.hmax;++c){var e=g[0].data[c];e=e&&("number"==typeof e?e:e.y);isNaN(e)&&(e=0);b.vmin=Math.min(b.vmin,e);for(var f=1;f<g.length;++f){var d=g[f].data[c];
d=d&&("number"==typeof d?d:d.y);isNaN(d)&&(d=0);e+=d}b.vmax=Math.max(b.vmax,e)}}return b},curve:function(g,b){var c=g.slice(0);"x"==b&&(c[c.length]=c[0]);return K.map(c,function(e,f){if(0==f)return"M"+e.x+","+e.y;if(!isNaN(b)){var d=e.x-c[f-1].x;return"C"+(e.x-d/b*(b-1))+","+c[f-1].y+" "+(e.x-d/b)+","+e.y+" "+e.x+","+e.y}if("X"==b||"x"==b||"S"==b){e=c[f-1];d=c[f];var k=1/6;if(1==f){var n="x"==b?c[c.length-2]:e;k=1/3}else n=c[f-2];f==c.length-1?(f="x"==b?c[1]:d,k=1/3):f=c[f+1];var q=Math.sqrt((d.x-
e.x)*(d.x-e.x)+(d.y-e.y)*(d.y-e.y));var E=Math.sqrt((d.x-n.x)*(d.x-n.x)+(d.y-n.y)*(d.y-n.y));var v=Math.sqrt((f.x-e.x)*(f.x-e.x)+(f.y-e.y)*(f.y-e.y));var r=E*k,B=v*k;r>q/2&&B>q/2?(r=q/2,B=q/2):r>q/2?(r=q/2,B=q/2*v/E):B>q/2&&(B=q/2,r=q/2*E/v);"S"==b&&(n==e&&(r=0),d==f&&(B=0));k=e.x+r*(d.x-n.x)/E;n=e.y+r*(d.y-n.y)/E;E=d.x-B*(f.x-e.x)/v;v=d.y-B*(f.y-e.y)/v}return"C"+(k+","+n+" "+E+","+v+" "+d.x+","+d.y)}).join(" ")},getLabel:function(g,b,c){return h.doIfLoaded("dojo/number",function(e){return(b?e.format(g,
{places:c}):e.format(g))||""},function(){return b?g.toFixed(c):g.toString()})},purgeGroup:function(g){return g.purgeGroup()}})})},"dojox/lang/functional":function(){define(["./functional/lambda","./functional/array","./functional/object"],function(F){return F})},"dojox/lang/functional/lambda":function(){define(["../..","dojo/_base/lang","dojo/_base/array"],function(F,K,m){var z=K.getObject("lang.functional",!0,F),w={},h=1<"ab".split(/a*/).length?String.prototype.split:function(b){var c=this.split.call(this,
b);(b=b.exec(this))&&0==b.index&&c.unshift("");return c},l=function(b){var c=[],e=h.call(b,/\s*->\s*/m);if(1<e.length)for(;e.length;)b=e.pop(),c=e.pop().split(/\s*,\s*|\s+/m),e.length&&e.push("(function("+c.join(", ")+"){ return ("+b+"); })");else if(b.match(/\b_\b/))c=["_"];else{e=b.match(/^\s*(?:[+*\/%&|\^\.=<>]|!=)/m);var f=b.match(/[+\-*\/%&|\^\.=<>!]\s*$/m);if(e||f)e&&(c.push("$1"),b="$1"+b),f&&(c.push("$2"),b+="$2");else{e=b.replace(/(?:\b[A-Z]|\.[a-zA-Z_$])[a-zA-Z_$\d]*|[a-zA-Z_$][a-zA-Z_$\d]*:|this|true|false|null|undefined|typeof|instanceof|in|delete|new|void|arguments|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape|dojo|dijit|dojox|window|document|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"/g,
"").match(/([a-z_$][a-z_$\d]*)/gi)||[];var d={};m.forEach(e,function(k){d.hasOwnProperty(k)||(c.push(k),d[k]=1)})}}return{args:c,body:b}},g=function(b){return b.length?function(){var c=b.length-1,e=z.lambda(b[c]).apply(this,arguments);for(--c;0<=c;--c)e=z.lambda(b[c]).call(this,e);return e}:function(c){return c}};K.mixin(z,{rawLambda:function(b){return l(b)},buildLambda:function(b){b=l(b);return"function("+b.args.join(",")+"){return ("+b.body+");}"},lambda:function(b){if("function"==typeof b)return b;
if(b instanceof Array)return g(b);if(w.hasOwnProperty(b))return w[b];var c=l(b);return w[b]=new Function(c.args,"return ("+c.body+");")},clearLambdaCache:function(){w={}}});return z})},"dojox/lang/functional/array":function(){define(["dojo/_base/kernel","dojo/_base/lang","dojo/_base/array","./lambda"],function(F,K,m,z){var w={};K.mixin(z,{filter:function(h,l,g){"string"==typeof h&&(h=h.split(""));g=g||F.global;l=z.lambda(l);var b=[],c;if(K.isArray(h)){var e=0;for(c=h.length;e<c;++e){var f=h[e];l.call(g,
f,e,h)&&b.push(f)}}else if("function"==typeof h.hasNext&&"function"==typeof h.next)for(e=0;h.hasNext();)f=h.next(),l.call(g,f,e++,h)&&b.push(f);else for(e in h)e in w||(f=h[e],l.call(g,f,e,h)&&b.push(f));return b},forEach:function(h,l,g){"string"==typeof h&&(h=h.split(""));g=g||F.global;l=z.lambda(l);var b;if(K.isArray(h)){var c=0;for(b=h.length;c<b;l.call(g,h[c],c,h),++c);}else if("function"==typeof h.hasNext&&"function"==typeof h.next)for(c=0;h.hasNext();l.call(g,h.next(),c++,h));else for(c in h)c in
w||l.call(g,h[c],c,h);return g},map:function(h,l,g){"string"==typeof h&&(h=h.split(""));g=g||F.global;l=z.lambda(l);var b,c;if(K.isArray(h)){var e=Array(b=h.length);for(c=0;c<b;e[c]=l.call(g,h[c],c,h),++c);}else if("function"==typeof h.hasNext&&"function"==typeof h.next)for(e=[],c=0;h.hasNext();e.push(l.call(g,h.next(),c++,h)));else for(c in e=[],h)c in w||e.push(l.call(g,h[c],c,h));return e},every:function(h,l,g){"string"==typeof h&&(h=h.split(""));g=g||F.global;l=z.lambda(l);var b;if(K.isArray(h)){var c=
0;for(b=h.length;c<b;++c)if(!l.call(g,h[c],c,h))return!1}else if("function"==typeof h.hasNext&&"function"==typeof h.next)for(c=0;h.hasNext();){if(!l.call(g,h.next(),c++,h))return!1}else for(c in h)if(!(c in w||l.call(g,h[c],c,h)))return!1;return!0},some:function(h,l,g){"string"==typeof h&&(h=h.split(""));g=g||F.global;l=z.lambda(l);var b;if(K.isArray(h)){var c=0;for(b=h.length;c<b;++c)if(l.call(g,h[c],c,h))return!0}else if("function"==typeof h.hasNext&&"function"==typeof h.next)for(c=0;h.hasNext();){if(l.call(g,
h.next(),c++,h))return!0}else for(c in h)if(!(c in w)&&l.call(g,h[c],c,h))return!0;return!1}});return z})},"dojox/lang/functional/object":function(){define(["dojo/_base/kernel","dojo/_base/lang","./lambda"],function(F,K,m){var z={};K.mixin(m,{keys:function(w){var h=[],l;for(l in w)l in z||h.push(l);return h},values:function(w){var h=[],l;for(l in w)l in z||h.push(w[l]);return h},filterIn:function(w,h,l){l=l||F.global;h=m.lambda(h);var g={},b;for(b in w)if(!(b in z)){var c=w[b];h.call(l,c,b,w)&&(g[b]=
c)}return g},forIn:function(w,h,l){l=l||F.global;h=m.lambda(h);for(var g in w)g in z||h.call(l,w[g],g,w);return l},mapIn:function(w,h,l){l=l||F.global;h=m.lambda(h);var g={},b;for(b in w)b in z||(g[b]=h.call(l,w[b],b,w));return g}});return m})},"dojox/charting/scaler/common":function(){define(["dojo/_base/lang"],function(F){var K=function(w,h){return Math.abs(w-h)<=1E-6*(Math.abs(w)+Math.abs(h))},m=F.getObject("dojox.charting.scaler.common",!0),z={};return F.mixin(m,{doIfLoaded:function(w,h,l){if(void 0===
z[w])try{z[w]=require(w)}catch(g){z[w]=null}return z[w]?h(z[w]):l()},getNumericLabel:function(w,h,l){var g="";m.doIfLoaded("dojo/number",function(d){g=(l.fixed?d.format(w,{places:0>h?-h:0}):d.format(w))||""},function(){g=l.fixed?w.toFixed(0>h?-h:0):w.toString()});if(l.labelFunc){var b=l.labelFunc(g,w,h);if(b)return b}if(l.labels){b=l.labels;for(var c=0,e=b.length;c<e;){var f=Math.floor((c+e)/2);b[f].value<w?c=f+1:e=f}if(c<b.length&&K(b[c].value,w))return b[c].text;--c;if(0<=c&&c<b.length&&K(b[c].value,
w))return b[c].text;c+=2;if(c<b.length&&K(b[c].value,w))return b[c].text}return g}})})},"dojox/lang/functional/fold":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/_base/kernel","./lambda"],function(F,K,m,z){var w={};F.mixin(z,{foldl:function(h,l,g,b){"string"==typeof h&&(h=h.split(""));b=b||m.global;l=z.lambda(l);var c;if(F.isArray(h)){var e=0;for(c=h.length;e<c;g=l.call(b,g,h[e],e,h),++e);}else if("function"==typeof h.hasNext&&"function"==typeof h.next)for(e=0;h.hasNext();g=l.call(b,
g,h.next(),e++,h));else for(e in h)e in w||(g=l.call(b,g,h[e],e,h));return g},foldl1:function(h,l,g){"string"==typeof h&&(h=h.split(""));g=g||m.global;l=z.lambda(l);var b;if(F.isArray(h)){var c=h[0];var e=1;for(b=h.length;e<b;c=l.call(g,c,h[e],e,h),++e);}else if("function"==typeof h.hasNext&&"function"==typeof h.next){if(h.hasNext())for(c=h.next(),e=1;h.hasNext();c=l.call(g,c,h.next(),e++,h));}else for(e in b=!0,h)e in w||(b?(c=h[e],b=!1):c=l.call(g,c,h[e],e,h));return c},foldr:function(h,l,g,b){"string"==
typeof h&&(h=h.split(""));b=b||m.global;l=z.lambda(l);for(var c=h.length;0<c;--c,g=l.call(b,g,h[c],c,h));return g},foldr1:function(h,l,g){"string"==typeof h&&(h=h.split(""));g=g||m.global;l=z.lambda(l);var b=h.length,c=h[b-1];for(--b;0<b;--b,c=l.call(g,c,h[b],b,h));return c},reduce:function(h,l,g){return 3>arguments.length?z.foldl1(h,l):z.foldl(h,l,g)},reduceRight:function(h,l,g){return 3>arguments.length?z.foldr1(h,l):z.foldr(h,l,g)},unfold:function(h,l,g,b,c){c=c||m.global;l=z.lambda(l);g=z.lambda(g);
h=z.lambda(h);for(var e=[];!h.call(c,b);e.push(l.call(c,b)),b=g.call(c,b));return e}})})},"dojox/lang/functional/reversed":function(){define(["dojo/_base/lang","dojo/_base/kernel","./lambda"],function(F,K,m){F.mixin(m,{filterRev:function(z,w,h){"string"==typeof z&&(z=z.split(""));h=h||K.global;w=m.lambda(w);for(var l=[],g,b=z.length-1;0<=b;--b)g=z[b],w.call(h,g,b,z)&&l.push(g);return l},forEachRev:function(z,w,h){"string"==typeof z&&(z=z.split(""));h=h||K.global;w=m.lambda(w);for(var l=z.length-1;0<=
l;w.call(h,z[l],l,z),--l);},mapRev:function(z,w,h){"string"==typeof z&&(z=z.split(""));h=h||K.global;w=m.lambda(w);var l=z.length,g=Array(l);--l;for(var b=0;0<=l;g[b++]=w.call(h,z[l],l,z),--l);return g},everyRev:function(z,w,h){"string"==typeof z&&(z=z.split(""));h=h||K.global;w=m.lambda(w);for(var l=z.length-1;0<=l;--l)if(!w.call(h,z[l],l,z))return!1;return!0},someRev:function(z,w,h){"string"==typeof z&&(z=z.split(""));h=h||K.global;w=m.lambda(w);for(var l=z.length-1;0<=l;--l)if(w.call(h,z[l],l,
z))return!0;return!1}});return m})},"dojox/charting/plot2d/Pie":function(){define("dojo/_base/lang dojo/_base/array dojo/_base/declare dojo/dom-geometry dojo/_base/Color ./Base ./_PlotEvents ./common dojox/gfx dojox/gfx/matrix dojox/lang/functional dojox/lang/utils dojo/has".split(" "),function(F,K,m,z,w,h,l,g,b,c,e,f,d){return m("dojox.charting.plot2d.Pie",[h,l],{defaultParams:{labels:!0,ticks:!1,fixed:!0,precision:1,labelOffset:20,labelStyle:"default",htmlLabels:!0,radGrad:"native",fanSize:5,startAngle:0,
innerRadius:0,minWidth:0,zeroDataMessage:""},optionalParams:{radius:0,omitLabels:!1,stroke:{},outline:{},shadow:{},fill:{},filter:{},styleFunc:null,font:"",fontColor:"",labelWiring:{}},constructor:function(k,n){this.opt=F.clone(this.defaultParams);f.updateWithObject(this.opt,n);f.updateWithPattern(this.opt,n,this.optionalParams);this.axes=[];this.run=null;this.dyn=[];this.runFilter=[];n&&n.hasOwnProperty("innerRadius")&&(this._plotSetInnerRadius=!0)},clear:function(){this.inherited(arguments);this.dyn=
[];this.run=null;return this},setAxis:function(k){return this},addSeries:function(k){this.run=k;return this},getSeriesStats:function(){return F.delegate(g.defaultStats)},getRequiredColors:function(){return this.run?this.run.data.length:0},render:function(k,n){if(!this.dirty)return this;this.resetEvents();this.dirty=!1;this._eventSeries={};this.cleanGroup();var q=this.group,E=this.chart.theme;!this._plotSetInnerRadius&&E&&E.pieInnerRadius&&(this.opt.innerRadius=E.pieInnerRadius);var v=(k.width-n.l-
n.r)/2,r=(k.height-n.t-n.b)/2,B=Math.min(v,r),u="font"in this.opt?this.opt.font:E.axis.tick.titleFont||"",y=u?b.normalizedLength(b.splitFontString(u).size):0,G=this.opt.hasOwnProperty("fontColor")?this.opt.fontColor:E.axis.tick.fontColor,I=c._degToRad(this.opt.startAngle),L=I,M,S=this.run.data,X=this.events(),C=F.hitch(this,function(){var J=E.clone(),Q=e.map(S,function(V){var aa=[this.opt,this.run];null!==V&&"number"!=typeof V&&aa.push(V);this.opt.styleFunc&&aa.push(this.opt.styleFunc(V));return J.next("slice",
aa,!0)},this);"radius"in this.opt&&(B=this.opt.radius<B?this.opt.radius:B);var U={cx:n.l+v,cy:n.t+r,r:B},T=new w(G);this.opt.innerRadius&&(T.a=.1);var Y=this._createRing(q,U).setStroke(T);this.opt.innerRadius&&Y.setFill(T);this.opt.zeroDataMessage&&this.renderLabel(q,U.cx,U.cy+y/3,this.opt.zeroDataMessage,{series:{font:u,fontColor:G}},null,"middle");this.dyn=[];K.forEach(S,function(V,aa){this.dyn.push({fill:this._plotFill(Q[aa].series.fill,k,n),stroke:Q[aa].series.stroke})},this)});if(!this.run&&
!this.run.data.ength)return C(),this;if("number"==typeof S[0]){var H=e.map(S,"x ? Math.max(x, 0) : 0");if(e.every(H,"\x3c\x3d 0"))return C(),this;var O=e.map(H,"/this",e.foldl(H,"+",0));this.opt.labels&&(M=K.map(O,function(J){return 0<J?this._getLabel(100*J)+"%":""},this))}else{H=e.map(S,"x ? Math.max(x.y, 0) : 0");if(!H.length||e.every(H,"\x3c\x3d 0"))return C(),this;O=e.map(H,"/this",e.foldl(H,"+",0));this.opt.labels&&(M=K.map(O,function(J,Q){if(0>J)return"";Q=S[Q];return Q.hasOwnProperty("text")?
Q.text:this._getLabel(100*J)+"%"},this))}var R=e.map(S,function(J){var Q=[this.opt,this.run];null!==J&&"number"!=typeof J&&Q.push(J);this.opt.styleFunc&&Q.push(this.opt.styleFunc(J));return E.next("slice",Q,!0)},this);this.opt.labels&&(H=e.foldl1(e.map(M,function(J,Q){return b._base._getTextBox(J,{font:R[Q].series.font}).w},this),"Math.max(a, b)")/2,0>this.opt.labelOffset&&(B=Math.min(v-2*H,r-y)+this.opt.labelOffset));this.opt.hasOwnProperty("radius")&&(B=this.opt.radius<.9*B?this.opt.radius:.9*B);
!this.opt.radius&&this.opt.labels&&"columns"==this.opt.labelStyle?(B/=2,v>r&&v>2*B&&(B*=v/(2*B)),B>=.8*r&&(B=.8*r)):B>=.9*r&&(B=.9*r);var P=B-this.opt.labelOffset;var N={cx:n.l+v,cy:n.t+r,r:B};this.dyn=[];var Z=Array(O.length),W=[],da=L,ia=this.opt.minWidth;K.forEach(O,function(J,Q){if(0===J)W[Q]={step:0,end:da,start:da,weak:!1};else{J=da+2*J*Math.PI;Q===O.length-1&&(J=I+2*Math.PI);var U=J-da;W[Q]={step:U,start:da,end:J,weak:U*B<ia};da=J}});if(0<ia){H=0;var ma=ia/B;C=0;var ca;for(ca=W.length-1;0<=
ca;ca--)W[ca].weak&&(++H,C+=W[ca].step,W[ca].step=ma);ma*=H;if(ma>Math.PI){ma=Math.PI/H;for(ca=0;ca<W.length;++ca)W[ca].weak&&(W[ca].step=ma);ma=Math.PI}if(0<H)for(ma=1-(ma-C)/2/Math.PI,ca=0;ca<W.length;++ca)W[ca].weak||(W[ca].step*=ma);for(ca=0;ca<W.length;++ca)W[ca].start=ca?W[ca].end:da,W[ca].end=W[ca].start+W[ca].step;for(ca=W.length-1;0<=ca;--ca)if(0!==W[ca].step){W[ca].end=da+2*Math.PI;break}}da=L;var ba,fa;K.some(O,function(J,Q){var U=S[Q],T=R[Q];if(1<=J){fa=this._plotFill(T.series.fill,k,
n);fa=this._shapeFill(fa,{x:N.cx-N.r,y:N.cy-N.r,width:2*N.r,height:2*N.r});fa=this._pseudoRadialFill(fa,{x:N.cx,y:N.cy},N.r);var Y=this._createRing(q,N).setFill(fa).setStroke(T.series.stroke);this.dyn.push({fill:fa,stroke:T.series.stroke});X&&(ba={element:"slice",index:Q,run:this.run,shape:Y,x:Q,y:"number"==typeof U?U:U.y,cx:N.cx,cy:N.cy,cr:B},this._connectEvents(ba),Z[Q]=ba);for(Q+=1;Q<O.length;Q++)T=R[Q],this.dyn.push({fill:T.series.fill,stroke:T.series.stroke});return!0}if(0===W[Q].step)return this.dyn.push({fill:T.series.fill,
stroke:T.series.stroke}),!1;J=W[Q].step;Y=N.cx+B*Math.cos(da);var V=N.cy+B*Math.sin(da),aa=N.cx+B*Math.cos(da+J),ja=N.cy+B*Math.sin(da+J),ea=c._degToRad(this.opt.fanSize);if(T.series.fill&&"radial"===T.series.fill.type&&"fan"===this.opt.radGrad&&J>ea){var ha=q.createGroup();ea=Math.ceil(J/ea);var la=J/ea;fa=this._shapeFill(T.series.fill,{x:N.cx-N.r,y:N.cy-N.r,width:2*N.r,height:2*N.r});var ka;for(ka=0;ka<ea;++ka){var pa=da+(ka-.2)*la;var qa=da+(ka+1+.2)*la;var ra=0==ka?Y:N.cx+B*Math.cos(pa);var sa=
0==ka?V:N.cy+B*Math.sin(pa);var ta=ka==ea-1?aa:N.cx+B*Math.cos(qa);qa=ka==ea-1?ja:N.cy+B*Math.sin(qa);this._createSlice(ha,N,B,ra,sa,ta,qa,pa,la).setFill(this._pseudoRadialFill(fa,{x:N.cx,y:N.cy},B,da+(ka+.5)*la,da+(ka+.5)*la))}ea=T.series.stroke;this._createSlice(ha,N,B,Y,V,aa,ja,da,J).setStroke(ea);Y=ha}else{ea=T.series.stroke;Y=this._createSlice(q,N,B,Y,V,aa,ja,da,J).setStroke(ea);if((fa=T.series.fill)&&"radial"===fa.type)fa=this._shapeFill(fa,{x:N.cx-N.r,y:N.cy-N.r,width:2*N.r,height:2*N.r}),
"linear"===this.opt.radGrad&&(fa=this._pseudoRadialFill(fa,{x:N.cx,y:N.cy},B,da,da+J));else if(fa&&"linear"===fa.type){V=F.clone(Y.getBoundingBox());if("svg"===b.renderer){aa={w:0,h:0};try{aa=z.position(Y.rawNode)}catch(ua){}aa.h>V.height&&(V.height=aa.h);aa.w>V.width&&(V.width=aa.w)}fa=this._plotFill(fa,k,n);fa=this._shapeFill(fa,V)}Y.setFill(fa)}this.dyn.push({fill:fa,stroke:T.series.stroke});X&&(ba={element:"slice",index:Q,run:this.run,shape:Y,x:Q,y:"number"==typeof U?U:U.y,cx:N.cx,cy:N.cy,cr:B},
this._connectEvents(ba),Z[Q]=ba);da+=J;return!1},this);if(this.opt.labels){var na=d("dojo-bidi")&&this.chart.isRightToLeft();if("default"==this.opt.labelStyle)da=L=I,K.some(O,function(J,Q){if(0>=J&&!this.opt.minWidth)return!1;var U=R[Q];if(1<=J)return this.renderLabel(q,N.cx,N.cy+y/2,M[Q],U,0<this.opt.labelOffset),!0;J=L+2*J*Math.PI;Q+1==O.length&&(J=I+2*Math.PI);if(this.opt.omitLabels&&.001>J-L)return!1;var T=da+W[Q].step/2,Y=N.cx+P*Math.cos(T);this.renderLabel(q,na?k.width-Y:Y,N.cy+P*Math.sin(T)+
y/2,M[Q],U,0<this.opt.labelOffset);da+=W[Q].step;L=J;return!1},this);else if("columns"==this.opt.labelStyle){var oa=this.opt.omitLabels;da=L=I;var x=[],a=0;for(H=O.length-1;0<=H;--H)O[H]&&++a;K.forEach(O,function(J,Q){J=L+2*J*Math.PI;Q+1==O.length&&(J=I+2*Math.PI);if(0!==this.minWidth||.001<=J-L){var U=da+W[Q].step/2;1!==a||this.opt.minWidth||(U=(L+J)/2);x.push({angle:U,left:0>Math.cos(U),theme:R[Q],index:Q,omit:oa?.001>J-L:!1})}L=J;da+=W[Q].step},this);var p=b._base._getTextBox("a",{font:u,whiteSpace:"nowrap"}).h;
this._getProperLabelRadius(x,p,1.1*N.r);var A=N.cx-2*N.r,t=N.cx+2*N.r;K.forEach(x,function(J){if(!J.omit){var Q=R[J.index],U=0;Q&&Q.axis&&Q.axis.tick&&Q.axis.tick.labelGap&&(U=Q.axis.tick.labelGap);var T=b._base._getTextBox(M[J.index],{font:Q.series.font,whiteSpace:"nowrap",paddingLeft:U+"px"}).w,Y=N.cx+J.labelR*Math.cos(J.angle),V=N.cy+J.labelR*Math.sin(J.angle),aa=J.left?A+T:t-T;U=J.left?A:aa+U;var ja=N.r;ja=q.createPath().moveTo(N.cx+ja*Math.cos(J.angle),N.cy+ja*Math.sin(J.angle));Math.abs(J.labelR*
Math.cos(J.angle))<2*N.r-T&&ja.lineTo(Y,V);ja.lineTo(aa,V).setStroke(J.theme.series.labelWiring);ja.moveToBack();Y=this.renderLabel(q,U,p/3+V||0,M[J.index],Q,!1,"left");X&&!this.opt.htmlLabels&&(Q=b._base._getTextBox(M[J.index],{font:J.theme.series.font}).w||0,T=b.normalizedLength(b.splitFontString(J.theme.series.font).size),ba={element:"labels",index:J.index,run:this.run,shape:Y,x:U,y:V,label:M[J.index]},U=Y.getShape(),V=z.position(this.chart.node,!0),U=F.mixin({type:"rect"},{x:U.x,y:U.y-2*T}),U.x+=
V.x,U.y+=V.y,U.x=Math.round(U.x),U.y=Math.round(U.y),U.width=Math.ceil(Q),U.height=Math.ceil(T),ba.aroundRect=U,this._connectEvents(ba),Z[O.length+J.index]=ba)}},this)}}var D=0;this._eventSeries[this.run.name]=e.map(S,function(J){return 0>=J?null:Z[D++]});d("dojo-bidi")&&this._checkOrientation(this.group,k,n);return this},_getProperLabelRadius:function(k,n,q){if(1==k.length)k[0].labelR=q;else{var E={},v={},r=2,B=2,u;for(u=0;u<k.length;++u){var y=Math.abs(Math.sin(k[u].angle));k[u].left?r>y&&(r=y,
E=k[u]):B>y&&(B=y,v=k[u])}E.labelR=v.labelR=q;this._caculateLabelR(E,k,n);this._caculateLabelR(v,k,n)}},_caculateLabelR:function(k,n,q){var E,v=n.length,r=k.labelR,B=n[k.index].left?-q:q;var u=0;q=k.index;for(E=(q+1)%v;u<v&&n[q].left===n[E].left;++u)r=(Math.sin(n[q].angle)*r+B)/Math.sin(n[E].angle),r=Math.max(k.labelR,r),n[E].labelR=r,q=(q+1)%v,E=(E+1)%v;u>=v&&(n[0].labelR=k.labelR);u=0;q=k.index;for(E=(q||v)-1;u<v&&n[q].left===n[E].left;++u)r=(Math.sin(n[q].angle)*r-B)/Math.sin(n[E].angle),r=Math.max(k.labelR,
r),n[E].labelR=r,q=(q||v)-1,E=(E||v)-1},_createRing:function(k,n){var q=this.opt.innerRadius;0<q?q=q/100*n.r:0>q&&(q=-q);return q?k.createPath({}).setAbsoluteMode(!0).moveTo(n.cx,n.cy-n.r).arcTo(n.r,n.r,0,!1,!0,n.cx+n.r,n.cy).arcTo(n.r,n.r,0,!0,!0,n.cx,n.cy-n.r).closePath().moveTo(n.cx,n.cy-q).arcTo(q,q,0,!1,!0,n.cx+q,n.cy).arcTo(q,q,0,!0,!0,n.cx,n.cy-q).closePath():k.createCircle(n)},_createSlice:function(k,n,q,E,v,r,B,u,y){var G=this.opt.innerRadius;0<G?G=G/100*n.r:0>G&&(G=-G);if(G){var I=n.cx+
G*Math.cos(u),L=n.cy+G*Math.sin(u),M=n.cx+G*Math.cos(u+y);n=n.cy+G*Math.sin(u+y);return k.createPath({}).setAbsoluteMode(!0).moveTo(I,L).lineTo(E,v).arcTo(q,q,0,y>Math.PI,!0,r,B).lineTo(M,n).arcTo(G,G,0,y>Math.PI,!1,I,L).closePath()}return k.createPath({}).setAbsoluteMode(!0).moveTo(n.cx,n.cy).lineTo(E,v).arcTo(q,q,0,y>Math.PI,!0,r,B).lineTo(n.cx,n.cy).closePath()}})})},"dojox/charting/plot2d/Base":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojox/gfx ../Element ./common ../axis2d/common dojo/has".split(" "),
function(F,K,m,z,w,h,l,g){F=F("dojox.charting.plot2d.Base",w,{constructor:function(b,c){c&&c.tooltipFunc&&(this.tooltipFunc=c.tooltipFunc)},clear:function(){this.series=[];this.dirty=!0;return this},setAxis:function(b){return this},assignAxes:function(b){K.forEach(this.axes,function(c){this[c]&&this.setAxis(b[this[c]])},this)},addSeries:function(b){this.series.push(b);return this},getSeriesStats:function(){return h.collectSimpleStats(this.series,m.hitch(this,"isNullValue"))},calculateAxes:function(b){this.initializeScalers(b,
this.getSeriesStats());return this},initializeScalers:function(){return this},isDataDirty:function(){return K.some(this.series,function(b){return b.dirty})},render:function(b,c){return this},renderLabel:function(b,c,e,f,d,k,n){b=l.createText[this.opt.htmlLabels&&"vml"!=z.renderer?"html":"gfx"](this.chart,b,c,e,n?n:"middle",f,d.series.font,d.series.fontColor);k&&(this.opt.htmlLabels&&"vml"!=z.renderer?b.style.pointerEvents="none":b.rawNode&&(b.rawNode.style.pointerEvents="none"));this.opt.htmlLabels&&
"vml"!=z.renderer&&this.htmlElements.push(b);return b},getRequiredColors:function(){return this.series.length},_getLabel:function(b){return h.getLabel(b,this.opt.fixed,this.opt.precision)}});g("dojo-bidi")&&F.extend({_checkOrientation:function(b,c,e){this.chart.applyMirroring(this.group,c,e)}});return F})},"dojox/charting/plot2d/_PlotEvents":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/_base/connect"],function(F,K,m,z){return m("dojox.charting.plot2d._PlotEvents",
null,{constructor:function(){this._shapeEvents=[];this._eventSeries={}},destroy:function(){this.resetEvents();this.inherited(arguments)},plotEvent:function(w){},raiseEvent:function(w){this.plotEvent(w);var h=F.delegate(w);h.originalEvent=w.type;h.originalPlot=w.plot;h.type="onindirect";K.forEach(this.chart.stack,function(l){l!==this&&l.plotEvent&&(h.plot=l,l.plotEvent(h))},this)},connect:function(w,h){this.dirty=!0;return z.connect(this,"plotEvent",w,h)},events:function(){return!!this.plotEvent.after},
resetEvents:function(){this._shapeEvents.length&&(K.forEach(this._shapeEvents,function(w){w.shape.disconnect(w.handle)}),this._shapeEvents=[]);this.raiseEvent({type:"onplotreset",plot:this})},_connectSingleEvent:function(w,h){this._shapeEvents.push({shape:w.eventMask,handle:w.eventMask.connect(h,this,function(l){w.type=h;w.event=l;this.raiseEvent(w);w.event=null})})},_connectEvents:function(w){w&&(w.chart=this.chart,w.plot=this,w.hAxis=this.hAxis||null,w.vAxis=this.vAxis||null,w.eventMask=w.eventMask||
w.shape,this._connectSingleEvent(w,"onmouseover"),this._connectSingleEvent(w,"onmouseout"),this._connectSingleEvent(w,"onclick"))},_reconnectEvents:function(w){(w=this._eventSeries[w])&&K.forEach(w,this._connectEvents,this)},fireEvent:function(w,h,l,g){(w=this._eventSeries[w])&&w.length&&l<w.length&&(l=w[l],l.type=h,l.event=g||null,this.raiseEvent(l),l.event=null)}})})},"dojox/charting/action2d/Tooltip":function(){define("dijit/Tooltip dojo/_base/lang dojo/_base/declare dojo/_base/window dojo/_base/connect dojo/dom-style ./PlotAction dojox/gfx/matrix dojo/has dojo/has!dojo-bidi?../bidi/action2d/Tooltip dojox/lang/functional dojox/lang/functional/scan dojox/lang/functional/fold".split(" "),
function(F,K,m,z,w,h,l,g,b,c,e){var f=function(n,q){var E=n.run&&n.run.data&&n.run.data[n.index];return E&&"number"!=typeof E&&(E.tooltip||E.text)?E.tooltip||E.text:q.tooltipFunc?q.tooltipFunc(n):n.y},d=Math.PI/4,k=Math.PI/2;h=m(b("dojo-bidi")?"dojox.charting.action2d.NonBidiTooltip":"dojox.charting.action2d.Tooltip",l,{defaultParams:{text:f,mouseOver:!0,defaultPosition:["after-centered","before-centered"]},optionalParams:{},constructor:function(n,q,E){this.text=E&&E.text?E.text:f;this.mouseOver=
E&&void 0!=E.mouseOver?E.mouseOver:!0;this.defaultPosition=E&&void 0!=E.defaultPosition?E.defaultPosition:["after-centered","before-centered"];this.connect()},process:function(n){if("onplotreset"===n.type||"onmouseout"===n.type)F.hide(this.aroundRect),this.aroundRect=null,"onplotreset"===n.type&&delete this.angles;else if(!(!n.shape||this.mouseOver&&"onmouseover"!==n.type||!this.mouseOver&&"onclick"!==n.type)){var q={type:"rect"},E=this.defaultPosition;switch(n.element){case "marker":q.x=n.cx;q.y=
n.cy;q.w=q.h=1;break;case "circle":q.x=n.cx-n.cr;q.y=n.cy-n.cr;q.w=q.h=2*n.cr;break;case "spider_circle":q.x=n.cx;q.y=n.cy;q.w=q.h=1;break;case "spider_plot":return;case "column":E=["above-centered","below-centered"];case "bar":q=K.clone(n.shape.getShape());q.w=q.width;q.h=q.height;break;case "candlestick":q.x=n.x;q.y=n.y;q.w=n.width;q.h=n.height;break;default:if(!this.angles){var v="number"==typeof n.run.data[0]?e.map(n.run.data,"x ? Math.max(x, 0) : 0"):e.map(n.run.data,"x ? Math.max(x.y, 0) : 0");
this.angles=e.map(e.scanl(v,"+",0),"* 2 * Math.PI / this",e.foldl(v,"+",0))}v=g._degToRad(n.plot.opt.startAngle);var r=(this.angles[n.index]+this.angles[n.index+1])/2+v;q.x=n.cx+n.cr*Math.cos(r);q.y=n.cy+n.cr*Math.sin(r);q.w=q.h=1;v&&(0>r||r>2*Math.PI)&&(r=Math.abs(2*Math.PI-Math.abs(r)));r<d||(r<k+d?E=["below-centered","above-centered"]:r<Math.PI+d?E=["before-centered","after-centered"]:r<2*Math.PI-d&&(E=["above-centered","below-centered"]))}b("dojo-bidi")&&this._recheckPosition(n,q,E);v=this.chart.getCoords();
q.x+=v.x;q.y+=v.y;q.x=Math.round(q.x);q.y=Math.round(q.y);q.w=Math.ceil(q.w);q.h=Math.ceil(q.h);this.aroundRect=q;(n=this.text(n,this.plot))&&F.show(this._format(n),this.aroundRect,E);this.mouseOver||(this._handle=w.connect(z.doc,"onclick",this,"onClick"))}},onClick:function(){this.process({type:"onmouseout"})},_recheckPosition:function(n,q,E){},_format:function(n){return n}});return b("dojo-bidi")?m("dojox.charting.action2d.Tooltip",[h,c]):h})},"dojox/charting/action2d/PlotAction":function(){define(["dojo/_base/connect",
"dojo/_base/declare","./Base","dojo/fx/easing","dojox/lang/functional"],function(F,K,m,z,w){var h=z.backOut;return K("dojox.charting.action2d.PlotAction",m,{overOutEvents:{onmouseover:1,onmouseout:1},constructor:function(l,g,b){this.anim={};b||(b={});this.duration=b.duration?b.duration:400;this.easing=b.easing?b.easing:h},connect:function(){this.handle=this.chart.connectToPlot(this.plot.name,this,"process")},disconnect:function(){this.handle&&(F.disconnect(this.handle),this.handle=null)},reset:function(){},
destroy:function(){this.inherited(arguments);w.forIn(this.anim,function(l){w.forIn(l,function(g){g.action.stop(!0)})});this.anim={}}})})},"dojox/charting/action2d/Base":function(){define(["dojo/_base/lang","dojo/_base/declare","dojo/Evented"],function(F,K,m){return K("dojox.charting.action2d.Base",m,{constructor:function(z,w){this.chart=z;this.plot=w?F.isString(w)?this.chart.getPlot(w):w:this.chart.getPlot("default")},connect:function(){},disconnect:function(){},destroy:function(){this.disconnect()}})})},
"dojo/fx/easing":function(){define(["../_base/lang"],function(F){var K={linear:function(m){return m},quadIn:function(m){return Math.pow(m,2)},quadOut:function(m){return m*(m-2)*-1},quadInOut:function(m){m*=2;return 1>m?Math.pow(m,2)/2:-1*(--m*(m-2)-1)/2},cubicIn:function(m){return Math.pow(m,3)},cubicOut:function(m){return Math.pow(m-1,3)+1},cubicInOut:function(m){m*=2;return 1>m?Math.pow(m,3)/2:(Math.pow(m-2,3)+2)/2},quartIn:function(m){return Math.pow(m,4)},quartOut:function(m){return-1*(Math.pow(m-
1,4)-1)},quartInOut:function(m){m*=2;return 1>m?Math.pow(m,4)/2:-.5*(Math.pow(m-2,4)-2)},quintIn:function(m){return Math.pow(m,5)},quintOut:function(m){return Math.pow(m-1,5)+1},quintInOut:function(m){m*=2;return 1>m?Math.pow(m,5)/2:(Math.pow(m-2,5)+2)/2},sineIn:function(m){return-1*Math.cos(Math.PI/2*m)+1},sineOut:function(m){return Math.sin(Math.PI/2*m)},sineInOut:function(m){return-1*(Math.cos(Math.PI*m)-1)/2},expoIn:function(m){return 0==m?0:Math.pow(2,10*(m-1))},expoOut:function(m){return 1==
m?1:-1*Math.pow(2,-10*m)+1},expoInOut:function(m){if(0==m)return 0;if(1==m)return 1;m*=2;if(1>m)return Math.pow(2,10*(m-1))/2;--m;return(-1*Math.pow(2,-10*m)+2)/2},circIn:function(m){return-1*(Math.sqrt(1-Math.pow(m,2))-1)},circOut:function(m){return Math.sqrt(1-Math.pow(m-1,2))},circInOut:function(m){m*=2;return 1>m?-.5*(Math.sqrt(1-Math.pow(m,2))-1):.5*(Math.sqrt(1-Math.pow(m-2,2))+1)},backIn:function(m){return Math.pow(m,2)*(2.70158*m-1.70158)},backOut:function(m){--m;return Math.pow(m,2)*(2.70158*
m+1.70158)+1},backInOut:function(m){m*=2;if(1>m)return Math.pow(m,2)*(3.5949095*m-2.5949095)/2;m-=2;return(Math.pow(m,2)*(3.5949095*m+2.5949095)+2)/2},elasticIn:function(m){if(0==m||1==m)return m;--m;return-1*Math.pow(2,10*m)*Math.sin(2*(m-.075)*Math.PI/.3)},elasticOut:function(m){return 0==m||1==m?m:Math.pow(2,-10*m)*Math.sin(2*(m-.075)*Math.PI/.3)+1},elasticInOut:function(m){if(0==m)return 0;m*=2;if(2==m)return 1;var z=.3*1.5,w=z/4;if(1>m)return--m,-.5*Math.pow(2,10*m)*Math.sin(2*(m-w)*Math.PI/
z);--m;return.5*Math.pow(2,-10*m)*Math.sin(2*(m-w)*Math.PI/z)+1},bounceIn:function(m){return 1-K.bounceOut(1-m)},bounceOut:function(m){return m<1/2.75?7.5625*Math.pow(m,2):m<2/2.75?7.5625*Math.pow(m-1.5/2.75,2)+.75:m<2.5/2.75?7.5625*Math.pow(m-2.25/2.75,2)+.9375:7.5625*Math.pow(m-2.625/2.75,2)+.984375},bounceInOut:function(m){return.5>m?K.bounceIn(2*m)/2:K.bounceOut(2*m-1)/2+.5}};F.setObject("dojo.fx.easing",K);return K})},"dojox/lang/functional/scan":function(){define(["dojo/_base/kernel","dojo/_base/lang",
"./lambda"],function(F,K,m){var z={};K.mixin(m,{scanl:function(w,h,l,g){"string"==typeof w&&(w=w.split(""));g=g||F.global;h=m.lambda(h);var b,c;if(K.isArray(w)){var e=Array((b=w.length)+1);e[0]=l;for(c=0;c<b;l=h.call(g,l,w[c],c,w),e[++c]=l);}else if("function"==typeof w.hasNext&&"function"==typeof w.next)for(e=[l],c=0;w.hasNext();e.push(l=h.call(g,l,w.next(),c++,w)));else for(c in e=[l],w)c in z||e.push(l=h.call(g,l,w[c],c,w));return e},scanl1:function(w,h,l){"string"==typeof w&&(w=w.split(""));l=
l||F.global;h=m.lambda(h);var g;var b=!0;if(K.isArray(w)){var c=Array(b=w.length);c[0]=g=w[0];for(var e=1;e<b;c[e]=g=h.call(l,g,w[e],e,w),++e);}else if("function"==typeof w.hasNext&&"function"==typeof w.next){if(w.hasNext())for(c=[g=w.next()],e=1;w.hasNext();c.push(g=h.call(l,g,w.next(),e++,w)));}else for(e in w)e in z||(b?(c=[g=w[e]],b=!1):c.push(g=h.call(l,g,w[e],e,w)));return c},scanr:function(w,h,l,g){"string"==typeof w&&(w=w.split(""));g=g||F.global;h=m.lambda(h);var b=w.length,c=Array(b+1),
e=b;for(c[b]=l;0<e;--e,l=h.call(g,l,w[e],e,w),c[e]=l);return c},scanr1:function(w,h,l){"string"==typeof w&&(w=w.split(""));l=l||F.global;h=m.lambda(h);var g=w.length,b=Array(g),c=w[g-1];--g;for(b[g]=c;0<g;--g,c=h.call(l,c,w[g],g,w),b[g]=c);return b}})})},"dojox/charting/action2d/Highlight":function(){define("dojo/_base/lang dojo/_base/declare dojo/_base/Color dojo/_base/connect dojox/color/_base ./PlotAction dojo/fx/easing dojox/gfx/fx".split(" "),function(F,K,m,z,w,h,l,g){var b=function(f){return function(){return f}},
c=function(f){f=new w.Color(f);var d=f.toHsl();0==d.s?d.l=50>d.l?100:0:(d.s=100,d.l=50>d.l?75:75<d.l?50:d.l-50>75-d.l?50:75);d=w.fromHsl(d);d.a=f.a;return d},e=function(f){f=c(f);f.a=.7;return f};return K("dojox.charting.action2d.Highlight",h,{defaultParams:{duration:400,easing:l.backOut},optionalParams:{highlight:"red"},constructor:function(f,d,k){this.colorFunc=(f=k&&k.highlight)?F.isFunction(f)?f:b(f):c;this.connect()},process:function(f){if(f.shape&&f.type in this.overOutEvents&&"spider_circle"!=
f.element&&"spider_plot"!=f.element){"spider_poly"==f.element&&this.colorFunc==c&&(this.colorFunc=e);var d=f.run.name,k=f.index,n;d in this.anim?n=this.anim[d][k]:this.anim[d]={};if(n)n.action.stop(!0);else{n=f.shape.getFill();if(!(n&&n instanceof m))return;this.anim[d][k]=n={start:n,end:this.colorFunc(n)}}var q=n.start,E=n.end;if("onmouseout"==f.type){var v=q;q=E;E=v}n.action=g.animateFill({shape:f.shape,duration:this.duration,easing:this.easing,color:{start:q,end:E}});"onmouseout"==f.type&&z.connect(n.action,
"onEnd",this,function(){this.anim[d]&&delete this.anim[d][k]});n.action.play()}}})})},"dojox/gfx/fx":function(){define("dojo/_base/lang ./_base ./matrix dojo/_base/Color dojo/_base/array dojo/_base/fx dojo/_base/connect dojo/sniff".split(" "),function(F,K,m,z,w,h,l,g){function b(v,r){this.start=v;this.end=r}function c(v,r,B){this.start=v;this.end=r;this.units=B}function e(v,r){this.start=v;this.end=r;this.temp=new z}function f(v){this.values=v;this.length=v.length}function d(v,r){this.values=v;this.def=
r?r:{}}function k(v,r){this.stack=v;this.original=r}function n(v,r,B,u){if(v.values)return new f(v.values);var y;var G=v.start?K.normalizeColor(v.start):y=r?B?r[B]:r:u;v.end?v=K.normalizeColor(v.end):(y||(y=r?B?r[B]:r:u),v=y);return new e(G,v)}var q=K.fx={};b.prototype.getValue=function(v){return(this.end-this.start)*v+this.start};c.prototype.getValue=function(v){return(this.end-this.start)*v+this.start+this.units};e.prototype.getValue=function(v){return z.blendColors(this.start,this.end,v,this.temp)};
f.prototype.getValue=function(v){return this.values[Math.min(Math.floor(v*this.length),this.length-1)]};d.prototype.getValue=function(v){var r=F.clone(this.def),B;for(B in this.values)r[B]=this.values[B].getValue(v);return r};k.prototype.getValue=function(v){var r=[];w.forEach(this.stack,function(B){if(B instanceof m.Matrix2D)r.push(B);else if("original"==B.name&&this.original)r.push(this.original);else if("matrix"==B.name){if(B.start instanceof m.Matrix2D&&B.end instanceof m.Matrix2D){var u=new m.Matrix2D;
for(y in B.start)u[y]=(B.end[y]-B.start[y])*v+B.start[y];r.push(u)}}else if(B.name in m)if(u=m[B.name],"function"!=typeof u)r.push(u);else{var y=w.map(B.start,function(G,I){return(B.end[I]-G)*v+G});u=u.apply(m,y);u instanceof m.Matrix2D&&r.push(u)}},this);return r};var E=new z(0,0,0,0);q.animateStroke=function(v){v.easing||(v.easing=h._defaultEasing);var r=new h.Animation(v),B=v.shape,u;l.connect(r,"beforeBegin",r,function(){u=B.getStroke();var y=v.color,G={};y&&(G.color=n(y,u,"color",E));(y=v.style)&&
y.values&&(G.style=new f(y.values));if(y=v.width){var I=y,L=u;if(I.values)var M=new f(I.values);else y=I.start?I.start:M=L?L.width:1,I.end?M=I.end:"number"!=typeof M&&(M=L?L.width:1),M=new b(y,M);G.width=M}(y=v.cap)&&y.values&&(G.cap=new f(y.values));if(y=v.join)y.values?G.join=new f(y.values):(M=y.start?y.start:u&&u.join||0,y=y.end?y.end:u&&u.join||0,"number"==typeof M&&"number"==typeof y&&(G.join=new b(M,y)));this.curve=new d(G,u)});l.connect(r,"onAnimate",B,"setStroke");return r};q.animateFill=
function(v){v.easing||(v.easing=h._defaultEasing);var r=new h.Animation(v),B=v.shape,u;l.connect(r,"beforeBegin",r,function(){u=B.getFill();var y=v.color;y&&(this.curve=n(y,u,"",E))});l.connect(r,"onAnimate",B,"setFill");return r};q.animateFont=function(v){v.easing||(v.easing=h._defaultEasing);var r=new h.Animation(v),B=v.shape,u;l.connect(r,"beforeBegin",r,function(){u=B.getFont();var y=v.style,G={};y&&y.values&&(G.style=new f(y.values));(y=v.variant)&&y.values&&(G.variant=new f(y.values));(y=v.weight)&&
y.values&&(G.weight=new f(y.values));(y=v.family)&&y.values&&(G.family=new f(y.values));if((y=v.size)&&y.units){var I=parseFloat(y.start?y.start:B.font&&B.font.size||"0");var L=parseFloat(y.end?y.end:B.font&&B.font.size||"0");G.size=new c(I,L,y.units)}this.curve=new d(G,u)});l.connect(r,"onAnimate",B,"setFont");return r};q.animateTransform=function(v){v.easing||(v.easing=h._defaultEasing);var r=new h.Animation(v),B=v.shape,u;l.connect(r,"beforeBegin",r,function(){u=B.getTransform();this.curve=new k(v.transform,
u)});l.connect(r,"onAnimate",B,"setTransform");if("svg"===K.renderer&&(9<=g("ie")||g("ff")))var y=[l.connect(r,"onBegin",r,function(){for(var G=B.getParent();G&&G.getParent;)G=G.getParent();G&&(B.__svgContainer=G.rawNode.parentNode,B.__svgRoot=G.rawNode,B.__svgRoot&&B.__svgRoot.getAttribute&&(B.__svgWidth=parseInt(B.__svgRoot.getAttribute("width"),10),isNaN(B.__svgWidth)&&delete B.__svgWidth))}),l.connect(r,"onAnimate",r,function(){try{if(B.__svgContainer){var G=B.__svgContainer.style.visibility;
B.__svgContainer.style.visibility="visible";B.__svgContainer.style.visibility=G;var I=B.__svgWidth;if(!isNaN(I))try{B.__svgRoot.setAttribute("width",I-5E-6),B.__svgRoot.setAttribute("width",I)}catch(L){}}}catch(L){}}),l.connect(r,"onEnd",r,function(){w.forEach(y,l.disconnect);if(B.__svgContainer){var G=B.__svgContainer;if(null==G.getAttribute("__gotVis")){G.setAttribute("__gotVis",!0);var I=B.__svgContainer.style.visibility,L=B.__svgRoot,M=B.__svgWidth;G.style.visibility="visible";setTimeout(function(){try{G.style.visibility=
I;G.removeAttribute("__gotVis");G=null;try{isNaN(M)||(L.setAttribute("width",M-5E-6),L.setAttribute("width",M))}catch(S){}}catch(S){}},100)}}delete B.__svgContainer;delete B.__svgRoot;delete B.__svgWidth})];return r};return q})},"dojox/charting/action2d/MoveSlice":function(){define("dojo/_base/connect dojo/_base/declare dojo/_base/array ./PlotAction dojo/fx/easing dojox/gfx/matrix dojox/gfx/fx dojox/lang/functional dojox/lang/functional/scan dojox/lang/functional/fold".split(" "),function(F,K,m,z,
w,h,l,g){return K("dojox.charting.action2d.MoveSlice",z,{defaultParams:{duration:400,easing:w.backOut,scale:1.05,shift:7},optionalParams:{},constructor:function(b,c,e){e||(e={});this.scale="number"==typeof e.scale?e.scale:1.05;this.shift="number"==typeof e.shift?e.shift:7;this.connect()},process:function(b){if(b.shape&&"slice"==b.element&&b.type in this.overOutEvents){if(!this.angles){var c=h._degToRad(b.plot.opt.startAngle);this.angles="number"==typeof b.run.data[0]?g.map(g.scanl(b.run.data,"+",
0),"* 2 * Math.PI / this",g.foldl(b.run.data,"+",0)):g.map(g.scanl(b.run.data,"a + b.y",0),"* 2 * Math.PI / this",g.foldl(b.run.data,"a + b.y",0));this.angles=m.map(this.angles,function(r){return r+c})}var e=b.index;var f=(this.angles[e]+this.angles[e+1])/2;var d=h.rotateAt(-f,b.cx,b.cy),k=h.rotateAt(f,b.cx,b.cy);(f=this.anim[e])?f.action.stop(!0):this.anim[e]=f={};if("onmouseover"==b.type){var n=0;var q=this.shift;var E=1;var v=this.scale}else n=this.shift,q=0,E=this.scale,v=1;f.action=l.animateTransform({shape:b.shape,
duration:this.duration,easing:this.easing,transform:[k,{name:"translate",start:[n,0],end:[q,0]},{name:"scaleAt",start:[E,b.cx,b.cy],end:[v,b.cx,b.cy]},d]});"onmouseout"==b.type&&F.connect(f.action,"onEnd",this,function(){delete this.anim[e]});f.action.play()}},reset:function(){delete this.angles}})})},"dojox/charting/plot2d/Spider":function(){define("dojo/_base/lang dojo/_base/declare dojo/_base/connect dojo/_base/array dojo/dom-geometry dojo/_base/fx dojo/fx dojo/sniff ./Base ./_PlotEvents ./common ../axis2d/common dojox/gfx dojox/gfx/matrix dojox/gfx/fx dojox/lang/functional dojox/lang/utils dojo/fx/easing".split(" "),
function(F,K,m,z,w,h,l,g,b,c,e,f,d,k,n,q,E,v){return K("dojox.charting.plot2d.Spider",[b,c],{defaultParams:{labels:!0,ticks:!1,fixed:!0,precision:1,labelOffset:-10,labelStyle:"default",htmlLabels:!0,startAngle:-90,divisions:3,axisColor:"",axisWidth:0,spiderColor:"",spiderWidth:0,seriesWidth:0,seriesFillAlpha:.2,spiderOrigin:.16,markerSize:3,spiderType:"polygon",animationType:v.backOut,animate:null,axisTickFont:"",axisTickFontColor:"",axisFont:"",axisFontColor:""},optionalParams:{radius:0,font:"",
fontColor:""},constructor:function(r,B){this.opt=F.clone(this.defaultParams);E.updateWithObject(this.opt,B);E.updateWithPattern(this.opt,B,this.optionalParams);this.dyn=[];this.datas={};this.labelKey=[];this.oldSeriePoints={};this.animate=null===this.opt.animate?{}:this.opt.animate;this.animations={}},clear:function(){this.inherited(arguments);this.dyn=[];this.axes=[];this.datas={};this.labelKey=[];this.oldSeriePoints={};this.animations={};return this},setAxis:function(r){r&&(void 0!=r.opt.min&&(this.datas[r.name].min=
r.opt.min),void 0!=r.opt.max&&(this.datas[r.name].max=r.opt.max));return this},addSeries:function(r){this.series.push(r);for(var B in r.data){var u=r.data[B],y=this.datas[B];y?(y.vlist.push(u),y.min=Math.min(y.min,u),y.max=Math.max(y.max,u)):(y="__"+B,this.axes.push(y),this[y]=B,this.datas[B]={min:u,max:u,vlist:[u]})}if(0>=this.labelKey.length)for(B in r.data)this.labelKey.push(B);return this},getSeriesStats:function(){return e.collectSimpleStats(this.series,function(r){return null===r})},render:function(r,
B){if(!this.dirty)return this;this.dirty=!1;this.cleanGroup();var u=this.group,y=this.chart.theme;this.resetEvents();if(!this.series||!this.series.length)return this;var G=this.opt,I=y.axis,L=(r.width-B.l-B.r)/2,M=(r.height-B.t-B.b)/2,S=Math.min(L,M),X=G.font||I.majorTick&&I.majorTick.font||I.tick&&I.tick.font||"normal normal normal 7pt Tahoma",C=G.axisFont||I.tick&&I.tick.titleFont||"normal normal normal 11pt Tahoma",H=G.axisTickFontColor||I.majorTick&&I.majorTick.fontColor||I.tick&&I.tick.fontColor||
"silver",O=G.axisFontColor||I.tick&&I.tick.titleFontColor||"black",R=G.axisColor||I.tick&&I.tick.axisColor||"silver",P=G.spiderColor||I.tick&&I.tick.spiderColor||"silver",N=G.axisWidth||I.stroke&&I.stroke.width||2,Z=G.spiderWidth||I.stroke&&I.stroke.width||2;I=G.seriesWidth||I.stroke&&I.stroke.width||2;var W=d.normalizedLength(d.splitFontString(C).size),da=k._degToRad(G.startAngle),ia=G.spiderOrigin,ma=3<=G.divisions?G.divisions:3,ca=G.markerSize,ba=G.spiderType,fa=G.animationType,na=-10>G.labelOffset?
G.labelOffset:-10;if(G.labels){S=z.map(this.series,function(V){return V.name},this);S=q.foldl1(q.map(S,function(V){return d._base._getTextBox(V,{font:y.series.font}).w},this),"Math.max(a, b)")/2;S=Math.min(L-2*S,M-W)+na;var oa=S-na}"radius"in G&&(S=G.radius,oa=S-na);S/=1.2;B={cx:B.l+L,cy:B.t+M,r:S};for(L=0;L<this.series.length;L++){var x=this.series[L];if(this.dirty||x.dirty){if(x.cleanGroup(),W=x.data,null!==W&&(M=this._getObjectLength(W),!a||0>=a.length)){var a=[];var p=[];var A=[];this._buildPoints(a,
M,B,S,da,!0,r);this._buildPoints(p,M,B,S*ia,da,!0,r);this._buildPoints(A,M,B,oa,da,!1,r);if(2<ma){var t=[];var D=[];for(W=0;W<ma-2;W++)t[W]=[],this._buildPoints(t[W],M,B,S*(ia+(1-ia)*(W+1)/(ma-1)),da,!0,r),D[W]=S*(ia+(1-ia)*(W+1)/(ma-1))}}}else y.skip()}M=u.createGroup();R={color:R,width:N};L={color:P,width:Z};for(W=a.length-1;0<=W;--W)P=a[W],Z={x:P.x+.2*(P.x-B.cx),y:P.y+.2*(P.y-B.cy)},P={x:P.x+.2*(P.x-B.cx)/2,y:P.y+.2*(P.y-B.cy)/2},M.createLine({x1:B.cx,y1:B.cy,x2:Z.x,y2:Z.y}).setStroke(R),this._drawArrow(M,
Z,P,R);M=u.createGroup();for(W=A.length-1;0<=W;--W)P=A[W],Z=d._base._getTextBox(this.labelKey[W],{font:C}).w||0,R=this.opt.htmlLabels&&"vml"!=d.renderer?"html":"gfx",P=f.createText[R](this.chart,M,w.isBodyLtr()||"html"!=R?P.x:P.x+Z-r.width,P.y,"middle",this.labelKey[W],C,O),this.opt.htmlLabels&&this.htmlElements.push(P);C=u.createGroup();if("polygon"==ba){if(C.createPolyline(a).setStroke(L),C.createPolyline(p).setStroke(L),0<t.length)for(W=t.length-1;0<=W;--W)C.createPolyline(t[W]).setStroke(L)}else if(C.createCircle({cx:B.cx,
cy:B.cy,r:S}).setStroke(L),C.createCircle({cx:B.cx,cy:B.cy,r:S*ia}).setStroke(L),0<D.length)for(W=D.length-1;0<=W;--W)C.createCircle({cx:B.cx,cy:B.cy,r:D[W]}).setStroke(L);M=this._getObjectLength(this.datas);O=u.createGroup();t=0;for(var J in this.datas){D=this.datas[J];a=D.min;D=D.max;D-=a;C=da+2*Math.PI*t/M;for(L=0;L<ma;L++)A=a+D*L/(ma-1),P=this._getCoordinate(B,S*(ia+(1-ia)*L/(ma-1)),C,r),A=this._getLabel(A),Z=d._base._getTextBox(A,{font:X}).w||0,R=this.opt.htmlLabels&&"vml"!=d.renderer?"html":
"gfx",this.opt.htmlLabels&&this.htmlElements.push(f.createText[R](this.chart,O,w.isBodyLtr()||"html"!=R?P.x:P.x+Z-r.width,P.y,"start",A,X,H));t++}this.chart.seriesShapes={};for(L=this.series.length-1;0<=L;L--)if(x=this.series[L],W=x.data,null!==W){X=y.next("spider",[G,x]);var Q=d.normalizeColor(X.series.fill);X={color:X.series.fill,width:I};Q.a=G.seriesFillAlpha;x.dyn={fill:Q,stroke:X};if(!x.hidden){var U=[],T=[];t=0;for(J in W)D=this.datas[J],a=D.min,D=D.max,D-=a,H=W[J],C=da+2*Math.PI*t/M,P=this._getCoordinate(B,
S*(ia+(1-ia)*(H-a)/D),C,r),U.push(P),T.push({sname:x.name,key:J,data:H}),t++;U[U.length]=U[0];T[T.length]=T[0];H=this._getBoundary(U);var Y=x.group;X=this._createSeriesEntry(Y,this.oldSeriePoints[x.name]||p,U,Q,X,S,ia,ca,fa);this.chart.seriesShapes[x.name]=X;this.oldSeriePoints[x.name]=U;this._connectEvents({element:"spider_poly",index:L,id:"spider_poly_"+x.name,run:x,plot:this,shape:X.poly,parent:Y,brect:H,cx:B.cx,cy:B.cy,cr:S,f:Q,s:u});this._connectEvents({element:"spider_plot",index:L,id:"spider_plot_"+
x.name,run:x,plot:this,shape:x.group});z.forEach(X.circles,function(V,aa){this._connectEvents({element:"spider_circle",index:aa,id:"spider_circle_"+x.name+aa,run:x,plot:this,shape:V,parent:Y,tdata:T[aa],cx:U[aa].x,cy:U[aa].y,f:Q,s:u})},this)}}return this},_createSeriesEntry:function(r,B,u,y,G,I,L,M,S){I=this.animate?B:u;var X=r.createPolyline(I).setFill(y).setStroke(G),C=[];for(L=0;L<I.length;L++){var H=I[L];H=r.createCircle({cx:H.x,cy:H.y,r:M}).setFill(y).setStroke(G);C.push(H)}this.animate&&(y=
z.map(u,function(O,R){O=new h.Animation(F.delegate({duration:1E3,easing:S,curve:[B[R].y,O.y]},this.animate));var P=C[R];m.connect(O,"onAnimate",function(N){var Z=X.getShape();Z.points[R].y=N;X.setShape(Z);Z=P.getShape();Z.cy=N;P.setShape(Z)});return O},this),u=z.map(u,function(O,R){O=new h.Animation(F.delegate({duration:1E3,easing:S,curve:[B[R].x,O.x]},this.animate));var P=C[R];m.connect(O,"onAnimate",function(N){var Z=X.getShape();Z.points[R].x=N;X.setShape(Z);Z=P.getShape();Z.cx=N;P.setShape(Z)});
return O},this),l.combine(y.concat(u)).play());return{group:r,poly:X,circles:C}},plotEvent:function(r){"spider_plot"==r.element&&("onmouseover"!=r.type||g("ie")||r.shape.moveToFront())},tooltipFunc:function(r){return"spider_circle"==r.element?r.tdata.sname+"\x3cbr/\x3e"+r.tdata.key+"\x3cbr/\x3e"+r.tdata.data:null},_getBoundary:function(r){for(var B=r[0].x,u=r[0].x,y=r[0].y,G=r[0].y,I=0;I<r.length;I++){var L=r[I];B=Math.max(L.x,B);y=Math.max(L.y,y);u=Math.min(L.x,u);G=Math.min(L.y,G)}return{x:u,y:G,
width:B-u,height:y-G}},_drawArrow:function(r,B,u,y){var G=Math.sqrt(Math.pow(u.x-B.x,2)+Math.pow(u.y-B.y,2)),I=(u.y-B.y)/G,L=(u.x-B.x)/G;r.createPolyline([B,{x:u.x+G/3*-I,y:u.y+G/3*L},{x:u.x+G/3*I,y:u.y+G/3*-L}]).setFill(y.color).setStroke(y)},_buildPoints:function(r,B,u,y,G,I,L){for(var M=0;M<B;M++)r.push(this._getCoordinate(u,y,G+2*Math.PI*M/B,L));I&&r.push(this._getCoordinate(u,y,G+2*Math.PI,L))},_getCoordinate:function(r,B,u,y){var G=r.cx+B*Math.cos(u);g("dojo-bidi")&&this.chart.isRightToLeft()&&
y&&(G=y.width-G);return{x:G,y:r.cy+B*Math.sin(u)}},_getObjectLength:function(r){var B=0;if(F.isObject(r))for(var u in r)B++;return B},_getLabel:function(r){return e.getLabel(r,this.opt.fixed,this.opt.precision)}})})},"dojox/charting/widget/SelectableLegend":function(){define("dojo/_base/array dojo/_base/declare dojo/query dojo/_base/connect dojo/_base/Color ./Legend dijit/form/CheckBox ../action2d/Highlight dojox/lang/functional dojox/gfx/fx dojo/keys dojo/dom-construct dojo/dom-prop dijit/registry".split(" "),
function(F,K,m,z,w,h,l,g,b,c,e,f,d,k){function n(v){return"mouseenter"==v?"onmouseover":"mouseleave"==v?"onmouseout":"on"+v}var q=K(null,{constructor:function(v){this.legend=v;this.index=0;this.horizontalLength=this._getHrizontalLength();F.forEach(v.legends,function(r,B){0<B&&m("input",r).attr("tabindex",-1)});this.firstLabel=m("input",v.legends[0])[0];z.connect(this.firstLabel,"focus",this,function(){this.legend.active=!0});z.connect(this.legend.domNode,"keydown",this,"_onKeyEvent")},_getHrizontalLength:function(){var v=
this.legend.horizontal;return"number"==typeof v?Math.min(v,this.legend.legends.length):v?this.legend.legends.length:1},_onKeyEvent:function(v){if(this.legend.active)if(v.keyCode==e.TAB)this.legend.active=!1;else{var r=this.legend.legends.length;switch(v.keyCode){case e.LEFT_ARROW:this.index--;0>this.index&&(this.index+=r);break;case e.RIGHT_ARROW:this.index++;this.index>=r&&(this.index-=r);break;case e.UP_ARROW:0<=this.index-this.horizontalLength&&(this.index-=this.horizontalLength);break;case e.DOWN_ARROW:this.index+
this.horizontalLength<r&&(this.index+=this.horizontalLength);break;default:return}this._moveToFocus();Event.stop(v)}},_moveToFocus:function(){m("input",this.legend.legends[this.index])[0].focus()}}),E=K(g,{connect:function(){}});return K("dojox.charting.widget.SelectableLegend",h,{outline:!1,transitionFill:null,transitionStroke:null,autoScale:!1,postCreate:function(){this.legends=[];this.legendAnim={};this._cbs=[];this.inherited(arguments)},refresh:function(){this.legends=[];this._clearLabels();this.inherited(arguments);
this._applyEvents();new q(this)},_clearLabels:function(){for(var v=this._cbs;v.length;)v.pop().destroyRecursive()},_addLabel:function(v,r){this.inherited(arguments);var B=m("td",this.legendBody),u=B[B.length-1];this.legends.push(u);B=new l({checked:!0});this._cbs.push(B);f.place(B.domNode,u,"first");u=m("label",u)[0];d.set(u,"for",B.id)},_applyEvents:function(){this.chart.dirty||F.forEach(this.legends,function(v,r){if(this._isPie()){var B=this.chart.stack[0];var u=B.name;var y=this.chart.series[0].name}else B=
this.chart.series[r],u=B.plot,y=B.name;var G=k.byNode(m(".dijitCheckBox",v)[0]);G.set("checked",!this._isHidden(u,r));z.connect(G,"onClick",this,function(M){this.toogle(u,r,!G.get("checked"));M.stopPropagation()});var I=m(".dojoxLegendIcon",v)[0],L=this._getFilledShape(this._surfaces[r].children);F.forEach(["onmouseenter","onmouseleave"],function(M){z.connect(I,M,this,function(S){this._highlight(S,L,r,!G.get("checked"),y,u)})},this)},this)},_isHidden:function(v,r){return this._isPie()?-1!=F.indexOf(this.chart.getPlot(v).runFilter,
r):this.chart.series[r].hidden},toogle:function(v,r,B){v=this.chart.getPlot(v);this._isPie()?-1!=F.indexOf(v.runFilter,r)?B||(v.runFilter=F.filter(v.runFilter,function(u){return u!=r})):B&&v.runFilter.push(r):this.chart.series[r].hidden=B;this.autoScale?this.chart.dirty=!0:v.dirty=!0;this.chart.render()},_highlight:function(v,r,B,u,y,G){if(!u){var I=this._getAnim(G),L=this._isPie(),M=n(v.type);I.process({shape:r,index:L?"legend"+B:"legend",run:{name:y},type:M});F.forEach(this._getShapes(B,G),function(S,
X){S={shape:S,index:L?B:X,run:{name:y},type:M};I.duration=100;I.process(S)})}},_getShapes:function(v,r){var B=[];if(this._isPie()){var u=0;F.forEach(this.chart.getPlot(r).runFilter,function(y){v>y&&u++});B.push(this.chart.stack[0].group.children[v-u])}else this._isCandleStick(r)?F.forEach(this.chart.series[v].group.children,function(y){F.forEach(y.children,function(G){F.forEach(G.children,function(I){"line"!=I.shape.type&&B.push(I)})})}):B=this.chart.series[v].group.children;return B},_getAnim:function(v){this.legendAnim[v]||
(this.legendAnim[v]=new E(this.chart,v));return this.legendAnim[v]},_getTransitionFill:function(v){return-1!=this.chart.stack[this.chart.plots[v]].declaredClass.indexOf("dojox.charting.plot2d.Stacked")?this.chart.theme.plotarea.fill:null},_getFilledShape:function(v){for(var r=0;v[r];){if(v[r].getFill())return v[r];r++}return null},_isPie:function(){return"dojox.charting.plot2d.Pie"==this.chart.stack[0].declaredClass},_isCandleStick:function(v){return"dojox.charting.plot2d.Candlesticks"==this.chart.stack[this.chart.plots[v]].declaredClass},
destroy:function(){this._clearLabels();this.inherited(arguments)}})})},"dojox/charting/widget/Legend":function(){define("dojo/_base/declare dijit/_WidgetBase dojox/gfx dojo/_base/array dojo/has dojo/has!dojo-bidi?../bidi/widget/Legend dojox/lang/functional dojo/dom dojo/dom-construct dojo/dom-class dijit/registry".split(" "),function(F,K,m,z,w,h,l,g,b,c,e){K=F(w("dojo-bidi")?"dojox.charting.widget.NonBidiLegend":"dojox.charting.widget.Legend",K,{chartRef:"",horizontal:!0,swatchSize:18,legendBody:null,
postCreate:function(){!this.chart&&this.chartRef&&((this.chart=e.byId(this.chartRef)||e.byNode(g.byId(this.chartRef)))||console.log("Could not find chart instance with id: "+this.chartRef));this.chart=this.chart.chart||this.chart;this.refresh()},buildRendering:function(){this.domNode=b.create("table",{role:"group","aria-label":"chart legend","class":"dojoxLegendNode"});this.legendBody=b.create("tbody",null,this.domNode);this.inherited(arguments)},destroy:function(){this._surfaces&&z.forEach(this._surfaces,
function(f){f.destroy()});this.inherited(arguments)},refresh:function(){this._surfaces&&z.forEach(this._surfaces,function(k){k.destroy()});for(this._surfaces=[];this.legendBody.lastChild;)b.destroy(this.legendBody.lastChild);this.horizontal&&(c.add(this.domNode,"dojoxLegendHorizontal"),this._tr=b.create("tr",null,this.legendBody),this._inrow=0);var f=this.series||this.chart.series;if(0!=f.length)if("dojox.charting.plot2d.Pie"==f[0].chart.stack[0].declaredClass){var d=f[0].chart.stack[0];"number"==
typeof d.run.data[0]?(f=l.map(d.run.data,"Math.max(x, 0)"),f=l.map(f,"/this",l.foldl(f,"+",0)),z.forEach(f,function(k,n){this._addLabel(d.dyn[n],d._getLabel(100*k)+"%")},this)):z.forEach(d.run.data,function(k,n){this._addLabel(d.dyn[n],k.legend||k.text||k.y)},this)}else z.forEach(f,function(k){this._addLabel(k.dyn,k.legend||k.name)},this)},_addLabel:function(f,d){var k=b.create("td"),n=b.create("div",null,k),q=b.create("label",null,k),E=b.create("div",{style:{width:this.swatchSize+"px",height:this.swatchSize+
"px","float":"left"}},n);c.add(n,"dojoxLegendIcon dijitInline");c.add(q,"dojoxLegendText");this._tr?(this._tr.appendChild(k),++this._inrow===this.horizontal&&(this._tr=b.create("tr",null,this.legendBody),this._inrow=0)):b.create("tr",null,this.legendBody).appendChild(k);this._makeIcon(E,f);q.innerHTML=String(d);w("dojo-bidi")&&(q.dir=this.getTextDir(d,q.dir))},_makeIcon:function(f,d){var k=this.swatchSize,n=this.swatchSize;f=m.createSurface(f,n,k);this._surfaces.push(f);if(d.fill)f.createRect({x:2,
y:2,width:n-4,height:k-4}).setFill(d.fill).setStroke(d.stroke);else if(d.stroke||d.marker){var q={x1:0,y1:k/2,x2:n,y2:k/2};d.stroke&&f.createLine(q).setStroke(d.stroke);d.marker&&f.createPath({path:"M"+n/2+" "+k/2+" "+d.marker}).setFill(d.markerFill).setStroke(d.markerStroke)}else f.createRect({x:2,y:2,width:n-4,height:k-4}).setStroke("black"),f.createLine({x1:2,y1:2,x2:n-2,y2:k-2}).setStroke("black"),f.createLine({x1:2,y1:k-2,x2:n-2,y2:2}).setStroke("black")}});return w("dojo-bidi")?F("dojox.charting.widget.Legend",
[K,h]):K})},"dojox/charting/action2d/Magnify":function(){define("dojo/_base/connect dojo/_base/declare ./PlotAction dojox/gfx/matrix dojox/gfx/fx dojo/fx dojo/fx/easing".split(" "),function(F,K,m,z,w,h,l){return K("dojox.charting.action2d.Magnify",m,{defaultParams:{duration:400,easing:l.backOut,scale:2},optionalParams:{},constructor:function(g,b,c){this.scale=c&&"number"==typeof c.scale?c.scale:2;this.connect()},process:function(g){if(g.shape&&g.type in this.overOutEvents&&"cx"in g&&"cy"in g&&"spider_plot"!=
g.element&&"spider_poly"!=g.element){var b=g.run.name,c=g.index,e=[],f;b in this.anim?f=this.anim[b][c]:this.anim[b]={};f?f.action.stop(!0):this.anim[b][c]=f={};if("onmouseover"==g.type){var d=z.identity;var k=this.scale}else d=z.scaleAt(this.scale,g.cx,g.cy),k=1/this.scale;d={shape:g.shape,duration:this.duration,easing:this.easing,transform:[{name:"scaleAt",start:[1,g.cx,g.cy],end:[k,g.cx,g.cy]},d]};g.shape&&e.push(w.animateTransform(d));g.outline&&(d.shape=g.outline,e.push(w.animateTransform(d)));
g.shadow&&(d.shape=g.shadow,e.push(w.animateTransform(d)));e.length?(f.action=h.combine(e),"onmouseout"==g.type&&F.connect(f.action,"onEnd",this,function(){this.anim[b]&&delete this.anim[b][c]}),f.action.play()):delete this.anim[b][c]}}})})},"dojox/charting/Theme":function(){define("dojo/_base/lang dojo/_base/declare dojo/_base/Color ./SimpleTheme dojox/color/_base dojox/color/Palette dojox/gfx/gradutils".split(" "),function(F,K,m,z,w,h){var l=K("dojox.charting.Theme",z,{});F.mixin(l,{defineColors:function(g){g=
g||{};var b=[],c=g.num||5;if(g.colors){var e=g.colors.length;for(var f=0;f<c;f++)b.push(g.colors[f%e]);return b}return g.hue?h.generate(w.fromHsv(g.hue,g.saturation||100,((g.high||90)+(g.low||30))/2),"monochromatic").colors:g.generator?w.Palette.generate(g.base,g.generator).colors:b},generateGradient:function(g,b,c){g=F.delegate(g);g.colors=[{offset:0,color:b},{offset:1,color:c}];return g},generateHslColor:function(g,b){g=new m(g);var c=g.toHsl();b=w.fromHsl(c.h,c.s,b);b.a=g.a;return b},generateHslGradient:function(g,
b,c,e){g=new m(g);var f=g.toHsl();c=w.fromHsl(f.h,f.s,c);e=w.fromHsl(f.h,f.s,e);c.a=e.a=g.a;return l.generateGradient(b,c,e)}});l.defaultMarkers=z.defaultMarkers;l.defaultColors=z.defaultColors;l.defaultTheme=z.defaultTheme;return l})},"dojox/color/Palette":function(){define(["dojo/_base/lang","dojo/_base/array","./_base"],function(F,K,m){function z(b,c,e){var f=new m.Palette;f.colors=[];K.forEach(b.colors,function(d){f.colors.push(new m.Color({r:Math.min(255,Math.max(0,"dr"==c?d.r+e:d.r)),g:Math.min(255,
Math.max(0,"dg"==c?d.g+e:d.g)),b:Math.min(255,Math.max(0,"db"==c?d.b+e:d.b)),a:Math.min(1,Math.max(0,"da"==c?d.a+e:d.a))}))});return f}function w(b,c,e){var f=new m.Palette;f.colors=[];K.forEach(b.colors,function(d){d=d.toCmy();f.colors.push(m.fromCmy(Math.min(100,Math.max(0,"dc"==c?d.c+e:d.c)),Math.min(100,Math.max(0,"dm"==c?d.m+e:d.m)),Math.min(100,Math.max(0,"dy"==c?d.y+e:d.y))))});return f}function h(b,c,e){var f=new m.Palette;f.colors=[];K.forEach(b.colors,function(d){d=d.toCmyk();f.colors.push(m.fromCmyk(Math.min(100,
Math.max(0,"dc"==c?d.c+e:d.c)),Math.min(100,Math.max(0,"dm"==c?d.m+e:d.m)),Math.min(100,Math.max(0,"dy"==c?d.y+e:d.y)),Math.min(100,Math.max(0,"dk"==c?d.b+e:d.b))))});return f}function l(b,c,e){var f=new m.Palette;f.colors=[];K.forEach(b.colors,function(d){d=d.toHsl();f.colors.push(m.fromHsl(("dh"==c?d.h+e:d.h)%360,Math.min(100,Math.max(0,"ds"==c?d.s+e:d.s)),Math.min(100,Math.max(0,"dl"==c?d.l+e:d.l))))});return f}function g(b,c,e){var f=new m.Palette;f.colors=[];K.forEach(b.colors,function(d){d=
d.toHsv();f.colors.push(m.fromHsv(("dh"==c?d.h+e:d.h)%360,Math.min(100,Math.max(0,"ds"==c?d.s+e:d.s)),Math.min(100,Math.max(0,"dv"==c?d.v+e:d.v))))});return f}m.Palette=function(b){this.colors=[];b instanceof m.Palette?this.colors=b.colors.slice(0):b instanceof m.Color?this.colors=[null,null,b,null,null]:F.isArray(b)?this.colors=K.map(b.slice(0),function(c){return F.isString(c)?new m.Color(c):c}):F.isString(b)&&(this.colors=[null,null,new m.Color(b),null,null])};F.extend(m.Palette,{transform:function(b){var c=
z;if(b.use){var e=b.use.toLowerCase();0==e.indexOf("hs")?c="l"==e.charAt(2)?l:g:0==e.indexOf("cmy")&&(c="k"==e.charAt(3)?h:w)}else if("dc"in b||"dm"in b||"dy"in b)c="dk"in b?h:w;else if("dh"in b||"ds"in b)c="dv"in b?g:l;e=this;for(var f in b)"use"!=f&&(e=c(e,f,b[f]));return e},clone:function(){return new m.Palette(this)}});F.mixin(m.Palette,{generators:{analogous:function(b){var c=b.high||60,e=b.low||18;b=(F.isString(b.base)?new m.Color(b.base):b.base).toHsv();var f=Math.max(10,95>=b.s?b.s+5:100-
(b.s-95)),d=92<=b.v?b.v-9:Math.max(b.v+9,20),k=90>=b.v?Math.max(b.v+5,20):95+Math.ceil((b.v-90)/2),n=[f,1<b.s?b.s-1:21-b.s,b.s,f,f],q=[d,k,b.v,d,k];return new m.Palette(K.map([(b.h+e+360)%360,(b.h+Math.round(e/2)+360)%360,b.h,(b.h-Math.round(c/2)+360)%360,(b.h-c+360)%360],function(E,v){return m.fromHsv(E,n[v],q[v])}))},monochromatic:function(b){b=F.isString(b.base)?new m.Color(b.base):b.base;var c=b.toHsv(),e=9<c.s-30?c.s-30:c.s+30,f=c.s,d=20<c.v-20?c.v-20:c.v+60,k=20<c.v-50?c.v-50:c.v+30;return new m.Palette([m.fromHsv(c.h,
e,100-.8*(100-c.v)),m.fromHsv(c.h,f,k),b,m.fromHsv(c.h,e,k),m.fromHsv(c.h,f,d)])},triadic:function(b){b=F.isString(b.base)?new m.Color(b.base):b.base;var c=b.toHsv(),e=(c.h-157+360)%360,f=90<c.s?c.s-10:c.s+10,d=95<c.s?c.s-5:c.s+5,k=20<c.v-20?c.v-20:c.v+20,n=20<c.v-30?c.v-30:c.v+30,q=70<c.v-30?c.v-30:c.v+30;return new m.Palette([m.fromHsv((c.h+57+360)%360,20<c.s?c.s-10:c.s+10,c.v),m.fromHsv(c.h,f,n),b,m.fromHsv(e,f,k),m.fromHsv(e,d,q)])},complementary:function(b){b=F.isString(b.base)?new m.Color(b.base):
b.base;var c=b.toHsv(),e=360>2*c.h+137?2*c.h+137:Math.floor(c.h/2)-137,f=100-.9*(100-c.s),d=Math.min(100,c.s+20),k=20<c.v?c.v-30:c.v+30;return new m.Palette([m.fromHsv(c.h,Math.max(c.s-10,0),Math.min(100,c.v+30)),m.fromHsv(c.h,f,k),b,m.fromHsv(e,d,k),m.fromHsv(e,c.s,c.v)])},splitComplementary:function(b){var c=F.isString(b.base)?new m.Color(b.base):b.base,e=b.da||30;b=c.toHsv();var f=360>2*b.h+137?2*b.h+137:Math.floor(b.h/2)-137,d=(f-e+360)%360;e=(f+e)%360;f=100-.9*(100-b.s);var k=Math.min(100,b.s+
20),n=20<b.v?b.v-30:b.v+30;return new m.Palette([m.fromHsv(d,Math.max(b.s-10,0),Math.min(100,b.v+30)),m.fromHsv(d,f,n),c,m.fromHsv(e,k,n),m.fromHsv(e,b.s,b.v)])},compound:function(b){b=F.isString(b.base)?new m.Color(b.base):b.base;var c=b.toHsv(),e=360>2*c.h+18?2*c.h+18:Math.floor(c.h/2)-18,f=360>2*c.h+120?2*c.h+120:Math.floor(c.h/2)-120,d=360>2*c.h+99?2*c.h+99:Math.floor(c.h/2)-99,k=80<c.s-10?c.s-10:c.s+10,n=10<c.s-25?c.s-25:c.s+25,q=80<c.v-20?c.v-20:c.v+20,E=Math.max(c.v,20);return new m.Palette([m.fromHsv(e,
10<c.s-40?c.s-40:c.s+40,10<c.v-40?c.v-40:c.v+40),m.fromHsv(e,k,q),b,m.fromHsv(f,n,E),m.fromHsv(d,k,q)])},shades:function(b){b=F.isString(b.base)?new m.Color(b.base):b.base;var c=b.toHsv(),e=100==c.s&&0==c.v?0:c.s,f=20<=c.v-25?c.v-25:c.v+55,d=20<=c.v-75?c.v-75:c.v+5,k=Math.max(c.v-10,20);return new m.Palette([new m.fromHsv(c.h,e,20<c.v-50?c.v-50:c.v+30),new m.fromHsv(c.h,e,f),b,new m.fromHsv(c.h,e,d),new m.fromHsv(c.h,e,k)])}},generate:function(b,c){if(F.isFunction(c))return c({base:b});if(m.Palette.generators[c])return m.Palette.generators[c]({base:b});
throw Error("dojox.color.Palette.generate: the specified generator ('"+c+"') does not exist.");}});return m.Palette})},"dojox/charting/plot2d/Bars":function(){define("dojo/_base/lang dojo/_base/array dojo/_base/declare dojo/has ./CartesianBase ./_PlotEvents ./common dojox/gfx/fx dojox/lang/utils dojox/lang/functional".split(" "),function(F,K,m,z,w,h,l,g,b,c){var e=function(){return!1};return m("dojox.charting.plot2d.Bars",[w,h],{defaultParams:{gap:0,animate:null,enableCache:!1},optionalParams:{minBarSize:1,
maxBarSize:1,stroke:{},outline:{},shadow:{},fill:{},filter:{},styleFunc:null,font:"",fontColor:""},constructor:function(f,d){this.opt=F.clone(F.mixin(this.opt,this.defaultParams));b.updateWithObject(this.opt,d);b.updateWithPattern(this.opt,d,this.optionalParams);this.animate=this.opt.animate;this.renderingOptions={"shape-rendering":"crispEdges"}},getSeriesStats:function(){var f=l.collectSimpleStats(this.series,F.hitch(this,"isNullValue"));f.hmin-=.5;f.hmax+=.5;var d=f.hmin;f.hmin=f.vmin;f.vmin=d;
d=f.hmax;f.hmax=f.vmax;f.vmax=d;return f},createRect:function(f,d,k){if(this.opt.enableCache&&0<f._rectFreePool.length){var n=f._rectFreePool.pop();n.setShape(k);d.add(n)}else n=d.createRect(k);this.opt.enableCache&&f._rectUsePool.push(n);return n},createLabel:function(f,d,k,n){this.opt.labels&&"outside"==this.opt.labelStyle?this.renderLabel(f,k.x+k.width+this.opt.labelOffset,k.y+k.height/2,this._getLabel(isNaN(d.y)?d:d.y),n,"start"):this.inherited(arguments)},render:function(f,d){if(this.zoom&&!this.isDataDirty())return this.performZoom(f,
d);this.dirty=this.isDirty();this.resetEvents();if(this.dirty){K.forEach(this.series,l.purgeGroup);this._eventSeries={};this.cleanGroup();var k=this.getGroup();c.forEachRev(this.series,function(ca){ca.cleanGroup(k)})}var n=this.chart.theme,q=this._hScaler.scaler.getTransformerFromModel(this._hScaler),E=this._vScaler.scaler.getTransformerFromModel(this._vScaler),v=Math.max(this._hScaler.bounds.lower,this._hAxis?this._hAxis.naturalBaseline:0),r=q(v),B=this.events(),u=this.getBarProperties(),y=this.series.length;
K.forEach(this.series,function(ca){ca.hidden&&y--});var G=y,I=this.extractValues(this._vScaler);I=this.rearrangeValues(I,q,r);for(var L=0;L<this.series.length;L++){var M=this.series[L];if(this.dirty||M.dirty){M.cleanGroup();this.opt.enableCache&&(M._rectFreePool=(M._rectFreePool?M._rectFreePool:[]).concat(M._rectUsePool?M._rectUsePool:[]),M._rectUsePool=[]);var S=n.next("bar",[this.opt,M]);if(M.hidden)M.dyn.fill=S.series.fill,M.dyn.stroke=S.series.stroke;else{G--;var X=Array(M.data.length);k=M.group;
for(var C=K.some(M.data,function(ca){return"number"==typeof ca||ca&&!ca.hasOwnProperty("x")}),H=C?Math.min(M.data.length,Math.ceil(this._vScaler.bounds.to)):M.data.length,O=C?Math.max(0,Math.floor(this._vScaler.bounds.from-1)):0;O<H;++O){var R=M.data[O];if(!this.isNullValue(R)){var P=this.getValue(R,O,L,C),N=I[L][O];if(this.opt.styleFunc||"number"!=typeof R){var Z="number"!=typeof R?[R]:[];this.opt.styleFunc&&Z.push(this.opt.styleFunc(R));Z=n.addMixin(S,"bar",Z,!0)}else Z=n.post(S,"bar");if(N&&1<=
u.height){var W={x:d.l+r+Math.min(N,0),y:f.height-d.b-E(P.x+1.5)+u.gap+u.thickness*(y-G-1),width:Math.abs(N),height:u.height};if(Z.series.shadow){var da=F.clone(W);da.x+=Z.series.shadow.dx;da.y+=Z.series.shadow.dy;da=this.createRect(M,k,da).setFill(Z.series.shadow.color).setStroke(Z.series.shadow);this.animate&&this._animateBar(da,d.l+r,-N)}var ia=this._plotFill(Z.series.fill,f,d);ia=this._shapeFill(ia,W);ia=this.createRect(M,k,W).setFill(ia).setStroke(Z.series.stroke);ia.setFilter&&Z.series.filter&&
ia.setFilter(Z.series.filter);M.dyn.fill=ia.getFill();M.dyn.stroke=ia.getStroke();if(B){var ma={element:"bar",index:O,run:M,shape:ia,shadow:da,cx:P.y,cy:P.x+1.5,x:C?O:M.data[O].x,y:C?M.data[O]:M.data[O].y};this._connectEvents(ma);X[O]=ma}!isNaN(P.py)&&P.py>v&&(W.x+=q(P.py),W.width-=q(P.py));this.createLabel(k,R,W,Z);this.animate&&this._animateBar(ia,d.l+r,-Math.abs(N))}}}this._eventSeries[M.name]=X;M.dirty=!1}}else n.skip(),this._reconnectEvents(M.name)}this.dirty=!1;z("dojo-bidi")&&this._checkOrientation(this.group,
f,d);return this},getValue:function(f,d,k,n){n?(k="number"==typeof f?f:f.y,f=d):(k=f.y,f=f.x-1);return{y:k,x:f}},extractValues:function(f){for(var d=[],k=this.series.length-1;0<=k;--k){var n=this.series[k];if(this.dirty||n.dirty){var q=K.some(n.data,function(B){return"number"==typeof B||B&&!B.hasOwnProperty("x")}),E=q?Math.max(0,Math.floor(f.bounds.from-1)):0;q=q?Math.min(n.data.length,Math.ceil(f.bounds.to)):n.data.length;var v=d[k]=[];v.min=E;for(v.max=q;E<q;++E){var r=n.data[E];v[E]=this.isNullValue(r)?
0:"number"==typeof r?r:r.y}}}return d},rearrangeValues:function(f,d,k){for(var n=0,q=f.length;n<q;++n){var E=f[n];if(E)for(var v=E.min,r=E.max;v<r;++v){var B=E[v];E[v]=this.isNullValue(B)?0:d(B)-k}}return f},isNullValue:function(f){if(null===f||"undefined"==typeof f)return!0;var d=this._hAxis?this._hAxis.isNullValue:e,k=this._vAxis?this._vAxis.isNullValue:e;return"number"==typeof f?k(.5)||d(f):k(isNaN(f.x)?.5:f.x+.5)||null===f.y||d(f.y)},getBarProperties:function(){var f=l.calculateBarSize(this._vScaler.bounds.scale,
this.opt);return{gap:f.gap,height:f.size,thickness:0}},_animateBar:function(f,d,k){0==k&&(k=1);g.animateTransform(F.delegate({shape:f,duration:1200,transform:[{name:"translate",start:[d-d/k,0],end:[0,0]},{name:"scale",start:[1/k,1],end:[1,1]},{name:"original"}]},this.animate)).play()}})})},"dojox/charting/plot2d/CartesianBase":function(){define("dojo/_base/lang dojo/_base/declare dojo/_base/connect dojo/has ./Base ../scaler/primitive dojox/gfx dojox/gfx/fx dojox/lang/utils".split(" "),function(F,
K,m,z,w,h,l,g,b){var c=function(){return!1};return K("dojox.charting.plot2d.CartesianBase",w,{baseParams:{hAxis:"x",vAxis:"y",labels:!1,labelOffset:10,fixed:!0,precision:1,labelStyle:"inside",htmlLabels:!0,omitLabels:!0,labelFunc:null},constructor:function(e,f){this.axes=["hAxis","vAxis"];this.zoom=null;this.zoomQueue=[];this.lastWindow={vscale:1,hscale:1,xoffset:0,yoffset:0};this.hAxis=f&&f.hAxis||"x";this.vAxis=f&&f.vAxis||"y";this.series=[];this.opt=F.clone(this.baseParams);b.updateWithObject(this.opt,
f)},clear:function(){this.inherited(arguments);this._vAxis=this._hAxis=null;return this},cleanGroup:function(e,f){this.inherited(arguments);if(!f&&this.chart._nativeClip){var d=this.chart.offsets,k=this.chart.dim;this.group.setClip({x:d.l,y:d.t,width:Math.max(0,k.width-d.l-d.r),height:Math.max(0,k.height-d.t-d.b)});this._clippedGroup||(this._clippedGroup=this.group.createGroup())}},purgeGroup:function(){this.inherited(arguments);this._clippedGroup=null},getGroup:function(){return this._clippedGroup||
this.group},setAxis:function(e){e&&(this[e.vertical?"_vAxis":"_hAxis"]=e);return this},toPage:function(e){var f=this._hAxis,d=this._vAxis,k=f.getScaler(),n=d.getScaler(),q=k.scaler.getTransformerFromModel(k),E=n.scaler.getTransformerFromModel(n),v=this.chart.getCoords(),r=this.chart.offsets,B=this.chart.dim;k=function(u){var y={};y.x=q(u[f.name])+v.x+r.l;y.y=v.y+B.height-r.b-E(u[d.name]);return y};return e?k(e):k},toData:function(e){var f=this._hAxis,d=this._vAxis,k=f.getScaler(),n=d.getScaler(),
q=k.scaler.getTransformerFromPlot(k),E=n.scaler.getTransformerFromPlot(n),v=this.chart.getCoords(),r=this.chart.offsets,B=this.chart.dim;k=function(u){var y={};y[f.name]=q(u.x-v.x-r.l);y[d.name]=E(v.y+B.height-u.y-r.b);return y};return e?k(e):k},isDirty:function(){return this.dirty||this._hAxis&&this._hAxis.dirty||this._vAxis&&this._vAxis.dirty},createLabel:function(e,f,d,k){if(this.opt.labels){var n=this.opt.labelFunc?this.opt.labelFunc.apply(this,[f,this.opt.fixed,this.opt.precision]):this._getLabel(isNaN(f.y)?
f:f.y);if("inside"==this.opt.labelStyle){var q=l._base._getTextBox(n,{font:k.series.font});f=d.x+d.width/2;var E=d.y+d.height/2+q.h/4;if(q.w>d.width||q.h>d.height)return}else f=d.x+d.width/2,E=d.y-this.opt.labelOffset;this.renderLabel(e,f,E,n,k,"inside"==this.opt.labelStyle)}},performZoom:function(e,f){var d=this._vAxis.scale||1,k=this._hAxis.scale||1;e=e.height-f.b;var n=this._hScaler.bounds;n=(n.from-n.lower)*n.scale;var q=this._vScaler.bounds;q=(q.from-q.lower)*q.scale;var E=d/this.lastWindow.vscale,
v=k/this.lastWindow.hscale,r=(this.lastWindow.xoffset-n)/(1==this.lastWindow.hscale?k:this.lastWindow.hscale),B=(q-this.lastWindow.yoffset)/(1==this.lastWindow.vscale?d:this.lastWindow.vscale),u=this.getGroup();f=g.animateTransform(F.delegate({shape:u,duration:1200,transform:[{name:"translate",start:[0,0],end:[f.l*(1-v),e*(1-E)]},{name:"scale",start:[1,1],end:[v,E]},{name:"original"},{name:"translate",start:[0,0],end:[r,B]}]},this.zoom));F.mixin(this.lastWindow,{vscale:d,hscale:k,xoffset:n,yoffset:q});
this.zoomQueue.push(f);m.connect(f,"onEnd",this,function(){this.zoom=null;this.zoomQueue.shift();0<this.zoomQueue.length&&this.zoomQueue[0].play()});1==this.zoomQueue.length&&this.zoomQueue[0].play();return this},initializeScalers:function(e,f){this._hAxis?(this._hAxis.initialized()||this._hAxis.calculate(f.hmin,f.hmax,e.width),this._hScaler=this._hAxis.getScaler()):this._hScaler=h.buildScaler(f.hmin,f.hmax,e.width);this._vAxis?(this._vAxis.initialized()||this._vAxis.calculate(f.vmin,f.vmax,e.height),
this._vScaler=this._vAxis.getScaler()):this._vScaler=h.buildScaler(f.vmin,f.vmax,e.height);return this},isNullValue:function(e){if(null===e||"undefined"==typeof e)return!0;var f=this._hAxis?this._hAxis.isNullValue:c,d=this._vAxis?this._vAxis.isNullValue:c;return"number"==typeof e?f(1)||d(e):f(isNaN(e.x)?1:e.x)||null===e.y||d(e.y)}})})},"dojox/charting/scaler/primitive":function(){define(["dojo/_base/lang"],function(F){var K=F.getObject("dojox.charting.scaler.primitive",!0);return F.mixin(K,{buildScaler:function(m,
z,w,h){m==z&&(m-=.5,z+=.5);return{bounds:{lower:m,upper:z,from:m,to:z,scale:w/(z-m),span:w},scaler:K}},buildTicks:function(m,z){return{major:[],minor:[],micro:[]}},getTransformerFromModel:function(m){var z=m.bounds.from,w=m.bounds.scale;return function(h){return(h-z)*w}},getTransformerFromPlot:function(m){var z=m.bounds.from,w=m.bounds.scale;return function(h){return h/w+z}}})})},"dojox/charting/axis2d/Default":function(){define("dojo/_base/lang dojo/_base/array dojo/sniff dojo/_base/declare dojo/_base/connect dojo/dom-geometry ./Invisible ../scaler/linear ./common dojox/gfx dojox/lang/utils dojox/lang/functional dojo/has!dojo-bidi?../bidi/axis2d/Default".split(" "),
function(F,K,m,z,w,h,l,g,b,c,e,f,d){l=z(m("dojo-bidi")?"dojox.charting.axis2d.NonBidiDefault":"dojox.charting.axis2d.Default",l,{defaultParams:{vertical:!1,fixUpper:"none",fixLower:"none",natural:!1,leftBottom:!0,includeZero:!1,fixed:!0,majorLabels:!0,minorTicks:!0,minorLabels:!0,microTicks:!1,rotation:0,htmlLabels:!0,enableCache:!1,dropLabels:!0,labelSizeChange:!1,position:"leftOrBottom"},optionalParams:{min:0,max:1,from:0,to:1,majorTickStep:4,minorTickStep:2,microTickStep:1,labels:[],labelFunc:null,
maxLabelSize:0,maxLabelCharCount:0,trailingSymbol:null,stroke:{},majorTick:{},minorTick:{},microTick:{},tick:{},font:"",fontColor:"",title:"",titleGap:0,titleFont:"",titleFontColor:"",titleOrientation:""},constructor:function(k,n){this.opt=F.clone(this.defaultParams);e.updateWithObject(this.opt,n);e.updateWithPattern(this.opt,n,this.optionalParams);this.opt.enableCache&&(this._textFreePool=[],this._lineFreePool=[],this._textUsePool=[],this._lineUsePool=[]);this._invalidMaxLabelSize=!0;n&&"position"in
n||(this.opt.position=this.opt.leftBottom?"leftOrBottom":"rightOrTop");this.renderingOptions={"shape-rendering":"crispEdges"}},setWindow:function(k,n){k!=this.scale&&(this._invalidMaxLabelSize=!0);return this.inherited(arguments)},_groupLabelWidth:function(k,n,q){if(!k.length)return 0;50<k.length&&(k.length=50);F.isObject(k[0])&&(k=f.map(k,function(E){return E.text}));q&&(k=f.map(k,function(E){return 0==F.trim(E).length?"":E.substring(0,q)+this.trailingSymbol},this));k=k.join("\x3cbr\x3e");return c._base._getTextBox(k,
{font:n}).w||0},_getMaxLabelSize:function(k,n,q,E,v,r){if(null==this._maxLabelSize&&6==arguments.length){var B=this.opt;this.scaler.minMinorStep=this._prevMinMinorStep=0;var u=F.clone(B);delete u.to;delete u.from;var y=g.buildScaler(k,n,q,u,B.to-B.from);y.minMinorStep=0;this._majorStart=y.major.start;B=g.buildTicks(y,B);if(r&&B){var G=y=0,I=function(M){M.label&&this.push(M.label)},L=[];this.opt.majorLabels&&(K.forEach(B.major,I,L),y=this._groupLabelWidth(L,v,u.maxLabelCharCount),u.maxLabelSize&&(y=
Math.min(u.maxLabelSize,y)));L=[];this.opt.dropLabels&&this.opt.minorLabels&&(K.forEach(B.minor,I,L),G=this._groupLabelWidth(L,v,u.maxLabelCharCount),u.maxLabelSize&&(G=Math.min(u.maxLabelSize,G)));this._maxLabelSize={majLabelW:y,minLabelW:G,majLabelH:r,minLabelH:r}}else this._maxLabelSize=null}return this._maxLabelSize},calculate:function(k,n,q){this.inherited(arguments);this.scaler.minMinorStep=this._prevMinMinorStep;if((this._invalidMaxLabelSize||q!=this._oldSpan)&&Infinity!=k&&-Infinity!=n){this._invalidMaxLabelSize=
!1;this.opt.labelSizeChange&&(this._maxLabelSize=null);this._oldSpan=q;var E=this.opt,v=this.chart.theme.axis,r=E.rotation%360,B=this.chart.theme.axis.tick.labelGap,u=E.font||v.majorTick&&v.majorTick.font||v.tick&&v.tick.font;v=u?c.normalizedLength(c.splitFontString(u).size):0;u=this._getMaxLabelSize(k,n,q,r,u,v);"number"!=typeof B&&(B=4);if(u&&E.dropLabels){E=Math.abs(Math.cos(r*Math.PI/180));var y=Math.abs(Math.sin(r*Math.PI/180));0>r&&(r+=360);switch(r){case 0:case 180:this.vertical?r=v:(r=u.majLabelW,
v=u.minLabelW);break;case 90:case 270:this.vertical?(r=u.majLabelW,v=u.minLabelW):r=v;break;default:r=this.vertical?Math.min(u.majLabelW,v/E):Math.min(u.majLabelW,v/y),v=Math.min(Math.sqrt(u.minLabelW*u.minLabelW+v*v),this.vertical?v*E+u.minLabelW*y:u.minLabelW*E+v*y)}this.scaler.minMinorStep=this._prevMinMinorStep=Math.max(r,v)+B;this._skipInterval=this.scaler.minMinorStep<=this.scaler.minor.tick*this.scaler.bounds.scale?0:Math.floor((r+B)/(this.scaler.major.tick*this.scaler.bounds.scale))}else this._skipInterval=
0}this.ticks=g.buildTicks(this.scaler,this.opt);return this},getOffsets:function(){var k={l:0,r:0,t:0,b:0};if(!this.scaler)return k;var n=this.opt,q=this.chart.theme.axis,E=this.chart.theme.axis.tick.labelGap,v=n.titleFont||q.title&&q.title.font;q=0==n.titleGap?0:n.titleGap||q.title&&q.title.gap;var r=this.chart.theme.getTick("major",n),B=this.chart.theme.getTick("minor",n);v=v?c.normalizedLength(c.splitFontString(v).size):0;var u=n.rotation%360,y=n.position,G="rightOrTop"!==y,I=Math.abs(Math.cos(u*
Math.PI/180)),L=Math.abs(Math.sin(u*Math.PI/180));this.trailingSymbol=void 0===n.trailingSymbol||null===n.trailingSymbol?this.trailingSymbol:n.trailingSymbol;"number"!=typeof E&&(E=4);0>u&&(u+=360);var M=this._getMaxLabelSize();if(M){var S=Math.ceil(Math.max(M.majLabelW,M.minLabelW))+1,X=Math.ceil(Math.max(M.majLabelH,M.minLabelH))+1;if(this.vertical)switch(M=G?"l":"r",u){case 0:case 180:k[M]="center"===y?0:S;k.t=k.b=X/2;break;case 90:case 270:k[M]=X;k.t=k.b=S/2;break;default:45>=u||180<u&&225>=u?
(k[M]=X*L/2+S*I,k[G?"t":"b"]=X*I/2+S*L,k[G?"b":"t"]=X*I/2):315<u||180>u&&135<u?(k[M]=X*L/2+S*I,k[G?"b":"t"]=X*I/2+S*L,k[G?"t":"b"]=X*I/2):90>u||180<u&&270>u?(k[M]=X*L+S*I,k[G?"t":"b"]=X*I+S*L):(k[M]=X*L+S*I,k[G?"b":"t"]=X*I+S*L)}else switch(M=G?"b":"t",u){case 0:case 180:k[M]="center"===y?0:X;k.l=k.r=S/2;break;case 90:case 270:k[M]=S;k.l=k.r=X/2;break;default:45<=u&&90>=u||225<=u&&270>=u?(k[M]=X*I/2+S*L,k[G?"r":"l"]=X*L/2+S*I,k[G?"l":"r"]=X*L/2):90<=u&&135>=u||270<=u&&315>=u?(k[M]=X*I/2+S*L,k[G?"l":
"r"]=X*L/2+S*I,k[G?"r":"l"]=X*L/2):45>u||180<u&&225>u?(k[M]=X*I+S*L,k[G?"r":"l"]=X*L+S*I):(k[M]=X*I+S*L,k[G?"l":"r"]=X*L+S*I)}k[M]="center"===y?0:k[M]+(E+Math.max(0<r.length?r.length:0,0<B.length?B.length:0)+(n.title?v+q:0))}return k},cleanGroup:function(k){this.opt.enableCache&&this.group&&(this._lineFreePool=this._lineFreePool.concat(this._lineUsePool),this._lineUsePool=[],this._textFreePool=this._textFreePool.concat(this._textUsePool),this._textUsePool=[]);this.inherited(arguments)},createText:function(k,
n,q,E,v,r,B,u,y){if(!this.opt.enableCache||"html"==k)return b.createText[k](this.chart,n,q,E,v,r,B,u,y);0<this._textFreePool.length?(k=this._textFreePool.pop(),k.setShape({x:q,y:E,text:r,align:v}),n.add(k)):k=b.createText[k](this.chart,n,q,E,v,r,B,u);this._textUsePool.push(k);return k},createLine:function(k,n){if(this.opt.enableCache&&0<this._lineFreePool.length){var q=this._lineFreePool.pop();q.setShape(n);k.add(q)}else q=k.createLine(n);this.opt.enableCache&&this._lineUsePool.push(q);return q},
render:function(k,n){var q,E=this._isRtl();if(!this.dirty||!this.scaler)return this;var v=this.opt;var r=this.chart.theme.axis;var B=v.position,u="rightOrTop"!==B,y=v.rotation%360,G=0;G=this.chart.theme.axis.tick.labelGap;var I=v.font||r.majorTick&&r.majorTick.font||r.tick&&r.tick.font,L=v.titleFont||r.title&&r.title.font,M=v.fontColor||r.majorTick&&r.majorTick.fontColor||r.tick&&r.tick.fontColor||"black",S=v.titleFontColor||r.title&&r.title.fontColor||"black";var X=0==v.titleGap?0:v.titleGap||r.title&&
r.title.gap||15;var C=v.titleOrientation||r.title&&r.title.orientation||"axis",H=this.chart.theme.getTick("major",v),O=this.chart.theme.getTick("minor",v),R=this.chart.theme.getTick("micro",v),P="stroke"in v?v.stroke:r.stroke,N=I?c.normalizedLength(c.splitFontString(I).size):0;var Z=Math.abs(Math.cos(y*Math.PI/180));var W=Math.abs(Math.sin(y*Math.PI/180));var da=L?c.normalizedLength(c.splitFontString(L).size):0;"number"!=typeof G&&(G=4);0>y&&(y+=360);var ia=this._getMaxLabelSize();ia=ia&&ia.majLabelW;
if(this.vertical){var ma=k.height-n.b;var ca=void 0;var ba=n.t;var fa=void 0;r=(k.height-n.b+n.t)/2;var na=void 0;W=N*W+(ia||0)*Z+G+Math.max(0<H.length?H.length:0,0<O.length?O.length:0)+da+X;var oa=0;var x=-1;var a=q=0;X=1;Z=0;var p=G;var A=0;switch(y){case 0:var t="end";a=.4*N;break;case 90:t="middle";q=-N;break;case 180:t="start";a=.4*-N;break;case 270:t="middle";break;default:45>y?(t="end",a=.4*N):90>y?(t="end",a=.4*N):135>y?t="start":225>y?(t="start",a=.4*-N):270>y?(t="start",q=u?0:.4*N):315>
y?(t="end",q=u?0:.4*N):(t="end",a=.4*N)}if(u)ca=fa="center"===B?k.width/2:n.l,G=C&&"away"==C?90:270,na=n.l-W+(270==G?da:0),X=-1,p=-p;else switch(ca=fa=k.width-n.r,G=C&&"axis"==C?90:270,na=k.width-n.r+W-(270==G?0:da),t){case "start":t="end";break;case "end":t="start";break;case "middle":q+=N}}else{ca=n.l;ma=void 0;fa=k.width-n.r;ba=void 0;na=(k.width-n.r+n.l)/2;r=void 0;W=N*Z+(ia||0)*W+G+Math.max(0<H.length?H.length:0,0<O.length?O.length:0)+da+X;oa=E?-1:1;X=a=q=x=0;Z=1;p=0;A=G;switch(y){case 0:t="middle";
a=N;break;case 90:t="start";q=.4*-N;break;case 180:t="middle";break;case 270:t="end";q=.4*N;break;default:45>y?(t="start",a=u?N:0):135>y?(t="start",q=.4*-N):180>y?(t="start",a=u?0:-N):225>y?(t="end",a=u?0:-N):315>y?(t="end",a=u?.4*N:0):(t="end",a=u?N:0)}if(u)ma=ba="center"===B?k.height/2:k.height-n.b,G=C&&"axis"==C?180:0,r=k.height-n.b+W-(G?da:0);else switch(ma=ba=n.t,G=C&&"away"==C?180:0,r=n.t-W+(G?0:da),Z=-1,A=-A,t){case "start":t="end";break;case "end":t="start";break;case "middle":a-=N}}this.cleanGroup();
var D=this.group;k=this.scaler;n=this.ticks;var J=g.getTransformerFromModel(this.scaler),Q=v.title&&G||y||!this.opt.htmlLabels||m("ie")||m("opera")?"gfx":"html",U=X*H.length,T=Z*H.length,Y=this._skipInterval;D.createLine({x1:ca,y1:ma,x2:fa,y2:ba}).setStroke(P);v.title&&(L=b.createText[Q](this.chart,D,na,r,"middle",v.title,L,S),"html"==Q?this.htmlElements.push(L):L.setTransform(c.matrix.rotategAt(G,na,r)));if(null==n)return this.dirty=!1,this;var V=0<n.major.length?(n.major[0].value-this._majorStart)/
k.major.tick:0,aa=this.opt.majorLabels;K.forEach(n.major,function(ja,ea){var ha=J(ja.value),la=(E?fa:ca)+oa*ha;ha=ma+x*ha;ea+=V;this.createLine(D,{x1:la,y1:ha,x2:la+U,y2:ha+T}).setStroke(H);if(ja.label&&(!Y||0==(ea-(1+Y))%(1+Y))){var ka=v.maxLabelCharCount?this.getTextWithLimitCharCount(ja.label,I,v.maxLabelCharCount):{text:ja.label,truncated:!1};ka=v.maxLabelSize?this.getTextWithLimitLength(ka.text,I,v.maxLabelSize,ka.truncated):ka;ea=this.createText(Q,D,la+(0<H.length?U:0)+p+(y?0:q),ha+(0<H.length?
T:0)+A+(y?0:a),t,ka.text,I,M);ka.truncated&&this.chart.formatTruncatedLabel(ea,ja.label,Q);ka.truncated&&this.labelTooltip(ea,this.chart,ja.label,ka.text,I,Q);"html"==Q?this.htmlElements.push(ea):y&&ea.setTransform([{dx:q,dy:a},c.matrix.rotategAt(y,la+(0<H.length?U:0)+p,ha+(0<H.length?T:0)+A)])}},this);U=X*O.length;T=Z*O.length;aa=this.opt.minorLabels&&k.minMinorStep<=k.minor.tick*k.bounds.scale;K.forEach(n.minor,function(ja){var ea=J(ja.value),ha=(E?fa:ca)+oa*ea,la=ma+x*ea;this.createLine(D,{x1:ha,
y1:la,x2:ha+U,y2:la+T}).setStroke(O);if(aa&&ja.label){var ka=v.maxLabelCharCount?this.getTextWithLimitCharCount(ja.label,I,v.maxLabelCharCount):{text:ja.label,truncated:!1};ka=v.maxLabelSize?this.getTextWithLimitLength(ka.text,I,v.maxLabelSize,ka.truncated):ka;ea=this.createText(Q,D,ha+(0<O.length?U:0)+p+(y?0:q),la+(0<O.length?T:0)+A+(y?0:a),t,ka.text,I,M);ka.truncated&&this.chart.formatTruncatedLabel(ea,ja.label,Q);ka.truncated&&this.labelTooltip(ea,this.chart,ja.label,ka.text,I,Q);"html"==Q?this.htmlElements.push(ea):
y&&ea.setTransform([{dx:q,dy:a},c.matrix.rotategAt(y,ha+(0<O.length?U:0)+p,la+(0<O.length?T:0)+A)])}},this);U=X*R.length;T=Z*R.length;K.forEach(n.micro,function(ja){var ea=J(ja.value);ja=ca+oa*ea;ea=ma+x*ea;this.createLine(D,{x1:ja,y1:ea,x2:ja+U,y2:ea+T}).setStroke(R)},this);this.dirty=!1;return this},labelTooltip:function(k,n,q,E,v,r){var B=["dijit/Tooltip"],u={type:"rect"},y=["above","below"];E=c._base._getTextBox(E,{font:v}).w||0;v=v?c.normalizedLength(c.splitFontString(v).size):0;"html"==r?(F.mixin(u,
h.position(k.firstChild,!0)),u.width=Math.ceil(E),u.height=Math.ceil(v),this._events.push({shape:dojo,handle:w.connect(k.firstChild,"onmouseover",this,function(G){require(B,function(I){I.show(q,u,y)})})}),this._events.push({shape:dojo,handle:w.connect(k.firstChild,"onmouseout",this,function(G){require(B,function(I){I.hide(u)})})})):(r=k.getShape(),n=n.getCoords(),u=F.mixin(u,{x:r.x-E/2,y:r.y}),u.x+=n.x,u.y+=n.y,u.x=Math.round(u.x),u.y=Math.round(u.y),u.width=Math.ceil(E),u.height=Math.ceil(v),this._events.push({shape:k,
handle:k.connect("onmouseenter",this,function(G){require(B,function(I){I.show(q,u,y)})})}),this._events.push({shape:k,handle:k.connect("onmouseleave",this,function(G){require(B,function(I){I.hide(u)})})}))},_isRtl:function(){return!1}});return m("dojo-bidi")?z("dojox.charting.axis2d.Default",[l,d]):l})},"dojox/charting/axis2d/Invisible":function(){define(["dojo/_base/lang","dojo/_base/declare","./Base","../scaler/linear","dojox/lang/utils"],function(F,K,m,z,w){return K("dojox.charting.axis2d.Invisible",
m,{defaultParams:{vertical:!1,fixUpper:"none",fixLower:"none",natural:!1,leftBottom:!0,includeZero:!1,fixed:!0},optionalParams:{min:0,max:1,from:0,to:1,majorTickStep:4,minorTickStep:2,microTickStep:1},constructor:function(h,l){this.opt=F.clone(this.defaultParams);w.updateWithObject(this.opt,l);w.updateWithPattern(this.opt,l,this.optionalParams)},dependOnData:function(){return!("min"in this.opt)||!("max"in this.opt)},clear:function(){delete this.scaler;delete this.ticks;this.dirty=!0;return this},
initialized:function(){return"scaler"in this&&!(this.dirty&&this.dependOnData())},setWindow:function(h,l){this.scale=h;this.offset=l;return this.clear()},getWindowScale:function(){return"scale"in this?this.scale:1},getWindowOffset:function(){return"offset"in this?this.offset:0},calculate:function(h,l,g,b){if(this.initialized())return this;var c=this.opt;this.labels=c.labels;this.scaler=(b||z).buildScaler(h,l,g,c);var e=this.scaler.bounds;"scale"in this&&(c.from=e.lower+this.offset,c.to=(e.upper-e.lower)/
this.scale+c.from,!isFinite(c.from)||isNaN(c.from)||!isFinite(c.to)||isNaN(c.to)||c.to-c.from>=e.upper-e.lower?(delete c.from,delete c.to,delete this.scale,delete this.offset):(c.from<e.lower?(c.to+=e.lower-c.from,c.from=e.lower):c.to>e.upper&&(c.from+=e.upper-c.to,c.to=e.upper),this.offset=c.from-e.lower),this.scaler=(b||z).buildScaler(h,l,g,c),e=this.scaler.bounds,1==this.scale&&0==this.offset&&(delete this.scale,delete this.offset));return this},getScaler:function(){return this.scaler},getTicks:function(){return this.ticks}})})},
"dojox/charting/axis2d/Base":function(){define(["dojo/_base/declare","../Element"],function(F,K){return F("dojox.charting.axis2d.Base",K,{constructor:function(m,z){this.vertical=z&&z.vertical;this.opt={};this.opt.min=z&&z.min;this.opt.max=z&&z.max},clear:function(){return this},initialized:function(){return!1},calculate:function(m,z,w){return this},getScaler:function(){return null},getTicks:function(){return null},getOffsets:function(){return{l:0,r:0,t:0,b:0}},render:function(m,z){this.dirty=!1;return this},
isNullValue:function(m){return!1},naturalBaseline:0})})},"dojox/charting/scaler/linear":function(){define(["dojo/_base/lang","./common"],function(F,K){function m(l,g){l=l.toLowerCase();for(var b=g.length-1;0<=b;--b)if(l===g[b])return!0;return!1}var z=F.getObject("dojox.charting.scaler.linear",!0),w=K.getNumericLabel,h=function(l,g,b,c,e,f,d){b=F.delegate(b);c||("major"==b.fixUpper&&(b.fixUpper="minor"),"major"==b.fixLower&&(b.fixLower="minor"));e||("minor"==b.fixUpper&&(b.fixUpper="micro"),"minor"==
b.fixLower&&(b.fixLower="micro"));f||("micro"==b.fixUpper&&(b.fixUpper="none"),"micro"==b.fixLower&&(b.fixLower="none"));var k=m(b.fixLower,["major"])?Math.floor(b.min/c)*c:m(b.fixLower,["minor"])?Math.floor(b.min/e)*e:m(b.fixLower,["micro"])?Math.floor(b.min/f)*f:b.min,n=m(b.fixUpper,["major"])?Math.ceil(b.max/c)*c:m(b.fixUpper,["minor"])?Math.ceil(b.max/e)*e:m(b.fixUpper,["micro"])?Math.ceil(b.max/f)*f:b.max;b.useMin&&(l=k);b.useMax&&(g=n);var q=!c||b.useMin&&m(b.fixLower,["major"])?l:Math.ceil(l/
c)*c,E=!e||b.useMin&&m(b.fixLower,["major","minor"])?l:Math.ceil(l/e)*e,v=!f||b.useMin&&m(b.fixLower,["major","minor","micro"])?l:Math.ceil(l/f)*f,r=c?(b.useMax&&m(b.fixUpper,["major"])?Math.round((g-q)/c):Math.floor((g-q)/c))+1:0,B=e?(b.useMax&&m(b.fixUpper,["major","minor"])?Math.round((g-E)/e):Math.floor((g-E)/e))+1:0;b=f?(b.useMax&&m(b.fixUpper,["major","minor","micro"])?Math.round((g-v)/f):Math.floor((g-v)/f))+1:0;var u=e?Math.round(c/e):0,y=f?Math.round(e/f):0,G=c?Math.floor(Math.log(c)/Math.LN10):
0,I=e?Math.floor(Math.log(e)/Math.LN10):0,L=d/(g-l);isFinite(L)||(L=1);return{bounds:{lower:k,upper:n,from:l,to:g,scale:L,span:d},major:{tick:c,start:q,count:r,prec:G},minor:{tick:e,start:E,count:B,prec:I},micro:{tick:f,start:v,count:b,prec:0},minorPerMajor:u,microPerMinor:y,scaler:z}};return F.mixin(z,{buildScaler:function(l,g,b,c,e,f){var d={fixUpper:"none",fixLower:"none",natural:!1};c&&("fixUpper"in c&&(d.fixUpper=String(c.fixUpper)),"fixLower"in c&&(d.fixLower=String(c.fixLower)),"natural"in
c&&(d.natural=!!c.natural));f=!f||3>f?3:f;"min"in c&&(l=c.min);"max"in c&&(g=c.max);c.includeZero&&(0<l&&(l=0),0>g&&(g=0));d.min=l;d.useMin=!0;d.max=g;d.useMax=!0;"from"in c&&(l=c.from,d.useMin=!1);"to"in c&&(g=c.to,d.useMax=!1);if(g<=l)return h(l,g,d,0,0,0,b);e||(e=g-l);e=Math.floor(Math.log(e)/Math.LN10);e=c&&"majorTickStep"in c?c.majorTickStep:Math.pow(10,e);var k=0,n=0;if(c&&"minorTickStep"in c)k=c.minorTickStep;else{do{k=e/10;if(!d.natural||.9<k){var q=h(l,g,d,e,k,0,b);if(q.bounds.scale*q.minor.tick>
f)break}k=e/5;if(!d.natural||.9<k)if(q=h(l,g,d,e,k,0,b),q.bounds.scale*q.minor.tick>f)break;k=e/2;if(!d.natural||.9<k)if(q=h(l,g,d,e,k,0,b),q.bounds.scale*q.minor.tick>f)break;return h(l,g,d,e,0,0,b)}while(0)}if(c&&"microTickStep"in c)n=c.microTickStep,q=h(l,g,d,e,k,n,b);else{do{n=k/10;if(!d.natural||.9<n)if(q=h(l,g,d,e,k,n,b),3<q.bounds.scale*q.micro.tick)break;n=k/5;if(!d.natural||.9<n)if(q=h(l,g,d,e,k,n,b),3<q.bounds.scale*q.micro.tick)break;n=k/2;if(!d.natural||.9<n)if(q=h(l,g,d,e,k,n,b),3<q.bounds.scale*
q.micro.tick)break;n=0}while(0)}return n?q:h(l,g,d,e,k,0,b)},buildTicks:function(l,g){var b=l.major.start,c=l.minor.start,e=l.micro.start;if(g.microTicks&&l.micro.tick){var f=l.micro.tick;var d=e}else if(g.minorTicks&&l.minor.tick)f=l.minor.tick,d=c;else if(l.major.tick)f=l.major.tick,d=b;else return null;var k=1/l.bounds.scale;if(l.bounds.to<=l.bounds.from||isNaN(k)||!isFinite(k)||0>=f||isNaN(f)||!isFinite(f))return null;for(var n=[],q=[],E=[];d<=l.bounds.to+k;){if(Math.abs(b-d)<f/2){var v={value:b};
g.majorLabels&&(v.label=w(b,l.major.prec,g));n.push(v);b+=l.major.tick;c+=l.minor.tick}else Math.abs(c-d)<f/2?(g.minorTicks&&(v={value:c},g.minorLabels&&l.minMinorStep<=l.minor.tick*l.bounds.scale&&(v.label=w(c,l.minor.prec,g)),q.push(v)),c+=l.minor.tick):g.microTicks&&E.push({value:e});e+=l.micro.tick;d+=f}return{major:n,minor:q,micro:E}},getTransformerFromModel:function(l){var g=l.bounds.from,b=l.bounds.scale;return function(c){return(c-g)*b}},getTransformerFromPlot:function(l){var g=l.bounds.from,
b=l.bounds.scale;return function(c){return c/b+g}}})})},"dojox/charting/plot2d/Lines":function(){define(["dojo/_base/declare","./Default"],function(F,K){return F("dojox.charting.plot2d.Lines",K,{constructor:function(){this.opt.lines=!0}})})},"dojox/charting/plot2d/Default":function(){define("dojo/_base/lang dojo/_base/declare dojo/_base/array dojo/has ./CartesianBase ./_PlotEvents ./common dojox/lang/functional dojox/lang/utils dojox/gfx/fx".split(" "),function(F,K,m,z,w,h,l,g,b,c){return K("dojox.charting.plot2d.Default",
[w,h],{defaultParams:{lines:!0,areas:!1,markers:!1,tension:"",animate:!1,enableCache:!1,interpolate:!1},optionalParams:{stroke:{},outline:{},shadow:{},fill:{},filter:{},styleFunc:null,font:"",fontColor:"",marker:"",markerStroke:{},markerOutline:{},markerShadow:{},markerFill:{},markerFont:"",markerFontColor:"",zeroLine:0},constructor:function(e,f){this.opt=F.clone(F.mixin(this.opt,this.defaultParams));b.updateWithObject(this.opt,f);b.updateWithPattern(this.opt,f,this.optionalParams);this.animate=this.opt.animate},
createPath:function(e,f,d){if(this.opt.enableCache&&0<e._pathFreePool.length){var k=e._pathFreePool.pop();k.setShape(d);f.add(k)}else k=f.createPath(d);this.opt.enableCache&&e._pathUsePool.push(k);return k},buildSegments:function(e,f){e=this.series[e];for(var d=f?Math.min(e.data.length,Math.ceil(this._hScaler.bounds.to)):e.data.length,k=null,n=[],q=f?Math.max(0,Math.floor(this._hScaler.bounds.from-1)):0;q<d;q++)if(!this.isNullValue(e.data[q]))k||(k=[],n.push({index:q,rseg:k})),k.push(f&&e.data[q].hasOwnProperty("y")?
e.data[q].y:e.data[q]);else if(!this.opt.interpolate||f)k=null;return n},render:function(e,f){if(this.zoom&&!this.isDataDirty())return this.performZoom(e,f);this.resetEvents();this.dirty=this.isDirty();if(this.dirty){m.forEach(this.series,l.purgeGroup);this._eventSeries={};this.cleanGroup();this.getGroup().setTransform(null);var d=this.getGroup();g.forEachRev(this.series,function(ba){ba.cleanGroup(d)})}for(var k=this.chart.theme,n,q,E=this.events(),v=0;v<this.series.length;v++){var r=this.series[v];
if(this.dirty||r.dirty)if(r.cleanGroup(),this.opt.enableCache&&(r._pathFreePool=(r._pathFreePool?r._pathFreePool:[]).concat(r._pathUsePool?r._pathUsePool:[]),r._pathUsePool=[]),r.data.length){var B=k.next(this.opt.areas?"area":"line",[this.opt,r],!0),u=this._hScaler.scaler.getTransformerFromModel(this._hScaler),y=this._vScaler.scaler.getTransformerFromModel(this._vScaler),G=this._eventSeries[r.name]=Array(r.data.length);d=r.group;if(r.hidden){this.opt.lines&&(r.dyn.stroke=B.series.stroke);if(r.markers||
void 0===r.markers&&this.opt.markers)r.dyn.markerFill=B.marker.fill,r.dyn.markerStroke=B.marker.stroke,r.dyn.marker=B.symbol;this.opt.areas&&(r.dyn.fill=B.series.fill)}else{for(var I=m.some(r.data,function(ba){return"number"==typeof ba||ba&&!ba.hasOwnProperty("x")}),L=this.buildSegments(v,I),M=0;M<L.length;M++){var S=L[M];var X=I?m.map(S.rseg,function(ba,fa){return{x:u(fa+S.index+1)+f.l,y:e.height-f.b-y(ba),data:ba}},this):m.map(S.rseg,function(ba){return{x:u(ba.x)+f.l,y:e.height-f.b-y(ba.y),data:ba}},
this);if(I&&this.opt.interpolate)for(;M<L.length;)M++,(S=L[M])&&(X=X.concat(m.map(S.rseg,function(ba,fa){return{x:u(fa+S.index+1)+f.l,y:e.height-f.b-y(ba),data:ba}},this)));var C=this.opt.tension?l.curve(X,this.opt.tension):"";if(this.opt.areas&&1<X.length){var H=this._plotFill(B.series.fill,e,f),O=F.clone(X),R=e.height-f.b;isNaN(this.opt.zeroLine)||(R=Math.max(f.t,Math.min(e.height-f.b-y(this.opt.zeroLine),R)));this.opt.tension?r.dyn.fill=d.createPath(C+" L"+(O[O.length-1].x+","+R+" L"+O[0].x+","+
R+" L"+O[0].x+","+O[0].y)).setFill(H).getFill():(O.push({x:X[X.length-1].x,y:R}),O.push({x:X[0].x,y:R}),O.push(X[0]),r.dyn.fill=d.createPolyline(O).setFill(H).getFill())}if(this.opt.lines||this.opt.markers)n=B.series.stroke,B.series.outline&&(q=r.dyn.outline=l.makeStroke(B.series.outline),q.width=2*q.width+(n&&n.width||0));this.opt.markers&&(r.dyn.marker=B.symbol);var P=null,N=null,Z=null;if(n&&B.series.shadow&&1<X.length){var W=B.series.shadow;H=m.map(X,function(ba){return{x:ba.x+W.dx,y:ba.y+W.dy}});
this.opt.lines&&(r.dyn.shadow=this.opt.tension?d.createPath(l.curve(H,this.opt.tension)).setStroke(W).getStroke():d.createPolyline(H).setStroke(W).getStroke());this.opt.markers&&B.marker.shadow&&(W=B.marker.shadow,Z=m.map(H,function(ba){return this.createPath(r,d,"M"+ba.x+" "+ba.y+" "+B.symbol).setStroke(W).setFill(W.color)},this))}if(this.opt.lines&&1<X.length){var da;q&&(r.dyn.outline=this.opt.tension?d.createPath(C).setStroke(q).getStroke():d.createPolyline(X).setStroke(q).getStroke());r.dyn.stroke=
this.opt.tension?(da=d.createPath(C)).setStroke(n).getStroke():(da=d.createPolyline(X)).setStroke(n).getStroke();da.setFilter&&B.series.filter&&da.setFilter(B.series.filter)}C=null;if(this.opt.markers){var ia=B;P=Array(X.length);N=Array(X.length);q=null;ia.marker.outline&&(q=l.makeStroke(ia.marker.outline),q.width=2*q.width+(ia.marker.stroke?ia.marker.stroke.width:0));m.forEach(X,function(ba,fa){if(this.opt.styleFunc||"number"!=typeof ba.data){var na="number"!=typeof ba.data?[ba.data]:[];this.opt.styleFunc&&
na.push(this.opt.styleFunc(ba.data));ia=k.addMixin(B,"marker",na,!0)}else ia=k.post(B,"marker");ba="M"+ba.x+" "+ba.y+" "+ia.symbol;q&&(N[fa]=this.createPath(r,d,ba).setStroke(q));P[fa]=this.createPath(r,d,ba).setStroke(ia.marker.stroke).setFill(ia.marker.fill)},this);r.dyn.markerFill=ia.marker.fill;r.dyn.markerStroke=ia.marker.stroke;!C&&this.opt.labels&&(C=P[0].getBoundingBox());E?m.forEach(P,function(ba,fa){ba={element:"marker",index:fa+S.index,run:r,shape:ba,outline:N[fa]||null,shadow:Z&&Z[fa]||
null,cx:X[fa].x,cy:X[fa].y};I?(ba.x=fa+S.index+1,ba.y=r.data[fa+S.index]):(ba.x=S.rseg[fa].x,ba.y=r.data[fa+S.index].y);this._connectEvents(ba);G[fa+S.index]=ba},this):delete this._eventSeries[r.name]}if(this.opt.labels){var ma=C?C.width:2,ca=C?C.height:2;m.forEach(X,function(ba,fa){if(this.opt.styleFunc||"number"!=typeof ba.data){var na="number"!=typeof ba.data?[ba.data]:[];this.opt.styleFunc&&na.push(this.opt.styleFunc(ba.data));ia=k.addMixin(B,"marker",na,!0)}else ia=k.post(B,"marker");this.createLabel(d,
S.rseg[fa],{x:ba.x-ma/2,y:ba.y-ca/2,width:ma,height:ca},ia)},this)}}r.dirty=!1}}else r.dirty=!1,k.skip();else k.skip(),this._reconnectEvents(r.name)}z("dojo-bidi")&&this._checkOrientation(this.group,e,f);this.animate&&(n=this.getGroup(),c.animateTransform(F.delegate({shape:n,duration:1200,transform:[{name:"translate",start:[0,e.height-f.b],end:[0,0]},{name:"scale",start:[1,0],end:[1,1]},{name:"original"}]},this.animate)).play());this.dirty=!1;return this}})})},"widgets/RelatedTableCharts/_build-generate_module":function(){define(["dojo/text!./Widget.html",
"dojo/text!./css/style.css","dojo/i18n!./nls/strings"],function(){})},"url:esri/dijit/Search/templates/Search.html":'\x3cdiv role\x3d"presentation" class\x3d"${theme}"\x3e\r\n  \x3cdiv role\x3d"presentation" class\x3d"${css.searchGroup}" data-dojo-attach-point\x3d"containerNode"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"expandNode" class\x3d"${css.searchExpandContainer}"\x3e\r\n      \x3cdiv class\x3d"${css.searchAnimateContainer}"\x3e\r\n        \x3cdiv role\x3d"button" title\x3d"${_i18n.widgets.Search.main.searchIn}" id\x3d"${id}_menu_button" class\x3d"${css.searchBtn} ${css.searchToggle}" tabindex\x3d"0" data-dojo-attach-point\x3d"sourcesBtnNode"\x3e\r\n          \x3cspan aria-hidden\x3d"true" role\x3d"presentation" class\x3d"${css.searchToggleIcon}"\x3e\x3c/span\x3e\x3cspan class\x3d"${css.searchSourceName}" data-dojo-attach-point\x3d"sourceNameNode"\x3e\x3c/span\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv class\x3d"${css.searchInputGroup}"\x3e\r\n          \x3cform data-dojo-attach-point\x3d"formNode"\x3e\r\n            \x3cinput maxlength\x3d"${maxLength}" autocomplete\x3d"off" type\x3d"text" tabindex\x3d"0" class\x3d"${css.searchInput}" value\x3d"${value}" aria-haspopup\x3d"true" id\x3d"${id}_input" data-dojo-attach-point\x3d"inputNode" role\x3d"textbox"\x3e\r\n          \x3c/form\x3e\r\n          \x3cdiv role\x3d"button" class\x3d"${css.searchClear}" tabindex\x3d"0" data-dojo-attach-point\x3d"clearNode"\x3e\x3cspan aria-hidden\x3d"true" class\x3d"${css.searchClearIcon}"\x3e\x3c/span\x3e\x3cspan aria-hidden\x3d"true" class\x3d"${css.searchSpinner}"\x3e\x3c/span\x3e\r\n          \x3c/div\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"suggestionsNode" class\x3d"${css.searchMenu} ${css.suggestionsMenu}"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv role\x3d"button" title\x3d"${_i18n.widgets.Search.main.searchButtonTitle}" class\x3d"${css.searchBtn} ${css.searchSubmit}" tabindex\x3d"0" data-dojo-attach-point\x3d"submitNode"\x3e\r\n      \x3cspan aria-hidden\x3d"true" role\x3d"presentation" class\x3d"${css.searchIcon}"\x3e\x3c/span\x3e\r\n      \x3cspan class\x3d"${css.searchButtonText}"\x3e${_i18n.widgets.Search.main.searchButtonTitle}\x3c/span\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"sourcesNode" class\x3d"${css.searchMenu} ${css.sourcesMenu}"\x3e\x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"noResultsMenuNode" class\x3d"${css.searchMenu} ${css.searchNoResultsMenu}"\x3e\x3c/div\x3e\r\n    \x3cdiv class\x3d"${css.searchClearFloat}"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/RelatedTableCharts/ChartLayout.html":'\x3cdiv\x3e\r\n    \x3cdiv class\x3d"esriCTLayoutContent" tabindex\x3d"0" aria-labelledby\x3d"${id}title ${id}description"\x3e\r\n        \x3cdiv class\x3d"esriCTLabels"\x3e\r\n            \x3c!-- chart title --\x3e\r\n            \x3cdiv class\x3d"esriCTLayoutHeaderTitle" data-dojo-attach-point\x3d"layoutHeaderTitle" id\x3d"${id}title"\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv class\x3d"esriCTChartContainer" data-dojo-attach-point\x3d"chartContainer"\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv class\x3d"esriCTLegendContainer" data-dojo-attach-point\x3d"legendContainer"\x3e\r\n            \x3cdiv class\x3d"esriCTLegendNode" data-dojo-attach-point\x3d"legendNode"\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c!-- chart description --\x3e\r\n        \x3cdiv class\x3d"esriCTChartDescription" data-dojo-attach-point\x3d"chartDescription" id\x3d"${id}description"\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/RelatedTableCharts/Widget.html":'\x3cdiv class\x3d"esriCTMainContainer esriCTFullHeight" data-dojo-attach-point\x3d"mainNode"\x3e\r\n    \x3cdiv class\x3d"esriCTFullHeight" data-dojo-attach-point\x3d"widgetMainNode"\x3e\r\n        \x3c!-- search panel --\x3e\r\n        \x3cdiv class\x3d"esriCTSearchOuterContainer"\x3e\r\n            \x3cdiv class\x3d"esriCTSearchHeader"\x3e\r\n                ${nls.searchHeaderText}\x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTSearchContainer"\x3e\r\n                \x3cdiv class\x3d"esriCTSearchDiv"\x3e\r\n                    \x3cdiv data-dojo-attach-point\x3d"searchDiv"\x3e\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv class\x3d"esriCTSelectLocationDiv esriCTImgButtons esriCTSelectLocation esriCTHidden"\r\n                    data-dojo-attach-point\x3d"selectLocation" role\x3d"button" tabindex\x3d"0"\r\n                    aria-label\x3d"${nls.locationButtonAriaLabel}"\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c!-- result panel --\x3e\r\n        \x3cdiv class\x3d"esriCTResultsPanel" data-dojo-attach-point\x3d"resultsPanel"\x3e\r\n            \x3cdiv class\x3d"esriCTResultContent"\x3e\r\n                \x3cdiv class\x3d"esriCTErrorNode esriCTHidden" data-dojo-attach-point\x3d"errorNode" tabindex\x3d"0"\r\n                    aria-label\x3d"${nls.errMsgNoResultsFound}"\x3e\r\n                    ${nls.errMsgNoResultsFound}\r\n                \x3c/div\x3e\r\n                \x3cdiv data-dojo-attach-point\x3d"accordionContainer" class\x3d"esriCTHidden esriCTAccordionContainer"\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/RelatedTableCharts/css/style.css":'.jimu-widget-RelatedTableCharts-layout .esriCTLabels {width: 100%; clear: both;}.jimu-widget-RelatedTableCharts-layout .esriCTLayoutHeaderTitle {font-weight: bold; text-align: center; margin: 5px 10px 0 10px; overflow-wrap: break-word;}.jimu-widget-RelatedTableCharts-layout .esriCTLayoutContent {width: calc(100% - 140px); border: 1px solid #d2dae2; margin: 20px auto;}.jimu-widget-RelatedTableCharts-layout .esriCTChartContainer {margin: 10px 50px; display: inline-block; direction: ltr;}.jimu-widget-RelatedTableCharts-layout .esriCTChartDescription {margin: 0 10px 10px 10px; word-break: break-word;}.jimu-widget-RelatedTableCharts-layout .esriCTLegendContainer {width: 100%; overflow-x: auto; margin-bottom: 10px; display: inline-block;}.jimu-widget-RelatedTableCharts-layout .esriCTLegendContainer .dijitCheckBox {margin: 1px;}.jimu-widget-RelatedTableCharts-layout .dojoxLegendNode td {padding: 6px 4px 6px 6px;}.jimu-widget-RelatedTableCharts-layout .dojoxLegendNode tr {display: table-cell;}.jimu-widget-RelatedTableCharts-layout .dojoxLegendNode {border-top: 1px solid #DDDDDD; margin: 0; padding: 0; width: 100%; white-space: nowrap;}.esriCTMainContainer {min-width: 222px; height: 100%; -webkit-overflow-scrolling: touch; overflow: hidden;}.esriCTResultsPanel {margin: 10px 0px; border-top: 1px solid #161616; overflow-y: auto; overflow-x: hidden; height: calc(100% - 65px);}.esriCTResultContent {margin: 10px 5px; width: calc(100% - 10px);}.esriCTOverridePanelStyle {padding: 14px 0px !important;}.jimu-widget-RelatedTableCharts .esriCTAccordionContainer {width: 100%; border: 1px solid #DDDDDD;}.jimu-widget-RelatedTableCharts .esriCTHidden {display: none;}.jimu-widget-RelatedTableCharts .esriCTWidgetErrorNode {color: Red;}.jimu-widget-RelatedTableCharts .esriCTFullHeight {height: 100%;}.jimu-widget-RelatedTableCharts .esriCTChartRow {background-color: #FCFCFC; position: relative; border-bottom: 1px solid #DDDDDD; color: black; cursor: pointer;}.jimu-widget-RelatedTableCharts .esriCTChartTitle {line-height: 40px; padding-left: 10px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-size: 14px; color: #3e3e3e;}.jimu-widget-RelatedTableCharts .esriCTChartContent {background-color: #FFF;}.jimu-widget-RelatedTableCharts .esriCTChartSelected {font-weight: bold; background-color: #DDDDDD;}.jimu-widget-RelatedTableCharts .esriCTChartHighlighted {padding-left: 5px; font-weight: bold;}.jimu-widget-RelatedTableCharts .esriCTSelectedChartBorder {border-left: 5px solid;}.jimu-widget-RelatedTableCharts .esriCTSearchOuterContainer {width: calc(100% - 40px); margin: 0 auto;}.jimu-widget-RelatedTableCharts .esriCTSearchHeader {padding: 3px 0px 7px 0px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #000000;}.jimu-widget-RelatedTableCharts .esriCTImgButtons {cursor: pointer; width: 32px; height: 34px; border: 1px solid #57585A; border-radius: 4px; background-size: 20px; background-position: center center; background-repeat: no-repeat;}.jimu-widget-RelatedTableCharts .esriCTOrDiv {float: left; line-height: 30px; margin-left: 10px;}.jimu-widget-RelatedTableCharts .esriCTSearchDiv {float: left;}.jimu-widget-RelatedTableCharts .esriCTSearchDiv .arcgisSearch {float: left; width: 100% !important;}.esriRtl .jimu-widget-RelatedTableCharts .esriCTSearchDiv {float: right;}.jimu-widget-RelatedTableCharts .esriCTSearchContainer {width: 100%; height: 35px;}.jimu-widget-RelatedTableCharts .arcgisSearch .searchGroup .searchInput {width: 170px;}.jimu-widget-RelatedTableCharts .arcgisSearch .searchBtn {padding: 6px;}.jimu-widget-search .arcgisSearch .searchGroup .searchInputGroup .searchInput {width: auto;}.jimu-widget-RelatedTableCharts .esriCTSelectLocationDiv {margin: 0px 0px 0px 10px; float: right;}.esriRtl .jimu-widget-RelatedTableCharts .esriCTSelectLocationDiv {margin: 0px 0px 10px 0px; float: left;}.jimu-widget-RelatedTableCharts .esriCTSelectLocation {background-image: url("../images/select-location.png");}.jimu-widget-RelatedTableCharts .esriCTSelectLocationActive {background-image: url("../images/select-location-active.png"); background-color: #57585A;}.jimu-widget-RelatedTableCharts .esriCTImgButtons {cursor: pointer; width: 32px; height: 34px; border: 1px solid #57585A; border-radius: 4px; background-size: 20px; background-position: center center; background-repeat: no-repeat;}.jimu-widget-RelatedTableCharts-layout .esriCTLayoutContent {width: 100%; background-color: #FFF; margin: 0px; border: none;}.jimu-widget-RelatedTableCharts-layout .esriCTChartContainer {width: calc(100% - 2px); margin: 5px 1px;}.esriCTDisabledRow {cursor: not-allowed !important; color: #838383 !important;}.esriRtl .jimu-widget-RelatedTableCharts .esriCTSelectedChartBorder {border-right: 5px solid; border-left: 0px;}.esriRtl .jimu-widget-RelatedTableCharts .esriCTChartTitle {padding-right: 10px;}.esriCTMapTooltip {width: 100px; word-wrap: break-word; border: 1px solid #7EABCD; background-color: white; padding: 5px; font-size: 9pt; z-index: 9999; -o-border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;}.esriCTErrorNode:focus {outline: 2px solid #24B5CC !important;}',
"*now":function(F){F(['dojo/i18n!*preload*widgets/RelatedTableCharts/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 jimu/BaseWidget dojo/on dojo/_base/lang dojo/_base/array ./Search jimu/portalUtils dojo/query dojo/dom-class dojo/dom-attr dojo/dom-style dojo/dom-construct esri/graphic esri/symbols/jsonUtils esri/layers/GraphicsLayer esri/geometry/webMercatorUtils esri/tasks/locator esri/InfoTemplate esri/tasks/query dojo/dom-geometry esri/tasks/RelationshipQuery dojo/Deferred dojo/promise/all esri/layers/FeatureLayer ./Accordion esri/symbols/SimpleFillSymbol esri/symbols/SimpleLineSymbol esri/symbols/SimpleMarkerSymbol esri/geometry/Point esri/geometry/Polyline esri/geometry/Polygon esri/SpatialReference esri/Color esri/geometry/Extent esri/geometry/scaleUtils jimu/dijit/LoadingIndicator esri/request esri/renderers/jsonUtils jimu/LayerInfos/LayerInfos jimu/utils dijit/focus dojo/keys dijit/registry dojo/_base/event".split(" "),function(F,
K,m,z,w,h,l,g,b,c,e,f,d,k,n,q,E,v,r,B,u,y,G,I,L,M,S,X,C,H,O,R,P,N,Z,W,da,ia,ma,ca,ba,fa,na,oa){return F([K],{baseClass:"jimu-widget-RelatedTableCharts",_loading:null,_mapTooltip:null,_highlightGraphicsLayer:null,_locatorInstance:null,_selectedLocation:null,_operationalLayers:[],_autoRefreshInterval:null,_refreshElapsedTime:null,_layerInfosObj:null,_searchInstance:null,_hasMulitpleSourcesInSearch:!0,_setFocusOnFirstNode:!1,openPanels:[],_prevFeature:null,_isSearchResultSelected:null,_isMapClicked:null,
postCreate:function(){this.inherited(arguments);this.openAtStartAysn=!0;this._selectedLocation=this._locatorInstance=this._highlightGraphicsLayer=this._mapTooltip=this._loading=null;this._operationalLayers=[];this._searchInstance=this._layerInfosObj=this._refreshElapsedTime=this._autoRefreshInterval=null;this._hasMulitpleSourcesInSearch=!0;this._setFocusOnFirstNode=!1;this.openPanels=[];this._isMapClicked=this._isSearchResultSelected=this._prevFeature=null;ma.getInstance(this.map,this.map.itemInfo).then(z.hitch(this,
function(x){this._layerInfosObj=x;this._getSelectedThemeColor();this._updateConfig();this._loadFeatureLayers();this._operationalLayers.length||(b.add(this.accordionContainer,"esriCTHidden"),b.remove(this.errorNode,"esriCTHidden"),c.set(this.errorNode,"innerHTML",this.nls.noChatsConfigured),c.set(this.errorNode,"aria-label",this.nls.noChatsConfigured),this._createWidgetAccessible());this._initWidgetComponents()}))},startup:function(){this.inherited(arguments);b.add(this.domNode.parentElement,"esriCTOverridePanelStyle");
this._removeDartThemeCss();this.config.generalSettings.showLocationTool?b.remove(this.selectLocation,"esriCTHidden"):this._mapClickHandler||this._connectMapEventHandler()},onOpen:function(){this._setFocusOnFirstNode=!0;this._onWindowResize();this._autoRefresh();this.config.generalSettings.showLocationTool||this._connectMapEventHandler()},resize:function(){this._onWindowResize()},onDeActive:function(){this.config.generalSettings.showLocationTool&&this._disconnectMapEventHandler()},onClose:function(){this._disconnectMapEventHandler();
this._searchInstance&&this._searchInstance.clearSearchText();this._clearResults();this._autoRefreshInterval&&clearInterval(this._autoRefreshInterval)},_initWidgetComponents:function(){this.config.response=this.map.webMapResponse;this._initLoading();this.appConfig.portalUrl&&""!==z.trim(this.appConfig.portalUrl)&&(l.getPortalSelfInfo(this.appConfig.portalUrl).then(z.hitch(this,function(x){this.config.helperServices=x.helperServices;this._createSearchInstance()}),z.hitch(this,function(){this._createSearchInstance()})),
this.config.generalSettings.showLocationTool&&this._connectSelectLocationHandler());this._highlightGraphicsLayer=new n;this.map.addLayer(this._highlightGraphicsLayer);this._mapTooltip=f.create("div",{"class":"esriCTMapTooltip",innerHTML:this.nls.mouseOverTooltip},this.map.container);e.set(this._mapTooltip,"position","fixed");e.set(this._mapTooltip,"display","none");m(window,"resize",z.hitch(this,this._onWindowResize))},_initLoading:function(){this._loading=new W({hidden:!0});this._loading.placeAt(this.domNode);
this._loading.startup()},_createSearchInstance:function(){this._searchInstance=new h({searchOptions:{addLayersFromMap:!1,autoNavigate:!1,autoComplete:!0,minCharacters:0,maxLocations:5,searchDelay:100,enableHighlight:!1},config:this.config,appConfig:this.appConfig,map:this.map},f.create("div",{},this.searchDiv));this._searchInstance.on("select-result",z.hitch(this,function(x){this._clearResults();var a=this._getSelectedFeatureFromResult(x);this._prevFeature={feature:a,isFeatureFromMapClick:!1};x&&
x.source&&x.source.zoomScale&&(this._prevFeature.zoomScale=x.source.zoomScale);var p={feature:a,isFeatureFromMapClick:!1};this._selectedLocation=a;this._zoomToFeature().then(z.hitch(this,function(){this._refreshAllFeatureLayers();this._initWorkflow(p)}))}));this._searchInstance.on("clear-search",z.hitch(this,this._clearResults));this._searchInstance.on("search-results",z.hitch(this,this._clearResults));this._searchInstance.on("search-loaded",z.hitch(this,function(){setTimeout(z.hitch(this,function(){this._initReverseGeocoder();
this.searchContainerNodeElement=g(".jimu-widget-RelatedTableCharts .arcgisSearch .searchGroup .searchInput")[0];2>this._searchInstance.search.sources.length&&(this._hasMulitpleSourcesInSearch=!1);window.appInfo.isRunInMobile&&this._searchInstance.search&&this._searchInstance.search.suggestionsNode&&e.set(this._searchInstance.search.suggestionsNode,"height","110px");this._onWindowResize();this.setTheme();this._createWidgetAccessible()}),1E3)}));this._searchInstance.startup();this.own(m(this._searchInstance,
"setFirstFocusNode",z.hitch(this,function(){this._setFocusOnFirstNode=!0;this._setFirstFocusNode()})))},_removeDartThemeCss:function(){var x,a;if((x=g('link[href\x3d"'+this.folderUrl+'/css/DartTheme.css"]'))&&0<x.length)for(a=0;a<x.length;a++)c.get(x[a],"StyleSheetID")===this.baseClass+"-dartThemeStyle"&&x[a].parentNode.removeChild(x[0])},setTheme:function(){if("DartTheme"===this.appConfig.theme.name){var x=g("head")[0];var a=f.create("link");a.rel="stylesheet";a.type="text/css";a.href=this.folderUrl+
"/css/DartTheme.css";a.media="all";c.set(a,"StyleSheetID",this.baseClass+"-dartThemeStyle");x.appendChild(a)}},_connectMapEventHandler:function(){this._mapClickHandler||(this._disableWebMapPopup(),this._mapClickHandler=this.map.on("click",z.hitch(this,this._onMapClick)),"ontouchstart"in document.documentElement?e.set(this._mapTooltip,"display","none"):(this._mapMoveHandler=this.map.on("mouse-move",z.hitch(this,this._onMapMouseMove)),this.map.on("mouse-out",z.hitch(this,function(){e.set(this._mapTooltip,
"display","none")}))),this._extentChangeHandler=this.map.on("extent-change",z.hitch(this,this._onExtentChange)))},_onMapClick:function(x){this._isMapClicked=!0;this._clearResults();var a=this._getSelectedFeatureFromResult(x);this._prevFeature={feature:new d(x.mapPoint),isFeatureFromMapClick:!0};x&&x.source&&x.source.zoomScale&&(this._prevFeature.zoomScale=x.source.zoomScale);this._selectedLocation=a;this._zoomToFeature().then(z.hitch(this,function(){this._refreshAllFeatureLayers();this.config.generalSettings.showLocationTool&&
this._disconnectMapEventHandler();this.map.infoWindow.hide();this._searchInstance&&this._searchInstance.clearSearchText();var p={feature:new d(x.mapPoint),isFeatureFromMapClick:!0};this._initWorkflow(p)}))},_onMapMouseMove:function(x){if(x.clientX||x.pageY){var a=x.clientX;x=x.clientY}else a=x.clientX+document.body.scrollLeft-document.body.clientLeft,x=x.clientY+document.body.scrollTop-document.body.clientTop;e.set(this._mapTooltip,"display","none");e.set(this._mapTooltip,{left:a+15+"px",top:x+"px"});
e.set(this._mapTooltip,"display","")},_onExtentChange:function(){if(this._selectedLocation&&this.map.infoWindow&&this.map.infoWindow.isShowing){var x=this.map.toScreen(this._selectedLocation.geometry);this.map.infoWindow.show(x,this.map.getInfoWindowAnchor(x))}},_disconnectMapEventHandler:function(){this._enableWebMapPopup();b.replace(this.selectLocation,"esriCTSelectLocation","esriCTSelectLocationActive");this._mapClickHandler&&(this._mapClickHandler.remove(),this._mapClickHandler=null);this._mapMoveHandler&&
(this._mapMoveHandler.remove(),this._mapMoveHandler=null,this._mapTooltip.style.display="none");this._extentChangeHandler&&this._extentChangeHandler.remove()},_enableWebMapPopup:function(){this.map&&this.map.setInfoWindowOnClick(!0)},_disableWebMapPopup:function(){this.map&&this.map.setInfoWindowOnClick(!1)},_onWindowResize:function(){this._windowResizeTimer&&clearTimeout(this._windowResizeTimer);this._windowResizeTimer=setTimeout(z.hitch(this,this._resetComponents),500)},_resetComponents:function(){var x;
var a=g(".jimu-widget-RelatedTableCharts .arcgisSearch .searchGroup")[0];this.searchContainerNodeElement||(this.searchContainerNodeElement=g(".jimu-widget-RelatedTableCharts .arcgisSearch .searchGroup .searchInput")[0]);this.widgetMainNode&&this.searchContainerNodeElement&&(x=B.position(this.widgetMainNode))&&x.w&&(x=x.w-144,this._hasMulitpleSourcesInSearch||(x+=32),0<x&&(this.config.generalSettings.showLocationTool&&(x-=45),this.searchContainerNodeElement.style.setProperty("width",x+"px","important"),
a&&a.style.setProperty("max-width","100%","important")));this.accordionPanel&&this.accordionPanel.resizeContents()},_initReverseGeocoder:function(){var x;this.config.searchSourceSettings&&this.config.searchSourceSettings.sources&&(w.some(this.config.searchSourceSettings.sources,z.hitch(this,function(a){if(a&&a.url&&"locator"===a.type)return x=a.url,!0})),x&&(this._locatorInstance=new E(x),this.own(this._locatorInstance.on("location-to-address-complete",z.hitch(this,this._onLocationToAddressComplete)))))},
_onLocationToAddressComplete:function(x){if(x.address&&x.address.address){if(x.address.address.Match_addr)var a=x.address.address.Match_addr;else{a="";for(var p in x.address.address)"Loc_name"!==p&&x.address.address[p]&&(a+=x.address.address[p]+" ");a=z.trim(a)}this._searchInstance&&this._searchInstance.setSearchText(a);x=new v;x.setContent("${Match_addr}");x.setTitle(this.nls.addressInfowindowTitle);this.map.infoWindow.clearFeatures();this.map.infoWindow.setTitle(this.nls.addressInfowindowTitle);
this.map.infoWindow.setContent(a);a=this.map.toScreen(this._selectedLocation.geometry);this.map.infoWindow.show(a,this.map.getInfoWindowAnchor(a));this.map.infoWindow.isShowing=!0}},_updateConfig:function(){w.forEach(this.config.charts,z.hitch(this,function(x){z.mixin(x.layerDetails.polygonLayerInfo,this._getLayerDetailsFromMap(x.layerDetails.polygonLayerInfo.baseURL,x.layerDetails.polygonLayerInfo.layerId));var a=this._getTableDetailsFromMap(x.layerDetails.relatedLayerInfo.baseURL,x.layerDetails.relatedLayerInfo.layerId);
0===Object.keys(a).length&&(a=this._getLayerDetailsFromMap(x.layerDetails.relatedLayerInfo.baseURL,x.layerDetails.relatedLayerInfo.layerId));z.mixin(x.layerDetails.relatedLayerInfo,a)}))},_loadFeatureLayers:function(){var x;this._operationalLayers=[];this.openPanels=[];for(x=this.config.charts.highlightedChartIndex=0;x<this.config.charts.length;x++)if(this.config.charts[x].layerDetails.polygonLayerInfo.url){var a=new I(this.config.charts[x].layerDetails.polygonLayerInfo.url);a.title=this.config.charts[x].layerDetails.polygonLayerInfo.title;
this.config.charts[x].layerDetails.polygonLayerInfo.definitionExpression&&a.setDefinitionExpression(this.config.charts[x].layerDetails.polygonLayerInfo.definitionExpression);this.config.charts[x].layerDetails.polygonLayerInfo.renderer&&a.setRenderer(ia.fromJson(this.config.charts[x].layerDetails.polygonLayerInfo.renderer));this._operationalLayers.push(a)}},_getSelectedFeatureFromResult:function(x){if(x)if(x.feature)var a=x.feature;else x.result&&x.result.feature&&(a=x.result.feature);return a},_getSelectedGeocoder:function(x){if(x.source&&
x.source.featureLayer)var a=x.source.featureLayer.url;return a},destroy:function(){this._clearResults();this.inherited(arguments)},pointToExtent:function(x,a,p){var A=x.extent.getWidth()/x.width;p*=A;return new N(a.x-p,a.y-p,a.x+p,a.y+p,x.spatialReference)},_updateOpenPanels:function(x){var a;this.openPanels=[];w.forEach(this._operationalLayers,z.hitch(this,function(p,A){x===p.url&&(this.openPanels.push("Chart"+A),a=!0)}));return a},_clearResults:function(){this._highlightGraphicsLayer&&this._highlightGraphicsLayer.clear();
this._selectedLocation=null;this.accordionContainer&&(b.add(this.accordionContainer,"esriCTHidden"),f.empty(this.accordionContainer));this.errorNode.innerHTML.trim()===this.nls.errMsgNoResultsFound&&b.add(this.errorNode,"esriCTHidden");this._clearTimer();this._createWidgetAccessible()},_loadFeatures:function(x){var a=[],p=!1;this._loading.show();w.forEach(this.config.charts,z.hitch(this,function(A,t){var D=new y;this._getIntersectingFeatures(x,t,D).then(z.hitch(this,function(J){A.chartData=J;!p&&
J&&(p=!0);J||(A.selectedFeature=null)}));a.push(D)}));G(a).then(z.hitch(this,z.hitch(this,function(){p?(b.add(this.errorNode,"esriCTHidden"),b.remove(this.accordionContainer,"esriCTHidden"),this._initAccordionPane(),this._resetTimer()):(this.accordionPanel&&(this.accordionPanel.chartArray=[]),b.add(this.accordionContainer,"esriCTHidden"),b.remove(this.errorNode,"esriCTHidden"),this._createWidgetAccessible());this._loading.hide()})))},_initAccordionPane:function(){f.empty(this.accordionContainer);
this.accordionPanel=new L({nls:this.nls,config:this.config,openPanels:this.openPanels,node:this.accordionContainer});m(this.accordionPanel,"chartSelected",z.hitch(this,function(x){this._hideAllChartLayers();this._operationalLayers[x]&&this._showHideChartLayer(this._operationalLayers[x].url,!0);this.config.charts[x].selectedFeature&&("point"===this.config.charts[x].selectedFeature.geometry.type?this._isSearchResultSelected?this._isSearchResultSelected=!1:this._isMapClicked?this._isMapClicked=!1:this.map.centerAndZoom(this.config.charts[x].selectedFeature.geometry,
this.map.getLevel()).then(z.hitch(this,function(){this._refreshAllFeatureLayers()})):this._isSearchResultSelected?this._isSearchResultSelected=!1:this._isMapClicked?this._isMapClicked=!1:this.map.setExtent(this.config.charts[x].selectedFeature.geometry.getExtent().expand(1.5)).then(z.hitch(this,function(){this._refreshAllFeatureLayers()})),this._highlightGraphicsLayer.clear(),this._highlightSelectedLocation(this._selectedLocation,!1),this._highlightSelectedChartFeature(x))}));m(this.accordionPanel,
"setFocusNodes",z.hitch(this,function(){this._createWidgetAccessible()}));this.accordionPanel.initAccordionPane()},_hideAllChartLayers:function(){var x;for(x=0;x<this._operationalLayers.length;x++)this._showHideChartLayer(this._operationalLayers[x].url,!1)},_matchURLS:function(x,a){x&&0!==x.indexOf("https")&&(x=x.replace("http","https"));a&&0!==a.indexOf("https")&&(a=a.replace("http","https"));return x===a},_showHideChartLayer:function(x,a){var p;var A=x.split("/");A=A[A.length-1];for(p in this.map._layers)if(this.map._layers.hasOwnProperty(p))if(this._matchURLS(this.map._layers[p].url,
x))this.map._layers[p].setVisibility(a);else if(this.map._layers[p].visibleLayers){var t=this.map._layers[p].url[this.map._layers[p].url.length-1];t="/"===t?this.map._layers[p].url+A:this.map._layers[p].url+"/"+A;if(this._matchURLS(t,x)){t=this.map._layers[p].visibleLayers;var D=w.indexOf(t,parseInt(A,10));a?-1===D&&t.push(parseInt(A,10)):-1!==D&&t.splice(D,1);this.map._layers[p].setVisibleLayers(t)}}},_getIntersectingFeatures:function(x,a,p){var A;var t=this._operationalLayers[a];this.config.charts[a].selectedFeature=
null;(A="point"===x.geometry.type&&"esriGeometryPoint"===t.geometryType?this._extentFromPoint(x.geometry).centerAt(x.geometry):"polygon"===x.geometry.type?x.geometry.getCentroid():x.geometry)?(x=new r,x.outFields=["*"],x.returnGeometry=!0,x.geometry=A,t.queryFeatures(x,z.hitch(this,function(D){D&&D.features&&0<D.features.length?D.features[0].attributes?(this.config.charts[a].selectedFeature=D.features[0],D=D.features[0].attributes[t.objectIdField],this._getRelatedRecords(p,a,D)):p.resolve():p.resolve()}),
z.hitch(this,function(){p.resolve()}))):p.resolve();return p},_extentFromPoint:function(x){new C(x.x,x.y,this.map.spatialReference);x=20*(this.map.extent.getWidth()/this.map.width);return new N(1,1,x,x,this.map.spatialReference)},_getRelatedRecords:function(x,a,p){var A=!1;var t=this.config.charts[a];var D=new u;D.outFields=["*"];D.objectIds=[p];D.returnGeometry=!1;D.relationshipId=t.layerDetails.relatedLayerInfo.relationShipId;this.config.charts[a].layerDetails.relatedLayerInfo.definitionExpression&&
(D.where=this.config.charts[a].layerDetails.relatedLayerInfo.definitionExpression);"esriCTEmptyOption"!==t.chartConfig.labelField&&(A=w.some(this.config.charts[a].layerDetails.relatedLayerInfo.fields,z.hitch(this,function(J){if(J.name===t.chartConfig.labelField&&"esriFieldTypeDate"===J.type)return!0})));this._operationalLayers[a].queryRelatedFeatures(D,z.hitch(this,function(J){J=(J=J[p])?J.features:[];0<J.length?"PolarChart"!==t.chartConfig.chartType?"LineChart"===t.chartConfig.chartType?this._createLineChartData(t,
J,A,x):this._createChartData(t,J,A,x):this._createPolarChartData(t,J,a,x):x.resolve()}),function(){x.resolve()})},_createChartData:function(x,a,p,A){var t={chartSeries:[],chartLabels:[]};w.forEach(a,z.hitch(this,function(D,J){var Q={},U={},T="",Y;var V=!0;U.y=D.attributes[x.chartConfig.dataSeriesField];U.tooltip=D.attributes[x.chartConfig.dataSeriesField]+"\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;";Q={value:J+1,y:D.attributes[x.chartConfig.dataSeriesField]};"esriCTEmptyOption"===x.chartConfig.labelField?
T="":(0===D.attributes[x.chartConfig.labelField]?T=0:p?(J=x.layerDetails.relatedLayerInfo.popupInfo.fieldInfos,ca.has("ie")||ca.has("edge")?w.forEach(J,z.hitch(this,function(aa){aa.fieldName===x.chartConfig.labelField&&(Y=aa)})):Y=J.find(function(aa){return aa.fieldName===x.chartConfig.labelField}),J=!1,-1<Y.format.dateFormat.toLowerCase().indexOf("time")&&(J=!0),T=this._getLocaleFormatedDate(D.attributes[x.chartConfig.labelField],J)):T=D.attributes[x.chartConfig.labelField]||"",Q.sortValue=D.attributes[x.chartConfig.labelField]||
"",U.sortValue=D.attributes[x.chartConfig.labelField]||"");Q.text=T;U.text=T;Q.text+="";"ColorByFieldValue"===x.chartConfig.chartColor.colorType&&(U.fill=this._getColorForFieldValue(D.attributes[x.chartConfig.chartColor.colorInfo.layerField],x));"PieChart"===x.chartConfig.chartType&&0>=U.y&&(V=!1);V&&(t.chartLabels.push(Q),t.chartSeries.push(U))}));if("esriCTEmptyOption"!==x.chartConfig.labelField)for(t.chartLabels.sort(this._sortChartData),t.chartSeries.sort(this._sortChartData),a=0;a<t.chartLabels.length;a++)t.chartLabels[a].value=
a+1;this._setChartColorSettings(A,t,x)},_createLineChartData:function(x,a,p,A){var t={chartSeries:[],chartLabels:[]};var D=this._getDataSeriesAlias(x);var J=x.chartConfig.dataSeriesField.split(",");w.forEach(J,z.hitch(this,function(Q,U){var T=[];var Y=[];w.forEach(a,z.hitch(this,function(V,aa){var ja;var ea={};var ha={};var la="";ha.y=V.attributes[Q];ha.tooltip=V.attributes[Q]+"\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;";ha.seriesName=D[U];ea={value:aa+1,text:V.attributes[Q]};"esriCTEmptyOption"===x.chartConfig.labelField?
la="":(0===V.attributes[x.chartConfig.labelField]?la=0:p?(aa=x.layerDetails.relatedLayerInfo.popupInfo.fieldInfos,ca.has("ie")||ca.has("edge")?w.forEach(aa,z.hitch(this,function(ka){ka.fieldName===x.chartConfig.labelField&&(ja=ka)})):ja=aa.find(function(ka){return ka.fieldName===x.chartConfig.labelField}),aa=!1,-1<ja.format.dateFormat.toLowerCase().indexOf("time")&&(aa=!0),la=this._getLocaleFormatedDate(V.attributes[x.chartConfig.labelField],aa)):la=V.attributes[x.chartConfig.labelField]||"",ea.sortValue=
V.attributes[x.chartConfig.labelField]||"",ha.sortValue=V.attributes[x.chartConfig.labelField]||"");ea.text=la;ha.text=la;ea.text+="";T.push(ea);Y.push(ha)}));0<Y.length&&t.chartSeries.push(Y);0===t.chartLabels.length&&t.chartLabels.push(T)}));if("esriCTEmptyOption"!==x.chartConfig.labelField)for(t.chartLabels[0].sort(this._sortChartData),t.chartLabels[0].reverse(),w.forEach(t.chartSeries,z.hitch(this,function(Q,U){t.chartSeries[U]=Q.sort(this._sortChartData);t.chartSeries[U].reverse()})),J=0;J<t.chartLabels[0].length;J++)t.chartLabels[0][J].value=
J+1;this._setChartColorSettings(A,t,x)},_createPolarChartData:function(x,a,p,A){var t={chartSeries:[],chartLabels:[]};if("ColorByFieldValue"===x.chartConfig.chartColor.colorType){var D=x.chartConfig.chartColor.colorInfo.layerField;a.sort(function(U,T){return T.attributes[D]>U.attributes[D]?-1:T.attributes[D]<U.attributes[D]?1:0})}var J=x.chartConfig.polarChartConfig;var Q=this._operationalLayers[p].objectIdField;w.forEach(a,z.hitch(this,function(U){var T={},Y={},V={},aa={};for(T in J)Y[J[T].alias]=
U.attributes[J[T].fieldName];V={data:Y};"ColorByFieldValue"===x.chartConfig.chartColor.colorType&&(V.fill=this._getColorForFieldValue(U.attributes[x.chartConfig.chartColor.colorInfo.layerField],x),V.legendLabel=U.attributes[D]);aa[U.attributes[Q]]=V;t.chartSeries.push(aa)}));this._setChartColorSettings(A,t,x)},_sortChartData:function(x,a){return x.sortValue>a.sortValue?-1:x.sortValue<a.sortValue?1:0},_getLocaleFormatedDate:function(x,a){x=new Date(x);return a?x.toLocaleString():x.toLocaleDateString()},
_getColorForFieldValue:function(x,a){var p="#000000";a.chartConfig.chartColor.colorInfo.layerFieldValues&&a.chartConfig.chartColor.colorInfo.layerFieldValues.hasOwnProperty(x)&&(p=a.chartConfig.chartColor.colorInfo.layerFieldValues[x]);return p},_setChartColorSettings:function(x,a,p){"ColorByTheme"===p.chartConfig.chartColor.colorType?this._loadSelectedTheme(x,a,p):"SingleColor"===p.chartConfig.chartColor.colorType?(a.fill=p.chartConfig.chartColor.colorInfo,x.resolve(a)):"ColorByFieldValue"===p.chartConfig.chartColor.colorType&&
x.resolve(a)},_loadSelectedTheme:function(x,a,p){require([p.chartConfig.chartColor.colorInfo.className],z.hitch(this,function(A){a.selectedTheme=A;x.resolve(a)}))},_highlightSelectedLocation:function(x,a){if(x){var p=k.fromJson(this.config.generalSettings.symbol.graphicLocationSymbol);a&&(this._selectedLocation=new d(x.geometry,p));this._highlightGraphicsLayer.add(this._selectedLocation)}},_highlightSelectedChartFeature:function(x){var a=this.config.charts[x].selectedFeature;x=this._operationalLayers[x];
if(""!==a&&null!==a&&void 0!==a){switch(a.geometry.type){case "point":var p=this._getPointSymbol(a,x);break;case "polyline":p=this._getPolyLineSymbol(a,x);break;case "polygon":p=this._getPolygonSymbol(a)}this._highlightGraphicsLayer.add(p)}},_getPolygonSymbol:function(x){var a=new M(M.STYLE_SOLID,new S(S.STYLE_SOLID,new P([0,255,255,1]),4),new P([0,0,0,0]));var p=new O(new R({wkid:x.geometry.spatialReference.wkid}));x.geometry.rings&&(p.rings=z.clone(x.geometry.rings));return new d(p,a,x.attributes)},
_getPolyLineSymbol:function(x,a){var p,A;var t=5;if(a&&a.renderer)if(a.renderer.symbol&&a.renderer.symbol.hasOwnProperty("width"))t=a.renderer.symbol.width;else if(a.renderer.infos&&0<a.renderer.infos.length)for(A=0;A<a.renderer.infos.length;A++){a.typeIdField?p=x.attributes[a.typeIdField]:a.renderer.attributeField&&(p=x.attributes[a.renderer.attributeField]);var D=a.renderer.infos[A].value;void 0!==p&&null!==p&&""!==p&&void 0!==D&&null!==D&&""!==D&&p.toString()===D.toString()&&a.renderer.infos[A].symbol.hasOwnProperty("width")&&
(t=a.renderer.infos[A].symbol.width)}else a.renderer.defaultSymbol&&a.renderer.defaultSymbol.hasOwnProperty("width")&&(t=a.renderer.defaultSymbol.width);a=new S(S.STYLE_SOLID,new P([0,255,255,1]),t);t=new H(new R({wkid:x.geometry.spatialReference.wkid}));x.geometry.paths&&0<x.geometry.paths.length&&t.addPath(x.geometry.paths[0]);return new d(t,a,x.attributes)},_getPointSymbol:function(x,a){var p,A;var t=!1;var D=new X(X.STYLE_SQUARE,null,new S(S.STYLE_SOLID,new P([0,255,255,1]),3));D.setColor(null);
D.size=30;if(a&&a.renderer)if(a.renderer.symbol)t=!0,D=this._updatePointSymbolProperties(D,a.renderer.symbol);else if(a.renderer.infos&&0<a.renderer.infos.length){for(A=0;A<a.renderer.infos.length;A++){a.typeIdField?p=x.attributes[a.typeIdField]:a.renderer.attributeField&&(p=x.attributes[a.renderer.attributeField]);var J=a.renderer.infos[A].value;void 0!==p&&null!==p&&""!==p&&void 0!==J&&null!==J&&""!==J&&p.toString()===J.toString()&&(t=!0,D=this._updatePointSymbolProperties(D,a.renderer.infos[A].symbol))}!t&&
a.renderer.defaultSymbol&&(t=!0,D=this._updatePointSymbolProperties(D,a.renderer.defaultSymbol))}a=new C(x.geometry.x,x.geometry.y,new R({wkid:x.geometry.spatialReference.wkid}));return new d(a,D,x.attributes)},_updatePointSymbolProperties:function(x,a){if(a.hasOwnProperty("height")&&a.hasOwnProperty("width")){var p=a.height;var A=a.width;p=(p>A?p:A)+10;x.size=p}a.hasOwnProperty("size")&&(!p||p<a.size)&&(x.size=a.size+10);a.hasOwnProperty("xoffset")&&(x.xoffset=a.xoffset);a.hasOwnProperty("yoffset")&&
(x.yoffset=a.yoffset);return x},_resetTimer:function(){0<this.config.generalSettings.refreshInterval&&(this._autoRefreshInterval&&clearInterval(this._autoRefreshInterval),this._autoRefreshInterval=setInterval(z.hitch(this,function(){this._autoRefresh()}),6E4*this.config.generalSettings.refreshInterval),this._refreshElapsedTime=new Date)},_clearTimer:function(){clearInterval(this._autoRefreshInterval);this._autoRefreshInterval=this._refreshElapsedTime=null},_getElapsedTimeInMinutes:function(){var x=
new Date,a=new Date;this._refreshElapsedTime&&(a=this._refreshElapsedTime);x=Math.floor((x-a)/1E3/60);return Math.round(x%60)},_autoRefresh:function(){this._autoRefreshInterval&&this._refreshElapsedTime&&this._selectedLocation&&parseInt(this._getElapsedTimeInMinutes(),10)>=parseInt(this.config.generalSettings.refreshInterval,10)&&(this._resetTimer(),this._loadFeatures(this._selectedLocation))},_getLayerDetailsFromMap:function(x,a){var p={};this.map&&this.map.webMapResponse&&this.map.webMapResponse.itemInfo&&
this.map.webMapResponse.itemInfo.itemData&&this.map.webMapResponse.itemInfo.itemData.operationalLayers&&w.forEach(this.map.webMapResponse.itemInfo.itemData.operationalLayers,z.hitch(this,function(A){A.layerObject&&("ArcGISMapServiceLayer"===A.layerType||"ArcGISTiledMapServiceLayer"===A.layerType?x.substring(0,x.length-1)===A.url&&(w.forEach(A.resourceInfo.layers,z.hitch(this,function(t){t.id===parseInt(a,10)&&(p.title=t.name)})),w.forEach(A.layers,z.hitch(this,function(t){t.id===parseInt(a,10)&&(t.name&&
(p.title=t.name),p.popupInfo=t.popupInfo,p.definitionExpression=null,t.layerDefinition&&(t.layerDefinition.definitionExpression&&(p.definitionExpression=t.layerDefinition.definitionExpression),t.layerDefinition.drawingInfo&&t.layerDefinition.drawingInfo.renderer&&(p.renderer=t.layerDefinition.drawingInfo.renderer)))}))):A.url.replace(/.*?:\/\//g,"")===(x+a).replace(/.*?:\/\//g,"")&&(p.title=A.title,p.popupInfo=A.popupInfo,p.definitionExpression=null,A.layerDefinition&&(A.layerDefinition.definitionExpression&&
(p.definitionExpression=A.layerDefinition.definitionExpression),A.layerDefinition.drawingInfo&&A.layerDefinition.drawingInfo.renderer&&(p.renderer=A.layerDefinition.drawingInfo.renderer))))}));return p},_getTableDetailsFromMap:function(x,a){var p={};this.map&&this.map.webMapResponse&&this.map.webMapResponse.itemInfo&&this.map.webMapResponse.itemInfo.itemData&&this.map.webMapResponse.itemInfo.itemData.tables&&w.forEach(this.map.webMapResponse.itemInfo.itemData.tables,z.hitch(this,function(A){A.layerObject&&
A.url.replace(/.*?:\/\//g,"")===(x+a).replace(/.*?:\/\//g,"")&&(p.popupInfo=A.popupInfo,p.definitionExpression=null,A.layerDefinition&&A.layerDefinition.definitionExpression&&(p.definitionExpression=A.layerDefinition.definitionExpression))}));return p},_getSelectedThemeColor:function(){var x=this.appConfig.theme.name;if(this.appConfig&&this.appConfig.theme&&this.appConfig.theme.customStyles)this.config.selectedThemeColor=this.appConfig.theme.customStyles.mainBackgroundColor;else{var a=this.appConfig&&
this.appConfig.theme&&this.appConfig.theme.styles?this.appConfig.theme.styles[0]:"default";da({url:"./themes/"+x+"/manifest.json",content:{f:"json"},handleAs:"json",callbackParamName:"callback"}).then(z.hitch(this,function(p){var A;if(p&&p.styles&&0<p.styles.length)for(A=0;A<p.styles.length;A++){var t=p.styles[A];if(t.name===a){this.config.selectedThemeColor=t.styleColor;break}}this.config.selectedThemeColor||(this.config.selectedThemeColor="#000000")}),z.hitch(this,function(){this.config.selectedThemeColor=
"#000000"}))}},_connectSelectLocationHandler:function(){m(this.selectLocation,"click",z.hitch(this,function(){this._onSelectLocationClick()}));m(this.selectLocation,"keydown",z.hitch(this,function(x){x.keyCode!==fa.ENTER&&x.keyCode!==fa.SPACE||this._onSelectLocationClick()}))},_onSelectLocationClick:function(){b.contains(this.selectLocation,"esriCTSelectLocationActive")?this._disconnectMapEventHandler():(b.replace(this.selectLocation,"esriCTSelectLocationActive","esriCTSelectLocation"),this._connectMapEventHandler())},
_getDataSeriesAlias:function(x){var a;var p=x.chartConfig.dataSeriesField.split(",");if(x.layerDetails.relatedLayerInfo&&x.layerDetails.relatedLayerInfo.fields&&0<x.layerDetails.relatedLayerInfo.fields.length){x=x.layerDetails.relatedLayerInfo.fields;var A=w.map(x,function(Q){return Q&&Q.name});var t=[];var D=p.length;for(a=0;a<D;a++){var J=A.indexOf(p[a]);-1<J&&(x[J].alias?t.push(x[J].alias):t.push(x[J].name))}return t}},_createWidgetAccessible:function(){this._setFirstFocusNode();this._setLastFocusNode();
this._searchInstance&&this._searchInstance.attachTabEventToSearchMenuItems()},_setFirstFocusNode:function(){if(this._hasMulitpleSourcesInSearch){if(this._searchInstance&&this._searchInstance.search&&this._searchInstance.search.sourcesBtnNode&&(ca.initFirstFocusNode(this.domNode,this._searchInstance.search.sourcesBtnNode),this._setFocusOnFirstNode)){this._setFocusOnFirstNode=!1;var x=this._searchInstance.search.sourcesBtnNode}}else this._searchInstance&&this._searchInstance.search&&this._searchInstance.search.inputNode&&
(ca.initFirstFocusNode(this.domNode,this._searchInstance.search.inputNode),this._setFocusOnFirstNode&&(this._setFocusOnFirstNode=!1,x=this._searchInstance.search.inputNode));ca.isAutoFocusFirstNodeWidget(this)&&ba.focus(x)},_setLastFocusNode:function(){if(b.contains(this.errorNode,"esriCTHidden")){var x=g(".esriCTChartTitle",this.domNode);if(x=x[x.length-1]){if(b.contains(x,"esriCTChartSelected")){var a=g(".esriCTLayoutContent",x.parentNode);if(0<a.length){x=a[a.length-1];a=g(".dijitCheckBox",x);
0<a.length&&w.forEach(a,z.hitch(this,function(p){p=na.getEnclosingWidget(p);""!==p&&null!==p&&void 0!==p&&this._attachTabEventToCheckbox(p)}));if(a&&0<a.length&&a[0].childNodes&&0<a[0].childNodes.length){ca.initLastFocusNode(this.domNode,a[0].childNodes[0]);return}ca.initLastFocusNode(this.domNode,x);return}}ca.initLastFocusNode(this.domNode,x)}else this.config.generalSettings.showLocationTool&&this.selectLocation?ca.initLastFocusNode(this.domNode,this.selectLocation):this._searchInstance&&this._searchInstance.search&&
this._searchInstance.search.submitNode&&ca.initLastFocusNode(this.domNode,this._searchInstance.search.submitNode)}else ca.initLastFocusNode(this.domNode,this.errorNode),ba.focus(this.errorNode)},_attachTabEventToCheckbox:function(x){this.own(m(x,"keydown",z.hitch(this,function(a){a.keyCode!==fa.TAB||a.shiftKey||(oa.stop(a),this._setFocusOnFirstNode=!0,this._setFirstFocusNode())})))},_initWorkflow:function(x){var a=this._getSelectedGeocoder(x);x.isFeatureFromMapClick&&this._selectedLocation&&this._selectedLocation.geometry&&
this._locatorInstance&&this._locatorInstance.locationToAddress(q.webMercatorToGeographic(this._selectedLocation.geometry),100);x&&x.feature&&x.feature.geometry&&("point"===x.feature.geometry.type&&this._highlightSelectedLocation(x.feature,!0),a&&this._updateOpenPanels(a),this._loadFeatures(this._selectedLocation))},_zoomToFeature:function(){var x=new y;var a=this._prevFeature.feature.geometry;if("point"===a.type){if(this._prevFeature.hasOwnProperty("zoomScale"))var p=this._prevFeature.zoomScale;p&&
this.map.getScale()>p?p=Z.getExtentForScale(this.map,this._prevFeature.zoomScale).centerAt(a):(p=this.map.extent.centerAt(a))||(p=this.pointToExtent(this.map,a,20))}else p=a.getExtent().expand(1.5);p&&this.map.setExtent(p).then(z.hitch(this,function(){x.resolve()}));return x.promise},_refreshAllFeatureLayers:function(){var x=this._layerInfosObj.getLayerInfoArray();w.forEach(x,z.hitch(this,function(a){this.map.getLayer(a.id).refresh()}))}})});