@arcgis/portal-components 5.2.0-next.164 → 5.2.0-next.166

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 (108) hide show
  1. package/dist/cdn/{2IKXUDFM.js → 25HZAERJ.js} +1 -1
  2. package/dist/cdn/{PO54NFLO.js → 2BW64XPI.js} +1 -1
  3. package/dist/cdn/2HVWEYMK.js +2 -0
  4. package/dist/cdn/{JIWLTMFC.js → 33KMD2KV.js} +1 -1
  5. package/dist/cdn/3FMXY5RA.js +2 -0
  6. package/dist/cdn/{PGVE7V53.js → 3U3QLHFR.js} +1 -1
  7. package/dist/cdn/{PS5BTYGD.js → 3WFFMXLP.js} +1 -1
  8. package/dist/cdn/434GUKA4.js +2 -0
  9. package/dist/cdn/{CWGXNX3W.js → 44BGVEI2.js} +1 -1
  10. package/dist/cdn/{GTD6FUPM.js → 4KELDQ5U.js} +1 -1
  11. package/dist/cdn/{3NTQM2R7.js → 53ODEKJY.js} +1 -1
  12. package/dist/cdn/5VCQSSPO.js +4 -0
  13. package/dist/cdn/{Y2EJ24EM.js → 5XZ2X7QF.js} +1 -1
  14. package/dist/cdn/{6RAOSMME.js → 63IORFWB.js} +1 -1
  15. package/dist/cdn/{X4E3B7EQ.js → 63SYEYNJ.js} +1 -1
  16. package/dist/cdn/{P2XPGJIH.js → 7C5WAARL.js} +1 -1
  17. package/dist/cdn/{O6KBOBTA.js → 7K6OHGZL.js} +1 -1
  18. package/dist/cdn/{7JRQ62JP.js → A6PCMJ5W.js} +1 -1
  19. package/dist/cdn/{XYH7L6WW.js → AE4IZR2S.js} +1 -1
  20. package/dist/cdn/AQKAKFND.js +2 -0
  21. package/dist/cdn/{QVWXUQZY.js → BHU46YRD.js} +1 -1
  22. package/dist/cdn/{QQ6MQPCH.js → BJQNTCTV.js} +1 -1
  23. package/dist/cdn/{QS53VF2B.js → BY6PQBOV.js} +1 -1
  24. package/dist/cdn/{UCE5G5TL.js → CFLKTIIF.js} +1 -1
  25. package/dist/cdn/CGJZ7TCO.js +2 -0
  26. package/dist/cdn/CHLDYOXO.js +2 -0
  27. package/dist/cdn/D2L3BGSD.js +2 -0
  28. package/dist/cdn/{3HINDHV7.js → D5YIE7S7.js} +1 -1
  29. package/dist/cdn/{TFGNQADN.js → D7CXMPYS.js} +1 -1
  30. package/dist/cdn/{3TLHOVLW.js → DH73YABO.js} +1 -1
  31. package/dist/cdn/{S62RRECO.js → DTXOA3YJ.js} +1 -1
  32. package/dist/cdn/{DITALHT7.js → EQTH5XGZ.js} +1 -1
  33. package/dist/cdn/{K3ROLJNC.js → EXY22JJE.js} +1 -1
  34. package/dist/cdn/{53GR4QVG.js → EYAISNAS.js} +1 -1
  35. package/dist/cdn/{FZUEX6YH.js → FUYVU3PI.js} +1 -1
  36. package/dist/cdn/{UQSYMUOF.js → HEGOPH46.js} +1 -1
  37. package/dist/cdn/IC2Y3HQB.js +2 -0
  38. package/dist/cdn/IKSSR2GR.js +2 -0
  39. package/dist/cdn/ILBJMDQJ.js +2 -0
  40. package/dist/cdn/{TA456NXC.js → IWPRELHF.js} +1 -1
  41. package/dist/cdn/{ST7YCKG6.js → JJVYB6BS.js} +1 -1
  42. package/dist/cdn/{Q53MAFDQ.js → K5OBB7AL.js} +1 -1
  43. package/dist/cdn/{UC42OQDP.js → L7XA73K5.js} +1 -1
  44. package/dist/cdn/{BFYTNFAM.js → LHHMU66O.js} +1 -1
  45. package/dist/cdn/{V4XGNCNI.js → LIHF7EWA.js} +1 -1
  46. package/dist/cdn/{HXDTSREX.js → LKHDQZPU.js} +1 -1
  47. package/dist/cdn/{DMLKGQRF.js → LKTRF45D.js} +1 -1
  48. package/dist/cdn/{4YPPX4Y3.js → MAW6CBNZ.js} +1 -1
  49. package/dist/cdn/{FD7SPNGP.js → MRW6GCHQ.js} +1 -1
  50. package/dist/cdn/{2IRP3ZVE.js → MWCD4AJV.js} +1 -1
  51. package/dist/cdn/{OUZPGGZR.js → NY3HIRUS.js} +1 -1
  52. package/dist/cdn/{3ZHDGFSL.js → OBQXRANK.js} +1 -1
  53. package/dist/cdn/{XGRVBCMF.js → ODEETVV3.js} +1 -1
  54. package/dist/cdn/{VPYZSDS3.js → OG7SIRKS.js} +1 -1
  55. package/dist/cdn/{C3W4HTWD.js → OVLGZQIP.js} +1 -1
  56. package/dist/cdn/{SOLQD7DU.js → P3VCVVZP.js} +1 -1
  57. package/dist/cdn/{MTY2ZUR2.js → PCHBGCH3.js} +1 -1
  58. package/dist/cdn/{AARKDW3L.js → PKDFFAYA.js} +1 -1
  59. package/dist/cdn/{MOJGAOYF.js → PLSCIEN2.js} +1 -1
  60. package/dist/cdn/{K4LOZYJF.js → QPO5ITKN.js} +1 -1
  61. package/dist/cdn/{P5WD6JVL.js → QVDPX7K3.js} +1 -1
  62. package/dist/cdn/{BKU43GE5.js → R7QKF2ZH.js} +1 -1
  63. package/dist/cdn/{RAAM3NQL.js → RBFK5HRE.js} +1 -1
  64. package/dist/cdn/{MEBV5YAO.js → RFYF3XAN.js} +1 -1
  65. package/dist/cdn/{453JLSJV.js → S3ZNJFNZ.js} +1 -1
  66. package/dist/cdn/{NKRXJF72.js → S4WRJD3R.js} +1 -1
  67. package/dist/cdn/{M6AFYDDU.js → S6I3TZ6Q.js} +1 -1
  68. package/dist/cdn/{LU7EPIPR.js → SLESYZ6I.js} +1 -1
  69. package/dist/cdn/{6VTAWA6R.js → SSGFE2S2.js} +1 -1
  70. package/dist/cdn/U64FTHLS.js +2 -0
  71. package/dist/cdn/{HOWXDT3E.js → UIGOQIAU.js} +1 -1
  72. package/dist/cdn/{UANMZWU3.js → V7DSYZPZ.js} +1 -1
  73. package/dist/cdn/VEDI36FS.js +2 -0
  74. package/dist/cdn/{CKEGCEEU.js → XYC2N5NS.js} +1 -1
  75. package/dist/cdn/{M7BI7QXA.js → Y2AZYYC2.js} +1 -1
  76. package/dist/cdn/{PPHEHA5I.js → YDOMDBYB.js} +1 -1
  77. package/dist/cdn/{5CBXYHFU.js → YES6DUX2.js} +1 -1
  78. package/dist/cdn/{2DIAUHE5.js → YIMYOCSN.js} +1 -1
  79. package/dist/cdn/{4Z7OQ6QY.js → YPXLEZZS.js} +1 -1
  80. package/dist/cdn/YX4B6VTU.js +2 -0
  81. package/dist/cdn/{RVZXDXUC.js → Z7RHFTU6.js} +1 -1
  82. package/dist/cdn/index.js +1 -1
  83. package/dist/components/arcgis-portal-add-gps-metadata/customElement.d.ts +9 -0
  84. package/dist/components/arcgis-portal-add-gps-metadata/customElement.js +94 -80
  85. package/dist/docs/api.json +1 -1
  86. package/dist/docs/docs.json +1 -1
  87. package/dist/docs/vscode.html-custom-data.json +1 -1
  88. package/dist/docs/web-types.json +1 -1
  89. package/dist/loader.js +1 -1
  90. package/dist/types/lumina.d.ts +1 -0
  91. package/dist/types/preact.d.ts +1 -0
  92. package/dist/types/react.d.ts +1 -0
  93. package/dist/types/stencil.d.ts +1 -0
  94. package/package.json +7 -7
  95. package/dist/cdn/42VKNALC.js +0 -2
  96. package/dist/cdn/57DQMVPP.js +0 -2
  97. package/dist/cdn/66MA5EIA.js +0 -2
  98. package/dist/cdn/74XEOQEV.js +0 -2
  99. package/dist/cdn/HT4JMB5R.js +0 -2
  100. package/dist/cdn/I7NJ6E6I.js +0 -2
  101. package/dist/cdn/J4M77DLV.js +0 -2
  102. package/dist/cdn/JI63K67U.js +0 -2
  103. package/dist/cdn/PLGWH6LA.js +0 -2
  104. package/dist/cdn/URZI7SU4.js +0 -2
  105. package/dist/cdn/VAFMKDDD.js +0 -4
  106. package/dist/cdn/VSNBZIZ4.js +0 -2
  107. package/dist/cdn/XYZFL54V.js +0 -2
  108. package/dist/cdn/ZM3A4O2X.js +0 -2
@@ -1,16 +1,17 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as v } from "../../chunks/runtime.js";
3
- import D from "@arcgis/core/layers/Layer.js";
4
- import I from "@arcgis/core/portal/PortalItem.js";
5
- import { LitElement as C, createEvent as f } from "@arcgis/lumina";
6
- import { css as L, html as c } from "lit";
7
- import { u as w } from "../../chunks/useT9n.js";
2
+ import { c as D } from "../../chunks/runtime.js";
3
+ import I from "@arcgis/core/layers/Layer.js";
4
+ import C from "@arcgis/core/portal/PortalItem.js";
5
+ import { LitElement as L, createEvent as f } from "@arcgis/lumina";
6
+ import { usePropertyChange as w, bypassReadOnly as b } from "@arcgis/lumina/controllers";
7
+ import { css as A, html as y } from "lit";
8
+ import { u as z } from "../../chunks/useT9n.js";
8
9
  import g from "@arcgis/core/request.js";
9
10
  import { r as O } from "../../chunks/request.js";
10
- import { g as A } from "../../chunks/item.js";
11
- import { p as z } from "../../chunks/functionalities.js";
12
- const x = L`:host{background-color:var(--calcite-color-foreground-1)}.scrim-container{position:relative}.base-fields-control{margin-inline-end:.75rem}.added{display:inline-flex;gap:.5rem;flex-shrink:0;white-space:nowrap}.added calcite-icon{color:var(--calcite-color-status-success)}.add-fields-button{margin:.75rem 0}calcite-block{border-bottom:0}calcite-list-item:last-child:after{display:block;margin-inline-start:var(--calcite-spacing-md);border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3));content:""}`;
13
- async function b({
11
+ import { g as G } from "../../chunks/item.js";
12
+ import { p as x } from "../../chunks/functionalities.js";
13
+ const R = A`:host{background-color:var(--calcite-color-foreground-1)}.scrim-container{position:relative}.base-fields-control{margin-inline-end:.75rem}.added{display:inline-flex;gap:.5rem;flex-shrink:0;white-space:nowrap}.added calcite-icon{color:var(--calcite-color-status-success)}.add-fields-button{margin:.75rem 0}calcite-block{border-bottom:0}calcite-list-item:last-child:after{display:block;margin-inline-start:var(--calcite-spacing-md);border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3));content:""}`;
14
+ async function _({
14
15
  item: s,
15
16
  layers: e
16
17
  }) {
@@ -24,37 +25,37 @@ async function b({
24
25
  responseType: "json"
25
26
  })).data;
26
27
  if (i.fields) {
27
- const r = e?.[0];
28
- return e?.length === 1 && r?.layerId != null && l.set(r.layerId, i.fields), { result: l };
28
+ const n = e?.[0];
29
+ return e?.length === 1 && n?.layerId != null && l.set(n.layerId, i.fields), { result: l };
29
30
  }
30
31
  if (!i.layers?.length)
31
32
  return { result: l };
32
33
  const a = t.replace(/\/$/u, "");
33
34
  return await Promise.all(
34
- i.layers.map(async ({ id: r }) => {
35
- const u = (await g(`${a}/${r}`, {
35
+ i.layers.map(async ({ id: n }) => {
36
+ const u = (await g(`${a}/${n}`, {
36
37
  cacheBust: !0,
37
38
  query: { f: "json" },
38
39
  responseType: "json"
39
40
  })).data;
40
- l.set(r, u.fields ?? []);
41
+ l.set(n, u.fields ?? []);
41
42
  })
42
43
  ), { result: l };
43
44
  } catch (i) {
44
45
  return console.error("Error getting layer fields:", i), { error: { code: "unhandledError" } };
45
46
  }
46
47
  }
47
- const P = (s) => {
48
+ const S = (s) => {
48
49
  const { url: e } = s;
49
50
  return e ? e.replace("/rest/services", "/rest/admin/services").replace(/\/$/u, "") : null;
50
51
  };
51
- async function R({
52
+ async function E({
52
53
  fields: s,
53
54
  item: e,
54
55
  portal: t,
55
56
  layerId: l
56
57
  }) {
57
- const i = P(e);
58
+ const i = S(e);
58
59
  if (!i)
59
60
  return {
60
61
  error: {
@@ -85,13 +86,13 @@ async function R({
85
86
  };
86
87
  }
87
88
  }
88
- async function G({
89
+ async function M({
89
90
  fields: s,
90
91
  item: e,
91
92
  portal: t,
92
93
  layerId: l
93
94
  }) {
94
- const i = P(e);
95
+ const i = S(e);
95
96
  if (!i)
96
97
  return {
97
98
  error: {
@@ -122,7 +123,7 @@ async function G({
122
123
  };
123
124
  }
124
125
  }
125
- async function E(s) {
126
+ async function N(s) {
126
127
  const { url: e } = s;
127
128
  if (!e)
128
129
  return { error: { code: "unhandledError" } };
@@ -132,29 +133,29 @@ async function E(s) {
132
133
  return console.error("Error getting service info:", t), { error: { code: "unhandledError" } };
133
134
  }
134
135
  }
135
- const M = (s, e) => {
136
+ const k = (s, e) => {
136
137
  const t = s.domain ?? null, l = e.domain ?? null;
137
138
  return t === null || l === null ? t === l : t.type !== l.type ? !1 : t.type === "codedValue" && l.type === "codedValue" ? t.codedValues.length === l.codedValues.length && t.codedValues.every(
138
- ({ code: i, name: a }, r) => i === l.codedValues[r]?.code && a === l.codedValues[r]?.name
139
+ ({ code: i, name: a }, n) => i === l.codedValues[n]?.code && a === l.codedValues[n]?.name
139
140
  ) : t.type === "range" && l.type === "range" ? t.range[0] === l.range[0] && t.range[1] === l.range[1] : !0;
140
- }, N = (s, e) => {
141
+ }, $ = (s, e) => {
141
142
  const t = new Map(e.map((a) => [a.name, a])), l = [], i = [];
142
143
  for (const a of s) {
143
- const r = t.get(a.name);
144
- r ? M(a, r) || i.push({ name: a.name, domain: a.domain }) : l.push(a);
144
+ const n = t.get(a.name);
145
+ n ? k(a, n) || i.push({ name: a.name, domain: a.domain }) : l.push(a);
145
146
  }
146
147
  return { missingFields: l, modifiedFields: i };
147
- }, k = (s) => {
148
+ }, B = (s) => {
148
149
  switch (s) {
149
150
  case "esriGeometryPolyline":
150
151
  case "esriGeometryPolygon":
151
- return [...$];
152
+ return [...U];
152
153
  case "esriGeometryPoint":
153
- return [...B];
154
+ return [...K];
154
155
  default:
155
156
  return [];
156
157
  }
157
- }, _ = (s) => s === "esriGeometryPoint" ? [...U] : [], F = (s) => s === "esriGeometryPoint" ? [...H] : [], $ = [
158
+ }, F = (s) => s === "esriGeometryPoint" ? [...Y] : [], q = (s) => s === "esriGeometryPoint" ? [...H] : [], U = [
158
159
  {
159
160
  name: "esrignss_avg_h_rms",
160
161
  type: "esriFieldTypeDouble",
@@ -226,7 +227,7 @@ const M = (s, e) => {
226
227
  domain: null,
227
228
  defaultValue: null
228
229
  }
229
- ], B = [
230
+ ], K = [
230
231
  {
231
232
  name: "esrignss_speed",
232
233
  type: "esriFieldTypeDouble",
@@ -637,7 +638,7 @@ const M = (s, e) => {
637
638
  domain: null,
638
639
  defaultValue: null
639
640
  }
640
- ], U = [
641
+ ], Y = [
641
642
  {
642
643
  name: "esrisnsr_tilt_azimuth_accuracy",
643
644
  type: "esriFieldTypeDouble",
@@ -1184,23 +1185,23 @@ const M = (s, e) => {
1184
1185
  defaultValue: null
1185
1186
  }
1186
1187
  ];
1187
- function K(s) {
1188
+ function j(s) {
1188
1189
  if (s.geometryType === "polyline" || s.geometryType === "polygon") {
1189
1190
  const e = s.capabilities;
1190
1191
  return e?.data?.supportsAttachment && e?.operations?.supportsQueryAttachments;
1191
1192
  }
1192
1193
  return !0;
1193
1194
  }
1194
- const Y = (s) => s.every(K), j = ["point", "polyline", "polygon"], q = (s) => s?.type === "Feature Service";
1195
- class W extends C {
1195
+ const W = (s) => s.every(j), X = ["point", "polyline", "polygon"], J = (s) => s?.type === "Feature Service", P = (s) => J(s) && !s.typeKeywords.some((e) => ["View Service", "Multi Services View"].includes(e));
1196
+ class Q extends L {
1196
1197
  constructor() {
1197
- super(...arguments), this.messages = w({ blocking: !0 }), this.initCount = 0, this.supportsAttachments = !1, this.layersLoaded = !1, this.pointLayers = [], this.lineOrPolygonLayers = [], this.itemHasRelatedTileLayers = !1, this.loadedItem = null, this.gpsFieldFixesBySet = null, this.addFieldsDisabled = !0, this.initializing = !0, this.hasLineOrPolygonLayer = !1, this.hasPointFeatureLayer = !1, this.addingGPSFieldMetadata = [], this.item = null, this.itemId = null, this.messageOverrides = {}, this.arcgisGPSMetadataFieldsAdded = f(), this.arcgisReadOnlyMode = f();
1198
+ super(...arguments), this.messages = z({ blocking: !0 }), this.initCount = 0, this.supportsAttachments = !1, this.layersLoaded = !1, this.pointLayers = [], this.lineOrPolygonLayers = [], this.loadedItem = null, this.gpsFieldFixesBySet = null, this.addFieldsDisabled = !0, this.initializing = !0, this.hasLineOrPolygonLayer = !1, this.hasPointFeatureLayer = !1, this.addingGPSFieldMetadata = [], this.item = null, this.itemId = null, this.canShowAddGPSMetadata = !1, this.messageOverrides = {}, this.arcgisPropertyChange = w()("canShowAddGPSMetadata"), this.arcgisGPSMetadataFieldsAdded = f(), this.arcgisReadOnlyMode = f();
1198
1199
  }
1199
1200
  static {
1200
- this.properties = { loadedItem: 16, gpsFieldFixesBySet: 16, addFieldsDisabled: 16, initializing: 16, hasLineOrPolygonLayer: 16, hasPointFeatureLayer: 16, addingGPSFieldMetadata: 16, item: 0, itemId: 1, portal: 0, messageOverrides: 0 };
1201
+ this.properties = { loadedItem: 16, gpsFieldFixesBySet: 16, addFieldsDisabled: 16, initializing: 16, hasLineOrPolygonLayer: 16, hasPointFeatureLayer: 16, addingGPSFieldMetadata: 16, item: 0, itemId: 1, portal: 0, canShowAddGPSMetadata: 32, messageOverrides: 0 };
1201
1202
  }
1202
1203
  static {
1203
- this.styles = x;
1204
+ this.styles = R;
1204
1205
  }
1205
1206
  connectedCallback() {
1206
1207
  super.connectedCallback(), this.hasUpdated && this.initItem();
@@ -1215,54 +1216,74 @@ class W extends C {
1215
1216
  return;
1216
1217
  }
1217
1218
  e && (this.resetItemState(), this.initializing = !0);
1218
- const { item: l, itemId: i, portal: a } = this, r = l ? await l.load() : await new I({
1219
+ const { item: l, itemId: i, portal: a } = this;
1220
+ if (l?.type && !P(l)) {
1221
+ this.resetItemState(), this.initializing = !1;
1222
+ return;
1223
+ }
1224
+ const n = l ? await l.load() : await new C({
1219
1225
  id: i,
1220
1226
  portal: a
1221
1227
  }).load();
1222
1228
  if (!this.isCurrentInitialization(t))
1223
1229
  return;
1224
- if (!q(r)) {
1230
+ if (!P(n)) {
1225
1231
  this.resetItemState(), this.initializing = !1;
1226
1232
  return;
1227
1233
  }
1228
- this.loadedItem = r;
1229
- const u = !e && this.layersLoaded ? [...this.pointLayers, ...this.lineOrPolygonLayers] : await this.getFeatureLayers(r), { result: o } = await E(r);
1234
+ this.loadedItem = n;
1235
+ const u = !e && this.layersLoaded ? [...this.pointLayers, ...this.lineOrPolygonLayers] : await this.getFeatureLayers(n);
1230
1236
  if (!this.isCurrentInitialization(t))
1231
1237
  return;
1232
- this.layersLoaded = !0, this.pointLayers = u.filter((n) => n.geometryType === "point"), this.lineOrPolygonLayers = u.filter((n) => n.geometryType === "polyline" || n.geometryType === "polygon"), this.hasLineOrPolygonLayer = u.some((n) => n.geometryType === "polyline" || n.geometryType === "polygon"), this.hasPointFeatureLayer = u.some((n) => n.geometryType === "point");
1233
- const { result: d, error: m } = u.length > 0 ? await b({ item: r, layers: u }) : {};
1238
+ if (u.length === 0) {
1239
+ this.resetItemState(), this.initializing = !1;
1240
+ return;
1241
+ }
1242
+ const o = await G(n.id, n.portal, {
1243
+ relationshipType: "Service2Service"
1244
+ });
1234
1245
  if (!this.isCurrentInitialization(t))
1235
1246
  return;
1236
- if (m) {
1247
+ if (o?.data?.relatedItems?.some((r) => ["WMTS", "Map Service", "Vector Tile Service"].includes(r.type))) {
1237
1248
  this.resetItemState(), this.initializing = !1;
1238
1249
  return;
1239
1250
  }
1240
- const y = await A(r.id, r.portal, {
1241
- relationshipType: "Service2Service"
1251
+ this.layersLoaded = !0, this.pointLayers = u.filter((r) => r.geometryType === "point"), this.lineOrPolygonLayers = u.filter((r) => r.geometryType === "polyline" || r.geometryType === "polygon"), this.hasLineOrPolygonLayer = u.some((r) => r.geometryType === "polyline" || r.geometryType === "polygon"), this.hasPointFeatureLayer = u.some((r) => r.geometryType === "point"), b(() => this.canShowAddGPSMetadata = !0);
1252
+ const { result: d } = await N(n);
1253
+ if (!this.isCurrentInitialization(t))
1254
+ return;
1255
+ const { result: c, error: m } = await _({
1256
+ item: n,
1257
+ layers: u
1242
1258
  });
1243
- y?.data?.relatedItems && y.data.relatedItems.some((p) => ["WMTS", "Map Service", "Vector Tile Service"].includes(p.type)) && (this.itemHasRelatedTileLayers = !0);
1244
- const h = d ?? /* @__PURE__ */ new Map();
1259
+ if (!this.isCurrentInitialization(t))
1260
+ return;
1261
+ if (m) {
1262
+ this.resetItemState(), this.initializing = !1;
1263
+ return;
1264
+ }
1265
+ const h = c ?? /* @__PURE__ */ new Map();
1245
1266
  this.gpsFieldFixesBySet = {
1246
1267
  base: this.analyzeFieldSet([...this.pointLayers, ...this.lineOrPolygonLayers], h, "base"),
1247
1268
  gnss: this.analyzeFieldSet(this.pointLayers, h, "gnss"),
1248
1269
  rangefinder: this.analyzeFieldSet(this.pointLayers, h, "rangefinder")
1249
- }, this.supportsAttachments = Y(u);
1250
- const T = o?.sourceSchemaChangesAllowed !== !1;
1270
+ }, this.supportsAttachments = W(u);
1271
+ const T = d?.sourceSchemaChangesAllowed !== !1;
1251
1272
  this.addFieldsDisabled = !this.supportsAttachments || !T, this.initializing = !1;
1252
1273
  }
1253
1274
  isCurrentInitialization(e) {
1254
1275
  return e === this.initCount;
1255
1276
  }
1256
1277
  resetItemState() {
1257
- this.loadedItem = null, this.layersLoaded = !1, this.pointLayers = [], this.lineOrPolygonLayers = [], this.gpsFieldFixesBySet = null, this.addFieldsDisabled = !0, this.hasLineOrPolygonLayer = !1, this.hasPointFeatureLayer = !1, this.itemHasRelatedTileLayers = !1;
1278
+ b(() => this.canShowAddGPSMetadata = !1), this.loadedItem = null, this.layersLoaded = !1, this.pointLayers = [], this.lineOrPolygonLayers = [], this.gpsFieldFixesBySet = null, this.addFieldsDisabled = !0, this.hasLineOrPolygonLayer = !1, this.hasPointFeatureLayer = !1;
1258
1279
  }
1259
1280
  async getFeatureLayers(e) {
1260
- const t = await D.fromPortalItem({ portalItem: e });
1281
+ const t = await I.fromPortalItem({ portalItem: e });
1261
1282
  return await t.load(), "layers" in t ? (await Promise.all(t.layers.map(async (i) => (await i.load(), this.isSupportedFeatureLayer(i) ? i : null)))).filter((i) => !!i) : this.isSupportedFeatureLayer(t) ? [t] : [];
1262
1283
  }
1263
1284
  isSupportedFeatureLayer(e) {
1264
1285
  const t = e;
1265
- return e.type === "feature" && j.some((l) => l === t.geometryType);
1286
+ return e.type === "feature" && X.some((l) => l === t.geometryType);
1266
1287
  }
1267
1288
  getCompatibleEsriGeometryType(e) {
1268
1289
  switch (e.geometryType) {
@@ -1281,7 +1302,7 @@ class W extends C {
1281
1302
  for (const a of e) {
1282
1303
  if (a.layerId == null)
1283
1304
  continue;
1284
- const r = t.get(a.layerId) ?? [], u = this.getCompatibleEsriGeometryType(a), o = u ? l === "base" ? k(u) : l === "gnss" ? _(u) : F(u) : [], d = N(o, r);
1305
+ const n = t.get(a.layerId) ?? [], u = this.getCompatibleEsriGeometryType(a), o = u ? l === "base" ? B(u) : l === "gnss" ? F(u) : q(u) : [], d = $(o, n);
1285
1306
  (d.missingFields.length > 0 || d.modifiedFields.length > 0) && i.push({
1286
1307
  layerId: a.layerId,
1287
1308
  fieldsToAdd: d.missingFields,
@@ -1307,56 +1328,49 @@ class W extends C {
1307
1328
  this.addingGPSFieldMetadata = [...this.addingGPSFieldMetadata, e];
1308
1329
  const a = [...this.pointLayers, ...this.lineOrPolygonLayers];
1309
1330
  try {
1310
- const r = i[e], o = (await Promise.all(r.filter(({ fieldsToAdd: n }) => n.length > 0).map(async ({ fieldsToAdd: n, layerId: p }) => await R({ fields: n, item: l, layerId: p, portal: t })))).every(({ error: n }) => !n), d = o ? await Promise.all(r.filter(({ domainsToUpdate: n }) => n.length > 0).map(async ({ domainsToUpdate: n, layerId: p }) => await G({ fields: n, item: l, layerId: p, portal: t }))) : [], m = o && d.every(({ error: n }) => !n);
1311
- if (!m || this.loadedItem !== l)
1331
+ const n = i[e], o = (await Promise.all(n.filter(({ fieldsToAdd: r }) => r.length > 0).map(async ({ fieldsToAdd: r, layerId: p }) => await E({ fields: r, item: l, layerId: p, portal: t })))).every(({ error: r }) => !r), d = o ? await Promise.all(n.filter(({ domainsToUpdate: r }) => r.length > 0).map(async ({ domainsToUpdate: r, layerId: p }) => await M({ fields: r, item: l, layerId: p, portal: t }))) : [], c = o && d.every(({ error: r }) => !r);
1332
+ if (!c || this.loadedItem !== l)
1312
1333
  return;
1313
- let y;
1314
- if (await z(async () => {
1334
+ let m;
1335
+ if (await x(async () => {
1315
1336
  if (this.loadedItem !== l)
1316
1337
  return !0;
1317
- const { result: n, error: p } = await b({ item: l, layers: a });
1338
+ const { result: r, error: p } = await _({ item: l, layers: a });
1318
1339
  if (p || this.loadedItem !== l)
1319
1340
  return !0;
1320
- if (!n)
1341
+ if (!r)
1321
1342
  return !1;
1322
- const V = e === "base" ? a : a.filter((S) => S.geometryType === "point");
1323
- return this.analyzeFieldSet(V, n, e).length > 0 ? !1 : (y = n, !0);
1343
+ const V = e === "base" ? a : a.filter((v) => v.geometryType === "point");
1344
+ return this.analyzeFieldSet(V, r, e).length > 0 ? !1 : (m = r, !0);
1324
1345
  }, 10) || console.warn("Fields were not verified on the service.", {
1325
1346
  itemId: l.id,
1326
1347
  fieldSet: e
1327
- }), !y || this.loadedItem !== l)
1348
+ }), !m || this.loadedItem !== l)
1328
1349
  return;
1329
- await this.initItem({ showLoading: !1 }), o && m && this.gpsFieldFixesBySet && !this.hasFieldChanges(e) && this.arcgisGPSMetadataFieldsAdded.emit(e);
1350
+ await this.initItem({ showLoading: !1 }), o && c && this.gpsFieldFixesBySet && !this.hasFieldChanges(e) && this.arcgisGPSMetadataFieldsAdded.emit(e);
1330
1351
  } finally {
1331
- this.addingGPSFieldMetadata = this.addingGPSFieldMetadata.filter((r) => r !== e);
1352
+ this.addingGPSFieldMetadata = this.addingGPSFieldMetadata.filter((n) => n !== e);
1332
1353
  }
1333
1354
  }
1334
- canShowAddGPSMetadata() {
1335
- const { pointLayers: e, lineOrPolygonLayers: t } = this, l = this.loadedItem ?? this.item;
1336
- if (!l)
1337
- return !1;
1338
- const i = l.typeKeywords.some((a) => ["View Service", "Multi Services View"].includes(a));
1339
- return q(l) && !i && !this.itemHasRelatedTileLayers && [...e, ...t].length > 0;
1340
- }
1341
1355
  showAdvancedFields() {
1342
1356
  const e = this.gpsFieldFixesBySet;
1343
1357
  return !this.hasPointFeatureLayer || !e ? !1 : this.hasFieldChanges("base") ? this.pointLayers.some((t) => t.layerId == null ? !1 : ["gnss", "rangefinder"].some((l) => {
1344
- const i = l === "gnss" ? _("esriGeometryPoint") : F("esriGeometryPoint");
1345
- return (e[l].find(({ layerId: r }) => r === t.layerId)?.fieldsToAdd ?? []).length < i.length;
1358
+ const i = l === "gnss" ? F("esriGeometryPoint") : q("esriGeometryPoint");
1359
+ return (e[l].find(({ layerId: n }) => n === t.layerId)?.fieldsToAdd ?? []).length < i.length;
1346
1360
  })) : !0;
1347
1361
  }
1348
1362
  renderAddFieldsControl(e, t = !1) {
1349
1363
  const l = this.gpsFieldFixesBySet;
1350
1364
  if (!t && l && !this.hasFieldChanges(e))
1351
- return c`<span slot=actions-end class="added"><calcite-icon icon=check-circle scale=s aria-hidden></calcite-icon>${this.messages.added}</span>`;
1365
+ return y`<span slot=actions-end class="added"><calcite-icon icon=check-circle scale=s aria-hidden></calcite-icon>${this.messages.added}</span>`;
1352
1366
  const i = this.isLoading(e);
1353
- return c`<calcite-button slot=actions-end class="add-fields-button" appearance=outline-fill .disabled=${t || !l || i || this.addFieldsDisabled} .loading=${i} @click=${async () => await this.addFields(e)}>${i ? this.messages.addingFields : this.messages.addFields}</calcite-button>`;
1367
+ return y`<calcite-button slot=actions-end class="add-fields-button" appearance=outline-fill .disabled=${t || !l || i || this.addFieldsDisabled} .loading=${i} @click=${async () => await this.addFields(e)}>${i ? this.messages.addingFields : this.messages.addFields}</calcite-button>`;
1354
1368
  }
1355
1369
  render() {
1356
- return this.canShowAddGPSMetadata() ? c`<div class="scrim-container"><calcite-block scale=m expanded>${this.initializing && c`<calcite-scrim loading></calcite-scrim>` || ""}<calcite-list .label=${this.messages.gpsOptions} selection-mode=none><calcite-list-item .label=${this.messages.accordionHeading}>${this.renderAddFieldsControl("base")}</calcite-list-item>${this.showAdvancedFields() && c`<calcite-list-item .label=${this.messages.gnssReceiverFields}>${this.renderAddFieldsControl("gnss")}</calcite-list-item><calcite-list-item .label=${this.messages.laserRangefinderFields}>${this.renderAddFieldsControl("rangefinder")}</calcite-list-item>` || ""}</calcite-list></calcite-block></div>` : null;
1370
+ return this.canShowAddGPSMetadata ? y`<div class="scrim-container"><calcite-block scale=m expanded>${this.initializing && y`<calcite-scrim loading></calcite-scrim>` || ""}<calcite-list .label=${this.messages.gpsOptions} selection-mode=none><calcite-list-item .label=${this.messages.accordionHeading}>${this.renderAddFieldsControl("base")}</calcite-list-item>${this.showAdvancedFields() && y`<calcite-list-item .label=${this.messages.gnssReceiverFields}>${this.renderAddFieldsControl("gnss")}</calcite-list-item><calcite-list-item .label=${this.messages.laserRangefinderFields}>${this.renderAddFieldsControl("rangefinder")}</calcite-list-item>` || ""}</calcite-list></calcite-block></div>` : null;
1357
1371
  }
1358
1372
  }
1359
- v("arcgis-portal-add-gps-metadata", W);
1373
+ D("arcgis-portal-add-gps-metadata", Q);
1360
1374
  export {
1361
- W as ArcgisPortalAddGpsMetadata
1375
+ Q as ArcgisPortalAddGpsMetadata
1362
1376
  };