@microsoft/teams-js 2.38.0-beta.0 → 2.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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={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],u=i[1],l=new o(c(e,a,u)),d=0,f=u>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)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},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(l(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 u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(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(u(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?u(e,i,o,"day"):i>=r?u(e,i,r,"hour"):i>=n?u(e,i,n,"minute"):i>=t?u(e,i,t,"second"):e+" ms"}function u(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:()=>Re,AppId:()=>Kr,ChannelType:()=>un,ChildAppWindow:()=>um,DialogDimension:()=>cn,EduType:()=>Le,EmailAddress:()=>Sp,ErrorCode:()=>ke,FileOpenPreference:()=>Oe,FrameContexts:()=>rn,HostClientType:()=>tn,HostName:()=>nn,LiveShareHost:()=>Uw,NotificationTypes:()=>Bc,ParentAppWindow:()=>lm,RenderingSurfaces:()=>on,SecondaryM365ContentIdName:()=>Fe,TaskModuleDimension:()=>cn,TeamType:()=>an,UUID:()=>_n,UserSettingTypes:()=>jc,UserTeamRole:()=>sn,ValidatedSafeString:()=>Jr,ViewerActionTypes:()=>Wc,activateChildProxyingCommunication:()=>wr,app:()=>i,appEntity:()=>V,appInitialization:()=>Ee,appInstallDialog:()=>K,authentication:()=>J,barCode:()=>Z,calendar:()=>ce,call:()=>Se,chat:()=>X,clipboard:()=>Y,conversations:()=>S,copilot:()=>I,dialog:()=>f,enablePrintCapability:()=>Kv,executeDeepLink:()=>dw,externalAppAuthentication:()=>T,externalAppAuthenticationForCEA:()=>P,externalAppCardActions:()=>O,externalAppCardActionsForCEA:()=>R,externalAppCardActionsForDA:()=>F,externalAppCommands:()=>k,files:()=>M,geoLocation:()=>ne,getAdaptiveCardSchemaVersion:()=>sm,getContext:()=>Zv,getCurrentFeatureFlagsState:()=>br,getMruTabInstances:()=>uw,getTabInstances:()=>cw,hostEntity:()=>q,initialize:()=>Jv,initializeWithFrameContext:()=>pw,liveShare:()=>Pe,location:()=>oe,logs:()=>b,mail:()=>le,marketplace:()=>He,media:()=>Q,meeting:()=>ae,meetingRoom:()=>N,menus:()=>p,messageChannels:()=>x,monetization:()=>se,navigateBack:()=>ww,navigateCrossDomain:()=>vw,navigateToTab:()=>hw,nestedAppAuth:()=>ee,nestedAppAuthBridge:()=>D,notifications:()=>L,openFilePreview:()=>Qc,otherAppStateChange:()=>U,overwriteFeatureFlagsState:()=>Er,pages:()=>y,people:()=>fe,print:()=>Qv,profile:()=>pe,registerAppButtonClickHandler:()=>ew,registerAppButtonHoverEnterHandler:()=>tw,registerAppButtonHoverLeaveHandler:()=>nw,registerBackButtonHandler:()=>rw,registerBeforeUnloadHandler:()=>iw,registerChangeSettingsHandler:()=>sw,registerCustomHandler:()=>Jc,registerFocusEnterHandler:()=>aw,registerFullScreenHandler:()=>Yv,registerOnLoadHandler:()=>ow,registerOnThemeChangeHandler:()=>Xv,registerUserSettingsChangeHandler:()=>Kc,remoteCamera:()=>H,returnFocus:()=>mw,search:()=>ge,secondaryBrowser:()=>re,sendCustomEvent:()=>Gc,sendCustomMessage:()=>qc,setFeatureFlagsState:()=>Sr,setFrameContext:()=>fw,settings:()=>Ie,shareDeepLink:()=>lw,sharing:()=>he,stageView:()=>we,store:()=>G,tasks:()=>Te,teams:()=>W,teamsCore:()=>de,thirdPartyCloudStorage:()=>Ae,uploadCustomApp:()=>$c,version:()=>hr,videoEffects:()=>j,videoEffectsEx:()=>z,visualMedia:()=>ye,webStorage:()=>be});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>ro,getTelemetryPort:()=>to,isSupported:()=>no});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>lo,getDataLayerPort:()=>co,isSupported:()=>uo});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>fo,registerOnResumeHandler:()=>po});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>wo,FailedReason:()=>vo,Messages:()=>ho,_initialize:()=>So,_uninitialize:()=>Eo,getContext:()=>Ao,getFrameContext:()=>yo,initialize:()=>bo,isInitialized:()=>Co,lifecycle:()=>o,notifyAppLoaded:()=>Io,notifyExpectedFailure:()=>Oo,notifyFailure:()=>Po,notifySuccess:()=>To,openLink:()=>ko,registerHostToAppPerformanceMetricsHandler:()=>Fo,registerOnThemeChangeHandler:()=>Ro});var a={};n.r(a),n.d(a,{isSupported:()=>xo,resize:()=>No});var s={};n.r(s),n.d(s,{isSupported:()=>Lo,open:()=>Do});var c={};n.r(c),n.d(c,{isSupported:()=>_o,registerOnMessageFromParent:()=>Vo,sendMessageToDialog:()=>Ho,sendMessageToParentFromDialog:()=>Uo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>$o,getDialogInfoFromUrlDialogInfo:()=>zo,isSupported:()=>jo,open:()=>Bo,parentCommunication:()=>c,submit:()=>Wo});var l={};n.r(l),n.d(l,{isSupported:()=>ri,open:()=>ni});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>ii,open:()=>oi});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>ai,isSupported:()=>si,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>ui,MenuItem:()=>di,MenuListType:()=>li,initialize:()=>vi,isSupported:()=>Ai,setNavBarMenu:()=>yi,setUpViews:()=>wi,showActionMenu:()=>Si});var g={};n.r(g),n.d(g,{initialize:()=>Ii,isSupported:()=>Ui,registerChangeConfigHandler:()=>Ni,registerOnRemoveHandler:()=>Fi,registerOnRemoveHandlerHelper:()=>ki,registerOnSaveHandler:()=>Oi,registerOnSaveHandlerHelper:()=>Ri,setConfig:()=>Pi,setValidityState:()=>Ti});var m={};n.r(m),n.d(m,{isSupported:()=>fa,onClick:()=>ua,onHoverEnter:()=>la,onHoverLeave:()=>da});var h={};n.r(h),n.d(h,{_initialize:()=>pa,isSupported:()=>va,navigateBack:()=>ga,registerBackButtonHandler:()=>ma,registerBackButtonHandlerHelper:()=>ha});var v={};n.r(v),n.d(v,{isSupported:()=>ya,navigateTo:()=>wa,navigateToDefaultPage:()=>Ca});var w={};n.r(w),n.d(w,{enterFullscreen:()=>ba,exitFullscreen:()=>Sa,isSupported:()=>Ea});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Ta,getTabInstances:()=>Ia,isSupported:()=>Pa,navigateToTab:()=>Aa});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Oa,ReturnFocusType:()=>Ra,appButton:()=>m,backStack:()=>h,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>xa,initializeWithFrameContext:()=>Na,isSupported:()=>Va,navigateCrossDomain:()=>Da,navigateToApp:()=>La,registerFocusEnterHandler:()=>ka,registerFullScreenHandler:()=>Ha,returnFocus:()=>Fa,setCurrentFrame:()=>Ma,shareDeepLink:()=>Ua,tabs:()=>C});var b={};n.r(b),n.d(b,{isSupported:()=>_c,registerGetLogHandler:()=>Vc});var S={};n.r(S),n.d(S,{closeConversation:()=>Yc,getChatMembers:()=>eu,isSupported:()=>tu,openConversation:()=>Xc});var E={};n.r(E),n.d(E,{isSupported:()=>iu,sendCustomTelemetryData:()=>au});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>du,isSupported:()=>lu});var I={};n.r(I),n.d(I,{customTelemetry:()=>E,eligibility:()=>A});var T={};n.r(T),n.d(T,{ActionExecuteInvokeRequestType:()=>hu,ActionExecuteResponseHandler:()=>yu,InvokeErrorCode:()=>Cu,InvokeResponseType:()=>wu,OriginalRequestType:()=>vu,SerializableActionExecuteInvokeRequest:()=>gu,authenticateAndResendRequest:()=>Iu,authenticateWithOauth2:()=>Ou,authenticateWithPowerPlatformConnectorPlugins:()=>Ru,authenticateWithSSO:()=>Tu,authenticateWithSSOAndResendRequest:()=>Pu,isActionExecuteResponse:()=>mu,isInvokeError:()=>bu,isSupported:()=>Fu,validateActionExecuteInvokeRequest:()=>Eu});var P={};n.r(P),n.d(P,{authenticateAndResendRequest:()=>Du,authenticateWithOauth:()=>xu,authenticateWithSSO:()=>Nu,authenticateWithSSOAndResendRequest:()=>Lu,isSupported:()=>Uu,validateInput:()=>Hu});var O={};n.r(O),n.d(O,{ActionOpenUrlErrorCode:()=>Bu,ActionOpenUrlType:()=>_u,isSupported:()=>zu,processActionOpenUrl:()=>ju,processActionSubmit:()=>Wu});var R={};n.r(R),n.d(R,{isSupported:()=>Ku,processActionOpenUrl:()=>Gu,processActionSubmit:()=>Ju});var F={};n.r(F),n.d(F,{SerializableActionOpenUrlDialogInfo:()=>rl,isSupported:()=>tl,processActionOpenUrlDialog:()=>el});var k={};n.r(k),n.d(k,{isSupported:()=>sl,processActionCommand:()=>al});var M={};n.r(M),n.d(M,{CloudStorageProvider:()=>ul,CloudStorageProviderFileAction:()=>gl,CloudStorageProviderType:()=>ll,DocumentLibraryAccessType:()=>fl,FileDownloadStatus:()=>pl,SpecialDocumentLibraryType:()=>dl,addCloudStorageFolder:()=>hl,addCloudStorageProvider:()=>Al,addCloudStorageProviderFile:()=>Tl,copyMoveFiles:()=>bl,deleteCloudStorageFolder:()=>vl,deleteCloudStorageProviderFile:()=>Ol,downloadCloudStorageProviderFile:()=>Rl,getCloudStorageFolderContents:()=>wl,getCloudStorageFolders:()=>ml,getExternalProviders:()=>yl,getFileDownloads:()=>Sl,openCloudStorageFile:()=>Cl,openDownloadFolder:()=>El,registerCloudStorageProviderContentChangeHandler:()=>Ml,registerCloudStorageProviderListChangeHandler:()=>kl,removeCloudStorageProvider:()=>Il,renameCloudStorageProviderFile:()=>Pl,uploadCloudStorageProviderFile:()=>Fl});var N={};n.r(N),n.d(N,{getPairedMeetingRoomInfo:()=>Dl,isSupported:()=>Vl,registerMeetingRoomCapabilitiesUpdateHandler:()=>Ul,registerMeetingRoomStatesUpdateHandler:()=>Hl,sendCommandToPairedMeetingRoom:()=>Ll});var x={};n.r(x),n.d(x,{dataLayer:()=>t,isSupported:()=>_l,telemetry:()=>e});var D={};n.r(D),n.d(D,{initialize:()=>$l,version:()=>Bl});var L={};n.r(L),n.d(L,{isSupported:()=>ed,showNotification:()=>Yl});var U={};n.r(U),n.d(U,{isSupported:()=>id,notifyInstallCompleted:()=>od,registerAppInstallationHandler:()=>nd,unregisterAppInstallationHandler:()=>rd});var H={};n.r(H),n.d(H,{ControlCommand:()=>sd,ErrorReason:()=>cd,SessionTerminatedReason:()=>ud,getCapableParticipants:()=>ld,isSupported:()=>wd,registerOnCapableParticipantsChangeHandler:()=>gd,registerOnDeviceStateChangeHandler:()=>hd,registerOnErrorHandler:()=>md,registerOnSessionStatusChangeHandler:()=>vd,requestControl:()=>dd,sendControlCommand:()=>fd,terminateSession:()=>pd});var V={};n.r(V),n.d(V,{isSupported:()=>bd,selectAppEntity:()=>yd});var _={};n.r(_),n.d(_,{getUserJoinedTeams:()=>Ed,isSupported:()=>Ad});var B={};n.r(B),n.d(B,{getConfigSetting:()=>Td,isSupported:()=>Pd,joinedTeams:()=>_});var W={};n.r(W),n.d(W,{ChannelType:()=>Rd,fullTrust:()=>B,getTeamChannels:()=>Fd,isSupported:()=>Md,refreshSiteUrl:()=>kd});var j={};n.r(j),n.d(j,{EffectChangeType:()=>Wd,EffectFailureReason:()=>jd,VideoFrameFormat:()=>Bd,isSupported:()=>Kd,notifySelectedVideoEffectChanged:()=>$d,registerForVideoEffect:()=>qd,registerForVideoFrame:()=>zd});var z={};n.r(z),n.d(z,{ErrorLevel:()=>yf,frameProcessingTimeoutInMs:()=>wf,isSupported:()=>Of,notifyFatalError:()=>kf,notifySelectedVideoEffectChanged:()=>If,registerForVideoEffect:()=>Tf,registerForVideoFrame:()=>bf,updatePersonalizedEffects:()=>Pf});var $={};n.r($),n.d($,{addAndConfigure:()=>Vf,getAll:()=>_f,isSupported:()=>zf,reconfigure:()=>Bf,remove:()=>jf,rename:()=>Wf});var q={};n.r(q),n.d(q,{AppTypes:()=>Gf,isSupported:()=>Jf,tab:()=>$});var G={};n.r(G),n.d(G,{isSupported:()=>op,openAppDetail:()=>tp,openFullStore:()=>ep,openInContextStore:()=>np,openSpecificStore:()=>rp});var J={};n.r(J),n.d(J,{DataResidency:()=>yp,authenticate:()=>fp,getAuthToken:()=>gp,getUser:()=>hp,notifyFailure:()=>Cp,notifySuccess:()=>wp,registerAuthenticationHandlers:()=>dp});var K={};n.r(K),n.d(K,{isSupported:()=>jp,openAppInstallDialog:()=>Wp});var Q={};n.r(Q),n.d(Q,{CameraStartMode:()=>Jp,File:()=>Yp,FileFormat:()=>qp,ImageOutputFormats:()=>Xp,ImageUriType:()=>Zp,Media:()=>og,MediaControllerEvent:()=>Gp,MediaType:()=>Qp,Source:()=>Kp,VideoController:()=>ag,captureImage:()=>eg,hasPermission:()=>tg,requestPermission:()=>ng,scanBarCode:()=>ug,selectMedia:()=>sg,viewImages:()=>cg});var Z={};n.r(Z),n.d(Z,{hasPermission:()=>Ag,isSupported:()=>Tg,requestPermission:()=>Ig,scanBarCode:()=>Eg});var X={};n.r(X),n.d(X,{isSupported:()=>kg,openChat:()=>Og,openGroupChat:()=>Fg});var Y={};n.r(Y),n.d(Y,{isSupported:()=>Lg,read:()=>Dg,write:()=>xg});var ee={};n.r(ee),n.d(ee,{addNAATrustedOrigins:()=>Gg,canParentManageNAATrustedOrigins:()=>jg,deleteNAATrustedOrigins:()=>Jg,getParentOrigin:()=>Wg,isDeeplyNestedAuthSupported:()=>zg,isNAAChannelRecommended:()=>Bg});var te={};n.r(te),n.d(te,{chooseLocation:()=>Yg,isSupported:()=>tm,showLocation:()=>em});var ne={};n.r(ne),n.d(ne,{getCurrentLocation:()=>rm,hasPermission:()=>om,isSupported:()=>am,map:()=>te,requestPermission:()=>im});var re={};n.r(re),n.d(re,{isSupported:()=>pm,open:()=>fm});var oe={};n.r(oe),n.d(oe,{getLocation:()=>mm,isSupported:()=>vm,showLocation:()=>hm});var ie={};n.r(ie),n.d(ie,{setOptions:()=>Cm});var ae={};n.r(ae),n.d(ae,{CallType:()=>Im,EventActionSource:()=>Pm,MeetingReactionType:()=>Em,MeetingType:()=>Am,SharingProtocol:()=>Tm,appShareButton:()=>ie,getAppContentStageSharingCapabilities:()=>Hm,getAppContentStageSharingState:()=>_m,getAuthenticationTokenForAnonymousUser:()=>Mm,getIncomingClientAudioState:()=>Om,getLiveStreamState:()=>Nm,getMeetingDetails:()=>Fm,getMeetingDetailsVerbose:()=>km,joinMeeting:()=>zm,registerLiveStreamChangedHandler:()=>Lm,registerMeetingReactionReceivedHandler:()=>jm,registerRaiseHandStateChangedHandler:()=>Wm,registerSpeakingStateChangeHandler:()=>Bm,requestAppAudioHandling:()=>$m,requestStartLiveStreaming:()=>xm,requestStopLiveStreaming:()=>Dm,shareAppContentToStage:()=>Um,stopSharingAppContentToStage:()=>Vm,toggleIncomingClientAudio:()=>Rm,updateMicState:()=>Jm});var se={};n.r(se),n.d(se,{isSupported:()=>Ym,openPurchaseExperience:()=>Xm});var ce={};n.r(ce),n.d(ce,{composeMeeting:()=>nh,isSupported:()=>rh,openCalendarItem:()=>th});var ue={};n.r(ue),n.d(ue,{composeMailWithHandoff:()=>sh,isSupported:()=>ch});var le={};n.r(le),n.d(le,{ComposeMailType:()=>gh,composeMail:()=>fh,handoff:()=>ue,isSupported:()=>ph,openMailItem:()=>dh});var de={};n.r(de),n.d(de,{enablePrintCapability:()=>hh,isSupported:()=>Sh,print:()=>vh,registerBeforeUnloadHandler:()=>yh,registerBeforeUnloadHandlerHelper:()=>bh,registerOnLoadHandler:()=>wh,registerOnLoadHandlerHelper:()=>Ch});var fe={};n.r(fe),n.d(fe,{isSupported:()=>Ph,selectPeople:()=>Ih});var pe={};n.r(pe),n.d(pe,{isSupported:()=>Mh,showProfile:()=>kh});var ge={};n.r(ge),n.d(ge,{closeSearch:()=>_h,isSupported:()=>Vh,registerHandlers:()=>Uh,unregisterHandlers:()=>Hh});var me={};n.r(me),n.d(me,{getContent:()=>jh,isSupported:()=>zh});var he={};n.r(he),n.d(he,{SharingAPIMessages:()=>Gh,history:()=>me,isSupported:()=>Yh,shareWebContent:()=>Jh});var ve={};n.r(ve),n.d(ve,{close:()=>tv,isSupported:()=>nv});var we={};n.r(we),n.d(we,{StageViewOpenMode:()=>ov,isSupported:()=>av,open:()=>iv,self:()=>ve});var Ce={};n.r(Ce),n.d(Ce,{captureImages:()=>lv,isSupported:()=>fv,retrieveImages:()=>dv});var ye={};n.r(ye),n.d(ye,{CameraRestriction:()=>vv,Source:()=>wv,hasPermission:()=>Cv,image:()=>Ce,requestPermission:()=>yv});var be={};n.r(be),n.d(be,{isSupported:()=>Pv,isWebStorageClearedOnUserLogOut:()=>Iv});var Se={};n.r(Se),n.d(Se,{CallModalities:()=>Rv,isSupported:()=>kv,startCall:()=>Fv});var Ee={};n.r(Ee),n.d(Ee,{ExpectedFailureReason:()=>wo,FailedReason:()=>vo,Messages:()=>ho,notifyAppLoaded:()=>Nv,notifyExpectedFailure:()=>Lv,notifyFailure:()=>Dv,notifySuccess:()=>xv});var Ae={};n.r(Ae),n.d(Ae,{getDragAndDropFiles:()=>zv,isSupported:()=>qv});var Ie={};n.r(Ie),n.d(Ie,{getSettings:()=>bw,registerOnRemoveHandler:()=>Aw,registerOnSaveHandler:()=>Ew,setSettings:()=>Sw,setValidityState:()=>yw});var Te={};n.r(Te),n.d(Te,{getDefaultSizeIfNotProvided:()=>Mw,startTask:()=>Pw,submitTask:()=>Rw,updateTask:()=>Ow});var Pe={};n.r(Pe),n.d(Pe,{ContainerState:()=>Dw,LiveShareHost:()=>Uw,UserMeetingRole:()=>xw,isSupported:()=>Lw});var Oe,Re,Fe,ke,Me,Ne,xe,De,Le,Ue,He={};function Ve(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(He),n.d(He,{CartStatus:()=>Yw,Intent:()=>Xw,addOrUpdateCartItems:()=>tC,cartVersion:()=>Zw,getCart:()=>eC,isSupported:()=>oC,removeCartItems:()=>nC,updateCartStatus:()=>rC}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Oe||(Oe={})),function(e){e.M365Content="m365content"}(Re||(Re={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Fe||(Fe={})),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"}(ke||(ke={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Me||(Me={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Ne||(Ne={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(xe||(xe={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(De||(De={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Le||(Le={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Ue||(Ue={}));const _e=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 Be="2.0.1",We="2.0.2",je="2.0.3",ze="2.0.4",$e="2.0.1",qe="1.9.0",Ge="2.0.0",Je="1.7.0",Ke="1.8.0",Qe="1.9.0",Ze=n.t(_e,2).validOrigins,Xe=1500,Ye=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),et=/^https:\/\//,tt="https",nt="teams.microsoft.com",rt="The library has not yet been initialized",ot="The runtime has not yet been initialized",it="The runtime version is not supported",at="The call was not properly started";var st=n(933);const ct=lt,ut=2147483647;function lt(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 ft(e)}return dt(e,t,n)}function dt(e,t,n){if("string"==typeof e)return ht(e,t);if(ArrayBuffer.isView(e))return Et(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(wt(e,ArrayBuffer)||e&&wt(e.buffer,ArrayBuffer))return At(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(wt(e,SharedArrayBuffer)||e&&wt(e.buffer,SharedArrayBuffer)))return At(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 lt.from(r,t,n);const o=$t(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return lt.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 ft(e){return pt(e),gt(e<0?0:0|mt(e))}function pt(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 gt(e){if(e>ut)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,lt.prototype),t}function mt(e){if(e>=ut)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ut.toString(16)+" bytes");return 0|e}function ht(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!lt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|vt(e,t);let r=gt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function vt(e,t){if(lt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||wt(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 Ct(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return yt(e).length;default:if(o)return r?-1:Ct(e).length;t=(""+t).toLowerCase(),o=!0}}function wt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Ct(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 yt(e){return st.toByteArray(St(e))}lt.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}}(),lt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),lt.from=function(e,t,n){return dt(e,t,n)},Object.setPrototypeOf(lt.prototype,Uint8Array.prototype),Object.setPrototypeOf(lt,Uint8Array),lt.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}},lt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==lt.prototype};const bt=/[^+/0-9A-Za-z-_]/g;function St(e){if((e=(e=e.split("=")[0]).trim().replace(bt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Et(e){if(wt(e,Uint8Array)){const t=new Uint8Array(e);return At(t.buffer,t.byteOffset,t.byteLength)}return It(e)}function At(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,lt.prototype),r}function It(e){const t=e.length<0?0:0|mt(e.length),n=gt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Tt(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 Rt(r)}function Pt(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 Ft(this,t,n);case"utf8":case"utf-8":return Tt(this,t,n);case"ascii":return kt(this,t,n);case"latin1":case"binary":return Mt(this,t,n);case"base64":return Nt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}lt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Tt(this,0,e):Pt.apply(this,arguments)};const Ot=4096;function Rt(e){const t=e.length;if(t<=Ot)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ot));return n}function Ft(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+=zt[e[r]];return o}function kt(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 Mt(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 Nt(e,t,n){return 0===t&&n===e.length?st.fromByteArray(e):st.fromByteArray(e.slice(t,n))}function xt(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 Dt(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(jt(r))return a;e[n+a]=r}return a}function Lt(e,t,n,r){return Wt(Ct(t,e.length-n),e,n,r)}function Ut(e,t,n,r){return Wt(_t(t),e,n,r)}function Ht(e,t,n,r){return Wt(yt(t),e,n,r)}function Vt(e,t,n,r){return Wt(Bt(t,e.length-n),e,n,r)}function _t(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Bt(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 Wt(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 jt(e){return e!=e}lt.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 Dt(this,e,t,n);case"utf8":case"utf-8":return Lt(this,e,t,n);case"ascii":case"latin1":case"binary":return Ut(this,e,t,n);case"base64":return Ht(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const zt=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 $t(e){if(lt.isBuffer(e)){const t=0|mt(e.length),n=gt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||jt(e.length)?gt(0):It(e):"Buffer"===e.type&&Array.isArray(e.data)?It(e.data):void 0}const qt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Gt;const Jt=new Uint8Array(16);function Kt(){if(!Gt&&(Gt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Gt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Gt(Jt)}const Qt=[];for(let e=0;e<256;++e)Qt.push((e+256).toString(16).slice(1));function Zt(e,t=0){return Qt[e[t+0]]+Qt[e[t+1]]+Qt[e[t+2]]+Qt[e[t+3]]+"-"+Qt[e[t+4]]+Qt[e[t+5]]+"-"+Qt[e[t+6]]+Qt[e[t+7]]+"-"+Qt[e[t+8]]+Qt[e[t+9]]+"-"+Qt[e[t+10]]+Qt[e[t+11]]+Qt[e[t+12]]+Qt[e[t+13]]+Qt[e[t+14]]+Qt[e[t+15]]}const Xt=function(e,t,n){if(qt.randomUUID&&!t&&!e)return qt.randomUUID();const r=(e=e||{}).random||(e.rng||Kt)();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 Zt(r)},Yt=/^(?:[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 en=function(e){return"string"==typeof e&&Yt.test(e)};var tn,nn,rn,on,an,sn,cn,un;!function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.visionOS="visionOS",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(tn||(tn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(nn||(nn={})),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"}(rn||(rn={})),function(e){e.copilotSidePanel="copilotSidePanel"}(on||(on={})),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"}(an||(an={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(sn||(sn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(cn||(cn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(un||(un={}));const ln={errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},dn={majorVersion:1,minorVersion:5},fn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},pn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),gn=new Error("Invalid response: Received more images than the specified max limit in the response.");function mn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function hn(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 vn(){return Xt()}function wn(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&wn(e[t])})),Object.freeze(e)}function Cn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function yn(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function bn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Sn(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 En(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 An(e){return!(hn(`${e.majorVersion}.${e.minorVersion}`,`${dn.majorVersion}.${dn.minorVersion}`)>=0)}function In(e){return"https:"===e.protocol}function Tn(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=ct.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function Pn(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 On(){if(Rn())throw new Error("window object undefined at SSR check");return window}function Rn(){return"undefined"==typeof window}function Fn(e,t){if(Nn(e)||!xn(e)||!Dn(e))throw t||new Error("id is not valid.")}function kn(e,t){const n=e.toString().toLocaleLowerCase();if(Nn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!In(e))throw t||new Error("Url should be a valid https url")}function Mn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Nn(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function xn(e){return e.length<256&&e.length>4}function Dn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Ln(e){if(!e)throw new Error("id must not be empty");if(!1===en(e))throw new Error("id must be a valid UUID")}const Un=!!performance&&"now"in performance;function Hn(){return Un?performance.now()+performance.timeOrigin:void 0}function Vn(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=>Vn(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=>Vn(e[n],t+1)))}class _n{constructor(e=vn()){this.uuid=e,Ln(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Bn(e){if(!(e instanceof _n))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Wn{}Wn.initializeCalled=!1,Wn.initializeCompleted=!1,Wn.additionalValidOrigins=[],Wn.initializePromise=void 0,Wn.isFramelessWindow=!1,Wn.frameContext=void 0,Wn.hostClientType=void 0,Wn.printCapabilityEnabled=!1,Wn.teamsJsInstanceId=(new _n).toString();var jn=n(815);const zn=new _n,$n=jn.debug.formatArgs;jn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${zn.toString()}]`,$n.call(this,e)};const qn=(0,jn.debug)("teamsJs");function Gn(e){return qn.extend(e)}function Jn(e,t){return`${e}_${t}`}function Kn(e){return/^v\d+_[\w.]+$/.test(e)}var Qn=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=Gn("runtime"),Xn=4;function Yn(e){return e.apiVersion===Xn}const er={apiVersion:-1,supports:{}};function tr(e){if(Yn(e))return!0;throw-1===e.apiVersion?new Error(ot):new Error(it)}let nr=er;const rr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:fn,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:{}}}},or=[tn.desktop,tn.web,tn.rigel,tn.surfaceHub,tn.teamsRoomsWindows,tn.teamsRoomsAndroid,tn.teamsPhones,tn.teamsDisplays],ir=[tn.android,tn.ios,tn.ipados,tn.visionOS],ar=[...or,...ir];function sr(e){let t=e;if(t.apiVersion<Xn&&cr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),Yn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const cr=[{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=Qn(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})}}}],ur={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:or}],"1.9.0":[{capability:{location:{}},hostClientTypes:ar}],"2.0.0":[{capability:{people:{}},hostClientTypes:ar},{capability:{sharing:{}},hostClientTypes:[tn.desktop,tn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[tn.android,tn.desktop,tn.ios,tn.teamsRoomsAndroid,tn.teamsPhones,tn.teamsDisplays,tn.web]},{capability:{webStorage:{}},hostClientTypes:[tn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[tn.android,tn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[tn.android,tn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[tn.android,tn.ios,tn.ipados,tn.visionOS]}]},lr=Zn.extend("generateBackCompatRuntimeConfig");function dr(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]=dr(e[r]||{},t[r]));return n}function fr(e,t,n){lr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);lr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{hn(e,t)>=0&&n[t].forEach((e=>{void 0!==Wn.hostClientType&&e.hostClientTypes.includes(Wn.hostClientType)&&(r=dr(r,e.capability))}))}));const o={apiVersion:Xn,hostVersionsInfo:fn,isLegacyTeams:!0,supports:r};return lr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const pr=Zn.extend("applyRuntimeConfig");function gr(e){"string"==typeof e.apiVersion&&(pr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),pr("Fast-forwarding runtime %o",e);const t=sr(e);pr("Applying runtime %o",t),nr=wn(t)}function mr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const hr="2.38.0-beta.0",vr={childProxyingCommunication:!1};function wr(){vr.childProxyingCommunication=!0}function Cr(){return vr.childProxyingCommunication}let yr={disableEnforceOriginMatchForChildResponses:!1};function br(){return yr}function Sr(e){yr=e}function Er(e){return Sr(Object.assign(Object.assign({},yr),e)),br()}var Ar=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 Ir=e=>{const{uuid:t}=e,n=Ar(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Tr=e=>{const{uuidAsString:t}=e,n=Ar(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new _n(t):void 0})},Pr=e=>{const{uuidAsString:t}=e,n=Ar(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new _n(t):void 0})},Or=e=>{const{uuid:t}=e,n=Ar(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Rr(e){return void 0!==e.uuidAsString?`${e.uuidAsString} (legacy id: ${e.id})`:void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const Fr=Gn("flushMessageQueue");function kr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Ir(o);Fr("Flushing message %s from %s message queue via postMessage.",Rr(n),r),e.postMessage(n,t)}}}const Mr=Gn("internal"),Nr=Mr.extend("ensureInitializeCalled"),xr=Mr.extend("ensureInitialized");function Dr(){if(!Wn.initializeCalled)throw Nr(rt),new Error(rt)}function Lr(e,...t){if(!Wn.initializeCompleted)throw xr("%s. initializeCalled: %s",rt,Wn.initializeCalled.toString()),new Error(rt);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Wn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Wn.frameContext}".`)}return tr(e)}function Ur(e=Be){const t=hn(Wn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Hr(){return Wn.hostClientType==tn.android||Wn.hostClientType==tn.ios||Wn.hostClientType==tn.ipados||Wn.hostClientType==tn.visionOS}function Vr(e=Be){if(!Hr()){throw{errorCode:ke.NOT_SUPPORTED_ON_PLATFORM}}if(!Ur(e)){throw{errorCode:ke.OLD_PLATFORM}}}function _r(e){let t=Wn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&et.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),Wn.additionalValidOrigins=t}function Br(e){if(!$r(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${jr}-${zr}).`)}function Wr(e){if(Nn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(qr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const jr=4,zr=256;function $r(e){return e.length<zr&&e.length>jr}function qr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Gr(e){if(!(e instanceof Kr))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Jr{constructor(e){this.idAsString=e,Wr(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class Kr extends Jr{constructor(e){super(e),Br(e)}toJSON(){return{appIdAsString:this.toString()}}}function Qr(e){return null==e}var Zr=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 Xr;const Yr="v1",eo=Gn("messageChannels.telemetry");function to(){return Zr(this,void 0,void 0,(function*(){if(Xr)return eo("Returning telemetry port from cache"),Xr;if(!no())throw ln;return Xr=yield cc(Jn(Yr,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),Xr}))}function no(){var e;return!(!Lr(nr)||!(null===(e=nr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function ro(){Xr=void 0}var oo=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 io;const ao="v1",so=Gn("messageChannels.dataLayer");function co(){return oo(this,void 0,void 0,(function*(){if(io)return so("Returning dataLayer port from cache"),io;if(!uo())throw ln;return io=yield cc(Jn(ao,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),io}))}function uo(){var e;return!(!Lr(nr)||!(null===(e=nr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function lo(){io=void 0}function fo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Lr(nr),Is(e)}function po(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Lr(nr),Ts(e)}const go="v2",mo=Gn("app"),ho={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var vo,wo;function Co(){return Wn.initializeCompleted}function yo(){return Wn.frameContext}function bo(e){return ji(Jn(go,"app.initialize"),e)}function So(e){Qs.currentWindow=e}function Eo(){Wn.initializeCalled&&(us(),Wn.initializeCalled=!1,Wn.initializeCompleted=!1,Wn.initializePromise=void 0,Wn.additionalValidOrigins=[],Wn.frameContext=void 0,Wn.hostClientType=void 0,Wn.isFramelessWindow=!1,ro(),lo(),Ys())}function Ao(){return new Promise((e=>{Dr(),e(ec(Jn(go,"app.getContext"),"getContext"))})).then((e=>Mo(e)))}function Io(){Dr(),zi(Jn(go,"app.notifyAppLoaded"))}function To(){return Gi(Jn(go,"app.notifySuccess"))}function Po(e){Dr(),qi(Jn(go,"app.notifyFailure"),e)}function Oo(e){Dr(),$i(Jn(go,"app.notifyExpectedFailure"),e)}function Ro(e){Xi(Jn(go,"app.registerOnThemeChangeHandler"),e)}function Fo(e){ws(e)}function ko(e){return Yi(Jn(go,"app.openLink"),e)}function Mo(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:nn.teams,clientType:e.hostClientType?e.hostClientType:tn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new Kr(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Wn.frameContext,renderingSurface:e.renderingSurface?e.renderingSurface:void 0,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 No(e){Jo(Jn(qo,"dialog.update.resize"),e)}function xo(){return!(!Lr(nr)||!nr.supports.dialog)&&!!nr.supports.dialog.update}function Do(e,t,n){Qo(Jn(qo,"dialog.url.bot.open"),e,t,n)}function Lo(){return Lr(nr)&&void 0!==(nr.supports.dialog&&nr.supports.dialog.url&&nr.supports.dialog.url.bot)}function Uo(e){if(Lr(nr,rn.task),!_o())throw ln;dc(Jn(qo,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Ho(e){if(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),!_o())throw ln;dc(Jn(qo,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Vo(e){if(Lr(nr,rn.task),!_o())throw ln;for(ps("messageForChild"),fs(Jn(qo,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ei.reverse();ei.length>0;){e(ei.pop())}}function _o(){var e,t;return Lr(nr)&&!!(null===(t=null===(e=nr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Bo(e,t,n){Ko(Jn(qo,"dialog.url.open"),e,t,n)}function Wo(e,t){Zo(Jn(qo,"dialog.url.submit"),e,t)}function jo(){return Lr(nr)&&void 0!==(nr.supports.dialog&&nr.supports.dialog.url)}function zo(e){return{url:e.url,height:e.size?e.size.height:cn.Small,width:e.size?e.size.width:cn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function $o(e){const t=zo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(vo||(vo={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(wo||(wo={})),mo("teamsjs instance is version %s, starting at %s UTC (%s local)",hr,(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?mo("teamsjs is being used from %s. %s",t,n):mo("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const qo="v2",Go="dialog.submit should not be called from FrameContext.content.\nIf dialog.submit was called from inside the dialog, please disregard this message.\nThis issue occurs due to a bug in Teams mobile where the dialog is incorrectly identified as being in the content FrameContext.\nWe are working to resolve this.";function Jo(e,t){if(Lr(nr,rn.content,rn.sidePanel,rn.task,rn.meetingStage),!xo())throw ln;dc(e,"tasks.updateTask",[t])}function Ko(e,t,n,r){if(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),!jo())throw ln;r&&fs(Jn(qo,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);dc(e,"tasks.startTask",[zo(t)],((e,t)=>{null==n||n({err:e,result:t}),ps("messageForParent")}))}function Qo(e,t,n,r){if(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),!Lo())throw ln;r&&fs(Jn(qo,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);dc(e,"tasks.startTask",[$o(t)],((e,t)=>{null==n||n({err:e,result:t}),ps("messageForParent")}))}function Zo(e,t,n){if(Lr(nr,rn.content,rn.task),!jo())throw ln;Wn.frameContext===rn.content&&console.warn(Go),dc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function Xo(e){return{card:e.card,height:e.size?e.size.height:cn.Small,width:e.size?e.size.width:cn.Small,title:e.title}}function Yo(e){const t=Xo(e);return t.completionBotId=e.completionBotId,t}const ei=[];function ti(e){Wn.frameContext&&(Wn.frameContext===rn.task?ei.push(e):ps("messageForChild"))}function ni(e,t){if(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),!ri())throw ln;const n=Yo(e);dc(Jn(qo,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ri(){const e=nr.hostVersionsInfo&&nr.hostVersionsInfo.adaptiveCardSchemaVersion&&!An(nr.hostVersionsInfo.adaptiveCardSchemaVersion);return Lr(nr)&&void 0!==(e&&nr.supports.dialog&&nr.supports.dialog.card&&nr.supports.dialog.card.bot)}function oi(e,t){if(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),!ii())throw ln;const n=Xo(e);dc(Jn(qo,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ii(){const e=nr.hostVersionsInfo&&nr.hostVersionsInfo.adaptiveCardSchemaVersion&&!An(nr.hostVersionsInfo.adaptiveCardSchemaVersion);return Lr(nr)&&void 0!==(e&&nr.supports.dialog&&nr.supports.dialog.card)}function ai(){fs(Jn(qo,"dialog.registerMessageForChildHandler"),"messageForChild",ti,!1)}function si(){return!(!Lr(nr)||!nr.supports.dialog)}const ci="v2";var ui,li;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(ui||(ui={}));class di{constructor(){this.enabled=!0,this.selected=!1}}let fi,pi,gi,mi,hi;function vi(){fs(Jn(ci,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",bi,!1),fs(Jn(ci,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Ei,!1),fs(Jn(ci,"menus.registerSetModuleViewHandler"),"setModuleView",Ci,!1)}function wi(e,t){if(Lr(nr),!Ai())throw ln;gi=t,dc(Jn(ci,"menus.setUpViews"),"setUpViews",[e])}function Ci(e){gi&&gi(e)||(Lr(nr),dc(Jn(ci,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function yi(e,t){if(Lr(nr),!Ai())throw ln;fi=t,dc(Jn(ci,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function bi(e){fi&&fi(e)||(Lr(nr),dc(Jn(ci,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Si(e,t){if(Lr(nr),!Ai())throw ln;pi=t,dc(Jn(ci,"menus.showActionMenu"),"showActionMenu",[e])}function Ei(e){pi&&pi(e)||(Lr(nr),dc(Jn(ci,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Ai(){return!(!Lr(nr)||!nr.supports.menus)}function Ii(){fs(Jn(_a,"pages.config.registerSettingsSaveHandler"),"settings.save",Mi,!1),fs(Jn(_a,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Di,!1)}function Ti(e){return Ka(Jn(_a,"pages.config.setValidityState"),e)}function Pi(e){return Za(Jn(_a,"pages.config.setConfig"),e)}function Oi(e){Ri(Jn(_a,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Qr(e)&&!Ui())throw ln}))}function Ri(e,t,n){!Qr(t)&&Lr(nr,rn.settings),n&&n(),mi=t,!Qr(t)&&dc(e,"registerHandler",["save"])}function Fi(e){ki(Jn(_a,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Qr(e)&&!Ui())throw ln}))}function ki(e,t,n){!Qr(t)&&Lr(nr,rn.remove,rn.settings),n&&n(),hi=t,!Qr(t)&&dc(e,"registerHandler",["remove"])}function Mi(e){const t=new xi(e);mi?mi(t):ks()?Hs("settings.save",[e]):t.notifySuccess()}function Ni(e){ms(Jn(_a,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[rn.content],(()=>{if(!Ui())throw ln}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(li||(li={}));class xi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),dc(Jn(_a,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),dc(Jn(_a,"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 Di(){const e=new Li;hi?hi(e):ks()?Hs("settings.remove",[]):e.notifySuccess()}class Li{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),dc(Jn(_a,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),dc(Jn(_a,"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 Ui(){return!(!Lr(nr)||!nr.supports.pages)&&!!nr.supports.pages.config}class Hi{}class Vi extends Hi{validate(e){return!0}deserialize(e){return e}}var _i=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,Wi=Gn("app");function ji(e,t){if(Rn()){return Wi.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Sn((()=>Zi(e,t)),Bi,new Error("SDK initialization timed out."))}function zi(e){dc(e,ho.AppLoaded,[hr])}function $i(e,t){dc(e,ho.ExpectedFailure,[t.reason,t.message])}function qi(e,t){dc(e,ho.Failure,[t.reason,t.message])}function Gi(e){return _i(this,void 0,void 0,(function*(){if(Wn.initializeCompleted)return Ki(e);if(!Wn.initializePromise)throw new Error(rt);return Wn.initializePromise.then((()=>Ki(e)))}))}function Ji(){var e;return Lr(nr)&&!!(null===(e=nr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Ki(e){return _i(this,void 0,void 0,(function*(){return Ji()?ac(ho.Success,[hr],new Vi,e).then((()=>({hasFinishedSuccessfully:!0}))):(dc(e,ho.Success,[hr]),{hasFinishedSuccessfully:"unknown"})}))}const Qi=Wi.extend("initializeHelper");function Zi(e,t){return new Promise((n=>{Wn.initializeCalled||(Wn.initializeCalled=!0,cs(),Wn.initializePromise=Xs(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Be})=>{Wn.frameContext=e,Wn.hostClientType=t,Wn.clientSupportedSDKVersion=r;try{Qi("Parsing %s",n);const e=JSON.parse(n);if(Qi("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&gr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{Qi("Attempting to parse %s as an SDK version",n),isNaN(hn(n,Be))||(Wn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(Qi("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");gr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;gr(fr(Wn.clientSupportedSDKVersion,rr,ur))}}Wn.initializeCompleted=!0})),vi(),Ii(),ai()),Array.isArray(t)&&_r(t),void 0!==Wn.initializePromise?n(Wn.initializePromise):Qi("GlobalVars.initializePromise is unexpectedly undefined")}))}function Xi(e,t){!Qr(t)&&Dr(),hs(e,t)}function Yi(e,t){return new Promise((n=>{Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),n(tc(e,"executeDeepLink",t))}))}var ea=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 ta=[];const na=Gn("validateOrigin");function ra(){return ea(this,void 0,void 0,(function*(){yield ia()}))}function oa(){return 0===ta.length}function ia(e=!1){return ea(this,void 0,void 0,(function*(){if(!oa()&&!e)return ta;if(Rn())return ta=Ze,Ze;{na("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),Xe);return fetch(Ye,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return na("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(aa(JSON.stringify(e)))return ta=e.validOrigins,ta;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?na(`validOrigins fetch call to CDN failed due to Timeout of ${Xe} ms. Defaulting to fallback list`):na("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),ta=Ze,ta)))}}))}function aa(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 na("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function sa(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 ca(e,t){return ia(t).then((t=>{if(!In(e))return na("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=>sa(e,n))))return!0;for(const e of Wn.additionalValidOrigins){if(sa("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return na("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,Wn.additionalValidOrigins),!1}))}function ua(e){ms(Jn(_a,"pages.appButton.onClick"),"appButtonClick",e,[rn.content],(()=>{if(!fa())throw ln}))}function la(e){ms(Jn(_a,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[rn.content],(()=>{if(!fa())throw ln}))}function da(e){ms(Jn(_a,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[rn.content],(()=>{if(!fa())throw ln}))}function fa(){return!(!Lr(nr)||!nr.supports.pages)&&!!nr.supports.pages.appButton}function pa(){rs()}function ga(){return Wa(Jn(_a,"pages.backStack.navigateBack"))}function ma(e){ha(Jn(_a,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Qr(e)&&!va())throw ln}))}function ha(e,t,n){!Qr(t)&&Lr(nr),n&&n(),ns(t),!Qr(t)&&dc(e,"registerHandler",["backButton"])}function va(){return!(!Lr(nr)||!nr.supports.pages)&&!!nr.supports.pages.backStack}function wa(e){return new Promise((t=>{if(Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!ya())throw ln;t(rc(Jn(_a,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function Ca(){return new Promise((e=>{if(Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!ya())throw ln;e(rc(Jn(_a,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function ya(){return!(!Lr(nr)||!nr.supports.pages)&&!!nr.supports.pages.currentApp}function ba(){if(Lr(nr,rn.content),!Ea())throw ln;dc(Jn(_a,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Sa(){if(Lr(nr,rn.content),!Ea())throw ln;dc(Jn(_a,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Ea(){return!(!Lr(nr)||!nr.supports.pages)&&!!nr.supports.pages.fullTrust}function Aa(e){return ja(Jn(_a,"pages.tabs.navigateToTab"),e)}function Ia(e){return $a(Jn(_a,"pages.tabs.getTabInstances"),e)}function Ta(e){return qa(Jn(_a,"pages.tabs.getMruTabInstances"),e)}function Pa(){return!(!Lr(nr)||!nr.supports.pages)&&!!nr.supports.pages.tabs}var Oa,Ra;function Fa(e){const t=Jn(_a,"pages.returnFocus");if(Lr(nr),!Va())throw ln;if(void 0===e&&dc(t,"returnFocus",[!1]),"boolean"==typeof e)dc(t,"returnFocus",[e]);else switch(e){case Ra.PreviousLandmark:case Ra.GoToActivityFeed:dc(t,"returnFocus",[!1,e]);break;case Ra.NextLandmark:dc(t,"returnFocus",[!0,e])}}function ka(e){ms(Jn(_a,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!Va())throw ln}))}function Ma(e){Ja(Jn(_a,"pages.setCurrentFrame"),e)}function Na(e,t,n){ra(),ji(Jn(_a,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Ma(e)}function xa(){return Qa(Jn(_a,"pages.getConfig."))}function Da(e){return Ba(Jn(_a,"pages.navigateCrossDomain"),e)}function La(e){return new Promise((t=>{if(Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!Va())throw ln;const n=Jn(_a,"pages.navigateToApp");if(nr.isLegacyTeams){t(tc(n,"executeDeepLink",En(Xa(e)?e:Ya(e))))}else{t(tc(n,"pages.navigateToApp",Xa(e)?es(e):e))}}))}function Ua(e){return Ga(Jn(_a,"pages.shareDeepLink"),e)}function Ha(e){ms(Jn(_a,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Qr(e)&&!Va())throw ln}))}function Va(){return!(!Lr(nr)||!nr.supports.pages)}ra(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Oa||(Oa={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Ra||(Ra={}));const _a="v2";function Ba(e,t){return new Promise((n=>{if(Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage),!Va())throw ln;n(nc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function Wa(e){return new Promise((t=>{if(Lr(nr),!va())throw ln;t(nc(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function ja(e,t){return new Promise((n=>{if(Lr(nr),!Pa())throw ln;n(nc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function za(e,t){if(Lr(nr),!Va())throw ln;dc(e,"returnFocus",[t])}function $a(e,t){return new Promise((n=>{if(Lr(nr),!Pa())throw ln;n(ec(e,"getTabInstances",t))}))}function qa(e,t){return new Promise((n=>{if(Lr(nr),!Pa())throw ln;n(ec(e,"getMruTabInstances",t))}))}function Ga(e,t){if(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),!Va())throw ln;dc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function Ja(e,t){if(Lr(nr,rn.content),!Va())throw ln;dc(e,"setFrameContext",[t])}function Ka(e,t){if(Lr(nr,rn.settings,rn.remove),!Ui())throw ln;dc(e,"settings.setValidityState",[t])}function Qa(e){return new Promise((t=>{if(Lr(nr,rn.content,rn.settings,rn.remove,rn.sidePanel),!Va())throw ln;t(ec(e,"settings.getSettings"))}))}function Za(e,t){return new Promise((n=>{if(Lr(nr,rn.content,rn.settings,rn.sidePanel),!Ui())throw ln;n(tc(e,"settings.setSettings",t))}))}function Xa(e){return e.appId instanceof Kr}function Ya(e){return Object.assign(Object.assign({},e),{appId:new Kr(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function es(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let ts;function ns(e){ts=e}function rs(){fs(Jn(_a,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",os,!1)}function os(){ts&&ts()||(ks()?Hs("backButtonPress",[]):ga())}var is=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 as=Gn("handlers");class ss{static initializeHandlers(){ss.handlers.themeChange=vs,ss.handlers.load=bs,ss.handlers.beforeUnload=As,rs()}static uninitializeHandlers(){ss.handlers={},ss.themeChangeHandler=null,ss.loadHandler=null,ss.beforeUnloadHandler=null,ss.beforeSuspendOrTerminateHandler=null,ss.resumeHandler=null}}function cs(){ss.initializeHandlers()}function us(){ss.uninitializeHandlers()}ss.handlers={},ss.themeChangeHandler=null,ss.loadHandler=null,ss.beforeUnloadHandler=null,ss.beforeSuspendOrTerminateHandler=null,ss.resumeHandler=null,ss.hostToAppPerformanceMetricsHandler=null;const ls=as.extend("callHandler");function ds(e,t){const n=ss.handlers[e];if(n){ls("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return ks()?(Hs(e,t),[!1,void 0]):(ls("Handler for action message %s not found.",e),[!1,void 0])}function fs(e,t,n,r=!0,o=[]){n?(ss.handlers[t]=n,r&&dc(e,"registerHandler",[t,...o])):delete ss.handlers[t]}function ps(e){delete ss.handlers[e]}function gs(e){return null!=ss.handlers[e]}function ms(e,t,n,r,o){n&&Lr(nr,...r),o&&o(),fs(e,t,n)}function hs(e,t){ss.themeChangeHandler=t,!Qr(t)&&dc(e,"registerHandler",["themeChange"])}function vs(e){ss.themeChangeHandler&&ss.themeChangeHandler(e),ks()&&Hs("themeChange",[e])}function ws(e){ss.hostToAppPerformanceMetricsHandler=e}function Cs(e){ss.hostToAppPerformanceMetricsHandler&&ss.hostToAppPerformanceMetricsHandler(e)}function ys(e,t){ss.loadHandler=t,!Qr(t)&&dc(e,"registerHandler",["load"])}function bs(e){const t=Ss(e);ss.resumeHandler?(ss.resumeHandler(t),ks()&&Hs("load",[t])):ss.loadHandler&&(ss.loadHandler(e),ks()&&Hs("load",[e]))}function Ss(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Es(e,t){ss.beforeUnloadHandler=t,!Qr(t)&&dc(e,"registerHandler",["beforeUnload"])}function As(){return is(this,void 0,void 0,(function*(){const e=()=>{dc(Jn("v2","handleBeforeUnload"),"readyToUnload",[])};ss.beforeSuspendOrTerminateHandler?(yield ss.beforeSuspendOrTerminateHandler(),ks()?Hs("beforeUnload"):e()):ss.beforeUnloadHandler&&ss.beforeUnloadHandler(e)||(ks()?Hs("beforeUnload"):e())}))}function Is(e){ss.beforeSuspendOrTerminateHandler=e,!Qr(e)&&dc(Jn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Ts(e){ss.resumeHandler=e,!Qr(e)&&dc(Jn("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Ps=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 Os=Gn("childProxyingCommunication");class Rs{}function Fs(){Rs.window=null,Rs.origin=null,Rs.messageQueue=[]}function ks(){return!!Cr()&&!!Rs.window}function Ms(e,t){return!!Cr()&&(Rs.window&&!Rs.window.closed&&e!==Rs.window||(Rs.window=e,Rs.origin=t),Rs.window&&Rs.window.closed?(Rs.window=null,Rs.origin=null,!1):Rs.window===e)}function Ns(e,t,n,r){return Ps(this,void 0,void 0,(function*(){Rs.window===t&&(kr(Rs.window,Rs.origin,Rs.messageQueue,"child"),Ds(e,n,r))}))}Rs.messageQueue=[];const xs=Os.extend("handleIncomingMessageFromChild");function Ds(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Tr(e.data),[o,i]=ds(r.func,r.args);if(o&&void 0!==i)return xs("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Rr(r),r.func),void Us(r.id,r.uuid,Array.isArray(i)?i:[i]);xs("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Rr(r),r.func),Ls(r,t,n)}function Ls(e,t,n){const r=t(Jn("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Rs.origin;n(r.uuid,((...t)=>{if(!Rs.window)return;if(!br().disableEnforceOriginMatchForChildResponses&&o!==Rs.origin)return void xs("Origin of child window has changed, not sending response back to child window");const n=t.pop();xs("Message from parent being relayed to child, id: %s",Rr(e)),Us(e.id,e.uuid,t,n)}))}function Us(e,t,n,r){const o=Rs.window,i=Vs(e,t,n,r),a=Or(i),s=Rs.origin;o&&s&&(xs("Sending message %s to %s via postMessage, args = %o",Rr(a),"child",a.args),o.postMessage(a,s))}function Hs(e,t){const n=Rs.window,r=_s(e,t),o=Rs.origin;n&&o?n.postMessage(r,o):Rs.messageQueue.push(r)}function Vs(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function _s(e,t){return{func:e,args:t||[]}}class Bs{static storeCallbackInformation(e,t){Bs.callbackInformation.set(e,t)}static clearMessages(){Bs.callbackInformation.clear()}static deleteMessageInformation(e){Bs.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Cs({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=Bs.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Cs({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Bs.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Bs.callbackInformation=new Map;const Ws=Gn("nestedAppAuthUtils"),js=Ws.extend("tryPolyfillWithNestedAppAuthBridge"),zs="v2";function $s(e,t,n){var r;const o=js;if(Wn.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");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");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=Gs(a,n);s&&(a.nestedAppAuthBridge=s)}const qs=Ws.extend("createNestedAppAuthBridge");function Gs(e,t){const n=qs;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}})();if(!t||"object"!=typeof t||"NestedAppAuthRequest"!==t.messageType)return void n("Unrecognized data format received by app, message being ignored. Message: %o",e);const r=Jn(zs,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var Js=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 Ks=Gn("communication");class Qs{}class Zs{}function Xs(e,t){if(Zs.messageListener=e=>Cc(e),Qs.currentWindow=Qs.currentWindow||On(),Qs.parentWindow=Qs.currentWindow.parent!==Qs.currentWindow.self?Qs.currentWindow.parent:Qs.currentWindow.opener,Qs.topWindow=Qs.currentWindow.top,(Qs.parentWindow||e)&&Qs.currentWindow.addEventListener("message",Zs.messageListener,!1),!Qs.parentWindow){const e=Qs.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Wn.isFramelessWindow=!0,e.onNativeMessage=Rc}try{return Qs.parentOrigin="*",oc(t,"initialize",[hr,Xn,e]).then((([e,t,n,r])=>($s(r,Qs.currentWindow,{onMessage:bc,sendPostMessage:pc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Qs.parentOrigin=null}}function Ys(){Qs.currentWindow&&Qs.currentWindow.removeEventListener("message",Zs.messageListener,!1),Qs.currentWindow=null,Qs.parentWindow=null,Qs.parentOrigin=null,Zs.parentMessageQueue=[],Zs.nextMessageId=0,Zs.callbacks.clear(),Zs.promiseCallbacks.clear(),Zs.portCallbacks.clear(),Zs.legacyMessageIdsToUuidMap={},Bs.clearMessages(),Fs()}function ec(e,t,...n){return oc(e,t,n).then((([e])=>e))}function tc(e,t,...n){return oc(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function nc(e,t,n,...r){return oc(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function rc(e,t,...n){return oc(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function oc(e,t,n=void 0){if(!Kn(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(lc(vc(e,t,n).uuid))}))}function ic(e){return e.map((e=>mr(e)?e.serialize():e))}function ac(e,t,n,r,o){var i;return Js(this,void 0,void 0,(function*(){const a=ic(t),[s]=yield oc(r,e,a);if(o&&o(s)||!o&&Ve(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(`${ke.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function sc(e,t,n,r){var o;return Js(this,void 0,void 0,(function*(){const i=ic(t),[a]=yield oc(n,e,i);if(r&&r(a)||!r&&Ve(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${ke.INTERNAL_ERROR}, message: Invalid response from host`)}))}function cc(e,t,n=void 0){if(!Kn(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 uc(vc(e,t,n).uuid)}function uc(e){return new Promise(((t,n)=>{Zs.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 lc(e){return new Promise((t=>{Zs.promiseCallbacks.set(e,t)}))}function dc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!Kn(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=vc(e,t,o);r&&Zs.callbacks.set(i.uuid,r)}Zs.parentMessageQueue=[],Zs.topMessageQueue=[],Zs.nextMessageId=0,Zs.callbacks=new Map,Zs.promiseCallbacks=new Map,Zs.portCallbacks=new Map,Zs.legacyMessageIdsToUuidMap={};const fc=Ks.extend("sendNestedAuthRequestToTopWindow");function pc(e,t){const n=fc,r=Qs.topWindow,o=Uc(e,t);return n("Message %s information: %o",Rr(o),{actionName:o.func}),mc(r,o)}const gc=Ks.extend("sendRequestToTargetWindowHelper");function mc(e,t){const n=gc,r=xc(e),o=Ir(t);if(Wn.isFramelessWindow)Qs.currentWindow&&Qs.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Rr(o),r),Qs.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Nc(e);e&&i?(n("Sending message %s to %s via postMessage",Rr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Rr(o),r),Mc(e).push(t))}return t}const hc=Ks.extend("sendMessageToParentHelper");function vc(e,t,n,r,o){const i=hc,a=Qs.parentWindow,s=Lc(e,t,n,r,o);return Bs.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Rr(s),{actionName:t,args:n}),mc(a,s)}const wc=Ks.extend("processIncomingMessage");function Cc(e){return Js(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void wc("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 Ec(t,n).then((r=>{r?(Ac(t,n),t!==Qs.parentWindow?Ms(t,n)&&Ns(e,t,vc,((e,t)=>Zs.callbacks.set(e,t))):Rc(e)):wc("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 yc=Ks.extend("processAuthBridgeMessage");function bc(e,t){var n,r;const o=yc;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),u=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?Ec(c,u)?(Qs.topWindow&&!Qs.topWindow.closed&&c!==Qs.topWindow||(Qs.topWindow=c,Qs.topOrigin=u),Qs.topWindow&&Qs.topWindow.closed&&(Qs.topWindow=null,Qs.topOrigin=null),kr(Qs.topWindow,Qs.topOrigin,Zs.topMessageQueue,"top"),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=Ks.extend("shouldProcessIncomingMessage");function Ec(e,t){return Js(this,void 0,void 0,(function*(){if(Qs.currentWindow&&e===Qs.currentWindow)return Sc("Should not process message because it is coming from the current window"),!1;if(Qs.currentWindow&&Qs.currentWindow.location&&t&&t===Qs.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 ca(e);return n||Sc("Message has an invalid origin of %s",t),n}}))}function Ac(e,t){Wn.isFramelessWindow||Qs.parentWindow&&!Qs.parentWindow.closed&&e!==Qs.parentWindow||(Qs.parentWindow=e,Qs.parentOrigin=t),Qs.parentWindow&&Qs.parentWindow.closed&&(Qs.parentWindow=null,Qs.parentOrigin=null),kr(Qs.parentWindow,Qs.parentOrigin,Zs.parentMessageQueue,"parent")}const Ic=Ks.extend("handleIncomingMessageFromParent");function Tc(e){const t=Ic;if(!e.uuid)return Zs.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Pc(Zs.callbacks,t);if(n)return n;const r=Pc(Zs.promiseCallbacks,t);if(r)return r;const o=Pc(Zs.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Rr(e))}function Pc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Oc(e,t){const n=Pc(t,e.uuid);n&&t.delete(n),e.uuid?Zs.legacyMessageIdsToUuidMap={}:delete Zs.legacyMessageIdsToUuidMap[e.id]}function Rc(e){const t=Ic,n=Hn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Pr(r),i=Tc(o);if(i){const r=Zs.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Bs.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]),Fc(e)||(t("Removing registered callback for message %s",i.toString()),Oc(o,Zs.callbacks)));const a=Zs.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()),Oc(o,Zs.promiseCallbacks));const s=Zs.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()),Oc(o,Zs.portCallbacks)}o.uuid&&(Zs.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Bs.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Rr(r),r.func),ds(r.func,r.args)}else t("Received an unknown message: %O",e)}function Fc(e){return!0===e.data.isPartialResponse}function kc(){return Qs.topWindow!==Qs.parentWindow}function Mc(e){return e===Qs.topWindow&&kc()?Zs.topMessageQueue:e===Qs.parentWindow?Zs.parentMessageQueue:[]}function Nc(e){return e===Qs.topWindow&&kc()?Qs.topOrigin:e===Qs.parentWindow?Qs.parentOrigin:null}function xc(e){return e===Qs.topWindow&&kc()?"top":e===Qs.parentWindow?"parent":null}function Dc(e,t){let n;n=Qs.currentWindow.setInterval((()=>{0===Mc(e).length&&(clearInterval(n),t())}),100)}function Lc(e,t,n,r,o){const i=Zs.nextMessageId++,a=new _n;Zs.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Wn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:Hn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function Uc(e,t){const n=Zs.nextMessageId++,r=new _n;return Zs.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Hn(),apiVersionTag:t,args:[],data:e}}const Hc="v1";function Vc(e){if(!Qr(e)&&Lr(nr),!Qr(e)&&!_c())throw ln;e?fs(Jn(Hc,"log.request"),"log.request",(()=>{const t=e();dc(Jn(Hc,"log.receive"),"log.receive",[t])})):ps("log.request")}function _c(){return!(!Lr(nr)||!nr.supports.logs)}var Bc,Wc,jc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Bc||(Bc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Wc||(Wc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(jc||(jc={}));const zc="v1";function $c(e,t){Lr(nr),dc(Jn(zc,"uploadCustomApp"),"uploadCustomApp",[e],t||mn())}function qc(e,t,n){Lr(nr),dc(Jn(zc,"sendCustomMessage"),e,t,n)}function Gc(e,t){if(Lr(nr),!ks())throw new Error("The child window has not yet been initialized or is not present");Hs(e,t)}function Jc(e,t){Lr(nr),fs(Jn(zc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function Kc(e,t){Lr(nr),fs(Jn(zc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Qc(e){Lr(nr,rn.content,rn.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];dc(Jn(zc,"openFilePreview"),"openFilePreview",t)}const Zc="v1";function Xc(e){return new Promise((t=>{if(Lr(nr,rn.content),!tu())throw ln;const n=tc(Jn(Zc,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&fs(Jn(Zc,"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&&fs(Jn(Zc,"conversations.registerCloseConversationHandler"),"closeConversation",((t,n,r,o)=>{var i;return null===(i=e.onCloseConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),t(n)}))}function Yc(){if(Lr(nr,rn.content),!tu())throw ln;dc(Jn(Zc,"conversations.closeConversation"),"conversations.closeConversation"),ps("startConversation"),ps("closeConversation")}function eu(){return new Promise((e=>{if(Lr(nr),!tu())throw ln;e(ec(Jn(Zc,"conversations.getChatMember"),"getChatMembers"))}))}function tu(){return!(!Lr(nr)||!nr.supports.conversations)}var nu=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 ru="v2",ou=Gn("copilot");function iu(){var e;return Lr(nr)&&!!(null===(e=nr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function au(e,t){var n;return void 0===t&&(t=null!==(n=Hn())&&void 0!==n?n:Date.now()),nu(this,void 0,void 0,(function*(){return Lr(nr),ou("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),sc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Jn(ru,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var su=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 cu="v2",uu=Gn("copilot");function lu(){var e,t;return Lr(nr)&&(!!(null===(e=nr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=nr.supports.copilot)||void 0===t?void 0:t.eligibility))}function du(e){var t,n;return su(this,void 0,void 0,(function*(){if(Lr(nr),!lu())throw new Error(`Error code: ${ln.errorCode}, message: Not supported on platform`);if((null===(t=nr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return uu("Eligibility information is already available on runtime."),nr.hostVersionsInfo.appEligibilityInformation;uu("Eligibility information is not available on runtime. Requesting from host.");const r=yield ec(Jn(cu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(Ve(r))throw new Error(`Error code: ${r.errorCode}, message: ${null!==(n=r.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!fu(r))throw new Error("Error deserializing eligibility information");return r}))}function fu(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&&(!e.featureSet||void 0!==e.featureSet.serverFeatures&&void 0!==e.featureSet.uxFeatures)}const pu="v2";class gu{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function mu(e){const t=e;return t.responseType===wu.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const hu="Action.Execute";var vu,wu,Cu;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(vu||(vu={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(wu||(wu={}));class yu extends Hi{validate(e){return mu(e)}deserialize(e){return e}}function bu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Cu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function Su(e){e.requestType===vu.ActionExecuteInvokeRequest?Eu(e):e.requestType===vu.QueryMessageExtensionRequest&&Au(e)}function Eu(e){if(e.type!==hu){throw{errorCode:Cu.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${hu}"`}}if(!Vn(e.data)){throw{errorCode:Cu.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function Au(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 Iu(e,t,n){if(Lr(nr,rn.content),!Fu())throw ln;const r=new Kr(e);return Su(n),oc(Jn(pu,"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 Tu(e,t){if(Lr(nr,rn.content),!Fu())throw ln;const n=new Kr(e);return oc(Jn(pu,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function Pu(e,t,n){if(Lr(nr,rn.content),!Fu())throw ln;const r=new Kr(e);return Su(n),oc(Jn(pu,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function Ou(e,t,n){if(Lr(nr,rn.content),!Fu())throw ln;return Fn(e,new Error("titleId is Invalid.")),Fn(t,new Error("oauthConfigId is Invalid.")),oc(Jn(pu,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Ru(e,t,n){if(Lr(nr,rn.content),!Fu())throw ln;return Fn(e,new Error("titleId is Invalid.")),t&&kn(t),oc(Jn(pu,"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 Fu(){return!(!Lr(nr)||!nr.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Cu||(Cu={}));var ku=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 Mu="v2";function Nu(e,t,n){return ku(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!Uu())throw ln;return Hu(e,t),sc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],Jn(Mu,"externalAppAuthenticationForCEA.authenticateWithSSO"),bu)}))}function xu(e,t,n){return ku(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!Uu())throw ln;return Hu(e,t),sc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Jn(Mu,"externalAppAuthenticationForCEA.authenticateWithOauth"),bu)}))}function Du(e,t,n,r){return ku(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!Uu())throw ln;return Hu(e,t),Eu(r),ac("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new gu(r),n.url.href,n.width,n.height,n.isExternal],new yu,Jn(Mu,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),bu)}))}function Lu(e,t,n,r){return ku(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!Uu())throw ln;return Hu(e,t),Eu(r),ac("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new gu(r),n.authId,n.connectionName,n.claims,n.silent],new yu,Jn(Mu,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),bu)}))}function Uu(){return!(!Lr(nr)||!nr.supports.externalAppAuthenticationForCEA)}function Hu(e,t){Fn(t,new Error("conversation id is not valid.")),Gr(e)}const Vu="v2";var _u,Bu;function Wu(e,t){if(Lr(nr,rn.content),!zu())throw ln;const n=new Kr(e);return oc(Jn(Vu,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function ju(e,t,n){if(Lr(nr,rn.content),!zu())throw ln;const r=new Kr(e);return oc(Jn(Vu,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function zu(){return!(!Lr(nr)||!nr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(_u||(_u={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Bu||(Bu={}));var $u=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 qu="v2";function Gu(e,t,n){return $u(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!Ku())throw ln;Hu(e,t);const[r,o]=yield oc(Jn(qu,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function Ju(e,t,n){return $u(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!Ku())throw ln;Hu(e,t);const r=yield ec(Jn(qu,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Ku(){return!(!Lr(nr)||!nr.supports.externalAppCardActionsForCEA)}var Qu;function Zu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Qu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Qu||(Qu={}));var Xu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Yu="v2";function el(e,t,n){return Xu(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!tl())throw ln;return nl(e,n),sc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new rl(t),n],Jn(Yu,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Zu)}))}function tl(){return!(!Lr(nr)||!nr.supports.externalAppCardActionsForDA)}function nl(e,t){Gr(e),Bn(t)}class rl{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var ol=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 il="v2";function al(e,t,n){return ol(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!sl())throw ln;const r=new Kr(e),[o,i]=yield oc(Jn(il,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function sl(){return!(!Lr(nr)||!nr.supports.externalAppCommands)}const cl="v1";var ul,ll,dl,fl,pl,gl;function ml(e,t){if(Lr(nr,rn.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");dc(Jn(cl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function hl(e,t){if(Lr(nr,rn.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");dc(Jn(cl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function vl(e,t,n){if(Lr(nr,rn.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");dc(Jn(cl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function wl(e,t,n){if(Lr(nr,rn.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");dc(Jn(cl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Cl(e,t,n){if(Lr(nr,rn.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");dc(Jn(cl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function yl(e=!1,t){if(Lr(nr,rn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");dc(Jn(cl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function bl(e,t,n,r,o=!1,i){if(Lr(nr,rn.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");dc(Jn(cl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function Sl(e){if(Lr(nr,rn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");dc(Jn(cl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function El(e=void 0,t){if(Lr(nr,rn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");dc(Jn(cl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function Al(e){if(Lr(nr,rn.content),!e)throw Nl(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");dc(Jn(cl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function Il(e,t){if(Lr(nr,rn.content),!t)throw Nl(ke.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw Nl(ke.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");dc(Jn(cl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Tl(e,t){if(Lr(nr,rn.content),!t)throw Nl(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Nl(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");dc(Jn(cl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Pl(e,t){if(Lr(nr,rn.content),!t)throw Nl(ke.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Nl(ke.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");dc(Jn(cl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Ol(e,t){if(Lr(nr,rn.content),!t)throw Nl(ke.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Nl(ke.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");dc(Jn(cl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Rl(e,t){if(Lr(nr,rn.content),!t)throw Nl(ke.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Nl(ke.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");dc(Jn(cl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Fl(e,t){if(Lr(nr,rn.content),!t)throw Nl(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Nl(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw Nl(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");dc(Jn(cl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function kl(e){if(Lr(nr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");fs(Jn(cl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Ml(e){if(Lr(nr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");fs(Jn(cl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function Nl(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"}(ul||(ul={})),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"}(ll||(ll={})),function(e){e.ClassMaterials="classMaterials"}(dl||(dl={})),function(e){e.Readonly="readonly"}(fl||(fl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(pl||(pl={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(gl||(gl={}));const xl="v1";function Dl(){return new Promise((e=>{if(Lr(nr),!Vl())throw ln;e(rc(Jn(xl,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function Ll(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Lr(nr),!Vl())throw ln;t(rc(Jn(xl,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function Ul(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Lr(nr),!Vl())throw ln;fs(Jn(xl,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Lr(nr),e(t)}))}function Hl(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Lr(nr),!Vl())throw ln;fs(Jn(xl,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{Lr(nr),e(t)}))}function Vl(){return!(!Lr(nr)||!nr.supports.meetingRoom)}function _l(){return!(!Lr(nr)||!nr.supports.messageChannels)}const Bl="1.0.0",Wl={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Ql("Invalid message format, ignoring. Message: %o",e);if(!Gl(e.source,e.origin))return void Ql("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Zl("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Ql("Invalid response format, ignoring. Message: %o",e);t(r)}};let jl=null,zl=!1;function $l(e,t,n=!1){if(zl=n,!e)throw new Error("Cannot polyfill nestedAppAuthBridge as the current window does not exist");if(!t)throw new Error("Top origin is required to initialize the Nested App Auth Bridge");try{const e=new URL(t);if("https:"!==e.protocol)throw new Error(`Invalid top origin: ${t}. Only HTTPS origins are allowed.`);jl=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Ql("Nested App Auth Bridge is already present");const o=ql(r);o&&(r.nestedAppAuthBridge=o)}function ql(e){const t=new WeakMap,{onMessage:n}=Wl,r=e=>t=>n(t,e);return{addEventListener:(n,o)=>{if("message"===n){const i=r(o);t.set(o,i),e.addEventListener(n,i)}else Ql(`Event ${n} is not supported by nestedAppAuthBridge`)},postMessage:t=>{if(!e.top)throw new Error("window.top is not available for posting messages");try{const n=JSON.parse(t);if("object"==typeof n&&"NestedAppAuthRequest"===n.messageType){const n=Jl(t);if(e===e.top||!jl)return void Zl("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,jl)}}catch(e){return void Zl("Failed to parse message:",e,"Original message:",t)}},removeEventListener:(n,r)=>{const o=t.get(r);o&&(e.removeEventListener(n,o),t.delete(r))}}}function Gl(e,t){if(e&&e!==window.top)return Ql("Should not process message because it is not coming from the top window"),!1;if(t===jl)try{return"https:"===new URL(t).protocol}catch(e){return Zl("Invalid message origin URL:",e),!1}return!1}function Jl(e){const t=Date.now();return{id:Kl(),uuid:Xt(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Kl(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Ql(...e){zl&&console.log(...e)}function Zl(...e){zl&&console.error(...e)}const Xl="v1";function Yl(e){if(Lr(nr,rn.content),!ed())throw ln;dc(Jn(Xl,"notifications.showNotification"),"notifications.showNotification",[e])}function ed(){return!(!Lr(nr)||!nr.supports.notifications)}const td="v2";function nd(e){if(!id())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());if(Qr(e))throw new Error(ke.INVALID_ARGUMENTS.toString());fs(Jn(td,"otherApp.install"),"otherApp.install",e)}function rd(){if(!id())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());dc(Jn(td,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),ps("otherApp.install")}function od(e){if(!id())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());return sc("otherApp.notifyInstallCompleted",[e.toString()],Jn(td,"otherApp.notifyInstallCompleted"))}function id(){return!(!Lr(nr)||!nr.supports.otherAppStateChange)}const ad="v1";var sd,cd,ud;function ld(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Lr(nr,rn.sidePanel),!wd())throw ln;dc(Jn(ad,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function dd(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(Lr(nr,rn.sidePanel),!wd())throw ln;dc(Jn(ad,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function fd(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(Lr(nr,rn.sidePanel),!wd())throw ln;dc(Jn(ad,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function pd(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Lr(nr,rn.sidePanel),!wd())throw ln;dc(Jn(ad,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function gd(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Lr(nr,rn.sidePanel),!wd())throw ln;fs(Jn(ad,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function md(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Lr(nr,rn.sidePanel),!wd())throw ln;fs(Jn(ad,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function hd(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Lr(nr,rn.sidePanel),!wd())throw ln;fs(Jn(ad,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function vd(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Lr(nr,rn.sidePanel),!wd())throw ln;fs(Jn(ad,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function wd(){return!(!Lr(nr)||!nr.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"}(sd||(sd={})),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"}(cd||(cd={})),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"}(ud||(ud={}));const Cd="v1";function yd(e,t,n,r){if(Lr(nr,rn.content),!bd())throw ln;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");dc(Jn(Cd,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function bd(){return!(!Lr(nr)||!nr.supports.appEntity)}const Sd="v1";function Ed(e){return new Promise((t=>{if(Lr(nr),!Ad())throw ln;if((Wn.hostClientType===tn.android||Wn.hostClientType===tn.teamsRoomsAndroid||Wn.hostClientType===tn.teamsPhones||Wn.hostClientType===tn.teamsDisplays)&&!Ur($e)){const e={errorCode:ke.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(ec(Jn(Sd,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function Ad(){return!(!Lr(nr)||!nr.supports.teams)&&(!!nr.supports.teams.fullTrust&&!!nr.supports.teams.fullTrust.joinedTeams)}const Id="v1";function Td(e){return new Promise((t=>{if(Lr(nr),!Pd())throw ln;t(ec(Jn(Id,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function Pd(){return!(!Lr(nr)||!nr.supports.teams)&&!!nr.supports.teams.fullTrust}const Od="v1";var Rd;function Fd(e,t){if(Lr(nr,rn.content),!Md())throw ln;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");dc(Jn(Od,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function kd(e,t){if(Lr(nr),!Md())throw ln;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");dc(Jn(Od,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Md(){return!(!Lr(nr)||!nr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Rd||(Rd={}));class Nd{static setTimeout(e,t){const n=performance.now(),r=vn();return Nd.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Nd.setTimeoutCallbacks[e]}static setInterval(e,t){Nd.setTimeout((function n(){e(),Nd.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Nd.setTimeoutCallbacks){const r=Nd.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Nd.setTimeoutCallbacks[e].callback(),delete Nd.setTimeoutCallbacks[e]}}}Nd.setTimeoutCallbacks={};class xd{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Nd.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&&Nd.clearTimeout(this.timeoutId),this.timeoutId=Nd.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(xd.maxSessionTimeoutInMs,2*t.timeoutInMs):xd.initialSessionTimeoutInMs}}xd.initialSessionTimeoutInMs=1e3,xd.maxSessionTimeoutInMs=3e4;const Dd="v2";class Ld{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new xd(Ld.distributionBinSize,(e=>this.reportPerformanceEvent(Jn(Dd,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Nd.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Jn(Dd,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),Ld.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){Nd.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(Jn(Dd,"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(Jn(Dd,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}Ld.distributionBinSize=1e3,Ld.calculateFPSInterval=1e3;var Ud=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Hd=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 Vd="v2",_d=Rn()?void 0:new Ld(dc);var Bd,Wd,jd;function zd(e){if(Lr(nr,rn.sidePanel),!Kd())throw ln;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(fs(Jn(Vd,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==_d?void 0:_d.setFrameProcessTimeLimit(e.timeLimit)),!1),ef())Qd(e.videoFrameHandler,e.config);else{if(!nf())throw ln;Xd(e.videoBufferHandler,e.config)}null==_d||_d.startMonitorSlowFrameProcessing()}function $d(e,t){if(Lr(nr,rn.sidePanel),!Kd())throw ln;dc(Jn(Vd,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function qd(e){if(Lr(nr,rn.sidePanel),!Kd())throw ln;fs(Jn(Vd,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",mf(e,_d),!1),dc(Jn(Vd,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function Gd(e){dc(Jn(Vd,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Jd(e){dc(Jn(Vd,"videoEffects.notifyError"),"video.notifyError",[e])}function Kd(){return Lr(nr)&&!!nr.supports.video&&(!!nr.supports.video.mediaStream||!!nr.supports.video.sharedFrame)}function Qd(e,t){if(Lr(nr,rn.sidePanel),!Kd()||!ef())throw ln;fs(Jn(Vd,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Ud(this,void 0,void 0,(function*(){const{streamId:n}=t,r=Zd(e,_d);yield af(n,r,Jd,_d)}))),!1),dc(Jn(Vd,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Zd(e,t){return n=>Ud(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 Xd(e,t){if(Lr(nr,rn.sidePanel),!Kd()||!nf())throw ln;fs(Jn(Vd,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==_d||_d.reportStartFrameProcessing(t.width,t.height),e(Yd(t),(()=>{null==_d||_d.reportFrameProcessed(),Gd(n)}),Jd)}}),!1),dc(Jn(Vd,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Yd(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Hd(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function ef(){var e;return Lr(nr,rn.sidePanel)&&tf()&&!!(null===(e=nr.supports.video)||void 0===e?void 0:e.mediaStream)}function tf(){var e,t,n,r;return!(!(null===(t=null===(e=On().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=On().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function nf(){var e;return Lr(nr,rn.sidePanel)&&!!(null===(e=nr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Bd||(Bd={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Wd||(Wd={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(jd||(jd={}));var rf=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 of="v2";function af(e,t,n,r){var o,i;return rf(this,void 0,void 0,(function*(){const a=uf();!Rn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),lf(yield cf(e,n,r),new df(n,t),a.writable)}))}function sf(e,t,n,r){var o,i;return rf(this,void 0,void 0,(function*(){const a=uf();!Rn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),lf(yield cf(e,n,r),new gf(n,t),a.writable)}))}function cf(e,t,n){return rf(this,void 0,void 0,(function*(){if(Rn())throw ln;const r=On().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 uf(){if(Rn())throw ln;const e=window.MediaStreamTrackGenerator;if(!e)throw ln;return new e({kind:"video"})}function lf(e,t,n){new(0,On().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class df{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>rf(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 ff{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 pf{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 gf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>rf(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=>rf(this,void 0,void 0,(function*(){if(Rn())throw ln;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 ff(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 pf(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}}})),fs(Jn(of,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function mf(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),dc(Jn(of,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in jd?e:jd.InitializationFailure;dc(Jn(of,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var hf=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 vf="v2",wf=2e3,Cf=Rn()?void 0:new Ld(dc);var yf;function bf(e){var t,n;if(!Of())throw ln;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Lr(nr,rn.sidePanel)){if(fs(Jn(vf,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Cf?void 0:Cf.setFrameProcessTimeLimit(e)),!1),null===(t=nr.supports.video)||void 0===t?void 0:t.mediaStream)fs(Jn(vf,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>hf(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=Cf?Ef(e.videoFrameHandler,Cf):e.videoFrameHandler;r?yield sf(n,o,Ff,Cf):yield af(n,o,Ff,Cf)}))),!1),dc(Jn(vf,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=nr.supports.video)||void 0===n?void 0:n.sharedFrame))throw ln;fs(Jn(vf,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==Cf||Cf.reportStartFrameProcessing(t.width,t.height);const n=Sf(),r=t.timestamp;e.videoBufferHandler(Af(t),(()=>{n(),null==Cf||Cf.reportFrameProcessed(),Rf(r)}),Ff)}}),!1),dc(Jn(vf,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Cf||Cf.startMonitorSlowFrameProcessing()}}function Sf(){const e=setTimeout((()=>{Ff(`Frame not processed in ${wf}ms`,yf.Warn)}),wf);return function(){clearTimeout(e)}}function Ef(e,t){return n=>hf(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=Sf(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function Af(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function If(e,t,n){if(Lr(nr,rn.sidePanel),!Of())throw ln;dc(Jn(vf,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Tf(e){if(Lr(nr,rn.sidePanel),!Of())throw ln;fs(Jn(vf,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",mf(e,Cf),!1),dc(Jn(vf,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Pf(e){if(Lr(nr,rn.sidePanel),!Kd())throw ln;dc(Jn(vf,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Of(){return Lr(nr),Kd()}function Rf(e){dc(Jn(vf,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Ff(e,t=yf.Warn){dc(Jn(vf,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function kf(e){if(Lr(nr),!Kd())throw ln;Ff(e,yf.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(yf||(yf={}));const Mf="v2";class Nf extends Hi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class xf{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Df{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Lf extends Hi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class Uf{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Hf extends Hi{validate(e){const t=new Lf;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function Vf(e,t){if(Lr(nr),!zf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if($f(e.threadId),t&&0===t.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return ac("hostEntity.tab.addAndConfigure",[new Df(e),t],new Lf,Jn(Mf,"hostEntity.tab.addAndConfigure"))}function _f(e){if(Lr(nr),!zf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return $f(e.threadId),ac("hostEntity.tab.getAll",[new Df(e)],new Hf,Jn(Mf,"hostEntity.tab.getAll"))}function Bf(e,t){if(Lr(nr),!zf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return qf(e),$f(t.threadId),ac("hostEntity.tab.reconfigure",[new xf(e),new Df(t)],new Nf,Jn(Mf,"hostEntity.tab.reconfigure"))}function Wf(e,t){if(Lr(nr),!zf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return qf(e),$f(t.threadId),ac("hostEntity.tab.rename",[new xf(e),new Df(t)],new Nf,Jn(Mf,"hostEntity.tab.rename"))}function jf(e,t){if(Lr(nr),!zf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return $f(t.threadId),qf(e),ac("hostEntity.tab.remove",[new Uf(e),new Df(t)],new Vi,Jn(Mf,"hostEntity.tab.remove"))}function zf(){var e;return!!(Lr(nr)&&Jf()&&(null===(e=nr.supports.hostEntity)||void 0===e?void 0:e.tab))}function $f(e){if(!e||0==e.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function qf(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var Gf;function Jf(){return!(!Lr(nr)||!nr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(Gf||(Gf={}));var Kf=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 Qf="v2",Zf="Invalid store dialog size",Xf="No App Id present, but AppId needed to open AppDetail store",Yf="No Collection Id present, but CollectionId needed to open a store specific to a collection";function ep(e){return Kf(this,void 0,void 0,(function*(){ip();const{size:t}=null!=e?e:{};return sc("store.openFullStore",[ap(t)],Jn(Qf,"store.openFullStore"))}))}function tp(e){return Kf(this,void 0,void 0,(function*(){ip();const{size:t,appId:n}=e;if(!(n instanceof Kr))throw new Error(Xf);return sc("store.openAppDetail",[ap(t),n],Jn(Qf,"store.openAppDetail"))}))}function np(e){return Kf(this,void 0,void 0,(function*(){ip();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return sc("store.openInContextStore",[ap(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Jn(Qf,"store.openInContextStore"))}))}function rp(e){return Kf(this,void 0,void 0,(function*(){ip();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Yf);return sc("store.openSpecificStore",[ap(t),n],Jn(Qf,"store.openSpecificStore"))}))}function op(){return Lr(nr)&&!!nr.supports.store}function ip(){if(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),!op())throw ln}function ap(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(Zf);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(Zf);return JSON.stringify(e)}var sp=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 cp="v1",up="v2";let lp;function dp(e){lp=e}function fp(e){const t=void 0!==e,n=t?e:lp;if(!n)throw new Error("No parameters are provided for authentication");Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage);return pp(n.successCallback||n.failureCallback?Jn(cp,"authentication.authenticate"):Jn(up,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(lp=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(lp=void 0)}}))}function pp(e,t){return sp(this,void 0,void 0,(function*(){const n=Mn(t.url);return kn(n),oc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function gp(e){Dr();return mp(e&&(e.successCallback||e.failureCallback)?Jn(cp,"authentication.getAuthToken"):Jn(up,"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 mp(e,t){return new Promise((n=>{n(oc(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 hp(e){Dr();return vp(e&&(e.successCallback||e.failureCallback)?Jn(cp,"authentication.getUser"):Jn(up,"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 vp(e){return new Promise((t=>{t(oc(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function wp(e,t){Lr(nr,rn.authentication);dc(Jn(t?cp:up,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Dc(Qs.parentWindow,(()=>setTimeout((()=>Qs.currentWindow.close()),200)))}function Cp(e,t){Lr(nr,rn.authentication);dc(Jn(t?cp:up,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Dc(Qs.parentWindow,(()=>setTimeout((()=>Qs.currentWindow.close()),200)))}var yp;function bp(e){const t=!e||e.length<=0,n=null==e?void 0:e.indexOf("@"),r=null==e?void 0:e.indexOf(".",n);if(t||-1===n||-1===r)throw new Error("Input email address does not have the correct format.")}!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(yp||(yp={}));class Sp{constructor(e){this.val=e,bp(e)}toString(){return this.val}}const Ep="/l/app/",Ap="/l/meeting/new",Ip="attendees",Tp="startTime",Pp="endTime",Op="subject",Rp="content",Fp="/l/call/0/0",kp="source",Mp="withVideo",Np="/l/chat/0/0",xp="users",Dp="topicName",Lp="message";function Up(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${xp}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Dp}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Lp}=${encodeURIComponent(n)}`;return`${tt}://${nt}${Np}?${r}${o}${i}`}function Hp(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${xp}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Mp}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${kp}=${encodeURIComponent(n)}`;return`${tt}://${nt}${Fp}?${r}${o}${i}`}function Vp(e,t,n,r,o){const i=void 0===e?"":`${Ip}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Tp}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Pp}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Op}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${Rp}=${encodeURIComponent(o)}`;return`${tt}://${nt}${Ap}?${i}${a}${s}${c}${u}`}function _p(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${tt}://${nt}${Ep}${encodeURIComponent(e)}`}const Bp="v1";function Wp(e){return new Promise((t=>{if(Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!jp())throw new Error("Not supported");const n=Jn(Bp,"appInstallDialog.openAppInstallDialog");nr.isLegacyTeams?t(tc(n,"executeDeepLink",_p(e.appId))):(dc(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function jp(){return!(!Lr(nr)||!nr.supports.appInstallDialog)}const zp="v1",$p=Gn("media");var qp,Gp,Jp,Kp,Qp,Zp,Xp;!function(e){e.Base64="base64",e.ID="id"}(qp||(qp={}));class Yp{}function eg(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Lr(nr,rn.content,rn.task),Wn.isFramelessWindow)if(Ur(Je))dc(Jn(zp,"media.captureImage"),"captureImage",e);else{e({errorCode:ke.OLD_PLATFORM},[])}else{e({errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},[])}}function tg(){if(Lr(nr,rn.content,rn.task),!rg())throw ln;const e=Me.Media;return new Promise((t=>{t(rc(Jn(zp,"media.hasPermission"),"permissions.has",e))}))}function ng(){if(Lr(nr,rn.content,rn.task),!rg())throw ln;const e=Me.Media;return new Promise((t=>{t(rc(Jn(zp,"media.requestPermission"),"permissions.request",e))}))}function rg(){return!(!Lr(nr)||!nr.supports.permissions)}class og extends Yp{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(Lr(nr,rn.content,rn.task),Ur(Ke))if(wg(this.mimeType,this.format,this.content))Ur("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:ke.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:ke.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];dc(Jn(zp,"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=lg(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=dg(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):$p(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:ke.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=vn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Qr(e)&&dc(Jn(zp,"media.getMedia"),"getMedia",r),fs(Jn(zp,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),ps("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=lg(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),ps("getMedia"+t)}else{const e=dg(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:ke.INTERNAL_ERROR,message:"data received is null"},new Blob),ps("getMedia"+t)}}))}}class ig{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Lr(nr,rn.content,rn.task);try{Vr(je)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};dc(Jn(zp,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(Gp.StopRecording,e)}}class ag extends ig{getMediaType(){return Qp.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Gp.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function sg(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Lr(nr,rn.content,rn.task),!Ur(Ke)){const e={errorCode:ke.OLD_PLATFORM};return void t(e,[])}try{fg(e)}catch(e){return void t(e,[])}if(!gg(e)){const e={errorCode:ke.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];dc(Jn(zp,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(pg(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 og(e));t(n,s)}))}function cg(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Lr(nr,rn.content,rn.task),!Ur(Ke)){return void t({errorCode:ke.OLD_PLATFORM})}if(!Cg(e)){return void t({errorCode:ke.INVALID_ARGUMENTS})}const n=[e];dc(Jn(zp,"media.viewImages"),"viewImages",n,t)}function ug(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Lr(nr,rn.content,rn.task),Wn.hostClientType!==tn.desktop&&Wn.hostClientType!==tn.web&&Wn.hostClientType!==tn.rigel&&Wn.hostClientType!==tn.teamsRoomsWindows&&Wn.hostClientType!==tn.teamsRoomsAndroid&&Wn.hostClientType!==tn.teamsPhones&&Wn.hostClientType!==tn.teamsDisplays)if(Ur(Qe))if(yg(t))dc(Jn(zp,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:ke.INVALID_ARGUMENTS},"")}else{e({errorCode:ke.OLD_PLATFORM},"")}else{e({errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},"")}}function lg(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 dg(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 fg(e){hg(e)?Vr(We):vg(e)?Vr(je):mg(e)&&Vr(ze)}function pg(e){return!(e.mediaType!=Qp.Video||!e.videoProps||!e.videoProps.videoController)}function gg(e){return!(null==e||e.maxMediaCount>10)}function mg(e){var t;return!((null==e?void 0:e.mediaType)!=Qp.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function hg(e){return!(!e||e.mediaType!=Qp.VideoAndImage&&!e.videoAndImageProps)}function vg(e){return!(!e||e.mediaType!=Qp.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function wg(e,t,n){return null!=e&&null!=t&&t==qp.ID&&null!=n}function Cg(e){return!(null==e||e.length<=0||e.length>10)}function yg(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function bg(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"}(Gp||(Gp={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Jp||(Jp={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Kp||(Kp={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Qp||(Qp={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(Zp||(Zp={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Xp||(Xp={}));const Sg="v2";function Eg(e){return new Promise((t=>{if(Lr(nr,rn.content,rn.task),!Tg())throw ln;if(!yg(e))throw{errorCode:ke.INVALID_ARGUMENTS};t(rc(Jn(Sg,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Ag(){if(Lr(nr,rn.content,rn.task),!Tg())throw ln;const e=Me.Media;return new Promise((t=>{t(rc(Jn(Sg,"barCode.hasPermission"),"permissions.has",e))}))}function Ig(){if(Lr(nr,rn.content,rn.task),!Tg())throw ln;const e=Me.Media;return new Promise((t=>{t(rc(Jn(Sg,"barCode.requestPermission"),"permissions.request",e))}))}function Tg(){return!!(Lr(nr)&&nr.supports.barCode&&nr.supports.permissions)}const Pg="v2";function Og(e){return Rg(Jn(Pg,"chat.openChat"),e)}function Rg(e,t){return new Promise((n=>{if(Lr(nr,rn.content,rn.task),!kg())throw ln;if(nr.isLegacyTeams)n(tc(e,"executeDeepLink",Up([t.user],void 0,t.message)));else{n(tc(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Fg(e){const t=Jn(Pg,"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(Rg(t,r))}else{if(Lr(nr,rn.content,rn.task),!kg())throw ln;if(nr.isLegacyTeams)n(tc(t,"executeDeepLink",Up(e.users,e.topic,e.message)));else{n(tc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function kg(){return!(!Lr(nr)||!nr.supports.chat)}var Mg=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 Ng="v2";function xg(e){return Mg(this,void 0,void 0,(function*(){if(Lr(nr,rn.content,rn.meetingStage,rn.task,rn.settings,rn.stage,rn.sidePanel),!Lg())throw ln;if(!e.type||!Object.values(Ue).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Ue)}`);const t=yield Pn(e),n={mimeType:e.type,content:t};return rc(Jn(Ng,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function Dg(){return Mg(this,void 0,void 0,(function*(){Lr(nr,rn.content,rn.meetingStage,rn.task,rn.settings,rn.stage,rn.sidePanel);const e=Jn(Ng,"clipboard.read");if(!Lg())throw ln;const t=yield rc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Tn(e.mimeType,e.content)}return t}))}function Lg(){return Wn.isFramelessWindow?!(!Lr(nr)||!nr.supports.clipboard):!!(Lr(nr)&&navigator&&navigator.clipboard&&nr.supports.clipboard)}var Ug=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 Hg="v2",Vg={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var _g;function Bg(){var e;return null!==(e=Lr(nr)&&(nr.isNAAChannelRecommended||$g()))&&void 0!==e&&e}function Wg(){return Lr(nr),Qs.parentOrigin}function jg(){var e;return null!==(e=Lr(nr)&&nr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function zg(){var e;return null!==(e=Lr(nr)&&nr.isDeeplyNestedAuthSupported)&&void 0!==e&&e}function $g(){return!!(Lr(nr)&&qg()&&nr.isLegacyTeams&&nr.supports.nestedAppAuth)}function qg(){return Wn.hostClientType===tn.android||Wn.hostClientType===tn.ios||Wn.hostClientType===tn.ipados||Wn.hostClientType===tn.visionOS}function Gg(e){return Ug(this,void 0,void 0,(function*(){if(!jg())throw ln;const t=e.map(Qg);return Kg(_g.ADD,t)}))}function Jg(e){return Ug(this,void 0,void 0,(function*(){if(!jg())throw ln;const t=e.map(Qg);return Kg(_g.DELETE,t)}))}function Kg(e,t){return Ug(this,void 0,void 0,(function*(){if(window.parent!==window.top)throw new Error("This API is only available in the top-level parent.");if(!Array.isArray(t)||0===t.length)throw new Error(`The '${t}' parameter is required and must be a non-empty array.`);return ac("nestedAppAuth.manageNAATrustedOrigins",[new Zg(e,t)],Vg,Jn(Hg,"nestedAppAuth.manageNAATrustedOrigins"))}))}function Qg(e){try{return new URL(e).origin.toLowerCase()}catch(t){throw new Error(`Invalid origin provided: ${e}`)}}!function(e){e.ADD="ADD",e.DELETE="DELETE"}(_g||(_g={}));class Zg{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const Xg="v2";function Yg(){if(Lr(nr,rn.content,rn.task),!tm())throw ln;return rc(Jn(Xg,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function em(e){if(Lr(nr,rn.content,rn.task),!tm())throw ln;if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};return rc(Jn(Xg,"geoLocation.showLocation"),"location.showLocation",e)}function tm(){return!!(Lr(nr)&&nr.supports.geoLocation&&nr.supports.geoLocation.map&&nr.supports.permissions)}const nm="v2";function rm(){if(Lr(nr,rn.content,rn.task),!am())throw ln;return rc(Jn(nm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function om(){if(Lr(nr,rn.content,rn.task),!am())throw ln;const e=Me.GeoLocation;return new Promise((t=>{t(rc(Jn(nm,"geoLocation.hasPermission"),"permissions.has",e))}))}function im(){if(Lr(nr,rn.content,rn.task),!am())throw ln;const e=Me.GeoLocation;return new Promise((t=>{t(rc(Jn(nm,"geoLocation.requestPermission"),"permissions.request",e))}))}function am(){return!!(Lr(nr)&&nr.supports.geoLocation&&nr.supports.permissions)}function sm(){return nr.hostVersionsInfo?nr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const cm="v1";class um{postMessage(e,t){Lr(nr),dc(Jn(cm,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||mn())}addEventListener(e,t){Lr(nr),"message"===e&&fs(Jn(cm,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class lm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Lr(nr,rn.task),dc(Jn(cm,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||mn())}addEventListener(e,t){Lr(nr,rn.task),"message"===e&&fs(Jn(cm,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const dm="v2";function fm(e){if(Lr(nr,rn.content),!pm())throw ln;if(!e||!In(e))throw{errorCode:ke.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return rc(Jn(dm,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function pm(){return!(!Lr(nr)||!nr.supports.secondaryBrowser)}const gm="v1";function mm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Lr(nr,rn.content,rn.task),!Ur(qe))throw{errorCode:ke.OLD_PLATFORM};if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};if(!vm())throw ln;dc(Jn(gm,"location.getLocation"),"location.getLocation",[e],t)}function hm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Lr(nr,rn.content,rn.task),!Ur(qe))throw{errorCode:ke.OLD_PLATFORM};if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};if(!vm())throw ln;dc(Jn(gm,"location.showLocation"),"location.showLocation",[e],t)}function vm(){return!(!Lr(nr)||!nr.supports.location)}const wm="v1";function Cm(e){Lr(nr,rn.sidePanel),e.contentUrl&&new URL(e.contentUrl),dc(Jn(wm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var ym=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 bm="v1";var Sm,Em,Am,Im,Tm,Pm;function Om(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),dc(Jn(bm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Rm(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),dc(Jn(bm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Fm(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage,rn.settings,rn.content),dc(Jn(bm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function km(){var e,t,n;return ym(this,void 0,void 0,(function*(){let r;Lr(nr,rn.sidePanel,rn.meetingStage,rn.settings,rn.content);try{const e=!0;r=yield rc(Jn("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)==Im.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Im.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Mm(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage,rn.task),dc(Jn(bm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Nm(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Lr(nr,rn.sidePanel),dc(Jn(bm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function xm(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Lr(nr,rn.sidePanel),dc(Jn(bm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Dm(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Lr(nr,rn.sidePanel),dc(Jn(bm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Lm(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Lr(nr,rn.sidePanel),fs(Jn(bm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Um(e,t,n={sharingProtocol:Tm.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),dc(Jn(bm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Hm(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),dc(Jn(bm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Vm(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),dc(Jn(bm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function _m(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),dc(Jn(bm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Bm(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),fs(Jn(bm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Wm(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),fs(Jn(bm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function jm(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),fs(Jn(bm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function zm(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Lr(nr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Pm.Other};return rc(Jn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function $m(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");Lr(nr,rn.sidePanel,rn.meetingStage),e.isAppHandlingAudio?qm(e,t):Gm(e,t)}function qm(e,t){dc(Jn(bm,"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");fs(Jn(bm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>ym(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);Km(n,n.isMicMuted===t.isMicMuted?Sm.HostInitiated:Sm.AppDeclinedToChange)}catch(e){Km(t,Sm.AppFailedToChange)}}))));fs(Jn(bm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function Gm(e,t){dc(Jn(bm,"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");gs("meeting.micStateChanged")&&ps("meeting.micStateChanged"),gs("meeting.audioDeviceSelectionChanged")&&ps("meeting.audioDeviceSelectionChanged"),t(n)}))}function Jm(e){Km(e,Sm.AppInitiated)}function Km(e,t){Lr(nr,rn.sidePanel,rn.meetingStage),dc(Jn(bm,"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"}(Sm||(Sm={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(Em||(Em={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Am||(Am={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Im||(Im={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Tm||(Tm={})),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"}(Pm||(Pm={}));const Qm="v1",Zm="v2";function Xm(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Jn(Qm,"monetization.openPurchaseExperience")):(r=e,o=Jn(Zm,"monetization.openPurchaseExperience"));return Lr(nr,rn.content),bn((()=>new Promise((e=>{if(!Ym())throw ln;e(rc(o,"monetization.openPurchaseExperience",r))}))),n)}function Ym(){return!(!Lr(nr)||!nr.supports.monetization)}const eh="v2";function th(e){return new Promise((t=>{if(Lr(nr,rn.content),!rh())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(tc(Jn(eh,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function nh(e){return new Promise((t=>{if(Lr(nr,rn.content),!rh())throw new Error("Not supported");const n=Jn(eh,"calendar.composeMeeting");nr.isLegacyTeams?t(tc(n,"executeDeepLink",Vp(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(tc(n,"calendar.composeMeeting",e))}))}function rh(){return!(!Lr(nr)||!nr.supports.calendar)}const oh="v2";function ih(e){e&&0!==e.length&&e.forEach((e=>{bp(e)}))}function ah(e){if(!e.handoffId||0==e.handoffId.trim().length||""===e.handoffId.trim())throw new Error("handoffId should not be null or empty string.");const t=e.composeMailParams;t.type===gh.New&&(ih(t.toRecipients),ih(t.ccRecipients),ih(t.bccRecipients))}function sh(e){if(Lr(nr,rn.content),!ch())throw new Error("Not supported");return ah(e),sc("mail.handoff.composeMail",[new uh(e)],Jn(oh,"mail.handoff.composeMail"))}function ch(){return!!(Lr(nr)&&nr.supports.mail&&nr.supports.mail.handoff)}class uh{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const lh="v2";function dh(e){return new Promise((t=>{if(Lr(nr,rn.content),!ph())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(tc(Jn(lh,"mail.openMailItem"),"mail.openMailItem",e))}))}function fh(e){return new Promise((t=>{if(Lr(nr,rn.content),!ph())throw new Error("Not supported");t(tc(Jn(lh,"mail.composeMail"),"mail.composeMail",e))}))}function ph(){return!(!Lr(nr)||!nr.supports.mail)}var gh;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(gh||(gh={}));const mh="v2";function hh(){if(!Wn.printCapabilityEnabled){if(Lr(nr),!Sh())throw ln;Wn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(vh(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function vh(){On().print()}function wh(e){Ch(Jn(mh,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Qr(e)&&!Sh())throw ln}))}function Ch(e,t,n){!Qr(t)&&Lr(nr),!Qr(t)&&n&&n(),ys(e,t)}function yh(e){bh(Jn(mh,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Qr(e)&&!Sh())throw ln}))}function bh(e,t,n){!Qr(t)&&Lr(nr),!Qr(t)&&n&&n(),Es(e,t)}function Sh(){return!(!Lr(nr)||!nr.supports.teamsCore)}const Eh="v1",Ah="v2";function Ih(e,t){let n,r;Lr(nr,rn.content,rn.task,rn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Jn(Eh,"people.selectPeople")):(r=e,o=Jn(Ah,"people.selectPeople")),Cn(Th,n,o,r)}function Th(e,t){return new Promise((n=>{if(!Ur(Ge))throw{errorCode:ke.OLD_PLATFORM};if(!bg(t))throw{errorCode:ke.INVALID_ARGUMENTS};if(!Ph())throw ln;n(rc(e,"people.selectPeople",t))}))}function Ph(){return!(!Lr(nr)||!nr.supports.people)}function Oh(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?Rh(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Rh(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 Fh="v2";function kh(e){return Lr(nr,rn.content),new Promise((t=>{const[n,r]=Oh(e);if(!n)throw{errorCode:ke.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(rc(Jn(Fh,"profile.showProfile"),"profile.showProfile",o))}))}function Mh(){return!(!Lr(nr)||!nr.supports.profile)}const Nh="v2",xh="search.queryChange",Dh="search.queryClose",Lh="search.queryExecute";function Uh(e,t,n){if(Lr(nr,rn.content),!Vh())throw ln;fs(Jn(Nh,"search.registerOnClosedHandler"),Dh,e),fs(Jn(Nh,"search.registerOnExecutedHandler"),Lh,t),n&&fs(Jn(Nh,"search.registerOnChangeHandler"),xh,n)}function Hh(){if(Lr(nr,rn.content),!Vh())throw ln;dc(Jn(Nh,"search.unregisterHandlers"),"search.unregister"),ps(xh),ps(Dh),ps(Lh)}function Vh(){return!(!Lr(nr)||!nr.supports.search)}function _h(){return new Promise((e=>{if(Lr(nr,rn.content),!Vh())throw new Error("Not supported");e(tc(Jn(Nh,"search.closeSearch"),"search.closeSearch"))}))}var Bh=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 Wh="v2";function jh(){return Bh(this,void 0,void 0,(function*(){if(Lr(nr,rn.sidePanel,rn.meetingStage),!zh())throw ln;return yield rc(Jn(Wh,"sharing.history.getContent"),"sharing.history.getContent")}))}function zh(){var e;return Lr(nr)&&void 0!==(null===(e=nr.supports.sharing)||void 0===e?void 0:e.history)}const $h="v1",qh="v2",Gh={shareWebContent:"sharing.shareWebContent"};function Jh(e,t){try{Qh(e),Zh(e),Xh(e)}catch(e){return yn((()=>Promise.reject(e)),t)}Lr(nr,rn.content,rn.sidePanel,rn.task,rn.stage,rn.meetingStage);return yn(Kh,t,Jn(t?$h:qh,"sharing.shareWebContent"),e)}function Kh(e,t){return new Promise((n=>{if(!Yh())throw ln;n(rc(e,Gh.shareWebContent,t))}))}function Qh(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:ke.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Zh(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Xh(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Yh(){return!(!Lr(nr)||!nr.supports.sharing)}const ev="v2";function tv(){return new Promise((e=>{if(Lr(nr,rn.content),!nv())throw ln;e(rc(Jn(ev,"stageView.self.close"),"stageView.self.close"))}))}function nv(){var e;return Lr(nr)&&void 0!==(null===(e=nr.supports.stageView)||void 0===e?void 0:e.self)}const rv="v2";var ov;function iv(e){return new Promise((t=>{if(Lr(nr,rn.content),!av())throw ln;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(rc(Jn(rv,"stageView.open"),"stageView.open",e))}))}function av(){return!(!Lr(nr)||!nr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(ov||(ov={}));const sv=10;var cv=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 uv="v2";function lv(e){return cv(this,void 0,void 0,(function*(){Lr(nr,rn.content,rn.task),pv(),gv(e);const t=yield rc(Jn(uv,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return mv(e.maxVisualMediaCount,t),t}))}function dv(e){return cv(this,void 0,void 0,(function*(){Lr(nr,rn.content,rn.task),pv(),gv(e);const t=yield rc(Jn(uv,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return mv(e.maxVisualMediaCount,t),t}))}function fv(){return!!(Lr(nr)&&nr.supports.visualMedia&&nr.supports.visualMedia.image&&nr.supports.permissions)}function pv(){if(!fv())throw ln}function gv(e){if(!e||e.maxVisualMediaCount>sv||e.maxVisualMediaCount<1)throw pn}function mv(e,t){if(t.length>e)throw gn}const hv="v2";var vv,wv;function Cv(){if(Lr(nr,rn.content,rn.task),!fv())throw ln;const e=Me.Media;return rc(Jn(hv,"visualMedia.hasPermission"),"permissions.has",e)}function yv(){if(Lr(nr,rn.content,rn.task),!fv())throw ln;const e=Me.Media;return rc(Jn(hv,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(vv||(vv={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(wv||(wv={}));var bv=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 Sv=null;function Ev(){return bv(this,void 0,void 0,(function*(){return null===Sv&&(Sv=(yield Ao()).app.host.name),Sv}))}var Av=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 Iv(){return Av(this,void 0,void 0,(function*(){if(Lr(nr),!Pv())throw ln;return!(!nr.isLegacyTeams||Wn.hostClientType!==tn.android&&Wn.hostClientType!==tn.ios&&Wn.hostClientType!==tn.ipados&&Wn.hostClientType!==tn.visionOS||(yield Tv())!==nn.teams)||(yield ec(Jn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function Tv(){return Av(this,void 0,void 0,(function*(){return Ev()}))}function Pv(){return Lr(nr)&&void 0!==nr.supports.webStorage}const Ov="v2";var Rv;function Fv(e){const t=Jn(Ov,"call.startCall");return new Promise((n=>{var r;if(Lr(nr,rn.content,rn.task),!kv())throw ln;if(!nr.isLegacyTeams)return dc(t,"call.startCall",[e],n);n(ec(t,"executeDeepLink",Hp(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Rv.Video),e.source)).then((e=>{if(!e)throw new Error(at);return e})))}))}function kv(){return!(!Lr(nr)||!nr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Rv||(Rv={}));const Mv="v1";function Nv(){zi(Jn(Mv,"appInitialization.notifyAppLoaded"))}function xv(){dc(Jn(Mv,"appInitialization.notifySuccess"),ho.Success,[hr])}function Dv(e){qi(Jn(Mv,"appInitialization.notifyFailure"),e)}function Lv(e){$i(Jn(Mv,"appInitialization.notifyExpectedFailure"),e)}const Uv=Gn("thirdPartyCloudStorage"),Hv="v2";class Vv{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let _v=[],Bv=null,Wv=!0,jv=null;function zv(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Lr(nr,rn.content,rn.task),!qv())throw ln;if(jv)throw jv=null,new Error("getDragAndDropFiles cannot be called twice");jv=t,Wv=!0,dc(Jn(Hv,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],$v)}else{t([],{errorCode:ke.INVALID_ARGUMENTS})}}function $v(e){if(jv)if(e&&e.error)jv([],e.error),jv=null;else if(e&&e.fileChunk)try{Wv||0!==e.fileChunk.chunkSequence||(Uv("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),Wv=!0,jv([],{errorCode:ke.INTERNAL_ERROR,message:"error occurred while receiving data"}),_v=[],jv=null);const t=dg(e.fileChunk,e.fileType);if(t?(Bv||(Bv=new Vv(e.fileType,[])),Bv.assembleAttachment.push(t)):(Uv(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),jv?jv([],{errorCode:ke.INTERNAL_ERROR,message:"error occurred while receiving data"}):jv=null,_v=[],jv=null,Wv=!0),Wv=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&Bv){const t=lg(Bv.assembleAttachment,Bv.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});_v.push(n)}e.isLastFile&&jv&&(jv(_v,e.error),_v=[],jv=null,Wv=!0),Bv=null}}catch(e){jv&&(jv([],{errorCode:ke.INTERNAL_ERROR,message:e}),_v=[],jv=null,Wv=!0)}else jv([],{errorCode:ke.INTERNAL_ERROR,message:"data received is null"}),_v=[],jv=null,Wv=!0}function qv(){return!(!Lr(nr)||!nr.supports.thirdPartyCloudStorage)}const Gv="v1";function Jv(e,t){ji(Jn(Gv,"initialize"),t).then((()=>{e&&e()}))}function Kv(){hh()}function Qv(){vh()}function Zv(e){Dr(),dc(Jn(Gv,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=Wn.frameContext),e(t)}))}function Xv(e){Xi(Jn(Gv,"registerOnThemeChangeHandlerHelper"),e)}function Yv(e){ms(Jn(Gv,"registerFullScreenHandler"),"fullScreenChange",e,[])}function ew(e){ms(Jn(Gv,"registerAppButtonClickHandler"),"appButtonClick",e,[rn.content])}function tw(e){ms(Jn(Gv,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[rn.content])}function nw(e){ms(Jn(Gv,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[rn.content])}function rw(e){ha(Jn(Gv,"registerBackButtonHandler"),e)}function ow(e){Ch(Jn(Gv,"registerOnLoadHandler"),e)}function iw(e){bh(Jn(Gv,"registerBeforeUnloadHandler"),e)}function aw(e){ms(Jn(Gv,"registerFocusEnterHandler"),"focusEnter",e,[])}function sw(e){ms(Jn(Gv,"registerChangeSettingsHandler"),"changeSettings",e,[rn.content])}function cw(e,t){Lr(nr),$a(Jn(Gv,"getTabInstances"),t).then((t=>{e(t)}))}function uw(e,t){Lr(nr),qa(Jn(Gv,"getMruTabInstances"),t).then((t=>{e(t)}))}function lw(e){Ga(Jn(Gv,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function dw(e,t){Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage);const n=null!=t?t:mn();Yi(Jn(Gv,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function fw(e){Ja(Jn(Gv,"setFrameContext"),e)}function pw(e,t,n){ji(Jn(Gv,"initializeWithFrameContext"),n).then((()=>t&&t())),Ja(Jn(Gv,"setFrameContext"),e)}const gw="v1";function mw(e){za(Jn(gw,"navigation.returnFocus"),e)}function hw(e,t){Lr(nr);const n=null!=t?t:mn();ja(Jn(gw,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function vw(e,t){Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage);const n=null!=t?t:mn();Ba(Jn(gw,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function ww(e){Lr(nr);const t=null!=e?e:mn();Wa(Jn(gw,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const Cw="v1";function yw(e){Ka(Jn(Cw,"settings.setValidityState"),e)}function bw(e){Lr(nr,rn.content,rn.settings,rn.remove,rn.sidePanel),Qa(Jn(Cw,"settings.getSettings")).then((t=>{e(t)}))}function Sw(e,t){Lr(nr,rn.content,rn.settings,rn.sidePanel);const n=null!=t?t:mn();Za(Jn(Cw,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Ew(e){Ri(Jn(Cw,"settings.registerOnSaveHandler"),e)}function Aw(e){ki(Jn(Cw,"settings.registerOnRemoveHandler"),e)}var Iw=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 Tw="v1";function Pw(e,t){const n=Jn(Tw,"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?(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),dc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?Qo(n,kw(e),r):Ko(n,Fw(e),r),new um}function Ow(e){e=Mw(e);const{width:t,height:n}=e,r=Iw(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Jo(Jn(Tw,"tasks.updateTask"),e)}function Rw(e,t){Zo(Jn(Tw,"tasks.submitTask"),e,t)}function Fw(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:cn.Small,width:e.width?e.width:cn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function kw(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:cn.Small,width:e.width?e.width:cn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function Mw(e){return e.height=e.height?e.height:cn.Small,e.width=e.width?e.width:cn.Small,e}const Nw="v2";var xw,Dw;function Lw(){return!(!Lr(nr,rn.meetingStage,rn.sidePanel,rn.content)||!nr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(xw||(xw={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Dw||(Dw={}));class Uw{getFluidTenantInfo(){return Hw(),new Promise((e=>{e(rc(Jn(Nw,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return Hw(),new Promise((t=>{t(rc(Jn(Nw,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return Hw(),new Promise((e=>{e(rc(Jn(Nw,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return Hw(),new Promise((t=>{t(rc(Jn(Nw,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return Hw(),new Promise((e=>{e(rc(Jn(Nw,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return Hw(),new Promise((t=>{t(rc(Jn(Nw,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return Hw(),new Promise((t=>{t(rc(Jn(Nw,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return Hw(),new Promise((t=>{t(rc(Jn(Nw,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return Hw(),new Uw}}function Hw(){if(!Lw())throw new Error("LiveShareHost Not supported")}var Vw=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 _w(e){try{return e.cartItems=Bw(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Bw(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Bw(e.accessories)),e}))}const Ww=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=Vw(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Ww(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function jw(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)$w(t),zw(t.accessories)}function zw(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");$w(t)}}}function $w(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");Gw(e.price),Jw(e.quantity)}function qw(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===en(e))throw new Error("id must be a valid UUID")}}function Gw(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 Jw(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Kw(e){if(!Object.values(Yw).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Qw="v2",Zw={majorVersion:1,minorVersion:1};var Xw,Yw;function eC(){if(Lr(nr,rn.content,rn.task),!oC())throw ln;return rc(Jn(Qw,"marketplace.getCart"),"marketplace.getCart",Zw).then(_w)}function tC(e){if(Lr(nr,rn.content,rn.task),!oC())throw ln;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return qw(null==e?void 0:e.cartId),jw(null==e?void 0:e.cartItems),rc(Jn(Qw,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Ww(e.cartItems),cartVersion:Zw})).then(_w)}function nC(e){if(Lr(nr,rn.content,rn.task),!oC())throw ln;if(!e)throw new Error("removeCartItemsParams must be provided");if(qw(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 rc(Jn(Qw,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Zw})).then(_w)}function rC(e){if(Lr(nr,rn.content,rn.task),!oC())throw ln;if(!e)throw new Error("updateCartStatusParams must be provided");return qw(null==e?void 0:e.cartId),Kw(null==e?void 0:e.cartStatus),rc(Jn(Qw,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Zw})).then(_w)}function oC(){return!(!Lr(nr)||!nr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(Xw||(Xw={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Yw||(Yw={}))})(),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],u=i[1],l=new o(c(e,a,u)),d=0,f=u>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)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},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(l(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 u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(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(u(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?u(e,i,o,"day"):i>=r?u(e,i,r,"hour"):i>=n?u(e,i,n,"minute"):i>=t?u(e,i,t,"second"):e+" ms"}function u(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:()=>Re,AppId:()=>Kr,ChannelType:()=>un,ChildAppWindow:()=>um,DialogDimension:()=>cn,EduType:()=>Le,EmailAddress:()=>Sp,ErrorCode:()=>ke,FileOpenPreference:()=>Oe,FrameContexts:()=>rn,HostClientType:()=>tn,HostName:()=>nn,LiveShareHost:()=>Uw,NotificationTypes:()=>Bc,ParentAppWindow:()=>lm,RenderingSurfaces:()=>on,SecondaryM365ContentIdName:()=>Fe,TaskModuleDimension:()=>cn,TeamType:()=>an,UUID:()=>_n,UserSettingTypes:()=>jc,UserTeamRole:()=>sn,ValidatedSafeString:()=>Jr,ViewerActionTypes:()=>Wc,activateChildProxyingCommunication:()=>wr,app:()=>i,appEntity:()=>V,appInitialization:()=>Ee,appInstallDialog:()=>K,authentication:()=>J,barCode:()=>Z,calendar:()=>ce,call:()=>Se,chat:()=>X,clipboard:()=>Y,conversations:()=>S,copilot:()=>I,dialog:()=>f,enablePrintCapability:()=>Kv,executeDeepLink:()=>dw,externalAppAuthentication:()=>T,externalAppAuthenticationForCEA:()=>P,externalAppCardActions:()=>O,externalAppCardActionsForCEA:()=>R,externalAppCardActionsForDA:()=>F,externalAppCommands:()=>k,files:()=>M,geoLocation:()=>ne,getAdaptiveCardSchemaVersion:()=>sm,getContext:()=>Zv,getCurrentFeatureFlagsState:()=>br,getMruTabInstances:()=>uw,getTabInstances:()=>cw,hostEntity:()=>q,initialize:()=>Jv,initializeWithFrameContext:()=>pw,liveShare:()=>Pe,location:()=>oe,logs:()=>b,mail:()=>le,marketplace:()=>He,media:()=>Q,meeting:()=>ae,meetingRoom:()=>N,menus:()=>p,messageChannels:()=>x,monetization:()=>se,navigateBack:()=>ww,navigateCrossDomain:()=>vw,navigateToTab:()=>hw,nestedAppAuth:()=>ee,nestedAppAuthBridge:()=>D,notifications:()=>L,openFilePreview:()=>Qc,otherAppStateChange:()=>U,overwriteFeatureFlagsState:()=>Er,pages:()=>y,people:()=>fe,print:()=>Qv,profile:()=>pe,registerAppButtonClickHandler:()=>ew,registerAppButtonHoverEnterHandler:()=>tw,registerAppButtonHoverLeaveHandler:()=>nw,registerBackButtonHandler:()=>rw,registerBeforeUnloadHandler:()=>iw,registerChangeSettingsHandler:()=>sw,registerCustomHandler:()=>Jc,registerFocusEnterHandler:()=>aw,registerFullScreenHandler:()=>Yv,registerOnLoadHandler:()=>ow,registerOnThemeChangeHandler:()=>Xv,registerUserSettingsChangeHandler:()=>Kc,remoteCamera:()=>H,returnFocus:()=>mw,search:()=>ge,secondaryBrowser:()=>re,sendCustomEvent:()=>Gc,sendCustomMessage:()=>qc,setFeatureFlagsState:()=>Sr,setFrameContext:()=>fw,settings:()=>Ie,shareDeepLink:()=>lw,sharing:()=>he,stageView:()=>we,store:()=>G,tasks:()=>Te,teams:()=>W,teamsCore:()=>de,thirdPartyCloudStorage:()=>Ae,uploadCustomApp:()=>$c,version:()=>hr,videoEffects:()=>j,videoEffectsEx:()=>z,visualMedia:()=>ye,webStorage:()=>be});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>ro,getTelemetryPort:()=>to,isSupported:()=>no});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>lo,getDataLayerPort:()=>co,isSupported:()=>uo});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>fo,registerOnResumeHandler:()=>po});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>wo,FailedReason:()=>vo,Messages:()=>ho,_initialize:()=>So,_uninitialize:()=>Eo,getContext:()=>Ao,getFrameContext:()=>yo,initialize:()=>bo,isInitialized:()=>Co,lifecycle:()=>o,notifyAppLoaded:()=>Io,notifyExpectedFailure:()=>Oo,notifyFailure:()=>Po,notifySuccess:()=>To,openLink:()=>ko,registerHostToAppPerformanceMetricsHandler:()=>Fo,registerOnThemeChangeHandler:()=>Ro});var a={};n.r(a),n.d(a,{isSupported:()=>xo,resize:()=>No});var s={};n.r(s),n.d(s,{isSupported:()=>Lo,open:()=>Do});var c={};n.r(c),n.d(c,{isSupported:()=>_o,registerOnMessageFromParent:()=>Vo,sendMessageToDialog:()=>Ho,sendMessageToParentFromDialog:()=>Uo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>$o,getDialogInfoFromUrlDialogInfo:()=>zo,isSupported:()=>jo,open:()=>Bo,parentCommunication:()=>c,submit:()=>Wo});var l={};n.r(l),n.d(l,{isSupported:()=>ri,open:()=>ni});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>ii,open:()=>oi});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>ai,isSupported:()=>si,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>ui,MenuItem:()=>di,MenuListType:()=>li,initialize:()=>vi,isSupported:()=>Ai,setNavBarMenu:()=>yi,setUpViews:()=>wi,showActionMenu:()=>Si});var g={};n.r(g),n.d(g,{initialize:()=>Ii,isSupported:()=>Ui,registerChangeConfigHandler:()=>Ni,registerOnRemoveHandler:()=>Fi,registerOnRemoveHandlerHelper:()=>ki,registerOnSaveHandler:()=>Oi,registerOnSaveHandlerHelper:()=>Ri,setConfig:()=>Pi,setValidityState:()=>Ti});var m={};n.r(m),n.d(m,{isSupported:()=>fa,onClick:()=>ua,onHoverEnter:()=>la,onHoverLeave:()=>da});var h={};n.r(h),n.d(h,{_initialize:()=>pa,isSupported:()=>va,navigateBack:()=>ga,registerBackButtonHandler:()=>ma,registerBackButtonHandlerHelper:()=>ha});var v={};n.r(v),n.d(v,{isSupported:()=>ya,navigateTo:()=>wa,navigateToDefaultPage:()=>Ca});var w={};n.r(w),n.d(w,{enterFullscreen:()=>ba,exitFullscreen:()=>Sa,isSupported:()=>Ea});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Ta,getTabInstances:()=>Ia,isSupported:()=>Pa,navigateToTab:()=>Aa});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Oa,ReturnFocusType:()=>Ra,appButton:()=>m,backStack:()=>h,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>xa,initializeWithFrameContext:()=>Na,isSupported:()=>Va,navigateCrossDomain:()=>Da,navigateToApp:()=>La,registerFocusEnterHandler:()=>ka,registerFullScreenHandler:()=>Ha,returnFocus:()=>Fa,setCurrentFrame:()=>Ma,shareDeepLink:()=>Ua,tabs:()=>C});var b={};n.r(b),n.d(b,{isSupported:()=>_c,registerGetLogHandler:()=>Vc});var S={};n.r(S),n.d(S,{closeConversation:()=>Yc,getChatMembers:()=>eu,isSupported:()=>tu,openConversation:()=>Xc});var E={};n.r(E),n.d(E,{isSupported:()=>iu,sendCustomTelemetryData:()=>au});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>du,isSupported:()=>lu});var I={};n.r(I),n.d(I,{customTelemetry:()=>E,eligibility:()=>A});var T={};n.r(T),n.d(T,{ActionExecuteInvokeRequestType:()=>hu,ActionExecuteResponseHandler:()=>yu,InvokeErrorCode:()=>Cu,InvokeResponseType:()=>wu,OriginalRequestType:()=>vu,SerializableActionExecuteInvokeRequest:()=>gu,authenticateAndResendRequest:()=>Iu,authenticateWithOauth2:()=>Ou,authenticateWithPowerPlatformConnectorPlugins:()=>Ru,authenticateWithSSO:()=>Tu,authenticateWithSSOAndResendRequest:()=>Pu,isActionExecuteResponse:()=>mu,isInvokeError:()=>bu,isSupported:()=>Fu,validateActionExecuteInvokeRequest:()=>Eu});var P={};n.r(P),n.d(P,{authenticateAndResendRequest:()=>Du,authenticateWithOauth:()=>xu,authenticateWithSSO:()=>Nu,authenticateWithSSOAndResendRequest:()=>Lu,isSupported:()=>Uu,validateInput:()=>Hu});var O={};n.r(O),n.d(O,{ActionOpenUrlErrorCode:()=>Bu,ActionOpenUrlType:()=>_u,isSupported:()=>zu,processActionOpenUrl:()=>ju,processActionSubmit:()=>Wu});var R={};n.r(R),n.d(R,{isSupported:()=>Ku,processActionOpenUrl:()=>Gu,processActionSubmit:()=>Ju});var F={};n.r(F),n.d(F,{SerializableActionOpenUrlDialogInfo:()=>rl,isSupported:()=>tl,processActionOpenUrlDialog:()=>el});var k={};n.r(k),n.d(k,{isSupported:()=>sl,processActionCommand:()=>al});var M={};n.r(M),n.d(M,{CloudStorageProvider:()=>ul,CloudStorageProviderFileAction:()=>gl,CloudStorageProviderType:()=>ll,DocumentLibraryAccessType:()=>fl,FileDownloadStatus:()=>pl,SpecialDocumentLibraryType:()=>dl,addCloudStorageFolder:()=>hl,addCloudStorageProvider:()=>Al,addCloudStorageProviderFile:()=>Tl,copyMoveFiles:()=>bl,deleteCloudStorageFolder:()=>vl,deleteCloudStorageProviderFile:()=>Ol,downloadCloudStorageProviderFile:()=>Rl,getCloudStorageFolderContents:()=>wl,getCloudStorageFolders:()=>ml,getExternalProviders:()=>yl,getFileDownloads:()=>Sl,openCloudStorageFile:()=>Cl,openDownloadFolder:()=>El,registerCloudStorageProviderContentChangeHandler:()=>Ml,registerCloudStorageProviderListChangeHandler:()=>kl,removeCloudStorageProvider:()=>Il,renameCloudStorageProviderFile:()=>Pl,uploadCloudStorageProviderFile:()=>Fl});var N={};n.r(N),n.d(N,{getPairedMeetingRoomInfo:()=>Dl,isSupported:()=>Vl,registerMeetingRoomCapabilitiesUpdateHandler:()=>Ul,registerMeetingRoomStatesUpdateHandler:()=>Hl,sendCommandToPairedMeetingRoom:()=>Ll});var x={};n.r(x),n.d(x,{dataLayer:()=>t,isSupported:()=>_l,telemetry:()=>e});var D={};n.r(D),n.d(D,{initialize:()=>$l,version:()=>Bl});var L={};n.r(L),n.d(L,{isSupported:()=>ed,showNotification:()=>Yl});var U={};n.r(U),n.d(U,{isSupported:()=>id,notifyInstallCompleted:()=>od,registerAppInstallationHandler:()=>nd,unregisterAppInstallationHandler:()=>rd});var H={};n.r(H),n.d(H,{ControlCommand:()=>sd,ErrorReason:()=>cd,SessionTerminatedReason:()=>ud,getCapableParticipants:()=>ld,isSupported:()=>wd,registerOnCapableParticipantsChangeHandler:()=>gd,registerOnDeviceStateChangeHandler:()=>hd,registerOnErrorHandler:()=>md,registerOnSessionStatusChangeHandler:()=>vd,requestControl:()=>dd,sendControlCommand:()=>fd,terminateSession:()=>pd});var V={};n.r(V),n.d(V,{isSupported:()=>bd,selectAppEntity:()=>yd});var _={};n.r(_),n.d(_,{getUserJoinedTeams:()=>Ed,isSupported:()=>Ad});var B={};n.r(B),n.d(B,{getConfigSetting:()=>Td,isSupported:()=>Pd,joinedTeams:()=>_});var W={};n.r(W),n.d(W,{ChannelType:()=>Rd,fullTrust:()=>B,getTeamChannels:()=>Fd,isSupported:()=>Md,refreshSiteUrl:()=>kd});var j={};n.r(j),n.d(j,{EffectChangeType:()=>Wd,EffectFailureReason:()=>jd,VideoFrameFormat:()=>Bd,isSupported:()=>Kd,notifySelectedVideoEffectChanged:()=>$d,registerForVideoEffect:()=>qd,registerForVideoFrame:()=>zd});var z={};n.r(z),n.d(z,{ErrorLevel:()=>yf,frameProcessingTimeoutInMs:()=>wf,isSupported:()=>Of,notifyFatalError:()=>kf,notifySelectedVideoEffectChanged:()=>If,registerForVideoEffect:()=>Tf,registerForVideoFrame:()=>bf,updatePersonalizedEffects:()=>Pf});var $={};n.r($),n.d($,{addAndConfigure:()=>Vf,getAll:()=>_f,isSupported:()=>zf,reconfigure:()=>Bf,remove:()=>jf,rename:()=>Wf});var q={};n.r(q),n.d(q,{AppTypes:()=>Gf,isSupported:()=>Jf,tab:()=>$});var G={};n.r(G),n.d(G,{isSupported:()=>op,openAppDetail:()=>tp,openFullStore:()=>ep,openInContextStore:()=>np,openSpecificStore:()=>rp});var J={};n.r(J),n.d(J,{DataResidency:()=>yp,authenticate:()=>fp,getAuthToken:()=>gp,getUser:()=>hp,notifyFailure:()=>Cp,notifySuccess:()=>wp,registerAuthenticationHandlers:()=>dp});var K={};n.r(K),n.d(K,{isSupported:()=>jp,openAppInstallDialog:()=>Wp});var Q={};n.r(Q),n.d(Q,{CameraStartMode:()=>Jp,File:()=>Yp,FileFormat:()=>qp,ImageOutputFormats:()=>Xp,ImageUriType:()=>Zp,Media:()=>og,MediaControllerEvent:()=>Gp,MediaType:()=>Qp,Source:()=>Kp,VideoController:()=>ag,captureImage:()=>eg,hasPermission:()=>tg,requestPermission:()=>ng,scanBarCode:()=>ug,selectMedia:()=>sg,viewImages:()=>cg});var Z={};n.r(Z),n.d(Z,{hasPermission:()=>Ag,isSupported:()=>Tg,requestPermission:()=>Ig,scanBarCode:()=>Eg});var X={};n.r(X),n.d(X,{isSupported:()=>kg,openChat:()=>Og,openGroupChat:()=>Fg});var Y={};n.r(Y),n.d(Y,{isSupported:()=>Lg,read:()=>Dg,write:()=>xg});var ee={};n.r(ee),n.d(ee,{addNAATrustedOrigins:()=>Gg,canParentManageNAATrustedOrigins:()=>jg,deleteNAATrustedOrigins:()=>Jg,getParentOrigin:()=>Wg,isDeeplyNestedAuthSupported:()=>zg,isNAAChannelRecommended:()=>Bg});var te={};n.r(te),n.d(te,{chooseLocation:()=>Yg,isSupported:()=>tm,showLocation:()=>em});var ne={};n.r(ne),n.d(ne,{getCurrentLocation:()=>rm,hasPermission:()=>om,isSupported:()=>am,map:()=>te,requestPermission:()=>im});var re={};n.r(re),n.d(re,{isSupported:()=>pm,open:()=>fm});var oe={};n.r(oe),n.d(oe,{getLocation:()=>mm,isSupported:()=>vm,showLocation:()=>hm});var ie={};n.r(ie),n.d(ie,{setOptions:()=>Cm});var ae={};n.r(ae),n.d(ae,{CallType:()=>Im,EventActionSource:()=>Pm,MeetingReactionType:()=>Em,MeetingType:()=>Am,SharingProtocol:()=>Tm,appShareButton:()=>ie,getAppContentStageSharingCapabilities:()=>Hm,getAppContentStageSharingState:()=>_m,getAuthenticationTokenForAnonymousUser:()=>Mm,getIncomingClientAudioState:()=>Om,getLiveStreamState:()=>Nm,getMeetingDetails:()=>Fm,getMeetingDetailsVerbose:()=>km,joinMeeting:()=>zm,registerLiveStreamChangedHandler:()=>Lm,registerMeetingReactionReceivedHandler:()=>jm,registerRaiseHandStateChangedHandler:()=>Wm,registerSpeakingStateChangeHandler:()=>Bm,requestAppAudioHandling:()=>$m,requestStartLiveStreaming:()=>xm,requestStopLiveStreaming:()=>Dm,shareAppContentToStage:()=>Um,stopSharingAppContentToStage:()=>Vm,toggleIncomingClientAudio:()=>Rm,updateMicState:()=>Jm});var se={};n.r(se),n.d(se,{isSupported:()=>Ym,openPurchaseExperience:()=>Xm});var ce={};n.r(ce),n.d(ce,{composeMeeting:()=>nh,isSupported:()=>rh,openCalendarItem:()=>th});var ue={};n.r(ue),n.d(ue,{composeMailWithHandoff:()=>sh,isSupported:()=>ch});var le={};n.r(le),n.d(le,{ComposeMailType:()=>gh,composeMail:()=>fh,handoff:()=>ue,isSupported:()=>ph,openMailItem:()=>dh});var de={};n.r(de),n.d(de,{enablePrintCapability:()=>hh,isSupported:()=>Sh,print:()=>vh,registerBeforeUnloadHandler:()=>yh,registerBeforeUnloadHandlerHelper:()=>bh,registerOnLoadHandler:()=>wh,registerOnLoadHandlerHelper:()=>Ch});var fe={};n.r(fe),n.d(fe,{isSupported:()=>Ph,selectPeople:()=>Ih});var pe={};n.r(pe),n.d(pe,{isSupported:()=>Mh,showProfile:()=>kh});var ge={};n.r(ge),n.d(ge,{closeSearch:()=>_h,isSupported:()=>Vh,registerHandlers:()=>Uh,unregisterHandlers:()=>Hh});var me={};n.r(me),n.d(me,{getContent:()=>jh,isSupported:()=>zh});var he={};n.r(he),n.d(he,{SharingAPIMessages:()=>Gh,history:()=>me,isSupported:()=>Yh,shareWebContent:()=>Jh});var ve={};n.r(ve),n.d(ve,{close:()=>tv,isSupported:()=>nv});var we={};n.r(we),n.d(we,{StageViewOpenMode:()=>ov,isSupported:()=>av,open:()=>iv,self:()=>ve});var Ce={};n.r(Ce),n.d(Ce,{captureImages:()=>lv,isSupported:()=>fv,retrieveImages:()=>dv});var ye={};n.r(ye),n.d(ye,{CameraRestriction:()=>vv,Source:()=>wv,hasPermission:()=>Cv,image:()=>Ce,requestPermission:()=>yv});var be={};n.r(be),n.d(be,{isSupported:()=>Pv,isWebStorageClearedOnUserLogOut:()=>Iv});var Se={};n.r(Se),n.d(Se,{CallModalities:()=>Rv,isSupported:()=>kv,startCall:()=>Fv});var Ee={};n.r(Ee),n.d(Ee,{ExpectedFailureReason:()=>wo,FailedReason:()=>vo,Messages:()=>ho,notifyAppLoaded:()=>Nv,notifyExpectedFailure:()=>Lv,notifyFailure:()=>Dv,notifySuccess:()=>xv});var Ae={};n.r(Ae),n.d(Ae,{getDragAndDropFiles:()=>zv,isSupported:()=>qv});var Ie={};n.r(Ie),n.d(Ie,{getSettings:()=>bw,registerOnRemoveHandler:()=>Aw,registerOnSaveHandler:()=>Ew,setSettings:()=>Sw,setValidityState:()=>yw});var Te={};n.r(Te),n.d(Te,{getDefaultSizeIfNotProvided:()=>Mw,startTask:()=>Pw,submitTask:()=>Rw,updateTask:()=>Ow});var Pe={};n.r(Pe),n.d(Pe,{ContainerState:()=>Dw,LiveShareHost:()=>Uw,UserMeetingRole:()=>xw,isSupported:()=>Lw});var Oe,Re,Fe,ke,Me,Ne,xe,De,Le,Ue,He={};function Ve(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(He),n.d(He,{CartStatus:()=>Yw,Intent:()=>Xw,addOrUpdateCartItems:()=>tC,cartVersion:()=>Zw,getCart:()=>eC,isSupported:()=>oC,removeCartItems:()=>nC,updateCartStatus:()=>rC}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Oe||(Oe={})),function(e){e.M365Content="m365content"}(Re||(Re={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Fe||(Fe={})),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"}(ke||(ke={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Me||(Me={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Ne||(Ne={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(xe||(xe={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(De||(De={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Le||(Le={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Ue||(Ue={}));const _e=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 Be="2.0.1",We="2.0.2",je="2.0.3",ze="2.0.4",$e="2.0.1",qe="1.9.0",Ge="2.0.0",Je="1.7.0",Ke="1.8.0",Qe="1.9.0",Ze=n.t(_e,2).validOrigins,Xe=1500,Ye=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),et=/^https:\/\//,tt="https",nt="teams.microsoft.com",rt="The library has not yet been initialized",ot="The runtime has not yet been initialized",it="The runtime version is not supported",at="The call was not properly started";var st=n(933);const ct=lt,ut=2147483647;function lt(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 ft(e)}return dt(e,t,n)}function dt(e,t,n){if("string"==typeof e)return ht(e,t);if(ArrayBuffer.isView(e))return Et(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(wt(e,ArrayBuffer)||e&&wt(e.buffer,ArrayBuffer))return At(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(wt(e,SharedArrayBuffer)||e&&wt(e.buffer,SharedArrayBuffer)))return At(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 lt.from(r,t,n);const o=$t(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return lt.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 ft(e){return pt(e),gt(e<0?0:0|mt(e))}function pt(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 gt(e){if(e>ut)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,lt.prototype),t}function mt(e){if(e>=ut)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ut.toString(16)+" bytes");return 0|e}function ht(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!lt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|vt(e,t);let r=gt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function vt(e,t){if(lt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||wt(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 Ct(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return yt(e).length;default:if(o)return r?-1:Ct(e).length;t=(""+t).toLowerCase(),o=!0}}function wt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Ct(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 yt(e){return st.toByteArray(St(e))}lt.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}}(),lt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),lt.from=function(e,t,n){return dt(e,t,n)},Object.setPrototypeOf(lt.prototype,Uint8Array.prototype),Object.setPrototypeOf(lt,Uint8Array),lt.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}},lt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==lt.prototype};const bt=/[^+/0-9A-Za-z-_]/g;function St(e){if((e=(e=e.split("=")[0]).trim().replace(bt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Et(e){if(wt(e,Uint8Array)){const t=new Uint8Array(e);return At(t.buffer,t.byteOffset,t.byteLength)}return It(e)}function At(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,lt.prototype),r}function It(e){const t=e.length<0?0:0|mt(e.length),n=gt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Tt(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 Rt(r)}function Pt(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 Ft(this,t,n);case"utf8":case"utf-8":return Tt(this,t,n);case"ascii":return kt(this,t,n);case"latin1":case"binary":return Mt(this,t,n);case"base64":return Nt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}lt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Tt(this,0,e):Pt.apply(this,arguments)};const Ot=4096;function Rt(e){const t=e.length;if(t<=Ot)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ot));return n}function Ft(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+=zt[e[r]];return o}function kt(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 Mt(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 Nt(e,t,n){return 0===t&&n===e.length?st.fromByteArray(e):st.fromByteArray(e.slice(t,n))}function xt(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 Dt(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(jt(r))return a;e[n+a]=r}return a}function Lt(e,t,n,r){return Wt(Ct(t,e.length-n),e,n,r)}function Ut(e,t,n,r){return Wt(_t(t),e,n,r)}function Ht(e,t,n,r){return Wt(yt(t),e,n,r)}function Vt(e,t,n,r){return Wt(Bt(t,e.length-n),e,n,r)}function _t(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Bt(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 Wt(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 jt(e){return e!=e}lt.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 Dt(this,e,t,n);case"utf8":case"utf-8":return Lt(this,e,t,n);case"ascii":case"latin1":case"binary":return Ut(this,e,t,n);case"base64":return Ht(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const zt=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 $t(e){if(lt.isBuffer(e)){const t=0|mt(e.length),n=gt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||jt(e.length)?gt(0):It(e):"Buffer"===e.type&&Array.isArray(e.data)?It(e.data):void 0}const qt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Gt;const Jt=new Uint8Array(16);function Kt(){if(!Gt&&(Gt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Gt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Gt(Jt)}const Qt=[];for(let e=0;e<256;++e)Qt.push((e+256).toString(16).slice(1));function Zt(e,t=0){return Qt[e[t+0]]+Qt[e[t+1]]+Qt[e[t+2]]+Qt[e[t+3]]+"-"+Qt[e[t+4]]+Qt[e[t+5]]+"-"+Qt[e[t+6]]+Qt[e[t+7]]+"-"+Qt[e[t+8]]+Qt[e[t+9]]+"-"+Qt[e[t+10]]+Qt[e[t+11]]+Qt[e[t+12]]+Qt[e[t+13]]+Qt[e[t+14]]+Qt[e[t+15]]}const Xt=function(e,t,n){if(qt.randomUUID&&!t&&!e)return qt.randomUUID();const r=(e=e||{}).random||(e.rng||Kt)();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 Zt(r)},Yt=/^(?:[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 en=function(e){return"string"==typeof e&&Yt.test(e)};var tn,nn,rn,on,an,sn,cn,un;!function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.visionOS="visionOS",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(tn||(tn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(nn||(nn={})),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"}(rn||(rn={})),function(e){e.copilotSidePanel="copilotSidePanel"}(on||(on={})),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"}(an||(an={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(sn||(sn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(cn||(cn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(un||(un={}));const ln={errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},dn={majorVersion:1,minorVersion:5},fn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},pn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),gn=new Error("Invalid response: Received more images than the specified max limit in the response.");function mn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function hn(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 vn(){return Xt()}function wn(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&wn(e[t])})),Object.freeze(e)}function Cn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function yn(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function bn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Sn(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 En(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 An(e){return!(hn(`${e.majorVersion}.${e.minorVersion}`,`${dn.majorVersion}.${dn.minorVersion}`)>=0)}function In(e){return"https:"===e.protocol}function Tn(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=ct.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function Pn(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 On(){if(Rn())throw new Error("window object undefined at SSR check");return window}function Rn(){return"undefined"==typeof window}function Fn(e,t){if(Nn(e)||!xn(e)||!Dn(e))throw t||new Error("id is not valid.")}function kn(e,t){const n=e.toString().toLocaleLowerCase();if(Nn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!In(e))throw t||new Error("Url should be a valid https url")}function Mn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Nn(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function xn(e){return e.length<256&&e.length>4}function Dn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Ln(e){if(!e)throw new Error("id must not be empty");if(!1===en(e))throw new Error("id must be a valid UUID")}const Un=!!performance&&"now"in performance;function Hn(){return Un?performance.now()+performance.timeOrigin:void 0}function Vn(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=>Vn(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=>Vn(e[n],t+1)))}class _n{constructor(e=vn()){this.uuid=e,Ln(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Bn(e){if(!(e instanceof _n))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Wn{}Wn.initializeCalled=!1,Wn.initializeCompleted=!1,Wn.additionalValidOrigins=[],Wn.initializePromise=void 0,Wn.isFramelessWindow=!1,Wn.frameContext=void 0,Wn.hostClientType=void 0,Wn.printCapabilityEnabled=!1,Wn.teamsJsInstanceId=(new _n).toString();var jn=n(815);const zn=new _n,$n=jn.debug.formatArgs;jn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${zn.toString()}]`,$n.call(this,e)};const qn=(0,jn.debug)("teamsJs");function Gn(e){return qn.extend(e)}function Jn(e,t){return`${e}_${t}`}function Kn(e){return/^v\d+_[\w.]+$/.test(e)}var Qn=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=Gn("runtime"),Xn=4;function Yn(e){return e.apiVersion===Xn}const er={apiVersion:-1,supports:{}};function tr(e){if(Yn(e))return!0;throw-1===e.apiVersion?new Error(ot):new Error(it)}let nr=er;const rr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:fn,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:{}}}},or=[tn.desktop,tn.web,tn.rigel,tn.surfaceHub,tn.teamsRoomsWindows,tn.teamsRoomsAndroid,tn.teamsPhones,tn.teamsDisplays],ir=[tn.android,tn.ios,tn.ipados,tn.visionOS],ar=[...or,...ir];function sr(e){let t=e;if(t.apiVersion<Xn&&cr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),Yn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const cr=[{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=Qn(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})}}}],ur={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:or}],"1.9.0":[{capability:{location:{}},hostClientTypes:ar}],"2.0.0":[{capability:{people:{}},hostClientTypes:ar},{capability:{sharing:{}},hostClientTypes:[tn.desktop,tn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[tn.android,tn.desktop,tn.ios,tn.teamsRoomsAndroid,tn.teamsPhones,tn.teamsDisplays,tn.web]},{capability:{webStorage:{}},hostClientTypes:[tn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[tn.android,tn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[tn.android,tn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[tn.android,tn.ios,tn.ipados,tn.visionOS]}]},lr=Zn.extend("generateBackCompatRuntimeConfig");function dr(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]=dr(e[r]||{},t[r]));return n}function fr(e,t,n){lr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);lr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{hn(e,t)>=0&&n[t].forEach((e=>{void 0!==Wn.hostClientType&&e.hostClientTypes.includes(Wn.hostClientType)&&(r=dr(r,e.capability))}))}));const o={apiVersion:Xn,hostVersionsInfo:fn,isLegacyTeams:!0,supports:r};return lr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const pr=Zn.extend("applyRuntimeConfig");function gr(e){"string"==typeof e.apiVersion&&(pr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),pr("Fast-forwarding runtime %o",e);const t=sr(e);pr("Applying runtime %o",t),nr=wn(t)}function mr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const hr="2.38.0",vr={childProxyingCommunication:!1};function wr(){vr.childProxyingCommunication=!0}function Cr(){return vr.childProxyingCommunication}let yr={disableEnforceOriginMatchForChildResponses:!1};function br(){return yr}function Sr(e){yr=e}function Er(e){return Sr(Object.assign(Object.assign({},yr),e)),br()}var Ar=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 Ir=e=>{const{uuid:t}=e,n=Ar(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Tr=e=>{const{uuidAsString:t}=e,n=Ar(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new _n(t):void 0})},Pr=e=>{const{uuidAsString:t}=e,n=Ar(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new _n(t):void 0})},Or=e=>{const{uuid:t}=e,n=Ar(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Rr(e){return void 0!==e.uuidAsString?`${e.uuidAsString} (legacy id: ${e.id})`:void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const Fr=Gn("flushMessageQueue");function kr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Ir(o);Fr("Flushing message %s from %s message queue via postMessage.",Rr(n),r),e.postMessage(n,t)}}}const Mr=Gn("internal"),Nr=Mr.extend("ensureInitializeCalled"),xr=Mr.extend("ensureInitialized");function Dr(){if(!Wn.initializeCalled)throw Nr(rt),new Error(rt)}function Lr(e,...t){if(!Wn.initializeCompleted)throw xr("%s. initializeCalled: %s",rt,Wn.initializeCalled.toString()),new Error(rt);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Wn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Wn.frameContext}".`)}return tr(e)}function Ur(e=Be){const t=hn(Wn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Hr(){return Wn.hostClientType==tn.android||Wn.hostClientType==tn.ios||Wn.hostClientType==tn.ipados||Wn.hostClientType==tn.visionOS}function Vr(e=Be){if(!Hr()){throw{errorCode:ke.NOT_SUPPORTED_ON_PLATFORM}}if(!Ur(e)){throw{errorCode:ke.OLD_PLATFORM}}}function _r(e){let t=Wn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&et.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),Wn.additionalValidOrigins=t}function Br(e){if(!$r(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${jr}-${zr}).`)}function Wr(e){if(Nn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(qr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const jr=4,zr=256;function $r(e){return e.length<zr&&e.length>jr}function qr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Gr(e){if(!(e instanceof Kr))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Jr{constructor(e){this.idAsString=e,Wr(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class Kr extends Jr{constructor(e){super(e),Br(e)}toJSON(){return{appIdAsString:this.toString()}}}function Qr(e){return null==e}var Zr=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 Xr;const Yr="v1",eo=Gn("messageChannels.telemetry");function to(){return Zr(this,void 0,void 0,(function*(){if(Xr)return eo("Returning telemetry port from cache"),Xr;if(!no())throw ln;return Xr=yield cc(Jn(Yr,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),Xr}))}function no(){var e;return!(!Lr(nr)||!(null===(e=nr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function ro(){Xr=void 0}var oo=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 io;const ao="v1",so=Gn("messageChannels.dataLayer");function co(){return oo(this,void 0,void 0,(function*(){if(io)return so("Returning dataLayer port from cache"),io;if(!uo())throw ln;return io=yield cc(Jn(ao,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),io}))}function uo(){var e;return!(!Lr(nr)||!(null===(e=nr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function lo(){io=void 0}function fo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Lr(nr),Is(e)}function po(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Lr(nr),Ts(e)}const go="v2",mo=Gn("app"),ho={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var vo,wo;function Co(){return Wn.initializeCompleted}function yo(){return Wn.frameContext}function bo(e){return ji(Jn(go,"app.initialize"),e)}function So(e){Qs.currentWindow=e}function Eo(){Wn.initializeCalled&&(us(),Wn.initializeCalled=!1,Wn.initializeCompleted=!1,Wn.initializePromise=void 0,Wn.additionalValidOrigins=[],Wn.frameContext=void 0,Wn.hostClientType=void 0,Wn.isFramelessWindow=!1,ro(),lo(),Ys())}function Ao(){return new Promise((e=>{Dr(),e(ec(Jn(go,"app.getContext"),"getContext"))})).then((e=>Mo(e)))}function Io(){Dr(),zi(Jn(go,"app.notifyAppLoaded"))}function To(){return Gi(Jn(go,"app.notifySuccess"))}function Po(e){Dr(),qi(Jn(go,"app.notifyFailure"),e)}function Oo(e){Dr(),$i(Jn(go,"app.notifyExpectedFailure"),e)}function Ro(e){Xi(Jn(go,"app.registerOnThemeChangeHandler"),e)}function Fo(e){ws(e)}function ko(e){return Yi(Jn(go,"app.openLink"),e)}function Mo(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:nn.teams,clientType:e.hostClientType?e.hostClientType:tn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new Kr(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Wn.frameContext,renderingSurface:e.renderingSurface?e.renderingSurface:void 0,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 No(e){Jo(Jn(qo,"dialog.update.resize"),e)}function xo(){return!(!Lr(nr)||!nr.supports.dialog)&&!!nr.supports.dialog.update}function Do(e,t,n){Qo(Jn(qo,"dialog.url.bot.open"),e,t,n)}function Lo(){return Lr(nr)&&void 0!==(nr.supports.dialog&&nr.supports.dialog.url&&nr.supports.dialog.url.bot)}function Uo(e){if(Lr(nr,rn.task),!_o())throw ln;dc(Jn(qo,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Ho(e){if(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),!_o())throw ln;dc(Jn(qo,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Vo(e){if(Lr(nr,rn.task),!_o())throw ln;for(ps("messageForChild"),fs(Jn(qo,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ei.reverse();ei.length>0;){e(ei.pop())}}function _o(){var e,t;return Lr(nr)&&!!(null===(t=null===(e=nr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Bo(e,t,n){Ko(Jn(qo,"dialog.url.open"),e,t,n)}function Wo(e,t){Zo(Jn(qo,"dialog.url.submit"),e,t)}function jo(){return Lr(nr)&&void 0!==(nr.supports.dialog&&nr.supports.dialog.url)}function zo(e){return{url:e.url,height:e.size?e.size.height:cn.Small,width:e.size?e.size.width:cn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function $o(e){const t=zo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(vo||(vo={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(wo||(wo={})),mo("teamsjs instance is version %s, starting at %s UTC (%s local)",hr,(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?mo("teamsjs is being used from %s. %s",t,n):mo("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const qo="v2",Go="dialog.submit should not be called from FrameContext.content.\nIf dialog.submit was called from inside the dialog, please disregard this message.\nThis issue occurs due to a bug in Teams mobile where the dialog is incorrectly identified as being in the content FrameContext.\nWe are working to resolve this.";function Jo(e,t){if(Lr(nr,rn.content,rn.sidePanel,rn.task,rn.meetingStage),!xo())throw ln;dc(e,"tasks.updateTask",[t])}function Ko(e,t,n,r){if(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),!jo())throw ln;r&&fs(Jn(qo,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);dc(e,"tasks.startTask",[zo(t)],((e,t)=>{null==n||n({err:e,result:t}),ps("messageForParent")}))}function Qo(e,t,n,r){if(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),!Lo())throw ln;r&&fs(Jn(qo,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);dc(e,"tasks.startTask",[$o(t)],((e,t)=>{null==n||n({err:e,result:t}),ps("messageForParent")}))}function Zo(e,t,n){if(Lr(nr,rn.content,rn.task),!jo())throw ln;Wn.frameContext===rn.content&&console.warn(Go),dc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function Xo(e){return{card:e.card,height:e.size?e.size.height:cn.Small,width:e.size?e.size.width:cn.Small,title:e.title}}function Yo(e){const t=Xo(e);return t.completionBotId=e.completionBotId,t}const ei=[];function ti(e){Wn.frameContext&&(Wn.frameContext===rn.task?ei.push(e):ps("messageForChild"))}function ni(e,t){if(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),!ri())throw ln;const n=Yo(e);dc(Jn(qo,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ri(){const e=nr.hostVersionsInfo&&nr.hostVersionsInfo.adaptiveCardSchemaVersion&&!An(nr.hostVersionsInfo.adaptiveCardSchemaVersion);return Lr(nr)&&void 0!==(e&&nr.supports.dialog&&nr.supports.dialog.card&&nr.supports.dialog.card.bot)}function oi(e,t){if(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),!ii())throw ln;const n=Xo(e);dc(Jn(qo,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ii(){const e=nr.hostVersionsInfo&&nr.hostVersionsInfo.adaptiveCardSchemaVersion&&!An(nr.hostVersionsInfo.adaptiveCardSchemaVersion);return Lr(nr)&&void 0!==(e&&nr.supports.dialog&&nr.supports.dialog.card)}function ai(){fs(Jn(qo,"dialog.registerMessageForChildHandler"),"messageForChild",ti,!1)}function si(){return!(!Lr(nr)||!nr.supports.dialog)}const ci="v2";var ui,li;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(ui||(ui={}));class di{constructor(){this.enabled=!0,this.selected=!1}}let fi,pi,gi,mi,hi;function vi(){fs(Jn(ci,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",bi,!1),fs(Jn(ci,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Ei,!1),fs(Jn(ci,"menus.registerSetModuleViewHandler"),"setModuleView",Ci,!1)}function wi(e,t){if(Lr(nr),!Ai())throw ln;gi=t,dc(Jn(ci,"menus.setUpViews"),"setUpViews",[e])}function Ci(e){gi&&gi(e)||(Lr(nr),dc(Jn(ci,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function yi(e,t){if(Lr(nr),!Ai())throw ln;fi=t,dc(Jn(ci,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function bi(e){fi&&fi(e)||(Lr(nr),dc(Jn(ci,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Si(e,t){if(Lr(nr),!Ai())throw ln;pi=t,dc(Jn(ci,"menus.showActionMenu"),"showActionMenu",[e])}function Ei(e){pi&&pi(e)||(Lr(nr),dc(Jn(ci,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Ai(){return!(!Lr(nr)||!nr.supports.menus)}function Ii(){fs(Jn(_a,"pages.config.registerSettingsSaveHandler"),"settings.save",Mi,!1),fs(Jn(_a,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Di,!1)}function Ti(e){return Ka(Jn(_a,"pages.config.setValidityState"),e)}function Pi(e){return Za(Jn(_a,"pages.config.setConfig"),e)}function Oi(e){Ri(Jn(_a,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Qr(e)&&!Ui())throw ln}))}function Ri(e,t,n){!Qr(t)&&Lr(nr,rn.settings),n&&n(),mi=t,!Qr(t)&&dc(e,"registerHandler",["save"])}function Fi(e){ki(Jn(_a,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Qr(e)&&!Ui())throw ln}))}function ki(e,t,n){!Qr(t)&&Lr(nr,rn.remove,rn.settings),n&&n(),hi=t,!Qr(t)&&dc(e,"registerHandler",["remove"])}function Mi(e){const t=new xi(e);mi?mi(t):ks()?Hs("settings.save",[e]):t.notifySuccess()}function Ni(e){ms(Jn(_a,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[rn.content],(()=>{if(!Ui())throw ln}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(li||(li={}));class xi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),dc(Jn(_a,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),dc(Jn(_a,"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 Di(){const e=new Li;hi?hi(e):ks()?Hs("settings.remove",[]):e.notifySuccess()}class Li{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),dc(Jn(_a,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),dc(Jn(_a,"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 Ui(){return!(!Lr(nr)||!nr.supports.pages)&&!!nr.supports.pages.config}class Hi{}class Vi extends Hi{validate(e){return!0}deserialize(e){return e}}var _i=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,Wi=Gn("app");function ji(e,t){if(Rn()){return Wi.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Sn((()=>Zi(e,t)),Bi,new Error("SDK initialization timed out."))}function zi(e){dc(e,ho.AppLoaded,[hr])}function $i(e,t){dc(e,ho.ExpectedFailure,[t.reason,t.message])}function qi(e,t){dc(e,ho.Failure,[t.reason,t.message])}function Gi(e){return _i(this,void 0,void 0,(function*(){if(Wn.initializeCompleted)return Ki(e);if(!Wn.initializePromise)throw new Error(rt);return Wn.initializePromise.then((()=>Ki(e)))}))}function Ji(){var e;return Lr(nr)&&!!(null===(e=nr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Ki(e){return _i(this,void 0,void 0,(function*(){return Ji()?ac(ho.Success,[hr],new Vi,e).then((()=>({hasFinishedSuccessfully:!0}))):(dc(e,ho.Success,[hr]),{hasFinishedSuccessfully:"unknown"})}))}const Qi=Wi.extend("initializeHelper");function Zi(e,t){return new Promise((n=>{Wn.initializeCalled||(Wn.initializeCalled=!0,cs(),Wn.initializePromise=Xs(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Be})=>{Wn.frameContext=e,Wn.hostClientType=t,Wn.clientSupportedSDKVersion=r;try{Qi("Parsing %s",n);const e=JSON.parse(n);if(Qi("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&gr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{Qi("Attempting to parse %s as an SDK version",n),isNaN(hn(n,Be))||(Wn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(Qi("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");gr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;gr(fr(Wn.clientSupportedSDKVersion,rr,ur))}}Wn.initializeCompleted=!0})),vi(),Ii(),ai()),Array.isArray(t)&&_r(t),void 0!==Wn.initializePromise?n(Wn.initializePromise):Qi("GlobalVars.initializePromise is unexpectedly undefined")}))}function Xi(e,t){!Qr(t)&&Dr(),hs(e,t)}function Yi(e,t){return new Promise((n=>{Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),n(tc(e,"executeDeepLink",t))}))}var ea=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 ta=[];const na=Gn("validateOrigin");function ra(){return ea(this,void 0,void 0,(function*(){yield ia()}))}function oa(){return 0===ta.length}function ia(e=!1){return ea(this,void 0,void 0,(function*(){if(!oa()&&!e)return ta;if(Rn())return ta=Ze,Ze;{na("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),Xe);return fetch(Ye,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return na("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(aa(JSON.stringify(e)))return ta=e.validOrigins,ta;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?na(`validOrigins fetch call to CDN failed due to Timeout of ${Xe} ms. Defaulting to fallback list`):na("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),ta=Ze,ta)))}}))}function aa(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 na("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function sa(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 ca(e,t){return ia(t).then((t=>{if(!In(e))return na("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=>sa(e,n))))return!0;for(const e of Wn.additionalValidOrigins){if(sa("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return na("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,Wn.additionalValidOrigins),!1}))}function ua(e){ms(Jn(_a,"pages.appButton.onClick"),"appButtonClick",e,[rn.content],(()=>{if(!fa())throw ln}))}function la(e){ms(Jn(_a,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[rn.content],(()=>{if(!fa())throw ln}))}function da(e){ms(Jn(_a,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[rn.content],(()=>{if(!fa())throw ln}))}function fa(){return!(!Lr(nr)||!nr.supports.pages)&&!!nr.supports.pages.appButton}function pa(){rs()}function ga(){return Wa(Jn(_a,"pages.backStack.navigateBack"))}function ma(e){ha(Jn(_a,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Qr(e)&&!va())throw ln}))}function ha(e,t,n){!Qr(t)&&Lr(nr),n&&n(),ns(t),!Qr(t)&&dc(e,"registerHandler",["backButton"])}function va(){return!(!Lr(nr)||!nr.supports.pages)&&!!nr.supports.pages.backStack}function wa(e){return new Promise((t=>{if(Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!ya())throw ln;t(rc(Jn(_a,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function Ca(){return new Promise((e=>{if(Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!ya())throw ln;e(rc(Jn(_a,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function ya(){return!(!Lr(nr)||!nr.supports.pages)&&!!nr.supports.pages.currentApp}function ba(){if(Lr(nr,rn.content),!Ea())throw ln;dc(Jn(_a,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Sa(){if(Lr(nr,rn.content),!Ea())throw ln;dc(Jn(_a,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Ea(){return!(!Lr(nr)||!nr.supports.pages)&&!!nr.supports.pages.fullTrust}function Aa(e){return ja(Jn(_a,"pages.tabs.navigateToTab"),e)}function Ia(e){return $a(Jn(_a,"pages.tabs.getTabInstances"),e)}function Ta(e){return qa(Jn(_a,"pages.tabs.getMruTabInstances"),e)}function Pa(){return!(!Lr(nr)||!nr.supports.pages)&&!!nr.supports.pages.tabs}var Oa,Ra;function Fa(e){const t=Jn(_a,"pages.returnFocus");if(Lr(nr),!Va())throw ln;if(void 0===e&&dc(t,"returnFocus",[!1]),"boolean"==typeof e)dc(t,"returnFocus",[e]);else switch(e){case Ra.PreviousLandmark:case Ra.GoToActivityFeed:dc(t,"returnFocus",[!1,e]);break;case Ra.NextLandmark:dc(t,"returnFocus",[!0,e])}}function ka(e){ms(Jn(_a,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!Va())throw ln}))}function Ma(e){Ja(Jn(_a,"pages.setCurrentFrame"),e)}function Na(e,t,n){ra(),ji(Jn(_a,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Ma(e)}function xa(){return Qa(Jn(_a,"pages.getConfig."))}function Da(e){return Ba(Jn(_a,"pages.navigateCrossDomain"),e)}function La(e){return new Promise((t=>{if(Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!Va())throw ln;const n=Jn(_a,"pages.navigateToApp");if(nr.isLegacyTeams){t(tc(n,"executeDeepLink",En(Xa(e)?e:Ya(e))))}else{t(tc(n,"pages.navigateToApp",Xa(e)?es(e):e))}}))}function Ua(e){return Ga(Jn(_a,"pages.shareDeepLink"),e)}function Ha(e){ms(Jn(_a,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Qr(e)&&!Va())throw ln}))}function Va(){return!(!Lr(nr)||!nr.supports.pages)}ra(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Oa||(Oa={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Ra||(Ra={}));const _a="v2";function Ba(e,t){return new Promise((n=>{if(Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage),!Va())throw ln;n(nc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function Wa(e){return new Promise((t=>{if(Lr(nr),!va())throw ln;t(nc(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function ja(e,t){return new Promise((n=>{if(Lr(nr),!Pa())throw ln;n(nc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function za(e,t){if(Lr(nr),!Va())throw ln;dc(e,"returnFocus",[t])}function $a(e,t){return new Promise((n=>{if(Lr(nr),!Pa())throw ln;n(ec(e,"getTabInstances",t))}))}function qa(e,t){return new Promise((n=>{if(Lr(nr),!Pa())throw ln;n(ec(e,"getMruTabInstances",t))}))}function Ga(e,t){if(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),!Va())throw ln;dc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function Ja(e,t){if(Lr(nr,rn.content),!Va())throw ln;dc(e,"setFrameContext",[t])}function Ka(e,t){if(Lr(nr,rn.settings,rn.remove),!Ui())throw ln;dc(e,"settings.setValidityState",[t])}function Qa(e){return new Promise((t=>{if(Lr(nr,rn.content,rn.settings,rn.remove,rn.sidePanel),!Va())throw ln;t(ec(e,"settings.getSettings"))}))}function Za(e,t){return new Promise((n=>{if(Lr(nr,rn.content,rn.settings,rn.sidePanel),!Ui())throw ln;n(tc(e,"settings.setSettings",t))}))}function Xa(e){return e.appId instanceof Kr}function Ya(e){return Object.assign(Object.assign({},e),{appId:new Kr(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function es(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let ts;function ns(e){ts=e}function rs(){fs(Jn(_a,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",os,!1)}function os(){ts&&ts()||(ks()?Hs("backButtonPress",[]):ga())}var is=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 as=Gn("handlers");class ss{static initializeHandlers(){ss.handlers.themeChange=vs,ss.handlers.load=bs,ss.handlers.beforeUnload=As,rs()}static uninitializeHandlers(){ss.handlers={},ss.themeChangeHandler=null,ss.loadHandler=null,ss.beforeUnloadHandler=null,ss.beforeSuspendOrTerminateHandler=null,ss.resumeHandler=null}}function cs(){ss.initializeHandlers()}function us(){ss.uninitializeHandlers()}ss.handlers={},ss.themeChangeHandler=null,ss.loadHandler=null,ss.beforeUnloadHandler=null,ss.beforeSuspendOrTerminateHandler=null,ss.resumeHandler=null,ss.hostToAppPerformanceMetricsHandler=null;const ls=as.extend("callHandler");function ds(e,t){const n=ss.handlers[e];if(n){ls("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return ks()?(Hs(e,t),[!1,void 0]):(ls("Handler for action message %s not found.",e),[!1,void 0])}function fs(e,t,n,r=!0,o=[]){n?(ss.handlers[t]=n,r&&dc(e,"registerHandler",[t,...o])):delete ss.handlers[t]}function ps(e){delete ss.handlers[e]}function gs(e){return null!=ss.handlers[e]}function ms(e,t,n,r,o){n&&Lr(nr,...r),o&&o(),fs(e,t,n)}function hs(e,t){ss.themeChangeHandler=t,!Qr(t)&&dc(e,"registerHandler",["themeChange"])}function vs(e){ss.themeChangeHandler&&ss.themeChangeHandler(e),ks()&&Hs("themeChange",[e])}function ws(e){ss.hostToAppPerformanceMetricsHandler=e}function Cs(e){ss.hostToAppPerformanceMetricsHandler&&ss.hostToAppPerformanceMetricsHandler(e)}function ys(e,t){ss.loadHandler=t,!Qr(t)&&dc(e,"registerHandler",["load"])}function bs(e){const t=Ss(e);ss.resumeHandler?(ss.resumeHandler(t),ks()&&Hs("load",[t])):ss.loadHandler&&(ss.loadHandler(e),ks()&&Hs("load",[e]))}function Ss(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Es(e,t){ss.beforeUnloadHandler=t,!Qr(t)&&dc(e,"registerHandler",["beforeUnload"])}function As(){return is(this,void 0,void 0,(function*(){const e=()=>{dc(Jn("v2","handleBeforeUnload"),"readyToUnload",[])};ss.beforeSuspendOrTerminateHandler?(yield ss.beforeSuspendOrTerminateHandler(),ks()?Hs("beforeUnload"):e()):ss.beforeUnloadHandler&&ss.beforeUnloadHandler(e)||(ks()?Hs("beforeUnload"):e())}))}function Is(e){ss.beforeSuspendOrTerminateHandler=e,!Qr(e)&&dc(Jn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Ts(e){ss.resumeHandler=e,!Qr(e)&&dc(Jn("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Ps=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 Os=Gn("childProxyingCommunication");class Rs{}function Fs(){Rs.window=null,Rs.origin=null,Rs.messageQueue=[]}function ks(){return!!Cr()&&!!Rs.window}function Ms(e,t){return!!Cr()&&(Rs.window&&!Rs.window.closed&&e!==Rs.window||(Rs.window=e,Rs.origin=t),Rs.window&&Rs.window.closed?(Rs.window=null,Rs.origin=null,!1):Rs.window===e)}function Ns(e,t,n,r){return Ps(this,void 0,void 0,(function*(){Rs.window===t&&(kr(Rs.window,Rs.origin,Rs.messageQueue,"child"),Ds(e,n,r))}))}Rs.messageQueue=[];const xs=Os.extend("handleIncomingMessageFromChild");function Ds(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Tr(e.data),[o,i]=ds(r.func,r.args);if(o&&void 0!==i)return xs("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Rr(r),r.func),void Us(r.id,r.uuid,Array.isArray(i)?i:[i]);xs("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Rr(r),r.func),Ls(r,t,n)}function Ls(e,t,n){const r=t(Jn("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Rs.origin;n(r.uuid,((...t)=>{if(!Rs.window)return;if(!br().disableEnforceOriginMatchForChildResponses&&o!==Rs.origin)return void xs("Origin of child window has changed, not sending response back to child window");const n=t.pop();xs("Message from parent being relayed to child, id: %s",Rr(e)),Us(e.id,e.uuid,t,n)}))}function Us(e,t,n,r){const o=Rs.window,i=Vs(e,t,n,r),a=Or(i),s=Rs.origin;o&&s&&(xs("Sending message %s to %s via postMessage, args = %o",Rr(a),"child",a.args),o.postMessage(a,s))}function Hs(e,t){const n=Rs.window,r=_s(e,t),o=Rs.origin;n&&o?n.postMessage(r,o):Rs.messageQueue.push(r)}function Vs(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function _s(e,t){return{func:e,args:t||[]}}class Bs{static storeCallbackInformation(e,t){Bs.callbackInformation.set(e,t)}static clearMessages(){Bs.callbackInformation.clear()}static deleteMessageInformation(e){Bs.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Cs({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=Bs.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Cs({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Bs.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Bs.callbackInformation=new Map;const Ws=Gn("nestedAppAuthUtils"),js=Ws.extend("tryPolyfillWithNestedAppAuthBridge"),zs="v2";function $s(e,t,n){var r;const o=js;if(Wn.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");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");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=Gs(a,n);s&&(a.nestedAppAuthBridge=s)}const qs=Ws.extend("createNestedAppAuthBridge");function Gs(e,t){const n=qs;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}})();if(!t||"object"!=typeof t||"NestedAppAuthRequest"!==t.messageType)return void n("Unrecognized data format received by app, message being ignored. Message: %o",e);const r=Jn(zs,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var Js=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 Ks=Gn("communication");class Qs{}class Zs{}function Xs(e,t){if(Zs.messageListener=e=>Cc(e),Qs.currentWindow=Qs.currentWindow||On(),Qs.parentWindow=Qs.currentWindow.parent!==Qs.currentWindow.self?Qs.currentWindow.parent:Qs.currentWindow.opener,Qs.topWindow=Qs.currentWindow.top,(Qs.parentWindow||e)&&Qs.currentWindow.addEventListener("message",Zs.messageListener,!1),!Qs.parentWindow){const e=Qs.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Wn.isFramelessWindow=!0,e.onNativeMessage=Rc}try{return Qs.parentOrigin="*",oc(t,"initialize",[hr,Xn,e]).then((([e,t,n,r])=>($s(r,Qs.currentWindow,{onMessage:bc,sendPostMessage:pc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Qs.parentOrigin=null}}function Ys(){Qs.currentWindow&&Qs.currentWindow.removeEventListener("message",Zs.messageListener,!1),Qs.currentWindow=null,Qs.parentWindow=null,Qs.parentOrigin=null,Zs.parentMessageQueue=[],Zs.nextMessageId=0,Zs.callbacks.clear(),Zs.promiseCallbacks.clear(),Zs.portCallbacks.clear(),Zs.legacyMessageIdsToUuidMap={},Bs.clearMessages(),Fs()}function ec(e,t,...n){return oc(e,t,n).then((([e])=>e))}function tc(e,t,...n){return oc(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function nc(e,t,n,...r){return oc(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function rc(e,t,...n){return oc(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function oc(e,t,n=void 0){if(!Kn(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(lc(vc(e,t,n).uuid))}))}function ic(e){return e.map((e=>mr(e)?e.serialize():e))}function ac(e,t,n,r,o){var i;return Js(this,void 0,void 0,(function*(){const a=ic(t),[s]=yield oc(r,e,a);if(o&&o(s)||!o&&Ve(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(`${ke.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function sc(e,t,n,r){var o;return Js(this,void 0,void 0,(function*(){const i=ic(t),[a]=yield oc(n,e,i);if(r&&r(a)||!r&&Ve(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${ke.INTERNAL_ERROR}, message: Invalid response from host`)}))}function cc(e,t,n=void 0){if(!Kn(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 uc(vc(e,t,n).uuid)}function uc(e){return new Promise(((t,n)=>{Zs.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 lc(e){return new Promise((t=>{Zs.promiseCallbacks.set(e,t)}))}function dc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!Kn(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=vc(e,t,o);r&&Zs.callbacks.set(i.uuid,r)}Zs.parentMessageQueue=[],Zs.topMessageQueue=[],Zs.nextMessageId=0,Zs.callbacks=new Map,Zs.promiseCallbacks=new Map,Zs.portCallbacks=new Map,Zs.legacyMessageIdsToUuidMap={};const fc=Ks.extend("sendNestedAuthRequestToTopWindow");function pc(e,t){const n=fc,r=Qs.topWindow,o=Uc(e,t);return n("Message %s information: %o",Rr(o),{actionName:o.func}),mc(r,o)}const gc=Ks.extend("sendRequestToTargetWindowHelper");function mc(e,t){const n=gc,r=xc(e),o=Ir(t);if(Wn.isFramelessWindow)Qs.currentWindow&&Qs.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Rr(o),r),Qs.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Nc(e);e&&i?(n("Sending message %s to %s via postMessage",Rr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Rr(o),r),Mc(e).push(t))}return t}const hc=Ks.extend("sendMessageToParentHelper");function vc(e,t,n,r,o){const i=hc,a=Qs.parentWindow,s=Lc(e,t,n,r,o);return Bs.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Rr(s),{actionName:t,args:n}),mc(a,s)}const wc=Ks.extend("processIncomingMessage");function Cc(e){return Js(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void wc("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 Ec(t,n).then((r=>{r?(Ac(t,n),t!==Qs.parentWindow?Ms(t,n)&&Ns(e,t,vc,((e,t)=>Zs.callbacks.set(e,t))):Rc(e)):wc("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 yc=Ks.extend("processAuthBridgeMessage");function bc(e,t){var n,r;const o=yc;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),u=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?Ec(c,u)?(Qs.topWindow&&!Qs.topWindow.closed&&c!==Qs.topWindow||(Qs.topWindow=c,Qs.topOrigin=u),Qs.topWindow&&Qs.topWindow.closed&&(Qs.topWindow=null,Qs.topOrigin=null),kr(Qs.topWindow,Qs.topOrigin,Zs.topMessageQueue,"top"),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=Ks.extend("shouldProcessIncomingMessage");function Ec(e,t){return Js(this,void 0,void 0,(function*(){if(Qs.currentWindow&&e===Qs.currentWindow)return Sc("Should not process message because it is coming from the current window"),!1;if(Qs.currentWindow&&Qs.currentWindow.location&&t&&t===Qs.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 ca(e);return n||Sc("Message has an invalid origin of %s",t),n}}))}function Ac(e,t){Wn.isFramelessWindow||Qs.parentWindow&&!Qs.parentWindow.closed&&e!==Qs.parentWindow||(Qs.parentWindow=e,Qs.parentOrigin=t),Qs.parentWindow&&Qs.parentWindow.closed&&(Qs.parentWindow=null,Qs.parentOrigin=null),kr(Qs.parentWindow,Qs.parentOrigin,Zs.parentMessageQueue,"parent")}const Ic=Ks.extend("handleIncomingMessageFromParent");function Tc(e){const t=Ic;if(!e.uuid)return Zs.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Pc(Zs.callbacks,t);if(n)return n;const r=Pc(Zs.promiseCallbacks,t);if(r)return r;const o=Pc(Zs.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Rr(e))}function Pc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Oc(e,t){const n=Pc(t,e.uuid);n&&t.delete(n),e.uuid?Zs.legacyMessageIdsToUuidMap={}:delete Zs.legacyMessageIdsToUuidMap[e.id]}function Rc(e){const t=Ic,n=Hn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Pr(r),i=Tc(o);if(i){const r=Zs.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Bs.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]),Fc(e)||(t("Removing registered callback for message %s",i.toString()),Oc(o,Zs.callbacks)));const a=Zs.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()),Oc(o,Zs.promiseCallbacks));const s=Zs.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()),Oc(o,Zs.portCallbacks)}o.uuid&&(Zs.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Bs.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Rr(r),r.func),ds(r.func,r.args)}else t("Received an unknown message: %O",e)}function Fc(e){return!0===e.data.isPartialResponse}function kc(){return Qs.topWindow!==Qs.parentWindow}function Mc(e){return e===Qs.topWindow&&kc()?Zs.topMessageQueue:e===Qs.parentWindow?Zs.parentMessageQueue:[]}function Nc(e){return e===Qs.topWindow&&kc()?Qs.topOrigin:e===Qs.parentWindow?Qs.parentOrigin:null}function xc(e){return e===Qs.topWindow&&kc()?"top":e===Qs.parentWindow?"parent":null}function Dc(e,t){let n;n=Qs.currentWindow.setInterval((()=>{0===Mc(e).length&&(clearInterval(n),t())}),100)}function Lc(e,t,n,r,o){const i=Zs.nextMessageId++,a=new _n;Zs.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Wn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:Hn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function Uc(e,t){const n=Zs.nextMessageId++,r=new _n;return Zs.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Hn(),apiVersionTag:t,args:[],data:e}}const Hc="v1";function Vc(e){if(!Qr(e)&&Lr(nr),!Qr(e)&&!_c())throw ln;e?fs(Jn(Hc,"log.request"),"log.request",(()=>{const t=e();dc(Jn(Hc,"log.receive"),"log.receive",[t])})):ps("log.request")}function _c(){return!(!Lr(nr)||!nr.supports.logs)}var Bc,Wc,jc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Bc||(Bc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Wc||(Wc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(jc||(jc={}));const zc="v1";function $c(e,t){Lr(nr),dc(Jn(zc,"uploadCustomApp"),"uploadCustomApp",[e],t||mn())}function qc(e,t,n){Lr(nr),dc(Jn(zc,"sendCustomMessage"),e,t,n)}function Gc(e,t){if(Lr(nr),!ks())throw new Error("The child window has not yet been initialized or is not present");Hs(e,t)}function Jc(e,t){Lr(nr),fs(Jn(zc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function Kc(e,t){Lr(nr),fs(Jn(zc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Qc(e){Lr(nr,rn.content,rn.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];dc(Jn(zc,"openFilePreview"),"openFilePreview",t)}const Zc="v1";function Xc(e){return new Promise((t=>{if(Lr(nr,rn.content),!tu())throw ln;const n=tc(Jn(Zc,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&fs(Jn(Zc,"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&&fs(Jn(Zc,"conversations.registerCloseConversationHandler"),"closeConversation",((t,n,r,o)=>{var i;return null===(i=e.onCloseConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),t(n)}))}function Yc(){if(Lr(nr,rn.content),!tu())throw ln;dc(Jn(Zc,"conversations.closeConversation"),"conversations.closeConversation"),ps("startConversation"),ps("closeConversation")}function eu(){return new Promise((e=>{if(Lr(nr),!tu())throw ln;e(ec(Jn(Zc,"conversations.getChatMember"),"getChatMembers"))}))}function tu(){return!(!Lr(nr)||!nr.supports.conversations)}var nu=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 ru="v2",ou=Gn("copilot");function iu(){var e;return Lr(nr)&&!!(null===(e=nr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function au(e,t){var n;return void 0===t&&(t=null!==(n=Hn())&&void 0!==n?n:Date.now()),nu(this,void 0,void 0,(function*(){return Lr(nr),ou("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),sc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Jn(ru,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var su=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 cu="v2",uu=Gn("copilot");function lu(){var e,t;return Lr(nr)&&(!!(null===(e=nr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=nr.supports.copilot)||void 0===t?void 0:t.eligibility))}function du(e){var t,n;return su(this,void 0,void 0,(function*(){if(Lr(nr),!lu())throw new Error(`Error code: ${ln.errorCode}, message: Not supported on platform`);if((null===(t=nr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return uu("Eligibility information is already available on runtime."),nr.hostVersionsInfo.appEligibilityInformation;uu("Eligibility information is not available on runtime. Requesting from host.");const r=yield ec(Jn(cu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(Ve(r))throw new Error(`Error code: ${r.errorCode}, message: ${null!==(n=r.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!fu(r))throw new Error("Error deserializing eligibility information");return r}))}function fu(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&&(!e.featureSet||void 0!==e.featureSet.serverFeatures&&void 0!==e.featureSet.uxFeatures)}const pu="v2";class gu{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function mu(e){const t=e;return t.responseType===wu.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const hu="Action.Execute";var vu,wu,Cu;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(vu||(vu={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(wu||(wu={}));class yu extends Hi{validate(e){return mu(e)}deserialize(e){return e}}function bu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Cu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function Su(e){e.requestType===vu.ActionExecuteInvokeRequest?Eu(e):e.requestType===vu.QueryMessageExtensionRequest&&Au(e)}function Eu(e){if(e.type!==hu){throw{errorCode:Cu.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${hu}"`}}if(!Vn(e.data)){throw{errorCode:Cu.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function Au(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 Iu(e,t,n){if(Lr(nr,rn.content),!Fu())throw ln;const r=new Kr(e);return Su(n),oc(Jn(pu,"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 Tu(e,t){if(Lr(nr,rn.content),!Fu())throw ln;const n=new Kr(e);return oc(Jn(pu,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function Pu(e,t,n){if(Lr(nr,rn.content),!Fu())throw ln;const r=new Kr(e);return Su(n),oc(Jn(pu,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function Ou(e,t,n){if(Lr(nr,rn.content),!Fu())throw ln;return Fn(e,new Error("titleId is Invalid.")),Fn(t,new Error("oauthConfigId is Invalid.")),oc(Jn(pu,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Ru(e,t,n){if(Lr(nr,rn.content),!Fu())throw ln;return Fn(e,new Error("titleId is Invalid.")),t&&kn(t),oc(Jn(pu,"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 Fu(){return!(!Lr(nr)||!nr.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Cu||(Cu={}));var ku=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 Mu="v2";function Nu(e,t,n){return ku(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!Uu())throw ln;return Hu(e,t),sc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],Jn(Mu,"externalAppAuthenticationForCEA.authenticateWithSSO"),bu)}))}function xu(e,t,n){return ku(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!Uu())throw ln;return Hu(e,t),sc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Jn(Mu,"externalAppAuthenticationForCEA.authenticateWithOauth"),bu)}))}function Du(e,t,n,r){return ku(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!Uu())throw ln;return Hu(e,t),Eu(r),ac("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new gu(r),n.url.href,n.width,n.height,n.isExternal],new yu,Jn(Mu,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),bu)}))}function Lu(e,t,n,r){return ku(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!Uu())throw ln;return Hu(e,t),Eu(r),ac("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new gu(r),n.authId,n.connectionName,n.claims,n.silent],new yu,Jn(Mu,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),bu)}))}function Uu(){return!(!Lr(nr)||!nr.supports.externalAppAuthenticationForCEA)}function Hu(e,t){Fn(t,new Error("conversation id is not valid.")),Gr(e)}const Vu="v2";var _u,Bu;function Wu(e,t){if(Lr(nr,rn.content),!zu())throw ln;const n=new Kr(e);return oc(Jn(Vu,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function ju(e,t,n){if(Lr(nr,rn.content),!zu())throw ln;const r=new Kr(e);return oc(Jn(Vu,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function zu(){return!(!Lr(nr)||!nr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(_u||(_u={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Bu||(Bu={}));var $u=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 qu="v2";function Gu(e,t,n){return $u(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!Ku())throw ln;Hu(e,t);const[r,o]=yield oc(Jn(qu,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function Ju(e,t,n){return $u(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!Ku())throw ln;Hu(e,t);const r=yield ec(Jn(qu,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Ku(){return!(!Lr(nr)||!nr.supports.externalAppCardActionsForCEA)}var Qu;function Zu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Qu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Qu||(Qu={}));var Xu=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Yu="v2";function el(e,t,n){return Xu(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!tl())throw ln;return nl(e,n),sc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new rl(t),n],Jn(Yu,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Zu)}))}function tl(){return!(!Lr(nr)||!nr.supports.externalAppCardActionsForDA)}function nl(e,t){Gr(e),Bn(t)}class rl{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var ol=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 il="v2";function al(e,t,n){return ol(this,void 0,void 0,(function*(){if(Lr(nr,rn.content),!sl())throw ln;const r=new Kr(e),[o,i]=yield oc(Jn(il,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function sl(){return!(!Lr(nr)||!nr.supports.externalAppCommands)}const cl="v1";var ul,ll,dl,fl,pl,gl;function ml(e,t){if(Lr(nr,rn.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");dc(Jn(cl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function hl(e,t){if(Lr(nr,rn.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");dc(Jn(cl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function vl(e,t,n){if(Lr(nr,rn.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");dc(Jn(cl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function wl(e,t,n){if(Lr(nr,rn.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");dc(Jn(cl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Cl(e,t,n){if(Lr(nr,rn.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");dc(Jn(cl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function yl(e=!1,t){if(Lr(nr,rn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");dc(Jn(cl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function bl(e,t,n,r,o=!1,i){if(Lr(nr,rn.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");dc(Jn(cl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function Sl(e){if(Lr(nr,rn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");dc(Jn(cl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function El(e=void 0,t){if(Lr(nr,rn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");dc(Jn(cl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function Al(e){if(Lr(nr,rn.content),!e)throw Nl(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");dc(Jn(cl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function Il(e,t){if(Lr(nr,rn.content),!t)throw Nl(ke.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw Nl(ke.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");dc(Jn(cl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Tl(e,t){if(Lr(nr,rn.content),!t)throw Nl(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Nl(ke.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");dc(Jn(cl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Pl(e,t){if(Lr(nr,rn.content),!t)throw Nl(ke.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Nl(ke.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");dc(Jn(cl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Ol(e,t){if(Lr(nr,rn.content),!t)throw Nl(ke.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Nl(ke.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");dc(Jn(cl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Rl(e,t){if(Lr(nr,rn.content),!t)throw Nl(ke.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Nl(ke.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");dc(Jn(cl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Fl(e,t){if(Lr(nr,rn.content),!t)throw Nl(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Nl(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw Nl(ke.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");dc(Jn(cl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function kl(e){if(Lr(nr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");fs(Jn(cl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Ml(e){if(Lr(nr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");fs(Jn(cl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function Nl(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"}(ul||(ul={})),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"}(ll||(ll={})),function(e){e.ClassMaterials="classMaterials"}(dl||(dl={})),function(e){e.Readonly="readonly"}(fl||(fl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(pl||(pl={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(gl||(gl={}));const xl="v1";function Dl(){return new Promise((e=>{if(Lr(nr),!Vl())throw ln;e(rc(Jn(xl,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function Ll(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Lr(nr),!Vl())throw ln;t(rc(Jn(xl,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function Ul(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Lr(nr),!Vl())throw ln;fs(Jn(xl,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Lr(nr),e(t)}))}function Hl(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Lr(nr),!Vl())throw ln;fs(Jn(xl,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{Lr(nr),e(t)}))}function Vl(){return!(!Lr(nr)||!nr.supports.meetingRoom)}function _l(){return!(!Lr(nr)||!nr.supports.messageChannels)}const Bl="1.0.0",Wl={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Ql("Invalid message format, ignoring. Message: %o",e);if(!Gl(e.source,e.origin))return void Ql("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Zl("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Ql("Invalid response format, ignoring. Message: %o",e);t(r)}};let jl=null,zl=!1;function $l(e,t,n=!1){if(zl=n,!e)throw new Error("Cannot polyfill nestedAppAuthBridge as the current window does not exist");if(!t)throw new Error("Top origin is required to initialize the Nested App Auth Bridge");try{const e=new URL(t);if("https:"!==e.protocol)throw new Error(`Invalid top origin: ${t}. Only HTTPS origins are allowed.`);jl=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Ql("Nested App Auth Bridge is already present");const o=ql(r);o&&(r.nestedAppAuthBridge=o)}function ql(e){const t=new WeakMap,{onMessage:n}=Wl,r=e=>t=>n(t,e);return{addEventListener:(n,o)=>{if("message"===n){const i=r(o);t.set(o,i),e.addEventListener(n,i)}else Ql(`Event ${n} is not supported by nestedAppAuthBridge`)},postMessage:t=>{if(!e.top)throw new Error("window.top is not available for posting messages");try{const n=JSON.parse(t);if("object"==typeof n&&"NestedAppAuthRequest"===n.messageType){const n=Jl(t);if(e===e.top||!jl)return void Zl("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,jl)}}catch(e){return void Zl("Failed to parse message:",e,"Original message:",t)}},removeEventListener:(n,r)=>{const o=t.get(r);o&&(e.removeEventListener(n,o),t.delete(r))}}}function Gl(e,t){if(e&&e!==window.top)return Ql("Should not process message because it is not coming from the top window"),!1;if(t===jl)try{return"https:"===new URL(t).protocol}catch(e){return Zl("Invalid message origin URL:",e),!1}return!1}function Jl(e){const t=Date.now();return{id:Kl(),uuid:Xt(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Kl(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Ql(...e){zl&&console.log(...e)}function Zl(...e){zl&&console.error(...e)}const Xl="v1";function Yl(e){if(Lr(nr,rn.content),!ed())throw ln;dc(Jn(Xl,"notifications.showNotification"),"notifications.showNotification",[e])}function ed(){return!(!Lr(nr)||!nr.supports.notifications)}const td="v2";function nd(e){if(!id())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());if(Qr(e))throw new Error(ke.INVALID_ARGUMENTS.toString());fs(Jn(td,"otherApp.install"),"otherApp.install",e)}function rd(){if(!id())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());dc(Jn(td,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),ps("otherApp.install")}function od(e){if(!id())throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());return sc("otherApp.notifyInstallCompleted",[e.toString()],Jn(td,"otherApp.notifyInstallCompleted"))}function id(){return!(!Lr(nr)||!nr.supports.otherAppStateChange)}const ad="v1";var sd,cd,ud;function ld(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Lr(nr,rn.sidePanel),!wd())throw ln;dc(Jn(ad,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function dd(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(Lr(nr,rn.sidePanel),!wd())throw ln;dc(Jn(ad,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function fd(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(Lr(nr,rn.sidePanel),!wd())throw ln;dc(Jn(ad,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function pd(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Lr(nr,rn.sidePanel),!wd())throw ln;dc(Jn(ad,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function gd(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Lr(nr,rn.sidePanel),!wd())throw ln;fs(Jn(ad,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function md(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Lr(nr,rn.sidePanel),!wd())throw ln;fs(Jn(ad,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function hd(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Lr(nr,rn.sidePanel),!wd())throw ln;fs(Jn(ad,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function vd(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Lr(nr,rn.sidePanel),!wd())throw ln;fs(Jn(ad,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function wd(){return!(!Lr(nr)||!nr.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"}(sd||(sd={})),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"}(cd||(cd={})),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"}(ud||(ud={}));const Cd="v1";function yd(e,t,n,r){if(Lr(nr,rn.content),!bd())throw ln;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");dc(Jn(Cd,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function bd(){return!(!Lr(nr)||!nr.supports.appEntity)}const Sd="v1";function Ed(e){return new Promise((t=>{if(Lr(nr),!Ad())throw ln;if((Wn.hostClientType===tn.android||Wn.hostClientType===tn.teamsRoomsAndroid||Wn.hostClientType===tn.teamsPhones||Wn.hostClientType===tn.teamsDisplays)&&!Ur($e)){const e={errorCode:ke.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(ec(Jn(Sd,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function Ad(){return!(!Lr(nr)||!nr.supports.teams)&&(!!nr.supports.teams.fullTrust&&!!nr.supports.teams.fullTrust.joinedTeams)}const Id="v1";function Td(e){return new Promise((t=>{if(Lr(nr),!Pd())throw ln;t(ec(Jn(Id,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function Pd(){return!(!Lr(nr)||!nr.supports.teams)&&!!nr.supports.teams.fullTrust}const Od="v1";var Rd;function Fd(e,t){if(Lr(nr,rn.content),!Md())throw ln;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");dc(Jn(Od,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function kd(e,t){if(Lr(nr),!Md())throw ln;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");dc(Jn(Od,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Md(){return!(!Lr(nr)||!nr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Rd||(Rd={}));class Nd{static setTimeout(e,t){const n=performance.now(),r=vn();return Nd.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Nd.setTimeoutCallbacks[e]}static setInterval(e,t){Nd.setTimeout((function n(){e(),Nd.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Nd.setTimeoutCallbacks){const r=Nd.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Nd.setTimeoutCallbacks[e].callback(),delete Nd.setTimeoutCallbacks[e]}}}Nd.setTimeoutCallbacks={};class xd{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Nd.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&&Nd.clearTimeout(this.timeoutId),this.timeoutId=Nd.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(xd.maxSessionTimeoutInMs,2*t.timeoutInMs):xd.initialSessionTimeoutInMs}}xd.initialSessionTimeoutInMs=1e3,xd.maxSessionTimeoutInMs=3e4;const Dd="v2";class Ld{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new xd(Ld.distributionBinSize,(e=>this.reportPerformanceEvent(Jn(Dd,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Nd.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Jn(Dd,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),Ld.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){Nd.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(Jn(Dd,"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(Jn(Dd,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}Ld.distributionBinSize=1e3,Ld.calculateFPSInterval=1e3;var Ud=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Hd=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 Vd="v2",_d=Rn()?void 0:new Ld(dc);var Bd,Wd,jd;function zd(e){if(Lr(nr,rn.sidePanel),!Kd())throw ln;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(fs(Jn(Vd,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==_d?void 0:_d.setFrameProcessTimeLimit(e.timeLimit)),!1),ef())Qd(e.videoFrameHandler,e.config);else{if(!nf())throw ln;Xd(e.videoBufferHandler,e.config)}null==_d||_d.startMonitorSlowFrameProcessing()}function $d(e,t){if(Lr(nr,rn.sidePanel),!Kd())throw ln;dc(Jn(Vd,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function qd(e){if(Lr(nr,rn.sidePanel),!Kd())throw ln;fs(Jn(Vd,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",mf(e,_d),!1),dc(Jn(Vd,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function Gd(e){dc(Jn(Vd,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Jd(e){dc(Jn(Vd,"videoEffects.notifyError"),"video.notifyError",[e])}function Kd(){return Lr(nr)&&!!nr.supports.video&&(!!nr.supports.video.mediaStream||!!nr.supports.video.sharedFrame)}function Qd(e,t){if(Lr(nr,rn.sidePanel),!Kd()||!ef())throw ln;fs(Jn(Vd,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Ud(this,void 0,void 0,(function*(){const{streamId:n}=t,r=Zd(e,_d);yield af(n,r,Jd,_d)}))),!1),dc(Jn(Vd,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Zd(e,t){return n=>Ud(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 Xd(e,t){if(Lr(nr,rn.sidePanel),!Kd()||!nf())throw ln;fs(Jn(Vd,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==_d||_d.reportStartFrameProcessing(t.width,t.height),e(Yd(t),(()=>{null==_d||_d.reportFrameProcessed(),Gd(n)}),Jd)}}),!1),dc(Jn(Vd,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Yd(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Hd(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function ef(){var e;return Lr(nr,rn.sidePanel)&&tf()&&!!(null===(e=nr.supports.video)||void 0===e?void 0:e.mediaStream)}function tf(){var e,t,n,r;return!(!(null===(t=null===(e=On().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=On().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function nf(){var e;return Lr(nr,rn.sidePanel)&&!!(null===(e=nr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Bd||(Bd={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Wd||(Wd={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(jd||(jd={}));var rf=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 of="v2";function af(e,t,n,r){var o,i;return rf(this,void 0,void 0,(function*(){const a=uf();!Rn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),lf(yield cf(e,n,r),new df(n,t),a.writable)}))}function sf(e,t,n,r){var o,i;return rf(this,void 0,void 0,(function*(){const a=uf();!Rn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),lf(yield cf(e,n,r),new gf(n,t),a.writable)}))}function cf(e,t,n){return rf(this,void 0,void 0,(function*(){if(Rn())throw ln;const r=On().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 uf(){if(Rn())throw ln;const e=window.MediaStreamTrackGenerator;if(!e)throw ln;return new e({kind:"video"})}function lf(e,t,n){new(0,On().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class df{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>rf(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 ff{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 pf{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 gf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>rf(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=>rf(this,void 0,void 0,(function*(){if(Rn())throw ln;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 ff(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 pf(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}}})),fs(Jn(of,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function mf(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),dc(Jn(of,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in jd?e:jd.InitializationFailure;dc(Jn(of,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var hf=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 vf="v2",wf=2e3,Cf=Rn()?void 0:new Ld(dc);var yf;function bf(e){var t,n;if(!Of())throw ln;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Lr(nr,rn.sidePanel)){if(fs(Jn(vf,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Cf?void 0:Cf.setFrameProcessTimeLimit(e)),!1),null===(t=nr.supports.video)||void 0===t?void 0:t.mediaStream)fs(Jn(vf,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>hf(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=Cf?Ef(e.videoFrameHandler,Cf):e.videoFrameHandler;r?yield sf(n,o,Ff,Cf):yield af(n,o,Ff,Cf)}))),!1),dc(Jn(vf,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=nr.supports.video)||void 0===n?void 0:n.sharedFrame))throw ln;fs(Jn(vf,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==Cf||Cf.reportStartFrameProcessing(t.width,t.height);const n=Sf(),r=t.timestamp;e.videoBufferHandler(Af(t),(()=>{n(),null==Cf||Cf.reportFrameProcessed(),Rf(r)}),Ff)}}),!1),dc(Jn(vf,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Cf||Cf.startMonitorSlowFrameProcessing()}}function Sf(){const e=setTimeout((()=>{Ff(`Frame not processed in ${wf}ms`,yf.Warn)}),wf);return function(){clearTimeout(e)}}function Ef(e,t){return n=>hf(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=Sf(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function Af(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function If(e,t,n){if(Lr(nr,rn.sidePanel),!Of())throw ln;dc(Jn(vf,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Tf(e){if(Lr(nr,rn.sidePanel),!Of())throw ln;fs(Jn(vf,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",mf(e,Cf),!1),dc(Jn(vf,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Pf(e){if(Lr(nr,rn.sidePanel),!Kd())throw ln;dc(Jn(vf,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Of(){return Lr(nr),Kd()}function Rf(e){dc(Jn(vf,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Ff(e,t=yf.Warn){dc(Jn(vf,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function kf(e){if(Lr(nr),!Kd())throw ln;Ff(e,yf.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(yf||(yf={}));const Mf="v2";class Nf extends Hi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class xf{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Df{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Lf extends Hi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class Uf{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Hf extends Hi{validate(e){const t=new Lf;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function Vf(e,t){if(Lr(nr),!zf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if($f(e.threadId),t&&0===t.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return ac("hostEntity.tab.addAndConfigure",[new Df(e),t],new Lf,Jn(Mf,"hostEntity.tab.addAndConfigure"))}function _f(e){if(Lr(nr),!zf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return $f(e.threadId),ac("hostEntity.tab.getAll",[new Df(e)],new Hf,Jn(Mf,"hostEntity.tab.getAll"))}function Bf(e,t){if(Lr(nr),!zf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return qf(e),$f(t.threadId),ac("hostEntity.tab.reconfigure",[new xf(e),new Df(t)],new Nf,Jn(Mf,"hostEntity.tab.reconfigure"))}function Wf(e,t){if(Lr(nr),!zf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return qf(e),$f(t.threadId),ac("hostEntity.tab.rename",[new xf(e),new Df(t)],new Nf,Jn(Mf,"hostEntity.tab.rename"))}function jf(e,t){if(Lr(nr),!zf())throw new Error(`Error code: ${ke.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return $f(t.threadId),qf(e),ac("hostEntity.tab.remove",[new Uf(e),new Df(t)],new Vi,Jn(Mf,"hostEntity.tab.remove"))}function zf(){var e;return!!(Lr(nr)&&Jf()&&(null===(e=nr.supports.hostEntity)||void 0===e?void 0:e.tab))}function $f(e){if(!e||0==e.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function qf(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${ke.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var Gf;function Jf(){return!(!Lr(nr)||!nr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(Gf||(Gf={}));var Kf=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 Qf="v2",Zf="Invalid store dialog size",Xf="No App Id present, but AppId needed to open AppDetail store",Yf="No Collection Id present, but CollectionId needed to open a store specific to a collection";function ep(e){return Kf(this,void 0,void 0,(function*(){ip();const{size:t}=null!=e?e:{};return sc("store.openFullStore",[ap(t)],Jn(Qf,"store.openFullStore"))}))}function tp(e){return Kf(this,void 0,void 0,(function*(){ip();const{size:t,appId:n}=e;if(!(n instanceof Kr))throw new Error(Xf);return sc("store.openAppDetail",[ap(t),n],Jn(Qf,"store.openAppDetail"))}))}function np(e){return Kf(this,void 0,void 0,(function*(){ip();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return sc("store.openInContextStore",[ap(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Jn(Qf,"store.openInContextStore"))}))}function rp(e){return Kf(this,void 0,void 0,(function*(){ip();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Yf);return sc("store.openSpecificStore",[ap(t),n],Jn(Qf,"store.openSpecificStore"))}))}function op(){return Lr(nr)&&!!nr.supports.store}function ip(){if(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),!op())throw ln}function ap(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(Zf);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(Zf);return JSON.stringify(e)}var sp=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 cp="v1",up="v2";let lp;function dp(e){lp=e}function fp(e){const t=void 0!==e,n=t?e:lp;if(!n)throw new Error("No parameters are provided for authentication");Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage);return pp(n.successCallback||n.failureCallback?Jn(cp,"authentication.authenticate"):Jn(up,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(lp=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(lp=void 0)}}))}function pp(e,t){return sp(this,void 0,void 0,(function*(){const n=Mn(t.url);return kn(n),oc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function gp(e){Dr();return mp(e&&(e.successCallback||e.failureCallback)?Jn(cp,"authentication.getAuthToken"):Jn(up,"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 mp(e,t){return new Promise((n=>{n(oc(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 hp(e){Dr();return vp(e&&(e.successCallback||e.failureCallback)?Jn(cp,"authentication.getUser"):Jn(up,"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 vp(e){return new Promise((t=>{t(oc(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function wp(e,t){Lr(nr,rn.authentication);dc(Jn(t?cp:up,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Dc(Qs.parentWindow,(()=>setTimeout((()=>Qs.currentWindow.close()),200)))}function Cp(e,t){Lr(nr,rn.authentication);dc(Jn(t?cp:up,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Dc(Qs.parentWindow,(()=>setTimeout((()=>Qs.currentWindow.close()),200)))}var yp;function bp(e){const t=!e||e.length<=0,n=null==e?void 0:e.indexOf("@"),r=null==e?void 0:e.indexOf(".",n);if(t||-1===n||-1===r)throw new Error("Input email address does not have the correct format.")}!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(yp||(yp={}));class Sp{constructor(e){this.val=e,bp(e)}toString(){return this.val}}const Ep="/l/app/",Ap="/l/meeting/new",Ip="attendees",Tp="startTime",Pp="endTime",Op="subject",Rp="content",Fp="/l/call/0/0",kp="source",Mp="withVideo",Np="/l/chat/0/0",xp="users",Dp="topicName",Lp="message";function Up(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${xp}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Dp}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Lp}=${encodeURIComponent(n)}`;return`${tt}://${nt}${Np}?${r}${o}${i}`}function Hp(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${xp}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Mp}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${kp}=${encodeURIComponent(n)}`;return`${tt}://${nt}${Fp}?${r}${o}${i}`}function Vp(e,t,n,r,o){const i=void 0===e?"":`${Ip}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Tp}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Pp}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Op}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${Rp}=${encodeURIComponent(o)}`;return`${tt}://${nt}${Ap}?${i}${a}${s}${c}${u}`}function _p(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${tt}://${nt}${Ep}${encodeURIComponent(e)}`}const Bp="v1";function Wp(e){return new Promise((t=>{if(Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage),!jp())throw new Error("Not supported");const n=Jn(Bp,"appInstallDialog.openAppInstallDialog");nr.isLegacyTeams?t(tc(n,"executeDeepLink",_p(e.appId))):(dc(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function jp(){return!(!Lr(nr)||!nr.supports.appInstallDialog)}const zp="v1",$p=Gn("media");var qp,Gp,Jp,Kp,Qp,Zp,Xp;!function(e){e.Base64="base64",e.ID="id"}(qp||(qp={}));class Yp{}function eg(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Lr(nr,rn.content,rn.task),Wn.isFramelessWindow)if(Ur(Je))dc(Jn(zp,"media.captureImage"),"captureImage",e);else{e({errorCode:ke.OLD_PLATFORM},[])}else{e({errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},[])}}function tg(){if(Lr(nr,rn.content,rn.task),!rg())throw ln;const e=Me.Media;return new Promise((t=>{t(rc(Jn(zp,"media.hasPermission"),"permissions.has",e))}))}function ng(){if(Lr(nr,rn.content,rn.task),!rg())throw ln;const e=Me.Media;return new Promise((t=>{t(rc(Jn(zp,"media.requestPermission"),"permissions.request",e))}))}function rg(){return!(!Lr(nr)||!nr.supports.permissions)}class og extends Yp{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(Lr(nr,rn.content,rn.task),Ur(Ke))if(wg(this.mimeType,this.format,this.content))Ur("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:ke.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:ke.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];dc(Jn(zp,"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=lg(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=dg(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):$p(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:ke.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=vn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Qr(e)&&dc(Jn(zp,"media.getMedia"),"getMedia",r),fs(Jn(zp,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),ps("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=lg(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),ps("getMedia"+t)}else{const e=dg(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:ke.INTERNAL_ERROR,message:"data received is null"},new Blob),ps("getMedia"+t)}}))}}class ig{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Lr(nr,rn.content,rn.task);try{Vr(je)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};dc(Jn(zp,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(Gp.StopRecording,e)}}class ag extends ig{getMediaType(){return Qp.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Gp.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function sg(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Lr(nr,rn.content,rn.task),!Ur(Ke)){const e={errorCode:ke.OLD_PLATFORM};return void t(e,[])}try{fg(e)}catch(e){return void t(e,[])}if(!gg(e)){const e={errorCode:ke.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];dc(Jn(zp,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(pg(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 og(e));t(n,s)}))}function cg(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Lr(nr,rn.content,rn.task),!Ur(Ke)){return void t({errorCode:ke.OLD_PLATFORM})}if(!Cg(e)){return void t({errorCode:ke.INVALID_ARGUMENTS})}const n=[e];dc(Jn(zp,"media.viewImages"),"viewImages",n,t)}function ug(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Lr(nr,rn.content,rn.task),Wn.hostClientType!==tn.desktop&&Wn.hostClientType!==tn.web&&Wn.hostClientType!==tn.rigel&&Wn.hostClientType!==tn.teamsRoomsWindows&&Wn.hostClientType!==tn.teamsRoomsAndroid&&Wn.hostClientType!==tn.teamsPhones&&Wn.hostClientType!==tn.teamsDisplays)if(Ur(Qe))if(yg(t))dc(Jn(zp,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:ke.INVALID_ARGUMENTS},"")}else{e({errorCode:ke.OLD_PLATFORM},"")}else{e({errorCode:ke.NOT_SUPPORTED_ON_PLATFORM},"")}}function lg(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 dg(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 fg(e){hg(e)?Vr(We):vg(e)?Vr(je):mg(e)&&Vr(ze)}function pg(e){return!(e.mediaType!=Qp.Video||!e.videoProps||!e.videoProps.videoController)}function gg(e){return!(null==e||e.maxMediaCount>10)}function mg(e){var t;return!((null==e?void 0:e.mediaType)!=Qp.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function hg(e){return!(!e||e.mediaType!=Qp.VideoAndImage&&!e.videoAndImageProps)}function vg(e){return!(!e||e.mediaType!=Qp.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function wg(e,t,n){return null!=e&&null!=t&&t==qp.ID&&null!=n}function Cg(e){return!(null==e||e.length<=0||e.length>10)}function yg(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function bg(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"}(Gp||(Gp={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Jp||(Jp={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Kp||(Kp={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Qp||(Qp={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(Zp||(Zp={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Xp||(Xp={}));const Sg="v2";function Eg(e){return new Promise((t=>{if(Lr(nr,rn.content,rn.task),!Tg())throw ln;if(!yg(e))throw{errorCode:ke.INVALID_ARGUMENTS};t(rc(Jn(Sg,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Ag(){if(Lr(nr,rn.content,rn.task),!Tg())throw ln;const e=Me.Media;return new Promise((t=>{t(rc(Jn(Sg,"barCode.hasPermission"),"permissions.has",e))}))}function Ig(){if(Lr(nr,rn.content,rn.task),!Tg())throw ln;const e=Me.Media;return new Promise((t=>{t(rc(Jn(Sg,"barCode.requestPermission"),"permissions.request",e))}))}function Tg(){return!!(Lr(nr)&&nr.supports.barCode&&nr.supports.permissions)}const Pg="v2";function Og(e){return Rg(Jn(Pg,"chat.openChat"),e)}function Rg(e,t){return new Promise((n=>{if(Lr(nr,rn.content,rn.task),!kg())throw ln;if(nr.isLegacyTeams)n(tc(e,"executeDeepLink",Up([t.user],void 0,t.message)));else{n(tc(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Fg(e){const t=Jn(Pg,"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(Rg(t,r))}else{if(Lr(nr,rn.content,rn.task),!kg())throw ln;if(nr.isLegacyTeams)n(tc(t,"executeDeepLink",Up(e.users,e.topic,e.message)));else{n(tc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function kg(){return!(!Lr(nr)||!nr.supports.chat)}var Mg=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 Ng="v2";function xg(e){return Mg(this,void 0,void 0,(function*(){if(Lr(nr,rn.content,rn.meetingStage,rn.task,rn.settings,rn.stage,rn.sidePanel),!Lg())throw ln;if(!e.type||!Object.values(Ue).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Ue)}`);const t=yield Pn(e),n={mimeType:e.type,content:t};return rc(Jn(Ng,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function Dg(){return Mg(this,void 0,void 0,(function*(){Lr(nr,rn.content,rn.meetingStage,rn.task,rn.settings,rn.stage,rn.sidePanel);const e=Jn(Ng,"clipboard.read");if(!Lg())throw ln;const t=yield rc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Tn(e.mimeType,e.content)}return t}))}function Lg(){return Wn.isFramelessWindow?!(!Lr(nr)||!nr.supports.clipboard):!!(Lr(nr)&&navigator&&navigator.clipboard&&nr.supports.clipboard)}var Ug=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 Hg="v2",Vg={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var _g;function Bg(){var e;return null!==(e=Lr(nr)&&(nr.isNAAChannelRecommended||$g()))&&void 0!==e&&e}function Wg(){return Lr(nr),Qs.parentOrigin}function jg(){var e;return null!==(e=Lr(nr)&&nr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function zg(){var e;return null!==(e=Lr(nr)&&nr.isDeeplyNestedAuthSupported)&&void 0!==e&&e}function $g(){return!!(Lr(nr)&&qg()&&nr.isLegacyTeams&&nr.supports.nestedAppAuth)}function qg(){return Wn.hostClientType===tn.android||Wn.hostClientType===tn.ios||Wn.hostClientType===tn.ipados||Wn.hostClientType===tn.visionOS}function Gg(e){return Ug(this,void 0,void 0,(function*(){if(!jg())throw ln;const t=e.map(Qg);return Kg(_g.ADD,t)}))}function Jg(e){return Ug(this,void 0,void 0,(function*(){if(!jg())throw ln;const t=e.map(Qg);return Kg(_g.DELETE,t)}))}function Kg(e,t){return Ug(this,void 0,void 0,(function*(){if(window.parent!==window.top)throw new Error("This API is only available in the top-level parent.");if(!Array.isArray(t)||0===t.length)throw new Error(`The '${t}' parameter is required and must be a non-empty array.`);return ac("nestedAppAuth.manageNAATrustedOrigins",[new Zg(e,t)],Vg,Jn(Hg,"nestedAppAuth.manageNAATrustedOrigins"))}))}function Qg(e){try{return new URL(e).origin.toLowerCase()}catch(t){throw new Error(`Invalid origin provided: ${e}`)}}!function(e){e.ADD="ADD",e.DELETE="DELETE"}(_g||(_g={}));class Zg{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const Xg="v2";function Yg(){if(Lr(nr,rn.content,rn.task),!tm())throw ln;return rc(Jn(Xg,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function em(e){if(Lr(nr,rn.content,rn.task),!tm())throw ln;if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};return rc(Jn(Xg,"geoLocation.showLocation"),"location.showLocation",e)}function tm(){return!!(Lr(nr)&&nr.supports.geoLocation&&nr.supports.geoLocation.map&&nr.supports.permissions)}const nm="v2";function rm(){if(Lr(nr,rn.content,rn.task),!am())throw ln;return rc(Jn(nm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function om(){if(Lr(nr,rn.content,rn.task),!am())throw ln;const e=Me.GeoLocation;return new Promise((t=>{t(rc(Jn(nm,"geoLocation.hasPermission"),"permissions.has",e))}))}function im(){if(Lr(nr,rn.content,rn.task),!am())throw ln;const e=Me.GeoLocation;return new Promise((t=>{t(rc(Jn(nm,"geoLocation.requestPermission"),"permissions.request",e))}))}function am(){return!!(Lr(nr)&&nr.supports.geoLocation&&nr.supports.permissions)}function sm(){return nr.hostVersionsInfo?nr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const cm="v1";class um{postMessage(e,t){Lr(nr),dc(Jn(cm,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||mn())}addEventListener(e,t){Lr(nr),"message"===e&&fs(Jn(cm,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class lm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Lr(nr,rn.task),dc(Jn(cm,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||mn())}addEventListener(e,t){Lr(nr,rn.task),"message"===e&&fs(Jn(cm,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const dm="v2";function fm(e){if(Lr(nr,rn.content),!pm())throw ln;if(!e||!In(e))throw{errorCode:ke.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return rc(Jn(dm,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function pm(){return!(!Lr(nr)||!nr.supports.secondaryBrowser)}const gm="v1";function mm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Lr(nr,rn.content,rn.task),!Ur(qe))throw{errorCode:ke.OLD_PLATFORM};if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};if(!vm())throw ln;dc(Jn(gm,"location.getLocation"),"location.getLocation",[e],t)}function hm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Lr(nr,rn.content,rn.task),!Ur(qe))throw{errorCode:ke.OLD_PLATFORM};if(!e)throw{errorCode:ke.INVALID_ARGUMENTS};if(!vm())throw ln;dc(Jn(gm,"location.showLocation"),"location.showLocation",[e],t)}function vm(){return!(!Lr(nr)||!nr.supports.location)}const wm="v1";function Cm(e){Lr(nr,rn.sidePanel),e.contentUrl&&new URL(e.contentUrl),dc(Jn(wm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var ym=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 bm="v1";var Sm,Em,Am,Im,Tm,Pm;function Om(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),dc(Jn(bm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Rm(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),dc(Jn(bm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Fm(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage,rn.settings,rn.content),dc(Jn(bm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function km(){var e,t,n;return ym(this,void 0,void 0,(function*(){let r;Lr(nr,rn.sidePanel,rn.meetingStage,rn.settings,rn.content);try{const e=!0;r=yield rc(Jn("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)==Im.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Im.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(ke.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Mm(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage,rn.task),dc(Jn(bm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Nm(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Lr(nr,rn.sidePanel),dc(Jn(bm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function xm(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Lr(nr,rn.sidePanel),dc(Jn(bm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Dm(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Lr(nr,rn.sidePanel),dc(Jn(bm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Lm(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Lr(nr,rn.sidePanel),fs(Jn(bm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Um(e,t,n={sharingProtocol:Tm.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),dc(Jn(bm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Hm(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),dc(Jn(bm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Vm(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),dc(Jn(bm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function _m(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),dc(Jn(bm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Bm(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),fs(Jn(bm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Wm(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),fs(Jn(bm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function jm(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Lr(nr,rn.sidePanel,rn.meetingStage),fs(Jn(bm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function zm(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Lr(nr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Pm.Other};return rc(Jn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function $m(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");Lr(nr,rn.sidePanel,rn.meetingStage),e.isAppHandlingAudio?qm(e,t):Gm(e,t)}function qm(e,t){dc(Jn(bm,"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");fs(Jn(bm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>ym(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);Km(n,n.isMicMuted===t.isMicMuted?Sm.HostInitiated:Sm.AppDeclinedToChange)}catch(e){Km(t,Sm.AppFailedToChange)}}))));fs(Jn(bm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function Gm(e,t){dc(Jn(bm,"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");gs("meeting.micStateChanged")&&ps("meeting.micStateChanged"),gs("meeting.audioDeviceSelectionChanged")&&ps("meeting.audioDeviceSelectionChanged"),t(n)}))}function Jm(e){Km(e,Sm.AppInitiated)}function Km(e,t){Lr(nr,rn.sidePanel,rn.meetingStage),dc(Jn(bm,"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"}(Sm||(Sm={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(Em||(Em={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Am||(Am={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Im||(Im={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Tm||(Tm={})),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"}(Pm||(Pm={}));const Qm="v1",Zm="v2";function Xm(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Jn(Qm,"monetization.openPurchaseExperience")):(r=e,o=Jn(Zm,"monetization.openPurchaseExperience"));return Lr(nr,rn.content),bn((()=>new Promise((e=>{if(!Ym())throw ln;e(rc(o,"monetization.openPurchaseExperience",r))}))),n)}function Ym(){return!(!Lr(nr)||!nr.supports.monetization)}const eh="v2";function th(e){return new Promise((t=>{if(Lr(nr,rn.content),!rh())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(tc(Jn(eh,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function nh(e){return new Promise((t=>{if(Lr(nr,rn.content),!rh())throw new Error("Not supported");const n=Jn(eh,"calendar.composeMeeting");nr.isLegacyTeams?t(tc(n,"executeDeepLink",Vp(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(tc(n,"calendar.composeMeeting",e))}))}function rh(){return!(!Lr(nr)||!nr.supports.calendar)}const oh="v2";function ih(e){e&&0!==e.length&&e.forEach((e=>{bp(e)}))}function ah(e){if(!e.handoffId||0==e.handoffId.trim().length||""===e.handoffId.trim())throw new Error("handoffId should not be null or empty string.");const t=e.composeMailParams;t.type===gh.New&&(ih(t.toRecipients),ih(t.ccRecipients),ih(t.bccRecipients))}function sh(e){if(Lr(nr,rn.content),!ch())throw new Error("Not supported");return ah(e),sc("mail.handoff.composeMail",[new uh(e)],Jn(oh,"mail.handoff.composeMail"))}function ch(){return!!(Lr(nr)&&nr.supports.mail&&nr.supports.mail.handoff)}class uh{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const lh="v2";function dh(e){return new Promise((t=>{if(Lr(nr,rn.content),!ph())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(tc(Jn(lh,"mail.openMailItem"),"mail.openMailItem",e))}))}function fh(e){return new Promise((t=>{if(Lr(nr,rn.content),!ph())throw new Error("Not supported");t(tc(Jn(lh,"mail.composeMail"),"mail.composeMail",e))}))}function ph(){return!(!Lr(nr)||!nr.supports.mail)}var gh;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(gh||(gh={}));const mh="v2";function hh(){if(!Wn.printCapabilityEnabled){if(Lr(nr),!Sh())throw ln;Wn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(vh(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function vh(){On().print()}function wh(e){Ch(Jn(mh,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Qr(e)&&!Sh())throw ln}))}function Ch(e,t,n){!Qr(t)&&Lr(nr),!Qr(t)&&n&&n(),ys(e,t)}function yh(e){bh(Jn(mh,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Qr(e)&&!Sh())throw ln}))}function bh(e,t,n){!Qr(t)&&Lr(nr),!Qr(t)&&n&&n(),Es(e,t)}function Sh(){return!(!Lr(nr)||!nr.supports.teamsCore)}const Eh="v1",Ah="v2";function Ih(e,t){let n,r;Lr(nr,rn.content,rn.task,rn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Jn(Eh,"people.selectPeople")):(r=e,o=Jn(Ah,"people.selectPeople")),Cn(Th,n,o,r)}function Th(e,t){return new Promise((n=>{if(!Ur(Ge))throw{errorCode:ke.OLD_PLATFORM};if(!bg(t))throw{errorCode:ke.INVALID_ARGUMENTS};if(!Ph())throw ln;n(rc(e,"people.selectPeople",t))}))}function Ph(){return!(!Lr(nr)||!nr.supports.people)}function Oh(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?Rh(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Rh(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 Fh="v2";function kh(e){return Lr(nr,rn.content),new Promise((t=>{const[n,r]=Oh(e);if(!n)throw{errorCode:ke.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(rc(Jn(Fh,"profile.showProfile"),"profile.showProfile",o))}))}function Mh(){return!(!Lr(nr)||!nr.supports.profile)}const Nh="v2",xh="search.queryChange",Dh="search.queryClose",Lh="search.queryExecute";function Uh(e,t,n){if(Lr(nr,rn.content),!Vh())throw ln;fs(Jn(Nh,"search.registerOnClosedHandler"),Dh,e),fs(Jn(Nh,"search.registerOnExecutedHandler"),Lh,t),n&&fs(Jn(Nh,"search.registerOnChangeHandler"),xh,n)}function Hh(){if(Lr(nr,rn.content),!Vh())throw ln;dc(Jn(Nh,"search.unregisterHandlers"),"search.unregister"),ps(xh),ps(Dh),ps(Lh)}function Vh(){return!(!Lr(nr)||!nr.supports.search)}function _h(){return new Promise((e=>{if(Lr(nr,rn.content),!Vh())throw new Error("Not supported");e(tc(Jn(Nh,"search.closeSearch"),"search.closeSearch"))}))}var Bh=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 Wh="v2";function jh(){return Bh(this,void 0,void 0,(function*(){if(Lr(nr,rn.sidePanel,rn.meetingStage),!zh())throw ln;return yield rc(Jn(Wh,"sharing.history.getContent"),"sharing.history.getContent")}))}function zh(){var e;return Lr(nr)&&void 0!==(null===(e=nr.supports.sharing)||void 0===e?void 0:e.history)}const $h="v1",qh="v2",Gh={shareWebContent:"sharing.shareWebContent"};function Jh(e,t){try{Qh(e),Zh(e),Xh(e)}catch(e){return yn((()=>Promise.reject(e)),t)}Lr(nr,rn.content,rn.sidePanel,rn.task,rn.stage,rn.meetingStage);return yn(Kh,t,Jn(t?$h:qh,"sharing.shareWebContent"),e)}function Kh(e,t){return new Promise((n=>{if(!Yh())throw ln;n(rc(e,Gh.shareWebContent,t))}))}function Qh(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:ke.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Zh(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Xh(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:ke.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:ke.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Yh(){return!(!Lr(nr)||!nr.supports.sharing)}const ev="v2";function tv(){return new Promise((e=>{if(Lr(nr,rn.content),!nv())throw ln;e(rc(Jn(ev,"stageView.self.close"),"stageView.self.close"))}))}function nv(){var e;return Lr(nr)&&void 0!==(null===(e=nr.supports.stageView)||void 0===e?void 0:e.self)}const rv="v2";var ov;function iv(e){return new Promise((t=>{if(Lr(nr,rn.content),!av())throw ln;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(rc(Jn(rv,"stageView.open"),"stageView.open",e))}))}function av(){return!(!Lr(nr)||!nr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(ov||(ov={}));const sv=10;var cv=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 uv="v2";function lv(e){return cv(this,void 0,void 0,(function*(){Lr(nr,rn.content,rn.task),pv(),gv(e);const t=yield rc(Jn(uv,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return mv(e.maxVisualMediaCount,t),t}))}function dv(e){return cv(this,void 0,void 0,(function*(){Lr(nr,rn.content,rn.task),pv(),gv(e);const t=yield rc(Jn(uv,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return mv(e.maxVisualMediaCount,t),t}))}function fv(){return!!(Lr(nr)&&nr.supports.visualMedia&&nr.supports.visualMedia.image&&nr.supports.permissions)}function pv(){if(!fv())throw ln}function gv(e){if(!e||e.maxVisualMediaCount>sv||e.maxVisualMediaCount<1)throw pn}function mv(e,t){if(t.length>e)throw gn}const hv="v2";var vv,wv;function Cv(){if(Lr(nr,rn.content,rn.task),!fv())throw ln;const e=Me.Media;return rc(Jn(hv,"visualMedia.hasPermission"),"permissions.has",e)}function yv(){if(Lr(nr,rn.content,rn.task),!fv())throw ln;const e=Me.Media;return rc(Jn(hv,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(vv||(vv={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(wv||(wv={}));var bv=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 Sv=null;function Ev(){return bv(this,void 0,void 0,(function*(){return null===Sv&&(Sv=(yield Ao()).app.host.name),Sv}))}var Av=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 Iv(){return Av(this,void 0,void 0,(function*(){if(Lr(nr),!Pv())throw ln;return!(!nr.isLegacyTeams||Wn.hostClientType!==tn.android&&Wn.hostClientType!==tn.ios&&Wn.hostClientType!==tn.ipados&&Wn.hostClientType!==tn.visionOS||(yield Tv())!==nn.teams)||(yield ec(Jn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function Tv(){return Av(this,void 0,void 0,(function*(){return Ev()}))}function Pv(){return Lr(nr)&&void 0!==nr.supports.webStorage}const Ov="v2";var Rv;function Fv(e){const t=Jn(Ov,"call.startCall");return new Promise((n=>{var r;if(Lr(nr,rn.content,rn.task),!kv())throw ln;if(!nr.isLegacyTeams)return dc(t,"call.startCall",[e],n);n(ec(t,"executeDeepLink",Hp(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Rv.Video),e.source)).then((e=>{if(!e)throw new Error(at);return e})))}))}function kv(){return!(!Lr(nr)||!nr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Rv||(Rv={}));const Mv="v1";function Nv(){zi(Jn(Mv,"appInitialization.notifyAppLoaded"))}function xv(){dc(Jn(Mv,"appInitialization.notifySuccess"),ho.Success,[hr])}function Dv(e){qi(Jn(Mv,"appInitialization.notifyFailure"),e)}function Lv(e){$i(Jn(Mv,"appInitialization.notifyExpectedFailure"),e)}const Uv=Gn("thirdPartyCloudStorage"),Hv="v2";class Vv{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let _v=[],Bv=null,Wv=!0,jv=null;function zv(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Lr(nr,rn.content,rn.task),!qv())throw ln;if(jv)throw jv=null,new Error("getDragAndDropFiles cannot be called twice");jv=t,Wv=!0,dc(Jn(Hv,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],$v)}else{t([],{errorCode:ke.INVALID_ARGUMENTS})}}function $v(e){if(jv)if(e&&e.error)jv([],e.error),jv=null;else if(e&&e.fileChunk)try{Wv||0!==e.fileChunk.chunkSequence||(Uv("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),Wv=!0,jv([],{errorCode:ke.INTERNAL_ERROR,message:"error occurred while receiving data"}),_v=[],jv=null);const t=dg(e.fileChunk,e.fileType);if(t?(Bv||(Bv=new Vv(e.fileType,[])),Bv.assembleAttachment.push(t)):(Uv(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),jv?jv([],{errorCode:ke.INTERNAL_ERROR,message:"error occurred while receiving data"}):jv=null,_v=[],jv=null,Wv=!0),Wv=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&Bv){const t=lg(Bv.assembleAttachment,Bv.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});_v.push(n)}e.isLastFile&&jv&&(jv(_v,e.error),_v=[],jv=null,Wv=!0),Bv=null}}catch(e){jv&&(jv([],{errorCode:ke.INTERNAL_ERROR,message:e}),_v=[],jv=null,Wv=!0)}else jv([],{errorCode:ke.INTERNAL_ERROR,message:"data received is null"}),_v=[],jv=null,Wv=!0}function qv(){return!(!Lr(nr)||!nr.supports.thirdPartyCloudStorage)}const Gv="v1";function Jv(e,t){ji(Jn(Gv,"initialize"),t).then((()=>{e&&e()}))}function Kv(){hh()}function Qv(){vh()}function Zv(e){Dr(),dc(Jn(Gv,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=Wn.frameContext),e(t)}))}function Xv(e){Xi(Jn(Gv,"registerOnThemeChangeHandlerHelper"),e)}function Yv(e){ms(Jn(Gv,"registerFullScreenHandler"),"fullScreenChange",e,[])}function ew(e){ms(Jn(Gv,"registerAppButtonClickHandler"),"appButtonClick",e,[rn.content])}function tw(e){ms(Jn(Gv,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[rn.content])}function nw(e){ms(Jn(Gv,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[rn.content])}function rw(e){ha(Jn(Gv,"registerBackButtonHandler"),e)}function ow(e){Ch(Jn(Gv,"registerOnLoadHandler"),e)}function iw(e){bh(Jn(Gv,"registerBeforeUnloadHandler"),e)}function aw(e){ms(Jn(Gv,"registerFocusEnterHandler"),"focusEnter",e,[])}function sw(e){ms(Jn(Gv,"registerChangeSettingsHandler"),"changeSettings",e,[rn.content])}function cw(e,t){Lr(nr),$a(Jn(Gv,"getTabInstances"),t).then((t=>{e(t)}))}function uw(e,t){Lr(nr),qa(Jn(Gv,"getMruTabInstances"),t).then((t=>{e(t)}))}function lw(e){Ga(Jn(Gv,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function dw(e,t){Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.task,rn.stage,rn.meetingStage);const n=null!=t?t:mn();Yi(Jn(Gv,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function fw(e){Ja(Jn(Gv,"setFrameContext"),e)}function pw(e,t,n){ji(Jn(Gv,"initializeWithFrameContext"),n).then((()=>t&&t())),Ja(Jn(Gv,"setFrameContext"),e)}const gw="v1";function mw(e){za(Jn(gw,"navigation.returnFocus"),e)}function hw(e,t){Lr(nr);const n=null!=t?t:mn();ja(Jn(gw,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function vw(e,t){Lr(nr,rn.content,rn.sidePanel,rn.settings,rn.remove,rn.task,rn.stage,rn.meetingStage);const n=null!=t?t:mn();Ba(Jn(gw,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function ww(e){Lr(nr);const t=null!=e?e:mn();Wa(Jn(gw,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const Cw="v1";function yw(e){Ka(Jn(Cw,"settings.setValidityState"),e)}function bw(e){Lr(nr,rn.content,rn.settings,rn.remove,rn.sidePanel),Qa(Jn(Cw,"settings.getSettings")).then((t=>{e(t)}))}function Sw(e,t){Lr(nr,rn.content,rn.settings,rn.sidePanel);const n=null!=t?t:mn();Za(Jn(Cw,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Ew(e){Ri(Jn(Cw,"settings.registerOnSaveHandler"),e)}function Aw(e){ki(Jn(Cw,"settings.registerOnRemoveHandler"),e)}var Iw=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 Tw="v1";function Pw(e,t){const n=Jn(Tw,"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?(Lr(nr,rn.content,rn.sidePanel,rn.meetingStage),dc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?Qo(n,kw(e),r):Ko(n,Fw(e),r),new um}function Ow(e){e=Mw(e);const{width:t,height:n}=e,r=Iw(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Jo(Jn(Tw,"tasks.updateTask"),e)}function Rw(e,t){Zo(Jn(Tw,"tasks.submitTask"),e,t)}function Fw(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:cn.Small,width:e.width?e.width:cn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function kw(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:cn.Small,width:e.width?e.width:cn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function Mw(e){return e.height=e.height?e.height:cn.Small,e.width=e.width?e.width:cn.Small,e}const Nw="v2";var xw,Dw;function Lw(){return!(!Lr(nr,rn.meetingStage,rn.sidePanel,rn.content)||!nr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(xw||(xw={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Dw||(Dw={}));class Uw{getFluidTenantInfo(){return Hw(),new Promise((e=>{e(rc(Jn(Nw,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return Hw(),new Promise((t=>{t(rc(Jn(Nw,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return Hw(),new Promise((e=>{e(rc(Jn(Nw,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return Hw(),new Promise((t=>{t(rc(Jn(Nw,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return Hw(),new Promise((e=>{e(rc(Jn(Nw,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return Hw(),new Promise((t=>{t(rc(Jn(Nw,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return Hw(),new Promise((t=>{t(rc(Jn(Nw,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return Hw(),new Promise((t=>{t(rc(Jn(Nw,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return Hw(),new Uw}}function Hw(){if(!Lw())throw new Error("LiveShareHost Not supported")}var Vw=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 _w(e){try{return e.cartItems=Bw(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Bw(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Bw(e.accessories)),e}))}const Ww=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=Vw(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Ww(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function jw(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)$w(t),zw(t.accessories)}function zw(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");$w(t)}}}function $w(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");Gw(e.price),Jw(e.quantity)}function qw(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===en(e))throw new Error("id must be a valid UUID")}}function Gw(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 Jw(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Kw(e){if(!Object.values(Yw).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Qw="v2",Zw={majorVersion:1,minorVersion:1};var Xw,Yw;function eC(){if(Lr(nr,rn.content,rn.task),!oC())throw ln;return rc(Jn(Qw,"marketplace.getCart"),"marketplace.getCart",Zw).then(_w)}function tC(e){if(Lr(nr,rn.content,rn.task),!oC())throw ln;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return qw(null==e?void 0:e.cartId),jw(null==e?void 0:e.cartItems),rc(Jn(Qw,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Ww(e.cartItems),cartVersion:Zw})).then(_w)}function nC(e){if(Lr(nr,rn.content,rn.task),!oC())throw ln;if(!e)throw new Error("removeCartItemsParams must be provided");if(qw(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 rc(Jn(Qw,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Zw})).then(_w)}function rC(e){if(Lr(nr,rn.content,rn.task),!oC())throw ln;if(!e)throw new Error("updateCartStatusParams must be provided");return qw(null==e?void 0:e.cartId),Kw(null==e?void 0:e.cartStatus),rc(Jn(Qw,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Zw})).then(_w)}function oC(){return!(!Lr(nr)||!nr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(Xw||(Xw={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Yw||(Yw={}))})(),r})()));
|
2
2
|
//# sourceMappingURL=MicrosoftTeams.min.js.map
|