@arcgis/ai-components 5.2.0-next.16 → 5.2.0-next.18
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.
- package/dist/agent-utils/index.d.ts +78 -0
- package/dist/agent-utils/index.js +116 -97
- package/dist/agent-utils/types.d.ts +12 -12
- package/dist/cdn/27NEUQN3.js +2 -0
- package/dist/cdn/{IR7PTESF.js → 2NMR43NW.js} +1 -1
- package/dist/cdn/4I4MCV7V.js +71 -0
- package/dist/cdn/{P7DG5T3Z.js → 4RZPOYZ7.js} +1 -1
- package/dist/cdn/5SBLS4NW.js +2 -0
- package/dist/cdn/{BX7FSMUU.js → 6LZ6GOHF.js} +1 -1
- package/dist/cdn/{K3JCH4XW.js → C7E7MJSR.js} +1 -1
- package/dist/cdn/{JIWK6QK6.js → CIW3QMKV.js} +1 -1
- package/dist/cdn/{DHKUXLU3.js → CJIV4KJZ.js} +1 -1
- package/dist/cdn/CVHJMR5X.js +2 -0
- package/dist/cdn/ETD76QRC.js +14 -0
- package/dist/cdn/FC2ZX3SS.js +2 -0
- package/dist/cdn/{4UDYY3HL.js → HOCTVCHH.js} +1 -1
- package/dist/cdn/I64KIZG3.js +2 -0
- package/dist/cdn/{S75VFYR4.js → I76F57I2.js} +19 -18
- package/dist/cdn/IB4WTK74.js +2 -0
- package/dist/cdn/{3JGWGKT6.js → IC5P5NYY.js} +1 -1
- package/dist/cdn/{QYR3NSF2.js → IDZTJLVN.js} +2 -2
- package/dist/cdn/IW43UAIS.js +3 -0
- package/dist/cdn/{22IT5TDB.js → JBNITHPO.js} +5 -5
- package/dist/cdn/{7CYGX4F4.js → JEIMRNYM.js} +1 -1
- package/dist/cdn/K37GTMOF.js +18 -0
- package/dist/cdn/{NE7E52YR.js → KTK4HNL2.js} +8 -2
- package/dist/cdn/{TR4GFL7X.js → L77BTGXY.js} +1 -1
- package/dist/cdn/{XOH56EQ2.js → LODKJRS4.js} +1 -1
- package/dist/cdn/LSNMNSYS.js +2 -0
- package/dist/cdn/NNC3UYMR.js +2 -0
- package/dist/cdn/NOJYPREL.js +3 -0
- package/dist/cdn/{Q6LRANX6.js → O3F47IO5.js} +1 -1
- package/dist/cdn/{O3RFFPU3.js → O7TGCM5P.js} +1 -1
- package/dist/cdn/PBTINZTK.js +65 -0
- package/dist/cdn/PSWI3MFB.js +2 -0
- package/dist/cdn/RNLQZV6U.js +36 -0
- package/dist/cdn/RX45PCYB.js +9 -0
- package/dist/cdn/SLNLQG3A.js +2 -0
- package/dist/cdn/{X4XY5HIE.js → SMADRJ67.js} +1 -1
- package/dist/cdn/{GBYLKQIL.js → T7CQZ27H.js} +1 -1
- package/dist/cdn/UNFG4ZJ5.js +3 -0
- package/dist/cdn/V6TM3MTN.js +22 -0
- package/dist/cdn/{IOD3GDA7.js → VKU4WAQV.js} +1 -1
- package/dist/cdn/{RUURNLTP.js → W2JAKE2M.js} +1 -1
- package/dist/cdn/{3VOQD2MR.js → WAVKMZA6.js} +1 -1
- package/dist/cdn/WQQRLD5F.js +2 -0
- package/dist/cdn/XAI6OR2N.js +2 -0
- package/dist/cdn/{DXVU45KM.js → XVQJBUMY.js} +1 -1
- package/dist/cdn/YJ3QQXF6.js +2 -0
- package/dist/cdn/{DQSEBKOX.js → YYY7HKYX.js} +1 -1
- package/dist/cdn/agent-utils/index.js +1 -1
- package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +1 -1
- package/dist/cdn/agent-utils/middlewares/middleware.js +1 -1
- package/dist/cdn/agent-utils/middlewares/trace.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/converterUtils.js +39 -32
- package/dist/chunks/dataExplorationGraph.js +12 -10
- package/dist/chunks/helpGraph.js +8 -8
- package/dist/chunks/help_prompt.js +34 -17
- package/dist/chunks/navigationGraph.js +4 -4
- package/dist/chunks/navigation_intent_prompt.js +8 -2
- package/dist/chunks/state.js +1 -1
- package/dist/chunks/utils2.js +8 -8
- package/dist/components/arcgis-assistant/customElement.d.ts +7 -0
- package/dist/components/arcgis-assistant/customElement.js +301 -181
- package/dist/components/arcgis-assistant-agent/customElement.js +5 -1
- package/dist/components/arcgis-assistant-chat/customElement.js +22 -17
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +9 -5
- package/dist/components/arcgis-assistant-help-agent/customElement.js +6 -2
- package/dist/components/arcgis-assistant-interrupt/customElement.js +4 -4
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +16 -12
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +8 -4
- package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-text/customElement.d.ts +1 -0
- package/dist/components/arcgis-assistant-message-text/customElement.js +12 -12
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +9 -5
- package/dist/components/arcgis-assistant-user-message/customElement.js +10 -8
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +2 -2
- package/dist/types/preact.d.ts +2 -2
- package/dist/types/react.d.ts +2 -2
- package/dist/types/stencil.d.ts +2 -2
- package/dist/utils/index.d.ts +1 -2
- package/package.json +4 -4
- package/dist/cdn/7PANDHIL.js +0 -16
- package/dist/cdn/CE6VDP2D.js +0 -72
- package/dist/cdn/CI3QSFPS.js +0 -2
- package/dist/cdn/F2AHA4GB.js +0 -54
- package/dist/cdn/FUIGPHBH.js +0 -2
- package/dist/cdn/GPYYAQVI.js +0 -2
- package/dist/cdn/I2Y67HBL.js +0 -14
- package/dist/cdn/JG2BIENI.js +0 -3
- package/dist/cdn/K475UT3E.js +0 -2
- package/dist/cdn/L4XF4H6V.js +0 -36
- package/dist/cdn/PB2ODJC7.js +0 -2
- package/dist/cdn/SBHLUL3Q.js +0 -2
- package/dist/cdn/XBW4MWQR.js +0 -2
- package/dist/cdn/XU6NCSE2.js +0 -22
- package/dist/cdn/Z7UWJ4AI.js +0 -3
- package/dist/orchestrator/registry/agentRegistry.d.ts +0 -33
- /package/dist/cdn/{CHPQM77M.js → IKEF7ZHH.js} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as W}from"./PBTINZTK.js";import{i as M,j as z,q as j,r as B,s as Q}from"./MAV3DW27.js";var L=class extends Q{constructor(r){if(super(r),this.it=z,r.type!==j.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===z||r==null)return this._t=void 0,this.it=r;if(r===M)return r;if(typeof r!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.it)return this._t;this.it=r;let t=[r];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};L.directiveName="unsafeHTML",L.resultType=1;var mt=B(L);var V=function(){return V=Object.assign||function(r){for(var t,a=1,i=arguments.length;a<i;a++){t=arguments[a];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}return r},V.apply(this,arguments)},D={exports:{}},p={},q={exports:{}},w={};function ee(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function be(e,r,t){}function ve(e,r,t){}var ye=/javascript\s*\:/img;function we(e,r){return ye.test(r)?"":r}w.whiteList=ee();w.getDefaultWhiteList=ee;w.onAttr=be;w.onIgnoreAttr=ve;w.safeAttrValue=we;var Ae={indexOf:function(e,r){var t,a;if(Array.prototype.indexOf)return e.indexOf(r);for(t=0,a=e.length;t<a;t++)if(e[t]===r)return t;return-1},forEach:function(e,r,t){var a,i;if(Array.prototype.forEach)return e.forEach(r,t);for(a=0,i=e.length;a<i;a++)r.call(t,e[a],a,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},E=Ae;function xe(e,r){e=E.trimRight(e),e[e.length-1]!==";"&&(e+=";");var t=e.length,a=!1,i=0,s=0,l="";function n(){if(!a){var c=E.trim(e.slice(i,s)),f=c.indexOf(":");if(f!==-1){var g=E.trim(c.slice(0,f)),d=E.trim(c.slice(f+1));if(g){var h=r(i,l.length,g,d,c);h&&(l+=h+"; ")}}}i=s+1}for(;s<t;s++){var o=e[s];if(o==="/"&&e[s+1]==="*"){var u=e.indexOf("*/",s+2);if(u===-1)break;s=u+1,i=s+1,a=!1}else o==="("?a=!0:o===")"?a=!1:o===";"?a||n():o===`
|
|
3
|
+
`&&n()}return E.trim(l)}var Te=xe,_=w,Se=Te;function J(e){return e==null}function ke(e){var r={};for(var t in e)r[t]=e[t];return r}function te(e){e=ke(e||{}),e.whiteList=e.whiteList||_.whiteList,e.onAttr=e.onAttr||_.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||_.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||_.safeAttrValue,this.options=e}te.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var r=this,t=r.options,a=t.whiteList,i=t.onAttr,s=t.onIgnoreAttr,l=t.safeAttrValue,n=Se(e,function(o,u,c,f,g){var d=a[c],h=!1;if(d===!0?h=d:typeof d=="function"?h=d(f):d instanceof RegExp&&(h=d.test(f)),h!==!0&&(h=!1),f=l(c,f),!!f){var b={position:u,sourcePosition:o,source:g,isWhite:h};if(h){var m=i(c,f,b);return J(m)?c+":"+f:m}else{var m=s(c,f,b);if(!J(m))return m}}});return n};var Le=te;(function(e,r){var t=w,a=Le;function i(l,n){var o=new a(n);return o.process(l)}r=e.exports=i,r.FilterCSS=a;for(var s in t)r[s]=t[s]})(q,q.exports);var U=q.exports,H={indexOf:function(e,r){var t,a;if(Array.prototype.indexOf)return e.indexOf(r);for(t=0,a=e.length;t<a;t++)if(e[t]===r)return t;return-1},forEach:function(e,r,t){var a,i;if(Array.prototype.forEach)return e.forEach(r,t);for(a=0,i=e.length;a<i;a++)r.call(t,e[a],a,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var r=/\s|\n|\t/,t=r.exec(e);return t?t.index:-1}},Ee=U.FilterCSS,Oe=U.getDefaultWhiteList,R=H;function re(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var ae=new Ee;function Ce(e,r,t){}function _e(e,r,t){}function Ie(e,r,t){}function Pe(e,r,t){}function ie(e){return e.replace(Ve,"<").replace(Re,">")}function Fe(e,r,t,a){if(t=ue(t),r==="href"||r==="src"){if(t=R.trim(t),t==="#")return"#";if(!(t.substr(0,7)==="http://"||t.substr(0,8)==="https://"||t.substr(0,7)==="mailto:"||t.substr(0,4)==="tel:"||t.substr(0,11)==="data:image/"||t.substr(0,6)==="ftp://"||t.substr(0,2)==="./"||t.substr(0,3)==="../"||t[0]==="#"||t[0]==="/"))return""}else if(r==="background"){if(I.lastIndex=0,I.test(t))return""}else if(r==="style"){if(Z.lastIndex=0,Z.test(t)||(K.lastIndex=0,K.test(t)&&(I.lastIndex=0,I.test(t))))return"";a!==!1&&(a=a||ae,t=a.process(t))}return t=ce(t),t}var Ve=/</g,Re=/>/g,Ne=/"/g,$e=/"/g,ze=/&#([a-zA-Z0-9]*);?/gim,We=/:?/gim,De=/&newline;?/gim,I=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,Z=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,K=/u\s*r\s*l\s*\(.*/gi;function se(e){return e.replace(Ne,""")}function ne(e){return e.replace($e,'"')}function oe(e){return e.replace(ze,function(t,a){return a[0]==="x"||a[0]==="X"?String.fromCharCode(parseInt(a.substr(1),16)):String.fromCharCode(parseInt(a,10))})}function le(e){return e.replace(We,":").replace(De," ")}function fe(e){for(var r="",t=0,a=e.length;t<a;t++)r+=e.charCodeAt(t)<32?" ":e.charAt(t);return R.trim(r)}function ue(e){return e=ne(e),e=oe(e),e=le(e),e=fe(e),e}function ce(e){return e=se(e),e=ie(e),e}function qe(){return""}function Ue(e,r){typeof r!="function"&&(r=function(){});var t=!Array.isArray(e);function a(l){return t?!0:R.indexOf(e,l)!==-1}var i=[],s=!1;return{onIgnoreTag:function(l,n,o){if(a(l))if(o.isClosing){var u="[/removed]",c=o.position+u.length;return i.push([s!==!1?s:o.position,c]),s=!1,u}else return s||(s=o.position),"[removed]";else return r(l,n,o)},remove:function(l){var n="",o=0;return R.forEach(i,function(u){n+=l.slice(o,u[0]),o=u[1]}),n+=l.slice(o),n}}}function He(e){for(var r="",t=0;t<e.length;){var a=e.indexOf("<!--",t);if(a===-1){r+=e.slice(t);break}r+=e.slice(t,a);var i=e.indexOf("-->",a);if(i===-1)break;t=i+3}return r}function Xe(e){var r=e.split("");return r=r.filter(function(t){var a=t.charCodeAt(0);return a===127?!1:a<=31?a===10||a===13:!0}),r.join("")}p.whiteList=re();p.getDefaultWhiteList=re;p.onTag=Ce;p.onIgnoreTag=_e;p.onTagAttr=Ie;p.onIgnoreTagAttr=Pe;p.safeAttrValue=Fe;p.escapeHtml=ie;p.escapeQuote=se;p.unescapeQuote=ne;p.escapeHtmlEntities=oe;p.escapeDangerHtml5Entities=le;p.clearNonPrintableCharacter=fe;p.friendlyAttrValue=ue;p.escapeAttrValue=ce;p.onIgnoreTagStripAll=qe;p.StripTagBody=Ue;p.stripCommentTag=He;p.stripBlankChar=Xe;p.cssFilter=ae;p.getDefaultCSSWhiteList=Oe;var N={},y=H;function Ge(e){var r=y.spaceIndex(e),t;return r===-1?t=e.slice(1,-1):t=e.slice(1,r+1),t=y.trim(t).toLowerCase(),t.slice(0,1)==="/"&&(t=t.slice(1)),t.slice(-1)==="/"&&(t=t.slice(0,-1)),t}function Me(e){return e.slice(0,2)==="</"}function je(e,r,t){var a="",i=0,s=!1,l=!1,n=0,o=e.length,u="",c="";e:for(n=0;n<o;n++){var f=e.charAt(n);if(s===!1){if(f==="<"){s=n;continue}}else if(l===!1){if(f==="<"){a+=t(e.slice(i,n)),s=n,i=n;continue}if(f===">"){a+=t(e.slice(i,s)),c=e.slice(s,n+1),u=Ge(c),a+=r(s,a.length,u,c,Me(c)),i=n+1,s=!1;continue}if(f==='"'||f==="'")for(var g=1,d=e.charAt(n-g);d.trim()===""||d==="=";){if(d==="="){l=f;continue e}d=e.charAt(n-++g)}}else if(f===l){l=!1;continue}}return i<e.length&&(a+=t(e.substr(i))),a}var Be=/[^a-zA-Z0-9\\_:.-]/gim;function Qe(e,r){var t=0,a=0,i=[],s=!1,l=e.length;function n(g,d){if(g=y.trim(g),g=g.replace(Be,"").toLowerCase(),!(g.length<1)){var h=r(g,d||"");h&&i.push(h)}}for(var o=0;o<l;o++){var u=e.charAt(o),c,f;if(s===!1&&u==="="){s=e.slice(t,o),t=o+1,a=e.charAt(t)==='"'||e.charAt(t)==="'"?t:Ze(e,o+1);continue}if(s!==!1&&o===a){if(f=e.indexOf(u,o+1),f===-1)break;c=y.trim(e.slice(a+1,f)),n(s,c),s=!1,o=f,t=o+1;continue}if(/\s|\n|\t/.test(u))if(e=e.replace(/\s|\n|\t/g," "),s===!1)if(f=Je(e,o),f===-1){c=y.trim(e.slice(t,o)),n(c),s=!1,t=o+1;continue}else{o=f-1;continue}else if(f=Ke(e,o-1),f===-1){c=y.trim(e.slice(t,o)),c=Y(c),n(s,c),s=!1,t=o+1;continue}else continue}return t<e.length&&(s===!1?n(e.slice(t)):n(s,Y(y.trim(e.slice(t))))),y.trim(i.join(" "))}function Je(e,r){for(;r<e.length;r++){var t=e[r];if(t!==" ")return t==="="?r:-1}}function Ze(e,r){for(;r<e.length;r++){var t=e[r];if(t!==" ")return t==="'"||t==='"'?r:-1}}function Ke(e,r){for(;r>0;r--){var t=e[r];if(t!==" ")return t==="="?r:-1}}function Ye(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function Y(e){return Ye(e)?e.substr(1,e.length-2):e}N.parseTag=je;N.parseAttr=Qe;var et=U.FilterCSS,v=p,ge=N,tt=ge.parseTag,rt=ge.parseAttr,F=H;function P(e){return e==null}function at(e){var r=F.spaceIndex(e);if(r===-1)return{html:"",closing:e[e.length-2]==="/"};e=F.trim(e.slice(r+1,-1));var t=e[e.length-1]==="/";return t&&(e=F.trim(e.slice(0,-1))),{html:e,closing:t}}function it(e){var r={};for(var t in e)r[t]=e[t];return r}function st(e){var r={};for(var t in e)Array.isArray(e[t])?r[t.toLowerCase()]=e[t].map(function(a){return a.toLowerCase()}):r[t.toLowerCase()]=e[t];return r}function de(e){e=it(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=v.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=st(e.whiteList||e.allowList):e.whiteList=v.whiteList,e.onTag=e.onTag||v.onTag,e.onTagAttr=e.onTagAttr||v.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||v.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||v.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||v.safeAttrValue,e.escapeHtml=e.escapeHtml||v.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new et(e.css))}de.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var r=this,t=r.options,a=t.whiteList,i=t.onTag,s=t.onIgnoreTag,l=t.onTagAttr,n=t.onIgnoreTagAttr,o=t.safeAttrValue,u=t.escapeHtml,c=r.cssFilter;t.stripBlankChar&&(e=v.stripBlankChar(e)),t.allowCommentTag||(e=v.stripCommentTag(e));var f=!1;t.stripIgnoreTagBody&&(f=v.StripTagBody(t.stripIgnoreTagBody,s),s=f.onIgnoreTag);var g=tt(e,function(d,h,b,m,O){var C={sourcePosition:d,position:h,isClosing:O,isWhite:Object.prototype.hasOwnProperty.call(a,b)},S=i(b,m,C);if(!P(S))return S;if(C.isWhite){if(C.isClosing)return"</"+b+">";var X=at(m),me=a[b],G=rt(X.html,function(A,x){var $=F.indexOf(me,A)!==-1,k=l(b,A,x,$);return P(k)?$?(x=o(b,A,x,c),x?A+'="'+x+'"':A):(k=n(b,A,x,$),P(k)?void 0:k):k});return m="<"+b,G&&(m+=" "+G),X.closing&&(m+=" /"),m+=">",m}else return S=s(b,m,C),P(S)?u(m):S},u);return f&&(g=f.remove(g)),g};var nt=de;(function(e,r){var t=p,a=N,i=nt;function s(n,o){var u=new i(o);return u.process(n)}r=e.exports=s,r.filterXSS=s,r.FilterXSS=i,(function(){for(var n in t)r[n]=t[n];for(var o in a)r[o]=a[o]})();function l(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}l()&&(self.filterXSS=e.exports)})(D,D.exports);var T=D.exports,ot=function(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!=="[object Object]")return!1;var r=Object.getPrototypeOf(e);if(r===null)return!0;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r},pe=(function(){function e(r,t){var a=this;this.arcgisWhiteList={a:["href","style","target"],abbr:["title"],article:["style"],aside:["style"],audio:["autoplay","controls","loop","muted","preload"],b:[],blockquote:["style"],br:[],code:["style"],dd:["style"],del:["style"],details:["open","style"],div:["align","aria-hidden","aria-label","style"],dl:["style"],dt:["style"],em:[],figcaption:["style"],figure:["style"],font:["color","face","size","style"],footer:["style"],h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],header:["style"],hr:[],i:[],img:["alt","border","height","src","style","width"],li:[],main:["style"],mark:["style"],nav:["style"],ol:[],p:["style"],pre:["style"],section:["style"],source:["media","src","type"],span:["aria-hidden","aria-label","style"],strong:[],sub:["style"],summary:["style"],sup:["style"],table:["border","cellpadding","cellspacing","height","style","width"],tbody:[],tr:["align","height","style","valign"],td:["align","colspan","height","nowrap","rowspan","style","valign","width"],th:["align","colspan","height","nowrap","rowspan","style","valign","width"],time:["style"],u:[],ul:[],video:["autoplay","controls","height","loop","muted","poster","preload","width"]},this.arcgisCSSWhiteList=V(V({},T.getDefaultCSSWhiteList()),{"align-items":!0,"align-self":!0,flex:!0,"flex-basis":!0,"flex-direction":!0,"flex-flow":!0,"flex-grow":!0,"flex-shrink":!0,"flex-wrap":!0,float:!0,gap:!0,grid:!0,"grid-area":!0,"grid-auto-columns":!0,"grid-auto-flow":!0,"grid-auto-rows":!0,"grid-column":!0,"grid-column-end":!0,"grid-column-start":!0,"grid-row":!0,"grid-row-end":!0,"grid-row-start":!0,"grid-template":!0,"grid-template-areas":!0,"grid-template-columns":!0,"grid-template-rows":!0,"justify-content":!0,"justify-items":!0,"justify-self":!0,"line-height":!0,overflow:!0}),this.allowedProtocols=["http","https","mailto","iform","tel","flow","lfmobile","arcgis-navigator","arcgis-appstudio-player","arcgis-survey123","arcgis-collector","arcgis-workforce","arcgis-explorer","arcgis-trek2there","arcgis-quickcapture","mspbi","comgooglemaps","pdfefile","pdfehttp","pdfehttps","boxapp","boxemm","awb","awbs","gropen","radarscope"],this.arcgisFilterOptions={allowCommentTag:!0,safeAttrValue:function(s,l,n,o){return s==="a"&&l==="href"||(s==="img"||s==="source")&&l==="src"?a.sanitizeUrl(n):T.safeAttrValue(s,l,n,o)}},this._entityMap={"&":"8","<":"<",">":">",'"':""","'":"'","/":"/"};var i;r&&!t?i=r:r&&t?(i=Object.create(this.arcgisFilterOptions),i.css={whiteList:this.arcgisCSSWhiteList},Object.keys(r).forEach(function(s){if(s==="whiteList")i.whiteList=a._extendObjectOfArrays([a.arcgisWhiteList,r.whiteList||{}]);else if(s==="css"){var l=r.css.whiteList;l!=null&&r.css instanceof Object&&Object.keys(l).forEach(function(n){return i.css.whiteList[n]=l[n]})}else i[s]=r[s]})):(i=Object.create(this.arcgisFilterOptions),i.whiteList=this.arcgisWhiteList,i.css={whiteList:this.arcgisCSSWhiteList}),this.xssFilterOptions=i,this._xssFilter=new T.FilterXSS(i)}return e.prototype.sanitize=function(r,t){switch(t===void 0&&(t={}),typeof r){case"number":return isNaN(r)||!isFinite(r)?null:r;case"boolean":return r;case"string":return this._xssFilter.process(r);case"object":return this._iterateOverObject(r,t);default:return t.allowUndefined&&typeof r>"u"?void 0:null}},e.prototype.sanitizeUrl=function(r,t){var a=(t??{}).isProtocolRequired,i=a===void 0?!0:a,s=this._trim(r.substring(0,r.indexOf(":"))),l=r==="/",n=/^#/.test(r),o=s&&this.allowedProtocols.indexOf(s.toLowerCase())>-1;return l||n||o?T.escapeAttrValue(r):!s&&!i?T.escapeAttrValue("https://".concat(r)):""},e.prototype.sanitizeHTMLAttribute=function(r,t,a,i){return typeof this.xssFilterOptions.safeAttrValue=="function"?this.xssFilterOptions.safeAttrValue(r,t,a,i):T.safeAttrValue(r,t,a,i)},e.prototype.validate=function(r,t){t===void 0&&(t={});var a=this.sanitize(r,t);return{isValid:r===a,sanitized:a}},e.prototype.encodeHTML=function(r){var t=this;return String(r).replace(/[&<>"'\/]/g,function(a){return t._entityMap[a]})},e.prototype.encodeAttrValue=function(r){var t=/^[a-zA-Z0-9]$/;return String(r).replace(/[\x00-\xFF]/g,function(a,i){return t.test(a)?a:"&#x".concat(Number(r.charCodeAt(i)).toString(16),";")})},e.prototype._extendObjectOfArrays=function(r){var t={};return r.forEach(function(a){Object.keys(a).forEach(function(i){Array.isArray(a[i])&&Array.isArray(t[i])?t[i]=t[i].concat(a[i]):t[i]=a[i]})}),t},e.prototype._iterateOverObject=function(r,t){var a=this;t===void 0&&(t={});try{var i=!1,s=void 0;if(Array.isArray(r))s=r.reduce(function(n,o){var u=a.validate(o,t);return u.isValid?n.concat([o]):(i=!0,n.concat([u.sanitized]))},[]);else if(ot(r)){var l=Object.keys(r);s=l.reduce(function(n,o){var u=r[o],c=a.validate(u,t);return c.isValid?n[o]=u:(i=!0,n[o]=c.sanitized),n},{})}else return t.allowUndefined&&typeof r>"u"?void 0:null;return i?s:r}catch{return null}},e.prototype._trim=function(r){return String.prototype.trim?r.trim():r.replace(/(^\s*)|(\s*$)/g,"")},e})();W.use({gfm:!0,breaks:!0,async:!1});var lt=new pe({whiteList:{ol:["start"],li:["value"],"calcite-table":["caption","bordered","striped","layout","scale","class"],"calcite-table-row":["slot","class"],"calcite-table-header":["heading","alignment","description","class"],"calcite-table-cell":["alignment","colspan","rowspan","class"],pre:["class"],code:["class"]}},!0);function ft(e){return lt.sanitize(e)}function he(e,r){let t=e.indexOf("{",r),a=e.indexOf("[",r);return t===-1?a:a===-1?t:Math.min(t,a)}function ut(e){if(e.trimStart().startsWith("```"))return null;for(let r=he(e,0);r!==-1;r=he(e,r+1)){let t=0,a=0;for(let i=r;i<e.length;i++){let s=e[i];if(s==="{"?t++:s==="}"?t--:s==="["?a++:s==="]"&&a--,t<0||a<0)break;if(t===0&&a===0&&i>r)return e.slice(r,i+1)}}return null}function Tt(e){if(!e)return"";let r=e,t=ut(e);if(t)try{let i=JSON.parse(t),s=`
|
|
4
|
+
|
|
5
|
+
\`\`\`json
|
|
6
|
+
${JSON.stringify(i,null,2)}
|
|
7
|
+
\`\`\`
|
|
8
|
+
|
|
9
|
+
`;r=e.replace(t,s)}catch{}let a=gt(r);return ct(a)}function ct(e){if(!e)return"";let r=dt(e);return ft(r)}function gt(e){return e?W.parse(e,{async:!1}):""}function dt(e){if(!e||typeof DOMParser>"u")return e;try{let r=new DOMParser().parseFromString(e,"text/html");return Array.from(r.querySelectorAll("table")).forEach((t,a)=>{let i=r.createElement("calcite-table");i.setAttribute("caption",`Table ${a+1}`),i.setAttribute("striped","true");let s=t.querySelector("thead");if(s){let n=Array.from(s.querySelectorAll("tr"));for(let o of n){let u=r.createElement("calcite-table-row");u.setAttribute("slot","table-header");let c=Array.from(o.querySelectorAll("th, td"));for(let f of c){let g=(f.textContent??"").trim(),d=r.createElement("calcite-table-header");d.setAttribute("heading",g),u.appendChild(d)}i.appendChild(u)}}let l=t.querySelector("tbody");(l?Array.from(l.querySelectorAll("tr")):Array.from(t.querySelectorAll("tr")).filter(n=>!s?.contains(n))).forEach((n,o)=>{let u=r.createElement("calcite-table-row"),c=!s&&o===0&&n.querySelectorAll("th").length>0;c&&u.setAttribute("slot","table-header");let f=Array.from(n.querySelectorAll("th, td"));for(let g of f){if(c&&g.localName==="th"){let m=(g.textContent??"").trim(),O=r.createElement("calcite-table-header");O.setAttribute("heading",m),u.appendChild(O);return}let d=r.createElement("calcite-table-cell"),h=g.getAttribute("colspan"),b=g.getAttribute("rowspan");h&&d.setAttribute("colspan",h),b&&d.setAttribute("rowspan",b),d.innerHTML=g.innerHTML,u.appendChild(d)}i.appendChild(u)}),t.replaceWith(i)}),r.body.innerHTML}catch{return e}}export{mt as a,Tt as b,ct as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import k from"./K37GTMOF.js";import j from"./V6TM3MTN.js";import i from"./JBNITHPO.js";import f from"./ETD76QRC.js";import e from"./HOCTVCHH.js";import d from"./RNLQZV6U.js";import c from"./IDZTJLVN.js";import b from"./IW43UAIS.js";import a from"./I76F57I2.js";import"./ADYIXCSG.js";import{a as g,b as h}from"./4RZPOYZ7.js";import"./6LZ6GOHF.js";import"./CJIV4KJZ.js";import"./IKEF7ZHH.js";import"./WNS5ZUF5.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export default $arcgis.t(([C,I,{b:u,c:y,f:w,i:v,j:A,k:S,l:b,m:d,n:p,o:M,p:E,q:P,r:T,s:W,t:x},{a:f,b:V},,O,,L,D,k,R])=>{var U=async e=>{let a=e.allLayers.toArray(),s=[],o=new Map;for(let t of a)if(t instanceof C){let i=(async()=>{let n=await W(t),r=await x(t,n);o.set(t.id,{layerItem:r,fieldRegistry:n})})();s.push(i)}return await Promise.all(s),o},j=async e=>{await I.whenOnce(()=>e.ready);let a=await U(e.map),{layers:s}=await q(a),o={schemaVersion:v,modified:Date.now(),embeddings:{modelProvider:S,model:b,dimensions:A,templates:{layer:d,field:p}},layers:s},t=M.safeParse(o);if(!t.success)throw console.error("Schema Mismatch:",t.error.format()),new Error("Webmap embedding generation failed validation.");return t.data},q=async e=>{let a=[],s=[];for(let[i,{fieldRegistry:n,layerItem:r}]of e.entries()){let l=H(d,{name:r.name,title:r.title,description:r.description});a.push(l);let m={id:i,name:r.name??"",title:r.title,description:r.description,vector:[],fields:[]};for(let[,c]of n.entries()){let N=H(p,{name:c.name,alias:c.alias,description:c.description});a.push(N),m.fields.push({name:c.name,alias:c.alias,description:c.description,vector:[]})}s.push(m)}let o=await f(a),t=0;return{layers:s.map(i=>(i.vector=o[t++],i.fields.forEach(n=>{n.vector=o[t++]}),i))}},H=(e,a)=>e.replace(/\{(\w+)\}/gu,(s,o)=>a[o]??""),z=(e,a)=>{if(e.length!==a.length)throw new Error("Vectors must be the same length");let s=0,o=0,t=0;for(let r=0;r<e.length;++r){let l=e[r],m=a[r];s+=l*m,o+=l*l,t+=m*m}let i=Math.sqrt(o*t);if(i===0)return 0;let n=s/i;return Math.max(-1,Math.min(1,n))},_=E,ee=P,ae=T,te=g,se=f,re=z,oe=O,ie=L,ne=R,me=k,ce=D,le=j,de=()=>u(),pe=()=>y(),fe=async(e,a)=>await h(e,a),ge=async({modelTier:e="default",temperature:a=0,config:s}={})=>await w({modelTier:e,temperature:a,config:s});return{ArcgisKnowledgeAgent:ce,DataExplorationAgent:ne,HelpAgent:me,LayerStylingAgent:ie,NavigationAgent:oe,Orchestrator:V,cosineSimilarity:re,createAgentRuntimeState:de,createAgentRuntimeStateWithSharedState:pe,createChatModel:ge,createWebmapEmbeddings:le,getEmbeddings:se,invokeStructuredPrompt:ee,invokeTextPrompt:_,invokeToolPrompt:ae,sendTraceMessage:te,sendUXSuggestion:fe}},"layers/FeatureLayer","core/reactiveUtils",a,b,c,d,e,f,i,j,k)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./WAVKMZA6.js";import{c as l}from"./CVHJMR5X.js";import"./CJIV4KJZ.js";import"./IKEF7ZHH.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export default $arcgis.t(([{property:g,subclass:u},{d:w}])=>{var f=Object.defineProperty,m=Object.getOwnPropertyDescriptor,c=(o,r,n,s)=>{for(var e=s>1?void 0:s?m(r,n):r,a=o.length-1,t;a>=0;a--)(t=o[a])&&(e=(s?t(r,n,e):t(e))||e);return s&&e&&f(r,n,e),e},p=class extends w{constructor(o){super(o)}getAgents(){return this.workflow.getAgents()}generate(){let o=this.workflow.generate(),r=o.workspace,n=o.createGraph().compile(),{decideContinue:s}=this,e={[i]:async(t,d)=>await n.invoke(t,d)},a=[{from:i,decide:async(t,d)=>await Promise.resolve(s(t,d))?i:void 0}];return{workspace:r,createGraph:()=>l(e,a,r,{entryNode:i})}}buildEdges(){throw new Error("LoopWorkflow overrides generate(); buildEdges should not be called.")}getEntryNode(){return i}isTerminalAgent(){return!0}};c([g()],p.prototype,"workflow",2);c([g()],p.prototype,"decideContinue",2);p=c([u("LoopWorkflow")],p);var i="__loop_body";return p},"core/accessorSupport/decorators",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as u,b as S,c as v}from"./
|
|
2
|
+
import{a as u,b as S,c as v}from"./LODKJRS4.js";import b from"./L77BTGXY.js";import{b as f,c as y}from"./CVHJMR5X.js";import a from"./I76F57I2.js";import"./ADYIXCSG.js";import"./4RZPOYZ7.js";import{c as d}from"./XVQJBUMY.js";import{b as c}from"./6LZ6GOHF.js";import{O as g,u as l}from"./CJIV4KJZ.js";import"./IKEF7ZHH.js";import"./WNS5ZUF5.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export default $arcgis.t(([,,{watch:T},,,{property:m,subclass:_},{f:h},w])=>{var k=Object.defineProperty,x=Object.getOwnPropertyDescriptor,a=(e,s,t,r)=>{for(var o=r>1?void 0:r?x(s,t):s,n=e.length-1,p;n>=0;n--)(p=e[n])&&(o=(r?p(s,t,o):p(o))||o);return r&&o&&k(s,t,o),o},i=class extends w{constructor(e){super(e),this.modelTier="default"}initialize(){this.addHandles(T(()=>[this.description,this.inputSchema,this.modelTier,this.name,this.outputSchema,this.prompt,this.tools],()=>{this.generate()},{initial:!0,sync:!0}))}getSchemas(){return[this.inputSchema,this.outputSchema].filter(Boolean)}generate(){let e=f(this.getSchemas());this._set("workspace",e);let s=this.id,t={[s]:this._invoke.bind(this)},r=[{from:s,decide:()=>{}}];this._set("createGraph",()=>y(t,r,e,{agent:this,entryNode:s,middlewares:this.middlewares}))}async _invoke(e,s){try{return this.outputSchema?await this._invokeStructured(e,s):await this._invokeUnstructured(e,s)}catch(t){if(l(t))throw t;let r=t instanceof Error?t.message:String(t);return u({outputMessage:r},"failed",r)}}async _invokeStructured(e,s){if(!this.outputSchema)throw new Error("Output schema is required for structured invocation.");let t=await c({model:await h({modelTier:this.modelTier}),systemPrompt:await this._getPromptWithInputVariables(e),tools:this._getTools(),checkpointer:!0,middleware:d(this.middlewares),responseFormat:this.outputSchema}).invoke({messages:e.agentExecutionContext.messages},s);if(!("structuredResponse"in t)||t.structuredResponse===void 0)throw new Error("LLMAgent did not receive structured output from createAgent.");return S(t.structuredResponse,this.outputSchema,t.messages)}async _invokeUnstructured(e,s){let t=(await c({model:await h({modelTier:this.modelTier}),systemPrompt:await this._getPromptWithInputVariables(e),tools:this._getTools(),checkpointer:!0,middleware:d(this.middlewares)}).invoke({messages:e.agentExecutionContext.messages},s)).messages,r=t.at(-1)?.content??"",o=typeof r=="string"?r:JSON.stringify(r),n=o.trim()||"LLMAgent completed.";return u({agentExecutionContext:{...e.agentExecutionContext,messages:t},outputMessage:o},"success",n)}async _getPromptWithInputVariables(e){let s=v(e,this.inputSchema);for(let{outputKey:t}of this.middlewares)t&&(s[String(t)]=e[t]);return await g.fromTemplate(this.prompt).format(s)}_getTools(){return this.tools?.map(e=>e.getTool())??[]}};a([m()],i.prototype,"prompt",2);a([m()],i.prototype,"tools",2);a([m()],i.prototype,"inputSchema",2);a([m()],i.prototype,"outputSchema",2);a([m()],i.prototype,"modelTier",2);i=a([_("LLMAgent")],i);return i},"identity/IdentityManager","portal/Portal","core/reactiveUtils","layers/FeatureLayer","request","core/accessorSupport/decorators",a,b)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import b from"./IW43UAIS.js";import{a as I}from"./434TAA3J.js";import{a as E}from"./PBTINZTK.js";import a from"./I76F57I2.js";import{a as D}from"./E2HENO3T.js";import"./QSA4T3BU.js";import{a as R}from"./5W7S2RS4.js";import"./NXKKG5TK.js";import{g as $,h as c,k as C,l as P,n as d,t as _,u as y,v as T,x as k,z as A}from"./MAV3DW27.js";import"./ADYIXCSG.js";import"./4RZPOYZ7.js";import"./6LZ6GOHF.js";import"./CJIV4KJZ.js";import"./IKEF7ZHH.js";import"./WNS5ZUF5.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export default $arcgis.t(([N,{whenOnce:U,watch:B,when:V},j,q,,,H,{property:m,subclass:F},,{b:L}])=>{var G=$`:host{display:block;width:var(--arcgis-internal-panel-width, 100%);height:var(--arcgis-internal-expand-max-height, 100%);--calcite-panel-content-bottom-space: 0}.footer-container{display:flex;flex-direction:column;flex:1 1 0;gap:var(--calcite-spacing-md)}.content-container{display:flex;flex-direction:column;flex:1 1 0;min-height:0;position:relative;overflow:auto}.suggested-prompts-container{display:flex;justify-content:center;width:100%;background:var(--calcite-panel-background-color, var(--calcite-color-background))}.suggested-prompts{display:block;padding:var(--calcite-spacing-md);max-width:100%;box-sizing:border-box}.error-notice{padding:var(--calcite-spacing-sm)}.interrupt-waiting-message{font-style:italic;color:var(--calcite-color-text-2)}`;function S(o){return o.trim()?E.lexer(o).filter(t=>t.type!=="space").map(t=>E.parser([t])):[]}var f=class{constructor(){this._stableParts=[],this._stableText="",this._rawText=""}push(t){return this._rawText+=t,this._advanceStableBoundary(),this.getParts()}finalize(){let t=this._rawText.slice(this._stableText.length);return t.trim()&&(this._stableParts.push(...S(t)),this._stableText=this._rawText),this._stableParts}getParts(){let t=this._trimIncompleteTail(this._rawText.slice(this._stableText.length)),s=t.trim()?S(t):[];return[...this._stableParts,...s]}reset(){this._stableParts=[],this._stableText="",this._rawText=""}_advanceStableBoundary(){let t=this._rawText.slice(this._stableText.length),s=this._lastSafeBoundary(t);if(s<=0)return;let i=t.slice(0,s);this._stableParts.push(...S(i)),this._stableText+=i}_lastSafeBoundary(t){let s=t.split(`
|
|
3
|
+
`),i=!1,e=0,n=0;for(let r of s)/^\s*(```|~~~)/u.test(r)&&(i=!i),n+=r.length+1,r.trim()===""&&!i&&(e=n);return e<t.length?e:0}_trimIncompleteTail(t){let s=t.lastIndexOf("<");if(s!==-1&&!t.includes(">",s))return t.slice(0,s);let i=this._earliestUnclosedTag(t);if(i!==-1)return t.slice(0,i);let e=t.lastIndexOf("[");if(e!==-1){let n=t.slice(e);if(!/\[[^\]]*\]\([^)]*\)/u.test(n))return t.slice(0,e)}return t}_earliestUnclosedTag(t){let s=new Set(["br","img","hr","input","meta","link","area","base","col","embed","source","track","wbr"]),i=/<(\/?)([a-zA-Z][\w-]*)\b[^>]*?(\/?)>/gu,e=[];for(let n=i.exec(t);n;n=i.exec(t)){let[,r,a,l]=n,h=a.toLowerCase();if(!(s.has(h)||l==="/"))if(r==="/"){for(let g=e.length-1;g>=0;g--)if(e[g].name===h){e.splice(g);break}}else e.push({name:h,index:n.index})}return e.length?e[0].index:-1}};function W(o){let t=new f;return t.push(o),t.finalize()}var Y=async o=>await new Promise(t=>setTimeout(t,o));async function*Z(o,{chunkSize:t=15,delay:s=50}={}){let i=new f;for(let e=0;e<o.length;e+=t)yield i.push(o.slice(e,e+t)),await Y(s);yield i.finalize()}var J=Object.defineProperty,K=Object.getOwnPropertyDescriptor,u=(o,t,s,i)=>{for(var e=i>1?void 0:i?K(t,s):t,n=o.length-1,r;n>=0;n--)(r=o[n])&&(e=(i?r(t,s,e):r(e))||e);return i&&e&&J(t,s,e),e},O=o=>!o||typeof o!="object"?!1:o.name==="AbortError";async function*z(o,t,s,i,e=!1){if(e){if(i?.aborted){yield{type:"cancelled",log:s,runId:t};return}yield{type:"block-data",blockType:"text",data:{parts:W(o)},runId:t};return}for await(let n of Z(o)){if(i?.aborted){yield{type:"cancelled",log:s,runId:t};return}yield{type:"block-data",blockType:"text",data:{parts:n},runId:t}}}var p=class extends H{constructor(o){super(o),this.view=null,this.streamingDisabled=!1,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 U(()=>!this.view.updating),this._set("orchestrator",await L.init({agents:[...this.agents],view:this.view??void 0})),this.addHandles([B(()=>[this.view,this.agents],()=>{this._initialize()})])}clearChatHistory(){this.orchestrator?.newConversation()}async*ask(o,t){if(!this.orchestrator)throw new Error("Orchestrator not initialized yet.");this._set("processing",!0),this._set("processingStep","");let s=[],i,e="pending";try{let n=this.orchestrator.ask(o);for await(let r of n)switch(e=r.runId,r.type){case"trace":{this._set("processingStep",r.data.text),s.push(r.data.text);break}case"completed":{this._set("processing",!1),this._set("processingStep","");let a=r.result,l=!!a.content.length,h=!!i?.length;if(!l&&!h){yield{type:"completed",error:"No response received.",log:s,runId:e};return}let g=a.content;if(yield{type:"block-start",blockType:"text",runId:e},yield*z(g,e,s,t,this.streamingDisabled),yield{type:"block-end",blockType:"text",runId:e},h)for(let v of i){if(t?.aborted){yield{type:"cancelled",log:s,runId:e};return}let{type:b,data:w}=v;if(yield{type:"block-start",blockType:b,runId:e},b==="text"){let M=typeof w?.content=="string"?w.content:"";yield*z(M,e,s,t,this.streamingDisabled)}else yield{type:"block-data",blockType:b,data:w,runId:e};yield{type:"block-end",blockType:b,runId:e}}yield{type:"completed",response:g,blocks:i,log:s,runId:e};return}case"ux-suggestion":{let a=r.suggestion;i=i?[...i,a]:[a];break}case"interrupt":{let{kind:a,message:l,metadata:h}=r.interrupt,g=Array.isArray(h)?h.filter(b=>typeof b=="string"):[],v=(()=>{switch(a){case"booleanChoice":return{type:"boolean-choice",message:l,options:g};case"singleSelection":return{type:"single-select",message:l,options:g};case"multipleSelection":return{type:"multi-select",message:l,options:g};case"textInput":return{type:"text-input",message:l};default:return{type:a,message:l,options:g}}})();this._set("processingStep","Waiting for user input..."),yield{type:"interrupt",payload:v,runId:e};break}case"cancelled":{yield{type:"cancelled",log:s,runId:e};return}case"error":{if(t?.aborted||O(r.error)){yield{type:"cancelled",log:s,runId:e};return}yield{type:"completed",error:r.error.message,log:s,runId:e};return}default:{console.warn("Unknown event type:",r);break}}}catch(n){if(t?.aborted||O(n)){yield{type:"cancelled",log:s,runId:e};return}console.warn("Error during message processing:",n),yield{type:"completed",error:"An error occurred during message processing.",log:s,runId:"error"};return}finally{this._set("processing",!1)}}cancel(){this.orchestrator?.cancel()}};u([m({readOnly:!0})],p.prototype,"orchestrator",2);u([m()],p.prototype,"agents",2);u([m()],p.prototype,"portal",2);u([m()],p.prototype,"view",2);u([m()],p.prototype,"streamingDisabled",2);u([m({readOnly:!0})],p.prototype,"loading",2);u([m({readOnly:!0})],p.prototype,"processing",2);u([m({readOnly:!0})],p.prototype,"processingStep",2);p=u([F("OrchestratorController")],p);var Q="Embeddings resource 'embeddings-v01.json' not found in the webmap portal item.",X="Embeddings not found for this web map.",tt="https://developers.arcgis.com/javascript/latest/agentic-apps/ai-webmap-setup/#embeddings",x=class extends T{constructor(){super(...arguments),this._messages=D({blocking:!0}),this.#t=_(),this.#l=_(),this.#s=_(),this.#e=null,this.#r=new Map,this.#i=j.getDefault(),this.#a=t=>{t.stopPropagation(),this.cancelInterrupt()},this.#n=t=>{t.stopPropagation();let s=t.detail;this.submitInterrupt(s)},this.#c=t=>{t.stopPropagation(),this.keepSuggestedPrompts||(this.suggestedPrompts=[]);let s=t.detail;this._inputValue="",this.arcgisSubmit.emit(s),this.submitMessage(s)},this.#h=t=>{if(this._canceling=!0,t.stopPropagation(),this.arcgisCancel.emit(),this._interrupt){this.orchestrator?.cancelInterrupt(),this._interrupt=null;return}this._orchestratorController?.cancel(),this.#e?.abort(),this.#e=null},this.#g=t=>{t.stopPropagation();let s=t.detail;this.arcgisFeedback.emit(s)},this.#d=t=>{t.stopPropagation();let s=t.detail;this._inputValue=s.prompt,this.arcgisPromptSelect.emit(s)},this.#p=t=>{this.arcgisSlottableRequest.emit(t.detail)},this._orchestratorController=null,this._interrupt=null,this._interruptDetails=[],this._error=null,this._inputValue="",this._isAnswering=!1,this._canceling=!1,this.messages=new N([]),this.referenceElement=null,this.suggestedPrompts=[],this.feedbackEnabled=!1,this.keepSuggestedPrompts=!1,this.streamingDisabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.voiceInputEnabled=!1,this.readAloudEnabled=!1,this.assistantAvatarEnabled=!1,this.arcgisCancel=d(),this.arcgisError=d(),this.arcgisFeedback=d(),this.arcgisInterrupt=d(),this.arcgisInterruptCancel=d(),this.arcgisInterruptSubmit=d(),this.arcgisPromptSelect=d(),this.arcgisReady=d(),this.arcgisSubmit=d(),this.arcgisSlottableRequest=d({bubbles:!1,composed:!1}),this.arcgisResponse=d()}static{this.properties={_orchestratorController:16,_interrupt:16,_interruptDetails:16,_error:16,_inputValue:16,_isAnswering:16,_signedInUserId:16,_canceling:16,_isSignedIn:16,_user:16,awaitingResponse:32,awaitingResponseStep:32,interrupt:32,messages:0,orchestrator:32,entryMessage:1,heading:1,description:1,referenceElement:1,suggestedPrompts:0,feedbackEnabled:5,keepSuggestedPrompts:5,streamingDisabled:5,logEnabled:5,copyEnabled:5,voiceInputEnabled:5,readAloudEnabled:5,assistantAvatarEnabled:5}}static{this.styles=G}#t;#l;#s;#e;#r;#i;#a;#n;#c;#h;#g;#d;#p;async#o(){try{let t=R(this.el,this.referenceElement);await t?.componentOnReady();let s=[...this.#r.values()];return s.length?(this._orchestratorController?.destroy(),this._orchestratorController=new p({agents:s,portal:this.#i,streamingDisabled:this.streamingDisabled,view:t?.view}),await this._orchestratorController.load(),!0):(this._error="No agents found.",!1)}catch(t){return this._error=t?.message??"Error initializing orchestrator.",P(this)(t),!1}}get _isSignedIn(){return!!this.#i?.user||!!this._signedInUserId}get _user(){return this.#i?.user?.fullName||this.#i?.user?.username}get awaitingResponse(){return this._orchestratorController?.processing??!1}get awaitingResponseStep(){return this._orchestratorController?.processingStep??""}get interrupt(){return this._interrupt}get orchestrator(){return this._orchestratorController?.orchestrator}async clearChatHistory(){this._reset(),this._orchestratorController?.clearChatHistory()}cancelInterrupt(){this.arcgisInterruptCancel.emit(),this.orchestrator?.cancelInterrupt(),this._interrupt=null}register(t){this.#r.set(t.agent.id,t),this._orchestratorController&&this.#o()}unregister(t){this.#r.delete(t),this._orchestratorController&&this.#o()}async submitMessage(t){let s=t.trim();if(!s||(this.messages.push({id:Date.now().toString(),role:"user",content:s}),!this._orchestratorController))return;this.#e=new AbortController,this._orchestratorController.streamingDisabled=this.streamingDisabled;let i=this._orchestratorController.ask(s,this.#e?.signal);for await(let e of i){let n=e.runId,r=this.messages.at(-1);switch(e.type){case"block-start":{this._isAnswering=!0;let a={type:e.blockType,isPending:!0};if(r?.role==="assistant"&&r.id===n){let l=[...r.blocks??[],a];this.messages.splice(-1,1,{...r,blocks:l})}else this.messages.push({role:"assistant",blocks:[a],id:n,isStreaming:!0,interrupts:this._interruptDetails}),this._interruptDetails=[];break}case"block-data":{if(r?.role!=="assistant"||r?.id!==n)break;let a=[...r.blocks??[]],l=a[a.length-1],{blockType:h,data:g}=e;if(l?.type!==h||!l.isPending)break;h==="text"?a[a.length-1]={...l,data:{...l.data,parts:g?.parts}}:a[a.length-1]={...l,data:{...l.data,...g??{}}},this.messages.splice(-1,1,{...r,blocks:a});break}case"block-end":{if(r?.role!=="assistant"||r?.id!==n)break;let a=[...r.blocks??[]],l=a[a.length-1];if(l?.type!==e.blockType||!l.isPending)break;let h=l;a[a.length-1]={...h,data:{...h.data},isPending:!1},this.messages.splice(-1,1,{...r,blocks:a});break}case"completed":e.error?(this.messages.push({role:"assistant",log:e.log,error:e.error,id:n,interrupts:this._interruptDetails}),this._interruptDetails=[]):r?.role==="assistant"&&r.id===n&&this.messages.splice(-1,1,{...r,content:e.response,blocks:r.blocks?.map(a=>({...a,data:{...a.data},isPending:!1}))??[],isStreaming:!1,log:e.log}),this._isAnswering=!1,this.#e=null,this._canceling=!1;break;case"interrupt":this._interrupt={...e.payload,id:n},this.arcgisInterrupt.emit(this._interrupt);break;case"cancelled":r?.role==="assistant"&&r.id===n?this.messages.splice(-1,1,{...r,blocks:r.blocks?.filter(a=>a.type==="text"||!a.isPending)??[],isStreaming:!1,log:e.log,error:"(Stopped by user)"}):(this.messages.push({role:"assistant",log:e.log,error:"(Stopped by user)",id:n,interrupts:this._interruptDetails}),this._interruptDetails=[]),this._isAnswering=!1,this.#e=null,this._canceling=!1;break}}}submitInterrupt(t){this.arcgisInterruptSubmit.emit(t),this._interrupt&&(this._interruptDetails=[...this._interruptDetails,{interrupt:this._interrupt,response:t}]),this.orchestrator?.resumeInterrupt(t),this._interrupt=null}load(){this.manager.onLifecycle(this._reset.bind(this))}loaded(){this.manager.onLifecycle(()=>{this.#t.value?.addEventListener("arcgisPromptSelect",this.#d),this.#t.value?.addEventListener("arcgisSubmit",this.#c),this.#t.value?.addEventListener("arcgisCancel",this.#h),this.#t.value?.addEventListener("arcgisFeedback",this.#g);let t=V(()=>!!this._interrupt&&!!this.#s.value,()=>{let i=this.#s.value;i.removeEventListener("arcgisSubmit",this.#n),i.removeEventListener("arcgisCancel",this.#a),i.addEventListener("arcgisSubmit",this.#n,{once:!0}),i.addEventListener("arcgisCancel",this.#a,{once:!0})}),s=this.messages.on("after-add",i=>{let e=i.item;e.role==="assistant"&&(e.error||e.content)&&this.arcgisResponse.emit(e)});return queueMicrotask(()=>{this.#o().then(i=>{i?this.arcgisReady.emit():this._error&&this.arcgisError.emit(new Error(this._error))})}),()=>{t.remove(),s.remove(),this.#t.value?.removeEventListener("arcgisPromptSelect",this.#d),this.#s.value?.removeEventListener("arcgisSubmit",this.#n),this.#s.value?.removeEventListener("arcgisCancel",this.#a),this.#t.value?.removeEventListener("arcgisSubmit",this.#c),this.#t.value?.removeEventListener("arcgisCancel",this.#h),this.#t.value?.removeEventListener("arcgisFeedback",this.#g),this._orchestratorController?.destroy(),this._orchestratorController=null}})}_reset(){this._orchestratorController?.cancel(),this.#e?.abort(),this._interrupt=null,this.messages.removeAll(),this._error=null,this._inputValue="",this._signedInUserId=void 0}_renderEntryMessage(){return this._isSignedIn?this._error?this._renderErrorNotice():this.entryMessage?this.messages.length>0?null:c`<calcite-notice open kind=brand closable icon width=full><div slot=message>${this.entryMessage}</div></calcite-notice>`:c`<slot name=entry-message></slot>`:this._renderSignInNotice()}_renderSignInNotice(){let t=this.#i;return c`<calcite-notice slot=entry-message open kind=brand icon width=full><div slot=message>You need to sign in to use the assistant chat.</div>${t?c`<calcite-link slot=link @click=${async()=>{try{let s=await q.getCredential(`${t.url}/sharing`);this._signedInUserId=s.userId,this._error=null,this.requestUpdate(),await this.#o()?this.arcgisReady.emit():this._error&&this.arcgisError.emit(new Error(this._error))}catch(s){this._error=s?.message??"Error signing in.",this.arcgisError.emit(new Error(this._error)),C("error",this,"Error signing in:",{detail:{error:s}})}}} target=_blank title="Sign in to ArcGIS Online">Sign in</calcite-link>`:c`<div slot=link>No portal information available</div>`}</calcite-notice>`}_renderErrorNotice(){return this._error?c`<calcite-notice slot=entry-message open kind=brand icon width=full>${this._error===Q?c`<div slot=message>${X}</div><calcite-link slot=link .href=${tt} target=_blank title="Learn about web map embeddings">Read more</calcite-link>`:c`<div slot=message>${this._error}</div>`}</calcite-notice>`:null}render(){return c`<calcite-panel .loading=${!this._orchestratorController&&!this._error||this._orchestratorController?.loading} .heading=${this.heading??this._messages.assistantLabel} .description=${this.description} ${y(this.#t)}><slot name=header-actions-start slot=header-actions-start></slot><slot name=header-actions-end slot=header-actions-end></slot><div class="content-container"><arcgis-assistant-chat .loading=${this.awaitingResponse} .messages=${this.messages} .interrupt=${this._interrupt}><slot name=message-starter slot=message-starter></slot><slot name=messages slot=messages>${this.messages.map(t=>t.role==="assistant"?c`<arcgis-assistant-message .message=${t} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled} .readAloudEnabled=${this.readAloudEnabled} @arcgisSlottableRequest=${this.#p} .assistantAvatarEnabled=${this.assistantAvatarEnabled}>${t.blocks?.map((s,i)=>c`<slot name=${I(t.id,i)??k} slot=${I(t.id,i)??k}><arcgis-assistant-message-block .block=${s}></arcgis-assistant-message-block></slot>`)}</arcgis-assistant-message>`:c`<arcgis-assistant-user-message .message=${t} .user=${this._user}></arcgis-assistant-user-message>`)}</slot>${this._interrupt?c`<div slot=message-loading><div class="interrupt-waiting-message">waiting for user input...</div></div>`:c`<slot name=message-loading slot=message-loading><arcgis-assistant-message-loading .loading=${this.awaitingResponse} .loadingMessage=${this.awaitingResponseStep} .assistantAvatarEnabled=${this.assistantAvatarEnabled} .interrupts=${this._interruptDetails}></arcgis-assistant-message-loading></slot>`}</arcgis-assistant-chat></div>${this._interrupt?c`<slot name=interrupt><arcgis-assistant-interrupt slot=content-bottom .type=${this._interrupt.type} .message=${this._interrupt.message} .options=${this._interrupt.options} ${y(this.#s)}></arcgis-assistant-interrupt></slot>`:this.suggestedPrompts?.length?c`<div class="suggested-prompts-container" slot=content-bottom><arcgis-assistant-suggested-prompts class="suggested-prompts" .prompts=${this.suggestedPrompts}></arcgis-assistant-suggested-prompts></div>`:null}<div class="footer-container" slot=footer>${this._renderEntryMessage()}<slot name=chat-entry><arcgis-assistant-chat-entry .awaitingResponse=${this.awaitingResponse||this._isAnswering} .inputValue=${this._inputValue} .messages=${this.messages} .voiceInputEnabled=${this.voiceInputEnabled} .disabled=${this._canceling||!this._isSignedIn||!!this._interrupt} ${y(this.#l)}><slot name=entry-actions-start slot=entry-actions-start></slot><slot name=entry-actions-end slot=entry-actions-end><calcite-button .iconStart=${this.awaitingResponse||this._isAnswering?"circle-stop":"send"} @click=${()=>{this.#l.value?.submitMessage()}} round>${this.awaitingResponse||this._isAnswering?this._messages.stopButtonLabel:this._messages.askButtonLabel}</calcite-button></slot></arcgis-assistant-chat-entry></slot><slot name=footer-content></slot></div></calcite-panel>`}};A("arcgis-assistant",x);return x},"core/Collection","core/reactiveUtils","portal/Portal","identity/IdentityManager","config","layers/FeatureLayer","core/Accessor","core/accessorSupport/decorators",a,b)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import b from"./IDZTJLVN.js";import a from"./I76F57I2.js";import{a as p}from"./4RZPOYZ7.js";import{a as u,b as i,ta as c}from"./CJIV4KJZ.js";export default $arcgis.t(([,,,,,,{r:g},{I:d,J:E,a:h,m:f,n:y,o:m,p:x}])=>{var S=[E],_=e=>{if(!e||e.size===0)return"No layers available in this map.";let t=Array.from(e.values()).map(({layerItem:r,fieldRegistry:a},s)=>{let o=Array.from(a.values()).map(n=>n.name).slice(0,10).join(", "),l=a.size>10?` (and ${a.size-10} more)`:"";return`${s+1}. "${r.title}". Description: ${r.description}
|
|
3
|
+
Fields: ${o}${l}`}).join(`
|
|
4
|
+
|
|
5
|
+
`);return`This map contains ${e.size} layer(s):
|
|
6
|
+
|
|
7
|
+
${t}`},v=e=>{let t=e?.list()??[];return t.length?t.map(r=>`- ${r.agent.name}: ${r.agent.description}`).join(`
|
|
8
|
+
`):"No agents currently available."};async function $(e,t){let r=await f("help_prompt"),a=m(t,"layersAndFieldsRegistry"),s=m(t,"agentRegistry");try{let o=await g({promptText:r,modelTier:"fast",config:t,tools:S,inputVariables:{layerSummary:_(a),agents:v(s),assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps}}),l=(o.tool_calls?.length??0)>0,n=typeof o.text=="string"?o.text.trim():"";return{...e,helpInternalState:{...e.helpInternalState,toolCallMessage:l?o:void 0},outputMessage:l?e.outputMessage:n,summary:l?"Prepared help tool call from assigned task.":"Provided map-related help based on the assigned task.",status:l?e.status:"success"}}catch(o){let l=o instanceof Error?o.message:String(o);return{...e,outputMessage:`Error invoking help agent: ${l}`,summary:"Help agent execution failed.",status:"failed"}}}var b=(e,t)=>x(["agentRegistry"],"Help Agent")(e,t);async function w(e,t){let r=new h(S,{handleToolErrors:!1});try{let a=e.helpInternalState.toolCallMessage;if(!a)throw new Error("helpToolCalling: missing helpInternalState.toolCallMessage");let s=(await r.invoke({messages:[a]},t)).messages.map(o=>o.text).join(`
|
|
9
|
+
`);return await p({text:`Finished executing help tool: ${s}`},t),{...e,outputMessage:s,status:"success",summary:s?y(s):"Help executed.",helpInternalState:{...e.helpInternalState,toolCallMessage:void 0}}}catch(a){let s=a instanceof Error?a.message:String(a);return await p({text:`Help tool execution failed: ${s}`},t),{...e,outputMessage:`Help tool execution failed: ${s}`,status:"failed",summary:`Help tool execution failed: ${s}`,helpInternalState:{...e.helpInternalState,toolCallMessage:void 0}}}}var C=()=>new c(d).addNode("requireHelpServices",b).addNode("agent",$).addNode("tools",w).addEdge(u,"requireHelpServices").addEdge("requireHelpServices","agent").addConditionalEdges("agent",e=>e.helpInternalState.toolCallMessage?"tools":i).addEdge("tools",i),H=String.raw`- **help** — Enables users to ask questions about the map, layers, fields, and it's capabilities.
|
|
10
|
+
|
|
11
|
+
_Example: “Tell me about this map”_
|
|
12
|
+
_Example: “List all layers in this map”_
|
|
13
|
+
_Example: “List fields in protected areas layer”_
|
|
14
|
+
_Example: “What agents are available to me?”_
|
|
15
|
+
_Example: “What can you do?”_
|
|
16
|
+
_Example: “What can I ask”_
|
|
17
|
+
|
|
18
|
+
If the user asks unrelated queries like "What are the vowels in English alphabet" or "How to cook", call this agent so it can politely refuse and redirect to map-related questions.
|
|
19
|
+
|
|
20
|
+
IF the user asks map related queries, but those that are not performed by any of the agents, call this agent so we can respond that the requested action is not supported.
|
|
21
|
+
_Example: "Create a chart"_
|
|
22
|
+
_Example: "Create a table"_`,P={id:"help",name:"Help Agent",description:H,createGraph:C,workspace:d};return P},"identity/IdentityManager","portal/Portal","config","core/reactiveUtils","layers/FeatureLayer","request",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{$ as M,A as z,Aa as ia,B as A,Ba as ja,C as B,Ca as ka,Da as la,R as C,S as D,T as E,U as F,V as G,W as H,X as I,Y as J,Z as K,_ as L,a,aa as N,b,ba as O,c,ca as P,d,da as Q,e,f,fa as R,ga as S,h as g,ha as T,i as h,ia as U,j as i,ja as V,k as j,ka as W,l as k,la as X,m as l,ma as Y,n as m,na as Z,o as n,oa as _,p as o,pa as $,q as p,qa as aa,r as q,s as r,t as s,ta as ba,u as t,ua as ca,v as u,va as da,w as v,wa as ea,x as w,xa as fa,y as x,ya as ga,z as y,za as ha}from"./
|
|
2
|
+
import{$ as M,A as z,Aa as ia,B as A,Ba as ja,C as B,Ca as ka,Da as la,R as C,S as D,T as E,U as F,V as G,W as H,X as I,Y as J,Z as K,_ as L,a,aa as N,b,ba as O,c,ca as P,d,da as Q,e,f,fa as R,ga as S,h as g,ha as T,i as h,ia as U,j as i,ja as V,k as j,ka as W,l as k,la as X,m as l,ma as Y,n as m,na as Z,o as n,oa as _,p as o,pa as $,q as p,qa as aa,r as q,s as r,t as s,ta as ba,u as t,ua as ca,v as u,va as da,w as v,wa as ea,x as w,xa as fa,y as x,ya as ga,z as y,za as ha}from"./CJIV4KJZ.js";import"./IKEF7ZHH.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export{L as Annotation,H as AsyncBatchedStore,J as BaseChannel,E as BaseCheckpointSaver,k as BaseLangGraphError,G as BaseStore,K as BinaryOperatorAggregate,d as COMMAND_SYMBOL,i as Command,e as CommandInstance,ca as CompiledStateGraph,b as END,v as EmptyChannelError,u as EmptyInputError,R as Graph,l as GraphBubbleUp,o as GraphInterrupt,m as GraphRecursionError,n as GraphValueError,c as INTERRUPT,I as InMemoryStore,w as InvalidUpdateError,F as MemorySaver,da as MessageGraph,ia as MessagesAnnotation,aa as MessagesValue,ja as MessagesZodMeta,ka as MessagesZodState,x as MultipleSubgraphsError,p as NodeInterrupt,g as Overwrite,q as ParentCommand,_ as REMOVE_ALL_MESSAGES,X as ReducedValue,z as RemoteException,a as START,f as Send,ba as StateGraph,A as StateGraphInputError,Z as StateSchema,y as UnreachableNodeError,Y as UntrackedValue,W as UntrackedValueChannel,$ as addMessages,D as copyCheckpoint,C as emptyCheckpoint,ga as entrypoint,O as getConfig,P as getCurrentTaskInput,U as getJsonSchemaFromSchema,ha as getPreviousState,V as getSchemaDefaultGetter,M as getStore,B as getSubgraphsSeenSet,N as getWriter,Q as interrupt,j as isCommand,s as isGraphBubbleUp,t as isGraphInterrupt,h as isInterrupted,r as isParentCommand,T as isSerializableSchema,S as isStandardSchema,$ as messagesStateReducer,ea as pushMessage,fa as task,la as writer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as s,b as i}from"./5W7S2RS4.js";import{c as r}from"./NXKKG5TK.js";function c(e,n){let t=s(e.el,e.referenceElement);if(t)return t;let o=r(e.el,"arcgis-assistant"),a=s(e.el,o?.referenceElement);if(a)return a;throw new Error(`${n}: Reference element not found`)}function g(e,n){let t=c(e,n).view;if(!t)throw new Error(`${n}: Reference element does not have a view`);return t}function m(e){return typeof e=="function"}function w(e){let n=r(e.el,"arcgis-assistant");if(n===void 0)throw new Error("arcgis-assistant-agent must be used within an arcgis-assistant element");n.register({agent:e.agent,getContext:async()=>await e.getContext?.()??e.context??{}})}function f(e){let n=i(e.el,e.referenceElement);if(n)return n;let t=r(e.el,"arcgis-assistant");return s(e.el,t?.referenceElement)||null}function E(e){let n=f(e);return n?n.view:null}export{g as a,m as b,w as c,E as d};
|
|
2
|
+
import{a as s,b as i}from"./5W7S2RS4.js";import{c as r}from"./NXKKG5TK.js";function c(e,n){let t=s(e.el,e.referenceElement);if(t)return t;let o=r(e.el,"arcgis-assistant"),a=s(e.el,o?.referenceElement);if(a)return a;throw new Error(`${n}: Reference element not found`)}function g(e,n){let t=c(e,n).view;if(!t)throw new Error(`${n}: Reference element does not have a view`);return t}function m(e){return typeof e=="function"}function w(e){let n=r(e.el,"arcgis-assistant");if(n===void 0)throw new Error("arcgis-assistant-agent must be used within an arcgis-assistant element");return n.register({agent:e.agent,getContext:async()=>await e.getContext?.()??e.context??{}}),n}function f(e){let n=i(e.el,e.referenceElement);if(n)return n;let t=r(e.el,"arcgis-assistant");return s(e.el,t?.referenceElement)||null}function E(e){let n=f(e);return n?n.view:null}export{g as a,m as b,w as c,E as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as i,c}from"./
|
|
2
|
+
import{a as i,c}from"./CVHJMR5X.js";export default $arcgis.t(([m,{subclass:p}])=>{function a(t){return t?Object.keys(t.shape??{}):[]}function d(t){let e={};for(let n of t)for(let s of a(n))e[s]=void 0;return e}function g(t,e){return Object.fromEntries(e.filter(n=>Object.hasOwn(t,n)).map(n=>[n,t[n]]))}function l(t,e){return`${t.id}_${e}`}function h(t,e){let n=e.inputSchema;return n?{...g(t,a(n)),agentExecutionContext:t.agentExecutionContext,outputMessage:t.outputMessage,status:void 0,summary:""}:{...t,status:void 0,summary:""}}function x(t,e){return t.outputSchema?g(e,a(t.outputSchema)):{}}function y(t){let e={outputMessage:t.outputMessage,status:t.status,summary:t.summary};return t.agentExecutionContext&&(e.agentExecutionContext=t.agentExecutionContext),e}function v(t,e){return async(n,s)=>{let o=await t.run(h(n,t),s),r=x(t,o);return e||o.status==="failed"?{...r,...y(o)}:{...r,outputMessage:o.outputMessage}}}var w=Object.getOwnPropertyDescriptor,E=(t,e,n,s)=>{for(var o=s>1?void 0:s?w(e,n):e,r=t.length-1,u;r>=0;r--)(u=t[r])&&(o=u(o)||o);return o},f=class extends m{generate(){let t=this.getAgents();this.validateAgents(t);for(let r of t)r.generate();let e=d(t.flatMap(r=>r.getSchemas())),n=i(e),s=this.buildNodes(t),o=this.buildEdges(t);return{workspace:n,createGraph:()=>c(s,o,n,{entryNode:this.getEntryNode(t)})}}buildNodes(t){let e={};for(let[n,s]of t.entries())e[l(s,n)]=v(s,this.isTerminalAgent(t,n));return e}validateAgents(t){if(!t.length)throw new Error("Workflow requires at least one agent.")}};f=E([p("BaseWorkflow")],f);return{a:a,b:d,c:l,d:f}},"core/Accessor","core/accessorSupport/decorators")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import e from"./K37GTMOF.js";import d from"./HOCTVCHH.js";import c from"./IDZTJLVN.js";import b from"./I76F57I2.js";import{a,c as s}from"./W2JAKE2M.js";import"./5W7S2RS4.js";import"./NXKKG5TK.js";import{v as i,z as r}from"./MAV3DW27.js";import"./ADYIXCSG.js";import"./4RZPOYZ7.js";import"./6LZ6GOHF.js";import"./CJIV4KJZ.js";import"./IKEF7ZHH.js";import"./WNS5ZUF5.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export default $arcgis.t(([,,,,,,,,,,,o])=>{var t=class extends i{constructor(){super(...arguments),this.agent=o}static{this.properties={referenceElement:1}}#t;#i;getContext(){if(!this.#t)throw new Error("arcgis-assistant-data-exploration-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=a(this,"arcgis-assistant-data-exploration-agent"),this.#i=s(this)}disconnectedCallback(){this.#i?.unregister(this.agent.id),super.disconnectedCallback()}};r("arcgis-assistant-data-exploration-agent",t);return t},"identity/IdentityManager","portal/Portal","config","core/reactiveUtils","layers/FeatureLayer","request","views/LinkChartView","rest/knowledgeGraphService",b,c,d,e)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import c from"./JBNITHPO.js";import b from"./IDZTJLVN.js";import a from"./I76F57I2.js";import{c as s,d as n}from"./W2JAKE2M.js";import"./5W7S2RS4.js";import"./NXKKG5TK.js";import{v as r,z as o}from"./MAV3DW27.js";import"./ADYIXCSG.js";import"./4RZPOYZ7.js";import"./6LZ6GOHF.js";import"./CJIV4KJZ.js";import"./IKEF7ZHH.js";import"./WNS5ZUF5.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export default $arcgis.t(([,,,,,,,,,{fetchKnowledgeGraph:p},,,a])=>{var i=class extends r{constructor(){super(...arguments),this.agent=a}static{this.properties={referenceElement:1,serviceUrl:3,context:0}}#e;#i;#t;#r;get serviceUrl(){return this.#i}set serviceUrl(t){this.#i=t}async getContext(){let t=this.context?{...this.context,knowledgeGraph:void 0,view:void 0}:{};if(this.#e)return{...t,view:this.#e};if(this.#t)try{let e=await this.#t;return{...t,knowledgeGraph:e}}catch(e){console.error("Failed to load knowledge graph via service URL:",e)}if(!this.context?.knowledgeGraph&&!this.context?.view)throw new Error("arcgis-assistant-knowledge-agent requires either a knowledgeGraph or view in context, and neither were provided");return this.context}willUpdate(t){t.has("serviceUrl")&&this.serviceUrl?this.#t=p(this.serviceUrl):this.#t=void 0}load(){this.#e=n(this)??void 0,this.#r=s(this)}disconnectedCallback(){this.#r?.unregister(this.agent.id),super.disconnectedCallback()}};o("arcgis-assistant-knowledge-agent",i);return i},"identity/IdentityManager","portal/Portal","config","core/reactiveUtils","layers/FeatureLayer","request","intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","rest/knowledgeGraphService",a,b,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as p}from"./
|
|
2
|
+
import{a as p}from"./6LZ6GOHF.js";function f(r,e,o){return{name:r,handler:async(a,t)=>{let n=async l=>{let u=await e.beforeAgent?.(l),w=u?{...l,state:{...l.state,...u}}:l,i=await t(w),d=await e.afterAgent?.({...w,result:i});return d?{...i,...d}:i};return e.wrapAgent?await e.wrapAgent(a,n):await n(a)},hooks:e,outputKey:o?.outputKey}}function M(r,e,o){return{name:r,handler:async(a,t)=>e.wrapToolCall?await e.wrapToolCall(a,t):await t(a),outputKey:o?.outputKey}}function y(r){return r.map(e=>s(e.name,e.hooks??{})).filter(e=>!!e)}function s(r,e){let{afterModel:o,beforeModel:a,wrapModelCall:t,wrapToolCall:n}=e;if(!(!o&&!a&&!t&&!n))return p({afterModel:o,beforeModel:a,name:r,wrapModelCall:t,wrapToolCall:n})}export{f as a,M as b,y as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as s,b as c}from"./RX45PCYB.js";import"./PBTINZTK.js";import{g as a,h as e,v as r,z as i}from"./MAV3DW27.js";import"./ADYIXCSG.js";import"./YIMNOUTF.js";var o=a`:host{overflow:auto}.container{display:flex;align-items:center;gap:var(--calcite-spacing-md);background:color-mix(in srgb,var(--calcite-color-brand) 15%,var(--calcite-color-foreground-1));color:var(--calcite-color-text-1);padding:var(--calcite-spacing-md);border-radius:var(--calcite-border-radius);width:fit-content;margin-left:auto;justify-content:flex-end}.avatar{display:flex;align-items:center;justify-content:center}.content{>*{margin:0}>*+*{margin-block-start:var(--calcite-spacing-sm)}:is(ol,ul){padding-inline-start:var(--calcite-spacing-lg)}>calcite-table{display:block;max-width:100%}pre{background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);color:var(--calcite-color-text-1);direction:ltr;max-width:100%;overflow:auto}pre code{display:block;white-space:pre;font-family:var(--calcite-code-family)}}@container (min-width: 480px){.container{max-width:80%}}`,t=class extends r{static{this.properties={content:1,user:1,message:0}}static{this.styles=o}_getContent(){return this.message?.role==="user"?this.message.content:this.content}render(){return e`<div class="container"><div><slot name=content><div class="content">${s(c(this._getContent()))}</div></slot></div><slot name=icon><div class="avatar"><calcite-avatar .fullName=${this.user} scale=s></calcite-avatar></div></slot></div>`}};i("arcgis-assistant-user-message",t);export{t as ArcgisAssistantUserMessage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./WAVKMZA6.js";import"./CVHJMR5X.js";import"./CJIV4KJZ.js";import"./IKEF7ZHH.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export default $arcgis.t(([{property:d,subclass:f},{a:u,c:i,d:c}])=>{var m=Object.defineProperty,g=Object.getOwnPropertyDescriptor,p=(e,o,r,t)=>{for(var s=t>1?void 0:t?g(o,r):o,a=e.length-1,n;a>=0;a--)(n=e[a])&&(s=(t?n(o,r,s):n(s))||s);return t&&s&&m(o,r,s),s},l=class extends c{constructor(e){super(e)}getAgents(){return this.agents}getEntryNode(e){return e[0]?i(e[0],0):void 0}isTerminalAgent(e,o){return o===e.length-1}validateAgents(e){super.validateAgents(e);let o=new Map;for(let[r,t]of e.entries()){let s=e[r-1];if(t.outputSchema)for(let a of u(t.outputSchema)){let n=o.get(a)??[];n.push(`${t.name} [${r}]`),o.set(a,n)}if(!(r===0||!t.inputSchema||s?.outputSchema))throw new Error(`Workflow agent "${t.name}" declares an input schema, so upstream agent "${s.name}" must declare an output schema.`)}for(let[r,t]of o.entries())t.length>1&&console.warn(`Workflow output field "${r}" is declared by multiple steps (${t.join(", ")}). Later steps will overwrite earlier values in shared state.`)}buildEdges(e){return e.length===1?[{from:i(e[0],0),decide:()=>{}}]:e.slice(0,-1).map((o,r)=>({from:i(o,r),decide:t=>t.status==="failed"?void 0:i(e[r+1],r+1)}))}};p([d()],l.prototype,"agents",2);l=p([f("SequentialWorkflow")],l);return l},"core/accessorSupport/decorators",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../YIMNOUTF.js";var a,
|
|
2
|
+
import"../YIMNOUTF.js";var e,a,i,c,u,s,w,l,f,m,p,y;async function r(n,t){if(t in n)return n[t];if("default"in n){let o=await n.default;return typeof o=="object"&&o!==null&&t in o?o[t]:o}throw new Error(`Unable to resolve ${String(t)} from module.`)}function W(n,t){let o={};for(let[b,k]of Object.entries(t))o[b]=h(n,k);return o}function d(n,t){return n.object(W(n,t))}function h(n,t){let o=g(n,t);return t.required===!0?o:o.optional()}function g(n,t){let o=T(n,t);return t.description!==void 0&&(o=o.describe(t.description)),o}function S(n,t){switch(t){case"string":return n.string();case"number":return n.number();case"boolean":return n.boolean()}}function A(n){return n==="string"||n==="number"||n==="boolean"}function T(n,t){switch(t.type){case"string":{if(t.enum!=null){if(t.enum.length===0)throw new Error("String schema field enum must include at least one value.");return n.enum(t.enum)}return n.string()}case"number":return n.number();case"boolean":return n.boolean();case"array":{if(t.itemType==null)throw new Error("Array schema field requires an itemType definition.");return n.array(A(t.itemType)?S(n,t.itemType):g(n,t.itemType))}case"object":{if(t.fields==null)throw new Error("Object schema field requires a fields definition.");return d(n,t.fields)}}}async function L(n){p??=import("../Q7TL5Q5N.js");let t=await p;return d(t.z,n)}async function j(n,t){y??=import("../SLNLQG3A.js");let o=await y;return await(await r(o,"sendUXSuggestion"))(n,t)}async function q(n){e??=import("../2NMR43NW.js");let t=await e,o=await r(t,"FunctionAgent");return new o(n)}async function E(n){a??=import("../JEIMRNYM.js");let t=await a,o=await r(t,"FunctionTool");return new o(n)}async function F(n){i??=import("../T7CQZ27H.js");let t=await i,o=await r(t,"LLMAgent");return new o(n)}async function v(n){c??=import("../O3F47IO5.js");let t=await c,o=await r(t,"WorkflowAgent");return new o(n)}async function U(n){u??=import("../C7E7MJSR.js");let t=await u,o=await r(t,"ConditionalWorkflow");return new o(n)}async function M(n){s??=import("../SMADRJ67.js");let t=await s,o=await r(t,"LoopWorkflow");return new o(n)}async function P(n){w??=import("../O7TGCM5P.js");let t=await w,o=await r(t,"ParallelWorkflow");return new o(n)}async function R(n){l??=import("../CIW3QMKV.js");let t=await l,o=await r(t,"RouterWorkflow");return new o(n)}async function X(n){f??=import("../YYY7HKYX.js");let t=await f,o=await r(t,"SequentialWorkflow");return new o(n)}async function x(n){m??=import("../IC5P5NYY.js");let t=await m,o=await r(t,"SwitchWorkflow");return new o(n)}export{U as createConditionalWorkflow,q as createFunctionAgent,E as createFunctionTool,F as createLLMAgent,M as createLoopWorkflow,P as createParallelWorkflow,R as createRouterWorkflow,L as createSchema,X as createSequentialWorkflow,x as createSwitchWorkflow,v as createWorkflowAgent,j as sendUXSuggestion};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as g,b as p}from"../../
|
|
2
|
+
import{a as g,b as p}from"../../XVQJBUMY.js";import"../../6LZ6GOHF.js";import{q as l}from"../../CJIV4KJZ.js";import"../../IKEF7ZHH.js";import"../../ZEYIBYSF.js";import"../../YIMNOUTF.js";var m="human-in-the-loop",w="Agent execution requires approval",f="Agent execution rejected by the user.",y="human-in-the-loop-tool",h="Tool execution requires approval";function x(t={}){let{outputKey:e}=t;return g(m,{wrapAgent:async(n,r)=>{let a=b(n),o=$(a,n),i=c(n.config?.configurable);if(i?.agentId!==a)throw new l(await I({agentId:a,interruptId:o,options:t,request:n}));if(i.id!==o){if(T(a,i.id))return await r(n);throw new l(await I({agentId:a,interruptId:o,options:t,request:n}))}if(i.payload===!1)return{outputMessage:f,status:"failed",summary:f};let u=e?{...n.state,[e]:i.payload}:n.state,d={...n,state:u};return await r(d)}},{outputKey:e})}function H(t={}){let{outputKey:e}=t;return p(y,{wrapToolCall:async(n,r)=>{let a=n.tool.name,o=q(n.config?.configurable),i=C(o,n.toolCallId??a),u=c(n.config?.configurable);if(u?.agentId!==o||u.id!==i)throw new l(await M({agentId:o,interruptId:i,options:t,request:n}));if(u.payload===!1)return`Tool call "${a}" was rejected by the user.`;let d=e?{...n.input,[e]:u.payload}:n.input,s={...n,input:d};return await r(s)}})}async function I(t){let{agentId:e,interruptId:n,options:r,request:a}=t,o=await r.interrupt?.({...a,agentId:e});return{agentId:e,id:n,kind:o?.kind??"booleanChoice",message:o?.message??w,metadata:o?.metadata}}function b(t){return typeof t.config?.configurable?.agentId=="string"?t.config.configurable.agentId:t.agent.id}function $(t,e){let n=e.config?.configurable?.thread_id,r=typeof n=="string"&&n?`${n}:`:"";return`${t}:${r}${e.nodeName}`}function T(t,e){return e.startsWith(`${t}:tool:`)}function q(t){return typeof t?.agentId=="string"?t.agentId:"llm-agent"}function C(t,e){return`${t}:tool:${e}`}async function M(t){let{agentId:e,interruptId:n,options:r,request:a}=t,{input:o,tool:i,toolCallId:u}=a,d=i.name,s=await r.interrupt?.({...a,args:o,toolName:d,toolCallId:u});return{agentId:e,id:n,kind:s?.kind??"booleanChoice",message:s?.message??`${h}
|
|
3
3
|
Tool: ${d}`,metadata:s?.metadata??{args:o,toolCallId:u,toolName:d}}}function N(t){return c(t?.configurable)?.payload}function c(t){let e=t?.hitlResponse;return e&&typeof e=="object"&&"id"in e&&"agentId"in e?e:null}export{x as createHumanInTheLoopMiddleware,H as createHumanInTheLoopToolMiddleware,N as getHumanInTheLoopPayload};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a,b,c}from"../../
|
|
2
|
+
import{a,b,c}from"../../XVQJBUMY.js";import"../../6LZ6GOHF.js";import"../../CJIV4KJZ.js";import"../../IKEF7ZHH.js";import"../../ZEYIBYSF.js";import"../../YIMNOUTF.js";export{c as convertToLangChainMiddlewares,a as createAgentMiddleware,b as createToolMiddleware};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as o}from"../../
|
|
2
|
+
import{a as o}from"../../4RZPOYZ7.js";import{a as l,b as c}from"../../XVQJBUMY.js";import"../../6LZ6GOHF.js";import"../../CJIV4KJZ.js";import{P as s,Z as i}from"../../IKEF7ZHH.js";import"../../ZEYIBYSF.js";import"../../YIMNOUTF.js";var m="agent-trace",u="tool-trace";function y(){return l(m,{wrapModelCall:async(t,e)=>{let a=await e(t),r=t.runtime,g=d(a);return await Promise.all(g.map(async n=>await o({text:`LLM requested tool call "${n.name}" with arguments: ${JSON.stringify(n.args,null,2)}`},r))),a}})}function M(){return c(u,{wrapToolCall:async(t,e)=>{let a=await e(t),r=t.config;return await o({text:`Finished executing tool: ${s.isInstance(a)?a.content.toString():typeof a=="string"?a:t.tool.name}`},r),a}})}function d(t){return!i.isInstance(t)||!Array.isArray(t.tool_calls)?[]:t.tool_calls.filter(e=>typeof e?.name=="string")}export{y as createAgentTraceMiddleware,M as createToolTraceMiddleware};
|
package/dist/cdn/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{p as s,y as e}from"./MAV3DW27.js";import"./ADYIXCSG.js";import"./YIMNOUTF.js";var a=s(e,{"arcgis-assistant":[()=>import("./
|
|
2
|
+
import{p as s,y as e}from"./MAV3DW27.js";import"./ADYIXCSG.js";import"./YIMNOUTF.js";var a=s(e,{"arcgis-assistant":[()=>import("./UNFG4ZJ5.js"),"_messages:,assistantAvatarEnabled,awaitingResponse:,awaitingResponseStep:,copyEnabled,description,entryMessage,feedbackEnabled,heading,interrupt:,keepSuggestedPrompts,logEnabled,messages:,orchestrator:,readAloudEnabled,referenceElement,streamingDisabled,suggestedPrompts:,voiceInputEnabled;clearChatHistory,submitMessage;cancelInterrupt,register,submitInterrupt,unregister"],"arcgis-assistant-agent":[()=>import("./27NEUQN3.js"),"agent:,context:;getContext"],"arcgis-assistant-data-exploration-agent":[()=>import("./WQQRLD5F.js"),"referenceElement;;getContext"],"arcgis-assistant-help-agent":[()=>import("./LSNMNSYS.js"),"referenceElement;;getContext"],"arcgis-assistant-knowledge-agent":[()=>import("./XAI6OR2N.js"),"context:,referenceElement,serviceUrl;getContext"],"arcgis-assistant-layer-styling-agent":[()=>import("./NNC3UYMR.js"),"referenceElement;;getContext"],"arcgis-assistant-navigation-agent":[()=>import("./FC2ZX3SS.js"),"referenceElement;;getContext"],"arcgis-assistant-chat":[()=>import("./5SBLS4NW.js"),"interrupt:,loading,messages:"],"arcgis-assistant-chat-entry":[()=>import("./M3SWPT3M.js"),"_messages:,awaitingResponse,disabled,entryPlaceholder,inputValue,keyboardShortcutsDisabled,messages:,status,voiceInputEnabled;submitMessage"],"arcgis-assistant-interrupt":[()=>import("./PSWI3MFB.js"),"_messages:,message,options:,type"],"arcgis-assistant-interrupt-preview":[()=>import("./JN744CAW.js"),"interrupts:"],"arcgis-assistant-message":[()=>import("./CAECQD75.js"),"assistantAvatarEnabled,copyEnabled,feedbackEnabled,footerDisabled,logEnabled,message:,readAloudEnabled"],"arcgis-assistant-message-block":[()=>import("./I64KIZG3.js"),"block:"],"arcgis-assistant-message-feedback":[()=>import("./FWU6DFIB.js"),"_messages:,feedbackEnabled,message:"],"arcgis-assistant-message-footer":[()=>import("./DEAYZ3MK.js"),"_messages:,copyEnabled,feedbackEnabled,logEnabled,message:,readAloudEnabled"],"arcgis-assistant-message-loading":[()=>import("./ZPLFFLPF.js"),"assistantAvatarEnabled,interrupts:,loading,loadingMessage"],"arcgis-assistant-message-log":[()=>import("./NOJYPREL.js"),"log:,logEnabled,showLog"],"arcgis-assistant-message-read-aloud":[()=>import("./RMLXVQZ5.js"),"_messages:,message:,readAloudEnabled"],"arcgis-assistant-message-text":[()=>import("./IB4WTK74.js"),"content,parts:"],"arcgis-assistant-speech-input":[()=>import("./ZOSUDIJH.js"),"awaitingResponse,inputValue,language,mode;;clearDraftSession"],"arcgis-assistant-suggested-prompts":[()=>import("./WH6QQK6N.js"),"_messages:,label,prompts:"],"arcgis-assistant-user-message":[()=>import("./YJ3QQXF6.js"),"content,message:,user"]});a({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-assistant,arcgis-assistant-agent,arcgis-assistant-data-exploration-agent,arcgis-assistant-help-agent,arcgis-assistant-knowledge-agent,arcgis-assistant-layer-styling-agent,arcgis-assistant-navigation-agent,arcgis-assistant-chat,arcgis-assistant-chat-entry,arcgis-assistant-interrupt,arcgis-assistant-message,arcgis-assistant-message-block,arcgis-assistant-message-feedback,arcgis-assistant-message-footer,arcgis-assistant-message-loading,arcgis-assistant-message-log,arcgis-assistant-message-read-aloud,arcgis-assistant-message-text,arcgis-assistant-speech-input,arcgis-assistant-suggested-prompts,arcgis-assistant-user-message){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r,p,j,i=(a.importMap??={}).imports??={})=>{"agent-utils/index,agent-utils/middlewares/middleware,agent-utils/middlewares/humanInTheLoop,agent-utils/middlewares/trace".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,e,"@arcgis/ai-components/",".js")
|
|
@@ -36,68 +36,74 @@ function x(e) {
|
|
|
36
36
|
return null;
|
|
37
37
|
for (let r = A(e, 0); r !== -1; r = A(e, r + 1)) {
|
|
38
38
|
let a = 0, c = 0;
|
|
39
|
-
for (let
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
39
|
+
for (let n = r; n < e.length; n++) {
|
|
40
|
+
const l = e[n];
|
|
41
|
+
if (l === "{" ? a++ : l === "}" ? a-- : l === "[" ? c++ : l === "]" && c--, a < 0 || c < 0)
|
|
42
42
|
break;
|
|
43
|
-
if (a === 0 && c === 0 &&
|
|
44
|
-
return e.slice(r,
|
|
43
|
+
if (a === 0 && c === 0 && n > r)
|
|
44
|
+
return e.slice(r, n + 1);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
return null;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function O(e) {
|
|
50
50
|
if (!e)
|
|
51
51
|
return "";
|
|
52
52
|
let t = e;
|
|
53
53
|
const r = x(e);
|
|
54
54
|
if (r)
|
|
55
55
|
try {
|
|
56
|
-
const
|
|
56
|
+
const c = JSON.parse(r), l = `
|
|
57
57
|
|
|
58
58
|
\`\`\`json
|
|
59
|
-
${JSON.stringify(
|
|
59
|
+
${JSON.stringify(c, null, 2)}
|
|
60
60
|
\`\`\`
|
|
61
61
|
|
|
62
62
|
`;
|
|
63
|
-
t = e.replace(r,
|
|
63
|
+
t = e.replace(r, l);
|
|
64
64
|
} catch {
|
|
65
65
|
}
|
|
66
|
-
const a =
|
|
67
|
-
return
|
|
66
|
+
const a = E(t);
|
|
67
|
+
return q(a);
|
|
68
68
|
}
|
|
69
69
|
function q(e) {
|
|
70
|
-
|
|
70
|
+
if (!e)
|
|
71
|
+
return "";
|
|
72
|
+
const t = M(e);
|
|
73
|
+
return T(t);
|
|
71
74
|
}
|
|
72
75
|
function E(e) {
|
|
76
|
+
return e ? S.parse(e, { async: !1 }) : "";
|
|
77
|
+
}
|
|
78
|
+
function M(e) {
|
|
73
79
|
if (!e || typeof DOMParser > "u")
|
|
74
80
|
return e;
|
|
75
81
|
try {
|
|
76
82
|
const t = new DOMParser().parseFromString(e, "text/html");
|
|
77
83
|
return Array.from(t.querySelectorAll("table")).forEach((a, c) => {
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
82
|
-
const d = Array.from(
|
|
83
|
-
for (const
|
|
84
|
+
const n = t.createElement("calcite-table");
|
|
85
|
+
n.setAttribute("caption", `Table ${c + 1}`), n.setAttribute("striped", "true");
|
|
86
|
+
const l = a.querySelector("thead");
|
|
87
|
+
if (l) {
|
|
88
|
+
const d = Array.from(l.querySelectorAll("tr"));
|
|
89
|
+
for (const u of d) {
|
|
84
90
|
const o = t.createElement("calcite-table-row");
|
|
85
91
|
o.setAttribute("slot", "table-header");
|
|
86
|
-
const
|
|
87
|
-
for (const
|
|
88
|
-
const s = (
|
|
92
|
+
const f = Array.from(u.querySelectorAll("th, td"));
|
|
93
|
+
for (const h of f) {
|
|
94
|
+
const s = (h.textContent ?? "").trim(), i = t.createElement("calcite-table-header");
|
|
89
95
|
i.setAttribute("heading", s), o.appendChild(i);
|
|
90
96
|
}
|
|
91
|
-
|
|
97
|
+
n.appendChild(o);
|
|
92
98
|
}
|
|
93
99
|
}
|
|
94
|
-
const
|
|
95
|
-
(
|
|
96
|
-
const o = t.createElement("calcite-table-row"),
|
|
97
|
-
|
|
98
|
-
const
|
|
99
|
-
for (const s of
|
|
100
|
-
if (
|
|
100
|
+
const b = a.querySelector("tbody");
|
|
101
|
+
(b ? Array.from(b.querySelectorAll("tr")) : Array.from(a.querySelectorAll("tr")).filter((d) => !l?.contains(d))).forEach((d, u) => {
|
|
102
|
+
const o = t.createElement("calcite-table-row"), f = !l && u === 0 && d.querySelectorAll("th").length > 0;
|
|
103
|
+
f && o.setAttribute("slot", "table-header");
|
|
104
|
+
const h = Array.from(d.querySelectorAll("th, td"));
|
|
105
|
+
for (const s of h) {
|
|
106
|
+
if (f && s.localName === "th") {
|
|
101
107
|
const w = (s.textContent ?? "").trim(), y = t.createElement("calcite-table-header");
|
|
102
108
|
y.setAttribute("heading", w), o.appendChild(y);
|
|
103
109
|
return;
|
|
@@ -105,13 +111,14 @@ function E(e) {
|
|
|
105
111
|
const i = t.createElement("calcite-table-cell"), p = s.getAttribute("colspan"), m = s.getAttribute("rowspan");
|
|
106
112
|
p && i.setAttribute("colspan", p), m && i.setAttribute("rowspan", m), i.innerHTML = s.innerHTML, o.appendChild(i);
|
|
107
113
|
}
|
|
108
|
-
|
|
109
|
-
}), a.replaceWith(
|
|
114
|
+
n.appendChild(o);
|
|
115
|
+
}), a.replaceWith(n);
|
|
110
116
|
}), t.body.innerHTML;
|
|
111
117
|
} catch {
|
|
112
118
|
return e;
|
|
113
119
|
}
|
|
114
120
|
}
|
|
115
121
|
export {
|
|
116
|
-
|
|
122
|
+
q as a,
|
|
123
|
+
O as p
|
|
117
124
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { StateGraph as I, START as k, END as v } from "@langchain/langgraph/web";
|
|
3
|
-
import { g as T, O as R, P as C, t as N, Q as V, f, R as D, r as z, S as
|
|
3
|
+
import { g as T, O as R, P as C, t as N, Q as V, f, R as D, r as z, S as b, T as P } from "./adapter.js";
|
|
4
4
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
5
5
|
import "@arcgis/core/portal/Portal.js";
|
|
6
6
|
import "@arcgis/toolkit/string";
|
|
7
|
-
import { h as
|
|
7
|
+
import { h as _, e as Q } from "./generateLayerDescriptions.js";
|
|
8
8
|
import { AIMessage as O } from "@langchain/core/messages";
|
|
9
9
|
import { s as n } from "./index.js";
|
|
10
10
|
import "@langchain/openai";
|
|
@@ -13,7 +13,7 @@ import "@arcgis/core/core/reactiveUtils.js";
|
|
|
13
13
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
14
|
import "@arcgis/core/request.js";
|
|
15
15
|
import "@langchain/core/prompts";
|
|
16
|
-
import { h as
|
|
16
|
+
import { h as $ } from "./toolCallResponse.js";
|
|
17
17
|
import { ToolNode as j } from "@langchain/langgraph/prebuilt";
|
|
18
18
|
import G from "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
19
19
|
import U from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
@@ -30,7 +30,7 @@ const W = async (t, e) => (await n({ text: "Exiting Data Exploration agent" }, e
|
|
|
30
30
|
assignedTask: t.agentExecutionContext.assignedTask,
|
|
31
31
|
userRequest: t.agentExecutionContext.userRequest,
|
|
32
32
|
priorSteps: t.agentExecutionContext.priorSteps
|
|
33
|
-
}, o = await
|
|
33
|
+
}, o = await _({
|
|
34
34
|
promptText: d,
|
|
35
35
|
modelTier: "advanced",
|
|
36
36
|
config: e,
|
|
@@ -45,7 +45,7 @@ const W = async (t, e) => (await n({ text: "Exiting Data Exploration agent" }, e
|
|
|
45
45
|
// Don't overwrite outputMessage if query already set it
|
|
46
46
|
};
|
|
47
47
|
const m = i, g = o.content.toString();
|
|
48
|
-
return await
|
|
48
|
+
return await $(o, e), { ...t, dataExplorationMessages: m, outputMessage: g };
|
|
49
49
|
}, H = async (t, e) => {
|
|
50
50
|
await n({ text: "Requesting LLM for layer query results" }, e);
|
|
51
51
|
const d = await T("data_explore_query_prompt");
|
|
@@ -78,7 +78,7 @@ const W = async (t, e) => (await n({ text: "Exiting Data Exploration agent" }, e
|
|
|
78
78
|
priorSteps: t.agentExecutionContext.priorSteps,
|
|
79
79
|
lastNavigatedFeatures: c,
|
|
80
80
|
lastResolvedLocation: m
|
|
81
|
-
}, y = await
|
|
81
|
+
}, y = await _({
|
|
82
82
|
promptText: d,
|
|
83
83
|
modelTier: "advanced",
|
|
84
84
|
config: e,
|
|
@@ -86,7 +86,7 @@ const W = async (t, e) => (await n({ text: "Exiting Data Exploration agent" }, e
|
|
|
86
86
|
inputVariables: g,
|
|
87
87
|
tools: V
|
|
88
88
|
}), h = (y.tool_calls?.length ?? 0) > 0, p = y.content.toString();
|
|
89
|
-
return await
|
|
89
|
+
return await $(y, e), {
|
|
90
90
|
...t,
|
|
91
91
|
dataExplorationMessages: [...t.dataExplorationMessages, y],
|
|
92
92
|
// Only emit output here when no tools are being called.
|
|
@@ -293,7 +293,7 @@ ${o}` : i = "Vector search completed. No matching layers found.", await n({ text
|
|
|
293
293
|
}, le = (t, e) => z(["layerSearch", "fieldSearch", "layersAndFieldsRegistry"], "Data Exploration Agent")(
|
|
294
294
|
t,
|
|
295
295
|
e
|
|
296
|
-
), ce = () => new I(
|
|
296
|
+
), ce = () => new I(b).addNode("requireDataExplorationServices", le).addNode("vectorSearchLayers", ne).addNode("vectorSearchFields", oe).addNode("fieldStatistics", se).addNode("queryAgent", H).addNode("queryTools", P).addNode("summarizeQueryResponseLLM", J).addNode("filterAgent", B).addNode("filterTools", K).addNode("earlyExit", W).addEdge(k, "requireDataExplorationServices").addEdge("requireDataExplorationServices", "vectorSearchLayers").addConditionalEdges(
|
|
297
297
|
"vectorSearchLayers",
|
|
298
298
|
(e) => e.vectorSearchLayerIds.length ? "vectorSearchFields" : "earlyExit"
|
|
299
299
|
).addConditionalEdges(
|
|
@@ -310,12 +310,14 @@ ${o}` : i = "Vector search completed. No matching layers found.", await n({ text
|
|
|
310
310
|
This also includes questions that ask which feature meets a given condition or where a particular feature in the data is located (e.g., “Where is the spring with the highest elevation?”). However, this agent does not handle addresses.
|
|
311
311
|
_Example: “How many features are there?”_
|
|
312
312
|
_Example: “What’s the average population?”_
|
|
313
|
-
_Example: “Which values are in the status field?”_
|
|
313
|
+
_Example: “Which values are in the status field?”_
|
|
314
|
+
|
|
315
|
+
This agent does NOT handle help/metadata requests such as listing available layers, listing field names/columns/attributes for a layer, or capability guidance.`, Ce = {
|
|
314
316
|
id: "dataExploration",
|
|
315
317
|
name: "Data Exploration Agent",
|
|
316
318
|
description: de,
|
|
317
319
|
createGraph: ce,
|
|
318
|
-
workspace:
|
|
320
|
+
workspace: b
|
|
319
321
|
};
|
|
320
322
|
export {
|
|
321
323
|
Ce as D
|