@arcgis/charts-components 5.2.0-next.23 → 5.2.0-next.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import t from"./QUR7IUKK.js";import s from"./RAUYMTSM.js";import r from"./F2N6CMAL.js";import q from"./GP5MHPDX.js";import o from"./XST7FY7F.js";import n from"./JF7YQCM6.js";import l from"./EUGGSDEV.js";import j from"./LVSNOD77.js";import i from"./CU56A45C.js";import g from"./KXKOTDCQ.js";import f from"./WHBJYAT4.js";import e from"./YPFJW7NS.js";import d from"./GZU5HJCQ.js";import c from"./LZMLIBIH.js";import{i as h,j as y,k as p}from"./WNKDEOFZ.js";import a from"./3RA3JNKB.js";import{I as P,K as V,R as D,W as k,aa as E}from"./PAIRUVLU.js";import{l as b}from"./SP2IPHWF.js";import{a as L}from"./QP5UAIC6.js";import{a as w,b as m,f as F}from"./547RDEMV.js";export default $arcgis.t(([{rb:N,s:d},{a:M,b:x,d:I,n:U,o:W,p:j,q:q},{c:o},O,{b:R},{b:Te},{a:le,b:ge,c:ce,d:he},{b:ue,d:Se,f:_e},{b:Fe,d:xe,f:Ie},{d:pe,e:fe},{a:me,b:de},{d:T,e:B,f:z},{b:Be},ye,{a:X,b:Y,c:$,d:G,e:H,f:J,g:K,h:Q,i:Z,j:ee,k:ie,ka:te,l:se,la:u,ma:re,na:S,oa:A,pa:oe,qa:_,sa:C,ta:v,ua:ne,va:ae}])=>{var Ae=(t,e)=>e.series?.[t].assignToSecondValueAxis??!1,Ce=t=>{let{assign:e,seriesIndex:i,config:s,commonStrings:r}=t;e&&s.axes!==void 0&&!s.axes?.[2]&&(s.axes[2]=k(r,w.BarSeries)[1]),s.series&&s.series.forEach((a,c)=>{c===i?a.assignToSecondValueAxis=e:c!==i&&a?.assignToSecondValueAxis!==!0&&(a.assignToSecondValueAxis=!1)}),s.axes?.[2]&&!s.series.some(a=>a.assignToSecondValueAxis)&&s.axes.splice(2,1)},ve=(t,e)=>e.series?.[t]?.name,Oe=(t,e,i)=>{i.series?.[e]&&(i.series[e].name=t)},be=(t,e)=>{let i=e.series?.[t],s;return p(i)?s=i.fillSymbol?.color:h(i)&&(s=i.lineSymbol?.color),s},we=(t,e,i)=>{let s=i.series?.[e];s&&(p(s)?s.fillSymbol={...E(e),...s.fillSymbol,color:t}:h(s)&&(s.lineSymbol={...D(e),...s.lineSymbol,color:t}))},Pe=t=>t.series.map(e=>e.id),Ve=(t,e)=>{e.series?.sort((i,s)=>t.findIndex(r=>i.id===r)-t.findIndex(r=>s.id===r))},De=t=>t.stackedType??F.Side,ke=t=>{let{newStackedType:e,config:i,layerInfo:s,commonStrings:r}=t;if(i.stackedType=e,s!==void 0){let a=x({config:i,layerInfo:s,commonStrings:r,numericFields:S(i),aggregationType:u(i)});M(i,1,a)}i.axes?.[1]&&(e===F.Stacked100?i.axes[1].valueFormat=V():i.axes[1].valueFormat=P()),I({config:i,value:null,axisIndex:1,isMax:!1}),I({config:i,value:null,axisIndex:1,isMax:!0})},Ee=t=>{let e,i=t.series.find(s=>(p(s)||h(s)||y(s))&&s.nullCategory!==void 0);return(p(i)||h(i)||y(i))&&(e=i?.nullCategory),e},Ne=(t,e)=>{t.series.forEach(i=>{(p(i)||h(i)||y(i))&&(i.nullCategory=e)})},Le=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,f=(t,e,i,s)=>{for(var r=Me(e,i),a=t.length-1,c;a>=0;a--)(c=t[a])&&(r=c(e,i,r)||r);return r&&Le(e,i,r),r},g=class extends O{get temporalBinningSize(){return X(this._config)}set temporalBinningSize(e){J(e,this._config)}get temporalBinningUnit(){return Y(this._config)}set temporalBinningUnit(e){Q(e,this._config)}get timeAggregationType(){return $(this._config)}set timeAggregationType(e){Z(e,this._config)}get trimIncompleteTimeInterval(){return G(this._config)}set trimIncompleteTimeInterval(e){ee(e,this._config)}get nullPolicy(){return H(this._config)}set nullPolicy(e){K(e,this._config)}resetTimeInterval(){ie(this._config)}};f([o],g.prototype,"temporalBinningSize");f([o],g.prototype,"temporalBinningUnit");f([o],g.prototype,"timeAggregationType");f([o],g.prototype,"trimIncompleteTimeInterval");f([o],g.prototype,"nullPolicy");f([o],g.prototype,"resetTimeInterval");var Ue=Object.defineProperty,We=Object.getOwnPropertyDescriptor,l=(t,e,i,s)=>{for(var r=We(e,i),a=t.length-1,c;a>=0;a--)(c=t[a])&&(r=c(e,i,r)||r);return r&&Ue(e,i,r),r},n=class extends O{constructor(){super(...arguments),this._xAxisField="",this._aggregationType=m.Count,this._splitByField="",this._numericFields=[]}get xAxisField(){return this._xAxisField}set xAxisField(e){if(this._xAxisField=e,e.trim()===""||e===d){let i=this.numericFields;this.resetConfig(),this.numericFields=i}this.processSeriesRebuild("xAxisField")}get aggregationType(){return this._aggregationType}set aggregationType(e){this._aggregationType=e,oe({aggregationType:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}get splitByField(){return this._splitByField}set splitByField(e){this.layerInfo?.layerFieldsInfo&&W(this.layerInfo?.layerFieldsInfo,e)&&(this._splitByField=e,this.processSeriesRebuild("splitByField"))}get numericFields(){return this._numericFields}set numericFields(e){typeof e=="string"&&(e=[e]);let i=j(this.layerInfo?.layerFieldsInfo??[],e),s=(this.xAxisField===""||this.xAxisField===d)&&e.length===0;if(i&&!s){let r=N(this.layerInfo.layer).idField;e.length===0&&r!==void 0?(e.push(r),this._aggregationType=m.Count):this._aggregationType===m.Count&&e.length>=1&&r!==void 0&&!e.includes(r)&&(this._aggregationType=m.Sum),this._numericFields=e,this.numericFields.length>1&&(this._splitByField=""),this.processSeriesRebuild("numericFields")}else s&&this.resetConfig()}getAssignToSecondValueAxis(e){return Ae(e,this._config)}setAssignToSecondValueAxis(e,i){Ce({assign:e,seriesIndex:i,config:this._config,commonStrings:this.commonStrings})}getSortOrder(){return A(this._config)[0]}setSortOrder(e,i){B(e,this._config,i)}async getCustomSortValues(){return await v({config:this._config,layerInfo:this.layerInfo,errorStrings:this.commonStrings?.errorStrings})}async setDataFilters(e){super.setDataFilters(e);let i=A(this._config)[0];if(i===L.customSort){this.startAsyncUpdate();let s=await v({config:this._config,layerInfo:this.layerInfo,errorStrings:this.commonStrings?.errorStrings});B(i,this._config,s),this.finishAsyncUpdate()}this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}get orderByList(){return T(this._config)}set orderByList(e){!R(this._config)&&C(e,this._config)}updateSeriesFromLayerFilter(){this.layerInfo!==void 0&&_(this.getBuildNewSeriesProps())}get binTemporalData(){return ne(this._config)}set binTemporalData(e){ae(e,this._config)}getSeriesName(e){return ve(e,this._config)}setSeriesName(e,i){Oe(e,i,this._config)}getSeriesColor(e){return be(e,this._config)}setSeriesColor(e,i){we(e,i,this._config)}getOrderOfSeries(){return Pe(this._config)}setOrderOfSeries(e){Ve(e,this._config)}get stackedType(){return De(this._config)}set stackedType(e){ke({newStackedType:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}moveSeries(e,i){let s=this.getOrderOfSeries(),[r]=s.splice(e,1);s.splice(i,0,r),this.setOrderOfSeries(s)}moveCustomSortValuesInOrderByList(e,i){let s=T(this._config),[r]=s.splice(e,1);s.splice(i,0,r),C(s,this._config)}get nullCategory(){return Ee(this._config)}set nullCategory(e){let i=this.nullCategory;b(i,e)||Ne(this._config,e)}setupLocalProps(){this._xAxisField=z(this._config),this._aggregationType=u(this._config),this._splitByField=re(this._config),this._numericFields=S(this._config)}resetConfig(){let e=this._config.id;this._config=this.generateDefaultConfig(),this._config.id=e,this.setupLocalProps(),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}usingSplitBy(){return this.splitByField!==""&&this.numericFields.length<=1}async processSeriesRebuild(e){this.usingSplitBy()?(this.startAsyncUpdate(),await this.fetchSplitByFieldInfos(),_(this.getBuildNewSeriesProps()),this.finishAsyncUpdate()):_(this.getBuildNewSeriesProps()),this.setupLocalProps(),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange")),this.emitConfigUpdate(e)}async fetchSplitByFieldInfos(){return this.splitByFieldInfos=await U({config:this._config,layer:this.layerInfo.layer,layerFieldsInfo:this.layerInfo.layerFieldsInfo,xAxisField:this._xAxisField!==d?this._xAxisField:void 0,splitByField:this._splitByField,fetchNullValues:this._config?.series?.[0]?.query?.fetchNullValues,errorStrings:this.commonStrings?.errorStrings}),this.splitByFieldInfos}getBuildNewSeriesProps(){return{xAxisFieldName:this._xAxisField,splitByField:this._splitByField,numericFields:this._numericFields,aggregationType:this._aggregationType,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings,splitByFieldInfos:this.splitByFieldInfos}}generateChartTitle(){return this.layerInfo!==void 0?te(this._config,this.layerInfo,this.commonStrings):""}generateYAxisTitle(){return this.layerInfo!==void 0?x({config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings,numericFields:S(this._config),aggregationType:u(this._config)}):""}};l([o],n.prototype,"aggregationType");l([o],n.prototype,"setAssignToSecondValueAxis");l([o],n.prototype,"setSortOrder");l([o],n.prototype,"setDataFilters");l([o],n.prototype,"orderByList");l([o],n.prototype,"binTemporalData");l([o],n.prototype,"setSeriesName");l([o],n.prototype,"setSeriesColor");l([o],n.prototype,"setOrderOfSeries");l([o],n.prototype,"stackedType");l([o],n.prototype,"moveSeries");l([o],n.prototype,"moveCustomSortValuesInOrderByList");l([o],n.prototype,"nullCategory");l([o],n.prototype,"resetConfig");var je=[me,le,ge,ce,Be,he,Te,ye,de,g,Fe,pe,xe,fe,ue,Se,_e,Ie,se];q(n,je);return{a:ve,b:Oe,c:we,d:n}},a,c,d,e,f,g,i,j,l,n,o,q,r,s,t)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import d from"./KCJKQ44K.js";import c from"./D7XVCB2H.js";import b from"./YPFJW7NS.js";import a from"./GZU5HJCQ.js";export default $arcgis.t(([{c:r},f,{c:h},{a:p,b:S,c:l,d:_,e:y,f:d,g:m,h:k,i:M,j:b,k:L,l:u,m:C,n:c,o:x,p:A,q:V,r:v,s:I}])=>{var j=Object.defineProperty,z=Object.getOwnPropertyDescriptor,t=(n,e,i,O)=>{for(var o=z(e,i),a=n.length-1,g;a>=0;a--)(g=n[a])&&(o=g(e,i,o)||o);return o&&j(e,i,o),o},s=class extends f{getSeriesLineStyle(e){return p(e,this._config)}setSeriesLineStyle(e,i){S(e,i,this._config)}getSeriesLineWidth(e){return l(e,this._config)}setSeriesLineWidth(e,i){_(e,i,this._config)}getSeriesMarkerColor(e){return y(e,this._config)}setSeriesMarkerColor(e,i){d(e,i,this._config)}getSeriesMarkerStyle(e){return m(e,this._config)}setSeriesMarkerStyle(e,i){k(e,i,this._config)}getSeriesMarkerSize(e){return M(e,this._config)}setSeriesMarkerSize(e,i){b(e,i,this._config)}isLineSmoothed(e){return L(e,this._config)}setLineSmoothed(e,i){u({smoothed:e,seriesIndex:i,config:this._config})}getConnectLines(e){return v(e,this._config)}setConnectLines(e,i){I({connect:e,seriesIndex:i,config:this._config})}isAreaVisible(e){return C(e,this._config)}setAreaVisible(e,i){c({visible:e,seriesIndex:i,config:this._config})}isMarkerVisible(e){return x(e,this._config)}setMarkerVisible(e,i){A({visible:e,seriesIndex:i,config:this._config})}getAreaColor(e){return V(e,this._config)}setAreaColor(e,i){c({visible:!0,seriesIndex:i,config:this._config}),h(e,i,this._config)}};t([r],s.prototype,"setSeriesLineStyle");t([r],s.prototype,"setSeriesLineWidth");t([r],s.prototype,"setSeriesMarkerColor");t([r],s.prototype,"setSeriesMarkerStyle");t([r],s.prototype,"setSeriesMarkerSize");t([r],s.prototype,"setLineSmoothed");t([r],s.prototype,"setConnectLines");t([r],s.prototype,"setAreaVisible");t([r],s.prototype,"setMarkerVisible");t([r],s.prototype,"setAreaColor");return s},a,b,c,d)
2
+ import d from"./KCJKQ44K.js";import c from"./7WMOXCPU.js";import b from"./YPFJW7NS.js";import a from"./GZU5HJCQ.js";export default $arcgis.t(([{c:r},f,{c:h},{a:p,b:S,c:l,d:_,e:y,f:d,g:m,h:k,i:M,j:b,k:L,l:u,m:C,n:c,o:x,p:A,q:V,r:v,s:I}])=>{var j=Object.defineProperty,z=Object.getOwnPropertyDescriptor,t=(n,e,i,O)=>{for(var o=z(e,i),a=n.length-1,g;a>=0;a--)(g=n[a])&&(o=g(e,i,o)||o);return o&&j(e,i,o),o},s=class extends f{getSeriesLineStyle(e){return p(e,this._config)}setSeriesLineStyle(e,i){S(e,i,this._config)}getSeriesLineWidth(e){return l(e,this._config)}setSeriesLineWidth(e,i){_(e,i,this._config)}getSeriesMarkerColor(e){return y(e,this._config)}setSeriesMarkerColor(e,i){d(e,i,this._config)}getSeriesMarkerStyle(e){return m(e,this._config)}setSeriesMarkerStyle(e,i){k(e,i,this._config)}getSeriesMarkerSize(e){return M(e,this._config)}setSeriesMarkerSize(e,i){b(e,i,this._config)}isLineSmoothed(e){return L(e,this._config)}setLineSmoothed(e,i){u({smoothed:e,seriesIndex:i,config:this._config})}getConnectLines(e){return v(e,this._config)}setConnectLines(e,i){I({connect:e,seriesIndex:i,config:this._config})}isAreaVisible(e){return C(e,this._config)}setAreaVisible(e,i){c({visible:e,seriesIndex:i,config:this._config})}isMarkerVisible(e){return x(e,this._config)}setMarkerVisible(e,i){A({visible:e,seriesIndex:i,config:this._config})}getAreaColor(e){return V(e,this._config)}setAreaColor(e,i){c({visible:!0,seriesIndex:i,config:this._config}),h(e,i,this._config)}};t([r],s.prototype,"setSeriesLineStyle");t([r],s.prototype,"setSeriesLineWidth");t([r],s.prototype,"setSeriesMarkerColor");t([r],s.prototype,"setSeriesMarkerStyle");t([r],s.prototype,"setSeriesMarkerSize");t([r],s.prototype,"setLineSmoothed");t([r],s.prototype,"setConnectLines");t([r],s.prototype,"setAreaVisible");t([r],s.prototype,"setMarkerVisible");t([r],s.prototype,"setAreaColor");return s},a,b,c,d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import u from"./GOZIQ6A2.js";import t from"./45BVILKF.js";import{a as f}from"./IVLVCLDE.js";import{a as ae}from"./L7CMLBHB.js";import{a as $,b as W,e as ee}from"./OBPAQN4H.js";import{a as ie}from"./AQIB3VEP.js";import{a as k}from"./S7Z4HRW7.js";import{a as se}from"./IHO3OLL3.js";import s from"./U7ZGT3IG.js";import{a as P}from"./JHANH4UG.js";import{d as n}from"./AK7X7SGI.js";import r from"./WTOC7IBH.js";import q from"./G5TRNV2I.js";import p from"./MSN54T3T.js";import m from"./NOAJPX72.js";import l from"./F2N6CMAL.js";import j from"./GP5MHPDX.js";import{b as B,c as L,i as Y,l as w,p as D}from"./THTYR6IL.js";import i from"./WHBJYAT4.js";import g from"./OQWDZSTM.js";import"./Y7HBWU3M.js";import e from"./GZU5HJCQ.js";import d from"./W6CKM3J3.js";import b from"./LZMLIBIH.js";import"./WNKDEOFZ.js";import a from"./3RA3JNKB.js";import{d as x,e as O}from"./EZV7JSQJ.js";import{C as v,c as R,q as T}from"./3TBK72EK.js";import"./PAIRUVLU.js";import"./KX7KGXKQ.js";import{l as S}from"./SP2IPHWF.js";import"./IHHPUKGG.js";import{A as V,B as _,C as h,D as z,F as M,H as U,g as N,i as c,n as C,z as A}from"./RIM4HLHN.js";import{a as J}from"./N3MM26EK.js";import"./KDJ5RVHA.js";import"./QP5UAIC6.js";import"./XJFVSX2E.js";import{a as o,k as H}from"./547RDEMV.js";import"./U67P6YAZ.js";export default $arcgis.t(([{substitute:le},{Ga:X,Nb:K,gb:Z,kb:G,nc:j},,,,,{b:I},,{a:Q},,,,,{r:te},{e:y,f:q},{b:E}])=>{var d={chartUIComponent:"chart-ui-component",tabBar:"tab-bar",tab:"tab"};function re(m,e){let i=new Set,t=e;return m?.forEach((a,s)=>{let r=a.chartId;(i.has(r)||r===void 0||r==="")&&(a.chartId=`Chart_${Date.now()}_${s}`,e===r&&(t=a.chartId)),i.add(r)}),t}function ne(m,e,i){return m?.filter(t=>T(i,t.config)&&t.layer?.id===e)??[]}function ce(m){let{modelList:e,layerList:i,activeLayerId:t,disableEditing:a}=m,s=new Map;return e?.forEach(r=>{let l=r.layer;l&&s.set(l.id,l)}),a||i.forEach(r=>s.set(r.id,r)),Array.from(s.values()).filter(r=>!t||r.id===t)}function he(m,e){m.forEach(i=>{e.forEach(t=>{i?.id===t.layer?.id&&oe(i,t)})})}function oe(m,e){let i=m;if(i){let t=[...i?.charts??[]],a=t?.findIndex(r=>r.id===e.chartId),s=!1;a!==void 0&&a>-1?(s=!S(t[a],e.config),t[a]=e.config):i&&!I(e.config)&&(s=!0,t.push(e.config)),s&&(i.charts=t)}}function de(m,e){let i=m;if(i){let t=[...i.charts??[]],a=t.findIndex(s=>s.id===e);a>-1&&(t.splice(a,1),i.charts=t)}}function me(m,e){let i=m;if(i){let t=[...i.charts??[]];t=v({arrayA:t,arrayB:e.map(a=>a.config),getKey:a=>a.id??a.title?.content.text??""}),i.charts=t}}var pe=N`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{display:flex;flex-direction:column;flex:1 1 auto;overflow:hidden;height:inherit;max-height:100%}.chart-ui-component{overflow-y:auto;overflow-x:hidden}.label{display:flex;margin-left:1rem;margin-bottom:.5rem;justify-content:space-between}.text{display:flex;margin-left:1rem;width:calc(100% - 1.5rem);height:2rem;margin-bottom:.5rem;justify-content:space-between}.field-list{max-height:50vh;overflow-y:scroll}.row{padding:.5rem}.bin-count-container{display:flex;width:calc(100% - 1rem);padding:.5rem}.bin-count-slider{margin-left:1rem;width:calc(90% - 1rem)}.bin-count-input{margin-left:1rem;height:2rem;width:2rem}.bin-row{padding:.5rem 0 .5rem .5rem}.tab-bar{display:flex}.tab{flex:1;height:2.5rem}`,F=class extends _{constructor(){super(),this.selectChartTypePopover=null,this.chartsListFlowItem=A(),this.supportedChartTypes=[o.BarSeries,o.BoxPlotSeries,o.LineSeries,o.PieSeries,o.HistogramSeries,o.ScatterSeries,o.HeatSeries],this._messages=P(),this.commonStrings=P({name:"common",blocking:!0}),this.chartDataProcessComplete=e=>{let i=e,{chartData:t,model:a}=i.detail,s=this.getModel(this.selectedChartId);if(a?.isSameChartAs(s))switch(s?.chartType){case o.HistogramSeries:if(this.chartData=t,a&&(a.dataStore.chartData=t,O(a.layer))){let r=a,l=t?.bins?.length;l!==void 0&&r.binCount!==l&&(r.binCount=l)}break;case o.PieSeries:{this.chartData=t,a&&(a.dataStore.chartData=t);break}case o.ScatterSeries:{let r=t,{dataItems:l,r2:g,aggregated:u}=r,p=g;Number.isFinite(g)||(p=void 0),this.r2=p,Y(a)&&(a.dataStore.r2=p,a.dataStore.aggregated=u,u&&(a.additionalTooltipField=void 0)),this.calculatedDataMinMaxBounds=this.getDataExtent(l),a&&(a.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}case o.LineSeries:case o.BarSeries:{let{dataItems:r,timeIntervalInfo:l}=t;if((L(s)||B(s)&&s.binTemporalData)&&(l?.size!==void 0&&s.temporalBinningSize!==l?.size&&(s.temporalBinningSize=l?.size),l?.unit!==void 0&&s.temporalBinningUnit!==l?.unit&&l?.unit!==H.Quarter&&(s.temporalBinningUnit=l?.unit),l?.size!==void 0&&l?.unit!==void 0&&ee($,{size:l.size,unit:l.unit})),this.calculatedDataMinMaxBounds=this.getDataExtent(r),a&&(a.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds),B(s)){let g=s.xAxisField,u=r.some(b=>b[g]===null),p=s.nullCategory;u&&p===void 0&&(s.nullCategory=R.nullCategory)}break}}},this.chartAxesMinMaxChange=e=>{let i=e,{bounds:t,model:a}=i.detail,s=this.getModel(this.selectedChartId),r=a?.isSameChartAs(s),l=s?.chartType;if(r)switch(l){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:case o.ScatterSeries:this.calculatedMinMaxBounds=t,a&&(a.dataStore.calculatedMinMaxBounds=t),this.updateAxesBoundsInAppState(t);break}},this.chartSeriesColorChange=e=>{let i=e,{data:t,model:a}=i.detail,s=this.getModel(this.selectedChartId);if(a?.isSameChartAs(s))switch(s?.chartType){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:this.seriesColor=t,a&&(a.dataStore.seriesColor=t);break;case o.PieSeries:{let r=new Map([[0,t]]);this.seriesColor=r,a&&(a.dataStore.seriesColor=r);break}case o.ScatterSeries:}},this.chartNoRenderPropChange=e=>{let i=e,{propName:t,value:a,model:s}=i.detail,r=this.modelList.find(l=>s?.isSameChartAs(l));if(r)switch(t){case"rotation":typeof a=="boolean"&&Q(r)&&(r.rotated=a);break;case"legendPosition":typeof a=="string"&&D(r)&&(r.legendPosition=a);break;case"legendVisibility":typeof a=="boolean"&&D(r)&&(r.legendVisibility=a);break}},this.chartLegendItemVisibilityChange=e=>{let i=e,{legendItemVisibility:t,model:a}=i.detail,s=this.modelList.find(r=>a?.isSameChartAs(r));s?.setSeriesVisibility(t),w(s)&&((s.getMinBound(1)===null||Number.isNaN(s.getMinBound(1)))&&s.setMinBound(null,1),(s.getMaxBound(1)===null||Number.isNaN(s.getMaxBound(1)))&&s.setMaxBound(null,1),L(s)&&((s.getMinBound(0)===null||Number.isNaN(s.getMinBound(0)))&&s.setMinBound(null,0),(s.getMaxBound(0)===null||Number.isNaN(s.getMaxBound(0)))&&s.setMaxBound(null,0)))},this.onSelectChartTypeChange=e=>{this.currentChartTypeText="",this.calculatedDataMinMaxBounds=void 0,this.calculatedMinMaxBounds=void 0,this.removeSelectChartTypePopover();let{selectedModelType:i,layerId:t}=e.target;i!==void 0&&(this.allowChartSyncing=!0,this.arcgisChartsConfigNewChart.emit({key:"key",chartType:i,layerId:t}))},this.onAddChartClose=()=>{this.removeSelectChartTypePopover()},this.onModelConfigChange=e=>{if(this.syncChartsToLayers&&this.allowChartSyncing){let i=e.target;oe(i?.layer,i)}this.requestUpdate()},this.allowChartSyncing=!1,this.currentChartTypeText="",this.modelList=[],this.layerList=[],this.disableEditing=!1,this.syncChartsToLayers=!1,this.close=!1,this.usePopupTemplateFieldsInfo=!1,this.panelNumber=0,this.filterBySelection=!1,this.arcgisChartsConfigChartViewChartClose=C(),this.arcgisChartsConfigModelListChange=C(),this.arcgisChartsConfigNewChart=C(),this.arcgisChartsConfigPanelNumberChange=C(),this.arcgisChartsConfigSelectedChartChange=C(),this.addChartEventListeners(),this.listen("arcgisChartsConfigModelListReorder",this.modelListReorderChangeListener)}static{this.properties={selectedPanel:16,currentChartTypeText:16,messageOverrides:0,modelList:[0,{hasChanged:y}],layerList:[0,{hasChanged:y}],selectedChartId:1,activeLayerId:1,disableEditing:5,syncChartsToLayers:5,timeZone:1,headerTitle:1,close:5,chartData:[0,{hasChanged:y}],r2:9,calculatedDataMinMaxBounds:[0,{hasChanged:y}],calculatedMinMaxBounds:[0,{hasChanged:y}],seriesColor:[0,{hasChanged:q}],popoverPlacement:1,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5,panelNumber:9,filterBySelection:5}}static{this.styles=pe}async setFocus(){await this.chartsListFlowItem.value?.setFocus()}async load(){await this.layerListChange();let e=this.getModel(this.selectedChartId);this.setEventBasedPropsFromModelData(e)}willUpdate(e){e.has("layerList")&&this.layerListChange(),e.has("panelNumber")&&this.panelNumberChange(this.panelNumber),e.has("modelList")&&this.modelListChange(this.modelList,e.get("modelList")),e.has("selectedChartId")&&this.selectedChartIdChange(this.selectedChartId)}disconnectedCallback(){super.disconnectedCallback(),this.clearPartialModels(),this.removeSelectChartTypePopover()}modelListReorderChangeListener(e){let{modelList:i}=e.detail;if(this.modelList=v({arrayA:this.modelList,arrayB:i,getKey:t=>t.chartId??t.titleText??""}),this.syncChartsToLayers){let t=i.find(a=>a.layer?.id!==void 0)?.layer?.id;if(t){let a=this.layerList.find(s=>s.id.toString()===t);a&&me(a,i)}}}async layerListChange(){let e=[],i=this.layerList.map(a=>a.id.toString()),t=[...this.modelList.filter(a=>i.includes(a.layer?.id??""))];for(let a of this.layerList??[]){if(a.type==="sublayer"){let r=await a.createFeatureLayer();if(!r)continue;a=r}let s=a.charts;for(let r of s??[]){let l=await J({layer:a,config:r,commonStrings:this.commonStrings});l!==void 0&&e.push(l)}}re(e),e.forEach(a=>{t.find(s=>s.isSameChartAs(a))===void 0&&t.push(a)}),t=t.filter(a=>!K(a.config)),this.modelList=t}modelListChange(e,i){this.selectedChartId=re(e,this.selectedChartId),i?.forEach(a=>{a.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}),e.forEach(a=>{a.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)});let t=this.getModel(this.selectedChartId);this.currentChartTypeText=t?.chartType!==void 0?E({chartType:t.chartType,commonStrings:this.commonStrings,config:t.config}):"",this.syncChartsToLayers&&this.allowChartSyncing&&he(this.layerList,e),this.arcgisChartsConfigModelListChange.emit({modelList:e})}selectedChartIdChange(e){this.selectedChartId===void 0&&(this.panelNumber=0),this.selectedPanel=n.Data;let i=this.getModel(e);this.setEventBasedPropsFromModelData(i),this.currentChartTypeText=i?.chartType!==void 0?E({chartType:i.chartType,commonStrings:this.commonStrings,config:i.config}):"",e!==void 0&&e!==$.selectedChartId&&($.selectedChartId=e),this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:i})}panelNumberChange(e){e===0?this.clearPartialModels():e===1&&this.removeSelectChartTypePopover(),this.arcgisChartsConfigPanelNumberChange.emit({panelNumber:e,modelList:this.modelList})}addChartEventListeners(){this.listenOn(document,f.DataProcessComplete,this.chartDataProcessComplete),this.listenOn(document,f.AxesMinMaxChange,this.chartAxesMinMaxChange),this.listenOn(document,f.SeriesColorChange,this.chartSeriesColorChange),this.listenOn(document,f.NoRenderPropChange,this.chartNoRenderPropChange),this.listenOn(document,f.LegendItemVisibilityChange,this.chartLegendItemVisibilityChange)}getDataExtent(e){let i=this.getModel(this.selectedChartId)?.config,t=[];if(i!==void 0&&e!==void 0){let a=j({chartConfig:i,chartData:e}),{minY:s,maxY:r,minX:l,maxX:g}=a;t=[{isXAxis:!0,minimum:l,maximum:g},{isXAxis:!1,minimum:s,maximum:r}]}return t}updateAxesBoundsInAppState(e){e?.forEach(i=>{let{isXAxis:t,maximum:a,minimum:s}=i,r=this.getModel(this.selectedChartId);if(r!==void 0&&w(r)&&this.selectedChartId!==void 0){let l=new ae(r,t),g=W({chartId:this.selectedChartId,isXAxis:t,isLogarithmic:l.getLogarithmic()}),u=$.chartAxesBoundDataMap;u[this.selectedChartId]===void 0&&(u[this.selectedChartId]={});let p=u[this.selectedChartId]?.[g],b={defaultMinBound:p?.defaultMinBound===p?.currMinBound?s:p?.defaultMinBound,currMinBound:s,defaultMaxBound:p?.defaultMaxBound===p?.currMaxBound?a:p?.defaultMaxBound,currMaxBound:a};!S(p,b)&&this.selectedChartId!==void 0&&u?.[this.selectedChartId]!==void 0&&(u[this.selectedChartId][g]=b)}})}getPlacement(){let e;return this.popoverPlacement!==void 0?e=this.popoverPlacement:e=this.modelList?.filter(i=>T(X,i.config)).length<=2?"bottom":"top",e}onBackFlow(){this.panelNumber-=1}async onAddChartClick(e){let{referenceElement:i,layerId:t,layerType:a}=e.detail,s=!0;if(x(a)&&t){let r=this.layerList.find(l=>l.id===t);x(r?.type)&&(s=!!(await G(r))?.attributeTable)}this.setupSelectChartTypePopover(i,t,a,s)}setupSelectChartTypePopover(e,i,t,a=!0){let s=this.getPlacement();this.removeSelectChartTypePopover(),this.selectChartTypePopover=M(c`<arcgis-charts-config-select-chart-type-popover .referenceElement=${e} open .layerId=${i} .layerType=${t} .isRasterBarChartSupported=${a} .popoverPlacement=${s} @arcgisChartsConfigPopoverClose=${this.onAddChartClose} @arcgisChartsConfigSelectChartTypeChange=${this.onSelectChartTypeChange}></arcgis-charts-config-select-chart-type-popover>`),!document.body.contains(this.selectChartTypePopover)&&this.selectChartTypePopover!==null&&document.body.appendChild(this.selectChartTypePopover)}getModel(e){return this.modelList?.find(i=>i.chartId===e)}removeSelectChartTypePopover(){this.selectChartTypePopover!==void 0&&(this.selectChartTypePopover?.remove(),this.selectChartTypePopover=se(this.selectChartTypePopover))}clearPartialModels(){this.modelList=this.modelList.filter(e=>!I(e.config))}onViewChartDelete(e){let{chartId:i}=e.detail;if(i!==void 0){let t=this.modelList.find(s=>s.chartId===i),a=this.layerList.find(s=>s.id===t?.layer?.id);this.modelList=[...this.modelList.filter(s=>s.chartId!==i)],a&&this.syncChartsToLayers&&this.allowChartSyncing&&de(a,i)}}onViewChartsSelect(e){this.selectedChartId===e.detail.chartId&&(this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:this.getModel(this.selectedChartId)})),this.selectedChartId=e.detail.chartId}onViewChartsEdit(e){this.onViewChartsSelect(e),this.panelNumber=1}onViewChartClose(){this.close=!0,this.removeSelectChartTypePopover(),this.arcgisChartsConfigChartViewChartClose.emit()}setEventBasedPropsFromModelData(e){this.chartData=e?.dataStore.chartData,this.r2=e?.dataStore.r2,this.seriesColor=e?.dataStore.seriesColor,this.calculatedMinMaxBounds=e?.dataStore.calculatedMinMaxBounds,this.calculatedDataMinMaxBounds=e?.dataStore.calculatedDataMinMaxBounds}createTooltip(e){let i=e.target,t="";switch(i.icon){case"configure":t=this._messages.data??"";break;case"graph-bar-stacked":case"graph-line-series":case"box-chart-series":t=this._messages.series??"";break;case"graph-pie-slice":t=this._messages.slices??"";break;case"graph-axis":t=this._messages.axes??"";break;case"graph-guides":t=this._messages.guides??"";break;case"palette":t=this._messages.format??"";break;case"text":t=this._messages.general??"";break;default:t="";break}this.tooltip=M(c`<calcite-tooltip style=${z({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${i} open placement=top>${t}</calcite-tooltip>`),document.body.appendChild(this.tooltip)}destroyTooltip(){te(this.tooltip)}renderViewCharts(){let e=ce({modelList:this.modelList,layerList:this.layerList,activeLayerId:this.activeLayerId,disableEditing:this.disableEditing});return ie(e,i=>i.id,i=>c`<arcgis-charts-config-view-charts .noGroup=${this.activeLayerId!==void 0} .modelList=${ne(this.modelList,i.id.toString(),x(i.type)?Z:this.supportedChartTypes)} .selectedChartId=${this.selectedChartId??""} .layer=${i} .disableEditing=${this.disableEditing} @arcgisChartsConfigViewChartSelect=${this.onViewChartsSelect} @arcgisChartsConfigViewChartEdit=${this.onViewChartsEdit} @arcgisChartsConfigViewChartDelete=${this.onViewChartDelete} @arcgisChartsConfigViewChartAddChart=${this.onAddChartClick}></arcgis-charts-config-view-charts>`)}render(){return this.close?null:c`<calcite-flow>${k("charts-list",c`<calcite-flow-item .selected=${this.panelNumber===0||this.disableEditing} .heading=${this.headerTitle??this._messages.defaultHeaderTitle} closable @calciteFlowItemClose=${this.onViewChartClose} ${V(this.chartsListFlowItem)}>${this.renderViewCharts()}</calcite-flow-item>`)}${this.panelNumber>=1&&!this.disableEditing?this.renderTabs():null}</calcite-flow>`}renderTabs(){let e=this.getModel(this.selectedChartId);return k("chart-edit",c`<calcite-flow-item .selected=${this.panelNumber>=1&&!this.disableEditing} @calciteFlowItemBack=${this.onBackFlow} .heading=${this._messages[this.selectedPanel??n.Data]} .description=${this.currentChartTypeText!==""&&this._messages.pageFlowTitle!==void 0?le(this._messages.pageFlowTitle,{chartName:e?.titleText??this.currentChartTypeText,layerName:e?.layer?.title??""}):""}>${e?.chartType!==void 0?c`<calcite-action-bar class=${h(d.tabBar)} layout=horizontal expand-disabled><calcite-action class=${h(d.tab)} icon=configure scale=s alignment=center .active=${this.selectedPanel===n.Data||this.selectedPanel===void 0} @click=${()=>{this.selectedPanel=n.Data}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>${e?.chartType===o.BarSeries?c`<calcite-action class=${h(d.tab)} icon=graph-bar-stacked scale=s alignment=center .active=${this.selectedPanel===n.Series} @click=${()=>{this.selectedPanel=n.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.LineSeries?c`<calcite-action class=${h(d.tab)} icon=graph-line-series scale=s alignment=center .active=${this.selectedPanel===n.Series} @click=${()=>{this.selectedPanel=n.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.BoxPlotSeries?c`<calcite-action class=${h(d.tab)} icon=box-chart-series scale=s alignment=center .active=${this.selectedPanel===n.Series} @click=${()=>{this.selectedPanel=n.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.PieSeries?c`<calcite-action class=${h(d.tab)} icon=graph-pie-slice scale=s alignment=center .active=${this.selectedPanel===n.Slices} @click=${()=>{this.selectedPanel=n.Slices}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType!==o.PieSeries&&e?.chartType!==o.HeatSeries?c`<calcite-action class=${h(d.tab)} icon=graph-axis scale=s alignment=center .active=${this.selectedPanel===n.Axes} @click=${()=>{this.selectedPanel=n.Axes}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType!==o.PieSeries&&e?.chartType!==o.HeatSeries?c`<calcite-action class=${h(d.tab)} icon=graph-guides scale=s alignment=center .active=${this.selectedPanel===n.Guides} @click=${()=>{this.selectedPanel=n.Guides}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}<calcite-action class=${h(d.tab)} icon=palette scale=s alignment=center .active=${this.selectedPanel===n.Format} @click=${()=>{this.selectedPanel=n.Format}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action><calcite-action class=${h(d.tab)} icon=text scale=s alignment=center .active=${this.selectedPanel===n.General} @click=${()=>{this.selectedPanel=n.General}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action></calcite-action-bar>`:null}${this.renderChartUIComponent()}</calcite-flow-item>`)}renderChartUIComponent(){let e=this.getModel(this.selectedChartId),i=e?.layer,t=null;if(e!==void 0&&!this.disableEditing)switch(e?.chartType){case o.BarSeries:t=c`<arcgis-charts-config-bar-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??n.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-bar-chart>`;break;case o.LineSeries:t=c`<arcgis-charts-config-line-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??n.Data} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-line-chart>`;break;case o.PieSeries:t=c`<arcgis-charts-config-pie-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .chartData=${this.chartData} .page=${this.selectedPanel??n.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor} .filterBySelection=${this.filterBySelection}></arcgis-charts-config-pie-chart>`;break;case o.HistogramSeries:t=c`<arcgis-charts-config-histogram class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??n.Data} .chartData=${this.chartData} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-histogram>`;break;case o.ScatterSeries:t=c`<arcgis-charts-config-scatter-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??n.Data} .r2=${this.r2} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-scatter-plot>`;break;case o.BoxPlotSeries:t=c`<arcgis-charts-config-box-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??n.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-box-plot>`;break;case o.HeatSeries:t=c`<arcgis-charts-config-heat-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??n.Data}></arcgis-charts-config-heat-chart>`;break}return t}};U("arcgis-charts-config-create-flow",F);return F},"intl",a,b,d,e,g,i,j,l,m,p,q,r,s,t,u)
2
+ import u from"./GOZIQ6A2.js";import t from"./RBAE74TA.js";import{a as f}from"./IVLVCLDE.js";import{a as ae}from"./L7CMLBHB.js";import{a as $,b as W,e as ee}from"./OBPAQN4H.js";import{a as ie}from"./AQIB3VEP.js";import{a as k}from"./S7Z4HRW7.js";import{a as se}from"./IHO3OLL3.js";import s from"./U7ZGT3IG.js";import{a as P}from"./JHANH4UG.js";import{d as n}from"./AK7X7SGI.js";import r from"./QUR7IUKK.js";import q from"./G5TRNV2I.js";import p from"./MSN54T3T.js";import m from"./NOAJPX72.js";import l from"./F2N6CMAL.js";import j from"./GP5MHPDX.js";import{b as B,c as L,i as Y,l as w,p as D}from"./THTYR6IL.js";import i from"./WHBJYAT4.js";import g from"./OQWDZSTM.js";import"./Y7HBWU3M.js";import e from"./GZU5HJCQ.js";import d from"./W6CKM3J3.js";import b from"./LZMLIBIH.js";import"./WNKDEOFZ.js";import a from"./3RA3JNKB.js";import{d as x,e as O}from"./EZV7JSQJ.js";import{C as v,c as R,q as T}from"./3TBK72EK.js";import"./PAIRUVLU.js";import"./KX7KGXKQ.js";import{l as S}from"./SP2IPHWF.js";import"./IHHPUKGG.js";import{A as V,B as _,C as h,D as z,F as M,H as U,g as N,i as c,n as C,z as A}from"./RIM4HLHN.js";import{a as J}from"./KOKJLIPK.js";import"./KDJ5RVHA.js";import"./QP5UAIC6.js";import"./XJFVSX2E.js";import{a as o,k as H}from"./547RDEMV.js";import"./U67P6YAZ.js";export default $arcgis.t(([{substitute:le},{Ga:X,Nb:K,gb:Z,kb:G,nc:j},,,,,{b:I},,{a:Q},,,,,{r:te},{e:y,f:q},{b:E}])=>{var d={chartUIComponent:"chart-ui-component",tabBar:"tab-bar",tab:"tab"};function re(m,e){let i=new Set,t=e;return m?.forEach((a,s)=>{let r=a.chartId;(i.has(r)||r===void 0||r==="")&&(a.chartId=`Chart_${Date.now()}_${s}`,e===r&&(t=a.chartId)),i.add(r)}),t}function ne(m,e,i){return m?.filter(t=>T(i,t.config)&&t.layer?.id===e)??[]}function ce(m){let{modelList:e,layerList:i,activeLayerId:t,disableEditing:a}=m,s=new Map;return e?.forEach(r=>{let l=r.layer;l&&s.set(l.id,l)}),a||i.forEach(r=>s.set(r.id,r)),Array.from(s.values()).filter(r=>!t||r.id===t)}function he(m,e){m.forEach(i=>{e.forEach(t=>{i?.id===t.layer?.id&&oe(i,t)})})}function oe(m,e){let i=m;if(i){let t=[...i?.charts??[]],a=t?.findIndex(r=>r.id===e.chartId),s=!1;a!==void 0&&a>-1?(s=!S(t[a],e.config),t[a]=e.config):i&&!I(e.config)&&(s=!0,t.push(e.config)),s&&(i.charts=t)}}function de(m,e){let i=m;if(i){let t=[...i.charts??[]],a=t.findIndex(s=>s.id===e);a>-1&&(t.splice(a,1),i.charts=t)}}function me(m,e){let i=m;if(i){let t=[...i.charts??[]];t=v({arrayA:t,arrayB:e.map(a=>a.config),getKey:a=>a.id??a.title?.content.text??""}),i.charts=t}}var pe=N`.hide{visibility:hidden}.am5-html-container{z-index:101!important}.am5-layer-1000{z-index:1000!important}.am5-layer-30{z-index:100!important}.show{display:block}.notifyPanel{flex:0 1 auto}.disable-interactions{pointer-events:none}.dim-text{color:var(--arcgis-charts-dim-text)}:host{display:flex;flex-direction:column;flex:1 1 auto;overflow:hidden;height:inherit;max-height:100%}.chart-ui-component{overflow-y:auto;overflow-x:hidden}.label{display:flex;margin-left:1rem;margin-bottom:.5rem;justify-content:space-between}.text{display:flex;margin-left:1rem;width:calc(100% - 1.5rem);height:2rem;margin-bottom:.5rem;justify-content:space-between}.field-list{max-height:50vh;overflow-y:scroll}.row{padding:.5rem}.bin-count-container{display:flex;width:calc(100% - 1rem);padding:.5rem}.bin-count-slider{margin-left:1rem;width:calc(90% - 1rem)}.bin-count-input{margin-left:1rem;height:2rem;width:2rem}.bin-row{padding:.5rem 0 .5rem .5rem}.tab-bar{display:flex}.tab{flex:1;height:2.5rem}`,F=class extends _{constructor(){super(),this.selectChartTypePopover=null,this.chartsListFlowItem=A(),this.supportedChartTypes=[o.BarSeries,o.BoxPlotSeries,o.LineSeries,o.PieSeries,o.HistogramSeries,o.ScatterSeries,o.HeatSeries],this._messages=P(),this.commonStrings=P({name:"common",blocking:!0}),this.chartDataProcessComplete=e=>{let i=e,{chartData:t,model:a}=i.detail,s=this.getModel(this.selectedChartId);if(a?.isSameChartAs(s))switch(s?.chartType){case o.HistogramSeries:if(this.chartData=t,a&&(a.dataStore.chartData=t,O(a.layer))){let r=a,l=t?.bins?.length;l!==void 0&&r.binCount!==l&&(r.binCount=l)}break;case o.PieSeries:{this.chartData=t,a&&(a.dataStore.chartData=t);break}case o.ScatterSeries:{let r=t,{dataItems:l,r2:g,aggregated:u}=r,p=g;Number.isFinite(g)||(p=void 0),this.r2=p,Y(a)&&(a.dataStore.r2=p,a.dataStore.aggregated=u,u&&(a.additionalTooltipField=void 0)),this.calculatedDataMinMaxBounds=this.getDataExtent(l),a&&(a.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds);break}case o.LineSeries:case o.BarSeries:{let{dataItems:r,timeIntervalInfo:l}=t;if((L(s)||B(s)&&s.binTemporalData)&&(l?.size!==void 0&&s.temporalBinningSize!==l?.size&&(s.temporalBinningSize=l?.size),l?.unit!==void 0&&s.temporalBinningUnit!==l?.unit&&l?.unit!==H.Quarter&&(s.temporalBinningUnit=l?.unit),l?.size!==void 0&&l?.unit!==void 0&&ee($,{size:l.size,unit:l.unit})),this.calculatedDataMinMaxBounds=this.getDataExtent(r),a&&(a.dataStore.calculatedDataMinMaxBounds=this.calculatedDataMinMaxBounds),B(s)){let g=s.xAxisField,u=r.some(b=>b[g]===null),p=s.nullCategory;u&&p===void 0&&(s.nullCategory=R.nullCategory)}break}}},this.chartAxesMinMaxChange=e=>{let i=e,{bounds:t,model:a}=i.detail,s=this.getModel(this.selectedChartId),r=a?.isSameChartAs(s),l=s?.chartType;if(r)switch(l){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:case o.ScatterSeries:this.calculatedMinMaxBounds=t,a&&(a.dataStore.calculatedMinMaxBounds=t),this.updateAxesBoundsInAppState(t);break}},this.chartSeriesColorChange=e=>{let i=e,{data:t,model:a}=i.detail,s=this.getModel(this.selectedChartId);if(a?.isSameChartAs(s))switch(s?.chartType){case o.BarSeries:case o.BoxPlotSeries:case o.LineSeries:case o.HistogramSeries:this.seriesColor=t,a&&(a.dataStore.seriesColor=t);break;case o.PieSeries:{let r=new Map([[0,t]]);this.seriesColor=r,a&&(a.dataStore.seriesColor=r);break}case o.ScatterSeries:}},this.chartNoRenderPropChange=e=>{let i=e,{propName:t,value:a,model:s}=i.detail,r=this.modelList.find(l=>s?.isSameChartAs(l));if(r)switch(t){case"rotation":typeof a=="boolean"&&Q(r)&&(r.rotated=a);break;case"legendPosition":typeof a=="string"&&D(r)&&(r.legendPosition=a);break;case"legendVisibility":typeof a=="boolean"&&D(r)&&(r.legendVisibility=a);break}},this.chartLegendItemVisibilityChange=e=>{let i=e,{legendItemVisibility:t,model:a}=i.detail,s=this.modelList.find(r=>a?.isSameChartAs(r));s?.setSeriesVisibility(t),w(s)&&((s.getMinBound(1)===null||Number.isNaN(s.getMinBound(1)))&&s.setMinBound(null,1),(s.getMaxBound(1)===null||Number.isNaN(s.getMaxBound(1)))&&s.setMaxBound(null,1),L(s)&&((s.getMinBound(0)===null||Number.isNaN(s.getMinBound(0)))&&s.setMinBound(null,0),(s.getMaxBound(0)===null||Number.isNaN(s.getMaxBound(0)))&&s.setMaxBound(null,0)))},this.onSelectChartTypeChange=e=>{this.currentChartTypeText="",this.calculatedDataMinMaxBounds=void 0,this.calculatedMinMaxBounds=void 0,this.removeSelectChartTypePopover();let{selectedModelType:i,layerId:t}=e.target;i!==void 0&&(this.allowChartSyncing=!0,this.arcgisChartsConfigNewChart.emit({key:"key",chartType:i,layerId:t}))},this.onAddChartClose=()=>{this.removeSelectChartTypePopover()},this.onModelConfigChange=e=>{if(this.syncChartsToLayers&&this.allowChartSyncing){let i=e.target;oe(i?.layer,i)}this.requestUpdate()},this.allowChartSyncing=!1,this.currentChartTypeText="",this.modelList=[],this.layerList=[],this.disableEditing=!1,this.syncChartsToLayers=!1,this.close=!1,this.usePopupTemplateFieldsInfo=!1,this.panelNumber=0,this.filterBySelection=!1,this.arcgisChartsConfigChartViewChartClose=C(),this.arcgisChartsConfigModelListChange=C(),this.arcgisChartsConfigNewChart=C(),this.arcgisChartsConfigPanelNumberChange=C(),this.arcgisChartsConfigSelectedChartChange=C(),this.addChartEventListeners(),this.listen("arcgisChartsConfigModelListReorder",this.modelListReorderChangeListener)}static{this.properties={selectedPanel:16,currentChartTypeText:16,messageOverrides:0,modelList:[0,{hasChanged:y}],layerList:[0,{hasChanged:y}],selectedChartId:1,activeLayerId:1,disableEditing:5,syncChartsToLayers:5,timeZone:1,headerTitle:1,close:5,chartData:[0,{hasChanged:y}],r2:9,calculatedDataMinMaxBounds:[0,{hasChanged:y}],calculatedMinMaxBounds:[0,{hasChanged:y}],seriesColor:[0,{hasChanged:q}],popoverPlacement:1,usePopupTemplateFieldsInfo:5,popupTemplateFieldInfosEnabled:5,panelNumber:9,filterBySelection:5}}static{this.styles=pe}async setFocus(){await this.chartsListFlowItem.value?.setFocus()}async load(){await this.layerListChange();let e=this.getModel(this.selectedChartId);this.setEventBasedPropsFromModelData(e)}willUpdate(e){e.has("layerList")&&this.layerListChange(),e.has("panelNumber")&&this.panelNumberChange(this.panelNumber),e.has("modelList")&&this.modelListChange(this.modelList,e.get("modelList")),e.has("selectedChartId")&&this.selectedChartIdChange(this.selectedChartId)}disconnectedCallback(){super.disconnectedCallback(),this.clearPartialModels(),this.removeSelectChartTypePopover()}modelListReorderChangeListener(e){let{modelList:i}=e.detail;if(this.modelList=v({arrayA:this.modelList,arrayB:i,getKey:t=>t.chartId??t.titleText??""}),this.syncChartsToLayers){let t=i.find(a=>a.layer?.id!==void 0)?.layer?.id;if(t){let a=this.layerList.find(s=>s.id.toString()===t);a&&me(a,i)}}}async layerListChange(){let e=[],i=this.layerList.map(a=>a.id.toString()),t=[...this.modelList.filter(a=>i.includes(a.layer?.id??""))];for(let a of this.layerList??[]){if(a.type==="sublayer"){let r=await a.createFeatureLayer();if(!r)continue;a=r}let s=a.charts;for(let r of s??[]){let l=await J({layer:a,config:r,commonStrings:this.commonStrings});l!==void 0&&e.push(l)}}re(e),e.forEach(a=>{t.find(s=>s.isSameChartAs(a))===void 0&&t.push(a)}),t=t.filter(a=>!K(a.config)),this.modelList=t}modelListChange(e,i){this.selectedChartId=re(e,this.selectedChartId),i?.forEach(a=>{a.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}),e.forEach(a=>{a.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)});let t=this.getModel(this.selectedChartId);this.currentChartTypeText=t?.chartType!==void 0?E({chartType:t.chartType,commonStrings:this.commonStrings,config:t.config}):"",this.syncChartsToLayers&&this.allowChartSyncing&&he(this.layerList,e),this.arcgisChartsConfigModelListChange.emit({modelList:e})}selectedChartIdChange(e){this.selectedChartId===void 0&&(this.panelNumber=0),this.selectedPanel=n.Data;let i=this.getModel(e);this.setEventBasedPropsFromModelData(i),this.currentChartTypeText=i?.chartType!==void 0?E({chartType:i.chartType,commonStrings:this.commonStrings,config:i.config}):"",e!==void 0&&e!==$.selectedChartId&&($.selectedChartId=e),this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:i})}panelNumberChange(e){e===0?this.clearPartialModels():e===1&&this.removeSelectChartTypePopover(),this.arcgisChartsConfigPanelNumberChange.emit({panelNumber:e,modelList:this.modelList})}addChartEventListeners(){this.listenOn(document,f.DataProcessComplete,this.chartDataProcessComplete),this.listenOn(document,f.AxesMinMaxChange,this.chartAxesMinMaxChange),this.listenOn(document,f.SeriesColorChange,this.chartSeriesColorChange),this.listenOn(document,f.NoRenderPropChange,this.chartNoRenderPropChange),this.listenOn(document,f.LegendItemVisibilityChange,this.chartLegendItemVisibilityChange)}getDataExtent(e){let i=this.getModel(this.selectedChartId)?.config,t=[];if(i!==void 0&&e!==void 0){let a=j({chartConfig:i,chartData:e}),{minY:s,maxY:r,minX:l,maxX:g}=a;t=[{isXAxis:!0,minimum:l,maximum:g},{isXAxis:!1,minimum:s,maximum:r}]}return t}updateAxesBoundsInAppState(e){e?.forEach(i=>{let{isXAxis:t,maximum:a,minimum:s}=i,r=this.getModel(this.selectedChartId);if(r!==void 0&&w(r)&&this.selectedChartId!==void 0){let l=new ae(r,t),g=W({chartId:this.selectedChartId,isXAxis:t,isLogarithmic:l.getLogarithmic()}),u=$.chartAxesBoundDataMap;u[this.selectedChartId]===void 0&&(u[this.selectedChartId]={});let p=u[this.selectedChartId]?.[g],b={defaultMinBound:p?.defaultMinBound===p?.currMinBound?s:p?.defaultMinBound,currMinBound:s,defaultMaxBound:p?.defaultMaxBound===p?.currMaxBound?a:p?.defaultMaxBound,currMaxBound:a};!S(p,b)&&this.selectedChartId!==void 0&&u?.[this.selectedChartId]!==void 0&&(u[this.selectedChartId][g]=b)}})}getPlacement(){let e;return this.popoverPlacement!==void 0?e=this.popoverPlacement:e=this.modelList?.filter(i=>T(X,i.config)).length<=2?"bottom":"top",e}onBackFlow(){this.panelNumber-=1}async onAddChartClick(e){let{referenceElement:i,layerId:t,layerType:a}=e.detail,s=!0;if(x(a)&&t){let r=this.layerList.find(l=>l.id===t);x(r?.type)&&(s=!!(await G(r))?.attributeTable)}this.setupSelectChartTypePopover(i,t,a,s)}setupSelectChartTypePopover(e,i,t,a=!0){let s=this.getPlacement();this.removeSelectChartTypePopover(),this.selectChartTypePopover=M(c`<arcgis-charts-config-select-chart-type-popover .referenceElement=${e} open .layerId=${i} .layerType=${t} .isRasterBarChartSupported=${a} .popoverPlacement=${s} @arcgisChartsConfigPopoverClose=${this.onAddChartClose} @arcgisChartsConfigSelectChartTypeChange=${this.onSelectChartTypeChange}></arcgis-charts-config-select-chart-type-popover>`),!document.body.contains(this.selectChartTypePopover)&&this.selectChartTypePopover!==null&&document.body.appendChild(this.selectChartTypePopover)}getModel(e){return this.modelList?.find(i=>i.chartId===e)}removeSelectChartTypePopover(){this.selectChartTypePopover!==void 0&&(this.selectChartTypePopover?.remove(),this.selectChartTypePopover=se(this.selectChartTypePopover))}clearPartialModels(){this.modelList=this.modelList.filter(e=>!I(e.config))}onViewChartDelete(e){let{chartId:i}=e.detail;if(i!==void 0){let t=this.modelList.find(s=>s.chartId===i),a=this.layerList.find(s=>s.id===t?.layer?.id);this.modelList=[...this.modelList.filter(s=>s.chartId!==i)],a&&this.syncChartsToLayers&&this.allowChartSyncing&&de(a,i)}}onViewChartsSelect(e){this.selectedChartId===e.detail.chartId&&(this.allowChartSyncing=!0,this.arcgisChartsConfigSelectedChartChange.emit({key:"key",model:this.getModel(this.selectedChartId)})),this.selectedChartId=e.detail.chartId}onViewChartsEdit(e){this.onViewChartsSelect(e),this.panelNumber=1}onViewChartClose(){this.close=!0,this.removeSelectChartTypePopover(),this.arcgisChartsConfigChartViewChartClose.emit()}setEventBasedPropsFromModelData(e){this.chartData=e?.dataStore.chartData,this.r2=e?.dataStore.r2,this.seriesColor=e?.dataStore.seriesColor,this.calculatedMinMaxBounds=e?.dataStore.calculatedMinMaxBounds,this.calculatedDataMinMaxBounds=e?.dataStore.calculatedDataMinMaxBounds}createTooltip(e){let i=e.target,t="";switch(i.icon){case"configure":t=this._messages.data??"";break;case"graph-bar-stacked":case"graph-line-series":case"box-chart-series":t=this._messages.series??"";break;case"graph-pie-slice":t=this._messages.slices??"";break;case"graph-axis":t=this._messages.axes??"";break;case"graph-guides":t=this._messages.guides??"";break;case"palette":t=this._messages.format??"";break;case"text":t=this._messages.general??"";break;default:t="";break}this.tooltip=M(c`<calcite-tooltip style=${z({opacity:1,zIndex:"var(--calcite-floating-ui-z-index)"})} .referenceElement=${i} open placement=top>${t}</calcite-tooltip>`),document.body.appendChild(this.tooltip)}destroyTooltip(){te(this.tooltip)}renderViewCharts(){let e=ce({modelList:this.modelList,layerList:this.layerList,activeLayerId:this.activeLayerId,disableEditing:this.disableEditing});return ie(e,i=>i.id,i=>c`<arcgis-charts-config-view-charts .noGroup=${this.activeLayerId!==void 0} .modelList=${ne(this.modelList,i.id.toString(),x(i.type)?Z:this.supportedChartTypes)} .selectedChartId=${this.selectedChartId??""} .layer=${i} .disableEditing=${this.disableEditing} @arcgisChartsConfigViewChartSelect=${this.onViewChartsSelect} @arcgisChartsConfigViewChartEdit=${this.onViewChartsEdit} @arcgisChartsConfigViewChartDelete=${this.onViewChartDelete} @arcgisChartsConfigViewChartAddChart=${this.onAddChartClick}></arcgis-charts-config-view-charts>`)}render(){return this.close?null:c`<calcite-flow>${k("charts-list",c`<calcite-flow-item .selected=${this.panelNumber===0||this.disableEditing} .heading=${this.headerTitle??this._messages.defaultHeaderTitle} closable @calciteFlowItemClose=${this.onViewChartClose} ${V(this.chartsListFlowItem)}>${this.renderViewCharts()}</calcite-flow-item>`)}${this.panelNumber>=1&&!this.disableEditing?this.renderTabs():null}</calcite-flow>`}renderTabs(){let e=this.getModel(this.selectedChartId);return k("chart-edit",c`<calcite-flow-item .selected=${this.panelNumber>=1&&!this.disableEditing} @calciteFlowItemBack=${this.onBackFlow} .heading=${this._messages[this.selectedPanel??n.Data]} .description=${this.currentChartTypeText!==""&&this._messages.pageFlowTitle!==void 0?le(this._messages.pageFlowTitle,{chartName:e?.titleText??this.currentChartTypeText,layerName:e?.layer?.title??""}):""}>${e?.chartType!==void 0?c`<calcite-action-bar class=${h(d.tabBar)} layout=horizontal expand-disabled><calcite-action class=${h(d.tab)} icon=configure scale=s alignment=center .active=${this.selectedPanel===n.Data||this.selectedPanel===void 0} @click=${()=>{this.selectedPanel=n.Data}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>${e?.chartType===o.BarSeries?c`<calcite-action class=${h(d.tab)} icon=graph-bar-stacked scale=s alignment=center .active=${this.selectedPanel===n.Series} @click=${()=>{this.selectedPanel=n.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.LineSeries?c`<calcite-action class=${h(d.tab)} icon=graph-line-series scale=s alignment=center .active=${this.selectedPanel===n.Series} @click=${()=>{this.selectedPanel=n.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.BoxPlotSeries?c`<calcite-action class=${h(d.tab)} icon=box-chart-series scale=s alignment=center .active=${this.selectedPanel===n.Series} @click=${()=>{this.selectedPanel=n.Series}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType===o.PieSeries?c`<calcite-action class=${h(d.tab)} icon=graph-pie-slice scale=s alignment=center .active=${this.selectedPanel===n.Slices} @click=${()=>{this.selectedPanel=n.Slices}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType!==o.PieSeries&&e?.chartType!==o.HeatSeries?c`<calcite-action class=${h(d.tab)} icon=graph-axis scale=s alignment=center .active=${this.selectedPanel===n.Axes} @click=${()=>{this.selectedPanel=n.Axes}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}${e?.chartType!==o.PieSeries&&e?.chartType!==o.HeatSeries?c`<calcite-action class=${h(d.tab)} icon=graph-guides scale=s alignment=center .active=${this.selectedPanel===n.Guides} @click=${()=>{this.selectedPanel=n.Guides}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action>`:null}<calcite-action class=${h(d.tab)} icon=palette scale=s alignment=center .active=${this.selectedPanel===n.Format} @click=${()=>{this.selectedPanel=n.Format}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action><calcite-action class=${h(d.tab)} icon=text scale=s alignment=center .active=${this.selectedPanel===n.General} @click=${()=>{this.selectedPanel=n.General}} @mouseover=${this.createTooltip} @mouseout=${this.destroyTooltip} text></calcite-action></calcite-action-bar>`:null}${this.renderChartUIComponent()}</calcite-flow-item>`)}renderChartUIComponent(){let e=this.getModel(this.selectedChartId),i=e?.layer,t=null;if(e!==void 0&&!this.disableEditing)switch(e?.chartType){case o.BarSeries:t=c`<arcgis-charts-config-bar-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??n.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-bar-chart>`;break;case o.LineSeries:t=c`<arcgis-charts-config-line-chart class=${h(d.chartUIComponent)} .model=${e} .timeZone=${this.timeZone} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??n.Data} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-line-chart>`;break;case o.PieSeries:t=c`<arcgis-charts-config-pie-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .chartData=${this.chartData} .page=${this.selectedPanel??n.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor} .filterBySelection=${this.filterBySelection}></arcgis-charts-config-pie-chart>`;break;case o.HistogramSeries:t=c`<arcgis-charts-config-histogram class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??n.Data} .chartData=${this.chartData} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-histogram>`;break;case o.ScatterSeries:t=c`<arcgis-charts-config-scatter-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??n.Data} .r2=${this.r2} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds}></arcgis-charts-config-scatter-plot>`;break;case o.BoxPlotSeries:t=c`<arcgis-charts-config-box-plot class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??n.Data} .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .seriesColor=${this.seriesColor}></arcgis-charts-config-box-plot>`;break;case o.HeatSeries:t=c`<arcgis-charts-config-heat-chart class=${h(d.chartUIComponent)} .model=${e} .usePopupTemplateFieldsInfo=${this.usePopupTemplateFieldsInfo||this.popupTemplateFieldInfosEnabled} .layer=${i} .page=${this.selectedPanel??n.Data}></arcgis-charts-config-heat-chart>`;break}return t}};U("arcgis-charts-config-create-flow",F);return F},"intl",a,b,d,e,g,i,j,l,m,p,q,r,s,t,u)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import t from"./7WMOXCPU.js";import s from"./QUR7IUKK.js";import q from"./RAUYMTSM.js";import p from"./F2N6CMAL.js";import o from"./GP5MHPDX.js";import n from"./XST7FY7F.js";import m from"./JF7YQCM6.js";import l from"./EUGGSDEV.js";import k from"./LVSNOD77.js";import"./THTYR6IL.js";import j from"./CU56A45C.js";import i from"./KXKOTDCQ.js";import h from"./WHBJYAT4.js";import g from"./YPFJW7NS.js";import f from"./OQWDZSTM.js";import"./Y7HBWU3M.js";import e from"./GZU5HJCQ.js";import d from"./W6CKM3J3.js";import b from"./LZMLIBIH.js";import"./WNKDEOFZ.js";import a from"./3RA3JNKB.js";import"./EZV7JSQJ.js";import{r as S}from"./3TBK72EK.js";import{pa as _}from"./PAIRUVLU.js";import"./KX7KGXKQ.js";import"./SP2IPHWF.js";import"./IHHPUKGG.js";import"./RIM4HLHN.js";import"./KDJ5RVHA.js";import{c as r}from"./QP5UAIC6.js";import"./XJFVSX2E.js";import{a as u,b as c}from"./547RDEMV.js";import"./U67P6YAZ.js";export default $arcgis.t(([{rb:l},,,{c:i},,,,,,,,,,{e:y},,,{$:Q,A:v,B:L,C:b,D:R,E:w,F:D,G:I,H:P,I:k,J:B,K:N,L:U,M:W,N:E,O:h,P:f,Q:M,R:Y,S:G,T:H,U:V,V:X,W:j,X:Z,Y:q,Z:J,_:K,aa:$,ba:z,ca:tt,da:et,ea:it,fa:st,ga:ot,ha:rt,ia:nt,ja:at,ka:gt,oa:m,u:C,v:T,w:A,x:F,y:O,z:x},{a:pt,b:ct,d:lt}])=>{var yt=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,s=(p,t,o,a)=>{for(var n=ht(t,o),g=p.length-1,d;g>=0;g--)(d=p[g])&&(n=d(t,o,n)||n);return n&&yt(t,o,n),n},e=class extends lt{constructor(){super(...arguments),this._chartType=u.HeatSeries}generateChartTitle(){return this.layerInfo!==void 0?gt(this._config,this.layerInfo,this.commonStrings):""}generateYAxisTitle(){let t=this.yTemporalBinning?.unit;return t!==void 0?this.commonStrings.utilsStrings.heatChartCalendarDatePartsUnits[t]:""}get layer(){return super.layer}async setup(t){await this.loadConfigFromLayer(t),this.setupLocalProps(),typeof this.resolveSetup=="function"&&this.resolveSetup()}get yAxisField(){return L(this._config)}set yAxisField(t){v({yField:t,config:this._config,layerInfo:this.layerInfo})}get viewType(){return K(this._config)}set viewType(t){this.guardSetterFromAsyncOverwrite(()=>{Q(t,this._config),this.emitConfigUpdate("heatChartViewType")})}get xTemporalBinning(){return R(this._config)}set xTemporalBinning(t){b({commonStrings:this.commonStrings,binning:t,config:this._config})}get yTemporalBinning(){return D(this._config)}set yTemporalBinning(t){w({commonStrings:this.commonStrings,binning:t,config:this._config})}get breaksCount(){return $(this._config)}set breaksCount(t){this.guardSetterFromAsyncOverwrite(()=>{z(t,this._config),this.emitConfigUpdate("breaksCount")})}get classificationMethod(){return tt(this._config)}set classificationMethod(t){this.guardSetterFromAsyncOverwrite(()=>{t&&(et(t,this._config),this.emitConfigUpdate("classificationMethod"))})}get colorRampName(){return ot(this._config)}set colorRampName(t){rt(t,this._config)}get isColorRampFlipped(){return nt(this._config)}set isColorRampFlipped(t){at(t,this._config)}get hideEmptyRowsAndColumns(){return C(this._config)}set hideEmptyRowsAndColumns(t){T(this._config,t)}get gridLineWidth(){return P(this._config)}set gridLineWidth(t){I(t,this._config)}get gridLineColor(){return B(this._config)}set gridLineColor(t){k(t,this._config)}get seriesName(){return pt(0,this._config)}set seriesName(t){typeof t=="string"&&ct(t,0,this._config)}get heatRulesType(){return F(this._config)}set heatRulesType(t){A(this._config,t)}get gradientRules(){return x(this._config)}set gradientRules(t){O(this._config,t)}getGridLinesSymbol(){return this._config.series?.[0]?.gridLine}setGridLinesSymbol(t){this._config.series?.[0]&&(this._config.series[0].gridLine=t)}get numericFields(){let t=W(this._config);return t!==void 0?[t]:[]}set numericFields(t){let{idField:o}=l(this.layerInfo.layer),a=S(t[0]),n=a?o:t[0];E({field:n,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings});let g=h(this._config);a&&g!==c.Count&&f({aggregationType:c.Count,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}get aggregationType(){return h(this._config)}set aggregationType(t){f({aggregationType:t,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings})}get splitByField(){return""}set splitByField(t){}get legendPosition(){return U(this._config)}set legendPosition(t){N(t,this._config)}get nullPolicy(){return M(this._config)}set nullPolicy(t){Y(t,this._config)}get emptyCell(){return G(this._config)}set emptyCell(t){this.guardSetterFromAsyncOverwrite(()=>{H(t,this._config),this.emitConfigUpdate("emptyCell")})}getSortOrder(){return r.Asc}setSortOrder(t,o){}getXAxisSortOrder(){let t=m(this._config)[0];return t===r.Asc||t===r.Desc||t===r.customSort?t:r.Asc}setXAxisSortOrder(t,o){y(t,this._config,o)}getYAxisSortOrder(){let t=m(this._config)[1];return t===r.Asc||t===r.Desc||t===r.customSort?t:r.Asc}setYAxisSortOrder(t,o){y(t,this._config,o,!0)}get emptyCellText(){return V(this._config)}set emptyCellText(t){X(t,this._config)}get includeLeapDay(){return j(this._config)}set includeLeapDay(t){this.guardSetterFromAsyncOverwrite(()=>{Z(t,this._config),this.emitConfigUpdate("includeLeapDay")})}get firstDayOfWeek(){return st(this._config)}set firstDayOfWeek(t){this.guardSetterFromAsyncOverwrite(()=>{it(t,this._config),this.emitConfigUpdate("firstDayOfWeek")})}get emptyCellSymbol(){return q(this._config)}set emptyCellSymbol(t){J(t,this._config)}get rotated(){return!1}set rotated(t){}setAssignToSecondValueAxis(t,o){}set stackedType(t){}set binTemporalData(t){}set nullCategory(t){}generateDefaultConfig(){let t=_(this.commonStrings,l(this.layerInfo.layer).idField);return t.axes?.forEach((o,a)=>{o&&(o.valueFormat={intlOptions:{timeZone:void 0,dateStyle:a>0?"long":"medium"},type:"date"})}),t}};s([i],e.prototype,"yAxisField");s([i],e.prototype,"xTemporalBinning");s([i],e.prototype,"yTemporalBinning");s([i],e.prototype,"colorRampName");s([i],e.prototype,"isColorRampFlipped");s([i],e.prototype,"hideEmptyRowsAndColumns");s([i],e.prototype,"gridLineWidth");s([i],e.prototype,"gridLineColor");s([i],e.prototype,"seriesName");s([i],e.prototype,"heatRulesType");s([i],e.prototype,"gradientRules");s([i],e.prototype,"setGridLinesSymbol");s([i],e.prototype,"numericFields");s([i],e.prototype,"aggregationType");s([i],e.prototype,"splitByField");s([i],e.prototype,"legendPosition");s([i],e.prototype,"nullPolicy");s([i],e.prototype,"setSortOrder");s([i],e.prototype,"setXAxisSortOrder");s([i],e.prototype,"setYAxisSortOrder");s([i],e.prototype,"emptyCellText");s([i],e.prototype,"firstDayOfWeek");s([i],e.prototype,"emptyCellSymbol");s([i],e.prototype,"rotated");s([i],e.prototype,"setAssignToSecondValueAxis");s([i],e.prototype,"stackedType");s([i],e.prototype,"binTemporalData");s([i],e.prototype,"nullCategory");return e},a,b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,s,t)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as i,b as n,c}from"./KDJ5RVHA.js";import{k as r}from"./QP5UAIC6.js";async function d(t){let a="config"in t?n(t.config):t.chartType,o;if(!("layer"in t)&&!("iLayer"in t)&&"config"in t&&t.config.iLayer===void 0)throw new Error("The source is missing. You can provide it to createModel through either `iLayer`, `layer`, or by setting the `config.iLayer` property.");switch(a){case r.LineChart:{let{LineChartModel:e}=await import("./W3V5726H.js").then(m=>m.default.then(e=>({LineChartModel:e})));o=new e;break}case r.ComboBarLineChart:{let{ComboBarLineChartModel:e}=await import("./5AZQ4NGK.js").then(m=>m.default.then(e=>({ComboBarLineChartModel:e})));o=new e;break}case r.PieChart:{let{PieChartModel:e}=await import("./QSH4RLKM.js").then(m=>m.default.then(e=>({PieChartModel:e})));o=new e;break}case r.Histogram:{let{HistogramModel:e}=await import("./UYKZWTFH.js").then(m=>m.default.then(e=>({HistogramModel:e})));o=new e;break}case r.Scatterplot:{let{ScatterplotModel:e}=await import("./A3TAYUWE.js").then(m=>m.default.then(e=>({ScatterplotModel:e})));o=new e;break}case r.BoxPlot:{let{BoxPlotModel:e}=await import("./BFIXNPQC.js").then(m=>m.default.then(e=>({BoxPlotModel:e})));o=new e;break}case r.Gauge:{let{GaugeModel:e}=await import("./TLP2PMYA.js").then(m=>m.default.then(e=>({GaugeModel:e})));o=new e;break}case r.RadarChart:{let{RadarChartModel:e}=await import("./FS7YWI5U.js").then(m=>m.default.then(e=>({RadarChartModel:e})));o=new e;break}case r.HeatChart:{let{HeatChartModel:e}=await import("./ENTZDGSK.js").then(m=>m.default.then(e=>({HeatChartModel:e})));o=new e;break}case r.BarChart:default:{let{BarChartModel:e}=await import("./FYQDAAXP.js").then(m=>m.default.then(e=>({BarChartModel:e})));o=new e;break}}if(await o?.setup({layer:"layer"in t?t.layer:void 0,iLayer:"iLayer"in t?t.iLayer:void 0,config:"config"in t?t.config:void 0,commonStrings:"commonStrings"in t?t.commonStrings:void 0}),a!==void 0&&c(o,a))return o;{let e=i(o.chartType);throw new Error(`Please check the arguments provided to \`createModel\`. The generated model's type (\`${e}\`) does not match the type specified by either the \`chartType\` or the \`config\` argument (\`${a}\`).`)}}export{d as a};
2
+ import{a as i,b as n,c}from"./KDJ5RVHA.js";import{k as r}from"./QP5UAIC6.js";async function d(t){let a="config"in t?n(t.config):t.chartType,o;if(!("layer"in t)&&!("iLayer"in t)&&"config"in t&&t.config.iLayer===void 0)throw new Error("The source is missing. You can provide it to createModel through either `iLayer`, `layer`, or by setting the `config.iLayer` property.");switch(a){case r.LineChart:{let{LineChartModel:e}=await import("./S6SBVFMN.js").then(m=>m.default.then(e=>({LineChartModel:e})));o=new e;break}case r.ComboBarLineChart:{let{ComboBarLineChartModel:e}=await import("./WHLDUYAG.js").then(m=>m.default.then(e=>({ComboBarLineChartModel:e})));o=new e;break}case r.PieChart:{let{PieChartModel:e}=await import("./QSH4RLKM.js").then(m=>m.default.then(e=>({PieChartModel:e})));o=new e;break}case r.Histogram:{let{HistogramModel:e}=await import("./UYKZWTFH.js").then(m=>m.default.then(e=>({HistogramModel:e})));o=new e;break}case r.Scatterplot:{let{ScatterplotModel:e}=await import("./A3TAYUWE.js").then(m=>m.default.then(e=>({ScatterplotModel:e})));o=new e;break}case r.BoxPlot:{let{BoxPlotModel:e}=await import("./BFIXNPQC.js").then(m=>m.default.then(e=>({BoxPlotModel:e})));o=new e;break}case r.Gauge:{let{GaugeModel:e}=await import("./TLP2PMYA.js").then(m=>m.default.then(e=>({GaugeModel:e})));o=new e;break}case r.RadarChart:{let{RadarChartModel:e}=await import("./OFP7FIPS.js").then(m=>m.default.then(e=>({RadarChartModel:e})));o=new e;break}case r.HeatChart:{let{HeatChartModel:e}=await import("./JGSF55NE.js").then(m=>m.default.then(e=>({HeatChartModel:e})));o=new e;break}case r.BarChart:default:{let{BarChartModel:e}=await import("./XX6OXKZK.js").then(m=>m.default.then(e=>({BarChartModel:e})));o=new e;break}}if(await o?.setup({layer:"layer"in t?t.layer:void 0,iLayer:"iLayer"in t?t.iLayer:void 0,config:"config"in t?t.config:void 0,commonStrings:"commonStrings"in t?t.commonStrings:void 0}),a!==void 0&&c(o,a))return o;{let e=i(o.chartType);throw new Error(`Please check the arguments provided to \`createModel\`. The generated model's type (\`${e}\`) does not match the type specified by either the \`chartType\` or the \`config\` argument (\`${a}\`).`)}}export{d as a};