@microsoft/teams-js 2.54.0 → 2.55.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.
- package/README.md +4 -4
- package/dist/esm/packages/teams-js/dts/private/conversations.d.ts +7 -0
- package/dist/esm/packages/teams-js/dts/private/copilot/sidePanel.d.ts +6 -1
- package/dist/esm/packages/teams-js/dts/private/copilot/sidePanelInterfaces.d.ts +6 -0
- package/dist/esm/packages/teams-js/dts/private/externalAppAuthentication.d.ts +12 -0
- package/dist/esm/packages/teams-js/dts/private/hostEntity/hostEntity.d.ts +11 -0
- package/dist/esm/packages/teams-js/dts/private/hostEntity/tab.d.ts +13 -1
- package/dist/esm/packages/teams-js/dts/private/otherAppStateChange.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/private/privateAPIs.d.ts +8 -0
- package/dist/esm/packages/teams-js/dts/private/store.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/private/teams/teams.d.ts +5 -0
- package/dist/esm/packages/teams-js/dts/private/videoEffectsEx.d.ts +5 -0
- package/dist/esm/packages/teams-js/dts/private/widgetHosting/widgetContext.d.ts +73 -2
- package/dist/esm/packages/teams-js/dts/private/widgetHosting/widgetHosting.d.ts +12 -1
- package/dist/esm/packages/teams-js/dts/public/app/app.d.ts +20 -0
- package/dist/esm/packages/teams-js/src/public/app/app.js +1 -1
- package/dist/esm/packages/teams-js/src/public/version.js +1 -1
- package/dist/umd/MicrosoftTeams.js +83 -4
- package/dist/umd/MicrosoftTeams.js.map +1 -1
- package/dist/umd/MicrosoftTeams.min.js +1 -1
- package/dist/umd/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -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:()=>Le,AppId:()=>uo,ChannelType:()=>mn,ChildAppWindow:()=>Wm,DialogDimension:()=>hn,EduType:()=>ze,EmailAddress:()=>th,ErrorCode:()=>_e,FileOpenPreference:()=>De,FrameContexts:()=>dn,HostClientType:()=>un,HostName:()=>ln,LiveShareHost:()=>wy,NotificationTypes:()=>su,ParentAppWindow:()=>zm,RenderingSurfaces:()=>fn,SecondaryM365ContentIdName:()=>He,TaskModuleDimension:()=>hn,TeamType:()=>pn,UUID:()=>Jn,UserAuthenticationState:()=>pl,UserSettingTypes:()=>uu,UserTeamRole:()=>gn,ValidatedSafeString:()=>co,ViewerActionTypes:()=>cu,activateChildProxyingCommunication:()=>Tr,app:()=>i,appEntity:()=>W,appInitialization:()=>Re,appInstallDialog:()=>te,appPerformanceMetrics:()=>ee,authentication:()=>Y,barCode:()=>re,calendar:()=>ge,call:()=>Oe,chat:()=>oe,clipboard:()=>ie,conversations:()=>S,copilot:()=>O,dialog:()=>f,enablePrintCapability:()=>FC,executeDeepLink:()=>$C,externalAppAuthentication:()=>R,externalAppAuthenticationForCEA:()=>F,externalAppCardActions:()=>k,externalAppCardActionsForCEA:()=>M,externalAppCardActionsForDA:()=>x,externalAppCommands:()=>N,files:()=>U,geoLocation:()=>ce,getAdaptiveCardSchemaVersion:()=>Bm,getContext:()=>MC,getCurrentFeatureFlagsState:()=>Fr,getMruTabInstances:()=>zC,getTabInstances:()=>WC,hostEntity:()=>Q,initialize:()=>RC,initializeWithFrameContext:()=>JC,liveShare:()=>xe,location:()=>le,logs:()=>b,mail:()=>me,marketplace:()=>Ne,media:()=>ne,meeting:()=>fe,meetingRoom:()=>D,menus:()=>p,messageChannels:()=>L,monetization:()=>pe,mouseRelay:()=>Ue,navigateBack:()=>YC,navigateCrossDomain:()=>XC,navigateToTab:()=>ZC,nestedAppAuth:()=>ae,nestedAppAuthBridge:()=>H,notifications:()=>_,openFilePreview:()=>mu,otherAppStateChange:()=>V,overwriteFeatureFlagsState:()=>Mr,pages:()=>y,people:()=>we,plugins:()=>B,print:()=>kC,profile:()=>Ce,registerAppButtonClickHandler:()=>UC,registerAppButtonHoverEnterHandler:()=>DC,registerAppButtonHoverLeaveHandler:()=>LC,registerBackButtonHandler:()=>HC,registerBeforeUnloadHandler:()=>VC,registerChangeSettingsHandler:()=>jC,registerCustomHandler:()=>gu,registerFocusEnterHandler:()=>BC,registerFullScreenHandler:()=>NC,registerOnLoadHandler:()=>_C,registerOnThemeChangeHandler:()=>xC,registerUserSettingsChangeHandler:()=>hu,remoteCamera:()=>j,returnFocus:()=>QC,search:()=>ye,secondaryBrowser:()=>ue,sendCustomEvent:()=>pu,sendCustomMessage:()=>fu,setFeatureFlagsState:()=>kr,setFrameContext:()=>GC,settings:()=>ke,shareDeepLink:()=>qC,sharing:()=>Se,shortcutRelay:()=>$e,sidePanelInterfaces:()=>I,stageView:()=>Ae,store:()=>Z,tasks:()=>Me,teams:()=>$,teamsCore:()=>ve,thirdPartyCloudStorage:()=>Fe,uploadCustomApp:()=>du,version:()=>Ir,videoEffects:()=>G,videoEffectsEx:()=>J,visualMedia:()=>Pe,webStorage:()=>Te,widgetHosting:()=>X});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>wo,getTelemetryPort:()=>mo,isSupported:()=>vo});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Io,getDataLayerPort:()=>Eo,isSupported:()=>Ao});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Po,registerOnResumeHandler:()=>To});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Mo,FailedReason:()=>ko,Messages:()=>Fo,_initialize:()=>Do,_uninitialize:()=>Lo,getContext:()=>Ho,getFrameContext:()=>No,initialize:()=>Uo,isInitialized:()=>xo,lifecycle:()=>o,notifyAppLoaded:()=>_o,notifyExpectedFailure:()=>jo,notifyFailure:()=>Bo,notifySuccess:()=>Vo,openLink:()=>$o,registerHostToAppPerformanceMetricsHandler:()=>qo,registerOnContextChangeHandler:()=>zo,registerOnThemeChangeHandler:()=>Wo});var a={};n.r(a),n.d(a,{isSupported:()=>Ko,resize:()=>Jo});var s={};n.r(s),n.d(s,{isSupported:()=>Zo,open:()=>Qo});var c={};n.r(c),n.d(c,{isSupported:()=>ti,registerOnMessageFromParent:()=>ei,sendMessageToDialog:()=>Yo,sendMessageToParentFromDialog:()=>Xo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>ai,getDialogInfoFromUrlDialogInfo:()=>ii,isSupported:()=>oi,open:()=>ni,parentCommunication:()=>c,submit:()=>ri});var l={};n.r(l),n.d(l,{isSupported:()=>wi,open:()=>vi});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>yi,open:()=>Ci});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>bi,isSupported:()=>Si,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>Ai,MenuItem:()=>Pi,MenuListType:()=>Ii,initialize:()=>Mi,isSupported:()=>_i,setNavBarMenu:()=>Ui,setUpViews:()=>xi,showActionMenu:()=>Li});var g={};n.r(g),n.d(g,{initialize:()=>Vi,isSupported:()=>Xi,registerChangeConfigHandler:()=>Ji,registerOnRemoveHandler:()=>qi,registerOnRemoveHandlerHelper:()=>$i,registerOnSaveHandler:()=>Wi,registerOnSaveHandlerHelper:()=>zi,setConfig:()=>ji,setValidityState:()=>Bi});var h={};n.r(h),n.d(h,{isSupported:()=>Fa,onClick:()=>Ta,onHoverEnter:()=>Oa,onHoverLeave:()=>Ra});var m={};n.r(m),n.d(m,{_initialize:()=>ka,isSupported:()=>Ua,navigateBack:()=>Ma,registerBackButtonHandler:()=>xa,registerBackButtonHandlerHelper:()=>Na});var v={};n.r(v),n.d(v,{isSupported:()=>Ha,navigateTo:()=>Da,navigateToDefaultPage:()=>La});var w={};n.r(w),n.d(w,{enterFullscreen:()=>_a,exitFullscreen:()=>Va,isSupported:()=>Ba});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>za,getTabInstances:()=>Wa,isSupported:()=>qa,navigateToTab:()=>ja});var y={};n.r(y),n.d(y,{EnterFocusType:()=>$a,ReturnFocusType:()=>Ga,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>Xa,initializeWithFrameContext:()=>Za,isSupported:()=>rs,navigateCrossDomain:()=>Ya,navigateToApp:()=>es,registerFocusEnterHandler:()=>Ka,registerFullScreenHandler:()=>ns,returnFocus:()=>Ja,setCurrentFrame:()=>Qa,shareDeepLink:()=>ts,tabs:()=>C});var b={};n.r(b),n.d(b,{isSupported:()=>au,registerGetLogHandler:()=>iu});var S={};n.r(S),n.d(S,{closeConversation:()=>Cu,getChatMembers:()=>yu,isSupported:()=>bu,openConversation:()=>wu});var E={};n.r(E),n.d(E,{isSupported:()=>Iu,sendCustomTelemetryData:()=>Pu});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>ku,isSupported:()=>Fu});var I={};n.r(I),n.d(I,{ContentItemType:()=>xu,CopilotMode:()=>Lu,MediaSelectionType:()=>Nu,SidePanelErrorCode:()=>Bu,SidePanelErrorImpl:()=>ju,TeamsContextType:()=>_u,TeamsDimensionName:()=>Du,TeamsSessionType:()=>Uu,TranscriptState:()=>Hu,UserConsent:()=>Vu});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>Qu,getContent:()=>Gu,isResponseAReportableError:()=>$u,isSupported:()=>qu,preCheckUserConsent:()=>Ju,registerUserActionContentSelect:()=>Ku});var T={};n.r(T),n.d(T,{closeSidePanel:()=>ol,isSupported:()=>rl});var O={};n.r(O),n.d(O,{customTelemetry:()=>E,eligibility:()=>A,sidePanel:()=>P,view:()=>T});var R={};n.r(R),n.d(R,{ActionExecuteInvokeRequestType:()=>ul,ActionExecuteResponseHandler:()=>gl,InvokeErrorCode:()=>fl,InvokeResponseType:()=>dl,OriginalRequestType:()=>ll,SerializableActionExecuteInvokeRequest:()=>sl,SerializableConnectorParameters:()=>Al,UserAuthenticationState:()=>pl,authenticateAndResendRequest:()=>Cl,authenticateWithConnector:()=>Il,authenticateWithOauth2:()=>Sl,authenticateWithPowerPlatformConnectorPlugins:()=>El,authenticateWithSSO:()=>yl,authenticateWithSSOAndResendRequest:()=>bl,disconnectConnector:()=>Ol,getUserAuthenticationStateForConnector:()=>Tl,isActionExecuteResponse:()=>cl,isInvokeError:()=>hl,isSupported:()=>Rl,validateActionExecuteInvokeRequest:()=>vl});var F={};n.r(F),n.d(F,{authenticateAndResendRequest:()=>Nl,authenticateWithOauth:()=>xl,authenticateWithSSO:()=>Ml,authenticateWithSSOAndResendRequest:()=>Ul,isSupported:()=>Dl,validateInput:()=>Ll});var k={};n.r(k),n.d(k,{ActionOpenUrlErrorCode:()=>Vl,ActionOpenUrlType:()=>_l,isSupported:()=>Wl,processActionOpenUrl:()=>jl,processActionSubmit:()=>Bl});var M={};n.r(M),n.d(M,{isSupported:()=>Jl,processActionOpenUrl:()=>$l,processActionSubmit:()=>Gl});var x={};n.r(x),n.d(x,{SerializableActionOpenUrlDialogInfo:()=>nd,isSupported:()=>ed,processActionOpenUrlDialog:()=>Yl});var N={};n.r(N),n.d(N,{isSupported:()=>ad,processActionCommand:()=>id});var U={};n.r(U),n.d(U,{CloudStorageProvider:()=>cd,CloudStorageProviderFileAction:()=>pd,CloudStorageProviderType:()=>ud,DocumentLibraryAccessType:()=>dd,FileDownloadStatus:()=>fd,SpecialDocumentLibraryType:()=>ld,addCloudStorageFolder:()=>hd,addCloudStorageProvider:()=>Ed,addCloudStorageProviderFile:()=>Id,copyMoveFiles:()=>yd,deleteCloudStorageFolder:()=>md,deleteCloudStorageProviderFile:()=>Td,downloadCloudStorageProviderFile:()=>Od,getCloudStorageFolderContents:()=>vd,getCloudStorageFolders:()=>gd,getExternalProviders:()=>Cd,getFileDownloads:()=>bd,openCloudStorageFile:()=>wd,openDownloadFolder:()=>Sd,registerCloudStorageProviderContentChangeHandler:()=>kd,registerCloudStorageProviderListChangeHandler:()=>Fd,removeCloudStorageProvider:()=>Ad,renameCloudStorageProviderFile:()=>Pd,uploadCloudStorageProviderFile:()=>Rd});var D={};n.r(D),n.d(D,{getPairedMeetingRoomInfo:()=>Nd,isSupported:()=>Hd,registerMeetingRoomCapabilitiesUpdateHandler:()=>Dd,registerMeetingRoomStatesUpdateHandler:()=>Ld,sendCommandToPairedMeetingRoom:()=>Ud});var L={};n.r(L),n.d(L,{dataLayer:()=>t,isSupported:()=>_d,telemetry:()=>e});var H={};n.r(H),n.d(H,{initialize:()=>zd,version:()=>Vd});var _={};n.r(_),n.d(_,{isSupported:()=>Yd,showNotification:()=>Xd});var V={};n.r(V),n.d(V,{isSupported:()=>of,notifyInstallCompleted:()=>rf,registerAppInstallationHandler:()=>tf,unregisterAppInstallationHandler:()=>nf});var B={};n.r(B),n.d(B,{isSupported:()=>cf,registerPluginMessage:()=>lf,sendPluginMessage:()=>uf});var j={};n.r(j),n.d(j,{ControlCommand:()=>hf,ErrorReason:()=>mf,SessionTerminatedReason:()=>vf,getCapableParticipants:()=>wf,isSupported:()=>Pf,registerOnCapableParticipantsChangeHandler:()=>Sf,registerOnDeviceStateChangeHandler:()=>Af,registerOnErrorHandler:()=>Ef,registerOnSessionStatusChangeHandler:()=>If,requestControl:()=>Cf,sendControlCommand:()=>yf,terminateSession:()=>bf});var W={};n.r(W),n.d(W,{isSupported:()=>Rf,selectAppEntity:()=>Of});var z={};n.r(z),n.d(z,{getUserJoinedTeams:()=>kf,isSupported:()=>Mf});var q={};n.r(q),n.d(q,{getConfigSetting:()=>Uf,isSupported:()=>Df,joinedTeams:()=>z});var $={};n.r($),n.d($,{ChannelType:()=>Hf,fullTrust:()=>q,getTeamChannels:()=>_f,isSupported:()=>Bf,refreshSiteUrl:()=>Vf});var G={};n.r(G),n.d(G,{EffectChangeType:()=>Zf,EffectFailureReason:()=>Xf,VideoFrameFormat:()=>Qf,isSupported:()=>op,notifySelectedVideoEffectChanged:()=>ep,registerForVideoEffect:()=>tp,registerForVideoFrame:()=>Yf});var J={};n.r(J),n.d(J,{ErrorLevel:()=>Op,frameProcessingTimeoutInMs:()=>Pp,isSupported:()=>Dp,notifyFatalError:()=>_p,notifySelectedVideoEffectChanged:()=>xp,registerForVideoEffect:()=>Np,registerForVideoFrame:()=>Rp,updatePersonalizedEffects:()=>Up});var K={};n.r(K),n.d(K,{addAndConfigure:()=>Gp,getAll:()=>Jp,isSupported:()=>Xp,reconfigure:()=>Kp,remove:()=>Zp,rename:()=>Qp});var Q={};n.r(Q),n.d(Q,{AppTypes:()=>tg,isSupported:()=>ng,tab:()=>K});var Z={};n.r(Z),n.d(Z,{isSupported:()=>fg,openAppDetail:()=>ug,openFullStore:()=>cg,openInContextStore:()=>lg,openSpecificStore:()=>dg});var X={};n.r(X),n.d(X,{callTool:()=>Cg,contentSizeChanged:()=>Ag,isSupported:()=>wg,notifyIntrinsicHeight:()=>Eg,openExternal:()=>Pg,registerModalCloseHandler:()=>Tg,requestDisplayMode:()=>bg,requestModal:()=>Sg,sendFollowUpMessage:()=>yg,setWidgetState:()=>Ig});var Y={};n.r(Y),n.d(Y,{DataResidency:()=>Zg,authenticate:()=>Wg,getAuthToken:()=>qg,getUser:()=>Gg,notifyFailure:()=>Qg,notifySuccess:()=>Kg,registerAuthenticationHandlers:()=>jg});var ee={};n.r(ee),n.d(ee,{isSupported:()=>Xg,registerHostMemoryMetricsHandler:()=>Yg});var te={};n.r(te),n.d(te,{isSupported:()=>Sh,openAppInstallDialog:()=>bh});var ne={};n.r(ne),n.d(ne,{CameraStartMode:()=>Th,File:()=>Mh,FileFormat:()=>Ih,ImageOutputFormats:()=>kh,ImageUriType:()=>Fh,Media:()=>Lh,MediaControllerEvent:()=>Ph,MediaType:()=>Rh,Source:()=>Oh,VideoController:()=>_h,captureImage:()=>xh,hasPermission:()=>Nh,requestPermission:()=>Uh,scanBarCode:()=>jh,selectMedia:()=>Vh,viewImages:()=>Bh});var re={};n.r(re),n.d(re,{hasPermission:()=>rm,isSupported:()=>im,requestPermission:()=>om,scanBarCode:()=>nm});var oe={};n.r(oe),n.d(oe,{isSupported:()=>lm,openChat:()=>sm,openGroupChat:()=>um});var ie={};n.r(ie),n.d(ie,{isSupported:()=>hm,read:()=>gm,write:()=>pm});var ae={};n.r(ae),n.d(ae,{addNAATrustedOrigins:()=>Tm,canParentManageNAATrustedOrigins:()=>Sm,deleteNAATrustedOrigins:()=>Om,getParentOrigin:()=>bm,isDeeplyNestedAuthSupported:()=>Em,isNAAChannelRecommended:()=>ym});var se={};n.r(se),n.d(se,{chooseLocation:()=>xm,isSupported:()=>Um,showLocation:()=>Nm});var ce={};n.r(ce),n.d(ce,{getCurrentLocation:()=>Lm,hasPermission:()=>Hm,isSupported:()=>Vm,map:()=>se,requestPermission:()=>_m});var ue={};n.r(ue),n.d(ue,{isSupported:()=>Gm,open:()=>$m});var le={};n.r(le),n.d(le,{getLocation:()=>Km,isSupported:()=>Zm,showLocation:()=>Qm});var de={};n.r(de),n.d(de,{setOptions:()=>Ym});var fe={};n.r(fe),n.d(fe,{CallType:()=>iv,EventActionSource:()=>sv,MeetingReactionType:()=>rv,MeetingType:()=>ov,SharingProtocol:()=>av,appShareButton:()=>de,getAppContentStageSharingCapabilities:()=>wv,getAppContentStageSharingState:()=>yv,getAuthenticationTokenForAnonymousUser:()=>fv,getIncomingClientAudioState:()=>cv,getLiveStreamState:()=>pv,getMeetingDetails:()=>lv,getMeetingDetailsVerbose:()=>dv,joinMeeting:()=>Av,registerLiveStreamChangedHandler:()=>mv,registerMeetingReactionReceivedHandler:()=>Ev,registerRaiseHandStateChangedHandler:()=>Sv,registerSpeakingStateChangeHandler:()=>bv,requestAppAudioHandling:()=>Iv,requestStartLiveStreaming:()=>gv,requestStopLiveStreaming:()=>hv,shareAppContentToStage:()=>vv,stopSharingAppContentToStage:()=>Cv,toggleIncomingClientAudio:()=>uv,updateMicState:()=>Ov});var pe={};n.r(pe),n.d(pe,{isSupported:()=>xv,openPurchaseExperience:()=>Mv});var ge={};n.r(ge),n.d(ge,{composeMeeting:()=>Dv,isSupported:()=>Lv,openCalendarItem:()=>Uv});var he={};n.r(he),n.d(he,{composeMailWithHandoff:()=>Bv,isSupported:()=>jv});var me={};n.r(me),n.d(me,{ComposeMailType:()=>Jv,composeMail:()=>$v,handoff:()=>he,isSupported:()=>Gv,openMailItem:()=>qv});var ve={};n.r(ve),n.d(ve,{enablePrintCapability:()=>Qv,isSupported:()=>nw,print:()=>Zv,registerBeforeUnloadHandler:()=>ew,registerBeforeUnloadHandlerHelper:()=>tw,registerOnLoadHandler:()=>Xv,registerOnLoadHandlerHelper:()=>Yv});var we={};n.r(we),n.d(we,{isSupported:()=>sw,selectPeople:()=>iw});var Ce={};n.r(Ce),n.d(Ce,{isSupported:()=>fw,showProfile:()=>dw});var ye={};n.r(ye),n.d(ye,{closeSearch:()=>yw,isSupported:()=>Cw,registerHandlers:()=>vw,unregisterHandlers:()=>ww});var be={};n.r(be),n.d(be,{getContent:()=>Ew,isSupported:()=>Aw});var Se={};n.r(Se),n.d(Se,{SharingAPIMessages:()=>Tw,history:()=>be,isSupported:()=>Nw,shareWebContent:()=>Ow});var Ee={};n.r(Ee),n.d(Ee,{close:()=>Dw,isSupported:()=>Lw});var Ae={};n.r(Ae),n.d(Ae,{StageViewOpenMode:()=>_w,isSupported:()=>Bw,open:()=>Vw,self:()=>Ee});var Ie={};n.r(Ie),n.d(Ie,{captureImages:()=>qw,isSupported:()=>Gw,retrieveImages:()=>$w});var Pe={};n.r(Pe),n.d(Pe,{CameraRestriction:()=>Xw,Source:()=>Yw,hasPermission:()=>eC,image:()=>Ie,requestPermission:()=>tC});var Te={};n.r(Te),n.d(Te,{isSupported:()=>cC,isWebStorageClearedOnUserLogOut:()=>aC});var Oe={};n.r(Oe),n.d(Oe,{CallModalities:()=>lC,isSupported:()=>fC,startCall:()=>dC});var Re={};n.r(Re),n.d(Re,{ExpectedFailureReason:()=>Mo,FailedReason:()=>ko,Messages:()=>Fo,notifyAppLoaded:()=>gC,notifyExpectedFailure:()=>vC,notifyFailure:()=>mC,notifySuccess:()=>hC});var Fe={};n.r(Fe),n.d(Fe,{getDragAndDropFiles:()=>IC,isSupported:()=>TC});var ke={};n.r(ke),n.d(ke,{getSettings:()=>ny,registerOnRemoveHandler:()=>iy,registerOnSaveHandler:()=>oy,setSettings:()=>ry,setValidityState:()=>ty});var Me={};n.r(Me),n.d(Me,{getDefaultSizeIfNotProvided:()=>py,startTask:()=>cy,submitTask:()=>ly,updateTask:()=>uy});var xe={};n.r(xe),n.d(xe,{ContainerState:()=>my,LiveShareHost:()=>wy,UserMeetingRole:()=>hy,isSupported:()=>vy});var Ne={};n.r(Ne),n.d(Ne,{CartStatus:()=>Ny,Intent:()=>xy,addOrUpdateCartItems:()=>Dy,cartVersion:()=>My,getCart:()=>Uy,isSupported:()=>_y,removeCartItems:()=>Ly,updateCartStatus:()=>Hy});var Ue={};n.r(Ue),n.d(Ue,{disableMouseRelayCapability:()=>Ky,enableMouseRelayCapability:()=>Jy,isSupported:()=>Qy});var De,Le,He,_e,Ve,Be,je,We,ze,qe,$e={};function Ge(e){return void 0!==(null==e?void 0:e.errorCode)}n.r($e),n.d($e,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>hb,enableShortcutRelayCapability:()=>pb,isSupported:()=>gb,resetIsShortcutRelayCapabilityEnabled:()=>fb,setOverridableShortcutHandler:()=>db}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(De||(De={})),function(e){e.M365Content="m365content"}(Le||(Le={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(He||(He={})),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"}(_e||(_e={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Ve||(Ve={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Be||(Be={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(je||(je={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(We||(We={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(ze||(ze={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(qe||(qe={}));const Je=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 Ke="2.0.1",Qe="2.0.2",Ze="2.0.3",Xe="2.0.4",Ye="2.0.1",et="1.9.0",tt="2.0.0",nt="1.7.0",rt="1.8.0",ot="1.9.0",it=n.t(Je,2).validOrigins,at=1500,st=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),ct="https",ut="teams.microsoft.com",lt="The library has not yet been initialized",dt="The runtime has not yet been initialized",ft="The runtime version is not supported",pt="The call was not properly started";var gt=n(933);const ht=vt,mt=2147483647;function vt(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 Ct(e)}return wt(e,t,n)}function wt(e,t,n){if("string"==typeof e)return Et(e,t);if(ArrayBuffer.isView(e))return Ft(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(It(e,ArrayBuffer)||e&&It(e.buffer,ArrayBuffer))return kt(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(It(e,SharedArrayBuffer)||e&&It(e.buffer,SharedArrayBuffer)))return kt(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 vt.from(r,t,n);const o=Xt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return vt.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 Ct(e){return yt(e),bt(e<0?0:0|St(e))}function yt(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 bt(e){if(e>mt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,vt.prototype),t}function St(e){if(e>=mt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+mt.toString(16)+" bytes");return 0|e}function Et(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!vt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|At(e,t);let r=bt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function At(e,t){if(vt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||It(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 Pt(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Tt(e).length;default:if(o)return r?-1:Pt(e).length;t=(""+t).toLowerCase(),o=!0}}function It(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Pt(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 Tt(e){return gt.toByteArray(Rt(e))}vt.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}}(),vt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),vt.from=function(e,t,n){return wt(e,t,n)},Object.setPrototypeOf(vt.prototype,Uint8Array.prototype),Object.setPrototypeOf(vt,Uint8Array),vt.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}},vt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==vt.prototype};const Ot=/[^+/0-9A-Za-z-_]/g;function Rt(e){if((e=(e=e.split("=")[0]).trim().replace(Ot,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Ft(e){if(It(e,Uint8Array)){const t=new Uint8Array(e);return kt(t.buffer,t.byteOffset,t.byteLength)}return Mt(e)}function kt(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,vt.prototype),r}function Mt(e){const t=e.length<0?0:0|St(e.length),n=bt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function xt(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 Nt(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 Lt(this,t,n);case"utf8":case"utf-8":return xt(this,t,n);case"ascii":return Ht(this,t,n);case"latin1":case"binary":return _t(this,t,n);case"base64":return Vt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}vt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?xt(this,0,e):Nt.apply(this,arguments)};const Ut=4096;function Dt(e){const t=e.length;if(t<=Ut)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ut));return n}function Lt(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=Zt[e[r]];return o}function Ht(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 _t(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 Vt(e,t,n){return 0===t&&n===e.length?gt.fromByteArray(e):gt.fromByteArray(e.slice(t,n))}function Bt(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 jt(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(Qt(r))return a;e[n+a]=r}return a}function Wt(e,t,n,r){return Kt(Pt(t,e.length-n),e,n,r)}function zt(e,t,n,r){return Kt(Gt(t),e,n,r)}function qt(e,t,n,r){return Kt(Tt(t),e,n,r)}function $t(e,t,n,r){return Kt(Jt(t,e.length-n),e,n,r)}function Gt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Jt(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 Kt(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 Qt(e){return e!=e}vt.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 jt(this,e,t,n);case"utf8":case"utf-8":return Wt(this,e,t,n);case"ascii":case"latin1":case"binary":return zt(this,e,t,n);case"base64":return qt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $t(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Zt=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Xt(e){if(vt.isBuffer(e)){const t=0|St(e.length),n=bt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Qt(e.length)?bt(0):Mt(e):"Buffer"===e.type&&Array.isArray(e.data)?Mt(e.data):void 0}const Yt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let en;const tn=new Uint8Array(16);function nn(){if(!en){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");en=crypto.getRandomValues.bind(crypto)}return en(tn)}const rn=[];for(let e=0;e<256;++e)rn.push((e+256).toString(16).slice(1));function on(e,t=0){return(rn[e[t+0]]+rn[e[t+1]]+rn[e[t+2]]+rn[e[t+3]]+"-"+rn[e[t+4]]+rn[e[t+5]]+"-"+rn[e[t+6]]+rn[e[t+7]]+"-"+rn[e[t+8]]+rn[e[t+9]]+"-"+rn[e[t+10]]+rn[e[t+11]]+rn[e[t+12]]+rn[e[t+13]]+rn[e[t+14]]+rn[e[t+15]]).toLowerCase()}const an=function(e,t,n){if(Yt.randomUUID&&!t&&!e)return Yt.randomUUID();const r=(e=e||{}).random??e.rng?.()??nn();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return on(r)},sn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;const cn=function(e){return"string"==typeof e&&sn.test(e)};var un,ln,dn,fn,pn,gn,hn,mn;!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"}(un||(un={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(ln||(ln={})),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"}(dn||(dn={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(fn||(fn={})),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"}(pn||(pn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(gn||(gn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(hn||(hn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(mn||(mn={}));const vn={errorCode:_e.NOT_SUPPORTED_ON_PLATFORM},wn={majorVersion:1,minorVersion:5},Cn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},yn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),bn=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 En(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 an()}function In(e){return Object.keys(e).forEach(t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&In(e[t])}),Object.freeze(e)}function Pn(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(void 0,e)}).catch(e=>{t&&t(e)}),r}function Tn(e,t,...n){const r=e(...n);return r.then(()=>{t&&t(null)}).catch(e=>{t&&t(e)}),r}function On(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(null,e)}).catch(e=>{t&&t(e,null)}),r}function Rn(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 Fn(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 kn(e){return!(En(`${e.majorVersion}.${e.minorVersion}`,`${wn.majorVersion}.${wn.minorVersion}`)>=0)}function Mn(e){return"https:"===e.protocol}function xn(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=ht.from(t,"base64").toString();n(new Blob([o],{type:e}))})}function Nn(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 Un(){if(Dn())throw new Error("window object undefined at SSR check");return window}function Dn(){return"undefined"==typeof window}function Ln(e,t){if(Vn(e)||!Bn(e)||!jn(e))throw t||new Error("id is not valid.")}function Hn(e,t){const n=e.toString().toLocaleLowerCase();if(Vn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Mn(e))throw t||new Error("Url should be a valid https url")}function _n(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Vn(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Bn(e){return e.length<256&&e.length>4}function jn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Wn(e){if(!e)throw new Error("id must not be empty");if(!1===cn(e))throw new Error("id must be a valid UUID")}const zn=!!performance&&"now"in performance;function qn(){return zn?performance.now()+performance.timeOrigin:void 0}function $n(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=>$n(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=>$n(e[n],t+1))}function Gn(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:We.NotAdult})})})}class Jn{constructor(e=An()){this.uuid=e,Wn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Kn(e){if(!(e instanceof Jn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Qn{}Qn.initializeCalled=!1,Qn.initializeCompleted=!1,Qn.additionalValidOrigins=[],Qn.initializePromise=void 0,Qn.isFramelessWindow=!1,Qn.frameContext=void 0,Qn.hostClientType=void 0,Qn.printCapabilityEnabled=!1,Qn.teamsJsInstanceId=(new Jn).toString();var Zn=n(815);const Xn=new Jn,Yn=Zn.debug.formatArgs;Zn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Xn.toString()}]`,Yn.call(this,e)};const er=(0,Zn.debug)("teamsJs");function tr(e){return er.extend(e)}function nr(e,t){return`${e}_${t}`}function rr(e){return/^v\d+_[\w.]+$/.test(e)}var or=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const ir=tr("runtime"),ar=4;function sr(e){return e.apiVersion===ar}const cr={apiVersion:-1,supports:{}};function ur(e){if(sr(e))return!0;throw-1===e.apiVersion?new Error(dt):new Error(ft)}let lr=cr;const dr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:Cn,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:{}}}},fr=[un.desktop,un.web,un.rigel,un.surfaceHub,un.teamsRoomsWindows,un.teamsRoomsAndroid,un.teamsPhones,un.teamsDisplays],pr=[un.android,un.ios,un.ipados,un.visionOS],gr=[...fr,...pr];function hr(e){let t=e;if(t.apiVersion<ar&&mr.forEach(e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))}),sr(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const mr=[{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=or(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})}}}],vr="2.1.2",wr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:fr}],"1.9.0":[{capability:{location:{}},hostClientTypes:gr}],"2.0.0":[{capability:{people:{}},hostClientTypes:gr},{capability:{sharing:{}},hostClientTypes:[un.desktop,un.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[un.android,un.desktop,un.ios,un.teamsRoomsAndroid,un.teamsPhones,un.teamsDisplays,un.web]},{capability:{webStorage:{}},hostClientTypes:[un.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[un.android,un.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[un.android,un.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[un.android,un.ios,un.ipados,un.visionOS]}],"2.1.2":[]},Cr=ir.extend("generateBackCompatRuntimeConfig");function yr(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]=yr(e[r]||{},t[r]));return n}function br(e,t,n){Cr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);Cr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach(t=>{En(e,t)>=0&&n[t].forEach(e=>{void 0!==Qn.hostClientType&&e.hostClientTypes.includes(Qn.hostClientType)&&(r=yr(r,e.capability))})});const o={apiVersion:ar,hostVersionsInfo:Cn,isLegacyTeams:!0,supports:r};return Cr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Sr=ir.extend("applyRuntimeConfig");function Er(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=hr(e);Sr("Applying runtime %o",t),lr=In(t)}function Ar(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Ir="2.54.0",Pr={childProxyingCommunication:!1};function Tr(){Pr.childProxyingCommunication=!0}function Or(){return Pr.childProxyingCommunication}let Rr={disableEnforceOriginMatchForChildResponses:!1};function Fr(){return Rr}function kr(e){Rr=e}function Mr(e){return kr(Object.assign(Object.assign({},Rr),e)),Fr()}var xr=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 Nr=e=>{const{uuid:t}=e,n=xr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Ur=e=>{const{uuidAsString:t}=e,n=xr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Jn(t):void 0})},Dr=e=>{const{uuidAsString:t}=e,n=xr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Jn(t):void 0})},Lr=e=>{const{uuid:t}=e,n=xr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Hr(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 _r=tr("flushMessageQueue");function Vr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Nr(o);_r("Flushing message %s from %s message queue via postMessage.",Hr(n),r),e.postMessage(n,t)}}}const Br=/^[A-Za-z][A-Za-z\d+.-]*:\/\//;function jr(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 Wr{constructor(e,t,n){this.protocol=e,this.host=t,this.logger=n}static canUse(e){return Br.test(e)}static create(e,t){const n=e.split("://");return new Wr(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||jr(this.host,e.host))}}function zr(e){return Wr.canUse(e)}function qr(e,t){if(Wr.canUse(e))return Wr.create(e,t);t("No URL verifier available for pattern: %s",e)}const $r=tr("internal"),Gr=$r.extend("ensureInitializeCalled"),Jr=$r.extend("ensureInitialized");function Kr(){if(!Qn.initializeCalled)throw Gr(lt),new Error(lt)}function Qr(e,...t){if(!Qn.initializeCompleted)throw Jr("%s. initializeCalled: %s",lt,Qn.initializeCalled.toString()),new Error(lt);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Qn.frameContext){e=!0;break}if(!e){const e=`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Qn.frameContext}".`;throw Jr(e),new Error(e)}}return ur(e)}function Zr(e=Ke){const t=En(Qn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Xr(){return Qn.hostClientType==un.android||Qn.hostClientType==un.ios||Qn.hostClientType==un.ipados||Qn.hostClientType==un.visionOS}function Yr(e=Ke){if(!Xr()){throw{errorCode:_e.NOT_SUPPORTED_ON_PLATFORM}}if(!Zr(e)){throw{errorCode:_e.OLD_PLATFORM}}}function eo(e){let t=Qn.additionalValidOrigins.concat(e.filter(e=>"string"==typeof e&&zr(e)));const n={};t=t.filter(e=>!n[e]&&(n[e]=!0,!0)),Qn.additionalValidOrigins=t}function to(e){if(!io(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${ro}-${oo}).`)}function no(e){if(Vn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(ao(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const ro=4,oo=256;function io(e){return e.length<oo&&e.length>ro}function ao(e){return[...e].some(e=>{const t=e.charCodeAt(0);return t<32||t>126})}function so(e){if(!(e instanceof uo))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class co{constructor(e){this.idAsString=e,no(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class uo extends co{constructor(e){super(e),to(e)}toJSON(){return{appIdAsString:this.toString()}}}function lo(e){return null==e}var fo=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 po;const go="v1",ho=tr("messageChannels.telemetry");function mo(){return fo(this,void 0,void 0,function*(){if(po)return ho("Returning telemetry port from cache"),po;if(!vo())throw vn;return po=yield Oc(nr(go,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),po})}function vo(){var e;return!(!Qr(lr)||!(null===(e=lr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function wo(){po=void 0}var Co=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 yo;const bo="v1",So=tr("messageChannels.dataLayer");function Eo(){return Co(this,void 0,void 0,function*(){if(yo)return So("Returning dataLayer port from cache"),yo;if(!Ao())throw vn;return yo=yield Oc(nr(bo,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),yo})}function Ao(){var e;return!(!Qr(lr)||!(null===(e=lr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Io(){yo=void 0}function Po(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Qr(lr),qs(e)}function To(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Qr(lr),$s(e)}const Oo="v2",Ro=tr("app"),Fo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var ko,Mo;function xo(){return Qn.initializeCompleted}function No(){return Qn.frameContext}function Uo(e){return oa(nr(Oo,"app.initialize"),e)}function Do(e){mc.currentWindow=e}function Lo(){Qn.initializeCalled&&(Ts(),Qn.initializeCalled=!1,Qn.initializeCompleted=!1,Qn.initializePromise=void 0,Qn.additionalValidOrigins=[],Qn.frameContext=void 0,Qn.hostClientType=void 0,Qn.isFramelessWindow=!1,wo(),Io(),Cc())}function Ho(){return new Promise(e=>{Kr(),e(yc(nr(Oo,"app.getContext"),"getContext"))}).then(e=>Go(e))}function _o(){Kr(),ia(nr(Oo,"app.notifyAppLoaded"))}function Vo(){return ca(nr(Oo,"app.notifySuccess"))}function Bo(e){Kr(),sa(nr(Oo,"app.notifyFailure"),e)}function jo(e){Kr(),aa(nr(Oo,"app.notifyExpectedFailure"),e)}function Wo(e){pa(nr(Oo,"app.registerOnThemeChangeHandler"),e)}function zo(e){ga(nr(Oo,"app.registerOnContextChangeHandler"),e)}function qo(e){Hs(e)}function $o(e){return ha(nr(Oo,"app.openLink"),e)}function Go(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:ln.teams,clientType:e.hostClientType?e.hostClientType:un.web,features:e.hostFeatures,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId,ancestors:e.hostAncestors},appLaunchId:e.appLaunchId,appId:e.appId?new uo(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Qn.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 Jo(e){ui(nr(si,"dialog.update.resize"),e)}function Ko(){return!(!Qr(lr)||!lr.supports.dialog)&&!!lr.supports.dialog.update}function Qo(e,t,n){di(nr(si,"dialog.url.bot.open"),e,t,n)}function Zo(){return Qr(lr)&&void 0!==(lr.supports.dialog&&lr.supports.dialog.url&&lr.supports.dialog.url.bot)}function Xo(e){if(Qr(lr,dn.task),!ti())throw vn;kc(nr(si,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Yo(e){if(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),!ti())throw vn;kc(nr(si,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function ei(e){if(Qr(lr,dn.task),!ti())throw vn;for(ks("messageForChild"),Fs(nr(si,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),hi.reverse();hi.length>0;){e(hi.pop())}}function ti(){var e,t;return Qr(lr)&&!!(null===(t=null===(e=lr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function ni(e,t,n){li(nr(si,"dialog.url.open"),e,t,n)}function ri(e,t){fi(nr(si,"dialog.url.submit"),e,t)}function oi(){return Qr(lr)&&void 0!==(lr.supports.dialog&&lr.supports.dialog.url)}function ii(e){return{url:e.url,height:e.size?e.size.height:hn.Small,width:e.size?e.size.width:hn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function ai(e){const t=ii(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(ko||(ko={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Mo||(Mo={})),Ro("teamsjs instance is version %s, starting at %s UTC (%s local)",Ir,(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?Ro("teamsjs is being used from %s. %s",t,n):Ro("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const si="v2",ci="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 ui(e,t){if(Qr(lr,dn.content,dn.sidePanel,dn.task,dn.meetingStage),!Ko())throw vn;kc(e,"tasks.updateTask",[t])}function li(e,t,n,r){if(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),!oi())throw vn;r&&Fs(nr(si,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);kc(e,"tasks.startTask",[ii(t)],(e,t)=>{null==n||n({err:e,result:t}),ks("messageForParent")})}function di(e,t,n,r){if(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),!Zo())throw vn;r&&Fs(nr(si,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);kc(e,"tasks.startTask",[ai(t)],(e,t)=>{null==n||n({err:e,result:t}),ks("messageForParent")})}function fi(e,t,n){if(Qr(lr,dn.content,dn.task),!oi())throw vn;Qn.frameContext===dn.content&&console.warn(ci),kc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function pi(e){return{card:e.card,height:e.size?e.size.height:hn.Small,width:e.size?e.size.width:hn.Small,title:e.title}}function gi(e){const t=pi(e);return t.completionBotId=e.completionBotId,t}const hi=[];function mi(e){Qn.frameContext&&(Qn.frameContext===dn.task?hi.push(e):ks("messageForChild"))}function vi(e,t){if(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),!wi())throw vn;const n=gi(e);kc(nr(si,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function wi(){const e=lr.hostVersionsInfo&&lr.hostVersionsInfo.adaptiveCardSchemaVersion&&!kn(lr.hostVersionsInfo.adaptiveCardSchemaVersion);return Qr(lr)&&void 0!==(e&&lr.supports.dialog&&lr.supports.dialog.card&&lr.supports.dialog.card.bot)}function Ci(e,t){if(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),!yi())throw vn;const n=pi(e);kc(nr(si,"dialog.adaptiveCard.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function yi(){const e=lr.hostVersionsInfo&&lr.hostVersionsInfo.adaptiveCardSchemaVersion&&!kn(lr.hostVersionsInfo.adaptiveCardSchemaVersion);return Qr(lr)&&void 0!==(e&&lr.supports.dialog&&lr.supports.dialog.card)}function bi(){Fs(nr(si,"dialog.registerMessageForChildHandler"),"messageForChild",mi,!1)}function Si(){return!(!Qr(lr)||!lr.supports.dialog)}const Ei="v2";var Ai,Ii;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(Ai||(Ai={}));class Pi{constructor(){this.enabled=!0,this.selected=!1}}let Ti,Oi,Ri,Fi,ki;function Mi(){Fs(nr(Ei,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Di,!1),Fs(nr(Ei,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Hi,!1),Fs(nr(Ei,"menus.registerSetModuleViewHandler"),"setModuleView",Ni,!1)}function xi(e,t){if(Qr(lr),!_i())throw vn;Ri=t,kc(nr(Ei,"menus.setUpViews"),"setUpViews",[e])}function Ni(e){Ri&&Ri(e)||(Qr(lr),kc(nr(Ei,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Ui(e,t){if(Qr(lr),!_i())throw vn;Ti=t,kc(nr(Ei,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Di(e){Ti&&Ti(e)||(Qr(lr),kc(nr(Ei,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Li(e,t){if(Qr(lr),!_i())throw vn;Oi=t,kc(nr(Ei,"menus.showActionMenu"),"showActionMenu",[e])}function Hi(e){Oi&&Oi(e)||(Qr(lr),kc(nr(Ei,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function _i(){return!(!Qr(lr)||!lr.supports.menus)}function Vi(){Fs(nr(os,"pages.config.registerSettingsSaveHandler"),"settings.save",Gi,!1),Fs(nr(os,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Qi,!1)}function Bi(e){return ps(nr(os,"pages.config.setValidityState"),e)}function ji(e){return hs(nr(os,"pages.config.setConfig"),e)}function Wi(e){zi(nr(os,"pages.config.registerOnSaveHandler"),e,()=>{if(!lo(e)&&!Xi())throw vn})}function zi(e,t,n){!lo(t)&&Qr(lr,dn.settings),n&&n(),Fi=t,!lo(t)&&kc(e,"registerHandler",["save"])}function qi(e){$i(nr(os,"pages.config.registerOnRemoveHandler"),e,()=>{if(!lo(e)&&!Xi())throw vn})}function $i(e,t,n){!lo(t)&&Qr(lr,dn.remove,dn.settings),n&&n(),ki=t,!lo(t)&&kc(e,"registerHandler",["remove"])}function Gi(e){const t=new Ki(e);Fi?Fi(t):Zs()?oc("settings.save",[e]):t.notifySuccess()}function Ji(e){xs(nr(os,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[dn.content],()=>{if(!Xi())throw vn})}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(Ii||(Ii={}));class Ki{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),kc(nr(os,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),kc(nr(os,"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 Qi(){const e=new Zi;ki?ki(e):Zs()?oc("settings.remove",[]):e.notifySuccess()}class Zi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),kc(nr(os,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),kc(nr(os,"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 Xi(){return!(!Qr(lr)||!lr.supports.pages)&&!!lr.supports.pages.config}class Yi{}class ea extends Yi{validate(e){return!0}deserialize(e){return e}}var ta=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 na=6e4,ra=tr("app");function oa(e,t){if(Dn()){return ra.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Rn(()=>fa(e,t),na,new Error("SDK initialization timed out."))}function ia(e){kc(e,Fo.AppLoaded,[Ir])}function aa(e,t){kc(e,Fo.ExpectedFailure,[t.reason,t.message])}function sa(e,t){kc(e,Fo.Failure,[t.reason,t.message,t.authHeader])}function ca(e){return ta(this,void 0,void 0,function*(){if(Qn.initializeCompleted)return la(e);if(!Qn.initializePromise)throw new Error(lt);return Qn.initializePromise.then(()=>la(e))})}function ua(){var e;return Qr(lr)&&!!(null===(e=lr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function la(e){return ta(this,void 0,void 0,function*(){return ua()?Pc(Fo.Success,[Ir],new ea,e).then(()=>({hasFinishedSuccessfully:!0})):(kc(e,Fo.Success,[Ir]),{hasFinishedSuccessfully:"unknown"})})}const da=ra.extend("initializeHelper");function fa(e,t){return new Promise(n=>{Qn.initializeCalled||(Qn.initializeCalled=!0,Ps(),Qn.initializePromise=wc(t,e).then(({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Ke})=>{Qn.frameContext=e,Qn.hostClientType=t,Qn.clientSupportedSDKVersion=r;try{da("Parsing %s",n);let e=JSON.parse(n);if(da("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=Gn(e),n&&Er(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{da("Attempting to parse %s as an SDK version",n),isNaN(En(n,Ke))||(Qn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(da("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=Gn(e),Er(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Er(br(Qn.clientSupportedSDKVersion,dr,wr))}}Qn.initializeCompleted=!0}),Mi(),Vi(),bi()),Array.isArray(t)&&eo(t),void 0!==Qn.initializePromise?n(Qn.initializePromise):da("GlobalVars.initializePromise is unexpectedly undefined")})}function pa(e,t){!lo(t)&&Kr(),Ns(e,t)}function ga(e,t){!lo(t)&&Kr(),Us(e,t)}function ha(e,t){return new Promise(n=>{Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.task,dn.stage,dn.meetingStage),n(bc(e,"executeDeepLink",t))})}var ma=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 va=[];const wa=tr("validateOrigin");let Ca;function ya(){return ma(this,void 0,void 0,function*(){Ca||(yield Sa())})}function ba(){return 0===va.length}function Sa(e=!1){return ma(this,void 0,void 0,function*(){if(!ba()&&!e)return va;if(Ca)return Ca;if(Dn())return va=it,it;{wa("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout(()=>e.abort(),at);return Ca=fetch(st,{signal:e.signal}).then(e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return wa("Fetch call completed and retrieved valid origins list from CDN"),e.json().then(e=>{if(Ea(JSON.stringify(e)))return va=e.validOrigins,va;throw new Error("Valid origins list retrieved from CDN is invalid")})}).catch(e=>("AbortError"===e.name?wa(`validOrigins fetch call to CDN failed due to Timeout of ${at} ms. Defaulting to fallback list`):wa("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),va=it,va)),Ca}})}function Ea(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 wa("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function Aa(e,t){let n;try{const t=qr(e,wa);if(!t)return!1;n=t}catch(e){return!1}return n.test(t)}function Ia(e,t){const n=t||ba()?it:va;return Pa(e,n)?Promise.resolve(!0):(wa("Origin %s is not in the local valid origins list, fetching from CDN",e),Sa(t).then(t=>Pa(e,t)))}function Pa(e,t){for(const t of Qn.additionalValidOrigins)if(Aa(t,e))return!0;const n=e.host;return Mn(e)?!!t.some(e=>jr(e,n))||(wa("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,Qn.additionalValidOrigins),!1):(wa("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1)}function Ta(e){xs(nr(os,"pages.appButton.onClick"),"appButtonClick",e,[dn.content],()=>{if(!Fa())throw vn})}function Oa(e){xs(nr(os,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[dn.content],()=>{if(!Fa())throw vn})}function Ra(e){xs(nr(os,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[dn.content],()=>{if(!Fa())throw vn})}function Fa(){return!(!Qr(lr)||!lr.supports.pages)&&!!lr.supports.pages.appButton}function ka(){bs()}function Ma(){return as(nr(os,"pages.backStack.navigateBack"))}function xa(e){Na(nr(os,"pages.backStack.registerBackButtonHandler"),e,()=>{if(!lo(e)&&!Ua())throw vn})}function Na(e,t,n){!lo(t)&&Qr(lr),n&&n(),ys(t),!lo(t)&&kc(e,"registerHandler",["backButton"])}function Ua(){return!(!Qr(lr)||!lr.supports.pages)&&!!lr.supports.pages.backStack}function Da(e){return new Promise(t=>{if(Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.task,dn.stage,dn.meetingStage),!Ha())throw vn;t(Ec(nr(os,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))})}function La(){return new Promise(e=>{if(Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.task,dn.stage,dn.meetingStage),!Ha())throw vn;e(Ec(nr(os,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))})}function Ha(){return!(!Qr(lr)||!lr.supports.pages)&&!!lr.supports.pages.currentApp}function _a(){if(Qr(lr,dn.content),!Ba())throw vn;kc(nr(os,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Va(){if(Qr(lr,dn.content),!Ba())throw vn;kc(nr(os,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Ba(){return!(!Qr(lr)||!lr.supports.pages)&&!!lr.supports.pages.fullTrust}function ja(e){return ss(nr(os,"pages.tabs.navigateToTab"),e)}function Wa(e){return us(nr(os,"pages.tabs.getTabInstances"),e)}function za(e){return ls(nr(os,"pages.tabs.getMruTabInstances"),e)}function qa(){return!(!Qr(lr)||!lr.supports.pages)&&!!lr.supports.pages.tabs}var $a,Ga;function Ja(e){const t=nr(os,"pages.returnFocus");if(Qr(lr),!rs())throw vn;if(void 0===e&&kc(t,"returnFocus",[!1]),"boolean"==typeof e)kc(t,"returnFocus",[e]);else switch(e){case Ga.PreviousLandmark:case Ga.GoToActivityFeed:kc(t,"returnFocus",[!1,e]);break;case Ga.NextLandmark:kc(t,"returnFocus",[!0,e])}}function Ka(e){xs(nr(os,"pages.registerFocusEnterHandler"),"focusEnter",e,[],()=>{if(!rs())throw vn})}function Qa(e){fs(nr(os,"pages.setCurrentFrame"),e)}function Za(e,t,n){ya(),oa(nr(os,"pages.initializeWithFrameContext"),n).then(()=>t&&t()),Qa(e)}function Xa(){return gs(nr(os,"pages.getConfig."))}function Ya(e){return is(nr(os,"pages.navigateCrossDomain"),e)}function es(e){return new Promise(t=>{if(Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.task,dn.stage,dn.meetingStage),!rs())throw vn;const n=nr(os,"pages.navigateToApp");if(lr.isLegacyTeams){t(bc(n,"executeDeepLink",Fn(ms(e)?e:vs(e))))}else{t(bc(n,"pages.navigateToApp",ms(e)?ws(e):e))}})}function ts(e){return ds(nr(os,"pages.shareDeepLink"),e)}function ns(e){xs(nr(os,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],()=>{if(!lo(e)&&!rs())throw vn})}function rs(){return!(!Qr(lr)||!lr.supports.pages)}ya(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}($a||($a={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Ga||(Ga={}));const os="v2";function is(e,t){return new Promise(n=>{if(Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.remove,dn.task,dn.stage,dn.meetingStage),!rs())throw vn;n(Sc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))})}function as(e){return new Promise(t=>{if(Qr(lr),!Ua())throw vn;t(Sc(e,"navigateBack","Back navigation is not supported in the current client or context."))})}function ss(e,t){return new Promise(n=>{if(Qr(lr),!qa())throw vn;n(Sc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))})}function cs(e,t){if(Qr(lr),!rs())throw vn;kc(e,"returnFocus",[t])}function us(e,t){return new Promise(n=>{if(Qr(lr),!qa())throw vn;n(yc(e,"getTabInstances",t))})}function ls(e,t){return new Promise(n=>{if(Qr(lr),!qa())throw vn;n(yc(e,"getMruTabInstances",t))})}function ds(e,t){if(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),!rs())throw vn;kc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function fs(e,t){if(Qr(lr,dn.content),!rs())throw vn;kc(e,"setFrameContext",[t])}function ps(e,t){if(Qr(lr,dn.settings,dn.remove),!Xi())throw vn;kc(e,"settings.setValidityState",[t])}function gs(e){return new Promise(t=>{if(Qr(lr,dn.content,dn.settings,dn.remove,dn.sidePanel),!rs())throw vn;t(yc(e,"settings.getSettings"))})}function hs(e,t){return new Promise(n=>{if(Qr(lr,dn.content,dn.settings,dn.sidePanel),!Xi())throw vn;n(bc(e,"settings.setSettings",t))})}function ms(e){return e.appId instanceof uo}function vs(e){return Object.assign(Object.assign({},e),{appId:new uo(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function ws(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let Cs;function ys(e){Cs=e}function bs(){Fs(nr(os,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Ss,!1)}function Ss(){Cs&&Cs()||(Zs()?oc("backButtonPress",[]):Ma())}var Es=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const As=tr("handlers");class Is{static initializeHandlers(){Is.handlers.themeChange=Ds,Is.handlers.contextChange=Ls,Is.handlers.load=Bs,Is.handlers.beforeUnload=zs,bs()}static uninitializeHandlers(){Is.handlers={},Is.themeChangeHandler=null,Is.beforeUnloadHandler=null,Is.beforeSuspendOrTerminateHandler=null,Is.resumeHandler=null,Is.contextChangeHandler=null}}function Ps(){Is.initializeHandlers()}function Ts(){Is.uninitializeHandlers()}Is.handlers={},Is.themeChangeHandler=null,Is.loadHandler=null,Is.beforeUnloadHandler=null,Is.beforeSuspendOrTerminateHandler=null,Is.resumeHandler=null,Is.hostToAppPerformanceMetricsHandler=null,Is.contextChangeHandler=null;const Os=As.extend("callHandler");function Rs(e,t){const n=Is.handlers[e];if(n){Os("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Zs()?(oc(e,t),[!1,void 0]):(Os("Handler for action message %s not found.",e),[!1,void 0])}function Fs(e,t,n,r=!0,o=[]){n?(Is.handlers[t]=n,r&&kc(e,"registerHandler",[t,...o])):delete Is.handlers[t]}function ks(e){delete Is.handlers[e]}function Ms(e){return null!=Is.handlers[e]}function xs(e,t,n,r,o){n&&Qr(lr,...r),o&&o(),Fs(e,t,n)}function Ns(e,t){Is.themeChangeHandler=t,!lo(t)&&kc(e,"registerHandler",["themeChange"])}function Us(e,t){Is.contextChangeHandler=t,!lo(t)&&kc(e,"registerHandler",["contextChange"])}function Ds(e){Is.themeChangeHandler&&Is.themeChangeHandler(e),Zs()&&oc("themeChange",[e])}function Ls(e){Is.contextChangeHandler&&Is.contextChangeHandler(e),Zs()&&oc("contextChange",[e])}function Hs(e){Is.hostToAppPerformanceMetricsHandler=e}function _s(e){Is.hostToAppPerformanceMetricsHandler&&Is.hostToAppPerformanceMetricsHandler(e)}function Vs(e,t){Is.loadHandler=t,!lo(t)&&kc(e,"registerHandler",["load"])}function Bs(e){const t=js(e);Is.resumeHandler?(Is.resumeHandler(t),Zs()&&oc("load",[t])):Is.loadHandler&&(Is.loadHandler(e),Zs()&&oc("load",[e]))}function js(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Ws(e,t){Is.beforeUnloadHandler=t,!lo(t)&&kc(e,"registerHandler",["beforeUnload"])}function zs(){return Es(this,void 0,void 0,function*(){const e=()=>{kc(nr("v2","handleBeforeUnload"),"readyToUnload",[])};Is.beforeSuspendOrTerminateHandler?(yield Is.beforeSuspendOrTerminateHandler(),Zs()?oc("beforeUnload"):e()):Is.beforeUnloadHandler&&Is.beforeUnloadHandler(e)||(Zs()?oc("beforeUnload"):e())})}function qs(e){Is.beforeSuspendOrTerminateHandler=e,!lo(e)&&kc(nr("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function $s(e){Is.resumeHandler=e,!lo(e)&&kc(nr("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Gs=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 Js=tr("childProxyingCommunication");class Ks{}function Qs(){Ks.window=null,Ks.origin=null,Ks.messageQueue=[]}function Zs(){return!!Or()&&!!Ks.window}function Xs(e,t){return!!Or()&&(Ks.window&&!Ks.window.closed&&e!==Ks.window||(Ks.window=e,Ks.origin=t),Ks.window&&Ks.window.closed?(Ks.window=null,Ks.origin=null,!1):Ks.window===e)}function Ys(e,t,n,r){return Gs(this,void 0,void 0,function*(){Ks.window===t&&(Vr(Ks.window,Ks.origin,Ks.messageQueue,"child"),tc(e,n,r))})}Ks.messageQueue=[];const ec=Js.extend("handleIncomingMessageFromChild");function tc(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Ur(e.data),[o,i]=Rs(r.func,r.args);if(o&&void 0!==i)return ec("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Hr(r),r.func),void rc(r.id,r.uuid,Array.isArray(i)?i:[i]);ec("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Hr(r),r.func),nc(r,t,n)}function nc(e,t,n){const r=t(nr("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Ks.origin;n(r.uuid,(...t)=>{if(!Ks.window)return;if(!Fr().disableEnforceOriginMatchForChildResponses&&o!==Ks.origin)return void ec("Origin of child window has changed, not sending response back to child window");const n=t.pop();ec("Message from parent being relayed to child, id: %s",Hr(e)),rc(e.id,e.uuid,t,n)})}function rc(e,t,n,r){const o=Ks.window,i=ic(e,t,n,r),a=Lr(i),s=Ks.origin;o&&s&&(ec("Sending message %s to %s via postMessage, args = %o",Hr(a),"child",a.args),o.postMessage(a,s))}function oc(e,t){const n=Ks.window,r=ac(e,t),o=Ks.origin;n&&o?n.postMessage(r,o):Ks.messageQueue.push(r)}function ic(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function ac(e,t){return{func:e,args:t||[]}}class sc{static storeCallbackInformation(e,t){sc.callbackInformation.set(e,t)}static clearMessages(){sc.callbackInformation.clear()}static deleteMessageInformation(e){sc.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?_s({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=sc.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(_s({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),sc.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}sc.callbackInformation=new Map;const cc=tr("nestedAppAuthUtils"),uc=cc.extend("tryPolyfillWithNestedAppAuthBridge"),lc="v2";function dc(e,t,n){var r;const o=uc;if(Qn.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=pc(a,n);s&&(a.nestedAppAuthBridge=s)}const fc=cc.extend("createNestedAppAuthBridge");function pc(e,t){const n=fc;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=nr(lc,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var gc=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const hc=tr("communication");class mc{}class vc{}function wc(e,t){if(vc.messageListener=e=>_c(e),mc.currentWindow=mc.currentWindow||Un(),mc.parentWindow=mc.currentWindow.parent!==mc.currentWindow.self?mc.currentWindow.parent:mc.currentWindow.opener,mc.topWindow=mc.currentWindow.top,(mc.parentWindow||e)&&mc.currentWindow.addEventListener("message",vc.messageListener,!1),!mc.parentWindow){const e=mc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Qn.isFramelessWindow=!0,e.onNativeMessage=Kc}try{return mc.parentOrigin="*",Ac(t,"initialize",[Ir,ar,e]).then(([e,t,n,r])=>(dc(r,mc.currentWindow,{onMessage:Bc,sendPostMessage:xc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r}))}finally{mc.parentOrigin=null}}function Cc(){mc.currentWindow&&mc.currentWindow.removeEventListener("message",vc.messageListener,!1),mc.currentWindow=null,mc.parentWindow=null,mc.parentOrigin=null,vc.parentMessageQueue=[],vc.nextMessageId=0,vc.callbacks.clear(),vc.promiseCallbacks.clear(),vc.portCallbacks.clear(),vc.legacyMessageIdsToUuidMap={},sc.clearMessages(),Qs()}function yc(e,t,...n){return Ac(e,t,n).then(([e])=>e)}function bc(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 Ec(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(!rr(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(Fc(Lc(e,t,n).uuid))})}function Ic(e){return e.map(e=>Ar(e)?e.serialize():e)}function Pc(e,t,n,r,o){var i;return gc(this,void 0,void 0,function*(){const a=Ic(t),[s]=yield Ac(r,e,a);if(o&&o(s)||!o&&Ge(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(`${_e.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)})}function Tc(e,t,n,r){var o;return gc(this,void 0,void 0,function*(){const i=Ic(t),[a]=yield Ac(n,e,i);if(r&&r(a)||!r&&Ge(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${_e.INTERNAL_ERROR}, message: Invalid response from host`)})}function Oc(e,t,n=void 0){if(!rr(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 Rc(Lc(e,t,n).uuid)}function Rc(e){return new Promise((t,n)=>{vc.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 Fc(e){return new Promise(t=>{vc.promiseCallbacks.set(e,t)})}function kc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!rr(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=Lc(e,t,o);r&&vc.callbacks.set(i.uuid,r)}vc.parentMessageQueue=[],vc.topMessageQueue=[],vc.nextMessageId=0,vc.callbacks=new Map,vc.promiseCallbacks=new Map,vc.portCallbacks=new Map,vc.legacyMessageIdsToUuidMap={};const Mc=hc.extend("sendNestedAuthRequestToTopWindow");function xc(e,t){const n=Mc,r=mc.topWindow,o=ru(e,t);return n("Message %s information: %o",Hr(o),{actionName:o.func}),Uc(r,o)}const Nc=hc.extend("sendRequestToTargetWindowHelper");function Uc(e,t){const n=Nc,r=eu(e),o=Nr(t);if(Qn.isFramelessWindow)mc.currentWindow&&mc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Hr(o),r),mc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Yc(e);e&&i?(n("Sending message %s to %s via postMessage",Hr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Hr(o),r),Xc(e).push(t))}return t}const Dc=hc.extend("sendMessageToParentHelper");function Lc(e,t,n,r,o){const i=Dc,a=mc.parentWindow,s=nu(e,t,n,r,o);return sc.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Hr(s),{actionName:t,args:n}),Uc(a,s)}const Hc=hc.extend("processIncomingMessage");function _c(e){return gc(this,void 0,void 0,function*(){if(!e||!e.data||"object"!=typeof e.data)return void Hc("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 Wc(t,n).then(r=>{r?(zc(t,n),t!==mc.parentWindow?Xs(t,n)&&Ys(e,t,Lc,(e,t)=>vc.callbacks.set(e,t)):Kc(e)):Hc("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 Vc=hc.extend("processAuthBridgeMessage");function Bc(e,t){var n,r;const o=Vc;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?Wc(c,u).then(e=>{e?(mc.topWindow&&!mc.topWindow.closed&&c!==mc.topWindow||(mc.topWindow=c,mc.topOrigin=u),mc.topWindow&&mc.topWindow.closed&&(mc.topWindow=null,mc.topOrigin=null),Vr(mc.topWindow,mc.topOrigin,vc.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")}).catch(e=>{o("Unexpected error verifying message origin: %o",e)}):o("Message being ignored by app because it is coming for a target that is null")}const jc=hc.extend("verifyIncomingMessageOrigin");function Wc(e,t){return gc(this,void 0,void 0,function*(){if(mc.currentWindow&&e===mc.currentWindow)return jc("Should not process message because it is coming from the current window"),!1;if(mc.currentWindow&&mc.currentWindow.location&&t&&t===mc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return jc("Message has an invalid origin of %s",t),!1}const n=yield Ia(e);return n||jc("Message has an invalid origin of %s",t),n}})}function zc(e,t){Qn.isFramelessWindow||mc.parentWindow&&!mc.parentWindow.closed&&e!==mc.parentWindow||(mc.parentWindow=e,mc.parentOrigin=t),mc.parentWindow&&mc.parentWindow.closed&&(mc.parentWindow=null,mc.parentOrigin=null),Vr(mc.parentWindow,mc.parentOrigin,vc.parentMessageQueue,"parent")}const qc=hc.extend("handleIncomingMessageFromParent");function $c(e){const t=qc;if(!e.uuid)return vc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Gc(vc.callbacks,t);if(n)return n;const r=Gc(vc.promiseCallbacks,t);if(r)return r;const o=Gc(vc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Hr(e))}function Gc(e,t){if(t){const n=[...e].find(([e,n])=>e.toString()===t.toString());if(n)return n[0]}}function Jc(e,t){const n=Gc(t,e.uuid);n&&t.delete(n),e.uuid?vc.legacyMessageIdsToUuidMap={}:delete vc.legacyMessageIdsToUuidMap[e.id]}function Kc(e){const t=qc,n=qn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Dr(r),i=$c(o);if(i){const r=vc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),sc.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]),Qc(e)||(t("Removing registered callback for message %s",i.toString()),Jc(o,vc.callbacks)));const a=vc.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()),Jc(o,vc.promiseCallbacks));const s=vc.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()),Jc(o,vc.portCallbacks)}o.uuid&&(vc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;sc.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Hr(r),r.func),Rs(r.func,r.args)}else t("Received an unknown message: %O",e)}function Qc(e){return!0===e.data.isPartialResponse}function Zc(){return mc.topWindow!==mc.parentWindow}function Xc(e){return e===mc.topWindow&&Zc()?vc.topMessageQueue:e===mc.parentWindow?vc.parentMessageQueue:[]}function Yc(e){return e===mc.topWindow&&Zc()?mc.topOrigin:e===mc.parentWindow?mc.parentOrigin:null}function eu(e){return e===mc.topWindow&&Zc()?"top":e===mc.parentWindow?"parent":null}function tu(e,t){let n;n=mc.currentWindow.setInterval(()=>{0===Xc(e).length&&(clearInterval(n),t())},100)}function nu(e,t,n,r,o){const i=vc.nextMessageId++,a=new Jn;vc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Qn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:qn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function ru(e,t){const n=vc.nextMessageId++,r=new Jn;return vc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:qn(),apiVersionTag:t,args:[],data:e}}const ou="v1";function iu(e){if(!lo(e)&&Qr(lr),!lo(e)&&!au())throw vn;e?Fs(nr(ou,"log.request"),"log.request",()=>{const t=e();kc(nr(ou,"log.receive"),"log.receive",[t])}):ks("log.request")}function au(){return!(!Qr(lr)||!lr.supports.logs)}var su,cu,uu;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(su||(su={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(cu||(cu={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(uu||(uu={}));const lu="v1";function du(e,t){Qr(lr),kc(nr(lu,"uploadCustomApp"),"uploadCustomApp",[e],t||Sn())}function fu(e,t,n){Qr(lr),kc(nr(lu,"sendCustomMessage"),e,t,n)}function pu(e,t){if(Qr(lr),!Zs())throw new Error("The child window has not yet been initialized or is not present");oc(e,t)}function gu(e,t){Qr(lr),Fs(nr(lu,"registerCustomHandler"),e,(...e)=>t.apply(this,e))}function hu(e,t){Qr(lr),Fs(nr(lu,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function mu(e){Qr(lr,dn.content,dn.sidePanel,dn.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];kc(nr(lu,"openFilePreview"),"openFilePreview",t)}const vu="v1";function wu(e){return new Promise(t=>{if(Qr(lr,dn.content),!bu())throw vn;const n=bc(nr(vu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Fs(nr(vu,"conversations.registerStartConversationHandler"),"startConversation",(t,n,r,o)=>{var i;return null===(i=e.onStartConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})}),e.onCloseConversation&&Fs(nr(vu,"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 Cu(){if(Qr(lr,dn.content),!bu())throw vn;kc(nr(vu,"conversations.closeConversation"),"conversations.closeConversation"),ks("startConversation"),ks("closeConversation")}function yu(){return new Promise(e=>{if(Qr(lr),!bu())throw vn;e(yc(nr(vu,"conversations.getChatMember"),"getChatMembers"))})}function bu(){return!(!Qr(lr)||!lr.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 Eu="v2",Au=tr("copilot");function Iu(){var e;return Qr(lr)&&!!(null===(e=lr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function Pu(e,t){var n;return void 0===t&&(t=null!==(n=qn())&&void 0!==n?n:Date.now()),Su(this,void 0,void 0,function*(){return Qr(lr),Au("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),Tc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],nr(Eu,"copilot.customTelemetry.sendCustomTelemetryData"))})}var Tu=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 Ou="v2",Ru=tr("copilot");function Fu(){var e,t;return Qr(lr)&&(!!(null===(e=lr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=lr.supports.copilot)||void 0===t?void 0:t.eligibility))}function ku(e){var t,n,r;return Tu(this,void 0,void 0,function*(){if(Qr(lr),!Fu())throw new Error(`Error code: ${vn.errorCode}, message: Not supported on platform`);if((null===(t=lr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return Ru("Eligibility information is already available on runtime."),lr.hostVersionsInfo.appEligibilityInformation;Ru("Eligibility information is not available on runtime. Requesting from host.");const o=yield yc(nr(Ou,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(Ge(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(!Mu(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=We.NotAdult),o})}function Mu(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 xu,Nu,Uu,Du,Lu,Hu,_u,Vu,Bu;!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"}(xu||(xu={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(Nu||(Nu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(Uu||(Uu={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(Du||(Du={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(Lu||(Lu={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Hu||(Hu={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(_u||(_u={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Vu||(Vu={})),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"}(Bu||(Bu={}));class ju extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var Wu=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 zu="v2";function qu(){var e;return Qr(lr)&&!!(null===(e=lr.supports.copilot)||void 0===e?void 0:e.sidePanel)}function $u(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Bu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||Ge(e)}function Gu(e){return Wu(this,void 0,void 0,function*(){Qr(lr);return Pc("copilot.sidePanel.getContent",e?[new Yu(e)]:[],new Zu,nr(zu,"copilot.sidePanel.getContent"),$u)})}function Ju(e){return Wu(this,void 0,void 0,function*(){Qr(lr);return Pc("copilot.sidePanel.preCheckUserConsent",e?[new el(e)]:[],new Xu,nr(zu,"copilot.sidePanel.preCheckUserConsent"),$u)})}function Ku(e){xs(nr(zu,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[dn.content],()=>{if(!qu())throw Qu})}const Qu=new ju(Bu.NotSupportedOnPlatform,"This API is not supported on the current platform.");class Zu extends Yi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Xu extends Yi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Yu{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class el{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}var tl=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 nl="v2";function rl(){var e;return Qr(lr)&&!!(null===(e=lr.supports.copilot)||void 0===e?void 0:e.view)}function ol(){return tl(this,void 0,void 0,function*(){Qr(lr),yield Pc("copilot.view.closeSidePanel",[],new il,nr(nl,"copilot.view.closeSidePanel"))})}class il extends Yi{validate(e){return!0}deserialize(e){return e}}const al="v2";class sl{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function cl(e){const t=e;return t.responseType===dl.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const ul="Action.Execute";var ll,dl,fl,pl;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(ll||(ll={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(dl||(dl={}));class gl extends Yi{validate(e){return cl(e)}deserialize(e){return e}}function hl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(fl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function ml(e){e.requestType===ll.ActionExecuteInvokeRequest?vl(e):e.requestType===ll.QueryMessageExtensionRequest&&wl(e)}function vl(e){if(e.type!==ul){throw{errorCode:fl.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${ul}"`}}if(!$n(e.data)){throw{errorCode:fl.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function wl(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 Cl(e,t,n){if(Qr(lr,dn.content,dn.sidePanel),!Rl())throw vn;const r=new uo(e);return ml(n),Ac(nr(al,"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 yl(e,t){if(Qr(lr,dn.content,dn.sidePanel),!Rl())throw vn;const n=new uo(e);return Ac(nr(al,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then(([e,t])=>{if(!e)throw t})}function bl(e,t,n){if(Qr(lr,dn.content,dn.sidePanel),!Rl())throw vn;const r=new uo(e);return ml(n),Ac(nr(al,"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(Qr(lr,dn.content,dn.sidePanel),!Rl())throw vn;return Ln(e,new Error("titleId is Invalid.")),Ln(t,new Error("oauthConfigId is Invalid.")),Ac(nr(al,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then(([e,t])=>{if(!e)throw t})}function El(e,t,n){if(Qr(lr,dn.content,dn.sidePanel),!Rl())throw vn;return Ln(e,new Error("titleId is Invalid.")),t&&Hn(t),Ac(nr(al,"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"}(fl||(fl={}));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 Il(e){if(Qr(lr,dn.content,dn.sidePanel),!Rl())throw vn;return Ln(e.connectorId,new Error("connectorId is Invalid.")),Ln(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Tc("externalAppAuthentication.authenticateWithConnector",[new Al(e)],nr(al,"externalAppAuthentication.authenticateWithConnector"),hl)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(pl||(pl={}));class Pl extends Yi{validate(e){return"string"==typeof e&&e in pl}deserialize(e){return e}}function Tl(e){if(Qr(lr,dn.content,dn.sidePanel),!Rl())throw vn;return Ln(e.connectorId,new Error("connectorId is Invalid.")),Ln(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),Pc("externalAppAuthentication.getUserAuthenticationStateForConnector",[new Al(e)],new Pl,nr(al,"externalAppAuthentication.getUserAuthenticationStateForConnector"),hl)}function Ol(e){if(Qr(lr,dn.content,dn.sidePanel),!Rl())throw vn;return Ln(e.connectorId,new Error("connectorId is Invalid.")),Ln(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Tc("externalAppAuthentication.disconnectConnector",[new Al(e)],nr(al,"externalAppAuthentication.disconnectConnector"),hl)}function Rl(){return!(!Qr(lr)||!lr.supports.externalAppAuthentication)}var Fl=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 kl="v2";function Ml(e,t,n){return Fl(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!Dl())throw vn;return Ll(e,t),Tc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],nr(kl,"externalAppAuthenticationForCEA.authenticateWithSSO"),hl)})}function xl(e,t,n){return Fl(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!Dl())throw vn;return Ll(e,t),Tc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],nr(kl,"externalAppAuthenticationForCEA.authenticateWithOauth"),hl)})}function Nl(e,t,n,r){return Fl(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!Dl())throw vn;return Ll(e,t),vl(r),Pc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new sl(r),n.url.href,n.width,n.height,n.isExternal],new gl,nr(kl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),hl)})}function Ul(e,t,n,r){return Fl(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!Dl())throw vn;return Ll(e,t),vl(r),Pc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new sl(r),n.authId,n.connectionName,n.claims,n.silent],new gl,nr(kl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),hl)})}function Dl(){return!(!Qr(lr)||!lr.supports.externalAppAuthenticationForCEA)}function Ll(e,t){Ln(t,new Error("conversation id is not valid.")),so(e)}const Hl="v2";var _l,Vl;function Bl(e,t){if(Qr(lr,dn.content,dn.sidePanel),!Wl())throw vn;const n=new uo(e);return Ac(nr(Hl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then(([e,t])=>{if(!e)throw t})}function jl(e,t,n){if(Qr(lr,dn.content,dn.sidePanel),!Wl())throw vn;const r=new uo(e);return Ac(nr(Hl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then(([e,t])=>{if(e)throw e;return t})}function Wl(){return!(!Qr(lr)||!lr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(_l||(_l={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Vl||(Vl={}));var zl=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 ql="v2";function $l(e,t,n){return zl(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!Jl())throw vn;Ll(e,t);const[r,o]=yield Ac(nr(ql,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o})}function Gl(e,t,n){return zl(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!Jl())throw vn;Ll(e,t);const r=yield yc(nr(ql,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r})}function Jl(){return!(!Qr(lr)||!lr.supports.externalAppCardActionsForCEA)}var Kl;function Ql(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Kl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Kl||(Kl={}));var Zl=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 Xl="v2";function Yl(e,t,n){return Zl(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!ed())throw vn;return td(e,n),Tc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new nd(t),n],nr(Xl,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Ql)})}function ed(){return!(!Qr(lr)||!lr.supports.externalAppCardActionsForDA)}function td(e,t){so(e),Kn(t)}class nd{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var rd=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const od="v2";function id(e,t,n){return rd(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!ad())throw vn;const r=new uo(e),[o,i]=yield Ac(nr(od,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i})}function ad(){return!(!Qr(lr)||!lr.supports.externalAppCommands)}const sd="v1";var cd,ud,ld,dd,fd,pd;function gd(e,t){if(Qr(lr,dn.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");kc(nr(sd,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function hd(e,t){if(Qr(lr,dn.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");kc(nr(sd,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function md(e,t,n){if(Qr(lr,dn.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");kc(nr(sd,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function vd(e,t,n){if(Qr(lr,dn.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");kc(nr(sd,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function wd(e,t,n){if(Qr(lr,dn.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");kc(nr(sd,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function Cd(e=!1,t){if(Qr(lr,dn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");kc(nr(sd,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function yd(e,t,n,r,o=!1,i){if(Qr(lr,dn.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");kc(nr(sd,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function bd(e){if(Qr(lr,dn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");kc(nr(sd,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function Sd(e=void 0,t){if(Qr(lr,dn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");kc(nr(sd,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function Ed(e){if(Qr(lr,dn.content),!e)throw Md(_e.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");kc(nr(sd,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function Ad(e,t){if(Qr(lr,dn.content),!t)throw Md(_e.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw Md(_e.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");kc(nr(sd,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Id(e,t){if(Qr(lr,dn.content),!t)throw Md(_e.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Md(_e.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");kc(nr(sd,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Pd(e,t){if(Qr(lr,dn.content),!t)throw Md(_e.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Md(_e.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");kc(nr(sd,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Td(e,t){if(Qr(lr,dn.content),!t)throw Md(_e.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Md(_e.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");kc(nr(sd,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Od(e,t){if(Qr(lr,dn.content),!t)throw Md(_e.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Md(_e.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");kc(nr(sd,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Rd(e,t){if(Qr(lr,dn.content),!t)throw Md(_e.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Md(_e.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw Md(_e.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");kc(nr(sd,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Fd(e){if(Qr(lr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Fs(nr(sd,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function kd(e){if(Qr(lr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Fs(nr(sd,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function Md(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"}(cd||(cd={})),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"}(ud||(ud={})),function(e){e.ClassMaterials="classMaterials"}(ld||(ld={})),function(e){e.Readonly="readonly"}(dd||(dd={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(fd||(fd={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(pd||(pd={}));const xd="v1";function Nd(){return new Promise(e=>{if(Qr(lr),!Hd())throw vn;e(Ec(nr(xd,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))})}function Ud(e){return new Promise(t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Qr(lr),!Hd())throw vn;t(Ec(nr(xd,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))})}function Dd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Qr(lr),!Hd())throw vn;Fs(nr(xd,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",t=>{Qr(lr),e(t)})}function Ld(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Qr(lr),!Hd())throw vn;Fs(nr(xd,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",t=>{Qr(lr),e(t)})}function Hd(){return!(!Qr(lr)||!lr.supports.meetingRoom)}function _d(){return!(!Qr(lr)||!lr.supports.messageChannels)}const Vd="1.0.1",Bd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Kd("Invalid message format, ignoring. Message: %o",e);if(!$d(e.source,e.origin))return void Kd("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Qd("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Kd("Invalid response format, ignoring. Message: %o",e);t(r)}};let jd=null,Wd=!1;function zd(e,t,n=!1){if(Wd=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.`);jd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Kd("Nested App Auth Bridge is already present");const o=qd(r);o&&(r.nestedAppAuthBridge=o)}function qd(e){const t=new WeakMap,{onMessage:n}=Bd,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 Kd(`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=Gd(t);if(e===e.top||!jd)return void Qd("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,jd)}}catch(e){return void Qd("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 $d(e,t){if(t===jd)try{return"https:"===new URL(t).protocol}catch(e){return Qd("Invalid message origin URL:",e),!1}return!1}function Gd(e){const t=Date.now();return{id:Jd(),uuid:an(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Jd(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Kd(...e){Wd&&console.log(...e)}function Qd(...e){Wd&&console.error(...e)}const Zd="v1";function Xd(e){if(Qr(lr,dn.content),!Yd())throw vn;kc(nr(Zd,"notifications.showNotification"),"notifications.showNotification",[e])}function Yd(){return!(!Qr(lr)||!lr.supports.notifications)}const ef="v2";function tf(e){if(!of())throw new Error(_e.NOT_SUPPORTED_ON_PLATFORM.toString());if(lo(e))throw new Error(_e.INVALID_ARGUMENTS.toString());Fs(nr(ef,"otherApp.install"),"otherApp.install",e)}function nf(){if(!of())throw new Error(_e.NOT_SUPPORTED_ON_PLATFORM.toString());kc(nr(ef,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),ks("otherApp.install")}function rf(e){if(!of())throw new Error(_e.NOT_SUPPORTED_ON_PLATFORM.toString());return Tc("otherApp.notifyInstallCompleted",[e.toString()],nr(ef,"otherApp.notifyInstallCompleted"))}function of(){return!(!Qr(lr)||!lr.supports.otherAppStateChange)}var af=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 sf="v2";function cf(){return Qr(lr)&&!!lr.supports.plugins}function uf(e){return af(this,void 0,void 0,function*(){if(Qr(lr),!e.func)throw new Error("func is required in PluginMessage.");return Tc("plugins.sendMessage",[new df(e)],nr(sf,"plugins.sendMessage"))})}function lf(e){xs(nr(sf,"plugins.receiveMessage"),"plugins.receiveMessage",(...t)=>{e(ff(t))},Object.values(dn),()=>{if(!cf())throw new Error("Receiving plugin messages is not supported in the current host.")})}class df{constructor(e){this.message=e}serialize(){return this.message}}function ff(e){if(1===e.length&&pf(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 pf(e){if(!e||"object"!=typeof e)return!1;return"string"==typeof e.func}const gf="v1";var hf,mf,vf;function wf(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Qr(lr,dn.sidePanel),!Pf())throw vn;kc(nr(gf,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Cf(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(Qr(lr,dn.sidePanel),!Pf())throw vn;kc(nr(gf,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function yf(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(Qr(lr,dn.sidePanel),!Pf())throw vn;kc(nr(gf,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function bf(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Qr(lr,dn.sidePanel),!Pf())throw vn;kc(nr(gf,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Sf(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Qr(lr,dn.sidePanel),!Pf())throw vn;Fs(nr(gf,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Ef(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Qr(lr,dn.sidePanel),!Pf())throw vn;Fs(nr(gf,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Af(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Qr(lr,dn.sidePanel),!Pf())throw vn;Fs(nr(gf,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function If(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Qr(lr,dn.sidePanel),!Pf())throw vn;Fs(nr(gf,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Pf(){return!(!Qr(lr)||!lr.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"}(hf||(hf={})),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"}(mf||(mf={})),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"}(vf||(vf={}));const Tf="v1";function Of(e,t,n,r){if(Qr(lr,dn.content),!Rf())throw vn;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");kc(nr(Tf,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Rf(){return!(!Qr(lr)||!lr.supports.appEntity)}const Ff="v1";function kf(e){return new Promise(t=>{if(Qr(lr),!Mf())throw vn;if((Qn.hostClientType===un.android||Qn.hostClientType===un.teamsRoomsAndroid||Qn.hostClientType===un.teamsPhones||Qn.hostClientType===un.teamsDisplays)&&!Zr(Ye)){const e={errorCode:_e.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(yc(nr(Ff,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))})}function Mf(){return!(!Qr(lr)||!lr.supports.teams)&&(!!lr.supports.teams.fullTrust&&!!lr.supports.teams.fullTrust.joinedTeams)}var xf=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 Nf="v1";function Uf(e){return xf(this,void 0,void 0,function*(){if(Qr(lr),!Df())throw vn;return Pc("getConfigSetting",[e],new ea,nr(Nf,"teams.fullTrust.getConfigSetting"))})}function Df(){return!(!Qr(lr)||!lr.supports.teams)&&!!lr.supports.teams.fullTrust}const Lf="v1";var Hf;function _f(e,t){if(Qr(lr,dn.content),!Bf())throw vn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");kc(nr(Lf,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Vf(e,t){if(Qr(lr),!Bf())throw vn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");kc(nr(Lf,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Bf(){return!(!Qr(lr)||!lr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Hf||(Hf={}));class jf{static setTimeout(e,t){const n=performance.now(),r=An();return jf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete jf.setTimeoutCallbacks[e]}static setInterval(e,t){jf.setTimeout(function n(){e(),jf.setTimeout(n,t)},t)}static tick(){const e=performance.now(),t=[];for(const n in jf.setTimeoutCallbacks){const r=jf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){jf.setTimeoutCallbacks[e].callback(),delete jf.setTimeoutCallbacks[e]}}}jf.setTimeoutCallbacks={};class Wf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){jf.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&&jf.clearTimeout(this.timeoutId),this.timeoutId=jf.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(Wf.maxSessionTimeoutInMs,2*t.timeoutInMs):Wf.initialSessionTimeoutInMs}}Wf.initialSessionTimeoutInMs=1e3,Wf.maxSessionTimeoutInMs=3e4;const zf="v2";class qf{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Wf(qf.distributionBinSize,e=>this.reportPerformanceEvent(nr(zf,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e]))}startMonitorSlowFrameProcessing(){jf.setInterval(()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(nr(zf,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0},qf.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){jf.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(nr(zf,"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(nr(zf,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}qf.distributionBinSize=1e3,qf.calculateFPSInterval=1e3;var $f=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())})},Gf=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 Jf="v2",Kf=Dn()?void 0:new qf(kc);var Qf,Zf,Xf;function Yf(e){if(Qr(lr,dn.sidePanel),!op())throw vn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Fs(nr(Jf,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==Kf?void 0:Kf.setFrameProcessTimeLimit(e.timeLimit),!1),up())ip(e.videoFrameHandler,e.config);else{if(!dp())throw vn;sp(e.videoBufferHandler,e.config)}null==Kf||Kf.startMonitorSlowFrameProcessing()}function ep(e,t){if(Qr(lr,dn.sidePanel),!op())throw vn;kc(nr(Jf,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function tp(e){if(Qr(lr,dn.sidePanel),!op())throw vn;Fs(nr(Jf,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Ep(e,Kf),!1),kc(nr(Jf,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function np(e){kc(nr(Jf,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function rp(e){kc(nr(Jf,"videoEffects.notifyError"),"video.notifyError",[e])}function op(){return Qr(lr)&&!!lr.supports.video&&(!!lr.supports.video.mediaStream||!!lr.supports.video.sharedFrame)}function ip(e,t){if(Qr(lr,dn.sidePanel),!op()||!up())throw vn;Fs(nr(Jf,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>$f(this,void 0,void 0,function*(){const{streamId:n}=t,r=ap(e,Kf);yield gp(n,r,rp,Kf)}),!1),kc(nr(Jf,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function ap(e,t){return n=>$f(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 sp(e,t){if(Qr(lr,dn.sidePanel),!op()||!dp())throw vn;Fs(nr(Jf,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",t=>{if(t){const n=t.timestamp;null==Kf||Kf.reportStartFrameProcessing(t.width,t.height),e(cp(t),()=>{null==Kf||Kf.reportFrameProcessed(),np(n)},rp)}},!1),kc(nr(Jf,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function cp(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Gf(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function up(){var e;return Qr(lr,dn.sidePanel)&&lp()&&!!(null===(e=lr.supports.video)||void 0===e?void 0:e.mediaStream)}function lp(){var e,t,n,r;return!(!(null===(t=null===(e=Un().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Un().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function dp(){var e;return Qr(lr,dn.sidePanel)&&!!(null===(e=lr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Qf||(Qf={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Zf||(Zf={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Xf||(Xf={}));var fp=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const pp="v2";function gp(e,t,n,r){var o,i;return fp(this,void 0,void 0,function*(){const a=vp();!Dn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),wp(yield mp(e,n,r),new Cp(n,t),a.writable)})}function hp(e,t,n,r){var o,i;return fp(this,void 0,void 0,function*(){const a=vp();!Dn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),wp(yield mp(e,n,r),new Sp(n,t),a.writable)})}function mp(e,t,n){return fp(this,void 0,void 0,function*(){if(Dn())throw vn;const r=Un().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 vp(){if(Dn())throw vn;const e=window.MediaStreamTrackGenerator;if(!e)throw vn;return new e({kind:"video"})}function wp(e,t,n){new(0,Un().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Cp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>fp(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 yp{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 bp{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)=>fp(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=>fp(this,void 0,void 0,function*(){if(Dn())throw vn;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 yp(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 bp(i,r.multiStreamCount);return{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:r.frameRowOffset,width:r.frameWidth,height:r.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult,attributes:a.attributes}}}),Fs(nr(pp,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e})}}function Ep(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then(()=>{null==t||t.reportVideoEffectChanged(n||"",r),kc(nr(pp,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])}).catch(e=>{const t=e in Xf?e:Xf.InitializationFailure;kc(nr(pp,"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 Ip="v2",Pp=2e3,Tp=Dn()?void 0:new qf(kc);var Op;function Rp(e){var t,n;if(!Dp())throw vn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Qr(lr,dn.sidePanel)){if(Fs(nr(Ip,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==Tp?void 0:Tp.setFrameProcessTimeLimit(e),!1),null===(t=lr.supports.video)||void 0===t?void 0:t.mediaStream)Fs(nr(Ip,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>Ap(this,void 0,void 0,function*(){const{streamId:n,metadataInTexture:r}=t,o=Tp?kp(e.videoFrameHandler,Tp):e.videoFrameHandler;r?yield hp(n,o,Hp,Tp):yield gp(n,o,Hp,Tp)}),!1),kc(nr(Ip,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=lr.supports.video)||void 0===n?void 0:n.sharedFrame))throw vn;Fs(nr(Ip,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",t=>{if(t){null==Tp||Tp.reportStartFrameProcessing(t.width,t.height);const n=Fp(),r=t.timestamp;e.videoBufferHandler(Mp(t),()=>{n(),null==Tp||Tp.reportFrameProcessed(),Lp(r)},Hp)}},!1),kc(nr(Ip,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Tp||Tp.startMonitorSlowFrameProcessing()}}function Fp(){const e=setTimeout(()=>{Hp(`Frame not processed in ${Pp}ms`,Op.Warn)},Pp);return function(){clearTimeout(e)}}function kp(e,t){return n=>Ap(this,void 0,void 0,function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=Fp(),i=yield e(n);return o(),t.reportFrameProcessed(),i})}function Mp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function xp(e,t,n){if(Qr(lr,dn.sidePanel),!Dp())throw vn;kc(nr(Ip,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Np(e){if(Qr(lr,dn.sidePanel),!Dp())throw vn;Fs(nr(Ip,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Ep(e,Tp),!1),kc(nr(Ip,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Up(e){if(Qr(lr,dn.sidePanel),!op())throw vn;kc(nr(Ip,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Dp(){return Qr(lr),op()}function Lp(e){kc(nr(Ip,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Hp(e,t=Op.Warn){kc(nr(Ip,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function _p(e){if(Qr(lr),!op())throw vn;Hp(e,Op.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Op||(Op={}));const Vp="v2";class Bp extends Yi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class jp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class Wp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class zp extends Yi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class qp{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class $p extends Yi{validate(e){const t=new zp;let n=!0;return e.allTabs&&e.allTabs.forEach(e=>{n||(n=t.validate(e))}),n}deserialize(e){return e}}function Gp(e,t){if(Qr(lr),!Xp())throw new Error(`Error code: ${_e.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Yp(e.threadId),t&&0===t.length)throw new Error(`Error code: ${_e.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Pc("hostEntity.tab.addAndConfigure",[new Wp(e),t],new zp,nr(Vp,"hostEntity.tab.addAndConfigure"))}function Jp(e){if(Qr(lr),!Xp())throw new Error(`Error code: ${_e.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Yp(e.threadId),Pc("hostEntity.tab.getAll",[new Wp(e)],new $p,nr(Vp,"hostEntity.tab.getAll"))}function Kp(e,t){if(Qr(lr),!Xp())throw new Error(`Error code: ${_e.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return eg(e),Yp(t.threadId),Pc("hostEntity.tab.reconfigure",[new jp(e),new Wp(t)],new Bp,nr(Vp,"hostEntity.tab.reconfigure"))}function Qp(e,t){if(Qr(lr),!Xp())throw new Error(`Error code: ${_e.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return eg(e),Yp(t.threadId),Pc("hostEntity.tab.rename",[new jp(e),new Wp(t)],new Bp,nr(Vp,"hostEntity.tab.rename"))}function Zp(e,t){if(Qr(lr),!Xp())throw new Error(`Error code: ${_e.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Yp(t.threadId),eg(e),Pc("hostEntity.tab.remove",[new qp(e),new Wp(t)],new ea,nr(Vp,"hostEntity.tab.remove"))}function Xp(){var e;return!!(Qr(lr)&&ng()&&(null===(e=lr.supports.hostEntity)||void 0===e?void 0:e.tab))}function Yp(e){if(!e||0==e.length)throw new Error(`Error code: ${_e.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function eg(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${_e.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var tg;function ng(){return!(!Qr(lr)||!lr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(tg||(tg={}));var rg=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 og="v2",ig="Invalid store dialog size",ag="No App Id present, but AppId needed to open AppDetail store",sg="No Collection Id present, but CollectionId needed to open a store specific to a collection";function cg(e){return rg(this,void 0,void 0,function*(){pg();const{size:t}=null!=e?e:{};return Tc("store.openFullStore",[gg(t)],nr(og,"store.openFullStore"))})}function ug(e){return rg(this,void 0,void 0,function*(){pg();const{size:t,appId:n}=e;if(!(n instanceof uo))throw new Error(ag);return Tc("store.openAppDetail",[gg(t),n],nr(og,"store.openAppDetail"))})}function lg(e){return rg(this,void 0,void 0,function*(){pg();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return Tc("store.openInContextStore",[gg(t),n,r,o,null==i?void 0:i.map(e=>e.toString())],nr(og,"store.openInContextStore"))})}function dg(e){return rg(this,void 0,void 0,function*(){pg();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(sg);return Tc("store.openSpecificStore",[gg(t),n],nr(og,"store.openSpecificStore"))})}function fg(){return Qr(lr)&&!!lr.supports.store}function pg(){if(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),!fg())throw vn}function gg(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(ig);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(ig);return JSON.stringify(e)}var hg=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const mg="v1",vg=tr("widgetHosting");function wg(){return Qr(lr)&&!!lr.supports.widgetHosting}function Cg(e,t){return hg(this,void 0,void 0,function*(){return Kr(),vg("Calling tool with widgetId and input: ",{widgetId:e,input:t}),Pc("widgetHosting.callTool",[new Fg(e,t)],new Og,nr(mg,"widgetHosting.callTool"),Ge)})}function yg(e,t){return hg(this,void 0,void 0,function*(){return Kr(),vg("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:t.prompt}),Tc("widgetHosting.sendFollowUpMessage",[new kg(e,t)],nr(mg,"widgetHosting.sendFollowUpMessage"))})}function bg(e,t){return hg(this,void 0,void 0,function*(){return Kr(),vg("Requesting display mode with widgetId: ",{widgetId:e,mode:t.mode}),Tc("widgetHosting.requestDisplayMode",[new Mg(e,t)],nr(mg,"widgetHosting.requestDisplayMode"))})}function Sg(e,t){return hg(this,void 0,void 0,function*(){return Kr(),vg("Requesting modal with widgetId and options: ",{widgetId:e,options:t}),Pc("widgetHosting.requestModal",[new Dg(e,t)],new Rg,nr(mg,"widgetHosting.requestModal"),Ge)})}function Eg(e,t){Kr(),vg("Notifying intrinsic height with widgetId: ",{widgetId:e,height:t}),Tc("widgetHosting.notifyIntrinsicHeight",[new Ug(e,t)],nr(mg,"widgetHosting.notifyIntrinsicHeight"))}function Ag(e,t,n){Kr(),vg("Content size changed with widgetId: ",{widgetId:e,width:t,height:n}),Tc("widgetHosting.contentSizeChanged",[new Lg(e,t,n)],nr(mg,"widgetHosting.contentSizeChanged"))}function Ig(e,t){return hg(this,void 0,void 0,function*(){return Kr(),vg("Setting widget state with widgetId: ",{widgetId:e,state:t}),Tc("widgetHosting.setWidgetState",[new Ng(e,t)],nr(mg,"widgetHosting.setWidgetState"))})}function Pg(e,t){Kr(),vg("Opening external URL with widgetId: ",{widgetId:e,href:t.href}),Tc("widgetHosting.openExternal",[new xg(e,t)],nr(mg,"widgetHosting.openExternal"))}function Tg(e){xs(nr(mg,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",e,[],()=>{if(!wg())throw new Error("Widget Hosting is not supported on this platform")})}class Og extends Yi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Rg extends Yi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Fg{constructor(e,t){this.widgetId=e,this.toolInput=t}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}}class kg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,prompt:this.args.prompt}}}class Mg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,mode:this.args.mode}}}class xg{constructor(e,t){this.widgetId=e,this.payload=t}serialize(){return{widgetId:this.widgetId,href:this.payload.href}}}class Ng{constructor(e,t){this.widgetId=e,this.state=t}serialize(){return{widgetId:this.widgetId,state:this.state}}}class Ug{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 Lg{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 Hg=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const _g="v1",Vg="v2";let Bg;function jg(e){Bg=e}function Wg(e){const t=void 0!==e,n=t?e:Bg;if(!n)throw new Error("No parameters are provided for authentication");Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.remove,dn.task,dn.stage,dn.meetingStage);return zg(n.successCallback||n.failureCallback?nr(_g,"authentication.authenticate"):nr(Vg,"authentication.authenticate"),n).then(e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Bg=void 0)}}).catch(e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Bg=void 0)}})}function zg(e,t){return Hg(this,void 0,void 0,function*(){const n=_n(t.url);return Hn(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 qg(e){Kr();return $g(e&&(e.successCallback||e.failureCallback)?nr(_g,"authentication.getAuthToken"):nr(Vg,"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 $g(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 Gg(e){Kr();return Jg(e&&(e.successCallback||e.failureCallback)?nr(_g,"authentication.getUser"):nr(Vg,"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 Jg(e){return new Promise(t=>{t(Ac(e,"authentication.getUser"))}).then(([e,t])=>{if(e)return t;throw t})}function Kg(e,t){Qr(lr,dn.authentication);kc(nr(t?_g:Vg,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),tu(mc.parentWindow,()=>setTimeout(()=>mc.currentWindow.close(),200))}function Qg(e,t){Qr(lr,dn.authentication);kc(nr(t?_g:Vg,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),tu(mc.parentWindow,()=>setTimeout(()=>mc.currentWindow.close(),200))}var Zg;function Xg(){return Qr(lr)&&!!lr.supports.appPerformanceMetrics}function Yg(e){Qr(lr),Fs(nr("v2","appPerformanceMetrics.memoryUsageHeartbeat"),"appPerformanceMetrics.memoryUsageHeartbeat",e)}function eh(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"}(Zg||(Zg={}));class th{constructor(e){this.val=e,eh(e)}toString(){return this.val}}const nh="/l/app/",rh="/l/meeting/new",oh="attendees",ih="startTime",ah="endTime",sh="subject",ch="content",uh="/l/call/0/0",lh="source",dh="withVideo",fh="/l/chat/0/0",ph="users",gh="topicName",hh="message";function mh(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${ph}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${gh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${hh}=${encodeURIComponent(n)}`;return`${ct}://${ut}${fh}?${r}${o}${i}`}function vh(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${ph}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${dh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${lh}=${encodeURIComponent(n)}`;return`${ct}://${ut}${uh}?${r}${o}${i}`}function wh(e,t,n,r,o){const i=void 0===e?"":`${oh}=`+e.map(e=>encodeURIComponent(e)).join(","),a=void 0===t?"":`&${ih}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${ah}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${sh}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${ch}=${encodeURIComponent(o)}`;return`${ct}://${ut}${rh}?${i}${a}${s}${c}${u}`}function Ch(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${ct}://${ut}${nh}${encodeURIComponent(e)}`}const yh="v1";function bh(e){return new Promise(t=>{if(Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.task,dn.stage,dn.meetingStage),!Sh())throw new Error("Not supported");const n=nr(yh,"appInstallDialog.openAppInstallDialog");lr.isLegacyTeams?t(bc(n,"executeDeepLink",Ch(e.appId))):(kc(n,"appInstallDialog.openAppInstallDialog",[e]),t())})}function Sh(){return!(!Qr(lr)||!lr.supports.appInstallDialog)}const Eh="v1",Ah=tr("media");var Ih,Ph,Th,Oh,Rh,Fh,kh;!function(e){e.Base64="base64",e.ID="id"}(Ih||(Ih={}));class Mh{}function xh(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Qr(lr,dn.content,dn.task),!Qn.isFramelessWindow){return void e({errorCode:_e.NOT_SUPPORTED_ON_PLATFORM},[])}if(!Zr(nt)){return void e({errorCode:_e.OLD_PLATFORM},[])}kc(nr(Eh,"media.captureImage"),"captureImage",e)}function Nh(){if(Qr(lr,dn.content,dn.task),!Dh())throw vn;const e=Ve.Media;return new Promise(t=>{t(Ec(nr(Eh,"media.hasPermission"),"permissions.has",e))})}function Uh(){if(Qr(lr,dn.content,dn.task),!Dh())throw vn;const e=Ve.Media;return new Promise(t=>{t(Ec(nr(Eh,"media.requestPermission"),"permissions.request",e))})}function Dh(){return!(!Qr(lr)||!lr.supports.permissions)}class Lh extends Mh{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(Qr(lr,dn.content,dn.task),!Zr(rt)){return void e({errorCode:_e.OLD_PLATFORM},new Blob)}if(!Zh(this.mimeType,this.format,this.content)){return void e({errorCode:_e.INVALID_ARGUMENTS},new Blob)}Zr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e)}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];kc(nr(Eh,"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=Wh(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=zh(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:_e.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&&!lo(e)&&kc(nr(Eh,"media.getMedia"),"getMedia",r),Fs(nr(Eh,"media.registerGetMediaRequestHandler"),"getMedia"+t,function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),ks("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Wh(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),ks("getMedia"+t)}else{const e=zh(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:_e.INTERNAL_ERROR,message:"data received is null"},new Blob),ks("getMedia"+t)}})}}class Hh{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Qr(lr,dn.content,dn.task);try{Yr(Ze)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};kc(nr(Eh,"media.controller"),"media.controller",[n],e=>{t&&t(e)})}stop(e){this.notifyEventToHost(Ph.StopRecording,e)}}class _h extends Hh{getMediaType(){return Rh.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Ph.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Vh(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Qr(lr,dn.content,dn.task),!Zr(rt)){const e={errorCode:_e.OLD_PLATFORM};return void t(e,[])}try{qh(e)}catch(e){return void t(e,[])}if(!Gh(e)){const e={errorCode:_e.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];kc(nr(Eh,"media.selectMedia"),"selectMedia",n,(n,r,o)=>{var i,a;if(o)return void($h(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 Lh(e));t(n,s)})}function Bh(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Qr(lr,dn.content,dn.task),!Zr(rt)){return void t({errorCode:_e.OLD_PLATFORM})}if(!Xh(e)){return void t({errorCode:_e.INVALID_ARGUMENTS})}const n=[e];kc(nr(Eh,"media.viewImages"),"viewImages",n,t)}function jh(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Qr(lr,dn.content,dn.task),Qn.hostClientType===un.desktop||Qn.hostClientType===un.web||Qn.hostClientType===un.rigel||Qn.hostClientType===un.teamsRoomsWindows||Qn.hostClientType===un.teamsRoomsAndroid||Qn.hostClientType===un.teamsPhones||Qn.hostClientType===un.teamsDisplays){return void e({errorCode:_e.NOT_SUPPORTED_ON_PLATFORM},"")}if(!Zr(ot)){return void e({errorCode:_e.OLD_PLATFORM},"")}if(!Yh(t)){return void e({errorCode:_e.INVALID_ARGUMENTS},"")}kc(nr(Eh,"media.scanBarCode"),"media.scanBarCode",[t],e)}function Wh(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 zh(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 qh(e){Kh(e)?Yr(Qe):Qh(e)?Yr(Ze):Jh(e)&&Yr(Xe)}function $h(e){return!(e.mediaType!=Rh.Video||!e.videoProps||!e.videoProps.videoController)}function Gh(e){return!(null==e||e.maxMediaCount>10)}function Jh(e){var t;return!((null==e?void 0:e.mediaType)!=Rh.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Kh(e){return!(!e||e.mediaType!=Rh.VideoAndImage&&!e.videoAndImageProps)}function Qh(e){return!(!e||e.mediaType!=Rh.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Zh(e,t,n){return null!=e&&null!=t&&t==Ih.ID&&null!=n}function Xh(e){return!(null==e||e.length<=0||e.length>10)}function Yh(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function em(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"}(Ph||(Ph={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Th||(Th={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Oh||(Oh={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Rh||(Rh={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(Fh||(Fh={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(kh||(kh={}));const tm="v2";function nm(e){return new Promise(t=>{if(Qr(lr,dn.content,dn.task),!im())throw vn;if(!Yh(e))throw{errorCode:_e.INVALID_ARGUMENTS};t(Ec(nr(tm,"barCode.scanBarCode"),"media.scanBarCode",e))})}function rm(){if(Qr(lr,dn.content,dn.task),!im())throw vn;const e=Ve.Media;return new Promise(t=>{t(Ec(nr(tm,"barCode.hasPermission"),"permissions.has",e))})}function om(){if(Qr(lr,dn.content,dn.task),!im())throw vn;const e=Ve.Media;return new Promise(t=>{t(Ec(nr(tm,"barCode.requestPermission"),"permissions.request",e))})}function im(){return!!(Qr(lr)&&lr.supports.barCode&&lr.supports.permissions)}const am="v2";function sm(e){return cm(nr(am,"chat.openChat"),e)}function cm(e,t){return new Promise(n=>{if(Qr(lr,dn.content,dn.task),!lm())throw vn;if(lr.isLegacyTeams)n(bc(e,"executeDeepLink",mh([t.user],void 0,t.message)));else{n(bc(e,"chat.openChat",{members:[t.user],message:t.message}))}})}function um(e){const t=nr(am,"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(cm(t,r))}else{if(Qr(lr,dn.content,dn.task),!lm())throw vn;if(lr.isLegacyTeams)n(bc(t,"executeDeepLink",mh(e.users,e.topic,e.message)));else{n(bc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}})}function lm(){return!(!Qr(lr)||!lr.supports.chat)}var dm=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const fm="v2";function pm(e){return dm(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.meetingStage,dn.task,dn.settings,dn.stage,dn.sidePanel),!hm())throw vn;if(!e.type||!Object.values(qe).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(qe)}`);const t=yield Nn(e),n={mimeType:e.type,content:t};return Ec(nr(fm,"clipboard.write"),"clipboard.writeToClipboard",n)})}function gm(){return dm(this,void 0,void 0,function*(){Qr(lr,dn.content,dn.meetingStage,dn.task,dn.settings,dn.stage,dn.sidePanel);const e=nr(fm,"clipboard.read");if(!hm())throw vn;const t=yield Ec(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return xn(e.mimeType,e.content)}return t})}function hm(){return Qn.isFramelessWindow?!(!Qr(lr)||!lr.supports.clipboard):!!(Qr(lr)&&navigator&&navigator.clipboard&&lr.supports.clipboard)}var mm=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 vm="v2",wm={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var Cm;function ym(){var e;return null!==(e=Qr(lr)&&(lr.isNAAChannelRecommended||Im()))&&void 0!==e&&e}function bm(){return Qr(lr),mc.parentOrigin}function Sm(){var e;return null!==(e=Qr(lr)&&lr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function Em(){var e;return null!==(e=Qr(lr)&&(lr.isDeeplyNestedAuthSupported||Am()))&&void 0!==e&&e}function Am(){return!!(Qr(lr)&&Pm()&&lr.isLegacyTeams&&Zr(vr))}function Im(){return!!(Qr(lr)&&Pm()&&lr.isLegacyTeams&&lr.supports.nestedAppAuth)}function Pm(){return Qn.hostClientType===un.android||Qn.hostClientType===un.ios||Qn.hostClientType===un.ipados||Qn.hostClientType===un.visionOS}function Tm(e){return mm(this,void 0,void 0,function*(){if(!Sm())throw vn;const t=e.map(Fm);return Rm(Cm.ADD,t)})}function Om(e){return mm(this,void 0,void 0,function*(){if(!Sm())throw vn;const t=e.map(Fm);return Rm(Cm.DELETE,t)})}function Rm(e,t){return mm(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 Pc("nestedAppAuth.manageNAATrustedOrigins",[new km(e,t)],wm,nr(vm,"nestedAppAuth.manageNAATrustedOrigins"))})}function Fm(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"}(Cm||(Cm={}));class km{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const Mm="v2";function xm(){if(Qr(lr,dn.content,dn.task),!Um())throw vn;return Ec(nr(Mm,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Nm(e){if(Qr(lr,dn.content,dn.task),!Um())throw vn;if(!e)throw{errorCode:_e.INVALID_ARGUMENTS};return Ec(nr(Mm,"geoLocation.showLocation"),"location.showLocation",e)}function Um(){return!!(Qr(lr)&&lr.supports.geoLocation&&lr.supports.geoLocation.map&&lr.supports.permissions)}const Dm="v2";function Lm(){if(Qr(lr,dn.content,dn.task),!Vm())throw vn;return Ec(nr(Dm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Hm(){if(Qr(lr,dn.content,dn.task),!Vm())throw vn;const e=Ve.GeoLocation;return new Promise(t=>{t(Ec(nr(Dm,"geoLocation.hasPermission"),"permissions.has",e))})}function _m(){if(Qr(lr,dn.content,dn.task),!Vm())throw vn;const e=Ve.GeoLocation;return new Promise(t=>{t(Ec(nr(Dm,"geoLocation.requestPermission"),"permissions.request",e))})}function Vm(){return!!(Qr(lr)&&lr.supports.geoLocation&&lr.supports.permissions)}function Bm(){return lr.hostVersionsInfo?lr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const jm="v1";class Wm{postMessage(e,t){Qr(lr),kc(nr(jm,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||Sn())}addEventListener(e,t){Qr(lr),"message"===e&&Fs(nr(jm,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class zm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Qr(lr,dn.task),kc(nr(jm,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||Sn())}addEventListener(e,t){Qr(lr,dn.task),"message"===e&&Fs(nr(jm,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const qm="v2";function $m(e){if(Qr(lr,dn.content),!Gm())throw vn;if(!e||!Mn(e))throw{errorCode:_e.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Ec(nr(qm,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function Gm(){return!(!Qr(lr)||!lr.supports.secondaryBrowser)}const Jm="v1";function Km(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Qr(lr,dn.content,dn.task),!Zr(et))throw{errorCode:_e.OLD_PLATFORM};if(!e)throw{errorCode:_e.INVALID_ARGUMENTS};if(!Zm())throw vn;kc(nr(Jm,"location.getLocation"),"location.getLocation",[e],t)}function Qm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Qr(lr,dn.content,dn.task),!Zr(et))throw{errorCode:_e.OLD_PLATFORM};if(!e)throw{errorCode:_e.INVALID_ARGUMENTS};if(!Zm())throw vn;kc(nr(Jm,"location.showLocation"),"location.showLocation",[e],t)}function Zm(){return!(!Qr(lr)||!lr.supports.location)}const Xm="v1";function Ym(e){Qr(lr,dn.sidePanel),e.contentUrl&&new URL(e.contentUrl),kc(nr(Xm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var ev=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 tv="v1";var nv,rv,ov,iv,av,sv;function cv(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),kc(nr(tv,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function uv(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),kc(nr(tv,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function lv(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage,dn.settings,dn.content),kc(nr(tv,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function dv(){var e,t,n;return ev(this,void 0,void 0,function*(){let r;Qr(lr,dn.sidePanel,dn.meetingStage,dn.settings,dn.content);try{const e=!0;r=yield Ec(nr("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)==iv.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==iv.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(_e.NOT_SUPPORTED_ON_PLATFORM.toString());return r})}function fv(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage,dn.task),kc(nr(tv,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function pv(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Qr(lr,dn.sidePanel),kc(nr(tv,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function gv(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Qr(lr,dn.sidePanel),kc(nr(tv,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function hv(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Qr(lr,dn.sidePanel),kc(nr(tv,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function mv(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Qr(lr,dn.sidePanel),Fs(nr(tv,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function vv(e,t,n={sharingProtocol:av.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),kc(nr(tv,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function wv(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),kc(nr(tv,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Cv(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),kc(nr(tv,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function yv(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),kc(nr(tv,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function bv(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),Fs(nr(tv,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Sv(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),Fs(nr(tv,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Ev(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),Fs(nr(tv,"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"));Qr(lr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||sv.Other};return Ec(nr("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Iv(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");Qr(lr,dn.sidePanel,dn.meetingStage),e.isAppHandlingAudio?Pv(e,t):Tv(e,t)}function Pv(e,t){kc(nr(tv,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],(n,r)=>{if(n&&null!=r)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(n)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${n.errorCode} ${n.message}`);if("boolean"!=typeof r)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Fs(nr(tv,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",t=>ev(this,void 0,void 0,function*(){try{const n=yield e.micMuteStateChangedCallback(t);Rv(n,n.isMicMuted===t.isMicMuted?nv.HostInitiated:nv.AppDeclinedToChange)}catch(e){Rv(t,nv.AppFailedToChange)}}));Fs(nr(tv,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)}),t(r)})}function Tv(e,t){kc(nr(tv,"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");Ms("meeting.micStateChanged")&&ks("meeting.micStateChanged"),Ms("meeting.audioDeviceSelectionChanged")&&ks("meeting.audioDeviceSelectionChanged"),t(n)})}function Ov(e){Rv(e,nv.AppInitiated)}function Rv(e,t){Qr(lr,dn.sidePanel,dn.meetingStage),kc(nr(tv,"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"}(nv||(nv={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(rv||(rv={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(ov||(ov={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(iv||(iv={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(av||(av={})),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.M365CalendarMeetNow="m365_calendar_meet_now",e.Other="other"}(sv||(sv={}));const Fv="v1",kv="v2";function Mv(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=nr(Fv,"monetization.openPurchaseExperience")):(r=e,o=nr(kv,"monetization.openPurchaseExperience"));return Qr(lr,dn.content),On(()=>new Promise(e=>{if(!xv())throw vn;e(Ec(o,"monetization.openPurchaseExperience",r))}),n)}function xv(){return!(!Qr(lr)||!lr.supports.monetization)}const Nv="v2";function Uv(e){return new Promise(t=>{if(Qr(lr,dn.content),!Lv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(bc(nr(Nv,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))})}function Dv(e){return new Promise(t=>{if(Qr(lr,dn.content),!Lv())throw new Error("Not supported");const n=nr(Nv,"calendar.composeMeeting");lr.isLegacyTeams?t(bc(n,"executeDeepLink",wh(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(bc(n,"calendar.composeMeeting",e))})}function Lv(){return!(!Qr(lr)||!lr.supports.calendar)}const Hv="v2";function _v(e){e&&0!==e.length&&e.forEach(e=>{eh(e)})}function Vv(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===Jv.New&&(_v(t.toRecipients),_v(t.ccRecipients),_v(t.bccRecipients))}function Bv(e){if(Qr(lr,dn.content),!jv())throw new Error("Not supported");return Vv(e),Tc("mail.handoff.composeMail",[new Wv(e)],nr(Hv,"mail.handoff.composeMail"))}function jv(){return!!(Qr(lr)&&lr.supports.mail&&lr.supports.mail.handoff)}class Wv{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const zv="v2";function qv(e){return new Promise(t=>{if(Qr(lr,dn.content),!Gv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(bc(nr(zv,"mail.openMailItem"),"mail.openMailItem",e))})}function $v(e){return new Promise(t=>{if(Qr(lr,dn.content),!Gv())throw new Error("Not supported");t(bc(nr(zv,"mail.composeMail"),"mail.composeMail",e))})}function Gv(){return!(!Qr(lr)||!lr.supports.mail)}var Jv;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Jv||(Jv={}));const Kv="v2";function Qv(){if(!Qn.printCapabilityEnabled){if(Qr(lr),!nw())throw vn;Qn.printCapabilityEnabled=!0,document.addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(Zv(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())})}}function Zv(){Un().print()}function Xv(e){Yv(nr(Kv,"teamsAPIs_registerOnLoadHandler"),e,()=>{if(!lo(e)&&!nw())throw vn})}function Yv(e,t,n){!lo(t)&&Qr(lr),!lo(t)&&n&&n(),Vs(e,t)}function ew(e){tw(nr(Kv,"teamsAPIs_registerBeforeUnloadHandler"),e,()=>{if(!lo(e)&&!nw())throw vn})}function tw(e,t,n){!lo(t)&&Qr(lr),!lo(t)&&n&&n(),Ws(e,t)}function nw(){return!(!Qr(lr)||!lr.supports.teamsCore)}const rw="v1",ow="v2";function iw(e,t){let n,r;Qr(lr,dn.content,dn.task,dn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=nr(rw,"people.selectPeople")):(r=e,o=nr(ow,"people.selectPeople")),Pn(aw,n,o,r)}function aw(e,t){return new Promise(n=>{if(!Zr(tt))throw{errorCode:_e.OLD_PLATFORM};if(!em(t))throw{errorCode:_e.INVALID_ARGUMENTS};if(!sw())throw vn;n(Ec(e,"people.selectPeople",t))})}function sw(){return!(!Qr(lr)||!lr.supports.people)}function cw(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?uw(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function uw(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 lw="v2";function dw(e){return Qr(lr,dn.content),new Promise(t=>{const[n,r]=cw(e);if(!n)throw{errorCode:_e.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(Ec(nr(lw,"profile.showProfile"),"profile.showProfile",o))})}function fw(){return!(!Qr(lr)||!lr.supports.profile)}const pw="v2",gw="search.queryChange",hw="search.queryClose",mw="search.queryExecute";function vw(e,t,n){if(Qr(lr,dn.content),!Cw())throw vn;Fs(nr(pw,"search.registerOnClosedHandler"),hw,e),Fs(nr(pw,"search.registerOnExecutedHandler"),mw,t),n&&Fs(nr(pw,"search.registerOnChangeHandler"),gw,n)}function ww(){if(Qr(lr,dn.content),!Cw())throw vn;kc(nr(pw,"search.unregisterHandlers"),"search.unregister"),ks(gw),ks(hw),ks(mw)}function Cw(){return!(!Qr(lr)||!lr.supports.search)}function yw(){return new Promise(e=>{if(Qr(lr,dn.content),!Cw())throw new Error("Not supported");e(bc(nr(pw,"search.closeSearch"),"search.closeSearch"))})}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 Sw="v2";function Ew(){return bw(this,void 0,void 0,function*(){if(Qr(lr,dn.sidePanel,dn.meetingStage),!Aw())throw vn;return yield Ec(nr(Sw,"sharing.history.getContent"),"sharing.history.getContent")})}function Aw(){var e;return Qr(lr)&&void 0!==(null===(e=lr.supports.sharing)||void 0===e?void 0:e.history)}const Iw="v1",Pw="v2",Tw={shareWebContent:"sharing.shareWebContent"};function Ow(e,t){try{Fw(e),kw(e),xw(e)}catch(e){return Tn(()=>Promise.reject(e),t)}Qr(lr,dn.content,dn.sidePanel,dn.task,dn.stage,dn.meetingStage);return Tn(Rw,t,nr(t?Iw:Pw,"sharing.shareWebContent"),e)}function Rw(e,t){return new Promise(n=>{if(!Nw())throw vn;n(Ec(e,Tw.shareWebContent,t))})}function Fw(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:_e.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function kw(e){let t;if(e.content.some(e=>!e.type))throw t={errorCode:_e.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some(t=>t.type!==e.content[0].type))throw t={errorCode:_e.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Mw(e){if("URL"===e.type){if(!e.url)throw{errorCode:_e.INVALID_ARGUMENTS,message:"URLs are required for URL content types"}}else{if("FILE"!==e.type)throw{errorCode:_e.INVALID_ARGUMENTS,message:"Content type is unsupported"};if(!e.url)throw{errorCode:_e.INVALID_ARGUMENTS,message:"File URLs are required for File content types"}}}function xw(e){e.content.forEach(Mw)}function Nw(){return!(!Qr(lr)||!lr.supports.sharing)}const Uw="v2";function Dw(){return new Promise(e=>{if(Qr(lr,dn.content),!Lw())throw vn;e(Ec(nr(Uw,"stageView.self.close"),"stageView.self.close"))})}function Lw(){var e;return Qr(lr)&&void 0!==(null===(e=lr.supports.stageView)||void 0===e?void 0:e.self)}const Hw="v2";var _w;function Vw(e){return new Promise(t=>{if(Qr(lr,dn.content),!Bw())throw vn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Ec(nr(Hw,"stageView.open"),"stageView.open",e))})}function Bw(){return!(!Qr(lr)||!lr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(_w||(_w={}));const jw=10;var Ww=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 zw="v2";function qw(e){return Ww(this,void 0,void 0,function*(){Qr(lr,dn.content,dn.task),Jw(),Kw(e);const t=yield Ec(nr(zw,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return Qw(e.maxVisualMediaCount,t),t})}function $w(e){return Ww(this,void 0,void 0,function*(){Qr(lr,dn.content,dn.task),Jw(),Kw(e);const t=yield Ec(nr(zw,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return Qw(e.maxVisualMediaCount,t),t})}function Gw(){return!!(Qr(lr)&&lr.supports.visualMedia&&lr.supports.visualMedia.image&&lr.supports.permissions)}function Jw(){if(!Gw())throw vn}function Kw(e){if(!e||e.maxVisualMediaCount>jw||e.maxVisualMediaCount<1)throw yn}function Qw(e,t){if(t.length>e)throw bn}const Zw="v2";var Xw,Yw;function eC(){if(Qr(lr,dn.content,dn.task),!Gw())throw vn;const e=Ve.Media;return Ec(nr(Zw,"visualMedia.hasPermission"),"permissions.has",e)}function tC(){if(Qr(lr,dn.content,dn.task),!Gw())throw vn;const e=Ve.Media;return Ec(nr(Zw,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(Xw||(Xw={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Yw||(Yw={}));var nC=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 rC=null;function oC(){return nC(this,void 0,void 0,function*(){return null===rC&&(rC=(yield Ho()).app.host.name),rC})}var iC=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};function aC(){return iC(this,void 0,void 0,function*(){if(Qr(lr),!cC())throw vn;return!(!lr.isLegacyTeams||Qn.hostClientType!==un.android&&Qn.hostClientType!==un.ios&&Qn.hostClientType!==un.ipados&&Qn.hostClientType!==un.visionOS||(yield sC())!==ln.teams)||(yield yc(nr("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))})}function sC(){return iC(this,void 0,void 0,function*(){return oC()})}function cC(){return Qr(lr)&&void 0!==lr.supports.webStorage}const uC="v2";var lC;function dC(e){const t=nr(uC,"call.startCall");return new Promise(n=>{var r;if(Qr(lr,dn.content,dn.task),!fC())throw vn;if(!lr.isLegacyTeams)return kc(t,"call.startCall",[e],n);n(yc(t,"executeDeepLink",vh(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(lC.Video),e.source)).then(e=>{if(!e)throw new Error(pt);return e}))})}function fC(){return!(!Qr(lr)||!lr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(lC||(lC={}));const pC="v1";function gC(){ia(nr(pC,"appInitialization.notifyAppLoaded"))}function hC(){kc(nr(pC,"appInitialization.notifySuccess"),Fo.Success,[Ir])}function mC(e){sa(nr(pC,"appInitialization.notifyFailure"),e)}function vC(e){aa(nr(pC,"appInitialization.notifyExpectedFailure"),e)}const wC=tr("thirdPartyCloudStorage"),CC="v2";class yC{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let bC=[],SC=null,EC=!0,AC=null;function IC(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(!e||""===e){return void t([],{errorCode:_e.INVALID_ARGUMENTS})}if(Qr(lr,dn.content,dn.task),!TC())throw vn;if(AC)throw AC=null,new Error("getDragAndDropFiles cannot be called twice");AC=t,EC=!0,kc(nr(CC,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],PC)}function PC(e){if(AC)if(e&&e.error)AC([],e.error),AC=null;else if(e&&e.fileChunk)try{EC||0!==e.fileChunk.chunkSequence||(wC("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),EC=!0,AC([],{errorCode:_e.INTERNAL_ERROR,message:"error occurred while receiving data"}),bC=[],AC=null);const t=zh(e.fileChunk,e.fileType);if(t?(SC||(SC=new yC(e.fileType,[])),SC.assembleAttachment.push(t)):(wC(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),AC?AC([],{errorCode:_e.INTERNAL_ERROR,message:"error occurred while receiving data"}):AC=null,bC=[],AC=null,EC=!0),EC=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&SC){const t=Wh(SC.assembleAttachment,SC.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});bC.push(n)}e.isLastFile&&AC&&(AC(bC,e.error),bC=[],AC=null,EC=!0),SC=null}}catch(e){AC&&(AC([],{errorCode:_e.INTERNAL_ERROR,message:e}),bC=[],AC=null,EC=!0)}else AC([],{errorCode:_e.INTERNAL_ERROR,message:"data received is null"}),bC=[],AC=null,EC=!0}function TC(){return!(!Qr(lr)||!lr.supports.thirdPartyCloudStorage)}const OC="v1";function RC(e,t){oa(nr(OC,"initialize"),t).then(()=>{e&&e()})}function FC(){Qv()}function kC(){Zv()}function MC(e){Kr(),kc(nr(OC,"getContext"),"getContext",t=>{t.frameContext||(t.frameContext=Qn.frameContext),e(t)})}function xC(e){pa(nr(OC,"registerOnThemeChangeHandlerHelper"),e)}function NC(e){xs(nr(OC,"registerFullScreenHandler"),"fullScreenChange",e,[])}function UC(e){xs(nr(OC,"registerAppButtonClickHandler"),"appButtonClick",e,[dn.content])}function DC(e){xs(nr(OC,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[dn.content])}function LC(e){xs(nr(OC,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[dn.content])}function HC(e){Na(nr(OC,"registerBackButtonHandler"),e)}function _C(e){Yv(nr(OC,"registerOnLoadHandler"),e)}function VC(e){tw(nr(OC,"registerBeforeUnloadHandler"),e)}function BC(e){xs(nr(OC,"registerFocusEnterHandler"),"focusEnter",e,[])}function jC(e){xs(nr(OC,"registerChangeSettingsHandler"),"changeSettings",e,[dn.content])}function WC(e,t){Qr(lr),us(nr(OC,"getTabInstances"),t).then(t=>{e(t)})}function zC(e,t){Qr(lr),ls(nr(OC,"getMruTabInstances"),t).then(t=>{e(t)})}function qC(e){ds(nr(OC,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function $C(e,t){Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.task,dn.stage,dn.meetingStage);const n=null!=t?t:Sn();ha(nr(OC,"executeDeepLink"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function GC(e){fs(nr(OC,"setFrameContext"),e)}function JC(e,t,n){oa(nr(OC,"initializeWithFrameContext"),n).then(()=>t&&t()),fs(nr(OC,"setFrameContext"),e)}const KC="v1";function QC(e){cs(nr(KC,"navigation.returnFocus"),e)}function ZC(e,t){Qr(lr);const n=null!=t?t:Sn();ss(nr(KC,"navigation.navigateToTab"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function XC(e,t){Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.remove,dn.task,dn.stage,dn.meetingStage);const n=null!=t?t:Sn();is(nr(KC,"navigation.navigateCrossDomain"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function YC(e){Qr(lr);const t=null!=e?e:Sn();as(nr(KC,"navigation.navigateBack")).then(()=>{t(!0)}).catch(e=>{t(!1,e.message)})}const ey="v1";function ty(e){ps(nr(ey,"settings.setValidityState"),e)}function ny(e){Qr(lr,dn.content,dn.settings,dn.remove,dn.sidePanel),gs(nr(ey,"settings.getSettings")).then(t=>{e(t)})}function ry(e,t){Qr(lr,dn.content,dn.settings,dn.sidePanel);const n=null!=t?t:Sn();hs(nr(ey,"settings.setSettings"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function oy(e){zi(nr(ey,"settings.registerOnSaveHandler"),e)}function iy(e){$i(nr(ey,"settings.registerOnRemoveHandler"),e)}var ay=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 sy="v1";function cy(e,t){const n=nr(sy,"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?(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),kc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?di(n,fy(e),r):li(n,dy(e),r),new Wm}function uy(e){e=py(e);const{width:t,height:n}=e,r=ay(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ui(nr(sy,"tasks.updateTask"),e)}function ly(e,t){fi(nr(sy,"tasks.submitTask"),e,t)}function dy(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:hn.Small,width:e.width?e.width:hn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function fy(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:hn.Small,width:e.width?e.width:hn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function py(e){return e.height=e.height?e.height:hn.Small,e.width=e.width?e.width:hn.Small,e}const gy="v2";var hy,my;function vy(){return!(!Qr(lr,dn.meetingStage,dn.sidePanel,dn.content)||!lr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(hy||(hy={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(my||(my={}));class wy{getFluidTenantInfo(){return Cy(),new Promise(e=>{e(Ec(nr(gy,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))})}getFluidToken(e){return Cy(),new Promise(t=>{t(Ec(nr(gy,"interactive.getFluidToken"),"interactive.getFluidToken",e))})}getFluidContainerId(){return Cy(),new Promise(e=>{e(Ec(nr(gy,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))})}setFluidContainerId(e){return Cy(),new Promise(t=>{t(Ec(nr(gy,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))})}getNtpTime(){return Cy(),new Promise(e=>{e(Ec(nr(gy,"interactive.getNtpTime"),"interactive.getNtpTime"))})}registerClientId(e){return Cy(),new Promise(t=>{t(Ec(nr(gy,"interactive.registerClientId"),"interactive.registerClientId",e))})}getClientRoles(e){return Cy(),new Promise(t=>{t(Ec(nr(gy,"interactive.getClientRoles"),"interactive.getClientRoles",e))})}getClientInfo(e){return Cy(),new Promise(t=>{t(Ec(nr(gy,"interactive.getClientInfo"),"interactive.getClientInfo",e))})}static create(){return Cy(),new wy}}function Cy(){if(!vy())throw new Error("LiveShareHost Not supported")}var yy=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 by(e){try{return e.cartItems=Sy(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Sy(e){return e.map(e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Sy(e.accessories)),e})}const Ey=e=>{try{return e.map(e=>{const{imageURL:t,accessories:n}=e,r=yy(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Ey(n)),o})}catch(e){throw new Error("Error serializing cart items")}};function Ay(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)Py(t),Iy(t.accessories)}function Iy(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");Py(t)}}}function Py(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");Oy(e.price),Ry(e.quantity)}function Ty(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===cn(e))throw new Error("id must be a valid UUID")}}function Oy(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 Ry(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Fy(e){if(!Object.values(Ny).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const ky="v2",My={majorVersion:1,minorVersion:1};var xy,Ny;function Uy(){if(Qr(lr,dn.content,dn.task),!_y())throw vn;return Ec(nr(ky,"marketplace.getCart"),"marketplace.getCart",My).then(by)}function Dy(e){if(Qr(lr,dn.content,dn.task),!_y())throw vn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return Ty(null==e?void 0:e.cartId),Ay(null==e?void 0:e.cartItems),Ec(nr(ky,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Ey(e.cartItems),cartVersion:My})).then(by)}function Ly(e){if(Qr(lr,dn.content,dn.task),!_y())throw vn;if(!e)throw new Error("removeCartItemsParams must be provided");if(Ty(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 Ec(nr(ky,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:My})).then(by)}function Hy(e){if(Qr(lr,dn.content,dn.task),!_y())throw vn;if(!e)throw new Error("updateCartStatusParams must be provided");return Ty(null==e?void 0:e.cartId),Fy(null==e?void 0:e.cartStatus),Ec(nr(ky,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:My})).then(by)}function _y(){return!(!Qr(lr)||!lr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(xy||(xy={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Ny||(Ny={}));var Vy=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 By=3,jy=4;class Wy{constructor(e){this.direction=e}serialize(){return{direction:this.direction}}}function zy(e){return e===By?"back":e===jy?"forward":void 0}function qy(e){void 0!==zy(e.button)&&(e.preventDefault(),e.stopImmediatePropagation())}function $y(e){const t=zy(e.button);t&&(e.preventDefault(),e.stopImmediatePropagation(),Tc("mouseRelay.navigateHistory",[new Wy(t)],nr("v2","mouseRelay.navigateHistory")))}let Gy=!1;function Jy(){return Vy(this,void 0,void 0,function*(){if(!Qy())throw vn;Gy||(document.addEventListener("mousedown",qy,{capture:!0}),document.addEventListener("mouseup",$y,{capture:!0}),document.addEventListener("auxclick",qy,{capture:!0})),Gy=!0})}function Ky(){if(!Qy())throw vn;Gy=!1,document.removeEventListener("mousedown",qy,{capture:!0}),document.removeEventListener("mouseup",$y,{capture:!0}),document.removeEventListener("auxclick",qy,{capture:!0})}function Qy(){return!(!Qr(lr)||!lr.supports.mouseRelay)}var Zy=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 Xy{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 Yy(e){return e.toLowerCase().split("+").sort().join("+")}function eb(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function tb(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()||!!e.key&&/^F\d+$/i.test(e.key)}function nb(e,t){if(tb(t)){const n=eb(t);if(e.has(n))return{matchedShortcut:n,isOverridable:sb.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function rb(e){cb.clear(),e.shortcuts.forEach(e=>{cb.add(Yy(e))}),sb.clear(),e.overridableShortcuts.forEach(e=>{sb.add(Yy(e))})}class ob extends Yi{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function ib(e){Fs(nr("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function ab(e){if(e.target.closest(`[${hb}]`))return;const{matchedShortcut:t,isOverridable:n}=nb(cb,e);if(!t)return;if(n&&ub){if(ub(e,{matchedShortcut:t}))return}Tc("shortcutRelay.forwardShortcutEvent",[new Xy(e)],nr("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const sb=new Set,cb=new Set;let ub,lb=!1;function db(e){if(!gb())throw vn;const t=ub;return ub=e,t}function fb(){if(!gb())throw vn;lb=!1,cb.clear(),sb.clear(),ub=void 0,document.removeEventListener("keydown",ab,{capture:!0})}function pb(){return Zy(this,void 0,void 0,function*(){if(!gb())throw vn;rb(yield Pc("shortcutRelay.getHostShortcuts",[],new ob,nr("v2","shortcutRelay.getHostShortcuts"))),lb||document.addEventListener("keydown",ab,{capture:!0}),lb=!0,ib(e=>{rb(e)})})}function gb(){return!(!Qr(lr)||!lr.supports.shortcutRelay)}const hb="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:()=>Le,AppId:()=>uo,ChannelType:()=>mn,ChildAppWindow:()=>zm,DialogDimension:()=>hn,EduType:()=>ze,EmailAddress:()=>nh,ErrorCode:()=>_e,FileOpenPreference:()=>De,FrameContexts:()=>dn,HostClientType:()=>un,HostName:()=>ln,LiveShareHost:()=>Cy,NotificationTypes:()=>cu,ParentAppWindow:()=>qm,RenderingSurfaces:()=>fn,SecondaryM365ContentIdName:()=>He,TaskModuleDimension:()=>hn,TeamType:()=>pn,UUID:()=>Jn,UserAuthenticationState:()=>gl,UserSettingTypes:()=>lu,UserTeamRole:()=>gn,ValidatedSafeString:()=>co,ViewerActionTypes:()=>uu,activateChildProxyingCommunication:()=>Tr,app:()=>i,appEntity:()=>W,appInitialization:()=>Re,appInstallDialog:()=>te,appPerformanceMetrics:()=>ee,authentication:()=>Y,barCode:()=>re,calendar:()=>ge,call:()=>Oe,chat:()=>oe,clipboard:()=>ie,conversations:()=>S,copilot:()=>O,dialog:()=>f,enablePrintCapability:()=>kC,executeDeepLink:()=>GC,externalAppAuthentication:()=>R,externalAppAuthenticationForCEA:()=>F,externalAppCardActions:()=>k,externalAppCardActionsForCEA:()=>M,externalAppCardActionsForDA:()=>x,externalAppCommands:()=>N,files:()=>U,geoLocation:()=>ce,getAdaptiveCardSchemaVersion:()=>jm,getContext:()=>xC,getCurrentFeatureFlagsState:()=>Fr,getMruTabInstances:()=>qC,getTabInstances:()=>zC,hostEntity:()=>Q,initialize:()=>FC,initializeWithFrameContext:()=>KC,liveShare:()=>xe,location:()=>le,logs:()=>b,mail:()=>me,marketplace:()=>Ne,media:()=>ne,meeting:()=>fe,meetingRoom:()=>D,menus:()=>p,messageChannels:()=>L,monetization:()=>pe,mouseRelay:()=>Ue,navigateBack:()=>ey,navigateCrossDomain:()=>YC,navigateToTab:()=>XC,nestedAppAuth:()=>ae,nestedAppAuthBridge:()=>H,notifications:()=>_,openFilePreview:()=>vu,otherAppStateChange:()=>V,overwriteFeatureFlagsState:()=>Mr,pages:()=>y,people:()=>we,plugins:()=>B,print:()=>MC,profile:()=>Ce,registerAppButtonClickHandler:()=>DC,registerAppButtonHoverEnterHandler:()=>LC,registerAppButtonHoverLeaveHandler:()=>HC,registerBackButtonHandler:()=>_C,registerBeforeUnloadHandler:()=>BC,registerChangeSettingsHandler:()=>WC,registerCustomHandler:()=>hu,registerFocusEnterHandler:()=>jC,registerFullScreenHandler:()=>UC,registerOnLoadHandler:()=>VC,registerOnThemeChangeHandler:()=>NC,registerUserSettingsChangeHandler:()=>mu,remoteCamera:()=>j,returnFocus:()=>ZC,search:()=>ye,secondaryBrowser:()=>ue,sendCustomEvent:()=>gu,sendCustomMessage:()=>pu,setFeatureFlagsState:()=>kr,setFrameContext:()=>JC,settings:()=>ke,shareDeepLink:()=>$C,sharing:()=>Se,shortcutRelay:()=>$e,sidePanelInterfaces:()=>I,stageView:()=>Ae,store:()=>Z,tasks:()=>Me,teams:()=>$,teamsCore:()=>ve,thirdPartyCloudStorage:()=>Fe,uploadCustomApp:()=>fu,version:()=>Ir,videoEffects:()=>G,videoEffectsEx:()=>J,visualMedia:()=>Pe,webStorage:()=>Te,widgetHosting:()=>X});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>wo,getTelemetryPort:()=>mo,isSupported:()=>vo});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Io,getDataLayerPort:()=>Eo,isSupported:()=>Ao});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Po,registerOnResumeHandler:()=>To});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Mo,FailedReason:()=>ko,Messages:()=>Fo,_initialize:()=>Lo,_uninitialize:()=>Ho,getContext:()=>_o,getFrameContext:()=>No,getImmediateParentOrigin:()=>Do,initialize:()=>Uo,isInitialized:()=>xo,lifecycle:()=>o,notifyAppLoaded:()=>Vo,notifyExpectedFailure:()=>Wo,notifyFailure:()=>jo,notifySuccess:()=>Bo,openLink:()=>Go,registerHostToAppPerformanceMetricsHandler:()=>$o,registerOnContextChangeHandler:()=>qo,registerOnThemeChangeHandler:()=>zo});var a={};n.r(a),n.d(a,{isSupported:()=>Qo,resize:()=>Ko});var s={};n.r(s),n.d(s,{isSupported:()=>Xo,open:()=>Zo});var c={};n.r(c),n.d(c,{isSupported:()=>ni,registerOnMessageFromParent:()=>ti,sendMessageToDialog:()=>ei,sendMessageToParentFromDialog:()=>Yo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>si,getDialogInfoFromUrlDialogInfo:()=>ai,isSupported:()=>ii,open:()=>ri,parentCommunication:()=>c,submit:()=>oi});var l={};n.r(l),n.d(l,{isSupported:()=>Ci,open:()=>wi});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>bi,open:()=>yi});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>Si,isSupported:()=>Ei,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>Ii,MenuItem:()=>Ti,MenuListType:()=>Pi,initialize:()=>xi,isSupported:()=>Vi,setNavBarMenu:()=>Di,setUpViews:()=>Ni,showActionMenu:()=>Hi});var g={};n.r(g),n.d(g,{initialize:()=>Bi,isSupported:()=>Yi,registerChangeConfigHandler:()=>Ki,registerOnRemoveHandler:()=>$i,registerOnRemoveHandlerHelper:()=>Gi,registerOnSaveHandler:()=>zi,registerOnSaveHandlerHelper:()=>qi,setConfig:()=>Wi,setValidityState:()=>ji});var h={};n.r(h),n.d(h,{isSupported:()=>ka,onClick:()=>Oa,onHoverEnter:()=>Ra,onHoverLeave:()=>Fa});var m={};n.r(m),n.d(m,{_initialize:()=>Ma,isSupported:()=>Da,navigateBack:()=>xa,registerBackButtonHandler:()=>Na,registerBackButtonHandlerHelper:()=>Ua});var v={};n.r(v),n.d(v,{isSupported:()=>_a,navigateTo:()=>La,navigateToDefaultPage:()=>Ha});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Va,exitFullscreen:()=>Ba,isSupported:()=>ja});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>qa,getTabInstances:()=>za,isSupported:()=>$a,navigateToTab:()=>Wa});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Ga,ReturnFocusType:()=>Ja,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>Ya,initializeWithFrameContext:()=>Xa,isSupported:()=>os,navigateCrossDomain:()=>es,navigateToApp:()=>ts,registerFocusEnterHandler:()=>Qa,registerFullScreenHandler:()=>rs,returnFocus:()=>Ka,setCurrentFrame:()=>Za,shareDeepLink:()=>ns,tabs:()=>C});var b={};n.r(b),n.d(b,{isSupported:()=>su,registerGetLogHandler:()=>au});var S={};n.r(S),n.d(S,{closeConversation:()=>yu,getChatMembers:()=>bu,isSupported:()=>Su,openConversation:()=>Cu});var E={};n.r(E),n.d(E,{isSupported:()=>Pu,sendCustomTelemetryData:()=>Tu});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>Mu,isSupported:()=>ku});var I={};n.r(I),n.d(I,{ContentItemType:()=>Nu,CopilotMode:()=>Hu,MediaSelectionType:()=>Uu,SidePanelErrorCode:()=>ju,SidePanelErrorImpl:()=>Wu,TeamsContextType:()=>Vu,TeamsDimensionName:()=>Lu,TeamsSessionType:()=>Du,TranscriptState:()=>_u,UserConsent:()=>Bu});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>Zu,getContent:()=>Ju,isResponseAReportableError:()=>Gu,isSupported:()=>$u,preCheckUserConsent:()=>Ku,registerUserActionContentSelect:()=>Qu});var T={};n.r(T),n.d(T,{closeSidePanel:()=>il,isSupported:()=>ol});var O={};n.r(O),n.d(O,{customTelemetry:()=>E,eligibility:()=>A,sidePanel:()=>P,view:()=>T});var R={};n.r(R),n.d(R,{ActionExecuteInvokeRequestType:()=>ll,ActionExecuteResponseHandler:()=>hl,InvokeErrorCode:()=>pl,InvokeResponseType:()=>fl,OriginalRequestType:()=>dl,SerializableActionExecuteInvokeRequest:()=>cl,SerializableConnectorParameters:()=>Il,UserAuthenticationState:()=>gl,authenticateAndResendRequest:()=>yl,authenticateWithConnector:()=>Pl,authenticateWithOauth2:()=>El,authenticateWithPowerPlatformConnectorPlugins:()=>Al,authenticateWithSSO:()=>bl,authenticateWithSSOAndResendRequest:()=>Sl,disconnectConnector:()=>Rl,getUserAuthenticationStateForConnector:()=>Ol,isActionExecuteResponse:()=>ul,isInvokeError:()=>ml,isSupported:()=>Fl,validateActionExecuteInvokeRequest:()=>wl});var F={};n.r(F),n.d(F,{authenticateAndResendRequest:()=>Ul,authenticateWithOauth:()=>Nl,authenticateWithSSO:()=>xl,authenticateWithSSOAndResendRequest:()=>Dl,isSupported:()=>Ll,validateInput:()=>Hl});var k={};n.r(k),n.d(k,{ActionOpenUrlErrorCode:()=>Bl,ActionOpenUrlType:()=>Vl,isSupported:()=>zl,processActionOpenUrl:()=>Wl,processActionSubmit:()=>jl});var M={};n.r(M),n.d(M,{isSupported:()=>Kl,processActionOpenUrl:()=>Gl,processActionSubmit:()=>Jl});var x={};n.r(x),n.d(x,{SerializableActionOpenUrlDialogInfo:()=>rd,isSupported:()=>td,processActionOpenUrlDialog:()=>ed});var N={};n.r(N),n.d(N,{isSupported:()=>sd,processActionCommand:()=>ad});var U={};n.r(U),n.d(U,{CloudStorageProvider:()=>ud,CloudStorageProviderFileAction:()=>gd,CloudStorageProviderType:()=>ld,DocumentLibraryAccessType:()=>fd,FileDownloadStatus:()=>pd,SpecialDocumentLibraryType:()=>dd,addCloudStorageFolder:()=>md,addCloudStorageProvider:()=>Ad,addCloudStorageProviderFile:()=>Pd,copyMoveFiles:()=>bd,deleteCloudStorageFolder:()=>vd,deleteCloudStorageProviderFile:()=>Od,downloadCloudStorageProviderFile:()=>Rd,getCloudStorageFolderContents:()=>wd,getCloudStorageFolders:()=>hd,getExternalProviders:()=>yd,getFileDownloads:()=>Sd,openCloudStorageFile:()=>Cd,openDownloadFolder:()=>Ed,registerCloudStorageProviderContentChangeHandler:()=>Md,registerCloudStorageProviderListChangeHandler:()=>kd,removeCloudStorageProvider:()=>Id,renameCloudStorageProviderFile:()=>Td,uploadCloudStorageProviderFile:()=>Fd});var D={};n.r(D),n.d(D,{getPairedMeetingRoomInfo:()=>Ud,isSupported:()=>_d,registerMeetingRoomCapabilitiesUpdateHandler:()=>Ld,registerMeetingRoomStatesUpdateHandler:()=>Hd,sendCommandToPairedMeetingRoom:()=>Dd});var L={};n.r(L),n.d(L,{dataLayer:()=>t,isSupported:()=>Vd,telemetry:()=>e});var H={};n.r(H),n.d(H,{initialize:()=>qd,version:()=>Bd});var _={};n.r(_),n.d(_,{isSupported:()=>ef,showNotification:()=>Yd});var V={};n.r(V),n.d(V,{isSupported:()=>af,notifyInstallCompleted:()=>of,registerAppInstallationHandler:()=>nf,unregisterAppInstallationHandler:()=>rf});var B={};n.r(B),n.d(B,{isSupported:()=>uf,registerPluginMessage:()=>df,sendPluginMessage:()=>lf});var j={};n.r(j),n.d(j,{ControlCommand:()=>mf,ErrorReason:()=>vf,SessionTerminatedReason:()=>wf,getCapableParticipants:()=>Cf,isSupported:()=>Tf,registerOnCapableParticipantsChangeHandler:()=>Ef,registerOnDeviceStateChangeHandler:()=>If,registerOnErrorHandler:()=>Af,registerOnSessionStatusChangeHandler:()=>Pf,requestControl:()=>yf,sendControlCommand:()=>bf,terminateSession:()=>Sf});var W={};n.r(W),n.d(W,{isSupported:()=>Ff,selectAppEntity:()=>Rf});var z={};n.r(z),n.d(z,{getUserJoinedTeams:()=>Mf,isSupported:()=>xf});var q={};n.r(q),n.d(q,{getConfigSetting:()=>Df,isSupported:()=>Lf,joinedTeams:()=>z});var $={};n.r($),n.d($,{ChannelType:()=>_f,fullTrust:()=>q,getTeamChannels:()=>Vf,isSupported:()=>jf,refreshSiteUrl:()=>Bf});var G={};n.r(G),n.d(G,{EffectChangeType:()=>Xf,EffectFailureReason:()=>Yf,VideoFrameFormat:()=>Zf,isSupported:()=>ip,notifySelectedVideoEffectChanged:()=>tp,registerForVideoEffect:()=>np,registerForVideoFrame:()=>ep});var J={};n.r(J),n.d(J,{ErrorLevel:()=>Rp,frameProcessingTimeoutInMs:()=>Tp,isSupported:()=>Lp,notifyFatalError:()=>Vp,notifySelectedVideoEffectChanged:()=>Np,registerForVideoEffect:()=>Up,registerForVideoFrame:()=>Fp,updatePersonalizedEffects:()=>Dp});var K={};n.r(K),n.d(K,{addAndConfigure:()=>Jp,getAll:()=>Kp,isSupported:()=>Yp,reconfigure:()=>Qp,remove:()=>Xp,rename:()=>Zp});var Q={};n.r(Q),n.d(Q,{AppTypes:()=>ng,isSupported:()=>rg,tab:()=>K});var Z={};n.r(Z),n.d(Z,{isSupported:()=>pg,openAppDetail:()=>lg,openFullStore:()=>ug,openInContextStore:()=>dg,openSpecificStore:()=>fg});var X={};n.r(X),n.d(X,{callTool:()=>yg,contentSizeChanged:()=>Ig,isSupported:()=>Cg,notifyIntrinsicHeight:()=>Ag,openExternal:()=>Tg,registerModalCloseHandler:()=>Og,requestDisplayMode:()=>Sg,requestModal:()=>Eg,sendFollowUpMessage:()=>bg,setWidgetState:()=>Pg});var Y={};n.r(Y),n.d(Y,{DataResidency:()=>Xg,authenticate:()=>zg,getAuthToken:()=>$g,getUser:()=>Jg,notifyFailure:()=>Zg,notifySuccess:()=>Qg,registerAuthenticationHandlers:()=>Wg});var ee={};n.r(ee),n.d(ee,{isSupported:()=>Yg,registerHostMemoryMetricsHandler:()=>eh});var te={};n.r(te),n.d(te,{isSupported:()=>Eh,openAppInstallDialog:()=>Sh});var ne={};n.r(ne),n.d(ne,{CameraStartMode:()=>Oh,File:()=>xh,FileFormat:()=>Ph,ImageOutputFormats:()=>Mh,ImageUriType:()=>kh,Media:()=>Hh,MediaControllerEvent:()=>Th,MediaType:()=>Fh,Source:()=>Rh,VideoController:()=>Vh,captureImage:()=>Nh,hasPermission:()=>Uh,requestPermission:()=>Dh,scanBarCode:()=>Wh,selectMedia:()=>Bh,viewImages:()=>jh});var re={};n.r(re),n.d(re,{hasPermission:()=>om,isSupported:()=>am,requestPermission:()=>im,scanBarCode:()=>rm});var oe={};n.r(oe),n.d(oe,{isSupported:()=>dm,openChat:()=>cm,openGroupChat:()=>lm});var ie={};n.r(ie),n.d(ie,{isSupported:()=>mm,read:()=>hm,write:()=>gm});var ae={};n.r(ae),n.d(ae,{addNAATrustedOrigins:()=>Om,canParentManageNAATrustedOrigins:()=>Em,deleteNAATrustedOrigins:()=>Rm,getParentOrigin:()=>Sm,isDeeplyNestedAuthSupported:()=>Am,isNAAChannelRecommended:()=>bm});var se={};n.r(se),n.d(se,{chooseLocation:()=>Nm,isSupported:()=>Dm,showLocation:()=>Um});var ce={};n.r(ce),n.d(ce,{getCurrentLocation:()=>Hm,hasPermission:()=>_m,isSupported:()=>Bm,map:()=>se,requestPermission:()=>Vm});var ue={};n.r(ue),n.d(ue,{isSupported:()=>Jm,open:()=>Gm});var le={};n.r(le),n.d(le,{getLocation:()=>Qm,isSupported:()=>Xm,showLocation:()=>Zm});var de={};n.r(de),n.d(de,{setOptions:()=>ev});var fe={};n.r(fe),n.d(fe,{CallType:()=>av,EventActionSource:()=>cv,MeetingReactionType:()=>ov,MeetingType:()=>iv,SharingProtocol:()=>sv,appShareButton:()=>de,getAppContentStageSharingCapabilities:()=>Cv,getAppContentStageSharingState:()=>bv,getAuthenticationTokenForAnonymousUser:()=>pv,getIncomingClientAudioState:()=>uv,getLiveStreamState:()=>gv,getMeetingDetails:()=>dv,getMeetingDetailsVerbose:()=>fv,joinMeeting:()=>Iv,registerLiveStreamChangedHandler:()=>vv,registerMeetingReactionReceivedHandler:()=>Av,registerRaiseHandStateChangedHandler:()=>Ev,registerSpeakingStateChangeHandler:()=>Sv,requestAppAudioHandling:()=>Pv,requestStartLiveStreaming:()=>hv,requestStopLiveStreaming:()=>mv,shareAppContentToStage:()=>wv,stopSharingAppContentToStage:()=>yv,toggleIncomingClientAudio:()=>lv,updateMicState:()=>Rv});var pe={};n.r(pe),n.d(pe,{isSupported:()=>Nv,openPurchaseExperience:()=>xv});var ge={};n.r(ge),n.d(ge,{composeMeeting:()=>Lv,isSupported:()=>Hv,openCalendarItem:()=>Dv});var he={};n.r(he),n.d(he,{composeMailWithHandoff:()=>jv,isSupported:()=>Wv});var me={};n.r(me),n.d(me,{ComposeMailType:()=>Kv,composeMail:()=>Gv,handoff:()=>he,isSupported:()=>Jv,openMailItem:()=>$v});var ve={};n.r(ve),n.d(ve,{enablePrintCapability:()=>Zv,isSupported:()=>rw,print:()=>Xv,registerBeforeUnloadHandler:()=>tw,registerBeforeUnloadHandlerHelper:()=>nw,registerOnLoadHandler:()=>Yv,registerOnLoadHandlerHelper:()=>ew});var we={};n.r(we),n.d(we,{isSupported:()=>cw,selectPeople:()=>aw});var Ce={};n.r(Ce),n.d(Ce,{isSupported:()=>pw,showProfile:()=>fw});var ye={};n.r(ye),n.d(ye,{closeSearch:()=>bw,isSupported:()=>yw,registerHandlers:()=>ww,unregisterHandlers:()=>Cw});var be={};n.r(be),n.d(be,{getContent:()=>Aw,isSupported:()=>Iw});var Se={};n.r(Se),n.d(Se,{SharingAPIMessages:()=>Ow,history:()=>be,isSupported:()=>Uw,shareWebContent:()=>Rw});var Ee={};n.r(Ee),n.d(Ee,{close:()=>Lw,isSupported:()=>Hw});var Ae={};n.r(Ae),n.d(Ae,{StageViewOpenMode:()=>Vw,isSupported:()=>jw,open:()=>Bw,self:()=>Ee});var Ie={};n.r(Ie),n.d(Ie,{captureImages:()=>$w,isSupported:()=>Jw,retrieveImages:()=>Gw});var Pe={};n.r(Pe),n.d(Pe,{CameraRestriction:()=>Yw,Source:()=>eC,hasPermission:()=>tC,image:()=>Ie,requestPermission:()=>nC});var Te={};n.r(Te),n.d(Te,{isSupported:()=>uC,isWebStorageClearedOnUserLogOut:()=>sC});var Oe={};n.r(Oe),n.d(Oe,{CallModalities:()=>dC,isSupported:()=>pC,startCall:()=>fC});var Re={};n.r(Re),n.d(Re,{ExpectedFailureReason:()=>Mo,FailedReason:()=>ko,Messages:()=>Fo,notifyAppLoaded:()=>hC,notifyExpectedFailure:()=>wC,notifyFailure:()=>vC,notifySuccess:()=>mC});var Fe={};n.r(Fe),n.d(Fe,{getDragAndDropFiles:()=>PC,isSupported:()=>OC});var ke={};n.r(ke),n.d(ke,{getSettings:()=>ry,registerOnRemoveHandler:()=>ay,registerOnSaveHandler:()=>iy,setSettings:()=>oy,setValidityState:()=>ny});var Me={};n.r(Me),n.d(Me,{getDefaultSizeIfNotProvided:()=>gy,startTask:()=>uy,submitTask:()=>dy,updateTask:()=>ly});var xe={};n.r(xe),n.d(xe,{ContainerState:()=>vy,LiveShareHost:()=>Cy,UserMeetingRole:()=>my,isSupported:()=>wy});var Ne={};n.r(Ne),n.d(Ne,{CartStatus:()=>Uy,Intent:()=>Ny,addOrUpdateCartItems:()=>Ly,cartVersion:()=>xy,getCart:()=>Dy,isSupported:()=>Vy,removeCartItems:()=>Hy,updateCartStatus:()=>_y});var Ue={};n.r(Ue),n.d(Ue,{disableMouseRelayCapability:()=>Qy,enableMouseRelayCapability:()=>Ky,isSupported:()=>Zy});var De,Le,He,_e,Ve,Be,je,We,ze,qe,$e={};function Ge(e){return void 0!==(null==e?void 0:e.errorCode)}n.r($e),n.d($e,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>mb,enableShortcutRelayCapability:()=>gb,isSupported:()=>hb,resetIsShortcutRelayCapabilityEnabled:()=>pb,setOverridableShortcutHandler:()=>fb}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(De||(De={})),function(e){e.M365Content="m365content"}(Le||(Le={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(He||(He={})),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"}(_e||(_e={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Ve||(Ve={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Be||(Be={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(je||(je={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(We||(We={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(ze||(ze={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(qe||(qe={}));const Je=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 Ke="2.0.1",Qe="2.0.2",Ze="2.0.3",Xe="2.0.4",Ye="2.0.1",et="1.9.0",tt="2.0.0",nt="1.7.0",rt="1.8.0",ot="1.9.0",it=n.t(Je,2).validOrigins,at=1500,st=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),ct="https",ut="teams.microsoft.com",lt="The library has not yet been initialized",dt="The runtime has not yet been initialized",ft="The runtime version is not supported",pt="The call was not properly started";var gt=n(933);const ht=vt,mt=2147483647;function vt(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 Ct(e)}return wt(e,t,n)}function wt(e,t,n){if("string"==typeof e)return Et(e,t);if(ArrayBuffer.isView(e))return Ft(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(It(e,ArrayBuffer)||e&&It(e.buffer,ArrayBuffer))return kt(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(It(e,SharedArrayBuffer)||e&&It(e.buffer,SharedArrayBuffer)))return kt(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 vt.from(r,t,n);const o=Xt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return vt.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 Ct(e){return yt(e),bt(e<0?0:0|St(e))}function yt(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 bt(e){if(e>mt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,vt.prototype),t}function St(e){if(e>=mt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+mt.toString(16)+" bytes");return 0|e}function Et(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!vt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|At(e,t);let r=bt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function At(e,t){if(vt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||It(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 Pt(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Tt(e).length;default:if(o)return r?-1:Pt(e).length;t=(""+t).toLowerCase(),o=!0}}function It(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Pt(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 Tt(e){return gt.toByteArray(Rt(e))}vt.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}}(),vt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),vt.from=function(e,t,n){return wt(e,t,n)},Object.setPrototypeOf(vt.prototype,Uint8Array.prototype),Object.setPrototypeOf(vt,Uint8Array),vt.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}},vt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==vt.prototype};const Ot=/[^+/0-9A-Za-z-_]/g;function Rt(e){if((e=(e=e.split("=")[0]).trim().replace(Ot,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Ft(e){if(It(e,Uint8Array)){const t=new Uint8Array(e);return kt(t.buffer,t.byteOffset,t.byteLength)}return Mt(e)}function kt(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,vt.prototype),r}function Mt(e){const t=e.length<0?0:0|St(e.length),n=bt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function xt(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 Nt(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 Lt(this,t,n);case"utf8":case"utf-8":return xt(this,t,n);case"ascii":return Ht(this,t,n);case"latin1":case"binary":return _t(this,t,n);case"base64":return Vt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}vt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?xt(this,0,e):Nt.apply(this,arguments)};const Ut=4096;function Dt(e){const t=e.length;if(t<=Ut)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ut));return n}function Lt(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=Zt[e[r]];return o}function Ht(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 _t(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 Vt(e,t,n){return 0===t&&n===e.length?gt.fromByteArray(e):gt.fromByteArray(e.slice(t,n))}function Bt(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 jt(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(Qt(r))return a;e[n+a]=r}return a}function Wt(e,t,n,r){return Kt(Pt(t,e.length-n),e,n,r)}function zt(e,t,n,r){return Kt(Gt(t),e,n,r)}function qt(e,t,n,r){return Kt(Tt(t),e,n,r)}function $t(e,t,n,r){return Kt(Jt(t,e.length-n),e,n,r)}function Gt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Jt(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 Kt(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 Qt(e){return e!=e}vt.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 jt(this,e,t,n);case"utf8":case"utf-8":return Wt(this,e,t,n);case"ascii":case"latin1":case"binary":return zt(this,e,t,n);case"base64":return qt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $t(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Zt=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Xt(e){if(vt.isBuffer(e)){const t=0|St(e.length),n=bt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Qt(e.length)?bt(0):Mt(e):"Buffer"===e.type&&Array.isArray(e.data)?Mt(e.data):void 0}const Yt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let en;const tn=new Uint8Array(16);function nn(){if(!en){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");en=crypto.getRandomValues.bind(crypto)}return en(tn)}const rn=[];for(let e=0;e<256;++e)rn.push((e+256).toString(16).slice(1));function on(e,t=0){return(rn[e[t+0]]+rn[e[t+1]]+rn[e[t+2]]+rn[e[t+3]]+"-"+rn[e[t+4]]+rn[e[t+5]]+"-"+rn[e[t+6]]+rn[e[t+7]]+"-"+rn[e[t+8]]+rn[e[t+9]]+"-"+rn[e[t+10]]+rn[e[t+11]]+rn[e[t+12]]+rn[e[t+13]]+rn[e[t+14]]+rn[e[t+15]]).toLowerCase()}const an=function(e,t,n){if(Yt.randomUUID&&!t&&!e)return Yt.randomUUID();const r=(e=e||{}).random??e.rng?.()??nn();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return on(r)},sn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;const cn=function(e){return"string"==typeof e&&sn.test(e)};var un,ln,dn,fn,pn,gn,hn,mn;!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"}(un||(un={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(ln||(ln={})),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"}(dn||(dn={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(fn||(fn={})),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"}(pn||(pn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(gn||(gn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(hn||(hn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(mn||(mn={}));const vn={errorCode:_e.NOT_SUPPORTED_ON_PLATFORM},wn={majorVersion:1,minorVersion:5},Cn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},yn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),bn=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 En(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 an()}function In(e){return Object.keys(e).forEach(t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&In(e[t])}),Object.freeze(e)}function Pn(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(void 0,e)}).catch(e=>{t&&t(e)}),r}function Tn(e,t,...n){const r=e(...n);return r.then(()=>{t&&t(null)}).catch(e=>{t&&t(e)}),r}function On(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(null,e)}).catch(e=>{t&&t(e,null)}),r}function Rn(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 Fn(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 kn(e){return!(En(`${e.majorVersion}.${e.minorVersion}`,`${wn.majorVersion}.${wn.minorVersion}`)>=0)}function Mn(e){return"https:"===e.protocol}function xn(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=ht.from(t,"base64").toString();n(new Blob([o],{type:e}))})}function Nn(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 Un(){if(Dn())throw new Error("window object undefined at SSR check");return window}function Dn(){return"undefined"==typeof window}function Ln(e,t){if(Vn(e)||!Bn(e)||!jn(e))throw t||new Error("id is not valid.")}function Hn(e,t){const n=e.toString().toLocaleLowerCase();if(Vn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Mn(e))throw t||new Error("Url should be a valid https url")}function _n(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Vn(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Bn(e){return e.length<256&&e.length>4}function jn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Wn(e){if(!e)throw new Error("id must not be empty");if(!1===cn(e))throw new Error("id must be a valid UUID")}const zn=!!performance&&"now"in performance;function qn(){return zn?performance.now()+performance.timeOrigin:void 0}function $n(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=>$n(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=>$n(e[n],t+1))}function Gn(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:We.NotAdult})})})}class Jn{constructor(e=An()){this.uuid=e,Wn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Kn(e){if(!(e instanceof Jn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Qn{}Qn.initializeCalled=!1,Qn.initializeCompleted=!1,Qn.additionalValidOrigins=[],Qn.initializePromise=void 0,Qn.isFramelessWindow=!1,Qn.frameContext=void 0,Qn.hostClientType=void 0,Qn.printCapabilityEnabled=!1,Qn.teamsJsInstanceId=(new Jn).toString();var Zn=n(815);const Xn=new Jn,Yn=Zn.debug.formatArgs;Zn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Xn.toString()}]`,Yn.call(this,e)};const er=(0,Zn.debug)("teamsJs");function tr(e){return er.extend(e)}function nr(e,t){return`${e}_${t}`}function rr(e){return/^v\d+_[\w.]+$/.test(e)}var or=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const ir=tr("runtime"),ar=4;function sr(e){return e.apiVersion===ar}const cr={apiVersion:-1,supports:{}};function ur(e){if(sr(e))return!0;throw-1===e.apiVersion?new Error(dt):new Error(ft)}let lr=cr;const dr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:Cn,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:{}}}},fr=[un.desktop,un.web,un.rigel,un.surfaceHub,un.teamsRoomsWindows,un.teamsRoomsAndroid,un.teamsPhones,un.teamsDisplays],pr=[un.android,un.ios,un.ipados,un.visionOS],gr=[...fr,...pr];function hr(e){let t=e;if(t.apiVersion<ar&&mr.forEach(e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))}),sr(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const mr=[{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=or(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})}}}],vr="2.1.2",wr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:fr}],"1.9.0":[{capability:{location:{}},hostClientTypes:gr}],"2.0.0":[{capability:{people:{}},hostClientTypes:gr},{capability:{sharing:{}},hostClientTypes:[un.desktop,un.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[un.android,un.desktop,un.ios,un.teamsRoomsAndroid,un.teamsPhones,un.teamsDisplays,un.web]},{capability:{webStorage:{}},hostClientTypes:[un.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[un.android,un.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[un.android,un.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[un.android,un.ios,un.ipados,un.visionOS]}],"2.1.2":[]},Cr=ir.extend("generateBackCompatRuntimeConfig");function yr(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]=yr(e[r]||{},t[r]));return n}function br(e,t,n){Cr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);Cr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach(t=>{En(e,t)>=0&&n[t].forEach(e=>{void 0!==Qn.hostClientType&&e.hostClientTypes.includes(Qn.hostClientType)&&(r=yr(r,e.capability))})});const o={apiVersion:ar,hostVersionsInfo:Cn,isLegacyTeams:!0,supports:r};return Cr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Sr=ir.extend("applyRuntimeConfig");function Er(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=hr(e);Sr("Applying runtime %o",t),lr=In(t)}function Ar(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Ir="2.55.0",Pr={childProxyingCommunication:!1};function Tr(){Pr.childProxyingCommunication=!0}function Or(){return Pr.childProxyingCommunication}let Rr={disableEnforceOriginMatchForChildResponses:!1};function Fr(){return Rr}function kr(e){Rr=e}function Mr(e){return kr(Object.assign(Object.assign({},Rr),e)),Fr()}var xr=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 Nr=e=>{const{uuid:t}=e,n=xr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Ur=e=>{const{uuidAsString:t}=e,n=xr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Jn(t):void 0})},Dr=e=>{const{uuidAsString:t}=e,n=xr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Jn(t):void 0})},Lr=e=>{const{uuid:t}=e,n=xr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Hr(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 _r=tr("flushMessageQueue");function Vr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Nr(o);_r("Flushing message %s from %s message queue via postMessage.",Hr(n),r),e.postMessage(n,t)}}}const Br=/^[A-Za-z][A-Za-z\d+.-]*:\/\//;function jr(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 Wr{constructor(e,t,n){this.protocol=e,this.host=t,this.logger=n}static canUse(e){return Br.test(e)}static create(e,t){const n=e.split("://");return new Wr(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||jr(this.host,e.host))}}function zr(e){return Wr.canUse(e)}function qr(e,t){if(Wr.canUse(e))return Wr.create(e,t);t("No URL verifier available for pattern: %s",e)}const $r=tr("internal"),Gr=$r.extend("ensureInitializeCalled"),Jr=$r.extend("ensureInitialized");function Kr(){if(!Qn.initializeCalled)throw Gr(lt),new Error(lt)}function Qr(e,...t){if(!Qn.initializeCompleted)throw Jr("%s. initializeCalled: %s",lt,Qn.initializeCalled.toString()),new Error(lt);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Qn.frameContext){e=!0;break}if(!e){const e=`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Qn.frameContext}".`;throw Jr(e),new Error(e)}}return ur(e)}function Zr(e=Ke){const t=En(Qn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Xr(){return Qn.hostClientType==un.android||Qn.hostClientType==un.ios||Qn.hostClientType==un.ipados||Qn.hostClientType==un.visionOS}function Yr(e=Ke){if(!Xr()){throw{errorCode:_e.NOT_SUPPORTED_ON_PLATFORM}}if(!Zr(e)){throw{errorCode:_e.OLD_PLATFORM}}}function eo(e){let t=Qn.additionalValidOrigins.concat(e.filter(e=>"string"==typeof e&&zr(e)));const n={};t=t.filter(e=>!n[e]&&(n[e]=!0,!0)),Qn.additionalValidOrigins=t}function to(e){if(!io(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${ro}-${oo}).`)}function no(e){if(Vn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(ao(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const ro=4,oo=256;function io(e){return e.length<oo&&e.length>ro}function ao(e){return[...e].some(e=>{const t=e.charCodeAt(0);return t<32||t>126})}function so(e){if(!(e instanceof uo))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class co{constructor(e){this.idAsString=e,no(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class uo extends co{constructor(e){super(e),to(e)}toJSON(){return{appIdAsString:this.toString()}}}function lo(e){return null==e}var fo=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 po;const go="v1",ho=tr("messageChannels.telemetry");function mo(){return fo(this,void 0,void 0,function*(){if(po)return ho("Returning telemetry port from cache"),po;if(!vo())throw vn;return po=yield Rc(nr(go,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),po})}function vo(){var e;return!(!Qr(lr)||!(null===(e=lr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function wo(){po=void 0}var Co=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 yo;const bo="v1",So=tr("messageChannels.dataLayer");function Eo(){return Co(this,void 0,void 0,function*(){if(yo)return So("Returning dataLayer port from cache"),yo;if(!Ao())throw vn;return yo=yield Rc(nr(bo,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),yo})}function Ao(){var e;return!(!Qr(lr)||!(null===(e=lr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Io(){yo=void 0}function Po(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Qr(lr),$s(e)}function To(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Qr(lr),Gs(e)}const Oo="v2",Ro=tr("app"),Fo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var ko,Mo;function xo(){return Qn.initializeCompleted}function No(){return Qn.frameContext}function Uo(e){return ia(nr(Oo,"app.initialize"),e)}function Do(){var e,t;if(Dn())return null;const n=null!==(e=vc.currentWindow)&&void 0!==e?e:window;if(n.parent===n)return null;const r=n.location.ancestorOrigins,o=null==r?void 0:r.item(0);if(o)return o;const i=null===(t=n.document)||void 0===t?void 0:t.referrer;if(!i)return null;try{const e=new URL(i).origin;return e===n.location.origin?null:e}catch(e){return null}}function Lo(e){vc.currentWindow=e}function Ho(){Qn.initializeCalled&&(Os(),Qn.initializeCalled=!1,Qn.initializeCompleted=!1,Qn.initializePromise=void 0,Qn.additionalValidOrigins=[],Qn.frameContext=void 0,Qn.hostClientType=void 0,Qn.isFramelessWindow=!1,wo(),Io(),yc())}function _o(){return new Promise(e=>{Kr(),e(bc(nr(Oo,"app.getContext"),"getContext"))}).then(e=>Jo(e))}function Vo(){Kr(),aa(nr(Oo,"app.notifyAppLoaded"))}function Bo(){return ua(nr(Oo,"app.notifySuccess"))}function jo(e){Kr(),ca(nr(Oo,"app.notifyFailure"),e)}function Wo(e){Kr(),sa(nr(Oo,"app.notifyExpectedFailure"),e)}function zo(e){ga(nr(Oo,"app.registerOnThemeChangeHandler"),e)}function qo(e){ha(nr(Oo,"app.registerOnContextChangeHandler"),e)}function $o(e){_s(e)}function Go(e){return ma(nr(Oo,"app.openLink"),e)}function Jo(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:ln.teams,clientType:e.hostClientType?e.hostClientType:un.web,features:e.hostFeatures,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId,ancestors:e.hostAncestors},appLaunchId:e.appLaunchId,appId:e.appId?new uo(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Qn.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 Ko(e){li(nr(ci,"dialog.update.resize"),e)}function Qo(){return!(!Qr(lr)||!lr.supports.dialog)&&!!lr.supports.dialog.update}function Zo(e,t,n){fi(nr(ci,"dialog.url.bot.open"),e,t,n)}function Xo(){return Qr(lr)&&void 0!==(lr.supports.dialog&&lr.supports.dialog.url&&lr.supports.dialog.url.bot)}function Yo(e){if(Qr(lr,dn.task),!ni())throw vn;Mc(nr(ci,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function ei(e){if(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),!ni())throw vn;Mc(nr(ci,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function ti(e){if(Qr(lr,dn.task),!ni())throw vn;for(Ms("messageForChild"),ks(nr(ci,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),mi.reverse();mi.length>0;){e(mi.pop())}}function ni(){var e,t;return Qr(lr)&&!!(null===(t=null===(e=lr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function ri(e,t,n){di(nr(ci,"dialog.url.open"),e,t,n)}function oi(e,t){pi(nr(ci,"dialog.url.submit"),e,t)}function ii(){return Qr(lr)&&void 0!==(lr.supports.dialog&&lr.supports.dialog.url)}function ai(e){return{url:e.url,height:e.size?e.size.height:hn.Small,width:e.size?e.size.width:hn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function si(e){const t=ai(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(ko||(ko={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Mo||(Mo={})),Ro("teamsjs instance is version %s, starting at %s UTC (%s local)",Ir,(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?Ro("teamsjs is being used from %s. %s",t,n):Ro("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const ci="v2",ui="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 li(e,t){if(Qr(lr,dn.content,dn.sidePanel,dn.task,dn.meetingStage),!Qo())throw vn;Mc(e,"tasks.updateTask",[t])}function di(e,t,n,r){if(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),!ii())throw vn;r&&ks(nr(ci,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Mc(e,"tasks.startTask",[ai(t)],(e,t)=>{null==n||n({err:e,result:t}),Ms("messageForParent")})}function fi(e,t,n,r){if(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),!Xo())throw vn;r&&ks(nr(ci,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Mc(e,"tasks.startTask",[si(t)],(e,t)=>{null==n||n({err:e,result:t}),Ms("messageForParent")})}function pi(e,t,n){if(Qr(lr,dn.content,dn.task),!ii())throw vn;Qn.frameContext===dn.content&&console.warn(ui),Mc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function gi(e){return{card:e.card,height:e.size?e.size.height:hn.Small,width:e.size?e.size.width:hn.Small,title:e.title}}function hi(e){const t=gi(e);return t.completionBotId=e.completionBotId,t}const mi=[];function vi(e){Qn.frameContext&&(Qn.frameContext===dn.task?mi.push(e):Ms("messageForChild"))}function wi(e,t){if(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),!Ci())throw vn;const n=hi(e);Mc(nr(ci,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function Ci(){const e=lr.hostVersionsInfo&&lr.hostVersionsInfo.adaptiveCardSchemaVersion&&!kn(lr.hostVersionsInfo.adaptiveCardSchemaVersion);return Qr(lr)&&void 0!==(e&&lr.supports.dialog&&lr.supports.dialog.card&&lr.supports.dialog.card.bot)}function yi(e,t){if(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),!bi())throw vn;const n=gi(e);Mc(nr(ci,"dialog.adaptiveCard.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function bi(){const e=lr.hostVersionsInfo&&lr.hostVersionsInfo.adaptiveCardSchemaVersion&&!kn(lr.hostVersionsInfo.adaptiveCardSchemaVersion);return Qr(lr)&&void 0!==(e&&lr.supports.dialog&&lr.supports.dialog.card)}function Si(){ks(nr(ci,"dialog.registerMessageForChildHandler"),"messageForChild",vi,!1)}function Ei(){return!(!Qr(lr)||!lr.supports.dialog)}const Ai="v2";var Ii,Pi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(Ii||(Ii={}));class Ti{constructor(){this.enabled=!0,this.selected=!1}}let Oi,Ri,Fi,ki,Mi;function xi(){ks(nr(Ai,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Li,!1),ks(nr(Ai,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",_i,!1),ks(nr(Ai,"menus.registerSetModuleViewHandler"),"setModuleView",Ui,!1)}function Ni(e,t){if(Qr(lr),!Vi())throw vn;Fi=t,Mc(nr(Ai,"menus.setUpViews"),"setUpViews",[e])}function Ui(e){Fi&&Fi(e)||(Qr(lr),Mc(nr(Ai,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Di(e,t){if(Qr(lr),!Vi())throw vn;Oi=t,Mc(nr(Ai,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Li(e){Oi&&Oi(e)||(Qr(lr),Mc(nr(Ai,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Hi(e,t){if(Qr(lr),!Vi())throw vn;Ri=t,Mc(nr(Ai,"menus.showActionMenu"),"showActionMenu",[e])}function _i(e){Ri&&Ri(e)||(Qr(lr),Mc(nr(Ai,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Vi(){return!(!Qr(lr)||!lr.supports.menus)}function Bi(){ks(nr(is,"pages.config.registerSettingsSaveHandler"),"settings.save",Ji,!1),ks(nr(is,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Zi,!1)}function ji(e){return gs(nr(is,"pages.config.setValidityState"),e)}function Wi(e){return ms(nr(is,"pages.config.setConfig"),e)}function zi(e){qi(nr(is,"pages.config.registerOnSaveHandler"),e,()=>{if(!lo(e)&&!Yi())throw vn})}function qi(e,t,n){!lo(t)&&Qr(lr,dn.settings),n&&n(),ki=t,!lo(t)&&Mc(e,"registerHandler",["save"])}function $i(e){Gi(nr(is,"pages.config.registerOnRemoveHandler"),e,()=>{if(!lo(e)&&!Yi())throw vn})}function Gi(e,t,n){!lo(t)&&Qr(lr,dn.remove,dn.settings),n&&n(),Mi=t,!lo(t)&&Mc(e,"registerHandler",["remove"])}function Ji(e){const t=new Qi(e);ki?ki(t):Xs()?ic("settings.save",[e]):t.notifySuccess()}function Ki(e){Ns(nr(is,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[dn.content],()=>{if(!Yi())throw vn})}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(Pi||(Pi={}));class Qi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Mc(nr(is,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Mc(nr(is,"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 Zi(){const e=new Xi;Mi?Mi(e):Xs()?ic("settings.remove",[]):e.notifySuccess()}class Xi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Mc(nr(is,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Mc(nr(is,"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 Yi(){return!(!Qr(lr)||!lr.supports.pages)&&!!lr.supports.pages.config}class ea{}class ta extends ea{validate(e){return!0}deserialize(e){return e}}var na=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const ra=6e4,oa=tr("app");function ia(e,t){if(Dn()){return oa.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Rn(()=>pa(e,t),ra,new Error("SDK initialization timed out."))}function aa(e){Mc(e,Fo.AppLoaded,[Ir])}function sa(e,t){Mc(e,Fo.ExpectedFailure,[t.reason,t.message])}function ca(e,t){Mc(e,Fo.Failure,[t.reason,t.message,t.authHeader])}function ua(e){return na(this,void 0,void 0,function*(){if(Qn.initializeCompleted)return da(e);if(!Qn.initializePromise)throw new Error(lt);return Qn.initializePromise.then(()=>da(e))})}function la(){var e;return Qr(lr)&&!!(null===(e=lr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function da(e){return na(this,void 0,void 0,function*(){return la()?Tc(Fo.Success,[Ir],new ta,e).then(()=>({hasFinishedSuccessfully:!0})):(Mc(e,Fo.Success,[Ir]),{hasFinishedSuccessfully:"unknown"})})}const fa=oa.extend("initializeHelper");function pa(e,t){return new Promise(n=>{Qn.initializeCalled||(Qn.initializeCalled=!0,Ts(),Qn.initializePromise=Cc(t,e).then(({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Ke})=>{Qn.frameContext=e,Qn.hostClientType=t,Qn.clientSupportedSDKVersion=r;try{fa("Parsing %s",n);let e=JSON.parse(n);if(fa("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=Gn(e),n&&Er(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{fa("Attempting to parse %s as an SDK version",n),isNaN(En(n,Ke))||(Qn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(fa("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=Gn(e),Er(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Er(br(Qn.clientSupportedSDKVersion,dr,wr))}}Qn.initializeCompleted=!0}),xi(),Bi(),Si()),Array.isArray(t)&&eo(t),void 0!==Qn.initializePromise?n(Qn.initializePromise):fa("GlobalVars.initializePromise is unexpectedly undefined")})}function ga(e,t){!lo(t)&&Kr(),Us(e,t)}function ha(e,t){!lo(t)&&Kr(),Ds(e,t)}function ma(e,t){return new Promise(n=>{Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.task,dn.stage,dn.meetingStage),n(Sc(e,"executeDeepLink",t))})}var va=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 wa=[];const Ca=tr("validateOrigin");let ya;function ba(){return va(this,void 0,void 0,function*(){ya||(yield Ea())})}function Sa(){return 0===wa.length}function Ea(e=!1){return va(this,void 0,void 0,function*(){if(!Sa()&&!e)return wa;if(ya)return ya;if(Dn())return wa=it,it;{Ca("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout(()=>e.abort(),at);return ya=fetch(st,{signal:e.signal}).then(e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return Ca("Fetch call completed and retrieved valid origins list from CDN"),e.json().then(e=>{if(Aa(JSON.stringify(e)))return wa=e.validOrigins,wa;throw new Error("Valid origins list retrieved from CDN is invalid")})}).catch(e=>("AbortError"===e.name?Ca(`validOrigins fetch call to CDN failed due to Timeout of ${at} ms. Defaulting to fallback list`):Ca("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),wa=it,wa)),ya}})}function Aa(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return Ca("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function Ia(e,t){let n;try{const t=qr(e,Ca);if(!t)return!1;n=t}catch(e){return!1}return n.test(t)}function Pa(e,t){const n=t||Sa()?it:wa;return Ta(e,n)?Promise.resolve(!0):(Ca("Origin %s is not in the local valid origins list, fetching from CDN",e),Ea(t).then(t=>Ta(e,t)))}function Ta(e,t){for(const t of Qn.additionalValidOrigins)if(Ia(t,e))return!0;const n=e.host;return Mn(e)?!!t.some(e=>jr(e,n))||(Ca("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,Qn.additionalValidOrigins),!1):(Ca("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1)}function Oa(e){Ns(nr(is,"pages.appButton.onClick"),"appButtonClick",e,[dn.content],()=>{if(!ka())throw vn})}function Ra(e){Ns(nr(is,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[dn.content],()=>{if(!ka())throw vn})}function Fa(e){Ns(nr(is,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[dn.content],()=>{if(!ka())throw vn})}function ka(){return!(!Qr(lr)||!lr.supports.pages)&&!!lr.supports.pages.appButton}function Ma(){Ss()}function xa(){return ss(nr(is,"pages.backStack.navigateBack"))}function Na(e){Ua(nr(is,"pages.backStack.registerBackButtonHandler"),e,()=>{if(!lo(e)&&!Da())throw vn})}function Ua(e,t,n){!lo(t)&&Qr(lr),n&&n(),bs(t),!lo(t)&&Mc(e,"registerHandler",["backButton"])}function Da(){return!(!Qr(lr)||!lr.supports.pages)&&!!lr.supports.pages.backStack}function La(e){return new Promise(t=>{if(Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.task,dn.stage,dn.meetingStage),!_a())throw vn;t(Ac(nr(is,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))})}function Ha(){return new Promise(e=>{if(Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.task,dn.stage,dn.meetingStage),!_a())throw vn;e(Ac(nr(is,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))})}function _a(){return!(!Qr(lr)||!lr.supports.pages)&&!!lr.supports.pages.currentApp}function Va(){if(Qr(lr,dn.content),!ja())throw vn;Mc(nr(is,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Ba(){if(Qr(lr,dn.content),!ja())throw vn;Mc(nr(is,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function ja(){return!(!Qr(lr)||!lr.supports.pages)&&!!lr.supports.pages.fullTrust}function Wa(e){return cs(nr(is,"pages.tabs.navigateToTab"),e)}function za(e){return ls(nr(is,"pages.tabs.getTabInstances"),e)}function qa(e){return ds(nr(is,"pages.tabs.getMruTabInstances"),e)}function $a(){return!(!Qr(lr)||!lr.supports.pages)&&!!lr.supports.pages.tabs}var Ga,Ja;function Ka(e){const t=nr(is,"pages.returnFocus");if(Qr(lr),!os())throw vn;if(void 0===e&&Mc(t,"returnFocus",[!1]),"boolean"==typeof e)Mc(t,"returnFocus",[e]);else switch(e){case Ja.PreviousLandmark:case Ja.GoToActivityFeed:Mc(t,"returnFocus",[!1,e]);break;case Ja.NextLandmark:Mc(t,"returnFocus",[!0,e])}}function Qa(e){Ns(nr(is,"pages.registerFocusEnterHandler"),"focusEnter",e,[],()=>{if(!os())throw vn})}function Za(e){ps(nr(is,"pages.setCurrentFrame"),e)}function Xa(e,t,n){ba(),ia(nr(is,"pages.initializeWithFrameContext"),n).then(()=>t&&t()),Za(e)}function Ya(){return hs(nr(is,"pages.getConfig."))}function es(e){return as(nr(is,"pages.navigateCrossDomain"),e)}function ts(e){return new Promise(t=>{if(Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.task,dn.stage,dn.meetingStage),!os())throw vn;const n=nr(is,"pages.navigateToApp");if(lr.isLegacyTeams){t(Sc(n,"executeDeepLink",Fn(vs(e)?e:ws(e))))}else{t(Sc(n,"pages.navigateToApp",vs(e)?Cs(e):e))}})}function ns(e){return fs(nr(is,"pages.shareDeepLink"),e)}function rs(e){Ns(nr(is,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],()=>{if(!lo(e)&&!os())throw vn})}function os(){return!(!Qr(lr)||!lr.supports.pages)}ba(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Ga||(Ga={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Ja||(Ja={}));const is="v2";function as(e,t){return new Promise(n=>{if(Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.remove,dn.task,dn.stage,dn.meetingStage),!os())throw vn;n(Ec(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))})}function ss(e){return new Promise(t=>{if(Qr(lr),!Da())throw vn;t(Ec(e,"navigateBack","Back navigation is not supported in the current client or context."))})}function cs(e,t){return new Promise(n=>{if(Qr(lr),!$a())throw vn;n(Ec(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))})}function us(e,t){if(Qr(lr),!os())throw vn;Mc(e,"returnFocus",[t])}function ls(e,t){return new Promise(n=>{if(Qr(lr),!$a())throw vn;n(bc(e,"getTabInstances",t))})}function ds(e,t){return new Promise(n=>{if(Qr(lr),!$a())throw vn;n(bc(e,"getMruTabInstances",t))})}function fs(e,t){if(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),!os())throw vn;Mc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ps(e,t){if(Qr(lr,dn.content),!os())throw vn;Mc(e,"setFrameContext",[t])}function gs(e,t){if(Qr(lr,dn.settings,dn.remove),!Yi())throw vn;Mc(e,"settings.setValidityState",[t])}function hs(e){return new Promise(t=>{if(Qr(lr,dn.content,dn.settings,dn.remove,dn.sidePanel),!os())throw vn;t(bc(e,"settings.getSettings"))})}function ms(e,t){return new Promise(n=>{if(Qr(lr,dn.content,dn.settings,dn.sidePanel),!Yi())throw vn;n(Sc(e,"settings.setSettings",t))})}function vs(e){return e.appId instanceof uo}function ws(e){return Object.assign(Object.assign({},e),{appId:new uo(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function Cs(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let ys;function bs(e){ys=e}function Ss(){ks(nr(is,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Es,!1)}function Es(){ys&&ys()||(Xs()?ic("backButtonPress",[]):xa())}var As=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Is=tr("handlers");class Ps{static initializeHandlers(){Ps.handlers.themeChange=Ls,Ps.handlers.contextChange=Hs,Ps.handlers.load=js,Ps.handlers.beforeUnload=qs,Ss()}static uninitializeHandlers(){Ps.handlers={},Ps.themeChangeHandler=null,Ps.beforeUnloadHandler=null,Ps.beforeSuspendOrTerminateHandler=null,Ps.resumeHandler=null,Ps.contextChangeHandler=null}}function Ts(){Ps.initializeHandlers()}function Os(){Ps.uninitializeHandlers()}Ps.handlers={},Ps.themeChangeHandler=null,Ps.loadHandler=null,Ps.beforeUnloadHandler=null,Ps.beforeSuspendOrTerminateHandler=null,Ps.resumeHandler=null,Ps.hostToAppPerformanceMetricsHandler=null,Ps.contextChangeHandler=null;const Rs=Is.extend("callHandler");function Fs(e,t){const n=Ps.handlers[e];if(n){Rs("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Xs()?(ic(e,t),[!1,void 0]):(Rs("Handler for action message %s not found.",e),[!1,void 0])}function ks(e,t,n,r=!0,o=[]){n?(Ps.handlers[t]=n,r&&Mc(e,"registerHandler",[t,...o])):delete Ps.handlers[t]}function Ms(e){delete Ps.handlers[e]}function xs(e){return null!=Ps.handlers[e]}function Ns(e,t,n,r,o){n&&Qr(lr,...r),o&&o(),ks(e,t,n)}function Us(e,t){Ps.themeChangeHandler=t,!lo(t)&&Mc(e,"registerHandler",["themeChange"])}function Ds(e,t){Ps.contextChangeHandler=t,!lo(t)&&Mc(e,"registerHandler",["contextChange"])}function Ls(e){Ps.themeChangeHandler&&Ps.themeChangeHandler(e),Xs()&&ic("themeChange",[e])}function Hs(e){Ps.contextChangeHandler&&Ps.contextChangeHandler(e),Xs()&&ic("contextChange",[e])}function _s(e){Ps.hostToAppPerformanceMetricsHandler=e}function Vs(e){Ps.hostToAppPerformanceMetricsHandler&&Ps.hostToAppPerformanceMetricsHandler(e)}function Bs(e,t){Ps.loadHandler=t,!lo(t)&&Mc(e,"registerHandler",["load"])}function js(e){const t=Ws(e);Ps.resumeHandler?(Ps.resumeHandler(t),Xs()&&ic("load",[t])):Ps.loadHandler&&(Ps.loadHandler(e),Xs()&&ic("load",[e]))}function Ws(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function zs(e,t){Ps.beforeUnloadHandler=t,!lo(t)&&Mc(e,"registerHandler",["beforeUnload"])}function qs(){return As(this,void 0,void 0,function*(){const e=()=>{Mc(nr("v2","handleBeforeUnload"),"readyToUnload",[])};Ps.beforeSuspendOrTerminateHandler?(yield Ps.beforeSuspendOrTerminateHandler(),Xs()?ic("beforeUnload"):e()):Ps.beforeUnloadHandler&&Ps.beforeUnloadHandler(e)||(Xs()?ic("beforeUnload"):e())})}function $s(e){Ps.beforeSuspendOrTerminateHandler=e,!lo(e)&&Mc(nr("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Gs(e){Ps.resumeHandler=e,!lo(e)&&Mc(nr("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Js=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Ks=tr("childProxyingCommunication");class Qs{}function Zs(){Qs.window=null,Qs.origin=null,Qs.messageQueue=[]}function Xs(){return!!Or()&&!!Qs.window}function Ys(e,t){return!!Or()&&(Qs.window&&!Qs.window.closed&&e!==Qs.window||(Qs.window=e,Qs.origin=t),Qs.window&&Qs.window.closed?(Qs.window=null,Qs.origin=null,!1):Qs.window===e)}function ec(e,t,n,r){return Js(this,void 0,void 0,function*(){Qs.window===t&&(Vr(Qs.window,Qs.origin,Qs.messageQueue,"child"),nc(e,n,r))})}Qs.messageQueue=[];const tc=Ks.extend("handleIncomingMessageFromChild");function nc(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Ur(e.data),[o,i]=Fs(r.func,r.args);if(o&&void 0!==i)return tc("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Hr(r),r.func),void oc(r.id,r.uuid,Array.isArray(i)?i:[i]);tc("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Hr(r),r.func),rc(r,t,n)}function rc(e,t,n){const r=t(nr("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Qs.origin;n(r.uuid,(...t)=>{if(!Qs.window)return;if(!Fr().disableEnforceOriginMatchForChildResponses&&o!==Qs.origin)return void tc("Origin of child window has changed, not sending response back to child window");const n=t.pop();tc("Message from parent being relayed to child, id: %s",Hr(e)),oc(e.id,e.uuid,t,n)})}function oc(e,t,n,r){const o=Qs.window,i=ac(e,t,n,r),a=Lr(i),s=Qs.origin;o&&s&&(tc("Sending message %s to %s via postMessage, args = %o",Hr(a),"child",a.args),o.postMessage(a,s))}function ic(e,t){const n=Qs.window,r=sc(e,t),o=Qs.origin;n&&o?n.postMessage(r,o):Qs.messageQueue.push(r)}function ac(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function sc(e,t){return{func:e,args:t||[]}}class cc{static storeCallbackInformation(e,t){cc.callbackInformation.set(e,t)}static clearMessages(){cc.callbackInformation.clear()}static deleteMessageInformation(e){cc.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Vs({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=cc.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Vs({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),cc.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}cc.callbackInformation=new Map;const uc=tr("nestedAppAuthUtils"),lc=uc.extend("tryPolyfillWithNestedAppAuthBridge"),dc="v2";function fc(e,t,n){var r;const o=lc;if(Qn.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=gc(a,n);s&&(a.nestedAppAuthBridge=s)}const pc=uc.extend("createNestedAppAuthBridge");function gc(e,t){const n=pc;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=nr(dc,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var hc=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 mc=tr("communication");class vc{}class wc{}function Cc(e,t){if(wc.messageListener=e=>Vc(e),vc.currentWindow=vc.currentWindow||Un(),vc.parentWindow=vc.currentWindow.parent!==vc.currentWindow.self?vc.currentWindow.parent:vc.currentWindow.opener,vc.topWindow=vc.currentWindow.top,(vc.parentWindow||e)&&vc.currentWindow.addEventListener("message",wc.messageListener,!1),!vc.parentWindow){const e=vc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Qn.isFramelessWindow=!0,e.onNativeMessage=Qc}try{return vc.parentOrigin="*",Ic(t,"initialize",[Ir,ar,e]).then(([e,t,n,r])=>(fc(r,vc.currentWindow,{onMessage:jc,sendPostMessage:Nc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r}))}finally{vc.parentOrigin=null}}function yc(){vc.currentWindow&&vc.currentWindow.removeEventListener("message",wc.messageListener,!1),vc.currentWindow=null,vc.parentWindow=null,vc.parentOrigin=null,wc.parentMessageQueue=[],wc.nextMessageId=0,wc.callbacks.clear(),wc.promiseCallbacks.clear(),wc.portCallbacks.clear(),wc.legacyMessageIdsToUuidMap={},cc.clearMessages(),Zs()}function bc(e,t,...n){return Ic(e,t,n).then(([e])=>e)}function Sc(e,t,...n){return Ic(e,t,n).then(([e,t])=>{if(!e)throw new Error(t)})}function Ec(e,t,n,...r){return Ic(e,t,r).then(([e,t])=>{if(!e)throw new Error(t||n)})}function Ac(e,t,...n){return Ic(e,t,n).then(([e,t])=>{if(e)throw e;return t})}function Ic(e,t,n=void 0){if(!rr(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(kc(Hc(e,t,n).uuid))})}function Pc(e){return e.map(e=>Ar(e)?e.serialize():e)}function Tc(e,t,n,r,o){var i;return hc(this,void 0,void 0,function*(){const a=Pc(t),[s]=yield Ic(r,e,a);if(o&&o(s)||!o&&Ge(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(`${_e.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)})}function Oc(e,t,n,r){var o;return hc(this,void 0,void 0,function*(){const i=Pc(t),[a]=yield Ic(n,e,i);if(r&&r(a)||!r&&Ge(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${_e.INTERNAL_ERROR}, message: Invalid response from host`)})}function Rc(e,t,n=void 0){if(!rr(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 Fc(Hc(e,t,n).uuid)}function Fc(e){return new Promise((t,n)=>{wc.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 kc(e){return new Promise(t=>{wc.promiseCallbacks.set(e,t)})}function Mc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!rr(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=Hc(e,t,o);r&&wc.callbacks.set(i.uuid,r)}wc.parentMessageQueue=[],wc.topMessageQueue=[],wc.nextMessageId=0,wc.callbacks=new Map,wc.promiseCallbacks=new Map,wc.portCallbacks=new Map,wc.legacyMessageIdsToUuidMap={};const xc=mc.extend("sendNestedAuthRequestToTopWindow");function Nc(e,t){const n=xc,r=vc.topWindow,o=ou(e,t);return n("Message %s information: %o",Hr(o),{actionName:o.func}),Dc(r,o)}const Uc=mc.extend("sendRequestToTargetWindowHelper");function Dc(e,t){const n=Uc,r=tu(e),o=Nr(t);if(Qn.isFramelessWindow)vc.currentWindow&&vc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Hr(o),r),vc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=eu(e);e&&i?(n("Sending message %s to %s via postMessage",Hr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Hr(o),r),Yc(e).push(t))}return t}const Lc=mc.extend("sendMessageToParentHelper");function Hc(e,t,n,r,o){const i=Lc,a=vc.parentWindow,s=ru(e,t,n,r,o);return cc.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Hr(s),{actionName:t,args:n}),Dc(a,s)}const _c=mc.extend("processIncomingMessage");function Vc(e){return hc(this,void 0,void 0,function*(){if(!e||!e.data||"object"!=typeof e.data)return void _c("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 zc(t,n).then(r=>{r?(qc(t,n),t!==vc.parentWindow?Ys(t,n)&&ec(e,t,Hc,(e,t)=>wc.callbacks.set(e,t)):Qc(e)):_c("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 Bc=mc.extend("processAuthBridgeMessage");function jc(e,t){var n,r;const o=Bc;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?zc(c,u).then(e=>{e?(vc.topWindow&&!vc.topWindow.closed&&c!==vc.topWindow||(vc.topWindow=c,vc.topOrigin=u),vc.topWindow&&vc.topWindow.closed&&(vc.topWindow=null,vc.topOrigin=null),Vr(vc.topWindow,vc.topOrigin,wc.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")}).catch(e=>{o("Unexpected error verifying message origin: %o",e)}):o("Message being ignored by app because it is coming for a target that is null")}const Wc=mc.extend("verifyIncomingMessageOrigin");function zc(e,t){return hc(this,void 0,void 0,function*(){if(vc.currentWindow&&e===vc.currentWindow)return Wc("Should not process message because it is coming from the current window"),!1;if(vc.currentWindow&&vc.currentWindow.location&&t&&t===vc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Wc("Message has an invalid origin of %s",t),!1}const n=yield Pa(e);return n||Wc("Message has an invalid origin of %s",t),n}})}function qc(e,t){Qn.isFramelessWindow||vc.parentWindow&&!vc.parentWindow.closed&&e!==vc.parentWindow||(vc.parentWindow=e,vc.parentOrigin=t),vc.parentWindow&&vc.parentWindow.closed&&(vc.parentWindow=null,vc.parentOrigin=null),Vr(vc.parentWindow,vc.parentOrigin,wc.parentMessageQueue,"parent")}const $c=mc.extend("handleIncomingMessageFromParent");function Gc(e){const t=$c;if(!e.uuid)return wc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Jc(wc.callbacks,t);if(n)return n;const r=Jc(wc.promiseCallbacks,t);if(r)return r;const o=Jc(wc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Hr(e))}function Jc(e,t){if(t){const n=[...e].find(([e,n])=>e.toString()===t.toString());if(n)return n[0]}}function Kc(e,t){const n=Jc(t,e.uuid);n&&t.delete(n),e.uuid?wc.legacyMessageIdsToUuidMap={}:delete wc.legacyMessageIdsToUuidMap[e.id]}function Qc(e){const t=$c,n=qn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Dr(r),i=Gc(o);if(i){const r=wc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),cc.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]),Zc(e)||(t("Removing registered callback for message %s",i.toString()),Kc(o,wc.callbacks)));const a=wc.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()),Kc(o,wc.promiseCallbacks));const s=wc.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()),Kc(o,wc.portCallbacks)}o.uuid&&(wc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;cc.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Hr(r),r.func),Fs(r.func,r.args)}else t("Received an unknown message: %O",e)}function Zc(e){return!0===e.data.isPartialResponse}function Xc(){return vc.topWindow!==vc.parentWindow}function Yc(e){return e===vc.topWindow&&Xc()?wc.topMessageQueue:e===vc.parentWindow?wc.parentMessageQueue:[]}function eu(e){return e===vc.topWindow&&Xc()?vc.topOrigin:e===vc.parentWindow?vc.parentOrigin:null}function tu(e){return e===vc.topWindow&&Xc()?"top":e===vc.parentWindow?"parent":null}function nu(e,t){let n;n=vc.currentWindow.setInterval(()=>{0===Yc(e).length&&(clearInterval(n),t())},100)}function ru(e,t,n,r,o){const i=wc.nextMessageId++,a=new Jn;wc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Qn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:qn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function ou(e,t){const n=wc.nextMessageId++,r=new Jn;return wc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:qn(),apiVersionTag:t,args:[],data:e}}const iu="v1";function au(e){if(!lo(e)&&Qr(lr),!lo(e)&&!su())throw vn;e?ks(nr(iu,"log.request"),"log.request",()=>{const t=e();Mc(nr(iu,"log.receive"),"log.receive",[t])}):Ms("log.request")}function su(){return!(!Qr(lr)||!lr.supports.logs)}var cu,uu,lu;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(cu||(cu={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(uu||(uu={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(lu||(lu={}));const du="v1";function fu(e,t){Qr(lr),Mc(nr(du,"uploadCustomApp"),"uploadCustomApp",[e],t||Sn())}function pu(e,t,n){Qr(lr),Mc(nr(du,"sendCustomMessage"),e,t,n)}function gu(e,t){if(Qr(lr),!Xs())throw new Error("The child window has not yet been initialized or is not present");ic(e,t)}function hu(e,t){Qr(lr),ks(nr(du,"registerCustomHandler"),e,(...e)=>t.apply(this,e))}function mu(e,t){Qr(lr),ks(nr(du,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function vu(e){Qr(lr,dn.content,dn.sidePanel,dn.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];Mc(nr(du,"openFilePreview"),"openFilePreview",t)}const wu="v1";function Cu(e){return new Promise(t=>{if(Qr(lr,dn.content),!Su())throw vn;const n=Sc(nr(wu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&ks(nr(wu,"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&&ks(nr(wu,"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 yu(){if(Qr(lr,dn.content),!Su())throw vn;Mc(nr(wu,"conversations.closeConversation"),"conversations.closeConversation"),Ms("startConversation"),Ms("closeConversation")}function bu(){return new Promise(e=>{if(Qr(lr),!Su())throw vn;e(bc(nr(wu,"conversations.getChatMember"),"getChatMembers"))})}function Su(){return!(!Qr(lr)||!lr.supports.conversations)}var Eu=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 Au="v2",Iu=tr("copilot");function Pu(){var e;return Qr(lr)&&!!(null===(e=lr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function Tu(e,t){var n;return void 0===t&&(t=null!==(n=qn())&&void 0!==n?n:Date.now()),Eu(this,void 0,void 0,function*(){return Qr(lr),Iu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),Oc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],nr(Au,"copilot.customTelemetry.sendCustomTelemetryData"))})}var Ou=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Ru="v2",Fu=tr("copilot");function ku(){var e,t;return Qr(lr)&&(!!(null===(e=lr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=lr.supports.copilot)||void 0===t?void 0:t.eligibility))}function Mu(e){var t,n,r;return Ou(this,void 0,void 0,function*(){if(Qr(lr),!ku())throw new Error(`Error code: ${vn.errorCode}, message: Not supported on platform`);if((null===(t=lr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return Fu("Eligibility information is already available on runtime."),lr.hostVersionsInfo.appEligibilityInformation;Fu("Eligibility information is not available on runtime. Requesting from host.");const o=yield bc(nr(Ru,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(Ge(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(!xu(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=We.NotAdult),o})}function xu(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 Nu,Uu,Du,Lu,Hu,_u,Vu,Bu,ju;!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"}(Nu||(Nu={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(Uu||(Uu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(Du||(Du={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(Lu||(Lu={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(Hu||(Hu={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(_u||(_u={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Vu||(Vu={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Bu||(Bu={})),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"}(ju||(ju={}));class Wu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var zu=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const qu="v2";function $u(){var e;return Qr(lr)&&!!(null===(e=lr.supports.copilot)||void 0===e?void 0:e.sidePanel)}function Gu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(ju).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||Ge(e)}function Ju(e){return zu(this,void 0,void 0,function*(){Qr(lr);return Tc("copilot.sidePanel.getContent",e?[new el(e)]:[],new Xu,nr(qu,"copilot.sidePanel.getContent"),Gu)})}function Ku(e){return zu(this,void 0,void 0,function*(){Qr(lr);return Tc("copilot.sidePanel.preCheckUserConsent",e?[new tl(e)]:[],new Yu,nr(qu,"copilot.sidePanel.preCheckUserConsent"),Gu)})}function Qu(e){Ns(nr(qu,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[dn.content],()=>{if(!$u())throw Zu})}const Zu=new Wu(ju.NotSupportedOnPlatform,"This API is not supported on the current platform.");class Xu extends ea{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Yu extends ea{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class el{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class tl{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}var nl=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 rl="v2";function ol(){var e;return Qr(lr)&&!!(null===(e=lr.supports.copilot)||void 0===e?void 0:e.view)}function il(){return nl(this,void 0,void 0,function*(){Qr(lr),yield Tc("copilot.view.closeSidePanel",[],new al,nr(rl,"copilot.view.closeSidePanel"))})}class al extends ea{validate(e){return!0}deserialize(e){return e}}const sl="v2";class cl{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function ul(e){const t=e;return t.responseType===fl.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const ll="Action.Execute";var dl,fl,pl,gl;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(dl||(dl={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(fl||(fl={}));class hl extends ea{validate(e){return ul(e)}deserialize(e){return e}}function ml(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(pl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function vl(e){e.requestType===dl.ActionExecuteInvokeRequest?wl(e):e.requestType===dl.QueryMessageExtensionRequest&&Cl(e)}function wl(e){if(e.type!==ll){throw{errorCode:pl.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${ll}"`}}if(!$n(e.data)){throw{errorCode:pl.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function Cl(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 yl(e,t,n){if(Qr(lr,dn.content,dn.sidePanel),!Fl())throw vn;const r=new uo(e);return vl(n),Ic(nr(sl,"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 bl(e,t){if(Qr(lr,dn.content,dn.sidePanel),!Fl())throw vn;const n=new uo(e);return Ic(nr(sl,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then(([e,t])=>{if(!e)throw t})}function Sl(e,t,n){if(Qr(lr,dn.content,dn.sidePanel),!Fl())throw vn;const r=new uo(e);return vl(n),Ic(nr(sl,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then(([e,t])=>{if(e&&null!=t.responseType)return t;throw t})}function El(e,t,n){if(Qr(lr,dn.content,dn.sidePanel),!Fl())throw vn;return Ln(e,new Error("titleId is Invalid.")),Ln(t,new Error("oauthConfigId is Invalid.")),Ic(nr(sl,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then(([e,t])=>{if(!e)throw t})}function Al(e,t,n){if(Qr(lr,dn.content,dn.sidePanel),!Fl())throw vn;return Ln(e,new Error("titleId is Invalid.")),t&&Hn(t),Ic(nr(sl,"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"}(pl||(pl={}));class Il{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 Pl(e){if(Qr(lr,dn.content,dn.sidePanel),!Fl())throw vn;return Ln(e.connectorId,new Error("connectorId is Invalid.")),Ln(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Oc("externalAppAuthentication.authenticateWithConnector",[new Il(e)],nr(sl,"externalAppAuthentication.authenticateWithConnector"),ml)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(gl||(gl={}));class Tl extends ea{validate(e){return"string"==typeof e&&e in gl}deserialize(e){return e}}function Ol(e){if(Qr(lr,dn.content,dn.sidePanel),!Fl())throw vn;return Ln(e.connectorId,new Error("connectorId is Invalid.")),Ln(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),Tc("externalAppAuthentication.getUserAuthenticationStateForConnector",[new Il(e)],new Tl,nr(sl,"externalAppAuthentication.getUserAuthenticationStateForConnector"),ml)}function Rl(e){if(Qr(lr,dn.content,dn.sidePanel),!Fl())throw vn;return Ln(e.connectorId,new Error("connectorId is Invalid.")),Ln(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Oc("externalAppAuthentication.disconnectConnector",[new Il(e)],nr(sl,"externalAppAuthentication.disconnectConnector"),ml)}function Fl(){return!(!Qr(lr)||!lr.supports.externalAppAuthentication)}var kl=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Ml="v2";function xl(e,t,n){return kl(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!Ll())throw vn;return Hl(e,t),Oc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],nr(Ml,"externalAppAuthenticationForCEA.authenticateWithSSO"),ml)})}function Nl(e,t,n){return kl(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!Ll())throw vn;return Hl(e,t),Oc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],nr(Ml,"externalAppAuthenticationForCEA.authenticateWithOauth"),ml)})}function Ul(e,t,n,r){return kl(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!Ll())throw vn;return Hl(e,t),wl(r),Tc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new cl(r),n.url.href,n.width,n.height,n.isExternal],new hl,nr(Ml,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),ml)})}function Dl(e,t,n,r){return kl(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!Ll())throw vn;return Hl(e,t),wl(r),Tc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new cl(r),n.authId,n.connectionName,n.claims,n.silent],new hl,nr(Ml,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),ml)})}function Ll(){return!(!Qr(lr)||!lr.supports.externalAppAuthenticationForCEA)}function Hl(e,t){Ln(t,new Error("conversation id is not valid.")),so(e)}const _l="v2";var Vl,Bl;function jl(e,t){if(Qr(lr,dn.content,dn.sidePanel),!zl())throw vn;const n=new uo(e);return Ic(nr(_l,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then(([e,t])=>{if(!e)throw t})}function Wl(e,t,n){if(Qr(lr,dn.content,dn.sidePanel),!zl())throw vn;const r=new uo(e);return Ic(nr(_l,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then(([e,t])=>{if(e)throw e;return t})}function zl(){return!(!Qr(lr)||!lr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Vl||(Vl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Bl||(Bl={}));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 $l="v2";function Gl(e,t,n){return ql(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!Kl())throw vn;Hl(e,t);const[r,o]=yield Ic(nr($l,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o})}function Jl(e,t,n){return ql(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!Kl())throw vn;Hl(e,t);const r=yield bc(nr($l,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r})}function Kl(){return!(!Qr(lr)||!lr.supports.externalAppCardActionsForCEA)}var Ql;function Zl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Ql).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Ql||(Ql={}));var Xl=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Yl="v2";function ed(e,t,n){return Xl(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!td())throw vn;return nd(e,n),Oc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new rd(t),n],nr(Yl,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Zl)})}function td(){return!(!Qr(lr)||!lr.supports.externalAppCardActionsForDA)}function nd(e,t){so(e),Kn(t)}class rd{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var od=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 id="v2";function ad(e,t,n){return od(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.sidePanel),!sd())throw vn;const r=new uo(e),[o,i]=yield Ic(nr(id,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i})}function sd(){return!(!Qr(lr)||!lr.supports.externalAppCommands)}const cd="v1";var ud,ld,dd,fd,pd,gd;function hd(e,t){if(Qr(lr,dn.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");Mc(nr(cd,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function md(e,t){if(Qr(lr,dn.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");Mc(nr(cd,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function vd(e,t,n){if(Qr(lr,dn.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");Mc(nr(cd,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function wd(e,t,n){if(Qr(lr,dn.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");Mc(nr(cd,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Cd(e,t,n){if(Qr(lr,dn.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");Mc(nr(cd,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function yd(e=!1,t){if(Qr(lr,dn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Mc(nr(cd,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function bd(e,t,n,r,o=!1,i){if(Qr(lr,dn.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");Mc(nr(cd,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function Sd(e){if(Qr(lr,dn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Mc(nr(cd,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function Ed(e=void 0,t){if(Qr(lr,dn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Mc(nr(cd,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function Ad(e){if(Qr(lr,dn.content),!e)throw xd(_e.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Mc(nr(cd,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function Id(e,t){if(Qr(lr,dn.content),!t)throw xd(_e.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw xd(_e.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Mc(nr(cd,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Pd(e,t){if(Qr(lr,dn.content),!t)throw xd(_e.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw xd(_e.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Mc(nr(cd,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Td(e,t){if(Qr(lr,dn.content),!t)throw xd(_e.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw xd(_e.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Mc(nr(cd,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Od(e,t){if(Qr(lr,dn.content),!t)throw xd(_e.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw xd(_e.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Mc(nr(cd,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Rd(e,t){if(Qr(lr,dn.content),!t)throw xd(_e.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw xd(_e.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Mc(nr(cd,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Fd(e,t){if(Qr(lr,dn.content),!t)throw xd(_e.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw xd(_e.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw xd(_e.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Mc(nr(cd,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function kd(e){if(Qr(lr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");ks(nr(cd,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Md(e){if(Qr(lr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");ks(nr(cd,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function xd(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"}(ud||(ud={})),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"}(ld||(ld={})),function(e){e.ClassMaterials="classMaterials"}(dd||(dd={})),function(e){e.Readonly="readonly"}(fd||(fd={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(pd||(pd={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(gd||(gd={}));const Nd="v1";function Ud(){return new Promise(e=>{if(Qr(lr),!_d())throw vn;e(Ac(nr(Nd,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))})}function Dd(e){return new Promise(t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Qr(lr),!_d())throw vn;t(Ac(nr(Nd,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))})}function Ld(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Qr(lr),!_d())throw vn;ks(nr(Nd,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",t=>{Qr(lr),e(t)})}function Hd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Qr(lr),!_d())throw vn;ks(nr(Nd,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",t=>{Qr(lr),e(t)})}function _d(){return!(!Qr(lr)||!lr.supports.meetingRoom)}function Vd(){return!(!Qr(lr)||!lr.supports.messageChannels)}const Bd="1.0.1",jd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Qd("Invalid message format, ignoring. Message: %o",e);if(!Gd(e.source,e.origin))return void Qd("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Zd("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Qd("Invalid response format, ignoring. Message: %o",e);t(r)}};let Wd=null,zd=!1;function qd(e,t,n=!1){if(zd=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.`);Wd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Qd("Nested App Auth Bridge is already present");const o=$d(r);o&&(r.nestedAppAuthBridge=o)}function $d(e){const t=new WeakMap,{onMessage:n}=jd,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 Qd(`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=Jd(t);if(e===e.top||!Wd)return void Zd("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Wd)}}catch(e){return void Zd("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 Gd(e,t){if(t===Wd)try{return"https:"===new URL(t).protocol}catch(e){return Zd("Invalid message origin URL:",e),!1}return!1}function Jd(e){const t=Date.now();return{id:Kd(),uuid:an(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Kd(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Qd(...e){zd&&console.log(...e)}function Zd(...e){zd&&console.error(...e)}const Xd="v1";function Yd(e){if(Qr(lr,dn.content),!ef())throw vn;Mc(nr(Xd,"notifications.showNotification"),"notifications.showNotification",[e])}function ef(){return!(!Qr(lr)||!lr.supports.notifications)}const tf="v2";function nf(e){if(!af())throw new Error(_e.NOT_SUPPORTED_ON_PLATFORM.toString());if(lo(e))throw new Error(_e.INVALID_ARGUMENTS.toString());ks(nr(tf,"otherApp.install"),"otherApp.install",e)}function rf(){if(!af())throw new Error(_e.NOT_SUPPORTED_ON_PLATFORM.toString());Mc(nr(tf,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Ms("otherApp.install")}function of(e){if(!af())throw new Error(_e.NOT_SUPPORTED_ON_PLATFORM.toString());return Oc("otherApp.notifyInstallCompleted",[e.toString()],nr(tf,"otherApp.notifyInstallCompleted"))}function af(){return!(!Qr(lr)||!lr.supports.otherAppStateChange)}var sf=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 cf="v2";function uf(){return Qr(lr)&&!!lr.supports.plugins}function lf(e){return sf(this,void 0,void 0,function*(){if(Qr(lr),!e.func)throw new Error("func is required in PluginMessage.");return Oc("plugins.sendMessage",[new ff(e)],nr(cf,"plugins.sendMessage"))})}function df(e){Ns(nr(cf,"plugins.receiveMessage"),"plugins.receiveMessage",(...t)=>{e(pf(t))},Object.values(dn),()=>{if(!uf())throw new Error("Receiving plugin messages is not supported in the current host.")})}class ff{constructor(e){this.message=e}serialize(){return this.message}}function pf(e){if(1===e.length&&gf(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 gf(e){if(!e||"object"!=typeof e)return!1;return"string"==typeof e.func}const hf="v1";var mf,vf,wf;function Cf(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Qr(lr,dn.sidePanel),!Tf())throw vn;Mc(nr(hf,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function yf(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(Qr(lr,dn.sidePanel),!Tf())throw vn;Mc(nr(hf,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function bf(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(Qr(lr,dn.sidePanel),!Tf())throw vn;Mc(nr(hf,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function Sf(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Qr(lr,dn.sidePanel),!Tf())throw vn;Mc(nr(hf,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Ef(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Qr(lr,dn.sidePanel),!Tf())throw vn;ks(nr(hf,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Af(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Qr(lr,dn.sidePanel),!Tf())throw vn;ks(nr(hf,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function If(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Qr(lr,dn.sidePanel),!Tf())throw vn;ks(nr(hf,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Pf(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Qr(lr,dn.sidePanel),!Tf())throw vn;ks(nr(hf,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Tf(){return!(!Qr(lr)||!lr.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"}(mf||(mf={})),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"}(vf||(vf={})),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"}(wf||(wf={}));const Of="v1";function Rf(e,t,n,r){if(Qr(lr,dn.content),!Ff())throw vn;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");Mc(nr(Of,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Ff(){return!(!Qr(lr)||!lr.supports.appEntity)}const kf="v1";function Mf(e){return new Promise(t=>{if(Qr(lr),!xf())throw vn;if((Qn.hostClientType===un.android||Qn.hostClientType===un.teamsRoomsAndroid||Qn.hostClientType===un.teamsPhones||Qn.hostClientType===un.teamsDisplays)&&!Zr(Ye)){const e={errorCode:_e.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(bc(nr(kf,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))})}function xf(){return!(!Qr(lr)||!lr.supports.teams)&&(!!lr.supports.teams.fullTrust&&!!lr.supports.teams.fullTrust.joinedTeams)}var Nf=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 Uf="v1";function Df(e){return Nf(this,void 0,void 0,function*(){if(Qr(lr),!Lf())throw vn;return Tc("getConfigSetting",[e],new ta,nr(Uf,"teams.fullTrust.getConfigSetting"))})}function Lf(){return!(!Qr(lr)||!lr.supports.teams)&&!!lr.supports.teams.fullTrust}const Hf="v1";var _f;function Vf(e,t){if(Qr(lr,dn.content),!jf())throw vn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Mc(nr(Hf,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Bf(e,t){if(Qr(lr),!jf())throw vn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Mc(nr(Hf,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function jf(){return!(!Qr(lr)||!lr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(_f||(_f={}));class Wf{static setTimeout(e,t){const n=performance.now(),r=An();return Wf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Wf.setTimeoutCallbacks[e]}static setInterval(e,t){Wf.setTimeout(function n(){e(),Wf.setTimeout(n,t)},t)}static tick(){const e=performance.now(),t=[];for(const n in Wf.setTimeoutCallbacks){const r=Wf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Wf.setTimeoutCallbacks[e].callback(),delete Wf.setTimeoutCallbacks[e]}}}Wf.setTimeoutCallbacks={};class zf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Wf.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&&Wf.clearTimeout(this.timeoutId),this.timeoutId=Wf.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(zf.maxSessionTimeoutInMs,2*t.timeoutInMs):zf.initialSessionTimeoutInMs}}zf.initialSessionTimeoutInMs=1e3,zf.maxSessionTimeoutInMs=3e4;const qf="v2";class $f{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new zf($f.distributionBinSize,e=>this.reportPerformanceEvent(nr(qf,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e]))}startMonitorSlowFrameProcessing(){Wf.setInterval(()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(nr(qf,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0},$f.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){Wf.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(nr(qf,"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(nr(qf,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}$f.distributionBinSize=1e3,$f.calculateFPSInterval=1e3;var Gf=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())})},Jf=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 Kf="v2",Qf=Dn()?void 0:new $f(Mc);var Zf,Xf,Yf;function ep(e){if(Qr(lr,dn.sidePanel),!ip())throw vn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(ks(nr(Kf,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==Qf?void 0:Qf.setFrameProcessTimeLimit(e.timeLimit),!1),lp())ap(e.videoFrameHandler,e.config);else{if(!fp())throw vn;cp(e.videoBufferHandler,e.config)}null==Qf||Qf.startMonitorSlowFrameProcessing()}function tp(e,t){if(Qr(lr,dn.sidePanel),!ip())throw vn;Mc(nr(Kf,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function np(e){if(Qr(lr,dn.sidePanel),!ip())throw vn;ks(nr(Kf,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Ap(e,Qf),!1),Mc(nr(Kf,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function rp(e){Mc(nr(Kf,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function op(e){Mc(nr(Kf,"videoEffects.notifyError"),"video.notifyError",[e])}function ip(){return Qr(lr)&&!!lr.supports.video&&(!!lr.supports.video.mediaStream||!!lr.supports.video.sharedFrame)}function ap(e,t){if(Qr(lr,dn.sidePanel),!ip()||!lp())throw vn;ks(nr(Kf,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>Gf(this,void 0,void 0,function*(){const{streamId:n}=t,r=sp(e,Qf);yield hp(n,r,op,Qf)}),!1),Mc(nr(Kf,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function sp(e,t){return n=>Gf(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 cp(e,t){if(Qr(lr,dn.sidePanel),!ip()||!fp())throw vn;ks(nr(Kf,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",t=>{if(t){const n=t.timestamp;null==Qf||Qf.reportStartFrameProcessing(t.width,t.height),e(up(t),()=>{null==Qf||Qf.reportFrameProcessed(),rp(n)},op)}},!1),Mc(nr(Kf,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function up(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Jf(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function lp(){var e;return Qr(lr,dn.sidePanel)&&dp()&&!!(null===(e=lr.supports.video)||void 0===e?void 0:e.mediaStream)}function dp(){var e,t,n,r;return!(!(null===(t=null===(e=Un().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Un().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function fp(){var e;return Qr(lr,dn.sidePanel)&&!!(null===(e=lr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Zf||(Zf={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Xf||(Xf={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Yf||(Yf={}));var pp=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const gp="v2";function hp(e,t,n,r){var o,i;return pp(this,void 0,void 0,function*(){const a=wp();!Dn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Cp(yield vp(e,n,r),new yp(n,t),a.writable)})}function mp(e,t,n,r){var o,i;return pp(this,void 0,void 0,function*(){const a=wp();!Dn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Cp(yield vp(e,n,r),new Ep(n,t),a.writable)})}function vp(e,t,n){return pp(this,void 0,void 0,function*(){if(Dn())throw vn;const r=Un().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 wp(){if(Dn())throw vn;const e=window.MediaStreamTrackGenerator;if(!e)throw vn;return new e({kind:"video"})}function Cp(e,t,n){new(0,Un().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class yp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>pp(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 bp{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 Sp{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 Ep{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>pp(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=>pp(this,void 0,void 0,function*(){if(Dn())throw vn;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 bp(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 Sp(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}}}),ks(nr(gp,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e})}}function Ap(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then(()=>{null==t||t.reportVideoEffectChanged(n||"",r),Mc(nr(gp,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])}).catch(e=>{const t=e in Yf?e:Yf.InitializationFailure;Mc(nr(gp,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])})}}var Ip=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 Pp="v2",Tp=2e3,Op=Dn()?void 0:new $f(Mc);var Rp;function Fp(e){var t,n;if(!Lp())throw vn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Qr(lr,dn.sidePanel)){if(ks(nr(Pp,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==Op?void 0:Op.setFrameProcessTimeLimit(e),!1),null===(t=lr.supports.video)||void 0===t?void 0:t.mediaStream)ks(nr(Pp,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>Ip(this,void 0,void 0,function*(){const{streamId:n,metadataInTexture:r}=t,o=Op?Mp(e.videoFrameHandler,Op):e.videoFrameHandler;r?yield mp(n,o,_p,Op):yield hp(n,o,_p,Op)}),!1),Mc(nr(Pp,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=lr.supports.video)||void 0===n?void 0:n.sharedFrame))throw vn;ks(nr(Pp,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",t=>{if(t){null==Op||Op.reportStartFrameProcessing(t.width,t.height);const n=kp(),r=t.timestamp;e.videoBufferHandler(xp(t),()=>{n(),null==Op||Op.reportFrameProcessed(),Hp(r)},_p)}},!1),Mc(nr(Pp,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Op||Op.startMonitorSlowFrameProcessing()}}function kp(){const e=setTimeout(()=>{_p(`Frame not processed in ${Tp}ms`,Rp.Warn)},Tp);return function(){clearTimeout(e)}}function Mp(e,t){return n=>Ip(this,void 0,void 0,function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=kp(),i=yield e(n);return o(),t.reportFrameProcessed(),i})}function xp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Np(e,t,n){if(Qr(lr,dn.sidePanel),!Lp())throw vn;Mc(nr(Pp,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Up(e){if(Qr(lr,dn.sidePanel),!Lp())throw vn;ks(nr(Pp,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Ap(e,Op),!1),Mc(nr(Pp,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Dp(e){if(Qr(lr,dn.sidePanel),!ip())throw vn;Mc(nr(Pp,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Lp(){return Qr(lr),ip()}function Hp(e){Mc(nr(Pp,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function _p(e,t=Rp.Warn){Mc(nr(Pp,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Vp(e){if(Qr(lr),!ip())throw vn;_p(e,Rp.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Rp||(Rp={}));const Bp="v2";class jp extends ea{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Wp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class zp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class qp extends ea{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class $p{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Gp extends ea{validate(e){const t=new qp;let n=!0;return e.allTabs&&e.allTabs.forEach(e=>{n||(n=t.validate(e))}),n}deserialize(e){return e}}function Jp(e,t){if(Qr(lr),!Yp())throw new Error(`Error code: ${_e.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(eg(e.threadId),t&&0===t.length)throw new Error(`Error code: ${_e.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Tc("hostEntity.tab.addAndConfigure",[new zp(e),t],new qp,nr(Bp,"hostEntity.tab.addAndConfigure"))}function Kp(e){if(Qr(lr),!Yp())throw new Error(`Error code: ${_e.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return eg(e.threadId),Tc("hostEntity.tab.getAll",[new zp(e)],new Gp,nr(Bp,"hostEntity.tab.getAll"))}function Qp(e,t){if(Qr(lr),!Yp())throw new Error(`Error code: ${_e.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return tg(e),eg(t.threadId),Tc("hostEntity.tab.reconfigure",[new Wp(e),new zp(t)],new jp,nr(Bp,"hostEntity.tab.reconfigure"))}function Zp(e,t){if(Qr(lr),!Yp())throw new Error(`Error code: ${_e.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return tg(e),eg(t.threadId),Tc("hostEntity.tab.rename",[new Wp(e),new zp(t)],new jp,nr(Bp,"hostEntity.tab.rename"))}function Xp(e,t){if(Qr(lr),!Yp())throw new Error(`Error code: ${_e.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return eg(t.threadId),tg(e),Tc("hostEntity.tab.remove",[new $p(e),new zp(t)],new ta,nr(Bp,"hostEntity.tab.remove"))}function Yp(){var e;return!!(Qr(lr)&&rg()&&(null===(e=lr.supports.hostEntity)||void 0===e?void 0:e.tab))}function eg(e){if(!e||0==e.length)throw new Error(`Error code: ${_e.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function tg(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${_e.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var ng;function rg(){return!(!Qr(lr)||!lr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(ng||(ng={}));var og=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 ig="v2",ag="Invalid store dialog size",sg="No App Id present, but AppId needed to open AppDetail store",cg="No Collection Id present, but CollectionId needed to open a store specific to a collection";function ug(e){return og(this,void 0,void 0,function*(){gg();const{size:t}=null!=e?e:{};return Oc("store.openFullStore",[hg(t)],nr(ig,"store.openFullStore"))})}function lg(e){return og(this,void 0,void 0,function*(){gg();const{size:t,appId:n}=e;if(!(n instanceof uo))throw new Error(sg);return Oc("store.openAppDetail",[hg(t),n],nr(ig,"store.openAppDetail"))})}function dg(e){return og(this,void 0,void 0,function*(){gg();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return Oc("store.openInContextStore",[hg(t),n,r,o,null==i?void 0:i.map(e=>e.toString())],nr(ig,"store.openInContextStore"))})}function fg(e){return og(this,void 0,void 0,function*(){gg();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(cg);return Oc("store.openSpecificStore",[hg(t),n],nr(ig,"store.openSpecificStore"))})}function pg(){return Qr(lr)&&!!lr.supports.store}function gg(){if(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),!pg())throw vn}function hg(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(ag);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(ag);return JSON.stringify(e)}var mg=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const vg="v1",wg=tr("widgetHosting");function Cg(){return Qr(lr)&&!!lr.supports.widgetHosting}function yg(e,t){return mg(this,void 0,void 0,function*(){return Kr(),wg("Calling tool with widgetId and input: ",{widgetId:e,input:t}),Tc("widgetHosting.callTool",[new kg(e,t)],new Rg,nr(vg,"widgetHosting.callTool"),Ge)})}function bg(e,t){return mg(this,void 0,void 0,function*(){return Kr(),wg("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:t.prompt}),Oc("widgetHosting.sendFollowUpMessage",[new Mg(e,t)],nr(vg,"widgetHosting.sendFollowUpMessage"))})}function Sg(e,t){return mg(this,void 0,void 0,function*(){return Kr(),wg("Requesting display mode with widgetId: ",{widgetId:e,mode:t.mode}),Oc("widgetHosting.requestDisplayMode",[new xg(e,t)],nr(vg,"widgetHosting.requestDisplayMode"))})}function Eg(e,t){return mg(this,void 0,void 0,function*(){return Kr(),wg("Requesting modal with widgetId and options: ",{widgetId:e,options:t}),Tc("widgetHosting.requestModal",[new Lg(e,t)],new Fg,nr(vg,"widgetHosting.requestModal"),Ge)})}function Ag(e,t){Kr(),wg("Notifying intrinsic height with widgetId: ",{widgetId:e,height:t}),Oc("widgetHosting.notifyIntrinsicHeight",[new Dg(e,t)],nr(vg,"widgetHosting.notifyIntrinsicHeight"))}function Ig(e,t,n){Kr(),wg("Content size changed with widgetId: ",{widgetId:e,width:t,height:n}),Oc("widgetHosting.contentSizeChanged",[new Hg(e,t,n)],nr(vg,"widgetHosting.contentSizeChanged"))}function Pg(e,t){return mg(this,void 0,void 0,function*(){return Kr(),wg("Setting widget state with widgetId: ",{widgetId:e,state:t}),Oc("widgetHosting.setWidgetState",[new Ug(e,t)],nr(vg,"widgetHosting.setWidgetState"))})}function Tg(e,t){Kr(),wg("Opening external URL with widgetId: ",{widgetId:e,href:t.href}),Oc("widgetHosting.openExternal",[new Ng(e,t)],nr(vg,"widgetHosting.openExternal"))}function Og(e){Ns(nr(vg,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",e,[],()=>{if(!Cg())throw new Error("Widget Hosting is not supported on this platform")})}class Rg extends ea{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Fg extends ea{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class kg{constructor(e,t){this.widgetId=e,this.toolInput=t}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}}class Mg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,prompt:this.args.prompt}}}class xg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,mode:this.args.mode}}}class Ng{constructor(e,t){this.widgetId=e,this.payload=t}serialize(){return{widgetId:this.widgetId,href:this.payload.href}}}class Ug{constructor(e,t){this.widgetId=e,this.state=t}serialize(){return{widgetId:this.widgetId,state:this.state}}}class Dg{constructor(e,t){this.widgetId=e,this.height=t}serialize(){return{widgetId:this.widgetId,height:this.height}}}class Lg{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 Hg{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 _g=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 Vg="v1",Bg="v2";let jg;function Wg(e){jg=e}function zg(e){const t=void 0!==e,n=t?e:jg;if(!n)throw new Error("No parameters are provided for authentication");Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.remove,dn.task,dn.stage,dn.meetingStage);return qg(n.successCallback||n.failureCallback?nr(Vg,"authentication.authenticate"):nr(Bg,"authentication.authenticate"),n).then(e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(jg=void 0)}}).catch(e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(jg=void 0)}})}function qg(e,t){return _g(this,void 0,void 0,function*(){const n=_n(t.url);return Hn(n),Ic(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then(([e,t])=>{if(e)return t;throw new Error(t)})})}function $g(e){Kr();return Gg(e&&(e.successCallback||e.failureCallback)?nr(Vg,"authentication.getAuthToken"):nr(Bg,"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 Gg(e,t){return new Promise(n=>{n(Ic(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 Jg(e){Kr();return Kg(e&&(e.successCallback||e.failureCallback)?nr(Vg,"authentication.getUser"):nr(Bg,"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 Kg(e){return new Promise(t=>{t(Ic(e,"authentication.getUser"))}).then(([e,t])=>{if(e)return t;throw t})}function Qg(e,t){Qr(lr,dn.authentication);Mc(nr(t?Vg:Bg,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),nu(vc.parentWindow,()=>setTimeout(()=>vc.currentWindow.close(),200))}function Zg(e,t){Qr(lr,dn.authentication);Mc(nr(t?Vg:Bg,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),nu(vc.parentWindow,()=>setTimeout(()=>vc.currentWindow.close(),200))}var Xg;function Yg(){return Qr(lr)&&!!lr.supports.appPerformanceMetrics}function eh(e){Qr(lr),ks(nr("v2","appPerformanceMetrics.memoryUsageHeartbeat"),"appPerformanceMetrics.memoryUsageHeartbeat",e)}function th(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"}(Xg||(Xg={}));class nh{constructor(e){this.val=e,th(e)}toString(){return this.val}}const rh="/l/app/",oh="/l/meeting/new",ih="attendees",ah="startTime",sh="endTime",ch="subject",uh="content",lh="/l/call/0/0",dh="source",fh="withVideo",ph="/l/chat/0/0",gh="users",hh="topicName",mh="message";function vh(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${gh}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${hh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${mh}=${encodeURIComponent(n)}`;return`${ct}://${ut}${ph}?${r}${o}${i}`}function wh(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${gh}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${fh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${dh}=${encodeURIComponent(n)}`;return`${ct}://${ut}${lh}?${r}${o}${i}`}function Ch(e,t,n,r,o){const i=void 0===e?"":`${ih}=`+e.map(e=>encodeURIComponent(e)).join(","),a=void 0===t?"":`&${ah}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${sh}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${ch}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${uh}=${encodeURIComponent(o)}`;return`${ct}://${ut}${oh}?${i}${a}${s}${c}${u}`}function yh(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${ct}://${ut}${rh}${encodeURIComponent(e)}`}const bh="v1";function Sh(e){return new Promise(t=>{if(Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.task,dn.stage,dn.meetingStage),!Eh())throw new Error("Not supported");const n=nr(bh,"appInstallDialog.openAppInstallDialog");lr.isLegacyTeams?t(Sc(n,"executeDeepLink",yh(e.appId))):(Mc(n,"appInstallDialog.openAppInstallDialog",[e]),t())})}function Eh(){return!(!Qr(lr)||!lr.supports.appInstallDialog)}const Ah="v1",Ih=tr("media");var Ph,Th,Oh,Rh,Fh,kh,Mh;!function(e){e.Base64="base64",e.ID="id"}(Ph||(Ph={}));class xh{}function Nh(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Qr(lr,dn.content,dn.task),!Qn.isFramelessWindow){return void e({errorCode:_e.NOT_SUPPORTED_ON_PLATFORM},[])}if(!Zr(nt)){return void e({errorCode:_e.OLD_PLATFORM},[])}Mc(nr(Ah,"media.captureImage"),"captureImage",e)}function Uh(){if(Qr(lr,dn.content,dn.task),!Lh())throw vn;const e=Ve.Media;return new Promise(t=>{t(Ac(nr(Ah,"media.hasPermission"),"permissions.has",e))})}function Dh(){if(Qr(lr,dn.content,dn.task),!Lh())throw vn;const e=Ve.Media;return new Promise(t=>{t(Ac(nr(Ah,"media.requestPermission"),"permissions.request",e))})}function Lh(){return!(!Qr(lr)||!lr.supports.permissions)}class Hh extends xh{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(Qr(lr,dn.content,dn.task),!Zr(rt)){return void e({errorCode:_e.OLD_PLATFORM},new Blob)}if(!Xh(this.mimeType,this.format,this.content)){return void e({errorCode:_e.INVALID_ARGUMENTS},new Blob)}Zr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e)}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Mc(nr(Ah,"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=zh(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=qh(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):Ih(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:_e.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&&!lo(e)&&Mc(nr(Ah,"media.getMedia"),"getMedia",r),ks(nr(Ah,"media.registerGetMediaRequestHandler"),"getMedia"+t,function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Ms("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=zh(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Ms("getMedia"+t)}else{const e=qh(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:_e.INTERNAL_ERROR,message:"data received is null"},new Blob),Ms("getMedia"+t)}})}}class _h{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Qr(lr,dn.content,dn.task);try{Yr(Ze)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Mc(nr(Ah,"media.controller"),"media.controller",[n],e=>{t&&t(e)})}stop(e){this.notifyEventToHost(Th.StopRecording,e)}}class Vh extends _h{getMediaType(){return Fh.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Th.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Bh(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Qr(lr,dn.content,dn.task),!Zr(rt)){const e={errorCode:_e.OLD_PLATFORM};return void t(e,[])}try{$h(e)}catch(e){return void t(e,[])}if(!Jh(e)){const e={errorCode:_e.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Mc(nr(Ah,"media.selectMedia"),"selectMedia",n,(n,r,o)=>{var i,a;if(o)return void(Gh(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 Hh(e));t(n,s)})}function jh(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Qr(lr,dn.content,dn.task),!Zr(rt)){return void t({errorCode:_e.OLD_PLATFORM})}if(!Yh(e)){return void t({errorCode:_e.INVALID_ARGUMENTS})}const n=[e];Mc(nr(Ah,"media.viewImages"),"viewImages",n,t)}function Wh(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Qr(lr,dn.content,dn.task),Qn.hostClientType===un.desktop||Qn.hostClientType===un.web||Qn.hostClientType===un.rigel||Qn.hostClientType===un.teamsRoomsWindows||Qn.hostClientType===un.teamsRoomsAndroid||Qn.hostClientType===un.teamsPhones||Qn.hostClientType===un.teamsDisplays){return void e({errorCode:_e.NOT_SUPPORTED_ON_PLATFORM},"")}if(!Zr(ot)){return void e({errorCode:_e.OLD_PLATFORM},"")}if(!em(t)){return void e({errorCode:_e.INVALID_ARGUMENTS},"")}Mc(nr(Ah,"media.scanBarCode"),"media.scanBarCode",[t],e)}function zh(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 qh(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 $h(e){Qh(e)?Yr(Qe):Zh(e)?Yr(Ze):Kh(e)&&Yr(Xe)}function Gh(e){return!(e.mediaType!=Fh.Video||!e.videoProps||!e.videoProps.videoController)}function Jh(e){return!(null==e||e.maxMediaCount>10)}function Kh(e){var t;return!((null==e?void 0:e.mediaType)!=Fh.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Qh(e){return!(!e||e.mediaType!=Fh.VideoAndImage&&!e.videoAndImageProps)}function Zh(e){return!(!e||e.mediaType!=Fh.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Xh(e,t,n){return null!=e&&null!=t&&t==Ph.ID&&null!=n}function Yh(e){return!(null==e||e.length<=0||e.length>10)}function em(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function tm(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"}(Th||(Th={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Oh||(Oh={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Rh||(Rh={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Fh||(Fh={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(kh||(kh={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Mh||(Mh={}));const nm="v2";function rm(e){return new Promise(t=>{if(Qr(lr,dn.content,dn.task),!am())throw vn;if(!em(e))throw{errorCode:_e.INVALID_ARGUMENTS};t(Ac(nr(nm,"barCode.scanBarCode"),"media.scanBarCode",e))})}function om(){if(Qr(lr,dn.content,dn.task),!am())throw vn;const e=Ve.Media;return new Promise(t=>{t(Ac(nr(nm,"barCode.hasPermission"),"permissions.has",e))})}function im(){if(Qr(lr,dn.content,dn.task),!am())throw vn;const e=Ve.Media;return new Promise(t=>{t(Ac(nr(nm,"barCode.requestPermission"),"permissions.request",e))})}function am(){return!!(Qr(lr)&&lr.supports.barCode&&lr.supports.permissions)}const sm="v2";function cm(e){return um(nr(sm,"chat.openChat"),e)}function um(e,t){return new Promise(n=>{if(Qr(lr,dn.content,dn.task),!dm())throw vn;if(lr.isLegacyTeams)n(Sc(e,"executeDeepLink",vh([t.user],void 0,t.message)));else{n(Sc(e,"chat.openChat",{members:[t.user],message:t.message}))}})}function lm(e){const t=nr(sm,"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(um(t,r))}else{if(Qr(lr,dn.content,dn.task),!dm())throw vn;if(lr.isLegacyTeams)n(Sc(t,"executeDeepLink",vh(e.users,e.topic,e.message)));else{n(Sc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}})}function dm(){return!(!Qr(lr)||!lr.supports.chat)}var fm=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const pm="v2";function gm(e){return fm(this,void 0,void 0,function*(){if(Qr(lr,dn.content,dn.meetingStage,dn.task,dn.settings,dn.stage,dn.sidePanel),!mm())throw vn;if(!e.type||!Object.values(qe).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(qe)}`);const t=yield Nn(e),n={mimeType:e.type,content:t};return Ac(nr(pm,"clipboard.write"),"clipboard.writeToClipboard",n)})}function hm(){return fm(this,void 0,void 0,function*(){Qr(lr,dn.content,dn.meetingStage,dn.task,dn.settings,dn.stage,dn.sidePanel);const e=nr(pm,"clipboard.read");if(!mm())throw vn;const t=yield Ac(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return xn(e.mimeType,e.content)}return t})}function mm(){return Qn.isFramelessWindow?!(!Qr(lr)||!lr.supports.clipboard):!!(Qr(lr)&&navigator&&navigator.clipboard&&lr.supports.clipboard)}var vm=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 wm="v2",Cm={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var ym;function bm(){var e;return null!==(e=Qr(lr)&&(lr.isNAAChannelRecommended||Pm()))&&void 0!==e&&e}function Sm(){return Qr(lr),vc.parentOrigin}function Em(){var e;return null!==(e=Qr(lr)&&lr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function Am(){var e;return null!==(e=Qr(lr)&&(lr.isDeeplyNestedAuthSupported||Im()))&&void 0!==e&&e}function Im(){return!!(Qr(lr)&&Tm()&&lr.isLegacyTeams&&Zr(vr))}function Pm(){return!!(Qr(lr)&&Tm()&&lr.isLegacyTeams&&lr.supports.nestedAppAuth)}function Tm(){return Qn.hostClientType===un.android||Qn.hostClientType===un.ios||Qn.hostClientType===un.ipados||Qn.hostClientType===un.visionOS}function Om(e){return vm(this,void 0,void 0,function*(){if(!Em())throw vn;const t=e.map(km);return Fm(ym.ADD,t)})}function Rm(e){return vm(this,void 0,void 0,function*(){if(!Em())throw vn;const t=e.map(km);return Fm(ym.DELETE,t)})}function Fm(e,t){return vm(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 Tc("nestedAppAuth.manageNAATrustedOrigins",[new Mm(e,t)],Cm,nr(wm,"nestedAppAuth.manageNAATrustedOrigins"))})}function km(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"}(ym||(ym={}));class Mm{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const xm="v2";function Nm(){if(Qr(lr,dn.content,dn.task),!Dm())throw vn;return Ac(nr(xm,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Um(e){if(Qr(lr,dn.content,dn.task),!Dm())throw vn;if(!e)throw{errorCode:_e.INVALID_ARGUMENTS};return Ac(nr(xm,"geoLocation.showLocation"),"location.showLocation",e)}function Dm(){return!!(Qr(lr)&&lr.supports.geoLocation&&lr.supports.geoLocation.map&&lr.supports.permissions)}const Lm="v2";function Hm(){if(Qr(lr,dn.content,dn.task),!Bm())throw vn;return Ac(nr(Lm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function _m(){if(Qr(lr,dn.content,dn.task),!Bm())throw vn;const e=Ve.GeoLocation;return new Promise(t=>{t(Ac(nr(Lm,"geoLocation.hasPermission"),"permissions.has",e))})}function Vm(){if(Qr(lr,dn.content,dn.task),!Bm())throw vn;const e=Ve.GeoLocation;return new Promise(t=>{t(Ac(nr(Lm,"geoLocation.requestPermission"),"permissions.request",e))})}function Bm(){return!!(Qr(lr)&&lr.supports.geoLocation&&lr.supports.permissions)}function jm(){return lr.hostVersionsInfo?lr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Wm="v1";class zm{postMessage(e,t){Qr(lr),Mc(nr(Wm,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||Sn())}addEventListener(e,t){Qr(lr),"message"===e&&ks(nr(Wm,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class qm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Qr(lr,dn.task),Mc(nr(Wm,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||Sn())}addEventListener(e,t){Qr(lr,dn.task),"message"===e&&ks(nr(Wm,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const $m="v2";function Gm(e){if(Qr(lr,dn.content),!Jm())throw vn;if(!e||!Mn(e))throw{errorCode:_e.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Ac(nr($m,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function Jm(){return!(!Qr(lr)||!lr.supports.secondaryBrowser)}const Km="v1";function Qm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Qr(lr,dn.content,dn.task),!Zr(et))throw{errorCode:_e.OLD_PLATFORM};if(!e)throw{errorCode:_e.INVALID_ARGUMENTS};if(!Xm())throw vn;Mc(nr(Km,"location.getLocation"),"location.getLocation",[e],t)}function Zm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Qr(lr,dn.content,dn.task),!Zr(et))throw{errorCode:_e.OLD_PLATFORM};if(!e)throw{errorCode:_e.INVALID_ARGUMENTS};if(!Xm())throw vn;Mc(nr(Km,"location.showLocation"),"location.showLocation",[e],t)}function Xm(){return!(!Qr(lr)||!lr.supports.location)}const Ym="v1";function ev(e){Qr(lr,dn.sidePanel),e.contentUrl&&new URL(e.contentUrl),Mc(nr(Ym,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var tv=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 nv="v1";var rv,ov,iv,av,sv,cv;function uv(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),Mc(nr(nv,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function lv(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),Mc(nr(nv,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function dv(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage,dn.settings,dn.content),Mc(nr(nv,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function fv(){var e,t,n;return tv(this,void 0,void 0,function*(){let r;Qr(lr,dn.sidePanel,dn.meetingStage,dn.settings,dn.content);try{const e=!0;r=yield Ac(nr("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)==av.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==av.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(_e.NOT_SUPPORTED_ON_PLATFORM.toString());return r})}function pv(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage,dn.task),Mc(nr(nv,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function gv(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Qr(lr,dn.sidePanel),Mc(nr(nv,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function hv(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Qr(lr,dn.sidePanel),Mc(nr(nv,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function mv(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Qr(lr,dn.sidePanel),Mc(nr(nv,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function vv(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Qr(lr,dn.sidePanel),ks(nr(nv,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function wv(e,t,n={sharingProtocol:sv.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),Mc(nr(nv,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Cv(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),Mc(nr(nv,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function yv(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),Mc(nr(nv,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function bv(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),Mc(nr(nv,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Sv(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),ks(nr(nv,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Ev(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),ks(nr(nv,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Av(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Qr(lr,dn.sidePanel,dn.meetingStage),ks(nr(nv,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Iv(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));Qr(lr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||cv.Other};return Ac(nr("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Pv(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");Qr(lr,dn.sidePanel,dn.meetingStage),e.isAppHandlingAudio?Tv(e,t):Ov(e,t)}function Tv(e,t){Mc(nr(nv,"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");ks(nr(nv,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",t=>tv(this,void 0,void 0,function*(){try{const n=yield e.micMuteStateChangedCallback(t);Fv(n,n.isMicMuted===t.isMicMuted?rv.HostInitiated:rv.AppDeclinedToChange)}catch(e){Fv(t,rv.AppFailedToChange)}}));ks(nr(nv,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)}),t(r)})}function Ov(e,t){Mc(nr(nv,"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");xs("meeting.micStateChanged")&&Ms("meeting.micStateChanged"),xs("meeting.audioDeviceSelectionChanged")&&Ms("meeting.audioDeviceSelectionChanged"),t(n)})}function Rv(e){Fv(e,rv.AppInitiated)}function Fv(e,t){Qr(lr,dn.sidePanel,dn.meetingStage),Mc(nr(nv,"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"}(rv||(rv={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(ov||(ov={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(iv||(iv={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(av||(av={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(sv||(sv={})),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.M365CalendarMeetNow="m365_calendar_meet_now",e.Other="other"}(cv||(cv={}));const kv="v1",Mv="v2";function xv(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=nr(kv,"monetization.openPurchaseExperience")):(r=e,o=nr(Mv,"monetization.openPurchaseExperience"));return Qr(lr,dn.content),On(()=>new Promise(e=>{if(!Nv())throw vn;e(Ac(o,"monetization.openPurchaseExperience",r))}),n)}function Nv(){return!(!Qr(lr)||!lr.supports.monetization)}const Uv="v2";function Dv(e){return new Promise(t=>{if(Qr(lr,dn.content),!Hv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(Sc(nr(Uv,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))})}function Lv(e){return new Promise(t=>{if(Qr(lr,dn.content),!Hv())throw new Error("Not supported");const n=nr(Uv,"calendar.composeMeeting");lr.isLegacyTeams?t(Sc(n,"executeDeepLink",Ch(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(Sc(n,"calendar.composeMeeting",e))})}function Hv(){return!(!Qr(lr)||!lr.supports.calendar)}const _v="v2";function Vv(e){e&&0!==e.length&&e.forEach(e=>{th(e)})}function Bv(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===Kv.New&&(Vv(t.toRecipients),Vv(t.ccRecipients),Vv(t.bccRecipients))}function jv(e){if(Qr(lr,dn.content),!Wv())throw new Error("Not supported");return Bv(e),Oc("mail.handoff.composeMail",[new zv(e)],nr(_v,"mail.handoff.composeMail"))}function Wv(){return!!(Qr(lr)&&lr.supports.mail&&lr.supports.mail.handoff)}class zv{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const qv="v2";function $v(e){return new Promise(t=>{if(Qr(lr,dn.content),!Jv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(Sc(nr(qv,"mail.openMailItem"),"mail.openMailItem",e))})}function Gv(e){return new Promise(t=>{if(Qr(lr,dn.content),!Jv())throw new Error("Not supported");t(Sc(nr(qv,"mail.composeMail"),"mail.composeMail",e))})}function Jv(){return!(!Qr(lr)||!lr.supports.mail)}var Kv;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Kv||(Kv={}));const Qv="v2";function Zv(){if(!Qn.printCapabilityEnabled){if(Qr(lr),!rw())throw vn;Qn.printCapabilityEnabled=!0,document.addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(Xv(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())})}}function Xv(){Un().print()}function Yv(e){ew(nr(Qv,"teamsAPIs_registerOnLoadHandler"),e,()=>{if(!lo(e)&&!rw())throw vn})}function ew(e,t,n){!lo(t)&&Qr(lr),!lo(t)&&n&&n(),Bs(e,t)}function tw(e){nw(nr(Qv,"teamsAPIs_registerBeforeUnloadHandler"),e,()=>{if(!lo(e)&&!rw())throw vn})}function nw(e,t,n){!lo(t)&&Qr(lr),!lo(t)&&n&&n(),zs(e,t)}function rw(){return!(!Qr(lr)||!lr.supports.teamsCore)}const ow="v1",iw="v2";function aw(e,t){let n,r;Qr(lr,dn.content,dn.task,dn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=nr(ow,"people.selectPeople")):(r=e,o=nr(iw,"people.selectPeople")),Pn(sw,n,o,r)}function sw(e,t){return new Promise(n=>{if(!Zr(tt))throw{errorCode:_e.OLD_PLATFORM};if(!tm(t))throw{errorCode:_e.INVALID_ARGUMENTS};if(!cw())throw vn;n(Ac(e,"people.selectPeople",t))})}function cw(){return!(!Qr(lr)||!lr.supports.people)}function uw(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?lw(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function lw(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 dw="v2";function fw(e){return Qr(lr,dn.content),new Promise(t=>{const[n,r]=uw(e);if(!n)throw{errorCode:_e.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(Ac(nr(dw,"profile.showProfile"),"profile.showProfile",o))})}function pw(){return!(!Qr(lr)||!lr.supports.profile)}const gw="v2",hw="search.queryChange",mw="search.queryClose",vw="search.queryExecute";function ww(e,t,n){if(Qr(lr,dn.content),!yw())throw vn;ks(nr(gw,"search.registerOnClosedHandler"),mw,e),ks(nr(gw,"search.registerOnExecutedHandler"),vw,t),n&&ks(nr(gw,"search.registerOnChangeHandler"),hw,n)}function Cw(){if(Qr(lr,dn.content),!yw())throw vn;Mc(nr(gw,"search.unregisterHandlers"),"search.unregister"),Ms(hw),Ms(mw),Ms(vw)}function yw(){return!(!Qr(lr)||!lr.supports.search)}function bw(){return new Promise(e=>{if(Qr(lr,dn.content),!yw())throw new Error("Not supported");e(Sc(nr(gw,"search.closeSearch"),"search.closeSearch"))})}var Sw=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 Ew="v2";function Aw(){return Sw(this,void 0,void 0,function*(){if(Qr(lr,dn.sidePanel,dn.meetingStage),!Iw())throw vn;return yield Ac(nr(Ew,"sharing.history.getContent"),"sharing.history.getContent")})}function Iw(){var e;return Qr(lr)&&void 0!==(null===(e=lr.supports.sharing)||void 0===e?void 0:e.history)}const Pw="v1",Tw="v2",Ow={shareWebContent:"sharing.shareWebContent"};function Rw(e,t){try{kw(e),Mw(e),Nw(e)}catch(e){return Tn(()=>Promise.reject(e),t)}Qr(lr,dn.content,dn.sidePanel,dn.task,dn.stage,dn.meetingStage);return Tn(Fw,t,nr(t?Pw:Tw,"sharing.shareWebContent"),e)}function Fw(e,t){return new Promise(n=>{if(!Uw())throw vn;n(Ac(e,Ow.shareWebContent,t))})}function kw(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:_e.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Mw(e){let t;if(e.content.some(e=>!e.type))throw t={errorCode:_e.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some(t=>t.type!==e.content[0].type))throw t={errorCode:_e.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function xw(e){if("URL"===e.type){if(!e.url)throw{errorCode:_e.INVALID_ARGUMENTS,message:"URLs are required for URL content types"}}else{if("FILE"!==e.type)throw{errorCode:_e.INVALID_ARGUMENTS,message:"Content type is unsupported"};if(!e.url)throw{errorCode:_e.INVALID_ARGUMENTS,message:"File URLs are required for File content types"}}}function Nw(e){e.content.forEach(xw)}function Uw(){return!(!Qr(lr)||!lr.supports.sharing)}const Dw="v2";function Lw(){return new Promise(e=>{if(Qr(lr,dn.content),!Hw())throw vn;e(Ac(nr(Dw,"stageView.self.close"),"stageView.self.close"))})}function Hw(){var e;return Qr(lr)&&void 0!==(null===(e=lr.supports.stageView)||void 0===e?void 0:e.self)}const _w="v2";var Vw;function Bw(e){return new Promise(t=>{if(Qr(lr,dn.content),!jw())throw vn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Ac(nr(_w,"stageView.open"),"stageView.open",e))})}function jw(){return!(!Qr(lr)||!lr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(Vw||(Vw={}));const Ww=10;var zw=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 qw="v2";function $w(e){return zw(this,void 0,void 0,function*(){Qr(lr,dn.content,dn.task),Kw(),Qw(e);const t=yield Ac(nr(qw,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return Zw(e.maxVisualMediaCount,t),t})}function Gw(e){return zw(this,void 0,void 0,function*(){Qr(lr,dn.content,dn.task),Kw(),Qw(e);const t=yield Ac(nr(qw,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return Zw(e.maxVisualMediaCount,t),t})}function Jw(){return!!(Qr(lr)&&lr.supports.visualMedia&&lr.supports.visualMedia.image&&lr.supports.permissions)}function Kw(){if(!Jw())throw vn}function Qw(e){if(!e||e.maxVisualMediaCount>Ww||e.maxVisualMediaCount<1)throw yn}function Zw(e,t){if(t.length>e)throw bn}const Xw="v2";var Yw,eC;function tC(){if(Qr(lr,dn.content,dn.task),!Jw())throw vn;const e=Ve.Media;return Ac(nr(Xw,"visualMedia.hasPermission"),"permissions.has",e)}function nC(){if(Qr(lr,dn.content,dn.task),!Jw())throw vn;const e=Ve.Media;return Ac(nr(Xw,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(Yw||(Yw={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(eC||(eC={}));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())})};let oC=null;function iC(){return rC(this,void 0,void 0,function*(){return null===oC&&(oC=(yield _o()).app.host.name),oC})}var aC=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};function sC(){return aC(this,void 0,void 0,function*(){if(Qr(lr),!uC())throw vn;return!(!lr.isLegacyTeams||Qn.hostClientType!==un.android&&Qn.hostClientType!==un.ios&&Qn.hostClientType!==un.ipados&&Qn.hostClientType!==un.visionOS||(yield cC())!==ln.teams)||(yield bc(nr("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))})}function cC(){return aC(this,void 0,void 0,function*(){return iC()})}function uC(){return Qr(lr)&&void 0!==lr.supports.webStorage}const lC="v2";var dC;function fC(e){const t=nr(lC,"call.startCall");return new Promise(n=>{var r;if(Qr(lr,dn.content,dn.task),!pC())throw vn;if(!lr.isLegacyTeams)return Mc(t,"call.startCall",[e],n);n(bc(t,"executeDeepLink",wh(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(dC.Video),e.source)).then(e=>{if(!e)throw new Error(pt);return e}))})}function pC(){return!(!Qr(lr)||!lr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(dC||(dC={}));const gC="v1";function hC(){aa(nr(gC,"appInitialization.notifyAppLoaded"))}function mC(){Mc(nr(gC,"appInitialization.notifySuccess"),Fo.Success,[Ir])}function vC(e){ca(nr(gC,"appInitialization.notifyFailure"),e)}function wC(e){sa(nr(gC,"appInitialization.notifyExpectedFailure"),e)}const CC=tr("thirdPartyCloudStorage"),yC="v2";class bC{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let SC=[],EC=null,AC=!0,IC=null;function PC(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(!e||""===e){return void t([],{errorCode:_e.INVALID_ARGUMENTS})}if(Qr(lr,dn.content,dn.task),!OC())throw vn;if(IC)throw IC=null,new Error("getDragAndDropFiles cannot be called twice");IC=t,AC=!0,Mc(nr(yC,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],TC)}function TC(e){if(IC)if(e&&e.error)IC([],e.error),IC=null;else if(e&&e.fileChunk)try{AC||0!==e.fileChunk.chunkSequence||(CC("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),AC=!0,IC([],{errorCode:_e.INTERNAL_ERROR,message:"error occurred while receiving data"}),SC=[],IC=null);const t=qh(e.fileChunk,e.fileType);if(t?(EC||(EC=new bC(e.fileType,[])),EC.assembleAttachment.push(t)):(CC(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),IC?IC([],{errorCode:_e.INTERNAL_ERROR,message:"error occurred while receiving data"}):IC=null,SC=[],IC=null,AC=!0),AC=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&EC){const t=zh(EC.assembleAttachment,EC.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});SC.push(n)}e.isLastFile&&IC&&(IC(SC,e.error),SC=[],IC=null,AC=!0),EC=null}}catch(e){IC&&(IC([],{errorCode:_e.INTERNAL_ERROR,message:e}),SC=[],IC=null,AC=!0)}else IC([],{errorCode:_e.INTERNAL_ERROR,message:"data received is null"}),SC=[],IC=null,AC=!0}function OC(){return!(!Qr(lr)||!lr.supports.thirdPartyCloudStorage)}const RC="v1";function FC(e,t){ia(nr(RC,"initialize"),t).then(()=>{e&&e()})}function kC(){Zv()}function MC(){Xv()}function xC(e){Kr(),Mc(nr(RC,"getContext"),"getContext",t=>{t.frameContext||(t.frameContext=Qn.frameContext),e(t)})}function NC(e){ga(nr(RC,"registerOnThemeChangeHandlerHelper"),e)}function UC(e){Ns(nr(RC,"registerFullScreenHandler"),"fullScreenChange",e,[])}function DC(e){Ns(nr(RC,"registerAppButtonClickHandler"),"appButtonClick",e,[dn.content])}function LC(e){Ns(nr(RC,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[dn.content])}function HC(e){Ns(nr(RC,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[dn.content])}function _C(e){Ua(nr(RC,"registerBackButtonHandler"),e)}function VC(e){ew(nr(RC,"registerOnLoadHandler"),e)}function BC(e){nw(nr(RC,"registerBeforeUnloadHandler"),e)}function jC(e){Ns(nr(RC,"registerFocusEnterHandler"),"focusEnter",e,[])}function WC(e){Ns(nr(RC,"registerChangeSettingsHandler"),"changeSettings",e,[dn.content])}function zC(e,t){Qr(lr),ls(nr(RC,"getTabInstances"),t).then(t=>{e(t)})}function qC(e,t){Qr(lr),ds(nr(RC,"getMruTabInstances"),t).then(t=>{e(t)})}function $C(e){fs(nr(RC,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function GC(e,t){Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.task,dn.stage,dn.meetingStage);const n=null!=t?t:Sn();ma(nr(RC,"executeDeepLink"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function JC(e){ps(nr(RC,"setFrameContext"),e)}function KC(e,t,n){ia(nr(RC,"initializeWithFrameContext"),n).then(()=>t&&t()),ps(nr(RC,"setFrameContext"),e)}const QC="v1";function ZC(e){us(nr(QC,"navigation.returnFocus"),e)}function XC(e,t){Qr(lr);const n=null!=t?t:Sn();cs(nr(QC,"navigation.navigateToTab"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function YC(e,t){Qr(lr,dn.content,dn.sidePanel,dn.settings,dn.remove,dn.task,dn.stage,dn.meetingStage);const n=null!=t?t:Sn();as(nr(QC,"navigation.navigateCrossDomain"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function ey(e){Qr(lr);const t=null!=e?e:Sn();ss(nr(QC,"navigation.navigateBack")).then(()=>{t(!0)}).catch(e=>{t(!1,e.message)})}const ty="v1";function ny(e){gs(nr(ty,"settings.setValidityState"),e)}function ry(e){Qr(lr,dn.content,dn.settings,dn.remove,dn.sidePanel),hs(nr(ty,"settings.getSettings")).then(t=>{e(t)})}function oy(e,t){Qr(lr,dn.content,dn.settings,dn.sidePanel);const n=null!=t?t:Sn();ms(nr(ty,"settings.setSettings"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function iy(e){qi(nr(ty,"settings.registerOnSaveHandler"),e)}function ay(e){Gi(nr(ty,"settings.registerOnRemoveHandler"),e)}var sy=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 cy="v1";function uy(e,t){const n=nr(cy,"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?(Qr(lr,dn.content,dn.sidePanel,dn.meetingStage),Mc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?fi(n,py(e),r):di(n,fy(e),r),new zm}function ly(e){e=gy(e);const{width:t,height:n}=e,r=sy(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");li(nr(cy,"tasks.updateTask"),e)}function dy(e,t){pi(nr(cy,"tasks.submitTask"),e,t)}function fy(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:hn.Small,width:e.width?e.width:hn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function py(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:hn.Small,width:e.width?e.width:hn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function gy(e){return e.height=e.height?e.height:hn.Small,e.width=e.width?e.width:hn.Small,e}const hy="v2";var my,vy;function wy(){return!(!Qr(lr,dn.meetingStage,dn.sidePanel,dn.content)||!lr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(my||(my={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(vy||(vy={}));class Cy{getFluidTenantInfo(){return yy(),new Promise(e=>{e(Ac(nr(hy,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))})}getFluidToken(e){return yy(),new Promise(t=>{t(Ac(nr(hy,"interactive.getFluidToken"),"interactive.getFluidToken",e))})}getFluidContainerId(){return yy(),new Promise(e=>{e(Ac(nr(hy,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))})}setFluidContainerId(e){return yy(),new Promise(t=>{t(Ac(nr(hy,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))})}getNtpTime(){return yy(),new Promise(e=>{e(Ac(nr(hy,"interactive.getNtpTime"),"interactive.getNtpTime"))})}registerClientId(e){return yy(),new Promise(t=>{t(Ac(nr(hy,"interactive.registerClientId"),"interactive.registerClientId",e))})}getClientRoles(e){return yy(),new Promise(t=>{t(Ac(nr(hy,"interactive.getClientRoles"),"interactive.getClientRoles",e))})}getClientInfo(e){return yy(),new Promise(t=>{t(Ac(nr(hy,"interactive.getClientInfo"),"interactive.getClientInfo",e))})}static create(){return yy(),new Cy}}function yy(){if(!wy())throw new Error("LiveShareHost Not supported")}var by=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 Sy(e){try{return e.cartItems=Ey(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Ey(e){return e.map(e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Ey(e.accessories)),e})}const Ay=e=>{try{return e.map(e=>{const{imageURL:t,accessories:n}=e,r=by(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Ay(n)),o})}catch(e){throw new Error("Error serializing cart items")}};function Iy(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)Ty(t),Py(t.accessories)}function Py(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");Ty(t)}}}function Ty(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");Ry(e.price),Fy(e.quantity)}function Oy(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===cn(e))throw new Error("id must be a valid UUID")}}function Ry(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 Fy(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function ky(e){if(!Object.values(Uy).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const My="v2",xy={majorVersion:1,minorVersion:1};var Ny,Uy;function Dy(){if(Qr(lr,dn.content,dn.task),!Vy())throw vn;return Ac(nr(My,"marketplace.getCart"),"marketplace.getCart",xy).then(Sy)}function Ly(e){if(Qr(lr,dn.content,dn.task),!Vy())throw vn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return Oy(null==e?void 0:e.cartId),Iy(null==e?void 0:e.cartItems),Ac(nr(My,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Ay(e.cartItems),cartVersion:xy})).then(Sy)}function Hy(e){if(Qr(lr,dn.content,dn.task),!Vy())throw vn;if(!e)throw new Error("removeCartItemsParams must be provided");if(Oy(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 Ac(nr(My,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:xy})).then(Sy)}function _y(e){if(Qr(lr,dn.content,dn.task),!Vy())throw vn;if(!e)throw new Error("updateCartStatusParams must be provided");return Oy(null==e?void 0:e.cartId),ky(null==e?void 0:e.cartStatus),Ac(nr(My,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:xy})).then(Sy)}function Vy(){return!(!Qr(lr)||!lr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(Ny||(Ny={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Uy||(Uy={}));var By=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 jy=3,Wy=4;class zy{constructor(e){this.direction=e}serialize(){return{direction:this.direction}}}function qy(e){return e===jy?"back":e===Wy?"forward":void 0}function $y(e){void 0!==qy(e.button)&&(e.preventDefault(),e.stopImmediatePropagation())}function Gy(e){const t=qy(e.button);t&&(e.preventDefault(),e.stopImmediatePropagation(),Oc("mouseRelay.navigateHistory",[new zy(t)],nr("v2","mouseRelay.navigateHistory")))}let Jy=!1;function Ky(){return By(this,void 0,void 0,function*(){if(!Zy())throw vn;Jy||(document.addEventListener("mousedown",$y,{capture:!0}),document.addEventListener("mouseup",Gy,{capture:!0}),document.addEventListener("auxclick",$y,{capture:!0})),Jy=!0})}function Qy(){if(!Zy())throw vn;Jy=!1,document.removeEventListener("mousedown",$y,{capture:!0}),document.removeEventListener("mouseup",Gy,{capture:!0}),document.removeEventListener("auxclick",$y,{capture:!0})}function Zy(){return!(!Qr(lr)||!lr.supports.mouseRelay)}var Xy=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 Yy{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 eb(e){return e.toLowerCase().split("+").sort().join("+")}function tb(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function nb(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()||!!e.key&&/^F\d+$/i.test(e.key)}function rb(e,t){if(nb(t)){const n=tb(t);if(e.has(n))return{matchedShortcut:n,isOverridable:cb.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function ob(e){ub.clear(),e.shortcuts.forEach(e=>{ub.add(eb(e))}),cb.clear(),e.overridableShortcuts.forEach(e=>{cb.add(eb(e))})}class ib extends ea{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function ab(e){ks(nr("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function sb(e){if(e.target.closest(`[${mb}]`))return;const{matchedShortcut:t,isOverridable:n}=rb(ub,e);if(!t)return;if(n&&lb){if(lb(e,{matchedShortcut:t}))return}Oc("shortcutRelay.forwardShortcutEvent",[new Yy(e)],nr("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const cb=new Set,ub=new Set;let lb,db=!1;function fb(e){if(!hb())throw vn;const t=lb;return lb=e,t}function pb(){if(!hb())throw vn;db=!1,ub.clear(),cb.clear(),lb=void 0,document.removeEventListener("keydown",sb,{capture:!0})}function gb(){return Xy(this,void 0,void 0,function*(){if(!hb())throw vn;ob(yield Tc("shortcutRelay.getHostShortcuts",[],new ib,nr("v2","shortcutRelay.getHostShortcuts"))),db||document.addEventListener("keydown",sb,{capture:!0}),db=!0,ab(e=>{ob(e)})})}function hb(){return!(!Qr(lr)||!lr.supports.shortcutRelay)}const mb="data-disable-shortcuts-forwarding"})(),r})());
|
|
2
2
|
//# sourceMappingURL=MicrosoftTeams.min.js.map
|