@arcgis/ai-components 5.1.0-next.107 → 5.1.0-next.109

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.
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as g}from"./XLFCW5OF.js";import"./M56MGI7M.js";import"./YGW7TUNX.js";import{h as u,v as c,y as h}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";export default $arcgis.t(([{watch:_},y,{property:m,subclass:f}])=>{var A=Object.defineProperty,S=Object.getOwnPropertyDescriptor,p=(e,s,i,a)=>{for(var r=a>1?void 0:a?S(s,i):s,t=e.length-1,n;t>=0;t--)(n=e[t])&&(r=(a?n(s,i,r):n(r))||r);return a&&r&&A(s,i,r),r};function l(){return typeof window>"u"?null:window}var o=class extends y{constructor(){super(...arguments),this._utterance=null,this.state="idle",this.supported=o.isSupported()}destroy(){this.stop(),super.destroy()}start(e){let s=e.trim(),i=l(),a=i?.SpeechSynthesisUtterance,r=i?.speechSynthesis;if(this._set("supported",o.isSupported(i)),!s||!a||!r)return;this.stop();let t=new a(s);t.rate=.9,t.pitch=1.1,t.volume=1,t.onend=()=>{this._utterance===t&&this._reset()},t.onerror=()=>{this._utterance===t&&this._reset()};try{r.speak(t),this._utterance=t,this._set("state","playing")}catch{t.onend=null,t.onerror=null,this._reset()}}stop(){let e=l(),s=e?.speechSynthesis;if(this._set("supported",o.isSupported(e)),s)try{(s.speaking||s.pending)&&s.cancel()}catch{}this._reset()}toggle(e){if(this.state==="playing"){this.stop();return}this.start(e)}static isSupported(e=l()){return!!e?.speechSynthesis&&typeof e.SpeechSynthesisUtterance=="function"}_reset(){this._utterance&&(this._utterance.onend=null,this._utterance.onerror=null),this._utterance=null,this._set("state","idle")}};p([m({readOnly:!0})],o.prototype,"state",2);p([m({readOnly:!0})],o.prototype,"supported",2);o=p([f("ReadAloudController")],o);var d=class extends c{constructor(){super(...arguments),this._messages=g({blocking:!0}),this._readAloudController=new o,this.readAloudEnabled=!1}static{this.properties={readAloudEnabled:5,message:0}}loaded(){this.manager.onLifecycle(()=>[_(()=>this._readAloudController.state,()=>this.requestUpdate(),{initial:!0}),{remove:()=>{this._readAloudController.stop()}}])}_toggleReadAloud(){this._readAloudController.toggle(this.message?.content??"")}render(){return this.readAloudEnabled&&!this.message?.error&&this.message?.content?.trim()&&this._readAloudController.supported?u`<calcite-action id=action-read-aloud .icon=${this._readAloudController.state==="playing"?"sound-off":"sound"} scale=s .active=${this._readAloudController.state==="playing"} @click=${()=>this._toggleReadAloud()} text></calcite-action><calcite-tooltip reference-element=action-read-aloud overlay-positioning=fixed placement=bottom><span>${this._readAloudController.state==="playing"?this._messages.stopReadingButtonLabel:this._messages.readAloudButtonLabel}</span></calcite-tooltip>`:null}};h("arcgis-assistant-message-read-aloud",d);return d},"core/reactiveUtils","core/Accessor","core/accessorSupport/decorators")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import c from"./X46FZMAM.js";import b from"./MF3MSWS4.js";import"./WDTUSWTQ.js";import{a as r,c as e}from"./EJWQC2SL.js";import"./47QQSSPB.js";import"./YGW7TUNX.js";import{v as a,y as s}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{b:i}])=>{var t=class extends a{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-data-exploration-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=r(this,"arcgis-assistant-data-exploration-agent"),e(this)}};s("arcgis-assistant-data-exploration-agent",t);return t},b,c)
2
+ import c from"./PIZXBPBY.js";import b from"./RYEH3CUI.js";import"./HFNOF6ZK.js";import{a as r,c as e}from"./EJWQC2SL.js";import"./47QQSSPB.js";import"./YGW7TUNX.js";import{v as a,y as s}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{b:i}])=>{var t=class extends a{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-data-exploration-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=r(this,"arcgis-assistant-data-exploration-agent"),e(this)}};s("arcgis-assistant-data-exploration-agent",t);return t},b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import c from"./X46FZMAM.js";import b from"./MF3MSWS4.js";import"./WDTUSWTQ.js";import{a as r,c as a}from"./EJWQC2SL.js";import"./47QQSSPB.js";import"./YGW7TUNX.js";import{v as s,y as e}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{d:i}])=>{var t=class extends s{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-help-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=r(this,"arcgis-assistant-help-agent"),a(this)}};e("arcgis-assistant-help-agent",t);return t},b,c)
2
+ import c from"./PIZXBPBY.js";import b from"./RYEH3CUI.js";import"./HFNOF6ZK.js";import{a as r,c as a}from"./EJWQC2SL.js";import"./47QQSSPB.js";import"./YGW7TUNX.js";import{v as s,y as e}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{d:i}])=>{var t=class extends s{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-help-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=r(this,"arcgis-assistant-help-agent"),a(this)}};e("arcgis-assistant-help-agent",t);return t},b,c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as l}from"./XLFCW5OF.js";import"./M56MGI7M.js";import"./YGW7TUNX.js";import{h as e,n as s,v as a,y as c}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";var i=class extends a{constructor(){super(...arguments),this.#t=[],this._messages=l({blocking:!0}),this.arcgisCancel=s(),this.arcgisSubmit=s()}static{this.properties={type:1,message:1,options:0}}#t;_renderInterruptOptions(){switch(this.type){case"single-select":return e`<calcite-list selection-mode=single-persist .label=${this._messages.optionsLabel} @calciteListChange=${t=>this.#t=t.target.selectedItems[0]?.value}>${this.options?.map(t=>e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;case"multi-select":return e`<calcite-list selection-mode=multiple .label=${this._messages.optionsLabel} @calciteListChange=${t=>this.#t=t.target.selectedItems.map(n=>n.value)}>${this.options?.map(t=>e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;case"boolean-choice":return null;case"text-input":return e`<calcite-input .label=${this._messages.enterTextLabel} @calciteInputInput=${t=>this.#t=t.target.value}></calcite-input>`}}render(){return e`<calcite-panel .description=${this.message}>${this._renderInterruptOptions()}<calcite-button slot=footer-end appearance=outline @click=${()=>this.arcgisCancel.emit()}>${this._messages.cancelButtonLabel}</calcite-button><calcite-button slot=footer-end appearance=solid @click=${()=>this.arcgisSubmit.emit(this.type==="boolean-choice"?!0:this.#t)}>${this._messages.submitButtonLabel}</calcite-button></calcite-panel>`}};c("arcgis-assistant-interrupt",i);export{i as ArcgisAssistantInterrupt};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import a from"./MF3MSWS4.js";import{Bb as B,Fb as q,L as P,M as de,Q as re,R as Q,Za as M,_a as y,a as F,b as T,g as Ne,j as ee,k as te,kb as v,q as Fe,qb as qe,u as Me}from"./WDTUSWTQ.js";export default $arcgis.t(([me,_t,O,{addressToLocations:Nt},Ft,Ue,We,Mt,He,Ze,{formatDateOnly:qt,convertDateFormatToIntlOptions:ae,formatTimeOnly:Ct,formatDate:Le},Je,Ye,At,Rt,{createRenderer:Lt},{getSchemesByTag:zt,getSchemes:jt},{getBackgroundColorTheme:ze},{createAgeRenderer:Dt,createContinuousRenderer:Ot},{getSchemesByTag:Te},{createContinuousRenderer:Vt},{createRenderer:Gt},{getSchemesByTag:Pt},{createRenderer:Qt},{getSchemesByTag:Bt},{createRenderer:Kt},{getSchemesByTag:Ut},{createRenderer:Wt},{getSchemesByTag:Ht},{createAgeRenderer:Zt,createContinuousRenderer:Jt},{createRenderer:Yt},{getSchemesByTag:Xt},,{fetchKnowledgeGraph:je,executeQueryStreaming:er,executeSearchStreaming:tr},rr,Xe,De,Oe,ar,{a:l,b:K,c:Ce,d:g,e:I,g:ue,h:pe,i:j}])=>{var Re=e=>Array.isArray(e)&&e.every(P),Et=e=>typeof e=="object"&&e!=null&&"messages"in e&&Re(e.messages),It=e=>typeof e=="object"&&e!=null&&"lg_tool_call"in e,C=class extends qe{tools;handleToolErrors=!0;trace=!1;constructor(e,t){let{name:r,tags:a,handleToolErrors:o}=t??{};super({name:r,tags:a,func:(n,i)=>this.run(n,i)}),this.tools=e,this.handleToolErrors=o??this.handleToolErrors}async runTool(e,t){let r=this.tools.find(a=>a.name===e.name);try{if(r===void 0)throw new Error(`Tool "${e.name}" not found.`);let a=await r.invoke({...e,type:"tool_call"},t);return P(a)&&a.getType()==="tool"||te(a)?a:new de({status:"success",name:r.name,content:typeof a=="string"?a:JSON.stringify(a),tool_call_id:e.id})}catch(a){if(!this.handleToolErrors||Me(a))throw a;return new de({status:"error",content:`Error: ${a.message}
2
+ import a from"./RYEH3CUI.js";import{Bb as B,Fb as q,L as P,M as de,Q as re,R as Q,Za as M,_a as y,a as F,b as T,g as Ne,j as ee,k as te,kb as v,q as Fe,qb as qe,u as Me}from"./HFNOF6ZK.js";export default $arcgis.t(([me,_t,O,{addressToLocations:Nt},Ft,Ue,We,Mt,He,Ze,{formatDateOnly:qt,convertDateFormatToIntlOptions:ae,formatTimeOnly:Ct,formatDate:Le},Je,Ye,At,Rt,{createRenderer:Lt},{getSchemesByTag:zt,getSchemes:jt},{getBackgroundColorTheme:ze},{createAgeRenderer:Dt,createContinuousRenderer:Ot},{getSchemesByTag:Te},{createContinuousRenderer:Vt},{createRenderer:Gt},{getSchemesByTag:Pt},{createRenderer:Qt},{getSchemesByTag:Bt},{createRenderer:Kt},{getSchemesByTag:Ut},{createRenderer:Wt},{getSchemesByTag:Ht},{createAgeRenderer:Zt,createContinuousRenderer:Jt},{createRenderer:Yt},{getSchemesByTag:Xt},,{fetchKnowledgeGraph:je,executeQueryStreaming:er,executeSearchStreaming:tr},rr,Xe,De,Oe,ar,{a:l,b:K,c:Ce,d:g,e:I,g:ue,h:pe,i:j}])=>{var Re=e=>Array.isArray(e)&&e.every(P),Et=e=>typeof e=="object"&&e!=null&&"messages"in e&&Re(e.messages),It=e=>typeof e=="object"&&e!=null&&"lg_tool_call"in e,C=class extends qe{tools;handleToolErrors=!0;trace=!1;constructor(e,t){let{name:r,tags:a,handleToolErrors:o}=t??{};super({name:r,tags:a,func:(n,i)=>this.run(n,i)}),this.tools=e,this.handleToolErrors=o??this.handleToolErrors}async runTool(e,t){let r=this.tools.find(a=>a.name===e.name);try{if(r===void 0)throw new Error(`Tool "${e.name}" not found.`);let a=await r.invoke({...e,type:"tool_call"},t);return P(a)&&a.getType()==="tool"||te(a)?a:new de({status:"success",name:r.name,content:typeof a=="string"?a:JSON.stringify(a),tool_call_id:e.id})}catch(a){if(!this.handleToolErrors||Me(a))throw a;return new de({status:"error",content:`Error: ${a.message}
3
3
  Please fix your mistakes.`,name:e.name,tool_call_id:e.id??""})}}async run(e,t){let r;if(It(e))r=[await this.runTool(e.lg_tool_call,t)];else{let n;if(Re(e))n=e;else if(Et(e))n=e.messages;else throw new Error("ToolNode only accepts BaseMessage[] or { messages: BaseMessage[] } as input.");let i=new Set(n.filter(d=>d.getType()==="tool").map(d=>d.tool_call_id)),s;for(let d=n.length-1;d>=0;d-=1){let c=n[d];if(Q(c)){s=c;break}}if(s==null||!Q(s))throw new Error("ToolNode only accepts AIMessages as input.");r=await Promise.all(s.tool_calls?.filter(d=>d.id==null||!i.has(d.id)).map(d=>this.runTool(d,t))??[])}if(!r.some(te))return Array.isArray(e)?r:{messages:r};let a=[],o=null;for(let n of r)te(n)?n.graph===ee.PARENT&&Array.isArray(n.goto)&&n.goto.every(i=>Ne(i))?o?o.goto.push(...n.goto):o=new ee({graph:ee.PARENT,goto:n.goto}):a.push(n):a.push(Array.isArray(e)?[n]:{messages:[n]});return o&&a.push(o),a}};var $s=v.Root({llmInputMessages:v({reducer:(e,t)=>B([],t),default:()=>[]})});var U=(e,t)=>t??e,et=v.Root({...Ce(),intent:v({reducer:U}),vectorSearchLayerResults:v({reducer:U,default:()=>[]}),vectorSearchFieldResults:v({reducer:U}),navigationInternalState:v({reducer:U,default:()=>({toolCallMessage:void 0})})});async function or(e,t){let r=O.getDefault().helperServices,a=r.geocode.find(p=>p.name==="ArcGIS World Geocoding Service")??r.geocode[0];if(!a)throw new Error("No geocoding service found in helperServices.");let o=a.url,n=`${me.assetsPath?.endsWith("/")?me.assetsPath:`${me.assetsPath}/`}esri/images/search/search-symbol-32.png`,i=(await Nt(o,{address:{SingleLine:e},outFields:["Match_addr"]}))?.[0];if(!i?.extent||!i.location)throw new Error(`Could not find location for: ${e}`);let s=new Ft({url:n,width:24,height:24}),d=new _t({geometry:i.location,symbol:s});t.graphics.removeAll(),t.graphics.add(d),await t.goTo(i.extent);let c={address:i.address??"",location:i.location?i.location.toJSON():null,extent:i.extent?i.extent.toJSON():null};return{text:`Successfully zoomed to ${e}.`,sharedStatePatch:{lastResolvedLocation:{value:c}}}}var nr=["mapView"];function $(e){let t=e?.configurable?.context;if(!t||typeof t!="object")throw new Error("NavigationAgent context missing");let r=nr.filter(a=>!(a in t));if(r.length)throw new Error(`NavigationAgent context missing: ${r.join(", ")}`);return t}async function ir({address:e},t){let{mapView:r}=$(t);return await or(e,r)}var sr=l.object({address:l.string().describe("The full address or place name to locate.")}),lr=y(ir,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:sr});async function cr(e,t){let r=t.map.bookmarks;if(!r||r.length===0)throw new Error("No bookmarks found in the map.");let a=r.find(n=>n.name===e);if(!a)throw new Error(`Bookmark with name "${e}" not found.`);let o=a.viewpoint;if(!o)throw new Error(`Bookmark with name "${e}" does not have a valid viewpoint.`);return await t.goTo(o),{text:`Navigated to bookmark: ${e}`}}async function dr({bookmarkName:e},t){let{mapView:r}=$(t);return await Promise.resolve(cr(e,r))}var ur=M.object({bookmarkName:M.string().describe("The name of the bookmark to navigate to.")}),pr=y(dr,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:ur});async function hr(e,t,r){let a=r.map?.allLayers.find(n=>n.id===e);if(!a)return{text:`Error: Layer with id ${e} not found`};let o=a.createQuery();o.where=t??"1=1";try{let{extent:n,count:i}=await a.queryExtent(o);if(i===0)return{text:`No features found in ${a.title} matching: ${t}`};if(n)await r.goTo(n);else return{text:`Error: Unable to determine extent for ${a.title}`};return{text:`Successfully zoomed to ${i} feature(s) in ${a.title}`}}catch(n){return console.error("Error in goToFeatures:",n),{text:`Error: ${n instanceof Error?n.message:"Unknown error"}`}}}async function mr({layerId:e,where:t},r){let{mapView:a}=$(r);return await hr(e,t,a)}var gr=M.object({layerId:M.string().describe("The layerId of the layer to zoom to."),where:M.string().describe("The sql-92 where clause used to query features to zoom to")}),fr=y(mr,{name:"goToFeatures",description:"Go to the features that match the given filter related to the given layerId.",schema:gr});async function yr(e){let t=new Ue({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await e.goTo(t),{text:"Successfully zoomed to world extent"}}async function wr(e,t){let{mapView:r}=$(t);return await yr(r)}var br=M.object({}),vr=y(wr,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:br});async function Sr(e){let t=e.map.initialViewProperties?.viewpoint?.targetGeometry;if(t)await e.goTo(t);else throw new Error("Initial extent is undefined");return{text:"Successfully zoomed to home extent"}}async function xr(e,t){let{mapView:r}=$(t);return await Sr(r)}var Tr=l.object({}),Er=y(xr,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:Tr});async function Ir(e,t){await t.when();let r=t.map?.allLayers.find(o=>o.id===e);if(!r)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${e}`),{text:`Could not find layer for: ${e}`};let a;return(r.type==="link-chart"||r.type==="knowledge-graph-sublayer")&&t.map?.activeLinkChartLayer?a=t.map.diagramNodesExtent:a=r.fullExtent,a?(await t.goTo(a),r.visible=!0,{text:`Successfully zoomed to: ${r.title??""}`}):{text:"Layer has no defined extent. Cannot zoom to layer."}}async function kr({layerId:e},t){let{mapView:r}=$(t);return await Ir(e,r)}var $r=M.object({layerId:M.string().describe("The id of the layer to navigate to")}),_r=y(kr,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:$r});async function Nr(e,t){return await t.goTo({scale:e}),{text:`Successfully zoomed to: ${e}`}}async function Fr({scale:e},t){let{mapView:r}=$(t);return await Nr(e,r)}var Mr=l.object({scale:l.number().describe("The map scale of the view to go to.")}),qr=y(Fr,{name:"goToScale",description:"Go to the specified view scale.",schema:Mr});async function Cr(e,t,r){let a={target:new We({longitude:e.longitude,latitude:e.latitude,spatialReference:{wkid:4326}})};return r?.zoom!==void 0&&(a.zoom=r.zoom),r?.scale!==void 0&&(a.scale=r.scale),await t.goTo(a),{text:`Successfully navigated to: ${[`(${e.latitude}\xB0, ${e.longitude}\xB0)`,r?.zoom!==void 0?`zoom ${r.zoom}`:"",r?.scale!==void 0?`scale 1:${r.scale}`:""].filter(Boolean).join(", ")}`}}async function Ar({center:e,zoom:t,scale:r},a){let{mapView:o}=$(a);return await Cr(e,o,{zoom:t,scale:r})}var Rr=l.object({center:l.object({longitude:l.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:l.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:l.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:l.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),Lr=y(Ar,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:Rr});async function zr(e,t){return await t.goTo({zoom:e}),{text:`Successfully zoomed to: ${e}`}}async function jr({zoom:e},t){let{mapView:r}=$(t);return await zr(e,r)}var Dr=l.object({zoom:l.number().min(1).max(20).describe("The zoom level of the view to go to.")}),Or=y(jr,{name:"goToZoom",description:'Go to the specified zoom level. If input is generic (e.g. "zoom in", then only zoom to the next appropriate level - increase level for zooming in and decrease for zooming out.).',schema:Dr}),Ee=[lr,pr,fr,vr,Er,_r,qr,Lr,Or],Ve=Object.assign({"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md":()=>import("./LSGRWCAO.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_map_context.md":()=>import("./5X5GJH2L.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_lucene_generation_prompt.md":()=>import("./YVTKUITE.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_summarize_result_prompt.md":()=>import("./K6LVZHWM.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_tool_prompt.md":()=>import("./4QVKWA2Z.js").then(e=>e.default),"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./MZJGADGH.js").then(e=>e.default),"../agents/dataExploration/prompts/data_explore_query_prompt.md":()=>import("./5PT7ZFXF.js").then(e=>e.default),"../agents/dataExploration/prompts/summarize_query_response_prompt.md":()=>import("./7EXACS27.js").then(e=>e.default),"../agents/help/prompts/help_prompt.md":()=>import("./ESTSYVJP.js").then(e=>e.default),"../agents/layerStyling/prompts/layer_styling_prompt.md":()=>import("./CFT5BBC6.js").then(e=>e.default),"../agents/navigation/prompts/navigation_intent_prompt.md":()=>import("./SFREIREB.js").then(e=>e.default),"../agents/navigation/prompts/navigation_tool_prompt.md":()=>import("./DMLSCJAM.js").then(e=>e.default)});async function k(e){let t=Object.entries(Ve).find(([r])=>r.endsWith(`/${e}.md`));if(!t)throw new Error(`Prompt not found: ${e}
4
4
  Available prompts:
5
5
  ${Object.keys(Ve).join(`
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import c from"./X46FZMAM.js";import b from"./MF3MSWS4.js";import"./WDTUSWTQ.js";import{a as e,c as a}from"./EJWQC2SL.js";import"./47QQSSPB.js";import"./YGW7TUNX.js";import{v as s,y as r}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{c:i}])=>{var t=class extends s{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-layer-styling-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=e(this,"arcgis-assistant-layer-styling-agent"),a(this)}};r("arcgis-assistant-layer-styling-agent",t);return t},b,c)
2
+ import c from"./PIZXBPBY.js";import b from"./RYEH3CUI.js";import"./HFNOF6ZK.js";import{a as e,c as a}from"./EJWQC2SL.js";import"./47QQSSPB.js";import"./YGW7TUNX.js";import{v as s,y as r}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{c:i}])=>{var t=class extends s{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-layer-styling-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=e(this,"arcgis-assistant-layer-styling-agent"),a(this)}};r("arcgis-assistant-layer-styling-agent",t);return t},b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import b from"./X46FZMAM.js";import a from"./MF3MSWS4.js";import"./WDTUSWTQ.js";import{c as o,d as n}from"./EJWQC2SL.js";import"./47QQSSPB.js";import"./YGW7TUNX.js";import{v as i,y as s}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";export default $arcgis.t(([{fetchKnowledgeGraph:h},,{e:a}])=>{var r=class extends i{constructor(){super(...arguments),this.agent=a}static{this.properties={referenceElement:1,serviceUrl:3,context:0}}#t;#r;#e;get serviceUrl(){return this.#r}set serviceUrl(e){this.#r=e}async getContext(){let e=this.context?{...this.context,knowledgeGraph:void 0,view:void 0}:{};if(this.#t)return{...e,view:this.#t};if(this.#e)try{let t=await this.#e;return{...e,knowledgeGraph:t}}catch(t){console.error("Failed to load knowledge graph via service URL:",t)}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(e){e.has("serviceUrl")&&this.serviceUrl?this.#e=h(this.serviceUrl):this.#e=void 0}load(){this.#t=n(this)??void 0,o(this)}};s("arcgis-assistant-knowledge-agent",r);return r},"rest/knowledgeGraphService",a,b)
2
+ import b from"./PIZXBPBY.js";import a from"./RYEH3CUI.js";import"./HFNOF6ZK.js";import{c as o,d as n}from"./EJWQC2SL.js";import"./47QQSSPB.js";import"./YGW7TUNX.js";import{v as i,y as s}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";export default $arcgis.t(([{fetchKnowledgeGraph:h},,{e:a}])=>{var r=class extends i{constructor(){super(...arguments),this.agent=a}static{this.properties={referenceElement:1,serviceUrl:3,context:0}}#t;#r;#e;get serviceUrl(){return this.#r}set serviceUrl(e){this.#r=e}async getContext(){let e=this.context?{...this.context,knowledgeGraph:void 0,view:void 0}:{};if(this.#t)return{...e,view:this.#t};if(this.#e)try{let t=await this.#e;return{...e,knowledgeGraph:t}}catch(t){console.error("Failed to load knowledge graph via service URL:",t)}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(e){e.has("serviceUrl")&&this.serviceUrl?this.#e=h(this.serviceUrl):this.#e=void 0}load(){this.#t=n(this)??void 0,o(this)}};s("arcgis-assistant-knowledge-agent",r);return r},"rest/knowledgeGraphService",a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as _,b as f}from"./EUNEQNYC.js";import{a as C}from"./XLFCW5OF.js";import"./M56MGI7M.js";import b from"./MF3MSWS4.js";import"./WDTUSWTQ.js";import{a as P}from"./47QQSSPB.js";import"./YGW7TUNX.js";import{g as E,h as a,l as $,n,t as y,u as v,v as k,w as m,y as S}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";export default $arcgis.t(([R,{whenOnce:O,watch:M,when:A},V,q,{property:d,subclass:z},{f:I}])=>{var j=E`:host{display:block;width:var(--arcgis-internal-panel-width, 100%);height:var(--arcgis-internal-expand-max-height, 100%)}.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%}.suggested-prompts{display:block;padding:var(--calcite-spacing-md);max-width:100%;box-sizing:border-box}.error-notice{padding:var(--calcite-spacing-sm)}`,H=Object.defineProperty,N=Object.getOwnPropertyDescriptor,h=(g,t,e,i)=>{for(var s=i>1?void 0:i?N(t,e):t,r=g.length-1,o;r>=0;r--)(o=g[r])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&H(t,e,s),s},l=class extends q{constructor(g){super(g),this.view=null,this.loading=!1,this.processing=!1,this.processingStep=""}async load(){this._set("loading",!0);try{await this._initialize()}finally{this._set("loading",!1)}}destroy(){this.orchestrator?.dispose(),super.destroy()}async _initialize(){this.removeHandles(),await Promise.all([this.portal.load(),this.view?.when()]),this.view&&await O(()=>!this.view.updating),this._set("orchestrator",await I.init({agents:[...this.agents],view:this.view??void 0})),this.addHandles([M(()=>[this.view,this.agents],()=>{this._initialize()})])}clearChatHistory(){this.orchestrator?.newConversation()}async*ask(g,t){if(!this.orchestrator)throw new Error("Orchestrator not initialized yet.");this._set("processing",!0),this._set("processingStep","");let e=[],i;try{let s=this.orchestrator.ask(g);for await(let r of s){let o=r.runId;if(t?.aborted){yield{type:"cancelled",runId:o};break}switch(r.type){case"trace":{this._set("processingStep",r.data.text),e.push(r.data.text);break}case"completed":{let c=r.result,p=!!c.content.length,b=!!i?.length;if(!p&&!b){yield{type:"completed",error:"Could not process the request.",log:e,runId:o};return}let u=c.content;this._set("processingStep",""),yield{type:"completed",response:u,blocks:i,log:e,runId:o};return}case"ux-suggestion":{let c=r.suggestion;i=i?[...i,c]:[c];break}case"interrupt":{let{kind:c,message:p,metadata:b}=r.interrupt,u=Array.isArray(b)?b.filter(L=>typeof L=="string"):[],x=(()=>{switch(c){case"booleanChoice":return{type:"boolean-choice",message:p,options:u};case"singleSelection":return{type:"single-select",message:p,options:u};case"multipleSelection":return{type:"multi-select",message:p,options:u};case"textInput":return{type:"text-input",message:p};default:return{type:c,message:p,options:u}}})();this._set("processingStep","Waiting for user input..."),yield{type:"interrupt",payload:x,runId:o};break}case"cancelled":{yield{type:"cancelled",runId:o};return}case"error":{yield{type:"completed",error:r.error.message,log:e,runId:o};return}default:{console.warn("Unknown event type:",r);break}}}}catch(s){console.warn("Error during message processing:",s),yield{type:"completed",error:"An error occurred during message processing.",log:e,runId:"error"};return}finally{this._set("processing",!1)}}};h([d({readOnly:!0})],l.prototype,"orchestrator",2);h([d()],l.prototype,"agents",2);h([d()],l.prototype,"portal",2);h([d()],l.prototype,"view",2);h([d({readOnly:!0})],l.prototype,"loading",2);h([d({readOnly:!0})],l.prototype,"processing",2);h([d({readOnly:!0})],l.prototype,"processingStep",2);l=h([z("OrchestratorController")],l);var D="Embeddings resource 'embeddings-v01.json' not found in the webmap portal item.",B="Embeddings not found for this web map.",F="https://developers.arcgis.com/javascript/latest/agentic-apps/ai-webmap-setup/#embeddings",w=class extends k{constructor(){super(...arguments),this._messages=C({blocking:!0}),this.#t=y(),this.#n=y(),this.#e=y(),this.#s=null,this.#o=new Map,this.#r=V.getDefault(),this.#i=t=>{t.stopPropagation(),this.cancelInterrupt()},this.#a=t=>{t.stopPropagation();let e=t.detail;this.submitInterrupt(e)},this.#l=t=>{t.stopPropagation(),this.keepSuggestedPrompts||(this.suggestedPrompts=[]);let e=t.detail;this._inputValue="",this.arcgisSubmit.emit(e),this.submitMessage(e)},this.#c=t=>{if(t.stopPropagation(),this.arcgisCancel.emit(),this._interrupt){this.orchestrator?.cancelInterrupt(),this._interrupt=null;return}this.#s?.abort()},this.#h=t=>{t.stopPropagation();let e=t.detail;this.arcgisFeedback.emit(e)},this.#g=t=>{t.stopPropagation();let e=t.detail;this._inputValue=e.prompt,this.arcgisPromptSelect.emit(e)},this.#p=t=>{this.arcgisSlottableRequest.emit(t.detail)},this._orchestratorController=null,this._interrupt=null,this._error=null,this._inputValue="",this.messages=new R([]),this.referenceElement=null,this.suggestedPrompts=[],this.feedbackEnabled=!1,this.keepSuggestedPrompts=!1,this.logEnabled=!1,this.copyEnabled=!1,this.voiceInputEnabled=!1,this.readAloudEnabled=!1,this.arcgisCancel=n(),this.arcgisError=n(),this.arcgisFeedback=n(),this.arcgisInterrupt=n(),this.arcgisInterruptCancel=n(),this.arcgisInterruptSubmit=n(),this.arcgisPromptSelect=n(),this.arcgisReady=n(),this.arcgisSubmit=n(),this.arcgisSlottableRequest=n({bubbles:!1,composed:!1})}static{this.properties={_orchestratorController:16,_interrupt:16,_error:16,_inputValue: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,logEnabled:5,copyEnabled:5,voiceInputEnabled:5,readAloudEnabled:5}}static{this.styles=j}#t;#n;#e;#s;#o;#r;#i;#a;#l;#c;#h;#g;#p;async#d(){try{let t=P(this.el,this.referenceElement);await t?.componentOnReady();let e=[...this.#o.values()];return e.length?(this._orchestratorController=new l({agents:e,portal:this.#r,view:t?.view}),await this._orchestratorController.load(),!0):(this._error="No agents found.",!1)}catch(t){return this._error=t?.message??"Error initializing orchestrator.",$(this)(t),!1}}get _user(){return this.#r?.user?.fullName||this.#r?.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.#o.set(t.agent.id,t)}async submitMessage(t){let e=t.trim();if(!e||(this.messages.push({id:Date.now().toString(),role:"user",content:e}),!this._orchestratorController))return;let i=this._orchestratorController.ask(e,this.#s?.signal);for await(let s of i){let r=s.runId;switch(s.type){case"completed":this.messages.push({role:"assistant",content:s.response,blocks:s.blocks,log:s.log,error:s.error,id:r});break;case"interrupt":this._interrupt={...s.payload,id:r},this.arcgisInterrupt.emit(this._interrupt);break;case"cancelled":this.messages.push({role:"assistant",error:"Request cancelled.",id:r});break}}}submitInterrupt(t){this.arcgisInterruptSubmit.emit(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.#g),this.#t.value?.addEventListener("arcgisSubmit",this.#l),this.#t.value?.addEventListener("arcgisCancel",this.#c),this.#t.value?.addEventListener("arcgisFeedback",this.#h);let t=A(()=>!!this._interrupt&&!!this.#e.value,()=>{let e=this.#e.value;e.removeEventListener("arcgisSubmit",this.#a),e.removeEventListener("arcgisCancel",this.#i),e.addEventListener("arcgisSubmit",this.#a,{once:!0}),e.addEventListener("arcgisCancel",this.#i,{once:!0})});return queueMicrotask(()=>{this.#d().then(e=>{e?this.arcgisReady.emit():this._error&&this.arcgisError.emit(new Error(this._error))})}),()=>{t.remove(),this.#t.value?.removeEventListener("arcgisPromptSelect",this.#g),this.#e.value?.removeEventListener("arcgisSubmit",this.#a),this.#e.value?.removeEventListener("arcgisCancel",this.#i),this.#t.value?.removeEventListener("arcgisSubmit",this.#l),this.#t.value?.removeEventListener("arcgisCancel",this.#c),this.#t.value?.removeEventListener("arcgisFeedback",this.#h),this._orchestratorController?.destroy(),this._orchestratorController=null}})}_reset(){this.#s?.abort(),this._interrupt=null,this.messages.removeAll(),this._error=null,this._inputValue=""}_renderEntryMessage(){return this._interrupt?a`<slot name=interrupt><arcgis-assistant-interrupt .type=${this._interrupt.type} .message=${this._interrupt.message} .options=${this._interrupt.options} ${v(this.#e)}></arcgis-assistant-interrupt></slot>`:this._error?this._renderErrorNotice():this.entryMessage?this.messages.length>0?null:a`<calcite-notice open kind=info closable icon width=full><div slot=message>${this.entryMessage}</div></calcite-notice>`:a`<slot name=entry-message></slot>`}_renderErrorNotice(){return this._error?a`<calcite-notice closable slot=entry-message open kind=danger icon width=full>${this._error===D?a`<div slot=message>${B}</div><calcite-link slot=link .href=${F} target=_blank title="Learn about web map embeddings">Read more</calcite-link>`:a`<div slot=message>${this._error}</div>`}</calcite-notice>`:null}_renderSuggestedPrompts(){return this.suggestedPrompts?.length?a`<div class="suggested-prompts-container"><arcgis-assistant-suggested-prompts class="suggested-prompts" .prompts=${this.suggestedPrompts}></arcgis-assistant-suggested-prompts></div>`:null}render(){return a`<calcite-panel .loading=${!this._orchestratorController&&!this._error||this._orchestratorController?.loading} .heading=${this.heading??this._messages.assistantLabel} .description=${this.description} ${v(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}><slot name=message-starter slot=message-starter></slot><slot name=messages slot=messages>${this.messages.map(t=>t.role==="assistant"?a`<arcgis-assistant-message .message=${t} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled} .readAloudEnabled=${this.readAloudEnabled} @arcgisSlottableRequest=${this.#p}><slot name=${_(t.id)??m} slot=${_(t.id)??m}>${t?.error?a`<calcite-notice class="error-notice" open icon kind=warning width=full><div slot=message>${t.error}</div></calcite-notice>`:a`<arcgis-assistant-message-text .content=${t?.content}></arcgis-assistant-message-text>`}</slot>${t.blocks?.map((e,i)=>a`<slot name=${f(t.id,i)??m} slot=${f(t.id,i)??m}><arcgis-assistant-message-block .block=${e}></arcgis-assistant-message-block></slot>`)}</arcgis-assistant-message>`:a`<arcgis-assistant-user-message .message=${t} .user=${this._user}></arcgis-assistant-user-message>`)}</slot><slot name=message-loading slot=message-loading><arcgis-assistant-message-loading .loading=${this.awaitingResponse} .loadingMessage=${this.awaitingResponseStep}></arcgis-assistant-message-loading></slot></arcgis-assistant-chat></div>${this._renderSuggestedPrompts()}<div class="footer-container" slot=footer>${this._renderEntryMessage()}<slot name=chat-entry><arcgis-assistant-chat-entry .awaitingResponse=${this.awaitingResponse} .inputValue=${this._inputValue} .messages=${this.messages} .voiceInputEnabled=${this.voiceInputEnabled} ${v(this.#n)}><slot name=entry-actions-start slot=entry-actions-start></slot><slot name=entry-actions-end slot=entry-actions-end><calcite-button .iconStart=${this.awaitingResponse?"circle-stop":"send"} @click=${()=>{this.#n.value?.submitMessage()}} round>${this.awaitingResponse?this._messages.stopButtonLabel:this._messages.askButtonLabel}</calcite-button></slot></arcgis-assistant-chat-entry></slot><slot name=footer-content></slot></div></calcite-panel>`}};S("arcgis-assistant",w);return w},"core/Collection","core/reactiveUtils","portal/Portal","core/Accessor","core/accessorSupport/decorators",b)
2
+ import{a as _,b as f}from"./EUNEQNYC.js";import{a as C}from"./XLFCW5OF.js";import"./M56MGI7M.js";import b from"./RYEH3CUI.js";import"./HFNOF6ZK.js";import{a as P}from"./47QQSSPB.js";import"./YGW7TUNX.js";import{g as E,h as a,l as $,n,t as y,u as v,v as k,w as m,y as S}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";export default $arcgis.t(([R,{whenOnce:O,watch:M,when:A},V,q,{property:d,subclass:z},{f:I}])=>{var j=E`:host{display:block;width:var(--arcgis-internal-panel-width, 100%);height:var(--arcgis-internal-expand-max-height, 100%)}.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%}.suggested-prompts{display:block;padding:var(--calcite-spacing-md);max-width:100%;box-sizing:border-box}.error-notice{padding:var(--calcite-spacing-sm)}`,H=Object.defineProperty,N=Object.getOwnPropertyDescriptor,h=(g,t,e,i)=>{for(var s=i>1?void 0:i?N(t,e):t,r=g.length-1,o;r>=0;r--)(o=g[r])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&H(t,e,s),s},l=class extends q{constructor(g){super(g),this.view=null,this.loading=!1,this.processing=!1,this.processingStep=""}async load(){this._set("loading",!0);try{await this._initialize()}finally{this._set("loading",!1)}}destroy(){this.orchestrator?.dispose(),super.destroy()}async _initialize(){this.removeHandles(),await Promise.all([this.portal.load(),this.view?.when()]),this.view&&await O(()=>!this.view.updating),this._set("orchestrator",await I.init({agents:[...this.agents],view:this.view??void 0})),this.addHandles([M(()=>[this.view,this.agents],()=>{this._initialize()})])}clearChatHistory(){this.orchestrator?.newConversation()}async*ask(g,t){if(!this.orchestrator)throw new Error("Orchestrator not initialized yet.");this._set("processing",!0),this._set("processingStep","");let e=[],i;try{let s=this.orchestrator.ask(g);for await(let r of s){let o=r.runId;if(t?.aborted){yield{type:"cancelled",runId:o};break}switch(r.type){case"trace":{this._set("processingStep",r.data.text),e.push(r.data.text);break}case"completed":{let c=r.result,p=!!c.content.length,b=!!i?.length;if(!p&&!b){yield{type:"completed",error:"Could not process the request.",log:e,runId:o};return}let u=c.content;this._set("processingStep",""),yield{type:"completed",response:u,blocks:i,log:e,runId:o};return}case"ux-suggestion":{let c=r.suggestion;i=i?[...i,c]:[c];break}case"interrupt":{let{kind:c,message:p,metadata:b}=r.interrupt,u=Array.isArray(b)?b.filter(L=>typeof L=="string"):[],x=(()=>{switch(c){case"booleanChoice":return{type:"boolean-choice",message:p,options:u};case"singleSelection":return{type:"single-select",message:p,options:u};case"multipleSelection":return{type:"multi-select",message:p,options:u};case"textInput":return{type:"text-input",message:p};default:return{type:c,message:p,options:u}}})();this._set("processingStep","Waiting for user input..."),yield{type:"interrupt",payload:x,runId:o};break}case"cancelled":{yield{type:"cancelled",runId:o};return}case"error":{yield{type:"completed",error:r.error.message,log:e,runId:o};return}default:{console.warn("Unknown event type:",r);break}}}}catch(s){console.warn("Error during message processing:",s),yield{type:"completed",error:"An error occurred during message processing.",log:e,runId:"error"};return}finally{this._set("processing",!1)}}};h([d({readOnly:!0})],l.prototype,"orchestrator",2);h([d()],l.prototype,"agents",2);h([d()],l.prototype,"portal",2);h([d()],l.prototype,"view",2);h([d({readOnly:!0})],l.prototype,"loading",2);h([d({readOnly:!0})],l.prototype,"processing",2);h([d({readOnly:!0})],l.prototype,"processingStep",2);l=h([z("OrchestratorController")],l);var D="Embeddings resource 'embeddings-v01.json' not found in the webmap portal item.",B="Embeddings not found for this web map.",F="https://developers.arcgis.com/javascript/latest/agentic-apps/ai-webmap-setup/#embeddings",w=class extends k{constructor(){super(...arguments),this._messages=C({blocking:!0}),this.#t=y(),this.#n=y(),this.#e=y(),this.#s=null,this.#o=new Map,this.#r=V.getDefault(),this.#i=t=>{t.stopPropagation(),this.cancelInterrupt()},this.#a=t=>{t.stopPropagation();let e=t.detail;this.submitInterrupt(e)},this.#l=t=>{t.stopPropagation(),this.keepSuggestedPrompts||(this.suggestedPrompts=[]);let e=t.detail;this._inputValue="",this.arcgisSubmit.emit(e),this.submitMessage(e)},this.#c=t=>{if(t.stopPropagation(),this.arcgisCancel.emit(),this._interrupt){this.orchestrator?.cancelInterrupt(),this._interrupt=null;return}this.#s?.abort()},this.#h=t=>{t.stopPropagation();let e=t.detail;this.arcgisFeedback.emit(e)},this.#g=t=>{t.stopPropagation();let e=t.detail;this._inputValue=e.prompt,this.arcgisPromptSelect.emit(e)},this.#p=t=>{this.arcgisSlottableRequest.emit(t.detail)},this._orchestratorController=null,this._interrupt=null,this._error=null,this._inputValue="",this.messages=new R([]),this.referenceElement=null,this.suggestedPrompts=[],this.feedbackEnabled=!1,this.keepSuggestedPrompts=!1,this.logEnabled=!1,this.copyEnabled=!1,this.voiceInputEnabled=!1,this.readAloudEnabled=!1,this.arcgisCancel=n(),this.arcgisError=n(),this.arcgisFeedback=n(),this.arcgisInterrupt=n(),this.arcgisInterruptCancel=n(),this.arcgisInterruptSubmit=n(),this.arcgisPromptSelect=n(),this.arcgisReady=n(),this.arcgisSubmit=n(),this.arcgisSlottableRequest=n({bubbles:!1,composed:!1})}static{this.properties={_orchestratorController:16,_interrupt:16,_error:16,_inputValue: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,logEnabled:5,copyEnabled:5,voiceInputEnabled:5,readAloudEnabled:5}}static{this.styles=j}#t;#n;#e;#s;#o;#r;#i;#a;#l;#c;#h;#g;#p;async#d(){try{let t=P(this.el,this.referenceElement);await t?.componentOnReady();let e=[...this.#o.values()];return e.length?(this._orchestratorController=new l({agents:e,portal:this.#r,view:t?.view}),await this._orchestratorController.load(),!0):(this._error="No agents found.",!1)}catch(t){return this._error=t?.message??"Error initializing orchestrator.",$(this)(t),!1}}get _user(){return this.#r?.user?.fullName||this.#r?.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.#o.set(t.agent.id,t)}async submitMessage(t){let e=t.trim();if(!e||(this.messages.push({id:Date.now().toString(),role:"user",content:e}),!this._orchestratorController))return;let i=this._orchestratorController.ask(e,this.#s?.signal);for await(let s of i){let r=s.runId;switch(s.type){case"completed":this.messages.push({role:"assistant",content:s.response,blocks:s.blocks,log:s.log,error:s.error,id:r});break;case"interrupt":this._interrupt={...s.payload,id:r},this.arcgisInterrupt.emit(this._interrupt);break;case"cancelled":this.messages.push({role:"assistant",error:"Request cancelled.",id:r});break}}}submitInterrupt(t){this.arcgisInterruptSubmit.emit(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.#g),this.#t.value?.addEventListener("arcgisSubmit",this.#l),this.#t.value?.addEventListener("arcgisCancel",this.#c),this.#t.value?.addEventListener("arcgisFeedback",this.#h);let t=A(()=>!!this._interrupt&&!!this.#e.value,()=>{let e=this.#e.value;e.removeEventListener("arcgisSubmit",this.#a),e.removeEventListener("arcgisCancel",this.#i),e.addEventListener("arcgisSubmit",this.#a,{once:!0}),e.addEventListener("arcgisCancel",this.#i,{once:!0})});return queueMicrotask(()=>{this.#d().then(e=>{e?this.arcgisReady.emit():this._error&&this.arcgisError.emit(new Error(this._error))})}),()=>{t.remove(),this.#t.value?.removeEventListener("arcgisPromptSelect",this.#g),this.#e.value?.removeEventListener("arcgisSubmit",this.#a),this.#e.value?.removeEventListener("arcgisCancel",this.#i),this.#t.value?.removeEventListener("arcgisSubmit",this.#l),this.#t.value?.removeEventListener("arcgisCancel",this.#c),this.#t.value?.removeEventListener("arcgisFeedback",this.#h),this._orchestratorController?.destroy(),this._orchestratorController=null}})}_reset(){this.#s?.abort(),this._interrupt=null,this.messages.removeAll(),this._error=null,this._inputValue=""}_renderEntryMessage(){return this._interrupt?a`<slot name=interrupt><arcgis-assistant-interrupt .type=${this._interrupt.type} .message=${this._interrupt.message} .options=${this._interrupt.options} ${v(this.#e)}></arcgis-assistant-interrupt></slot>`:this._error?this._renderErrorNotice():this.entryMessage?this.messages.length>0?null:a`<calcite-notice open kind=info closable icon width=full><div slot=message>${this.entryMessage}</div></calcite-notice>`:a`<slot name=entry-message></slot>`}_renderErrorNotice(){return this._error?a`<calcite-notice closable slot=entry-message open kind=danger icon width=full>${this._error===D?a`<div slot=message>${B}</div><calcite-link slot=link .href=${F} target=_blank title="Learn about web map embeddings">Read more</calcite-link>`:a`<div slot=message>${this._error}</div>`}</calcite-notice>`:null}_renderSuggestedPrompts(){return this.suggestedPrompts?.length?a`<div class="suggested-prompts-container"><arcgis-assistant-suggested-prompts class="suggested-prompts" .prompts=${this.suggestedPrompts}></arcgis-assistant-suggested-prompts></div>`:null}render(){return a`<calcite-panel .loading=${!this._orchestratorController&&!this._error||this._orchestratorController?.loading} .heading=${this.heading??this._messages.assistantLabel} .description=${this.description} ${v(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}><slot name=message-starter slot=message-starter></slot><slot name=messages slot=messages>${this.messages.map(t=>t.role==="assistant"?a`<arcgis-assistant-message .message=${t} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled} .readAloudEnabled=${this.readAloudEnabled} @arcgisSlottableRequest=${this.#p}><slot name=${_(t.id)??m} slot=${_(t.id)??m}>${t?.error?a`<calcite-notice class="error-notice" open icon kind=warning width=full><div slot=message>${t.error}</div></calcite-notice>`:a`<arcgis-assistant-message-text .content=${t?.content}></arcgis-assistant-message-text>`}</slot>${t.blocks?.map((e,i)=>a`<slot name=${f(t.id,i)??m} slot=${f(t.id,i)??m}><arcgis-assistant-message-block .block=${e}></arcgis-assistant-message-block></slot>`)}</arcgis-assistant-message>`:a`<arcgis-assistant-user-message .message=${t} .user=${this._user}></arcgis-assistant-user-message>`)}</slot><slot name=message-loading slot=message-loading><arcgis-assistant-message-loading .loading=${this.awaitingResponse} .loadingMessage=${this.awaitingResponseStep}></arcgis-assistant-message-loading></slot></arcgis-assistant-chat></div>${this._renderSuggestedPrompts()}<div class="footer-container" slot=footer>${this._renderEntryMessage()}<slot name=chat-entry><arcgis-assistant-chat-entry .awaitingResponse=${this.awaitingResponse} .inputValue=${this._inputValue} .messages=${this.messages} .voiceInputEnabled=${this.voiceInputEnabled} ${v(this.#n)}><slot name=entry-actions-start slot=entry-actions-start></slot><slot name=entry-actions-end slot=entry-actions-end><calcite-button .iconStart=${this.awaitingResponse?"circle-stop":"send"} @click=${()=>{this.#n.value?.submitMessage()}} round>${this.awaitingResponse?this._messages.stopButtonLabel:this._messages.askButtonLabel}</calcite-button></slot></arcgis-assistant-chat-entry></slot><slot name=footer-content></slot></div></calcite-panel>`}};S("arcgis-assistant",w);return w},"core/Collection","core/reactiveUtils","portal/Portal","core/Accessor","core/accessorSupport/decorators",b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{A as z,Ab as _,B as A,Bb as $,C as B,Cb as aa,Fb as ba,Gb as ca,Hb as da,Ib as ea,Jb as fa,Kb as ga,Lb as ha,Mb as ia,Nb as ja,Ob as ka,Pb as la,a,b,bb as C,c,cb as D,d,db as E,e,eb as F,f,fb as G,gb as H,h as g,hb as I,i as h,ib as J,j as i,jb as K,k as j,kb as L,l as k,lb as M,m as l,mb as N,n as m,nb as O,o as n,ob as P,p as o,pb as Q,q as p,r as q,rb as R,s as r,sb as S,t as s,tb as T,u as t,ub as U,v as u,vb as V,w as v,wb as W,x as w,xb as X,y as x,yb as Y,z as y,zb as Z}from"./WDTUSWTQ.js";import"./CFDTXKJ6.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};
2
+ import{A as z,Ab as _,B as A,Bb as $,C as B,Cb as aa,Fb as ba,Gb as ca,Hb as da,Ib as ea,Jb as fa,Kb as ga,Lb as ha,Mb as ia,Nb as ja,Ob as ka,Pb as la,a,b,bb as C,c,cb as D,d,db as E,e,eb as F,f,fb as G,gb as H,h as g,hb as I,i as h,ib as J,j as i,jb as K,k as j,kb as L,l as k,lb as M,m as l,mb as N,n as m,nb as O,o as n,ob as P,p as o,pb as Q,q as p,r as q,rb as R,s as r,sb as S,t as s,tb as T,u as t,ub as U,v as u,vb as V,w as v,wb as W,x as w,xb as X,y as x,yb as Y,z as y,zb as Z}from"./HFNOF6ZK.js";import"./CFDTXKJ6.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,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{$ as Ta,$a as Qs,Aa as ja,Ab as Ha,Ba as L,Ca as w,Cb as No,D as ya,Da as Zs,Db as Dn,E as xe,Ea as je,Eb as $o,F as wa,Fa as Ln,Fb as jo,G as Io,Ga as Le,H as Ds,Ha as fr,I as Us,Ia as hr,J as xo,Ja as Vs,K as Fs,Ka as La,La as Gs,M as D,Ma as Eo,N as Bs,Na as za,O as Aa,Oa as Da,P as ba,Pa as Mo,Q as S,Qa as Ua,R as To,Ra as gr,S as Je,Sa as Ys,T as vo,Ta as Fa,U as Ia,Ua as Ba,V as xa,Va as zn,W as Te,Wa as Ka,X as Ks,Xa as Xs,Y as Ws,Ya as _r,Z as fe,Za as b,_ as Co,a as Ao,aa as va,ab as Ro,b as Z,ba as Hs,ca as ko,da as Ca,ea as ve,eb as Wa,f as de,fa as $n,ga as qs,ha as ka,ia as Js,j as ue,ja as Oa,k as be,ka as jn,kb as he,la as pt,ma as Pa,na as Sa,oa as Ea,pa as dr,qa as Ma,ra as Ze,sa as Ra,t as _a,ta as Na,u as bo,ua as mt,va as Oo,wa as Ve,xa as Po,xb as dt,ya as $a,yb as ei,za as So,zb as ge}from"./WDTUSWTQ.js";export default $arcgis.t(([da,zs,Yc,Pf,Sf])=>{async function ti(t,e,r){if(r===void 0)throw new Error(["Unable to dispatch a custom event without a parent run id.",'"dispatchCustomEvent" can only be called from within an existing run (e.g.,',"inside a tool or a RunnableLambda).",`
2
+ import{$ as Ta,$a as Qs,Aa as ja,Ab as Ha,Ba as L,Ca as w,Cb as No,D as ya,Da as Zs,Db as Dn,E as xe,Ea as je,Eb as $o,F as wa,Fa as Ln,Fb as jo,G as Io,Ga as Le,H as Ds,Ha as fr,I as Us,Ia as hr,J as xo,Ja as Vs,K as Fs,Ka as La,La as Gs,M as D,Ma as Eo,N as Bs,Na as za,O as Aa,Oa as Da,P as ba,Pa as Mo,Q as S,Qa as Ua,R as To,Ra as gr,S as Je,Sa as Ys,T as vo,Ta as Fa,U as Ia,Ua as Ba,V as xa,Va as zn,W as Te,Wa as Ka,X as Ks,Xa as Xs,Y as Ws,Ya as _r,Z as fe,Za as b,_ as Co,a as Ao,aa as va,ab as Ro,b as Z,ba as Hs,ca as ko,da as Ca,ea as ve,eb as Wa,f as de,fa as $n,ga as qs,ha as ka,ia as Js,j as ue,ja as Oa,k as be,ka as jn,kb as he,la as pt,ma as Pa,na as Sa,oa as Ea,pa as dr,qa as Ma,ra as Ze,sa as Ra,t as _a,ta as Na,u as bo,ua as mt,va as Oo,wa as Ve,xa as Po,xb as dt,ya as $a,yb as ei,za as So,zb as ge}from"./HFNOF6ZK.js";export default $arcgis.t(([da,zs,Yc,Pf,Sf])=>{async function ti(t,e,r){if(r===void 0)throw new Error(["Unable to dispatch a custom event without a parent run id.",'"dispatchCustomEvent" can only be called from within an existing run (e.g.,',"inside a tool or a RunnableLambda).",`
3
3
 
4
4
  If you continue to see this error, please import from "@langchain/core/callbacks/dispatch/web"`,"and explicitly pass in a config parameter.",`
5
5
 
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import c from"./X46FZMAM.js";import b from"./MF3MSWS4.js";import"./WDTUSWTQ.js";import{a as i,c as e}from"./EJWQC2SL.js";import"./47QQSSPB.js";import"./YGW7TUNX.js";import{v as a,y as s}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{a:r}])=>{var t=class extends a{constructor(){super(...arguments),this.agent=r}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-navigation-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=i(this,"arcgis-assistant-navigation-agent"),e(this)}};s("arcgis-assistant-navigation-agent",t);return t},b,c)
2
+ import c from"./PIZXBPBY.js";import b from"./RYEH3CUI.js";import"./HFNOF6ZK.js";import{a as i,c as e}from"./EJWQC2SL.js";import"./47QQSSPB.js";import"./YGW7TUNX.js";import{v as a,y as s}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{a:r}])=>{var t=class extends a{constructor(){super(...arguments),this.agent=r}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-navigation-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=i(this,"arcgis-assistant-navigation-agent"),e(this)}};s("arcgis-assistant-navigation-agent",t);return t},b,c)
package/dist/cdn/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{p as s,x as e}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";var a=s(e,{"arcgis-assistant":[()=>import("./MUFXOT46.js"),"_messages:,awaitingResponse:,awaitingResponseStep:,copyEnabled,description,entryMessage,feedbackEnabled,heading,interrupt:,keepSuggestedPrompts,logEnabled,messages:,orchestrator:,readAloudEnabled,referenceElement,suggestedPrompts:,voiceInputEnabled;clearChatHistory,submitMessage;cancelInterrupt,register,submitInterrupt"],"arcgis-assistant-agent":[()=>import("./RACFQ7G7.js"),"agent:,context:;getContext"],"arcgis-assistant-data-exploration-agent":[()=>import("./KPKDZVA6.js"),"referenceElement;;getContext"],"arcgis-assistant-help-agent":[()=>import("./2VDQGTH4.js"),"referenceElement;;getContext"],"arcgis-assistant-knowledge-agent":[()=>import("./XMAP3ROU.js"),"context:,referenceElement,serviceUrl;getContext"],"arcgis-assistant-layer-styling-agent":[()=>import("./HP5T2HHB.js"),"referenceElement;;getContext"],"arcgis-assistant-navigation-agent":[()=>import("./P43WQJMR.js"),"referenceElement;;getContext"],"arcgis-assistant-chat":[()=>import("./2TKDD7IY.js"),"loading,messages:"],"arcgis-assistant-chat-entry":[()=>import("./KDUG6AWZ.js"),"_messages:,awaitingResponse,entryPlaceholder,inputValue,keyboardShortcutsDisabled,messages:,status,voiceInputEnabled;submitMessage"],"arcgis-assistant-interrupt":[()=>import("./LO2B4N4X.js"),"_messages:,message,options:,type"],"arcgis-assistant-message":[()=>import("./MM4TFFXX.js"),"copyEnabled,feedbackEnabled,footerDisabled,logEnabled,message:,readAloudEnabled"],"arcgis-assistant-message-block":[()=>import("./ASFDOICU.js"),"block:"],"arcgis-assistant-message-feedback":[()=>import("./6QA7CIBO.js"),"_messages:,feedbackEnabled,message:"],"arcgis-assistant-message-footer":[()=>import("./QEYLJYK7.js"),"_messages:,copyEnabled,feedbackEnabled,logEnabled,message:,readAloudEnabled"],"arcgis-assistant-message-loading":[()=>import("./PYVVZRRJ.js"),"loading,loadingMessage"],"arcgis-assistant-message-log":[()=>import("./HLQO5XOD.js"),"log:,logEnabled,showLog"],"arcgis-assistant-message-read-aloud":[()=>import("./ESN4ETG6.js"),"_messages:,message:,readAloudEnabled"],"arcgis-assistant-message-text":[()=>import("./3BATZ34V.js"),"content"],"arcgis-assistant-speech-input":[()=>import("./RBLFCUDD.js"),"awaitingResponse,inputValue,language,mode;;clearDraftSession"],"arcgis-assistant-suggested-prompts":[()=>import("./ZTRICLZY.js"),"_messages:,label,prompts:"],"arcgis-assistant-user-message":[()=>import("./SRNPZKME.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-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)=>{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)
2
+ import{p as s,x as e}from"./J2F4YIQI.js";import"./CFDTXKJ6.js";var a=s(e,{"arcgis-assistant":[()=>import("./R5PFKR6I.js"),"_messages:,awaitingResponse:,awaitingResponseStep:,copyEnabled,description,entryMessage,feedbackEnabled,heading,interrupt:,keepSuggestedPrompts,logEnabled,messages:,orchestrator:,readAloudEnabled,referenceElement,suggestedPrompts:,voiceInputEnabled;clearChatHistory,submitMessage;cancelInterrupt,register,submitInterrupt"],"arcgis-assistant-agent":[()=>import("./RACFQ7G7.js"),"agent:,context:;getContext"],"arcgis-assistant-data-exploration-agent":[()=>import("./5Q2LHUKO.js"),"referenceElement;;getContext"],"arcgis-assistant-help-agent":[()=>import("./F5JLKZGF.js"),"referenceElement;;getContext"],"arcgis-assistant-knowledge-agent":[()=>import("./QL7OYRRH.js"),"context:,referenceElement,serviceUrl;getContext"],"arcgis-assistant-layer-styling-agent":[()=>import("./QJGILG6H.js"),"referenceElement;;getContext"],"arcgis-assistant-navigation-agent":[()=>import("./SXMUM7V7.js"),"referenceElement;;getContext"],"arcgis-assistant-chat":[()=>import("./2TKDD7IY.js"),"loading,messages:"],"arcgis-assistant-chat-entry":[()=>import("./KDUG6AWZ.js"),"_messages:,awaitingResponse,entryPlaceholder,inputValue,keyboardShortcutsDisabled,messages:,status,voiceInputEnabled;submitMessage"],"arcgis-assistant-interrupt":[()=>import("./GHPDN2L7.js"),"_messages:,message,options:,type"],"arcgis-assistant-message":[()=>import("./MM4TFFXX.js"),"copyEnabled,feedbackEnabled,footerDisabled,logEnabled,message:,readAloudEnabled"],"arcgis-assistant-message-block":[()=>import("./ASFDOICU.js"),"block:"],"arcgis-assistant-message-feedback":[()=>import("./6QA7CIBO.js"),"_messages:,feedbackEnabled,message:"],"arcgis-assistant-message-footer":[()=>import("./QEYLJYK7.js"),"_messages:,copyEnabled,feedbackEnabled,logEnabled,message:,readAloudEnabled"],"arcgis-assistant-message-loading":[()=>import("./PYVVZRRJ.js"),"loading,loadingMessage"],"arcgis-assistant-message-log":[()=>import("./HLQO5XOD.js"),"log:,logEnabled,showLog"],"arcgis-assistant-message-read-aloud":[()=>import("./4SZDSAFW.js"),"_messages:,message:,readAloudEnabled"],"arcgis-assistant-message-text":[()=>import("./3BATZ34V.js"),"content"],"arcgis-assistant-speech-input":[()=>import("./RBLFCUDD.js"),"awaitingResponse,inputValue,language,mode;;clearDraftSession"],"arcgis-assistant-suggested-prompts":[()=>import("./ZTRICLZY.js"),"_messages:,label,prompts:"],"arcgis-assistant-user-message":[()=>import("./SRNPZKME.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-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)=>{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)
@@ -1,19 +1,15 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
2
  import { c as a } from "../../chunks/runtime.js";
3
- import { css as c, html as e } from "lit";
4
- import { LitElement as l, createEvent as s } from "@arcgis/lumina";
5
- import { u as n } from "../../chunks/useT9n.js";
6
- const r = c``;
7
- class o extends l {
3
+ import { html as e } from "lit";
4
+ import { LitElement as c, createEvent as s } from "@arcgis/lumina";
5
+ import { u as l } from "../../chunks/useT9n.js";
6
+ class n extends c {
8
7
  constructor() {
9
- super(...arguments), this.#t = [], this._messages = n({ blocking: !0 }), this.arcgisCancel = s(), this.arcgisSubmit = s();
8
+ super(...arguments), this.#t = [], this._messages = l({ blocking: !0 }), this.arcgisCancel = s(), this.arcgisSubmit = s();
10
9
  }
11
10
  static {
12
11
  this.properties = { type: 1, message: 1, options: 0 };
13
12
  }
14
- static {
15
- this.styles = r;
16
- }
17
13
  #t;
18
14
  _renderInterruptOptions() {
19
15
  switch (this.type) {
@@ -31,7 +27,7 @@ class o extends l {
31
27
  return e`<calcite-panel .description=${this.message}>${this._renderInterruptOptions()}<calcite-button slot=footer-end appearance=outline @click=${() => this.arcgisCancel.emit()}>${this._messages.cancelButtonLabel}</calcite-button><calcite-button slot=footer-end appearance=solid @click=${() => this.arcgisSubmit.emit(this.type === "boolean-choice" ? !0 : this.#t)}>${this._messages.submitButtonLabel}</calcite-button></calcite-panel>`;
32
28
  }
33
29
  }
34
- a("arcgis-assistant-interrupt", o);
30
+ a("arcgis-assistant-interrupt", n);
35
31
  export {
36
- o as ArcgisAssistantInterrupt
32
+ n as ArcgisAssistantInterrupt
37
33
  };
@@ -1,21 +1,20 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { c as u } from "../../chunks/runtime.js";
3
- import { css as p, html as h } from "lit";
4
- import { watch as m } from "@arcgis/core/core/reactiveUtils.js";
5
- import { LitElement as _ } from "@arcgis/lumina";
6
- import { u as g } from "../../chunks/useT9n.js";
7
- import f from "@arcgis/core/core/Accessor.js";
8
- import { property as d, subclass as y } from "@arcgis/core/core/accessorSupport/decorators.js";
9
- const A = p``;
10
- var C = Object.defineProperty, S = Object.getOwnPropertyDescriptor, c = (e, s, n, i) => {
11
- for (var r = i > 1 ? void 0 : i ? S(s, n) : s, t = e.length - 1, a; t >= 0; t--)
2
+ import { c } from "../../chunks/runtime.js";
3
+ import { html as p } from "lit";
4
+ import { watch as h } from "@arcgis/core/core/reactiveUtils.js";
5
+ import { LitElement as m } from "@arcgis/lumina";
6
+ import { u as _ } from "../../chunks/useT9n.js";
7
+ import g from "@arcgis/core/core/Accessor.js";
8
+ import { property as u, subclass as f } from "@arcgis/core/core/accessorSupport/decorators.js";
9
+ var y = Object.defineProperty, A = Object.getOwnPropertyDescriptor, d = (e, s, n, i) => {
10
+ for (var r = i > 1 ? void 0 : i ? A(s, n) : s, t = e.length - 1, a; t >= 0; t--)
12
11
  (a = e[t]) && (r = (i ? a(s, n, r) : a(r)) || r);
13
- return i && r && C(s, n, r), r;
12
+ return i && r && y(s, n, r), r;
14
13
  };
15
14
  function l() {
16
15
  return typeof window > "u" ? null : window;
17
16
  }
18
- let o = class extends f {
17
+ let o = class extends g {
19
18
  constructor() {
20
19
  super(...arguments), this._utterance = null, this.state = "idle", this.supported = o.isSupported();
21
20
  }
@@ -62,28 +61,25 @@ let o = class extends f {
62
61
  this._utterance && (this._utterance.onend = null, this._utterance.onerror = null), this._utterance = null, this._set("state", "idle");
63
62
  }
64
63
  };
65
- c([
66
- d({ readOnly: !0 })
64
+ d([
65
+ u({ readOnly: !0 })
67
66
  ], o.prototype, "state", 2);
68
- c([
69
- d({ readOnly: !0 })
67
+ d([
68
+ u({ readOnly: !0 })
70
69
  ], o.prototype, "supported", 2);
71
- o = c([
72
- y("ReadAloudController")
70
+ o = d([
71
+ f("ReadAloudController")
73
72
  ], o);
74
- class w extends _ {
73
+ class C extends m {
75
74
  constructor() {
76
- super(...arguments), this._messages = g({ blocking: !0 }), this._readAloudController = new o(), this.readAloudEnabled = !1;
75
+ super(...arguments), this._messages = _({ blocking: !0 }), this._readAloudController = new o(), this.readAloudEnabled = !1;
77
76
  }
78
77
  static {
79
78
  this.properties = { readAloudEnabled: 5, message: 0 };
80
79
  }
81
- static {
82
- this.styles = A;
83
- }
84
80
  loaded() {
85
81
  this.manager.onLifecycle(() => [
86
- m(() => this._readAloudController.state, () => this.requestUpdate(), { initial: !0 }),
82
+ h(() => this._readAloudController.state, () => this.requestUpdate(), { initial: !0 }),
87
83
  {
88
84
  remove: () => {
89
85
  this._readAloudController.stop();
@@ -95,10 +91,10 @@ class w extends _ {
95
91
  this._readAloudController.toggle(this.message?.content ?? "");
96
92
  }
97
93
  render() {
98
- return this.readAloudEnabled && !this.message?.error && this.message?.content?.trim() && this._readAloudController.supported ? h`<calcite-action id=action-read-aloud .icon=${this._readAloudController.state === "playing" ? "sound-off" : "sound"} scale=s .active=${this._readAloudController.state === "playing"} @click=${() => this._toggleReadAloud()} text></calcite-action><calcite-tooltip reference-element=action-read-aloud overlay-positioning=fixed placement=bottom><span>${this._readAloudController.state === "playing" ? this._messages.stopReadingButtonLabel : this._messages.readAloudButtonLabel}</span></calcite-tooltip>` : null;
94
+ return this.readAloudEnabled && !this.message?.error && this.message?.content?.trim() && this._readAloudController.supported ? p`<calcite-action id=action-read-aloud .icon=${this._readAloudController.state === "playing" ? "sound-off" : "sound"} scale=s .active=${this._readAloudController.state === "playing"} @click=${() => this._toggleReadAloud()} text></calcite-action><calcite-tooltip reference-element=action-read-aloud overlay-positioning=fixed placement=bottom><span>${this._readAloudController.state === "playing" ? this._messages.stopReadingButtonLabel : this._messages.readAloudButtonLabel}</span></calcite-tooltip>` : null;
99
95
  }
100
96
  }
101
- u("arcgis-assistant-message-read-aloud", w);
97
+ c("arcgis-assistant-message-read-aloud", C);
102
98
  export {
103
- w as ArcgisAssistantMessageReadAloud
99
+ C as ArcgisAssistantMessageReadAloud
104
100
  };