"use strict";(self.webpackChunk_1js_people_in_taskbar=self.webpackChunk_1js_people_in_taskbar||[]).push([[351],{19413:(t,e,o)=>{o.r(e),o.d(e,{AugLoopHost:()=>v});var n=o(16533),s=o(20466),i=o(60582);async function r(t){return new Promise((e=>{setTimeout(e,t)}))}async function a(t,e){try{return await Promise.race([t.then((()=>"success")),r(e).then((()=>"timeout"))])}catch{return"error"}}var u=o(97196),c=o(11534),p=o(98350),h=o(93757),f=o(9955),l=o(42004),g=o(35989),m=o(64345),d=o(22387),b=o(2270),v=function(){function t(t){this.annotationTypes=[p.J_.getTypeName()],this.augLoopSession=t.augLoopSession,this.config=t}return t.prototype.setupAugLoopWorkflowsAndAnnotations=function(){return(0,n.sH)(this,void 0,void 0,(function(){var t;return(0,n.YH)(this,(function(e){switch(e.label){case 0:return(t=this.registerWorkflows())?[4,this.activateAnnotations()]:[2,t];case 1:return[2,t=e.sent()]}}))}))},t.prototype.registerWorkflows=function(){var t={wasmRoot:"".concat((0,u.l)({environment:"Prod"})).concat(c.Tx),locateFile:function(t,e){return e+t.toLocaleLowerCase()},cacheModule:!0},e=(0,l.Nz)(this.config,t),o=(0,g.km)(this.config,t);try{this.augLoopSession.registerLocalWorkflow(e),this.augLoopSession.registerLocalWorkflow(o)}catch(t){s.vF.log(i.$5U,{error:t})}return!0},t.prototype.activateAnnotations=function(){return(0,n.sH)(this,void 0,void 0,(function(){var t,e,o=this;return(0,n.YH)(this,(function(r){switch(r.label){case 0:return t={callback:function(t){return o.config.listener.onResultsReceived(t)}},e=!0,[4,Promise.all(this.annotationTypes.map((function(r){return(0,n.sH)(o,void 0,void 0,(function(){var o;return(0,n.YH)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.augLoopSession.activateAnnotation(r,t)];case 1:return n.sent(),s.vF.log(i.fEh,{dataPoints:{annotationType:r}}),[3,3];case 2:return o=n.sent(),s.vF.log(i.LqU,{error:o,dataPoints:{annotationType:r}}),e=!1,[3,3];case 3:return[2]}}))}))})))];case 1:return r.sent(),[2,e]}}))}))},t.prototype.submitSearchSuggestionsRequest=function(t){return this.submitOperation(t)},t.prototype.submitForceRefresh=function(){return this.submitOperation(new h.$9({forceRefresh:!0}))},t.prototype.submitOperation=function(t){var e={id:"",body:t},o=new d.Xr({parentPath:["session","doc"],items:[e]});this.augLoopSession.submitOperation(o)},t.prototype.submitSeedOperation=function(){var t={id:"doc",body:new b.yo({isReadonly:!1})},e=new d.Xr({parentPath:["session"],items:[t]});this.augLoopSession.submitSeedOperations([e])},t.prototype.submitClientConfigSignalOperation=function(t){var e={id:"",body:new f.c7({sessionConfig:{clientConfig:t},parentPath:"session\\doc"})},o=new d.g0({parentPath:["session","doc"],items:[e]});this.augLoopSession.submitOperation(o)},t.prototype.submitStartupSignalOperation=function(){var t={id:"",body:new f.ep},e=new d.g0({parentPath:["session","doc"],items:[t]});this.augLoopSession.submitOperation(e)},t.prototype.submitKeepAliveSignalOperation=function(){this.augLoopSession.submitCustomMessage(new m.PR)},t.prototype.deleteStorage=function(t){return(0,n.sH)(this,void 0,void 0,(function(){var e=this;return(0,n.YH)(this,(function(o){switch(o.label){case 0:return[4,a(new Promise((function(t,o){e.augLoopSession.activateAnnotation(p.rQ.getTypeName(),{callback:function(){return t()}}).catch((function(){return o()})),e.submitOperation(new h.zV)})),t)];case 1:switch(o.sent()){case"success":case"error":case"timeout":return[2]}return[2]}}))}))},t.prototype.closeSession=function(){this.augLoopSession.close()},t}()}}]);