@microsoft/teams-js 2.31.0-beta.2 → 2.31.0-beta.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?l(e,i,o,"day"):i>=r?l(e,i,r,"hour"):i>=n?l(e,i,n,"minute"):i>=t?l(e,i,t,"second"):e+" ms"}function l(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>Le,AppId:()=>Xn,ChannelType:()=>Qe,ChildAppWindow:()=>wp,DialogDimension:()=>Ke,EmailAddress:()=>zd,ErrorCode:()=>Ue,FileOpenPreference:()=>xe,FrameContexts:()=>qe,HostClientType:()=>ze,HostName:()=>$e,LiveShareHost:()=>_h,NotificationTypes:()=>cc,ParentAppWindow:()=>Cp,SecondaryM365ContentIdName:()=>De,TaskModuleDimension:()=>Ke,TeamType:()=>Ge,UserSettingTypes:()=>uc,UserTeamRole:()=>Je,ViewerActionTypes:()=>lc,app:()=>i,appEntity:()=>U,appInitialization:()=>we,appInstallDialog:()=>$,authentication:()=>a,barCode:()=>G,calendar:()=>oe,call:()=>ve,chat:()=>J,clipboard:()=>K,conversations:()=>E,copilot:()=>A,dialog:()=>p,enablePrintCapability:()=>Xm,executeDeepLink:()=>gh,externalAppAuthentication:()=>T,externalAppAuthenticationForCEA:()=>P,externalAppCardActions:()=>O,externalAppCardActionsForCEA:()=>F,externalAppCommands:()=>R,files:()=>k,geoLocation:()=>X,getAdaptiveCardSchemaVersion:()=>hp,getContext:()=>eh,getMruTabInstances:()=>fh,getTabInstances:()=>dh,hostEntity:()=>z,initialize:()=>Zm,initializeWithFrameContext:()=>hh,liveShare:()=>be,location:()=>ee,logs:()=>b,mail:()=>ie,marketplace:()=>Ee,media:()=>q,meeting:()=>ne,meetingRoom:()=>M,menus:()=>g,messageChannels:()=>N,monetization:()=>re,navigateBack:()=>Sh,navigateCrossDomain:()=>yh,navigateToTab:()=>Ch,nestedAppAuth:()=>Q,notifications:()=>x,openFilePreview:()=>vc,otherAppStateChange:()=>L,pages:()=>y,people:()=>se,print:()=>Ym,profile:()=>ce,registerAppButtonClickHandler:()=>rh,registerAppButtonHoverEnterHandler:()=>oh,registerAppButtonHoverLeaveHandler:()=>ih,registerBackButtonHandler:()=>ah,registerBeforeUnloadHandler:()=>ch,registerChangeSettingsHandler:()=>uh,registerCustomHandler:()=>mc,registerFocusEnterHandler:()=>lh,registerFullScreenHandler:()=>nh,registerOnLoadHandler:()=>sh,registerOnThemeChangeHandler:()=>th,registerUserSettingsChangeHandler:()=>hc,remoteCamera:()=>D,returnFocus:()=>wh,search:()=>le,secondaryBrowser:()=>Y,sendCustomEvent:()=>gc,sendCustomMessage:()=>pc,setFrameContext:()=>mh,settings:()=>ye,shareDeepLink:()=>ph,sharing:()=>de,stageView:()=>pe,tasks:()=>Se,teams:()=>_,teamsCore:()=>ae,thirdPartyCloudStorage:()=>Ce,uploadCustomApp:()=>fc,version:()=>Un,videoEffects:()=>W,videoEffectsEx:()=>B,visualMedia:()=>me,webStorage:()=>he});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>mr,getTelemetryPort:()=>pr,isSupported:()=>gr});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>br,getDataLayerPort:()=>yr,isSupported:()=>Sr});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Er,registerOnResumeHandler:()=>Ir});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Fr,FailedReason:()=>Or,Messages:()=>Pr,_initialize:()=>Nr,_uninitialize:()=>xr,getContext:()=>Lr,getFrameContext:()=>kr,initialize:()=>Mr,isInitialized:()=>Rr,lifecycle:()=>o,notifyAppLoaded:()=>Dr,notifyExpectedFailure:()=>Vr,notifyFailure:()=>Hr,notifySuccess:()=>Ur,openLink:()=>Br,registerHostToAppPerformanceMetricsHandler:()=>Wr,registerOnThemeChangeHandler:()=>_r});var a={};n.r(a),n.d(a,{DataResidency:()=>fo,authenticate:()=>Zr,getAuthToken:()=>Yr,getUser:()=>to,initialize:()=>Kr,notifyFailure:()=>co,notifySuccess:()=>so,registerAuthenticationHandlers:()=>Qr});var s={};n.r(s),n.d(s,{isSupported:()=>go,resize:()=>po});var c={};n.r(c),n.d(c,{isSupported:()=>ho,open:()=>mo});var l={};n.r(l),n.d(l,{isSupported:()=>yo,registerOnMessageFromParent:()=>Co,sendMessageToDialog:()=>wo,sendMessageToParentFromDialog:()=>vo});var u={};n.r(u),n.d(u,{bot:()=>c,getDialogInfoFromBotUrlDialogInfo:()=>Ao,getDialogInfoFromUrlDialogInfo:()=>Io,isSupported:()=>Eo,open:()=>So,parentCommunication:()=>l,submit:()=>bo});var d={};n.r(d),n.d(d,{isSupported:()=>Do,open:()=>Lo});var f={};n.r(f),n.d(f,{bot:()=>d,isSupported:()=>Ho,open:()=>Uo});var p={};n.r(p),n.d(p,{adaptiveCard:()=>f,initialize:()=>Vo,isSupported:()=>_o,update:()=>s,url:()=>u});var g={};n.r(g),n.d(g,{DisplayMode:()=>Bo,MenuItem:()=>zo,MenuListType:()=>jo,initialize:()=>Qo,isSupported:()=>ri,setNavBarMenu:()=>Yo,setUpViews:()=>Zo,showActionMenu:()=>ti});var m={};n.r(m),n.d(m,{initialize:()=>oi,isSupported:()=>hi,registerChangeConfigHandler:()=>fi,registerOnRemoveHandler:()=>li,registerOnRemoveHandlerHelper:()=>ui,registerOnSaveHandler:()=>si,registerOnSaveHandlerHelper:()=>ci,setConfig:()=>ai,setValidityState:()=>ii});var h={};n.r(h),n.d(h,{isSupported:()=>Di,onClick:()=>Ni,onHoverEnter:()=>xi,onHoverLeave:()=>Li});var v={};n.r(v),n.d(v,{isSupported:()=>Vi,navigateTo:()=>Ui,navigateToDefaultPage:()=>Hi});var w={};n.r(w),n.d(w,{enterFullscreen:()=>_i,exitFullscreen:()=>Wi,isSupported:()=>Bi});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>$i,getTabInstances:()=>zi,isSupported:()=>qi,navigateToTab:()=>ji});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Gi,ReturnFocusType:()=>Ji,appButton:()=>h,backStack:()=>S,config:()=>m,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>Yi,initializeWithFrameContext:()=>Xi,isSupported:()=>oa,navigateCrossDomain:()=>ea,navigateToApp:()=>ta,registerFocusEnterHandler:()=>Qi,registerFullScreenHandler:()=>ra,returnFocus:()=>Ki,setCurrentFrame:()=>Zi,shareDeepLink:()=>na,tabs:()=>C});var S={};n.r(S),n.d(S,{_initialize:()=>Sa,isSupported:()=>Ta,navigateBack:()=>ba,registerBackButtonHandler:()=>Ea,registerBackButtonHandlerHelper:()=>Ia});var b={};n.r(b),n.d(b,{isSupported:()=>sc,registerGetLogHandler:()=>ac});var E={};n.r(E),n.d(E,{closeConversation:()=>yc,getChatMembers:()=>Sc,isSupported:()=>bc,openConversation:()=>Cc});var I={};n.r(I),n.d(I,{getEligibilityInfo:()=>Pc,isSupported:()=>Tc});var A={};n.r(A),n.d(A,{eligibility:()=>I});var T={};n.r(T),n.d(T,{ActionExecuteInvokeRequestType:()=>Mc,ActionExecuteResponseHandler:()=>Dc,InvokeErrorCode:()=>Lc,InvokeResponseType:()=>xc,OriginalRequestType:()=>Nc,SerializableActionExecuteInvokeRequest:()=>Rc,authenticateAndResendRequest:()=>Wc,authenticateWithOauth2:()=>zc,authenticateWithPowerPlatformConnectorPlugins:()=>$c,authenticateWithSSO:()=>Bc,authenticateWithSSOAndResendRequest:()=>jc,isActionExecuteResponse:()=>kc,isInvokeError:()=>Uc,isSupported:()=>qc,validateActionExecuteInvokeRequest:()=>Vc});var P={};n.r(P),n.d(P,{authenticateAndResendRequest:()=>Zc,authenticateWithOauth:()=>Qc,authenticateWithSSO:()=>Kc,authenticateWithSSOAndResendRequest:()=>Xc,isSupported:()=>Yc});var O={};n.r(O),n.d(O,{ActionOpenUrlErrorCode:()=>nl,ActionOpenUrlType:()=>tl,isSupported:()=>il,processActionOpenUrl:()=>ol,processActionSubmit:()=>rl});var F={};n.r(F),n.d(F,{isSupported:()=>ul,processActionOpenUrl:()=>cl,processActionSubmit:()=>ll});var R={};n.r(R),n.d(R,{isSupported:()=>gl,processActionCommand:()=>pl});var k={};n.r(k),n.d(k,{CloudStorageProvider:()=>hl,CloudStorageProviderFileAction:()=>Sl,CloudStorageProviderType:()=>vl,DocumentLibraryAccessType:()=>Cl,FileDownloadStatus:()=>yl,SpecialDocumentLibraryType:()=>wl,addCloudStorageFolder:()=>El,addCloudStorageProvider:()=>kl,addCloudStorageProviderFile:()=>Nl,copyMoveFiles:()=>Ol,deleteCloudStorageFolder:()=>Il,deleteCloudStorageProviderFile:()=>Ll,downloadCloudStorageProviderFile:()=>Dl,getCloudStorageFolderContents:()=>Al,getCloudStorageFolders:()=>bl,getExternalProviders:()=>Pl,getFileDownloads:()=>Fl,openCloudStorageFile:()=>Tl,openDownloadFolder:()=>Rl,registerCloudStorageProviderContentChangeHandler:()=>Vl,registerCloudStorageProviderListChangeHandler:()=>Hl,removeCloudStorageProvider:()=>Ml,renameCloudStorageProviderFile:()=>xl,uploadCloudStorageProviderFile:()=>Ul});var M={};n.r(M),n.d(M,{getPairedMeetingRoomInfo:()=>Bl,isSupported:()=>ql,registerMeetingRoomCapabilitiesUpdateHandler:()=>zl,registerMeetingRoomStatesUpdateHandler:()=>$l,sendCommandToPairedMeetingRoom:()=>jl});var N={};n.r(N),n.d(N,{dataLayer:()=>t,isSupported:()=>Gl,telemetry:()=>e});var x={};n.r(x),n.d(x,{isSupported:()=>Ql,showNotification:()=>Kl});var L={};n.r(L),n.d(L,{isSupported:()=>eu,registerAppInstallationHandler:()=>Xl,unregisterAppInstallationHandler:()=>Yl});var D={};n.r(D),n.d(D,{ControlCommand:()=>nu,ErrorReason:()=>ru,SessionTerminatedReason:()=>ou,getCapableParticipants:()=>iu,isSupported:()=>pu,registerOnCapableParticipantsChangeHandler:()=>lu,registerOnDeviceStateChangeHandler:()=>du,registerOnErrorHandler:()=>uu,registerOnSessionStatusChangeHandler:()=>fu,requestControl:()=>au,sendControlCommand:()=>su,terminateSession:()=>cu});var U={};n.r(U),n.d(U,{isSupported:()=>hu,selectAppEntity:()=>mu});var H={};n.r(H),n.d(H,{getUserJoinedTeams:()=>wu,isSupported:()=>Cu});var V={};n.r(V),n.d(V,{getConfigSetting:()=>Su,isSupported:()=>bu,joinedTeams:()=>H});var _={};n.r(_),n.d(_,{ChannelType:()=>Iu,fullTrust:()=>V,getTeamChannels:()=>Au,isSupported:()=>Pu,refreshSiteUrl:()=>Tu});var W={};n.r(W),n.d(W,{EffectChangeType:()=>Uu,EffectFailureReason:()=>Hu,VideoFrameFormat:()=>Du,isSupported:()=>zu,notifySelectedVideoEffectChanged:()=>_u,registerForVideoEffect:()=>Wu,registerForVideoFrame:()=>Vu});var B={};n.r(B),n.d(B,{ErrorLevel:()=>gd,frameProcessingTimeoutInMs:()=>fd,isSupported:()=>bd,notifyFatalError:()=>Ad,notifySelectedVideoEffectChanged:()=>Cd,registerForVideoEffect:()=>yd,registerForVideoFrame:()=>md,updatePersonalizedEffects:()=>Sd});var j={};n.r(j),n.d(j,{addAndConfigure:()=>Nd,getAll:()=>xd,isSupported:()=>Hd,reconfigure:()=>Ld,remove:()=>Ud,rename:()=>Dd});var z={};n.r(z),n.d(z,{AppTypes:()=>Wd,isSupported:()=>Bd,tab:()=>j});var $={};n.r($),n.d($,{isSupported:()=>ff,openAppInstallDialog:()=>df});var q={};n.r(q),n.d(q,{CameraStartMode:()=>vf,File:()=>bf,FileFormat:()=>mf,ImageOutputFormats:()=>Sf,ImageUriType:()=>yf,Media:()=>Pf,MediaControllerEvent:()=>hf,MediaType:()=>Cf,Source:()=>wf,VideoController:()=>Ff,captureImage:()=>Ef,hasPermission:()=>If,requestPermission:()=>Af,scanBarCode:()=>Mf,selectMedia:()=>Rf,viewImages:()=>kf});var G={};n.r(G),n.d(G,{hasPermission:()=>Gf,isSupported:()=>Kf,requestPermission:()=>Jf,scanBarCode:()=>qf});var J={};n.r(J),n.d(J,{isSupported:()=>ep,openChat:()=>Zf,openGroupChat:()=>Yf});var K={};n.r(K),n.d(K,{isSupported:()=>ip,read:()=>op,write:()=>rp});var Q={};n.r(Q),n.d(Q,{isNAAChannelRecommended:()=>ap});var Z={};n.r(Z),n.d(Z,{chooseLocation:()=>cp,isSupported:()=>up,showLocation:()=>lp});var X={};n.r(X),n.d(X,{getCurrentLocation:()=>fp,hasPermission:()=>pp,isSupported:()=>mp,map:()=>Z,requestPermission:()=>gp});var Y={};n.r(Y),n.d(Y,{isSupported:()=>bp,open:()=>Sp});var ee={};n.r(ee),n.d(ee,{getLocation:()=>Ip,isSupported:()=>Tp,showLocation:()=>Ap});var te={};n.r(te),n.d(te,{setOptions:()=>Op});var ne={};n.r(ne),n.d(ne,{CallType:()=>xp,EventActionSource:()=>Dp,MeetingReactionType:()=>Mp,MeetingType:()=>Np,SharingProtocol:()=>Lp,appShareButton:()=>te,getAppContentStageSharingCapabilities:()=>Gp,getAppContentStageSharingState:()=>Kp,getAuthenticationTokenForAnonymousUser:()=>Wp,getIncomingClientAudioState:()=>Up,getLiveStreamState:()=>Bp,getMeetingDetails:()=>Vp,getMeetingDetailsVerbose:()=>_p,joinMeeting:()=>Yp,registerLiveStreamChangedHandler:()=>$p,registerMeetingReactionReceivedHandler:()=>Xp,registerRaiseHandStateChangedHandler:()=>Zp,registerSpeakingStateChangeHandler:()=>Qp,requestAppAudioHandling:()=>eg,requestStartLiveStreaming:()=>jp,requestStopLiveStreaming:()=>zp,shareAppContentToStage:()=>qp,stopSharingAppContentToStage:()=>Jp,toggleIncomingClientAudio:()=>Hp,updateMicState:()=>rg});var re={};n.r(re),n.d(re,{isSupported:()=>cg,openPurchaseExperience:()=>sg});var oe={};n.r(oe),n.d(oe,{composeMeeting:()=>dg,isSupported:()=>fg,openCalendarItem:()=>ug});var ie={};n.r(ie),n.d(ie,{ComposeMailType:()=>vg,composeMail:()=>mg,isSupported:()=>hg,openMailItem:()=>gg});var ae={};n.r(ae),n.d(ae,{enablePrintCapability:()=>Cg,isSupported:()=>Ag,print:()=>yg,registerBeforeUnloadHandler:()=>Eg,registerBeforeUnloadHandlerHelper:()=>Ig,registerOnLoadHandler:()=>Sg,registerOnLoadHandlerHelper:()=>bg});var se={};n.r(se),n.d(se,{isSupported:()=>Rg,selectPeople:()=>Og});var ce={};n.r(ce),n.d(ce,{isSupported:()=>Lg,showProfile:()=>xg});var le={};n.r(le),n.d(le,{closeSearch:()=>jg,isSupported:()=>Bg,registerHandlers:()=>_g,unregisterHandlers:()=>Wg});var ue={};n.r(ue),n.d(ue,{getContent:()=>qg,isSupported:()=>Gg});var de={};n.r(de),n.d(de,{SharingAPIMessages:()=>Qg,history:()=>ue,isSupported:()=>nm,shareWebContent:()=>Zg});var fe={};n.r(fe),n.d(fe,{close:()=>om,isSupported:()=>im});var pe={};n.r(pe),n.d(pe,{StageViewOpenMode:()=>sm,isSupported:()=>lm,open:()=>cm,self:()=>fe});var ge={};n.r(ge),n.d(ge,{captureImages:()=>pm,isSupported:()=>mm,retrieveImages:()=>gm});var me={};n.r(me),n.d(me,{CameraRestriction:()=>ym,Source:()=>Sm,hasPermission:()=>bm,image:()=>ge,requestPermission:()=>Em});var he={};n.r(he),n.d(he,{isSupported:()=>Rm,isWebStorageClearedOnUserLogOut:()=>Om});var ve={};n.r(ve),n.d(ve,{CallModalities:()=>Mm,isSupported:()=>xm,startCall:()=>Nm});var we={};n.r(we),n.d(we,{ExpectedFailureReason:()=>Fr,FailedReason:()=>Or,Messages:()=>Pr,notifyAppLoaded:()=>Dm,notifyExpectedFailure:()=>Vm,notifyFailure:()=>Hm,notifySuccess:()=>Um});var Ce={};n.r(Ce),n.d(Ce,{getDragAndDropFiles:()=>Gm,isSupported:()=>Km});var ye={};n.r(ye),n.d(ye,{getSettings:()=>Ih,registerOnRemoveHandler:()=>Ph,registerOnSaveHandler:()=>Th,setSettings:()=>Ah,setValidityState:()=>Eh});var Se={};n.r(Se),n.d(Se,{getDefaultSizeIfNotProvided:()=>Lh,startTask:()=>Rh,submitTask:()=>Mh,updateTask:()=>kh});var be={};n.r(be),n.d(be,{ContainerState:()=>Hh,LiveShareHost:()=>_h,UserMeetingRole:()=>Uh,isSupported:()=>Vh});var Ee={};n.r(Ee),n.d(Ee,{CartStatus:()=>nv,Intent:()=>tv,addOrUpdateCartItems:()=>ov,cartVersion:()=>ev,getCart:()=>rv,isSupported:()=>sv,removeCartItems:()=>iv,updateCartStatus:()=>av});var Ie=n(815);const Ae={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Te;const Pe=new Uint8Array(16);function Oe(){if(!Te&&(Te="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Te))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Te(Pe)}const Fe=[];for(let e=0;e<256;++e)Fe.push((e+256).toString(16).slice(1));function Re(e,t=0){return Fe[e[t+0]]+Fe[e[t+1]]+Fe[e[t+2]]+Fe[e[t+3]]+"-"+Fe[e[t+4]]+Fe[e[t+5]]+"-"+Fe[e[t+6]]+Fe[e[t+7]]+"-"+Fe[e[t+8]]+Fe[e[t+9]]+"-"+Fe[e[t+10]]+Fe[e[t+11]]+Fe[e[t+12]]+Fe[e[t+13]]+Fe[e[t+14]]+Fe[e[t+15]]}const ke=function(e,t,n){if(Ae.randomUUID&&!t&&!e)return Ae.randomUUID();const r=(e=e||{}).random||(e.rng||Oe)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Re(r)},Me=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const Ne=function(e){return"string"==typeof e&&Me.test(e)};var xe,Le,De,Ue,He,Ve,_e,We,Be,je,ze,$e,qe,Ge,Je,Ke,Qe;function Ze(e){return void 0!==(null==e?void 0:e.errorCode)}!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(xe||(xe={})),function(e){e.M365Content="m365content"}(Le||(Le={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(De||(De={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(Ue||(Ue={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(He||(He={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Ve||(Ve={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(_e||(_e={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(We||(We={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Be||(Be={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(je||(je={})),function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(ze||(ze={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}($e||($e={})),function(e){e.settings="settings",e.content="content",e.authentication="authentication",e.remove="remove",e.task="task",e.sidePanel="sidePanel",e.stage="stage",e.meetingStage="meetingStage"}(qe||(qe={})),function(e){e[e.Standard=0]="Standard",e[e.Edu=1]="Edu",e[e.Class=2]="Class",e[e.Plc=3]="Plc",e[e.Staff=4]="Staff"}(Ge||(Ge={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(Je||(Je={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(Ke||(Ke={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Qe||(Qe={}));const Xe={errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM},Ye={majorVersion:1,minorVersion:5},et={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},tt=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),nt=new Error("Invalid response: Received more images than the specified max limit in the response."),rt=Object.prototype.toString,ot="[object Uint8Array]",it="[object ArrayBuffer]",at={utf8:new globalThis.TextDecoder("utf8")};function st(e,t,n){return!!e&&(e.constructor===t||rt.call(e)===n)}function ct(e){return st(e,Uint8Array,ot)}function lt(e){return st(e,ArrayBuffer,it)}function ut(e){if("string"!=typeof e)throw new TypeError(`Expected \`string\`, got \`${typeof e}\``)}function dt(e){return ut(e),Uint8Array.from(globalThis.atob(ft(e)),(e=>{const t=e.codePointAt(0);if(void 0===t)throw new Error("Invalid character encountered");return t}))}function ft(e){return e.replaceAll("-","+").replaceAll("_","/")}function pt(e,t="utf8"){var n;return mt(e),null!==(n=at[t])&&void 0!==n||(at[t]=new globalThis.TextDecoder(t)),at[t].decode(e)}function gt(e){return ut(e),pt(dt(e))}function mt(e){if(!ht(e))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``)}function ht(e){return ct(e)||lt(e)}function vt(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function wt(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const n=e.split("."),r=t.split(".");function o(e){return/^\d+$/.test(e)}if(!n.every(o)||!r.every(o))return NaN;for(;n.length<r.length;)n.push("0");for(;r.length<n.length;)r.push("0");for(let e=0;e<n.length;++e)if(Number(n[e])!=Number(r[e]))return Number(n[e])>Number(r[e])?1:-1;return 0}function Ct(){return ke()}function yt(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&yt(e[t])})),Object.freeze(e)}function St(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function bt(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function Et(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function It(e,t,n){return new Promise(((r,o)=>{const i=setTimeout(o,t,n);e().then((e=>{clearTimeout(i),r(e)})).catch((e=>{clearTimeout(i),o(e)}))}))}function At(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId.toString())+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl.toString()),(e.chatId||e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({chatId:e.chatId,channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function Tt(e){return!(wt(`${e.majorVersion}.${e.minorVersion}`,`${Ye.majorVersion}.${Ye.minorVersion}`)>=0)}function Pt(e){return"https:"===e.protocol}function Ot(e,t){return new Promise(((n,r)=>{if(e||r("MimeType cannot be null or empty."),t||r("Base64 string cannot be null or empty."),e.startsWith("image/")){const r=gt(t),o=new Uint8Array(r.length);for(let e=0;e<r.length;e++)o[e]=r.charCodeAt(e);n(new Blob([o],{type:e}))}const o=gt(t);n(new Blob([o],{type:e}))}))}function Ft(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function Rt(){if(kt())throw new Error("window object undefined at SSR check");return window}function kt(){return"undefined"==typeof window}function Mt(e,t){if(Lt(e)||!Dt(e)||!Ut(e))throw t||new Error("id is not valid.")}function Nt(e,t){const n=e.toString().toLocaleLowerCase();if(Lt(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Pt(e))throw t||new Error("Url should be a valid https url")}function xt(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Lt(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Dt(e){return e.length<256&&e.length>4}function Ut(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Ht(e){if(!e)throw new Error("id must not be empty");if(!1===Ne(e))throw new Error("id must be a valid UUID")}const Vt=!!performance&&"now"in performance;function _t(){return Vt?performance.now()+performance.timeOrigin:void 0}function Wt(e,t=0){if(t>1e3)return!1;if(void 0===e||"boolean"==typeof e||"number"==typeof e||"bigint"==typeof e||"string"==typeof e||null===e)return!0;if(Array.isArray(e))return e.every((e=>Wt(e,t+1)));return!("object"!=typeof e||"[object Object]"!==Object.prototype.toString.call(e)||Object.getPrototypeOf(e)!==Object.prototype&&null!==Object.getPrototypeOf(e))&&Object.keys(e).every((n=>Wt(e[n],t+1)))}class Bt{constructor(e=Ct()){this.uuid=e,Ht(e)}toString(){return this.uuid}}const jt=new Bt,zt=Ie.debug.formatArgs;Ie.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${jt.toString()}]`,zt.call(this,e)};const $t=(0,Ie.debug)("teamsJs");function qt(e){return $t.extend(e)}function Gt(e,t){return`${e}_${t}`}function Jt(e){return/^v\d+_[\w.]+$/.test(e)}const Kt=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const Qt="2.0.1",Zt="2.0.2",Xt="2.0.3",Yt="2.0.4",en="2.0.1",tn="1.9.0",nn="2.0.0",rn="1.7.0",on="1.8.0",an="1.9.0",sn=n.t(Kt,2).validOrigins,cn=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),ln=/^https:\/\//,un="https",dn="teams.microsoft.com",fn="The library has not yet been initialized",pn="The runtime has not yet been initialized",gn="The runtime version is not supported",mn="The call was not properly started";class hn{}hn.initializeCalled=!1,hn.initializeCompleted=!1,hn.additionalValidOrigins=[],hn.initializePromise=void 0,hn.isFramelessWindow=!1,hn.frameContext=void 0,hn.hostClientType=void 0,hn.printCapabilityEnabled=!1;var vn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const wn=qt("runtime"),Cn=4;function yn(e){return e.apiVersion===Cn}const Sn={apiVersion:-1,supports:{}};function bn(e){if(yn(e))return!0;throw-1===e.apiVersion?new Error(pn):new Error(gn)}let En=Sn;const In={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:et,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},An=[ze.desktop,ze.web,ze.rigel,ze.surfaceHub,ze.teamsRoomsWindows,ze.teamsRoomsAndroid,ze.teamsPhones,ze.teamsDisplays],Tn=[ze.android,ze.ios,ze.ipados],Pn=[...An,...Tn];function On(e){let t=e;if(t.apiVersion<Cn&&Fn.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),yn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const Fn=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,r=vn(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:r})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,r,o,i;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(r=null===(n=e.supports.dialog)||void 0===n?void 0:n.url)||void 0===r?void 0:r.bot,parentCommunication:(null===(o=e.supports.dialog)||void 0===o?void 0:o.url)?{}:void 0},update:null===(i=e.supports.dialog)||void 0===i?void 0:i.update}:void 0})}}}],Rn={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:An}],"1.9.0":[{capability:{location:{}},hostClientTypes:Pn}],"2.0.0":[{capability:{people:{}},hostClientTypes:Pn},{capability:{sharing:{}},hostClientTypes:[ze.desktop,ze.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[ze.android,ze.desktop,ze.ios,ze.teamsRoomsAndroid,ze.teamsPhones,ze.teamsDisplays,ze.web]},{capability:{webStorage:{}},hostClientTypes:[ze.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[ze.android,ze.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[ze.android,ze.ios]}]},kn=wn.extend("generateBackCompatRuntimeConfig");function Mn(e,t){const n=Object.assign({},e);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&("object"!=typeof t[r]||Array.isArray(t[r])?r in e||(n[r]=t[r]):n[r]=Mn(e[r]||{},t[r]));return n}function Nn(e,t,n){kn("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);kn("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{wt(e,t)>=0&&n[t].forEach((e=>{void 0!==hn.hostClientType&&e.hostClientTypes.includes(hn.hostClientType)&&(r=Mn(r,e.capability))}))}));const o={apiVersion:Cn,hostVersionsInfo:et,isLegacyTeams:!0,supports:r};return kn("Runtime config after updating based on highestSupportedVersion: %o",o),o}const xn=wn.extend("applyRuntimeConfig");function Ln(e){"string"==typeof e.apiVersion&&(xn("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),xn("Fast-forwarding runtime %o",e);const t=On(e);xn("Applying runtime %o",t),En=yt(t)}function Dn(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Un="2.31.0-beta.2",Hn=qt("internal"),Vn=Hn.extend("ensureInitializeCalled"),_n=Hn.extend("ensureInitialized");function Wn(){if(!hn.initializeCalled)throw Vn(fn),new Error(fn)}function Bn(e,...t){if(!hn.initializeCompleted)throw _n("%s. initializeCalled: %s",fn,hn.initializeCalled.toString()),new Error(fn);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===hn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${hn.frameContext}".`)}return bn(e)}function jn(e=Qt){const t=wt(hn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function zn(){return hn.hostClientType==ze.android||hn.hostClientType==ze.ios||hn.hostClientType==ze.ipados}function $n(e=Qt){if(!zn()){throw{errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM}}if(!jn(e)){throw{errorCode:Ue.OLD_PLATFORM}}}function qn(e){let t=hn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&ln.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),hn.additionalValidOrigins=t}function Gn(e){if(Lt(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(!Qn(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Jn}-${Kn}).`);if(Zn(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Jn=4,Kn=256;function Qn(e){return e.length<Kn&&e.length>Jn}function Zn(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}class Xn{constructor(e){this.appIdAsString=e,Gn(e)}serialize(){return this.toString()}toString(){return this.appIdAsString}}function Yn(e){return null==e}var er=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let tr=[];const nr=qt("validateOrigin");function rr(){return er(this,void 0,void 0,(function*(){yield ir()}))}function or(){return 0===tr.length}function ir(){return er(this,void 0,void 0,(function*(){return or()?kt()?(tr=sn,sn):fetch(cn).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(ar(JSON.stringify(e)))return tr=e.validOrigins,tr;throw new Error("Valid Origins List Is Invalid")}))})).catch((e=>(nr("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),tr=sn,tr))):tr}))}function ar(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return nr("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function sr(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function cr(e){return ir().then((t=>{if(!Pt(e))return nr("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>sr(e,n))))return!0;for(const e of hn.additionalValidOrigins){if(sr("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return nr("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,hn.additionalValidOrigins),!1}))}var lr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let ur;const dr="v1",fr=qt("messageChannels.telemetry");function pr(){return lr(this,void 0,void 0,(function*(){if(ur)return fr("Returning telemetry port from cache"),ur;if(!gr())throw Xe;return ur=yield ys(Gt(dr,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),ur}))}function gr(){var e;return!(!Bn(En)||!(null===(e=En.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function mr(){ur=void 0}var hr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let vr;const wr="v1",Cr=qt("messageChannels.dataLayer");function yr(){return hr(this,void 0,void 0,(function*(){if(vr)return Cr("Returning dataLayer port from cache"),vr;if(!Sr())throw Xe;return vr=yield ys(Gt(wr,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),vr}))}function Sr(){var e;return!(!Bn(En)||!(null===(e=En.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function br(){vr=void 0}function Er(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Bn(En),Ga(e)}function Ir(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Bn(En),Ja(e)}const Ar="v2",Tr=qt("app"),Pr={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Or,Fr;function Rr(){return hn.initializeCompleted}function kr(){return hn.frameContext}function Mr(e){return rr(),bi(Gt(Ar,"app.initialize"),e)}function Nr(e){cs.currentWindow=e}function xr(){hn.initializeCalled&&(ka(),hn.initializeCalled=!1,hn.initializeCompleted=!1,hn.initializePromise=void 0,hn.additionalValidOrigins=[],hn.frameContext=void 0,hn.hostClientType=void 0,hn.isFramelessWindow=!1,mr(),br(),ds())}function Lr(){return new Promise((e=>{Wn(),e(fs(Gt(Ar,"app.getContext"),"getContext"))})).then((e=>jr(e)))}function Dr(){Wn(),Ei(Gt(Ar,"app.notifyAppLoaded"))}function Ur(){return Ti(Gt(Ar,"app.notifySuccess"))}function Hr(e){Wn(),Ai(Gt(Ar,"app.notifyFailure"),e)}function Vr(e){Wn(),Ii(Gt(Ar,"app.notifyExpectedFailure"),e)}function _r(e){ki(Gt(Ar,"app.registerOnThemeChangeHandler"),e)}function Wr(e){_a(e)}function Br(e){return Mi(Gt(Ar,"app.openLink"),e)}function jr(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:$e.teams,clientType:e.hostClientType?e.hostClientType:ze.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:hn.frameContext,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Or||(Or={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Fr||(Fr={})),Tr("teamsjs instance is version %s, starting at %s UTC (%s local)",Un,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(kt())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,n="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?Tr("teamsjs is being used from %s. %s",t,n):Tr("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const zr="v1",$r="v2";let qr,Gr,Jr;function Kr(){xa(Gt(zr,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",lo,!1),xa(Gt(zr,"authentication.registerAuthenticateFailureHandler"),"authentication.authenticate.failure",uo,!1)}function Qr(e){Jr=e}function Zr(e){const t=void 0!==e,n=t?e:Jr;if(!n)throw new Error("No parameters are provided for authentication");Bn(En,qe.content,qe.sidePanel,qe.settings,qe.remove,qe.task,qe.stage,qe.meetingStage);return Xr(n.successCallback||n.failureCallback?Gt(zr,"authentication.authenticate"):Gt($r,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Jr=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Jr=void 0)}}))}function Xr(e,t){return new Promise(((n,r)=>{if(hn.hostClientType!==ze.web){const r=xt(t.url);Nt(r),n(hs(e,"authentication.authenticate",[r.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)})))}else qr={success:n,fail:r},oo(t)}))}function Yr(e){Wn();return eo(e&&(e.successCallback||e.failureCallback)?Gt(zr,"authentication.getAuthToken"):Gt($r,"authentication.getAuthToken"),e).then((t=>e&&e.successCallback?(e.successCallback(t),""):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),"";throw t}))}function eo(e,t){return new Promise((n=>{n(hs(e,"authentication.getAuthToken",[null==t?void 0:t.resources,null==t?void 0:t.claims,null==t?void 0:t.silent,null==t?void 0:t.tenantId]))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function to(e){Wn();return no(e&&(e.successCallback||e.failureCallback)?Gt(zr,"authentication.getUser"):Gt($r,"authentication.getUser")).then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{const n=`Error returned, code = ${t.errorCode}, message = ${t.message}`;if(e&&e.failureCallback)return e.failureCallback(n),null;throw new Error(n)}))}function no(e){return new Promise((t=>{t(hs(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function ro(){io();try{cs.childWindow&&cs.childWindow.close()}finally{cs.childWindow=null,cs.childOrigin=null}}function oo(e){ro();let t=e.width||600,n=e.height||400;t=Math.min(t,cs.currentWindow.outerWidth-400),n=Math.min(n,cs.currentWindow.outerHeight-200);const r=xt(e.url.replace("{oauthRedirectMethod}","web"));Nt(r);let o=void 0!==cs.currentWindow.screenLeft?cs.currentWindow.screenLeft:cs.currentWindow.screenX,i=void 0!==cs.currentWindow.screenTop?cs.currentWindow.screenTop:cs.currentWindow.screenY;o+=cs.currentWindow.outerWidth/2-t/2,i+=cs.currentWindow.outerHeight/2-n/2,cs.childWindow=cs.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),cs.childWindow?ao():uo("FailedToOpenWindow")}function io(){Gr&&(clearInterval(Gr),Gr=0),La("initialize"),La("navigateCrossDomain")}function ao(){io(),Gr=cs.currentWindow.setInterval((()=>{if(!cs.childWindow||cs.childWindow.closed)uo("CancelledByUser");else{const e=cs.childOrigin;try{cs.childOrigin="*",Ys("ping")}finally{cs.childOrigin=e}}}),100),xa(Gt(zr,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[qe.authentication,hn.hostClientType])),xa(Gt(zr,"authentication.authenticationWindow.registerNavigateCrossDomainHandler"),"navigateCrossDomain",(()=>!1))}function so(e,t){Bn(En,qe.authentication);Es(Gt(t?zr:$r,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Zs(cs.parentWindow,(()=>setTimeout((()=>cs.currentWindow.close()),200)))}function co(e,t){Bn(En,qe.authentication);Es(Gt(t?zr:$r,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Zs(cs.parentWindow,(()=>setTimeout((()=>cs.currentWindow.close()),200)))}function lo(e){try{qr&&qr.success(e)}finally{qr=void 0,ro()}}function uo(e){try{qr&&qr.fail(new Error(e))}finally{qr=void 0,ro()}}var fo;function po(e){Po(Gt(To,"dialog.update.resize"),e)}function go(){return!(!Bn(En)||!En.supports.dialog)&&!!En.supports.dialog.update}function mo(e,t,n){Fo(Gt(To,"dialog.url.bot.open"),e,t,n)}function ho(){return Bn(En)&&void 0!==(En.supports.dialog&&En.supports.dialog.url&&En.supports.dialog.url.bot)}function vo(e){if(Bn(En,qe.task),!yo())throw Xe;Es(Gt(To,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function wo(e){if(Bn(En,qe.content,qe.sidePanel,qe.meetingStage),!yo())throw Xe;Es(Gt(To,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Co(e){if(Bn(En,qe.task),!yo())throw Xe;for(La("messageForChild"),xa(Gt(To,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),No.reverse();No.length>0;){e(No.pop())}}function yo(){var e,t;return Bn(En)&&!!(null===(t=null===(e=En.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function So(e,t,n){Oo(Gt(To,"dialog.url.open"),e,t,n)}function bo(e,t){Ro(Gt(To,"dialog.url.submit"),e,t)}function Eo(){return Bn(En)&&void 0!==(En.supports.dialog&&En.supports.dialog.url)}function Io(e){return{url:e.url,height:e.size?e.size.height:Ke.Small,width:e.size?e.size.width:Ke.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Ao(e){const t=Io(e);return t.completionBotId=e.completionBotId,t}!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(fo||(fo={}));const To="v2";function Po(e,t){if(Bn(En,qe.content,qe.sidePanel,qe.task,qe.meetingStage),!go())throw Xe;Es(e,"tasks.updateTask",[t])}function Oo(e,t,n,r){if(Bn(En,qe.content,qe.sidePanel,qe.meetingStage),!Eo())throw Xe;r&&xa(Gt(To,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Es(e,"tasks.startTask",[Io(t)],((e,t)=>{null==n||n({err:e,result:t}),La("messageForParent")}))}function Fo(e,t,n,r){if(Bn(En,qe.content,qe.sidePanel,qe.meetingStage),!ho())throw Xe;r&&xa(Gt(To,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Es(e,"tasks.startTask",[Ao(t)],((e,t)=>{null==n||n({err:e,result:t}),La("messageForParent")}))}function Ro(e,t,n){if(Bn(En,qe.task),!Eo())throw Xe;Es(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function ko(e){return{card:e.card,height:e.size?e.size.height:Ke.Small,width:e.size?e.size.width:Ke.Small,title:e.title}}function Mo(e){const t=ko(e);return t.completionBotId=e.completionBotId,t}const No=[];function xo(e){hn.frameContext&&(hn.frameContext===qe.task?No.push(e):La("messageForChild"))}function Lo(e,t){if(Bn(En,qe.content,qe.sidePanel,qe.meetingStage),!Do())throw Xe;const n=Mo(e);Es(Gt(To,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function Do(){const e=En.hostVersionsInfo&&En.hostVersionsInfo.adaptiveCardSchemaVersion&&!Tt(En.hostVersionsInfo.adaptiveCardSchemaVersion);return Bn(En)&&void 0!==(e&&En.supports.dialog&&En.supports.dialog.card&&En.supports.dialog.card.bot)}function Uo(e,t){if(Bn(En,qe.content,qe.sidePanel,qe.meetingStage),!Ho())throw Xe;const n=ko(e);Es(Gt(To,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function Ho(){const e=En.hostVersionsInfo&&En.hostVersionsInfo.adaptiveCardSchemaVersion&&!Tt(En.hostVersionsInfo.adaptiveCardSchemaVersion);return Bn(En)&&void 0!==(e&&En.supports.dialog&&En.supports.dialog.card)}function Vo(){xa(Gt(To,"dialog.registerMessageForChildHandler"),"messageForChild",xo,!1)}function _o(){return!(!Bn(En)||!En.supports.dialog)}const Wo="v2";var Bo,jo;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(Bo||(Bo={}));class zo{constructor(){this.enabled=!0,this.selected=!1}}let $o,qo,Go,Jo,Ko;function Qo(){xa(Gt(Wo,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",ei,!1),xa(Gt(Wo,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",ni,!1),xa(Gt(Wo,"menus.registerSetModuleViewHandler"),"setModuleView",Xo,!1)}function Zo(e,t){if(Bn(En),!ri())throw Xe;Go=t,Es(Gt(Wo,"menus.setUpViews"),"setUpViews",[e])}function Xo(e){Go&&Go(e)||(Bn(En),Es(Gt(Wo,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Yo(e,t){if(Bn(En),!ri())throw Xe;$o=t,Es(Gt(Wo,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function ei(e){$o&&$o(e)||(Bn(En),Es(Gt(Wo,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function ti(e,t){if(Bn(En),!ri())throw Xe;qo=t,Es(Gt(Wo,"menus.showActionMenu"),"showActionMenu",[e])}function ni(e){qo&&qo(e)||(Bn(En),Es(Gt(Wo,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function ri(){return!(!Bn(En)||!En.supports.menus)}function oi(){xa(Gt(ia,"pages.config.registerSettingsSaveHandler"),"settings.save",di,!1),xa(Gt(ia,"pages.config.registerSettingsRemoveHandler"),"settings.remove",gi,!1)}function ii(e){return ga(Gt(ia,"pages.config.setValidityState"),e)}function ai(e){return ha(Gt(ia,"pages.config.setConfig"),e)}function si(e){ci(Gt(ia,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Yn(e)&&!hi())throw Xe}))}function ci(e,t,n){!Yn(t)&&Bn(En,qe.settings),n&&n(),Jo=t,!Yn(t)&&Es(e,"registerHandler",["save"])}function li(e){ui(Gt(ia,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Yn(e)&&!hi())throw Xe}))}function ui(e,t,n){!Yn(t)&&Bn(En,qe.remove,qe.settings),n&&n(),Ko=t,!Yn(t)&&Es(e,"registerHandler",["remove"])}function di(e){const t=new pi(e);Jo?Jo(t):cs.childWindow?Ys("settings.save",[e]):t.notifySuccess()}function fi(e){Ua(Gt(ia,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[qe.content],(()=>{if(!hi())throw Xe}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(jo||(jo={}));class pi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Es(Gt(ia,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Es(Gt(ia,"pages.saveEvent.notifyFailure"),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function gi(){const e=new mi;Ko?Ko(e):cs.childWindow?Ys("settings.remove",[]):e.notifySuccess()}class mi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Es(Gt(ia,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Es(Gt(ia,"pages.removeEvent.notifyFailure"),"settings.remove.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}}function hi(){return!(!Bn(En)||!En.supports.pages)&&!!En.supports.pages.config}class vi{}class wi extends vi{validate(e){return!0}deserialize(e){return e}}var Ci=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const yi=6e4,Si=qt("app");function bi(e,t){if(kt()){return Si.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return It((()=>Ri(e,t)),yi,new Error("SDK initialization timed out."))}function Ei(e){Es(e,Pr.AppLoaded,[Un])}function Ii(e,t){Es(e,Pr.ExpectedFailure,[t.reason,t.message])}function Ai(e,t){Es(e,Pr.Failure,[t.reason,t.message])}function Ti(e){return Ci(this,void 0,void 0,(function*(){if(hn.initializeCompleted)return Oi(e);if(!hn.initializePromise)throw new Error(fn);return hn.initializePromise.then((()=>Oi(e)))}))}function Pi(){var e;return Bn(En)&&!!(null===(e=En.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Oi(e){return Ci(this,void 0,void 0,(function*(){return Pi()?ws(Pr.Success,[Un],new wi,e).then((()=>({hasFinishedSuccessfully:!0}))):(Es(e,Pr.Success,[Un]),{hasFinishedSuccessfully:"unknown"})}))}const Fi=Si.extend("initializeHelper");function Ri(e,t){return new Promise((n=>{hn.initializeCalled||(hn.initializeCalled=!0,Ra(),hn.initializePromise=us(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Qt})=>{hn.frameContext=e,hn.hostClientType=t,hn.clientSupportedSDKVersion=r;try{Fi("Parsing %s",n);const e=JSON.parse(n);if(Fi("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&Ln(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{Fi("Attempting to parse %s as an SDK version",n),isNaN(wt(n,Qt))||(hn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(Fi("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");Ln(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Ln(Nn(hn.clientSupportedSDKVersion,In,Rn))}}hn.initializeCompleted=!0})),Kr(),Qo(),oi(),Vo()),Array.isArray(t)&&qn(t),void 0!==hn.initializePromise?n(hn.initializePromise):Fi("GlobalVars.initializePromise is unexpectedly undefined")}))}function ki(e,t){!Yn(t)&&Wn(),Ha(e,t)}function Mi(e,t){return new Promise((n=>{Bn(En,qe.content,qe.sidePanel,qe.settings,qe.task,qe.stage,qe.meetingStage),n(ps(e,"executeDeepLink",t))}))}function Ni(e){Ua(Gt(ia,"pages.appButton.onClick"),"appButtonClick",e,[qe.content],(()=>{if(!Di())throw Xe}))}function xi(e){Ua(Gt(ia,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[qe.content],(()=>{if(!Di())throw Xe}))}function Li(e){Ua(Gt(ia,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[qe.content],(()=>{if(!Di())throw Xe}))}function Di(){return!(!Bn(En)||!En.supports.pages)&&!!En.supports.pages.appButton}function Ui(e){return new Promise((t=>{if(Bn(En,qe.content,qe.sidePanel,qe.settings,qe.task,qe.stage,qe.meetingStage),!Vi())throw Xe;t(ms(Gt(ia,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function Hi(){return new Promise((e=>{if(Bn(En,qe.content,qe.sidePanel,qe.settings,qe.task,qe.stage,qe.meetingStage),!Vi())throw Xe;e(ms(Gt(ia,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function Vi(){return!(!Bn(En)||!En.supports.pages)&&!!En.supports.pages.currentApp}function _i(){if(Bn(En,qe.content),!Bi())throw Xe;Es(Gt(ia,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Wi(){if(Bn(En,qe.content),!Bi())throw Xe;Es(Gt(ia,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Bi(){return!(!Bn(En)||!En.supports.pages)&&!!En.supports.pages.fullTrust}function ji(e){return ca(Gt(ia,"pages.tabs.navigateToTab"),e)}function zi(e){return ua(Gt(ia,"pages.tabs.getTabInstances"),e)}function $i(e){return da(Gt(ia,"pages.tabs.getMruTabInstances"),e)}function qi(){return!(!Bn(En)||!En.supports.pages)&&!!En.supports.pages.tabs}var Gi,Ji;function Ki(e){const t=Gt(ia,"pages.returnFocus");if(Bn(En),!oa())throw Xe;if(void 0===e&&Es(t,"returnFocus",[!1]),"boolean"==typeof e)Es(t,"returnFocus",[e]);else switch(e){case Ji.PreviousLandmark:case Ji.GoToActivityFeed:Es(t,"returnFocus",[!1,e]);break;case Ji.NextLandmark:Es(t,"returnFocus",[!0,e])}}function Qi(e){Ua(Gt(ia,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!oa())throw Xe}))}function Zi(e){pa(Gt(ia,"pages.setCurrentFrame"),e)}function Xi(e,t,n){rr(),bi(Gt(ia,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Zi(e)}function Yi(){return ma(Gt(ia,"pages.getConfig."))}function ea(e){return aa(Gt(ia,"pages.navigateCrossDomain"),e)}function ta(e){return new Promise((t=>{if(Bn(En,qe.content,qe.sidePanel,qe.settings,qe.task,qe.stage,qe.meetingStage),!oa())throw Xe;const n=Gt(ia,"pages.navigateToApp");if(En.isLegacyTeams){t(ps(n,"executeDeepLink",At(va(e)?e:wa(e))))}else{t(ps(n,"pages.navigateToApp",va(e)?Ca(e):e))}}))}function na(e){return fa(Gt(ia,"pages.shareDeepLink"),e)}function ra(e){Ua(Gt(ia,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Yn(e)&&!oa())throw Xe}))}function oa(){return!(!Bn(En)||!En.supports.pages)}!function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Gi||(Gi={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Ji||(Ji={}));const ia="v2";function aa(e,t){return new Promise((n=>{if(Bn(En,qe.content,qe.sidePanel,qe.settings,qe.remove,qe.task,qe.stage,qe.meetingStage),!oa())throw Xe;n(gs(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function sa(e){return new Promise((t=>{if(Bn(En),!Ta())throw Xe;t(gs(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function ca(e,t){return new Promise((n=>{if(Bn(En),!qi())throw Xe;n(gs(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function la(e,t){if(Bn(En),!oa())throw Xe;Es(e,"returnFocus",[t])}function ua(e,t){return new Promise((n=>{if(Bn(En),!qi())throw Xe;n(fs(e,"getTabInstances",t))}))}function da(e,t){return new Promise((n=>{if(Bn(En),!qi())throw Xe;n(fs(e,"getMruTabInstances",t))}))}function fa(e,t){if(Bn(En,qe.content,qe.sidePanel,qe.meetingStage),!oa())throw Xe;Es(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function pa(e,t){if(Bn(En,qe.content),!oa())throw Xe;Es(e,"setFrameContext",[t])}function ga(e,t){if(Bn(En,qe.settings,qe.remove),!hi())throw Xe;Es(e,"settings.setValidityState",[t])}function ma(e){return new Promise((t=>{if(Bn(En,qe.content,qe.settings,qe.remove,qe.sidePanel),!oa())throw Xe;t(fs(e,"settings.getSettings"))}))}function ha(e,t){return new Promise((n=>{if(Bn(En,qe.content,qe.settings,qe.sidePanel),!hi())throw Xe;n(ps(e,"settings.setSettings",t))}))}function va(e){return e.appId instanceof Xn}function wa(e){return Object.assign(Object.assign({},e),{appId:new Xn(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function Ca(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let ya;function Sa(){xa(Gt(ia,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Aa,!1)}function ba(){return sa(Gt(ia,"pages.backStack.navigateBack"))}function Ea(e){Ia(Gt(ia,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Yn(e)&&!Ta())throw Xe}))}function Ia(e,t,n){!Yn(t)&&Bn(En),n&&n(),ya=t,!Yn(t)&&Es(e,"registerHandler",["backButton"])}function Aa(){ya&&ya()||(cs.childWindow?Ys("backButtonPress",[]):ba())}function Ta(){return!(!Bn(En)||!En.supports.pages)&&!!En.supports.pages.backStack}var Pa=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Oa=qt("handlers");class Fa{static initializeHandlers(){Fa.handlers.themeChange=Va,Fa.handlers.load=ja,Fa.handlers.beforeUnload=qa,Sa()}static uninitializeHandlers(){Fa.handlers={},Fa.themeChangeHandler=null,Fa.loadHandler=null,Fa.beforeUnloadHandler=null,Fa.beforeSuspendOrTerminateHandler=null,Fa.resumeHandler=null}}function Ra(){Fa.initializeHandlers()}function ka(){Fa.uninitializeHandlers()}Fa.handlers={},Fa.themeChangeHandler=null,Fa.loadHandler=null,Fa.beforeUnloadHandler=null,Fa.beforeSuspendOrTerminateHandler=null,Fa.resumeHandler=null,Fa.hostToAppPerformanceMetricsHandler=null;const Ma=Oa.extend("callHandler");function Na(e,t){const n=Fa.handlers[e];if(n){Ma("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return cs.childWindow?(Ys(e,t),[!1,void 0]):(Ma("Handler for action message %s not found.",e),[!1,void 0])}function xa(e,t,n,r=!0,o=[]){n?(Fa.handlers[t]=n,r&&Es(e,"registerHandler",[t,...o])):delete Fa.handlers[t]}function La(e){delete Fa.handlers[e]}function Da(e){return null!=Fa.handlers[e]}function Ua(e,t,n,r,o){n&&Bn(En,...r),o&&o(),xa(e,t,n)}function Ha(e,t){Fa.themeChangeHandler=t,!Yn(t)&&Es(e,"registerHandler",["themeChange"])}function Va(e){Fa.themeChangeHandler&&Fa.themeChangeHandler(e),cs.childWindow&&Ys("themeChange",[e])}function _a(e){Fa.hostToAppPerformanceMetricsHandler=e}function Wa(e){Fa.hostToAppPerformanceMetricsHandler&&Fa.hostToAppPerformanceMetricsHandler(e)}function Ba(e,t){Fa.loadHandler=t,!Yn(t)&&Es(e,"registerHandler",["load"])}function ja(e){const t=za(e);Fa.resumeHandler?(Fa.resumeHandler(t),cs.childWindow&&Ys("load",[t])):Fa.loadHandler&&(Fa.loadHandler(e),cs.childWindow&&Ys("load",[e]))}function za(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function $a(e,t){Fa.beforeUnloadHandler=t,!Yn(t)&&Es(e,"registerHandler",["beforeUnload"])}function qa(){return Pa(this,void 0,void 0,(function*(){const e=()=>{Es(Gt("v2","handleBeforeUnload"),"readyToUnload",[])};Fa.beforeSuspendOrTerminateHandler?(yield Fa.beforeSuspendOrTerminateHandler(),cs.childWindow?Ys("beforeUnload"):e()):Fa.beforeUnloadHandler&&Fa.beforeUnloadHandler(e)||(cs.childWindow?Ys("beforeUnload"):e())}))}function Ga(e){Fa.beforeSuspendOrTerminateHandler=e,!Yn(e)&&Es(Gt("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Ja(e){Fa.resumeHandler=e,!Yn(e)&&Es(Gt("v2","registerOnResumeHandler"),"registerHandler",["load"])}class Ka{static storeCallbackInformation(e,t){Ka.callbackInformation.set(e,t)}static clearMessages(){Ka.callbackInformation.clear()}static deleteMessageInformation(e){Ka.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Wa({actionName:e.func,messageDelay:n-r,requestStartedAt:r}):t("Unable to send performance metrics for event %s",e.func)}static handlePerformanceMetrics(e,t,n,r){const o=Ka.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Wa({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Ka.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Ka.callbackInformation=new Map;var Qa=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Za=e=>{const{uuid:t}=e,n=Qa(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Xa=e=>{const{uuidAsString:t}=e,n=Qa(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Bt(t):void 0})},Ya=e=>{const{uuidAsString:t}=e,n=Qa(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Bt(t):void 0})},es=e=>{const{uuid:t}=e,n=Qa(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},ts=qt("nestedAppAuthUtils"),ns=ts.extend("tryPolyfillWithNestedAppAuthBridge");function rs(e,t,n){var r;const o=ns;if(hn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=is(a,n);s&&(a.nestedAppAuthBridge=s)}const os=ts.extend("createNestedAppAuthBridge");function is(e,t){const n=os;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();t&&"object"==typeof t&&"NestedAppAuthRequest"===t.messageType?o(e):n("Unrecognized data format received by app, message being ignored. Message: %o",e)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var as=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ss=qt("communication");class cs{}class ls{}function us(e,t){if(ls.messageListener=e=>ks(e),cs.currentWindow=cs.currentWindow||Rt(),cs.parentWindow=cs.currentWindow.parent!==cs.currentWindow.self?cs.currentWindow.parent:cs.currentWindow.opener,cs.topWindow=cs.currentWindow.top,(cs.parentWindow||e)&&cs.currentWindow.addEventListener("message",ls.messageListener,!1),!cs.parentWindow){const e=cs.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));hn.isFramelessWindow=!0,e.onNativeMessage=Ws}try{return cs.parentOrigin="*",hs(t,"initialize",[Un,Cn,e]).then((([e,t,n,r])=>(rs(r,cs.currentWindow,{onMessage:Ns,sendPostMessage:As}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{cs.parentOrigin=null}}function ds(){cs.currentWindow&&cs.currentWindow.removeEventListener("message",ls.messageListener,!1),cs.currentWindow=null,cs.parentWindow=null,cs.parentOrigin=null,cs.childWindow=null,cs.childOrigin=null,ls.parentMessageQueue=[],ls.childMessageQueue=[],ls.nextMessageId=0,ls.callbacks.clear(),ls.promiseCallbacks.clear(),ls.portCallbacks.clear(),ls.legacyMessageIdsToUuidMap={},Ka.clearMessages()}function fs(e,t,...n){return hs(e,t,n).then((([e])=>e))}function ps(e,t,...n){return hs(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function gs(e,t,n,...r){return hs(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function ms(e,t,...n){return hs(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function hs(e,t,n=void 0){if(!Jt(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((r=>{r(bs(Fs(e,t,n).uuid))}))}function vs(e){return e.map((e=>Dn(e)?e.serialize():e))}function ws(e,t,n,r,o){var i;return as(this,void 0,void 0,(function*(){const a=vs(t),[s]=yield hs(r,e,a);if(o&&o(s)||!o&&Ze(s))throw new Error(`${s.errorCode}, message: ${null!==(i=s.message)&&void 0!==i?i:"None"}`);if(n.validate(s))return n.deserialize(s);throw new Error(`${Ue.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function Cs(e,t,n,r){var o;return as(this,void 0,void 0,(function*(){const i=vs(t),[a]=yield hs(n,e,i);if(r&&r(a)||!r&&Ze(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Ue.INTERNAL_ERROR}, message: Invalid response from host`)}))}function ys(e,t,n=void 0){if(!Jt(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return Ss(Fs(e,t,n).uuid)}function Ss(e){return new Promise(((t,n)=>{ls.portCallbacks.set(e,((e,r)=>{e instanceof MessagePort?t(e):n(r&&r.length>0?r[0]:new Error("Host responded without port or error details."))}))}))}function bs(e){return new Promise((t=>{ls.promiseCallbacks.set(e,t)}))}function Es(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!Jt(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const i=Fs(e,t,o);r&&ls.callbacks.set(i.uuid,r)}ls.parentMessageQueue=[],ls.childMessageQueue=[],ls.topMessageQueue=[],ls.nextMessageId=0,ls.callbacks=new Map,ls.promiseCallbacks=new Map,ls.portCallbacks=new Map,ls.legacyMessageIdsToUuidMap={};const Is=ss.extend("sendNestedAuthRequestToTopWindow");function As(e){const t=Is,n=cs.topWindow,r=tc(e);return t("Message %s information: %o",oc(r),{actionName:r.func}),Ps(n,r)}const Ts=ss.extend("sendRequestToTargetWindowHelper");function Ps(e,t){const n=Ts,r=Js(e),o=Za(t);if(hn.isFramelessWindow)cs.currentWindow&&cs.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",oc(o),r),cs.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Gs(e);e&&i?(n("Sending message %s to %s via postMessage",oc(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",oc(o),r),qs(e).push(t))}return t}const Os=ss.extend("sendMessageToParentHelper");function Fs(e,t,n){const r=Os,o=cs.parentWindow,i=ec(e,t,n);return Ka.storeCallbackInformation(i.uuid,{name:t,calledAt:i.timestamp}),r("Message %s information: %o",oc(i),{actionName:t,args:n}),Ps(o,i)}const Rs=ss.extend("processIncomingMessage");function ks(e){return as(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void Rs("Unrecognized message format received by app, message being ignored. Message: %o",e);const t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;return Ls(t,n).then((r=>{r?(Ds(t,n),t===cs.parentWindow?Ws(e):t===cs.childWindow&&zs(e)):Rs("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",e,t,n)}))}))}const Ms=ss.extend("processAuthBridgeMessage");function Ns(e,t){var n,r;const o=Ms;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),l=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?Ls(c,l)?(cs.topWindow&&!cs.topWindow.closed&&c!==cs.topWindow||(cs.topWindow=c,cs.topOrigin=l),cs.topWindow&&cs.topWindow.closed&&(cs.topWindow=null,cs.topOrigin=null),Qs(cs.topWindow),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const xs=ss.extend("shouldProcessIncomingMessage");function Ls(e,t){return as(this,void 0,void 0,(function*(){if(cs.currentWindow&&e===cs.currentWindow)return xs("Should not process message because it is coming from the current window"),!1;if(cs.currentWindow&&cs.currentWindow.location&&t&&t===cs.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return xs("Message has an invalid origin of %s",t),!1}const n=yield cr(e);return n||xs("Message has an invalid origin of %s",t),n}}))}function Ds(e,t){hn.isFramelessWindow||cs.parentWindow&&!cs.parentWindow.closed&&e!==cs.parentWindow?cs.childWindow&&!cs.childWindow.closed&&e!==cs.childWindow||(cs.childWindow=e,cs.childOrigin=t):(cs.parentWindow=e,cs.parentOrigin=t),cs.parentWindow&&cs.parentWindow.closed&&(cs.parentWindow=null,cs.parentOrigin=null),cs.childWindow&&cs.childWindow.closed&&(cs.childWindow=null,cs.childOrigin=null),Qs(cs.parentWindow),Qs(cs.childWindow)}const Us=ss.extend("handleIncomingMessageFromParent");function Hs(e){const t=Us;if(!e.uuid)return ls.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Vs(ls.callbacks,t);if(n)return n;const r=Vs(ls.promiseCallbacks,t);if(r)return r;const o=Vs(ls.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",oc(e))}function Vs(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function _s(e,t){const n=Vs(t,e.uuid);n&&t.delete(n),e.uuid?ls.legacyMessageIdsToUuidMap={}:delete ls.legacyMessageIdsToUuidMap[e.id]}function Ws(e){const t=Us,n=_t();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Ya(r),i=Hs(o);if(i){const r=ls.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Ka.handlePerformanceMetrics(i,o,t,n),r&&(t("Invoking the registered callback for message %s with arguments %o",i.toString(),o.args),r.apply(null,[...o.args,o.isPartialResponse]),Bs(e)||(t("Removing registered callback for message %s",i.toString()),_s(o,ls.callbacks)));const a=ls.promiseCallbacks.get(i);a&&(t("Invoking the registered promise callback for message %s with arguments %o",i.toString(),o.args),a(o.args),t("Removing registered promise callback for message %s",i.toString()),_s(o,ls.promiseCallbacks));const s=ls.portCallbacks.get(i);if(s){let n;t("Invoking the registered port callback for message %s with arguments %o",i.toString(),o.args),e.ports&&e.ports[0]instanceof MessagePort&&(n=e.ports[0]),s(n,o.args),t("Removing registered port callback for message %s",i.toString()),_s(o,ls.portCallbacks)}o.uuid&&(ls.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Ka.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',oc(r),r.func),Na(r.func,r.args)}else t("Received an unknown message: %O",e)}function Bs(e){return!0===e.data.isPartialResponse}const js=ss.extend("handleIncomingMessageFromChild");function zs(e){if("id"in e.data&&"func"in e.data){const t=Xa(e.data),[n,r]=Na(t.func,t.args);n&&void 0!==r?(js("Returning message %s from child back to child, action: %s.",oc(t),t.func),Xs(t.id,t.uuid,Array.isArray(r)?r:[r])):(js("Relaying message %s from child to parent, action: %s. Relayed message will have a new id.",oc(t),t.func),Es(Gt("v2","tasks.startTask"),t.func,t.args,((...e)=>{if(cs.childWindow){const n=e.pop();js("Message from parent being relayed to child, id: %s",oc(t)),Xs(t.id,t.uuid,e,n)}})))}}function $s(){return cs.topWindow!==cs.parentWindow}function qs(e){return e===cs.topWindow&&$s()?ls.topMessageQueue:e===cs.parentWindow?ls.parentMessageQueue:e===cs.childWindow?ls.childMessageQueue:[]}function Gs(e){return e===cs.topWindow&&$s()?cs.topOrigin:e===cs.parentWindow?cs.parentOrigin:e===cs.childWindow?cs.childOrigin:null}function Js(e){return e===cs.topWindow&&$s()?"top":e===cs.parentWindow?"parent":e===cs.childWindow?"child":null}const Ks=ss.extend("flushMessageQueue");function Qs(e){const t=Gs(e),n=qs(e),r=Js(e);for(;e&&t&&n.length>0;){const o=n.shift();if(o){const n=Za(o);Ks("Flushing message %s from %s message queue via postMessage.",oc(n),r),e.postMessage(n,t)}}}function Zs(e,t){let n;n=cs.currentWindow.setInterval((()=>{0===qs(e).length&&(clearInterval(n),t())}),100)}function Xs(e,t,n,r){const o=cs.childWindow,i=nc(e,t,n,r),a=es(i),s=Gs(o);o&&s&&o.postMessage(a,s)}function Ys(e,t){const n=cs.childWindow,r=rc(e,t),o=Gs(n);n&&o?n.postMessage(r,o):qs(n).push(r)}function ec(e,t,n){const r=ls.nextMessageId++,o=new Bt;return ls.legacyMessageIdsToUuidMap[r]=o,{id:r,uuid:o,func:t,timestamp:Date.now(),monotonicTimestamp:_t(),args:n||[],apiVersionTag:e}}function tc(e){const t=ls.nextMessageId++,n=new Bt;return ls.legacyMessageIdsToUuidMap[t]=n,{id:t,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:_t(),args:[],data:e}}function nc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function rc(e,t){return{func:e,args:t||[]}}function oc(e){return"uuidAsString"in e?`${e.uuidAsString} (legacy id: ${e.id})`:"uuid"in e&&void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const ic="v1";function ac(e){if(!Yn(e)&&Bn(En),!Yn(e)&&!sc())throw Xe;e?xa(Gt(ic,"log.request"),"log.request",(()=>{const t=e();Es(Gt(ic,"log.receive"),"log.receive",[t])})):La("log.request")}function sc(){return!(!Bn(En)||!En.supports.logs)}var cc,lc,uc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(cc||(cc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(lc||(lc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(uc||(uc={}));const dc="v1";function fc(e,t){Bn(En),Es(Gt(dc,"uploadCustomApp"),"uploadCustomApp",[e],t||vt())}function pc(e,t,n){Bn(En),Es(Gt(dc,"sendCustomMessage"),e,t,n)}function gc(e,t){if(Bn(En),!cs.childWindow)throw new Error("The child window has not yet been initialized or is not present");Ys(e,t)}function mc(e,t){Bn(En),xa(Gt(dc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function hc(e,t){Bn(En),xa(Gt(dc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function vc(e){Bn(En,qe.content,qe.task);const t=[e.entityId,e.title,e.description,e.type,e.objectUrl,e.downloadUrl,e.webPreviewUrl,e.webEditUrl,e.baseUrl,e.editFile,e.subEntityId,e.viewerAction,e.fileOpenPreference,e.conversationId,e.sizeInBytes];Es(Gt(dc,"openFilePreview"),"openFilePreview",t)}const wc="v1";function Cc(e){return new Promise((t=>{if(Bn(En,qe.content),!bc())throw Xe;const n=ps(Gt(wc,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&xa(Gt(wc,"conversations.registerStartConversationHandler"),"startConversation",((t,n,r,o)=>{var i;return null===(i=e.onStartConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),e.onCloseConversation&&xa(Gt(wc,"conversations.registerCloseConversationHandler"),"closeConversation",((t,n,r,o)=>{var i;return null===(i=e.onCloseConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),t(n)}))}function yc(){if(Bn(En,qe.content),!bc())throw Xe;Es(Gt(wc,"conversations.closeConversation"),"conversations.closeConversation"),La("startConversation"),La("closeConversation")}function Sc(){return new Promise((e=>{if(Bn(En),!bc())throw Xe;e(fs(Gt(wc,"conversations.getChatMember"),"getChatMembers"))}))}function bc(){return!(!Bn(En)||!En.supports.conversations)}var Ec=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ic="v2",Ac=qt("copilot");function Tc(){var e,t;return Bn(En)&&(!!(null===(e=En.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=En.supports.copilot)||void 0===t?void 0:t.eligibility))}function Pc(){var e,t;return Ec(this,void 0,void 0,(function*(){if(Bn(En),!Tc())throw new Error(`Error code: ${Xe.errorCode}, message: Not supported on platform`);if(null===(e=En.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)return Ac("Eligibility information is already available on runtime."),En.hostVersionsInfo.appEligibilityInformation;Ac("Eligibility information is not available on runtime. Requesting from host.");const n=yield fs(Gt(Ic,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo");if(Ze(n))throw new Error(`Error code: ${n.errorCode}, message: ${null!==(t=n.message)&&void 0!==t?t:"Failed to get eligibility information from the host."}`);if(!Oc(n))throw new Error("Error deserializing eligibility information");return n}))}function Oc(e){return void 0!==e.ageGroup&&void 0!==e.cohort&&void 0!==e.userClassification&&void 0!==e.isCopilotEligible&&void 0!==e.isCopilotEnabledRegion&&void 0!==e.isOptedOutByAdmin}const Fc="v2";class Rc{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function kc(e){const t=e;return t.responseType===xc.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const Mc="Action.Execute";var Nc,xc,Lc;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(Nc||(Nc={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(xc||(xc={}));class Dc extends vi{validate(e){return kc(e)}deserialize(e){return e}}function Uc(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Lc).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function Hc(e){e.requestType===Nc.ActionExecuteInvokeRequest?Vc(e):e.requestType===Nc.QueryMessageExtensionRequest&&_c(e)}function Vc(e){if(e.type!==Mc){throw{errorCode:Lc.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${Mc}"`}}if(!Wt(e.data)){throw{errorCode:Lc.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function _c(e){if(e.commandId.length>64)throw new Error("originalRequestInfo.commandId exceeds the maximum size of 64 characters");if(e.parameters.length>5)throw new Error("originalRequestInfo.parameters exceeds the maximum size of 5");for(const t of e.parameters){if(t.name.length>64)throw new Error("originalRequestInfo.parameters.name exceeds the maximum size of 64 characters");if(t.value.length>512)throw new Error("originalRequestInfo.parameters.value exceeds the maximum size of 512 characters")}}function Wc(e,t,n){if(Bn(En,qe.content),!qc())throw Xe;const r=new Xn(e);return Hc(n),hs(Gt(Fc,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[r.toString(),n,t.url.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function Bc(e,t){if(Bn(En,qe.content),!qc())throw Xe;const n=new Xn(e);return hs(Gt(Fc,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function jc(e,t,n){if(Bn(En,qe.content),!qc())throw Xe;const r=new Xn(e);return Hc(n),hs(Gt(Fc,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function zc(e,t,n){if(Bn(En,qe.content),!qc())throw Xe;return Mt(e,new Error("titleId is Invalid.")),Mt(t,new Error("oauthConfigId is Invalid.")),hs(Gt(Fc,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function $c(e,t,n){if(Bn(En,qe.content),!qc())throw Xe;return Mt(e,new Error("titleId is Invalid.")),t&&Nt(t),hs(Gt(Fc,"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins"),"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins",[e,null==t?void 0:t.toString(),null==n?void 0:n.width,null==n?void 0:n.height,null==n?void 0:n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function qc(){return!(!Bn(En)||!En.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Lc||(Lc={}));var Gc=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Jc="v2";function Kc(e,t,n){return Gc(this,void 0,void 0,(function*(){if(Bn(En,qe.content),!Yc())throw Xe;return Mt(t,new Error("conversation id is not valid.")),Cs("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.claims,n.silent],Gt(Jc,"externalAppAuthenticationForCEA.authenticateWithSSO"),Uc)}))}function Qc(e,t,n){return Gc(this,void 0,void 0,(function*(){if(Bn(En,qe.content),!Yc())throw Xe;return Mt(t,new Error("conversation id is not valid.")),Cs("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Gt(Jc,"externalAppAuthenticationForCEA.authenticateWithOauth"),Uc)}))}function Zc(e,t,n,r){return Gc(this,void 0,void 0,(function*(){if(Bn(En,qe.content),!Yc())throw Xe;return Mt(t,new Error("conversation id is not valid.")),Vc(r),ws("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new Rc(r),n.url.href,n.width,n.height,n.isExternal],new Dc,Gt(Jc,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Uc)}))}function Xc(e,t,n,r){return Gc(this,void 0,void 0,(function*(){if(Bn(En,qe.content),!Yc())throw Xe;return Mt(t,new Error("conversation id is not valid.")),Vc(r),ws("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new Rc(r),n.claims,n.silent],new Dc,Gt(Jc,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Uc)}))}function Yc(){return!(!Bn(En)||!En.supports.externalAppAuthenticationForCEA)}const el="v2";var tl,nl;function rl(e,t){if(Bn(En,qe.content),!il())throw Xe;const n=new Xn(e);return hs(Gt(el,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function ol(e,t,n){if(Bn(En,qe.content),!il())throw Xe;const r=new Xn(e);return hs(Gt(el,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function il(){return!(!Bn(En)||!En.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(tl||(tl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(nl||(nl={}));var al=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const sl="v2";function cl(e,t,n){return al(this,void 0,void 0,(function*(){if(Bn(En,qe.content),!ul())throw Xe;Mt(t,new Error("conversation id is not valid."));const[r,o]=yield hs(Gt(sl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function ll(e,t,n){return al(this,void 0,void 0,(function*(){if(Bn(En,qe.content),!ul())throw Xe;Mt(t,new Error("conversation id is not valid."));const r=yield fs(Gt(sl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function ul(){return!(!Bn(En)||!En.supports.externalAppCardActionsForCEA)}var dl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const fl="v2";function pl(e,t,n){return dl(this,void 0,void 0,(function*(){if(Bn(En,qe.content),!gl())throw Xe;const r=new Xn(e),[o,i]=yield hs(Gt(fl,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function gl(){return!(!Bn(En)||!En.supports.externalAppCommands)}const ml="v1";var hl,vl,wl,Cl,yl,Sl;function bl(e,t){if(Bn(En,qe.content),!e||0===e.length)throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");if(!t)throw new Error("[files.getCloudStorageFolders] Callback cannot be null");Es(Gt(ml,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function El(e,t){if(Bn(En,qe.content),!e||0===e.length)throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.addCloudStorageFolder] Callback cannot be null");Es(Gt(ml,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Il(e,t,n){if(Bn(En,qe.content),!e)throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");if(!n)throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");Es(Gt(ml,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Al(e,t,n){if(Bn(En,qe.content),!e||!t)throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");if(!n)throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");if("isSubdirectory"in e&&!e.isSubdirectory)throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");Es(Gt(ml,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Tl(e,t,n){if(Bn(En,qe.content),!e||!t)throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");if(e.isSubdirectory)throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");Es(Gt(ml,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function Pl(e=!1,t){if(Bn(En,qe.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Es(Gt(ml,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function Ol(e,t,n,r,o=!1,i){if(Bn(En,qe.content),!e||0===e.length)throw new Error("[files.copyMoveFiles] selectedFiles cannot be null or empty");if(!t)throw new Error("[files.copyMoveFiles] providerCode cannot be null or empty");if(!n)throw new Error("[files.copyMoveFiles] destinationFolder cannot be null or empty");if(!r)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!i)throw new Error("[files.copyMoveFiles] callback cannot be null");Es(Gt(ml,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function Fl(e){if(Bn(En,qe.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Es(Gt(ml,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function Rl(e=void 0,t){if(Bn(En,qe.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Es(Gt(ml,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function kl(e){if(Bn(En,qe.content),!e)throw _l(Ue.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Es(Gt(ml,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function Ml(e,t){if(Bn(En,qe.content),!t)throw _l(Ue.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw _l(Ue.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Es(Gt(ml,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Nl(e,t){if(Bn(En,qe.content),!t)throw _l(Ue.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw _l(Ue.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Es(Gt(ml,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function xl(e,t){if(Bn(En,qe.content),!t)throw _l(Ue.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw _l(Ue.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Es(Gt(ml,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Ll(e,t){if(Bn(En,qe.content),!t)throw _l(Ue.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw _l(Ue.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Es(Gt(ml,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Dl(e,t){if(Bn(En,qe.content),!t)throw _l(Ue.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw _l(Ue.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Es(Gt(ml,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Ul(e,t){if(Bn(En,qe.content),!t)throw _l(Ue.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw _l(Ue.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw _l(Ue.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Es(Gt(ml,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Hl(e){if(Bn(En),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");xa(Gt(ml,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Vl(e){if(Bn(En),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");xa(Gt(ml,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function _l(e,t){return{errorCode:e,message:t}}!function(e){e.Dropbox="DROPBOX",e.Box="BOX",e.Sharefile="SHAREFILE",e.GoogleDrive="GOOGLEDRIVE",e.Egnyte="EGNYTE",e.SharePoint="SharePoint"}(hl||(hl={})),function(e){e[e.Sharepoint=0]="Sharepoint",e[e.WopiIntegration=1]="WopiIntegration",e[e.Google=2]="Google",e[e.OneDrive=3]="OneDrive",e[e.Recent=4]="Recent",e[e.Aggregate=5]="Aggregate",e[e.FileSystem=6]="FileSystem",e[e.Search=7]="Search",e[e.AllFiles=8]="AllFiles",e[e.SharedWithMe=9]="SharedWithMe"}(vl||(vl={})),function(e){e.ClassMaterials="classMaterials"}(wl||(wl={})),function(e){e.Readonly="readonly"}(Cl||(Cl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(yl||(yl={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Sl||(Sl={}));const Wl="v1";function Bl(){return new Promise((e=>{if(Bn(En),!ql())throw Xe;e(ms(Gt(Wl,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function jl(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Bn(En),!ql())throw Xe;t(ms(Gt(Wl,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function zl(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Bn(En),!ql())throw Xe;xa(Gt(Wl,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Bn(En),e(t)}))}function $l(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Bn(En),!ql())throw Xe;xa(Gt(Wl,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{Bn(En),e(t)}))}function ql(){return!(!Bn(En)||!En.supports.meetingRoom)}function Gl(){return!(!Bn(En)||!En.supports.messageChannels)}const Jl="v1";function Kl(e){if(Bn(En,qe.content),!Ql())throw Xe;Es(Gt(Jl,"notifications.showNotification"),"notifications.showNotification",[e])}function Ql(){return!(!Bn(En)||!En.supports.notifications)}const Zl="v2";function Xl(e){if(!eu())throw new Error(Ue.NOT_SUPPORTED_ON_PLATFORM.toString());if(Yn(e))throw new Error(Ue.INVALID_ARGUMENTS.toString());xa(Gt(Zl,"otherApp.install"),"otherApp.install",e)}function Yl(){if(!eu())throw new Error(Ue.NOT_SUPPORTED_ON_PLATFORM.toString());Es(Gt(Zl,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),La("otherApp.install")}function eu(){return!(!Bn(En)||!En.supports.otherAppStateChange)}const tu="v1";var nu,ru,ou;function iu(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Bn(En,qe.sidePanel),!pu())throw Xe;Es(Gt(tu,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function au(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(Bn(En,qe.sidePanel),!pu())throw Xe;Es(Gt(tu,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function su(e,t){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!t)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(Bn(En,qe.sidePanel),!pu())throw Xe;Es(Gt(tu,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function cu(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Bn(En,qe.sidePanel),!pu())throw Xe;Es(Gt(tu,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function lu(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Bn(En,qe.sidePanel),!pu())throw Xe;xa(Gt(tu,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function uu(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Bn(En,qe.sidePanel),!pu())throw Xe;xa(Gt(tu,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function du(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Bn(En,qe.sidePanel),!pu())throw Xe;xa(Gt(tu,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function fu(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Bn(En,qe.sidePanel),!pu())throw Xe;xa(Gt(tu,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function pu(){return!(!Bn(En)||!En.supports.remoteCamera)}!function(e){e.Reset="Reset",e.ZoomIn="ZoomIn",e.ZoomOut="ZoomOut",e.PanLeft="PanLeft",e.PanRight="PanRight",e.TiltUp="TiltUp",e.TiltDown="TiltDown"}(nu||(nu={})),function(e){e[e.CommandResetError=0]="CommandResetError",e[e.CommandZoomInError=1]="CommandZoomInError",e[e.CommandZoomOutError=2]="CommandZoomOutError",e[e.CommandPanLeftError=3]="CommandPanLeftError",e[e.CommandPanRightError=4]="CommandPanRightError",e[e.CommandTiltUpError=5]="CommandTiltUpError",e[e.CommandTiltDownError=6]="CommandTiltDownError",e[e.SendDataError=7]="SendDataError"}(ru||(ru={})),function(e){e[e.None=0]="None",e[e.ControlDenied=1]="ControlDenied",e[e.ControlNoResponse=2]="ControlNoResponse",e[e.ControlBusy=3]="ControlBusy",e[e.AckTimeout=4]="AckTimeout",e[e.ControlTerminated=5]="ControlTerminated",e[e.ControllerTerminated=6]="ControllerTerminated",e[e.DataChannelError=7]="DataChannelError",e[e.ControllerCancelled=8]="ControllerCancelled",e[e.ControlDisabled=9]="ControlDisabled",e[e.ControlTerminatedToAllowOtherController=10]="ControlTerminatedToAllowOtherController"}(ou||(ou={}));const gu="v1";function mu(e,t,n,r){if(Bn(En,qe.content),!hu())throw Xe;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!r)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");Es(Gt(gu,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function hu(){return!(!Bn(En)||!En.supports.appEntity)}const vu="v1";function wu(e){return new Promise((t=>{if(Bn(En),!Cu())throw Xe;if((hn.hostClientType===ze.android||hn.hostClientType===ze.teamsRoomsAndroid||hn.hostClientType===ze.teamsPhones||hn.hostClientType===ze.teamsDisplays)&&!jn(en)){const e={errorCode:Ue.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(fs(Gt(vu,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function Cu(){return!(!Bn(En)||!En.supports.teams)&&(!!En.supports.teams.fullTrust&&!!En.supports.teams.fullTrust.joinedTeams)}const yu="v1";function Su(e){return new Promise((t=>{if(Bn(En),!bu())throw Xe;t(fs(Gt(yu,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function bu(){return!(!Bn(En)||!En.supports.teams)&&!!En.supports.teams.fullTrust}const Eu="v1";var Iu;function Au(e,t){if(Bn(En,qe.content),!Pu())throw Xe;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Es(Gt(Eu,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Tu(e,t){if(Bn(En),!Pu())throw Xe;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Es(Gt(Eu,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Pu(){return!(!Bn(En)||!En.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Iu||(Iu={}));class Ou{static setTimeout(e,t){const n=performance.now(),r=Ct();return Ou.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Ou.setTimeoutCallbacks[e]}static setInterval(e,t){Ou.setTimeout((function n(){e(),Ou.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Ou.setTimeoutCallbacks){const r=Ou.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Ou.setTimeoutCallbacks[e].callback(),delete Ou.setTimeoutCallbacks[e]}}}Ou.setTimeoutCallbacks={};class Fu{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Ou.tick(),this.suitableForThisSession(e,t,n,r)||this.reportAndResetSession(this.getStatistics(),e,r,t,n),this.start()}processEnds(){const e=performance.now()-this.frameProcessingStartedAt,t=Math.floor(Math.max(0,Math.min(this.distributionBins.length-1,e)));this.distributionBins[t]+=1,this.sampleCount+=1}getStatistics(){return this.currentSession?{effectId:this.currentSession.effectId,effectParam:this.currentSession.effectParam,frameHeight:this.currentSession.frameHeight,frameWidth:this.currentSession.frameWidth,duration:performance.now()-this.currentSession.startedAtInMs,sampleCount:this.sampleCount,distributionBins:this.distributionBins.slice()}:null}start(){this.frameProcessingStartedAt=performance.now()}suitableForThisSession(e,t,n,r){return this.currentSession&&this.currentSession.effectId===e&&this.currentSession.effectParam===r&&this.currentSession.frameWidth===t&&this.currentSession.frameHeight===n}reportAndResetSession(e,t,n,r,o){e&&this.reportStatisticsResult(e),this.resetCurrentSession(this.getNextTimeout(t,this.currentSession),t,n,r,o),this.timeoutId&&Ou.clearTimeout(this.timeoutId),this.timeoutId=Ou.setTimeout((()=>this.reportAndResetSession(this.getStatistics(),t,n,r,o)).bind(this),this.currentSession.timeoutInMs)}resetCurrentSession(e,t,n,r,o){this.currentSession={startedAtInMs:performance.now(),timeoutInMs:e,effectId:t,effectParam:n,frameWidth:r,frameHeight:o},this.sampleCount=0,this.distributionBins.fill(0)}getNextTimeout(e,t){return t&&t.effectId===e?Math.min(Fu.maxSessionTimeoutInMs,2*t.timeoutInMs):Fu.initialSessionTimeoutInMs}}Fu.initialSessionTimeoutInMs=1e3,Fu.maxSessionTimeoutInMs=3e4;const Ru="v2";class ku{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Fu(ku.distributionBinSize,(e=>this.reportPerformanceEvent(Gt(Ru,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Ou.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Gt(Ru,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),ku.calculateFPSInterval)}setFrameProcessTimeLimit(e){this.frameProcessTimeLimit=e}reportApplyingVideoEffect(e,t){var n,r;(null===(n=this.applyingEffect)||void 0===n?void 0:n.effectId)===e&&(null===(r=this.applyingEffect)||void 0===r?void 0:r.effectParam)===t||(this.applyingEffect={effectId:e,effectParam:t},this.appliedEffect=void 0)}reportVideoEffectChanged(e,t){void 0===this.applyingEffect||this.applyingEffect.effectId!==e&&this.applyingEffect.effectParam!==t||(this.appliedEffect={effectId:e,effectParam:t},this.applyingEffect=void 0,this.isFirstFrameProcessed=!1)}reportStartFrameProcessing(e,t){Ou.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))}reportFrameProcessed(){var e;this.appliedEffect&&(this.processedFrameCount++,this.frameProcessingTimeCost+=performance.now()-this.frameProcessingStartedAt,this.performanceStatistics.processEnds(),this.isFirstFrameProcessed||(this.isFirstFrameProcessed=!0,this.reportPerformanceEvent(Gt(Ru,"videoPerformanceMonitor.reportFrameProcessed"),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(Gt(Ru,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}ku.distributionBinSize=1e3,ku.calculateFPSInterval=1e3;var Mu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Nu=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const xu="v2",Lu=kt()?void 0:new ku(Es);var Du,Uu,Hu;function Vu(e){if(Bn(En,qe.sidePanel),!zu())throw Xe;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(xa(Gt(xu,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Lu?void 0:Lu.setFrameProcessTimeLimit(e.timeLimit)),!1),Ku())$u(e.videoFrameHandler,e.config);else{if(!Zu())throw Xe;Gu(e.videoBufferHandler,e.config)}null==Lu||Lu.startMonitorSlowFrameProcessing()}function _u(e,t){if(Bn(En,qe.sidePanel),!zu())throw Xe;Es(Gt(xu,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function Wu(e){if(Bn(En,qe.sidePanel),!zu())throw Xe;xa(Gt(xu,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",ld(e,Lu),!1),Es(Gt(xu,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function Bu(e){Es(Gt(xu,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function ju(e){Es(Gt(xu,"videoEffects.notifyError"),"video.notifyError",[e])}function zu(){return Bn(En)&&!!En.supports.video&&(!!En.supports.video.mediaStream||!!En.supports.video.sharedFrame)}function $u(e,t){if(Bn(En,qe.sidePanel),!zu()||!Ku())throw Xe;xa(Gt(xu,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Mu(this,void 0,void 0,(function*(){const{streamId:n}=t,r=qu(e,Lu);yield ed(n,r,ju,Lu)}))),!1),Es(Gt(xu,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function qu(e,t){return n=>Mu(this,void 0,void 0,(function*(){const r=n.videoFrame;null==t||t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=yield e(n);return null==t||t.reportFrameProcessed(),o}))}function Gu(e,t){if(Bn(En,qe.sidePanel),!zu()||!Zu())throw Xe;xa(Gt(xu,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==Lu||Lu.reportStartFrameProcessing(t.width,t.height),e(Ju(t),(()=>{null==Lu||Lu.reportFrameProcessed(),Bu(n)}),ju)}}),!1),Es(Gt(xu,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Ju(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Nu(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Ku(){var e;return Bn(En,qe.sidePanel)&&Qu()&&!!(null===(e=En.supports.video)||void 0===e?void 0:e.mediaStream)}function Qu(){var e,t,n,r;return!(!(null===(t=null===(e=Rt().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Rt().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Zu(){var e;return Bn(En,qe.sidePanel)&&!!(null===(e=En.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Du||(Du={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Uu||(Uu={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Hu||(Hu={}));var Xu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Yu="v2";function ed(e,t,n,r){var o,i;return Xu(this,void 0,void 0,(function*(){const a=rd();!kt()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),od(yield nd(e,n,r),new id(n,t),a.writable)}))}function td(e,t,n,r){var o,i;return Xu(this,void 0,void 0,(function*(){const a=rd();!kt()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),od(yield nd(e,n,r),new cd(n,t),a.writable)}))}function nd(e,t,n){return Xu(this,void 0,void 0,(function*(){if(kt())throw Xe;const r=Rt().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function rd(){if(kt())throw Xe;const e=window.MediaStreamTrackGenerator;if(!e)throw Xe;return new e({kind:"video"})}function od(e,t,n){new(0,Rt().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class id{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Xu(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const r=yield this.videoFrameHandler({videoFrame:e}),o=new VideoFrame(r,{timestamp:n});t.enqueue(o),e.close(),r.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")}))}}class ad{constructor(e,t){if(this.headerBuffer=e,this.notifyError=t,this.ONE_TEXTURE_INPUT_ID=1869900081,this.INVALID_HEADER_ERROR="Invalid video frame header",this.UNSUPPORTED_LAYOUT_ERROR="Unsupported texture layout",this.headerDataView=new Uint32Array(e),this.headerDataView.length<8)throw this.notifyError(this.INVALID_HEADER_ERROR),new Error(this.INVALID_HEADER_ERROR);if(this.headerDataView[0]!==this.ONE_TEXTURE_INPUT_ID)throw this.notifyError(this.UNSUPPORTED_LAYOUT_ERROR),new Error(this.UNSUPPORTED_LAYOUT_ERROR)}get oneTextureLayoutId(){return this.headerDataView[0]}get version(){return this.headerDataView[1]}get frameRowOffset(){return this.headerDataView[2]}get frameFormat(){return this.headerDataView[3]}get frameWidth(){return this.headerDataView[4]}get frameHeight(){return this.headerDataView[5]}get multiStreamHeaderRowOffset(){return this.headerDataView[6]}get multiStreamCount(){return this.headerDataView[7]}}class sd{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;const n=new Uint32Array(e);for(let r=0,o=0;r<t;r++){const t=n[o++],r=n[o++],i=n[o++],a=new Uint8Array(e,r,i);this.metadataMap.set(t,a)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const e=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(void 0===e)return;const t=new Map,n=new TextDecoder("utf-8");let r=0;const o=e[r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24);for(let i=0;i<o&&r<e.length-1;i++){const o=e[++r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24),i=e.findIndex(((e,t,n)=>0==e&&t>r)),a=n.decode(e.slice(++r,i)),s=this.metadataMap.get(o);void 0!==s&&t.set(a,s);r=i+(4-(i-r)%4-1)}return t}}class cd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Xu(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:r,metadata:{audioInferenceResult:o,attributes:i}={}}=yield this.extractVideoFrameAndMetadata(e),a=yield this.videoFrameHandler({videoFrame:r,audioInferenceResult:o,attributes:i}),s=new VideoFrame(a,{timestamp:n});t.enqueue(s),r.close(),e.close(),a.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=e=>Xu(this,void 0,void 0,(function*(){if(kt())throw Xe;if("NV12"!==e.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2);yield e.copyTo(n,{rect:t});const r=new ad(n,this.notifyError),o={x:0,y:r.multiStreamHeaderRowOffset,width:e.codedWidth,height:e.codedHeight-r.multiStreamHeaderRowOffset},i=new ArrayBuffer(o.width*o.height*3/2);yield e.copyTo(i,{rect:o});const a=new sd(i,r.multiStreamCount);return{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:r.frameRowOffset,width:r.frameWidth,height:r.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult,attributes:a.attributes}}})),xa(Gt(Yu,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function ld(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Es(Gt(Yu,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in Hu?e:Hu.InitializationFailure;Es(Gt(Yu,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var ud=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const dd="v2",fd=2e3,pd=kt()?void 0:new ku(Es);var gd;function md(e){var t,n;if(!bd())throw Xe;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Bn(En,qe.sidePanel)){if(xa(Gt(dd,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==pd?void 0:pd.setFrameProcessTimeLimit(e)),!1),null===(t=En.supports.video)||void 0===t?void 0:t.mediaStream)xa(Gt(dd,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>ud(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=pd?vd(e.videoFrameHandler,pd):e.videoFrameHandler;r?yield td(n,o,Id,pd):yield ed(n,o,Id,pd)}))),!1),Es(Gt(dd,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=En.supports.video)||void 0===n?void 0:n.sharedFrame))throw Xe;xa(Gt(dd,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==pd||pd.reportStartFrameProcessing(t.width,t.height);const n=hd(),r=t.timestamp;e.videoBufferHandler(wd(t),(()=>{n(),null==pd||pd.reportFrameProcessed(),Ed(r)}),Id)}}),!1),Es(Gt(dd,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==pd||pd.startMonitorSlowFrameProcessing()}}function hd(){const e=setTimeout((()=>{Id(`Frame not processed in ${fd}ms`,gd.Warn)}),fd);return function(){clearTimeout(e)}}function vd(e,t){return n=>ud(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=hd(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function wd(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Cd(e,t,n){if(Bn(En,qe.sidePanel),!bd())throw Xe;Es(Gt(dd,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function yd(e){if(Bn(En,qe.sidePanel),!bd())throw Xe;xa(Gt(dd,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",ld(e,pd),!1),Es(Gt(dd,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Sd(e){if(Bn(En,qe.sidePanel),!zu())throw Xe;Es(Gt(dd,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function bd(){return Bn(En),zu()}function Ed(e){Es(Gt(dd,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Id(e,t=gd.Warn){Es(Gt(dd,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Ad(e){if(Bn(En),!zu())throw Xe;Id(e,gd.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(gd||(gd={}));const Td="v2";class Pd extends vi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Od{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Fd{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Rd extends vi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class kd{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Md extends vi{validate(e){const t=new Rd;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function Nd(e,t){if(Bn(En),!Hd())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Vd(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Ue.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return ws("hostEntity.tab.addAndConfigure",[new Fd(e),t],new Rd,Gt(Td,"hostEntity.tab.addAndConfigure"))}function xd(e){if(Bn(En),!Hd())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Vd(e.threadId),ws("hostEntity.tab.getAll",[new Fd(e)],new Md,Gt(Td,"hostEntity.tab.getAll"))}function Ld(e,t){if(Bn(En),!Hd())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return _d(e),Vd(t.threadId),ws("hostEntity.tab.reconfigure",[new Od(e),new Fd(t)],new Pd,Gt(Td,"hostEntity.tab.reconfigure"))}function Dd(e,t){if(Bn(En),!Hd())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return _d(e),Vd(t.threadId),ws("hostEntity.tab.rename",[new Od(e),new Fd(t)],new Pd,Gt(Td,"hostEntity.tab.rename"))}function Ud(e,t){if(Bn(En),!Hd())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Vd(t.threadId),_d(e),ws("hostEntity.tab.remove",[new kd(e),new Fd(t)],new wi,Gt(Td,"hostEntity.tab.remove"))}function Hd(){var e;return!!(Bn(En)&&Bd()&&(null===(e=En.supports.hostEntity)||void 0===e?void 0:e.tab))}function Vd(e){if(!e||0==e.length)throw new Error(`Error code: ${Ue.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function _d(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Ue.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var Wd;function Bd(){return!(!Bn(En)||!En.supports.hostEntity)}function jd(e){const t=!e||e.length<=0,n=null==e?void 0:e.indexOf("@"),r=null==e?void 0:e.indexOf(".",n);if(t||-1===n||-1===r)throw new Error("Input email address does not have the correct format.")}!function(e){e.edu="EDU"}(Wd||(Wd={}));class zd{constructor(e){this.val=e,jd(e)}toString(){return this.val}}const $d="/l/app/",qd="/l/meeting/new",Gd="attendees",Jd="startTime",Kd="endTime",Qd="subject",Zd="content",Xd="/l/call/0/0",Yd="source",ef="withVideo",tf="/l/chat/0/0",nf="users",rf="topicName",of="message";function af(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${nf}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${rf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${of}=${encodeURIComponent(n)}`;return`${un}://${dn}${tf}?${r}${o}${i}`}function sf(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${nf}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${ef}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Yd}=${encodeURIComponent(n)}`;return`${un}://${dn}${Xd}?${r}${o}${i}`}function cf(e,t,n,r,o){const i=void 0===e?"":`${Gd}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Jd}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Kd}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Qd}=${encodeURIComponent(r)}`,l=void 0===o?"":`&${Zd}=${encodeURIComponent(o)}`;return`${un}://${dn}${qd}?${i}${a}${s}${c}${l}`}function lf(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${un}://${dn}${$d}${encodeURIComponent(e)}`}const uf="v1";function df(e){return new Promise((t=>{if(Bn(En,qe.content,qe.sidePanel,qe.settings,qe.task,qe.stage,qe.meetingStage),!ff())throw new Error("Not supported");const n=Gt(uf,"appInstallDialog.openAppInstallDialog");En.isLegacyTeams?t(ps(n,"executeDeepLink",lf(e.appId))):(Es(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function ff(){return!(!Bn(En)||!En.supports.appInstallDialog)}const pf="v1",gf=qt("media");var mf,hf,vf,wf,Cf,yf,Sf;!function(e){e.Base64="base64",e.ID="id"}(mf||(mf={}));class bf{}function Ef(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Bn(En,qe.content,qe.task),hn.isFramelessWindow)if(jn(rn))Es(Gt(pf,"media.captureImage"),"captureImage",e);else{e({errorCode:Ue.OLD_PLATFORM},[])}else{e({errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM},[])}}function If(){if(Bn(En,qe.content,qe.task),!Tf())throw Xe;const e=He.Media;return new Promise((t=>{t(ms(Gt(pf,"media.hasPermission"),"permissions.has",e))}))}function Af(){if(Bn(En,qe.content,qe.task),!Tf())throw Xe;const e=He.Media;return new Promise((t=>{t(ms(Gt(pf,"media.requestPermission"),"permissions.request",e))}))}function Tf(){return!(!Bn(En)||!En.supports.permissions)}class Pf extends bf{constructor(e){super(),e&&(this.content=e.content,this.format=e.format,this.mimeType=e.mimeType,this.name=e.name,this.preview=e.preview,this.size=e.size)}getMedia(e){if(!e)throw new Error("[get Media] Callback cannot be null");if(Bn(En,qe.content,qe.task),jn(on))if(Wf(this.mimeType,this.format,this.content))jn("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:Ue.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:Ue.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Es(Gt(pf,"media.getMedia"),"getMedia",n,(function(n){if(e)if(n&&n.error)e(n.error,new Blob);else if(n&&n.mediaChunk)if(n.mediaChunk.chunkSequence<=0){const r=Nf(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=xf(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):gf(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Ue.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Ct(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Yn(e)&&Es(Gt(pf,"media.getMedia"),"getMedia",r),xa(Gt(pf,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),La("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Nf(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),La("getMedia"+t)}else{const e=xf(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Ue.INTERNAL_ERROR,message:"data received is null"},new Blob),La("getMedia"+t)}}))}}class Of{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Bn(En,qe.content,qe.task);try{$n(Xt)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Es(Gt(pf,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(hf.StopRecording,e)}}class Ff extends Of{getMediaType(){return Cf.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case hf.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Rf(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Bn(En,qe.content,qe.task),!jn(on)){const e={errorCode:Ue.OLD_PLATFORM};return void t(e,[])}try{Lf(e)}catch(e){return void t(e,[])}if(!Uf(e)){const e={errorCode:Ue.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Es(Gt(pf,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Df(e)&&(null===(a=null===(i=null==e?void 0:e.videoProps)||void 0===i?void 0:i.videoController)||void 0===a||a.notifyEventToApp(o)));if(!r)return void t(n,[]);const s=[];for(const e of r)s.push(new Pf(e));t(n,s)}))}function kf(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Bn(En,qe.content,qe.task),!jn(on)){return void t({errorCode:Ue.OLD_PLATFORM})}if(!Bf(e)){return void t({errorCode:Ue.INVALID_ARGUMENTS})}const n=[e];Es(Gt(pf,"media.viewImages"),"viewImages",n,t)}function Mf(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Bn(En,qe.content,qe.task),hn.hostClientType!==ze.desktop&&hn.hostClientType!==ze.web&&hn.hostClientType!==ze.rigel&&hn.hostClientType!==ze.teamsRoomsWindows&&hn.hostClientType!==ze.teamsRoomsAndroid&&hn.hostClientType!==ze.teamsPhones&&hn.hostClientType!==ze.teamsDisplays)if(jn(an))if(jf(t))Es(Gt(pf,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:Ue.INVALID_ARGUMENTS},"")}else{e({errorCode:Ue.OLD_PLATFORM},"")}else{e({errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM},"")}}function Nf(e,t){if(null==e||null==t||e.length<=0)return null;let n=null,r=1;return e.sort(((e,t)=>e.sequence>t.sequence?1:-1)),e.forEach((e=>{e.sequence==r&&(n=n?new Blob([n,e.file],{type:t}):new Blob([e.file],{type:t}),r++)})),n}function xf(e,t){if(null==e||null==t)return null;const n=atob(e.chunk),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const o=new Uint8Array(r),i=new Blob([o],{type:t});return{sequence:e.chunkSequence,file:i}}function Lf(e){Vf(e)?$n(Zt):_f(e)?$n(Xt):Hf(e)&&$n(Yt)}function Df(e){return!(e.mediaType!=Cf.Video||!e.videoProps||!e.videoProps.videoController)}function Uf(e){return!(null==e||e.maxMediaCount>10)}function Hf(e){var t;return!((null==e?void 0:e.mediaType)!=Cf.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Vf(e){return!(!e||e.mediaType!=Cf.VideoAndImage&&!e.videoAndImageProps)}function _f(e){return!(!e||e.mediaType!=Cf.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Wf(e,t,n){return null!=e&&null!=t&&t==mf.ID&&null!=n}function Bf(e){return!(null==e||e.length<=0||e.length>10)}function jf(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function zf(e){if(e){if(e.title&&"string"!=typeof e.title)return!1;if(e.setSelected&&"object"!=typeof e.setSelected)return!1;if(e.openOrgWideSearchInChatOrChannel&&"boolean"!=typeof e.openOrgWideSearchInChatOrChannel)return!1;if(e.singleSelect&&"boolean"!=typeof e.singleSelect)return!1}return!0}!function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(hf||(hf={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(vf||(vf={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(wf||(wf={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Cf||(Cf={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(yf||(yf={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Sf||(Sf={}));const $f="v2";function qf(e){return new Promise((t=>{if(Bn(En,qe.content,qe.task),!Kf())throw Xe;if(!jf(e))throw{errorCode:Ue.INVALID_ARGUMENTS};t(ms(Gt($f,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Gf(){if(Bn(En,qe.content,qe.task),!Kf())throw Xe;const e=He.Media;return new Promise((t=>{t(ms(Gt($f,"barCode.hasPermission"),"permissions.has",e))}))}function Jf(){if(Bn(En,qe.content,qe.task),!Kf())throw Xe;const e=He.Media;return new Promise((t=>{t(ms(Gt($f,"barCode.requestPermission"),"permissions.request",e))}))}function Kf(){return!!(Bn(En)&&En.supports.barCode&&En.supports.permissions)}const Qf="v2";function Zf(e){return Xf(Gt(Qf,"chat.openChat"),e)}function Xf(e,t){return new Promise((n=>{if(Bn(En,qe.content,qe.task),!ep())throw Xe;if(En.isLegacyTeams)n(ps(e,"executeDeepLink",af([t.user],void 0,t.message)));else{n(ps(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Yf(e){const t=Gt(Qf,"chat.openGroupChat");return new Promise((n=>{if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){const r={user:e.users[0],message:e.message};n(Xf(t,r))}else{if(Bn(En,qe.content,qe.task),!ep())throw Xe;if(En.isLegacyTeams)n(ps(t,"executeDeepLink",af(e.users,e.topic,e.message)));else{n(ps(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function ep(){return!(!Bn(En)||!En.supports.chat)}var tp=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const np="v2";function rp(e){return tp(this,void 0,void 0,(function*(){if(Bn(En,qe.content,qe.meetingStage,qe.task,qe.settings,qe.stage,qe.sidePanel),!ip())throw Xe;if(!e.type||!Object.values(je).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(je)}`);const t=yield Ft(e),n={mimeType:e.type,content:t};return ms(Gt(np,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function op(){return tp(this,void 0,void 0,(function*(){Bn(En,qe.content,qe.meetingStage,qe.task,qe.settings,qe.stage,qe.sidePanel);const e=Gt(np,"clipboard.read");if(!ip())throw Xe;const t=yield ms(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Ot(e.mimeType,e.content)}return t}))}function ip(){return hn.isFramelessWindow?!(!Bn(En)||!En.supports.clipboard):!!(Bn(En)&&navigator&&navigator.clipboard&&En.supports.clipboard)}function ap(){var e;return null!==(e=Bn(En)&&En.isNAAChannelRecommended)&&void 0!==e&&e}const sp="v2";function cp(){if(Bn(En,qe.content,qe.task),!up())throw Xe;return ms(Gt(sp,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function lp(e){if(Bn(En,qe.content,qe.task),!up())throw Xe;if(!e)throw{errorCode:Ue.INVALID_ARGUMENTS};return ms(Gt(sp,"geoLocation.showLocation"),"location.showLocation",e)}function up(){return!!(Bn(En)&&En.supports.geoLocation&&En.supports.geoLocation.map&&En.supports.permissions)}const dp="v2";function fp(){if(Bn(En,qe.content,qe.task),!mp())throw Xe;return ms(Gt(dp,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function pp(){if(Bn(En,qe.content,qe.task),!mp())throw Xe;const e=He.GeoLocation;return new Promise((t=>{t(ms(Gt(dp,"geoLocation.hasPermission"),"permissions.has",e))}))}function gp(){if(Bn(En,qe.content,qe.task),!mp())throw Xe;const e=He.GeoLocation;return new Promise((t=>{t(ms(Gt(dp,"geoLocation.requestPermission"),"permissions.request",e))}))}function mp(){return!!(Bn(En)&&En.supports.geoLocation&&En.supports.permissions)}function hp(){return En.hostVersionsInfo?En.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const vp="v1";class wp{postMessage(e,t){Bn(En),Es(Gt(vp,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||vt())}addEventListener(e,t){Bn(En),"message"===e&&xa(Gt(vp,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Cp{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Bn(En,qe.task),Es(Gt(vp,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||vt())}addEventListener(e,t){Bn(En,qe.task),"message"===e&&xa(Gt(vp,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const yp="v2";function Sp(e){if(Bn(En,qe.content),!bp())throw Xe;if(!e||!Pt(e))throw{errorCode:Ue.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return ms(Gt(yp,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function bp(){return!(!Bn(En)||!En.supports.secondaryBrowser)}const Ep="v1";function Ip(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Bn(En,qe.content,qe.task),!jn(tn))throw{errorCode:Ue.OLD_PLATFORM};if(!e)throw{errorCode:Ue.INVALID_ARGUMENTS};if(!Tp())throw Xe;Es(Gt(Ep,"location.getLocation"),"location.getLocation",[e],t)}function Ap(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Bn(En,qe.content,qe.task),!jn(tn))throw{errorCode:Ue.OLD_PLATFORM};if(!e)throw{errorCode:Ue.INVALID_ARGUMENTS};if(!Tp())throw Xe;Es(Gt(Ep,"location.showLocation"),"location.showLocation",[e],t)}function Tp(){return!(!Bn(En)||!En.supports.location)}const Pp="v1";function Op(e){Bn(En,qe.sidePanel),e.contentUrl&&new URL(e.contentUrl),Es(Gt(Pp,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var Fp=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Rp="v1";var kp,Mp,Np,xp,Lp,Dp;function Up(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),Es(Gt(Rp,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Hp(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),Es(Gt(Rp,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Vp(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage,qe.settings,qe.content),Es(Gt(Rp,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function _p(){var e,t,n;return Fp(this,void 0,void 0,(function*(){let r;Bn(En,qe.sidePanel,qe.meetingStage,qe.settings,qe.content);try{const e=!0;r=yield ms(Gt("v2","meeting.getMeetingDetailsVerbose"),"meeting.getMeetingDetails",e)}catch(t){throw new Error(null===(e=null==t?void 0:t.errorCode)||void 0===e?void 0:e.toString())}if(((null===(t=r.details)||void 0===t?void 0:t.type)==xp.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==xp.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Ue.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Wp(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage,qe.task),Es(Gt(Rp,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Bp(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Bn(En,qe.sidePanel),Es(Gt(Rp,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function jp(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Bn(En,qe.sidePanel),Es(Gt(Rp,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function zp(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Bn(En,qe.sidePanel),Es(Gt(Rp,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function $p(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Bn(En,qe.sidePanel),xa(Gt(Rp,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function qp(e,t,n={sharingProtocol:Lp.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),Es(Gt(Rp,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Gp(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),Es(Gt(Rp,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Jp(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),Es(Gt(Rp,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Kp(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),Es(Gt(Rp,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Qp(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),xa(Gt(Rp,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Zp(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),xa(Gt(Rp,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Xp(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),xa(Gt(Rp,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Yp(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Bn(En);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Dp.Other};return ms(Gt("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function eg(e,t){if(!t)throw new Error("[requestAppAudioHandling] Callback response cannot be null");if(!e.micMuteStateChangedCallback)throw new Error("[requestAppAudioHandling] Callback Mic mute state handler cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),e.isAppHandlingAudio?tg(e,t):ng(e,t)}function tg(e,t){Es(Gt(Rp,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((n,r)=>{if(n&&null!=r)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(n)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${n.errorCode} ${n.message}`);if("boolean"!=typeof r)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");xa(Gt(Rp,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>Fp(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);og(n,n.isMicMuted===t.isMicMuted?kp.HostInitiated:kp.AppDeclinedToChange)}catch(e){og(t,kp.AppFailedToChange)}}))));xa(Gt(Rp,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function ng(e,t){Es(Gt(Rp,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Da("meeting.micStateChanged")&&La("meeting.micStateChanged"),Da("meeting.audioDeviceSelectionChanged")&&La("meeting.audioDeviceSelectionChanged"),t(n)}))}function rg(e){og(e,kp.AppInitiated)}function og(e,t){Bn(En,qe.sidePanel,qe.meetingStage),Es(Gt(Rp,"meeting.setMicStateWithReason"),"meeting.updateMicState",[e,t])}!function(e){e[e.HostInitiated=0]="HostInitiated",e[e.AppInitiated=1]="AppInitiated",e[e.AppDeclinedToChange=2]="AppDeclinedToChange",e[e.AppFailedToChange=3]="AppFailedToChange"}(kp||(kp={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(Mp||(Mp={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Np||(Np={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(xp||(xp={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Lp||(Lp={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(Dp||(Dp={}));const ig="v1",ag="v2";function sg(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Gt(ig,"monetization.openPurchaseExperience")):(r=e,o=Gt(ag,"monetization.openPurchaseExperience"));return Bn(En,qe.content),Et((()=>new Promise((e=>{if(!cg())throw Xe;e(ms(o,"monetization.openPurchaseExperience",r))}))),n)}function cg(){return!(!Bn(En)||!En.supports.monetization)}const lg="v2";function ug(e){return new Promise((t=>{if(Bn(En,qe.content),!fg())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(ps(Gt(lg,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function dg(e){return new Promise((t=>{if(Bn(En,qe.content),!fg())throw new Error("Not supported");const n=Gt(lg,"calendar.composeMeeting");En.isLegacyTeams?t(ps(n,"executeDeepLink",cf(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(ps(n,"calendar.composeMeeting",e))}))}function fg(){return!(!Bn(En)||!En.supports.calendar)}const pg="v2";function gg(e){return new Promise((t=>{if(Bn(En,qe.content),!hg())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(ps(Gt(pg,"mail.openMailItem"),"mail.openMailItem",e))}))}function mg(e){return new Promise((t=>{if(Bn(En,qe.content),!hg())throw new Error("Not supported");t(ps(Gt(pg,"mail.composeMail"),"mail.composeMail",e))}))}function hg(){return!(!Bn(En)||!En.supports.mail)}var vg;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(vg||(vg={}));const wg="v2";function Cg(){if(!hn.printCapabilityEnabled){if(Bn(En),!Ag())throw Xe;hn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(yg(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function yg(){Rt().print()}function Sg(e){bg(Gt(wg,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Yn(e)&&!Ag())throw Xe}))}function bg(e,t,n){!Yn(t)&&Bn(En),!Yn(t)&&n&&n(),Ba(e,t)}function Eg(e){Ig(Gt(wg,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Yn(e)&&!Ag())throw Xe}))}function Ig(e,t,n){!Yn(t)&&Bn(En),!Yn(t)&&n&&n(),$a(e,t)}function Ag(){return!(!Bn(En)||!En.supports.teamsCore)}const Tg="v1",Pg="v2";function Og(e,t){let n,r;Bn(En,qe.content,qe.task,qe.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Gt(Tg,"people.selectPeople")):(r=e,o=Gt(Pg,"people.selectPeople")),St(Fg,n,o,r)}function Fg(e,t){return new Promise((n=>{if(!jn(nn))throw{errorCode:Ue.OLD_PLATFORM};if(!zf(t))throw{errorCode:Ue.INVALID_ARGUMENTS};if(!Rg())throw Xe;n(ms(e,"people.selectPeople",t))}))}function Rg(){return!(!Bn(En)||!En.supports.people)}function kg(e){return e?e.modality&&"string"!=typeof e.modality?[!1,"modality must be a string"]:e.targetElementBoundingRect&&"object"==typeof e.targetElementBoundingRect?e.triggerType&&"string"==typeof e.triggerType?Mg(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Mg(e){return e?e.displayName&&"string"!=typeof e.displayName?[!1,"displayName must be a string"]:e.identifiers&&"object"==typeof e.identifiers?e.identifiers.AadObjectId||e.identifiers.Smtp||e.identifiers.Upn?e.identifiers.AadObjectId&&"string"!=typeof e.identifiers.AadObjectId?[!1,"AadObjectId identifier must be a string"]:e.identifiers.Smtp&&"string"!=typeof e.identifiers.Smtp?[!1,"Smtp identifier must be a string"]:e.identifiers.Upn&&"string"!=typeof e.identifiers.Upn?[!1,"Upn identifier must be a string"]:[!0,void 0]:[!1,"at least one valid identifier must be provided"]:[!1,"persona identifiers object must be provided"]:[!1,"persona object must be provided"]}const Ng="v2";function xg(e){return Bn(En,qe.content),new Promise((t=>{const[n,r]=kg(e);if(!n)throw{errorCode:Ue.INVALID_ARGUMENTS,message:r};const o={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(ms(Gt(Ng,"profile.showProfile"),"profile.showProfile",o))}))}function Lg(){return!(!Bn(En)||!En.supports.profile)}const Dg="v2",Ug="search.queryChange",Hg="search.queryClose",Vg="search.queryExecute";function _g(e,t,n){if(Bn(En,qe.content),!Bg())throw Xe;xa(Gt(Dg,"search.registerOnClosedHandler"),Hg,e),xa(Gt(Dg,"search.registerOnExecutedHandler"),Vg,t),n&&xa(Gt(Dg,"search.registerOnChangeHandler"),Ug,n)}function Wg(){if(Bn(En,qe.content),!Bg())throw Xe;Es(Gt(Dg,"search.unregisterHandlers"),"search.unregister"),La(Ug),La(Hg),La(Vg)}function Bg(){return!(!Bn(En)||!En.supports.search)}function jg(){return new Promise((e=>{if(Bn(En,qe.content),!Bg())throw new Error("Not supported");e(ps(Gt(Dg,"search.closeSearch"),"search.closeSearch"))}))}var zg=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const $g="v2";function qg(){return zg(this,void 0,void 0,(function*(){if(Bn(En,qe.sidePanel,qe.meetingStage),!Gg())throw Xe;return yield ms(Gt($g,"sharing.history.getContent"),"sharing.history.getContent")}))}function Gg(){var e;return Bn(En)&&void 0!==(null===(e=En.supports.sharing)||void 0===e?void 0:e.history)}const Jg="v1",Kg="v2",Qg={shareWebContent:"sharing.shareWebContent"};function Zg(e,t){try{Yg(e),em(e),tm(e)}catch(e){return bt((()=>Promise.reject(e)),t)}Bn(En,qe.content,qe.sidePanel,qe.task,qe.stage,qe.meetingStage);return bt(Xg,t,Gt(t?Jg:Kg,"sharing.shareWebContent"),e)}function Xg(e,t){return new Promise((n=>{if(!nm())throw Xe;n(ms(e,Qg.shareWebContent,t))}))}function Yg(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Ue.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function em(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function tm(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function nm(){return!(!Bn(En)||!En.supports.sharing)}const rm="v2";function om(){return new Promise((e=>{if(Bn(En,qe.content),!im())throw Xe;e(ms(Gt(rm,"stageView.self.close"),"stageView.self.close"))}))}function im(){var e;return Bn(En)&&void 0!==(null===(e=En.supports.stageView)||void 0===e?void 0:e.self)}const am="v2";var sm;function cm(e){return new Promise((t=>{if(Bn(En,qe.content),!lm())throw Xe;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(ms(Gt(am,"stageView.open"),"stageView.open",e))}))}function lm(){return!(!Bn(En)||!En.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(sm||(sm={}));const um=10;var dm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const fm="v2";function pm(e){return dm(this,void 0,void 0,(function*(){Bn(En,qe.content,qe.task),hm(),vm(e);const t=yield ms(Gt(fm,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return wm(e.maxVisualMediaCount,t),t}))}function gm(e){return dm(this,void 0,void 0,(function*(){Bn(En,qe.content,qe.task),hm(),vm(e);const t=yield ms(Gt(fm,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return wm(e.maxVisualMediaCount,t),t}))}function mm(){return!!(Bn(En)&&En.supports.visualMedia&&En.supports.visualMedia.image&&En.supports.permissions)}function hm(){if(!mm())throw Xe}function vm(e){if(!e||e.maxVisualMediaCount>um||e.maxVisualMediaCount<1)throw tt}function wm(e,t){if(t.length>e)throw nt}const Cm="v2";var ym,Sm;function bm(){if(Bn(En,qe.content,qe.task),!mm())throw Xe;const e=He.Media;return ms(Gt(Cm,"visualMedia.hasPermission"),"permissions.has",e)}function Em(){if(Bn(En,qe.content,qe.task),!mm())throw Xe;const e=He.Media;return ms(Gt(Cm,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(ym||(ym={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Sm||(Sm={}));var Im=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let Am=null;function Tm(){return Im(this,void 0,void 0,(function*(){return null===Am&&(Am=(yield Lr()).app.host.name),Am}))}var Pm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};function Om(){return Pm(this,void 0,void 0,(function*(){if(Bn(En),!Rm())throw Xe;return!(!En.isLegacyTeams||hn.hostClientType!==ze.android&&hn.hostClientType!==ze.ios&&hn.hostClientType!==ze.ipados||(yield Fm())!==$e.teams)||(yield fs(Gt("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function Fm(){return Pm(this,void 0,void 0,(function*(){return Tm()}))}function Rm(){return Bn(En)&&void 0!==En.supports.webStorage}const km="v2";var Mm;function Nm(e){const t=Gt(km,"call.startCall");return new Promise((n=>{var r;if(Bn(En,qe.content,qe.task),!xm())throw Xe;if(!En.isLegacyTeams)return Es(t,"call.startCall",[e],n);n(fs(t,"executeDeepLink",sf(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Mm.Video),e.source)).then((e=>{if(!e)throw new Error(mn);return e})))}))}function xm(){return!(!Bn(En)||!En.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Mm||(Mm={}));const Lm="v1";function Dm(){Ei(Gt(Lm,"appInitialization.notifyAppLoaded"))}function Um(){Es(Gt(Lm,"appInitialization.notifySuccess"),Pr.Success,[Un])}function Hm(e){Ai(Gt(Lm,"appInitialization.notifyFailure"),e)}function Vm(e){Ii(Gt(Lm,"appInitialization.notifyExpectedFailure"),e)}const _m=qt("thirdPartyCloudStorage"),Wm="v2";class Bm{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let jm=[],zm=null,$m=!0,qm=null;function Gm(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Bn(En,qe.content,qe.task),!Km())throw Xe;if(qm)throw qm=null,new Error("getDragAndDropFiles cannot be called twice");qm=t,$m=!0,Es(Gt(Wm,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],Jm)}else{t([],{errorCode:Ue.INVALID_ARGUMENTS})}}function Jm(e){if(qm)if(e&&e.error)qm([],e.error),qm=null;else if(e&&e.fileChunk)try{$m||0!==e.fileChunk.chunkSequence||(_m("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),$m=!0,qm([],{errorCode:Ue.INTERNAL_ERROR,message:"error occurred while receiving data"}),jm=[],qm=null);const t=xf(e.fileChunk,e.fileType);if(t?(zm||(zm=new Bm(e.fileType,[])),zm.assembleAttachment.push(t)):(_m(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),qm?qm([],{errorCode:Ue.INTERNAL_ERROR,message:"error occurred while receiving data"}):qm=null,jm=[],qm=null,$m=!0),$m=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&zm){const t=Nf(zm.assembleAttachment,zm.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});jm.push(n)}e.isLastFile&&qm&&(qm(jm,e.error),jm=[],qm=null,$m=!0),zm=null}}catch(e){qm&&(qm([],{errorCode:Ue.INTERNAL_ERROR,message:e}),jm=[],qm=null,$m=!0)}else qm([],{errorCode:Ue.INTERNAL_ERROR,message:"data received is null"}),jm=[],qm=null,$m=!0}function Km(){return!(!Bn(En)||!En.supports.thirdPartyCloudStorage)}const Qm="v1";function Zm(e,t){bi(Gt(Qm,"initialize"),t).then((()=>{e&&e()}))}function Xm(){Cg()}function Ym(){yg()}function eh(e){Wn(),Es(Gt(Qm,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=hn.frameContext),e(t)}))}function th(e){ki(Gt(Qm,"registerOnThemeChangeHandlerHelper"),e)}function nh(e){Ua(Gt(Qm,"registerFullScreenHandler"),"fullScreenChange",e,[])}function rh(e){Ua(Gt(Qm,"registerAppButtonClickHandler"),"appButtonClick",e,[qe.content])}function oh(e){Ua(Gt(Qm,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[qe.content])}function ih(e){Ua(Gt(Qm,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[qe.content])}function ah(e){Ia(Gt(Qm,"registerBackButtonHandler"),e)}function sh(e){bg(Gt(Qm,"registerOnLoadHandler"),e)}function ch(e){Ig(Gt(Qm,"registerBeforeUnloadHandler"),e)}function lh(e){Ua(Gt(Qm,"registerFocusEnterHandler"),"focusEnter",e,[])}function uh(e){Ua(Gt(Qm,"registerChangeSettingsHandler"),"changeSettings",e,[qe.content])}function dh(e,t){Bn(En),ua(Gt(Qm,"getTabInstances"),t).then((t=>{e(t)}))}function fh(e,t){Bn(En),da(Gt(Qm,"getMruTabInstances"),t).then((t=>{e(t)}))}function ph(e){fa(Gt(Qm,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function gh(e,t){Bn(En,qe.content,qe.sidePanel,qe.settings,qe.task,qe.stage,qe.meetingStage);const n=null!=t?t:vt();Mi(Gt(Qm,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function mh(e){pa(Gt(Qm,"setFrameContext"),e)}function hh(e,t,n){bi(Gt(Qm,"initializeWithFrameContext"),n).then((()=>t&&t())),pa(Gt(Qm,"setFrameContext"),e)}const vh="v1";function wh(e){la(Gt(vh,"navigation.returnFocus"),e)}function Ch(e,t){Bn(En);const n=null!=t?t:vt();ca(Gt(vh,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function yh(e,t){Bn(En,qe.content,qe.sidePanel,qe.settings,qe.remove,qe.task,qe.stage,qe.meetingStage);const n=null!=t?t:vt();aa(Gt(vh,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Sh(e){Bn(En);const t=null!=e?e:vt();sa(Gt(vh,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const bh="v1";function Eh(e){ga(Gt(bh,"settings.setValidityState"),e)}function Ih(e){Bn(En,qe.content,qe.settings,qe.remove,qe.sidePanel),ma(Gt(bh,"settings.getSettings")).then((t=>{e(t)}))}function Ah(e,t){Bn(En,qe.content,qe.settings,qe.sidePanel);const n=null!=t?t:vt();ha(Gt(bh,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Th(e){ci(Gt(bh,"settings.registerOnSaveHandler"),e)}function Ph(e){ui(Gt(bh,"settings.registerOnRemoveHandler"),e)}var Oh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Fh="v1";function Rh(e,t){const n=Gt(Fh,"tasks.startTask"),r=t?e=>{var n,r;return t(null!==(n=e.err)&&void 0!==n?n:"",null!==(r=e.result)&&void 0!==r?r:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(Bn(En,qe.content,qe.sidePanel,qe.meetingStage),Es(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?Fo(n,xh(e),r):Oo(n,Nh(e),r),new wp}function kh(e){e=Lh(e);const{width:t,height:n}=e,r=Oh(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Po(Gt(Fh,"tasks.updateTask"),e)}function Mh(e,t){Ro(Gt(Fh,"tasks.submitTask"),e,t)}function Nh(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:Ke.Small,width:e.width?e.width:Ke.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function xh(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:Ke.Small,width:e.width?e.width:Ke.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function Lh(e){return e.height=e.height?e.height:Ke.Small,e.width=e.width?e.width:Ke.Small,e}const Dh="v2";var Uh,Hh;function Vh(){return!(!Bn(En,qe.meetingStage,qe.sidePanel,qe.content)||!En.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Uh||(Uh={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Hh||(Hh={}));class _h{getFluidTenantInfo(){return Wh(),new Promise((e=>{e(ms(Gt(Dh,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return Wh(),new Promise((t=>{t(ms(Gt(Dh,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return Wh(),new Promise((e=>{e(ms(Gt(Dh,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return Wh(),new Promise((t=>{t(ms(Gt(Dh,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return Wh(),new Promise((e=>{e(ms(Gt(Dh,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return Wh(),new Promise((t=>{t(ms(Gt(Dh,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return Wh(),new Promise((t=>{t(ms(Gt(Dh,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return Wh(),new Promise((t=>{t(ms(Gt(Dh,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return Wh(),new _h}}function Wh(){if(!Vh())throw new Error("LiveShareHost Not supported")}var Bh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function jh(e){try{return e.cartItems=zh(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function zh(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=zh(e.accessories)),e}))}const $h=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=Bh(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=$h(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function qh(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)Jh(t),Gh(t.accessories)}function Gh(e){if(null!=e){if(!Array.isArray(e)||0===e.length)throw new Error("CartItem.accessories must be a non-empty array");for(const t of e){if(t.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");Jh(t)}}}function Jh(e){if(!e.id)throw new Error("cartItem.id must not be empty");if(!e.name)throw new Error("cartItem.name must not be empty");Qh(e.price),Zh(e.quantity)}function Kh(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===Ne(e))throw new Error("id must be a valid UUID")}}function Qh(e){if("number"!=typeof e||e<0)throw new Error(`price ${e} must be a number not less than 0`);if(parseFloat(e.toFixed(3))!==e)throw new Error(`price ${e} must have at most 3 decimal places`)}function Zh(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Xh(e){if(!Object.values(nv).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Yh="v2",ev={majorVersion:1,minorVersion:1};var tv,nv;function rv(){if(Bn(En,qe.content,qe.task),!sv())throw Xe;return ms(Gt(Yh,"marketplace.getCart"),"marketplace.getCart",ev).then(jh)}function ov(e){if(Bn(En,qe.content,qe.task),!sv())throw Xe;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return Kh(null==e?void 0:e.cartId),qh(null==e?void 0:e.cartItems),ms(Gt(Yh,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:$h(e.cartItems),cartVersion:ev})).then(jh)}function iv(e){if(Bn(En,qe.content,qe.task),!sv())throw Xe;if(!e)throw new Error("removeCartItemsParams must be provided");if(Kh(null==e?void 0:e.cartId),!Array.isArray(null==e?void 0:e.cartItemIds)||0===(null==e?void 0:e.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return ms(Gt(Yh,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:ev})).then(jh)}function av(e){if(Bn(En,qe.content,qe.task),!sv())throw Xe;if(!e)throw new Error("updateCartStatusParams must be provided");return Kh(null==e?void 0:e.cartId),Xh(null==e?void 0:e.cartStatus),ms(Gt(Yh,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:ev})).then(jh)}function sv(){return!(!Bn(En)||!En.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(tv||(tv={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(nv||(nv={}))})(),r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?l(e,i,o,"day"):i>=r?l(e,i,r,"hour"):i>=n?l(e,i,n,"minute"):i>=t?l(e,i,t,"second"):e+" ms"}function l(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>Le,AppId:()=>Yn,ChannelType:()=>Qe,ChildAppWindow:()=>yp,DialogDimension:()=>Ke,EduType:()=>Be,EmailAddress:()=>qd,ErrorCode:()=>Ue,FileOpenPreference:()=>xe,FrameContexts:()=>qe,HostClientType:()=>ze,HostName:()=>$e,LiveShareHost:()=>Bh,NotificationTypes:()=>lc,ParentAppWindow:()=>Sp,SecondaryM365ContentIdName:()=>De,TaskModuleDimension:()=>Ke,TeamType:()=>Ge,UserSettingTypes:()=>dc,UserTeamRole:()=>Je,ViewerActionTypes:()=>uc,app:()=>i,appEntity:()=>U,appInitialization:()=>we,appInstallDialog:()=>$,authentication:()=>a,barCode:()=>G,calendar:()=>oe,call:()=>ve,chat:()=>J,clipboard:()=>K,conversations:()=>E,copilot:()=>A,dialog:()=>p,enablePrintCapability:()=>eh,executeDeepLink:()=>hh,externalAppAuthentication:()=>T,externalAppAuthenticationForCEA:()=>P,externalAppCardActions:()=>O,externalAppCardActionsForCEA:()=>F,externalAppCommands:()=>R,files:()=>k,geoLocation:()=>X,getAdaptiveCardSchemaVersion:()=>wp,getContext:()=>nh,getMruTabInstances:()=>gh,getTabInstances:()=>ph,hostEntity:()=>z,initialize:()=>Ym,initializeWithFrameContext:()=>wh,liveShare:()=>be,location:()=>ee,logs:()=>b,mail:()=>ie,marketplace:()=>Ee,media:()=>q,meeting:()=>ne,meetingRoom:()=>M,menus:()=>g,messageChannels:()=>N,monetization:()=>re,navigateBack:()=>Eh,navigateCrossDomain:()=>bh,navigateToTab:()=>Sh,nestedAppAuth:()=>Q,notifications:()=>x,openFilePreview:()=>wc,otherAppStateChange:()=>L,pages:()=>y,people:()=>se,print:()=>th,profile:()=>ce,registerAppButtonClickHandler:()=>ih,registerAppButtonHoverEnterHandler:()=>ah,registerAppButtonHoverLeaveHandler:()=>sh,registerBackButtonHandler:()=>ch,registerBeforeUnloadHandler:()=>uh,registerChangeSettingsHandler:()=>fh,registerCustomHandler:()=>hc,registerFocusEnterHandler:()=>dh,registerFullScreenHandler:()=>oh,registerOnLoadHandler:()=>lh,registerOnThemeChangeHandler:()=>rh,registerUserSettingsChangeHandler:()=>vc,remoteCamera:()=>D,returnFocus:()=>yh,search:()=>le,secondaryBrowser:()=>Y,sendCustomEvent:()=>mc,sendCustomMessage:()=>gc,setFrameContext:()=>vh,settings:()=>ye,shareDeepLink:()=>mh,sharing:()=>de,stageView:()=>pe,tasks:()=>Se,teams:()=>_,teamsCore:()=>ae,thirdPartyCloudStorage:()=>Ce,uploadCustomApp:()=>pc,version:()=>Un,videoEffects:()=>W,videoEffectsEx:()=>B,visualMedia:()=>me,webStorage:()=>he});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>hr,getTelemetryPort:()=>gr,isSupported:()=>mr});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Er,getDataLayerPort:()=>Sr,isSupported:()=>br});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Ir,registerOnResumeHandler:()=>Ar});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Rr,FailedReason:()=>Fr,Messages:()=>Or,_initialize:()=>xr,_uninitialize:()=>Lr,getContext:()=>Dr,getFrameContext:()=>Mr,initialize:()=>Nr,isInitialized:()=>kr,lifecycle:()=>o,notifyAppLoaded:()=>Ur,notifyExpectedFailure:()=>_r,notifyFailure:()=>Vr,notifySuccess:()=>Hr,openLink:()=>jr,registerHostToAppPerformanceMetricsHandler:()=>Br,registerOnThemeChangeHandler:()=>Wr});var a={};n.r(a),n.d(a,{DataResidency:()=>po,authenticate:()=>Xr,getAuthToken:()=>eo,getUser:()=>no,initialize:()=>Qr,notifyFailure:()=>lo,notifySuccess:()=>co,registerAuthenticationHandlers:()=>Zr});var s={};n.r(s),n.d(s,{isSupported:()=>mo,resize:()=>go});var c={};n.r(c),n.d(c,{isSupported:()=>vo,open:()=>ho});var l={};n.r(l),n.d(l,{isSupported:()=>So,registerOnMessageFromParent:()=>yo,sendMessageToDialog:()=>Co,sendMessageToParentFromDialog:()=>wo});var u={};n.r(u),n.d(u,{bot:()=>c,getDialogInfoFromBotUrlDialogInfo:()=>To,getDialogInfoFromUrlDialogInfo:()=>Ao,isSupported:()=>Io,open:()=>bo,parentCommunication:()=>l,submit:()=>Eo});var d={};n.r(d),n.d(d,{isSupported:()=>Uo,open:()=>Do});var f={};n.r(f),n.d(f,{bot:()=>d,isSupported:()=>Vo,open:()=>Ho});var p={};n.r(p),n.d(p,{adaptiveCard:()=>f,initialize:()=>_o,isSupported:()=>Wo,update:()=>s,url:()=>u});var g={};n.r(g),n.d(g,{DisplayMode:()=>jo,MenuItem:()=>$o,MenuListType:()=>zo,initialize:()=>Zo,isSupported:()=>oi,setNavBarMenu:()=>ei,setUpViews:()=>Xo,showActionMenu:()=>ni});var m={};n.r(m),n.d(m,{initialize:()=>ii,isSupported:()=>vi,registerChangeConfigHandler:()=>pi,registerOnRemoveHandler:()=>ui,registerOnRemoveHandlerHelper:()=>di,registerOnSaveHandler:()=>ci,registerOnSaveHandlerHelper:()=>li,setConfig:()=>si,setValidityState:()=>ai});var h={};n.r(h),n.d(h,{isSupported:()=>Ui,onClick:()=>xi,onHoverEnter:()=>Li,onHoverLeave:()=>Di});var v={};n.r(v),n.d(v,{isSupported:()=>_i,navigateTo:()=>Hi,navigateToDefaultPage:()=>Vi});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Wi,exitFullscreen:()=>Bi,isSupported:()=>ji});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>qi,getTabInstances:()=>$i,isSupported:()=>Gi,navigateToTab:()=>zi});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Ji,ReturnFocusType:()=>Ki,appButton:()=>h,backStack:()=>S,config:()=>m,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>ea,initializeWithFrameContext:()=>Yi,isSupported:()=>ia,navigateCrossDomain:()=>ta,navigateToApp:()=>na,registerFocusEnterHandler:()=>Zi,registerFullScreenHandler:()=>oa,returnFocus:()=>Qi,setCurrentFrame:()=>Xi,shareDeepLink:()=>ra,tabs:()=>C});var S={};n.r(S),n.d(S,{_initialize:()=>ba,isSupported:()=>Pa,navigateBack:()=>Ea,registerBackButtonHandler:()=>Ia,registerBackButtonHandlerHelper:()=>Aa});var b={};n.r(b),n.d(b,{isSupported:()=>cc,registerGetLogHandler:()=>sc});var E={};n.r(E),n.d(E,{closeConversation:()=>Sc,getChatMembers:()=>bc,isSupported:()=>Ec,openConversation:()=>yc});var I={};n.r(I),n.d(I,{getEligibilityInfo:()=>Oc,isSupported:()=>Pc});var A={};n.r(A),n.d(A,{eligibility:()=>I});var T={};n.r(T),n.d(T,{ActionExecuteInvokeRequestType:()=>Nc,ActionExecuteResponseHandler:()=>Uc,InvokeErrorCode:()=>Dc,InvokeResponseType:()=>Lc,OriginalRequestType:()=>xc,SerializableActionExecuteInvokeRequest:()=>kc,authenticateAndResendRequest:()=>Bc,authenticateWithOauth2:()=>$c,authenticateWithPowerPlatformConnectorPlugins:()=>qc,authenticateWithSSO:()=>jc,authenticateWithSSOAndResendRequest:()=>zc,isActionExecuteResponse:()=>Mc,isInvokeError:()=>Hc,isSupported:()=>Gc,validateActionExecuteInvokeRequest:()=>_c});var P={};n.r(P),n.d(P,{authenticateAndResendRequest:()=>Xc,authenticateWithOauth:()=>Zc,authenticateWithSSO:()=>Qc,authenticateWithSSOAndResendRequest:()=>Yc,isSupported:()=>el,validateInput:()=>tl});var O={};n.r(O),n.d(O,{ActionOpenUrlErrorCode:()=>ol,ActionOpenUrlType:()=>rl,isSupported:()=>sl,processActionOpenUrl:()=>al,processActionSubmit:()=>il});var F={};n.r(F),n.d(F,{isSupported:()=>fl,processActionOpenUrl:()=>ul,processActionSubmit:()=>dl});var R={};n.r(R),n.d(R,{isSupported:()=>hl,processActionCommand:()=>ml});var k={};n.r(k),n.d(k,{CloudStorageProvider:()=>wl,CloudStorageProviderFileAction:()=>El,CloudStorageProviderType:()=>Cl,DocumentLibraryAccessType:()=>Sl,FileDownloadStatus:()=>bl,SpecialDocumentLibraryType:()=>yl,addCloudStorageFolder:()=>Al,addCloudStorageProvider:()=>Nl,addCloudStorageProviderFile:()=>Ll,copyMoveFiles:()=>Rl,deleteCloudStorageFolder:()=>Tl,deleteCloudStorageProviderFile:()=>Ul,downloadCloudStorageProviderFile:()=>Hl,getCloudStorageFolderContents:()=>Pl,getCloudStorageFolders:()=>Il,getExternalProviders:()=>Fl,getFileDownloads:()=>kl,openCloudStorageFile:()=>Ol,openDownloadFolder:()=>Ml,registerCloudStorageProviderContentChangeHandler:()=>Wl,registerCloudStorageProviderListChangeHandler:()=>_l,removeCloudStorageProvider:()=>xl,renameCloudStorageProviderFile:()=>Dl,uploadCloudStorageProviderFile:()=>Vl});var M={};n.r(M),n.d(M,{getPairedMeetingRoomInfo:()=>zl,isSupported:()=>Jl,registerMeetingRoomCapabilitiesUpdateHandler:()=>ql,registerMeetingRoomStatesUpdateHandler:()=>Gl,sendCommandToPairedMeetingRoom:()=>$l});var N={};n.r(N),n.d(N,{dataLayer:()=>t,isSupported:()=>Kl,telemetry:()=>e});var x={};n.r(x),n.d(x,{isSupported:()=>Xl,showNotification:()=>Zl});var L={};n.r(L),n.d(L,{isSupported:()=>nu,registerAppInstallationHandler:()=>eu,unregisterAppInstallationHandler:()=>tu});var D={};n.r(D),n.d(D,{ControlCommand:()=>ou,ErrorReason:()=>iu,SessionTerminatedReason:()=>au,getCapableParticipants:()=>su,isSupported:()=>mu,registerOnCapableParticipantsChangeHandler:()=>du,registerOnDeviceStateChangeHandler:()=>pu,registerOnErrorHandler:()=>fu,registerOnSessionStatusChangeHandler:()=>gu,requestControl:()=>cu,sendControlCommand:()=>lu,terminateSession:()=>uu});var U={};n.r(U),n.d(U,{isSupported:()=>wu,selectAppEntity:()=>vu});var H={};n.r(H),n.d(H,{getUserJoinedTeams:()=>yu,isSupported:()=>Su});var V={};n.r(V),n.d(V,{getConfigSetting:()=>Eu,isSupported:()=>Iu,joinedTeams:()=>H});var _={};n.r(_),n.d(_,{ChannelType:()=>Tu,fullTrust:()=>V,getTeamChannels:()=>Pu,isSupported:()=>Fu,refreshSiteUrl:()=>Ou});var W={};n.r(W),n.d(W,{EffectChangeType:()=>Vu,EffectFailureReason:()=>_u,VideoFrameFormat:()=>Hu,isSupported:()=>qu,notifySelectedVideoEffectChanged:()=>Bu,registerForVideoEffect:()=>ju,registerForVideoFrame:()=>Wu});var B={};n.r(B),n.d(B,{ErrorLevel:()=>hd,frameProcessingTimeoutInMs:()=>gd,isSupported:()=>Id,notifyFatalError:()=>Pd,notifySelectedVideoEffectChanged:()=>Sd,registerForVideoEffect:()=>bd,registerForVideoFrame:()=>vd,updatePersonalizedEffects:()=>Ed});var j={};n.r(j),n.d(j,{addAndConfigure:()=>Ld,getAll:()=>Dd,isSupported:()=>_d,reconfigure:()=>Ud,remove:()=>Vd,rename:()=>Hd});var z={};n.r(z),n.d(z,{AppTypes:()=>jd,isSupported:()=>zd,tab:()=>j});var $={};n.r($),n.d($,{isSupported:()=>gf,openAppInstallDialog:()=>pf});var q={};n.r(q),n.d(q,{CameraStartMode:()=>Cf,File:()=>If,FileFormat:()=>vf,ImageOutputFormats:()=>Ef,ImageUriType:()=>bf,Media:()=>Ff,MediaControllerEvent:()=>wf,MediaType:()=>Sf,Source:()=>yf,VideoController:()=>kf,captureImage:()=>Af,hasPermission:()=>Tf,requestPermission:()=>Pf,scanBarCode:()=>xf,selectMedia:()=>Mf,viewImages:()=>Nf});var G={};n.r(G),n.d(G,{hasPermission:()=>Kf,isSupported:()=>Zf,requestPermission:()=>Qf,scanBarCode:()=>Jf});var J={};n.r(J),n.d(J,{isSupported:()=>np,openChat:()=>Yf,openGroupChat:()=>tp});var K={};n.r(K),n.d(K,{isSupported:()=>sp,read:()=>ap,write:()=>ip});var Q={};n.r(Q),n.d(Q,{isNAAChannelRecommended:()=>cp});var Z={};n.r(Z),n.d(Z,{chooseLocation:()=>up,isSupported:()=>fp,showLocation:()=>dp});var X={};n.r(X),n.d(X,{getCurrentLocation:()=>gp,hasPermission:()=>mp,isSupported:()=>vp,map:()=>Z,requestPermission:()=>hp});var Y={};n.r(Y),n.d(Y,{isSupported:()=>Ip,open:()=>Ep});var ee={};n.r(ee),n.d(ee,{getLocation:()=>Tp,isSupported:()=>Op,showLocation:()=>Pp});var te={};n.r(te),n.d(te,{setOptions:()=>Rp});var ne={};n.r(ne),n.d(ne,{CallType:()=>Dp,EventActionSource:()=>Hp,MeetingReactionType:()=>xp,MeetingType:()=>Lp,SharingProtocol:()=>Up,appShareButton:()=>te,getAppContentStageSharingCapabilities:()=>Kp,getAppContentStageSharingState:()=>Zp,getAuthenticationTokenForAnonymousUser:()=>jp,getIncomingClientAudioState:()=>Vp,getLiveStreamState:()=>zp,getMeetingDetails:()=>Wp,getMeetingDetailsVerbose:()=>Bp,joinMeeting:()=>tg,registerLiveStreamChangedHandler:()=>Gp,registerMeetingReactionReceivedHandler:()=>eg,registerRaiseHandStateChangedHandler:()=>Yp,registerSpeakingStateChangeHandler:()=>Xp,requestAppAudioHandling:()=>ng,requestStartLiveStreaming:()=>$p,requestStopLiveStreaming:()=>qp,shareAppContentToStage:()=>Jp,stopSharingAppContentToStage:()=>Qp,toggleIncomingClientAudio:()=>_p,updateMicState:()=>ig});var re={};n.r(re),n.d(re,{isSupported:()=>ug,openPurchaseExperience:()=>lg});var oe={};n.r(oe),n.d(oe,{composeMeeting:()=>pg,isSupported:()=>gg,openCalendarItem:()=>fg});var ie={};n.r(ie),n.d(ie,{ComposeMailType:()=>Cg,composeMail:()=>vg,isSupported:()=>wg,openMailItem:()=>hg});var ae={};n.r(ae),n.d(ae,{enablePrintCapability:()=>Sg,isSupported:()=>Pg,print:()=>bg,registerBeforeUnloadHandler:()=>Ag,registerBeforeUnloadHandlerHelper:()=>Tg,registerOnLoadHandler:()=>Eg,registerOnLoadHandlerHelper:()=>Ig});var se={};n.r(se),n.d(se,{isSupported:()=>Mg,selectPeople:()=>Rg});var ce={};n.r(ce),n.d(ce,{isSupported:()=>Ug,showProfile:()=>Dg});var le={};n.r(le),n.d(le,{closeSearch:()=>$g,isSupported:()=>zg,registerHandlers:()=>Bg,unregisterHandlers:()=>jg});var ue={};n.r(ue),n.d(ue,{getContent:()=>Jg,isSupported:()=>Kg});var de={};n.r(de),n.d(de,{SharingAPIMessages:()=>Xg,history:()=>ue,isSupported:()=>om,shareWebContent:()=>Yg});var fe={};n.r(fe),n.d(fe,{close:()=>am,isSupported:()=>sm});var pe={};n.r(pe),n.d(pe,{StageViewOpenMode:()=>lm,isSupported:()=>dm,open:()=>um,self:()=>fe});var ge={};n.r(ge),n.d(ge,{captureImages:()=>mm,isSupported:()=>vm,retrieveImages:()=>hm});var me={};n.r(me),n.d(me,{CameraRestriction:()=>bm,Source:()=>Em,hasPermission:()=>Im,image:()=>ge,requestPermission:()=>Am});var he={};n.r(he),n.d(he,{isSupported:()=>Mm,isWebStorageClearedOnUserLogOut:()=>Rm});var ve={};n.r(ve),n.d(ve,{CallModalities:()=>xm,isSupported:()=>Dm,startCall:()=>Lm});var we={};n.r(we),n.d(we,{ExpectedFailureReason:()=>Rr,FailedReason:()=>Fr,Messages:()=>Or,notifyAppLoaded:()=>Hm,notifyExpectedFailure:()=>Wm,notifyFailure:()=>_m,notifySuccess:()=>Vm});var Ce={};n.r(Ce),n.d(Ce,{getDragAndDropFiles:()=>Km,isSupported:()=>Zm});var ye={};n.r(ye),n.d(ye,{getSettings:()=>Th,registerOnRemoveHandler:()=>Fh,registerOnSaveHandler:()=>Oh,setSettings:()=>Ph,setValidityState:()=>Ah});var Se={};n.r(Se),n.d(Se,{getDefaultSizeIfNotProvided:()=>Uh,startTask:()=>Mh,submitTask:()=>xh,updateTask:()=>Nh});var be={};n.r(be),n.d(be,{ContainerState:()=>_h,LiveShareHost:()=>Bh,UserMeetingRole:()=>Vh,isSupported:()=>Wh});var Ee={};n.r(Ee),n.d(Ee,{CartStatus:()=>ov,Intent:()=>rv,addOrUpdateCartItems:()=>av,cartVersion:()=>nv,getCart:()=>iv,isSupported:()=>lv,removeCartItems:()=>sv,updateCartStatus:()=>cv});var Ie=n(815);const Ae={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Te;const Pe=new Uint8Array(16);function Oe(){if(!Te&&(Te="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Te))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Te(Pe)}const Fe=[];for(let e=0;e<256;++e)Fe.push((e+256).toString(16).slice(1));function Re(e,t=0){return Fe[e[t+0]]+Fe[e[t+1]]+Fe[e[t+2]]+Fe[e[t+3]]+"-"+Fe[e[t+4]]+Fe[e[t+5]]+"-"+Fe[e[t+6]]+Fe[e[t+7]]+"-"+Fe[e[t+8]]+Fe[e[t+9]]+"-"+Fe[e[t+10]]+Fe[e[t+11]]+Fe[e[t+12]]+Fe[e[t+13]]+Fe[e[t+14]]+Fe[e[t+15]]}const ke=function(e,t,n){if(Ae.randomUUID&&!t&&!e)return Ae.randomUUID();const r=(e=e||{}).random||(e.rng||Oe)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Re(r)},Me=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const Ne=function(e){return"string"==typeof e&&Me.test(e)};var xe,Le,De,Ue,He,Ve,_e,We,Be,je,ze,$e,qe,Ge,Je,Ke,Qe;function Ze(e){return void 0!==(null==e?void 0:e.errorCode)}!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(xe||(xe={})),function(e){e.M365Content="m365content"}(Le||(Le={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(De||(De={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(Ue||(Ue={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(He||(He={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Ve||(Ve={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(_e||(_e={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(We||(We={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Be||(Be={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(je||(je={})),function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(ze||(ze={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}($e||($e={})),function(e){e.settings="settings",e.content="content",e.authentication="authentication",e.remove="remove",e.task="task",e.sidePanel="sidePanel",e.stage="stage",e.meetingStage="meetingStage"}(qe||(qe={})),function(e){e[e.Standard=0]="Standard",e[e.Edu=1]="Edu",e[e.Class=2]="Class",e[e.Plc=3]="Plc",e[e.Staff=4]="Staff"}(Ge||(Ge={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(Je||(Je={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(Ke||(Ke={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Qe||(Qe={}));const Xe={errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM},Ye={majorVersion:1,minorVersion:5},et={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},tt=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),nt=new Error("Invalid response: Received more images than the specified max limit in the response."),rt=Object.prototype.toString,ot="[object Uint8Array]",it="[object ArrayBuffer]",at={utf8:new globalThis.TextDecoder("utf8")};function st(e,t,n){return!!e&&(e.constructor===t||rt.call(e)===n)}function ct(e){return st(e,Uint8Array,ot)}function lt(e){return st(e,ArrayBuffer,it)}function ut(e){if("string"!=typeof e)throw new TypeError(`Expected \`string\`, got \`${typeof e}\``)}function dt(e){return ut(e),Uint8Array.from(globalThis.atob(ft(e)),(e=>{const t=e.codePointAt(0);if(void 0===t)throw new Error("Invalid character encountered");return t}))}function ft(e){return e.replaceAll("-","+").replaceAll("_","/")}function pt(e,t="utf8"){var n;return mt(e),null!==(n=at[t])&&void 0!==n||(at[t]=new globalThis.TextDecoder(t)),at[t].decode(e)}function gt(e){return ut(e),pt(dt(e))}function mt(e){if(!ht(e))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``)}function ht(e){return ct(e)||lt(e)}function vt(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function wt(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const n=e.split("."),r=t.split(".");function o(e){return/^\d+$/.test(e)}if(!n.every(o)||!r.every(o))return NaN;for(;n.length<r.length;)n.push("0");for(;r.length<n.length;)r.push("0");for(let e=0;e<n.length;++e)if(Number(n[e])!=Number(r[e]))return Number(n[e])>Number(r[e])?1:-1;return 0}function Ct(){return ke()}function yt(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&yt(e[t])})),Object.freeze(e)}function St(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function bt(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function Et(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function It(e,t,n){return new Promise(((r,o)=>{const i=setTimeout(o,t,n);e().then((e=>{clearTimeout(i),r(e)})).catch((e=>{clearTimeout(i),o(e)}))}))}function At(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId.toString())+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl.toString()),(e.chatId||e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({chatId:e.chatId,channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function Tt(e){return!(wt(`${e.majorVersion}.${e.minorVersion}`,`${Ye.majorVersion}.${Ye.minorVersion}`)>=0)}function Pt(e){return"https:"===e.protocol}function Ot(e,t){return new Promise(((n,r)=>{if(e||r("MimeType cannot be null or empty."),t||r("Base64 string cannot be null or empty."),e.startsWith("image/")){const r=gt(t),o=new Uint8Array(r.length);for(let e=0;e<r.length;e++)o[e]=r.charCodeAt(e);n(new Blob([o],{type:e}))}const o=gt(t);n(new Blob([o],{type:e}))}))}function Ft(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function Rt(){if(kt())throw new Error("window object undefined at SSR check");return window}function kt(){return"undefined"==typeof window}function Mt(e,t){if(Lt(e)||!Dt(e)||!Ut(e))throw t||new Error("id is not valid.")}function Nt(e,t){const n=e.toString().toLocaleLowerCase();if(Lt(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Pt(e))throw t||new Error("Url should be a valid https url")}function xt(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Lt(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Dt(e){return e.length<256&&e.length>4}function Ut(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Ht(e){if(!e)throw new Error("id must not be empty");if(!1===Ne(e))throw new Error("id must be a valid UUID")}const Vt=!!performance&&"now"in performance;function _t(){return Vt?performance.now()+performance.timeOrigin:void 0}function Wt(e,t=0){if(t>1e3)return!1;if(void 0===e||"boolean"==typeof e||"number"==typeof e||"bigint"==typeof e||"string"==typeof e||null===e)return!0;if(Array.isArray(e))return e.every((e=>Wt(e,t+1)));return!("object"!=typeof e||"[object Object]"!==Object.prototype.toString.call(e)||Object.getPrototypeOf(e)!==Object.prototype&&null!==Object.getPrototypeOf(e))&&Object.keys(e).every((n=>Wt(e[n],t+1)))}class Bt{constructor(e=Ct()){this.uuid=e,Ht(e)}toString(){return this.uuid}}const jt=new Bt,zt=Ie.debug.formatArgs;Ie.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${jt.toString()}]`,zt.call(this,e)};const $t=(0,Ie.debug)("teamsJs");function qt(e){return $t.extend(e)}function Gt(e,t){return`${e}_${t}`}function Jt(e){return/^v\d+_[\w.]+$/.test(e)}const Kt=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const Qt="2.0.1",Zt="2.0.2",Xt="2.0.3",Yt="2.0.4",en="2.0.1",tn="1.9.0",nn="2.0.0",rn="1.7.0",on="1.8.0",an="1.9.0",sn=n.t(Kt,2).validOrigins,cn=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),ln=/^https:\/\//,un="https",dn="teams.microsoft.com",fn="The library has not yet been initialized",pn="The runtime has not yet been initialized",gn="The runtime version is not supported",mn="The call was not properly started";class hn{}hn.initializeCalled=!1,hn.initializeCompleted=!1,hn.additionalValidOrigins=[],hn.initializePromise=void 0,hn.isFramelessWindow=!1,hn.frameContext=void 0,hn.hostClientType=void 0,hn.printCapabilityEnabled=!1;var vn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const wn=qt("runtime"),Cn=4;function yn(e){return e.apiVersion===Cn}const Sn={apiVersion:-1,supports:{}};function bn(e){if(yn(e))return!0;throw-1===e.apiVersion?new Error(pn):new Error(gn)}let En=Sn;const In={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:et,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},An=[ze.desktop,ze.web,ze.rigel,ze.surfaceHub,ze.teamsRoomsWindows,ze.teamsRoomsAndroid,ze.teamsPhones,ze.teamsDisplays],Tn=[ze.android,ze.ios,ze.ipados],Pn=[...An,...Tn];function On(e){let t=e;if(t.apiVersion<Cn&&Fn.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),yn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const Fn=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,r=vn(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:r})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,r,o,i;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(r=null===(n=e.supports.dialog)||void 0===n?void 0:n.url)||void 0===r?void 0:r.bot,parentCommunication:(null===(o=e.supports.dialog)||void 0===o?void 0:o.url)?{}:void 0},update:null===(i=e.supports.dialog)||void 0===i?void 0:i.update}:void 0})}}}],Rn={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:An}],"1.9.0":[{capability:{location:{}},hostClientTypes:Pn}],"2.0.0":[{capability:{people:{}},hostClientTypes:Pn},{capability:{sharing:{}},hostClientTypes:[ze.desktop,ze.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[ze.android,ze.desktop,ze.ios,ze.teamsRoomsAndroid,ze.teamsPhones,ze.teamsDisplays,ze.web]},{capability:{webStorage:{}},hostClientTypes:[ze.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[ze.android,ze.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[ze.android,ze.ios]}]},kn=wn.extend("generateBackCompatRuntimeConfig");function Mn(e,t){const n=Object.assign({},e);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&("object"!=typeof t[r]||Array.isArray(t[r])?r in e||(n[r]=t[r]):n[r]=Mn(e[r]||{},t[r]));return n}function Nn(e,t,n){kn("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);kn("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{wt(e,t)>=0&&n[t].forEach((e=>{void 0!==hn.hostClientType&&e.hostClientTypes.includes(hn.hostClientType)&&(r=Mn(r,e.capability))}))}));const o={apiVersion:Cn,hostVersionsInfo:et,isLegacyTeams:!0,supports:r};return kn("Runtime config after updating based on highestSupportedVersion: %o",o),o}const xn=wn.extend("applyRuntimeConfig");function Ln(e){"string"==typeof e.apiVersion&&(xn("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),xn("Fast-forwarding runtime %o",e);const t=On(e);xn("Applying runtime %o",t),En=yt(t)}function Dn(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Un="2.31.0-beta.3",Hn=qt("internal"),Vn=Hn.extend("ensureInitializeCalled"),_n=Hn.extend("ensureInitialized");function Wn(){if(!hn.initializeCalled)throw Vn(fn),new Error(fn)}function Bn(e,...t){if(!hn.initializeCompleted)throw _n("%s. initializeCalled: %s",fn,hn.initializeCalled.toString()),new Error(fn);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===hn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${hn.frameContext}".`)}return bn(e)}function jn(e=Qt){const t=wt(hn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function zn(){return hn.hostClientType==ze.android||hn.hostClientType==ze.ios||hn.hostClientType==ze.ipados}function $n(e=Qt){if(!zn()){throw{errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM}}if(!jn(e)){throw{errorCode:Ue.OLD_PLATFORM}}}function qn(e){let t=hn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&ln.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),hn.additionalValidOrigins=t}function Gn(e){if(Lt(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(!Qn(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Jn}-${Kn}).`);if(Zn(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Jn=4,Kn=256;function Qn(e){return e.length<Kn&&e.length>Jn}function Zn(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Xn(e){if(!(e instanceof Yn))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Yn{constructor(e){this.appIdAsString=e,Gn(e)}serialize(){return this.toString()}toString(){return this.appIdAsString}}function er(e){return null==e}var tr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let nr=[];const rr=qt("validateOrigin");function or(){return tr(this,void 0,void 0,(function*(){yield ar()}))}function ir(){return 0===nr.length}function ar(){return tr(this,void 0,void 0,(function*(){return ir()?kt()?(nr=sn,sn):fetch(cn).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(sr(JSON.stringify(e)))return nr=e.validOrigins,nr;throw new Error("Valid Origins List Is Invalid")}))})).catch((e=>(rr("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),nr=sn,nr))):nr}))}function sr(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return rr("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function cr(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function lr(e){return ar().then((t=>{if(!Pt(e))return rr("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>cr(e,n))))return!0;for(const e of hn.additionalValidOrigins){if(cr("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return rr("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,hn.additionalValidOrigins),!1}))}var ur=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let dr;const fr="v1",pr=qt("messageChannels.telemetry");function gr(){return ur(this,void 0,void 0,(function*(){if(dr)return pr("Returning telemetry port from cache"),dr;if(!mr())throw Xe;return dr=yield Ss(Gt(fr,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),dr}))}function mr(){var e;return!(!Bn(En)||!(null===(e=En.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function hr(){dr=void 0}var vr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let wr;const Cr="v1",yr=qt("messageChannels.dataLayer");function Sr(){return vr(this,void 0,void 0,(function*(){if(wr)return yr("Returning dataLayer port from cache"),wr;if(!br())throw Xe;return wr=yield Ss(Gt(Cr,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),wr}))}function br(){var e;return!(!Bn(En)||!(null===(e=En.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Er(){wr=void 0}function Ir(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Bn(En),Ja(e)}function Ar(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Bn(En),Ka(e)}const Tr="v2",Pr=qt("app"),Or={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Fr,Rr;function kr(){return hn.initializeCompleted}function Mr(){return hn.frameContext}function Nr(e){return or(),Ei(Gt(Tr,"app.initialize"),e)}function xr(e){ls.currentWindow=e}function Lr(){hn.initializeCalled&&(Ma(),hn.initializeCalled=!1,hn.initializeCompleted=!1,hn.initializePromise=void 0,hn.additionalValidOrigins=[],hn.frameContext=void 0,hn.hostClientType=void 0,hn.isFramelessWindow=!1,hr(),Er(),fs())}function Dr(){return new Promise((e=>{Wn(),e(ps(Gt(Tr,"app.getContext"),"getContext"))})).then((e=>zr(e)))}function Ur(){Wn(),Ii(Gt(Tr,"app.notifyAppLoaded"))}function Hr(){return Pi(Gt(Tr,"app.notifySuccess"))}function Vr(e){Wn(),Ti(Gt(Tr,"app.notifyFailure"),e)}function _r(e){Wn(),Ai(Gt(Tr,"app.notifyExpectedFailure"),e)}function Wr(e){Mi(Gt(Tr,"app.registerOnThemeChangeHandler"),e)}function Br(e){Wa(e)}function jr(e){return Ni(Gt(Tr,"app.openLink"),e)}function zr(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:$e.teams,clientType:e.hostClientType?e.hostClientType:ze.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:hn.frameContext,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Fr||(Fr={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Rr||(Rr={})),Pr("teamsjs instance is version %s, starting at %s UTC (%s local)",Un,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(kt())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,n="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?Pr("teamsjs is being used from %s. %s",t,n):Pr("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const $r="v1",qr="v2";let Gr,Jr,Kr;function Qr(){La(Gt($r,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",uo,!1),La(Gt($r,"authentication.registerAuthenticateFailureHandler"),"authentication.authenticate.failure",fo,!1)}function Zr(e){Kr=e}function Xr(e){const t=void 0!==e,n=t?e:Kr;if(!n)throw new Error("No parameters are provided for authentication");Bn(En,qe.content,qe.sidePanel,qe.settings,qe.remove,qe.task,qe.stage,qe.meetingStage);return Yr(n.successCallback||n.failureCallback?Gt($r,"authentication.authenticate"):Gt(qr,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Kr=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Kr=void 0)}}))}function Yr(e,t){return new Promise(((n,r)=>{if(hn.hostClientType!==ze.web){const r=xt(t.url);Nt(r),n(vs(e,"authentication.authenticate",[r.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)})))}else Gr={success:n,fail:r},io(t)}))}function eo(e){Wn();return to(e&&(e.successCallback||e.failureCallback)?Gt($r,"authentication.getAuthToken"):Gt(qr,"authentication.getAuthToken"),e).then((t=>e&&e.successCallback?(e.successCallback(t),""):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),"";throw t}))}function to(e,t){return new Promise((n=>{n(vs(e,"authentication.getAuthToken",[null==t?void 0:t.resources,null==t?void 0:t.claims,null==t?void 0:t.silent,null==t?void 0:t.tenantId]))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function no(e){Wn();return ro(e&&(e.successCallback||e.failureCallback)?Gt($r,"authentication.getUser"):Gt(qr,"authentication.getUser")).then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{const n=`Error returned, code = ${t.errorCode}, message = ${t.message}`;if(e&&e.failureCallback)return e.failureCallback(n),null;throw new Error(n)}))}function ro(e){return new Promise((t=>{t(vs(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function oo(){ao();try{ls.childWindow&&ls.childWindow.close()}finally{ls.childWindow=null,ls.childOrigin=null}}function io(e){oo();let t=e.width||600,n=e.height||400;t=Math.min(t,ls.currentWindow.outerWidth-400),n=Math.min(n,ls.currentWindow.outerHeight-200);const r=xt(e.url.replace("{oauthRedirectMethod}","web"));Nt(r);let o=void 0!==ls.currentWindow.screenLeft?ls.currentWindow.screenLeft:ls.currentWindow.screenX,i=void 0!==ls.currentWindow.screenTop?ls.currentWindow.screenTop:ls.currentWindow.screenY;o+=ls.currentWindow.outerWidth/2-t/2,i+=ls.currentWindow.outerHeight/2-n/2,ls.childWindow=ls.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),ls.childWindow?so():fo("FailedToOpenWindow")}function ao(){Jr&&(clearInterval(Jr),Jr=0),Da("initialize"),Da("navigateCrossDomain")}function so(){ao(),Jr=ls.currentWindow.setInterval((()=>{if(!ls.childWindow||ls.childWindow.closed)fo("CancelledByUser");else{const e=ls.childOrigin;try{ls.childOrigin="*",ec("ping")}finally{ls.childOrigin=e}}}),100),La(Gt($r,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[qe.authentication,hn.hostClientType])),La(Gt($r,"authentication.authenticationWindow.registerNavigateCrossDomainHandler"),"navigateCrossDomain",(()=>!1))}function co(e,t){Bn(En,qe.authentication);Is(Gt(t?$r:qr,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Xs(ls.parentWindow,(()=>setTimeout((()=>ls.currentWindow.close()),200)))}function lo(e,t){Bn(En,qe.authentication);Is(Gt(t?$r:qr,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Xs(ls.parentWindow,(()=>setTimeout((()=>ls.currentWindow.close()),200)))}function uo(e){try{Gr&&Gr.success(e)}finally{Gr=void 0,oo()}}function fo(e){try{Gr&&Gr.fail(new Error(e))}finally{Gr=void 0,oo()}}var po;function go(e){Oo(Gt(Po,"dialog.update.resize"),e)}function mo(){return!(!Bn(En)||!En.supports.dialog)&&!!En.supports.dialog.update}function ho(e,t,n){Ro(Gt(Po,"dialog.url.bot.open"),e,t,n)}function vo(){return Bn(En)&&void 0!==(En.supports.dialog&&En.supports.dialog.url&&En.supports.dialog.url.bot)}function wo(e){if(Bn(En,qe.task),!So())throw Xe;Is(Gt(Po,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Co(e){if(Bn(En,qe.content,qe.sidePanel,qe.meetingStage),!So())throw Xe;Is(Gt(Po,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function yo(e){if(Bn(En,qe.task),!So())throw Xe;for(Da("messageForChild"),La(Gt(Po,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),xo.reverse();xo.length>0;){e(xo.pop())}}function So(){var e,t;return Bn(En)&&!!(null===(t=null===(e=En.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function bo(e,t,n){Fo(Gt(Po,"dialog.url.open"),e,t,n)}function Eo(e,t){ko(Gt(Po,"dialog.url.submit"),e,t)}function Io(){return Bn(En)&&void 0!==(En.supports.dialog&&En.supports.dialog.url)}function Ao(e){return{url:e.url,height:e.size?e.size.height:Ke.Small,width:e.size?e.size.width:Ke.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function To(e){const t=Ao(e);return t.completionBotId=e.completionBotId,t}!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(po||(po={}));const Po="v2";function Oo(e,t){if(Bn(En,qe.content,qe.sidePanel,qe.task,qe.meetingStage),!mo())throw Xe;Is(e,"tasks.updateTask",[t])}function Fo(e,t,n,r){if(Bn(En,qe.content,qe.sidePanel,qe.meetingStage),!Io())throw Xe;r&&La(Gt(Po,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Is(e,"tasks.startTask",[Ao(t)],((e,t)=>{null==n||n({err:e,result:t}),Da("messageForParent")}))}function Ro(e,t,n,r){if(Bn(En,qe.content,qe.sidePanel,qe.meetingStage),!vo())throw Xe;r&&La(Gt(Po,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Is(e,"tasks.startTask",[To(t)],((e,t)=>{null==n||n({err:e,result:t}),Da("messageForParent")}))}function ko(e,t,n){if(Bn(En,qe.task),!Io())throw Xe;Is(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function Mo(e){return{card:e.card,height:e.size?e.size.height:Ke.Small,width:e.size?e.size.width:Ke.Small,title:e.title}}function No(e){const t=Mo(e);return t.completionBotId=e.completionBotId,t}const xo=[];function Lo(e){hn.frameContext&&(hn.frameContext===qe.task?xo.push(e):Da("messageForChild"))}function Do(e,t){if(Bn(En,qe.content,qe.sidePanel,qe.meetingStage),!Uo())throw Xe;const n=No(e);Is(Gt(Po,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function Uo(){const e=En.hostVersionsInfo&&En.hostVersionsInfo.adaptiveCardSchemaVersion&&!Tt(En.hostVersionsInfo.adaptiveCardSchemaVersion);return Bn(En)&&void 0!==(e&&En.supports.dialog&&En.supports.dialog.card&&En.supports.dialog.card.bot)}function Ho(e,t){if(Bn(En,qe.content,qe.sidePanel,qe.meetingStage),!Vo())throw Xe;const n=Mo(e);Is(Gt(Po,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function Vo(){const e=En.hostVersionsInfo&&En.hostVersionsInfo.adaptiveCardSchemaVersion&&!Tt(En.hostVersionsInfo.adaptiveCardSchemaVersion);return Bn(En)&&void 0!==(e&&En.supports.dialog&&En.supports.dialog.card)}function _o(){La(Gt(Po,"dialog.registerMessageForChildHandler"),"messageForChild",Lo,!1)}function Wo(){return!(!Bn(En)||!En.supports.dialog)}const Bo="v2";var jo,zo;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(jo||(jo={}));class $o{constructor(){this.enabled=!0,this.selected=!1}}let qo,Go,Jo,Ko,Qo;function Zo(){La(Gt(Bo,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",ti,!1),La(Gt(Bo,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",ri,!1),La(Gt(Bo,"menus.registerSetModuleViewHandler"),"setModuleView",Yo,!1)}function Xo(e,t){if(Bn(En),!oi())throw Xe;Jo=t,Is(Gt(Bo,"menus.setUpViews"),"setUpViews",[e])}function Yo(e){Jo&&Jo(e)||(Bn(En),Is(Gt(Bo,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function ei(e,t){if(Bn(En),!oi())throw Xe;qo=t,Is(Gt(Bo,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function ti(e){qo&&qo(e)||(Bn(En),Is(Gt(Bo,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function ni(e,t){if(Bn(En),!oi())throw Xe;Go=t,Is(Gt(Bo,"menus.showActionMenu"),"showActionMenu",[e])}function ri(e){Go&&Go(e)||(Bn(En),Is(Gt(Bo,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function oi(){return!(!Bn(En)||!En.supports.menus)}function ii(){La(Gt(aa,"pages.config.registerSettingsSaveHandler"),"settings.save",fi,!1),La(Gt(aa,"pages.config.registerSettingsRemoveHandler"),"settings.remove",mi,!1)}function ai(e){return ma(Gt(aa,"pages.config.setValidityState"),e)}function si(e){return va(Gt(aa,"pages.config.setConfig"),e)}function ci(e){li(Gt(aa,"pages.config.registerOnSaveHandler"),e,(()=>{if(!er(e)&&!vi())throw Xe}))}function li(e,t,n){!er(t)&&Bn(En,qe.settings),n&&n(),Ko=t,!er(t)&&Is(e,"registerHandler",["save"])}function ui(e){di(Gt(aa,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!er(e)&&!vi())throw Xe}))}function di(e,t,n){!er(t)&&Bn(En,qe.remove,qe.settings),n&&n(),Qo=t,!er(t)&&Is(e,"registerHandler",["remove"])}function fi(e){const t=new gi(e);Ko?Ko(t):ls.childWindow?ec("settings.save",[e]):t.notifySuccess()}function pi(e){Ha(Gt(aa,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[qe.content],(()=>{if(!vi())throw Xe}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(zo||(zo={}));class gi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Is(Gt(aa,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Is(Gt(aa,"pages.saveEvent.notifyFailure"),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function mi(){const e=new hi;Qo?Qo(e):ls.childWindow?ec("settings.remove",[]):e.notifySuccess()}class hi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Is(Gt(aa,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Is(Gt(aa,"pages.removeEvent.notifyFailure"),"settings.remove.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}}function vi(){return!(!Bn(En)||!En.supports.pages)&&!!En.supports.pages.config}class wi{}class Ci extends wi{validate(e){return!0}deserialize(e){return e}}var yi=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Si=6e4,bi=qt("app");function Ei(e,t){if(kt()){return bi.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return It((()=>ki(e,t)),Si,new Error("SDK initialization timed out."))}function Ii(e){Is(e,Or.AppLoaded,[Un])}function Ai(e,t){Is(e,Or.ExpectedFailure,[t.reason,t.message])}function Ti(e,t){Is(e,Or.Failure,[t.reason,t.message])}function Pi(e){return yi(this,void 0,void 0,(function*(){if(hn.initializeCompleted)return Fi(e);if(!hn.initializePromise)throw new Error(fn);return hn.initializePromise.then((()=>Fi(e)))}))}function Oi(){var e;return Bn(En)&&!!(null===(e=En.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Fi(e){return yi(this,void 0,void 0,(function*(){return Oi()?Cs(Or.Success,[Un],new Ci,e).then((()=>({hasFinishedSuccessfully:!0}))):(Is(e,Or.Success,[Un]),{hasFinishedSuccessfully:"unknown"})}))}const Ri=bi.extend("initializeHelper");function ki(e,t){return new Promise((n=>{hn.initializeCalled||(hn.initializeCalled=!0,ka(),hn.initializePromise=ds(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Qt})=>{hn.frameContext=e,hn.hostClientType=t,hn.clientSupportedSDKVersion=r;try{Ri("Parsing %s",n);const e=JSON.parse(n);if(Ri("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&Ln(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{Ri("Attempting to parse %s as an SDK version",n),isNaN(wt(n,Qt))||(hn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(Ri("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");Ln(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Ln(Nn(hn.clientSupportedSDKVersion,In,Rn))}}hn.initializeCompleted=!0})),Qr(),Zo(),ii(),_o()),Array.isArray(t)&&qn(t),void 0!==hn.initializePromise?n(hn.initializePromise):Ri("GlobalVars.initializePromise is unexpectedly undefined")}))}function Mi(e,t){!er(t)&&Wn(),Va(e,t)}function Ni(e,t){return new Promise((n=>{Bn(En,qe.content,qe.sidePanel,qe.settings,qe.task,qe.stage,qe.meetingStage),n(gs(e,"executeDeepLink",t))}))}function xi(e){Ha(Gt(aa,"pages.appButton.onClick"),"appButtonClick",e,[qe.content],(()=>{if(!Ui())throw Xe}))}function Li(e){Ha(Gt(aa,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[qe.content],(()=>{if(!Ui())throw Xe}))}function Di(e){Ha(Gt(aa,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[qe.content],(()=>{if(!Ui())throw Xe}))}function Ui(){return!(!Bn(En)||!En.supports.pages)&&!!En.supports.pages.appButton}function Hi(e){return new Promise((t=>{if(Bn(En,qe.content,qe.sidePanel,qe.settings,qe.task,qe.stage,qe.meetingStage),!_i())throw Xe;t(hs(Gt(aa,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function Vi(){return new Promise((e=>{if(Bn(En,qe.content,qe.sidePanel,qe.settings,qe.task,qe.stage,qe.meetingStage),!_i())throw Xe;e(hs(Gt(aa,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function _i(){return!(!Bn(En)||!En.supports.pages)&&!!En.supports.pages.currentApp}function Wi(){if(Bn(En,qe.content),!ji())throw Xe;Is(Gt(aa,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Bi(){if(Bn(En,qe.content),!ji())throw Xe;Is(Gt(aa,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function ji(){return!(!Bn(En)||!En.supports.pages)&&!!En.supports.pages.fullTrust}function zi(e){return la(Gt(aa,"pages.tabs.navigateToTab"),e)}function $i(e){return da(Gt(aa,"pages.tabs.getTabInstances"),e)}function qi(e){return fa(Gt(aa,"pages.tabs.getMruTabInstances"),e)}function Gi(){return!(!Bn(En)||!En.supports.pages)&&!!En.supports.pages.tabs}var Ji,Ki;function Qi(e){const t=Gt(aa,"pages.returnFocus");if(Bn(En),!ia())throw Xe;if(void 0===e&&Is(t,"returnFocus",[!1]),"boolean"==typeof e)Is(t,"returnFocus",[e]);else switch(e){case Ki.PreviousLandmark:case Ki.GoToActivityFeed:Is(t,"returnFocus",[!1,e]);break;case Ki.NextLandmark:Is(t,"returnFocus",[!0,e])}}function Zi(e){Ha(Gt(aa,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!ia())throw Xe}))}function Xi(e){ga(Gt(aa,"pages.setCurrentFrame"),e)}function Yi(e,t,n){or(),Ei(Gt(aa,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Xi(e)}function ea(){return ha(Gt(aa,"pages.getConfig."))}function ta(e){return sa(Gt(aa,"pages.navigateCrossDomain"),e)}function na(e){return new Promise((t=>{if(Bn(En,qe.content,qe.sidePanel,qe.settings,qe.task,qe.stage,qe.meetingStage),!ia())throw Xe;const n=Gt(aa,"pages.navigateToApp");if(En.isLegacyTeams){t(gs(n,"executeDeepLink",At(wa(e)?e:Ca(e))))}else{t(gs(n,"pages.navigateToApp",wa(e)?ya(e):e))}}))}function ra(e){return pa(Gt(aa,"pages.shareDeepLink"),e)}function oa(e){Ha(Gt(aa,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!er(e)&&!ia())throw Xe}))}function ia(){return!(!Bn(En)||!En.supports.pages)}!function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Ji||(Ji={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Ki||(Ki={}));const aa="v2";function sa(e,t){return new Promise((n=>{if(Bn(En,qe.content,qe.sidePanel,qe.settings,qe.remove,qe.task,qe.stage,qe.meetingStage),!ia())throw Xe;n(ms(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function ca(e){return new Promise((t=>{if(Bn(En),!Pa())throw Xe;t(ms(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function la(e,t){return new Promise((n=>{if(Bn(En),!Gi())throw Xe;n(ms(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function ua(e,t){if(Bn(En),!ia())throw Xe;Is(e,"returnFocus",[t])}function da(e,t){return new Promise((n=>{if(Bn(En),!Gi())throw Xe;n(ps(e,"getTabInstances",t))}))}function fa(e,t){return new Promise((n=>{if(Bn(En),!Gi())throw Xe;n(ps(e,"getMruTabInstances",t))}))}function pa(e,t){if(Bn(En,qe.content,qe.sidePanel,qe.meetingStage),!ia())throw Xe;Is(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ga(e,t){if(Bn(En,qe.content),!ia())throw Xe;Is(e,"setFrameContext",[t])}function ma(e,t){if(Bn(En,qe.settings,qe.remove),!vi())throw Xe;Is(e,"settings.setValidityState",[t])}function ha(e){return new Promise((t=>{if(Bn(En,qe.content,qe.settings,qe.remove,qe.sidePanel),!ia())throw Xe;t(ps(e,"settings.getSettings"))}))}function va(e,t){return new Promise((n=>{if(Bn(En,qe.content,qe.settings,qe.sidePanel),!vi())throw Xe;n(gs(e,"settings.setSettings",t))}))}function wa(e){return e.appId instanceof Yn}function Ca(e){return Object.assign(Object.assign({},e),{appId:new Yn(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function ya(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let Sa;function ba(){La(Gt(aa,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Ta,!1)}function Ea(){return ca(Gt(aa,"pages.backStack.navigateBack"))}function Ia(e){Aa(Gt(aa,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!er(e)&&!Pa())throw Xe}))}function Aa(e,t,n){!er(t)&&Bn(En),n&&n(),Sa=t,!er(t)&&Is(e,"registerHandler",["backButton"])}function Ta(){Sa&&Sa()||(ls.childWindow?ec("backButtonPress",[]):Ea())}function Pa(){return!(!Bn(En)||!En.supports.pages)&&!!En.supports.pages.backStack}var Oa=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Fa=qt("handlers");class Ra{static initializeHandlers(){Ra.handlers.themeChange=_a,Ra.handlers.load=za,Ra.handlers.beforeUnload=Ga,ba()}static uninitializeHandlers(){Ra.handlers={},Ra.themeChangeHandler=null,Ra.loadHandler=null,Ra.beforeUnloadHandler=null,Ra.beforeSuspendOrTerminateHandler=null,Ra.resumeHandler=null}}function ka(){Ra.initializeHandlers()}function Ma(){Ra.uninitializeHandlers()}Ra.handlers={},Ra.themeChangeHandler=null,Ra.loadHandler=null,Ra.beforeUnloadHandler=null,Ra.beforeSuspendOrTerminateHandler=null,Ra.resumeHandler=null,Ra.hostToAppPerformanceMetricsHandler=null;const Na=Fa.extend("callHandler");function xa(e,t){const n=Ra.handlers[e];if(n){Na("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return ls.childWindow?(ec(e,t),[!1,void 0]):(Na("Handler for action message %s not found.",e),[!1,void 0])}function La(e,t,n,r=!0,o=[]){n?(Ra.handlers[t]=n,r&&Is(e,"registerHandler",[t,...o])):delete Ra.handlers[t]}function Da(e){delete Ra.handlers[e]}function Ua(e){return null!=Ra.handlers[e]}function Ha(e,t,n,r,o){n&&Bn(En,...r),o&&o(),La(e,t,n)}function Va(e,t){Ra.themeChangeHandler=t,!er(t)&&Is(e,"registerHandler",["themeChange"])}function _a(e){Ra.themeChangeHandler&&Ra.themeChangeHandler(e),ls.childWindow&&ec("themeChange",[e])}function Wa(e){Ra.hostToAppPerformanceMetricsHandler=e}function Ba(e){Ra.hostToAppPerformanceMetricsHandler&&Ra.hostToAppPerformanceMetricsHandler(e)}function ja(e,t){Ra.loadHandler=t,!er(t)&&Is(e,"registerHandler",["load"])}function za(e){const t=$a(e);Ra.resumeHandler?(Ra.resumeHandler(t),ls.childWindow&&ec("load",[t])):Ra.loadHandler&&(Ra.loadHandler(e),ls.childWindow&&ec("load",[e]))}function $a(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function qa(e,t){Ra.beforeUnloadHandler=t,!er(t)&&Is(e,"registerHandler",["beforeUnload"])}function Ga(){return Oa(this,void 0,void 0,(function*(){const e=()=>{Is(Gt("v2","handleBeforeUnload"),"readyToUnload",[])};Ra.beforeSuspendOrTerminateHandler?(yield Ra.beforeSuspendOrTerminateHandler(),ls.childWindow?ec("beforeUnload"):e()):Ra.beforeUnloadHandler&&Ra.beforeUnloadHandler(e)||(ls.childWindow?ec("beforeUnload"):e())}))}function Ja(e){Ra.beforeSuspendOrTerminateHandler=e,!er(e)&&Is(Gt("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Ka(e){Ra.resumeHandler=e,!er(e)&&Is(Gt("v2","registerOnResumeHandler"),"registerHandler",["load"])}class Qa{static storeCallbackInformation(e,t){Qa.callbackInformation.set(e,t)}static clearMessages(){Qa.callbackInformation.clear()}static deleteMessageInformation(e){Qa.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Ba({actionName:e.func,messageDelay:n-r,requestStartedAt:r}):t("Unable to send performance metrics for event %s",e.func)}static handlePerformanceMetrics(e,t,n,r){const o=Qa.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Ba({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Qa.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Qa.callbackInformation=new Map;var Za=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Xa=e=>{const{uuid:t}=e,n=Za(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Ya=e=>{const{uuidAsString:t}=e,n=Za(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Bt(t):void 0})},es=e=>{const{uuidAsString:t}=e,n=Za(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Bt(t):void 0})},ts=e=>{const{uuid:t}=e,n=Za(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},ns=qt("nestedAppAuthUtils"),rs=ns.extend("tryPolyfillWithNestedAppAuthBridge");function os(e,t,n){var r;const o=rs;if(hn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=as(a,n);s&&(a.nestedAppAuthBridge=s)}const is=ns.extend("createNestedAppAuthBridge");function as(e,t){const n=is;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();t&&"object"==typeof t&&"NestedAppAuthRequest"===t.messageType?o(e):n("Unrecognized data format received by app, message being ignored. Message: %o",e)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var ss=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const cs=qt("communication");class ls{}class us{}function ds(e,t){if(us.messageListener=e=>Ms(e),ls.currentWindow=ls.currentWindow||Rt(),ls.parentWindow=ls.currentWindow.parent!==ls.currentWindow.self?ls.currentWindow.parent:ls.currentWindow.opener,ls.topWindow=ls.currentWindow.top,(ls.parentWindow||e)&&ls.currentWindow.addEventListener("message",us.messageListener,!1),!ls.parentWindow){const e=ls.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));hn.isFramelessWindow=!0,e.onNativeMessage=Bs}try{return ls.parentOrigin="*",vs(t,"initialize",[Un,Cn,e]).then((([e,t,n,r])=>(os(r,ls.currentWindow,{onMessage:xs,sendPostMessage:Ts}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{ls.parentOrigin=null}}function fs(){ls.currentWindow&&ls.currentWindow.removeEventListener("message",us.messageListener,!1),ls.currentWindow=null,ls.parentWindow=null,ls.parentOrigin=null,ls.childWindow=null,ls.childOrigin=null,us.parentMessageQueue=[],us.childMessageQueue=[],us.nextMessageId=0,us.callbacks.clear(),us.promiseCallbacks.clear(),us.portCallbacks.clear(),us.legacyMessageIdsToUuidMap={},Qa.clearMessages()}function ps(e,t,...n){return vs(e,t,n).then((([e])=>e))}function gs(e,t,...n){return vs(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function ms(e,t,n,...r){return vs(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function hs(e,t,...n){return vs(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function vs(e,t,n=void 0){if(!Jt(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((r=>{r(Es(Rs(e,t,n).uuid))}))}function ws(e){return e.map((e=>Dn(e)?e.serialize():e))}function Cs(e,t,n,r,o){var i;return ss(this,void 0,void 0,(function*(){const a=ws(t),[s]=yield vs(r,e,a);if(o&&o(s)||!o&&Ze(s))throw new Error(`${s.errorCode}, message: ${null!==(i=s.message)&&void 0!==i?i:"None"}`);if(n.validate(s))return n.deserialize(s);throw new Error(`${Ue.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function ys(e,t,n,r){var o;return ss(this,void 0,void 0,(function*(){const i=ws(t),[a]=yield vs(n,e,i);if(r&&r(a)||!r&&Ze(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Ue.INTERNAL_ERROR}, message: Invalid response from host`)}))}function Ss(e,t,n=void 0){if(!Jt(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return bs(Rs(e,t,n).uuid)}function bs(e){return new Promise(((t,n)=>{us.portCallbacks.set(e,((e,r)=>{e instanceof MessagePort?t(e):n(r&&r.length>0?r[0]:new Error("Host responded without port or error details."))}))}))}function Es(e){return new Promise((t=>{us.promiseCallbacks.set(e,t)}))}function Is(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!Jt(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const i=Rs(e,t,o);r&&us.callbacks.set(i.uuid,r)}us.parentMessageQueue=[],us.childMessageQueue=[],us.topMessageQueue=[],us.nextMessageId=0,us.callbacks=new Map,us.promiseCallbacks=new Map,us.portCallbacks=new Map,us.legacyMessageIdsToUuidMap={};const As=cs.extend("sendNestedAuthRequestToTopWindow");function Ts(e){const t=As,n=ls.topWindow,r=nc(e);return t("Message %s information: %o",ic(r),{actionName:r.func}),Os(n,r)}const Ps=cs.extend("sendRequestToTargetWindowHelper");function Os(e,t){const n=Ps,r=Ks(e),o=Xa(t);if(hn.isFramelessWindow)ls.currentWindow&&ls.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",ic(o),r),ls.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Js(e);e&&i?(n("Sending message %s to %s via postMessage",ic(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",ic(o),r),Gs(e).push(t))}return t}const Fs=cs.extend("sendMessageToParentHelper");function Rs(e,t,n){const r=Fs,o=ls.parentWindow,i=tc(e,t,n);return Qa.storeCallbackInformation(i.uuid,{name:t,calledAt:i.timestamp}),r("Message %s information: %o",ic(i),{actionName:t,args:n}),Os(o,i)}const ks=cs.extend("processIncomingMessage");function Ms(e){return ss(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void ks("Unrecognized message format received by app, message being ignored. Message: %o",e);const t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;return Ds(t,n).then((r=>{r?(Us(t,n),t===ls.parentWindow?Bs(e):t===ls.childWindow&&$s(e)):ks("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",e,t,n)}))}))}const Ns=cs.extend("processAuthBridgeMessage");function xs(e,t){var n,r;const o=Ns;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),l=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?Ds(c,l)?(ls.topWindow&&!ls.topWindow.closed&&c!==ls.topWindow||(ls.topWindow=c,ls.topOrigin=l),ls.topWindow&&ls.topWindow.closed&&(ls.topWindow=null,ls.topOrigin=null),Zs(ls.topWindow),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const Ls=cs.extend("shouldProcessIncomingMessage");function Ds(e,t){return ss(this,void 0,void 0,(function*(){if(ls.currentWindow&&e===ls.currentWindow)return Ls("Should not process message because it is coming from the current window"),!1;if(ls.currentWindow&&ls.currentWindow.location&&t&&t===ls.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Ls("Message has an invalid origin of %s",t),!1}const n=yield lr(e);return n||Ls("Message has an invalid origin of %s",t),n}}))}function Us(e,t){hn.isFramelessWindow||ls.parentWindow&&!ls.parentWindow.closed&&e!==ls.parentWindow?ls.childWindow&&!ls.childWindow.closed&&e!==ls.childWindow||(ls.childWindow=e,ls.childOrigin=t):(ls.parentWindow=e,ls.parentOrigin=t),ls.parentWindow&&ls.parentWindow.closed&&(ls.parentWindow=null,ls.parentOrigin=null),ls.childWindow&&ls.childWindow.closed&&(ls.childWindow=null,ls.childOrigin=null),Zs(ls.parentWindow),Zs(ls.childWindow)}const Hs=cs.extend("handleIncomingMessageFromParent");function Vs(e){const t=Hs;if(!e.uuid)return us.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=_s(us.callbacks,t);if(n)return n;const r=_s(us.promiseCallbacks,t);if(r)return r;const o=_s(us.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",ic(e))}function _s(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Ws(e,t){const n=_s(t,e.uuid);n&&t.delete(n),e.uuid?us.legacyMessageIdsToUuidMap={}:delete us.legacyMessageIdsToUuidMap[e.id]}function Bs(e){const t=Hs,n=_t();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=es(r),i=Vs(o);if(i){const r=us.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Qa.handlePerformanceMetrics(i,o,t,n),r&&(t("Invoking the registered callback for message %s with arguments %o",i.toString(),o.args),r.apply(null,[...o.args,o.isPartialResponse]),js(e)||(t("Removing registered callback for message %s",i.toString()),Ws(o,us.callbacks)));const a=us.promiseCallbacks.get(i);a&&(t("Invoking the registered promise callback for message %s with arguments %o",i.toString(),o.args),a(o.args),t("Removing registered promise callback for message %s",i.toString()),Ws(o,us.promiseCallbacks));const s=us.portCallbacks.get(i);if(s){let n;t("Invoking the registered port callback for message %s with arguments %o",i.toString(),o.args),e.ports&&e.ports[0]instanceof MessagePort&&(n=e.ports[0]),s(n,o.args),t("Removing registered port callback for message %s",i.toString()),Ws(o,us.portCallbacks)}o.uuid&&(us.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Qa.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',ic(r),r.func),xa(r.func,r.args)}else t("Received an unknown message: %O",e)}function js(e){return!0===e.data.isPartialResponse}const zs=cs.extend("handleIncomingMessageFromChild");function $s(e){if("id"in e.data&&"func"in e.data){const t=Ya(e.data),[n,r]=xa(t.func,t.args);n&&void 0!==r?(zs("Returning message %s from child back to child, action: %s.",ic(t),t.func),Ys(t.id,t.uuid,Array.isArray(r)?r:[r])):(zs("Relaying message %s from child to parent, action: %s. Relayed message will have a new id.",ic(t),t.func),Is(Gt("v2","tasks.startTask"),t.func,t.args,((...e)=>{if(ls.childWindow){const n=e.pop();zs("Message from parent being relayed to child, id: %s",ic(t)),Ys(t.id,t.uuid,e,n)}})))}}function qs(){return ls.topWindow!==ls.parentWindow}function Gs(e){return e===ls.topWindow&&qs()?us.topMessageQueue:e===ls.parentWindow?us.parentMessageQueue:e===ls.childWindow?us.childMessageQueue:[]}function Js(e){return e===ls.topWindow&&qs()?ls.topOrigin:e===ls.parentWindow?ls.parentOrigin:e===ls.childWindow?ls.childOrigin:null}function Ks(e){return e===ls.topWindow&&qs()?"top":e===ls.parentWindow?"parent":e===ls.childWindow?"child":null}const Qs=cs.extend("flushMessageQueue");function Zs(e){const t=Js(e),n=Gs(e),r=Ks(e);for(;e&&t&&n.length>0;){const o=n.shift();if(o){const n=Xa(o);Qs("Flushing message %s from %s message queue via postMessage.",ic(n),r),e.postMessage(n,t)}}}function Xs(e,t){let n;n=ls.currentWindow.setInterval((()=>{0===Gs(e).length&&(clearInterval(n),t())}),100)}function Ys(e,t,n,r){const o=ls.childWindow,i=rc(e,t,n,r),a=ts(i),s=Js(o);o&&s&&o.postMessage(a,s)}function ec(e,t){const n=ls.childWindow,r=oc(e,t),o=Js(n);n&&o?n.postMessage(r,o):Gs(n).push(r)}function tc(e,t,n){const r=us.nextMessageId++,o=new Bt;return us.legacyMessageIdsToUuidMap[r]=o,{id:r,uuid:o,func:t,timestamp:Date.now(),monotonicTimestamp:_t(),args:n||[],apiVersionTag:e}}function nc(e){const t=us.nextMessageId++,n=new Bt;return us.legacyMessageIdsToUuidMap[t]=n,{id:t,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:_t(),args:[],data:e}}function rc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function oc(e,t){return{func:e,args:t||[]}}function ic(e){return"uuidAsString"in e?`${e.uuidAsString} (legacy id: ${e.id})`:"uuid"in e&&void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const ac="v1";function sc(e){if(!er(e)&&Bn(En),!er(e)&&!cc())throw Xe;e?La(Gt(ac,"log.request"),"log.request",(()=>{const t=e();Is(Gt(ac,"log.receive"),"log.receive",[t])})):Da("log.request")}function cc(){return!(!Bn(En)||!En.supports.logs)}var lc,uc,dc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(lc||(lc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(uc||(uc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(dc||(dc={}));const fc="v1";function pc(e,t){Bn(En),Is(Gt(fc,"uploadCustomApp"),"uploadCustomApp",[e],t||vt())}function gc(e,t,n){Bn(En),Is(Gt(fc,"sendCustomMessage"),e,t,n)}function mc(e,t){if(Bn(En),!ls.childWindow)throw new Error("The child window has not yet been initialized or is not present");ec(e,t)}function hc(e,t){Bn(En),La(Gt(fc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function vc(e,t){Bn(En),La(Gt(fc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function wc(e){Bn(En,qe.content,qe.task);const t=[e.entityId,e.title,e.description,e.type,e.objectUrl,e.downloadUrl,e.webPreviewUrl,e.webEditUrl,e.baseUrl,e.editFile,e.subEntityId,e.viewerAction,e.fileOpenPreference,e.conversationId,e.sizeInBytes];Is(Gt(fc,"openFilePreview"),"openFilePreview",t)}const Cc="v1";function yc(e){return new Promise((t=>{if(Bn(En,qe.content),!Ec())throw Xe;const n=gs(Gt(Cc,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&La(Gt(Cc,"conversations.registerStartConversationHandler"),"startConversation",((t,n,r,o)=>{var i;return null===(i=e.onStartConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),e.onCloseConversation&&La(Gt(Cc,"conversations.registerCloseConversationHandler"),"closeConversation",((t,n,r,o)=>{var i;return null===(i=e.onCloseConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),t(n)}))}function Sc(){if(Bn(En,qe.content),!Ec())throw Xe;Is(Gt(Cc,"conversations.closeConversation"),"conversations.closeConversation"),Da("startConversation"),Da("closeConversation")}function bc(){return new Promise((e=>{if(Bn(En),!Ec())throw Xe;e(ps(Gt(Cc,"conversations.getChatMember"),"getChatMembers"))}))}function Ec(){return!(!Bn(En)||!En.supports.conversations)}var Ic=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ac="v2",Tc=qt("copilot");function Pc(){var e,t;return Bn(En)&&(!!(null===(e=En.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=En.supports.copilot)||void 0===t?void 0:t.eligibility))}function Oc(){var e,t;return Ic(this,void 0,void 0,(function*(){if(Bn(En),!Pc())throw new Error(`Error code: ${Xe.errorCode}, message: Not supported on platform`);if(null===(e=En.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)return Tc("Eligibility information is already available on runtime."),En.hostVersionsInfo.appEligibilityInformation;Tc("Eligibility information is not available on runtime. Requesting from host.");const n=yield ps(Gt(Ac,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo");if(Ze(n))throw new Error(`Error code: ${n.errorCode}, message: ${null!==(t=n.message)&&void 0!==t?t:"Failed to get eligibility information from the host."}`);if(!Fc(n))throw new Error("Error deserializing eligibility information");return n}))}function Fc(e){return void 0!==e.ageGroup&&void 0!==e.cohort&&void 0!==e.userClassification&&void 0!==e.isCopilotEligible&&void 0!==e.isCopilotEnabledRegion&&void 0!==e.isOptedOutByAdmin}const Rc="v2";class kc{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function Mc(e){const t=e;return t.responseType===Lc.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const Nc="Action.Execute";var xc,Lc,Dc;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(xc||(xc={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(Lc||(Lc={}));class Uc extends wi{validate(e){return Mc(e)}deserialize(e){return e}}function Hc(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Dc).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function Vc(e){e.requestType===xc.ActionExecuteInvokeRequest?_c(e):e.requestType===xc.QueryMessageExtensionRequest&&Wc(e)}function _c(e){if(e.type!==Nc){throw{errorCode:Dc.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${Nc}"`}}if(!Wt(e.data)){throw{errorCode:Dc.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function Wc(e){if(e.commandId.length>64)throw new Error("originalRequestInfo.commandId exceeds the maximum size of 64 characters");if(e.parameters.length>5)throw new Error("originalRequestInfo.parameters exceeds the maximum size of 5");for(const t of e.parameters){if(t.name.length>64)throw new Error("originalRequestInfo.parameters.name exceeds the maximum size of 64 characters");if(t.value.length>512)throw new Error("originalRequestInfo.parameters.value exceeds the maximum size of 512 characters")}}function Bc(e,t,n){if(Bn(En,qe.content),!Gc())throw Xe;const r=new Yn(e);return Vc(n),vs(Gt(Rc,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[r.toString(),n,t.url.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function jc(e,t){if(Bn(En,qe.content),!Gc())throw Xe;const n=new Yn(e);return vs(Gt(Rc,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function zc(e,t,n){if(Bn(En,qe.content),!Gc())throw Xe;const r=new Yn(e);return Vc(n),vs(Gt(Rc,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function $c(e,t,n){if(Bn(En,qe.content),!Gc())throw Xe;return Mt(e,new Error("titleId is Invalid.")),Mt(t,new Error("oauthConfigId is Invalid.")),vs(Gt(Rc,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function qc(e,t,n){if(Bn(En,qe.content),!Gc())throw Xe;return Mt(e,new Error("titleId is Invalid.")),t&&Nt(t),vs(Gt(Rc,"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins"),"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins",[e,null==t?void 0:t.toString(),null==n?void 0:n.width,null==n?void 0:n.height,null==n?void 0:n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Gc(){return!(!Bn(En)||!En.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Dc||(Dc={}));var Jc=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Kc="v2";function Qc(e,t,n){return Jc(this,void 0,void 0,(function*(){if(Bn(En,qe.content),!el())throw Xe;return tl(e,t),ys("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.claims,n.silent],Gt(Kc,"externalAppAuthenticationForCEA.authenticateWithSSO"),Hc)}))}function Zc(e,t,n){return Jc(this,void 0,void 0,(function*(){if(Bn(En,qe.content),!el())throw Xe;return tl(e,t),ys("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Gt(Kc,"externalAppAuthenticationForCEA.authenticateWithOauth"),Hc)}))}function Xc(e,t,n,r){return Jc(this,void 0,void 0,(function*(){if(Bn(En,qe.content),!el())throw Xe;return tl(e,t),_c(r),Cs("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new kc(r),n.url.href,n.width,n.height,n.isExternal],new Uc,Gt(Kc,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Hc)}))}function Yc(e,t,n,r){return Jc(this,void 0,void 0,(function*(){if(Bn(En,qe.content),!el())throw Xe;return tl(e,t),_c(r),Cs("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new kc(r),n.claims,n.silent],new Uc,Gt(Kc,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Hc)}))}function el(){return!(!Bn(En)||!En.supports.externalAppAuthenticationForCEA)}function tl(e,t){Mt(t,new Error("conversation id is not valid.")),Xn(e)}const nl="v2";var rl,ol;function il(e,t){if(Bn(En,qe.content),!sl())throw Xe;const n=new Yn(e);return vs(Gt(nl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function al(e,t,n){if(Bn(En,qe.content),!sl())throw Xe;const r=new Yn(e);return vs(Gt(nl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function sl(){return!(!Bn(En)||!En.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(rl||(rl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(ol||(ol={}));var cl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ll="v2";function ul(e,t,n){return cl(this,void 0,void 0,(function*(){if(Bn(En,qe.content),!fl())throw Xe;tl(e,t);const[r,o]=yield vs(Gt(ll,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function dl(e,t,n){return cl(this,void 0,void 0,(function*(){if(Bn(En,qe.content),!fl())throw Xe;tl(e,t);const r=yield ps(Gt(ll,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function fl(){return!(!Bn(En)||!En.supports.externalAppCardActionsForCEA)}var pl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const gl="v2";function ml(e,t,n){return pl(this,void 0,void 0,(function*(){if(Bn(En,qe.content),!hl())throw Xe;const r=new Yn(e),[o,i]=yield vs(Gt(gl,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function hl(){return!(!Bn(En)||!En.supports.externalAppCommands)}const vl="v1";var wl,Cl,yl,Sl,bl,El;function Il(e,t){if(Bn(En,qe.content),!e||0===e.length)throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");if(!t)throw new Error("[files.getCloudStorageFolders] Callback cannot be null");Is(Gt(vl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Al(e,t){if(Bn(En,qe.content),!e||0===e.length)throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.addCloudStorageFolder] Callback cannot be null");Is(Gt(vl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Tl(e,t,n){if(Bn(En,qe.content),!e)throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");if(!n)throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");Is(Gt(vl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Pl(e,t,n){if(Bn(En,qe.content),!e||!t)throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");if(!n)throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");if("isSubdirectory"in e&&!e.isSubdirectory)throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");Is(Gt(vl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Ol(e,t,n){if(Bn(En,qe.content),!e||!t)throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");if(e.isSubdirectory)throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");Is(Gt(vl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function Fl(e=!1,t){if(Bn(En,qe.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Is(Gt(vl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function Rl(e,t,n,r,o=!1,i){if(Bn(En,qe.content),!e||0===e.length)throw new Error("[files.copyMoveFiles] selectedFiles cannot be null or empty");if(!t)throw new Error("[files.copyMoveFiles] providerCode cannot be null or empty");if(!n)throw new Error("[files.copyMoveFiles] destinationFolder cannot be null or empty");if(!r)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!i)throw new Error("[files.copyMoveFiles] callback cannot be null");Is(Gt(vl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function kl(e){if(Bn(En,qe.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Is(Gt(vl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function Ml(e=void 0,t){if(Bn(En,qe.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Is(Gt(vl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function Nl(e){if(Bn(En,qe.content),!e)throw Bl(Ue.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Is(Gt(vl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function xl(e,t){if(Bn(En,qe.content),!t)throw Bl(Ue.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw Bl(Ue.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Is(Gt(vl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Ll(e,t){if(Bn(En,qe.content),!t)throw Bl(Ue.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Bl(Ue.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Is(Gt(vl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Dl(e,t){if(Bn(En,qe.content),!t)throw Bl(Ue.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Bl(Ue.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Is(Gt(vl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Ul(e,t){if(Bn(En,qe.content),!t)throw Bl(Ue.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Bl(Ue.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Is(Gt(vl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Hl(e,t){if(Bn(En,qe.content),!t)throw Bl(Ue.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Bl(Ue.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Is(Gt(vl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Vl(e,t){if(Bn(En,qe.content),!t)throw Bl(Ue.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Bl(Ue.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw Bl(Ue.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Is(Gt(vl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function _l(e){if(Bn(En),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");La(Gt(vl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Wl(e){if(Bn(En),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");La(Gt(vl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function Bl(e,t){return{errorCode:e,message:t}}!function(e){e.Dropbox="DROPBOX",e.Box="BOX",e.Sharefile="SHAREFILE",e.GoogleDrive="GOOGLEDRIVE",e.Egnyte="EGNYTE",e.SharePoint="SharePoint"}(wl||(wl={})),function(e){e[e.Sharepoint=0]="Sharepoint",e[e.WopiIntegration=1]="WopiIntegration",e[e.Google=2]="Google",e[e.OneDrive=3]="OneDrive",e[e.Recent=4]="Recent",e[e.Aggregate=5]="Aggregate",e[e.FileSystem=6]="FileSystem",e[e.Search=7]="Search",e[e.AllFiles=8]="AllFiles",e[e.SharedWithMe=9]="SharedWithMe"}(Cl||(Cl={})),function(e){e.ClassMaterials="classMaterials"}(yl||(yl={})),function(e){e.Readonly="readonly"}(Sl||(Sl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(bl||(bl={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(El||(El={}));const jl="v1";function zl(){return new Promise((e=>{if(Bn(En),!Jl())throw Xe;e(hs(Gt(jl,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function $l(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Bn(En),!Jl())throw Xe;t(hs(Gt(jl,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function ql(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Bn(En),!Jl())throw Xe;La(Gt(jl,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Bn(En),e(t)}))}function Gl(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Bn(En),!Jl())throw Xe;La(Gt(jl,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{Bn(En),e(t)}))}function Jl(){return!(!Bn(En)||!En.supports.meetingRoom)}function Kl(){return!(!Bn(En)||!En.supports.messageChannels)}const Ql="v1";function Zl(e){if(Bn(En,qe.content),!Xl())throw Xe;Is(Gt(Ql,"notifications.showNotification"),"notifications.showNotification",[e])}function Xl(){return!(!Bn(En)||!En.supports.notifications)}const Yl="v2";function eu(e){if(!nu())throw new Error(Ue.NOT_SUPPORTED_ON_PLATFORM.toString());if(er(e))throw new Error(Ue.INVALID_ARGUMENTS.toString());La(Gt(Yl,"otherApp.install"),"otherApp.install",e)}function tu(){if(!nu())throw new Error(Ue.NOT_SUPPORTED_ON_PLATFORM.toString());Is(Gt(Yl,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Da("otherApp.install")}function nu(){return!(!Bn(En)||!En.supports.otherAppStateChange)}const ru="v1";var ou,iu,au;function su(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Bn(En,qe.sidePanel),!mu())throw Xe;Is(Gt(ru,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function cu(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(Bn(En,qe.sidePanel),!mu())throw Xe;Is(Gt(ru,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function lu(e,t){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!t)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(Bn(En,qe.sidePanel),!mu())throw Xe;Is(Gt(ru,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function uu(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Bn(En,qe.sidePanel),!mu())throw Xe;Is(Gt(ru,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function du(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Bn(En,qe.sidePanel),!mu())throw Xe;La(Gt(ru,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function fu(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Bn(En,qe.sidePanel),!mu())throw Xe;La(Gt(ru,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function pu(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Bn(En,qe.sidePanel),!mu())throw Xe;La(Gt(ru,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function gu(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Bn(En,qe.sidePanel),!mu())throw Xe;La(Gt(ru,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function mu(){return!(!Bn(En)||!En.supports.remoteCamera)}!function(e){e.Reset="Reset",e.ZoomIn="ZoomIn",e.ZoomOut="ZoomOut",e.PanLeft="PanLeft",e.PanRight="PanRight",e.TiltUp="TiltUp",e.TiltDown="TiltDown"}(ou||(ou={})),function(e){e[e.CommandResetError=0]="CommandResetError",e[e.CommandZoomInError=1]="CommandZoomInError",e[e.CommandZoomOutError=2]="CommandZoomOutError",e[e.CommandPanLeftError=3]="CommandPanLeftError",e[e.CommandPanRightError=4]="CommandPanRightError",e[e.CommandTiltUpError=5]="CommandTiltUpError",e[e.CommandTiltDownError=6]="CommandTiltDownError",e[e.SendDataError=7]="SendDataError"}(iu||(iu={})),function(e){e[e.None=0]="None",e[e.ControlDenied=1]="ControlDenied",e[e.ControlNoResponse=2]="ControlNoResponse",e[e.ControlBusy=3]="ControlBusy",e[e.AckTimeout=4]="AckTimeout",e[e.ControlTerminated=5]="ControlTerminated",e[e.ControllerTerminated=6]="ControllerTerminated",e[e.DataChannelError=7]="DataChannelError",e[e.ControllerCancelled=8]="ControllerCancelled",e[e.ControlDisabled=9]="ControlDisabled",e[e.ControlTerminatedToAllowOtherController=10]="ControlTerminatedToAllowOtherController"}(au||(au={}));const hu="v1";function vu(e,t,n,r){if(Bn(En,qe.content),!wu())throw Xe;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!r)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");Is(Gt(hu,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function wu(){return!(!Bn(En)||!En.supports.appEntity)}const Cu="v1";function yu(e){return new Promise((t=>{if(Bn(En),!Su())throw Xe;if((hn.hostClientType===ze.android||hn.hostClientType===ze.teamsRoomsAndroid||hn.hostClientType===ze.teamsPhones||hn.hostClientType===ze.teamsDisplays)&&!jn(en)){const e={errorCode:Ue.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(ps(Gt(Cu,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function Su(){return!(!Bn(En)||!En.supports.teams)&&(!!En.supports.teams.fullTrust&&!!En.supports.teams.fullTrust.joinedTeams)}const bu="v1";function Eu(e){return new Promise((t=>{if(Bn(En),!Iu())throw Xe;t(ps(Gt(bu,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function Iu(){return!(!Bn(En)||!En.supports.teams)&&!!En.supports.teams.fullTrust}const Au="v1";var Tu;function Pu(e,t){if(Bn(En,qe.content),!Fu())throw Xe;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Is(Gt(Au,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Ou(e,t){if(Bn(En),!Fu())throw Xe;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Is(Gt(Au,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Fu(){return!(!Bn(En)||!En.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Tu||(Tu={}));class Ru{static setTimeout(e,t){const n=performance.now(),r=Ct();return Ru.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Ru.setTimeoutCallbacks[e]}static setInterval(e,t){Ru.setTimeout((function n(){e(),Ru.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Ru.setTimeoutCallbacks){const r=Ru.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Ru.setTimeoutCallbacks[e].callback(),delete Ru.setTimeoutCallbacks[e]}}}Ru.setTimeoutCallbacks={};class ku{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Ru.tick(),this.suitableForThisSession(e,t,n,r)||this.reportAndResetSession(this.getStatistics(),e,r,t,n),this.start()}processEnds(){const e=performance.now()-this.frameProcessingStartedAt,t=Math.floor(Math.max(0,Math.min(this.distributionBins.length-1,e)));this.distributionBins[t]+=1,this.sampleCount+=1}getStatistics(){return this.currentSession?{effectId:this.currentSession.effectId,effectParam:this.currentSession.effectParam,frameHeight:this.currentSession.frameHeight,frameWidth:this.currentSession.frameWidth,duration:performance.now()-this.currentSession.startedAtInMs,sampleCount:this.sampleCount,distributionBins:this.distributionBins.slice()}:null}start(){this.frameProcessingStartedAt=performance.now()}suitableForThisSession(e,t,n,r){return this.currentSession&&this.currentSession.effectId===e&&this.currentSession.effectParam===r&&this.currentSession.frameWidth===t&&this.currentSession.frameHeight===n}reportAndResetSession(e,t,n,r,o){e&&this.reportStatisticsResult(e),this.resetCurrentSession(this.getNextTimeout(t,this.currentSession),t,n,r,o),this.timeoutId&&Ru.clearTimeout(this.timeoutId),this.timeoutId=Ru.setTimeout((()=>this.reportAndResetSession(this.getStatistics(),t,n,r,o)).bind(this),this.currentSession.timeoutInMs)}resetCurrentSession(e,t,n,r,o){this.currentSession={startedAtInMs:performance.now(),timeoutInMs:e,effectId:t,effectParam:n,frameWidth:r,frameHeight:o},this.sampleCount=0,this.distributionBins.fill(0)}getNextTimeout(e,t){return t&&t.effectId===e?Math.min(ku.maxSessionTimeoutInMs,2*t.timeoutInMs):ku.initialSessionTimeoutInMs}}ku.initialSessionTimeoutInMs=1e3,ku.maxSessionTimeoutInMs=3e4;const Mu="v2";class Nu{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new ku(Nu.distributionBinSize,(e=>this.reportPerformanceEvent(Gt(Mu,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Ru.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Gt(Mu,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),Nu.calculateFPSInterval)}setFrameProcessTimeLimit(e){this.frameProcessTimeLimit=e}reportApplyingVideoEffect(e,t){var n,r;(null===(n=this.applyingEffect)||void 0===n?void 0:n.effectId)===e&&(null===(r=this.applyingEffect)||void 0===r?void 0:r.effectParam)===t||(this.applyingEffect={effectId:e,effectParam:t},this.appliedEffect=void 0)}reportVideoEffectChanged(e,t){void 0===this.applyingEffect||this.applyingEffect.effectId!==e&&this.applyingEffect.effectParam!==t||(this.appliedEffect={effectId:e,effectParam:t},this.applyingEffect=void 0,this.isFirstFrameProcessed=!1)}reportStartFrameProcessing(e,t){Ru.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))}reportFrameProcessed(){var e;this.appliedEffect&&(this.processedFrameCount++,this.frameProcessingTimeCost+=performance.now()-this.frameProcessingStartedAt,this.performanceStatistics.processEnds(),this.isFirstFrameProcessed||(this.isFirstFrameProcessed=!0,this.reportPerformanceEvent(Gt(Mu,"videoPerformanceMonitor.reportFrameProcessed"),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(Gt(Mu,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}Nu.distributionBinSize=1e3,Nu.calculateFPSInterval=1e3;var xu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Lu=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Du="v2",Uu=kt()?void 0:new Nu(Is);var Hu,Vu,_u;function Wu(e){if(Bn(En,qe.sidePanel),!qu())throw Xe;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(La(Gt(Du,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Uu?void 0:Uu.setFrameProcessTimeLimit(e.timeLimit)),!1),Zu())Gu(e.videoFrameHandler,e.config);else{if(!Yu())throw Xe;Ku(e.videoBufferHandler,e.config)}null==Uu||Uu.startMonitorSlowFrameProcessing()}function Bu(e,t){if(Bn(En,qe.sidePanel),!qu())throw Xe;Is(Gt(Du,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function ju(e){if(Bn(En,qe.sidePanel),!qu())throw Xe;La(Gt(Du,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",dd(e,Uu),!1),Is(Gt(Du,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function zu(e){Is(Gt(Du,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function $u(e){Is(Gt(Du,"videoEffects.notifyError"),"video.notifyError",[e])}function qu(){return Bn(En)&&!!En.supports.video&&(!!En.supports.video.mediaStream||!!En.supports.video.sharedFrame)}function Gu(e,t){if(Bn(En,qe.sidePanel),!qu()||!Zu())throw Xe;La(Gt(Du,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>xu(this,void 0,void 0,(function*(){const{streamId:n}=t,r=Ju(e,Uu);yield nd(n,r,$u,Uu)}))),!1),Is(Gt(Du,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Ju(e,t){return n=>xu(this,void 0,void 0,(function*(){const r=n.videoFrame;null==t||t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=yield e(n);return null==t||t.reportFrameProcessed(),o}))}function Ku(e,t){if(Bn(En,qe.sidePanel),!qu()||!Yu())throw Xe;La(Gt(Du,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==Uu||Uu.reportStartFrameProcessing(t.width,t.height),e(Qu(t),(()=>{null==Uu||Uu.reportFrameProcessed(),zu(n)}),$u)}}),!1),Is(Gt(Du,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Qu(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Lu(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Zu(){var e;return Bn(En,qe.sidePanel)&&Xu()&&!!(null===(e=En.supports.video)||void 0===e?void 0:e.mediaStream)}function Xu(){var e,t,n,r;return!(!(null===(t=null===(e=Rt().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Rt().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Yu(){var e;return Bn(En,qe.sidePanel)&&!!(null===(e=En.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Hu||(Hu={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Vu||(Vu={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(_u||(_u={}));var ed=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const td="v2";function nd(e,t,n,r){var o,i;return ed(this,void 0,void 0,(function*(){const a=id();!kt()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),ad(yield od(e,n,r),new sd(n,t),a.writable)}))}function rd(e,t,n,r){var o,i;return ed(this,void 0,void 0,(function*(){const a=id();!kt()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),ad(yield od(e,n,r),new ud(n,t),a.writable)}))}function od(e,t,n){return ed(this,void 0,void 0,(function*(){if(kt())throw Xe;const r=Rt().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function id(){if(kt())throw Xe;const e=window.MediaStreamTrackGenerator;if(!e)throw Xe;return new e({kind:"video"})}function ad(e,t,n){new(0,Rt().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class sd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>ed(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const r=yield this.videoFrameHandler({videoFrame:e}),o=new VideoFrame(r,{timestamp:n});t.enqueue(o),e.close(),r.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")}))}}class cd{constructor(e,t){if(this.headerBuffer=e,this.notifyError=t,this.ONE_TEXTURE_INPUT_ID=1869900081,this.INVALID_HEADER_ERROR="Invalid video frame header",this.UNSUPPORTED_LAYOUT_ERROR="Unsupported texture layout",this.headerDataView=new Uint32Array(e),this.headerDataView.length<8)throw this.notifyError(this.INVALID_HEADER_ERROR),new Error(this.INVALID_HEADER_ERROR);if(this.headerDataView[0]!==this.ONE_TEXTURE_INPUT_ID)throw this.notifyError(this.UNSUPPORTED_LAYOUT_ERROR),new Error(this.UNSUPPORTED_LAYOUT_ERROR)}get oneTextureLayoutId(){return this.headerDataView[0]}get version(){return this.headerDataView[1]}get frameRowOffset(){return this.headerDataView[2]}get frameFormat(){return this.headerDataView[3]}get frameWidth(){return this.headerDataView[4]}get frameHeight(){return this.headerDataView[5]}get multiStreamHeaderRowOffset(){return this.headerDataView[6]}get multiStreamCount(){return this.headerDataView[7]}}class ld{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;const n=new Uint32Array(e);for(let r=0,o=0;r<t;r++){const t=n[o++],r=n[o++],i=n[o++],a=new Uint8Array(e,r,i);this.metadataMap.set(t,a)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const e=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(void 0===e)return;const t=new Map,n=new TextDecoder("utf-8");let r=0;const o=e[r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24);for(let i=0;i<o&&r<e.length-1;i++){const o=e[++r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24),i=e.findIndex(((e,t,n)=>0==e&&t>r)),a=n.decode(e.slice(++r,i)),s=this.metadataMap.get(o);void 0!==s&&t.set(a,s);r=i+(4-(i-r)%4-1)}return t}}class ud{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>ed(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:r,metadata:{audioInferenceResult:o,attributes:i}={}}=yield this.extractVideoFrameAndMetadata(e),a=yield this.videoFrameHandler({videoFrame:r,audioInferenceResult:o,attributes:i}),s=new VideoFrame(a,{timestamp:n});t.enqueue(s),r.close(),e.close(),a.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=e=>ed(this,void 0,void 0,(function*(){if(kt())throw Xe;if("NV12"!==e.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2);yield e.copyTo(n,{rect:t});const r=new cd(n,this.notifyError),o={x:0,y:r.multiStreamHeaderRowOffset,width:e.codedWidth,height:e.codedHeight-r.multiStreamHeaderRowOffset},i=new ArrayBuffer(o.width*o.height*3/2);yield e.copyTo(i,{rect:o});const a=new ld(i,r.multiStreamCount);return{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:r.frameRowOffset,width:r.frameWidth,height:r.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult,attributes:a.attributes}}})),La(Gt(td,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function dd(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Is(Gt(td,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in _u?e:_u.InitializationFailure;Is(Gt(td,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var fd=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const pd="v2",gd=2e3,md=kt()?void 0:new Nu(Is);var hd;function vd(e){var t,n;if(!Id())throw Xe;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Bn(En,qe.sidePanel)){if(La(Gt(pd,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==md?void 0:md.setFrameProcessTimeLimit(e)),!1),null===(t=En.supports.video)||void 0===t?void 0:t.mediaStream)La(Gt(pd,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>fd(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=md?Cd(e.videoFrameHandler,md):e.videoFrameHandler;r?yield rd(n,o,Td,md):yield nd(n,o,Td,md)}))),!1),Is(Gt(pd,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=En.supports.video)||void 0===n?void 0:n.sharedFrame))throw Xe;La(Gt(pd,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==md||md.reportStartFrameProcessing(t.width,t.height);const n=wd(),r=t.timestamp;e.videoBufferHandler(yd(t),(()=>{n(),null==md||md.reportFrameProcessed(),Ad(r)}),Td)}}),!1),Is(Gt(pd,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==md||md.startMonitorSlowFrameProcessing()}}function wd(){const e=setTimeout((()=>{Td(`Frame not processed in ${gd}ms`,hd.Warn)}),gd);return function(){clearTimeout(e)}}function Cd(e,t){return n=>fd(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=wd(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function yd(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Sd(e,t,n){if(Bn(En,qe.sidePanel),!Id())throw Xe;Is(Gt(pd,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function bd(e){if(Bn(En,qe.sidePanel),!Id())throw Xe;La(Gt(pd,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",dd(e,md),!1),Is(Gt(pd,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Ed(e){if(Bn(En,qe.sidePanel),!qu())throw Xe;Is(Gt(pd,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Id(){return Bn(En),qu()}function Ad(e){Is(Gt(pd,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Td(e,t=hd.Warn){Is(Gt(pd,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Pd(e){if(Bn(En),!qu())throw Xe;Td(e,hd.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(hd||(hd={}));const Od="v2";class Fd extends wi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Rd{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class kd{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Md extends wi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class Nd{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class xd extends wi{validate(e){const t=new Md;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function Ld(e,t){if(Bn(En),!_d())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Wd(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Ue.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Cs("hostEntity.tab.addAndConfigure",[new kd(e),t],new Md,Gt(Od,"hostEntity.tab.addAndConfigure"))}function Dd(e){if(Bn(En),!_d())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Wd(e.threadId),Cs("hostEntity.tab.getAll",[new kd(e)],new xd,Gt(Od,"hostEntity.tab.getAll"))}function Ud(e,t){if(Bn(En),!_d())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Bd(e),Wd(t.threadId),Cs("hostEntity.tab.reconfigure",[new Rd(e),new kd(t)],new Fd,Gt(Od,"hostEntity.tab.reconfigure"))}function Hd(e,t){if(Bn(En),!_d())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Bd(e),Wd(t.threadId),Cs("hostEntity.tab.rename",[new Rd(e),new kd(t)],new Fd,Gt(Od,"hostEntity.tab.rename"))}function Vd(e,t){if(Bn(En),!_d())throw new Error(`Error code: ${Ue.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Wd(t.threadId),Bd(e),Cs("hostEntity.tab.remove",[new Nd(e),new kd(t)],new Ci,Gt(Od,"hostEntity.tab.remove"))}function _d(){var e;return!!(Bn(En)&&zd()&&(null===(e=En.supports.hostEntity)||void 0===e?void 0:e.tab))}function Wd(e){if(!e||0==e.length)throw new Error(`Error code: ${Ue.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function Bd(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Ue.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var jd;function zd(){return!(!Bn(En)||!En.supports.hostEntity)}function $d(e){const t=!e||e.length<=0,n=null==e?void 0:e.indexOf("@"),r=null==e?void 0:e.indexOf(".",n);if(t||-1===n||-1===r)throw new Error("Input email address does not have the correct format.")}!function(e){e.edu="EDU"}(jd||(jd={}));class qd{constructor(e){this.val=e,$d(e)}toString(){return this.val}}const Gd="/l/app/",Jd="/l/meeting/new",Kd="attendees",Qd="startTime",Zd="endTime",Xd="subject",Yd="content",ef="/l/call/0/0",tf="source",nf="withVideo",rf="/l/chat/0/0",of="users",af="topicName",sf="message";function cf(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${of}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${af}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${sf}=${encodeURIComponent(n)}`;return`${un}://${dn}${rf}?${r}${o}${i}`}function lf(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${of}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${nf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${tf}=${encodeURIComponent(n)}`;return`${un}://${dn}${ef}?${r}${o}${i}`}function uf(e,t,n,r,o){const i=void 0===e?"":`${Kd}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Qd}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Zd}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Xd}=${encodeURIComponent(r)}`,l=void 0===o?"":`&${Yd}=${encodeURIComponent(o)}`;return`${un}://${dn}${Jd}?${i}${a}${s}${c}${l}`}function df(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${un}://${dn}${Gd}${encodeURIComponent(e)}`}const ff="v1";function pf(e){return new Promise((t=>{if(Bn(En,qe.content,qe.sidePanel,qe.settings,qe.task,qe.stage,qe.meetingStage),!gf())throw new Error("Not supported");const n=Gt(ff,"appInstallDialog.openAppInstallDialog");En.isLegacyTeams?t(gs(n,"executeDeepLink",df(e.appId))):(Is(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function gf(){return!(!Bn(En)||!En.supports.appInstallDialog)}const mf="v1",hf=qt("media");var vf,wf,Cf,yf,Sf,bf,Ef;!function(e){e.Base64="base64",e.ID="id"}(vf||(vf={}));class If{}function Af(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Bn(En,qe.content,qe.task),hn.isFramelessWindow)if(jn(rn))Is(Gt(mf,"media.captureImage"),"captureImage",e);else{e({errorCode:Ue.OLD_PLATFORM},[])}else{e({errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM},[])}}function Tf(){if(Bn(En,qe.content,qe.task),!Of())throw Xe;const e=He.Media;return new Promise((t=>{t(hs(Gt(mf,"media.hasPermission"),"permissions.has",e))}))}function Pf(){if(Bn(En,qe.content,qe.task),!Of())throw Xe;const e=He.Media;return new Promise((t=>{t(hs(Gt(mf,"media.requestPermission"),"permissions.request",e))}))}function Of(){return!(!Bn(En)||!En.supports.permissions)}class Ff extends If{constructor(e){super(),e&&(this.content=e.content,this.format=e.format,this.mimeType=e.mimeType,this.name=e.name,this.preview=e.preview,this.size=e.size)}getMedia(e){if(!e)throw new Error("[get Media] Callback cannot be null");if(Bn(En,qe.content,qe.task),jn(on))if(jf(this.mimeType,this.format,this.content))jn("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:Ue.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:Ue.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Is(Gt(mf,"media.getMedia"),"getMedia",n,(function(n){if(e)if(n&&n.error)e(n.error,new Blob);else if(n&&n.mediaChunk)if(n.mediaChunk.chunkSequence<=0){const r=Lf(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Df(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):hf(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Ue.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Ct(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!er(e)&&Is(Gt(mf,"media.getMedia"),"getMedia",r),La(Gt(mf,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Da("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Lf(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Da("getMedia"+t)}else{const e=Df(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Ue.INTERNAL_ERROR,message:"data received is null"},new Blob),Da("getMedia"+t)}}))}}class Rf{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Bn(En,qe.content,qe.task);try{$n(Xt)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Is(Gt(mf,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(wf.StopRecording,e)}}class kf extends Rf{getMediaType(){return Sf.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case wf.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Mf(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Bn(En,qe.content,qe.task),!jn(on)){const e={errorCode:Ue.OLD_PLATFORM};return void t(e,[])}try{Uf(e)}catch(e){return void t(e,[])}if(!Vf(e)){const e={errorCode:Ue.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Is(Gt(mf,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Hf(e)&&(null===(a=null===(i=null==e?void 0:e.videoProps)||void 0===i?void 0:i.videoController)||void 0===a||a.notifyEventToApp(o)));if(!r)return void t(n,[]);const s=[];for(const e of r)s.push(new Ff(e));t(n,s)}))}function Nf(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Bn(En,qe.content,qe.task),!jn(on)){return void t({errorCode:Ue.OLD_PLATFORM})}if(!zf(e)){return void t({errorCode:Ue.INVALID_ARGUMENTS})}const n=[e];Is(Gt(mf,"media.viewImages"),"viewImages",n,t)}function xf(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Bn(En,qe.content,qe.task),hn.hostClientType!==ze.desktop&&hn.hostClientType!==ze.web&&hn.hostClientType!==ze.rigel&&hn.hostClientType!==ze.teamsRoomsWindows&&hn.hostClientType!==ze.teamsRoomsAndroid&&hn.hostClientType!==ze.teamsPhones&&hn.hostClientType!==ze.teamsDisplays)if(jn(an))if($f(t))Is(Gt(mf,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:Ue.INVALID_ARGUMENTS},"")}else{e({errorCode:Ue.OLD_PLATFORM},"")}else{e({errorCode:Ue.NOT_SUPPORTED_ON_PLATFORM},"")}}function Lf(e,t){if(null==e||null==t||e.length<=0)return null;let n=null,r=1;return e.sort(((e,t)=>e.sequence>t.sequence?1:-1)),e.forEach((e=>{e.sequence==r&&(n=n?new Blob([n,e.file],{type:t}):new Blob([e.file],{type:t}),r++)})),n}function Df(e,t){if(null==e||null==t)return null;const n=atob(e.chunk),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const o=new Uint8Array(r),i=new Blob([o],{type:t});return{sequence:e.chunkSequence,file:i}}function Uf(e){Wf(e)?$n(Zt):Bf(e)?$n(Xt):_f(e)&&$n(Yt)}function Hf(e){return!(e.mediaType!=Sf.Video||!e.videoProps||!e.videoProps.videoController)}function Vf(e){return!(null==e||e.maxMediaCount>10)}function _f(e){var t;return!((null==e?void 0:e.mediaType)!=Sf.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Wf(e){return!(!e||e.mediaType!=Sf.VideoAndImage&&!e.videoAndImageProps)}function Bf(e){return!(!e||e.mediaType!=Sf.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function jf(e,t,n){return null!=e&&null!=t&&t==vf.ID&&null!=n}function zf(e){return!(null==e||e.length<=0||e.length>10)}function $f(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function qf(e){if(e){if(e.title&&"string"!=typeof e.title)return!1;if(e.setSelected&&"object"!=typeof e.setSelected)return!1;if(e.openOrgWideSearchInChatOrChannel&&"boolean"!=typeof e.openOrgWideSearchInChatOrChannel)return!1;if(e.singleSelect&&"boolean"!=typeof e.singleSelect)return!1}return!0}!function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(wf||(wf={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Cf||(Cf={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(yf||(yf={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Sf||(Sf={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(bf||(bf={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Ef||(Ef={}));const Gf="v2";function Jf(e){return new Promise((t=>{if(Bn(En,qe.content,qe.task),!Zf())throw Xe;if(!$f(e))throw{errorCode:Ue.INVALID_ARGUMENTS};t(hs(Gt(Gf,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Kf(){if(Bn(En,qe.content,qe.task),!Zf())throw Xe;const e=He.Media;return new Promise((t=>{t(hs(Gt(Gf,"barCode.hasPermission"),"permissions.has",e))}))}function Qf(){if(Bn(En,qe.content,qe.task),!Zf())throw Xe;const e=He.Media;return new Promise((t=>{t(hs(Gt(Gf,"barCode.requestPermission"),"permissions.request",e))}))}function Zf(){return!!(Bn(En)&&En.supports.barCode&&En.supports.permissions)}const Xf="v2";function Yf(e){return ep(Gt(Xf,"chat.openChat"),e)}function ep(e,t){return new Promise((n=>{if(Bn(En,qe.content,qe.task),!np())throw Xe;if(En.isLegacyTeams)n(gs(e,"executeDeepLink",cf([t.user],void 0,t.message)));else{n(gs(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function tp(e){const t=Gt(Xf,"chat.openGroupChat");return new Promise((n=>{if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){const r={user:e.users[0],message:e.message};n(ep(t,r))}else{if(Bn(En,qe.content,qe.task),!np())throw Xe;if(En.isLegacyTeams)n(gs(t,"executeDeepLink",cf(e.users,e.topic,e.message)));else{n(gs(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function np(){return!(!Bn(En)||!En.supports.chat)}var rp=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const op="v2";function ip(e){return rp(this,void 0,void 0,(function*(){if(Bn(En,qe.content,qe.meetingStage,qe.task,qe.settings,qe.stage,qe.sidePanel),!sp())throw Xe;if(!e.type||!Object.values(je).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(je)}`);const t=yield Ft(e),n={mimeType:e.type,content:t};return hs(Gt(op,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function ap(){return rp(this,void 0,void 0,(function*(){Bn(En,qe.content,qe.meetingStage,qe.task,qe.settings,qe.stage,qe.sidePanel);const e=Gt(op,"clipboard.read");if(!sp())throw Xe;const t=yield hs(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Ot(e.mimeType,e.content)}return t}))}function sp(){return hn.isFramelessWindow?!(!Bn(En)||!En.supports.clipboard):!!(Bn(En)&&navigator&&navigator.clipboard&&En.supports.clipboard)}function cp(){var e;return null!==(e=Bn(En)&&En.isNAAChannelRecommended)&&void 0!==e&&e}const lp="v2";function up(){if(Bn(En,qe.content,qe.task),!fp())throw Xe;return hs(Gt(lp,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function dp(e){if(Bn(En,qe.content,qe.task),!fp())throw Xe;if(!e)throw{errorCode:Ue.INVALID_ARGUMENTS};return hs(Gt(lp,"geoLocation.showLocation"),"location.showLocation",e)}function fp(){return!!(Bn(En)&&En.supports.geoLocation&&En.supports.geoLocation.map&&En.supports.permissions)}const pp="v2";function gp(){if(Bn(En,qe.content,qe.task),!vp())throw Xe;return hs(Gt(pp,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function mp(){if(Bn(En,qe.content,qe.task),!vp())throw Xe;const e=He.GeoLocation;return new Promise((t=>{t(hs(Gt(pp,"geoLocation.hasPermission"),"permissions.has",e))}))}function hp(){if(Bn(En,qe.content,qe.task),!vp())throw Xe;const e=He.GeoLocation;return new Promise((t=>{t(hs(Gt(pp,"geoLocation.requestPermission"),"permissions.request",e))}))}function vp(){return!!(Bn(En)&&En.supports.geoLocation&&En.supports.permissions)}function wp(){return En.hostVersionsInfo?En.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Cp="v1";class yp{postMessage(e,t){Bn(En),Is(Gt(Cp,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||vt())}addEventListener(e,t){Bn(En),"message"===e&&La(Gt(Cp,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Sp{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Bn(En,qe.task),Is(Gt(Cp,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||vt())}addEventListener(e,t){Bn(En,qe.task),"message"===e&&La(Gt(Cp,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const bp="v2";function Ep(e){if(Bn(En,qe.content),!Ip())throw Xe;if(!e||!Pt(e))throw{errorCode:Ue.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return hs(Gt(bp,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function Ip(){return!(!Bn(En)||!En.supports.secondaryBrowser)}const Ap="v1";function Tp(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Bn(En,qe.content,qe.task),!jn(tn))throw{errorCode:Ue.OLD_PLATFORM};if(!e)throw{errorCode:Ue.INVALID_ARGUMENTS};if(!Op())throw Xe;Is(Gt(Ap,"location.getLocation"),"location.getLocation",[e],t)}function Pp(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Bn(En,qe.content,qe.task),!jn(tn))throw{errorCode:Ue.OLD_PLATFORM};if(!e)throw{errorCode:Ue.INVALID_ARGUMENTS};if(!Op())throw Xe;Is(Gt(Ap,"location.showLocation"),"location.showLocation",[e],t)}function Op(){return!(!Bn(En)||!En.supports.location)}const Fp="v1";function Rp(e){Bn(En,qe.sidePanel),e.contentUrl&&new URL(e.contentUrl),Is(Gt(Fp,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var kp=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Mp="v1";var Np,xp,Lp,Dp,Up,Hp;function Vp(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),Is(Gt(Mp,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function _p(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),Is(Gt(Mp,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Wp(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage,qe.settings,qe.content),Is(Gt(Mp,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Bp(){var e,t,n;return kp(this,void 0,void 0,(function*(){let r;Bn(En,qe.sidePanel,qe.meetingStage,qe.settings,qe.content);try{const e=!0;r=yield hs(Gt("v2","meeting.getMeetingDetailsVerbose"),"meeting.getMeetingDetails",e)}catch(t){throw new Error(null===(e=null==t?void 0:t.errorCode)||void 0===e?void 0:e.toString())}if(((null===(t=r.details)||void 0===t?void 0:t.type)==Dp.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Dp.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Ue.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function jp(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage,qe.task),Is(Gt(Mp,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function zp(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Bn(En,qe.sidePanel),Is(Gt(Mp,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function $p(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Bn(En,qe.sidePanel),Is(Gt(Mp,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function qp(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Bn(En,qe.sidePanel),Is(Gt(Mp,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Gp(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Bn(En,qe.sidePanel),La(Gt(Mp,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Jp(e,t,n={sharingProtocol:Up.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),Is(Gt(Mp,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Kp(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),Is(Gt(Mp,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Qp(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),Is(Gt(Mp,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Zp(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),Is(Gt(Mp,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Xp(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),La(Gt(Mp,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Yp(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),La(Gt(Mp,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function eg(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),La(Gt(Mp,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function tg(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Bn(En);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Hp.Other};return hs(Gt("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function ng(e,t){if(!t)throw new Error("[requestAppAudioHandling] Callback response cannot be null");if(!e.micMuteStateChangedCallback)throw new Error("[requestAppAudioHandling] Callback Mic mute state handler cannot be null");Bn(En,qe.sidePanel,qe.meetingStage),e.isAppHandlingAudio?rg(e,t):og(e,t)}function rg(e,t){Is(Gt(Mp,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((n,r)=>{if(n&&null!=r)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(n)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${n.errorCode} ${n.message}`);if("boolean"!=typeof r)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");La(Gt(Mp,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>kp(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);ag(n,n.isMicMuted===t.isMicMuted?Np.HostInitiated:Np.AppDeclinedToChange)}catch(e){ag(t,Np.AppFailedToChange)}}))));La(Gt(Mp,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function og(e,t){Is(Gt(Mp,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Ua("meeting.micStateChanged")&&Da("meeting.micStateChanged"),Ua("meeting.audioDeviceSelectionChanged")&&Da("meeting.audioDeviceSelectionChanged"),t(n)}))}function ig(e){ag(e,Np.AppInitiated)}function ag(e,t){Bn(En,qe.sidePanel,qe.meetingStage),Is(Gt(Mp,"meeting.setMicStateWithReason"),"meeting.updateMicState",[e,t])}!function(e){e[e.HostInitiated=0]="HostInitiated",e[e.AppInitiated=1]="AppInitiated",e[e.AppDeclinedToChange=2]="AppDeclinedToChange",e[e.AppFailedToChange=3]="AppFailedToChange"}(Np||(Np={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(xp||(xp={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Lp||(Lp={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Dp||(Dp={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Up||(Up={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(Hp||(Hp={}));const sg="v1",cg="v2";function lg(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Gt(sg,"monetization.openPurchaseExperience")):(r=e,o=Gt(cg,"monetization.openPurchaseExperience"));return Bn(En,qe.content),Et((()=>new Promise((e=>{if(!ug())throw Xe;e(hs(o,"monetization.openPurchaseExperience",r))}))),n)}function ug(){return!(!Bn(En)||!En.supports.monetization)}const dg="v2";function fg(e){return new Promise((t=>{if(Bn(En,qe.content),!gg())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(gs(Gt(dg,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function pg(e){return new Promise((t=>{if(Bn(En,qe.content),!gg())throw new Error("Not supported");const n=Gt(dg,"calendar.composeMeeting");En.isLegacyTeams?t(gs(n,"executeDeepLink",uf(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(gs(n,"calendar.composeMeeting",e))}))}function gg(){return!(!Bn(En)||!En.supports.calendar)}const mg="v2";function hg(e){return new Promise((t=>{if(Bn(En,qe.content),!wg())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(gs(Gt(mg,"mail.openMailItem"),"mail.openMailItem",e))}))}function vg(e){return new Promise((t=>{if(Bn(En,qe.content),!wg())throw new Error("Not supported");t(gs(Gt(mg,"mail.composeMail"),"mail.composeMail",e))}))}function wg(){return!(!Bn(En)||!En.supports.mail)}var Cg;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Cg||(Cg={}));const yg="v2";function Sg(){if(!hn.printCapabilityEnabled){if(Bn(En),!Pg())throw Xe;hn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(bg(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function bg(){Rt().print()}function Eg(e){Ig(Gt(yg,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!er(e)&&!Pg())throw Xe}))}function Ig(e,t,n){!er(t)&&Bn(En),!er(t)&&n&&n(),ja(e,t)}function Ag(e){Tg(Gt(yg,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!er(e)&&!Pg())throw Xe}))}function Tg(e,t,n){!er(t)&&Bn(En),!er(t)&&n&&n(),qa(e,t)}function Pg(){return!(!Bn(En)||!En.supports.teamsCore)}const Og="v1",Fg="v2";function Rg(e,t){let n,r;Bn(En,qe.content,qe.task,qe.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Gt(Og,"people.selectPeople")):(r=e,o=Gt(Fg,"people.selectPeople")),St(kg,n,o,r)}function kg(e,t){return new Promise((n=>{if(!jn(nn))throw{errorCode:Ue.OLD_PLATFORM};if(!qf(t))throw{errorCode:Ue.INVALID_ARGUMENTS};if(!Mg())throw Xe;n(hs(e,"people.selectPeople",t))}))}function Mg(){return!(!Bn(En)||!En.supports.people)}function Ng(e){return e?e.modality&&"string"!=typeof e.modality?[!1,"modality must be a string"]:e.targetElementBoundingRect&&"object"==typeof e.targetElementBoundingRect?e.triggerType&&"string"==typeof e.triggerType?xg(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function xg(e){return e?e.displayName&&"string"!=typeof e.displayName?[!1,"displayName must be a string"]:e.identifiers&&"object"==typeof e.identifiers?e.identifiers.AadObjectId||e.identifiers.Smtp||e.identifiers.Upn?e.identifiers.AadObjectId&&"string"!=typeof e.identifiers.AadObjectId?[!1,"AadObjectId identifier must be a string"]:e.identifiers.Smtp&&"string"!=typeof e.identifiers.Smtp?[!1,"Smtp identifier must be a string"]:e.identifiers.Upn&&"string"!=typeof e.identifiers.Upn?[!1,"Upn identifier must be a string"]:[!0,void 0]:[!1,"at least one valid identifier must be provided"]:[!1,"persona identifiers object must be provided"]:[!1,"persona object must be provided"]}const Lg="v2";function Dg(e){return Bn(En,qe.content),new Promise((t=>{const[n,r]=Ng(e);if(!n)throw{errorCode:Ue.INVALID_ARGUMENTS,message:r};const o={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(hs(Gt(Lg,"profile.showProfile"),"profile.showProfile",o))}))}function Ug(){return!(!Bn(En)||!En.supports.profile)}const Hg="v2",Vg="search.queryChange",_g="search.queryClose",Wg="search.queryExecute";function Bg(e,t,n){if(Bn(En,qe.content),!zg())throw Xe;La(Gt(Hg,"search.registerOnClosedHandler"),_g,e),La(Gt(Hg,"search.registerOnExecutedHandler"),Wg,t),n&&La(Gt(Hg,"search.registerOnChangeHandler"),Vg,n)}function jg(){if(Bn(En,qe.content),!zg())throw Xe;Is(Gt(Hg,"search.unregisterHandlers"),"search.unregister"),Da(Vg),Da(_g),Da(Wg)}function zg(){return!(!Bn(En)||!En.supports.search)}function $g(){return new Promise((e=>{if(Bn(En,qe.content),!zg())throw new Error("Not supported");e(gs(Gt(Hg,"search.closeSearch"),"search.closeSearch"))}))}var qg=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Gg="v2";function Jg(){return qg(this,void 0,void 0,(function*(){if(Bn(En,qe.sidePanel,qe.meetingStage),!Kg())throw Xe;return yield hs(Gt(Gg,"sharing.history.getContent"),"sharing.history.getContent")}))}function Kg(){var e;return Bn(En)&&void 0!==(null===(e=En.supports.sharing)||void 0===e?void 0:e.history)}const Qg="v1",Zg="v2",Xg={shareWebContent:"sharing.shareWebContent"};function Yg(e,t){try{tm(e),nm(e),rm(e)}catch(e){return bt((()=>Promise.reject(e)),t)}Bn(En,qe.content,qe.sidePanel,qe.task,qe.stage,qe.meetingStage);return bt(em,t,Gt(t?Qg:Zg,"sharing.shareWebContent"),e)}function em(e,t){return new Promise((n=>{if(!om())throw Xe;n(hs(e,Xg.shareWebContent,t))}))}function tm(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Ue.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function nm(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function rm(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:Ue.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function om(){return!(!Bn(En)||!En.supports.sharing)}const im="v2";function am(){return new Promise((e=>{if(Bn(En,qe.content),!sm())throw Xe;e(hs(Gt(im,"stageView.self.close"),"stageView.self.close"))}))}function sm(){var e;return Bn(En)&&void 0!==(null===(e=En.supports.stageView)||void 0===e?void 0:e.self)}const cm="v2";var lm;function um(e){return new Promise((t=>{if(Bn(En,qe.content),!dm())throw Xe;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(hs(Gt(cm,"stageView.open"),"stageView.open",e))}))}function dm(){return!(!Bn(En)||!En.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(lm||(lm={}));const fm=10;var pm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const gm="v2";function mm(e){return pm(this,void 0,void 0,(function*(){Bn(En,qe.content,qe.task),wm(),Cm(e);const t=yield hs(Gt(gm,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return ym(e.maxVisualMediaCount,t),t}))}function hm(e){return pm(this,void 0,void 0,(function*(){Bn(En,qe.content,qe.task),wm(),Cm(e);const t=yield hs(Gt(gm,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return ym(e.maxVisualMediaCount,t),t}))}function vm(){return!!(Bn(En)&&En.supports.visualMedia&&En.supports.visualMedia.image&&En.supports.permissions)}function wm(){if(!vm())throw Xe}function Cm(e){if(!e||e.maxVisualMediaCount>fm||e.maxVisualMediaCount<1)throw tt}function ym(e,t){if(t.length>e)throw nt}const Sm="v2";var bm,Em;function Im(){if(Bn(En,qe.content,qe.task),!vm())throw Xe;const e=He.Media;return hs(Gt(Sm,"visualMedia.hasPermission"),"permissions.has",e)}function Am(){if(Bn(En,qe.content,qe.task),!vm())throw Xe;const e=He.Media;return hs(Gt(Sm,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(bm||(bm={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Em||(Em={}));var Tm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let Pm=null;function Om(){return Tm(this,void 0,void 0,(function*(){return null===Pm&&(Pm=(yield Dr()).app.host.name),Pm}))}var Fm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};function Rm(){return Fm(this,void 0,void 0,(function*(){if(Bn(En),!Mm())throw Xe;return!(!En.isLegacyTeams||hn.hostClientType!==ze.android&&hn.hostClientType!==ze.ios&&hn.hostClientType!==ze.ipados||(yield km())!==$e.teams)||(yield ps(Gt("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function km(){return Fm(this,void 0,void 0,(function*(){return Om()}))}function Mm(){return Bn(En)&&void 0!==En.supports.webStorage}const Nm="v2";var xm;function Lm(e){const t=Gt(Nm,"call.startCall");return new Promise((n=>{var r;if(Bn(En,qe.content,qe.task),!Dm())throw Xe;if(!En.isLegacyTeams)return Is(t,"call.startCall",[e],n);n(ps(t,"executeDeepLink",lf(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(xm.Video),e.source)).then((e=>{if(!e)throw new Error(mn);return e})))}))}function Dm(){return!(!Bn(En)||!En.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(xm||(xm={}));const Um="v1";function Hm(){Ii(Gt(Um,"appInitialization.notifyAppLoaded"))}function Vm(){Is(Gt(Um,"appInitialization.notifySuccess"),Or.Success,[Un])}function _m(e){Ti(Gt(Um,"appInitialization.notifyFailure"),e)}function Wm(e){Ai(Gt(Um,"appInitialization.notifyExpectedFailure"),e)}const Bm=qt("thirdPartyCloudStorage"),jm="v2";class zm{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let $m=[],qm=null,Gm=!0,Jm=null;function Km(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Bn(En,qe.content,qe.task),!Zm())throw Xe;if(Jm)throw Jm=null,new Error("getDragAndDropFiles cannot be called twice");Jm=t,Gm=!0,Is(Gt(jm,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],Qm)}else{t([],{errorCode:Ue.INVALID_ARGUMENTS})}}function Qm(e){if(Jm)if(e&&e.error)Jm([],e.error),Jm=null;else if(e&&e.fileChunk)try{Gm||0!==e.fileChunk.chunkSequence||(Bm("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),Gm=!0,Jm([],{errorCode:Ue.INTERNAL_ERROR,message:"error occurred while receiving data"}),$m=[],Jm=null);const t=Df(e.fileChunk,e.fileType);if(t?(qm||(qm=new zm(e.fileType,[])),qm.assembleAttachment.push(t)):(Bm(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),Jm?Jm([],{errorCode:Ue.INTERNAL_ERROR,message:"error occurred while receiving data"}):Jm=null,$m=[],Jm=null,Gm=!0),Gm=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&qm){const t=Lf(qm.assembleAttachment,qm.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});$m.push(n)}e.isLastFile&&Jm&&(Jm($m,e.error),$m=[],Jm=null,Gm=!0),qm=null}}catch(e){Jm&&(Jm([],{errorCode:Ue.INTERNAL_ERROR,message:e}),$m=[],Jm=null,Gm=!0)}else Jm([],{errorCode:Ue.INTERNAL_ERROR,message:"data received is null"}),$m=[],Jm=null,Gm=!0}function Zm(){return!(!Bn(En)||!En.supports.thirdPartyCloudStorage)}const Xm="v1";function Ym(e,t){Ei(Gt(Xm,"initialize"),t).then((()=>{e&&e()}))}function eh(){Sg()}function th(){bg()}function nh(e){Wn(),Is(Gt(Xm,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=hn.frameContext),e(t)}))}function rh(e){Mi(Gt(Xm,"registerOnThemeChangeHandlerHelper"),e)}function oh(e){Ha(Gt(Xm,"registerFullScreenHandler"),"fullScreenChange",e,[])}function ih(e){Ha(Gt(Xm,"registerAppButtonClickHandler"),"appButtonClick",e,[qe.content])}function ah(e){Ha(Gt(Xm,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[qe.content])}function sh(e){Ha(Gt(Xm,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[qe.content])}function ch(e){Aa(Gt(Xm,"registerBackButtonHandler"),e)}function lh(e){Ig(Gt(Xm,"registerOnLoadHandler"),e)}function uh(e){Tg(Gt(Xm,"registerBeforeUnloadHandler"),e)}function dh(e){Ha(Gt(Xm,"registerFocusEnterHandler"),"focusEnter",e,[])}function fh(e){Ha(Gt(Xm,"registerChangeSettingsHandler"),"changeSettings",e,[qe.content])}function ph(e,t){Bn(En),da(Gt(Xm,"getTabInstances"),t).then((t=>{e(t)}))}function gh(e,t){Bn(En),fa(Gt(Xm,"getMruTabInstances"),t).then((t=>{e(t)}))}function mh(e){pa(Gt(Xm,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function hh(e,t){Bn(En,qe.content,qe.sidePanel,qe.settings,qe.task,qe.stage,qe.meetingStage);const n=null!=t?t:vt();Ni(Gt(Xm,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function vh(e){ga(Gt(Xm,"setFrameContext"),e)}function wh(e,t,n){Ei(Gt(Xm,"initializeWithFrameContext"),n).then((()=>t&&t())),ga(Gt(Xm,"setFrameContext"),e)}const Ch="v1";function yh(e){ua(Gt(Ch,"navigation.returnFocus"),e)}function Sh(e,t){Bn(En);const n=null!=t?t:vt();la(Gt(Ch,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function bh(e,t){Bn(En,qe.content,qe.sidePanel,qe.settings,qe.remove,qe.task,qe.stage,qe.meetingStage);const n=null!=t?t:vt();sa(Gt(Ch,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Eh(e){Bn(En);const t=null!=e?e:vt();ca(Gt(Ch,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const Ih="v1";function Ah(e){ma(Gt(Ih,"settings.setValidityState"),e)}function Th(e){Bn(En,qe.content,qe.settings,qe.remove,qe.sidePanel),ha(Gt(Ih,"settings.getSettings")).then((t=>{e(t)}))}function Ph(e,t){Bn(En,qe.content,qe.settings,qe.sidePanel);const n=null!=t?t:vt();va(Gt(Ih,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Oh(e){li(Gt(Ih,"settings.registerOnSaveHandler"),e)}function Fh(e){di(Gt(Ih,"settings.registerOnRemoveHandler"),e)}var Rh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const kh="v1";function Mh(e,t){const n=Gt(kh,"tasks.startTask"),r=t?e=>{var n,r;return t(null!==(n=e.err)&&void 0!==n?n:"",null!==(r=e.result)&&void 0!==r?r:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(Bn(En,qe.content,qe.sidePanel,qe.meetingStage),Is(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?Ro(n,Dh(e),r):Fo(n,Lh(e),r),new yp}function Nh(e){e=Uh(e);const{width:t,height:n}=e,r=Rh(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Oo(Gt(kh,"tasks.updateTask"),e)}function xh(e,t){ko(Gt(kh,"tasks.submitTask"),e,t)}function Lh(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:Ke.Small,width:e.width?e.width:Ke.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Dh(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:Ke.Small,width:e.width?e.width:Ke.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function Uh(e){return e.height=e.height?e.height:Ke.Small,e.width=e.width?e.width:Ke.Small,e}const Hh="v2";var Vh,_h;function Wh(){return!(!Bn(En,qe.meetingStage,qe.sidePanel,qe.content)||!En.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Vh||(Vh={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(_h||(_h={}));class Bh{getFluidTenantInfo(){return jh(),new Promise((e=>{e(hs(Gt(Hh,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return jh(),new Promise((t=>{t(hs(Gt(Hh,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return jh(),new Promise((e=>{e(hs(Gt(Hh,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return jh(),new Promise((t=>{t(hs(Gt(Hh,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return jh(),new Promise((e=>{e(hs(Gt(Hh,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return jh(),new Promise((t=>{t(hs(Gt(Hh,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return jh(),new Promise((t=>{t(hs(Gt(Hh,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return jh(),new Promise((t=>{t(hs(Gt(Hh,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return jh(),new Bh}}function jh(){if(!Wh())throw new Error("LiveShareHost Not supported")}var zh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function $h(e){try{return e.cartItems=qh(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function qh(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=qh(e.accessories)),e}))}const Gh=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=zh(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Gh(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function Jh(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)Qh(t),Kh(t.accessories)}function Kh(e){if(null!=e){if(!Array.isArray(e)||0===e.length)throw new Error("CartItem.accessories must be a non-empty array");for(const t of e){if(t.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");Qh(t)}}}function Qh(e){if(!e.id)throw new Error("cartItem.id must not be empty");if(!e.name)throw new Error("cartItem.name must not be empty");Xh(e.price),Yh(e.quantity)}function Zh(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===Ne(e))throw new Error("id must be a valid UUID")}}function Xh(e){if("number"!=typeof e||e<0)throw new Error(`price ${e} must be a number not less than 0`);if(parseFloat(e.toFixed(3))!==e)throw new Error(`price ${e} must have at most 3 decimal places`)}function Yh(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function ev(e){if(!Object.values(ov).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const tv="v2",nv={majorVersion:1,minorVersion:1};var rv,ov;function iv(){if(Bn(En,qe.content,qe.task),!lv())throw Xe;return hs(Gt(tv,"marketplace.getCart"),"marketplace.getCart",nv).then($h)}function av(e){if(Bn(En,qe.content,qe.task),!lv())throw Xe;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return Zh(null==e?void 0:e.cartId),Jh(null==e?void 0:e.cartItems),hs(Gt(tv,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Gh(e.cartItems),cartVersion:nv})).then($h)}function sv(e){if(Bn(En,qe.content,qe.task),!lv())throw Xe;if(!e)throw new Error("removeCartItemsParams must be provided");if(Zh(null==e?void 0:e.cartId),!Array.isArray(null==e?void 0:e.cartItemIds)||0===(null==e?void 0:e.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return hs(Gt(tv,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:nv})).then($h)}function cv(e){if(Bn(En,qe.content,qe.task),!lv())throw Xe;if(!e)throw new Error("updateCartStatusParams must be provided");return Zh(null==e?void 0:e.cartId),ev(null==e?void 0:e.cartStatus),hs(Gt(tv,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:nv})).then($h)}function lv(){return!(!Bn(En)||!En.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(rv||(rv={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(ov||(ov={}))})(),r})()));
2
2
  //# sourceMappingURL=MicrosoftTeams.min.js.map