/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{d as i}from"./DPJE33GY.js";import{g as f}from"./UG7LOBJE.js";import a from"./AD6GOUND.js";import{n as d}from"./4B3QBH5T.js";import"./FUPYXGG6.js";import"./NKG4FLLR.js";import{F as h,g as n,h as e,m as l,z as c}from"./RPU6VCJ4.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,,,,,,,,,,,,,,{Ac:m,Kc:p,Mc:g}])=>{var u=n`:host{overflow-y:auto;overflow-x:hidden;margin-bottom:var(--arcgis-charts-intra-section-margin);margin-top:var(--arcgis-charts-intra-section-margin);height:100%}`,s=class extends c{constructor(){super(...arguments),this.onModelConfigChange=async a=>{let t=a?.detail.config??this.model.config;this.layer===void 0&&await this.updateFetchLayerFieldsInfo(t)},this.popoverPlacement="leading",this.arcgisChartsConfigWebChartChange=l()}static{this.properties={layerFieldsInfo:16,model:0,popoverPlacement:1,r2:9,calculatedDataMinMaxBounds:0,calculatedMinMaxBounds:0,page:1,layer:0,usePopupTemplateFieldsInfo:5}}static{this.styles=u}async load(){await this.updateFetchLayerFieldsInfo(this.model?.config),this.modelChange(this.model)}willUpdate(a){let t=!1;a.has("model")&&this.modelChange(this.model,a.get("model")),a.has("r2")&&this.r2Change(this.r2),a.has("layer")&&this.layer!==void 0&&!d(a.get("layer"),this.layer)&&(t=!0),a.has("usePopupTemplateFieldsInfo")&&this.usePopupTemplateFieldsInfo!==a.get("usePopupTemplateFieldsInfo")&&(t=!0),this.layerFieldsInfo===void 0&&(t=!0),t&&this.updateFetchLayerFieldsInfo()}modelChange(a,t){t?.removeEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange),a?.addEventListener("arcgisChartsModelConfigChange",this.onModelConfigChange)}r2Change(a){Number.isFinite(a)||(this.r2=void 0)}async updateFetchLayerFieldsInfo(a){let t=a??this.model.config,o=this.layer;if(!o){let r=f(t)?t.iLayer:void 0;r&&(o=await p(r))}o&&(this.layerFieldsInfo=await g(o,this.usePopupTemplateFieldsInfo))}render(){let a;switch(this.page){case i.Data:a=e`<arcgis-charts-config-scatter-plot-data .model=${this.model} .r2=${this.r2} .layerFieldsInfo=${this.layerFieldsInfo} .isTableLayer=${m(this.layer)?.isTable}></arcgis-charts-config-scatter-plot-data>`;break;case i.Axes:a=e`<arcgis-charts-config-axes .model=${this.model} show-min-x-bound-option show-max-x-bound-option show-min-y-bound-option show-max-y-bound-option show-enable-x-log-option show-enable-y-log-option .calculatedMinMaxBounds=${this.calculatedMinMaxBounds} .calculatedDataMinMaxBounds=${this.calculatedDataMinMaxBounds}></arcgis-charts-config-axes>`;break;case i.Guides:a=e`<arcgis-charts-config-guides .model=${this.model} enable-x-axis-guide enable-y-axis-guide></arcgis-charts-config-guides>`;break;case i.Format:a=e`<arcgis-charts-config-format .model=${this.model}></arcgis-charts-config-format>`;break;case i.General:a=e`<arcgis-charts-config-general .model=${this.model}></arcgis-charts-config-general>`;break;default:a="";break}return a}};h("arcgis-charts-config-scatter-plot",s);return s},"Graphic","renderers/support/jsonUtils","symbols/support/symbolUtils","intl","layers/support/FeatureFilter","smartMapping/statistics/histogram","smartMapping/statistics/summaryStatistics","request","core/sql","AttributeBinsGraphic","geometry/support/jsonUtils","rest/support/AttributeBinsQuery","rest/support/StatisticDefinition","time/TimeExtent","core/promiseUtils",a)