@arcgis/map-components 5.2.0-next.169 → 5.2.0-next.170

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 (65) hide show
  1. package/dist/cdn/{QNAOKY55.js → AOC6IH5V.js} +1 -1
  2. package/dist/cdn/{3IZHAJN7.js → ASE62666.js} +1 -1
  3. package/dist/cdn/{GSUQ5AKK.js → CMTDETKI.js} +1 -1
  4. package/dist/cdn/CTW7AD4G.js +2 -0
  5. package/dist/cdn/D63Y3AK3.js +2 -0
  6. package/dist/cdn/HRH6WU6F.js +2 -0
  7. package/dist/cdn/{XIYYT5SJ.js → KJPCX4EP.js} +1 -1
  8. package/dist/cdn/MYDW74L5.js +2 -0
  9. package/dist/cdn/OEKZISQJ.js +2 -0
  10. package/dist/cdn/OJRVXIAV.js +2 -0
  11. package/dist/cdn/{H6QQGYZN.js → PLOONHSR.js} +1 -1
  12. package/dist/cdn/PQP3TME2.js +2 -0
  13. package/dist/cdn/SHM6HHG4.js +2 -0
  14. package/dist/cdn/{BFMIWUQN.js → TI6HDT4M.js} +1 -1
  15. package/dist/cdn/{QXWPPVRF.js → UPUO5W3B.js} +1 -1
  16. package/dist/cdn/X2R4PMIV.js +2 -0
  17. package/dist/cdn/YH7AMHUJ.js +3 -0
  18. package/dist/cdn/{N5ISIJH5.js → YQ6M3MBJ.js} +1 -1
  19. package/dist/cdn/index.js +1 -1
  20. package/dist/cdn/main.css +1 -1
  21. package/dist/chunks/chart-utils.js +12 -12
  22. package/dist/chunks/esri-main.js +1 -1
  23. package/dist/components/arcgis-daylight/customElement.d.ts +30 -23
  24. package/dist/components/arcgis-editor/customElement.js +1 -1
  25. package/dist/components/arcgis-feature-form/customElement.js +1 -1
  26. package/dist/components/arcgis-feature-media/customElement.js +263 -216
  27. package/dist/components/arcgis-feature-table/customElement.js +1 -1
  28. package/dist/components/arcgis-multi-feature-form/customElement.js +1 -1
  29. package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +1 -1
  30. package/dist/components/arcgis-popup/customElement.js +155 -143
  31. package/dist/components/arcgis-shadow-cast/customElement.d.ts +17 -10
  32. package/dist/components/arcgis-time-bar/customElement.js +1 -1
  33. package/dist/components/arcgis-utility-network-picker/customElement.d.ts +2 -2
  34. package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +7 -4
  35. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +46 -38
  36. package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.d.ts +19 -3
  37. package/dist/components/arcgis-utility-network-trace-locations/customElement.d.ts +22 -15
  38. package/dist/components/arcgis-utility-network-trace-locations/customElement.js +70 -62
  39. package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +1 -1
  40. package/dist/docs/api.json +1 -1
  41. package/dist/docs/docs.json +1 -1
  42. package/dist/docs/vscode.html-custom-data.json +1 -1
  43. package/dist/docs/web-types.json +1 -1
  44. package/dist/index.d.ts +0 -4
  45. package/dist/loader.js +3 -3
  46. package/dist/types/lumina.d.ts +1 -6
  47. package/dist/types/preact.d.ts +1 -7
  48. package/dist/types/react.d.ts +1 -8
  49. package/dist/types/stencil.d.ts +1 -6
  50. package/package.json +6 -6
  51. package/dist/cdn/55FMVRQF.js +0 -2
  52. package/dist/cdn/6PMF2LH7.js +0 -2
  53. package/dist/cdn/F7O7VE64.js +0 -2
  54. package/dist/cdn/MISUZ26F.js +0 -2
  55. package/dist/cdn/PJCNEOQF.js +0 -2
  56. package/dist/cdn/RDBCKSUZ.js +0 -2
  57. package/dist/cdn/UAUGYXU6.js +0 -2
  58. package/dist/cdn/W3F5JSCP.js +0 -3
  59. package/dist/cdn/WQA6TRAU.js +0 -2
  60. package/dist/cdn/YXFFWLE5.js +0 -2
  61. package/dist/components/arcgis-feature-form-field/customElement.d.ts +0 -156
  62. package/dist/components/arcgis-feature-form-field/index.d.ts +0 -1
  63. package/dist/components/arcgis-feature-form-field/types.d.ts +0 -7
  64. package/dist/components/arcgis-feature-form-field-number/customElement.d.ts +0 -4
  65. package/dist/components/arcgis-feature-form-field-number/index.d.ts +0 -1
@@ -1,36 +1,36 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import { c as B } from "../../chunks/runtime.js";
3
- import { css as j, html as _ } from "lit";
4
- import { ref as W } from "lit/directives/ref.js";
5
- import { keyed as K } from "lit/directives/keyed.js";
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, nothing as y } 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 V 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 R, 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 = j`.container{display:flex;flex-flow:row wrap;align-items:center;margin-top:var(--calcite-spacing-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-spacing-xs);padding-inline:var(--calcite-spacing-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-spacing-xxs);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-spacing-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-spacing-xs)}.item-text{margin-inline-end:var(--calcite-spacing-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-spacing-xxs);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))
3
+ import { ref as j } from "lit/directives/ref.js";
4
+ import { keyed as W } from "lit/directives/keyed.js";
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-spacing-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-spacing-xs);padding-inline:var(--calcite-spacing-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-spacing-xxs);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-spacing-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-spacing-xs)}.item-text{margin-inline-end:var(--calcite-spacing-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-spacing-xxs);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, C = "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._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;
@@ -50,12 +50,21 @@ class pe extends Q {
50
50
  setActiveMedia(e) {
51
51
  this._setContentElementMedia(e);
52
52
  }
53
+ willUpdate(e) {
54
+ (e.has("expressionValues") || e.has("fieldInfoMap") || e.has("formattedValues") || e.has("graphic") || e.has("layer") || e.has("mediaInfos") || e.has("popupTemplate") || e.has("relatedInfos") || e.has("values")) && this._chartRevision++;
55
+ }
53
56
  loaded() {
54
57
  this.manager.onLifecycle(() => [
55
- ee(() => [this.activeMediaInfo, this.activeMediaInfoIndex], () => this._setupMediaRefreshTimer(), { initial: !0 }),
58
+ te(() => [this.activeMediaInfo, this.activeMediaInfoIndex], () => this._setupMediaRefreshTimer(), { initial: !0 }),
56
59
  { remove: () => this._clearMediaRefreshTimer() }
57
60
  ]);
58
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
+ }
59
68
  _setContentElementMedia(e) {
60
69
  const { formattedMediaInfoCount: t } = this, i = (e + t) % t;
61
70
  this.activeMediaInfoIndex = i;
@@ -65,48 +74,48 @@ class pe extends Q {
65
74
  this._setContentElementMedia(i);
66
75
  }
67
76
  _formatMediaInfos() {
68
- 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 ?? {};
69
78
  return e?.map((o) => {
70
79
  const r = o?.clone();
71
80
  if (!r)
72
81
  return null;
73
- if (r.title = R({
82
+ if (r.title = $({
74
83
  values: i,
75
- fieldInfoMap: n,
84
+ fieldInfoMap: s,
76
85
  globalValues: a,
77
86
  layer: t,
78
87
  text: r.title
79
- }), r.caption = R({
88
+ }), r.caption = $({
80
89
  values: i,
81
- fieldInfoMap: n,
90
+ fieldInfoMap: s,
82
91
  globalValues: a,
83
92
  layer: t,
84
93
  text: r.caption
85
- }), r.altText = R({
94
+ }), r.altText = $({
86
95
  values: i,
87
- fieldInfoMap: n,
96
+ fieldInfoMap: s,
88
97
  globalValues: a,
89
98
  layer: t,
90
99
  text: r.altText
91
100
  }), r.type === "image") {
92
101
  if (!r.value)
93
102
  return null;
94
- const c = r.value;
103
+ const d = r.value;
95
104
  return this._setImageValue({
96
- value: c,
105
+ value: d,
97
106
  formattedValues: a,
98
107
  layer: t
99
- }), c.sourceURL ? r : void 0;
108
+ }), d.sourceURL ? r : void 0;
100
109
  }
101
110
  if (r.type === "pie-chart" || r.type === "line-chart" || r.type === "column-chart" || r.type === "bar-chart") {
102
111
  if (!r.value)
103
112
  return null;
104
- const c = r.value;
113
+ const d = r.value;
105
114
  return this._setChartValue({
106
- value: c,
115
+ value: d,
107
116
  chartType: r.type,
108
117
  values: i,
109
- expressionValues: s,
118
+ expressionValues: n,
110
119
  formattedValues: a,
111
120
  layer: t
112
121
  }), r;
@@ -115,18 +124,18 @@ class pe extends Q {
115
124
  }).filter((o) => o != null) ?? [];
116
125
  }
117
126
  _setImageValue(e) {
118
- 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;
119
128
  if (o) {
120
- const r = z(o, n);
121
- i.sourceURL = X({
129
+ const r = q(o, s);
130
+ i.sourceURL = E({
122
131
  formattedValues: a,
123
132
  template: r,
124
133
  fieldInfoMap: t
125
134
  });
126
135
  }
127
- if (s) {
128
- const r = z(s, n);
129
- i.linkURL = X({
136
+ if (n) {
137
+ const r = q(n, s);
138
+ i.linkURL = E({
130
139
  formattedValues: a,
131
140
  template: r,
132
141
  fieldInfoMap: t
@@ -134,97 +143,97 @@ class pe extends Q {
134
143
  }
135
144
  }
136
145
  _setChartValue(e) {
137
- 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;
138
- 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)))
139
148
  return;
140
- const u = r?.fieldInfos ?? [];
141
- t.series = [], m.forEach((f, h) => {
142
- const g = t.colors?.[h];
143
- 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)) {
144
153
  t.series = [
145
154
  ...t.series,
146
155
  ...this._getRelatedChartInfos({
147
- fieldInfos: u,
148
- fieldName: f,
149
- formattedValues: n,
156
+ fieldInfos: f,
157
+ fieldName: u,
158
+ formattedValues: s,
150
159
  expressionValues: a,
151
- chartType: s,
160
+ chartType: n,
152
161
  value: t,
153
- color: g
162
+ color: m
154
163
  })
155
164
  ];
156
165
  return;
157
166
  }
158
- const x = this._getChartOption({
167
+ const g = this._getChartOption({
159
168
  value: t,
160
169
  values: i,
161
- chartType: s,
162
- formattedValues: n,
170
+ chartType: n,
171
+ formattedValues: s,
163
172
  expressionValues: a,
164
- fieldName: f,
165
- fieldInfos: u,
166
- color: g
173
+ fieldName: u,
174
+ fieldInfos: f,
175
+ color: m
167
176
  });
168
- t.series.push(x);
177
+ t.series.push(g);
169
178
  });
170
179
  }
171
180
  _getRelatedChartInfos(e) {
172
- 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);
173
- if (!d)
174
- return c;
175
- const { relatedFeatures: l, relation: p } = d;
176
- if (!p || !l)
177
- return c;
178
- const { cardinality: u } = p;
179
- return l.forEach((h) => {
180
- const g = h.attributes;
181
- g && Object.keys(g).forEach((x) => {
182
- x === m.fieldName && c.push(this._getChartOption({
183
- value: s,
184
- 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,
185
194
  formattedValues: a,
186
195
  expressionValues: r,
187
196
  fieldName: i,
188
- chartType: n,
189
- relatedFieldName: x,
197
+ chartType: s,
198
+ relatedFieldName: g,
190
199
  hasMultipleRelatedFeatures: l?.length > 1,
191
200
  fieldInfos: t,
192
201
  color: o
193
202
  }));
194
203
  });
195
- }), 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]];
196
205
  }
197
206
  _getTooltip({ label: e, value: t, chartType: i }) {
198
207
  return i === "pie-chart" ? `${e}` : `${e}: ${t}`;
199
208
  }
200
209
  _getChartOption(e) {
201
- 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, x = re(s) && n?.[s] !== void 0 ? n[s] : o && i[o] !== void 0 ? i[o] : i[s] !== void 0 ? i[s] : a[s], I = x === void 0 ? null : x && g && typeof x == "number" && typeof g == "number" ? x / g : x, v = ne(r, s), M = E(s, l), b = (h && a[h] !== void 0 ? a[h] : P({
202
- 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 }),
203
212
  expressionInfos: this.popupTemplate?.expressionInfos,
204
- graphic: p,
213
+ graphic: c,
205
214
  layer: l
206
- })) ?? "", Y = a[M] ?? "", L = I != null ? typeof I == "number" ? I : Number(I) : null;
207
- if (A(s)) {
208
- const T = u.get(s.toLowerCase()), U = h ? u.get(h.toLowerCase()) : null, D = T?.fieldName ?? s, F = m && h ? $(h).fieldName : U?.fieldName ?? h, O = (m && F ? i[F] : a[F] ?? (T && P({ fieldInfo: T, layer: l, graphic: p })) ?? T?.fieldName ?? o) ?? "", H = (m && o ? i[o] : a[D]) ?? "";
209
- return new V({
210
- 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,
211
220
  tooltip: this._getTooltip({
212
221
  label: O,
213
222
  value: H,
214
- chartType: c
223
+ chartType: d
215
224
  }),
216
- color: d,
225
+ color: v,
217
226
  value: L
218
227
  });
219
228
  }
220
- return new V({
221
- fieldName: s,
229
+ return new N({
230
+ fieldName: n,
222
231
  tooltip: this._getTooltip({
223
- label: b,
232
+ label: M,
224
233
  value: Y,
225
- chartType: c
234
+ chartType: d
226
235
  }),
227
- color: d,
236
+ color: v,
228
237
  value: L
229
238
  });
230
239
  }
@@ -242,25 +251,38 @@ class pe extends Q {
242
251
  const { color: e } = await import("@amcharts/amcharts5/index.js"), t = /* @__PURE__ */ new Map(), i = this._getRenderer(), a = "default";
243
252
  if (!i)
244
253
  return t;
245
- const n = await J(i);
246
- return n.delete(a), Array.from(n.values()).every((o) => o?.length === 1) && Array.from(n.keys()).forEach((o) => {
247
- 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);
248
257
  r && t.set(o, e(r));
249
258
  }), t;
250
259
  }
251
- async _createChart(e) {
252
- const { activeMediaInfo: t } = this;
253
- 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)
254
269
  return;
255
- const { createRoot: i } = await import("../../chunks/chart-utils.js"), a = await i(e);
256
- this._chartRoot = a, this._renderChart({
257
- mediaInfo: t,
258
- root: a
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();
275
+ return;
276
+ }
277
+ await this._renderChart({
278
+ mediaInfo: i,
279
+ root: s,
280
+ requestRevision: t
259
281
  });
260
282
  }
261
283
  _handleMediaKeydown(e) {
262
284
  const { key: t } = e;
263
- 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()));
264
286
  }
265
287
  _canAnimateChart() {
266
288
  return !this.chartAnimationDisabled && !this._prefersReducedMotion;
@@ -271,12 +293,11 @@ class pe extends Q {
271
293
  _getChartSeriesAnimationMS() {
272
294
  return this._canAnimateChart() ? fe : 0;
273
295
  }
274
- async _customizeChartTooltip(e, t = "horizontal") {
275
- const { color: i } = await import("@amcharts/amcharts5/index.js");
296
+ _customizeChartTooltip(e, t, i = "horizontal") {
276
297
  e.setAll({
277
- pointerOrientation: t
298
+ pointerOrientation: i
278
299
  }), e.get("background")?.setAll({
279
- stroke: i(ue)
300
+ stroke: t
280
301
  }), e.label.setAll({
281
302
  direction: this._direction,
282
303
  oversizedBehavior: "wrap",
@@ -284,173 +305,188 @@ class pe extends Q {
284
305
  });
285
306
  }
286
307
  async _createPieChart(e, t) {
287
- const [{ Tooltip: i }, { PieChart: a, PieSeries: n }] = await Promise.all([
308
+ const [{ Tooltip: i, color: a }, { PieChart: s, PieSeries: n }] = await Promise.all([
288
309
  import("@amcharts/amcharts5/index.js"),
289
310
  import("@amcharts/amcharts5/percent.js")
290
- ]), { 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, {
291
315
  role: "figure",
292
- ariaLabel: m,
316
+ ariaLabel: v,
293
317
  focusable: !0,
294
- paddingBottom: c,
295
- paddingTop: c,
296
- paddingLeft: c,
297
- paddingRight: c
298
- })), l = `{category}: {valuePercentTotal.formatNumber('0.00')}%
299
- ({value})`, p = i.new(o, {
300
- labelText: l
301
- }), u = d.series.push(n.new(o, {
302
- name: r,
303
- valueField: w,
304
- categoryField: C,
305
- tooltip: p
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,
328
+ categoryField: y,
329
+ tooltip: f
306
330
  }));
307
331
  u.ticks.template.set("forceHidden", !0), u.labels.template.set("forceHidden", !0), u.slices.template.states.create("active", {
308
- shiftRadius: c
309
- }), this._customizeChartTooltip(p), u.slices.template.setAll({
310
- ariaLabel: l,
332
+ shiftRadius: h
333
+ }), this._customizeChartTooltip(f, a(T)), u.slices.template.setAll({
334
+ ariaLabel: c,
311
335
  focusable: !0,
312
336
  templateField: "columnSettings"
313
- }), 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);
314
338
  }
315
339
  _getMinSeriesValue(e) {
316
340
  let t = 0;
317
341
  return e.forEach((i) => t = Math.min(i.value, t)), t;
318
342
  }
319
343
  async _createColumnChart(e, t, i) {
320
- 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;
321
348
  e.setAll({
322
349
  wheelX: "panX",
323
350
  wheelY: "zoomX"
324
351
  });
325
- const h = e.xAxes.push(s.new(l, {
326
- renderer: o.new(l, {
327
- inversed: f === "rtl"
352
+ const m = e.xAxes.push(o.new(c, {
353
+ renderer: r.new(c, {
354
+ inversed: p === "rtl"
328
355
  }),
329
- categoryField: C
356
+ categoryField: y
330
357
  }));
331
- h.get("renderer").labels.template.setAll({
358
+ m.get("renderer").labels.template.setAll({
332
359
  forceHidden: !0
333
360
  });
334
- const g = e.yAxes.push(c.new(l, {
335
- renderer: r.new(l, { inside: !1 }),
336
- 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)
337
364
  }));
338
365
  g.get("renderer").labels.template.setAll({
339
- direction: f
366
+ direction: p
340
367
  });
341
- const x = "{categoryX}", I = a.new(l, {
368
+ const x = "{categoryX}", _ = a.new(c, {
342
369
  labelText: x
343
- }), v = e.series.push(m.new(l, {
370
+ }), C = e.series.push(v.new(c, {
344
371
  name: u,
345
- xAxis: h,
372
+ xAxis: m,
346
373
  yAxis: g,
347
- valueYField: w,
348
- categoryXField: C,
349
- tooltip: I
374
+ valueYField: R,
375
+ categoryXField: y,
376
+ tooltip: _
350
377
  }));
351
- this._customizeChartTooltip(I), v.columns.template.setAll({
378
+ this._customizeChartTooltip(_, n(T)), C.columns.template.setAll({
352
379
  ariaLabel: x,
353
380
  focusable: !0,
354
381
  templateField: "columnSettings"
355
- }), p.series.length > k && e.set("scrollbarX", n.new(l, {
382
+ }), f.series.length > V && e.set("scrollbarX", s.new(c, {
356
383
  orientation: "horizontal"
357
- })), 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());
358
385
  }
359
386
  async _createBarChart(e, t, i) {
360
- 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;
361
391
  e.setAll({
362
392
  wheelX: "panY",
363
393
  wheelY: "zoomY"
364
394
  });
365
- const h = e.yAxes.push(s.new(l, {
366
- renderer: r.new(l, {
395
+ const m = e.yAxes.push(o.new(c, {
396
+ renderer: d.new(c, {
367
397
  inversed: !0
368
398
  }),
369
- categoryField: C
399
+ categoryField: y
370
400
  }));
371
- h.get("renderer").labels.template.setAll({
401
+ m.get("renderer").labels.template.setAll({
372
402
  forceHidden: !0
373
403
  });
374
- const g = e.xAxes.push(c.new(l, {
375
- renderer: o.new(l, {
404
+ const g = e.xAxes.push(h.new(c, {
405
+ renderer: r.new(c, {
376
406
  inside: !1,
377
- inversed: f === "rtl"
407
+ inversed: p === "rtl"
378
408
  }),
379
- min: this._getMinSeriesValue(p.series)
409
+ min: this._getMinSeriesValue(f.series)
380
410
  }));
381
411
  g.get("renderer").labels.template.setAll({
382
- direction: f
412
+ direction: p
383
413
  });
384
- const x = "{categoryY}", I = a.new(l, {
414
+ const x = "{categoryY}", _ = a.new(c, {
385
415
  labelText: x
386
- }), v = e.series.push(m.new(l, {
416
+ }), C = e.series.push(v.new(c, {
387
417
  name: u,
388
418
  xAxis: g,
389
- yAxis: h,
390
- valueXField: w,
391
- categoryYField: C,
392
- tooltip: I
419
+ yAxis: m,
420
+ valueXField: R,
421
+ categoryYField: y,
422
+ tooltip: _
393
423
  }));
394
- this._customizeChartTooltip(I, "vertical"), v.columns.template.setAll({
424
+ this._customizeChartTooltip(_, n(T), "vertical"), C.columns.template.setAll({
395
425
  ariaLabel: x,
396
426
  focusable: !0,
397
427
  templateField: "columnSettings"
398
- }), p.series.length > k && e.set("scrollbarY", n.new(l, {
428
+ }), f.series.length > V && e.set("scrollbarY", s.new(c, {
399
429
  orientation: "vertical"
400
- })), 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());
401
431
  }
402
432
  async _createLineChart(e, t, i) {
403
- 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;
404
437
  e.setAll({
405
438
  wheelX: "panX",
406
439
  wheelY: "zoomX"
407
440
  });
408
- const h = e.xAxes.push(s.new(d, {
409
- renderer: o.new(d, {
410
- inversed: f === "rtl"
441
+ const m = e.xAxes.push(o.new(l, {
442
+ renderer: r.new(l, {
443
+ inversed: p === "rtl"
411
444
  }),
412
- categoryField: C
445
+ categoryField: y
413
446
  }));
414
- h.get("renderer").labels.template.setAll({
447
+ m.get("renderer").labels.template.setAll({
415
448
  forceHidden: !0
416
449
  });
417
- const g = e.yAxes.push(c.new(d, {
418
- renderer: r.new(d, { inside: !1 }),
419
- 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)
420
453
  }));
421
454
  g.get("renderer").labels.template.setAll({
422
- direction: f
455
+ direction: p
423
456
  });
424
- const x = "{categoryX}", I = i[0]?.lineSettings?.stroke, v = a.new(d, {
425
- getFillFromSprite: !I,
457
+ const x = "{categoryX}", _ = i[0]?.lineSettings?.stroke, C = a.new(l, {
458
+ getFillFromSprite: !_,
426
459
  labelText: x
427
460
  });
428
- I && v.get("background")?.setAll({
429
- fill: I
461
+ _ && C.get("background")?.setAll({
462
+ fill: _
430
463
  });
431
- const M = e.series.push(m.new(d, {
464
+ const M = e.series.push(v.new(l, {
432
465
  name: u,
433
- xAxis: h,
466
+ xAxis: m,
434
467
  yAxis: g,
435
- valueYField: w,
436
- categoryXField: C,
437
- tooltip: v
468
+ valueYField: R,
469
+ categoryXField: y,
470
+ tooltip: C
438
471
  }));
439
472
  M.strokes.template.setAll({
440
473
  templateField: "lineSettings"
441
- }), 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, {
442
475
  orientation: "horizontal"
443
- })), 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());
444
477
  }
445
478
  async _createXYChart(e, t) {
446
- 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, {
447
483
  role: "figure",
448
484
  ariaLabel: r,
449
485
  focusable: !0,
450
486
  panX: !0,
451
487
  panY: !0
452
488
  }));
453
- 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);
454
490
  }
455
491
  _clearMediaRefreshTimer() {
456
492
  const { _refreshTimer: e } = this;
@@ -471,24 +507,26 @@ class pe extends Q {
471
507
  _setRefreshTimeout(e) {
472
508
  const { refreshInterval: t, value: i } = e, a = t * 6e4;
473
509
  this._updateMediaInfoTimestamp(i.sourceURL);
474
- const n = window.setInterval(() => {
510
+ const s = window.setInterval(() => {
475
511
  this._updateMediaInfoTimestamp(i.sourceURL);
476
512
  }, a);
477
- this._refreshTimer = n;
513
+ this._refreshTimer = s;
478
514
  }
479
515
  _getImageSource(e, t) {
480
- const i = e.includes("?") ? "&" : "?", [a, n = ""] = e.split("#");
481
- return `${a}${i}timestamp=${t}${n ? "#" : ""}${n}`;
516
+ const i = e.includes("?") ? "&" : "?", [a, s = ""] = e.split("#");
517
+ return `${a}${i}timestamp=${t}${s ? "#" : ""}${s}`;
482
518
  }
483
519
  _updateChartElement(e) {
484
- 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);
485
523
  }
486
524
  render() {
487
- return _`<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>`;
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>`;
488
526
  }
489
527
  _renderMedia() {
490
528
  const { formattedMediaInfoCount: e, activeMediaInfoIndex: t } = this, i = this._renderMediaText();
491
- return e ? _`<div class="container">${this._renderMediaInfo()}<div class="item-navigation">${i}${e > 1 ? _`<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 ?? "", {
492
530
  index: t + 1,
493
531
  total: e
494
532
  })}</span>${this._renderMediaPageButton("next")}</div>` : null}</div></div>` : null;
@@ -497,18 +535,18 @@ class pe extends Q {
497
535
  const { activeMediaInfo: e } = this;
498
536
  if (!e)
499
537
  return null;
500
- const t = e?.title ? _`<div class="item-title" .innerHTML=${N.sanitize(e.title) ?? ""}></div>` : null, i = e?.caption ? _`<div class="item-caption" .innerHTML=${N.sanitize(e.caption) ?? ""}></div>` : null;
501
- return t || i ? _`<div class="item-text">${t}${i}</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;
539
+ return t || i ? I`<div class="item-text">${t}${i}</div>` : null;
502
540
  }
503
541
  _renderImageMediaInfo(e) {
504
542
  if (!e.value)
505
543
  return null;
506
- 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 = _`<img alt=${(n || s) ?? y} src=${p ?? void 0 ?? y}>`;
507
- return (r ? _`<a href=${r ?? y} rel=${d ?? y} target=${m ?? y} title=${s ?? y}>${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;
508
546
  }
509
547
  _renderChartMediaInfo(e) {
510
548
  const { activeMediaInfoIndex: t, formattedMediaInfoCount: i } = this;
511
- return K(`media-${e.type}-${t}-${i}`, _`<div class="chart" ${W(this._updateChartElement)}></div>`);
549
+ return W(`media-${e.type}-${t}-${i}-${this._chartRevision}-${this._direction}-${this.chartAnimationDisabled}-${this._prefersReducedMotion}`, I`<div class="chart" ${j(this._updateChartElement)}></div>`);
512
550
  }
513
551
  _renderMediaInfoType() {
514
552
  const { activeMediaInfo: e } = this;
@@ -516,42 +554,51 @@ class pe extends Q {
516
554
  }
517
555
  _renderMediaInfo() {
518
556
  const { activeMediaInfo: e } = this;
519
- return e ? _`<div class="item-container"><div class="item">${this._renderMediaInfoType()}</div></div>` : null;
557
+ return e ? I`<div class="item-container"><div class="item">${this._renderMediaInfoType()}</div></div>` : null;
520
558
  }
521
559
  _renderMediaPageButton(e) {
522
560
  if (this.formattedMediaInfoCount < 2)
523
561
  return null;
524
- const t = e === "previous", i = t ? this.messages?.previous ?? "" : this.messages?.next ?? "", a = t ? "chevron-left" : "chevron-right", n = t ? this.previous : this.next;
525
- return _`<button .ariaLabel=${i} class="pagination-button" @click=${n} tabindex=0 title=${i ?? y} 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>`;
526
564
  }
527
565
  async _renderChart(e) {
528
- 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([
529
567
  import("@amcharts/amcharts5/themes/Animated.js"),
530
568
  import("@amcharts/amcharts5/themes/Dark.js"),
531
569
  import("@amcharts/amcharts5/themes/Responsive.js"),
532
570
  import("../../chunks/chartCommon.js"),
533
571
  import("@amcharts/amcharts5/index.js")
534
- ]), l = d.new(t);
535
- l.rule("ColorSet").set("colors", c), l.rule("ColorSet").set("reuse", !0);
536
- const p = [r.new(t), l];
537
- ie(this.el) === "dark" && p.push(o.new(t)), this._canAnimateChart() && p.push(s.new(t)), t.setThemes(p);
538
- const u = await this._getRendererColors(), f = await this._getSeriesColors(a.series), h = m.new(t, {}), g = f.get(a.series[0]), x = 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 ? {
539
586
  lineSettings: {
540
- stroke: g
587
+ stroke: m
541
588
  }
542
- } : void 0, I = a.series.map((v, M) => {
543
- 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);
544
591
  return {
545
- [C]: v.tooltip,
546
- [w]: v.value,
592
+ [y]: _.tooltip,
593
+ [R]: _.value,
547
594
  columnSettings: {
548
- fill: b,
549
- stroke: b
595
+ fill: M,
596
+ stroke: M
550
597
  },
551
- ...x
598
+ ...g
552
599
  };
553
- }).filter((v) => n === "pie-chart" ? v.value != null && v.value > 0 : !0);
554
- n === "pie-chart" ? this._createPieChart(e, I) : this._createXYChart(e, I);
600
+ }).filter((_) => s === "pie-chart" ? _.value != null && _.value > 0 : !0);
601
+ s === "pie-chart" ? await this._createPieChart(e, x) : await this._createXYChart(e, x);
555
602
  }
556
603
  }
557
604
  B("arcgis-feature-media", pe);