@microsoft/teams-js 2.32.0-beta.0 → 2.32.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/esm/_virtual/_polyfill-node.buffer.js +1 -0
- package/dist/esm/_virtual/_polyfill-node.global.js +1 -0
- package/dist/esm/_virtual/_polyfill-node.os.js +1 -1
- package/dist/esm/_virtual/_polyfill-node.process.js +1 -1
- package/dist/esm/_virtual/_polyfill-node.util.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/utils.js +1 -1
- package/dist/esm/packages/teams-js/src/public/version.js +1 -1
- package/dist/umd/MicrosoftTeams.js +1025 -62
- package/dist/umd/MicrosoftTeams.js.map +1 -1
- package/dist/umd/MicrosoftTeams.min.js +1 -1
- package/dist/umd/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/packages/teams-js/src/internal/uint8array-extras/uint8array-extras.js +0 -1
@@ -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:()=>er,ChannelType:()=>Ze,ChildAppWindow:()=>Mp,DialogDimension:()=>Qe,EduType:()=>je,EmailAddress:()=>nf,ErrorCode:()=>He,FileOpenPreference:()=>De,FrameContexts:()=>Ge,HostClientType:()=>$e,HostName:()=>qe,LiveShareHost:()=>ev,NotificationTypes:()=>uc,ParentAppWindow:()=>Np,SecondaryM365ContentIdName:()=>Ue,TaskModuleDimension:()=>Qe,TeamType:()=>Je,UserSettingTypes:()=>fc,UserTeamRole:()=>Ke,ViewerActionTypes:()=>dc,app:()=>i,appEntity:()=>U,appInitialization:()=>Ce,appInstallDialog:()=>q,authentication:()=>a,barCode:()=>J,calendar:()=>ie,call:()=>we,chat:()=>K,clipboard:()=>Q,conversations:()=>E,copilot:()=>A,dialog:()=>p,enablePrintCapability:()=>fh,executeDeepLink:()=>Oh,externalAppAuthentication:()=>T,externalAppAuthenticationForCEA:()=>P,externalAppCardActions:()=>O,externalAppCardActionsForCEA:()=>F,externalAppCommands:()=>R,files:()=>k,geoLocation:()=>Y,getAdaptiveCardSchemaVersion:()=>Rp,getContext:()=>gh,getMruTabInstances:()=>Th,getTabInstances:()=>Ah,hostEntity:()=>z,initialize:()=>dh,initializeWithFrameContext:()=>Rh,liveShare:()=>Ee,location:()=>te,logs:()=>b,mail:()=>ae,marketplace:()=>Ie,media:()=>G,meeting:()=>re,meetingRoom:()=>M,menus:()=>g,messageChannels:()=>N,monetization:()=>oe,navigateBack:()=>Dh,navigateCrossDomain:()=>xh,navigateToTab:()=>Nh,nestedAppAuth:()=>Z,notifications:()=>x,openFilePreview:()=>Cc,otherAppStateChange:()=>D,pages:()=>y,people:()=>ce,print:()=>ph,profile:()=>le,registerAppButtonClickHandler:()=>vh,registerAppButtonHoverEnterHandler:()=>wh,registerAppButtonHoverLeaveHandler:()=>Ch,registerBackButtonHandler:()=>yh,registerBeforeUnloadHandler:()=>bh,registerChangeSettingsHandler:()=>Ih,registerCustomHandler:()=>vc,registerFocusEnterHandler:()=>Eh,registerFullScreenHandler:()=>hh,registerOnLoadHandler:()=>Sh,registerOnThemeChangeHandler:()=>mh,registerUserSettingsChangeHandler:()=>wc,remoteCamera:()=>L,returnFocus:()=>Mh,search:()=>ue,secondaryBrowser:()=>ee,sendCustomEvent:()=>hc,sendCustomMessage:()=>mc,setFrameContext:()=>Fh,settings:()=>Se,shareDeepLink:()=>Ph,sharing:()=>fe,stageView:()=>ge,store:()=>$,tasks:()=>be,teams:()=>_,teamsCore:()=>se,thirdPartyCloudStorage:()=>ye,uploadCustomApp:()=>gc,version:()=>Hn,videoEffects:()=>W,videoEffectsEx:()=>B,visualMedia:()=>he,webStorage:()=>ve});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>vr,getTelemetryPort:()=>mr,isSupported:()=>hr});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Ir,getDataLayerPort:()=>br,isSupported:()=>Er});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Ar,registerOnResumeHandler:()=>Tr});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>kr,FailedReason:()=>Rr,Messages:()=>Fr,_initialize:()=>Dr,_uninitialize:()=>Lr,getContext:()=>Ur,getFrameContext:()=>Nr,initialize:()=>xr,isInitialized:()=>Mr,lifecycle:()=>o,notifyAppLoaded:()=>Hr,notifyExpectedFailure:()=>Wr,notifyFailure:()=>_r,notifySuccess:()=>Vr,openLink:()=>zr,registerHostToAppPerformanceMetricsHandler:()=>jr,registerOnThemeChangeHandler:()=>Br});var a={};n.r(a),n.d(a,{DataResidency:()=>go,authenticate:()=>Yr,getAuthToken:()=>to,getUser:()=>ro,initialize:()=>Zr,notifyFailure:()=>uo,notifySuccess:()=>lo,registerAuthenticationHandlers:()=>Xr});var s={};n.r(s),n.d(s,{isSupported:()=>ho,resize:()=>mo});var c={};n.r(c),n.d(c,{isSupported:()=>wo,open:()=>vo});var l={};n.r(l),n.d(l,{isSupported:()=>bo,registerOnMessageFromParent:()=>So,sendMessageToDialog:()=>yo,sendMessageToParentFromDialog:()=>Co});var u={};n.r(u),n.d(u,{bot:()=>c,getDialogInfoFromBotUrlDialogInfo:()=>Po,getDialogInfoFromUrlDialogInfo:()=>To,isSupported:()=>Ao,open:()=>Eo,parentCommunication:()=>l,submit:()=>Io});var d={};n.r(d),n.d(d,{isSupported:()=>Ho,open:()=>Uo});var f={};n.r(f),n.d(f,{bot:()=>d,isSupported:()=>_o,open:()=>Vo});var p={};n.r(p),n.d(p,{adaptiveCard:()=>f,initialize:()=>Wo,isSupported:()=>Bo,update:()=>s,url:()=>u});var g={};n.r(g),n.d(g,{DisplayMode:()=>zo,MenuItem:()=>qo,MenuListType:()=>$o,initialize:()=>Xo,isSupported:()=>ii,setNavBarMenu:()=>ti,setUpViews:()=>Yo,showActionMenu:()=>ri});var m={};n.r(m),n.d(m,{initialize:()=>ai,isSupported:()=>wi,registerChangeConfigHandler:()=>gi,registerOnRemoveHandler:()=>di,registerOnRemoveHandlerHelper:()=>fi,registerOnSaveHandler:()=>li,registerOnSaveHandlerHelper:()=>ui,setConfig:()=>ci,setValidityState:()=>si});var h={};n.r(h),n.d(h,{isSupported:()=>Hi,onClick:()=>Di,onHoverEnter:()=>Li,onHoverLeave:()=>Ui});var v={};n.r(v),n.d(v,{isSupported:()=>Wi,navigateTo:()=>Vi,navigateToDefaultPage:()=>_i});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Bi,exitFullscreen:()=>ji,isSupported:()=>zi});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Gi,getTabInstances:()=>qi,isSupported:()=>Ji,navigateToTab:()=>$i});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Ki,ReturnFocusType:()=>Qi,appButton:()=>h,backStack:()=>S,config:()=>m,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>ta,initializeWithFrameContext:()=>ea,isSupported:()=>aa,navigateCrossDomain:()=>na,navigateToApp:()=>ra,registerFocusEnterHandler:()=>Xi,registerFullScreenHandler:()=>ia,returnFocus:()=>Zi,setCurrentFrame:()=>Yi,shareDeepLink:()=>oa,tabs:()=>C});var S={};n.r(S),n.d(S,{_initialize:()=>Ea,isSupported:()=>Oa,navigateBack:()=>Ia,registerBackButtonHandler:()=>Aa,registerBackButtonHandlerHelper:()=>Ta});var b={};n.r(b),n.d(b,{isSupported:()=>lc,registerGetLogHandler:()=>cc});var E={};n.r(E),n.d(E,{closeConversation:()=>bc,getChatMembers:()=>Ec,isSupported:()=>Ic,openConversation:()=>Sc});var I={};n.r(I),n.d(I,{getEligibilityInfo:()=>Fc,isSupported:()=>Oc});var A={};n.r(A),n.d(A,{eligibility:()=>I});var T={};n.r(T),n.d(T,{ActionExecuteInvokeRequestType:()=>xc,ActionExecuteResponseHandler:()=>Hc,InvokeErrorCode:()=>Uc,InvokeResponseType:()=>Lc,OriginalRequestType:()=>Dc,SerializableActionExecuteInvokeRequest:()=>Mc,authenticateAndResendRequest:()=>jc,authenticateWithOauth2:()=>qc,authenticateWithPowerPlatformConnectorPlugins:()=>Gc,authenticateWithSSO:()=>zc,authenticateWithSSOAndResendRequest:()=>$c,isActionExecuteResponse:()=>Nc,isInvokeError:()=>Vc,isSupported:()=>Jc,validateActionExecuteInvokeRequest:()=>Wc});var P={};n.r(P),n.d(P,{authenticateAndResendRequest:()=>Yc,authenticateWithOauth:()=>Xc,authenticateWithSSO:()=>Zc,authenticateWithSSOAndResendRequest:()=>el,isSupported:()=>tl,validateInput:()=>nl});var O={};n.r(O),n.d(O,{ActionOpenUrlErrorCode:()=>il,ActionOpenUrlType:()=>ol,isSupported:()=>cl,processActionOpenUrl:()=>sl,processActionSubmit:()=>al});var F={};n.r(F),n.d(F,{isSupported:()=>pl,processActionOpenUrl:()=>dl,processActionSubmit:()=>fl});var R={};n.r(R),n.d(R,{isSupported:()=>vl,processActionCommand:()=>hl});var k={};n.r(k),n.d(k,{CloudStorageProvider:()=>Cl,CloudStorageProviderFileAction:()=>Il,CloudStorageProviderType:()=>yl,DocumentLibraryAccessType:()=>bl,FileDownloadStatus:()=>El,SpecialDocumentLibraryType:()=>Sl,addCloudStorageFolder:()=>Tl,addCloudStorageProvider:()=>xl,addCloudStorageProviderFile:()=>Ll,copyMoveFiles:()=>kl,deleteCloudStorageFolder:()=>Pl,deleteCloudStorageProviderFile:()=>Hl,downloadCloudStorageProviderFile:()=>Vl,getCloudStorageFolderContents:()=>Ol,getCloudStorageFolders:()=>Al,getExternalProviders:()=>Rl,getFileDownloads:()=>Ml,openCloudStorageFile:()=>Fl,openDownloadFolder:()=>Nl,registerCloudStorageProviderContentChangeHandler:()=>Bl,registerCloudStorageProviderListChangeHandler:()=>Wl,removeCloudStorageProvider:()=>Dl,renameCloudStorageProviderFile:()=>Ul,uploadCloudStorageProviderFile:()=>_l});var M={};n.r(M),n.d(M,{getPairedMeetingRoomInfo:()=>$l,isSupported:()=>Kl,registerMeetingRoomCapabilitiesUpdateHandler:()=>Gl,registerMeetingRoomStatesUpdateHandler:()=>Jl,sendCommandToPairedMeetingRoom:()=>ql});var N={};n.r(N),n.d(N,{dataLayer:()=>t,isSupported:()=>Ql,telemetry:()=>e});var x={};n.r(x),n.d(x,{isSupported:()=>Yl,showNotification:()=>Xl});var D={};n.r(D),n.d(D,{isSupported:()=>ou,notifyInstallCompleted:()=>ru,registerAppInstallationHandler:()=>tu,unregisterAppInstallationHandler:()=>nu});var L={};n.r(L),n.d(L,{ControlCommand:()=>au,ErrorReason:()=>su,SessionTerminatedReason:()=>cu,getCapableParticipants:()=>lu,isSupported:()=>vu,registerOnCapableParticipantsChangeHandler:()=>pu,registerOnDeviceStateChangeHandler:()=>mu,registerOnErrorHandler:()=>gu,registerOnSessionStatusChangeHandler:()=>hu,requestControl:()=>uu,sendControlCommand:()=>du,terminateSession:()=>fu});var U={};n.r(U),n.d(U,{isSupported:()=>yu,selectAppEntity:()=>Cu});var H={};n.r(H),n.d(H,{getUserJoinedTeams:()=>bu,isSupported:()=>Eu});var V={};n.r(V),n.d(V,{getConfigSetting:()=>Au,isSupported:()=>Tu,joinedTeams:()=>H});var _={};n.r(_),n.d(_,{ChannelType:()=>Ou,fullTrust:()=>V,getTeamChannels:()=>Fu,isSupported:()=>ku,refreshSiteUrl:()=>Ru});var W={};n.r(W),n.d(W,{EffectChangeType:()=>Wu,EffectFailureReason:()=>Bu,VideoFrameFormat:()=>_u,isSupported:()=>Ju,notifySelectedVideoEffectChanged:()=>zu,registerForVideoEffect:()=>$u,registerForVideoFrame:()=>ju});var B={};n.r(B),n.d(B,{ErrorLevel:()=>wd,frameProcessingTimeoutInMs:()=>hd,isSupported:()=>Td,notifyFatalError:()=>Fd,notifySelectedVideoEffectChanged:()=>Ed,registerForVideoEffect:()=>Id,registerForVideoFrame:()=>Cd,updatePersonalizedEffects:()=>Ad});var j={};n.r(j),n.d(j,{addAndConfigure:()=>Ud,getAll:()=>Hd,isSupported:()=>Bd,reconfigure:()=>Vd,remove:()=>Wd,rename:()=>_d});var z={};n.r(z),n.d(z,{AppTypes:()=>$d,isSupported:()=>qd,tab:()=>j});var $={};n.r($),n.d($,{StoreDialogType:()=>Kd,errorInvalidDialogType:()=>Qd,errorMissingAppId:()=>Zd,errorMissingCollectionId:()=>Xd,isSupported:()=>ef,openStoreExperience:()=>Yd});var q={};n.r(q),n.d(q,{isSupported:()=>If,openAppInstallDialog:()=>Ef});var G={};n.r(G),n.d(G,{CameraStartMode:()=>Ff,File:()=>xf,FileFormat:()=>Pf,ImageOutputFormats:()=>Nf,ImageUriType:()=>Mf,Media:()=>Vf,MediaControllerEvent:()=>Of,MediaType:()=>kf,Source:()=>Rf,VideoController:()=>Wf,captureImage:()=>Df,hasPermission:()=>Lf,requestPermission:()=>Uf,scanBarCode:()=>zf,selectMedia:()=>Bf,viewImages:()=>jf});var J={};n.r(J),n.d(J,{hasPermission:()=>ip,isSupported:()=>sp,requestPermission:()=>ap,scanBarCode:()=>op});var K={};n.r(K),n.d(K,{isSupported:()=>fp,openChat:()=>lp,openGroupChat:()=>dp});var Q={};n.r(Q),n.d(Q,{isSupported:()=>vp,read:()=>hp,write:()=>mp});var Z={};n.r(Z),n.d(Z,{isNAAChannelRecommended:()=>wp});var X={};n.r(X),n.d(X,{chooseLocation:()=>bp,isSupported:()=>Ip,showLocation:()=>Ep});var Y={};n.r(Y),n.d(Y,{getCurrentLocation:()=>Tp,hasPermission:()=>Pp,isSupported:()=>Fp,map:()=>X,requestPermission:()=>Op});var ee={};n.r(ee),n.d(ee,{isSupported:()=>Lp,open:()=>Dp});var te={};n.r(te),n.d(te,{getLocation:()=>Hp,isSupported:()=>_p,showLocation:()=>Vp});var ne={};n.r(ne),n.d(ne,{setOptions:()=>Bp});var re={};n.r(re),n.d(re,{CallType:()=>Jp,EventActionSource:()=>Qp,MeetingReactionType:()=>qp,MeetingType:()=>Gp,SharingProtocol:()=>Kp,appShareButton:()=>ne,getAppContentStageSharingCapabilities:()=>sg,getAppContentStageSharingState:()=>lg,getAuthenticationTokenForAnonymousUser:()=>tg,getIncomingClientAudioState:()=>Zp,getLiveStreamState:()=>ng,getMeetingDetails:()=>Yp,getMeetingDetailsVerbose:()=>eg,joinMeeting:()=>pg,registerLiveStreamChangedHandler:()=>ig,registerMeetingReactionReceivedHandler:()=>fg,registerRaiseHandStateChangedHandler:()=>dg,registerSpeakingStateChangeHandler:()=>ug,requestAppAudioHandling:()=>gg,requestStartLiveStreaming:()=>rg,requestStopLiveStreaming:()=>og,shareAppContentToStage:()=>ag,stopSharingAppContentToStage:()=>cg,toggleIncomingClientAudio:()=>Xp,updateMicState:()=>vg});var oe={};n.r(oe),n.d(oe,{isSupported:()=>bg,openPurchaseExperience:()=>Sg});var ie={};n.r(ie),n.d(ie,{composeMeeting:()=>Ag,isSupported:()=>Tg,openCalendarItem:()=>Ig});var ae={};n.r(ae),n.d(ae,{ComposeMailType:()=>kg,composeMail:()=>Fg,isSupported:()=>Rg,openMailItem:()=>Og});var se={};n.r(se),n.d(se,{enablePrintCapability:()=>Ng,isSupported:()=>Vg,print:()=>xg,registerBeforeUnloadHandler:()=>Ug,registerBeforeUnloadHandlerHelper:()=>Hg,registerOnLoadHandler:()=>Dg,registerOnLoadHandlerHelper:()=>Lg});var ce={};n.r(ce),n.d(ce,{isSupported:()=>zg,selectPeople:()=>Bg});var le={};n.r(le),n.d(le,{isSupported:()=>Kg,showProfile:()=>Jg});var ue={};n.r(ue),n.d(ue,{closeSearch:()=>rm,isSupported:()=>nm,registerHandlers:()=>em,unregisterHandlers:()=>tm});var de={};n.r(de),n.d(de,{getContent:()=>am,isSupported:()=>sm});var fe={};n.r(fe),n.d(fe,{SharingAPIMessages:()=>um,history:()=>de,isSupported:()=>hm,shareWebContent:()=>dm});var pe={};n.r(pe),n.d(pe,{close:()=>wm,isSupported:()=>Cm});var ge={};n.r(ge),n.d(ge,{StageViewOpenMode:()=>Sm,isSupported:()=>Em,open:()=>bm,self:()=>pe});var me={};n.r(me),n.d(me,{captureImages:()=>Pm,isSupported:()=>Fm,retrieveImages:()=>Om});var he={};n.r(he),n.d(he,{CameraRestriction:()=>xm,Source:()=>Dm,hasPermission:()=>Lm,image:()=>me,requestPermission:()=>Um});var ve={};n.r(ve),n.d(ve,{isSupported:()=>zm,isWebStorageClearedOnUserLogOut:()=>Bm});var we={};n.r(we),n.d(we,{CallModalities:()=>qm,isSupported:()=>Jm,startCall:()=>Gm});var Ce={};n.r(Ce),n.d(Ce,{ExpectedFailureReason:()=>kr,FailedReason:()=>Rr,Messages:()=>Fr,notifyAppLoaded:()=>Qm,notifyExpectedFailure:()=>Ym,notifyFailure:()=>Xm,notifySuccess:()=>Zm});var ye={};n.r(ye),n.d(ye,{getDragAndDropFiles:()=>sh,isSupported:()=>lh});var Se={};n.r(Se),n.d(Se,{getSettings:()=>Hh,registerOnRemoveHandler:()=>Wh,registerOnSaveHandler:()=>_h,setSettings:()=>Vh,setValidityState:()=>Uh});var be={};n.r(be),n.d(be,{getDefaultSizeIfNotProvided:()=>Kh,startTask:()=>zh,submitTask:()=>qh,updateTask:()=>$h});var Ee={};n.r(Ee),n.d(Ee,{ContainerState:()=>Xh,LiveShareHost:()=>ev,UserMeetingRole:()=>Zh,isSupported:()=>Yh});var Ie={};n.r(Ie),n.d(Ie,{CartStatus:()=>hv,Intent:()=>mv,addOrUpdateCartItems:()=>wv,cartVersion:()=>gv,getCart:()=>vv,isSupported:()=>Sv,removeCartItems:()=>Cv,updateCartStatus:()=>yv});var Ae=n(815);const Te={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Pe;const Oe=new Uint8Array(16);function Fe(){if(!Pe&&(Pe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Pe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pe(Oe)}const Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function ke(e,t=0){return Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]}const Me=function(e,t,n){if(Te.randomUUID&&!t&&!e)return Te.randomUUID();const r=(e=e||{}).random||(e.rng||Fe)();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 ke(r)},Ne=/^(?:[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 xe=function(e){return"string"==typeof e&&Ne.test(e)};var De,Le,Ue,He,Ve,_e,We,Be,je,ze,$e,qe,Ge,Je,Ke,Qe,Ze;function Xe(e){return void 0!==(null==e?void 0:e.errorCode)}!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(De||(De={})),function(e){e.M365Content="m365content"}(Le||(Le={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Ue||(Ue={})),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"}(He||(He={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Ve||(Ve={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(_e||(_e={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(We||(We={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(Be||(Be={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(je||(je={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(ze||(ze={})),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"}($e||($e={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(qe||(qe={})),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"}(Ge||(Ge={})),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"}(Je||(Je={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(Ke||(Ke={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(Qe||(Qe={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Ze||(Ze={}));const Ye={errorCode:He.NOT_SUPPORTED_ON_PLATFORM},et={majorVersion:1,minorVersion:5},tt={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},nt=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),rt=new Error("Invalid response: Received more images than the specified max limit in the response."),ot=Object.prototype.toString,it="[object Uint8Array]",at="[object ArrayBuffer]",st={utf8:new globalThis.TextDecoder("utf8")};function ct(e,t,n){return!!e&&(e.constructor===t||ot.call(e)===n)}function lt(e){return ct(e,Uint8Array,it)}function ut(e){return ct(e,ArrayBuffer,at)}function dt(e){if("string"!=typeof e)throw new TypeError(`Expected \`string\`, got \`${typeof e}\``)}function ft(e){return dt(e),Uint8Array.from(globalThis.atob(pt(e)),(e=>{const t=e.codePointAt(0);if(void 0===t)throw new Error("Invalid character encountered");return t}))}function pt(e){return e.replaceAll("-","+").replaceAll("_","/")}function gt(e,t="utf8"){var n;return ht(e),null!==(n=st[t])&&void 0!==n||(st[t]=new globalThis.TextDecoder(t)),st[t].decode(e)}function mt(e){return dt(e),gt(ft(e))}function ht(e){if(!vt(e))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``)}function vt(e){return lt(e)||ut(e)}function wt(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function Ct(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 yt(){return Me()}function St(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&St(e[t])})),Object.freeze(e)}function bt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Et(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function It(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function At(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 Tt(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 Pt(e){return!(Ct(`${e.majorVersion}.${e.minorVersion}`,`${et.majorVersion}.${et.minorVersion}`)>=0)}function Ot(e){return"https:"===e.protocol}function Ft(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=mt(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=mt(t);n(new Blob([o],{type:e}))}))}function Rt(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 kt(){if(Mt())throw new Error("window object undefined at SSR check");return window}function Mt(){return"undefined"==typeof window}function Nt(e,t){if(Lt(e)||!Ut(e)||!Ht(e))throw t||new Error("id is not valid.")}function xt(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(!Ot(e))throw t||new Error("Url should be a valid https url")}function Dt(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Lt(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Ut(e){return e.length<256&&e.length>4}function Ht(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Vt(e){if(!e)throw new Error("id must not be empty");if(!1===xe(e))throw new Error("id must be a valid UUID")}const _t=!!performance&&"now"in performance;function Wt(){return _t?performance.now()+performance.timeOrigin:void 0}function Bt(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=>Bt(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=>Bt(e[n],t+1)))}class jt{constructor(e=yt()){this.uuid=e,Vt(e)}toString(){return this.uuid}}const zt=new jt,$t=Ae.debug.formatArgs;Ae.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${zt.toString()}]`,$t.call(this,e)};const qt=(0,Ae.debug)("teamsJs");function Gt(e){return qt.extend(e)}function Jt(e,t){return`${e}_${t}`}function Kt(e){return/^v\d+_[\w.]+$/.test(e)}const Qt=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 Zt="2.0.1",Xt="2.0.2",Yt="2.0.3",en="2.0.4",tn="2.0.1",nn="1.9.0",rn="2.0.0",on="1.7.0",an="1.8.0",sn="1.9.0",cn=n.t(Qt,2).validOrigins,ln=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),un=/^https:\/\//,dn="https",fn="teams.microsoft.com",pn="The library has not yet been initialized",gn="The runtime has not yet been initialized",mn="The runtime version is not supported",hn="The call was not properly started";class vn{}vn.initializeCalled=!1,vn.initializeCompleted=!1,vn.additionalValidOrigins=[],vn.initializePromise=void 0,vn.isFramelessWindow=!1,vn.frameContext=void 0,vn.hostClientType=void 0,vn.printCapabilityEnabled=!1;var wn=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 Cn=Gt("runtime"),yn=4;function Sn(e){return e.apiVersion===yn}const bn={apiVersion:-1,supports:{}};function En(e){if(Sn(e))return!0;throw-1===e.apiVersion?new Error(gn):new Error(mn)}let In=bn;const An={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:tt,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:{}}}},Tn=[$e.desktop,$e.web,$e.rigel,$e.surfaceHub,$e.teamsRoomsWindows,$e.teamsRoomsAndroid,$e.teamsPhones,$e.teamsDisplays],Pn=[$e.android,$e.ios,$e.ipados],On=[...Tn,...Pn];function Fn(e){let t=e;if(t.apiVersion<yn&&Rn.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),Sn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const Rn=[{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=wn(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})}}}],kn={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:Tn}],"1.9.0":[{capability:{location:{}},hostClientTypes:On}],"2.0.0":[{capability:{people:{}},hostClientTypes:On},{capability:{sharing:{}},hostClientTypes:[$e.desktop,$e.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[$e.android,$e.desktop,$e.ios,$e.teamsRoomsAndroid,$e.teamsPhones,$e.teamsDisplays,$e.web]},{capability:{webStorage:{}},hostClientTypes:[$e.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[$e.android,$e.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[$e.android,$e.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[$e.android,$e.ios,$e.ipados]}]},Mn=Cn.extend("generateBackCompatRuntimeConfig");function Nn(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]=Nn(e[r]||{},t[r]));return n}function xn(e,t,n){Mn("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);Mn("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{Ct(e,t)>=0&&n[t].forEach((e=>{void 0!==vn.hostClientType&&e.hostClientTypes.includes(vn.hostClientType)&&(r=Nn(r,e.capability))}))}));const o={apiVersion:yn,hostVersionsInfo:tt,isLegacyTeams:!0,supports:r};return Mn("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Dn=Cn.extend("applyRuntimeConfig");function Ln(e){"string"==typeof e.apiVersion&&(Dn("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Dn("Fast-forwarding runtime %o",e);const t=Fn(e);Dn("Applying runtime %o",t),In=St(t)}function Un(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Hn="2.32.0-beta.0",Vn=Gt("internal"),_n=Vn.extend("ensureInitializeCalled"),Wn=Vn.extend("ensureInitialized");function Bn(){if(!vn.initializeCalled)throw _n(pn),new Error(pn)}function jn(e,...t){if(!vn.initializeCompleted)throw Wn("%s. initializeCalled: %s",pn,vn.initializeCalled.toString()),new Error(pn);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===vn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${vn.frameContext}".`)}return En(e)}function zn(e=Zt){const t=Ct(vn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function $n(){return vn.hostClientType==$e.android||vn.hostClientType==$e.ios||vn.hostClientType==$e.ipados}function qn(e=Zt){if(!$n()){throw{errorCode:He.NOT_SUPPORTED_ON_PLATFORM}}if(!zn(e)){throw{errorCode:He.OLD_PLATFORM}}}function Gn(e){let t=vn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&un.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),vn.additionalValidOrigins=t}function Jn(e){if(Lt(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(!Zn(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Kn}-${Qn}).`);if(Xn(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Kn=4,Qn=256;function Zn(e){return e.length<Qn&&e.length>Kn}function Xn(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Yn(e){if(!(e instanceof er))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class er{constructor(e){this.appIdAsString=e,Jn(e)}serialize(){return this.toString()}toString(){return this.appIdAsString}}function tr(e){return null==e}var nr=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 rr=[];const or=Gt("validateOrigin");function ir(){return nr(this,void 0,void 0,(function*(){yield sr()}))}function ar(){return 0===rr.length}function sr(){return nr(this,void 0,void 0,(function*(){return ar()?Mt()?(rr=cn,cn):fetch(ln).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(cr(JSON.stringify(e)))return rr=e.validOrigins,rr;throw new Error("Valid Origins List Is Invalid")}))})).catch((e=>(or("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),rr=cn,rr))):rr}))}function cr(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 or("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function lr(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 ur(e){return sr().then((t=>{if(!Ot(e))return or("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=>lr(e,n))))return!0;for(const e of vn.additionalValidOrigins){if(lr("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return or("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,vn.additionalValidOrigins),!1}))}var dr=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 fr;const pr="v1",gr=Gt("messageChannels.telemetry");function mr(){return dr(this,void 0,void 0,(function*(){if(fr)return gr("Returning telemetry port from cache"),fr;if(!hr())throw Ye;return fr=yield bs(Jt(pr,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),fr}))}function hr(){var e;return!(!jn(In)||!(null===(e=In.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function vr(){fr=void 0}var wr=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 Cr;const yr="v1",Sr=Gt("messageChannels.dataLayer");function br(){return wr(this,void 0,void 0,(function*(){if(Cr)return Sr("Returning dataLayer port from cache"),Cr;if(!Er())throw Ye;return Cr=yield bs(Jt(yr,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),Cr}))}function Er(){var e;return!(!jn(In)||!(null===(e=In.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Ir(){Cr=void 0}function Ar(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");jn(In),Ka(e)}function Tr(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");jn(In),Qa(e)}const Pr="v2",Or=Gt("app"),Fr={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Rr,kr;function Mr(){return vn.initializeCompleted}function Nr(){return vn.frameContext}function xr(e){return ir(),Ii(Jt(Pr,"app.initialize"),e)}function Dr(e){us.currentWindow=e}function Lr(){vn.initializeCalled&&(Na(),vn.initializeCalled=!1,vn.initializeCompleted=!1,vn.initializePromise=void 0,vn.additionalValidOrigins=[],vn.frameContext=void 0,vn.hostClientType=void 0,vn.isFramelessWindow=!1,vr(),Ir(),ps())}function Ur(){return new Promise((e=>{Bn(),e(gs(Jt(Pr,"app.getContext"),"getContext"))})).then((e=>$r(e)))}function Hr(){Bn(),Ai(Jt(Pr,"app.notifyAppLoaded"))}function Vr(){return Oi(Jt(Pr,"app.notifySuccess"))}function _r(e){Bn(),Pi(Jt(Pr,"app.notifyFailure"),e)}function Wr(e){Bn(),Ti(Jt(Pr,"app.notifyExpectedFailure"),e)}function Br(e){Ni(Jt(Pr,"app.registerOnThemeChangeHandler"),e)}function jr(e){Ba(e)}function zr(e){return xi(Jt(Pr,"app.openLink"),e)}function $r(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:qe.teams,clientType:e.hostClientType?e.hostClientType:$e.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:vn.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"}(Rr||(Rr={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(kr||(kr={})),Or("teamsjs instance is version %s, starting at %s UTC (%s local)",Hn,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(Mt())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?Or("teamsjs is being used from %s. %s",t,n):Or("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const qr="v1",Gr="v2";let Jr,Kr,Qr;function Zr(){La(Jt(qr,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",fo,!1),La(Jt(qr,"authentication.registerAuthenticateFailureHandler"),"authentication.authenticate.failure",po,!1)}function Xr(e){Qr=e}function Yr(e){const t=void 0!==e,n=t?e:Qr;if(!n)throw new Error("No parameters are provided for authentication");jn(In,Ge.content,Ge.sidePanel,Ge.settings,Ge.remove,Ge.task,Ge.stage,Ge.meetingStage);return eo(n.successCallback||n.failureCallback?Jt(qr,"authentication.authenticate"):Jt(Gr,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Qr=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Qr=void 0)}}))}function eo(e,t){return new Promise(((n,r)=>{if(vn.hostClientType!==$e.web){const r=Dt(t.url);xt(r),n(ws(e,"authentication.authenticate",[r.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)})))}else Jr={success:n,fail:r},ao(t)}))}function to(e){Bn();return no(e&&(e.successCallback||e.failureCallback)?Jt(qr,"authentication.getAuthToken"):Jt(Gr,"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 no(e,t){return new Promise((n=>{n(ws(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 ro(e){Bn();return oo(e&&(e.successCallback||e.failureCallback)?Jt(qr,"authentication.getUser"):Jt(Gr,"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 oo(e){return new Promise((t=>{t(ws(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function io(){so();try{us.childWindow&&us.childWindow.close()}finally{us.childWindow=null,us.childOrigin=null}}function ao(e){io();let t=e.width||600,n=e.height||400;t=Math.min(t,us.currentWindow.outerWidth-400),n=Math.min(n,us.currentWindow.outerHeight-200);const r=Dt(e.url.replace("{oauthRedirectMethod}","web"));xt(r);let o=void 0!==us.currentWindow.screenLeft?us.currentWindow.screenLeft:us.currentWindow.screenX,i=void 0!==us.currentWindow.screenTop?us.currentWindow.screenTop:us.currentWindow.screenY;o+=us.currentWindow.outerWidth/2-t/2,i+=us.currentWindow.outerHeight/2-n/2,us.childWindow=us.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),us.childWindow?co():po("FailedToOpenWindow")}function so(){Kr&&(clearInterval(Kr),Kr=0),Ua("initialize"),Ua("navigateCrossDomain")}function co(){so(),Kr=us.currentWindow.setInterval((()=>{if(!us.childWindow||us.childWindow.closed)po("CancelledByUser");else{const e=us.childOrigin;try{us.childOrigin="*",tc("ping")}finally{us.childOrigin=e}}}),100),La(Jt(qr,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[Ge.authentication,vn.hostClientType])),La(Jt(qr,"authentication.authenticationWindow.registerNavigateCrossDomainHandler"),"navigateCrossDomain",(()=>!1))}function lo(e,t){jn(In,Ge.authentication);As(Jt(t?qr:Gr,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Ys(us.parentWindow,(()=>setTimeout((()=>us.currentWindow.close()),200)))}function uo(e,t){jn(In,Ge.authentication);As(Jt(t?qr:Gr,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Ys(us.parentWindow,(()=>setTimeout((()=>us.currentWindow.close()),200)))}function fo(e){try{Jr&&Jr.success(e)}finally{Jr=void 0,io()}}function po(e){try{Jr&&Jr.fail(new Error(e))}finally{Jr=void 0,io()}}var go;function mo(e){Fo(Jt(Oo,"dialog.update.resize"),e)}function ho(){return!(!jn(In)||!In.supports.dialog)&&!!In.supports.dialog.update}function vo(e,t,n){ko(Jt(Oo,"dialog.url.bot.open"),e,t,n)}function wo(){return jn(In)&&void 0!==(In.supports.dialog&&In.supports.dialog.url&&In.supports.dialog.url.bot)}function Co(e){if(jn(In,Ge.task),!bo())throw Ye;As(Jt(Oo,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function yo(e){if(jn(In,Ge.content,Ge.sidePanel,Ge.meetingStage),!bo())throw Ye;As(Jt(Oo,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function So(e){if(jn(In,Ge.task),!bo())throw Ye;for(Ua("messageForChild"),La(Jt(Oo,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),Do.reverse();Do.length>0;){e(Do.pop())}}function bo(){var e,t;return jn(In)&&!!(null===(t=null===(e=In.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Eo(e,t,n){Ro(Jt(Oo,"dialog.url.open"),e,t,n)}function Io(e,t){Mo(Jt(Oo,"dialog.url.submit"),e,t)}function Ao(){return jn(In)&&void 0!==(In.supports.dialog&&In.supports.dialog.url)}function To(e){return{url:e.url,height:e.size?e.size.height:Qe.Small,width:e.size?e.size.width:Qe.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Po(e){const t=To(e);return t.completionBotId=e.completionBotId,t}!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(go||(go={}));const Oo="v2";function Fo(e,t){if(jn(In,Ge.content,Ge.sidePanel,Ge.task,Ge.meetingStage),!ho())throw Ye;As(e,"tasks.updateTask",[t])}function Ro(e,t,n,r){if(jn(In,Ge.content,Ge.sidePanel,Ge.meetingStage),!Ao())throw Ye;r&&La(Jt(Oo,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);As(e,"tasks.startTask",[To(t)],((e,t)=>{null==n||n({err:e,result:t}),Ua("messageForParent")}))}function ko(e,t,n,r){if(jn(In,Ge.content,Ge.sidePanel,Ge.meetingStage),!wo())throw Ye;r&&La(Jt(Oo,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);As(e,"tasks.startTask",[Po(t)],((e,t)=>{null==n||n({err:e,result:t}),Ua("messageForParent")}))}function Mo(e,t,n){if(jn(In,Ge.task),!Ao())throw Ye;As(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function No(e){return{card:e.card,height:e.size?e.size.height:Qe.Small,width:e.size?e.size.width:Qe.Small,title:e.title}}function xo(e){const t=No(e);return t.completionBotId=e.completionBotId,t}const Do=[];function Lo(e){vn.frameContext&&(vn.frameContext===Ge.task?Do.push(e):Ua("messageForChild"))}function Uo(e,t){if(jn(In,Ge.content,Ge.sidePanel,Ge.meetingStage),!Ho())throw Ye;const n=xo(e);As(Jt(Oo,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function Ho(){const e=In.hostVersionsInfo&&In.hostVersionsInfo.adaptiveCardSchemaVersion&&!Pt(In.hostVersionsInfo.adaptiveCardSchemaVersion);return jn(In)&&void 0!==(e&&In.supports.dialog&&In.supports.dialog.card&&In.supports.dialog.card.bot)}function Vo(e,t){if(jn(In,Ge.content,Ge.sidePanel,Ge.meetingStage),!_o())throw Ye;const n=No(e);As(Jt(Oo,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function _o(){const e=In.hostVersionsInfo&&In.hostVersionsInfo.adaptiveCardSchemaVersion&&!Pt(In.hostVersionsInfo.adaptiveCardSchemaVersion);return jn(In)&&void 0!==(e&&In.supports.dialog&&In.supports.dialog.card)}function Wo(){La(Jt(Oo,"dialog.registerMessageForChildHandler"),"messageForChild",Lo,!1)}function Bo(){return!(!jn(In)||!In.supports.dialog)}const jo="v2";var zo,$o;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(zo||(zo={}));class qo{constructor(){this.enabled=!0,this.selected=!1}}let Go,Jo,Ko,Qo,Zo;function Xo(){La(Jt(jo,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",ni,!1),La(Jt(jo,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",oi,!1),La(Jt(jo,"menus.registerSetModuleViewHandler"),"setModuleView",ei,!1)}function Yo(e,t){if(jn(In),!ii())throw Ye;Ko=t,As(Jt(jo,"menus.setUpViews"),"setUpViews",[e])}function ei(e){Ko&&Ko(e)||(jn(In),As(Jt(jo,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function ti(e,t){if(jn(In),!ii())throw Ye;Go=t,As(Jt(jo,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function ni(e){Go&&Go(e)||(jn(In),As(Jt(jo,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function ri(e,t){if(jn(In),!ii())throw Ye;Jo=t,As(Jt(jo,"menus.showActionMenu"),"showActionMenu",[e])}function oi(e){Jo&&Jo(e)||(jn(In),As(Jt(jo,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function ii(){return!(!jn(In)||!In.supports.menus)}function ai(){La(Jt(sa,"pages.config.registerSettingsSaveHandler"),"settings.save",pi,!1),La(Jt(sa,"pages.config.registerSettingsRemoveHandler"),"settings.remove",hi,!1)}function si(e){return ha(Jt(sa,"pages.config.setValidityState"),e)}function ci(e){return wa(Jt(sa,"pages.config.setConfig"),e)}function li(e){ui(Jt(sa,"pages.config.registerOnSaveHandler"),e,(()=>{if(!tr(e)&&!wi())throw Ye}))}function ui(e,t,n){!tr(t)&&jn(In,Ge.settings),n&&n(),Qo=t,!tr(t)&&As(e,"registerHandler",["save"])}function di(e){fi(Jt(sa,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!tr(e)&&!wi())throw Ye}))}function fi(e,t,n){!tr(t)&&jn(In,Ge.remove,Ge.settings),n&&n(),Zo=t,!tr(t)&&As(e,"registerHandler",["remove"])}function pi(e){const t=new mi(e);Qo?Qo(t):us.childWindow?tc("settings.save",[e]):t.notifySuccess()}function gi(e){Va(Jt(sa,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[Ge.content],(()=>{if(!wi())throw Ye}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}($o||($o={}));class mi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),As(Jt(sa,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),As(Jt(sa,"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 hi(){const e=new vi;Zo?Zo(e):us.childWindow?tc("settings.remove",[]):e.notifySuccess()}class vi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),As(Jt(sa,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),As(Jt(sa,"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 wi(){return!(!jn(In)||!In.supports.pages)&&!!In.supports.pages.config}class Ci{}class yi extends Ci{validate(e){return!0}deserialize(e){return e}}var Si=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 bi=6e4,Ei=Gt("app");function Ii(e,t){if(Mt()){return Ei.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return At((()=>Mi(e,t)),bi,new Error("SDK initialization timed out."))}function Ai(e){As(e,Fr.AppLoaded,[Hn])}function Ti(e,t){As(e,Fr.ExpectedFailure,[t.reason,t.message])}function Pi(e,t){As(e,Fr.Failure,[t.reason,t.message])}function Oi(e){return Si(this,void 0,void 0,(function*(){if(vn.initializeCompleted)return Ri(e);if(!vn.initializePromise)throw new Error(pn);return vn.initializePromise.then((()=>Ri(e)))}))}function Fi(){var e;return jn(In)&&!!(null===(e=In.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Ri(e){return Si(this,void 0,void 0,(function*(){return Fi()?ys(Fr.Success,[Hn],new yi,e).then((()=>({hasFinishedSuccessfully:!0}))):(As(e,Fr.Success,[Hn]),{hasFinishedSuccessfully:"unknown"})}))}const ki=Ei.extend("initializeHelper");function Mi(e,t){return new Promise((n=>{vn.initializeCalled||(vn.initializeCalled=!0,Ma(),vn.initializePromise=fs(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Zt})=>{vn.frameContext=e,vn.hostClientType=t,vn.clientSupportedSDKVersion=r;try{ki("Parsing %s",n);const e=JSON.parse(n);if(ki("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{ki("Attempting to parse %s as an SDK version",n),isNaN(Ct(n,Zt))||(vn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(ki("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(xn(vn.clientSupportedSDKVersion,An,kn))}}vn.initializeCompleted=!0})),Zr(),Xo(),ai(),Wo()),Array.isArray(t)&&Gn(t),void 0!==vn.initializePromise?n(vn.initializePromise):ki("GlobalVars.initializePromise is unexpectedly undefined")}))}function Ni(e,t){!tr(t)&&Bn(),_a(e,t)}function xi(e,t){return new Promise((n=>{jn(In,Ge.content,Ge.sidePanel,Ge.settings,Ge.task,Ge.stage,Ge.meetingStage),n(ms(e,"executeDeepLink",t))}))}function Di(e){Va(Jt(sa,"pages.appButton.onClick"),"appButtonClick",e,[Ge.content],(()=>{if(!Hi())throw Ye}))}function Li(e){Va(Jt(sa,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[Ge.content],(()=>{if(!Hi())throw Ye}))}function Ui(e){Va(Jt(sa,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[Ge.content],(()=>{if(!Hi())throw Ye}))}function Hi(){return!(!jn(In)||!In.supports.pages)&&!!In.supports.pages.appButton}function Vi(e){return new Promise((t=>{if(jn(In,Ge.content,Ge.sidePanel,Ge.settings,Ge.task,Ge.stage,Ge.meetingStage),!Wi())throw Ye;t(vs(Jt(sa,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function _i(){return new Promise((e=>{if(jn(In,Ge.content,Ge.sidePanel,Ge.settings,Ge.task,Ge.stage,Ge.meetingStage),!Wi())throw Ye;e(vs(Jt(sa,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function Wi(){return!(!jn(In)||!In.supports.pages)&&!!In.supports.pages.currentApp}function Bi(){if(jn(In,Ge.content),!zi())throw Ye;As(Jt(sa,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function ji(){if(jn(In,Ge.content),!zi())throw Ye;As(Jt(sa,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function zi(){return!(!jn(In)||!In.supports.pages)&&!!In.supports.pages.fullTrust}function $i(e){return ua(Jt(sa,"pages.tabs.navigateToTab"),e)}function qi(e){return fa(Jt(sa,"pages.tabs.getTabInstances"),e)}function Gi(e){return pa(Jt(sa,"pages.tabs.getMruTabInstances"),e)}function Ji(){return!(!jn(In)||!In.supports.pages)&&!!In.supports.pages.tabs}var Ki,Qi;function Zi(e){const t=Jt(sa,"pages.returnFocus");if(jn(In),!aa())throw Ye;if(void 0===e&&As(t,"returnFocus",[!1]),"boolean"==typeof e)As(t,"returnFocus",[e]);else switch(e){case Qi.PreviousLandmark:case Qi.GoToActivityFeed:As(t,"returnFocus",[!1,e]);break;case Qi.NextLandmark:As(t,"returnFocus",[!0,e])}}function Xi(e){Va(Jt(sa,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!aa())throw Ye}))}function Yi(e){ma(Jt(sa,"pages.setCurrentFrame"),e)}function ea(e,t,n){ir(),Ii(Jt(sa,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Yi(e)}function ta(){return va(Jt(sa,"pages.getConfig."))}function na(e){return ca(Jt(sa,"pages.navigateCrossDomain"),e)}function ra(e){return new Promise((t=>{if(jn(In,Ge.content,Ge.sidePanel,Ge.settings,Ge.task,Ge.stage,Ge.meetingStage),!aa())throw Ye;const n=Jt(sa,"pages.navigateToApp");if(In.isLegacyTeams){t(ms(n,"executeDeepLink",Tt(Ca(e)?e:ya(e))))}else{t(ms(n,"pages.navigateToApp",Ca(e)?Sa(e):e))}}))}function oa(e){return ga(Jt(sa,"pages.shareDeepLink"),e)}function ia(e){Va(Jt(sa,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!tr(e)&&!aa())throw Ye}))}function aa(){return!(!jn(In)||!In.supports.pages)}!function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Ki||(Ki={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Qi||(Qi={}));const sa="v2";function ca(e,t){return new Promise((n=>{if(jn(In,Ge.content,Ge.sidePanel,Ge.settings,Ge.remove,Ge.task,Ge.stage,Ge.meetingStage),!aa())throw Ye;n(hs(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function la(e){return new Promise((t=>{if(jn(In),!Oa())throw Ye;t(hs(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function ua(e,t){return new Promise((n=>{if(jn(In),!Ji())throw Ye;n(hs(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function da(e,t){if(jn(In),!aa())throw Ye;As(e,"returnFocus",[t])}function fa(e,t){return new Promise((n=>{if(jn(In),!Ji())throw Ye;n(gs(e,"getTabInstances",t))}))}function pa(e,t){return new Promise((n=>{if(jn(In),!Ji())throw Ye;n(gs(e,"getMruTabInstances",t))}))}function ga(e,t){if(jn(In,Ge.content,Ge.sidePanel,Ge.meetingStage),!aa())throw Ye;As(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ma(e,t){if(jn(In,Ge.content),!aa())throw Ye;As(e,"setFrameContext",[t])}function ha(e,t){if(jn(In,Ge.settings,Ge.remove),!wi())throw Ye;As(e,"settings.setValidityState",[t])}function va(e){return new Promise((t=>{if(jn(In,Ge.content,Ge.settings,Ge.remove,Ge.sidePanel),!aa())throw Ye;t(gs(e,"settings.getSettings"))}))}function wa(e,t){return new Promise((n=>{if(jn(In,Ge.content,Ge.settings,Ge.sidePanel),!wi())throw Ye;n(ms(e,"settings.setSettings",t))}))}function Ca(e){return e.appId instanceof er}function ya(e){return Object.assign(Object.assign({},e),{appId:new er(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function Sa(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let ba;function Ea(){La(Jt(sa,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Pa,!1)}function Ia(){return la(Jt(sa,"pages.backStack.navigateBack"))}function Aa(e){Ta(Jt(sa,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!tr(e)&&!Oa())throw Ye}))}function Ta(e,t,n){!tr(t)&&jn(In),n&&n(),ba=t,!tr(t)&&As(e,"registerHandler",["backButton"])}function Pa(){ba&&ba()||(us.childWindow?tc("backButtonPress",[]):Ia())}function Oa(){return!(!jn(In)||!In.supports.pages)&&!!In.supports.pages.backStack}var Fa=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 Ra=Gt("handlers");class ka{static initializeHandlers(){ka.handlers.themeChange=Wa,ka.handlers.load=$a,ka.handlers.beforeUnload=Ja,Ea()}static uninitializeHandlers(){ka.handlers={},ka.themeChangeHandler=null,ka.loadHandler=null,ka.beforeUnloadHandler=null,ka.beforeSuspendOrTerminateHandler=null,ka.resumeHandler=null}}function Ma(){ka.initializeHandlers()}function Na(){ka.uninitializeHandlers()}ka.handlers={},ka.themeChangeHandler=null,ka.loadHandler=null,ka.beforeUnloadHandler=null,ka.beforeSuspendOrTerminateHandler=null,ka.resumeHandler=null,ka.hostToAppPerformanceMetricsHandler=null;const xa=Ra.extend("callHandler");function Da(e,t){const n=ka.handlers[e];if(n){xa("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return us.childWindow?(tc(e,t),[!1,void 0]):(xa("Handler for action message %s not found.",e),[!1,void 0])}function La(e,t,n,r=!0,o=[]){n?(ka.handlers[t]=n,r&&As(e,"registerHandler",[t,...o])):delete ka.handlers[t]}function Ua(e){delete ka.handlers[e]}function Ha(e){return null!=ka.handlers[e]}function Va(e,t,n,r,o){n&&jn(In,...r),o&&o(),La(e,t,n)}function _a(e,t){ka.themeChangeHandler=t,!tr(t)&&As(e,"registerHandler",["themeChange"])}function Wa(e){ka.themeChangeHandler&&ka.themeChangeHandler(e),us.childWindow&&tc("themeChange",[e])}function Ba(e){ka.hostToAppPerformanceMetricsHandler=e}function ja(e){ka.hostToAppPerformanceMetricsHandler&&ka.hostToAppPerformanceMetricsHandler(e)}function za(e,t){ka.loadHandler=t,!tr(t)&&As(e,"registerHandler",["load"])}function $a(e){const t=qa(e);ka.resumeHandler?(ka.resumeHandler(t),us.childWindow&&tc("load",[t])):ka.loadHandler&&(ka.loadHandler(e),us.childWindow&&tc("load",[e]))}function qa(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Ga(e,t){ka.beforeUnloadHandler=t,!tr(t)&&As(e,"registerHandler",["beforeUnload"])}function Ja(){return Fa(this,void 0,void 0,(function*(){const e=()=>{As(Jt("v2","handleBeforeUnload"),"readyToUnload",[])};ka.beforeSuspendOrTerminateHandler?(yield ka.beforeSuspendOrTerminateHandler(),us.childWindow?tc("beforeUnload"):e()):ka.beforeUnloadHandler&&ka.beforeUnloadHandler(e)||(us.childWindow?tc("beforeUnload"):e())}))}function Ka(e){ka.beforeSuspendOrTerminateHandler=e,!tr(e)&&As(Jt("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Qa(e){ka.resumeHandler=e,!tr(e)&&As(Jt("v2","registerOnResumeHandler"),"registerHandler",["load"])}class Za{static storeCallbackInformation(e,t){Za.callbackInformation.set(e,t)}static clearMessages(){Za.callbackInformation.clear()}static deleteMessageInformation(e){Za.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?ja({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=Za.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(ja({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Za.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Za.callbackInformation=new Map;var Xa=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 Ya=e=>{const{uuid:t}=e,n=Xa(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},es=e=>{const{uuidAsString:t}=e,n=Xa(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new jt(t):void 0})},ts=e=>{const{uuidAsString:t}=e,n=Xa(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new jt(t):void 0})},ns=e=>{const{uuid:t}=e,n=Xa(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},rs=Gt("nestedAppAuthUtils"),os=rs.extend("tryPolyfillWithNestedAppAuthBridge");function is(e,t,n){var r;const o=os;if(vn.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=ss(a,n);s&&(a.nestedAppAuthBridge=s)}const as=rs.extend("createNestedAppAuthBridge");function ss(e,t){const n=as;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 cs=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 ls=Gt("communication");class us{}class ds{}function fs(e,t){if(ds.messageListener=e=>Ns(e),us.currentWindow=us.currentWindow||kt(),us.parentWindow=us.currentWindow.parent!==us.currentWindow.self?us.currentWindow.parent:us.currentWindow.opener,us.topWindow=us.currentWindow.top,(us.parentWindow||e)&&us.currentWindow.addEventListener("message",ds.messageListener,!1),!us.parentWindow){const e=us.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));vn.isFramelessWindow=!0,e.onNativeMessage=js}try{return us.parentOrigin="*",ws(t,"initialize",[Hn,yn,e]).then((([e,t,n,r])=>(is(r,us.currentWindow,{onMessage:Ds,sendPostMessage:Ps}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{us.parentOrigin=null}}function ps(){us.currentWindow&&us.currentWindow.removeEventListener("message",ds.messageListener,!1),us.currentWindow=null,us.parentWindow=null,us.parentOrigin=null,us.childWindow=null,us.childOrigin=null,ds.parentMessageQueue=[],ds.childMessageQueue=[],ds.nextMessageId=0,ds.callbacks.clear(),ds.promiseCallbacks.clear(),ds.portCallbacks.clear(),ds.legacyMessageIdsToUuidMap={},Za.clearMessages()}function gs(e,t,...n){return ws(e,t,n).then((([e])=>e))}function ms(e,t,...n){return ws(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function hs(e,t,n,...r){return ws(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function vs(e,t,...n){return ws(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function ws(e,t,n=void 0){if(!Kt(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(Is(ks(e,t,n).uuid))}))}function Cs(e){return e.map((e=>Un(e)?e.serialize():e))}function ys(e,t,n,r,o){var i;return cs(this,void 0,void 0,(function*(){const a=Cs(t),[s]=yield ws(r,e,a);if(o&&o(s)||!o&&Xe(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(`${He.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function Ss(e,t,n,r){var o;return cs(this,void 0,void 0,(function*(){const i=Cs(t),[a]=yield ws(n,e,i);if(r&&r(a)||!r&&Xe(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${He.INTERNAL_ERROR}, message: Invalid response from host`)}))}function bs(e,t,n=void 0){if(!Kt(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 Es(ks(e,t,n).uuid)}function Es(e){return new Promise(((t,n)=>{ds.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 Is(e){return new Promise((t=>{ds.promiseCallbacks.set(e,t)}))}function As(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!Kt(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=ks(e,t,o);r&&ds.callbacks.set(i.uuid,r)}ds.parentMessageQueue=[],ds.childMessageQueue=[],ds.topMessageQueue=[],ds.nextMessageId=0,ds.callbacks=new Map,ds.promiseCallbacks=new Map,ds.portCallbacks=new Map,ds.legacyMessageIdsToUuidMap={};const Ts=ls.extend("sendNestedAuthRequestToTopWindow");function Ps(e){const t=Ts,n=us.topWindow,r=rc(e);return t("Message %s information: %o",ac(r),{actionName:r.func}),Fs(n,r)}const Os=ls.extend("sendRequestToTargetWindowHelper");function Fs(e,t){const n=Os,r=Qs(e),o=Ya(t);if(vn.isFramelessWindow)us.currentWindow&&us.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",ac(o),r),us.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Ks(e);e&&i?(n("Sending message %s to %s via postMessage",ac(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",ac(o),r),Js(e).push(t))}return t}const Rs=ls.extend("sendMessageToParentHelper");function ks(e,t,n){const r=Rs,o=us.parentWindow,i=nc(e,t,n);return Za.storeCallbackInformation(i.uuid,{name:t,calledAt:i.timestamp}),r("Message %s information: %o",ac(i),{actionName:t,args:n}),Fs(o,i)}const Ms=ls.extend("processIncomingMessage");function Ns(e){return cs(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void Ms("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 Us(t,n).then((r=>{r?(Hs(t,n),t===us.parentWindow?js(e):t===us.childWindow&&qs(e)):Ms("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 xs=ls.extend("processAuthBridgeMessage");function Ds(e,t){var n,r;const o=xs;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?Us(c,l)?(us.topWindow&&!us.topWindow.closed&&c!==us.topWindow||(us.topWindow=c,us.topOrigin=l),us.topWindow&&us.topWindow.closed&&(us.topWindow=null,us.topOrigin=null),Xs(us.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=ls.extend("shouldProcessIncomingMessage");function Us(e,t){return cs(this,void 0,void 0,(function*(){if(us.currentWindow&&e===us.currentWindow)return Ls("Should not process message because it is coming from the current window"),!1;if(us.currentWindow&&us.currentWindow.location&&t&&t===us.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 ur(e);return n||Ls("Message has an invalid origin of %s",t),n}}))}function Hs(e,t){vn.isFramelessWindow||us.parentWindow&&!us.parentWindow.closed&&e!==us.parentWindow?us.childWindow&&!us.childWindow.closed&&e!==us.childWindow||(us.childWindow=e,us.childOrigin=t):(us.parentWindow=e,us.parentOrigin=t),us.parentWindow&&us.parentWindow.closed&&(us.parentWindow=null,us.parentOrigin=null),us.childWindow&&us.childWindow.closed&&(us.childWindow=null,us.childOrigin=null),Xs(us.parentWindow),Xs(us.childWindow)}const Vs=ls.extend("handleIncomingMessageFromParent");function _s(e){const t=Vs;if(!e.uuid)return ds.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Ws(ds.callbacks,t);if(n)return n;const r=Ws(ds.promiseCallbacks,t);if(r)return r;const o=Ws(ds.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",ac(e))}function Ws(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Bs(e,t){const n=Ws(t,e.uuid);n&&t.delete(n),e.uuid?ds.legacyMessageIdsToUuidMap={}:delete ds.legacyMessageIdsToUuidMap[e.id]}function js(e){const t=Vs,n=Wt();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=ts(r),i=_s(o);if(i){const r=ds.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Za.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]),zs(e)||(t("Removing registered callback for message %s",i.toString()),Bs(o,ds.callbacks)));const a=ds.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()),Bs(o,ds.promiseCallbacks));const s=ds.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()),Bs(o,ds.portCallbacks)}o.uuid&&(ds.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Za.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',ac(r),r.func),Da(r.func,r.args)}else t("Received an unknown message: %O",e)}function zs(e){return!0===e.data.isPartialResponse}const $s=ls.extend("handleIncomingMessageFromChild");function qs(e){if("id"in e.data&&"func"in e.data){const t=es(e.data),[n,r]=Da(t.func,t.args);n&&void 0!==r?($s("Returning message %s from child back to child, action: %s.",ac(t),t.func),ec(t.id,t.uuid,Array.isArray(r)?r:[r])):($s("Relaying message %s from child to parent, action: %s. Relayed message will have a new id.",ac(t),t.func),As(Jt("v2","tasks.startTask"),t.func,t.args,((...e)=>{if(us.childWindow){const n=e.pop();$s("Message from parent being relayed to child, id: %s",ac(t)),ec(t.id,t.uuid,e,n)}})))}}function Gs(){return us.topWindow!==us.parentWindow}function Js(e){return e===us.topWindow&&Gs()?ds.topMessageQueue:e===us.parentWindow?ds.parentMessageQueue:e===us.childWindow?ds.childMessageQueue:[]}function Ks(e){return e===us.topWindow&&Gs()?us.topOrigin:e===us.parentWindow?us.parentOrigin:e===us.childWindow?us.childOrigin:null}function Qs(e){return e===us.topWindow&&Gs()?"top":e===us.parentWindow?"parent":e===us.childWindow?"child":null}const Zs=ls.extend("flushMessageQueue");function Xs(e){const t=Ks(e),n=Js(e),r=Qs(e);for(;e&&t&&n.length>0;){const o=n.shift();if(o){const n=Ya(o);Zs("Flushing message %s from %s message queue via postMessage.",ac(n),r),e.postMessage(n,t)}}}function Ys(e,t){let n;n=us.currentWindow.setInterval((()=>{0===Js(e).length&&(clearInterval(n),t())}),100)}function ec(e,t,n,r){const o=us.childWindow,i=oc(e,t,n,r),a=ns(i),s=Ks(o);o&&s&&o.postMessage(a,s)}function tc(e,t){const n=us.childWindow,r=ic(e,t),o=Ks(n);n&&o?n.postMessage(r,o):Js(n).push(r)}function nc(e,t,n){const r=ds.nextMessageId++,o=new jt;return ds.legacyMessageIdsToUuidMap[r]=o,{id:r,uuid:o,func:t,timestamp:Date.now(),monotonicTimestamp:Wt(),args:n||[],apiVersionTag:e}}function rc(e){const t=ds.nextMessageId++,n=new jt;return ds.legacyMessageIdsToUuidMap[t]=n,{id:t,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Wt(),args:[],data:e}}function oc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function ic(e,t){return{func:e,args:t||[]}}function ac(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 sc="v1";function cc(e){if(!tr(e)&&jn(In),!tr(e)&&!lc())throw Ye;e?La(Jt(sc,"log.request"),"log.request",(()=>{const t=e();As(Jt(sc,"log.receive"),"log.receive",[t])})):Ua("log.request")}function lc(){return!(!jn(In)||!In.supports.logs)}var uc,dc,fc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(uc||(uc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(dc||(dc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(fc||(fc={}));const pc="v1";function gc(e,t){jn(In),As(Jt(pc,"uploadCustomApp"),"uploadCustomApp",[e],t||wt())}function mc(e,t,n){jn(In),As(Jt(pc,"sendCustomMessage"),e,t,n)}function hc(e,t){if(jn(In),!us.childWindow)throw new Error("The child window has not yet been initialized or is not present");tc(e,t)}function vc(e,t){jn(In),La(Jt(pc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function wc(e,t){jn(In),La(Jt(pc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Cc(e){jn(In,Ge.content,Ge.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];As(Jt(pc,"openFilePreview"),"openFilePreview",t)}const yc="v1";function Sc(e){return new Promise((t=>{if(jn(In,Ge.content),!Ic())throw Ye;const n=ms(Jt(yc,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&La(Jt(yc,"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(Jt(yc,"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 bc(){if(jn(In,Ge.content),!Ic())throw Ye;As(Jt(yc,"conversations.closeConversation"),"conversations.closeConversation"),Ua("startConversation"),Ua("closeConversation")}function Ec(){return new Promise((e=>{if(jn(In),!Ic())throw Ye;e(gs(Jt(yc,"conversations.getChatMember"),"getChatMembers"))}))}function Ic(){return!(!jn(In)||!In.supports.conversations)}var Ac=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 Tc="v2",Pc=Gt("copilot");function Oc(){var e,t;return jn(In)&&(!!(null===(e=In.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=In.supports.copilot)||void 0===t?void 0:t.eligibility))}function Fc(){var e,t;return Ac(this,void 0,void 0,(function*(){if(jn(In),!Oc())throw new Error(`Error code: ${Ye.errorCode}, message: Not supported on platform`);if(null===(e=In.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)return Pc("Eligibility information is already available on runtime."),In.hostVersionsInfo.appEligibilityInformation;Pc("Eligibility information is not available on runtime. Requesting from host.");const n=yield gs(Jt(Tc,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo");if(Xe(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(!Rc(n))throw new Error("Error deserializing eligibility information");return n}))}function Rc(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 kc="v2";class Mc{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function Nc(e){const t=e;return t.responseType===Lc.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const xc="Action.Execute";var Dc,Lc,Uc;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(Dc||(Dc={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(Lc||(Lc={}));class Hc extends Ci{validate(e){return Nc(e)}deserialize(e){return e}}function Vc(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Uc).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function _c(e){e.requestType===Dc.ActionExecuteInvokeRequest?Wc(e):e.requestType===Dc.QueryMessageExtensionRequest&&Bc(e)}function Wc(e){if(e.type!==xc){throw{errorCode:Uc.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${xc}"`}}if(!Bt(e.data)){throw{errorCode:Uc.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function Bc(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 jc(e,t,n){if(jn(In,Ge.content),!Jc())throw Ye;const r=new er(e);return _c(n),ws(Jt(kc,"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 zc(e,t){if(jn(In,Ge.content),!Jc())throw Ye;const n=new er(e);return ws(Jt(kc,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function $c(e,t,n){if(jn(In,Ge.content),!Jc())throw Ye;const r=new er(e);return _c(n),ws(Jt(kc,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function qc(e,t,n){if(jn(In,Ge.content),!Jc())throw Ye;return Nt(e,new Error("titleId is Invalid.")),Nt(t,new Error("oauthConfigId is Invalid.")),ws(Jt(kc,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Gc(e,t,n){if(jn(In,Ge.content),!Jc())throw Ye;return Nt(e,new Error("titleId is Invalid.")),t&&xt(t),ws(Jt(kc,"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 Jc(){return!(!jn(In)||!In.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Uc||(Uc={}));var Kc=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 Qc="v2";function Zc(e,t,n){return Kc(this,void 0,void 0,(function*(){if(jn(In,Ge.content),!tl())throw Ye;return nl(e,t),Ss("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.claims,n.silent],Jt(Qc,"externalAppAuthenticationForCEA.authenticateWithSSO"),Vc)}))}function Xc(e,t,n){return Kc(this,void 0,void 0,(function*(){if(jn(In,Ge.content),!tl())throw Ye;return nl(e,t),Ss("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Jt(Qc,"externalAppAuthenticationForCEA.authenticateWithOauth"),Vc)}))}function Yc(e,t,n,r){return Kc(this,void 0,void 0,(function*(){if(jn(In,Ge.content),!tl())throw Ye;return nl(e,t),Wc(r),ys("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new Mc(r),n.url.href,n.width,n.height,n.isExternal],new Hc,Jt(Qc,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Vc)}))}function el(e,t,n,r){return Kc(this,void 0,void 0,(function*(){if(jn(In,Ge.content),!tl())throw Ye;return nl(e,t),Wc(r),ys("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new Mc(r),n.claims,n.silent],new Hc,Jt(Qc,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Vc)}))}function tl(){return!(!jn(In)||!In.supports.externalAppAuthenticationForCEA)}function nl(e,t){Nt(t,new Error("conversation id is not valid.")),Yn(e)}const rl="v2";var ol,il;function al(e,t){if(jn(In,Ge.content),!cl())throw Ye;const n=new er(e);return ws(Jt(rl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function sl(e,t,n){if(jn(In,Ge.content),!cl())throw Ye;const r=new er(e);return ws(Jt(rl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function cl(){return!(!jn(In)||!In.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(ol||(ol={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(il||(il={}));var ll=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 ul="v2";function dl(e,t,n){return ll(this,void 0,void 0,(function*(){if(jn(In,Ge.content),!pl())throw Ye;nl(e,t);const[r,o]=yield ws(Jt(ul,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function fl(e,t,n){return ll(this,void 0,void 0,(function*(){if(jn(In,Ge.content),!pl())throw Ye;nl(e,t);const r=yield gs(Jt(ul,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function pl(){return!(!jn(In)||!In.supports.externalAppCardActionsForCEA)}var gl=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 ml="v2";function hl(e,t,n){return gl(this,void 0,void 0,(function*(){if(jn(In,Ge.content),!vl())throw Ye;const r=new er(e),[o,i]=yield ws(Jt(ml,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function vl(){return!(!jn(In)||!In.supports.externalAppCommands)}const wl="v1";var Cl,yl,Sl,bl,El,Il;function Al(e,t){if(jn(In,Ge.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");As(Jt(wl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Tl(e,t){if(jn(In,Ge.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");As(Jt(wl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Pl(e,t,n){if(jn(In,Ge.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");As(Jt(wl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Ol(e,t,n){if(jn(In,Ge.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");As(Jt(wl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Fl(e,t,n){if(jn(In,Ge.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");As(Jt(wl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function Rl(e=!1,t){if(jn(In,Ge.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");As(Jt(wl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function kl(e,t,n,r,o=!1,i){if(jn(In,Ge.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");As(Jt(wl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function Ml(e){if(jn(In,Ge.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");As(Jt(wl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function Nl(e=void 0,t){if(jn(In,Ge.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");As(Jt(wl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function xl(e){if(jn(In,Ge.content),!e)throw jl(He.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");As(Jt(wl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function Dl(e,t){if(jn(In,Ge.content),!t)throw jl(He.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw jl(He.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");As(Jt(wl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Ll(e,t){if(jn(In,Ge.content),!t)throw jl(He.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw jl(He.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");As(Jt(wl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Ul(e,t){if(jn(In,Ge.content),!t)throw jl(He.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw jl(He.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");As(Jt(wl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Hl(e,t){if(jn(In,Ge.content),!t)throw jl(He.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw jl(He.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");As(Jt(wl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Vl(e,t){if(jn(In,Ge.content),!t)throw jl(He.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw jl(He.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");As(Jt(wl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function _l(e,t){if(jn(In,Ge.content),!t)throw jl(He.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw jl(He.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw jl(He.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");As(Jt(wl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Wl(e){if(jn(In),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");La(Jt(wl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Bl(e){if(jn(In),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");La(Jt(wl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function jl(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"}(Cl||(Cl={})),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"}(yl||(yl={})),function(e){e.ClassMaterials="classMaterials"}(Sl||(Sl={})),function(e){e.Readonly="readonly"}(bl||(bl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(El||(El={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Il||(Il={}));const zl="v1";function $l(){return new Promise((e=>{if(jn(In),!Kl())throw Ye;e(vs(Jt(zl,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function ql(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(jn(In),!Kl())throw Ye;t(vs(Jt(zl,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function Gl(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(jn(In),!Kl())throw Ye;La(Jt(zl,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{jn(In),e(t)}))}function Jl(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(jn(In),!Kl())throw Ye;La(Jt(zl,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{jn(In),e(t)}))}function Kl(){return!(!jn(In)||!In.supports.meetingRoom)}function Ql(){return!(!jn(In)||!In.supports.messageChannels)}const Zl="v1";function Xl(e){if(jn(In,Ge.content),!Yl())throw Ye;As(Jt(Zl,"notifications.showNotification"),"notifications.showNotification",[e])}function Yl(){return!(!jn(In)||!In.supports.notifications)}const eu="v2";function tu(e){if(!ou())throw new Error(He.NOT_SUPPORTED_ON_PLATFORM.toString());if(tr(e))throw new Error(He.INVALID_ARGUMENTS.toString());La(Jt(eu,"otherApp.install"),"otherApp.install",e)}function nu(){if(!ou())throw new Error(He.NOT_SUPPORTED_ON_PLATFORM.toString());As(Jt(eu,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Ua("otherApp.install")}function ru(e){if(!ou())throw new Error(He.NOT_SUPPORTED_ON_PLATFORM.toString());return Ss("otherApp.notifyInstallCompleted",[e.toString()],Jt(eu,"otherApp.notifyInstallCompleted"))}function ou(){return!(!jn(In)||!In.supports.otherAppStateChange)}const iu="v1";var au,su,cu;function lu(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(jn(In,Ge.sidePanel),!vu())throw Ye;As(Jt(iu,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function uu(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(jn(In,Ge.sidePanel),!vu())throw Ye;As(Jt(iu,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function du(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(jn(In,Ge.sidePanel),!vu())throw Ye;As(Jt(iu,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function fu(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(jn(In,Ge.sidePanel),!vu())throw Ye;As(Jt(iu,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function pu(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(jn(In,Ge.sidePanel),!vu())throw Ye;La(Jt(iu,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function gu(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(jn(In,Ge.sidePanel),!vu())throw Ye;La(Jt(iu,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function mu(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(jn(In,Ge.sidePanel),!vu())throw Ye;La(Jt(iu,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function hu(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(jn(In,Ge.sidePanel),!vu())throw Ye;La(Jt(iu,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function vu(){return!(!jn(In)||!In.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"}(au||(au={})),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"}(su||(su={})),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"}(cu||(cu={}));const wu="v1";function Cu(e,t,n,r){if(jn(In,Ge.content),!yu())throw Ye;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");As(Jt(wu,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function yu(){return!(!jn(In)||!In.supports.appEntity)}const Su="v1";function bu(e){return new Promise((t=>{if(jn(In),!Eu())throw Ye;if((vn.hostClientType===$e.android||vn.hostClientType===$e.teamsRoomsAndroid||vn.hostClientType===$e.teamsPhones||vn.hostClientType===$e.teamsDisplays)&&!zn(tn)){const e={errorCode:He.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(gs(Jt(Su,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function Eu(){return!(!jn(In)||!In.supports.teams)&&(!!In.supports.teams.fullTrust&&!!In.supports.teams.fullTrust.joinedTeams)}const Iu="v1";function Au(e){return new Promise((t=>{if(jn(In),!Tu())throw Ye;t(gs(Jt(Iu,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function Tu(){return!(!jn(In)||!In.supports.teams)&&!!In.supports.teams.fullTrust}const Pu="v1";var Ou;function Fu(e,t){if(jn(In,Ge.content),!ku())throw Ye;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");As(Jt(Pu,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Ru(e,t){if(jn(In),!ku())throw Ye;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");As(Jt(Pu,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function ku(){return!(!jn(In)||!In.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Ou||(Ou={}));class Mu{static setTimeout(e,t){const n=performance.now(),r=yt();return Mu.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Mu.setTimeoutCallbacks[e]}static setInterval(e,t){Mu.setTimeout((function n(){e(),Mu.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Mu.setTimeoutCallbacks){const r=Mu.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Mu.setTimeoutCallbacks[e].callback(),delete Mu.setTimeoutCallbacks[e]}}}Mu.setTimeoutCallbacks={};class Nu{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Mu.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&&Mu.clearTimeout(this.timeoutId),this.timeoutId=Mu.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(Nu.maxSessionTimeoutInMs,2*t.timeoutInMs):Nu.initialSessionTimeoutInMs}}Nu.initialSessionTimeoutInMs=1e3,Nu.maxSessionTimeoutInMs=3e4;const xu="v2";class Du{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Nu(Du.distributionBinSize,(e=>this.reportPerformanceEvent(Jt(xu,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Mu.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Jt(xu,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),Du.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){Mu.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(Jt(xu,"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(Jt(xu,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}Du.distributionBinSize=1e3,Du.calculateFPSInterval=1e3;var Lu=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())}))},Uu=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 Hu="v2",Vu=Mt()?void 0:new Du(As);var _u,Wu,Bu;function ju(e){if(jn(In,Ge.sidePanel),!Ju())throw Ye;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(La(Jt(Hu,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Vu?void 0:Vu.setFrameProcessTimeLimit(e.timeLimit)),!1),Yu())Ku(e.videoFrameHandler,e.config);else{if(!td())throw Ye;Zu(e.videoBufferHandler,e.config)}null==Vu||Vu.startMonitorSlowFrameProcessing()}function zu(e,t){if(jn(In,Ge.sidePanel),!Ju())throw Ye;As(Jt(Hu,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function $u(e){if(jn(In,Ge.sidePanel),!Ju())throw Ye;La(Jt(Hu,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",pd(e,Vu),!1),As(Jt(Hu,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function qu(e){As(Jt(Hu,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Gu(e){As(Jt(Hu,"videoEffects.notifyError"),"video.notifyError",[e])}function Ju(){return jn(In)&&!!In.supports.video&&(!!In.supports.video.mediaStream||!!In.supports.video.sharedFrame)}function Ku(e,t){if(jn(In,Ge.sidePanel),!Ju()||!Yu())throw Ye;La(Jt(Hu,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Lu(this,void 0,void 0,(function*(){const{streamId:n}=t,r=Qu(e,Vu);yield od(n,r,Gu,Vu)}))),!1),As(Jt(Hu,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Qu(e,t){return n=>Lu(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 Zu(e,t){if(jn(In,Ge.sidePanel),!Ju()||!td())throw Ye;La(Jt(Hu,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==Vu||Vu.reportStartFrameProcessing(t.width,t.height),e(Xu(t),(()=>{null==Vu||Vu.reportFrameProcessed(),qu(n)}),Gu)}}),!1),As(Jt(Hu,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Xu(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Uu(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Yu(){var e;return jn(In,Ge.sidePanel)&&ed()&&!!(null===(e=In.supports.video)||void 0===e?void 0:e.mediaStream)}function ed(){var e,t,n,r;return!(!(null===(t=null===(e=kt().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=kt().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function td(){var e;return jn(In,Ge.sidePanel)&&!!(null===(e=In.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(_u||(_u={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Wu||(Wu={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Bu||(Bu={}));var nd=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 rd="v2";function od(e,t,n,r){var o,i;return nd(this,void 0,void 0,(function*(){const a=sd();!Mt()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),cd(yield ad(e,n,r),new ld(n,t),a.writable)}))}function id(e,t,n,r){var o,i;return nd(this,void 0,void 0,(function*(){const a=sd();!Mt()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),cd(yield ad(e,n,r),new fd(n,t),a.writable)}))}function ad(e,t,n){return nd(this,void 0,void 0,(function*(){if(Mt())throw Ye;const r=kt().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 sd(){if(Mt())throw Ye;const e=window.MediaStreamTrackGenerator;if(!e)throw Ye;return new e({kind:"video"})}function cd(e,t,n){new(0,kt().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class ld{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>nd(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 ud{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 dd{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 fd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>nd(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=>nd(this,void 0,void 0,(function*(){if(Mt())throw Ye;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 ud(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 dd(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(Jt(rd,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function pd(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),As(Jt(rd,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in Bu?e:Bu.InitializationFailure;As(Jt(rd,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var gd=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 md="v2",hd=2e3,vd=Mt()?void 0:new Du(As);var wd;function Cd(e){var t,n;if(!Td())throw Ye;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(jn(In,Ge.sidePanel)){if(La(Jt(md,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==vd?void 0:vd.setFrameProcessTimeLimit(e)),!1),null===(t=In.supports.video)||void 0===t?void 0:t.mediaStream)La(Jt(md,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>gd(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=vd?Sd(e.videoFrameHandler,vd):e.videoFrameHandler;r?yield id(n,o,Od,vd):yield od(n,o,Od,vd)}))),!1),As(Jt(md,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=In.supports.video)||void 0===n?void 0:n.sharedFrame))throw Ye;La(Jt(md,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==vd||vd.reportStartFrameProcessing(t.width,t.height);const n=yd(),r=t.timestamp;e.videoBufferHandler(bd(t),(()=>{n(),null==vd||vd.reportFrameProcessed(),Pd(r)}),Od)}}),!1),As(Jt(md,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==vd||vd.startMonitorSlowFrameProcessing()}}function yd(){const e=setTimeout((()=>{Od(`Frame not processed in ${hd}ms`,wd.Warn)}),hd);return function(){clearTimeout(e)}}function Sd(e,t){return n=>gd(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=yd(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function bd(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Ed(e,t,n){if(jn(In,Ge.sidePanel),!Td())throw Ye;As(Jt(md,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Id(e){if(jn(In,Ge.sidePanel),!Td())throw Ye;La(Jt(md,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",pd(e,vd),!1),As(Jt(md,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Ad(e){if(jn(In,Ge.sidePanel),!Ju())throw Ye;As(Jt(md,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Td(){return jn(In),Ju()}function Pd(e){As(Jt(md,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Od(e,t=wd.Warn){As(Jt(md,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Fd(e){if(jn(In),!Ju())throw Ye;Od(e,wd.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(wd||(wd={}));const Rd="v2";class kd extends Ci{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Md{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Nd{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class xd extends Ci{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class Dd{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Ld extends Ci{validate(e){const t=new xd;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function Ud(e,t){if(jn(In),!Bd())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(jd(e.threadId),t&&0===t.length)throw new Error(`Error code: ${He.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return ys("hostEntity.tab.addAndConfigure",[new Nd(e),t],new xd,Jt(Rd,"hostEntity.tab.addAndConfigure"))}function Hd(e){if(jn(In),!Bd())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return jd(e.threadId),ys("hostEntity.tab.getAll",[new Nd(e)],new Ld,Jt(Rd,"hostEntity.tab.getAll"))}function Vd(e,t){if(jn(In),!Bd())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return zd(e),jd(t.threadId),ys("hostEntity.tab.reconfigure",[new Md(e),new Nd(t)],new kd,Jt(Rd,"hostEntity.tab.reconfigure"))}function _d(e,t){if(jn(In),!Bd())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return zd(e),jd(t.threadId),ys("hostEntity.tab.rename",[new Md(e),new Nd(t)],new kd,Jt(Rd,"hostEntity.tab.rename"))}function Wd(e,t){if(jn(In),!Bd())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return jd(t.threadId),zd(e),ys("hostEntity.tab.remove",[new Dd(e),new Nd(t)],new yi,Jt(Rd,"hostEntity.tab.remove"))}function Bd(){var e;return!!(jn(In)&&qd()&&(null===(e=In.supports.hostEntity)||void 0===e?void 0:e.tab))}function jd(e){if(!e||0==e.length)throw new Error(`Error code: ${He.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function zd(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${He.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var $d;function qd(){return!(!jn(In)||!In.supports.hostEntity)}!function(e){e.edu="EDU"}($d||($d={}));var Gd=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 Jd="v2";var Kd;!function(e){e.FullStore="fullstore",e.SpecificStore="specificstore",e.InContextStore="ics",e.AppDetail="appdetail"}(Kd||(Kd={}));const Qd="Invalid store dialog type, but type needed to specify store to open",Zd="No App Id present, but AppId needed to open AppDetail store",Xd="No Collection Id present, but CollectionId needed to open a store specific to a collection";function Yd(e){return Gd(this,void 0,void 0,(function*(){if(jn(In,Ge.content,Ge.sidePanel,Ge.meetingStage),!ef())throw Ye;if(void 0===e||!Object.values(Kd).includes(e.dialogType))throw new Error(Qd);if(e.dialogType===Kd.AppDetail&&!(e.appId instanceof er))throw new Error(Zd);if(e.dialogType===Kd.SpecificStore&&!e.collectionId)throw new Error(Xd);return Ss("store.open",[e.dialogType,e.appId,e.collectionId],Jt(Jd,"store.open"))}))}function ef(){return jn(In)&&!!In.supports.store}function tf(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.")}class nf{constructor(e){this.val=e,tf(e)}toString(){return this.val}}const rf="/l/app/",of="/l/meeting/new",af="attendees",sf="startTime",cf="endTime",lf="subject",uf="content",df="/l/call/0/0",ff="source",pf="withVideo",gf="/l/chat/0/0",mf="users",hf="topicName",vf="message";function wf(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${mf}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${hf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${vf}=${encodeURIComponent(n)}`;return`${dn}://${fn}${gf}?${r}${o}${i}`}function Cf(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${mf}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${pf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${ff}=${encodeURIComponent(n)}`;return`${dn}://${fn}${df}?${r}${o}${i}`}function yf(e,t,n,r,o){const i=void 0===e?"":`${af}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${sf}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${cf}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${lf}=${encodeURIComponent(r)}`,l=void 0===o?"":`&${uf}=${encodeURIComponent(o)}`;return`${dn}://${fn}${of}?${i}${a}${s}${c}${l}`}function Sf(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${dn}://${fn}${rf}${encodeURIComponent(e)}`}const bf="v1";function Ef(e){return new Promise((t=>{if(jn(In,Ge.content,Ge.sidePanel,Ge.settings,Ge.task,Ge.stage,Ge.meetingStage),!If())throw new Error("Not supported");const n=Jt(bf,"appInstallDialog.openAppInstallDialog");In.isLegacyTeams?t(ms(n,"executeDeepLink",Sf(e.appId))):(As(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function If(){return!(!jn(In)||!In.supports.appInstallDialog)}const Af="v1",Tf=Gt("media");var Pf,Of,Ff,Rf,kf,Mf,Nf;!function(e){e.Base64="base64",e.ID="id"}(Pf||(Pf={}));class xf{}function Df(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(jn(In,Ge.content,Ge.task),vn.isFramelessWindow)if(zn(on))As(Jt(Af,"media.captureImage"),"captureImage",e);else{e({errorCode:He.OLD_PLATFORM},[])}else{e({errorCode:He.NOT_SUPPORTED_ON_PLATFORM},[])}}function Lf(){if(jn(In,Ge.content,Ge.task),!Hf())throw Ye;const e=Ve.Media;return new Promise((t=>{t(vs(Jt(Af,"media.hasPermission"),"permissions.has",e))}))}function Uf(){if(jn(In,Ge.content,Ge.task),!Hf())throw Ye;const e=Ve.Media;return new Promise((t=>{t(vs(Jt(Af,"media.requestPermission"),"permissions.request",e))}))}function Hf(){return!(!jn(In)||!In.supports.permissions)}class Vf extends xf{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(jn(In,Ge.content,Ge.task),zn(an))if(Yf(this.mimeType,this.format,this.content))zn("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:He.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:He.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];As(Jt(Af,"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=$f(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=qf(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):Tf(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:He.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=yt(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!tr(e)&&As(Jt(Af,"media.getMedia"),"getMedia",r),La(Jt(Af,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Ua("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=$f(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Ua("getMedia"+t)}else{const e=qf(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:He.INTERNAL_ERROR,message:"data received is null"},new Blob),Ua("getMedia"+t)}}))}}class _f{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){jn(In,Ge.content,Ge.task);try{qn(Yt)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};As(Jt(Af,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(Of.StopRecording,e)}}class Wf extends _f{getMediaType(){return kf.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Of.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Bf(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(jn(In,Ge.content,Ge.task),!zn(an)){const e={errorCode:He.OLD_PLATFORM};return void t(e,[])}try{Gf(e)}catch(e){return void t(e,[])}if(!Kf(e)){const e={errorCode:He.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];As(Jt(Af,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Jf(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 Vf(e));t(n,s)}))}function jf(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(jn(In,Ge.content,Ge.task),!zn(an)){return void t({errorCode:He.OLD_PLATFORM})}if(!ep(e)){return void t({errorCode:He.INVALID_ARGUMENTS})}const n=[e];As(Jt(Af,"media.viewImages"),"viewImages",n,t)}function zf(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(jn(In,Ge.content,Ge.task),vn.hostClientType!==$e.desktop&&vn.hostClientType!==$e.web&&vn.hostClientType!==$e.rigel&&vn.hostClientType!==$e.teamsRoomsWindows&&vn.hostClientType!==$e.teamsRoomsAndroid&&vn.hostClientType!==$e.teamsPhones&&vn.hostClientType!==$e.teamsDisplays)if(zn(sn))if(tp(t))As(Jt(Af,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:He.INVALID_ARGUMENTS},"")}else{e({errorCode:He.OLD_PLATFORM},"")}else{e({errorCode:He.NOT_SUPPORTED_ON_PLATFORM},"")}}function $f(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 qf(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 Gf(e){Zf(e)?qn(Xt):Xf(e)?qn(Yt):Qf(e)&&qn(en)}function Jf(e){return!(e.mediaType!=kf.Video||!e.videoProps||!e.videoProps.videoController)}function Kf(e){return!(null==e||e.maxMediaCount>10)}function Qf(e){var t;return!((null==e?void 0:e.mediaType)!=kf.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Zf(e){return!(!e||e.mediaType!=kf.VideoAndImage&&!e.videoAndImageProps)}function Xf(e){return!(!e||e.mediaType!=kf.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Yf(e,t,n){return null!=e&&null!=t&&t==Pf.ID&&null!=n}function ep(e){return!(null==e||e.length<=0||e.length>10)}function tp(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function np(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"}(Of||(Of={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Ff||(Ff={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Rf||(Rf={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(kf||(kf={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(Mf||(Mf={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Nf||(Nf={}));const rp="v2";function op(e){return new Promise((t=>{if(jn(In,Ge.content,Ge.task),!sp())throw Ye;if(!tp(e))throw{errorCode:He.INVALID_ARGUMENTS};t(vs(Jt(rp,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function ip(){if(jn(In,Ge.content,Ge.task),!sp())throw Ye;const e=Ve.Media;return new Promise((t=>{t(vs(Jt(rp,"barCode.hasPermission"),"permissions.has",e))}))}function ap(){if(jn(In,Ge.content,Ge.task),!sp())throw Ye;const e=Ve.Media;return new Promise((t=>{t(vs(Jt(rp,"barCode.requestPermission"),"permissions.request",e))}))}function sp(){return!!(jn(In)&&In.supports.barCode&&In.supports.permissions)}const cp="v2";function lp(e){return up(Jt(cp,"chat.openChat"),e)}function up(e,t){return new Promise((n=>{if(jn(In,Ge.content,Ge.task),!fp())throw Ye;if(In.isLegacyTeams)n(ms(e,"executeDeepLink",wf([t.user],void 0,t.message)));else{n(ms(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function dp(e){const t=Jt(cp,"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(up(t,r))}else{if(jn(In,Ge.content,Ge.task),!fp())throw Ye;if(In.isLegacyTeams)n(ms(t,"executeDeepLink",wf(e.users,e.topic,e.message)));else{n(ms(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function fp(){return!(!jn(In)||!In.supports.chat)}var pp=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 gp="v2";function mp(e){return pp(this,void 0,void 0,(function*(){if(jn(In,Ge.content,Ge.meetingStage,Ge.task,Ge.settings,Ge.stage,Ge.sidePanel),!vp())throw Ye;if(!e.type||!Object.values(ze).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(ze)}`);const t=yield Rt(e),n={mimeType:e.type,content:t};return vs(Jt(gp,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function hp(){return pp(this,void 0,void 0,(function*(){jn(In,Ge.content,Ge.meetingStage,Ge.task,Ge.settings,Ge.stage,Ge.sidePanel);const e=Jt(gp,"clipboard.read");if(!vp())throw Ye;const t=yield vs(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Ft(e.mimeType,e.content)}return t}))}function vp(){return vn.isFramelessWindow?!(!jn(In)||!In.supports.clipboard):!!(jn(In)&&navigator&&navigator.clipboard&&In.supports.clipboard)}function wp(){var e;return null!==(e=jn(In)&&(In.isNAAChannelRecommended||Cp()))&&void 0!==e&&e}function Cp(){return!!(jn(In)&&yp()&&In.isLegacyTeams&&In.supports.nestedAppAuth)}function yp(){return vn.hostClientType===$e.android||vn.hostClientType===$e.ios||vn.hostClientType===$e.ipados}const Sp="v2";function bp(){if(jn(In,Ge.content,Ge.task),!Ip())throw Ye;return vs(Jt(Sp,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Ep(e){if(jn(In,Ge.content,Ge.task),!Ip())throw Ye;if(!e)throw{errorCode:He.INVALID_ARGUMENTS};return vs(Jt(Sp,"geoLocation.showLocation"),"location.showLocation",e)}function Ip(){return!!(jn(In)&&In.supports.geoLocation&&In.supports.geoLocation.map&&In.supports.permissions)}const Ap="v2";function Tp(){if(jn(In,Ge.content,Ge.task),!Fp())throw Ye;return vs(Jt(Ap,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Pp(){if(jn(In,Ge.content,Ge.task),!Fp())throw Ye;const e=Ve.GeoLocation;return new Promise((t=>{t(vs(Jt(Ap,"geoLocation.hasPermission"),"permissions.has",e))}))}function Op(){if(jn(In,Ge.content,Ge.task),!Fp())throw Ye;const e=Ve.GeoLocation;return new Promise((t=>{t(vs(Jt(Ap,"geoLocation.requestPermission"),"permissions.request",e))}))}function Fp(){return!!(jn(In)&&In.supports.geoLocation&&In.supports.permissions)}function Rp(){return In.hostVersionsInfo?In.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const kp="v1";class Mp{postMessage(e,t){jn(In),As(Jt(kp,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||wt())}addEventListener(e,t){jn(In),"message"===e&&La(Jt(kp,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Np{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){jn(In,Ge.task),As(Jt(kp,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||wt())}addEventListener(e,t){jn(In,Ge.task),"message"===e&&La(Jt(kp,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const xp="v2";function Dp(e){if(jn(In,Ge.content),!Lp())throw Ye;if(!e||!Ot(e))throw{errorCode:He.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return vs(Jt(xp,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function Lp(){return!(!jn(In)||!In.supports.secondaryBrowser)}const Up="v1";function Hp(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(jn(In,Ge.content,Ge.task),!zn(nn))throw{errorCode:He.OLD_PLATFORM};if(!e)throw{errorCode:He.INVALID_ARGUMENTS};if(!_p())throw Ye;As(Jt(Up,"location.getLocation"),"location.getLocation",[e],t)}function Vp(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(jn(In,Ge.content,Ge.task),!zn(nn))throw{errorCode:He.OLD_PLATFORM};if(!e)throw{errorCode:He.INVALID_ARGUMENTS};if(!_p())throw Ye;As(Jt(Up,"location.showLocation"),"location.showLocation",[e],t)}function _p(){return!(!jn(In)||!In.supports.location)}const Wp="v1";function Bp(e){jn(In,Ge.sidePanel),e.contentUrl&&new URL(e.contentUrl),As(Jt(Wp,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var jp=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 zp="v1";var $p,qp,Gp,Jp,Kp,Qp;function Zp(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");jn(In,Ge.sidePanel,Ge.meetingStage),As(Jt(zp,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Xp(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");jn(In,Ge.sidePanel,Ge.meetingStage),As(Jt(zp,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Yp(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");jn(In,Ge.sidePanel,Ge.meetingStage,Ge.settings,Ge.content),As(Jt(zp,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function eg(){var e,t,n;return jp(this,void 0,void 0,(function*(){let r;jn(In,Ge.sidePanel,Ge.meetingStage,Ge.settings,Ge.content);try{const e=!0;r=yield vs(Jt("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)==Jp.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Jp.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(He.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function tg(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");jn(In,Ge.sidePanel,Ge.meetingStage,Ge.task),As(Jt(zp,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function ng(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");jn(In,Ge.sidePanel),As(Jt(zp,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function rg(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");jn(In,Ge.sidePanel),As(Jt(zp,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function og(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");jn(In,Ge.sidePanel),As(Jt(zp,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function ig(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");jn(In,Ge.sidePanel),La(Jt(zp,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function ag(e,t,n={sharingProtocol:Kp.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");jn(In,Ge.sidePanel,Ge.meetingStage),As(Jt(zp,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function sg(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");jn(In,Ge.sidePanel,Ge.meetingStage),As(Jt(zp,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function cg(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");jn(In,Ge.sidePanel,Ge.meetingStage),As(Jt(zp,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function lg(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");jn(In,Ge.sidePanel,Ge.meetingStage),As(Jt(zp,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function ug(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");jn(In,Ge.sidePanel,Ge.meetingStage),La(Jt(zp,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function dg(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");jn(In,Ge.sidePanel,Ge.meetingStage),La(Jt(zp,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function fg(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");jn(In,Ge.sidePanel,Ge.meetingStage),La(Jt(zp,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function pg(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));jn(In);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Qp.Other};return vs(Jt("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function gg(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");jn(In,Ge.sidePanel,Ge.meetingStage),e.isAppHandlingAudio?mg(e,t):hg(e,t)}function mg(e,t){As(Jt(zp,"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(Jt(zp,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>jp(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);wg(n,n.isMicMuted===t.isMicMuted?$p.HostInitiated:$p.AppDeclinedToChange)}catch(e){wg(t,$p.AppFailedToChange)}}))));La(Jt(zp,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function hg(e,t){As(Jt(zp,"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");Ha("meeting.micStateChanged")&&Ua("meeting.micStateChanged"),Ha("meeting.audioDeviceSelectionChanged")&&Ua("meeting.audioDeviceSelectionChanged"),t(n)}))}function vg(e){wg(e,$p.AppInitiated)}function wg(e,t){jn(In,Ge.sidePanel,Ge.meetingStage),As(Jt(zp,"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"}($p||($p={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(qp||(qp={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Gp||(Gp={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Jp||(Jp={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Kp||(Kp={})),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"}(Qp||(Qp={}));const Cg="v1",yg="v2";function Sg(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Jt(Cg,"monetization.openPurchaseExperience")):(r=e,o=Jt(yg,"monetization.openPurchaseExperience"));return jn(In,Ge.content),It((()=>new Promise((e=>{if(!bg())throw Ye;e(vs(o,"monetization.openPurchaseExperience",r))}))),n)}function bg(){return!(!jn(In)||!In.supports.monetization)}const Eg="v2";function Ig(e){return new Promise((t=>{if(jn(In,Ge.content),!Tg())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(ms(Jt(Eg,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function Ag(e){return new Promise((t=>{if(jn(In,Ge.content),!Tg())throw new Error("Not supported");const n=Jt(Eg,"calendar.composeMeeting");In.isLegacyTeams?t(ms(n,"executeDeepLink",yf(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(ms(n,"calendar.composeMeeting",e))}))}function Tg(){return!(!jn(In)||!In.supports.calendar)}const Pg="v2";function Og(e){return new Promise((t=>{if(jn(In,Ge.content),!Rg())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(ms(Jt(Pg,"mail.openMailItem"),"mail.openMailItem",e))}))}function Fg(e){return new Promise((t=>{if(jn(In,Ge.content),!Rg())throw new Error("Not supported");t(ms(Jt(Pg,"mail.composeMail"),"mail.composeMail",e))}))}function Rg(){return!(!jn(In)||!In.supports.mail)}var kg;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(kg||(kg={}));const Mg="v2";function Ng(){if(!vn.printCapabilityEnabled){if(jn(In),!Vg())throw Ye;vn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(xg(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function xg(){kt().print()}function Dg(e){Lg(Jt(Mg,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!tr(e)&&!Vg())throw Ye}))}function Lg(e,t,n){!tr(t)&&jn(In),!tr(t)&&n&&n(),za(e,t)}function Ug(e){Hg(Jt(Mg,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!tr(e)&&!Vg())throw Ye}))}function Hg(e,t,n){!tr(t)&&jn(In),!tr(t)&&n&&n(),Ga(e,t)}function Vg(){return!(!jn(In)||!In.supports.teamsCore)}const _g="v1",Wg="v2";function Bg(e,t){let n,r;jn(In,Ge.content,Ge.task,Ge.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Jt(_g,"people.selectPeople")):(r=e,o=Jt(Wg,"people.selectPeople")),bt(jg,n,o,r)}function jg(e,t){return new Promise((n=>{if(!zn(rn))throw{errorCode:He.OLD_PLATFORM};if(!np(t))throw{errorCode:He.INVALID_ARGUMENTS};if(!zg())throw Ye;n(vs(e,"people.selectPeople",t))}))}function zg(){return!(!jn(In)||!In.supports.people)}function $g(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?qg(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function qg(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 Gg="v2";function Jg(e){return jn(In,Ge.content),new Promise((t=>{const[n,r]=$g(e);if(!n)throw{errorCode:He.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(vs(Jt(Gg,"profile.showProfile"),"profile.showProfile",o))}))}function Kg(){return!(!jn(In)||!In.supports.profile)}const Qg="v2",Zg="search.queryChange",Xg="search.queryClose",Yg="search.queryExecute";function em(e,t,n){if(jn(In,Ge.content),!nm())throw Ye;La(Jt(Qg,"search.registerOnClosedHandler"),Xg,e),La(Jt(Qg,"search.registerOnExecutedHandler"),Yg,t),n&&La(Jt(Qg,"search.registerOnChangeHandler"),Zg,n)}function tm(){if(jn(In,Ge.content),!nm())throw Ye;As(Jt(Qg,"search.unregisterHandlers"),"search.unregister"),Ua(Zg),Ua(Xg),Ua(Yg)}function nm(){return!(!jn(In)||!In.supports.search)}function rm(){return new Promise((e=>{if(jn(In,Ge.content),!nm())throw new Error("Not supported");e(ms(Jt(Qg,"search.closeSearch"),"search.closeSearch"))}))}var om=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 im="v2";function am(){return om(this,void 0,void 0,(function*(){if(jn(In,Ge.sidePanel,Ge.meetingStage),!sm())throw Ye;return yield vs(Jt(im,"sharing.history.getContent"),"sharing.history.getContent")}))}function sm(){var e;return jn(In)&&void 0!==(null===(e=In.supports.sharing)||void 0===e?void 0:e.history)}const cm="v1",lm="v2",um={shareWebContent:"sharing.shareWebContent"};function dm(e,t){try{pm(e),gm(e),mm(e)}catch(e){return Et((()=>Promise.reject(e)),t)}jn(In,Ge.content,Ge.sidePanel,Ge.task,Ge.stage,Ge.meetingStage);return Et(fm,t,Jt(t?cm:lm,"sharing.shareWebContent"),e)}function fm(e,t){return new Promise((n=>{if(!hm())throw Ye;n(vs(e,um.shareWebContent,t))}))}function pm(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:He.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function gm(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:He.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:He.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function mm(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:He.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:He.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function hm(){return!(!jn(In)||!In.supports.sharing)}const vm="v2";function wm(){return new Promise((e=>{if(jn(In,Ge.content),!Cm())throw Ye;e(vs(Jt(vm,"stageView.self.close"),"stageView.self.close"))}))}function Cm(){var e;return jn(In)&&void 0!==(null===(e=In.supports.stageView)||void 0===e?void 0:e.self)}const ym="v2";var Sm;function bm(e){return new Promise((t=>{if(jn(In,Ge.content),!Em())throw Ye;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(vs(Jt(ym,"stageView.open"),"stageView.open",e))}))}function Em(){return!(!jn(In)||!In.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(Sm||(Sm={}));const Im=10;var Am=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 Tm="v2";function Pm(e){return Am(this,void 0,void 0,(function*(){jn(In,Ge.content,Ge.task),Rm(),km(e);const t=yield vs(Jt(Tm,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return Mm(e.maxVisualMediaCount,t),t}))}function Om(e){return Am(this,void 0,void 0,(function*(){jn(In,Ge.content,Ge.task),Rm(),km(e);const t=yield vs(Jt(Tm,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return Mm(e.maxVisualMediaCount,t),t}))}function Fm(){return!!(jn(In)&&In.supports.visualMedia&&In.supports.visualMedia.image&&In.supports.permissions)}function Rm(){if(!Fm())throw Ye}function km(e){if(!e||e.maxVisualMediaCount>Im||e.maxVisualMediaCount<1)throw nt}function Mm(e,t){if(t.length>e)throw rt}const Nm="v2";var xm,Dm;function Lm(){if(jn(In,Ge.content,Ge.task),!Fm())throw Ye;const e=Ve.Media;return vs(Jt(Nm,"visualMedia.hasPermission"),"permissions.has",e)}function Um(){if(jn(In,Ge.content,Ge.task),!Fm())throw Ye;const e=Ve.Media;return vs(Jt(Nm,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(xm||(xm={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Dm||(Dm={}));var Hm=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 Vm=null;function _m(){return Hm(this,void 0,void 0,(function*(){return null===Vm&&(Vm=(yield Ur()).app.host.name),Vm}))}var Wm=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 Bm(){return Wm(this,void 0,void 0,(function*(){if(jn(In),!zm())throw Ye;return!(!In.isLegacyTeams||vn.hostClientType!==$e.android&&vn.hostClientType!==$e.ios&&vn.hostClientType!==$e.ipados||(yield jm())!==qe.teams)||(yield gs(Jt("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function jm(){return Wm(this,void 0,void 0,(function*(){return _m()}))}function zm(){return jn(In)&&void 0!==In.supports.webStorage}const $m="v2";var qm;function Gm(e){const t=Jt($m,"call.startCall");return new Promise((n=>{var r;if(jn(In,Ge.content,Ge.task),!Jm())throw Ye;if(!In.isLegacyTeams)return As(t,"call.startCall",[e],n);n(gs(t,"executeDeepLink",Cf(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(qm.Video),e.source)).then((e=>{if(!e)throw new Error(hn);return e})))}))}function Jm(){return!(!jn(In)||!In.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(qm||(qm={}));const Km="v1";function Qm(){Ai(Jt(Km,"appInitialization.notifyAppLoaded"))}function Zm(){As(Jt(Km,"appInitialization.notifySuccess"),Fr.Success,[Hn])}function Xm(e){Pi(Jt(Km,"appInitialization.notifyFailure"),e)}function Ym(e){Ti(Jt(Km,"appInitialization.notifyExpectedFailure"),e)}const eh=Gt("thirdPartyCloudStorage"),th="v2";class nh{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let rh=[],oh=null,ih=!0,ah=null;function sh(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(jn(In,Ge.content,Ge.task),!lh())throw Ye;if(ah)throw ah=null,new Error("getDragAndDropFiles cannot be called twice");ah=t,ih=!0,As(Jt(th,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],ch)}else{t([],{errorCode:He.INVALID_ARGUMENTS})}}function ch(e){if(ah)if(e&&e.error)ah([],e.error),ah=null;else if(e&&e.fileChunk)try{ih||0!==e.fileChunk.chunkSequence||(eh("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),ih=!0,ah([],{errorCode:He.INTERNAL_ERROR,message:"error occurred while receiving data"}),rh=[],ah=null);const t=qf(e.fileChunk,e.fileType);if(t?(oh||(oh=new nh(e.fileType,[])),oh.assembleAttachment.push(t)):(eh(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),ah?ah([],{errorCode:He.INTERNAL_ERROR,message:"error occurred while receiving data"}):ah=null,rh=[],ah=null,ih=!0),ih=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&oh){const t=$f(oh.assembleAttachment,oh.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});rh.push(n)}e.isLastFile&&ah&&(ah(rh,e.error),rh=[],ah=null,ih=!0),oh=null}}catch(e){ah&&(ah([],{errorCode:He.INTERNAL_ERROR,message:e}),rh=[],ah=null,ih=!0)}else ah([],{errorCode:He.INTERNAL_ERROR,message:"data received is null"}),rh=[],ah=null,ih=!0}function lh(){return!(!jn(In)||!In.supports.thirdPartyCloudStorage)}const uh="v1";function dh(e,t){Ii(Jt(uh,"initialize"),t).then((()=>{e&&e()}))}function fh(){Ng()}function ph(){xg()}function gh(e){Bn(),As(Jt(uh,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=vn.frameContext),e(t)}))}function mh(e){Ni(Jt(uh,"registerOnThemeChangeHandlerHelper"),e)}function hh(e){Va(Jt(uh,"registerFullScreenHandler"),"fullScreenChange",e,[])}function vh(e){Va(Jt(uh,"registerAppButtonClickHandler"),"appButtonClick",e,[Ge.content])}function wh(e){Va(Jt(uh,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[Ge.content])}function Ch(e){Va(Jt(uh,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[Ge.content])}function yh(e){Ta(Jt(uh,"registerBackButtonHandler"),e)}function Sh(e){Lg(Jt(uh,"registerOnLoadHandler"),e)}function bh(e){Hg(Jt(uh,"registerBeforeUnloadHandler"),e)}function Eh(e){Va(Jt(uh,"registerFocusEnterHandler"),"focusEnter",e,[])}function Ih(e){Va(Jt(uh,"registerChangeSettingsHandler"),"changeSettings",e,[Ge.content])}function Ah(e,t){jn(In),fa(Jt(uh,"getTabInstances"),t).then((t=>{e(t)}))}function Th(e,t){jn(In),pa(Jt(uh,"getMruTabInstances"),t).then((t=>{e(t)}))}function Ph(e){ga(Jt(uh,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Oh(e,t){jn(In,Ge.content,Ge.sidePanel,Ge.settings,Ge.task,Ge.stage,Ge.meetingStage);const n=null!=t?t:wt();xi(Jt(uh,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Fh(e){ma(Jt(uh,"setFrameContext"),e)}function Rh(e,t,n){Ii(Jt(uh,"initializeWithFrameContext"),n).then((()=>t&&t())),ma(Jt(uh,"setFrameContext"),e)}const kh="v1";function Mh(e){da(Jt(kh,"navigation.returnFocus"),e)}function Nh(e,t){jn(In);const n=null!=t?t:wt();ua(Jt(kh,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function xh(e,t){jn(In,Ge.content,Ge.sidePanel,Ge.settings,Ge.remove,Ge.task,Ge.stage,Ge.meetingStage);const n=null!=t?t:wt();ca(Jt(kh,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Dh(e){jn(In);const t=null!=e?e:wt();la(Jt(kh,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const Lh="v1";function Uh(e){ha(Jt(Lh,"settings.setValidityState"),e)}function Hh(e){jn(In,Ge.content,Ge.settings,Ge.remove,Ge.sidePanel),va(Jt(Lh,"settings.getSettings")).then((t=>{e(t)}))}function Vh(e,t){jn(In,Ge.content,Ge.settings,Ge.sidePanel);const n=null!=t?t:wt();wa(Jt(Lh,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function _h(e){ui(Jt(Lh,"settings.registerOnSaveHandler"),e)}function Wh(e){fi(Jt(Lh,"settings.registerOnRemoveHandler"),e)}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};const jh="v1";function zh(e,t){const n=Jt(jh,"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?(jn(In,Ge.content,Ge.sidePanel,Ge.meetingStage),As(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?ko(n,Jh(e),r):Ro(n,Gh(e),r),new Mp}function $h(e){e=Kh(e);const{width:t,height:n}=e,r=Bh(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Fo(Jt(jh,"tasks.updateTask"),e)}function qh(e,t){Mo(Jt(jh,"tasks.submitTask"),e,t)}function Gh(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:Qe.Small,width:e.width?e.width:Qe.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Jh(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:Qe.Small,width:e.width?e.width:Qe.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function Kh(e){return e.height=e.height?e.height:Qe.Small,e.width=e.width?e.width:Qe.Small,e}const Qh="v2";var Zh,Xh;function Yh(){return!(!jn(In,Ge.meetingStage,Ge.sidePanel,Ge.content)||!In.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Zh||(Zh={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Xh||(Xh={}));class ev{getFluidTenantInfo(){return tv(),new Promise((e=>{e(vs(Jt(Qh,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return tv(),new Promise((t=>{t(vs(Jt(Qh,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return tv(),new Promise((e=>{e(vs(Jt(Qh,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return tv(),new Promise((t=>{t(vs(Jt(Qh,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return tv(),new Promise((e=>{e(vs(Jt(Qh,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return tv(),new Promise((t=>{t(vs(Jt(Qh,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return tv(),new Promise((t=>{t(vs(Jt(Qh,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return tv(),new Promise((t=>{t(vs(Jt(Qh,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return tv(),new ev}}function tv(){if(!Yh())throw new Error("LiveShareHost Not supported")}var nv=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 rv(e){try{return e.cartItems=ov(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function ov(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=ov(e.accessories)),e}))}const iv=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=nv(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=iv(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function av(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)cv(t),sv(t.accessories)}function sv(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");cv(t)}}}function cv(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");uv(e.price),dv(e.quantity)}function lv(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===xe(e))throw new Error("id must be a valid UUID")}}function uv(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 dv(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function fv(e){if(!Object.values(hv).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const pv="v2",gv={majorVersion:1,minorVersion:1};var mv,hv;function vv(){if(jn(In,Ge.content,Ge.task),!Sv())throw Ye;return vs(Jt(pv,"marketplace.getCart"),"marketplace.getCart",gv).then(rv)}function wv(e){if(jn(In,Ge.content,Ge.task),!Sv())throw Ye;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return lv(null==e?void 0:e.cartId),av(null==e?void 0:e.cartItems),vs(Jt(pv,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:iv(e.cartItems),cartVersion:gv})).then(rv)}function Cv(e){if(jn(In,Ge.content,Ge.task),!Sv())throw Ye;if(!e)throw new Error("removeCartItemsParams must be provided");if(lv(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 vs(Jt(pv,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:gv})).then(rv)}function yv(e){if(jn(In,Ge.content,Ge.task),!Sv())throw Ye;if(!e)throw new Error("updateCartStatusParams must be provided");return lv(null==e?void 0:e.cartId),fv(null==e?void 0:e.cartStatus),vs(Jt(pv,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:gv})).then(rv)}function Sv(){return!(!jn(In)||!In.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(mv||(mv={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(hv||(hv={}))})(),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={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],l=i[1],u=new o(c(e,a,l)),d=0,f=l>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[d++]=t>>16&255,u[d++]=t>>8&255,u[d++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[d++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[d++]=t>>8&255,u[d++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function l(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function u(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(l(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},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:()=>bt,AppId:()=>Ir,ChannelType:()=>Ut,ChildAppWindow:()=>rg,DialogDimension:()=>Lt,EduType:()=>Ot,EmailAddress:()=>Of,ErrorCode:()=>Et,FileOpenPreference:()=>yt,FrameContexts:()=>Mt,HostClientType:()=>Ft,HostName:()=>kt,LiveShareHost:()=>Iw,NotificationTypes:()=>Lc,ParentAppWindow:()=>og,SecondaryM365ContentIdName:()=>St,TaskModuleDimension:()=>Lt,TeamType:()=>Nt,UserSettingTypes:()=>Dc,UserTeamRole:()=>xt,ViewerActionTypes:()=>Uc,app:()=>i,appEntity:()=>D,appInitialization:()=>Ce,appInstallDialog:()=>q,authentication:()=>a,barCode:()=>J,calendar:()=>ie,call:()=>ve,chat:()=>K,clipboard:()=>Z,conversations:()=>E,copilot:()=>I,dialog:()=>p,enablePrintCapability:()=>Dh,executeDeepLink:()=>Yh,externalAppAuthentication:()=>T,externalAppAuthenticationForCEA:()=>P,externalAppCardActions:()=>O,externalAppCardActionsForCEA:()=>R,externalAppCommands:()=>F,files:()=>k,geoLocation:()=>Y,getAdaptiveCardSchemaVersion:()=>tg,getContext:()=>Vh,getMruTabInstances:()=>Qh,getTabInstances:()=>Zh,hostEntity:()=>z,initialize:()=>Uh,initializeWithFrameContext:()=>tw,liveShare:()=>Ee,location:()=>te,logs:()=>S,mail:()=>ae,marketplace:()=>Ae,media:()=>G,meeting:()=>re,meetingRoom:()=>M,menus:()=>g,messageChannels:()=>N,monetization:()=>oe,navigateBack:()=>aw,navigateCrossDomain:()=>iw,navigateToTab:()=>ow,nestedAppAuth:()=>Q,notifications:()=>x,openFilePreview:()=>zc,otherAppStateChange:()=>L,pages:()=>y,people:()=>ce,print:()=>Hh,profile:()=>le,registerAppButtonClickHandler:()=>Bh,registerAppButtonHoverEnterHandler:()=>jh,registerAppButtonHoverLeaveHandler:()=>zh,registerBackButtonHandler:()=>$h,registerBeforeUnloadHandler:()=>Gh,registerChangeSettingsHandler:()=>Kh,registerCustomHandler:()=>Bc,registerFocusEnterHandler:()=>Jh,registerFullScreenHandler:()=>Wh,registerOnLoadHandler:()=>qh,registerOnThemeChangeHandler:()=>_h,registerUserSettingsChangeHandler:()=>jc,remoteCamera:()=>U,returnFocus:()=>rw,search:()=>ue,secondaryBrowser:()=>ee,sendCustomEvent:()=>Wc,sendCustomMessage:()=>_c,setFrameContext:()=>ew,settings:()=>be,shareDeepLink:()=>Xh,sharing:()=>fe,stageView:()=>ge,store:()=>$,tasks:()=>Se,teams:()=>_,teamsCore:()=>se,thirdPartyCloudStorage:()=>ye,uploadCustomApp:()=>Vc,version:()=>lr,videoEffects:()=>W,videoEffectsEx:()=>B,visualMedia:()=>he,webStorage:()=>we});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>Br,getTelemetryPort:()=>_r,isSupported:()=>Wr});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Kr,getDataLayerPort:()=>Gr,isSupported:()=>Jr});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Zr,registerOnResumeHandler:()=>Qr});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>no,FailedReason:()=>to,Messages:()=>eo,_initialize:()=>ao,_uninitialize:()=>so,getContext:()=>co,getFrameContext:()=>oo,initialize:()=>io,isInitialized:()=>ro,lifecycle:()=>o,notifyAppLoaded:()=>lo,notifyExpectedFailure:()=>po,notifyFailure:()=>fo,notifySuccess:()=>uo,openLink:()=>ho,registerHostToAppPerformanceMetricsHandler:()=>mo,registerOnThemeChangeHandler:()=>go});var a={};n.r(a),n.d(a,{DataResidency:()=>Vo,authenticate:()=>Io,getAuthToken:()=>Po,getUser:()=>Ro,initialize:()=>Eo,notifyFailure:()=>Uo,notifySuccess:()=>Lo,registerAuthenticationHandlers:()=>Ao});var s={};n.r(s),n.d(s,{isSupported:()=>Wo,resize:()=>_o});var c={};n.r(c),n.d(c,{isSupported:()=>jo,open:()=>Bo});var l={};n.r(l),n.d(l,{isSupported:()=>Go,registerOnMessageFromParent:()=>qo,sendMessageToDialog:()=>$o,sendMessageToParentFromDialog:()=>zo});var u={};n.r(u),n.d(u,{bot:()=>c,getDialogInfoFromBotUrlDialogInfo:()=>Xo,getDialogInfoFromUrlDialogInfo:()=>Qo,isSupported:()=>Zo,open:()=>Jo,parentCommunication:()=>l,submit:()=>Ko});var d={};n.r(d),n.d(d,{isSupported:()=>li,open:()=>ci});var f={};n.r(f),n.d(f,{bot:()=>d,isSupported:()=>di,open:()=>ui});var p={};n.r(p),n.d(p,{adaptiveCard:()=>f,initialize:()=>fi,isSupported:()=>pi,update:()=>s,url:()=>u});var g={};n.r(g),n.d(g,{DisplayMode:()=>mi,MenuItem:()=>wi,MenuListType:()=>hi,initialize:()=>Ei,isSupported:()=>Fi,setNavBarMenu:()=>Ti,setUpViews:()=>Ai,showActionMenu:()=>Oi});var m={};n.r(m),n.d(m,{initialize:()=>ki,isSupported:()=>ji,registerChangeConfigHandler:()=>Vi,registerOnRemoveHandler:()=>Ui,registerOnRemoveHandlerHelper:()=>Di,registerOnSaveHandler:()=>xi,registerOnSaveHandlerHelper:()=>Li,setConfig:()=>Ni,setValidityState:()=>Mi});var h={};n.r(h),n.d(h,{isSupported:()=>la,onClick:()=>aa,onHoverEnter:()=>sa,onHoverLeave:()=>ca});var w={};n.r(w),n.d(w,{isSupported:()=>fa,navigateTo:()=>ua,navigateToDefaultPage:()=>da});var v={};n.r(v),n.d(v,{enterFullscreen:()=>pa,exitFullscreen:()=>ga,isSupported:()=>ma});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>va,getTabInstances:()=>wa,isSupported:()=>Ca,navigateToTab:()=>ha});var y={};n.r(y),n.d(y,{EnterFocusType:()=>ya,ReturnFocusType:()=>ba,appButton:()=>h,backStack:()=>b,config:()=>m,currentApp:()=>w,fullTrust:()=>v,getConfig:()=>Ta,initializeWithFrameContext:()=>Ia,isSupported:()=>ka,navigateCrossDomain:()=>Pa,navigateToApp:()=>Oa,registerFocusEnterHandler:()=>Ea,registerFullScreenHandler:()=>Fa,returnFocus:()=>Sa,setCurrentFrame:()=>Aa,shareDeepLink:()=>Ra,tabs:()=>C});var b={};n.r(b),n.d(b,{_initialize:()=>Ja,isSupported:()=>Ya,navigateBack:()=>Ka,registerBackButtonHandler:()=>Za,registerBackButtonHandlerHelper:()=>Qa});var S={};n.r(S),n.d(S,{isSupported:()=>xc,registerGetLogHandler:()=>Nc});var E={};n.r(E),n.d(E,{closeConversation:()=>Gc,getChatMembers:()=>Jc,isSupported:()=>Kc,openConversation:()=>qc});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>el,isSupported:()=>Yc});var I={};n.r(I),n.d(I,{eligibility:()=>A});var T={};n.r(T),n.d(T,{ActionExecuteInvokeRequestType:()=>il,ActionExecuteResponseHandler:()=>ll,InvokeErrorCode:()=>cl,InvokeResponseType:()=>sl,OriginalRequestType:()=>al,SerializableActionExecuteInvokeRequest:()=>rl,authenticateAndResendRequest:()=>gl,authenticateWithOauth2:()=>wl,authenticateWithPowerPlatformConnectorPlugins:()=>vl,authenticateWithSSO:()=>ml,authenticateWithSSOAndResendRequest:()=>hl,isActionExecuteResponse:()=>ol,isInvokeError:()=>ul,isSupported:()=>Cl,validateActionExecuteInvokeRequest:()=>fl});var P={};n.r(P),n.d(P,{authenticateAndResendRequest:()=>Al,authenticateWithOauth:()=>El,authenticateWithSSO:()=>Sl,authenticateWithSSOAndResendRequest:()=>Il,isSupported:()=>Tl,validateInput:()=>Pl});var O={};n.r(O),n.d(O,{ActionOpenUrlErrorCode:()=>Fl,ActionOpenUrlType:()=>Rl,isSupported:()=>Nl,processActionOpenUrl:()=>Ml,processActionSubmit:()=>kl});var R={};n.r(R),n.d(R,{isSupported:()=>Hl,processActionOpenUrl:()=>Ul,processActionSubmit:()=>Dl});var F={};n.r(F),n.d(F,{isSupported:()=>Bl,processActionCommand:()=>Wl});var k={};n.r(k),n.d(k,{CloudStorageProvider:()=>zl,CloudStorageProviderFileAction:()=>Kl,CloudStorageProviderType:()=>$l,DocumentLibraryAccessType:()=>Gl,FileDownloadStatus:()=>Jl,SpecialDocumentLibraryType:()=>ql,addCloudStorageFolder:()=>Ql,addCloudStorageProvider:()=>iu,addCloudStorageProviderFile:()=>su,copyMoveFiles:()=>nu,deleteCloudStorageFolder:()=>Xl,deleteCloudStorageProviderFile:()=>lu,downloadCloudStorageProviderFile:()=>uu,getCloudStorageFolderContents:()=>Yl,getCloudStorageFolders:()=>Zl,getExternalProviders:()=>tu,getFileDownloads:()=>ru,openCloudStorageFile:()=>eu,openDownloadFolder:()=>ou,registerCloudStorageProviderContentChangeHandler:()=>pu,registerCloudStorageProviderListChangeHandler:()=>fu,removeCloudStorageProvider:()=>au,renameCloudStorageProviderFile:()=>cu,uploadCloudStorageProviderFile:()=>du});var M={};n.r(M),n.d(M,{getPairedMeetingRoomInfo:()=>hu,isSupported:()=>yu,registerMeetingRoomCapabilitiesUpdateHandler:()=>vu,registerMeetingRoomStatesUpdateHandler:()=>Cu,sendCommandToPairedMeetingRoom:()=>wu});var N={};n.r(N),n.d(N,{dataLayer:()=>t,isSupported:()=>bu,telemetry:()=>e});var x={};n.r(x),n.d(x,{isSupported:()=>Au,showNotification:()=>Eu});var L={};n.r(L),n.d(L,{isSupported:()=>Ru,notifyInstallCompleted:()=>Ou,registerAppInstallationHandler:()=>Tu,unregisterAppInstallationHandler:()=>Pu});var U={};n.r(U),n.d(U,{ControlCommand:()=>ku,ErrorReason:()=>Mu,SessionTerminatedReason:()=>Nu,getCapableParticipants:()=>xu,isSupported:()=>Bu,registerOnCapableParticipantsChangeHandler:()=>Hu,registerOnDeviceStateChangeHandler:()=>_u,registerOnErrorHandler:()=>Vu,registerOnSessionStatusChangeHandler:()=>Wu,requestControl:()=>Lu,sendControlCommand:()=>Uu,terminateSession:()=>Du});var D={};n.r(D),n.d(D,{isSupported:()=>$u,selectAppEntity:()=>zu});var H={};n.r(H),n.d(H,{getUserJoinedTeams:()=>Gu,isSupported:()=>Ju});var V={};n.r(V),n.d(V,{getConfigSetting:()=>Zu,isSupported:()=>Qu,joinedTeams:()=>H});var _={};n.r(_),n.d(_,{ChannelType:()=>Yu,fullTrust:()=>V,getTeamChannels:()=>ed,isSupported:()=>nd,refreshSiteUrl:()=>td});var W={};n.r(W),n.d(W,{EffectChangeType:()=>fd,EffectFailureReason:()=>pd,VideoFrameFormat:()=>dd,isSupported:()=>Cd,notifySelectedVideoEffectChanged:()=>md,registerForVideoEffect:()=>hd,registerForVideoFrame:()=>gd});var B={};n.r(B),n.d(B,{ErrorLevel:()=>jd,frameProcessingTimeoutInMs:()=>Wd,isSupported:()=>Qd,notifyFatalError:()=>ef,notifySelectedVideoEffectChanged:()=>Jd,registerForVideoEffect:()=>Kd,registerForVideoFrame:()=>zd,updatePersonalizedEffects:()=>Zd});var j={};n.r(j),n.d(j,{addAndConfigure:()=>lf,getAll:()=>uf,isSupported:()=>gf,reconfigure:()=>df,remove:()=>pf,rename:()=>ff});var z={};n.r(z),n.d(z,{AppTypes:()=>wf,isSupported:()=>vf,tab:()=>j});var $={};n.r($),n.d($,{StoreDialogType:()=>bf,errorInvalidDialogType:()=>Sf,errorMissingAppId:()=>Ef,errorMissingCollectionId:()=>Af,isSupported:()=>Tf,openStoreExperience:()=>If});var q={};n.r(q),n.d(q,{isSupported:()=>Kf,openAppInstallDialog:()=>Jf});var G={};n.r(G),n.d(G,{CameraStartMode:()=>ep,File:()=>ip,FileFormat:()=>Xf,ImageOutputFormats:()=>op,ImageUriType:()=>rp,Media:()=>up,MediaControllerEvent:()=>Yf,MediaType:()=>np,Source:()=>tp,VideoController:()=>fp,captureImage:()=>ap,hasPermission:()=>sp,requestPermission:()=>cp,scanBarCode:()=>mp,selectMedia:()=>pp,viewImages:()=>gp});var J={};n.r(J),n.d(J,{hasPermission:()=>Fp,isSupported:()=>Mp,requestPermission:()=>kp,scanBarCode:()=>Rp});var K={};n.r(K),n.d(K,{isSupported:()=>Dp,openChat:()=>xp,openGroupChat:()=>Up});var Z={};n.r(Z),n.d(Z,{isSupported:()=>Bp,read:()=>Wp,write:()=>_p});var Q={};n.r(Q),n.d(Q,{isNAAChannelRecommended:()=>jp});var X={};n.r(X),n.d(X,{chooseLocation:()=>Gp,isSupported:()=>Kp,showLocation:()=>Jp});var Y={};n.r(Y),n.d(Y,{getCurrentLocation:()=>Qp,hasPermission:()=>Xp,isSupported:()=>eg,map:()=>X,requestPermission:()=>Yp});var ee={};n.r(ee),n.d(ee,{isSupported:()=>sg,open:()=>ag});var te={};n.r(te),n.d(te,{getLocation:()=>lg,isSupported:()=>dg,showLocation:()=>ug});var ne={};n.r(ne),n.d(ne,{setOptions:()=>pg});var re={};n.r(re),n.d(re,{CallType:()=>Cg,EventActionSource:()=>bg,MeetingReactionType:()=>wg,MeetingType:()=>vg,SharingProtocol:()=>yg,appShareButton:()=>ne,getAppContentStageSharingCapabilities:()=>Mg,getAppContentStageSharingState:()=>xg,getAuthenticationTokenForAnonymousUser:()=>Tg,getIncomingClientAudioState:()=>Sg,getLiveStreamState:()=>Pg,getMeetingDetails:()=>Ag,getMeetingDetailsVerbose:()=>Ig,joinMeeting:()=>Hg,registerLiveStreamChangedHandler:()=>Fg,registerMeetingReactionReceivedHandler:()=>Dg,registerRaiseHandStateChangedHandler:()=>Ug,registerSpeakingStateChangeHandler:()=>Lg,requestAppAudioHandling:()=>Vg,requestStartLiveStreaming:()=>Og,requestStopLiveStreaming:()=>Rg,shareAppContentToStage:()=>kg,stopSharingAppContentToStage:()=>Ng,toggleIncomingClientAudio:()=>Eg,updateMicState:()=>Bg});var oe={};n.r(oe),n.d(oe,{isSupported:()=>Gg,openPurchaseExperience:()=>qg});var ie={};n.r(ie),n.d(ie,{composeMeeting:()=>Zg,isSupported:()=>Qg,openCalendarItem:()=>Kg});var ae={};n.r(ae),n.d(ae,{ComposeMailType:()=>nm,composeMail:()=>em,isSupported:()=>tm,openMailItem:()=>Yg});var se={};n.r(se),n.d(se,{enablePrintCapability:()=>om,isSupported:()=>um,print:()=>im,registerBeforeUnloadHandler:()=>cm,registerBeforeUnloadHandlerHelper:()=>lm,registerOnLoadHandler:()=>am,registerOnLoadHandlerHelper:()=>sm});var ce={};n.r(ce),n.d(ce,{isSupported:()=>mm,selectPeople:()=>pm});var le={};n.r(le),n.d(le,{isSupported:()=>ym,showProfile:()=>Cm});var ue={};n.r(ue),n.d(ue,{closeSearch:()=>Om,isSupported:()=>Pm,registerHandlers:()=>Im,unregisterHandlers:()=>Tm});var de={};n.r(de),n.d(de,{getContent:()=>km,isSupported:()=>Mm});var fe={};n.r(fe),n.d(fe,{SharingAPIMessages:()=>Lm,history:()=>de,isSupported:()=>Wm,shareWebContent:()=>Um});var pe={};n.r(pe),n.d(pe,{close:()=>jm,isSupported:()=>zm});var ge={};n.r(ge),n.d(ge,{StageViewOpenMode:()=>qm,isSupported:()=>Jm,open:()=>Gm,self:()=>pe});var me={};n.r(me),n.d(me,{captureImages:()=>Xm,isSupported:()=>eh,retrieveImages:()=>Ym});var he={};n.r(he),n.d(he,{CameraRestriction:()=>ih,Source:()=>ah,hasPermission:()=>sh,image:()=>me,requestPermission:()=>ch});var we={};n.r(we),n.d(we,{isSupported:()=>mh,isWebStorageClearedOnUserLogOut:()=>ph});var ve={};n.r(ve),n.d(ve,{CallModalities:()=>wh,isSupported:()=>Ch,startCall:()=>vh});var Ce={};n.r(Ce),n.d(Ce,{ExpectedFailureReason:()=>no,FailedReason:()=>to,Messages:()=>eo,notifyAppLoaded:()=>bh,notifyExpectedFailure:()=>Ah,notifyFailure:()=>Eh,notifySuccess:()=>Sh});var ye={};n.r(ye),n.d(ye,{getDragAndDropFiles:()=>Mh,isSupported:()=>xh});var be={};n.r(be),n.d(be,{getSettings:()=>lw,registerOnRemoveHandler:()=>fw,registerOnSaveHandler:()=>dw,setSettings:()=>uw,setValidityState:()=>cw});var Se={};n.r(Se),n.d(Se,{getDefaultSizeIfNotProvided:()=>yw,startTask:()=>mw,submitTask:()=>ww,updateTask:()=>hw});var Ee={};n.r(Ee),n.d(Ee,{ContainerState:()=>Ew,LiveShareHost:()=>Iw,UserMeetingRole:()=>Sw,isSupported:()=>Aw});var Ae={};n.r(Ae),n.d(Ae,{CartStatus:()=>Ww,Intent:()=>_w,addOrUpdateCartItems:()=>jw,cartVersion:()=>Vw,getCart:()=>Bw,isSupported:()=>qw,removeCartItems:()=>zw,updateCartStatus:()=>$w});var Ie=n(815),Te=n(933);const Pe=Re,Oe=2147483647;function Re(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return ke(e)}return Fe(e,t,n)}function Fe(e,t,n){if("string"==typeof e)return Le(e,t);if(ArrayBuffer.isView(e))return Be(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(De(e,ArrayBuffer)||e&&De(e.buffer,ArrayBuffer))return je(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(De(e,SharedArrayBuffer)||e&&De(e.buffer,SharedArrayBuffer)))return je(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return Re.from(r,t,n);const o=ut(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return Re.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function ke(e){return Me(e),Ne(e<0?0:0|xe(e))}function Me(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Ne(e){if(e>Oe)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,Re.prototype),t}function xe(e){if(e>=Oe)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Oe.toString(16)+" bytes");return 0|e}function Le(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Re.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|Ue(e,t);let r=Ne(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function Ue(e,t){if(Re.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||De(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return He(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Ve(e).length;default:if(o)return r?-1:He(e).length;t=(""+t).toLowerCase(),o=!0}}function De(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function He(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Ve(e){return Te.toByteArray(We(e))}Re.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),Re.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),Re.from=function(e,t,n){return Fe(e,t,n)},Object.setPrototypeOf(Re.prototype,Uint8Array.prototype),Object.setPrototypeOf(Re,Uint8Array),Re.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Re.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==Re.prototype};const _e=/[^+/0-9A-Za-z-_]/g;function We(e){if((e=(e=e.split("=")[0]).trim().replace(_e,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Be(e){if(De(e,Uint8Array)){const t=new Uint8Array(e);return je(t.buffer,t.byteOffset,t.byteLength)}return ze(e)}function je(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,Re.prototype),r}function ze(e){const t=e.length<0?0:0|xe(e.length),n=Ne(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function $e(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return Je(r)}function qe(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ke(this,t,n);case"utf8":case"utf-8":return $e(this,t,n);case"ascii":return Ze(this,t,n);case"latin1":case"binary":return Qe(this,t,n);case"base64":return Xe(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ye(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}Re.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?$e(this,0,e):qe.apply(this,arguments)};const Ge=4096;function Je(e){const t=e.length;if(t<=Ge)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ge));return n}function Ke(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=lt[e[r]];return o}function Ze(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function Qe(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function Xe(e,t,n){return 0===t&&n===e.length?Te.fromByteArray(e):Te.fromByteArray(e.slice(t,n))}function Ye(e,t,n){const r=e.slice(t,n);let o="";for(let e=0;e<r.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function et(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(ct(r))return a;e[n+a]=r}return a}function tt(e,t,n,r){return st(He(t,e.length-n),e,n,r)}function nt(e,t,n,r){return st(it(t),e,n,r)}function rt(e,t,n,r){return st(Ve(t),e,n,r)}function ot(e,t,n,r){return st(at(t,e.length-n),e,n,r)}function it(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function at(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function st(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function ct(e){return e!=e}Re.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return et(this,e,t,n);case"utf8":case"utf-8":return tt(this,e,t,n);case"ascii":case"latin1":case"binary":return nt(this,e,t,n);case"base64":return rt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const lt=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function ut(e){if(Re.isBuffer(e)){const t=0|xe(e.length),n=Ne(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||ct(e.length)?Ne(0):ze(e):"Buffer"===e.type&&Array.isArray(e.data)?ze(e.data):void 0}const dt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ft;const pt=new Uint8Array(16);function gt(){if(!ft&&(ft="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ft))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ft(pt)}const mt=[];for(let e=0;e<256;++e)mt.push((e+256).toString(16).slice(1));function ht(e,t=0){return mt[e[t+0]]+mt[e[t+1]]+mt[e[t+2]]+mt[e[t+3]]+"-"+mt[e[t+4]]+mt[e[t+5]]+"-"+mt[e[t+6]]+mt[e[t+7]]+"-"+mt[e[t+8]]+mt[e[t+9]]+"-"+mt[e[t+10]]+mt[e[t+11]]+mt[e[t+12]]+mt[e[t+13]]+mt[e[t+14]]+mt[e[t+15]]}const wt=function(e,t,n){if(dt.randomUUID&&!t&&!e)return dt.randomUUID();const r=(e=e||{}).random||(e.rng||gt)();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 ht(r)},vt=/^(?:[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 Ct=function(e){return"string"==typeof e&&vt.test(e)};var yt,bt,St,Et,At,It,Tt,Pt,Ot,Rt,Ft,kt,Mt,Nt,xt,Lt,Ut;function Dt(e){return void 0!==(null==e?void 0:e.errorCode)}!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(yt||(yt={})),function(e){e.M365Content="m365content"}(bt||(bt={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(St||(St={})),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"}(Et||(Et={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(At||(At={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(It||(It={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Tt||(Tt={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(Pt||(Pt={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Ot||(Ot={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Rt||(Rt={})),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"}(Ft||(Ft={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(kt||(kt={})),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"}(Mt||(Mt={})),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"}(Nt||(Nt={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(xt||(xt={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(Lt||(Lt={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Ut||(Ut={}));const Ht={errorCode:Et.NOT_SUPPORTED_ON_PLATFORM},Vt={majorVersion:1,minorVersion:5},_t={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},Wt=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),Bt=new Error("Invalid response: Received more images than the specified max limit in the response.");function jt(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function zt(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 $t(){return wt()}function qt(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&qt(e[t])})),Object.freeze(e)}function Gt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Jt(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function Kt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Zt(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 Qt(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 Xt(e){return!(zt(`${e.majorVersion}.${e.minorVersion}`,`${Vt.majorVersion}.${Vt.minorVersion}`)>=0)}function Yt(e){return"https:"===e.protocol}function en(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=atob(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=Pe.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function tn(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 nn(){if(rn())throw new Error("window object undefined at SSR check");return window}function rn(){return"undefined"==typeof window}function on(e,t){if(cn(e)||!ln(e)||!un(e))throw t||new Error("id is not valid.")}function an(e,t){const n=e.toString().toLocaleLowerCase();if(cn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Yt(e))throw t||new Error("Url should be a valid https url")}function sn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function cn(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function ln(e){return e.length<256&&e.length>4}function un(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function dn(e){if(!e)throw new Error("id must not be empty");if(!1===Ct(e))throw new Error("id must be a valid UUID")}const fn=!!performance&&"now"in performance;function pn(){return fn?performance.now()+performance.timeOrigin:void 0}function gn(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=>gn(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=>gn(e[n],t+1)))}class mn{constructor(e=$t()){this.uuid=e,dn(e)}toString(){return this.uuid}}const hn=new mn,wn=Ie.debug.formatArgs;Ie.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${hn.toString()}]`,wn.call(this,e)};const vn=(0,Ie.debug)("teamsJs");function Cn(e){return vn.extend(e)}function yn(e,t){return`${e}_${t}`}function bn(e){return/^v\d+_[\w.]+$/.test(e)}const Sn=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 En="2.0.1",An="2.0.2",In="2.0.3",Tn="2.0.4",Pn="2.0.1",On="1.9.0",Rn="2.0.0",Fn="1.7.0",kn="1.8.0",Mn="1.9.0",Nn=n.t(Sn,2).validOrigins,xn=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),Ln=/^https:\/\//,Un="https",Dn="teams.microsoft.com",Hn="The library has not yet been initialized",Vn="The runtime has not yet been initialized",_n="The runtime version is not supported",Wn="The call was not properly started";class Bn{}Bn.initializeCalled=!1,Bn.initializeCompleted=!1,Bn.additionalValidOrigins=[],Bn.initializePromise=void 0,Bn.isFramelessWindow=!1,Bn.frameContext=void 0,Bn.hostClientType=void 0,Bn.printCapabilityEnabled=!1;var jn=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 zn=Cn("runtime"),$n=4;function qn(e){return e.apiVersion===$n}const Gn={apiVersion:-1,supports:{}};function Jn(e){if(qn(e))return!0;throw-1===e.apiVersion?new Error(Vn):new Error(_n)}let Kn=Gn;const Zn={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:_t,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:{}}}},Qn=[Ft.desktop,Ft.web,Ft.rigel,Ft.surfaceHub,Ft.teamsRoomsWindows,Ft.teamsRoomsAndroid,Ft.teamsPhones,Ft.teamsDisplays],Xn=[Ft.android,Ft.ios,Ft.ipados],Yn=[...Qn,...Xn];function er(e){let t=e;if(t.apiVersion<$n&&tr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),qn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const tr=[{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=jn(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})}}}],nr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:Qn}],"1.9.0":[{capability:{location:{}},hostClientTypes:Yn}],"2.0.0":[{capability:{people:{}},hostClientTypes:Yn},{capability:{sharing:{}},hostClientTypes:[Ft.desktop,Ft.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[Ft.android,Ft.desktop,Ft.ios,Ft.teamsRoomsAndroid,Ft.teamsPhones,Ft.teamsDisplays,Ft.web]},{capability:{webStorage:{}},hostClientTypes:[Ft.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[Ft.android,Ft.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[Ft.android,Ft.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[Ft.android,Ft.ios,Ft.ipados]}]},rr=zn.extend("generateBackCompatRuntimeConfig");function or(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]=or(e[r]||{},t[r]));return n}function ir(e,t,n){rr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);rr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{zt(e,t)>=0&&n[t].forEach((e=>{void 0!==Bn.hostClientType&&e.hostClientTypes.includes(Bn.hostClientType)&&(r=or(r,e.capability))}))}));const o={apiVersion:$n,hostVersionsInfo:_t,isLegacyTeams:!0,supports:r};return rr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const ar=zn.extend("applyRuntimeConfig");function sr(e){"string"==typeof e.apiVersion&&(ar("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),ar("Fast-forwarding runtime %o",e);const t=er(e);ar("Applying runtime %o",t),Kn=qt(t)}function cr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const lr="2.32.0-beta.1",ur=Cn("internal"),dr=ur.extend("ensureInitializeCalled"),fr=ur.extend("ensureInitialized");function pr(){if(!Bn.initializeCalled)throw dr(Hn),new Error(Hn)}function gr(e,...t){if(!Bn.initializeCompleted)throw fr("%s. initializeCalled: %s",Hn,Bn.initializeCalled.toString()),new Error(Hn);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Bn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Bn.frameContext}".`)}return Jn(e)}function mr(e=En){const t=zt(Bn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function hr(){return Bn.hostClientType==Ft.android||Bn.hostClientType==Ft.ios||Bn.hostClientType==Ft.ipados}function wr(e=En){if(!hr()){throw{errorCode:Et.NOT_SUPPORTED_ON_PLATFORM}}if(!mr(e)){throw{errorCode:Et.OLD_PLATFORM}}}function vr(e){let t=Bn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&Ln.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),Bn.additionalValidOrigins=t}function Cr(e){if(cn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(!Sr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${yr}-${br}).`);if(Er(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const yr=4,br=256;function Sr(e){return e.length<br&&e.length>yr}function Er(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Ar(e){if(!(e instanceof Ir))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Ir{constructor(e){this.appIdAsString=e,Cr(e)}serialize(){return this.toString()}toString(){return this.appIdAsString}}function Tr(e){return null==e}var Pr=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 Or=[];const Rr=Cn("validateOrigin");function Fr(){return Pr(this,void 0,void 0,(function*(){yield Mr()}))}function kr(){return 0===Or.length}function Mr(){return Pr(this,void 0,void 0,(function*(){return kr()?rn()?(Or=Nn,Nn):fetch(xn).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(Nr(JSON.stringify(e)))return Or=e.validOrigins,Or;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),Or=Nn,Or))):Or}))}function Nr(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 xr(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 Mr().then((t=>{if(!Yt(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=>xr(e,n))))return!0;for(const e of Bn.additionalValidOrigins){if(xr("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,Bn.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 Hr="v1",Vr=Cn("messageChannels.telemetry");function _r(){return Ur(this,void 0,void 0,(function*(){if(Dr)return Vr("Returning telemetry port from cache"),Dr;if(!Wr())throw Ht;return Dr=yield Gs(yn(Hr,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),Dr}))}function Wr(){var e;return!(!gr(Kn)||!(null===(e=Kn.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function Br(){Dr=void 0}var jr=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 zr;const $r="v1",qr=Cn("messageChannels.dataLayer");function Gr(){return jr(this,void 0,void 0,(function*(){if(zr)return qr("Returning dataLayer port from cache"),zr;if(!Jr())throw Ht;return zr=yield Gs(yn($r,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),zr}))}function Jr(){var e;return!(!gr(Kn)||!(null===(e=Kn.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Kr(){zr=void 0}function Zr(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");gr(Kn),ys(e)}function Qr(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");gr(Kn),bs(e)}const Xr="v2",Yr=Cn("app"),eo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var to,no;function ro(){return Bn.initializeCompleted}function oo(){return Bn.frameContext}function io(e){return Fr(),Ki(yn(Xr,"app.initialize"),e)}function ao(e){Ls.currentWindow=e}function so(){Bn.initializeCalled&&(os(),Bn.initializeCalled=!1,Bn.initializeCompleted=!1,Bn.initializePromise=void 0,Bn.additionalValidOrigins=[],Bn.frameContext=void 0,Bn.hostClientType=void 0,Bn.isFramelessWindow=!1,Br(),Kr(),Hs())}function co(){return new Promise((e=>{pr(),e(Vs(yn(Xr,"app.getContext"),"getContext"))})).then((e=>wo(e)))}function lo(){pr(),Zi(yn(Xr,"app.notifyAppLoaded"))}function uo(){return Yi(yn(Xr,"app.notifySuccess"))}function fo(e){pr(),Xi(yn(Xr,"app.notifyFailure"),e)}function po(e){pr(),Qi(yn(Xr,"app.notifyExpectedFailure"),e)}function go(e){oa(yn(Xr,"app.registerOnThemeChangeHandler"),e)}function mo(e){ps(e)}function ho(e){return ia(yn(Xr,"app.openLink"),e)}function wo(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:kt.teams,clientType:e.hostClientType?e.hostClientType:Ft.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Bn.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"}(to||(to={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(no||(no={})),Yr("teamsjs instance is version %s, starting at %s UTC (%s local)",lr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(rn())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?Yr("teamsjs is being used from %s. %s",t,n):Yr("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const vo="v1",Co="v2";let yo,bo,So;function Eo(){ss(yn(vo,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",Do,!1),ss(yn(vo,"authentication.registerAuthenticateFailureHandler"),"authentication.authenticate.failure",Ho,!1)}function Ao(e){So=e}function Io(e){const t=void 0!==e,n=t?e:So;if(!n)throw new Error("No parameters are provided for authentication");gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.remove,Mt.task,Mt.stage,Mt.meetingStage);return To(n.successCallback||n.failureCallback?yn(vo,"authentication.authenticate"):yn(Co,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(So=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(So=void 0)}}))}function To(e,t){return new Promise(((n,r)=>{if(Bn.hostClientType!==Ft.web){const r=sn(t.url);an(r),n(js(e,"authentication.authenticate",[r.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)})))}else yo={success:n,fail:r},Mo(t)}))}function Po(e){pr();return Oo(e&&(e.successCallback||e.failureCallback)?yn(vo,"authentication.getAuthToken"):yn(Co,"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 Oo(e,t){return new Promise((n=>{n(js(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 Ro(e){pr();return Fo(e&&(e.successCallback||e.failureCallback)?yn(vo,"authentication.getUser"):yn(Co,"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 Fo(e){return new Promise((t=>{t(js(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function ko(){No();try{Ls.childWindow&&Ls.childWindow.close()}finally{Ls.childWindow=null,Ls.childOrigin=null}}function Mo(e){ko();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=sn(e.url.replace("{oauthRedirectMethod}","web"));an(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?xo():Ho("FailedToOpenWindow")}function No(){bo&&(clearInterval(bo),bo=0),cs("initialize"),cs("navigateCrossDomain")}function xo(){No(),bo=Ls.currentWindow.setInterval((()=>{if(!Ls.childWindow||Ls.childWindow.closed)Ho("CancelledByUser");else{const e=Ls.childOrigin;try{Ls.childOrigin="*",Tc("ping")}finally{Ls.childOrigin=e}}}),100),ss(yn(vo,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[Mt.authentication,Bn.hostClientType])),ss(yn(vo,"authentication.authenticationWindow.registerNavigateCrossDomainHandler"),"navigateCrossDomain",(()=>!1))}function Lo(e,t){gr(Kn,Mt.authentication);Zs(yn(t?vo:Co,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Ac(Ls.parentWindow,(()=>setTimeout((()=>Ls.currentWindow.close()),200)))}function Uo(e,t){gr(Kn,Mt.authentication);Zs(yn(t?vo:Co,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Ac(Ls.parentWindow,(()=>setTimeout((()=>Ls.currentWindow.close()),200)))}function Do(e){try{yo&&yo.success(e)}finally{yo=void 0,ko()}}function Ho(e){try{yo&&yo.fail(new Error(e))}finally{yo=void 0,ko()}}var Vo;function _o(e){ei(yn(Yo,"dialog.update.resize"),e)}function Wo(){return!(!gr(Kn)||!Kn.supports.dialog)&&!!Kn.supports.dialog.update}function Bo(e,t,n){ni(yn(Yo,"dialog.url.bot.open"),e,t,n)}function jo(){return gr(Kn)&&void 0!==(Kn.supports.dialog&&Kn.supports.dialog.url&&Kn.supports.dialog.url.bot)}function zo(e){if(gr(Kn,Mt.task),!Go())throw Ht;Zs(yn(Yo,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function $o(e){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!Go())throw Ht;Zs(yn(Yo,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function qo(e){if(gr(Kn,Mt.task),!Go())throw Ht;for(cs("messageForChild"),ss(yn(Yo,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ai.reverse();ai.length>0;){e(ai.pop())}}function Go(){var e,t;return gr(Kn)&&!!(null===(t=null===(e=Kn.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Jo(e,t,n){ti(yn(Yo,"dialog.url.open"),e,t,n)}function Ko(e,t){ri(yn(Yo,"dialog.url.submit"),e,t)}function Zo(){return gr(Kn)&&void 0!==(Kn.supports.dialog&&Kn.supports.dialog.url)}function Qo(e){return{url:e.url,height:e.size?e.size.height:Lt.Small,width:e.size?e.size.width:Lt.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Xo(e){const t=Qo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(Vo||(Vo={}));const Yo="v2";function ei(e,t){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.task,Mt.meetingStage),!Wo())throw Ht;Zs(e,"tasks.updateTask",[t])}function ti(e,t,n,r){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!Zo())throw Ht;r&&ss(yn(Yo,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Zs(e,"tasks.startTask",[Qo(t)],((e,t)=>{null==n||n({err:e,result:t}),cs("messageForParent")}))}function ni(e,t,n,r){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!jo())throw Ht;r&&ss(yn(Yo,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Zs(e,"tasks.startTask",[Xo(t)],((e,t)=>{null==n||n({err:e,result:t}),cs("messageForParent")}))}function ri(e,t,n){if(gr(Kn,Mt.task),!Zo())throw Ht;Zs(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function oi(e){return{card:e.card,height:e.size?e.size.height:Lt.Small,width:e.size?e.size.width:Lt.Small,title:e.title}}function ii(e){const t=oi(e);return t.completionBotId=e.completionBotId,t}const ai=[];function si(e){Bn.frameContext&&(Bn.frameContext===Mt.task?ai.push(e):cs("messageForChild"))}function ci(e,t){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!li())throw Ht;const n=ii(e);Zs(yn(Yo,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function li(){const e=Kn.hostVersionsInfo&&Kn.hostVersionsInfo.adaptiveCardSchemaVersion&&!Xt(Kn.hostVersionsInfo.adaptiveCardSchemaVersion);return gr(Kn)&&void 0!==(e&&Kn.supports.dialog&&Kn.supports.dialog.card&&Kn.supports.dialog.card.bot)}function ui(e,t){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!di())throw Ht;const n=oi(e);Zs(yn(Yo,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function di(){const e=Kn.hostVersionsInfo&&Kn.hostVersionsInfo.adaptiveCardSchemaVersion&&!Xt(Kn.hostVersionsInfo.adaptiveCardSchemaVersion);return gr(Kn)&&void 0!==(e&&Kn.supports.dialog&&Kn.supports.dialog.card)}function fi(){ss(yn(Yo,"dialog.registerMessageForChildHandler"),"messageForChild",si,!1)}function pi(){return!(!gr(Kn)||!Kn.supports.dialog)}const gi="v2";var mi,hi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(mi||(mi={}));class wi{constructor(){this.enabled=!0,this.selected=!1}}let vi,Ci,yi,bi,Si;function Ei(){ss(yn(gi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Pi,!1),ss(yn(gi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Ri,!1),ss(yn(gi,"menus.registerSetModuleViewHandler"),"setModuleView",Ii,!1)}function Ai(e,t){if(gr(Kn),!Fi())throw Ht;yi=t,Zs(yn(gi,"menus.setUpViews"),"setUpViews",[e])}function Ii(e){yi&&yi(e)||(gr(Kn),Zs(yn(gi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Ti(e,t){if(gr(Kn),!Fi())throw Ht;vi=t,Zs(yn(gi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Pi(e){vi&&vi(e)||(gr(Kn),Zs(yn(gi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Oi(e,t){if(gr(Kn),!Fi())throw Ht;Ci=t,Zs(yn(gi,"menus.showActionMenu"),"showActionMenu",[e])}function Ri(e){Ci&&Ci(e)||(gr(Kn),Zs(yn(gi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Fi(){return!(!gr(Kn)||!Kn.supports.menus)}function ki(){ss(yn(Ma,"pages.config.registerSettingsSaveHandler"),"settings.save",Hi,!1),ss(yn(Ma,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Wi,!1)}function Mi(e){return Wa(yn(Ma,"pages.config.setValidityState"),e)}function Ni(e){return ja(yn(Ma,"pages.config.setConfig"),e)}function xi(e){Li(yn(Ma,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Tr(e)&&!ji())throw Ht}))}function Li(e,t,n){!Tr(t)&&gr(Kn,Mt.settings),n&&n(),bi=t,!Tr(t)&&Zs(e,"registerHandler",["save"])}function Ui(e){Di(yn(Ma,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Tr(e)&&!ji())throw Ht}))}function Di(e,t,n){!Tr(t)&&gr(Kn,Mt.remove,Mt.settings),n&&n(),Si=t,!Tr(t)&&Zs(e,"registerHandler",["remove"])}function Hi(e){const t=new _i(e);bi?bi(t):Ls.childWindow?Tc("settings.save",[e]):t.notifySuccess()}function Vi(e){us(yn(Ma,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[Mt.content],(()=>{if(!ji())throw Ht}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(hi||(hi={}));class _i{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Zs(yn(Ma,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Zs(yn(Ma,"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 Wi(){const e=new Bi;Si?Si(e):Ls.childWindow?Tc("settings.remove",[]):e.notifySuccess()}class Bi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Zs(yn(Ma,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Zs(yn(Ma,"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 ji(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.config}class zi{}class $i extends zi{validate(e){return!0}deserialize(e){return e}}var qi=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 Gi=6e4,Ji=Cn("app");function Ki(e,t){if(rn()){return Ji.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Zt((()=>ra(e,t)),Gi,new Error("SDK initialization timed out."))}function Zi(e){Zs(e,eo.AppLoaded,[lr])}function Qi(e,t){Zs(e,eo.ExpectedFailure,[t.reason,t.message])}function Xi(e,t){Zs(e,eo.Failure,[t.reason,t.message])}function Yi(e){return qi(this,void 0,void 0,(function*(){if(Bn.initializeCompleted)return ta(e);if(!Bn.initializePromise)throw new Error(Hn);return Bn.initializePromise.then((()=>ta(e)))}))}function ea(){var e;return gr(Kn)&&!!(null===(e=Kn.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ta(e){return qi(this,void 0,void 0,(function*(){return ea()?$s(eo.Success,[lr],new $i,e).then((()=>({hasFinishedSuccessfully:!0}))):(Zs(e,eo.Success,[lr]),{hasFinishedSuccessfully:"unknown"})}))}const na=Ji.extend("initializeHelper");function ra(e,t){return new Promise((n=>{Bn.initializeCalled||(Bn.initializeCalled=!0,rs(),Bn.initializePromise=Ds(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=En})=>{Bn.frameContext=e,Bn.hostClientType=t,Bn.clientSupportedSDKVersion=r;try{na("Parsing %s",n);const e=JSON.parse(n);if(na("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&sr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{na("Attempting to parse %s as an SDK version",n),isNaN(zt(n,En))||(Bn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(na("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");sr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;sr(ir(Bn.clientSupportedSDKVersion,Zn,nr))}}Bn.initializeCompleted=!0})),Eo(),Ei(),ki(),fi()),Array.isArray(t)&&vr(t),void 0!==Bn.initializePromise?n(Bn.initializePromise):na("GlobalVars.initializePromise is unexpectedly undefined")}))}function oa(e,t){!Tr(t)&&pr(),ds(e,t)}function ia(e,t){return new Promise((n=>{gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),n(_s(e,"executeDeepLink",t))}))}function aa(e){us(yn(Ma,"pages.appButton.onClick"),"appButtonClick",e,[Mt.content],(()=>{if(!la())throw Ht}))}function sa(e){us(yn(Ma,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[Mt.content],(()=>{if(!la())throw Ht}))}function ca(e){us(yn(Ma,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[Mt.content],(()=>{if(!la())throw Ht}))}function la(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.appButton}function ua(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),!fa())throw Ht;t(Bs(yn(Ma,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function da(){return new Promise((e=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),!fa())throw Ht;e(Bs(yn(Ma,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function fa(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.currentApp}function pa(){if(gr(Kn,Mt.content),!ma())throw Ht;Zs(yn(Ma,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function ga(){if(gr(Kn,Mt.content),!ma())throw Ht;Zs(yn(Ma,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function ma(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.fullTrust}function ha(e){return La(yn(Ma,"pages.tabs.navigateToTab"),e)}function wa(e){return Da(yn(Ma,"pages.tabs.getTabInstances"),e)}function va(e){return Ha(yn(Ma,"pages.tabs.getMruTabInstances"),e)}function Ca(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.tabs}var ya,ba;function Sa(e){const t=yn(Ma,"pages.returnFocus");if(gr(Kn),!ka())throw Ht;if(void 0===e&&Zs(t,"returnFocus",[!1]),"boolean"==typeof e)Zs(t,"returnFocus",[e]);else switch(e){case ba.PreviousLandmark:case ba.GoToActivityFeed:Zs(t,"returnFocus",[!1,e]);break;case ba.NextLandmark:Zs(t,"returnFocus",[!0,e])}}function Ea(e){us(yn(Ma,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!ka())throw Ht}))}function Aa(e){_a(yn(Ma,"pages.setCurrentFrame"),e)}function Ia(e,t,n){Fr(),Ki(yn(Ma,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Aa(e)}function Ta(){return Ba(yn(Ma,"pages.getConfig."))}function Pa(e){return Na(yn(Ma,"pages.navigateCrossDomain"),e)}function Oa(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),!ka())throw Ht;const n=yn(Ma,"pages.navigateToApp");if(Kn.isLegacyTeams){t(_s(n,"executeDeepLink",Qt(za(e)?e:$a(e))))}else{t(_s(n,"pages.navigateToApp",za(e)?qa(e):e))}}))}function Ra(e){return Va(yn(Ma,"pages.shareDeepLink"),e)}function Fa(e){us(yn(Ma,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Tr(e)&&!ka())throw Ht}))}function ka(){return!(!gr(Kn)||!Kn.supports.pages)}!function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(ya||(ya={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(ba||(ba={}));const Ma="v2";function Na(e,t){return new Promise((n=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.remove,Mt.task,Mt.stage,Mt.meetingStage),!ka())throw Ht;n(Ws(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function xa(e){return new Promise((t=>{if(gr(Kn),!Ya())throw Ht;t(Ws(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function La(e,t){return new Promise((n=>{if(gr(Kn),!Ca())throw Ht;n(Ws(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Ua(e,t){if(gr(Kn),!ka())throw Ht;Zs(e,"returnFocus",[t])}function Da(e,t){return new Promise((n=>{if(gr(Kn),!Ca())throw Ht;n(Vs(e,"getTabInstances",t))}))}function Ha(e,t){return new Promise((n=>{if(gr(Kn),!Ca())throw Ht;n(Vs(e,"getMruTabInstances",t))}))}function Va(e,t){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!ka())throw Ht;Zs(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function _a(e,t){if(gr(Kn,Mt.content),!ka())throw Ht;Zs(e,"setFrameContext",[t])}function Wa(e,t){if(gr(Kn,Mt.settings,Mt.remove),!ji())throw Ht;Zs(e,"settings.setValidityState",[t])}function Ba(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.settings,Mt.remove,Mt.sidePanel),!ka())throw Ht;t(Vs(e,"settings.getSettings"))}))}function ja(e,t){return new Promise((n=>{if(gr(Kn,Mt.content,Mt.settings,Mt.sidePanel),!ji())throw Ht;n(_s(e,"settings.setSettings",t))}))}function za(e){return e.appId instanceof Ir}function $a(e){return Object.assign(Object.assign({},e),{appId:new Ir(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function qa(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let Ga;function Ja(){ss(yn(Ma,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Xa,!1)}function Ka(){return xa(yn(Ma,"pages.backStack.navigateBack"))}function Za(e){Qa(yn(Ma,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Tr(e)&&!Ya())throw Ht}))}function Qa(e,t,n){!Tr(t)&&gr(Kn),n&&n(),Ga=t,!Tr(t)&&Zs(e,"registerHandler",["backButton"])}function Xa(){Ga&&Ga()||(Ls.childWindow?Tc("backButtonPress",[]):Ka())}function Ya(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.backStack}var es=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 ts=Cn("handlers");class ns{static initializeHandlers(){ns.handlers.themeChange=fs,ns.handlers.load=hs,ns.handlers.beforeUnload=Cs,Ja()}static uninitializeHandlers(){ns.handlers={},ns.themeChangeHandler=null,ns.loadHandler=null,ns.beforeUnloadHandler=null,ns.beforeSuspendOrTerminateHandler=null,ns.resumeHandler=null}}function rs(){ns.initializeHandlers()}function os(){ns.uninitializeHandlers()}ns.handlers={},ns.themeChangeHandler=null,ns.loadHandler=null,ns.beforeUnloadHandler=null,ns.beforeSuspendOrTerminateHandler=null,ns.resumeHandler=null,ns.hostToAppPerformanceMetricsHandler=null;const is=ts.extend("callHandler");function as(e,t){const n=ns.handlers[e];if(n){is("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Ls.childWindow?(Tc(e,t),[!1,void 0]):(is("Handler for action message %s not found.",e),[!1,void 0])}function ss(e,t,n,r=!0,o=[]){n?(ns.handlers[t]=n,r&&Zs(e,"registerHandler",[t,...o])):delete ns.handlers[t]}function cs(e){delete ns.handlers[e]}function ls(e){return null!=ns.handlers[e]}function us(e,t,n,r,o){n&&gr(Kn,...r),o&&o(),ss(e,t,n)}function ds(e,t){ns.themeChangeHandler=t,!Tr(t)&&Zs(e,"registerHandler",["themeChange"])}function fs(e){ns.themeChangeHandler&&ns.themeChangeHandler(e),Ls.childWindow&&Tc("themeChange",[e])}function ps(e){ns.hostToAppPerformanceMetricsHandler=e}function gs(e){ns.hostToAppPerformanceMetricsHandler&&ns.hostToAppPerformanceMetricsHandler(e)}function ms(e,t){ns.loadHandler=t,!Tr(t)&&Zs(e,"registerHandler",["load"])}function hs(e){const t=ws(e);ns.resumeHandler?(ns.resumeHandler(t),Ls.childWindow&&Tc("load",[t])):ns.loadHandler&&(ns.loadHandler(e),Ls.childWindow&&Tc("load",[e]))}function ws(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function vs(e,t){ns.beforeUnloadHandler=t,!Tr(t)&&Zs(e,"registerHandler",["beforeUnload"])}function Cs(){return es(this,void 0,void 0,(function*(){const e=()=>{Zs(yn("v2","handleBeforeUnload"),"readyToUnload",[])};ns.beforeSuspendOrTerminateHandler?(yield ns.beforeSuspendOrTerminateHandler(),Ls.childWindow?Tc("beforeUnload"):e()):ns.beforeUnloadHandler&&ns.beforeUnloadHandler(e)||(Ls.childWindow?Tc("beforeUnload"):e())}))}function ys(e){ns.beforeSuspendOrTerminateHandler=e,!Tr(e)&&Zs(yn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function bs(e){ns.resumeHandler=e,!Tr(e)&&Zs(yn("v2","registerOnResumeHandler"),"registerHandler",["load"])}class Ss{static storeCallbackInformation(e,t){Ss.callbackInformation.set(e,t)}static clearMessages(){Ss.callbackInformation.clear()}static deleteMessageInformation(e){Ss.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?gs({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=Ss.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(gs({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Ss.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Ss.callbackInformation=new Map;var Es=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 As=e=>{const{uuid:t}=e,n=Es(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Is=e=>{const{uuidAsString:t}=e,n=Es(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new mn(t):void 0})},Ts=e=>{const{uuidAsString:t}=e,n=Es(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new mn(t):void 0})},Ps=e=>{const{uuid:t}=e,n=Es(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Os=Cn("nestedAppAuthUtils"),Rs=Os.extend("tryPolyfillWithNestedAppAuthBridge");function Fs(e,t,n){var r;const o=Rs;if(Bn.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=Ms(a,n);s&&(a.nestedAppAuthBridge=s)}const ks=Os.extend("createNestedAppAuthBridge");function Ms(e,t){const n=ks;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 Ns=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 xs=Cn("communication");class Ls{}class Us{}function Ds(e,t){if(Us.messageListener=e=>oc(e),Ls.currentWindow=Ls.currentWindow||nn(),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."));Bn.isFramelessWindow=!0,e.onNativeMessage=gc}try{return Ls.parentOrigin="*",js(t,"initialize",[lr,$n,e]).then((([e,t,n,r])=>(Fs(r,Ls.currentWindow,{onMessage:ac,sendPostMessage:Xs}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Ls.parentOrigin=null}}function Hs(){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={},Ss.clearMessages()}function Vs(e,t,...n){return js(e,t,n).then((([e])=>e))}function _s(e,t,...n){return js(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function Ws(e,t,n,...r){return js(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function Bs(e,t,...n){return js(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function js(e,t,n=void 0){if(!bn(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(Ks(nc(e,t,n).uuid))}))}function zs(e){return e.map((e=>cr(e)?e.serialize():e))}function $s(e,t,n,r,o){var i;return Ns(this,void 0,void 0,(function*(){const a=zs(t),[s]=yield js(r,e,a);if(o&&o(s)||!o&&Dt(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(`${Et.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function qs(e,t,n,r){var o;return Ns(this,void 0,void 0,(function*(){const i=zs(t),[a]=yield js(n,e,i);if(r&&r(a)||!r&&Dt(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Et.INTERNAL_ERROR}, message: Invalid response from host`)}))}function Gs(e,t,n=void 0){if(!bn(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 Js(nc(e,t,n).uuid)}function Js(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 Ks(e){return new Promise((t=>{Us.promiseCallbacks.set(e,t)}))}function Zs(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!bn(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=nc(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 Qs=xs.extend("sendNestedAuthRequestToTopWindow");function Xs(e){const t=Qs,n=Ls.topWindow,r=Oc(e);return t("Message %s information: %o",kc(r),{actionName:r.func}),ec(n,r)}const Ys=xs.extend("sendRequestToTargetWindowHelper");function ec(e,t){const n=Ys,r=bc(e),o=As(t);if(Bn.isFramelessWindow)Ls.currentWindow&&Ls.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",kc(o),r),Ls.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=yc(e);e&&i?(n("Sending message %s to %s via postMessage",kc(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",kc(o),r),Cc(e).push(t))}return t}const tc=xs.extend("sendMessageToParentHelper");function nc(e,t,n){const r=tc,o=Ls.parentWindow,i=Pc(e,t,n);return Ss.storeCallbackInformation(i.uuid,{name:t,calledAt:i.timestamp}),r("Message %s information: %o",kc(i),{actionName:t,args:n}),ec(o,i)}const rc=xs.extend("processIncomingMessage");function oc(e){return Ns(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void rc("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 cc(t,n).then((r=>{r?(lc(t,n),t===Ls.parentWindow?gc(e):t===Ls.childWindow&&wc(e)):rc("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 ic=xs.extend("processAuthBridgeMessage");function ac(e,t){var n,r;const o=ic;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?cc(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),Ec(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 sc=xs.extend("shouldProcessIncomingMessage");function cc(e,t){return Ns(this,void 0,void 0,(function*(){if(Ls.currentWindow&&e===Ls.currentWindow)return sc("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 sc("Message has an invalid origin of %s",t),!1}const n=yield Lr(e);return n||sc("Message has an invalid origin of %s",t),n}}))}function lc(e,t){Bn.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),Ec(Ls.parentWindow),Ec(Ls.childWindow)}const uc=xs.extend("handleIncomingMessageFromParent");function dc(e){const t=uc;if(!e.uuid)return Us.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=fc(Us.callbacks,t);if(n)return n;const r=fc(Us.promiseCallbacks,t);if(r)return r;const o=fc(Us.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",kc(e))}function fc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function pc(e,t){const n=fc(t,e.uuid);n&&t.delete(n),e.uuid?Us.legacyMessageIdsToUuidMap={}:delete Us.legacyMessageIdsToUuidMap[e.id]}function gc(e){const t=uc,n=pn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Ts(r),i=dc(o);if(i){const r=Us.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Ss.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]),mc(e)||(t("Removing registered callback for message %s",i.toString()),pc(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()),pc(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()),pc(o,Us.portCallbacks)}o.uuid&&(Us.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Ss.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',kc(r),r.func),as(r.func,r.args)}else t("Received an unknown message: %O",e)}function mc(e){return!0===e.data.isPartialResponse}const hc=xs.extend("handleIncomingMessageFromChild");function wc(e){if("id"in e.data&&"func"in e.data){const t=Is(e.data),[n,r]=as(t.func,t.args);n&&void 0!==r?(hc("Returning message %s from child back to child, action: %s.",kc(t),t.func),Ic(t.id,t.uuid,Array.isArray(r)?r:[r])):(hc("Relaying message %s from child to parent, action: %s. Relayed message will have a new id.",kc(t),t.func),Zs(yn("v2","tasks.startTask"),t.func,t.args,((...e)=>{if(Ls.childWindow){const n=e.pop();hc("Message from parent being relayed to child, id: %s",kc(t)),Ic(t.id,t.uuid,e,n)}})))}}function vc(){return Ls.topWindow!==Ls.parentWindow}function Cc(e){return e===Ls.topWindow&&vc()?Us.topMessageQueue:e===Ls.parentWindow?Us.parentMessageQueue:e===Ls.childWindow?Us.childMessageQueue:[]}function yc(e){return e===Ls.topWindow&&vc()?Ls.topOrigin:e===Ls.parentWindow?Ls.parentOrigin:e===Ls.childWindow?Ls.childOrigin:null}function bc(e){return e===Ls.topWindow&&vc()?"top":e===Ls.parentWindow?"parent":e===Ls.childWindow?"child":null}const Sc=xs.extend("flushMessageQueue");function Ec(e){const t=yc(e),n=Cc(e),r=bc(e);for(;e&&t&&n.length>0;){const o=n.shift();if(o){const n=As(o);Sc("Flushing message %s from %s message queue via postMessage.",kc(n),r),e.postMessage(n,t)}}}function Ac(e,t){let n;n=Ls.currentWindow.setInterval((()=>{0===Cc(e).length&&(clearInterval(n),t())}),100)}function Ic(e,t,n,r){const o=Ls.childWindow,i=Rc(e,t,n,r),a=Ps(i),s=yc(o);o&&s&&o.postMessage(a,s)}function Tc(e,t){const n=Ls.childWindow,r=Fc(e,t),o=yc(n);n&&o?n.postMessage(r,o):Cc(n).push(r)}function Pc(e,t,n){const r=Us.nextMessageId++,o=new mn;return Us.legacyMessageIdsToUuidMap[r]=o,{id:r,uuid:o,func:t,timestamp:Date.now(),monotonicTimestamp:pn(),args:n||[],apiVersionTag:e}}function Oc(e){const t=Us.nextMessageId++,n=new mn;return Us.legacyMessageIdsToUuidMap[t]=n,{id:t,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:pn(),args:[],data:e}}function Rc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Fc(e,t){return{func:e,args:t||[]}}function kc(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 Mc="v1";function Nc(e){if(!Tr(e)&&gr(Kn),!Tr(e)&&!xc())throw Ht;e?ss(yn(Mc,"log.request"),"log.request",(()=>{const t=e();Zs(yn(Mc,"log.receive"),"log.receive",[t])})):cs("log.request")}function xc(){return!(!gr(Kn)||!Kn.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 Hc="v1";function Vc(e,t){gr(Kn),Zs(yn(Hc,"uploadCustomApp"),"uploadCustomApp",[e],t||jt())}function _c(e,t,n){gr(Kn),Zs(yn(Hc,"sendCustomMessage"),e,t,n)}function Wc(e,t){if(gr(Kn),!Ls.childWindow)throw new Error("The child window has not yet been initialized or is not present");Tc(e,t)}function Bc(e,t){gr(Kn),ss(yn(Hc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function jc(e,t){gr(Kn),ss(yn(Hc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function zc(e){gr(Kn,Mt.content,Mt.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];Zs(yn(Hc,"openFilePreview"),"openFilePreview",t)}const $c="v1";function qc(e){return new Promise((t=>{if(gr(Kn,Mt.content),!Kc())throw Ht;const n=_s(yn($c,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&ss(yn($c,"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&&ss(yn($c,"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 Gc(){if(gr(Kn,Mt.content),!Kc())throw Ht;Zs(yn($c,"conversations.closeConversation"),"conversations.closeConversation"),cs("startConversation"),cs("closeConversation")}function Jc(){return new Promise((e=>{if(gr(Kn),!Kc())throw Ht;e(Vs(yn($c,"conversations.getChatMember"),"getChatMembers"))}))}function Kc(){return!(!gr(Kn)||!Kn.supports.conversations)}var Zc=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 Qc="v2",Xc=Cn("copilot");function Yc(){var e,t;return gr(Kn)&&(!!(null===(e=Kn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=Kn.supports.copilot)||void 0===t?void 0:t.eligibility))}function el(){var e,t;return Zc(this,void 0,void 0,(function*(){if(gr(Kn),!Yc())throw new Error(`Error code: ${Ht.errorCode}, message: Not supported on platform`);if(null===(e=Kn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)return Xc("Eligibility information is already available on runtime."),Kn.hostVersionsInfo.appEligibilityInformation;Xc("Eligibility information is not available on runtime. Requesting from host.");const n=yield Vs(yn(Qc,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo");if(Dt(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(!tl(n))throw new Error("Error deserializing eligibility information");return n}))}function tl(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 nl="v2";class rl{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function ol(e){const t=e;return t.responseType===sl.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const il="Action.Execute";var al,sl,cl;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(al||(al={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(sl||(sl={}));class ll extends zi{validate(e){return ol(e)}deserialize(e){return e}}function ul(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(cl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function dl(e){e.requestType===al.ActionExecuteInvokeRequest?fl(e):e.requestType===al.QueryMessageExtensionRequest&&pl(e)}function fl(e){if(e.type!==il){throw{errorCode:cl.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${il}"`}}if(!gn(e.data)){throw{errorCode:cl.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function pl(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 gl(e,t,n){if(gr(Kn,Mt.content),!Cl())throw Ht;const r=new Ir(e);return dl(n),js(yn(nl,"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 ml(e,t){if(gr(Kn,Mt.content),!Cl())throw Ht;const n=new Ir(e);return js(yn(nl,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function hl(e,t,n){if(gr(Kn,Mt.content),!Cl())throw Ht;const r=new Ir(e);return dl(n),js(yn(nl,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function wl(e,t,n){if(gr(Kn,Mt.content),!Cl())throw Ht;return on(e,new Error("titleId is Invalid.")),on(t,new Error("oauthConfigId is Invalid.")),js(yn(nl,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function vl(e,t,n){if(gr(Kn,Mt.content),!Cl())throw Ht;return on(e,new Error("titleId is Invalid.")),t&&an(t),js(yn(nl,"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 Cl(){return!(!gr(Kn)||!Kn.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(cl||(cl={}));var yl=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 bl="v2";function Sl(e,t,n){return yl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Tl())throw Ht;return Pl(e,t),qs("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.claims,n.silent],yn(bl,"externalAppAuthenticationForCEA.authenticateWithSSO"),ul)}))}function El(e,t,n){return yl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Tl())throw Ht;return Pl(e,t),qs("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],yn(bl,"externalAppAuthenticationForCEA.authenticateWithOauth"),ul)}))}function Al(e,t,n,r){return yl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Tl())throw Ht;return Pl(e,t),fl(r),$s("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new rl(r),n.url.href,n.width,n.height,n.isExternal],new ll,yn(bl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),ul)}))}function Il(e,t,n,r){return yl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Tl())throw Ht;return Pl(e,t),fl(r),$s("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new rl(r),n.claims,n.silent],new ll,yn(bl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),ul)}))}function Tl(){return!(!gr(Kn)||!Kn.supports.externalAppAuthenticationForCEA)}function Pl(e,t){on(t,new Error("conversation id is not valid.")),Ar(e)}const Ol="v2";var Rl,Fl;function kl(e,t){if(gr(Kn,Mt.content),!Nl())throw Ht;const n=new Ir(e);return js(yn(Ol,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Ml(e,t,n){if(gr(Kn,Mt.content),!Nl())throw Ht;const r=new Ir(e);return js(yn(Ol,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function Nl(){return!(!gr(Kn)||!Kn.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"}(Fl||(Fl={}));var xl=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 xl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Hl())throw Ht;Pl(e,t);const[r,o]=yield js(yn(Ll,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function Dl(e,t,n){return xl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Hl())throw Ht;Pl(e,t);const r=yield Vs(yn(Ll,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Hl(){return!(!gr(Kn)||!Kn.supports.externalAppCardActionsForCEA)}var Vl=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 _l="v2";function Wl(e,t,n){return Vl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Bl())throw Ht;const r=new Ir(e),[o,i]=yield js(yn(_l,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Bl(){return!(!gr(Kn)||!Kn.supports.externalAppCommands)}const jl="v1";var zl,$l,ql,Gl,Jl,Kl;function Zl(e,t){if(gr(Kn,Mt.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");Zs(yn(jl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Ql(e,t){if(gr(Kn,Mt.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");Zs(yn(jl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Xl(e,t,n){if(gr(Kn,Mt.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");Zs(yn(jl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Yl(e,t,n){if(gr(Kn,Mt.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");Zs(yn(jl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function eu(e,t,n){if(gr(Kn,Mt.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");Zs(yn(jl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function tu(e=!1,t){if(gr(Kn,Mt.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Zs(yn(jl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function nu(e,t,n,r,o=!1,i){if(gr(Kn,Mt.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");Zs(yn(jl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function ru(e){if(gr(Kn,Mt.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Zs(yn(jl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function ou(e=void 0,t){if(gr(Kn,Mt.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Zs(yn(jl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function iu(e){if(gr(Kn,Mt.content),!e)throw gu(Et.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Zs(yn(jl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function au(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw gu(Et.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Zs(yn(jl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function su(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw gu(Et.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Zs(yn(jl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function cu(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw gu(Et.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Zs(yn(jl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function lu(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw gu(Et.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Zs(yn(jl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function uu(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw gu(Et.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Zs(yn(jl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function du(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw gu(Et.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw gu(Et.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Zs(yn(jl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function fu(e){if(gr(Kn),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");ss(yn(jl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function pu(e){if(gr(Kn),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");ss(yn(jl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function gu(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"}(zl||(zl={})),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"}($l||($l={})),function(e){e.ClassMaterials="classMaterials"}(ql||(ql={})),function(e){e.Readonly="readonly"}(Gl||(Gl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(Jl||(Jl={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Kl||(Kl={}));const mu="v1";function hu(){return new Promise((e=>{if(gr(Kn),!yu())throw Ht;e(Bs(yn(mu,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function wu(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(gr(Kn),!yu())throw Ht;t(Bs(yn(mu,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function vu(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(gr(Kn),!yu())throw Ht;ss(yn(mu,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{gr(Kn),e(t)}))}function Cu(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(gr(Kn),!yu())throw Ht;ss(yn(mu,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{gr(Kn),e(t)}))}function yu(){return!(!gr(Kn)||!Kn.supports.meetingRoom)}function bu(){return!(!gr(Kn)||!Kn.supports.messageChannels)}const Su="v1";function Eu(e){if(gr(Kn,Mt.content),!Au())throw Ht;Zs(yn(Su,"notifications.showNotification"),"notifications.showNotification",[e])}function Au(){return!(!gr(Kn)||!Kn.supports.notifications)}const Iu="v2";function Tu(e){if(!Ru())throw new Error(Et.NOT_SUPPORTED_ON_PLATFORM.toString());if(Tr(e))throw new Error(Et.INVALID_ARGUMENTS.toString());ss(yn(Iu,"otherApp.install"),"otherApp.install",e)}function Pu(){if(!Ru())throw new Error(Et.NOT_SUPPORTED_ON_PLATFORM.toString());Zs(yn(Iu,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),cs("otherApp.install")}function Ou(e){if(!Ru())throw new Error(Et.NOT_SUPPORTED_ON_PLATFORM.toString());return qs("otherApp.notifyInstallCompleted",[e.toString()],yn(Iu,"otherApp.notifyInstallCompleted"))}function Ru(){return!(!gr(Kn)||!Kn.supports.otherAppStateChange)}const Fu="v1";var ku,Mu,Nu;function xu(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;Zs(yn(Fu,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Lu(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(gr(Kn,Mt.sidePanel),!Bu())throw Ht;Zs(yn(Fu,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Uu(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(gr(Kn,Mt.sidePanel),!Bu())throw Ht;Zs(yn(Fu,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function Du(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;Zs(yn(Fu,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Hu(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;ss(yn(Fu,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Vu(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;ss(yn(Fu,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function _u(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;ss(yn(Fu,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Wu(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;ss(yn(Fu,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Bu(){return!(!gr(Kn)||!Kn.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"}(ku||(ku={})),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"}(Mu||(Mu={})),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"}(Nu||(Nu={}));const ju="v1";function zu(e,t,n,r){if(gr(Kn,Mt.content),!$u())throw Ht;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");Zs(yn(ju,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function $u(){return!(!gr(Kn)||!Kn.supports.appEntity)}const qu="v1";function Gu(e){return new Promise((t=>{if(gr(Kn),!Ju())throw Ht;if((Bn.hostClientType===Ft.android||Bn.hostClientType===Ft.teamsRoomsAndroid||Bn.hostClientType===Ft.teamsPhones||Bn.hostClientType===Ft.teamsDisplays)&&!mr(Pn)){const e={errorCode:Et.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Vs(yn(qu,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function Ju(){return!(!gr(Kn)||!Kn.supports.teams)&&(!!Kn.supports.teams.fullTrust&&!!Kn.supports.teams.fullTrust.joinedTeams)}const Ku="v1";function Zu(e){return new Promise((t=>{if(gr(Kn),!Qu())throw Ht;t(Vs(yn(Ku,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function Qu(){return!(!gr(Kn)||!Kn.supports.teams)&&!!Kn.supports.teams.fullTrust}const Xu="v1";var Yu;function ed(e,t){if(gr(Kn,Mt.content),!nd())throw Ht;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Zs(yn(Xu,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function td(e,t){if(gr(Kn),!nd())throw Ht;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Zs(yn(Xu,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function nd(){return!(!gr(Kn)||!Kn.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Yu||(Yu={}));class rd{static setTimeout(e,t){const n=performance.now(),r=$t();return rd.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete rd.setTimeoutCallbacks[e]}static setInterval(e,t){rd.setTimeout((function n(){e(),rd.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in rd.setTimeoutCallbacks){const r=rd.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){rd.setTimeoutCallbacks[e].callback(),delete rd.setTimeoutCallbacks[e]}}}rd.setTimeoutCallbacks={};class od{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){rd.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&&rd.clearTimeout(this.timeoutId),this.timeoutId=rd.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(od.maxSessionTimeoutInMs,2*t.timeoutInMs):od.initialSessionTimeoutInMs}}od.initialSessionTimeoutInMs=1e3,od.maxSessionTimeoutInMs=3e4;const id="v2";class ad{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new od(ad.distributionBinSize,(e=>this.reportPerformanceEvent(yn(id,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){rd.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(yn(id,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),ad.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){rd.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(yn(id,"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(yn(id,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}ad.distributionBinSize=1e3,ad.calculateFPSInterval=1e3;var sd=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())}))},cd=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 ld="v2",ud=rn()?void 0:new ad(Zs);var dd,fd,pd;function gd(e){if(gr(Kn,Mt.sidePanel),!Cd())throw Ht;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(ss(yn(ld,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==ud?void 0:ud.setFrameProcessTimeLimit(e.timeLimit)),!1),Ad())yd(e.videoFrameHandler,e.config);else{if(!Td())throw Ht;Sd(e.videoBufferHandler,e.config)}null==ud||ud.startMonitorSlowFrameProcessing()}function md(e,t){if(gr(Kn,Mt.sidePanel),!Cd())throw Ht;Zs(yn(ld,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function hd(e){if(gr(Kn,Mt.sidePanel),!Cd())throw Ht;ss(yn(ld,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Hd(e,ud),!1),Zs(yn(ld,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function wd(e){Zs(yn(ld,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function vd(e){Zs(yn(ld,"videoEffects.notifyError"),"video.notifyError",[e])}function Cd(){return gr(Kn)&&!!Kn.supports.video&&(!!Kn.supports.video.mediaStream||!!Kn.supports.video.sharedFrame)}function yd(e,t){if(gr(Kn,Mt.sidePanel),!Cd()||!Ad())throw Ht;ss(yn(ld,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>sd(this,void 0,void 0,(function*(){const{streamId:n}=t,r=bd(e,ud);yield Rd(n,r,vd,ud)}))),!1),Zs(yn(ld,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function bd(e,t){return n=>sd(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 Sd(e,t){if(gr(Kn,Mt.sidePanel),!Cd()||!Td())throw Ht;ss(yn(ld,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==ud||ud.reportStartFrameProcessing(t.width,t.height),e(Ed(t),(()=>{null==ud||ud.reportFrameProcessed(),wd(n)}),vd)}}),!1),Zs(yn(ld,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Ed(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=cd(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Ad(){var e;return gr(Kn,Mt.sidePanel)&&Id()&&!!(null===(e=Kn.supports.video)||void 0===e?void 0:e.mediaStream)}function Id(){var e,t,n,r;return!(!(null===(t=null===(e=nn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=nn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Td(){var e;return gr(Kn,Mt.sidePanel)&&!!(null===(e=Kn.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(dd||(dd={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(fd||(fd={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(pd||(pd={}));var Pd=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 Od="v2";function Rd(e,t,n,r){var o,i;return Pd(this,void 0,void 0,(function*(){const a=Md();!rn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Nd(yield kd(e,n,r),new xd(n,t),a.writable)}))}function Fd(e,t,n,r){var o,i;return Pd(this,void 0,void 0,(function*(){const a=Md();!rn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Nd(yield kd(e,n,r),new Dd(n,t),a.writable)}))}function kd(e,t,n){return Pd(this,void 0,void 0,(function*(){if(rn())throw Ht;const r=nn().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 Md(){if(rn())throw Ht;const e=window.MediaStreamTrackGenerator;if(!e)throw Ht;return new e({kind:"video"})}function Nd(e,t,n){new(0,nn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class xd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Pd(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 Ld{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 Ud{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 Dd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Pd(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=>Pd(this,void 0,void 0,(function*(){if(rn())throw Ht;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 Ld(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 Ud(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}}})),ss(yn(Od,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function Hd(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Zs(yn(Od,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in pd?e:pd.InitializationFailure;Zs(yn(Od,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var Vd=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 _d="v2",Wd=2e3,Bd=rn()?void 0:new ad(Zs);var jd;function zd(e){var t,n;if(!Qd())throw Ht;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(gr(Kn,Mt.sidePanel)){if(ss(yn(_d,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Bd?void 0:Bd.setFrameProcessTimeLimit(e)),!1),null===(t=Kn.supports.video)||void 0===t?void 0:t.mediaStream)ss(yn(_d,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Vd(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=Bd?qd(e.videoFrameHandler,Bd):e.videoFrameHandler;r?yield Fd(n,o,Yd,Bd):yield Rd(n,o,Yd,Bd)}))),!1),Zs(yn(_d,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=Kn.supports.video)||void 0===n?void 0:n.sharedFrame))throw Ht;ss(yn(_d,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==Bd||Bd.reportStartFrameProcessing(t.width,t.height);const n=$d(),r=t.timestamp;e.videoBufferHandler(Gd(t),(()=>{n(),null==Bd||Bd.reportFrameProcessed(),Xd(r)}),Yd)}}),!1),Zs(yn(_d,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Bd||Bd.startMonitorSlowFrameProcessing()}}function $d(){const e=setTimeout((()=>{Yd(`Frame not processed in ${Wd}ms`,jd.Warn)}),Wd);return function(){clearTimeout(e)}}function qd(e,t){return n=>Vd(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=$d(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function Gd(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Jd(e,t,n){if(gr(Kn,Mt.sidePanel),!Qd())throw Ht;Zs(yn(_d,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Kd(e){if(gr(Kn,Mt.sidePanel),!Qd())throw Ht;ss(yn(_d,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Hd(e,Bd),!1),Zs(yn(_d,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Zd(e){if(gr(Kn,Mt.sidePanel),!Cd())throw Ht;Zs(yn(_d,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Qd(){return gr(Kn),Cd()}function Xd(e){Zs(yn(_d,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Yd(e,t=jd.Warn){Zs(yn(_d,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function ef(e){if(gr(Kn),!Cd())throw Ht;Yd(e,jd.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(jd||(jd={}));const tf="v2";class nf extends zi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class rf{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class of{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class af extends zi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class sf{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class cf extends zi{validate(e){const t=new af;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function lf(e,t){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(mf(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Et.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return $s("hostEntity.tab.addAndConfigure",[new of(e),t],new af,yn(tf,"hostEntity.tab.addAndConfigure"))}function uf(e){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return mf(e.threadId),$s("hostEntity.tab.getAll",[new of(e)],new cf,yn(tf,"hostEntity.tab.getAll"))}function df(e,t){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return hf(e),mf(t.threadId),$s("hostEntity.tab.reconfigure",[new rf(e),new of(t)],new nf,yn(tf,"hostEntity.tab.reconfigure"))}function ff(e,t){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return hf(e),mf(t.threadId),$s("hostEntity.tab.rename",[new rf(e),new of(t)],new nf,yn(tf,"hostEntity.tab.rename"))}function pf(e,t){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return mf(t.threadId),hf(e),$s("hostEntity.tab.remove",[new sf(e),new of(t)],new $i,yn(tf,"hostEntity.tab.remove"))}function gf(){var e;return!!(gr(Kn)&&vf()&&(null===(e=Kn.supports.hostEntity)||void 0===e?void 0:e.tab))}function mf(e){if(!e||0==e.length)throw new Error(`Error code: ${Et.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function hf(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Et.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var wf;function vf(){return!(!gr(Kn)||!Kn.supports.hostEntity)}!function(e){e.edu="EDU"}(wf||(wf={}));var Cf=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 yf="v2";var bf;!function(e){e.FullStore="fullstore",e.SpecificStore="specificstore",e.InContextStore="ics",e.AppDetail="appdetail"}(bf||(bf={}));const Sf="Invalid store dialog type, but type needed to specify store to open",Ef="No App Id present, but AppId needed to open AppDetail store",Af="No Collection Id present, but CollectionId needed to open a store specific to a collection";function If(e){return Cf(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!Tf())throw Ht;if(void 0===e||!Object.values(bf).includes(e.dialogType))throw new Error(Sf);if(e.dialogType===bf.AppDetail&&!(e.appId instanceof Ir))throw new Error(Ef);if(e.dialogType===bf.SpecificStore&&!e.collectionId)throw new Error(Af);return qs("store.open",[e.dialogType,e.appId,e.collectionId],yn(yf,"store.open"))}))}function Tf(){return gr(Kn)&&!!Kn.supports.store}function Pf(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.")}class Of{constructor(e){this.val=e,Pf(e)}toString(){return this.val}}const Rf="/l/app/",Ff="/l/meeting/new",kf="attendees",Mf="startTime",Nf="endTime",xf="subject",Lf="content",Uf="/l/call/0/0",Df="source",Hf="withVideo",Vf="/l/chat/0/0",_f="users",Wf="topicName",Bf="message";function jf(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${_f}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Wf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Bf}=${encodeURIComponent(n)}`;return`${Un}://${Dn}${Vf}?${r}${o}${i}`}function zf(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${_f}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Hf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Df}=${encodeURIComponent(n)}`;return`${Un}://${Dn}${Uf}?${r}${o}${i}`}function $f(e,t,n,r,o){const i=void 0===e?"":`${kf}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Mf}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Nf}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${xf}=${encodeURIComponent(r)}`,l=void 0===o?"":`&${Lf}=${encodeURIComponent(o)}`;return`${Un}://${Dn}${Ff}?${i}${a}${s}${c}${l}`}function qf(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${Un}://${Dn}${Rf}${encodeURIComponent(e)}`}const Gf="v1";function Jf(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),!Kf())throw new Error("Not supported");const n=yn(Gf,"appInstallDialog.openAppInstallDialog");Kn.isLegacyTeams?t(_s(n,"executeDeepLink",qf(e.appId))):(Zs(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function Kf(){return!(!gr(Kn)||!Kn.supports.appInstallDialog)}const Zf="v1",Qf=Cn("media");var Xf,Yf,ep,tp,np,rp,op;!function(e){e.Base64="base64",e.ID="id"}(Xf||(Xf={}));class ip{}function ap(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),Bn.isFramelessWindow)if(mr(Fn))Zs(yn(Zf,"media.captureImage"),"captureImage",e);else{e({errorCode:Et.OLD_PLATFORM},[])}else{e({errorCode:Et.NOT_SUPPORTED_ON_PLATFORM},[])}}function sp(){if(gr(Kn,Mt.content,Mt.task),!lp())throw Ht;const e=At.Media;return new Promise((t=>{t(Bs(yn(Zf,"media.hasPermission"),"permissions.has",e))}))}function cp(){if(gr(Kn,Mt.content,Mt.task),!lp())throw Ht;const e=At.Media;return new Promise((t=>{t(Bs(yn(Zf,"media.requestPermission"),"permissions.request",e))}))}function lp(){return!(!gr(Kn)||!Kn.supports.permissions)}class up extends ip{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(gr(Kn,Mt.content,Mt.task),mr(kn))if(Ap(this.mimeType,this.format,this.content))mr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:Et.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:Et.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Zs(yn(Zf,"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=hp(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=wp(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):Qf(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Et.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=$t(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Tr(e)&&Zs(yn(Zf,"media.getMedia"),"getMedia",r),ss(yn(Zf,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),cs("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=hp(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),cs("getMedia"+t)}else{const e=wp(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Et.INTERNAL_ERROR,message:"data received is null"},new Blob),cs("getMedia"+t)}}))}}class dp{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){gr(Kn,Mt.content,Mt.task);try{wr(In)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Zs(yn(Zf,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(Yf.StopRecording,e)}}class fp extends dp{getMediaType(){return np.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Yf.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function pp(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),!mr(kn)){const e={errorCode:Et.OLD_PLATFORM};return void t(e,[])}try{vp(e)}catch(e){return void t(e,[])}if(!yp(e)){const e={errorCode:Et.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Zs(yn(Zf,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Cp(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 up(e));t(n,s)}))}function gp(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),!mr(kn)){return void t({errorCode:Et.OLD_PLATFORM})}if(!Ip(e)){return void t({errorCode:Et.INVALID_ARGUMENTS})}const n=[e];Zs(yn(Zf,"media.viewImages"),"viewImages",n,t)}function mp(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),Bn.hostClientType!==Ft.desktop&&Bn.hostClientType!==Ft.web&&Bn.hostClientType!==Ft.rigel&&Bn.hostClientType!==Ft.teamsRoomsWindows&&Bn.hostClientType!==Ft.teamsRoomsAndroid&&Bn.hostClientType!==Ft.teamsPhones&&Bn.hostClientType!==Ft.teamsDisplays)if(mr(Mn))if(Tp(t))Zs(yn(Zf,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:Et.INVALID_ARGUMENTS},"")}else{e({errorCode:Et.OLD_PLATFORM},"")}else{e({errorCode:Et.NOT_SUPPORTED_ON_PLATFORM},"")}}function hp(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 wp(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 vp(e){Sp(e)?wr(An):Ep(e)?wr(In):bp(e)&&wr(Tn)}function Cp(e){return!(e.mediaType!=np.Video||!e.videoProps||!e.videoProps.videoController)}function yp(e){return!(null==e||e.maxMediaCount>10)}function bp(e){var t;return!((null==e?void 0:e.mediaType)!=np.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Sp(e){return!(!e||e.mediaType!=np.VideoAndImage&&!e.videoAndImageProps)}function Ep(e){return!(!e||e.mediaType!=np.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Ap(e,t,n){return null!=e&&null!=t&&t==Xf.ID&&null!=n}function Ip(e){return!(null==e||e.length<=0||e.length>10)}function Tp(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Pp(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"}(Yf||(Yf={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(ep||(ep={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(tp||(tp={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(np||(np={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(rp||(rp={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(op||(op={}));const Op="v2";function Rp(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.task),!Mp())throw Ht;if(!Tp(e))throw{errorCode:Et.INVALID_ARGUMENTS};t(Bs(yn(Op,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Fp(){if(gr(Kn,Mt.content,Mt.task),!Mp())throw Ht;const e=At.Media;return new Promise((t=>{t(Bs(yn(Op,"barCode.hasPermission"),"permissions.has",e))}))}function kp(){if(gr(Kn,Mt.content,Mt.task),!Mp())throw Ht;const e=At.Media;return new Promise((t=>{t(Bs(yn(Op,"barCode.requestPermission"),"permissions.request",e))}))}function Mp(){return!!(gr(Kn)&&Kn.supports.barCode&&Kn.supports.permissions)}const Np="v2";function xp(e){return Lp(yn(Np,"chat.openChat"),e)}function Lp(e,t){return new Promise((n=>{if(gr(Kn,Mt.content,Mt.task),!Dp())throw Ht;if(Kn.isLegacyTeams)n(_s(e,"executeDeepLink",jf([t.user],void 0,t.message)));else{n(_s(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Up(e){const t=yn(Np,"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(Lp(t,r))}else{if(gr(Kn,Mt.content,Mt.task),!Dp())throw Ht;if(Kn.isLegacyTeams)n(_s(t,"executeDeepLink",jf(e.users,e.topic,e.message)));else{n(_s(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function Dp(){return!(!gr(Kn)||!Kn.supports.chat)}var Hp=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 Vp="v2";function _p(e){return Hp(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content,Mt.meetingStage,Mt.task,Mt.settings,Mt.stage,Mt.sidePanel),!Bp())throw Ht;if(!e.type||!Object.values(Rt).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Rt)}`);const t=yield tn(e),n={mimeType:e.type,content:t};return Bs(yn(Vp,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function Wp(){return Hp(this,void 0,void 0,(function*(){gr(Kn,Mt.content,Mt.meetingStage,Mt.task,Mt.settings,Mt.stage,Mt.sidePanel);const e=yn(Vp,"clipboard.read");if(!Bp())throw Ht;const t=yield Bs(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return en(e.mimeType,e.content)}return t}))}function Bp(){return Bn.isFramelessWindow?!(!gr(Kn)||!Kn.supports.clipboard):!!(gr(Kn)&&navigator&&navigator.clipboard&&Kn.supports.clipboard)}function jp(){var e;return null!==(e=gr(Kn)&&(Kn.isNAAChannelRecommended||zp()))&&void 0!==e&&e}function zp(){return!!(gr(Kn)&&$p()&&Kn.isLegacyTeams&&Kn.supports.nestedAppAuth)}function $p(){return Bn.hostClientType===Ft.android||Bn.hostClientType===Ft.ios||Bn.hostClientType===Ft.ipados}const qp="v2";function Gp(){if(gr(Kn,Mt.content,Mt.task),!Kp())throw Ht;return Bs(yn(qp,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Jp(e){if(gr(Kn,Mt.content,Mt.task),!Kp())throw Ht;if(!e)throw{errorCode:Et.INVALID_ARGUMENTS};return Bs(yn(qp,"geoLocation.showLocation"),"location.showLocation",e)}function Kp(){return!!(gr(Kn)&&Kn.supports.geoLocation&&Kn.supports.geoLocation.map&&Kn.supports.permissions)}const Zp="v2";function Qp(){if(gr(Kn,Mt.content,Mt.task),!eg())throw Ht;return Bs(yn(Zp,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Xp(){if(gr(Kn,Mt.content,Mt.task),!eg())throw Ht;const e=At.GeoLocation;return new Promise((t=>{t(Bs(yn(Zp,"geoLocation.hasPermission"),"permissions.has",e))}))}function Yp(){if(gr(Kn,Mt.content,Mt.task),!eg())throw Ht;const e=At.GeoLocation;return new Promise((t=>{t(Bs(yn(Zp,"geoLocation.requestPermission"),"permissions.request",e))}))}function eg(){return!!(gr(Kn)&&Kn.supports.geoLocation&&Kn.supports.permissions)}function tg(){return Kn.hostVersionsInfo?Kn.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const ng="v1";class rg{postMessage(e,t){gr(Kn),Zs(yn(ng,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||jt())}addEventListener(e,t){gr(Kn),"message"===e&&ss(yn(ng,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class og{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){gr(Kn,Mt.task),Zs(yn(ng,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||jt())}addEventListener(e,t){gr(Kn,Mt.task),"message"===e&&ss(yn(ng,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const ig="v2";function ag(e){if(gr(Kn,Mt.content),!sg())throw Ht;if(!e||!Yt(e))throw{errorCode:Et.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Bs(yn(ig,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function sg(){return!(!gr(Kn)||!Kn.supports.secondaryBrowser)}const cg="v1";function lg(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),!mr(On))throw{errorCode:Et.OLD_PLATFORM};if(!e)throw{errorCode:Et.INVALID_ARGUMENTS};if(!dg())throw Ht;Zs(yn(cg,"location.getLocation"),"location.getLocation",[e],t)}function ug(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),!mr(On))throw{errorCode:Et.OLD_PLATFORM};if(!e)throw{errorCode:Et.INVALID_ARGUMENTS};if(!dg())throw Ht;Zs(yn(cg,"location.showLocation"),"location.showLocation",[e],t)}function dg(){return!(!gr(Kn)||!Kn.supports.location)}const fg="v1";function pg(e){gr(Kn,Mt.sidePanel),e.contentUrl&&new URL(e.contentUrl),Zs(yn(fg,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var gg=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 mg="v1";var hg,wg,vg,Cg,yg,bg;function Sg(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Eg(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Ag(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage,Mt.settings,Mt.content),Zs(yn(mg,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Ig(){var e,t,n;return gg(this,void 0,void 0,(function*(){let r;gr(Kn,Mt.sidePanel,Mt.meetingStage,Mt.settings,Mt.content);try{const e=!0;r=yield Bs(yn("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)==Cg.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Cg.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Et.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Tg(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage,Mt.task),Zs(yn(mg,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Pg(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");gr(Kn,Mt.sidePanel),Zs(yn(mg,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Og(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");gr(Kn,Mt.sidePanel),Zs(yn(mg,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Rg(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");gr(Kn,Mt.sidePanel),Zs(yn(mg,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Fg(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");gr(Kn,Mt.sidePanel),ss(yn(mg,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function kg(e,t,n={sharingProtocol:yg.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Mg(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Ng(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function xg(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Lg(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),ss(yn(mg,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Ug(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),ss(yn(mg,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Dg(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),ss(yn(mg,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Hg(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));gr(Kn);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||bg.Other};return Bs(yn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Vg(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");gr(Kn,Mt.sidePanel,Mt.meetingStage),e.isAppHandlingAudio?_g(e,t):Wg(e,t)}function _g(e,t){Zs(yn(mg,"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");ss(yn(mg,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>gg(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);jg(n,n.isMicMuted===t.isMicMuted?hg.HostInitiated:hg.AppDeclinedToChange)}catch(e){jg(t,hg.AppFailedToChange)}}))));ss(yn(mg,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function Wg(e,t){Zs(yn(mg,"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");ls("meeting.micStateChanged")&&cs("meeting.micStateChanged"),ls("meeting.audioDeviceSelectionChanged")&&cs("meeting.audioDeviceSelectionChanged"),t(n)}))}function Bg(e){jg(e,hg.AppInitiated)}function jg(e,t){gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"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"}(hg||(hg={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(wg||(wg={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(vg||(vg={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Cg||(Cg={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(yg||(yg={})),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"}(bg||(bg={}));const zg="v1",$g="v2";function qg(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=yn(zg,"monetization.openPurchaseExperience")):(r=e,o=yn($g,"monetization.openPurchaseExperience"));return gr(Kn,Mt.content),Kt((()=>new Promise((e=>{if(!Gg())throw Ht;e(Bs(o,"monetization.openPurchaseExperience",r))}))),n)}function Gg(){return!(!gr(Kn)||!Kn.supports.monetization)}const Jg="v2";function Kg(e){return new Promise((t=>{if(gr(Kn,Mt.content),!Qg())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(_s(yn(Jg,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function Zg(e){return new Promise((t=>{if(gr(Kn,Mt.content),!Qg())throw new Error("Not supported");const n=yn(Jg,"calendar.composeMeeting");Kn.isLegacyTeams?t(_s(n,"executeDeepLink",$f(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(_s(n,"calendar.composeMeeting",e))}))}function Qg(){return!(!gr(Kn)||!Kn.supports.calendar)}const Xg="v2";function Yg(e){return new Promise((t=>{if(gr(Kn,Mt.content),!tm())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(_s(yn(Xg,"mail.openMailItem"),"mail.openMailItem",e))}))}function em(e){return new Promise((t=>{if(gr(Kn,Mt.content),!tm())throw new Error("Not supported");t(_s(yn(Xg,"mail.composeMail"),"mail.composeMail",e))}))}function tm(){return!(!gr(Kn)||!Kn.supports.mail)}var nm;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(nm||(nm={}));const rm="v2";function om(){if(!Bn.printCapabilityEnabled){if(gr(Kn),!um())throw Ht;Bn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(im(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function im(){nn().print()}function am(e){sm(yn(rm,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Tr(e)&&!um())throw Ht}))}function sm(e,t,n){!Tr(t)&&gr(Kn),!Tr(t)&&n&&n(),ms(e,t)}function cm(e){lm(yn(rm,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Tr(e)&&!um())throw Ht}))}function lm(e,t,n){!Tr(t)&&gr(Kn),!Tr(t)&&n&&n(),vs(e,t)}function um(){return!(!gr(Kn)||!Kn.supports.teamsCore)}const dm="v1",fm="v2";function pm(e,t){let n,r;gr(Kn,Mt.content,Mt.task,Mt.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=yn(dm,"people.selectPeople")):(r=e,o=yn(fm,"people.selectPeople")),Gt(gm,n,o,r)}function gm(e,t){return new Promise((n=>{if(!mr(Rn))throw{errorCode:Et.OLD_PLATFORM};if(!Pp(t))throw{errorCode:Et.INVALID_ARGUMENTS};if(!mm())throw Ht;n(Bs(e,"people.selectPeople",t))}))}function mm(){return!(!gr(Kn)||!Kn.supports.people)}function hm(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?wm(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function wm(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 vm="v2";function Cm(e){return gr(Kn,Mt.content),new Promise((t=>{const[n,r]=hm(e);if(!n)throw{errorCode:Et.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(Bs(yn(vm,"profile.showProfile"),"profile.showProfile",o))}))}function ym(){return!(!gr(Kn)||!Kn.supports.profile)}const bm="v2",Sm="search.queryChange",Em="search.queryClose",Am="search.queryExecute";function Im(e,t,n){if(gr(Kn,Mt.content),!Pm())throw Ht;ss(yn(bm,"search.registerOnClosedHandler"),Em,e),ss(yn(bm,"search.registerOnExecutedHandler"),Am,t),n&&ss(yn(bm,"search.registerOnChangeHandler"),Sm,n)}function Tm(){if(gr(Kn,Mt.content),!Pm())throw Ht;Zs(yn(bm,"search.unregisterHandlers"),"search.unregister"),cs(Sm),cs(Em),cs(Am)}function Pm(){return!(!gr(Kn)||!Kn.supports.search)}function Om(){return new Promise((e=>{if(gr(Kn,Mt.content),!Pm())throw new Error("Not supported");e(_s(yn(bm,"search.closeSearch"),"search.closeSearch"))}))}var Rm=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 km(){return Rm(this,void 0,void 0,(function*(){if(gr(Kn,Mt.sidePanel,Mt.meetingStage),!Mm())throw Ht;return yield Bs(yn(Fm,"sharing.history.getContent"),"sharing.history.getContent")}))}function Mm(){var e;return gr(Kn)&&void 0!==(null===(e=Kn.supports.sharing)||void 0===e?void 0:e.history)}const Nm="v1",xm="v2",Lm={shareWebContent:"sharing.shareWebContent"};function Um(e,t){try{Hm(e),Vm(e),_m(e)}catch(e){return Jt((()=>Promise.reject(e)),t)}gr(Kn,Mt.content,Mt.sidePanel,Mt.task,Mt.stage,Mt.meetingStage);return Jt(Dm,t,yn(t?Nm:xm,"sharing.shareWebContent"),e)}function Dm(e,t){return new Promise((n=>{if(!Wm())throw Ht;n(Bs(e,Lm.shareWebContent,t))}))}function Hm(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Et.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Vm(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:Et.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:Et.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function _m(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:Et.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:Et.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Wm(){return!(!gr(Kn)||!Kn.supports.sharing)}const Bm="v2";function jm(){return new Promise((e=>{if(gr(Kn,Mt.content),!zm())throw Ht;e(Bs(yn(Bm,"stageView.self.close"),"stageView.self.close"))}))}function zm(){var e;return gr(Kn)&&void 0!==(null===(e=Kn.supports.stageView)||void 0===e?void 0:e.self)}const $m="v2";var qm;function Gm(e){return new Promise((t=>{if(gr(Kn,Mt.content),!Jm())throw Ht;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Bs(yn($m,"stageView.open"),"stageView.open",e))}))}function Jm(){return!(!gr(Kn)||!Kn.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(qm||(qm={}));const Km=10;var Zm=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 Qm="v2";function Xm(e){return Zm(this,void 0,void 0,(function*(){gr(Kn,Mt.content,Mt.task),th(),nh(e);const t=yield Bs(yn(Qm,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return rh(e.maxVisualMediaCount,t),t}))}function Ym(e){return Zm(this,void 0,void 0,(function*(){gr(Kn,Mt.content,Mt.task),th(),nh(e);const t=yield Bs(yn(Qm,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return rh(e.maxVisualMediaCount,t),t}))}function eh(){return!!(gr(Kn)&&Kn.supports.visualMedia&&Kn.supports.visualMedia.image&&Kn.supports.permissions)}function th(){if(!eh())throw Ht}function nh(e){if(!e||e.maxVisualMediaCount>Km||e.maxVisualMediaCount<1)throw Wt}function rh(e,t){if(t.length>e)throw Bt}const oh="v2";var ih,ah;function sh(){if(gr(Kn,Mt.content,Mt.task),!eh())throw Ht;const e=At.Media;return Bs(yn(oh,"visualMedia.hasPermission"),"permissions.has",e)}function ch(){if(gr(Kn,Mt.content,Mt.task),!eh())throw Ht;const e=At.Media;return Bs(yn(oh,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(ih||(ih={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(ah||(ah={}));var lh=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 uh=null;function dh(){return lh(this,void 0,void 0,(function*(){return null===uh&&(uh=(yield co()).app.host.name),uh}))}var fh=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 ph(){return fh(this,void 0,void 0,(function*(){if(gr(Kn),!mh())throw Ht;return!(!Kn.isLegacyTeams||Bn.hostClientType!==Ft.android&&Bn.hostClientType!==Ft.ios&&Bn.hostClientType!==Ft.ipados||(yield gh())!==kt.teams)||(yield Vs(yn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function gh(){return fh(this,void 0,void 0,(function*(){return dh()}))}function mh(){return gr(Kn)&&void 0!==Kn.supports.webStorage}const hh="v2";var wh;function vh(e){const t=yn(hh,"call.startCall");return new Promise((n=>{var r;if(gr(Kn,Mt.content,Mt.task),!Ch())throw Ht;if(!Kn.isLegacyTeams)return Zs(t,"call.startCall",[e],n);n(Vs(t,"executeDeepLink",zf(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(wh.Video),e.source)).then((e=>{if(!e)throw new Error(Wn);return e})))}))}function Ch(){return!(!gr(Kn)||!Kn.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(wh||(wh={}));const yh="v1";function bh(){Zi(yn(yh,"appInitialization.notifyAppLoaded"))}function Sh(){Zs(yn(yh,"appInitialization.notifySuccess"),eo.Success,[lr])}function Eh(e){Xi(yn(yh,"appInitialization.notifyFailure"),e)}function Ah(e){Qi(yn(yh,"appInitialization.notifyExpectedFailure"),e)}const Ih=Cn("thirdPartyCloudStorage"),Th="v2";class Ph{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let Oh=[],Rh=null,Fh=!0,kh=null;function Mh(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(gr(Kn,Mt.content,Mt.task),!xh())throw Ht;if(kh)throw kh=null,new Error("getDragAndDropFiles cannot be called twice");kh=t,Fh=!0,Zs(yn(Th,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],Nh)}else{t([],{errorCode:Et.INVALID_ARGUMENTS})}}function Nh(e){if(kh)if(e&&e.error)kh([],e.error),kh=null;else if(e&&e.fileChunk)try{Fh||0!==e.fileChunk.chunkSequence||(Ih("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),Fh=!0,kh([],{errorCode:Et.INTERNAL_ERROR,message:"error occurred while receiving data"}),Oh=[],kh=null);const t=wp(e.fileChunk,e.fileType);if(t?(Rh||(Rh=new Ph(e.fileType,[])),Rh.assembleAttachment.push(t)):(Ih(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),kh?kh([],{errorCode:Et.INTERNAL_ERROR,message:"error occurred while receiving data"}):kh=null,Oh=[],kh=null,Fh=!0),Fh=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&Rh){const t=hp(Rh.assembleAttachment,Rh.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});Oh.push(n)}e.isLastFile&&kh&&(kh(Oh,e.error),Oh=[],kh=null,Fh=!0),Rh=null}}catch(e){kh&&(kh([],{errorCode:Et.INTERNAL_ERROR,message:e}),Oh=[],kh=null,Fh=!0)}else kh([],{errorCode:Et.INTERNAL_ERROR,message:"data received is null"}),Oh=[],kh=null,Fh=!0}function xh(){return!(!gr(Kn)||!Kn.supports.thirdPartyCloudStorage)}const Lh="v1";function Uh(e,t){Ki(yn(Lh,"initialize"),t).then((()=>{e&&e()}))}function Dh(){om()}function Hh(){im()}function Vh(e){pr(),Zs(yn(Lh,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=Bn.frameContext),e(t)}))}function _h(e){oa(yn(Lh,"registerOnThemeChangeHandlerHelper"),e)}function Wh(e){us(yn(Lh,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Bh(e){us(yn(Lh,"registerAppButtonClickHandler"),"appButtonClick",e,[Mt.content])}function jh(e){us(yn(Lh,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[Mt.content])}function zh(e){us(yn(Lh,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[Mt.content])}function $h(e){Qa(yn(Lh,"registerBackButtonHandler"),e)}function qh(e){sm(yn(Lh,"registerOnLoadHandler"),e)}function Gh(e){lm(yn(Lh,"registerBeforeUnloadHandler"),e)}function Jh(e){us(yn(Lh,"registerFocusEnterHandler"),"focusEnter",e,[])}function Kh(e){us(yn(Lh,"registerChangeSettingsHandler"),"changeSettings",e,[Mt.content])}function Zh(e,t){gr(Kn),Da(yn(Lh,"getTabInstances"),t).then((t=>{e(t)}))}function Qh(e,t){gr(Kn),Ha(yn(Lh,"getMruTabInstances"),t).then((t=>{e(t)}))}function Xh(e){Va(yn(Lh,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Yh(e,t){gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage);const n=null!=t?t:jt();ia(yn(Lh,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function ew(e){_a(yn(Lh,"setFrameContext"),e)}function tw(e,t,n){Ki(yn(Lh,"initializeWithFrameContext"),n).then((()=>t&&t())),_a(yn(Lh,"setFrameContext"),e)}const nw="v1";function rw(e){Ua(yn(nw,"navigation.returnFocus"),e)}function ow(e,t){gr(Kn);const n=null!=t?t:jt();La(yn(nw,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function iw(e,t){gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.remove,Mt.task,Mt.stage,Mt.meetingStage);const n=null!=t?t:jt();Na(yn(nw,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function aw(e){gr(Kn);const t=null!=e?e:jt();xa(yn(nw,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const sw="v1";function cw(e){Wa(yn(sw,"settings.setValidityState"),e)}function lw(e){gr(Kn,Mt.content,Mt.settings,Mt.remove,Mt.sidePanel),Ba(yn(sw,"settings.getSettings")).then((t=>{e(t)}))}function uw(e,t){gr(Kn,Mt.content,Mt.settings,Mt.sidePanel);const n=null!=t?t:jt();ja(yn(sw,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function dw(e){Li(yn(sw,"settings.registerOnSaveHandler"),e)}function fw(e){Di(yn(sw,"settings.registerOnRemoveHandler"),e)}var pw=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 gw="v1";function mw(e,t){const n=yn(gw,"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?(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),Zs(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?ni(n,Cw(e),r):ti(n,vw(e),r),new rg}function hw(e){e=yw(e);const{width:t,height:n}=e,r=pw(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ei(yn(gw,"tasks.updateTask"),e)}function ww(e,t){ri(yn(gw,"tasks.submitTask"),e,t)}function vw(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:Lt.Small,width:e.width?e.width:Lt.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Cw(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:Lt.Small,width:e.width?e.width:Lt.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function yw(e){return e.height=e.height?e.height:Lt.Small,e.width=e.width?e.width:Lt.Small,e}const bw="v2";var Sw,Ew;function Aw(){return!(!gr(Kn,Mt.meetingStage,Mt.sidePanel,Mt.content)||!Kn.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Sw||(Sw={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Ew||(Ew={}));class Iw{getFluidTenantInfo(){return Tw(),new Promise((e=>{e(Bs(yn(bw,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return Tw(),new Promise((e=>{e(Bs(yn(bw,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return Tw(),new Promise((e=>{e(Bs(yn(bw,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return Tw(),new Iw}}function Tw(){if(!Aw())throw new Error("LiveShareHost Not supported")}var Pw=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 Ow(e){try{return e.cartItems=Rw(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Rw(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Rw(e.accessories)),e}))}const Fw=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=Pw(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Fw(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function kw(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)Nw(t),Mw(t.accessories)}function Mw(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");Nw(t)}}}function Nw(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");Lw(e.price),Uw(e.quantity)}function xw(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===Ct(e))throw new Error("id must be a valid UUID")}}function Lw(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 Uw(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Dw(e){if(!Object.values(Ww).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Hw="v2",Vw={majorVersion:1,minorVersion:1};var _w,Ww;function Bw(){if(gr(Kn,Mt.content,Mt.task),!qw())throw Ht;return Bs(yn(Hw,"marketplace.getCart"),"marketplace.getCart",Vw).then(Ow)}function jw(e){if(gr(Kn,Mt.content,Mt.task),!qw())throw Ht;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return xw(null==e?void 0:e.cartId),kw(null==e?void 0:e.cartItems),Bs(yn(Hw,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Fw(e.cartItems),cartVersion:Vw})).then(Ow)}function zw(e){if(gr(Kn,Mt.content,Mt.task),!qw())throw Ht;if(!e)throw new Error("removeCartItemsParams must be provided");if(xw(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 Bs(yn(Hw,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Vw})).then(Ow)}function $w(e){if(gr(Kn,Mt.content,Mt.task),!qw())throw Ht;if(!e)throw new Error("updateCartStatusParams must be provided");return xw(null==e?void 0:e.cartId),Dw(null==e?void 0:e.cartStatus),Bs(yn(Hw,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Vw})).then(Ow)}function qw(){return!(!gr(Kn)||!Kn.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(_w||(_w={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Ww||(Ww={}))})(),r})()));
|
2
2
|
//# sourceMappingURL=MicrosoftTeams.min.js.map
|