@arcgis/map-components 6.0.0-next.29 → 6.0.0-next.30

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.
Files changed (38) hide show
  1. package/dist/cdn/{T4DVKA6R.js → 5IPRYM2C.js} +1 -1
  2. package/dist/cdn/66TZB3H3.js +3 -0
  3. package/dist/cdn/6FJUKYNB.js +2 -0
  4. package/dist/cdn/BEICGIY5.js +2 -0
  5. package/dist/cdn/{4LO7PNX7.js → BJUFDQGX.js} +1 -1
  6. package/dist/cdn/{FAPDKS2C.js → CDHP7WRH.js} +1 -1
  7. package/dist/cdn/FROWRLYW.js +2 -0
  8. package/dist/cdn/{IYMK2NGU.js → KWF72M5Z.js} +1 -1
  9. package/dist/cdn/{Q7CJUHNT.js → M7GAVFT6.js} +1 -1
  10. package/dist/cdn/OKOOKG4L.js +2 -0
  11. package/dist/cdn/{SI6RI664.js → PYEOGYQ3.js} +1 -1
  12. package/dist/cdn/{CGGVQCCL.js → WZWVZD7I.js} +1 -1
  13. package/dist/cdn/{WEMTOBBB.js → YCKZUQ7P.js} +1 -1
  14. package/dist/cdn/index.js +1 -1
  15. package/dist/chunks/chart-utils.js +12 -12
  16. package/dist/chunks/slots.js +4 -4
  17. package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +2 -2
  18. package/dist/components/arcgis-catalog-layer-list-next/types.d.ts +2 -2
  19. package/dist/components/arcgis-daylight/customElement.js +134 -131
  20. package/dist/components/arcgis-feature-media/customElement.js +254 -210
  21. package/dist/components/arcgis-popup/customElement.js +115 -109
  22. package/dist/components/arcgis-selection-list/customElement.js +1 -1
  23. package/dist/components/arcgis-sketch/customElement.d.ts +17 -5
  24. package/dist/components/arcgis-sketch/customElement.js +33 -34
  25. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +9 -9
  26. package/dist/docs/api.json +1 -1
  27. package/dist/docs/docs.json +1 -1
  28. package/dist/docs/web-types.json +1 -1
  29. package/package.json +6 -6
  30. package/dist/cdn/7RO6N4XQ.js +0 -2
  31. package/dist/cdn/A6DDWCVW.js +0 -2
  32. package/dist/cdn/JWHVCBA3.js +0 -2
  33. package/dist/cdn/LXTP2MVM.js +0 -2
  34. package/dist/cdn/NXLWTRS6.js +0 -3
  35. package/dist/components/arcgis-sketch/SketchComponentViewModel.d.ts +0 -84
  36. package/dist/components/arcgis-sketch/configuration.d.ts +0 -33
  37. package/dist/components/arcgis-sketch/support.d.ts +0 -17
  38. package/dist/components/arcgis-sketch/toolbar-sizing-controller.d.ts +0 -96
@@ -2,35 +2,35 @@
2
2
  import { c as B } from "../../chunks/runtime.js";
3
3
  import { ref as j } from "lit/directives/ref.js";
4
4
  import { keyed as W } from "lit/directives/keyed.js";
5
- import { css as K, html as I, nothing as C } from "lit";
6
- import { useDirection as q, useMedia as G } from "@arcgis/lumina/controllers";
7
- import { getColorsFromRenderer as J } from "@arcgis/core/renderers/support/utils.js";
8
- import { LitElement as Q } from "@arcgis/lumina";
9
- import { substitute as Z } from "@arcgis/core/intl.js";
10
- import { watch as ee } from "@arcgis/core/core/reactiveUtils.js";
11
- import te from "@arcgis/core/popup/FieldInfo.js";
12
- import L from "@arcgis/core/popup/content/support/ChartMediaInfoValueSeries.js";
13
- import { unsafeGetCalciteModeName as ie } from "@arcgis/toolkit/dom";
14
- import { renderingSanitizer as N } from "@arcgis/core/applications/Components/sanitizerUtils.js";
15
- import { f as A, b as F, m as z, n as X, o as ae, p as E, i as re, q as ne, j as P, s as se } from "../../chunks/feature-utils.js";
16
- import { b as oe, a as le, c as ce } from "../../chunks/keyboard-utils.js";
17
- const de = K`.container{display:flex;flex-flow:row wrap;align-items:center;margin-top:var(--calcite-space-xs);width:100%;min-height:150px}.container .pagination-button{display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;padding-block:var(--calcite-space-xs);padding-inline:var(--calcite-space-xs);color:var(--calcite-color-text-3)}.container .pagination-button:hover,.container .pagination-button:focus{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1);fill:var(--calcite-color-text-1)}.item-title{margin:0;font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-relative-snug)}.item-caption{padding-block-start:var(--calcite-space-2xs);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-snug)}.item{display:flex;align-items:flex-start;justify-content:center;margin-block:var(--calcite-space-xs);width:100%;height:auto}.item-navigation{display:flex;flex:0 1 100%;align-items:flex-start;justify-content:space-between;margin-block-end:var(--calcite-space-xs)}.item-text{margin-inline-end:var(--calcite-space-xs)}.pagination{display:flex;flex:0 0 auto;align-items:center;overflow:hidden}.pagination:only-child{margin-inline-start:auto}.pagination-text{padding-inline:var(--calcite-space-2xs);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-normal)}.item-container{flex:0 1 auto;width:100%}.item-container img{max-width:100%}.item-container img[src$=".SVG"],.item-container img[src$=".svg"]{width:100%}.chart{width:100%;height:155px}`;
18
- function $(S) {
19
- if (!A(S))
5
+ import { css as K, html as I, nothing as w } from "lit";
6
+ import { useDirection as G, useMedia as J } from "@arcgis/lumina/controllers";
7
+ import { getColorsFromRenderer as Q } from "@arcgis/core/renderers/support/utils.js";
8
+ import { LitElement as Z } from "@arcgis/lumina";
9
+ import { substitute as ee } from "@arcgis/core/intl.js";
10
+ import { watch as te } from "@arcgis/core/core/reactiveUtils.js";
11
+ import ie from "@arcgis/core/popup/FieldInfo.js";
12
+ import N from "@arcgis/core/popup/content/support/ChartMediaInfoValueSeries.js";
13
+ import { unsafeGetCalciteModeName as re } from "@arcgis/toolkit/dom";
14
+ import { renderingSanitizer as z } from "@arcgis/core/applications/Components/sanitizerUtils.js";
15
+ import { f as b, b as $, m as q, n as E, o as ae, p as X, i as se, q as ne, j as P, s as oe } from "../../chunks/feature-utils.js";
16
+ import { b as le, a as ce, c as de } from "../../chunks/keyboard-utils.js";
17
+ const ue = K`.container{display:flex;flex-flow:row wrap;align-items:center;margin-top:var(--calcite-space-xs);width:100%;min-height:150px}.container .pagination-button{display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;padding-block:var(--calcite-space-xs);padding-inline:var(--calcite-space-xs);color:var(--calcite-color-text-3)}.container .pagination-button:hover,.container .pagination-button:focus{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1);fill:var(--calcite-color-text-1)}.item-title{margin:0;font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-relative-snug)}.item-caption{padding-block-start:var(--calcite-space-2xs);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-snug)}.item{display:flex;align-items:flex-start;justify-content:center;margin-block:var(--calcite-space-xs);width:100%;height:auto}.item-navigation{display:flex;flex:0 1 100%;align-items:flex-start;justify-content:space-between;margin-block-end:var(--calcite-space-xs)}.item-text{margin-inline-end:var(--calcite-space-xs)}.pagination{display:flex;flex:0 0 auto;align-items:center;overflow:hidden}.pagination:only-child{margin-inline-start:auto}.pagination-text{padding-inline:var(--calcite-space-2xs);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-normal)}.item-container{flex:0 1 auto;width:100%}.item-container img{max-width:100%}.item-container img[src$=".SVG"],.item-container img[src$=".svg"]{width:100%}.chart{width:100%;height:155px}`;
18
+ function k(S) {
19
+ if (!b(S))
20
20
  return null;
21
21
  const [e, t] = S.split("/").slice(1);
22
22
  return { layerId: e, fieldName: t };
23
23
  }
24
- const k = 15, y = "category", w = "value", ue = "rgba(50, 50, 50, 1)", he = 250, fe = 500, me = 200;
25
- class pe extends Q {
24
+ const V = 15, y = "category", R = "value", T = "rgba(50, 50, 50, 1)", he = 250, fe = 500, me = 200;
25
+ class pe extends Z {
26
26
  constructor() {
27
- super(...arguments), this._direction = q(), this._chartRevision = 0, this._prefersReducedMotion = G("(prefers-reduced-motion)"), this.activeMediaInfoIndex = 0, this.chartAnimationDisabled = !1, this.headingLevel = 2;
27
+ super(...arguments), this._direction = G(), this._chartRequestRevision = 0, this._chartRevision = 0, this._prefersReducedMotion = J("(prefers-reduced-motion)"), this.activeMediaInfoIndex = 0, this.chartAnimationDisabled = !1, this.headingLevel = 2;
28
28
  }
29
29
  static {
30
30
  this.properties = { _refreshIntervalInfo: 16, messages: 0, values: 0, expressionValues: 0, activeMediaInfoIndex: 9, chartAnimationDisabled: 5, activeMediaInfo: 32, formattedMediaInfos: 32, description: 1, fieldInfoMap: 0, layer: 0, mediaInfos: 0, popupTemplate: 0, relatedInfos: 0, formattedValues: 0, heading: 1, graphic: 0, formattedMediaInfoCount: 32, headingLevel: 9 };
31
31
  }
32
32
  static {
33
- this.styles = de;
33
+ this.styles = ue;
34
34
  }
35
35
  get activeMediaInfo() {
36
36
  return this.formattedMediaInfos[this.activeMediaInfoIndex] || null;
@@ -55,10 +55,16 @@ class pe extends Q {
55
55
  }
56
56
  loaded() {
57
57
  this.manager.onLifecycle(() => [
58
- ee(() => [this.activeMediaInfo, this.activeMediaInfoIndex], () => this._setupMediaRefreshTimer(), { initial: !0 }),
58
+ te(() => [this.activeMediaInfo, this.activeMediaInfoIndex], () => this._setupMediaRefreshTimer(), { initial: !0 }),
59
59
  { remove: () => this._clearMediaRefreshTimer() }
60
60
  ]);
61
61
  }
62
+ connectedCallback() {
63
+ super.connectedCallback(), this.hasUpdated && this._chartElement?.isConnected && this._updateChartElement(this._chartElement);
64
+ }
65
+ disconnectedCallback() {
66
+ super.disconnectedCallback(), this._chartRequestRevision++, this._chartRoot?.dispose(), this._chartRoot = void 0;
67
+ }
62
68
  _setContentElementMedia(e) {
63
69
  const { formattedMediaInfoCount: t } = this, i = (e + t) % t;
64
70
  this.activeMediaInfoIndex = i;
@@ -68,48 +74,48 @@ class pe extends Q {
68
74
  this._setContentElementMedia(i);
69
75
  }
70
76
  _formatMediaInfos() {
71
- const { mediaInfos: e, layer: t } = this, i = this.values ?? {}, a = this.formattedValues ?? {}, n = this.fieldInfoMap ?? /* @__PURE__ */ new Map(), s = this.expressionValues ?? {};
77
+ const { mediaInfos: e, layer: t } = this, i = this.values ?? {}, a = this.formattedValues ?? {}, s = this.fieldInfoMap ?? /* @__PURE__ */ new Map(), n = this.expressionValues ?? {};
72
78
  return e?.map((o) => {
73
79
  const r = o?.clone();
74
80
  if (!r)
75
81
  return null;
76
- if (r.title = F({
82
+ if (r.title = $({
77
83
  values: i,
78
- fieldInfoMap: n,
84
+ fieldInfoMap: s,
79
85
  globalValues: a,
80
86
  layer: t,
81
87
  text: r.title
82
- }), r.caption = F({
88
+ }), r.caption = $({
83
89
  values: i,
84
- fieldInfoMap: n,
90
+ fieldInfoMap: s,
85
91
  globalValues: a,
86
92
  layer: t,
87
93
  text: r.caption
88
- }), r.altText = F({
94
+ }), r.altText = $({
89
95
  values: i,
90
- fieldInfoMap: n,
96
+ fieldInfoMap: s,
91
97
  globalValues: a,
92
98
  layer: t,
93
99
  text: r.altText
94
100
  }), r.type === "image") {
95
101
  if (!r.value)
96
102
  return null;
97
- const c = r.value;
103
+ const d = r.value;
98
104
  return this._setImageValue({
99
- value: c,
105
+ value: d,
100
106
  formattedValues: a,
101
107
  layer: t
102
- }), c.sourceURL ? r : void 0;
108
+ }), d.sourceURL ? r : void 0;
103
109
  }
104
110
  if (r.type === "pie-chart" || r.type === "line-chart" || r.type === "column-chart" || r.type === "bar-chart") {
105
111
  if (!r.value)
106
112
  return null;
107
- const c = r.value;
113
+ const d = r.value;
108
114
  return this._setChartValue({
109
- value: c,
115
+ value: d,
110
116
  chartType: r.type,
111
117
  values: i,
112
- expressionValues: s,
118
+ expressionValues: n,
113
119
  formattedValues: a,
114
120
  layer: t
115
121
  }), r;
@@ -118,18 +124,18 @@ class pe extends Q {
118
124
  }).filter((o) => o != null) ?? [];
119
125
  }
120
126
  _setImageValue(e) {
121
- const t = this.fieldInfoMap ?? /* @__PURE__ */ new Map(), { value: i, formattedValues: a, layer: n } = e, { linkURL: s, sourceURL: o } = i;
127
+ const t = this.fieldInfoMap ?? /* @__PURE__ */ new Map(), { value: i, formattedValues: a, layer: s } = e, { linkURL: n, sourceURL: o } = i;
122
128
  if (o) {
123
- const r = z(o, n);
124
- i.sourceURL = X({
129
+ const r = q(o, s);
130
+ i.sourceURL = E({
125
131
  formattedValues: a,
126
132
  template: r,
127
133
  fieldInfoMap: t
128
134
  });
129
135
  }
130
- if (s) {
131
- const r = z(s, n);
132
- i.linkURL = X({
136
+ if (n) {
137
+ const r = q(n, s);
138
+ i.linkURL = E({
133
139
  formattedValues: a,
134
140
  template: r,
135
141
  fieldInfoMap: t
@@ -137,98 +143,98 @@ class pe extends Q {
137
143
  }
138
144
  }
139
145
  _setChartValue(e) {
140
- const { value: t, values: i, expressionValues: a, formattedValues: n, chartType: s, layer: o } = e, { popupTemplate: r, relatedInfos: c } = this, { fields: m, normalizeField: d } = t, l = o;
141
- if (t.fields = ae(m, l), d && (t.normalizeField = E(d, l)), !m.some((f) => !!(n[f] != null || A(f) && c?.size)))
146
+ const { value: t, values: i, expressionValues: a, formattedValues: s, chartType: n, layer: o } = e, { popupTemplate: r, relatedInfos: d } = this, { fields: h, normalizeField: v } = t, l = o;
147
+ if (t.fields = ae(h, l), v && (t.normalizeField = X(v, l)), !h.some((u) => !!(s[u] != null || b(u) && d?.size)))
142
148
  return;
143
- const u = r?.fieldInfos ?? [];
144
- t.series = [], m.forEach((f, h) => {
145
- const g = t.colors?.[h];
146
- if (A(f)) {
149
+ const f = r?.fieldInfos ?? [];
150
+ t.series = [], h.forEach((u, p) => {
151
+ const m = t.colors?.[p];
152
+ if (b(u)) {
147
153
  t.series = [
148
154
  ...t.series,
149
155
  ...this._getRelatedChartInfos({
150
- fieldInfos: u,
151
- fieldName: f,
152
- formattedValues: n,
156
+ fieldInfos: f,
157
+ fieldName: u,
158
+ formattedValues: s,
153
159
  expressionValues: a,
154
- chartType: s,
160
+ chartType: n,
155
161
  value: t,
156
- color: g
162
+ color: m
157
163
  })
158
164
  ];
159
165
  return;
160
166
  }
161
- const _ = this._getChartOption({
167
+ const g = this._getChartOption({
162
168
  value: t,
163
169
  values: i,
164
- chartType: s,
165
- formattedValues: n,
170
+ chartType: n,
171
+ formattedValues: s,
166
172
  expressionValues: a,
167
- fieldName: f,
168
- fieldInfos: u,
169
- color: g
173
+ fieldName: u,
174
+ fieldInfos: f,
175
+ color: m
170
176
  });
171
- t.series.push(_);
177
+ t.series.push(g);
172
178
  });
173
179
  }
174
180
  _getRelatedChartInfos(e) {
175
- const { fieldInfos: t, fieldName: i, formattedValues: a, chartType: n, value: s, color: o, expressionValues: r } = e, c = [], m = $(i), d = m && this.relatedInfos?.get(m.layerId);
176
- if (!d)
177
- return c;
178
- const { relatedFeatures: l, relation: p } = d;
179
- if (!p || !l)
180
- return c;
181
- const { cardinality: u } = p;
182
- return l.forEach((h) => {
183
- const g = h.attributes;
184
- g && Object.keys(g).forEach((_) => {
185
- _ === m.fieldName && c.push(this._getChartOption({
186
- value: s,
187
- values: g,
181
+ const { fieldInfos: t, fieldName: i, formattedValues: a, chartType: s, value: n, color: o, expressionValues: r } = e, d = [], h = k(i), v = h && this.relatedInfos?.get(h.layerId);
182
+ if (!v)
183
+ return d;
184
+ const { relatedFeatures: l, relation: c } = v;
185
+ if (!c || !l)
186
+ return d;
187
+ const { cardinality: f } = c;
188
+ return l.forEach((p) => {
189
+ const m = p.attributes;
190
+ m && Object.keys(m).forEach((g) => {
191
+ g === h.fieldName && d.push(this._getChartOption({
192
+ value: n,
193
+ values: m,
188
194
  formattedValues: a,
189
195
  expressionValues: r,
190
196
  fieldName: i,
191
- chartType: n,
192
- relatedFieldName: _,
197
+ chartType: s,
198
+ relatedFieldName: g,
193
199
  hasMultipleRelatedFeatures: l?.length > 1,
194
200
  fieldInfos: t,
195
201
  color: o
196
202
  }));
197
203
  });
198
- }), u && (u === "one-to-many" || u === "many-to-many") ? c : [c[0]];
204
+ }), f && (f === "one-to-many" || f === "many-to-many") ? d : [d[0]];
199
205
  }
200
206
  _getTooltip({ label: e, value: t, chartType: i }) {
201
207
  return i === "pie-chart" ? `${e}` : `${e}: ${t}`;
202
208
  }
203
209
  _getChartOption(e) {
204
- const { value: t, values: i, formattedValues: a, expressionValues: n, fieldName: s, relatedFieldName: o, fieldInfos: r, chartType: c, hasMultipleRelatedFeatures: m, color: d } = e, { layer: l, graphic: p } = this, u = this.fieldInfoMap ?? /* @__PURE__ */ new Map(), { normalizeField: f, tooltipField: h } = t, g = f ? A(f) ? i[$(f).fieldName] : i[f] : null, _ = re(s) && n?.[s] !== void 0 ? n[s] : o && i[o] !== void 0 ? i[o] : i[s] !== void 0 ? i[s] : a[s], x = _ === void 0 ? null : _ && g && typeof _ == "number" && typeof g == "number" ? _ / g : _, v = ne(r, s), M = E(s, l), b = (h && a[h] !== void 0 ? a[h] : P({
205
- fieldInfo: v || new te({ fieldName: M }),
210
+ const { value: t, values: i, formattedValues: a, expressionValues: s, fieldName: n, relatedFieldName: o, fieldInfos: r, chartType: d, hasMultipleRelatedFeatures: h, color: v } = e, { layer: l, graphic: c } = this, f = this.fieldInfoMap ?? /* @__PURE__ */ new Map(), { normalizeField: u, tooltipField: p } = t, m = u ? b(u) ? i[k(u).fieldName] : i[u] : null, g = se(n) && s?.[n] !== void 0 ? s[n] : o && i[o] !== void 0 ? i[o] : i[n] !== void 0 ? i[n] : a[n], x = g === void 0 ? null : g && m && typeof g == "number" && typeof m == "number" ? g / m : g, _ = ne(r, n), C = X(n, l), M = (p && a[p] !== void 0 ? a[p] : P({
211
+ fieldInfo: _ || new ie({ fieldName: C }),
206
212
  expressionInfos: this.popupTemplate?.expressionInfos,
207
- graphic: p,
213
+ graphic: c,
208
214
  layer: l
209
- })) ?? "", Y = a[M] ?? "", V = x != null ? typeof x == "number" ? x : Number(x) : null;
210
- if (A(s)) {
211
- const T = u.get(s.toLowerCase()), U = h ? u.get(h.toLowerCase()) : null, D = T?.fieldName ?? s, R = m && h ? $(h).fieldName : U?.fieldName ?? h, O = (m && R ? i[R] : a[R] ?? (T && P({ fieldInfo: T, layer: l, graphic: p })) ?? T?.fieldName ?? o) ?? "", H = (m && o ? i[o] : a[D]) ?? "";
212
- return new L({
213
- fieldName: s,
215
+ })) ?? "", Y = a[C] ?? "", L = x != null ? typeof x == "number" ? x : Number(x) : null;
216
+ if (b(n)) {
217
+ const A = f.get(n.toLowerCase()), U = p ? f.get(p.toLowerCase()) : null, D = A?.fieldName ?? n, F = h && p ? k(p).fieldName : U?.fieldName ?? p, O = (h && F ? i[F] : a[F] ?? (A && P({ fieldInfo: A, layer: l, graphic: c })) ?? A?.fieldName ?? o) ?? "", H = (h && o ? i[o] : a[D]) ?? "";
218
+ return new N({
219
+ fieldName: n,
214
220
  tooltip: this._getTooltip({
215
221
  label: O,
216
222
  value: H,
217
- chartType: c
223
+ chartType: d
218
224
  }),
219
- color: d,
220
- value: V
225
+ color: v,
226
+ value: L
221
227
  });
222
228
  }
223
- return new L({
224
- fieldName: s,
229
+ return new N({
230
+ fieldName: n,
225
231
  tooltip: this._getTooltip({
226
- label: b,
232
+ label: M,
227
233
  value: Y,
228
- chartType: c
234
+ chartType: d
229
235
  }),
230
- color: d,
231
- value: V
236
+ color: v,
237
+ value: L
232
238
  });
233
239
  }
234
240
  _getRenderer() {
@@ -245,25 +251,38 @@ class pe extends Q {
245
251
  const { color: e } = await import("@amcharts/amcharts5/index.js"), t = /* @__PURE__ */ new Map(), i = this._getRenderer(), a = "default";
246
252
  if (!i)
247
253
  return t;
248
- const n = await J(i);
249
- return n.delete(a), Array.from(n.values()).every((o) => o?.length === 1) && Array.from(n.keys()).forEach((o) => {
250
- const r = n.get(o)?.[0]?.toCss(!0);
254
+ const s = await Q(i);
255
+ return s.delete(a), Array.from(s.values()).every((o) => o?.length === 1) && Array.from(s.keys()).forEach((o) => {
256
+ const r = s.get(o)?.[0]?.toCss(!0);
251
257
  r && t.set(o, e(r));
252
258
  }), t;
253
259
  }
254
- async _createChart(e) {
255
- const { activeMediaInfo: t } = this;
256
- if (!e || !t)
260
+ _isChartRequestCurrent(e) {
261
+ return this.isConnected && e === this._chartRequestRevision;
262
+ }
263
+ async _createChart(e, t) {
264
+ const { activeMediaInfo: i } = this;
265
+ if (!e || !i)
266
+ return;
267
+ const { createRoot: a } = await import("../../chunks/chart-utils.js");
268
+ if (!this._isChartRequestCurrent(t) || !e.isConnected)
269
+ return;
270
+ const s = await a(e, void 0, (n) => {
271
+ this._chartRoot = n;
272
+ });
273
+ if (!this._isChartRequestCurrent(t) || !e.isConnected) {
274
+ s.isDisposed() || s.dispose();
257
275
  return;
258
- const { createRoot: i } = await import("../../chunks/chart-utils.js"), a = await i(e);
259
- this._chartRoot = a, this._renderChart({
260
- mediaInfo: t,
261
- root: a
276
+ }
277
+ await this._renderChart({
278
+ mediaInfo: i,
279
+ root: s,
280
+ requestRevision: t
262
281
  });
263
282
  }
264
283
  _handleMediaKeydown(e) {
265
284
  const { key: t } = e;
266
- e.defaultPrevented || oe(e) || (le(t, this._direction, { horizontalOnly: !0 }) && (e.stopPropagation(), e.preventDefault(), this.previous()), ce(t, this._direction, { horizontalOnly: !0 }) && (e.stopPropagation(), e.preventDefault(), this.next()));
285
+ e.defaultPrevented || le(e) || (ce(t, this._direction, { horizontalOnly: !0 }) && (e.stopPropagation(), e.preventDefault(), this.previous()), de(t, this._direction, { horizontalOnly: !0 }) && (e.stopPropagation(), e.preventDefault(), this.next()));
267
286
  }
268
287
  _canAnimateChart() {
269
288
  return !this.chartAnimationDisabled && !this._prefersReducedMotion;
@@ -274,12 +293,11 @@ class pe extends Q {
274
293
  _getChartSeriesAnimationMS() {
275
294
  return this._canAnimateChart() ? fe : 0;
276
295
  }
277
- async _customizeChartTooltip(e, t = "horizontal") {
278
- const { color: i } = await import("@amcharts/amcharts5/index.js");
296
+ _customizeChartTooltip(e, t, i = "horizontal") {
279
297
  e.setAll({
280
- pointerOrientation: t
298
+ pointerOrientation: i
281
299
  }), e.get("background")?.setAll({
282
- stroke: i(ue)
300
+ stroke: t
283
301
  }), e.label.setAll({
284
302
  direction: this._direction,
285
303
  oversizedBehavior: "wrap",
@@ -287,173 +305,188 @@ class pe extends Q {
287
305
  });
288
306
  }
289
307
  async _createPieChart(e, t) {
290
- const [{ Tooltip: i }, { PieChart: a, PieSeries: n }] = await Promise.all([
308
+ const [{ Tooltip: i, color: a }, { PieChart: s, PieSeries: n }] = await Promise.all([
291
309
  import("@amcharts/amcharts5/index.js"),
292
310
  import("@amcharts/amcharts5/percent.js")
293
- ]), { mediaInfo: s, root: o } = e, { title: r } = s, c = 5, m = s?.altText || s?.title || "", d = o.container.children.push(a.new(o, {
311
+ ]);
312
+ if (!this._isChartRequestCurrent(e.requestRevision))
313
+ return;
314
+ const { mediaInfo: o, root: r } = e, { title: d } = o, h = 5, v = o?.altText || o?.title || "", l = r.container.children.push(s.new(r, {
294
315
  role: "figure",
295
- ariaLabel: m,
316
+ ariaLabel: v,
296
317
  focusable: !0,
297
- paddingBottom: c,
298
- paddingTop: c,
299
- paddingLeft: c,
300
- paddingRight: c
301
- })), l = `{category}: {valuePercentTotal.formatNumber('0.00')}%
302
- ({value})`, p = i.new(o, {
303
- labelText: l
304
- }), u = d.series.push(n.new(o, {
305
- name: r,
306
- valueField: w,
318
+ paddingBottom: h,
319
+ paddingTop: h,
320
+ paddingLeft: h,
321
+ paddingRight: h
322
+ })), c = `{category}: {valuePercentTotal.formatNumber('0.00')}%
323
+ ({value})`, f = i.new(r, {
324
+ labelText: c
325
+ }), u = l.series.push(n.new(r, {
326
+ name: d,
327
+ valueField: R,
307
328
  categoryField: y,
308
- tooltip: p
329
+ tooltip: f
309
330
  }));
310
331
  u.ticks.template.set("forceHidden", !0), u.labels.template.set("forceHidden", !0), u.slices.template.states.create("active", {
311
- shiftRadius: c
312
- }), this._customizeChartTooltip(p), u.slices.template.setAll({
313
- ariaLabel: l,
332
+ shiftRadius: h
333
+ }), this._customizeChartTooltip(f, a(T)), u.slices.template.setAll({
334
+ ariaLabel: c,
314
335
  focusable: !0,
315
336
  templateField: "columnSettings"
316
- }), u.data.setAll(t), u.appear(this._getChartSeriesAnimationMS()), d.appear(this._getChartAnimationMS()), d.root.dom.classList.toggle("chart-rendered", !0);
337
+ }), u.data.setAll(t), u.appear(this._getChartSeriesAnimationMS()), l.appear(this._getChartAnimationMS()), l.root.dom.classList.toggle("chart-rendered", !0);
317
338
  }
318
339
  _getMinSeriesValue(e) {
319
340
  let t = 0;
320
341
  return e.forEach((i) => t = Math.min(i.value, t)), t;
321
342
  }
322
343
  async _createColumnChart(e, t, i) {
323
- const [{ Tooltip: a, Scrollbar: n }, { CategoryAxis: s, AxisRendererX: o, AxisRendererY: r, ValueAxis: c, ColumnSeries: m }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]), { mediaInfo: d, root: l } = t, { value: p, title: u } = d, { _direction: f } = this;
344
+ const [{ Tooltip: a, Scrollbar: s, color: n }, { CategoryAxis: o, AxisRendererX: r, AxisRendererY: d, ValueAxis: h, ColumnSeries: v }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]);
345
+ if (!this._isChartRequestCurrent(t.requestRevision))
346
+ return;
347
+ const { mediaInfo: l, root: c } = t, { value: f, title: u } = l, { _direction: p } = this;
324
348
  e.setAll({
325
349
  wheelX: "panX",
326
350
  wheelY: "zoomX"
327
351
  });
328
- const h = e.xAxes.push(s.new(l, {
329
- renderer: o.new(l, {
330
- inversed: f === "rtl"
352
+ const m = e.xAxes.push(o.new(c, {
353
+ renderer: r.new(c, {
354
+ inversed: p === "rtl"
331
355
  }),
332
356
  categoryField: y
333
357
  }));
334
- h.get("renderer").labels.template.setAll({
358
+ m.get("renderer").labels.template.setAll({
335
359
  forceHidden: !0
336
360
  });
337
- const g = e.yAxes.push(c.new(l, {
338
- renderer: r.new(l, { inside: !1 }),
339
- min: this._getMinSeriesValue(p.series)
361
+ const g = e.yAxes.push(h.new(c, {
362
+ renderer: d.new(c, { inside: !1 }),
363
+ min: this._getMinSeriesValue(f.series)
340
364
  }));
341
365
  g.get("renderer").labels.template.setAll({
342
- direction: f
366
+ direction: p
343
367
  });
344
- const _ = "{categoryX}", x = a.new(l, {
345
- labelText: _
346
- }), v = e.series.push(m.new(l, {
368
+ const x = "{categoryX}", _ = a.new(c, {
369
+ labelText: x
370
+ }), C = e.series.push(v.new(c, {
347
371
  name: u,
348
- xAxis: h,
372
+ xAxis: m,
349
373
  yAxis: g,
350
- valueYField: w,
374
+ valueYField: R,
351
375
  categoryXField: y,
352
- tooltip: x
376
+ tooltip: _
353
377
  }));
354
- this._customizeChartTooltip(x), v.columns.template.setAll({
355
- ariaLabel: _,
378
+ this._customizeChartTooltip(_, n(T)), C.columns.template.setAll({
379
+ ariaLabel: x,
356
380
  focusable: !0,
357
381
  templateField: "columnSettings"
358
- }), p.series.length > k && e.set("scrollbarX", n.new(l, {
382
+ }), f.series.length > V && e.set("scrollbarX", s.new(c, {
359
383
  orientation: "horizontal"
360
- })), h.data.setAll(i), v.data.setAll(i), v.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
384
+ })), m.data.setAll(i), C.data.setAll(i), C.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
361
385
  }
362
386
  async _createBarChart(e, t, i) {
363
- const [{ Tooltip: a, Scrollbar: n }, { CategoryAxis: s, AxisRendererX: o, AxisRendererY: r, ValueAxis: c, ColumnSeries: m }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]), { mediaInfo: d, root: l } = t, { value: p, title: u } = d, { _direction: f } = this;
387
+ const [{ Tooltip: a, Scrollbar: s, color: n }, { CategoryAxis: o, AxisRendererX: r, AxisRendererY: d, ValueAxis: h, ColumnSeries: v }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]);
388
+ if (!this._isChartRequestCurrent(t.requestRevision))
389
+ return;
390
+ const { mediaInfo: l, root: c } = t, { value: f, title: u } = l, { _direction: p } = this;
364
391
  e.setAll({
365
392
  wheelX: "panY",
366
393
  wheelY: "zoomY"
367
394
  });
368
- const h = e.yAxes.push(s.new(l, {
369
- renderer: r.new(l, {
395
+ const m = e.yAxes.push(o.new(c, {
396
+ renderer: d.new(c, {
370
397
  inversed: !0
371
398
  }),
372
399
  categoryField: y
373
400
  }));
374
- h.get("renderer").labels.template.setAll({
401
+ m.get("renderer").labels.template.setAll({
375
402
  forceHidden: !0
376
403
  });
377
- const g = e.xAxes.push(c.new(l, {
378
- renderer: o.new(l, {
404
+ const g = e.xAxes.push(h.new(c, {
405
+ renderer: r.new(c, {
379
406
  inside: !1,
380
- inversed: f === "rtl"
407
+ inversed: p === "rtl"
381
408
  }),
382
- min: this._getMinSeriesValue(p.series)
409
+ min: this._getMinSeriesValue(f.series)
383
410
  }));
384
411
  g.get("renderer").labels.template.setAll({
385
- direction: f
412
+ direction: p
386
413
  });
387
- const _ = "{categoryY}", x = a.new(l, {
388
- labelText: _
389
- }), v = e.series.push(m.new(l, {
414
+ const x = "{categoryY}", _ = a.new(c, {
415
+ labelText: x
416
+ }), C = e.series.push(v.new(c, {
390
417
  name: u,
391
418
  xAxis: g,
392
- yAxis: h,
393
- valueXField: w,
419
+ yAxis: m,
420
+ valueXField: R,
394
421
  categoryYField: y,
395
- tooltip: x
422
+ tooltip: _
396
423
  }));
397
- this._customizeChartTooltip(x, "vertical"), v.columns.template.setAll({
398
- ariaLabel: _,
424
+ this._customizeChartTooltip(_, n(T), "vertical"), C.columns.template.setAll({
425
+ ariaLabel: x,
399
426
  focusable: !0,
400
427
  templateField: "columnSettings"
401
- }), p.series.length > k && e.set("scrollbarY", n.new(l, {
428
+ }), f.series.length > V && e.set("scrollbarY", s.new(c, {
402
429
  orientation: "vertical"
403
- })), h.data.setAll(i), v.data.setAll(i), v.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
430
+ })), m.data.setAll(i), C.data.setAll(i), C.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
404
431
  }
405
432
  async _createLineChart(e, t, i) {
406
- const [{ Tooltip: a, Scrollbar: n }, { CategoryAxis: s, AxisRendererX: o, AxisRendererY: r, ValueAxis: c, LineSeries: m }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]), { root: d, mediaInfo: l } = t, { value: p, title: u } = l, { _direction: f } = this;
433
+ const [{ Tooltip: a, Scrollbar: s, color: n }, { CategoryAxis: o, AxisRendererX: r, AxisRendererY: d, ValueAxis: h, LineSeries: v }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]);
434
+ if (!this._isChartRequestCurrent(t.requestRevision))
435
+ return;
436
+ const { root: l, mediaInfo: c } = t, { value: f, title: u } = c, { _direction: p } = this;
407
437
  e.setAll({
408
438
  wheelX: "panX",
409
439
  wheelY: "zoomX"
410
440
  });
411
- const h = e.xAxes.push(s.new(d, {
412
- renderer: o.new(d, {
413
- inversed: f === "rtl"
441
+ const m = e.xAxes.push(o.new(l, {
442
+ renderer: r.new(l, {
443
+ inversed: p === "rtl"
414
444
  }),
415
445
  categoryField: y
416
446
  }));
417
- h.get("renderer").labels.template.setAll({
447
+ m.get("renderer").labels.template.setAll({
418
448
  forceHidden: !0
419
449
  });
420
- const g = e.yAxes.push(c.new(d, {
421
- renderer: r.new(d, { inside: !1 }),
422
- min: this._getMinSeriesValue(p.series)
450
+ const g = e.yAxes.push(h.new(l, {
451
+ renderer: d.new(l, { inside: !1 }),
452
+ min: this._getMinSeriesValue(f.series)
423
453
  }));
424
454
  g.get("renderer").labels.template.setAll({
425
- direction: f
455
+ direction: p
426
456
  });
427
- const _ = "{categoryX}", x = i[0]?.lineSettings?.stroke, v = a.new(d, {
428
- getFillFromSprite: !x,
429
- labelText: _
457
+ const x = "{categoryX}", _ = i[0]?.lineSettings?.stroke, C = a.new(l, {
458
+ getFillFromSprite: !_,
459
+ labelText: x
430
460
  });
431
- x && v.get("background")?.setAll({
432
- fill: x
461
+ _ && C.get("background")?.setAll({
462
+ fill: _
433
463
  });
434
- const M = e.series.push(m.new(d, {
464
+ const M = e.series.push(v.new(l, {
435
465
  name: u,
436
- xAxis: h,
466
+ xAxis: m,
437
467
  yAxis: g,
438
- valueYField: w,
468
+ valueYField: R,
439
469
  categoryXField: y,
440
- tooltip: v
470
+ tooltip: C
441
471
  }));
442
472
  M.strokes.template.setAll({
443
473
  templateField: "lineSettings"
444
- }), this._customizeChartTooltip(v, "vertical"), p.series.length > k && e.set("scrollbarX", n.new(d, {
474
+ }), this._customizeChartTooltip(C, n(T), "vertical"), f.series.length > V && e.set("scrollbarX", s.new(l, {
445
475
  orientation: "horizontal"
446
- })), h.data.setAll(i), M.data.setAll(i), M.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
476
+ })), m.data.setAll(i), M.data.setAll(i), M.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
447
477
  }
448
478
  async _createXYChart(e, t) {
449
- const { XYChart: i, XYCursor: a } = await import("@amcharts/amcharts5/xy.js"), { root: n, mediaInfo: s } = e, { type: o } = s, r = s?.altText || s?.title || "", c = n.container.children.push(i.new(n, {
479
+ const { XYChart: i, XYCursor: a } = await import("@amcharts/amcharts5/xy.js");
480
+ if (!this._isChartRequestCurrent(e.requestRevision))
481
+ return;
482
+ const { root: s, mediaInfo: n } = e, { type: o } = n, r = n?.altText || n?.title || "", d = s.container.children.push(i.new(s, {
450
483
  role: "figure",
451
484
  ariaLabel: r,
452
485
  focusable: !0,
453
486
  panX: !0,
454
487
  panY: !0
455
488
  }));
456
- c.set("cursor", a.new(n, {})), o === "column-chart" && await this._createColumnChart(c, e, t), o === "bar-chart" && await this._createBarChart(c, e, t), o === "line-chart" && await this._createLineChart(c, e, t), c.root.dom.classList.toggle("chart-rendered", !0);
489
+ d.set("cursor", a.new(s, {})), o === "column-chart" ? await this._createColumnChart(d, e, t) : o === "bar-chart" ? await this._createBarChart(d, e, t) : o === "line-chart" && await this._createLineChart(d, e, t), this._isChartRequestCurrent(e.requestRevision) && d.root.dom.classList.toggle("chart-rendered", !0);
457
490
  }
458
491
  _clearMediaRefreshTimer() {
459
492
  const { _refreshTimer: e } = this;
@@ -474,24 +507,26 @@ class pe extends Q {
474
507
  _setRefreshTimeout(e) {
475
508
  const { refreshInterval: t, value: i } = e, a = t * 6e4;
476
509
  this._updateMediaInfoTimestamp(i.sourceURL);
477
- const n = window.setInterval(() => {
510
+ const s = window.setInterval(() => {
478
511
  this._updateMediaInfoTimestamp(i.sourceURL);
479
512
  }, a);
480
- this._refreshTimer = n;
513
+ this._refreshTimer = s;
481
514
  }
482
515
  _getImageSource(e, t) {
483
- const i = e.includes("?") ? "&" : "?", [a, n = ""] = e.split("#");
484
- return `${a}${i}timestamp=${t}${n ? "#" : ""}${n}`;
516
+ const i = e.includes("?") ? "&" : "?", [a, s = ""] = e.split("#");
517
+ return `${a}${i}timestamp=${t}${s ? "#" : ""}${s}`;
485
518
  }
486
519
  _updateChartElement(e) {
487
- this._chartRoot?.dispose(), this._chartRoot = void 0, e && this._createChart(e);
520
+ this._chartElement = e;
521
+ const t = ++this._chartRequestRevision;
522
+ this._chartRoot?.dispose(), this._chartRoot = void 0, !(!e || !this.isConnected) && this._createChart(e, t);
488
523
  }
489
524
  render() {
490
525
  return I`<div class="root" @keydown=${this._handleMediaKeydown}><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this._renderMedia()}</div>`;
491
526
  }
492
527
  _renderMedia() {
493
528
  const { formattedMediaInfoCount: e, activeMediaInfoIndex: t } = this, i = this._renderMediaText();
494
- return e ? I`<div class="container">${this._renderMediaInfo()}<div class="item-navigation">${i}${e > 1 ? I`<div class="pagination">${this._renderMediaPageButton("previous")}<span class="pagination-text">${Z(this.messages?.pageText ?? "", {
529
+ return e ? I`<div class="container">${this._renderMediaInfo()}<div class="item-navigation">${i}${e > 1 ? I`<div class="pagination">${this._renderMediaPageButton("previous")}<span class="pagination-text">${ee(this.messages?.pageText ?? "", {
495
530
  index: t + 1,
496
531
  total: e
497
532
  })}</span>${this._renderMediaPageButton("next")}</div>` : null}</div></div>` : null;
@@ -500,14 +535,14 @@ class pe extends Q {
500
535
  const { activeMediaInfo: e } = this;
501
536
  if (!e)
502
537
  return null;
503
- const t = e?.title ? I`<div class="item-title" .innerHTML=${N.sanitize(e.title) ?? ""}></div>` : null, i = e?.caption ? I`<div class="item-caption" .innerHTML=${N.sanitize(e.caption) ?? ""}></div>` : null;
538
+ const t = e?.title ? I`<div class="item-title" .innerHTML=${z.sanitize(e.title) ?? ""}></div>` : null, i = e?.caption ? I`<div class="item-caption" .innerHTML=${z.sanitize(e.caption) ?? ""}></div>` : null;
504
539
  return t || i ? I`<div class="item-text">${t}${i}</div>` : null;
505
540
  }
506
541
  _renderImageMediaInfo(e) {
507
542
  if (!e.value)
508
543
  return null;
509
- const { _refreshIntervalInfo: t } = this, { value: i, refreshInterval: a, altText: n, title: s } = e, { sourceURL: o, linkURL: r } = i, m = se(r ?? void 0) ? "_blank" : "_self", d = m === "_blank" ? "noreferrer" : "", l = a ? t : null, p = l ? l.sourceURL : o, u = I`<img alt=${(n || s) ?? C} src=${p ?? void 0 ?? C}>`;
510
- return (r ? I`<a href=${r ?? C} rel=${d ?? C} target=${m ?? C} title=${s ?? C}>${u}</a>` : null) ?? u;
544
+ const { _refreshIntervalInfo: t } = this, { value: i, refreshInterval: a, altText: s, title: n } = e, { sourceURL: o, linkURL: r } = i, h = oe(r ?? void 0) ? "_blank" : "_self", v = h === "_blank" ? "noreferrer" : "", l = a ? t : null, c = l ? l.sourceURL : o, f = I`<img alt=${(s || n) ?? w} src=${c ?? void 0 ?? w}>`;
545
+ return (r ? I`<a href=${r ?? w} rel=${v ?? w} target=${h ?? w} title=${n ?? w}>${f}</a>` : null) ?? f;
511
546
  }
512
547
  _renderChartMediaInfo(e) {
513
548
  const { activeMediaInfoIndex: t, formattedMediaInfoCount: i } = this;
@@ -524,37 +559,46 @@ class pe extends Q {
524
559
  _renderMediaPageButton(e) {
525
560
  if (this.formattedMediaInfoCount < 2)
526
561
  return null;
527
- const t = e === "previous", i = t ? this.messages?.previous ?? "" : this.messages?.next ?? "", a = t ? "chevron-left" : "chevron-right", n = t ? this.previous : this.next;
528
- return I`<button .ariaLabel=${i} class="pagination-button" @click=${n} tabindex=0 title=${i ?? C} type=button><calcite-icon flip-rtl class="pagination-icon" .icon=${a} scale=s></calcite-icon></button>`;
562
+ const t = e === "previous", i = t ? this.messages?.previous ?? "" : this.messages?.next ?? "", a = t ? "chevron-left" : "chevron-right", s = t ? this.previous : this.next;
563
+ return I`<button .ariaLabel=${i} class="pagination-button" @click=${s} tabindex=0 title=${i ?? w} type=button><calcite-icon flip-rtl class="pagination-icon" .icon=${a} scale=s></calcite-icon></button>`;
529
564
  }
530
565
  async _renderChart(e) {
531
- const { root: t, mediaInfo: i } = e, { value: a, type: n } = i, [{ default: s }, { default: o }, { default: r }, { esriChartColorSet: c }, { ColorSet: m, Theme: d }] = await Promise.all([
566
+ const { root: t, mediaInfo: i } = e, { value: a, type: s } = i, [{ default: n }, { default: o }, { default: r }, { esriChartColorSet: d }, { ColorSet: h, Theme: v }] = await Promise.all([
532
567
  import("@amcharts/amcharts5/themes/Animated.js"),
533
568
  import("@amcharts/amcharts5/themes/Dark.js"),
534
569
  import("@amcharts/amcharts5/themes/Responsive.js"),
535
570
  import("../../chunks/chartCommon.js"),
536
571
  import("@amcharts/amcharts5/index.js")
537
- ]), l = d.new(t);
538
- l.rule("ColorSet").set("colors", c), l.rule("ColorSet").set("reuse", !0);
539
- const p = [r.new(t), l];
540
- ie(this.el) === "dark" && p.push(o.new(t)), this._canAnimateChart() && p.push(s.new(t)), t.setThemes(p);
541
- const u = await this._getRendererColors(), f = await this._getSeriesColors(a.series), h = m.new(t, {}), g = f.get(a.series[0]), _ = g ? {
572
+ ]);
573
+ if (!this._isChartRequestCurrent(e.requestRevision))
574
+ return;
575
+ const l = v.new(t);
576
+ l.rule("ColorSet").set("colors", d), l.rule("ColorSet").set("reuse", !0);
577
+ const c = [r.new(t), l];
578
+ re(this.el) === "dark" && c.push(o.new(t)), this._canAnimateChart() && c.push(n.new(t)), t.setThemes(c);
579
+ const f = await this._getRendererColors();
580
+ if (!this._isChartRequestCurrent(e.requestRevision))
581
+ return;
582
+ const u = await this._getSeriesColors(a.series);
583
+ if (!this._isChartRequestCurrent(e.requestRevision))
584
+ return;
585
+ const p = h.new(t, {}), m = u.get(a.series[0]), g = m ? {
542
586
  lineSettings: {
543
- stroke: g
587
+ stroke: m
544
588
  }
545
- } : void 0, x = a.series.map((v, M) => {
546
- const b = f.get(v) || u.get(v.fieldName) || h.getIndex(M);
589
+ } : void 0, x = a.series.map((_, C) => {
590
+ const M = u.get(_) || f.get(_.fieldName) || p.getIndex(C);
547
591
  return {
548
- [y]: v.tooltip,
549
- [w]: v.value,
592
+ [y]: _.tooltip,
593
+ [R]: _.value,
550
594
  columnSettings: {
551
- fill: b,
552
- stroke: b
595
+ fill: M,
596
+ stroke: M
553
597
  },
554
- ..._
598
+ ...g
555
599
  };
556
- }).filter((v) => n === "pie-chart" ? v.value != null && v.value > 0 : !0);
557
- n === "pie-chart" ? this._createPieChart(e, x) : this._createXYChart(e, x);
600
+ }).filter((_) => s === "pie-chart" ? _.value != null && _.value > 0 : !0);
601
+ s === "pie-chart" ? await this._createPieChart(e, x) : await this._createXYChart(e, x);
558
602
  }
559
603
  }
560
604
  B("arcgis-feature-media", pe);