@genpact/genome.mfe.mgtwin-app 1.1.250-alpha → 1.1.252-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-74dd956e.mjs → ArrowLeftCircleIcon-01224d9f.mjs} +1 -1
- package/dist/{AssessmentSimulation-fb2904a0.mjs → AssessmentSimulation-476fa90d.mjs} +174 -168
- package/dist/{EditSkillAdminData-0fe8c09c.mjs → EditSkillAdminData-4715c8ec.mjs} +3 -3
- package/dist/{EditSkillData-ab289172.mjs → EditSkillData-310a6ec4.mjs} +3 -3
- package/dist/{HomeView-ba51c405.mjs → HomeView-80a288f6.mjs} +4 -4
- package/dist/{Loading-c01ee93a.mjs → Loading-da1e331f.mjs} +1 -1
- package/dist/{Modal-634a466d.mjs → Modal-c938f4dd.mjs} +1 -1
- package/dist/{PromptTesting-10c4de50.mjs → PromptTesting-4a84244d.mjs} +2 -2
- package/dist/{SkillAutomation-cb9c6c45.mjs → SkillAutomation-2e4654ed.mjs} +3 -3
- package/dist/{SkillData-10f75b96.mjs → SkillData-1de6a6ac.mjs} +3 -3
- package/dist/{UnderMaintenance-696fc28d.mjs → UnderMaintenance-7b773bde.mjs} +1 -1
- package/dist/{api-f0399012.mjs → api-9d42cfbc.mjs} +1 -1
- package/dist/{main-ee506d73.mjs → main-cb0b9ae8.mjs} +1219 -1219
- package/dist/mgtwin.es.min.js +1 -1
- package/dist/mgtwin.umd.min.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/mgtwin.umd.min.js
CHANGED
|
@@ -31,5 +31,5 @@ File System access not available, please use Push or PullAudioOutputStream`),thi
|
|
|
31
31
|
`;class _U{toConnectionMessage(e){const i=new _t.Deferred;try{if(e.messageType===_t.MessageType.Text){const r=e.textContent;let s={},o=null;if(r){const A=r.split(`\r
|
|
32
32
|
\r
|
|
33
33
|
`);A&&A.length>0&&(s=this.parseHeaders(A[0]),A.length>1&&(o=A[1]))}i.resolve(new _t.ConnectionMessage(e.messageType,o,s,e.id))}else if(e.messageType===_t.MessageType.Binary){const r=e.binaryContent;let s={},o=null;if(!r||r.byteLength<2)throw new Error("Invalid binary message format. Header length missing.");const A=new DataView(r),n=A.getInt16(0);if(r.byteLength<n+2)throw new Error("Invalid binary message format. Header content missing.");let a="";for(let c=0;c<n;c++)a+=String.fromCharCode(A.getInt8(c+2));s=this.parseHeaders(a),r.byteLength>n+2&&(o=r.slice(2+n)),i.resolve(new _t.ConnectionMessage(e.messageType,o,s,e.id))}}catch(r){i.reject(`Error formatting the message. Error: ${r}`)}return i.promise}fromConnectionMessage(e){const i=new _t.Deferred;try{if(e.messageType===_t.MessageType.Text){const r=`${this.makeHeaders(e)}${Kd}${e.textBody?e.textBody:""}`;i.resolve(new _t.RawWebsocketMessage(_t.MessageType.Text,r,e.id))}else if(e.messageType===_t.MessageType.Binary){const r=this.makeHeaders(e),s=e.binaryBody,o=this.stringToArrayBuffer(r),A=new Int8Array(o),n=A.byteLength,a=new Int8Array(2+n+(s?s.byteLength:0));if(a[0]=n>>8&255,a[1]=n&255,a.set(A,2),s){const u=new Int8Array(s);a.set(u,2+n)}const c=a.buffer;i.resolve(new _t.RawWebsocketMessage(_t.MessageType.Binary,c,e.id))}}catch(r){i.reject(`Error formatting the message. ${r}`)}return i.promise}makeHeaders(e){let i="";if(e.headers)for(const r in e.headers)r&&(i+=`${r}: ${e.headers[r]}${Kd}`);return i}parseHeaders(e){const i={};if(e){const r=e.match(/[^\r\n]+/g);if(i){for(const s of r)if(s){const o=s.indexOf(":"),A=o>0?s.substr(0,o).trim().toLowerCase():s,n=o>0&&s.length>o+1?s.substr(o+1).trim():"";i[A]=n}}}return i}stringToArrayBuffer(e){const i=new ArrayBuffer(e.length),r=new DataView(i);for(let s=0;s<e.length;s++)r.setUint8(s,e.charCodeAt(s));return i}}Sc.WebsocketMessageFormatter=_U;var qs={},Fd;function $U(){if(Fd)return qs;Fd=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.SpeechConnectionFactory=void 0;const t=lt(),e=ne(),i=V(),r=ui(),s=ne(),o=ut,A=ci,n=qt;let a=class extends r.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),p=r.ConnectionFactoryBase.getHostSuffix(C),S=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Host,"wss://"+C+".stt.speech"+p),I={},d=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_EndpointId,void 0),M=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_RecoLanguage,void 0);if(d?(!E||E.search(A.QueryParameterNames.CustomSpeechDeploymentId)===-1)&&(I[A.QueryParameterNames.CustomSpeechDeploymentId]=d):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 D=new URL(E),k=D.pathname;(k===""||k==="/")&&(D.pathname=this.universalUri+u.recognitionEndpointVersion,E=await r.ConnectionFactoryBase.getRedirectUrlFromEndpoint(D.toString()))}if(!E)switch(u.recognitionMode){case n.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 n.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[o.HeaderNames.ConnectionId]=g,B.connectionId=g;const y=u.parameters.getProperty("SPEECH-EnableWebsocketCompression","false")==="true",L=new t.WebsocketConnection(E,I,B,new s.WebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(u),y,g),U=L.uri;return u.parameters.setProperty(i.PropertyId.SpeechServiceConnection_Url,U),L}};return qs.SpeechConnectionFactory=a,qs}var Js={},Gd;function e4(){if(Gd)return Js;Gd=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.ConversationTranscriberConnectionFactory=void 0;const t=lt(),e=V(),i=ne(),r=ui(),s=ne(),o=ut,A=ci;let n=class extends r.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=r.ConnectionFactoryBase.getHostSuffix(E),p=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Host,"wss://"+E+".stt.speech"+C),S={},I=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_EndpointId,void 0),d=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_RecoLanguage,void 0);if(I?(!g||g.search(A.QueryParameterNames.CustomSpeechDeploymentId)===-1)&&(S[A.QueryParameterNames.CustomSpeechDeploymentId]=I):d&&(!g||g.search(A.QueryParameterNames.Language)===-1)&&(S[A.QueryParameterNames.Language]=d),c.autoDetectSourceLanguages!==void 0&&(S[A.QueryParameterNames.EnableLanguageId]="true"),this.setV2UrlParams(c,S,g),g){const U=new URL(g),D=U.pathname;(D===""||D==="/")&&(U.pathname=this.universalUri,g=await r.ConnectionFactoryBase.getRedirectUrlFromEndpoint(U.toString()))}g||(g=`${p}${this.universalUri}`);const M={};u.token!==void 0&&u.token!==""&&(M[u.headerName]=u.token),M[o.HeaderNames.ConnectionId]=l;const B=c.parameters.getProperty("SPEECH-EnableWebsocketCompression","false")==="true",y=new t.WebsocketConnection(g,S,M,new s.WebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(c),B,l),L=y.uri;return c.parameters.setProperty(e.PropertyId.SpeechServiceConnection_Url,L),y}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,p)=>{this.setUrlParameter(p,C,c,u,l)});const E=JSON.parse(c.parameters.getProperty(i.ServicePropertiesPropertyName,"{}"));Object.keys(E).forEach(C=>{u[C]=E[C]})}};return Js.ConversationTranscriberConnectionFactory=n,Js}var Vs={},kd;function t4(){if(kd)return Vs;kd=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.TranscriberConnectionFactory=void 0;const t=lt(),e=V(),i=ui(),r=ne(),s=ut,o=ci;let A=class extends i.ConnectionFactoryBase{constructor(){super(...arguments),this.multiaudioRelativeUri="/speech/recognition/multiaudio"}create(a,c,u){let l=a.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Endpoint,void 0);const g=a.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Region,"centralus"),E=i.ConnectionFactoryBase.getHostSuffix(g),C="wss://transcribe."+g+".cts.speech"+E+this.multiaudioRelativeUri,p=a.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Host,C),S={};this.setQueryParams(S,a,l),l||(l=p);const I={};c.token!==void 0&&c.token!==""&&(I[c.headerName]=c.token),I[s.HeaderNames.ConnectionId]=u,a.parameters.setProperty(e.PropertyId.SpeechServiceConnection_Url,l);const d=a.parameters.getProperty("SPEECH-EnableWebsocketCompression","false")==="true";return Promise.resolve(new t.WebsocketConnection(l,S,I,new r.WebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(a),d,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&&!(o.QueryParameterNames.CustomSpeechDeploymentId in a)&&(a[o.QueryParameterNames.CustomSpeechDeploymentId]=l),g&&!(o.QueryParameterNames.Language in a)&&(a[o.QueryParameterNames.Language]=g);const E=c.parameters.getProperty(e.PropertyId.SpeechServiceResponse_RequestWordLevelTimestamps,"false").toLowerCase()==="true",C=c.parameters.getProperty(r.OutputFormatPropertyName,e.OutputFormat[e.OutputFormat.Simple])!==e.OutputFormat[e.OutputFormat.Simple];(E||C)&&(a[o.QueryParameterNames.Format]=e.OutputFormat[e.OutputFormat.Detailed].toLowerCase()),this.setCommonUrlParams(c,a,u)}};return Vs.TranscriberConnectionFactory=A,Vs}var Hs={},jd;function i4(){if(jd)return Hs;jd=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.TranslationConnectionFactory=void 0;const t=lt(),e=fs,i=V(),r=ui(),s=ne(),o=ut,A=ci,n=qt;let a=class extends r.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 d=new URL(E),M=d.pathname;(M===""||M==="/")&&(d.pathname=this.universalUri,E=await r.ConnectionFactoryBase.getRedirectUrlFromEndpoint(d.toString()))}const p={};l.token!==void 0&&l.token!==""&&(p[l.headerName]=l.token),p[o.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,p,new s.WebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(u),S,g)}getEndpointUrl(u,l){const g=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Region),E=r.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===n.RecognitionMode.Interactive?"interactive":l.recognitionMode===n.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 Hs.TranslationConnectionFactory=a,Hs}var Ws={},xd;function r4(){if(xd)return Ws;xd=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.EnumTranslation=void 0;const t=V(),e=ne();let i=class{static implTranslateRecognitionResult(s,o=!1){let A=t.ResultReason.Canceled;switch(s){case e.RecognitionStatus.Success:A=t.ResultReason.RecognizedSpeech;break;case e.RecognitionStatus.EndOfDictation:A=o?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(s){let o=t.CancellationReason.EndOfStream;switch(s){case e.RecognitionStatus.Success:case e.RecognitionStatus.EndOfDictation:case e.RecognitionStatus.NoMatch:o=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:o=t.CancellationReason.Error;break}return o}static implTranslateCancelErrorCode(s){let o=t.CancellationErrorCode.NoError;switch(s){case e.RecognitionStatus.Error:o=t.CancellationErrorCode.ServiceError;break;case e.RecognitionStatus.TooManyRequests:o=t.CancellationErrorCode.TooManyRequests;break;case e.RecognitionStatus.BadRequest:o=t.CancellationErrorCode.BadRequestParameters;break;case e.RecognitionStatus.Forbidden:o=t.CancellationErrorCode.Forbidden;break;default:o=t.CancellationErrorCode.NoError;break}return o}static implTranslateErrorDetails(s){let o="The speech service encountered an internal error and could not continue.";switch(s){case t.CancellationErrorCode.Forbidden:o="The recognizer is using a free subscription that ran out of quota.";break;case t.CancellationErrorCode.BadRequestParameters:o="Invalid parameter or unsupported audio format in the request.";break;case t.CancellationErrorCode.TooManyRequests:o="The number of parallel requests exceeded the number of allowed concurrent transcriptions.";break}return o}};return Ws.EnumTranslation=i,Ws}var Yd={};(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={}))})(Yd);var Zs={},zd;function n4(){if(zd)return Zs;zd=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.TranslationSynthesisEnd=void 0;const t=ne();let e=class rM{constructor(r){this.privSynthesisEnd=JSON.parse(r),this.privSynthesisEnd.SynthesisStatus&&(this.privSynthesisEnd.SynthesisStatus=t.SynthesisStatus[this.privSynthesisEnd.SynthesisStatus]),this.privSynthesisEnd.Status&&(this.privSynthesisEnd.SynthesisStatus=t.SynthesisStatus[this.privSynthesisEnd.Status])}static fromJSON(r){return new rM(r)}get SynthesisStatus(){return this.privSynthesisEnd.SynthesisStatus}get FailureReason(){return this.privSynthesisEnd.FailureReason}};return Zs.TranslationSynthesisEnd=e,Zs}var Mc={};Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.TranslationHypothesis=void 0;const o4=Ie,bd=xa;class Bc{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 Bc(JSON.parse(e),i)}static fromTranslationResponse(e,i){o4.Contracts.throwIfNullOrUndefined(e,"translationHypothesis");const r=e.SpeechHypothesis;return e.SpeechHypothesis=void 0,r.Translation=e,new Bc(r,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:bd.TranslationStatus[e.Translation.TranslationStatus]}):JSON.stringify(e)}mapTranslationStatus(e){if(typeof e=="string")return bd.TranslationStatus[e];if(typeof e=="number")return e}}Mc.TranslationHypothesis=Bc;var Xs={},Pd;function s4(){if(Pd)return Xs;Pd=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.TranslationPhrase=void 0;const t=Ie,e=ne(),i=xa;let r=class wg{constructor(o,A){this.privTranslationPhrase=o,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(o,A){return new wg(JSON.parse(o),A)}static fromTranslationResponse(o,A){t.Contracts.throwIfNullOrUndefined(o,"translationResponse");const n=o.SpeechPhrase;return o.SpeechPhrase=void 0,n.Translation=o,n.Text=n.DisplayText,new wg(n,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 o;return(o=this.privTranslationPhrase.PrimaryLanguage)==null?void 0:o.Language}get Confidence(){var o;return(o=this.privTranslationPhrase.PrimaryLanguage)==null?void 0:o.Confidence}get Translation(){return this.privTranslationPhrase.Translation}asJson(){const o={...this.privTranslationPhrase},A={...o,RecognitionStatus:e.RecognitionStatus[o.RecognitionStatus]};return o.Translation&&(A.Translation={...o.Translation,TranslationStatus:i.TranslationStatus[o.Translation.TranslationStatus]}),JSON.stringify(A)}mapRecognitionStatus(o){if(typeof o=="string")return e.RecognitionStatus[o];if(typeof o=="number")return o}mapTranslationStatus(o){if(typeof o=="string")return i.TranslationStatus[o];if(typeof o=="number")return o}};return Xs.TranslationPhrase=r,Xs}var _s={},qd;function A4(){if(qd)return _s;qd=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.TranslationServiceRecognizer=void 0;const t=Ee(),e=V(),i=ne();let r=class extends i.ConversationServiceRecognizer{constructor(o,A,n,a,c){super(o,A,n,a,c),this.privTranslationRecognizer=c,this.connectionEvents.attach(u=>{u.name==="ConnectionEstablishedEvent"&&this.privTranslationRecognizer.onConnection()})}async processTypeSpecificMessages(o){const A=new e.PropertyCollection;let n=await this.processSpeechMessages(o);if(n)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}}n=!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{}n=!0};switch(o.messageType===t.MessageType.Text&&A.setProperty(e.PropertyId.SpeechServiceResponse_JsonResult,o.textBody),o.path.toLowerCase()){case"translation.hypothesis":c(i.TranslationHypothesis.fromJSON(o.textBody,this.privRequestSession.currentTurnAudioOffset));break;case"translation.response":const u=JSON.parse(o.textBody);if(u.SpeechPhrase)await a(i.TranslationPhrase.fromTranslationResponse(u,this.privRequestSession.currentTurnAudioOffset));else{const g=JSON.parse(o.textBody);g.SpeechHypothesis&&c(i.TranslationHypothesis.fromTranslationResponse(g,this.privRequestSession.currentTurnAudioOffset))}break;case"translation.phrase":await a(i.TranslationPhrase.fromJSON(o.textBody,this.privRequestSession.currentTurnAudioOffset));break;case"translation.synthesis":case"audio":this.sendSynthesisAudio(o.binaryBody,this.privRequestSession.sessionId),n=!0;break;case"audio.end":case"translation.synthesis.end":const l=i.TranslationSynthesisEnd.fromJSON(o.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}n=!0;break}return n}cancelRecognition(o,A,n,a,c){const u=new e.PropertyCollection;if(u.setProperty(i.CancellationErrorCodePropertyName,e.CancellationErrorCode[a]),this.privTranslationRecognizer.canceled){const l=new e.TranslationRecognitionCanceledEventArgs(o,n,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(o,A,n){try{const a=new e.TranslationRecognitionEventArgs(e.TranslationRecognitionResult.fromSpeechRecognitionResult(o),A,n);this.privTranslationRecognizer.recognizing(this.privTranslationRecognizer,a)}catch{}}handleRecognizedCallback(o,A,n){try{const a=new e.TranslationRecognitionEventArgs(e.TranslationRecognitionResult.fromSpeechRecognitionResult(o),A,n);this.privTranslationRecognizer.recognized(this.privTranslationRecognizer,a)}catch{}}fireEventForResult(o,A){let n;if(o.Translation.Translations!==void 0){n=new e.Translations;for(const E of o.Translation.Translations)n.set(E.Language,E.Text||E.DisplayText)}let a,c;o instanceof i.TranslationPhrase?(o.Translation&&o.Translation.TranslationStatus===t.TranslationStatus.Success?a=e.ResultReason.TranslatedSpeech:a=e.ResultReason.RecognizedSpeech,c=o.Confidence):a=e.ResultReason.TranslatingSpeech;const u=o.Language,l=new e.TranslationRecognitionResult(n,this.privRequestSession.requestId,a,o.Text,o.Duration,o.Offset,u,c,o.Translation.FailureReason,o.asJson(),A);return new e.TranslationRecognitionEventArgs(l,o.Offset,this.privRequestSession.sessionId)}sendSynthesisAudio(o,A){const n=o===void 0?e.ResultReason.SynthesizingAudioCompleted:e.ResultReason.SynthesizingAudio,a=new e.TranslationSynthesisResult(n,o),c=new e.TranslationSynthesisEventArgs(a,A);if(this.privTranslationRecognizer.synthesizing)try{this.privTranslationRecognizer.synthesizing(this.privTranslationRecognizer,c)}catch{}}};return _s.TranslationServiceRecognizer=r,_s}var vc={};Object.defineProperty(vc,"__esModule",{value:!0}),vc.SpeechDetected=void 0;class ql{constructor(e,i){this.privSpeechStartDetected=JSON.parse(e),this.privSpeechStartDetected.Offset+=i}static fromJSON(e,i){return new ql(e,i)}get Offset(){return this.privSpeechStartDetected.Offset}}vc.SpeechDetected=ql;var Rc={};Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.SpeechHypothesis=void 0;class Jl{constructor(e,i){this.privSpeechHypothesis=JSON.parse(e),this.updateOffset(i)}static fromJSON(e,i){return new Jl(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}}Rc.SpeechHypothesis=Jl;var wc={};Object.defineProperty(wc,"__esModule",{value:!0}),wc.SpeechKeyword=void 0;class Vl{constructor(e,i){this.privSpeechKeyword=JSON.parse(e),this.privSpeechKeyword.Offset+=i}static fromJSON(e,i){return new Vl(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)}}wc.SpeechKeyword=Vl;var $s={},Jd;function a4(){if(Jd)return $s;Jd=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.SpeechServiceRecognizer=void 0;const t=V(),e=ne();let i=class extends e.ServiceRecognizerBase{constructor(s,o,A,n,a){super(s,o,A,n,a),this.privSpeechRecognizer=a}async processTypeSpecificMessages(s){let o;const A=new t.PropertyCollection;let n=!1;switch(s.path.toLowerCase()){case"speech.hypothesis":case"speech.fragment":const a=e.SpeechHypothesis.fromJSON(s.textBody,this.privRequestSession.currentTurnAudioOffset);A.setProperty(t.PropertyId.SpeechServiceResponse_JsonResult,a.asJson()),o=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(o,a.Offset,this.privRequestSession.sessionId);if(this.privSpeechRecognizer.recognizing)try{this.privSpeechRecognizer.recognizing(this.privSpeechRecognizer,c)}catch{}n=!0;break;case"speech.phrase":const u=e.SimpleSpeechPhrase.fromJSON(s.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])o=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(s.textBody,this.privRequestSession.currentTurnAudioOffset);A.setProperty(t.PropertyId.SpeechServiceResponse_JsonResult,E.asJson()),o=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(o,o.offset,this.privRequestSession.sessionId);if(this.privSpeechRecognizer.recognized)try{this.privSpeechRecognizer.recognized(this.privSpeechRecognizer,g)}catch{}if(this.privSuccessCallback){try{this.privSuccessCallback(o)}catch(E){this.privErrorCallback&&this.privErrorCallback(E)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}}n=!0;break}return n}cancelRecognition(s,o,A,n,a){const c=new t.PropertyCollection;if(c.setProperty(e.CancellationErrorCodePropertyName,t.CancellationErrorCode[n]),this.privSpeechRecognizer.canceled){const u=new t.SpeechRecognitionCanceledEventArgs(A,a,n,void 0,s);try{this.privSpeechRecognizer.canceled(this.privSpeechRecognizer,u)}catch{}}if(this.privSuccessCallback){const u=new t.SpeechRecognitionResult(o,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 $s.SpeechServiceRecognizer=i,$s}var eA={},Vd={};(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={}))})(Vd);var Hd;function c4(){if(Hd)return eA;Hd=1,Object.defineProperty(eA,"__esModule",{value:!0}),eA.ConversationTranscriptionServiceRecognizer=void 0;const t=V(),e=ne(),i=Vd,r=qt;let s=class extends e.ServiceRecognizerBase{constructor(A,n,a,c,u){super(A,n,a,c,u),this.privConversationTranscriber=u,this.setSpeakerDiarizationJson()}setSpeakerDiarizationJson(){if(this.privEnableSpeakerId){const A=this.privSpeechContext.getContext().phraseDetection||{};A.mode=r.RecognitionMode.Conversation;const n={};n.mode=i.SpeakerDiarizationMode.Anonymous,n.audioSessionId=this.privDiarizationSessionId,n.audioOffsetMs=0,n.diarizeIntermediates=this.privRecognizerConfig.parameters.getProperty(t.PropertyId.SpeechServiceResponse_DiarizeIntermediateResults,"false")==="true",A.speakerDiarization=n,this.privSpeechContext.getContext().phraseDetection=A}}async processTypeSpecificMessages(A){let n;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);n=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(n,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),p=e.EnumTranslation.implTranslateCancelErrorCode(g.RecognitionStatus);await this.cancelRecognitionLocal(C,p,e.EnumTranslation.implTranslateErrorDetails(p))}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])n=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 p=e.DetailedSpeechPhrase.fromJSON(A.textBody,this.privRequestSession.currentTurnAudioOffset);n=new t.ConversationTranscriptionResult(this.privRequestSession.requestId,E,p.RecognitionStatus===e.RecognitionStatus.Success?p.NBest[0].Display:void 0,p.Duration,p.Offset,p.Language,p.LanguageDetectionConfidence,g.SpeakerId,void 0,p.asJson(),a)}const C=new t.ConversationTranscriptionEventArgs(n,n.offset,this.privRequestSession.sessionId);if(this.privConversationTranscriber.transcribed)try{this.privConversationTranscriber.transcribed(this.privConversationTranscriber,C)}catch{}}c=!0;break}return c}cancelRecognition(A,n,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 eA.ConversationTranscriptionServiceRecognizer=s,eA}var tA={},Wd;function u4(){if(Wd)return tA;Wd=1,Object.defineProperty(tA,"__esModule",{value:!0}),tA.TranscriptionServiceRecognizer=void 0;const t=Ee(),e=V(),i=ne(),r=Oi;let s=class extends i.ConversationServiceRecognizer{constructor(A,n,a,c,u){super(A,n,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,n){if(this.privRequestSession.isRecognizing){const a=await this.fetchConnection();await this.sendSpeechEvent(a,this.createSpeechEventPayload(A,n))}}async sendMeetingSpeechEventAsync(A,n){if(this.privRequestSession.isRecognizing){const a=await this.fetchConnection();await this.sendSpeechEvent(a,this.createMeetingSpeechEventPayload(A,n))}}processTypeSpecificMessages(A){return this.processSpeechMessages(A)}handleRecognizedCallback(A,n,a){try{const c=new e.SpeechRecognitionEventArgs(A,n,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,n,a){try{const c=new e.SpeechRecognitionEventArgs(A,n,a);this.privTranscriberRecognizer.recognizing(this.privTranscriberRecognizer,c)}catch{}}cancelRecognition(A,n,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(n,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 n=this.privTranscriberRecognizer.getMeetingInfo(),a=this.createMeetingSpeechEventPayload(n,"start");await this.sendSpeechEvent(A,a)}else{const n=this.privTranscriberRecognizer.getConversationInfo(),a=this.createSpeechEventPayload(n,"start");await this.sendSpeechEvent(A,a)}await this.sendWaveHeader(A)}sendSpeechEvent(A,n){const a=JSON.stringify(n);if(a)return A.send(new r.SpeechConnectionMessage(t.MessageType.Text,"speech.event",this.privRequestSession.requestId,"application/json",a))}createSpeechEventPayload(A,n){const a={id:"meeting",name:n,meeting:A.conversationProperties};return a.meeting.id=A.id,a.meeting.attendees=A.participants,a}createMeetingSpeechEventPayload(A,n){const a={id:"meeting",name:n,meeting:A.meetingProperties};return a.meeting.id=A.id,a.meeting.attendees=A.participants,a}};return tA.TranscriptionServiceRecognizer=s,tA}var iA={},Zd;function l4(){if(Zd)return iA;Zd=1,Object.defineProperty(iA,"__esModule",{value:!0}),iA.DetailedSpeechPhrase=void 0;const t=ne();let e=class nM{constructor(r,s){this.privDetailedSpeechPhrase=JSON.parse(r),this.privDetailedSpeechPhrase.RecognitionStatus=this.mapRecognitionStatus(this.privDetailedSpeechPhrase.RecognitionStatus),this.updateOffsets(s)}static fromJSON(r,s){return new nM(r,s)}updateOffsets(r){if(this.privDetailedSpeechPhrase.Offset+=r,this.privDetailedSpeechPhrase.NBest)for(const s of this.privDetailedSpeechPhrase.NBest){if(s.Words)for(const o of s.Words)o.Offset+=r;if(s.DisplayWords)for(const o of s.DisplayWords)o.Offset+=r}}asJson(){const r={...this.privDetailedSpeechPhrase};return JSON.stringify({...r,RecognitionStatus:t.RecognitionStatus[r.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(r){if(typeof r=="string")return t.RecognitionStatus[r];if(typeof r=="number")return r}};return iA.DetailedSpeechPhrase=e,iA}var rA={},Xd;function g4(){if(Xd)return rA;Xd=1,Object.defineProperty(rA,"__esModule",{value:!0}),rA.SimpleSpeechPhrase=void 0;const t=ne();let e=class oM{constructor(r,s=0){this.privSimpleSpeechPhrase=JSON.parse(r),this.privSimpleSpeechPhrase.RecognitionStatus=this.mapRecognitionStatus(this.privSimpleSpeechPhrase.RecognitionStatus),this.updateOffset(s)}static fromJSON(r,s){return new oM(r,s)}updateOffset(r){this.privSimpleSpeechPhrase.Offset+=r}asJson(){const r={...this.privSimpleSpeechPhrase};return JSON.stringify({...r,RecognitionStatus:t.RecognitionStatus[r.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(r){if(typeof r=="string")return t.RecognitionStatus[r];if(typeof r=="number")return r}};return rA.SimpleSpeechPhrase=e,rA}var mc={};Object.defineProperty(mc,"__esModule",{value:!0}),mc.AddedLmIntent=void 0;class E4{constructor(e,i){this.modelImpl=e,this.intentName=i}}mc.AddedLmIntent=E4;var nA={},_d;function h4(){if(_d)return nA;_d=1,Object.defineProperty(nA,"__esModule",{value:!0}),nA.IntentServiceRecognizer=void 0;const t=Ee(),e=V(),i=ne();let r=class extends i.ServiceRecognizerBase{constructor(o,A,n,a,c){super(o,A,n,a,c),this.privIntentRecognizer=c,this.privIntentDataSent=!1,a.recognitionEndpointVersion="1"}setIntents(o,A){this.privAddedLmIntents=o,this.privUmbrellaIntent=A,this.privIntentDataSent=!0}processTypeSpecificMessages(o){let A,n,a=!1;const c=new e.PropertyCollection;switch(o.messageType===t.MessageType.Text&&c.setProperty(e.PropertyId.SpeechServiceResponse_JsonResult,o.textBody),o.path.toLowerCase()){case"speech.hypothesis":const l=i.SpeechHypothesis.fromJSON(o.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),n=new e.IntentRecognitionEventArgs(A,l.Offset,this.privRequestSession.sessionId),this.privIntentRecognizer.recognizing)try{this.privIntentRecognizer.recognizing(this.privIntentRecognizer,n)}catch{}a=!0;break;case"speech.phrase":const g=i.SimpleSpeechPhrase.fromJSON(o.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),n=new e.IntentRecognitionEventArgs(A,A.offset,this.privRequestSession.sessionId);const E=()=>{if(this.privIntentRecognizer.recognized)try{this.privIntentRecognizer.recognized(this.privIntentRecognizer,n)}catch{}if(this.privSuccessCallback){try{this.privSuccessCallback(A)}catch(p){this.privErrorCallback&&this.privErrorCallback(p)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}};this.privIntentDataSent===!1||e.ResultReason.NoMatch===n.result.reason?(this.privRequestSession.onPhraseRecognized(n.offset+n.result.duration),E()):this.privPendingIntentArgs=n,a=!0;break;case"response":if(n=this.privPendingIntentArgs,this.privPendingIntentArgs=void 0,n===void 0){if(o.textBody==="")return;n=new e.IntentRecognitionEventArgs(new e.IntentRecognitionResult,0,this.privRequestSession.sessionId)}const C=i.IntentResponse.fromJSON(o.textBody);if(C!==null&&C.topScoringIntent&&C.topScoringIntent.intent){let p=this.privAddedLmIntents[C.topScoringIntent.intent];if(this.privUmbrellaIntent!==void 0&&(p=this.privUmbrellaIntent),p){const S=p===void 0||p.intentName===void 0?C.topScoringIntent.intent:p.intentName;let I=n.result.reason;S!==void 0&&(I=e.ResultReason.RecognizedIntent);const d=n.result.properties!==void 0?n.result.properties:new e.PropertyCollection;d.setProperty(e.PropertyId.LanguageUnderstandingServiceResponse_JsonResult,o.textBody),n=new e.IntentRecognitionEventArgs(new e.IntentRecognitionResult(S,n.result.resultId,I,n.result.text,n.result.duration,n.result.offset,void 0,void 0,n.result.errorDetails,n.result.json,d),n.offset,n.sessionId)}}if(this.privRequestSession.onPhraseRecognized(n.offset+n.result.duration),this.privIntentRecognizer.recognized)try{this.privIntentRecognizer.recognized(this.privIntentRecognizer,n)}catch{}if(this.privSuccessCallback){try{this.privSuccessCallback(n.result)}catch(p){this.privErrorCallback&&this.privErrorCallback(p)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}a=!0;break}const u=new t.Deferred;return u.resolve(a),u.promise}cancelRecognition(o,A,n,a,c){const u=new e.PropertyCollection;if(u.setProperty(i.CancellationErrorCodePropertyName,e.CancellationErrorCode[a]),this.privIntentRecognizer.canceled){const l=new e.IntentRecognitionCanceledEventArgs(n,c,a,void 0,void 0,o);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 nA.IntentServiceRecognizer=r,nA}var fc={};Object.defineProperty(fc,"__esModule",{value:!0}),fc.IntentResponse=void 0;class Hl{constructor(e){e===""?this.privIntentResponse={}:this.privIntentResponse=JSON.parse(e)}static fromJSON(e){return new Hl(e)}get query(){return this.privIntentResponse.query}get topScoringIntent(){return this.privIntentResponse.topScoringIntent}get entities(){return this.privIntentResponse.entities}}fc.IntentResponse=Hl;var $d={};Object.defineProperty($d,"__esModule",{value:!0});var Qc={},Dc={};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.ServiceTelemetryListener=void 0;const Ki=Ee(),eS=dc;class C4{constructor(e,i,r){this.privIsDisposed=!1,this.privListeningTriggerMetric=null,this.privMicMetric=null,this.privConnectionEstablishMetric=null,this.privRequestId=e,this.privAudioSourceId=i,this.privAudioNodeId=r,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 eS.RecognitionTriggeredEvent&&e.requestId===this.privRequestId&&(this.privListeningTriggerMetric={End:e.eventTime,Name:"ListeningTrigger",Start:e.eventTime}),e instanceof Ki.AudioStreamNodeAttachingEvent&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicStartTime=e.eventTime),e instanceof Ki.AudioStreamNodeAttachedEvent&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicStartTime=e.eventTime),e instanceof Ki.AudioSourceErrorEvent&&e.audioSourceId===this.privAudioSourceId&&(this.privMicMetric||(this.privMicMetric={End:e.eventTime,Error:e.error,Name:"Microphone",Start:this.privMicStartTime})),e instanceof Ki.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 Ki.AudioStreamNodeDetachedEvent&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicMetric||(this.privMicMetric={End:e.eventTime,Name:"Microphone",Start:this.privMicStartTime})),e instanceof eS.ConnectingToServiceEvent&&e.requestId===this.privRequestId&&(this.privConnectionId=e.sessionId),e instanceof Ki.ConnectionStartEvent&&e.connectionId===this.privConnectionId&&(this.privConnectionStartTime=e.eventTime),e instanceof Ki.ConnectionEstablishedEvent&&e.connectionId===this.privConnectionId&&(this.privConnectionEstablishMetric||(this.privConnectionEstablishMetric={End:e.eventTime,Id:this.privConnectionId,Name:"Connection",Start:this.privConnectionStartTime})),e instanceof Ki.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 Ki.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},r=JSON.stringify(i);return this.privReceivedMessages={},this.privListeningTriggerMetric=null,this.privMicMetric=null,this.privConnectionEstablishMetric=null,this.privPhraseLatencies=[],this.privHypothesisLatencies=[],r}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()}}}Dc.ServiceTelemetryListener=C4,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.RequestSession=void 0;const yn=Ee(),yc=dc,I4=Dc;class p4{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,yn.createNoDashGuid)(),this.privAudioNodeId=(0,yn.createNoDashGuid)(),this.privTurnDeferral=new yn.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 I4.ServiceTelemetryListener(this.privRequestId,this.privAudioSourceId,this.privAudioNodeId),this.onEvent(new yc.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 yc.ListeningStartedEvent(this.privRequestId,this.privSessionId,this.privAudioSourceId,this.privAudioNodeId))}onPreConnectionStart(e,i){this.privAuthFetchEventId=e,this.privSessionId=i,this.onEvent(new yc.ConnectingToServiceEvent(this.privRequestId,this.privAuthFetchEventId,this.privSessionId))}async onAuthCompleted(e){e&&await this.onComplete()}async onConnectionEstablishCompleted(e,i){if(e===200){this.onEvent(new yc.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,yn.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 yn.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),yn.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())}}Qc.RequestSession=p4;var Tc={},tS={};(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={}))})(tS),Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.SpeechContext=void 0;const d4=qt,Er=tS;class S4{constructor(e){this.privContext={},this.privDynamicGrammar=e}getContext(){return this.privContext}setPronunciationAssessmentParams(e,i,r=!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)||{},r&&(this.privContext.phraseDetection.mode=d4.RecognitionMode.Conversation),this.setWordLevelTimings(),this.privContext.phraseOutput.detailed.options.push(Er.PhraseOption.PronunciationAssessment),this.privContext.phraseOutput.detailed.options.indexOf(Er.PhraseOption.SNR)===-1&&this.privContext.phraseOutput.detailed.options.push(Er.PhraseOption.SNR),i&&(this.privContext.phraseDetection.enrichment.contentAssessment={topic:i},this.privContext.phraseOutput.detailed.options.push(Er.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=Er.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=Er.OutputFormat.Detailed,this.privContext.phraseOutput.detailed.options.indexOf(Er.PhraseOption.WordTimings)===-1&&this.privContext.phraseOutput.detailed.options.push(Er.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)}}Tc.SpeechContext=S4;var Lc={},iS={};(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={}))})(iS),Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.DynamicGrammarBuilder=void 0;const M4=iS;class B4{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(r=>{i.push({text:r})}),e.groups=[{type:M4.GroupType.Generic,items:i}]}return e}}Lc.DynamicGrammarBuilder=B4;var oA={},Uc={},Oc={},Wl={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDataStreamType=t.ActivityPayloadResponse=void 0;class e{constructor(r){this.privActivityResponse=JSON.parse(r)}static fromJSON(r){return new e(r)}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={}))})(Wl),Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.DialogServiceTurnState=void 0;const v4=lr,R4=Bt,w4=Wl;class m4{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===w4.MessageDataStreamType.TextToSpeechAudio&&(this.privAudioStream=R4.AudioOutputStream.createPullStream(),this.privAudioStream.format=i!==void 0?i:v4.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)}}Oc.DialogServiceTurnState=m4,Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.DialogServiceTurnStateManager=void 0;const rS=dt,f4=Oc;class Q4{constructor(){this.privTurnMap=new Map}StartTurn(e){if(this.privTurnMap.has(e))throw new rS.InvalidOperationError("Service error: There is already a turn with id:"+e);const i=new f4.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 rS.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}}Uc.DialogServiceTurnStateManager=Q4;var nS={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InvocationSource=void 0,function(e){e.None="None",e.VoiceActivationWithKeyword="VoiceActivationWithKeyword"}(t.InvocationSource||(t.InvocationSource={}))})(nS);var oS={};(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={}))})(oS);var sS;function D4(){if(sS)return oA;sS=1,Object.defineProperty(oA,"__esModule",{value:!0}),oA.DialogServiceAdapter=void 0;const t=lt(),e=Tr,i=Ee(),r=lr,s=V(),o=Uc,A=ne(),n=Wl,a=nS,c=oS,u=Oi;let l=class extends A.ServiceRecognizerBase{constructor(E,C,p,S,I){super(E,C,p,S,I),this.privEvents=new i.EventSource,this.privDialogServiceConnector=I,this.receiveMessageOverride=()=>this.receiveDialogMessageOverride(),this.privTurnStateManager=new o.DialogServiceTurnStateManager,this.recognizeOverride=(d,M,B)=>this.listenOnce(d,M,B),this.postConnectImplOverride=d=>this.dialogConnectImpl(d),this.configConnectionOverride=d=>this.configConnection(d),this.disconnectOverride=()=>this.privDisconnect(),this.privDialogAudioSource=p,this.agentConfigSent=!1,this.privLastResult=null,this.connectionEvents.attach(d=>{d.name==="ConnectionClosedEvent"&&(this.terminateMessageLoop=!0)})}async sendMessage(E){const C=(0,i.createGuid)(),p=(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",p,"application/json",I))}async privDisconnect(){await this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,s.CancellationReason.Error,s.CancellationErrorCode.NoError,"Disconnecting"),this.terminateMessageLoop=!0,this.agentConfigSent=!1}processTypeSpecificMessages(E){const C=new s.PropertyCollection;E.messageType===i.MessageType.Text&&C.setProperty(s.PropertyId.SpeechServiceResponse_JsonResult,E.textBody);let p,S;switch(E.path.toLowerCase()){case"speech.phrase":const d=A.SimpleSpeechPhrase.fromJSON(E.textBody,this.privRequestSession.currentTurnAudioOffset);if(this.privRequestSession.onPhraseRecognized(d.Offset+d.Duration),d.RecognitionStatus!==A.RecognitionStatus.TooManyRequests&&d.RecognitionStatus!==A.RecognitionStatus.Error){const U=this.fireEventForResult(d,C);if(this.privLastResult=U.result,this.privDialogServiceConnector.recognized)try{this.privDialogServiceConnector.recognized(this.privDialogServiceConnector,U)}catch{}}S=!0;break;case"speech.hypothesis":const M=A.SpeechHypothesis.fromJSON(E.textBody,this.privRequestSession.currentTurnAudioOffset);p=new s.SpeechRecognitionResult(this.privRequestSession.requestId,s.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 s.SpeechRecognitionEventArgs(p,M.Offset,this.privRequestSession.sessionId);if(this.privDialogServiceConnector.recognizing)try{this.privDialogServiceConnector.recognizing(this.privDialogServiceConnector,B)}catch{}S=!0;break;case"speech.keyword":const y=A.SpeechKeyword.fromJSON(E.textBody,this.privRequestSession.currentTurnAudioOffset);p=new s.SpeechRecognitionResult(this.privRequestSession.requestId,y.Status==="Accepted"?s.ResultReason.RecognizedKeyword:s.ResultReason.NoMatch,y.Text,y.Duration,y.Offset,void 0,void 0,void 0,void 0,y.asJson(),C),y.Status!=="Accepted"&&(this.privLastResult=p);const L=new s.SpeechRecognitionEventArgs(p,p.duration,p.resultId);if(this.privDialogServiceConnector.recognized)try{this.privDialogServiceConnector.recognized(this.privDialogServiceConnector,L)}catch{}S=!0;break;case"audio":{const U=E.requestId.toUpperCase(),D=this.privTurnStateManager.GetTurn(U);try{E.binaryBody?D.audioStream.write(E.binaryBody):D.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,p,S,I){if(this.terminateMessageLoop=!0,this.privRequestSession.isRecognizing&&await this.privRequestSession.onStopRecognizing(),this.privDialogServiceConnector.canceled){const d=new s.PropertyCollection;d.setProperty(A.CancellationErrorCodePropertyName,s.CancellationErrorCode[S]);const M=new s.SpeechRecognitionCanceledEventArgs(p,I,S,void 0,E);try{this.privDialogServiceConnector.canceled(this.privDialogServiceConnector,M)}catch{}if(this.privSuccessCallback){const B=new s.SpeechRecognitionResult(void 0,s.ResultReason.Canceled,void 0,void 0,void 0,void 0,void 0,void 0,I,void 0,d);try{this.privSuccessCallback(B),this.privSuccessCallback=void 0}catch{}}}}async listenOnce(E,C,p){this.privRecognizerConfig.recognitionMode=E,this.privSuccessCallback=C,this.privErrorCallback=p,this.privRequestSession.startNewRecognition(),this.privRequestSession.listenForServiceTelemetry(this.privDialogAudioSource.events),this.privRecognizerConfig.parameters.setProperty(s.PropertyId.Speech_SessionId,this.privRequestSession.sessionId);const S=this.connectImpl(),I=this.sendPreAudioMessages(),d=await this.privDialogAudioSource.attach(this.privRequestSession.audioNodeId),M=await this.privDialogAudioSource.format,B=await this.privDialogAudioSource.deviceInfo,y=new t.ReplayableAudioNode(d,M.avgBytesPerSec);await this.privRequestSession.onAudioSourceAttachCompleted(y,!1),this.privRecognizerConfig.SpeechServiceConfig.Context.audio={source:B};try{await S,await I}catch(D){return await this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,s.CancellationReason.Error,s.CancellationErrorCode.ConnectionFailure,D),Promise.resolve()}const L=new s.SessionEventArgs(this.privRequestSession.sessionId);this.privRecognizer.sessionStarted&&this.privRecognizer.sessionStarted(this.privRecognizer,L),this.sendAudio(y).then(()=>{},async D=>{await this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,s.CancellationReason.Error,s.CancellationErrorCode.RuntimeError,D)})}dialogConnectImpl(E){return this.privConnectionLoop=this.startMessageLoop(),E}receiveDialogMessageOverride(){const E=new i.Deferred,C=async()=>{try{const p=this.isDisposed(),S=!this.isDisposed()&&this.terminateMessageLoop;if(p||S){E.resolve(void 0);return}const d=await(await this.fetchConnection()).read();if(!d)return C();const M=u.SpeechConnectionMessage.fromConnectionMessage(d);switch(M.path.toLowerCase()){case"turn.start":{const Y=M.requestId.toUpperCase(),O=this.privRequestSession.requestId.toUpperCase();Y!==O?this.privTurnStateManager.StartTurn(Y):this.privRequestSession.onServiceTurnStartResponse()}break;case"speech.startdetected":const y=A.SpeechDetected.fromJSON(M.textBody,this.privRequestSession.currentTurnAudioOffset),L=new s.RecognitionEventArgs(y.Offset,this.privRequestSession.sessionId);this.privRecognizer.speechStartDetected&&this.privRecognizer.speechStartDetected(this.privRecognizer,L);break;case"speech.enddetected":let U;M.textBody.length>0?U=M.textBody:U="{ Offset: 0 }";const D=A.SpeechDetected.fromJSON(U,this.privRequestSession.currentTurnAudioOffset);this.privRequestSession.onServiceRecognized(D.Offset);const k=new s.RecognitionEventArgs(D.Offset,this.privRequestSession.sessionId);this.privRecognizer.speechEndDetected&&this.privRecognizer.speechEndDetected(this.privRecognizer,k);break;case"turn.end":{const Y=M.requestId.toUpperCase(),O=this.privRequestSession.requestId.toUpperCase();if(Y!==O)this.privTurnStateManager.CompleteTurn(Y);else{const N=new s.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,N),this.privSuccessCallback&&this.privLastResult){try{this.privSuccessCallback(this.privLastResult),this.privLastResult=null}catch(ie){this.privErrorCallback&&this.privErrorCallback(ie)}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(p=>{i.Events.instance.onEvent(new i.BackgroundEvent(p))}),E.promise}async startMessageLoop(){this.terminateMessageLoop=!1;try{await this.receiveDialogMessageOverride()}catch(E){await this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,s.CancellationReason.Error,s.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(s.PropertyId.Conversation_DialogType)===s.DialogServiceConfig.DialogTypes.CustomCommands){const p=this.agentConfig.get();p.botInfo.commandsCulture=this.privRecognizerConfig.parameters.getProperty(s.PropertyId.SpeechServiceConnection_RecoLanguage,"en-us"),this.agentConfig.set(p)}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)(),p=this.privDialogServiceConnector.properties.getProperty(s.PropertyId.Conversation_Speech_Activity_Template),I=JSON.stringify({channelData:"",context:{interactionId:C},messagePayload:typeof p===void 0?void 0:p,version:.5});return E.send(new u.SpeechConnectionMessage(i.MessageType.Text,"speech.agent.context",this.privRequestSession.requestId,"application/json",I))}fireEventForResult(E,C){const p=A.EnumTranslation.implTranslateRecognitionResult(E.RecognitionStatus),S=new s.SpeechRecognitionResult(this.privRequestSession.requestId,p,E.DisplayText,E.Duration,E.Offset,E.Language,E.LanguageDetectionConfidence,void 0,void 0,E.asJson(),C);return new s.SpeechRecognitionEventArgs(S,E.Offset,this.privRequestSession.sessionId)}handleResponseMessage(E){const C=JSON.parse(E.textBody);switch(C.messageType.toLowerCase()){case"message":const p=E.requestId.toUpperCase(),S=n.ActivityPayloadResponse.fromJSON(E.textBody),I=this.privTurnStateManager.GetTurn(p);if(S.conversationId){const B=this.agentConfig.get();B.botInfo.conversationId=S.conversationId,this.agentConfig.set(B)}const d=I.processActivityPayload(S,r.AudioOutputFormatImpl.fromSpeechSynthesisOutputFormatString(this.privDialogServiceConnector.properties.getProperty(s.PropertyId.SpeechServiceConnection_SynthOutputFormat,void 0))),M=new s.ActivityReceivedEventArgs(S.messagePayload,d);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 s.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"),p=this.privRecognizerConfig.parameters.getProperty("SPEECH-KeywordsToDetect-Durations"),S=E.split(";"),I=C===void 0?[]:C.split(";"),d=p===void 0?[]:p.split(";"),M=[];for(let B=0;B<S.length;B++){const y={text:S[B]};B<I.length&&(y.startOffset=Number(I[B])),B<d.length&&(y.duration=Number(d[B])),M.push(y)}this.speechContext.getContext().invocationSource=a.InvocationSource.VoiceActivationWithKeyword,this.speechContext.getContext().keywordDetection=[{clientDetectedKeywords:M,onReject:{action:c.OnRejectAction.EndOfTurn},type:c.KeywordDetectionType.StartTrigger}]}};return oA.DialogServiceAdapter=l,oA}var Nc={};Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.AgentConfig=void 0;class y4{toJsonString(){return JSON.stringify(this.iPrivConfig)}get(){return this.iPrivConfig}set(e){this.iPrivConfig=e}}Nc.AgentConfig=y4;var Zl={},sA={},Tn={};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.ConversationConnectionConfig=void 0;const T4=zs;class Ut extends T4.RestConfigBase{static get host(){return Ut.privHost}static get apiVersion(){return Ut.privApiVersion}static get clientAppId(){return Ut.privClientAppId}static get defaultLanguageCode(){return Ut.privDefaultLanguageCode}static get restPath(){return Ut.privRestPath}static get webSocketPath(){return Ut.privWebSocketPath}static get transcriptionEventKeys(){return Ut.privTranscriptionEventKeys}}Tn.ConversationConnectionConfig=Ut,Ut.privHost="dev.microsofttranslator.com",Ut.privRestPath="/capito/room",Ut.privApiVersion="2.0",Ut.privDefaultLanguageCode="en-US",Ut.privClientAppId="FC539C22-1767-4F1F-84BC-B4D811114F15",Ut.privWebSocketPath="/capito/translate",Ut.privTranscriptionEventKeys=["iCalUid","callId","organizer","FLAC","MTUri","DifferentiateGuestSpeakers","audiorecording","Threadid","OrganizerMri","OrganizerTenantId","UserToken"];var AS;function L4(){if(AS)return sA;AS=1,Object.defineProperty(sA,"__esModule",{value:!0}),sA.ConversationManager=void 0;const t=lt(),e=Ie,i=V(),r=Tn;let s=class{constructor(){this.privRequestParams=r.ConversationConnectionConfig.configParams,this.privErrors=r.ConversationConnectionConfig.restErrors,this.privHost=r.ConversationConnectionConfig.host,this.privApiVersion=r.ConversationConnectionConfig.apiVersion,this.privRestPath=r.ConversationConnectionConfig.restPath,this.privRestAdapter=new t.RestMessageAdapter({})}createOrJoin(A,n,a,c){try{e.Contracts.throwIfNullOrUndefined(A,"args");const u=A.getProperty(i.PropertyId.SpeechServiceConnection_RecoLanguage,r.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),p=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 d={};E&&(d[this.privRequestParams.correlationId]=E),d[this.privRequestParams.clientAppId]=r.ConversationConnectionConfig.clientAppId,n!==void 0?I[this.privRequestParams.roomId]=n:(e.Contracts.throwIfNullOrUndefined(p,this.privErrors.authInvalidSubscriptionRegion),d[this.privRequestParams.subscriptionRegion]=p,C?d[this.privRequestParams.subscriptionKey]=C:S?d[this.privRequestParams.authorization]=`Bearer ${S}`:e.Contracts.throwIfNullOrUndefined(C,this.privErrors.authInvalidSubscriptionKey));const M={};M.headers=d,this.privRestAdapter.options=M;const B=`https://${g}${this.privRestPath}`;this.privRestAdapter.request(t.RestRequestType.Post,B,I,null).then(y=>{const L=t.RestMessageAdapter.extractHeaderValue(this.privRequestParams.requestId,y.headers);if(!y.ok){if(c){let D=this.privErrors.invalidCreateJoinConversationResponse.replace("{status}",y.status.toString()),k;try{k=JSON.parse(y.data),D+=` [${k.error.code}: ${k.error.message}]`}catch{D+=` [${y.data}]`}L&&(D+=` ${L}`),c(D)}return}const U=JSON.parse(y.data);if(U&&(U.requestId=L),a){try{a(U)}catch(D){c&&c(D)}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,n){return new Promise((a,c)=>{try{e.Contracts.throwIfNullOrUndefined(A,this.privErrors.invalidArgs.replace("{arg}","config")),e.Contracts.throwIfNullOrWhitespace(n,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]=n;const E={};l&&(E[this.privRequestParams.correlationId]=l);const C={};C.headers=E,this.privRestAdapter.options=C;const p=`https://${u}${this.privRestPath}`;this.privRestAdapter.request(t.RestRequestType.Delete,p,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 sA.ConversationManager=s,sA}var qr={},AA={},Kc={},aA={};Object.defineProperty(aA,"__esModule",{value:!0}),aA.ConversationConnectionMessage=void 0;const U4=Ee();class O4 extends U4.ConnectionMessage{constructor(e,i,r,s){super(e,i,r,s);const o=JSON.parse(this.textBody);o.type!==void 0&&(this.privConversationMessageType=o.type)}get conversationMessageType(){return this.privConversationMessageType}}aA.ConversationConnectionMessage=O4,Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.ConversationWebsocketMessageFormatter=void 0;const Jr=Ee(),aS=aA;class N4{toConnectionMessage(e){const i=new Jr.Deferred;try{if(e.messageType===Jr.MessageType.Text){const r=new aS.ConversationConnectionMessage(e.messageType,e.textContent,{},e.id);i.resolve(r)}else e.messageType===Jr.MessageType.Binary&&i.resolve(new aS.ConversationConnectionMessage(e.messageType,e.binaryContent,void 0,e.id))}catch(r){i.reject(`Error formatting the message. Error: ${r}`)}return i.promise}fromConnectionMessage(e){const i=new Jr.Deferred;try{if(e.messageType===Jr.MessageType.Text){const r=`${e.textBody?e.textBody:""}`;i.resolve(new Jr.RawWebsocketMessage(Jr.MessageType.Text,r,e.id))}}catch(r){i.reject(`Error formatting the message. ${r}`)}return i.promise}}Kc.ConversationWebsocketMessageFormatter=N4;var cS;function K4(){if(cS)return AA;cS=1,Object.defineProperty(AA,"__esModule",{value:!0}),AA.ConversationConnectionFactory=void 0;const t=lt(),e=Ee(),i=Ie,r=V(),s=ui(),o=Tn,A=Kc;let n=class extends s.ConnectionFactoryBase{create(c,u,l){const g=c.parameters.getProperty(r.PropertyId.ConversationTranslator_Host,o.ConversationConnectionConfig.host),E=c.parameters.getProperty(r.PropertyId.ConversationTranslator_CorrelationId,(0,e.createGuid)()),C=`wss://${g}${o.ConversationConnectionConfig.webSocketPath}`,p=c.parameters.getProperty(r.PropertyId.ConversationTranslator_Token,void 0);i.Contracts.throwIfNullOrUndefined(p,"token");const S={};S[o.ConversationConnectionConfig.configParams.apiVersion]=o.ConversationConnectionConfig.apiVersion,S[o.ConversationConnectionConfig.configParams.token]=p,S[o.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 AA.ConversationConnectionFactory=n,AA}var cA={},Fc={};Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.ConversationRequestSession=void 0;const Xl=Ee();class F4{constructor(e){this.privIsDisposed=!1,this.privDetachables=new Array,this.privSessionId=e,this.privRequestId=(0,Xl.createNoDashGuid)(),this.privRequestCompletionDeferral=new Xl.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,Xl.createNoDashGuid)():this.onComplete()}async dispose(){if(!this.privIsDisposed){this.privIsDisposed=!0;for(const e of this.privDetachables)await e.detach()}}onComplete(){}}Fc.ConversationRequestSession=F4;var Kt={},uS;function lS(){if(uS)return Kt;uS=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 r extends t.SessionEventArgs{constructor(a,c){super(c),this.privParticipant=a}get participant(){return this.privParticipant}}Kt.ParticipantEventArgs=r;class s 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=s;class o extends t.SessionEventArgs{constructor(a,c,u,l,g,E,C,p,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=p}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=o;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 Fi={};Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.ConversationTranslatorCommandTypes=Fi.ConversationTranslatorMessageTypes=Fi.InternalParticipants=void 0;class G4{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)}}Fi.InternalParticipants=G4,Fi.ConversationTranslatorMessageTypes={command:"command",final:"final",info:"info",instantMessage:"instant_message",keepAlive:"keep_alive",partial:"partial",participantCommand:"participant_command",translatedMessage:"translated_message"},Fi.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 gS={},Gc={};Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.CommandResponsePayload=void 0;const k4=t=>JSON.parse(t);class _l{constructor(e){this.privCommandResponse=k4(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 _l(e)}}Gc.CommandResponsePayload=_l;var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.ParticipantPayloadResponse=Ln.ParticipantsListPayloadResponse=void 0;const j4=t=>JSON.parse(t),x4=t=>JSON.parse(t);class $l{constructor(e){this.privParticipantsPayloadResponse=j4(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 $l(e)}}Ln.ParticipantsListPayloadResponse=$l;class eg{constructor(e){this.privParticipantPayloadResponse=x4(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 eg(e)}}Ln.ParticipantPayloadResponse=eg;var Un={};Object.defineProperty(Un,"__esModule",{value:!0}),Un.TextResponsePayload=Un.SpeechResponsePayload=void 0;const Y4=t=>JSON.parse(t),z4=t=>JSON.parse(t);class tg{constructor(e){this.privSpeechResponse=Y4(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 tg(e)}}Un.SpeechResponsePayload=tg;class ig{constructor(e){this.privTextResponse=z4(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 ig(e)}}Un.TextResponsePayload=ig,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TextResponsePayload=t.SpeechResponsePayload=t.ParticipantPayloadResponse=t.ParticipantsListPayloadResponse=t.CommandResponsePayload=void 0;var e=Gc;Object.defineProperty(t,"CommandResponsePayload",{enumerable:!0,get:function(){return e.CommandResponsePayload}});var i=Ln;Object.defineProperty(t,"ParticipantsListPayloadResponse",{enumerable:!0,get:function(){return i.ParticipantsListPayloadResponse}}),Object.defineProperty(t,"ParticipantPayloadResponse",{enumerable:!0,get:function(){return i.ParticipantPayloadResponse}});var r=Un;Object.defineProperty(t,"SpeechResponsePayload",{enumerable:!0,get:function(){return r.SpeechResponsePayload}}),Object.defineProperty(t,"TextResponsePayload",{enumerable:!0,get:function(){return r.TextResponsePayload}})}(gS);var ES;function b4(){if(ES)return cA;ES=1,Object.defineProperty(cA,"__esModule",{value:!0}),cA.ConversationServiceAdapter=void 0;const t=Ee(),e=V(),i=ne(),r=aA,s=Fc,o=lS(),A=Fi,n=gS;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=p=>this.conversationConnectImpl(p),this.configConnectionOverride=()=>this.configConnection(),this.disconnectOverride=()=>this.privDisconnect(),this.privConversationRequestSession=new s.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 r.ConversationConnectionMessage(t.MessageType.Text,u))}async sendMessageAsync(u){await(await this.fetchConnection()).send(new r.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 p=new e.ConversationTranslationCanceledEventArgs(g,C,E,void 0,u);try{this.privConversationServiceConnector.canceled&&this.privConversationServiceConnector.canceled(this.privConversationServiceConnector,p)}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 p=!1;try{switch(C){case"info":case"participant_command":case"command":const S=n.CommandResponsePayload.fromJSON(g.textBody);switch(S.command.toLowerCase()){case"participantlist":const L=n.ParticipantsListPayloadResponse.fromJSON(g.textBody),U=L.participants.map(ie=>({avatar:ie.avatar,displayName:ie.nickname,id:ie.participantId,isHost:ie.ishost,isMuted:ie.ismuted,isUsingTts:ie.usetts,preferredLanguage:ie.locale}));this.privConversationServiceConnector.participantsListReceived&&this.privConversationServiceConnector.participantsListReceived(this.privConversationServiceConnector,new o.ParticipantsListEventArgs(L.roomid,L.token,L.translateTo,L.profanityFilter,L.roomProfanityFilter,L.roomLocked,L.muteAll,U,E));break;case"settranslatetolanguages":this.privConversationServiceConnector.participantUpdateCommandReceived&&this.privConversationServiceConnector.participantUpdateCommandReceived(this.privConversationServiceConnector,new o.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.setTranslateToLanguages,S.value,E));break;case"setprofanityfiltering":this.privConversationServiceConnector.participantUpdateCommandReceived&&this.privConversationServiceConnector.participantUpdateCommandReceived(this.privConversationServiceConnector,new o.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.setProfanityFiltering,S.value,E));break;case"setmute":this.privConversationServiceConnector.participantUpdateCommandReceived&&this.privConversationServiceConnector.participantUpdateCommandReceived(this.privConversationServiceConnector,new o.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.setMute,S.value,E));break;case"setmuteall":this.privConversationServiceConnector.muteAllCommandReceived&&this.privConversationServiceConnector.muteAllCommandReceived(this.privConversationServiceConnector,new o.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 o.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.setUseTTS,S.value,E));break;case"setlockstate":this.privConversationServiceConnector.lockRoomCommandReceived&&this.privConversationServiceConnector.lockRoomCommandReceived(this.privConversationServiceConnector,new o.LockRoomEventArgs(S.value,E));break;case"changenickname":this.privConversationServiceConnector.participantUpdateCommandReceived&&this.privConversationServiceConnector.participantUpdateCommandReceived(this.privConversationServiceConnector,new o.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.changeNickname,S.value,E));break;case"joinsession":const D=n.ParticipantPayloadResponse.fromJSON(g.textBody),k={avatar:D.avatar,displayName:D.nickname,id:D.participantId,isHost:D.ishost,isMuted:D.ismuted,isUsingTts:D.usetts,preferredLanguage:D.locale};this.privConversationServiceConnector.participantJoinCommandReceived&&this.privConversationServiceConnector.participantJoinCommandReceived(this.privConversationServiceConnector,new o.ParticipantEventArgs(k,E));break;case"leavesession":const Y={id:S.participantId};this.privConversationServiceConnector.participantLeaveCommandReceived&&this.privConversationServiceConnector.participantLeaveCommandReceived(this.privConversationServiceConnector,new o.ParticipantEventArgs(Y,E));break;case"disconnectsession":const O={id:S.participantId};break;case"token":const N=new i.CognitiveTokenAuthentication(()=>{const ie=S.token;return Promise.resolve(ie)},()=>{const ie=S.token;return Promise.resolve(ie)});this.authentication=N,this.privConversationServiceConnector.onToken(N);break;default:break}break;case"partial":case"final":const I=n.SpeechResponsePayload.fromJSON(g.textBody),d=C==="final"?e.ResultReason.TranslatedParticipantSpeech:e.ResultReason.TranslatingParticipantSpeech,M=new e.ConversationTranslationResult(I.participantId,this.getTranslations(I.translations),I.language,I.id,d,I.recognition,void 0,void 0,g.textBody,void 0);I.isFinal?((M.text!==void 0&&M.text.length>0||I.id===this.privLastPartialUtteranceId)&&(p=!0),p&&this.privConversationServiceConnector.translationReceived&&this.privConversationServiceConnector.translationReceived(this.privConversationServiceConnector,new o.ConversationReceivedTranslationEventArgs(A.ConversationTranslatorMessageTypes.final,M,E))):M.text!==void 0&&(this.privLastPartialUtteranceId=I.id,this.privConversationServiceConnector.translationReceived&&this.privConversationServiceConnector.translationReceived(this.privConversationServiceConnector,new o.ConversationReceivedTranslationEventArgs(A.ConversationTranslatorMessageTypes.partial,M,E)));break;case"translated_message":const B=n.TextResponsePayload.fromJSON(g.textBody),y=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 o.ConversationReceivedTranslationEventArgs(A.ConversationTranslatorMessageTypes.instantMessage,y,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 cA.ConversationServiceAdapter=a,cA}var hS;function P4(){if(hS)return qr;hS=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.ConversationTranslatorRecognizer=qr.ConversationRecognizerFactory=void 0;const t=ne(),e=Ee(),i=Ie,r=V(),s=K4(),o=b4();class A{static fromConfig(c,u,l){return new n(c,u,l)}}qr.ConversationRecognizerFactory=A;let n=class extends r.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 s.ConversationConnectionFactory),this.privConversation=E,this.privIsDisposed=!1,this.privProperties=g.properties.clone(),this.privConnection=r.Connection.fromRecognizer(this),this.privProperties.getProperty(r.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 o.ConversationServiceAdapter(c,u,E,g,this)}sendMessage(c,u,l){const g=this.privReco;((C,p,S)=>{C!==void 0?C.then(()=>{try{p&&p()}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 qr.ConversationTranslatorRecognizer=n,qr}var uA={},CS;function q4(){if(CS)return uA;CS=1,Object.defineProperty(uA,"__esModule",{value:!0}),uA.TranscriberRecognizer=void 0;const t=Ee(),e=Ie,i=V(),r=ne(),s=qt;let o=class extends i.Recognizer{constructor(n,a){const c=n;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 r.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(n){e.Contracts.throwIfNullOrWhitespace(n,"token"),this.properties.setProperty(i.PropertyId.SpeechServiceAuthorization_Token,n)}set conversation(n){e.Contracts.throwIfNullOrUndefined(n,"Conversation"),this.isMeetingRecognizer=!1,this.privConversation=n}getConversationInfo(){return e.Contracts.throwIfNullOrUndefined(this.privConversation,"Conversation"),this.privConversation.conversationInfo}set meeting(n){e.Contracts.throwIfNullOrUndefined(n,"Meeting"),this.isMeetingRecognizer=!0,this.privMeeting=n}getMeetingInfo(){return e.Contracts.throwIfNullOrUndefined(this.privMeeting,"Meeting"),this.privMeeting.meetingInfo}IsMeetingRecognizer(){return this.isMeetingRecognizer}startContinuousRecognitionAsync(n,a){(0,t.marshalPromiseToCallbacks)(this.startContinuousRecognitionAsyncImpl(s.RecognitionMode.Conversation),n,a)}stopContinuousRecognitionAsync(n,a){(0,t.marshalPromiseToCallbacks)(this.stopContinuousRecognitionAsyncImpl(),n,a)}async close(){this.privDisposedRecognizer||await this.dispose(!0)}async pushConversationEvent(n,a){const c=this.privReco;e.Contracts.throwIfNullOrUndefined(c,"serviceRecognizer"),await c.sendSpeechEventAsync(n,a)}async pushMeetingEvent(n,a){const c=this.privReco;e.Contracts.throwIfNullOrUndefined(c,"serviceRecognizer"),await c.sendMeetingSpeechEventAsync(n,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(n){this.isMeetingRecognizer=!0,this.canceled=(a,c)=>{n.canceled&&n.canceled(n,c)},this.recognizing=(a,c)=>{n.transcribing&&n.transcribing(n,c)},this.recognized=(a,c)=>{n.transcribed&&n.transcribed(n,c)},this.sessionStarted=(a,c)=>{n.sessionStarted&&n.sessionStarted(n,c)},this.sessionStopped=(a,c)=>{n.sessionStopped&&n.sessionStopped(n,c)}}disconnectCallbacks(){this.canceled=void 0,this.recognizing=void 0,this.recognized=void 0,this.sessionStarted=void 0,this.sessionStopped=void 0}async dispose(n){this.privDisposedRecognizer||(n&&(this.privDisposedRecognizer=!0,await this.implRecognizerStop()),await super.dispose(n))}createRecognizerConfig(n){return new r.RecognizerConfig(n,this.properties)}createServiceRecognizer(n,a,c,u){const l=c;return new r.TranscriptionServiceRecognizer(n,a,l,u,this)}};return uA.TranscriberRecognizer=o,uA}var IS;function J4(){return IS||(IS=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=L4();Object.defineProperty(t,"ConversationManager",{enumerable:!0,get:function(){return e.ConversationManager}});var i=Tn;Object.defineProperty(t,"ConversationConnectionConfig",{enumerable:!0,get:function(){return i.ConversationConnectionConfig}});var r=P4();Object.defineProperty(t,"ConversationRecognizerFactory",{enumerable:!0,get:function(){return r.ConversationRecognizerFactory}});var s=q4();Object.defineProperty(t,"TranscriberRecognizer",{enumerable:!0,get:function(){return s.TranscriberRecognizer}});var o=lS();Object.defineProperty(t,"ConversationReceivedTranslationEventArgs",{enumerable:!0,get:function(){return o.ConversationReceivedTranslationEventArgs}}),Object.defineProperty(t,"LockRoomEventArgs",{enumerable:!0,get:function(){return o.LockRoomEventArgs}}),Object.defineProperty(t,"MuteAllEventArgs",{enumerable:!0,get:function(){return o.MuteAllEventArgs}}),Object.defineProperty(t,"ParticipantAttributeEventArgs",{enumerable:!0,get:function(){return o.ParticipantAttributeEventArgs}}),Object.defineProperty(t,"ParticipantEventArgs",{enumerable:!0,get:function(){return o.ParticipantEventArgs}}),Object.defineProperty(t,"ParticipantsListEventArgs",{enumerable:!0,get:function(){return o.ParticipantsListEventArgs}});var A=Fi;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}})}(Zl)),Zl}var rg={};(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(r){this.privSynthesisAudioMetadata=JSON.parse(r)}static fromJSON(r){return new e(r)}get Metadata(){return this.privSynthesisAudioMetadata.Metadata}}t.SynthesisAudioMetadata=e})(rg);var lA={},di={};Object.defineProperty(di,"__esModule",{value:!0}),di.SynthesisStartedEvent=di.ConnectingToSynthesisServiceEvent=di.SynthesisTriggeredEvent=di.SpeechSynthesisEvent=void 0;const pS=Ee();class kc extends pS.PlatformEvent{constructor(e,i,r=pS.EventType.Info){super(e,r),this.privRequestId=i}get requestId(){return this.privRequestId}}di.SpeechSynthesisEvent=kc;class V4 extends kc{constructor(e,i,r){super("SynthesisTriggeredEvent",e),this.privSessionAudioDestinationId=i,this.privTurnAudioDestinationId=r}get audioSessionDestinationId(){return this.privSessionAudioDestinationId}get audioTurnDestinationId(){return this.privTurnAudioDestinationId}}di.SynthesisTriggeredEvent=V4;class H4 extends kc{constructor(e,i){super("ConnectingToSynthesisServiceEvent",e),this.privAuthFetchEventId=i}get authFetchEventId(){return this.privAuthFetchEventId}}di.ConnectingToSynthesisServiceEvent=H4;class W4 extends kc{constructor(e,i){super("SynthesisStartedEvent",e),this.privAuthFetchEventId=i}get authFetchEventId(){return this.privAuthFetchEventId}}di.SynthesisStartedEvent=W4;var dS;function Z4(){if(dS)return lA;dS=1,Object.defineProperty(lA,"__esModule",{value:!0}),lA.SynthesisTurn=void 0;const t=Ee(),e=Bt,i=V(),r=rg,s=di;let o=class mg{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(n){this.privStreamId=n}get audioOutputFormat(){return this.privAudioOutputFormat}set audioOutputFormat(n){this.privAudioOutputFormat=n}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 n=new i.PropertyCollection;return n.setProperty(i.PropertyId.TalkingAvatarService_WebRTC_SDP,this.privWebRTCSDP),n}}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 n=await this.getAllReceivedAudio();return this.privReceivedAudioWithHeader=this.audioOutputFormat.addHeader(n),this.privReceivedAudioWithHeader}else return this.getAllReceivedAudio()}startNewSynthesis(n,a,c,u){this.privIsSynthesisEnded=!1,this.privIsSynthesizing=!0,this.privRequestId=n,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 s.SynthesisTriggeredEvent(this.requestId,void 0,u===void 0?void 0:u.id()))}onPreConnectionStart(n){this.privAuthFetchEventId=n,this.onEvent(new s.ConnectingToSynthesisServiceEvent(this.privRequestId,this.privAuthFetchEventId))}onAuthCompleted(n){n&&this.onComplete()}onConnectionEstablishCompleted(n){if(n===200){this.onEvent(new s.SynthesisStartedEvent(this.requestId,this.privAuthFetchEventId)),this.privBytesReceived=0;return}else n===403&&this.onComplete()}onServiceResponseMessage(n){const a=JSON.parse(n);this.streamId=a.audio.streamId}onServiceTurnEndResponse(){this.privInTurn=!1,this.privTurnDeferral.resolve(),this.onComplete()}onServiceTurnStartResponse(n){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(n);a.webrtc&&(this.privWebRTCSDP=a.webrtc.connectionString)}onAudioChunkReceived(n){this.isSynthesizing&&(this.privAudioOutputStream.write(n),this.privBytesReceived+=n.byteLength,this.privTurnAudioDestination!==void 0&&this.privTurnAudioDestination.write(n))}onTextBoundaryEvent(n){this.updateTextOffset(n.Data.text.Text,n.Type)}onVisemeMetadataReceived(n){n.Data.AnimationChunk!==void 0&&(this.privPartialVisemeAnimation+=n.Data.AnimationChunk)}onSessionEnd(n){this.privAudioDuration=n.Data.Offset}async constructSynthesisResult(){const n=await this.getAllReceivedAudioWithHeader();return new i.SpeechSynthesisResult(this.requestId,i.ResultReason.SynthesizingAudioCompleted,n,void 0,this.extraProperties,this.audioDuration)}dispose(){this.privIsDisposed||(this.privIsDisposed=!0)}onStopSynthesizing(){this.onComplete()}getAndClearVisemeAnimation(){const n=this.privPartialVisemeAnimation;return this.privPartialVisemeAnimation="",n}onEvent(n){t.Events.instance.onEvent(n)}static isXmlTag(n){return n.length>=2&&n[0]==="<"&&n[n.length-1]===">"}updateTextOffset(n,a){a===r.MetadataType.WordBoundary?(this.privTextOffset=this.privRawText.indexOf(n,this.privNextSearchTextIndex),this.privTextOffset>=0&&(this.privNextSearchTextIndex=this.privTextOffset+n.length,this.privIsSSML&&this.withinXmlTag(this.privTextOffset)&&!mg.isXmlTag(n)&&this.updateTextOffset(n,a))):(this.privSentenceOffset=this.privRawText.indexOf(n,this.privNextSearchSentenceIndex),this.privSentenceOffset>=0&&(this.privNextSearchSentenceIndex=this.privSentenceOffset+n.length,this.privIsSSML&&this.withinXmlTag(this.privSentenceOffset)&&!mg.isXmlTag(n)&&this.updateTextOffset(n,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(n){return this.privRawText.indexOf("<",n+1)>this.privRawText.indexOf(">",n+1)}};return lA.SynthesisTurn=o,lA}var gA={},SS;function X4(){if(SS)return gA;SS=1,Object.defineProperty(gA,"__esModule",{value:!0}),gA.SynthesisAdapterBase=void 0;const t=Ee(),e=V(),i=ne(),r=Oi;let s=class{constructor(A,n,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(!n)throw new t.ArgumentNullError("connectionFactory");if(!a)throw new t.ArgumentNullError("synthesizerConfig");this.privAuthentication=A,this.privConnectionFactory=n,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,n){const a=typeof n=="string"?t.MessageType.Text:t.MessageType.Binary,c=typeof n=="string"?"application/json":"";return(await this.fetchConnection()).send(new r.SpeechConnectionMessage(a,A,this.privSynthesisTurn.requestId,c,n))}async Speak(A,n,a,c,u,l){let g;if(n?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,n,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 r.SpeechConnectionMessage(t.MessageType.Text,"synthesis.control",this.privSynthesisTurn.requestId,"application/json",JSON.stringify({action:"stop"})))}cancelSynthesis(A,n,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,n,a){this.privSynthesisTurn.isSynthesizing&&(this.privSynthesisTurn.onStopSynthesizing(),this.cancelSynthesis(this.privSynthesisTurn.requestId,A,n,a))}processTypeSpecificMessages(A){return!0}async receiveMessage(){try{const n=await(await this.fetchConnection()).read();if(this.receiveMessageOverride!==void 0)return this.receiveMessageOverride();if(this.privIsDisposed)return;if(!n)return this.privSynthesisTurn.isSynthesizing?this.receiveMessage():void 0;const a=r.SpeechConnectionMessage.fromConnectionMessage(n);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 n=this.synthesisContext.toJSON();if(n)return A.send(new r.SpeechConnectionMessage(t.MessageType.Text,"synthesis.context",this.privSynthesisTurn.requestId,"application/json",n))}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 n=A?this.privAuthentication.fetchOnExpiry(this.privAuthFetchEventId):this.privAuthentication.fetch(this.privAuthFetchEventId);return this.privConnectionPromise=n.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
|
-
${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,n){if(n)return A.send(new r.SpeechConnectionMessage(t.MessageType.Text,"speech.config",this.privSynthesisTurn.requestId,"application/json",n))}sendSsmlMessage(A,n,a){return A.send(new r.SpeechConnectionMessage(t.MessageType.Text,"ssml",a,"application/ssml+xml",n))}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 gA.SynthesisAdapterBase=s,s.telemetryDataEnabled=!0,gA}var EA={},MS;function _4(){if(MS)return EA;MS=1,Object.defineProperty(EA,"__esModule",{value:!0}),EA.AvatarSynthesisAdapter=void 0;const t=V(),e=ne();let i=class extends e.SynthesisAdapterBase{constructor(s,o,A,n,a){super(s,o,A,void 0),this.privAvatarSynthesizer=n,this.privSynthesizer=n,this.privAvatarConfig=a}setSynthesisContextSynthesisSection(){this.privSynthesisContext.setSynthesisSection(void 0)}setSpeechConfigSynthesisSection(){var s,o,A,n,a,c,u,l,g,E,C,p,S,I,d,M,B;this.privSynthesizerConfig.synthesisVideoSection={format:{bitrate:(s=this.privAvatarConfig.videoFormat)==null?void 0:s.bitrate,codec:(o=this.privAvatarConfig.videoFormat)==null?void 0:o.codec,crop:{bottomRight:{x:(a=(n=(A=this.privAvatarConfig.videoFormat)==null?void 0:A.cropRange)==null?void 0:n.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=(p=this.privAvatarConfig.videoFormat)==null?void 0:p.cropRange)==null?void 0:S.topLeft)==null?void 0:I.y}},resolution:{height:(d=this.privAvatarConfig.videoFormat)==null?void 0:d.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(s){if(this.privAvatarSynthesizer.avatarEventReceived){const o=new t.AvatarEventArgs(s.Data.Offset,s.Data.Name);try{this.privAvatarSynthesizer.avatarEventReceived(this.privAvatarSynthesizer,o)}catch{}}}};return EA.AvatarSynthesisAdapter=i,EA}var hA={},BS;function $4(){if(BS)return hA;BS=1,Object.defineProperty(hA,"__esModule",{value:!0}),hA.SpeechSynthesisAdapter=void 0;const t=V(),e=ne();let i=class extends e.SynthesisAdapterBase{constructor(s,o,A,n,a){super(s,o,A,a),this.privSpeechSynthesizer=n,this.privSynthesizer=n}setSynthesisContextSynthesisSection(){this.privSynthesisContext.setSynthesisSection(this.privSpeechSynthesizer)}onSynthesisStarted(s){const o=new t.SpeechSynthesisEventArgs(new t.SpeechSynthesisResult(s,t.ResultReason.SynthesizingAudioStarted));this.privSpeechSynthesizer.synthesisStarted&&this.privSpeechSynthesizer.synthesisStarted(this.privSpeechSynthesizer,o)}onSynthesizing(s){if(this.privSpeechSynthesizer.synthesizing)try{const o=this.privSynthesisTurn.audioOutputFormat.addHeader(s),A=new t.SpeechSynthesisEventArgs(new t.SpeechSynthesisResult(this.privSynthesisTurn.requestId,t.ResultReason.SynthesizingAudio,o));this.privSpeechSynthesizer.synthesizing(this.privSpeechSynthesizer,A)}catch{}}onSynthesisCancelled(s){if(this.privSpeechSynthesizer.SynthesisCanceled){const o=new t.SpeechSynthesisEventArgs(s);try{this.privSpeechSynthesizer.SynthesisCanceled(this.privSpeechSynthesizer,o)}catch{}}}onSynthesisCompleted(s){if(this.privSpeechSynthesizer.synthesisCompleted)try{this.privSpeechSynthesizer.synthesisCompleted(this.privSpeechSynthesizer,new t.SpeechSynthesisEventArgs(s))}catch{}}onWordBoundary(s){if(this.privSpeechSynthesizer.wordBoundary)try{this.privSpeechSynthesizer.wordBoundary(this.privSpeechSynthesizer,s)}catch{}}onVisemeReceived(s){if(this.privSpeechSynthesizer.visemeReceived)try{this.privSpeechSynthesizer.visemeReceived(this.privSpeechSynthesizer,s)}catch{}}onBookmarkReached(s){if(this.privSpeechSynthesizer.bookmarkReached)try{this.privSpeechSynthesizer.bookmarkReached(this.privSpeechSynthesizer,s)}catch{}}};return hA.SpeechSynthesisAdapter=i,hA}var CA={},vS;function eO(){if(vS)return CA;vS=1,Object.defineProperty(CA,"__esModule",{value:!0}),CA.SynthesisRestAdapter=void 0;const t=lt(),e=V(),i=ui(),r=ut;let s=class{constructor(A,n){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=n}getVoicesList(A){return this.privRestAdapter.setHeaders(r.HeaderNames.ConnectionId,A),this.privAuthentication.fetch(A).then(n=>(this.privRestAdapter.setHeaders(n.headerName,n.token),this.privRestAdapter.request(t.RestRequestType.Get,this.privUri)))}};return CA.SynthesisRestAdapter=s,CA}var ng={},RS;function tO(){return RS||(RS=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SynthesizerConfig=t.SynthesisServiceType=void 0;const e=ne();var i;(function(s){s[s.Standard=0]="Standard",s[s.Custom=1]="Custom"})(i=t.SynthesisServiceType||(t.SynthesisServiceType={}));class r{constructor(o,A){this.privSynthesisServiceType=i.Standard,this.avatarEnabled=!1,this.privSpeechServiceConfig=o||new e.SpeechServiceConfig(new e.Context(null)),this.privParameters=A}get parameters(){return this.privParameters}get synthesisServiceType(){return this.privSynthesisServiceType}set synthesisServiceType(o){this.privSynthesisServiceType=o}set synthesisVideoSection(o){this.privSpeechServiceConfig.Context.synthesis={video:o}}get SpeechServiceConfig(){return this.privSpeechServiceConfig}}t.SynthesizerConfig=r}(ng)),ng}var IA={},wS;function iO(){if(wS)return IA;wS=1,Object.defineProperty(IA,"__esModule",{value:!0}),IA.SynthesisContext=void 0;const t=V();let e=class{constructor(){this.privContext={}}setSection(r,s){this.privContext[r]=s}set audioOutputFormat(r){this.privAudioOutputFormat=r}toJSON(){return JSON.stringify(this.privContext)}setSynthesisSection(r){const s=this.buildSynthesisContext(r);this.setSection("synthesis",s)}buildSynthesisContext(r){return{audio:{metadataOptions:{bookmarkEnabled:!!(r!=null&&r.bookmarkReached),punctuationBoundaryEnabled:r==null?void 0:r.properties.getProperty(t.PropertyId.SpeechServiceResponse_RequestPunctuationBoundary,!!(r!=null&&r.wordBoundary)),sentenceBoundaryEnabled:r==null?void 0:r.properties.getProperty(t.PropertyId.SpeechServiceResponse_RequestSentenceBoundary,!1),sessionEndEnabled:!0,visemeEnabled:!!(r!=null&&r.visemeReceived),wordBoundaryEnabled:r==null?void 0:r.properties.getProperty(t.PropertyId.SpeechServiceResponse_RequestWordBoundary,!!(r!=null&&r.wordBoundary))},outputFormat:this.privAudioOutputFormat.requestAudioFormatString},language:{autoDetection:r==null?void 0:r.autoDetectSourceLanguage}}}};return IA.SynthesisContext=e,IA}var pA={},mS;function rO(){if(mS)return pA;mS=1,Object.defineProperty(pA,"__esModule",{value:!0}),pA.SpeakerRecognitionConfig=void 0;const t=ne();let e=class{constructor(r,s){this.privContext=r||new t.Context(null),this.privParameters=s}get parameters(){return this.privParameters}get Context(){return this.privContext}};return pA.SpeakerRecognitionConfig=e,pA}var dA={},fS;function nO(){if(fS)return dA;fS=1,Object.defineProperty(dA,"__esModule",{value:!0}),dA.SpeakerServiceRecognizer=void 0;const t=lt(),e=Ee(),i=V(),r=ne(),s=Oi;let o=class extends r.ServiceRecognizerBase{constructor(n,a,c,u,l){super(n,a,c,u,l),this.privSpeakerRecognizer=l,this.privSpeakerAudioSource=c,this.recognizeSpeaker=g=>this.recognizeSpeakerOnce(g),this.sendPrePayloadJSONOverride=()=>this.noOp()}processTypeSpecificMessages(n){let a=!1;const c=new i.PropertyCollection;switch(n.messageType===e.MessageType.Text&&c.setProperty(i.PropertyId.SpeechServiceResponse_JsonResult,n.textBody),n.path.toLowerCase()){case"speaker.response":const l=JSON.parse(n.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(n,a,c,u,l){if(new i.PropertyCollection().setProperty(r.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(n){this.privSpeakerModel=n,this.voiceProfileType=n.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(n)),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(n){const a=await this.fetchConnection();await this.sendSpeakerRecognition(a,n)}async sendSpeakerRecognition(n,a){const c=JSON.stringify(a);return n.send(new s.SpeechConnectionMessage(e.MessageType.Text,"speaker.context",this.privRequestSession.requestId,"application/json; charset=utf-8",c))}extractSpeakerContext(n){return{features:{interimResult:"enabled",progressiveDetection:"disabled"},profileIds:n.profileIds,scenario:n.scenario}}};return dA.SpeakerServiceRecognizer=o,dA}var SA={},QS;function oO(){if(QS)return SA;QS=1,Object.defineProperty(SA,"__esModule",{value:!0}),SA.VoiceServiceRecognizer=void 0;const t=lt(),e=Ee(),i=V(),r=ne(),s=Oi;let o=class extends r.ServiceRecognizerBase{constructor(n,a,c,u,l){super(n,a,c,u,l),this.privDeferralMap=new e.DeferralMap,this.privSpeakerAudioSource=c,this.sendPrePayloadJSONOverride=()=>this.noOp()}set SpeakerAudioSource(n){this.privSpeakerAudioSource=n}processTypeSpecificMessages(n){let a=!1;const c=new i.PropertyCollection;switch(n.messageType===e.MessageType.Text&&c.setProperty(i.PropertyId.SpeechServiceResponse_JsonResult,n.textBody),n.path.toLowerCase()){case"speaker.profiles":const l=JSON.parse(n.textBody);switch(l.operation.toLowerCase()){case"create":this.handleCreateResponse(l,n.requestId);break;case"delete":case"reset":this.handleResultResponse(l,n.requestId);break;case"fetch":const p=JSON.parse(n.textBody);this.handleFetchResponse(p,n.requestId);break}a=!0;break;case"speaker.phrases":const g=JSON.parse(n.textBody);this.handlePhrasesResponse(g,n.requestId),a=!0;break;case"speaker.profile.enrollment":const E=JSON.parse(n.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(n.requestId)&&this.privDeferralMap.complete(n.requestId,C),this.privRequestSession.onSpeechEnded(),a=!0;break}const u=new e.Deferred;return u.resolve(a),u.promise}cancelRecognition(n,a,c,u,l){new i.PropertyCollection().setProperty(r.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(n,a){this.voiceProfileType=n.toString();const c=this.connectImpl();try{const u=new e.Deferred;return await c,await this.sendCreateProfile(u,n,a),this.receiveMessage(),u.promise}catch(u){throw u}}async resetProfile(n){return this.voiceProfileType=n.profileType.toString(),this.sendCommonRequest("reset",n.profileType,n)}async deleteProfile(n){return this.voiceProfileType=n.profileType.toString(),this.sendCommonRequest("delete",n.profileType,n)}async retrieveEnrollmentResult(n){return this.voiceProfileType=n.profileType.toString(),this.privExpectedProfileId=n.profileId,this.sendCommonRequest("fetch",n.profileType,n)}async getAllProfiles(n){return this.voiceProfileType=n.toString(),this.sendCommonRequest("fetch",n)}async getActivationPhrases(n,a){this.voiceProfileType=n.toString();const c=this.connectImpl();try{const u=new e.Deferred;return await c,await this.sendPhrasesRequest(u,n,a),this.receiveMessage(),u.promise}catch(u){throw u}}async enrollProfile(n){this.voiceProfileType=n.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(n,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 p=new i.SessionEventArgs(this.privRequestSession.sessionId);return this.privRecognizer.sessionStarted&&this.privRecognizer.sessionStarted(this.privRecognizer,p),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(n,a){const c=await this.fetchConnection();this.privRequestSession.onSpeechContext(),this.privDeferralMap.add(this.privRequestSession.requestId,a),await this.sendBaseRequest(c,"enroll",this.scenarioFrom(n.profileType),n)}async sendPhrasesRequest(n,a,c){const u=await this.fetchConnection();this.privRequestSession.onSpeechContext(),this.privDeferralMap.add(this.privRequestSession.requestId,n);const l=this.scenarioFrom(a),g={locale:c,scenario:l};return u.send(new s.SpeechConnectionMessage(e.MessageType.Text,"speaker.profile.phrases",this.privRequestSession.requestId,"application/json; charset=utf-8",JSON.stringify(g)))}async sendCreateProfile(n,a,c){const u=await this.fetchConnection();this.privRequestSession.onSpeechContext(),this.privDeferralMap.add(this.privRequestSession.requestId,n);const l=a===i.VoiceProfileType.TextIndependentIdentification?"TextIndependentIdentification":a===i.VoiceProfileType.TextIndependentVerification?"TextIndependentVerification":"TextDependentVerification",g={locale:c,number:"1",scenario:l};return u.send(new s.SpeechConnectionMessage(e.MessageType.Text,"speaker.profile.create",this.privRequestSession.requestId,"application/json; charset=utf-8",JSON.stringify(g)))}async sendCommonRequest(n,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,n,this.scenarioFrom(a),c),this.receiveMessage(),l.promise}catch(l){throw l}}async sendBaseRequest(n,a,c,u){const l={scenario:c};return u?l.profileIds=[u.profileId]:l.maxPageSize=-1,n.send(new s.SpeechConnectionMessage(e.MessageType.Text,`speaker.profile.${a}`,this.privRequestSession.requestId,"application/json; charset=utf-8",JSON.stringify(l)))}extractSpeakerContext(n){return{features:{interimResult:"enabled",progressiveDetection:"disabled"},profileIds:n.profileIds,scenario:n.scenario}}handlePhrasesResponse(n,a){if(this.privDeferralMap.getId(a))if(n.status.statusCode.toLowerCase()!=="success"){const c=i.ResultReason.Canceled,u=new i.VoiceProfilePhraseResult(c,n.status.statusCode,n.passPhraseType,[]);this.privDeferralMap.complete(a,u)}else if(n.phrases&&n.phrases.length>0){const c=i.ResultReason.EnrollingVoiceProfile,u=new i.VoiceProfilePhraseResult(c,n.status.statusCode,n.passPhraseType,n.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(n,a){if(n.profiles&&n.profiles.length>0)if(this.privDeferralMap.getId(a)){const c=n.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(n,a){if(this.privDeferralMap.getId(a)){const c=n.operation.toLowerCase()==="delete"?i.ResultReason.DeletedVoiceProfile:i.ResultReason.ResetVoiceProfile,u=n.status.statusCode.toLowerCase()==="success"?c:i.ResultReason.Canceled,l=new i.VoiceProfileResult(u,`statusCode: ${n.status.statusCode}, errorDetails: ${n.status.reason}`);this.privDeferralMap.complete(a,l)}else throw new Error(`Voice Profile create request for requestID ${a} not found`)}handleFetchResponse(n,a){if(this.privDeferralMap.getId(a)&&n.profiles[0]){if(this.privExpectedProfileId&&n.profiles.length===1&&n.profiles[0].profileId===this.privExpectedProfileId){this.privExpectedProfileId=void 0;const c=n.profiles[0],u=new i.VoiceProfileEnrollmentResult(this.enrollmentReasonFrom(c.enrollmentStatus),JSON.stringify(c),n.status.reason);this.privDeferralMap.complete(a,u)}else if(n.profiles.length>0){const c=n.profiles,u=[];for(const l of c)u.push(new i.VoiceProfileEnrollmentResult(this.enrollmentReasonFrom(l.enrollmentStatus),JSON.stringify(l),n.status.reason));this.privDeferralMap.complete(a,u)}}else throw new Error(`Voice Profile fetch request for requestID ${a} not found`)}enrollmentReasonFrom(n){switch(n.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(n){return n===i.VoiceProfileType.TextIndependentIdentification?"TextIndependentIdentification":n===i.VoiceProfileType.TextIndependentVerification?"TextIndependentVerification":"TextDependentVerification"}};return SA.VoiceServiceRecognizer=o,SA}var DS={};(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(n){this.context=n}serialize(){return JSON.stringify(this,(n,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(n){this.recognition=n.toLowerCase()}}t.SpeechServiceConfig=e;class i{constructor(n){this.system=new r,this.os=n}}t.Context=i;class r{constructor(){const n="1.44.0";this.name="SpeechSDK",this.version=n,this.build="JavaScript",this.lang="JavaScript"}}t.System=r;class s{constructor(n,a,c){this.platform=n,this.name=a,this.version=c}}t.OS=s;class o{constructor(n,a,c){this.manufacturer=n,this.model=a,this.version=c}}t.Device=o,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={}))})(DS);var yS;function ne(){return yS||(yS=1,function(t){var e=fe&&fe.__createBinding||(Object.create?function(o,A,n,a){a===void 0&&(a=n),Object.defineProperty(o,a,{enumerable:!0,get:function(){return A[n]}})}:function(o,A,n,a){a===void 0&&(a=n),o[a]=A[n]}),i=fe&&fe.__exportStar||function(o,A){for(var n in o)n!=="default"&&!Object.prototype.hasOwnProperty.call(A,n)&&e(A,o,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.AutoDetectSourceLanguagesOpenRangeOptionName=t.ForceDictationPropertyName=t.ServicePropertiesPropertyName=t.CancellationErrorCodePropertyName=t.OutputFormatPropertyName=t.SpeechSynthesisAdapter=t.AvatarSynthesisAdapter=void 0,i(Sa,t),i(za,t),i(mn,t),i(pI,t),i(dI,t),i(VU(),t),i(HU(),t),i(dc,t),i(WU(),t),i(ZU(),t),i(XU(),t),i(Nd,t),i(Sc,t),i($U(),t),i(e4(),t),i(t4(),t),i(i4(),t),i(gd(),t),i(r4(),t),i(Yd,t),i(n4(),t),i(Mc,t),i(s4(),t),i(A4(),t),i(vc,t),i(Rc,t),i(wc,t),i(a4(),t),i(c4(),t),i(u4(),t),i(l4(),t),i(g4(),t),i(mc,t),i(h4(),t),i(fc,t),i($d,t),i(Qc,t),i(Tc,t),i(Lc,t),i(D4(),t),i(Nc,t),i(J4(),t),i(rg,t),i(Z4(),t),i(X4(),t);var r=_4();Object.defineProperty(t,"AvatarSynthesisAdapter",{enumerable:!0,get:function(){return r.AvatarSynthesisAdapter}});var s=$4();Object.defineProperty(t,"SpeechSynthesisAdapter",{enumerable:!0,get:function(){return s.SpeechSynthesisAdapter}}),i(eO(),t),i(tO(),t),i(iO(),t),i(rO(),t),i(nO(),t),i(oO(),t),i(DS,t),t.OutputFormatPropertyName="OutputFormat",t.CancellationErrorCodePropertyName="CancellationErrorCode",t.ServicePropertiesPropertyName="ServiceProperties",t.ForceDictationPropertyName="ForceDictation",t.AutoDetectSourceLanguagesOpenRangeOptionName="UND"}(cl)),cl}(function(t){var e=fe&&fe.__createBinding||(Object.create?function(s,o,A,n){n===void 0&&(n=A),Object.defineProperty(s,n,{enumerable:!0,get:function(){return o[A]}})}:function(s,o,A,n){n===void 0&&(n=A),s[n]=o[A]}),i=fe&&fe.__exportStar||function(s,o){for(var A in s)A!=="default"&&!Object.prototype.hasOwnProperty.call(o,A)&&e(o,s,A)};Object.defineProperty(t,"__esModule",{value:!0});const r=ne();new r.AgentConfig,i(V(),t)})(pi);const vt=[];for(let t=0;t<256;++t)vt.push((t+256).toString(16).slice(1));function sO(t,e=0){return(vt[t[e+0]]+vt[t[e+1]]+vt[t[e+2]]+vt[t[e+3]]+"-"+vt[t[e+4]]+vt[t[e+5]]+"-"+vt[t[e+6]]+vt[t[e+7]]+"-"+vt[t[e+8]]+vt[t[e+9]]+"-"+vt[t[e+10]]+vt[t[e+11]]+vt[t[e+12]]+vt[t[e+13]]+vt[t[e+14]]+vt[t[e+15]]).toLowerCase()}let og;const AO=new Uint8Array(16);function aO(){if(!og){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");og=crypto.getRandomValues.bind(crypto)}return og(AO)}const TS={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function cO(t,e,i){var s;if(TS.randomUUID&&!e&&!t)return TS.randomUUID();t=t||{};const r=t.random??((s=t.rng)==null?void 0:s.call(t))??aO();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[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 o=0;o<16;++o)e[i+o]=r[o];return e}return sO(r)}const On=It(),sg=Pe(),Nn=w(""),Vr=w(""),Kn=w(""),Ft=w(""),LS=w("");let Gi=null;const US=4e3;ri(async()=>{await Ag()});let rt=null,Hr=null,Si=null,jc=null;const hr=()=>{Si&&Si.mute(),rt&&(console.log("TTS forcibly closed"),rt.close(),rt=null),Hr=null},Ag=async()=>{var t,e,i,r;try{const s=await Ai("/fetchCompletionSubDemo1");return console.log("response",(t=s==null?void 0:s.data)==null?void 0:t.token),(e=s==null?void 0:s.data)==null?void 0:e.token}catch(s){if(console.error(s),Le.isAxiosError(s)){const o=s;console.log("Error found!"),console.error((i=o.response)==null?void 0:i.data),On.setError(((r=o.response)==null?void 0:r.data).message)}else On.setError("There was an issue while fetching data")}},xc=()=>{Gi&&clearTimeout(Gi),jc&&(jc.stopContinuousRecognitionAsync(()=>{console.log("Recognition stopped")},t=>{console.error("Error stopping recognition",t)}),jc=null)},uO=async t=>{const e=await Ag();return await hr(),new Promise((i,r)=>{const s=pi.SpeechConfig.fromAuthorizationToken(e,"eastus2");s.speechSynthesisVoiceName="en-US-EmmaMultilingualNeural",Si=new pi.SpeakerAudioDestination;const o=pi.AudioConfig.fromSpeakerOutput(Si);rt=new pi.SpeechSynthesizer(s,o);const A=cO();Hr=A,console.log("TTS request ID:",A),rt.speakTextAsync(t,n=>{if(console.log("requestId",A),console.log("requestId",Hr),A!==Hr)return console.log("TTS response ignored due to newer request"),Si==null||Si.mute(),rt==null||rt.close(),rt=null,i();n.reason===pi.ResultReason.SynthesizingAudioCompleted?i():r(new Error("Speech synthesis failed")),rt==null||rt.close(),rt=null,Hr=null},n=>{if(A!==Hr)return console.log("TTS error ignored due to newer request"),Si==null||Si.mute(),rt==null||rt.close(),rt=null,i();rt==null||rt.close(),rt=null,Hr=null,r(n)})})},lO=async t=>{const e=await Ag(),i=pi.SpeechConfig.fromAuthorizationToken(e,"eastus2");i.speechRecognitionLanguage="en-US";const r=pi.AudioConfig.fromDefaultMicrophoneInput(),s=new pi.SpeechRecognizer(i,r);return jc=s,Nn.value="",Vr.value="",s.recognizing=(o,A)=>{A.result.text&&A.result.text.trim()&&(Nn.value=A.result.text.trim(),hr(),sg.userspeaking=!0,console.log("store userspeaking recognizing",sg.userspeaking),sg.userSpeechText=(Vr.value?Vr.value+" ":"")+Nn.value,Ft.value="user",Gi&&(console.log("pauseTimeout---->",Gi),console.log("before clearing pauseTimeout"),clearTimeout(Gi)),Gi=setTimeout(()=>{Nn.value&&(t(Nn.value.trim()),Nn.value="")},US))},s.recognized=(o,A)=>{A.result.reason===pi.ResultReason.RecognizedSpeech&&A.result.text&&A.result.text.trim()&&(Vr.value+=" "+A.result.text.trim(),Gi&&clearTimeout(Gi),Gi=setTimeout(()=>{Vr.value&&(t(Vr.value),Vr.value="")},US))},s.canceled=(o,A)=>{console.error("Recognition canceled:",A)},s.startContinuousRecognitionAsync(),s},gO=async()=>{var t,e;Kn.value="",LS.value="";try{console.log("before stopping TTS"),hr(),console.log("after stopping TTS"),console.log("in startRecognition function"),await lO(i=>{i&&(console.log("STT recognized:",i),Kn.value=i)})}catch(i){if(console.error(i),Le.isAxiosError(i)){const r=i;console.log("Error found!"),console.error((t=r.response)==null?void 0:t.data),On.setError(((e=r.response)==null?void 0:e.data).message)}else On.setError("There was an issue while fetching data")}},OS=async t=>{var e,i;console.log("playRecognition called",t),LS.value="";try{(Ft.value=="user"||Ft.value=="listening")&&hr(),await uO(t)}catch(r){if(console.error(r),Le.isAxiosError(r)){const s=r;console.log("Error found!"),console.error((e=s.response)==null?void 0:e.data),On.setError(((i=s.response)==null?void 0:i.data).message)}else On.setError("There was an issue while fetching data")}};Pe();const NS=It(),Fn=w(!1),MA=w("");w(""),w(""),ri(()=>{console.log("Mounted voiceService11Labs")});const EO=async()=>{var t,e,i,r;try{const s=await Ai("/fetchCompletionSubDemo1?ellevenLabs=true");return console.log("response",(t=s==null?void 0:s.data)==null?void 0:t.token),(e=s==null?void 0:s.data)==null?void 0:e.token}catch(s){if(console.error(s),Le.isAxiosError(s)){const o=s;console.log("Error found!"),console.error((i=o.response)==null?void 0:i.data),NS.setError(((r=o.response)==null?void 0:r.data).message)}else NS.setError("There was an issue while fetching data")}};let Yc;const hO="Xb7hH8MSUJpSbSDYk0k2";w(!1);const CO=w("");let zc=[];const KS=w(!1);let Gn=!1,Gt=null,BA=null,Cr=null;w("");let Wr,Zr,kn,jn;function ag(){jn&&jn.disconnect(),Zr&&Zr.disconnect(),console.log("microphone outside->",kn),kn&&(console.log("microphone->",kn),console.log("Stopping microphone connection"),kn.disconnect()),Wr&&Wr.close()}function IO(t,e=.09){console.log("monitorMicDuringTTS called with threshold:",e),Wr=new(window.AudioContext||window.webkitAudioContext),Zr=Wr.createAnalyser(),kn=Wr.createMediaStreamSource(BA),jn=Wr.createScriptProcessor(2048,1,1),kn.connect(Zr),Zr.connect(jn),jn.connect(Wr.destination),jn.onaudioprocess=()=>{const i=new Uint8Array(Zr.frequencyBinCount);Zr.getByteFrequencyData(i);const r=i.reduce((s,o)=>s+o)/i.length;console.log("Average volume:",r),console.log("threshold * 100:",e*100),r>e*100&&(t(),console.log("onInterrupt",t),ag())}}async function cg(){KS.value=!0,Fn.value=!0,console.log("Starting voice recognition with ElevenLabs"),Gt&&Gt.pause(),BA=await navigator.mediaDevices.getUserMedia({audio:!0}),await pO()}async function pO(){if(!BA)throw new Error("micStream is null");Cr=new MediaRecorder(BA),zc=[],console.log("Starting beginListening with ElevenLabs"),Cr.ondataavailable=t=>{Gt&&Gt.pause(),t.data.size>0&&zc.push(t.data),console.log("Audio chunk available:",zc)},Cr.onstop=async()=>{const t=new Blob(zc,{type:"audio/webm"}),e=await SO(t);CO.value=e,console.log("Transcription:",e),MA.value=e,KS.value=!1},Cr.start(),Gt&&Gt.pause(),dO(BA,()=>{(Cr==null?void 0:Cr.state)==="recording"&&Cr.stop()})}function dO(t,e,i=1500,r=.08){const s=new(window.AudioContext||window.webkitAudioContext),o=s.createAnalyser(),A=s.createMediaStreamSource(t),n=s.createScriptProcessor(2048,1,1);o.smoothingTimeConstant=.8,o.fftSize=1024,A.connect(o),o.connect(n),n.connect(s.destination);let a=performance.now();n.onaudioprocess=()=>{const c=new Uint8Array(o.frequencyBinCount);o.getByteFrequencyData(c),c.reduce((l,g)=>l+g)/c.length<r*100?performance.now()-a>i&&(e(),n.disconnect(),o.disconnect(),A.disconnect(),s.close()):a=performance.now()}}async function SO(t){console.log("authToken 11labs",Yc);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":Yc},body:e}),r=await i.json();return i.ok?(r==null?void 0:r.text)||"[No transcription result]":(console.error("Transcription error:",r),"[Error in transcription]")}async function FS(t){console.log("speakText11Labs called with text:",t),Yc=await EO(),Gt&&Gt.pause(),Gn=!0;const i=await(await fetch(`https://api.elevenlabs.io/v1/text-to-speech/${hO}`,{method:"POST",headers:{"xi-api-key":Yc,"Content-Type":"application/json"},body:JSON.stringify({text:t,model_id:"eleven_monolingual_v1",voice_settings:{stability:.5,similarity_boost:.5}})})).blob(),r=URL.createObjectURL(i);return Gt=new Audio(r),new Promise(s=>{Gt&&(Gt.onended=async()=>{Gn=!1,console.log("Audio is playing:",Gn),Fn.value?(console.log("micEnabled before calling startrecognition:",Fn.value),s(await cg())):s()},Gt.play(),console.log("Audio is playing:",Gn),console.log("micEnabled:",Fn.value),Fn.value&&IO(()=>{Gt&&(Gt.pause(),Gt.currentTime=0),Gn=!1,console.log("monitorMicDuringTTS:",Gn),console.log("micEnabled before calling startrecognition:",Fn.value),cg()}))})}const MO={class:"max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916] fontFormattingAMA"},BO=h("div",{class:"text-[22px] font-[700]"},"Please Note Before You Begin",-1),vO=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,[ft("The session may take up to "),h("b",{class:"font-[600]"},"10 minutes"),ft(".")]),h("li",null,"Choose a quiet space and ensure your mic and internet are working."),h("li",null,[ft("In Voice Mode? Click "),h("span",{class:"font-[600]"},"“Turn on Mic”"),ft(" to begin.")]),h("li",null,"Don’t mute until your response is fully processed.")],-1),RO={class:"flex items-end justify-start"},wO={class:"fontFormattingAMA w-full bg-gray-100 rounded-lg"},mO=["innerHTML"],fO=["innerHTML"],QO={key:0},DO=h("br",null,null,-1),yO=` <div class="w-full px-3 py-2 text-base text-black md:text-[16px] font-[550]"> 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.</div>`,TO=ke({__name:"greetingsSimulation",setup(t){const e=Pe(),i=It(),r=w(!1),s=w(!1),o=w(!0),A=` <div class="w-full rounded-md px-3 py-2 text-lg font-bold text-black md:text-[22px]">Hi, get ready to test your ${e.skillNameForSimulation||"GenpactNext"} knowledge! Here’s what to expect: </div>`,n=` <div class="w-full rounded-md px-3 py-2 text-lg font-bold text-black md:text-[22px]"> Hi ${e.learnerName||"Expert"}, and welcome!</div>`,a=` <div class="w-full rounded-md px-3 py-2 text-lg font-bold text-black md:text-[22px]"> Hi, ${e.learnerName||"Expert"}. Get ready to test your ${e.skillNameForSimulation||"GenpactNext"} knowledge! Here’s what to expect:</div>`,c=Ct(()=>["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill)?A:["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill)?n:a),u=`<div class="w-full px-3 py-2 text-base text-black md:text-[16px] font-[550]">Hi, get ready to test your ${e.skillNameForSimulation||"GenpactNext"} knowledge! Here’s what to expect:</div>`,l=`<div class="w-full px-3 py-2 text-base text-black md:text-[16px] font-[550]"> AI Guru will ask you a few questions on '${e.skillNameForSimulation.trim()||"GenpactNext"} '. 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.</div>`,g=Ct(()=>["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill)?u:["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill)?yO:l),E=async()=>{var C,p,S,I,d,M;console.log("firstQuestion fired==>"),o.value=!1;try{const B={question:"Hello, let's start"};if(console.log("ques",B),e.conversations.push(B),e.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ea"||e.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"||e.simulationSkill==="937e84ef-e95d-4327-9afe-e7be2bf420eb"||e.simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"||e.simulationSkill===""){const y={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"},L=w("");e.dotLoader=!0,Ft.value="listening";const U=await at("/sqlTest",y);e.addConversation((C=U.data)==null?void 0:C.body,"new"),L.value=(S=(p=U==null?void 0:U.data)==null?void 0:p.body)==null?void 0:S.answer,console.log("answer.value",L.value.replace(/[*#]/g,"")),e.dotLoader=!1,Ft.value="bot",e.showVoiceComponent&&(e.elevenLabs?await FS(L.value.replace(/[*#]/g,"")):await OS(L.value.replace(/[*#]/g,"")))}else{s.value=!0,e.dotLoader=!0,console.log("firstQuestion fired==> else part");const y={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 L;ir==="prod"?L="/ManualExportActivity":L="/fetchCompletionDemo";const U=await at(L,y);e.addConversation((I=U.data)==null?void 0:I.body,"assessment"),e.dotLoader=!1}}catch(B){if(console.error(B),Le.isAxiosError(B)){const y=B;console.log("Error found!"),console.error((d=y.response)==null?void 0:d.data),i.setError(((M=y.response)==null?void 0:M.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(C,p)=>(m(),Q("section",null,[oe(po,{"is-visible":r.value},{default:Ri(()=>[h("div",MO,[BO,vO,h("button",{onClick:p[0]||(p[0]=S=>{r.value=!1,E()}),class:"bg-[#021c42] rounded-md px-4 py-1.5 text-center text-[16px] text-white cursor-pointer italic"}," Proceed ")])]),_:1},8,["is-visible"]),h("div",RO,[h("div",wO,[c.value?(m(),Q("div",{key:0,innerHTML:c.value},null,8,mO)):Se("",!0),g.value?(m(),Q("div",{key:1,innerHTML:g.value},null,8,fO)):Se("",!0)])]),f(e).beginFlag?(m(),Q("span",QO,[h("button",{type:"button",id:"button",onClick:p[1]||(p[1]=S=>{f(e).beginFlag=!1,r.value=!0}),class:"mt-4 cursor-pointer bg-[#021c42] rounded-md px-4 py-1.5 text-center text-[16px] text-white hover:bg-blue-800"}," Let's begin ")])):Se("",!0),DO]))}}),LO="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcG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iF78CL+bWby/tfEUtsbiQuRHlTg9uK9wooA8L/AOFE63/0N95/38b/ABpsnwG1iWNo5PFl06MOVZ2IP617tRQByHgPwSnhDwqdFuJVvEaRnbevBz7V0VtpGm2coltrC2hkAwGSIA1dooAgurS2vYvKureOaPOdsihhn8ac8I+ytBGBGpQqu0Y28VLRQB5/4T+H174ft9ahutYmvBqAYLvJOzOa8/H7Oc6zGVNeKNuyCq4Ir6AooA8f8PfBzUdK162vr3xFcXtvEcvBKxZX9iDXp/8AYOkZ/wCQXZ/9+V/wrRooA8X8T/BC61/WLm5TW3htJH3JbY+RPoOldD4r+GL+I/Cuj6Mt95f9nhQXI+/ivR6KAKGlaVa6VZQ29tbxRlI1RmRAu4gYyav0UUAf/9k=",ug=t=>(wt("data-v-41b24e76"),t=t(),mt(),t),UO={class:"fontFormattingAMA flex items-end justify-start py-2"},OO={class:"line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg"},NO=["innerHTML"],KO=["innerHTML"],FO={key:0,class:"py-4"},GO={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},kO=["value","disabled","name"],jO={for:"item",name:"options-Array",id:"index"},xO={key:1,class:"py-4"},YO={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},zO=["onClick","disabled","name"],bO={for:"item",name:"options-Array",id:"index"},PO={key:2,class:"flex flex-col justify-start py-10"},qO=[ug(()=>h("div",{class:"mb-4"}," Add Agentic AI to your Digital Skills on Genome.ai and start mastering AI today! ",-1)),ug(()=>h("img",{class:"h-20 w-20",src:LO,alt:"qr_code"},null,-1))],JO={key:3,class:"flex flex-col justify-start items-start mt-4 bg-gray-100 rounded-lg"},VO=ug(()=>h("div",{class:""},[ft(" 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)),HO={class:"flex justify-start items-center gap-[40px]"},WO=ke({__name:"responseSimulation",props:{question:{type:String,required:!0},c2question:{type:String,required:!0},answer:{type:String,required:!0},questionId:{type:String,required:!0},showFeedback:{type:Boolean,default:!0},showSources:{type:String,default:""},relatedQues:{type:Array,required:!0},optionsArray:{type:Array,default:[]},ansId:{type:Number,default:0}},emits:["char-typed"],setup(t,{emit:e}){const i=t,r=w([]),s=w(!1),o=Pe(),A=w("");let n=[],a="";const c=async()=>{console.log("startCharByChar "),n=a.split(""),A.value="";for(let E=0;E<n.length;E++)A.value+=n[E],E%30&&e("char-typed"),await new Promise(C=>setTimeout(C,50))},u=()=>{o.showSelectTypeConvesation=!1,o.isRestart=!0,o.showModelToggle=!1,o.isSpeechToggle=!1,console.log("text mode",o.isSpeechToggle)},l=()=>{o.isRestart=!0,o.beginFlag=!0,o.showVoiceComponent=!0,o.showSelectTypeConvesation=!1,o.showModelToggle=!0,o.isSpeechToggle=!1,console.log("text mode",o.isSpeechToggle)},g=Ct(()=>{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>');(E.includes("Thank you for your participation!")||E.includes("Thank you for your participation"))&&(o.searchBoxdisable=!1,s.value=!0),E.includes("Feedback and Assessment")&&(o.showVoiceComponent=!1,hr(),xc()),(E.includes("BEGIN ROLE PLAY")||E.includes("BEGIN ROLE PLAY."))&&(o.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,(p,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,(p,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 p=E.split("Assessment Rating & Feedback")[0],S=E.split("Assessment Rating & Feedback")[1];o.conversations.push(p),o.conversations.push(S)}});return wi(()=>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>');const C=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;if(E.includes("AI Guru")?E=E.replace(C,(p,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,(p,S,I)=>`<a href="${I}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${S}</a>`),E.includes("Feedback and Assessment")&&(o.showVoiceComponent=!1,hr(),xc()),E.includes("Assessment Rating & Feedback")){const p=E.split("Assessment Rating & Feedback")[0],S=E.split("Assessment Rating & Feedback")[1];o.conversations.push(p),o.conversations.push(S)}a=E,o.showVoiceComponent&&c(),console.log("watch for startCharByChar")},{immediate:!0}),wi(r,E=>{o.question=(E??[]).join(", "),console.log("selectedOptions",E)}),(E,C)=>(m(),Q("div",UO,[h("div",OO,[f(o).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&f(o).showVoiceComponent===!0&&f(o).conversations.length-1===i.ansId&&!i.answer.includes("BEGIN ROLE PLAY")?(m(),Q("span",{key:0,class:"fontFormattingAMA",innerHTML:A.value},null,8,NO)):(m(),Q("span",{key:1,class:"fontFormattingAMA",innerHTML:g.value},null,8,KO)),h("div",null,[t.optionsArray.length&&f(o).mcqType==="multi_choice"?(m(),Q("div",FO,[(m(!0),Q(De,null,ht(t.optionsArray,(p,S)=>(m(),Q("div",{key:S,class:"italic"},[h("div",GO,[Ge(h("input",{class:"mr-4 cursor-pointer",type:"checkbox",value:p,"onUpdate:modelValue":C[0]||(C[0]=I=>r.value=I),disabled:f(o).conversations.length-1!==i.ansId,name:g.value},null,8,kO),[[Ah,r.value]]),h("label",jO,Re(p),1)])]))),128))])):t.optionsArray.length?(m(),Q("div",xO,[(m(!0),Q(De,null,ht(t.optionsArray,(p,S)=>(m(),Q("div",{key:S,class:"italic"},[h("div",YO,[h("input",{class:"mr-4 cursor-pointer",type:"radio",onClick:I=>f(o).question=String(t.optionsArray[S]),disabled:f(o).conversations.length-1!==i.ansId,name:g.value},null,8,zO),h("label",bO,Re(p),1)])]))),128))])):Se("",!0)]),s.value&&f(o).simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"?(m(),Q("div",PO,qO)):Se("",!0),f(o).isSpeechToggle&&f(o).showSelectTypeConvesation&&f(o).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&f(o).conversations.length-1===i.ansId?(m(),Q("div",JO,[VO,h("div",HO,[h("button",{type:"button",id:"button",onClick:C[1]||(C[1]=p=>u()),class:"mt-4 w-32 cursor-pointer bg-[#021c42] rounded-md px-4 py-1.5 text-center text-white text-[16px] hover:bg-blue-800"}," Text Mode "),h("button",{type:"button",id:"button",onClick:C[2]||(C[2]=p=>l()),class:"mt-4 w-32 cursor-pointer bg-[#021c42] rounded-md px-4 py-1.5 text-center text-white text-[16px] hover:bg-blue-800"}," Voice Mode ")])])):Se("",!0)])]))}}),d1="",ZO=Ve(WO,[["__scopeId","data-v-41b24e76"]]),XO={class:"flex justify-end items-end py-3"},_O={class:"max-w-[80%]"},$O={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},eN=ke({__name:"learnerSimulation",props:{question:{type:String,required:!0},showFeedback:{type:Boolean,default:!0}},setup(t){return(e,i)=>(m(),Q("div",XO,[h("div",_O,[h("div",$O,Re(t.question),1)])]))}}),tN=t=>(wt("data-v-347ad6de"),t=t(),mt(),t),iN={class:"flex w-full flex-col items-start justify-start bg-white"},rN={class:"bot-typing-animation gap-1"},nN={class:"block w-full text-lg italic text-gray-800"},oN=tN(()=>h("span",{class:"dot-animation"},[h("span",null,"."),h("span",null,"."),h("span",null,".")],-1)),sN=cn('<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),AN=ke({__name:"LoadingResponse",setup(t){const e=w("Generating response"),i=w(["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 r=Math.floor(Math.random()*i.value.length);e.value=i.value[r]},15e3),(r,s)=>(m(),Q("div",iN,[h("div",rN,[h("div",nN,Re(e.value),1),oN]),sN]))}}),S1="",aN=Ve(AN,[["__scopeId","data-v-347ad6de"]]),cN={class:"flex mx-auto justify-end items-end py-3"},uN={class:"max-w-[80%]"},lN={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},gN=ke({__name:"QuestionStreaming",setup(t){const e=Pe();return(i,r)=>(m(),Q("div",cN,[h("div",uN,[h("div",lN,Re(f(e).userSpeechText),1)])]))}}),EN={key:0},hN={key:1},CN={key:0,class:"flex"},IN={key:1,name:"askQuestion"},pN=ke({__name:"conversationSimulation",setup(t){let e=w(""),i=w("");e.value='<a style="color:#00AECF;"',i.value='<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';const r=Pe(),s=w(),o=()=>{s.value.scrollTo(0,s.value.scrollHeight)};return ri(()=>{var a;const A=document.getElementsByName("askQuestion"),n=Array.from(A);console.log("New array===>",n),A.length&&((a=n==null?void 0:n.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"})),window.addEventListener("custom-event",o)}),Su(()=>{var a;const A=document.getElementsByName("askQuestion"),n=Array.from(A);console.log("New array===>",n),A.length&&((a=n==null?void 0:n.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"}))}),Xn(()=>{window.removeEventListener("custom-event",o)}),(A,n)=>(m(),Q("div",{ref_key:"nestedElement",ref:s,class:"smooth-scroll overflow-auto md:px-6 px-2"},[oe(TO),(m(!0),Q(De,null,ht(f(r).conversations,(a,c)=>(m(),Q("div",{key:c},[a.question?(m(),Q("div",EN,[oe(eN,{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"])])):Se("",!0),a.answer?(m(),Q("div",hN,[oe(ZO,{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",f(e)).replaceAll("<ul",f(i)),"show-feedback":a.showFeedback,"related-ques":a.relatedQues,"options-array":a.optionsArray,"ans-id":c,onCharTyped:o},null,8,["question","c2question","show-sources","questionId","answer","show-feedback","related-ques","options-array","ans-id"])])):Se("",!0)]))),128)),f(r).dotLoader?(m(),Q("div",CN,[oe(aN)])):Se("",!0),f(r).userspeaking?(m(),Q("div",IN,[oe(gN)])):Se("",!0)],512))}}),M1="",dN=Ve(pN,[["__scopeId","data-v-e55a322f"]]),GS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAYAAAARfGZ1AAABSUlEQVR4nLXWvUocURTA8d/eQosEgmQL0RRTRFCMhYKPYcDCIrUsPoCQNvMEYmEgRYp09luElPsIVmKKJIX4UUQJxMJAXC1mL4zLzjq7O/OHA/P5v+ecmbl3GsoxjVnM4S8u8bvkvYXCFr7hH+774if2sTKqeAu/BggHxR2+oPmUtIG0pLQ/TrE2TP5xTHGMayzkM43s4BMkSSJJkqeqfESn04mbJ1jHTTzQxJ+YQZqm96PSV0EKoSd/jxcjpTqcXTSDrDXvKhTDc7wNWMWriuWwEbBYgxiWguyTroP5IHu6ddANOK9JfhZkL30dfA84ks0LVdOOPT+sWHyDdtyZwZXJJq18fOgfrVWR+BjPBpVzMKH4Cq+LehUXi+4Y4h94UyTOs9m7uIz0Pz7jZRlxZArb+Irbgkz3sFwkaBSdGDBQ/tfiQrakDeUBf+jdzbi9K1QAAAAASUVORK5CYII=",SN={class:"flex items-center gap-4 py-2 rounded-full z-10"},MN={key:0,class:"flex items-center"},BN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},vN=[cn('<rect x="0" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0s"></animate></rect><rect x="4" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.1s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.1s"></animate></rect><rect x="8" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate></rect><rect x="12" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.3s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.3s"></animate></rect><rect x="16" y="4" width="2" height="16" rx="1"><animate attributeName="height" values="16;20;16" dur="1s" repeatCount="indefinite" begin="0.4s"></animate><animate attributeName="y" values="4;2;4" dur="1s" repeatCount="indefinite" begin="0.4s"></animate></rect><rect x="20" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.5s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.5s"></animate></rect><rect x="24" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate></rect><rect x="28" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.7s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.7s"></animate></rect><rect x="32" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0.8s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0.8s"></animate></rect>',9)],RN={key:1,class:"flex items-center"},wN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},mN=[cn('<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"},QN=[cn('<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)],DN={class:"tooltiptext text-genpact-darkest-teal"},yN=[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)],TN=[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)],LN=ke({__name:"NewVoiceConversation",setup(t){const e=Pe(),i=It(),r=w(""),s=w(!1),o=w("Turn on mic"),A=()=>{s.value===!1?e.elevenLabs?(console.log("mic enabled true 11labs"),s.value=!0,cg(),Ft.value="user",o.value="Turn off mic"):(console.log("mic enabled true"),s.value=!0,hr(),gO(),Ft.value="user",o.value="Turn off mic"):e.elevenLabs?(console.log("mic enabled false"),ag(),s.value=!1,o.value="Turn on mic"):(console.log("mic enabled false"),xc(),s.value=!1,o.value="Turn on mic")},n=()=>{e.elevenLabs?(console.log("closeConversation 11 labs"),ag(),Ft.value="none",s.value=!1):(console.log("closeConversation"),xc(),hr(),Ft.value="none",s.value=!1)},a=async()=>{var c,u,l,g,E,C;try{const p={question:Kn.value||MA.value};console.log("ques",p),e.conversations.push(p),e.dotLoader=!0,e.question="";const S={past_messages:e.past_messages,question:Kn.value||MA.value,bandCode:"4A",userGenomeFunction:"HR",userGenomeRole:"Consultant",skillId:"7bd03cb6-79ad-4e2a-8a8b-88dc16147369"},I=await at("/sqlTest",S);if(Ft.value="bot",r.value=(u=(c=I==null?void 0:I.data)==null?void 0:c.body)==null?void 0:u.answer,r.value===""){console.log("in the if case calling api again");const d=await at("/sqlTest",S);e.addConversation((l=d.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");e.dotLoader=!1,console.log("answer.value",r.value.replace(/[*#]/g,"")),e.elevenLabs?await FS(r.value.replace(/[*#]/g,"")):await OS(r.value.replace(/[*#]/g,""))}catch(p){if(console.error(p),Le.isAxiosError(p)){const S=p;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 wi(Kn,async c=>{c&&(console.log("Recognized text:",c),Ft.value="listening",e.userspeaking=!1,console.log("store userspeaking in recognized",e.userspeaking),await a(),Kn.value="")}),wi(MA,async c=>{c&&(console.log("Recognized text:",c),Ft.value="listening",await a(),MA.value="")}),(c,u)=>(m(),Q("div",SN,[f(Ft)==="bot"?(m(),Q("div",MN,[h("span",null,[(m(),Q("svg",BN,vN))])])):f(Ft)==="user"?(m(),Q("div",RN,[h("span",null,[(m(),Q("svg",wN,mN))])])):f(Ft)==="listening"?(m(),Q("div",fN,QN)):Se("",!0),h("div",{class:ge([s.value?"":"animate-pulse","tooltip"])},[h("span",DN,Re(o.value),1),s.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())},yN)):(m(),Q("button",{key:1,class:"rounded-full bg-white p-2 transition hover:bg-gray-300",onClick:u[1]||(u[1]=l=>A())},TN))],2),h("button",{class:"rounded-full bg-white p-2 hover:bg-gray-300",onClick:u[2]||(u[2]=l=>n())},[oe(f(yC),{class:"h-[10px] w-[10px] text-gray-700"})])]))}}),Ir=t=>(wt("data-v-e951c0ed"),t=t(),mt(),t),UN={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},ON={class:"py-2"},NN={class:"flex"},KN={class:"z-1 relative w-full"},FN={class:"flex justify-between my-2 w-full"},GN=Ir(()=>h("div",null,null,-1)),kN={key:0,class:"flex justify-center bg-genpact-darkest-blue px-4 rounded-full"},jN={class:"relative w-full"},xN={class:"absolute inset-y-0 left-0 flex items-center pl-3"},YN={class:"tooltip"},zN=Ir(()=>h("span",{class:"tooltiptext text-genpact-darkest-teal"},"Restart",-1)),bN=[Ir(()=>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)),Ir(()=>h("path",{d:"M9 10H15M9 14H12M19 8V2M16 5H22",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1))],PN={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},qN={key:0},JN=["disabled"],VN=[Ir(()=>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))],HN={key:1,class:"tooltip"},WN=[Ir(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),Ir(()=>h("img",{class:"w-7 h-7",src:GS,alt:"watingIcon"},null,-1))],ZN={class:"flex justify-start gap-2 md:gap-1"},XN=["disabled"],_N=Ir(()=>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)),$N=ke({__name:"NewQuestionSimulation",setup(t){const e=Pe(),i=It(),r=w(""),s=w("");e.question="";const o=w(null),A=w(!1),n=w(Di),a=w(!1);s.value=e.recognizedText,ri(()=>{o.value.focus()});const c=()=>{window.location.reload()},u=g=>{const E=g.length;n.value=Di-E,A.value=E>=Di},l=async()=>{var g,E,C,p,S,I,d,M;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}a.value=!0,e.dotLoader=!0;const B={question:e.question||e.recognizedText};console.log("ques",B),e.conversations.push(B);const y=w("");y.value=e.question||e.recognizedText,e.question="";const L={ohr_id:r.value,past_messages:e.past_messages,question:y.value||e.recognizedText,bandCode:e.band_code,userGenomeFunction:e.genomeFunctionValue,userGenomeRole:e.genomeRoleValue,skillId:e.simulationSkill||"937e84ef-e95d-4327-9afe-e7be2bf420eb"},U=await at("/sqlTest",L);if(r.value=(E=(g=U.data)==null?void 0:g.body)==null?void 0:E.ohr,((p=(C=U==null?void 0:U.data)==null?void 0:C.body)==null?void 0:p.answer)===""){console.log("in the if case calling api again");const k=await at("/sqlTest",L);e.addConversation((S=k.data)==null?void 0:S.body,"new")}else console.log("in the else case"),e.addConversation((I=U.data)==null?void 0:I.body,"new");console.log("ohr id asdf",r.value),a.value=!1,e.dotLoader=!1,e.recognizedText=""}catch(B){if(console.error(B),e.dotLoader=!1,Le.isAxiosError(B)){const y=B;console.log("Error found!"),console.error((d=y.response)==null?void 0:d.data),i.setError(((M=y.response)==null?void 0:M.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(g,E)=>(m(),Q("div",UN,[h("div",ON,[h("div",NN,[h("div",KN,[h("div",FN,[GN,f(e).showVoiceComponent?(m(),Q("div",kN,[oe(LN)])):Se("",!0)]),h("div",jN,[h("div",xN,[h("div",YN,[zN,(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"},bN))])]),h("div",PN,[a.value?(m(),Q("div",HN,WN)):(m(),Q("div",qN,[(m(),Q("svg",{disabled:f(e).beginFlag===!0,class:ge([f(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=>f(e).searchBoxdisable===!1||f(e).beginFlag===!0?"":l()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},VN,10,JN))]))]),h("div",ZN,[Ge(h("input",{onKeyup:[E[1]||(E[1]=Eh(C=>a.value?"":l(),["enter"])),E[3]||(E[3]=C=>u(f(e).question))],disabled:f(e).beginFlag===!0||f(e).searchBoxdisable===!1,class:ge([f(e).beginFlag===!0||f(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=>f(e).question=C),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:o},null,42,XN),[[_e,f(e).question]])])]),_N])])])]))}}),L1="",eK=Ve($N,[["__scopeId","data-v-e951c0ed"]]),bc=t=>(wt("data-v-be2cdcc7"),t=t(),mt(),t),tK={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},iK={class:"py-2"},rK={class:"flex"},nK={class:"z-1 relative w-full"},oK={class:"-text-blue absolute inset-y-0 bottom-8 right-0 flex cursor-pointer items-center justify-center pr-4 md:bottom-5 md:pr-8 lg:pr-8"},sK=[cn('<svg width="28" height="48" viewBox="0 0 24 24" class="cursor-pointer fill-current text-gray-700" data-v-be2cdcc7><rect x="1" y="8" width="2" height="8" rx="1" data-v-be2cdcc7></rect><rect x="5" y="6" width="2" height="12" rx="1" data-v-be2cdcc7></rect><rect x="9" y="4" width="2" height="16" rx="1" data-v-be2cdcc7></rect><rect x="13" y="6" width="2" height="12" rx="1" data-v-be2cdcc7></rect><rect x="17" y="8" width="2" height="8" rx="1" data-v-be2cdcc7></rect></svg>',1)],AK={key:1},aK=["disabled"],cK=[bc(()=>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))],uK={key:2,class:"tooltip"},lK=[bc(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),bc(()=>h("img",{src:GS,alt:"watingIcon",class:"ml-2"},null,-1))],gK={class:"flex justify-start gap-2 md:gap-1"},EK=["disabled"],hK=bc(()=>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=ke({__name:"NewMDMQuestionSimulation",setup(t){const e=Pe(),i=It(),r=w("");e.question="";const s=w(null),o=w(!1),A=w(Di),n=w(!1);r.value=e.recognizedText,ri(()=>{s.value.focus()});const a=u=>{const l=u.length;A.value=Di-l,o.value=l>=Di},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}n.value=!0,e.dotLoader=!0;const E={question:e.question||e.recognizedText};console.log("ques",E),e.conversations.push(E);const C=w("");C.value=e.question||e.recognizedText,e.question="";const p={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==> ",p);let S;ir==="prod"?S="/ManualExportActivity":S="/fetchCompletionDemo";const I=await at(S,p);e.addConversation((u=I.data)==null?void 0:u.body,"new"),n.value=!1,e.dotLoader=!1,e.recognizedText=""}catch(E){if(console.error(E),Le.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",tK,[h("div",iK,[h("div",rK,[h("div",nK,[h("div",oK,[f(e).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"?(m(),Q("span",{key:0,onClick:l[0]||(l[0]=g=>f(e).isSimualation=!0)},sK)):Se("",!0),n.value?(m(),Q("div",uK,lK)):(m(),Q("div",AK,[(m(),Q("svg",{disabled:f(e).beginFlag===!0,class:ge([f(e).beginFlag===!0?"cursor-not-allowed text-gray-600":"pointer -text-blue","bi bi-send ml-2 h-7 w-7 rotate-45 rounded"]),onClick:l[1]||(l[1]=g=>f(e).searchBoxdisable===!1||f(e).beginFlag===!0?"":c()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},cK,10,aK))]))]),h("div",gK,[Ge(h("textarea",{rows:"2",onKeyup:[l[2]||(l[2]=Eh(g=>c(),["enter"])),l[4]||(l[4]=g=>a(f(e).question))],disabled:f(e).beginFlag===!0,class:ge([f(e).beginFlag===!0||f(e).searchBoxdisable===!1?"cursor-not-allowed bg-[#e5e7eb]":"","fontFormattingAMA flex w-full border border-genpact-darkest-teal py-2 pl-2 pr-16 focus:outline-none sm:text-[15px] md:py-3 md:pl-6 lg:py-3 lg:pl-6"]),"onUpdate:modelValue":l[3]||(l[3]=g=>f(e).question=g),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:s},null,42,EK),[[_e,f(e).question]])]),hK])])])]))}}),F1="",IK=Ve(CK,[["__scopeId","data-v-be2cdcc7"]]),pK={},dK={class:"flex min-h-screen justify-center -mt-16"},SK=[h("div",{class:"flex items-center justify-center"},[h("img",{class:"loadercss",src:yi,alt:"Loader Gif"})],-1)];function MK(t,e){return m(),Q("div",dK,SK)}const BK=Ve(pK,[["render",MK]]),lg=t=>(wt("data-v-f651f45f"),t=t(),mt(),t),vK=lg(()=>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)),RK={key:1,className:"h-screen flex flex-col items-stretch"},wK={class:"z-20"},mK={key:0,class:"flex flex-col justify-end mt-3 items-end md:px-8 px-3"},fK={class:"inline-flex items-center cursor-pointer"},QK={class:"mr-3 text-[15px] font-[600]"},DK=lg(()=>h("div",{class:"relative w-10 h-5 bg-gray-300 dark:bg-gray-400 rounded-full peer-checked:bg-genpact-darkest-teal after:content-[''] after:absolute after:top-[1.5px] after:left-[1.5px] after:bg-white after:rounded-full after:h-4 after:w-4 after:transition-transform peer-checked:after:translate-x-5"},null,-1)),yK=lg(()=>h("div",{class:"mt-6"},null,-1)),TK={class:"flex h-full items-stretch overflow-hidden"},LK={class:"mx-auto w-11/12 bg-white"},UK={class:"relative flex h-full w-full flex-col items-stretch overflow-hidden"},OK={key:0,class:"relative"},NK={key:1,class:"relative"},KK=ke({__name:"AssessmentSimulation",setup(t){const e=w(!0),i=w(!1),r=w(!1),s=w(!1);w(!1);const o=Pe(),A=It(),n=w(""),a=w(""),c=w(""),u=localStorage.getItem("accessToken");let l="",g="",E="";const C=w(!1),p=new URL(window.location.href),S=p.searchParams.get("skillId")||p.searchParams.get("assessmentId")||"937e84ef-e95d-4327-9afe-e7be2bf420eb";a.value=p.searchParams.get("mode")??"",o.simulationSkill=S??"";const I=["703331197","703380812","703331909","703363051","703319578"];ri(async()=>{console.log("uuid. value",S),e.value=!0,await B(),await y(),o.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ea"||o.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"||o.simulationSkill==="937e84ef-e95d-4327-9afe-e7be2bf420eb"||o.simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"||o.simulationSkill===""||(console.log("getAssessmentDetails========================>"),await M()),e.value=!1});const d=()=>{s.value?(console.log("isChecked.value for voice assessment",s.value),o.elevenLabs=!1):(console.log("isChecked.value for voice assessment",s.value),o.elevenLabs=!0)},M=async()=>{var L,U,D,k,Y,O,N,ie,q,z,F,Z,b,ae,ue,Be,pe,Te,je,He,xe,G,_,H,ee,de,v,R,T,K,x,P,te,W,X,J,se,re,Ae,he,ve,Fe,Ue,qe,gt,kt,tt,$t;console.log("Start getAssessmentDetails");try{ir==="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 ce=await Ai(l);n.value=(U=(L=ce==null?void 0:ce.data)==null?void 0:L.data)==null?void 0:U.name,o.skillNameForSimulation=n.value,o.generatedPrompt=(k=(D=ce==null?void 0:ce.data)==null?void 0:D.data)==null?void 0:k.generatedPrompt,o.assessmentType=(O=(Y=ce==null?void 0:ce.data)==null?void 0:Y.data)==null?void 0:O.assessmentType,c.value=(ie=(N=ce==null?void 0:ce.data)==null?void 0:N.data)==null?void 0:ie.status,C.value=(z=(q=ce==null?void 0:ce.data)==null?void 0:q.data)==null?void 0:z.editMode,o.empSeniority=(Z=(F=ce==null?void 0:ce.data)==null?void 0:F.data)==null?void 0:Z.empSeniority,o.functionRole=(ae=(b=ce==null?void 0:ce.data)==null?void 0:b.data)==null?void 0:ae.functionRole,g=(Be=(ue=ce==null?void 0:ce.data)==null?void 0:ue.data)==null?void 0:Be.accessBand,E=(Te=(pe=ce==null?void 0:ce.data)==null?void 0:pe.data)==null?void 0:Te.accessOhrList;const Ze=(He=(je=ce==null?void 0:ce.data)==null?void 0:je.data)==null?void 0:He.createdBy;if(o.mcqType=(G=(xe=ce==null?void 0:ce.data)==null?void 0:xe.data)==null?void 0:G.mcqTypes,o.storeFinalFeedback=(H=(_=ce==null?void 0:ce.data)==null?void 0:_.data)==null?void 0:H.storeFinalFeedback,o.storeFinalScore=(de=(ee=ce==null?void 0:ce.data)==null?void 0:ee.data)==null?void 0:de.storeFinalScore,c.value==="inactive")i.value=!0;else if(c.value==="draft")a.value!==Al.DRAFT&&(i.value=!0);else if(c.value==="active"&&C.value&&a.value===Al.DRAFT){console.log("fetching values from draft table.....",C.value),ir==="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 Ye=await Ai(l);o.generatedPrompt=(R=(v=Ye==null?void 0:Ye.data)==null?void 0:v.data)==null?void 0:R.generatedPrompt,o.assessmentType=(K=(T=Ye==null?void 0:Ye.data)==null?void 0:T.data)==null?void 0:K.assessmentType,o.empSeniority=(P=(x=Ye==null?void 0:Ye.data)==null?void 0:x.data)==null?void 0:P.empSeniority,o.functionRole=(W=(te=Ye==null?void 0:Ye.data)==null?void 0:te.data)==null?void 0:W.functionRole,o.storeFinalFeedback=(J=(X=Ye==null?void 0:Ye.data)==null?void 0:X.data)==null?void 0:J.storeFinalFeedback,o.storeFinalScore=(re=(se=Ye==null?void 0:Ye.data)==null?void 0:se.data)==null?void 0:re.storeFinalScore,g=(he=(Ae=Ye==null?void 0:Ye.data)==null?void 0:Ae.data)==null?void 0:he.accessBand,E=(Fe=(ve=Ye==null?void 0:Ye.data)==null?void 0:ve.data)==null?void 0:Fe.accessOhrList}console.log("store mcqType====>",o.mcqType);const Ot=o==null?void 0:o.band_code;console.log("accessBand , accessOhrList====>",g,E);const Mi=(Ue=g==null?void 0:g.split(","))==null?void 0:Ue.map(Ye=>Ye.trim());if(console.log("bands ,====>",Mi),Ze===(o==null?void 0:o.ohr)||I.includes(o==null?void 0:o.ohr))console.log("User has access to this assessment.");else{if(Mi.length===0&&E.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(Mi.includes(Ot)||E.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(ce){if(console.error(ce),e.value=!1,Le.isAxiosError(ce)&&((qe=ce.response)!=null&&qe.status)||ce&&typeof ce=="object"&&"response"in ce&&ce.response&&typeof ce.response=="object"&&"status"in ce.response&&ce.response.status){const Ze=ce;if(console.log("Error found!"),console.error((gt=Ze.response)==null?void 0:gt.data),((kt=Ze.response)==null?void 0:kt.status)===424||((tt=Ze.response)==null?void 0:tt.status)===425){r.value=!0;return}A.setError((($t=Ze.response)==null?void 0:$t.data).message)}else A.setError("There was an issue, please contact helpmate")}},B=async()=>{var L,U,D,k,Y;try{if(S===null)throw{response:{status:424,data:{message:"Invalid URL"}}};e.value=!0;const O=new URLSearchParams(window.location.search);o.simulationSkill=O.get("skillId")||"";const N=await Ai("/getLearnerData");o.initialize(N.data),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(O){if(console.error(O),e.value=!1,Le.isAxiosError(O)&&((L=O.response)!=null&&L.status)||O&&typeof O=="object"&&"response"in O&&O.response&&typeof O.response=="object"&&"status"in O.response&&O.response.status){const N=O;if(console.log("Error found!"),console.error((U=N.response)==null?void 0:U.data),((D=N.response)==null?void 0:D.status)===424||((k=N.response)==null?void 0:k.status)===425){r.value=!0;return}A.setError(((Y=N.response)==null?void 0:Y.data).message)}else A.setError("There was an issue, please contact helpmate")}},y=async()=>{var L,U,D,k,Y,O,N,ie;try{const q=await Le({url:"https://api-v2-dev.genpact.com/api/delphi/v2/myprofile",headers:{authorization:`Bearer ${u}`,"content-type":"application/json"},method:"get"});o.genomeFunctionValue=(D=(U=(L=q==null?void 0:q.data)==null?void 0:L.role_function)==null?void 0:U.function)==null?void 0:D.name,o.genomeRoleValue=(O=(Y=(k=q==null?void 0:q.data)==null?void 0:k.role_function)==null?void 0:Y.role)==null?void 0:O.name,console.log("profile data",o.genomeFunctionValue,o.genomeRoleValue)}catch(q){if(console.error(q),e.value=!1,Le.isAxiosError(q)){const z=q;console.log("Error found!"),console.error((N=z.response)==null?void 0:N.data),A.setError(((ie=z.response)==null?void 0:ie.data).message)}else A.setError("There was an issue, please contact helpmate")}};return(L,U)=>(m(),Q("section",null,[oe(po,{"is-visible":r.value},{default:Ri(()=>[vK]),_:1},8,["is-visible"]),h("div",null,[e.value?(m(),Pi(BK,{key:0})):(m(),Q("main",RK,[h("div",wK,[oe(Fy)]),f(o).showModelToggle&&f(o).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"?(m(),Q("div",mK,[h("label",fK,[Ge(h("input",{onClick:d,type:"checkbox","onUpdate:modelValue":U[0]||(U[0]=D=>s.value=D),class:"sr-only peer"},null,512),[[Ah,s.value]]),h("span",QK,Re(s.value?"Eleven-labs":"Azure Open AI"),1),DK])])):Se("",!0),yK,h("div",TK,[h("div",LK,[h("div",UK,[oe(dN),h("div",{class:ge(f(o).showVoiceComponent===!0?"mt-[160px]":"mt-[120px]")},null,2)]),f(o).simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ea"||f(o).simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"||f(o).simulationSkill==="937e84ef-e95d-4327-9afe-e7be2bf420eb"||f(o).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"||f(o).simulationSkill===""?(m(),Q("div",OK,[oe(eK)])):(m(),Q("div",NK,[oe(IK)]))])])]))])]))}}),k1="",FK=Object.freeze(Object.defineProperty({__proto__:null,default:Ve(KK,[["__scopeId","data-v-f651f45f"]])},Symbol.toStringTag,{value:"Module"})),GK={},kK={className:"flex justify-between items-center gap-4 h-14"},jK=[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:So},null,-1)];function xK(t,e){return m(),Q("div",kK,jK)}const YK=Ve(GK,[["render",xK]]),zK={class:"bg-genpact-blue-box w-full px-5 mb-4"},bK={key:0},PK={class:"flex justify-between items-start text-lg px-6"},qK=h("div",null,null,-1),JK={class:"flex justify-start items-center text-white bg-genpact-darkest-blue rounded-lg py-2 px-4 cursor-pointer"},VK={class:"flex justify-start items-start w-full px-6 py-3"},HK=h("div",{class:"md:w-1/2"},null,-1),WK={class:"relative flex justify-start items-end border border-gray-300 md:rounded-full rounded-lg md:w-1/2 w-full"},ZK={class:"absolute inset-y-0 left-5 flex items-center"},XK={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"},_K={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"},$K={class:"flex justify-start items-center"},eF=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),tF={class:"flex-grow md:flex-grow-0"},iF={class:"px-6"},rF=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Current Topic List ",-1),nF={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},oF={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},sF=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),AF={class:"px-3 py-4 font-medium text-gray-900"},aF={class:"px-3 py-4"},cF={class:"px-3 py-4 text-center"},uF={class:"px-1.5 py-4 text-center"},lF=["onClick"],gF={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"},EF=[h("img",{class:"w-6 h-6 block loadercss",src:yi,alt:"Loader Gif"},null,-1)],kS=Object.freeze(Object.defineProperty({__proto__:null,default:ke({__name:"SkillData",setup(t){const e=w([]),i=w(),r=w(""),s=w(""),o=w(!1),A=w([!0]),n=Pe(),a=It(),c=na(),u=w(""),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"})),n.isTopicPending=!1,n.topicNameForSkillData="",n.descriptionForSkillData="",n.offeringTypeForSkillData="",n.enableInputbox=!0}catch{a.setError("Invalid Router!!")}},g=async(I,d)=>{var M,B,y;try{console.log("isTopicPending------->",n.isTopicPending),n.topicNameForSkillData=I.Topic,n.descriptionForSkillData=I.Description,n.offeringTypeForSkillData=I.OfferingType,n.enableInputbox=!1,A.value[d]=!1;const L=await Ai(`/fetchTempTopic?Topic=${n.topicNameForSkillData}`);n.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&&(n.isTopicPending=!0),A.value[d]=!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),Le.isAxiosError(L)){const U=L;a.setError(((y=U.response)==null?void 0:y.data).message)}else a.setError("There was an issue with route")}},E=async()=>{var I,d,M,B,y,L;try{const U=await Ai("/FetchSkillData");console.log("role value ",(I=U==null?void 0:U.data)==null?void 0:I.role),i.value=((d=U==null?void 0:U.data)==null?void 0:d.body)||[],u.value=(M=U==null?void 0:U.data)==null?void 0:M.role,e.value=i.value,console.log("length",(B=U==null?void 0:U.data)==null?void 0:B.body),console.log("data",(y=U==null?void 0:U.data)==null?void 0:y.body)}catch(U){if(console.error(U),Le.isAxiosError(U)){const D=U;a.setError(((L=D.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(d=>d.Topic.toLowerCase().includes(I.target.value.toLowerCase()))},p=I=>{console.log(I.target.value),I.target.value===""&&(e.value=i.value),console.log("Invoked Knowledge Corpus Search"),e.value=i.value.filter(d=>d.OfferingType.toLowerCase().includes(I.target.value.toLowerCase()))},S=()=>{r.value="",s.value="",e.value=i.value};return ri(async()=>{await E(),o.value=!0,A.value=Array(e.value.length).fill(!0),console.log("array",A.value)}),(I,d)=>(m(),Q(De,null,[h("nav",zK,[oe(YK)]),o.value?(m(),Q("div",bK,[h("div",PK,[qK,h("div",JK,[oe(f(zm),{class:"w-7 h-7 mr-1"}),h("button",{onClick:l,class:"font-bold"},"Add New Topic")])]),h("div",VK,[HK,h("div",WK,[h("div",ZK,[oe(f(xm),{class:"w-5 h-5 mr-5 hidden md:flex"})]),h("div",XK,[h("div",_K,[h("div",$K,[Ge(h("input",{id:"topic-search",type:"search",onInput:C,"onUpdate:modelValue":d[0]||(d[0]=M=>r.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),[[_e,r.value]])]),eF,h("div",tF,[Ge(h("input",{id:"offering-search",type:"search",onInput:p,"onUpdate:modelValue":d[1]||(d[1]=M=>s.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),[[_e,s.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",iF,[rF,h("div",nF,[h("table",oF,[sF,h("tbody",null,[(m(!0),Q(De,null,ht(e.value,(M,B)=>(m(),Q("tr",{key:B,class:"odd:bg-white even:bg-gray-100"},[h("th",AF,Re(M.Topic||"title"),1),h("td",aF,Re(M.Description||"desc"),1),h("td",cF,Re(M.OfferingType||"Knowledge Corpus"),1),h("td",uF,[A.value[B]?(m(),Q("button",{key:0,id:"index",onClick:y=>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,lF)):(m(),Q("div",gF,EF))])]))),128))])])])])])):(m(),Pi(al,{key:1}))],64))}})},Symbol.toStringTag,{value:"Module"})),hF={className:"flex justify-between items-center gap-4 h-14"},CF=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),IF=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Data",-1),pF=h("img",{class:"md:w-36 w-20",src:So},null,-1),dF=ke({__name:"HeaderForEditSkillData",setup(t){const e=na(),i=()=>{Xn(()=>{sessionStorage.removeItem("dataViewAccess")}),e.push({name:"SkillData"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")};return(r,s)=>(m(),Q("div",hF,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[oe(f(DC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),CF]),IF,pF]))}}),ki=t=>(wt("data-v-18de1cf9"),t=t(),mt(),t),SF={class:"bg-genpact-blue-box w-full px-5 mb-6"},MF={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},BF=ki(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[ft("Topic Name "),h("span",{class:"label"},"*")])],-1)),vF={class:"col-span-4"},RF=["disabled"],wF=ki(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[ft("Description "),h("span",{class:"label"},"*")])],-1)),mF={class:"col-span-4"},fF=ki(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"Knowledge Corpus",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[ft("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),QF={class:"col-span-4"},DF=ki(()=>h("div",{class:"col-span-1"},null,-1)),yF={class:"col-span-4"},TF={class:"md:flex block justify-between items-center space-y-2"},LF=["disabled"],UF={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-4 py-2"},OF=[ki(()=>h("img",{class:"w-6 h-6 block loadercss",src:yi,alt:"Loader Gif"},null,-1))],NF=["disabled"],KF={key:3,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-10 py-2"},FF=[ki(()=>h("img",{class:"w-6 h-6 block loadercss",src:yi,alt:"Loader Gif"},null,-1))],GF=ki(()=>h("div",{class:"col-span-1"},null,-1)),kF={key:0,class:"col-span-4"},jF=[ki(()=>h("div",{class:"p-2 items-center text-lg font-bold bg-gray-200"}," This topic is under review and cannot be submitted again at this moment ",-1))],xF={key:0,class:"pl-16 pr-8 py-2"},YF={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},zF={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},bF=ki(()=>h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Score")])],-1)),PF={key:0,class:"px-3 py-4 font-medium text-gray-900 text-center"},qF={key:1,class:"px-3 py-4"},JF={key:2,class:"px-3 py-4 text-center"},VF={key:3,class:"px-3 py-4 text-center"},HF={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},WF={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},ZF=ke({__name:"EditSkillData",setup(t){const e=Pe(),i=It(),r=w(!0),s=w(!0),o=w(!1),A=w(""),n=w(""),a=w(!1),c=w(!1),u=w(),l=w(),g=w([]),E=async()=>{var S,I,d,M,B,y,L;try{const U={question:e.descriptionForSkillData};console.log("question",n.value),r.value=!1;const D=await at("/SearchSkillTags",U);console.log("abc",(S=D==null?void 0:D.data)==null?void 0:S.body),l.value=(d=(I=D==null?void 0:D.data)==null?void 0:I.body)==null?void 0:d.length,console.log("ARRAY LENGTH",l.value),u.value=((M=D==null?void 0:D.data)==null?void 0:M.body)||[],g.value=u.value,console.log("length",(y=(B=D==null?void 0:D.data)==null?void 0:B.body)==null?void 0:y.length),console.log("data",D),r.value=!0,a.value=!0,c.value=!0,console.log("showSubmitButton",c.value)}catch(U){if(console.error(U),r.value=!0,Le.isAxiosError(U)){const D=U;i.setError(((L=D.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};s.value=!1,console.log("payload-=====>",I);const d=await at("/InsertIntoTempSkillFile",I);console.log("data",d),A.value="Data Submitted Successfully!",s.value=!0,p()}catch(I){if(console.error(I),s.value=!0,Le.isAxiosError(I)){const d=I;i.setError(((S=d.response)==null?void 0:S.data).message)}else i.setError("There was an issue while inserting data")}},p=()=>{o.value=!0,setTimeout(()=>{o.value=!1,Xn(()=>{sessionStorage.removeItem("dataViewAccess")}),Mn.push({name:"SkillData"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")},3e3),c.value=!1};return(S,I)=>(m(),Q(De,null,[h("nav",SF,[oe(dF)]),h("div",MF,[BF,h("div",vF,[Ge(h("input",{disabled:f(e).enableInputbox!==!0,class:ge([f(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]=d=>f(e).topicNameForSkillData=d),id:"topic",placeholder:"Write here...",required:""},null,10,RF),[[_e,f(e).topicNameForSkillData]])]),wF,h("div",mF,[Ge(h("textarea",{"onUpdate:modelValue":I[1]||(I[1]=d=>f(e).descriptionForSkillData=d),onInput:I[2]||(I[2]=d=>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),[[_e,f(e).descriptionForSkillData]])]),fF,h("div",QF,[Ge(h("input",{"onUpdate:modelValue":I[3]||(I[3]=d=>f(e).offeringTypeForSkillData=d),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),[[_e,f(e).offeringTypeForSkillData]])]),DF,h("div",yF,[h("div",TF,[r.value?(m(),Q("button",{key:0,disabled:f(e).isTopicPending===!0,class:ge([f(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,LF)):(m(),Q("div",UF,OF)),s.value?(m(),Q("button",{key:2,disabled:c.value!==!0,class:ge([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,NF)):(m(),Q("div",KF,FF))])]),GF,f(e).isTopicPending?(m(),Q("div",kF,jF)):Se("",!0)]),a.value?(m(),Q("div",xF,[h("div",YF,[h("table",zF,[bF,h("tbody",null,[(m(!0),Q(De,null,ht(g.value,(d,M)=>(m(),Q("tr",{key:M,class:"odd:bg-white even:bg-gray-100"},[d.Topic!==f(e).topicNameForSkillData?(m(),Q("th",PF,Re(d.Topic||"title"),1)):Se("",!0),d.Topic!==f(e).topicNameForSkillData?(m(),Q("td",qF,Re(d.Description||"desc"),1)):Se("",!0),d.Topic!==f(e).topicNameForSkillData?(m(),Q("td",JF,Re(d.OfferingType||"Knowledge Corpus"),1)):Se("",!0),d.Topic!==f(e).topicNameForSkillData?(m(),Q("td",VF,Re(d.new_tag),1)):Se("",!0)]))),128))])])])])):Se("",!0),Ge(h("div",HF,[h("div",WF,Re(A.value),1)],512),[[En,o.value]])],64))}}),V1="",XF=Object.freeze(Object.defineProperty({__proto__:null,default:Ve(ZF,[["__scopeId","data-v-18de1cf9"]])},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 Automation ",-1),h("img",{class:"md:w-36 w-20",src:So},null,-1)];function tG(t,e){return m(),Q("div",$F,eG)}const iG=Ve(_F,[["render",tG]]),rG={class:"bg-genpact-blue-box w-full px-5 mb-4"},nG={key:0},oG={class:"w-full px-6 py-1"},sG=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Topic Update Request ",-1),AG={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},aG={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},cG=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),uG={class:"px-3 py-4 font-medium text-gray-900 text-center"},lG={class:"px-3 py-4"},gG={class:"px-3 py-4 text-center"},EG={class:"px-2 py-4 text-center"},hG={class:"px-2 py-4 text-gray-500 hover:text-genpact-darkest-blue"},CG=Object.freeze(Object.defineProperty({__proto__:null,default:ke({__name:"SkillAutomation",setup(t){const e=w([]),i=w(),r=w(!1),s=Pe(),o=It(),A=na(),n=c=>{sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","skillAutomation"),A.replace({name:"EditSkillAdminData"}),s.topicNameForSkillData=c.Topic,s.descriptionForSkillData=c.Description,s.offeringTypeForSkillData=c.OfferingType,s.enableInputbox=!1},a=async()=>{var c,u;try{const l=await Ai("/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),Le.isAxiosError(l)){const g=l;o.setError(((u=g.response)==null?void 0:u.data).message)}else o.setError("There was an issue while fetching data")}};return ri(async()=>{await a(),r.value=!0}),(c,u)=>(m(),Q(De,null,[h("nav",rG,[oe(iG)]),r.value?(m(),Q("div",nG,[h("div",oG,[sG,h("div",AG,[h("table",aG,[cG,h("tbody",null,[(m(!0),Q(De,null,ht(e.value,(l,g)=>(m(),Q("tr",{key:g,class:"odd:bg-white even:bg-gray-100"},[h("th",uG,Re(l.Topic||"title"),1),h("td",lG,Re(l.Description||"desc"),1),h("td",gG,Re(l.OfferingType||"Knowledge Corpus"),1),h("td",EG,Re(l.DuplicateExists),1),h("td",hG,[oe(f(km),{onClick:E=>n(l),class:"w-8 h-8 text-center cursor-pointer hover:-translate-y-1 hover:scale-110 duration-300"},null,8,["onClick"])])]))),128))])])])])])):(m(),Pi(al,{key:1}))],64))}})},Symbol.toStringTag,{value:"Module"})),IG={className:"flex justify-between items-center gap-4 h-14"},pG=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),dG=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Admin Data",-1),SG=h("img",{class:"md:w-36 w-20",src:So},null,-1),MG=ke({__name:"HeaderForEditSKillAdminDatas",setup(t){const e=na(),i=()=>{const r=sessionStorage.getItem("role");console.log("role",r),r==="user"?e.push({name:"SkillData"}):r==="admin"?e.push({name:"SkillData"}):e.push({name:"SkillAutomation"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")};return(r,s)=>(m(),Q("div",IG,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[oe(f(DC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),pG]),dG,SG]))}}),li=t=>(wt("data-v-ecf2c818"),t=t(),mt(),t),BG={class:"bg-genpact-blue-box w-full px-5 mb-6"},vG={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},RG=li(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[ft("Topic Name "),h("span",{class:"label"},"*")])],-1)),wG={class:"col-span-4"},mG=["disabled"],fG=li(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[ft("Description "),h("span",{class:"label"},"*")])],-1)),QG={class:"col-span-4"},DG=li(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"Knowledge Corpus",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[ft("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),yG={class:"col-span-4"},TG=li(()=>h("div",{class:"col-span-1"},null,-1)),LG={class:"col-span-4"},UG={class:"grid md:grid-cols-5 grid-cols-1 justify-start items-center gap-2"},OG={class:"col-span-1"},NG=["disabled"],KG={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40"},FG=[li(()=>h("img",{class:"w-10 h-10 block loadercss",src:yi,alt:"Loader Gif"},null,-1))],GG=li(()=>h("div",{class:"col-span-1"},null,-1)),kG=li(()=>h("div",{class:"col-span-1"},null,-1)),jG={class:"col-span-1 flex md:justify-end justify-start items-end"},xG={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},YG=[li(()=>h("img",{class:"w-10 h-10 block loadercss",src:yi,alt:"Loader Gif"},null,-1))],zG={class:"col-span-1 flex md:justify-end justify-start items-end"},bG=["disabled"],PG={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},qG=[li(()=>h("img",{class:"w-10 h-10 block loadercss",src:yi,alt:"Loader Gif"},null,-1))],JG={class:"pl-16 pr-8 py-2"},VG={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},HG={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},WG=li(()=>h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Score")])],-1)),ZG={class:"px-3 py-4 font-medium text-gray-900 text-center"},XG={class:"px-3 py-4"},_G={class:"px-3 py-4 text-center"},$G=li(()=>h("td",{class:"px-3 py-4 text-center"},Re("1.05"),-1)),ek={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},tk={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},ik=ke({__name:"EditSkillAdminData",setup(t){const e=Pe(),i=It(),r=w(!0),s=w(!0),o=w(!0),A=w(!1),n=w(""),a=w(!1),c=w(!1),u=w(),l=w(),g=w(""),E=w([]),C=async()=>{var d,M,B,y,L,U;try{const D={question:e.descriptionForSkillData};console.log("question",n.value),r.value=!1;const k=await at("/SearchSkillTags",D);l.value=(M=(d=k==null?void 0:k.data)==null?void 0:d.body)==null?void 0:M.length,console.log("ARRAY LENGTH",l.value),u.value=((B=k==null?void 0:k.data)==null?void 0:B.body)||[],E.value=u.value,console.log("length",(L=(y=k==null?void 0:k.data)==null?void 0:y.body)==null?void 0:L.length),console.log("data",k),r.value=!0,a.value=!0,c.value=!0,console.log("showSubmitButton",c.value)}catch(D){if(console.error(D),r.value=!0,Le.isAxiosError(D)){const k=D;i.setError(((U=k.response)==null?void 0:U.data).message)}else i.setError("We ran into an issue while fetching duplicate values.")}},p=async()=>{var d;try{console.log("before rejecting topic"),s.value=!1;const M=encodeURIComponent(e.topicNameForSkillData),B=await Ai(`/rejectTempTopic?Topic=${M}`);console.log("encoded topic",M),console.log("response",B),s.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),s.value=!0,Le.isAxiosError(M)){const B=M;i.setError(((d=B.response)==null?void 0:d.data).message)}else i.setError("We ran into an issue while rejecting values.")}},S=async()=>{var d;try{const M={Topic:e.topicNameForSkillData,Description:e.descriptionForSkillData,OfferingType:e.offeringTypeForSkillData};console.log("payload-=====>",M),o.value=!1;const B=await at("/editMasterSkillFile",M);console.log("data",B),o.value=!0,g.value="Data Submitted Successfully!",I()}catch(M){if(console.error(M),o.value=!0,Le.isAxiosError(M)){const B=M;i.setError(((d=B.response)==null?void 0:d.data).message)}else i.setError("There was an issue while inserting data")}},I=()=>{A.value=!0,setTimeout(()=>{A.value=!1;const d=sessionStorage.getItem("role");console.log("role",d),d==="user"?Mn.push({name:"SkillData"}):d==="admin"?Mn.push({name:"SkillData"}):Mn.push({name:"SkillAutomation"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")},3e3)};return(d,M)=>(m(),Q(De,null,[h("nav",BG,[oe(MG)]),h("div",vG,[RG,h("div",wG,[Ge(h("input",{disabled:f(e).enableInputbox!==!0,class:ge([f(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=>f(e).topicNameForSkillData=B),id:"topic",placeholder:"Write here...",required:""},null,10,mG),[[_e,f(e).topicNameForSkillData]])]),fG,h("div",QG,[Ge(h("textarea",{"onUpdate:modelValue":M[1]||(M[1]=B=>f(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),[[_e,f(e).descriptionForSkillData]])]),DG,h("div",yG,[Ge(h("input",{"onUpdate:modelValue":M[3]||(M[3]=B=>f(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),[[_e,f(e).offeringTypeForSkillData]])]),TG,h("div",LG,[h("div",UG,[h("div",OG,[r.value?(m(),Q("button",{key:0,disabled:f(e).isTopicPending===!0,class:ge([f(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,NG)):(m(),Q("div",KG,FG))]),GG,kG,h("div",jG,[s.value?(m(),Q("button",{key:0,type:"button",onClick:p,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",xG,YG))]),h("div",zG,[o.value?(m(),Q("button",{key:0,type:"submit",disabled:c.value!==!0,class:ge([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,bG)):(m(),Q("div",PG,qG))])])])]),Ge(h("div",JG,[h("div",VG,[h("table",HG,[WG,h("tbody",null,[(m(!0),Q(De,null,ht(E.value,(B,y)=>(m(),Q("tr",{key:y,class:"odd:bg-white even:bg-gray-100"},[h("th",ZG,Re(B.Topic||"title"),1),h("td",XG,Re(B.Description||"desc"),1),h("td",_G,Re(B.OfferingType||"Knowledge Corpus"),1),$G]))),128))])])])],512),[[En,a.value]]),Ge(h("div",ek,[h("div",tk,Re(g.value),1)],512),[[En,A.value]])],64))}}),tj="",rk=Object.freeze(Object.defineProperty({__proto__:null,default:Ve(ik,[["__scopeId","data-v-ecf2c818"]])},Symbol.toStringTag,{value:"Module"})),nk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgEAAAIBCAYAAADQ5mxhAAAACXBIWXMAAAsSAAALEgHS3X78AAAfXUlEQVR4nO3dsY7kRp7gYeZhjfI0uhfYg/YBpoDSA8ho+duGxh0NCpDc9VrmmZJ160pAYSR3ZdSdrTbmBRLIeYAR9g2065WXB7aCUnV1VVcwM0hGxP/7gELNYHeqM5kZ5I9kkNwdj8cBAIjnf/jMASAmEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEo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yKoz+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==",ok={},sk={class:"w-screen h-screen flex justify-center"},Ak=[h("div",{class:"flex flex-col justify-center items-center gap-6"},[h("img",{class:"h-24",src:nk}),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 ak(t,e){return m(),Q("div",sk,Ak)}const jS=Object.freeze(Object.defineProperty({__proto__:null,default:Ve(ok,[["render",ak]])},Symbol.toStringTag,{value:"Module"}))});
|
|
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,n){if(n)return A.send(new r.SpeechConnectionMessage(t.MessageType.Text,"speech.config",this.privSynthesisTurn.requestId,"application/json",n))}sendSsmlMessage(A,n,a){return A.send(new r.SpeechConnectionMessage(t.MessageType.Text,"ssml",a,"application/ssml+xml",n))}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 gA.SynthesisAdapterBase=s,s.telemetryDataEnabled=!0,gA}var EA={},MS;function _4(){if(MS)return EA;MS=1,Object.defineProperty(EA,"__esModule",{value:!0}),EA.AvatarSynthesisAdapter=void 0;const t=V(),e=ne();let i=class extends e.SynthesisAdapterBase{constructor(s,o,A,n,a){super(s,o,A,void 0),this.privAvatarSynthesizer=n,this.privSynthesizer=n,this.privAvatarConfig=a}setSynthesisContextSynthesisSection(){this.privSynthesisContext.setSynthesisSection(void 0)}setSpeechConfigSynthesisSection(){var s,o,A,n,a,c,u,l,g,E,C,p,S,I,d,M,B;this.privSynthesizerConfig.synthesisVideoSection={format:{bitrate:(s=this.privAvatarConfig.videoFormat)==null?void 0:s.bitrate,codec:(o=this.privAvatarConfig.videoFormat)==null?void 0:o.codec,crop:{bottomRight:{x:(a=(n=(A=this.privAvatarConfig.videoFormat)==null?void 0:A.cropRange)==null?void 0:n.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=(p=this.privAvatarConfig.videoFormat)==null?void 0:p.cropRange)==null?void 0:S.topLeft)==null?void 0:I.y}},resolution:{height:(d=this.privAvatarConfig.videoFormat)==null?void 0:d.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(s){if(this.privAvatarSynthesizer.avatarEventReceived){const o=new t.AvatarEventArgs(s.Data.Offset,s.Data.Name);try{this.privAvatarSynthesizer.avatarEventReceived(this.privAvatarSynthesizer,o)}catch{}}}};return EA.AvatarSynthesisAdapter=i,EA}var hA={},BS;function $4(){if(BS)return hA;BS=1,Object.defineProperty(hA,"__esModule",{value:!0}),hA.SpeechSynthesisAdapter=void 0;const t=V(),e=ne();let i=class extends e.SynthesisAdapterBase{constructor(s,o,A,n,a){super(s,o,A,a),this.privSpeechSynthesizer=n,this.privSynthesizer=n}setSynthesisContextSynthesisSection(){this.privSynthesisContext.setSynthesisSection(this.privSpeechSynthesizer)}onSynthesisStarted(s){const o=new t.SpeechSynthesisEventArgs(new t.SpeechSynthesisResult(s,t.ResultReason.SynthesizingAudioStarted));this.privSpeechSynthesizer.synthesisStarted&&this.privSpeechSynthesizer.synthesisStarted(this.privSpeechSynthesizer,o)}onSynthesizing(s){if(this.privSpeechSynthesizer.synthesizing)try{const o=this.privSynthesisTurn.audioOutputFormat.addHeader(s),A=new t.SpeechSynthesisEventArgs(new t.SpeechSynthesisResult(this.privSynthesisTurn.requestId,t.ResultReason.SynthesizingAudio,o));this.privSpeechSynthesizer.synthesizing(this.privSpeechSynthesizer,A)}catch{}}onSynthesisCancelled(s){if(this.privSpeechSynthesizer.SynthesisCanceled){const o=new t.SpeechSynthesisEventArgs(s);try{this.privSpeechSynthesizer.SynthesisCanceled(this.privSpeechSynthesizer,o)}catch{}}}onSynthesisCompleted(s){if(this.privSpeechSynthesizer.synthesisCompleted)try{this.privSpeechSynthesizer.synthesisCompleted(this.privSpeechSynthesizer,new t.SpeechSynthesisEventArgs(s))}catch{}}onWordBoundary(s){if(this.privSpeechSynthesizer.wordBoundary)try{this.privSpeechSynthesizer.wordBoundary(this.privSpeechSynthesizer,s)}catch{}}onVisemeReceived(s){if(this.privSpeechSynthesizer.visemeReceived)try{this.privSpeechSynthesizer.visemeReceived(this.privSpeechSynthesizer,s)}catch{}}onBookmarkReached(s){if(this.privSpeechSynthesizer.bookmarkReached)try{this.privSpeechSynthesizer.bookmarkReached(this.privSpeechSynthesizer,s)}catch{}}};return hA.SpeechSynthesisAdapter=i,hA}var CA={},vS;function eO(){if(vS)return CA;vS=1,Object.defineProperty(CA,"__esModule",{value:!0}),CA.SynthesisRestAdapter=void 0;const t=lt(),e=V(),i=ui(),r=ut;let s=class{constructor(A,n){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=n}getVoicesList(A){return this.privRestAdapter.setHeaders(r.HeaderNames.ConnectionId,A),this.privAuthentication.fetch(A).then(n=>(this.privRestAdapter.setHeaders(n.headerName,n.token),this.privRestAdapter.request(t.RestRequestType.Get,this.privUri)))}};return CA.SynthesisRestAdapter=s,CA}var ng={},RS;function tO(){return RS||(RS=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SynthesizerConfig=t.SynthesisServiceType=void 0;const e=ne();var i;(function(s){s[s.Standard=0]="Standard",s[s.Custom=1]="Custom"})(i=t.SynthesisServiceType||(t.SynthesisServiceType={}));class r{constructor(o,A){this.privSynthesisServiceType=i.Standard,this.avatarEnabled=!1,this.privSpeechServiceConfig=o||new e.SpeechServiceConfig(new e.Context(null)),this.privParameters=A}get parameters(){return this.privParameters}get synthesisServiceType(){return this.privSynthesisServiceType}set synthesisServiceType(o){this.privSynthesisServiceType=o}set synthesisVideoSection(o){this.privSpeechServiceConfig.Context.synthesis={video:o}}get SpeechServiceConfig(){return this.privSpeechServiceConfig}}t.SynthesizerConfig=r}(ng)),ng}var IA={},wS;function iO(){if(wS)return IA;wS=1,Object.defineProperty(IA,"__esModule",{value:!0}),IA.SynthesisContext=void 0;const t=V();let e=class{constructor(){this.privContext={}}setSection(r,s){this.privContext[r]=s}set audioOutputFormat(r){this.privAudioOutputFormat=r}toJSON(){return JSON.stringify(this.privContext)}setSynthesisSection(r){const s=this.buildSynthesisContext(r);this.setSection("synthesis",s)}buildSynthesisContext(r){return{audio:{metadataOptions:{bookmarkEnabled:!!(r!=null&&r.bookmarkReached),punctuationBoundaryEnabled:r==null?void 0:r.properties.getProperty(t.PropertyId.SpeechServiceResponse_RequestPunctuationBoundary,!!(r!=null&&r.wordBoundary)),sentenceBoundaryEnabled:r==null?void 0:r.properties.getProperty(t.PropertyId.SpeechServiceResponse_RequestSentenceBoundary,!1),sessionEndEnabled:!0,visemeEnabled:!!(r!=null&&r.visemeReceived),wordBoundaryEnabled:r==null?void 0:r.properties.getProperty(t.PropertyId.SpeechServiceResponse_RequestWordBoundary,!!(r!=null&&r.wordBoundary))},outputFormat:this.privAudioOutputFormat.requestAudioFormatString},language:{autoDetection:r==null?void 0:r.autoDetectSourceLanguage}}}};return IA.SynthesisContext=e,IA}var pA={},mS;function rO(){if(mS)return pA;mS=1,Object.defineProperty(pA,"__esModule",{value:!0}),pA.SpeakerRecognitionConfig=void 0;const t=ne();let e=class{constructor(r,s){this.privContext=r||new t.Context(null),this.privParameters=s}get parameters(){return this.privParameters}get Context(){return this.privContext}};return pA.SpeakerRecognitionConfig=e,pA}var dA={},fS;function nO(){if(fS)return dA;fS=1,Object.defineProperty(dA,"__esModule",{value:!0}),dA.SpeakerServiceRecognizer=void 0;const t=lt(),e=Ee(),i=V(),r=ne(),s=Oi;let o=class extends r.ServiceRecognizerBase{constructor(n,a,c,u,l){super(n,a,c,u,l),this.privSpeakerRecognizer=l,this.privSpeakerAudioSource=c,this.recognizeSpeaker=g=>this.recognizeSpeakerOnce(g),this.sendPrePayloadJSONOverride=()=>this.noOp()}processTypeSpecificMessages(n){let a=!1;const c=new i.PropertyCollection;switch(n.messageType===e.MessageType.Text&&c.setProperty(i.PropertyId.SpeechServiceResponse_JsonResult,n.textBody),n.path.toLowerCase()){case"speaker.response":const l=JSON.parse(n.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(n,a,c,u,l){if(new i.PropertyCollection().setProperty(r.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(n){this.privSpeakerModel=n,this.voiceProfileType=n.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(n)),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(n){const a=await this.fetchConnection();await this.sendSpeakerRecognition(a,n)}async sendSpeakerRecognition(n,a){const c=JSON.stringify(a);return n.send(new s.SpeechConnectionMessage(e.MessageType.Text,"speaker.context",this.privRequestSession.requestId,"application/json; charset=utf-8",c))}extractSpeakerContext(n){return{features:{interimResult:"enabled",progressiveDetection:"disabled"},profileIds:n.profileIds,scenario:n.scenario}}};return dA.SpeakerServiceRecognizer=o,dA}var SA={},QS;function oO(){if(QS)return SA;QS=1,Object.defineProperty(SA,"__esModule",{value:!0}),SA.VoiceServiceRecognizer=void 0;const t=lt(),e=Ee(),i=V(),r=ne(),s=Oi;let o=class extends r.ServiceRecognizerBase{constructor(n,a,c,u,l){super(n,a,c,u,l),this.privDeferralMap=new e.DeferralMap,this.privSpeakerAudioSource=c,this.sendPrePayloadJSONOverride=()=>this.noOp()}set SpeakerAudioSource(n){this.privSpeakerAudioSource=n}processTypeSpecificMessages(n){let a=!1;const c=new i.PropertyCollection;switch(n.messageType===e.MessageType.Text&&c.setProperty(i.PropertyId.SpeechServiceResponse_JsonResult,n.textBody),n.path.toLowerCase()){case"speaker.profiles":const l=JSON.parse(n.textBody);switch(l.operation.toLowerCase()){case"create":this.handleCreateResponse(l,n.requestId);break;case"delete":case"reset":this.handleResultResponse(l,n.requestId);break;case"fetch":const p=JSON.parse(n.textBody);this.handleFetchResponse(p,n.requestId);break}a=!0;break;case"speaker.phrases":const g=JSON.parse(n.textBody);this.handlePhrasesResponse(g,n.requestId),a=!0;break;case"speaker.profile.enrollment":const E=JSON.parse(n.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(n.requestId)&&this.privDeferralMap.complete(n.requestId,C),this.privRequestSession.onSpeechEnded(),a=!0;break}const u=new e.Deferred;return u.resolve(a),u.promise}cancelRecognition(n,a,c,u,l){new i.PropertyCollection().setProperty(r.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(n,a){this.voiceProfileType=n.toString();const c=this.connectImpl();try{const u=new e.Deferred;return await c,await this.sendCreateProfile(u,n,a),this.receiveMessage(),u.promise}catch(u){throw u}}async resetProfile(n){return this.voiceProfileType=n.profileType.toString(),this.sendCommonRequest("reset",n.profileType,n)}async deleteProfile(n){return this.voiceProfileType=n.profileType.toString(),this.sendCommonRequest("delete",n.profileType,n)}async retrieveEnrollmentResult(n){return this.voiceProfileType=n.profileType.toString(),this.privExpectedProfileId=n.profileId,this.sendCommonRequest("fetch",n.profileType,n)}async getAllProfiles(n){return this.voiceProfileType=n.toString(),this.sendCommonRequest("fetch",n)}async getActivationPhrases(n,a){this.voiceProfileType=n.toString();const c=this.connectImpl();try{const u=new e.Deferred;return await c,await this.sendPhrasesRequest(u,n,a),this.receiveMessage(),u.promise}catch(u){throw u}}async enrollProfile(n){this.voiceProfileType=n.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(n,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 p=new i.SessionEventArgs(this.privRequestSession.sessionId);return this.privRecognizer.sessionStarted&&this.privRecognizer.sessionStarted(this.privRecognizer,p),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(n,a){const c=await this.fetchConnection();this.privRequestSession.onSpeechContext(),this.privDeferralMap.add(this.privRequestSession.requestId,a),await this.sendBaseRequest(c,"enroll",this.scenarioFrom(n.profileType),n)}async sendPhrasesRequest(n,a,c){const u=await this.fetchConnection();this.privRequestSession.onSpeechContext(),this.privDeferralMap.add(this.privRequestSession.requestId,n);const l=this.scenarioFrom(a),g={locale:c,scenario:l};return u.send(new s.SpeechConnectionMessage(e.MessageType.Text,"speaker.profile.phrases",this.privRequestSession.requestId,"application/json; charset=utf-8",JSON.stringify(g)))}async sendCreateProfile(n,a,c){const u=await this.fetchConnection();this.privRequestSession.onSpeechContext(),this.privDeferralMap.add(this.privRequestSession.requestId,n);const l=a===i.VoiceProfileType.TextIndependentIdentification?"TextIndependentIdentification":a===i.VoiceProfileType.TextIndependentVerification?"TextIndependentVerification":"TextDependentVerification",g={locale:c,number:"1",scenario:l};return u.send(new s.SpeechConnectionMessage(e.MessageType.Text,"speaker.profile.create",this.privRequestSession.requestId,"application/json; charset=utf-8",JSON.stringify(g)))}async sendCommonRequest(n,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,n,this.scenarioFrom(a),c),this.receiveMessage(),l.promise}catch(l){throw l}}async sendBaseRequest(n,a,c,u){const l={scenario:c};return u?l.profileIds=[u.profileId]:l.maxPageSize=-1,n.send(new s.SpeechConnectionMessage(e.MessageType.Text,`speaker.profile.${a}`,this.privRequestSession.requestId,"application/json; charset=utf-8",JSON.stringify(l)))}extractSpeakerContext(n){return{features:{interimResult:"enabled",progressiveDetection:"disabled"},profileIds:n.profileIds,scenario:n.scenario}}handlePhrasesResponse(n,a){if(this.privDeferralMap.getId(a))if(n.status.statusCode.toLowerCase()!=="success"){const c=i.ResultReason.Canceled,u=new i.VoiceProfilePhraseResult(c,n.status.statusCode,n.passPhraseType,[]);this.privDeferralMap.complete(a,u)}else if(n.phrases&&n.phrases.length>0){const c=i.ResultReason.EnrollingVoiceProfile,u=new i.VoiceProfilePhraseResult(c,n.status.statusCode,n.passPhraseType,n.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(n,a){if(n.profiles&&n.profiles.length>0)if(this.privDeferralMap.getId(a)){const c=n.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(n,a){if(this.privDeferralMap.getId(a)){const c=n.operation.toLowerCase()==="delete"?i.ResultReason.DeletedVoiceProfile:i.ResultReason.ResetVoiceProfile,u=n.status.statusCode.toLowerCase()==="success"?c:i.ResultReason.Canceled,l=new i.VoiceProfileResult(u,`statusCode: ${n.status.statusCode}, errorDetails: ${n.status.reason}`);this.privDeferralMap.complete(a,l)}else throw new Error(`Voice Profile create request for requestID ${a} not found`)}handleFetchResponse(n,a){if(this.privDeferralMap.getId(a)&&n.profiles[0]){if(this.privExpectedProfileId&&n.profiles.length===1&&n.profiles[0].profileId===this.privExpectedProfileId){this.privExpectedProfileId=void 0;const c=n.profiles[0],u=new i.VoiceProfileEnrollmentResult(this.enrollmentReasonFrom(c.enrollmentStatus),JSON.stringify(c),n.status.reason);this.privDeferralMap.complete(a,u)}else if(n.profiles.length>0){const c=n.profiles,u=[];for(const l of c)u.push(new i.VoiceProfileEnrollmentResult(this.enrollmentReasonFrom(l.enrollmentStatus),JSON.stringify(l),n.status.reason));this.privDeferralMap.complete(a,u)}}else throw new Error(`Voice Profile fetch request for requestID ${a} not found`)}enrollmentReasonFrom(n){switch(n.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(n){return n===i.VoiceProfileType.TextIndependentIdentification?"TextIndependentIdentification":n===i.VoiceProfileType.TextIndependentVerification?"TextIndependentVerification":"TextDependentVerification"}};return SA.VoiceServiceRecognizer=o,SA}var DS={};(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(n){this.context=n}serialize(){return JSON.stringify(this,(n,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(n){this.recognition=n.toLowerCase()}}t.SpeechServiceConfig=e;class i{constructor(n){this.system=new r,this.os=n}}t.Context=i;class r{constructor(){const n="1.44.0";this.name="SpeechSDK",this.version=n,this.build="JavaScript",this.lang="JavaScript"}}t.System=r;class s{constructor(n,a,c){this.platform=n,this.name=a,this.version=c}}t.OS=s;class o{constructor(n,a,c){this.manufacturer=n,this.model=a,this.version=c}}t.Device=o,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={}))})(DS);var yS;function ne(){return yS||(yS=1,function(t){var e=fe&&fe.__createBinding||(Object.create?function(o,A,n,a){a===void 0&&(a=n),Object.defineProperty(o,a,{enumerable:!0,get:function(){return A[n]}})}:function(o,A,n,a){a===void 0&&(a=n),o[a]=A[n]}),i=fe&&fe.__exportStar||function(o,A){for(var n in o)n!=="default"&&!Object.prototype.hasOwnProperty.call(A,n)&&e(A,o,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.AutoDetectSourceLanguagesOpenRangeOptionName=t.ForceDictationPropertyName=t.ServicePropertiesPropertyName=t.CancellationErrorCodePropertyName=t.OutputFormatPropertyName=t.SpeechSynthesisAdapter=t.AvatarSynthesisAdapter=void 0,i(Sa,t),i(za,t),i(mn,t),i(pI,t),i(dI,t),i(VU(),t),i(HU(),t),i(dc,t),i(WU(),t),i(ZU(),t),i(XU(),t),i(Nd,t),i(Sc,t),i($U(),t),i(e4(),t),i(t4(),t),i(i4(),t),i(gd(),t),i(r4(),t),i(Yd,t),i(n4(),t),i(Mc,t),i(s4(),t),i(A4(),t),i(vc,t),i(Rc,t),i(wc,t),i(a4(),t),i(c4(),t),i(u4(),t),i(l4(),t),i(g4(),t),i(mc,t),i(h4(),t),i(fc,t),i($d,t),i(Qc,t),i(Tc,t),i(Lc,t),i(D4(),t),i(Nc,t),i(J4(),t),i(rg,t),i(Z4(),t),i(X4(),t);var r=_4();Object.defineProperty(t,"AvatarSynthesisAdapter",{enumerable:!0,get:function(){return r.AvatarSynthesisAdapter}});var s=$4();Object.defineProperty(t,"SpeechSynthesisAdapter",{enumerable:!0,get:function(){return s.SpeechSynthesisAdapter}}),i(eO(),t),i(tO(),t),i(iO(),t),i(rO(),t),i(nO(),t),i(oO(),t),i(DS,t),t.OutputFormatPropertyName="OutputFormat",t.CancellationErrorCodePropertyName="CancellationErrorCode",t.ServicePropertiesPropertyName="ServiceProperties",t.ForceDictationPropertyName="ForceDictation",t.AutoDetectSourceLanguagesOpenRangeOptionName="UND"}(cl)),cl}(function(t){var e=fe&&fe.__createBinding||(Object.create?function(s,o,A,n){n===void 0&&(n=A),Object.defineProperty(s,n,{enumerable:!0,get:function(){return o[A]}})}:function(s,o,A,n){n===void 0&&(n=A),s[n]=o[A]}),i=fe&&fe.__exportStar||function(s,o){for(var A in s)A!=="default"&&!Object.prototype.hasOwnProperty.call(o,A)&&e(o,s,A)};Object.defineProperty(t,"__esModule",{value:!0});const r=ne();new r.AgentConfig,i(V(),t)})(pi);const vt=[];for(let t=0;t<256;++t)vt.push((t+256).toString(16).slice(1));function sO(t,e=0){return(vt[t[e+0]]+vt[t[e+1]]+vt[t[e+2]]+vt[t[e+3]]+"-"+vt[t[e+4]]+vt[t[e+5]]+"-"+vt[t[e+6]]+vt[t[e+7]]+"-"+vt[t[e+8]]+vt[t[e+9]]+"-"+vt[t[e+10]]+vt[t[e+11]]+vt[t[e+12]]+vt[t[e+13]]+vt[t[e+14]]+vt[t[e+15]]).toLowerCase()}let og;const AO=new Uint8Array(16);function aO(){if(!og){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");og=crypto.getRandomValues.bind(crypto)}return og(AO)}const TS={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function cO(t,e,i){var s;if(TS.randomUUID&&!e&&!t)return TS.randomUUID();t=t||{};const r=t.random??((s=t.rng)==null?void 0:s.call(t))??aO();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[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 o=0;o<16;++o)e[i+o]=r[o];return e}return sO(r)}const On=It(),sg=Pe(),Nn=w(""),Vr=w(""),Kn=w(""),Ft=w(""),LS=w("");let Gi=null;const US=4e3;ri(async()=>{await Ag()});let rt=null,Hr=null,Si=null,jc=null;const hr=()=>{Si&&Si.mute(),rt&&(console.log("TTS forcibly closed"),rt.close(),rt=null),Hr=null},Ag=async()=>{var t,e,i,r;try{const s=await Ai("/fetchCompletionSubDemo1");return console.log("response",(t=s==null?void 0:s.data)==null?void 0:t.token),(e=s==null?void 0:s.data)==null?void 0:e.token}catch(s){if(console.error(s),Le.isAxiosError(s)){const o=s;console.log("Error found!"),console.error((i=o.response)==null?void 0:i.data),On.setError(((r=o.response)==null?void 0:r.data).message)}else On.setError("There was an issue while fetching data")}},xc=()=>{Gi&&clearTimeout(Gi),jc&&(jc.stopContinuousRecognitionAsync(()=>{console.log("Recognition stopped")},t=>{console.error("Error stopping recognition",t)}),jc=null)},uO=async t=>{const e=await Ag();return await hr(),new Promise((i,r)=>{const s=pi.SpeechConfig.fromAuthorizationToken(e,"eastus2");s.speechSynthesisVoiceName="en-US-EmmaMultilingualNeural",Si=new pi.SpeakerAudioDestination;const o=pi.AudioConfig.fromSpeakerOutput(Si);rt=new pi.SpeechSynthesizer(s,o);const A=cO();Hr=A,console.log("TTS request ID:",A),rt.speakTextAsync(t,n=>{if(console.log("requestId",A),console.log("requestId",Hr),A!==Hr)return console.log("TTS response ignored due to newer request"),Si==null||Si.mute(),rt==null||rt.close(),rt=null,i();n.reason===pi.ResultReason.SynthesizingAudioCompleted?i():r(new Error("Speech synthesis failed")),rt==null||rt.close(),rt=null,Hr=null},n=>{if(A!==Hr)return console.log("TTS error ignored due to newer request"),Si==null||Si.mute(),rt==null||rt.close(),rt=null,i();rt==null||rt.close(),rt=null,Hr=null,r(n)})})},lO=async t=>{const e=await Ag(),i=pi.SpeechConfig.fromAuthorizationToken(e,"eastus2");i.speechRecognitionLanguage="en-US";const r=pi.AudioConfig.fromDefaultMicrophoneInput(),s=new pi.SpeechRecognizer(i,r);return jc=s,Nn.value="",Vr.value="",s.recognizing=(o,A)=>{A.result.text&&A.result.text.trim()&&(Nn.value=A.result.text.trim(),hr(),sg.userspeaking=!0,console.log("store userspeaking recognizing",sg.userspeaking),sg.userSpeechText=(Vr.value?Vr.value+" ":"")+Nn.value,Ft.value="user",Gi&&(console.log("pauseTimeout---->",Gi),console.log("before clearing pauseTimeout"),clearTimeout(Gi)),Gi=setTimeout(()=>{Nn.value&&(t(Nn.value.trim()),Nn.value="")},US))},s.recognized=(o,A)=>{A.result.reason===pi.ResultReason.RecognizedSpeech&&A.result.text&&A.result.text.trim()&&(Vr.value+=" "+A.result.text.trim(),Gi&&clearTimeout(Gi),Gi=setTimeout(()=>{Vr.value&&(t(Vr.value),Vr.value="")},US))},s.canceled=(o,A)=>{console.error("Recognition canceled:",A)},s.startContinuousRecognitionAsync(),s},gO=async()=>{var t,e;Kn.value="",LS.value="";try{console.log("before stopping TTS"),hr(),console.log("after stopping TTS"),console.log("in startRecognition function"),await lO(i=>{i&&(console.log("STT recognized:",i),Kn.value=i)})}catch(i){if(console.error(i),Le.isAxiosError(i)){const r=i;console.log("Error found!"),console.error((t=r.response)==null?void 0:t.data),On.setError(((e=r.response)==null?void 0:e.data).message)}else On.setError("There was an issue while fetching data")}},OS=async t=>{var e,i;console.log("playRecognition called",t),LS.value="";try{(Ft.value=="user"||Ft.value=="listening")&&hr(),await uO(t)}catch(r){if(console.error(r),Le.isAxiosError(r)){const s=r;console.log("Error found!"),console.error((e=s.response)==null?void 0:e.data),On.setError(((i=s.response)==null?void 0:i.data).message)}else On.setError("There was an issue while fetching data")}};Pe();const NS=It(),Fn=w(!1),MA=w("");w(""),w(""),ri(()=>{console.log("Mounted voiceService11Labs")});const EO=async()=>{var t,e,i,r;try{const s=await Ai("/fetchCompletionSubDemo1?ellevenLabs=true");return console.log("response",(t=s==null?void 0:s.data)==null?void 0:t.token),(e=s==null?void 0:s.data)==null?void 0:e.token}catch(s){if(console.error(s),Le.isAxiosError(s)){const o=s;console.log("Error found!"),console.error((i=o.response)==null?void 0:i.data),NS.setError(((r=o.response)==null?void 0:r.data).message)}else NS.setError("There was an issue while fetching data")}};let Yc;const hO="Xb7hH8MSUJpSbSDYk0k2";w(!1);const CO=w("");let zc=[];const KS=w(!1);let Gn=!1,Gt=null,BA=null,Cr=null;w("");let Wr,Zr,kn,jn;function ag(){jn&&jn.disconnect(),Zr&&Zr.disconnect(),console.log("microphone outside->",kn),kn&&(console.log("microphone->",kn),console.log("Stopping microphone connection"),kn.disconnect()),Wr&&Wr.close()}function IO(t,e=.09){console.log("monitorMicDuringTTS called with threshold:",e),Wr=new(window.AudioContext||window.webkitAudioContext),Zr=Wr.createAnalyser(),kn=Wr.createMediaStreamSource(BA),jn=Wr.createScriptProcessor(2048,1,1),kn.connect(Zr),Zr.connect(jn),jn.connect(Wr.destination),jn.onaudioprocess=()=>{const i=new Uint8Array(Zr.frequencyBinCount);Zr.getByteFrequencyData(i);const r=i.reduce((s,o)=>s+o)/i.length;console.log("Average volume:",r),console.log("threshold * 100:",e*100),r>e*100&&(t(),console.log("onInterrupt",t),ag())}}async function cg(){KS.value=!0,Fn.value=!0,console.log("Starting voice recognition with ElevenLabs"),Gt&&Gt.pause(),BA=await navigator.mediaDevices.getUserMedia({audio:!0}),await pO()}async function pO(){if(!BA)throw new Error("micStream is null");Cr=new MediaRecorder(BA),zc=[],console.log("Starting beginListening with ElevenLabs"),Cr.ondataavailable=t=>{Gt&&Gt.pause(),t.data.size>0&&zc.push(t.data),console.log("Audio chunk available:",zc)},Cr.onstop=async()=>{const t=new Blob(zc,{type:"audio/webm"}),e=await SO(t);CO.value=e,console.log("Transcription:",e),MA.value=e,KS.value=!1},Cr.start(),Gt&&Gt.pause(),dO(BA,()=>{(Cr==null?void 0:Cr.state)==="recording"&&Cr.stop()})}function dO(t,e,i=1500,r=.08){const s=new(window.AudioContext||window.webkitAudioContext),o=s.createAnalyser(),A=s.createMediaStreamSource(t),n=s.createScriptProcessor(2048,1,1);o.smoothingTimeConstant=.8,o.fftSize=1024,A.connect(o),o.connect(n),n.connect(s.destination);let a=performance.now();n.onaudioprocess=()=>{const c=new Uint8Array(o.frequencyBinCount);o.getByteFrequencyData(c),c.reduce((l,g)=>l+g)/c.length<r*100?performance.now()-a>i&&(e(),n.disconnect(),o.disconnect(),A.disconnect(),s.close()):a=performance.now()}}async function SO(t){console.log("authToken 11labs",Yc);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":Yc},body:e}),r=await i.json();return i.ok?(r==null?void 0:r.text)||"[No transcription result]":(console.error("Transcription error:",r),"[Error in transcription]")}async function FS(t){console.log("speakText11Labs called with text:",t),Yc=await EO(),Gt&&Gt.pause(),Gn=!0;const i=await(await fetch(`https://api.elevenlabs.io/v1/text-to-speech/${hO}`,{method:"POST",headers:{"xi-api-key":Yc,"Content-Type":"application/json"},body:JSON.stringify({text:t,model_id:"eleven_monolingual_v1",voice_settings:{stability:.5,similarity_boost:.5}})})).blob(),r=URL.createObjectURL(i);return Gt=new Audio(r),new Promise(s=>{Gt&&(Gt.onended=async()=>{Gn=!1,console.log("Audio is playing:",Gn),Fn.value?(console.log("micEnabled before calling startrecognition:",Fn.value),s(await cg())):s()},Gt.play(),console.log("Audio is playing:",Gn),console.log("micEnabled:",Fn.value),Fn.value&&IO(()=>{Gt&&(Gt.pause(),Gt.currentTime=0),Gn=!1,console.log("monitorMicDuringTTS:",Gn),console.log("micEnabled before calling startrecognition:",Fn.value),cg()}))})}const MO={class:"max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916] fontFormattingAMA"},BO=h("div",{class:"text-[22px] font-[700]"},"Please Note Before You Begin",-1),vO=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,[ft("The session may take up to "),h("b",{class:"font-[600]"},"10 minutes"),ft(".")]),h("li",null,"Choose a quiet space and ensure your mic and internet are working."),h("li",null,[ft("In Voice Mode? Click "),h("span",{class:"font-[600]"},"“Turn on Mic”"),ft(" to begin.")]),h("li",null,"Don’t mute until your response is fully processed.")],-1),RO={class:"flex items-end justify-start"},wO={class:"fontFormattingAMA w-full bg-gray-100 rounded-lg"},mO=["innerHTML"],fO=["innerHTML"],QO={key:0,class:"fontFormattingAMA"},DO=h("br",null,null,-1),yO=` <div class="w-full px-3 py-2 text-base text-black md:text-[16px] font-[550]"> 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.</div>`,TO=ke({__name:"greetingsSimulation",setup(t){const e=Pe(),i=It(),r=w(!1),s=w(!1),o=w(!0),A=` <div class="w-full rounded-md px-3 py-2 text-lg font-bold text-black md:text-[22px]">Hi, get ready to test your ${e.skillNameForSimulation||"GenpactNext"} knowledge! Here’s what to expect: </div>`,n=` <div class="w-full rounded-md px-3 py-2 text-lg font-bold text-black md:text-[22px]"> Hi ${e.learnerName||"Expert"}, and welcome!</div>`,a=` <div class="w-full rounded-md px-3 py-2 text-lg font-bold text-black md:text-[22px]"> Hi, ${e.learnerName||"Expert"}. Get ready to test your ${e.skillNameForSimulation||"GenpactNext"} knowledge! Here’s what to expect:</div>`,c=Ct(()=>["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill)?A:["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill)?n:a),u=`<div class="w-full px-3 py-2 text-base text-black md:text-[16px] font-[550]">Hi, get ready to test your ${e.skillNameForSimulation||"GenpactNext"} knowledge! Here’s what to expect:</div>`,l=`<div class="w-full px-3 py-2 text-base text-black md:text-[16px] font-[550]"> AI Guru will ask you a few questions on '${e.skillNameForSimulation.trim()||"GenpactNext"} '. 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.</div>`,g=Ct(()=>["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill)?u:["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill)?yO:l),E=async()=>{var C,p,S,I,d,M;console.log("firstQuestion fired==>"),o.value=!1;try{const B={question:"Hello, let's start"};if(console.log("ques",B),e.conversations.push(B),e.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ea"||e.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"||e.simulationSkill==="937e84ef-e95d-4327-9afe-e7be2bf420eb"||e.simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"||e.simulationSkill===""){const y={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"},L=w("");e.dotLoader=!0,Ft.value="listening";const U=await at("/sqlTest",y);e.addConversation((C=U.data)==null?void 0:C.body,"new"),L.value=(S=(p=U==null?void 0:U.data)==null?void 0:p.body)==null?void 0:S.answer,console.log("answer.value",L.value.replace(/[*#]/g,"")),e.dotLoader=!1,Ft.value="bot",e.showVoiceComponent&&(e.elevenLabs?await FS(L.value.replace(/[*#]/g,"")):await OS(L.value.replace(/[*#]/g,"")))}else{s.value=!0,e.dotLoader=!0,console.log("firstQuestion fired==> else part");const y={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 L;ir==="prod"?L="/ManualExportActivity":L="/fetchCompletionDemo";const U=await at(L,y);e.addConversation((I=U.data)==null?void 0:I.body,"assessment"),e.dotLoader=!1}}catch(B){if(console.error(B),Le.isAxiosError(B)){const y=B;console.log("Error found!"),console.error((d=y.response)==null?void 0:d.data),i.setError(((M=y.response)==null?void 0:M.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(C,p)=>(m(),Q("section",null,[oe(po,{"is-visible":r.value},{default:Ri(()=>[h("div",MO,[BO,vO,h("button",{onClick:p[0]||(p[0]=S=>{r.value=!1,E()}),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",RO,[h("div",wO,[c.value?(m(),Q("div",{key:0,innerHTML:c.value},null,8,mO)):Se("",!0),g.value?(m(),Q("div",{key:1,innerHTML:g.value},null,8,fO)):Se("",!0)])]),f(e).beginFlag?(m(),Q("span",QO,[h("button",{type:"button",id:"button",onClick:p[1]||(p[1]=S=>{f(e).beginFlag=!1,r.value=!0}),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 ")])):Se("",!0),DO]))}}),LO="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAB9AH0DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD36medEDgypn/eFLL/AKl8f3TXzJofh/xD458Z6/a23iGWzSzkLEsxIw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q2jXLweZncK5x/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=",ug=t=>(wt("data-v-18803efb"),t=t(),mt(),t),UO={class:"fontFormattingAMA flex items-end justify-start py-2"},OO={class:"line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg"},NO=["innerHTML"],KO=["innerHTML"],FO={key:0,class:"py-4"},GO={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},kO=["value","disabled","name"],jO={for:"item",name:"options-Array",id:"index"},xO={key:1,class:"py-4"},YO={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},zO=["onClick","disabled","name"],bO={for:"item",name:"options-Array",id:"index"},PO={key:2,class:"flex flex-col justify-start py-10"},qO=[ug(()=>h("div",{class:"mb-4"}," Add Agentic AI to your Digital Skills on Genome.ai and start mastering AI today! ",-1)),ug(()=>h("img",{class:"h-20 w-20",src:LO,alt:"qr_code"},null,-1))],JO={key:3,class:"flex flex-col justify-start items-start mt-4 bg-gray-100 rounded-lg"},VO=ug(()=>h("div",{class:""},[ft(" 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)),HO={class:"flex justify-start items-center md:gap-[40px] gap-[30px]"},WO=ke({__name:"responseSimulation",props:{question:{type:String,required:!0},c2question:{type:String,required:!0},answer:{type:String,required:!0},questionId:{type:String,required:!0},showFeedback:{type:Boolean,default:!0},showSources:{type:String,default:""},relatedQues:{type:Array,required:!0},optionsArray:{type:Array,default:[]},ansId:{type:Number,default:0}},emits:["char-typed"],setup(t,{emit:e}){const i=t,r=w([]),s=w(!1),o=Pe(),A=w("");let n=[],a="";const c=async()=>{console.log("startCharByChar "),n=a.split(""),A.value="";for(let E=0;E<n.length;E++)A.value+=n[E],E%30&&e("char-typed"),await new Promise(C=>setTimeout(C,50))},u=()=>{o.showSelectTypeConvesation=!1,o.isRestart=!0,o.showModelToggle=!1,o.isSpeechToggle=!1,console.log("text mode",o.isSpeechToggle)},l=()=>{o.isRestart=!0,o.beginFlag=!0,o.showVoiceComponent=!0,o.showSelectTypeConvesation=!1,o.showModelToggle=!0,o.isSpeechToggle=!1,console.log("text mode",o.isSpeechToggle)},g=Ct(()=>{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>');(E.includes("Thank you for your participation!")||E.includes("Thank you for your participation"))&&(o.searchBoxdisable=!1,s.value=!0),E.includes("Feedback and Assessment")&&(o.showVoiceComponent=!1,hr(),xc()),(E.includes("BEGIN ROLE PLAY")||E.includes("BEGIN ROLE PLAY."))&&(o.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,(p,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,(p,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 p=E.split("Assessment Rating & Feedback")[0],S=E.split("Assessment Rating & Feedback")[1];o.conversations.push(p),o.conversations.push(S)}});return wi(()=>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>');const C=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;if(E.includes("AI Guru")?E=E.replace(C,(p,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,(p,S,I)=>`<a href="${I}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${S}</a>`),E.includes("Feedback and Assessment")&&(o.showVoiceComponent=!1,hr(),xc()),E.includes("Assessment Rating & Feedback")){const p=E.split("Assessment Rating & Feedback")[0],S=E.split("Assessment Rating & Feedback")[1];o.conversations.push(p),o.conversations.push(S)}a=E,o.showVoiceComponent&&c(),console.log("watch for startCharByChar")},{immediate:!0}),wi(r,E=>{o.question=(E??[]).join(", "),console.log("selectedOptions",E)}),(E,C)=>(m(),Q("div",UO,[h("div",OO,[f(o).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&f(o).showVoiceComponent===!0&&f(o).conversations.length-1===i.ansId&&!i.answer.includes("BEGIN ROLE PLAY")?(m(),Q("span",{key:0,class:"fontFormattingAMA",innerHTML:A.value},null,8,NO)):(m(),Q("span",{key:1,class:"fontFormattingAMA",innerHTML:g.value},null,8,KO)),h("div",null,[t.optionsArray.length&&f(o).mcqType==="multi_choice"?(m(),Q("div",FO,[(m(!0),Q(De,null,ht(t.optionsArray,(p,S)=>(m(),Q("div",{key:S,class:"italic"},[h("div",GO,[Ge(h("input",{class:"mr-4 cursor-pointer",type:"checkbox",value:p,"onUpdate:modelValue":C[0]||(C[0]=I=>r.value=I),disabled:f(o).conversations.length-1!==i.ansId,name:g.value},null,8,kO),[[Ah,r.value]]),h("label",jO,Re(p),1)])]))),128))])):t.optionsArray.length?(m(),Q("div",xO,[(m(!0),Q(De,null,ht(t.optionsArray,(p,S)=>(m(),Q("div",{key:S,class:"italic"},[h("div",YO,[h("input",{class:"mr-4 cursor-pointer",type:"radio",onClick:I=>f(o).question=String(t.optionsArray[S]),disabled:f(o).conversations.length-1!==i.ansId,name:g.value},null,8,zO),h("label",bO,Re(p),1)])]))),128))])):Se("",!0)]),s.value&&f(o).simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"?(m(),Q("div",PO,qO)):Se("",!0),f(o).isSpeechToggle&&f(o).showSelectTypeConvesation&&f(o).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&f(o).conversations.length-1===i.ansId?(m(),Q("div",JO,[VO,h("div",HO,[h("button",{type:"button",id:"button",onClick:C[1]||(C[1]=p=>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]=p=>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 ")])])):Se("",!0)])]))}}),d1="",ZO=Ve(WO,[["__scopeId","data-v-18803efb"]]),XO={class:"flex justify-end items-end py-3"},_O={class:"max-w-[80%]"},$O={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},eN=ke({__name:"learnerSimulation",props:{question:{type:String,required:!0},showFeedback:{type:Boolean,default:!0}},setup(t){return(e,i)=>(m(),Q("div",XO,[h("div",_O,[h("div",$O,Re(t.question),1)])]))}}),tN=t=>(wt("data-v-347ad6de"),t=t(),mt(),t),iN={class:"flex w-full flex-col items-start justify-start bg-white"},rN={class:"bot-typing-animation gap-1"},nN={class:"block w-full text-lg italic text-gray-800"},oN=tN(()=>h("span",{class:"dot-animation"},[h("span",null,"."),h("span",null,"."),h("span",null,".")],-1)),sN=cn('<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),AN=ke({__name:"LoadingResponse",setup(t){const e=w("Generating response"),i=w(["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 r=Math.floor(Math.random()*i.value.length);e.value=i.value[r]},15e3),(r,s)=>(m(),Q("div",iN,[h("div",rN,[h("div",nN,Re(e.value),1),oN]),sN]))}}),S1="",aN=Ve(AN,[["__scopeId","data-v-347ad6de"]]),cN={class:"flex mx-auto justify-end items-end py-3"},uN={class:"max-w-[80%]"},lN={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},gN=ke({__name:"QuestionStreaming",setup(t){const e=Pe();return(i,r)=>(m(),Q("div",cN,[h("div",uN,[h("div",lN,Re(f(e).userSpeechText),1)])]))}}),EN={key:0},hN={key:1},CN={key:0,class:"flex"},IN={key:1,name:"askQuestion"},pN=ke({__name:"conversationSimulation",setup(t){let e=w(""),i=w("");e.value='<a style="color:#00AECF;"',i.value='<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';const r=Pe(),s=w(),o=()=>{s.value.scrollTo(0,s.value.scrollHeight)};return ri(()=>{var a;const A=document.getElementsByName("askQuestion"),n=Array.from(A);console.log("New array===>",n),A.length&&((a=n==null?void 0:n.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"})),window.addEventListener("custom-event",o)}),Su(()=>{var a;const A=document.getElementsByName("askQuestion"),n=Array.from(A);console.log("New array===>",n),A.length&&((a=n==null?void 0:n.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"}))}),Xn(()=>{window.removeEventListener("custom-event",o)}),(A,n)=>(m(),Q("div",{ref_key:"nestedElement",ref:s,class:"smooth-scroll overflow-auto md:px-6 px-2"},[oe(TO),(m(!0),Q(De,null,ht(f(r).conversations,(a,c)=>(m(),Q("div",{key:c},[a.question?(m(),Q("div",EN,[oe(eN,{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"])])):Se("",!0),a.answer?(m(),Q("div",hN,[oe(ZO,{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",f(e)).replaceAll("<ul",f(i)),"show-feedback":a.showFeedback,"related-ques":a.relatedQues,"options-array":a.optionsArray,"ans-id":c,onCharTyped:o},null,8,["question","c2question","show-sources","questionId","answer","show-feedback","related-ques","options-array","ans-id"])])):Se("",!0)]))),128)),f(r).dotLoader?(m(),Q("div",CN,[oe(aN)])):Se("",!0),f(r).userspeaking?(m(),Q("div",IN,[oe(gN)])):Se("",!0)],512))}}),M1="",dN=Ve(pN,[["__scopeId","data-v-e55a322f"]]),GS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAYAAAARfGZ1AAABSUlEQVR4nLXWvUocURTA8d/eQosEgmQL0RRTRFCMhYKPYcDCIrUsPoCQNvMEYmEgRYp09luElPsIVmKKJIX4UUQJxMJAXC1mL4zLzjq7O/OHA/P5v+ecmbl3GsoxjVnM4S8u8bvkvYXCFr7hH+774if2sTKqeAu/BggHxR2+oPmUtIG0pLQ/TrE2TP5xTHGMayzkM43s4BMkSSJJkqeqfESn04mbJ1jHTTzQxJ+YQZqm96PSV0EKoSd/jxcjpTqcXTSDrDXvKhTDc7wNWMWriuWwEbBYgxiWguyTroP5IHu6ddANOK9JfhZkL30dfA84ks0LVdOOPT+sWHyDdtyZwZXJJq18fOgfrVWR+BjPBpVzMKH4Cq+LehUXi+4Y4h94UyTOs9m7uIz0Pz7jZRlxZArb+Irbgkz3sFwkaBSdGDBQ/tfiQrakDeUBf+jdzbi9K1QAAAAASUVORK5CYII=",SN={class:"flex items-center gap-4 py-2 rounded-full z-10"},MN={key:0,class:"flex items-center"},BN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},vN=[cn('<rect x="0" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0s"></animate></rect><rect x="4" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.1s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.1s"></animate></rect><rect x="8" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate></rect><rect x="12" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.3s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.3s"></animate></rect><rect x="16" y="4" width="2" height="16" rx="1"><animate attributeName="height" values="16;20;16" dur="1s" repeatCount="indefinite" begin="0.4s"></animate><animate attributeName="y" values="4;2;4" dur="1s" repeatCount="indefinite" begin="0.4s"></animate></rect><rect x="20" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.5s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.5s"></animate></rect><rect x="24" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate></rect><rect x="28" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.7s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.7s"></animate></rect><rect x="32" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0.8s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0.8s"></animate></rect>',9)],RN={key:1,class:"flex items-center"},wN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},mN=[cn('<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"},QN=[cn('<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)],DN={class:"tooltiptext text-genpact-darkest-teal"},yN=[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)],TN=[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)],LN=ke({__name:"NewVoiceConversation",setup(t){const e=Pe(),i=It(),r=w(""),s=w(!1),o=w("Turn on mic"),A=()=>{s.value===!1?e.elevenLabs?(console.log("mic enabled true 11labs"),s.value=!0,cg(),Ft.value="user",o.value="Turn off mic"):(console.log("mic enabled true"),s.value=!0,hr(),gO(),Ft.value="user",o.value="Turn off mic"):e.elevenLabs?(console.log("mic enabled false"),ag(),s.value=!1,o.value="Turn on mic"):(console.log("mic enabled false"),xc(),s.value=!1,o.value="Turn on mic")},n=()=>{e.elevenLabs?(console.log("closeConversation 11 labs"),ag(),Ft.value="none",s.value=!1):(console.log("closeConversation"),xc(),hr(),Ft.value="none",s.value=!1)},a=async()=>{var c,u,l,g,E,C;try{const p={question:Kn.value||MA.value};console.log("ques",p),e.conversations.push(p),e.dotLoader=!0,e.question="";const S={past_messages:e.past_messages,question:Kn.value||MA.value,bandCode:"4A",userGenomeFunction:"HR",userGenomeRole:"Consultant",skillId:"7bd03cb6-79ad-4e2a-8a8b-88dc16147369"},I=await at("/sqlTest",S);if(Ft.value="bot",r.value=(u=(c=I==null?void 0:I.data)==null?void 0:c.body)==null?void 0:u.answer,r.value===""){console.log("in the if case calling api again");const d=await at("/sqlTest",S);e.addConversation((l=d.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");e.dotLoader=!1,console.log("answer.value",r.value.replace(/[*#]/g,"")),e.elevenLabs?await FS(r.value.replace(/[*#]/g,"")):await OS(r.value.replace(/[*#]/g,""))}catch(p){if(console.error(p),Le.isAxiosError(p)){const S=p;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 wi(Kn,async c=>{c&&(console.log("Recognized text:",c),Ft.value="listening",e.userspeaking=!1,console.log("store userspeaking in recognized",e.userspeaking),await a(),Kn.value="")}),wi(MA,async c=>{c&&(console.log("Recognized text:",c),Ft.value="listening",await a(),MA.value="")}),(c,u)=>(m(),Q("div",SN,[f(Ft)==="bot"?(m(),Q("div",MN,[h("span",null,[(m(),Q("svg",BN,vN))])])):f(Ft)==="user"?(m(),Q("div",RN,[h("span",null,[(m(),Q("svg",wN,mN))])])):f(Ft)==="listening"?(m(),Q("div",fN,QN)):Se("",!0),h("div",{class:ge([s.value?"":"animate-pulse","tooltip"])},[h("span",DN,Re(o.value),1),s.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())},yN)):(m(),Q("button",{key:1,class:"rounded-full bg-white p-2 transition hover:bg-gray-300",onClick:u[1]||(u[1]=l=>A())},TN))],2),h("button",{class:"rounded-full bg-white p-2 hover:bg-gray-300",onClick:u[2]||(u[2]=l=>n())},[oe(f(yC),{class:"h-[10px] w-[10px] text-gray-700"})])]))}}),Ir=t=>(wt("data-v-e951c0ed"),t=t(),mt(),t),UN={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},ON={class:"py-2"},NN={class:"flex"},KN={class:"z-1 relative w-full"},FN={class:"flex justify-between my-2 w-full"},GN=Ir(()=>h("div",null,null,-1)),kN={key:0,class:"flex justify-center bg-genpact-darkest-blue px-4 rounded-full"},jN={class:"relative w-full"},xN={class:"absolute inset-y-0 left-0 flex items-center pl-3"},YN={class:"tooltip"},zN=Ir(()=>h("span",{class:"tooltiptext text-genpact-darkest-teal"},"Restart",-1)),bN=[Ir(()=>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)),Ir(()=>h("path",{d:"M9 10H15M9 14H12M19 8V2M16 5H22",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1))],PN={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},qN={key:0},JN=["disabled"],VN=[Ir(()=>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))],HN={key:1,class:"tooltip"},WN=[Ir(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),Ir(()=>h("img",{class:"w-7 h-7",src:GS,alt:"watingIcon"},null,-1))],ZN={class:"flex justify-start gap-2 md:gap-1"},XN=["disabled"],_N=Ir(()=>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)),$N=ke({__name:"NewQuestionSimulation",setup(t){const e=Pe(),i=It(),r=w(""),s=w("");e.question="";const o=w(null),A=w(!1),n=w(Di),a=w(!1);s.value=e.recognizedText,ri(()=>{o.value.focus()});const c=()=>{window.location.reload()},u=g=>{const E=g.length;n.value=Di-E,A.value=E>=Di},l=async()=>{var g,E,C,p,S,I,d,M;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}a.value=!0,e.dotLoader=!0;const B={question:e.question||e.recognizedText};console.log("ques",B),e.conversations.push(B);const y=w("");y.value=e.question||e.recognizedText,e.question="";const L={ohr_id:r.value,past_messages:e.past_messages,question:y.value||e.recognizedText,bandCode:e.band_code,userGenomeFunction:e.genomeFunctionValue,userGenomeRole:e.genomeRoleValue,skillId:e.simulationSkill||"937e84ef-e95d-4327-9afe-e7be2bf420eb"},U=await at("/sqlTest",L);if(r.value=(E=(g=U.data)==null?void 0:g.body)==null?void 0:E.ohr,((p=(C=U==null?void 0:U.data)==null?void 0:C.body)==null?void 0:p.answer)===""){console.log("in the if case calling api again");const k=await at("/sqlTest",L);e.addConversation((S=k.data)==null?void 0:S.body,"new")}else console.log("in the else case"),e.addConversation((I=U.data)==null?void 0:I.body,"new");console.log("ohr id asdf",r.value),a.value=!1,e.dotLoader=!1,e.recognizedText=""}catch(B){if(console.error(B),e.dotLoader=!1,Le.isAxiosError(B)){const y=B;console.log("Error found!"),console.error((d=y.response)==null?void 0:d.data),i.setError(((M=y.response)==null?void 0:M.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(g,E)=>(m(),Q("div",UN,[h("div",ON,[h("div",NN,[h("div",KN,[h("div",FN,[GN,f(e).showVoiceComponent?(m(),Q("div",kN,[oe(LN)])):Se("",!0)]),h("div",jN,[h("div",xN,[h("div",YN,[zN,(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"},bN))])]),h("div",PN,[a.value?(m(),Q("div",HN,WN)):(m(),Q("div",qN,[(m(),Q("svg",{disabled:f(e).beginFlag===!0,class:ge([f(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=>f(e).searchBoxdisable===!1||f(e).beginFlag===!0?"":l()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},VN,10,JN))]))]),h("div",ZN,[Ge(h("input",{onKeyup:[E[1]||(E[1]=Eh(C=>a.value?"":l(),["enter"])),E[3]||(E[3]=C=>u(f(e).question))],disabled:f(e).beginFlag===!0||f(e).searchBoxdisable===!1,class:ge([f(e).beginFlag===!0||f(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=>f(e).question=C),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:o},null,42,XN),[[_e,f(e).question]])])]),_N])])])]))}}),L1="",eK=Ve($N,[["__scopeId","data-v-e951c0ed"]]),bc=t=>(wt("data-v-be2cdcc7"),t=t(),mt(),t),tK={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},iK={class:"py-2"},rK={class:"flex"},nK={class:"z-1 relative w-full"},oK={class:"-text-blue absolute inset-y-0 bottom-8 right-0 flex cursor-pointer items-center justify-center pr-4 md:bottom-5 md:pr-8 lg:pr-8"},sK=[cn('<svg width="28" height="48" viewBox="0 0 24 24" class="cursor-pointer fill-current text-gray-700" data-v-be2cdcc7><rect x="1" y="8" width="2" height="8" rx="1" data-v-be2cdcc7></rect><rect x="5" y="6" width="2" height="12" rx="1" data-v-be2cdcc7></rect><rect x="9" y="4" width="2" height="16" rx="1" data-v-be2cdcc7></rect><rect x="13" y="6" width="2" height="12" rx="1" data-v-be2cdcc7></rect><rect x="17" y="8" width="2" height="8" rx="1" data-v-be2cdcc7></rect></svg>',1)],AK={key:1},aK=["disabled"],cK=[bc(()=>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))],uK={key:2,class:"tooltip"},lK=[bc(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),bc(()=>h("img",{src:GS,alt:"watingIcon",class:"ml-2"},null,-1))],gK={class:"flex justify-start gap-2 md:gap-1"},EK=["disabled"],hK=bc(()=>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=ke({__name:"NewMDMQuestionSimulation",setup(t){const e=Pe(),i=It(),r=w("");e.question="";const s=w(null),o=w(!1),A=w(Di),n=w(!1);r.value=e.recognizedText,ri(()=>{s.value.focus()});const a=u=>{const l=u.length;A.value=Di-l,o.value=l>=Di},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}n.value=!0,e.dotLoader=!0;const E={question:e.question||e.recognizedText};console.log("ques",E),e.conversations.push(E);const C=w("");C.value=e.question||e.recognizedText,e.question="";const p={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==> ",p);let S;ir==="prod"?S="/ManualExportActivity":S="/fetchCompletionDemo";const I=await at(S,p);e.addConversation((u=I.data)==null?void 0:u.body,"new"),n.value=!1,e.dotLoader=!1,e.recognizedText=""}catch(E){if(console.error(E),Le.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",tK,[h("div",iK,[h("div",rK,[h("div",nK,[h("div",oK,[f(e).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"?(m(),Q("span",{key:0,onClick:l[0]||(l[0]=g=>f(e).isSimualation=!0)},sK)):Se("",!0),n.value?(m(),Q("div",uK,lK)):(m(),Q("div",AK,[(m(),Q("svg",{disabled:f(e).beginFlag===!0,class:ge([f(e).beginFlag===!0?"cursor-not-allowed text-gray-600":"pointer -text-blue","bi bi-send ml-2 h-7 w-7 rotate-45 rounded"]),onClick:l[1]||(l[1]=g=>f(e).searchBoxdisable===!1||f(e).beginFlag===!0?"":c()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},cK,10,aK))]))]),h("div",gK,[Ge(h("textarea",{rows:"2",onKeyup:[l[2]||(l[2]=Eh(g=>c(),["enter"])),l[4]||(l[4]=g=>a(f(e).question))],disabled:f(e).beginFlag===!0,class:ge([f(e).beginFlag===!0||f(e).searchBoxdisable===!1?"cursor-not-allowed bg-[#e5e7eb]":"","fontFormattingAMA flex w-full border border-genpact-darkest-teal py-2 pl-2 pr-16 focus:outline-none sm:text-[15px] md:py-3 md:pl-6 lg:py-3 lg:pl-6"]),"onUpdate:modelValue":l[3]||(l[3]=g=>f(e).question=g),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:s},null,42,EK),[[_e,f(e).question]])]),hK])])])]))}}),F1="",IK=Ve(CK,[["__scopeId","data-v-be2cdcc7"]]),pK={},dK={class:"flex min-h-screen justify-center -mt-16"},SK=[h("div",{class:"flex items-center justify-center"},[h("img",{class:"loadercss",src:yi,alt:"Loader Gif"})],-1)];function MK(t,e){return m(),Q("div",dK,SK)}const BK=Ve(pK,[["render",MK]]),lg=t=>(wt("data-v-f651f45f"),t=t(),mt(),t),vK=lg(()=>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)),RK={key:1,className:"h-screen flex flex-col items-stretch"},wK={class:"z-20"},mK={key:0,class:"flex flex-col justify-end mt-3 items-end md:px-8 px-3"},fK={class:"inline-flex items-center cursor-pointer"},QK={class:"mr-3 text-[15px] font-[600]"},DK=lg(()=>h("div",{class:"relative w-10 h-5 bg-gray-300 dark:bg-gray-400 rounded-full peer-checked:bg-genpact-darkest-teal after:content-[''] after:absolute after:top-[1.5px] after:left-[1.5px] after:bg-white after:rounded-full after:h-4 after:w-4 after:transition-transform peer-checked:after:translate-x-5"},null,-1)),yK=lg(()=>h("div",{class:"mt-6"},null,-1)),TK={class:"flex h-full items-stretch overflow-hidden"},LK={class:"mx-auto w-11/12 bg-white"},UK={class:"relative flex h-full w-full flex-col items-stretch overflow-hidden"},OK={key:0,class:"relative"},NK={key:1,class:"relative"},KK=ke({__name:"AssessmentSimulation",setup(t){const e=w(!0),i=w(!1),r=w(!1),s=w(!1);w(!1);const o=Pe(),A=It(),n=w(""),a=w(""),c=w(""),u=localStorage.getItem("accessToken");let l="",g="",E="";const C=w(!1),p=new URL(window.location.href),S=p.searchParams.get("skillId")||p.searchParams.get("assessmentId")||"937e84ef-e95d-4327-9afe-e7be2bf420eb";a.value=p.searchParams.get("mode")??"",o.simulationSkill=S??"";const I=["703331197","703380812","703331909","703363051","703319578"];ri(async()=>{console.log("uuid. value",S),e.value=!0,await B(),await y(),o.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ea"||o.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"||o.simulationSkill==="937e84ef-e95d-4327-9afe-e7be2bf420eb"||o.simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"||o.simulationSkill===""||(console.log("getAssessmentDetails========================>"),await M()),e.value=!1});const d=()=>{s.value?(console.log("isChecked.value for voice assessment",s.value),o.elevenLabs=!1):(console.log("isChecked.value for voice assessment",s.value),o.elevenLabs=!0)},M=async()=>{var L,U,D,k,Y,O,N,ie,q,z,F,Z,b,ae,ue,Be,pe,Te,je,He,xe,G,_,H,ee,de,v,R,T,K,x,P,te,W,X,J,se,re,Ae,he,ve,Fe,Ue,qe,gt,kt,tt,$t;console.log("Start getAssessmentDetails");try{ir==="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 ce=await Ai(l);n.value=(U=(L=ce==null?void 0:ce.data)==null?void 0:L.data)==null?void 0:U.name,o.skillNameForSimulation=n.value,o.generatedPrompt=(k=(D=ce==null?void 0:ce.data)==null?void 0:D.data)==null?void 0:k.generatedPrompt,o.assessmentType=(O=(Y=ce==null?void 0:ce.data)==null?void 0:Y.data)==null?void 0:O.assessmentType,c.value=(ie=(N=ce==null?void 0:ce.data)==null?void 0:N.data)==null?void 0:ie.status,C.value=(z=(q=ce==null?void 0:ce.data)==null?void 0:q.data)==null?void 0:z.editMode,o.empSeniority=(Z=(F=ce==null?void 0:ce.data)==null?void 0:F.data)==null?void 0:Z.empSeniority,o.functionRole=(ae=(b=ce==null?void 0:ce.data)==null?void 0:b.data)==null?void 0:ae.functionRole,g=(Be=(ue=ce==null?void 0:ce.data)==null?void 0:ue.data)==null?void 0:Be.accessBand,E=(Te=(pe=ce==null?void 0:ce.data)==null?void 0:pe.data)==null?void 0:Te.accessOhrList;const Ze=(He=(je=ce==null?void 0:ce.data)==null?void 0:je.data)==null?void 0:He.createdBy;if(o.mcqType=(G=(xe=ce==null?void 0:ce.data)==null?void 0:xe.data)==null?void 0:G.mcqTypes,o.storeFinalFeedback=(H=(_=ce==null?void 0:ce.data)==null?void 0:_.data)==null?void 0:H.storeFinalFeedback,o.storeFinalScore=(de=(ee=ce==null?void 0:ce.data)==null?void 0:ee.data)==null?void 0:de.storeFinalScore,c.value==="inactive")i.value=!0;else if(c.value==="draft")a.value!==Al.DRAFT&&(i.value=!0);else if(c.value==="active"&&C.value&&a.value===Al.DRAFT){console.log("fetching values from draft table.....",C.value),ir==="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 Ye=await Ai(l);o.generatedPrompt=(R=(v=Ye==null?void 0:Ye.data)==null?void 0:v.data)==null?void 0:R.generatedPrompt,o.assessmentType=(K=(T=Ye==null?void 0:Ye.data)==null?void 0:T.data)==null?void 0:K.assessmentType,o.empSeniority=(P=(x=Ye==null?void 0:Ye.data)==null?void 0:x.data)==null?void 0:P.empSeniority,o.functionRole=(W=(te=Ye==null?void 0:Ye.data)==null?void 0:te.data)==null?void 0:W.functionRole,o.storeFinalFeedback=(J=(X=Ye==null?void 0:Ye.data)==null?void 0:X.data)==null?void 0:J.storeFinalFeedback,o.storeFinalScore=(re=(se=Ye==null?void 0:Ye.data)==null?void 0:se.data)==null?void 0:re.storeFinalScore,g=(he=(Ae=Ye==null?void 0:Ye.data)==null?void 0:Ae.data)==null?void 0:he.accessBand,E=(Fe=(ve=Ye==null?void 0:Ye.data)==null?void 0:ve.data)==null?void 0:Fe.accessOhrList}console.log("store mcqType====>",o.mcqType);const Ot=o==null?void 0:o.band_code;console.log("accessBand , accessOhrList====>",g,E);const Mi=(Ue=g==null?void 0:g.split(","))==null?void 0:Ue.map(Ye=>Ye.trim());if(console.log("bands ,====>",Mi),Ze===(o==null?void 0:o.ohr)||I.includes(o==null?void 0:o.ohr))console.log("User has access to this assessment.");else{if(Mi.length===0&&E.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(Mi.includes(Ot)||E.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(ce){if(console.error(ce),e.value=!1,Le.isAxiosError(ce)&&((qe=ce.response)!=null&&qe.status)||ce&&typeof ce=="object"&&"response"in ce&&ce.response&&typeof ce.response=="object"&&"status"in ce.response&&ce.response.status){const Ze=ce;if(console.log("Error found!"),console.error((gt=Ze.response)==null?void 0:gt.data),((kt=Ze.response)==null?void 0:kt.status)===424||((tt=Ze.response)==null?void 0:tt.status)===425){r.value=!0;return}A.setError((($t=Ze.response)==null?void 0:$t.data).message)}else A.setError("There was an issue, please contact helpmate")}},B=async()=>{var L,U,D,k,Y;try{if(S===null)throw{response:{status:424,data:{message:"Invalid URL"}}};e.value=!0;const O=new URLSearchParams(window.location.search);o.simulationSkill=O.get("skillId")||"";const N=await Ai("/getLearnerData");o.initialize(N.data),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(O){if(console.error(O),e.value=!1,Le.isAxiosError(O)&&((L=O.response)!=null&&L.status)||O&&typeof O=="object"&&"response"in O&&O.response&&typeof O.response=="object"&&"status"in O.response&&O.response.status){const N=O;if(console.log("Error found!"),console.error((U=N.response)==null?void 0:U.data),((D=N.response)==null?void 0:D.status)===424||((k=N.response)==null?void 0:k.status)===425){r.value=!0;return}A.setError(((Y=N.response)==null?void 0:Y.data).message)}else A.setError("There was an issue, please contact helpmate")}},y=async()=>{var L,U,D,k,Y,O,N,ie;try{const q=await Le({url:"https://api-v2-dev.genpact.com/api/delphi/v2/myprofile",headers:{authorization:`Bearer ${u}`,"content-type":"application/json"},method:"get"});o.genomeFunctionValue=(D=(U=(L=q==null?void 0:q.data)==null?void 0:L.role_function)==null?void 0:U.function)==null?void 0:D.name,o.genomeRoleValue=(O=(Y=(k=q==null?void 0:q.data)==null?void 0:k.role_function)==null?void 0:Y.role)==null?void 0:O.name,console.log("profile data",o.genomeFunctionValue,o.genomeRoleValue)}catch(q){if(console.error(q),e.value=!1,Le.isAxiosError(q)){const z=q;console.log("Error found!"),console.error((N=z.response)==null?void 0:N.data),A.setError(((ie=z.response)==null?void 0:ie.data).message)}else A.setError("There was an issue, please contact helpmate")}};return(L,U)=>(m(),Q("section",null,[oe(po,{"is-visible":r.value},{default:Ri(()=>[vK]),_:1},8,["is-visible"]),h("div",null,[e.value?(m(),Pi(BK,{key:0})):(m(),Q("main",RK,[h("div",wK,[oe(Fy)]),f(o).showModelToggle&&f(o).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"?(m(),Q("div",mK,[h("label",fK,[Ge(h("input",{onClick:d,type:"checkbox","onUpdate:modelValue":U[0]||(U[0]=D=>s.value=D),class:"sr-only peer"},null,512),[[Ah,s.value]]),h("span",QK,Re(s.value?"Eleven-labs":"Azure Open AI"),1),DK])])):Se("",!0),yK,h("div",TK,[h("div",LK,[h("div",UK,[oe(dN),h("div",{class:ge(f(o).showVoiceComponent===!0?"mt-[160px]":"mt-[120px]")},null,2)]),f(o).simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ea"||f(o).simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"||f(o).simulationSkill==="937e84ef-e95d-4327-9afe-e7be2bf420eb"||f(o).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"||f(o).simulationSkill===""?(m(),Q("div",OK,[oe(eK)])):(m(),Q("div",NK,[oe(IK)]))])])]))])]))}}),k1="",FK=Object.freeze(Object.defineProperty({__proto__:null,default:Ve(KK,[["__scopeId","data-v-f651f45f"]])},Symbol.toStringTag,{value:"Module"})),GK={},kK={className:"flex justify-between items-center gap-4 h-14"},jK=[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:So},null,-1)];function xK(t,e){return m(),Q("div",kK,jK)}const YK=Ve(GK,[["render",xK]]),zK={class:"bg-genpact-blue-box w-full px-5 mb-4"},bK={key:0},PK={class:"flex justify-between items-start text-lg px-6"},qK=h("div",null,null,-1),JK={class:"flex justify-start items-center text-white bg-genpact-darkest-blue rounded-lg py-2 px-4 cursor-pointer"},VK={class:"flex justify-start items-start w-full px-6 py-3"},HK=h("div",{class:"md:w-1/2"},null,-1),WK={class:"relative flex justify-start items-end border border-gray-300 md:rounded-full rounded-lg md:w-1/2 w-full"},ZK={class:"absolute inset-y-0 left-5 flex items-center"},XK={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"},_K={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"},$K={class:"flex justify-start items-center"},eF=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),tF={class:"flex-grow md:flex-grow-0"},iF={class:"px-6"},rF=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Current Topic List ",-1),nF={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},oF={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},sF=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),AF={class:"px-3 py-4 font-medium text-gray-900"},aF={class:"px-3 py-4"},cF={class:"px-3 py-4 text-center"},uF={class:"px-1.5 py-4 text-center"},lF=["onClick"],gF={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"},EF=[h("img",{class:"w-6 h-6 block loadercss",src:yi,alt:"Loader Gif"},null,-1)],kS=Object.freeze(Object.defineProperty({__proto__:null,default:ke({__name:"SkillData",setup(t){const e=w([]),i=w(),r=w(""),s=w(""),o=w(!1),A=w([!0]),n=Pe(),a=It(),c=na(),u=w(""),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"})),n.isTopicPending=!1,n.topicNameForSkillData="",n.descriptionForSkillData="",n.offeringTypeForSkillData="",n.enableInputbox=!0}catch{a.setError("Invalid Router!!")}},g=async(I,d)=>{var M,B,y;try{console.log("isTopicPending------->",n.isTopicPending),n.topicNameForSkillData=I.Topic,n.descriptionForSkillData=I.Description,n.offeringTypeForSkillData=I.OfferingType,n.enableInputbox=!1,A.value[d]=!1;const L=await Ai(`/fetchTempTopic?Topic=${n.topicNameForSkillData}`);n.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&&(n.isTopicPending=!0),A.value[d]=!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),Le.isAxiosError(L)){const U=L;a.setError(((y=U.response)==null?void 0:y.data).message)}else a.setError("There was an issue with route")}},E=async()=>{var I,d,M,B,y,L;try{const U=await Ai("/FetchSkillData");console.log("role value ",(I=U==null?void 0:U.data)==null?void 0:I.role),i.value=((d=U==null?void 0:U.data)==null?void 0:d.body)||[],u.value=(M=U==null?void 0:U.data)==null?void 0:M.role,e.value=i.value,console.log("length",(B=U==null?void 0:U.data)==null?void 0:B.body),console.log("data",(y=U==null?void 0:U.data)==null?void 0:y.body)}catch(U){if(console.error(U),Le.isAxiosError(U)){const D=U;a.setError(((L=D.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(d=>d.Topic.toLowerCase().includes(I.target.value.toLowerCase()))},p=I=>{console.log(I.target.value),I.target.value===""&&(e.value=i.value),console.log("Invoked Knowledge Corpus Search"),e.value=i.value.filter(d=>d.OfferingType.toLowerCase().includes(I.target.value.toLowerCase()))},S=()=>{r.value="",s.value="",e.value=i.value};return ri(async()=>{await E(),o.value=!0,A.value=Array(e.value.length).fill(!0),console.log("array",A.value)}),(I,d)=>(m(),Q(De,null,[h("nav",zK,[oe(YK)]),o.value?(m(),Q("div",bK,[h("div",PK,[qK,h("div",JK,[oe(f(zm),{class:"w-7 h-7 mr-1"}),h("button",{onClick:l,class:"font-bold"},"Add New Topic")])]),h("div",VK,[HK,h("div",WK,[h("div",ZK,[oe(f(xm),{class:"w-5 h-5 mr-5 hidden md:flex"})]),h("div",XK,[h("div",_K,[h("div",$K,[Ge(h("input",{id:"topic-search",type:"search",onInput:C,"onUpdate:modelValue":d[0]||(d[0]=M=>r.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),[[_e,r.value]])]),eF,h("div",tF,[Ge(h("input",{id:"offering-search",type:"search",onInput:p,"onUpdate:modelValue":d[1]||(d[1]=M=>s.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),[[_e,s.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",iF,[rF,h("div",nF,[h("table",oF,[sF,h("tbody",null,[(m(!0),Q(De,null,ht(e.value,(M,B)=>(m(),Q("tr",{key:B,class:"odd:bg-white even:bg-gray-100"},[h("th",AF,Re(M.Topic||"title"),1),h("td",aF,Re(M.Description||"desc"),1),h("td",cF,Re(M.OfferingType||"Knowledge Corpus"),1),h("td",uF,[A.value[B]?(m(),Q("button",{key:0,id:"index",onClick:y=>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,lF)):(m(),Q("div",gF,EF))])]))),128))])])])])])):(m(),Pi(al,{key:1}))],64))}})},Symbol.toStringTag,{value:"Module"})),hF={className:"flex justify-between items-center gap-4 h-14"},CF=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),IF=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Data",-1),pF=h("img",{class:"md:w-36 w-20",src:So},null,-1),dF=ke({__name:"HeaderForEditSkillData",setup(t){const e=na(),i=()=>{Xn(()=>{sessionStorage.removeItem("dataViewAccess")}),e.push({name:"SkillData"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")};return(r,s)=>(m(),Q("div",hF,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[oe(f(DC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),CF]),IF,pF]))}}),ki=t=>(wt("data-v-18de1cf9"),t=t(),mt(),t),SF={class:"bg-genpact-blue-box w-full px-5 mb-6"},MF={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},BF=ki(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[ft("Topic Name "),h("span",{class:"label"},"*")])],-1)),vF={class:"col-span-4"},RF=["disabled"],wF=ki(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[ft("Description "),h("span",{class:"label"},"*")])],-1)),mF={class:"col-span-4"},fF=ki(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"Knowledge Corpus",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[ft("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),QF={class:"col-span-4"},DF=ki(()=>h("div",{class:"col-span-1"},null,-1)),yF={class:"col-span-4"},TF={class:"md:flex block justify-between items-center space-y-2"},LF=["disabled"],UF={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-4 py-2"},OF=[ki(()=>h("img",{class:"w-6 h-6 block loadercss",src:yi,alt:"Loader Gif"},null,-1))],NF=["disabled"],KF={key:3,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-10 py-2"},FF=[ki(()=>h("img",{class:"w-6 h-6 block loadercss",src:yi,alt:"Loader Gif"},null,-1))],GF=ki(()=>h("div",{class:"col-span-1"},null,-1)),kF={key:0,class:"col-span-4"},jF=[ki(()=>h("div",{class:"p-2 items-center text-lg font-bold bg-gray-200"}," This topic is under review and cannot be submitted again at this moment ",-1))],xF={key:0,class:"pl-16 pr-8 py-2"},YF={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},zF={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},bF=ki(()=>h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Score")])],-1)),PF={key:0,class:"px-3 py-4 font-medium text-gray-900 text-center"},qF={key:1,class:"px-3 py-4"},JF={key:2,class:"px-3 py-4 text-center"},VF={key:3,class:"px-3 py-4 text-center"},HF={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},WF={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},ZF=ke({__name:"EditSkillData",setup(t){const e=Pe(),i=It(),r=w(!0),s=w(!0),o=w(!1),A=w(""),n=w(""),a=w(!1),c=w(!1),u=w(),l=w(),g=w([]),E=async()=>{var S,I,d,M,B,y,L;try{const U={question:e.descriptionForSkillData};console.log("question",n.value),r.value=!1;const D=await at("/SearchSkillTags",U);console.log("abc",(S=D==null?void 0:D.data)==null?void 0:S.body),l.value=(d=(I=D==null?void 0:D.data)==null?void 0:I.body)==null?void 0:d.length,console.log("ARRAY LENGTH",l.value),u.value=((M=D==null?void 0:D.data)==null?void 0:M.body)||[],g.value=u.value,console.log("length",(y=(B=D==null?void 0:D.data)==null?void 0:B.body)==null?void 0:y.length),console.log("data",D),r.value=!0,a.value=!0,c.value=!0,console.log("showSubmitButton",c.value)}catch(U){if(console.error(U),r.value=!0,Le.isAxiosError(U)){const D=U;i.setError(((L=D.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};s.value=!1,console.log("payload-=====>",I);const d=await at("/InsertIntoTempSkillFile",I);console.log("data",d),A.value="Data Submitted Successfully!",s.value=!0,p()}catch(I){if(console.error(I),s.value=!0,Le.isAxiosError(I)){const d=I;i.setError(((S=d.response)==null?void 0:S.data).message)}else i.setError("There was an issue while inserting data")}},p=()=>{o.value=!0,setTimeout(()=>{o.value=!1,Xn(()=>{sessionStorage.removeItem("dataViewAccess")}),Mn.push({name:"SkillData"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")},3e3),c.value=!1};return(S,I)=>(m(),Q(De,null,[h("nav",SF,[oe(dF)]),h("div",MF,[BF,h("div",vF,[Ge(h("input",{disabled:f(e).enableInputbox!==!0,class:ge([f(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]=d=>f(e).topicNameForSkillData=d),id:"topic",placeholder:"Write here...",required:""},null,10,RF),[[_e,f(e).topicNameForSkillData]])]),wF,h("div",mF,[Ge(h("textarea",{"onUpdate:modelValue":I[1]||(I[1]=d=>f(e).descriptionForSkillData=d),onInput:I[2]||(I[2]=d=>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),[[_e,f(e).descriptionForSkillData]])]),fF,h("div",QF,[Ge(h("input",{"onUpdate:modelValue":I[3]||(I[3]=d=>f(e).offeringTypeForSkillData=d),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),[[_e,f(e).offeringTypeForSkillData]])]),DF,h("div",yF,[h("div",TF,[r.value?(m(),Q("button",{key:0,disabled:f(e).isTopicPending===!0,class:ge([f(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,LF)):(m(),Q("div",UF,OF)),s.value?(m(),Q("button",{key:2,disabled:c.value!==!0,class:ge([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,NF)):(m(),Q("div",KF,FF))])]),GF,f(e).isTopicPending?(m(),Q("div",kF,jF)):Se("",!0)]),a.value?(m(),Q("div",xF,[h("div",YF,[h("table",zF,[bF,h("tbody",null,[(m(!0),Q(De,null,ht(g.value,(d,M)=>(m(),Q("tr",{key:M,class:"odd:bg-white even:bg-gray-100"},[d.Topic!==f(e).topicNameForSkillData?(m(),Q("th",PF,Re(d.Topic||"title"),1)):Se("",!0),d.Topic!==f(e).topicNameForSkillData?(m(),Q("td",qF,Re(d.Description||"desc"),1)):Se("",!0),d.Topic!==f(e).topicNameForSkillData?(m(),Q("td",JF,Re(d.OfferingType||"Knowledge Corpus"),1)):Se("",!0),d.Topic!==f(e).topicNameForSkillData?(m(),Q("td",VF,Re(d.new_tag),1)):Se("",!0)]))),128))])])])])):Se("",!0),Ge(h("div",HF,[h("div",WF,Re(A.value),1)],512),[[En,o.value]])],64))}}),V1="",XF=Object.freeze(Object.defineProperty({__proto__:null,default:Ve(ZF,[["__scopeId","data-v-18de1cf9"]])},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 Automation ",-1),h("img",{class:"md:w-36 w-20",src:So},null,-1)];function tG(t,e){return m(),Q("div",$F,eG)}const iG=Ve(_F,[["render",tG]]),rG={class:"bg-genpact-blue-box w-full px-5 mb-4"},nG={key:0},oG={class:"w-full px-6 py-1"},sG=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Topic Update Request ",-1),AG={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},aG={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},cG=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),uG={class:"px-3 py-4 font-medium text-gray-900 text-center"},lG={class:"px-3 py-4"},gG={class:"px-3 py-4 text-center"},EG={class:"px-2 py-4 text-center"},hG={class:"px-2 py-4 text-gray-500 hover:text-genpact-darkest-blue"},CG=Object.freeze(Object.defineProperty({__proto__:null,default:ke({__name:"SkillAutomation",setup(t){const e=w([]),i=w(),r=w(!1),s=Pe(),o=It(),A=na(),n=c=>{sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","skillAutomation"),A.replace({name:"EditSkillAdminData"}),s.topicNameForSkillData=c.Topic,s.descriptionForSkillData=c.Description,s.offeringTypeForSkillData=c.OfferingType,s.enableInputbox=!1},a=async()=>{var c,u;try{const l=await Ai("/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),Le.isAxiosError(l)){const g=l;o.setError(((u=g.response)==null?void 0:u.data).message)}else o.setError("There was an issue while fetching data")}};return ri(async()=>{await a(),r.value=!0}),(c,u)=>(m(),Q(De,null,[h("nav",rG,[oe(iG)]),r.value?(m(),Q("div",nG,[h("div",oG,[sG,h("div",AG,[h("table",aG,[cG,h("tbody",null,[(m(!0),Q(De,null,ht(e.value,(l,g)=>(m(),Q("tr",{key:g,class:"odd:bg-white even:bg-gray-100"},[h("th",uG,Re(l.Topic||"title"),1),h("td",lG,Re(l.Description||"desc"),1),h("td",gG,Re(l.OfferingType||"Knowledge Corpus"),1),h("td",EG,Re(l.DuplicateExists),1),h("td",hG,[oe(f(km),{onClick:E=>n(l),class:"w-8 h-8 text-center cursor-pointer hover:-translate-y-1 hover:scale-110 duration-300"},null,8,["onClick"])])]))),128))])])])])])):(m(),Pi(al,{key:1}))],64))}})},Symbol.toStringTag,{value:"Module"})),IG={className:"flex justify-between items-center gap-4 h-14"},pG=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),dG=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Admin Data",-1),SG=h("img",{class:"md:w-36 w-20",src:So},null,-1),MG=ke({__name:"HeaderForEditSKillAdminDatas",setup(t){const e=na(),i=()=>{const r=sessionStorage.getItem("role");console.log("role",r),r==="user"?e.push({name:"SkillData"}):r==="admin"?e.push({name:"SkillData"}):e.push({name:"SkillAutomation"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")};return(r,s)=>(m(),Q("div",IG,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[oe(f(DC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),pG]),dG,SG]))}}),li=t=>(wt("data-v-ecf2c818"),t=t(),mt(),t),BG={class:"bg-genpact-blue-box w-full px-5 mb-6"},vG={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},RG=li(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[ft("Topic Name "),h("span",{class:"label"},"*")])],-1)),wG={class:"col-span-4"},mG=["disabled"],fG=li(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[ft("Description "),h("span",{class:"label"},"*")])],-1)),QG={class:"col-span-4"},DG=li(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"Knowledge Corpus",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[ft("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),yG={class:"col-span-4"},TG=li(()=>h("div",{class:"col-span-1"},null,-1)),LG={class:"col-span-4"},UG={class:"grid md:grid-cols-5 grid-cols-1 justify-start items-center gap-2"},OG={class:"col-span-1"},NG=["disabled"],KG={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40"},FG=[li(()=>h("img",{class:"w-10 h-10 block loadercss",src:yi,alt:"Loader Gif"},null,-1))],GG=li(()=>h("div",{class:"col-span-1"},null,-1)),kG=li(()=>h("div",{class:"col-span-1"},null,-1)),jG={class:"col-span-1 flex md:justify-end justify-start items-end"},xG={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},YG=[li(()=>h("img",{class:"w-10 h-10 block loadercss",src:yi,alt:"Loader Gif"},null,-1))],zG={class:"col-span-1 flex md:justify-end justify-start items-end"},bG=["disabled"],PG={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},qG=[li(()=>h("img",{class:"w-10 h-10 block loadercss",src:yi,alt:"Loader Gif"},null,-1))],JG={class:"pl-16 pr-8 py-2"},VG={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},HG={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},WG=li(()=>h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Score")])],-1)),ZG={class:"px-3 py-4 font-medium text-gray-900 text-center"},XG={class:"px-3 py-4"},_G={class:"px-3 py-4 text-center"},$G=li(()=>h("td",{class:"px-3 py-4 text-center"},Re("1.05"),-1)),ek={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},tk={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},ik=ke({__name:"EditSkillAdminData",setup(t){const e=Pe(),i=It(),r=w(!0),s=w(!0),o=w(!0),A=w(!1),n=w(""),a=w(!1),c=w(!1),u=w(),l=w(),g=w(""),E=w([]),C=async()=>{var d,M,B,y,L,U;try{const D={question:e.descriptionForSkillData};console.log("question",n.value),r.value=!1;const k=await at("/SearchSkillTags",D);l.value=(M=(d=k==null?void 0:k.data)==null?void 0:d.body)==null?void 0:M.length,console.log("ARRAY LENGTH",l.value),u.value=((B=k==null?void 0:k.data)==null?void 0:B.body)||[],E.value=u.value,console.log("length",(L=(y=k==null?void 0:k.data)==null?void 0:y.body)==null?void 0:L.length),console.log("data",k),r.value=!0,a.value=!0,c.value=!0,console.log("showSubmitButton",c.value)}catch(D){if(console.error(D),r.value=!0,Le.isAxiosError(D)){const k=D;i.setError(((U=k.response)==null?void 0:U.data).message)}else i.setError("We ran into an issue while fetching duplicate values.")}},p=async()=>{var d;try{console.log("before rejecting topic"),s.value=!1;const M=encodeURIComponent(e.topicNameForSkillData),B=await Ai(`/rejectTempTopic?Topic=${M}`);console.log("encoded topic",M),console.log("response",B),s.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),s.value=!0,Le.isAxiosError(M)){const B=M;i.setError(((d=B.response)==null?void 0:d.data).message)}else i.setError("We ran into an issue while rejecting values.")}},S=async()=>{var d;try{const M={Topic:e.topicNameForSkillData,Description:e.descriptionForSkillData,OfferingType:e.offeringTypeForSkillData};console.log("payload-=====>",M),o.value=!1;const B=await at("/editMasterSkillFile",M);console.log("data",B),o.value=!0,g.value="Data Submitted Successfully!",I()}catch(M){if(console.error(M),o.value=!0,Le.isAxiosError(M)){const B=M;i.setError(((d=B.response)==null?void 0:d.data).message)}else i.setError("There was an issue while inserting data")}},I=()=>{A.value=!0,setTimeout(()=>{A.value=!1;const d=sessionStorage.getItem("role");console.log("role",d),d==="user"?Mn.push({name:"SkillData"}):d==="admin"?Mn.push({name:"SkillData"}):Mn.push({name:"SkillAutomation"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")},3e3)};return(d,M)=>(m(),Q(De,null,[h("nav",BG,[oe(MG)]),h("div",vG,[RG,h("div",wG,[Ge(h("input",{disabled:f(e).enableInputbox!==!0,class:ge([f(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=>f(e).topicNameForSkillData=B),id:"topic",placeholder:"Write here...",required:""},null,10,mG),[[_e,f(e).topicNameForSkillData]])]),fG,h("div",QG,[Ge(h("textarea",{"onUpdate:modelValue":M[1]||(M[1]=B=>f(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),[[_e,f(e).descriptionForSkillData]])]),DG,h("div",yG,[Ge(h("input",{"onUpdate:modelValue":M[3]||(M[3]=B=>f(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),[[_e,f(e).offeringTypeForSkillData]])]),TG,h("div",LG,[h("div",UG,[h("div",OG,[r.value?(m(),Q("button",{key:0,disabled:f(e).isTopicPending===!0,class:ge([f(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,NG)):(m(),Q("div",KG,FG))]),GG,kG,h("div",jG,[s.value?(m(),Q("button",{key:0,type:"button",onClick:p,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",xG,YG))]),h("div",zG,[o.value?(m(),Q("button",{key:0,type:"submit",disabled:c.value!==!0,class:ge([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,bG)):(m(),Q("div",PG,qG))])])])]),Ge(h("div",JG,[h("div",VG,[h("table",HG,[WG,h("tbody",null,[(m(!0),Q(De,null,ht(E.value,(B,y)=>(m(),Q("tr",{key:y,class:"odd:bg-white even:bg-gray-100"},[h("th",ZG,Re(B.Topic||"title"),1),h("td",XG,Re(B.Description||"desc"),1),h("td",_G,Re(B.OfferingType||"Knowledge Corpus"),1),$G]))),128))])])])],512),[[En,a.value]]),Ge(h("div",ek,[h("div",tk,Re(g.value),1)],512),[[En,A.value]])],64))}}),tj="",rk=Object.freeze(Object.defineProperty({__proto__:null,default:Ve(ik,[["__scopeId","data-v-ecf2c818"]])},Symbol.toStringTag,{value:"Module"})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t5v/HEq4uLqudlylmxs9KQXFs9/Dlh8glPmwpa/SkR0q4SmCC0iPnR3OWGHVck7zT+Pe1MyHtFwtcBOb/VYbnlxjXO1uD68zPrsP08bgyxl/3ueQLhm8uLoeOhhXUA2nAxaSDhH/aeYhzNrew/jaP934PUyvoQW5G/ZZN43yOfwu3Tug6XEFNREBC0ozqD+t7Nr2WY4vL/fpPeQ+1a2kfTqF0cQKf8bthIe5e7M+h9/d7W+aH1dQCxGwsHHlfXx5+fGM28wu6aR/P22APp6xgSvhx7ThaW1F/03mcn4xdyKoz+F3d/ub/d3+pulxBTUQAStJ51L/ZYOV1o/pMPX/PGdFPu4FHl9efpn2wJa8Ucy01/mnVo4A3JeOBix2O2Gfw9vSJLNNx9UYJCv+u1CUiYErundDoW/SrYNfnDA7+znTrPA3v0uvwNPVBa/TzWk+Sz/nvv7p7ng/VvJwoHN9ly5Re24i35vLO0+ZbOdz+N29Gwp9k24dvPi4Sv8mNM8lghVIK/KrtNGYDhF/9J6V2LSCni7/Gn//vNWKO01ye/Hg9V89sRGcXuP0ul83eMi/Sj6Ht6VbCJ89rp67/A9aJgIAIChzAgAgKBEAAEGJAAAISgQAQFAiAACCEgEAEJQIAICgRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAAAISgQAQFAiAACCEgEAEJQIAICgRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAACIaBiG/w+yjGibxxwNWgAAAABJRU5ErkJggg==",ok={},sk={class:"w-screen h-screen flex justify-center"},Ak=[h("div",{class:"flex flex-col justify-center items-center gap-6"},[h("img",{class:"h-24",src:nk}),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 ak(t,e){return m(),Q("div",sk,Ak)}const jS=Object.freeze(Object.defineProperty({__proto__:null,default:Ve(ok,[["render",ak]])},Symbol.toStringTag,{value:"Module"}))});
|