@arcgis/ai-components 5.0.0-next.133

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/LICENSE.md +17 -0
  2. package/README.md +11 -0
  3. package/dist/cdn/2KGO3SIH.js +4 -0
  4. package/dist/cdn/2OKOKVH3.js +4 -0
  5. package/dist/cdn/46CNQJRX.js +4 -0
  6. package/dist/cdn/7QPPUNQ3.js +4 -0
  7. package/dist/cdn/A3UHOE4Q.js +30 -0
  8. package/dist/cdn/A7BGJLHS.js +204 -0
  9. package/dist/cdn/AB32PU6M.js +4 -0
  10. package/dist/cdn/AD7WB3RO.js +4 -0
  11. package/dist/cdn/ASKBAWPQ.js +27 -0
  12. package/dist/cdn/BCCDWQP4.js +4 -0
  13. package/dist/cdn/CF42OIDB.js +4 -0
  14. package/dist/cdn/CGGGHCIN.js +4 -0
  15. package/dist/cdn/EJW7PCMD.js +4 -0
  16. package/dist/cdn/FORRN75L.js +4 -0
  17. package/dist/cdn/FYKWTA6C.js +58 -0
  18. package/dist/cdn/G7XEFTIR.js +4 -0
  19. package/dist/cdn/GRXZ64LO.js +20 -0
  20. package/dist/cdn/GZUY3255.js +61 -0
  21. package/dist/cdn/HPGCDT6I.js +4 -0
  22. package/dist/cdn/ID5STKZH.js +90 -0
  23. package/dist/cdn/J62NTCLN.js +4 -0
  24. package/dist/cdn/KMV7W5OL.js +4 -0
  25. package/dist/cdn/LILVLE37.js +87 -0
  26. package/dist/cdn/MXHQFIP3.js +19 -0
  27. package/dist/cdn/N4CYINOF.js +6 -0
  28. package/dist/cdn/NR6PK4OK.js +4 -0
  29. package/dist/cdn/PA2KCYKL.js +71 -0
  30. package/dist/cdn/PEFKT7JJ.js +4 -0
  31. package/dist/cdn/Q34AELDL.js +4 -0
  32. package/dist/cdn/Q3MKHRXI.js +4 -0
  33. package/dist/cdn/QIU4T2DV.js +4 -0
  34. package/dist/cdn/TCNLHL43.js +79 -0
  35. package/dist/cdn/UC4HPCM3.js +19 -0
  36. package/dist/cdn/UIUJKONY.js +4 -0
  37. package/dist/cdn/USJ5YVZN.js +16 -0
  38. package/dist/cdn/W4LEGPD2.js +111 -0
  39. package/dist/cdn/WOP5ENGJ.js +134 -0
  40. package/dist/cdn/YXLN5DSL.js +6 -0
  41. package/dist/cdn/ZQEX3TGK.js +17 -0
  42. package/dist/cdn/assets/assistant/t9n/messages.en.json +1 -0
  43. package/dist/cdn/assets/assistant-chat-card/t9n/messages.en.json +1 -0
  44. package/dist/cdn/assets/assistant-chat-entry/t9n/messages.en.json +1 -0
  45. package/dist/cdn/assets/assistant-interrupt/t9n/messages.en.json +1 -0
  46. package/dist/cdn/assets/assistant-shell/t9n/messages.en.json +1 -0
  47. package/dist/cdn/index.js +4 -0
  48. package/dist/cdn/main.css +1 -0
  49. package/dist/chunks/runtime.js +17 -0
  50. package/dist/chunks/useT9n.js +9 -0
  51. package/dist/chunks/utils.js +35 -0
  52. package/dist/chunks/utils2.js +9 -0
  53. package/dist/components/arcgis-assistant/customElement.d.ts +14 -0
  54. package/dist/components/arcgis-assistant/customElement.js +250 -0
  55. package/dist/components/arcgis-assistant/index.d.ts +5 -0
  56. package/dist/components/arcgis-assistant/index.js +5 -0
  57. package/dist/components/arcgis-assistant/support/OrchestratorController.d.ts +33 -0
  58. package/dist/components/arcgis-assistant/support/utils.d.ts +1 -0
  59. package/dist/components/arcgis-assistant-agent/customElement.d.ts +10 -0
  60. package/dist/components/arcgis-assistant-agent/customElement.js +21 -0
  61. package/dist/components/arcgis-assistant-agent/index.d.ts +1 -0
  62. package/dist/components/arcgis-assistant-agent/index.js +1 -0
  63. package/dist/components/arcgis-assistant-chat/customElement.d.ts +17 -0
  64. package/dist/components/arcgis-assistant-chat/customElement.js +47 -0
  65. package/dist/components/arcgis-assistant-chat/index.d.ts +2 -0
  66. package/dist/components/arcgis-assistant-chat/index.js +2 -0
  67. package/dist/components/arcgis-assistant-chat-card/customElement.d.ts +18 -0
  68. package/dist/components/arcgis-assistant-chat-card/customElement.js +55 -0
  69. package/dist/components/arcgis-assistant-chat-card/index.d.ts +6 -0
  70. package/dist/components/arcgis-assistant-chat-card/index.js +6 -0
  71. package/dist/components/arcgis-assistant-chat-card-content/customElement.d.ts +11 -0
  72. package/dist/components/arcgis-assistant-chat-card-content/customElement.js +42 -0
  73. package/dist/components/arcgis-assistant-chat-card-content/index.d.ts +2 -0
  74. package/dist/components/arcgis-assistant-chat-card-content/index.js +2 -0
  75. package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +19 -0
  76. package/dist/components/arcgis-assistant-chat-entry/customElement.js +46 -0
  77. package/dist/components/arcgis-assistant-chat-entry/index.d.ts +4 -0
  78. package/dist/components/arcgis-assistant-chat-entry/index.js +4 -0
  79. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.d.ts +7 -0
  80. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +28 -0
  81. package/dist/components/arcgis-assistant-data-exploration-agent/index.d.ts +1 -0
  82. package/dist/components/arcgis-assistant-data-exploration-agent/index.js +1 -0
  83. package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +14 -0
  84. package/dist/components/arcgis-assistant-interrupt/customElement.js +39 -0
  85. package/dist/components/arcgis-assistant-interrupt/index.d.ts +6 -0
  86. package/dist/components/arcgis-assistant-interrupt/index.js +6 -0
  87. package/dist/components/arcgis-assistant-layer-filter-agent/customElement.d.ts +7 -0
  88. package/dist/components/arcgis-assistant-layer-filter-agent/customElement.js +28 -0
  89. package/dist/components/arcgis-assistant-layer-filter-agent/index.d.ts +1 -0
  90. package/dist/components/arcgis-assistant-layer-filter-agent/index.js +1 -0
  91. package/dist/components/arcgis-assistant-layer-query-agent/customElement.d.ts +7 -0
  92. package/dist/components/arcgis-assistant-layer-query-agent/customElement.js +28 -0
  93. package/dist/components/arcgis-assistant-layer-query-agent/index.d.ts +1 -0
  94. package/dist/components/arcgis-assistant-layer-query-agent/index.js +1 -0
  95. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.d.ts +7 -0
  96. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +28 -0
  97. package/dist/components/arcgis-assistant-layer-styling-agent/index.d.ts +1 -0
  98. package/dist/components/arcgis-assistant-layer-styling-agent/index.js +1 -0
  99. package/dist/components/arcgis-assistant-navigation-agent/customElement.d.ts +7 -0
  100. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +28 -0
  101. package/dist/components/arcgis-assistant-navigation-agent/index.d.ts +1 -0
  102. package/dist/components/arcgis-assistant-navigation-agent/index.js +1 -0
  103. package/dist/components/arcgis-assistant-shell/customElement.d.ts +25 -0
  104. package/dist/components/arcgis-assistant-shell/customElement.js +29 -0
  105. package/dist/components/arcgis-assistant-shell/index.d.ts +6 -0
  106. package/dist/components/arcgis-assistant-shell/index.js +6 -0
  107. package/dist/components/assistant/assistant-agents/support/utils.d.ts +14 -0
  108. package/dist/controllers/useT9n.d.ts +1 -0
  109. package/dist/customAgents/AddAgent/AddAgent.d.ts +2 -0
  110. package/dist/docs/api.json +2239 -0
  111. package/dist/docs/docs.json +2011 -0
  112. package/dist/docs/vscode.css-custom-data.json +6 -0
  113. package/dist/docs/vscode.html-custom-data.json +306 -0
  114. package/dist/docs/web-types.json +693 -0
  115. package/dist/index.d.ts +99 -0
  116. package/dist/index.js +8 -0
  117. package/dist/loader.d.ts +2 -0
  118. package/dist/loader.js +23 -0
  119. package/dist/oauth-callback.html +31 -0
  120. package/dist/runtime.d.ts +6 -0
  121. package/dist/types/components.d.ts +2 -0
  122. package/dist/types/lumina.d.ts +80 -0
  123. package/dist/types/preact.d.ts +98 -0
  124. package/dist/types/react.d.ts +119 -0
  125. package/dist/types/stencil.d.ts +87 -0
  126. package/package.json +47 -0
@@ -0,0 +1,19 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import"./46CNQJRX.js";var e=`## LinkChart Agent - Tool Intent Classifier
5
+
6
+ You are an assistant that classifies user intent for linkChart agent.
7
+
8
+ You are given the following tool options:
9
+ {tools}
10
+
11
+ Use the most recent relevant user question from the chat history. The question will **not** be restated again here.
12
+
13
+ Return exactly one intent (tool name) based on the user's request.
14
+ If none apply, return an **empty string**.
15
+
16
+ Choose only from provided tools.
17
+
18
+ Return the name of the tool as a string.
19
+ `;export{e as default};
@@ -0,0 +1,6 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import{a as b}from"./2KGO3SIH.js";import c from"./WOP5ENGJ.js";import{a as f}from"./PEFKT7JJ.js";import"./UIUJKONY.js";import{g as y,h,n as g,o as u,p as v,t as _}from"./YXLN5DSL.js";import a from"./ZQEX3TGK.js";import"./LILVLE37.js";import"./46CNQJRX.js";export default $arcgis.t(([E,{whenOnce:k,watch:L,when:S},O,P,{property:c,subclass:C},,{r:w}])=>{var H=y`:host{height:100%}`,M=Object.defineProperty,x=Object.getOwnPropertyDescriptor,n=(l,t,e,r)=>{for(var s=r>1?void 0:r?x(t,e):t,a=l.length-1,o;a>=0;a--)(o=l[a])&&(s=(r?o(t,e,s):o(s))||s);return r&&s&&M(t,e,s),s},i=class extends P{constructor(l){super(l),this.view=null,this.loading=!1,this.processing=!1,this.processingStep=""}async load(){this._set("loading",!0);try{await this._initialize()}finally{this._set("loading",!1)}}destroy(){this.orchestrator?.dispose(),super.destroy()}async _initialize(){this.removeHandles(),await Promise.all([this.portal.load(),this.view?.when()]),this.view&&await k(()=>!this.view.updating),this._set("orchestrator",await w.init({agents:[...this.agents],portal:this.portal,view:this.view??void 0})),this.addHandles([L(()=>[this.view,this.agents],()=>void this._initialize())])}async*ask(l,t){if(!this.orchestrator)throw new Error("Orchestrator not initialized yet.");this._set("processing",!0),this._set("processingStep","");let e="";try{let r=this.orchestrator.ask(l);for await(let s of r){if(t?.aborted){yield{type:"cancelled"};break}switch(s.type){case"trace":{this._set("processingStep",s.data.text),e+=`${s.data.text}
5
+
6
+ `;break}case"completed":{if(!s.result.content.length){yield{type:"completed",error:"Could not process the request.",log:e};return}let a=s.result.content;this._set("processingStep",""),yield{type:"completed",response:a,log:e};return}case"interrupt":{console.log("Orchestrator interrupt:",s);let{kind:a,message:o,metadata:m}=s.interrupt,p=Array.isArray(m)?[...m]:[],$=(()=>{switch(a){case"booleanChoice":return{type:"boolean-choice",message:o,options:p};case"singleSelection":return{type:"single-select",message:o,options:p};case"multipleSelection":return{type:"multi-select",message:o,options:p};case"textInput":return{type:"text-input",message:o};default:return{type:a,message:o,options:p}}})();this._set("processingStep","Waiting for user input..."),yield{type:"interrupt",payload:$};break}case"cancelled":{yield{type:"cancelled"};return}default:{console.warn("Unknown event type:",s);break}}}}catch(r){console.warn("Error during message processing:",r),yield{type:"completed",error:"An error occurred during message processing.",log:e};return}finally{this._set("processing",!1)}}};n([c({readOnly:!0})],i.prototype,"orchestrator",2);n([c()],i.prototype,"agents",2);n([c()],i.prototype,"portal",2);n([c()],i.prototype,"view",2);n([c({readOnly:!0})],i.prototype,"loading",2);n([c({readOnly:!0})],i.prototype,"processing",2);n([c({readOnly:!0})],i.prototype,"processingStep",2);i=n([C("OrchestratorController")],i);var d=class extends v{constructor(){super(...arguments),this._messages=b({blocking:!0}),this.#e=g(),this.#s=g(),this.#t=null,this.#r=null,this.#a=new Map,this.#i=t=>{t.stopPropagation(),this.orchestrator?.cancelInterrupt(),this._interrupt=null},this.#o=t=>{t.stopPropagation();let e=t.detail;this.orchestrator?.resumeInterrupt(e),this._interrupt=null},this.#n=t=>{t.stopPropagation(),this.suggestedPrompts=[];let e=t.detail;this.#h(e)},this.#l=t=>{if(t.stopPropagation(),this._interrupt){this.orchestrator?.cancelInterrupt(),this._interrupt=null;return}this.#r?.abort()},this._interrupt=null,this._chatHistory=new E([]),this._error=null,this.referenceElement=null,this.portal=new O,this.suggestedPrompts=[]}static{this.properties={_interrupt:16,_chatHistory:16,_error:16,orchestrator:32,entryMessage:1,heading:1,description:1,referenceElement:1,portal:0,suggestedPrompts:0}}static{this.styles=H}#e;#s;#t;#r;#a;#i;#o;#n;#l;get orchestrator(){return this.#t?.orchestrator}register(t){this.#a.set(t.agent.id,t)}load(){this.manager.onLifecycle(()=>()=>{this.#r?.abort(),this._interrupt=null,this._chatHistory.removeAll(),this._error=null})}loaded(){this.manager.onLifecycle(()=>{this.#e.value?.addEventListener("arcgisSubmit",this.#n),this.#e.value?.addEventListener("arcgisCancel",this.#l);let t=S(()=>!!this._interrupt&&!!this.#s.value,()=>{let e=this.#s.value;e.removeEventListener("arcgisSubmit",this.#o),e.removeEventListener("arcgisCancel",this.#i),e.addEventListener("arcgisSubmit",this.#o,{once:!0}),e.addEventListener("arcgisCancel",this.#i,{once:!0})});return queueMicrotask(()=>void this.#c()),()=>{t.remove(),this.#s.value?.removeEventListener("arcgisSubmit",this.#o),this.#s.value?.removeEventListener("arcgisCancel",this.#i),this.#e.value?.removeEventListener("arcgisSubmit",this.#n),this.#e.value?.removeEventListener("arcgisCancel",this.#l),this.#t?.destroy(),this.#t=null}})}async#c(){try{let t=f(this.referenceElement);await t?.componentOnReady();let e=[...this.#a.values()];this.#t=new i({agents:e,portal:this.portal,view:t?.view}),await this.#t.load()}catch(t){console.warn(t),this._error="Error initializing orchestrator."}}async#h(t){let e=t.trim();if(!e||(this._chatHistory.push({type:"prompt",content:e}),!this.#t))return;this.#r=new AbortController;let r=this.#t.ask(e,this.#r.signal);for await(let s of r)switch(s.type){case"completed":this._chatHistory.push({type:"response",content:s.response,log:s.log,error:s.error});break;case"interrupt":this._interrupt=s.payload;break;case"cancelled":this._chatHistory.push({type:"response",error:"Request cancelled."});break}}render(){return h`<arcgis-assistant-shell .loading=${this.#t?.loading} .heading=${this.heading??this._messages.assistantLabel} .description=${this.description} .entryMessage=${this.entryMessage} .entryMessageClosed=${this._chatHistory.length>0} .awaitingResponse=${this.#t?.processing} .suggestedPrompts=${this.suggestedPrompts} .status=${this.#t?.processing?"working":this._error?"error":"ready"} ${u(this.#e)}>${this._error?h`<calcite-notice slot=entry-message open kind=danger icon width=full><div slot=message>${this._error}</div></calcite-notice>`:null}${this._interrupt?h`<arcgis-assistant-interrupt slot=entry-message .type=${this._interrupt.type} .message=${this._interrupt.message} .options=${this._interrupt.options} ${u(this.#s)}></arcgis-assistant-interrupt>`:null}<arcgis-assistant-chat .loading=${this.#t?.processing} .loadingMessage=${this.#t?.processingStep||""} .messages=${this._chatHistory} .user=${this.portal?.user?.fullName||this.portal?.user?.username}><slot></slot></arcgis-assistant-chat><slot name=header-actions-end slot=header-actions-end></slot>${this.entryMessage?null:h`<slot name=entry-message slot=entry-message></slot>`}<slot name=entry-actions-start slot=entry-actions-start></slot><slot name=footer-content slot=footer-content></slot></arcgis-assistant-shell>`}};_("arcgis-assistant",d);return d},"core/Collection","core/reactiveUtils","portal/Portal","core/Accessor","core/accessorSupport/decorators",a,c)
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import d from"./A7BGJLHS.js";import{a as s,b as a}from"./FORRN75L.js";import c from"./WOP5ENGJ.js";import"./PEFKT7JJ.js";import"./UIUJKONY.js";import{p as r,t as e}from"./YXLN5DSL.js";import b from"./ZQEX3TGK.js";import"./LILVLE37.js";import"./46CNQJRX.js";export default $arcgis.t(([,,{c:i}])=>{var t=class extends r{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-layer-filter-agent requires a mapView");return{mapView:this.#t}}async load(){this.#t=await s(this,"arcgis-assistant-layer-filter-agent"),a(this)}};e("arcgis-assistant-layer-filter-agent",t);return t},b,c,d)
@@ -0,0 +1,71 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import"./46CNQJRX.js";var e=`# ArcGIS Online Map Viewer \u2014 Smart Mapping Assistant
5
+
6
+ You are a Smart Mapping Assistant for ArcGIS Online Map Viewer.
7
+
8
+ **Your job:**
9
+ Given a set of layers with their fields and a user request, call the appropriate layer styling tools to apply the best mapping style(s) for each layer.
10
+
11
+ ---
12
+
13
+ ## **Available Layers and Fields:**
14
+
15
+ {layerFieldInfo}
16
+
17
+ **FieldInfo:**
18
+
19
+ - \`name\`: the actual field name (use this exact name)
20
+ - \`type\`: one of \`string\`, \`number\`, \`date\`, etc.
21
+ - \`alias\`: a human-readable label
22
+ - \`description\`: optional field metadata
23
+
24
+ ---
25
+
26
+ ## **Available Color Schemes:**
27
+
28
+ \`reds\`, \`yellows\`, \`oranges\`, \`greens\`, \`blues\`, \`purples\`, \`pinks\`, \`browns\`, \`grays\`, \`subdued\`, \`diverging\`, \`sequential\`, \`categorical\`
29
+
30
+ ---
31
+
32
+ ## **Available Themes:**
33
+
34
+ 1. **high-to-low** - High values are emphasized with saturated colors. Low values are de-emphasized with diminished colors.
35
+ - Keywords: continuous, high to low, unclassed, gradient, sequential
36
+ - Example: Show the percent of the population that owns a home along a sequential color ramp.
37
+
38
+ 2. **above** - Emphasize values that are above a value, such as the mean.
39
+ - Keywords: over, increasing, up, growth, above
40
+ - Example: Use color to show areas where the hispanic population is above the mean.
41
+
42
+ 3. **below** - Emphasize values that are below a value, such as the mean.
43
+ - Keywords: under, decreasing, down, shrinking, decline, drop, below
44
+ - Example: Show the number of vacant homes below the mean.
45
+
46
+ 4. **centered-on** - Emphasize values that are near a key value.
47
+ - Keywords: centered on, focused on average, highlight average, competitive, close
48
+ - Example: Use color to show the areas where the percent of the republican votes is close to the percent of democratic votes.
49
+
50
+ 5. **above-and-below** - When both high values and low values need emphasis.
51
+ - Keywords: diverging, above or below, bi-directional, over or under, growing or shrinking, growth or decline
52
+ - Example: Show the median household income above and below the national average.
53
+
54
+ 6. **extremes** - When only the highest or lowest values need emphasis.
55
+ - Keywords: extremes, outliers
56
+ - Example: Emphasize the outliers of the votes for Democrats in the 2020 presidential election.
57
+
58
+ ---
59
+
60
+ ## **Instructions:**
61
+
62
+ - Call the appropriate tool for the layer based on the user's request
63
+ - Use exact field names from the layer info (not aliases)
64
+ - Use exact layer IDs from the layer info
65
+ - Match field types to tool requirements (each tool describes its field requirements in its description)
66
+ - Select appropriate color schemes and themes based on the data and user intent, only if user asks for them
67
+ - If the user asks for a specific style, use that tool
68
+ - If the user is vague, use your judgment to recommend the best tool
69
+
70
+ **Remember:** Each layer styling tool will apply a renderer to a layer, make it visible, and return results.
71
+ `;export{e as default};
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ function n(e){return e?typeof e=="string"?document.querySelector(e):e:null}export{n as a};
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import{b as a}from"./FORRN75L.js";import"./PEFKT7JJ.js";import"./UIUJKONY.js";import{p as s,t as e}from"./YXLN5DSL.js";import"./46CNQJRX.js";var t=class extends s{static{this.properties={agent:0,context:0}}getContext(){return this.context}load(){a(this)}};e("arcgis-assistant-agent",t);export{t as ArcgisAssistantAgent};
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import"./46CNQJRX.js";var e="# ArcGIS Online Map Viewer \u2014 Layer Filter Tool Calling Assistant\n\nYou are an assistant that helps generate layer filter expressions for **ArcGIS Online Map Viewer** by selecting and calling the appropriate tool.\n\nCRITICAL: You are FORBIDDEN from making multiple tool calls. You MUST make exactly ONE tool call.\n\n## You are given:\n\nA list of layers, with layerId, layerSummary and each with associated field information\n{layerFieldInfo}\n\nFieldInfo:\n\n- `name`: the actual field name used in layer filter expressions\n- `type`: one of `string`, `number`, `date`, etc.\n- `alias`: a human-readable label\n- `description`: optional field metadata\n- `statistics`: such as min, max, unique values, etc.\n\n## Your task\n\n1. Analyze the user's request and the provided layer and field information.\n2. Generate a **single ArcGIS SQL WHERE clause** to match features based on the user's request and intent.\n3. Select the most appropriate tool to call based on the user's request.\n\nThe tool will apply the provided WHERE clause to the layer in the map viewer.\n\n## SQL-92 Date/Time Syntax\n\nUser timezone: {userTimezone} ({userTimezoneOffset})\n\nDatabase stores dates in UTC. Convert user's local time to UTC.\n\nTo convert: if offset is `-08:00`, add 8 hours. If `-05:00`, add 5 hours.\n\nFormat: `TIMESTAMP 'YYYY-MM-DD HH:MM:SS'`\n\n### Rules for generating Layer Filter expressions:\n\n- Use only the field\u2019s **`name`** in the output expression.\n- Use metadata (`alias`, `description`, `statistics`) only to help understand the user's meaning \u2014 not in the syntax.\n- Use field `type` to choose appropriate operators:\n - **String** \u2192 `LIKE '%value%'`, `=`, `IN (...)`\n - **Number/Date** \u2192 `=`, `<`, `>`, `BETWEEN`, etc.\n- Use fields with the **highest `relevanceScore`**.\n- Fields are case sensitive.\n- DO NOT use subqueries or `SELECT` keyword.\n- Combine conditions with `AND`, `OR`, or `NOT` as appropriate.\n- If no meaningful layer filter can be generated, do not call a tool.\n";export{e as default};
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import{g as i,h as t,p as r,q as e,t as o}from"./YXLN5DSL.js";import"./46CNQJRX.js";var c=i`.assistant-chat-card-content__skeleton-block{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);width:100%}.assistant-chat-card-content__skeleton-text{display:block;height:.95em;border-radius:6px;background:linear-gradient(90deg,color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent),color-mix(in srgb,var(--calcite-color-foreground-3) 85%,transparent),color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent));background-size:200% 100%;animation:assistant-chat-card-content-shimmer 1.2s ease-in-out infinite;width:85%}.assistant-chat-card-content__skeleton-text:last-child{width:70%}@keyframes assistant-chat-card-content-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.assistant-chat-card-content__skeleton-text{animation:none}}.assistant-chat-card-content__text-container{padding:var(--calcite-spacing-sm);display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);color:var(--calcite-color-text-1)}.assistant-chat-card-content__text-loading{font-style:italic;word-wrap:break-word;word-break:break-all;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.assistant-chat-card-content__error-notice{padding:var(--calcite-spacing-sm)}`,n="assistant-chat-card-content",a={textLoading:`${n}__text-loading`,skeletonBlock:`${n}__skeleton-block`,skeletonText:`${n}__skeleton-text`},s=class extends r{constructor(){super(...arguments),this.loading=!1,this.type="text"}static{this.properties={loading:5,type:1,content:1,loadingMessage:1}}static{this.styles=c}_renderText(){return t`<div class="assistant-chat-card-content__text-container"><div><span class=${e(this.loading?a.textLoading:void 0)}>${this.loading?this.loadingMessage:this.content}</span></div>${this.loading?t`<div class=${e(a.skeletonBlock)}><span class=${e(a.skeletonText)}></span><span class=${e(a.skeletonText)}></span></div>`:null}</div>`}_renderError(){return t`<calcite-notice class="assistant-chat-card-content__error-notice" open icon kind=warning width=auto><div slot=message>${this.content}</div></calcite-notice>`}render(){switch(this.type){case"text":return this._renderText();case"error":return this._renderError();default:return t`<p>Unsupported content type</p>`}}};o("arcgis-assistant-chat-card-content",s);export{s as ArcgisAssistantChatCardContent};
@@ -0,0 +1,79 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import"./46CNQJRX.js";var e=`# ArcGIS Online Map Viewer \u2014 Layer Filter Tool Calling Assistant
5
+
6
+ You are an assistant that helps generate layer filter expressions for **ArcGIS Online Map Viewer** by selecting and calling the appropriate tool.
7
+
8
+ CRITICAL: You MUST make exactly ONE tool call. You are FORBIDDEN from making zero or multiple tool calls. Even if the question has been answered, you need to filter the features.
9
+
10
+ ## You are given:
11
+
12
+ A list of layers, with layerId, layerSummary and each with associated field information
13
+ {layerFieldInfo}
14
+
15
+ FieldInfo:
16
+
17
+ - \`name\`: the actual field name used in layer filter expressions
18
+ - \`type\`: one of \`string\`, \`number\`, \`date\`, etc.
19
+ - \`alias\`: a human-readable label
20
+ - \`description\`: optional field metadata
21
+ - \`statistics\`: such as min, max, unique values, etc.
22
+
23
+ ## Your task
24
+
25
+ 1. Analyze the user's request and the provided layer and field information.
26
+ 2. Generate a **single ArcGIS SQL WHERE clause** to match features based on the user's request and intent.
27
+ 3. Select the most appropriate tool to call based on the user's request.
28
+
29
+ The tool will apply the provided WHERE clause to the layer in the map viewer.
30
+
31
+ ### Rules for generating Layer Filter expressions:
32
+
33
+ - Use only the field\u2019s **\`name\`** in the output expression.
34
+ - Use metadata (\`alias\`, \`description\`, \`statistics\`) only to help understand the user's meaning \u2014 not in the syntax.
35
+ - Use field \`type\` to choose appropriate operators:
36
+ - **String** \u2192 \`LIKE '%value%'\`, \`=\`, \`IN (...)\`
37
+ - **Number/Date** \u2192 \`=\`, \`<\`, \`>\`, \`BETWEEN\`, etc.
38
+ - Use fields with the **highest \`relevanceScore\`**.
39
+ - DO NOT use subqueries or \`SELECT\` keyword.
40
+ - Combine conditions with \`AND\`, \`OR\`, or \`NOT\` as appropriate.
41
+ - If no meaningful layer filter can be generated, do not call a tool.
42
+
43
+ ## SQL-92 Date/Time Syntax
44
+
45
+ User timezone: {userTimezone} ({userTimezoneOffset})
46
+
47
+ Database stores dates in UTC. Convert user's local time to UTC.
48
+
49
+ To convert: if offset is \`-08:00\`, add 8 hours. If \`-05:00\`, add 5 hours.
50
+
51
+ Format: \`TIMESTAMP 'YYYY-MM-DD HH:MM:SS'\`
52
+
53
+ ## RULES
54
+
55
+ When dealing with geometry and proximity and spatial queries:
56
+
57
+ 1. TARGET LAYER = What you want to FIND/RETURN in results
58
+ 2. GEOMETRY LAYER = The location to search FROM (with distance buffer)
59
+
60
+ For questions like "Is [specific item A] near/within [any of type B]":
61
+
62
+ - Target: Type B (what we're searching for)
63
+ - Geometry: Specific item A (where we're searching from)
64
+
65
+ Examples:
66
+
67
+ Q: "Is well P132_1873 within 300m from a protected area?"
68
+ Target: Protected Areas (what we want to find)
69
+ Geometry: Well (where="ID = 'P132_1873'" - single point)
70
+ Result: Returns which protected areas are nearby
71
+
72
+ Q: "Find roads within 500m of park X"
73
+ Target: Roads (what we want to find)
74
+ Geometry: Park X (specific location)
75
+ Result: Returns which roads are nearby
76
+
77
+ Key principle: The geometry layer should be the SIMPLER geometry (ideally a single feature or small set),
78
+ not a large collection that requires union operations.
79
+ `;export{e as default};
@@ -0,0 +1,19 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import"./46CNQJRX.js";var e=`## Navigation Agent - Tool Intent Classifier
5
+
6
+ You are an assistant that classifies user intent for navigation agent.
7
+
8
+ You are given the following tool options:
9
+ {tools}
10
+
11
+ Use the most recent relevant user question from the chat history. The question will **not** be restated again here.
12
+
13
+ Return exactly one intent (tool name) based on the user's request.
14
+ If none apply, return an **empty string**.
15
+
16
+ Choose only from provided tools.
17
+
18
+ Return the name of the tool as a string.
19
+ `;export{e as default};
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ var a=(n,t)=>{let e=n;for(;e;){if(e===t)return!0;if(!e.parentNode)return!1;e.parentNode instanceof ShadowRoot?e=e.parentNode.host:e=e.parentNode}return!1},f=(n,t,e)=>{let s=l(t).subscribe;return s(o=>{o.some(r=>a(n,r.target))&&e()})},c={},l=n=>{let t=n.join(","),e=c[t];if(e!==void 0)return e;let s=new Set,o=new MutationObserver(r=>s.forEach(u=>u(r)));globalThis.document&&o.observe(document.documentElement,{attributes:!0,attributeFilter:n,subtree:!0});let i={subscribe:r=>(s.add(r),()=>{s.delete(r),s.size===0&&(o.disconnect(),c[t]=void 0)})};return c[t]=i,i},d=(n,t)=>{let e=n;for(;e;){let s=e.closest?.(t);if(s)return s;let o=e.getRootNode?.();if(o===globalThis.document)return;e=o.host}};var h=(n,t,e)=>d(n,`[${t}]`)?.getAttribute(t)??e;export{f as a,d as b,h as c};
@@ -0,0 +1,16 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import"./46CNQJRX.js";var t=`# LinkChart Tool Instructions
5
+
6
+ CRITICAL: You are FORBIDDEN from making multiple tool calls. You MUST make exactly ONE tool call.
7
+
8
+ Use the most recent relevant user question from the chat history. The question will **not** be restated again here.
9
+
10
+ Detected intent:
11
+ {intent}
12
+
13
+ Rules:
14
+
15
+ - Call exactly one linkChart tool
16
+ `;export{t as default};
@@ -0,0 +1,111 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.133 */
4
+ import"./46CNQJRX.js";var e=`You are a knowledgeable GIS expert.
5
+
6
+ You are given a Feature Service description and title.
7
+
8
+ {existingItemTitle}
9
+ {existingItemDescription}
10
+
11
+ You are given Feature Layer descriptions and title.
12
+
13
+ {existingLayerTitle}
14
+ {existingLayerDescription}
15
+
16
+ ## Existing field descriptions:
17
+
18
+ Here is an extensive list of fields with their existing descriptions. These fields together represent a summary of the data contained in this feature layer. NOTE that these field descriptions are not final and may need to be improved.
19
+ Some fields will have summary statistics, which are also included in the field descriptions. Statistics can help you decipher the type of data better.
20
+
21
+ {fieldInformation}
22
+
23
+ Your task is to generate the following for each field:
24
+
25
+ 1. field_description: A short description of the field.
26
+ 2. field_value_type: Field Value Type
27
+ 3. field_alias: A display name that concisely conveys the field contents to help readers understand the data
28
+
29
+ ## Instructions to generate Field Description:
30
+
31
+ - You must generate a field description for each field in the feature layer.
32
+ - You must not skip any field.
33
+ - If you think the existing field description is good, you must still add it in your response.
34
+ - If the existing field description is empty, you must generate a new field description.
35
+ - The field description should be a short description of the field.
36
+ - If the existing field description has units, you should include them in the new field description.
37
+ - If the existing field description is not clear, you should improve it.
38
+ - Do not have duplicate field descriptions. Always keep the one that is the best.
39
+
40
+ ## Instructions to determine Field Value Type:
41
+
42
+ Following is a list of field value types you can assign to a field in a feature layer. Each field value type is used to define the kind of data that can be stored in that field. The field value type you choose for a field should be based on the kind of data stored in that field.
43
+
44
+ - NAME_OR_TITLE:
45
+ Text that represents a name, title, label, or keyword for each feature.
46
+
47
+ - DESCRIPTION:
48
+ Text that provides a longer description of the feature, more than just a name or title.
49
+
50
+ For example, if you have a layer to collect information from the public regarding issues in the community, a field in that layer that allows people to specify the nature of the issue can be defined with the Description field value type.
51
+
52
+ - TYPE_OR_CATEGORY:
53
+ Field values represent types or categories for group features that are based on a common characteristic, for example, soil type, zoning code, species, or asset type.
54
+
55
+ - COUNT_OR_AMOUNT:
56
+ Integers (no decimal) that represent the quantity of a specific attribute.
57
+
58
+ - PERCENTAGE_OR_RATIO:
59
+ Number values in this field reflect the relationship between different quantities, for example, the percentage of males in a population or the ratio between the number of males and females.
60
+
61
+ - MEASUREMENT:
62
+ A number that reflects a characteristic that you can precisely measure, for example, elevation, distance, temperature, or age.
63
+
64
+ - CURRENCY:
65
+ A number that represents monetary values.
66
+
67
+ - UNIQUE_IDENTIFIER:
68
+ The values in this field are used to positively distinguish one feature or entity from another, for example, an assessor's parcel number, a membership ID, or an invoice number.
69
+
70
+ Each value per entity must be unique, but that does not necessarily mean all the values in this field will be unique for the layer.
71
+
72
+ For example, if you have two layers\u2014one for employees and one for job sites\u2014both can contain an employee ID unique identifier field. In the employees layer, the employee ID field should contain unique values. In the job sites layer, the employee ID field can contain duplicate values, as an employee may work at multiple job sites. The employee ID field in the job sites layer is still a unique identifier because it distinguishes one employee from another, even though the field does not contain unique values in the job sites layer.
73
+
74
+ - PHONE_NUMBER:
75
+ This field stores phone numbers.
76
+
77
+ - EMAIL_ADDRESS:
78
+ This field stores email address strings.
79
+
80
+ - ORDERED_OR_RANKED_LIST:
81
+ The values in this field represent a feature's status in an ordered or ranked list. For example, a feature can be one of the following:
82
+
83
+ Small, medium, or large
84
+ First, second, third, or fourth
85
+ Informational, warning, error, or failure
86
+
87
+ - BINARY
88
+ Only one of two values are possible for each feature. Examples include the following:
89
+
90
+ On or off
91
+ Yes or no
92
+ True or false
93
+ Inhabited or vacant
94
+
95
+ - LOCATION_OR_PLACE_NAME:
96
+ Values in this field represent a geographic location. Examples include a street address, city name, region, building name (such as A.K. Smiley Public Library), attraction name (such as Alameda County Fairgrounds or Cairngorms National Park), postal code, or country.
97
+
98
+ - COORDINATE:
99
+ These fields store a geographic coordinate value such as x, y, z, latitude, or longitude.
100
+
101
+ - DATE_AND_TIME:
102
+ Values in this field store explicit dates and times or date references such as days of the week, months, or years.
103
+
104
+ - OTHER:
105
+ If a field does not fit any of the above categories, you can assign it to the "OTHER" category.
106
+
107
+ If a field already has a field value type assigned, you MUST use that value type.
108
+ If a field already has a field description assigned, you MUST use it in order to determine a fitting field value type and field alias. You can improve the field description if you think it is necessary.
109
+ If a field already has a field alias assigned, you must use it in order to determine a fitting field description. You can improve the field alias if you think it is necessary.
110
+ If a field does not have a field description, field value type, or field alias assigned, you must generate them based on the field name and the data type of the field. You can also use the existing layer description and title to help you generate the field description, field value type, and field alias.
111
+ `;export{e as default};