@arcgis/ai-components 5.2.0-next.25 → 5.2.0-next.27

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.
@@ -1,58 +1,59 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import pe from "@arcgis/core/identity/IdentityManager.js";
3
- import k from "@arcgis/core/portal/Portal.js";
3
+ import N from "@arcgis/core/portal/Portal.js";
4
4
  import { Annotation as T, messagesStateReducer as be } from "@langchain/langgraph/web";
5
5
  import "@arcgis/toolkit/string";
6
- import { k as De, j as H, i as Pe } from "./generateLayerDescriptions.js";
6
+ import { k as Pe, j as H, i as Ae } from "./generateLayerDescriptions.js";
7
7
  import "@langchain/core/messages";
8
8
  import "@langchain/core/callbacks/dispatch/web";
9
9
  import "@langchain/openai";
10
10
  import X from "@arcgis/core/config.js";
11
- import * as Ae from "@arcgis/core/core/reactiveUtils.js";
11
+ import * as Le from "@arcgis/core/core/reactiveUtils.js";
12
12
  import "@arcgis/core/layers/FeatureLayer.js";
13
13
  import me from "@arcgis/core/request.js";
14
14
  import "@langchain/core/prompts";
15
- import { tool as g } from "@langchain/core/tools";
16
- import Le from "@arcgis/core/Graphic.js";
17
- import { addressToLocations as je } from "@arcgis/core/rest/locator.js";
18
- import Ge from "@arcgis/core/symbols/PictureMarkerSymbol.js";
15
+ import { tool as f } from "@langchain/core/tools";
16
+ import je from "@arcgis/core/Graphic.js";
17
+ import { addressToLocations as Ge } from "@arcgis/core/rest/locator.js";
18
+ import Oe from "@arcgis/core/symbols/PictureMarkerSymbol.js";
19
19
  import s, { z as E } from "zod";
20
- import Oe from "@arcgis/core/geometry/Extent.js";
20
+ import Me from "@arcgis/core/geometry/Extent.js";
21
21
  import Te from "@arcgis/core/geometry/Point.js";
22
- import { createRenderer as Me } from "@arcgis/core/smartMapping/renderers/pieChart.js";
23
- import { getSchemesByTag as Qe, getSchemes as _e } from "@arcgis/core/smartMapping/symbology/pieChart.js";
22
+ import { createRenderer as Qe } from "@arcgis/core/smartMapping/renderers/pieChart.js";
23
+ import { getSchemesByTag as _e, getSchemes as We } from "@arcgis/core/smartMapping/symbology/pieChart.js";
24
24
  import { getBackgroundColorTheme as he } from "@arcgis/core/views/support/colorUtils.js";
25
25
  import { a as R, s as x } from "./index.js";
26
- import { createAgeRenderer as We, createContinuousRenderer as Ve } from "@arcgis/core/smartMapping/renderers/color.js";
26
+ import { createAgeRenderer as Ve, createContinuousRenderer as Be } from "@arcgis/core/smartMapping/renderers/color.js";
27
27
  import { getSchemesByTag as se } from "@arcgis/core/smartMapping/symbology/color.js";
28
- import { createContinuousRenderer as Be } from "@arcgis/core/smartMapping/renderers/univariateColorSize.js";
29
- import { createRenderer as Ue } from "@arcgis/core/smartMapping/renderers/dotDensity.js";
30
- import { getSchemesByTag as Ke } from "@arcgis/core/smartMapping/symbology/dotDensity.js";
31
- import { createRenderer as He } from "@arcgis/core/smartMapping/renderers/heatmap.js";
32
- import { getSchemesByTag as Je } from "@arcgis/core/smartMapping/symbology/heatmap.js";
28
+ import { createContinuousRenderer as Ue } from "@arcgis/core/smartMapping/renderers/univariateColorSize.js";
29
+ import { createRenderer as Ke } from "@arcgis/core/smartMapping/renderers/dotDensity.js";
30
+ import { getSchemesByTag as He } from "@arcgis/core/smartMapping/symbology/dotDensity.js";
31
+ import { createRenderer as Je } from "@arcgis/core/smartMapping/renderers/heatmap.js";
32
+ import { getSchemesByTag as Ye } from "@arcgis/core/smartMapping/symbology/heatmap.js";
33
33
  import { createRenderer as Ze } from "@arcgis/core/smartMapping/renderers/predominance.js";
34
- import { getSchemesByTag as Ye } from "@arcgis/core/smartMapping/symbology/predominance.js";
35
- import { createRenderer as Xe } from "@arcgis/core/smartMapping/renderers/relationship.js";
36
- import { getSchemesByTag as et } from "@arcgis/core/smartMapping/symbology/relationship.js";
37
- import { createAgeRenderer as tt, createContinuousRenderer as rt } from "@arcgis/core/smartMapping/renderers/size.js";
38
- import { createRenderer as at } from "@arcgis/core/smartMapping/renderers/type.js";
39
- import { getSchemesByTag as ot } from "@arcgis/core/smartMapping/symbology/type.js";
40
- import { ToolNode as nt } from "@langchain/langgraph/prebuilt";
41
- import it from "@arcgis/core/layers/support/FeatureEffect.js";
34
+ import { getSchemesByTag as Xe } from "@arcgis/core/smartMapping/symbology/predominance.js";
35
+ import { createRenderer as et } from "@arcgis/core/smartMapping/renderers/relationship.js";
36
+ import { getSchemesByTag as tt } from "@arcgis/core/smartMapping/symbology/relationship.js";
37
+ import { createAgeRenderer as rt, createContinuousRenderer as at } from "@arcgis/core/smartMapping/renderers/size.js";
38
+ import { createRenderer as ot } from "@arcgis/core/smartMapping/renderers/type.js";
39
+ import { getSchemesByTag as nt } from "@arcgis/core/smartMapping/symbology/type.js";
40
+ import { ToolNode as it } from "@langchain/langgraph/prebuilt";
41
+ import st from "@arcgis/core/layers/support/FeatureEffect.js";
42
42
  import Se from "@arcgis/core/layers/support/FeatureFilter.js";
43
- import * as st from "@arcgis/core/geometry/operators/unionOperator.js";
44
- import { formatDateOnly as lt, convertDateFormatToIntlOptions as _, formatTimeOnly as ct, formatDate as ye } from "@arcgis/core/intl.js";
45
- import ut from "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
46
- import dt from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
47
- import pt from "@arcgis/core/rest/support/TopFeaturesQuery.js";
48
- import mt from "@arcgis/core/rest/support/TopFilter.js";
49
- import ht from "@arcgis/core/WebLinkChart.js";
43
+ import * as lt from "@arcgis/core/geometry/operators/unionOperator.js";
44
+ import { formatDateOnly as ct, convertDateFormatToIntlOptions as _, formatTimeOnly as ut, formatDate as ye } from "@arcgis/core/intl.js";
45
+ import dt from "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
46
+ import pt from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
47
+ import mt from "@arcgis/core/rest/support/TopFeaturesQuery.js";
48
+ import ht from "@arcgis/core/rest/support/TopFilter.js";
49
+ import yt from "@arcgis/core/WebLinkChart.js";
50
50
  import ve from "@arcgis/core/rest/knowledgeGraph/GraphQueryStreaming.js";
51
51
  import "@arcgis/core/views/LinkChartView.js";
52
- import { fetchKnowledgeGraph as fe, executeQueryStreaming as yt, executeSearchStreaming as ft } from "@arcgis/core/rest/knowledgeGraphService.js";
53
- import gt from "@arcgis/core/rest/knowledgeGraph/GraphSearchStreaming.js";
54
- const L = (e, t) => t ?? e, En = T.Root({
55
- ...De(),
52
+ import { fetchKnowledgeGraph as fe, executeQueryStreaming as ft, executeSearchStreaming as gt } from "@arcgis/core/rest/knowledgeGraphService.js";
53
+ import wt from "@arcgis/core/rest/knowledgeGraph/GraphSearchStreaming.js";
54
+ import { getBindParametersFromCypherQuery as bt } from "@arcgis/core/applications/KnowledgeStudio/generalSharedKgUtils.js";
55
+ const L = (e, t) => t ?? e, In = T.Root({
56
+ ...Pe(),
56
57
  // internal to the navigation agent
57
58
  intent: T({
58
59
  reducer: L
@@ -71,21 +72,21 @@ const L = (e, t) => t ?? e, En = T.Root({
71
72
  })
72
73
  })
73
74
  });
74
- async function wt(e, t) {
75
- const a = k.getDefault().helperServices, o = a.geocode.find((m) => m.name === "ArcGIS World Geocoding Service") ?? a.geocode[0];
75
+ async function Tt(e, t) {
76
+ const a = N.getDefault().helperServices, o = a.geocode.find((m) => m.name === "ArcGIS World Geocoding Service") ?? a.geocode[0];
76
77
  if (!o)
77
78
  throw new Error("No geocoding service found in helperServices.");
78
- const n = o.url, l = `${X.assetsPath?.endsWith("/") ? X.assetsPath : `${X.assetsPath}/`}esri/images/search/search-symbol-32.png`, c = (await je(n, {
79
+ const n = o.url, l = `${X.assetsPath?.endsWith("/") ? X.assetsPath : `${X.assetsPath}/`}esri/images/search/search-symbol-32.png`, c = (await Ge(n, {
79
80
  address: { SingleLine: e },
80
81
  outFields: ["Match_addr"]
81
82
  }))?.[0];
82
83
  if (!c?.extent || !c.location)
83
84
  throw new Error(`Could not find location for: ${e}`);
84
- const u = new Ge({
85
+ const u = new Oe({
85
86
  url: l,
86
87
  width: 24,
87
88
  height: 24
88
- }), d = new Le({
89
+ }), d = new je({
89
90
  geometry: c.location,
90
91
  symbol: u
91
92
  });
@@ -100,28 +101,28 @@ async function wt(e, t) {
100
101
  sharedStatePatch: { lastResolvedLocation: { value: p } }
101
102
  };
102
103
  }
103
- const bt = ["mapView"];
104
+ const St = ["mapView"];
104
105
  function C(e) {
105
106
  const r = e?.configurable?.context;
106
107
  if (!r || typeof r != "object")
107
108
  throw new Error("NavigationAgent context missing");
108
- const a = bt.filter((o) => !(o in r));
109
+ const a = St.filter((o) => !(o in r));
109
110
  if (a.length)
110
111
  throw new Error(`NavigationAgent context missing: ${a.join(", ")}`);
111
112
  return r;
112
113
  }
113
- async function Tt({ address: e }, t) {
114
+ async function vt({ address: e }, t) {
114
115
  const { mapView: r } = C(t);
115
- return await wt(e, r);
116
+ return await Tt(e, r);
116
117
  }
117
- const St = s.object({
118
+ const xt = s.object({
118
119
  address: s.string().describe("The full address or place name to locate.")
119
- }), Fn = g(Tt, {
120
+ }), Dn = f(vt, {
120
121
  name: "goToAddress",
121
122
  description: "Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",
122
- schema: St
123
+ schema: xt
123
124
  });
124
- async function vt(e, t) {
125
+ async function Rt(e, t) {
125
126
  const a = t.map.bookmarks;
126
127
  if (!a || a.length === 0)
127
128
  throw new Error("No bookmarks found in the map.");
@@ -133,18 +134,18 @@ async function vt(e, t) {
133
134
  throw new Error(`Bookmark with name "${e}" does not have a valid viewpoint.`);
134
135
  return await t.goTo(n), { text: `Navigated to bookmark: ${e}` };
135
136
  }
136
- async function xt({ bookmarkName: e }, t) {
137
+ async function $t({ bookmarkName: e }, t) {
137
138
  const { mapView: r } = C(t);
138
- return await Promise.resolve(vt(e, r));
139
+ return await Promise.resolve(Rt(e, r));
139
140
  }
140
- const Rt = E.object({
141
+ const Ct = E.object({
141
142
  bookmarkName: E.string().describe("The name of the bookmark to navigate to.")
142
- }), kn = g(xt, {
143
+ }), zn = f($t, {
143
144
  name: "goToBookmark",
144
145
  description: "Go to the extent of the bookmark with the given name.",
145
- schema: Rt
146
+ schema: Ct
146
147
  });
147
- async function $t(e, t, r) {
148
+ async function Et(e, t, r) {
148
149
  const a = r.map?.allLayers.find((l) => l.id === e);
149
150
  if (!a)
150
151
  return { text: `Error: Layer with id ${e} not found` };
@@ -173,20 +174,22 @@ async function $t(e, t, r) {
173
174
  return console.error("Error in goToFeatures:", l), { text: `Error: ${l instanceof Error ? l.message : "Unknown error"}`, where: o };
174
175
  }
175
176
  }
176
- async function Ct({ layerId: e, where: t }, r) {
177
+ async function Ft({ layerId: e, where: t }, r) {
177
178
  const { mapView: a } = C(r);
178
- return await $t(e, t, a);
179
+ return await Et(e, t, a);
179
180
  }
180
- const Et = E.object({
181
+ const Nt = E.object({
181
182
  layerId: E.string().describe("The layerId of the layer to zoom to."),
182
- where: E.string().describe("The sql-92 where clause used to query features to zoom to")
183
- }), Nn = g(Ct, {
183
+ where: E.string().describe(
184
+ "ArcGIS SQL-92 WHERE expression used for `query.where` on the selected layer. Use only fields from that layer and return a boolean filter expression (for example comparisons, LIKE, IN, BETWEEN, IS NULL, AND/OR/NOT). Do NOT include subqueries/nested SELECT, JOIN, GROUP BY, HAVING, ORDER BY, or semicolons."
185
+ )
186
+ }), Pn = f(Ft, {
184
187
  name: "goToFeatures",
185
188
  description: "Go to the features that match the given filter related to the given layerId.",
186
- schema: Et
189
+ schema: Nt
187
190
  });
188
- async function Ft(e) {
189
- const r = new Oe({
191
+ async function kt(e) {
192
+ const r = new Me({
190
193
  xmin: -180,
191
194
  ymin: -90,
192
195
  xmax: 180,
@@ -195,16 +198,16 @@ async function Ft(e) {
195
198
  }).expand(0.7);
196
199
  return await e.goTo(r), { text: "Successfully zoomed to world extent" };
197
200
  }
198
- async function kt(e, t) {
201
+ async function qt(e, t) {
199
202
  const { mapView: r } = C(t);
200
- return await Ft(r);
203
+ return await kt(r);
201
204
  }
202
- const Nt = E.object({}), qn = g(kt, {
205
+ const It = E.object({}), An = f(qt, {
203
206
  name: "goToFullExtent",
204
207
  description: "Zooms the map to the full world extent using Esri's Geocoding Service.",
205
- schema: Nt
208
+ schema: It
206
209
  });
207
- async function qt(e) {
210
+ async function Dt(e) {
208
211
  const r = e.map.initialViewProperties?.viewpoint?.targetGeometry;
209
212
  if (r)
210
213
  await e.goTo(r);
@@ -212,16 +215,16 @@ async function qt(e) {
212
215
  throw new Error("Initial extent is undefined");
213
216
  return { text: "Successfully zoomed to home extent" };
214
217
  }
215
- async function It(e, t) {
218
+ async function zt(e, t) {
216
219
  const { mapView: r } = C(t);
217
- return await qt(r);
220
+ return await Dt(r);
218
221
  }
219
- const zt = s.object({}), In = g(It, {
222
+ const Pt = s.object({}), Ln = f(zt, {
220
223
  name: "goToHomeExtent",
221
224
  description: "Go to the initial web map view extent",
222
- schema: zt
225
+ schema: Pt
223
226
  });
224
- async function Dt(e, t) {
227
+ async function At(e, t) {
225
228
  await t.when();
226
229
  const r = t.map?.allLayers.find((o) => o.id === e);
227
230
  if (!r)
@@ -229,32 +232,32 @@ async function Dt(e, t) {
229
232
  let a;
230
233
  return (r.type === "link-chart" || r.type === "knowledge-graph-sublayer") && t.map?.activeLinkChartLayer ? a = t.map.diagramNodesExtent : a = r.fullExtent, a ? (await t.goTo(a), r.visible = !0, { text: `Successfully zoomed to: ${r.title ?? ""}` }) : { text: "Layer has no defined extent. Cannot zoom to layer." };
231
234
  }
232
- async function Pt({ layerId: e }, t) {
235
+ async function Lt({ layerId: e }, t) {
233
236
  const { mapView: r } = C(t);
234
- return await Dt(e, r);
237
+ return await At(e, r);
235
238
  }
236
- const At = E.object({
239
+ const jt = E.object({
237
240
  layerId: E.string().describe("The id of the layer to navigate to")
238
- }), zn = g(Pt, {
241
+ }), jn = f(Lt, {
239
242
  name: "goToLayer",
240
243
  description: "Zooms the map view to the full extent of the top matching layer.",
241
- schema: At
244
+ schema: jt
242
245
  });
243
- async function Lt(e, t) {
246
+ async function Gt(e, t) {
244
247
  return await t.goTo({ scale: e }), { text: `Successfully zoomed to: ${e}` };
245
248
  }
246
- async function jt({ scale: e }, t) {
249
+ async function Ot({ scale: e }, t) {
247
250
  const { mapView: r } = C(t);
248
- return await Lt(e, r);
251
+ return await Gt(e, r);
249
252
  }
250
- const Gt = s.object({
253
+ const Mt = s.object({
251
254
  scale: s.number().describe("The map scale of the view to go to.")
252
- }), Dn = g(jt, {
255
+ }), Gn = f(Ot, {
253
256
  name: "goToScale",
254
257
  description: "Go to the specified view scale.",
255
- schema: Gt
258
+ schema: Mt
256
259
  });
257
- async function Ot(e, t, r) {
260
+ async function Qt(e, t, r) {
258
261
  const o = {
259
262
  target: new Te({
260
263
  longitude: e.longitude,
@@ -268,39 +271,39 @@ async function Ot(e, t, r) {
268
271
  r?.scale !== void 0 ? `scale 1:${r.scale}` : ""
269
272
  ].filter(Boolean).join(", ")}` };
270
273
  }
271
- async function Mt({
274
+ async function _t({
272
275
  center: e,
273
276
  zoom: t,
274
277
  scale: r
275
278
  }, a) {
276
279
  const { mapView: o } = C(a);
277
- return await Ot(e, o, { zoom: t, scale: r });
280
+ return await Qt(e, o, { zoom: t, scale: r });
278
281
  }
279
- const Qt = s.object({
282
+ const Wt = s.object({
280
283
  center: s.object({
281
284
  longitude: s.number().describe("The longitude (x-coordinate) of the point to navigate to."),
282
285
  latitude: s.number().describe("The latitude (y-coordinate) of the point to navigate to.")
283
286
  }),
284
287
  zoom: s.number().optional().describe("The zoom level. Higher values = more zoomed in."),
285
288
  scale: s.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")
286
- }), Pn = g(Mt, {
289
+ }), On = f(_t, {
287
290
  name: "goToViewpoint",
288
291
  description: "Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",
289
- schema: Qt
292
+ schema: Wt
290
293
  });
291
- async function _t(e, t) {
294
+ async function Vt(e, t) {
292
295
  return await t.goTo({ zoom: e }), { text: `Successfully zoomed to: ${e}` };
293
296
  }
294
- async function Wt({ zoom: e }, t) {
297
+ async function Bt({ zoom: e }, t) {
295
298
  const { mapView: r } = C(t);
296
- return await _t(e, r);
299
+ return await Vt(e, r);
297
300
  }
298
- const Vt = s.object({
301
+ const Ut = s.object({
299
302
  zoom: s.number().min(1).max(20).describe("The zoom level of the view to go to.")
300
- }), An = g(Wt, {
303
+ }), Mn = f(Bt, {
301
304
  name: "goToZoom",
302
305
  description: 'Go to the specified zoom level. If input is generic (e.g. "zoom in", then only zoom to the next appropriate level - increase level for zooming in and decrease for zooming out.).',
303
- schema: Vt
306
+ schema: Ut
304
307
  }), ge = /* @__PURE__ */ Object.assign({
305
308
  "../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md": () => import("./arcgis_knowledge_current_lc_context.js").then((e) => e.default),
306
309
  "../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_map_context.md": () => import("./arcgis_knowledge_current_map_context.js").then((e) => e.default),
@@ -325,7 +328,7 @@ ${Object.keys(ge).join(`
325
328
  `)}`);
326
329
  return await t[1]();
327
330
  }
328
- const Bt = (e, t = 300) => {
331
+ const Kt = (e, t = 300) => {
329
332
  const r = e.replace(/\s+/gu, " ").replace(/[*_`#>\-]/gu, "").trim();
330
333
  return r.length > t ? `${r.slice(0, t)}...` : r;
331
334
  }, xe = (e, t) => {
@@ -333,22 +336,22 @@ const Bt = (e, t = 300) => {
333
336
  if (a == null)
334
337
  throw new Error(`${t} missing in config.configurable.services`);
335
338
  return a;
336
- }, Ln = (e, t) => (r, a) => {
339
+ }, Qn = (e, t) => (r, a) => {
337
340
  const o = a?.configurable?.services;
338
341
  for (const n of e)
339
342
  if (!o?.[n])
340
343
  throw new Error(`${t} requires services.${n} to be available.`);
341
344
  return r;
342
345
  };
343
- async function Ut(e) {
346
+ async function Ht(e) {
344
347
  const { fields: t, layer: r, view: a, styleName: o, colorSchemeTags: n } = e;
345
348
  let l;
346
- return n ? l = Qe({
349
+ return n ? l = _e({
347
350
  basemapTheme: await he(a),
348
351
  geometryType: r.geometryType,
349
352
  includedTags: n,
350
353
  numColors: Math.min(t.length, 8)
351
- })[0] : l = _e({
354
+ })[0] : l = We({
352
355
  basemapTheme: await he(a),
353
356
  geometryType: r.geometryType,
354
357
  numColors: Math.min(t.length, 8)
@@ -365,10 +368,10 @@ async function Ut(e) {
365
368
  pieChartScheme: l
366
369
  };
367
370
  }
368
- async function Kt(e) {
369
- return await Me(e);
371
+ async function Jt(e) {
372
+ return await Qe(e);
370
373
  }
371
- async function Ht({
374
+ async function Yt({
372
375
  arcgisMap: e,
373
376
  arcgisMapView: t,
374
377
  layerId: r,
@@ -387,30 +390,30 @@ async function Ht({
387
390
  colorSchemeTags: o
388
391
  };
389
392
  try {
390
- const d = await Ut(u), p = await Kt(d);
393
+ const d = await Ht(u), p = await Jt(d);
391
394
  return i.renderer = p.renderer, i.visible = !0, `Chart renderer applied to layer: ${i.title ?? i.id} using fields ${a.join(", ")}`;
392
395
  } catch (d) {
393
396
  return `Error applying chart renderer: ${d instanceof Error ? d.message : String(d)}`;
394
397
  }
395
398
  }
396
- const Jt = ["mapView"];
399
+ const Zt = ["mapView"];
397
400
  function $(e) {
398
401
  const r = e?.configurable?.context;
399
402
  if (!r || typeof r != "object")
400
403
  throw new Error("LayerStylingAgent context missing");
401
- const a = Jt.filter((o) => !(o in r));
404
+ const a = Zt.filter((o) => !(o in r));
402
405
  if (a.length)
403
406
  throw new Error(`LayerStylingAgent context missing: ${a.join(", ")}`);
404
407
  return r;
405
408
  }
406
- async function Zt({
409
+ async function Xt({
407
410
  layerId: e,
408
411
  fields: t,
409
412
  colorSchemes: r,
410
413
  includeSize: a
411
414
  }, o) {
412
415
  const { mapView: n } = $(o);
413
- return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await Ht({
416
+ return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await Yt({
414
417
  arcgisMap: n.map,
415
418
  arcgisMapView: n,
416
419
  layerId: e,
@@ -419,12 +422,12 @@ async function Zt({
419
422
  includeSize: a
420
423
  });
421
424
  }
422
- const Yt = s.object({
425
+ const er = s.object({
423
426
  layerId: s.string().describe("The id of the layer to apply the chart renderer to"),
424
427
  fields: s.array(s.string()).describe("The fields to use for the chart renderer (multiple numeric fields)"),
425
428
  colorSchemes: s.array(s.string()).optional().describe("Optional color scheme tags to use"),
426
429
  includeSize: s.boolean().optional().describe("Whether to vary the chart size (chart-size)")
427
- }), jn = g(Zt, {
430
+ }), _n = f(Xt, {
428
431
  name: "chart",
429
432
  description: `Label: Charts
430
433
  Description: Show the values of two or more categories as a proportion of the total using a pie chart.
@@ -437,9 +440,9 @@ const Yt = s.object({
437
440
  Keywords: pie, chart, all categories, breakdown, proportion, total, amount, how much, sum, graduated size, proportional size
438
441
  Example: Show the total number of homes built in each decade using a pie chart for each feature and vary the size of each chart based on the total of all categories.
439
442
  Fields: This style requires 2-8 number fields.`,
440
- schema: Yt
443
+ schema: er
441
444
  });
442
- function Xt(e) {
445
+ function tr(e) {
443
446
  const { fields: t, layer: r, view: a, theme: o, colorSchemeTags: n } = e, l = t[0];
444
447
  let i;
445
448
  return n && (i = se({
@@ -457,10 +460,10 @@ function Xt(e) {
457
460
  colorScheme: i
458
461
  };
459
462
  }
460
- async function er(e) {
461
- return await We(e);
463
+ async function rr(e) {
464
+ return await Ve(e);
462
465
  }
463
- async function tr({
466
+ async function ar({
464
467
  arcgisMap: e,
465
468
  arcgisMapView: t,
466
469
  layerId: r,
@@ -480,20 +483,20 @@ async function tr({
480
483
  theme: n
481
484
  };
482
485
  try {
483
- const u = Xt(c), d = await er(u);
486
+ const u = tr(c), d = await rr(u);
484
487
  return i.renderer = d.renderer, i.visible = !0, `Color-age renderer applied to layer: ${i.title ?? i.id} using fields ${a.join(", ")}`;
485
488
  } catch (u) {
486
489
  return `Error applying color-age renderer: ${u instanceof Error ? u.message : String(u)}`;
487
490
  }
488
491
  }
489
- async function rr({
492
+ async function or({
490
493
  layerId: e,
491
494
  fields: t,
492
495
  colorSchemes: r,
493
496
  theme: a
494
497
  }, o) {
495
498
  const { mapView: n } = $(o);
496
- return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await tr({
499
+ return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await ar({
497
500
  arcgisMap: n.map,
498
501
  arcgisMapView: n,
499
502
  layerId: e,
@@ -502,21 +505,21 @@ async function rr({
502
505
  theme: a
503
506
  });
504
507
  }
505
- const ar = s.object({
508
+ const nr = s.object({
506
509
  layerId: s.string().describe("The id of the layer to apply the color-age renderer to"),
507
510
  fields: s.array(s.string()).describe("The field(s) to use for the color-age renderer (temporal/date data)"),
508
511
  colorSchemes: s.array(s.string()).optional().describe("Optional color scheme tags to use"),
509
512
  theme: s.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color ramp")
510
- }), Gn = g(rr, {
513
+ }), Wn = f(or, {
511
514
  name: "color-age",
512
515
  description: `Label: Age (color)
513
516
  Description: Use colors along a continuous color ramp to represent the age of features. Age reflects the length of time from a start date to an end date.
514
517
  Keywords: since, age, how old, how long
515
518
  Example: Show the age of each feature based on its reported date.
516
519
  Fields: This style requires at least one field with a date type.`,
517
- schema: ar
520
+ schema: nr
518
521
  });
519
- function or(e) {
522
+ function ir(e) {
520
523
  const { fields: t, layer: r, view: a, colorSchemeTags: o } = e;
521
524
  let { theme: n } = e, l = t[1];
522
525
  const i = t[0];
@@ -536,10 +539,10 @@ function or(e) {
536
539
  colorScheme: c
537
540
  };
538
541
  }
539
- async function nr(e) {
540
- return await Ve(e);
542
+ async function sr(e) {
543
+ return await Be(e);
541
544
  }
542
- async function ir({
545
+ async function lr({
543
546
  arcgisMap: e,
544
547
  arcgisMapView: t,
545
548
  layerId: r,
@@ -559,20 +562,20 @@ async function ir({
559
562
  theme: n
560
563
  };
561
564
  try {
562
- const u = or(c), d = await nr(u);
565
+ const u = ir(c), d = await sr(u);
563
566
  return i.renderer = d.renderer, i.visible = !0, `Color renderer applied to layer: ${i.title ?? i.id} using fields ${a.join(", ")}`;
564
567
  } catch (u) {
565
568
  return `Error applying color renderer: ${u instanceof Error ? u.message : String(u)}`;
566
569
  }
567
570
  }
568
- async function sr({
571
+ async function cr({
569
572
  layerId: e,
570
573
  fields: t,
571
574
  colorSchemes: r,
572
575
  theme: a
573
576
  }, o) {
574
577
  const { mapView: n } = $(o);
575
- return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await ir({
578
+ return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await lr({
576
579
  arcgisMap: n.map,
577
580
  arcgisMapView: n,
578
581
  layerId: e,
@@ -581,21 +584,21 @@ async function sr({
581
584
  theme: a
582
585
  });
583
586
  }
584
- const lr = s.object({
587
+ const ur = s.object({
585
588
  layerId: s.string().describe("The id of the layer to apply the color renderer to"),
586
589
  fields: s.array(s.string()).describe("The field(s) to use for the color renderer"),
587
590
  colorSchemes: s.array(s.string()).optional().describe("Optional color scheme tags to use"),
588
591
  theme: s.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color ramp")
589
- }), On = g(sr, {
592
+ }), Vn = f(cr, {
590
593
  name: "color",
591
594
  description: `Label: Counts and Amounts (color)
592
595
  Description: Vary color along a continuous color ramp to represent numeric or ranked data.
593
596
  Keywords: graduated color, choropleth, continuous color, hue, color, gradation, saturation, lightness, percent, rate, ratio, index, how much, increase, decrease
594
597
  Example: Color each feature based on the population density.
595
598
  Fields: This style requires a single field with a number type. A second number field may be specified for normalizing the value of the first field.`,
596
- schema: lr
599
+ schema: ur
597
600
  });
598
- function cr(e) {
601
+ function dr(e) {
599
602
  const { fields: t, layer: r, view: a, colorSchemeTags: o, theme: n } = e;
600
603
  let l, i;
601
604
  const c = t[0];
@@ -614,10 +617,10 @@ function cr(e) {
614
617
  }
615
618
  };
616
619
  }
617
- async function ur(e) {
618
- return await Be(e);
620
+ async function pr(e) {
621
+ return await Ue(e);
619
622
  }
620
- async function dr({
623
+ async function mr({
621
624
  arcgisMap: e,
622
625
  arcgisMapView: t,
623
626
  layerId: r,
@@ -637,20 +640,20 @@ async function dr({
637
640
  theme: n
638
641
  };
639
642
  try {
640
- const u = cr(c), d = await ur(u);
643
+ const u = dr(c), d = await pr(u);
641
644
  return i.renderer = d.renderer, i.visible = !0, `Color-size-univariate renderer applied to layer: ${i.title ?? i.id} using fields ${a.join(", ")}`;
642
645
  } catch (u) {
643
646
  return `Error applying color-size-univariate renderer: ${u instanceof Error ? u.message : String(u)}`;
644
647
  }
645
648
  }
646
- async function pr({
649
+ async function hr({
647
650
  layerId: e,
648
651
  fields: t,
649
652
  colorSchemes: r,
650
653
  theme: a
651
654
  }, o) {
652
655
  const { mapView: n } = $(o);
653
- return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await dr({
656
+ return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await mr({
654
657
  arcgisMap: n.map,
655
658
  arcgisMapView: n,
656
659
  layerId: e,
@@ -659,24 +662,24 @@ async function pr({
659
662
  theme: a
660
663
  });
661
664
  }
662
- const mr = s.object({
665
+ const yr = s.object({
663
666
  layerId: s.string().describe("The id of the layer to apply the color-size univariate renderer to"),
664
667
  fields: s.array(s.string()).describe("The fields to use for the color-size univariate renderer"),
665
668
  colorSchemes: s.array(s.string()).optional().describe("Optional color scheme tags to use"),
666
669
  theme: s.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color and size ramps")
667
- }), Mn = g(pr, {
670
+ }), Bn = f(hr, {
668
671
  name: "color-size-univariate",
669
672
  description: `Label: Color and Size (univariate)
670
673
  Description: Vary symbol size and color based on the values of two numeric attributes.
671
674
  Keywords: continuous color, hue, color, size, gradation, saturation, lightness, percent, rate, ratio, index, how much, increase, decrease, amount
672
675
  Example: Color each feature based on the percentage of the population that owns a home and vary the size of each point based on total population.
673
676
  Fields: This style requires at least two fields: one determining the color of each feature, the other determining the size of each feature. Each field may be normalized by an additional normalization field.`,
674
- schema: mr
677
+ schema: yr
675
678
  });
676
- function hr(e) {
679
+ function fr(e) {
677
680
  const { fields: t, layer: r, view: a, colorSchemeTags: o } = e;
678
681
  let n;
679
- return o && (n = Ke({
682
+ return o && (n = He({
680
683
  includedTags: o,
681
684
  numColors: Math.min(t.length, 8)
682
685
  })[0]), {
@@ -693,10 +696,10 @@ function hr(e) {
693
696
  dotDensityScheme: n
694
697
  };
695
698
  }
696
- async function yr(e) {
697
- return await Ue(e);
699
+ async function gr(e) {
700
+ return await Ke(e);
698
701
  }
699
- async function fr({
702
+ async function wr({
700
703
  arcgisMap: e,
701
704
  arcgisMapView: t,
702
705
  layerId: r,
@@ -714,19 +717,19 @@ async function fr({
714
717
  colorSchemeTags: o
715
718
  };
716
719
  try {
717
- const c = hr(i), u = await yr(c);
720
+ const c = fr(i), u = await gr(c);
718
721
  return l.renderer = u.renderer, l.visible = !0, `Dot Density renderer applied to layer: ${l.title ?? l.id} using fields ${a.join(", ")}`;
719
722
  } catch (c) {
720
723
  return `Error applying dot density renderer: ${c instanceof Error ? c.message : String(c)}`;
721
724
  }
722
725
  }
723
- async function gr({
726
+ async function br({
724
727
  layerId: e,
725
728
  fields: t,
726
729
  colorSchemes: r
727
730
  }, a) {
728
731
  const { mapView: o } = $(a);
729
- return await R({ type: "show-legend", data: { layerIds: [e] } }, a), await fr({
732
+ return await R({ type: "show-legend", data: { layerIds: [e] } }, a), await wr({
730
733
  arcgisMap: o.map,
731
734
  arcgisMapView: o,
732
735
  layerId: e,
@@ -734,11 +737,11 @@ async function gr({
734
737
  colorSchemes: r
735
738
  });
736
739
  }
737
- const wr = s.object({
740
+ const Tr = s.object({
738
741
  layerId: s.string().describe("The id of the layer to apply the dot density renderer to"),
739
742
  fields: s.array(s.string()).describe("The field(s) to use for the dot density renderer (population or count data)"),
740
743
  colorSchemes: s.array(s.string()).optional().describe("Optional color scheme tags to use")
741
- }), Qn = g(gr, {
744
+ }), Un = f(br, {
742
745
  name: "dot-density",
743
746
  description: `Dot Density
744
747
  Use dot density to visualize the distribution of one attribute or compare the density of multiple attributes. This is only valid for polygon layers.
@@ -752,13 +755,13 @@ const wr = s.object({
752
755
  - Display demographic patterns within census tracts
753
756
  **Fields:** Requires 2-8 number fields.
754
757
  **Keywords:** density, how much, how many, total, number, amount`,
755
- schema: wr
758
+ schema: Tr
756
759
  });
757
- function br(e) {
760
+ function Sr(e) {
758
761
  const { fields: t, layer: r, view: a, colorSchemeTags: o } = e;
759
762
  let n;
760
763
  const l = t[0];
761
- return o && (n = Je({
764
+ return o && (n = Ye({
762
765
  includedTags: o,
763
766
  basemap: a.map?.basemap || "topo"
764
767
  })[0]), {
@@ -768,10 +771,10 @@ function br(e) {
768
771
  heatmapScheme: n
769
772
  };
770
773
  }
771
- async function Tr(e) {
772
- return await He(e);
774
+ async function vr(e) {
775
+ return await Je(e);
773
776
  }
774
- async function Sr({
777
+ async function xr({
775
778
  arcgisMap: e,
776
779
  arcgisMapView: t,
777
780
  layerId: r,
@@ -789,19 +792,19 @@ async function Sr({
789
792
  colorSchemeTags: o
790
793
  };
791
794
  try {
792
- const c = br(i), u = await Tr(c);
795
+ const c = Sr(i), u = await vr(c);
793
796
  return l.renderer = u.renderer, l.visible = !0, `Heatmap renderer applied to layer: ${l.title ?? l.id} using fields ${a.join(", ")}`;
794
797
  } catch (c) {
795
798
  return `Error applying heatmap renderer: ${c instanceof Error ? c.message : String(c)}`;
796
799
  }
797
800
  }
798
- async function vr({
801
+ async function Rr({
799
802
  layerId: e,
800
803
  fields: t,
801
804
  colorSchemes: r
802
805
  }, a) {
803
806
  const { mapView: o } = $(a);
804
- return await R({ type: "show-legend", data: { layerIds: [e] } }, a), await Sr({
807
+ return await R({ type: "show-legend", data: { layerIds: [e] } }, a), await xr({
805
808
  arcgisMap: o.map,
806
809
  arcgisMapView: o,
807
810
  layerId: e,
@@ -809,23 +812,23 @@ async function vr({
809
812
  colorSchemes: r
810
813
  });
811
814
  }
812
- const xr = s.object({
815
+ const $r = s.object({
813
816
  layerId: s.string().describe("The id of the layer to apply the heatmap renderer to"),
814
817
  fields: s.array(s.string()).describe("The field(s) to use for the heatmap renderer (typically point density)"),
815
818
  colorSchemes: s.array(s.string()).optional().describe("Optional color scheme tags to use")
816
- }), _n = g(vr, {
819
+ }), Kn = f(Rr, {
817
820
  name: "heatmap",
818
821
  description: `Label: Heat Map
819
822
  Description: Show areas of high density with colors that appear to glow hotter. This is only valid for point layers.
820
823
  Keywords: density, heatmap, hot spots, pattern, cluster
821
824
  Example: Create a heatmap
822
825
  Fields: This typically requires zero or one field of type number.`,
823
- schema: xr
826
+ schema: $r
824
827
  });
825
- function Rr(e) {
828
+ function Cr(e) {
826
829
  const { fields: t, layer: r, view: a, styleName: o, colorSchemeTags: n } = e;
827
830
  let l;
828
- return n && (l = Ye({
831
+ return n && (l = Xe({
829
832
  geometryType: r.geometryType,
830
833
  includedTags: n,
831
834
  numColors: Math.min(t.length, 10)
@@ -839,10 +842,10 @@ function Rr(e) {
839
842
  predominanceScheme: l
840
843
  };
841
844
  }
842
- async function $r(e) {
845
+ async function Er(e) {
843
846
  return await Ze(e);
844
847
  }
845
- async function Cr({
848
+ async function Fr({
846
849
  arcgisMap: e,
847
850
  arcgisMapView: t,
848
851
  layerId: r,
@@ -861,20 +864,20 @@ async function Cr({
861
864
  colorSchemeTags: o
862
865
  };
863
866
  try {
864
- const d = Rr(u), p = await $r(d);
867
+ const d = Cr(u), p = await Er(d);
865
868
  return i.renderer = p.renderer, i.visible = !0, `Predominance renderer applied to layer: ${i.title ?? i.id} using fields ${a.join(", ")}`;
866
869
  } catch (d) {
867
870
  return `Error applying predominance renderer: ${d instanceof Error ? d.message : String(d)}`;
868
871
  }
869
872
  }
870
- async function Er({
873
+ async function Nr({
871
874
  layerId: e,
872
875
  fields: t,
873
876
  colorSchemes: r,
874
877
  includeSize: a
875
878
  }, o) {
876
879
  const { mapView: n } = $(o);
877
- return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await Cr({
880
+ return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await Fr({
878
881
  arcgisMap: n.map,
879
882
  arcgisMapView: n,
880
883
  layerId: e,
@@ -883,12 +886,12 @@ async function Er({
883
886
  includeSize: a
884
887
  });
885
888
  }
886
- const Fr = s.object({
889
+ const kr = s.object({
887
890
  layerId: s.string().describe("The id of the layer to apply the predominance renderer to"),
888
891
  fields: s.array(s.string()).describe("The fields to use for the predominance renderer (competing categories)"),
889
892
  colorSchemes: s.array(s.string()).optional().describe("Optional color scheme tags to use"),
890
893
  includeSize: s.boolean().optional().describe("Whether to include size visualization (predominance-size)")
891
- }), Wn = g(Er, {
894
+ }), Hn = f(Nr, {
892
895
  name: "predominance",
893
896
  description: `Label: Predominant category
894
897
  Description: Compare attributes that share a common subject and unit of measurement to see which has the highest value.
@@ -901,9 +904,9 @@ const Fr = s.object({
901
904
  Keywords: predominant, winner, won, competing, most, most common, most frequent, dominant, prevalent, top, amount, total, how much, proportional size, graduated size, sum
902
905
  Example: Show the predominant crop in each area and vary the size of each symbol based on the total of all categories.
903
906
  Fields: This style relies on 2-10 number fields.`,
904
- schema: Fr
907
+ schema: kr
905
908
  });
906
- function kr(e) {
909
+ function qr(e) {
907
910
  const { fields: t, layer: r, view: a, colorSchemeTags: o } = e;
908
911
  let n;
909
912
  const l = {
@@ -911,7 +914,7 @@ function kr(e) {
911
914
  }, i = {
912
915
  field: t[1]
913
916
  };
914
- return o && (n = et({
917
+ return o && (n = tt({
915
918
  geometryType: r.geometryType,
916
919
  includedTags: o
917
920
  })[0]), {
@@ -924,10 +927,10 @@ function kr(e) {
924
927
  relationshipScheme: n
925
928
  };
926
929
  }
927
- async function Nr(e) {
928
- return await Xe(e);
930
+ async function Ir(e) {
931
+ return await et(e);
929
932
  }
930
- async function qr({
933
+ async function Dr({
931
934
  arcgisMap: e,
932
935
  arcgisMapView: t,
933
936
  layerId: r,
@@ -945,19 +948,19 @@ async function qr({
945
948
  colorSchemeTags: o
946
949
  };
947
950
  try {
948
- const c = kr(i), u = await Nr(c);
951
+ const c = qr(i), u = await Ir(c);
949
952
  return l.renderer = u.renderer, l.visible = !0, `Relationship renderer applied to layer: ${l.title ?? l.id} using fields ${a.join(", ")}`;
950
953
  } catch (c) {
951
954
  return `Error applying relationship renderer: ${c instanceof Error ? c.message : String(c)}`;
952
955
  }
953
956
  }
954
- async function Ir({
957
+ async function zr({
955
958
  layerId: e,
956
959
  fields: t,
957
960
  colorSchemes: r
958
961
  }, a) {
959
962
  const { mapView: o } = $(a);
960
- return await R({ type: "show-legend", data: { layerIds: [e] } }, a), await qr({
963
+ return await R({ type: "show-legend", data: { layerIds: [e] } }, a), await Dr({
961
964
  arcgisMap: o.map,
962
965
  arcgisMapView: o,
963
966
  layerId: e,
@@ -965,20 +968,20 @@ async function Ir({
965
968
  colorSchemes: r
966
969
  });
967
970
  }
968
- const zr = s.object({
971
+ const Pr = s.object({
969
972
  layerId: s.string().describe("The id of the layer to apply the relationship renderer to"),
970
973
  fields: s.array(s.string()).describe("The two fields to use for the relationship renderer (bivariate visualization)"),
971
974
  colorSchemes: s.array(s.string()).optional().describe("Optional color scheme tags to use")
972
- }), Vn = g(Ir, {
975
+ }), Jn = f(zr, {
973
976
  name: "relationship",
974
977
  description: `Label: Relationship
975
978
  Description: Overlays two color ramps to represent the relationship between two numeric attributes.
976
979
  Keywords: relationship, correlation, compare, related, bivariate choropleth, bivariate color
977
980
  Example: Show the relationship between tree height and carbon storage
978
981
  Fields: This style requires two number fields.`,
979
- schema: zr
982
+ schema: Pr
980
983
  });
981
- function Dr(e) {
984
+ function Ar(e) {
982
985
  const { fields: t, layer: r, view: a, theme: o } = e, n = t[0];
983
986
  return {
984
987
  layer: r,
@@ -990,10 +993,10 @@ function Dr(e) {
990
993
  outlineOptimizationEnabled: !0
991
994
  };
992
995
  }
993
- async function Pr(e) {
994
- return await tt(e);
996
+ async function Lr(e) {
997
+ return await rt(e);
995
998
  }
996
- async function Ar({
999
+ async function jr({
997
1000
  arcgisMap: e,
998
1001
  arcgisMapView: t,
999
1002
  layerId: r,
@@ -1013,20 +1016,20 @@ async function Ar({
1013
1016
  theme: n
1014
1017
  };
1015
1018
  try {
1016
- const u = Dr(c), d = await Pr(u);
1019
+ const u = Ar(c), d = await Lr(u);
1017
1020
  return i.renderer = d.renderer, i.visible = !0, `Size-age renderer applied to layer: ${i.title ?? i.id} using fields ${a.join(", ")}`;
1018
1021
  } catch (u) {
1019
1022
  return `Error applying size-age renderer: ${u instanceof Error ? u.message : String(u)}`;
1020
1023
  }
1021
1024
  }
1022
- async function Lr({
1025
+ async function Gr({
1023
1026
  layerId: e,
1024
1027
  fields: t,
1025
1028
  colorSchemes: r,
1026
1029
  theme: a
1027
1030
  }, o) {
1028
1031
  const { mapView: n } = $(o);
1029
- return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await Ar({
1032
+ return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await jr({
1030
1033
  arcgisMap: n.map,
1031
1034
  arcgisMapView: n,
1032
1035
  layerId: e,
@@ -1035,21 +1038,21 @@ async function Lr({
1035
1038
  theme: a
1036
1039
  });
1037
1040
  }
1038
- const jr = s.object({
1041
+ const Or = s.object({
1039
1042
  layerId: s.string().describe("The id of the layer to apply the size-age renderer to"),
1040
1043
  fields: s.array(s.string()).describe("The field(s) to use for the size-age renderer (temporal data with size)"),
1041
1044
  colorSchemes: s.array(s.string()).optional().describe("Optional color scheme tags to use"),
1042
1045
  theme: s.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the size ramp")
1043
- }), Bn = g(Lr, {
1046
+ }), Yn = f(Gr, {
1044
1047
  name: "size-age",
1045
1048
  description: `Label: Age (size)
1046
1049
  Description: Vary symbol sizes along a continuous ramp to represent the age of features. Age reflects the length of time from a start date to an end date.
1047
1050
  Keywords: since, age, how old, how long
1048
1051
  Example: Change the size of features so older features are larger than new features.
1049
1052
  Fields: This style requires at least one field with a date type.`,
1050
- schema: jr
1053
+ schema: Or
1051
1054
  });
1052
- function Gr(e) {
1055
+ function Mr(e) {
1053
1056
  const { fields: t, layer: r, view: a } = e;
1054
1057
  let { theme: o } = e, n = t[1];
1055
1058
  const l = t[0];
@@ -1063,10 +1066,10 @@ function Gr(e) {
1063
1066
  outlineOptimizationEnabled: !0
1064
1067
  };
1065
1068
  }
1066
- async function Or(e) {
1067
- return await rt(e);
1069
+ async function Qr(e) {
1070
+ return await at(e);
1068
1071
  }
1069
- async function Mr({
1072
+ async function _r({
1070
1073
  arcgisMap: e,
1071
1074
  arcgisMapView: t,
1072
1075
  layerId: r,
@@ -1086,20 +1089,20 @@ async function Mr({
1086
1089
  theme: n
1087
1090
  };
1088
1091
  try {
1089
- const u = Gr(c), d = await Or(u);
1092
+ const u = Mr(c), d = await Qr(u);
1090
1093
  return i.renderer = d.renderer, i.visible = !0, `Size renderer applied to layer: ${i.title ?? i.id} using fields ${a.join(", ")}`;
1091
1094
  } catch (u) {
1092
1095
  return `Error applying size renderer: ${u instanceof Error ? u.message : String(u)}`;
1093
1096
  }
1094
1097
  }
1095
- async function Qr({
1098
+ async function Wr({
1096
1099
  layerId: e,
1097
1100
  fields: t,
1098
1101
  colorSchemes: r,
1099
1102
  theme: a
1100
1103
  }, o) {
1101
1104
  const { mapView: n } = $(o);
1102
- return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await Mr({
1105
+ return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await _r({
1103
1106
  arcgisMap: n.map,
1104
1107
  arcgisMapView: n,
1105
1108
  layerId: e,
@@ -1108,12 +1111,12 @@ async function Qr({
1108
1111
  theme: a
1109
1112
  });
1110
1113
  }
1111
- const _r = s.object({
1114
+ const Vr = s.object({
1112
1115
  layerId: s.string().describe("The id of the layer to apply the size renderer to"),
1113
1116
  fields: s.array(s.string()).describe("The field(s) to use for the size renderer (numeric data)"),
1114
1117
  colorSchemes: s.array(s.string()).optional().describe("Optional color scheme tags to use"),
1115
1118
  theme: s.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the size ramp")
1116
- }), Un = g(Qr, {
1119
+ }), Zn = f(Wr, {
1117
1120
  name: "size",
1118
1121
  description: `Label: Counts and Amounts (size)
1119
1122
  Description: Vary symbol sizes along a continuous ramp to represent numeric or ranked data.
@@ -1126,12 +1129,12 @@ const _r = s.object({
1126
1129
  Keywords: graduated size, proportional size, classed size, how much, total, number, when
1127
1130
  Example: Vary the size of each feature based on the date a ticket was completed.
1128
1131
  Fields: This style requires a single field with a date type.`,
1129
- schema: _r
1132
+ schema: Vr
1130
1133
  });
1131
- function Wr(e) {
1134
+ function Br(e) {
1132
1135
  const { fields: t, layer: r, view: a, colorSchemeTags: o } = e, n = t[0], l = t[1], i = t[2];
1133
1136
  let c;
1134
- return o && (c = ot({
1137
+ return o && (c = nt({
1135
1138
  geometryType: r.geometryType,
1136
1139
  includedTags: o
1137
1140
  })[0]), {
@@ -1145,10 +1148,10 @@ function Wr(e) {
1145
1148
  typeScheme: c
1146
1149
  };
1147
1150
  }
1148
- async function Vr(e) {
1149
- return await at(e);
1151
+ async function Ur(e) {
1152
+ return await ot(e);
1150
1153
  }
1151
- async function Br({
1154
+ async function Kr({
1152
1155
  arcgisMap: e,
1153
1156
  arcgisMapView: t,
1154
1157
  layerId: r,
@@ -1168,20 +1171,20 @@ async function Br({
1168
1171
  theme: n
1169
1172
  };
1170
1173
  try {
1171
- const u = Wr(c), d = await Vr(u);
1174
+ const u = Br(c), d = await Ur(u);
1172
1175
  return i.renderer = d.renderer, i.visible = !0, `Type renderer applied to layer: ${i.title ?? i.id} using fields ${a.join(", ")}`;
1173
1176
  } catch (u) {
1174
1177
  return `Error applying type renderer: ${u instanceof Error ? u.message : String(u)}`;
1175
1178
  }
1176
1179
  }
1177
- async function Ur({
1180
+ async function Hr({
1178
1181
  layerId: e,
1179
1182
  fields: t,
1180
1183
  colorSchemes: r,
1181
1184
  theme: a
1182
1185
  }, o) {
1183
1186
  const { mapView: n } = $(o);
1184
- return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await Br({
1187
+ return await R({ type: "show-legend", data: { layerIds: [e] } }, o), await Kr({
1185
1188
  arcgisMap: n.map,
1186
1189
  arcgisMapView: n,
1187
1190
  layerId: e,
@@ -1190,26 +1193,26 @@ async function Ur({
1190
1193
  theme: a
1191
1194
  });
1192
1195
  }
1193
- const Kr = s.object({
1196
+ const Jr = s.object({
1194
1197
  layerId: s.string().describe("The id of the layer to apply the type renderer to"),
1195
1198
  fields: s.array(s.string()).describe("The field(s) to use for the type renderer (categorical data)"),
1196
1199
  colorSchemes: s.array(s.string()).optional().describe("Optional color scheme tags to use"),
1197
1200
  theme: s.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color scheme")
1198
- }), Kn = g(Ur, {
1201
+ }), Xn = f(Hr, {
1199
1202
  name: "type",
1200
1203
  description: `Label: Types (unique symbols)
1201
1204
  Description: Represent features as categories with different symbol colors or shapes. Examples include type of tree, road class, or province name.
1202
1205
  Keywords: categorical, category, type, unique, discrete, point of interest, region, group
1203
1206
  Example: Color each feature based on the region it belongs to
1204
1207
  Fields: This style requires a single field which may be a string, number, or date type. It is usually a string.`,
1205
- schema: Kr
1206
- }), Hn = T.Root({
1208
+ schema: Jr
1209
+ }), ei = T.Root({
1207
1210
  ...H(),
1208
1211
  vectorSearchLayerIds: T(),
1209
1212
  vectorSearchFieldResults: T(),
1210
1213
  layerFieldInfo: T(),
1211
1214
  selectedLayerId: T()
1212
- }), Jn = T.Root({
1215
+ }), ti = T.Root({
1213
1216
  ...H(),
1214
1217
  vectorSearchLayerIds: T(),
1215
1218
  vectorSearchFieldResults: T(),
@@ -1219,41 +1222,41 @@ Fields: This style requires a single field which may be a string, number, or dat
1219
1222
  reducer: be,
1220
1223
  default: () => []
1221
1224
  })
1222
- }), Hr = ["mapView"];
1223
- function N(e) {
1225
+ }), Yr = ["mapView"];
1226
+ function k(e) {
1224
1227
  const r = e?.configurable?.context;
1225
1228
  if (!r || typeof r != "object")
1226
1229
  throw new Error("DataExplorationAgent context missing");
1227
- const a = Hr.filter((o) => !(o in r));
1230
+ const a = Yr.filter((o) => !(o in r));
1228
1231
  if (a.length)
1229
1232
  throw new Error(`DataExplorationAgent context missing: ${a.join(", ")}`);
1230
1233
  return r;
1231
1234
  }
1232
- const Jr = (e) => {
1235
+ const Zr = (e) => {
1233
1236
  const t = e.map?.allLayers.filter((a) => a.type === "feature");
1234
1237
  let r = 0;
1235
1238
  return t?.forEach((a) => {
1236
1239
  const o = a;
1237
1240
  o.featureEffect && (o.featureEffect = null, r++);
1238
1241
  }), r > 0 ? `Cleared filters from ${r} layer(s). View unchanged.` : "No active filters to clear. View unchanged.";
1239
- }, Zr = async (e, t) => {
1240
- const { mapView: r } = N(t);
1241
- return Jr(r);
1242
- }, Yr = g(Zr, {
1242
+ }, Xr = async (e, t) => {
1243
+ const { mapView: r } = k(t);
1244
+ return Zr(r);
1245
+ }, ea = f(Xr, {
1243
1246
  name: "clearFilters",
1244
1247
  description: "Clears all feature effects/filters from the map but does NOT change the current view. Use when user says 'clear filters', 'reset filters', 'remove filters', 'show all features', or wants to remove emphasis without navigating anywhere.",
1245
1248
  schema: s.object({})
1246
- }), Xr = async (e) => {
1249
+ }), ta = async (e) => {
1247
1250
  e.map?.allLayers.filter((o) => o.type === "feature")?.forEach((o) => {
1248
1251
  const n = o;
1249
1252
  n.featureEffect && (n.featureEffect = null);
1250
1253
  });
1251
1254
  const a = e.map.initialViewProperties?.viewpoint?.targetGeometry;
1252
1255
  return a ? (await e.goTo(a), "Cleared all filters and returned to home extent.") : "Cleared all filters. Could not determine home extent.";
1253
- }, ea = async (e, t) => {
1254
- const { mapView: r } = N(t);
1255
- return await Xr(r);
1256
- }, ta = g(ea, {
1256
+ }, ra = async (e, t) => {
1257
+ const { mapView: r } = k(t);
1258
+ return await ta(r);
1259
+ }, aa = f(ra, {
1257
1260
  name: "resetMap",
1258
1261
  description: "Clears all feature effects/filters from the map AND zooms to the home extent (initial map view). Use when user says 'reset map', 'reset the map', 'start over', or wants to both clear filters and return to the initial view.",
1259
1262
  schema: s.object({})
@@ -1298,14 +1301,14 @@ const J = async (e, t) => {
1298
1301
  const l = n.features.map((c) => c.geometry).filter((c) => !!c);
1299
1302
  if (!l.length)
1300
1303
  return { error: "No valid geometries found for the matched geometry layer features." };
1301
- const i = l.length === 1 ? l[0] : st.executeMany(l);
1304
+ const i = l.length === 1 ? l[0] : lt.executeMany(l);
1302
1305
  return i ? (i.spatialReference || (i.spatialReference = t.spatialReference), { geometry: i }) : { error: "Failed to combine geometries from geometry layer." };
1303
1306
  } catch (n) {
1304
1307
  return { error: `Failed to query geometry: ${String(n)}` };
1305
1308
  }
1306
1309
  }
1307
1310
  return { error: "Invalid geometry configuration provided" };
1308
- }, ra = async (e, t, r, a, o, n) => {
1311
+ }, oa = async (e, t, r, a, o, n) => {
1309
1312
  const l = e.map?.allLayers.find((c) => c.id === t);
1310
1313
  if (!l)
1311
1314
  return { success: !1, error: `Layer '${t}' not found.` };
@@ -1323,7 +1326,7 @@ const J = async (e, t) => {
1323
1326
  error: c instanceof Error ? c.message : String(c)
1324
1327
  };
1325
1328
  }
1326
- }, aa = async (e, t, r, a, o, n) => {
1329
+ }, na = async (e, t, r, a, o, n) => {
1327
1330
  const l = t.map?.allLayers.find(
1328
1331
  (p) => p.id === e.layerId
1329
1332
  );
@@ -1336,7 +1339,7 @@ const J = async (e, t) => {
1336
1339
  return p.error;
1337
1340
  i = p.geometry;
1338
1341
  }
1339
- if (l.featureEffect = null, l.featureEffect = new it({
1342
+ if (l.featureEffect = null, l.featureEffect = new st({
1340
1343
  filter: new Se({
1341
1344
  ...e.objectIds?.length ? { objectIds: e.objectIds } : { where: e.where },
1342
1345
  geometry: i,
@@ -1348,7 +1351,7 @@ const J = async (e, t) => {
1348
1351
  excludedEffect: a
1349
1352
  }), l.visible = !0, n)
1350
1353
  return `Applied feature effects to "${l.title ?? e.layerId}" within current map extent.`;
1351
- const c = e.objectIds?.length ? `${l.objectIdField} IN (${e.objectIds.join(",")})` : e.where, u = await ra(
1354
+ const c = e.objectIds?.length ? `${l.objectIdField} IN (${e.objectIds.join(",")})` : e.where, u = await oa(
1352
1355
  t,
1353
1356
  e.layerId,
1354
1357
  c,
@@ -1357,21 +1360,21 @@ const J = async (e, t) => {
1357
1360
  o?.units
1358
1361
  ), d = l.title ?? e.layerId;
1359
1362
  return u.success ? `Applied feature effects to target layer "${l.title ?? e.layerId}"${o && "layerId" in o ? ` using geometry from layer "${o.layerId}"` : ""}.` : `Applied filter to "${d}" but no features matched. ${u.error}`;
1360
- }, oa = ["feet", "kilometers", "meters", "miles", "nautical-miles", "us-nautical-miles"], F = s.enum(oa), na = async ({
1363
+ }, ia = ["feet", "kilometers", "meters", "miles", "nautical-miles", "us-nautical-miles"], F = s.enum(ia), sa = async ({
1361
1364
  targetLayer: e,
1362
1365
  geometryFilter: t,
1363
1366
  useCurrentExtent: r,
1364
1367
  includedEffect: a = "drop-shadow(2px, 2px, 2px, gray)",
1365
1368
  excludedEffect: o = "grayscale(100%) opacity(60%) blur(2px)"
1366
1369
  }, n) => {
1367
- const { mapView: l } = N(n);
1368
- return await aa(e, l, a, o, t, r);
1369
- }, ia = s.object({
1370
+ const { mapView: l } = k(n);
1371
+ return await na(e, l, a, o, t, r);
1372
+ }, la = s.object({
1370
1373
  layerId: s.string().describe("The layerId of the layer containing the geometry by which to filter."),
1371
1374
  where: s.string().describe("The SQL-92 where clause representing the features from which to filter."),
1372
1375
  distance: s.number().optional().describe("The buffer distance around the geometry."),
1373
1376
  units: F.optional().describe("The units for the distance buffer.")
1374
- }), sa = s.object({
1377
+ }), ca = s.object({
1375
1378
  point: s.object({
1376
1379
  x: s.number().describe("X coordinate (longitude) from navigation result"),
1377
1380
  y: s.number().describe("Y coordinate (latitude) from navigation result"),
@@ -1381,7 +1384,7 @@ const J = async (e, t) => {
1381
1384
  }).describe("Point coordinates from a previous navigation/geocoding result"),
1382
1385
  distance: s.number().optional().describe("Optional buffer distance around the point."),
1383
1386
  units: F.optional().describe("The units for the distance buffer.")
1384
- }), la = s.object({
1387
+ }), ua = s.object({
1385
1388
  targetLayer: s.object({
1386
1389
  layerId: s.string().describe("The layerId of the layer on which to set a feature effect."),
1387
1390
  where: s.string().describe("The SQL-92 where clause representing the features to emphasize."),
@@ -1389,7 +1392,7 @@ const J = async (e, t) => {
1389
1392
  "Array of objectIds from a previous query result. Use this instead of a where clause when the query returned objectIds (e.g. top N results). If provided, takes precedence over where clause."
1390
1393
  )
1391
1394
  }),
1392
- geometryFilter: s.union([ia, sa]).optional().describe("Optional geometry-based filtering parameters for spatial queries."),
1395
+ geometryFilter: s.union([la, ca]).optional().describe("Optional geometry-based filtering parameters for spatial queries."),
1393
1396
  useCurrentExtent: s.boolean().optional().describe(
1394
1397
  "Set to true when the previous query used the current map extent as a spatial filter. This ensures the feature effect applies only to features visible in the current view. Default is false."
1395
1398
  ),
@@ -1399,11 +1402,28 @@ const J = async (e, t) => {
1399
1402
  excludedEffect: s.string().default("grayscale(100%) opacity(60%) blur(2px)").describe(
1400
1403
  "The effect applied to features that do not meet the filter requirements. Valid effects include: bloom, blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, saturate, and sepia. Prefer default unless specified."
1401
1404
  )
1402
- }), ca = g(na, {
1405
+ }), da = f(sa, {
1403
1406
  name: "setFeatureEffect",
1404
1407
  description: "Sets a feature effect on a given layer with given filter parameters and feature effects to emphasize certain features that meet a filter requirement. If no feature effect information is provided, then use the default effect provided.",
1405
- schema: la
1406
- }), te = (e) => {
1408
+ schema: ua
1409
+ }), pa = /* @__PURE__ */ new Set([
1410
+ "date",
1411
+ "esrifieldtypedate",
1412
+ "date-only",
1413
+ "dateonly",
1414
+ "esrifieldtypedateonly",
1415
+ "time-only",
1416
+ "timeonly",
1417
+ "esrifieldtypetimeonly",
1418
+ "timestamp-offset",
1419
+ "timestampoffset",
1420
+ "esrifieldtypetimestampoffset"
1421
+ ]), Re = (e) => {
1422
+ if (!e)
1423
+ return !1;
1424
+ const t = e.toLowerCase();
1425
+ return pa.has(t);
1426
+ }, te = (e) => {
1407
1427
  if (e instanceof Date)
1408
1428
  return Number.isNaN(e.getTime()) ? null : e;
1409
1429
  if (typeof e == "number" && Number.isFinite(e)) {
@@ -1411,23 +1431,25 @@ const J = async (e, t) => {
1411
1431
  return Number.isNaN(t.getTime()) ? null : t;
1412
1432
  }
1413
1433
  return null;
1414
- }, ua = (e) => !e || e === "system" ? Intl.DateTimeFormat().resolvedOptions().timeZone : e === "unknown" ? "UTC" : e, da = (e) => {
1434
+ }, ma = (e) => !e || e === "system" ? Intl.DateTimeFormat().resolvedOptions().timeZone : e === "unknown" ? "UTC" : e, ha = (e) => {
1415
1435
  if (typeof e == "string" && e)
1416
1436
  return e;
1417
1437
  const t = te(e);
1418
1438
  return t ? t.toISOString().slice(0, 10) : null;
1419
- }, Zn = () => {
1439
+ }, ri = () => {
1420
1440
  const e = (/* @__PURE__ */ new Date()).getTimezoneOffset(), t = e <= 0 ? "+" : "-", r = Math.floor(Math.abs(e) / 60).toString().padStart(2, "0"), a = (Math.abs(e) % 60).toString().padStart(2, "0"), o = `${t}${r}:${a}`;
1421
1441
  return { userTimezone: Intl.DateTimeFormat().resolvedOptions().timeZone, userTimezoneOffset: o };
1422
- }, pa = (e, t, r) => {
1442
+ }, ya = (e, t, r) => {
1423
1443
  const a = t?.toLowerCase();
1444
+ if (a && !Re(a))
1445
+ return e;
1424
1446
  if (a === "date-only") {
1425
- const n = da(e);
1426
- return n ? lt(n, _("short-date")) : e;
1447
+ const n = ha(e);
1448
+ return n ? ct(n, _("short-date")) : e;
1427
1449
  }
1428
1450
  if (a === "time-only") {
1429
1451
  if (typeof e == "string" && e)
1430
- return ct(e, _("long-time"));
1452
+ return ut(e, _("long-time"));
1431
1453
  const n = te(e);
1432
1454
  return n ? ye(n, {
1433
1455
  ..._("long-time"),
@@ -1437,9 +1459,9 @@ const J = async (e, t) => {
1437
1459
  const o = te(e);
1438
1460
  return o ? ye(o, {
1439
1461
  ..._("short-date-short-time"),
1440
- timeZone: ua(r)
1462
+ timeZone: ma(r)
1441
1463
  }) : e;
1442
- }, Re = (e, t, r) => {
1464
+ }, $e = (e, t, r) => {
1443
1465
  if (e && typeof e != "function") {
1444
1466
  const a = "getField" in r && r.getField?.(e), o = a && "getFieldDomain" in r && r.getFieldDomain ? r.getFieldDomain(a.name) : null;
1445
1467
  if (o?.type === "coded-value") {
@@ -1448,7 +1470,7 @@ const J = async (e, t) => {
1448
1470
  }
1449
1471
  }
1450
1472
  return null;
1451
- }, ma = (e) => !e || e === "system" ? Intl.DateTimeFormat().resolvedOptions().timeZone : e === "unknown" ? "UTC" : e, ha = (e) => {
1473
+ }, fa = (e) => !e || e === "system" ? Intl.DateTimeFormat().resolvedOptions().timeZone : e === "unknown" ? "UTC" : e, ga = (e) => {
1452
1474
  if (e instanceof Date)
1453
1475
  return Number.isNaN(e.getTime()) ? null : e;
1454
1476
  if (typeof e == "number" && Number.isFinite(e)) {
@@ -1460,7 +1482,7 @@ const J = async (e, t) => {
1460
1482
  return Number.isNaN(t.getTime()) ? null : t;
1461
1483
  }
1462
1484
  return null;
1463
- }, ya = (e, t) => {
1485
+ }, wa = (e, t) => {
1464
1486
  if (typeof e != "number")
1465
1487
  return e;
1466
1488
  const r = {};
@@ -1470,26 +1492,26 @@ const J = async (e, t) => {
1470
1492
  } catch {
1471
1493
  return e;
1472
1494
  }
1473
- }, fa = (e, t, r) => {
1474
- const a = ha(e);
1495
+ }, ba = (e, t, r) => {
1496
+ const a = ga(e);
1475
1497
  if (!a)
1476
1498
  return e;
1477
1499
  const o = {};
1478
- t.dateStyle ? o.dateStyle = t.dateStyle : (t.year && (o.year = t.year), t.month && (o.month = t.month)), t.timeStyle && (o.timeStyle = t.timeStyle), t.timeStyle && t.hour12 === "always" ? o.hour12 = !0 : t.timeStyle && t.hour12 === "never" && (o.hour12 = !1), o.timeZone = ma(r);
1500
+ t.dateStyle ? o.dateStyle = t.dateStyle : (t.year && (o.year = t.year), t.month && (o.month = t.month)), t.timeStyle && (o.timeStyle = t.timeStyle), t.timeStyle && t.hour12 === "always" ? o.hour12 = !0 : t.timeStyle && t.hour12 === "never" && (o.hour12 = !1), o.timeZone = fa(r);
1479
1501
  try {
1480
1502
  return new Intl.DateTimeFormat(void 0, o).format(a);
1481
1503
  } catch {
1482
1504
  return e;
1483
1505
  }
1484
- }, $e = (e, t) => e.getFieldAlias?.(t) ?? e.fieldsIndex?.get(t)?.alias ?? e.fieldsIndex?.get(t)?.name ?? t, Ce = (e, t, r, a, o) => {
1506
+ }, Ce = (e, t) => e.getFieldAlias?.(t) ?? e.fieldsIndex?.get(t)?.alias ?? e.fieldsIndex?.get(t)?.name ?? t, Ee = (e, t, r, a, o) => {
1485
1507
  if (r == null)
1486
1508
  return r;
1487
1509
  const l = e.getFieldConfiguration?.(t)?.fieldFormat;
1488
- return l?.type === "number" ? ya(r, l) : l?.type === "date-time" ? fa(r, l, o) : pa(r, a, o);
1489
- }, ga = (e, t, r, a) => {
1490
- const o = e.fieldsIndex?.get(t), n = Re(t, r, e) ?? r;
1491
- return Ce(e, t, n, o?.type, a);
1492
- }, wa = (e, t) => $e(e, t), Ee = (e, t, r) => {
1510
+ return l?.type === "number" ? wa(r, l) : l?.type === "date-time" ? !a || Re(a) ? ba(r, l, o) : r : ya(r, a, o);
1511
+ }, Ta = (e, t, r, a) => {
1512
+ const o = e.fieldsIndex?.get(t), n = $e(t, r, e) ?? r;
1513
+ return Ee(e, t, n, o?.type, a);
1514
+ }, Sa = (e, t) => Ce(e, t), Fe = (e, t, r) => {
1493
1515
  const a = e.objectIdField, o = t.features.map(
1494
1516
  (l) => l.attributes[a]
1495
1517
  ), n = t.features.map((l) => {
@@ -1502,16 +1524,16 @@ const J = async (e, t) => {
1502
1524
  c[u.name] = d;
1503
1525
  return;
1504
1526
  }
1505
- const p = Re(u.name, d, e) ?? d, m = $e(e, u.name);
1506
- c[m] = Ce(e, u.name, p, u.type, r);
1527
+ const p = $e(u.name, d, e) ?? d, m = Ce(e, u.name);
1528
+ c[m] = Ee(e, u.name, p, u.type, r);
1507
1529
  }), c;
1508
1530
  });
1509
1531
  return { objectIds: o, attributes: n };
1510
- }, ba = (e, t, r) => {
1532
+ }, va = (e, t, r) => {
1511
1533
  const a = e.createQuery();
1512
1534
  return a.outFields = [t], a.where = r || "1=1", a.num = 1, a;
1513
- }, Ta = async (e, t, r, a) => {
1514
- const o = a.map?.allLayers.find((m) => m.id === e), n = ba(o, t, r.where), i = (await o.queryFeatures(n)).features[0], c = i ? i.attributes[t] : null, u = ga(o, t, c, a.timeZone), d = wa(o, t);
1535
+ }, xa = async (e, t, r, a) => {
1536
+ const o = a.map?.allLayers.find((m) => m.id === e), n = va(o, t, r.where), i = (await o.queryFeatures(n)).features[0], c = i ? i.attributes[t] : null, u = Ta(o, t, c, a.timeZone), d = Sa(o, t);
1515
1537
  return {
1516
1538
  tool: "getAttribute",
1517
1539
  layerName: o.title ?? e,
@@ -1524,20 +1546,20 @@ const J = async (e, t) => {
1524
1546
  }
1525
1547
  };
1526
1548
  };
1527
- async function Sa({ layerId: e, fieldName: t, query: r }, a) {
1528
- const { mapView: o } = N(a), n = await Ta(e, t, r, o);
1549
+ async function Ra({ layerId: e, fieldName: t, query: r }, a) {
1550
+ const { mapView: o } = k(a), n = await xa(e, t, r, o);
1529
1551
  return JSON.stringify(n, null, 2);
1530
1552
  }
1531
- const va = s.object({
1553
+ const $a = s.object({
1532
1554
  layerId: s.string().describe("The layerId of the layer containing the field from which to get a value."),
1533
1555
  fieldName: s.string().describe("The name of the field/attribute from which to get a field value."),
1534
1556
  query: s.object({
1535
1557
  where: s.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value.")
1536
1558
  })
1537
- }), xa = g(Sa, {
1559
+ }), Ca = f(Ra, {
1538
1560
  name: "getAttribute",
1539
1561
  description: "Returns an attribute value for a given feature.",
1540
- schema: va
1562
+ schema: $a
1541
1563
  }), le = (e, t, r) => {
1542
1564
  if (!(r ? e.hasAllFeaturesInView : e.hasAllFeatures))
1543
1565
  return !1;
@@ -1548,14 +1570,14 @@ function K(e, t) {
1548
1570
  let r = e ?? "";
1549
1571
  return t != null && t && (r = r ? `(${r}) AND (${t})` : t), r || null;
1550
1572
  }
1551
- const Ra = async (e) => {
1573
+ const Ea = async (e) => {
1552
1574
  const { targetLayer: t, fieldName: r, statisticType: a, mapView: o, layersAndFieldsRegistry: n, geometryFilter: l } = e, i = o.map?.allLayers.find((S) => S.id === t.layerId);
1553
1575
  if (!i)
1554
1576
  throw new Error(`Layer '${t.layerId}' not found.`);
1555
1577
  const c = await o.whenLayerView(i), d = n.get(t.layerId)?.fieldRegistry.get(r), p = d?.alias;
1556
1578
  if (!d)
1557
1579
  throw new Error(`Field '${r}' not found.`);
1558
- let m, y;
1580
+ let m, w;
1559
1581
  if (l) {
1560
1582
  const S = await J(l, o);
1561
1583
  if ("error" in S)
@@ -1578,37 +1600,37 @@ const Ra = async (e) => {
1578
1600
  units: l.units,
1579
1601
  applied: !0
1580
1602
  });
1581
- y = new Se({
1603
+ w = new Se({
1582
1604
  geometry: S.geometry,
1583
1605
  distance: l.distance,
1584
1606
  units: l.units,
1585
1607
  spatialRelationship: "intersects"
1586
1608
  });
1587
1609
  }
1588
- const f = le(c, [r], !1);
1589
- let h = null, w = null;
1610
+ const h = le(c, [r], !1);
1611
+ let y = null, g = null;
1590
1612
  const b = 10;
1591
1613
  if (d.type !== "geometry" && d.type !== "oid" && d.type !== "global-id")
1592
1614
  try {
1593
1615
  const S = {
1594
1616
  layer: i,
1595
- useFeaturesInView: f,
1596
- view: f ? o : void 0,
1617
+ useFeaturesInView: h,
1618
+ view: h ? o : void 0,
1597
1619
  field: r,
1598
1620
  sqlWhere: K(i.definitionExpression, t.where),
1599
- ...y && { filter: y },
1621
+ ...w && { filter: w },
1600
1622
  outStatisticTypes: { include: [a] }
1601
1623
  };
1602
- h = await ut(S);
1624
+ y = await dt(S);
1603
1625
  const Q = ["string", "small-integer", "integer"], A = d.domain?.type === "coded-value" ? d.domain : null;
1604
- (Q.includes(d.type) || A) && (w = (await dt({
1626
+ (Q.includes(d.type) || A) && (g = (await pt({
1605
1627
  layer: i,
1606
- useFeaturesInView: f,
1607
- view: f ? o : void 0,
1628
+ useFeaturesInView: h,
1629
+ view: h ? o : void 0,
1608
1630
  field: r,
1609
1631
  sqlWhere: K(i.definitionExpression, t.where),
1610
- ...y && { filter: y }
1611
- })).uniqueValueInfos.sort((I, ze) => ze.count - I.count).slice(0, b)), w && d.domain?.type === "coded-value" && (w = w.map((I) => ({
1632
+ ...w && { filter: w }
1633
+ })).uniqueValueInfos.sort((I, ze) => ze.count - I.count).slice(0, b)), g && d.domain?.type === "coded-value" && (g = g.map((I) => ({
1612
1634
  ...I,
1613
1635
  value: A ? A.getName(I.value) ?? I.value : I.value
1614
1636
  })));
@@ -1618,26 +1640,26 @@ const Ra = async (e) => {
1618
1640
  return {
1619
1641
  tool: "getStatistics",
1620
1642
  layerName: i.title ?? t.layerId,
1621
- summary: `${a} = ${typeof h?.[a] == "number" ? h[a] : "N/A"}`,
1643
+ summary: `${a} = ${typeof y?.[a] == "number" ? y[a] : "N/A"}`,
1622
1644
  details: {
1623
1645
  fieldName: r,
1624
1646
  fieldAlias: p,
1625
1647
  statisticType: a,
1626
- statistic: h?.[a] ?? null,
1627
- summaryStatistics: h,
1628
- uniqueValues: w,
1648
+ statistic: y?.[a] ?? null,
1649
+ summaryStatistics: y,
1650
+ uniqueValues: g,
1629
1651
  where: t.where,
1630
1652
  spatialFilterInfo: m
1631
1653
  }
1632
1654
  };
1633
1655
  };
1634
- async function $a({
1656
+ async function Fa({
1635
1657
  targetLayer: e,
1636
1658
  fieldName: t,
1637
1659
  statisticType: r,
1638
1660
  geometryFilter: a
1639
1661
  }, o) {
1640
- const n = xe(o, "layersAndFieldsRegistry"), { mapView: l } = N(o), i = await Ra({
1662
+ const n = xe(o, "layersAndFieldsRegistry"), { mapView: l } = k(o), i = await Ea({
1641
1663
  targetLayer: e,
1642
1664
  fieldName: t,
1643
1665
  statisticType: r,
@@ -1647,12 +1669,12 @@ async function $a({
1647
1669
  });
1648
1670
  return JSON.stringify(i, null, 2);
1649
1671
  }
1650
- const Ca = s.object({
1672
+ const Na = s.object({
1651
1673
  layerId: s.string().describe("The layerId of the layer containing the geometry by which to filter."),
1652
1674
  where: s.string().describe("The SQL-92 where clause representing the features from which to filter."),
1653
1675
  distance: s.number().optional().describe("The buffer distance around the geometry."),
1654
1676
  units: F.optional().describe("The units for the distance buffer.")
1655
- }), Ea = s.object({
1677
+ }), ka = s.object({
1656
1678
  point: s.object({
1657
1679
  x: s.number().describe("X coordinate (longitude) from navigation result"),
1658
1680
  y: s.number().describe("Y coordinate (latitude) from navigation result"),
@@ -1662,17 +1684,17 @@ const Ca = s.object({
1662
1684
  }).describe("Point coordinates from a previous navigation/geocoding result"),
1663
1685
  distance: s.number().optional().describe("Optional buffer distance around the point."),
1664
1686
  units: F.optional().describe("The units for the distance buffer.")
1665
- }), Fa = s.object({
1687
+ }), qa = s.object({
1666
1688
  targetLayer: s.object({
1667
1689
  layerId: s.string().describe("The layerId of the layer containing the field from which to get a value."),
1668
1690
  where: s.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value.")
1669
1691
  }),
1670
- geometryFilter: s.union([Ca, Ea]).optional().describe(
1692
+ geometryFilter: s.union([Na, ka]).optional().describe(
1671
1693
  "Geometry filter for spatial queries. Use 'point' option with x/y coordinates from navigation results to find features at that location (point-in-polygon). Use 'layerId/where' option to filter by features from another layer."
1672
1694
  ),
1673
1695
  fieldName: s.string().describe("The name of the field for which to get statistics. STRICTLY DO NOT use OBJECTID. Use any other field"),
1674
1696
  statisticType: s.enum(["avg", "max", "median", "min", "stddev", "sum", "variance", "nullcount", "count"]).describe("The statistic type to calculate.")
1675
- }), ka = g($a, {
1697
+ }), Ia = f(Fa, {
1676
1698
  name: "getStatistics",
1677
1699
  description: `Computes a single aggregate statistic (max, min, avg, sum, median, stddev, variance) for a numeric field across matching features. Also returns frequency analysis for categorical fields.
1678
1700
 
@@ -1687,8 +1709,8 @@ DO NOT USE FOR:
1687
1709
  - Simple counts of features matching a condition — use queryFeatures instead
1688
1710
 
1689
1711
  Only call this tool when the answer requires computing an aggregate (avg, max, min, sum, median, stddev) over a field's values, not just counting or listing features.`,
1690
- schema: Fa
1691
- }), Na = (e) => e.flatMap((t) => t.split(",")).map((t) => t.trim()).map((t) => t.split(/\s+/u)[0]?.replace(/^"|"$/gu, "")).filter((t) => !!t), qa = async (e, t, r, a, o) => {
1712
+ schema: qa
1713
+ }), Da = (e) => e.flatMap((t) => t.split(",")).map((t) => t.trim()).map((t) => t.split(/\s+/u)[0]?.replace(/^"|"$/gu, "")).filter((t) => !!t), za = async (e, t, r, a, o) => {
1692
1714
  const n = r.map?.allLayers.find((m) => m.id === e.layerId), l = await r.whenLayerView(n), i = n.title ?? e.layerId;
1693
1715
  let c;
1694
1716
  if (a) {
@@ -1715,7 +1737,7 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
1715
1737
  try {
1716
1738
  let m;
1717
1739
  if (u) {
1718
- const h = new pt({
1740
+ const y = new mt({
1719
1741
  where: e.where || "1=1",
1720
1742
  outFields: p,
1721
1743
  orderByFields: e.orderByFields,
@@ -1723,34 +1745,34 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
1723
1745
  spatialRelationship: c ? "intersects" : void 0,
1724
1746
  distance: a?.distance,
1725
1747
  units: a?.units,
1726
- topFilter: new mt({
1748
+ topFilter: new ht({
1727
1749
  topCount: t.topCount,
1728
1750
  groupByFields: t.groupByFields,
1729
1751
  orderByFields: t.orderByFields
1730
1752
  })
1731
1753
  });
1732
- m = await n.queryTopFeatures(h);
1754
+ m = await n.queryTopFeatures(y);
1733
1755
  } else {
1734
- const h = n.createQuery();
1735
- h.where = K(n.definitionExpression, e.where || "1=1"), h.outFields = p.length ? p : ["*"], h.orderByFields = t.orderByFields, h.returnGeometry = !1, h.num = t.topCount, c && (h.geometry = c, h.spatialRelationship = "intersects"), a?.distance && (h.distance = a.distance), a?.units && (h.units = a.units), h.outSpatialReference = r.spatialReference;
1736
- const w = [
1737
- .../* @__PURE__ */ new Set([...e.outFields, ...Na(t.orderByFields)])
1738
- ], b = le(l, w, o ?? !1);
1756
+ const y = n.createQuery();
1757
+ y.where = K(n.definitionExpression, e.where || "1=1"), y.outFields = p.length ? p : ["*"], y.orderByFields = t.orderByFields, y.returnGeometry = !1, y.num = t.topCount, c && (y.geometry = c, y.spatialRelationship = "intersects"), a?.distance && (y.distance = a.distance), a?.units && (y.units = a.units), y.outSpatialReference = r.spatialReference;
1758
+ const g = [
1759
+ .../* @__PURE__ */ new Set([...e.outFields, ...Da(t.orderByFields)])
1760
+ ], b = le(l, g, o ?? !1);
1739
1761
  try {
1740
- m = b ? await l.queryFeatures(h) : await n.queryFeatures(h);
1762
+ m = b ? await l.queryFeatures(y) : await n.queryFeatures(y);
1741
1763
  } catch (v) {
1742
- console.warn("Client-side query failed, falling back to server:", v), m = await n.queryFeatures(h);
1764
+ console.warn("Client-side query failed, falling back to server:", v), m = await n.queryFeatures(y);
1743
1765
  }
1744
1766
  }
1745
- const y = m.features.map((h) => h.attributes[d]), { attributes: f } = Ee(n, m, r.timeZone);
1767
+ const w = m.features.map((y) => y.attributes[d]), { attributes: h } = Fe(n, m, r.timeZone);
1746
1768
  return {
1747
1769
  tool: "getTopFeatures",
1748
1770
  layerName: i,
1749
1771
  summary: `Top ${t.topCount} features extracted`,
1750
1772
  details: {
1751
1773
  topCount: t.topCount,
1752
- attributes: f,
1753
- objectIds: y,
1774
+ attributes: h,
1775
+ objectIds: w,
1754
1776
  objectIdField: d,
1755
1777
  where: e.where,
1756
1778
  orderByFields: t.orderByFields,
@@ -1765,20 +1787,20 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
1765
1787
  details: { error: m instanceof Error ? m.message : String(m) }
1766
1788
  };
1767
1789
  }
1768
- }, Ia = async ({
1790
+ }, Pa = async ({
1769
1791
  targetLayer: e,
1770
1792
  topFilter: t,
1771
1793
  geometryFilter: r,
1772
1794
  useCurrentExtent: a
1773
1795
  }, o) => {
1774
- const { mapView: n } = N(o), l = await qa(e, t, n, r, a);
1796
+ const { mapView: n } = k(o), l = await za(e, t, n, r, a);
1775
1797
  return JSON.stringify(l, null, 2);
1776
- }, za = s.object({
1798
+ }, Aa = s.object({
1777
1799
  layerId: s.string().describe("The layerId of the layer containing the geometry by which to filter."),
1778
1800
  where: s.string().describe("The SQL-92 where clause representing the features from which to filter."),
1779
1801
  distance: s.number().optional().describe("The buffer distance around the geometry."),
1780
1802
  units: F.optional().describe("The units for the distance buffer.")
1781
- }), Da = s.object({
1803
+ }), La = s.object({
1782
1804
  point: s.object({
1783
1805
  x: s.number().describe("X coordinate (longitude) from navigation result"),
1784
1806
  y: s.number().describe("Y coordinate (latitude) from navigation result"),
@@ -1788,7 +1810,7 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
1788
1810
  }).describe("Point coordinates from a previous navigation/geocoding result"),
1789
1811
  distance: s.number().optional().describe("Optional buffer distance around the point."),
1790
1812
  units: F.optional().describe("The units for the distance buffer.")
1791
- }), Pa = s.object({
1813
+ }), ja = s.object({
1792
1814
  targetLayer: s.object({
1793
1815
  layerId: s.string().describe("The layerId of the layer containing the field from which to get a value."),
1794
1816
  where: s.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value."),
@@ -1799,7 +1821,7 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
1799
1821
  ).default("*")
1800
1822
  )
1801
1823
  }),
1802
- geometryFilter: s.union([za, Da]).optional().describe(
1824
+ geometryFilter: s.union([Aa, La]).optional().describe(
1803
1825
  "Geometry filter for spatial queries. Use 'point' option with x/y coordinates from navigation results to find features at that location (point-in-polygon). Use 'layerId/where' option to filter by features from another layer."
1804
1826
  ),
1805
1827
  topFilter: s.object({
@@ -1812,17 +1834,17 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
1812
1834
  useCurrentExtent: s.boolean().optional().describe(
1813
1835
  "Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at'. Default is false (queries entire layer)."
1814
1836
  )
1815
- }), Aa = g(Ia, {
1837
+ }), Ga = f(Pa, {
1816
1838
  name: "getTopFeatures",
1817
1839
  description: 'Returns top N features ranked by an existing field value. Use for "highest", "lowest", "top N" questions where ranking is based on a field that already exists in the data (e.g., population, value, date, depth). orderByFields must be actual field names with ASC/DESC. Do NOT use aggregate functions like COUNT(), SUM(), AVG() - those require getStatistics.',
1818
- schema: Pa
1819
- }), ee = 25, La = (e) => e.flatMap((t) => t.split(",")).map((t) => t.trim()).map((t) => t.split(/\s+/u)[0]?.replace(/^"|"$/gu, "")).filter((t) => !!t), ja = async (e, t, r, a) => {
1820
- const o = t.map?.allLayers.find((w) => w.id === e.layerId), n = await t.whenLayerView(o), l = o.title ?? e.layerId;
1840
+ schema: ja
1841
+ }), ee = 25, Oa = (e) => e.flatMap((t) => t.split(",")).map((t) => t.trim()).map((t) => t.split(/\s+/u)[0]?.replace(/^"|"$/gu, "")).filter((t) => !!t), Ma = async (e, t, r, a) => {
1842
+ const o = t.map?.allLayers.find((g) => g.id === e.layerId), n = await t.whenLayerView(o), l = o.title ?? e.layerId;
1821
1843
  let i;
1822
1844
  if (r) {
1823
- const w = await J(r, t);
1824
- if ("error" in w) {
1825
- const b = { error: w.error };
1845
+ const g = await J(r, t);
1846
+ if ("error" in g) {
1847
+ const b = { error: g.error };
1826
1848
  if (j(r)) {
1827
1849
  const v = t.map?.allLayers.find((S) => S.id === r.layerId);
1828
1850
  b.geometryLayerName = v?.title ?? v?.id, b.geometryLayerId = r.layerId, b.geometryWhere = r.where;
@@ -1834,7 +1856,7 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
1834
1856
  details: b
1835
1857
  };
1836
1858
  }
1837
- if (!w.geometry) {
1859
+ if (!g.geometry) {
1838
1860
  const b = {};
1839
1861
  if (j(r)) {
1840
1862
  const v = t.map?.allLayers.find((S) => S.id === r.layerId);
@@ -1847,19 +1869,19 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
1847
1869
  details: b
1848
1870
  };
1849
1871
  }
1850
- i = w.geometry;
1872
+ i = g.geometry;
1851
1873
  } else a && (i = t.extent.clone());
1852
1874
  const c = [
1853
- .../* @__PURE__ */ new Set([...e.outFields, ...La(e.orderByFields)])
1875
+ .../* @__PURE__ */ new Set([...e.outFields, ...Oa(e.orderByFields)])
1854
1876
  ], u = le(n, c, a ?? !1), d = o.objectIdField, p = o.createQuery();
1855
1877
  p.where = K(o.definitionExpression, e.where || "1=1"), p.outFields = e.outFields.includes("*") ? ["*"] : [.../* @__PURE__ */ new Set([...e.outFields, d])], p.orderByFields = e.orderByFields, i && (p.geometry = i, p.spatialRelationship = "intersects"), r?.distance && (p.distance = r.distance), r?.units && (p.units = r.units), p.outSpatialReference = t.spatialReference;
1856
- let m, y;
1878
+ let m, w;
1857
1879
  try {
1858
- m = u ? await n.queryFeatureCount(p) : await o.queryFeatureCount(p), m > 0 && m <= ee && (y = u ? await n.queryFeatures(p) : await o.queryFeatures(p));
1859
- } catch (w) {
1860
- console.warn("Client-side query failed, falling back to server:", w), m = await o.queryFeatureCount(p), m > 0 && m <= ee && (y = await o.queryFeatures(p));
1880
+ m = u ? await n.queryFeatureCount(p) : await o.queryFeatureCount(p), m > 0 && m <= ee && (w = u ? await n.queryFeatures(p) : await o.queryFeatures(p));
1881
+ } catch (g) {
1882
+ console.warn("Client-side query failed, falling back to server:", g), m = await o.queryFeatureCount(p), m > 0 && m <= ee && (w = await o.queryFeatures(p));
1861
1883
  }
1862
- const { objectIds: f, attributes: h } = y ? Ee(o, y, t.timeZone) : { objectIds: void 0, attributes: void 0 };
1884
+ const { objectIds: h, attributes: y } = w ? Fe(o, w, t.timeZone) : { objectIds: void 0, attributes: void 0 };
1863
1885
  return {
1864
1886
  tool: "queryFeatures",
1865
1887
  layerName: l,
@@ -1869,28 +1891,28 @@ Only call this tool when the answer requires computing an aggregate (avg, max, m
1869
1891
  where: e.where,
1870
1892
  orderByFields: e.orderByFields,
1871
1893
  outFields: e.outFields,
1872
- ...f && { objectIds: f, objectIdField: d },
1873
- ...h && { attributes: h },
1894
+ ...h && { objectIds: h, objectIdField: d },
1895
+ ...y && { attributes: y },
1874
1896
  ...m > ee && {
1875
1897
  note: `${m} features found.`
1876
1898
  }
1877
1899
  }
1878
1900
  };
1879
1901
  };
1880
- async function Ga({
1902
+ async function Qa({
1881
1903
  targetLayer: e,
1882
1904
  geometryFilter: t,
1883
1905
  useCurrentExtent: r
1884
1906
  }, a) {
1885
- const { mapView: o } = N(a), n = await ja(e, o, t, r);
1907
+ const { mapView: o } = k(a), n = await Ma(e, o, t, r);
1886
1908
  return JSON.stringify(n, null, 2);
1887
1909
  }
1888
- const Oa = s.object({
1910
+ const _a = s.object({
1889
1911
  layerId: s.string().describe("The layerId of the layer containing the geometry by which to filter."),
1890
1912
  where: s.string().describe("The SQL-92 where clause representing the features from which to filter."),
1891
1913
  distance: s.number().optional().describe("The buffer distance around the geometry."),
1892
1914
  units: F.optional().describe("The units for the distance buffer.")
1893
- }), Ma = s.object({
1915
+ }), Wa = s.object({
1894
1916
  point: s.object({
1895
1917
  x: s.number().describe("X coordinate (longitude) from navigation result"),
1896
1918
  y: s.number().describe("Y coordinate (latitude) from navigation result"),
@@ -1900,7 +1922,7 @@ const Oa = s.object({
1900
1922
  }).describe("Point coordinates from a previous navigation/geocoding result"),
1901
1923
  distance: s.number().optional().describe("Optional buffer distance around the point."),
1902
1924
  units: F.optional().describe("The units for the distance buffer.")
1903
- }), Qa = s.object({
1925
+ }), Va = s.object({
1904
1926
  targetLayer: s.object({
1905
1927
  layerId: s.string().describe("The layerId of the layer containing the field from which to get a value."),
1906
1928
  where: s.string().describe(
@@ -1913,13 +1935,13 @@ const Oa = s.object({
1913
1935
  ).default("*")
1914
1936
  )
1915
1937
  }),
1916
- geometryFilter: s.union([Oa, Ma]).optional().describe(
1938
+ geometryFilter: s.union([_a, Wa]).optional().describe(
1917
1939
  "Geometry filter for spatial queries. Use 'point' option with x/y coordinates from navigation results to find features at that location (point-in-polygon). Use 'layerId/where' option to filter by features from another layer."
1918
1940
  ),
1919
1941
  useCurrentExtent: s.boolean().optional().describe(
1920
1942
  "Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at', OR when the user refers back to features previously identified using the current extent (e.g. 'these', 'those', 'them', 'the same ones'). Default is false (queries entire layer)."
1921
1943
  )
1922
- }), _a = g(Ga, {
1944
+ }), Ba = f(Qa, {
1923
1945
  name: "queryFeatures",
1924
1946
  description: `Queries features from a layer. Returns the total count of matching features, plus individual feature attributes if ≤25 features match.
1925
1947
 
@@ -1931,10 +1953,10 @@ USE THIS TOOL FOR:
1931
1953
  - Any question where the user wants to SEE or COUNT matching features
1932
1954
 
1933
1955
  This is the DEFAULT tool for most queries. When in doubt, use this tool.`,
1934
- schema: Qa
1935
- }), Wa = [xa, ka, Aa, _a], Yn = [ca, ta, Yr], Va = new nt(Wa, { handleToolErrors: !1 });
1936
- async function Xn(e, t) {
1937
- const { messages: r } = await Va.invoke({ messages: e.dataExplorationMessages }, t), a = [], o = [];
1956
+ schema: Va
1957
+ }), Ua = [Ca, Ia, Ga, Ba], ai = [da, aa, ea], Ka = new it(Ua, { handleToolErrors: !1 });
1958
+ async function oi(e, t) {
1959
+ const { messages: r } = await Ka.invoke({ messages: e.dataExplorationMessages }, t), a = [], o = [];
1938
1960
  for (const n of r) {
1939
1961
  const l = n.content;
1940
1962
  let i;
@@ -1966,11 +1988,11 @@ async function Xn(e, t) {
1966
1988
  dataExplorationMessages: [...e.dataExplorationMessages, ...r],
1967
1989
  queryResponse: a,
1968
1990
  status: "success",
1969
- summary: o.length > 0 ? Bt(o.join(`
1991
+ summary: o.length > 0 ? Kt(o.join(`
1970
1992
  `)) : "Query executed."
1971
1993
  };
1972
1994
  }
1973
- const ei = T.Root({
1995
+ const ni = T.Root({
1974
1996
  ...H(),
1975
1997
  // internal to the help agent
1976
1998
  helpInternalState: T({
@@ -1979,7 +2001,7 @@ const ei = T.Root({
1979
2001
  toolCallMessage: void 0
1980
2002
  })
1981
2003
  })
1982
- }), Ba = (e, t) => {
2004
+ }), Ha = (e, t) => {
1983
2005
  const r = Array.from(e.values()).find(
1984
2006
  ({ layerItem: n }) => n.title?.toLowerCase().includes(t.toLowerCase())
1985
2007
  );
@@ -1992,16 +2014,16 @@ const ei = T.Root({
1992
2014
  return `**${r.layerItem.title}** has ${a.length} field(s):
1993
2015
 
1994
2016
  ${o}`;
1995
- }, Ua = async ({ layerTitle: e }, t) => {
2017
+ }, Ja = async ({ layerTitle: e }, t) => {
1996
2018
  const r = xe(t, "layersAndFieldsRegistry");
1997
- return Ba(r, e);
1998
- }, ti = g(Ua, {
2019
+ return Ha(r, e);
2020
+ }, ii = f(Ja, {
1999
2021
  name: "listLayerFields",
2000
2022
  description: "Lists all fields for a given layer by title. Use ONLY when the user explicitly asks to see fields, columns, or attributes of a specific named layer. Do NOT call this tool for general help questions, capability overviews, or layer listing.",
2001
2023
  schema: s.object({
2002
2024
  layerTitle: s.string().describe("The title or partial title of the layer to list fields for.")
2003
2025
  })
2004
- }), ri = T.Root({
2026
+ }), si = T.Root({
2005
2027
  ...H(),
2006
2028
  intent: T({
2007
2029
  reducer: (e, t) => t
@@ -2023,7 +2045,7 @@ function ce(e) {
2023
2045
  function q(e) {
2024
2046
  return !!e?.map && !("activeLinkChartLayer" in e.map);
2025
2047
  }
2026
- async function Z(e) {
2048
+ async function Y(e) {
2027
2049
  !e || q(e) || !e.map?.diagramNodesExtent || await e.goTo(e.map.diagramNodesExtent);
2028
2050
  }
2029
2051
  function O(e) {
@@ -2037,16 +2059,16 @@ function O(e) {
2037
2059
  view: a
2038
2060
  };
2039
2061
  }
2040
- function ai(e) {
2062
+ function li(e) {
2041
2063
  const r = e?.configurable?.context;
2042
- if (Fe(e) === "knowledgeGraph")
2064
+ if (Ne(e) === "knowledgeGraph")
2043
2065
  return "knowledgeGraph";
2044
2066
  const o = r.view;
2045
2067
  return q(o) ? (ce(o), "map") : "linkChart";
2046
2068
  }
2047
2069
  async function M(e) {
2048
2070
  const r = e?.configurable?.context;
2049
- if (Fe(e) === "knowledgeGraph")
2071
+ if (Ne(e) === "knowledgeGraph")
2050
2072
  return r;
2051
2073
  {
2052
2074
  const o = r.view.map;
@@ -2070,7 +2092,7 @@ async function M(e) {
2070
2092
  }
2071
2093
  }
2072
2094
  }
2073
- function Fe(e) {
2095
+ function Ne(e) {
2074
2096
  const r = e?.configurable?.context;
2075
2097
  if (!r || typeof r != "object")
2076
2098
  throw new Error("ArcgisKnowledgeAgent context missing");
@@ -2082,7 +2104,7 @@ function Fe(e) {
2082
2104
  return "view";
2083
2105
  throw new Error("ArcgisKnowledgeAgent context must have either a view or knowledgeGraph property.");
2084
2106
  }
2085
- class Ka {
2107
+ class Ya {
2086
2108
  constructor(t) {
2087
2109
  this.dataModel = t, this.kind = "GraphQueryGenerationRequest", this.explainQuery = !0, this.schemaInformation = ue.fromDataModel(t);
2088
2110
  }
@@ -2101,10 +2123,10 @@ class ue {
2101
2123
  for (const a of t.entityTypes)
2102
2124
  r.entityTypes.push(G.fromEntityType(a));
2103
2125
  for (const a of t.relationshipTypes)
2104
- r.relationshipTypes.push(Ha.fromRelationshipType(a));
2126
+ r.relationshipTypes.push(Za.fromRelationshipType(a));
2105
2127
  return r.identifierInfo = {
2106
2128
  mappingInfo: {
2107
- identifierMapsTo: Ja(
2129
+ identifierMapsTo: Xa(
2108
2130
  t.identifierInfo.identifierMappingInfo.identifierInfoType
2109
2131
  ),
2110
2132
  identifierPropertyName: t.identifierInfo.identifierMappingInfo.uniformPropertyIdentifier.identifierPropertyName
@@ -2124,13 +2146,13 @@ class G {
2124
2146
  }
2125
2147
  static fromEntityType(t) {
2126
2148
  const r = new G();
2127
- r.name = t.name, r.alias = t.alias ? t.alias : void 0, r.role = Za(t.role);
2149
+ r.name = t.name, r.alias = t.alias ? t.alias : void 0, r.role = eo(t.role);
2128
2150
  for (const a of t.properties) {
2129
2151
  const o = {
2130
2152
  name: a.name,
2131
2153
  alias: a.alias ? a.alias : void 0,
2132
2154
  fieldType: a.fieldType,
2133
- role: Ya(a.role),
2155
+ role: to(a.role),
2134
2156
  geometryDef: a.fieldType === "esriFieldTypeGeometry" ? {
2135
2157
  geometryType: a.geometryType ?? "esriGeometryAny",
2136
2158
  hasM: a.hasM ? a.hasM : void 0,
@@ -2142,7 +2164,7 @@ class G {
2142
2164
  return r;
2143
2165
  }
2144
2166
  }
2145
- class Ha extends G {
2167
+ class Za extends G {
2146
2168
  constructor() {
2147
2169
  super(...arguments), this.observedEndPoints = [];
2148
2170
  }
@@ -2157,7 +2179,7 @@ class Ha extends G {
2157
2179
  return r;
2158
2180
  }
2159
2181
  }
2160
- const Ja = (e) => {
2182
+ const Xa = (e) => {
2161
2183
  switch (e) {
2162
2184
  case "esriIdentifierInfoTypeUNSPECIFIED":
2163
2185
  return "UNSPECIFIED";
@@ -2168,7 +2190,7 @@ const Ja = (e) => {
2168
2190
  default:
2169
2191
  return e;
2170
2192
  }
2171
- }, Za = (e) => {
2193
+ }, eo = (e) => {
2172
2194
  switch (e) {
2173
2195
  case "Regular":
2174
2196
  return "esriGraphNamedObjectRegular";
@@ -2180,7 +2202,7 @@ const Ja = (e) => {
2180
2202
  return e;
2181
2203
  }
2182
2204
  };
2183
- function Ya(e) {
2205
+ function to(e) {
2184
2206
  switch (e) {
2185
2207
  case "esriGraphPropertyRegular":
2186
2208
  return "Regular";
@@ -2218,10 +2240,10 @@ function Ya(e) {
2218
2240
  return "Regular";
2219
2241
  }
2220
2242
  }
2221
- function Y(e) {
2243
+ function Z(e) {
2222
2244
  return e?.signal;
2223
2245
  }
2224
- async function Xa(e, t) {
2246
+ async function ro(e, t) {
2225
2247
  const r = await B("arcgis_knowledge_cypher_query_prompt");
2226
2248
  return t ? `${e} ${r}
2227
2249
 
@@ -2232,22 +2254,22 @@ Execution Error: ${t.executionError}
2232
2254
  Failed Query:
2233
2255
  ${t.failedGraphQuery}` : `${e} ${r}`;
2234
2256
  }
2235
- async function eo(e, t, r, a) {
2257
+ async function ao(e, t, r, a) {
2236
2258
  const { graphQuery: o, explanation: n } = await de(e, t, r, a);
2237
2259
  return { graphQuery: o, explanation: n };
2238
2260
  }
2239
2261
  async function de(e, t, r, a, o) {
2240
2262
  const n = {
2241
- message: await Xa(e, o),
2242
- context: new Ka(t)
2243
- }, l = Y(a);
2263
+ message: await ro(e, o),
2264
+ context: new Ya(t)
2265
+ }, l = Z(a);
2244
2266
  await x({ text: "Attempting to generate a cypher query from your prompt..." }, a);
2245
2267
  const i = await me(`${r}/chat`, {
2246
2268
  method: "post",
2247
2269
  body: JSON.stringify(n),
2248
2270
  headers: {
2249
2271
  "Content-Type": "application/json",
2250
- token: pe.findCredential(k.getDefault().url)?.token ?? ""
2272
+ token: pe.findCredential(N.getDefault().url)?.token ?? ""
2251
2273
  },
2252
2274
  signal: l
2253
2275
  });
@@ -2257,13 +2279,13 @@ async function de(e, t, r, a, o) {
2257
2279
  });
2258
2280
  let c = !1;
2259
2281
  const u = Date.now();
2260
- let d = i.data.sequenceNumber, p = "", m = "", y = 1;
2282
+ let d = i.data.sequenceNumber, p = "", m = "", w = 1;
2261
2283
  for (; !c; ) {
2262
- await new Promise((h) => setTimeout(h, 1e3)), await x(
2263
- { text: `Periodically requesting status of job from ArcGIS AI Services${"...".substring(0, y)}` },
2284
+ await new Promise((y) => setTimeout(y, 1e3)), await x(
2285
+ { text: `Periodically requesting status of job from ArcGIS AI Services${"...".substring(0, w)}` },
2264
2286
  a
2265
- ), y = y % 3 + 1;
2266
- const f = await me(`${r}/chat`, {
2287
+ ), w = w % 3 + 1;
2288
+ const h = await me(`${r}/chat`, {
2267
2289
  method: "post",
2268
2290
  body: JSON.stringify({
2269
2291
  conversationId: i.data.conversationId,
@@ -2272,61 +2294,61 @@ async function de(e, t, r, a, o) {
2272
2294
  }),
2273
2295
  headers: {
2274
2296
  "Content-Type": "application/json",
2275
- token: pe.findCredential(k.getDefault().url)?.token ?? ""
2297
+ token: pe.findCredential(N.getDefault().url)?.token ?? ""
2276
2298
  },
2277
2299
  signal: l
2278
2300
  });
2279
- if (f.httpStatus !== 200)
2280
- throw new Error(`Graph query service polling returned an error: ${f.httpStatus}`, {
2281
- cause: f.data
2301
+ if (h.httpStatus !== 200)
2302
+ throw new Error(`Graph query service polling returned an error: ${h.httpStatus}`, {
2303
+ cause: h.data
2282
2304
  });
2283
- if (f.data.context?.kind) {
2284
- if (f.data.context.kind !== "GraphQueryGenerationResponse")
2285
- throw new Error(`Unexpected response from graph query service polling. Message: ${f.data.message}`, {
2286
- cause: f.data
2305
+ if (h.data.context?.kind) {
2306
+ if (h.data.context.kind !== "GraphQueryGenerationResponse")
2307
+ throw new Error(`Unexpected response from graph query service polling. Message: ${h.data.message}`, {
2308
+ cause: h.data
2287
2309
  });
2288
- p = f.data.context.graphQuery, m = f.data.message || "", c = !0;
2289
- } else if (!f.data.hasMore)
2310
+ p = h.data.context.graphQuery, m = h.data.message || "", c = !0;
2311
+ } else if (!h.data.hasMore)
2290
2312
  c = !0;
2291
2313
  else if (Date.now() - u > 6e4)
2292
2314
  throw new Error("Graph query service polling timed out after 1 minute.");
2293
- d = f.data.sequenceNumber;
2315
+ d = h.data.sequenceNumber;
2294
2316
  }
2295
2317
  return { graphQuery: p, explanation: m };
2296
2318
  }
2297
- function to(e, t) {
2298
- z(e, (r) => {
2319
+ function oo(e, t) {
2320
+ D(e, (r) => {
2299
2321
  t.set(`${r.typeName}__${r.id}`, {
2300
2322
  id: r.id,
2301
2323
  typeName: r.typeName
2302
2324
  });
2303
2325
  });
2304
2326
  }
2305
- function z(e, t) {
2327
+ function D(e, t) {
2306
2328
  if (!(!e || typeof e != "object")) {
2307
- if (ao(e))
2329
+ if (io(e))
2308
2330
  for (const r of e.path)
2309
- z(r, t);
2310
- else if (ro(e))
2331
+ D(r, t);
2332
+ else if (no(e))
2311
2333
  t(e);
2312
2334
  else if (Array.isArray(e))
2313
2335
  for (const r of e)
2314
- z(r, t);
2315
- else if (oo(e))
2336
+ D(r, t);
2337
+ else if (so(e))
2316
2338
  for (const r of Object.values(e.properties ?? {}))
2317
- z(r, t);
2339
+ D(r, t);
2318
2340
  }
2319
2341
  }
2320
- function ro(e) {
2342
+ function no(e) {
2321
2343
  return !e || typeof e != "object" || Array.isArray(e) ? !1 : "id" in e && "typeName" in e;
2322
2344
  }
2323
- function ao(e) {
2345
+ function io(e) {
2324
2346
  return !e || typeof e != "object" || Array.isArray(e) ? !1 : e && "path" in e && Array.isArray(e.path);
2325
2347
  }
2326
- function oo(e) {
2348
+ function so(e) {
2327
2349
  return !e || typeof e != "object" || Array.isArray(e) || "id" in e ? !1 : "properties" in e && typeof e.properties == "object";
2328
2350
  }
2329
- function no(e, t) {
2351
+ function lo(e, t) {
2330
2352
  const r = [], a = [], o = [
2331
2353
  [t.dataModel.entityTypes, r],
2332
2354
  [t.dataModel.relationshipTypes, a]
@@ -2338,7 +2360,7 @@ function no(e, t) {
2338
2360
  }
2339
2361
  return { entityIds: r, relationshipIds: a };
2340
2362
  }
2341
- function io(e, t) {
2363
+ function co(e, t) {
2342
2364
  const r = { entityIds: new Array(), relationshipIds: new Array() }, a = [], n = e?.allLayers.find((c) => c.type === "knowledge-graph")?.inclusionModeDefinition;
2343
2365
  if (!n)
2344
2366
  return { allNamedTypesFullyDynamic: !0, bindParameters: r, nonDynamicTypes: a };
@@ -2362,7 +2384,7 @@ function io(e, t) {
2362
2384
  }
2363
2385
  return { allNamedTypesFullyDynamic: i, bindParameters: r, nonDynamicTypes: a };
2364
2386
  }
2365
- const D = 3;
2387
+ const z = 3;
2366
2388
  function ke(e, t = 100) {
2367
2389
  const r = {};
2368
2390
  for (const a of Object.entries(e.properties ?? {})) {
@@ -2374,7 +2396,7 @@ function ke(e, t = 100) {
2374
2396
  function P(e) {
2375
2397
  return typeof e != "object" || e === null ? String(e) : "details" in e && typeof e.details == "object" && e.details !== null && "errorMessage" in e.details && typeof e.details.errorMessage == "string" ? e.details.errorMessage : "message" in e && typeof e.message == "string" ? e.message : String(e);
2376
2398
  }
2377
- const so = async ({
2399
+ const uo = async ({
2378
2400
  kg: e,
2379
2401
  queryParams: t,
2380
2402
  targetStructure: r,
@@ -2389,19 +2411,19 @@ const so = async ({
2389
2411
  };
2390
2412
  d && (d.aborted ? u.abort(d.reason) : d.addEventListener("abort", p, { once: !0 }));
2391
2413
  try {
2392
- const m = await yt(e, t, o);
2414
+ const m = await ft(e, t, o);
2393
2415
  i = m.resultHeader;
2394
- const y = m.resultRowsStream.getReader();
2395
- let f = 0;
2396
- const h = Date.now(), w = !1;
2416
+ const w = m.resultRowsStream.getReader();
2417
+ let h = 0;
2418
+ const y = Date.now(), g = !1;
2397
2419
  for (; ; ) {
2398
- const { done: b, value: v } = await y.read();
2420
+ const { done: b, value: v } = await w.read();
2399
2421
  if (b)
2400
2422
  break;
2401
- if (!w && l && Date.now() - h > l)
2423
+ if (!g && l && Date.now() - y > l)
2402
2424
  return u.abort(), { type: "timeout" };
2403
2425
  for (const S of v) {
2404
- if (f++, n && f > n)
2426
+ if (h++, n && h > n)
2405
2427
  return u.abort(), { type: "success", rowLimitReached: !0, resultHeader: i, processedResult: c };
2406
2428
  c = a(c, S);
2407
2429
  }
@@ -2413,7 +2435,7 @@ const so = async ({
2413
2435
  }
2414
2436
  return { type: "success", rowLimitReached: !1, resultHeader: i, processedResult: c };
2415
2437
  };
2416
- async function Ne({
2438
+ async function qe({
2417
2439
  prompt: e,
2418
2440
  bindParameters: t,
2419
2441
  kg: r,
@@ -2426,15 +2448,15 @@ async function Ne({
2426
2448
  config: u
2427
2449
  }) {
2428
2450
  let d;
2429
- for (let p = 1; p <= D; p++) {
2451
+ for (let p = 1; p <= z; p++) {
2430
2452
  let m;
2431
2453
  try {
2432
2454
  m = await de(e, r.dataModel, a, u, d);
2433
- } catch (h) {
2455
+ } catch (g) {
2434
2456
  return {
2435
2457
  type: "generation-error",
2436
- errorMessage: P(h),
2437
- error: h
2458
+ errorMessage: P(g),
2459
+ error: g
2438
2460
  };
2439
2461
  }
2440
2462
  await x(
@@ -2443,61 +2465,71 @@ async function Ne({
2443
2465
  },
2444
2466
  u
2445
2467
  );
2446
- const y = await so({
2468
+ const w = await po(m.graphQuery, t), h = await uo({
2447
2469
  kg: r,
2448
2470
  queryParams: new ve({
2449
2471
  openCypherQuery: m.graphQuery,
2450
- bindParameters: t
2472
+ bindParameters: w
2451
2473
  }),
2452
2474
  targetStructure: o,
2453
2475
  targetStructureReducer: n,
2454
2476
  requestOptions: l,
2455
2477
  queryRowLimit: i,
2456
2478
  queryTimeoutMs: c
2457
- }), f = y.type === "aborted" ? "Query execution was aborted." : y.type === "timeout" ? "Query execution timed out." : y.type === "error" ? `Query failed with error: ${y.errorMessage}` : "";
2458
- if (y.type === "success")
2479
+ }), y = h.type === "aborted" ? "Query execution was aborted." : h.type === "timeout" ? "Query execution timed out." : h.type === "error" ? `Query failed with error: ${h.errorMessage}` : "";
2480
+ if (h.type === "success")
2459
2481
  return {
2460
2482
  type: "success",
2461
2483
  graphQuery: m.graphQuery,
2462
2484
  explanation: m.explanation,
2463
- rowLimitReached: y.rowLimitReached,
2464
- resultHeader: y.resultHeader,
2465
- processedResult: y.processedResult
2485
+ rowLimitReached: h.rowLimitReached,
2486
+ resultHeader: h.resultHeader,
2487
+ processedResult: h.processedResult
2466
2488
  };
2467
- if (y.type === "aborted")
2489
+ if (h.type === "aborted")
2468
2490
  return {
2469
2491
  type: "aborted",
2470
- errorMessage: f,
2492
+ errorMessage: y,
2471
2493
  graphQuery: m.graphQuery,
2472
2494
  explanation: m.explanation
2473
2495
  };
2474
- if (p >= D)
2475
- return y.type === "timeout" ? {
2496
+ if (p >= z)
2497
+ return h.type === "timeout" ? {
2476
2498
  type: "timeout",
2477
- errorMessage: f,
2499
+ errorMessage: y,
2478
2500
  graphQuery: m.graphQuery,
2479
2501
  explanation: m.explanation
2480
2502
  } : {
2481
2503
  type: "execution-error",
2482
- errorMessage: f,
2483
- error: y.error,
2504
+ errorMessage: y,
2505
+ error: h.error,
2484
2506
  graphQuery: m.graphQuery,
2485
2507
  explanation: m.explanation
2486
2508
  };
2487
2509
  d = {
2488
2510
  failedGraphQuery: m.graphQuery,
2489
- executionError: f,
2511
+ executionError: y,
2490
2512
  attemptCount: p
2491
2513
  }, await x(
2492
- { text: `Attempt ${p} failed with error: ${f}. Retrying...` },
2514
+ { text: `Attempt ${p} failed with error: ${y}. Retrying...` },
2493
2515
  u
2494
2516
  );
2495
2517
  }
2496
2518
  throw new Error(
2497
- `Failed to execute generated cypher due to an unexpected error after ${D} attempts.`
2519
+ `Failed to execute generated cypher due to an unexpected error after ${z} attempts.`
2498
2520
  );
2499
2521
  }
2500
- const lo = async ({
2522
+ const po = async (e, t) => {
2523
+ if (!t)
2524
+ return {};
2525
+ const { bindParameters: r, parseErrors: a } = await bt(e);
2526
+ if (a)
2527
+ return t;
2528
+ const o = {};
2529
+ for (const n of r)
2530
+ n in t && (o[n] = t[n]);
2531
+ return o;
2532
+ }, mo = async ({
2501
2533
  kg: e,
2502
2534
  searchQuery: t,
2503
2535
  typeCategoryFilter: r,
@@ -2514,9 +2546,9 @@ const lo = async ({
2514
2546
  const d = c - l.length;
2515
2547
  if (d <= 0)
2516
2548
  break;
2517
- const y = (await ft(
2549
+ const w = (await gt(
2518
2550
  e,
2519
- new gt({
2551
+ new wt({
2520
2552
  searchQuery: t,
2521
2553
  typeCategoryFilter: u,
2522
2554
  namedTypesFilter: a ?? void 0,
@@ -2524,14 +2556,14 @@ const lo = async ({
2524
2556
  }),
2525
2557
  n
2526
2558
  )).resultRowsStream.getReader();
2527
- let f = !1;
2528
- for (; !f; ) {
2529
- const { done: h, value: w } = await y.read();
2530
- if (h) {
2531
- f = !0;
2559
+ let h = !1;
2560
+ for (; !h; ) {
2561
+ const { done: y, value: g } = await w.read();
2562
+ if (y) {
2563
+ h = !0;
2532
2564
  break;
2533
2565
  }
2534
- for (const b of w)
2566
+ for (const b of g)
2535
2567
  for (const v of b)
2536
2568
  l.push(v);
2537
2569
  }
@@ -2548,16 +2580,16 @@ const lo = async ({
2548
2580
  type: "success",
2549
2581
  results: l
2550
2582
  };
2551
- }, qe = "IMPORTANT: The generated cypher query must return entire entities and relationships ONLY.";
2552
- async function Ie({
2583
+ }, Ie = "IMPORTANT: The generated cypher query must return entire entities and relationships ONLY.";
2584
+ async function De({
2553
2585
  prompt: e,
2554
2586
  view: t,
2555
2587
  knowledgeGraph: r,
2556
2588
  includeReturnEntityAndRelationshipContext: a = !1
2557
2589
  }) {
2558
2590
  const o = [e];
2559
- if (a && o.push(qe), !q(t) && t.map) {
2560
- const d = await B("arcgis_knowledge_current_lc_context"), p = no(t.map, r);
2591
+ if (a && o.push(Ie), !q(t) && t.map) {
2592
+ const d = await B("arcgis_knowledge_current_lc_context"), p = lo(t.map, r);
2561
2593
  return o.push(d), {
2562
2594
  enhancedPrompt: o.join(`
2563
2595
 
@@ -2566,7 +2598,7 @@ async function Ie({
2566
2598
  allNamedTypesFullyDynamic: !1
2567
2599
  };
2568
2600
  }
2569
- const n = t.map, { allNamedTypesFullyDynamic: l, bindParameters: i, nonDynamicTypes: c } = io(
2601
+ const n = t.map, { allNamedTypesFullyDynamic: l, bindParameters: i, nonDynamicTypes: c } = co(
2570
2602
  n,
2571
2603
  r
2572
2604
  );
@@ -2590,20 +2622,20 @@ async function Ie({
2590
2622
  allNamedTypesFullyDynamic: l
2591
2623
  };
2592
2624
  }
2593
- async function co(e, t, r, a, o, n) {
2594
- const { view: l } = o, i = await Ne({
2625
+ async function ho(e, t, r, a, o, n) {
2626
+ const { view: l } = o, i = await qe({
2595
2627
  prompt: e,
2596
2628
  bindParameters: t,
2597
2629
  kg: r,
2598
2630
  graphQueryServiceUrl: a,
2599
2631
  targetStructure: /* @__PURE__ */ new Map(),
2600
- targetStructureReducer: (m, y) => {
2601
- for (const f of y)
2602
- to(f, m);
2632
+ targetStructureReducer: (m, w) => {
2633
+ for (const h of w)
2634
+ oo(h, m);
2603
2635
  return m;
2604
2636
  },
2605
2637
  requestOptions: {
2606
- signal: Y(n),
2638
+ signal: Z(n),
2607
2639
  timeout: n?.timeout
2608
2640
  },
2609
2641
  config: n
@@ -2618,20 +2650,20 @@ async function co(e, t, r, a, o, n) {
2618
2650
  text: `Query Results parsed into ${p.length} unique relationships and entities. Atempting to add to link chart...`
2619
2651
  },
2620
2652
  n
2621
- ), !q(l) && l?.map ? (await l.map.addRecords(p), await Z(l), { generatedQuery: c, explanation: u, addedIdTypePairs: p }) : (await l?.map?.allLayers.find(
2622
- (y) => y.type === "knowledge-graph"
2653
+ ), !q(l) && l?.map ? (await l.map.addRecords(p), await Y(l), { generatedQuery: c, explanation: u, addedIdTypePairs: p }) : (await l?.map?.allLayers.find(
2654
+ (w) => w.type === "knowledge-graph"
2623
2655
  )?.addRecords(p), { generatedQuery: c, explanation: u, addedIdTypePairs: p });
2624
2656
  }
2625
- const W = "addRecords", uo = s.object({
2657
+ const W = "addRecords", yo = s.object({
2626
2658
  prompt: s.string().describe(
2627
2659
  "The user's inquiry and context required in order to generate a cypher query that will be used to add records to the link chart."
2628
2660
  )
2629
- }), po = async ({ prompt: e }, t) => {
2630
- const { knowledgeGraph: r } = await M(t), a = O(t), { view: o } = a, l = k.getDefault().helperServices, {
2661
+ }), fo = async ({ prompt: e }, t) => {
2662
+ const { knowledgeGraph: r } = await M(t), a = O(t), { view: o } = a, l = N.getDefault().helperServices, {
2631
2663
  enhancedPrompt: i,
2632
2664
  bindParameters: c,
2633
2665
  allNamedTypesFullyDynamic: u
2634
- } = await Ie({
2666
+ } = await De({
2635
2667
  prompt: e,
2636
2668
  view: o,
2637
2669
  knowledgeGraph: r,
@@ -2649,7 +2681,7 @@ const W = "addRecords", uo = s.object({
2649
2681
  }
2650
2682
  };
2651
2683
  try {
2652
- const { generatedQuery: d, explanation: p, addedIdTypePairs: m } = await co(
2684
+ const { generatedQuery: d, explanation: p, addedIdTypePairs: m } = await ho(
2653
2685
  i,
2654
2686
  c,
2655
2687
  r,
@@ -2678,7 +2710,7 @@ Number of records added: ${m.length}`,
2678
2710
  error: d
2679
2711
  };
2680
2712
  }
2681
- }, oi = g(po, {
2713
+ }, ci = f(fo, {
2682
2714
  name: W,
2683
2715
  description: `Adds records (entities or relationships) to the current link chart visualization from an inquiry into the knowledge graph data. The inquiry will retrieve data from the graph database that will serve as the basis for the records to be added to the link chart. The user should have explicitly requested to add records to the current link chart from their prompt. "add to new link chart" is not a valid prompt for this tool.
2684
2716
 
@@ -2691,12 +2723,12 @@ Number of records added: ${m.length}`,
2691
2723
  - "connect company x and company y"
2692
2724
  - "connect all buildings on the link chart"
2693
2725
  `,
2694
- schema: uo
2726
+ schema: yo
2695
2727
  });
2696
- async function mo(e, t) {
2697
- return await t.map?.applyLayout(e), await Z(t), { appliedLayout: e };
2728
+ async function go(e, t) {
2729
+ return await t.map?.applyLayout(e), await Y(t), { appliedLayout: e };
2698
2730
  }
2699
- const re = "applyLayout", ho = s.object({
2731
+ const re = "applyLayout", wo = s.object({
2700
2732
  layout: s.enum([
2701
2733
  "organic-standard",
2702
2734
  "organic-community",
@@ -2710,7 +2742,7 @@ const re = "applyLayout", ho = s.object({
2710
2742
  ]).describe(
2711
2743
  "The layout mode to apply to the link chart. The value must be one of the following: organic-standard, organic-community, basic-grid, hierarchical-bottom-to-top, radial-root-centric, tree-left-to-right, geographic-organic-standard, chronological-mono-timeline, chronological-multi-timeline"
2712
2744
  )
2713
- }), yo = async ({ layout: e }, t) => {
2745
+ }), bo = async ({ layout: e }, t) => {
2714
2746
  const { view: r } = O(t);
2715
2747
  if (q(r))
2716
2748
  return {
@@ -2720,7 +2752,7 @@ const re = "applyLayout", ho = s.object({
2720
2752
  error: new Error()
2721
2753
  };
2722
2754
  {
2723
- const { appliedLayout: a } = await mo(e, r);
2755
+ const { appliedLayout: a } = await go(e, r);
2724
2756
  return {
2725
2757
  toolName: re,
2726
2758
  status: "success",
@@ -2730,17 +2762,17 @@ const re = "applyLayout", ho = s.object({
2730
2762
  }
2731
2763
  };
2732
2764
  }
2733
- }, ni = g(yo, {
2765
+ }, ui = f(bo, {
2734
2766
  name: re,
2735
2767
  description: "Apply a diagram layout to the link chart",
2736
- schema: ho
2768
+ schema: wo
2737
2769
  });
2738
- async function fo(e, t) {
2739
- return t.map?.changeNonspatialDataDisplay(e), await Z(t), { appliedNonspatialDataDisplayMode: e };
2770
+ async function To(e, t) {
2771
+ return t.map?.changeNonspatialDataDisplay(e), await Y(t), { appliedNonspatialDataDisplayMode: e };
2740
2772
  }
2741
- const ae = "changeNonspatialVisibility", go = s.object({
2773
+ const ae = "changeNonspatialVisibility", So = s.object({
2742
2774
  setting: s.enum(["hidden", "visible"]).describe("The setting of nonspatial visibility")
2743
- }), wo = async ({ setting: e }, t) => {
2775
+ }), vo = async ({ setting: e }, t) => {
2744
2776
  const { view: r } = O(t);
2745
2777
  if (q(r))
2746
2778
  return {
@@ -2750,7 +2782,7 @@ const ae = "changeNonspatialVisibility", go = s.object({
2750
2782
  error: new Error()
2751
2783
  };
2752
2784
  {
2753
- const { appliedNonspatialDataDisplayMode: a } = await fo(e, r);
2785
+ const { appliedNonspatialDataDisplayMode: a } = await To(e, r);
2754
2786
  return {
2755
2787
  toolName: ae,
2756
2788
  status: "success",
@@ -2760,14 +2792,14 @@ const ae = "changeNonspatialVisibility", go = s.object({
2760
2792
  }
2761
2793
  };
2762
2794
  }
2763
- }, ii = g(wo, {
2795
+ }, di = f(vo, {
2764
2796
  name: ae,
2765
2797
  description: "Change whether or not nonspatial data is visible in the link chart. The value must be either 'hidden' or 'visible'.",
2766
- schema: go
2798
+ schema: So
2767
2799
  });
2768
- async function bo(e, t, r, a, o) {
2800
+ async function xo(e, t, r, a, o) {
2769
2801
  let n, l = "";
2770
- for (let i = 1; i <= D; i++) {
2802
+ for (let i = 1; i <= z; i++) {
2771
2803
  const { graphQuery: c, explanation: u } = await de(
2772
2804
  e,
2773
2805
  t.dataModel,
@@ -2777,7 +2809,7 @@ async function bo(e, t, r, a, o) {
2777
2809
  );
2778
2810
  try {
2779
2811
  await x({ text: `Attempting to create link chart from derived query: ${c}` }, o);
2780
- const d = await ht.fromCypherQuery(
2812
+ const d = await yt.fromCypherQuery(
2781
2813
  t,
2782
2814
  new ve({
2783
2815
  openCypherQuery: c
@@ -2785,20 +2817,20 @@ async function bo(e, t, r, a, o) {
2785
2817
  );
2786
2818
  await x({ text: "Link chart created successfully, loading..." }, o), await d.load();
2787
2819
  const p = a.map;
2788
- return a.map = d, await a.when(), await Ae.whenOnce(() => !a.updating), d.entityCount === 0 && d.relationshipCount === 0 ? (a.map === d && (a.map = p), d.destroy(), {
2820
+ return a.map = d, await a.when(), await Le.whenOnce(() => !a.updating), d.entityCount === 0 && d.relationshipCount === 0 ? (a.map === d && (a.map = p), d.destroy(), {
2789
2821
  type: "error",
2790
2822
  errorMessage: `Query returned no results. Cypher Query used to create the link chart:
2791
2823
  ${c}
2792
2824
 
2793
2825
  Explanation: ${u}`
2794
- }) : (await Z(a), {
2826
+ }) : (await Y(a), {
2795
2827
  type: "success",
2796
2828
  graphQuery: c,
2797
2829
  explanation: u
2798
2830
  });
2799
2831
  } catch (d) {
2800
2832
  const p = P(d);
2801
- if (i >= D) {
2833
+ if (i >= z) {
2802
2834
  l = p;
2803
2835
  break;
2804
2836
  }
@@ -2814,14 +2846,14 @@ Explanation: ${u}`
2814
2846
  }
2815
2847
  return {
2816
2848
  type: "error",
2817
- errorMessage: `Failed to create link chart after ${D} attempts. Last error: ${l}`
2849
+ errorMessage: `Failed to create link chart after ${z} attempts. Last error: ${l}`
2818
2850
  };
2819
2851
  }
2820
- const V = "createLinkChart", To = s.object({
2852
+ const V = "createLinkChart", Ro = s.object({
2821
2853
  prompt: s.string().describe(
2822
2854
  "The user's inquiry and context required in order to generate a cypher query that will be used to create a link chart visualization. Only include information relevant to generating a cypher query. Do not suggest entity types, relationship types or properties. Do not include limits or formatting instructions for the query results unless specifically requested by the user. The prompt should be focused on the data the user wants to see in the link chart, not how to generate it."
2823
2855
  )
2824
- }), So = async ({ prompt: e }, t) => {
2856
+ }), $o = async ({ prompt: e }, t) => {
2825
2857
  const { knowledgeGraph: r } = await M(t), { view: a } = O(t);
2826
2858
  if (q(a))
2827
2859
  return {
@@ -2831,10 +2863,10 @@ const V = "createLinkChart", To = s.object({
2831
2863
  error: new Error()
2832
2864
  };
2833
2865
  {
2834
- const n = k.getDefault().helperServices, l = await bo(
2866
+ const n = N.getDefault().helperServices, l = await xo(
2835
2867
  `${e}
2836
2868
 
2837
- ${qe}`,
2869
+ ${Ie}`,
2838
2870
  r,
2839
2871
  `${n.aiAssistantServices.url}${n.aiAssistantServices.graphQueryAssistant}`,
2840
2872
  a,
@@ -2861,57 +2893,57 @@ Explanation: ${c}`,
2861
2893
  }
2862
2894
  };
2863
2895
  }
2864
- }, si = g(So, {
2896
+ }, pi = f($o, {
2865
2897
  name: V,
2866
2898
  description: "Creates a new link chart visualization from an inquiry into the knowledge graph data. The inquiry will retrieve data from the graph database that will serve as the basis for the new link chart. The user should have explicitly requested the creation of a new link chart from their prompt using language like 'create new link chart' or 'add to new link chart'.",
2867
- schema: To
2868
- }), oe = "queryGraphData", vo = s.object({
2899
+ schema: Ro
2900
+ }), oe = "queryGraphData", Co = s.object({
2869
2901
  prompt: s.string().describe(
2870
2902
  "The user's inquiry into the knowledge graph, from which a cypher query will be generated and executed to answer the inquiry. Only include entity types, relationship types or properties if they are provided in the user prompt or prior steps. Do not suggest entity types, relationship types or properties. Do not include limits, information on what to return, instructions on how to write the query, or formatting instructions for the query results unless specifically requested by the user."
2871
2903
  )
2872
- }), xo = async ({ prompt: e }, t) => {
2873
- const { knowledgeGraph: r } = await M(t), o = k.getDefault().helperServices;
2904
+ }), Eo = async ({ prompt: e }, t) => {
2905
+ const { knowledgeGraph: r } = await M(t), o = N.getDefault().helperServices;
2874
2906
  let n = e, l = null, i = null;
2875
2907
  try {
2876
2908
  ({ view: i } = O(t));
2877
2909
  } catch {
2878
2910
  }
2879
- i && ({ enhancedPrompt: n, bindParameters: l } = await Ie({
2911
+ i && ({ enhancedPrompt: n, bindParameters: l } = await De({
2880
2912
  prompt: e,
2881
2913
  view: i,
2882
2914
  knowledgeGraph: r,
2883
2915
  includeReturnEntityAndRelationshipContext: !1
2884
2916
  }));
2885
- const c = await Ne({
2917
+ const c = await qe({
2886
2918
  prompt: n,
2887
2919
  bindParameters: l,
2888
2920
  kg: r,
2889
2921
  graphQueryServiceUrl: `${o.aiAssistantServices.url}${o.aiAssistantServices.graphQueryAssistant}`,
2890
2922
  targetStructure: new Array(),
2891
- targetStructureReducer: (w, b) => (w.push(b), w),
2923
+ targetStructureReducer: (g, b) => (g.push(b), g),
2892
2924
  requestOptions: {
2893
- signal: Y(t),
2925
+ signal: Z(t),
2894
2926
  timeout: t?.timeout
2895
2927
  },
2896
2928
  config: t
2897
2929
  });
2898
2930
  if (c.type !== "success") {
2899
- const w = c.type === "generation-error" ? c.errorMessage : `${c.errorMessage} Cypher query: ${c.graphQuery}`;
2931
+ const g = c.type === "generation-error" ? c.errorMessage : `${c.errorMessage} Cypher query: ${c.graphQuery}`;
2900
2932
  return {
2901
2933
  toolName: oe,
2902
2934
  status: "error",
2903
- errorMessage: `Failed to query the knowledge graph. ${w}`,
2935
+ errorMessage: `Failed to query the knowledge graph. ${g}`,
2904
2936
  error: "error" in c ? c.error : null
2905
2937
  };
2906
2938
  }
2907
- const { graphQuery: u, explanation: d, processedResult: p, resultHeader: m } = c, y = m.headerKeys;
2908
- for (const w of p)
2909
- for (const b of w)
2910
- z(
2939
+ const { graphQuery: u, explanation: d, processedResult: p, resultHeader: m } = c, w = m.headerKeys;
2940
+ for (const g of p)
2941
+ for (const b of g)
2942
+ D(
2911
2943
  b,
2912
2944
  (v) => ke(v)
2913
2945
  );
2914
- const f = 50, h = p.slice(0, f).map((w) => JSON.stringify(w));
2946
+ const h = 50, y = p.slice(0, h).map((g) => JSON.stringify(g));
2915
2947
  return {
2916
2948
  toolName: oe,
2917
2949
  status: "success",
@@ -2922,15 +2954,15 @@ ${u}
2922
2954
  \`\`\`
2923
2955
 
2924
2956
  Query Results:
2925
- ${h.length} result(s) found.
2957
+ ${y.length} result(s) found.
2926
2958
 
2927
- Column Headers: ${y.join(", ")}
2959
+ Column Headers: ${w.join(", ")}
2928
2960
 
2929
- ${h.length > f ? `Showing top ${f} results:
2961
+ ${y.length > h ? `Showing top ${h} results:
2930
2962
 
2931
2963
  ` : `Results:
2932
2964
 
2933
- `}${h.join(`
2965
+ `}${y.join(`
2934
2966
  `)}
2935
2967
  `,
2936
2968
  details: {
@@ -2940,16 +2972,16 @@ ${h.length > f ? `Showing top ${f} results:
2940
2972
  queryResults: p
2941
2973
  }
2942
2974
  };
2943
- }, li = g(xo, {
2975
+ }, mi = f(Eo, {
2944
2976
  name: oe,
2945
2977
  description: "Allows users to explore the data in their knowledge graph via cypher query. Generates and executes a cypher query based on the user's inquiry into the knowledge graph, and displays the results in the chat pane without modifying the user's link chart if any. Use this tool when the user is asking an exploratory question about their data as a whole that can be answered via cypher query, for example 'What are the top 5 suppliers by total parts cost?' or 'How many employees do we have in each department?'.",
2946
- schema: vo
2947
- }), ne = "generateCypher", Ro = s.object({
2978
+ schema: Co
2979
+ }), ne = "generateCypher", Fo = s.object({
2948
2980
  prompt: s.string().describe("The user's inquiry into the knowledge graph that needs to be translated into a cypher query.")
2949
- }), $o = async ({ prompt: e }, t) => {
2950
- const { knowledgeGraph: r } = await M(t), o = k.getDefault().helperServices;
2981
+ }), No = async ({ prompt: e }, t) => {
2982
+ const { knowledgeGraph: r } = await M(t), o = N.getDefault().helperServices;
2951
2983
  try {
2952
- const { graphQuery: n, explanation: l } = await eo(
2984
+ const { graphQuery: n, explanation: l } = await ao(
2953
2985
  e,
2954
2986
  r.dataModel,
2955
2987
  `${o.aiAssistantServices.url}${o.aiAssistantServices.graphQueryAssistant}`,
@@ -2976,11 +3008,11 @@ Explanation: ${l}`,
2976
3008
  error: n
2977
3009
  };
2978
3010
  }
2979
- }, ci = g($o, {
3011
+ }, hi = f(No, {
2980
3012
  name: ne,
2981
3013
  description: "Generates an Open Cypher query based on the user's prompt which represents an inquiry into the data of the knowledge service and its graph database, attempting to filter based on certain conditions and traverse specified relationships. The generated query should be syntactically correct and optimized for performance.",
2982
- schema: Ro
2983
- }), Co = (e) => {
3014
+ schema: Fo
3015
+ }), ko = (e) => {
2984
3016
  const t = e.dataModel, r = /* @__PURE__ */ new Map();
2985
3017
  for (const i of t.searchIndexes)
2986
3018
  if (i.supportedCategory !== "esriTypeMetaEntityProvenance")
@@ -2997,10 +3029,10 @@ ${o.map(({ name: i }) => `${i}: [${Array.from(r.get(i) ?? []).join(", ")}]`).joi
2997
3029
 
2998
3030
  ${l}`;
2999
3031
  };
3000
- async function Eo(e, t, r) {
3032
+ async function qo(e, t, r) {
3001
3033
  const a = await B("arcgis_knowledge_lucene_generation_prompt"), o = {
3002
3034
  inquiry: e,
3003
- dataModelForSearch: Co(t)
3035
+ dataModelForSearch: ko(t)
3004
3036
  }, n = s.enum(["entity", "relationship", "both"]).describe("The graph element category to search against - entity, relationship, or both"), l = s.number().int().positive().nullable().describe(
3005
3037
  "The maximum number of search results to return. Default to 10 if not specified by the user, or set to null if the user specifically requests no limits or all results."
3006
3038
  ), i = s.array(
@@ -3015,30 +3047,30 @@ async function Eo(e, t, r) {
3015
3047
  typeCategoryFilter: n,
3016
3048
  resultLimit: l
3017
3049
  });
3018
- return await Pe({
3050
+ return await Ae({
3019
3051
  promptText: a,
3020
3052
  inputVariables: o,
3021
3053
  schema: c,
3022
3054
  config: r
3023
3055
  });
3024
3056
  }
3025
- const ie = "searchGraphData", Fo = s.object({
3057
+ const ie = "searchGraphData", Io = s.object({
3026
3058
  prompt: s.string().describe(
3027
3059
  "The user's inquiry into the knowledge graph, from which a lucene search query will be generated and executed against the graph to return relevant results."
3028
3060
  )
3029
- }), ko = async ({ prompt: e }, t) => {
3061
+ }), Do = async ({ prompt: e }, t) => {
3030
3062
  const { knowledgeGraph: r } = await M(t);
3031
3063
  await x({ text: "Generating search query for the user inquiry" }, t);
3032
- const a = await Eo(e, r, t);
3064
+ const a = await qo(e, r, t);
3033
3065
  await x({ text: "Executing graph search with generated search query" }, t);
3034
- const o = await lo({
3066
+ const o = await mo({
3035
3067
  kg: r,
3036
3068
  searchQuery: a.query,
3037
3069
  typeCategoryFilter: a.typeCategoryFilter,
3038
3070
  namedTypesFilter: a.typeFilters,
3039
3071
  searchResultLimit: a.resultLimit,
3040
3072
  requestOptions: {
3041
- signal: Y(t),
3073
+ signal: Z(t),
3042
3074
  timeout: t?.timeout
3043
3075
  }
3044
3076
  });
@@ -3050,7 +3082,7 @@ const ie = "searchGraphData", Fo = s.object({
3050
3082
  error: "error" in o ? o.error : null
3051
3083
  };
3052
3084
  for (const i of o.results)
3053
- z(
3085
+ D(
3054
3086
  i,
3055
3087
  (c) => ke(c)
3056
3088
  );
@@ -3075,7 +3107,7 @@ const ie = "searchGraphData", Fo = s.object({
3075
3107
  searchResults: o.results
3076
3108
  }
3077
3109
  };
3078
- }, ui = g(ko, {
3110
+ }, yi = f(Do, {
3079
3111
  name: ie,
3080
3112
  description: `
3081
3113
  Search the knowledge graph using one or more search texts, using lucene search syntax, against indexed string properties defined on their entities and relationships. Use this tool when the user asks a question about their knowledge graph data as a whole, that could be answered via lucene text search of properties stored on graph elements, e.g requiring fuzzy matching. Otherwise if the inquiry is looking for connected records (e.g. paths), data aggregations, etc explore the data via the queryGraphData tool.
@@ -3087,53 +3119,53 @@ const ie = "searchGraphData", Fo = s.object({
3087
3119
  - "Find all reports authored by someone with the title of 'Researcher'"
3088
3120
  - "Find the first 5 reports where summary mentions flood zoning near Sacramento, and the organization name is the City of Sacramento Utilities, and tags containing stormwater".
3089
3121
  - "Search for all john smiths and show their global ids`,
3090
- schema: Fo
3122
+ schema: Io
3091
3123
  });
3092
3124
  export {
3093
- Gn as A,
3094
- On as B,
3095
- Mn as C,
3096
- Qn as D,
3097
- _n as E,
3098
- Wn as F,
3125
+ Wn as A,
3126
+ Vn as B,
3127
+ Bn as C,
3128
+ Un as D,
3129
+ Kn as E,
3130
+ Hn as F,
3099
3131
  ue as G,
3100
- ei as H,
3101
- Vn as I,
3102
- Bn as J,
3103
- Un as K,
3104
- Kn as L,
3105
- Hn as M,
3106
- En as N,
3107
- Zn as O,
3108
- Yn as P,
3109
- Wa as Q,
3110
- N as R,
3111
- Jn as S,
3112
- Xn as T,
3113
- ni as a,
3114
- ci as b,
3115
- ii as c,
3116
- si as d,
3117
- oi as e,
3132
+ ni as H,
3133
+ Jn as I,
3134
+ Yn as J,
3135
+ Zn as K,
3136
+ Xn as L,
3137
+ ei as M,
3138
+ In as N,
3139
+ ri as O,
3140
+ ai as P,
3141
+ Ua as Q,
3142
+ k as R,
3143
+ ti as S,
3144
+ oi as T,
3145
+ ui as a,
3146
+ hi as b,
3147
+ di as c,
3148
+ pi as d,
3149
+ ci as e,
3118
3150
  xe as f,
3119
3151
  B as g,
3120
- ai as h,
3152
+ li as h,
3121
3153
  M as i,
3122
- ri as j,
3123
- Fn as k,
3124
- ti as l,
3125
- kn as m,
3126
- Nn as n,
3127
- qn as o,
3128
- In as p,
3129
- li as q,
3130
- Ln as r,
3131
- ui as s,
3132
- Bt as t,
3133
- zn as u,
3134
- Dn as v,
3135
- Pn as w,
3136
- An as x,
3154
+ si as j,
3155
+ Dn as k,
3156
+ ii as l,
3157
+ zn as m,
3158
+ Pn as n,
3159
+ An as o,
3160
+ Ln as p,
3161
+ mi as q,
3162
+ Qn as r,
3163
+ yi as s,
3164
+ Kt as t,
3165
+ jn as u,
3166
+ Gn as v,
3167
+ On as w,
3168
+ Mn as x,
3137
3169
  C as y,
3138
- jn as z
3170
+ _n as z
3139
3171
  };