1/*! All material copyright Esri, All Rights Reserved, unless otherwise specified. 2See https://js.arcgis.com/3.undefined/esri/copyright.txt for details. 3v3 */ 4import{a as r}from"./RYWVNGJI.js";import"./75URICDO.js";import{n as d,r as p,t as c}from"./Y5O75NXK.js";import{a as l,b as t,g as a,j as u}from"./ZBDKIOAX.js";import{a as i,d as e}from"./VLXL6IPL.js";var f=l`.container{margin-top:10px;box-sizing:border-box;min-inline-size:0;width:100%}.related-heading{padding-top:24px}.related-label{font-weight:var(--calcite-font-weight-bold);font-size:16px;color:var(--calcite-color-text-3);text-transform:uppercase;margin-bottom:16px}.followUpQuestion{margin-bottom:12px;display:block;width:100%;inline-size:100%;max-inline-size:100%;min-inline-size:0;box-sizing:border-box;white-space:normal}.follow-up-questions,.follow-up-questions>div{width:100%;max-inline-size:100%;min-inline-size:0}.follow-up-questions>div{animation:related-question-fade-in .18s ease-out both}.follow-up-questions>div:nth-child(2){animation-delay:80ms}.follow-up-questions>div:nth-child(3){animation-delay:.16s}@keyframes related-question-fade-in{0%{opacity:0}to{opacity:1}}.followUpQuestion::part(button){inline-size:100%;max-inline-size:100%;min-inline-size:0;white-space:normal}.follow-up-question-icon{display:inline-block;vertical-align:text-bottom;margin-right:4px;position:relative}.follow-up-question-text{font-size:var(--calcite-font-size--1);padding:2px 0;max-inline-size:100%;min-inline-size:0;overflow-wrap:anywhere;word-break:break-word;white-space:normal}`,w=p(),n=class extends a{constructor(){super(...arguments),this.followUpQuestions=[]}static{this.properties={followUpQuestions:16,questionAnswers:16,apiCallValues:16,unAnsweredQuestion:16,flags:16}}static{this.styles=f}load(){e.subscribe("followUpQuestions",this.updatefollowUpQuestions.bind(this)),e.subscribe("questionAnswers",this.updatequestionAnswers.bind(this)),e.subscribe("apiCallValues",this.updateapiCallValues.bind(this)),e.subscribe("unAnsweredQuestion",this.updateUnAnsweredQuestion.bind(this)),e.subscribe("flags",this.updateFlags.bind(this)),this.updateUnAnsweredQuestion(),this.updatequestionAnswers(),this.updateapiCallValues(),this.updatefollowUpQuestions(),this.updateFlags()}loaded(){}disconnectedCallback(){super.disconnectedCallback(),e.unsubscribe("questionAnswers",this.updatequestionAnswers.bind(this)),e.unsubscribe("apiCallValues",this.updateapiCallValues.bind(this)),e.unsubscribe("followUpQuestions",this.updatefollowUpQuestions.bind(this)),e.unsubscribe("unAnsweredQuestion",this.updateUnAnsweredQuestion.bind(this)),e.unsubscribe("flags",this.updateFlags.bind(this))}updatefollowUpQuestions(){this.followUpQuestions=e.getState().followUpQuestions}updatequestionAnswers(){this.questionAnswers=e.getState().questionAnswers}updateapiCallValues(){this.apiCallValues=e.getState().apiCallValues}updateUnAnsweredQuestion(){this.unAnsweredQuestion=e.getState().unAnsweredQuestion}updateFlags(){this.flags=e.getState().flags}isResponseInProgress(){return!!this.unAnsweredQuestion||this.questionAnswers?.some(s=>"answer"in s&&s.typewrite)}handleFollowUpClick(s){s.trim()&&!this.isResponseInProgress()&&(c({eventName:"follow-up-question-click",eventDescription:`Follow Up Question: ${s}`,componentPlacement:"Right Column"}),e.set("unAnsweredQuestion",s),window.dispatchEvent(new CustomEvent("scrollchatbottom")),r(this.questionAnswers,this.apiCallValues,s))}render(){let s=e.getState().strings,{related:h}=w===i.MARKETING?{related:s.relatedPrompts}:{related:s.relatedTopics},b=!![i.MARKETING,i.TRUST].includes(w);return this.followUpQuestions.length===0||!b&&!d(this.flags)||this.isResponseInProgress()?null:t`<div class="container"><div class="related-heading"><div class="related-label">${h}</div></div><div class="follow-up-questions">${this.followUpQuestions.map(o=>t`<div><calcite-button .disabled=${!!this.unAnsweredQuestion} scale=s width=full class="followUpQuestion" appearance=outline @click=${()=>this.handleFollowUpClick(o)}><div class="follow-up-question-text">${o}</div></calcite-button></div>`)}</div></div>`}};
4u("related-to",n);export{n as RelatedTo};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.