@genpact/genome.mfe.mgtwin-app 1.1.311-alpha → 1.1.312-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/dist/{ArrowLeftCircleIcon-5d3ac10e.mjs → ArrowLeftCircleIcon-2be68489.mjs} +1 -1
  2. package/dist/{AssessmentAMA-7dbd0987.mjs → AssessmentAMA-b7a32d79.mjs} +150 -149
  3. package/dist/{AssessmentSimulation-9e0c78c9.mjs → AssessmentSimulation-514bc62b.mjs} +5 -5
  4. package/dist/{EditSkillAdminData-a315c42b.mjs → EditSkillAdminData-60412728.mjs} +3 -3
  5. package/dist/{EditSkillData-3adb9c25.mjs → EditSkillData-3008533c.mjs} +3 -3
  6. package/dist/{HomeView-1403e99e.mjs → HomeView-f325fe60.mjs} +5 -5
  7. package/dist/{Loading-55c1b179.mjs → Loading-7429bd4e.mjs} +1 -1
  8. package/dist/{LoadingSimulation-eb991eab.mjs → LoadingSimulation-7f97a93f.mjs} +1 -1
  9. package/dist/{Modal-6063cc76.mjs → Modal-6d8f7e5b.mjs} +1 -1
  10. package/dist/{PaperAirplaneIcon-35eb2c6d.mjs → PaperAirplaneIcon-b446e525.mjs} +1 -1
  11. package/dist/{PromptTesting-b8e80b97.mjs → PromptTesting-c0c9b1bb.mjs} +3 -3
  12. package/dist/{SkillAutomation-c04a74bd.mjs → SkillAutomation-d070b5e6.mjs} +3 -3
  13. package/dist/{SkillData-dc571aff.mjs → SkillData-82b28d02.mjs} +3 -3
  14. package/dist/{Testcase-1b11356a.mjs → Testcase-e84e8aa4.mjs} +3 -3
  15. package/dist/{UnderMaintenance-f5dcb753.mjs → UnderMaintenance-6d7e18c6.mjs} +1 -1
  16. package/dist/{_commonjsHelpers-3c08efdf.mjs → _commonjsHelpers-087be944.mjs} +1 -1
  17. package/dist/{api-c764c078.mjs → api-59c6e1f4.mjs} +1 -1
  18. package/dist/{main-de91403a.mjs → main-32671bcc.mjs} +1284 -1284
  19. package/dist/mgtwin.es.min.js +1 -1
  20. package/dist/mgtwin.umd.min.js +1 -1
  21. package/dist/style.css +1 -1
  22. package/package.json +1 -1
@@ -32,4 +32,4 @@ File System access not available, please use Push or PullAudioOutputStream`),thi
32
32
  \r
33
33
  `);A&&A.length>0&&(o=this.parseHeaders(A[0]),A.length>1&&(s=A[1]))}i.resolve(new ei.ConnectionMessage(e.messageType,s,o,e.id))}else if(e.messageType===ei.MessageType.Binary){const n=e.binaryContent;let o={},s=null;if(!n||n.byteLength<2)throw new Error("Invalid binary message format. Header length missing.");const A=new DataView(n),r=A.getInt16(0);if(n.byteLength<r+2)throw new Error("Invalid binary message format. Header content missing.");let a="";for(let c=0;c<r;c++)a+=String.fromCharCode(A.getInt8(c+2));o=this.parseHeaders(a),n.byteLength>r+2&&(s=n.slice(2+r)),i.resolve(new ei.ConnectionMessage(e.messageType,s,o,e.id))}}catch(n){i.reject(`Error formatting the message. Error: ${n}`)}return i.promise}fromConnectionMessage(e){const i=new ei.Deferred;try{if(e.messageType===ei.MessageType.Text){const n=`${this.makeHeaders(e)}${jd}${e.textBody?e.textBody:""}`;i.resolve(new ei.RawWebsocketMessage(ei.MessageType.Text,n,e.id))}else if(e.messageType===ei.MessageType.Binary){const n=this.makeHeaders(e),o=e.binaryBody,s=this.stringToArrayBuffer(n),A=new Int8Array(s),r=A.byteLength,a=new Int8Array(2+r+(o?o.byteLength:0));if(a[0]=r>>8&255,a[1]=r&255,a.set(A,2),o){const u=new Int8Array(o);a.set(u,2+r)}const c=a.buffer;i.resolve(new ei.RawWebsocketMessage(ei.MessageType.Binary,c,e.id))}}catch(n){i.reject(`Error formatting the message. ${n}`)}return i.promise}makeHeaders(e){let i="";if(e.headers)for(const n in e.headers)n&&(i+=`${n}: ${e.headers[n]}${jd}`);return i}parseHeaders(e){const i={};if(e){const n=e.match(/[^\r\n]+/g);if(i){for(const o of n)if(o){const s=o.indexOf(":"),A=s>0?o.substr(0,s).trim().toLowerCase():o,r=s>0&&o.length>s+1?o.substr(s+1).trim():"";i[A]=r}}}return i}stringToArrayBuffer(e){const i=new ArrayBuffer(e.length),n=new DataView(i);for(let o=0;o<e.length;o++)n.setUint8(o,e.charCodeAt(o));return i}}wc.WebsocketMessageFormatter=nO;var qs={},Yd;function rO(){if(Yd)return qs;Yd=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.SpeechConnectionFactory=void 0;const t=Ct(),e=oe(),i=V(),n=ui(),o=oe(),s=ht,A=ci,r=Jt;let a=class extends n.ConnectionFactoryBase{constructor(){super(...arguments),this.interactiveRelativeUri="/speech/recognition/interactive/cognitiveservices/v1",this.conversationRelativeUri="/speech/recognition/conversation/cognitiveservices/v1",this.dictationRelativeUri="/speech/recognition/dictation/cognitiveservices/v1",this.universalUri="/stt/speech/universal/v"}async create(u,l,g){let E=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Endpoint,void 0);const C=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Region,void 0),d=n.ConnectionFactoryBase.getHostSuffix(C),S=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Host,"wss://"+C+".stt.speech"+d),I={},p=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_EndpointId,void 0),M=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_RecoLanguage,void 0);if(p?(!E||E.search(A.QueryParameterNames.CustomSpeechDeploymentId)===-1)&&(I[A.QueryParameterNames.CustomSpeechDeploymentId]=p):M&&(!E||E.search(A.QueryParameterNames.Language)===-1)&&(I[A.QueryParameterNames.Language]=M),(!E||E.search(A.QueryParameterNames.Format)===-1)&&(I[A.QueryParameterNames.Format]=u.parameters.getProperty(e.OutputFormatPropertyName,i.OutputFormat[i.OutputFormat.Simple]).toLowerCase()),u.autoDetectSourceLanguages!==void 0&&(I[A.QueryParameterNames.EnableLanguageId]="true"),this.setCommonUrlParams(u,I,E),E){const R=new URL(E),k=R.pathname;(k===""||k==="/")&&(R.pathname=this.universalUri+u.recognitionEndpointVersion,E=await n.ConnectionFactoryBase.getRedirectUrlFromEndpoint(R.toString()))}if(!E)switch(u.recognitionMode){case r.RecognitionMode.Conversation:u.parameters.getProperty(e.ForceDictationPropertyName,"false")==="true"?E=S+this.dictationRelativeUri:u.recognitionEndpointVersion!==void 0&&parseInt(u.recognitionEndpointVersion,10)>1?E=`${S}${this.universalUri}${u.recognitionEndpointVersion}`:E=S+this.conversationRelativeUri;break;case r.RecognitionMode.Dictation:E=S+this.dictationRelativeUri;break;default:u.recognitionEndpointVersion!==void 0&&parseInt(u.recognitionEndpointVersion,10)>1?E=`${S}${this.universalUri}${u.recognitionEndpointVersion}`:E=S+this.interactiveRelativeUri;break}const B={};l.token!==void 0&&l.token!==""&&(B[l.headerName]=l.token),B[s.HeaderNames.ConnectionId]=g,B.connectionId=g;const T=u.parameters.getProperty("SPEECH-EnableWebsocketCompression","false")==="true",L=new t.WebsocketConnection(E,I,B,new o.WebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(u),T,g),O=L.uri;return u.parameters.setProperty(i.PropertyId.SpeechServiceConnection_Url,O),L}};return qs.SpeechConnectionFactory=a,qs}var Vs={},zd;function oO(){if(zd)return Vs;zd=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.ConversationTranscriberConnectionFactory=void 0;const t=Ct(),e=V(),i=oe(),n=ui(),o=oe(),s=ht,A=ci;let r=class extends n.ConnectionFactoryBase{constructor(){super(...arguments),this.universalUri="/speech/universal/v2"}async create(c,u,l){let g=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Endpoint,void 0);const E=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Region,void 0),C=n.ConnectionFactoryBase.getHostSuffix(E),d=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Host,"wss://"+E+".stt.speech"+C),S={},I=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_EndpointId,void 0),p=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_RecoLanguage,void 0);if(I?(!g||g.search(A.QueryParameterNames.CustomSpeechDeploymentId)===-1)&&(S[A.QueryParameterNames.CustomSpeechDeploymentId]=I):p&&(!g||g.search(A.QueryParameterNames.Language)===-1)&&(S[A.QueryParameterNames.Language]=p),c.autoDetectSourceLanguages!==void 0&&(S[A.QueryParameterNames.EnableLanguageId]="true"),this.setV2UrlParams(c,S,g),g){const O=new URL(g),R=O.pathname;(R===""||R==="/")&&(O.pathname=this.universalUri,g=await n.ConnectionFactoryBase.getRedirectUrlFromEndpoint(O.toString()))}g||(g=`${d}${this.universalUri}`);const M={};u.token!==void 0&&u.token!==""&&(M[u.headerName]=u.token),M[s.HeaderNames.ConnectionId]=l;const B=c.parameters.getProperty("SPEECH-EnableWebsocketCompression","false")==="true",T=new t.WebsocketConnection(g,S,M,new o.WebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(c),B,l),L=T.uri;return c.parameters.setProperty(e.PropertyId.SpeechServiceConnection_Url,L),T}setV2UrlParams(c,u,l){new Map([[e.PropertyId.Speech_SegmentationSilenceTimeoutMs,A.QueryParameterNames.SegmentationSilenceTimeoutMs],[e.PropertyId.SpeechServiceConnection_EnableAudioLogging,A.QueryParameterNames.EnableAudioLogging],[e.PropertyId.SpeechServiceConnection_EndSilenceTimeoutMs,A.QueryParameterNames.EndSilenceTimeoutMs],[e.PropertyId.SpeechServiceConnection_InitialSilenceTimeoutMs,A.QueryParameterNames.InitialSilenceTimeoutMs],[e.PropertyId.SpeechServiceResponse_PostProcessingOption,A.QueryParameterNames.Postprocessing],[e.PropertyId.SpeechServiceResponse_ProfanityOption,A.QueryParameterNames.Profanity],[e.PropertyId.SpeechServiceResponse_StablePartialResultThreshold,A.QueryParameterNames.StableIntermediateThreshold]]).forEach((C,d)=>{this.setUrlParameter(d,C,c,u,l)});const E=JSON.parse(c.parameters.getProperty(i.ServicePropertiesPropertyName,"{}"));Object.keys(E).forEach(C=>{u[C]=E[C]})}};return Vs.ConversationTranscriberConnectionFactory=r,Vs}var Ws={},Pd;function sO(){if(Pd)return Ws;Pd=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.TranscriberConnectionFactory=void 0;const t=Ct(),e=V(),i=ui(),n=oe(),o=ht,s=ci;let A=class extends i.ConnectionFactoryBase{constructor(){super(...arguments),this.multiaudioRelativeUri="/speech/recognition/multiaudio"}create(a,c,u){let l=a.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Endpoint,void 0);const g=a.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Region,"centralus"),E=i.ConnectionFactoryBase.getHostSuffix(g),C="wss://transcribe."+g+".cts.speech"+E+this.multiaudioRelativeUri,d=a.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Host,C),S={};this.setQueryParams(S,a,l),l||(l=d);const I={};c.token!==void 0&&c.token!==""&&(I[c.headerName]=c.token),I[o.HeaderNames.ConnectionId]=u,a.parameters.setProperty(e.PropertyId.SpeechServiceConnection_Url,l);const p=a.parameters.getProperty("SPEECH-EnableWebsocketCompression","false")==="true";return Promise.resolve(new t.WebsocketConnection(l,S,I,new n.WebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(a),p,u))}setQueryParams(a,c,u){const l=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_EndpointId,void 0),g=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_RecoLanguage,void 0);l&&!(s.QueryParameterNames.CustomSpeechDeploymentId in a)&&(a[s.QueryParameterNames.CustomSpeechDeploymentId]=l),g&&!(s.QueryParameterNames.Language in a)&&(a[s.QueryParameterNames.Language]=g);const E=c.parameters.getProperty(e.PropertyId.SpeechServiceResponse_RequestWordLevelTimestamps,"false").toLowerCase()==="true",C=c.parameters.getProperty(n.OutputFormatPropertyName,e.OutputFormat[e.OutputFormat.Simple])!==e.OutputFormat[e.OutputFormat.Simple];(E||C)&&(a[s.QueryParameterNames.Format]=e.OutputFormat[e.OutputFormat.Detailed].toLowerCase()),this.setCommonUrlParams(c,a,u)}};return Ws.TranscriberConnectionFactory=A,Ws}var Zs={},bd;function AO(){if(bd)return Zs;bd=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.TranslationConnectionFactory=void 0;const t=Ct(),e=Ds,i=V(),n=ui(),o=oe(),s=ht,A=ci,r=Jt;let a=class extends n.ConnectionFactoryBase{constructor(){super(...arguments),this.universalUri="/stt/speech/universal/v2",this.translationV1Uri="/speech/translation/cognitiveservices/v1"}async create(u,l,g){let E=this.getEndpointUrl(u);const C={};if(this.setQueryParams(C,u,E),E){const p=new URL(E),M=p.pathname;(M===""||M==="/")&&(p.pathname=this.universalUri,E=await n.ConnectionFactoryBase.getRedirectUrlFromEndpoint(p.toString()))}const d={};l.token!==void 0&&l.token!==""&&(d[l.headerName]=l.token),d[s.HeaderNames.ConnectionId]=g,u.parameters.setProperty(i.PropertyId.SpeechServiceConnection_Url,E);const S=u.parameters.getProperty("SPEECH-EnableWebsocketCompression","false")==="true";return new t.WebsocketConnection(E,C,d,new o.WebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(u),S,g)}getEndpointUrl(u,l){const g=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Region),E=n.ConnectionFactoryBase.getHostSuffix(g);let C=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Endpoint,void 0);return C?l===!0?C:e.StringUtils.formatString(C,{region:g}):(u.parameters.getProperty("SPEECH-ForceV1Endpoint","false")==="true"?C=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Host,"wss://{region}.s2s.speech"+E)+this.translationV1Uri:C=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Host,"wss://{region}.stt.speech"+E)+this.universalUri,l===!0?C:e.StringUtils.formatString(C,{region:g}))}setQueryParams(u,l,g){u.from=l.parameters.getProperty(i.PropertyId.SpeechServiceConnection_RecoLanguage),u.to=l.parameters.getProperty(i.PropertyId.SpeechServiceConnection_TranslationToLanguages),u.scenario=l.recognitionMode===r.RecognitionMode.Interactive?"interactive":l.recognitionMode===r.RecognitionMode.Conversation?"conversation":"",this.setCommonUrlParams(l,u,g),this.setUrlParameter(i.PropertyId.SpeechServiceResponse_TranslationRequestStablePartialResult,A.QueryParameterNames.StableTranslation,l,u,g);const E=l.parameters.getProperty(i.PropertyId.SpeechServiceConnection_TranslationVoice,void 0);E!==void 0&&(u.voice=E,u.features="requireVoice")}};return Zs.TranslationConnectionFactory=a,Zs}var Xs={},Jd;function aO(){if(Jd)return Xs;Jd=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.EnumTranslation=void 0;const t=V(),e=oe();let i=class{static implTranslateRecognitionResult(o,s=!1){let A=t.ResultReason.Canceled;switch(o){case e.RecognitionStatus.Success:A=t.ResultReason.RecognizedSpeech;break;case e.RecognitionStatus.EndOfDictation:A=s?t.ResultReason.RecognizedSpeech:t.ResultReason.NoMatch;break;case e.RecognitionStatus.NoMatch:case e.RecognitionStatus.InitialSilenceTimeout:case e.RecognitionStatus.BabbleTimeout:A=t.ResultReason.NoMatch;break;case e.RecognitionStatus.Error:case e.RecognitionStatus.BadRequest:case e.RecognitionStatus.Forbidden:default:A=t.ResultReason.Canceled;break}return A}static implTranslateCancelResult(o){let s=t.CancellationReason.EndOfStream;switch(o){case e.RecognitionStatus.Success:case e.RecognitionStatus.EndOfDictation:case e.RecognitionStatus.NoMatch:s=t.CancellationReason.EndOfStream;break;case e.RecognitionStatus.InitialSilenceTimeout:case e.RecognitionStatus.BabbleTimeout:case e.RecognitionStatus.Error:case e.RecognitionStatus.BadRequest:case e.RecognitionStatus.Forbidden:default:s=t.CancellationReason.Error;break}return s}static implTranslateCancelErrorCode(o){let s=t.CancellationErrorCode.NoError;switch(o){case e.RecognitionStatus.Error:s=t.CancellationErrorCode.ServiceError;break;case e.RecognitionStatus.TooManyRequests:s=t.CancellationErrorCode.TooManyRequests;break;case e.RecognitionStatus.BadRequest:s=t.CancellationErrorCode.BadRequestParameters;break;case e.RecognitionStatus.Forbidden:s=t.CancellationErrorCode.Forbidden;break;default:s=t.CancellationErrorCode.NoError;break}return s}static implTranslateErrorDetails(o){let s="The speech service encountered an internal error and could not continue.";switch(o){case t.CancellationErrorCode.Forbidden:s="The recognizer is using a free subscription that ran out of quota.";break;case t.CancellationErrorCode.BadRequestParameters:s="Invalid parameter or unsupported audio format in the request.";break;case t.CancellationErrorCode.TooManyRequests:s="The number of parallel requests exceeded the number of allowed concurrent transcriptions.";break}return s}};return Xs.EnumTranslation=i,Xs}var Hd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.RecognitionStatus=t.SynthesisStatus=void 0,function(e){e[e.Success=0]="Success",e[e.SynthesisEnd=1]="SynthesisEnd",e[e.Error=2]="Error"}(t.SynthesisStatus||(t.SynthesisStatus={})),function(e){e[e.Success=0]="Success",e[e.NoMatch=1]="NoMatch",e[e.InitialSilenceTimeout=2]="InitialSilenceTimeout",e[e.BabbleTimeout=3]="BabbleTimeout",e[e.Error=4]="Error",e[e.EndOfDictation=5]="EndOfDictation",e[e.TooManyRequests=6]="TooManyRequests",e[e.BadRequest=7]="BadRequest",e[e.Forbidden=8]="Forbidden"}(t.RecognitionStatus||(t.RecognitionStatus={}))})(Hd);var _s={},qd;function cO(){if(qd)return _s;qd=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.TranslationSynthesisEnd=void 0;const t=oe();let e=class lM{constructor(n){this.privSynthesisEnd=JSON.parse(n),this.privSynthesisEnd.SynthesisStatus&&(this.privSynthesisEnd.SynthesisStatus=t.SynthesisStatus[this.privSynthesisEnd.SynthesisStatus]),this.privSynthesisEnd.Status&&(this.privSynthesisEnd.SynthesisStatus=t.SynthesisStatus[this.privSynthesisEnd.Status])}static fromJSON(n){return new lM(n)}get SynthesisStatus(){return this.privSynthesisEnd.SynthesisStatus}get FailureReason(){return this.privSynthesisEnd.FailureReason}};return _s.TranslationSynthesisEnd=e,_s}var mc={};Object.defineProperty(mc,"__esModule",{value:!0}),mc.TranslationHypothesis=void 0;const uO=Ie,Vd=Ja;class Qc{constructor(e,i){this.privTranslationHypothesis=e,this.privTranslationHypothesis.Offset+=i,this.privTranslationHypothesis.Translation.TranslationStatus=this.mapTranslationStatus(this.privTranslationHypothesis.Translation.TranslationStatus)}static fromJSON(e,i){return new Qc(JSON.parse(e),i)}static fromTranslationResponse(e,i){uO.Contracts.throwIfNullOrUndefined(e,"translationHypothesis");const n=e.SpeechHypothesis;return e.SpeechHypothesis=void 0,n.Translation=e,new Qc(n,i)}get Duration(){return this.privTranslationHypothesis.Duration}get Offset(){return this.privTranslationHypothesis.Offset}get Text(){return this.privTranslationHypothesis.Text}get Translation(){return this.privTranslationHypothesis.Translation}get Language(){var e;return(e=this.privTranslationHypothesis.PrimaryLanguage)==null?void 0:e.Language}asJson(){const e={...this.privTranslationHypothesis};return e.Translation!==void 0?JSON.stringify({...e,TranslationStatus:Vd.TranslationStatus[e.Translation.TranslationStatus]}):JSON.stringify(e)}mapTranslationStatus(e){if(typeof e=="string")return Vd.TranslationStatus[e];if(typeof e=="number")return e}}mc.TranslationHypothesis=Qc;var $s={},Wd;function lO(){if(Wd)return $s;Wd=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.TranslationPhrase=void 0;const t=Ie,e=oe(),i=Ja;let n=class Lg{constructor(s,A){this.privTranslationPhrase=s,this.privTranslationPhrase.Offset+=A,this.privTranslationPhrase.RecognitionStatus=this.mapRecognitionStatus(this.privTranslationPhrase.RecognitionStatus),this.privTranslationPhrase.Translation!==void 0&&(this.privTranslationPhrase.Translation.TranslationStatus=this.mapTranslationStatus(this.privTranslationPhrase.Translation.TranslationStatus))}static fromJSON(s,A){return new Lg(JSON.parse(s),A)}static fromTranslationResponse(s,A){t.Contracts.throwIfNullOrUndefined(s,"translationResponse");const r=s.SpeechPhrase;return s.SpeechPhrase=void 0,r.Translation=s,r.Text=r.DisplayText,new Lg(r,A)}get RecognitionStatus(){return this.privTranslationPhrase.RecognitionStatus}get Offset(){return this.privTranslationPhrase.Offset}get Duration(){return this.privTranslationPhrase.Duration}get Text(){return this.privTranslationPhrase.Text}get Language(){var s;return(s=this.privTranslationPhrase.PrimaryLanguage)==null?void 0:s.Language}get Confidence(){var s;return(s=this.privTranslationPhrase.PrimaryLanguage)==null?void 0:s.Confidence}get Translation(){return this.privTranslationPhrase.Translation}asJson(){const s={...this.privTranslationPhrase},A={...s,RecognitionStatus:e.RecognitionStatus[s.RecognitionStatus]};return s.Translation&&(A.Translation={...s.Translation,TranslationStatus:i.TranslationStatus[s.Translation.TranslationStatus]}),JSON.stringify(A)}mapRecognitionStatus(s){if(typeof s=="string")return e.RecognitionStatus[s];if(typeof s=="number")return s}mapTranslationStatus(s){if(typeof s=="string")return i.TranslationStatus[s];if(typeof s=="number")return s}};return $s.TranslationPhrase=n,$s}var eA={},Zd;function gO(){if(Zd)return eA;Zd=1,Object.defineProperty(eA,"__esModule",{value:!0}),eA.TranslationServiceRecognizer=void 0;const t=ge(),e=V(),i=oe();let n=class extends i.ConversationServiceRecognizer{constructor(s,A,r,a,c){super(s,A,r,a,c),this.privTranslationRecognizer=c,this.connectionEvents.attach(u=>{u.name==="ConnectionEstablishedEvent"&&this.privTranslationRecognizer.onConnection()})}async processTypeSpecificMessages(s){const A=new e.PropertyCollection;let r=await this.processSpeechMessages(s);if(r)return!0;const a=async u=>{if(A.setProperty(e.PropertyId.SpeechServiceResponse_JsonResult,u.asJson()),this.privRequestSession.onPhraseRecognized(u.Offset+u.Duration),u.RecognitionStatus===i.RecognitionStatus.Success){const l=this.fireEventForResult(u,A);if(this.privTranslationRecognizer.recognized)try{this.privTranslationRecognizer.recognized(this.privTranslationRecognizer,l)}catch{}if(this.privSuccessCallback){try{this.privSuccessCallback(l.result)}catch(g){this.privErrorCallback&&this.privErrorCallback(g)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}}else{const l=i.EnumTranslation.implTranslateRecognitionResult(u.RecognitionStatus),g=new e.TranslationRecognitionResult(void 0,this.privRequestSession.requestId,l,u.Text,u.Duration,u.Offset,u.Language,u.Confidence,void 0,u.asJson(),A);if(l===e.ResultReason.Canceled){const E=i.EnumTranslation.implTranslateCancelResult(u.RecognitionStatus),C=i.EnumTranslation.implTranslateCancelErrorCode(u.RecognitionStatus);await this.cancelRecognitionLocal(E,C,i.EnumTranslation.implTranslateErrorDetails(C))}else if(u.RecognitionStatus!==i.RecognitionStatus.EndOfDictation){const E=new e.TranslationRecognitionEventArgs(g,g.offset,this.privRequestSession.sessionId);if(this.privTranslationRecognizer.recognized)try{this.privTranslationRecognizer.recognized(this.privTranslationRecognizer,E)}catch{}if(this.privSuccessCallback){try{this.privSuccessCallback(g)}catch(C){this.privErrorCallback&&this.privErrorCallback(C)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}}r=!0}},c=u=>{A.setProperty(e.PropertyId.SpeechServiceResponse_JsonResult,u.asJson());const l=this.fireEventForResult(u,A);if(this.privRequestSession.onHypothesis(l.offset),this.privTranslationRecognizer.recognizing)try{this.privTranslationRecognizer.recognizing(this.privTranslationRecognizer,l)}catch{}r=!0};switch(s.messageType===t.MessageType.Text&&A.setProperty(e.PropertyId.SpeechServiceResponse_JsonResult,s.textBody),s.path.toLowerCase()){case"translation.hypothesis":c(i.TranslationHypothesis.fromJSON(s.textBody,this.privRequestSession.currentTurnAudioOffset));break;case"translation.response":const u=JSON.parse(s.textBody);if(u.SpeechPhrase)await a(i.TranslationPhrase.fromTranslationResponse(u,this.privRequestSession.currentTurnAudioOffset));else{const g=JSON.parse(s.textBody);g.SpeechHypothesis&&c(i.TranslationHypothesis.fromTranslationResponse(g,this.privRequestSession.currentTurnAudioOffset))}break;case"translation.phrase":await a(i.TranslationPhrase.fromJSON(s.textBody,this.privRequestSession.currentTurnAudioOffset));break;case"translation.synthesis":case"audio":this.sendSynthesisAudio(s.binaryBody,this.privRequestSession.sessionId),r=!0;break;case"audio.end":case"translation.synthesis.end":const l=i.TranslationSynthesisEnd.fromJSON(s.textBody);switch(l.SynthesisStatus){case i.SynthesisStatus.Error:if(this.privTranslationRecognizer.synthesizing){const g=new e.TranslationSynthesisResult(e.ResultReason.Canceled,void 0),E=new e.TranslationSynthesisEventArgs(g,this.privRequestSession.sessionId);try{this.privTranslationRecognizer.synthesizing(this.privTranslationRecognizer,E)}catch{}}if(this.privTranslationRecognizer.canceled){const g=new e.TranslationRecognitionCanceledEventArgs(this.privRequestSession.sessionId,e.CancellationReason.Error,l.FailureReason,e.CancellationErrorCode.ServiceError,null);try{this.privTranslationRecognizer.canceled(this.privTranslationRecognizer,g)}catch{}}break;case i.SynthesisStatus.Success:this.sendSynthesisAudio(void 0,this.privRequestSession.sessionId);break}r=!0;break}return r}cancelRecognition(s,A,r,a,c){const u=new e.PropertyCollection;if(u.setProperty(i.CancellationErrorCodePropertyName,e.CancellationErrorCode[a]),this.privTranslationRecognizer.canceled){const l=new e.TranslationRecognitionCanceledEventArgs(s,r,c,a,void 0);try{this.privTranslationRecognizer.canceled(this.privTranslationRecognizer,l)}catch{}}if(this.privSuccessCallback){const l=new e.TranslationRecognitionResult(void 0,A,e.ResultReason.Canceled,void 0,void 0,void 0,void 0,void 0,c,void 0,u);try{this.privSuccessCallback(l),this.privSuccessCallback=void 0}catch{}}}handleRecognizingCallback(s,A,r){try{const a=new e.TranslationRecognitionEventArgs(e.TranslationRecognitionResult.fromSpeechRecognitionResult(s),A,r);this.privTranslationRecognizer.recognizing(this.privTranslationRecognizer,a)}catch{}}handleRecognizedCallback(s,A,r){try{const a=new e.TranslationRecognitionEventArgs(e.TranslationRecognitionResult.fromSpeechRecognitionResult(s),A,r);this.privTranslationRecognizer.recognized(this.privTranslationRecognizer,a)}catch{}}fireEventForResult(s,A){let r;if(s.Translation.Translations!==void 0){r=new e.Translations;for(const E of s.Translation.Translations)r.set(E.Language,E.Text||E.DisplayText)}let a,c;s instanceof i.TranslationPhrase?(s.Translation&&s.Translation.TranslationStatus===t.TranslationStatus.Success?a=e.ResultReason.TranslatedSpeech:a=e.ResultReason.RecognizedSpeech,c=s.Confidence):a=e.ResultReason.TranslatingSpeech;const u=s.Language,l=new e.TranslationRecognitionResult(r,this.privRequestSession.requestId,a,s.Text,s.Duration,s.Offset,u,c,s.Translation.FailureReason,s.asJson(),A);return new e.TranslationRecognitionEventArgs(l,s.Offset,this.privRequestSession.sessionId)}sendSynthesisAudio(s,A){const r=s===void 0?e.ResultReason.SynthesizingAudioCompleted:e.ResultReason.SynthesizingAudio,a=new e.TranslationSynthesisResult(r,s),c=new e.TranslationSynthesisEventArgs(a,A);if(this.privTranslationRecognizer.synthesizing)try{this.privTranslationRecognizer.synthesizing(this.privTranslationRecognizer,c)}catch{}}};return eA.TranslationServiceRecognizer=n,eA}var Rc={};Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.SpeechDetected=void 0;class Wl{constructor(e,i){this.privSpeechStartDetected=JSON.parse(e),this.privSpeechStartDetected.Offset+=i}static fromJSON(e,i){return new Wl(e,i)}get Offset(){return this.privSpeechStartDetected.Offset}}Rc.SpeechDetected=Wl;var Dc={};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.SpeechHypothesis=void 0;class Zl{constructor(e,i){this.privSpeechHypothesis=JSON.parse(e),this.updateOffset(i)}static fromJSON(e,i){return new Zl(e,i)}updateOffset(e){this.privSpeechHypothesis.Offset+=e}asJson(){return JSON.stringify(this.privSpeechHypothesis)}get Text(){return this.privSpeechHypothesis.Text}get Offset(){return this.privSpeechHypothesis.Offset}get Duration(){return this.privSpeechHypothesis.Duration}get Language(){return this.privSpeechHypothesis.PrimaryLanguage===void 0?void 0:this.privSpeechHypothesis.PrimaryLanguage.Language}get LanguageDetectionConfidence(){return this.privSpeechHypothesis.PrimaryLanguage===void 0?void 0:this.privSpeechHypothesis.PrimaryLanguage.Confidence}get SpeakerId(){return this.privSpeechHypothesis.SpeakerId}}Dc.SpeechHypothesis=Zl;var yc={};Object.defineProperty(yc,"__esModule",{value:!0}),yc.SpeechKeyword=void 0;class Xl{constructor(e,i){this.privSpeechKeyword=JSON.parse(e),this.privSpeechKeyword.Offset+=i}static fromJSON(e,i){return new Xl(e,i)}get Status(){return this.privSpeechKeyword.Status}get Text(){return this.privSpeechKeyword.Text}get Offset(){return this.privSpeechKeyword.Offset}get Duration(){return this.privSpeechKeyword.Duration}asJson(){return JSON.stringify(this.privSpeechKeyword)}}yc.SpeechKeyword=Xl;var tA={},Xd;function EO(){if(Xd)return tA;Xd=1,Object.defineProperty(tA,"__esModule",{value:!0}),tA.SpeechServiceRecognizer=void 0;const t=V(),e=oe();let i=class extends e.ServiceRecognizerBase{constructor(o,s,A,r,a){super(o,s,A,r,a),this.privSpeechRecognizer=a}async processTypeSpecificMessages(o){let s;const A=new t.PropertyCollection;let r=!1;switch(o.path.toLowerCase()){case"speech.hypothesis":case"speech.fragment":const a=e.SpeechHypothesis.fromJSON(o.textBody,this.privRequestSession.currentTurnAudioOffset);A.setProperty(t.PropertyId.SpeechServiceResponse_JsonResult,a.asJson()),s=new t.SpeechRecognitionResult(this.privRequestSession.requestId,t.ResultReason.RecognizingSpeech,a.Text,a.Duration,a.Offset,a.Language,a.LanguageDetectionConfidence,void 0,void 0,a.asJson(),A),this.privRequestSession.onHypothesis(a.Offset);const c=new t.SpeechRecognitionEventArgs(s,a.Offset,this.privRequestSession.sessionId);if(this.privSpeechRecognizer.recognizing)try{this.privSpeechRecognizer.recognizing(this.privSpeechRecognizer,c)}catch{}r=!0;break;case"speech.phrase":const u=e.SimpleSpeechPhrase.fromJSON(o.textBody,this.privRequestSession.currentTurnAudioOffset);A.setProperty(t.PropertyId.SpeechServiceResponse_JsonResult,u.asJson());const l=e.EnumTranslation.implTranslateRecognitionResult(u.RecognitionStatus,this.privExpectContentAssessmentResponse);if(this.privRequestSession.onPhraseRecognized(u.Offset+u.Duration),t.ResultReason.Canceled===l){const g=e.EnumTranslation.implTranslateCancelResult(u.RecognitionStatus),E=e.EnumTranslation.implTranslateCancelErrorCode(u.RecognitionStatus);await this.cancelRecognitionLocal(g,E,e.EnumTranslation.implTranslateErrorDetails(E))}else{if(u.RecognitionStatus===e.RecognitionStatus.EndOfDictation)break;if(this.privRecognizerConfig.parameters.getProperty(e.OutputFormatPropertyName)===t.OutputFormat[t.OutputFormat.Simple])s=new t.SpeechRecognitionResult(this.privRequestSession.requestId,l,u.DisplayText,u.Duration,u.Offset,u.Language,u.LanguageDetectionConfidence,void 0,void 0,u.asJson(),A);else{const E=e.DetailedSpeechPhrase.fromJSON(o.textBody,this.privRequestSession.currentTurnAudioOffset);A.setProperty(t.PropertyId.SpeechServiceResponse_JsonResult,E.asJson()),s=new t.SpeechRecognitionResult(this.privRequestSession.requestId,l,E.RecognitionStatus===e.RecognitionStatus.Success?E.NBest[0].Display:"",E.Duration,E.Offset,E.Language,E.LanguageDetectionConfidence,void 0,void 0,E.asJson(),A)}const g=new t.SpeechRecognitionEventArgs(s,s.offset,this.privRequestSession.sessionId);if(this.privSpeechRecognizer.recognized)try{this.privSpeechRecognizer.recognized(this.privSpeechRecognizer,g)}catch{}if(this.privSuccessCallback){try{this.privSuccessCallback(s)}catch(E){this.privErrorCallback&&this.privErrorCallback(E)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}}r=!0;break}return r}cancelRecognition(o,s,A,r,a){const c=new t.PropertyCollection;if(c.setProperty(e.CancellationErrorCodePropertyName,t.CancellationErrorCode[r]),this.privSpeechRecognizer.canceled){const u=new t.SpeechRecognitionCanceledEventArgs(A,a,r,void 0,o);try{this.privSpeechRecognizer.canceled(this.privSpeechRecognizer,u)}catch{}}if(this.privSuccessCallback){const u=new t.SpeechRecognitionResult(s,t.ResultReason.Canceled,void 0,void 0,void 0,void 0,void 0,void 0,a,void 0,c);try{this.privSuccessCallback(u),this.privSuccessCallback=void 0}catch{}}}};return tA.SpeechServiceRecognizer=i,tA}var iA={},_d={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityProvider=t.SpeakerDiarizationMode=void 0,function(e){e.None="None",e.Identity="Identity",e.Anonymous="Anonymous"}(t.SpeakerDiarizationMode||(t.SpeakerDiarizationMode={})),function(e){e.CallCenter="CallCenter"}(t.IdentityProvider||(t.IdentityProvider={}))})(_d);var $d;function hO(){if($d)return iA;$d=1,Object.defineProperty(iA,"__esModule",{value:!0}),iA.ConversationTranscriptionServiceRecognizer=void 0;const t=V(),e=oe(),i=_d,n=Jt;let o=class extends e.ServiceRecognizerBase{constructor(A,r,a,c,u){super(A,r,a,c,u),this.privConversationTranscriber=u,this.setSpeakerDiarizationJson()}setSpeakerDiarizationJson(){if(this.privEnableSpeakerId){const A=this.privSpeechContext.getContext().phraseDetection||{};A.mode=n.RecognitionMode.Conversation;const r={};r.mode=i.SpeakerDiarizationMode.Anonymous,r.audioSessionId=this.privDiarizationSessionId,r.audioOffsetMs=0,r.diarizeIntermediates=this.privRecognizerConfig.parameters.getProperty(t.PropertyId.SpeechServiceResponse_DiarizeIntermediateResults,"false")==="true",A.speakerDiarization=r,this.privSpeechContext.getContext().phraseDetection=A}}async processTypeSpecificMessages(A){let r;const a=new t.PropertyCollection;a.setProperty(t.PropertyId.SpeechServiceResponse_JsonResult,A.textBody);let c=!1;switch(A.path.toLowerCase()){case"speech.hypothesis":case"speech.fragment":const u=e.SpeechHypothesis.fromJSON(A.textBody,this.privRequestSession.currentTurnAudioOffset);r=new t.ConversationTranscriptionResult(this.privRequestSession.requestId,t.ResultReason.RecognizingSpeech,u.Text,u.Duration,u.Offset,u.Language,u.LanguageDetectionConfidence,u.SpeakerId,void 0,u.asJson(),a),this.privRequestSession.onHypothesis(u.Offset);const l=new t.ConversationTranscriptionEventArgs(r,u.Duration,this.privRequestSession.sessionId);if(this.privConversationTranscriber.transcribing)try{this.privConversationTranscriber.transcribing(this.privConversationTranscriber,l)}catch{}c=!0;break;case"speech.phrase":const g=e.SimpleSpeechPhrase.fromJSON(A.textBody,this.privRequestSession.currentTurnAudioOffset),E=e.EnumTranslation.implTranslateRecognitionResult(g.RecognitionStatus);if(this.privRequestSession.onPhraseRecognized(g.Offset+g.Duration),t.ResultReason.Canceled===E){const C=e.EnumTranslation.implTranslateCancelResult(g.RecognitionStatus),d=e.EnumTranslation.implTranslateCancelErrorCode(g.RecognitionStatus);await this.cancelRecognitionLocal(C,d,e.EnumTranslation.implTranslateErrorDetails(d))}else if(!(this.privRequestSession.isSpeechEnded&&E===t.ResultReason.NoMatch&&g.RecognitionStatus!==e.RecognitionStatus.InitialSilenceTimeout)){if(this.privRecognizerConfig.parameters.getProperty(e.OutputFormatPropertyName)===t.OutputFormat[t.OutputFormat.Simple])r=new t.ConversationTranscriptionResult(this.privRequestSession.requestId,E,g.DisplayText,g.Duration,g.Offset,g.Language,g.LanguageDetectionConfidence,g.SpeakerId,void 0,g.asJson(),a);else{const d=e.DetailedSpeechPhrase.fromJSON(A.textBody,this.privRequestSession.currentTurnAudioOffset);r=new t.ConversationTranscriptionResult(this.privRequestSession.requestId,E,d.RecognitionStatus===e.RecognitionStatus.Success?d.NBest[0].Display:void 0,d.Duration,d.Offset,d.Language,d.LanguageDetectionConfidence,g.SpeakerId,void 0,d.asJson(),a)}const C=new t.ConversationTranscriptionEventArgs(r,r.offset,this.privRequestSession.sessionId);if(this.privConversationTranscriber.transcribed)try{this.privConversationTranscriber.transcribed(this.privConversationTranscriber,C)}catch{}}c=!0;break}return c}cancelRecognition(A,r,a,c,u){if(new t.PropertyCollection().setProperty(e.CancellationErrorCodePropertyName,t.CancellationErrorCode[c]),this.privConversationTranscriber.canceled){const g=new t.ConversationTranscriptionCanceledEventArgs(a,u,c,void 0,A);try{this.privConversationTranscriber.canceled(this.privConversationTranscriber,g)}catch{}}}};return iA.ConversationTranscriptionServiceRecognizer=o,iA}var nA={},eS;function CO(){if(eS)return nA;eS=1,Object.defineProperty(nA,"__esModule",{value:!0}),nA.TranscriptionServiceRecognizer=void 0;const t=ge(),e=V(),i=oe(),n=Ki;let o=class extends i.ConversationServiceRecognizer{constructor(A,r,a,c,u){super(A,r,a,c,u),this.privTranscriberRecognizer=u,this.sendPrePayloadJSONOverride=l=>this.sendTranscriptionStartJSON(l),this.privRecognizerConfig.parameters.getProperty(e.PropertyId.SpeechServiceResponse_RequestWordLevelTimestamps)==="true"&&this.privSpeechContext.setWordLevelTimings()}async sendSpeechEventAsync(A,r){if(this.privRequestSession.isRecognizing){const a=await this.fetchConnection();await this.sendSpeechEvent(a,this.createSpeechEventPayload(A,r))}}async sendMeetingSpeechEventAsync(A,r){if(this.privRequestSession.isRecognizing){const a=await this.fetchConnection();await this.sendSpeechEvent(a,this.createMeetingSpeechEventPayload(A,r))}}processTypeSpecificMessages(A){return this.processSpeechMessages(A)}handleRecognizedCallback(A,r,a){try{const c=new e.SpeechRecognitionEventArgs(A,r,a);if(this.privTranscriberRecognizer.recognized(this.privTranscriberRecognizer,c),this.privSuccessCallback){try{this.privSuccessCallback(A)}catch(u){this.privErrorCallback&&this.privErrorCallback(u)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}}catch{}}handleRecognizingCallback(A,r,a){try{const c=new e.SpeechRecognitionEventArgs(A,r,a);this.privTranscriberRecognizer.recognizing(this.privTranscriberRecognizer,c)}catch{}}cancelRecognition(A,r,a,c,u){const l=new e.PropertyCollection;if(l.setProperty(i.CancellationErrorCodePropertyName,e.CancellationErrorCode[c]),this.privTranscriberRecognizer.IsMeetingRecognizer()){if(this.privTranscriberRecognizer.canceled){const g=new e.MeetingTranscriptionCanceledEventArgs(a,u,c,void 0,A);try{this.privTranscriberRecognizer.canceled(this.privTranscriberRecognizer,g)}catch{}}}else if(this.privTranscriberRecognizer.canceled){const g=new e.ConversationTranscriptionCanceledEventArgs(a,u,c,void 0,A);try{this.privTranscriberRecognizer.canceled(this.privTranscriberRecognizer,g)}catch{}}if(this.privSuccessCallback){const g=new e.SpeechRecognitionResult(r,e.ResultReason.Canceled,void 0,void 0,void 0,void 0,void 0,void 0,u,void 0,l);try{this.privSuccessCallback(g),this.privSuccessCallback=void 0}catch{}}}async sendTranscriptionStartJSON(A){if(await this.sendSpeechContext(A,!0),this.privTranscriberRecognizer.IsMeetingRecognizer()){const r=this.privTranscriberRecognizer.getMeetingInfo(),a=this.createMeetingSpeechEventPayload(r,"start");await this.sendSpeechEvent(A,a)}else{const r=this.privTranscriberRecognizer.getConversationInfo(),a=this.createSpeechEventPayload(r,"start");await this.sendSpeechEvent(A,a)}await this.sendWaveHeader(A)}sendSpeechEvent(A,r){const a=JSON.stringify(r);if(a)return A.send(new n.SpeechConnectionMessage(t.MessageType.Text,"speech.event",this.privRequestSession.requestId,"application/json",a))}createSpeechEventPayload(A,r){const a={id:"meeting",name:r,meeting:A.conversationProperties};return a.meeting.id=A.id,a.meeting.attendees=A.participants,a}createMeetingSpeechEventPayload(A,r){const a={id:"meeting",name:r,meeting:A.meetingProperties};return a.meeting.id=A.id,a.meeting.attendees=A.participants,a}};return nA.TranscriptionServiceRecognizer=o,nA}var rA={},tS;function IO(){if(tS)return rA;tS=1,Object.defineProperty(rA,"__esModule",{value:!0}),rA.DetailedSpeechPhrase=void 0;const t=oe();let e=class gM{constructor(n,o){this.privDetailedSpeechPhrase=JSON.parse(n),this.privDetailedSpeechPhrase.RecognitionStatus=this.mapRecognitionStatus(this.privDetailedSpeechPhrase.RecognitionStatus),this.updateOffsets(o)}static fromJSON(n,o){return new gM(n,o)}updateOffsets(n){if(this.privDetailedSpeechPhrase.Offset+=n,this.privDetailedSpeechPhrase.NBest)for(const o of this.privDetailedSpeechPhrase.NBest){if(o.Words)for(const s of o.Words)s.Offset+=n;if(o.DisplayWords)for(const s of o.DisplayWords)s.Offset+=n}}asJson(){const n={...this.privDetailedSpeechPhrase};return JSON.stringify({...n,RecognitionStatus:t.RecognitionStatus[n.RecognitionStatus]})}get RecognitionStatus(){return this.privDetailedSpeechPhrase.RecognitionStatus}get NBest(){return this.privDetailedSpeechPhrase.NBest}get Duration(){return this.privDetailedSpeechPhrase.Duration}get Offset(){return this.privDetailedSpeechPhrase.Offset}get Language(){return this.privDetailedSpeechPhrase.PrimaryLanguage===void 0?void 0:this.privDetailedSpeechPhrase.PrimaryLanguage.Language}get LanguageDetectionConfidence(){return this.privDetailedSpeechPhrase.PrimaryLanguage===void 0?void 0:this.privDetailedSpeechPhrase.PrimaryLanguage.Confidence}get Text(){return this.privDetailedSpeechPhrase.NBest&&this.privDetailedSpeechPhrase.NBest[0]?this.privDetailedSpeechPhrase.NBest[0].Display||this.privDetailedSpeechPhrase.NBest[0].DisplayText:this.privDetailedSpeechPhrase.DisplayText}get SpeakerId(){return this.privDetailedSpeechPhrase.SpeakerId}mapRecognitionStatus(n){if(typeof n=="string")return t.RecognitionStatus[n];if(typeof n=="number")return n}};return rA.DetailedSpeechPhrase=e,rA}var oA={},iS;function pO(){if(iS)return oA;iS=1,Object.defineProperty(oA,"__esModule",{value:!0}),oA.SimpleSpeechPhrase=void 0;const t=oe();let e=class EM{constructor(n,o=0){this.privSimpleSpeechPhrase=JSON.parse(n),this.privSimpleSpeechPhrase.RecognitionStatus=this.mapRecognitionStatus(this.privSimpleSpeechPhrase.RecognitionStatus),this.updateOffset(o)}static fromJSON(n,o){return new EM(n,o)}updateOffset(n){this.privSimpleSpeechPhrase.Offset+=n}asJson(){const n={...this.privSimpleSpeechPhrase};return JSON.stringify({...n,RecognitionStatus:t.RecognitionStatus[n.RecognitionStatus]})}get RecognitionStatus(){return this.privSimpleSpeechPhrase.RecognitionStatus}get DisplayText(){return this.privSimpleSpeechPhrase.DisplayText}get Offset(){return this.privSimpleSpeechPhrase.Offset}get Duration(){return this.privSimpleSpeechPhrase.Duration}get Language(){return this.privSimpleSpeechPhrase.PrimaryLanguage===void 0?void 0:this.privSimpleSpeechPhrase.PrimaryLanguage.Language}get LanguageDetectionConfidence(){return this.privSimpleSpeechPhrase.PrimaryLanguage===void 0?void 0:this.privSimpleSpeechPhrase.PrimaryLanguage.Confidence}get SpeakerId(){return this.privSimpleSpeechPhrase.SpeakerId}mapRecognitionStatus(n){if(typeof n=="string")return t.RecognitionStatus[n];if(typeof n=="number")return n}};return oA.SimpleSpeechPhrase=e,oA}var Tc={};Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.AddedLmIntent=void 0;class dO{constructor(e,i){this.modelImpl=e,this.intentName=i}}Tc.AddedLmIntent=dO;var sA={},nS;function SO(){if(nS)return sA;nS=1,Object.defineProperty(sA,"__esModule",{value:!0}),sA.IntentServiceRecognizer=void 0;const t=ge(),e=V(),i=oe();let n=class extends i.ServiceRecognizerBase{constructor(s,A,r,a,c){super(s,A,r,a,c),this.privIntentRecognizer=c,this.privIntentDataSent=!1,a.recognitionEndpointVersion="1"}setIntents(s,A){this.privAddedLmIntents=s,this.privUmbrellaIntent=A,this.privIntentDataSent=!0}processTypeSpecificMessages(s){let A,r,a=!1;const c=new e.PropertyCollection;switch(s.messageType===t.MessageType.Text&&c.setProperty(e.PropertyId.SpeechServiceResponse_JsonResult,s.textBody),s.path.toLowerCase()){case"speech.hypothesis":const l=i.SpeechHypothesis.fromJSON(s.textBody,this.privRequestSession.currentTurnAudioOffset);if(A=new e.IntentRecognitionResult(void 0,this.privRequestSession.requestId,e.ResultReason.RecognizingIntent,l.Text,l.Duration,l.Offset,l.Language,l.LanguageDetectionConfidence,void 0,l.asJson(),c),this.privRequestSession.onHypothesis(A.offset),r=new e.IntentRecognitionEventArgs(A,l.Offset,this.privRequestSession.sessionId),this.privIntentRecognizer.recognizing)try{this.privIntentRecognizer.recognizing(this.privIntentRecognizer,r)}catch{}a=!0;break;case"speech.phrase":const g=i.SimpleSpeechPhrase.fromJSON(s.textBody,this.privRequestSession.currentTurnAudioOffset);A=new e.IntentRecognitionResult(void 0,this.privRequestSession.requestId,i.EnumTranslation.implTranslateRecognitionResult(g.RecognitionStatus),g.DisplayText,g.Duration,g.Offset,g.Language,g.LanguageDetectionConfidence,void 0,g.asJson(),c),r=new e.IntentRecognitionEventArgs(A,A.offset,this.privRequestSession.sessionId);const E=()=>{if(this.privIntentRecognizer.recognized)try{this.privIntentRecognizer.recognized(this.privIntentRecognizer,r)}catch{}if(this.privSuccessCallback){try{this.privSuccessCallback(A)}catch(d){this.privErrorCallback&&this.privErrorCallback(d)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}};this.privIntentDataSent===!1||e.ResultReason.NoMatch===r.result.reason?(this.privRequestSession.onPhraseRecognized(r.offset+r.result.duration),E()):this.privPendingIntentArgs=r,a=!0;break;case"response":if(r=this.privPendingIntentArgs,this.privPendingIntentArgs=void 0,r===void 0){if(s.textBody==="")return;r=new e.IntentRecognitionEventArgs(new e.IntentRecognitionResult,0,this.privRequestSession.sessionId)}const C=i.IntentResponse.fromJSON(s.textBody);if(C!==null&&C.topScoringIntent&&C.topScoringIntent.intent){let d=this.privAddedLmIntents[C.topScoringIntent.intent];if(this.privUmbrellaIntent!==void 0&&(d=this.privUmbrellaIntent),d){const S=d===void 0||d.intentName===void 0?C.topScoringIntent.intent:d.intentName;let I=r.result.reason;S!==void 0&&(I=e.ResultReason.RecognizedIntent);const p=r.result.properties!==void 0?r.result.properties:new e.PropertyCollection;p.setProperty(e.PropertyId.LanguageUnderstandingServiceResponse_JsonResult,s.textBody),r=new e.IntentRecognitionEventArgs(new e.IntentRecognitionResult(S,r.result.resultId,I,r.result.text,r.result.duration,r.result.offset,void 0,void 0,r.result.errorDetails,r.result.json,p),r.offset,r.sessionId)}}if(this.privRequestSession.onPhraseRecognized(r.offset+r.result.duration),this.privIntentRecognizer.recognized)try{this.privIntentRecognizer.recognized(this.privIntentRecognizer,r)}catch{}if(this.privSuccessCallback){try{this.privSuccessCallback(r.result)}catch(d){this.privErrorCallback&&this.privErrorCallback(d)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}a=!0;break}const u=new t.Deferred;return u.resolve(a),u.promise}cancelRecognition(s,A,r,a,c){const u=new e.PropertyCollection;if(u.setProperty(i.CancellationErrorCodePropertyName,e.CancellationErrorCode[a]),this.privIntentRecognizer.canceled){const l=new e.IntentRecognitionCanceledEventArgs(r,c,a,void 0,void 0,s);try{this.privIntentRecognizer.canceled(this.privIntentRecognizer,l)}catch{}}if(this.privSuccessCallback){const l=new e.IntentRecognitionResult(void 0,A,e.ResultReason.Canceled,void 0,void 0,void 0,void 0,void 0,c,void 0,u);try{this.privSuccessCallback(l),this.privSuccessCallback=void 0}catch{}}}};return sA.IntentServiceRecognizer=n,sA}var Lc={};Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.IntentResponse=void 0;class _l{constructor(e){e===""?this.privIntentResponse={}:this.privIntentResponse=JSON.parse(e)}static fromJSON(e){return new _l(e)}get query(){return this.privIntentResponse.query}get topScoringIntent(){return this.privIntentResponse.topScoringIntent}get entities(){return this.privIntentResponse.entities}}Lc.IntentResponse=_l;var rS={};Object.defineProperty(rS,"__esModule",{value:!0});var Oc={},Uc={};Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.ServiceTelemetryListener=void 0;const Gi=ge(),oS=fc;class MO{constructor(e,i,n){this.privIsDisposed=!1,this.privListeningTriggerMetric=null,this.privMicMetric=null,this.privConnectionEstablishMetric=null,this.privRequestId=e,this.privAudioSourceId=i,this.privAudioNodeId=n,this.privReceivedMessages={},this.privPhraseLatencies=[],this.privHypothesisLatencies=[]}phraseReceived(e){e>0&&this.privPhraseLatencies.push(Date.now()-e)}hypothesisReceived(e){e>0&&this.privHypothesisLatencies.push(Date.now()-e)}onEvent(e){if(!this.privIsDisposed&&(e instanceof oS.RecognitionTriggeredEvent&&e.requestId===this.privRequestId&&(this.privListeningTriggerMetric={End:e.eventTime,Name:"ListeningTrigger",Start:e.eventTime}),e instanceof Gi.AudioStreamNodeAttachingEvent&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicStartTime=e.eventTime),e instanceof Gi.AudioStreamNodeAttachedEvent&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicStartTime=e.eventTime),e instanceof Gi.AudioSourceErrorEvent&&e.audioSourceId===this.privAudioSourceId&&(this.privMicMetric||(this.privMicMetric={End:e.eventTime,Error:e.error,Name:"Microphone",Start:this.privMicStartTime})),e instanceof Gi.AudioStreamNodeErrorEvent&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicMetric||(this.privMicMetric={End:e.eventTime,Error:e.error,Name:"Microphone",Start:this.privMicStartTime})),e instanceof Gi.AudioStreamNodeDetachedEvent&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicMetric||(this.privMicMetric={End:e.eventTime,Name:"Microphone",Start:this.privMicStartTime})),e instanceof oS.ConnectingToServiceEvent&&e.requestId===this.privRequestId&&(this.privConnectionId=e.sessionId),e instanceof Gi.ConnectionStartEvent&&e.connectionId===this.privConnectionId&&(this.privConnectionStartTime=e.eventTime),e instanceof Gi.ConnectionEstablishedEvent&&e.connectionId===this.privConnectionId&&(this.privConnectionEstablishMetric||(this.privConnectionEstablishMetric={End:e.eventTime,Id:this.privConnectionId,Name:"Connection",Start:this.privConnectionStartTime})),e instanceof Gi.ConnectionEstablishErrorEvent&&e.connectionId===this.privConnectionId&&(this.privConnectionEstablishMetric||(this.privConnectionEstablishMetric={End:e.eventTime,Error:this.getConnectionError(e.statusCode),Id:this.privConnectionId,Name:"Connection",Start:this.privConnectionStartTime})),e instanceof Gi.ConnectionMessageReceivedEvent&&e.connectionId===this.privConnectionId&&e.message&&e.message.headers&&e.message.headers.path)){this.privReceivedMessages[e.message.headers.path]||(this.privReceivedMessages[e.message.headers.path]=new Array);const i=50;this.privReceivedMessages[e.message.headers.path].length<i&&this.privReceivedMessages[e.message.headers.path].push(e.networkReceivedTime)}}getTelemetry(){const e=new Array;this.privListeningTriggerMetric&&e.push(this.privListeningTriggerMetric),this.privMicMetric&&e.push(this.privMicMetric),this.privConnectionEstablishMetric&&e.push(this.privConnectionEstablishMetric),this.privPhraseLatencies.length>0&&e.push({PhraseLatencyMs:this.privPhraseLatencies}),this.privHypothesisLatencies.length>0&&e.push({FirstHypothesisLatencyMs:this.privHypothesisLatencies});const i={Metrics:e,ReceivedMessages:this.privReceivedMessages},n=JSON.stringify(i);return this.privReceivedMessages={},this.privListeningTriggerMetric=null,this.privMicMetric=null,this.privConnectionEstablishMetric=null,this.privPhraseLatencies=[],this.privHypothesisLatencies=[],n}get hasTelemetry(){return Object.keys(this.privReceivedMessages).length!==0||this.privListeningTriggerMetric!==null||this.privMicMetric!==null||this.privConnectionEstablishMetric!==null||this.privPhraseLatencies.length!==0||this.privHypothesisLatencies.length!==0}dispose(){this.privIsDisposed=!0}getConnectionError(e){switch(e){case 400:case 1002:case 1003:case 1005:case 1007:case 1008:case 1009:return"BadRequest";case 401:return"Unauthorized";case 403:return"Forbidden";case 503:case 1001:return"ServerUnavailable";case 500:case 1011:return"ServerError";case 408:case 504:return"Timeout";default:return"statuscode:"+e.toString()}}}Uc.ServiceTelemetryListener=MO,Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.RequestSession=void 0;const Lr=ge(),Nc=fc,BO=Uc;class vO{constructor(e){this.privIsDisposed=!1,this.privDetachables=new Array,this.privIsAudioNodeDetached=!1,this.privIsRecognizing=!1,this.privIsSpeechEnded=!1,this.privTurnStartAudioOffset=0,this.privLastRecoOffset=0,this.privHypothesisReceived=!1,this.privBytesSent=0,this.privRecognitionBytesSent=0,this.privRecogNumber=0,this.privInTurn=!1,this.privConnectionAttempts=0,this.privAudioSourceId=e,this.privRequestId=(0,Lr.createNoDashGuid)(),this.privAudioNodeId=(0,Lr.createNoDashGuid)(),this.privTurnDeferral=new Lr.Deferred,this.privTurnDeferral.resolve()}get sessionId(){return this.privSessionId}get requestId(){return this.privRequestId}get audioNodeId(){return this.privAudioNodeId}get turnCompletionPromise(){return this.privTurnDeferral.promise}get isSpeechEnded(){return this.privIsSpeechEnded}get isRecognizing(){return this.privIsRecognizing}get currentTurnAudioOffset(){return this.privTurnStartAudioOffset}get recogNumber(){return this.privRecogNumber}get numConnectionAttempts(){return this.privConnectionAttempts}get bytesSent(){return this.privBytesSent}get recognitionBytesSent(){return this.privRecognitionBytesSent}listenForServiceTelemetry(e){this.privServiceTelemetryListener&&this.privDetachables.push(e.attachListener(this.privServiceTelemetryListener))}startNewRecognition(){this.privRecognitionBytesSent=0,this.privIsSpeechEnded=!1,this.privIsRecognizing=!0,this.privTurnStartAudioOffset=0,this.privLastRecoOffset=0,this.privRecogNumber++,this.privServiceTelemetryListener=new BO.ServiceTelemetryListener(this.privRequestId,this.privAudioSourceId,this.privAudioNodeId),this.onEvent(new Nc.RecognitionTriggeredEvent(this.requestId,this.privSessionId,this.privAudioSourceId,this.privAudioNodeId))}async onAudioSourceAttachCompleted(e,i){this.privAudioNode=e,this.privIsAudioNodeDetached=!1,i?await this.onComplete():this.onEvent(new Nc.ListeningStartedEvent(this.privRequestId,this.privSessionId,this.privAudioSourceId,this.privAudioNodeId))}onPreConnectionStart(e,i){this.privAuthFetchEventId=e,this.privSessionId=i,this.onEvent(new Nc.ConnectingToServiceEvent(this.privRequestId,this.privAuthFetchEventId,this.privSessionId))}async onAuthCompleted(e){e&&await this.onComplete()}async onConnectionEstablishCompleted(e,i){if(e===200){this.onEvent(new Nc.RecognitionStartedEvent(this.requestId,this.privAudioSourceId,this.privAudioNodeId,this.privAuthFetchEventId,this.privSessionId)),this.privAudioNode&&this.privAudioNode.replay(),this.privTurnStartAudioOffset=this.privLastRecoOffset,this.privBytesSent=0;return}else e===403&&await this.onComplete()}async onServiceTurnEndResponse(e){this.privTurnDeferral.resolve(),!e||this.isSpeechEnded?(await this.onComplete(),this.privInTurn=!1):(this.privTurnStartAudioOffset=this.privLastRecoOffset,this.privAudioNode.replay())}onSpeechContext(){this.privRequestId=(0,Lr.createNoDashGuid)()}onServiceTurnStartResponse(){this.privTurnDeferral&&this.privInTurn&&(this.privTurnDeferral.reject("Another turn started before current completed."),this.privTurnDeferral.promise.then().catch(()=>{})),this.privInTurn=!0,this.privTurnDeferral=new Lr.Deferred}onHypothesis(e){this.privHypothesisReceived||(this.privHypothesisReceived=!0,this.privServiceTelemetryListener.hypothesisReceived(this.privAudioNode.findTimeAtOffset(e)))}onPhraseRecognized(e){this.privServiceTelemetryListener.phraseReceived(this.privAudioNode.findTimeAtOffset(e)),this.onServiceRecognized(e)}onServiceRecognized(e){this.privLastRecoOffset=e,this.privHypothesisReceived=!1,this.privAudioNode.shrinkBuffers(e),this.privConnectionAttempts=0}onAudioSent(e){this.privBytesSent+=e,this.privRecognitionBytesSent+=e}onRetryConnection(){this.privConnectionAttempts++}async dispose(){if(!this.privIsDisposed){this.privIsDisposed=!0;for(const e of this.privDetachables)await e.detach();this.privServiceTelemetryListener&&this.privServiceTelemetryListener.dispose(),this.privIsRecognizing=!1}}getTelemetry(){return this.privServiceTelemetryListener.hasTelemetry?this.privServiceTelemetryListener.getTelemetry():null}async onStopRecognizing(){await this.onComplete()}onSpeechEnded(){this.privIsSpeechEnded=!0}onEvent(e){this.privServiceTelemetryListener&&this.privServiceTelemetryListener.onEvent(e),Lr.Events.instance.onEvent(e)}async onComplete(){this.privIsRecognizing&&(this.privIsRecognizing=!1,await this.detachAudioNode())}async detachAudioNode(){this.privIsAudioNodeDetached||(this.privIsAudioNodeDetached=!0,this.privAudioNode&&await this.privAudioNode.detach())}}Oc.RequestSession=vO;var Kc={},sS={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TentativePhraseResultsOption=t.OutputFormat=t.PhraseExtension=t.PhraseOption=void 0,function(e){e.WordTimings="WordTimings",e.SNR="SNR",e.Pronunciation="Pronunciation",e.WordPronunciation="WordPronunciation",e.WordConfidence="WordConfidence",e.Words="Words",e.Sentiment="Sentiment",e.PronunciationAssessment="PronunciationAssessment",e.ContentAssessment="ContentAssessment",e.PhraseAMScore="PhraseAMScore",e.PhraseLMScore="PhraseLMScore",e.WordAMScore="WordAMScore",e.WordLMScore="WordLMScore",e.RuleTree="RuleTree",e.NBestTimings="NBestTimings",e.DecoderDiagnostics="DecoderDiagnostics",e.DisplayWordTimings="DisplayWordTimings",e.DisplayWords="DisplayWords"}(t.PhraseOption||(t.PhraseOption={})),function(e){e.Graph="Graph",e.Corrections="Corrections",e.Sentiment="Sentiment"}(t.PhraseExtension||(t.PhraseExtension={})),function(e){e.Simple="Simple",e.Detailed="Detailed"}(t.OutputFormat||(t.OutputFormat={})),function(e){e.None="None",e.Always="Always"}(t.TentativePhraseResultsOption||(t.TentativePhraseResultsOption={}))})(sS),Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.SpeechContext=void 0;const fO=Jt,Cn=sS;class wO{constructor(e){this.privContext={},this.privDynamicGrammar=e}getContext(){return this.privContext}setPronunciationAssessmentParams(e,i,n=!1){this.privContext.phraseDetection===void 0&&(this.privContext.phraseDetection={enrichment:{pronunciationAssessment:{}}}),this.privContext.phraseDetection.enrichment===void 0&&(this.privContext.phraseDetection.enrichment={pronunciationAssessment:{}}),this.privContext.phraseDetection.enrichment.pronunciationAssessment=JSON.parse(e)||{},n&&(this.privContext.phraseDetection.mode=fO.RecognitionMode.Conversation),this.setWordLevelTimings(),this.privContext.phraseOutput.detailed.options.push(Cn.PhraseOption.PronunciationAssessment),this.privContext.phraseOutput.detailed.options.indexOf(Cn.PhraseOption.SNR)===-1&&this.privContext.phraseOutput.detailed.options.push(Cn.PhraseOption.SNR),i&&(this.privContext.phraseDetection.enrichment.contentAssessment={topic:i},this.privContext.phraseOutput.detailed.options.push(Cn.PhraseOption.ContentAssessment))}setDetailedOutputFormat(){this.privContext.phraseOutput===void 0&&(this.privContext.phraseOutput={detailed:{options:[]}}),this.privContext.phraseOutput.detailed===void 0&&(this.privContext.phraseOutput.detailed={options:[]}),this.privContext.phraseOutput.format=Cn.OutputFormat.Detailed}setWordLevelTimings(){this.privContext.phraseOutput===void 0&&(this.privContext.phraseOutput={detailed:{options:[]}}),this.privContext.phraseOutput.detailed===void 0&&(this.privContext.phraseOutput.detailed={options:[]}),this.privContext.phraseOutput.format=Cn.OutputFormat.Detailed,this.privContext.phraseOutput.detailed.options.indexOf(Cn.PhraseOption.WordTimings)===-1&&this.privContext.phraseOutput.detailed.options.push(Cn.PhraseOption.WordTimings)}setSpeakerDiarizationAudioOffsetMs(e){this.privContext.phraseDetection.speakerDiarization.audioOffsetMs=e}toJSON(){const e=this.privDynamicGrammar.generateGrammarObject();return this.privContext.dgi=e,JSON.stringify(this.privContext)}}Kc.SpeechContext=wO;var Fc={},AS={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SubstringMatchType=t.GroupType=void 0,function(e){e.IntentText="IntentText",e.IntentEntity="IntentEntity",e.Generic="Generic",e.People="People",e.Place="Place",e.DynamicEntity="DynamicEntity"}(t.GroupType||(t.GroupType={})),function(e){e.None="None",e.LeftRooted="LeftRooted",e.PartialName="PartialName",e.MiddleOfSentence="MiddleOfSentence"}(t.SubstringMatchType||(t.SubstringMatchType={}))})(AS),Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.DynamicGrammarBuilder=void 0;const mO=AS;class QO{addPhrase(e){this.privPhrases||(this.privPhrases=[]),e instanceof Array?this.privPhrases=this.privPhrases.concat(e):this.privPhrases.push(e)}clearPhrases(){this.privPhrases=void 0}addReferenceGrammar(e){this.privGrammars||(this.privGrammars=[]),e instanceof Array?this.privGrammars=this.privGrammars.concat(e):this.privGrammars.push(e)}clearGrammars(){this.privGrammars=void 0}generateGrammarObject(){if(this.privGrammars===void 0&&this.privPhrases===void 0)return;const e={};if(e.referenceGrammars=this.privGrammars,this.privPhrases!==void 0&&this.privPhrases.length!==0){const i=[];this.privPhrases.forEach(n=>{i.push({text:n})}),e.groups=[{type:mO.GroupType.Generic,items:i}]}return e}}Fc.DynamicGrammarBuilder=QO;var AA={},Gc={},xc={},$l={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDataStreamType=t.ActivityPayloadResponse=void 0;class e{constructor(n){this.privActivityResponse=JSON.parse(n)}static fromJSON(n){return new e(n)}get conversationId(){return this.privActivityResponse.conversationId}get messageDataStreamType(){return this.privActivityResponse.messageDataStreamType}get messagePayload(){return this.privActivityResponse.messagePayload}get version(){return this.privActivityResponse.version}}t.ActivityPayloadResponse=e,function(i){i[i.None=0]="None",i[i.TextToSpeechAudio=1]="TextToSpeechAudio"}(t.MessageDataStreamType||(t.MessageDataStreamType={}))})($l),Object.defineProperty(xc,"__esModule",{value:!0}),xc.DialogServiceTurnState=void 0;const RO=En,DO=vt,yO=$l;class TO{constructor(e,i){this.privRequestId=i,this.privIsCompleted=!1,this.privAudioStream=null,this.privTurnManager=e,this.resetTurnEndTimeout()}get audioStream(){return this.resetTurnEndTimeout(),this.privAudioStream}processActivityPayload(e,i){return e.messageDataStreamType===yO.MessageDataStreamType.TextToSpeechAudio&&(this.privAudioStream=DO.AudioOutputStream.createPullStream(),this.privAudioStream.format=i!==void 0?i:RO.AudioOutputFormatImpl.getDefaultOutputFormat()),this.privAudioStream}endAudioStream(){this.privAudioStream!==null&&!this.privAudioStream.isClosed&&this.privAudioStream.close()}complete(){this.privTimeoutToken!==void 0&&clearTimeout(this.privTimeoutToken),this.endAudioStream()}resetTurnEndTimeout(){this.privTimeoutToken!==void 0&&clearTimeout(this.privTimeoutToken),this.privTimeoutToken=setTimeout(()=>{this.privTurnManager.CompleteTurn(this.privRequestId)},2e3)}}xc.DialogServiceTurnState=TO,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.DialogServiceTurnStateManager=void 0;const aS=St,LO=xc;class OO{constructor(){this.privTurnMap=new Map}StartTurn(e){if(this.privTurnMap.has(e))throw new aS.InvalidOperationError("Service error: There is already a turn with id:"+e);const i=new LO.DialogServiceTurnState(this,e);return this.privTurnMap.set(e,i),this.privTurnMap.get(e)}GetTurn(e){return this.privTurnMap.get(e)}CompleteTurn(e){if(!this.privTurnMap.has(e))throw new aS.InvalidOperationError("Service error: Received turn end for an unknown turn id:"+e);const i=this.privTurnMap.get(e);return i.complete(),this.privTurnMap.delete(e),i}}Gc.DialogServiceTurnStateManager=OO;var cS={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InvocationSource=void 0,function(e){e.None="None",e.VoiceActivationWithKeyword="VoiceActivationWithKeyword"}(t.InvocationSource||(t.InvocationSource={}))})(cS);var uS={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.OnRejectAction=t.KeywordDetectionType=void 0,function(e){e.StartTrigger="StartTrigger"}(t.KeywordDetectionType||(t.KeywordDetectionType={})),function(e){e.EndOfTurn="EndOfTurn",e.Continue="Continue"}(t.OnRejectAction||(t.OnRejectAction={}))})(uS);var lS;function UO(){if(lS)return AA;lS=1,Object.defineProperty(AA,"__esModule",{value:!0}),AA.DialogServiceAdapter=void 0;const t=Ct(),e=On,i=ge(),n=En,o=V(),s=Gc,A=oe(),r=$l,a=cS,c=uS,u=Ki;let l=class extends A.ServiceRecognizerBase{constructor(E,C,d,S,I){super(E,C,d,S,I),this.privEvents=new i.EventSource,this.privDialogServiceConnector=I,this.receiveMessageOverride=()=>this.receiveDialogMessageOverride(),this.privTurnStateManager=new s.DialogServiceTurnStateManager,this.recognizeOverride=(p,M,B)=>this.listenOnce(p,M,B),this.postConnectImplOverride=p=>this.dialogConnectImpl(p),this.configConnectionOverride=p=>this.configConnection(p),this.disconnectOverride=()=>this.privDisconnect(),this.privDialogAudioSource=d,this.agentConfigSent=!1,this.privLastResult=null,this.connectionEvents.attach(p=>{p.name==="ConnectionClosedEvent"&&(this.terminateMessageLoop=!0)})}async sendMessage(E){const C=(0,i.createGuid)(),d=(0,i.createNoDashGuid)(),S={context:{interactionId:C},messagePayload:JSON.parse(E),version:.5},I=JSON.stringify(S);await(await this.fetchConnection()).send(new u.SpeechConnectionMessage(i.MessageType.Text,"agent",d,"application/json",I))}async privDisconnect(){await this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,o.CancellationReason.Error,o.CancellationErrorCode.NoError,"Disconnecting"),this.terminateMessageLoop=!0,this.agentConfigSent=!1}processTypeSpecificMessages(E){const C=new o.PropertyCollection;E.messageType===i.MessageType.Text&&C.setProperty(o.PropertyId.SpeechServiceResponse_JsonResult,E.textBody);let d,S;switch(E.path.toLowerCase()){case"speech.phrase":const p=A.SimpleSpeechPhrase.fromJSON(E.textBody,this.privRequestSession.currentTurnAudioOffset);if(this.privRequestSession.onPhraseRecognized(p.Offset+p.Duration),p.RecognitionStatus!==A.RecognitionStatus.TooManyRequests&&p.RecognitionStatus!==A.RecognitionStatus.Error){const O=this.fireEventForResult(p,C);if(this.privLastResult=O.result,this.privDialogServiceConnector.recognized)try{this.privDialogServiceConnector.recognized(this.privDialogServiceConnector,O)}catch{}}S=!0;break;case"speech.hypothesis":const M=A.SpeechHypothesis.fromJSON(E.textBody,this.privRequestSession.currentTurnAudioOffset);d=new o.SpeechRecognitionResult(this.privRequestSession.requestId,o.ResultReason.RecognizingSpeech,M.Text,M.Duration,M.Offset,M.Language,M.LanguageDetectionConfidence,void 0,void 0,M.asJson(),C),this.privRequestSession.onHypothesis(M.Offset);const B=new o.SpeechRecognitionEventArgs(d,M.Offset,this.privRequestSession.sessionId);if(this.privDialogServiceConnector.recognizing)try{this.privDialogServiceConnector.recognizing(this.privDialogServiceConnector,B)}catch{}S=!0;break;case"speech.keyword":const T=A.SpeechKeyword.fromJSON(E.textBody,this.privRequestSession.currentTurnAudioOffset);d=new o.SpeechRecognitionResult(this.privRequestSession.requestId,T.Status==="Accepted"?o.ResultReason.RecognizedKeyword:o.ResultReason.NoMatch,T.Text,T.Duration,T.Offset,void 0,void 0,void 0,void 0,T.asJson(),C),T.Status!=="Accepted"&&(this.privLastResult=d);const L=new o.SpeechRecognitionEventArgs(d,d.duration,d.resultId);if(this.privDialogServiceConnector.recognized)try{this.privDialogServiceConnector.recognized(this.privDialogServiceConnector,L)}catch{}S=!0;break;case"audio":{const O=E.requestId.toUpperCase(),R=this.privTurnStateManager.GetTurn(O);try{E.binaryBody?R.audioStream.write(E.binaryBody):R.endAudioStream()}catch{}}S=!0;break;case"response":this.handleResponseMessage(E),S=!0;break}const I=new i.Deferred;return I.resolve(S),I.promise}async cancelRecognition(E,C,d,S,I){if(this.terminateMessageLoop=!0,this.privRequestSession.isRecognizing&&await this.privRequestSession.onStopRecognizing(),this.privDialogServiceConnector.canceled){const p=new o.PropertyCollection;p.setProperty(A.CancellationErrorCodePropertyName,o.CancellationErrorCode[S]);const M=new o.SpeechRecognitionCanceledEventArgs(d,I,S,void 0,E);try{this.privDialogServiceConnector.canceled(this.privDialogServiceConnector,M)}catch{}if(this.privSuccessCallback){const B=new o.SpeechRecognitionResult(void 0,o.ResultReason.Canceled,void 0,void 0,void 0,void 0,void 0,void 0,I,void 0,p);try{this.privSuccessCallback(B),this.privSuccessCallback=void 0}catch{}}}}async listenOnce(E,C,d){this.privRecognizerConfig.recognitionMode=E,this.privSuccessCallback=C,this.privErrorCallback=d,this.privRequestSession.startNewRecognition(),this.privRequestSession.listenForServiceTelemetry(this.privDialogAudioSource.events),this.privRecognizerConfig.parameters.setProperty(o.PropertyId.Speech_SessionId,this.privRequestSession.sessionId);const S=this.connectImpl(),I=this.sendPreAudioMessages(),p=await this.privDialogAudioSource.attach(this.privRequestSession.audioNodeId),M=await this.privDialogAudioSource.format,B=await this.privDialogAudioSource.deviceInfo,T=new t.ReplayableAudioNode(p,M.avgBytesPerSec);await this.privRequestSession.onAudioSourceAttachCompleted(T,!1),this.privRecognizerConfig.SpeechServiceConfig.Context.audio={source:B};try{await S,await I}catch(R){return await this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,o.CancellationReason.Error,o.CancellationErrorCode.ConnectionFailure,R),Promise.resolve()}const L=new o.SessionEventArgs(this.privRequestSession.sessionId);this.privRecognizer.sessionStarted&&this.privRecognizer.sessionStarted(this.privRecognizer,L),this.sendAudio(T).then(()=>{},async R=>{await this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,o.CancellationReason.Error,o.CancellationErrorCode.RuntimeError,R)})}dialogConnectImpl(E){return this.privConnectionLoop=this.startMessageLoop(),E}receiveDialogMessageOverride(){const E=new i.Deferred,C=async()=>{try{const d=this.isDisposed(),S=!this.isDisposed()&&this.terminateMessageLoop;if(d||S){E.resolve(void 0);return}const p=await(await this.fetchConnection()).read();if(!p)return C();const M=u.SpeechConnectionMessage.fromConnectionMessage(p);switch(M.path.toLowerCase()){case"turn.start":{const Y=M.requestId.toUpperCase(),G=this.privRequestSession.requestId.toUpperCase();Y!==G?this.privTurnStateManager.StartTurn(Y):this.privRequestSession.onServiceTurnStartResponse()}break;case"speech.startdetected":const T=A.SpeechDetected.fromJSON(M.textBody,this.privRequestSession.currentTurnAudioOffset),L=new o.RecognitionEventArgs(T.Offset,this.privRequestSession.sessionId);this.privRecognizer.speechStartDetected&&this.privRecognizer.speechStartDetected(this.privRecognizer,L);break;case"speech.enddetected":let O;M.textBody.length>0?O=M.textBody:O="{ Offset: 0 }";const R=A.SpeechDetected.fromJSON(O,this.privRequestSession.currentTurnAudioOffset);this.privRequestSession.onServiceRecognized(R.Offset);const k=new o.RecognitionEventArgs(R.Offset,this.privRequestSession.sessionId);this.privRecognizer.speechEndDetected&&this.privRecognizer.speechEndDetected(this.privRecognizer,k);break;case"turn.end":{const Y=M.requestId.toUpperCase(),G=this.privRequestSession.requestId.toUpperCase();if(Y!==G)this.privTurnStateManager.CompleteTurn(Y);else{const F=new o.SessionEventArgs(this.privRequestSession.sessionId);if(await this.privRequestSession.onServiceTurnEndResponse(!1),(!this.privRecognizerConfig.isContinuousRecognition||this.privRequestSession.isSpeechEnded||!this.privRequestSession.isRecognizing)&&this.privRecognizer.sessionStopped&&this.privRecognizer.sessionStopped(this.privRecognizer,F),this.privSuccessCallback&&this.privLastResult){try{this.privSuccessCallback(this.privLastResult),this.privLastResult=null}catch($){this.privErrorCallback&&this.privErrorCallback($)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}}}break;default:try{await this.processTypeSpecificMessages(M)||this.serviceEvents&&this.serviceEvents.onEvent(new i.ServiceEvent(M.path.toLowerCase(),M.textBody))}catch{}}return C()}catch{this.terminateMessageLoop=!0,E.resolve()}};return C().catch(d=>{i.Events.instance.onEvent(new i.BackgroundEvent(d))}),E.promise}async startMessageLoop(){this.terminateMessageLoop=!1;try{await this.receiveDialogMessageOverride()}catch(E){await this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,o.CancellationReason.Error,o.CancellationErrorCode.RuntimeError,E)}return Promise.resolve()}async configConnection(E){return this.terminateMessageLoop?(this.terminateMessageLoop=!1,Promise.reject("Connection to service terminated.")):(await this.sendSpeechServiceConfig(E,this.privRequestSession,this.privRecognizerConfig.SpeechServiceConfig.serialize()),await this.sendAgentConfig(E),E)}async sendPreAudioMessages(){const E=await this.fetchConnection();this.addKeywordContextData(),await this.sendSpeechContext(E,!0),await this.sendAgentContext(E),await this.sendWaveHeader(E)}sendAgentConfig(E){if(this.agentConfig&&!this.agentConfigSent){if(this.privRecognizerConfig.parameters.getProperty(o.PropertyId.Conversation_DialogType)===o.DialogServiceConfig.DialogTypes.CustomCommands){const d=this.agentConfig.get();d.botInfo.commandsCulture=this.privRecognizerConfig.parameters.getProperty(o.PropertyId.SpeechServiceConnection_RecoLanguage,"en-us"),this.agentConfig.set(d)}this.onEvent(new e.SendingAgentContextMessageEvent(this.agentConfig));const C=this.agentConfig.toJsonString();return this.agentConfigSent=!0,E.send(new u.SpeechConnectionMessage(i.MessageType.Text,"agent.config",this.privRequestSession.requestId,"application/json",C))}}sendAgentContext(E){const C=(0,i.createGuid)(),d=this.privDialogServiceConnector.properties.getProperty(o.PropertyId.Conversation_Speech_Activity_Template),I=JSON.stringify({channelData:"",context:{interactionId:C},messagePayload:typeof d===void 0?void 0:d,version:.5});return E.send(new u.SpeechConnectionMessage(i.MessageType.Text,"speech.agent.context",this.privRequestSession.requestId,"application/json",I))}fireEventForResult(E,C){const d=A.EnumTranslation.implTranslateRecognitionResult(E.RecognitionStatus),S=new o.SpeechRecognitionResult(this.privRequestSession.requestId,d,E.DisplayText,E.Duration,E.Offset,E.Language,E.LanguageDetectionConfidence,void 0,void 0,E.asJson(),C);return new o.SpeechRecognitionEventArgs(S,E.Offset,this.privRequestSession.sessionId)}handleResponseMessage(E){const C=JSON.parse(E.textBody);switch(C.messageType.toLowerCase()){case"message":const d=E.requestId.toUpperCase(),S=r.ActivityPayloadResponse.fromJSON(E.textBody),I=this.privTurnStateManager.GetTurn(d);if(S.conversationId){const B=this.agentConfig.get();B.botInfo.conversationId=S.conversationId,this.agentConfig.set(B)}const p=I.processActivityPayload(S,n.AudioOutputFormatImpl.fromSpeechSynthesisOutputFormatString(this.privDialogServiceConnector.properties.getProperty(o.PropertyId.SpeechServiceConnection_SynthOutputFormat,void 0))),M=new o.ActivityReceivedEventArgs(S.messagePayload,p);if(this.privDialogServiceConnector.activityReceived)try{this.privDialogServiceConnector.activityReceived(this.privDialogServiceConnector,M)}catch{}break;case"messagestatus":if(this.privDialogServiceConnector.turnStatusReceived)try{this.privDialogServiceConnector.turnStatusReceived(this.privDialogServiceConnector,new o.TurnStatusReceivedEventArgs(E.textBody))}catch{}break;default:i.Events.instance.onEvent(new i.BackgroundEvent(`Unexpected response of type ${C.messageType}. Ignoring.`));break}}onEvent(E){this.privEvents.onEvent(E),i.Events.instance.onEvent(E)}addKeywordContextData(){const E=this.privRecognizerConfig.parameters.getProperty("SPEECH-KeywordsToDetect");if(E===void 0)return;const C=this.privRecognizerConfig.parameters.getProperty("SPEECH-KeywordsToDetect-Offsets"),d=this.privRecognizerConfig.parameters.getProperty("SPEECH-KeywordsToDetect-Durations"),S=E.split(";"),I=C===void 0?[]:C.split(";"),p=d===void 0?[]:d.split(";"),M=[];for(let B=0;B<S.length;B++){const T={text:S[B]};B<I.length&&(T.startOffset=Number(I[B])),B<p.length&&(T.duration=Number(p[B])),M.push(T)}this.speechContext.getContext().invocationSource=a.InvocationSource.VoiceActivationWithKeyword,this.speechContext.getContext().keywordDetection=[{clientDetectedKeywords:M,onReject:{action:c.OnRejectAction.EndOfTurn},type:c.KeywordDetectionType.StartTrigger}]}};return AA.DialogServiceAdapter=l,AA}var kc={};Object.defineProperty(kc,"__esModule",{value:!0}),kc.AgentConfig=void 0;class NO{toJsonString(){return JSON.stringify(this.iPrivConfig)}get(){return this.iPrivConfig}set(e){this.iPrivConfig=e}}kc.AgentConfig=NO;var eg={},aA={},Or={};Object.defineProperty(Or,"__esModule",{value:!0}),Or.ConversationConnectionConfig=void 0;const KO=bs;class Ot extends KO.RestConfigBase{static get host(){return Ot.privHost}static get apiVersion(){return Ot.privApiVersion}static get clientAppId(){return Ot.privClientAppId}static get defaultLanguageCode(){return Ot.privDefaultLanguageCode}static get restPath(){return Ot.privRestPath}static get webSocketPath(){return Ot.privWebSocketPath}static get transcriptionEventKeys(){return Ot.privTranscriptionEventKeys}}Or.ConversationConnectionConfig=Ot,Ot.privHost="dev.microsofttranslator.com",Ot.privRestPath="/capito/room",Ot.privApiVersion="2.0",Ot.privDefaultLanguageCode="en-US",Ot.privClientAppId="FC539C22-1767-4F1F-84BC-B4D811114F15",Ot.privWebSocketPath="/capito/translate",Ot.privTranscriptionEventKeys=["iCalUid","callId","organizer","FLAC","MTUri","DifferentiateGuestSpeakers","audiorecording","Threadid","OrganizerMri","OrganizerTenantId","UserToken"];var gS;function FO(){if(gS)return aA;gS=1,Object.defineProperty(aA,"__esModule",{value:!0}),aA.ConversationManager=void 0;const t=Ct(),e=Ie,i=V(),n=Or;let o=class{constructor(){this.privRequestParams=n.ConversationConnectionConfig.configParams,this.privErrors=n.ConversationConnectionConfig.restErrors,this.privHost=n.ConversationConnectionConfig.host,this.privApiVersion=n.ConversationConnectionConfig.apiVersion,this.privRestPath=n.ConversationConnectionConfig.restPath,this.privRestAdapter=new t.RestMessageAdapter({})}createOrJoin(A,r,a,c){try{e.Contracts.throwIfNullOrUndefined(A,"args");const u=A.getProperty(i.PropertyId.SpeechServiceConnection_RecoLanguage,n.ConversationConnectionConfig.defaultLanguageCode),l=A.getProperty(i.PropertyId.ConversationTranslator_Name,"conversation_host"),g=A.getProperty(i.PropertyId.ConversationTranslator_Host,this.privHost),E=A.getProperty(i.PropertyId.ConversationTranslator_CorrelationId),C=A.getProperty(i.PropertyId.SpeechServiceConnection_Key),d=A.getProperty(i.PropertyId.SpeechServiceConnection_Region),S=A.getProperty(i.PropertyId.SpeechServiceAuthorization_Token);e.Contracts.throwIfNullOrWhitespace(u,"languageCode"),e.Contracts.throwIfNullOrWhitespace(l,"nickname"),e.Contracts.throwIfNullOrWhitespace(g,"endpointHost");const I={};I[this.privRequestParams.apiVersion]=this.privApiVersion,I[this.privRequestParams.languageCode]=u,I[this.privRequestParams.nickname]=l;const p={};E&&(p[this.privRequestParams.correlationId]=E),p[this.privRequestParams.clientAppId]=n.ConversationConnectionConfig.clientAppId,r!==void 0?I[this.privRequestParams.roomId]=r:(e.Contracts.throwIfNullOrUndefined(d,this.privErrors.authInvalidSubscriptionRegion),p[this.privRequestParams.subscriptionRegion]=d,C?p[this.privRequestParams.subscriptionKey]=C:S?p[this.privRequestParams.authorization]=`Bearer ${S}`:e.Contracts.throwIfNullOrUndefined(C,this.privErrors.authInvalidSubscriptionKey));const M={};M.headers=p,this.privRestAdapter.options=M;const B=`https://${g}${this.privRestPath}`;this.privRestAdapter.request(t.RestRequestType.Post,B,I,null).then(T=>{const L=t.RestMessageAdapter.extractHeaderValue(this.privRequestParams.requestId,T.headers);if(!T.ok){if(c){let R=this.privErrors.invalidCreateJoinConversationResponse.replace("{status}",T.status.toString()),k;try{k=JSON.parse(T.data),R+=` [${k.error.code}: ${k.error.message}]`}catch{R+=` [${T.data}]`}L&&(R+=` ${L}`),c(R)}return}const O=JSON.parse(T.data);if(O&&(O.requestId=L),a){try{a(O)}catch(R){c&&c(R)}a=void 0}}).catch(()=>{})}catch(u){if(c)if(u instanceof Error){const l=u;c(l.name+": "+l.message)}else c(u)}}leave(A,r){return new Promise((a,c)=>{try{e.Contracts.throwIfNullOrUndefined(A,this.privErrors.invalidArgs.replace("{arg}","config")),e.Contracts.throwIfNullOrWhitespace(r,this.privErrors.invalidArgs.replace("{arg}","token"));const u=A.getProperty(i.PropertyId.ConversationTranslator_Host,this.privHost),l=A.getProperty(i.PropertyId.ConversationTranslator_CorrelationId),g={};g[this.privRequestParams.apiVersion]=this.privApiVersion,g[this.privRequestParams.sessionToken]=r;const E={};l&&(E[this.privRequestParams.correlationId]=l);const C={};C.headers=E,this.privRestAdapter.options=C;const d=`https://${u}${this.privRestPath}`;this.privRestAdapter.request(t.RestRequestType.Delete,d,g,null).then(S=>{S.ok,a()}).catch(()=>{})}catch(u){if(u instanceof Error){const l=u;c(l.name+": "+l.message)}else c(u)}})}};return aA.ConversationManager=o,aA}var qn={},cA={},jc={},uA={};Object.defineProperty(uA,"__esModule",{value:!0}),uA.ConversationConnectionMessage=void 0;const GO=ge();class xO extends GO.ConnectionMessage{constructor(e,i,n,o){super(e,i,n,o);const s=JSON.parse(this.textBody);s.type!==void 0&&(this.privConversationMessageType=s.type)}get conversationMessageType(){return this.privConversationMessageType}}uA.ConversationConnectionMessage=xO,Object.defineProperty(jc,"__esModule",{value:!0}),jc.ConversationWebsocketMessageFormatter=void 0;const Vn=ge(),ES=uA;class kO{toConnectionMessage(e){const i=new Vn.Deferred;try{if(e.messageType===Vn.MessageType.Text){const n=new ES.ConversationConnectionMessage(e.messageType,e.textContent,{},e.id);i.resolve(n)}else e.messageType===Vn.MessageType.Binary&&i.resolve(new ES.ConversationConnectionMessage(e.messageType,e.binaryContent,void 0,e.id))}catch(n){i.reject(`Error formatting the message. Error: ${n}`)}return i.promise}fromConnectionMessage(e){const i=new Vn.Deferred;try{if(e.messageType===Vn.MessageType.Text){const n=`${e.textBody?e.textBody:""}`;i.resolve(new Vn.RawWebsocketMessage(Vn.MessageType.Text,n,e.id))}}catch(n){i.reject(`Error formatting the message. ${n}`)}return i.promise}}jc.ConversationWebsocketMessageFormatter=kO;var hS;function jO(){if(hS)return cA;hS=1,Object.defineProperty(cA,"__esModule",{value:!0}),cA.ConversationConnectionFactory=void 0;const t=Ct(),e=ge(),i=Ie,n=V(),o=ui(),s=Or,A=jc;let r=class extends o.ConnectionFactoryBase{create(c,u,l){const g=c.parameters.getProperty(n.PropertyId.ConversationTranslator_Host,s.ConversationConnectionConfig.host),E=c.parameters.getProperty(n.PropertyId.ConversationTranslator_CorrelationId,(0,e.createGuid)()),C=`wss://${g}${s.ConversationConnectionConfig.webSocketPath}`,d=c.parameters.getProperty(n.PropertyId.ConversationTranslator_Token,void 0);i.Contracts.throwIfNullOrUndefined(d,"token");const S={};S[s.ConversationConnectionConfig.configParams.apiVersion]=s.ConversationConnectionConfig.apiVersion,S[s.ConversationConnectionConfig.configParams.token]=d,S[s.ConversationConnectionConfig.configParams.correlationId]=E;const I=c.parameters.getProperty("SPEECH-EnableWebsocketCompression","false")==="true";return Promise.resolve(new t.WebsocketConnection(C,S,{},new A.ConversationWebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(c),I,l))}};return cA.ConversationConnectionFactory=r,cA}var lA={},Yc={};Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.ConversationRequestSession=void 0;const tg=ge();class YO{constructor(e){this.privIsDisposed=!1,this.privDetachables=new Array,this.privSessionId=e,this.privRequestId=(0,tg.createNoDashGuid)(),this.privRequestCompletionDeferral=new tg.Deferred}get sessionId(){return this.privSessionId}get requestId(){return this.privRequestId}get completionPromise(){return this.privRequestCompletionDeferral.promise}onPreConnectionStart(e,i){this.privSessionId=i}onAuthCompleted(e){e&&this.onComplete()}onConnectionEstablishCompleted(e){e!==200&&e===403&&this.onComplete()}onServiceTurnEndResponse(e){e?this.privRequestId=(0,tg.createNoDashGuid)():this.onComplete()}async dispose(){if(!this.privIsDisposed){this.privIsDisposed=!0;for(const e of this.privDetachables)await e.detach()}}onComplete(){}}Yc.ConversationRequestSession=YO;var Ft={},CS;function IS(){if(CS)return Ft;CS=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.ConversationReceivedTranslationEventArgs=Ft.ParticipantsListEventArgs=Ft.ParticipantAttributeEventArgs=Ft.ParticipantEventArgs=Ft.LockRoomEventArgs=Ft.MuteAllEventArgs=void 0;const t=V();class e extends t.SessionEventArgs{constructor(a,c){super(c),this.privIsMuted=a}get isMuted(){return this.privIsMuted}}Ft.MuteAllEventArgs=e;class i extends t.SessionEventArgs{constructor(a,c){super(c),this.privIsLocked=a}get isMuted(){return this.privIsLocked}}Ft.LockRoomEventArgs=i;class n extends t.SessionEventArgs{constructor(a,c){super(c),this.privParticipant=a}get participant(){return this.privParticipant}}Ft.ParticipantEventArgs=n;class o extends t.SessionEventArgs{constructor(a,c,u,l){super(l),this.privKey=c,this.privValue=u,this.privParticipantId=a}get value(){return this.privValue}get key(){return this.privKey}get id(){return this.privParticipantId}}Ft.ParticipantAttributeEventArgs=o;class s extends t.SessionEventArgs{constructor(a,c,u,l,g,E,C,d,S){super(S),this.privRoomId=a,this.privSessionToken=c,this.privTranslateTo=u,this.privProfanityFilter=l,this.privRoomProfanityFilter=g,this.privIsRoomLocked=E,this.privIsRoomLocked=C,this.privParticipants=d}get sessionToken(){return this.privSessionToken}get conversationId(){return this.privRoomId}get translateTo(){return this.privTranslateTo}get profanityFilter(){return this.privProfanityFilter}get roomProfanityFilter(){return this.privRoomProfanityFilter}get isRoomLocked(){return this.privIsRoomLocked}get isMuteAll(){return this.privIsMuteAll}get participants(){return this.privParticipants}}Ft.ParticipantsListEventArgs=s;class A{constructor(a,c,u){this.privPayload=c,this.privCommand=a,this.privSessionId=u}get payload(){return this.privPayload}get command(){return this.privCommand}get sessionId(){return this.privSessionId}}return Ft.ConversationReceivedTranslationEventArgs=A,Ft}var xi={};Object.defineProperty(xi,"__esModule",{value:!0}),xi.ConversationTranslatorCommandTypes=xi.ConversationTranslatorMessageTypes=xi.InternalParticipants=void 0;class zO{constructor(e=[],i){this.participants=e,this.meId=i}addOrUpdateParticipant(e){if(e===void 0)return;const i=this.getParticipantIndex(e.id);return i>-1?this.participants.splice(i,1,e):this.participants.push(e),this.getParticipant(e.id)}getParticipantIndex(e){return this.participants.findIndex(i=>i.id===e)}getParticipant(e){return this.participants.find(i=>i.id===e)}deleteParticipant(e){this.participants=this.participants.filter(i=>i.id!==e)}get host(){return this.participants.find(e=>e.isHost===!0)}get me(){return this.getParticipant(this.meId)}}xi.InternalParticipants=zO,xi.ConversationTranslatorMessageTypes={command:"command",final:"final",info:"info",instantMessage:"instant_message",keepAlive:"keep_alive",partial:"partial",participantCommand:"participant_command",translatedMessage:"translated_message"},xi.ConversationTranslatorCommandTypes={changeNickname:"ChangeNickname",disconnectSession:"DisconnectSession",ejectParticipant:"EjectParticipant",instant_message:"instant_message",joinSession:"JoinSession",leaveSession:"LeaveSession",participantList:"ParticipantList",roomExpirationWarning:"RoomExpirationWarning",setLockState:"SetLockState",setMute:"SetMute",setMuteAll:"SetMuteAll",setProfanityFiltering:"SetProfanityFiltering",setTranslateToLanguages:"SetTranslateToLanguages",setUseTTS:"SetUseTTS"};var pS={},zc={};Object.defineProperty(zc,"__esModule",{value:!0}),zc.CommandResponsePayload=void 0;const PO=t=>JSON.parse(t);class ig{constructor(e){this.privCommandResponse=PO(e)}get type(){return this.privCommandResponse.type}get command(){return this.privCommandResponse.command}get id(){return this.privCommandResponse.id}get nickname(){return this.privCommandResponse.nickname}get participantId(){return this.privCommandResponse.participantId}get roomid(){return this.privCommandResponse.roomid}get value(){return this.privCommandResponse.value}get token(){return this.privCommandResponse.token}static fromJSON(e){return new ig(e)}}zc.CommandResponsePayload=ig;var Ur={};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.ParticipantPayloadResponse=Ur.ParticipantsListPayloadResponse=void 0;const bO=t=>JSON.parse(t),JO=t=>JSON.parse(t);class ng{constructor(e){this.privParticipantsPayloadResponse=bO(e)}get roomid(){return this.privParticipantsPayloadResponse.roomid}get id(){return this.privParticipantsPayloadResponse.id}get command(){return this.privParticipantsPayloadResponse.command}get participants(){return this.privParticipantsPayloadResponse.participants}get token(){return this.privParticipantsPayloadResponse.token}get translateTo(){return this.privParticipantsPayloadResponse.translateTo}get profanityFilter(){return this.privParticipantsPayloadResponse.profanityFilter}get roomProfanityFilter(){return this.privParticipantsPayloadResponse.roomProfanityFilter}get roomLocked(){return this.privParticipantsPayloadResponse.roomLocked}get muteAll(){return this.privParticipantsPayloadResponse.muteAll}get type(){return this.privParticipantsPayloadResponse.type}static fromJSON(e){return new ng(e)}}Ur.ParticipantsListPayloadResponse=ng;class rg{constructor(e){this.privParticipantPayloadResponse=JO(e)}get nickname(){return this.privParticipantPayloadResponse.nickname}get locale(){return this.privParticipantPayloadResponse.locale}get usetts(){return this.privParticipantPayloadResponse.usetts}get ismuted(){return this.privParticipantPayloadResponse.ismuted}get ishost(){return this.privParticipantPayloadResponse.ishost}get participantId(){return this.privParticipantPayloadResponse.participantId}get avatar(){return this.privParticipantPayloadResponse.avatar}static fromJSON(e){return new rg(e)}}Ur.ParticipantPayloadResponse=rg;var Nr={};Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.TextResponsePayload=Nr.SpeechResponsePayload=void 0;const HO=t=>JSON.parse(t),qO=t=>JSON.parse(t);class og{constructor(e){this.privSpeechResponse=HO(e)}get recognition(){return this.privSpeechResponse.recognition}get translations(){return this.privSpeechResponse.translations}get id(){return this.privSpeechResponse.id}get language(){return this.privSpeechResponse.language}get nickname(){return this.privSpeechResponse.nickname}get participantId(){return this.privSpeechResponse.participantId}get roomid(){return this.privSpeechResponse.roomid}get timestamp(){return this.privSpeechResponse.timestamp}get type(){return this.privSpeechResponse.type}get isFinal(){return this.privSpeechResponse.type==="final"}static fromJSON(e){return new og(e)}}Nr.SpeechResponsePayload=og;class sg{constructor(e){this.privTextResponse=qO(e)}get originalText(){return this.privTextResponse.originalText}get translations(){return this.privTextResponse.translations}get id(){return this.privTextResponse.id}get language(){return this.privTextResponse.language}get nickname(){return this.privTextResponse.nickname}get participantId(){return this.privTextResponse.participantId}get roomid(){return this.privTextResponse.roomid}get timestamp(){return this.privTextResponse.timestamp}get type(){return this.privTextResponse.type}static fromJSON(e){return new sg(e)}}Nr.TextResponsePayload=sg,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TextResponsePayload=t.SpeechResponsePayload=t.ParticipantPayloadResponse=t.ParticipantsListPayloadResponse=t.CommandResponsePayload=void 0;var e=zc;Object.defineProperty(t,"CommandResponsePayload",{enumerable:!0,get:function(){return e.CommandResponsePayload}});var i=Ur;Object.defineProperty(t,"ParticipantsListPayloadResponse",{enumerable:!0,get:function(){return i.ParticipantsListPayloadResponse}}),Object.defineProperty(t,"ParticipantPayloadResponse",{enumerable:!0,get:function(){return i.ParticipantPayloadResponse}});var n=Nr;Object.defineProperty(t,"SpeechResponsePayload",{enumerable:!0,get:function(){return n.SpeechResponsePayload}}),Object.defineProperty(t,"TextResponsePayload",{enumerable:!0,get:function(){return n.TextResponsePayload}})}(pS);var dS;function VO(){if(dS)return lA;dS=1,Object.defineProperty(lA,"__esModule",{value:!0}),lA.ConversationServiceAdapter=void 0;const t=ge(),e=V(),i=oe(),n=uA,o=Yc,s=IS(),A=xi,r=pS;let a=class extends i.ServiceRecognizerBase{constructor(u,l,g,E,C){super(u,l,g,E,C),this.privConnectionConfigPromise=void 0,this.privLastPartialUtteranceId="",this.privConversationServiceConnector=C,this.privConversationAuthentication=u,this.receiveMessageOverride=()=>this.receiveConversationMessageOverride(),this.recognizeOverride=()=>this.noOp(),this.postConnectImplOverride=d=>this.conversationConnectImpl(d),this.configConnectionOverride=()=>this.configConnection(),this.disconnectOverride=()=>this.privDisconnect(),this.privConversationRequestSession=new o.ConversationRequestSession((0,t.createNoDashGuid)()),this.privConversationConnectionFactory=l,this.privConversationIsDisposed=!1}isDisposed(){return super.isDisposed()||this.privConversationIsDisposed}async dispose(u){this.privConversationIsDisposed=!0,this.privConnectionConfigPromise!==void 0&&await(await this.privConnectionConfigPromise).dispose(u),await super.dispose(u)}async sendMessage(u){return(await this.fetchConnection()).send(new n.ConversationConnectionMessage(t.MessageType.Text,u))}async sendMessageAsync(u){await(await this.fetchConnection()).send(new n.ConversationConnectionMessage(t.MessageType.Text,u))}privDisconnect(){if(!this.terminateMessageLoop)return this.cancelRecognition(this.privConversationRequestSession.sessionId,this.privConversationRequestSession.requestId,e.CancellationReason.Error,e.CancellationErrorCode.NoError,"Disconnecting"),this.terminateMessageLoop=!0,Promise.resolve()}async processTypeSpecificMessages(){return!0}cancelRecognition(u,l,g,E,C){this.terminateMessageLoop=!0;const d=new e.ConversationTranslationCanceledEventArgs(g,C,E,void 0,u);try{this.privConversationServiceConnector.canceled&&this.privConversationServiceConnector.canceled(this.privConversationServiceConnector,d)}catch{}}async conversationConnectImpl(u){return this.privConnectionLoop=this.startMessageLoop(),u}async receiveConversationMessageOverride(){if(this.isDisposed()||this.terminateMessageLoop)return Promise.resolve();const u=new t.Deferred;try{const g=await(await this.fetchConnection()).read();if(this.isDisposed()||this.terminateMessageLoop)return u.resolve(),Promise.resolve();if(!g)return this.receiveConversationMessageOverride();const E=this.privConversationRequestSession.sessionId,C=g.conversationMessageType.toLowerCase();let d=!1;try{switch(C){case"info":case"participant_command":case"command":const S=r.CommandResponsePayload.fromJSON(g.textBody);switch(S.command.toLowerCase()){case"participantlist":const L=r.ParticipantsListPayloadResponse.fromJSON(g.textBody),O=L.participants.map($=>({avatar:$.avatar,displayName:$.nickname,id:$.participantId,isHost:$.ishost,isMuted:$.ismuted,isUsingTts:$.usetts,preferredLanguage:$.locale}));this.privConversationServiceConnector.participantsListReceived&&this.privConversationServiceConnector.participantsListReceived(this.privConversationServiceConnector,new s.ParticipantsListEventArgs(L.roomid,L.token,L.translateTo,L.profanityFilter,L.roomProfanityFilter,L.roomLocked,L.muteAll,O,E));break;case"settranslatetolanguages":this.privConversationServiceConnector.participantUpdateCommandReceived&&this.privConversationServiceConnector.participantUpdateCommandReceived(this.privConversationServiceConnector,new s.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.setTranslateToLanguages,S.value,E));break;case"setprofanityfiltering":this.privConversationServiceConnector.participantUpdateCommandReceived&&this.privConversationServiceConnector.participantUpdateCommandReceived(this.privConversationServiceConnector,new s.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.setProfanityFiltering,S.value,E));break;case"setmute":this.privConversationServiceConnector.participantUpdateCommandReceived&&this.privConversationServiceConnector.participantUpdateCommandReceived(this.privConversationServiceConnector,new s.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.setMute,S.value,E));break;case"setmuteall":this.privConversationServiceConnector.muteAllCommandReceived&&this.privConversationServiceConnector.muteAllCommandReceived(this.privConversationServiceConnector,new s.MuteAllEventArgs(S.value,E));break;case"roomexpirationwarning":this.privConversationServiceConnector.conversationExpiration&&this.privConversationServiceConnector.conversationExpiration(this.privConversationServiceConnector,new e.ConversationExpirationEventArgs(S.value,this.privConversationRequestSession.sessionId));break;case"setusetts":this.privConversationServiceConnector.participantUpdateCommandReceived&&this.privConversationServiceConnector.participantUpdateCommandReceived(this.privConversationServiceConnector,new s.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.setUseTTS,S.value,E));break;case"setlockstate":this.privConversationServiceConnector.lockRoomCommandReceived&&this.privConversationServiceConnector.lockRoomCommandReceived(this.privConversationServiceConnector,new s.LockRoomEventArgs(S.value,E));break;case"changenickname":this.privConversationServiceConnector.participantUpdateCommandReceived&&this.privConversationServiceConnector.participantUpdateCommandReceived(this.privConversationServiceConnector,new s.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.changeNickname,S.value,E));break;case"joinsession":const R=r.ParticipantPayloadResponse.fromJSON(g.textBody),k={avatar:R.avatar,displayName:R.nickname,id:R.participantId,isHost:R.ishost,isMuted:R.ismuted,isUsingTts:R.usetts,preferredLanguage:R.locale};this.privConversationServiceConnector.participantJoinCommandReceived&&this.privConversationServiceConnector.participantJoinCommandReceived(this.privConversationServiceConnector,new s.ParticipantEventArgs(k,E));break;case"leavesession":const Y={id:S.participantId};this.privConversationServiceConnector.participantLeaveCommandReceived&&this.privConversationServiceConnector.participantLeaveCommandReceived(this.privConversationServiceConnector,new s.ParticipantEventArgs(Y,E));break;case"disconnectsession":const G={id:S.participantId};break;case"token":const F=new i.CognitiveTokenAuthentication(()=>{const $=S.token;return Promise.resolve($)},()=>{const $=S.token;return Promise.resolve($)});this.authentication=F,this.privConversationServiceConnector.onToken(F);break;default:break}break;case"partial":case"final":const I=r.SpeechResponsePayload.fromJSON(g.textBody),p=C==="final"?e.ResultReason.TranslatedParticipantSpeech:e.ResultReason.TranslatingParticipantSpeech,M=new e.ConversationTranslationResult(I.participantId,this.getTranslations(I.translations),I.language,I.id,p,I.recognition,void 0,void 0,g.textBody,void 0);I.isFinal?((M.text!==void 0&&M.text.length>0||I.id===this.privLastPartialUtteranceId)&&(d=!0),d&&this.privConversationServiceConnector.translationReceived&&this.privConversationServiceConnector.translationReceived(this.privConversationServiceConnector,new s.ConversationReceivedTranslationEventArgs(A.ConversationTranslatorMessageTypes.final,M,E))):M.text!==void 0&&(this.privLastPartialUtteranceId=I.id,this.privConversationServiceConnector.translationReceived&&this.privConversationServiceConnector.translationReceived(this.privConversationServiceConnector,new s.ConversationReceivedTranslationEventArgs(A.ConversationTranslatorMessageTypes.partial,M,E)));break;case"translated_message":const B=r.TextResponsePayload.fromJSON(g.textBody),T=new e.ConversationTranslationResult(B.participantId,this.getTranslations(B.translations),B.language,void 0,void 0,B.originalText,void 0,void 0,void 0,g.textBody,void 0);this.privConversationServiceConnector.translationReceived&&this.privConversationServiceConnector.translationReceived(this.privConversationServiceConnector,new s.ConversationReceivedTranslationEventArgs(A.ConversationTranslatorMessageTypes.instantMessage,T,E));break;default:break}}catch{}return this.receiveConversationMessageOverride()}catch{this.terminateMessageLoop=!0}return u.promise}async startMessageLoop(){if(this.isDisposed())return Promise.resolve();this.terminateMessageLoop=!1;const u=this.receiveConversationMessageOverride();try{return await u}catch(l){return this.cancelRecognition(this.privRequestSession?this.privRequestSession.sessionId:"",this.privRequestSession?this.privRequestSession.requestId:"",e.CancellationReason.Error,e.CancellationErrorCode.RuntimeError,l),null}}configConnection(){return this.isDisposed()?Promise.resolve(void 0):this.privConnectionConfigPromise!==void 0?this.privConnectionConfigPromise.then(u=>u.state()===t.ConnectionState.Disconnected?(this.privConnectionId=null,this.privConnectionConfigPromise=void 0,this.configConnection()):this.privConnectionConfigPromise,()=>(this.privConnectionId=null,this.privConnectionConfigPromise=void 0,this.configConnection())):this.terminateMessageLoop?Promise.resolve(void 0):(this.privConnectionConfigPromise=this.connectImpl().then(u=>u),this.privConnectionConfigPromise)}getTranslations(u){let l;if(u!==void 0){l=new e.Translations;for(const g of u)l.set(g.lang,g.translation)}return l}};return lA.ConversationServiceAdapter=a,lA}var SS;function WO(){if(SS)return qn;SS=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.ConversationTranslatorRecognizer=qn.ConversationRecognizerFactory=void 0;const t=oe(),e=ge(),i=Ie,n=V(),o=jO(),s=VO();class A{static fromConfig(c,u,l){return new r(c,u,l)}}qn.ConversationRecognizerFactory=A;let r=class extends n.Recognizer{constructor(c,u,l){const g=u;i.Contracts.throwIfNull(g,"speechConfig");const E=c;i.Contracts.throwIfNull(E,"conversationImpl"),super(l,g.properties,new o.ConversationConnectionFactory),this.privConversation=E,this.privIsDisposed=!1,this.privProperties=g.properties.clone(),this.privConnection=n.Connection.fromRecognizer(this),this.privProperties.getProperty(n.PropertyId.WebWorkerLoadType,"on").toLowerCase()==="on"&&typeof Blob<"u"&&typeof Worker<"u"?(this.privSetTimeout=e.Timeout.setTimeout,this.privClearTimeout=e.Timeout.clearTimeout):typeof window<"u"?(this.privSetTimeout=window.setTimeout.bind(window),this.privClearTimeout=window.clearTimeout.bind(window)):(this.privSetTimeout=setTimeout,this.privClearTimeout=clearTimeout)}set connected(c){this.privConnection.connected=c}set disconnected(c){this.privConnection.disconnected=c}get speechRecognitionLanguage(){return this.privSpeechRecognitionLanguage}get properties(){return this.privProperties}isDisposed(){return this.privIsDisposed}connect(c,u,l){try{i.Contracts.throwIfDisposed(this.privIsDisposed),i.Contracts.throwIfNullOrWhitespace(c,"token"),this.privReco.conversationTranslatorToken=c,this.resetConversationTimeout(),this.privReco.connectAsync(u,l)}catch(g){if(l)if(g instanceof Error){const E=g;l(E.name+": "+E.message)}else l(g)}}disconnect(c,u){try{i.Contracts.throwIfDisposed(this.privIsDisposed),this.privTimeoutToken!==void 0&&this.privClearTimeout(this.privTimeoutToken),this.privReco.disconnect().then(()=>{c&&c()},l=>{u&&u(l)})}catch(l){if(u)if(l instanceof Error){const g=l;u(g.name+": "+g.message)}else u(l);this.dispose(!0).catch(g=>{e.Events.instance.onEvent(new e.BackgroundEvent(g))})}}sendRequest(c,u,l){try{i.Contracts.throwIfDisposed(this.privIsDisposed),this.sendMessage(c,u,l)}catch(g){if(l)if(g instanceof Error){const E=g;l(E.name+": "+E.message)}else l(g);this.dispose(!0).catch(E=>{e.Events.instance.onEvent(new e.BackgroundEvent(E))})}}onToken(c){this.privConversation.onToken(c)}async close(){this.privIsDisposed||(this.privConnection&&(this.privConnection.closeConnection(),this.privConnection.close()),this.privConnection=void 0,await this.dispose(!0))}async dispose(c){this.privIsDisposed||c&&(this.privTimeoutToken!==void 0&&this.privClearTimeout(this.privTimeoutToken),this.privIsDisposed=!0,this.privConnection&&(this.privConnection.closeConnection(),this.privConnection.close(),this.privConnection=void 0),await super.dispose(c))}createRecognizerConfig(c){return new t.RecognizerConfig(c,this.privProperties)}createServiceRecognizer(c,u,l,g){const E=l;return new s.ConversationServiceAdapter(c,u,E,g,this)}sendMessage(c,u,l){const g=this.privReco;((C,d,S)=>{C!==void 0?C.then(()=>{try{d&&d()}catch(I){S&&S(`'Unhandled error on promise callback: ${I}'`)}},I=>{try{S&&S(I)}catch{}}):S&&S("Null promise")})(g.sendMessageAsync(c),u,l),this.resetConversationTimeout()}resetConversationTimeout(){this.privTimeoutToken!==void 0&&this.privClearTimeout(this.privTimeoutToken),this.privTimeoutToken=this.privSetTimeout(()=>{this.sendRequest(this.privConversation.getKeepAlive())},6e4)}};return qn.ConversationTranslatorRecognizer=r,qn}var gA={},MS;function ZO(){if(MS)return gA;MS=1,Object.defineProperty(gA,"__esModule",{value:!0}),gA.TranscriberRecognizer=void 0;const t=ge(),e=Ie,i=V(),n=oe(),o=Jt;let s=class extends i.Recognizer{constructor(r,a){const c=r;e.Contracts.throwIfNull(c,"speechTranslationConfig");const u=a;e.Contracts.throwIfNull(u,"audioConfigImpl"),e.Contracts.throwIfNullOrWhitespace(c.speechRecognitionLanguage,i.PropertyId[i.PropertyId.SpeechServiceConnection_RecoLanguage]),super(a,c.properties,new n.TranscriberConnectionFactory),this.privDisposedRecognizer=!1,this.isMeetingRecognizer=!1}get speechRecognitionLanguage(){return e.Contracts.throwIfDisposed(this.privDisposedRecognizer),this.properties.getProperty(i.PropertyId.SpeechServiceConnection_RecoLanguage)}get properties(){return this.privProperties}get authorizationToken(){return this.properties.getProperty(i.PropertyId.SpeechServiceAuthorization_Token)}set authorizationToken(r){e.Contracts.throwIfNullOrWhitespace(r,"token"),this.properties.setProperty(i.PropertyId.SpeechServiceAuthorization_Token,r)}set conversation(r){e.Contracts.throwIfNullOrUndefined(r,"Conversation"),this.isMeetingRecognizer=!1,this.privConversation=r}getConversationInfo(){return e.Contracts.throwIfNullOrUndefined(this.privConversation,"Conversation"),this.privConversation.conversationInfo}set meeting(r){e.Contracts.throwIfNullOrUndefined(r,"Meeting"),this.isMeetingRecognizer=!0,this.privMeeting=r}getMeetingInfo(){return e.Contracts.throwIfNullOrUndefined(this.privMeeting,"Meeting"),this.privMeeting.meetingInfo}IsMeetingRecognizer(){return this.isMeetingRecognizer}startContinuousRecognitionAsync(r,a){(0,t.marshalPromiseToCallbacks)(this.startContinuousRecognitionAsyncImpl(o.RecognitionMode.Conversation),r,a)}stopContinuousRecognitionAsync(r,a){(0,t.marshalPromiseToCallbacks)(this.stopContinuousRecognitionAsyncImpl(),r,a)}async close(){this.privDisposedRecognizer||await this.dispose(!0)}async pushConversationEvent(r,a){const c=this.privReco;e.Contracts.throwIfNullOrUndefined(c,"serviceRecognizer"),await c.sendSpeechEventAsync(r,a)}async pushMeetingEvent(r,a){const c=this.privReco;e.Contracts.throwIfNullOrUndefined(c,"serviceRecognizer"),await c.sendMeetingSpeechEventAsync(r,a)}async enforceAudioGating(){const c=(await this.audioConfig.format).channels;if(c===1){if(this.properties.getProperty("f0f5debc-f8c9-4892-ac4b-90a7ab359fd2","false").toLowerCase()!=="true")throw new Error("Single channel audio configuration for MeetingTranscriber is currently under private preview, please contact diarizationrequest@microsoft.com for more details")}else if(c!==8)throw new Error(`Unsupported audio configuration: Detected ${c}-channel audio`)}connectMeetingCallbacks(r){this.isMeetingRecognizer=!0,this.canceled=(a,c)=>{r.canceled&&r.canceled(r,c)},this.recognizing=(a,c)=>{r.transcribing&&r.transcribing(r,c)},this.recognized=(a,c)=>{r.transcribed&&r.transcribed(r,c)},this.sessionStarted=(a,c)=>{r.sessionStarted&&r.sessionStarted(r,c)},this.sessionStopped=(a,c)=>{r.sessionStopped&&r.sessionStopped(r,c)}}disconnectCallbacks(){this.canceled=void 0,this.recognizing=void 0,this.recognized=void 0,this.sessionStarted=void 0,this.sessionStopped=void 0}async dispose(r){this.privDisposedRecognizer||(r&&(this.privDisposedRecognizer=!0,await this.implRecognizerStop()),await super.dispose(r))}createRecognizerConfig(r){return new n.RecognizerConfig(r,this.properties)}createServiceRecognizer(r,a,c,u){const l=c;return new n.TranscriptionServiceRecognizer(r,a,l,u,this)}};return gA.TranscriberRecognizer=s,gA}var BS;function XO(){return BS||(BS=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InternalParticipants=t.ConversationTranslatorMessageTypes=t.ConversationTranslatorCommandTypes=t.ParticipantsListEventArgs=t.ParticipantEventArgs=t.ParticipantAttributeEventArgs=t.MuteAllEventArgs=t.LockRoomEventArgs=t.ConversationReceivedTranslationEventArgs=t.TranscriberRecognizer=t.ConversationRecognizerFactory=t.ConversationConnectionConfig=t.ConversationManager=void 0;var e=FO();Object.defineProperty(t,"ConversationManager",{enumerable:!0,get:function(){return e.ConversationManager}});var i=Or;Object.defineProperty(t,"ConversationConnectionConfig",{enumerable:!0,get:function(){return i.ConversationConnectionConfig}});var n=WO();Object.defineProperty(t,"ConversationRecognizerFactory",{enumerable:!0,get:function(){return n.ConversationRecognizerFactory}});var o=ZO();Object.defineProperty(t,"TranscriberRecognizer",{enumerable:!0,get:function(){return o.TranscriberRecognizer}});var s=IS();Object.defineProperty(t,"ConversationReceivedTranslationEventArgs",{enumerable:!0,get:function(){return s.ConversationReceivedTranslationEventArgs}}),Object.defineProperty(t,"LockRoomEventArgs",{enumerable:!0,get:function(){return s.LockRoomEventArgs}}),Object.defineProperty(t,"MuteAllEventArgs",{enumerable:!0,get:function(){return s.MuteAllEventArgs}}),Object.defineProperty(t,"ParticipantAttributeEventArgs",{enumerable:!0,get:function(){return s.ParticipantAttributeEventArgs}}),Object.defineProperty(t,"ParticipantEventArgs",{enumerable:!0,get:function(){return s.ParticipantEventArgs}}),Object.defineProperty(t,"ParticipantsListEventArgs",{enumerable:!0,get:function(){return s.ParticipantsListEventArgs}});var A=xi;Object.defineProperty(t,"ConversationTranslatorCommandTypes",{enumerable:!0,get:function(){return A.ConversationTranslatorCommandTypes}}),Object.defineProperty(t,"ConversationTranslatorMessageTypes",{enumerable:!0,get:function(){return A.ConversationTranslatorMessageTypes}}),Object.defineProperty(t,"InternalParticipants",{enumerable:!0,get:function(){return A.InternalParticipants}})}(eg)),eg}var Ag={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SynthesisAudioMetadata=t.MetadataType=void 0,function(i){i.WordBoundary="WordBoundary",i.Bookmark="Bookmark",i.Viseme="Viseme",i.SentenceBoundary="SentenceBoundary",i.SessionEnd="SessionEnd",i.AvatarSignal="TalkingAvatarSignal"}(t.MetadataType||(t.MetadataType={}));class e{constructor(n){this.privSynthesisAudioMetadata=JSON.parse(n)}static fromJSON(n){return new e(n)}get Metadata(){return this.privSynthesisAudioMetadata.Metadata}}t.SynthesisAudioMetadata=e})(Ag);var EA={},Si={};Object.defineProperty(Si,"__esModule",{value:!0}),Si.SynthesisStartedEvent=Si.ConnectingToSynthesisServiceEvent=Si.SynthesisTriggeredEvent=Si.SpeechSynthesisEvent=void 0;const vS=ge();class Pc extends vS.PlatformEvent{constructor(e,i,n=vS.EventType.Info){super(e,n),this.privRequestId=i}get requestId(){return this.privRequestId}}Si.SpeechSynthesisEvent=Pc;class _O extends Pc{constructor(e,i,n){super("SynthesisTriggeredEvent",e),this.privSessionAudioDestinationId=i,this.privTurnAudioDestinationId=n}get audioSessionDestinationId(){return this.privSessionAudioDestinationId}get audioTurnDestinationId(){return this.privTurnAudioDestinationId}}Si.SynthesisTriggeredEvent=_O;class $O extends Pc{constructor(e,i){super("ConnectingToSynthesisServiceEvent",e),this.privAuthFetchEventId=i}get authFetchEventId(){return this.privAuthFetchEventId}}Si.ConnectingToSynthesisServiceEvent=$O;class eU extends Pc{constructor(e,i){super("SynthesisStartedEvent",e),this.privAuthFetchEventId=i}get authFetchEventId(){return this.privAuthFetchEventId}}Si.SynthesisStartedEvent=eU;var fS;function tU(){if(fS)return EA;fS=1,Object.defineProperty(EA,"__esModule",{value:!0}),EA.SynthesisTurn=void 0;const t=ge(),e=vt,i=V(),n=Ag,o=Si;let s=class Og{constructor(){this.privIsDisposed=!1,this.privIsSynthesizing=!1,this.privIsSynthesisEnded=!1,this.privBytesReceived=0,this.privInTurn=!1,this.privTextOffset=0,this.privNextSearchTextIndex=0,this.privSentenceOffset=0,this.privNextSearchSentenceIndex=0,this.privRequestId=(0,t.createNoDashGuid)(),this.privTurnDeferral=new t.Deferred,this.privTurnDeferral.resolve()}get requestId(){return this.privRequestId}get streamId(){return this.privStreamId}set streamId(r){this.privStreamId=r}get audioOutputFormat(){return this.privAudioOutputFormat}set audioOutputFormat(r){this.privAudioOutputFormat=r}get turnCompletionPromise(){return this.privTurnDeferral.promise}get isSynthesisEnded(){return this.privIsSynthesisEnded}get isSynthesizing(){return this.privIsSynthesizing}get currentTextOffset(){return this.privTextOffset}get currentSentenceOffset(){return this.privSentenceOffset}get bytesReceived(){return this.privBytesReceived}get audioDuration(){return this.privAudioDuration}get extraProperties(){if(this.privWebRTCSDP){const r=new i.PropertyCollection;return r.setProperty(i.PropertyId.TalkingAvatarService_WebRTC_SDP,this.privWebRTCSDP),r}}async getAllReceivedAudio(){return this.privReceivedAudio?Promise.resolve(this.privReceivedAudio):this.privIsSynthesisEnded?(await this.readAllAudioFromStream(),Promise.resolve(this.privReceivedAudio)):null}async getAllReceivedAudioWithHeader(){if(this.privReceivedAudioWithHeader)return this.privReceivedAudioWithHeader;if(!this.privIsSynthesisEnded)return null;if(this.audioOutputFormat.hasHeader){const r=await this.getAllReceivedAudio();return this.privReceivedAudioWithHeader=this.audioOutputFormat.addHeader(r),this.privReceivedAudioWithHeader}else return this.getAllReceivedAudio()}startNewSynthesis(r,a,c,u){this.privIsSynthesisEnded=!1,this.privIsSynthesizing=!0,this.privRequestId=r,this.privRawText=a,this.privIsSSML=c,this.privAudioOutputStream=new e.PullAudioOutputStreamImpl,this.privAudioOutputStream.format=this.privAudioOutputFormat,this.privReceivedAudio=null,this.privReceivedAudioWithHeader=null,this.privBytesReceived=0,this.privTextOffset=0,this.privNextSearchTextIndex=0,this.privSentenceOffset=0,this.privNextSearchSentenceIndex=0,this.privPartialVisemeAnimation="",this.privWebRTCSDP="",u!==void 0&&(this.privTurnAudioDestination=u,this.privTurnAudioDestination.format=this.privAudioOutputFormat),this.onEvent(new o.SynthesisTriggeredEvent(this.requestId,void 0,u===void 0?void 0:u.id()))}onPreConnectionStart(r){this.privAuthFetchEventId=r,this.onEvent(new o.ConnectingToSynthesisServiceEvent(this.privRequestId,this.privAuthFetchEventId))}onAuthCompleted(r){r&&this.onComplete()}onConnectionEstablishCompleted(r){if(r===200){this.onEvent(new o.SynthesisStartedEvent(this.requestId,this.privAuthFetchEventId)),this.privBytesReceived=0;return}else r===403&&this.onComplete()}onServiceResponseMessage(r){const a=JSON.parse(r);this.streamId=a.audio.streamId}onServiceTurnEndResponse(){this.privInTurn=!1,this.privTurnDeferral.resolve(),this.onComplete()}onServiceTurnStartResponse(r){this.privTurnDeferral&&this.privInTurn&&(this.privTurnDeferral.reject("Another turn started before current completed."),this.privTurnDeferral.promise.then().catch(()=>{})),this.privInTurn=!0,this.privTurnDeferral=new t.Deferred;const a=JSON.parse(r);a.webrtc&&(this.privWebRTCSDP=a.webrtc.connectionString)}onAudioChunkReceived(r){this.isSynthesizing&&(this.privAudioOutputStream.write(r),this.privBytesReceived+=r.byteLength,this.privTurnAudioDestination!==void 0&&this.privTurnAudioDestination.write(r))}onTextBoundaryEvent(r){this.updateTextOffset(r.Data.text.Text,r.Type)}onVisemeMetadataReceived(r){r.Data.AnimationChunk!==void 0&&(this.privPartialVisemeAnimation+=r.Data.AnimationChunk)}onSessionEnd(r){this.privAudioDuration=r.Data.Offset}async constructSynthesisResult(){const r=await this.getAllReceivedAudioWithHeader();return new i.SpeechSynthesisResult(this.requestId,i.ResultReason.SynthesizingAudioCompleted,r,void 0,this.extraProperties,this.audioDuration)}dispose(){this.privIsDisposed||(this.privIsDisposed=!0)}onStopSynthesizing(){this.onComplete()}getAndClearVisemeAnimation(){const r=this.privPartialVisemeAnimation;return this.privPartialVisemeAnimation="",r}onEvent(r){t.Events.instance.onEvent(r)}static isXmlTag(r){return r.length>=2&&r[0]==="<"&&r[r.length-1]===">"}updateTextOffset(r,a){a===n.MetadataType.WordBoundary?(this.privTextOffset=this.privRawText.indexOf(r,this.privNextSearchTextIndex),this.privTextOffset>=0&&(this.privNextSearchTextIndex=this.privTextOffset+r.length,this.privIsSSML&&this.withinXmlTag(this.privTextOffset)&&!Og.isXmlTag(r)&&this.updateTextOffset(r,a))):(this.privSentenceOffset=this.privRawText.indexOf(r,this.privNextSearchSentenceIndex),this.privSentenceOffset>=0&&(this.privNextSearchSentenceIndex=this.privSentenceOffset+r.length,this.privIsSSML&&this.withinXmlTag(this.privSentenceOffset)&&!Og.isXmlTag(r)&&this.updateTextOffset(r,a)))}onComplete(){this.privIsSynthesizing&&(this.privIsSynthesizing=!1,this.privIsSynthesisEnded=!0,this.privAudioOutputStream.close(),this.privInTurn=!1,this.privTurnAudioDestination!==void 0&&(this.privTurnAudioDestination.close(),this.privTurnAudioDestination=void 0))}async readAllAudioFromStream(){if(this.privIsSynthesisEnded){this.privReceivedAudio=new ArrayBuffer(this.bytesReceived);try{await this.privAudioOutputStream.read(this.privReceivedAudio)}catch{this.privReceivedAudio=new ArrayBuffer(0)}}}withinXmlTag(r){return this.privRawText.indexOf("<",r+1)>this.privRawText.indexOf(">",r+1)}};return EA.SynthesisTurn=s,EA}var hA={},wS;function iU(){if(wS)return hA;wS=1,Object.defineProperty(hA,"__esModule",{value:!0}),hA.SynthesisAdapterBase=void 0;const t=ge(),e=V(),i=oe(),n=Ki;let o=class{constructor(A,r,a,c){if(this.speakOverride=void 0,this.receiveMessageOverride=void 0,this.connectImplOverride=void 0,this.configConnectionOverride=void 0,this.privConnectionConfigurationPromise=void 0,!A)throw new t.ArgumentNullError("authentication");if(!r)throw new t.ArgumentNullError("connectionFactory");if(!a)throw new t.ArgumentNullError("synthesizerConfig");this.privAuthentication=A,this.privConnectionFactory=r,this.privSynthesizerConfig=a,this.privIsDisposed=!1,this.privSessionAudioDestination=c,this.privSynthesisTurn=new i.SynthesisTurn,this.privConnectionEvents=new t.EventSource,this.privServiceEvents=new t.EventSource,this.privSynthesisContext=new i.SynthesisContext,this.privAgentConfig=new i.AgentConfig,this.connectionEvents.attach(u=>{if(u.name==="ConnectionClosedEvent"){const l=u;l.statusCode!==1e3&&this.cancelSynthesisLocal(e.CancellationReason.Error,l.statusCode===1007?e.CancellationErrorCode.BadRequestParameters:e.CancellationErrorCode.ConnectionFailure,`${l.reason} websocket error code: ${l.statusCode}`)}})}get synthesisContext(){return this.privSynthesisContext}get agentConfig(){return this.privAgentConfig}get connectionEvents(){return this.privConnectionEvents}get serviceEvents(){return this.privServiceEvents}set activityTemplate(A){this.privActivityTemplate=A}get activityTemplate(){return this.privActivityTemplate}set audioOutputFormat(A){this.privAudioOutputFormat=A,this.privSynthesisTurn.audioOutputFormat=A,this.privSessionAudioDestination!==void 0&&(this.privSessionAudioDestination.format=A),this.synthesisContext!==void 0&&(this.synthesisContext.audioOutputFormat=A)}isDisposed(){return this.privIsDisposed}async dispose(A){this.privIsDisposed=!0,this.privSessionAudioDestination!==void 0&&this.privSessionAudioDestination.close(),this.privConnectionConfigurationPromise!==void 0&&await(await this.privConnectionConfigurationPromise).dispose(A)}async connect(){await this.connectImpl()}async sendNetworkMessage(A,r){const a=typeof r=="string"?t.MessageType.Text:t.MessageType.Binary,c=typeof r=="string"?"application/json":"";return(await this.fetchConnection()).send(new n.SpeechConnectionMessage(a,A,this.privSynthesisTurn.requestId,c,r))}async Speak(A,r,a,c,u,l){let g;if(r?g=A:g=this.privSynthesizer.buildSsml(A),this.speakOverride!==void 0)return this.speakOverride(g,a,c,u);this.privSuccessCallback=c,this.privErrorCallback=u,this.privSynthesisTurn.startNewSynthesis(a,A,r,l);try{await this.connectImpl();const E=await this.fetchConnection();await this.sendSynthesisContext(E),await this.sendSsmlMessage(E,g,a),this.onSynthesisStarted(a),this.receiveMessage()}catch(E){return this.cancelSynthesisLocal(e.CancellationReason.Error,e.CancellationErrorCode.ConnectionFailure,E),Promise.reject(E)}}async stopSpeaking(){return await this.connectImpl(),(await this.fetchConnection()).send(new n.SpeechConnectionMessage(t.MessageType.Text,"synthesis.control",this.privSynthesisTurn.requestId,"application/json",JSON.stringify({action:"stop"})))}cancelSynthesis(A,r,a,c){const u=new e.PropertyCollection;u.setProperty(i.CancellationErrorCodePropertyName,e.CancellationErrorCode[a]);const l=new e.SpeechSynthesisResult(A,e.ResultReason.Canceled,void 0,c,u);if(this.onSynthesisCancelled(l),this.privSuccessCallback)try{this.privSuccessCallback(l)}catch{}}cancelSynthesisLocal(A,r,a){this.privSynthesisTurn.isSynthesizing&&(this.privSynthesisTurn.onStopSynthesizing(),this.cancelSynthesis(this.privSynthesisTurn.requestId,A,r,a))}processTypeSpecificMessages(A){return!0}async receiveMessage(){try{const r=await(await this.fetchConnection()).read();if(this.receiveMessageOverride!==void 0)return this.receiveMessageOverride();if(this.privIsDisposed)return;if(!r)return this.privSynthesisTurn.isSynthesizing?this.receiveMessage():void 0;const a=n.SpeechConnectionMessage.fromConnectionMessage(r);if(a.requestId.toLowerCase()===this.privSynthesisTurn.requestId.toLowerCase())switch(a.path.toLowerCase()){case"turn.start":this.privSynthesisTurn.onServiceTurnStartResponse(a.textBody);break;case"response":this.privSynthesisTurn.onServiceResponseMessage(a.textBody);break;case"audio":this.privSynthesisTurn.streamId.toLowerCase()===a.streamId.toLowerCase()&&a.binaryBody&&(this.privSynthesisTurn.onAudioChunkReceived(a.binaryBody),this.onSynthesizing(a.binaryBody),this.privSessionAudioDestination!==void 0&&this.privSessionAudioDestination.write(a.binaryBody));break;case"audio.metadata":const c=i.SynthesisAudioMetadata.fromJSON(a.textBody).Metadata;for(const l of c)switch(l.Type){case i.MetadataType.WordBoundary:case i.MetadataType.SentenceBoundary:this.privSynthesisTurn.onTextBoundaryEvent(l);const g=new e.SpeechSynthesisWordBoundaryEventArgs(l.Data.Offset,l.Data.Duration,l.Data.text.Text,l.Data.text.Length,l.Type===i.MetadataType.WordBoundary?this.privSynthesisTurn.currentTextOffset:this.privSynthesisTurn.currentSentenceOffset,l.Data.text.BoundaryType);this.onWordBoundary(g);break;case i.MetadataType.Bookmark:const E=new e.SpeechSynthesisBookmarkEventArgs(l.Data.Offset,l.Data.Bookmark);this.onBookmarkReached(E);break;case i.MetadataType.Viseme:if(this.privSynthesisTurn.onVisemeMetadataReceived(l),l.Data.IsLastAnimation){const C=new e.SpeechSynthesisVisemeEventArgs(l.Data.Offset,l.Data.VisemeId,this.privSynthesisTurn.getAndClearVisemeAnimation());this.onVisemeReceived(C)}break;case i.MetadataType.AvatarSignal:this.onAvatarEvent(l);break;case i.MetadataType.SessionEnd:this.privSynthesisTurn.onSessionEnd(l);break}break;case"turn.end":this.privSynthesisTurn.onServiceTurnEndResponse();let u;try{u=await this.privSynthesisTurn.constructSynthesisResult(),this.privSuccessCallback&&this.privSuccessCallback(u)}catch(l){this.privErrorCallback&&this.privErrorCallback(l)}this.onSynthesisCompleted(u);break;default:this.processTypeSpecificMessages(a)||this.privServiceEvents&&this.serviceEvents.onEvent(new t.ServiceEvent(a.path.toLowerCase(),a.textBody))}return this.receiveMessage()}catch{}}sendSynthesisContext(A){this.setSynthesisContextSynthesisSection();const r=this.synthesisContext.toJSON();if(r)return A.send(new n.SpeechConnectionMessage(t.MessageType.Text,"synthesis.context",this.privSynthesisTurn.requestId,"application/json",r))}setSpeechConfigSynthesisSection(){}connectImpl(A=!1){if(this.privConnectionPromise!=null)return this.privConnectionPromise.then(a=>a.state()===t.ConnectionState.Disconnected?(this.privConnectionId=null,this.privConnectionPromise=null,this.connectImpl()):this.privConnectionPromise,()=>(this.privConnectionId=null,this.privConnectionPromise=null,this.connectImpl()));this.privAuthFetchEventId=(0,t.createNoDashGuid)(),this.privConnectionId=(0,t.createNoDashGuid)(),this.privSynthesisTurn.onPreConnectionStart(this.privAuthFetchEventId);const r=A?this.privAuthentication.fetchOnExpiry(this.privAuthFetchEventId):this.privAuthentication.fetch(this.privAuthFetchEventId);return this.privConnectionPromise=r.then(async a=>{this.privSynthesisTurn.onAuthCompleted(!1);const c=await this.privConnectionFactory.create(this.privSynthesizerConfig,a,this.privConnectionId);c.events.attach(l=>{this.connectionEvents.onEvent(l)});const u=await c.open();return u.statusCode===200?(this.privSynthesisTurn.onConnectionEstablishCompleted(u.statusCode),Promise.resolve(c)):u.statusCode===403&&!A?this.connectImpl(!0):(this.privSynthesisTurn.onConnectionEstablishCompleted(u.statusCode),Promise.reject(`Unable to contact server. StatusCode: ${u.statusCode},
34
34
  ${this.privSynthesizerConfig.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Url)} Reason: ${u.reason}`))},a=>{throw this.privSynthesisTurn.onAuthCompleted(!0),new Error(a)}),this.privConnectionPromise.catch(()=>{}),this.privConnectionPromise}sendSpeechServiceConfig(A,r){if(r)return A.send(new n.SpeechConnectionMessage(t.MessageType.Text,"speech.config",this.privSynthesisTurn.requestId,"application/json",r))}sendSsmlMessage(A,r,a){return A.send(new n.SpeechConnectionMessage(t.MessageType.Text,"ssml",a,"application/ssml+xml",r))}async fetchConnection(){return this.privConnectionConfigurationPromise!==void 0?this.privConnectionConfigurationPromise.then(A=>A.state()===t.ConnectionState.Disconnected?(this.privConnectionId=null,this.privConnectionConfigurationPromise=void 0,this.fetchConnection()):this.privConnectionConfigurationPromise,()=>(this.privConnectionId=null,this.privConnectionConfigurationPromise=void 0,this.fetchConnection())):(this.privConnectionConfigurationPromise=this.configureConnection(),await this.privConnectionConfigurationPromise)}async configureConnection(){const A=await this.connectImpl();return this.configConnectionOverride!==void 0?this.configConnectionOverride(A):(this.setSpeechConfigSynthesisSection(),await this.sendSpeechServiceConfig(A,this.privSynthesizerConfig.SpeechServiceConfig.serialize()),A)}onAvatarEvent(A){}onSynthesisStarted(A){}onSynthesizing(A){}onSynthesisCancelled(A){}onSynthesisCompleted(A){}onWordBoundary(A){}onVisemeReceived(A){}onBookmarkReached(A){}};return hA.SynthesisAdapterBase=o,o.telemetryDataEnabled=!0,hA}var CA={},mS;function nU(){if(mS)return CA;mS=1,Object.defineProperty(CA,"__esModule",{value:!0}),CA.AvatarSynthesisAdapter=void 0;const t=V(),e=oe();let i=class extends e.SynthesisAdapterBase{constructor(o,s,A,r,a){super(o,s,A,void 0),this.privAvatarSynthesizer=r,this.privSynthesizer=r,this.privAvatarConfig=a}setSynthesisContextSynthesisSection(){this.privSynthesisContext.setSynthesisSection(void 0)}setSpeechConfigSynthesisSection(){var o,s,A,r,a,c,u,l,g,E,C,d,S,I,p,M,B;this.privSynthesizerConfig.synthesisVideoSection={format:{bitrate:(o=this.privAvatarConfig.videoFormat)==null?void 0:o.bitrate,codec:(s=this.privAvatarConfig.videoFormat)==null?void 0:s.codec,crop:{bottomRight:{x:(a=(r=(A=this.privAvatarConfig.videoFormat)==null?void 0:A.cropRange)==null?void 0:r.bottomRight)==null?void 0:a.x,y:(l=(u=(c=this.privAvatarConfig.videoFormat)==null?void 0:c.cropRange)==null?void 0:u.bottomRight)==null?void 0:l.y},topLeft:{x:(C=(E=(g=this.privAvatarConfig.videoFormat)==null?void 0:g.cropRange)==null?void 0:E.topLeft)==null?void 0:C.x,y:(I=(S=(d=this.privAvatarConfig.videoFormat)==null?void 0:d.cropRange)==null?void 0:S.topLeft)==null?void 0:I.y}},resolution:{height:(p=this.privAvatarConfig.videoFormat)==null?void 0:p.height,width:(M=this.privAvatarConfig.videoFormat)==null?void 0:M.width}},protocol:{name:"WebRTC",webrtcConfig:{clientDescription:btoa(this.privSynthesizerConfig.parameters.getProperty(t.PropertyId.TalkingAvatarService_WebRTC_SDP)),iceServers:this.privAvatarConfig.remoteIceServers??this.privAvatarSynthesizer.iceServers}},talkingAvatar:{background:{color:this.privAvatarConfig.backgroundColor,image:{url:(B=this.privAvatarConfig.backgroundImage)==null?void 0:B.toString()}},character:this.privAvatarConfig.character,customized:this.privAvatarConfig.customized,style:this.privAvatarConfig.style,useBuiltInVoice:this.privAvatarConfig.useBuiltInVoice}}}onAvatarEvent(o){if(this.privAvatarSynthesizer.avatarEventReceived){const s=new t.AvatarEventArgs(o.Data.Offset,o.Data.Name);try{this.privAvatarSynthesizer.avatarEventReceived(this.privAvatarSynthesizer,s)}catch{}}}};return CA.AvatarSynthesisAdapter=i,CA}var IA={},QS;function rU(){if(QS)return IA;QS=1,Object.defineProperty(IA,"__esModule",{value:!0}),IA.SpeechSynthesisAdapter=void 0;const t=V(),e=oe();let i=class extends e.SynthesisAdapterBase{constructor(o,s,A,r,a){super(o,s,A,a),this.privSpeechSynthesizer=r,this.privSynthesizer=r}setSynthesisContextSynthesisSection(){this.privSynthesisContext.setSynthesisSection(this.privSpeechSynthesizer)}onSynthesisStarted(o){const s=new t.SpeechSynthesisEventArgs(new t.SpeechSynthesisResult(o,t.ResultReason.SynthesizingAudioStarted));this.privSpeechSynthesizer.synthesisStarted&&this.privSpeechSynthesizer.synthesisStarted(this.privSpeechSynthesizer,s)}onSynthesizing(o){if(this.privSpeechSynthesizer.synthesizing)try{const s=this.privSynthesisTurn.audioOutputFormat.addHeader(o),A=new t.SpeechSynthesisEventArgs(new t.SpeechSynthesisResult(this.privSynthesisTurn.requestId,t.ResultReason.SynthesizingAudio,s));this.privSpeechSynthesizer.synthesizing(this.privSpeechSynthesizer,A)}catch{}}onSynthesisCancelled(o){if(this.privSpeechSynthesizer.SynthesisCanceled){const s=new t.SpeechSynthesisEventArgs(o);try{this.privSpeechSynthesizer.SynthesisCanceled(this.privSpeechSynthesizer,s)}catch{}}}onSynthesisCompleted(o){if(this.privSpeechSynthesizer.synthesisCompleted)try{this.privSpeechSynthesizer.synthesisCompleted(this.privSpeechSynthesizer,new t.SpeechSynthesisEventArgs(o))}catch{}}onWordBoundary(o){if(this.privSpeechSynthesizer.wordBoundary)try{this.privSpeechSynthesizer.wordBoundary(this.privSpeechSynthesizer,o)}catch{}}onVisemeReceived(o){if(this.privSpeechSynthesizer.visemeReceived)try{this.privSpeechSynthesizer.visemeReceived(this.privSpeechSynthesizer,o)}catch{}}onBookmarkReached(o){if(this.privSpeechSynthesizer.bookmarkReached)try{this.privSpeechSynthesizer.bookmarkReached(this.privSpeechSynthesizer,o)}catch{}}};return IA.SpeechSynthesisAdapter=i,IA}var pA={},RS;function oU(){if(RS)return pA;RS=1,Object.defineProperty(pA,"__esModule",{value:!0}),pA.SynthesisRestAdapter=void 0;const t=Ct(),e=V(),i=ui(),n=ht;let o=class{constructor(A,r){let a=A.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Endpoint,void 0);if(!a){const u=A.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Region,"westus"),l=i.ConnectionFactoryBase.getHostSuffix(u);a=A.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Host,`https://${u}.tts.speech${l}`)}this.privUri=`${a}/cognitiveservices/voices/list`;const c=t.RestConfigBase.requestOptions;this.privRestAdapter=new t.RestMessageAdapter(c),this.privAuthentication=r}getVoicesList(A){return this.privRestAdapter.setHeaders(n.HeaderNames.ConnectionId,A),this.privAuthentication.fetch(A).then(r=>(this.privRestAdapter.setHeaders(r.headerName,r.token),this.privRestAdapter.request(t.RestRequestType.Get,this.privUri)))}};return pA.SynthesisRestAdapter=o,pA}var ag={},DS;function sU(){return DS||(DS=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SynthesizerConfig=t.SynthesisServiceType=void 0;const e=oe();var i;(function(o){o[o.Standard=0]="Standard",o[o.Custom=1]="Custom"})(i=t.SynthesisServiceType||(t.SynthesisServiceType={}));class n{constructor(s,A){this.privSynthesisServiceType=i.Standard,this.avatarEnabled=!1,this.privSpeechServiceConfig=s||new e.SpeechServiceConfig(new e.Context(null)),this.privParameters=A}get parameters(){return this.privParameters}get synthesisServiceType(){return this.privSynthesisServiceType}set synthesisServiceType(s){this.privSynthesisServiceType=s}set synthesisVideoSection(s){this.privSpeechServiceConfig.Context.synthesis={video:s}}get SpeechServiceConfig(){return this.privSpeechServiceConfig}}t.SynthesizerConfig=n}(ag)),ag}var dA={},yS;function AU(){if(yS)return dA;yS=1,Object.defineProperty(dA,"__esModule",{value:!0}),dA.SynthesisContext=void 0;const t=V();let e=class{constructor(){this.privContext={}}setSection(n,o){this.privContext[n]=o}set audioOutputFormat(n){this.privAudioOutputFormat=n}toJSON(){return JSON.stringify(this.privContext)}setSynthesisSection(n){const o=this.buildSynthesisContext(n);this.setSection("synthesis",o)}buildSynthesisContext(n){return{audio:{metadataOptions:{bookmarkEnabled:!!(n!=null&&n.bookmarkReached),punctuationBoundaryEnabled:n==null?void 0:n.properties.getProperty(t.PropertyId.SpeechServiceResponse_RequestPunctuationBoundary,!!(n!=null&&n.wordBoundary)),sentenceBoundaryEnabled:n==null?void 0:n.properties.getProperty(t.PropertyId.SpeechServiceResponse_RequestSentenceBoundary,!1),sessionEndEnabled:!0,visemeEnabled:!!(n!=null&&n.visemeReceived),wordBoundaryEnabled:n==null?void 0:n.properties.getProperty(t.PropertyId.SpeechServiceResponse_RequestWordBoundary,!!(n!=null&&n.wordBoundary))},outputFormat:this.privAudioOutputFormat.requestAudioFormatString},language:{autoDetection:n==null?void 0:n.autoDetectSourceLanguage}}}};return dA.SynthesisContext=e,dA}var SA={},TS;function aU(){if(TS)return SA;TS=1,Object.defineProperty(SA,"__esModule",{value:!0}),SA.SpeakerRecognitionConfig=void 0;const t=oe();let e=class{constructor(n,o){this.privContext=n||new t.Context(null),this.privParameters=o}get parameters(){return this.privParameters}get Context(){return this.privContext}};return SA.SpeakerRecognitionConfig=e,SA}var MA={},LS;function cU(){if(LS)return MA;LS=1,Object.defineProperty(MA,"__esModule",{value:!0}),MA.SpeakerServiceRecognizer=void 0;const t=Ct(),e=ge(),i=V(),n=oe(),o=Ki;let s=class extends n.ServiceRecognizerBase{constructor(r,a,c,u,l){super(r,a,c,u,l),this.privSpeakerRecognizer=l,this.privSpeakerAudioSource=c,this.recognizeSpeaker=g=>this.recognizeSpeakerOnce(g),this.sendPrePayloadJSONOverride=()=>this.noOp()}processTypeSpecificMessages(r){let a=!1;const c=new i.PropertyCollection;switch(r.messageType===e.MessageType.Text&&c.setProperty(i.PropertyId.SpeechServiceResponse_JsonResult,r.textBody),r.path.toLowerCase()){case"speaker.response":const l=JSON.parse(r.textBody);let g;l.status.statusCode.toLowerCase()!=="success"?g=new i.SpeakerRecognitionResult(l,i.ResultReason.Canceled,i.CancellationErrorCode.ServiceError,l.status.reason):g=new i.SpeakerRecognitionResult(l,i.ResultReason.RecognizedSpeaker),this.privResultDeferral&&this.privResultDeferral.resolve(g),a=!0;break}const u=new e.Deferred;return u.resolve(a),u.promise}cancelRecognition(r,a,c,u,l){if(new i.PropertyCollection().setProperty(n.CancellationErrorCodePropertyName,i.CancellationErrorCode[u]),this.privResultDeferral){const E=new i.SpeakerRecognitionResult({scenario:this.privSpeakerModel.scenario,status:{statusCode:l,reason:l}},i.ResultReason.Canceled,u,l);try{this.privResultDeferral.resolve(E)}catch(C){this.privResultDeferral.reject(C)}}}async recognizeSpeakerOnce(r){this.privSpeakerModel=r,this.voiceProfileType=r.scenario,this.privResultDeferral||(this.privResultDeferral=new e.Deferred),this.privRequestSession.startNewRecognition(),this.privRequestSession.listenForServiceTelemetry(this.privSpeakerAudioSource.events),this.privRecognizerConfig.parameters.setProperty(i.PropertyId.Speech_SessionId,this.privRequestSession.sessionId);const a=this.connectImpl(),c=this.sendPreAudioMessages(this.extractSpeakerContext(r)),u=await this.privSpeakerAudioSource.attach(this.privRequestSession.audioNodeId),l=await this.privSpeakerAudioSource.format,g=await this.privSpeakerAudioSource.deviceInfo,E=new t.ReplayableAudioNode(u,l.avgBytesPerSec);await this.privRequestSession.onAudioSourceAttachCompleted(E,!1),this.privRecognizerConfig.SpeechServiceConfig.Context.audio={source:g};try{await a,await c}catch(S){this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,i.CancellationReason.Error,i.CancellationErrorCode.ConnectionFailure,S)}const C=new i.SessionEventArgs(this.privRequestSession.sessionId);return this.privRecognizer.sessionStarted&&this.privRecognizer.sessionStarted(this.privRecognizer,C),this.receiveMessage(),this.sendAudio(E).then(()=>{},S=>{this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,i.CancellationReason.Error,i.CancellationErrorCode.RuntimeError,S)}),this.privResultDeferral.promise}async sendPreAudioMessages(r){const a=await this.fetchConnection();await this.sendSpeakerRecognition(a,r)}async sendSpeakerRecognition(r,a){const c=JSON.stringify(a);return r.send(new o.SpeechConnectionMessage(e.MessageType.Text,"speaker.context",this.privRequestSession.requestId,"application/json; charset=utf-8",c))}extractSpeakerContext(r){return{features:{interimResult:"enabled",progressiveDetection:"disabled"},profileIds:r.profileIds,scenario:r.scenario}}};return MA.SpeakerServiceRecognizer=s,MA}var BA={},OS;function uU(){if(OS)return BA;OS=1,Object.defineProperty(BA,"__esModule",{value:!0}),BA.VoiceServiceRecognizer=void 0;const t=Ct(),e=ge(),i=V(),n=oe(),o=Ki;let s=class extends n.ServiceRecognizerBase{constructor(r,a,c,u,l){super(r,a,c,u,l),this.privDeferralMap=new e.DeferralMap,this.privSpeakerAudioSource=c,this.sendPrePayloadJSONOverride=()=>this.noOp()}set SpeakerAudioSource(r){this.privSpeakerAudioSource=r}processTypeSpecificMessages(r){let a=!1;const c=new i.PropertyCollection;switch(r.messageType===e.MessageType.Text&&c.setProperty(i.PropertyId.SpeechServiceResponse_JsonResult,r.textBody),r.path.toLowerCase()){case"speaker.profiles":const l=JSON.parse(r.textBody);switch(l.operation.toLowerCase()){case"create":this.handleCreateResponse(l,r.requestId);break;case"delete":case"reset":this.handleResultResponse(l,r.requestId);break;case"fetch":const d=JSON.parse(r.textBody);this.handleFetchResponse(d,r.requestId);break}a=!0;break;case"speaker.phrases":const g=JSON.parse(r.textBody);this.handlePhrasesResponse(g,r.requestId),a=!0;break;case"speaker.profile.enrollment":const E=JSON.parse(r.textBody),C=new i.VoiceProfileEnrollmentResult(this.enrollmentReasonFrom(E.enrollment?E.enrollment.enrollmentStatus:E.status.statusCode),E.enrollment?JSON.stringify(E.enrollment):void 0,E.status.reason);this.privDeferralMap.getId(r.requestId)&&this.privDeferralMap.complete(r.requestId,C),this.privRequestSession.onSpeechEnded(),a=!0;break}const u=new e.Deferred;return u.resolve(a),u.promise}cancelRecognition(r,a,c,u,l){new i.PropertyCollection().setProperty(n.CancellationErrorCodePropertyName,i.CancellationErrorCode[u]);const E=new i.VoiceProfileEnrollmentResult(i.ResultReason.Canceled,l,l);this.privDeferralMap.getId(a)&&this.privDeferralMap.complete(a,E)}async createProfile(r,a){this.voiceProfileType=r.toString();const c=this.connectImpl();try{const u=new e.Deferred;return await c,await this.sendCreateProfile(u,r,a),this.receiveMessage(),u.promise}catch(u){throw u}}async resetProfile(r){return this.voiceProfileType=r.profileType.toString(),this.sendCommonRequest("reset",r.profileType,r)}async deleteProfile(r){return this.voiceProfileType=r.profileType.toString(),this.sendCommonRequest("delete",r.profileType,r)}async retrieveEnrollmentResult(r){return this.voiceProfileType=r.profileType.toString(),this.privExpectedProfileId=r.profileId,this.sendCommonRequest("fetch",r.profileType,r)}async getAllProfiles(r){return this.voiceProfileType=r.toString(),this.sendCommonRequest("fetch",r)}async getActivationPhrases(r,a){this.voiceProfileType=r.toString();const c=this.connectImpl();try{const u=new e.Deferred;return await c,await this.sendPhrasesRequest(u,r,a),this.receiveMessage(),u.promise}catch(u){throw u}}async enrollProfile(r){this.voiceProfileType=r.profileType.toString();const a=new e.Deferred;this.privRequestSession.startNewRecognition(),this.privRequestSession.listenForServiceTelemetry(this.privSpeakerAudioSource.events),this.privRecognizerConfig.parameters.setProperty(i.PropertyId.Speech_SessionId,this.privRequestSession.sessionId);const c=this.connectImpl(),u=this.sendPreAudioMessages(r,a),l=await this.privSpeakerAudioSource.attach(this.privRequestSession.audioNodeId),g=await this.privSpeakerAudioSource.format,E=await this.privSpeakerAudioSource.deviceInfo,C=new t.ReplayableAudioNode(l,g.avgBytesPerSec);await this.privRequestSession.onAudioSourceAttachCompleted(C,!1),this.privRecognizerConfig.SpeechServiceConfig.Context.audio={source:E};try{await c,await u}catch(I){this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,i.CancellationReason.Error,i.CancellationErrorCode.ConnectionFailure,I)}const d=new i.SessionEventArgs(this.privRequestSession.sessionId);return this.privRecognizer.sessionStarted&&this.privRecognizer.sessionStarted(this.privRecognizer,d),this.receiveMessage(),this.sendAudio(C).then(()=>{},I=>{this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,i.CancellationReason.Error,i.CancellationErrorCode.RuntimeError,I)}),a.promise}async sendPreAudioMessages(r,a){const c=await this.fetchConnection();this.privRequestSession.onSpeechContext(),this.privDeferralMap.add(this.privRequestSession.requestId,a),await this.sendBaseRequest(c,"enroll",this.scenarioFrom(r.profileType),r)}async sendPhrasesRequest(r,a,c){const u=await this.fetchConnection();this.privRequestSession.onSpeechContext(),this.privDeferralMap.add(this.privRequestSession.requestId,r);const l=this.scenarioFrom(a),g={locale:c,scenario:l};return u.send(new o.SpeechConnectionMessage(e.MessageType.Text,"speaker.profile.phrases",this.privRequestSession.requestId,"application/json; charset=utf-8",JSON.stringify(g)))}async sendCreateProfile(r,a,c){const u=await this.fetchConnection();this.privRequestSession.onSpeechContext(),this.privDeferralMap.add(this.privRequestSession.requestId,r);const l=a===i.VoiceProfileType.TextIndependentIdentification?"TextIndependentIdentification":a===i.VoiceProfileType.TextIndependentVerification?"TextIndependentVerification":"TextDependentVerification",g={locale:c,number:"1",scenario:l};return u.send(new o.SpeechConnectionMessage(e.MessageType.Text,"speaker.profile.create",this.privRequestSession.requestId,"application/json; charset=utf-8",JSON.stringify(g)))}async sendCommonRequest(r,a,c=void 0){const u=this.connectImpl();try{const l=new e.Deferred;this.privRequestSession.onSpeechContext(),await u;const g=await this.fetchConnection();return this.privDeferralMap.add(this.privRequestSession.requestId,l),await this.sendBaseRequest(g,r,this.scenarioFrom(a),c),this.receiveMessage(),l.promise}catch(l){throw l}}async sendBaseRequest(r,a,c,u){const l={scenario:c};return u?l.profileIds=[u.profileId]:l.maxPageSize=-1,r.send(new o.SpeechConnectionMessage(e.MessageType.Text,`speaker.profile.${a}`,this.privRequestSession.requestId,"application/json; charset=utf-8",JSON.stringify(l)))}extractSpeakerContext(r){return{features:{interimResult:"enabled",progressiveDetection:"disabled"},profileIds:r.profileIds,scenario:r.scenario}}handlePhrasesResponse(r,a){if(this.privDeferralMap.getId(a))if(r.status.statusCode.toLowerCase()!=="success"){const c=i.ResultReason.Canceled,u=new i.VoiceProfilePhraseResult(c,r.status.statusCode,r.passPhraseType,[]);this.privDeferralMap.complete(a,u)}else if(r.phrases&&r.phrases.length>0){const c=i.ResultReason.EnrollingVoiceProfile,u=new i.VoiceProfilePhraseResult(c,r.status.statusCode,r.passPhraseType,r.phrases);this.privDeferralMap.complete(a,u)}else throw new Error("Voice Profile get activation phrases failed, no phrases received");else throw new Error(`Voice Profile get activation phrases request for requestID ${a} not found`)}handleCreateResponse(r,a){if(r.profiles&&r.profiles.length>0)if(this.privDeferralMap.getId(a)){const c=r.profiles.map(u=>u.profileId);this.privDeferralMap.complete(a,c)}else throw new Error(`Voice Profile create request for requestID ${a} not found`);else throw new Error("Voice Profile create failed, no profile id received")}handleResultResponse(r,a){if(this.privDeferralMap.getId(a)){const c=r.operation.toLowerCase()==="delete"?i.ResultReason.DeletedVoiceProfile:i.ResultReason.ResetVoiceProfile,u=r.status.statusCode.toLowerCase()==="success"?c:i.ResultReason.Canceled,l=new i.VoiceProfileResult(u,`statusCode: ${r.status.statusCode}, errorDetails: ${r.status.reason}`);this.privDeferralMap.complete(a,l)}else throw new Error(`Voice Profile create request for requestID ${a} not found`)}handleFetchResponse(r,a){if(this.privDeferralMap.getId(a)&&r.profiles[0]){if(this.privExpectedProfileId&&r.profiles.length===1&&r.profiles[0].profileId===this.privExpectedProfileId){this.privExpectedProfileId=void 0;const c=r.profiles[0],u=new i.VoiceProfileEnrollmentResult(this.enrollmentReasonFrom(c.enrollmentStatus),JSON.stringify(c),r.status.reason);this.privDeferralMap.complete(a,u)}else if(r.profiles.length>0){const c=r.profiles,u=[];for(const l of c)u.push(new i.VoiceProfileEnrollmentResult(this.enrollmentReasonFrom(l.enrollmentStatus),JSON.stringify(l),r.status.reason));this.privDeferralMap.complete(a,u)}}else throw new Error(`Voice Profile fetch request for requestID ${a} not found`)}enrollmentReasonFrom(r){switch(r.toLowerCase()){case"enrolled":return i.ResultReason.EnrolledVoiceProfile;case"invalidlocale":case"invalidphrase":case"invalidaudioformat":case"invalidscenario":case"invalidprofilecount":case"invalidoperation":case"audiotooshort":case"audiotoolong":case"toomanyenrollments":case"storageconflict":case"profilenotfound":case"incompatibleprofiles":case"incompleteenrollment":return i.ResultReason.Canceled;default:return i.ResultReason.EnrollingVoiceProfile}}scenarioFrom(r){return r===i.VoiceProfileType.TextIndependentIdentification?"TextIndependentIdentification":r===i.VoiceProfileType.TextIndependentVerification?"TextIndependentVerification":"TextDependentVerification"}};return BA.VoiceServiceRecognizer=s,BA}var US={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.type=t.connectivity=t.Device=t.OS=t.System=t.Context=t.SpeechServiceConfig=void 0;class e{constructor(r){this.context=r}serialize(){return JSON.stringify(this,(r,a)=>{if(a&&typeof a=="object"&&!Array.isArray(a)){const c={};for(const u in a)Object.hasOwnProperty.call(a,u)&&(c[u&&u.charAt(0).toLowerCase()+u.substring(1)]=a[u]);return c}return a})}get Context(){return this.context}get Recognition(){return this.recognition}set Recognition(r){this.recognition=r.toLowerCase()}}t.SpeechServiceConfig=e;class i{constructor(r){this.system=new n,this.os=r}}t.Context=i;class n{constructor(){const r="1.44.0";this.name="SpeechSDK",this.version=r,this.build="JavaScript",this.lang="JavaScript"}}t.System=n;class o{constructor(r,a,c){this.platform=r,this.name=a,this.version=c}}t.OS=o;class s{constructor(r,a,c){this.manufacturer=r,this.model=a,this.version=c}}t.Device=s,function(A){A.Bluetooth="Bluetooth",A.Wired="Wired",A.WiFi="WiFi",A.Cellular="Cellular",A.InBuilt="InBuilt",A.Unknown="Unknown"}(t.connectivity||(t.connectivity={})),function(A){A.Phone="Phone",A.Speaker="Speaker",A.Car="Car",A.Headset="Headset",A.Thermostat="Thermostat",A.Microphones="Microphones",A.Deskphone="Deskphone",A.RemoteControl="RemoteControl",A.Unknown="Unknown",A.File="File",A.Stream="Stream"}(t.type||(t.type={}))})(US);var NS;function oe(){return NS||(NS=1,function(t){var e=Re&&Re.__createBinding||(Object.create?function(s,A,r,a){a===void 0&&(a=r),Object.defineProperty(s,a,{enumerable:!0,get:function(){return A[r]}})}:function(s,A,r,a){a===void 0&&(a=r),s[a]=A[r]}),i=Re&&Re.__exportStar||function(s,A){for(var r in s)r!=="default"&&!Object.prototype.hasOwnProperty.call(A,r)&&e(A,s,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.AutoDetectSourceLanguagesOpenRangeOptionName=t.ForceDictationPropertyName=t.ServicePropertiesPropertyName=t.CancellationErrorCodePropertyName=t.OutputFormatPropertyName=t.SpeechSynthesisAdapter=t.AvatarSynthesisAdapter=void 0,i(wa,t),i(qa,t),i(Rr,t),i(vI,t),i(fI,t),i(_L(),t),i($L(),t),i(fc,t),i(eO(),t),i(tO(),t),i(iO(),t),i(kd,t),i(wc,t),i(rO(),t),i(oO(),t),i(sO(),t),i(AO(),t),i(pd(),t),i(aO(),t),i(Hd,t),i(cO(),t),i(mc,t),i(lO(),t),i(gO(),t),i(Rc,t),i(Dc,t),i(yc,t),i(EO(),t),i(hO(),t),i(CO(),t),i(IO(),t),i(pO(),t),i(Tc,t),i(SO(),t),i(Lc,t),i(rS,t),i(Oc,t),i(Kc,t),i(Fc,t),i(UO(),t),i(kc,t),i(XO(),t),i(Ag,t),i(tU(),t),i(iU(),t);var n=nU();Object.defineProperty(t,"AvatarSynthesisAdapter",{enumerable:!0,get:function(){return n.AvatarSynthesisAdapter}});var o=rU();Object.defineProperty(t,"SpeechSynthesisAdapter",{enumerable:!0,get:function(){return o.SpeechSynthesisAdapter}}),i(oU(),t),i(sU(),t),i(AU(),t),i(aU(),t),i(cU(),t),i(uU(),t),i(US,t),t.OutputFormatPropertyName="OutputFormat",t.CancellationErrorCodePropertyName="CancellationErrorCode",t.ServicePropertiesPropertyName="ServiceProperties",t.ForceDictationPropertyName="ForceDictation",t.AutoDetectSourceLanguagesOpenRangeOptionName="UND"}(El)),El}(function(t){var e=Re&&Re.__createBinding||(Object.create?function(o,s,A,r){r===void 0&&(r=A),Object.defineProperty(o,r,{enumerable:!0,get:function(){return s[A]}})}:function(o,s,A,r){r===void 0&&(r=A),o[r]=s[A]}),i=Re&&Re.__exportStar||function(o,s){for(var A in o)A!=="default"&&!Object.prototype.hasOwnProperty.call(s,A)&&e(s,o,A)};Object.defineProperty(t,"__esModule",{value:!0});const n=oe();new n.AgentConfig,i(V(),t)})(di);const ft=[];for(let t=0;t<256;++t)ft.push((t+256).toString(16).slice(1));function lU(t,e=0){return(ft[t[e+0]]+ft[t[e+1]]+ft[t[e+2]]+ft[t[e+3]]+"-"+ft[t[e+4]]+ft[t[e+5]]+"-"+ft[t[e+6]]+ft[t[e+7]]+"-"+ft[t[e+8]]+ft[t[e+9]]+"-"+ft[t[e+10]]+ft[t[e+11]]+ft[t[e+12]]+ft[t[e+13]]+ft[t[e+14]]+ft[t[e+15]]).toLowerCase()}let cg;const gU=new Uint8Array(16);function EU(){if(!cg){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");cg=crypto.getRandomValues.bind(crypto)}return cg(gU)}const KS={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function hU(t,e,i){var o;if(KS.randomUUID&&!e&&!t)return KS.randomUUID();t=t||{};const n=t.random??((o=t.rng)==null?void 0:o.call(t))??EU();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){if(i=i||0,i<0||i+16>e.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let s=0;s<16;++s)e[i+s]=n[s];return e}return lU(n)}const Kr=At(),FS=ke(),Fr=f(""),Wn=f(""),In=f(""),Gt=f(""),GS=f("");let pn=null;const xS=4e3;Nt(async()=>{await ug()});let rt=null,Gr=null,Mi=null,bc=null;const xr=()=>{Mi&&Mi.mute(),rt&&(rt.close(),rt=null),Gr=null},ug=async()=>{var t,e,i;try{const n=await Zt("/voiceTesting");return(t=n==null?void 0:n.data)==null?void 0:t.token}catch(n){if(console.error(n),ye.isAxiosError(n)){const o=n;console.log("Error found!"),console.error((e=o.response)==null?void 0:e.data),Kr.setError(((i=o.response)==null?void 0:i.data).message)}else Kr.setError("There was an issue while fetching data")}},lg=()=>{pn&&clearTimeout(pn),bc&&(bc.stopContinuousRecognitionAsync(()=>{},t=>{console.error("Error stopping recognition",t)}),bc=null)},CU=async t=>{const e=await ug();return await xr(),new Promise((i,n)=>{const o=di.SpeechConfig.fromAuthorizationToken(e,"eastus2");o.speechSynthesisVoiceName="en-US-EmmaMultilingualNeural",Mi=new di.SpeakerAudioDestination;const s=di.AudioConfig.fromSpeakerOutput(Mi);rt=new di.SpeechSynthesizer(o,s);const A=hU();Gr=A,rt.speakTextAsync(t,r=>{if(A!==Gr)return Mi==null||Mi.mute(),rt==null||rt.close(),rt=null,i();r.reason===di.ResultReason.SynthesizingAudioCompleted?i():n(new Error("Speech synthesis failed")),rt==null||rt.close(),rt=null,Gr=null},r=>{if(A!==Gr)return Mi==null||Mi.mute(),rt==null||rt.close(),rt=null,i();rt==null||rt.close(),rt=null,Gr=null,n(r)})})},IU=async t=>{const e=await ug(),i=di.SpeechConfig.fromAuthorizationToken(e,"eastus2");i.speechRecognitionLanguage="en-US";const n=di.AudioConfig.fromDefaultMicrophoneInput(),o=new di.SpeechRecognizer(i,n);return bc=o,Fr.value="",Wn.value="",o.recognizing=(s,A)=>{A.result.text&&A.result.text.trim()&&(Fr.value=A.result.text.trim(),xr(),FS.userspeaking=!0,FS.userSpeechText=(Wn.value?Wn.value+" ":"")+Fr.value,Gt.value="user",pn&&clearTimeout(pn),pn=setTimeout(()=>{Fr.value&&(t(Fr.value.trim()),Fr.value="")},xS))},o.recognized=(s,A)=>{A.result.reason===di.ResultReason.RecognizedSpeech&&A.result.text&&A.result.text.trim()&&(Wn.value+=" "+A.result.text.trim(),pn&&clearTimeout(pn),pn=setTimeout(()=>{Wn.value&&(t(Wn.value),Wn.value="")},xS))},o.canceled=(s,A)=>{console.error("Recognition canceled:",A)},o.startContinuousRecognitionAsync(),o},pU=async()=>{var t,e;In.value="",GS.value="";try{xr(),await IU(i=>{i&&(In.value=i)})}catch(i){if(console.error(i),ye.isAxiosError(i)){const n=i;console.log("Error found!"),console.error((t=n.response)==null?void 0:t.data),Kr.setError(((e=n.response)==null?void 0:e.data).message)}else Kr.setError("There was an issue while fetching data")}},gg=async t=>{var e,i;GS.value="";try{(Gt.value=="user"||Gt.value=="listening")&&xr(),await CU(t)}catch(n){if(console.error(n),ye.isAxiosError(n)){const o=n;console.log("Error found!"),console.error((e=o.response)==null?void 0:e.data),Kr.setError(((i=o.response)==null?void 0:i.data).message)}else Kr.setError("There was an issue while fetching data")}};ke();const kS=At(),kr=f(!1),vA=f("");f(""),f(""),Nt(()=>{console.log("Mounted voiceService11Labs")});const dU=async()=>{var t,e,i,n;try{const o=await Zt("/voiceTesting?ellevenLabs=true");return console.log("response",(t=o==null?void 0:o.data)==null?void 0:t.token),(e=o==null?void 0:o.data)==null?void 0:e.token}catch(o){if(console.error(o),ye.isAxiosError(o)){const s=o;console.log("Error found!"),console.error((i=s.response)==null?void 0:i.data),kS.setError(((n=s.response)==null?void 0:n.data).message)}else kS.setError("There was an issue while fetching data")}};let Jc;const SU="Xb7hH8MSUJpSbSDYk0k2";f(!1);const MU=f("");let Hc=[];const jS=f(!1);let jr=!1,xt=null,fA=null,dn=null;f("");let Zn,Xn,Yr,zr;function Eg(){zr&&zr.disconnect(),Xn&&Xn.disconnect(),console.log("microphone outside->",Yr),Yr&&(console.log("microphone->",Yr),console.log("Stopping microphone connection"),Yr.disconnect()),Zn&&Zn.close()}function BU(t,e=.09){console.log("monitorMicDuringTTS called with threshold:",e),Zn=new(window.AudioContext||window.webkitAudioContext),Xn=Zn.createAnalyser(),Yr=Zn.createMediaStreamSource(fA),zr=Zn.createScriptProcessor(2048,1,1),Yr.connect(Xn),Xn.connect(zr),zr.connect(Zn.destination),zr.onaudioprocess=()=>{const i=new Uint8Array(Xn.frequencyBinCount);Xn.getByteFrequencyData(i);const n=i.reduce((o,s)=>o+s)/i.length;console.log("Average volume:",n),console.log("threshold * 100:",e*100),n>e*100&&(t(),console.log("onInterrupt",t),Eg())}}async function hg(){jS.value=!0,kr.value=!0,console.log("Starting voice recognition with ElevenLabs"),xt&&xt.pause(),fA=await navigator.mediaDevices.getUserMedia({audio:!0}),await vU()}async function vU(){if(!fA)throw new Error("micStream is null");dn=new MediaRecorder(fA),Hc=[],console.log("Starting beginListening with ElevenLabs"),dn.ondataavailable=t=>{xt&&xt.pause(),t.data.size>0&&Hc.push(t.data),console.log("Audio chunk available:",Hc)},dn.onstop=async()=>{const t=new Blob(Hc,{type:"audio/webm"}),e=await wU(t);MU.value=e,console.log("Transcription:",e),vA.value=e,jS.value=!1},dn.start(),xt&&xt.pause(),fU(fA,()=>{(dn==null?void 0:dn.state)==="recording"&&dn.stop()})}function fU(t,e,i=1500,n=.08){const o=new(window.AudioContext||window.webkitAudioContext),s=o.createAnalyser(),A=o.createMediaStreamSource(t),r=o.createScriptProcessor(2048,1,1);s.smoothingTimeConstant=.8,s.fftSize=1024,A.connect(s),s.connect(r),r.connect(o.destination);let a=performance.now();r.onaudioprocess=()=>{const c=new Uint8Array(s.frequencyBinCount);s.getByteFrequencyData(c),c.reduce((l,g)=>l+g)/c.length<n*100?performance.now()-a>i&&(e(),r.disconnect(),s.disconnect(),A.disconnect(),o.close()):a=performance.now()}}async function wU(t){console.log("authToken 11labs",Jc);const e=new FormData;e.append("file",t,"recording.webm"),e.append("model_id","scribe_v1");const i=await fetch("https://api.elevenlabs.io/v1/speech-to-text?language_code=eng",{method:"POST",headers:{"xi-api-key":Jc},body:e}),n=await i.json();return i.ok?(n==null?void 0:n.text)||"[No transcription result]":(console.error("Transcription error:",n),"[Error in transcription]")}async function YS(t){console.log("speakText11Labs called with text:",t),Jc=await dU(),xt&&xt.pause(),jr=!0;const i=await(await fetch(`https://api.elevenlabs.io/v1/text-to-speech/${SU}`,{method:"POST",headers:{"xi-api-key":Jc,"Content-Type":"application/json"},body:JSON.stringify({text:t,model_id:"eleven_monolingual_v1",voice_settings:{stability:.5,similarity_boost:.5}})})).blob(),n=URL.createObjectURL(i);return xt=new Audio(n),new Promise(o=>{xt&&(xt.onended=async()=>{jr=!1,console.log("Audio is playing:",jr),kr.value?(console.log("micEnabled before calling startrecognition:",kr.value),o(await hg())):o()},xt.play(),console.log("Audio is playing:",jr),console.log("micEnabled:",kr.value),kr.value&&BU(()=>{xt&&(xt.pause(),xt.currentTime=0),jr=!1,console.log("monitorMicDuringTTS:",jr),console.log("micEnabled before calling startrecognition:",kr.value),hg()}))})}const mU={class:"max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916] fontFormattingAMA"},QU=h("div",{class:"text-[22px] font-[700]"},"Please Note Before You Begin",-1),RU=h("ul",{className:"list-disc max-h-[40vh] overflow-auto space-y-3 pl-6 text-[#102345] text-[15px]"},[h("li",null,[We(" Choose a "),h("span",{class:"font-[600]"},"quiet space"),We(" and ensure your mic and internet connection are working properly. ")]),h("li",null,[We(" The assessment will "),h("span",{class:"font-[600]"},"begin in text mode "),We(", where the AI will ask you a few initial questions. ")]),h("li",null,[We(" You'll need to type your responses, which will help the "),h("span",{class:"font-[600]"},"AI generate tailored scenarios "),We(" for the role-play exercise. ")]),h("li",null,[h("span",{class:"font-[600]"},"Voice mode "),We(" will be activated, once you initiate the role-play.")]),h("li",null,[We(" Click "),h("span",{class:"font-[600]"},"“Turn on Mic”"),We(" to initiate the conversation with the voice bot. ")]),h("li",null,[h("span",{class:"font-[600]"},"Don’t mute "),We(" until your response is fully processed to ensure smooth interaction.")]),h("li",null,[We("Stay expressive — this is an interactive role-play, so your "),h("span",{class:"font-[600]"},"engagement matters"),We(".")]),h("li",null,[We("The session may take up to "),h("span",{class:"font-[600]"},"10 minutes "),We(", so plan accordingly.")])],-1),DU={class:"flex items-end justify-start"},yU={class:"fontFormattingAMA w-full bg-gray-100 rounded-lg"},TU={class:"w-full rounded-md px-3 py-2 text-lg font-bold text-black md:text-[22px]"},LU={class:"w-full px-3 py-2 text-base text-black md:text-[16px] font-[550]"},OU={key:0,class:"fontFormattingAMA"},UU=h("br",null,null,-1),NU=` You're about to step into a realistic, voice-based client conversation powered by AI.
35
- This is a role-play simulation designed to mirror real-world scenarios. Just follow the prompts, speak naturally, and let the AI guide you. Based on your responses, you’ll receive personalized feedback to help sharpen your client engagement skills.`,KU=Qe({__name:"greetingsSimulation",setup(t){const e=ke(),i=At(),n=f(!1),o=f(!1),s=f(!0),A=()=>{e.simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"?(e.beginFlag=!1,n.value=!0):(e.beginFlag=!1,C())},r=`Hi, get ready to test your ${e.skillNameForSimulation||"Unknown"} knowledge! Here’s what to expect:`,a=` Hi ${e.learnerName||"Expert"}, and welcome!`,c=` Hi, ${e.learnerName||"Expert"}. Get ready to test your ${e.skillNameForSimulation||"Unknown"} knowledge! Here’s what to expect:`,u=nt(()=>["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill)?r:["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill)?a:c),l=`Hi, get ready to test your ${e.skillNameForSimulation||"Unknown"} knowledge! Here’s what to expect:`,g=` AI Guru will ask you a few questions on '${e.skillNameForSimulation.trim()||"Unknown"} '. Please provide detailed and thoughtful answers to the best of your knowledge. At the end, you'll receive a feedback, outlining your strengths and improvement areas.`,E=nt(()=>["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill)?l:["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill)?NU:g),C=async()=>{var d,S,I,p,M,B;console.log("firstQuestion fired==>"),s.value=!1;try{const T={question:"Hello, let's start"};if(e.conversations.push(T),e.assessmentQuestion){const L={past_messages:e.past_messages,question:"Let's begin",bandCode:e.band_code,userGenomeFunction:e.genomeFunctionValue,userGenomeRole:e.genomeRoleValue,skillId:e.simulationSkill||"937e84ef-e95d-4327-9afe-e7be2bf420eb"},O=f("");e.dotLoader=!0,Gt.value="listening";const R=await lt("/sqlTest",L);e.addConversation((d=R.data)==null?void 0:d.body,"new"),O.value=(I=(S=R==null?void 0:R.data)==null?void 0:S.body)==null?void 0:I.answer,e.dotLoader=!1,Gt.value="bot",e.showVoiceComponent&&(e.elevenLabs?await YS(O.value.replace(/[*#]/g,"")):await gg(O.value.replace(/[*#]/g,"")))}else{o.value=!0,e.dotLoader=!0,console.log("firstQuestion fired==> else part");const L={assessmentId:e.simulationSkill,question:"Hello, Let's begin",past_messages:e.past_messages,prompt:e.generatedPrompt,assessmentType:e.assessmentType,userFunction:e.genomeFunctionValue,empSeniority:e.empSeniority,functionRole:e.functionRole,userBand:e,storeFinalFeedback:e.storeFinalFeedback,storeFinalScore:e.storeFinalScore};let O;Ai==="prod"?O="/ManualExportActivity":O="/fetchCompletionDemo";const R=await lt(O,L);e.addConversation((p=R.data)==null?void 0:p.body,"assessment"),e.dotLoader=!1}}catch(T){if(console.error(T),e.dotLoader=!1,ye.isAxiosError(T)){const L=T;console.log("Error found!"),console.error((M=L.response)==null?void 0:M.data),i.setError(((B=L.response)==null?void 0:B.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(d,S)=>(m(),Q("section",null,[ne(wr,{"is-visible":n.value},{default:Ei(()=>[h("div",mU,[QU,RU,h("button",{onClick:S[0]||(S[0]=I=>{n.value=!1,C()}),class:"bg-[#021c42] rounded-md px-4 py-1.5 text-center text-[16px] text-white cursor-pointer italic hover:bg-blue-700"}," Proceed ")])]),_:1},8,["is-visible"]),h("div",DU,[h("div",yU,[h("div",TU,de(u.value),1),h("div",LU,de(E.value),1)])]),D(e).beginFlag?(m(),Q("span",OU,[h("button",{type:"button",id:"button",onClick:A,class:"mt-4 bg-[#021c42] rounded-md px-4 py-1.5 text-center text-[16px] text-white cursor-pointer italic hover:bg-blue-700 w-32"}," Let's begin ")])):Me("",!0),UU]))}}),FU="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAB9AH0DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgc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UdK162vr3xFcXtvEcvBKxZX9iDXp/8AYOkZ/wCQXZ/9+V/wrRooA8X8T/BC61/WLm5TW3htJH3JbY+RPoOldD4r+GL+I/Cuj6Mt95f9nhQXI+/ivR6KAKGlaVa6VZQ29tbxRlI1RmRAu4gYyav0UUAf/9k=",zS=t=>(at("data-v-f88c6557"),t=t(),ct(),t),GU={class:"fontFormattingAMA flex items-end justify-start py-2"},xU={class:"line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg"},kU=["innerHTML"],jU=["innerHTML"],YU={key:0,class:"py-4"},zU={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},PU=["value","disabled","name"],bU={for:"item",name:"options-Array",id:"index"},JU={key:1,class:"py-4"},HU={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},qU=["onClick","disabled","name"],VU={for:"item",name:"options-Array",id:"index"},WU={key:2,class:"flex flex-col justify-start py-10"},ZU=[zS(()=>h("div",{class:"mb-4"}," Add Agentic AI to your Digital Skills on Genome.ai and start mastering AI today! ",-1)),zS(()=>h("img",{class:"h-20 w-20",src:FU,alt:"qr_code"},null,-1))],XU={key:3,class:"flex flex-col justify-start items-start bg-gray-100 rounded-lg"},_U={class:"flex justify-start items-center md:gap-[40px] gap-[30px]"},$U=Qe({__name:"responseSimulation",props:{question:{type:String,required:!0},answer:{type:String,required:!0},questionId:{type:String,required:!0},showFeedback:{type:Boolean,default:!0},optionsArray:{type:Array,default:[]},ansId:{type:Number,default:0}},emits:["char-typed"],setup(t,{emit:e}){const i=t,n=f([]),o=f(!1),s=ke(),A=f("");let r=[],a="";const c=async()=>{r=a.split(""),A.value="";for(let g=0;g<r.length;g++)A.value+=r[g],i.answer.includes("Feedback and Assessment")?(console.log("Feedback and Assessment found"),a.length-5>r.length&&g%30&&e("char-typed")):g%30&&e("char-typed"),await new Promise(E=>setTimeout(E,50))},u=()=>{s.isRestart=!0,s.beginFlag=!0,s.showVoiceComponent=!0,s.showSelectTypeConvesation=!1,s.showModelToggle=!0,s.isSpeechToggle=!1},l=nt(()=>{const g=i.answer.replace(/[*#]/g,"").replace(/Assessment Rating & Feedback/g,'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>').replace(/BEGIN ROLE PLAY./g,'<div style="font-size: 18px; font-weight: bold;">BEGIN ROLE PLAY</div>').replace(/Feedback and Assessment:/g,'<div style="font-size: 16px; font-weight: bold;">Feedback and Assessment</div>').replace(/Feedback and Assessment/g,'<div style="font-size: 16px; font-weight: bold;">Feedback and Assessment</div>').replace(/Overall Assessment:/g,'<div style="font-size: 16px; font-weight: bold;">Overall Assessment</div>').replace(/Overall Assessment/g,'<div style="font-size: 16px; font-weight: bold;">Overall Assessment</div>').replace(/Overall Rating:/g,'<div style="font-size: 16px; font-weight: bold;">Overall Rating</div>').replace(/Overall Rating/g,'<div style="font-size: 16px; font-weight: bold;">Overall Rating</div>').replace(/Model Solution:/g,'<div style="font-size: 16px; font-weight: bold;">Model Solution</div>').replace(/Model Solution/g,'<div style="font-size: 16px; font-weight: bold;">Model Solution</div>');(g.includes("Thank you for your participation!")||g.includes("Thank you for your participation"))&&(s.searchBoxdisable=!1,o.value=!0),(g.includes("BEGIN ROLE PLAY")||g.includes("BEGIN ROLE PLAY."))&&(s.showSelectTypeConvesation=!0);const E=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;if(g.includes("AI Guru")){if(g.includes("AI Guru"))return console.log("aig found"),g.replace(E,(C,d,S)=>`<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${d}</a>`)}else return g.replace(E,(C,d,S)=>`<a href="${S}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${d}</a>`)});return Qi(()=>i.answer,()=>{let g=i.answer.replace(/[*#]/g,"").replace(/Assessment Rating & Feedback/g,'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>').replace(/Feedback and Assessment:/g,'<div style="font-size: 16px; font-weight: bold;">Feedback and Assessment</div>').replace(/Feedback and Assessment/g,'<div style="font-size: 16px; font-weight: bold;">Feedback and Assessment</div>').replace(/Overall Assessment:/g,'<div style="font-size: 16px; font-weight: bold;">Overall Assessment</div>').replace(/Overall Assessment/g,'<div style="font-size: 16px; font-weight: bold;">Overall Assessment</div>').replace(/Overall Rating:/g,'<div style="font-size: 16px; font-weight: bold;">Overall Rating</div>').replace(/Overall Rating/g,'<div style="font-size: 16px; font-weight: bold;">Overall Rating</div>').replace(/Model Solution:/g,'<div style="font-size: 16px; font-weight: bold;">Model Solution</div>').replace(/Model Solution/g,'<div style="font-size: 16px; font-weight: bold;">Model Solution</div>');const E=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;g.includes("AI Guru")?g=g.replace(E,(C,d,S)=>`<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${d}</a>`):g=g.replace(E,(C,d,S)=>`<a href="${S}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${d}</a>`),g.includes("Feedback and Assessment")&&g.includes("END ROLE PLAY")?(a=g.split("END ROLE PLAY")[0],console.log("END ROLE PLAY")):a=g,s.showVoiceComponent&&c()},{immediate:!0}),Qi(n,g=>{s.question=(g??[]).join(", ")}),(g,E)=>(m(),Q("div",GU,[h("div",xU,[D(s).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&D(s).showVoiceComponent===!0&&D(s).conversations.length-1===i.ansId&&!i.answer.includes("BEGIN ROLE PLAY")?(m(),Q("span",{key:0,class:"fontFormattingAMA",innerHTML:A.value},null,8,kU)):(m(),Q("span",{key:1,class:"fontFormattingAMA",innerHTML:l.value},null,8,jU)),h("div",null,[t.optionsArray.length&&D(s).mcqType==="multi_choice"?(m(),Q("div",YU,[(m(!0),Q(Oe,null,Qt(t.optionsArray,(C,d)=>(m(),Q("div",{key:d,class:"italic"},[h("div",zU,[Le(h("input",{class:"mr-4 cursor-pointer",type:"checkbox",value:C,"onUpdate:modelValue":E[0]||(E[0]=S=>n.value=S),disabled:D(s).conversations.length-1!==i.ansId,name:l.value},null,8,PU),[[Gv,n.value]]),h("label",bU,de(C),1)])]))),128))])):t.optionsArray.length?(m(),Q("div",JU,[(m(!0),Q(Oe,null,Qt(t.optionsArray,(C,d)=>(m(),Q("div",{key:d,class:"italic"},[h("div",HU,[h("input",{class:"mr-4 cursor-pointer",type:"radio",onClick:S=>D(s).question=String(t.optionsArray[d]),disabled:D(s).conversations.length-1!==i.ansId,name:l.value},null,8,qU),h("label",VU,de(C),1)])]))),128))])):Me("",!0)]),o.value&&D(s).simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"?(m(),Q("div",WU,ZU)):Me("",!0),D(s).isSpeechToggle&&D(s).showSelectTypeConvesation&&D(s).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&D(s).conversations.length-1===i.ansId?(m(),Q("div",XU,[h("div",_U,[h("button",{type:"button",id:"button",onClick:E[1]||(E[1]=C=>u()),class:"mt-4 cursor-pointer bg-[#021c42] hover:bg-blue-700 italic rounded-md px-4 py-2 text-center text-white text-[16px]"}," Start Conversation ")])])):Me("",!0)])]))}}),k1="",eN=je($U,[["__scopeId","data-v-f88c6557"]]),tN={class:"flex justify-end items-end py-3"},iN={class:"max-w-[80%]"},nN={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},rN=Qe({__name:"learnerSimulation",props:{question:{type:String,required:!0},showFeedback:{type:Boolean,default:!0}},setup(t){return(e,i)=>(m(),Q("div",tN,[h("div",iN,[h("div",nN,de(t.question),1)])]))}}),oN=t=>(at("data-v-347ad6de"),t=t(),ct(),t),sN={class:"flex w-full flex-col items-start justify-start bg-white"},AN={class:"bot-typing-animation gap-1"},aN={class:"block w-full text-lg italic text-gray-800"},cN=oN(()=>h("span",{class:"dot-animation"},[h("span",null,"."),h("span",null,"."),h("span",null,".")],-1)),uN=ur('<div class="block w-full max-w-full items-stretch" data-v-347ad6de><div class="flex animate-pulse items-start justify-start space-x-4" data-v-347ad6de><div class="flex-1 space-y-6 py-1" data-v-347ad6de><div class="h-2 w-full rounded bg-gray-300" data-v-347ad6de></div><div class="space-y-3" data-v-347ad6de><div class="grid grid-cols-3 gap-4" data-v-347ad6de><div class="col-span-2 h-2 rounded bg-gray-300" data-v-347ad6de></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-347ad6de></div></div><div class="h-2 rounded bg-gray-300" data-v-347ad6de></div></div></div></div></div>',1),lN=Qe({__name:"LoadingResponse",setup(t){const e=f("Generating response"),i=f(["This may take a few seconds","Fetching the best response for you","Thinking... give me a moment","One moment while I gather the information","Hang in tight, we are almost there","Almost there... just a bit longer","Compiling a response for you"]);return setTimeout(()=>{const n=Math.floor(Math.random()*i.value.length);e.value=i.value[n]},15e3),(n,o)=>(m(),Q("div",sN,[h("div",AN,[h("div",aN,de(e.value),1),cN]),uN]))}}),j1="",gN=je(lN,[["__scopeId","data-v-347ad6de"]]),EN={class:"flex mx-auto justify-end items-end py-3"},hN={class:"max-w-[80%]"},CN={key:0,class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},IN=Qe({__name:"QuestionStreaming",setup(t){const e=ke();return(i,n)=>(m(),Q("div",EN,[h("div",hN,[D(e).userSpeechText.toLowerCase().includes("play")&&D(e).userSpeechText.length<10?Me("",!0):(m(),Q("div",CN,de(D(e).userSpeechText),1))])]))}}),pN={key:0},dN={key:1},SN={key:0,class:"flex"},MN={key:1,name:"askQuestion"},BN=Qe({__name:"conversationSimulation",setup(t){let e=f(""),i=f("");e.value='<a style="color:#00AECF;"',i.value='<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';const n=ke(),o=f(),s=()=>{o.value.scrollTo(0,o.value.scrollHeight)};return Nt(()=>{var a;const A=document.getElementsByName("askQuestion"),r=Array.from(A);A.length&&((a=r==null?void 0:r.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"})),window.addEventListener("custom-event",s)}),XA(()=>{var a;const A=document.getElementsByName("askQuestion"),r=Array.from(A);A.length&&((a=r==null?void 0:r.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"}))}),eo(()=>{window.removeEventListener("custom-event",s)}),(A,r)=>(m(),Q("div",{ref_key:"nestedElement",ref:o,class:"smooth-scroll overflow-auto md:px-6 px-2"},[ne(KU),(m(!0),Q(Oe,null,Qt(D(n).conversations,(a,c)=>(m(),Q("div",{key:c},[a.question?(m(),Q("div",pN,[ne(rN,{question:a.question,c2question:a.c2question,"show-feedback":a.showFeedback,id:`qId${c}`,name:"askQuestion","que-id":c},null,8,["question","c2question","show-feedback","id","que-id"])])):Me("",!0),a.answer?(m(),Q("div",dN,[ne(eN,{question:a==null?void 0:a.question,c2question:a==null?void 0:a.c2question,"show-sources":a==null?void 0:a.showSources,questionId:a.id,answer:a.answer.replaceAll("<a",D(e)).replaceAll("<ul",D(i)),"show-feedback":a.showFeedback,"related-ques":a.relatedQues,"options-array":a.optionsArray,"ans-id":c,onCharTyped:s},null,8,["question","c2question","show-sources","questionId","answer","show-feedback","related-ques","options-array","ans-id"])])):Me("",!0)]))),128)),D(n).dotLoader?(m(),Q("div",SN,[ne(gN)])):Me("",!0),D(n).userspeaking?(m(),Q("div",MN,[ne(IN)])):Me("",!0)],512))}}),Y1="",vN=je(BN,[["__scopeId","data-v-cd418105"]]),Cg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAYAAAARfGZ1AAABSUlEQVR4nLXWvUocURTA8d/eQosEgmQL0RRTRFCMhYKPYcDCIrUsPoCQNvMEYmEgRYp09luElPsIVmKKJIX4UUQJxMJAXC1mL4zLzjq7O/OHA/P5v+ecmbl3GsoxjVnM4S8u8bvkvYXCFr7hH+774if2sTKqeAu/BggHxR2+oPmUtIG0pLQ/TrE2TP5xTHGMayzkM43s4BMkSSJJkqeqfESn04mbJ1jHTTzQxJ+YQZqm96PSV0EKoSd/jxcjpTqcXTSDrDXvKhTDc7wNWMWriuWwEbBYgxiWguyTroP5IHu6ddANOK9JfhZkL30dfA84ks0LVdOOPT+sWHyDdtyZwZXJJq18fOgfrVWR+BjPBpVzMKH4Cq+LehUXi+4Y4h94UyTOs9m7uIz0Pz7jZRlxZArb+Irbgkz3sFwkaBSdGDBQ/tfiQrakDeUBf+jdzbi9K1QAAAAASUVORK5CYII=",fN={class:"flex items-center gap-4 py-2 rounded-full z-10"},wN={key:0,class:"flex items-center"},mN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},QN=[ur('<rect x="0" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0s"></animate></rect><rect x="4" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.1s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.1s"></animate></rect><rect x="8" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate></rect><rect x="12" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.3s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.3s"></animate></rect><rect x="16" y="4" width="2" height="16" rx="1"><animate attributeName="height" values="16;20;16" dur="1s" repeatCount="indefinite" begin="0.4s"></animate><animate attributeName="y" values="4;2;4" dur="1s" repeatCount="indefinite" begin="0.4s"></animate></rect><rect x="20" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.5s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.5s"></animate></rect><rect x="24" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate></rect><rect x="28" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.7s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.7s"></animate></rect><rect x="32" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0.8s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0.8s"></animate></rect>',9)],RN={key:1,class:"flex items-center"},DN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},yN=[ur('<rect x="0" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0s"></animate></rect><rect x="4" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.1s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.1s"></animate></rect><rect x="8" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate></rect><rect x="12" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.3s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.3s"></animate></rect><rect x="16" y="4" width="2" height="16" rx="1"><animate attributeName="height" values="16;20;16" dur="1s" repeatCount="indefinite" begin="0.4s"></animate><animate attributeName="y" values="4;2;4" dur="1s" repeatCount="indefinite" begin="0.4s"></animate></rect><rect x="20" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.5s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.5s"></animate></rect><rect x="24" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate></rect><rect x="28" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.7s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.7s"></animate></rect><rect x="32" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0.8s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0.8s"></animate></rect>',9)],TN={key:2,class:"flex items-center"},LN=[ur('<svg width="30" height="30" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="12" y="16" width="40" height="32" rx="8" fill="white" stroke="#9CA3AF" stroke-width="2"></rect><circle cx="24" cy="32" r="4" fill="black"></circle><circle cx="40" cy="32" r="4" fill="black"></circle><line x1="32" y1="10" x2="32" y2="16" stroke="#9CA3AF" stroke-width="2"></line><circle cx="32" cy="8" r="2" fill="white"></circle><circle cx="52" cy="14" r="3" fill="white"><animate attributeName="opacity" values="0;1;0" dur="1.2s" begin="0s" repeatCount="indefinite"></animate></circle><circle cx="58" cy="10" r="2.5" fill="white"><animate attributeName="opacity" values="0;1;0" dur="1.2s" begin="0.2s" repeatCount="indefinite"></animate></circle><circle cx="63" cy="6" r="2" fill="white"><animate attributeName="opacity" values="0;1;0" dur="1.2s" begin="0.4s" repeatCount="indefinite"></animate></circle></svg>',1)],ON={class:"tooltiptext text-genpact-darkest-teal"},UN=[h("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-[10px] w-[10px] text-gray-700",fill:"currentColor",viewBox:"0 0 24 24"},[h("path",{d:"M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 14 0h-2zm-5 9a7 7 0 0 0 7-7h2a9 9 0 0 1-8 8.94V22h-2v-1.06A9 9 0 0 1 3 13h2a7 7 0 0 0 7 7z"})],-1)],NN=[h("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-[10px] w-[10px] text-gray-700",fill:"currentColor",viewBox:"0 0 24 24"},[h("path",{d:"M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 14 0h-2zm-5 9a7 7 0 0 0 7-7h2a9 9 0 0 1-8 8.94V22h-2v-1.06A9 9 0 0 1 3 13h2a7 7 0 0 0 7 7z"}),h("line",{x1:"4",y1:"4",x2:"20",y2:"20",stroke:"currentColor","stroke-width":"2"})],-1)],KN=Qe({__name:"NewVoiceConversation",setup(t){const e=ke(),i=At(),n=f(""),o=f(!1),s=f("Turn on mic"),A=()=>{o.value===!1?e.elevenLabs?(console.log("mic enabled true 11labs"),o.value=!0,hg(),Gt.value="user",s.value="Turn off mic"):(console.log("mic enabled true"),o.value=!0,xr(),pU(),Gt.value="user",s.value="Turn off mic"):e.elevenLabs?(console.log("mic enabled false"),Eg(),o.value=!1,s.value="Turn on mic"):(console.log("mic enabled false"),lg(),o.value=!1,s.value="Turn on mic")},r=()=>{e.elevenLabs?(console.log("closeConversation 11 labs"),Eg(),Gt.value="none",o.value=!1):(console.log("closeConversation"),lg(),xr(),Gt.value="none",o.value=!1)},a=async()=>{var c,u,l,g,E,C;try{const d={question:In.value||vA.value};e.conversations.push(d),e.dotLoader=!0,e.question="";const S={past_messages:e.past_messages,question:In.value||vA.value,bandCode:"4A",userGenomeFunction:"HR",userGenomeRole:"Consultant",skillId:"7bd03cb6-79ad-4e2a-8a8b-88dc16147369"},I=await lt("/sqlTest",S);if(Gt.value="bot",n.value=(u=(c=I==null?void 0:I.data)==null?void 0:c.body)==null?void 0:u.answer,n.value===""){console.log("in the if case calling api again");const p=await lt("/sqlTest",S);e.addConversation((l=p.data)==null?void 0:l.body,"new")}else console.log("in the else case"),e.addConversation((g=I.data)==null?void 0:g.body,"new");if(e.dotLoader=!1,e.elevenLabs)await YS(n.value.replace(/[*#]/g,""));else if(n.value.includes("Feedback and Assessment"))if(lg(),o.value=!1,n.value.includes("END ROLE PLAY")){const p=n.value.split("END ROLE PLAY")[0];if(p.length<0){e.showVoiceComponent=!1;return}await gg(p.replace(/[*#]/g,"")),e.showVoiceComponent=!1}else e.showVoiceComponent=!1;else await gg(n.value.replace(/[*#]/g,""))}catch(d){if(console.error(d),ye.isAxiosError(d)){const S=d;console.log("Error found!"),console.error((E=S.response)==null?void 0:E.data),i.setError(((C=S.response)==null?void 0:C.data).message)}else i.setError("There was an issue, please contact helpmate")}};return Qi(In,async c=>{if(c){if(console.log("Recognized text:",c),In.value.toLowerCase().includes("play")&&In.value.length<10){console.log("play command detected, ignoring input");return}Gt.value="listening",e.userspeaking=!1,await a(),In.value=""}}),Qi(vA,async c=>{c&&(console.log("Recognized text:",c),Gt.value="listening",await a(),vA.value="")}),(c,u)=>(m(),Q("div",fN,[D(Gt)==="bot"?(m(),Q("div",wN,[h("span",null,[(m(),Q("svg",mN,QN))])])):D(Gt)==="user"?(m(),Q("div",RN,[h("span",null,[(m(),Q("svg",DN,yN))])])):D(Gt)==="listening"?(m(),Q("div",TN,LN)):Me("",!0),h("div",{class:Ee([o.value?"":"animate-pulse","tooltip"])},[h("span",ON,de(s.value),1),o.value?(m(),Q("button",{key:0,class:"rounded-full bg-white p-2 transition hover:bg-gray-300",onClick:u[0]||(u[0]=l=>A())},UN)):(m(),Q("button",{key:1,class:"rounded-full bg-white p-2 transition hover:bg-gray-300",onClick:u[1]||(u[1]=l=>A())},NN))],2),h("button",{class:"rounded-full bg-white p-2 hover:bg-gray-300",onClick:u[2]||(u[2]=l=>r())},[ne(D(NC),{class:"h-[10px] w-[10px] text-gray-700"})])]))}}),Sn=t=>(at("data-v-586d571d"),t=t(),ct(),t),FN={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},GN={class:"py-2"},xN={class:"flex"},kN={class:"z-1 relative w-full"},jN={class:"flex justify-between my-2 w-full"},YN=Sn(()=>h("div",null,null,-1)),zN={key:0,class:"flex justify-center bg-genpact-darkest-blue px-4 rounded-full"},PN={class:"relative w-full"},bN={class:"absolute inset-y-0 left-0 flex items-center pl-3"},JN={class:"tooltip"},HN=Sn(()=>h("span",{class:"tooltiptext text-genpact-darkest-teal"},"Restart",-1)),qN=[Sn(()=>h("path",{d:"M12 4C8.229 4 6.343 4 5.172 5.172C4.001 6.344 4 8.229 4 12V18C4 18.943 4 19.414 4.293 19.707C4.586 20 5.057 20 6 20H12C15.771 20 17.657 20 18.828 18.828C19.999 17.656 20 15.771 20 12",stroke:"currentColor","stroke-width":"2"},null,-1)),Sn(()=>h("path",{d:"M9 10H15M9 14H12M19 8V2M16 5H22",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1))],VN={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},WN={key:0},ZN=["disabled"],XN=[Sn(()=>h("path",{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z"},null,-1))],_N={key:1,class:"tooltip"},$N=[Sn(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),Sn(()=>h("img",{class:"w-7 h-7",src:Cg,alt:"watingIcon"},null,-1))],eK={class:"flex justify-start gap-2 md:gap-1"},tK=["disabled"],iK=Sn(()=>h("div",{class:"pt-1 text-start font-sans text-xs font-bold text-gray-500 md:text-sm"},[h("div",null," Note: AI-generated response may not be fully accurate; check with experts for critical information. ")],-1)),nK=Qe({__name:"NewQuestionSimulation",setup(t){const e=ke(),i=At(),n=f(""),o=f("");e.question="";const s=f(null),A=f(!1),r=f(Xt),a=f(!1);o.value=e.recognizedText,Nt(()=>{s.value.focus()});const c=()=>{window.location.reload()},u=g=>{const E=g.length;r.value=Xt-E,A.value=E>=Xt},l=async()=>{var g,E,C,d,S,I,p,M;try{if(e.question.trim().length<1){console.log("Please enter answer!");return}a.value=!0,e.dotLoader=!0;const B={question:e.question||e.recognizedText};e.conversations.push(B);const T=f("");T.value=e.question||e.recognizedText,e.question="";const L={ohr_id:n.value,past_messages:e.past_messages,question:T.value||e.recognizedText,bandCode:e.band_code,userGenomeFunction:e.genomeFunctionValue,userGenomeRole:e.genomeRoleValue,skillId:e.simulationSkill||"937e84ef-e95d-4327-9afe-e7be2bf420eb"},O=await lt("/sqlTest",L);if(n.value=(E=(g=O.data)==null?void 0:g.body)==null?void 0:E.ohr,((d=(C=O==null?void 0:O.data)==null?void 0:C.body)==null?void 0:d.answer)===""){console.log("in the if case calling api again");const k=await lt("/sqlTest",L);e.addConversation((S=k.data)==null?void 0:S.body,"new")}else console.log("in the else case"),e.addConversation((I=O.data)==null?void 0:I.body,"new");a.value=!1,e.dotLoader=!1,e.recognizedText=""}catch(B){if(console.error(B),e.dotLoader=!1,ye.isAxiosError(B)){const T=B;console.log("Error found!"),console.error((p=T.response)==null?void 0:p.data),i.setError(((M=T.response)==null?void 0:M.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(g,E)=>(m(),Q("div",FN,[h("div",GN,[h("div",xN,[h("div",kN,[h("div",jN,[YN,D(e).showVoiceComponent?(m(),Q("div",zN,[ne(KN)])):Me("",!0)]),h("div",PN,[h("div",bN,[h("div",JN,[HN,(m(),Q("svg",{onClick:c,class:"ml-2 h-7 w-7 rounded",id:"newTopicDisable",width:"7",height:"",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:"restart"},qN))])]),h("div",VN,[a.value?(m(),Q("div",_N,$N)):(m(),Q("div",WN,[(m(),Q("svg",{disabled:D(e).beginFlag===!0,class:Ee([D(e).beginFlag===!0?"cursor-not-allowed text-gray-600":"cursor-pointer","bi bi-send ml-2 h-7 w-7 rotate-45 rounded"]),onClick:E[0]||(E[0]=C=>D(e).searchBoxdisable===!1||D(e).beginFlag===!0?"":l()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},XN,10,ZN))]))]),h("div",eK,[Le(h("input",{onKeyup:[E[1]||(E[1]=Fu(C=>a.value?"":l(),["enter"])),E[3]||(E[3]=C=>u(D(e).question))],disabled:D(e).beginFlag===!0||D(e).searchBoxdisable===!1,class:Ee([D(e).beginFlag===!0||D(e).searchBoxdisable===!1?"cursor-not-allowed bg-[#e5e7eb]":"bg-white","fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] px-[70px]"]),"onUpdate:modelValue":E[2]||(E[2]=C=>D(e).question=C),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:s},null,42,tK),[[qe,D(e).question]])])]),iK])])])]))}}),_1="",rK=je(nK,[["__scopeId","data-v-586d571d"]]),qc=t=>(at("data-v-a047746e"),t=t(),ct(),t),oK={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},sK={class:"py-2"},AK={class:"flex"},aK={class:"z-1 relative w-full"},cK={class:"relative w-full"},uK={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},lK={key:0},gK=["disabled"],EK=[qc(()=>h("path",{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z"},null,-1))],hK={key:1,class:"tooltip"},CK=[qc(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),qc(()=>h("img",{class:"w-7 h-7",src:Cg,alt:"watingIcon"},null,-1))],IK={class:"flex justify-start gap-2 md:gap-1"},pK=["disabled"],dK=qc(()=>h("div",{class:"pt-1 text-start font-sans text-xs font-bold text-gray-500 md:text-sm"},[h("div",null," Note: AI-generated response may not be fully accurate; check with experts for critical information. ")],-1)),SK=Qe({__name:"NewMDMQuestionSimulation",setup(t){const e=ke(),i=At(),n=f("");e.question="";const o=f(null),s=f(!1),A=f(Xt),r=f(!1);n.value=e.recognizedText,Nt(()=>{o.value.focus()});const a=u=>{const l=u.length;A.value=Xt-l,s.value=l>=Xt},c=async()=>{var u,l,g;console.log("options fdsfdscdzxfsdv",e.recognizedText);try{if(console.log("options fdsfdscdzxfsdv",e.recognizedText),e.question.trim().length<1){console.log("Please enter answer!");return}r.value=!0,e.dotLoader=!0;const E={question:e.question||e.recognizedText};console.log("ques",E),e.conversations.push(E);const C=f("");C.value=e.question||e.recognizedText,e.question="";const d={assessmentId:e.simulationSkill,question:C.value,past_messages:e.past_messages,prompt:e.generatedPrompt,assessmentType:e.assessmentType,userFunction:"HR",empSeniority:e.empSeniority,functionRole:e.functionRole,userBand:e.band_code,storeFinalFeedback:e.storeFinalFeedback,storeFinalScore:e.storeFinalScore};console.log("Payload for MDM1==> ",d);let S;Ai==="prod"?S="/ManualExportActivity":S="/fetchCompletionDemo";const I=await lt(S,d);e.addConversation((u=I.data)==null?void 0:u.body,"new"),r.value=!1,e.dotLoader=!1,e.recognizedText=""}catch(E){if(console.error(E),ye.isAxiosError(E)){const C=E;console.log("Error found!"),console.error((l=C.response)==null?void 0:l.data),i.setError(((g=C.response)==null?void 0:g.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(u,l)=>(m(),Q("div",oK,[h("div",sK,[h("div",AK,[h("div",aK,[h("div",cK,[h("div",uK,[r.value?(m(),Q("div",hK,CK)):(m(),Q("div",lK,[(m(),Q("svg",{disabled:D(e).beginFlag===!0,class:Ee([D(e).beginFlag===!0?"cursor-not-allowed text-gray-600":"cursor-pointer","bi bi-send ml-2 h-7 w-7 rotate-45 rounded"]),onClick:l[0]||(l[0]=g=>D(e).searchBoxdisable===!1||D(e).beginFlag===!0?"":c()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},EK,10,gK))]))]),h("div",IK,[Le(h("input",{onKeyup:[l[1]||(l[1]=Fu(g=>r.value?"":c(),["enter"])),l[3]||(l[3]=g=>a(D(e).question))],disabled:D(e).beginFlag===!0||D(e).searchBoxdisable===!1,class:Ee([D(e).beginFlag===!0||D(e).searchBoxdisable===!1?"cursor-not-allowed bg-[#e5e7eb]":"bg-white","fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] pl-[30px] pr-[70px]"]),"onUpdate:modelValue":l[2]||(l[2]=g=>D(e).question=g),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:o},null,42,pK),[[qe,D(e).question]])])]),dK])])])]))}}),ij="",MK=je(SK,[["__scopeId","data-v-a047746e"]]),BK={},vK={class:"flex min-h-screen justify-center -mt-16"},fK=[h("div",{class:"flex items-center justify-center"},[h("img",{class:"loadercss",src:Li,alt:"Loader Gif"})],-1)];function wK(t,e){return m(),Q("div",vK,fK)}const PS=je(BK,[["render",wK]]),wA=t=>(at("data-v-53597136"),t=t(),ct(),t),mK={class:"max-h-screen overflow-auto md:p-6 p-3 text-[#161916]"},QK={key:0,class:"flex flex-col items-center justify-center gap-4"},RK=[wA(()=>h("div",{class:"text-2xl font-[700]"},"Assessment Access Required",-1)),wA(()=>h("h3",{className:"text-lg font-medium my-6 text-center text-gray-500"}," You don't have access to this assessment. Please contact to administrator ",-1))],DK={key:1,class:"flex flex-col items-center justify-center gap-4"},yK=[wA(()=>h("div",{class:"text-2xl font-[700]"},"Invalid URL",-1)),wA(()=>h("h3",{className:"text-lg font-medium my-6 text-center text-gray-500"}," Invalid URL or assessment not found. Please check the URL or contact support. ",-1))],TK={key:1,className:"h-screen flex flex-col items-stretch"},LK={class:"z-20"},OK=wA(()=>h("div",{class:"mt-6"},null,-1)),UK={class:"flex h-full items-stretch overflow-hidden"},NK={class:"mx-auto w-11/12 bg-white"},KK={class:"relative flex h-full w-full flex-col items-stretch overflow-hidden"},FK={key:0,class:"relative"},GK={key:1,class:"relative"},xK=Qe({__name:"AssessmentSimulation",setup(t){const e=f(!0),i=f(!1),n=f(!1);f(!1),f(!1);const o=ke(),s=At(),A=f(""),r=f(""),a=f(""),c=f(""),u=localStorage.getItem("accessToken");let l="";const g=f("");let E="",C="";const d=f(!1),S=new URL(window.location.href),I=S.searchParams.get("skillId")||S.searchParams.get("assessmentId");r.value=S.searchParams.get("mode")??"",o.simulationSkill=I??"";const p=["703331197","703380812","703331909","703363051","703319578"];Nt(async()=>{e.value=!0,await M(),await T()});const M=async()=>{var L,O,R,k,Y,G,F;try{const $=await Zt(`/getLearnerData?forSimulation=true&skillForSimulation=${o.simulationSkill}`);o.initialize($.data),o.assessmentQuestion||(console.log("getAssessmentDetails========================>"),await B()),e.value=!1,o.simulationSkill==="937e84ef-e95d-4327-9afe-e7be2bf420eb"?o.skillNameForSimulation="GenpactNext":o.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ea"||o.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"?o.skillNameForSimulation="Agentic AI":o.simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&(o.skillNameForSimulation="Data")}catch($){if(console.error($),e.value=!1,ye.isAxiosError($)&&((L=$.response)!=null&&L.status)||$&&typeof $=="object"&&"response"in $&&$.response&&typeof $.response=="object"&&"status"in $.response&&$.response.status){const J=$;if(console.log("Error found!"),console.error((O=J.response)==null?void 0:O.data),((R=J.response)==null?void 0:R.status)===424||((k=J.response)==null?void 0:k.status)===425||((Y=J.response)==null?void 0:Y.status)===400){c.value=(G=J.response)==null?void 0:G.status,console.log("errorCode value",c.value),n.value=!0;return}s.setError(((F=J.response)==null?void 0:F.data).message)}else s.setError("There was an issue, please contact helpmate")}},B=async()=>{var L,O,R,k,Y,G,F,$,J,q,K,X,z,ce,Ae,pe,ve,Ge,Ye,Xe,ze,U,ee,W,te,Se,v,w,y,N,j,P,ie,Z,_,b,se,re,ae,he,fe,xe,Ue,He,It,kt,tt,ti;console.log("Start getAssessmentDetails");try{Ai==="prod"?l=`https://api-v2.genpact.com/api/my-profile/assessment-master/getAssessmentDetailsById?id=${o.simulationSkill}`:l=`https://api-v2-dev.genpact.com/api/my-profile/assessment-master/getAssessmentDetailsById?id=${o.simulationSkill}`;const ue=await Zt(l);A.value=(O=(L=ue==null?void 0:ue.data)==null?void 0:L.data)==null?void 0:O.name,o.skillNameForSimulation=A.value,o.generatedPrompt=(k=(R=ue==null?void 0:ue.data)==null?void 0:R.data)==null?void 0:k.generatedPrompt,o.assessmentType=(G=(Y=ue==null?void 0:ue.data)==null?void 0:Y.data)==null?void 0:G.assessmentType,a.value=($=(F=ue==null?void 0:ue.data)==null?void 0:F.data)==null?void 0:$.status,d.value=(q=(J=ue==null?void 0:ue.data)==null?void 0:J.data)==null?void 0:q.editMode,o.empSeniority=(X=(K=ue==null?void 0:ue.data)==null?void 0:K.data)==null?void 0:X.empSeniority,o.functionRole=(ce=(z=ue==null?void 0:ue.data)==null?void 0:z.data)==null?void 0:ce.functionRole,E=(pe=(Ae=ue==null?void 0:ue.data)==null?void 0:Ae.data)==null?void 0:pe.accessBand,C=(Ge=(ve=ue==null?void 0:ue.data)==null?void 0:ve.data)==null?void 0:Ge.accessOhrList;const _e=(Xe=(Ye=ue==null?void 0:ue.data)==null?void 0:Ye.data)==null?void 0:Xe.createdBy;if(o.mcqType=(U=(ze=ue==null?void 0:ue.data)==null?void 0:ze.data)==null?void 0:U.mcqTypes,o.storeFinalFeedback=(W=(ee=ue==null?void 0:ue.data)==null?void 0:ee.data)==null?void 0:W.storeFinalFeedback,o.storeFinalScore=(Se=(te=ue==null?void 0:ue.data)==null?void 0:te.data)==null?void 0:Se.storeFinalScore,a.value==="inactive")i.value=!0;else if(a.value==="draft")r.value!==cl.DRAFT&&(i.value=!0);else if(a.value==="active"&&d.value&&r.value===cl.DRAFT){Ai==="prod"?l=`https://api-v2.genpact.com/api/my-profile/assessment-master/getDraftAssessmentDetailsById?assessmentId=${o.simulationSkill}`:l=`https://api-v2-dev.genpact.com/api/my-profile/assessment-master/getDraftAssessmentDetailsById?assessmentId=${o.simulationSkill}`;const Pe=await Zt(l);o.generatedPrompt=(w=(v=Pe==null?void 0:Pe.data)==null?void 0:v.data)==null?void 0:w.generatedPrompt,o.assessmentType=(N=(y=Pe==null?void 0:Pe.data)==null?void 0:y.data)==null?void 0:N.assessmentType,o.empSeniority=(P=(j=Pe==null?void 0:Pe.data)==null?void 0:j.data)==null?void 0:P.empSeniority,o.functionRole=(Z=(ie=Pe==null?void 0:Pe.data)==null?void 0:ie.data)==null?void 0:Z.functionRole,o.storeFinalFeedback=(b=(_=Pe==null?void 0:Pe.data)==null?void 0:_.data)==null?void 0:b.storeFinalFeedback,o.storeFinalScore=(re=(se=Pe==null?void 0:Pe.data)==null?void 0:se.data)==null?void 0:re.storeFinalScore,E=(he=(ae=Pe==null?void 0:Pe.data)==null?void 0:ae.data)==null?void 0:he.accessBand,C=(xe=(fe=Pe==null?void 0:Pe.data)==null?void 0:fe.data)==null?void 0:xe.accessOhrList}const Ut=o==null?void 0:o.band_code,ji=(Ue=E==null?void 0:E.split(","))==null?void 0:Ue.map(Pe=>Pe.trim());if(_e===(o==null?void 0:o.ohr)||p.includes(o==null?void 0:o.ohr))console.log("User has access to this assessment.");else{if(ji.length===0&&C.length===0)throw console.log("Both bands and exceptionOHR are empty. Access denied."),{response:{status:424,data:{message:"You don't have access to this assessment. Please contact to administrator"}}};if(ji.includes(Ut)||C.includes(o==null?void 0:o.ohr))console.log("User has access to this assessment.");else throw console.log("User does not have access to this assessment."),{response:{status:424,data:{message:"You don't have access to this assessment. Please contact to administrator"}}}}console.log("end getAssessmentDetails")}catch(ue){if(console.error(ue),e.value=!1,ye.isAxiosError(ue)&&((He=ue.response)!=null&&He.status)||ue&&typeof ue=="object"&&"response"in ue&&ue.response&&typeof ue.response=="object"&&"status"in ue.response&&ue.response.status){const _e=ue;if(console.log("Error found!"),console.error((It=_e.response)==null?void 0:It.data),((kt=_e.response)==null?void 0:kt.status)===424||((tt=_e.response)==null?void 0:tt.status)===425){n.value=!0;return}s.setError(((ti=_e.response)==null?void 0:ti.data).message)}else s.setError("There was an issue, please contact helpmate")}},T=async()=>{var L,O,R,k,Y,G,F,$;try{Ai==="prod"?g.value="https://api-v2.genpact.com/api/delphi/v2/myprofile":g.value="https://api-v2-dev.genpact.com/api/delphi/v2/myprofile";const J=await ye({url:g.value,headers:{authorization:`Bearer ${u}`,"content-type":"application/json"},method:"get"});o.genomeFunctionValue=(R=(O=(L=J==null?void 0:J.data)==null?void 0:L.role_function)==null?void 0:O.function)==null?void 0:R.name,o.genomeRoleValue=(G=(Y=(k=J==null?void 0:J.data)==null?void 0:k.role_function)==null?void 0:Y.role)==null?void 0:G.name}catch(J){if(console.error(J),e.value=!1,ye.isAxiosError(J)){const q=J;console.log("Error found!"),console.error((F=q.response)==null?void 0:F.data),s.setError((($=q.response)==null?void 0:$.data).message)}else s.setError("There was an issue, please contact helpmate")}};return(L,O)=>(m(),Q("section",null,[ne(wr,{"is-visible":n.value},{default:Ei(()=>[h("div",mK,[c.value===424||c.value==="425"?(m(),Q("div",QK,RK)):Me("",!0),c.value===400?(m(),Q("div",DK,yK)):Me("",!0)])]),_:1},8,["is-visible"]),h("div",null,[e.value?(m(),Di(PS,{key:0})):(m(),Q("main",TK,[h("div",LK,[ne(Yy)]),OK,h("div",UK,[h("div",NK,[h("div",KK,[ne(vN),h("div",{class:Ee(D(o).showVoiceComponent===!0?"mt-[160px]":"mt-[120px]")},null,2)]),D(o).assessmentQuestion?(m(),Q("div",FK,[ne(rK)])):(m(),Q("div",GK,[ne(MK)]))])])]))])]))}}),aj="",kK=Object.freeze(Object.defineProperty({__proto__:null,default:je(xK,[["__scopeId","data-v-53597136"]])},Symbol.toStringTag,{value:"Module"})),jK={class:"flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6"},YK=["href"],zK=[h("img",{class:"h-11 w-auto cursor-pointer",src:zC,alt:"Genome Logo"},null,-1)],PK=["href"],bK=[h("img",{class:"h-9 w-28 cursor-pointer md:w-36",src:ul,alt:"Aiguru Logo"},null,-1)],JK=Qe({__name:"headerAMA",setup(t){const e=f(""),i=f("");return Ai==="prod"?e.value="https://genome.genpact.com":e.value="https://genome-dev.genpact.com",Ai==="prod"?i.value="https://genome.genpact.com/#aiguru":i.value="https://genome-dev.genpact.com/#aiguru",(n,o)=>(m(),Q("nav",jK,[h("a",{class:"px-2 md:px-0 lg:px-0",href:e.value,target:"_blank"},zK,8,YK),h("a",{class:"px-2 md:px-0 lg:px-0",href:i.value,target:"_blank"},bK,8,PK)]))}}),HK={class:"flex items-end justify-start"},qK={class:"fontFormattingAMA w-full bg-gray-100 rounded-lg"},VK={class:"w-full rounded-md px-3 py-2 text-lg font-bold text-black text-[18px] md:text-[22px]"},WK=h("div",{class:"w-full px-3 py-2 text-base text-black text-[12px] md:text-[16px] font-[550]"}," Need help with a concept, information on Genpact offerings, productivity tips or Gen AI ideas - Ask me anything ",-1),ZK=h("br",null,null,-1),XK=Qe({__name:"greetingsAMA",setup(t){const e=ke(),i=` Hi ${e.learnerName||"Expert"}, and welcome to ${e.amaSkillName||"SkillName"} !`,n=nt(()=>i);return nt(()=>e.welcomeMessage),(o,s)=>(m(),Q("section",null,[h("div",HK,[h("div",qK,[h("div",VK,de(n.value),1),WK])]),ZK]))}}),_K={class:"fontFormattingAMA flex items-end justify-start py-2"},$K={class:"line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg"},eF=["innerHTML"],tF=Qe({__name:"responseAMA",props:{answer:{type:String,required:!0}},setup(t){const e=t,i=nt(()=>{const n=e.answer.replace(/[*#]/g,"").replace(/Assessment Rating & Feedback/g,'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'),o=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;return n.replace(o,(s,A,r)=>`<a href="${r}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${A}</a>`)});return(n,o)=>(m(),Q("div",_K,[h("div",$K,[h("span",{class:"fontFormattingAMA",innerHTML:i.value},null,8,eF)])]))}}),gj="",iF=je(tF,[["__scopeId","data-v-38edcca6"]]),nF={class:"flex justify-end items-end py-3"},rF={class:"max-w-[80%]"},oF={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},sF=Qe({__name:"learnerAMA",props:{question:{type:String,required:!0}},setup(t){return(e,i)=>(m(),Q("div",nF,[h("div",rF,[h("div",oF,de(t.question),1)])]))}}),AF=t=>(at("data-v-12a02acf"),t=t(),ct(),t),aF={class:"flex w-full flex-col items-start justify-start bg-white"},cF={class:"bot-typing-animation gap-1"},uF={class:"block w-full text-lg italic text-gray-800"},lF=AF(()=>h("span",{class:"dot-animation"},[h("span",null,"."),h("span",null,"."),h("span",null,".")],-1)),gF=ur('<div class="block w-full max-w-full items-stretch" data-v-12a02acf><div class="flex animate-pulse items-start justify-start space-x-4" data-v-12a02acf><div class="flex-1 space-y-6 py-1" data-v-12a02acf><div class="h-2 w-full rounded bg-gray-300" data-v-12a02acf></div><div class="space-y-3" data-v-12a02acf><div class="grid grid-cols-3 gap-4" data-v-12a02acf><div class="col-span-2 h-2 rounded bg-gray-300" data-v-12a02acf></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-12a02acf></div></div><div class="h-2 rounded bg-gray-300" data-v-12a02acf></div></div></div></div></div>',1),EF=Qe({__name:"LoadingResponseAMA",setup(t){const e=f("Generating response"),i=f(["This may take a few seconds","Fetching the best response for you","Thinking... give me a moment","One moment while I gather the information","Hang in tight, we are almost there","Almost there... just a bit longer","Compiling a response for you"]);return setTimeout(()=>{const n=Math.floor(Math.random()*i.value.length);e.value=i.value[n]},15e3),(n,o)=>(m(),Q("div",aF,[h("div",cF,[h("div",uF,de(e.value),1),lF]),gF]))}}),Ej="",hF=je(EF,[["__scopeId","data-v-12a02acf"]]),CF={key:0},IF={key:1},pF={key:0,class:"flex"},dF=Qe({__name:"conversationAMA",setup(t){let e=f(""),i=f("");e.value='<a style="color:#00AECF;"',i.value='<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';const n=ke(),o=f();return Nt(()=>{var r;const s=document.getElementsByName("askQuestion"),A=Array.from(s);s.length&&((r=A==null?void 0:A.pop())==null||r.scrollIntoView({behavior:"smooth",block:"center"}))}),XA(()=>{var r;const s=document.getElementsByName("askQuestion"),A=Array.from(s);s.length&&((r=A==null?void 0:A.pop())==null||r.scrollIntoView({behavior:"smooth",block:"center"}))}),(s,A)=>(m(),Q("div",{ref_key:"nestedElement",ref:o,class:"smooth-scroll overflow-auto md:px-6 px-2"},[ne(XK),(m(!0),Q(Oe,null,Qt(D(n).conversations,(r,a)=>(m(),Q("div",{key:a},[r.question?(m(),Q("div",CF,[ne(sF,{question:r.question,c2question:r.c2question,"show-feedback":r.showFeedback,id:`qId${a}`,name:"askQuestion","que-id":a},null,8,["question","c2question","show-feedback","id","que-id"])])):Me("",!0),r.answer?(m(),Q("div",IF,[ne(iF,{question:r==null?void 0:r.question,c2question:r==null?void 0:r.c2question,"show-sources":r==null?void 0:r.showSources,questionId:r.id,answer:r.answer.replaceAll("<a",D(e)).replaceAll("<ul",D(i)),"show-feedback":r.showFeedback,"related-ques":r.relatedQues,"options-array":r.optionsArray,"ans-id":a},null,8,["question","c2question","show-sources","questionId","answer","show-feedback","related-ques","options-array","ans-id"])])):Me("",!0)]))),128)),D(n).dotLoader?(m(),Q("div",pF,[ne(hF)])):Me("",!0)],512))}}),hj="",SF=je(dF,[["__scopeId","data-v-e6168dd4"]]),Vc=t=>(at("data-v-01b39c11"),t=t(),ct(),t),MF={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},BF={class:"py-2"},vF={class:"flex"},fF={class:"z-1 relative w-full"},wF={class:"relative w-full"},mF={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},QF={key:0},RF=[Vc(()=>h("path",{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z"},null,-1))],DF={key:1,class:"tooltip"},yF=[Vc(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),Vc(()=>h("img",{class:"w-7 h-7",src:Cg,alt:"watingIcon"},null,-1))],TF={class:"flex justify-start"},LF=Vc(()=>h("div",{class:"pt-1 text-start font-sans"},[h("div",{class:"text-xs font-bold text-gray-500 md:text-sm"}," Note: AI-generated response may not be fully accurate; check with experts for critical information. ")],-1)),OF=Qe({__name:"NewQuestionAMA",setup(t){const e=ke(),i=At();e.question="";const n=f(null),o=f(!1),s=f(Xt),A=f(!1);Nt(()=>{n.value.focus()});const r=c=>{const u=c.length;s.value=Xt-u,o.value=u>=Xt},a=async()=>{var c,u,l;try{if(e.question.trim().length<1){i.setError("Please enter answer!");return}A.value=!0,e.dotLoader=!0;const g={question:e==null?void 0:e.question};e.conversations.push(g);const E=f("");E.value=e==null?void 0:e.question,e.question="";const C={AMA:!0,skill_name:e.amaSkillName,question:E.value,past_messages:e.past_messages},d=await lt("/LangchainAgenticCompletion",C);e.addConversation(d==null?void 0:d.data,"new"),A.value=!1,e.dotLoader=!1}catch(g){if(console.error(g),e.dotLoader=!1,A.value=!1,ye.isAxiosError(g)){const E=g;console.log("Error found!"),console.error((c=E.response)==null?void 0:c.data),i.setError((l=(u=E.response)==null?void 0:u.data)==null?void 0:l.message)}else i.setError("There was an issue, please contact helpmate")}};return(c,u)=>(m(),Q("div",MF,[h("div",BF,[h("div",vF,[h("div",fF,[h("div",wF,[h("div",mF,[A.value?(m(),Q("div",DF,yF)):(m(),Q("div",QF,[(m(),Q("svg",{onClick:u[0]||(u[0]=l=>a()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"bi bi-send ml-2 h-7 w-7 rotate-45 rounded",viewBox:"0 0 16 16"},RF))]))]),h("div",TF,[Le(h("input",{onKeyup:[u[1]||(u[1]=Fu(l=>A.value?"":a(),["enter"])),u[3]||(u[3]=l=>r(D(e).question))],"onUpdate:modelValue":u[2]||(u[2]=l=>D(e).question=l),class:"fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] pl-[30px] pr-[70px]",placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:n},null,544),[[qe,D(e).question]])])]),LF])])])]))}}),dj="",UF=je(OF,[["__scopeId","data-v-01b39c11"]]),NF=t=>{var e;return(e=KF.find(i=>i.skill_id===t))==null?void 0:e.skill_name},KF=[{skill_alias:"Client Relationships",skill_name:"Client Relationships",skill_id:"ac3c53d7-c355-429b-b196-799a1084f1e3"},{skill_alias:"Trust and Safety",skill_name:"Trust and Safety",skill_id:"6a46531f-eead-4811-a22c-ba4c6649e52b",skill_master_id:"a1486895-8395-4dba-a891-809ae02a59f0"},{skill_alias:"Retail",skill_name:"Retail",skill_id:"72c55104-2d20-4477-a185-fc76e5855a44"},{skill_alias:"Executive Presence",skill_name:"Executive Presence",skill_id:"3bf308ca-b85c-4f64-94d2-45870aaafa13"},{skill_alias:"Hi-Tech",skill_name:"Hi-Tech",skill_id:"85a1058e-7ba2-4214-a708-7566ba51825f"},{skill_alias:"Impact Commercial Models",skill_name:"Impact Commercial Models",skill_id:"7035d0aa-e6c8-11ec-8fea-0242ac120002"},{skill_alias:"Agile",skill_name:"Agile",skill_id:"6cd7fdaa-e0ab-4190-9a83-ba523f4b5f9f",skill_master_id:"6aba81fb-88c1-49e1-97af-2743be385abf"},{skill_alias:"Collaboration Tools and Methods",skill_name:"Collaboration Tools and Methods",skill_id:"261b3031-ba90-4f12-ba60-25025fc6408e"},{skill_alias:"People Leadership",skill_name:"People Leadership",skill_id:"e3376031-1b14-48b1-b61b-deb68e0c4bb2",skill_master_id:"8500c2a5-dafb-4aa9-acc2-038334147857"},{skill_alias:"Banking and Capital Markets",skill_name:"Banking and Capital Markets",skill_id:"93f65205-4c5b-4767-b778-906a5f3429d0"},{skill_alias:"Information Security",skill_name:"Information Security",skill_id:"a7484d97-5796-4711-bce4-a0786c75f8b5"},{skill_alias:"Supply Chain Management",skill_name:"Supply Chain Management",skill_id:"f1031499-7ce5-4ebc-97f3-00cb5710f3a6"},{skill_alias:"Solution Design",skill_name:"Solution Design",skill_id:"b6619ae7-1671-4f49-b1a6-9f3ffe64de16"},{skill_alias:"Agentic AI",skill_name:"Agentic AI",skill_id:"646ed97a-b7af-49c2-9c0e-be16e7ff47a1"},{skill_alias:"Data Literacy",skill_name:"Data Literacy",skill_id:"7c4ccbbf-a2e7-4f5b-bb81-304478de6d45"},{skill_alias:"Generative AI",skill_name:"Generative AI",skill_id:"f7d42458-5668-447f-806e-f1b7b1025a45",skill_master_id:"f7d42458-5668-447f-806e-f1b7b1025a45"},{skill_alias:"Consulting",skill_name:"Consulting",skill_id:"c693820f-e14d-4080-9531-2c9b1d274dcf"},{skill_alias:"Storytelling",skill_name:"Storytelling",skill_id:"5d1fb5e7-c13c-43e4-9620-00a5e2eed483"},{skill_alias:"Critical Thinking",skill_name:"Critical Thinking",skill_id:"bebdf5d2-249f-4bb4-b81d-896c8646fc45"},{skill_alias:"Sourcing and Procurement",skill_name:"Sourcing and Procurement",skill_id:"84781074-69ac-476a-9d1d-47228a2301f8"},{skill_alias:"Consumer Packaged Goods",skill_name:"Consumer Packaged Goods",skill_id:"fc4bc60a-3038-4db7-9c32-efcfd00adaa8"},{skill_alias:"Customer Care",skill_name:"Customer Care",skill_id:"1c8a37b6-1e2c-46b0-b8e3-019feb72ad0a",skill_master_id:"bed04b67-be6b-405f-96b0-80f0e61f6a86"},{skill_alias:"MS Office",skill_name:"MS Office",skill_id:"ea4ac01d-efec-44fc-9720-a24a1d1a5d05",skill_master_id:"8354fc8d-545f-4d21-b1cb-8908abfd62c4"},{skill_alias:"Commercial Lending and Leasing",skill_name:"Commercial Lending and Leasing",skill_id:"678fa9ff-39fe-4c9d-af2d-d9e92318f126"},{skill_alias:"Integrated Program Management",skill_name:"Integrated Program Management",skill_id:"150d0021-1d76-4447-a08b-dc195c9b114a",skill_master_id:"88a0cb70-87d2-448d-86ba-3a412c60bce2"},{skill_alias:"Lean and Six Sigma",skill_name:"Lean and Six Sigma",skill_id:"90d48eb4-5fea-4bd7-85b9-3170f6bd2b53",skill_master_id:"db5b7b61-0633-4a06-9066-3c6f356dc5c2"},{skill_alias:"Cloud",skill_name:"Cloud",skill_id:"9e018249-fba4-41b8-be19-364ddf78b61d"}],Ig=t=>(at("data-v-466e517f"),t=t(),ct(),t),FF=Ig(()=>h("div",{class:"max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916]"},[h("div",{class:"text-2xl font-[700]"},"Assessment Access Required"),h("h3",{className:"text-lg font-medium my-6 text-center text-gray-500"}," You don't have access to this assessment. Please contact to administrator ")],-1)),GF={key:1,className:"h-screen flex flex-col items-stretch"},xF={class:"z-20"},kF=Ig(()=>h("div",{class:"mt-6"},null,-1)),jF={class:"flex h-full items-stretch overflow-hidden"},YF={class:"mx-auto w-11/12 bg-white"},zF={class:"relative flex h-full w-full flex-col items-stretch overflow-hidden"},PF=Ig(()=>h("div",{class:"mt-[160px]"},null,-1)),bF={class:"relative"},JF=Qe({__name:"AssessmentAMA",setup(t){const e=f(!0),i=f(!1),n=ke(),o=At();f("");const A=f((a=>new URLSearchParams(window.location.search).get(a)||"")("amaId"));n.amaSkillId=A.value??"",Nt(async()=>{e.value=!0,await r(),e.value=!1});const r=async()=>{var a,c,u,l,g;try{if(A.value===null)throw{response:{status:424,data:{message:"Invalid URL"}}};console.log("before calling get learner");const E=await Zt(`/getLearnerData?forSimulation=true&skillForSimulation=${A.value}`);n.initialize(E.data),n.amaSkillName=NF(n.amaSkillId)||"",e.value=!1}catch(E){if(console.error(E),e.value=!1,ye.isAxiosError(E)&&((a=E.response)!=null&&a.status)||E&&typeof E=="object"&&"response"in E&&E.response&&typeof E.response=="object"&&"status"in E.response&&E.response.status){const C=E;if(console.log("Error found!"),console.error((c=C.response)==null?void 0:c.data),((u=C.response)==null?void 0:u.status)===424||((l=C.response)==null?void 0:l.status)===425){i.value=!0;return}o.setError(((g=C.response)==null?void 0:g.data).message)}else o.setError("There was an issue, please contact helpmate")}};return(a,c)=>(m(),Q("section",null,[ne(wr,{"is-visible":i.value},{default:Ei(()=>[FF]),_:1},8,["is-visible"]),h("div",null,[e.value?(m(),Di(PS,{key:0})):(m(),Q("main",GF,[h("div",xF,[ne(JK)]),kF,h("div",jF,[h("div",YF,[h("div",zF,[ne(SF),PF]),h("div",bF,[ne(UF)])])])]))])]))}}),Sj="",HF=Object.freeze(Object.defineProperty({__proto__:null,default:je(JF,[["__scopeId","data-v-466e517f"]])},Symbol.toStringTag,{value:"Module"})),mA=t=>(at("data-v-e4e697db"),t=t(),ct(),t),qF={class:"playground h-full"},VF={class:"grid grid-cols-5 gap-8 px-5 items-stretch"},WF={class:"col-span-4 mt-10"},ZF=mA(()=>h("label",{for:"EmpID",class:"block text-base font-bold text-gray-900"},"EmpID",-1)),XF=mA(()=>h("label",{for:"EmpName",class:"block text-base font-bold text-gray-900"},"EmpName",-1)),_F=mA(()=>h("label",{for:"EmpDesignation",class:"block text-base font-bold text-gray-900 mt-6"},"EmpDesignation",-1)),$F={class:"flex flex-col items-end gap-2"},eG={key:0,id:"button",class:"cursor-pointer"},tG={key:1},iG=[mA(()=>h("img",{class:"w-10 h-10 block mx-auto loadercss",src:Li,alt:"Loader Gif"},null,-1))],nG={class:"mb-12"},rG=mA(()=>h("label",{for:"response",class:"block text-base font-bold text-gray-900 mb-1"},"Response",-1)),oG={class:"line-break min-h-[20vh] p-4 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 w-full shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1"},sG=Qe({__name:"Testcase",setup(t){const e=f(!1),i=f(""),n=f(""),o=f(""),s=f(""),A=At();Nt(()=>{r()});const r=async()=>{var a,c;try{e.value=!0;const u=await Zt("http://localhost:7071/api/fetchCompletionSubDemo1");console.log(u.data),s.value=(a=u.data)==null?void 0:a.body,e.value=!1}catch(u){if(console.log(u),e.value=!1,ye.isAxiosError(u)){const l=u;A.setError(((c=l.response)==null?void 0:c.data).message)}else A.setError("There was an issue, contact to helpmate")}};return(a,c)=>(m(),Q("div",qF,[h("div",VF,[h("div",WF,[h("div",null,[ZF,Le(h("textarea",{"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u),id:"EmpID",rows:"1",class:"w-full mt-1 p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1 resize-none",placeholder:"Write here..."},null,512),[[qe,i.value]])]),h("div",null,[XF,Le(h("textarea",{"onUpdate:modelValue":c[1]||(c[1]=u=>n.value=u),id:"EmpName",rows:"1",class:"w-full mt-1 p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1 resize-none",placeholder:"Write here..."},null,512),[[qe,n.value]])]),h("div",null,[_F,h("div",$F,[Le(h("textarea",{"onUpdate:modelValue":c[2]||(c[2]=u=>o.value=u),id:"EmpDesignation",rows:"1",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1 resize-none",placeholder:"Write here..."},null,512),[[qe,o.value]]),e.value?(m(),Q("div",tG,iG)):(m(),Q("button",eG,[ne(D(UC),{class:"w-7 h-7 fill-genpact-blue-box"})]))])]),h("div",nG,[rG,h("div",oG,de(s.value),1)])])])]))}}),vj="",AG=Object.freeze(Object.defineProperty({__proto__:null,default:je(sG,[["__scopeId","data-v-e4e697db"]])},Symbol.toStringTag,{value:"Module"})),aG={},cG={className:"flex justify-between items-center gap-4 h-14"},uG=[h("div",{class:"text-white font-bold md:text-xl text-base"}," AI Guru Skill Data ",-1),h("img",{class:"md:w-36 w-20",src:Bo},null,-1)];function lG(t,e){return m(),Q("div",cG,uG)}const gG=je(aG,[["render",lG]]),EG={class:"bg-genpact-blue-box w-full px-5 mb-4"},hG={key:0},CG={class:"flex justify-between items-start text-lg px-6"},IG=h("div",null,null,-1),pG={class:"flex justify-start items-center text-white bg-genpact-darkest-blue rounded-lg py-2 px-4 cursor-pointer"},dG={class:"flex justify-start items-start w-full px-6 py-3"},SG=h("div",{class:"md:w-1/2"},null,-1),MG={class:"relative flex justify-start items-end border border-gray-300 md:rounded-full rounded-lg md:w-1/2 w-full"},BG={class:"absolute inset-y-0 left-5 flex items-center"},vG={class:"flex justify-between flex-col md:flex-row items-center w-full border-none py-1 px-1 md:px-2 md:py-2 text-sm md:border md:border-gray-300 rounded-full"},fG={class:"flex justify-start flex-wrap md:gap-2 items-start ml-10 space-y-2 md:space-y-0 md:space-x-1 mx-auto"},wG={class:"flex justify-start items-center"},mG=h("div",{class:"flex items-center"},[h("div",{class:"text-gray-500 font-medium text-sm px-1 py-2 md:px-2 md:py-2 hidden md:flex"}," | ")],-1),QG={class:"flex-grow md:flex-grow-0"},RG={class:"px-6"},DG=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Current Topic List ",-1),yG={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},TG={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},LG=h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Edit")])],-1),OG={class:"px-3 py-4 font-medium text-gray-900"},UG={class:"px-3 py-4"},NG={class:"px-3 py-4 text-center"},KG={class:"px-1.5 py-4 text-center"},FG=["onClick"],GG={key:1,id:"index",class:"flex justify-center items-center bg-genpact-darkest-blue text-white font-bold text-center rounded-lg px-6 py-2 hover:-translate-y-1 hover:scale-100 duration-300"},xG=[h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1)],bS=Object.freeze(Object.defineProperty({__proto__:null,default:Qe({__name:"SkillData",setup(t){const e=f([]),i=f(),n=f(""),o=f(""),s=f(!1),A=f([!0]),r=ke(),a=At(),c=ua(),u=f(""),l=()=>{try{u.value==="user"?(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","user"),c.replace({name:"EditSkillData"})):u.value==="admin"&&(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","admin"),c.replace({name:"EditSkillAdminData"})),r.isTopicPending=!1,r.topicNameForSkillData="",r.descriptionForSkillData="",r.offeringTypeForSkillData="",r.enableInputbox=!0}catch{a.setError("Invalid Router!!")}},g=async(I,p)=>{var M,B,T;try{console.log("isTopicPending------->",r.isTopicPending),r.topicNameForSkillData=I.Topic,r.descriptionForSkillData=I.Description,r.offeringTypeForSkillData=I.OfferingType,r.enableInputbox=!1,A.value[p]=!1;const L=await Zt(`/fetchTempTopic?Topic=${r.topicNameForSkillData}`);r.isTopicPending=!1,console.log("response array length------->",(M=L==null?void 0:L.data)==null?void 0:M.length),((B=L==null?void 0:L.data)==null?void 0:B.length)>0&&(r.isTopicPending=!0),A.value[p]=!0,u.value==="user"?(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","user"),c.replace({name:"EditSkillData"})):u.value==="admin"&&(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","admin"),c.replace({name:"EditSkillAdminData"}))}catch(L){if(console.error(L),ye.isAxiosError(L)){const O=L;a.setError(((T=O.response)==null?void 0:T.data).message)}else a.setError("There was an issue with route")}},E=async()=>{var I,p,M,B,T,L;try{const O=await Zt("/FetchSkillData");console.log("role value ",(I=O==null?void 0:O.data)==null?void 0:I.role),i.value=((p=O==null?void 0:O.data)==null?void 0:p.body)||[],u.value=(M=O==null?void 0:O.data)==null?void 0:M.role,e.value=i.value,console.log("length",(B=O==null?void 0:O.data)==null?void 0:B.body),console.log("data",(T=O==null?void 0:O.data)==null?void 0:T.body)}catch(O){if(console.error(O),ye.isAxiosError(O)){const R=O;a.setError(((L=R.response)==null?void 0:L.data).message)}else a.setError("There was an issue while fetching data")}},C=I=>{console.log(I.target.value),I.target.value===""&&(e.value=i.value),console.log("Invoked topic name Search"),e.value=i.value.filter(p=>p.Topic.toLowerCase().includes(I.target.value.toLowerCase()))},d=I=>{console.log(I.target.value),I.target.value===""&&(e.value=i.value),console.log("Invoked Knowledge Corpus Search"),e.value=i.value.filter(p=>p.OfferingType.toLowerCase().includes(I.target.value.toLowerCase()))},S=()=>{n.value="",o.value="",e.value=i.value};return Nt(async()=>{await E(),s.value=!0,A.value=Array(e.value.length).fill(!0),console.log("array",A.value)}),(I,p)=>(m(),Q(Oe,null,[h("nav",EG,[ne(gG)]),s.value?(m(),Q("div",hG,[h("div",CG,[IG,h("div",pG,[ne(D(_m),{class:"w-7 h-7 mr-1"}),h("button",{onClick:l,class:"font-bold"},"Add New Topic")])]),h("div",dG,[SG,h("div",MG,[h("div",BG,[ne(D(Xm),{class:"w-5 h-5 mr-5 hidden md:flex"})]),h("div",vG,[h("div",fG,[h("div",wG,[Le(h("input",{id:"topic-search",type:"search",onInput:C,"onUpdate:modelValue":p[0]||(p[0]=M=>n.value=M),class:"text-gray-500 font-medium text-sm px-2 py-2 w-full md:w-52 rounded-lg shadow-sm border-none border-gray-500 focus:outline-none focus:border focus:border-genpact-blue-box md:ml-2",placeholder:"enter topic name "},null,544),[[qe,n.value]])]),mG,h("div",QG,[Le(h("input",{id:"offering-search",type:"search",onInput:d,"onUpdate:modelValue":p[1]||(p[1]=M=>o.value=M),class:"text-gray-500 font-medium text-sm px-2 py-2 md:w-52 w-full rounded-lg shadow-sm border-none border-gray-500 focus:outline-none focus:border focus:border-genpact-blue-box",placeholder:"enter knowledge corpus"},null,544),[[qe,o.value]])])]),h("div",{class:"mt-2 md:mt-0"},[h("button",{onClick:S,type:"reset",class:"text-white bg-genpact-blue-box hover:bg-genpact-darkest-blue font-medium rounded-full text-base px-8 py-1"}," Reset ")])])])]),h("div",RG,[DG,h("div",yG,[h("table",TG,[LG,h("tbody",null,[(m(!0),Q(Oe,null,Qt(e.value,(M,B)=>(m(),Q("tr",{key:B,class:"odd:bg-white even:bg-gray-100"},[h("th",OG,de(M.Topic||"title"),1),h("td",UG,de(M.Description||"desc"),1),h("td",NG,de(M.OfferingType||"Knowledge Corpus"),1),h("td",KG,[A.value[B]?(m(),Q("button",{key:0,id:"index",onClick:T=>g(M,B),class:"hover:bg-genpact-darkest-blue bg-genpact-blue-box text-white font-bold py-2 px-6 rounded-lg hover:-translate-y-1 hover:scale-100 duration-300"}," edit ",8,FG)):(m(),Q("div",GG,xG))])]))),128))])])])])])):(m(),Di(ll,{key:1}))],64))}})},Symbol.toStringTag,{value:"Module"})),kG={className:"flex justify-between items-center gap-4 h-14"},jG=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),YG=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Data",-1),zG=h("img",{class:"md:w-36 w-20",src:Bo},null,-1),PG=Qe({__name:"HeaderForEditSkillData",setup(t){const e=ua(),i=()=>{eo(()=>{sessionStorage.removeItem("dataViewAccess")}),e.push({name:"SkillData"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")};return(n,o)=>(m(),Q("div",kG,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[ne(D(OC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),jG]),YG,zG]))}}),ki=t=>(at("data-v-18de1cf9"),t=t(),ct(),t),bG={class:"bg-genpact-blue-box w-full px-5 mb-6"},JG={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},HG=ki(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[We("Topic Name "),h("span",{class:"label"},"*")])],-1)),qG={class:"col-span-4"},VG=["disabled"],WG=ki(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[We("Description "),h("span",{class:"label"},"*")])],-1)),ZG={class:"col-span-4"},XG=ki(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"Knowledge Corpus",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[We("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),_G={class:"col-span-4"},$G=ki(()=>h("div",{class:"col-span-1"},null,-1)),ex={class:"col-span-4"},tx={class:"md:flex block justify-between items-center space-y-2"},ix=["disabled"],nx={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-4 py-2"},rx=[ki(()=>h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],ox=["disabled"],sx={key:3,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-10 py-2"},Ax=[ki(()=>h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],ax=ki(()=>h("div",{class:"col-span-1"},null,-1)),cx={key:0,class:"col-span-4"},ux=[ki(()=>h("div",{class:"p-2 items-center text-lg font-bold bg-gray-200"}," This topic is under review and cannot be submitted again at this moment ",-1))],lx={key:0,class:"pl-16 pr-8 py-2"},gx={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},Ex={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},hx=ki(()=>h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Score")])],-1)),Cx={key:0,class:"px-3 py-4 font-medium text-gray-900 text-center"},Ix={key:1,class:"px-3 py-4"},px={key:2,class:"px-3 py-4 text-center"},dx={key:3,class:"px-3 py-4 text-center"},Sx={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},Mx={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},Bx=Qe({__name:"EditSkillData",setup(t){const e=ke(),i=At(),n=f(!0),o=f(!0),s=f(!1),A=f(""),r=f(""),a=f(!1),c=f(!1),u=f(),l=f(),g=f([]),E=async()=>{var S,I,p,M,B,T,L;try{const O={question:e.descriptionForSkillData};console.log("question",r.value),n.value=!1;const R=await lt("/SearchSkillTags",O);console.log("abc",(S=R==null?void 0:R.data)==null?void 0:S.body),l.value=(p=(I=R==null?void 0:R.data)==null?void 0:I.body)==null?void 0:p.length,console.log("ARRAY LENGTH",l.value),u.value=((M=R==null?void 0:R.data)==null?void 0:M.body)||[],g.value=u.value,console.log("length",(T=(B=R==null?void 0:R.data)==null?void 0:B.body)==null?void 0:T.length),console.log("data",R),n.value=!0,a.value=!0,c.value=!0,console.log("showSubmitButton",c.value)}catch(O){if(console.error(O),n.value=!0,ye.isAxiosError(O)){const R=O;i.setError(((L=R.response)==null?void 0:L.data).message)}else i.setError("We ran into an issue while fetching duplicate values.")}},C=async()=>{var S;try{const I={Topic:e.topicNameForSkillData,Description:e.descriptionForSkillData,OfferingType:e.offeringTypeForSkillData,DuplicateExists:l.value>0?1:0};o.value=!1,console.log("payload-=====>",I);const p=await lt("/InsertIntoTempSkillFile",I);console.log("data",p),A.value="Data Submitted Successfully!",o.value=!0,d()}catch(I){if(console.error(I),o.value=!0,ye.isAxiosError(I)){const p=I;i.setError(((S=p.response)==null?void 0:S.data).message)}else i.setError("There was an issue while inserting data")}},d=()=>{s.value=!0,setTimeout(()=>{s.value=!1,eo(()=>{sessionStorage.removeItem("dataViewAccess")}),Br.push({name:"SkillData"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")},3e3),c.value=!1};return(S,I)=>(m(),Q(Oe,null,[h("nav",bG,[ne(PG)]),h("div",JG,[HG,h("div",qG,[Le(h("input",{disabled:D(e).enableInputbox!==!0,class:Ee([D(e).enableInputbox!==!0?"cursor-not-allowed fill-gray-400":"","w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1"]),type:"text","onUpdate:modelValue":I[0]||(I[0]=p=>D(e).topicNameForSkillData=p),id:"topic",placeholder:"Write here...",required:""},null,10,VG),[[qe,D(e).topicNameForSkillData]])]),WG,h("div",ZG,[Le(h("textarea",{"onUpdate:modelValue":I[1]||(I[1]=p=>D(e).descriptionForSkillData=p),onInput:I[2]||(I[2]=p=>c.value=!1),type:"text",id:"description",rows:"5",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,544),[[qe,D(e).descriptionForSkillData]])]),XG,h("div",_G,[Le(h("input",{"onUpdate:modelValue":I[3]||(I[3]=p=>D(e).offeringTypeForSkillData=p),type:"text",id:"offeringType",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,512),[[qe,D(e).offeringTypeForSkillData]])]),$G,h("div",ex,[h("div",tx,[n.value?(m(),Q("button",{key:0,disabled:D(e).isTopicPending===!0,class:Ee([D(e).isTopicPending===!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center whitespace-nowrap text-white w-40 px-4 py-2 rounded-md font-bold"]),onClick:E,type:"button"}," Duplicate Check ",10,ix)):(m(),Q("div",nx,rx)),o.value?(m(),Q("button",{key:2,disabled:c.value!==!0,class:Ee([c.value!==!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center text-white w-40 px-10 py-2 rounded-md font-bold"]),onClick:C,type:"submit"}," Submit ",10,ox)):(m(),Q("div",sx,Ax))])]),ax,D(e).isTopicPending?(m(),Q("div",cx,ux)):Me("",!0)]),a.value?(m(),Q("div",lx,[h("div",gx,[h("table",Ex,[hx,h("tbody",null,[(m(!0),Q(Oe,null,Qt(g.value,(p,M)=>(m(),Q("tr",{key:M,class:"odd:bg-white even:bg-gray-100"},[p.Topic!==D(e).topicNameForSkillData?(m(),Q("th",Cx,de(p.Topic||"title"),1)):Me("",!0),p.Topic!==D(e).topicNameForSkillData?(m(),Q("td",Ix,de(p.Description||"desc"),1)):Me("",!0),p.Topic!==D(e).topicNameForSkillData?(m(),Q("td",px,de(p.OfferingType||"Knowledge Corpus"),1)):Me("",!0),p.Topic!==D(e).topicNameForSkillData?(m(),Q("td",dx,de(p.new_tag),1)):Me("",!0)]))),128))])])])])):Me("",!0),Le(h("div",Sx,[h("div",Mx,de(A.value),1)],512),[[hr,s.value]])],64))}}),Lj="",vx=Object.freeze(Object.defineProperty({__proto__:null,default:je(Bx,[["__scopeId","data-v-18de1cf9"]])},Symbol.toStringTag,{value:"Module"})),fx={},wx={className:"flex justify-between items-center gap-4 h-14"},mx=[h("div",{class:"text-white font-bold md:text-xl text-base"}," AI Guru Skill Automation ",-1),h("img",{class:"md:w-36 w-20",src:Bo},null,-1)];function Qx(t,e){return m(),Q("div",wx,mx)}const Rx=je(fx,[["render",Qx]]),Dx={class:"bg-genpact-blue-box w-full px-5 mb-4"},yx={key:0},Tx={class:"w-full px-6 py-1"},Lx=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Topic Update Request ",-1),Ox={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},Ux={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},Nx=h("thead",{class:"text-sm text-center md:text-base font-bold text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Duplicate Exist"),h("th",{scope:"col",class:"px-6 py-3"},"View")])],-1),Kx={class:"px-3 py-4 font-medium text-gray-900 text-center"},Fx={class:"px-3 py-4"},Gx={class:"px-3 py-4 text-center"},xx={class:"px-2 py-4 text-center"},kx={class:"px-2 py-4 text-gray-500 hover:text-genpact-darkest-blue"},jx=Object.freeze(Object.defineProperty({__proto__:null,default:Qe({__name:"SkillAutomation",setup(t){const e=f([]),i=f(),n=f(!1),o=ke(),s=At(),A=ua(),r=c=>{sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","skillAutomation"),A.replace({name:"EditSkillAdminData"}),o.topicNameForSkillData=c.Topic,o.descriptionForSkillData=c.Description,o.offeringTypeForSkillData=c.OfferingType,o.enableInputbox=!1},a=async()=>{var c,u;try{const l=await Zt("/sqlTest");i.value=((c=l==null?void 0:l.data)==null?void 0:c.body)||[],e.value=i.value,console.log("length",l.data.length),console.log("data",l.data)}catch(l){if(console.error(l),ye.isAxiosError(l)){const g=l;s.setError(((u=g.response)==null?void 0:u.data).message)}else s.setError("There was an issue while fetching data")}};return Nt(async()=>{await a(),n.value=!0}),(c,u)=>(m(),Q(Oe,null,[h("nav",Dx,[ne(Rx)]),n.value?(m(),Q("div",yx,[h("div",Tx,[Lx,h("div",Ox,[h("table",Ux,[Nx,h("tbody",null,[(m(!0),Q(Oe,null,Qt(e.value,(l,g)=>(m(),Q("tr",{key:g,class:"odd:bg-white even:bg-gray-100"},[h("th",Kx,de(l.Topic||"title"),1),h("td",Fx,de(l.Description||"desc"),1),h("td",Gx,de(l.OfferingType||"Knowledge Corpus"),1),h("td",xx,de(l.DuplicateExists),1),h("td",kx,[ne(D(Wm),{onClick:E=>r(l),class:"w-8 h-8 text-center cursor-pointer hover:-translate-y-1 hover:scale-110 duration-300"},null,8,["onClick"])])]))),128))])])])])])):(m(),Di(ll,{key:1}))],64))}})},Symbol.toStringTag,{value:"Module"})),Yx={className:"flex justify-between items-center gap-4 h-14"},zx=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),Px=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Admin Data",-1),bx=h("img",{class:"md:w-36 w-20",src:Bo},null,-1),Jx=Qe({__name:"HeaderForEditSKillAdminDatas",setup(t){const e=ua(),i=()=>{const n=sessionStorage.getItem("role");console.log("role",n),n==="user"?e.push({name:"SkillData"}):n==="admin"?e.push({name:"SkillData"}):e.push({name:"SkillAutomation"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")};return(n,o)=>(m(),Q("div",Yx,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[ne(D(OC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),zx]),Px,bx]))}}),li=t=>(at("data-v-ecf2c818"),t=t(),ct(),t),Hx={class:"bg-genpact-blue-box w-full px-5 mb-6"},qx={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},Vx=li(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[We("Topic Name "),h("span",{class:"label"},"*")])],-1)),Wx={class:"col-span-4"},Zx=["disabled"],Xx=li(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[We("Description "),h("span",{class:"label"},"*")])],-1)),_x={class:"col-span-4"},$x=li(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"Knowledge Corpus",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[We("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),ek={class:"col-span-4"},tk=li(()=>h("div",{class:"col-span-1"},null,-1)),ik={class:"col-span-4"},nk={class:"grid md:grid-cols-5 grid-cols-1 justify-start items-center gap-2"},rk={class:"col-span-1"},ok=["disabled"],sk={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40"},Ak=[li(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],ak=li(()=>h("div",{class:"col-span-1"},null,-1)),ck=li(()=>h("div",{class:"col-span-1"},null,-1)),uk={class:"col-span-1 flex md:justify-end justify-start items-end"},lk={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},gk=[li(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],Ek={class:"col-span-1 flex md:justify-end justify-start items-end"},hk=["disabled"],Ck={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},Ik=[li(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],pk={class:"pl-16 pr-8 py-2"},dk={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},Sk={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},Mk=li(()=>h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Score")])],-1)),Bk={class:"px-3 py-4 font-medium text-gray-900 text-center"},vk={class:"px-3 py-4"},fk={class:"px-3 py-4 text-center"},wk=li(()=>h("td",{class:"px-3 py-4 text-center"},de("1.05"),-1)),mk={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},Qk={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},Rk=Qe({__name:"EditSkillAdminData",setup(t){const e=ke(),i=At(),n=f(!0),o=f(!0),s=f(!0),A=f(!1),r=f(""),a=f(!1),c=f(!1),u=f(),l=f(),g=f(""),E=f([]),C=async()=>{var p,M,B,T,L,O;try{const R={question:e.descriptionForSkillData};console.log("question",r.value),n.value=!1;const k=await lt("/SearchSkillTags",R);l.value=(M=(p=k==null?void 0:k.data)==null?void 0:p.body)==null?void 0:M.length,console.log("ARRAY LENGTH",l.value),u.value=((B=k==null?void 0:k.data)==null?void 0:B.body)||[],E.value=u.value,console.log("length",(L=(T=k==null?void 0:k.data)==null?void 0:T.body)==null?void 0:L.length),console.log("data",k),n.value=!0,a.value=!0,c.value=!0,console.log("showSubmitButton",c.value)}catch(R){if(console.error(R),n.value=!0,ye.isAxiosError(R)){const k=R;i.setError(((O=k.response)==null?void 0:O.data).message)}else i.setError("We ran into an issue while fetching duplicate values.")}},d=async()=>{var p;try{console.log("before rejecting topic"),o.value=!1;const M=encodeURIComponent(e.topicNameForSkillData),B=await Zt(`/rejectTempTopic?Topic=${M}`);console.log("encoded topic",M),console.log("response",B),o.value=!0,B.status===200&&(e.topicNameForSkillData="",e.descriptionForSkillData="",e.offeringTypeForSkillData="",console.log("after rejecting topic"),g.value="Data Rejected Successfully!",I())}catch(M){if(console.error(M),o.value=!0,ye.isAxiosError(M)){const B=M;i.setError(((p=B.response)==null?void 0:p.data).message)}else i.setError("We ran into an issue while rejecting values.")}},S=async()=>{var p;try{const M={Topic:e.topicNameForSkillData,Description:e.descriptionForSkillData,OfferingType:e.offeringTypeForSkillData};console.log("payload-=====>",M),s.value=!1;const B=await lt("/editMasterSkillFile",M);console.log("data",B),s.value=!0,g.value="Data Submitted Successfully!",I()}catch(M){if(console.error(M),s.value=!0,ye.isAxiosError(M)){const B=M;i.setError(((p=B.response)==null?void 0:p.data).message)}else i.setError("There was an issue while inserting data")}},I=()=>{A.value=!0,setTimeout(()=>{A.value=!1;const p=sessionStorage.getItem("role");console.log("role",p),p==="user"?Br.push({name:"SkillData"}):p==="admin"?Br.push({name:"SkillData"}):Br.push({name:"SkillAutomation"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")},3e3)};return(p,M)=>(m(),Q(Oe,null,[h("nav",Hx,[ne(Jx)]),h("div",qx,[Vx,h("div",Wx,[Le(h("input",{disabled:D(e).enableInputbox!==!0,class:Ee([D(e).enableInputbox!==!0?"cursor-not-allowed fill-gray-400":"","w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1"]),type:"text","onUpdate:modelValue":M[0]||(M[0]=B=>D(e).topicNameForSkillData=B),id:"topic",placeholder:"Write here...",required:""},null,10,Zx),[[qe,D(e).topicNameForSkillData]])]),Xx,h("div",_x,[Le(h("textarea",{"onUpdate:modelValue":M[1]||(M[1]=B=>D(e).descriptionForSkillData=B),onInput:M[2]||(M[2]=B=>c.value=!1),type:"text",id:"description",rows:"5",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,544),[[qe,D(e).descriptionForSkillData]])]),$x,h("div",ek,[Le(h("input",{"onUpdate:modelValue":M[3]||(M[3]=B=>D(e).offeringTypeForSkillData=B),type:"text",id:"offeringType",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,512),[[qe,D(e).offeringTypeForSkillData]])]),tk,h("div",ik,[h("div",nk,[h("div",rk,[n.value?(m(),Q("button",{key:0,disabled:D(e).isTopicPending===!0,class:Ee([D(e).isTopicPending===!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center whitespace-nowrap text-white w-52 px-4 py-2 rounded-md font-bold"]),type:"button",onClick:C}," Duplicate Check ",10,ok)):(m(),Q("div",sk,Ak))]),ak,ck,h("div",uk,[o.value?(m(),Q("button",{key:0,type:"button",onClick:d,class:"bg-genpact-darkest-blue text-center text-white w-52 px-16 py-2 rounded-md font-bold cursor-pointer"}," Reject ")):(m(),Q("div",lk,gk))]),h("div",Ek,[s.value?(m(),Q("button",{key:0,type:"submit",disabled:c.value!==!0,class:Ee([c.value!==!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center text-white w-52 px-2 py-2 rounded-md whitespace-nowrap font-bold"]),onClick:S}," Approve & Submit ",10,hk)):(m(),Q("div",Ck,Ik))])])])]),Le(h("div",pk,[h("div",dk,[h("table",Sk,[Mk,h("tbody",null,[(m(!0),Q(Oe,null,Qt(E.value,(B,T)=>(m(),Q("tr",{key:T,class:"odd:bg-white even:bg-gray-100"},[h("th",Bk,de(B.Topic||"title"),1),h("td",vk,de(B.Description||"desc"),1),h("td",fk,de(B.OfferingType||"Knowledge Corpus"),1),wk]))),128))])])])],512),[[hr,a.value]]),Le(h("div",mk,[h("div",Qk,de(g.value),1)],512),[[hr,A.value]])],64))}}),kj="",Dk=Object.freeze(Object.defineProperty({__proto__:null,default:je(Rk,[["__scopeId","data-v-ecf2c818"]])},Symbol.toStringTag,{value:"Module"})),yk="data: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q4uLqudlylmxs9KQXFs9/Dlh8glPmwpa/SkR0q4SmCC0iPnR3OWGHVck7zT+Pe1MyHtFwtcBOb/VYbnlxjXO1uD68zPrsP08bgyxl/3ueQLhm8uLoeOhhXUA2nAxaSDhH/aeYhzNrew/jaP934PUyvoQW5G/ZZN43yOfwu3Tug6XEFNREBC0ozqD+t7Nr2WY4vL/fpPeQ+1a2kfTqF0cQKf8bthIe5e7M+h9/d7W+aH1dQCxGwsHHlfXx5+fGM28wu6aR/P22APp6xgSvhx7ThaW1F/03mcn4xdyKoz+F3d/ub/d3+pulxBTUQAStJ51L/ZYOV1o/pMPX/PGdFPu4FHl9efpn2wJa8Ucy01/mnVo4A3JeOBix2O2Gfw9vSJLNNx9UYJCv+u1CUiYErundDoW/SrYNfnDA7+znTrPA3v0uvwNPVBa/TzWk+Sz/nvv7p7ng/VvJwoHN9ly5Re24i35vLO0+ZbOdz+N29Gwp9k24dvPi4Sv8mNM8lghVIK/KrtNGYDhF/9J6V2LSCni7/Gn//vNWKO01ye/Hg9V89sRGcXuP0ul83eMi/Sj6Ht6VbCJ89rp67/A9aJgIAIChzAgAgKBEAAEGJAAAISgQAQFAiAACCEgEAEJQIAICgRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAAAISgQAQFAiAACCEgEAEJQIAICgRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAACIaBiG/w+yjGibxxwNWgAAAABJRU5ErkJggg==",Tk={},Lk={class:"w-screen h-screen flex justify-center"},Ok=[h("div",{class:"flex flex-col justify-center items-center gap-6"},[h("img",{class:"h-24",src:yk}),h("div",{class:"font-bold text-[50px] capitalize text-gray-600"},"We are under maintenance"),h("div",{class:"font-medium text-lg capitalize text-gray-600"},"please check back later")],-1)];function Uk(t,e){return m(),Q("div",Lk,Ok)}const JS=Object.freeze(Object.defineProperty({__proto__:null,default:je(Tk,[["render",Uk]])},Symbol.toStringTag,{value:"Module"}))});
35
+ This is a role-play simulation designed to mirror real-world scenarios. Just follow the prompts, speak naturally, and let the AI guide you. Based on your responses, you’ll receive personalized feedback to help sharpen your client engagement skills.`,KU=Qe({__name:"greetingsSimulation",setup(t){const e=ke(),i=At(),n=f(!1),o=f(!1),s=f(!0),A=()=>{e.simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"?(e.beginFlag=!1,n.value=!0):(e.beginFlag=!1,C())},r=`Hi, get ready to test your ${e.skillNameForSimulation||"Unknown"} knowledge! Here’s what to expect:`,a=` Hi ${e.learnerName||"Expert"}, and welcome!`,c=` Hi, ${e.learnerName||"Expert"}. Get ready to test your ${e.skillNameForSimulation||"Unknown"} knowledge! Here’s what to expect:`,u=nt(()=>["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill)?r:["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill)?a:c),l=`Hi, get ready to test your ${e.skillNameForSimulation||"Unknown"} knowledge! Here’s what to expect:`,g=` AI Guru will ask you a few questions on '${e.skillNameForSimulation.trim()||"Unknown"} '. Please provide detailed and thoughtful answers to the best of your knowledge. At the end, you'll receive a feedback, outlining your strengths and improvement areas.`,E=nt(()=>["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill)?l:["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill)?NU:g),C=async()=>{var d,S,I,p,M,B;console.log("firstQuestion fired==>"),s.value=!1;try{const T={question:"Hello, let's start"};if(e.conversations.push(T),e.assessmentQuestion){const L={past_messages:e.past_messages,question:"Let's begin",bandCode:e.band_code,userGenomeFunction:e.genomeFunctionValue,userGenomeRole:e.genomeRoleValue,skillId:e.simulationSkill||"937e84ef-e95d-4327-9afe-e7be2bf420eb"},O=f("");e.dotLoader=!0,Gt.value="listening";const R=await lt("/sqlTest",L);e.addConversation((d=R.data)==null?void 0:d.body,"new"),O.value=(I=(S=R==null?void 0:R.data)==null?void 0:S.body)==null?void 0:I.answer,e.dotLoader=!1,Gt.value="bot",e.showVoiceComponent&&(e.elevenLabs?await YS(O.value.replace(/[*#]/g,"")):await gg(O.value.replace(/[*#]/g,"")))}else{o.value=!0,e.dotLoader=!0,console.log("firstQuestion fired==> else part");const L={assessmentId:e.simulationSkill,question:"Hello, Let's begin",past_messages:e.past_messages,prompt:e.generatedPrompt,assessmentType:e.assessmentType,userFunction:e.genomeFunctionValue,empSeniority:e.empSeniority,functionRole:e.functionRole,userBand:e,storeFinalFeedback:e.storeFinalFeedback,storeFinalScore:e.storeFinalScore};let O;Ai==="prod"?O="/ManualExportActivity":O="/fetchCompletionDemo";const R=await lt(O,L);e.addConversation((p=R.data)==null?void 0:p.body,"assessment"),e.dotLoader=!1}}catch(T){if(console.error(T),e.dotLoader=!1,ye.isAxiosError(T)){const L=T;console.log("Error found!"),console.error((M=L.response)==null?void 0:M.data),i.setError(((B=L.response)==null?void 0:B.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(d,S)=>(m(),Q("section",null,[ne(wr,{"is-visible":n.value},{default:Ei(()=>[h("div",mU,[QU,RU,h("button",{onClick:S[0]||(S[0]=I=>{n.value=!1,C()}),class:"bg-[#021c42] rounded-md px-4 py-1.5 text-center text-[16px] text-white cursor-pointer italic hover:bg-blue-700"}," Proceed ")])]),_:1},8,["is-visible"]),h("div",DU,[h("div",yU,[h("div",TU,de(u.value),1),h("div",LU,de(E.value),1)])]),D(e).beginFlag?(m(),Q("span",OU,[h("button",{type:"button",id:"button",onClick:A,class:"mt-4 bg-[#021c42] rounded-md px-4 py-1.5 text-center text-[16px] text-white cursor-pointer italic hover:bg-blue-700 w-32"}," Let's begin ")])):Me("",!0),UU]))}}),FU="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD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uFACOu+Nl9QRXiF78CL+bWby/tfEUtsbiQuRHlTg9uK9wooA8L/AOFE63/0N95/38b/ABpsnwG1iWNo5PFl06MOVZ2IP617tRQByHgPwSnhDwqdFuJVvEaRnbevBz7V0VtpGm2coltrC2hkAwGSIA1dooAgurS2vYvKureOaPOdsihhn8ac8I+ytBGBGpQqu0Y28VLRQB5/4T+H174ft9ahutYmvBqAYLvJOzOa8/H7Oc6zGVNeKNuyCq4Ir6AooA8f8PfBzUdK162vr3xFcXtvEcvBKxZX9iDXp/8AYOkZ/wCQXZ/9+V/wrRooA8X8T/BC61/WLm5TW3htJH3JbY+RPoOldD4r+GL+I/Cuj6Mt95f9nhQXI+/ivR6KAKGlaVa6VZQ29tbxRlI1RmRAu4gYyav0UUAf/9k=",zS=t=>(at("data-v-f88c6557"),t=t(),ct(),t),GU={class:"fontFormattingAMA flex items-end justify-start py-2"},xU={class:"line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg"},kU=["innerHTML"],jU=["innerHTML"],YU={key:0,class:"py-4"},zU={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},PU=["value","disabled","name"],bU={for:"item",name:"options-Array",id:"index"},JU={key:1,class:"py-4"},HU={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},qU=["onClick","disabled","name"],VU={for:"item",name:"options-Array",id:"index"},WU={key:2,class:"flex flex-col justify-start py-10"},ZU=[zS(()=>h("div",{class:"mb-4"}," Add Agentic AI to your Digital Skills on Genome.ai and start mastering AI today! ",-1)),zS(()=>h("img",{class:"h-20 w-20",src:FU,alt:"qr_code"},null,-1))],XU={key:3,class:"flex flex-col justify-start items-start bg-gray-100 rounded-lg"},_U={class:"flex justify-start items-center md:gap-[40px] gap-[30px]"},$U=Qe({__name:"responseSimulation",props:{question:{type:String,required:!0},answer:{type:String,required:!0},questionId:{type:String,required:!0},showFeedback:{type:Boolean,default:!0},optionsArray:{type:Array,default:[]},ansId:{type:Number,default:0}},emits:["char-typed"],setup(t,{emit:e}){const i=t,n=f([]),o=f(!1),s=ke(),A=f("");let r=[],a="";const c=async()=>{r=a.split(""),A.value="";for(let g=0;g<r.length;g++)A.value+=r[g],i.answer.includes("Feedback and Assessment")?(console.log("Feedback and Assessment found"),a.length-5>r.length&&g%30&&e("char-typed")):g%30&&e("char-typed"),await new Promise(E=>setTimeout(E,50))},u=()=>{s.isRestart=!0,s.beginFlag=!0,s.showVoiceComponent=!0,s.showSelectTypeConvesation=!1,s.showModelToggle=!0,s.isSpeechToggle=!1},l=nt(()=>{const g=i.answer.replace(/[*#]/g,"").replace(/Assessment Rating & Feedback/g,'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>').replace(/BEGIN ROLE PLAY./g,'<div style="font-size: 18px; font-weight: bold;">BEGIN ROLE PLAY</div>').replace(/Feedback and Assessment:/g,'<div style="font-size: 16px; font-weight: bold;">Feedback and Assessment</div>').replace(/Feedback and Assessment/g,'<div style="font-size: 16px; font-weight: bold;">Feedback and Assessment</div>').replace(/Overall Assessment:/g,'<div style="font-size: 16px; font-weight: bold;">Overall Assessment</div>').replace(/Overall Assessment/g,'<div style="font-size: 16px; font-weight: bold;">Overall Assessment</div>').replace(/Overall Rating:/g,'<div style="font-size: 16px; font-weight: bold;">Overall Rating</div>').replace(/Overall Rating/g,'<div style="font-size: 16px; font-weight: bold;">Overall Rating</div>').replace(/Model Solution:/g,'<div style="font-size: 16px; font-weight: bold;">Model Solution</div>').replace(/Model Solution/g,'<div style="font-size: 16px; font-weight: bold;">Model Solution</div>');(g.includes("Thank you for your participation!")||g.includes("Thank you for your participation"))&&(s.searchBoxdisable=!1,o.value=!0),(g.includes("BEGIN ROLE PLAY")||g.includes("BEGIN ROLE PLAY."))&&(s.showSelectTypeConvesation=!0);const E=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;if(g.includes("AI Guru")){if(g.includes("AI Guru"))return console.log("aig found"),g.replace(E,(C,d,S)=>`<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${d}</a>`)}else return g.replace(E,(C,d,S)=>`<a href="${S}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${d}</a>`)});return Qi(()=>i.answer,()=>{let g=i.answer.replace(/[*#]/g,"").replace(/Assessment Rating & Feedback/g,'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>').replace(/Feedback and Assessment:/g,'<div style="font-size: 16px; font-weight: bold;">Feedback and Assessment</div>').replace(/Feedback and Assessment/g,'<div style="font-size: 16px; font-weight: bold;">Feedback and Assessment</div>').replace(/Overall Assessment:/g,'<div style="font-size: 16px; font-weight: bold;">Overall Assessment</div>').replace(/Overall Assessment/g,'<div style="font-size: 16px; font-weight: bold;">Overall Assessment</div>').replace(/Overall Rating:/g,'<div style="font-size: 16px; font-weight: bold;">Overall Rating</div>').replace(/Overall Rating/g,'<div style="font-size: 16px; font-weight: bold;">Overall Rating</div>').replace(/Model Solution:/g,'<div style="font-size: 16px; font-weight: bold;">Model Solution</div>').replace(/Model Solution/g,'<div style="font-size: 16px; font-weight: bold;">Model Solution</div>');const E=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;g.includes("AI Guru")?g=g.replace(E,(C,d,S)=>`<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${d}</a>`):g=g.replace(E,(C,d,S)=>`<a href="${S}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${d}</a>`),g.includes("Feedback and Assessment")&&g.includes("END ROLE PLAY")?(a=g.split("END ROLE PLAY")[0],console.log("END ROLE PLAY")):a=g,s.showVoiceComponent&&c()},{immediate:!0}),Qi(n,g=>{s.question=(g??[]).join(", ")}),(g,E)=>(m(),Q("div",GU,[h("div",xU,[D(s).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&D(s).showVoiceComponent===!0&&D(s).conversations.length-1===i.ansId&&!i.answer.includes("BEGIN ROLE PLAY")?(m(),Q("span",{key:0,class:"fontFormattingAMA",innerHTML:A.value},null,8,kU)):(m(),Q("span",{key:1,class:"fontFormattingAMA",innerHTML:l.value},null,8,jU)),h("div",null,[t.optionsArray.length&&D(s).mcqType==="multi_choice"?(m(),Q("div",YU,[(m(!0),Q(Oe,null,Qt(t.optionsArray,(C,d)=>(m(),Q("div",{key:d,class:"italic"},[h("div",zU,[Le(h("input",{class:"mr-4 cursor-pointer",type:"checkbox",value:C,"onUpdate:modelValue":E[0]||(E[0]=S=>n.value=S),disabled:D(s).conversations.length-1!==i.ansId,name:l.value},null,8,PU),[[Gv,n.value]]),h("label",bU,de(C),1)])]))),128))])):t.optionsArray.length?(m(),Q("div",JU,[(m(!0),Q(Oe,null,Qt(t.optionsArray,(C,d)=>(m(),Q("div",{key:d,class:"italic"},[h("div",HU,[h("input",{class:"mr-4 cursor-pointer",type:"radio",onClick:S=>D(s).question=String(t.optionsArray[d]),disabled:D(s).conversations.length-1!==i.ansId,name:l.value},null,8,qU),h("label",VU,de(C),1)])]))),128))])):Me("",!0)]),o.value&&D(s).simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"?(m(),Q("div",WU,ZU)):Me("",!0),D(s).isSpeechToggle&&D(s).showSelectTypeConvesation&&D(s).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&D(s).conversations.length-1===i.ansId?(m(),Q("div",XU,[h("div",_U,[h("button",{type:"button",id:"button",onClick:E[1]||(E[1]=C=>u()),class:"mt-4 cursor-pointer bg-[#021c42] hover:bg-blue-700 italic rounded-md px-4 py-2 text-center text-white text-[16px]"}," Start Conversation ")])])):Me("",!0)])]))}}),k1="",eN=je($U,[["__scopeId","data-v-f88c6557"]]),tN={class:"flex justify-end items-end py-3"},iN={class:"max-w-[80%]"},nN={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},rN=Qe({__name:"learnerSimulation",props:{question:{type:String,required:!0},showFeedback:{type:Boolean,default:!0}},setup(t){return(e,i)=>(m(),Q("div",tN,[h("div",iN,[h("div",nN,de(t.question),1)])]))}}),oN=t=>(at("data-v-347ad6de"),t=t(),ct(),t),sN={class:"flex w-full flex-col items-start justify-start bg-white"},AN={class:"bot-typing-animation gap-1"},aN={class:"block w-full text-lg italic text-gray-800"},cN=oN(()=>h("span",{class:"dot-animation"},[h("span",null,"."),h("span",null,"."),h("span",null,".")],-1)),uN=ur('<div class="block w-full max-w-full items-stretch" data-v-347ad6de><div class="flex animate-pulse items-start justify-start space-x-4" data-v-347ad6de><div class="flex-1 space-y-6 py-1" data-v-347ad6de><div class="h-2 w-full rounded bg-gray-300" data-v-347ad6de></div><div class="space-y-3" data-v-347ad6de><div class="grid grid-cols-3 gap-4" data-v-347ad6de><div class="col-span-2 h-2 rounded bg-gray-300" data-v-347ad6de></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-347ad6de></div></div><div class="h-2 rounded bg-gray-300" data-v-347ad6de></div></div></div></div></div>',1),lN=Qe({__name:"LoadingResponse",setup(t){const e=f("Generating response"),i=f(["This may take a few seconds","Fetching the best response for you","Thinking... give me a moment","One moment while I gather the information","Hang in tight, we are almost there","Almost there... just a bit longer","Compiling a response for you"]);return setTimeout(()=>{const n=Math.floor(Math.random()*i.value.length);e.value=i.value[n]},15e3),(n,o)=>(m(),Q("div",sN,[h("div",AN,[h("div",aN,de(e.value),1),cN]),uN]))}}),j1="",gN=je(lN,[["__scopeId","data-v-347ad6de"]]),EN={class:"flex mx-auto justify-end items-end py-3"},hN={class:"max-w-[80%]"},CN={key:0,class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},IN=Qe({__name:"QuestionStreaming",setup(t){const e=ke();return(i,n)=>(m(),Q("div",EN,[h("div",hN,[D(e).userSpeechText.toLowerCase().includes("play")&&D(e).userSpeechText.length<10?Me("",!0):(m(),Q("div",CN,de(D(e).userSpeechText),1))])]))}}),pN={key:0},dN={key:1},SN={key:0,class:"flex"},MN={key:1,name:"askQuestion"},BN=Qe({__name:"conversationSimulation",setup(t){let e=f(""),i=f("");e.value='<a style="color:#00AECF;"',i.value='<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';const n=ke(),o=f(),s=()=>{o.value.scrollTo(0,o.value.scrollHeight)};return Nt(()=>{var a;const A=document.getElementsByName("askQuestion"),r=Array.from(A);A.length&&((a=r==null?void 0:r.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"})),window.addEventListener("custom-event",s)}),XA(()=>{var a;const A=document.getElementsByName("askQuestion"),r=Array.from(A);A.length&&((a=r==null?void 0:r.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"}))}),eo(()=>{window.removeEventListener("custom-event",s)}),(A,r)=>(m(),Q("div",{ref_key:"nestedElement",ref:o,class:"smooth-scroll overflow-auto md:px-6 px-2"},[ne(KU),(m(!0),Q(Oe,null,Qt(D(n).conversations,(a,c)=>(m(),Q("div",{key:c},[a.question?(m(),Q("div",pN,[ne(rN,{question:a.question,c2question:a.c2question,"show-feedback":a.showFeedback,id:`qId${c}`,name:"askQuestion","que-id":c},null,8,["question","c2question","show-feedback","id","que-id"])])):Me("",!0),a.answer?(m(),Q("div",dN,[ne(eN,{question:a==null?void 0:a.question,c2question:a==null?void 0:a.c2question,"show-sources":a==null?void 0:a.showSources,questionId:a.id,answer:a.answer.replaceAll("<a",D(e)).replaceAll("<ul",D(i)),"show-feedback":a.showFeedback,"related-ques":a.relatedQues,"options-array":a.optionsArray,"ans-id":c,onCharTyped:s},null,8,["question","c2question","show-sources","questionId","answer","show-feedback","related-ques","options-array","ans-id"])])):Me("",!0)]))),128)),D(n).dotLoader?(m(),Q("div",SN,[ne(gN)])):Me("",!0),D(n).userspeaking?(m(),Q("div",MN,[ne(IN)])):Me("",!0)],512))}}),Y1="",vN=je(BN,[["__scopeId","data-v-cd418105"]]),Cg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAYAAAARfGZ1AAABSUlEQVR4nLXWvUocURTA8d/eQosEgmQL0RRTRFCMhYKPYcDCIrUsPoCQNvMEYmEgRYp09luElPsIVmKKJIX4UUQJxMJAXC1mL4zLzjq7O/OHA/P5v+ecmbl3GsoxjVnM4S8u8bvkvYXCFr7hH+774if2sTKqeAu/BggHxR2+oPmUtIG0pLQ/TrE2TP5xTHGMayzkM43s4BMkSSJJkqeqfESn04mbJ1jHTTzQxJ+YQZqm96PSV0EKoSd/jxcjpTqcXTSDrDXvKhTDc7wNWMWriuWwEbBYgxiWguyTroP5IHu6ddANOK9JfhZkL30dfA84ks0LVdOOPT+sWHyDdtyZwZXJJq18fOgfrVWR+BjPBpVzMKH4Cq+LehUXi+4Y4h94UyTOs9m7uIz0Pz7jZRlxZArb+Irbgkz3sFwkaBSdGDBQ/tfiQrakDeUBf+jdzbi9K1QAAAAASUVORK5CYII=",fN={class:"flex items-center gap-4 py-2 rounded-full z-10"},wN={key:0,class:"flex items-center"},mN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},QN=[ur('<rect x="0" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0s"></animate></rect><rect x="4" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.1s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.1s"></animate></rect><rect x="8" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate></rect><rect x="12" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.3s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.3s"></animate></rect><rect x="16" y="4" width="2" height="16" rx="1"><animate attributeName="height" values="16;20;16" dur="1s" repeatCount="indefinite" begin="0.4s"></animate><animate attributeName="y" values="4;2;4" dur="1s" repeatCount="indefinite" begin="0.4s"></animate></rect><rect x="20" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.5s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.5s"></animate></rect><rect x="24" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate></rect><rect x="28" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.7s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.7s"></animate></rect><rect x="32" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0.8s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0.8s"></animate></rect>',9)],RN={key:1,class:"flex items-center"},DN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},yN=[ur('<rect x="0" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0s"></animate></rect><rect x="4" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.1s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.1s"></animate></rect><rect x="8" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate></rect><rect x="12" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.3s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.3s"></animate></rect><rect x="16" y="4" width="2" height="16" rx="1"><animate attributeName="height" values="16;20;16" dur="1s" repeatCount="indefinite" begin="0.4s"></animate><animate attributeName="y" values="4;2;4" dur="1s" repeatCount="indefinite" begin="0.4s"></animate></rect><rect x="20" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.5s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.5s"></animate></rect><rect x="24" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate></rect><rect x="28" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.7s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.7s"></animate></rect><rect x="32" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0.8s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0.8s"></animate></rect>',9)],TN={key:2,class:"flex items-center"},LN=[ur('<svg width="30" height="30" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="12" y="16" width="40" height="32" rx="8" fill="white" stroke="#9CA3AF" stroke-width="2"></rect><circle cx="24" cy="32" r="4" fill="black"></circle><circle cx="40" cy="32" r="4" fill="black"></circle><line x1="32" y1="10" x2="32" y2="16" stroke="#9CA3AF" stroke-width="2"></line><circle cx="32" cy="8" r="2" fill="white"></circle><circle cx="52" cy="14" r="3" fill="white"><animate attributeName="opacity" values="0;1;0" dur="1.2s" begin="0s" repeatCount="indefinite"></animate></circle><circle cx="58" cy="10" r="2.5" fill="white"><animate attributeName="opacity" values="0;1;0" dur="1.2s" begin="0.2s" repeatCount="indefinite"></animate></circle><circle cx="63" cy="6" r="2" fill="white"><animate attributeName="opacity" values="0;1;0" dur="1.2s" begin="0.4s" repeatCount="indefinite"></animate></circle></svg>',1)],ON={class:"tooltiptext text-genpact-darkest-teal"},UN=[h("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-[10px] w-[10px] text-gray-700",fill:"currentColor",viewBox:"0 0 24 24"},[h("path",{d:"M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 14 0h-2zm-5 9a7 7 0 0 0 7-7h2a9 9 0 0 1-8 8.94V22h-2v-1.06A9 9 0 0 1 3 13h2a7 7 0 0 0 7 7z"})],-1)],NN=[h("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-[10px] w-[10px] text-gray-700",fill:"currentColor",viewBox:"0 0 24 24"},[h("path",{d:"M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 14 0h-2zm-5 9a7 7 0 0 0 7-7h2a9 9 0 0 1-8 8.94V22h-2v-1.06A9 9 0 0 1 3 13h2a7 7 0 0 0 7 7z"}),h("line",{x1:"4",y1:"4",x2:"20",y2:"20",stroke:"currentColor","stroke-width":"2"})],-1)],KN=Qe({__name:"NewVoiceConversation",setup(t){const e=ke(),i=At(),n=f(""),o=f(!1),s=f("Turn on mic"),A=()=>{o.value===!1?e.elevenLabs?(console.log("mic enabled true 11labs"),o.value=!0,hg(),Gt.value="user",s.value="Turn off mic"):(console.log("mic enabled true"),o.value=!0,xr(),pU(),Gt.value="user",s.value="Turn off mic"):e.elevenLabs?(console.log("mic enabled false"),Eg(),o.value=!1,s.value="Turn on mic"):(console.log("mic enabled false"),lg(),o.value=!1,s.value="Turn on mic")},r=()=>{e.elevenLabs?(console.log("closeConversation 11 labs"),Eg(),Gt.value="none",o.value=!1):(console.log("closeConversation"),lg(),xr(),Gt.value="none",o.value=!1)},a=async()=>{var c,u,l,g,E,C;try{const d={question:In.value||vA.value};e.conversations.push(d),e.dotLoader=!0,e.question="";const S={past_messages:e.past_messages,question:In.value||vA.value,bandCode:"4A",userGenomeFunction:"HR",userGenomeRole:"Consultant",skillId:"7bd03cb6-79ad-4e2a-8a8b-88dc16147369"},I=await lt("/sqlTest",S);if(Gt.value="bot",n.value=(u=(c=I==null?void 0:I.data)==null?void 0:c.body)==null?void 0:u.answer,n.value===""){console.log("in the if case calling api again");const p=await lt("/sqlTest",S);e.addConversation((l=p.data)==null?void 0:l.body,"new")}else console.log("in the else case"),e.addConversation((g=I.data)==null?void 0:g.body,"new");if(e.dotLoader=!1,e.elevenLabs)await YS(n.value.replace(/[*#]/g,""));else if(n.value.includes("Feedback and Assessment"))if(lg(),o.value=!1,n.value.includes("END ROLE PLAY")){const p=n.value.split("END ROLE PLAY")[0];if(p.length<0){e.showVoiceComponent=!1;return}await gg(p.replace(/[*#]/g,"")),e.showVoiceComponent=!1}else e.showVoiceComponent=!1;else await gg(n.value.replace(/[*#]/g,""))}catch(d){if(console.error(d),ye.isAxiosError(d)){const S=d;console.log("Error found!"),console.error((E=S.response)==null?void 0:E.data),i.setError(((C=S.response)==null?void 0:C.data).message)}else i.setError("There was an issue, please contact helpmate")}};return Qi(In,async c=>{if(c){if(console.log("Recognized text:",c),In.value.toLowerCase().includes("play")&&In.value.length<10){console.log("play command detected, ignoring input");return}Gt.value="listening",e.userspeaking=!1,await a(),In.value=""}}),Qi(vA,async c=>{c&&(console.log("Recognized text:",c),Gt.value="listening",await a(),vA.value="")}),(c,u)=>(m(),Q("div",fN,[D(Gt)==="bot"?(m(),Q("div",wN,[h("span",null,[(m(),Q("svg",mN,QN))])])):D(Gt)==="user"?(m(),Q("div",RN,[h("span",null,[(m(),Q("svg",DN,yN))])])):D(Gt)==="listening"?(m(),Q("div",TN,LN)):Me("",!0),h("div",{class:Ee([o.value?"":"animate-pulse","tooltip"])},[h("span",ON,de(s.value),1),o.value?(m(),Q("button",{key:0,class:"rounded-full bg-white p-2 transition hover:bg-gray-300",onClick:u[0]||(u[0]=l=>A())},UN)):(m(),Q("button",{key:1,class:"rounded-full bg-white p-2 transition hover:bg-gray-300",onClick:u[1]||(u[1]=l=>A())},NN))],2),h("button",{class:"rounded-full bg-white p-2 hover:bg-gray-300",onClick:u[2]||(u[2]=l=>r())},[ne(D(NC),{class:"h-[10px] w-[10px] text-gray-700"})])]))}}),Sn=t=>(at("data-v-586d571d"),t=t(),ct(),t),FN={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},GN={class:"py-2"},xN={class:"flex"},kN={class:"z-1 relative w-full"},jN={class:"flex justify-between my-2 w-full"},YN=Sn(()=>h("div",null,null,-1)),zN={key:0,class:"flex justify-center bg-genpact-darkest-blue px-4 rounded-full"},PN={class:"relative w-full"},bN={class:"absolute inset-y-0 left-0 flex items-center pl-3"},JN={class:"tooltip"},HN=Sn(()=>h("span",{class:"tooltiptext text-genpact-darkest-teal"},"Restart",-1)),qN=[Sn(()=>h("path",{d:"M12 4C8.229 4 6.343 4 5.172 5.172C4.001 6.344 4 8.229 4 12V18C4 18.943 4 19.414 4.293 19.707C4.586 20 5.057 20 6 20H12C15.771 20 17.657 20 18.828 18.828C19.999 17.656 20 15.771 20 12",stroke:"currentColor","stroke-width":"2"},null,-1)),Sn(()=>h("path",{d:"M9 10H15M9 14H12M19 8V2M16 5H22",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1))],VN={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},WN={key:0},ZN=["disabled"],XN=[Sn(()=>h("path",{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z"},null,-1))],_N={key:1,class:"tooltip"},$N=[Sn(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),Sn(()=>h("img",{class:"w-7 h-7",src:Cg,alt:"watingIcon"},null,-1))],eK={class:"flex justify-start gap-2 md:gap-1"},tK=["disabled"],iK=Sn(()=>h("div",{class:"pt-1 text-start font-sans text-xs font-bold text-gray-500 md:text-sm"},[h("div",null," Note: AI-generated response may not be fully accurate; check with experts for critical information. ")],-1)),nK=Qe({__name:"NewQuestionSimulation",setup(t){const e=ke(),i=At(),n=f(""),o=f("");e.question="";const s=f(null),A=f(!1),r=f(Xt),a=f(!1);o.value=e.recognizedText,Nt(()=>{s.value.focus()});const c=()=>{window.location.reload()},u=g=>{const E=g.length;r.value=Xt-E,A.value=E>=Xt},l=async()=>{var g,E,C,d,S,I,p,M;try{if(e.question.trim().length<1){console.log("Please enter answer!");return}a.value=!0,e.dotLoader=!0;const B={question:e.question||e.recognizedText};e.conversations.push(B);const T=f("");T.value=e.question||e.recognizedText,e.question="";const L={ohr_id:n.value,past_messages:e.past_messages,question:T.value||e.recognizedText,bandCode:e.band_code,userGenomeFunction:e.genomeFunctionValue,userGenomeRole:e.genomeRoleValue,skillId:e.simulationSkill||"937e84ef-e95d-4327-9afe-e7be2bf420eb"},O=await lt("/sqlTest",L);if(n.value=(E=(g=O.data)==null?void 0:g.body)==null?void 0:E.ohr,((d=(C=O==null?void 0:O.data)==null?void 0:C.body)==null?void 0:d.answer)===""){console.log("in the if case calling api again");const k=await lt("/sqlTest",L);e.addConversation((S=k.data)==null?void 0:S.body,"new")}else console.log("in the else case"),e.addConversation((I=O.data)==null?void 0:I.body,"new");a.value=!1,e.dotLoader=!1,e.recognizedText=""}catch(B){if(console.error(B),e.dotLoader=!1,ye.isAxiosError(B)){const T=B;console.log("Error found!"),console.error((p=T.response)==null?void 0:p.data),i.setError(((M=T.response)==null?void 0:M.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(g,E)=>(m(),Q("div",FN,[h("div",GN,[h("div",xN,[h("div",kN,[h("div",jN,[YN,D(e).showVoiceComponent?(m(),Q("div",zN,[ne(KN)])):Me("",!0)]),h("div",PN,[h("div",bN,[h("div",JN,[HN,(m(),Q("svg",{onClick:c,class:"ml-2 h-7 w-7 rounded",id:"newTopicDisable",width:"7",height:"",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:"restart"},qN))])]),h("div",VN,[a.value?(m(),Q("div",_N,$N)):(m(),Q("div",WN,[(m(),Q("svg",{disabled:D(e).beginFlag===!0,class:Ee([D(e).beginFlag===!0?"cursor-not-allowed text-gray-600":"cursor-pointer","bi bi-send ml-2 h-7 w-7 rotate-45 rounded"]),onClick:E[0]||(E[0]=C=>D(e).searchBoxdisable===!1||D(e).beginFlag===!0?"":l()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},XN,10,ZN))]))]),h("div",eK,[Le(h("input",{onKeyup:[E[1]||(E[1]=Fu(C=>a.value?"":l(),["enter"])),E[3]||(E[3]=C=>u(D(e).question))],disabled:D(e).beginFlag===!0||D(e).searchBoxdisable===!1,class:Ee([D(e).beginFlag===!0||D(e).searchBoxdisable===!1?"cursor-not-allowed bg-[#e5e7eb]":"bg-white","fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] px-[70px]"]),"onUpdate:modelValue":E[2]||(E[2]=C=>D(e).question=C),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:s},null,42,tK),[[qe,D(e).question]])])]),iK])])])]))}}),_1="",rK=je(nK,[["__scopeId","data-v-586d571d"]]),qc=t=>(at("data-v-a047746e"),t=t(),ct(),t),oK={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},sK={class:"py-2"},AK={class:"flex"},aK={class:"z-1 relative w-full"},cK={class:"relative w-full"},uK={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},lK={key:0},gK=["disabled"],EK=[qc(()=>h("path",{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z"},null,-1))],hK={key:1,class:"tooltip"},CK=[qc(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),qc(()=>h("img",{class:"w-7 h-7",src:Cg,alt:"watingIcon"},null,-1))],IK={class:"flex justify-start gap-2 md:gap-1"},pK=["disabled"],dK=qc(()=>h("div",{class:"pt-1 text-start font-sans text-xs font-bold text-gray-500 md:text-sm"},[h("div",null," Note: AI-generated response may not be fully accurate; check with experts for critical information. ")],-1)),SK=Qe({__name:"NewMDMQuestionSimulation",setup(t){const e=ke(),i=At(),n=f("");e.question="";const o=f(null),s=f(!1),A=f(Xt),r=f(!1);n.value=e.recognizedText,Nt(()=>{o.value.focus()});const a=u=>{const l=u.length;A.value=Xt-l,s.value=l>=Xt},c=async()=>{var u,l,g;console.log("options fdsfdscdzxfsdv",e.recognizedText);try{if(console.log("options fdsfdscdzxfsdv",e.recognizedText),e.question.trim().length<1){console.log("Please enter answer!");return}r.value=!0,e.dotLoader=!0;const E={question:e.question||e.recognizedText};console.log("ques",E),e.conversations.push(E);const C=f("");C.value=e.question||e.recognizedText,e.question="";const d={assessmentId:e.simulationSkill,question:C.value,past_messages:e.past_messages,prompt:e.generatedPrompt,assessmentType:e.assessmentType,userFunction:"HR",empSeniority:e.empSeniority,functionRole:e.functionRole,userBand:e.band_code,storeFinalFeedback:e.storeFinalFeedback,storeFinalScore:e.storeFinalScore};console.log("Payload for MDM1==> ",d);let S;Ai==="prod"?S="/ManualExportActivity":S="/fetchCompletionDemo";const I=await lt(S,d);e.addConversation((u=I.data)==null?void 0:u.body,"new"),r.value=!1,e.dotLoader=!1,e.recognizedText=""}catch(E){if(console.error(E),ye.isAxiosError(E)){const C=E;console.log("Error found!"),console.error((l=C.response)==null?void 0:l.data),i.setError(((g=C.response)==null?void 0:g.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(u,l)=>(m(),Q("div",oK,[h("div",sK,[h("div",AK,[h("div",aK,[h("div",cK,[h("div",uK,[r.value?(m(),Q("div",hK,CK)):(m(),Q("div",lK,[(m(),Q("svg",{disabled:D(e).beginFlag===!0,class:Ee([D(e).beginFlag===!0?"cursor-not-allowed text-gray-600":"cursor-pointer","bi bi-send ml-2 h-7 w-7 rotate-45 rounded"]),onClick:l[0]||(l[0]=g=>D(e).searchBoxdisable===!1||D(e).beginFlag===!0?"":c()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},EK,10,gK))]))]),h("div",IK,[Le(h("input",{onKeyup:[l[1]||(l[1]=Fu(g=>r.value?"":c(),["enter"])),l[3]||(l[3]=g=>a(D(e).question))],disabled:D(e).beginFlag===!0||D(e).searchBoxdisable===!1,class:Ee([D(e).beginFlag===!0||D(e).searchBoxdisable===!1?"cursor-not-allowed bg-[#e5e7eb]":"bg-white","fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] pl-[30px] pr-[70px]"]),"onUpdate:modelValue":l[2]||(l[2]=g=>D(e).question=g),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:o},null,42,pK),[[qe,D(e).question]])])]),dK])])])]))}}),ij="",MK=je(SK,[["__scopeId","data-v-a047746e"]]),BK={},vK={class:"flex min-h-screen justify-center -mt-16"},fK=[h("div",{class:"flex items-center justify-center"},[h("img",{class:"loadercss",src:Li,alt:"Loader Gif"})],-1)];function wK(t,e){return m(),Q("div",vK,fK)}const PS=je(BK,[["render",wK]]),wA=t=>(at("data-v-53597136"),t=t(),ct(),t),mK={class:"max-h-screen overflow-auto md:p-6 p-3 text-[#161916]"},QK={key:0,class:"flex flex-col items-center justify-center gap-4"},RK=[wA(()=>h("div",{class:"text-2xl font-[700]"},"Assessment Access Required",-1)),wA(()=>h("h3",{className:"text-lg font-medium my-6 text-center text-gray-500"}," You don't have access to this assessment. Please contact to administrator ",-1))],DK={key:1,class:"flex flex-col items-center justify-center gap-4"},yK=[wA(()=>h("div",{class:"text-2xl font-[700]"},"Invalid URL",-1)),wA(()=>h("h3",{className:"text-lg font-medium my-6 text-center text-gray-500"}," Invalid URL or assessment not found. Please check the URL or contact support. ",-1))],TK={key:1,className:"h-screen flex flex-col items-stretch"},LK={class:"z-20"},OK=wA(()=>h("div",{class:"mt-6"},null,-1)),UK={class:"flex h-full items-stretch overflow-hidden"},NK={class:"mx-auto w-11/12 bg-white"},KK={class:"relative flex h-full w-full flex-col items-stretch overflow-hidden"},FK={key:0,class:"relative"},GK={key:1,class:"relative"},xK=Qe({__name:"AssessmentSimulation",setup(t){const e=f(!0),i=f(!1),n=f(!1);f(!1),f(!1);const o=ke(),s=At(),A=f(""),r=f(""),a=f(""),c=f(""),u=localStorage.getItem("accessToken");let l="";const g=f("");let E="",C="";const d=f(!1),S=new URL(window.location.href),I=S.searchParams.get("skillId")||S.searchParams.get("assessmentId");r.value=S.searchParams.get("mode")??"",o.simulationSkill=I??"";const p=["703331197","703380812","703331909","703363051","703319578"];Nt(async()=>{e.value=!0,await M(),await T()});const M=async()=>{var L,O,R,k,Y,G,F;try{const $=await Zt(`/getLearnerData?forSimulation=true&skillForSimulation=${o.simulationSkill}`);o.initialize($.data),o.assessmentQuestion||(console.log("getAssessmentDetails========================>"),await B()),e.value=!1,o.simulationSkill==="937e84ef-e95d-4327-9afe-e7be2bf420eb"?o.skillNameForSimulation="GenpactNext":o.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ea"||o.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"?o.skillNameForSimulation="Agentic AI":o.simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&(o.skillNameForSimulation="Data")}catch($){if(console.error($),e.value=!1,ye.isAxiosError($)&&((L=$.response)!=null&&L.status)||$&&typeof $=="object"&&"response"in $&&$.response&&typeof $.response=="object"&&"status"in $.response&&$.response.status){const J=$;if(console.log("Error found!"),console.error((O=J.response)==null?void 0:O.data),((R=J.response)==null?void 0:R.status)===424||((k=J.response)==null?void 0:k.status)===425||((Y=J.response)==null?void 0:Y.status)===400){c.value=(G=J.response)==null?void 0:G.status,console.log("errorCode value",c.value),n.value=!0;return}s.setError(((F=J.response)==null?void 0:F.data).message)}else s.setError("There was an issue, please contact helpmate")}},B=async()=>{var L,O,R,k,Y,G,F,$,J,q,K,X,z,ce,Ae,pe,ve,Ge,Ye,Xe,ze,U,ee,W,te,Se,v,w,y,N,j,P,ie,Z,_,b,se,re,ae,he,fe,xe,Ue,He,It,kt,tt,ti;console.log("Start getAssessmentDetails");try{Ai==="prod"?l=`https://api-v2.genpact.com/api/my-profile/assessment-master/getAssessmentDetailsById?id=${o.simulationSkill}`:l=`https://api-v2-dev.genpact.com/api/my-profile/assessment-master/getAssessmentDetailsById?id=${o.simulationSkill}`;const ue=await Zt(l);A.value=(O=(L=ue==null?void 0:ue.data)==null?void 0:L.data)==null?void 0:O.name,o.skillNameForSimulation=A.value,o.generatedPrompt=(k=(R=ue==null?void 0:ue.data)==null?void 0:R.data)==null?void 0:k.generatedPrompt,o.assessmentType=(G=(Y=ue==null?void 0:ue.data)==null?void 0:Y.data)==null?void 0:G.assessmentType,a.value=($=(F=ue==null?void 0:ue.data)==null?void 0:F.data)==null?void 0:$.status,d.value=(q=(J=ue==null?void 0:ue.data)==null?void 0:J.data)==null?void 0:q.editMode,o.empSeniority=(X=(K=ue==null?void 0:ue.data)==null?void 0:K.data)==null?void 0:X.empSeniority,o.functionRole=(ce=(z=ue==null?void 0:ue.data)==null?void 0:z.data)==null?void 0:ce.functionRole,E=(pe=(Ae=ue==null?void 0:ue.data)==null?void 0:Ae.data)==null?void 0:pe.accessBand,C=(Ge=(ve=ue==null?void 0:ue.data)==null?void 0:ve.data)==null?void 0:Ge.accessOhrList;const _e=(Xe=(Ye=ue==null?void 0:ue.data)==null?void 0:Ye.data)==null?void 0:Xe.createdBy;if(o.mcqType=(U=(ze=ue==null?void 0:ue.data)==null?void 0:ze.data)==null?void 0:U.mcqTypes,o.storeFinalFeedback=(W=(ee=ue==null?void 0:ue.data)==null?void 0:ee.data)==null?void 0:W.storeFinalFeedback,o.storeFinalScore=(Se=(te=ue==null?void 0:ue.data)==null?void 0:te.data)==null?void 0:Se.storeFinalScore,a.value==="inactive")i.value=!0;else if(a.value==="draft")r.value!==cl.DRAFT&&(i.value=!0);else if(a.value==="active"&&d.value&&r.value===cl.DRAFT){Ai==="prod"?l=`https://api-v2.genpact.com/api/my-profile/assessment-master/getDraftAssessmentDetailsById?assessmentId=${o.simulationSkill}`:l=`https://api-v2-dev.genpact.com/api/my-profile/assessment-master/getDraftAssessmentDetailsById?assessmentId=${o.simulationSkill}`;const Pe=await Zt(l);o.generatedPrompt=(w=(v=Pe==null?void 0:Pe.data)==null?void 0:v.data)==null?void 0:w.generatedPrompt,o.assessmentType=(N=(y=Pe==null?void 0:Pe.data)==null?void 0:y.data)==null?void 0:N.assessmentType,o.empSeniority=(P=(j=Pe==null?void 0:Pe.data)==null?void 0:j.data)==null?void 0:P.empSeniority,o.functionRole=(Z=(ie=Pe==null?void 0:Pe.data)==null?void 0:ie.data)==null?void 0:Z.functionRole,o.storeFinalFeedback=(b=(_=Pe==null?void 0:Pe.data)==null?void 0:_.data)==null?void 0:b.storeFinalFeedback,o.storeFinalScore=(re=(se=Pe==null?void 0:Pe.data)==null?void 0:se.data)==null?void 0:re.storeFinalScore,E=(he=(ae=Pe==null?void 0:Pe.data)==null?void 0:ae.data)==null?void 0:he.accessBand,C=(xe=(fe=Pe==null?void 0:Pe.data)==null?void 0:fe.data)==null?void 0:xe.accessOhrList}const Ut=o==null?void 0:o.band_code,ji=(Ue=E==null?void 0:E.split(","))==null?void 0:Ue.map(Pe=>Pe.trim());if(_e===(o==null?void 0:o.ohr)||p.includes(o==null?void 0:o.ohr))console.log("User has access to this assessment.");else{if(ji.length===0&&C.length===0)throw console.log("Both bands and exceptionOHR are empty. Access denied."),{response:{status:424,data:{message:"You don't have access to this assessment. Please contact to administrator"}}};if(ji.includes(Ut)||C.includes(o==null?void 0:o.ohr))console.log("User has access to this assessment.");else throw console.log("User does not have access to this assessment."),{response:{status:424,data:{message:"You don't have access to this assessment. Please contact to administrator"}}}}console.log("end getAssessmentDetails")}catch(ue){if(console.error(ue),e.value=!1,ye.isAxiosError(ue)&&((He=ue.response)!=null&&He.status)||ue&&typeof ue=="object"&&"response"in ue&&ue.response&&typeof ue.response=="object"&&"status"in ue.response&&ue.response.status){const _e=ue;if(console.log("Error found!"),console.error((It=_e.response)==null?void 0:It.data),((kt=_e.response)==null?void 0:kt.status)===424||((tt=_e.response)==null?void 0:tt.status)===425){n.value=!0;return}s.setError(((ti=_e.response)==null?void 0:ti.data).message)}else s.setError("There was an issue, please contact helpmate")}},T=async()=>{var L,O,R,k,Y,G,F,$;try{Ai==="prod"?g.value="https://api-v2.genpact.com/api/delphi/v2/myprofile":g.value="https://api-v2-dev.genpact.com/api/delphi/v2/myprofile";const J=await ye({url:g.value,headers:{authorization:`Bearer ${u}`,"content-type":"application/json"},method:"get"});o.genomeFunctionValue=(R=(O=(L=J==null?void 0:J.data)==null?void 0:L.role_function)==null?void 0:O.function)==null?void 0:R.name,o.genomeRoleValue=(G=(Y=(k=J==null?void 0:J.data)==null?void 0:k.role_function)==null?void 0:Y.role)==null?void 0:G.name}catch(J){if(console.error(J),e.value=!1,ye.isAxiosError(J)){const q=J;console.log("Error found!"),console.error((F=q.response)==null?void 0:F.data),s.setError((($=q.response)==null?void 0:$.data).message)}else s.setError("There was an issue, please contact helpmate")}};return(L,O)=>(m(),Q("section",null,[ne(wr,{"is-visible":n.value},{default:Ei(()=>[h("div",mK,[c.value===424||c.value==="425"?(m(),Q("div",QK,RK)):Me("",!0),c.value===400?(m(),Q("div",DK,yK)):Me("",!0)])]),_:1},8,["is-visible"]),h("div",null,[e.value?(m(),Di(PS,{key:0})):(m(),Q("main",TK,[h("div",LK,[ne(Yy)]),OK,h("div",UK,[h("div",NK,[h("div",KK,[ne(vN),h("div",{class:Ee(D(o).showVoiceComponent===!0?"mt-[160px]":"mt-[120px]")},null,2)]),D(o).assessmentQuestion?(m(),Q("div",FK,[ne(rK)])):(m(),Q("div",GK,[ne(MK)]))])])]))])]))}}),aj="",kK=Object.freeze(Object.defineProperty({__proto__:null,default:je(xK,[["__scopeId","data-v-53597136"]])},Symbol.toStringTag,{value:"Module"})),jK={class:"flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6"},YK=["href"],zK=[h("img",{class:"h-11 w-auto cursor-pointer",src:zC,alt:"Genome Logo"},null,-1)],PK=["href"],bK=[h("img",{class:"h-9 w-28 cursor-pointer md:w-36",src:ul,alt:"Aiguru Logo"},null,-1)],JK=Qe({__name:"headerAMA",setup(t){const e=f(""),i=f("");return Ai==="prod"?e.value="https://genome.genpact.com":e.value="https://genome-dev.genpact.com",Ai==="prod"?i.value="https://genome.genpact.com/#aiguru":i.value="https://genome-dev.genpact.com/#aiguru",(n,o)=>(m(),Q("nav",jK,[h("a",{class:"px-2 md:px-0 lg:px-0",href:e.value,target:"_blank"},zK,8,YK),h("a",{class:"px-2 md:px-0 lg:px-0",href:i.value,target:"_blank"},bK,8,PK)]))}}),HK={class:"flex items-end justify-start"},qK={class:"fontFormattingAMA w-full bg-gray-100 rounded-lg"},VK={class:"w-full rounded-md px-3 py-2 text-lg font-bold text-black text-[18px] md:text-[22px]"},WK=h("div",{class:"w-full px-3 py-2 text-base text-black text-[12px] md:text-[16px] font-[550]"}," Need help with a concept, information on Genpact offerings, productivity tips or Gen AI ideas - Ask me anything ",-1),ZK=h("br",null,null,-1),XK=Qe({__name:"greetingsAMA",setup(t){const e=ke(),i=` Hi ${e.learnerName||"Expert"}, and welcome to ${e.amaSkillName||"SkillName"} !`,n=nt(()=>i);return nt(()=>e.welcomeMessage),(o,s)=>(m(),Q("section",null,[h("div",HK,[h("div",qK,[h("div",VK,de(n.value),1),WK])]),ZK]))}}),_K={class:"fontFormattingAMA flex items-end justify-start py-2"},$K={class:"line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg"},eF=["innerHTML"],tF=Qe({__name:"responseAMA",props:{answer:{type:String,required:!0}},setup(t){const e=t,i=nt(()=>{const n=e.answer.replace(/[*#]/g,"").replace(/Assessment Rating & Feedback/g,'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'),o=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;return n.replace(o,(s,A,r)=>`<a href="${r}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${A}</a>`)});return(n,o)=>(m(),Q("div",_K,[h("div",$K,[h("span",{class:"fontFormattingAMA",innerHTML:i.value},null,8,eF)])]))}}),gj="",iF=je(tF,[["__scopeId","data-v-38edcca6"]]),nF={class:"flex justify-end items-end py-3"},rF={class:"max-w-[80%]"},oF={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},sF=Qe({__name:"learnerAMA",props:{question:{type:String,required:!0}},setup(t){return(e,i)=>(m(),Q("div",nF,[h("div",rF,[h("div",oF,de(t.question),1)])]))}}),AF=t=>(at("data-v-12a02acf"),t=t(),ct(),t),aF={class:"flex w-full flex-col items-start justify-start bg-white"},cF={class:"bot-typing-animation gap-1"},uF={class:"block w-full text-lg italic text-gray-800"},lF=AF(()=>h("span",{class:"dot-animation"},[h("span",null,"."),h("span",null,"."),h("span",null,".")],-1)),gF=ur('<div class="block w-full max-w-full items-stretch" data-v-12a02acf><div class="flex animate-pulse items-start justify-start space-x-4" data-v-12a02acf><div class="flex-1 space-y-6 py-1" data-v-12a02acf><div class="h-2 w-full rounded bg-gray-300" data-v-12a02acf></div><div class="space-y-3" data-v-12a02acf><div class="grid grid-cols-3 gap-4" data-v-12a02acf><div class="col-span-2 h-2 rounded bg-gray-300" data-v-12a02acf></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-12a02acf></div></div><div class="h-2 rounded bg-gray-300" data-v-12a02acf></div></div></div></div></div>',1),EF=Qe({__name:"LoadingResponseAMA",setup(t){const e=f("Generating response"),i=f(["This may take a few seconds","Fetching the best response for you","Thinking... give me a moment","One moment while I gather the information","Hang in tight, we are almost there","Almost there... just a bit longer","Compiling a response for you"]);return setTimeout(()=>{const n=Math.floor(Math.random()*i.value.length);e.value=i.value[n]},15e3),(n,o)=>(m(),Q("div",aF,[h("div",cF,[h("div",uF,de(e.value),1),lF]),gF]))}}),Ej="",hF=je(EF,[["__scopeId","data-v-12a02acf"]]),CF={key:0},IF={key:1},pF={key:0,class:"flex"},dF=Qe({__name:"conversationAMA",setup(t){let e=f(""),i=f("");e.value='<a style="color:#00AECF;"',i.value='<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';const n=ke(),o=f();return Nt(()=>{var r;const s=document.getElementsByName("askQuestion"),A=Array.from(s);s.length&&((r=A==null?void 0:A.pop())==null||r.scrollIntoView({behavior:"smooth",block:"center"}))}),XA(()=>{var r;const s=document.getElementsByName("askQuestion"),A=Array.from(s);s.length&&((r=A==null?void 0:A.pop())==null||r.scrollIntoView({behavior:"smooth",block:"center"}))}),(s,A)=>(m(),Q("div",{ref_key:"nestedElement",ref:o,class:"smooth-scroll overflow-auto md:px-6 px-2"},[ne(XK),(m(!0),Q(Oe,null,Qt(D(n).conversations,(r,a)=>(m(),Q("div",{key:a},[r.question?(m(),Q("div",CF,[ne(sF,{question:r.question,c2question:r.c2question,"show-feedback":r.showFeedback,id:`qId${a}`,name:"askQuestion","que-id":a},null,8,["question","c2question","show-feedback","id","que-id"])])):Me("",!0),r.answer?(m(),Q("div",IF,[ne(iF,{question:r==null?void 0:r.question,c2question:r==null?void 0:r.c2question,"show-sources":r==null?void 0:r.showSources,questionId:r.id,answer:r.answer.replaceAll("<a",D(e)).replaceAll("<ul",D(i)),"show-feedback":r.showFeedback,"related-ques":r.relatedQues,"options-array":r.optionsArray,"ans-id":a},null,8,["question","c2question","show-sources","questionId","answer","show-feedback","related-ques","options-array","ans-id"])])):Me("",!0)]))),128)),D(n).dotLoader?(m(),Q("div",pF,[ne(hF)])):Me("",!0)],512))}}),hj="",SF=je(dF,[["__scopeId","data-v-e6168dd4"]]),Vc=t=>(at("data-v-0009d2fa"),t=t(),ct(),t),MF={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},BF={class:"py-2"},vF={class:"flex"},fF={class:"z-1 relative w-full"},wF={class:"relative w-full"},mF={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},QF={key:0},RF=[Vc(()=>h("path",{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z"},null,-1))],DF={key:1,class:"tooltip"},yF=[Vc(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),Vc(()=>h("img",{class:"w-7 h-7",src:Cg,alt:"watingIcon"},null,-1))],TF={class:"flex justify-start"},LF=Vc(()=>h("div",{class:"pt-1 text-start font-sans"},[h("div",{class:"text-xs font-bold text-gray-500 md:text-sm"}," Note: AI-generated response may not be fully accurate; check with experts for critical information. ")],-1)),OF=Qe({__name:"NewQuestionAMA",setup(t){const e=ke(),i=At();e.question="";const n=f(null),o=f(!1),s=f(Xt),A=f(!1);Nt(()=>{n.value.focus()});const a=f((l=>new URLSearchParams(window.location.search).get(l)||"")("amaId"));console.log("amaId",a.value);const c=l=>{const g=l.length;s.value=Xt-g,o.value=g>=Xt},u=async()=>{var l,g,E,C;try{if(e.question.trim().length<1){i.setError("Please enter answer!");return}A.value=!0,e.dotLoader=!0;const d={question:e==null?void 0:e.question};e.conversations.push(d);const S=f("");S.value=e==null?void 0:e.question,e.question="";const I={skillId:a.value,question:S.value,past_messages:e.past_messages},p=await lt("/amaBotResponse",I);e.addConversation((l=p.data)==null?void 0:l.body,"new"),A.value=!1,e.dotLoader=!1}catch(d){if(console.error(d),e.dotLoader=!1,A.value=!1,ye.isAxiosError(d)){const S=d;console.log("Error found!"),console.error((g=S.response)==null?void 0:g.data),i.setError((C=(E=S.response)==null?void 0:E.data)==null?void 0:C.message)}else i.setError("There was an issue, please contact helpmate")}};return(l,g)=>(m(),Q("div",MF,[h("div",BF,[h("div",vF,[h("div",fF,[h("div",wF,[h("div",mF,[A.value?(m(),Q("div",DF,yF)):(m(),Q("div",QF,[(m(),Q("svg",{onClick:g[0]||(g[0]=E=>u()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"bi bi-send ml-2 h-7 w-7 rotate-45 rounded",viewBox:"0 0 16 16"},RF))]))]),h("div",TF,[Le(h("input",{onKeyup:[g[1]||(g[1]=Fu(E=>A.value?"":u(),["enter"])),g[3]||(g[3]=E=>c(D(e).question))],"onUpdate:modelValue":g[2]||(g[2]=E=>D(e).question=E),class:"fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] pl-[30px] pr-[70px]",placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:n},null,544),[[qe,D(e).question]])])]),LF])])])]))}}),dj="",UF=je(OF,[["__scopeId","data-v-0009d2fa"]]),NF=t=>{var e;return(e=KF.find(i=>i.skill_id===t))==null?void 0:e.skill_name},KF=[{skill_alias:"Client Relationships",skill_name:"Client Relationships",skill_id:"ac3c53d7-c355-429b-b196-799a1084f1e3"},{skill_alias:"Trust and Safety",skill_name:"Trust and Safety",skill_id:"6a46531f-eead-4811-a22c-ba4c6649e52b",skill_master_id:"a1486895-8395-4dba-a891-809ae02a59f0"},{skill_alias:"Retail",skill_name:"Retail",skill_id:"72c55104-2d20-4477-a185-fc76e5855a44"},{skill_alias:"Executive Presence",skill_name:"Executive Presence",skill_id:"3bf308ca-b85c-4f64-94d2-45870aaafa13"},{skill_alias:"Hi-Tech",skill_name:"Hi-Tech",skill_id:"85a1058e-7ba2-4214-a708-7566ba51825f"},{skill_alias:"Impact Commercial Models",skill_name:"Impact Commercial Models",skill_id:"7035d0aa-e6c8-11ec-8fea-0242ac120002"},{skill_alias:"Agile",skill_name:"Agile",skill_id:"6cd7fdaa-e0ab-4190-9a83-ba523f4b5f9f",skill_master_id:"6aba81fb-88c1-49e1-97af-2743be385abf"},{skill_alias:"Collaboration Tools and Methods",skill_name:"Collaboration Tools and Methods",skill_id:"261b3031-ba90-4f12-ba60-25025fc6408e"},{skill_alias:"People Leadership",skill_name:"People Leadership",skill_id:"e3376031-1b14-48b1-b61b-deb68e0c4bb2",skill_master_id:"8500c2a5-dafb-4aa9-acc2-038334147857"},{skill_alias:"Banking and Capital Markets",skill_name:"Banking and Capital Markets",skill_id:"93f65205-4c5b-4767-b778-906a5f3429d0"},{skill_alias:"Information Security",skill_name:"Information Security",skill_id:"a7484d97-5796-4711-bce4-a0786c75f8b5"},{skill_alias:"Supply Chain Management",skill_name:"Supply Chain Management",skill_id:"f1031499-7ce5-4ebc-97f3-00cb5710f3a6"},{skill_alias:"Solution Design",skill_name:"Solution Design",skill_id:"b6619ae7-1671-4f49-b1a6-9f3ffe64de16"},{skill_alias:"Agentic AI",skill_name:"Agentic AI",skill_id:"646ed97a-b7af-49c2-9c0e-be16e7ff47a1"},{skill_alias:"Data Literacy",skill_name:"Data Literacy",skill_id:"7c4ccbbf-a2e7-4f5b-bb81-304478de6d45"},{skill_alias:"Generative AI",skill_name:"Generative AI",skill_id:"f7d42458-5668-447f-806e-f1b7b1025a45",skill_master_id:"f7d42458-5668-447f-806e-f1b7b1025a45"},{skill_alias:"Consulting",skill_name:"Consulting",skill_id:"c693820f-e14d-4080-9531-2c9b1d274dcf"},{skill_alias:"Storytelling",skill_name:"Storytelling",skill_id:"5d1fb5e7-c13c-43e4-9620-00a5e2eed483"},{skill_alias:"Critical Thinking",skill_name:"Critical Thinking",skill_id:"bebdf5d2-249f-4bb4-b81d-896c8646fc45"},{skill_alias:"Sourcing and Procurement",skill_name:"Sourcing and Procurement",skill_id:"84781074-69ac-476a-9d1d-47228a2301f8"},{skill_alias:"Consumer Packaged Goods",skill_name:"Consumer Packaged Goods",skill_id:"fc4bc60a-3038-4db7-9c32-efcfd00adaa8"},{skill_alias:"Customer Care",skill_name:"Customer Care",skill_id:"1c8a37b6-1e2c-46b0-b8e3-019feb72ad0a",skill_master_id:"bed04b67-be6b-405f-96b0-80f0e61f6a86"},{skill_alias:"MS Office",skill_name:"MS Office",skill_id:"ea4ac01d-efec-44fc-9720-a24a1d1a5d05",skill_master_id:"8354fc8d-545f-4d21-b1cb-8908abfd62c4"},{skill_alias:"Commercial Lending and Leasing",skill_name:"Commercial Lending and Leasing",skill_id:"678fa9ff-39fe-4c9d-af2d-d9e92318f126"},{skill_alias:"Integrated Program Management",skill_name:"Integrated Program Management",skill_id:"150d0021-1d76-4447-a08b-dc195c9b114a",skill_master_id:"88a0cb70-87d2-448d-86ba-3a412c60bce2"},{skill_alias:"Lean and Six Sigma",skill_name:"Lean and Six Sigma",skill_id:"90d48eb4-5fea-4bd7-85b9-3170f6bd2b53",skill_master_id:"db5b7b61-0633-4a06-9066-3c6f356dc5c2"},{skill_alias:"Cloud",skill_name:"Cloud",skill_id:"9e018249-fba4-41b8-be19-364ddf78b61d"}],Ig=t=>(at("data-v-466e517f"),t=t(),ct(),t),FF=Ig(()=>h("div",{class:"max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916]"},[h("div",{class:"text-2xl font-[700]"},"Assessment Access Required"),h("h3",{className:"text-lg font-medium my-6 text-center text-gray-500"}," You don't have access to this assessment. Please contact to administrator ")],-1)),GF={key:1,className:"h-screen flex flex-col items-stretch"},xF={class:"z-20"},kF=Ig(()=>h("div",{class:"mt-6"},null,-1)),jF={class:"flex h-full items-stretch overflow-hidden"},YF={class:"mx-auto w-11/12 bg-white"},zF={class:"relative flex h-full w-full flex-col items-stretch overflow-hidden"},PF=Ig(()=>h("div",{class:"mt-[160px]"},null,-1)),bF={class:"relative"},JF=Qe({__name:"AssessmentAMA",setup(t){const e=f(!0),i=f(!1),n=ke(),o=At();f("");const A=f((a=>new URLSearchParams(window.location.search).get(a)||"")("amaId"));n.amaSkillId=A.value??"",Nt(async()=>{e.value=!0,await r(),e.value=!1});const r=async()=>{var a,c,u,l,g;try{if(A.value===null)throw{response:{status:424,data:{message:"Invalid URL"}}};console.log("before calling get learner");const E=await Zt(`/getLearnerData?forSimulation=true&skillForSimulation=${A.value}`);n.initialize(E.data),n.amaSkillName=NF(n.amaSkillId)||"",e.value=!1}catch(E){if(console.error(E),e.value=!1,ye.isAxiosError(E)&&((a=E.response)!=null&&a.status)||E&&typeof E=="object"&&"response"in E&&E.response&&typeof E.response=="object"&&"status"in E.response&&E.response.status){const C=E;if(console.log("Error found!"),console.error((c=C.response)==null?void 0:c.data),((u=C.response)==null?void 0:u.status)===424||((l=C.response)==null?void 0:l.status)===425){i.value=!0;return}o.setError(((g=C.response)==null?void 0:g.data).message)}else o.setError("There was an issue, please contact helpmate")}};return(a,c)=>(m(),Q("section",null,[ne(wr,{"is-visible":i.value},{default:Ei(()=>[FF]),_:1},8,["is-visible"]),h("div",null,[e.value?(m(),Di(PS,{key:0})):(m(),Q("main",GF,[h("div",xF,[ne(JK)]),kF,h("div",jF,[h("div",YF,[h("div",zF,[ne(SF),PF]),h("div",bF,[ne(UF)])])])]))])]))}}),Sj="",HF=Object.freeze(Object.defineProperty({__proto__:null,default:je(JF,[["__scopeId","data-v-466e517f"]])},Symbol.toStringTag,{value:"Module"})),mA=t=>(at("data-v-e4e697db"),t=t(),ct(),t),qF={class:"playground h-full"},VF={class:"grid grid-cols-5 gap-8 px-5 items-stretch"},WF={class:"col-span-4 mt-10"},ZF=mA(()=>h("label",{for:"EmpID",class:"block text-base font-bold text-gray-900"},"EmpID",-1)),XF=mA(()=>h("label",{for:"EmpName",class:"block text-base font-bold text-gray-900"},"EmpName",-1)),_F=mA(()=>h("label",{for:"EmpDesignation",class:"block text-base font-bold text-gray-900 mt-6"},"EmpDesignation",-1)),$F={class:"flex flex-col items-end gap-2"},eG={key:0,id:"button",class:"cursor-pointer"},tG={key:1},iG=[mA(()=>h("img",{class:"w-10 h-10 block mx-auto loadercss",src:Li,alt:"Loader Gif"},null,-1))],nG={class:"mb-12"},rG=mA(()=>h("label",{for:"response",class:"block text-base font-bold text-gray-900 mb-1"},"Response",-1)),oG={class:"line-break min-h-[20vh] p-4 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 w-full shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1"},sG=Qe({__name:"Testcase",setup(t){const e=f(!1),i=f(""),n=f(""),o=f(""),s=f(""),A=At();Nt(()=>{r()});const r=async()=>{var a,c;try{e.value=!0;const u=await Zt("http://localhost:7071/api/fetchCompletionSubDemo1");console.log(u.data),s.value=(a=u.data)==null?void 0:a.body,e.value=!1}catch(u){if(console.log(u),e.value=!1,ye.isAxiosError(u)){const l=u;A.setError(((c=l.response)==null?void 0:c.data).message)}else A.setError("There was an issue, contact to helpmate")}};return(a,c)=>(m(),Q("div",qF,[h("div",VF,[h("div",WF,[h("div",null,[ZF,Le(h("textarea",{"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u),id:"EmpID",rows:"1",class:"w-full mt-1 p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1 resize-none",placeholder:"Write here..."},null,512),[[qe,i.value]])]),h("div",null,[XF,Le(h("textarea",{"onUpdate:modelValue":c[1]||(c[1]=u=>n.value=u),id:"EmpName",rows:"1",class:"w-full mt-1 p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1 resize-none",placeholder:"Write here..."},null,512),[[qe,n.value]])]),h("div",null,[_F,h("div",$F,[Le(h("textarea",{"onUpdate:modelValue":c[2]||(c[2]=u=>o.value=u),id:"EmpDesignation",rows:"1",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1 resize-none",placeholder:"Write here..."},null,512),[[qe,o.value]]),e.value?(m(),Q("div",tG,iG)):(m(),Q("button",eG,[ne(D(UC),{class:"w-7 h-7 fill-genpact-blue-box"})]))])]),h("div",nG,[rG,h("div",oG,de(s.value),1)])])])]))}}),vj="",AG=Object.freeze(Object.defineProperty({__proto__:null,default:je(sG,[["__scopeId","data-v-e4e697db"]])},Symbol.toStringTag,{value:"Module"})),aG={},cG={className:"flex justify-between items-center gap-4 h-14"},uG=[h("div",{class:"text-white font-bold md:text-xl text-base"}," AI Guru Skill Data ",-1),h("img",{class:"md:w-36 w-20",src:Bo},null,-1)];function lG(t,e){return m(),Q("div",cG,uG)}const gG=je(aG,[["render",lG]]),EG={class:"bg-genpact-blue-box w-full px-5 mb-4"},hG={key:0},CG={class:"flex justify-between items-start text-lg px-6"},IG=h("div",null,null,-1),pG={class:"flex justify-start items-center text-white bg-genpact-darkest-blue rounded-lg py-2 px-4 cursor-pointer"},dG={class:"flex justify-start items-start w-full px-6 py-3"},SG=h("div",{class:"md:w-1/2"},null,-1),MG={class:"relative flex justify-start items-end border border-gray-300 md:rounded-full rounded-lg md:w-1/2 w-full"},BG={class:"absolute inset-y-0 left-5 flex items-center"},vG={class:"flex justify-between flex-col md:flex-row items-center w-full border-none py-1 px-1 md:px-2 md:py-2 text-sm md:border md:border-gray-300 rounded-full"},fG={class:"flex justify-start flex-wrap md:gap-2 items-start ml-10 space-y-2 md:space-y-0 md:space-x-1 mx-auto"},wG={class:"flex justify-start items-center"},mG=h("div",{class:"flex items-center"},[h("div",{class:"text-gray-500 font-medium text-sm px-1 py-2 md:px-2 md:py-2 hidden md:flex"}," | ")],-1),QG={class:"flex-grow md:flex-grow-0"},RG={class:"px-6"},DG=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Current Topic List ",-1),yG={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},TG={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},LG=h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Edit")])],-1),OG={class:"px-3 py-4 font-medium text-gray-900"},UG={class:"px-3 py-4"},NG={class:"px-3 py-4 text-center"},KG={class:"px-1.5 py-4 text-center"},FG=["onClick"],GG={key:1,id:"index",class:"flex justify-center items-center bg-genpact-darkest-blue text-white font-bold text-center rounded-lg px-6 py-2 hover:-translate-y-1 hover:scale-100 duration-300"},xG=[h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1)],bS=Object.freeze(Object.defineProperty({__proto__:null,default:Qe({__name:"SkillData",setup(t){const e=f([]),i=f(),n=f(""),o=f(""),s=f(!1),A=f([!0]),r=ke(),a=At(),c=ua(),u=f(""),l=()=>{try{u.value==="user"?(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","user"),c.replace({name:"EditSkillData"})):u.value==="admin"&&(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","admin"),c.replace({name:"EditSkillAdminData"})),r.isTopicPending=!1,r.topicNameForSkillData="",r.descriptionForSkillData="",r.offeringTypeForSkillData="",r.enableInputbox=!0}catch{a.setError("Invalid Router!!")}},g=async(I,p)=>{var M,B,T;try{console.log("isTopicPending------->",r.isTopicPending),r.topicNameForSkillData=I.Topic,r.descriptionForSkillData=I.Description,r.offeringTypeForSkillData=I.OfferingType,r.enableInputbox=!1,A.value[p]=!1;const L=await Zt(`/fetchTempTopic?Topic=${r.topicNameForSkillData}`);r.isTopicPending=!1,console.log("response array length------->",(M=L==null?void 0:L.data)==null?void 0:M.length),((B=L==null?void 0:L.data)==null?void 0:B.length)>0&&(r.isTopicPending=!0),A.value[p]=!0,u.value==="user"?(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","user"),c.replace({name:"EditSkillData"})):u.value==="admin"&&(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","admin"),c.replace({name:"EditSkillAdminData"}))}catch(L){if(console.error(L),ye.isAxiosError(L)){const O=L;a.setError(((T=O.response)==null?void 0:T.data).message)}else a.setError("There was an issue with route")}},E=async()=>{var I,p,M,B,T,L;try{const O=await Zt("/FetchSkillData");console.log("role value ",(I=O==null?void 0:O.data)==null?void 0:I.role),i.value=((p=O==null?void 0:O.data)==null?void 0:p.body)||[],u.value=(M=O==null?void 0:O.data)==null?void 0:M.role,e.value=i.value,console.log("length",(B=O==null?void 0:O.data)==null?void 0:B.body),console.log("data",(T=O==null?void 0:O.data)==null?void 0:T.body)}catch(O){if(console.error(O),ye.isAxiosError(O)){const R=O;a.setError(((L=R.response)==null?void 0:L.data).message)}else a.setError("There was an issue while fetching data")}},C=I=>{console.log(I.target.value),I.target.value===""&&(e.value=i.value),console.log("Invoked topic name Search"),e.value=i.value.filter(p=>p.Topic.toLowerCase().includes(I.target.value.toLowerCase()))},d=I=>{console.log(I.target.value),I.target.value===""&&(e.value=i.value),console.log("Invoked Knowledge Corpus Search"),e.value=i.value.filter(p=>p.OfferingType.toLowerCase().includes(I.target.value.toLowerCase()))},S=()=>{n.value="",o.value="",e.value=i.value};return Nt(async()=>{await E(),s.value=!0,A.value=Array(e.value.length).fill(!0),console.log("array",A.value)}),(I,p)=>(m(),Q(Oe,null,[h("nav",EG,[ne(gG)]),s.value?(m(),Q("div",hG,[h("div",CG,[IG,h("div",pG,[ne(D(_m),{class:"w-7 h-7 mr-1"}),h("button",{onClick:l,class:"font-bold"},"Add New Topic")])]),h("div",dG,[SG,h("div",MG,[h("div",BG,[ne(D(Xm),{class:"w-5 h-5 mr-5 hidden md:flex"})]),h("div",vG,[h("div",fG,[h("div",wG,[Le(h("input",{id:"topic-search",type:"search",onInput:C,"onUpdate:modelValue":p[0]||(p[0]=M=>n.value=M),class:"text-gray-500 font-medium text-sm px-2 py-2 w-full md:w-52 rounded-lg shadow-sm border-none border-gray-500 focus:outline-none focus:border focus:border-genpact-blue-box md:ml-2",placeholder:"enter topic name "},null,544),[[qe,n.value]])]),mG,h("div",QG,[Le(h("input",{id:"offering-search",type:"search",onInput:d,"onUpdate:modelValue":p[1]||(p[1]=M=>o.value=M),class:"text-gray-500 font-medium text-sm px-2 py-2 md:w-52 w-full rounded-lg shadow-sm border-none border-gray-500 focus:outline-none focus:border focus:border-genpact-blue-box",placeholder:"enter knowledge corpus"},null,544),[[qe,o.value]])])]),h("div",{class:"mt-2 md:mt-0"},[h("button",{onClick:S,type:"reset",class:"text-white bg-genpact-blue-box hover:bg-genpact-darkest-blue font-medium rounded-full text-base px-8 py-1"}," Reset ")])])])]),h("div",RG,[DG,h("div",yG,[h("table",TG,[LG,h("tbody",null,[(m(!0),Q(Oe,null,Qt(e.value,(M,B)=>(m(),Q("tr",{key:B,class:"odd:bg-white even:bg-gray-100"},[h("th",OG,de(M.Topic||"title"),1),h("td",UG,de(M.Description||"desc"),1),h("td",NG,de(M.OfferingType||"Knowledge Corpus"),1),h("td",KG,[A.value[B]?(m(),Q("button",{key:0,id:"index",onClick:T=>g(M,B),class:"hover:bg-genpact-darkest-blue bg-genpact-blue-box text-white font-bold py-2 px-6 rounded-lg hover:-translate-y-1 hover:scale-100 duration-300"}," edit ",8,FG)):(m(),Q("div",GG,xG))])]))),128))])])])])])):(m(),Di(ll,{key:1}))],64))}})},Symbol.toStringTag,{value:"Module"})),kG={className:"flex justify-between items-center gap-4 h-14"},jG=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),YG=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Data",-1),zG=h("img",{class:"md:w-36 w-20",src:Bo},null,-1),PG=Qe({__name:"HeaderForEditSkillData",setup(t){const e=ua(),i=()=>{eo(()=>{sessionStorage.removeItem("dataViewAccess")}),e.push({name:"SkillData"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")};return(n,o)=>(m(),Q("div",kG,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[ne(D(OC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),jG]),YG,zG]))}}),ki=t=>(at("data-v-18de1cf9"),t=t(),ct(),t),bG={class:"bg-genpact-blue-box w-full px-5 mb-6"},JG={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},HG=ki(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[We("Topic Name "),h("span",{class:"label"},"*")])],-1)),qG={class:"col-span-4"},VG=["disabled"],WG=ki(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[We("Description "),h("span",{class:"label"},"*")])],-1)),ZG={class:"col-span-4"},XG=ki(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"Knowledge Corpus",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[We("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),_G={class:"col-span-4"},$G=ki(()=>h("div",{class:"col-span-1"},null,-1)),ex={class:"col-span-4"},tx={class:"md:flex block justify-between items-center space-y-2"},ix=["disabled"],nx={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-4 py-2"},rx=[ki(()=>h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],ox=["disabled"],sx={key:3,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-10 py-2"},Ax=[ki(()=>h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],ax=ki(()=>h("div",{class:"col-span-1"},null,-1)),cx={key:0,class:"col-span-4"},ux=[ki(()=>h("div",{class:"p-2 items-center text-lg font-bold bg-gray-200"}," This topic is under review and cannot be submitted again at this moment ",-1))],lx={key:0,class:"pl-16 pr-8 py-2"},gx={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},Ex={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},hx=ki(()=>h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Score")])],-1)),Cx={key:0,class:"px-3 py-4 font-medium text-gray-900 text-center"},Ix={key:1,class:"px-3 py-4"},px={key:2,class:"px-3 py-4 text-center"},dx={key:3,class:"px-3 py-4 text-center"},Sx={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},Mx={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},Bx=Qe({__name:"EditSkillData",setup(t){const e=ke(),i=At(),n=f(!0),o=f(!0),s=f(!1),A=f(""),r=f(""),a=f(!1),c=f(!1),u=f(),l=f(),g=f([]),E=async()=>{var S,I,p,M,B,T,L;try{const O={question:e.descriptionForSkillData};console.log("question",r.value),n.value=!1;const R=await lt("/SearchSkillTags",O);console.log("abc",(S=R==null?void 0:R.data)==null?void 0:S.body),l.value=(p=(I=R==null?void 0:R.data)==null?void 0:I.body)==null?void 0:p.length,console.log("ARRAY LENGTH",l.value),u.value=((M=R==null?void 0:R.data)==null?void 0:M.body)||[],g.value=u.value,console.log("length",(T=(B=R==null?void 0:R.data)==null?void 0:B.body)==null?void 0:T.length),console.log("data",R),n.value=!0,a.value=!0,c.value=!0,console.log("showSubmitButton",c.value)}catch(O){if(console.error(O),n.value=!0,ye.isAxiosError(O)){const R=O;i.setError(((L=R.response)==null?void 0:L.data).message)}else i.setError("We ran into an issue while fetching duplicate values.")}},C=async()=>{var S;try{const I={Topic:e.topicNameForSkillData,Description:e.descriptionForSkillData,OfferingType:e.offeringTypeForSkillData,DuplicateExists:l.value>0?1:0};o.value=!1,console.log("payload-=====>",I);const p=await lt("/InsertIntoTempSkillFile",I);console.log("data",p),A.value="Data Submitted Successfully!",o.value=!0,d()}catch(I){if(console.error(I),o.value=!0,ye.isAxiosError(I)){const p=I;i.setError(((S=p.response)==null?void 0:S.data).message)}else i.setError("There was an issue while inserting data")}},d=()=>{s.value=!0,setTimeout(()=>{s.value=!1,eo(()=>{sessionStorage.removeItem("dataViewAccess")}),Br.push({name:"SkillData"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")},3e3),c.value=!1};return(S,I)=>(m(),Q(Oe,null,[h("nav",bG,[ne(PG)]),h("div",JG,[HG,h("div",qG,[Le(h("input",{disabled:D(e).enableInputbox!==!0,class:Ee([D(e).enableInputbox!==!0?"cursor-not-allowed fill-gray-400":"","w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1"]),type:"text","onUpdate:modelValue":I[0]||(I[0]=p=>D(e).topicNameForSkillData=p),id:"topic",placeholder:"Write here...",required:""},null,10,VG),[[qe,D(e).topicNameForSkillData]])]),WG,h("div",ZG,[Le(h("textarea",{"onUpdate:modelValue":I[1]||(I[1]=p=>D(e).descriptionForSkillData=p),onInput:I[2]||(I[2]=p=>c.value=!1),type:"text",id:"description",rows:"5",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,544),[[qe,D(e).descriptionForSkillData]])]),XG,h("div",_G,[Le(h("input",{"onUpdate:modelValue":I[3]||(I[3]=p=>D(e).offeringTypeForSkillData=p),type:"text",id:"offeringType",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,512),[[qe,D(e).offeringTypeForSkillData]])]),$G,h("div",ex,[h("div",tx,[n.value?(m(),Q("button",{key:0,disabled:D(e).isTopicPending===!0,class:Ee([D(e).isTopicPending===!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center whitespace-nowrap text-white w-40 px-4 py-2 rounded-md font-bold"]),onClick:E,type:"button"}," Duplicate Check ",10,ix)):(m(),Q("div",nx,rx)),o.value?(m(),Q("button",{key:2,disabled:c.value!==!0,class:Ee([c.value!==!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center text-white w-40 px-10 py-2 rounded-md font-bold"]),onClick:C,type:"submit"}," Submit ",10,ox)):(m(),Q("div",sx,Ax))])]),ax,D(e).isTopicPending?(m(),Q("div",cx,ux)):Me("",!0)]),a.value?(m(),Q("div",lx,[h("div",gx,[h("table",Ex,[hx,h("tbody",null,[(m(!0),Q(Oe,null,Qt(g.value,(p,M)=>(m(),Q("tr",{key:M,class:"odd:bg-white even:bg-gray-100"},[p.Topic!==D(e).topicNameForSkillData?(m(),Q("th",Cx,de(p.Topic||"title"),1)):Me("",!0),p.Topic!==D(e).topicNameForSkillData?(m(),Q("td",Ix,de(p.Description||"desc"),1)):Me("",!0),p.Topic!==D(e).topicNameForSkillData?(m(),Q("td",px,de(p.OfferingType||"Knowledge Corpus"),1)):Me("",!0),p.Topic!==D(e).topicNameForSkillData?(m(),Q("td",dx,de(p.new_tag),1)):Me("",!0)]))),128))])])])])):Me("",!0),Le(h("div",Sx,[h("div",Mx,de(A.value),1)],512),[[hr,s.value]])],64))}}),Lj="",vx=Object.freeze(Object.defineProperty({__proto__:null,default:je(Bx,[["__scopeId","data-v-18de1cf9"]])},Symbol.toStringTag,{value:"Module"})),fx={},wx={className:"flex justify-between items-center gap-4 h-14"},mx=[h("div",{class:"text-white font-bold md:text-xl text-base"}," AI Guru Skill Automation ",-1),h("img",{class:"md:w-36 w-20",src:Bo},null,-1)];function Qx(t,e){return m(),Q("div",wx,mx)}const Rx=je(fx,[["render",Qx]]),Dx={class:"bg-genpact-blue-box w-full px-5 mb-4"},yx={key:0},Tx={class:"w-full px-6 py-1"},Lx=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Topic Update Request ",-1),Ox={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},Ux={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},Nx=h("thead",{class:"text-sm text-center md:text-base font-bold text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Duplicate Exist"),h("th",{scope:"col",class:"px-6 py-3"},"View")])],-1),Kx={class:"px-3 py-4 font-medium text-gray-900 text-center"},Fx={class:"px-3 py-4"},Gx={class:"px-3 py-4 text-center"},xx={class:"px-2 py-4 text-center"},kx={class:"px-2 py-4 text-gray-500 hover:text-genpact-darkest-blue"},jx=Object.freeze(Object.defineProperty({__proto__:null,default:Qe({__name:"SkillAutomation",setup(t){const e=f([]),i=f(),n=f(!1),o=ke(),s=At(),A=ua(),r=c=>{sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","skillAutomation"),A.replace({name:"EditSkillAdminData"}),o.topicNameForSkillData=c.Topic,o.descriptionForSkillData=c.Description,o.offeringTypeForSkillData=c.OfferingType,o.enableInputbox=!1},a=async()=>{var c,u;try{const l=await Zt("/sqlTest");i.value=((c=l==null?void 0:l.data)==null?void 0:c.body)||[],e.value=i.value,console.log("length",l.data.length),console.log("data",l.data)}catch(l){if(console.error(l),ye.isAxiosError(l)){const g=l;s.setError(((u=g.response)==null?void 0:u.data).message)}else s.setError("There was an issue while fetching data")}};return Nt(async()=>{await a(),n.value=!0}),(c,u)=>(m(),Q(Oe,null,[h("nav",Dx,[ne(Rx)]),n.value?(m(),Q("div",yx,[h("div",Tx,[Lx,h("div",Ox,[h("table",Ux,[Nx,h("tbody",null,[(m(!0),Q(Oe,null,Qt(e.value,(l,g)=>(m(),Q("tr",{key:g,class:"odd:bg-white even:bg-gray-100"},[h("th",Kx,de(l.Topic||"title"),1),h("td",Fx,de(l.Description||"desc"),1),h("td",Gx,de(l.OfferingType||"Knowledge Corpus"),1),h("td",xx,de(l.DuplicateExists),1),h("td",kx,[ne(D(Wm),{onClick:E=>r(l),class:"w-8 h-8 text-center cursor-pointer hover:-translate-y-1 hover:scale-110 duration-300"},null,8,["onClick"])])]))),128))])])])])])):(m(),Di(ll,{key:1}))],64))}})},Symbol.toStringTag,{value:"Module"})),Yx={className:"flex justify-between items-center gap-4 h-14"},zx=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),Px=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Admin Data",-1),bx=h("img",{class:"md:w-36 w-20",src:Bo},null,-1),Jx=Qe({__name:"HeaderForEditSKillAdminDatas",setup(t){const e=ua(),i=()=>{const n=sessionStorage.getItem("role");console.log("role",n),n==="user"?e.push({name:"SkillData"}):n==="admin"?e.push({name:"SkillData"}):e.push({name:"SkillAutomation"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")};return(n,o)=>(m(),Q("div",Yx,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[ne(D(OC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),zx]),Px,bx]))}}),li=t=>(at("data-v-ecf2c818"),t=t(),ct(),t),Hx={class:"bg-genpact-blue-box w-full px-5 mb-6"},qx={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},Vx=li(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[We("Topic Name "),h("span",{class:"label"},"*")])],-1)),Wx={class:"col-span-4"},Zx=["disabled"],Xx=li(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[We("Description "),h("span",{class:"label"},"*")])],-1)),_x={class:"col-span-4"},$x=li(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"Knowledge Corpus",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[We("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),ek={class:"col-span-4"},tk=li(()=>h("div",{class:"col-span-1"},null,-1)),ik={class:"col-span-4"},nk={class:"grid md:grid-cols-5 grid-cols-1 justify-start items-center gap-2"},rk={class:"col-span-1"},ok=["disabled"],sk={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40"},Ak=[li(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],ak=li(()=>h("div",{class:"col-span-1"},null,-1)),ck=li(()=>h("div",{class:"col-span-1"},null,-1)),uk={class:"col-span-1 flex md:justify-end justify-start items-end"},lk={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},gk=[li(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],Ek={class:"col-span-1 flex md:justify-end justify-start items-end"},hk=["disabled"],Ck={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},Ik=[li(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],pk={class:"pl-16 pr-8 py-2"},dk={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},Sk={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},Mk=li(()=>h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Score")])],-1)),Bk={class:"px-3 py-4 font-medium text-gray-900 text-center"},vk={class:"px-3 py-4"},fk={class:"px-3 py-4 text-center"},wk=li(()=>h("td",{class:"px-3 py-4 text-center"},de("1.05"),-1)),mk={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},Qk={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},Rk=Qe({__name:"EditSkillAdminData",setup(t){const e=ke(),i=At(),n=f(!0),o=f(!0),s=f(!0),A=f(!1),r=f(""),a=f(!1),c=f(!1),u=f(),l=f(),g=f(""),E=f([]),C=async()=>{var p,M,B,T,L,O;try{const R={question:e.descriptionForSkillData};console.log("question",r.value),n.value=!1;const k=await lt("/SearchSkillTags",R);l.value=(M=(p=k==null?void 0:k.data)==null?void 0:p.body)==null?void 0:M.length,console.log("ARRAY LENGTH",l.value),u.value=((B=k==null?void 0:k.data)==null?void 0:B.body)||[],E.value=u.value,console.log("length",(L=(T=k==null?void 0:k.data)==null?void 0:T.body)==null?void 0:L.length),console.log("data",k),n.value=!0,a.value=!0,c.value=!0,console.log("showSubmitButton",c.value)}catch(R){if(console.error(R),n.value=!0,ye.isAxiosError(R)){const k=R;i.setError(((O=k.response)==null?void 0:O.data).message)}else i.setError("We ran into an issue while fetching duplicate values.")}},d=async()=>{var p;try{console.log("before rejecting topic"),o.value=!1;const M=encodeURIComponent(e.topicNameForSkillData),B=await Zt(`/rejectTempTopic?Topic=${M}`);console.log("encoded topic",M),console.log("response",B),o.value=!0,B.status===200&&(e.topicNameForSkillData="",e.descriptionForSkillData="",e.offeringTypeForSkillData="",console.log("after rejecting topic"),g.value="Data Rejected Successfully!",I())}catch(M){if(console.error(M),o.value=!0,ye.isAxiosError(M)){const B=M;i.setError(((p=B.response)==null?void 0:p.data).message)}else i.setError("We ran into an issue while rejecting values.")}},S=async()=>{var p;try{const M={Topic:e.topicNameForSkillData,Description:e.descriptionForSkillData,OfferingType:e.offeringTypeForSkillData};console.log("payload-=====>",M),s.value=!1;const B=await lt("/editMasterSkillFile",M);console.log("data",B),s.value=!0,g.value="Data Submitted Successfully!",I()}catch(M){if(console.error(M),s.value=!0,ye.isAxiosError(M)){const B=M;i.setError(((p=B.response)==null?void 0:p.data).message)}else i.setError("There was an issue while inserting data")}},I=()=>{A.value=!0,setTimeout(()=>{A.value=!1;const p=sessionStorage.getItem("role");console.log("role",p),p==="user"?Br.push({name:"SkillData"}):p==="admin"?Br.push({name:"SkillData"}):Br.push({name:"SkillAutomation"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")},3e3)};return(p,M)=>(m(),Q(Oe,null,[h("nav",Hx,[ne(Jx)]),h("div",qx,[Vx,h("div",Wx,[Le(h("input",{disabled:D(e).enableInputbox!==!0,class:Ee([D(e).enableInputbox!==!0?"cursor-not-allowed fill-gray-400":"","w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1"]),type:"text","onUpdate:modelValue":M[0]||(M[0]=B=>D(e).topicNameForSkillData=B),id:"topic",placeholder:"Write here...",required:""},null,10,Zx),[[qe,D(e).topicNameForSkillData]])]),Xx,h("div",_x,[Le(h("textarea",{"onUpdate:modelValue":M[1]||(M[1]=B=>D(e).descriptionForSkillData=B),onInput:M[2]||(M[2]=B=>c.value=!1),type:"text",id:"description",rows:"5",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,544),[[qe,D(e).descriptionForSkillData]])]),$x,h("div",ek,[Le(h("input",{"onUpdate:modelValue":M[3]||(M[3]=B=>D(e).offeringTypeForSkillData=B),type:"text",id:"offeringType",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,512),[[qe,D(e).offeringTypeForSkillData]])]),tk,h("div",ik,[h("div",nk,[h("div",rk,[n.value?(m(),Q("button",{key:0,disabled:D(e).isTopicPending===!0,class:Ee([D(e).isTopicPending===!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center whitespace-nowrap text-white w-52 px-4 py-2 rounded-md font-bold"]),type:"button",onClick:C}," Duplicate Check ",10,ok)):(m(),Q("div",sk,Ak))]),ak,ck,h("div",uk,[o.value?(m(),Q("button",{key:0,type:"button",onClick:d,class:"bg-genpact-darkest-blue text-center text-white w-52 px-16 py-2 rounded-md font-bold cursor-pointer"}," Reject ")):(m(),Q("div",lk,gk))]),h("div",Ek,[s.value?(m(),Q("button",{key:0,type:"submit",disabled:c.value!==!0,class:Ee([c.value!==!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center text-white w-52 px-2 py-2 rounded-md whitespace-nowrap font-bold"]),onClick:S}," Approve & Submit ",10,hk)):(m(),Q("div",Ck,Ik))])])])]),Le(h("div",pk,[h("div",dk,[h("table",Sk,[Mk,h("tbody",null,[(m(!0),Q(Oe,null,Qt(E.value,(B,T)=>(m(),Q("tr",{key:T,class:"odd:bg-white even:bg-gray-100"},[h("th",Bk,de(B.Topic||"title"),1),h("td",vk,de(B.Description||"desc"),1),h("td",fk,de(B.OfferingType||"Knowledge Corpus"),1),wk]))),128))])])])],512),[[hr,a.value]]),Le(h("div",mk,[h("div",Qk,de(g.value),1)],512),[[hr,A.value]])],64))}}),kj="",Dk=Object.freeze(Object.defineProperty({__proto__:null,default:je(Rk,[["__scopeId","data-v-ecf2c818"]])},Symbol.toStringTag,{value:"Module"})),yk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgEAAAIBCAYAAADQ5mxhAAAACXBIWXMAAAsSAAALEgHS3X78AAAfXUlEQVR4nO3dsY7kRp7gYeZhjfI0uhfYg/YBpoDSA8ho+duGxh0NCpDc9VrmmZJ160pAYSR3ZdSdrTbmBRLIeYAR9g2065WXB7aCUnV1VVcwM0hGxP/7gELNYHeqM5kZ5I9kkNwdj8cBAIjnf/jMASAmEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAAAISgQAQFAiAACCEgEAEJQIAICgRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAAAISgQAQFAiAACCEgEAEJQIAICgRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEH9kw+eiC6uri+HYfi/wzD8693+5uBLEM/u9vD9+KaPLy8/j74siMuRAMJJAfC3YRj+efyd/juBpAD48/gzxQBEJAII5V4AfJDe9wdCIJZ7ATARAoQlAgjjkQCYCIEgHgmAiRAgJBFACO8JgIkQ6Nx7AmAiBAhHBNC9jACYCIFOZQTARAgQigig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gRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAACIaBiG/w+yjGibxxwNWgAAAABJRU5ErkJggg==",Tk={},Lk={class:"w-screen h-screen flex justify-center"},Ok=[h("div",{class:"flex flex-col justify-center items-center gap-6"},[h("img",{class:"h-24",src:yk}),h("div",{class:"font-bold text-[50px] capitalize text-gray-600"},"We are under maintenance"),h("div",{class:"font-medium text-lg capitalize text-gray-600"},"please check back later")],-1)];function Uk(t,e){return m(),Q("div",Lk,Ok)}const JS=Object.freeze(Object.defineProperty({__proto__:null,default:je(Tk,[["render",Uk]])},Symbol.toStringTag,{value:"Module"}))});