@genpact/genome.mfe.mgtwin-app 1.1.285-alpha → 1.1.286-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.
- package/dist/{ArrowLeftCircleIcon-15def158.mjs → ArrowLeftCircleIcon-8c33784b.mjs} +1 -1
- package/dist/{AssessmentAMA-4ee1008e.mjs → AssessmentAMA-ecc0abf4.mjs} +4 -4
- package/dist/{AssessmentSimulation-4a4be6a8.mjs → AssessmentSimulation-aa86c462.mjs} +338 -346
- package/dist/{EditSkillAdminData-e51c55ab.mjs → EditSkillAdminData-befae193.mjs} +3 -3
- package/dist/{EditSkillData-1a9ffc40.mjs → EditSkillData-336b859b.mjs} +3 -3
- package/dist/{HomeView-eeb98bf2.mjs → HomeView-d28dc788.mjs} +5 -5
- package/dist/{Loading-39e69dcb.mjs → Loading-c0746887.mjs} +1 -1
- package/dist/{LoadingSimulation-f8effb57.mjs → LoadingSimulation-17a952c1.mjs} +1 -1
- package/dist/{Modal-67d16971.mjs → Modal-6d2b59b4.mjs} +1 -1
- package/dist/{PromptTesting-bb805ab4.mjs → PromptTesting-00afb91e.mjs} +2 -2
- package/dist/{SkillAutomation-210ac971.mjs → SkillAutomation-c0caf2aa.mjs} +3 -3
- package/dist/{SkillData-15cc1110.mjs → SkillData-50fa7b42.mjs} +3 -3
- package/dist/{UnderMaintenance-26b2bcf3.mjs → UnderMaintenance-cf5c80fa.mjs} +1 -1
- package/dist/{_commonjsHelpers-2917dca2.mjs → _commonjsHelpers-a86f80a2.mjs} +1 -1
- package/dist/{api-92788483.mjs → api-5cdb4e07.mjs} +1 -1
- package/dist/{main-288961bc.mjs → main-79fcc8e4.mjs} +175 -175
- package/dist/mgtwin.es.min.js +1 -1
- package/dist/mgtwin.umd.min.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/mgtwin.umd.min.js
CHANGED
|
@@ -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 ii.ConnectionMessage(e.messageType,s,o,e.id))}else if(e.messageType===ii.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 ii.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 ii.Deferred;try{if(e.messageType===ii.MessageType.Text){const n=`${this.makeHeaders(e)}${kd}${e.textBody?e.textBody:""}`;i.resolve(new ii.RawWebsocketMessage(ii.MessageType.Text,n,e.id))}else if(e.messageType===ii.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 ii.RawWebsocketMessage(ii.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]}${kd}`);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}}fc.WebsocketMessageFormatter=aO;var qs={},Yd;function cO(){if(Yd)return qs;Yd=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.SpeechConnectionFactory=void 0;const t=It(),e=se(),i=V(),n=li(),o=se(),s=Ct,A=ui,r=qt;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),N=R.pathname;(N===""||N==="/")&&(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 D=u.parameters.getProperty("SPEECH-EnableWebsocketCompression","false")==="true",L=new t.WebsocketConnection(E,I,B,new o.WebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(u),D,g),O=L.uri;return u.parameters.setProperty(i.PropertyId.SpeechServiceConnection_Url,O),L}};return qs.SpeechConnectionFactory=a,qs}var Vs={},zd;function uO(){if(zd)return Vs;zd=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.ConversationTranscriberConnectionFactory=void 0;const t=It(),e=V(),i=se(),n=li(),o=se(),s=Ct,A=ui;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",D=new t.WebsocketConnection(g,S,M,new o.WebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(c),B,l),L=D.uri;return c.parameters.setProperty(e.PropertyId.SpeechServiceConnection_Url,L),D}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 lO(){if(Pd)return Ws;Pd=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.TranscriberConnectionFactory=void 0;const t=It(),e=V(),i=li(),n=se(),o=Ct,s=ui;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 gO(){if(bd)return Zs;bd=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.TranslationConnectionFactory=void 0;const t=It(),e=Ds,i=V(),n=li(),o=se(),s=Ct,A=ui,r=qt;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 EO(){if(Jd)return Xs;Jd=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.EnumTranslation=void 0;const t=V(),e=se();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 hO(){if(qd)return _s;qd=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.TranslationSynthesisEnd=void 0;const t=se();let e=class uM{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 uM(n)}get SynthesisStatus(){return this.privSynthesisEnd.SynthesisStatus}get FailureReason(){return this.privSynthesisEnd.FailureReason}};return _s.TranslationSynthesisEnd=e,_s}var wc={};Object.defineProperty(wc,"__esModule",{value:!0}),wc.TranslationHypothesis=void 0;const CO=Se,Vd=ba;class mc{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 mc(JSON.parse(e),i)}static fromTranslationResponse(e,i){CO.Contracts.throwIfNullOrUndefined(e,"translationHypothesis");const n=e.SpeechHypothesis;return e.SpeechHypothesis=void 0,n.Translation=e,new mc(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}}wc.TranslationHypothesis=mc;var $s={},Wd;function IO(){if(Wd)return $s;Wd=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.TranslationPhrase=void 0;const t=Se,e=se(),i=ba;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 pO(){if(Zd)return eA;Zd=1,Object.defineProperty(eA,"__esModule",{value:!0}),eA.TranslationServiceRecognizer=void 0;const t=he(),e=V(),i=se();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 Qc={};Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.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}}Qc.SpeechHypothesis=Zl;var Dc={};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.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)}}Dc.SpeechKeyword=Xl;var tA={},Xd;function dO(){if(Xd)return tA;Xd=1,Object.defineProperty(tA,"__esModule",{value:!0}),tA.SpeechServiceRecognizer=void 0;const t=V(),e=se();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 SO(){if($d)return iA;$d=1,Object.defineProperty(iA,"__esModule",{value:!0}),iA.ConversationTranscriptionServiceRecognizer=void 0;const t=V(),e=se(),i=_d,n=qt;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 MO(){if(eS)return nA;eS=1,Object.defineProperty(nA,"__esModule",{value:!0}),nA.TranscriptionServiceRecognizer=void 0;const t=he(),e=V(),i=se(),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 BO(){if(tS)return rA;tS=1,Object.defineProperty(rA,"__esModule",{value:!0}),rA.DetailedSpeechPhrase=void 0;const t=se();let e=class lM{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 lM(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 vO(){if(iS)return oA;iS=1,Object.defineProperty(oA,"__esModule",{value:!0}),oA.SimpleSpeechPhrase=void 0;const t=se();let e=class gM{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 gM(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 yc={};Object.defineProperty(yc,"__esModule",{value:!0}),yc.AddedLmIntent=void 0;class fO{constructor(e,i){this.modelImpl=e,this.intentName=i}}yc.AddedLmIntent=fO;var sA={},nS;function wO(){if(nS)return sA;nS=1,Object.defineProperty(sA,"__esModule",{value:!0}),sA.IntentServiceRecognizer=void 0;const t=he(),e=V(),i=se();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 Tc={};Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.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}}Tc.IntentResponse=_l;var rS={};Object.defineProperty(rS,"__esModule",{value:!0});var Lc={},Oc={};Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.ServiceTelemetryListener=void 0;const Gi=he(),oS=vc;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()}}}Oc.ServiceTelemetryListener=mO,Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.RequestSession=void 0;const Lr=he(),Uc=vc,RO=Oc;class QO{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 RO.ServiceTelemetryListener(this.privRequestId,this.privAudioSourceId,this.privAudioNodeId),this.onEvent(new Uc.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 Uc.ListeningStartedEvent(this.privRequestId,this.privSessionId,this.privAudioSourceId,this.privAudioNodeId))}onPreConnectionStart(e,i){this.privAuthFetchEventId=e,this.privSessionId=i,this.onEvent(new Uc.ConnectingToServiceEvent(this.privRequestId,this.privAuthFetchEventId,this.privSessionId))}async onAuthCompleted(e){e&&await this.onComplete()}async onConnectionEstablishCompleted(e,i){if(e===200){this.onEvent(new Uc.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())}}Lc.RequestSession=QO;var Nc={},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(Nc,"__esModule",{value:!0}),Nc.SpeechContext=void 0;const DO=qt,Cn=sS;class yO{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=DO.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)}}Nc.SpeechContext=yO;var Kc={},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(Kc,"__esModule",{value:!0}),Kc.DynamicGrammarBuilder=void 0;const TO=AS;class LO{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:TO.GroupType.Generic,items:i}]}return e}}Kc.DynamicGrammarBuilder=LO;var AA={},Fc={},Gc={},$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(Gc,"__esModule",{value:!0}),Gc.DialogServiceTurnState=void 0;const OO=En,UO=ft,NO=$l;class KO{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===NO.MessageDataStreamType.TextToSpeechAudio&&(this.privAudioStream=UO.AudioOutputStream.createPullStream(),this.privAudioStream.format=i!==void 0?i:OO.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)}}Gc.DialogServiceTurnState=KO,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.DialogServiceTurnStateManager=void 0;const aS=Mt,FO=Gc;class GO{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 FO.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}}Fc.DialogServiceTurnStateManager=GO;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 xO(){if(lS)return AA;lS=1,Object.defineProperty(AA,"__esModule",{value:!0}),AA.DialogServiceAdapter=void 0;const t=It(),e=Ln,i=he(),n=En,o=V(),s=Fc,A=se(),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 D=A.SpeechKeyword.fromJSON(E.textBody,this.privRequestSession.currentTurnAudioOffset);d=new o.SpeechRecognitionResult(this.privRequestSession.requestId,D.Status==="Accepted"?o.ResultReason.RecognizedKeyword:o.ResultReason.NoMatch,D.Text,D.Duration,D.Offset,void 0,void 0,void 0,void 0,D.asJson(),C),D.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,D=new t.ReplayableAudioNode(p,M.avgBytesPerSec);await this.privRequestSession.onAudioSourceAttachCompleted(D,!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(D).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(),x=this.privRequestSession.requestId.toUpperCase();Y!==x?this.privTurnStateManager.StartTurn(Y):this.privRequestSession.onServiceTurnStartResponse()}break;case"speech.startdetected":const D=A.SpeechDetected.fromJSON(M.textBody,this.privRequestSession.currentTurnAudioOffset),L=new o.RecognitionEventArgs(D.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 N=new o.RecognitionEventArgs(R.Offset,this.privRequestSession.sessionId);this.privRecognizer.speechEndDetected&&this.privRecognizer.speechEndDetected(this.privRecognizer,N);break;case"turn.end":{const Y=M.requestId.toUpperCase(),x=this.privRequestSession.requestId.toUpperCase();if(Y!==x)this.privTurnStateManager.CompleteTurn(Y);else{const G=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,G),this.privSuccessCallback&&this.privLastResult){try{this.privSuccessCallback(this.privLastResult),this.privLastResult=null}catch(X){this.privErrorCallback&&this.privErrorCallback(X)}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 D={text:S[B]};B<I.length&&(D.startOffset=Number(I[B])),B<p.length&&(D.duration=Number(p[B])),M.push(D)}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 xc={};Object.defineProperty(xc,"__esModule",{value:!0}),xc.AgentConfig=void 0;class jO{toJsonString(){return JSON.stringify(this.iPrivConfig)}get(){return this.iPrivConfig}set(e){this.iPrivConfig=e}}xc.AgentConfig=jO;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 YO(){if(gS)return aA;gS=1,Object.defineProperty(aA,"__esModule",{value:!0}),aA.ConversationManager=void 0;const t=It(),e=Se,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(D=>{const L=t.RestMessageAdapter.extractHeaderValue(this.privRequestParams.requestId,D.headers);if(!D.ok){if(c){let R=this.privErrors.invalidCreateJoinConversationResponse.replace("{status}",D.status.toString()),N;try{N=JSON.parse(D.data),R+=` [${N.error.code}: ${N.error.message}]`}catch{R+=` [${D.data}]`}L&&(R+=` ${L}`),c(R)}return}const O=JSON.parse(D.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 Hn={},cA={},jc={},uA={};Object.defineProperty(uA,"__esModule",{value:!0}),uA.ConversationConnectionMessage=void 0;const zO=he();class PO extends zO.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=PO,Object.defineProperty(jc,"__esModule",{value:!0}),jc.ConversationWebsocketMessageFormatter=void 0;const qn=he(),ES=uA;class bO{toConnectionMessage(e){const i=new qn.Deferred;try{if(e.messageType===qn.MessageType.Text){const n=new ES.ConversationConnectionMessage(e.messageType,e.textContent,{},e.id);i.resolve(n)}else e.messageType===qn.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 qn.Deferred;try{if(e.messageType===qn.MessageType.Text){const n=`${e.textBody?e.textBody:""}`;i.resolve(new qn.RawWebsocketMessage(qn.MessageType.Text,n,e.id))}}catch(n){i.reject(`Error formatting the message. ${n}`)}return i.promise}}jc.ConversationWebsocketMessageFormatter=bO;var hS;function JO(){if(hS)return cA;hS=1,Object.defineProperty(cA,"__esModule",{value:!0}),cA.ConversationConnectionFactory=void 0;const t=It(),e=he(),i=Se,n=V(),o=li(),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={},kc={};Object.defineProperty(kc,"__esModule",{value:!0}),kc.ConversationRequestSession=void 0;const tg=he();class HO{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(){}}kc.ConversationRequestSession=HO;var Kt={},CS;function IS(){if(CS)return Kt;CS=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.ConversationReceivedTranslationEventArgs=Kt.ParticipantsListEventArgs=Kt.ParticipantAttributeEventArgs=Kt.ParticipantEventArgs=Kt.LockRoomEventArgs=Kt.MuteAllEventArgs=void 0;const t=V();class e extends t.SessionEventArgs{constructor(a,c){super(c),this.privIsMuted=a}get isMuted(){return this.privIsMuted}}Kt.MuteAllEventArgs=e;class i extends t.SessionEventArgs{constructor(a,c){super(c),this.privIsLocked=a}get isMuted(){return this.privIsLocked}}Kt.LockRoomEventArgs=i;class n extends t.SessionEventArgs{constructor(a,c){super(c),this.privParticipant=a}get participant(){return this.privParticipant}}Kt.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}}Kt.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}}Kt.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 Kt.ConversationReceivedTranslationEventArgs=A,Kt}var xi={};Object.defineProperty(xi,"__esModule",{value:!0}),xi.ConversationTranslatorCommandTypes=xi.ConversationTranslatorMessageTypes=xi.InternalParticipants=void 0;class qO{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=qO,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={},Yc={};Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.CommandResponsePayload=void 0;const VO=t=>JSON.parse(t);class ig{constructor(e){this.privCommandResponse=VO(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)}}Yc.CommandResponsePayload=ig;var Ur={};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.ParticipantPayloadResponse=Ur.ParticipantsListPayloadResponse=void 0;const WO=t=>JSON.parse(t),ZO=t=>JSON.parse(t);class ng{constructor(e){this.privParticipantsPayloadResponse=WO(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=ZO(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 XO=t=>JSON.parse(t),_O=t=>JSON.parse(t);class og{constructor(e){this.privSpeechResponse=XO(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=_O(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=Yc;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 $O(){if(dS)return lA;dS=1,Object.defineProperty(lA,"__esModule",{value:!0}),lA.ConversationServiceAdapter=void 0;const t=he(),e=V(),i=se(),n=uA,o=kc,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(X=>({avatar:X.avatar,displayName:X.nickname,id:X.participantId,isHost:X.ishost,isMuted:X.ismuted,isUsingTts:X.usetts,preferredLanguage:X.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),N={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(N,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 x={id:S.participantId};break;case"token":const G=new i.CognitiveTokenAuthentication(()=>{const X=S.token;return Promise.resolve(X)},()=>{const X=S.token;return Promise.resolve(X)});this.authentication=G,this.privConversationServiceConnector.onToken(G);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),D=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,D,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 eU(){if(SS)return Hn;SS=1,Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ConversationTranslatorRecognizer=Hn.ConversationRecognizerFactory=void 0;const t=se(),e=he(),i=Se,n=V(),o=JO(),s=$O();class A{static fromConfig(c,u,l){return new r(c,u,l)}}Hn.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 Hn.ConversationTranslatorRecognizer=r,Hn}var gA={},MS;function tU(){if(MS)return gA;MS=1,Object.defineProperty(gA,"__esModule",{value:!0}),gA.TranscriberRecognizer=void 0;const t=he(),e=Se,i=V(),n=se(),o=qt;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 iU(){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=YO();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=eU();Object.defineProperty(t,"ConversationRecognizerFactory",{enumerable:!0,get:function(){return n.ConversationRecognizerFactory}});var o=tU();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={},Mi={};Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.SynthesisStartedEvent=Mi.ConnectingToSynthesisServiceEvent=Mi.SynthesisTriggeredEvent=Mi.SpeechSynthesisEvent=void 0;const vS=he();class zc extends vS.PlatformEvent{constructor(e,i,n=vS.EventType.Info){super(e,n),this.privRequestId=i}get requestId(){return this.privRequestId}}Mi.SpeechSynthesisEvent=zc;class nU extends zc{constructor(e,i,n){super("SynthesisTriggeredEvent",e),this.privSessionAudioDestinationId=i,this.privTurnAudioDestinationId=n}get audioSessionDestinationId(){return this.privSessionAudioDestinationId}get audioTurnDestinationId(){return this.privTurnAudioDestinationId}}Mi.SynthesisTriggeredEvent=nU;class rU extends zc{constructor(e,i){super("ConnectingToSynthesisServiceEvent",e),this.privAuthFetchEventId=i}get authFetchEventId(){return this.privAuthFetchEventId}}Mi.ConnectingToSynthesisServiceEvent=rU;class oU extends zc{constructor(e,i){super("SynthesisStartedEvent",e),this.privAuthFetchEventId=i}get authFetchEventId(){return this.privAuthFetchEventId}}Mi.SynthesisStartedEvent=oU;var fS;function sU(){if(fS)return EA;fS=1,Object.defineProperty(EA,"__esModule",{value:!0}),EA.SynthesisTurn=void 0;const t=he(),e=ft,i=V(),n=Ag,o=Mi;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 AU(){if(wS)return hA;wS=1,Object.defineProperty(hA,"__esModule",{value:!0}),hA.SynthesisAdapterBase=void 0;const t=he(),e=V(),i=se(),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 aU(){if(mS)return CA;mS=1,Object.defineProperty(CA,"__esModule",{value:!0}),CA.AvatarSynthesisAdapter=void 0;const t=V(),e=se();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={},RS;function cU(){if(RS)return IA;RS=1,Object.defineProperty(IA,"__esModule",{value:!0}),IA.SpeechSynthesisAdapter=void 0;const t=V(),e=se();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={},QS;function uU(){if(QS)return pA;QS=1,Object.defineProperty(pA,"__esModule",{value:!0}),pA.SynthesisRestAdapter=void 0;const t=It(),e=V(),i=li(),n=Ct;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 lU(){return DS||(DS=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SynthesizerConfig=t.SynthesisServiceType=void 0;const e=se();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 gU(){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 EU(){if(TS)return SA;TS=1,Object.defineProperty(SA,"__esModule",{value:!0}),SA.SpeakerRecognitionConfig=void 0;const t=se();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 hU(){if(LS)return MA;LS=1,Object.defineProperty(MA,"__esModule",{value:!0}),MA.SpeakerServiceRecognizer=void 0;const t=It(),e=he(),i=V(),n=se(),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 CU(){if(OS)return BA;OS=1,Object.defineProperty(BA,"__esModule",{value:!0}),BA.VoiceServiceRecognizer=void 0;const t=It(),e=he(),i=V(),n=se(),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 se(){return NS||(NS=1,function(t){var e=ye&&ye.__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=ye&&ye.__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(fa,t),i(Ha,t),i(Qr,t),i(vI,t),i(fI,t),i(nO(),t),i(rO(),t),i(vc,t),i(oO(),t),i(sO(),t),i(AO(),t),i(jd,t),i(fc,t),i(cO(),t),i(uO(),t),i(lO(),t),i(gO(),t),i(pd(),t),i(EO(),t),i(Hd,t),i(hO(),t),i(wc,t),i(IO(),t),i(pO(),t),i(Rc,t),i(Qc,t),i(Dc,t),i(dO(),t),i(SO(),t),i(MO(),t),i(BO(),t),i(vO(),t),i(yc,t),i(wO(),t),i(Tc,t),i(rS,t),i(Lc,t),i(Nc,t),i(Kc,t),i(xO(),t),i(xc,t),i(iU(),t),i(Ag,t),i(sU(),t),i(AU(),t);var n=aU();Object.defineProperty(t,"AvatarSynthesisAdapter",{enumerable:!0,get:function(){return n.AvatarSynthesisAdapter}});var o=cU();Object.defineProperty(t,"SpeechSynthesisAdapter",{enumerable:!0,get:function(){return o.SpeechSynthesisAdapter}}),i(uU(),t),i(lU(),t),i(gU(),t),i(EU(),t),i(hU(),t),i(CU(),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=ye&&ye.__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=ye&&ye.__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=se();new n.AgentConfig,i(V(),t)})(Si);const wt=[];for(let t=0;t<256;++t)wt.push((t+256).toString(16).slice(1));function IU(t,e=0){return(wt[t[e+0]]+wt[t[e+1]]+wt[t[e+2]]+wt[t[e+3]]+"-"+wt[t[e+4]]+wt[t[e+5]]+"-"+wt[t[e+6]]+wt[t[e+7]]+"-"+wt[t[e+8]]+wt[t[e+9]]+"-"+wt[t[e+10]]+wt[t[e+11]]+wt[t[e+12]]+wt[t[e+13]]+wt[t[e+14]]+wt[t[e+15]]).toLowerCase()}let cg;const pU=new Uint8Array(16);function dU(){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(pU)}const KS={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function SU(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))??dU();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 IU(n)}const Kr=ut(),FS=Ye(),Fr=f(""),Vn=f(""),Gr=f(""),Ft=f(""),GS=f("");let In=null;const xS=4e3;Yt(async()=>{await ug()});let nt=null,xr=null,Bi=null,Pc=null;const jr=()=>{Bi&&Bi.mute(),nt&&(nt.close(),nt=null),xr=null},ug=async()=>{var t,e,i;try{const n=await Jt("/voiceTesting");return(t=n==null?void 0:n.data)==null?void 0:t.token}catch(n){if(console.error(n),De.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=()=>{In&&clearTimeout(In),Pc&&(Pc.stopContinuousRecognitionAsync(()=>{},t=>{console.error("Error stopping recognition",t)}),Pc=null)},MU=async t=>{const e=await ug();return await jr(),new Promise((i,n)=>{const o=Si.SpeechConfig.fromAuthorizationToken(e,"eastus2");o.speechSynthesisVoiceName="en-US-EmmaMultilingualNeural",Bi=new Si.SpeakerAudioDestination;const s=Si.AudioConfig.fromSpeakerOutput(Bi);nt=new Si.SpeechSynthesizer(o,s);const A=SU();xr=A,nt.speakTextAsync(t,r=>{if(A!==xr)return Bi==null||Bi.mute(),nt==null||nt.close(),nt=null,i();r.reason===Si.ResultReason.SynthesizingAudioCompleted?i():n(new Error("Speech synthesis failed")),nt==null||nt.close(),nt=null,xr=null},r=>{if(A!==xr)return Bi==null||Bi.mute(),nt==null||nt.close(),nt=null,i();nt==null||nt.close(),nt=null,xr=null,n(r)})})},BU=async t=>{const e=await ug(),i=Si.SpeechConfig.fromAuthorizationToken(e,"eastus2");i.speechRecognitionLanguage="en-US";const n=Si.AudioConfig.fromDefaultMicrophoneInput(),o=new Si.SpeechRecognizer(i,n);return Pc=o,Fr.value="",Vn.value="",o.recognizing=(s,A)=>{A.result.text&&A.result.text.trim()&&(Fr.value=A.result.text.trim(),jr(),FS.userspeaking=!0,FS.userSpeechText=(Vn.value?Vn.value+" ":"")+Fr.value,Ft.value="user",In&&clearTimeout(In),In=setTimeout(()=>{Fr.value&&(t(Fr.value.trim()),Fr.value="")},xS))},o.recognized=(s,A)=>{A.result.reason===Si.ResultReason.RecognizedSpeech&&A.result.text&&A.result.text.trim()&&(Vn.value+=" "+A.result.text.trim(),In&&clearTimeout(In),In=setTimeout(()=>{Vn.value&&(t(Vn.value),Vn.value="")},xS))},o.canceled=(s,A)=>{console.error("Recognition canceled:",A)},o.startContinuousRecognitionAsync(),o},vU=async()=>{var t,e;Gr.value="",GS.value="";try{jr(),await BU(i=>{i&&(Gr.value=i)})}catch(i){if(console.error(i),De.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{(Ft.value=="user"||Ft.value=="listening")&&jr(),await MU(t)}catch(n){if(console.error(n),De.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")}};Ye();const jS=ut(),kr=f(!1),vA=f("");f(""),f(""),Yt(()=>{console.log("Mounted voiceService11Labs")});const fU=async()=>{var t,e,i,n;try{const o=await Jt("/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),De.isAxiosError(o)){const s=o;console.log("Error found!"),console.error((i=s.response)==null?void 0:i.data),jS.setError(((n=s.response)==null?void 0:n.data).message)}else jS.setError("There was an issue while fetching data")}};let bc;const wU="Xb7hH8MSUJpSbSDYk0k2";f(!1);const mU=f("");let Jc=[];const kS=f(!1);let Yr=!1,Gt=null,fA=null,pn=null;f("");let Wn,Zn,zr,Pr;function Eg(){Pr&&Pr.disconnect(),Zn&&Zn.disconnect(),console.log("microphone outside->",zr),zr&&(console.log("microphone->",zr),console.log("Stopping microphone connection"),zr.disconnect()),Wn&&Wn.close()}function RU(t,e=.09){console.log("monitorMicDuringTTS called with threshold:",e),Wn=new(window.AudioContext||window.webkitAudioContext),Zn=Wn.createAnalyser(),zr=Wn.createMediaStreamSource(fA),Pr=Wn.createScriptProcessor(2048,1,1),zr.connect(Zn),Zn.connect(Pr),Pr.connect(Wn.destination),Pr.onaudioprocess=()=>{const i=new Uint8Array(Zn.frequencyBinCount);Zn.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(){kS.value=!0,kr.value=!0,console.log("Starting voice recognition with ElevenLabs"),Gt&&Gt.pause(),fA=await navigator.mediaDevices.getUserMedia({audio:!0}),await QU()}async function QU(){if(!fA)throw new Error("micStream is null");pn=new MediaRecorder(fA),Jc=[],console.log("Starting beginListening with ElevenLabs"),pn.ondataavailable=t=>{Gt&&Gt.pause(),t.data.size>0&&Jc.push(t.data),console.log("Audio chunk available:",Jc)},pn.onstop=async()=>{const t=new Blob(Jc,{type:"audio/webm"}),e=await yU(t);mU.value=e,console.log("Transcription:",e),vA.value=e,kS.value=!1},pn.start(),Gt&&Gt.pause(),DU(fA,()=>{(pn==null?void 0:pn.state)==="recording"&&pn.stop()})}function DU(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 yU(t){console.log("authToken 11labs",bc);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":bc},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),bc=await fU(),Gt&&Gt.pause(),Yr=!0;const i=await(await fetch(`https://api.elevenlabs.io/v1/text-to-speech/${wU}`,{method:"POST",headers:{"xi-api-key":bc,"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 Gt=new Audio(n),new Promise(o=>{Gt&&(Gt.onended=async()=>{Yr=!1,console.log("Audio is playing:",Yr),kr.value?(console.log("micEnabled before calling startrecognition:",kr.value),o(await hg())):o()},Gt.play(),console.log("Audio is playing:",Yr),console.log("micEnabled:",kr.value),kr.value&&RU(()=>{Gt&&(Gt.pause(),Gt.currentTime=0),Yr=!1,console.log("monitorMicDuringTTS:",Yr),console.log("micEnabled before calling startrecognition:",kr.value),hg()}))})}const TU={class:"max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916] fontFormattingAMA"},LU=h("div",{class:"text-[22px] font-[700]"},"Please Note Before You Begin",-1),OU=h("ul",{className:"list-disc max-h-[40vh] overflow-auto space-y-3 pl-6 text-[#102345] text-[15px]"},[h("li",null,"Stay expressive — this is an interactive role-play."),h("li",null,[Rt("The session may take up to "),h("b",{class:"font-[600]"},"10 minutes"),Rt(".")]),h("li",null,"Choose a quiet space and ensure your mic and internet are working."),h("li",null,[Rt("In Voice Mode? Click "),h("span",{class:"font-[600]"},"“Turn on Mic”"),Rt(" to begin.")]),h("li",null,"Don’t mute until your response is fully processed.")],-1),UU={class:"flex items-end justify-start"},NU={class:"fontFormattingAMA w-full bg-gray-100 rounded-lg"},KU={class:"w-full rounded-md px-3 py-2 text-lg font-bold text-black md:text-[22px]"},FU={class:"w-full px-3 py-2 text-base text-black md:text-[16px] font-[550]"},GU={key:0,class:"fontFormattingAMA"},xU=h("br",null,null,-1),jU=` 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=Ye(),i=ut(),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=it(()=>["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=it(()=>["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill)?l:["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill)?jU:g),C=async()=>{var d,S,I,p,M,B;console.log("firstQuestion fired==>"),s.value=!1;try{const D={question:"Hello, let's start"};if(e.conversations.push(D),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,Ft.value="listening";const R=await st("/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,Ft.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;_t==="prod"?O="/ManualExportActivity":O="/fetchCompletionDemo";const R=await st(O,L);e.addConversation((p=R.data)==null?void 0:p.body,"assessment"),e.dotLoader=!1}}catch(D){if(console.error(D),De.isAxiosError(D)){const L=D;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,[re(wr,{"is-visible":n.value},{default:hi(()=>[h("div",TU,[LU,OU,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",UU,[h("div",NU,[h("div",KU,pe(u.value),1),h("div",FU,pe(E.value),1)])]),y(e).beginFlag?(m(),Q("span",GU,[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"}," Let's begin ")])):Be("",!0),xU]))}}),YU="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAB9AH0DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba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ZdMG+WInqo5x+VctYfFTQLu2bw74e006bc3n7pJVG0BvWgDjLz4T+L/AARZyeIkuLeNrMb90cgJFWjrHxJXwT/wlv8AbP8AoG/bt3fN+VaPi34feNdM8L3t1f8AiZ7q2jXLweZncK5x/H1o3wi/4REWU/2rfu8zHy9aANHRtEi02KPxv46j+26dfDChfmbcehIrqvjS1ldeBvDk1hHssZHXylxjCntWxba9o3h74M6Pca5YpfQEKohYZIPrivMPiPoWsW2jWWtzaiZNLu232lrniFTyBj2oA+i/CHhnSNA0m3k02zWB7iFGkI/iO0V0leH/ALP+sapqaalHf3U80cQURiQkhRjtXuFACOu+Nl9QRXiF78CL+bWby/tfEUtsbiQuRHlTg9uK9wooA8L/AOFE63/0N95/38b/ABpsnwG1iWNo5PFl06MOVZ2IP617tRQByHgPwSnhDwqdFuJVvEaRnbevBz7V0VtpGm2coltrC2hkAwGSIA1dooAgurS2vYvKureOaPOdsihhn8ac8I+ytBGBGpQqu0Y28VLRQB5/4T+H174ft9ahutYmvBqAYLvJOzOa8/H7Oc6zGVNeKNuyCq4Ir6AooA8f8PfBzUdK162vr3xFcXtvEcvBKxZX9iDXp/8AYOkZ/wCQXZ/9+V/wrRooA8X8T/BC61/WLm5TW3htJH3JbY+RPoOldD4r+GL+I/Cuj6Mt95f9nhQXI+/ivR6KAKGlaVa6VZQ29tbxRlI1RmRAu4gYyav0UUAf/9k=",Cg=t=>(At("data-v-5b8d29f3"),t=t(),at(),t),zU={class:"fontFormattingAMA flex items-end justify-start py-2"},PU={class:"line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg"},bU=["innerHTML"],JU=["innerHTML"],HU={key:0,class:"py-4"},qU={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},VU=["value","disabled","name"],WU={for:"item",name:"options-Array",id:"index"},ZU={key:1,class:"py-4"},XU={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},_U=["onClick","disabled","name"],$U={for:"item",name:"options-Array",id:"index"},eN={key:2,class:"flex flex-col justify-start py-10"},tN=[Cg(()=>h("div",{class:"mb-4"}," Add Agentic AI to your Digital Skills on Genome.ai and start mastering AI today! ",-1)),Cg(()=>h("img",{class:"h-20 w-20",src:YU,alt:"qr_code"},null,-1))],iN={key:3,class:"flex flex-col justify-start items-start mt-4 bg-gray-100 rounded-lg"},nN=Cg(()=>h("div",{class:""},[Rt(" Please select interaction mode below "),h("span",{class:"italic"},"(Note: once selected the mode can't be changed during the interaction. You need to re-start to change the interaction mode)")],-1)),rN={class:"flex justify-start items-center md:gap-[40px] gap-[30px]"},oN=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=Ye(),A=f("");let r=[],a="";const c=async()=>{if(r=a.split(""),A.value="",!a.includes("END ROLE PLAY"))for(let E=0;E<r.length;E++)A.value+=r[E],E%30&&e("char-typed"),await new Promise(C=>setTimeout(C,50))},u=()=>{s.showSelectTypeConvesation=!1,s.isRestart=!0,s.showModelToggle=!1,s.isSpeechToggle=!1},l=()=>{s.isRestart=!0,s.beginFlag=!0,s.showVoiceComponent=!0,s.showSelectTypeConvesation=!1,s.showModelToggle=!0,s.isSpeechToggle=!1},g=it(()=>{const E=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>');(E.includes("Thank you for your participation!")||E.includes("Thank you for your participation"))&&(s.searchBoxdisable=!1,o.value=!0),(E.includes("BEGIN ROLE PLAY")||E.includes("BEGIN ROLE PLAY."))&&(s.showSelectTypeConvesation=!0);const C=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;if(E.includes("AI Guru")){if(E.includes("AI Guru"))return console.log("aig found"),E.replace(C,(d,S,I)=>`<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${S}</a>`)}else return E.replace(C,(d,S,I)=>`<a href="${I}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${S}</a>`);if(E.includes("Assessment Rating & Feedback")){const d=E.split("Assessment Rating & Feedback")[0],S=E.split("Assessment Rating & Feedback")[1];s.conversations.push(d),s.conversations.push(S)}});return Ri(()=>i.answer,()=>{let E=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 C=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;if(E.includes("AI Guru")?E=E.replace(C,(d,S,I)=>`<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${S}</a>`):E=E.replace(C,(d,S,I)=>`<a href="${I}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${S}</a>`),E.includes("Assessment Rating & Feedback")){const d=E.split("Assessment Rating & Feedback")[0],S=E.split("Assessment Rating & Feedback")[1];s.conversations.push(d),s.conversations.push(S)}a=E,s.showVoiceComponent&&c()},{immediate:!0}),Ri(n,E=>{s.question=(E??[]).join(", ")}),(E,C)=>(m(),Q("div",zU,[h("div",PU,[y(s).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&y(s).showVoiceComponent===!0&&y(s).conversations.length-1===i.ansId&&!i.answer.includes("BEGIN ROLE PLAY")?(m(),Q("span",{key:0,class:"fontFormattingAMA",innerHTML:A.value},null,8,bU)):(m(),Q("span",{key:1,class:"fontFormattingAMA",innerHTML:g.value},null,8,JU)),h("div",null,[t.optionsArray.length&&y(s).mcqType==="multi_choice"?(m(),Q("div",HU,[(m(!0),Q(Le,null,gt(t.optionsArray,(d,S)=>(m(),Q("div",{key:S,class:"italic"},[h("div",qU,[ke(h("input",{class:"mr-4 cursor-pointer",type:"checkbox",value:d,"onUpdate:modelValue":C[0]||(C[0]=I=>n.value=I),disabled:y(s).conversations.length-1!==i.ansId,name:g.value},null,8,VU),[[Fv,n.value]]),h("label",WU,pe(d),1)])]))),128))])):t.optionsArray.length?(m(),Q("div",ZU,[(m(!0),Q(Le,null,gt(t.optionsArray,(d,S)=>(m(),Q("div",{key:S,class:"italic"},[h("div",XU,[h("input",{class:"mr-4 cursor-pointer",type:"radio",onClick:I=>y(s).question=String(t.optionsArray[S]),disabled:y(s).conversations.length-1!==i.ansId,name:g.value},null,8,_U),h("label",$U,pe(d),1)])]))),128))])):Be("",!0)]),o.value&&y(s).simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"?(m(),Q("div",eN,tN)):Be("",!0),y(s).isSpeechToggle&&y(s).showSelectTypeConvesation&&y(s).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&y(s).conversations.length-1===i.ansId?(m(),Q("div",iN,[nN,h("div",rN,[h("button",{type:"button",id:"button",onClick:C[1]||(C[1]=d=>u()),class:"mt-4 w-32 cursor-pointer bg-[#021c42] hover:bg-blue-700 italic rounded-md px-4 py-1.5 text-center text-white text-[16px]"}," Text Mode "),h("button",{type:"button",id:"button",onClick:C[2]||(C[2]=d=>l()),class:"mt-4 w-32 cursor-pointer bg-[#021c42] hover:bg-blue-700 italic rounded-md px-4 py-1.5 text-center text-white text-[16px]"}," Voice Mode ")])])):Be("",!0)])]))}}),Lk="",sN=ze(oN,[["__scopeId","data-v-5b8d29f3"]]),AN={class:"flex justify-end items-end py-3"},aN={class:"max-w-[80%]"},cN={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},uN=Qe({__name:"learnerSimulation",props:{question:{type:String,required:!0},showFeedback:{type:Boolean,default:!0}},setup(t){return(e,i)=>(m(),Q("div",AN,[h("div",aN,[h("div",cN,pe(t.question),1)])]))}}),lN=t=>(At("data-v-347ad6de"),t=t(),at(),t),gN={class:"flex w-full flex-col items-start justify-start bg-white"},EN={class:"bot-typing-animation gap-1"},hN={class:"block w-full text-lg italic text-gray-800"},CN=lN(()=>h("span",{class:"dot-animation"},[h("span",null,"."),h("span",null,"."),h("span",null,".")],-1)),IN=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),pN=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",gN,[h("div",EN,[h("div",hN,pe(e.value),1),CN]),IN]))}}),Ok="",dN=ze(pN,[["__scopeId","data-v-347ad6de"]]),SN={class:"flex mx-auto justify-end items-end py-3"},MN={class:"max-w-[80%]"},BN={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},vN=Qe({__name:"QuestionStreaming",setup(t){const e=Ye();return(i,n)=>(m(),Q("div",SN,[h("div",MN,[h("div",BN,pe(y(e).userSpeechText),1)])]))}}),fN={key:0},wN={key:1},mN={key:0,class:"flex"},RN={key:1,name:"askQuestion"},QN=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=Ye(),o=f(),s=()=>{o.value.scrollTo(0,o.value.scrollHeight)};return Yt(()=>{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)}),ZA(()=>{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"},[re(kU),(m(!0),Q(Le,null,gt(y(n).conversations,(a,c)=>(m(),Q("div",{key:c},[a.question?(m(),Q("div",fN,[re(uN,{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"])])):Be("",!0),a.answer?(m(),Q("div",wN,[re(sN,{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",y(e)).replaceAll("<ul",y(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"])])):Be("",!0)]))),128)),y(n).dotLoader?(m(),Q("div",mN,[re(dN)])):Be("",!0),y(n).userspeaking?(m(),Q("div",RN,[re(vN)])):Be("",!0)],512))}}),Uk="",DN=ze(QN,[["__scopeId","data-v-cd418105"]]),Ig="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAYAAAARfGZ1AAABSUlEQVR4nLXWvUocURTA8d/eQosEgmQL0RRTRFCMhYKPYcDCIrUsPoCQNvMEYmEgRYp09luElPsIVmKKJIX4UUQJxMJAXC1mL4zLzjq7O/OHA/P5v+ecmbl3GsoxjVnM4S8u8bvkvYXCFr7hH+774if2sTKqeAu/BggHxR2+oPmUtIG0pLQ/TrE2TP5xTHGMayzkM43s4BMkSSJJkqeqfESn04mbJ1jHTTzQxJ+YQZqm96PSV0EKoSd/jxcjpTqcXTSDrDXvKhTDc7wNWMWriuWwEbBYgxiWguyTroP5IHu6ddANOK9JfhZkL30dfA84ks0LVdOOPT+sWHyDdtyZwZXJJq18fOgfrVWR+BjPBpVzMKH4Cq+LehUXi+4Y4h94UyTOs9m7uIz0Pz7jZRlxZArb+Irbgkz3sFwkaBSdGDBQ/tfiQrakDeUBf+jdzbi9K1QAAAAASUVORK5CYII=",yN={class:"flex items-center gap-4 py-2 rounded-full z-10"},TN={key:0,class:"flex items-center"},LN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},ON=[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)],UN={key:1,class:"flex items-center"},NN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},KN=[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)],FN={key:2,class:"flex items-center"},GN=[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)],xN={class:"tooltiptext text-genpact-darkest-teal"},jN=[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)],kN=[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)],YN=Qe({__name:"NewVoiceConversation",setup(t){const e=Ye(),i=ut(),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(),Ft.value="user",s.value="Turn off mic"):(console.log("mic enabled true"),o.value=!0,jr(),vU(),Ft.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(),Ft.value="none",o.value=!1):(console.log("closeConversation"),lg(),jr(),Ft.value="none",o.value=!1)},a=async()=>{var c,u,l,g,E,C;try{const d={question:Gr.value||vA.value};e.conversations.push(d),e.dotLoader=!0,e.question="";const S={past_messages:e.past_messages,question:Gr.value||vA.value,bandCode:"4A",userGenomeFunction:"HR",userGenomeRole:"Consultant",skillId:"7bd03cb6-79ad-4e2a-8a8b-88dc16147369"},I=await st("/sqlTest",S);if(Ft.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 st("/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(),n.value.includes("END ROLE PLAY")){const p=n.value.split("END ROLE PLAY")[0];await gg(p.replace(/[*#]/g,""))}e.showVoiceComponent=!1}else await gg(n.value.replace(/[*#]/g,""))}catch(d){if(console.error(d),De.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 Ri(Gr,async c=>{c&&(console.log("Recognized text:",c),Ft.value="listening",e.userspeaking=!1,await a(),Gr.value="")}),Ri(vA,async c=>{c&&(console.log("Recognized text:",c),Ft.value="listening",await a(),vA.value="")}),(c,u)=>(m(),Q("div",yN,[y(Ft)==="bot"?(m(),Q("div",TN,[h("span",null,[(m(),Q("svg",LN,ON))])])):y(Ft)==="user"?(m(),Q("div",UN,[h("span",null,[(m(),Q("svg",NN,KN))])])):y(Ft)==="listening"?(m(),Q("div",FN,GN)):Be("",!0),h("div",{class:Ee([o.value?"":"animate-pulse","tooltip"])},[h("span",xN,pe(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())},jN)):(m(),Q("button",{key:1,class:"rounded-full bg-white p-2 transition hover:bg-gray-300",onClick:u[1]||(u[1]=l=>A())},kN))],2),h("button",{class:"rounded-full bg-white p-2 hover:bg-gray-300",onClick:u[2]||(u[2]=l=>r())},[re(y(NC),{class:"h-[10px] w-[10px] text-gray-700"})])]))}}),dn=t=>(At("data-v-115227f8"),t=t(),at(),t),zN={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},PN={class:"py-2"},bN={class:"flex"},JN={class:"z-1 relative w-full"},HN={class:"flex justify-between my-2 w-full"},qN=dn(()=>h("div",null,null,-1)),VN={key:0,class:"flex justify-center bg-genpact-darkest-blue px-4 rounded-full"},WN={class:"relative w-full"},ZN={class:"absolute inset-y-0 left-0 flex items-center pl-3"},XN={class:"tooltip"},_N=dn(()=>h("span",{class:"tooltiptext text-genpact-darkest-teal"},"Restart",-1)),$N=[dn(()=>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)),dn(()=>h("path",{d:"M9 10H15M9 14H12M19 8V2M16 5H22",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1))],eK={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},tK={key:0},iK=["disabled"],nK=[dn(()=>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))],rK={key:1,class:"tooltip"},oK=[dn(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),dn(()=>h("img",{class:"w-7 h-7",src:Ig,alt:"watingIcon"},null,-1))],sK={class:"flex justify-start gap-2 md:gap-1"},AK=["disabled"],aK=dn(()=>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)),cK=Qe({__name:"NewQuestionSimulation",setup(t){const e=Ye(),i=ut(),n=f(""),o=f("");e.question="";const s=f(null),A=f(!1),r=f($t),a=f(!1);o.value=e.recognizedText,Yt(()=>{s.value.focus()});const c=()=>{window.location.reload()},u=g=>{const E=g.length;r.value=$t-E,A.value=E>=$t},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 D=f("");D.value=e.question||e.recognizedText,e.question="";const L={ohr_id:n.value,past_messages:e.past_messages,question:D.value||e.recognizedText,bandCode:e.band_code,userGenomeFunction:e.genomeFunctionValue,userGenomeRole:e.genomeRoleValue,skillId:e.simulationSkill||"937e84ef-e95d-4327-9afe-e7be2bf420eb"},O=await st("/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 N=await st("/sqlTest",L);e.addConversation((S=N.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,De.isAxiosError(B)){const D=B;console.log("Error found!"),console.error((p=D.response)==null?void 0:p.data),i.setError(((M=D.response)==null?void 0:M.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(g,E)=>(m(),Q("div",zN,[h("div",PN,[h("div",bN,[h("div",JN,[h("div",HN,[qN,y(e).showVoiceComponent?(m(),Q("div",VN,[re(YN)])):Be("",!0)]),h("div",WN,[h("div",ZN,[h("div",XN,[_N,(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"},$N))])]),h("div",eK,[a.value?(m(),Q("div",rK,oK)):(m(),Q("div",tK,[(m(),Q("svg",{disabled:y(e).beginFlag===!0,class:Ee([y(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=>y(e).searchBoxdisable===!1||y(e).beginFlag===!0?"":l()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},nK,10,iK))]))]),h("div",sK,[ke(h("input",{onKeyup:[E[1]||(E[1]=Fu(C=>a.value?"":l(),["enter"])),E[3]||(E[3]=C=>u(y(e).question))],disabled:y(e).beginFlag===!0||y(e).searchBoxdisable===!1,class:Ee([y(e).beginFlag===!0||y(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=>y(e).question=C),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:s},null,42,AK),[[Xe,y(e).question]])])]),aK])])])]))}}),bk="",uK=ze(cK,[["__scopeId","data-v-115227f8"]]),Hc=t=>(At("data-v-bbd70acc"),t=t(),at(),t),lK={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},gK={class:"py-2"},EK={class:"flex"},hK={class:"z-1 relative w-full"},CK={class:"relative w-full"},IK={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},pK={key:0},dK=["disabled"],SK=[Hc(()=>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))],MK={key:1,class:"tooltip"},BK=[Hc(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),Hc(()=>h("img",{class:"w-7 h-7",src:Ig,alt:"watingIcon"},null,-1))],vK={class:"flex justify-start gap-2 md:gap-1"},fK=["disabled"],wK=Hc(()=>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)),mK=Qe({__name:"NewMDMQuestionSimulation",setup(t){const e=Ye(),i=ut(),n=f("");e.question="";const o=f(null),s=f(!1),A=f($t),r=f(!1);n.value=e.recognizedText,Yt(()=>{o.value.focus()});const a=u=>{const l=u.length;A.value=$t-l,s.value=l>=$t},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;_t==="prod"?S="/ManualExportActivity":S="/fetchCompletionDemo";const I=await st(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),De.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",lK,[h("div",gK,[h("div",EK,[h("div",hK,[h("div",CK,[h("div",IK,[r.value?(m(),Q("div",MK,BK)):(m(),Q("div",pK,[(m(),Q("svg",{disabled:y(e).beginFlag===!0,class:Ee([y(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=>y(e).searchBoxdisable===!1||y(e).beginFlag===!0?"":c()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},SK,10,dK))]))]),h("div",vK,[ke(h("input",{onKeyup:[l[1]||(l[1]=Fu(g=>r.value?"":c(),["enter"])),l[3]||(l[3]=g=>a(y(e).question))],disabled:y(e).beginFlag===!0||y(e).searchBoxdisable===!1,class:Ee([y(e).beginFlag===!0||y(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=>y(e).question=g),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:o},null,42,fK),[[Xe,y(e).question]])])]),wK])])])]))}}),Vk="",RK=ze(mK,[["__scopeId","data-v-bbd70acc"]]),QK={},DK={class:"flex min-h-screen justify-center -mt-16"},yK=[h("div",{class:"flex items-center justify-center"},[h("img",{class:"loadercss",src:Li,alt:"Loader Gif"})],-1)];function TK(t,e){return m(),Q("div",DK,yK)}const zS=ze(QK,[["render",TK]]),wA=t=>(At("data-v-53597136"),t=t(),at(),t),LK={class:"max-h-screen overflow-auto md:p-6 p-3 text-[#161916]"},OK={key:0,class:"flex flex-col items-center justify-center gap-4"},UK=[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))],NK={key:1,class:"flex flex-col items-center justify-center gap-4"},KK=[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))],FK={key:1,className:"h-screen flex flex-col items-stretch"},GK={class:"z-20"},xK=wA(()=>h("div",{class:"mt-6"},null,-1)),jK={class:"flex h-full items-stretch overflow-hidden"},kK={class:"mx-auto w-11/12 bg-white"},YK={class:"relative flex h-full w-full flex-col items-stretch overflow-hidden"},zK={key:0,class:"relative"},PK={key:1,class:"relative"},bK=Qe({__name:"AssessmentSimulation",setup(t){const e=f(!0),i=f(!1),n=f(!1);f(!1),f(!1);const o=Ye(),s=ut(),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"];Yt(async()=>{e.value=!0,await M(),await D()});const M=async()=>{var L,O,R,N,Y,x,G;try{const X=await Jt(`/getLearnerData?forSimulation=true&skillForSimulation=${o.simulationSkill}`);o.initialize(X.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(X){if(console.error(X),e.value=!1,De.isAxiosError(X)&&((L=X.response)!=null&&L.status)||X&&typeof X=="object"&&"response"in X&&X.response&&typeof X.response=="object"&&"status"in X.response&&X.response.status){const P=X;if(console.log("Error found!"),console.error((O=P.response)==null?void 0:O.data),((R=P.response)==null?void 0:R.status)===424||((N=P.response)==null?void 0:N.status)===425||((Y=P.response)==null?void 0:Y.status)===400){c.value=(x=P.response)==null?void 0:x.status,console.log("errorCode value",c.value),n.value=!0;return}s.setError(((G=P.response)==null?void 0:G.data).message)}else s.setError("There was an issue, please contact helpmate")}},B=async()=>{var L,O,R,N,Y,x,G,X,P,H,K,W,z,ae,Ae,Ce,Me,Ue,xe,He,ne,U,$,q,ee,ve,v,w,T,F,k,b,ie,Z,_,J,ce,oe,ue,Ie,we,je,Ne,qe,pt,xt,et,ni;console.log("Start getAssessmentDetails");try{_t==="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 le=await Jt(l);A.value=(O=(L=le==null?void 0:le.data)==null?void 0:L.data)==null?void 0:O.name,o.skillNameForSimulation=A.value,o.generatedPrompt=(N=(R=le==null?void 0:le.data)==null?void 0:R.data)==null?void 0:N.generatedPrompt,o.assessmentType=(x=(Y=le==null?void 0:le.data)==null?void 0:Y.data)==null?void 0:x.assessmentType,a.value=(X=(G=le==null?void 0:le.data)==null?void 0:G.data)==null?void 0:X.status,d.value=(H=(P=le==null?void 0:le.data)==null?void 0:P.data)==null?void 0:H.editMode,o.empSeniority=(W=(K=le==null?void 0:le.data)==null?void 0:K.data)==null?void 0:W.empSeniority,o.functionRole=(ae=(z=le==null?void 0:le.data)==null?void 0:z.data)==null?void 0:ae.functionRole,E=(Ce=(Ae=le==null?void 0:le.data)==null?void 0:Ae.data)==null?void 0:Ce.accessBand,C=(Ue=(Me=le==null?void 0:le.data)==null?void 0:Me.data)==null?void 0:Ue.accessOhrList;const Ze=(He=(xe=le==null?void 0:le.data)==null?void 0:xe.data)==null?void 0:He.createdBy;if(o.mcqType=(U=(ne=le==null?void 0:le.data)==null?void 0:ne.data)==null?void 0:U.mcqTypes,o.storeFinalFeedback=(q=($=le==null?void 0:le.data)==null?void 0:$.data)==null?void 0:q.storeFinalFeedback,o.storeFinalScore=(ve=(ee=le==null?void 0:le.data)==null?void 0:ee.data)==null?void 0:ve.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){_t==="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 Jt(l);o.generatedPrompt=(w=(v=Pe==null?void 0:Pe.data)==null?void 0:v.data)==null?void 0:w.generatedPrompt,o.assessmentType=(F=(T=Pe==null?void 0:Pe.data)==null?void 0:T.data)==null?void 0:F.assessmentType,o.empSeniority=(b=(k=Pe==null?void 0:Pe.data)==null?void 0:k.data)==null?void 0:b.empSeniority,o.functionRole=(Z=(ie=Pe==null?void 0:Pe.data)==null?void 0:ie.data)==null?void 0:Z.functionRole,o.storeFinalFeedback=(J=(_=Pe==null?void 0:Pe.data)==null?void 0:_.data)==null?void 0:J.storeFinalFeedback,o.storeFinalScore=(oe=(ce=Pe==null?void 0:Pe.data)==null?void 0:ce.data)==null?void 0:oe.storeFinalScore,E=(Ie=(ue=Pe==null?void 0:Pe.data)==null?void 0:ue.data)==null?void 0:Ie.accessBand,C=(je=(we=Pe==null?void 0:Pe.data)==null?void 0:we.data)==null?void 0:je.accessOhrList}const Ut=o==null?void 0:o.band_code,ki=(Ne=E==null?void 0:E.split(","))==null?void 0:Ne.map(Pe=>Pe.trim());if(Ze===(o==null?void 0:o.ohr)||p.includes(o==null?void 0:o.ohr))console.log("User has access to this assessment.");else{if(ki.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(ki.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(le){if(console.error(le),e.value=!1,De.isAxiosError(le)&&((qe=le.response)!=null&&qe.status)||le&&typeof le=="object"&&"response"in le&&le.response&&typeof le.response=="object"&&"status"in le.response&&le.response.status){const Ze=le;if(console.log("Error found!"),console.error((pt=Ze.response)==null?void 0:pt.data),((xt=Ze.response)==null?void 0:xt.status)===424||((et=Ze.response)==null?void 0:et.status)===425){n.value=!0;return}s.setError(((ni=Ze.response)==null?void 0:ni.data).message)}else s.setError("There was an issue, please contact helpmate")}},D=async()=>{var L,O,R,N,Y,x,G,X;try{_t==="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 P=await De({url:g.value,headers:{authorization:`Bearer ${u}`,"content-type":"application/json"},method:"get"});o.genomeFunctionValue=(R=(O=(L=P==null?void 0:P.data)==null?void 0:L.role_function)==null?void 0:O.function)==null?void 0:R.name,o.genomeRoleValue=(x=(Y=(N=P==null?void 0:P.data)==null?void 0:N.role_function)==null?void 0:Y.role)==null?void 0:x.name}catch(P){if(console.error(P),e.value=!1,De.isAxiosError(P)){const H=P;console.log("Error found!"),console.error((G=H.response)==null?void 0:G.data),s.setError(((X=H.response)==null?void 0:X.data).message)}else s.setError("There was an issue, please contact helpmate")}};return(L,O)=>(m(),Q("section",null,[re(wr,{"is-visible":n.value},{default:hi(()=>[h("div",LK,[c.value===424||c.value==="425"?(m(),Q("div",OK,UK)):Be("",!0),c.value===400?(m(),Q("div",NK,KK)):Be("",!0)])]),_:1},8,["is-visible"]),h("div",null,[e.value?(m(),Di(zS,{key:0})):(m(),Q("main",FK,[h("div",GK,[re(Hy)]),xK,h("div",jK,[h("div",kK,[h("div",YK,[re(DN),h("div",{class:Ee(y(o).showVoiceComponent===!0?"mt-[160px]":"mt-[120px]")},null,2)]),y(o).assessmentQuestion?(m(),Q("div",zK,[re(uK)])):(m(),Q("div",PK,[re(RK)]))])])]))])]))}}),e1="",JK=Object.freeze(Object.defineProperty({__proto__:null,default:ze(bK,[["__scopeId","data-v-53597136"]])},Symbol.toStringTag,{value:"Module"})),HK={class:"flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6"},qK=["href"],VK=[h("img",{class:"h-11 w-auto cursor-pointer",src:zC,alt:"Genome Logo"},null,-1)],WK=["href"],ZK=[h("img",{class:"h-9 w-28 cursor-pointer md:w-36",src:ul,alt:"Aiguru Logo"},null,-1)],XK=Qe({__name:"headerAMA",setup(t){const e=f(""),i=f("");return _t==="prod"?e.value="https://genome.genpact.com":e.value="https://genome-dev.genpact.com",_t==="prod"?i.value="https://genome.genpact.com/#aiguru":i.value="https://genome-dev.genpact.com/#aiguru",(n,o)=>(m(),Q("nav",HK,[h("a",{class:"px-2 md:px-0 lg:px-0",href:e.value,target:"_blank"},VK,8,qK),h("a",{class:"px-2 md:px-0 lg:px-0",href:i.value,target:"_blank"},ZK,8,WK)]))}}),_K={class:"flex items-end justify-start"},$K={class:"fontFormattingAMA w-full bg-gray-100 rounded-lg"},eF={class:"w-full rounded-md px-3 py-2 text-lg font-bold text-black text-[18px] md:text-[22px]"},tF={class:"w-full px-3 py-2 text-base text-black text-[12px] md:text-[16px] font-[550]"},iF=h("br",null,null,-1),nF=Qe({__name:"greetingsAMA",setup(t){const e=Ye(),i=` Hi ${e.learnerName||"Expert"}, and welcome!`,n=it(()=>i),o=it(()=>e.welcomeMessage);return(s,A)=>(m(),Q("section",null,[h("div",_K,[h("div",$K,[h("div",eF,pe(n.value),1),h("div",tF,pe(o.value),1)])]),iF]))}}),rF={class:"fontFormattingAMA flex items-end justify-start py-2"},oF={class:"line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg"},sF=["innerHTML"],AF=Qe({__name:"responseAMA",props:{answer:{type:String,required:!0}},setup(t){const e=t,i=it(()=>{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",rF,[h("div",oF,[h("span",{class:"fontFormattingAMA",innerHTML:i.value},null,8,sF)])]))}}),r1="",aF=ze(AF,[["__scopeId","data-v-38edcca6"]]),cF={class:"flex justify-end items-end py-3"},uF={class:"max-w-[80%]"},lF={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},gF=Qe({__name:"learnerAMA",props:{question:{type:String,required:!0}},setup(t){return(e,i)=>(m(),Q("div",cF,[h("div",uF,[h("div",lF,pe(t.question),1)])]))}}),EF=t=>(At("data-v-12a02acf"),t=t(),at(),t),hF={class:"flex w-full flex-col items-start justify-start bg-white"},CF={class:"bot-typing-animation gap-1"},IF={class:"block w-full text-lg italic text-gray-800"},pF=EF(()=>h("span",{class:"dot-animation"},[h("span",null,"."),h("span",null,"."),h("span",null,".")],-1)),dF=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),SF=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",hF,[h("div",CF,[h("div",IF,pe(e.value),1),pF]),dF]))}}),o1="",MF=ze(SF,[["__scopeId","data-v-12a02acf"]]),BF={key:0},vF={key:1},fF={key:0,class:"flex"},wF=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=Ye(),o=f();return Yt(()=>{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"}))}),ZA(()=>{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"},[re(nF),(m(!0),Q(Le,null,gt(y(n).conversations,(r,a)=>(m(),Q("div",{key:a},[r.question?(m(),Q("div",BF,[re(gF,{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"])])):Be("",!0),r.answer?(m(),Q("div",vF,[re(aF,{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",y(e)).replaceAll("<ul",y(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"])])):Be("",!0)]))),128)),y(n).dotLoader?(m(),Q("div",fF,[re(MF)])):Be("",!0)],512))}}),s1="",mF=ze(wF,[["__scopeId","data-v-e6168dd4"]]),qc=t=>(At("data-v-df62b92f"),t=t(),at(),t),RF={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},QF={class:"py-2"},DF={class:"flex"},yF={class:"z-1 relative w-full"},TF={class:"relative w-full"},LF={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},OF={key:0},UF=[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))],NF={key:1,class:"tooltip"},KF=[qc(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),qc(()=>h("img",{class:"w-7 h-7",src:Ig,alt:"watingIcon"},null,-1))],FF={class:"flex justify-start"},GF={class:"flex justify-start items-start text-[#161916]"},xF=qc(()=>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)),jF=Qe({__name:"NewQuestionAMA",setup(t){const e=Ye(),i=ut();e.question="";const n=f(null),o=f(!1),s=f($t),A=f(!1);Yt(()=>{n.value.focus()});const r=g=>new URLSearchParams(window.location.search).get(g)||"",a=f(r("amaId")),c=f(r("corpusId")),u=g=>{const E=g.length;s.value=$t-E,o.value=E>=$t},l=async()=>{var g,E,C,d,S,I;try{if(e.question.trim().length<1){i.setError("Please enter answer!");return}if(e.amaQuestionsLeft<=0){i.setError("You have exhausted your question limit!");return}A.value=!0,e.dotLoader=!0;const p={question:e.question};e.conversations.push(p);const M=f("");M.value=e.question,e.question="";const B={amaId:a.value,amaCorpusId:c.value,past_messages:e.past_messages,question:M.value,prompt:e.generatedPrompt},D=await st("/amaBotResponse",B);if(((E=(g=D==null?void 0:D.data)==null?void 0:g.body)==null?void 0:E.answer)===""){console.log("in the if case calling api again");const O=await st("/amaBotResponse",B);e.addConversation((C=O.data)==null?void 0:C.body,"new")}else e.addConversation((d=D.data)==null?void 0:d.body,"new");A.value=!1,e.dotLoader=!1}catch(p){if(console.error(p),e.dotLoader=!1,A.value=!1,De.isAxiosError(p)){const M=p;console.log("Error found!"),console.error((S=M.response)==null?void 0:S.data),i.setError(((I=M.response)==null?void 0:I.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(g,E)=>(m(),Q("div",RF,[h("div",QF,[h("div",DF,[h("div",yF,[h("div",TF,[h("div",LF,[A.value?(m(),Q("div",NF,KF)):(m(),Q("div",OF,[(m(),Q("svg",{onClick:E[0]||(E[0]=C=>l()),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"},UF))]))]),h("div",FF,[ke(h("input",{onKeyup:[E[1]||(E[1]=Fu(C=>A.value?"":l(),["enter"])),E[3]||(E[3]=C=>u(y(e).question))],"onUpdate:modelValue":E[2]||(E[2]=C=>y(e).question=C),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),[[Xe,y(e).question]])])]),h("div",GF,pe(y(e).amaQuestionsLeft)+" questions remaining for the day ",1),xF])])])]))}}),u1="",kF=ze(jF,[["__scopeId","data-v-df62b92f"]]),pg=t=>(At("data-v-137589f5"),t=t(),at(),t),YF=pg(()=>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)),zF={key:1,className:"h-screen flex flex-col items-stretch"},PF={class:"z-20"},bF=pg(()=>h("div",{class:"mt-6"},null,-1)),JF={class:"flex h-full items-stretch overflow-hidden"},HF={class:"mx-auto w-11/12 bg-white"},qF={class:"relative flex h-full w-full flex-col items-stretch overflow-hidden"},VF=pg(()=>h("div",{class:"mt-[160px]"},null,-1)),WF={class:"relative"},ZF=Qe({__name:"AssessmentAMA",setup(t){const e=f(!0),i=f(!1),n=Ye(),o=ut(),s=f(""),A=localStorage.getItem("accessToken");let r="",a="",c="";const l=f((S=>new URLSearchParams(window.location.search).get(S)||"")("amaId"));n.amaSkillId=l.value??"";const g=["703331197","703380812","703331909","703363051","703319578"];Yt(async()=>{e.value=!0,await E(),await d(),e.value=!1});const E=async()=>{var S,I,p,M,B;try{if(l.value===null)throw{response:{status:424,data:{message:"Invalid URL"}}};console.log("before calling get learner");const D=await Jt(`/getLearnerData?forSimulation=true&skillForSimulation=${l.value}`);n.initialize(D.data),await C()}catch(D){if(console.error(D),e.value=!1,De.isAxiosError(D)&&((S=D.response)!=null&&S.status)||D&&typeof D=="object"&&"response"in D&&D.response&&typeof D.response=="object"&&"status"in D.response&&D.response.status){const L=D;if(console.log("Error found!"),console.error((I=L.response)==null?void 0:I.data),((p=L.response)==null?void 0:p.status)===424||((M=L.response)==null?void 0:M.status)===425){i.value=!0;return}o.setError(((B=L.response)==null?void 0:B.data).message)}else o.setError("There was an issue, please contact helpmate")}},C=async()=>{var S,I,p,M,B,D,L,O,R,N,Y,x,G,X,P,H,K,W,z,ae,Ae,Ce,Me,Ue,xe,He;console.log("Start getAssessmentDetails");try{_t==="prod"?r=`https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=${l.value}`:r=`https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=${l.value}`;const ne=await Jt(r);console.log("response from GetAMA",ne),s.value=(I=(S=ne==null?void 0:ne.data)==null?void 0:S.data)==null?void 0:I.name,n.welcomeMessage=(M=(p=ne==null?void 0:ne.data)==null?void 0:p.data)==null?void 0:M.displayMsg,console.log("response from GetAMA skill Name",s.value),n.skillNameForSimulation=s.value,n.generatedPrompt=(D=(B=ne==null?void 0:ne.data)==null?void 0:B.data)==null?void 0:D.generatedPrompt,a=(O=(L=ne==null?void 0:ne.data)==null?void 0:L.data)==null?void 0:O.accessBand,c=(N=(R=ne==null?void 0:ne.data)==null?void 0:R.data)==null?void 0:N.accessOhrList;const U=(x=(Y=ne==null?void 0:ne.data)==null?void 0:Y.data)==null?void 0:x.createdBy;n.mcqType=(X=(G=ne==null?void 0:ne.data)==null?void 0:G.data)==null?void 0:X.mcqTypes,n.storeFinalFeedback=(H=(P=ne==null?void 0:ne.data)==null?void 0:P.data)==null?void 0:H.storeFinalFeedback,n.storeFinalScore=(W=(K=ne==null?void 0:ne.data)==null?void 0:K.data)==null?void 0:W.storeFinalScore,n.amaQuestionsLeft=(ae=(z=ne==null?void 0:ne.data)==null?void 0:z.data)==null?void 0:ae.amaQuestionsLeft,console.log("store mcqType====>",n.mcqType);const $=n==null?void 0:n.band_code;console.log("accessBand , accessOhrList====>",a,c);const q=(Ae=a==null?void 0:a.split(","))==null?void 0:Ae.map(ee=>ee.trim());if(console.log("bands ,====>",q),U===(n==null?void 0:n.ohr)||g.includes(n==null?void 0:n.ohr))console.log("User has access to this assessment.");else{if(q.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(q.includes($)||c.includes(n==null?void 0:n.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(ne){if(console.error(ne),e.value=!1,De.isAxiosError(ne)&&((Ce=ne.response)!=null&&Ce.status)||ne&&typeof ne=="object"&&"response"in ne&&ne.response&&typeof ne.response=="object"&&"status"in ne.response&&ne.response.status){const U=ne;if(console.log("Error found!"),console.error((Me=U.response)==null?void 0:Me.data),((Ue=U.response)==null?void 0:Ue.status)===424||((xe=U.response)==null?void 0:xe.status)===425){i.value=!0;return}o.setError(((He=U.response)==null?void 0:He.data).message)}else o.setError("There was an issue, please contact helpmate")}},d=async()=>{var S,I,p,M,B,D,L,O;try{const R=await De({url:"https://api-v2-dev.genpact.com/api/delphi/v2/myprofile",headers:{authorization:`Bearer ${A}`,"content-type":"application/json"},method:"get"});n.genomeFunctionValue=(p=(I=(S=R==null?void 0:R.data)==null?void 0:S.role_function)==null?void 0:I.function)==null?void 0:p.name,n.genomeRoleValue=(D=(B=(M=R==null?void 0:R.data)==null?void 0:M.role_function)==null?void 0:B.role)==null?void 0:D.name,console.log("profile data",n.genomeFunctionValue,n.genomeRoleValue)}catch(R){if(console.error(R),e.value=!1,De.isAxiosError(R)){const N=R;console.log("Error found!"),console.error((L=N.response)==null?void 0:L.data),o.setError(((O=N.response)==null?void 0:O.data).message)}else o.setError("There was an issue, please contact helpmate")}};return(S,I)=>(m(),Q("section",null,[re(wr,{"is-visible":i.value},{default:hi(()=>[YF]),_:1},8,["is-visible"]),h("div",null,[e.value?(m(),Di(zS,{key:0})):(m(),Q("main",zF,[h("div",PF,[re(XK)]),bF,h("div",JF,[h("div",HF,[h("div",qF,[re(mF),VF]),h("div",WF,[re(kF)])])])]))])]))}}),l1="",XF=Object.freeze(Object.defineProperty({__proto__:null,default:ze(ZF,[["__scopeId","data-v-137589f5"]])},Symbol.toStringTag,{value:"Module"})),_F={},$F={className:"flex justify-between items-center gap-4 h-14"},eG=[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 tG(t,e){return m(),Q("div",$F,eG)}const iG=ze(_F,[["render",tG]]),nG={class:"bg-genpact-blue-box w-full px-5 mb-4"},rG={key:0},oG={class:"flex justify-between items-start text-lg px-6"},sG=h("div",null,null,-1),AG={class:"flex justify-start items-center text-white bg-genpact-darkest-blue rounded-lg py-2 px-4 cursor-pointer"},aG={class:"flex justify-start items-start w-full px-6 py-3"},cG=h("div",{class:"md:w-1/2"},null,-1),uG={class:"relative flex justify-start items-end border border-gray-300 md:rounded-full rounded-lg md:w-1/2 w-full"},lG={class:"absolute inset-y-0 left-5 flex items-center"},gG={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"},EG={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"},hG={class:"flex justify-start items-center"},CG=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),IG={class:"flex-grow md:flex-grow-0"},pG={class:"px-6"},dG=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Current Topic List ",-1),SG={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},MG={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},BG=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),vG={class:"px-3 py-4 font-medium text-gray-900"},fG={class:"px-3 py-4"},wG={class:"px-3 py-4 text-center"},mG={class:"px-1.5 py-4 text-center"},RG=["onClick"],QG={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"},DG=[h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1)],PS=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=Ye(),a=ut(),c=ca(),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,D;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 Jt(`/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),De.isAxiosError(L)){const O=L;a.setError(((D=O.response)==null?void 0:D.data).message)}else a.setError("There was an issue with route")}},E=async()=>{var I,p,M,B,D,L;try{const O=await Jt("/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",(D=O==null?void 0:O.data)==null?void 0:D.body)}catch(O){if(console.error(O),De.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 Yt(async()=>{await E(),s.value=!0,A.value=Array(e.value.length).fill(!0),console.log("array",A.value)}),(I,p)=>(m(),Q(Le,null,[h("nav",nG,[re(iG)]),s.value?(m(),Q("div",rG,[h("div",oG,[sG,h("div",AG,[re(y(Xm),{class:"w-7 h-7 mr-1"}),h("button",{onClick:l,class:"font-bold"},"Add New Topic")])]),h("div",aG,[cG,h("div",uG,[h("div",lG,[re(y(Wm),{class:"w-5 h-5 mr-5 hidden md:flex"})]),h("div",gG,[h("div",EG,[h("div",hG,[ke(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),[[Xe,n.value]])]),CG,h("div",IG,[ke(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),[[Xe,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",pG,[dG,h("div",SG,[h("table",MG,[BG,h("tbody",null,[(m(!0),Q(Le,null,gt(e.value,(M,B)=>(m(),Q("tr",{key:B,class:"odd:bg-white even:bg-gray-100"},[h("th",vG,pe(M.Topic||"title"),1),h("td",fG,pe(M.Description||"desc"),1),h("td",wG,pe(M.OfferingType||"Knowledge Corpus"),1),h("td",mG,[A.value[B]?(m(),Q("button",{key:0,id:"index",onClick:D=>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,RG)):(m(),Q("div",QG,DG))])]))),128))])])])])])):(m(),Di(ll,{key:1}))],64))}})},Symbol.toStringTag,{value:"Module"})),yG={className:"flex justify-between items-center gap-4 h-14"},TG=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),LG=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Data",-1),OG=h("img",{class:"md:w-36 w-20",src:Bo},null,-1),UG=Qe({__name:"HeaderForEditSkillData",setup(t){const e=ca(),i=()=>{eo(()=>{sessionStorage.removeItem("dataViewAccess")}),e.push({name:"SkillData"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")};return(n,o)=>(m(),Q("div",yG,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[re(y(UC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),TG]),LG,OG]))}}),ji=t=>(At("data-v-18de1cf9"),t=t(),at(),t),NG={class:"bg-genpact-blue-box w-full px-5 mb-6"},KG={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},FG=ji(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Topic Name "),h("span",{class:"label"},"*")])],-1)),GG={class:"col-span-4"},xG=["disabled"],jG=ji(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Description "),h("span",{class:"label"},"*")])],-1)),kG={class:"col-span-4"},YG=ji(()=>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"},[Rt("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),zG={class:"col-span-4"},PG=ji(()=>h("div",{class:"col-span-1"},null,-1)),bG={class:"col-span-4"},JG={class:"md:flex block justify-between items-center space-y-2"},HG=["disabled"],qG={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-4 py-2"},VG=[ji(()=>h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],WG=["disabled"],ZG={key:3,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-10 py-2"},XG=[ji(()=>h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],_G=ji(()=>h("div",{class:"col-span-1"},null,-1)),$G={key:0,class:"col-span-4"},ex=[ji(()=>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))],tx={key:0,class:"pl-16 pr-8 py-2"},ix={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},nx={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},rx=ji(()=>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)),ox={key:0,class:"px-3 py-4 font-medium text-gray-900 text-center"},sx={key:1,class:"px-3 py-4"},Ax={key:2,class:"px-3 py-4 text-center"},ax={key:3,class:"px-3 py-4 text-center"},cx={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},ux={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},lx=Qe({__name:"EditSkillData",setup(t){const e=Ye(),i=ut(),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,D,L;try{const O={question:e.descriptionForSkillData};console.log("question",r.value),n.value=!1;const R=await st("/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",(D=(B=R==null?void 0:R.data)==null?void 0:B.body)==null?void 0:D.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,De.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 st("/InsertIntoTempSkillFile",I);console.log("data",p),A.value="Data Submitted Successfully!",o.value=!0,d()}catch(I){if(console.error(I),o.value=!0,De.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(Le,null,[h("nav",NG,[re(UG)]),h("div",KG,[FG,h("div",GG,[ke(h("input",{disabled:y(e).enableInputbox!==!0,class:Ee([y(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=>y(e).topicNameForSkillData=p),id:"topic",placeholder:"Write here...",required:""},null,10,xG),[[Xe,y(e).topicNameForSkillData]])]),jG,h("div",kG,[ke(h("textarea",{"onUpdate:modelValue":I[1]||(I[1]=p=>y(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),[[Xe,y(e).descriptionForSkillData]])]),YG,h("div",zG,[ke(h("input",{"onUpdate:modelValue":I[3]||(I[3]=p=>y(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),[[Xe,y(e).offeringTypeForSkillData]])]),PG,h("div",bG,[h("div",JG,[n.value?(m(),Q("button",{key:0,disabled:y(e).isTopicPending===!0,class:Ee([y(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,HG)):(m(),Q("div",qG,VG)),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,WG)):(m(),Q("div",ZG,XG))])]),_G,y(e).isTopicPending?(m(),Q("div",$G,ex)):Be("",!0)]),a.value?(m(),Q("div",tx,[h("div",ix,[h("table",nx,[rx,h("tbody",null,[(m(!0),Q(Le,null,gt(g.value,(p,M)=>(m(),Q("tr",{key:M,class:"odd:bg-white even:bg-gray-100"},[p.Topic!==y(e).topicNameForSkillData?(m(),Q("th",ox,pe(p.Topic||"title"),1)):Be("",!0),p.Topic!==y(e).topicNameForSkillData?(m(),Q("td",sx,pe(p.Description||"desc"),1)):Be("",!0),p.Topic!==y(e).topicNameForSkillData?(m(),Q("td",Ax,pe(p.OfferingType||"Knowledge Corpus"),1)):Be("",!0),p.Topic!==y(e).topicNameForSkillData?(m(),Q("td",ax,pe(p.new_tag),1)):Be("",!0)]))),128))])])])])):Be("",!0),ke(h("div",cx,[h("div",ux,pe(A.value),1)],512),[[hr,s.value]])],64))}}),M1="",gx=Object.freeze(Object.defineProperty({__proto__:null,default:ze(lx,[["__scopeId","data-v-18de1cf9"]])},Symbol.toStringTag,{value:"Module"})),Ex={},hx={className:"flex justify-between items-center gap-4 h-14"},Cx=[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 Ix(t,e){return m(),Q("div",hx,Cx)}const px=ze(Ex,[["render",Ix]]),dx={class:"bg-genpact-blue-box w-full px-5 mb-4"},Sx={key:0},Mx={class:"w-full px-6 py-1"},Bx=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Topic Update Request ",-1),vx={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},fx={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},wx=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),mx={class:"px-3 py-4 font-medium text-gray-900 text-center"},Rx={class:"px-3 py-4"},Qx={class:"px-3 py-4 text-center"},Dx={class:"px-2 py-4 text-center"},yx={class:"px-2 py-4 text-gray-500 hover:text-genpact-darkest-blue"},Tx=Object.freeze(Object.defineProperty({__proto__:null,default:Qe({__name:"SkillAutomation",setup(t){const e=f([]),i=f(),n=f(!1),o=Ye(),s=ut(),A=ca(),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 Jt("/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),De.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 Yt(async()=>{await a(),n.value=!0}),(c,u)=>(m(),Q(Le,null,[h("nav",dx,[re(px)]),n.value?(m(),Q("div",Sx,[h("div",Mx,[Bx,h("div",vx,[h("table",fx,[wx,h("tbody",null,[(m(!0),Q(Le,null,gt(e.value,(l,g)=>(m(),Q("tr",{key:g,class:"odd:bg-white even:bg-gray-100"},[h("th",mx,pe(l.Topic||"title"),1),h("td",Rx,pe(l.Description||"desc"),1),h("td",Qx,pe(l.OfferingType||"Knowledge Corpus"),1),h("td",Dx,pe(l.DuplicateExists),1),h("td",yx,[re(y(qm),{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"})),Lx={className:"flex justify-between items-center gap-4 h-14"},Ox=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),Ux=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Admin Data",-1),Nx=h("img",{class:"md:w-36 w-20",src:Bo},null,-1),Kx=Qe({__name:"HeaderForEditSKillAdminDatas",setup(t){const e=ca(),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",Lx,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[re(y(UC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),Ox]),Ux,Nx]))}}),gi=t=>(At("data-v-ecf2c818"),t=t(),at(),t),Fx={class:"bg-genpact-blue-box w-full px-5 mb-6"},Gx={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},xx=gi(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Topic Name "),h("span",{class:"label"},"*")])],-1)),jx={class:"col-span-4"},kx=["disabled"],Yx=gi(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Description "),h("span",{class:"label"},"*")])],-1)),zx={class:"col-span-4"},Px=gi(()=>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"},[Rt("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),bx={class:"col-span-4"},Jx=gi(()=>h("div",{class:"col-span-1"},null,-1)),Hx={class:"col-span-4"},qx={class:"grid md:grid-cols-5 grid-cols-1 justify-start items-center gap-2"},Vx={class:"col-span-1"},Wx=["disabled"],Zx={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40"},Xx=[gi(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],_x=gi(()=>h("div",{class:"col-span-1"},null,-1)),$x=gi(()=>h("div",{class:"col-span-1"},null,-1)),ej={class:"col-span-1 flex md:justify-end justify-start items-end"},tj={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},ij=[gi(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],nj={class:"col-span-1 flex md:justify-end justify-start items-end"},rj=["disabled"],oj={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},sj=[gi(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],Aj={class:"pl-16 pr-8 py-2"},aj={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},cj={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},uj=gi(()=>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)),lj={class:"px-3 py-4 font-medium text-gray-900 text-center"},gj={class:"px-3 py-4"},Ej={class:"px-3 py-4 text-center"},hj=gi(()=>h("td",{class:"px-3 py-4 text-center"},pe("1.05"),-1)),Cj={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},Ij={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},pj=Qe({__name:"EditSkillAdminData",setup(t){const e=Ye(),i=ut(),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,D,L,O;try{const R={question:e.descriptionForSkillData};console.log("question",r.value),n.value=!1;const N=await st("/SearchSkillTags",R);l.value=(M=(p=N==null?void 0:N.data)==null?void 0:p.body)==null?void 0:M.length,console.log("ARRAY LENGTH",l.value),u.value=((B=N==null?void 0:N.data)==null?void 0:B.body)||[],E.value=u.value,console.log("length",(L=(D=N==null?void 0:N.data)==null?void 0:D.body)==null?void 0:L.length),console.log("data",N),n.value=!0,a.value=!0,c.value=!0,console.log("showSubmitButton",c.value)}catch(R){if(console.error(R),n.value=!0,De.isAxiosError(R)){const N=R;i.setError(((O=N.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 Jt(`/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,De.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 st("/editMasterSkillFile",M);console.log("data",B),s.value=!0,g.value="Data Submitted Successfully!",I()}catch(M){if(console.error(M),s.value=!0,De.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(Le,null,[h("nav",Fx,[re(Kx)]),h("div",Gx,[xx,h("div",jx,[ke(h("input",{disabled:y(e).enableInputbox!==!0,class:Ee([y(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=>y(e).topicNameForSkillData=B),id:"topic",placeholder:"Write here...",required:""},null,10,kx),[[Xe,y(e).topicNameForSkillData]])]),Yx,h("div",zx,[ke(h("textarea",{"onUpdate:modelValue":M[1]||(M[1]=B=>y(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),[[Xe,y(e).descriptionForSkillData]])]),Px,h("div",bx,[ke(h("input",{"onUpdate:modelValue":M[3]||(M[3]=B=>y(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),[[Xe,y(e).offeringTypeForSkillData]])]),Jx,h("div",Hx,[h("div",qx,[h("div",Vx,[n.value?(m(),Q("button",{key:0,disabled:y(e).isTopicPending===!0,class:Ee([y(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,Wx)):(m(),Q("div",Zx,Xx))]),_x,$x,h("div",ej,[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",tj,ij))]),h("div",nj,[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,rj)):(m(),Q("div",oj,sj))])])])]),ke(h("div",Aj,[h("div",aj,[h("table",cj,[uj,h("tbody",null,[(m(!0),Q(Le,null,gt(E.value,(B,D)=>(m(),Q("tr",{key:D,class:"odd:bg-white even:bg-gray-100"},[h("th",lj,pe(B.Topic||"title"),1),h("td",gj,pe(B.Description||"desc"),1),h("td",Ej,pe(B.OfferingType||"Knowledge Corpus"),1),hj]))),128))])])])],512),[[hr,a.value]]),ke(h("div",Cj,[h("div",Ij,pe(g.value),1)],512),[[hr,A.value]])],64))}}),D1="",dj=Object.freeze(Object.defineProperty({__proto__:null,default:ze(pj,[["__scopeId","data-v-ecf2c818"]])},Symbol.toStringTag,{value:"Module"})),Sj="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgEAAAIBCAYAAADQ5mxhAAAACXBIWXMAAAsSAAALEgHS3X78AAAfXUlEQVR4nO3dsY7kRp7gYeZhjfI0uhfYg/YBpoDSA8ho+duGxh0NCpDc9VrmmZJ160pAYSR3ZdSdrTbmBRLIeYAR9g2065WXB7aCUnV1VVcwM0hGxP/7gELNYHeqM5kZ5I9kkNwdj8cBAIjnf/jMASAmEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAAAISgQAQFAiAACCEgEAEJQIAICgRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAAAISgQAQFAiAACCEgEAEJQIAICgRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEH9kw+eiC6uri+HYfi/wzD8693+5uBLEM/u9vD9+KaPLy8/j74siMuRAMJJAfC3YRj+efyd/juBpAD48/gzxQBEJAII5V4AfJDe9wdCIJZ7ATARAoQlAgjjkQCYCIEgHgmAiRAgJBFACO8JgIkQ6Nx7AmAiBAhHBNC9jACYCIFOZQTARAgQigigazMCYCIEOjMjACZCgDBEAN06IQAmQqATJwTARAgQggigS2cEwEQINO6MAJgIAbonAuhOgQCYCIFGFQiAiRCgayKArhQMgIkQaEzBAJgIAbolAujGAgEwEQKNWCAAJkKALokAurBgAEyEQOUWDICJEKA7IoDmrRA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={},Bj={class:"w-screen h-screen flex justify-center"},vj=[h("div",{class:"flex flex-col justify-center items-center gap-6"},[h("img",{class:"h-24",src:Sj}),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 fj(t,e){return m(),Q("div",Bj,vj)}const bS=Object.freeze(Object.defineProperty({__proto__:null,default:ze(Mj,[["render",fj]])},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=Ye(),i=ut(),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=it(()=>["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=it(()=>["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill)?l:["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill)?jU:g),C=async()=>{var d,S,I,p,M,B;console.log("firstQuestion fired==>"),s.value=!1;try{const D={question:"Hello, let's start"};if(e.conversations.push(D),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,Ft.value="listening";const R=await st("/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,Ft.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;_t==="prod"?O="/ManualExportActivity":O="/fetchCompletionDemo";const R=await st(O,L);e.addConversation((p=R.data)==null?void 0:p.body,"assessment"),e.dotLoader=!1}}catch(D){if(console.error(D),De.isAxiosError(D)){const L=D;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,[re(wr,{"is-visible":n.value},{default:hi(()=>[h("div",TU,[LU,OU,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",UU,[h("div",NU,[h("div",KU,pe(u.value),1),h("div",FU,pe(E.value),1)])]),y(e).beginFlag?(m(),Q("span",GU,[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"}," Let's begin ")])):Be("",!0),xU]))}}),YU="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAB9AH0DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD36medEDgypn/eFLL/AKl8f3TXzJofh/xD458Z6/a23iGWzSzkLEsxIwTjtQB9NefD/wA9U/76FHnw/wDPVP8AvoV4R/wqLX84/wCFgRZHX94f8ap6x8LfEul6FeapH41+0pbRlyq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HssZHXylxjCntWxba9o3h74M6Pca5YpfQEKohYZIPrivMPiPoWsW2jWWtzaiZNLu232lrniFTyBj2oA+i/CHhnSNA0m3k02zWB7iFGkI/iO0V0leH/ALP+sapqaalHf3U80cQURiQkhRjtXuFACOu+Nl9QRXiF78CL+bWby/tfEUtsbiQuRHlTg9uK9wooA8L/AOFE63/0N95/38b/ABpsnwG1iWNo5PFl06MOVZ2IP617tRQByHgPwSnhDwqdFuJVvEaRnbevBz7V0VtpGm2coltrC2hkAwGSIA1dooAgurS2vYvKureOaPOdsihhn8ac8I+ytBGBGpQqu0Y28VLRQB5/4T+H174ft9ahutYmvBqAYLvJOzOa8/H7Oc6zGVNeKNuyCq4Ir6AooA8f8PfBzUdK162vr3xFcXtvEcvBKxZX9iDXp/8AYOkZ/wCQXZ/9+V/wrRooA8X8T/BC61/WLm5TW3htJH3JbY+RPoOldD4r+GL+I/Cuj6Mt95f9nhQXI+/ivR6KAKGlaVa6VZQ29tbxRlI1RmRAu4gYyav0UUAf/9k=",Cg=t=>(At("data-v-6e311be2"),t=t(),at(),t),zU={class:"fontFormattingAMA flex items-end justify-start py-2"},PU={class:"line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg"},bU=["innerHTML"],JU=["innerHTML"],HU={key:0,class:"py-4"},qU={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},VU=["value","disabled","name"],WU={for:"item",name:"options-Array",id:"index"},ZU={key:1,class:"py-4"},XU={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},_U=["onClick","disabled","name"],$U={for:"item",name:"options-Array",id:"index"},eN={key:2,class:"flex flex-col justify-start py-10"},tN=[Cg(()=>h("div",{class:"mb-4"}," Add Agentic AI to your Digital Skills on Genome.ai and start mastering AI today! ",-1)),Cg(()=>h("img",{class:"h-20 w-20",src:YU,alt:"qr_code"},null,-1))],iN={key:3,class:"flex flex-col justify-start items-start mt-4 bg-gray-100 rounded-lg"},nN=Cg(()=>h("div",{class:""},[Rt(" Please select interaction mode below "),h("span",{class:"italic"},"(Note: once selected the mode can't be changed during the interaction. You need to re-start to change the interaction mode)")],-1)),rN={class:"flex justify-start items-center md:gap-[40px] gap-[30px]"},oN=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=Ye(),A=f("");let r=[],a="";const c=async()=>{r=a.split(""),A.value="";for(let E=0;E<r.length;E++)A.value+=r[E],E%30&&e("char-typed"),await new Promise(C=>setTimeout(C,50))},u=()=>{s.showSelectTypeConvesation=!1,s.isRestart=!0,s.showModelToggle=!1,s.isSpeechToggle=!1},l=()=>{s.isRestart=!0,s.beginFlag=!0,s.showVoiceComponent=!0,s.showSelectTypeConvesation=!1,s.showModelToggle=!0,s.isSpeechToggle=!1},g=it(()=>{const E=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>');(E.includes("Thank you for your participation!")||E.includes("Thank you for your participation"))&&(s.searchBoxdisable=!1,o.value=!0),(E.includes("BEGIN ROLE PLAY")||E.includes("BEGIN ROLE PLAY."))&&(s.showSelectTypeConvesation=!0);const C=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;if(E.includes("AI Guru")){if(E.includes("AI Guru"))return console.log("aig found"),E.replace(C,(d,S,I)=>`<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${S}</a>`)}else return E.replace(C,(d,S,I)=>`<a href="${I}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${S}</a>`)});return Ri(()=>i.answer,()=>{let E=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 C=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;E.includes("AI Guru")?E=E.replace(C,(d,S,I)=>`<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${S}</a>`):E=E.replace(C,(d,S,I)=>`<a href="${I}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${S}</a>`),E.includes("Feedback and Assessment")?E.includes("END ROLE PLAY")&&(a=E.split("END ROLE PLAY")[0]):a=E,s.showVoiceComponent&&c()},{immediate:!0}),Ri(n,E=>{s.question=(E??[]).join(", ")}),(E,C)=>(m(),Q("div",zU,[h("div",PU,[y(s).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&y(s).showVoiceComponent===!0&&y(s).conversations.length-1===i.ansId&&!i.answer.includes("BEGIN ROLE PLAY")?(m(),Q("span",{key:0,class:"fontFormattingAMA",innerHTML:A.value},null,8,bU)):(m(),Q("span",{key:1,class:"fontFormattingAMA",innerHTML:g.value},null,8,JU)),h("div",null,[t.optionsArray.length&&y(s).mcqType==="multi_choice"?(m(),Q("div",HU,[(m(!0),Q(Le,null,gt(t.optionsArray,(d,S)=>(m(),Q("div",{key:S,class:"italic"},[h("div",qU,[ke(h("input",{class:"mr-4 cursor-pointer",type:"checkbox",value:d,"onUpdate:modelValue":C[0]||(C[0]=I=>n.value=I),disabled:y(s).conversations.length-1!==i.ansId,name:g.value},null,8,VU),[[Fv,n.value]]),h("label",WU,pe(d),1)])]))),128))])):t.optionsArray.length?(m(),Q("div",ZU,[(m(!0),Q(Le,null,gt(t.optionsArray,(d,S)=>(m(),Q("div",{key:S,class:"italic"},[h("div",XU,[h("input",{class:"mr-4 cursor-pointer",type:"radio",onClick:I=>y(s).question=String(t.optionsArray[S]),disabled:y(s).conversations.length-1!==i.ansId,name:g.value},null,8,_U),h("label",$U,pe(d),1)])]))),128))])):Be("",!0)]),o.value&&y(s).simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"?(m(),Q("div",eN,tN)):Be("",!0),y(s).isSpeechToggle&&y(s).showSelectTypeConvesation&&y(s).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&y(s).conversations.length-1===i.ansId?(m(),Q("div",iN,[nN,h("div",rN,[h("button",{type:"button",id:"button",onClick:C[1]||(C[1]=d=>u()),class:"mt-4 w-32 cursor-pointer bg-[#021c42] hover:bg-blue-700 italic rounded-md px-4 py-1.5 text-center text-white text-[16px]"}," Text Mode "),h("button",{type:"button",id:"button",onClick:C[2]||(C[2]=d=>l()),class:"mt-4 w-32 cursor-pointer bg-[#021c42] hover:bg-blue-700 italic rounded-md px-4 py-1.5 text-center text-white text-[16px]"}," Voice Mode ")])])):Be("",!0)])]))}}),Lk="",sN=ze(oN,[["__scopeId","data-v-6e311be2"]]),AN={class:"flex justify-end items-end py-3"},aN={class:"max-w-[80%]"},cN={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},uN=Qe({__name:"learnerSimulation",props:{question:{type:String,required:!0},showFeedback:{type:Boolean,default:!0}},setup(t){return(e,i)=>(m(),Q("div",AN,[h("div",aN,[h("div",cN,pe(t.question),1)])]))}}),lN=t=>(At("data-v-347ad6de"),t=t(),at(),t),gN={class:"flex w-full flex-col items-start justify-start bg-white"},EN={class:"bot-typing-animation gap-1"},hN={class:"block w-full text-lg italic text-gray-800"},CN=lN(()=>h("span",{class:"dot-animation"},[h("span",null,"."),h("span",null,"."),h("span",null,".")],-1)),IN=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),pN=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",gN,[h("div",EN,[h("div",hN,pe(e.value),1),CN]),IN]))}}),Ok="",dN=ze(pN,[["__scopeId","data-v-347ad6de"]]),SN={class:"flex mx-auto justify-end items-end py-3"},MN={class:"max-w-[80%]"},BN={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},vN=Qe({__name:"QuestionStreaming",setup(t){const e=Ye();return(i,n)=>(m(),Q("div",SN,[h("div",MN,[h("div",BN,pe(y(e).userSpeechText),1)])]))}}),fN={key:0},wN={key:1},mN={key:0,class:"flex"},RN={key:1,name:"askQuestion"},QN=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=Ye(),o=f(),s=()=>{o.value.scrollTo(0,o.value.scrollHeight)};return Yt(()=>{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)}),ZA(()=>{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"},[re(kU),(m(!0),Q(Le,null,gt(y(n).conversations,(a,c)=>(m(),Q("div",{key:c},[a.question?(m(),Q("div",fN,[re(uN,{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"])])):Be("",!0),a.answer?(m(),Q("div",wN,[re(sN,{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",y(e)).replaceAll("<ul",y(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"])])):Be("",!0)]))),128)),y(n).dotLoader?(m(),Q("div",mN,[re(dN)])):Be("",!0),y(n).userspeaking?(m(),Q("div",RN,[re(vN)])):Be("",!0)],512))}}),Uk="",DN=ze(QN,[["__scopeId","data-v-cd418105"]]),Ig="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAYAAAARfGZ1AAABSUlEQVR4nLXWvUocURTA8d/eQosEgmQL0RRTRFCMhYKPYcDCIrUsPoCQNvMEYmEgRYp09luElPsIVmKKJIX4UUQJxMJAXC1mL4zLzjq7O/OHA/P5v+ecmbl3GsoxjVnM4S8u8bvkvYXCFr7hH+774if2sTKqeAu/BggHxR2+oPmUtIG0pLQ/TrE2TP5xTHGMayzkM43s4BMkSSJJkqeqfESn04mbJ1jHTTzQxJ+YQZqm96PSV0EKoSd/jxcjpTqcXTSDrDXvKhTDc7wNWMWriuWwEbBYgxiWguyTroP5IHu6ddANOK9JfhZkL30dfA84ks0LVdOOPT+sWHyDdtyZwZXJJq18fOgfrVWR+BjPBpVzMKH4Cq+LehUXi+4Y4h94UyTOs9m7uIz0Pz7jZRlxZArb+Irbgkz3sFwkaBSdGDBQ/tfiQrakDeUBf+jdzbi9K1QAAAAASUVORK5CYII=",yN={class:"flex items-center gap-4 py-2 rounded-full z-10"},TN={key:0,class:"flex items-center"},LN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},ON=[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)],UN={key:1,class:"flex items-center"},NN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},KN=[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)],FN={key:2,class:"flex items-center"},GN=[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)],xN={class:"tooltiptext text-genpact-darkest-teal"},jN=[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)],kN=[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)],YN=Qe({__name:"NewVoiceConversation",setup(t){const e=Ye(),i=ut(),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(),Ft.value="user",s.value="Turn off mic"):(console.log("mic enabled true"),o.value=!0,jr(),vU(),Ft.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(),Ft.value="none",o.value=!1):(console.log("closeConversation"),lg(),jr(),Ft.value="none",o.value=!1)},a=async()=>{var c,u,l,g,E,C;try{const d={question:Gr.value||vA.value};e.conversations.push(d),e.dotLoader=!0,e.question="";const S={past_messages:e.past_messages,question:Gr.value||vA.value,bandCode:"4A",userGenomeFunction:"HR",userGenomeRole:"Consultant",skillId:"7bd03cb6-79ad-4e2a-8a8b-88dc16147369"},I=await st("/sqlTest",S);if(Ft.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 st("/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(),n.value.includes("END ROLE PLAY")){const p=n.value.split("END ROLE PLAY")[0];await gg(p.replace(/[*#]/g,""))}e.showVoiceComponent=!1}else await gg(n.value.replace(/[*#]/g,""))}catch(d){if(console.error(d),De.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 Ri(Gr,async c=>{c&&(console.log("Recognized text:",c),Ft.value="listening",e.userspeaking=!1,await a(),Gr.value="")}),Ri(vA,async c=>{c&&(console.log("Recognized text:",c),Ft.value="listening",await a(),vA.value="")}),(c,u)=>(m(),Q("div",yN,[y(Ft)==="bot"?(m(),Q("div",TN,[h("span",null,[(m(),Q("svg",LN,ON))])])):y(Ft)==="user"?(m(),Q("div",UN,[h("span",null,[(m(),Q("svg",NN,KN))])])):y(Ft)==="listening"?(m(),Q("div",FN,GN)):Be("",!0),h("div",{class:Ee([o.value?"":"animate-pulse","tooltip"])},[h("span",xN,pe(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())},jN)):(m(),Q("button",{key:1,class:"rounded-full bg-white p-2 transition hover:bg-gray-300",onClick:u[1]||(u[1]=l=>A())},kN))],2),h("button",{class:"rounded-full bg-white p-2 hover:bg-gray-300",onClick:u[2]||(u[2]=l=>r())},[re(y(NC),{class:"h-[10px] w-[10px] text-gray-700"})])]))}}),dn=t=>(At("data-v-115227f8"),t=t(),at(),t),zN={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},PN={class:"py-2"},bN={class:"flex"},JN={class:"z-1 relative w-full"},HN={class:"flex justify-between my-2 w-full"},qN=dn(()=>h("div",null,null,-1)),VN={key:0,class:"flex justify-center bg-genpact-darkest-blue px-4 rounded-full"},WN={class:"relative w-full"},ZN={class:"absolute inset-y-0 left-0 flex items-center pl-3"},XN={class:"tooltip"},_N=dn(()=>h("span",{class:"tooltiptext text-genpact-darkest-teal"},"Restart",-1)),$N=[dn(()=>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)),dn(()=>h("path",{d:"M9 10H15M9 14H12M19 8V2M16 5H22",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1))],eK={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},tK={key:0},iK=["disabled"],nK=[dn(()=>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))],rK={key:1,class:"tooltip"},oK=[dn(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),dn(()=>h("img",{class:"w-7 h-7",src:Ig,alt:"watingIcon"},null,-1))],sK={class:"flex justify-start gap-2 md:gap-1"},AK=["disabled"],aK=dn(()=>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)),cK=Qe({__name:"NewQuestionSimulation",setup(t){const e=Ye(),i=ut(),n=f(""),o=f("");e.question="";const s=f(null),A=f(!1),r=f($t),a=f(!1);o.value=e.recognizedText,Yt(()=>{s.value.focus()});const c=()=>{window.location.reload()},u=g=>{const E=g.length;r.value=$t-E,A.value=E>=$t},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 D=f("");D.value=e.question||e.recognizedText,e.question="";const L={ohr_id:n.value,past_messages:e.past_messages,question:D.value||e.recognizedText,bandCode:e.band_code,userGenomeFunction:e.genomeFunctionValue,userGenomeRole:e.genomeRoleValue,skillId:e.simulationSkill||"937e84ef-e95d-4327-9afe-e7be2bf420eb"},O=await st("/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 N=await st("/sqlTest",L);e.addConversation((S=N.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,De.isAxiosError(B)){const D=B;console.log("Error found!"),console.error((p=D.response)==null?void 0:p.data),i.setError(((M=D.response)==null?void 0:M.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(g,E)=>(m(),Q("div",zN,[h("div",PN,[h("div",bN,[h("div",JN,[h("div",HN,[qN,y(e).showVoiceComponent?(m(),Q("div",VN,[re(YN)])):Be("",!0)]),h("div",WN,[h("div",ZN,[h("div",XN,[_N,(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"},$N))])]),h("div",eK,[a.value?(m(),Q("div",rK,oK)):(m(),Q("div",tK,[(m(),Q("svg",{disabled:y(e).beginFlag===!0,class:Ee([y(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=>y(e).searchBoxdisable===!1||y(e).beginFlag===!0?"":l()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},nK,10,iK))]))]),h("div",sK,[ke(h("input",{onKeyup:[E[1]||(E[1]=Fu(C=>a.value?"":l(),["enter"])),E[3]||(E[3]=C=>u(y(e).question))],disabled:y(e).beginFlag===!0||y(e).searchBoxdisable===!1,class:Ee([y(e).beginFlag===!0||y(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=>y(e).question=C),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:s},null,42,AK),[[Xe,y(e).question]])])]),aK])])])]))}}),bk="",uK=ze(cK,[["__scopeId","data-v-115227f8"]]),Hc=t=>(At("data-v-bbd70acc"),t=t(),at(),t),lK={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},gK={class:"py-2"},EK={class:"flex"},hK={class:"z-1 relative w-full"},CK={class:"relative w-full"},IK={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},pK={key:0},dK=["disabled"],SK=[Hc(()=>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))],MK={key:1,class:"tooltip"},BK=[Hc(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),Hc(()=>h("img",{class:"w-7 h-7",src:Ig,alt:"watingIcon"},null,-1))],vK={class:"flex justify-start gap-2 md:gap-1"},fK=["disabled"],wK=Hc(()=>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)),mK=Qe({__name:"NewMDMQuestionSimulation",setup(t){const e=Ye(),i=ut(),n=f("");e.question="";const o=f(null),s=f(!1),A=f($t),r=f(!1);n.value=e.recognizedText,Yt(()=>{o.value.focus()});const a=u=>{const l=u.length;A.value=$t-l,s.value=l>=$t},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;_t==="prod"?S="/ManualExportActivity":S="/fetchCompletionDemo";const I=await st(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),De.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",lK,[h("div",gK,[h("div",EK,[h("div",hK,[h("div",CK,[h("div",IK,[r.value?(m(),Q("div",MK,BK)):(m(),Q("div",pK,[(m(),Q("svg",{disabled:y(e).beginFlag===!0,class:Ee([y(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=>y(e).searchBoxdisable===!1||y(e).beginFlag===!0?"":c()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},SK,10,dK))]))]),h("div",vK,[ke(h("input",{onKeyup:[l[1]||(l[1]=Fu(g=>r.value?"":c(),["enter"])),l[3]||(l[3]=g=>a(y(e).question))],disabled:y(e).beginFlag===!0||y(e).searchBoxdisable===!1,class:Ee([y(e).beginFlag===!0||y(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=>y(e).question=g),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:o},null,42,fK),[[Xe,y(e).question]])])]),wK])])])]))}}),Vk="",RK=ze(mK,[["__scopeId","data-v-bbd70acc"]]),QK={},DK={class:"flex min-h-screen justify-center -mt-16"},yK=[h("div",{class:"flex items-center justify-center"},[h("img",{class:"loadercss",src:Li,alt:"Loader Gif"})],-1)];function TK(t,e){return m(),Q("div",DK,yK)}const zS=ze(QK,[["render",TK]]),wA=t=>(At("data-v-53597136"),t=t(),at(),t),LK={class:"max-h-screen overflow-auto md:p-6 p-3 text-[#161916]"},OK={key:0,class:"flex flex-col items-center justify-center gap-4"},UK=[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))],NK={key:1,class:"flex flex-col items-center justify-center gap-4"},KK=[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))],FK={key:1,className:"h-screen flex flex-col items-stretch"},GK={class:"z-20"},xK=wA(()=>h("div",{class:"mt-6"},null,-1)),jK={class:"flex h-full items-stretch overflow-hidden"},kK={class:"mx-auto w-11/12 bg-white"},YK={class:"relative flex h-full w-full flex-col items-stretch overflow-hidden"},zK={key:0,class:"relative"},PK={key:1,class:"relative"},bK=Qe({__name:"AssessmentSimulation",setup(t){const e=f(!0),i=f(!1),n=f(!1);f(!1),f(!1);const o=Ye(),s=ut(),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"];Yt(async()=>{e.value=!0,await M(),await D()});const M=async()=>{var L,O,R,N,Y,x,G;try{const X=await Jt(`/getLearnerData?forSimulation=true&skillForSimulation=${o.simulationSkill}`);o.initialize(X.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(X){if(console.error(X),e.value=!1,De.isAxiosError(X)&&((L=X.response)!=null&&L.status)||X&&typeof X=="object"&&"response"in X&&X.response&&typeof X.response=="object"&&"status"in X.response&&X.response.status){const P=X;if(console.log("Error found!"),console.error((O=P.response)==null?void 0:O.data),((R=P.response)==null?void 0:R.status)===424||((N=P.response)==null?void 0:N.status)===425||((Y=P.response)==null?void 0:Y.status)===400){c.value=(x=P.response)==null?void 0:x.status,console.log("errorCode value",c.value),n.value=!0;return}s.setError(((G=P.response)==null?void 0:G.data).message)}else s.setError("There was an issue, please contact helpmate")}},B=async()=>{var L,O,R,N,Y,x,G,X,P,H,K,W,z,ae,Ae,Ce,Me,Ue,xe,He,ne,U,$,q,ee,ve,v,w,T,F,k,b,ie,Z,_,J,ce,oe,ue,Ie,we,je,Ne,qe,pt,xt,et,ni;console.log("Start getAssessmentDetails");try{_t==="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 le=await Jt(l);A.value=(O=(L=le==null?void 0:le.data)==null?void 0:L.data)==null?void 0:O.name,o.skillNameForSimulation=A.value,o.generatedPrompt=(N=(R=le==null?void 0:le.data)==null?void 0:R.data)==null?void 0:N.generatedPrompt,o.assessmentType=(x=(Y=le==null?void 0:le.data)==null?void 0:Y.data)==null?void 0:x.assessmentType,a.value=(X=(G=le==null?void 0:le.data)==null?void 0:G.data)==null?void 0:X.status,d.value=(H=(P=le==null?void 0:le.data)==null?void 0:P.data)==null?void 0:H.editMode,o.empSeniority=(W=(K=le==null?void 0:le.data)==null?void 0:K.data)==null?void 0:W.empSeniority,o.functionRole=(ae=(z=le==null?void 0:le.data)==null?void 0:z.data)==null?void 0:ae.functionRole,E=(Ce=(Ae=le==null?void 0:le.data)==null?void 0:Ae.data)==null?void 0:Ce.accessBand,C=(Ue=(Me=le==null?void 0:le.data)==null?void 0:Me.data)==null?void 0:Ue.accessOhrList;const Ze=(He=(xe=le==null?void 0:le.data)==null?void 0:xe.data)==null?void 0:He.createdBy;if(o.mcqType=(U=(ne=le==null?void 0:le.data)==null?void 0:ne.data)==null?void 0:U.mcqTypes,o.storeFinalFeedback=(q=($=le==null?void 0:le.data)==null?void 0:$.data)==null?void 0:q.storeFinalFeedback,o.storeFinalScore=(ve=(ee=le==null?void 0:le.data)==null?void 0:ee.data)==null?void 0:ve.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){_t==="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 Jt(l);o.generatedPrompt=(w=(v=Pe==null?void 0:Pe.data)==null?void 0:v.data)==null?void 0:w.generatedPrompt,o.assessmentType=(F=(T=Pe==null?void 0:Pe.data)==null?void 0:T.data)==null?void 0:F.assessmentType,o.empSeniority=(b=(k=Pe==null?void 0:Pe.data)==null?void 0:k.data)==null?void 0:b.empSeniority,o.functionRole=(Z=(ie=Pe==null?void 0:Pe.data)==null?void 0:ie.data)==null?void 0:Z.functionRole,o.storeFinalFeedback=(J=(_=Pe==null?void 0:Pe.data)==null?void 0:_.data)==null?void 0:J.storeFinalFeedback,o.storeFinalScore=(oe=(ce=Pe==null?void 0:Pe.data)==null?void 0:ce.data)==null?void 0:oe.storeFinalScore,E=(Ie=(ue=Pe==null?void 0:Pe.data)==null?void 0:ue.data)==null?void 0:Ie.accessBand,C=(je=(we=Pe==null?void 0:Pe.data)==null?void 0:we.data)==null?void 0:je.accessOhrList}const Ut=o==null?void 0:o.band_code,ki=(Ne=E==null?void 0:E.split(","))==null?void 0:Ne.map(Pe=>Pe.trim());if(Ze===(o==null?void 0:o.ohr)||p.includes(o==null?void 0:o.ohr))console.log("User has access to this assessment.");else{if(ki.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(ki.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(le){if(console.error(le),e.value=!1,De.isAxiosError(le)&&((qe=le.response)!=null&&qe.status)||le&&typeof le=="object"&&"response"in le&&le.response&&typeof le.response=="object"&&"status"in le.response&&le.response.status){const Ze=le;if(console.log("Error found!"),console.error((pt=Ze.response)==null?void 0:pt.data),((xt=Ze.response)==null?void 0:xt.status)===424||((et=Ze.response)==null?void 0:et.status)===425){n.value=!0;return}s.setError(((ni=Ze.response)==null?void 0:ni.data).message)}else s.setError("There was an issue, please contact helpmate")}},D=async()=>{var L,O,R,N,Y,x,G,X;try{_t==="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 P=await De({url:g.value,headers:{authorization:`Bearer ${u}`,"content-type":"application/json"},method:"get"});o.genomeFunctionValue=(R=(O=(L=P==null?void 0:P.data)==null?void 0:L.role_function)==null?void 0:O.function)==null?void 0:R.name,o.genomeRoleValue=(x=(Y=(N=P==null?void 0:P.data)==null?void 0:N.role_function)==null?void 0:Y.role)==null?void 0:x.name}catch(P){if(console.error(P),e.value=!1,De.isAxiosError(P)){const H=P;console.log("Error found!"),console.error((G=H.response)==null?void 0:G.data),s.setError(((X=H.response)==null?void 0:X.data).message)}else s.setError("There was an issue, please contact helpmate")}};return(L,O)=>(m(),Q("section",null,[re(wr,{"is-visible":n.value},{default:hi(()=>[h("div",LK,[c.value===424||c.value==="425"?(m(),Q("div",OK,UK)):Be("",!0),c.value===400?(m(),Q("div",NK,KK)):Be("",!0)])]),_:1},8,["is-visible"]),h("div",null,[e.value?(m(),Di(zS,{key:0})):(m(),Q("main",FK,[h("div",GK,[re(Hy)]),xK,h("div",jK,[h("div",kK,[h("div",YK,[re(DN),h("div",{class:Ee(y(o).showVoiceComponent===!0?"mt-[160px]":"mt-[120px]")},null,2)]),y(o).assessmentQuestion?(m(),Q("div",zK,[re(uK)])):(m(),Q("div",PK,[re(RK)]))])])]))])]))}}),e1="",JK=Object.freeze(Object.defineProperty({__proto__:null,default:ze(bK,[["__scopeId","data-v-53597136"]])},Symbol.toStringTag,{value:"Module"})),HK={class:"flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6"},qK=["href"],VK=[h("img",{class:"h-11 w-auto cursor-pointer",src:zC,alt:"Genome Logo"},null,-1)],WK=["href"],ZK=[h("img",{class:"h-9 w-28 cursor-pointer md:w-36",src:ul,alt:"Aiguru Logo"},null,-1)],XK=Qe({__name:"headerAMA",setup(t){const e=f(""),i=f("");return _t==="prod"?e.value="https://genome.genpact.com":e.value="https://genome-dev.genpact.com",_t==="prod"?i.value="https://genome.genpact.com/#aiguru":i.value="https://genome-dev.genpact.com/#aiguru",(n,o)=>(m(),Q("nav",HK,[h("a",{class:"px-2 md:px-0 lg:px-0",href:e.value,target:"_blank"},VK,8,qK),h("a",{class:"px-2 md:px-0 lg:px-0",href:i.value,target:"_blank"},ZK,8,WK)]))}}),_K={class:"flex items-end justify-start"},$K={class:"fontFormattingAMA w-full bg-gray-100 rounded-lg"},eF={class:"w-full rounded-md px-3 py-2 text-lg font-bold text-black text-[18px] md:text-[22px]"},tF={class:"w-full px-3 py-2 text-base text-black text-[12px] md:text-[16px] font-[550]"},iF=h("br",null,null,-1),nF=Qe({__name:"greetingsAMA",setup(t){const e=Ye(),i=` Hi ${e.learnerName||"Expert"}, and welcome!`,n=it(()=>i),o=it(()=>e.welcomeMessage);return(s,A)=>(m(),Q("section",null,[h("div",_K,[h("div",$K,[h("div",eF,pe(n.value),1),h("div",tF,pe(o.value),1)])]),iF]))}}),rF={class:"fontFormattingAMA flex items-end justify-start py-2"},oF={class:"line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg"},sF=["innerHTML"],AF=Qe({__name:"responseAMA",props:{answer:{type:String,required:!0}},setup(t){const e=t,i=it(()=>{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",rF,[h("div",oF,[h("span",{class:"fontFormattingAMA",innerHTML:i.value},null,8,sF)])]))}}),r1="",aF=ze(AF,[["__scopeId","data-v-38edcca6"]]),cF={class:"flex justify-end items-end py-3"},uF={class:"max-w-[80%]"},lF={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},gF=Qe({__name:"learnerAMA",props:{question:{type:String,required:!0}},setup(t){return(e,i)=>(m(),Q("div",cF,[h("div",uF,[h("div",lF,pe(t.question),1)])]))}}),EF=t=>(At("data-v-12a02acf"),t=t(),at(),t),hF={class:"flex w-full flex-col items-start justify-start bg-white"},CF={class:"bot-typing-animation gap-1"},IF={class:"block w-full text-lg italic text-gray-800"},pF=EF(()=>h("span",{class:"dot-animation"},[h("span",null,"."),h("span",null,"."),h("span",null,".")],-1)),dF=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),SF=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",hF,[h("div",CF,[h("div",IF,pe(e.value),1),pF]),dF]))}}),o1="",MF=ze(SF,[["__scopeId","data-v-12a02acf"]]),BF={key:0},vF={key:1},fF={key:0,class:"flex"},wF=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=Ye(),o=f();return Yt(()=>{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"}))}),ZA(()=>{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"},[re(nF),(m(!0),Q(Le,null,gt(y(n).conversations,(r,a)=>(m(),Q("div",{key:a},[r.question?(m(),Q("div",BF,[re(gF,{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"])])):Be("",!0),r.answer?(m(),Q("div",vF,[re(aF,{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",y(e)).replaceAll("<ul",y(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"])])):Be("",!0)]))),128)),y(n).dotLoader?(m(),Q("div",fF,[re(MF)])):Be("",!0)],512))}}),s1="",mF=ze(wF,[["__scopeId","data-v-e6168dd4"]]),qc=t=>(At("data-v-df62b92f"),t=t(),at(),t),RF={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},QF={class:"py-2"},DF={class:"flex"},yF={class:"z-1 relative w-full"},TF={class:"relative w-full"},LF={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},OF={key:0},UF=[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))],NF={key:1,class:"tooltip"},KF=[qc(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),qc(()=>h("img",{class:"w-7 h-7",src:Ig,alt:"watingIcon"},null,-1))],FF={class:"flex justify-start"},GF={class:"flex justify-start items-start text-[#161916]"},xF=qc(()=>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)),jF=Qe({__name:"NewQuestionAMA",setup(t){const e=Ye(),i=ut();e.question="";const n=f(null),o=f(!1),s=f($t),A=f(!1);Yt(()=>{n.value.focus()});const r=g=>new URLSearchParams(window.location.search).get(g)||"",a=f(r("amaId")),c=f(r("corpusId")),u=g=>{const E=g.length;s.value=$t-E,o.value=E>=$t},l=async()=>{var g,E,C,d,S,I;try{if(e.question.trim().length<1){i.setError("Please enter answer!");return}if(e.amaQuestionsLeft<=0){i.setError("You have exhausted your question limit!");return}A.value=!0,e.dotLoader=!0;const p={question:e.question};e.conversations.push(p);const M=f("");M.value=e.question,e.question="";const B={amaId:a.value,amaCorpusId:c.value,past_messages:e.past_messages,question:M.value,prompt:e.generatedPrompt},D=await st("/amaBotResponse",B);if(((E=(g=D==null?void 0:D.data)==null?void 0:g.body)==null?void 0:E.answer)===""){console.log("in the if case calling api again");const O=await st("/amaBotResponse",B);e.addConversation((C=O.data)==null?void 0:C.body,"new")}else e.addConversation((d=D.data)==null?void 0:d.body,"new");A.value=!1,e.dotLoader=!1}catch(p){if(console.error(p),e.dotLoader=!1,A.value=!1,De.isAxiosError(p)){const M=p;console.log("Error found!"),console.error((S=M.response)==null?void 0:S.data),i.setError(((I=M.response)==null?void 0:I.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(g,E)=>(m(),Q("div",RF,[h("div",QF,[h("div",DF,[h("div",yF,[h("div",TF,[h("div",LF,[A.value?(m(),Q("div",NF,KF)):(m(),Q("div",OF,[(m(),Q("svg",{onClick:E[0]||(E[0]=C=>l()),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"},UF))]))]),h("div",FF,[ke(h("input",{onKeyup:[E[1]||(E[1]=Fu(C=>A.value?"":l(),["enter"])),E[3]||(E[3]=C=>u(y(e).question))],"onUpdate:modelValue":E[2]||(E[2]=C=>y(e).question=C),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),[[Xe,y(e).question]])])]),h("div",GF,pe(y(e).amaQuestionsLeft)+" questions remaining for the day ",1),xF])])])]))}}),u1="",kF=ze(jF,[["__scopeId","data-v-df62b92f"]]),pg=t=>(At("data-v-137589f5"),t=t(),at(),t),YF=pg(()=>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)),zF={key:1,className:"h-screen flex flex-col items-stretch"},PF={class:"z-20"},bF=pg(()=>h("div",{class:"mt-6"},null,-1)),JF={class:"flex h-full items-stretch overflow-hidden"},HF={class:"mx-auto w-11/12 bg-white"},qF={class:"relative flex h-full w-full flex-col items-stretch overflow-hidden"},VF=pg(()=>h("div",{class:"mt-[160px]"},null,-1)),WF={class:"relative"},ZF=Qe({__name:"AssessmentAMA",setup(t){const e=f(!0),i=f(!1),n=Ye(),o=ut(),s=f(""),A=localStorage.getItem("accessToken");let r="",a="",c="";const l=f((S=>new URLSearchParams(window.location.search).get(S)||"")("amaId"));n.amaSkillId=l.value??"";const g=["703331197","703380812","703331909","703363051","703319578"];Yt(async()=>{e.value=!0,await E(),await d(),e.value=!1});const E=async()=>{var S,I,p,M,B;try{if(l.value===null)throw{response:{status:424,data:{message:"Invalid URL"}}};console.log("before calling get learner");const D=await Jt(`/getLearnerData?forSimulation=true&skillForSimulation=${l.value}`);n.initialize(D.data),await C()}catch(D){if(console.error(D),e.value=!1,De.isAxiosError(D)&&((S=D.response)!=null&&S.status)||D&&typeof D=="object"&&"response"in D&&D.response&&typeof D.response=="object"&&"status"in D.response&&D.response.status){const L=D;if(console.log("Error found!"),console.error((I=L.response)==null?void 0:I.data),((p=L.response)==null?void 0:p.status)===424||((M=L.response)==null?void 0:M.status)===425){i.value=!0;return}o.setError(((B=L.response)==null?void 0:B.data).message)}else o.setError("There was an issue, please contact helpmate")}},C=async()=>{var S,I,p,M,B,D,L,O,R,N,Y,x,G,X,P,H,K,W,z,ae,Ae,Ce,Me,Ue,xe,He;console.log("Start getAssessmentDetails");try{_t==="prod"?r=`https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=${l.value}`:r=`https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=${l.value}`;const ne=await Jt(r);console.log("response from GetAMA",ne),s.value=(I=(S=ne==null?void 0:ne.data)==null?void 0:S.data)==null?void 0:I.name,n.welcomeMessage=(M=(p=ne==null?void 0:ne.data)==null?void 0:p.data)==null?void 0:M.displayMsg,console.log("response from GetAMA skill Name",s.value),n.skillNameForSimulation=s.value,n.generatedPrompt=(D=(B=ne==null?void 0:ne.data)==null?void 0:B.data)==null?void 0:D.generatedPrompt,a=(O=(L=ne==null?void 0:ne.data)==null?void 0:L.data)==null?void 0:O.accessBand,c=(N=(R=ne==null?void 0:ne.data)==null?void 0:R.data)==null?void 0:N.accessOhrList;const U=(x=(Y=ne==null?void 0:ne.data)==null?void 0:Y.data)==null?void 0:x.createdBy;n.mcqType=(X=(G=ne==null?void 0:ne.data)==null?void 0:G.data)==null?void 0:X.mcqTypes,n.storeFinalFeedback=(H=(P=ne==null?void 0:ne.data)==null?void 0:P.data)==null?void 0:H.storeFinalFeedback,n.storeFinalScore=(W=(K=ne==null?void 0:ne.data)==null?void 0:K.data)==null?void 0:W.storeFinalScore,n.amaQuestionsLeft=(ae=(z=ne==null?void 0:ne.data)==null?void 0:z.data)==null?void 0:ae.amaQuestionsLeft,console.log("store mcqType====>",n.mcqType);const $=n==null?void 0:n.band_code;console.log("accessBand , accessOhrList====>",a,c);const q=(Ae=a==null?void 0:a.split(","))==null?void 0:Ae.map(ee=>ee.trim());if(console.log("bands ,====>",q),U===(n==null?void 0:n.ohr)||g.includes(n==null?void 0:n.ohr))console.log("User has access to this assessment.");else{if(q.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(q.includes($)||c.includes(n==null?void 0:n.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(ne){if(console.error(ne),e.value=!1,De.isAxiosError(ne)&&((Ce=ne.response)!=null&&Ce.status)||ne&&typeof ne=="object"&&"response"in ne&&ne.response&&typeof ne.response=="object"&&"status"in ne.response&&ne.response.status){const U=ne;if(console.log("Error found!"),console.error((Me=U.response)==null?void 0:Me.data),((Ue=U.response)==null?void 0:Ue.status)===424||((xe=U.response)==null?void 0:xe.status)===425){i.value=!0;return}o.setError(((He=U.response)==null?void 0:He.data).message)}else o.setError("There was an issue, please contact helpmate")}},d=async()=>{var S,I,p,M,B,D,L,O;try{const R=await De({url:"https://api-v2-dev.genpact.com/api/delphi/v2/myprofile",headers:{authorization:`Bearer ${A}`,"content-type":"application/json"},method:"get"});n.genomeFunctionValue=(p=(I=(S=R==null?void 0:R.data)==null?void 0:S.role_function)==null?void 0:I.function)==null?void 0:p.name,n.genomeRoleValue=(D=(B=(M=R==null?void 0:R.data)==null?void 0:M.role_function)==null?void 0:B.role)==null?void 0:D.name,console.log("profile data",n.genomeFunctionValue,n.genomeRoleValue)}catch(R){if(console.error(R),e.value=!1,De.isAxiosError(R)){const N=R;console.log("Error found!"),console.error((L=N.response)==null?void 0:L.data),o.setError(((O=N.response)==null?void 0:O.data).message)}else o.setError("There was an issue, please contact helpmate")}};return(S,I)=>(m(),Q("section",null,[re(wr,{"is-visible":i.value},{default:hi(()=>[YF]),_:1},8,["is-visible"]),h("div",null,[e.value?(m(),Di(zS,{key:0})):(m(),Q("main",zF,[h("div",PF,[re(XK)]),bF,h("div",JF,[h("div",HF,[h("div",qF,[re(mF),VF]),h("div",WF,[re(kF)])])])]))])]))}}),l1="",XF=Object.freeze(Object.defineProperty({__proto__:null,default:ze(ZF,[["__scopeId","data-v-137589f5"]])},Symbol.toStringTag,{value:"Module"})),_F={},$F={className:"flex justify-between items-center gap-4 h-14"},eG=[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 tG(t,e){return m(),Q("div",$F,eG)}const iG=ze(_F,[["render",tG]]),nG={class:"bg-genpact-blue-box w-full px-5 mb-4"},rG={key:0},oG={class:"flex justify-between items-start text-lg px-6"},sG=h("div",null,null,-1),AG={class:"flex justify-start items-center text-white bg-genpact-darkest-blue rounded-lg py-2 px-4 cursor-pointer"},aG={class:"flex justify-start items-start w-full px-6 py-3"},cG=h("div",{class:"md:w-1/2"},null,-1),uG={class:"relative flex justify-start items-end border border-gray-300 md:rounded-full rounded-lg md:w-1/2 w-full"},lG={class:"absolute inset-y-0 left-5 flex items-center"},gG={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"},EG={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"},hG={class:"flex justify-start items-center"},CG=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),IG={class:"flex-grow md:flex-grow-0"},pG={class:"px-6"},dG=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Current Topic List ",-1),SG={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},MG={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},BG=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),vG={class:"px-3 py-4 font-medium text-gray-900"},fG={class:"px-3 py-4"},wG={class:"px-3 py-4 text-center"},mG={class:"px-1.5 py-4 text-center"},RG=["onClick"],QG={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"},DG=[h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1)],PS=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=Ye(),a=ut(),c=ca(),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,D;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 Jt(`/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),De.isAxiosError(L)){const O=L;a.setError(((D=O.response)==null?void 0:D.data).message)}else a.setError("There was an issue with route")}},E=async()=>{var I,p,M,B,D,L;try{const O=await Jt("/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",(D=O==null?void 0:O.data)==null?void 0:D.body)}catch(O){if(console.error(O),De.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 Yt(async()=>{await E(),s.value=!0,A.value=Array(e.value.length).fill(!0),console.log("array",A.value)}),(I,p)=>(m(),Q(Le,null,[h("nav",nG,[re(iG)]),s.value?(m(),Q("div",rG,[h("div",oG,[sG,h("div",AG,[re(y(Xm),{class:"w-7 h-7 mr-1"}),h("button",{onClick:l,class:"font-bold"},"Add New Topic")])]),h("div",aG,[cG,h("div",uG,[h("div",lG,[re(y(Wm),{class:"w-5 h-5 mr-5 hidden md:flex"})]),h("div",gG,[h("div",EG,[h("div",hG,[ke(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),[[Xe,n.value]])]),CG,h("div",IG,[ke(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),[[Xe,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",pG,[dG,h("div",SG,[h("table",MG,[BG,h("tbody",null,[(m(!0),Q(Le,null,gt(e.value,(M,B)=>(m(),Q("tr",{key:B,class:"odd:bg-white even:bg-gray-100"},[h("th",vG,pe(M.Topic||"title"),1),h("td",fG,pe(M.Description||"desc"),1),h("td",wG,pe(M.OfferingType||"Knowledge Corpus"),1),h("td",mG,[A.value[B]?(m(),Q("button",{key:0,id:"index",onClick:D=>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,RG)):(m(),Q("div",QG,DG))])]))),128))])])])])])):(m(),Di(ll,{key:1}))],64))}})},Symbol.toStringTag,{value:"Module"})),yG={className:"flex justify-between items-center gap-4 h-14"},TG=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),LG=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Data",-1),OG=h("img",{class:"md:w-36 w-20",src:Bo},null,-1),UG=Qe({__name:"HeaderForEditSkillData",setup(t){const e=ca(),i=()=>{eo(()=>{sessionStorage.removeItem("dataViewAccess")}),e.push({name:"SkillData"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")};return(n,o)=>(m(),Q("div",yG,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[re(y(UC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),TG]),LG,OG]))}}),ji=t=>(At("data-v-18de1cf9"),t=t(),at(),t),NG={class:"bg-genpact-blue-box w-full px-5 mb-6"},KG={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},FG=ji(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Topic Name "),h("span",{class:"label"},"*")])],-1)),GG={class:"col-span-4"},xG=["disabled"],jG=ji(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Description "),h("span",{class:"label"},"*")])],-1)),kG={class:"col-span-4"},YG=ji(()=>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"},[Rt("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),zG={class:"col-span-4"},PG=ji(()=>h("div",{class:"col-span-1"},null,-1)),bG={class:"col-span-4"},JG={class:"md:flex block justify-between items-center space-y-2"},HG=["disabled"],qG={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-4 py-2"},VG=[ji(()=>h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],WG=["disabled"],ZG={key:3,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-10 py-2"},XG=[ji(()=>h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],_G=ji(()=>h("div",{class:"col-span-1"},null,-1)),$G={key:0,class:"col-span-4"},ex=[ji(()=>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))],tx={key:0,class:"pl-16 pr-8 py-2"},ix={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},nx={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},rx=ji(()=>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)),ox={key:0,class:"px-3 py-4 font-medium text-gray-900 text-center"},sx={key:1,class:"px-3 py-4"},Ax={key:2,class:"px-3 py-4 text-center"},ax={key:3,class:"px-3 py-4 text-center"},cx={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},ux={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},lx=Qe({__name:"EditSkillData",setup(t){const e=Ye(),i=ut(),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,D,L;try{const O={question:e.descriptionForSkillData};console.log("question",r.value),n.value=!1;const R=await st("/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",(D=(B=R==null?void 0:R.data)==null?void 0:B.body)==null?void 0:D.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,De.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 st("/InsertIntoTempSkillFile",I);console.log("data",p),A.value="Data Submitted Successfully!",o.value=!0,d()}catch(I){if(console.error(I),o.value=!0,De.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(Le,null,[h("nav",NG,[re(UG)]),h("div",KG,[FG,h("div",GG,[ke(h("input",{disabled:y(e).enableInputbox!==!0,class:Ee([y(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=>y(e).topicNameForSkillData=p),id:"topic",placeholder:"Write here...",required:""},null,10,xG),[[Xe,y(e).topicNameForSkillData]])]),jG,h("div",kG,[ke(h("textarea",{"onUpdate:modelValue":I[1]||(I[1]=p=>y(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),[[Xe,y(e).descriptionForSkillData]])]),YG,h("div",zG,[ke(h("input",{"onUpdate:modelValue":I[3]||(I[3]=p=>y(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),[[Xe,y(e).offeringTypeForSkillData]])]),PG,h("div",bG,[h("div",JG,[n.value?(m(),Q("button",{key:0,disabled:y(e).isTopicPending===!0,class:Ee([y(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,HG)):(m(),Q("div",qG,VG)),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,WG)):(m(),Q("div",ZG,XG))])]),_G,y(e).isTopicPending?(m(),Q("div",$G,ex)):Be("",!0)]),a.value?(m(),Q("div",tx,[h("div",ix,[h("table",nx,[rx,h("tbody",null,[(m(!0),Q(Le,null,gt(g.value,(p,M)=>(m(),Q("tr",{key:M,class:"odd:bg-white even:bg-gray-100"},[p.Topic!==y(e).topicNameForSkillData?(m(),Q("th",ox,pe(p.Topic||"title"),1)):Be("",!0),p.Topic!==y(e).topicNameForSkillData?(m(),Q("td",sx,pe(p.Description||"desc"),1)):Be("",!0),p.Topic!==y(e).topicNameForSkillData?(m(),Q("td",Ax,pe(p.OfferingType||"Knowledge Corpus"),1)):Be("",!0),p.Topic!==y(e).topicNameForSkillData?(m(),Q("td",ax,pe(p.new_tag),1)):Be("",!0)]))),128))])])])])):Be("",!0),ke(h("div",cx,[h("div",ux,pe(A.value),1)],512),[[hr,s.value]])],64))}}),M1="",gx=Object.freeze(Object.defineProperty({__proto__:null,default:ze(lx,[["__scopeId","data-v-18de1cf9"]])},Symbol.toStringTag,{value:"Module"})),Ex={},hx={className:"flex justify-between items-center gap-4 h-14"},Cx=[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 Ix(t,e){return m(),Q("div",hx,Cx)}const px=ze(Ex,[["render",Ix]]),dx={class:"bg-genpact-blue-box w-full px-5 mb-4"},Sx={key:0},Mx={class:"w-full px-6 py-1"},Bx=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Topic Update Request ",-1),vx={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},fx={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},wx=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),mx={class:"px-3 py-4 font-medium text-gray-900 text-center"},Rx={class:"px-3 py-4"},Qx={class:"px-3 py-4 text-center"},Dx={class:"px-2 py-4 text-center"},yx={class:"px-2 py-4 text-gray-500 hover:text-genpact-darkest-blue"},Tx=Object.freeze(Object.defineProperty({__proto__:null,default:Qe({__name:"SkillAutomation",setup(t){const e=f([]),i=f(),n=f(!1),o=Ye(),s=ut(),A=ca(),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 Jt("/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),De.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 Yt(async()=>{await a(),n.value=!0}),(c,u)=>(m(),Q(Le,null,[h("nav",dx,[re(px)]),n.value?(m(),Q("div",Sx,[h("div",Mx,[Bx,h("div",vx,[h("table",fx,[wx,h("tbody",null,[(m(!0),Q(Le,null,gt(e.value,(l,g)=>(m(),Q("tr",{key:g,class:"odd:bg-white even:bg-gray-100"},[h("th",mx,pe(l.Topic||"title"),1),h("td",Rx,pe(l.Description||"desc"),1),h("td",Qx,pe(l.OfferingType||"Knowledge Corpus"),1),h("td",Dx,pe(l.DuplicateExists),1),h("td",yx,[re(y(qm),{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"})),Lx={className:"flex justify-between items-center gap-4 h-14"},Ox=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),Ux=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Admin Data",-1),Nx=h("img",{class:"md:w-36 w-20",src:Bo},null,-1),Kx=Qe({__name:"HeaderForEditSKillAdminDatas",setup(t){const e=ca(),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",Lx,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[re(y(UC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),Ox]),Ux,Nx]))}}),gi=t=>(At("data-v-ecf2c818"),t=t(),at(),t),Fx={class:"bg-genpact-blue-box w-full px-5 mb-6"},Gx={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},xx=gi(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Topic Name "),h("span",{class:"label"},"*")])],-1)),jx={class:"col-span-4"},kx=["disabled"],Yx=gi(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Description "),h("span",{class:"label"},"*")])],-1)),zx={class:"col-span-4"},Px=gi(()=>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"},[Rt("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),bx={class:"col-span-4"},Jx=gi(()=>h("div",{class:"col-span-1"},null,-1)),Hx={class:"col-span-4"},qx={class:"grid md:grid-cols-5 grid-cols-1 justify-start items-center gap-2"},Vx={class:"col-span-1"},Wx=["disabled"],Zx={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40"},Xx=[gi(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],_x=gi(()=>h("div",{class:"col-span-1"},null,-1)),$x=gi(()=>h("div",{class:"col-span-1"},null,-1)),ej={class:"col-span-1 flex md:justify-end justify-start items-end"},tj={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},ij=[gi(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],nj={class:"col-span-1 flex md:justify-end justify-start items-end"},rj=["disabled"],oj={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},sj=[gi(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],Aj={class:"pl-16 pr-8 py-2"},aj={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},cj={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},uj=gi(()=>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)),lj={class:"px-3 py-4 font-medium text-gray-900 text-center"},gj={class:"px-3 py-4"},Ej={class:"px-3 py-4 text-center"},hj=gi(()=>h("td",{class:"px-3 py-4 text-center"},pe("1.05"),-1)),Cj={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},Ij={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},pj=Qe({__name:"EditSkillAdminData",setup(t){const e=Ye(),i=ut(),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,D,L,O;try{const R={question:e.descriptionForSkillData};console.log("question",r.value),n.value=!1;const N=await st("/SearchSkillTags",R);l.value=(M=(p=N==null?void 0:N.data)==null?void 0:p.body)==null?void 0:M.length,console.log("ARRAY LENGTH",l.value),u.value=((B=N==null?void 0:N.data)==null?void 0:B.body)||[],E.value=u.value,console.log("length",(L=(D=N==null?void 0:N.data)==null?void 0:D.body)==null?void 0:L.length),console.log("data",N),n.value=!0,a.value=!0,c.value=!0,console.log("showSubmitButton",c.value)}catch(R){if(console.error(R),n.value=!0,De.isAxiosError(R)){const N=R;i.setError(((O=N.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 Jt(`/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,De.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 st("/editMasterSkillFile",M);console.log("data",B),s.value=!0,g.value="Data Submitted Successfully!",I()}catch(M){if(console.error(M),s.value=!0,De.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(Le,null,[h("nav",Fx,[re(Kx)]),h("div",Gx,[xx,h("div",jx,[ke(h("input",{disabled:y(e).enableInputbox!==!0,class:Ee([y(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=>y(e).topicNameForSkillData=B),id:"topic",placeholder:"Write here...",required:""},null,10,kx),[[Xe,y(e).topicNameForSkillData]])]),Yx,h("div",zx,[ke(h("textarea",{"onUpdate:modelValue":M[1]||(M[1]=B=>y(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),[[Xe,y(e).descriptionForSkillData]])]),Px,h("div",bx,[ke(h("input",{"onUpdate:modelValue":M[3]||(M[3]=B=>y(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),[[Xe,y(e).offeringTypeForSkillData]])]),Jx,h("div",Hx,[h("div",qx,[h("div",Vx,[n.value?(m(),Q("button",{key:0,disabled:y(e).isTopicPending===!0,class:Ee([y(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,Wx)):(m(),Q("div",Zx,Xx))]),_x,$x,h("div",ej,[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",tj,ij))]),h("div",nj,[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,rj)):(m(),Q("div",oj,sj))])])])]),ke(h("div",Aj,[h("div",aj,[h("table",cj,[uj,h("tbody",null,[(m(!0),Q(Le,null,gt(E.value,(B,D)=>(m(),Q("tr",{key:D,class:"odd:bg-white even:bg-gray-100"},[h("th",lj,pe(B.Topic||"title"),1),h("td",gj,pe(B.Description||"desc"),1),h("td",Ej,pe(B.OfferingType||"Knowledge Corpus"),1),hj]))),128))])])])],512),[[hr,a.value]]),ke(h("div",Cj,[h("div",Ij,pe(g.value),1)],512),[[hr,A.value]])],64))}}),D1="",dj=Object.freeze(Object.defineProperty({__proto__:null,default:ze(pj,[["__scopeId","data-v-ecf2c818"]])},Symbol.toStringTag,{value:"Module"})),Sj="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgEAAAIBCAYAAADQ5mxhAAAACXBIWXMAAAsSAAALEgHS3X78AAAfXUlEQVR4nO3dsY7kRp7gYeZhjfI0uhfYg/YBpoDSA8ho+duGxh0NCpDc9VrmmZJ160pAYSR3ZdSdrTbmBRLIeYAR9g2065WXB7aCUnV1VVcwM0hGxP/7gEL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Q+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==",Mj={},Bj={class:"w-screen h-screen flex justify-center"},vj=[h("div",{class:"flex flex-col justify-center items-center gap-6"},[h("img",{class:"h-24",src:Sj}),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 fj(t,e){return m(),Q("div",Bj,vj)}const bS=Object.freeze(Object.defineProperty({__proto__:null,default:ze(Mj,[["render",fj]])},Symbol.toStringTag,{value:"Module"}))});
|