@microsoft/teams-js 2.51.0-beta.0 → 2.51.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()}(Object("undefined"!=typeof self?self:this),()=>(()=>{var e={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}},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}}},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))}},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}},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||"function"==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:()=>Ue,AppId:()=>co,ChannelType:()=>hn,ChildAppWindow:()=>jm,DialogDimension:()=>gn,EduType:()=>We,EmailAddress:()=>eh,ErrorCode:()=>He,FileOpenPreference:()=>De,FrameContexts:()=>ln,HostClientType:()=>cn,HostName:()=>un,LiveShareHost:()=>my,NotificationTypes:()=>au,ParentAppWindow:()=>Wm,RenderingSurfaces:()=>dn,SecondaryM365ContentIdName:()=>Le,TaskModuleDimension:()=>gn,TeamType:()=>fn,UUID:()=>Gn,UserAuthenticationState:()=>fl,UserSettingTypes:()=>cu,UserTeamRole:()=>pn,ValidatedSafeString:()=>so,ViewerActionTypes:()=>su,activateChildProxyingCommunication:()=>Pr,app:()=>i,appEntity:()=>W,appInitialization:()=>Re,appInstallDialog:()=>te,appPerformanceMetrics:()=>ee,authentication:()=>Y,barCode:()=>re,calendar:()=>ge,call:()=>Oe,chat:()=>oe,clipboard:()=>ie,conversations:()=>b,copilot:()=>O,dialog:()=>f,enablePrintCapability:()=>OC,executeDeepLink:()=>zC,externalAppAuthentication:()=>R,externalAppAuthenticationForCEA:()=>F,externalAppCardActions:()=>k,externalAppCardActionsForCEA:()=>M,externalAppCardActionsForDA:()=>x,externalAppCommands:()=>N,files:()=>D,geoLocation:()=>ce,getAdaptiveCardSchemaVersion:()=>Vm,getContext:()=>FC,getCurrentFeatureFlagsState:()=>Rr,getMruTabInstances:()=>jC,getTabInstances:()=>BC,hostEntity:()=>Q,initialize:()=>TC,initializeWithFrameContext:()=>$C,liveShare:()=>xe,location:()=>le,logs:()=>S,mail:()=>me,marketplace:()=>Ne,media:()=>ne,meeting:()=>fe,meetingRoom:()=>U,menus:()=>p,messageChannels:()=>L,monetization:()=>pe,navigateBack:()=>ZC,navigateCrossDomain:()=>QC,navigateToTab:()=>KC,nestedAppAuth:()=>ae,nestedAppAuthBridge:()=>H,notifications:()=>_,openFilePreview:()=>hu,otherAppStateChange:()=>V,overwriteFeatureFlagsState:()=>kr,pages:()=>y,people:()=>we,plugins:()=>B,print:()=>RC,profile:()=>Ce,registerAppButtonClickHandler:()=>xC,registerAppButtonHoverEnterHandler:()=>NC,registerAppButtonHoverLeaveHandler:()=>DC,registerBackButtonHandler:()=>UC,registerBeforeUnloadHandler:()=>HC,registerChangeSettingsHandler:()=>VC,registerCustomHandler:()=>pu,registerFocusEnterHandler:()=>_C,registerFullScreenHandler:()=>MC,registerOnLoadHandler:()=>LC,registerOnThemeChangeHandler:()=>kC,registerUserSettingsChangeHandler:()=>gu,remoteCamera:()=>j,returnFocus:()=>JC,search:()=>ye,secondaryBrowser:()=>ue,sendCustomEvent:()=>fu,sendCustomMessage:()=>du,setFeatureFlagsState:()=>Fr,setFrameContext:()=>qC,settings:()=>ke,shareDeepLink:()=>WC,sharing:()=>be,shortcutRelay:()=>qe,sidePanelInterfaces:()=>I,stageView:()=>Ee,store:()=>Z,tasks:()=>Me,teams:()=>$,teamsCore:()=>ve,thirdPartyCloudStorage:()=>Fe,uploadCustomApp:()=>lu,version:()=>Er,videoEffects:()=>G,videoEffectsEx:()=>J,visualMedia:()=>Pe,webStorage:()=>Te,widgetHosting:()=>X});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>vo,getTelemetryPort:()=>ho,isSupported:()=>mo});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Eo,getDataLayerPort:()=>bo,isSupported:()=>Ao});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Io,registerOnResumeHandler:()=>Po});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>ko,FailedReason:()=>Fo,Messages:()=>Ro,_initialize:()=>Do,_uninitialize:()=>Uo,getContext:()=>Lo,getFrameContext:()=>xo,initialize:()=>No,isInitialized:()=>Mo,lifecycle:()=>o,notifyAppLoaded:()=>Ho,notifyExpectedFailure:()=>Bo,notifyFailure:()=>Vo,notifySuccess:()=>_o,openLink:()=>qo,registerHostToAppPerformanceMetricsHandler:()=>zo,registerOnContextChangeHandler:()=>Wo,registerOnThemeChangeHandler:()=>jo});var a={};n.r(a),n.d(a,{isSupported:()=>Jo,resize:()=>Go});var s={};n.r(s),n.d(s,{isSupported:()=>Qo,open:()=>Ko});var c={};n.r(c),n.d(c,{isSupported:()=>ei,registerOnMessageFromParent:()=>Yo,sendMessageToDialog:()=>Xo,sendMessageToParentFromDialog:()=>Zo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>ii,getDialogInfoFromUrlDialogInfo:()=>oi,isSupported:()=>ri,open:()=>ti,parentCommunication:()=>c,submit:()=>ni});var l={};n.r(l),n.d(l,{isSupported:()=>vi,open:()=>mi});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>Ci,open:()=>wi});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>yi,isSupported:()=>Si,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>Ai,MenuItem:()=>Ii,MenuListType:()=>Ei,initialize:()=>ki,isSupported:()=>Hi,setNavBarMenu:()=>Ni,setUpViews:()=>Mi,showActionMenu:()=>Ui});var g={};n.r(g),n.d(g,{initialize:()=>_i,isSupported:()=>Zi,registerChangeConfigHandler:()=>Gi,registerOnRemoveHandler:()=>zi,registerOnRemoveHandlerHelper:()=>qi,registerOnSaveHandler:()=>ji,registerOnSaveHandlerHelper:()=>Wi,setConfig:()=>Bi,setValidityState:()=>Vi});var h={};n.r(h),n.d(h,{isSupported:()=>Ra,onClick:()=>Pa,onHoverEnter:()=>Ta,onHoverLeave:()=>Oa});var m={};n.r(m),n.d(m,{_initialize:()=>Fa,isSupported:()=>Na,navigateBack:()=>ka,registerBackButtonHandler:()=>Ma,registerBackButtonHandlerHelper:()=>xa});var v={};n.r(v),n.d(v,{isSupported:()=>La,navigateTo:()=>Da,navigateToDefaultPage:()=>Ua});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Ha,exitFullscreen:()=>_a,isSupported:()=>Va});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Wa,getTabInstances:()=>ja,isSupported:()=>za,navigateToTab:()=>Ba});var y={};n.r(y),n.d(y,{EnterFocusType:()=>qa,ReturnFocusType:()=>$a,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>Za,initializeWithFrameContext:()=>Qa,isSupported:()=>ns,navigateCrossDomain:()=>Xa,navigateToApp:()=>Ya,registerFocusEnterHandler:()=>Ja,registerFullScreenHandler:()=>ts,returnFocus:()=>Ga,setCurrentFrame:()=>Ka,shareDeepLink:()=>es,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>iu,registerGetLogHandler:()=>ou});var b={};n.r(b),n.d(b,{closeConversation:()=>wu,getChatMembers:()=>Cu,isSupported:()=>yu,openConversation:()=>vu});var A={};n.r(A),n.d(A,{isSupported:()=>Eu,sendCustomTelemetryData:()=>Iu});var E={};n.r(E),n.d(E,{getEligibilityInfo:()=>Fu,isSupported:()=>Ru});var I={};n.r(I),n.d(I,{ContentItemType:()=>Mu,CopilotMode:()=>Uu,MediaSelectionType:()=>xu,SidePanelErrorCode:()=>Vu,SidePanelErrorImpl:()=>Bu,TeamsContextType:()=>Hu,TeamsDimensionName:()=>Du,TeamsSessionType:()=>Nu,TranscriptState:()=>Lu,UserConsent:()=>_u});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>Ku,getContent:()=>$u,isResponseAReportableError:()=>qu,isSupported:()=>zu,preCheckUserConsent:()=>Gu,registerUserActionContentSelect:()=>Ju});var T={};n.r(T),n.d(T,{closeSidePanel:()=>rl,isSupported:()=>nl});var O={};n.r(O),n.d(O,{customTelemetry:()=>A,eligibility:()=>E,sidePanel:()=>P,view:()=>T});var R={};n.r(R),n.d(R,{ActionExecuteInvokeRequestType:()=>cl,ActionExecuteResponseHandler:()=>pl,InvokeErrorCode:()=>dl,InvokeResponseType:()=>ll,OriginalRequestType:()=>ul,SerializableActionExecuteInvokeRequest:()=>al,SerializableConnectorParameters:()=>Al,UserAuthenticationState:()=>fl,authenticateAndResendRequest:()=>wl,authenticateWithConnector:()=>El,authenticateWithOauth2:()=>Sl,authenticateWithPowerPlatformConnectorPlugins:()=>bl,authenticateWithSSO:()=>Cl,authenticateWithSSOAndResendRequest:()=>yl,disconnectConnector:()=>Tl,getUserAuthenticationStateForConnector:()=>Pl,isActionExecuteResponse:()=>sl,isInvokeError:()=>gl,isSupported:()=>Ol,validateActionExecuteInvokeRequest:()=>ml});var F={};n.r(F),n.d(F,{authenticateAndResendRequest:()=>xl,authenticateWithOauth:()=>Ml,authenticateWithSSO:()=>kl,authenticateWithSSOAndResendRequest:()=>Nl,isSupported:()=>Dl,validateInput:()=>Ul});var k={};n.r(k),n.d(k,{ActionOpenUrlErrorCode:()=>_l,ActionOpenUrlType:()=>Hl,isSupported:()=>jl,processActionOpenUrl:()=>Bl,processActionSubmit:()=>Vl});var M={};n.r(M),n.d(M,{isSupported:()=>Gl,processActionOpenUrl:()=>ql,processActionSubmit:()=>$l});var x={};n.r(x),n.d(x,{SerializableActionOpenUrlDialogInfo:()=>td,isSupported:()=>Yl,processActionOpenUrlDialog:()=>Xl});var N={};n.r(N),n.d(N,{isSupported:()=>id,processActionCommand:()=>od});var D={};n.r(D),n.d(D,{CloudStorageProvider:()=>sd,CloudStorageProviderFileAction:()=>fd,CloudStorageProviderType:()=>cd,DocumentLibraryAccessType:()=>ld,FileDownloadStatus:()=>dd,SpecialDocumentLibraryType:()=>ud,addCloudStorageFolder:()=>gd,addCloudStorageProvider:()=>bd,addCloudStorageProviderFile:()=>Ed,copyMoveFiles:()=>Cd,deleteCloudStorageFolder:()=>hd,deleteCloudStorageProviderFile:()=>Pd,downloadCloudStorageProviderFile:()=>Td,getCloudStorageFolderContents:()=>md,getCloudStorageFolders:()=>pd,getExternalProviders:()=>wd,getFileDownloads:()=>yd,openCloudStorageFile:()=>vd,openDownloadFolder:()=>Sd,registerCloudStorageProviderContentChangeHandler:()=>Fd,registerCloudStorageProviderListChangeHandler:()=>Rd,removeCloudStorageProvider:()=>Ad,renameCloudStorageProviderFile:()=>Id,uploadCloudStorageProviderFile:()=>Od});var U={};n.r(U),n.d(U,{getPairedMeetingRoomInfo:()=>xd,isSupported:()=>Ld,registerMeetingRoomCapabilitiesUpdateHandler:()=>Dd,registerMeetingRoomStatesUpdateHandler:()=>Ud,sendCommandToPairedMeetingRoom:()=>Nd});var L={};n.r(L),n.d(L,{dataLayer:()=>t,isSupported:()=>Hd,telemetry:()=>e});var H={};n.r(H),n.d(H,{initialize:()=>Wd,version:()=>_d});var _={};n.r(_),n.d(_,{isSupported:()=>Xd,showNotification:()=>Zd});var V={};n.r(V),n.d(V,{isSupported:()=>rf,notifyInstallCompleted:()=>nf,registerAppInstallationHandler:()=>ef,unregisterAppInstallationHandler:()=>tf});var B={};n.r(B),n.d(B,{isSupported:()=>sf,registerPluginMessage:()=>uf,sendPluginMessage:()=>cf});var j={};n.r(j),n.d(j,{ControlCommand:()=>gf,ErrorReason:()=>hf,SessionTerminatedReason:()=>mf,getCapableParticipants:()=>vf,isSupported:()=>If,registerOnCapableParticipantsChangeHandler:()=>Sf,registerOnDeviceStateChangeHandler:()=>Af,registerOnErrorHandler:()=>bf,registerOnSessionStatusChangeHandler:()=>Ef,requestControl:()=>wf,sendControlCommand:()=>Cf,terminateSession:()=>yf});var W={};n.r(W),n.d(W,{isSupported:()=>Of,selectAppEntity:()=>Tf});var z={};n.r(z),n.d(z,{getUserJoinedTeams:()=>Ff,isSupported:()=>kf});var q={};n.r(q),n.d(q,{getConfigSetting:()=>Nf,isSupported:()=>Df,joinedTeams:()=>z});var $={};n.r($),n.d($,{ChannelType:()=>Lf,fullTrust:()=>q,getTeamChannels:()=>Hf,isSupported:()=>Vf,refreshSiteUrl:()=>_f});var G={};n.r(G),n.d(G,{EffectChangeType:()=>Qf,EffectFailureReason:()=>Zf,VideoFrameFormat:()=>Kf,isSupported:()=>rp,notifySelectedVideoEffectChanged:()=>Yf,registerForVideoEffect:()=>ep,registerForVideoFrame:()=>Xf});var J={};n.r(J),n.d(J,{ErrorLevel:()=>Tp,frameProcessingTimeoutInMs:()=>Ip,isSupported:()=>Dp,notifyFatalError:()=>Hp,notifySelectedVideoEffectChanged:()=>Mp,registerForVideoEffect:()=>xp,registerForVideoFrame:()=>Op,updatePersonalizedEffects:()=>Np});var K={};n.r(K),n.d(K,{addAndConfigure:()=>$p,getAll:()=>Gp,isSupported:()=>Zp,reconfigure:()=>Jp,remove:()=>Qp,rename:()=>Kp});var Q={};n.r(Q),n.d(Q,{AppTypes:()=>eg,isSupported:()=>tg,tab:()=>K});var Z={};n.r(Z),n.d(Z,{isSupported:()=>dg,openAppDetail:()=>cg,openFullStore:()=>sg,openInContextStore:()=>ug,openSpecificStore:()=>lg});var X={};n.r(X),n.d(X,{callTool:()=>wg,contentSizeChanged:()=>Ag,isSupported:()=>vg,notifyIntrinsicHeight:()=>bg,openExternal:()=>Ig,registerModalCloseHandler:()=>Pg,requestDisplayMode:()=>yg,requestModal:()=>Sg,sendFollowUpMessage:()=>Cg,setWidgetState:()=>Eg});var Y={};n.r(Y),n.d(Y,{DataResidency:()=>Qg,authenticate:()=>jg,getAuthToken:()=>zg,getUser:()=>$g,notifyFailure:()=>Kg,notifySuccess:()=>Jg,registerAuthenticationHandlers:()=>Bg});var ee={};n.r(ee),n.d(ee,{isSupported:()=>Zg,registerHostMemoryMetricsHandler:()=>Xg});var te={};n.r(te),n.d(te,{isSupported:()=>Sh,openAppInstallDialog:()=>yh});var ne={};n.r(ne),n.d(ne,{CameraStartMode:()=>Ph,File:()=>kh,FileFormat:()=>Eh,ImageOutputFormats:()=>Fh,ImageUriType:()=>Rh,Media:()=>Uh,MediaControllerEvent:()=>Ih,MediaType:()=>Oh,Source:()=>Th,VideoController:()=>Hh,captureImage:()=>Mh,hasPermission:()=>xh,requestPermission:()=>Nh,scanBarCode:()=>Bh,selectMedia:()=>_h,viewImages:()=>Vh});var re={};n.r(re),n.d(re,{hasPermission:()=>nm,isSupported:()=>om,requestPermission:()=>rm,scanBarCode:()=>tm});var oe={};n.r(oe),n.d(oe,{isSupported:()=>um,openChat:()=>am,openGroupChat:()=>cm});var ie={};n.r(ie),n.d(ie,{isSupported:()=>gm,read:()=>pm,write:()=>fm});var ae={};n.r(ae),n.d(ae,{addNAATrustedOrigins:()=>Pm,canParentManageNAATrustedOrigins:()=>Sm,deleteNAATrustedOrigins:()=>Tm,getParentOrigin:()=>ym,isDeeplyNestedAuthSupported:()=>bm,isNAAChannelRecommended:()=>Cm});var se={};n.r(se),n.d(se,{chooseLocation:()=>Mm,isSupported:()=>Nm,showLocation:()=>xm});var ce={};n.r(ce),n.d(ce,{getCurrentLocation:()=>Um,hasPermission:()=>Lm,isSupported:()=>_m,map:()=>se,requestPermission:()=>Hm});var ue={};n.r(ue),n.d(ue,{isSupported:()=>$m,open:()=>qm});var le={};n.r(le),n.d(le,{getLocation:()=>Jm,isSupported:()=>Qm,showLocation:()=>Km});var de={};n.r(de),n.d(de,{setOptions:()=>Xm});var fe={};n.r(fe),n.d(fe,{CallType:()=>ov,EventActionSource:()=>av,MeetingReactionType:()=>nv,MeetingType:()=>rv,SharingProtocol:()=>iv,appShareButton:()=>de,getAppContentStageSharingCapabilities:()=>vv,getAppContentStageSharingState:()=>Cv,getAuthenticationTokenForAnonymousUser:()=>dv,getIncomingClientAudioState:()=>sv,getLiveStreamState:()=>fv,getMeetingDetails:()=>uv,getMeetingDetailsVerbose:()=>lv,joinMeeting:()=>Av,registerLiveStreamChangedHandler:()=>hv,registerMeetingReactionReceivedHandler:()=>bv,registerRaiseHandStateChangedHandler:()=>Sv,registerSpeakingStateChangeHandler:()=>yv,requestAppAudioHandling:()=>Ev,requestStartLiveStreaming:()=>pv,requestStopLiveStreaming:()=>gv,shareAppContentToStage:()=>mv,stopSharingAppContentToStage:()=>wv,toggleIncomingClientAudio:()=>cv,updateMicState:()=>Tv});var pe={};n.r(pe),n.d(pe,{isSupported:()=>Mv,openPurchaseExperience:()=>kv});var ge={};n.r(ge),n.d(ge,{composeMeeting:()=>Dv,isSupported:()=>Uv,openCalendarItem:()=>Nv});var he={};n.r(he),n.d(he,{composeMailWithHandoff:()=>Vv,isSupported:()=>Bv});var me={};n.r(me),n.d(me,{ComposeMailType:()=>Gv,composeMail:()=>qv,handoff:()=>he,isSupported:()=>$v,openMailItem:()=>zv});var ve={};n.r(ve),n.d(ve,{enablePrintCapability:()=>Kv,isSupported:()=>tw,print:()=>Qv,registerBeforeUnloadHandler:()=>Yv,registerBeforeUnloadHandlerHelper:()=>ew,registerOnLoadHandler:()=>Zv,registerOnLoadHandlerHelper:()=>Xv});var we={};n.r(we),n.d(we,{isSupported:()=>aw,selectPeople:()=>ow});var Ce={};n.r(Ce),n.d(Ce,{isSupported:()=>dw,showProfile:()=>lw});var ye={};n.r(ye),n.d(ye,{closeSearch:()=>Cw,isSupported:()=>ww,registerHandlers:()=>mw,unregisterHandlers:()=>vw});var Se={};n.r(Se),n.d(Se,{getContent:()=>bw,isSupported:()=>Aw});var be={};n.r(be),n.d(be,{SharingAPIMessages:()=>Pw,history:()=>Se,isSupported:()=>Mw,shareWebContent:()=>Tw});var Ae={};n.r(Ae),n.d(Ae,{close:()=>Nw,isSupported:()=>Dw});var Ee={};n.r(Ee),n.d(Ee,{StageViewOpenMode:()=>Lw,isSupported:()=>_w,open:()=>Hw,self:()=>Ae});var Ie={};n.r(Ie),n.d(Ie,{captureImages:()=>Ww,isSupported:()=>qw,retrieveImages:()=>zw});var Pe={};n.r(Pe),n.d(Pe,{CameraRestriction:()=>Qw,Source:()=>Zw,hasPermission:()=>Xw,image:()=>Ie,requestPermission:()=>Yw});var Te={};n.r(Te),n.d(Te,{isSupported:()=>aC,isWebStorageClearedOnUserLogOut:()=>oC});var Oe={};n.r(Oe),n.d(Oe,{CallModalities:()=>cC,isSupported:()=>lC,startCall:()=>uC});var Re={};n.r(Re),n.d(Re,{ExpectedFailureReason:()=>ko,FailedReason:()=>Fo,Messages:()=>Ro,notifyAppLoaded:()=>fC,notifyExpectedFailure:()=>hC,notifyFailure:()=>gC,notifySuccess:()=>pC});var Fe={};n.r(Fe),n.d(Fe,{getDragAndDropFiles:()=>AC,isSupported:()=>IC});var ke={};n.r(ke),n.d(ke,{getSettings:()=>ey,registerOnRemoveHandler:()=>ry,registerOnSaveHandler:()=>ny,setSettings:()=>ty,setValidityState:()=>YC});var Me={};n.r(Me),n.d(Me,{getDefaultSizeIfNotProvided:()=>dy,startTask:()=>ay,submitTask:()=>cy,updateTask:()=>sy});var xe={};n.r(xe),n.d(xe,{ContainerState:()=>gy,LiveShareHost:()=>my,UserMeetingRole:()=>py,isSupported:()=>hy});var Ne={};n.r(Ne),n.d(Ne,{CartStatus:()=>My,Intent:()=>ky,addOrUpdateCartItems:()=>Ny,cartVersion:()=>Fy,getCart:()=>xy,isSupported:()=>Ly,removeCartItems:()=>Dy,updateCartStatus:()=>Uy});var De,Ue,Le,He,_e,Ve,Be,je,We,ze,qe={};function $e(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(qe),n.d(qe,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>nS,enableShortcutRelayCapability:()=>eS,isSupported:()=>tS,resetIsShortcutRelayCapabilityEnabled:()=>Yy,setOverridableShortcutHandler:()=>Xy}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(De||(De={})),function(e){e.M365Content="m365content"}(Ue||(Ue={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Le||(Le={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(He||(He={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(_e||(_e={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Ve||(Ve={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Be||(Be={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(je||(je={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(We||(We={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(ze||(ze={}));const Ge=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.office365.us","outlook-dod.office365.us","webmail.apps.mil","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","*.outlook.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","fa000000125.officeapps.live.com","fa000000129.officeapps.live.com","fa000000124.officeapps.live.com","fa000000128.officeapps.live.com","fa000000136.mro1cdnstorage.public.cdn.office.net","fa000000136.mro1cdnstorage.public.onecdn.static.microsoft","substrate-msb-bizchatvnext-service.sdf01.substrate-msb-bingatwork.eastus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2sdf1.office-home-m365copilotapp.westus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2test1.office-home-m365copilotapp.westus2-test.cosmic-int.office.net","m365copilotapp.svc.cloud.microsoft","m365copilotapp.svc.cloud.dev.microsoft","ffc-copilot.officeapps.live.com","m365.cloud.dev.microsoft","m365.cloud.dev.microsoft:3001","portal.officeppe.com","ignite.m365.admin.cloud.microsoft","ignite.admin.cloud.microsoft","sdf.m365.admin.cloud.microsoft","admin-sdf.microsoft.com","canary.m365.admin.cloud.microsoft","ring0.m365.admin.cloud.microsoft","portal.office365.us","portal.apps.mil","www.ohome.apps.mil","www.office365.us"]}');const Je="2.0.1",Ke="2.0.2",Qe="2.0.3",Ze="2.0.4",Xe="2.0.1",Ye="1.9.0",et="2.0.0",tt="1.7.0",nt="1.8.0",rt="1.9.0",ot=n.t(Ge,2).validOrigins,it=1500,at=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),st="https",ct="teams.microsoft.com",ut="The library has not yet been initialized",lt="The runtime has not yet been initialized",dt="The runtime version is not supported",ft="The call was not properly started";var pt=n(933);const gt=mt,ht=2147483647;function mt(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 wt(e)}return vt(e,t,n)}function vt(e,t,n){if("string"==typeof e)return bt(e,t);if(ArrayBuffer.isView(e))return Rt(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(Et(e,ArrayBuffer)||e&&Et(e.buffer,ArrayBuffer))return Ft(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Et(e,SharedArrayBuffer)||e&&Et(e.buffer,SharedArrayBuffer)))return Ft(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 mt.from(r,t,n);const o=Zt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return mt.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 wt(e){return Ct(e),yt(e<0?0:0|St(e))}function Ct(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 yt(e){if(e>ht)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,mt.prototype),t}function St(e){if(e>=ht)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ht.toString(16)+" bytes");return 0|e}function bt(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!mt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|At(e,t);let r=yt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function At(e,t){if(mt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Et(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 It(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Pt(e).length;default:if(o)return r?-1:It(e).length;t=(""+t).toLowerCase(),o=!0}}function Et(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function It(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 Pt(e){return pt.toByteArray(Ot(e))}mt.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}}(),mt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),mt.from=function(e,t,n){return vt(e,t,n)},Object.setPrototypeOf(mt.prototype,Uint8Array.prototype),Object.setPrototypeOf(mt,Uint8Array),mt.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}},mt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==mt.prototype};const Tt=/[^+/0-9A-Za-z-_]/g;function Ot(e){if((e=(e=e.split("=")[0]).trim().replace(Tt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Rt(e){if(Et(e,Uint8Array)){const t=new Uint8Array(e);return Ft(t.buffer,t.byteOffset,t.byteLength)}return kt(e)}function Ft(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,mt.prototype),r}function kt(e){const t=e.length<0?0:0|St(e.length),n=yt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Mt(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 Dt(r)}function xt(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 Ut(this,t,n);case"utf8":case"utf-8":return Mt(this,t,n);case"ascii":return Lt(this,t,n);case"latin1":case"binary":return Ht(this,t,n);case"base64":return _t(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}mt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Mt(this,0,e):xt.apply(this,arguments)};const Nt=4096;function Dt(e){const t=e.length;if(t<=Nt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Nt));return n}function Ut(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+=Qt[e[r]];return o}function Lt(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 Ht(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 _t(e,t,n){return 0===t&&n===e.length?pt.fromByteArray(e):pt.fromByteArray(e.slice(t,n))}function Vt(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 Bt(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(Kt(r))return a;e[n+a]=r}return a}function jt(e,t,n,r){return Jt(It(t,e.length-n),e,n,r)}function Wt(e,t,n,r){return Jt($t(t),e,n,r)}function zt(e,t,n,r){return Jt(Pt(t),e,n,r)}function qt(e,t,n,r){return Jt(Gt(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 Gt(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 Jt(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 Kt(e){return e!=e}mt.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 Bt(this,e,t,n);case"utf8":case"utf-8":return jt(this,e,t,n);case"ascii":case"latin1":case"binary":return Wt(this,e,t,n);case"base64":return zt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Qt=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 Zt(e){if(mt.isBuffer(e)){const t=0|St(e.length),n=yt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Kt(e.length)?yt(0):kt(e):"Buffer"===e.type&&Array.isArray(e.data)?kt(e.data):void 0}const Xt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Yt;const en=new Uint8Array(16);function tn(){if(!Yt&&(Yt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Yt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yt(en)}const nn=[];for(let e=0;e<256;++e)nn.push((e+256).toString(16).slice(1));function rn(e,t=0){return nn[e[t+0]]+nn[e[t+1]]+nn[e[t+2]]+nn[e[t+3]]+"-"+nn[e[t+4]]+nn[e[t+5]]+"-"+nn[e[t+6]]+nn[e[t+7]]+"-"+nn[e[t+8]]+nn[e[t+9]]+"-"+nn[e[t+10]]+nn[e[t+11]]+nn[e[t+12]]+nn[e[t+13]]+nn[e[t+14]]+nn[e[t+15]]}const on=function(e,t,n){if(Xt.randomUUID&&!t&&!e)return Xt.randomUUID();const r=(e=e||{}).random||(e.rng||tn)();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 rn(r)},an=/^(?:[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 sn=function(e){return"string"==typeof e&&an.test(e)};var cn,un,ln,dn,fn,pn,gn,hn;!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"}(cn||(cn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(un||(un={})),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"}(ln||(ln={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(dn||(dn={})),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"}(fn||(fn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(pn||(pn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(gn||(gn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(hn||(hn={}));const mn={errorCode:He.NOT_SUPPORTED_ON_PLATFORM},vn={majorVersion:1,minorVersion:5},wn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},Cn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),yn=new Error("Invalid response: Received more images than the specified max limit in the response.");function Sn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function bn(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 An(){return on()}function En(e){return Object.keys(e).forEach(t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&En(e[t])}),Object.freeze(e)}function In(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(void 0,e)}).catch(e=>{t&&t(e)}),r}function Pn(e,t,...n){const r=e(...n);return r.then(()=>{t&&t(null)}).catch(e=>{t&&t(e)}),r}function Tn(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(null,e)}).catch(e=>{t&&t(e,null)}),r}function On(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 Rn(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 Fn(e){return!(bn(`${e.majorVersion}.${e.minorVersion}`,`${vn.majorVersion}.${vn.minorVersion}`)>=0)}function kn(e){return"https:"===e.protocol}function Mn(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=gt.from(t,"base64").toString();n(new Blob([o],{type:e}))})}function xn(e){return new Promise((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)})}function Nn(){if(Dn())throw new Error("window object undefined at SSR check");return window}function Dn(){return"undefined"==typeof window}function Un(e,t){if(_n(e)||!Vn(e)||!Bn(e))throw t||new Error("id is not valid.")}function Ln(e,t){const n=e.toString().toLocaleLowerCase();if(_n(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!kn(e))throw t||new Error("Url should be a valid https url")}function Hn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function _n(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Vn(e){return e.length<256&&e.length>4}function Bn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function jn(e){if(!e)throw new Error("id must not be empty");if(!1===sn(e))throw new Error("id must be a valid UUID")}const Wn=!!performance&&"now"in performance;function zn(){return Wn?performance.now()+performance.timeOrigin:void 0}function qn(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=>qn(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=>qn(e[n],t+1))}function $n(e){var t,n;if(!(null===(n=null===(t=e.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)||void 0===n?void 0:n.ageGroup))return e;const r=e.hostVersionsInfo.appEligibilityInformation.ageGroup;return"nonadult"!==(null==r?void 0:r.toLowerCase())?e:Object.assign(Object.assign({},e),{hostVersionsInfo:Object.assign(Object.assign({},e.hostVersionsInfo),{appEligibilityInformation:Object.assign(Object.assign({},e.hostVersionsInfo.appEligibilityInformation),{ageGroup:je.NotAdult})})})}class Gn{constructor(e=An()){this.uuid=e,jn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Jn(e){if(!(e instanceof Gn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Kn{}Kn.initializeCalled=!1,Kn.initializeCompleted=!1,Kn.additionalValidOrigins=[],Kn.initializePromise=void 0,Kn.isFramelessWindow=!1,Kn.frameContext=void 0,Kn.hostClientType=void 0,Kn.printCapabilityEnabled=!1,Kn.teamsJsInstanceId=(new Gn).toString();var Qn=n(815);const Zn=new Gn,Xn=Qn.debug.formatArgs;Qn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Zn.toString()}]`,Xn.call(this,e)};const Yn=(0,Qn.debug)("teamsJs");function er(e){return Yn.extend(e)}function tr(e,t){return`${e}_${t}`}function nr(e){return/^v\d+_[\w.]+$/.test(e)}var rr=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 or=er("runtime"),ir=4;function ar(e){return e.apiVersion===ir}const sr={apiVersion:-1,supports:{}};function cr(e){if(ar(e))return!0;throw-1===e.apiVersion?new Error(lt):new Error(dt)}let ur=sr;const lr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:wn,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:{}}}},dr=[cn.desktop,cn.web,cn.rigel,cn.surfaceHub,cn.teamsRoomsWindows,cn.teamsRoomsAndroid,cn.teamsPhones,cn.teamsDisplays],fr=[cn.android,cn.ios,cn.ipados,cn.visionOS],pr=[...dr,...fr];function gr(e){let t=e;if(t.apiVersion<ir&&hr.forEach(e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))}),ar(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const hr=[{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=rr(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})}}}],mr="2.1.2",vr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:dr}],"1.9.0":[{capability:{location:{}},hostClientTypes:pr}],"2.0.0":[{capability:{people:{}},hostClientTypes:pr},{capability:{sharing:{}},hostClientTypes:[cn.desktop,cn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[cn.android,cn.desktop,cn.ios,cn.teamsRoomsAndroid,cn.teamsPhones,cn.teamsDisplays,cn.web]},{capability:{webStorage:{}},hostClientTypes:[cn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[cn.android,cn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[cn.android,cn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[cn.android,cn.ios,cn.ipados,cn.visionOS]}],"2.1.2":[]},wr=or.extend("generateBackCompatRuntimeConfig");function Cr(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]=Cr(e[r]||{},t[r]));return n}function yr(e,t,n){wr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);wr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach(t=>{bn(e,t)>=0&&n[t].forEach(e=>{void 0!==Kn.hostClientType&&e.hostClientTypes.includes(Kn.hostClientType)&&(r=Cr(r,e.capability))})});const o={apiVersion:ir,hostVersionsInfo:wn,isLegacyTeams:!0,supports:r};return wr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Sr=or.extend("applyRuntimeConfig");function br(e){"string"==typeof e.apiVersion&&(Sr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Sr("Fast-forwarding runtime %o",e);const t=gr(e);Sr("Applying runtime %o",t),ur=En(t)}function Ar(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Er="2.51.0-beta.0",Ir={childProxyingCommunication:!1};function Pr(){Ir.childProxyingCommunication=!0}function Tr(){return Ir.childProxyingCommunication}let Or={disableEnforceOriginMatchForChildResponses:!1};function Rr(){return Or}function Fr(e){Or=e}function kr(e){return Fr(Object.assign(Object.assign({},Or),e)),Rr()}var Mr=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 xr=e=>{const{uuid:t}=e,n=Mr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Nr=e=>{const{uuidAsString:t}=e,n=Mr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Gn(t):void 0})},Dr=e=>{const{uuidAsString:t}=e,n=Mr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Gn(t):void 0})},Ur=e=>{const{uuid:t}=e,n=Mr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Lr(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 Hr=er("flushMessageQueue");function _r(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=xr(o);Hr("Flushing message %s from %s message queue via postMessage.",Lr(n),r),e.postMessage(n,t)}}}const Vr=/^[A-Za-z][A-Za-z\d+.-]*:\/\//;function Br(e,t){const n=e.split("."),r=t.split(".");if(r.length!==n.length)return!1;let o=!1;for(let e=0;e<n.length;e++)if(n[e]!==r[e]){if("*"!==n[e])return!1;if(e===n.length-1||o)return!1;o=!0}return!0}class jr{constructor(e,t,n){this.protocol=e,this.host=t,this.logger=n}static canUse(e){return Vr.test(e)}static create(e,t){const n=e.split("://");return new jr(n[0],n[1],t.extend("InternalURLPattern"))}test(e){return this.logger("Testing URL %s against pattern protocol: %s, host: %s",e,this.protocol,this.host),e.protocol===`${this.protocol}:`&&(!e.host||Br(this.host,e.host))}}function Wr(e){return jr.canUse(e)}function zr(e,t){if(jr.canUse(e))return jr.create(e,t);t("No URL verifier available for pattern: %s",e)}const qr=er("internal"),$r=qr.extend("ensureInitializeCalled"),Gr=qr.extend("ensureInitialized");function Jr(){if(!Kn.initializeCalled)throw $r(ut),new Error(ut)}function Kr(e,...t){if(!Kn.initializeCompleted)throw Gr("%s. initializeCalled: %s",ut,Kn.initializeCalled.toString()),new Error(ut);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Kn.frameContext){e=!0;break}if(!e){const e=`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Kn.frameContext}".`;throw Gr(e),new Error(e)}}return cr(e)}function Qr(e=Je){const t=bn(Kn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Zr(){return Kn.hostClientType==cn.android||Kn.hostClientType==cn.ios||Kn.hostClientType==cn.ipados||Kn.hostClientType==cn.visionOS}function Xr(e=Je){if(!Zr()){throw{errorCode:He.NOT_SUPPORTED_ON_PLATFORM}}if(!Qr(e)){throw{errorCode:He.OLD_PLATFORM}}}function Yr(e){let t=Kn.additionalValidOrigins.concat(e.filter(e=>"string"==typeof e&&Wr(e)));const n={};t=t.filter(e=>!n[e]&&(n[e]=!0,!0)),Kn.additionalValidOrigins=t}function eo(e){if(!oo(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${no}-${ro}).`)}function to(e){if(_n(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(io(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const no=4,ro=256;function oo(e){return e.length<ro&&e.length>no}function io(e){return[...e].some(e=>{const t=e.charCodeAt(0);return t<32||t>126})}function ao(e){if(!(e instanceof co))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class so{constructor(e){this.idAsString=e,to(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class co extends so{constructor(e){super(e),eo(e)}toJSON(){return{appIdAsString:this.toString()}}}function uo(e){return null==e}var lo=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 fo;const po="v1",go=er("messageChannels.telemetry");function ho(){return lo(this,void 0,void 0,function*(){if(fo)return go("Returning telemetry port from cache"),fo;if(!mo())throw mn;return fo=yield Tc(tr(po,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),fo})}function mo(){var e;return!(!Kr(ur)||!(null===(e=ur.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function vo(){fo=void 0}var wo=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 Co;const yo="v1",So=er("messageChannels.dataLayer");function bo(){return wo(this,void 0,void 0,function*(){if(Co)return So("Returning dataLayer port from cache"),Co;if(!Ao())throw mn;return Co=yield Tc(tr(yo,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),Co})}function Ao(){var e;return!(!Kr(ur)||!(null===(e=ur.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Eo(){Co=void 0}function Io(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Kr(ur),zs(e)}function Po(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Kr(ur),qs(e)}const To="v2",Oo=er("app"),Ro={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Fo,ko;function Mo(){return Kn.initializeCompleted}function xo(){return Kn.frameContext}function No(e){return ra(tr(To,"app.initialize"),e)}function Do(e){hc.currentWindow=e}function Uo(){Kn.initializeCalled&&(Ps(),Kn.initializeCalled=!1,Kn.initializeCompleted=!1,Kn.initializePromise=void 0,Kn.additionalValidOrigins=[],Kn.frameContext=void 0,Kn.hostClientType=void 0,Kn.isFramelessWindow=!1,vo(),Eo(),wc())}function Lo(){return new Promise(e=>{Jr(),e(Cc(tr(To,"app.getContext"),"getContext"))}).then(e=>$o(e))}function Ho(){Jr(),oa(tr(To,"app.notifyAppLoaded"))}function _o(){return sa(tr(To,"app.notifySuccess"))}function Vo(e){Jr(),aa(tr(To,"app.notifyFailure"),e)}function Bo(e){Jr(),ia(tr(To,"app.notifyExpectedFailure"),e)}function jo(e){fa(tr(To,"app.registerOnThemeChangeHandler"),e)}function Wo(e){pa(tr(To,"app.registerOnContextChangeHandler"),e)}function zo(e){Ls(e)}function qo(e){return ga(tr(To,"app.openLink"),e)}function $o(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,messageId:e.messageId,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:un.teams,clientType:e.hostClientType?e.hostClientType:cn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId,ancestors:e.hostAncestors},appLaunchId:e.appLaunchId,appId:e.appId?new co(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Kn.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 Go(e){ci(tr(ai,"dialog.update.resize"),e)}function Jo(){return!(!Kr(ur)||!ur.supports.dialog)&&!!ur.supports.dialog.update}function Ko(e,t,n){li(tr(ai,"dialog.url.bot.open"),e,t,n)}function Qo(){return Kr(ur)&&void 0!==(ur.supports.dialog&&ur.supports.dialog.url&&ur.supports.dialog.url.bot)}function Zo(e){if(Kr(ur,ln.task),!ei())throw mn;Fc(tr(ai,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Xo(e){if(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),!ei())throw mn;Fc(tr(ai,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Yo(e){if(Kr(ur,ln.task),!ei())throw mn;for(Fs("messageForChild"),Rs(tr(ai,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),gi.reverse();gi.length>0;){e(gi.pop())}}function ei(){var e,t;return Kr(ur)&&!!(null===(t=null===(e=ur.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function ti(e,t,n){ui(tr(ai,"dialog.url.open"),e,t,n)}function ni(e,t){di(tr(ai,"dialog.url.submit"),e,t)}function ri(){return Kr(ur)&&void 0!==(ur.supports.dialog&&ur.supports.dialog.url)}function oi(e){return{url:e.url,height:e.size?e.size.height:gn.Small,width:e.size?e.size.width:gn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function ii(e){const t=oi(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Fo||(Fo={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(ko||(ko={})),Oo("teamsjs instance is version %s, starting at %s UTC (%s local)",Er,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(Dn())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?Oo("teamsjs is being used from %s. %s",t,n):Oo("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const ai="v2",si="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 ci(e,t){if(Kr(ur,ln.content,ln.sidePanel,ln.task,ln.meetingStage),!Jo())throw mn;Fc(e,"tasks.updateTask",[t])}function ui(e,t,n,r){if(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),!ri())throw mn;r&&Rs(tr(ai,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Fc(e,"tasks.startTask",[oi(t)],(e,t)=>{null==n||n({err:e,result:t}),Fs("messageForParent")})}function li(e,t,n,r){if(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),!Qo())throw mn;r&&Rs(tr(ai,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Fc(e,"tasks.startTask",[ii(t)],(e,t)=>{null==n||n({err:e,result:t}),Fs("messageForParent")})}function di(e,t,n){if(Kr(ur,ln.content,ln.task),!ri())throw mn;Kn.frameContext===ln.content&&console.warn(si),Fc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function fi(e){return{card:e.card,height:e.size?e.size.height:gn.Small,width:e.size?e.size.width:gn.Small,title:e.title}}function pi(e){const t=fi(e);return t.completionBotId=e.completionBotId,t}const gi=[];function hi(e){Kn.frameContext&&(Kn.frameContext===ln.task?gi.push(e):Fs("messageForChild"))}function mi(e,t){if(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),!vi())throw mn;const n=pi(e);Fc(tr(ai,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function vi(){const e=ur.hostVersionsInfo&&ur.hostVersionsInfo.adaptiveCardSchemaVersion&&!Fn(ur.hostVersionsInfo.adaptiveCardSchemaVersion);return Kr(ur)&&void 0!==(e&&ur.supports.dialog&&ur.supports.dialog.card&&ur.supports.dialog.card.bot)}function wi(e,t){if(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),!Ci())throw mn;const n=fi(e);Fc(tr(ai,"dialog.adaptiveCard.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function Ci(){const e=ur.hostVersionsInfo&&ur.hostVersionsInfo.adaptiveCardSchemaVersion&&!Fn(ur.hostVersionsInfo.adaptiveCardSchemaVersion);return Kr(ur)&&void 0!==(e&&ur.supports.dialog&&ur.supports.dialog.card)}function yi(){Rs(tr(ai,"dialog.registerMessageForChildHandler"),"messageForChild",hi,!1)}function Si(){return!(!Kr(ur)||!ur.supports.dialog)}const bi="v2";var Ai,Ei;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(Ai||(Ai={}));class Ii{constructor(){this.enabled=!0,this.selected=!1}}let Pi,Ti,Oi,Ri,Fi;function ki(){Rs(tr(bi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Di,!1),Rs(tr(bi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Li,!1),Rs(tr(bi,"menus.registerSetModuleViewHandler"),"setModuleView",xi,!1)}function Mi(e,t){if(Kr(ur),!Hi())throw mn;Oi=t,Fc(tr(bi,"menus.setUpViews"),"setUpViews",[e])}function xi(e){Oi&&Oi(e)||(Kr(ur),Fc(tr(bi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Ni(e,t){if(Kr(ur),!Hi())throw mn;Pi=t,Fc(tr(bi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Di(e){Pi&&Pi(e)||(Kr(ur),Fc(tr(bi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Ui(e,t){if(Kr(ur),!Hi())throw mn;Ti=t,Fc(tr(bi,"menus.showActionMenu"),"showActionMenu",[e])}function Li(e){Ti&&Ti(e)||(Kr(ur),Fc(tr(bi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Hi(){return!(!Kr(ur)||!ur.supports.menus)}function _i(){Rs(tr(rs,"pages.config.registerSettingsSaveHandler"),"settings.save",$i,!1),Rs(tr(rs,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Ki,!1)}function Vi(e){return fs(tr(rs,"pages.config.setValidityState"),e)}function Bi(e){return gs(tr(rs,"pages.config.setConfig"),e)}function ji(e){Wi(tr(rs,"pages.config.registerOnSaveHandler"),e,()=>{if(!uo(e)&&!Zi())throw mn})}function Wi(e,t,n){!uo(t)&&Kr(ur,ln.settings),n&&n(),Ri=t,!uo(t)&&Fc(e,"registerHandler",["save"])}function zi(e){qi(tr(rs,"pages.config.registerOnRemoveHandler"),e,()=>{if(!uo(e)&&!Zi())throw mn})}function qi(e,t,n){!uo(t)&&Kr(ur,ln.remove,ln.settings),n&&n(),Fi=t,!uo(t)&&Fc(e,"registerHandler",["remove"])}function $i(e){const t=new Ji(e);Ri?Ri(t):Qs()?rc("settings.save",[e]):t.notifySuccess()}function Gi(e){Ms(tr(rs,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[ln.content],()=>{if(!Zi())throw mn})}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(Ei||(Ei={}));class Ji{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Fc(tr(rs,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Fc(tr(rs,"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 Ki(){const e=new Qi;Fi?Fi(e):Qs()?rc("settings.remove",[]):e.notifySuccess()}class Qi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Fc(tr(rs,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Fc(tr(rs,"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 Zi(){return!(!Kr(ur)||!ur.supports.pages)&&!!ur.supports.pages.config}class Xi{}class Yi extends Xi{validate(e){return!0}deserialize(e){return e}}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())})};const ta=6e4,na=er("app");function ra(e,t){if(Dn()){return na.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return On(()=>da(e,t),ta,new Error("SDK initialization timed out."))}function oa(e){Fc(e,Ro.AppLoaded,[Er])}function ia(e,t){Fc(e,Ro.ExpectedFailure,[t.reason,t.message])}function aa(e,t){Fc(e,Ro.Failure,[t.reason,t.message,t.authHeader])}function sa(e){return ea(this,void 0,void 0,function*(){if(Kn.initializeCompleted)return ua(e);if(!Kn.initializePromise)throw new Error(ut);return Kn.initializePromise.then(()=>ua(e))})}function ca(){var e;return Kr(ur)&&!!(null===(e=ur.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ua(e){return ea(this,void 0,void 0,function*(){return ca()?Ic(Ro.Success,[Er],new Yi,e).then(()=>({hasFinishedSuccessfully:!0})):(Fc(e,Ro.Success,[Er]),{hasFinishedSuccessfully:"unknown"})})}const la=na.extend("initializeHelper");function da(e,t){return new Promise(n=>{Kn.initializeCalled||(Kn.initializeCalled=!0,Is(),Kn.initializePromise=vc(t,e).then(({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Je})=>{Kn.frameContext=e,Kn.hostClientType=t,Kn.clientSupportedSDKVersion=r;try{la("Parsing %s",n);let e=JSON.parse(n);if(la("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=$n(e),n&&br(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{la("Attempting to parse %s as an SDK version",n),isNaN(bn(n,Je))||(Kn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(la("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");e=$n(e),br(e)}catch(e){if(!(e instanceof SyntaxError))throw e;br(yr(Kn.clientSupportedSDKVersion,lr,vr))}}Kn.initializeCompleted=!0}),ki(),_i(),yi()),Array.isArray(t)&&Yr(t),void 0!==Kn.initializePromise?n(Kn.initializePromise):la("GlobalVars.initializePromise is unexpectedly undefined")})}function fa(e,t){!uo(t)&&Jr(),xs(e,t)}function pa(e,t){!uo(t)&&Jr(),Ns(e,t)}function ga(e,t){return new Promise(n=>{Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),n(yc(e,"executeDeepLink",t))})}var ha=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 ma=[];const va=er("validateOrigin");let wa;function Ca(){return ha(this,void 0,void 0,function*(){wa||(yield Sa())})}function ya(){return 0===ma.length}function Sa(e=!1){return ha(this,void 0,void 0,function*(){if(!ya()&&!e)return ma;if(wa)return wa;if(Dn())return ma=ot,ot;{va("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout(()=>e.abort(),it);return wa=fetch(at,{signal:e.signal}).then(e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return va("Fetch call completed and retrieved valid origins list from CDN"),e.json().then(e=>{if(ba(JSON.stringify(e)))return ma=e.validOrigins,ma;throw new Error("Valid origins list retrieved from CDN is invalid")})}).catch(e=>("AbortError"===e.name?va(`validOrigins fetch call to CDN failed due to Timeout of ${it} ms. Defaulting to fallback list`):va("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),ma=ot,ma)),wa}})}function ba(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 va("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function Aa(e,t){let n;try{const t=zr(e,va);if(!t)return!1;n=t}catch(e){return!1}return n.test(t)}function Ea(e,t){const n=t||ya()?ot:ma;return Ia(e,n)?Promise.resolve(!0):(va("Origin %s is not in the local valid origins list, fetching from CDN",e),Sa(t).then(t=>Ia(e,t)))}function Ia(e,t){for(const t of Kn.additionalValidOrigins)if(Aa(t,e))return!0;const n=e.host;return kn(e)?!!t.some(e=>Br(e,n))||(va("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,Kn.additionalValidOrigins),!1):(va("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1)}function Pa(e){Ms(tr(rs,"pages.appButton.onClick"),"appButtonClick",e,[ln.content],()=>{if(!Ra())throw mn})}function Ta(e){Ms(tr(rs,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[ln.content],()=>{if(!Ra())throw mn})}function Oa(e){Ms(tr(rs,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[ln.content],()=>{if(!Ra())throw mn})}function Ra(){return!(!Kr(ur)||!ur.supports.pages)&&!!ur.supports.pages.appButton}function Fa(){ys()}function ka(){return is(tr(rs,"pages.backStack.navigateBack"))}function Ma(e){xa(tr(rs,"pages.backStack.registerBackButtonHandler"),e,()=>{if(!uo(e)&&!Na())throw mn})}function xa(e,t,n){!uo(t)&&Kr(ur),n&&n(),Cs(t),!uo(t)&&Fc(e,"registerHandler",["backButton"])}function Na(){return!(!Kr(ur)||!ur.supports.pages)&&!!ur.supports.pages.backStack}function Da(e){return new Promise(t=>{if(Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),!La())throw mn;t(bc(tr(rs,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))})}function Ua(){return new Promise(e=>{if(Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),!La())throw mn;e(bc(tr(rs,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))})}function La(){return!(!Kr(ur)||!ur.supports.pages)&&!!ur.supports.pages.currentApp}function Ha(){if(Kr(ur,ln.content),!Va())throw mn;Fc(tr(rs,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function _a(){if(Kr(ur,ln.content),!Va())throw mn;Fc(tr(rs,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Va(){return!(!Kr(ur)||!ur.supports.pages)&&!!ur.supports.pages.fullTrust}function Ba(e){return as(tr(rs,"pages.tabs.navigateToTab"),e)}function ja(e){return cs(tr(rs,"pages.tabs.getTabInstances"),e)}function Wa(e){return us(tr(rs,"pages.tabs.getMruTabInstances"),e)}function za(){return!(!Kr(ur)||!ur.supports.pages)&&!!ur.supports.pages.tabs}var qa,$a;function Ga(e){const t=tr(rs,"pages.returnFocus");if(Kr(ur),!ns())throw mn;if(void 0===e&&Fc(t,"returnFocus",[!1]),"boolean"==typeof e)Fc(t,"returnFocus",[e]);else switch(e){case $a.PreviousLandmark:case $a.GoToActivityFeed:Fc(t,"returnFocus",[!1,e]);break;case $a.NextLandmark:Fc(t,"returnFocus",[!0,e])}}function Ja(e){Ms(tr(rs,"pages.registerFocusEnterHandler"),"focusEnter",e,[],()=>{if(!ns())throw mn})}function Ka(e){ds(tr(rs,"pages.setCurrentFrame"),e)}function Qa(e,t,n){Ca(),ra(tr(rs,"pages.initializeWithFrameContext"),n).then(()=>t&&t()),Ka(e)}function Za(){return ps(tr(rs,"pages.getConfig."))}function Xa(e){return os(tr(rs,"pages.navigateCrossDomain"),e)}function Ya(e){return new Promise(t=>{if(Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),!ns())throw mn;const n=tr(rs,"pages.navigateToApp");if(ur.isLegacyTeams){t(yc(n,"executeDeepLink",Rn(hs(e)?e:ms(e))))}else{t(yc(n,"pages.navigateToApp",hs(e)?vs(e):e))}})}function es(e){return ls(tr(rs,"pages.shareDeepLink"),e)}function ts(e){Ms(tr(rs,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],()=>{if(!uo(e)&&!ns())throw mn})}function ns(){return!(!Kr(ur)||!ur.supports.pages)}Ca(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(qa||(qa={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}($a||($a={}));const rs="v2";function os(e,t){return new Promise(n=>{if(Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.remove,ln.task,ln.stage,ln.meetingStage),!ns())throw mn;n(Sc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))})}function is(e){return new Promise(t=>{if(Kr(ur),!Na())throw mn;t(Sc(e,"navigateBack","Back navigation is not supported in the current client or context."))})}function as(e,t){return new Promise(n=>{if(Kr(ur),!za())throw mn;n(Sc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))})}function ss(e,t){if(Kr(ur),!ns())throw mn;Fc(e,"returnFocus",[t])}function cs(e,t){return new Promise(n=>{if(Kr(ur),!za())throw mn;n(Cc(e,"getTabInstances",t))})}function us(e,t){return new Promise(n=>{if(Kr(ur),!za())throw mn;n(Cc(e,"getMruTabInstances",t))})}function ls(e,t){if(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),!ns())throw mn;Fc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ds(e,t){if(Kr(ur,ln.content),!ns())throw mn;Fc(e,"setFrameContext",[t])}function fs(e,t){if(Kr(ur,ln.settings,ln.remove),!Zi())throw mn;Fc(e,"settings.setValidityState",[t])}function ps(e){return new Promise(t=>{if(Kr(ur,ln.content,ln.settings,ln.remove,ln.sidePanel),!ns())throw mn;t(Cc(e,"settings.getSettings"))})}function gs(e,t){return new Promise(n=>{if(Kr(ur,ln.content,ln.settings,ln.sidePanel),!Zi())throw mn;n(yc(e,"settings.setSettings",t))})}function hs(e){return e.appId instanceof co}function ms(e){return Object.assign(Object.assign({},e),{appId:new co(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function vs(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let ws;function Cs(e){ws=e}function ys(){Rs(tr(rs,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Ss,!1)}function Ss(){ws&&ws()||(Qs()?rc("backButtonPress",[]):ka())}var bs=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=er("handlers");class Es{static initializeHandlers(){Es.handlers.themeChange=Ds,Es.handlers.contextChange=Us,Es.handlers.load=Vs,Es.handlers.beforeUnload=Ws,ys()}static uninitializeHandlers(){Es.handlers={},Es.themeChangeHandler=null,Es.beforeUnloadHandler=null,Es.beforeSuspendOrTerminateHandler=null,Es.resumeHandler=null,Es.contextChangeHandler=null}}function Is(){Es.initializeHandlers()}function Ps(){Es.uninitializeHandlers()}Es.handlers={},Es.themeChangeHandler=null,Es.loadHandler=null,Es.beforeUnloadHandler=null,Es.beforeSuspendOrTerminateHandler=null,Es.resumeHandler=null,Es.hostToAppPerformanceMetricsHandler=null,Es.contextChangeHandler=null;const Ts=As.extend("callHandler");function Os(e,t){const n=Es.handlers[e];if(n){Ts("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Qs()?(rc(e,t),[!1,void 0]):(Ts("Handler for action message %s not found.",e),[!1,void 0])}function Rs(e,t,n,r=!0,o=[]){n?(Es.handlers[t]=n,r&&Fc(e,"registerHandler",[t,...o])):delete Es.handlers[t]}function Fs(e){delete Es.handlers[e]}function ks(e){return null!=Es.handlers[e]}function Ms(e,t,n,r,o){n&&Kr(ur,...r),o&&o(),Rs(e,t,n)}function xs(e,t){Es.themeChangeHandler=t,!uo(t)&&Fc(e,"registerHandler",["themeChange"])}function Ns(e,t){Es.contextChangeHandler=t,!uo(t)&&Fc(e,"registerHandler",["contextChange"])}function Ds(e){Es.themeChangeHandler&&Es.themeChangeHandler(e),Qs()&&rc("themeChange",[e])}function Us(e){Es.contextChangeHandler&&Es.contextChangeHandler(e),Qs()&&rc("contextChange",[e])}function Ls(e){Es.hostToAppPerformanceMetricsHandler=e}function Hs(e){Es.hostToAppPerformanceMetricsHandler&&Es.hostToAppPerformanceMetricsHandler(e)}function _s(e,t){Es.loadHandler=t,!uo(t)&&Fc(e,"registerHandler",["load"])}function Vs(e){const t=Bs(e);Es.resumeHandler?(Es.resumeHandler(t),Qs()&&rc("load",[t])):Es.loadHandler&&(Es.loadHandler(e),Qs()&&rc("load",[e]))}function Bs(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function js(e,t){Es.beforeUnloadHandler=t,!uo(t)&&Fc(e,"registerHandler",["beforeUnload"])}function Ws(){return bs(this,void 0,void 0,function*(){const e=()=>{Fc(tr("v2","handleBeforeUnload"),"readyToUnload",[])};Es.beforeSuspendOrTerminateHandler?(yield Es.beforeSuspendOrTerminateHandler(),Qs()?rc("beforeUnload"):e()):Es.beforeUnloadHandler&&Es.beforeUnloadHandler(e)||(Qs()?rc("beforeUnload"):e())})}function zs(e){Es.beforeSuspendOrTerminateHandler=e,!uo(e)&&Fc(tr("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function qs(e){Es.resumeHandler=e,!uo(e)&&Fc(tr("v2","registerOnResumeHandler"),"registerHandler",["load"])}var $s=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 Gs=er("childProxyingCommunication");class Js{}function Ks(){Js.window=null,Js.origin=null,Js.messageQueue=[]}function Qs(){return!!Tr()&&!!Js.window}function Zs(e,t){return!!Tr()&&(Js.window&&!Js.window.closed&&e!==Js.window||(Js.window=e,Js.origin=t),Js.window&&Js.window.closed?(Js.window=null,Js.origin=null,!1):Js.window===e)}function Xs(e,t,n,r){return $s(this,void 0,void 0,function*(){Js.window===t&&(_r(Js.window,Js.origin,Js.messageQueue,"child"),ec(e,n,r))})}Js.messageQueue=[];const Ys=Gs.extend("handleIncomingMessageFromChild");function ec(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Nr(e.data),[o,i]=Os(r.func,r.args);if(o&&void 0!==i)return Ys("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Lr(r),r.func),void nc(r.id,r.uuid,Array.isArray(i)?i:[i]);Ys("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Lr(r),r.func),tc(r,t,n)}function tc(e,t,n){const r=t(tr("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Js.origin;n(r.uuid,(...t)=>{if(!Js.window)return;if(!Rr().disableEnforceOriginMatchForChildResponses&&o!==Js.origin)return void Ys("Origin of child window has changed, not sending response back to child window");const n=t.pop();Ys("Message from parent being relayed to child, id: %s",Lr(e)),nc(e.id,e.uuid,t,n)})}function nc(e,t,n,r){const o=Js.window,i=oc(e,t,n,r),a=Ur(i),s=Js.origin;o&&s&&(Ys("Sending message %s to %s via postMessage, args = %o",Lr(a),"child",a.args),o.postMessage(a,s))}function rc(e,t){const n=Js.window,r=ic(e,t),o=Js.origin;n&&o?n.postMessage(r,o):Js.messageQueue.push(r)}function oc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function ic(e,t){return{func:e,args:t||[]}}class ac{static storeCallbackInformation(e,t){ac.callbackInformation.set(e,t)}static clearMessages(){ac.callbackInformation.clear()}static deleteMessageInformation(e){ac.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Hs({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=ac.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Hs({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),ac.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}ac.callbackInformation=new Map;const sc=er("nestedAppAuthUtils"),cc=sc.extend("tryPolyfillWithNestedAppAuthBridge"),uc="v2";function lc(e,t,n){var r;const o=cc;if(Kn.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=fc(a,n);s&&(a.nestedAppAuthBridge=s)}const dc=sc.extend("createNestedAppAuthBridge");function fc(e,t){const n=dc;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=tr(uc,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var pc=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 gc=er("communication");class hc{}class mc{}function vc(e,t){if(mc.messageListener=e=>Hc(e),hc.currentWindow=hc.currentWindow||Nn(),hc.parentWindow=hc.currentWindow.parent!==hc.currentWindow.self?hc.currentWindow.parent:hc.currentWindow.opener,hc.topWindow=hc.currentWindow.top,(hc.parentWindow||e)&&hc.currentWindow.addEventListener("message",mc.messageListener,!1),!hc.parentWindow){const e=hc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Kn.isFramelessWindow=!0,e.onNativeMessage=Jc}try{return hc.parentOrigin="*",Ac(t,"initialize",[Er,ir,e]).then(([e,t,n,r])=>(lc(r,hc.currentWindow,{onMessage:Vc,sendPostMessage:Mc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r}))}finally{hc.parentOrigin=null}}function wc(){hc.currentWindow&&hc.currentWindow.removeEventListener("message",mc.messageListener,!1),hc.currentWindow=null,hc.parentWindow=null,hc.parentOrigin=null,mc.parentMessageQueue=[],mc.nextMessageId=0,mc.callbacks.clear(),mc.promiseCallbacks.clear(),mc.portCallbacks.clear(),mc.legacyMessageIdsToUuidMap={},ac.clearMessages(),Ks()}function Cc(e,t,...n){return Ac(e,t,n).then(([e])=>e)}function yc(e,t,...n){return Ac(e,t,n).then(([e,t])=>{if(!e)throw new Error(t)})}function Sc(e,t,n,...r){return Ac(e,t,r).then(([e,t])=>{if(!e)throw new Error(t||n)})}function bc(e,t,...n){return Ac(e,t,n).then(([e,t])=>{if(e)throw e;return t})}function Ac(e,t,n=void 0){if(!nr(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(Rc(Uc(e,t,n).uuid))})}function Ec(e){return e.map(e=>Ar(e)?e.serialize():e)}function Ic(e,t,n,r,o){var i;return pc(this,void 0,void 0,function*(){const a=Ec(t),[s]=yield Ac(r,e,a);if(o&&o(s)||!o&&$e(s))throw new Error(`${s.errorCode}, message: ${null!==(i=s.message)&&void 0!==i?i:"None"}`);if(n.validate(s))return n.deserialize(s);throw new Error(`${He.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)})}function Pc(e,t,n,r){var o;return pc(this,void 0,void 0,function*(){const i=Ec(t),[a]=yield Ac(n,e,i);if(r&&r(a)||!r&&$e(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${He.INTERNAL_ERROR}, message: Invalid response from host`)})}function Tc(e,t,n=void 0){if(!nr(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 Oc(Uc(e,t,n).uuid)}function Oc(e){return new Promise((t,n)=>{mc.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 Rc(e){return new Promise(t=>{mc.promiseCallbacks.set(e,t)})}function Fc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!nr(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=Uc(e,t,o);r&&mc.callbacks.set(i.uuid,r)}mc.parentMessageQueue=[],mc.topMessageQueue=[],mc.nextMessageId=0,mc.callbacks=new Map,mc.promiseCallbacks=new Map,mc.portCallbacks=new Map,mc.legacyMessageIdsToUuidMap={};const kc=gc.extend("sendNestedAuthRequestToTopWindow");function Mc(e,t){const n=kc,r=hc.topWindow,o=nu(e,t);return n("Message %s information: %o",Lr(o),{actionName:o.func}),Nc(r,o)}const xc=gc.extend("sendRequestToTargetWindowHelper");function Nc(e,t){const n=xc,r=Yc(e),o=xr(t);if(Kn.isFramelessWindow)hc.currentWindow&&hc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Lr(o),r),hc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Xc(e);e&&i?(n("Sending message %s to %s via postMessage",Lr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Lr(o),r),Zc(e).push(t))}return t}const Dc=gc.extend("sendMessageToParentHelper");function Uc(e,t,n,r,o){const i=Dc,a=hc.parentWindow,s=tu(e,t,n,r,o);return ac.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Lr(s),{actionName:t,args:n}),Nc(a,s)}const Lc=gc.extend("processIncomingMessage");function Hc(e){return pc(this,void 0,void 0,function*(){if(!e||!e.data||"object"!=typeof e.data)return void Lc("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 jc(t,n).then(r=>{r?(Wc(t,n),t!==hc.parentWindow?Zs(t,n)&&Xs(e,t,Uc,(e,t)=>mc.callbacks.set(e,t)):Jc(e)):Lc("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 _c=gc.extend("processAuthBridgeMessage");function Vc(e,t){var n,r;const o=_c;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?jc(c,u)?(hc.topWindow&&!hc.topWindow.closed&&c!==hc.topWindow||(hc.topWindow=c,hc.topOrigin=u),hc.topWindow&&hc.topWindow.closed&&(hc.topWindow=null,hc.topOrigin=null),_r(hc.topWindow,hc.topOrigin,mc.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 Bc=gc.extend("shouldProcessIncomingMessage");function jc(e,t){return pc(this,void 0,void 0,function*(){if(hc.currentWindow&&e===hc.currentWindow)return Bc("Should not process message because it is coming from the current window"),!1;if(hc.currentWindow&&hc.currentWindow.location&&t&&t===hc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Bc("Message has an invalid origin of %s",t),!1}const n=yield Ea(e);return n||Bc("Message has an invalid origin of %s",t),n}})}function Wc(e,t){Kn.isFramelessWindow||hc.parentWindow&&!hc.parentWindow.closed&&e!==hc.parentWindow||(hc.parentWindow=e,hc.parentOrigin=t),hc.parentWindow&&hc.parentWindow.closed&&(hc.parentWindow=null,hc.parentOrigin=null),_r(hc.parentWindow,hc.parentOrigin,mc.parentMessageQueue,"parent")}const zc=gc.extend("handleIncomingMessageFromParent");function qc(e){const t=zc;if(!e.uuid)return mc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=$c(mc.callbacks,t);if(n)return n;const r=$c(mc.promiseCallbacks,t);if(r)return r;const o=$c(mc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Lr(e))}function $c(e,t){if(t){const n=[...e].find(([e,n])=>e.toString()===t.toString());if(n)return n[0]}}function Gc(e,t){const n=$c(t,e.uuid);n&&t.delete(n),e.uuid?mc.legacyMessageIdsToUuidMap={}:delete mc.legacyMessageIdsToUuidMap[e.id]}function Jc(e){const t=zc,n=zn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Dr(r),i=qc(o);if(i){const r=mc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),ac.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]),Kc(e)||(t("Removing registered callback for message %s",i.toString()),Gc(o,mc.callbacks)));const a=mc.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()),Gc(o,mc.promiseCallbacks));const s=mc.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()),Gc(o,mc.portCallbacks)}o.uuid&&(mc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;ac.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Lr(r),r.func),Os(r.func,r.args)}else t("Received an unknown message: %O",e)}function Kc(e){return!0===e.data.isPartialResponse}function Qc(){return hc.topWindow!==hc.parentWindow}function Zc(e){return e===hc.topWindow&&Qc()?mc.topMessageQueue:e===hc.parentWindow?mc.parentMessageQueue:[]}function Xc(e){return e===hc.topWindow&&Qc()?hc.topOrigin:e===hc.parentWindow?hc.parentOrigin:null}function Yc(e){return e===hc.topWindow&&Qc()?"top":e===hc.parentWindow?"parent":null}function eu(e,t){let n;n=hc.currentWindow.setInterval(()=>{0===Zc(e).length&&(clearInterval(n),t())},100)}function tu(e,t,n,r,o){const i=mc.nextMessageId++,a=new Gn;mc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Kn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:zn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function nu(e,t){const n=mc.nextMessageId++,r=new Gn;return mc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:zn(),apiVersionTag:t,args:[],data:e}}const ru="v1";function ou(e){if(!uo(e)&&Kr(ur),!uo(e)&&!iu())throw mn;e?Rs(tr(ru,"log.request"),"log.request",()=>{const t=e();Fc(tr(ru,"log.receive"),"log.receive",[t])}):Fs("log.request")}function iu(){return!(!Kr(ur)||!ur.supports.logs)}var au,su,cu;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(au||(au={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(su||(su={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(cu||(cu={}));const uu="v1";function lu(e,t){Kr(ur),Fc(tr(uu,"uploadCustomApp"),"uploadCustomApp",[e],t||Sn())}function du(e,t,n){Kr(ur),Fc(tr(uu,"sendCustomMessage"),e,t,n)}function fu(e,t){if(Kr(ur),!Qs())throw new Error("The child window has not yet been initialized or is not present");rc(e,t)}function pu(e,t){Kr(ur),Rs(tr(uu,"registerCustomHandler"),e,(...e)=>t.apply(this,e))}function gu(e,t){Kr(ur),Rs(tr(uu,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function hu(e){Kr(ur,ln.content,ln.sidePanel,ln.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,e.messageId,e.callerInfo,e.atpData];Fc(tr(uu,"openFilePreview"),"openFilePreview",t)}const mu="v1";function vu(e){return new Promise(t=>{if(Kr(ur,ln.content),!yu())throw mn;const n=yc(tr(mu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Rs(tr(mu,"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&&Rs(tr(mu,"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 wu(){if(Kr(ur,ln.content),!yu())throw mn;Fc(tr(mu,"conversations.closeConversation"),"conversations.closeConversation"),Fs("startConversation"),Fs("closeConversation")}function Cu(){return new Promise(e=>{if(Kr(ur),!yu())throw mn;e(Cc(tr(mu,"conversations.getChatMember"),"getChatMembers"))})}function yu(){return!(!Kr(ur)||!ur.supports.conversations)}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 bu="v2",Au=er("copilot");function Eu(){var e;return Kr(ur)&&!!(null===(e=ur.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function Iu(e,t){var n;return void 0===t&&(t=null!==(n=zn())&&void 0!==n?n:Date.now()),Su(this,void 0,void 0,function*(){return Kr(ur),Au("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),Pc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],tr(bu,"copilot.customTelemetry.sendCustomTelemetryData"))})}var Pu=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 Tu="v2",Ou=er("copilot");function Ru(){var e,t;return Kr(ur)&&(!!(null===(e=ur.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=ur.supports.copilot)||void 0===t?void 0:t.eligibility))}function Fu(e){var t,n,r;return Pu(this,void 0,void 0,function*(){if(Kr(ur),!Ru())throw new Error(`Error code: ${mn.errorCode}, message: Not supported on platform`);if((null===(t=ur.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return Ou("Eligibility information is already available on runtime."),ur.hostVersionsInfo.appEligibilityInformation;Ou("Eligibility information is not available on runtime. Requesting from host.");const o=yield Cc(tr(Tu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if($e(o))throw new Error(`Error code: ${o.errorCode}, message: ${null!==(n=o.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!ku(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=je.NotAdult),o})}function ku(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)}var Mu,xu,Nu,Du,Uu,Lu,Hu,_u,Vu;!function(e){e.EMAIL="email",e.TEXT="text",e.MEDIA="media",e.CALENDAR_INVITE="calendarInvite",e.WEB_PAGE="webPage",e.MIXED="mixed",e.TEAMS="teams",e.FILE="file"}(Mu||(Mu={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(xu||(xu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(Nu||(Nu={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(Du||(Du={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(Uu||(Uu={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Lu||(Lu={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Hu||(Hu={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(_u||(_u={})),function(e){e.ConsentNotAccepted="consent_not_accepted",e.PageContentBlockedPolicy="page_content_blocked_policy",e.PageContentBlockedDlp="page_content_blocked_dlp",e.PageContentTypeNotSupportedYet="page_content_type_not_supported_yet",e.PageContentSizeNotSupported="page_content_size_not_supported",e.PageContextChanged="page_context_changed",e.PageContentExtractionFailed="page_content_extraction_failed",e.PageContentSizeNotSupportedPDF="page_content_size_not_supported_pdf",e.NotSupportedOnPlatform="not_supported_on_platform",e.OtherError="other_error"}(Vu||(Vu={}));class Bu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var ju=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 Wu="v2";function zu(){var e;return Kr(ur)&&!!(null===(e=ur.supports.copilot)||void 0===e?void 0:e.sidePanel)}function qu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Vu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||$e(e)}function $u(e){return ju(this,void 0,void 0,function*(){Kr(ur);return Ic("copilot.sidePanel.getContent",e?[new Xu(e)]:[],new Qu,tr(Wu,"copilot.sidePanel.getContent"),qu)})}function Gu(e){return ju(this,void 0,void 0,function*(){Kr(ur);return Ic("copilot.sidePanel.preCheckUserConsent",e?[new Yu(e)]:[],new Zu,tr(Wu,"copilot.sidePanel.preCheckUserConsent"),qu)})}function Ju(e){Ms(tr(Wu,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[ln.content],()=>{if(!zu())throw Ku})}const Ku=new Bu(Vu.NotSupportedOnPlatform,"This API is not supported on the current platform.");class Qu extends Xi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Zu extends Xi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Xu{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class Yu{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}var el=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 tl="v2";function nl(){var e;return Kr(ur)&&!!(null===(e=ur.supports.copilot)||void 0===e?void 0:e.view)}function rl(){return el(this,void 0,void 0,function*(){Kr(ur),yield Ic("copilot.view.closeSidePanel",[],new ol,tr(tl,"copilot.view.closeSidePanel"))})}class ol extends Xi{validate(e){return!0}deserialize(e){return e}}const il="v2";class al{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function sl(e){const t=e;return t.responseType===ll.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const cl="Action.Execute";var ul,ll,dl,fl;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(ul||(ul={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(ll||(ll={}));class pl extends Xi{validate(e){return sl(e)}deserialize(e){return e}}function gl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(dl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function hl(e){e.requestType===ul.ActionExecuteInvokeRequest?ml(e):e.requestType===ul.QueryMessageExtensionRequest&&vl(e)}function ml(e){if(e.type!==cl){throw{errorCode:dl.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${cl}"`}}if(!qn(e.data)){throw{errorCode:dl.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function vl(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 wl(e,t,n){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;const r=new co(e);return hl(n),Ac(tr(il,"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 Cl(e,t){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;const n=new co(e);return Ac(tr(il,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then(([e,t])=>{if(!e)throw t})}function yl(e,t,n){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;const r=new co(e);return hl(n),Ac(tr(il,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then(([e,t])=>{if(e&&null!=t.responseType)return t;throw t})}function Sl(e,t,n){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;return Un(e,new Error("titleId is Invalid.")),Un(t,new Error("oauthConfigId is Invalid.")),Ac(tr(il,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then(([e,t])=>{if(!e)throw t})}function bl(e,t,n){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;return Un(e,new Error("titleId is Invalid.")),t&&Ln(t),Ac(tr(il,"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(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(dl||(dl={}));class Al{constructor(e){this.param=e}serialize(){var e,t,n;return{connectorId:this.param.connectorId,oAuthConfigId:this.param.oAuthConfigId,traceId:null!==(n=null===(t=null===(e=this.param.traceId)||void 0===e?void 0:e.toString)||void 0===t?void 0:t.call(e))&&void 0!==n?n:this.param.traceId,windowParameters:this.param.windowParameters?Object.assign({},this.param.windowParameters):void 0}}}function El(e){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;return Un(e.connectorId,new Error("connectorId is Invalid.")),Un(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Pc("externalAppAuthentication.authenticateWithConnector",[new Al(e)],tr(il,"externalAppAuthentication.authenticateWithConnector"),gl)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(fl||(fl={}));class Il extends Xi{validate(e){return"string"==typeof e&&e in fl}deserialize(e){return e}}function Pl(e){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;return Un(e.connectorId,new Error("connectorId is Invalid.")),Un(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),Ic("externalAppAuthentication.getUserAuthenticationStateForConnector",[new Al(e)],new Il,tr(il,"externalAppAuthentication.getUserAuthenticationStateForConnector"),gl)}function Tl(e){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;return Un(e.connectorId,new Error("connectorId is Invalid.")),Un(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Pc("externalAppAuthentication.disconnectConnector",[new Al(e)],tr(il,"externalAppAuthentication.disconnectConnector"),gl)}function Ol(){return!(!Kr(ur)||!ur.supports.externalAppAuthentication)}var Rl=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Fl="v2";function kl(e,t,n){return Rl(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!Dl())throw mn;return Ul(e,t),Pc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],tr(Fl,"externalAppAuthenticationForCEA.authenticateWithSSO"),gl)})}function Ml(e,t,n){return Rl(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!Dl())throw mn;return Ul(e,t),Pc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],tr(Fl,"externalAppAuthenticationForCEA.authenticateWithOauth"),gl)})}function xl(e,t,n,r){return Rl(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!Dl())throw mn;return Ul(e,t),ml(r),Ic("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new al(r),n.url.href,n.width,n.height,n.isExternal],new pl,tr(Fl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),gl)})}function Nl(e,t,n,r){return Rl(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!Dl())throw mn;return Ul(e,t),ml(r),Ic("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new al(r),n.authId,n.connectionName,n.claims,n.silent],new pl,tr(Fl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),gl)})}function Dl(){return!(!Kr(ur)||!ur.supports.externalAppAuthenticationForCEA)}function Ul(e,t){Un(t,new Error("conversation id is not valid.")),ao(e)}const Ll="v2";var Hl,_l;function Vl(e,t){if(Kr(ur,ln.content,ln.sidePanel),!jl())throw mn;const n=new co(e);return Ac(tr(Ll,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then(([e,t])=>{if(!e)throw t})}function Bl(e,t,n){if(Kr(ur,ln.content,ln.sidePanel),!jl())throw mn;const r=new co(e);return Ac(tr(Ll,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then(([e,t])=>{if(e)throw e;return t})}function jl(){return!(!Kr(ur)||!ur.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Hl||(Hl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(_l||(_l={}));var Wl=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 zl="v2";function ql(e,t,n){return Wl(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!Gl())throw mn;Ul(e,t);const[r,o]=yield Ac(tr(zl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o})}function $l(e,t,n){return Wl(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!Gl())throw mn;Ul(e,t);const r=yield Cc(tr(zl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r})}function Gl(){return!(!Kr(ur)||!ur.supports.externalAppCardActionsForCEA)}var Jl;function Kl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Jl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Jl||(Jl={}));var Ql=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 Zl="v2";function Xl(e,t,n){return Ql(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!Yl())throw mn;return ed(e,n),Pc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new td(t),n],tr(Zl,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Kl)})}function Yl(){return!(!Kr(ur)||!ur.supports.externalAppCardActionsForDA)}function ed(e,t){ao(e),Jn(t)}class td{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var nd=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const rd="v2";function od(e,t,n){return nd(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!id())throw mn;const r=new co(e),[o,i]=yield Ac(tr(rd,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i})}function id(){return!(!Kr(ur)||!ur.supports.externalAppCommands)}const ad="v1";var sd,cd,ud,ld,dd,fd;function pd(e,t){if(Kr(ur,ln.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");Fc(tr(ad,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function gd(e,t){if(Kr(ur,ln.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");Fc(tr(ad,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function hd(e,t,n){if(Kr(ur,ln.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");Fc(tr(ad,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function md(e,t,n){if(Kr(ur,ln.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");Fc(tr(ad,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function vd(e,t,n){if(Kr(ur,ln.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");Fc(tr(ad,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function wd(e=!1,t){if(Kr(ur,ln.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Fc(tr(ad,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function Cd(e,t,n,r,o=!1,i){if(Kr(ur,ln.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");Fc(tr(ad,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function yd(e){if(Kr(ur,ln.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Fc(tr(ad,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function Sd(e=void 0,t){if(Kr(ur,ln.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Fc(tr(ad,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function bd(e){if(Kr(ur,ln.content),!e)throw kd(He.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Fc(tr(ad,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function Ad(e,t){if(Kr(ur,ln.content),!t)throw kd(He.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw kd(He.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Fc(tr(ad,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Ed(e,t){if(Kr(ur,ln.content),!t)throw kd(He.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw kd(He.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Fc(tr(ad,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Id(e,t){if(Kr(ur,ln.content),!t)throw kd(He.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw kd(He.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Fc(tr(ad,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Pd(e,t){if(Kr(ur,ln.content),!t)throw kd(He.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw kd(He.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Fc(tr(ad,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Td(e,t){if(Kr(ur,ln.content),!t)throw kd(He.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw kd(He.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Fc(tr(ad,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Od(e,t){if(Kr(ur,ln.content),!t)throw kd(He.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw kd(He.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw kd(He.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Fc(tr(ad,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Rd(e){if(Kr(ur),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Rs(tr(ad,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Fd(e){if(Kr(ur),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Rs(tr(ad,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function kd(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"}(sd||(sd={})),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"}(cd||(cd={})),function(e){e.ClassMaterials="classMaterials"}(ud||(ud={})),function(e){e.Readonly="readonly"}(ld||(ld={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(dd||(dd={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(fd||(fd={}));const Md="v1";function xd(){return new Promise(e=>{if(Kr(ur),!Ld())throw mn;e(bc(tr(Md,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))})}function Nd(e){return new Promise(t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Kr(ur),!Ld())throw mn;t(bc(tr(Md,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))})}function Dd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Kr(ur),!Ld())throw mn;Rs(tr(Md,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",t=>{Kr(ur),e(t)})}function Ud(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Kr(ur),!Ld())throw mn;Rs(tr(Md,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",t=>{Kr(ur),e(t)})}function Ld(){return!(!Kr(ur)||!ur.supports.meetingRoom)}function Hd(){return!(!Kr(ur)||!ur.supports.messageChannels)}const _d="1.0.1",Vd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Jd("Invalid message format, ignoring. Message: %o",e);if(!qd(e.source,e.origin))return void Jd("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Kd("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Jd("Invalid response format, ignoring. Message: %o",e);t(r)}};let Bd=null,jd=!1;function Wd(e,t,n=!1){if(jd=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.`);Bd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Jd("Nested App Auth Bridge is already present");const o=zd(r);o&&(r.nestedAppAuthBridge=o)}function zd(e){const t=new WeakMap,{onMessage:n}=Vd,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 Jd(`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=$d(t);if(e===e.top||!Bd)return void Kd("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Bd)}}catch(e){return void Kd("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 qd(e,t){if(t===Bd)try{return"https:"===new URL(t).protocol}catch(e){return Kd("Invalid message origin URL:",e),!1}return!1}function $d(e){const t=Date.now();return{id:Gd(),uuid:on(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Gd(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Jd(...e){jd&&console.log(...e)}function Kd(...e){jd&&console.error(...e)}const Qd="v1";function Zd(e){if(Kr(ur,ln.content),!Xd())throw mn;Fc(tr(Qd,"notifications.showNotification"),"notifications.showNotification",[e])}function Xd(){return!(!Kr(ur)||!ur.supports.notifications)}const Yd="v2";function ef(e){if(!rf())throw new Error(He.NOT_SUPPORTED_ON_PLATFORM.toString());if(uo(e))throw new Error(He.INVALID_ARGUMENTS.toString());Rs(tr(Yd,"otherApp.install"),"otherApp.install",e)}function tf(){if(!rf())throw new Error(He.NOT_SUPPORTED_ON_PLATFORM.toString());Fc(tr(Yd,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Fs("otherApp.install")}function nf(e){if(!rf())throw new Error(He.NOT_SUPPORTED_ON_PLATFORM.toString());return Pc("otherApp.notifyInstallCompleted",[e.toString()],tr(Yd,"otherApp.notifyInstallCompleted"))}function rf(){return!(!Kr(ur)||!ur.supports.otherAppStateChange)}var of=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 af="v2";function sf(){return Kr(ur)&&!!ur.supports.plugins}function cf(e){return of(this,void 0,void 0,function*(){if(Kr(ur),!e.func)throw new Error("func is required in PluginMessage.");return Pc("plugins.sendMessage",[new lf(e)],tr(af,"plugins.sendMessage"))})}function uf(e){Ms(tr(af,"plugins.receiveMessage"),"plugins.receiveMessage",(...t)=>{e(df(t))},Object.values(ln),()=>{if(!sf())throw new Error("Receiving plugin messages is not supported in the current host.")})}class lf{constructor(e){this.message=e}serialize(){return this.message}}function df(e){if(1===e.length&&ff(e[0]))return e[0];const[t,n,r]=e;return{func:"string"==typeof t?t:String(null!=t?t:""),args:n,correlationId:"string"==typeof r?r:void 0}}function ff(e){if(!e||"object"!=typeof e)return!1;return"string"==typeof e.func}const pf="v1";var gf,hf,mf;function vf(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Kr(ur,ln.sidePanel),!If())throw mn;Fc(tr(pf,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function wf(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(Kr(ur,ln.sidePanel),!If())throw mn;Fc(tr(pf,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Cf(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(Kr(ur,ln.sidePanel),!If())throw mn;Fc(tr(pf,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function yf(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Kr(ur,ln.sidePanel),!If())throw mn;Fc(tr(pf,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Sf(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Kr(ur,ln.sidePanel),!If())throw mn;Rs(tr(pf,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function bf(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Kr(ur,ln.sidePanel),!If())throw mn;Rs(tr(pf,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Af(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Kr(ur,ln.sidePanel),!If())throw mn;Rs(tr(pf,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Ef(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Kr(ur,ln.sidePanel),!If())throw mn;Rs(tr(pf,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function If(){return!(!Kr(ur)||!ur.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"}(gf||(gf={})),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"}(hf||(hf={})),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"}(mf||(mf={}));const Pf="v1";function Tf(e,t,n,r){if(Kr(ur,ln.content),!Of())throw mn;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");Fc(tr(Pf,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Of(){return!(!Kr(ur)||!ur.supports.appEntity)}const Rf="v1";function Ff(e){return new Promise(t=>{if(Kr(ur),!kf())throw mn;if((Kn.hostClientType===cn.android||Kn.hostClientType===cn.teamsRoomsAndroid||Kn.hostClientType===cn.teamsPhones||Kn.hostClientType===cn.teamsDisplays)&&!Qr(Xe)){const e={errorCode:He.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Cc(tr(Rf,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))})}function kf(){return!(!Kr(ur)||!ur.supports.teams)&&(!!ur.supports.teams.fullTrust&&!!ur.supports.teams.fullTrust.joinedTeams)}var Mf=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 xf="v1";function Nf(e){return Mf(this,void 0,void 0,function*(){if(Kr(ur),!Df())throw mn;return Ic("getConfigSetting",[e],new Yi,tr(xf,"teams.fullTrust.getConfigSetting"))})}function Df(){return!(!Kr(ur)||!ur.supports.teams)&&!!ur.supports.teams.fullTrust}const Uf="v1";var Lf;function Hf(e,t){if(Kr(ur,ln.content),!Vf())throw mn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Fc(tr(Uf,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function _f(e,t){if(Kr(ur),!Vf())throw mn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Fc(tr(Uf,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Vf(){return!(!Kr(ur)||!ur.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Lf||(Lf={}));class Bf{static setTimeout(e,t){const n=performance.now(),r=An();return Bf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Bf.setTimeoutCallbacks[e]}static setInterval(e,t){Bf.setTimeout(function n(){e(),Bf.setTimeout(n,t)},t)}static tick(){const e=performance.now(),t=[];for(const n in Bf.setTimeoutCallbacks){const r=Bf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Bf.setTimeoutCallbacks[e].callback(),delete Bf.setTimeoutCallbacks[e]}}}Bf.setTimeoutCallbacks={};class jf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Bf.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&&Bf.clearTimeout(this.timeoutId),this.timeoutId=Bf.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(jf.maxSessionTimeoutInMs,2*t.timeoutInMs):jf.initialSessionTimeoutInMs}}jf.initialSessionTimeoutInMs=1e3,jf.maxSessionTimeoutInMs=3e4;const Wf="v2";class zf{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new jf(zf.distributionBinSize,e=>this.reportPerformanceEvent(tr(Wf,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e]))}startMonitorSlowFrameProcessing(){Bf.setInterval(()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(tr(Wf,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0},zf.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){Bf.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(tr(Wf,"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(tr(Wf,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}zf.distributionBinSize=1e3,zf.calculateFPSInterval=1e3;var qf=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())})},$f=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 Gf="v2",Jf=Dn()?void 0:new zf(Fc);var Kf,Qf,Zf;function Xf(e){if(Kr(ur,ln.sidePanel),!rp())throw mn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Rs(tr(Gf,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==Jf?void 0:Jf.setFrameProcessTimeLimit(e.timeLimit),!1),cp())op(e.videoFrameHandler,e.config);else{if(!lp())throw mn;ap(e.videoBufferHandler,e.config)}null==Jf||Jf.startMonitorSlowFrameProcessing()}function Yf(e,t){if(Kr(ur,ln.sidePanel),!rp())throw mn;Fc(tr(Gf,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function ep(e){if(Kr(ur,ln.sidePanel),!rp())throw mn;Rs(tr(Gf,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",bp(e,Jf),!1),Fc(tr(Gf,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function tp(e){Fc(tr(Gf,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function np(e){Fc(tr(Gf,"videoEffects.notifyError"),"video.notifyError",[e])}function rp(){return Kr(ur)&&!!ur.supports.video&&(!!ur.supports.video.mediaStream||!!ur.supports.video.sharedFrame)}function op(e,t){if(Kr(ur,ln.sidePanel),!rp()||!cp())throw mn;Rs(tr(Gf,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>qf(this,void 0,void 0,function*(){const{streamId:n}=t,r=ip(e,Jf);yield pp(n,r,np,Jf)}),!1),Fc(tr(Gf,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function ip(e,t){return n=>qf(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 ap(e,t){if(Kr(ur,ln.sidePanel),!rp()||!lp())throw mn;Rs(tr(Gf,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",t=>{if(t){const n=t.timestamp;null==Jf||Jf.reportStartFrameProcessing(t.width,t.height),e(sp(t),()=>{null==Jf||Jf.reportFrameProcessed(),tp(n)},np)}},!1),Fc(tr(Gf,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function sp(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=$f(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function cp(){var e;return Kr(ur,ln.sidePanel)&&up()&&!!(null===(e=ur.supports.video)||void 0===e?void 0:e.mediaStream)}function up(){var e,t,n,r;return!(!(null===(t=null===(e=Nn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Nn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function lp(){var e;return Kr(ur,ln.sidePanel)&&!!(null===(e=ur.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Kf||(Kf={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Qf||(Qf={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Zf||(Zf={}));var dp=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 fp="v2";function pp(e,t,n,r){var o,i;return dp(this,void 0,void 0,function*(){const a=mp();!Dn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),vp(yield hp(e,n,r),new wp(n,t),a.writable)})}function gp(e,t,n,r){var o,i;return dp(this,void 0,void 0,function*(){const a=mp();!Dn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),vp(yield hp(e,n,r),new Sp(n,t),a.writable)})}function hp(e,t,n){return dp(this,void 0,void 0,function*(){if(Dn())throw mn;const r=Nn().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}})}function mp(){if(Dn())throw mn;const e=window.MediaStreamTrackGenerator;if(!e)throw mn;return new e({kind:"video"})}function vp(e,t,n){new(0,Nn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class wp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>dp(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 Cp{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 yp{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 Sp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>dp(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=>dp(this,void 0,void 0,function*(){if(Dn())throw mn;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 Cp(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 yp(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}}}),Rs(tr(fp,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e})}}function bp(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then(()=>{null==t||t.reportVideoEffectChanged(n||"",r),Fc(tr(fp,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])}).catch(e=>{const t=e in Zf?e:Zf.InitializationFailure;Fc(tr(fp,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])})}}var Ap=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 Ep="v2",Ip=2e3,Pp=Dn()?void 0:new zf(Fc);var Tp;function Op(e){var t,n;if(!Dp())throw mn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Kr(ur,ln.sidePanel)){if(Rs(tr(Ep,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==Pp?void 0:Pp.setFrameProcessTimeLimit(e),!1),null===(t=ur.supports.video)||void 0===t?void 0:t.mediaStream)Rs(tr(Ep,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>Ap(this,void 0,void 0,function*(){const{streamId:n,metadataInTexture:r}=t,o=Pp?Fp(e.videoFrameHandler,Pp):e.videoFrameHandler;r?yield gp(n,o,Lp,Pp):yield pp(n,o,Lp,Pp)}),!1),Fc(tr(Ep,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=ur.supports.video)||void 0===n?void 0:n.sharedFrame))throw mn;Rs(tr(Ep,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",t=>{if(t){null==Pp||Pp.reportStartFrameProcessing(t.width,t.height);const n=Rp(),r=t.timestamp;e.videoBufferHandler(kp(t),()=>{n(),null==Pp||Pp.reportFrameProcessed(),Up(r)},Lp)}},!1),Fc(tr(Ep,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Pp||Pp.startMonitorSlowFrameProcessing()}}function Rp(){const e=setTimeout(()=>{Lp(`Frame not processed in ${Ip}ms`,Tp.Warn)},Ip);return function(){clearTimeout(e)}}function Fp(e,t){return n=>Ap(this,void 0,void 0,function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=Rp(),i=yield e(n);return o(),t.reportFrameProcessed(),i})}function kp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Mp(e,t,n){if(Kr(ur,ln.sidePanel),!Dp())throw mn;Fc(tr(Ep,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function xp(e){if(Kr(ur,ln.sidePanel),!Dp())throw mn;Rs(tr(Ep,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",bp(e,Pp),!1),Fc(tr(Ep,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Np(e){if(Kr(ur,ln.sidePanel),!rp())throw mn;Fc(tr(Ep,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Dp(){return Kr(ur),rp()}function Up(e){Fc(tr(Ep,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Lp(e,t=Tp.Warn){Fc(tr(Ep,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Hp(e){if(Kr(ur),!rp())throw mn;Lp(e,Tp.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Tp||(Tp={}));const _p="v2";class Vp extends Xi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Bp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class jp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Wp extends Xi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class zp{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class qp extends Xi{validate(e){const t=new Wp;let n=!0;return e.allTabs&&e.allTabs.forEach(e=>{n||(n=t.validate(e))}),n}deserialize(e){return e}}function $p(e,t){if(Kr(ur),!Zp())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Xp(e.threadId),t&&0===t.length)throw new Error(`Error code: ${He.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Ic("hostEntity.tab.addAndConfigure",[new jp(e),t],new Wp,tr(_p,"hostEntity.tab.addAndConfigure"))}function Gp(e){if(Kr(ur),!Zp())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Xp(e.threadId),Ic("hostEntity.tab.getAll",[new jp(e)],new qp,tr(_p,"hostEntity.tab.getAll"))}function Jp(e,t){if(Kr(ur),!Zp())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Yp(e),Xp(t.threadId),Ic("hostEntity.tab.reconfigure",[new Bp(e),new jp(t)],new Vp,tr(_p,"hostEntity.tab.reconfigure"))}function Kp(e,t){if(Kr(ur),!Zp())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Yp(e),Xp(t.threadId),Ic("hostEntity.tab.rename",[new Bp(e),new jp(t)],new Vp,tr(_p,"hostEntity.tab.rename"))}function Qp(e,t){if(Kr(ur),!Zp())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Xp(t.threadId),Yp(e),Ic("hostEntity.tab.remove",[new zp(e),new jp(t)],new Yi,tr(_p,"hostEntity.tab.remove"))}function Zp(){var e;return!!(Kr(ur)&&tg()&&(null===(e=ur.supports.hostEntity)||void 0===e?void 0:e.tab))}function Xp(e){if(!e||0==e.length)throw new Error(`Error code: ${He.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function Yp(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${He.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var eg;function tg(){return!(!Kr(ur)||!ur.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(eg||(eg={}));var ng=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 rg="v2",og="Invalid store dialog size",ig="No App Id present, but AppId needed to open AppDetail store",ag="No Collection Id present, but CollectionId needed to open a store specific to a collection";function sg(e){return ng(this,void 0,void 0,function*(){fg();const{size:t}=null!=e?e:{};return Pc("store.openFullStore",[pg(t)],tr(rg,"store.openFullStore"))})}function cg(e){return ng(this,void 0,void 0,function*(){fg();const{size:t,appId:n}=e;if(!(n instanceof co))throw new Error(ig);return Pc("store.openAppDetail",[pg(t),n],tr(rg,"store.openAppDetail"))})}function ug(e){return ng(this,void 0,void 0,function*(){fg();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return Pc("store.openInContextStore",[pg(t),n,r,o,null==i?void 0:i.map(e=>e.toString())],tr(rg,"store.openInContextStore"))})}function lg(e){return ng(this,void 0,void 0,function*(){fg();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(ag);return Pc("store.openSpecificStore",[pg(t),n],tr(rg,"store.openSpecificStore"))})}function dg(){return Kr(ur)&&!!ur.supports.store}function fg(){if(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),!dg())throw mn}function pg(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(og);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(og);return JSON.stringify(e)}var gg=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const hg="v1",mg=er("widgetHosting");function vg(){return Kr(ur)&&!!ur.supports.widgetHosting}function wg(e,t){return gg(this,void 0,void 0,function*(){return Jr(),mg("Calling tool with widgetId and input: ",{widgetId:e,input:t}),Ic("widgetHosting.callTool",[new Rg(e,t)],new Tg,tr(hg,"widgetHosting.callTool"),$e)})}function Cg(e,t){return gg(this,void 0,void 0,function*(){return Jr(),mg("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:t.prompt}),Pc("widgetHosting.sendFollowUpMessage",[new Fg(e,t)],tr(hg,"widgetHosting.sendFollowUpMessage"))})}function yg(e,t){return gg(this,void 0,void 0,function*(){return Jr(),mg("Requesting display mode with widgetId: ",{widgetId:e,mode:t.mode}),Pc("widgetHosting.requestDisplayMode",[new kg(e,t)],tr(hg,"widgetHosting.requestDisplayMode"))})}function Sg(e,t){return gg(this,void 0,void 0,function*(){return Jr(),mg("Requesting modal with widgetId and options: ",{widgetId:e,options:t}),Ic("widgetHosting.requestModal",[new Dg(e,t)],new Og,tr(hg,"widgetHosting.requestModal"),$e)})}function bg(e,t){Jr(),mg("Notifying intrinsic height with widgetId: ",{widgetId:e,height:t}),Pc("widgetHosting.notifyIntrinsicHeight",[new Ng(e,t)],tr(hg,"widgetHosting.notifyIntrinsicHeight"))}function Ag(e,t,n){Jr(),mg("Content size changed with widgetId: ",{widgetId:e,width:t,height:n}),Pc("widgetHosting.contentSizeChanged",[new Ug(e,t,n)],tr(hg,"widgetHosting.contentSizeChanged"))}function Eg(e,t){return gg(this,void 0,void 0,function*(){return Jr(),mg("Setting widget state with widgetId: ",{widgetId:e,state:t}),Pc("widgetHosting.setWidgetState",[new xg(e,t)],tr(hg,"widgetHosting.setWidgetState"))})}function Ig(e,t){Jr(),mg("Opening external URL with widgetId: ",{widgetId:e,href:t.href}),Pc("widgetHosting.openExternal",[new Mg(e,t)],tr(hg,"widgetHosting.openExternal"))}function Pg(e){Ms(tr(hg,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",e,[],()=>{if(!vg())throw new Error("Widget Hosting is not supported on this platform")})}class Tg extends Xi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Og extends Xi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Rg{constructor(e,t){this.widgetId=e,this.toolInput=t}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}}class Fg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,prompt:this.args.prompt}}}class kg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,mode:this.args.mode}}}class Mg{constructor(e,t){this.widgetId=e,this.payload=t}serialize(){return{widgetId:this.widgetId,href:this.payload.href}}}class xg{constructor(e,t){this.widgetId=e,this.state=t}serialize(){return{widgetId:this.widgetId,state:this.state}}}class Ng{constructor(e,t){this.widgetId=e,this.height=t}serialize(){return{widgetId:this.widgetId,height:this.height}}}class Dg{constructor(e,t){this.widgetId=e,this.options=t}serialize(){return{widgetId:this.widgetId,id:this.options.id,title:this.options.title,content:this.options.content,width:this.options.width,height:this.options.height}}}class Ug{constructor(e,t,n){this.widgetId=e,this.width=t,this.height=n}serialize(){return{widgetId:this.widgetId,width:this.width,height:this.height}}}var Lg=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="v1",_g="v2";let Vg;function Bg(e){Vg=e}function jg(e){const t=void 0!==e,n=t?e:Vg;if(!n)throw new Error("No parameters are provided for authentication");Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.remove,ln.task,ln.stage,ln.meetingStage);return Wg(n.successCallback||n.failureCallback?tr(Hg,"authentication.authenticate"):tr(_g,"authentication.authenticate"),n).then(e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Vg=void 0)}}).catch(e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Vg=void 0)}})}function Wg(e,t){return Lg(this,void 0,void 0,function*(){const n=Hn(t.url);return Ln(n),Ac(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then(([e,t])=>{if(e)return t;throw new Error(t)})})}function zg(e){Jr();return qg(e&&(e.successCallback||e.failureCallback)?tr(Hg,"authentication.getAuthToken"):tr(_g,"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 qg(e,t){return new Promise(n=>{n(Ac(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 $g(e){Jr();return Gg(e&&(e.successCallback||e.failureCallback)?tr(Hg,"authentication.getUser"):tr(_g,"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 Gg(e){return new Promise(t=>{t(Ac(e,"authentication.getUser"))}).then(([e,t])=>{if(e)return t;throw t})}function Jg(e,t){Kr(ur,ln.authentication);Fc(tr(t?Hg:_g,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),eu(hc.parentWindow,()=>setTimeout(()=>hc.currentWindow.close(),200))}function Kg(e,t){Kr(ur,ln.authentication);Fc(tr(t?Hg:_g,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),eu(hc.parentWindow,()=>setTimeout(()=>hc.currentWindow.close(),200))}var Qg;function Zg(){return Kr(ur)&&!!ur.supports.appPerformanceMetrics}function Xg(e){Kr(ur),Rs(tr("v2","appPerformanceMetrics.memoryUsageHeartbeat"),"appPerformanceMetrics.memoryUsageHeartbeat",e)}function Yg(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"}(Qg||(Qg={}));class eh{constructor(e){this.val=e,Yg(e)}toString(){return this.val}}const th="/l/app/",nh="/l/meeting/new",rh="attendees",oh="startTime",ih="endTime",ah="subject",sh="content",ch="/l/call/0/0",uh="source",lh="withVideo",dh="/l/chat/0/0",fh="users",ph="topicName",gh="message";function hh(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${fh}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${ph}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${gh}=${encodeURIComponent(n)}`;return`${st}://${ct}${dh}?${r}${o}${i}`}function mh(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${fh}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${lh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${uh}=${encodeURIComponent(n)}`;return`${st}://${ct}${ch}?${r}${o}${i}`}function vh(e,t,n,r,o){const i=void 0===e?"":`${rh}=`+e.map(e=>encodeURIComponent(e)).join(","),a=void 0===t?"":`&${oh}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${ih}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${ah}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${sh}=${encodeURIComponent(o)}`;return`${st}://${ct}${nh}?${i}${a}${s}${c}${u}`}function wh(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${st}://${ct}${th}${encodeURIComponent(e)}`}const Ch="v1";function yh(e){return new Promise(t=>{if(Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),!Sh())throw new Error("Not supported");const n=tr(Ch,"appInstallDialog.openAppInstallDialog");ur.isLegacyTeams?t(yc(n,"executeDeepLink",wh(e.appId))):(Fc(n,"appInstallDialog.openAppInstallDialog",[e]),t())})}function Sh(){return!(!Kr(ur)||!ur.supports.appInstallDialog)}const bh="v1",Ah=er("media");var Eh,Ih,Ph,Th,Oh,Rh,Fh;!function(e){e.Base64="base64",e.ID="id"}(Eh||(Eh={}));class kh{}function Mh(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Kr(ur,ln.content,ln.task),!Kn.isFramelessWindow){return void e({errorCode:He.NOT_SUPPORTED_ON_PLATFORM},[])}if(!Qr(tt)){return void e({errorCode:He.OLD_PLATFORM},[])}Fc(tr(bh,"media.captureImage"),"captureImage",e)}function xh(){if(Kr(ur,ln.content,ln.task),!Dh())throw mn;const e=_e.Media;return new Promise(t=>{t(bc(tr(bh,"media.hasPermission"),"permissions.has",e))})}function Nh(){if(Kr(ur,ln.content,ln.task),!Dh())throw mn;const e=_e.Media;return new Promise(t=>{t(bc(tr(bh,"media.requestPermission"),"permissions.request",e))})}function Dh(){return!(!Kr(ur)||!ur.supports.permissions)}class Uh extends kh{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(Kr(ur,ln.content,ln.task),!Qr(nt)){return void e({errorCode:He.OLD_PLATFORM},new Blob)}if(!Qh(this.mimeType,this.format,this.content)){return void e({errorCode:He.INVALID_ARGUMENTS},new Blob)}Qr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e)}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Fc(tr(bh,"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=jh(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Wh(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):Ah(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:He.INTERNAL_ERROR,message:"data received is null"},new Blob)})}getMediaViaHandler(e){const t=An(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!uo(e)&&Fc(tr(bh,"media.getMedia"),"getMedia",r),Rs(tr(bh,"media.registerGetMediaRequestHandler"),"getMedia"+t,function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Fs("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=jh(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Fs("getMedia"+t)}else{const e=Wh(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:He.INTERNAL_ERROR,message:"data received is null"},new Blob),Fs("getMedia"+t)}})}}class Lh{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Kr(ur,ln.content,ln.task);try{Xr(Qe)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Fc(tr(bh,"media.controller"),"media.controller",[n],e=>{t&&t(e)})}stop(e){this.notifyEventToHost(Ih.StopRecording,e)}}class Hh extends Lh{getMediaType(){return Oh.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Ih.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function _h(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Kr(ur,ln.content,ln.task),!Qr(nt)){const e={errorCode:He.OLD_PLATFORM};return void t(e,[])}try{zh(e)}catch(e){return void t(e,[])}if(!$h(e)){const e={errorCode:He.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Fc(tr(bh,"media.selectMedia"),"selectMedia",n,(n,r,o)=>{var i,a;if(o)return void(qh(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 Uh(e));t(n,s)})}function Vh(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Kr(ur,ln.content,ln.task),!Qr(nt)){return void t({errorCode:He.OLD_PLATFORM})}if(!Zh(e)){return void t({errorCode:He.INVALID_ARGUMENTS})}const n=[e];Fc(tr(bh,"media.viewImages"),"viewImages",n,t)}function Bh(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Kr(ur,ln.content,ln.task),Kn.hostClientType===cn.desktop||Kn.hostClientType===cn.web||Kn.hostClientType===cn.rigel||Kn.hostClientType===cn.teamsRoomsWindows||Kn.hostClientType===cn.teamsRoomsAndroid||Kn.hostClientType===cn.teamsPhones||Kn.hostClientType===cn.teamsDisplays){return void e({errorCode:He.NOT_SUPPORTED_ON_PLATFORM},"")}if(!Qr(rt)){return void e({errorCode:He.OLD_PLATFORM},"")}if(!Xh(t)){return void e({errorCode:He.INVALID_ARGUMENTS},"")}Fc(tr(bh,"media.scanBarCode"),"media.scanBarCode",[t],e)}function jh(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 Wh(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 zh(e){Jh(e)?Xr(Ke):Kh(e)?Xr(Qe):Gh(e)&&Xr(Ze)}function qh(e){return!(e.mediaType!=Oh.Video||!e.videoProps||!e.videoProps.videoController)}function $h(e){return!(null==e||e.maxMediaCount>10)}function Gh(e){var t;return!((null==e?void 0:e.mediaType)!=Oh.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Jh(e){return!(!e||e.mediaType!=Oh.VideoAndImage&&!e.videoAndImageProps)}function Kh(e){return!(!e||e.mediaType!=Oh.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Qh(e,t,n){return null!=e&&null!=t&&t==Eh.ID&&null!=n}function Zh(e){return!(null==e||e.length<=0||e.length>10)}function Xh(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Yh(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"}(Ih||(Ih={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Ph||(Ph={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Th||(Th={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Oh||(Oh={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(Rh||(Rh={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Fh||(Fh={}));const em="v2";function tm(e){return new Promise(t=>{if(Kr(ur,ln.content,ln.task),!om())throw mn;if(!Xh(e))throw{errorCode:He.INVALID_ARGUMENTS};t(bc(tr(em,"barCode.scanBarCode"),"media.scanBarCode",e))})}function nm(){if(Kr(ur,ln.content,ln.task),!om())throw mn;const e=_e.Media;return new Promise(t=>{t(bc(tr(em,"barCode.hasPermission"),"permissions.has",e))})}function rm(){if(Kr(ur,ln.content,ln.task),!om())throw mn;const e=_e.Media;return new Promise(t=>{t(bc(tr(em,"barCode.requestPermission"),"permissions.request",e))})}function om(){return!!(Kr(ur)&&ur.supports.barCode&&ur.supports.permissions)}const im="v2";function am(e){return sm(tr(im,"chat.openChat"),e)}function sm(e,t){return new Promise(n=>{if(Kr(ur,ln.content,ln.task),!um())throw mn;if(ur.isLegacyTeams)n(yc(e,"executeDeepLink",hh([t.user],void 0,t.message)));else{n(yc(e,"chat.openChat",{members:[t.user],message:t.message}))}})}function cm(e){const t=tr(im,"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(sm(t,r))}else{if(Kr(ur,ln.content,ln.task),!um())throw mn;if(ur.isLegacyTeams)n(yc(t,"executeDeepLink",hh(e.users,e.topic,e.message)));else{n(yc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}})}function um(){return!(!Kr(ur)||!ur.supports.chat)}var lm=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 dm="v2";function fm(e){return lm(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.meetingStage,ln.task,ln.settings,ln.stage,ln.sidePanel),!gm())throw mn;if(!e.type||!Object.values(ze).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(ze)}`);const t=yield xn(e),n={mimeType:e.type,content:t};return bc(tr(dm,"clipboard.write"),"clipboard.writeToClipboard",n)})}function pm(){return lm(this,void 0,void 0,function*(){Kr(ur,ln.content,ln.meetingStage,ln.task,ln.settings,ln.stage,ln.sidePanel);const e=tr(dm,"clipboard.read");if(!gm())throw mn;const t=yield bc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Mn(e.mimeType,e.content)}return t})}function gm(){return Kn.isFramelessWindow?!(!Kr(ur)||!ur.supports.clipboard):!!(Kr(ur)&&navigator&&navigator.clipboard&&ur.supports.clipboard)}var hm=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const mm="v2",vm={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var wm;function Cm(){var e;return null!==(e=Kr(ur)&&(ur.isNAAChannelRecommended||Em()))&&void 0!==e&&e}function ym(){return Kr(ur),hc.parentOrigin}function Sm(){var e;return null!==(e=Kr(ur)&&ur.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function bm(){var e;return null!==(e=Kr(ur)&&(ur.isDeeplyNestedAuthSupported||Am()))&&void 0!==e&&e}function Am(){return!!(Kr(ur)&&Im()&&ur.isLegacyTeams&&Qr(mr))}function Em(){return!!(Kr(ur)&&Im()&&ur.isLegacyTeams&&ur.supports.nestedAppAuth)}function Im(){return Kn.hostClientType===cn.android||Kn.hostClientType===cn.ios||Kn.hostClientType===cn.ipados||Kn.hostClientType===cn.visionOS}function Pm(e){return hm(this,void 0,void 0,function*(){if(!Sm())throw mn;const t=e.map(Rm);return Om(wm.ADD,t)})}function Tm(e){return hm(this,void 0,void 0,function*(){if(!Sm())throw mn;const t=e.map(Rm);return Om(wm.DELETE,t)})}function Om(e,t){return hm(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 Ic("nestedAppAuth.manageNAATrustedOrigins",[new Fm(e,t)],vm,tr(mm,"nestedAppAuth.manageNAATrustedOrigins"))})}function Rm(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"}(wm||(wm={}));class Fm{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const km="v2";function Mm(){if(Kr(ur,ln.content,ln.task),!Nm())throw mn;return bc(tr(km,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function xm(e){if(Kr(ur,ln.content,ln.task),!Nm())throw mn;if(!e)throw{errorCode:He.INVALID_ARGUMENTS};return bc(tr(km,"geoLocation.showLocation"),"location.showLocation",e)}function Nm(){return!!(Kr(ur)&&ur.supports.geoLocation&&ur.supports.geoLocation.map&&ur.supports.permissions)}const Dm="v2";function Um(){if(Kr(ur,ln.content,ln.task),!_m())throw mn;return bc(tr(Dm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Lm(){if(Kr(ur,ln.content,ln.task),!_m())throw mn;const e=_e.GeoLocation;return new Promise(t=>{t(bc(tr(Dm,"geoLocation.hasPermission"),"permissions.has",e))})}function Hm(){if(Kr(ur,ln.content,ln.task),!_m())throw mn;const e=_e.GeoLocation;return new Promise(t=>{t(bc(tr(Dm,"geoLocation.requestPermission"),"permissions.request",e))})}function _m(){return!!(Kr(ur)&&ur.supports.geoLocation&&ur.supports.permissions)}function Vm(){return ur.hostVersionsInfo?ur.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Bm="v1";class jm{postMessage(e,t){Kr(ur),Fc(tr(Bm,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||Sn())}addEventListener(e,t){Kr(ur),"message"===e&&Rs(tr(Bm,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Wm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Kr(ur,ln.task),Fc(tr(Bm,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||Sn())}addEventListener(e,t){Kr(ur,ln.task),"message"===e&&Rs(tr(Bm,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const zm="v2";function qm(e){if(Kr(ur,ln.content),!$m())throw mn;if(!e||!kn(e))throw{errorCode:He.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return bc(tr(zm,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function $m(){return!(!Kr(ur)||!ur.supports.secondaryBrowser)}const Gm="v1";function Jm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Kr(ur,ln.content,ln.task),!Qr(Ye))throw{errorCode:He.OLD_PLATFORM};if(!e)throw{errorCode:He.INVALID_ARGUMENTS};if(!Qm())throw mn;Fc(tr(Gm,"location.getLocation"),"location.getLocation",[e],t)}function Km(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Kr(ur,ln.content,ln.task),!Qr(Ye))throw{errorCode:He.OLD_PLATFORM};if(!e)throw{errorCode:He.INVALID_ARGUMENTS};if(!Qm())throw mn;Fc(tr(Gm,"location.showLocation"),"location.showLocation",[e],t)}function Qm(){return!(!Kr(ur)||!ur.supports.location)}const Zm="v1";function Xm(e){Kr(ur,ln.sidePanel),e.contentUrl&&new URL(e.contentUrl),Fc(tr(Zm,"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 ev="v1";var tv,nv,rv,ov,iv,av;function sv(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Fc(tr(ev,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function cv(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Fc(tr(ev,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function uv(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage,ln.settings,ln.content),Fc(tr(ev,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function lv(){var e,t,n;return Ym(this,void 0,void 0,function*(){let r;Kr(ur,ln.sidePanel,ln.meetingStage,ln.settings,ln.content);try{const e=!0;r=yield bc(tr("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)==ov.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==ov.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(He.NOT_SUPPORTED_ON_PLATFORM.toString());return r})}function dv(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage,ln.task),Fc(tr(ev,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function fv(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Kr(ur,ln.sidePanel),Fc(tr(ev,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function pv(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Kr(ur,ln.sidePanel),Fc(tr(ev,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function gv(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Kr(ur,ln.sidePanel),Fc(tr(ev,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function hv(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Kr(ur,ln.sidePanel),Rs(tr(ev,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function mv(e,t,n={sharingProtocol:iv.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Fc(tr(ev,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function vv(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Fc(tr(ev,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function wv(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Fc(tr(ev,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Cv(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Fc(tr(ev,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function yv(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Rs(tr(ev,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Sv(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Rs(tr(ev,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function bv(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Rs(tr(ev,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Av(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Kr(ur);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||av.Other};return bc(tr("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Ev(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");Kr(ur,ln.sidePanel,ln.meetingStage),e.isAppHandlingAudio?Iv(e,t):Pv(e,t)}function Iv(e,t){Fc(tr(ev,"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");Rs(tr(ev,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",t=>Ym(this,void 0,void 0,function*(){try{const n=yield e.micMuteStateChangedCallback(t);Ov(n,n.isMicMuted===t.isMicMuted?tv.HostInitiated:tv.AppDeclinedToChange)}catch(e){Ov(t,tv.AppFailedToChange)}}));Rs(tr(ev,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)}),t(r)})}function Pv(e,t){Fc(tr(ev,"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");ks("meeting.micStateChanged")&&Fs("meeting.micStateChanged"),ks("meeting.audioDeviceSelectionChanged")&&Fs("meeting.audioDeviceSelectionChanged"),t(n)})}function Tv(e){Ov(e,tv.AppInitiated)}function Ov(e,t){Kr(ur,ln.sidePanel,ln.meetingStage),Fc(tr(ev,"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"}(tv||(tv={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(nv||(nv={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(rv||(rv={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(ov||(ov={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(iv||(iv={})),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"}(av||(av={}));const Rv="v1",Fv="v2";function kv(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=tr(Rv,"monetization.openPurchaseExperience")):(r=e,o=tr(Fv,"monetization.openPurchaseExperience"));return Kr(ur,ln.content),Tn(()=>new Promise(e=>{if(!Mv())throw mn;e(bc(o,"monetization.openPurchaseExperience",r))}),n)}function Mv(){return!(!Kr(ur)||!ur.supports.monetization)}const xv="v2";function Nv(e){return new Promise(t=>{if(Kr(ur,ln.content),!Uv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(yc(tr(xv,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))})}function Dv(e){return new Promise(t=>{if(Kr(ur,ln.content),!Uv())throw new Error("Not supported");const n=tr(xv,"calendar.composeMeeting");ur.isLegacyTeams?t(yc(n,"executeDeepLink",vh(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(yc(n,"calendar.composeMeeting",e))})}function Uv(){return!(!Kr(ur)||!ur.supports.calendar)}const Lv="v2";function Hv(e){e&&0!==e.length&&e.forEach(e=>{Yg(e)})}function _v(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===Gv.New&&(Hv(t.toRecipients),Hv(t.ccRecipients),Hv(t.bccRecipients))}function Vv(e){if(Kr(ur,ln.content),!Bv())throw new Error("Not supported");return _v(e),Pc("mail.handoff.composeMail",[new jv(e)],tr(Lv,"mail.handoff.composeMail"))}function Bv(){return!!(Kr(ur)&&ur.supports.mail&&ur.supports.mail.handoff)}class jv{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const Wv="v2";function zv(e){return new Promise(t=>{if(Kr(ur,ln.content),!$v())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(yc(tr(Wv,"mail.openMailItem"),"mail.openMailItem",e))})}function qv(e){return new Promise(t=>{if(Kr(ur,ln.content),!$v())throw new Error("Not supported");t(yc(tr(Wv,"mail.composeMail"),"mail.composeMail",e))})}function $v(){return!(!Kr(ur)||!ur.supports.mail)}var Gv;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Gv||(Gv={}));const Jv="v2";function Kv(){if(!Kn.printCapabilityEnabled){if(Kr(ur),!tw())throw mn;Kn.printCapabilityEnabled=!0,document.addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(Qv(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())})}}function Qv(){Nn().print()}function Zv(e){Xv(tr(Jv,"teamsAPIs_registerOnLoadHandler"),e,()=>{if(!uo(e)&&!tw())throw mn})}function Xv(e,t,n){!uo(t)&&Kr(ur),!uo(t)&&n&&n(),_s(e,t)}function Yv(e){ew(tr(Jv,"teamsAPIs_registerBeforeUnloadHandler"),e,()=>{if(!uo(e)&&!tw())throw mn})}function ew(e,t,n){!uo(t)&&Kr(ur),!uo(t)&&n&&n(),js(e,t)}function tw(){return!(!Kr(ur)||!ur.supports.teamsCore)}const nw="v1",rw="v2";function ow(e,t){let n,r;Kr(ur,ln.content,ln.task,ln.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=tr(nw,"people.selectPeople")):(r=e,o=tr(rw,"people.selectPeople")),In(iw,n,o,r)}function iw(e,t){return new Promise(n=>{if(!Qr(et))throw{errorCode:He.OLD_PLATFORM};if(!Yh(t))throw{errorCode:He.INVALID_ARGUMENTS};if(!aw())throw mn;n(bc(e,"people.selectPeople",t))})}function aw(){return!(!Kr(ur)||!ur.supports.people)}function sw(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?cw(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function cw(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 uw="v2";function lw(e){return Kr(ur,ln.content),new Promise(t=>{const[n,r]=sw(e);if(!n)throw{errorCode:He.INVALID_ARGUMENTS,message:r};const o={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(bc(tr(uw,"profile.showProfile"),"profile.showProfile",o))})}function dw(){return!(!Kr(ur)||!ur.supports.profile)}const fw="v2",pw="search.queryChange",gw="search.queryClose",hw="search.queryExecute";function mw(e,t,n){if(Kr(ur,ln.content),!ww())throw mn;Rs(tr(fw,"search.registerOnClosedHandler"),gw,e),Rs(tr(fw,"search.registerOnExecutedHandler"),hw,t),n&&Rs(tr(fw,"search.registerOnChangeHandler"),pw,n)}function vw(){if(Kr(ur,ln.content),!ww())throw mn;Fc(tr(fw,"search.unregisterHandlers"),"search.unregister"),Fs(pw),Fs(gw),Fs(hw)}function ww(){return!(!Kr(ur)||!ur.supports.search)}function Cw(){return new Promise(e=>{if(Kr(ur,ln.content),!ww())throw new Error("Not supported");e(yc(tr(fw,"search.closeSearch"),"search.closeSearch"))})}var yw=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 Sw="v2";function bw(){return yw(this,void 0,void 0,function*(){if(Kr(ur,ln.sidePanel,ln.meetingStage),!Aw())throw mn;return yield bc(tr(Sw,"sharing.history.getContent"),"sharing.history.getContent")})}function Aw(){var e;return Kr(ur)&&void 0!==(null===(e=ur.supports.sharing)||void 0===e?void 0:e.history)}const Ew="v1",Iw="v2",Pw={shareWebContent:"sharing.shareWebContent"};function Tw(e,t){try{Rw(e),Fw(e),kw(e)}catch(e){return Pn(()=>Promise.reject(e),t)}Kr(ur,ln.content,ln.sidePanel,ln.task,ln.stage,ln.meetingStage);return Pn(Ow,t,tr(t?Ew:Iw,"sharing.shareWebContent"),e)}function Ow(e,t){return new Promise(n=>{if(!Mw())throw mn;n(bc(e,Pw.shareWebContent,t))})}function Rw(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:He.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Fw(e){let t;if(e.content.some(e=>!e.type))throw t={errorCode:He.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some(t=>t.type!==e.content[0].type))throw t={errorCode:He.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function kw(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:He.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some(e=>!e.url))throw t={errorCode:He.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Mw(){return!(!Kr(ur)||!ur.supports.sharing)}const xw="v2";function Nw(){return new Promise(e=>{if(Kr(ur,ln.content),!Dw())throw mn;e(bc(tr(xw,"stageView.self.close"),"stageView.self.close"))})}function Dw(){var e;return Kr(ur)&&void 0!==(null===(e=ur.supports.stageView)||void 0===e?void 0:e.self)}const Uw="v2";var Lw;function Hw(e){return new Promise(t=>{if(Kr(ur,ln.content),!_w())throw mn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(bc(tr(Uw,"stageView.open"),"stageView.open",e))})}function _w(){return!(!Kr(ur)||!ur.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(Lw||(Lw={}));const Vw=10;var Bw=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 jw="v2";function Ww(e){return Bw(this,void 0,void 0,function*(){Kr(ur,ln.content,ln.task),$w(),Gw(e);const t=yield bc(tr(jw,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return Jw(e.maxVisualMediaCount,t),t})}function zw(e){return Bw(this,void 0,void 0,function*(){Kr(ur,ln.content,ln.task),$w(),Gw(e);const t=yield bc(tr(jw,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return Jw(e.maxVisualMediaCount,t),t})}function qw(){return!!(Kr(ur)&&ur.supports.visualMedia&&ur.supports.visualMedia.image&&ur.supports.permissions)}function $w(){if(!qw())throw mn}function Gw(e){if(!e||e.maxVisualMediaCount>Vw||e.maxVisualMediaCount<1)throw Cn}function Jw(e,t){if(t.length>e)throw yn}const Kw="v2";var Qw,Zw;function Xw(){if(Kr(ur,ln.content,ln.task),!qw())throw mn;const e=_e.Media;return bc(tr(Kw,"visualMedia.hasPermission"),"permissions.has",e)}function Yw(){if(Kr(ur,ln.content,ln.task),!qw())throw mn;const e=_e.Media;return bc(tr(Kw,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(Qw||(Qw={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Zw||(Zw={}));var eC=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};let tC=null;function nC(){return eC(this,void 0,void 0,function*(){return null===tC&&(tC=(yield Lo()).app.host.name),tC})}var rC=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 oC(){return rC(this,void 0,void 0,function*(){if(Kr(ur),!aC())throw mn;return!(!ur.isLegacyTeams||Kn.hostClientType!==cn.android&&Kn.hostClientType!==cn.ios&&Kn.hostClientType!==cn.ipados&&Kn.hostClientType!==cn.visionOS||(yield iC())!==un.teams)||(yield Cc(tr("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))})}function iC(){return rC(this,void 0,void 0,function*(){return nC()})}function aC(){return Kr(ur)&&void 0!==ur.supports.webStorage}const sC="v2";var cC;function uC(e){const t=tr(sC,"call.startCall");return new Promise(n=>{var r;if(Kr(ur,ln.content,ln.task),!lC())throw mn;if(!ur.isLegacyTeams)return Fc(t,"call.startCall",[e],n);n(Cc(t,"executeDeepLink",mh(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(cC.Video),e.source)).then(e=>{if(!e)throw new Error(ft);return e}))})}function lC(){return!(!Kr(ur)||!ur.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(cC||(cC={}));const dC="v1";function fC(){oa(tr(dC,"appInitialization.notifyAppLoaded"))}function pC(){Fc(tr(dC,"appInitialization.notifySuccess"),Ro.Success,[Er])}function gC(e){aa(tr(dC,"appInitialization.notifyFailure"),e)}function hC(e){ia(tr(dC,"appInitialization.notifyExpectedFailure"),e)}const mC=er("thirdPartyCloudStorage"),vC="v2";class wC{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let CC=[],yC=null,SC=!0,bC=null;function AC(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(!e||""===e){return void t([],{errorCode:He.INVALID_ARGUMENTS})}if(Kr(ur,ln.content,ln.task),!IC())throw mn;if(bC)throw bC=null,new Error("getDragAndDropFiles cannot be called twice");bC=t,SC=!0,Fc(tr(vC,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],EC)}function EC(e){if(bC)if(e&&e.error)bC([],e.error),bC=null;else if(e&&e.fileChunk)try{SC||0!==e.fileChunk.chunkSequence||(mC("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),SC=!0,bC([],{errorCode:He.INTERNAL_ERROR,message:"error occurred while receiving data"}),CC=[],bC=null);const t=Wh(e.fileChunk,e.fileType);if(t?(yC||(yC=new wC(e.fileType,[])),yC.assembleAttachment.push(t)):(mC(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),bC?bC([],{errorCode:He.INTERNAL_ERROR,message:"error occurred while receiving data"}):bC=null,CC=[],bC=null,SC=!0),SC=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&yC){const t=jh(yC.assembleAttachment,yC.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});CC.push(n)}e.isLastFile&&bC&&(bC(CC,e.error),CC=[],bC=null,SC=!0),yC=null}}catch(e){bC&&(bC([],{errorCode:He.INTERNAL_ERROR,message:e}),CC=[],bC=null,SC=!0)}else bC([],{errorCode:He.INTERNAL_ERROR,message:"data received is null"}),CC=[],bC=null,SC=!0}function IC(){return!(!Kr(ur)||!ur.supports.thirdPartyCloudStorage)}const PC="v1";function TC(e,t){ra(tr(PC,"initialize"),t).then(()=>{e&&e()})}function OC(){Kv()}function RC(){Qv()}function FC(e){Jr(),Fc(tr(PC,"getContext"),"getContext",t=>{t.frameContext||(t.frameContext=Kn.frameContext),e(t)})}function kC(e){fa(tr(PC,"registerOnThemeChangeHandlerHelper"),e)}function MC(e){Ms(tr(PC,"registerFullScreenHandler"),"fullScreenChange",e,[])}function xC(e){Ms(tr(PC,"registerAppButtonClickHandler"),"appButtonClick",e,[ln.content])}function NC(e){Ms(tr(PC,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[ln.content])}function DC(e){Ms(tr(PC,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[ln.content])}function UC(e){xa(tr(PC,"registerBackButtonHandler"),e)}function LC(e){Xv(tr(PC,"registerOnLoadHandler"),e)}function HC(e){ew(tr(PC,"registerBeforeUnloadHandler"),e)}function _C(e){Ms(tr(PC,"registerFocusEnterHandler"),"focusEnter",e,[])}function VC(e){Ms(tr(PC,"registerChangeSettingsHandler"),"changeSettings",e,[ln.content])}function BC(e,t){Kr(ur),cs(tr(PC,"getTabInstances"),t).then(t=>{e(t)})}function jC(e,t){Kr(ur),us(tr(PC,"getMruTabInstances"),t).then(t=>{e(t)})}function WC(e){ls(tr(PC,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function zC(e,t){Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage);const n=null!=t?t:Sn();ga(tr(PC,"executeDeepLink"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function qC(e){ds(tr(PC,"setFrameContext"),e)}function $C(e,t,n){ra(tr(PC,"initializeWithFrameContext"),n).then(()=>t&&t()),ds(tr(PC,"setFrameContext"),e)}const GC="v1";function JC(e){ss(tr(GC,"navigation.returnFocus"),e)}function KC(e,t){Kr(ur);const n=null!=t?t:Sn();as(tr(GC,"navigation.navigateToTab"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function QC(e,t){Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.remove,ln.task,ln.stage,ln.meetingStage);const n=null!=t?t:Sn();os(tr(GC,"navigation.navigateCrossDomain"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function ZC(e){Kr(ur);const t=null!=e?e:Sn();is(tr(GC,"navigation.navigateBack")).then(()=>{t(!0)}).catch(e=>{t(!1,e.message)})}const XC="v1";function YC(e){fs(tr(XC,"settings.setValidityState"),e)}function ey(e){Kr(ur,ln.content,ln.settings,ln.remove,ln.sidePanel),ps(tr(XC,"settings.getSettings")).then(t=>{e(t)})}function ty(e,t){Kr(ur,ln.content,ln.settings,ln.sidePanel);const n=null!=t?t:Sn();gs(tr(XC,"settings.setSettings"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function ny(e){Wi(tr(XC,"settings.registerOnSaveHandler"),e)}function ry(e){qi(tr(XC,"settings.registerOnRemoveHandler"),e)}var oy=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 iy="v1";function ay(e,t){const n=tr(iy,"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?(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),Fc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?li(n,ly(e),r):ui(n,uy(e),r),new jm}function sy(e){e=dy(e);const{width:t,height:n}=e,r=oy(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ci(tr(iy,"tasks.updateTask"),e)}function cy(e,t){di(tr(iy,"tasks.submitTask"),e,t)}function uy(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:gn.Small,width:e.width?e.width:gn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function ly(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:gn.Small,width:e.width?e.width:gn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function dy(e){return e.height=e.height?e.height:gn.Small,e.width=e.width?e.width:gn.Small,e}const fy="v2";var py,gy;function hy(){return!(!Kr(ur,ln.meetingStage,ln.sidePanel,ln.content)||!ur.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(py||(py={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(gy||(gy={}));class my{getFluidTenantInfo(){return vy(),new Promise(e=>{e(bc(tr(fy,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))})}getFluidToken(e){return vy(),new Promise(t=>{t(bc(tr(fy,"interactive.getFluidToken"),"interactive.getFluidToken",e))})}getFluidContainerId(){return vy(),new Promise(e=>{e(bc(tr(fy,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))})}setFluidContainerId(e){return vy(),new Promise(t=>{t(bc(tr(fy,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))})}getNtpTime(){return vy(),new Promise(e=>{e(bc(tr(fy,"interactive.getNtpTime"),"interactive.getNtpTime"))})}registerClientId(e){return vy(),new Promise(t=>{t(bc(tr(fy,"interactive.registerClientId"),"interactive.registerClientId",e))})}getClientRoles(e){return vy(),new Promise(t=>{t(bc(tr(fy,"interactive.getClientRoles"),"interactive.getClientRoles",e))})}getClientInfo(e){return vy(),new Promise(t=>{t(bc(tr(fy,"interactive.getClientInfo"),"interactive.getClientInfo",e))})}static create(){return vy(),new my}}function vy(){if(!hy())throw new Error("LiveShareHost Not supported")}var wy=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 Cy(e){try{return e.cartItems=yy(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function yy(e){return e.map(e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=yy(e.accessories)),e})}const Sy=e=>{try{return e.map(e=>{const{imageURL:t,accessories:n}=e,r=wy(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Sy(n)),o})}catch(e){throw new Error("Error serializing cart items")}};function by(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)Ey(t),Ay(t.accessories)}function Ay(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");Ey(t)}}}function Ey(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");Py(e.price),Ty(e.quantity)}function Iy(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===sn(e))throw new Error("id must be a valid UUID")}}function Py(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 Ty(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Oy(e){if(!Object.values(My).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Ry="v2",Fy={majorVersion:1,minorVersion:1};var ky,My;function xy(){if(Kr(ur,ln.content,ln.task),!Ly())throw mn;return bc(tr(Ry,"marketplace.getCart"),"marketplace.getCart",Fy).then(Cy)}function Ny(e){if(Kr(ur,ln.content,ln.task),!Ly())throw mn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return Iy(null==e?void 0:e.cartId),by(null==e?void 0:e.cartItems),bc(tr(Ry,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Sy(e.cartItems),cartVersion:Fy})).then(Cy)}function Dy(e){if(Kr(ur,ln.content,ln.task),!Ly())throw mn;if(!e)throw new Error("removeCartItemsParams must be provided");if(Iy(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 bc(tr(Ry,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Fy})).then(Cy)}function Uy(e){if(Kr(ur,ln.content,ln.task),!Ly())throw mn;if(!e)throw new Error("updateCartStatusParams must be provided");return Iy(null==e?void 0:e.cartId),Oy(null==e?void 0:e.cartStatus),bc(tr(Ry,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Fy})).then(Cy)}function Ly(){return!(!Kr(ur)||!ur.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(ky||(ky={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(My||(My={}));var Hy=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())})};class _y{constructor(e){this.event=e}serialize(){return{altKey:this.event.altKey,bubbles:this.event.bubbles,cancelBubble:this.event.cancelBubble,charCode:this.event.charCode,code:this.event.code,composed:this.event.composed,ctrlKey:this.event.ctrlKey,defaultPrevented:this.event.defaultPrevented,detail:this.event.detail,eventPhase:this.event.eventPhase,isComposing:this.event.isComposing,isTrusted:this.event.isTrusted,key:this.event.key,keyCode:this.event.keyCode,location:this.event.location,metaKey:this.event.metaKey,repeat:this.event.repeat,returnValue:this.event.returnValue,shiftKey:this.event.shiftKey,timeStamp:this.event.timeStamp,type:this.event.type,which:this.event.which}}}function Vy(e){return e.toLowerCase().split("+").sort().join("+")}function By(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function jy(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()}function Wy(e,t){if(jy(t)){const n=By(t);if(e.has(n))return{matchedShortcut:n,isOverridable:Jy.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function zy(e){Ky.clear(),e.shortcuts.forEach(e=>{Ky.add(Vy(e))}),Jy.clear(),e.overridableShortcuts.forEach(e=>{Jy.add(Vy(e))})}class qy extends Xi{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function $y(e){Rs(tr("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function Gy(e){if(e.target.closest(`[${nS}]`))return;const{matchedShortcut:t,isOverridable:n}=Wy(Ky,e);if(!t)return;if(n&&Qy){if(Qy(e,{matchedShortcut:t}))return}Pc("shortcutRelay.forwardShortcutEvent",[new _y(e)],tr("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const Jy=new Set,Ky=new Set;let Qy,Zy=!1;function Xy(e){if(!tS())throw mn;const t=Qy;return Qy=e,t}function Yy(){if(!tS())throw mn;Zy=!1,Ky.clear(),Jy.clear(),Qy=void 0,document.removeEventListener("keydown",Gy,{capture:!0})}function eS(){return Hy(this,void 0,void 0,function*(){if(!tS())throw mn;zy(yield Ic("shortcutRelay.getHostShortcuts",[],new qy,tr("v2","shortcutRelay.getHostShortcuts"))),Zy||document.addEventListener("keydown",Gy,{capture:!0}),Zy=!0,$y(e=>{zy(e)})})}function tS(){return!(!Kr(ur)||!ur.supports.shortcutRelay)}const nS="data-disable-shortcuts-forwarding"})(),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()}(Object("undefined"!=typeof self?self:this),()=>(()=>{var e={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}},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}}},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))}},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}},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||"function"==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:()=>De,AppId:()=>co,ChannelType:()=>hn,ChildAppWindow:()=>jm,DialogDimension:()=>gn,EduType:()=>We,EmailAddress:()=>eh,ErrorCode:()=>He,FileOpenPreference:()=>Ue,FrameContexts:()=>ln,HostClientType:()=>cn,HostName:()=>un,LiveShareHost:()=>my,NotificationTypes:()=>au,ParentAppWindow:()=>Wm,RenderingSurfaces:()=>dn,SecondaryM365ContentIdName:()=>Le,TaskModuleDimension:()=>gn,TeamType:()=>fn,UUID:()=>Gn,UserAuthenticationState:()=>fl,UserSettingTypes:()=>cu,UserTeamRole:()=>pn,ValidatedSafeString:()=>so,ViewerActionTypes:()=>su,activateChildProxyingCommunication:()=>Pr,app:()=>i,appEntity:()=>W,appInitialization:()=>Re,appInstallDialog:()=>te,appPerformanceMetrics:()=>ee,authentication:()=>Y,barCode:()=>re,calendar:()=>ge,call:()=>Oe,chat:()=>oe,clipboard:()=>ie,conversations:()=>b,copilot:()=>O,dialog:()=>f,enablePrintCapability:()=>OC,executeDeepLink:()=>zC,externalAppAuthentication:()=>R,externalAppAuthenticationForCEA:()=>F,externalAppCardActions:()=>k,externalAppCardActionsForCEA:()=>M,externalAppCardActionsForDA:()=>x,externalAppCommands:()=>N,files:()=>U,geoLocation:()=>ce,getAdaptiveCardSchemaVersion:()=>Vm,getContext:()=>FC,getCurrentFeatureFlagsState:()=>Rr,getMruTabInstances:()=>jC,getTabInstances:()=>BC,hostEntity:()=>Q,initialize:()=>TC,initializeWithFrameContext:()=>$C,liveShare:()=>xe,location:()=>le,logs:()=>S,mail:()=>me,marketplace:()=>Ne,media:()=>ne,meeting:()=>fe,meetingRoom:()=>D,menus:()=>p,messageChannels:()=>L,monetization:()=>pe,navigateBack:()=>ZC,navigateCrossDomain:()=>QC,navigateToTab:()=>KC,nestedAppAuth:()=>ae,nestedAppAuthBridge:()=>H,notifications:()=>_,openFilePreview:()=>hu,otherAppStateChange:()=>V,overwriteFeatureFlagsState:()=>kr,pages:()=>y,people:()=>we,plugins:()=>B,print:()=>RC,profile:()=>Ce,registerAppButtonClickHandler:()=>xC,registerAppButtonHoverEnterHandler:()=>NC,registerAppButtonHoverLeaveHandler:()=>UC,registerBackButtonHandler:()=>DC,registerBeforeUnloadHandler:()=>HC,registerChangeSettingsHandler:()=>VC,registerCustomHandler:()=>pu,registerFocusEnterHandler:()=>_C,registerFullScreenHandler:()=>MC,registerOnLoadHandler:()=>LC,registerOnThemeChangeHandler:()=>kC,registerUserSettingsChangeHandler:()=>gu,remoteCamera:()=>j,returnFocus:()=>JC,search:()=>ye,secondaryBrowser:()=>ue,sendCustomEvent:()=>fu,sendCustomMessage:()=>du,setFeatureFlagsState:()=>Fr,setFrameContext:()=>qC,settings:()=>ke,shareDeepLink:()=>WC,sharing:()=>be,shortcutRelay:()=>qe,sidePanelInterfaces:()=>I,stageView:()=>Ee,store:()=>Z,tasks:()=>Me,teams:()=>$,teamsCore:()=>ve,thirdPartyCloudStorage:()=>Fe,uploadCustomApp:()=>lu,version:()=>Er,videoEffects:()=>G,videoEffectsEx:()=>J,visualMedia:()=>Pe,webStorage:()=>Te,widgetHosting:()=>X});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>vo,getTelemetryPort:()=>ho,isSupported:()=>mo});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Eo,getDataLayerPort:()=>bo,isSupported:()=>Ao});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Io,registerOnResumeHandler:()=>Po});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>ko,FailedReason:()=>Fo,Messages:()=>Ro,_initialize:()=>Uo,_uninitialize:()=>Do,getContext:()=>Lo,getFrameContext:()=>xo,initialize:()=>No,isInitialized:()=>Mo,lifecycle:()=>o,notifyAppLoaded:()=>Ho,notifyExpectedFailure:()=>Bo,notifyFailure:()=>Vo,notifySuccess:()=>_o,openLink:()=>qo,registerHostToAppPerformanceMetricsHandler:()=>zo,registerOnContextChangeHandler:()=>Wo,registerOnThemeChangeHandler:()=>jo});var a={};n.r(a),n.d(a,{isSupported:()=>Jo,resize:()=>Go});var s={};n.r(s),n.d(s,{isSupported:()=>Qo,open:()=>Ko});var c={};n.r(c),n.d(c,{isSupported:()=>ei,registerOnMessageFromParent:()=>Yo,sendMessageToDialog:()=>Xo,sendMessageToParentFromDialog:()=>Zo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>ii,getDialogInfoFromUrlDialogInfo:()=>oi,isSupported:()=>ri,open:()=>ti,parentCommunication:()=>c,submit:()=>ni});var l={};n.r(l),n.d(l,{isSupported:()=>vi,open:()=>mi});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>Ci,open:()=>wi});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>yi,isSupported:()=>Si,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>Ai,MenuItem:()=>Ii,MenuListType:()=>Ei,initialize:()=>ki,isSupported:()=>Hi,setNavBarMenu:()=>Ni,setUpViews:()=>Mi,showActionMenu:()=>Di});var g={};n.r(g),n.d(g,{initialize:()=>_i,isSupported:()=>Zi,registerChangeConfigHandler:()=>Gi,registerOnRemoveHandler:()=>zi,registerOnRemoveHandlerHelper:()=>qi,registerOnSaveHandler:()=>ji,registerOnSaveHandlerHelper:()=>Wi,setConfig:()=>Bi,setValidityState:()=>Vi});var h={};n.r(h),n.d(h,{isSupported:()=>Ra,onClick:()=>Pa,onHoverEnter:()=>Ta,onHoverLeave:()=>Oa});var m={};n.r(m),n.d(m,{_initialize:()=>Fa,isSupported:()=>Na,navigateBack:()=>ka,registerBackButtonHandler:()=>Ma,registerBackButtonHandlerHelper:()=>xa});var v={};n.r(v),n.d(v,{isSupported:()=>La,navigateTo:()=>Ua,navigateToDefaultPage:()=>Da});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Ha,exitFullscreen:()=>_a,isSupported:()=>Va});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Wa,getTabInstances:()=>ja,isSupported:()=>za,navigateToTab:()=>Ba});var y={};n.r(y),n.d(y,{EnterFocusType:()=>qa,ReturnFocusType:()=>$a,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>Za,initializeWithFrameContext:()=>Qa,isSupported:()=>ns,navigateCrossDomain:()=>Xa,navigateToApp:()=>Ya,registerFocusEnterHandler:()=>Ja,registerFullScreenHandler:()=>ts,returnFocus:()=>Ga,setCurrentFrame:()=>Ka,shareDeepLink:()=>es,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>iu,registerGetLogHandler:()=>ou});var b={};n.r(b),n.d(b,{closeConversation:()=>wu,getChatMembers:()=>Cu,isSupported:()=>yu,openConversation:()=>vu});var A={};n.r(A),n.d(A,{isSupported:()=>Eu,sendCustomTelemetryData:()=>Iu});var E={};n.r(E),n.d(E,{getEligibilityInfo:()=>Fu,isSupported:()=>Ru});var I={};n.r(I),n.d(I,{ContentItemType:()=>Mu,CopilotMode:()=>Du,MediaSelectionType:()=>xu,SidePanelErrorCode:()=>Vu,SidePanelErrorImpl:()=>Bu,TeamsContextType:()=>Hu,TeamsDimensionName:()=>Uu,TeamsSessionType:()=>Nu,TranscriptState:()=>Lu,UserConsent:()=>_u});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>Ku,getContent:()=>$u,isResponseAReportableError:()=>qu,isSupported:()=>zu,preCheckUserConsent:()=>Gu,registerUserActionContentSelect:()=>Ju});var T={};n.r(T),n.d(T,{closeSidePanel:()=>rl,isSupported:()=>nl});var O={};n.r(O),n.d(O,{customTelemetry:()=>A,eligibility:()=>E,sidePanel:()=>P,view:()=>T});var R={};n.r(R),n.d(R,{ActionExecuteInvokeRequestType:()=>cl,ActionExecuteResponseHandler:()=>pl,InvokeErrorCode:()=>dl,InvokeResponseType:()=>ll,OriginalRequestType:()=>ul,SerializableActionExecuteInvokeRequest:()=>al,SerializableConnectorParameters:()=>Al,UserAuthenticationState:()=>fl,authenticateAndResendRequest:()=>wl,authenticateWithConnector:()=>El,authenticateWithOauth2:()=>Sl,authenticateWithPowerPlatformConnectorPlugins:()=>bl,authenticateWithSSO:()=>Cl,authenticateWithSSOAndResendRequest:()=>yl,disconnectConnector:()=>Tl,getUserAuthenticationStateForConnector:()=>Pl,isActionExecuteResponse:()=>sl,isInvokeError:()=>gl,isSupported:()=>Ol,validateActionExecuteInvokeRequest:()=>ml});var F={};n.r(F),n.d(F,{authenticateAndResendRequest:()=>xl,authenticateWithOauth:()=>Ml,authenticateWithSSO:()=>kl,authenticateWithSSOAndResendRequest:()=>Nl,isSupported:()=>Ul,validateInput:()=>Dl});var k={};n.r(k),n.d(k,{ActionOpenUrlErrorCode:()=>_l,ActionOpenUrlType:()=>Hl,isSupported:()=>jl,processActionOpenUrl:()=>Bl,processActionSubmit:()=>Vl});var M={};n.r(M),n.d(M,{isSupported:()=>Gl,processActionOpenUrl:()=>ql,processActionSubmit:()=>$l});var x={};n.r(x),n.d(x,{SerializableActionOpenUrlDialogInfo:()=>td,isSupported:()=>Yl,processActionOpenUrlDialog:()=>Xl});var N={};n.r(N),n.d(N,{isSupported:()=>id,processActionCommand:()=>od});var U={};n.r(U),n.d(U,{CloudStorageProvider:()=>sd,CloudStorageProviderFileAction:()=>fd,CloudStorageProviderType:()=>cd,DocumentLibraryAccessType:()=>ld,FileDownloadStatus:()=>dd,SpecialDocumentLibraryType:()=>ud,addCloudStorageFolder:()=>gd,addCloudStorageProvider:()=>bd,addCloudStorageProviderFile:()=>Ed,copyMoveFiles:()=>Cd,deleteCloudStorageFolder:()=>hd,deleteCloudStorageProviderFile:()=>Pd,downloadCloudStorageProviderFile:()=>Td,getCloudStorageFolderContents:()=>md,getCloudStorageFolders:()=>pd,getExternalProviders:()=>wd,getFileDownloads:()=>yd,openCloudStorageFile:()=>vd,openDownloadFolder:()=>Sd,registerCloudStorageProviderContentChangeHandler:()=>Fd,registerCloudStorageProviderListChangeHandler:()=>Rd,removeCloudStorageProvider:()=>Ad,renameCloudStorageProviderFile:()=>Id,uploadCloudStorageProviderFile:()=>Od});var D={};n.r(D),n.d(D,{getPairedMeetingRoomInfo:()=>xd,isSupported:()=>Ld,registerMeetingRoomCapabilitiesUpdateHandler:()=>Ud,registerMeetingRoomStatesUpdateHandler:()=>Dd,sendCommandToPairedMeetingRoom:()=>Nd});var L={};n.r(L),n.d(L,{dataLayer:()=>t,isSupported:()=>Hd,telemetry:()=>e});var H={};n.r(H),n.d(H,{initialize:()=>Wd,version:()=>_d});var _={};n.r(_),n.d(_,{isSupported:()=>Xd,showNotification:()=>Zd});var V={};n.r(V),n.d(V,{isSupported:()=>rf,notifyInstallCompleted:()=>nf,registerAppInstallationHandler:()=>ef,unregisterAppInstallationHandler:()=>tf});var B={};n.r(B),n.d(B,{isSupported:()=>sf,registerPluginMessage:()=>uf,sendPluginMessage:()=>cf});var j={};n.r(j),n.d(j,{ControlCommand:()=>gf,ErrorReason:()=>hf,SessionTerminatedReason:()=>mf,getCapableParticipants:()=>vf,isSupported:()=>If,registerOnCapableParticipantsChangeHandler:()=>Sf,registerOnDeviceStateChangeHandler:()=>Af,registerOnErrorHandler:()=>bf,registerOnSessionStatusChangeHandler:()=>Ef,requestControl:()=>wf,sendControlCommand:()=>Cf,terminateSession:()=>yf});var W={};n.r(W),n.d(W,{isSupported:()=>Of,selectAppEntity:()=>Tf});var z={};n.r(z),n.d(z,{getUserJoinedTeams:()=>Ff,isSupported:()=>kf});var q={};n.r(q),n.d(q,{getConfigSetting:()=>Nf,isSupported:()=>Uf,joinedTeams:()=>z});var $={};n.r($),n.d($,{ChannelType:()=>Lf,fullTrust:()=>q,getTeamChannels:()=>Hf,isSupported:()=>Vf,refreshSiteUrl:()=>_f});var G={};n.r(G),n.d(G,{EffectChangeType:()=>Qf,EffectFailureReason:()=>Zf,VideoFrameFormat:()=>Kf,isSupported:()=>rp,notifySelectedVideoEffectChanged:()=>Yf,registerForVideoEffect:()=>ep,registerForVideoFrame:()=>Xf});var J={};n.r(J),n.d(J,{ErrorLevel:()=>Tp,frameProcessingTimeoutInMs:()=>Ip,isSupported:()=>Up,notifyFatalError:()=>Hp,notifySelectedVideoEffectChanged:()=>Mp,registerForVideoEffect:()=>xp,registerForVideoFrame:()=>Op,updatePersonalizedEffects:()=>Np});var K={};n.r(K),n.d(K,{addAndConfigure:()=>$p,getAll:()=>Gp,isSupported:()=>Zp,reconfigure:()=>Jp,remove:()=>Qp,rename:()=>Kp});var Q={};n.r(Q),n.d(Q,{AppTypes:()=>eg,isSupported:()=>tg,tab:()=>K});var Z={};n.r(Z),n.d(Z,{isSupported:()=>dg,openAppDetail:()=>cg,openFullStore:()=>sg,openInContextStore:()=>ug,openSpecificStore:()=>lg});var X={};n.r(X),n.d(X,{callTool:()=>wg,contentSizeChanged:()=>Ag,isSupported:()=>vg,notifyIntrinsicHeight:()=>bg,openExternal:()=>Ig,registerModalCloseHandler:()=>Pg,requestDisplayMode:()=>yg,requestModal:()=>Sg,sendFollowUpMessage:()=>Cg,setWidgetState:()=>Eg});var Y={};n.r(Y),n.d(Y,{DataResidency:()=>Qg,authenticate:()=>jg,getAuthToken:()=>zg,getUser:()=>$g,notifyFailure:()=>Kg,notifySuccess:()=>Jg,registerAuthenticationHandlers:()=>Bg});var ee={};n.r(ee),n.d(ee,{isSupported:()=>Zg,registerHostMemoryMetricsHandler:()=>Xg});var te={};n.r(te),n.d(te,{isSupported:()=>Sh,openAppInstallDialog:()=>yh});var ne={};n.r(ne),n.d(ne,{CameraStartMode:()=>Ph,File:()=>kh,FileFormat:()=>Eh,ImageOutputFormats:()=>Fh,ImageUriType:()=>Rh,Media:()=>Dh,MediaControllerEvent:()=>Ih,MediaType:()=>Oh,Source:()=>Th,VideoController:()=>Hh,captureImage:()=>Mh,hasPermission:()=>xh,requestPermission:()=>Nh,scanBarCode:()=>Bh,selectMedia:()=>_h,viewImages:()=>Vh});var re={};n.r(re),n.d(re,{hasPermission:()=>nm,isSupported:()=>om,requestPermission:()=>rm,scanBarCode:()=>tm});var oe={};n.r(oe),n.d(oe,{isSupported:()=>um,openChat:()=>am,openGroupChat:()=>cm});var ie={};n.r(ie),n.d(ie,{isSupported:()=>gm,read:()=>pm,write:()=>fm});var ae={};n.r(ae),n.d(ae,{addNAATrustedOrigins:()=>Pm,canParentManageNAATrustedOrigins:()=>Sm,deleteNAATrustedOrigins:()=>Tm,getParentOrigin:()=>ym,isDeeplyNestedAuthSupported:()=>bm,isNAAChannelRecommended:()=>Cm});var se={};n.r(se),n.d(se,{chooseLocation:()=>Mm,isSupported:()=>Nm,showLocation:()=>xm});var ce={};n.r(ce),n.d(ce,{getCurrentLocation:()=>Dm,hasPermission:()=>Lm,isSupported:()=>_m,map:()=>se,requestPermission:()=>Hm});var ue={};n.r(ue),n.d(ue,{isSupported:()=>$m,open:()=>qm});var le={};n.r(le),n.d(le,{getLocation:()=>Jm,isSupported:()=>Qm,showLocation:()=>Km});var de={};n.r(de),n.d(de,{setOptions:()=>Xm});var fe={};n.r(fe),n.d(fe,{CallType:()=>ov,EventActionSource:()=>av,MeetingReactionType:()=>nv,MeetingType:()=>rv,SharingProtocol:()=>iv,appShareButton:()=>de,getAppContentStageSharingCapabilities:()=>vv,getAppContentStageSharingState:()=>Cv,getAuthenticationTokenForAnonymousUser:()=>dv,getIncomingClientAudioState:()=>sv,getLiveStreamState:()=>fv,getMeetingDetails:()=>uv,getMeetingDetailsVerbose:()=>lv,joinMeeting:()=>Av,registerLiveStreamChangedHandler:()=>hv,registerMeetingReactionReceivedHandler:()=>bv,registerRaiseHandStateChangedHandler:()=>Sv,registerSpeakingStateChangeHandler:()=>yv,requestAppAudioHandling:()=>Ev,requestStartLiveStreaming:()=>pv,requestStopLiveStreaming:()=>gv,shareAppContentToStage:()=>mv,stopSharingAppContentToStage:()=>wv,toggleIncomingClientAudio:()=>cv,updateMicState:()=>Tv});var pe={};n.r(pe),n.d(pe,{isSupported:()=>Mv,openPurchaseExperience:()=>kv});var ge={};n.r(ge),n.d(ge,{composeMeeting:()=>Uv,isSupported:()=>Dv,openCalendarItem:()=>Nv});var he={};n.r(he),n.d(he,{composeMailWithHandoff:()=>Vv,isSupported:()=>Bv});var me={};n.r(me),n.d(me,{ComposeMailType:()=>Gv,composeMail:()=>qv,handoff:()=>he,isSupported:()=>$v,openMailItem:()=>zv});var ve={};n.r(ve),n.d(ve,{enablePrintCapability:()=>Kv,isSupported:()=>tw,print:()=>Qv,registerBeforeUnloadHandler:()=>Yv,registerBeforeUnloadHandlerHelper:()=>ew,registerOnLoadHandler:()=>Zv,registerOnLoadHandlerHelper:()=>Xv});var we={};n.r(we),n.d(we,{isSupported:()=>aw,selectPeople:()=>ow});var Ce={};n.r(Ce),n.d(Ce,{isSupported:()=>dw,showProfile:()=>lw});var ye={};n.r(ye),n.d(ye,{closeSearch:()=>Cw,isSupported:()=>ww,registerHandlers:()=>mw,unregisterHandlers:()=>vw});var Se={};n.r(Se),n.d(Se,{getContent:()=>bw,isSupported:()=>Aw});var be={};n.r(be),n.d(be,{SharingAPIMessages:()=>Pw,history:()=>Se,isSupported:()=>Mw,shareWebContent:()=>Tw});var Ae={};n.r(Ae),n.d(Ae,{close:()=>Nw,isSupported:()=>Uw});var Ee={};n.r(Ee),n.d(Ee,{StageViewOpenMode:()=>Lw,isSupported:()=>_w,open:()=>Hw,self:()=>Ae});var Ie={};n.r(Ie),n.d(Ie,{captureImages:()=>Ww,isSupported:()=>qw,retrieveImages:()=>zw});var Pe={};n.r(Pe),n.d(Pe,{CameraRestriction:()=>Qw,Source:()=>Zw,hasPermission:()=>Xw,image:()=>Ie,requestPermission:()=>Yw});var Te={};n.r(Te),n.d(Te,{isSupported:()=>aC,isWebStorageClearedOnUserLogOut:()=>oC});var Oe={};n.r(Oe),n.d(Oe,{CallModalities:()=>cC,isSupported:()=>lC,startCall:()=>uC});var Re={};n.r(Re),n.d(Re,{ExpectedFailureReason:()=>ko,FailedReason:()=>Fo,Messages:()=>Ro,notifyAppLoaded:()=>fC,notifyExpectedFailure:()=>hC,notifyFailure:()=>gC,notifySuccess:()=>pC});var Fe={};n.r(Fe),n.d(Fe,{getDragAndDropFiles:()=>AC,isSupported:()=>IC});var ke={};n.r(ke),n.d(ke,{getSettings:()=>ey,registerOnRemoveHandler:()=>ry,registerOnSaveHandler:()=>ny,setSettings:()=>ty,setValidityState:()=>YC});var Me={};n.r(Me),n.d(Me,{getDefaultSizeIfNotProvided:()=>dy,startTask:()=>ay,submitTask:()=>cy,updateTask:()=>sy});var xe={};n.r(xe),n.d(xe,{ContainerState:()=>gy,LiveShareHost:()=>my,UserMeetingRole:()=>py,isSupported:()=>hy});var Ne={};n.r(Ne),n.d(Ne,{CartStatus:()=>My,Intent:()=>ky,addOrUpdateCartItems:()=>Ny,cartVersion:()=>Fy,getCart:()=>xy,isSupported:()=>Ly,removeCartItems:()=>Uy,updateCartStatus:()=>Dy});var Ue,De,Le,He,_e,Ve,Be,je,We,ze,qe={};function $e(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(qe),n.d(qe,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>nS,enableShortcutRelayCapability:()=>eS,isSupported:()=>tS,resetIsShortcutRelayCapabilityEnabled:()=>Yy,setOverridableShortcutHandler:()=>Xy}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Ue||(Ue={})),function(e){e.M365Content="m365content"}(De||(De={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Le||(Le={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(He||(He={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(_e||(_e={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Ve||(Ve={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Be||(Be={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(je||(je={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(We||(We={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(ze||(ze={}));const Ge=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.office365.us","outlook-dod.office365.us","webmail.apps.mil","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","*.outlook.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","fa000000125.officeapps.live.com","fa000000129.officeapps.live.com","fa000000124.officeapps.live.com","fa000000128.officeapps.live.com","fa000000136.mro1cdnstorage.public.cdn.office.net","fa000000136.mro1cdnstorage.public.onecdn.static.microsoft","substrate-msb-bizchatvnext-service.sdf01.substrate-msb-bingatwork.eastus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2sdf1.office-home-m365copilotapp.westus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2test1.office-home-m365copilotapp.westus2-test.cosmic-int.office.net","m365copilotapp.svc.cloud.microsoft","m365copilotapp.svc.cloud.dev.microsoft","ffc-copilot.officeapps.live.com","m365.cloud.dev.microsoft","m365.cloud.dev.microsoft:3001","portal.officeppe.com","ignite.m365.admin.cloud.microsoft","ignite.admin.cloud.microsoft","sdf.m365.admin.cloud.microsoft","admin-sdf.microsoft.com","canary.m365.admin.cloud.microsoft","ring0.m365.admin.cloud.microsoft","portal.office365.us","portal.apps.mil","www.ohome.apps.mil","www.office365.us"]}');const Je="2.0.1",Ke="2.0.2",Qe="2.0.3",Ze="2.0.4",Xe="2.0.1",Ye="1.9.0",et="2.0.0",tt="1.7.0",nt="1.8.0",rt="1.9.0",ot=n.t(Ge,2).validOrigins,it=1500,at=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),st="https",ct="teams.microsoft.com",ut="The library has not yet been initialized",lt="The runtime has not yet been initialized",dt="The runtime version is not supported",ft="The call was not properly started";var pt=n(933);const gt=mt,ht=2147483647;function mt(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 wt(e)}return vt(e,t,n)}function vt(e,t,n){if("string"==typeof e)return bt(e,t);if(ArrayBuffer.isView(e))return Rt(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(Et(e,ArrayBuffer)||e&&Et(e.buffer,ArrayBuffer))return Ft(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Et(e,SharedArrayBuffer)||e&&Et(e.buffer,SharedArrayBuffer)))return Ft(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 mt.from(r,t,n);const o=Zt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return mt.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 wt(e){return Ct(e),yt(e<0?0:0|St(e))}function Ct(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 yt(e){if(e>ht)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,mt.prototype),t}function St(e){if(e>=ht)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ht.toString(16)+" bytes");return 0|e}function bt(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!mt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|At(e,t);let r=yt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function At(e,t){if(mt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Et(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 It(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Pt(e).length;default:if(o)return r?-1:It(e).length;t=(""+t).toLowerCase(),o=!0}}function Et(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function It(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 Pt(e){return pt.toByteArray(Ot(e))}mt.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}}(),mt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),mt.from=function(e,t,n){return vt(e,t,n)},Object.setPrototypeOf(mt.prototype,Uint8Array.prototype),Object.setPrototypeOf(mt,Uint8Array),mt.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}},mt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==mt.prototype};const Tt=/[^+/0-9A-Za-z-_]/g;function Ot(e){if((e=(e=e.split("=")[0]).trim().replace(Tt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Rt(e){if(Et(e,Uint8Array)){const t=new Uint8Array(e);return Ft(t.buffer,t.byteOffset,t.byteLength)}return kt(e)}function Ft(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,mt.prototype),r}function kt(e){const t=e.length<0?0:0|St(e.length),n=yt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Mt(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 Ut(r)}function xt(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 Dt(this,t,n);case"utf8":case"utf-8":return Mt(this,t,n);case"ascii":return Lt(this,t,n);case"latin1":case"binary":return Ht(this,t,n);case"base64":return _t(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}mt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Mt(this,0,e):xt.apply(this,arguments)};const Nt=4096;function Ut(e){const t=e.length;if(t<=Nt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Nt));return n}function Dt(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+=Qt[e[r]];return o}function Lt(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 Ht(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 _t(e,t,n){return 0===t&&n===e.length?pt.fromByteArray(e):pt.fromByteArray(e.slice(t,n))}function Vt(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 Bt(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(Kt(r))return a;e[n+a]=r}return a}function jt(e,t,n,r){return Jt(It(t,e.length-n),e,n,r)}function Wt(e,t,n,r){return Jt($t(t),e,n,r)}function zt(e,t,n,r){return Jt(Pt(t),e,n,r)}function qt(e,t,n,r){return Jt(Gt(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 Gt(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 Jt(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 Kt(e){return e!=e}mt.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 Bt(this,e,t,n);case"utf8":case"utf-8":return jt(this,e,t,n);case"ascii":case"latin1":case"binary":return Wt(this,e,t,n);case"base64":return zt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Qt=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 Zt(e){if(mt.isBuffer(e)){const t=0|St(e.length),n=yt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Kt(e.length)?yt(0):kt(e):"Buffer"===e.type&&Array.isArray(e.data)?kt(e.data):void 0}const Xt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Yt;const en=new Uint8Array(16);function tn(){if(!Yt&&(Yt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Yt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yt(en)}const nn=[];for(let e=0;e<256;++e)nn.push((e+256).toString(16).slice(1));function rn(e,t=0){return nn[e[t+0]]+nn[e[t+1]]+nn[e[t+2]]+nn[e[t+3]]+"-"+nn[e[t+4]]+nn[e[t+5]]+"-"+nn[e[t+6]]+nn[e[t+7]]+"-"+nn[e[t+8]]+nn[e[t+9]]+"-"+nn[e[t+10]]+nn[e[t+11]]+nn[e[t+12]]+nn[e[t+13]]+nn[e[t+14]]+nn[e[t+15]]}const on=function(e,t,n){if(Xt.randomUUID&&!t&&!e)return Xt.randomUUID();const r=(e=e||{}).random||(e.rng||tn)();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 rn(r)},an=/^(?:[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 sn=function(e){return"string"==typeof e&&an.test(e)};var cn,un,ln,dn,fn,pn,gn,hn;!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"}(cn||(cn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(un||(un={})),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"}(ln||(ln={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(dn||(dn={})),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"}(fn||(fn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(pn||(pn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(gn||(gn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(hn||(hn={}));const mn={errorCode:He.NOT_SUPPORTED_ON_PLATFORM},vn={majorVersion:1,minorVersion:5},wn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},Cn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),yn=new Error("Invalid response: Received more images than the specified max limit in the response.");function Sn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function bn(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 An(){return on()}function En(e){return Object.keys(e).forEach(t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&En(e[t])}),Object.freeze(e)}function In(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(void 0,e)}).catch(e=>{t&&t(e)}),r}function Pn(e,t,...n){const r=e(...n);return r.then(()=>{t&&t(null)}).catch(e=>{t&&t(e)}),r}function Tn(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(null,e)}).catch(e=>{t&&t(e,null)}),r}function On(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 Rn(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 Fn(e){return!(bn(`${e.majorVersion}.${e.minorVersion}`,`${vn.majorVersion}.${vn.minorVersion}`)>=0)}function kn(e){return"https:"===e.protocol}function Mn(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=gt.from(t,"base64").toString();n(new Blob([o],{type:e}))})}function xn(e){return new Promise((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)})}function Nn(){if(Un())throw new Error("window object undefined at SSR check");return window}function Un(){return"undefined"==typeof window}function Dn(e,t){if(_n(e)||!Vn(e)||!Bn(e))throw t||new Error("id is not valid.")}function Ln(e,t){const n=e.toString().toLocaleLowerCase();if(_n(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!kn(e))throw t||new Error("Url should be a valid https url")}function Hn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function _n(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Vn(e){return e.length<256&&e.length>4}function Bn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function jn(e){if(!e)throw new Error("id must not be empty");if(!1===sn(e))throw new Error("id must be a valid UUID")}const Wn=!!performance&&"now"in performance;function zn(){return Wn?performance.now()+performance.timeOrigin:void 0}function qn(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=>qn(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=>qn(e[n],t+1))}function $n(e){var t,n;if(!(null===(n=null===(t=e.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)||void 0===n?void 0:n.ageGroup))return e;const r=e.hostVersionsInfo.appEligibilityInformation.ageGroup;return"nonadult"!==(null==r?void 0:r.toLowerCase())?e:Object.assign(Object.assign({},e),{hostVersionsInfo:Object.assign(Object.assign({},e.hostVersionsInfo),{appEligibilityInformation:Object.assign(Object.assign({},e.hostVersionsInfo.appEligibilityInformation),{ageGroup:je.NotAdult})})})}class Gn{constructor(e=An()){this.uuid=e,jn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Jn(e){if(!(e instanceof Gn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Kn{}Kn.initializeCalled=!1,Kn.initializeCompleted=!1,Kn.additionalValidOrigins=[],Kn.initializePromise=void 0,Kn.isFramelessWindow=!1,Kn.frameContext=void 0,Kn.hostClientType=void 0,Kn.printCapabilityEnabled=!1,Kn.teamsJsInstanceId=(new Gn).toString();var Qn=n(815);const Zn=new Gn,Xn=Qn.debug.formatArgs;Qn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Zn.toString()}]`,Xn.call(this,e)};const Yn=(0,Qn.debug)("teamsJs");function er(e){return Yn.extend(e)}function tr(e,t){return`${e}_${t}`}function nr(e){return/^v\d+_[\w.]+$/.test(e)}var rr=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 or=er("runtime"),ir=4;function ar(e){return e.apiVersion===ir}const sr={apiVersion:-1,supports:{}};function cr(e){if(ar(e))return!0;throw-1===e.apiVersion?new Error(lt):new Error(dt)}let ur=sr;const lr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:wn,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:{}}}},dr=[cn.desktop,cn.web,cn.rigel,cn.surfaceHub,cn.teamsRoomsWindows,cn.teamsRoomsAndroid,cn.teamsPhones,cn.teamsDisplays],fr=[cn.android,cn.ios,cn.ipados,cn.visionOS],pr=[...dr,...fr];function gr(e){let t=e;if(t.apiVersion<ir&&hr.forEach(e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))}),ar(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const hr=[{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=rr(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})}}}],mr="2.1.2",vr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:dr}],"1.9.0":[{capability:{location:{}},hostClientTypes:pr}],"2.0.0":[{capability:{people:{}},hostClientTypes:pr},{capability:{sharing:{}},hostClientTypes:[cn.desktop,cn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[cn.android,cn.desktop,cn.ios,cn.teamsRoomsAndroid,cn.teamsPhones,cn.teamsDisplays,cn.web]},{capability:{webStorage:{}},hostClientTypes:[cn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[cn.android,cn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[cn.android,cn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[cn.android,cn.ios,cn.ipados,cn.visionOS]}],"2.1.2":[]},wr=or.extend("generateBackCompatRuntimeConfig");function Cr(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]=Cr(e[r]||{},t[r]));return n}function yr(e,t,n){wr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);wr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach(t=>{bn(e,t)>=0&&n[t].forEach(e=>{void 0!==Kn.hostClientType&&e.hostClientTypes.includes(Kn.hostClientType)&&(r=Cr(r,e.capability))})});const o={apiVersion:ir,hostVersionsInfo:wn,isLegacyTeams:!0,supports:r};return wr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Sr=or.extend("applyRuntimeConfig");function br(e){"string"==typeof e.apiVersion&&(Sr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Sr("Fast-forwarding runtime %o",e);const t=gr(e);Sr("Applying runtime %o",t),ur=En(t)}function Ar(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Er="2.51.0",Ir={childProxyingCommunication:!1};function Pr(){Ir.childProxyingCommunication=!0}function Tr(){return Ir.childProxyingCommunication}let Or={disableEnforceOriginMatchForChildResponses:!1};function Rr(){return Or}function Fr(e){Or=e}function kr(e){return Fr(Object.assign(Object.assign({},Or),e)),Rr()}var Mr=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 xr=e=>{const{uuid:t}=e,n=Mr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Nr=e=>{const{uuidAsString:t}=e,n=Mr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Gn(t):void 0})},Ur=e=>{const{uuidAsString:t}=e,n=Mr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Gn(t):void 0})},Dr=e=>{const{uuid:t}=e,n=Mr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Lr(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 Hr=er("flushMessageQueue");function _r(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=xr(o);Hr("Flushing message %s from %s message queue via postMessage.",Lr(n),r),e.postMessage(n,t)}}}const Vr=/^[A-Za-z][A-Za-z\d+.-]*:\/\//;function Br(e,t){const n=e.split("."),r=t.split(".");if(r.length!==n.length)return!1;let o=!1;for(let e=0;e<n.length;e++)if(n[e]!==r[e]){if("*"!==n[e])return!1;if(e===n.length-1||o)return!1;o=!0}return!0}class jr{constructor(e,t,n){this.protocol=e,this.host=t,this.logger=n}static canUse(e){return Vr.test(e)}static create(e,t){const n=e.split("://");return new jr(n[0],n[1],t.extend("InternalURLPattern"))}test(e){return this.logger("Testing URL %s against pattern protocol: %s, host: %s",e,this.protocol,this.host),e.protocol===`${this.protocol}:`&&(!e.host||Br(this.host,e.host))}}function Wr(e){return jr.canUse(e)}function zr(e,t){if(jr.canUse(e))return jr.create(e,t);t("No URL verifier available for pattern: %s",e)}const qr=er("internal"),$r=qr.extend("ensureInitializeCalled"),Gr=qr.extend("ensureInitialized");function Jr(){if(!Kn.initializeCalled)throw $r(ut),new Error(ut)}function Kr(e,...t){if(!Kn.initializeCompleted)throw Gr("%s. initializeCalled: %s",ut,Kn.initializeCalled.toString()),new Error(ut);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Kn.frameContext){e=!0;break}if(!e){const e=`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Kn.frameContext}".`;throw Gr(e),new Error(e)}}return cr(e)}function Qr(e=Je){const t=bn(Kn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Zr(){return Kn.hostClientType==cn.android||Kn.hostClientType==cn.ios||Kn.hostClientType==cn.ipados||Kn.hostClientType==cn.visionOS}function Xr(e=Je){if(!Zr()){throw{errorCode:He.NOT_SUPPORTED_ON_PLATFORM}}if(!Qr(e)){throw{errorCode:He.OLD_PLATFORM}}}function Yr(e){let t=Kn.additionalValidOrigins.concat(e.filter(e=>"string"==typeof e&&Wr(e)));const n={};t=t.filter(e=>!n[e]&&(n[e]=!0,!0)),Kn.additionalValidOrigins=t}function eo(e){if(!oo(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${no}-${ro}).`)}function to(e){if(_n(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(io(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const no=4,ro=256;function oo(e){return e.length<ro&&e.length>no}function io(e){return[...e].some(e=>{const t=e.charCodeAt(0);return t<32||t>126})}function ao(e){if(!(e instanceof co))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class so{constructor(e){this.idAsString=e,to(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class co extends so{constructor(e){super(e),eo(e)}toJSON(){return{appIdAsString:this.toString()}}}function uo(e){return null==e}var lo=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 fo;const po="v1",go=er("messageChannels.telemetry");function ho(){return lo(this,void 0,void 0,function*(){if(fo)return go("Returning telemetry port from cache"),fo;if(!mo())throw mn;return fo=yield Tc(tr(po,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),fo})}function mo(){var e;return!(!Kr(ur)||!(null===(e=ur.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function vo(){fo=void 0}var wo=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 Co;const yo="v1",So=er("messageChannels.dataLayer");function bo(){return wo(this,void 0,void 0,function*(){if(Co)return So("Returning dataLayer port from cache"),Co;if(!Ao())throw mn;return Co=yield Tc(tr(yo,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),Co})}function Ao(){var e;return!(!Kr(ur)||!(null===(e=ur.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Eo(){Co=void 0}function Io(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Kr(ur),zs(e)}function Po(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Kr(ur),qs(e)}const To="v2",Oo=er("app"),Ro={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Fo,ko;function Mo(){return Kn.initializeCompleted}function xo(){return Kn.frameContext}function No(e){return ra(tr(To,"app.initialize"),e)}function Uo(e){hc.currentWindow=e}function Do(){Kn.initializeCalled&&(Ps(),Kn.initializeCalled=!1,Kn.initializeCompleted=!1,Kn.initializePromise=void 0,Kn.additionalValidOrigins=[],Kn.frameContext=void 0,Kn.hostClientType=void 0,Kn.isFramelessWindow=!1,vo(),Eo(),wc())}function Lo(){return new Promise(e=>{Jr(),e(Cc(tr(To,"app.getContext"),"getContext"))}).then(e=>$o(e))}function Ho(){Jr(),oa(tr(To,"app.notifyAppLoaded"))}function _o(){return sa(tr(To,"app.notifySuccess"))}function Vo(e){Jr(),aa(tr(To,"app.notifyFailure"),e)}function Bo(e){Jr(),ia(tr(To,"app.notifyExpectedFailure"),e)}function jo(e){fa(tr(To,"app.registerOnThemeChangeHandler"),e)}function Wo(e){pa(tr(To,"app.registerOnContextChangeHandler"),e)}function zo(e){Ls(e)}function qo(e){return ga(tr(To,"app.openLink"),e)}function $o(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,messageId:e.messageId,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:un.teams,clientType:e.hostClientType?e.hostClientType:cn.web,features:e.hostFeatures,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId,ancestors:e.hostAncestors},appLaunchId:e.appLaunchId,appId:e.appId?new co(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Kn.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 Go(e){ci(tr(ai,"dialog.update.resize"),e)}function Jo(){return!(!Kr(ur)||!ur.supports.dialog)&&!!ur.supports.dialog.update}function Ko(e,t,n){li(tr(ai,"dialog.url.bot.open"),e,t,n)}function Qo(){return Kr(ur)&&void 0!==(ur.supports.dialog&&ur.supports.dialog.url&&ur.supports.dialog.url.bot)}function Zo(e){if(Kr(ur,ln.task),!ei())throw mn;Fc(tr(ai,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Xo(e){if(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),!ei())throw mn;Fc(tr(ai,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Yo(e){if(Kr(ur,ln.task),!ei())throw mn;for(Fs("messageForChild"),Rs(tr(ai,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),gi.reverse();gi.length>0;){e(gi.pop())}}function ei(){var e,t;return Kr(ur)&&!!(null===(t=null===(e=ur.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function ti(e,t,n){ui(tr(ai,"dialog.url.open"),e,t,n)}function ni(e,t){di(tr(ai,"dialog.url.submit"),e,t)}function ri(){return Kr(ur)&&void 0!==(ur.supports.dialog&&ur.supports.dialog.url)}function oi(e){return{url:e.url,height:e.size?e.size.height:gn.Small,width:e.size?e.size.width:gn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function ii(e){const t=oi(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Fo||(Fo={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(ko||(ko={})),Oo("teamsjs instance is version %s, starting at %s UTC (%s local)",Er,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(Un())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?Oo("teamsjs is being used from %s. %s",t,n):Oo("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const ai="v2",si="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 ci(e,t){if(Kr(ur,ln.content,ln.sidePanel,ln.task,ln.meetingStage),!Jo())throw mn;Fc(e,"tasks.updateTask",[t])}function ui(e,t,n,r){if(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),!ri())throw mn;r&&Rs(tr(ai,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Fc(e,"tasks.startTask",[oi(t)],(e,t)=>{null==n||n({err:e,result:t}),Fs("messageForParent")})}function li(e,t,n,r){if(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),!Qo())throw mn;r&&Rs(tr(ai,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Fc(e,"tasks.startTask",[ii(t)],(e,t)=>{null==n||n({err:e,result:t}),Fs("messageForParent")})}function di(e,t,n){if(Kr(ur,ln.content,ln.task),!ri())throw mn;Kn.frameContext===ln.content&&console.warn(si),Fc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function fi(e){return{card:e.card,height:e.size?e.size.height:gn.Small,width:e.size?e.size.width:gn.Small,title:e.title}}function pi(e){const t=fi(e);return t.completionBotId=e.completionBotId,t}const gi=[];function hi(e){Kn.frameContext&&(Kn.frameContext===ln.task?gi.push(e):Fs("messageForChild"))}function mi(e,t){if(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),!vi())throw mn;const n=pi(e);Fc(tr(ai,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function vi(){const e=ur.hostVersionsInfo&&ur.hostVersionsInfo.adaptiveCardSchemaVersion&&!Fn(ur.hostVersionsInfo.adaptiveCardSchemaVersion);return Kr(ur)&&void 0!==(e&&ur.supports.dialog&&ur.supports.dialog.card&&ur.supports.dialog.card.bot)}function wi(e,t){if(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),!Ci())throw mn;const n=fi(e);Fc(tr(ai,"dialog.adaptiveCard.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function Ci(){const e=ur.hostVersionsInfo&&ur.hostVersionsInfo.adaptiveCardSchemaVersion&&!Fn(ur.hostVersionsInfo.adaptiveCardSchemaVersion);return Kr(ur)&&void 0!==(e&&ur.supports.dialog&&ur.supports.dialog.card)}function yi(){Rs(tr(ai,"dialog.registerMessageForChildHandler"),"messageForChild",hi,!1)}function Si(){return!(!Kr(ur)||!ur.supports.dialog)}const bi="v2";var Ai,Ei;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(Ai||(Ai={}));class Ii{constructor(){this.enabled=!0,this.selected=!1}}let Pi,Ti,Oi,Ri,Fi;function ki(){Rs(tr(bi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Ui,!1),Rs(tr(bi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Li,!1),Rs(tr(bi,"menus.registerSetModuleViewHandler"),"setModuleView",xi,!1)}function Mi(e,t){if(Kr(ur),!Hi())throw mn;Oi=t,Fc(tr(bi,"menus.setUpViews"),"setUpViews",[e])}function xi(e){Oi&&Oi(e)||(Kr(ur),Fc(tr(bi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Ni(e,t){if(Kr(ur),!Hi())throw mn;Pi=t,Fc(tr(bi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Ui(e){Pi&&Pi(e)||(Kr(ur),Fc(tr(bi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Di(e,t){if(Kr(ur),!Hi())throw mn;Ti=t,Fc(tr(bi,"menus.showActionMenu"),"showActionMenu",[e])}function Li(e){Ti&&Ti(e)||(Kr(ur),Fc(tr(bi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Hi(){return!(!Kr(ur)||!ur.supports.menus)}function _i(){Rs(tr(rs,"pages.config.registerSettingsSaveHandler"),"settings.save",$i,!1),Rs(tr(rs,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Ki,!1)}function Vi(e){return fs(tr(rs,"pages.config.setValidityState"),e)}function Bi(e){return gs(tr(rs,"pages.config.setConfig"),e)}function ji(e){Wi(tr(rs,"pages.config.registerOnSaveHandler"),e,()=>{if(!uo(e)&&!Zi())throw mn})}function Wi(e,t,n){!uo(t)&&Kr(ur,ln.settings),n&&n(),Ri=t,!uo(t)&&Fc(e,"registerHandler",["save"])}function zi(e){qi(tr(rs,"pages.config.registerOnRemoveHandler"),e,()=>{if(!uo(e)&&!Zi())throw mn})}function qi(e,t,n){!uo(t)&&Kr(ur,ln.remove,ln.settings),n&&n(),Fi=t,!uo(t)&&Fc(e,"registerHandler",["remove"])}function $i(e){const t=new Ji(e);Ri?Ri(t):Qs()?rc("settings.save",[e]):t.notifySuccess()}function Gi(e){Ms(tr(rs,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[ln.content],()=>{if(!Zi())throw mn})}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(Ei||(Ei={}));class Ji{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Fc(tr(rs,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Fc(tr(rs,"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 Ki(){const e=new Qi;Fi?Fi(e):Qs()?rc("settings.remove",[]):e.notifySuccess()}class Qi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Fc(tr(rs,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Fc(tr(rs,"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 Zi(){return!(!Kr(ur)||!ur.supports.pages)&&!!ur.supports.pages.config}class Xi{}class Yi extends Xi{validate(e){return!0}deserialize(e){return e}}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())})};const ta=6e4,na=er("app");function ra(e,t){if(Un()){return na.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return On(()=>da(e,t),ta,new Error("SDK initialization timed out."))}function oa(e){Fc(e,Ro.AppLoaded,[Er])}function ia(e,t){Fc(e,Ro.ExpectedFailure,[t.reason,t.message])}function aa(e,t){Fc(e,Ro.Failure,[t.reason,t.message,t.authHeader])}function sa(e){return ea(this,void 0,void 0,function*(){if(Kn.initializeCompleted)return ua(e);if(!Kn.initializePromise)throw new Error(ut);return Kn.initializePromise.then(()=>ua(e))})}function ca(){var e;return Kr(ur)&&!!(null===(e=ur.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ua(e){return ea(this,void 0,void 0,function*(){return ca()?Ic(Ro.Success,[Er],new Yi,e).then(()=>({hasFinishedSuccessfully:!0})):(Fc(e,Ro.Success,[Er]),{hasFinishedSuccessfully:"unknown"})})}const la=na.extend("initializeHelper");function da(e,t){return new Promise(n=>{Kn.initializeCalled||(Kn.initializeCalled=!0,Is(),Kn.initializePromise=vc(t,e).then(({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Je})=>{Kn.frameContext=e,Kn.hostClientType=t,Kn.clientSupportedSDKVersion=r;try{la("Parsing %s",n);let e=JSON.parse(n);if(la("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=$n(e),n&&br(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{la("Attempting to parse %s as an SDK version",n),isNaN(bn(n,Je))||(Kn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(la("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");e=$n(e),br(e)}catch(e){if(!(e instanceof SyntaxError))throw e;br(yr(Kn.clientSupportedSDKVersion,lr,vr))}}Kn.initializeCompleted=!0}),ki(),_i(),yi()),Array.isArray(t)&&Yr(t),void 0!==Kn.initializePromise?n(Kn.initializePromise):la("GlobalVars.initializePromise is unexpectedly undefined")})}function fa(e,t){!uo(t)&&Jr(),xs(e,t)}function pa(e,t){!uo(t)&&Jr(),Ns(e,t)}function ga(e,t){return new Promise(n=>{Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),n(yc(e,"executeDeepLink",t))})}var ha=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 ma=[];const va=er("validateOrigin");let wa;function Ca(){return ha(this,void 0,void 0,function*(){wa||(yield Sa())})}function ya(){return 0===ma.length}function Sa(e=!1){return ha(this,void 0,void 0,function*(){if(!ya()&&!e)return ma;if(wa)return wa;if(Un())return ma=ot,ot;{va("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout(()=>e.abort(),it);return wa=fetch(at,{signal:e.signal}).then(e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return va("Fetch call completed and retrieved valid origins list from CDN"),e.json().then(e=>{if(ba(JSON.stringify(e)))return ma=e.validOrigins,ma;throw new Error("Valid origins list retrieved from CDN is invalid")})}).catch(e=>("AbortError"===e.name?va(`validOrigins fetch call to CDN failed due to Timeout of ${it} ms. Defaulting to fallback list`):va("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),ma=ot,ma)),wa}})}function ba(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 va("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function Aa(e,t){let n;try{const t=zr(e,va);if(!t)return!1;n=t}catch(e){return!1}return n.test(t)}function Ea(e,t){const n=t||ya()?ot:ma;return Ia(e,n)?Promise.resolve(!0):(va("Origin %s is not in the local valid origins list, fetching from CDN",e),Sa(t).then(t=>Ia(e,t)))}function Ia(e,t){for(const t of Kn.additionalValidOrigins)if(Aa(t,e))return!0;const n=e.host;return kn(e)?!!t.some(e=>Br(e,n))||(va("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,Kn.additionalValidOrigins),!1):(va("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1)}function Pa(e){Ms(tr(rs,"pages.appButton.onClick"),"appButtonClick",e,[ln.content],()=>{if(!Ra())throw mn})}function Ta(e){Ms(tr(rs,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[ln.content],()=>{if(!Ra())throw mn})}function Oa(e){Ms(tr(rs,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[ln.content],()=>{if(!Ra())throw mn})}function Ra(){return!(!Kr(ur)||!ur.supports.pages)&&!!ur.supports.pages.appButton}function Fa(){ys()}function ka(){return is(tr(rs,"pages.backStack.navigateBack"))}function Ma(e){xa(tr(rs,"pages.backStack.registerBackButtonHandler"),e,()=>{if(!uo(e)&&!Na())throw mn})}function xa(e,t,n){!uo(t)&&Kr(ur),n&&n(),Cs(t),!uo(t)&&Fc(e,"registerHandler",["backButton"])}function Na(){return!(!Kr(ur)||!ur.supports.pages)&&!!ur.supports.pages.backStack}function Ua(e){return new Promise(t=>{if(Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),!La())throw mn;t(bc(tr(rs,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))})}function Da(){return new Promise(e=>{if(Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),!La())throw mn;e(bc(tr(rs,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))})}function La(){return!(!Kr(ur)||!ur.supports.pages)&&!!ur.supports.pages.currentApp}function Ha(){if(Kr(ur,ln.content),!Va())throw mn;Fc(tr(rs,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function _a(){if(Kr(ur,ln.content),!Va())throw mn;Fc(tr(rs,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Va(){return!(!Kr(ur)||!ur.supports.pages)&&!!ur.supports.pages.fullTrust}function Ba(e){return as(tr(rs,"pages.tabs.navigateToTab"),e)}function ja(e){return cs(tr(rs,"pages.tabs.getTabInstances"),e)}function Wa(e){return us(tr(rs,"pages.tabs.getMruTabInstances"),e)}function za(){return!(!Kr(ur)||!ur.supports.pages)&&!!ur.supports.pages.tabs}var qa,$a;function Ga(e){const t=tr(rs,"pages.returnFocus");if(Kr(ur),!ns())throw mn;if(void 0===e&&Fc(t,"returnFocus",[!1]),"boolean"==typeof e)Fc(t,"returnFocus",[e]);else switch(e){case $a.PreviousLandmark:case $a.GoToActivityFeed:Fc(t,"returnFocus",[!1,e]);break;case $a.NextLandmark:Fc(t,"returnFocus",[!0,e])}}function Ja(e){Ms(tr(rs,"pages.registerFocusEnterHandler"),"focusEnter",e,[],()=>{if(!ns())throw mn})}function Ka(e){ds(tr(rs,"pages.setCurrentFrame"),e)}function Qa(e,t,n){Ca(),ra(tr(rs,"pages.initializeWithFrameContext"),n).then(()=>t&&t()),Ka(e)}function Za(){return ps(tr(rs,"pages.getConfig."))}function Xa(e){return os(tr(rs,"pages.navigateCrossDomain"),e)}function Ya(e){return new Promise(t=>{if(Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),!ns())throw mn;const n=tr(rs,"pages.navigateToApp");if(ur.isLegacyTeams){t(yc(n,"executeDeepLink",Rn(hs(e)?e:ms(e))))}else{t(yc(n,"pages.navigateToApp",hs(e)?vs(e):e))}})}function es(e){return ls(tr(rs,"pages.shareDeepLink"),e)}function ts(e){Ms(tr(rs,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],()=>{if(!uo(e)&&!ns())throw mn})}function ns(){return!(!Kr(ur)||!ur.supports.pages)}Ca(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(qa||(qa={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}($a||($a={}));const rs="v2";function os(e,t){return new Promise(n=>{if(Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.remove,ln.task,ln.stage,ln.meetingStage),!ns())throw mn;n(Sc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))})}function is(e){return new Promise(t=>{if(Kr(ur),!Na())throw mn;t(Sc(e,"navigateBack","Back navigation is not supported in the current client or context."))})}function as(e,t){return new Promise(n=>{if(Kr(ur),!za())throw mn;n(Sc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))})}function ss(e,t){if(Kr(ur),!ns())throw mn;Fc(e,"returnFocus",[t])}function cs(e,t){return new Promise(n=>{if(Kr(ur),!za())throw mn;n(Cc(e,"getTabInstances",t))})}function us(e,t){return new Promise(n=>{if(Kr(ur),!za())throw mn;n(Cc(e,"getMruTabInstances",t))})}function ls(e,t){if(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),!ns())throw mn;Fc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ds(e,t){if(Kr(ur,ln.content),!ns())throw mn;Fc(e,"setFrameContext",[t])}function fs(e,t){if(Kr(ur,ln.settings,ln.remove),!Zi())throw mn;Fc(e,"settings.setValidityState",[t])}function ps(e){return new Promise(t=>{if(Kr(ur,ln.content,ln.settings,ln.remove,ln.sidePanel),!ns())throw mn;t(Cc(e,"settings.getSettings"))})}function gs(e,t){return new Promise(n=>{if(Kr(ur,ln.content,ln.settings,ln.sidePanel),!Zi())throw mn;n(yc(e,"settings.setSettings",t))})}function hs(e){return e.appId instanceof co}function ms(e){return Object.assign(Object.assign({},e),{appId:new co(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function vs(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let ws;function Cs(e){ws=e}function ys(){Rs(tr(rs,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Ss,!1)}function Ss(){ws&&ws()||(Qs()?rc("backButtonPress",[]):ka())}var bs=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=er("handlers");class Es{static initializeHandlers(){Es.handlers.themeChange=Us,Es.handlers.contextChange=Ds,Es.handlers.load=Vs,Es.handlers.beforeUnload=Ws,ys()}static uninitializeHandlers(){Es.handlers={},Es.themeChangeHandler=null,Es.beforeUnloadHandler=null,Es.beforeSuspendOrTerminateHandler=null,Es.resumeHandler=null,Es.contextChangeHandler=null}}function Is(){Es.initializeHandlers()}function Ps(){Es.uninitializeHandlers()}Es.handlers={},Es.themeChangeHandler=null,Es.loadHandler=null,Es.beforeUnloadHandler=null,Es.beforeSuspendOrTerminateHandler=null,Es.resumeHandler=null,Es.hostToAppPerformanceMetricsHandler=null,Es.contextChangeHandler=null;const Ts=As.extend("callHandler");function Os(e,t){const n=Es.handlers[e];if(n){Ts("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Qs()?(rc(e,t),[!1,void 0]):(Ts("Handler for action message %s not found.",e),[!1,void 0])}function Rs(e,t,n,r=!0,o=[]){n?(Es.handlers[t]=n,r&&Fc(e,"registerHandler",[t,...o])):delete Es.handlers[t]}function Fs(e){delete Es.handlers[e]}function ks(e){return null!=Es.handlers[e]}function Ms(e,t,n,r,o){n&&Kr(ur,...r),o&&o(),Rs(e,t,n)}function xs(e,t){Es.themeChangeHandler=t,!uo(t)&&Fc(e,"registerHandler",["themeChange"])}function Ns(e,t){Es.contextChangeHandler=t,!uo(t)&&Fc(e,"registerHandler",["contextChange"])}function Us(e){Es.themeChangeHandler&&Es.themeChangeHandler(e),Qs()&&rc("themeChange",[e])}function Ds(e){Es.contextChangeHandler&&Es.contextChangeHandler(e),Qs()&&rc("contextChange",[e])}function Ls(e){Es.hostToAppPerformanceMetricsHandler=e}function Hs(e){Es.hostToAppPerformanceMetricsHandler&&Es.hostToAppPerformanceMetricsHandler(e)}function _s(e,t){Es.loadHandler=t,!uo(t)&&Fc(e,"registerHandler",["load"])}function Vs(e){const t=Bs(e);Es.resumeHandler?(Es.resumeHandler(t),Qs()&&rc("load",[t])):Es.loadHandler&&(Es.loadHandler(e),Qs()&&rc("load",[e]))}function Bs(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function js(e,t){Es.beforeUnloadHandler=t,!uo(t)&&Fc(e,"registerHandler",["beforeUnload"])}function Ws(){return bs(this,void 0,void 0,function*(){const e=()=>{Fc(tr("v2","handleBeforeUnload"),"readyToUnload",[])};Es.beforeSuspendOrTerminateHandler?(yield Es.beforeSuspendOrTerminateHandler(),Qs()?rc("beforeUnload"):e()):Es.beforeUnloadHandler&&Es.beforeUnloadHandler(e)||(Qs()?rc("beforeUnload"):e())})}function zs(e){Es.beforeSuspendOrTerminateHandler=e,!uo(e)&&Fc(tr("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function qs(e){Es.resumeHandler=e,!uo(e)&&Fc(tr("v2","registerOnResumeHandler"),"registerHandler",["load"])}var $s=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 Gs=er("childProxyingCommunication");class Js{}function Ks(){Js.window=null,Js.origin=null,Js.messageQueue=[]}function Qs(){return!!Tr()&&!!Js.window}function Zs(e,t){return!!Tr()&&(Js.window&&!Js.window.closed&&e!==Js.window||(Js.window=e,Js.origin=t),Js.window&&Js.window.closed?(Js.window=null,Js.origin=null,!1):Js.window===e)}function Xs(e,t,n,r){return $s(this,void 0,void 0,function*(){Js.window===t&&(_r(Js.window,Js.origin,Js.messageQueue,"child"),ec(e,n,r))})}Js.messageQueue=[];const Ys=Gs.extend("handleIncomingMessageFromChild");function ec(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Nr(e.data),[o,i]=Os(r.func,r.args);if(o&&void 0!==i)return Ys("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Lr(r),r.func),void nc(r.id,r.uuid,Array.isArray(i)?i:[i]);Ys("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Lr(r),r.func),tc(r,t,n)}function tc(e,t,n){const r=t(tr("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Js.origin;n(r.uuid,(...t)=>{if(!Js.window)return;if(!Rr().disableEnforceOriginMatchForChildResponses&&o!==Js.origin)return void Ys("Origin of child window has changed, not sending response back to child window");const n=t.pop();Ys("Message from parent being relayed to child, id: %s",Lr(e)),nc(e.id,e.uuid,t,n)})}function nc(e,t,n,r){const o=Js.window,i=oc(e,t,n,r),a=Dr(i),s=Js.origin;o&&s&&(Ys("Sending message %s to %s via postMessage, args = %o",Lr(a),"child",a.args),o.postMessage(a,s))}function rc(e,t){const n=Js.window,r=ic(e,t),o=Js.origin;n&&o?n.postMessage(r,o):Js.messageQueue.push(r)}function oc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function ic(e,t){return{func:e,args:t||[]}}class ac{static storeCallbackInformation(e,t){ac.callbackInformation.set(e,t)}static clearMessages(){ac.callbackInformation.clear()}static deleteMessageInformation(e){ac.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Hs({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=ac.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Hs({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),ac.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}ac.callbackInformation=new Map;const sc=er("nestedAppAuthUtils"),cc=sc.extend("tryPolyfillWithNestedAppAuthBridge"),uc="v2";function lc(e,t,n){var r;const o=cc;if(Kn.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=fc(a,n);s&&(a.nestedAppAuthBridge=s)}const dc=sc.extend("createNestedAppAuthBridge");function fc(e,t){const n=dc;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=tr(uc,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var pc=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 gc=er("communication");class hc{}class mc{}function vc(e,t){if(mc.messageListener=e=>Hc(e),hc.currentWindow=hc.currentWindow||Nn(),hc.parentWindow=hc.currentWindow.parent!==hc.currentWindow.self?hc.currentWindow.parent:hc.currentWindow.opener,hc.topWindow=hc.currentWindow.top,(hc.parentWindow||e)&&hc.currentWindow.addEventListener("message",mc.messageListener,!1),!hc.parentWindow){const e=hc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Kn.isFramelessWindow=!0,e.onNativeMessage=Jc}try{return hc.parentOrigin="*",Ac(t,"initialize",[Er,ir,e]).then(([e,t,n,r])=>(lc(r,hc.currentWindow,{onMessage:Vc,sendPostMessage:Mc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r}))}finally{hc.parentOrigin=null}}function wc(){hc.currentWindow&&hc.currentWindow.removeEventListener("message",mc.messageListener,!1),hc.currentWindow=null,hc.parentWindow=null,hc.parentOrigin=null,mc.parentMessageQueue=[],mc.nextMessageId=0,mc.callbacks.clear(),mc.promiseCallbacks.clear(),mc.portCallbacks.clear(),mc.legacyMessageIdsToUuidMap={},ac.clearMessages(),Ks()}function Cc(e,t,...n){return Ac(e,t,n).then(([e])=>e)}function yc(e,t,...n){return Ac(e,t,n).then(([e,t])=>{if(!e)throw new Error(t)})}function Sc(e,t,n,...r){return Ac(e,t,r).then(([e,t])=>{if(!e)throw new Error(t||n)})}function bc(e,t,...n){return Ac(e,t,n).then(([e,t])=>{if(e)throw e;return t})}function Ac(e,t,n=void 0){if(!nr(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(Rc(Dc(e,t,n).uuid))})}function Ec(e){return e.map(e=>Ar(e)?e.serialize():e)}function Ic(e,t,n,r,o){var i;return pc(this,void 0,void 0,function*(){const a=Ec(t),[s]=yield Ac(r,e,a);if(o&&o(s)||!o&&$e(s))throw new Error(`${s.errorCode}, message: ${null!==(i=s.message)&&void 0!==i?i:"None"}`);if(n.validate(s))return n.deserialize(s);throw new Error(`${He.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)})}function Pc(e,t,n,r){var o;return pc(this,void 0,void 0,function*(){const i=Ec(t),[a]=yield Ac(n,e,i);if(r&&r(a)||!r&&$e(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${He.INTERNAL_ERROR}, message: Invalid response from host`)})}function Tc(e,t,n=void 0){if(!nr(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 Oc(Dc(e,t,n).uuid)}function Oc(e){return new Promise((t,n)=>{mc.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 Rc(e){return new Promise(t=>{mc.promiseCallbacks.set(e,t)})}function Fc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!nr(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=Dc(e,t,o);r&&mc.callbacks.set(i.uuid,r)}mc.parentMessageQueue=[],mc.topMessageQueue=[],mc.nextMessageId=0,mc.callbacks=new Map,mc.promiseCallbacks=new Map,mc.portCallbacks=new Map,mc.legacyMessageIdsToUuidMap={};const kc=gc.extend("sendNestedAuthRequestToTopWindow");function Mc(e,t){const n=kc,r=hc.topWindow,o=nu(e,t);return n("Message %s information: %o",Lr(o),{actionName:o.func}),Nc(r,o)}const xc=gc.extend("sendRequestToTargetWindowHelper");function Nc(e,t){const n=xc,r=Yc(e),o=xr(t);if(Kn.isFramelessWindow)hc.currentWindow&&hc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Lr(o),r),hc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Xc(e);e&&i?(n("Sending message %s to %s via postMessage",Lr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Lr(o),r),Zc(e).push(t))}return t}const Uc=gc.extend("sendMessageToParentHelper");function Dc(e,t,n,r,o){const i=Uc,a=hc.parentWindow,s=tu(e,t,n,r,o);return ac.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Lr(s),{actionName:t,args:n}),Nc(a,s)}const Lc=gc.extend("processIncomingMessage");function Hc(e){return pc(this,void 0,void 0,function*(){if(!e||!e.data||"object"!=typeof e.data)return void Lc("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 jc(t,n).then(r=>{r?(Wc(t,n),t!==hc.parentWindow?Zs(t,n)&&Xs(e,t,Dc,(e,t)=>mc.callbacks.set(e,t)):Jc(e)):Lc("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 _c=gc.extend("processAuthBridgeMessage");function Vc(e,t){var n,r;const o=_c;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?jc(c,u)?(hc.topWindow&&!hc.topWindow.closed&&c!==hc.topWindow||(hc.topWindow=c,hc.topOrigin=u),hc.topWindow&&hc.topWindow.closed&&(hc.topWindow=null,hc.topOrigin=null),_r(hc.topWindow,hc.topOrigin,mc.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 Bc=gc.extend("shouldProcessIncomingMessage");function jc(e,t){return pc(this,void 0,void 0,function*(){if(hc.currentWindow&&e===hc.currentWindow)return Bc("Should not process message because it is coming from the current window"),!1;if(hc.currentWindow&&hc.currentWindow.location&&t&&t===hc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Bc("Message has an invalid origin of %s",t),!1}const n=yield Ea(e);return n||Bc("Message has an invalid origin of %s",t),n}})}function Wc(e,t){Kn.isFramelessWindow||hc.parentWindow&&!hc.parentWindow.closed&&e!==hc.parentWindow||(hc.parentWindow=e,hc.parentOrigin=t),hc.parentWindow&&hc.parentWindow.closed&&(hc.parentWindow=null,hc.parentOrigin=null),_r(hc.parentWindow,hc.parentOrigin,mc.parentMessageQueue,"parent")}const zc=gc.extend("handleIncomingMessageFromParent");function qc(e){const t=zc;if(!e.uuid)return mc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=$c(mc.callbacks,t);if(n)return n;const r=$c(mc.promiseCallbacks,t);if(r)return r;const o=$c(mc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Lr(e))}function $c(e,t){if(t){const n=[...e].find(([e,n])=>e.toString()===t.toString());if(n)return n[0]}}function Gc(e,t){const n=$c(t,e.uuid);n&&t.delete(n),e.uuid?mc.legacyMessageIdsToUuidMap={}:delete mc.legacyMessageIdsToUuidMap[e.id]}function Jc(e){const t=zc,n=zn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Ur(r),i=qc(o);if(i){const r=mc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),ac.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]),Kc(e)||(t("Removing registered callback for message %s",i.toString()),Gc(o,mc.callbacks)));const a=mc.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()),Gc(o,mc.promiseCallbacks));const s=mc.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()),Gc(o,mc.portCallbacks)}o.uuid&&(mc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;ac.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Lr(r),r.func),Os(r.func,r.args)}else t("Received an unknown message: %O",e)}function Kc(e){return!0===e.data.isPartialResponse}function Qc(){return hc.topWindow!==hc.parentWindow}function Zc(e){return e===hc.topWindow&&Qc()?mc.topMessageQueue:e===hc.parentWindow?mc.parentMessageQueue:[]}function Xc(e){return e===hc.topWindow&&Qc()?hc.topOrigin:e===hc.parentWindow?hc.parentOrigin:null}function Yc(e){return e===hc.topWindow&&Qc()?"top":e===hc.parentWindow?"parent":null}function eu(e,t){let n;n=hc.currentWindow.setInterval(()=>{0===Zc(e).length&&(clearInterval(n),t())},100)}function tu(e,t,n,r,o){const i=mc.nextMessageId++,a=new Gn;mc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Kn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:zn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function nu(e,t){const n=mc.nextMessageId++,r=new Gn;return mc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:zn(),apiVersionTag:t,args:[],data:e}}const ru="v1";function ou(e){if(!uo(e)&&Kr(ur),!uo(e)&&!iu())throw mn;e?Rs(tr(ru,"log.request"),"log.request",()=>{const t=e();Fc(tr(ru,"log.receive"),"log.receive",[t])}):Fs("log.request")}function iu(){return!(!Kr(ur)||!ur.supports.logs)}var au,su,cu;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(au||(au={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(su||(su={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(cu||(cu={}));const uu="v1";function lu(e,t){Kr(ur),Fc(tr(uu,"uploadCustomApp"),"uploadCustomApp",[e],t||Sn())}function du(e,t,n){Kr(ur),Fc(tr(uu,"sendCustomMessage"),e,t,n)}function fu(e,t){if(Kr(ur),!Qs())throw new Error("The child window has not yet been initialized or is not present");rc(e,t)}function pu(e,t){Kr(ur),Rs(tr(uu,"registerCustomHandler"),e,(...e)=>t.apply(this,e))}function gu(e,t){Kr(ur),Rs(tr(uu,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function hu(e){Kr(ur,ln.content,ln.sidePanel,ln.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,e.messageId,e.callerInfo,e.atpData,e.shareUrl,e.replyChainId];Fc(tr(uu,"openFilePreview"),"openFilePreview",t)}const mu="v1";function vu(e){return new Promise(t=>{if(Kr(ur,ln.content),!yu())throw mn;const n=yc(tr(mu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Rs(tr(mu,"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&&Rs(tr(mu,"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 wu(){if(Kr(ur,ln.content),!yu())throw mn;Fc(tr(mu,"conversations.closeConversation"),"conversations.closeConversation"),Fs("startConversation"),Fs("closeConversation")}function Cu(){return new Promise(e=>{if(Kr(ur),!yu())throw mn;e(Cc(tr(mu,"conversations.getChatMember"),"getChatMembers"))})}function yu(){return!(!Kr(ur)||!ur.supports.conversations)}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 bu="v2",Au=er("copilot");function Eu(){var e;return Kr(ur)&&!!(null===(e=ur.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function Iu(e,t){var n;return void 0===t&&(t=null!==(n=zn())&&void 0!==n?n:Date.now()),Su(this,void 0,void 0,function*(){return Kr(ur),Au("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),Pc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],tr(bu,"copilot.customTelemetry.sendCustomTelemetryData"))})}var Pu=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 Tu="v2",Ou=er("copilot");function Ru(){var e,t;return Kr(ur)&&(!!(null===(e=ur.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=ur.supports.copilot)||void 0===t?void 0:t.eligibility))}function Fu(e){var t,n,r;return Pu(this,void 0,void 0,function*(){if(Kr(ur),!Ru())throw new Error(`Error code: ${mn.errorCode}, message: Not supported on platform`);if((null===(t=ur.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return Ou("Eligibility information is already available on runtime."),ur.hostVersionsInfo.appEligibilityInformation;Ou("Eligibility information is not available on runtime. Requesting from host.");const o=yield Cc(tr(Tu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if($e(o))throw new Error(`Error code: ${o.errorCode}, message: ${null!==(n=o.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!ku(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=je.NotAdult),o})}function ku(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)}var Mu,xu,Nu,Uu,Du,Lu,Hu,_u,Vu;!function(e){e.EMAIL="email",e.TEXT="text",e.MEDIA="media",e.CALENDAR_INVITE="calendarInvite",e.WEB_PAGE="webPage",e.MIXED="mixed",e.TEAMS="teams",e.FILE="file"}(Mu||(Mu={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(xu||(xu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(Nu||(Nu={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(Uu||(Uu={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(Du||(Du={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Lu||(Lu={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Hu||(Hu={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(_u||(_u={})),function(e){e.ConsentNotAccepted="consent_not_accepted",e.PageContentBlockedPolicy="page_content_blocked_policy",e.PageContentBlockedDlp="page_content_blocked_dlp",e.PageContentTypeNotSupportedYet="page_content_type_not_supported_yet",e.PageContentSizeNotSupported="page_content_size_not_supported",e.PageContextChanged="page_context_changed",e.PageContentExtractionFailed="page_content_extraction_failed",e.PageContentSizeNotSupportedPDF="page_content_size_not_supported_pdf",e.NotSupportedOnPlatform="not_supported_on_platform",e.OtherError="other_error"}(Vu||(Vu={}));class Bu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var ju=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 Wu="v2";function zu(){var e;return Kr(ur)&&!!(null===(e=ur.supports.copilot)||void 0===e?void 0:e.sidePanel)}function qu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Vu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||$e(e)}function $u(e){return ju(this,void 0,void 0,function*(){Kr(ur);return Ic("copilot.sidePanel.getContent",e?[new Xu(e)]:[],new Qu,tr(Wu,"copilot.sidePanel.getContent"),qu)})}function Gu(e){return ju(this,void 0,void 0,function*(){Kr(ur);return Ic("copilot.sidePanel.preCheckUserConsent",e?[new Yu(e)]:[],new Zu,tr(Wu,"copilot.sidePanel.preCheckUserConsent"),qu)})}function Ju(e){Ms(tr(Wu,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[ln.content],()=>{if(!zu())throw Ku})}const Ku=new Bu(Vu.NotSupportedOnPlatform,"This API is not supported on the current platform.");class Qu extends Xi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Zu extends Xi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Xu{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class Yu{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}var el=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 tl="v2";function nl(){var e;return Kr(ur)&&!!(null===(e=ur.supports.copilot)||void 0===e?void 0:e.view)}function rl(){return el(this,void 0,void 0,function*(){Kr(ur),yield Ic("copilot.view.closeSidePanel",[],new ol,tr(tl,"copilot.view.closeSidePanel"))})}class ol extends Xi{validate(e){return!0}deserialize(e){return e}}const il="v2";class al{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function sl(e){const t=e;return t.responseType===ll.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const cl="Action.Execute";var ul,ll,dl,fl;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(ul||(ul={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(ll||(ll={}));class pl extends Xi{validate(e){return sl(e)}deserialize(e){return e}}function gl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(dl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function hl(e){e.requestType===ul.ActionExecuteInvokeRequest?ml(e):e.requestType===ul.QueryMessageExtensionRequest&&vl(e)}function ml(e){if(e.type!==cl){throw{errorCode:dl.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${cl}"`}}if(!qn(e.data)){throw{errorCode:dl.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function vl(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 wl(e,t,n){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;const r=new co(e);return hl(n),Ac(tr(il,"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 Cl(e,t){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;const n=new co(e);return Ac(tr(il,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then(([e,t])=>{if(!e)throw t})}function yl(e,t,n){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;const r=new co(e);return hl(n),Ac(tr(il,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then(([e,t])=>{if(e&&null!=t.responseType)return t;throw t})}function Sl(e,t,n){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;return Dn(e,new Error("titleId is Invalid.")),Dn(t,new Error("oauthConfigId is Invalid.")),Ac(tr(il,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then(([e,t])=>{if(!e)throw t})}function bl(e,t,n){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;return Dn(e,new Error("titleId is Invalid.")),t&&Ln(t),Ac(tr(il,"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(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(dl||(dl={}));class Al{constructor(e){this.param=e}serialize(){var e,t,n;return{connectorId:this.param.connectorId,oAuthConfigId:this.param.oAuthConfigId,traceId:null!==(n=null===(t=null===(e=this.param.traceId)||void 0===e?void 0:e.toString)||void 0===t?void 0:t.call(e))&&void 0!==n?n:this.param.traceId,windowParameters:this.param.windowParameters?Object.assign({},this.param.windowParameters):void 0}}}function El(e){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;return Dn(e.connectorId,new Error("connectorId is Invalid.")),Dn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Pc("externalAppAuthentication.authenticateWithConnector",[new Al(e)],tr(il,"externalAppAuthentication.authenticateWithConnector"),gl)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(fl||(fl={}));class Il extends Xi{validate(e){return"string"==typeof e&&e in fl}deserialize(e){return e}}function Pl(e){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;return Dn(e.connectorId,new Error("connectorId is Invalid.")),Dn(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),Ic("externalAppAuthentication.getUserAuthenticationStateForConnector",[new Al(e)],new Il,tr(il,"externalAppAuthentication.getUserAuthenticationStateForConnector"),gl)}function Tl(e){if(Kr(ur,ln.content,ln.sidePanel),!Ol())throw mn;return Dn(e.connectorId,new Error("connectorId is Invalid.")),Dn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Pc("externalAppAuthentication.disconnectConnector",[new Al(e)],tr(il,"externalAppAuthentication.disconnectConnector"),gl)}function Ol(){return!(!Kr(ur)||!ur.supports.externalAppAuthentication)}var Rl=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Fl="v2";function kl(e,t,n){return Rl(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!Ul())throw mn;return Dl(e,t),Pc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],tr(Fl,"externalAppAuthenticationForCEA.authenticateWithSSO"),gl)})}function Ml(e,t,n){return Rl(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!Ul())throw mn;return Dl(e,t),Pc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],tr(Fl,"externalAppAuthenticationForCEA.authenticateWithOauth"),gl)})}function xl(e,t,n,r){return Rl(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!Ul())throw mn;return Dl(e,t),ml(r),Ic("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new al(r),n.url.href,n.width,n.height,n.isExternal],new pl,tr(Fl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),gl)})}function Nl(e,t,n,r){return Rl(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!Ul())throw mn;return Dl(e,t),ml(r),Ic("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new al(r),n.authId,n.connectionName,n.claims,n.silent],new pl,tr(Fl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),gl)})}function Ul(){return!(!Kr(ur)||!ur.supports.externalAppAuthenticationForCEA)}function Dl(e,t){Dn(t,new Error("conversation id is not valid.")),ao(e)}const Ll="v2";var Hl,_l;function Vl(e,t){if(Kr(ur,ln.content,ln.sidePanel),!jl())throw mn;const n=new co(e);return Ac(tr(Ll,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then(([e,t])=>{if(!e)throw t})}function Bl(e,t,n){if(Kr(ur,ln.content,ln.sidePanel),!jl())throw mn;const r=new co(e);return Ac(tr(Ll,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then(([e,t])=>{if(e)throw e;return t})}function jl(){return!(!Kr(ur)||!ur.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Hl||(Hl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(_l||(_l={}));var Wl=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 zl="v2";function ql(e,t,n){return Wl(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!Gl())throw mn;Dl(e,t);const[r,o]=yield Ac(tr(zl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o})}function $l(e,t,n){return Wl(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!Gl())throw mn;Dl(e,t);const r=yield Cc(tr(zl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r})}function Gl(){return!(!Kr(ur)||!ur.supports.externalAppCardActionsForCEA)}var Jl;function Kl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Jl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Jl||(Jl={}));var Ql=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 Zl="v2";function Xl(e,t,n){return Ql(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!Yl())throw mn;return ed(e,n),Pc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new td(t),n],tr(Zl,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Kl)})}function Yl(){return!(!Kr(ur)||!ur.supports.externalAppCardActionsForDA)}function ed(e,t){ao(e),Jn(t)}class td{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var nd=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const rd="v2";function od(e,t,n){return nd(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.sidePanel),!id())throw mn;const r=new co(e),[o,i]=yield Ac(tr(rd,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i})}function id(){return!(!Kr(ur)||!ur.supports.externalAppCommands)}const ad="v1";var sd,cd,ud,ld,dd,fd;function pd(e,t){if(Kr(ur,ln.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");Fc(tr(ad,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function gd(e,t){if(Kr(ur,ln.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");Fc(tr(ad,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function hd(e,t,n){if(Kr(ur,ln.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");Fc(tr(ad,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function md(e,t,n){if(Kr(ur,ln.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");Fc(tr(ad,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function vd(e,t,n){if(Kr(ur,ln.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");Fc(tr(ad,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function wd(e=!1,t){if(Kr(ur,ln.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Fc(tr(ad,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function Cd(e,t,n,r,o=!1,i){if(Kr(ur,ln.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");Fc(tr(ad,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function yd(e){if(Kr(ur,ln.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Fc(tr(ad,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function Sd(e=void 0,t){if(Kr(ur,ln.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Fc(tr(ad,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function bd(e){if(Kr(ur,ln.content),!e)throw kd(He.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Fc(tr(ad,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function Ad(e,t){if(Kr(ur,ln.content),!t)throw kd(He.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw kd(He.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Fc(tr(ad,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Ed(e,t){if(Kr(ur,ln.content),!t)throw kd(He.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw kd(He.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Fc(tr(ad,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Id(e,t){if(Kr(ur,ln.content),!t)throw kd(He.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw kd(He.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Fc(tr(ad,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Pd(e,t){if(Kr(ur,ln.content),!t)throw kd(He.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw kd(He.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Fc(tr(ad,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Td(e,t){if(Kr(ur,ln.content),!t)throw kd(He.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw kd(He.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Fc(tr(ad,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Od(e,t){if(Kr(ur,ln.content),!t)throw kd(He.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw kd(He.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw kd(He.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Fc(tr(ad,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Rd(e){if(Kr(ur),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Rs(tr(ad,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Fd(e){if(Kr(ur),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Rs(tr(ad,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function kd(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"}(sd||(sd={})),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"}(cd||(cd={})),function(e){e.ClassMaterials="classMaterials"}(ud||(ud={})),function(e){e.Readonly="readonly"}(ld||(ld={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(dd||(dd={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(fd||(fd={}));const Md="v1";function xd(){return new Promise(e=>{if(Kr(ur),!Ld())throw mn;e(bc(tr(Md,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))})}function Nd(e){return new Promise(t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Kr(ur),!Ld())throw mn;t(bc(tr(Md,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))})}function Ud(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Kr(ur),!Ld())throw mn;Rs(tr(Md,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",t=>{Kr(ur),e(t)})}function Dd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Kr(ur),!Ld())throw mn;Rs(tr(Md,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",t=>{Kr(ur),e(t)})}function Ld(){return!(!Kr(ur)||!ur.supports.meetingRoom)}function Hd(){return!(!Kr(ur)||!ur.supports.messageChannels)}const _d="1.0.1",Vd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Jd("Invalid message format, ignoring. Message: %o",e);if(!qd(e.source,e.origin))return void Jd("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Kd("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Jd("Invalid response format, ignoring. Message: %o",e);t(r)}};let Bd=null,jd=!1;function Wd(e,t,n=!1){if(jd=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.`);Bd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Jd("Nested App Auth Bridge is already present");const o=zd(r);o&&(r.nestedAppAuthBridge=o)}function zd(e){const t=new WeakMap,{onMessage:n}=Vd,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 Jd(`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=$d(t);if(e===e.top||!Bd)return void Kd("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Bd)}}catch(e){return void Kd("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 qd(e,t){if(t===Bd)try{return"https:"===new URL(t).protocol}catch(e){return Kd("Invalid message origin URL:",e),!1}return!1}function $d(e){const t=Date.now();return{id:Gd(),uuid:on(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Gd(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Jd(...e){jd&&console.log(...e)}function Kd(...e){jd&&console.error(...e)}const Qd="v1";function Zd(e){if(Kr(ur,ln.content),!Xd())throw mn;Fc(tr(Qd,"notifications.showNotification"),"notifications.showNotification",[e])}function Xd(){return!(!Kr(ur)||!ur.supports.notifications)}const Yd="v2";function ef(e){if(!rf())throw new Error(He.NOT_SUPPORTED_ON_PLATFORM.toString());if(uo(e))throw new Error(He.INVALID_ARGUMENTS.toString());Rs(tr(Yd,"otherApp.install"),"otherApp.install",e)}function tf(){if(!rf())throw new Error(He.NOT_SUPPORTED_ON_PLATFORM.toString());Fc(tr(Yd,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Fs("otherApp.install")}function nf(e){if(!rf())throw new Error(He.NOT_SUPPORTED_ON_PLATFORM.toString());return Pc("otherApp.notifyInstallCompleted",[e.toString()],tr(Yd,"otherApp.notifyInstallCompleted"))}function rf(){return!(!Kr(ur)||!ur.supports.otherAppStateChange)}var of=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 af="v2";function sf(){return Kr(ur)&&!!ur.supports.plugins}function cf(e){return of(this,void 0,void 0,function*(){if(Kr(ur),!e.func)throw new Error("func is required in PluginMessage.");return Pc("plugins.sendMessage",[new lf(e)],tr(af,"plugins.sendMessage"))})}function uf(e){Ms(tr(af,"plugins.receiveMessage"),"plugins.receiveMessage",(...t)=>{e(df(t))},Object.values(ln),()=>{if(!sf())throw new Error("Receiving plugin messages is not supported in the current host.")})}class lf{constructor(e){this.message=e}serialize(){return this.message}}function df(e){if(1===e.length&&ff(e[0]))return e[0];const[t,n,r]=e;return{func:"string"==typeof t?t:String(null!=t?t:""),args:n,correlationId:"string"==typeof r?r:void 0}}function ff(e){if(!e||"object"!=typeof e)return!1;return"string"==typeof e.func}const pf="v1";var gf,hf,mf;function vf(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Kr(ur,ln.sidePanel),!If())throw mn;Fc(tr(pf,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function wf(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(Kr(ur,ln.sidePanel),!If())throw mn;Fc(tr(pf,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Cf(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(Kr(ur,ln.sidePanel),!If())throw mn;Fc(tr(pf,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function yf(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Kr(ur,ln.sidePanel),!If())throw mn;Fc(tr(pf,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Sf(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Kr(ur,ln.sidePanel),!If())throw mn;Rs(tr(pf,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function bf(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Kr(ur,ln.sidePanel),!If())throw mn;Rs(tr(pf,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Af(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Kr(ur,ln.sidePanel),!If())throw mn;Rs(tr(pf,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Ef(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Kr(ur,ln.sidePanel),!If())throw mn;Rs(tr(pf,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function If(){return!(!Kr(ur)||!ur.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"}(gf||(gf={})),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"}(hf||(hf={})),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"}(mf||(mf={}));const Pf="v1";function Tf(e,t,n,r){if(Kr(ur,ln.content),!Of())throw mn;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");Fc(tr(Pf,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Of(){return!(!Kr(ur)||!ur.supports.appEntity)}const Rf="v1";function Ff(e){return new Promise(t=>{if(Kr(ur),!kf())throw mn;if((Kn.hostClientType===cn.android||Kn.hostClientType===cn.teamsRoomsAndroid||Kn.hostClientType===cn.teamsPhones||Kn.hostClientType===cn.teamsDisplays)&&!Qr(Xe)){const e={errorCode:He.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Cc(tr(Rf,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))})}function kf(){return!(!Kr(ur)||!ur.supports.teams)&&(!!ur.supports.teams.fullTrust&&!!ur.supports.teams.fullTrust.joinedTeams)}var Mf=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 xf="v1";function Nf(e){return Mf(this,void 0,void 0,function*(){if(Kr(ur),!Uf())throw mn;return Ic("getConfigSetting",[e],new Yi,tr(xf,"teams.fullTrust.getConfigSetting"))})}function Uf(){return!(!Kr(ur)||!ur.supports.teams)&&!!ur.supports.teams.fullTrust}const Df="v1";var Lf;function Hf(e,t){if(Kr(ur,ln.content),!Vf())throw mn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Fc(tr(Df,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function _f(e,t){if(Kr(ur),!Vf())throw mn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Fc(tr(Df,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Vf(){return!(!Kr(ur)||!ur.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Lf||(Lf={}));class Bf{static setTimeout(e,t){const n=performance.now(),r=An();return Bf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Bf.setTimeoutCallbacks[e]}static setInterval(e,t){Bf.setTimeout(function n(){e(),Bf.setTimeout(n,t)},t)}static tick(){const e=performance.now(),t=[];for(const n in Bf.setTimeoutCallbacks){const r=Bf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Bf.setTimeoutCallbacks[e].callback(),delete Bf.setTimeoutCallbacks[e]}}}Bf.setTimeoutCallbacks={};class jf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Bf.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&&Bf.clearTimeout(this.timeoutId),this.timeoutId=Bf.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(jf.maxSessionTimeoutInMs,2*t.timeoutInMs):jf.initialSessionTimeoutInMs}}jf.initialSessionTimeoutInMs=1e3,jf.maxSessionTimeoutInMs=3e4;const Wf="v2";class zf{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new jf(zf.distributionBinSize,e=>this.reportPerformanceEvent(tr(Wf,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e]))}startMonitorSlowFrameProcessing(){Bf.setInterval(()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(tr(Wf,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0},zf.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){Bf.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(tr(Wf,"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(tr(Wf,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}zf.distributionBinSize=1e3,zf.calculateFPSInterval=1e3;var qf=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())})},$f=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 Gf="v2",Jf=Un()?void 0:new zf(Fc);var Kf,Qf,Zf;function Xf(e){if(Kr(ur,ln.sidePanel),!rp())throw mn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Rs(tr(Gf,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==Jf?void 0:Jf.setFrameProcessTimeLimit(e.timeLimit),!1),cp())op(e.videoFrameHandler,e.config);else{if(!lp())throw mn;ap(e.videoBufferHandler,e.config)}null==Jf||Jf.startMonitorSlowFrameProcessing()}function Yf(e,t){if(Kr(ur,ln.sidePanel),!rp())throw mn;Fc(tr(Gf,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function ep(e){if(Kr(ur,ln.sidePanel),!rp())throw mn;Rs(tr(Gf,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",bp(e,Jf),!1),Fc(tr(Gf,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function tp(e){Fc(tr(Gf,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function np(e){Fc(tr(Gf,"videoEffects.notifyError"),"video.notifyError",[e])}function rp(){return Kr(ur)&&!!ur.supports.video&&(!!ur.supports.video.mediaStream||!!ur.supports.video.sharedFrame)}function op(e,t){if(Kr(ur,ln.sidePanel),!rp()||!cp())throw mn;Rs(tr(Gf,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>qf(this,void 0,void 0,function*(){const{streamId:n}=t,r=ip(e,Jf);yield pp(n,r,np,Jf)}),!1),Fc(tr(Gf,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function ip(e,t){return n=>qf(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 ap(e,t){if(Kr(ur,ln.sidePanel),!rp()||!lp())throw mn;Rs(tr(Gf,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",t=>{if(t){const n=t.timestamp;null==Jf||Jf.reportStartFrameProcessing(t.width,t.height),e(sp(t),()=>{null==Jf||Jf.reportFrameProcessed(),tp(n)},np)}},!1),Fc(tr(Gf,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function sp(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=$f(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function cp(){var e;return Kr(ur,ln.sidePanel)&&up()&&!!(null===(e=ur.supports.video)||void 0===e?void 0:e.mediaStream)}function up(){var e,t,n,r;return!(!(null===(t=null===(e=Nn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Nn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function lp(){var e;return Kr(ur,ln.sidePanel)&&!!(null===(e=ur.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Kf||(Kf={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Qf||(Qf={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Zf||(Zf={}));var dp=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 fp="v2";function pp(e,t,n,r){var o,i;return dp(this,void 0,void 0,function*(){const a=mp();!Un()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),vp(yield hp(e,n,r),new wp(n,t),a.writable)})}function gp(e,t,n,r){var o,i;return dp(this,void 0,void 0,function*(){const a=mp();!Un()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),vp(yield hp(e,n,r),new Sp(n,t),a.writable)})}function hp(e,t,n){return dp(this,void 0,void 0,function*(){if(Un())throw mn;const r=Nn().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}})}function mp(){if(Un())throw mn;const e=window.MediaStreamTrackGenerator;if(!e)throw mn;return new e({kind:"video"})}function vp(e,t,n){new(0,Nn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class wp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>dp(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 Cp{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 yp{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 Sp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>dp(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=>dp(this,void 0,void 0,function*(){if(Un())throw mn;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 Cp(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 yp(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}}}),Rs(tr(fp,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e})}}function bp(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then(()=>{null==t||t.reportVideoEffectChanged(n||"",r),Fc(tr(fp,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])}).catch(e=>{const t=e in Zf?e:Zf.InitializationFailure;Fc(tr(fp,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])})}}var Ap=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 Ep="v2",Ip=2e3,Pp=Un()?void 0:new zf(Fc);var Tp;function Op(e){var t,n;if(!Up())throw mn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Kr(ur,ln.sidePanel)){if(Rs(tr(Ep,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==Pp?void 0:Pp.setFrameProcessTimeLimit(e),!1),null===(t=ur.supports.video)||void 0===t?void 0:t.mediaStream)Rs(tr(Ep,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>Ap(this,void 0,void 0,function*(){const{streamId:n,metadataInTexture:r}=t,o=Pp?Fp(e.videoFrameHandler,Pp):e.videoFrameHandler;r?yield gp(n,o,Lp,Pp):yield pp(n,o,Lp,Pp)}),!1),Fc(tr(Ep,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=ur.supports.video)||void 0===n?void 0:n.sharedFrame))throw mn;Rs(tr(Ep,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",t=>{if(t){null==Pp||Pp.reportStartFrameProcessing(t.width,t.height);const n=Rp(),r=t.timestamp;e.videoBufferHandler(kp(t),()=>{n(),null==Pp||Pp.reportFrameProcessed(),Dp(r)},Lp)}},!1),Fc(tr(Ep,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Pp||Pp.startMonitorSlowFrameProcessing()}}function Rp(){const e=setTimeout(()=>{Lp(`Frame not processed in ${Ip}ms`,Tp.Warn)},Ip);return function(){clearTimeout(e)}}function Fp(e,t){return n=>Ap(this,void 0,void 0,function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=Rp(),i=yield e(n);return o(),t.reportFrameProcessed(),i})}function kp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Mp(e,t,n){if(Kr(ur,ln.sidePanel),!Up())throw mn;Fc(tr(Ep,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function xp(e){if(Kr(ur,ln.sidePanel),!Up())throw mn;Rs(tr(Ep,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",bp(e,Pp),!1),Fc(tr(Ep,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Np(e){if(Kr(ur,ln.sidePanel),!rp())throw mn;Fc(tr(Ep,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Up(){return Kr(ur),rp()}function Dp(e){Fc(tr(Ep,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Lp(e,t=Tp.Warn){Fc(tr(Ep,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Hp(e){if(Kr(ur),!rp())throw mn;Lp(e,Tp.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Tp||(Tp={}));const _p="v2";class Vp extends Xi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Bp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class jp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Wp extends Xi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class zp{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class qp extends Xi{validate(e){const t=new Wp;let n=!0;return e.allTabs&&e.allTabs.forEach(e=>{n||(n=t.validate(e))}),n}deserialize(e){return e}}function $p(e,t){if(Kr(ur),!Zp())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Xp(e.threadId),t&&0===t.length)throw new Error(`Error code: ${He.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Ic("hostEntity.tab.addAndConfigure",[new jp(e),t],new Wp,tr(_p,"hostEntity.tab.addAndConfigure"))}function Gp(e){if(Kr(ur),!Zp())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Xp(e.threadId),Ic("hostEntity.tab.getAll",[new jp(e)],new qp,tr(_p,"hostEntity.tab.getAll"))}function Jp(e,t){if(Kr(ur),!Zp())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Yp(e),Xp(t.threadId),Ic("hostEntity.tab.reconfigure",[new Bp(e),new jp(t)],new Vp,tr(_p,"hostEntity.tab.reconfigure"))}function Kp(e,t){if(Kr(ur),!Zp())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Yp(e),Xp(t.threadId),Ic("hostEntity.tab.rename",[new Bp(e),new jp(t)],new Vp,tr(_p,"hostEntity.tab.rename"))}function Qp(e,t){if(Kr(ur),!Zp())throw new Error(`Error code: ${He.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Xp(t.threadId),Yp(e),Ic("hostEntity.tab.remove",[new zp(e),new jp(t)],new Yi,tr(_p,"hostEntity.tab.remove"))}function Zp(){var e;return!!(Kr(ur)&&tg()&&(null===(e=ur.supports.hostEntity)||void 0===e?void 0:e.tab))}function Xp(e){if(!e||0==e.length)throw new Error(`Error code: ${He.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function Yp(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${He.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var eg;function tg(){return!(!Kr(ur)||!ur.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(eg||(eg={}));var ng=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 rg="v2",og="Invalid store dialog size",ig="No App Id present, but AppId needed to open AppDetail store",ag="No Collection Id present, but CollectionId needed to open a store specific to a collection";function sg(e){return ng(this,void 0,void 0,function*(){fg();const{size:t}=null!=e?e:{};return Pc("store.openFullStore",[pg(t)],tr(rg,"store.openFullStore"))})}function cg(e){return ng(this,void 0,void 0,function*(){fg();const{size:t,appId:n}=e;if(!(n instanceof co))throw new Error(ig);return Pc("store.openAppDetail",[pg(t),n],tr(rg,"store.openAppDetail"))})}function ug(e){return ng(this,void 0,void 0,function*(){fg();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return Pc("store.openInContextStore",[pg(t),n,r,o,null==i?void 0:i.map(e=>e.toString())],tr(rg,"store.openInContextStore"))})}function lg(e){return ng(this,void 0,void 0,function*(){fg();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(ag);return Pc("store.openSpecificStore",[pg(t),n],tr(rg,"store.openSpecificStore"))})}function dg(){return Kr(ur)&&!!ur.supports.store}function fg(){if(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),!dg())throw mn}function pg(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(og);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(og);return JSON.stringify(e)}var gg=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const hg="v1",mg=er("widgetHosting");function vg(){return Kr(ur)&&!!ur.supports.widgetHosting}function wg(e,t){return gg(this,void 0,void 0,function*(){return Jr(),mg("Calling tool with widgetId and input: ",{widgetId:e,input:t}),Ic("widgetHosting.callTool",[new Rg(e,t)],new Tg,tr(hg,"widgetHosting.callTool"),$e)})}function Cg(e,t){return gg(this,void 0,void 0,function*(){return Jr(),mg("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:t.prompt}),Pc("widgetHosting.sendFollowUpMessage",[new Fg(e,t)],tr(hg,"widgetHosting.sendFollowUpMessage"))})}function yg(e,t){return gg(this,void 0,void 0,function*(){return Jr(),mg("Requesting display mode with widgetId: ",{widgetId:e,mode:t.mode}),Pc("widgetHosting.requestDisplayMode",[new kg(e,t)],tr(hg,"widgetHosting.requestDisplayMode"))})}function Sg(e,t){return gg(this,void 0,void 0,function*(){return Jr(),mg("Requesting modal with widgetId and options: ",{widgetId:e,options:t}),Ic("widgetHosting.requestModal",[new Ug(e,t)],new Og,tr(hg,"widgetHosting.requestModal"),$e)})}function bg(e,t){Jr(),mg("Notifying intrinsic height with widgetId: ",{widgetId:e,height:t}),Pc("widgetHosting.notifyIntrinsicHeight",[new Ng(e,t)],tr(hg,"widgetHosting.notifyIntrinsicHeight"))}function Ag(e,t,n){Jr(),mg("Content size changed with widgetId: ",{widgetId:e,width:t,height:n}),Pc("widgetHosting.contentSizeChanged",[new Dg(e,t,n)],tr(hg,"widgetHosting.contentSizeChanged"))}function Eg(e,t){return gg(this,void 0,void 0,function*(){return Jr(),mg("Setting widget state with widgetId: ",{widgetId:e,state:t}),Pc("widgetHosting.setWidgetState",[new xg(e,t)],tr(hg,"widgetHosting.setWidgetState"))})}function Ig(e,t){Jr(),mg("Opening external URL with widgetId: ",{widgetId:e,href:t.href}),Pc("widgetHosting.openExternal",[new Mg(e,t)],tr(hg,"widgetHosting.openExternal"))}function Pg(e){Ms(tr(hg,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",e,[],()=>{if(!vg())throw new Error("Widget Hosting is not supported on this platform")})}class Tg extends Xi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Og extends Xi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Rg{constructor(e,t){this.widgetId=e,this.toolInput=t}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}}class Fg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,prompt:this.args.prompt}}}class kg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,mode:this.args.mode}}}class Mg{constructor(e,t){this.widgetId=e,this.payload=t}serialize(){return{widgetId:this.widgetId,href:this.payload.href}}}class xg{constructor(e,t){this.widgetId=e,this.state=t}serialize(){return{widgetId:this.widgetId,state:this.state}}}class Ng{constructor(e,t){this.widgetId=e,this.height=t}serialize(){return{widgetId:this.widgetId,height:this.height}}}class Ug{constructor(e,t){this.widgetId=e,this.options=t}serialize(){return{widgetId:this.widgetId,id:this.options.id,title:this.options.title,content:this.options.content,width:this.options.width,height:this.options.height}}}class Dg{constructor(e,t,n){this.widgetId=e,this.width=t,this.height=n}serialize(){return{widgetId:this.widgetId,width:this.width,height:this.height}}}var Lg=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="v1",_g="v2";let Vg;function Bg(e){Vg=e}function jg(e){const t=void 0!==e,n=t?e:Vg;if(!n)throw new Error("No parameters are provided for authentication");Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.remove,ln.task,ln.stage,ln.meetingStage);return Wg(n.successCallback||n.failureCallback?tr(Hg,"authentication.authenticate"):tr(_g,"authentication.authenticate"),n).then(e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Vg=void 0)}}).catch(e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Vg=void 0)}})}function Wg(e,t){return Lg(this,void 0,void 0,function*(){const n=Hn(t.url);return Ln(n),Ac(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then(([e,t])=>{if(e)return t;throw new Error(t)})})}function zg(e){Jr();return qg(e&&(e.successCallback||e.failureCallback)?tr(Hg,"authentication.getAuthToken"):tr(_g,"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 qg(e,t){return new Promise(n=>{n(Ac(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 $g(e){Jr();return Gg(e&&(e.successCallback||e.failureCallback)?tr(Hg,"authentication.getUser"):tr(_g,"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 Gg(e){return new Promise(t=>{t(Ac(e,"authentication.getUser"))}).then(([e,t])=>{if(e)return t;throw t})}function Jg(e,t){Kr(ur,ln.authentication);Fc(tr(t?Hg:_g,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),eu(hc.parentWindow,()=>setTimeout(()=>hc.currentWindow.close(),200))}function Kg(e,t){Kr(ur,ln.authentication);Fc(tr(t?Hg:_g,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),eu(hc.parentWindow,()=>setTimeout(()=>hc.currentWindow.close(),200))}var Qg;function Zg(){return Kr(ur)&&!!ur.supports.appPerformanceMetrics}function Xg(e){Kr(ur),Rs(tr("v2","appPerformanceMetrics.memoryUsageHeartbeat"),"appPerformanceMetrics.memoryUsageHeartbeat",e)}function Yg(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"}(Qg||(Qg={}));class eh{constructor(e){this.val=e,Yg(e)}toString(){return this.val}}const th="/l/app/",nh="/l/meeting/new",rh="attendees",oh="startTime",ih="endTime",ah="subject",sh="content",ch="/l/call/0/0",uh="source",lh="withVideo",dh="/l/chat/0/0",fh="users",ph="topicName",gh="message";function hh(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${fh}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${ph}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${gh}=${encodeURIComponent(n)}`;return`${st}://${ct}${dh}?${r}${o}${i}`}function mh(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${fh}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${lh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${uh}=${encodeURIComponent(n)}`;return`${st}://${ct}${ch}?${r}${o}${i}`}function vh(e,t,n,r,o){const i=void 0===e?"":`${rh}=`+e.map(e=>encodeURIComponent(e)).join(","),a=void 0===t?"":`&${oh}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${ih}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${ah}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${sh}=${encodeURIComponent(o)}`;return`${st}://${ct}${nh}?${i}${a}${s}${c}${u}`}function wh(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${st}://${ct}${th}${encodeURIComponent(e)}`}const Ch="v1";function yh(e){return new Promise(t=>{if(Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage),!Sh())throw new Error("Not supported");const n=tr(Ch,"appInstallDialog.openAppInstallDialog");ur.isLegacyTeams?t(yc(n,"executeDeepLink",wh(e.appId))):(Fc(n,"appInstallDialog.openAppInstallDialog",[e]),t())})}function Sh(){return!(!Kr(ur)||!ur.supports.appInstallDialog)}const bh="v1",Ah=er("media");var Eh,Ih,Ph,Th,Oh,Rh,Fh;!function(e){e.Base64="base64",e.ID="id"}(Eh||(Eh={}));class kh{}function Mh(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Kr(ur,ln.content,ln.task),!Kn.isFramelessWindow){return void e({errorCode:He.NOT_SUPPORTED_ON_PLATFORM},[])}if(!Qr(tt)){return void e({errorCode:He.OLD_PLATFORM},[])}Fc(tr(bh,"media.captureImage"),"captureImage",e)}function xh(){if(Kr(ur,ln.content,ln.task),!Uh())throw mn;const e=_e.Media;return new Promise(t=>{t(bc(tr(bh,"media.hasPermission"),"permissions.has",e))})}function Nh(){if(Kr(ur,ln.content,ln.task),!Uh())throw mn;const e=_e.Media;return new Promise(t=>{t(bc(tr(bh,"media.requestPermission"),"permissions.request",e))})}function Uh(){return!(!Kr(ur)||!ur.supports.permissions)}class Dh extends kh{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(Kr(ur,ln.content,ln.task),!Qr(nt)){return void e({errorCode:He.OLD_PLATFORM},new Blob)}if(!Qh(this.mimeType,this.format,this.content)){return void e({errorCode:He.INVALID_ARGUMENTS},new Blob)}Qr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e)}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Fc(tr(bh,"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=jh(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Wh(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):Ah(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:He.INTERNAL_ERROR,message:"data received is null"},new Blob)})}getMediaViaHandler(e){const t=An(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!uo(e)&&Fc(tr(bh,"media.getMedia"),"getMedia",r),Rs(tr(bh,"media.registerGetMediaRequestHandler"),"getMedia"+t,function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Fs("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=jh(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Fs("getMedia"+t)}else{const e=Wh(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:He.INTERNAL_ERROR,message:"data received is null"},new Blob),Fs("getMedia"+t)}})}}class Lh{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Kr(ur,ln.content,ln.task);try{Xr(Qe)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Fc(tr(bh,"media.controller"),"media.controller",[n],e=>{t&&t(e)})}stop(e){this.notifyEventToHost(Ih.StopRecording,e)}}class Hh extends Lh{getMediaType(){return Oh.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Ih.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function _h(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Kr(ur,ln.content,ln.task),!Qr(nt)){const e={errorCode:He.OLD_PLATFORM};return void t(e,[])}try{zh(e)}catch(e){return void t(e,[])}if(!$h(e)){const e={errorCode:He.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Fc(tr(bh,"media.selectMedia"),"selectMedia",n,(n,r,o)=>{var i,a;if(o)return void(qh(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 Dh(e));t(n,s)})}function Vh(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Kr(ur,ln.content,ln.task),!Qr(nt)){return void t({errorCode:He.OLD_PLATFORM})}if(!Zh(e)){return void t({errorCode:He.INVALID_ARGUMENTS})}const n=[e];Fc(tr(bh,"media.viewImages"),"viewImages",n,t)}function Bh(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Kr(ur,ln.content,ln.task),Kn.hostClientType===cn.desktop||Kn.hostClientType===cn.web||Kn.hostClientType===cn.rigel||Kn.hostClientType===cn.teamsRoomsWindows||Kn.hostClientType===cn.teamsRoomsAndroid||Kn.hostClientType===cn.teamsPhones||Kn.hostClientType===cn.teamsDisplays){return void e({errorCode:He.NOT_SUPPORTED_ON_PLATFORM},"")}if(!Qr(rt)){return void e({errorCode:He.OLD_PLATFORM},"")}if(!Xh(t)){return void e({errorCode:He.INVALID_ARGUMENTS},"")}Fc(tr(bh,"media.scanBarCode"),"media.scanBarCode",[t],e)}function jh(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 Wh(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 zh(e){Jh(e)?Xr(Ke):Kh(e)?Xr(Qe):Gh(e)&&Xr(Ze)}function qh(e){return!(e.mediaType!=Oh.Video||!e.videoProps||!e.videoProps.videoController)}function $h(e){return!(null==e||e.maxMediaCount>10)}function Gh(e){var t;return!((null==e?void 0:e.mediaType)!=Oh.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Jh(e){return!(!e||e.mediaType!=Oh.VideoAndImage&&!e.videoAndImageProps)}function Kh(e){return!(!e||e.mediaType!=Oh.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Qh(e,t,n){return null!=e&&null!=t&&t==Eh.ID&&null!=n}function Zh(e){return!(null==e||e.length<=0||e.length>10)}function Xh(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Yh(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"}(Ih||(Ih={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Ph||(Ph={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Th||(Th={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Oh||(Oh={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(Rh||(Rh={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Fh||(Fh={}));const em="v2";function tm(e){return new Promise(t=>{if(Kr(ur,ln.content,ln.task),!om())throw mn;if(!Xh(e))throw{errorCode:He.INVALID_ARGUMENTS};t(bc(tr(em,"barCode.scanBarCode"),"media.scanBarCode",e))})}function nm(){if(Kr(ur,ln.content,ln.task),!om())throw mn;const e=_e.Media;return new Promise(t=>{t(bc(tr(em,"barCode.hasPermission"),"permissions.has",e))})}function rm(){if(Kr(ur,ln.content,ln.task),!om())throw mn;const e=_e.Media;return new Promise(t=>{t(bc(tr(em,"barCode.requestPermission"),"permissions.request",e))})}function om(){return!!(Kr(ur)&&ur.supports.barCode&&ur.supports.permissions)}const im="v2";function am(e){return sm(tr(im,"chat.openChat"),e)}function sm(e,t){return new Promise(n=>{if(Kr(ur,ln.content,ln.task),!um())throw mn;if(ur.isLegacyTeams)n(yc(e,"executeDeepLink",hh([t.user],void 0,t.message)));else{n(yc(e,"chat.openChat",{members:[t.user],message:t.message}))}})}function cm(e){const t=tr(im,"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(sm(t,r))}else{if(Kr(ur,ln.content,ln.task),!um())throw mn;if(ur.isLegacyTeams)n(yc(t,"executeDeepLink",hh(e.users,e.topic,e.message)));else{n(yc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}})}function um(){return!(!Kr(ur)||!ur.supports.chat)}var lm=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 dm="v2";function fm(e){return lm(this,void 0,void 0,function*(){if(Kr(ur,ln.content,ln.meetingStage,ln.task,ln.settings,ln.stage,ln.sidePanel),!gm())throw mn;if(!e.type||!Object.values(ze).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(ze)}`);const t=yield xn(e),n={mimeType:e.type,content:t};return bc(tr(dm,"clipboard.write"),"clipboard.writeToClipboard",n)})}function pm(){return lm(this,void 0,void 0,function*(){Kr(ur,ln.content,ln.meetingStage,ln.task,ln.settings,ln.stage,ln.sidePanel);const e=tr(dm,"clipboard.read");if(!gm())throw mn;const t=yield bc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Mn(e.mimeType,e.content)}return t})}function gm(){return Kn.isFramelessWindow?!(!Kr(ur)||!ur.supports.clipboard):!!(Kr(ur)&&navigator&&navigator.clipboard&&ur.supports.clipboard)}var hm=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const mm="v2",vm={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var wm;function Cm(){var e;return null!==(e=Kr(ur)&&(ur.isNAAChannelRecommended||Em()))&&void 0!==e&&e}function ym(){return Kr(ur),hc.parentOrigin}function Sm(){var e;return null!==(e=Kr(ur)&&ur.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function bm(){var e;return null!==(e=Kr(ur)&&(ur.isDeeplyNestedAuthSupported||Am()))&&void 0!==e&&e}function Am(){return!!(Kr(ur)&&Im()&&ur.isLegacyTeams&&Qr(mr))}function Em(){return!!(Kr(ur)&&Im()&&ur.isLegacyTeams&&ur.supports.nestedAppAuth)}function Im(){return Kn.hostClientType===cn.android||Kn.hostClientType===cn.ios||Kn.hostClientType===cn.ipados||Kn.hostClientType===cn.visionOS}function Pm(e){return hm(this,void 0,void 0,function*(){if(!Sm())throw mn;const t=e.map(Rm);return Om(wm.ADD,t)})}function Tm(e){return hm(this,void 0,void 0,function*(){if(!Sm())throw mn;const t=e.map(Rm);return Om(wm.DELETE,t)})}function Om(e,t){return hm(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 Ic("nestedAppAuth.manageNAATrustedOrigins",[new Fm(e,t)],vm,tr(mm,"nestedAppAuth.manageNAATrustedOrigins"))})}function Rm(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"}(wm||(wm={}));class Fm{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const km="v2";function Mm(){if(Kr(ur,ln.content,ln.task),!Nm())throw mn;return bc(tr(km,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function xm(e){if(Kr(ur,ln.content,ln.task),!Nm())throw mn;if(!e)throw{errorCode:He.INVALID_ARGUMENTS};return bc(tr(km,"geoLocation.showLocation"),"location.showLocation",e)}function Nm(){return!!(Kr(ur)&&ur.supports.geoLocation&&ur.supports.geoLocation.map&&ur.supports.permissions)}const Um="v2";function Dm(){if(Kr(ur,ln.content,ln.task),!_m())throw mn;return bc(tr(Um,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Lm(){if(Kr(ur,ln.content,ln.task),!_m())throw mn;const e=_e.GeoLocation;return new Promise(t=>{t(bc(tr(Um,"geoLocation.hasPermission"),"permissions.has",e))})}function Hm(){if(Kr(ur,ln.content,ln.task),!_m())throw mn;const e=_e.GeoLocation;return new Promise(t=>{t(bc(tr(Um,"geoLocation.requestPermission"),"permissions.request",e))})}function _m(){return!!(Kr(ur)&&ur.supports.geoLocation&&ur.supports.permissions)}function Vm(){return ur.hostVersionsInfo?ur.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Bm="v1";class jm{postMessage(e,t){Kr(ur),Fc(tr(Bm,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||Sn())}addEventListener(e,t){Kr(ur),"message"===e&&Rs(tr(Bm,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Wm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Kr(ur,ln.task),Fc(tr(Bm,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||Sn())}addEventListener(e,t){Kr(ur,ln.task),"message"===e&&Rs(tr(Bm,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const zm="v2";function qm(e){if(Kr(ur,ln.content),!$m())throw mn;if(!e||!kn(e))throw{errorCode:He.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return bc(tr(zm,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function $m(){return!(!Kr(ur)||!ur.supports.secondaryBrowser)}const Gm="v1";function Jm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Kr(ur,ln.content,ln.task),!Qr(Ye))throw{errorCode:He.OLD_PLATFORM};if(!e)throw{errorCode:He.INVALID_ARGUMENTS};if(!Qm())throw mn;Fc(tr(Gm,"location.getLocation"),"location.getLocation",[e],t)}function Km(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Kr(ur,ln.content,ln.task),!Qr(Ye))throw{errorCode:He.OLD_PLATFORM};if(!e)throw{errorCode:He.INVALID_ARGUMENTS};if(!Qm())throw mn;Fc(tr(Gm,"location.showLocation"),"location.showLocation",[e],t)}function Qm(){return!(!Kr(ur)||!ur.supports.location)}const Zm="v1";function Xm(e){Kr(ur,ln.sidePanel),e.contentUrl&&new URL(e.contentUrl),Fc(tr(Zm,"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 ev="v1";var tv,nv,rv,ov,iv,av;function sv(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Fc(tr(ev,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function cv(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Fc(tr(ev,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function uv(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage,ln.settings,ln.content),Fc(tr(ev,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function lv(){var e,t,n;return Ym(this,void 0,void 0,function*(){let r;Kr(ur,ln.sidePanel,ln.meetingStage,ln.settings,ln.content);try{const e=!0;r=yield bc(tr("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)==ov.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==ov.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(He.NOT_SUPPORTED_ON_PLATFORM.toString());return r})}function dv(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage,ln.task),Fc(tr(ev,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function fv(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Kr(ur,ln.sidePanel),Fc(tr(ev,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function pv(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Kr(ur,ln.sidePanel),Fc(tr(ev,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function gv(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Kr(ur,ln.sidePanel),Fc(tr(ev,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function hv(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Kr(ur,ln.sidePanel),Rs(tr(ev,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function mv(e,t,n={sharingProtocol:iv.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Fc(tr(ev,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function vv(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Fc(tr(ev,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function wv(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Fc(tr(ev,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Cv(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Fc(tr(ev,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function yv(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Rs(tr(ev,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Sv(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Rs(tr(ev,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function bv(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Kr(ur,ln.sidePanel,ln.meetingStage),Rs(tr(ev,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Av(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Kr(ur);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||av.Other};return bc(tr("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Ev(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");Kr(ur,ln.sidePanel,ln.meetingStage),e.isAppHandlingAudio?Iv(e,t):Pv(e,t)}function Iv(e,t){Fc(tr(ev,"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");Rs(tr(ev,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",t=>Ym(this,void 0,void 0,function*(){try{const n=yield e.micMuteStateChangedCallback(t);Ov(n,n.isMicMuted===t.isMicMuted?tv.HostInitiated:tv.AppDeclinedToChange)}catch(e){Ov(t,tv.AppFailedToChange)}}));Rs(tr(ev,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)}),t(r)})}function Pv(e,t){Fc(tr(ev,"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");ks("meeting.micStateChanged")&&Fs("meeting.micStateChanged"),ks("meeting.audioDeviceSelectionChanged")&&Fs("meeting.audioDeviceSelectionChanged"),t(n)})}function Tv(e){Ov(e,tv.AppInitiated)}function Ov(e,t){Kr(ur,ln.sidePanel,ln.meetingStage),Fc(tr(ev,"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"}(tv||(tv={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(nv||(nv={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(rv||(rv={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(ov||(ov={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(iv||(iv={})),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"}(av||(av={}));const Rv="v1",Fv="v2";function kv(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=tr(Rv,"monetization.openPurchaseExperience")):(r=e,o=tr(Fv,"monetization.openPurchaseExperience"));return Kr(ur,ln.content),Tn(()=>new Promise(e=>{if(!Mv())throw mn;e(bc(o,"monetization.openPurchaseExperience",r))}),n)}function Mv(){return!(!Kr(ur)||!ur.supports.monetization)}const xv="v2";function Nv(e){return new Promise(t=>{if(Kr(ur,ln.content),!Dv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(yc(tr(xv,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))})}function Uv(e){return new Promise(t=>{if(Kr(ur,ln.content),!Dv())throw new Error("Not supported");const n=tr(xv,"calendar.composeMeeting");ur.isLegacyTeams?t(yc(n,"executeDeepLink",vh(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(yc(n,"calendar.composeMeeting",e))})}function Dv(){return!(!Kr(ur)||!ur.supports.calendar)}const Lv="v2";function Hv(e){e&&0!==e.length&&e.forEach(e=>{Yg(e)})}function _v(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===Gv.New&&(Hv(t.toRecipients),Hv(t.ccRecipients),Hv(t.bccRecipients))}function Vv(e){if(Kr(ur,ln.content),!Bv())throw new Error("Not supported");return _v(e),Pc("mail.handoff.composeMail",[new jv(e)],tr(Lv,"mail.handoff.composeMail"))}function Bv(){return!!(Kr(ur)&&ur.supports.mail&&ur.supports.mail.handoff)}class jv{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const Wv="v2";function zv(e){return new Promise(t=>{if(Kr(ur,ln.content),!$v())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(yc(tr(Wv,"mail.openMailItem"),"mail.openMailItem",e))})}function qv(e){return new Promise(t=>{if(Kr(ur,ln.content),!$v())throw new Error("Not supported");t(yc(tr(Wv,"mail.composeMail"),"mail.composeMail",e))})}function $v(){return!(!Kr(ur)||!ur.supports.mail)}var Gv;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Gv||(Gv={}));const Jv="v2";function Kv(){if(!Kn.printCapabilityEnabled){if(Kr(ur),!tw())throw mn;Kn.printCapabilityEnabled=!0,document.addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(Qv(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())})}}function Qv(){Nn().print()}function Zv(e){Xv(tr(Jv,"teamsAPIs_registerOnLoadHandler"),e,()=>{if(!uo(e)&&!tw())throw mn})}function Xv(e,t,n){!uo(t)&&Kr(ur),!uo(t)&&n&&n(),_s(e,t)}function Yv(e){ew(tr(Jv,"teamsAPIs_registerBeforeUnloadHandler"),e,()=>{if(!uo(e)&&!tw())throw mn})}function ew(e,t,n){!uo(t)&&Kr(ur),!uo(t)&&n&&n(),js(e,t)}function tw(){return!(!Kr(ur)||!ur.supports.teamsCore)}const nw="v1",rw="v2";function ow(e,t){let n,r;Kr(ur,ln.content,ln.task,ln.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=tr(nw,"people.selectPeople")):(r=e,o=tr(rw,"people.selectPeople")),In(iw,n,o,r)}function iw(e,t){return new Promise(n=>{if(!Qr(et))throw{errorCode:He.OLD_PLATFORM};if(!Yh(t))throw{errorCode:He.INVALID_ARGUMENTS};if(!aw())throw mn;n(bc(e,"people.selectPeople",t))})}function aw(){return!(!Kr(ur)||!ur.supports.people)}function sw(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?cw(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function cw(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 uw="v2";function lw(e){return Kr(ur,ln.content),new Promise(t=>{const[n,r]=sw(e);if(!n)throw{errorCode:He.INVALID_ARGUMENTS,message:r};const o={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(bc(tr(uw,"profile.showProfile"),"profile.showProfile",o))})}function dw(){return!(!Kr(ur)||!ur.supports.profile)}const fw="v2",pw="search.queryChange",gw="search.queryClose",hw="search.queryExecute";function mw(e,t,n){if(Kr(ur,ln.content),!ww())throw mn;Rs(tr(fw,"search.registerOnClosedHandler"),gw,e),Rs(tr(fw,"search.registerOnExecutedHandler"),hw,t),n&&Rs(tr(fw,"search.registerOnChangeHandler"),pw,n)}function vw(){if(Kr(ur,ln.content),!ww())throw mn;Fc(tr(fw,"search.unregisterHandlers"),"search.unregister"),Fs(pw),Fs(gw),Fs(hw)}function ww(){return!(!Kr(ur)||!ur.supports.search)}function Cw(){return new Promise(e=>{if(Kr(ur,ln.content),!ww())throw new Error("Not supported");e(yc(tr(fw,"search.closeSearch"),"search.closeSearch"))})}var yw=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 Sw="v2";function bw(){return yw(this,void 0,void 0,function*(){if(Kr(ur,ln.sidePanel,ln.meetingStage),!Aw())throw mn;return yield bc(tr(Sw,"sharing.history.getContent"),"sharing.history.getContent")})}function Aw(){var e;return Kr(ur)&&void 0!==(null===(e=ur.supports.sharing)||void 0===e?void 0:e.history)}const Ew="v1",Iw="v2",Pw={shareWebContent:"sharing.shareWebContent"};function Tw(e,t){try{Rw(e),Fw(e),kw(e)}catch(e){return Pn(()=>Promise.reject(e),t)}Kr(ur,ln.content,ln.sidePanel,ln.task,ln.stage,ln.meetingStage);return Pn(Ow,t,tr(t?Ew:Iw,"sharing.shareWebContent"),e)}function Ow(e,t){return new Promise(n=>{if(!Mw())throw mn;n(bc(e,Pw.shareWebContent,t))})}function Rw(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:He.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Fw(e){let t;if(e.content.some(e=>!e.type))throw t={errorCode:He.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some(t=>t.type!==e.content[0].type))throw t={errorCode:He.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function kw(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:He.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some(e=>!e.url))throw t={errorCode:He.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Mw(){return!(!Kr(ur)||!ur.supports.sharing)}const xw="v2";function Nw(){return new Promise(e=>{if(Kr(ur,ln.content),!Uw())throw mn;e(bc(tr(xw,"stageView.self.close"),"stageView.self.close"))})}function Uw(){var e;return Kr(ur)&&void 0!==(null===(e=ur.supports.stageView)||void 0===e?void 0:e.self)}const Dw="v2";var Lw;function Hw(e){return new Promise(t=>{if(Kr(ur,ln.content),!_w())throw mn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(bc(tr(Dw,"stageView.open"),"stageView.open",e))})}function _w(){return!(!Kr(ur)||!ur.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(Lw||(Lw={}));const Vw=10;var Bw=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 jw="v2";function Ww(e){return Bw(this,void 0,void 0,function*(){Kr(ur,ln.content,ln.task),$w(),Gw(e);const t=yield bc(tr(jw,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return Jw(e.maxVisualMediaCount,t),t})}function zw(e){return Bw(this,void 0,void 0,function*(){Kr(ur,ln.content,ln.task),$w(),Gw(e);const t=yield bc(tr(jw,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return Jw(e.maxVisualMediaCount,t),t})}function qw(){return!!(Kr(ur)&&ur.supports.visualMedia&&ur.supports.visualMedia.image&&ur.supports.permissions)}function $w(){if(!qw())throw mn}function Gw(e){if(!e||e.maxVisualMediaCount>Vw||e.maxVisualMediaCount<1)throw Cn}function Jw(e,t){if(t.length>e)throw yn}const Kw="v2";var Qw,Zw;function Xw(){if(Kr(ur,ln.content,ln.task),!qw())throw mn;const e=_e.Media;return bc(tr(Kw,"visualMedia.hasPermission"),"permissions.has",e)}function Yw(){if(Kr(ur,ln.content,ln.task),!qw())throw mn;const e=_e.Media;return bc(tr(Kw,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(Qw||(Qw={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Zw||(Zw={}));var eC=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};let tC=null;function nC(){return eC(this,void 0,void 0,function*(){return null===tC&&(tC=(yield Lo()).app.host.name),tC})}var rC=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 oC(){return rC(this,void 0,void 0,function*(){if(Kr(ur),!aC())throw mn;return!(!ur.isLegacyTeams||Kn.hostClientType!==cn.android&&Kn.hostClientType!==cn.ios&&Kn.hostClientType!==cn.ipados&&Kn.hostClientType!==cn.visionOS||(yield iC())!==un.teams)||(yield Cc(tr("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))})}function iC(){return rC(this,void 0,void 0,function*(){return nC()})}function aC(){return Kr(ur)&&void 0!==ur.supports.webStorage}const sC="v2";var cC;function uC(e){const t=tr(sC,"call.startCall");return new Promise(n=>{var r;if(Kr(ur,ln.content,ln.task),!lC())throw mn;if(!ur.isLegacyTeams)return Fc(t,"call.startCall",[e],n);n(Cc(t,"executeDeepLink",mh(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(cC.Video),e.source)).then(e=>{if(!e)throw new Error(ft);return e}))})}function lC(){return!(!Kr(ur)||!ur.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(cC||(cC={}));const dC="v1";function fC(){oa(tr(dC,"appInitialization.notifyAppLoaded"))}function pC(){Fc(tr(dC,"appInitialization.notifySuccess"),Ro.Success,[Er])}function gC(e){aa(tr(dC,"appInitialization.notifyFailure"),e)}function hC(e){ia(tr(dC,"appInitialization.notifyExpectedFailure"),e)}const mC=er("thirdPartyCloudStorage"),vC="v2";class wC{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let CC=[],yC=null,SC=!0,bC=null;function AC(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(!e||""===e){return void t([],{errorCode:He.INVALID_ARGUMENTS})}if(Kr(ur,ln.content,ln.task),!IC())throw mn;if(bC)throw bC=null,new Error("getDragAndDropFiles cannot be called twice");bC=t,SC=!0,Fc(tr(vC,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],EC)}function EC(e){if(bC)if(e&&e.error)bC([],e.error),bC=null;else if(e&&e.fileChunk)try{SC||0!==e.fileChunk.chunkSequence||(mC("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),SC=!0,bC([],{errorCode:He.INTERNAL_ERROR,message:"error occurred while receiving data"}),CC=[],bC=null);const t=Wh(e.fileChunk,e.fileType);if(t?(yC||(yC=new wC(e.fileType,[])),yC.assembleAttachment.push(t)):(mC(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),bC?bC([],{errorCode:He.INTERNAL_ERROR,message:"error occurred while receiving data"}):bC=null,CC=[],bC=null,SC=!0),SC=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&yC){const t=jh(yC.assembleAttachment,yC.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});CC.push(n)}e.isLastFile&&bC&&(bC(CC,e.error),CC=[],bC=null,SC=!0),yC=null}}catch(e){bC&&(bC([],{errorCode:He.INTERNAL_ERROR,message:e}),CC=[],bC=null,SC=!0)}else bC([],{errorCode:He.INTERNAL_ERROR,message:"data received is null"}),CC=[],bC=null,SC=!0}function IC(){return!(!Kr(ur)||!ur.supports.thirdPartyCloudStorage)}const PC="v1";function TC(e,t){ra(tr(PC,"initialize"),t).then(()=>{e&&e()})}function OC(){Kv()}function RC(){Qv()}function FC(e){Jr(),Fc(tr(PC,"getContext"),"getContext",t=>{t.frameContext||(t.frameContext=Kn.frameContext),e(t)})}function kC(e){fa(tr(PC,"registerOnThemeChangeHandlerHelper"),e)}function MC(e){Ms(tr(PC,"registerFullScreenHandler"),"fullScreenChange",e,[])}function xC(e){Ms(tr(PC,"registerAppButtonClickHandler"),"appButtonClick",e,[ln.content])}function NC(e){Ms(tr(PC,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[ln.content])}function UC(e){Ms(tr(PC,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[ln.content])}function DC(e){xa(tr(PC,"registerBackButtonHandler"),e)}function LC(e){Xv(tr(PC,"registerOnLoadHandler"),e)}function HC(e){ew(tr(PC,"registerBeforeUnloadHandler"),e)}function _C(e){Ms(tr(PC,"registerFocusEnterHandler"),"focusEnter",e,[])}function VC(e){Ms(tr(PC,"registerChangeSettingsHandler"),"changeSettings",e,[ln.content])}function BC(e,t){Kr(ur),cs(tr(PC,"getTabInstances"),t).then(t=>{e(t)})}function jC(e,t){Kr(ur),us(tr(PC,"getMruTabInstances"),t).then(t=>{e(t)})}function WC(e){ls(tr(PC,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function zC(e,t){Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.task,ln.stage,ln.meetingStage);const n=null!=t?t:Sn();ga(tr(PC,"executeDeepLink"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function qC(e){ds(tr(PC,"setFrameContext"),e)}function $C(e,t,n){ra(tr(PC,"initializeWithFrameContext"),n).then(()=>t&&t()),ds(tr(PC,"setFrameContext"),e)}const GC="v1";function JC(e){ss(tr(GC,"navigation.returnFocus"),e)}function KC(e,t){Kr(ur);const n=null!=t?t:Sn();as(tr(GC,"navigation.navigateToTab"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function QC(e,t){Kr(ur,ln.content,ln.sidePanel,ln.settings,ln.remove,ln.task,ln.stage,ln.meetingStage);const n=null!=t?t:Sn();os(tr(GC,"navigation.navigateCrossDomain"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function ZC(e){Kr(ur);const t=null!=e?e:Sn();is(tr(GC,"navigation.navigateBack")).then(()=>{t(!0)}).catch(e=>{t(!1,e.message)})}const XC="v1";function YC(e){fs(tr(XC,"settings.setValidityState"),e)}function ey(e){Kr(ur,ln.content,ln.settings,ln.remove,ln.sidePanel),ps(tr(XC,"settings.getSettings")).then(t=>{e(t)})}function ty(e,t){Kr(ur,ln.content,ln.settings,ln.sidePanel);const n=null!=t?t:Sn();gs(tr(XC,"settings.setSettings"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function ny(e){Wi(tr(XC,"settings.registerOnSaveHandler"),e)}function ry(e){qi(tr(XC,"settings.registerOnRemoveHandler"),e)}var oy=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 iy="v1";function ay(e,t){const n=tr(iy,"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?(Kr(ur,ln.content,ln.sidePanel,ln.meetingStage),Fc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?li(n,ly(e),r):ui(n,uy(e),r),new jm}function sy(e){e=dy(e);const{width:t,height:n}=e,r=oy(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ci(tr(iy,"tasks.updateTask"),e)}function cy(e,t){di(tr(iy,"tasks.submitTask"),e,t)}function uy(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:gn.Small,width:e.width?e.width:gn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function ly(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:gn.Small,width:e.width?e.width:gn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function dy(e){return e.height=e.height?e.height:gn.Small,e.width=e.width?e.width:gn.Small,e}const fy="v2";var py,gy;function hy(){return!(!Kr(ur,ln.meetingStage,ln.sidePanel,ln.content)||!ur.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(py||(py={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(gy||(gy={}));class my{getFluidTenantInfo(){return vy(),new Promise(e=>{e(bc(tr(fy,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))})}getFluidToken(e){return vy(),new Promise(t=>{t(bc(tr(fy,"interactive.getFluidToken"),"interactive.getFluidToken",e))})}getFluidContainerId(){return vy(),new Promise(e=>{e(bc(tr(fy,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))})}setFluidContainerId(e){return vy(),new Promise(t=>{t(bc(tr(fy,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))})}getNtpTime(){return vy(),new Promise(e=>{e(bc(tr(fy,"interactive.getNtpTime"),"interactive.getNtpTime"))})}registerClientId(e){return vy(),new Promise(t=>{t(bc(tr(fy,"interactive.registerClientId"),"interactive.registerClientId",e))})}getClientRoles(e){return vy(),new Promise(t=>{t(bc(tr(fy,"interactive.getClientRoles"),"interactive.getClientRoles",e))})}getClientInfo(e){return vy(),new Promise(t=>{t(bc(tr(fy,"interactive.getClientInfo"),"interactive.getClientInfo",e))})}static create(){return vy(),new my}}function vy(){if(!hy())throw new Error("LiveShareHost Not supported")}var wy=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 Cy(e){try{return e.cartItems=yy(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function yy(e){return e.map(e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=yy(e.accessories)),e})}const Sy=e=>{try{return e.map(e=>{const{imageURL:t,accessories:n}=e,r=wy(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Sy(n)),o})}catch(e){throw new Error("Error serializing cart items")}};function by(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)Ey(t),Ay(t.accessories)}function Ay(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");Ey(t)}}}function Ey(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");Py(e.price),Ty(e.quantity)}function Iy(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===sn(e))throw new Error("id must be a valid UUID")}}function Py(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 Ty(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Oy(e){if(!Object.values(My).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Ry="v2",Fy={majorVersion:1,minorVersion:1};var ky,My;function xy(){if(Kr(ur,ln.content,ln.task),!Ly())throw mn;return bc(tr(Ry,"marketplace.getCart"),"marketplace.getCart",Fy).then(Cy)}function Ny(e){if(Kr(ur,ln.content,ln.task),!Ly())throw mn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return Iy(null==e?void 0:e.cartId),by(null==e?void 0:e.cartItems),bc(tr(Ry,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Sy(e.cartItems),cartVersion:Fy})).then(Cy)}function Uy(e){if(Kr(ur,ln.content,ln.task),!Ly())throw mn;if(!e)throw new Error("removeCartItemsParams must be provided");if(Iy(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 bc(tr(Ry,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Fy})).then(Cy)}function Dy(e){if(Kr(ur,ln.content,ln.task),!Ly())throw mn;if(!e)throw new Error("updateCartStatusParams must be provided");return Iy(null==e?void 0:e.cartId),Oy(null==e?void 0:e.cartStatus),bc(tr(Ry,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Fy})).then(Cy)}function Ly(){return!(!Kr(ur)||!ur.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(ky||(ky={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(My||(My={}));var Hy=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())})};class _y{constructor(e){this.event=e}serialize(){return{altKey:this.event.altKey,bubbles:this.event.bubbles,cancelBubble:this.event.cancelBubble,charCode:this.event.charCode,code:this.event.code,composed:this.event.composed,ctrlKey:this.event.ctrlKey,defaultPrevented:this.event.defaultPrevented,detail:this.event.detail,eventPhase:this.event.eventPhase,isComposing:this.event.isComposing,isTrusted:this.event.isTrusted,key:this.event.key,keyCode:this.event.keyCode,location:this.event.location,metaKey:this.event.metaKey,repeat:this.event.repeat,returnValue:this.event.returnValue,shiftKey:this.event.shiftKey,timeStamp:this.event.timeStamp,type:this.event.type,which:this.event.which}}}function Vy(e){return e.toLowerCase().split("+").sort().join("+")}function By(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function jy(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()}function Wy(e,t){if(jy(t)){const n=By(t);if(e.has(n))return{matchedShortcut:n,isOverridable:Jy.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function zy(e){Ky.clear(),e.shortcuts.forEach(e=>{Ky.add(Vy(e))}),Jy.clear(),e.overridableShortcuts.forEach(e=>{Jy.add(Vy(e))})}class qy extends Xi{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function $y(e){Rs(tr("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function Gy(e){if(e.target.closest(`[${nS}]`))return;const{matchedShortcut:t,isOverridable:n}=Wy(Ky,e);if(!t)return;if(n&&Qy){if(Qy(e,{matchedShortcut:t}))return}Pc("shortcutRelay.forwardShortcutEvent",[new _y(e)],tr("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const Jy=new Set,Ky=new Set;let Qy,Zy=!1;function Xy(e){if(!tS())throw mn;const t=Qy;return Qy=e,t}function Yy(){if(!tS())throw mn;Zy=!1,Ky.clear(),Jy.clear(),Qy=void 0,document.removeEventListener("keydown",Gy,{capture:!0})}function eS(){return Hy(this,void 0,void 0,function*(){if(!tS())throw mn;zy(yield Ic("shortcutRelay.getHostShortcuts",[],new qy,tr("v2","shortcutRelay.getHostShortcuts"))),Zy||document.addEventListener("keydown",Gy,{capture:!0}),Zy=!0,$y(e=>{zy(e)})})}function tS(){return!(!Kr(ur)||!ur.supports.shortcutRelay)}const nS="data-disable-shortcuts-forwarding"})(),r})());
2
2
  //# sourceMappingURL=MicrosoftTeams.min.js.map