@microsoft/teams-js 2.34.0-beta.1 → 2.34.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. package/README.md +4 -4
  2. package/dist/esm/_virtual/_polyfill-node.buffer.js +1 -0
  3. package/dist/esm/_virtual/_polyfill-node.global.js +1 -0
  4. package/dist/esm/packages/teams-js/dts/internal/constants.d.ts +8 -0
  5. package/dist/esm/packages/teams-js/dts/internal/internalAPIs.d.ts +1 -1
  6. package/dist/esm/packages/teams-js/dts/internal/messageObjects.d.ts +1 -0
  7. package/dist/esm/packages/teams-js/dts/internal/validOrigins.d.ts +1 -1
  8. package/dist/esm/packages/teams-js/dts/public/app/app.d.ts +9 -0
  9. package/dist/esm/packages/teams-js/dts/public/constants.d.ts +2 -0
  10. package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +14 -0
  11. package/dist/esm/packages/teams-js/src/internal/communication.js +1 -1
  12. package/dist/esm/packages/teams-js/src/internal/constants.js +1 -1
  13. package/dist/esm/packages/teams-js/src/internal/internalAPIs.js +1 -1
  14. package/dist/esm/packages/teams-js/src/internal/utils.js +1 -1
  15. package/dist/esm/packages/teams-js/src/internal/validOrigins.js +1 -1
  16. package/dist/esm/packages/teams-js/src/public/app/app.js +1 -1
  17. package/dist/esm/packages/teams-js/src/public/constants.js +1 -1
  18. package/dist/esm/packages/teams-js/src/public/nestedAppAuth.js +1 -1
  19. package/dist/esm/packages/teams-js/src/public/runtime.js +1 -1
  20. package/dist/esm/packages/teams-js/src/public/version.js +1 -1
  21. package/dist/esm/packages/teams-js/src/public/webStorage.js +1 -1
  22. package/dist/umd/MicrosoftTeams.js +194 -155
  23. package/dist/umd/MicrosoftTeams.js.map +1 -1
  24. package/dist/umd/MicrosoftTeams.min.js +1 -1
  25. package/dist/umd/MicrosoftTeams.min.js.map +1 -1
  26. package/package.json +53 -1
  27. package/dist/esm/node_modules/.pnpm/rollup-plugin-node-polyfills@0.2.1/node_modules/rollup-plugin-node-polyfills/polyfills/buffer-es6.js +0 -1
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],l=i[1],u=new o(c(e,a,l)),d=0,f=l>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[d++]=t>>16&255,u[d++]=t>>8&255,u[d++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[d++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[d++]=t>>8&255,u[d++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function l(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function u(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(l(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?l(e,i,o,"day"):i>=r?l(e,i,r,"hour"):i>=n?l(e,i,n,"minute"):i>=t?l(e,i,t,"second"):e+" ms"}function l(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>Et,AppId:()=>Pr,ChannelType:()=>Ht,ChildAppWindow:()=>gg,DialogDimension:()=>Dt,EduType:()=>Ft,EmailAddress:()=>Vf,ErrorCode:()=>It,FileOpenPreference:()=>St,FrameContexts:()=>xt,HostClientType:()=>Mt,HostName:()=>Nt,LiveShareHost:()=>Bv,NotificationTypes:()=>Dc,ParentAppWindow:()=>mg,SecondaryM365ContentIdName:()=>At,TaskModuleDimension:()=>Dt,TeamType:()=>Ut,UUID:()=>vn,UserSettingTypes:()=>Vc,UserTeamRole:()=>Lt,ViewerActionTypes:()=>Hc,app:()=>i,appEntity:()=>H,appInitialization:()=>be,appInstallDialog:()=>G,authentication:()=>a,barCode:()=>K,calendar:()=>ae,call:()=>ye,chat:()=>Z,clipboard:()=>Q,conversations:()=>E,copilot:()=>T,dialog:()=>p,enablePrintCapability:()=>ev,executeDeepLink:()=>hv,externalAppAuthentication:()=>P,externalAppAuthenticationForCEA:()=>O,externalAppCardActions:()=>R,externalAppCardActionsForCEA:()=>F,externalAppCommands:()=>k,files:()=>M,geoLocation:()=>ee,getAdaptiveCardSchemaVersion:()=>fg,getContext:()=>nv,getMruTabInstances:()=>gv,getTabInstances:()=>pv,hostEntity:()=>$,initialize:()=>Yh,initializeWithFrameContext:()=>wv,liveShare:()=>Ie,location:()=>ne,logs:()=>S,mail:()=>ce,marketplace:()=>Te,media:()=>J,meeting:()=>oe,meetingRoom:()=>N,menus:()=>g,messageChannels:()=>x,monetization:()=>ie,navigateBack:()=>Ev,navigateCrossDomain:()=>Sv,navigateToTab:()=>bv,nestedAppAuth:()=>X,notifications:()=>U,openFilePreview:()=>qc,otherAppStateChange:()=>L,pages:()=>y,people:()=>ue,print:()=>tv,profile:()=>de,registerAppButtonClickHandler:()=>iv,registerAppButtonHoverEnterHandler:()=>av,registerAppButtonHoverLeaveHandler:()=>sv,registerBackButtonHandler:()=>cv,registerBeforeUnloadHandler:()=>uv,registerChangeSettingsHandler:()=>fv,registerCustomHandler:()=>zc,registerFocusEnterHandler:()=>dv,registerFullScreenHandler:()=>ov,registerOnLoadHandler:()=>lv,registerOnThemeChangeHandler:()=>rv,registerUserSettingsChangeHandler:()=>$c,remoteCamera:()=>D,returnFocus:()=>yv,search:()=>fe,secondaryBrowser:()=>te,sendCustomEvent:()=>jc,sendCustomMessage:()=>Bc,setFrameContext:()=>vv,settings:()=>Ee,shareDeepLink:()=>mv,sharing:()=>ge,stageView:()=>he,store:()=>q,tasks:()=>Ae,teams:()=>W,teamsCore:()=>le,thirdPartyCloudStorage:()=>Se,uploadCustomApp:()=>Wc,version:()=>dr,videoEffects:()=>B,videoEffectsEx:()=>j,visualMedia:()=>we,webStorage:()=>Ce});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>zr,getTelemetryPort:()=>Br,isSupported:()=>jr});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Qr,getDataLayerPort:()=>Kr,isSupported:()=>Zr});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Xr,registerOnResumeHandler:()=>Yr});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>oo,FailedReason:()=>ro,Messages:()=>no,_initialize:()=>co,_uninitialize:()=>lo,getContext:()=>uo,getFrameContext:()=>ao,initialize:()=>so,isInitialized:()=>io,lifecycle:()=>o,notifyAppLoaded:()=>fo,notifyExpectedFailure:()=>mo,notifyFailure:()=>go,notifySuccess:()=>po,openLink:()=>wo,registerHostToAppPerformanceMetricsHandler:()=>vo,registerOnThemeChangeHandler:()=>ho});var a={};n.r(a),n.d(a,{DataResidency:()=>Wo,authenticate:()=>Po,getAuthToken:()=>Ro,getUser:()=>ko,initialize:()=>Io,notifyFailure:()=>Ho,notifySuccess:()=>Do,registerAuthenticationHandlers:()=>To});var s={};n.r(s),n.d(s,{isSupported:()=>jo,resize:()=>Bo});var c={};n.r(c),n.d(c,{isSupported:()=>$o,open:()=>zo});var l={};n.r(l),n.d(l,{isSupported:()=>Ko,registerOnMessageFromParent:()=>Jo,sendMessageToDialog:()=>Go,sendMessageToParentFromDialog:()=>qo});var u={};n.r(u),n.d(u,{bot:()=>c,getDialogInfoFromBotUrlDialogInfo:()=>ei,getDialogInfoFromUrlDialogInfo:()=>Yo,isSupported:()=>Xo,open:()=>Zo,parentCommunication:()=>l,submit:()=>Qo});var d={};n.r(d),n.d(d,{isSupported:()=>di,open:()=>ui});var f={};n.r(f),n.d(f,{bot:()=>d,isSupported:()=>pi,open:()=>fi});var p={};n.r(p),n.d(p,{adaptiveCard:()=>f,initialize:()=>gi,isSupported:()=>mi,update:()=>s,url:()=>u});var g={};n.r(g),n.d(g,{DisplayMode:()=>vi,MenuItem:()=>Ci,MenuListType:()=>wi,initialize:()=>Ii,isSupported:()=>Mi,setNavBarMenu:()=>Oi,setUpViews:()=>Ti,showActionMenu:()=>Fi});var m={};n.r(m),n.d(m,{initialize:()=>Ni,isSupported:()=>$i,registerChangeConfigHandler:()=>Wi,registerOnRemoveHandler:()=>Hi,registerOnRemoveHandlerHelper:()=>Vi,registerOnSaveHandler:()=>Li,registerOnSaveHandlerHelper:()=>Di,setConfig:()=>Ui,setValidityState:()=>xi});var h={};n.r(h),n.d(h,{isSupported:()=>da,onClick:()=>ca,onHoverEnter:()=>la,onHoverLeave:()=>ua});var v={};n.r(v),n.d(v,{isSupported:()=>ga,navigateTo:()=>fa,navigateToDefaultPage:()=>pa});var w={};n.r(w),n.d(w,{enterFullscreen:()=>ma,exitFullscreen:()=>ha,isSupported:()=>va});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>ya,getTabInstances:()=>Ca,isSupported:()=>ba,navigateToTab:()=>wa});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Sa,ReturnFocusType:()=>Ea,appButton:()=>h,backStack:()=>b,config:()=>m,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>Oa,initializeWithFrameContext:()=>Pa,isSupported:()=>Na,navigateCrossDomain:()=>Ra,navigateToApp:()=>Fa,registerFocusEnterHandler:()=>Ia,registerFullScreenHandler:()=>Ma,returnFocus:()=>Aa,setCurrentFrame:()=>Ta,shareDeepLink:()=>ka,tabs:()=>C});var b={};n.r(b),n.d(b,{_initialize:()=>Za,isSupported:()=>ts,navigateBack:()=>Qa,registerBackButtonHandler:()=>Xa,registerBackButtonHandlerHelper:()=>Ya});var S={};n.r(S),n.d(S,{isSupported:()=>Lc,registerGetLogHandler:()=>Uc});var E={};n.r(E),n.d(E,{closeConversation:()=>Kc,getChatMembers:()=>Zc,isSupported:()=>Qc,openConversation:()=>Jc});var A={};n.r(A),n.d(A,{isSupported:()=>tl,sendCustomTelemetryData:()=>nl});var I={};n.r(I),n.d(I,{getEligibilityInfo:()=>sl,isSupported:()=>al});var T={};n.r(T),n.d(T,{customTelemetry:()=>A,eligibility:()=>I});var P={};n.r(P),n.d(P,{ActionExecuteInvokeRequestType:()=>fl,ActionExecuteResponseHandler:()=>hl,InvokeErrorCode:()=>ml,InvokeResponseType:()=>gl,OriginalRequestType:()=>pl,SerializableActionExecuteInvokeRequest:()=>ul,authenticateAndResendRequest:()=>bl,authenticateWithOauth2:()=>Al,authenticateWithPowerPlatformConnectorPlugins:()=>Il,authenticateWithSSO:()=>Sl,authenticateWithSSOAndResendRequest:()=>El,isActionExecuteResponse:()=>dl,isInvokeError:()=>vl,isSupported:()=>Tl,validateActionExecuteInvokeRequest:()=>Cl});var O={};n.r(O),n.d(O,{authenticateAndResendRequest:()=>kl,authenticateWithOauth:()=>Fl,authenticateWithSSO:()=>Rl,authenticateWithSSOAndResendRequest:()=>Ml,isSupported:()=>Nl,validateInput:()=>xl});var R={};n.r(R),n.d(R,{ActionOpenUrlErrorCode:()=>Dl,ActionOpenUrlType:()=>Ll,isSupported:()=>_l,processActionOpenUrl:()=>Vl,processActionSubmit:()=>Hl});var F={};n.r(F),n.d(F,{isSupported:()=>$l,processActionOpenUrl:()=>jl,processActionSubmit:()=>zl});var k={};n.r(k),n.d(k,{isSupported:()=>Kl,processActionCommand:()=>Jl});var M={};n.r(M),n.d(M,{CloudStorageProvider:()=>Ql,CloudStorageProviderFileAction:()=>nu,CloudStorageProviderType:()=>Xl,DocumentLibraryAccessType:()=>eu,FileDownloadStatus:()=>tu,SpecialDocumentLibraryType:()=>Yl,addCloudStorageFolder:()=>ou,addCloudStorageProvider:()=>fu,addCloudStorageProviderFile:()=>gu,copyMoveFiles:()=>lu,deleteCloudStorageFolder:()=>iu,deleteCloudStorageProviderFile:()=>hu,downloadCloudStorageProviderFile:()=>vu,getCloudStorageFolderContents:()=>au,getCloudStorageFolders:()=>ru,getExternalProviders:()=>cu,getFileDownloads:()=>uu,openCloudStorageFile:()=>su,openDownloadFolder:()=>du,registerCloudStorageProviderContentChangeHandler:()=>yu,registerCloudStorageProviderListChangeHandler:()=>Cu,removeCloudStorageProvider:()=>pu,renameCloudStorageProviderFile:()=>mu,uploadCloudStorageProviderFile:()=>wu});var N={};n.r(N),n.d(N,{getPairedMeetingRoomInfo:()=>Eu,isSupported:()=>Pu,registerMeetingRoomCapabilitiesUpdateHandler:()=>Iu,registerMeetingRoomStatesUpdateHandler:()=>Tu,sendCommandToPairedMeetingRoom:()=>Au});var x={};n.r(x),n.d(x,{dataLayer:()=>t,isSupported:()=>Ou,telemetry:()=>e});var U={};n.r(U),n.d(U,{isSupported:()=>ku,showNotification:()=>Fu});var L={};n.r(L),n.d(L,{isSupported:()=>Lu,notifyInstallCompleted:()=>Uu,registerAppInstallationHandler:()=>Nu,unregisterAppInstallationHandler:()=>xu});var D={};n.r(D),n.d(D,{ControlCommand:()=>Hu,ErrorReason:()=>Vu,SessionTerminatedReason:()=>_u,getCapableParticipants:()=>Wu,isSupported:()=>Ku,registerOnCapableParticipantsChangeHandler:()=>$u,registerOnDeviceStateChangeHandler:()=>Gu,registerOnErrorHandler:()=>qu,registerOnSessionStatusChangeHandler:()=>Ju,requestControl:()=>Bu,sendControlCommand:()=>ju,terminateSession:()=>zu});var H={};n.r(H),n.d(H,{isSupported:()=>Xu,selectAppEntity:()=>Qu});var V={};n.r(V),n.d(V,{getUserJoinedTeams:()=>ed,isSupported:()=>td});var _={};n.r(_),n.d(_,{getConfigSetting:()=>rd,isSupported:()=>od,joinedTeams:()=>V});var W={};n.r(W),n.d(W,{ChannelType:()=>ad,fullTrust:()=>_,getTeamChannels:()=>sd,isSupported:()=>ld,refreshSiteUrl:()=>cd});var B={};n.r(B),n.d(B,{EffectChangeType:()=>Cd,EffectFailureReason:()=>yd,VideoFrameFormat:()=>wd,isSupported:()=>Td,notifySelectedVideoEffectChanged:()=>Sd,registerForVideoEffect:()=>Ed,registerForVideoFrame:()=>bd});var j={};n.r(j),n.d(j,{ErrorLevel:()=>Zd,frameProcessingTimeoutInMs:()=>Jd,isSupported:()=>of,notifyFatalError:()=>cf,notifySelectedVideoEffectChanged:()=>tf,registerForVideoEffect:()=>nf,registerForVideoFrame:()=>Qd,updatePersonalizedEffects:()=>rf});var z={};n.r(z),n.d(z,{addAndConfigure:()=>hf,getAll:()=>vf,isSupported:()=>bf,reconfigure:()=>wf,remove:()=>yf,rename:()=>Cf});var $={};n.r($),n.d($,{AppTypes:()=>Af,isSupported:()=>If,tab:()=>z});var q={};n.r(q),n.d(q,{isSupported:()=>Uf,openAppDetail:()=>Mf,openFullStore:()=>kf,openInContextStore:()=>Nf,openSpecificStore:()=>xf});var G={};n.r(G),n.d(G,{isSupported:()=>ap,openAppInstallDialog:()=>ip});var J={};n.r(J),n.d(J,{CameraStartMode:()=>dp,File:()=>hp,FileFormat:()=>lp,ImageOutputFormats:()=>mp,ImageUriType:()=>gp,Media:()=>bp,MediaControllerEvent:()=>up,MediaType:()=>pp,Source:()=>fp,VideoController:()=>Ep,captureImage:()=>vp,hasPermission:()=>wp,requestPermission:()=>Cp,scanBarCode:()=>Tp,selectMedia:()=>Ap,viewImages:()=>Ip});var K={};n.r(K),n.d(K,{hasPermission:()=>Wp,isSupported:()=>jp,requestPermission:()=>Bp,scanBarCode:()=>_p});var Z={};n.r(Z),n.d(Z,{isSupported:()=>Jp,openChat:()=>$p,openGroupChat:()=>Gp});var Q={};n.r(Q),n.d(Q,{isSupported:()=>Yp,read:()=>Xp,write:()=>Qp});var X={};n.r(X),n.d(X,{isNAAChannelRecommended:()=>eg});var Y={};n.r(Y),n.d(Y,{chooseLocation:()=>og,isSupported:()=>ag,showLocation:()=>ig});var ee={};n.r(ee),n.d(ee,{getCurrentLocation:()=>cg,hasPermission:()=>lg,isSupported:()=>dg,map:()=>Y,requestPermission:()=>ug});var te={};n.r(te),n.d(te,{isSupported:()=>wg,open:()=>vg});var ne={};n.r(ne),n.d(ne,{getLocation:()=>yg,isSupported:()=>Sg,showLocation:()=>bg});var re={};n.r(re),n.d(re,{setOptions:()=>Ag});var oe={};n.r(oe),n.d(oe,{CallType:()=>Fg,EventActionSource:()=>Mg,MeetingReactionType:()=>Og,MeetingType:()=>Rg,SharingProtocol:()=>kg,appShareButton:()=>re,getAppContentStageSharingCapabilities:()=>jg,getAppContentStageSharingState:()=>$g,getAuthenticationTokenForAnonymousUser:()=>Dg,getIncomingClientAudioState:()=>Ng,getLiveStreamState:()=>Hg,getMeetingDetails:()=>Ug,getMeetingDetailsVerbose:()=>Lg,joinMeeting:()=>Kg,registerLiveStreamChangedHandler:()=>Wg,registerMeetingReactionReceivedHandler:()=>Jg,registerRaiseHandStateChangedHandler:()=>Gg,registerSpeakingStateChangeHandler:()=>qg,requestAppAudioHandling:()=>Zg,requestStartLiveStreaming:()=>Vg,requestStopLiveStreaming:()=>_g,shareAppContentToStage:()=>Bg,stopSharingAppContentToStage:()=>zg,toggleIncomingClientAudio:()=>xg,updateMicState:()=>Yg});var ie={};n.r(ie),n.d(ie,{isSupported:()=>om,openPurchaseExperience:()=>rm});var ae={};n.r(ae),n.d(ae,{composeMeeting:()=>sm,isSupported:()=>cm,openCalendarItem:()=>am});var se={};n.r(se),n.d(se,{composeMailWithHandoff:()=>fm,isSupported:()=>pm});var ce={};n.r(ce),n.d(ce,{ComposeMailType:()=>Cm,composeMail:()=>vm,handoff:()=>se,isSupported:()=>wm,openMailItem:()=>hm});var le={};n.r(le),n.d(le,{enablePrintCapability:()=>bm,isSupported:()=>Pm,print:()=>Sm,registerBeforeUnloadHandler:()=>Im,registerBeforeUnloadHandlerHelper:()=>Tm,registerOnLoadHandler:()=>Em,registerOnLoadHandlerHelper:()=>Am});var ue={};n.r(ue),n.d(ue,{isSupported:()=>Mm,selectPeople:()=>Fm});var de={};n.r(de),n.d(de,{isSupported:()=>Dm,showProfile:()=>Lm});var fe={};n.r(fe),n.d(fe,{closeSearch:()=>$m,isSupported:()=>zm,registerHandlers:()=>Bm,unregisterHandlers:()=>jm});var pe={};n.r(pe),n.d(pe,{getContent:()=>Jm,isSupported:()=>Km});var ge={};n.r(ge),n.d(ge,{SharingAPIMessages:()=>Xm,history:()=>pe,isSupported:()=>oh,shareWebContent:()=>Ym});var me={};n.r(me),n.d(me,{close:()=>ah,isSupported:()=>sh});var he={};n.r(he),n.d(he,{StageViewOpenMode:()=>lh,isSupported:()=>dh,open:()=>uh,self:()=>me});var ve={};n.r(ve),n.d(ve,{captureImages:()=>mh,isSupported:()=>vh,retrieveImages:()=>hh});var we={};n.r(we),n.d(we,{CameraRestriction:()=>Sh,Source:()=>Eh,hasPermission:()=>Ah,image:()=>ve,requestPermission:()=>Ih});var Ce={};n.r(Ce),n.d(Ce,{isSupported:()=>Mh,isWebStorageClearedOnUserLogOut:()=>Fh});var ye={};n.r(ye),n.d(ye,{CallModalities:()=>xh,isSupported:()=>Lh,startCall:()=>Uh});var be={};n.r(be),n.d(be,{ExpectedFailureReason:()=>oo,FailedReason:()=>ro,Messages:()=>no,notifyAppLoaded:()=>Hh,notifyExpectedFailure:()=>Wh,notifyFailure:()=>_h,notifySuccess:()=>Vh});var Se={};n.r(Se),n.d(Se,{getDragAndDropFiles:()=>Kh,isSupported:()=>Qh});var Ee={};n.r(Ee),n.d(Ee,{getSettings:()=>Tv,registerOnRemoveHandler:()=>Rv,registerOnSaveHandler:()=>Ov,setSettings:()=>Pv,setValidityState:()=>Iv});var Ae={};n.r(Ae),n.d(Ae,{getDefaultSizeIfNotProvided:()=>Dv,startTask:()=>Mv,submitTask:()=>xv,updateTask:()=>Nv});var Ie={};n.r(Ie),n.d(Ie,{ContainerState:()=>_v,LiveShareHost:()=>Bv,UserMeetingRole:()=>Vv,isSupported:()=>Wv});var Te={};n.r(Te),n.d(Te,{CartStatus:()=>ow,Intent:()=>rw,addOrUpdateCartItems:()=>aw,cartVersion:()=>nw,getCart:()=>iw,isSupported:()=>lw,removeCartItems:()=>sw,updateCartStatus:()=>cw});var Pe=n(815),Oe=n(933);const Re=ke,Fe=2147483647;function ke(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 Ne(e)}return Me(e,t,n)}function Me(e,t,n){if("string"==typeof e)return De(e,t);if(ArrayBuffer.isView(e))return ze(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(Ve(e,ArrayBuffer)||e&&Ve(e.buffer,ArrayBuffer))return $e(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Ve(e,SharedArrayBuffer)||e&&Ve(e.buffer,SharedArrayBuffer)))return $e(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 ke.from(r,t,n);const o=ft(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return ke.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 Ne(e){return xe(e),Ue(e<0?0:0|Le(e))}function xe(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 Ue(e){if(e>Fe)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,ke.prototype),t}function Le(e){if(e>=Fe)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Fe.toString(16)+" bytes");return 0|e}function De(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!ke.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|He(e,t);let r=Ue(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function He(e,t){if(ke.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Ve(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 _e(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return We(e).length;default:if(o)return r?-1:_e(e).length;t=(""+t).toLowerCase(),o=!0}}function Ve(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function _e(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 We(e){return Oe.toByteArray(je(e))}ke.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}}(),ke.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),ke.from=function(e,t,n){return Me(e,t,n)},Object.setPrototypeOf(ke.prototype,Uint8Array.prototype),Object.setPrototypeOf(ke,Uint8Array),ke.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}},ke.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==ke.prototype};const Be=/[^+/0-9A-Za-z-_]/g;function je(e){if((e=(e=e.split("=")[0]).trim().replace(Be,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function ze(e){if(Ve(e,Uint8Array)){const t=new Uint8Array(e);return $e(t.buffer,t.byteOffset,t.byteLength)}return qe(e)}function $e(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,ke.prototype),r}function qe(e){const t=e.length<0?0:0|Le(e.length),n=Ue(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Ge(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 Ze(r)}function Je(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 Qe(this,t,n);case"utf8":case"utf-8":return Ge(this,t,n);case"ascii":return Xe(this,t,n);case"latin1":case"binary":return Ye(this,t,n);case"base64":return et(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}ke.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Ge(this,0,e):Je.apply(this,arguments)};const Ke=4096;function Ze(e){const t=e.length;if(t<=Ke)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ke));return n}function Qe(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+=dt[e[r]];return o}function Xe(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 Ye(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 et(e,t,n){return 0===t&&n===e.length?Oe.fromByteArray(e):Oe.fromByteArray(e.slice(t,n))}function tt(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 nt(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(ut(r))return a;e[n+a]=r}return a}function rt(e,t,n,r){return lt(_e(t,e.length-n),e,n,r)}function ot(e,t,n,r){return lt(st(t),e,n,r)}function it(e,t,n,r){return lt(We(t),e,n,r)}function at(e,t,n,r){return lt(ct(t,e.length-n),e,n,r)}function st(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function ct(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 lt(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 ut(e){return e!=e}ke.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 nt(this,e,t,n);case"utf8":case"utf-8":return rt(this,e,t,n);case"ascii":case"latin1":case"binary":return ot(this,e,t,n);case"base64":return it(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return at(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const dt=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 ft(e){if(ke.isBuffer(e)){const t=0|Le(e.length),n=Ue(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||ut(e.length)?Ue(0):qe(e):"Buffer"===e.type&&Array.isArray(e.data)?qe(e.data):void 0}const pt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let gt;const mt=new Uint8Array(16);function ht(){if(!gt&&(gt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gt(mt)}const vt=[];for(let e=0;e<256;++e)vt.push((e+256).toString(16).slice(1));function wt(e,t=0){return vt[e[t+0]]+vt[e[t+1]]+vt[e[t+2]]+vt[e[t+3]]+"-"+vt[e[t+4]]+vt[e[t+5]]+"-"+vt[e[t+6]]+vt[e[t+7]]+"-"+vt[e[t+8]]+vt[e[t+9]]+"-"+vt[e[t+10]]+vt[e[t+11]]+vt[e[t+12]]+vt[e[t+13]]+vt[e[t+14]]+vt[e[t+15]]}const Ct=function(e,t,n){if(pt.randomUUID&&!t&&!e)return pt.randomUUID();const r=(e=e||{}).random||(e.rng||ht)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return wt(r)},yt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const bt=function(e){return"string"==typeof e&&yt.test(e)};var St,Et,At,It,Tt,Pt,Ot,Rt,Ft,kt,Mt,Nt,xt,Ut,Lt,Dt,Ht;function Vt(e){return void 0!==(null==e?void 0:e.errorCode)}!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(St||(St={})),function(e){e.M365Content="m365content"}(Et||(Et={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(At||(At={})),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"}(It||(It={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Tt||(Tt={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Pt||(Pt={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Ot||(Ot={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(Rt||(Rt={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Ft||(Ft={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(kt||(kt={})),function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(Mt||(Mt={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(Nt||(Nt={})),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"}(xt||(xt={})),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"}(Ut||(Ut={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(Lt||(Lt={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(Dt||(Dt={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Ht||(Ht={}));const _t={errorCode:It.NOT_SUPPORTED_ON_PLATFORM},Wt={majorVersion:1,minorVersion:5},Bt={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},jt=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),zt=new Error("Invalid response: Received more images than the specified max limit in the response.");function $t(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function qt(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 Gt(){return Ct()}function Jt(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&Jt(e[t])})),Object.freeze(e)}function Kt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Zt(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function Qt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Xt(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 Yt(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 en(e){return!(qt(`${e.majorVersion}.${e.minorVersion}`,`${Wt.majorVersion}.${Wt.minorVersion}`)>=0)}function tn(e){return"https:"===e.protocol}function nn(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=Re.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function rn(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function on(){if(an())throw new Error("window object undefined at SSR check");return window}function an(){return"undefined"==typeof window}function sn(e,t){if(un(e)||!dn(e)||!fn(e))throw t||new Error("id is not valid.")}function cn(e,t){const n=e.toString().toLocaleLowerCase();if(un(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!tn(e))throw t||new Error("Url should be a valid https url")}function ln(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function un(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function dn(e){return e.length<256&&e.length>4}function fn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function pn(e){if(!e)throw new Error("id must not be empty");if(!1===bt(e))throw new Error("id must be a valid UUID")}const gn=!!performance&&"now"in performance;function mn(){return gn?performance.now()+performance.timeOrigin:void 0}function hn(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=>hn(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=>hn(e[n],t+1)))}class vn{constructor(e=Gt()){this.uuid=e,pn(e)}toString(){return this.uuid}}const wn=new vn,Cn=Pe.debug.formatArgs;Pe.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${wn.toString()}]`,Cn.call(this,e)};const yn=(0,Pe.debug)("teamsJs");function bn(e){return yn.extend(e)}function Sn(e,t){return`${e}_${t}`}function En(e){return/^v\d+_[\w.]+$/.test(e)}const An=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const In="2.0.1",Tn="2.0.2",Pn="2.0.3",On="2.0.4",Rn="2.0.1",Fn="1.9.0",kn="2.0.0",Mn="1.7.0",Nn="1.8.0",xn="1.9.0",Un=n.t(An,2).validOrigins,Ln=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),Dn=/^https:\/\//,Hn="https",Vn="teams.microsoft.com",_n="The library has not yet been initialized",Wn="The runtime has not yet been initialized",Bn="The runtime version is not supported",jn="The call was not properly started";class zn{}zn.initializeCalled=!1,zn.initializeCompleted=!1,zn.additionalValidOrigins=[],zn.initializePromise=void 0,zn.isFramelessWindow=!1,zn.frameContext=void 0,zn.hostClientType=void 0,zn.printCapabilityEnabled=!1;var $n=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 qn=bn("runtime"),Gn=4;function Jn(e){return e.apiVersion===Gn}const Kn={apiVersion:-1,supports:{}};function Zn(e){if(Jn(e))return!0;throw-1===e.apiVersion?new Error(Wn):new Error(Bn)}let Qn=Kn;const Xn={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:Bt,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:{}}}},Yn=[Mt.desktop,Mt.web,Mt.rigel,Mt.surfaceHub,Mt.teamsRoomsWindows,Mt.teamsRoomsAndroid,Mt.teamsPhones,Mt.teamsDisplays],er=[Mt.android,Mt.ios,Mt.ipados],tr=[...Yn,...er];function nr(e){let t=e;if(t.apiVersion<Gn&&rr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),Jn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const rr=[{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=$n(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})}}}],or={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:Yn}],"1.9.0":[{capability:{location:{}},hostClientTypes:tr}],"2.0.0":[{capability:{people:{}},hostClientTypes:tr},{capability:{sharing:{}},hostClientTypes:[Mt.desktop,Mt.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[Mt.android,Mt.desktop,Mt.ios,Mt.teamsRoomsAndroid,Mt.teamsPhones,Mt.teamsDisplays,Mt.web]},{capability:{webStorage:{}},hostClientTypes:[Mt.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[Mt.android,Mt.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[Mt.android,Mt.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[Mt.android,Mt.ios,Mt.ipados]}]},ir=qn.extend("generateBackCompatRuntimeConfig");function ar(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]=ar(e[r]||{},t[r]));return n}function sr(e,t,n){ir("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);ir("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{qt(e,t)>=0&&n[t].forEach((e=>{void 0!==zn.hostClientType&&e.hostClientTypes.includes(zn.hostClientType)&&(r=ar(r,e.capability))}))}));const o={apiVersion:Gn,hostVersionsInfo:Bt,isLegacyTeams:!0,supports:r};return ir("Runtime config after updating based on highestSupportedVersion: %o",o),o}const cr=qn.extend("applyRuntimeConfig");function lr(e){"string"==typeof e.apiVersion&&(cr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),cr("Fast-forwarding runtime %o",e);const t=nr(e);cr("Applying runtime %o",t),Qn=Jt(t)}function ur(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const dr="2.34.0-beta.1",fr=bn("internal"),pr=fr.extend("ensureInitializeCalled"),gr=fr.extend("ensureInitialized");function mr(){if(!zn.initializeCalled)throw pr(_n),new Error(_n)}function hr(e,...t){if(!zn.initializeCompleted)throw gr("%s. initializeCalled: %s",_n,zn.initializeCalled.toString()),new Error(_n);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===zn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${zn.frameContext}".`)}return Zn(e)}function vr(e=In){const t=qt(zn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function wr(){return zn.hostClientType==Mt.android||zn.hostClientType==Mt.ios||zn.hostClientType==Mt.ipados}function Cr(e=In){if(!wr()){throw{errorCode:It.NOT_SUPPORTED_ON_PLATFORM}}if(!vr(e)){throw{errorCode:It.OLD_PLATFORM}}}function yr(e){let t=zn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&Dn.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),zn.additionalValidOrigins=t}function br(e){if(un(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(!Ar(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Sr}-${Er}).`);if(Ir(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Sr=4,Er=256;function Ar(e){return e.length<Er&&e.length>Sr}function Ir(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Tr(e){if(!(e instanceof Pr))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Pr{constructor(e){this.appIdAsString=e,br(e)}serialize(){return this.toString()}toString(){return this.appIdAsString}}function Or(e){return null==e}var Rr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let Fr=[];const kr=bn("validateOrigin");function Mr(){return Rr(this,void 0,void 0,(function*(){yield xr()}))}function Nr(){return 0===Fr.length}function xr(){return Rr(this,void 0,void 0,(function*(){return Nr()?an()?(Fr=Un,Un):fetch(Ln).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(Ur(JSON.stringify(e)))return Fr=e.validOrigins,Fr;throw new Error("Valid Origins List Is Invalid")}))})).catch((e=>(kr("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Fr=Un,Fr))):Fr}))}function Ur(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 kr("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function Lr(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function Dr(e){return xr().then((t=>{if(!tn(e))return kr("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>Lr(e,n))))return!0;for(const e of zn.additionalValidOrigins){if(Lr("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return kr("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,zn.additionalValidOrigins),!1}))}var Hr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let Vr;const _r="v1",Wr=bn("messageChannels.telemetry");function Br(){return Hr(this,void 0,void 0,(function*(){if(Vr)return Wr("Returning telemetry port from cache"),Vr;if(!jr())throw _t;return Vr=yield Ks(Sn(_r,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),Vr}))}function jr(){var e;return!(!hr(Qn)||!(null===(e=Qn.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function zr(){Vr=void 0}var $r=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 qr;const Gr="v1",Jr=bn("messageChannels.dataLayer");function Kr(){return $r(this,void 0,void 0,(function*(){if(qr)return Jr("Returning dataLayer port from cache"),qr;if(!Zr())throw _t;return qr=yield Ks(Sn(Gr,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),qr}))}function Zr(){var e;return!(!hr(Qn)||!(null===(e=Qn.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Qr(){qr=void 0}function Xr(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");hr(Qn),Ss(e)}function Yr(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");hr(Qn),Es(e)}const eo="v2",to=bn("app"),no={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var ro,oo;function io(){return zn.initializeCompleted}function ao(){return zn.frameContext}function so(e){return Mr(),Qi(Sn(eo,"app.initialize"),e)}function co(e){Ds.currentWindow=e}function lo(){zn.initializeCalled&&(as(),zn.initializeCalled=!1,zn.initializeCompleted=!1,zn.initializePromise=void 0,zn.additionalValidOrigins=[],zn.frameContext=void 0,zn.hostClientType=void 0,zn.isFramelessWindow=!1,zr(),Qr(),_s())}function uo(){return new Promise((e=>{mr(),e(Ws(Sn(eo,"app.getContext"),"getContext"))})).then((e=>Co(e)))}function fo(){mr(),Xi(Sn(eo,"app.notifyAppLoaded"))}function po(){return ta(Sn(eo,"app.notifySuccess"))}function go(e){mr(),ea(Sn(eo,"app.notifyFailure"),e)}function mo(e){mr(),Yi(Sn(eo,"app.notifyExpectedFailure"),e)}function ho(e){aa(Sn(eo,"app.registerOnThemeChangeHandler"),e)}function vo(e){ms(e)}function wo(e){return sa(Sn(eo,"app.openLink"),e)}function Co(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:Nt.teams,clientType:e.hostClientType?e.hostClientType:Mt.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:zn.frameContext,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(ro||(ro={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(oo||(oo={})),to("teamsjs instance is version %s, starting at %s UTC (%s local)",dr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(an())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?to("teamsjs is being used from %s. %s",t,n):to("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const yo="v1",bo="v2";let So,Eo,Ao;function Io(){ls(Sn(yo,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",Vo,!1),ls(Sn(yo,"authentication.registerAuthenticateFailureHandler"),"authentication.authenticate.failure",_o,!1)}function To(e){Ao=e}function Po(e){const t=void 0!==e,n=t?e:Ao;if(!n)throw new Error("No parameters are provided for authentication");hr(Qn,xt.content,xt.sidePanel,xt.settings,xt.remove,xt.task,xt.stage,xt.meetingStage);return Oo(n.successCallback||n.failureCallback?Sn(yo,"authentication.authenticate"):Sn(bo,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Ao=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Ao=void 0)}}))}function Oo(e,t){return new Promise(((n,r)=>{if(zn.hostClientType!==Mt.web){const r=ln(t.url);cn(r),n($s(e,"authentication.authenticate",[r.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)})))}else So={success:n,fail:r},xo(t)}))}function Ro(e){mr();return Fo(e&&(e.successCallback||e.failureCallback)?Sn(yo,"authentication.getAuthToken"):Sn(bo,"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 Fo(e,t){return new Promise((n=>{n($s(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 ko(e){mr();return Mo(e&&(e.successCallback||e.failureCallback)?Sn(yo,"authentication.getUser"):Sn(bo,"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 Mo(e){return new Promise((t=>{t($s(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function No(){Uo();try{Ds.childWindow&&Ds.childWindow.close()}finally{Ds.childWindow=null,Ds.childOrigin=null}}function xo(e){No();let t=e.width||600,n=e.height||400;t=Math.min(t,Ds.currentWindow.outerWidth-400),n=Math.min(n,Ds.currentWindow.outerHeight-200);const r=ln(e.url.replace("{oauthRedirectMethod}","web"));cn(r);let o=void 0!==Ds.currentWindow.screenLeft?Ds.currentWindow.screenLeft:Ds.currentWindow.screenX,i=void 0!==Ds.currentWindow.screenTop?Ds.currentWindow.screenTop:Ds.currentWindow.screenY;o+=Ds.currentWindow.outerWidth/2-t/2,i+=Ds.currentWindow.outerHeight/2-n/2,Ds.childWindow=Ds.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),Ds.childWindow?Lo():_o("FailedToOpenWindow")}function Uo(){Eo&&(clearInterval(Eo),Eo=0),us("initialize"),us("navigateCrossDomain")}function Lo(){Uo(),Eo=Ds.currentWindow.setInterval((()=>{if(!Ds.childWindow||Ds.childWindow.closed)_o("CancelledByUser");else{const e=Ds.childOrigin;try{Ds.childOrigin="*",Oc("ping")}finally{Ds.childOrigin=e}}}),100),ls(Sn(yo,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[xt.authentication,zn.hostClientType])),ls(Sn(yo,"authentication.authenticationWindow.registerNavigateCrossDomainHandler"),"navigateCrossDomain",(()=>!1))}function Do(e,t){hr(Qn,xt.authentication);Xs(Sn(t?yo:bo,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Tc(Ds.parentWindow,(()=>setTimeout((()=>Ds.currentWindow.close()),200)))}function Ho(e,t){hr(Qn,xt.authentication);Xs(Sn(t?yo:bo,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Tc(Ds.parentWindow,(()=>setTimeout((()=>Ds.currentWindow.close()),200)))}function Vo(e){try{So&&So.success(e)}finally{So=void 0,No()}}function _o(e){try{So&&So.fail(new Error(e))}finally{So=void 0,No()}}var Wo;function Bo(e){ni(Sn(ti,"dialog.update.resize"),e)}function jo(){return!(!hr(Qn)||!Qn.supports.dialog)&&!!Qn.supports.dialog.update}function zo(e,t,n){oi(Sn(ti,"dialog.url.bot.open"),e,t,n)}function $o(){return hr(Qn)&&void 0!==(Qn.supports.dialog&&Qn.supports.dialog.url&&Qn.supports.dialog.url.bot)}function qo(e){if(hr(Qn,xt.task),!Ko())throw _t;Xs(Sn(ti,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Go(e){if(hr(Qn,xt.content,xt.sidePanel,xt.meetingStage),!Ko())throw _t;Xs(Sn(ti,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Jo(e){if(hr(Qn,xt.task),!Ko())throw _t;for(us("messageForChild"),ls(Sn(ti,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ci.reverse();ci.length>0;){e(ci.pop())}}function Ko(){var e,t;return hr(Qn)&&!!(null===(t=null===(e=Qn.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Zo(e,t,n){ri(Sn(ti,"dialog.url.open"),e,t,n)}function Qo(e,t){ii(Sn(ti,"dialog.url.submit"),e,t)}function Xo(){return hr(Qn)&&void 0!==(Qn.supports.dialog&&Qn.supports.dialog.url)}function Yo(e){return{url:e.url,height:e.size?e.size.height:Dt.Small,width:e.size?e.size.width:Dt.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function ei(e){const t=Yo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(Wo||(Wo={}));const ti="v2";function ni(e,t){if(hr(Qn,xt.content,xt.sidePanel,xt.task,xt.meetingStage),!jo())throw _t;Xs(e,"tasks.updateTask",[t])}function ri(e,t,n,r){if(hr(Qn,xt.content,xt.sidePanel,xt.meetingStage),!Xo())throw _t;r&&ls(Sn(ti,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Xs(e,"tasks.startTask",[Yo(t)],((e,t)=>{null==n||n({err:e,result:t}),us("messageForParent")}))}function oi(e,t,n,r){if(hr(Qn,xt.content,xt.sidePanel,xt.meetingStage),!$o())throw _t;r&&ls(Sn(ti,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Xs(e,"tasks.startTask",[ei(t)],((e,t)=>{null==n||n({err:e,result:t}),us("messageForParent")}))}function ii(e,t,n){if(hr(Qn,xt.task),!Xo())throw _t;Xs(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function ai(e){return{card:e.card,height:e.size?e.size.height:Dt.Small,width:e.size?e.size.width:Dt.Small,title:e.title}}function si(e){const t=ai(e);return t.completionBotId=e.completionBotId,t}const ci=[];function li(e){zn.frameContext&&(zn.frameContext===xt.task?ci.push(e):us("messageForChild"))}function ui(e,t){if(hr(Qn,xt.content,xt.sidePanel,xt.meetingStage),!di())throw _t;const n=si(e);Xs(Sn(ti,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function di(){const e=Qn.hostVersionsInfo&&Qn.hostVersionsInfo.adaptiveCardSchemaVersion&&!en(Qn.hostVersionsInfo.adaptiveCardSchemaVersion);return hr(Qn)&&void 0!==(e&&Qn.supports.dialog&&Qn.supports.dialog.card&&Qn.supports.dialog.card.bot)}function fi(e,t){if(hr(Qn,xt.content,xt.sidePanel,xt.meetingStage),!pi())throw _t;const n=ai(e);Xs(Sn(ti,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function pi(){const e=Qn.hostVersionsInfo&&Qn.hostVersionsInfo.adaptiveCardSchemaVersion&&!en(Qn.hostVersionsInfo.adaptiveCardSchemaVersion);return hr(Qn)&&void 0!==(e&&Qn.supports.dialog&&Qn.supports.dialog.card)}function gi(){ls(Sn(ti,"dialog.registerMessageForChildHandler"),"messageForChild",li,!1)}function mi(){return!(!hr(Qn)||!Qn.supports.dialog)}const hi="v2";var vi,wi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(vi||(vi={}));class Ci{constructor(){this.enabled=!0,this.selected=!1}}let yi,bi,Si,Ei,Ai;function Ii(){ls(Sn(hi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Ri,!1),ls(Sn(hi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",ki,!1),ls(Sn(hi,"menus.registerSetModuleViewHandler"),"setModuleView",Pi,!1)}function Ti(e,t){if(hr(Qn),!Mi())throw _t;Si=t,Xs(Sn(hi,"menus.setUpViews"),"setUpViews",[e])}function Pi(e){Si&&Si(e)||(hr(Qn),Xs(Sn(hi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Oi(e,t){if(hr(Qn),!Mi())throw _t;yi=t,Xs(Sn(hi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Ri(e){yi&&yi(e)||(hr(Qn),Xs(Sn(hi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Fi(e,t){if(hr(Qn),!Mi())throw _t;bi=t,Xs(Sn(hi,"menus.showActionMenu"),"showActionMenu",[e])}function ki(e){bi&&bi(e)||(hr(Qn),Xs(Sn(hi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Mi(){return!(!hr(Qn)||!Qn.supports.menus)}function Ni(){ls(Sn(xa,"pages.config.registerSettingsSaveHandler"),"settings.save",_i,!1),ls(Sn(xa,"pages.config.registerSettingsRemoveHandler"),"settings.remove",ji,!1)}function xi(e){return ja(Sn(xa,"pages.config.setValidityState"),e)}function Ui(e){return $a(Sn(xa,"pages.config.setConfig"),e)}function Li(e){Di(Sn(xa,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Or(e)&&!$i())throw _t}))}function Di(e,t,n){!Or(t)&&hr(Qn,xt.settings),n&&n(),Ei=t,!Or(t)&&Xs(e,"registerHandler",["save"])}function Hi(e){Vi(Sn(xa,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Or(e)&&!$i())throw _t}))}function Vi(e,t,n){!Or(t)&&hr(Qn,xt.remove,xt.settings),n&&n(),Ai=t,!Or(t)&&Xs(e,"registerHandler",["remove"])}function _i(e){const t=new Bi(e);Ei?Ei(t):Ds.childWindow?Oc("settings.save",[e]):t.notifySuccess()}function Wi(e){fs(Sn(xa,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[xt.content],(()=>{if(!$i())throw _t}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(wi||(wi={}));class Bi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Xs(Sn(xa,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Xs(Sn(xa,"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 ji(){const e=new zi;Ai?Ai(e):Ds.childWindow?Oc("settings.remove",[]):e.notifySuccess()}class zi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Xs(Sn(xa,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Xs(Sn(xa,"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 $i(){return!(!hr(Qn)||!Qn.supports.pages)&&!!Qn.supports.pages.config}class qi{}class Gi extends qi{validate(e){return!0}deserialize(e){return e}}var Ji=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 Ki=6e4,Zi=bn("app");function Qi(e,t){if(an()){return Zi.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Xt((()=>ia(e,t)),Ki,new Error("SDK initialization timed out."))}function Xi(e){Xs(e,no.AppLoaded,[dr])}function Yi(e,t){Xs(e,no.ExpectedFailure,[t.reason,t.message])}function ea(e,t){Xs(e,no.Failure,[t.reason,t.message])}function ta(e){return Ji(this,void 0,void 0,(function*(){if(zn.initializeCompleted)return ra(e);if(!zn.initializePromise)throw new Error(_n);return zn.initializePromise.then((()=>ra(e)))}))}function na(){var e;return hr(Qn)&&!!(null===(e=Qn.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ra(e){return Ji(this,void 0,void 0,(function*(){return na()?Gs(no.Success,[dr],new Gi,e).then((()=>({hasFinishedSuccessfully:!0}))):(Xs(e,no.Success,[dr]),{hasFinishedSuccessfully:"unknown"})}))}const oa=Zi.extend("initializeHelper");function ia(e,t){return new Promise((n=>{zn.initializeCalled||(zn.initializeCalled=!0,is(),zn.initializePromise=Vs(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=In})=>{zn.frameContext=e,zn.hostClientType=t,zn.clientSupportedSDKVersion=r;try{oa("Parsing %s",n);const e=JSON.parse(n);if(oa("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&lr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{oa("Attempting to parse %s as an SDK version",n),isNaN(qt(n,In))||(zn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(oa("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");lr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;lr(sr(zn.clientSupportedSDKVersion,Xn,or))}}zn.initializeCompleted=!0})),Io(),Ii(),Ni(),gi()),Array.isArray(t)&&yr(t),void 0!==zn.initializePromise?n(zn.initializePromise):oa("GlobalVars.initializePromise is unexpectedly undefined")}))}function aa(e,t){!Or(t)&&mr(),ps(e,t)}function sa(e,t){return new Promise((n=>{hr(Qn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),n(Bs(e,"executeDeepLink",t))}))}function ca(e){fs(Sn(xa,"pages.appButton.onClick"),"appButtonClick",e,[xt.content],(()=>{if(!da())throw _t}))}function la(e){fs(Sn(xa,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[xt.content],(()=>{if(!da())throw _t}))}function ua(e){fs(Sn(xa,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[xt.content],(()=>{if(!da())throw _t}))}function da(){return!(!hr(Qn)||!Qn.supports.pages)&&!!Qn.supports.pages.appButton}function fa(e){return new Promise((t=>{if(hr(Qn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!ga())throw _t;t(zs(Sn(xa,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function pa(){return new Promise((e=>{if(hr(Qn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!ga())throw _t;e(zs(Sn(xa,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function ga(){return!(!hr(Qn)||!Qn.supports.pages)&&!!Qn.supports.pages.currentApp}function ma(){if(hr(Qn,xt.content),!va())throw _t;Xs(Sn(xa,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function ha(){if(hr(Qn,xt.content),!va())throw _t;Xs(Sn(xa,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function va(){return!(!hr(Qn)||!Qn.supports.pages)&&!!Qn.supports.pages.fullTrust}function wa(e){return Da(Sn(xa,"pages.tabs.navigateToTab"),e)}function Ca(e){return Va(Sn(xa,"pages.tabs.getTabInstances"),e)}function ya(e){return _a(Sn(xa,"pages.tabs.getMruTabInstances"),e)}function ba(){return!(!hr(Qn)||!Qn.supports.pages)&&!!Qn.supports.pages.tabs}var Sa,Ea;function Aa(e){const t=Sn(xa,"pages.returnFocus");if(hr(Qn),!Na())throw _t;if(void 0===e&&Xs(t,"returnFocus",[!1]),"boolean"==typeof e)Xs(t,"returnFocus",[e]);else switch(e){case Ea.PreviousLandmark:case Ea.GoToActivityFeed:Xs(t,"returnFocus",[!1,e]);break;case Ea.NextLandmark:Xs(t,"returnFocus",[!0,e])}}function Ia(e){fs(Sn(xa,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!Na())throw _t}))}function Ta(e){Ba(Sn(xa,"pages.setCurrentFrame"),e)}function Pa(e,t,n){Mr(),Qi(Sn(xa,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Ta(e)}function Oa(){return za(Sn(xa,"pages.getConfig."))}function Ra(e){return Ua(Sn(xa,"pages.navigateCrossDomain"),e)}function Fa(e){return new Promise((t=>{if(hr(Qn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!Na())throw _t;const n=Sn(xa,"pages.navigateToApp");if(Qn.isLegacyTeams){t(Bs(n,"executeDeepLink",Yt(qa(e)?e:Ga(e))))}else{t(Bs(n,"pages.navigateToApp",qa(e)?Ja(e):e))}}))}function ka(e){return Wa(Sn(xa,"pages.shareDeepLink"),e)}function Ma(e){fs(Sn(xa,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Or(e)&&!Na())throw _t}))}function Na(){return!(!hr(Qn)||!Qn.supports.pages)}!function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Sa||(Sa={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Ea||(Ea={}));const xa="v2";function Ua(e,t){return new Promise((n=>{if(hr(Qn,xt.content,xt.sidePanel,xt.settings,xt.remove,xt.task,xt.stage,xt.meetingStage),!Na())throw _t;n(js(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function La(e){return new Promise((t=>{if(hr(Qn),!ts())throw _t;t(js(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function Da(e,t){return new Promise((n=>{if(hr(Qn),!ba())throw _t;n(js(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Ha(e,t){if(hr(Qn),!Na())throw _t;Xs(e,"returnFocus",[t])}function Va(e,t){return new Promise((n=>{if(hr(Qn),!ba())throw _t;n(Ws(e,"getTabInstances",t))}))}function _a(e,t){return new Promise((n=>{if(hr(Qn),!ba())throw _t;n(Ws(e,"getMruTabInstances",t))}))}function Wa(e,t){if(hr(Qn,xt.content,xt.sidePanel,xt.meetingStage),!Na())throw _t;Xs(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function Ba(e,t){if(hr(Qn,xt.content),!Na())throw _t;Xs(e,"setFrameContext",[t])}function ja(e,t){if(hr(Qn,xt.settings,xt.remove),!$i())throw _t;Xs(e,"settings.setValidityState",[t])}function za(e){return new Promise((t=>{if(hr(Qn,xt.content,xt.settings,xt.remove,xt.sidePanel),!Na())throw _t;t(Ws(e,"settings.getSettings"))}))}function $a(e,t){return new Promise((n=>{if(hr(Qn,xt.content,xt.settings,xt.sidePanel),!$i())throw _t;n(Bs(e,"settings.setSettings",t))}))}function qa(e){return e.appId instanceof Pr}function Ga(e){return Object.assign(Object.assign({},e),{appId:new Pr(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function Ja(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let Ka;function Za(){ls(Sn(xa,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",es,!1)}function Qa(){return La(Sn(xa,"pages.backStack.navigateBack"))}function Xa(e){Ya(Sn(xa,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Or(e)&&!ts())throw _t}))}function Ya(e,t,n){!Or(t)&&hr(Qn),n&&n(),Ka=t,!Or(t)&&Xs(e,"registerHandler",["backButton"])}function es(){Ka&&Ka()||(Ds.childWindow?Oc("backButtonPress",[]):Qa())}function ts(){return!(!hr(Qn)||!Qn.supports.pages)&&!!Qn.supports.pages.backStack}var ns=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const rs=bn("handlers");class os{static initializeHandlers(){os.handlers.themeChange=gs,os.handlers.load=ws,os.handlers.beforeUnload=bs,Za()}static uninitializeHandlers(){os.handlers={},os.themeChangeHandler=null,os.loadHandler=null,os.beforeUnloadHandler=null,os.beforeSuspendOrTerminateHandler=null,os.resumeHandler=null}}function is(){os.initializeHandlers()}function as(){os.uninitializeHandlers()}os.handlers={},os.themeChangeHandler=null,os.loadHandler=null,os.beforeUnloadHandler=null,os.beforeSuspendOrTerminateHandler=null,os.resumeHandler=null,os.hostToAppPerformanceMetricsHandler=null;const ss=rs.extend("callHandler");function cs(e,t){const n=os.handlers[e];if(n){ss("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Ds.childWindow?(Oc(e,t),[!1,void 0]):(ss("Handler for action message %s not found.",e),[!1,void 0])}function ls(e,t,n,r=!0,o=[]){n?(os.handlers[t]=n,r&&Xs(e,"registerHandler",[t,...o])):delete os.handlers[t]}function us(e){delete os.handlers[e]}function ds(e){return null!=os.handlers[e]}function fs(e,t,n,r,o){n&&hr(Qn,...r),o&&o(),ls(e,t,n)}function ps(e,t){os.themeChangeHandler=t,!Or(t)&&Xs(e,"registerHandler",["themeChange"])}function gs(e){os.themeChangeHandler&&os.themeChangeHandler(e),Ds.childWindow&&Oc("themeChange",[e])}function ms(e){os.hostToAppPerformanceMetricsHandler=e}function hs(e){os.hostToAppPerformanceMetricsHandler&&os.hostToAppPerformanceMetricsHandler(e)}function vs(e,t){os.loadHandler=t,!Or(t)&&Xs(e,"registerHandler",["load"])}function ws(e){const t=Cs(e);os.resumeHandler?(os.resumeHandler(t),Ds.childWindow&&Oc("load",[t])):os.loadHandler&&(os.loadHandler(e),Ds.childWindow&&Oc("load",[e]))}function Cs(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function ys(e,t){os.beforeUnloadHandler=t,!Or(t)&&Xs(e,"registerHandler",["beforeUnload"])}function bs(){return ns(this,void 0,void 0,(function*(){const e=()=>{Xs(Sn("v2","handleBeforeUnload"),"readyToUnload",[])};os.beforeSuspendOrTerminateHandler?(yield os.beforeSuspendOrTerminateHandler(),Ds.childWindow?Oc("beforeUnload"):e()):os.beforeUnloadHandler&&os.beforeUnloadHandler(e)||(Ds.childWindow?Oc("beforeUnload"):e())}))}function Ss(e){os.beforeSuspendOrTerminateHandler=e,!Or(e)&&Xs(Sn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Es(e){os.resumeHandler=e,!Or(e)&&Xs(Sn("v2","registerOnResumeHandler"),"registerHandler",["load"])}class As{static storeCallbackInformation(e,t){As.callbackInformation.set(e,t)}static clearMessages(){As.callbackInformation.clear()}static deleteMessageInformation(e){As.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?hs({actionName:e.func,messageDelay:n-r,requestStartedAt:r}):t("Unable to send performance metrics for event %s",e.func)}static handlePerformanceMetrics(e,t,n,r){const o=As.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(hs({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),As.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}As.callbackInformation=new Map;var Is=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 Ts=e=>{const{uuid:t}=e,n=Is(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Ps=e=>{const{uuidAsString:t}=e,n=Is(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new vn(t):void 0})},Os=e=>{const{uuidAsString:t}=e,n=Is(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new vn(t):void 0})},Rs=e=>{const{uuid:t}=e,n=Is(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Fs=bn("nestedAppAuthUtils"),ks=Fs.extend("tryPolyfillWithNestedAppAuthBridge");function Ms(e,t,n){var r;const o=ks;if(zn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=xs(a,n);s&&(a.nestedAppAuthBridge=s)}const Ns=Fs.extend("createNestedAppAuthBridge");function xs(e,t){const n=Ns;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();t&&"object"==typeof t&&"NestedAppAuthRequest"===t.messageType?o(e):n("Unrecognized data format received by app, message being ignored. Message: %o",e)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var Us=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ls=bn("communication");class Ds{}class Hs{}function Vs(e,t){if(Hs.messageListener=e=>ac(e),Ds.currentWindow=Ds.currentWindow||on(),Ds.parentWindow=Ds.currentWindow.parent!==Ds.currentWindow.self?Ds.currentWindow.parent:Ds.currentWindow.opener,Ds.topWindow=Ds.currentWindow.top,(Ds.parentWindow||e)&&Ds.currentWindow.addEventListener("message",Hs.messageListener,!1),!Ds.parentWindow){const e=Ds.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));zn.isFramelessWindow=!0,e.onNativeMessage=hc}try{return Ds.parentOrigin="*",$s(t,"initialize",[dr,Gn,e]).then((([e,t,n,r])=>(Ms(r,Ds.currentWindow,{onMessage:cc,sendPostMessage:ec}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Ds.parentOrigin=null}}function _s(){Ds.currentWindow&&Ds.currentWindow.removeEventListener("message",Hs.messageListener,!1),Ds.currentWindow=null,Ds.parentWindow=null,Ds.parentOrigin=null,Ds.childWindow=null,Ds.childOrigin=null,Hs.parentMessageQueue=[],Hs.childMessageQueue=[],Hs.nextMessageId=0,Hs.callbacks.clear(),Hs.promiseCallbacks.clear(),Hs.portCallbacks.clear(),Hs.legacyMessageIdsToUuidMap={},As.clearMessages()}function Ws(e,t,...n){return $s(e,t,n).then((([e])=>e))}function Bs(e,t,...n){return $s(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function js(e,t,n,...r){return $s(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function zs(e,t,...n){return $s(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function $s(e,t,n=void 0){if(!En(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(Qs(oc(e,t,n).uuid))}))}function qs(e){return e.map((e=>ur(e)?e.serialize():e))}function Gs(e,t,n,r,o){var i;return Us(this,void 0,void 0,(function*(){const a=qs(t),[s]=yield $s(r,e,a);if(o&&o(s)||!o&&Vt(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(`${It.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function Js(e,t,n,r){var o;return Us(this,void 0,void 0,(function*(){const i=qs(t),[a]=yield $s(n,e,i);if(r&&r(a)||!r&&Vt(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${It.INTERNAL_ERROR}, message: Invalid response from host`)}))}function Ks(e,t,n=void 0){if(!En(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 Zs(oc(e,t,n).uuid)}function Zs(e){return new Promise(((t,n)=>{Hs.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 Qs(e){return new Promise((t=>{Hs.promiseCallbacks.set(e,t)}))}function Xs(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!En(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=oc(e,t,o);r&&Hs.callbacks.set(i.uuid,r)}Hs.parentMessageQueue=[],Hs.childMessageQueue=[],Hs.topMessageQueue=[],Hs.nextMessageId=0,Hs.callbacks=new Map,Hs.promiseCallbacks=new Map,Hs.portCallbacks=new Map,Hs.legacyMessageIdsToUuidMap={};const Ys=Ls.extend("sendNestedAuthRequestToTopWindow");function ec(e){const t=Ys,n=Ds.topWindow,r=Fc(e);return t("Message %s information: %o",Nc(r),{actionName:r.func}),nc(n,r)}const tc=Ls.extend("sendRequestToTargetWindowHelper");function nc(e,t){const n=tc,r=Ec(e),o=Ts(t);if(zn.isFramelessWindow)Ds.currentWindow&&Ds.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Nc(o),r),Ds.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Sc(e);e&&i?(n("Sending message %s to %s via postMessage",Nc(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Nc(o),r),bc(e).push(t))}return t}const rc=Ls.extend("sendMessageToParentHelper");function oc(e,t,n){const r=rc,o=Ds.parentWindow,i=Rc(e,t,n);return As.storeCallbackInformation(i.uuid,{name:t,calledAt:i.timestamp}),r("Message %s information: %o",Nc(i),{actionName:t,args:n}),nc(o,i)}const ic=Ls.extend("processIncomingMessage");function ac(e){return Us(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void ic("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 uc(t,n).then((r=>{r?(dc(t,n),t===Ds.parentWindow?hc(e):t===Ds.childWindow&&Cc(e)):ic("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 sc=Ls.extend("processAuthBridgeMessage");function cc(e,t){var n,r;const o=sc;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),l=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?uc(c,l)?(Ds.topWindow&&!Ds.topWindow.closed&&c!==Ds.topWindow||(Ds.topWindow=c,Ds.topOrigin=l),Ds.topWindow&&Ds.topWindow.closed&&(Ds.topWindow=null,Ds.topOrigin=null),Ic(Ds.topWindow),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const lc=Ls.extend("shouldProcessIncomingMessage");function uc(e,t){return Us(this,void 0,void 0,(function*(){if(Ds.currentWindow&&e===Ds.currentWindow)return lc("Should not process message because it is coming from the current window"),!1;if(Ds.currentWindow&&Ds.currentWindow.location&&t&&t===Ds.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return lc("Message has an invalid origin of %s",t),!1}const n=yield Dr(e);return n||lc("Message has an invalid origin of %s",t),n}}))}function dc(e,t){zn.isFramelessWindow||Ds.parentWindow&&!Ds.parentWindow.closed&&e!==Ds.parentWindow?Ds.childWindow&&!Ds.childWindow.closed&&e!==Ds.childWindow||(Ds.childWindow=e,Ds.childOrigin=t):(Ds.parentWindow=e,Ds.parentOrigin=t),Ds.parentWindow&&Ds.parentWindow.closed&&(Ds.parentWindow=null,Ds.parentOrigin=null),Ds.childWindow&&Ds.childWindow.closed&&(Ds.childWindow=null,Ds.childOrigin=null),Ic(Ds.parentWindow),Ic(Ds.childWindow)}const fc=Ls.extend("handleIncomingMessageFromParent");function pc(e){const t=fc;if(!e.uuid)return Hs.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=gc(Hs.callbacks,t);if(n)return n;const r=gc(Hs.promiseCallbacks,t);if(r)return r;const o=gc(Hs.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Nc(e))}function gc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function mc(e,t){const n=gc(t,e.uuid);n&&t.delete(n),e.uuid?Hs.legacyMessageIdsToUuidMap={}:delete Hs.legacyMessageIdsToUuidMap[e.id]}function hc(e){const t=fc,n=mn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Os(r),i=pc(o);if(i){const r=Hs.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),As.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]),vc(e)||(t("Removing registered callback for message %s",i.toString()),mc(o,Hs.callbacks)));const a=Hs.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()),mc(o,Hs.promiseCallbacks));const s=Hs.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()),mc(o,Hs.portCallbacks)}o.uuid&&(Hs.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;As.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Nc(r),r.func),cs(r.func,r.args)}else t("Received an unknown message: %O",e)}function vc(e){return!0===e.data.isPartialResponse}const wc=Ls.extend("handleIncomingMessageFromChild");function Cc(e){if("id"in e.data&&"func"in e.data){const t=Ps(e.data),[n,r]=cs(t.func,t.args);n&&void 0!==r?(wc("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Nc(t),t.func),Pc(t.id,t.uuid,Array.isArray(r)?r:[r])):(wc("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Nc(t),t.func),Xs(Sn("v2","tasks.startTask"),t.func,t.args,((...e)=>{if(Ds.childWindow){const n=e.pop();wc("Message from parent being relayed to child, id: %s",Nc(t)),Pc(t.id,t.uuid,e,n)}})))}}function yc(){return Ds.topWindow!==Ds.parentWindow}function bc(e){return e===Ds.topWindow&&yc()?Hs.topMessageQueue:e===Ds.parentWindow?Hs.parentMessageQueue:e===Ds.childWindow?Hs.childMessageQueue:[]}function Sc(e){return e===Ds.topWindow&&yc()?Ds.topOrigin:e===Ds.parentWindow?Ds.parentOrigin:e===Ds.childWindow?Ds.childOrigin:null}function Ec(e){return e===Ds.topWindow&&yc()?"top":e===Ds.parentWindow?"parent":e===Ds.childWindow?"child":null}const Ac=Ls.extend("flushMessageQueue");function Ic(e){const t=Sc(e),n=bc(e),r=Ec(e);for(;e&&t&&n.length>0;){const o=n.shift();if(o){const n=Ts(o);Ac("Flushing message %s from %s message queue via postMessage.",Nc(n),r),e.postMessage(n,t)}}}function Tc(e,t){let n;n=Ds.currentWindow.setInterval((()=>{0===bc(e).length&&(clearInterval(n),t())}),100)}function Pc(e,t,n,r){const o=Ds.childWindow,i=kc(e,t,n,r),a=Rs(i),s=Sc(o);o&&s&&(wc("Sending message %s to %s via postMessage, args = %o",Nc(a),Ec(o),a.args),o.postMessage(a,s))}function Oc(e,t){const n=Ds.childWindow,r=Mc(e,t),o=Sc(n);n&&o?n.postMessage(r,o):bc(n).push(r)}function Rc(e,t,n){const r=Hs.nextMessageId++,o=new vn;return Hs.legacyMessageIdsToUuidMap[r]=o,{id:r,uuid:o,func:t,timestamp:Date.now(),monotonicTimestamp:mn(),args:n||[],apiVersionTag:e}}function Fc(e){const t=Hs.nextMessageId++,n=new vn;return Hs.legacyMessageIdsToUuidMap[t]=n,{id:t,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:mn(),args:[],data:e}}function kc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Mc(e,t){return{func:e,args:t||[]}}function Nc(e){return"uuidAsString"in e?`${e.uuidAsString} (legacy id: ${e.id})`:"uuid"in e&&void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const xc="v1";function Uc(e){if(!Or(e)&&hr(Qn),!Or(e)&&!Lc())throw _t;e?ls(Sn(xc,"log.request"),"log.request",(()=>{const t=e();Xs(Sn(xc,"log.receive"),"log.receive",[t])})):us("log.request")}function Lc(){return!(!hr(Qn)||!Qn.supports.logs)}var Dc,Hc,Vc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Dc||(Dc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Hc||(Hc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Vc||(Vc={}));const _c="v1";function Wc(e,t){hr(Qn),Xs(Sn(_c,"uploadCustomApp"),"uploadCustomApp",[e],t||$t())}function Bc(e,t,n){hr(Qn),Xs(Sn(_c,"sendCustomMessage"),e,t,n)}function jc(e,t){if(hr(Qn),!Ds.childWindow)throw new Error("The child window has not yet been initialized or is not present");Oc(e,t)}function zc(e,t){hr(Qn),ls(Sn(_c,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function $c(e,t){hr(Qn),ls(Sn(_c,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function qc(e){hr(Qn,xt.content,xt.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];Xs(Sn(_c,"openFilePreview"),"openFilePreview",t)}const Gc="v1";function Jc(e){return new Promise((t=>{if(hr(Qn,xt.content),!Qc())throw _t;const n=Bs(Sn(Gc,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&ls(Sn(Gc,"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&&ls(Sn(Gc,"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 Kc(){if(hr(Qn,xt.content),!Qc())throw _t;Xs(Sn(Gc,"conversations.closeConversation"),"conversations.closeConversation"),us("startConversation"),us("closeConversation")}function Zc(){return new Promise((e=>{if(hr(Qn),!Qc())throw _t;e(Ws(Sn(Gc,"conversations.getChatMember"),"getChatMembers"))}))}function Qc(){return!(!hr(Qn)||!Qn.supports.conversations)}var Xc=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 Yc="v2",el=bn("copilot");function tl(){var e;return hr(Qn)&&!!(null===(e=Qn.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function nl(e,t){var n;return void 0===t&&(t=null!==(n=mn())&&void 0!==n?n:Date.now()),Xc(this,void 0,void 0,(function*(){return hr(Qn),el("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),Js("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Sn(Yc,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var rl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ol="v2",il=bn("copilot");function al(){var e,t;return hr(Qn)&&(!!(null===(e=Qn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=Qn.supports.copilot)||void 0===t?void 0:t.eligibility))}function sl(){var e,t;return rl(this,void 0,void 0,(function*(){if(hr(Qn),!al())throw new Error(`Error code: ${_t.errorCode}, message: Not supported on platform`);if(null===(e=Qn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)return il("Eligibility information is already available on runtime."),Qn.hostVersionsInfo.appEligibilityInformation;il("Eligibility information is not available on runtime. Requesting from host.");const n=yield Ws(Sn(ol,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo");if(Vt(n))throw new Error(`Error code: ${n.errorCode}, message: ${null!==(t=n.message)&&void 0!==t?t:"Failed to get eligibility information from the host."}`);if(!cl(n))throw new Error("Error deserializing eligibility information");return n}))}function cl(e){return void 0!==e.ageGroup&&void 0!==e.cohort&&void 0!==e.userClassification&&void 0!==e.isCopilotEligible&&void 0!==e.isCopilotEnabledRegion&&void 0!==e.isOptedOutByAdmin&&(!e.featureSet||void 0!==e.featureSet.serverFeatures&&void 0!==e.featureSet.uxFeatures)}const ll="v2";class ul{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function dl(e){const t=e;return t.responseType===gl.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const fl="Action.Execute";var pl,gl,ml;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(pl||(pl={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(gl||(gl={}));class hl extends qi{validate(e){return dl(e)}deserialize(e){return e}}function vl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(ml).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function wl(e){e.requestType===pl.ActionExecuteInvokeRequest?Cl(e):e.requestType===pl.QueryMessageExtensionRequest&&yl(e)}function Cl(e){if(e.type!==fl){throw{errorCode:ml.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${fl}"`}}if(!hn(e.data)){throw{errorCode:ml.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function yl(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 bl(e,t,n){if(hr(Qn,xt.content),!Tl())throw _t;const r=new Pr(e);return wl(n),$s(Sn(ll,"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 Sl(e,t){if(hr(Qn,xt.content),!Tl())throw _t;const n=new Pr(e);return $s(Sn(ll,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function El(e,t,n){if(hr(Qn,xt.content),!Tl())throw _t;const r=new Pr(e);return wl(n),$s(Sn(ll,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function Al(e,t,n){if(hr(Qn,xt.content),!Tl())throw _t;return sn(e,new Error("titleId is Invalid.")),sn(t,new Error("oauthConfigId is Invalid.")),$s(Sn(ll,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Il(e,t,n){if(hr(Qn,xt.content),!Tl())throw _t;return sn(e,new Error("titleId is Invalid.")),t&&cn(t),$s(Sn(ll,"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 Tl(){return!(!hr(Qn)||!Qn.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(ml||(ml={}));var Pl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ol="v2";function Rl(e,t,n){return Pl(this,void 0,void 0,(function*(){if(hr(Qn,xt.content),!Nl())throw _t;return xl(e,t),Js("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.claims,n.silent],Sn(Ol,"externalAppAuthenticationForCEA.authenticateWithSSO"),vl)}))}function Fl(e,t,n){return Pl(this,void 0,void 0,(function*(){if(hr(Qn,xt.content),!Nl())throw _t;return xl(e,t),Js("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Sn(Ol,"externalAppAuthenticationForCEA.authenticateWithOauth"),vl)}))}function kl(e,t,n,r){return Pl(this,void 0,void 0,(function*(){if(hr(Qn,xt.content),!Nl())throw _t;return xl(e,t),Cl(r),Gs("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new ul(r),n.url.href,n.width,n.height,n.isExternal],new hl,Sn(Ol,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),vl)}))}function Ml(e,t,n,r){return Pl(this,void 0,void 0,(function*(){if(hr(Qn,xt.content),!Nl())throw _t;return xl(e,t),Cl(r),Gs("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new ul(r),n.claims,n.silent],new hl,Sn(Ol,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),vl)}))}function Nl(){return!(!hr(Qn)||!Qn.supports.externalAppAuthenticationForCEA)}function xl(e,t){sn(t,new Error("conversation id is not valid.")),Tr(e)}const Ul="v2";var Ll,Dl;function Hl(e,t){if(hr(Qn,xt.content),!_l())throw _t;const n=new Pr(e);return $s(Sn(Ul,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Vl(e,t,n){if(hr(Qn,xt.content),!_l())throw _t;const r=new Pr(e);return $s(Sn(Ul,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function _l(){return!(!hr(Qn)||!Qn.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Ll||(Ll={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Dl||(Dl={}));var Wl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Bl="v2";function jl(e,t,n){return Wl(this,void 0,void 0,(function*(){if(hr(Qn,xt.content),!$l())throw _t;xl(e,t);const[r,o]=yield $s(Sn(Bl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function zl(e,t,n){return Wl(this,void 0,void 0,(function*(){if(hr(Qn,xt.content),!$l())throw _t;xl(e,t);const r=yield Ws(Sn(Bl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function $l(){return!(!hr(Qn)||!Qn.supports.externalAppCardActionsForCEA)}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 Gl="v2";function Jl(e,t,n){return ql(this,void 0,void 0,(function*(){if(hr(Qn,xt.content),!Kl())throw _t;const r=new Pr(e),[o,i]=yield $s(Sn(Gl,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Kl(){return!(!hr(Qn)||!Qn.supports.externalAppCommands)}const Zl="v1";var Ql,Xl,Yl,eu,tu,nu;function ru(e,t){if(hr(Qn,xt.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");Xs(Sn(Zl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function ou(e,t){if(hr(Qn,xt.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");Xs(Sn(Zl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function iu(e,t,n){if(hr(Qn,xt.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");Xs(Sn(Zl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function au(e,t,n){if(hr(Qn,xt.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");Xs(Sn(Zl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function su(e,t,n){if(hr(Qn,xt.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");Xs(Sn(Zl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function cu(e=!1,t){if(hr(Qn,xt.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Xs(Sn(Zl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function lu(e,t,n,r,o=!1,i){if(hr(Qn,xt.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");Xs(Sn(Zl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function uu(e){if(hr(Qn,xt.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Xs(Sn(Zl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function du(e=void 0,t){if(hr(Qn,xt.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Xs(Sn(Zl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function fu(e){if(hr(Qn,xt.content),!e)throw bu(It.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Xs(Sn(Zl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function pu(e,t){if(hr(Qn,xt.content),!t)throw bu(It.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw bu(It.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Xs(Sn(Zl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function gu(e,t){if(hr(Qn,xt.content),!t)throw bu(It.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw bu(It.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Xs(Sn(Zl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function mu(e,t){if(hr(Qn,xt.content),!t)throw bu(It.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw bu(It.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Xs(Sn(Zl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function hu(e,t){if(hr(Qn,xt.content),!t)throw bu(It.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw bu(It.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Xs(Sn(Zl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function vu(e,t){if(hr(Qn,xt.content),!t)throw bu(It.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw bu(It.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Xs(Sn(Zl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function wu(e,t){if(hr(Qn,xt.content),!t)throw bu(It.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw bu(It.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw bu(It.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Xs(Sn(Zl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Cu(e){if(hr(Qn),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");ls(Sn(Zl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function yu(e){if(hr(Qn),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");ls(Sn(Zl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function bu(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"}(Ql||(Ql={})),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"}(Xl||(Xl={})),function(e){e.ClassMaterials="classMaterials"}(Yl||(Yl={})),function(e){e.Readonly="readonly"}(eu||(eu={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(tu||(tu={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(nu||(nu={}));const Su="v1";function Eu(){return new Promise((e=>{if(hr(Qn),!Pu())throw _t;e(zs(Sn(Su,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function Au(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(hr(Qn),!Pu())throw _t;t(zs(Sn(Su,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function Iu(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(hr(Qn),!Pu())throw _t;ls(Sn(Su,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{hr(Qn),e(t)}))}function Tu(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(hr(Qn),!Pu())throw _t;ls(Sn(Su,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{hr(Qn),e(t)}))}function Pu(){return!(!hr(Qn)||!Qn.supports.meetingRoom)}function Ou(){return!(!hr(Qn)||!Qn.supports.messageChannels)}const Ru="v1";function Fu(e){if(hr(Qn,xt.content),!ku())throw _t;Xs(Sn(Ru,"notifications.showNotification"),"notifications.showNotification",[e])}function ku(){return!(!hr(Qn)||!Qn.supports.notifications)}const Mu="v2";function Nu(e){if(!Lu())throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());if(Or(e))throw new Error(It.INVALID_ARGUMENTS.toString());ls(Sn(Mu,"otherApp.install"),"otherApp.install",e)}function xu(){if(!Lu())throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());Xs(Sn(Mu,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),us("otherApp.install")}function Uu(e){if(!Lu())throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());return Js("otherApp.notifyInstallCompleted",[e.toString()],Sn(Mu,"otherApp.notifyInstallCompleted"))}function Lu(){return!(!hr(Qn)||!Qn.supports.otherAppStateChange)}const Du="v1";var Hu,Vu,_u;function Wu(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(hr(Qn,xt.sidePanel),!Ku())throw _t;Xs(Sn(Du,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Bu(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(hr(Qn,xt.sidePanel),!Ku())throw _t;Xs(Sn(Du,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function ju(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(hr(Qn,xt.sidePanel),!Ku())throw _t;Xs(Sn(Du,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function zu(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(hr(Qn,xt.sidePanel),!Ku())throw _t;Xs(Sn(Du,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function $u(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(hr(Qn,xt.sidePanel),!Ku())throw _t;ls(Sn(Du,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function qu(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(hr(Qn,xt.sidePanel),!Ku())throw _t;ls(Sn(Du,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Gu(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(hr(Qn,xt.sidePanel),!Ku())throw _t;ls(Sn(Du,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Ju(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(hr(Qn,xt.sidePanel),!Ku())throw _t;ls(Sn(Du,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Ku(){return!(!hr(Qn)||!Qn.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"}(Hu||(Hu={})),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"}(Vu||(Vu={})),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"}(_u||(_u={}));const Zu="v1";function Qu(e,t,n,r){if(hr(Qn,xt.content),!Xu())throw _t;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");Xs(Sn(Zu,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Xu(){return!(!hr(Qn)||!Qn.supports.appEntity)}const Yu="v1";function ed(e){return new Promise((t=>{if(hr(Qn),!td())throw _t;if((zn.hostClientType===Mt.android||zn.hostClientType===Mt.teamsRoomsAndroid||zn.hostClientType===Mt.teamsPhones||zn.hostClientType===Mt.teamsDisplays)&&!vr(Rn)){const e={errorCode:It.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Ws(Sn(Yu,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function td(){return!(!hr(Qn)||!Qn.supports.teams)&&(!!Qn.supports.teams.fullTrust&&!!Qn.supports.teams.fullTrust.joinedTeams)}const nd="v1";function rd(e){return new Promise((t=>{if(hr(Qn),!od())throw _t;t(Ws(Sn(nd,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function od(){return!(!hr(Qn)||!Qn.supports.teams)&&!!Qn.supports.teams.fullTrust}const id="v1";var ad;function sd(e,t){if(hr(Qn,xt.content),!ld())throw _t;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Xs(Sn(id,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function cd(e,t){if(hr(Qn),!ld())throw _t;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Xs(Sn(id,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function ld(){return!(!hr(Qn)||!Qn.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(ad||(ad={}));class ud{static setTimeout(e,t){const n=performance.now(),r=Gt();return ud.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete ud.setTimeoutCallbacks[e]}static setInterval(e,t){ud.setTimeout((function n(){e(),ud.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in ud.setTimeoutCallbacks){const r=ud.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){ud.setTimeoutCallbacks[e].callback(),delete ud.setTimeoutCallbacks[e]}}}ud.setTimeoutCallbacks={};class dd{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){ud.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&&ud.clearTimeout(this.timeoutId),this.timeoutId=ud.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(dd.maxSessionTimeoutInMs,2*t.timeoutInMs):dd.initialSessionTimeoutInMs}}dd.initialSessionTimeoutInMs=1e3,dd.maxSessionTimeoutInMs=3e4;const fd="v2";class pd{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new dd(pd.distributionBinSize,(e=>this.reportPerformanceEvent(Sn(fd,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){ud.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Sn(fd,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),pd.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){ud.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(Sn(fd,"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(Sn(fd,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}pd.distributionBinSize=1e3,pd.calculateFPSInterval=1e3;var gd=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},md=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 hd="v2",vd=an()?void 0:new pd(Xs);var wd,Cd,yd;function bd(e){if(hr(Qn,xt.sidePanel),!Td())throw _t;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(ls(Sn(hd,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==vd?void 0:vd.setFrameProcessTimeLimit(e.timeLimit)),!1),kd())Pd(e.videoFrameHandler,e.config);else{if(!Nd())throw _t;Rd(e.videoBufferHandler,e.config)}null==vd||vd.startMonitorSlowFrameProcessing()}function Sd(e,t){if(hr(Qn,xt.sidePanel),!Td())throw _t;Xs(Sn(hd,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function Ed(e){if(hr(Qn,xt.sidePanel),!Td())throw _t;ls(Sn(hd,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",$d(e,vd),!1),Xs(Sn(hd,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function Ad(e){Xs(Sn(hd,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Id(e){Xs(Sn(hd,"videoEffects.notifyError"),"video.notifyError",[e])}function Td(){return hr(Qn)&&!!Qn.supports.video&&(!!Qn.supports.video.mediaStream||!!Qn.supports.video.sharedFrame)}function Pd(e,t){if(hr(Qn,xt.sidePanel),!Td()||!kd())throw _t;ls(Sn(hd,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>gd(this,void 0,void 0,(function*(){const{streamId:n}=t,r=Od(e,vd);yield Ld(n,r,Id,vd)}))),!1),Xs(Sn(hd,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Od(e,t){return n=>gd(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 Rd(e,t){if(hr(Qn,xt.sidePanel),!Td()||!Nd())throw _t;ls(Sn(hd,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==vd||vd.reportStartFrameProcessing(t.width,t.height),e(Fd(t),(()=>{null==vd||vd.reportFrameProcessed(),Ad(n)}),Id)}}),!1),Xs(Sn(hd,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Fd(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=md(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function kd(){var e;return hr(Qn,xt.sidePanel)&&Md()&&!!(null===(e=Qn.supports.video)||void 0===e?void 0:e.mediaStream)}function Md(){var e,t,n,r;return!(!(null===(t=null===(e=on().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=on().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Nd(){var e;return hr(Qn,xt.sidePanel)&&!!(null===(e=Qn.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(wd||(wd={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Cd||(Cd={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(yd||(yd={}));var xd=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 Ud="v2";function Ld(e,t,n,r){var o,i;return xd(this,void 0,void 0,(function*(){const a=Vd();!an()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),_d(yield Hd(e,n,r),new Wd(n,t),a.writable)}))}function Dd(e,t,n,r){var o,i;return xd(this,void 0,void 0,(function*(){const a=Vd();!an()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),_d(yield Hd(e,n,r),new zd(n,t),a.writable)}))}function Hd(e,t,n){return xd(this,void 0,void 0,(function*(){if(an())throw _t;const r=on().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function Vd(){if(an())throw _t;const e=window.MediaStreamTrackGenerator;if(!e)throw _t;return new e({kind:"video"})}function _d(e,t,n){new(0,on().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Wd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>xd(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 Bd{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 jd{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 zd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>xd(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=>xd(this,void 0,void 0,(function*(){if(an())throw _t;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 Bd(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 jd(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}}})),ls(Sn(Ud,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function $d(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Xs(Sn(Ud,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in yd?e:yd.InitializationFailure;Xs(Sn(Ud,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var qd=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 Gd="v2",Jd=2e3,Kd=an()?void 0:new pd(Xs);var Zd;function Qd(e){var t,n;if(!of())throw _t;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(hr(Qn,xt.sidePanel)){if(ls(Sn(Gd,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Kd?void 0:Kd.setFrameProcessTimeLimit(e)),!1),null===(t=Qn.supports.video)||void 0===t?void 0:t.mediaStream)ls(Sn(Gd,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>qd(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=Kd?Yd(e.videoFrameHandler,Kd):e.videoFrameHandler;r?yield Dd(n,o,sf,Kd):yield Ld(n,o,sf,Kd)}))),!1),Xs(Sn(Gd,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=Qn.supports.video)||void 0===n?void 0:n.sharedFrame))throw _t;ls(Sn(Gd,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==Kd||Kd.reportStartFrameProcessing(t.width,t.height);const n=Xd(),r=t.timestamp;e.videoBufferHandler(ef(t),(()=>{n(),null==Kd||Kd.reportFrameProcessed(),af(r)}),sf)}}),!1),Xs(Sn(Gd,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Kd||Kd.startMonitorSlowFrameProcessing()}}function Xd(){const e=setTimeout((()=>{sf(`Frame not processed in ${Jd}ms`,Zd.Warn)}),Jd);return function(){clearTimeout(e)}}function Yd(e,t){return n=>qd(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=Xd(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function ef(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function tf(e,t,n){if(hr(Qn,xt.sidePanel),!of())throw _t;Xs(Sn(Gd,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function nf(e){if(hr(Qn,xt.sidePanel),!of())throw _t;ls(Sn(Gd,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",$d(e,Kd),!1),Xs(Sn(Gd,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function rf(e){if(hr(Qn,xt.sidePanel),!Td())throw _t;Xs(Sn(Gd,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function of(){return hr(Qn),Td()}function af(e){Xs(Sn(Gd,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function sf(e,t=Zd.Warn){Xs(Sn(Gd,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function cf(e){if(hr(Qn),!Td())throw _t;sf(e,Zd.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Zd||(Zd={}));const lf="v2";class uf extends qi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class df{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class ff{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class pf extends qi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class gf{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class mf extends qi{validate(e){const t=new pf;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function hf(e,t){if(hr(Qn),!bf())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Sf(e.threadId),t&&0===t.length)throw new Error(`Error code: ${It.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Gs("hostEntity.tab.addAndConfigure",[new ff(e),t],new pf,Sn(lf,"hostEntity.tab.addAndConfigure"))}function vf(e){if(hr(Qn),!bf())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Sf(e.threadId),Gs("hostEntity.tab.getAll",[new ff(e)],new mf,Sn(lf,"hostEntity.tab.getAll"))}function wf(e,t){if(hr(Qn),!bf())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Ef(e),Sf(t.threadId),Gs("hostEntity.tab.reconfigure",[new df(e),new ff(t)],new uf,Sn(lf,"hostEntity.tab.reconfigure"))}function Cf(e,t){if(hr(Qn),!bf())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Ef(e),Sf(t.threadId),Gs("hostEntity.tab.rename",[new df(e),new ff(t)],new uf,Sn(lf,"hostEntity.tab.rename"))}function yf(e,t){if(hr(Qn),!bf())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Sf(t.threadId),Ef(e),Gs("hostEntity.tab.remove",[new gf(e),new ff(t)],new Gi,Sn(lf,"hostEntity.tab.remove"))}function bf(){var e;return!!(hr(Qn)&&If()&&(null===(e=Qn.supports.hostEntity)||void 0===e?void 0:e.tab))}function Sf(e){if(!e||0==e.length)throw new Error(`Error code: ${It.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function Ef(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${It.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var Af;function If(){return!(!hr(Qn)||!Qn.supports.hostEntity)}!function(e){e.edu="EDU"}(Af||(Af={}));var Tf=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 Pf="v2",Of="Invalid store dialog size",Rf="No App Id present, but AppId needed to open AppDetail store",Ff="No Collection Id present, but CollectionId needed to open a store specific to a collection";function kf(e){return Tf(this,void 0,void 0,(function*(){Lf();const{size:t}=null!=e?e:{};return Js("store.openFullStore",[Df(t)],Sn(Pf,"store.openFullStore"))}))}function Mf(e){return Tf(this,void 0,void 0,(function*(){Lf();const{size:t,appId:n}=e;if(!(n instanceof Pr))throw new Error(Rf);return Js("store.openAppDetail",[Df(t),n],Sn(Pf,"store.openAppDetail"))}))}function Nf(e){return Tf(this,void 0,void 0,(function*(){Lf();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return Js("store.openInContextStore",[Df(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Sn(Pf,"store.openInContextStore"))}))}function xf(e){return Tf(this,void 0,void 0,(function*(){Lf();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Ff);return Js("store.openSpecificStore",[Df(t),n],Sn(Pf,"store.openSpecificStore"))}))}function Uf(){return hr(Qn)&&!!Qn.supports.store}function Lf(){if(hr(Qn,xt.content,xt.sidePanel,xt.meetingStage),!Uf())throw _t}function Df(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(Of);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(Of);return JSON.stringify(e)}function Hf(e){const t=!e||e.length<=0,n=null==e?void 0:e.indexOf("@"),r=null==e?void 0:e.indexOf(".",n);if(t||-1===n||-1===r)throw new Error("Input email address does not have the correct format.")}class Vf{constructor(e){this.val=e,Hf(e)}toString(){return this.val}}const _f="/l/app/",Wf="/l/meeting/new",Bf="attendees",jf="startTime",zf="endTime",$f="subject",qf="content",Gf="/l/call/0/0",Jf="source",Kf="withVideo",Zf="/l/chat/0/0",Qf="users",Xf="topicName",Yf="message";function ep(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Qf}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Xf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Yf}=${encodeURIComponent(n)}`;return`${Hn}://${Vn}${Zf}?${r}${o}${i}`}function tp(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Qf}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Kf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Jf}=${encodeURIComponent(n)}`;return`${Hn}://${Vn}${Gf}?${r}${o}${i}`}function np(e,t,n,r,o){const i=void 0===e?"":`${Bf}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${jf}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${zf}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${$f}=${encodeURIComponent(r)}`,l=void 0===o?"":`&${qf}=${encodeURIComponent(o)}`;return`${Hn}://${Vn}${Wf}?${i}${a}${s}${c}${l}`}function rp(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${Hn}://${Vn}${_f}${encodeURIComponent(e)}`}const op="v1";function ip(e){return new Promise((t=>{if(hr(Qn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!ap())throw new Error("Not supported");const n=Sn(op,"appInstallDialog.openAppInstallDialog");Qn.isLegacyTeams?t(Bs(n,"executeDeepLink",rp(e.appId))):(Xs(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function ap(){return!(!hr(Qn)||!Qn.supports.appInstallDialog)}const sp="v1",cp=bn("media");var lp,up,dp,fp,pp,gp,mp;!function(e){e.Base64="base64",e.ID="id"}(lp||(lp={}));class hp{}function vp(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(hr(Qn,xt.content,xt.task),zn.isFramelessWindow)if(vr(Mn))Xs(Sn(sp,"media.captureImage"),"captureImage",e);else{e({errorCode:It.OLD_PLATFORM},[])}else{e({errorCode:It.NOT_SUPPORTED_ON_PLATFORM},[])}}function wp(){if(hr(Qn,xt.content,xt.task),!yp())throw _t;const e=Tt.Media;return new Promise((t=>{t(zs(Sn(sp,"media.hasPermission"),"permissions.has",e))}))}function Cp(){if(hr(Qn,xt.content,xt.task),!yp())throw _t;const e=Tt.Media;return new Promise((t=>{t(zs(Sn(sp,"media.requestPermission"),"permissions.request",e))}))}function yp(){return!(!hr(Qn)||!Qn.supports.permissions)}class bp extends hp{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(hr(Qn,xt.content,xt.task),vr(Nn))if(Up(this.mimeType,this.format,this.content))vr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:It.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:It.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Xs(Sn(sp,"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=Pp(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Op(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):cp(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:It.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Gt(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Or(e)&&Xs(Sn(sp,"media.getMedia"),"getMedia",r),ls(Sn(sp,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),us("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Pp(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),us("getMedia"+t)}else{const e=Op(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:It.INTERNAL_ERROR,message:"data received is null"},new Blob),us("getMedia"+t)}}))}}class Sp{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){hr(Qn,xt.content,xt.task);try{Cr(Pn)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Xs(Sn(sp,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(up.StopRecording,e)}}class Ep extends Sp{getMediaType(){return pp.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case up.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Ap(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(hr(Qn,xt.content,xt.task),!vr(Nn)){const e={errorCode:It.OLD_PLATFORM};return void t(e,[])}try{Rp(e)}catch(e){return void t(e,[])}if(!kp(e)){const e={errorCode:It.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Xs(Sn(sp,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Fp(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 bp(e));t(n,s)}))}function Ip(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(hr(Qn,xt.content,xt.task),!vr(Nn)){return void t({errorCode:It.OLD_PLATFORM})}if(!Lp(e)){return void t({errorCode:It.INVALID_ARGUMENTS})}const n=[e];Xs(Sn(sp,"media.viewImages"),"viewImages",n,t)}function Tp(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(hr(Qn,xt.content,xt.task),zn.hostClientType!==Mt.desktop&&zn.hostClientType!==Mt.web&&zn.hostClientType!==Mt.rigel&&zn.hostClientType!==Mt.teamsRoomsWindows&&zn.hostClientType!==Mt.teamsRoomsAndroid&&zn.hostClientType!==Mt.teamsPhones&&zn.hostClientType!==Mt.teamsDisplays)if(vr(xn))if(Dp(t))Xs(Sn(sp,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:It.INVALID_ARGUMENTS},"")}else{e({errorCode:It.OLD_PLATFORM},"")}else{e({errorCode:It.NOT_SUPPORTED_ON_PLATFORM},"")}}function Pp(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 Op(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 Rp(e){Np(e)?Cr(Tn):xp(e)?Cr(Pn):Mp(e)&&Cr(On)}function Fp(e){return!(e.mediaType!=pp.Video||!e.videoProps||!e.videoProps.videoController)}function kp(e){return!(null==e||e.maxMediaCount>10)}function Mp(e){var t;return!((null==e?void 0:e.mediaType)!=pp.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Np(e){return!(!e||e.mediaType!=pp.VideoAndImage&&!e.videoAndImageProps)}function xp(e){return!(!e||e.mediaType!=pp.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Up(e,t,n){return null!=e&&null!=t&&t==lp.ID&&null!=n}function Lp(e){return!(null==e||e.length<=0||e.length>10)}function Dp(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Hp(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"}(up||(up={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(dp||(dp={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(fp||(fp={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(pp||(pp={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(gp||(gp={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(mp||(mp={}));const Vp="v2";function _p(e){return new Promise((t=>{if(hr(Qn,xt.content,xt.task),!jp())throw _t;if(!Dp(e))throw{errorCode:It.INVALID_ARGUMENTS};t(zs(Sn(Vp,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Wp(){if(hr(Qn,xt.content,xt.task),!jp())throw _t;const e=Tt.Media;return new Promise((t=>{t(zs(Sn(Vp,"barCode.hasPermission"),"permissions.has",e))}))}function Bp(){if(hr(Qn,xt.content,xt.task),!jp())throw _t;const e=Tt.Media;return new Promise((t=>{t(zs(Sn(Vp,"barCode.requestPermission"),"permissions.request",e))}))}function jp(){return!!(hr(Qn)&&Qn.supports.barCode&&Qn.supports.permissions)}const zp="v2";function $p(e){return qp(Sn(zp,"chat.openChat"),e)}function qp(e,t){return new Promise((n=>{if(hr(Qn,xt.content,xt.task),!Jp())throw _t;if(Qn.isLegacyTeams)n(Bs(e,"executeDeepLink",ep([t.user],void 0,t.message)));else{n(Bs(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Gp(e){const t=Sn(zp,"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(qp(t,r))}else{if(hr(Qn,xt.content,xt.task),!Jp())throw _t;if(Qn.isLegacyTeams)n(Bs(t,"executeDeepLink",ep(e.users,e.topic,e.message)));else{n(Bs(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function Jp(){return!(!hr(Qn)||!Qn.supports.chat)}var Kp=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Zp="v2";function Qp(e){return Kp(this,void 0,void 0,(function*(){if(hr(Qn,xt.content,xt.meetingStage,xt.task,xt.settings,xt.stage,xt.sidePanel),!Yp())throw _t;if(!e.type||!Object.values(kt).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(kt)}`);const t=yield rn(e),n={mimeType:e.type,content:t};return zs(Sn(Zp,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function Xp(){return Kp(this,void 0,void 0,(function*(){hr(Qn,xt.content,xt.meetingStage,xt.task,xt.settings,xt.stage,xt.sidePanel);const e=Sn(Zp,"clipboard.read");if(!Yp())throw _t;const t=yield zs(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return nn(e.mimeType,e.content)}return t}))}function Yp(){return zn.isFramelessWindow?!(!hr(Qn)||!Qn.supports.clipboard):!!(hr(Qn)&&navigator&&navigator.clipboard&&Qn.supports.clipboard)}function eg(){var e;return null!==(e=hr(Qn)&&(Qn.isNAAChannelRecommended||tg()))&&void 0!==e&&e}function tg(){return!!(hr(Qn)&&ng()&&Qn.isLegacyTeams&&Qn.supports.nestedAppAuth)}function ng(){return zn.hostClientType===Mt.android||zn.hostClientType===Mt.ios||zn.hostClientType===Mt.ipados}const rg="v2";function og(){if(hr(Qn,xt.content,xt.task),!ag())throw _t;return zs(Sn(rg,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function ig(e){if(hr(Qn,xt.content,xt.task),!ag())throw _t;if(!e)throw{errorCode:It.INVALID_ARGUMENTS};return zs(Sn(rg,"geoLocation.showLocation"),"location.showLocation",e)}function ag(){return!!(hr(Qn)&&Qn.supports.geoLocation&&Qn.supports.geoLocation.map&&Qn.supports.permissions)}const sg="v2";function cg(){if(hr(Qn,xt.content,xt.task),!dg())throw _t;return zs(Sn(sg,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function lg(){if(hr(Qn,xt.content,xt.task),!dg())throw _t;const e=Tt.GeoLocation;return new Promise((t=>{t(zs(Sn(sg,"geoLocation.hasPermission"),"permissions.has",e))}))}function ug(){if(hr(Qn,xt.content,xt.task),!dg())throw _t;const e=Tt.GeoLocation;return new Promise((t=>{t(zs(Sn(sg,"geoLocation.requestPermission"),"permissions.request",e))}))}function dg(){return!!(hr(Qn)&&Qn.supports.geoLocation&&Qn.supports.permissions)}function fg(){return Qn.hostVersionsInfo?Qn.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const pg="v1";class gg{postMessage(e,t){hr(Qn),Xs(Sn(pg,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||$t())}addEventListener(e,t){hr(Qn),"message"===e&&ls(Sn(pg,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class mg{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){hr(Qn,xt.task),Xs(Sn(pg,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||$t())}addEventListener(e,t){hr(Qn,xt.task),"message"===e&&ls(Sn(pg,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const hg="v2";function vg(e){if(hr(Qn,xt.content),!wg())throw _t;if(!e||!tn(e))throw{errorCode:It.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return zs(Sn(hg,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function wg(){return!(!hr(Qn)||!Qn.supports.secondaryBrowser)}const Cg="v1";function yg(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(hr(Qn,xt.content,xt.task),!vr(Fn))throw{errorCode:It.OLD_PLATFORM};if(!e)throw{errorCode:It.INVALID_ARGUMENTS};if(!Sg())throw _t;Xs(Sn(Cg,"location.getLocation"),"location.getLocation",[e],t)}function bg(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(hr(Qn,xt.content,xt.task),!vr(Fn))throw{errorCode:It.OLD_PLATFORM};if(!e)throw{errorCode:It.INVALID_ARGUMENTS};if(!Sg())throw _t;Xs(Sn(Cg,"location.showLocation"),"location.showLocation",[e],t)}function Sg(){return!(!hr(Qn)||!Qn.supports.location)}const Eg="v1";function Ag(e){hr(Qn,xt.sidePanel),e.contentUrl&&new URL(e.contentUrl),Xs(Sn(Eg,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var Ig=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 Tg="v1";var Pg,Og,Rg,Fg,kg,Mg;function Ng(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");hr(Qn,xt.sidePanel,xt.meetingStage),Xs(Sn(Tg,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function xg(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");hr(Qn,xt.sidePanel,xt.meetingStage),Xs(Sn(Tg,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Ug(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");hr(Qn,xt.sidePanel,xt.meetingStage,xt.settings,xt.content),Xs(Sn(Tg,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Lg(){var e,t,n;return Ig(this,void 0,void 0,(function*(){let r;hr(Qn,xt.sidePanel,xt.meetingStage,xt.settings,xt.content);try{const e=!0;r=yield zs(Sn("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)==Fg.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Fg.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Dg(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");hr(Qn,xt.sidePanel,xt.meetingStage,xt.task),Xs(Sn(Tg,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Hg(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");hr(Qn,xt.sidePanel),Xs(Sn(Tg,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Vg(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");hr(Qn,xt.sidePanel),Xs(Sn(Tg,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function _g(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");hr(Qn,xt.sidePanel),Xs(Sn(Tg,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Wg(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");hr(Qn,xt.sidePanel),ls(Sn(Tg,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Bg(e,t,n={sharingProtocol:kg.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");hr(Qn,xt.sidePanel,xt.meetingStage),Xs(Sn(Tg,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function jg(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");hr(Qn,xt.sidePanel,xt.meetingStage),Xs(Sn(Tg,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function zg(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");hr(Qn,xt.sidePanel,xt.meetingStage),Xs(Sn(Tg,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function $g(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");hr(Qn,xt.sidePanel,xt.meetingStage),Xs(Sn(Tg,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function qg(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");hr(Qn,xt.sidePanel,xt.meetingStage),ls(Sn(Tg,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Gg(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");hr(Qn,xt.sidePanel,xt.meetingStage),ls(Sn(Tg,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Jg(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");hr(Qn,xt.sidePanel,xt.meetingStage),ls(Sn(Tg,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Kg(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));hr(Qn);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Mg.Other};return zs(Sn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Zg(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");hr(Qn,xt.sidePanel,xt.meetingStage),e.isAppHandlingAudio?Qg(e,t):Xg(e,t)}function Qg(e,t){Xs(Sn(Tg,"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");ls(Sn(Tg,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>Ig(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);em(n,n.isMicMuted===t.isMicMuted?Pg.HostInitiated:Pg.AppDeclinedToChange)}catch(e){em(t,Pg.AppFailedToChange)}}))));ls(Sn(Tg,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function Xg(e,t){Xs(Sn(Tg,"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");ds("meeting.micStateChanged")&&us("meeting.micStateChanged"),ds("meeting.audioDeviceSelectionChanged")&&us("meeting.audioDeviceSelectionChanged"),t(n)}))}function Yg(e){em(e,Pg.AppInitiated)}function em(e,t){hr(Qn,xt.sidePanel,xt.meetingStage),Xs(Sn(Tg,"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"}(Pg||(Pg={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(Og||(Og={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Rg||(Rg={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Fg||(Fg={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(kg||(kg={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(Mg||(Mg={}));const tm="v1",nm="v2";function rm(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Sn(tm,"monetization.openPurchaseExperience")):(r=e,o=Sn(nm,"monetization.openPurchaseExperience"));return hr(Qn,xt.content),Qt((()=>new Promise((e=>{if(!om())throw _t;e(zs(o,"monetization.openPurchaseExperience",r))}))),n)}function om(){return!(!hr(Qn)||!Qn.supports.monetization)}const im="v2";function am(e){return new Promise((t=>{if(hr(Qn,xt.content),!cm())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(Bs(Sn(im,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function sm(e){return new Promise((t=>{if(hr(Qn,xt.content),!cm())throw new Error("Not supported");const n=Sn(im,"calendar.composeMeeting");Qn.isLegacyTeams?t(Bs(n,"executeDeepLink",np(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(Bs(n,"calendar.composeMeeting",e))}))}function cm(){return!(!hr(Qn)||!Qn.supports.calendar)}const lm="v2";function um(e){e&&0!==e.length&&e.forEach((e=>{Hf(e)}))}function dm(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===Cm.New&&(um(t.toRecipients),um(t.ccRecipients),um(t.bccRecipients))}function fm(e){if(hr(Qn,xt.content),!pm())throw new Error("Not supported");return dm(e),Js("mail.handoff.composeMail",[new gm(e)],Sn(lm,"mail.handoff.composeMail"))}function pm(){return!!(hr(Qn)&&Qn.supports.mail&&Qn.supports.mail.handoff)}class gm{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const mm="v2";function hm(e){return new Promise((t=>{if(hr(Qn,xt.content),!wm())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(Bs(Sn(mm,"mail.openMailItem"),"mail.openMailItem",e))}))}function vm(e){return new Promise((t=>{if(hr(Qn,xt.content),!wm())throw new Error("Not supported");t(Bs(Sn(mm,"mail.composeMail"),"mail.composeMail",e))}))}function wm(){return!(!hr(Qn)||!Qn.supports.mail)}var Cm;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Cm||(Cm={}));const ym="v2";function bm(){if(!zn.printCapabilityEnabled){if(hr(Qn),!Pm())throw _t;zn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(Sm(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function Sm(){on().print()}function Em(e){Am(Sn(ym,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Or(e)&&!Pm())throw _t}))}function Am(e,t,n){!Or(t)&&hr(Qn),!Or(t)&&n&&n(),vs(e,t)}function Im(e){Tm(Sn(ym,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Or(e)&&!Pm())throw _t}))}function Tm(e,t,n){!Or(t)&&hr(Qn),!Or(t)&&n&&n(),ys(e,t)}function Pm(){return!(!hr(Qn)||!Qn.supports.teamsCore)}const Om="v1",Rm="v2";function Fm(e,t){let n,r;hr(Qn,xt.content,xt.task,xt.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Sn(Om,"people.selectPeople")):(r=e,o=Sn(Rm,"people.selectPeople")),Kt(km,n,o,r)}function km(e,t){return new Promise((n=>{if(!vr(kn))throw{errorCode:It.OLD_PLATFORM};if(!Hp(t))throw{errorCode:It.INVALID_ARGUMENTS};if(!Mm())throw _t;n(zs(e,"people.selectPeople",t))}))}function Mm(){return!(!hr(Qn)||!Qn.supports.people)}function Nm(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?xm(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function xm(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 Um="v2";function Lm(e){return hr(Qn,xt.content),new Promise((t=>{const[n,r]=Nm(e);if(!n)throw{errorCode:It.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(zs(Sn(Um,"profile.showProfile"),"profile.showProfile",o))}))}function Dm(){return!(!hr(Qn)||!Qn.supports.profile)}const Hm="v2",Vm="search.queryChange",_m="search.queryClose",Wm="search.queryExecute";function Bm(e,t,n){if(hr(Qn,xt.content),!zm())throw _t;ls(Sn(Hm,"search.registerOnClosedHandler"),_m,e),ls(Sn(Hm,"search.registerOnExecutedHandler"),Wm,t),n&&ls(Sn(Hm,"search.registerOnChangeHandler"),Vm,n)}function jm(){if(hr(Qn,xt.content),!zm())throw _t;Xs(Sn(Hm,"search.unregisterHandlers"),"search.unregister"),us(Vm),us(_m),us(Wm)}function zm(){return!(!hr(Qn)||!Qn.supports.search)}function $m(){return new Promise((e=>{if(hr(Qn,xt.content),!zm())throw new Error("Not supported");e(Bs(Sn(Hm,"search.closeSearch"),"search.closeSearch"))}))}var qm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Gm="v2";function Jm(){return qm(this,void 0,void 0,(function*(){if(hr(Qn,xt.sidePanel,xt.meetingStage),!Km())throw _t;return yield zs(Sn(Gm,"sharing.history.getContent"),"sharing.history.getContent")}))}function Km(){var e;return hr(Qn)&&void 0!==(null===(e=Qn.supports.sharing)||void 0===e?void 0:e.history)}const Zm="v1",Qm="v2",Xm={shareWebContent:"sharing.shareWebContent"};function Ym(e,t){try{th(e),nh(e),rh(e)}catch(e){return Zt((()=>Promise.reject(e)),t)}hr(Qn,xt.content,xt.sidePanel,xt.task,xt.stage,xt.meetingStage);return Zt(eh,t,Sn(t?Zm:Qm,"sharing.shareWebContent"),e)}function eh(e,t){return new Promise((n=>{if(!oh())throw _t;n(zs(e,Xm.shareWebContent,t))}))}function th(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:It.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function nh(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:It.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:It.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function rh(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:It.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:It.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function oh(){return!(!hr(Qn)||!Qn.supports.sharing)}const ih="v2";function ah(){return new Promise((e=>{if(hr(Qn,xt.content),!sh())throw _t;e(zs(Sn(ih,"stageView.self.close"),"stageView.self.close"))}))}function sh(){var e;return hr(Qn)&&void 0!==(null===(e=Qn.supports.stageView)||void 0===e?void 0:e.self)}const ch="v2";var lh;function uh(e){return new Promise((t=>{if(hr(Qn,xt.content),!dh())throw _t;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(zs(Sn(ch,"stageView.open"),"stageView.open",e))}))}function dh(){return!(!hr(Qn)||!Qn.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(lh||(lh={}));const fh=10;var ph=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 gh="v2";function mh(e){return ph(this,void 0,void 0,(function*(){hr(Qn,xt.content,xt.task),wh(),Ch(e);const t=yield zs(Sn(gh,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return yh(e.maxVisualMediaCount,t),t}))}function hh(e){return ph(this,void 0,void 0,(function*(){hr(Qn,xt.content,xt.task),wh(),Ch(e);const t=yield zs(Sn(gh,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return yh(e.maxVisualMediaCount,t),t}))}function vh(){return!!(hr(Qn)&&Qn.supports.visualMedia&&Qn.supports.visualMedia.image&&Qn.supports.permissions)}function wh(){if(!vh())throw _t}function Ch(e){if(!e||e.maxVisualMediaCount>fh||e.maxVisualMediaCount<1)throw jt}function yh(e,t){if(t.length>e)throw zt}const bh="v2";var Sh,Eh;function Ah(){if(hr(Qn,xt.content,xt.task),!vh())throw _t;const e=Tt.Media;return zs(Sn(bh,"visualMedia.hasPermission"),"permissions.has",e)}function Ih(){if(hr(Qn,xt.content,xt.task),!vh())throw _t;const e=Tt.Media;return zs(Sn(bh,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(Sh||(Sh={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Eh||(Eh={}));var Th=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 Ph=null;function Oh(){return Th(this,void 0,void 0,(function*(){return null===Ph&&(Ph=(yield uo()).app.host.name),Ph}))}var Rh=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 Fh(){return Rh(this,void 0,void 0,(function*(){if(hr(Qn),!Mh())throw _t;return!(!Qn.isLegacyTeams||zn.hostClientType!==Mt.android&&zn.hostClientType!==Mt.ios&&zn.hostClientType!==Mt.ipados||(yield kh())!==Nt.teams)||(yield Ws(Sn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function kh(){return Rh(this,void 0,void 0,(function*(){return Oh()}))}function Mh(){return hr(Qn)&&void 0!==Qn.supports.webStorage}const Nh="v2";var xh;function Uh(e){const t=Sn(Nh,"call.startCall");return new Promise((n=>{var r;if(hr(Qn,xt.content,xt.task),!Lh())throw _t;if(!Qn.isLegacyTeams)return Xs(t,"call.startCall",[e],n);n(Ws(t,"executeDeepLink",tp(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(xh.Video),e.source)).then((e=>{if(!e)throw new Error(jn);return e})))}))}function Lh(){return!(!hr(Qn)||!Qn.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(xh||(xh={}));const Dh="v1";function Hh(){Xi(Sn(Dh,"appInitialization.notifyAppLoaded"))}function Vh(){Xs(Sn(Dh,"appInitialization.notifySuccess"),no.Success,[dr])}function _h(e){ea(Sn(Dh,"appInitialization.notifyFailure"),e)}function Wh(e){Yi(Sn(Dh,"appInitialization.notifyExpectedFailure"),e)}const Bh=bn("thirdPartyCloudStorage"),jh="v2";class zh{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let $h=[],qh=null,Gh=!0,Jh=null;function Kh(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(hr(Qn,xt.content,xt.task),!Qh())throw _t;if(Jh)throw Jh=null,new Error("getDragAndDropFiles cannot be called twice");Jh=t,Gh=!0,Xs(Sn(jh,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],Zh)}else{t([],{errorCode:It.INVALID_ARGUMENTS})}}function Zh(e){if(Jh)if(e&&e.error)Jh([],e.error),Jh=null;else if(e&&e.fileChunk)try{Gh||0!==e.fileChunk.chunkSequence||(Bh("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),Gh=!0,Jh([],{errorCode:It.INTERNAL_ERROR,message:"error occurred while receiving data"}),$h=[],Jh=null);const t=Op(e.fileChunk,e.fileType);if(t?(qh||(qh=new zh(e.fileType,[])),qh.assembleAttachment.push(t)):(Bh(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),Jh?Jh([],{errorCode:It.INTERNAL_ERROR,message:"error occurred while receiving data"}):Jh=null,$h=[],Jh=null,Gh=!0),Gh=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&qh){const t=Pp(qh.assembleAttachment,qh.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});$h.push(n)}e.isLastFile&&Jh&&(Jh($h,e.error),$h=[],Jh=null,Gh=!0),qh=null}}catch(e){Jh&&(Jh([],{errorCode:It.INTERNAL_ERROR,message:e}),$h=[],Jh=null,Gh=!0)}else Jh([],{errorCode:It.INTERNAL_ERROR,message:"data received is null"}),$h=[],Jh=null,Gh=!0}function Qh(){return!(!hr(Qn)||!Qn.supports.thirdPartyCloudStorage)}const Xh="v1";function Yh(e,t){Qi(Sn(Xh,"initialize"),t).then((()=>{e&&e()}))}function ev(){bm()}function tv(){Sm()}function nv(e){mr(),Xs(Sn(Xh,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=zn.frameContext),e(t)}))}function rv(e){aa(Sn(Xh,"registerOnThemeChangeHandlerHelper"),e)}function ov(e){fs(Sn(Xh,"registerFullScreenHandler"),"fullScreenChange",e,[])}function iv(e){fs(Sn(Xh,"registerAppButtonClickHandler"),"appButtonClick",e,[xt.content])}function av(e){fs(Sn(Xh,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[xt.content])}function sv(e){fs(Sn(Xh,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[xt.content])}function cv(e){Ya(Sn(Xh,"registerBackButtonHandler"),e)}function lv(e){Am(Sn(Xh,"registerOnLoadHandler"),e)}function uv(e){Tm(Sn(Xh,"registerBeforeUnloadHandler"),e)}function dv(e){fs(Sn(Xh,"registerFocusEnterHandler"),"focusEnter",e,[])}function fv(e){fs(Sn(Xh,"registerChangeSettingsHandler"),"changeSettings",e,[xt.content])}function pv(e,t){hr(Qn),Va(Sn(Xh,"getTabInstances"),t).then((t=>{e(t)}))}function gv(e,t){hr(Qn),_a(Sn(Xh,"getMruTabInstances"),t).then((t=>{e(t)}))}function mv(e){Wa(Sn(Xh,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function hv(e,t){hr(Qn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage);const n=null!=t?t:$t();sa(Sn(Xh,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function vv(e){Ba(Sn(Xh,"setFrameContext"),e)}function wv(e,t,n){Qi(Sn(Xh,"initializeWithFrameContext"),n).then((()=>t&&t())),Ba(Sn(Xh,"setFrameContext"),e)}const Cv="v1";function yv(e){Ha(Sn(Cv,"navigation.returnFocus"),e)}function bv(e,t){hr(Qn);const n=null!=t?t:$t();Da(Sn(Cv,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Sv(e,t){hr(Qn,xt.content,xt.sidePanel,xt.settings,xt.remove,xt.task,xt.stage,xt.meetingStage);const n=null!=t?t:$t();Ua(Sn(Cv,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Ev(e){hr(Qn);const t=null!=e?e:$t();La(Sn(Cv,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const Av="v1";function Iv(e){ja(Sn(Av,"settings.setValidityState"),e)}function Tv(e){hr(Qn,xt.content,xt.settings,xt.remove,xt.sidePanel),za(Sn(Av,"settings.getSettings")).then((t=>{e(t)}))}function Pv(e,t){hr(Qn,xt.content,xt.settings,xt.sidePanel);const n=null!=t?t:$t();$a(Sn(Av,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Ov(e){Di(Sn(Av,"settings.registerOnSaveHandler"),e)}function Rv(e){Vi(Sn(Av,"settings.registerOnRemoveHandler"),e)}var Fv=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 kv="v1";function Mv(e,t){const n=Sn(kv,"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?(hr(Qn,xt.content,xt.sidePanel,xt.meetingStage),Xs(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?oi(n,Lv(e),r):ri(n,Uv(e),r),new gg}function Nv(e){e=Dv(e);const{width:t,height:n}=e,r=Fv(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ni(Sn(kv,"tasks.updateTask"),e)}function xv(e,t){ii(Sn(kv,"tasks.submitTask"),e,t)}function Uv(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:Dt.Small,width:e.width?e.width:Dt.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Lv(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:Dt.Small,width:e.width?e.width:Dt.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function Dv(e){return e.height=e.height?e.height:Dt.Small,e.width=e.width?e.width:Dt.Small,e}const Hv="v2";var Vv,_v;function Wv(){return!(!hr(Qn,xt.meetingStage,xt.sidePanel,xt.content)||!Qn.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Vv||(Vv={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(_v||(_v={}));class Bv{getFluidTenantInfo(){return jv(),new Promise((e=>{e(zs(Sn(Hv,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return jv(),new Promise((t=>{t(zs(Sn(Hv,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return jv(),new Promise((e=>{e(zs(Sn(Hv,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return jv(),new Promise((t=>{t(zs(Sn(Hv,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return jv(),new Promise((e=>{e(zs(Sn(Hv,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return jv(),new Promise((t=>{t(zs(Sn(Hv,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return jv(),new Promise((t=>{t(zs(Sn(Hv,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return jv(),new Promise((t=>{t(zs(Sn(Hv,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return jv(),new Bv}}function jv(){if(!Wv())throw new Error("LiveShareHost Not supported")}var zv=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 $v(e){try{return e.cartItems=qv(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function qv(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=qv(e.accessories)),e}))}const Gv=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=zv(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Gv(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function Jv(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)Zv(t),Kv(t.accessories)}function Kv(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");Zv(t)}}}function Zv(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");Xv(e.price),Yv(e.quantity)}function Qv(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===bt(e))throw new Error("id must be a valid UUID")}}function Xv(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 Yv(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function ew(e){if(!Object.values(ow).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const tw="v2",nw={majorVersion:1,minorVersion:1};var rw,ow;function iw(){if(hr(Qn,xt.content,xt.task),!lw())throw _t;return zs(Sn(tw,"marketplace.getCart"),"marketplace.getCart",nw).then($v)}function aw(e){if(hr(Qn,xt.content,xt.task),!lw())throw _t;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return Qv(null==e?void 0:e.cartId),Jv(null==e?void 0:e.cartItems),zs(Sn(tw,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Gv(e.cartItems),cartVersion:nw})).then($v)}function sw(e){if(hr(Qn,xt.content,xt.task),!lw())throw _t;if(!e)throw new Error("removeCartItemsParams must be provided");if(Qv(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 zs(Sn(tw,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:nw})).then($v)}function cw(e){if(hr(Qn,xt.content,xt.task),!lw())throw _t;if(!e)throw new Error("updateCartStatusParams must be provided");return Qv(null==e?void 0:e.cartId),ew(null==e?void 0:e.cartStatus),zs(Sn(tw,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:nw})).then($v)}function lw(){return!(!hr(Qn)||!Qn.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(rw||(rw={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(ow||(ow={}))})(),r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],l=i[1],u=new o(c(e,a,l)),d=0,f=l>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[d++]=t>>16&255,u[d++]=t>>8&255,u[d++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[d++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[d++]=t>>8&255,u[d++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function l(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function u(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(l(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?l(e,i,o,"day"):i>=r?l(e,i,r,"hour"):i>=n?l(e,i,n,"minute"):i>=t?l(e,i,t,"second"):e+" ms"}function l(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>Et,AppId:()=>Or,ChannelType:()=>Ht,ChildAppWindow:()=>hg,DialogDimension:()=>Lt,EduType:()=>Ft,EmailAddress:()=>Wf,ErrorCode:()=>It,FileOpenPreference:()=>St,FrameContexts:()=>xt,HostClientType:()=>Mt,HostName:()=>Nt,LiveShareHost:()=>zv,NotificationTypes:()=>Vc,ParentAppWindow:()=>vg,SecondaryM365ContentIdName:()=>At,TaskModuleDimension:()=>Lt,TeamType:()=>Dt,UUID:()=>vn,UserSettingTypes:()=>Wc,UserTeamRole:()=>Ut,ViewerActionTypes:()=>_c,app:()=>i,appEntity:()=>H,appInitialization:()=>be,appInstallDialog:()=>G,authentication:()=>a,barCode:()=>K,calendar:()=>ae,call:()=>ye,chat:()=>Z,clipboard:()=>Q,conversations:()=>E,copilot:()=>T,dialog:()=>p,enablePrintCapability:()=>nv,executeDeepLink:()=>wv,externalAppAuthentication:()=>P,externalAppAuthenticationForCEA:()=>O,externalAppCardActions:()=>R,externalAppCardActionsForCEA:()=>F,externalAppCommands:()=>k,files:()=>M,geoLocation:()=>ee,getAdaptiveCardSchemaVersion:()=>gg,getContext:()=>ov,getMruTabInstances:()=>hv,getTabInstances:()=>mv,hostEntity:()=>$,initialize:()=>tv,initializeWithFrameContext:()=>yv,liveShare:()=>Ie,location:()=>ne,logs:()=>S,mail:()=>ce,marketplace:()=>Te,media:()=>J,meeting:()=>oe,meetingRoom:()=>N,menus:()=>g,messageChannels:()=>x,monetization:()=>ie,navigateBack:()=>Iv,navigateCrossDomain:()=>Av,navigateToTab:()=>Ev,nestedAppAuth:()=>X,notifications:()=>D,openFilePreview:()=>Jc,otherAppStateChange:()=>U,pages:()=>y,people:()=>ue,print:()=>rv,profile:()=>de,registerAppButtonClickHandler:()=>sv,registerAppButtonHoverEnterHandler:()=>cv,registerAppButtonHoverLeaveHandler:()=>lv,registerBackButtonHandler:()=>uv,registerBeforeUnloadHandler:()=>fv,registerChangeSettingsHandler:()=>gv,registerCustomHandler:()=>qc,registerFocusEnterHandler:()=>pv,registerFullScreenHandler:()=>av,registerOnLoadHandler:()=>dv,registerOnThemeChangeHandler:()=>iv,registerUserSettingsChangeHandler:()=>Gc,remoteCamera:()=>L,returnFocus:()=>Sv,search:()=>fe,secondaryBrowser:()=>te,sendCustomEvent:()=>$c,sendCustomMessage:()=>zc,setFrameContext:()=>Cv,settings:()=>Ee,shareDeepLink:()=>vv,sharing:()=>ge,stageView:()=>he,store:()=>q,tasks:()=>Ae,teams:()=>W,teamsCore:()=>le,thirdPartyCloudStorage:()=>Se,uploadCustomApp:()=>jc,version:()=>fr,videoEffects:()=>B,videoEffectsEx:()=>j,visualMedia:()=>we,webStorage:()=>Ce});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>Ur,getTelemetryPort:()=>xr,isSupported:()=>Dr});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>jr,getDataLayerPort:()=>Wr,isSupported:()=>Br});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>zr,registerOnResumeHandler:()=>$r});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Zr,FailedReason:()=>Kr,Messages:()=>Jr,_initialize:()=>eo,_uninitialize:()=>to,getContext:()=>no,getFrameContext:()=>Xr,initialize:()=>Yr,isInitialized:()=>Qr,lifecycle:()=>o,notifyAppLoaded:()=>ro,notifyExpectedFailure:()=>ao,notifyFailure:()=>io,notifySuccess:()=>oo,openLink:()=>lo,registerHostToAppPerformanceMetricsHandler:()=>co,registerOnThemeChangeHandler:()=>so});var a={};n.r(a),n.d(a,{DataResidency:()=>No,authenticate:()=>Co,getAuthToken:()=>bo,getUser:()=>Eo,initialize:()=>vo,notifyFailure:()=>Fo,notifySuccess:()=>Ro,registerAuthenticationHandlers:()=>wo});var s={};n.r(s),n.d(s,{isSupported:()=>Do,resize:()=>xo});var c={};n.r(c),n.d(c,{isSupported:()=>Lo,open:()=>Uo});var l={};n.r(l),n.d(l,{isSupported:()=>Wo,registerOnMessageFromParent:()=>_o,sendMessageToDialog:()=>Vo,sendMessageToParentFromDialog:()=>Ho});var u={};n.r(u),n.d(u,{bot:()=>c,getDialogInfoFromBotUrlDialogInfo:()=>qo,getDialogInfoFromUrlDialogInfo:()=>$o,isSupported:()=>zo,open:()=>Bo,parentCommunication:()=>l,submit:()=>jo});var d={};n.r(d),n.d(d,{isSupported:()=>ri,open:()=>ni});var f={};n.r(f),n.d(f,{bot:()=>d,isSupported:()=>ii,open:()=>oi});var p={};n.r(p),n.d(p,{adaptiveCard:()=>f,initialize:()=>ai,isSupported:()=>si,update:()=>s,url:()=>u});var g={};n.r(g),n.d(g,{DisplayMode:()=>li,MenuItem:()=>di,MenuListType:()=>ui,initialize:()=>vi,isSupported:()=>Ai,setNavBarMenu:()=>yi,setUpViews:()=>wi,showActionMenu:()=>Si});var m={};n.r(m),n.d(m,{initialize:()=>Ii,isSupported:()=>Li,registerChangeConfigHandler:()=>Ni,registerOnRemoveHandler:()=>Fi,registerOnRemoveHandlerHelper:()=>ki,registerOnSaveHandler:()=>Oi,registerOnSaveHandlerHelper:()=>Ri,setConfig:()=>Pi,setValidityState:()=>Ti});var h={};n.r(h),n.d(h,{isSupported:()=>fa,onClick:()=>la,onHoverEnter:()=>ua,onHoverLeave:()=>da});var v={};n.r(v),n.d(v,{isSupported:()=>ma,navigateTo:()=>pa,navigateToDefaultPage:()=>ga});var w={};n.r(w),n.d(w,{enterFullscreen:()=>ha,exitFullscreen:()=>va,isSupported:()=>wa});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>ba,getTabInstances:()=>ya,isSupported:()=>Sa,navigateToTab:()=>Ca});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Ea,ReturnFocusType:()=>Aa,appButton:()=>h,backStack:()=>b,config:()=>m,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>Ra,initializeWithFrameContext:()=>Oa,isSupported:()=>xa,navigateCrossDomain:()=>Fa,navigateToApp:()=>ka,registerFocusEnterHandler:()=>Ta,registerFullScreenHandler:()=>Na,returnFocus:()=>Ia,setCurrentFrame:()=>Pa,shareDeepLink:()=>Ma,tabs:()=>C});var b={};n.r(b),n.d(b,{_initialize:()=>Qa,isSupported:()=>ns,navigateBack:()=>Xa,registerBackButtonHandler:()=>Ya,registerBackButtonHandlerHelper:()=>es});var S={};n.r(S),n.d(S,{isSupported:()=>Hc,registerGetLogHandler:()=>Lc});var E={};n.r(E),n.d(E,{closeConversation:()=>Qc,getChatMembers:()=>Xc,isSupported:()=>Yc,openConversation:()=>Zc});var A={};n.r(A),n.d(A,{isSupported:()=>rl,sendCustomTelemetryData:()=>ol});var I={};n.r(I),n.d(I,{getEligibilityInfo:()=>ll,isSupported:()=>cl});var T={};n.r(T),n.d(T,{customTelemetry:()=>A,eligibility:()=>I});var P={};n.r(P),n.d(P,{ActionExecuteInvokeRequestType:()=>gl,ActionExecuteResponseHandler:()=>wl,InvokeErrorCode:()=>vl,InvokeResponseType:()=>hl,OriginalRequestType:()=>ml,SerializableActionExecuteInvokeRequest:()=>fl,authenticateAndResendRequest:()=>El,authenticateWithOauth2:()=>Tl,authenticateWithPowerPlatformConnectorPlugins:()=>Pl,authenticateWithSSO:()=>Al,authenticateWithSSOAndResendRequest:()=>Il,isActionExecuteResponse:()=>pl,isInvokeError:()=>Cl,isSupported:()=>Ol,validateActionExecuteInvokeRequest:()=>bl});var O={};n.r(O),n.d(O,{authenticateAndResendRequest:()=>Nl,authenticateWithOauth:()=>Ml,authenticateWithSSO:()=>kl,authenticateWithSSOAndResendRequest:()=>xl,isSupported:()=>Dl,validateInput:()=>Ul});var R={};n.r(R),n.d(R,{ActionOpenUrlErrorCode:()=>Vl,ActionOpenUrlType:()=>Hl,isSupported:()=>Bl,processActionOpenUrl:()=>Wl,processActionSubmit:()=>_l});var F={};n.r(F),n.d(F,{isSupported:()=>Gl,processActionOpenUrl:()=>$l,processActionSubmit:()=>ql});var k={};n.r(k),n.d(k,{isSupported:()=>Ql,processActionCommand:()=>Zl});var M={};n.r(M),n.d(M,{CloudStorageProvider:()=>Yl,CloudStorageProviderFileAction:()=>ou,CloudStorageProviderType:()=>eu,DocumentLibraryAccessType:()=>nu,FileDownloadStatus:()=>ru,SpecialDocumentLibraryType:()=>tu,addCloudStorageFolder:()=>au,addCloudStorageProvider:()=>gu,addCloudStorageProviderFile:()=>hu,copyMoveFiles:()=>du,deleteCloudStorageFolder:()=>su,deleteCloudStorageProviderFile:()=>wu,downloadCloudStorageProviderFile:()=>Cu,getCloudStorageFolderContents:()=>cu,getCloudStorageFolders:()=>iu,getExternalProviders:()=>uu,getFileDownloads:()=>fu,openCloudStorageFile:()=>lu,openDownloadFolder:()=>pu,registerCloudStorageProviderContentChangeHandler:()=>Su,registerCloudStorageProviderListChangeHandler:()=>bu,removeCloudStorageProvider:()=>mu,renameCloudStorageProviderFile:()=>vu,uploadCloudStorageProviderFile:()=>yu});var N={};n.r(N),n.d(N,{getPairedMeetingRoomInfo:()=>Iu,isSupported:()=>Ru,registerMeetingRoomCapabilitiesUpdateHandler:()=>Pu,registerMeetingRoomStatesUpdateHandler:()=>Ou,sendCommandToPairedMeetingRoom:()=>Tu});var x={};n.r(x),n.d(x,{dataLayer:()=>t,isSupported:()=>Fu,telemetry:()=>e});var D={};n.r(D),n.d(D,{isSupported:()=>Nu,showNotification:()=>Mu});var U={};n.r(U),n.d(U,{isSupported:()=>Hu,notifyInstallCompleted:()=>Lu,registerAppInstallationHandler:()=>Du,unregisterAppInstallationHandler:()=>Uu});var L={};n.r(L),n.d(L,{ControlCommand:()=>_u,ErrorReason:()=>Wu,SessionTerminatedReason:()=>Bu,getCapableParticipants:()=>ju,isSupported:()=>Qu,registerOnCapableParticipantsChangeHandler:()=>Gu,registerOnDeviceStateChangeHandler:()=>Ku,registerOnErrorHandler:()=>Ju,registerOnSessionStatusChangeHandler:()=>Zu,requestControl:()=>zu,sendControlCommand:()=>$u,terminateSession:()=>qu});var H={};n.r(H),n.d(H,{isSupported:()=>ed,selectAppEntity:()=>Yu});var V={};n.r(V),n.d(V,{getUserJoinedTeams:()=>nd,isSupported:()=>rd});var _={};n.r(_),n.d(_,{getConfigSetting:()=>id,isSupported:()=>ad,joinedTeams:()=>V});var W={};n.r(W),n.d(W,{ChannelType:()=>cd,fullTrust:()=>_,getTeamChannels:()=>ld,isSupported:()=>dd,refreshSiteUrl:()=>ud});var B={};n.r(B),n.d(B,{EffectChangeType:()=>bd,EffectFailureReason:()=>Sd,VideoFrameFormat:()=>yd,isSupported:()=>Od,notifySelectedVideoEffectChanged:()=>Ad,registerForVideoEffect:()=>Id,registerForVideoFrame:()=>Ed});var j={};n.r(j),n.d(j,{ErrorLevel:()=>Xd,frameProcessingTimeoutInMs:()=>Zd,isSupported:()=>sf,notifyFatalError:()=>uf,notifySelectedVideoEffectChanged:()=>rf,registerForVideoEffect:()=>of,registerForVideoFrame:()=>Yd,updatePersonalizedEffects:()=>af});var z={};n.r(z),n.d(z,{addAndConfigure:()=>wf,getAll:()=>Cf,isSupported:()=>Ef,reconfigure:()=>yf,remove:()=>Sf,rename:()=>bf});var $={};n.r($),n.d($,{AppTypes:()=>Tf,isSupported:()=>Pf,tab:()=>z});var q={};n.r(q),n.d(q,{isSupported:()=>Lf,openAppDetail:()=>xf,openFullStore:()=>Nf,openInContextStore:()=>Df,openSpecificStore:()=>Uf});var G={};n.r(G),n.d(G,{isSupported:()=>cp,openAppInstallDialog:()=>sp});var J={};n.r(J),n.d(J,{CameraStartMode:()=>pp,File:()=>wp,FileFormat:()=>dp,ImageOutputFormats:()=>vp,ImageUriType:()=>hp,Media:()=>Ep,MediaControllerEvent:()=>fp,MediaType:()=>mp,Source:()=>gp,VideoController:()=>Ip,captureImage:()=>Cp,hasPermission:()=>yp,requestPermission:()=>bp,scanBarCode:()=>Op,selectMedia:()=>Tp,viewImages:()=>Pp});var K={};n.r(K),n.d(K,{hasPermission:()=>jp,isSupported:()=>$p,requestPermission:()=>zp,scanBarCode:()=>Bp});var Z={};n.r(Z),n.d(Z,{isSupported:()=>Zp,openChat:()=>Gp,openGroupChat:()=>Kp});var Q={};n.r(Q),n.d(Q,{isSupported:()=>tg,read:()=>eg,write:()=>Yp});var X={};n.r(X),n.d(X,{isNAAChannelRecommended:()=>ng});var Y={};n.r(Y),n.d(Y,{chooseLocation:()=>ag,isSupported:()=>cg,showLocation:()=>sg});var ee={};n.r(ee),n.d(ee,{getCurrentLocation:()=>ug,hasPermission:()=>dg,isSupported:()=>pg,map:()=>Y,requestPermission:()=>fg});var te={};n.r(te),n.d(te,{isSupported:()=>yg,open:()=>Cg});var ne={};n.r(ne),n.d(ne,{getLocation:()=>Sg,isSupported:()=>Ag,showLocation:()=>Eg});var re={};n.r(re),n.d(re,{setOptions:()=>Tg});var oe={};n.r(oe),n.d(oe,{CallType:()=>Mg,EventActionSource:()=>xg,MeetingReactionType:()=>Fg,MeetingType:()=>kg,SharingProtocol:()=>Ng,appShareButton:()=>re,getAppContentStageSharingCapabilities:()=>$g,getAppContentStageSharingState:()=>Gg,getAuthenticationTokenForAnonymousUser:()=>Vg,getIncomingClientAudioState:()=>Dg,getLiveStreamState:()=>_g,getMeetingDetails:()=>Lg,getMeetingDetailsVerbose:()=>Hg,joinMeeting:()=>Qg,registerLiveStreamChangedHandler:()=>jg,registerMeetingReactionReceivedHandler:()=>Zg,registerRaiseHandStateChangedHandler:()=>Kg,registerSpeakingStateChangeHandler:()=>Jg,requestAppAudioHandling:()=>Xg,requestStartLiveStreaming:()=>Wg,requestStopLiveStreaming:()=>Bg,shareAppContentToStage:()=>zg,stopSharingAppContentToStage:()=>qg,toggleIncomingClientAudio:()=>Ug,updateMicState:()=>tm});var ie={};n.r(ie),n.d(ie,{isSupported:()=>am,openPurchaseExperience:()=>im});var ae={};n.r(ae),n.d(ae,{composeMeeting:()=>lm,isSupported:()=>um,openCalendarItem:()=>cm});var se={};n.r(se),n.d(se,{composeMailWithHandoff:()=>gm,isSupported:()=>mm});var ce={};n.r(ce),n.d(ce,{ComposeMailType:()=>bm,composeMail:()=>Cm,handoff:()=>se,isSupported:()=>ym,openMailItem:()=>wm});var le={};n.r(le),n.d(le,{enablePrintCapability:()=>Em,isSupported:()=>Rm,print:()=>Am,registerBeforeUnloadHandler:()=>Pm,registerBeforeUnloadHandlerHelper:()=>Om,registerOnLoadHandler:()=>Im,registerOnLoadHandlerHelper:()=>Tm});var ue={};n.r(ue),n.d(ue,{isSupported:()=>xm,selectPeople:()=>Mm});var de={};n.r(de),n.d(de,{isSupported:()=>Vm,showProfile:()=>Hm});var fe={};n.r(fe),n.d(fe,{closeSearch:()=>Gm,isSupported:()=>qm,registerHandlers:()=>zm,unregisterHandlers:()=>$m});var pe={};n.r(pe),n.d(pe,{getContent:()=>Zm,isSupported:()=>Qm});var ge={};n.r(ge),n.d(ge,{SharingAPIMessages:()=>eh,history:()=>pe,isSupported:()=>ah,shareWebContent:()=>th});var me={};n.r(me),n.d(me,{close:()=>ch,isSupported:()=>lh});var he={};n.r(he),n.d(he,{StageViewOpenMode:()=>dh,isSupported:()=>ph,open:()=>fh,self:()=>me});var ve={};n.r(ve),n.d(ve,{captureImages:()=>vh,isSupported:()=>Ch,retrieveImages:()=>wh});var we={};n.r(we),n.d(we,{CameraRestriction:()=>Ah,Source:()=>Ih,hasPermission:()=>Th,image:()=>ve,requestPermission:()=>Ph});var Ce={};n.r(Ce),n.d(Ce,{isSupported:()=>xh,isWebStorageClearedOnUserLogOut:()=>Mh});var ye={};n.r(ye),n.d(ye,{CallModalities:()=>Uh,isSupported:()=>Hh,startCall:()=>Lh});var be={};n.r(be),n.d(be,{ExpectedFailureReason:()=>Zr,FailedReason:()=>Kr,Messages:()=>Jr,notifyAppLoaded:()=>_h,notifyExpectedFailure:()=>jh,notifyFailure:()=>Bh,notifySuccess:()=>Wh});var Se={};n.r(Se),n.d(Se,{getDragAndDropFiles:()=>Qh,isSupported:()=>Yh});var Ee={};n.r(Ee),n.d(Ee,{getSettings:()=>Ov,registerOnRemoveHandler:()=>kv,registerOnSaveHandler:()=>Fv,setSettings:()=>Rv,setValidityState:()=>Pv});var Ae={};n.r(Ae),n.d(Ae,{getDefaultSizeIfNotProvided:()=>Vv,startTask:()=>xv,submitTask:()=>Uv,updateTask:()=>Dv});var Ie={};n.r(Ie),n.d(Ie,{ContainerState:()=>Bv,LiveShareHost:()=>zv,UserMeetingRole:()=>Wv,isSupported:()=>jv});var Te={};n.r(Te),n.d(Te,{CartStatus:()=>aw,Intent:()=>iw,addOrUpdateCartItems:()=>cw,cartVersion:()=>ow,getCart:()=>sw,isSupported:()=>dw,removeCartItems:()=>lw,updateCartStatus:()=>uw});var Pe=n(815),Oe=n(933);const Re=ke,Fe=2147483647;function ke(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 Ne(e)}return Me(e,t,n)}function Me(e,t,n){if("string"==typeof e)return Le(e,t);if(ArrayBuffer.isView(e))return ze(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(Ve(e,ArrayBuffer)||e&&Ve(e.buffer,ArrayBuffer))return $e(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Ve(e,SharedArrayBuffer)||e&&Ve(e.buffer,SharedArrayBuffer)))return $e(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 ke.from(r,t,n);const o=ft(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return ke.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 Ne(e){return xe(e),De(e<0?0:0|Ue(e))}function xe(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 De(e){if(e>Fe)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,ke.prototype),t}function Ue(e){if(e>=Fe)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Fe.toString(16)+" bytes");return 0|e}function Le(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!ke.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|He(e,t);let r=De(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function He(e,t){if(ke.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Ve(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 _e(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return We(e).length;default:if(o)return r?-1:_e(e).length;t=(""+t).toLowerCase(),o=!0}}function Ve(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function _e(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 We(e){return Oe.toByteArray(je(e))}ke.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}}(),ke.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),ke.from=function(e,t,n){return Me(e,t,n)},Object.setPrototypeOf(ke.prototype,Uint8Array.prototype),Object.setPrototypeOf(ke,Uint8Array),ke.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}},ke.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==ke.prototype};const Be=/[^+/0-9A-Za-z-_]/g;function je(e){if((e=(e=e.split("=")[0]).trim().replace(Be,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function ze(e){if(Ve(e,Uint8Array)){const t=new Uint8Array(e);return $e(t.buffer,t.byteOffset,t.byteLength)}return qe(e)}function $e(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,ke.prototype),r}function qe(e){const t=e.length<0?0:0|Ue(e.length),n=De(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Ge(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 Ze(r)}function Je(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 Qe(this,t,n);case"utf8":case"utf-8":return Ge(this,t,n);case"ascii":return Xe(this,t,n);case"latin1":case"binary":return Ye(this,t,n);case"base64":return et(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tt(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}ke.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Ge(this,0,e):Je.apply(this,arguments)};const Ke=4096;function Ze(e){const t=e.length;if(t<=Ke)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ke));return n}function Qe(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+=dt[e[r]];return o}function Xe(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 Ye(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 et(e,t,n){return 0===t&&n===e.length?Oe.fromByteArray(e):Oe.fromByteArray(e.slice(t,n))}function tt(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 nt(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(ut(r))return a;e[n+a]=r}return a}function rt(e,t,n,r){return lt(_e(t,e.length-n),e,n,r)}function ot(e,t,n,r){return lt(st(t),e,n,r)}function it(e,t,n,r){return lt(We(t),e,n,r)}function at(e,t,n,r){return lt(ct(t,e.length-n),e,n,r)}function st(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function ct(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 lt(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 ut(e){return e!=e}ke.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 nt(this,e,t,n);case"utf8":case"utf-8":return rt(this,e,t,n);case"ascii":case"latin1":case"binary":return ot(this,e,t,n);case"base64":return it(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return at(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const dt=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 ft(e){if(ke.isBuffer(e)){const t=0|Ue(e.length),n=De(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||ut(e.length)?De(0):qe(e):"Buffer"===e.type&&Array.isArray(e.data)?qe(e.data):void 0}const pt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let gt;const mt=new Uint8Array(16);function ht(){if(!gt&&(gt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gt(mt)}const vt=[];for(let e=0;e<256;++e)vt.push((e+256).toString(16).slice(1));function wt(e,t=0){return vt[e[t+0]]+vt[e[t+1]]+vt[e[t+2]]+vt[e[t+3]]+"-"+vt[e[t+4]]+vt[e[t+5]]+"-"+vt[e[t+6]]+vt[e[t+7]]+"-"+vt[e[t+8]]+vt[e[t+9]]+"-"+vt[e[t+10]]+vt[e[t+11]]+vt[e[t+12]]+vt[e[t+13]]+vt[e[t+14]]+vt[e[t+15]]}const Ct=function(e,t,n){if(pt.randomUUID&&!t&&!e)return pt.randomUUID();const r=(e=e||{}).random||(e.rng||ht)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return wt(r)},yt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const bt=function(e){return"string"==typeof e&&yt.test(e)};var St,Et,At,It,Tt,Pt,Ot,Rt,Ft,kt,Mt,Nt,xt,Dt,Ut,Lt,Ht;function Vt(e){return void 0!==(null==e?void 0:e.errorCode)}!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(St||(St={})),function(e){e.M365Content="m365content"}(Et||(Et={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(At||(At={})),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"}(It||(It={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Tt||(Tt={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Pt||(Pt={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Ot||(Ot={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(Rt||(Rt={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Ft||(Ft={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(kt||(kt={})),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"}(Mt||(Mt={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(Nt||(Nt={})),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"}(xt||(xt={})),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"}(Dt||(Dt={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(Ut||(Ut={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(Lt||(Lt={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Ht||(Ht={}));const _t={errorCode:It.NOT_SUPPORTED_ON_PLATFORM},Wt={majorVersion:1,minorVersion:5},Bt={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},jt=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),zt=new Error("Invalid response: Received more images than the specified max limit in the response.");function $t(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function qt(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 Gt(){return Ct()}function Jt(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&Jt(e[t])})),Object.freeze(e)}function Kt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Zt(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function Qt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Xt(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 Yt(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 en(e){return!(qt(`${e.majorVersion}.${e.minorVersion}`,`${Wt.majorVersion}.${Wt.minorVersion}`)>=0)}function tn(e){return"https:"===e.protocol}function nn(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=Re.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function rn(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function on(){if(an())throw new Error("window object undefined at SSR check");return window}function an(){return"undefined"==typeof window}function sn(e,t){if(un(e)||!dn(e)||!fn(e))throw t||new Error("id is not valid.")}function cn(e,t){const n=e.toString().toLocaleLowerCase();if(un(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!tn(e))throw t||new Error("Url should be a valid https url")}function ln(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function un(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function dn(e){return e.length<256&&e.length>4}function fn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function pn(e){if(!e)throw new Error("id must not be empty");if(!1===bt(e))throw new Error("id must be a valid UUID")}const gn=!!performance&&"now"in performance;function mn(){return gn?performance.now()+performance.timeOrigin:void 0}function hn(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=>hn(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=>hn(e[n],t+1)))}class vn{constructor(e=Gt()){this.uuid=e,pn(e)}toString(){return this.uuid}}const wn=new vn,Cn=Pe.debug.formatArgs;Pe.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${wn.toString()}]`,Cn.call(this,e)};const yn=(0,Pe.debug)("teamsJs");function bn(e){return yn.extend(e)}function Sn(e,t){return`${e}_${t}`}function En(e){return/^v\d+_[\w.]+$/.test(e)}const An=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const In="2.0.1",Tn="2.0.2",Pn="2.0.3",On="2.0.4",Rn="2.0.1",Fn="1.9.0",kn="2.0.0",Mn="1.7.0",Nn="1.8.0",xn="1.9.0",Dn=n.t(An,2).validOrigins,Un=1500,Ln=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),Hn=/^https:\/\//,Vn="https",_n="teams.microsoft.com",Wn="The library has not yet been initialized",Bn="The runtime has not yet been initialized",jn="The runtime version is not supported",zn="The call was not properly started";class $n{}$n.initializeCalled=!1,$n.initializeCompleted=!1,$n.additionalValidOrigins=[],$n.initializePromise=void 0,$n.isFramelessWindow=!1,$n.frameContext=void 0,$n.hostClientType=void 0,$n.printCapabilityEnabled=!1;var qn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Gn=bn("runtime"),Jn=4;function Kn(e){return e.apiVersion===Jn}const Zn={apiVersion:-1,supports:{}};function Qn(e){if(Kn(e))return!0;throw-1===e.apiVersion?new Error(Bn):new Error(jn)}let Xn=Zn;const Yn={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:Bt,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:{}}}},er=[Mt.desktop,Mt.web,Mt.rigel,Mt.surfaceHub,Mt.teamsRoomsWindows,Mt.teamsRoomsAndroid,Mt.teamsPhones,Mt.teamsDisplays],tr=[Mt.android,Mt.ios,Mt.ipados,Mt.visionOS],nr=[...er,...tr];function rr(e){let t=e;if(t.apiVersion<Jn&&or.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),Kn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const or=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,r=qn(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:r})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,r,o,i;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(r=null===(n=e.supports.dialog)||void 0===n?void 0:n.url)||void 0===r?void 0:r.bot,parentCommunication:(null===(o=e.supports.dialog)||void 0===o?void 0:o.url)?{}:void 0},update:null===(i=e.supports.dialog)||void 0===i?void 0:i.update}:void 0})}}}],ir={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:er}],"1.9.0":[{capability:{location:{}},hostClientTypes:nr}],"2.0.0":[{capability:{people:{}},hostClientTypes:nr},{capability:{sharing:{}},hostClientTypes:[Mt.desktop,Mt.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[Mt.android,Mt.desktop,Mt.ios,Mt.teamsRoomsAndroid,Mt.teamsPhones,Mt.teamsDisplays,Mt.web]},{capability:{webStorage:{}},hostClientTypes:[Mt.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[Mt.android,Mt.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[Mt.android,Mt.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[Mt.android,Mt.ios,Mt.ipados,Mt.visionOS]}]},ar=Gn.extend("generateBackCompatRuntimeConfig");function sr(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]=sr(e[r]||{},t[r]));return n}function cr(e,t,n){ar("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);ar("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{qt(e,t)>=0&&n[t].forEach((e=>{void 0!==$n.hostClientType&&e.hostClientTypes.includes($n.hostClientType)&&(r=sr(r,e.capability))}))}));const o={apiVersion:Jn,hostVersionsInfo:Bt,isLegacyTeams:!0,supports:r};return ar("Runtime config after updating based on highestSupportedVersion: %o",o),o}const lr=Gn.extend("applyRuntimeConfig");function ur(e){"string"==typeof e.apiVersion&&(lr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),lr("Fast-forwarding runtime %o",e);const t=rr(e);lr("Applying runtime %o",t),Xn=Jt(t)}function dr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const fr="2.34.0",pr=bn("internal"),gr=pr.extend("ensureInitializeCalled"),mr=pr.extend("ensureInitialized");function hr(){if(!$n.initializeCalled)throw gr(Wn),new Error(Wn)}function vr(e,...t){if(!$n.initializeCompleted)throw mr("%s. initializeCalled: %s",Wn,$n.initializeCalled.toString()),new Error(Wn);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===$n.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${$n.frameContext}".`)}return Qn(e)}function wr(e=In){const t=qt($n.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Cr(){return $n.hostClientType==Mt.android||$n.hostClientType==Mt.ios||$n.hostClientType==Mt.ipados||$n.hostClientType==Mt.visionOS}function yr(e=In){if(!Cr()){throw{errorCode:It.NOT_SUPPORTED_ON_PLATFORM}}if(!wr(e)){throw{errorCode:It.OLD_PLATFORM}}}function br(e){let t=$n.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&Hn.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),$n.additionalValidOrigins=t}function Sr(e){if(un(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(!Ir(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Er}-${Ar}).`);if(Tr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Er=4,Ar=256;function Ir(e){return e.length<Ar&&e.length>Er}function Tr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Pr(e){if(!(e instanceof Or))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Or{constructor(e){this.appIdAsString=e,Sr(e)}serialize(){return this.toString()}toString(){return this.appIdAsString}}function Rr(e){return null==e}var Fr=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 kr;const Mr="v1",Nr=bn("messageChannels.telemetry");function xr(){return Fr(this,void 0,void 0,(function*(){if(kr)return Nr("Returning telemetry port from cache"),kr;if(!Dr())throw _t;return kr=yield Zs(Sn(Mr,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),kr}))}function Dr(){var e;return!(!vr(Xn)||!(null===(e=Xn.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function Ur(){kr=void 0}var Lr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let Hr;const Vr="v1",_r=bn("messageChannels.dataLayer");function Wr(){return Lr(this,void 0,void 0,(function*(){if(Hr)return _r("Returning dataLayer port from cache"),Hr;if(!Br())throw _t;return Hr=yield Zs(Sn(Vr,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),Hr}))}function Br(){var e;return!(!vr(Xn)||!(null===(e=Xn.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function jr(){Hr=void 0}function zr(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");vr(Xn),Es(e)}function $r(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");vr(Xn),As(e)}const qr="v2",Gr=bn("app"),Jr={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Kr,Zr;function Qr(){return $n.initializeCompleted}function Xr(){return $n.frameContext}function Yr(e){return ji(Sn(qr,"app.initialize"),e)}function eo(e){Hs.currentWindow=e}function to(){$n.initializeCalled&&(ss(),$n.initializeCalled=!1,$n.initializeCompleted=!1,$n.initializePromise=void 0,$n.additionalValidOrigins=[],$n.frameContext=void 0,$n.hostClientType=void 0,$n.isFramelessWindow=!1,Ur(),jr(),Ws())}function no(){return new Promise((e=>{hr(),e(Bs(Sn(qr,"app.getContext"),"getContext"))})).then((e=>uo(e)))}function ro(){hr(),zi(Sn(qr,"app.notifyAppLoaded"))}function oo(){return Gi(Sn(qr,"app.notifySuccess"))}function io(e){hr(),qi(Sn(qr,"app.notifyFailure"),e)}function ao(e){hr(),$i(Sn(qr,"app.notifyExpectedFailure"),e)}function so(e){Xi(Sn(qr,"app.registerOnThemeChangeHandler"),e)}function co(e){hs(e)}function lo(e){return Yi(Sn(qr,"app.openLink"),e)}function uo(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:Nt.teams,clientType:e.hostClientType?e.hostClientType:Mt.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new Or(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:$n.frameContext,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Kr||(Kr={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Zr||(Zr={})),Gr("teamsjs instance is version %s, starting at %s UTC (%s local)",fr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(an())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?Gr("teamsjs is being used from %s. %s",t,n):Gr("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const fo="v1",po="v2";let go,mo,ho;function vo(){us(Sn(fo,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",ko,!1),us(Sn(fo,"authentication.registerAuthenticateFailureHandler"),"authentication.authenticate.failure",Mo,!1)}function wo(e){ho=e}function Co(e){const t=void 0!==e,n=t?e:ho;if(!n)throw new Error("No parameters are provided for authentication");vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.remove,xt.task,xt.stage,xt.meetingStage);return yo(n.successCallback||n.failureCallback?Sn(fo,"authentication.authenticate"):Sn(po,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(ho=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(ho=void 0)}}))}function yo(e,t){return new Promise(((n,r)=>{if($n.hostClientType!==Mt.web){const r=ln(t.url);cn(r),n(qs(e,"authentication.authenticate",[r.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)})))}else go={success:n,fail:r},To(t)}))}function bo(e){hr();return So(e&&(e.successCallback||e.failureCallback)?Sn(fo,"authentication.getAuthToken"):Sn(po,"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 So(e,t){return new Promise((n=>{n(qs(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 Eo(e){hr();return Ao(e&&(e.successCallback||e.failureCallback)?Sn(fo,"authentication.getUser"):Sn(po,"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 Ao(e){return new Promise((t=>{t(qs(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function Io(){Po();try{Hs.childWindow&&Hs.childWindow.close()}finally{Hs.childWindow=null,Hs.childOrigin=null}}function To(e){Io();let t=e.width||600,n=e.height||400;t=Math.min(t,Hs.currentWindow.outerWidth-400),n=Math.min(n,Hs.currentWindow.outerHeight-200);const r=ln(e.url.replace("{oauthRedirectMethod}","web"));cn(r);let o=void 0!==Hs.currentWindow.screenLeft?Hs.currentWindow.screenLeft:Hs.currentWindow.screenX,i=void 0!==Hs.currentWindow.screenTop?Hs.currentWindow.screenTop:Hs.currentWindow.screenY;o+=Hs.currentWindow.outerWidth/2-t/2,i+=Hs.currentWindow.outerHeight/2-n/2,Hs.childWindow=Hs.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),Hs.childWindow?Oo():Mo("FailedToOpenWindow")}function Po(){mo&&(clearInterval(mo),mo=0),ds("initialize"),ds("navigateCrossDomain")}function Oo(){Po(),mo=Hs.currentWindow.setInterval((()=>{if(!Hs.childWindow||Hs.childWindow.closed)Mo("CancelledByUser");else{const e=Hs.childOrigin;try{Hs.childOrigin="*",Rc("ping")}finally{Hs.childOrigin=e}}}),100),us(Sn(fo,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[xt.authentication,$n.hostClientType])),us(Sn(fo,"authentication.authenticationWindow.registerNavigateCrossDomainHandler"),"navigateCrossDomain",(()=>!1))}function Ro(e,t){vr(Xn,xt.authentication);Ys(Sn(t?fo:po,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Pc(Hs.parentWindow,(()=>setTimeout((()=>Hs.currentWindow.close()),200)))}function Fo(e,t){vr(Xn,xt.authentication);Ys(Sn(t?fo:po,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Pc(Hs.parentWindow,(()=>setTimeout((()=>Hs.currentWindow.close()),200)))}function ko(e){try{go&&go.success(e)}finally{go=void 0,Io()}}function Mo(e){try{go&&go.fail(new Error(e))}finally{go=void 0,Io()}}var No;function xo(e){Jo(Sn(Go,"dialog.update.resize"),e)}function Do(){return!(!vr(Xn)||!Xn.supports.dialog)&&!!Xn.supports.dialog.update}function Uo(e,t,n){Zo(Sn(Go,"dialog.url.bot.open"),e,t,n)}function Lo(){return vr(Xn)&&void 0!==(Xn.supports.dialog&&Xn.supports.dialog.url&&Xn.supports.dialog.url.bot)}function Ho(e){if(vr(Xn,xt.task),!Wo())throw _t;Ys(Sn(Go,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Vo(e){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!Wo())throw _t;Ys(Sn(Go,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function _o(e){if(vr(Xn,xt.task),!Wo())throw _t;for(ds("messageForChild"),us(Sn(Go,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ei.reverse();ei.length>0;){e(ei.pop())}}function Wo(){var e,t;return vr(Xn)&&!!(null===(t=null===(e=Xn.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Bo(e,t,n){Ko(Sn(Go,"dialog.url.open"),e,t,n)}function jo(e,t){Qo(Sn(Go,"dialog.url.submit"),e,t)}function zo(){return vr(Xn)&&void 0!==(Xn.supports.dialog&&Xn.supports.dialog.url)}function $o(e){return{url:e.url,height:e.size?e.size.height:Lt.Small,width:e.size?e.size.width:Lt.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function qo(e){const t=$o(e);return t.completionBotId=e.completionBotId,t}!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(No||(No={}));const Go="v2";function Jo(e,t){if(vr(Xn,xt.content,xt.sidePanel,xt.task,xt.meetingStage),!Do())throw _t;Ys(e,"tasks.updateTask",[t])}function Ko(e,t,n,r){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!zo())throw _t;r&&us(Sn(Go,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Ys(e,"tasks.startTask",[$o(t)],((e,t)=>{null==n||n({err:e,result:t}),ds("messageForParent")}))}function Zo(e,t,n,r){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!Lo())throw _t;r&&us(Sn(Go,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Ys(e,"tasks.startTask",[qo(t)],((e,t)=>{null==n||n({err:e,result:t}),ds("messageForParent")}))}function Qo(e,t,n){if(vr(Xn,xt.task),!zo())throw _t;Ys(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function Xo(e){return{card:e.card,height:e.size?e.size.height:Lt.Small,width:e.size?e.size.width:Lt.Small,title:e.title}}function Yo(e){const t=Xo(e);return t.completionBotId=e.completionBotId,t}const ei=[];function ti(e){$n.frameContext&&($n.frameContext===xt.task?ei.push(e):ds("messageForChild"))}function ni(e,t){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!ri())throw _t;const n=Yo(e);Ys(Sn(Go,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ri(){const e=Xn.hostVersionsInfo&&Xn.hostVersionsInfo.adaptiveCardSchemaVersion&&!en(Xn.hostVersionsInfo.adaptiveCardSchemaVersion);return vr(Xn)&&void 0!==(e&&Xn.supports.dialog&&Xn.supports.dialog.card&&Xn.supports.dialog.card.bot)}function oi(e,t){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!ii())throw _t;const n=Xo(e);Ys(Sn(Go,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ii(){const e=Xn.hostVersionsInfo&&Xn.hostVersionsInfo.adaptiveCardSchemaVersion&&!en(Xn.hostVersionsInfo.adaptiveCardSchemaVersion);return vr(Xn)&&void 0!==(e&&Xn.supports.dialog&&Xn.supports.dialog.card)}function ai(){us(Sn(Go,"dialog.registerMessageForChildHandler"),"messageForChild",ti,!1)}function si(){return!(!vr(Xn)||!Xn.supports.dialog)}const ci="v2";var li,ui;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(li||(li={}));class di{constructor(){this.enabled=!0,this.selected=!1}}let fi,pi,gi,mi,hi;function vi(){us(Sn(ci,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",bi,!1),us(Sn(ci,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Ei,!1),us(Sn(ci,"menus.registerSetModuleViewHandler"),"setModuleView",Ci,!1)}function wi(e,t){if(vr(Xn),!Ai())throw _t;gi=t,Ys(Sn(ci,"menus.setUpViews"),"setUpViews",[e])}function Ci(e){gi&&gi(e)||(vr(Xn),Ys(Sn(ci,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function yi(e,t){if(vr(Xn),!Ai())throw _t;fi=t,Ys(Sn(ci,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function bi(e){fi&&fi(e)||(vr(Xn),Ys(Sn(ci,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Si(e,t){if(vr(Xn),!Ai())throw _t;pi=t,Ys(Sn(ci,"menus.showActionMenu"),"showActionMenu",[e])}function Ei(e){pi&&pi(e)||(vr(Xn),Ys(Sn(ci,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Ai(){return!(!vr(Xn)||!Xn.supports.menus)}function Ii(){us(Sn(Da,"pages.config.registerSettingsSaveHandler"),"settings.save",Mi,!1),us(Sn(Da,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Di,!1)}function Ti(e){return za(Sn(Da,"pages.config.setValidityState"),e)}function Pi(e){return qa(Sn(Da,"pages.config.setConfig"),e)}function Oi(e){Ri(Sn(Da,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Rr(e)&&!Li())throw _t}))}function Ri(e,t,n){!Rr(t)&&vr(Xn,xt.settings),n&&n(),mi=t,!Rr(t)&&Ys(e,"registerHandler",["save"])}function Fi(e){ki(Sn(Da,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Rr(e)&&!Li())throw _t}))}function ki(e,t,n){!Rr(t)&&vr(Xn,xt.remove,xt.settings),n&&n(),hi=t,!Rr(t)&&Ys(e,"registerHandler",["remove"])}function Mi(e){const t=new xi(e);mi?mi(t):Hs.childWindow?Rc("settings.save",[e]):t.notifySuccess()}function Ni(e){ps(Sn(Da,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[xt.content],(()=>{if(!Li())throw _t}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(ui||(ui={}));class xi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Ys(Sn(Da,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Ys(Sn(Da,"pages.saveEvent.notifyFailure"),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function Di(){const e=new Ui;hi?hi(e):Hs.childWindow?Rc("settings.remove",[]):e.notifySuccess()}class Ui{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Ys(Sn(Da,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Ys(Sn(Da,"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 Li(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.config}class Hi{}class Vi extends Hi{validate(e){return!0}deserialize(e){return e}}var _i=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Wi=6e4,Bi=bn("app");function ji(e,t){if(an()){return Bi.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Xt((()=>Qi(e,t)),Wi,new Error("SDK initialization timed out."))}function zi(e){Ys(e,Jr.AppLoaded,[fr])}function $i(e,t){Ys(e,Jr.ExpectedFailure,[t.reason,t.message])}function qi(e,t){Ys(e,Jr.Failure,[t.reason,t.message])}function Gi(e){return _i(this,void 0,void 0,(function*(){if($n.initializeCompleted)return Ki(e);if(!$n.initializePromise)throw new Error(Wn);return $n.initializePromise.then((()=>Ki(e)))}))}function Ji(){var e;return vr(Xn)&&!!(null===(e=Xn.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Ki(e){return _i(this,void 0,void 0,(function*(){return Ji()?Js(Jr.Success,[fr],new Vi,e).then((()=>({hasFinishedSuccessfully:!0}))):(Ys(e,Jr.Success,[fr]),{hasFinishedSuccessfully:"unknown"})}))}const Zi=Bi.extend("initializeHelper");function Qi(e,t){return new Promise((n=>{$n.initializeCalled||($n.initializeCalled=!0,as(),$n.initializePromise=_s(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=In})=>{$n.frameContext=e,$n.hostClientType=t,$n.clientSupportedSDKVersion=r;try{Zi("Parsing %s",n);const e=JSON.parse(n);if(Zi("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&ur(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{Zi("Attempting to parse %s as an SDK version",n),isNaN(qt(n,In))||($n.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(Zi("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");ur(e)}catch(e){if(!(e instanceof SyntaxError))throw e;ur(cr($n.clientSupportedSDKVersion,Yn,ir))}}$n.initializeCompleted=!0})),vo(),vi(),Ii(),ai()),Array.isArray(t)&&br(t),void 0!==$n.initializePromise?n($n.initializePromise):Zi("GlobalVars.initializePromise is unexpectedly undefined")}))}function Xi(e,t){!Rr(t)&&hr(),gs(e,t)}function Yi(e,t){return new Promise((n=>{vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),n(js(e,"executeDeepLink",t))}))}var ea=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let ta=[];const na=bn("validateOrigin");function ra(){return ea(this,void 0,void 0,(function*(){yield ia()}))}function oa(){return 0===ta.length}function ia(e=!1){return ea(this,void 0,void 0,(function*(){if(!oa()&&!e)return ta;if(an())return ta=Dn,Dn;{na("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),Un);return fetch(Ln,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return na("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(aa(JSON.stringify(e)))return ta=e.validOrigins,ta;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?na(`validOrigins fetch call to CDN failed due to Timeout of ${Un} ms. Defaulting to fallback list`):na("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),ta=Dn,ta)))}}))}function aa(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return na("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function sa(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function ca(e,t){return ia(t).then((t=>{if(!tn(e))return na("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>sa(e,n))))return!0;for(const e of $n.additionalValidOrigins){if(sa("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return na("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,$n.additionalValidOrigins),!1}))}function la(e){ps(Sn(Da,"pages.appButton.onClick"),"appButtonClick",e,[xt.content],(()=>{if(!fa())throw _t}))}function ua(e){ps(Sn(Da,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[xt.content],(()=>{if(!fa())throw _t}))}function da(e){ps(Sn(Da,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[xt.content],(()=>{if(!fa())throw _t}))}function fa(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.appButton}function pa(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!ma())throw _t;t($s(Sn(Da,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function ga(){return new Promise((e=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!ma())throw _t;e($s(Sn(Da,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function ma(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.currentApp}function ha(){if(vr(Xn,xt.content),!wa())throw _t;Ys(Sn(Da,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function va(){if(vr(Xn,xt.content),!wa())throw _t;Ys(Sn(Da,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function wa(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.fullTrust}function Ca(e){return Ha(Sn(Da,"pages.tabs.navigateToTab"),e)}function ya(e){return _a(Sn(Da,"pages.tabs.getTabInstances"),e)}function ba(e){return Wa(Sn(Da,"pages.tabs.getMruTabInstances"),e)}function Sa(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.tabs}var Ea,Aa;function Ia(e){const t=Sn(Da,"pages.returnFocus");if(vr(Xn),!xa())throw _t;if(void 0===e&&Ys(t,"returnFocus",[!1]),"boolean"==typeof e)Ys(t,"returnFocus",[e]);else switch(e){case Aa.PreviousLandmark:case Aa.GoToActivityFeed:Ys(t,"returnFocus",[!1,e]);break;case Aa.NextLandmark:Ys(t,"returnFocus",[!0,e])}}function Ta(e){ps(Sn(Da,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!xa())throw _t}))}function Pa(e){ja(Sn(Da,"pages.setCurrentFrame"),e)}function Oa(e,t,n){ra(),ji(Sn(Da,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Pa(e)}function Ra(){return $a(Sn(Da,"pages.getConfig."))}function Fa(e){return Ua(Sn(Da,"pages.navigateCrossDomain"),e)}function ka(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!xa())throw _t;const n=Sn(Da,"pages.navigateToApp");if(Xn.isLegacyTeams){t(js(n,"executeDeepLink",Yt(Ga(e)?e:Ja(e))))}else{t(js(n,"pages.navigateToApp",Ga(e)?Ka(e):e))}}))}function Ma(e){return Ba(Sn(Da,"pages.shareDeepLink"),e)}function Na(e){ps(Sn(Da,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Rr(e)&&!xa())throw _t}))}function xa(){return!(!vr(Xn)||!Xn.supports.pages)}ra(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Ea||(Ea={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Aa||(Aa={}));const Da="v2";function Ua(e,t){return new Promise((n=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.remove,xt.task,xt.stage,xt.meetingStage),!xa())throw _t;n(zs(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function La(e){return new Promise((t=>{if(vr(Xn),!ns())throw _t;t(zs(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function Ha(e,t){return new Promise((n=>{if(vr(Xn),!Sa())throw _t;n(zs(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Va(e,t){if(vr(Xn),!xa())throw _t;Ys(e,"returnFocus",[t])}function _a(e,t){return new Promise((n=>{if(vr(Xn),!Sa())throw _t;n(Bs(e,"getTabInstances",t))}))}function Wa(e,t){return new Promise((n=>{if(vr(Xn),!Sa())throw _t;n(Bs(e,"getMruTabInstances",t))}))}function Ba(e,t){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!xa())throw _t;Ys(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ja(e,t){if(vr(Xn,xt.content),!xa())throw _t;Ys(e,"setFrameContext",[t])}function za(e,t){if(vr(Xn,xt.settings,xt.remove),!Li())throw _t;Ys(e,"settings.setValidityState",[t])}function $a(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.settings,xt.remove,xt.sidePanel),!xa())throw _t;t(Bs(e,"settings.getSettings"))}))}function qa(e,t){return new Promise((n=>{if(vr(Xn,xt.content,xt.settings,xt.sidePanel),!Li())throw _t;n(js(e,"settings.setSettings",t))}))}function Ga(e){return e.appId instanceof Or}function Ja(e){return Object.assign(Object.assign({},e),{appId:new Or(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function Ka(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let Za;function Qa(){us(Sn(Da,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",ts,!1)}function Xa(){return La(Sn(Da,"pages.backStack.navigateBack"))}function Ya(e){es(Sn(Da,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Rr(e)&&!ns())throw _t}))}function es(e,t,n){!Rr(t)&&vr(Xn),n&&n(),Za=t,!Rr(t)&&Ys(e,"registerHandler",["backButton"])}function ts(){Za&&Za()||(Hs.childWindow?Rc("backButtonPress",[]):Xa())}function ns(){return!(!vr(Xn)||!Xn.supports.pages)&&!!Xn.supports.pages.backStack}var rs=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const os=bn("handlers");class is{static initializeHandlers(){is.handlers.themeChange=ms,is.handlers.load=Cs,is.handlers.beforeUnload=Ss,Qa()}static uninitializeHandlers(){is.handlers={},is.themeChangeHandler=null,is.loadHandler=null,is.beforeUnloadHandler=null,is.beforeSuspendOrTerminateHandler=null,is.resumeHandler=null}}function as(){is.initializeHandlers()}function ss(){is.uninitializeHandlers()}is.handlers={},is.themeChangeHandler=null,is.loadHandler=null,is.beforeUnloadHandler=null,is.beforeSuspendOrTerminateHandler=null,is.resumeHandler=null,is.hostToAppPerformanceMetricsHandler=null;const cs=os.extend("callHandler");function ls(e,t){const n=is.handlers[e];if(n){cs("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Hs.childWindow?(Rc(e,t),[!1,void 0]):(cs("Handler for action message %s not found.",e),[!1,void 0])}function us(e,t,n,r=!0,o=[]){n?(is.handlers[t]=n,r&&Ys(e,"registerHandler",[t,...o])):delete is.handlers[t]}function ds(e){delete is.handlers[e]}function fs(e){return null!=is.handlers[e]}function ps(e,t,n,r,o){n&&vr(Xn,...r),o&&o(),us(e,t,n)}function gs(e,t){is.themeChangeHandler=t,!Rr(t)&&Ys(e,"registerHandler",["themeChange"])}function ms(e){is.themeChangeHandler&&is.themeChangeHandler(e),Hs.childWindow&&Rc("themeChange",[e])}function hs(e){is.hostToAppPerformanceMetricsHandler=e}function vs(e){is.hostToAppPerformanceMetricsHandler&&is.hostToAppPerformanceMetricsHandler(e)}function ws(e,t){is.loadHandler=t,!Rr(t)&&Ys(e,"registerHandler",["load"])}function Cs(e){const t=ys(e);is.resumeHandler?(is.resumeHandler(t),Hs.childWindow&&Rc("load",[t])):is.loadHandler&&(is.loadHandler(e),Hs.childWindow&&Rc("load",[e]))}function ys(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function bs(e,t){is.beforeUnloadHandler=t,!Rr(t)&&Ys(e,"registerHandler",["beforeUnload"])}function Ss(){return rs(this,void 0,void 0,(function*(){const e=()=>{Ys(Sn("v2","handleBeforeUnload"),"readyToUnload",[])};is.beforeSuspendOrTerminateHandler?(yield is.beforeSuspendOrTerminateHandler(),Hs.childWindow?Rc("beforeUnload"):e()):is.beforeUnloadHandler&&is.beforeUnloadHandler(e)||(Hs.childWindow?Rc("beforeUnload"):e())}))}function Es(e){is.beforeSuspendOrTerminateHandler=e,!Rr(e)&&Ys(Sn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function As(e){is.resumeHandler=e,!Rr(e)&&Ys(Sn("v2","registerOnResumeHandler"),"registerHandler",["load"])}class Is{static storeCallbackInformation(e,t){Is.callbackInformation.set(e,t)}static clearMessages(){Is.callbackInformation.clear()}static deleteMessageInformation(e){Is.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=Is.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(vs({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Is.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Is.callbackInformation=new Map;var Ts=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 Ps=e=>{const{uuid:t}=e,n=Ts(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Os=e=>{const{uuidAsString:t}=e,n=Ts(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new vn(t):void 0})},Rs=e=>{const{uuidAsString:t}=e,n=Ts(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new vn(t):void 0})},Fs=e=>{const{uuid:t}=e,n=Ts(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},ks=bn("nestedAppAuthUtils"),Ms=ks.extend("tryPolyfillWithNestedAppAuthBridge");function Ns(e,t,n){var r;const o=Ms;if($n.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=Ds(a,n);s&&(a.nestedAppAuthBridge=s)}const xs=ks.extend("createNestedAppAuthBridge");function Ds(e,t){const n=xs;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();t&&"object"==typeof t&&"NestedAppAuthRequest"===t.messageType?o(e):n("Unrecognized data format received by app, message being ignored. Message: %o",e)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var Us=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ls=bn("communication");class Hs{}class Vs{}function _s(e,t){if(Vs.messageListener=e=>sc(e),Hs.currentWindow=Hs.currentWindow||on(),Hs.parentWindow=Hs.currentWindow.parent!==Hs.currentWindow.self?Hs.currentWindow.parent:Hs.currentWindow.opener,Hs.topWindow=Hs.currentWindow.top,(Hs.parentWindow||e)&&Hs.currentWindow.addEventListener("message",Vs.messageListener,!1),!Hs.parentWindow){const e=Hs.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));$n.isFramelessWindow=!0,e.onNativeMessage=vc}try{return Hs.parentOrigin="*",qs(t,"initialize",[fr,Jn,e]).then((([e,t,n,r])=>(Ns(r,Hs.currentWindow,{onMessage:lc,sendPostMessage:tc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Hs.parentOrigin=null}}function Ws(){Hs.currentWindow&&Hs.currentWindow.removeEventListener("message",Vs.messageListener,!1),Hs.currentWindow=null,Hs.parentWindow=null,Hs.parentOrigin=null,Hs.childWindow=null,Hs.childOrigin=null,Vs.parentMessageQueue=[],Vs.childMessageQueue=[],Vs.nextMessageId=0,Vs.callbacks.clear(),Vs.promiseCallbacks.clear(),Vs.portCallbacks.clear(),Vs.legacyMessageIdsToUuidMap={},Is.clearMessages()}function Bs(e,t,...n){return qs(e,t,n).then((([e])=>e))}function js(e,t,...n){return qs(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function zs(e,t,n,...r){return qs(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function $s(e,t,...n){return qs(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function qs(e,t,n=void 0){if(!En(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(Xs(ic(e,t,n).uuid))}))}function Gs(e){return e.map((e=>dr(e)?e.serialize():e))}function Js(e,t,n,r,o){var i;return Us(this,void 0,void 0,(function*(){const a=Gs(t),[s]=yield qs(r,e,a);if(o&&o(s)||!o&&Vt(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(`${It.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function Ks(e,t,n,r){var o;return Us(this,void 0,void 0,(function*(){const i=Gs(t),[a]=yield qs(n,e,i);if(r&&r(a)||!r&&Vt(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${It.INTERNAL_ERROR}, message: Invalid response from host`)}))}function Zs(e,t,n=void 0){if(!En(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 Qs(ic(e,t,n).uuid)}function Qs(e){return new Promise(((t,n)=>{Vs.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 Xs(e){return new Promise((t=>{Vs.promiseCallbacks.set(e,t)}))}function Ys(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!En(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=ic(e,t,o);r&&Vs.callbacks.set(i.uuid,r)}Vs.parentMessageQueue=[],Vs.childMessageQueue=[],Vs.topMessageQueue=[],Vs.nextMessageId=0,Vs.callbacks=new Map,Vs.promiseCallbacks=new Map,Vs.portCallbacks=new Map,Vs.legacyMessageIdsToUuidMap={};const ec=Ls.extend("sendNestedAuthRequestToTopWindow");function tc(e){const t=ec,n=Hs.topWindow,r=kc(e);return t("Message %s information: %o",xc(r),{actionName:r.func}),rc(n,r)}const nc=Ls.extend("sendRequestToTargetWindowHelper");function rc(e,t){const n=nc,r=Ac(e),o=Ps(t);if($n.isFramelessWindow)Hs.currentWindow&&Hs.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",xc(o),r),Hs.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Ec(e);e&&i?(n("Sending message %s to %s via postMessage",xc(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",xc(o),r),Sc(e).push(t))}return t}const oc=Ls.extend("sendMessageToParentHelper");function ic(e,t,n,r){const o=oc,i=Hs.parentWindow,a=Fc(e,t,n,r);return Is.storeCallbackInformation(a.uuid,{name:t,calledAt:a.timestamp}),o("Message %s information: %o",xc(a),{actionName:t,args:n}),rc(i,a)}const ac=Ls.extend("processIncomingMessage");function sc(e){return Us(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void ac("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 dc(t,n).then((r=>{r?(fc(t,n),t===Hs.parentWindow?vc(e):t===Hs.childWindow&&yc(e)):ac("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 cc=Ls.extend("processAuthBridgeMessage");function lc(e,t){var n,r;const o=cc;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),l=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?dc(c,l)?(Hs.topWindow&&!Hs.topWindow.closed&&c!==Hs.topWindow||(Hs.topWindow=c,Hs.topOrigin=l),Hs.topWindow&&Hs.topWindow.closed&&(Hs.topWindow=null,Hs.topOrigin=null),Tc(Hs.topWindow),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const uc=Ls.extend("shouldProcessIncomingMessage");function dc(e,t){return Us(this,void 0,void 0,(function*(){if(Hs.currentWindow&&e===Hs.currentWindow)return uc("Should not process message because it is coming from the current window"),!1;if(Hs.currentWindow&&Hs.currentWindow.location&&t&&t===Hs.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return uc("Message has an invalid origin of %s",t),!1}const n=yield ca(e);return n||uc("Message has an invalid origin of %s",t),n}}))}function fc(e,t){$n.isFramelessWindow||Hs.parentWindow&&!Hs.parentWindow.closed&&e!==Hs.parentWindow?Hs.childWindow&&!Hs.childWindow.closed&&e!==Hs.childWindow||(Hs.childWindow=e,Hs.childOrigin=t):(Hs.parentWindow=e,Hs.parentOrigin=t),Hs.parentWindow&&Hs.parentWindow.closed&&(Hs.parentWindow=null,Hs.parentOrigin=null),Hs.childWindow&&Hs.childWindow.closed&&(Hs.childWindow=null,Hs.childOrigin=null),Tc(Hs.parentWindow),Tc(Hs.childWindow)}const pc=Ls.extend("handleIncomingMessageFromParent");function gc(e){const t=pc;if(!e.uuid)return Vs.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=mc(Vs.callbacks,t);if(n)return n;const r=mc(Vs.promiseCallbacks,t);if(r)return r;const o=mc(Vs.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",xc(e))}function mc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function hc(e,t){const n=mc(t,e.uuid);n&&t.delete(n),e.uuid?Vs.legacyMessageIdsToUuidMap={}:delete Vs.legacyMessageIdsToUuidMap[e.id]}function vc(e){const t=pc,n=mn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Rs(r),i=gc(o);if(i){const r=Vs.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Is.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]),wc(e)||(t("Removing registered callback for message %s",i.toString()),hc(o,Vs.callbacks)));const a=Vs.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()),hc(o,Vs.promiseCallbacks));const s=Vs.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()),hc(o,Vs.portCallbacks)}o.uuid&&(Vs.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Is.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',xc(r),r.func),ls(r.func,r.args)}else t("Received an unknown message: %O",e)}function wc(e){return!0===e.data.isPartialResponse}const Cc=Ls.extend("handleIncomingMessageFromChild");function yc(e){if("id"in e.data&&"func"in e.data){const t=Os(e.data),[n,r]=ls(t.func,t.args);n&&void 0!==r?(Cc("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",xc(t),t.func),Oc(t.id,t.uuid,Array.isArray(r)?r:[r])):(Cc("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",xc(t),t.func),Dc(t))}}function bc(){return Hs.topWindow!==Hs.parentWindow}function Sc(e){return e===Hs.topWindow&&bc()?Vs.topMessageQueue:e===Hs.parentWindow?Vs.parentMessageQueue:e===Hs.childWindow?Vs.childMessageQueue:[]}function Ec(e){return e===Hs.topWindow&&bc()?Hs.topOrigin:e===Hs.parentWindow?Hs.parentOrigin:e===Hs.childWindow?Hs.childOrigin:null}function Ac(e){return e===Hs.topWindow&&bc()?"top":e===Hs.parentWindow?"parent":e===Hs.childWindow?"child":null}const Ic=Ls.extend("flushMessageQueue");function Tc(e){const t=Ec(e),n=Sc(e),r=Ac(e);for(;e&&t&&n.length>0;){const o=n.shift();if(o){const n=Ps(o);Ic("Flushing message %s from %s message queue via postMessage.",xc(n),r),e.postMessage(n,t)}}}function Pc(e,t){let n;n=Hs.currentWindow.setInterval((()=>{0===Sc(e).length&&(clearInterval(n),t())}),100)}function Oc(e,t,n,r){const o=Hs.childWindow,i=Mc(e,t,n,r),a=Fs(i),s=Ec(o);o&&s&&(Cc("Sending message %s to %s via postMessage, args = %o",xc(a),Ac(o),a.args),o.postMessage(a,s))}function Rc(e,t){const n=Hs.childWindow,r=Nc(e,t),o=Ec(n);n&&o?n.postMessage(r,o):Sc(n).push(r)}function Fc(e,t,n,r){const o=Vs.nextMessageId++,i=new vn;return Vs.legacyMessageIdsToUuidMap[o]=i,{id:o,uuid:i,func:t,timestamp:Date.now(),monotonicTimestamp:mn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r}}function kc(e){const t=Vs.nextMessageId++,n=new vn;return Vs.legacyMessageIdsToUuidMap[t]=n,{id:t,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:mn(),args:[],data:e}}function Mc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Nc(e,t){return{func:e,args:t||[]}}function xc(e){return"uuidAsString"in e?`${e.uuidAsString} (legacy id: ${e.id})`:"uuid"in e&&void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}function Dc(e){const t=ic(Sn("v2","tasks.startTask"),e.func,e.args,!0);Vs.callbacks.set(t.uuid,((...t)=>{if(Hs.childWindow){const n=t.pop();Cc("Message from parent being relayed to child, id: %s",xc(e)),Oc(e.id,e.uuid,t,n)}}))}const Uc="v1";function Lc(e){if(!Rr(e)&&vr(Xn),!Rr(e)&&!Hc())throw _t;e?us(Sn(Uc,"log.request"),"log.request",(()=>{const t=e();Ys(Sn(Uc,"log.receive"),"log.receive",[t])})):ds("log.request")}function Hc(){return!(!vr(Xn)||!Xn.supports.logs)}var Vc,_c,Wc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Vc||(Vc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(_c||(_c={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Wc||(Wc={}));const Bc="v1";function jc(e,t){vr(Xn),Ys(Sn(Bc,"uploadCustomApp"),"uploadCustomApp",[e],t||$t())}function zc(e,t,n){vr(Xn),Ys(Sn(Bc,"sendCustomMessage"),e,t,n)}function $c(e,t){if(vr(Xn),!Hs.childWindow)throw new Error("The child window has not yet been initialized or is not present");Rc(e,t)}function qc(e,t){vr(Xn),us(Sn(Bc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function Gc(e,t){vr(Xn),us(Sn(Bc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Jc(e){vr(Xn,xt.content,xt.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];Ys(Sn(Bc,"openFilePreview"),"openFilePreview",t)}const Kc="v1";function Zc(e){return new Promise((t=>{if(vr(Xn,xt.content),!Yc())throw _t;const n=js(Sn(Kc,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&us(Sn(Kc,"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&&us(Sn(Kc,"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 Qc(){if(vr(Xn,xt.content),!Yc())throw _t;Ys(Sn(Kc,"conversations.closeConversation"),"conversations.closeConversation"),ds("startConversation"),ds("closeConversation")}function Xc(){return new Promise((e=>{if(vr(Xn),!Yc())throw _t;e(Bs(Sn(Kc,"conversations.getChatMember"),"getChatMembers"))}))}function Yc(){return!(!vr(Xn)||!Xn.supports.conversations)}var el=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const tl="v2",nl=bn("copilot");function rl(){var e;return vr(Xn)&&!!(null===(e=Xn.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function ol(e,t){var n;return void 0===t&&(t=null!==(n=mn())&&void 0!==n?n:Date.now()),el(this,void 0,void 0,(function*(){return vr(Xn),nl("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),Ks("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Sn(tl,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var il=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 al="v2",sl=bn("copilot");function cl(){var e,t;return vr(Xn)&&(!!(null===(e=Xn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=Xn.supports.copilot)||void 0===t?void 0:t.eligibility))}function ll(){var e,t;return il(this,void 0,void 0,(function*(){if(vr(Xn),!cl())throw new Error(`Error code: ${_t.errorCode}, message: Not supported on platform`);if(null===(e=Xn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)return sl("Eligibility information is already available on runtime."),Xn.hostVersionsInfo.appEligibilityInformation;sl("Eligibility information is not available on runtime. Requesting from host.");const n=yield Bs(Sn(al,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo");if(Vt(n))throw new Error(`Error code: ${n.errorCode}, message: ${null!==(t=n.message)&&void 0!==t?t:"Failed to get eligibility information from the host."}`);if(!ul(n))throw new Error("Error deserializing eligibility information");return n}))}function ul(e){return void 0!==e.ageGroup&&void 0!==e.cohort&&void 0!==e.userClassification&&void 0!==e.isCopilotEligible&&void 0!==e.isCopilotEnabledRegion&&void 0!==e.isOptedOutByAdmin&&(!e.featureSet||void 0!==e.featureSet.serverFeatures&&void 0!==e.featureSet.uxFeatures)}const dl="v2";class fl{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function pl(e){const t=e;return t.responseType===hl.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const gl="Action.Execute";var ml,hl,vl;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(ml||(ml={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(hl||(hl={}));class wl extends Hi{validate(e){return pl(e)}deserialize(e){return e}}function Cl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(vl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function yl(e){e.requestType===ml.ActionExecuteInvokeRequest?bl(e):e.requestType===ml.QueryMessageExtensionRequest&&Sl(e)}function bl(e){if(e.type!==gl){throw{errorCode:vl.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${gl}"`}}if(!hn(e.data)){throw{errorCode:vl.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function Sl(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 El(e,t,n){if(vr(Xn,xt.content),!Ol())throw _t;const r=new Or(e);return yl(n),qs(Sn(dl,"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 Al(e,t){if(vr(Xn,xt.content),!Ol())throw _t;const n=new Or(e);return qs(Sn(dl,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function Il(e,t,n){if(vr(Xn,xt.content),!Ol())throw _t;const r=new Or(e);return yl(n),qs(Sn(dl,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function Tl(e,t,n){if(vr(Xn,xt.content),!Ol())throw _t;return sn(e,new Error("titleId is Invalid.")),sn(t,new Error("oauthConfigId is Invalid.")),qs(Sn(dl,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Pl(e,t,n){if(vr(Xn,xt.content),!Ol())throw _t;return sn(e,new Error("titleId is Invalid.")),t&&cn(t),qs(Sn(dl,"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 Ol(){return!(!vr(Xn)||!Xn.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(vl||(vl={}));var Rl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Fl="v2";function kl(e,t,n){return Rl(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!Dl())throw _t;return Ul(e,t),Ks("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.claims,n.silent],Sn(Fl,"externalAppAuthenticationForCEA.authenticateWithSSO"),Cl)}))}function Ml(e,t,n){return Rl(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!Dl())throw _t;return Ul(e,t),Ks("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Sn(Fl,"externalAppAuthenticationForCEA.authenticateWithOauth"),Cl)}))}function Nl(e,t,n,r){return Rl(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!Dl())throw _t;return Ul(e,t),bl(r),Js("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new fl(r),n.url.href,n.width,n.height,n.isExternal],new wl,Sn(Fl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Cl)}))}function xl(e,t,n,r){return Rl(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!Dl())throw _t;return Ul(e,t),bl(r),Js("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new fl(r),n.claims,n.silent],new wl,Sn(Fl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Cl)}))}function Dl(){return!(!vr(Xn)||!Xn.supports.externalAppAuthenticationForCEA)}function Ul(e,t){sn(t,new Error("conversation id is not valid.")),Pr(e)}const Ll="v2";var Hl,Vl;function _l(e,t){if(vr(Xn,xt.content),!Bl())throw _t;const n=new Or(e);return qs(Sn(Ll,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Wl(e,t,n){if(vr(Xn,xt.content),!Bl())throw _t;const r=new Or(e);return qs(Sn(Ll,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function Bl(){return!(!vr(Xn)||!Xn.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Hl||(Hl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Vl||(Vl={}));var jl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const zl="v2";function $l(e,t,n){return jl(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!Gl())throw _t;Ul(e,t);const[r,o]=yield qs(Sn(zl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function ql(e,t,n){return jl(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!Gl())throw _t;Ul(e,t);const r=yield Bs(Sn(zl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Gl(){return!(!vr(Xn)||!Xn.supports.externalAppCardActionsForCEA)}var Jl=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 Zl(e,t,n){return Jl(this,void 0,void 0,(function*(){if(vr(Xn,xt.content),!Ql())throw _t;const r=new Or(e),[o,i]=yield qs(Sn(Kl,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Ql(){return!(!vr(Xn)||!Xn.supports.externalAppCommands)}const Xl="v1";var Yl,eu,tu,nu,ru,ou;function iu(e,t){if(vr(Xn,xt.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");Ys(Sn(Xl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function au(e,t){if(vr(Xn,xt.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");Ys(Sn(Xl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function su(e,t,n){if(vr(Xn,xt.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");Ys(Sn(Xl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function cu(e,t,n){if(vr(Xn,xt.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");Ys(Sn(Xl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function lu(e,t,n){if(vr(Xn,xt.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");Ys(Sn(Xl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function uu(e=!1,t){if(vr(Xn,xt.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Ys(Sn(Xl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function du(e,t,n,r,o=!1,i){if(vr(Xn,xt.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");Ys(Sn(Xl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function fu(e){if(vr(Xn,xt.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Ys(Sn(Xl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function pu(e=void 0,t){if(vr(Xn,xt.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Ys(Sn(Xl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function gu(e){if(vr(Xn,xt.content),!e)throw Eu(It.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Ys(Sn(Xl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function mu(e,t){if(vr(Xn,xt.content),!t)throw Eu(It.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw Eu(It.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Ys(Sn(Xl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function hu(e,t){if(vr(Xn,xt.content),!t)throw Eu(It.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Eu(It.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Ys(Sn(Xl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function vu(e,t){if(vr(Xn,xt.content),!t)throw Eu(It.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Eu(It.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Ys(Sn(Xl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function wu(e,t){if(vr(Xn,xt.content),!t)throw Eu(It.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Eu(It.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Ys(Sn(Xl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Cu(e,t){if(vr(Xn,xt.content),!t)throw Eu(It.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Eu(It.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Ys(Sn(Xl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function yu(e,t){if(vr(Xn,xt.content),!t)throw Eu(It.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Eu(It.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw Eu(It.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Ys(Sn(Xl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function bu(e){if(vr(Xn),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");us(Sn(Xl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Su(e){if(vr(Xn),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");us(Sn(Xl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function Eu(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"}(Yl||(Yl={})),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"}(eu||(eu={})),function(e){e.ClassMaterials="classMaterials"}(tu||(tu={})),function(e){e.Readonly="readonly"}(nu||(nu={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(ru||(ru={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(ou||(ou={}));const Au="v1";function Iu(){return new Promise((e=>{if(vr(Xn),!Ru())throw _t;e($s(Sn(Au,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function Tu(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(vr(Xn),!Ru())throw _t;t($s(Sn(Au,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function Pu(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(vr(Xn),!Ru())throw _t;us(Sn(Au,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{vr(Xn),e(t)}))}function Ou(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(vr(Xn),!Ru())throw _t;us(Sn(Au,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{vr(Xn),e(t)}))}function Ru(){return!(!vr(Xn)||!Xn.supports.meetingRoom)}function Fu(){return!(!vr(Xn)||!Xn.supports.messageChannels)}const ku="v1";function Mu(e){if(vr(Xn,xt.content),!Nu())throw _t;Ys(Sn(ku,"notifications.showNotification"),"notifications.showNotification",[e])}function Nu(){return!(!vr(Xn)||!Xn.supports.notifications)}const xu="v2";function Du(e){if(!Hu())throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());if(Rr(e))throw new Error(It.INVALID_ARGUMENTS.toString());us(Sn(xu,"otherApp.install"),"otherApp.install",e)}function Uu(){if(!Hu())throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());Ys(Sn(xu,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),ds("otherApp.install")}function Lu(e){if(!Hu())throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());return Ks("otherApp.notifyInstallCompleted",[e.toString()],Sn(xu,"otherApp.notifyInstallCompleted"))}function Hu(){return!(!vr(Xn)||!Xn.supports.otherAppStateChange)}const Vu="v1";var _u,Wu,Bu;function ju(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(vr(Xn,xt.sidePanel),!Qu())throw _t;Ys(Sn(Vu,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function zu(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(vr(Xn,xt.sidePanel),!Qu())throw _t;Ys(Sn(Vu,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function $u(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(vr(Xn,xt.sidePanel),!Qu())throw _t;Ys(Sn(Vu,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function qu(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(vr(Xn,xt.sidePanel),!Qu())throw _t;Ys(Sn(Vu,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Gu(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(vr(Xn,xt.sidePanel),!Qu())throw _t;us(Sn(Vu,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Ju(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(vr(Xn,xt.sidePanel),!Qu())throw _t;us(Sn(Vu,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Ku(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(vr(Xn,xt.sidePanel),!Qu())throw _t;us(Sn(Vu,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Zu(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(vr(Xn,xt.sidePanel),!Qu())throw _t;us(Sn(Vu,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Qu(){return!(!vr(Xn)||!Xn.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"}(_u||(_u={})),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"}(Wu||(Wu={})),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"}(Bu||(Bu={}));const Xu="v1";function Yu(e,t,n,r){if(vr(Xn,xt.content),!ed())throw _t;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");Ys(Sn(Xu,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function ed(){return!(!vr(Xn)||!Xn.supports.appEntity)}const td="v1";function nd(e){return new Promise((t=>{if(vr(Xn),!rd())throw _t;if(($n.hostClientType===Mt.android||$n.hostClientType===Mt.teamsRoomsAndroid||$n.hostClientType===Mt.teamsPhones||$n.hostClientType===Mt.teamsDisplays)&&!wr(Rn)){const e={errorCode:It.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Bs(Sn(td,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function rd(){return!(!vr(Xn)||!Xn.supports.teams)&&(!!Xn.supports.teams.fullTrust&&!!Xn.supports.teams.fullTrust.joinedTeams)}const od="v1";function id(e){return new Promise((t=>{if(vr(Xn),!ad())throw _t;t(Bs(Sn(od,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function ad(){return!(!vr(Xn)||!Xn.supports.teams)&&!!Xn.supports.teams.fullTrust}const sd="v1";var cd;function ld(e,t){if(vr(Xn,xt.content),!dd())throw _t;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Ys(Sn(sd,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function ud(e,t){if(vr(Xn),!dd())throw _t;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Ys(Sn(sd,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function dd(){return!(!vr(Xn)||!Xn.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(cd||(cd={}));class fd{static setTimeout(e,t){const n=performance.now(),r=Gt();return fd.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete fd.setTimeoutCallbacks[e]}static setInterval(e,t){fd.setTimeout((function n(){e(),fd.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in fd.setTimeoutCallbacks){const r=fd.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){fd.setTimeoutCallbacks[e].callback(),delete fd.setTimeoutCallbacks[e]}}}fd.setTimeoutCallbacks={};class pd{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){fd.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&&fd.clearTimeout(this.timeoutId),this.timeoutId=fd.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(pd.maxSessionTimeoutInMs,2*t.timeoutInMs):pd.initialSessionTimeoutInMs}}pd.initialSessionTimeoutInMs=1e3,pd.maxSessionTimeoutInMs=3e4;const gd="v2";class md{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new pd(md.distributionBinSize,(e=>this.reportPerformanceEvent(Sn(gd,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){fd.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Sn(gd,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),md.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){fd.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(Sn(gd,"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(Sn(gd,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}md.distributionBinSize=1e3,md.calculateFPSInterval=1e3;var hd=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())}))},vd=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 wd="v2",Cd=an()?void 0:new md(Ys);var yd,bd,Sd;function Ed(e){if(vr(Xn,xt.sidePanel),!Od())throw _t;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(us(Sn(wd,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Cd?void 0:Cd.setFrameProcessTimeLimit(e.timeLimit)),!1),Nd())Rd(e.videoFrameHandler,e.config);else{if(!Dd())throw _t;kd(e.videoBufferHandler,e.config)}null==Cd||Cd.startMonitorSlowFrameProcessing()}function Ad(e,t){if(vr(Xn,xt.sidePanel),!Od())throw _t;Ys(Sn(wd,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function Id(e){if(vr(Xn,xt.sidePanel),!Od())throw _t;us(Sn(wd,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Gd(e,Cd),!1),Ys(Sn(wd,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function Td(e){Ys(Sn(wd,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Pd(e){Ys(Sn(wd,"videoEffects.notifyError"),"video.notifyError",[e])}function Od(){return vr(Xn)&&!!Xn.supports.video&&(!!Xn.supports.video.mediaStream||!!Xn.supports.video.sharedFrame)}function Rd(e,t){if(vr(Xn,xt.sidePanel),!Od()||!Nd())throw _t;us(Sn(wd,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>hd(this,void 0,void 0,(function*(){const{streamId:n}=t,r=Fd(e,Cd);yield Hd(n,r,Pd,Cd)}))),!1),Ys(Sn(wd,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Fd(e,t){return n=>hd(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 kd(e,t){if(vr(Xn,xt.sidePanel),!Od()||!Dd())throw _t;us(Sn(wd,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==Cd||Cd.reportStartFrameProcessing(t.width,t.height),e(Md(t),(()=>{null==Cd||Cd.reportFrameProcessed(),Td(n)}),Pd)}}),!1),Ys(Sn(wd,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Md(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=vd(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Nd(){var e;return vr(Xn,xt.sidePanel)&&xd()&&!!(null===(e=Xn.supports.video)||void 0===e?void 0:e.mediaStream)}function xd(){var e,t,n,r;return!(!(null===(t=null===(e=on().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=on().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Dd(){var e;return vr(Xn,xt.sidePanel)&&!!(null===(e=Xn.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(yd||(yd={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(bd||(bd={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Sd||(Sd={}));var Ud=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ld="v2";function Hd(e,t,n,r){var o,i;return Ud(this,void 0,void 0,(function*(){const a=Wd();!an()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Bd(yield _d(e,n,r),new jd(n,t),a.writable)}))}function Vd(e,t,n,r){var o,i;return Ud(this,void 0,void 0,(function*(){const a=Wd();!an()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Bd(yield _d(e,n,r),new qd(n,t),a.writable)}))}function _d(e,t,n){return Ud(this,void 0,void 0,(function*(){if(an())throw _t;const r=on().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function Wd(){if(an())throw _t;const e=window.MediaStreamTrackGenerator;if(!e)throw _t;return new e({kind:"video"})}function Bd(e,t,n){new(0,on().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class jd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Ud(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 zd{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 $d{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 qd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Ud(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=>Ud(this,void 0,void 0,(function*(){if(an())throw _t;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 zd(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 $d(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}}})),us(Sn(Ld,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function Gd(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Ys(Sn(Ld,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in Sd?e:Sd.InitializationFailure;Ys(Sn(Ld,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var Jd=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 Kd="v2",Zd=2e3,Qd=an()?void 0:new md(Ys);var Xd;function Yd(e){var t,n;if(!sf())throw _t;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(vr(Xn,xt.sidePanel)){if(us(Sn(Kd,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Qd?void 0:Qd.setFrameProcessTimeLimit(e)),!1),null===(t=Xn.supports.video)||void 0===t?void 0:t.mediaStream)us(Sn(Kd,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Jd(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=Qd?tf(e.videoFrameHandler,Qd):e.videoFrameHandler;r?yield Vd(n,o,lf,Qd):yield Hd(n,o,lf,Qd)}))),!1),Ys(Sn(Kd,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=Xn.supports.video)||void 0===n?void 0:n.sharedFrame))throw _t;us(Sn(Kd,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==Qd||Qd.reportStartFrameProcessing(t.width,t.height);const n=ef(),r=t.timestamp;e.videoBufferHandler(nf(t),(()=>{n(),null==Qd||Qd.reportFrameProcessed(),cf(r)}),lf)}}),!1),Ys(Sn(Kd,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Qd||Qd.startMonitorSlowFrameProcessing()}}function ef(){const e=setTimeout((()=>{lf(`Frame not processed in ${Zd}ms`,Xd.Warn)}),Zd);return function(){clearTimeout(e)}}function tf(e,t){return n=>Jd(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=ef(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function nf(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function rf(e,t,n){if(vr(Xn,xt.sidePanel),!sf())throw _t;Ys(Sn(Kd,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function of(e){if(vr(Xn,xt.sidePanel),!sf())throw _t;us(Sn(Kd,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Gd(e,Qd),!1),Ys(Sn(Kd,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function af(e){if(vr(Xn,xt.sidePanel),!Od())throw _t;Ys(Sn(Kd,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function sf(){return vr(Xn),Od()}function cf(e){Ys(Sn(Kd,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function lf(e,t=Xd.Warn){Ys(Sn(Kd,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function uf(e){if(vr(Xn),!Od())throw _t;lf(e,Xd.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Xd||(Xd={}));const df="v2";class ff extends Hi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class pf{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class gf{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class mf extends Hi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class hf{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class vf extends Hi{validate(e){const t=new mf;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function wf(e,t){if(vr(Xn),!Ef())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Af(e.threadId),t&&0===t.length)throw new Error(`Error code: ${It.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Js("hostEntity.tab.addAndConfigure",[new gf(e),t],new mf,Sn(df,"hostEntity.tab.addAndConfigure"))}function Cf(e){if(vr(Xn),!Ef())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Af(e.threadId),Js("hostEntity.tab.getAll",[new gf(e)],new vf,Sn(df,"hostEntity.tab.getAll"))}function yf(e,t){if(vr(Xn),!Ef())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return If(e),Af(t.threadId),Js("hostEntity.tab.reconfigure",[new pf(e),new gf(t)],new ff,Sn(df,"hostEntity.tab.reconfigure"))}function bf(e,t){if(vr(Xn),!Ef())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return If(e),Af(t.threadId),Js("hostEntity.tab.rename",[new pf(e),new gf(t)],new ff,Sn(df,"hostEntity.tab.rename"))}function Sf(e,t){if(vr(Xn),!Ef())throw new Error(`Error code: ${It.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Af(t.threadId),If(e),Js("hostEntity.tab.remove",[new hf(e),new gf(t)],new Vi,Sn(df,"hostEntity.tab.remove"))}function Ef(){var e;return!!(vr(Xn)&&Pf()&&(null===(e=Xn.supports.hostEntity)||void 0===e?void 0:e.tab))}function Af(e){if(!e||0==e.length)throw new Error(`Error code: ${It.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function If(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${It.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var Tf;function Pf(){return!(!vr(Xn)||!Xn.supports.hostEntity)}!function(e){e.edu="EDU"}(Tf||(Tf={}));var Of=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Rf="v2",Ff="Invalid store dialog size",kf="No App Id present, but AppId needed to open AppDetail store",Mf="No Collection Id present, but CollectionId needed to open a store specific to a collection";function Nf(e){return Of(this,void 0,void 0,(function*(){Hf();const{size:t}=null!=e?e:{};return Ks("store.openFullStore",[Vf(t)],Sn(Rf,"store.openFullStore"))}))}function xf(e){return Of(this,void 0,void 0,(function*(){Hf();const{size:t,appId:n}=e;if(!(n instanceof Or))throw new Error(kf);return Ks("store.openAppDetail",[Vf(t),n],Sn(Rf,"store.openAppDetail"))}))}function Df(e){return Of(this,void 0,void 0,(function*(){Hf();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return Ks("store.openInContextStore",[Vf(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Sn(Rf,"store.openInContextStore"))}))}function Uf(e){return Of(this,void 0,void 0,(function*(){Hf();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Mf);return Ks("store.openSpecificStore",[Vf(t),n],Sn(Rf,"store.openSpecificStore"))}))}function Lf(){return vr(Xn)&&!!Xn.supports.store}function Hf(){if(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),!Lf())throw _t}function Vf(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(Ff);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(Ff);return JSON.stringify(e)}function _f(e){const t=!e||e.length<=0,n=null==e?void 0:e.indexOf("@"),r=null==e?void 0:e.indexOf(".",n);if(t||-1===n||-1===r)throw new Error("Input email address does not have the correct format.")}class Wf{constructor(e){this.val=e,_f(e)}toString(){return this.val}}const Bf="/l/app/",jf="/l/meeting/new",zf="attendees",$f="startTime",qf="endTime",Gf="subject",Jf="content",Kf="/l/call/0/0",Zf="source",Qf="withVideo",Xf="/l/chat/0/0",Yf="users",ep="topicName",tp="message";function np(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Yf}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${ep}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${tp}=${encodeURIComponent(n)}`;return`${Vn}://${_n}${Xf}?${r}${o}${i}`}function rp(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Yf}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Qf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Zf}=${encodeURIComponent(n)}`;return`${Vn}://${_n}${Kf}?${r}${o}${i}`}function op(e,t,n,r,o){const i=void 0===e?"":`${zf}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${$f}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${qf}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Gf}=${encodeURIComponent(r)}`,l=void 0===o?"":`&${Jf}=${encodeURIComponent(o)}`;return`${Vn}://${_n}${jf}?${i}${a}${s}${c}${l}`}function ip(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${Vn}://${_n}${Bf}${encodeURIComponent(e)}`}const ap="v1";function sp(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage),!cp())throw new Error("Not supported");const n=Sn(ap,"appInstallDialog.openAppInstallDialog");Xn.isLegacyTeams?t(js(n,"executeDeepLink",ip(e.appId))):(Ys(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function cp(){return!(!vr(Xn)||!Xn.supports.appInstallDialog)}const lp="v1",up=bn("media");var dp,fp,pp,gp,mp,hp,vp;!function(e){e.Base64="base64",e.ID="id"}(dp||(dp={}));class wp{}function Cp(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(vr(Xn,xt.content,xt.task),$n.isFramelessWindow)if(wr(Mn))Ys(Sn(lp,"media.captureImage"),"captureImage",e);else{e({errorCode:It.OLD_PLATFORM},[])}else{e({errorCode:It.NOT_SUPPORTED_ON_PLATFORM},[])}}function yp(){if(vr(Xn,xt.content,xt.task),!Sp())throw _t;const e=Tt.Media;return new Promise((t=>{t($s(Sn(lp,"media.hasPermission"),"permissions.has",e))}))}function bp(){if(vr(Xn,xt.content,xt.task),!Sp())throw _t;const e=Tt.Media;return new Promise((t=>{t($s(Sn(lp,"media.requestPermission"),"permissions.request",e))}))}function Sp(){return!(!vr(Xn)||!Xn.supports.permissions)}class Ep extends wp{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(vr(Xn,xt.content,xt.task),wr(Nn))if(Lp(this.mimeType,this.format,this.content))wr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:It.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:It.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Ys(Sn(lp,"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=Rp(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Fp(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):up(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:It.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Gt(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Rr(e)&&Ys(Sn(lp,"media.getMedia"),"getMedia",r),us(Sn(lp,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),ds("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Rp(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),ds("getMedia"+t)}else{const e=Fp(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:It.INTERNAL_ERROR,message:"data received is null"},new Blob),ds("getMedia"+t)}}))}}class Ap{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){vr(Xn,xt.content,xt.task);try{yr(Pn)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Ys(Sn(lp,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(fp.StopRecording,e)}}class Ip extends Ap{getMediaType(){return mp.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case fp.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Tp(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(vr(Xn,xt.content,xt.task),!wr(Nn)){const e={errorCode:It.OLD_PLATFORM};return void t(e,[])}try{kp(e)}catch(e){return void t(e,[])}if(!Np(e)){const e={errorCode:It.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Ys(Sn(lp,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Mp(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 Ep(e));t(n,s)}))}function Pp(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(vr(Xn,xt.content,xt.task),!wr(Nn)){return void t({errorCode:It.OLD_PLATFORM})}if(!Hp(e)){return void t({errorCode:It.INVALID_ARGUMENTS})}const n=[e];Ys(Sn(lp,"media.viewImages"),"viewImages",n,t)}function Op(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(vr(Xn,xt.content,xt.task),$n.hostClientType!==Mt.desktop&&$n.hostClientType!==Mt.web&&$n.hostClientType!==Mt.rigel&&$n.hostClientType!==Mt.teamsRoomsWindows&&$n.hostClientType!==Mt.teamsRoomsAndroid&&$n.hostClientType!==Mt.teamsPhones&&$n.hostClientType!==Mt.teamsDisplays)if(wr(xn))if(Vp(t))Ys(Sn(lp,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:It.INVALID_ARGUMENTS},"")}else{e({errorCode:It.OLD_PLATFORM},"")}else{e({errorCode:It.NOT_SUPPORTED_ON_PLATFORM},"")}}function Rp(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 Fp(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 kp(e){Dp(e)?yr(Tn):Up(e)?yr(Pn):xp(e)&&yr(On)}function Mp(e){return!(e.mediaType!=mp.Video||!e.videoProps||!e.videoProps.videoController)}function Np(e){return!(null==e||e.maxMediaCount>10)}function xp(e){var t;return!((null==e?void 0:e.mediaType)!=mp.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Dp(e){return!(!e||e.mediaType!=mp.VideoAndImage&&!e.videoAndImageProps)}function Up(e){return!(!e||e.mediaType!=mp.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Lp(e,t,n){return null!=e&&null!=t&&t==dp.ID&&null!=n}function Hp(e){return!(null==e||e.length<=0||e.length>10)}function Vp(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function _p(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"}(fp||(fp={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(pp||(pp={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(gp||(gp={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(mp||(mp={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(hp||(hp={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(vp||(vp={}));const Wp="v2";function Bp(e){return new Promise((t=>{if(vr(Xn,xt.content,xt.task),!$p())throw _t;if(!Vp(e))throw{errorCode:It.INVALID_ARGUMENTS};t($s(Sn(Wp,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function jp(){if(vr(Xn,xt.content,xt.task),!$p())throw _t;const e=Tt.Media;return new Promise((t=>{t($s(Sn(Wp,"barCode.hasPermission"),"permissions.has",e))}))}function zp(){if(vr(Xn,xt.content,xt.task),!$p())throw _t;const e=Tt.Media;return new Promise((t=>{t($s(Sn(Wp,"barCode.requestPermission"),"permissions.request",e))}))}function $p(){return!!(vr(Xn)&&Xn.supports.barCode&&Xn.supports.permissions)}const qp="v2";function Gp(e){return Jp(Sn(qp,"chat.openChat"),e)}function Jp(e,t){return new Promise((n=>{if(vr(Xn,xt.content,xt.task),!Zp())throw _t;if(Xn.isLegacyTeams)n(js(e,"executeDeepLink",np([t.user],void 0,t.message)));else{n(js(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Kp(e){const t=Sn(qp,"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(Jp(t,r))}else{if(vr(Xn,xt.content,xt.task),!Zp())throw _t;if(Xn.isLegacyTeams)n(js(t,"executeDeepLink",np(e.users,e.topic,e.message)));else{n(js(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function Zp(){return!(!vr(Xn)||!Xn.supports.chat)}var Qp=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 Xp="v2";function Yp(e){return Qp(this,void 0,void 0,(function*(){if(vr(Xn,xt.content,xt.meetingStage,xt.task,xt.settings,xt.stage,xt.sidePanel),!tg())throw _t;if(!e.type||!Object.values(kt).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(kt)}`);const t=yield rn(e),n={mimeType:e.type,content:t};return $s(Sn(Xp,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function eg(){return Qp(this,void 0,void 0,(function*(){vr(Xn,xt.content,xt.meetingStage,xt.task,xt.settings,xt.stage,xt.sidePanel);const e=Sn(Xp,"clipboard.read");if(!tg())throw _t;const t=yield $s(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return nn(e.mimeType,e.content)}return t}))}function tg(){return $n.isFramelessWindow?!(!vr(Xn)||!Xn.supports.clipboard):!!(vr(Xn)&&navigator&&navigator.clipboard&&Xn.supports.clipboard)}function ng(){var e;return null!==(e=vr(Xn)&&(Xn.isNAAChannelRecommended||rg()))&&void 0!==e&&e}function rg(){return!!(vr(Xn)&&og()&&Xn.isLegacyTeams&&Xn.supports.nestedAppAuth)}function og(){return $n.hostClientType===Mt.android||$n.hostClientType===Mt.ios||$n.hostClientType===Mt.ipados||$n.hostClientType===Mt.visionOS}const ig="v2";function ag(){if(vr(Xn,xt.content,xt.task),!cg())throw _t;return $s(Sn(ig,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function sg(e){if(vr(Xn,xt.content,xt.task),!cg())throw _t;if(!e)throw{errorCode:It.INVALID_ARGUMENTS};return $s(Sn(ig,"geoLocation.showLocation"),"location.showLocation",e)}function cg(){return!!(vr(Xn)&&Xn.supports.geoLocation&&Xn.supports.geoLocation.map&&Xn.supports.permissions)}const lg="v2";function ug(){if(vr(Xn,xt.content,xt.task),!pg())throw _t;return $s(Sn(lg,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function dg(){if(vr(Xn,xt.content,xt.task),!pg())throw _t;const e=Tt.GeoLocation;return new Promise((t=>{t($s(Sn(lg,"geoLocation.hasPermission"),"permissions.has",e))}))}function fg(){if(vr(Xn,xt.content,xt.task),!pg())throw _t;const e=Tt.GeoLocation;return new Promise((t=>{t($s(Sn(lg,"geoLocation.requestPermission"),"permissions.request",e))}))}function pg(){return!!(vr(Xn)&&Xn.supports.geoLocation&&Xn.supports.permissions)}function gg(){return Xn.hostVersionsInfo?Xn.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const mg="v1";class hg{postMessage(e,t){vr(Xn),Ys(Sn(mg,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||$t())}addEventListener(e,t){vr(Xn),"message"===e&&us(Sn(mg,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class vg{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){vr(Xn,xt.task),Ys(Sn(mg,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||$t())}addEventListener(e,t){vr(Xn,xt.task),"message"===e&&us(Sn(mg,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const wg="v2";function Cg(e){if(vr(Xn,xt.content),!yg())throw _t;if(!e||!tn(e))throw{errorCode:It.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return $s(Sn(wg,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function yg(){return!(!vr(Xn)||!Xn.supports.secondaryBrowser)}const bg="v1";function Sg(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(vr(Xn,xt.content,xt.task),!wr(Fn))throw{errorCode:It.OLD_PLATFORM};if(!e)throw{errorCode:It.INVALID_ARGUMENTS};if(!Ag())throw _t;Ys(Sn(bg,"location.getLocation"),"location.getLocation",[e],t)}function Eg(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(vr(Xn,xt.content,xt.task),!wr(Fn))throw{errorCode:It.OLD_PLATFORM};if(!e)throw{errorCode:It.INVALID_ARGUMENTS};if(!Ag())throw _t;Ys(Sn(bg,"location.showLocation"),"location.showLocation",[e],t)}function Ag(){return!(!vr(Xn)||!Xn.supports.location)}const Ig="v1";function Tg(e){vr(Xn,xt.sidePanel),e.contentUrl&&new URL(e.contentUrl),Ys(Sn(Ig,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var Pg=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="v1";var Rg,Fg,kg,Mg,Ng,xg;function Dg(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ys(Sn(Og,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Ug(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ys(Sn(Og,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Lg(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage,xt.settings,xt.content),Ys(Sn(Og,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Hg(){var e,t,n;return Pg(this,void 0,void 0,(function*(){let r;vr(Xn,xt.sidePanel,xt.meetingStage,xt.settings,xt.content);try{const e=!0;r=yield $s(Sn("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)==Mg.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Mg.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(It.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Vg(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage,xt.task),Ys(Sn(Og,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function _g(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");vr(Xn,xt.sidePanel),Ys(Sn(Og,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Wg(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");vr(Xn,xt.sidePanel),Ys(Sn(Og,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Bg(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");vr(Xn,xt.sidePanel),Ys(Sn(Og,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function jg(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");vr(Xn,xt.sidePanel),us(Sn(Og,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function zg(e,t,n={sharingProtocol:Ng.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ys(Sn(Og,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function $g(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ys(Sn(Og,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function qg(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ys(Sn(Og,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Gg(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),Ys(Sn(Og,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Jg(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),us(Sn(Og,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Kg(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),us(Sn(Og,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Zg(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");vr(Xn,xt.sidePanel,xt.meetingStage),us(Sn(Og,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Qg(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));vr(Xn);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||xg.Other};return $s(Sn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Xg(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");vr(Xn,xt.sidePanel,xt.meetingStage),e.isAppHandlingAudio?Yg(e,t):em(e,t)}function Yg(e,t){Ys(Sn(Og,"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");us(Sn(Og,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>Pg(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);nm(n,n.isMicMuted===t.isMicMuted?Rg.HostInitiated:Rg.AppDeclinedToChange)}catch(e){nm(t,Rg.AppFailedToChange)}}))));us(Sn(Og,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function em(e,t){Ys(Sn(Og,"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");fs("meeting.micStateChanged")&&ds("meeting.micStateChanged"),fs("meeting.audioDeviceSelectionChanged")&&ds("meeting.audioDeviceSelectionChanged"),t(n)}))}function tm(e){nm(e,Rg.AppInitiated)}function nm(e,t){vr(Xn,xt.sidePanel,xt.meetingStage),Ys(Sn(Og,"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"}(Rg||(Rg={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(Fg||(Fg={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(kg||(kg={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Mg||(Mg={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Ng||(Ng={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(xg||(xg={}));const rm="v1",om="v2";function im(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Sn(rm,"monetization.openPurchaseExperience")):(r=e,o=Sn(om,"monetization.openPurchaseExperience"));return vr(Xn,xt.content),Qt((()=>new Promise((e=>{if(!am())throw _t;e($s(o,"monetization.openPurchaseExperience",r))}))),n)}function am(){return!(!vr(Xn)||!Xn.supports.monetization)}const sm="v2";function cm(e){return new Promise((t=>{if(vr(Xn,xt.content),!um())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(js(Sn(sm,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function lm(e){return new Promise((t=>{if(vr(Xn,xt.content),!um())throw new Error("Not supported");const n=Sn(sm,"calendar.composeMeeting");Xn.isLegacyTeams?t(js(n,"executeDeepLink",op(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(js(n,"calendar.composeMeeting",e))}))}function um(){return!(!vr(Xn)||!Xn.supports.calendar)}const dm="v2";function fm(e){e&&0!==e.length&&e.forEach((e=>{_f(e)}))}function pm(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===bm.New&&(fm(t.toRecipients),fm(t.ccRecipients),fm(t.bccRecipients))}function gm(e){if(vr(Xn,xt.content),!mm())throw new Error("Not supported");return pm(e),Ks("mail.handoff.composeMail",[new hm(e)],Sn(dm,"mail.handoff.composeMail"))}function mm(){return!!(vr(Xn)&&Xn.supports.mail&&Xn.supports.mail.handoff)}class hm{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const vm="v2";function wm(e){return new Promise((t=>{if(vr(Xn,xt.content),!ym())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(js(Sn(vm,"mail.openMailItem"),"mail.openMailItem",e))}))}function Cm(e){return new Promise((t=>{if(vr(Xn,xt.content),!ym())throw new Error("Not supported");t(js(Sn(vm,"mail.composeMail"),"mail.composeMail",e))}))}function ym(){return!(!vr(Xn)||!Xn.supports.mail)}var bm;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(bm||(bm={}));const Sm="v2";function Em(){if(!$n.printCapabilityEnabled){if(vr(Xn),!Rm())throw _t;$n.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(Am(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function Am(){on().print()}function Im(e){Tm(Sn(Sm,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Rr(e)&&!Rm())throw _t}))}function Tm(e,t,n){!Rr(t)&&vr(Xn),!Rr(t)&&n&&n(),ws(e,t)}function Pm(e){Om(Sn(Sm,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Rr(e)&&!Rm())throw _t}))}function Om(e,t,n){!Rr(t)&&vr(Xn),!Rr(t)&&n&&n(),bs(e,t)}function Rm(){return!(!vr(Xn)||!Xn.supports.teamsCore)}const Fm="v1",km="v2";function Mm(e,t){let n,r;vr(Xn,xt.content,xt.task,xt.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Sn(Fm,"people.selectPeople")):(r=e,o=Sn(km,"people.selectPeople")),Kt(Nm,n,o,r)}function Nm(e,t){return new Promise((n=>{if(!wr(kn))throw{errorCode:It.OLD_PLATFORM};if(!_p(t))throw{errorCode:It.INVALID_ARGUMENTS};if(!xm())throw _t;n($s(e,"people.selectPeople",t))}))}function xm(){return!(!vr(Xn)||!Xn.supports.people)}function Dm(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?Um(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Um(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 Lm="v2";function Hm(e){return vr(Xn,xt.content),new Promise((t=>{const[n,r]=Dm(e);if(!n)throw{errorCode:It.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($s(Sn(Lm,"profile.showProfile"),"profile.showProfile",o))}))}function Vm(){return!(!vr(Xn)||!Xn.supports.profile)}const _m="v2",Wm="search.queryChange",Bm="search.queryClose",jm="search.queryExecute";function zm(e,t,n){if(vr(Xn,xt.content),!qm())throw _t;us(Sn(_m,"search.registerOnClosedHandler"),Bm,e),us(Sn(_m,"search.registerOnExecutedHandler"),jm,t),n&&us(Sn(_m,"search.registerOnChangeHandler"),Wm,n)}function $m(){if(vr(Xn,xt.content),!qm())throw _t;Ys(Sn(_m,"search.unregisterHandlers"),"search.unregister"),ds(Wm),ds(Bm),ds(jm)}function qm(){return!(!vr(Xn)||!Xn.supports.search)}function Gm(){return new Promise((e=>{if(vr(Xn,xt.content),!qm())throw new Error("Not supported");e(js(Sn(_m,"search.closeSearch"),"search.closeSearch"))}))}var Jm=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 Km="v2";function Zm(){return Jm(this,void 0,void 0,(function*(){if(vr(Xn,xt.sidePanel,xt.meetingStage),!Qm())throw _t;return yield $s(Sn(Km,"sharing.history.getContent"),"sharing.history.getContent")}))}function Qm(){var e;return vr(Xn)&&void 0!==(null===(e=Xn.supports.sharing)||void 0===e?void 0:e.history)}const Xm="v1",Ym="v2",eh={shareWebContent:"sharing.shareWebContent"};function th(e,t){try{rh(e),oh(e),ih(e)}catch(e){return Zt((()=>Promise.reject(e)),t)}vr(Xn,xt.content,xt.sidePanel,xt.task,xt.stage,xt.meetingStage);return Zt(nh,t,Sn(t?Xm:Ym,"sharing.shareWebContent"),e)}function nh(e,t){return new Promise((n=>{if(!ah())throw _t;n($s(e,eh.shareWebContent,t))}))}function rh(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:It.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function oh(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:It.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:It.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function ih(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:It.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:It.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function ah(){return!(!vr(Xn)||!Xn.supports.sharing)}const sh="v2";function ch(){return new Promise((e=>{if(vr(Xn,xt.content),!lh())throw _t;e($s(Sn(sh,"stageView.self.close"),"stageView.self.close"))}))}function lh(){var e;return vr(Xn)&&void 0!==(null===(e=Xn.supports.stageView)||void 0===e?void 0:e.self)}const uh="v2";var dh;function fh(e){return new Promise((t=>{if(vr(Xn,xt.content),!ph())throw _t;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t($s(Sn(uh,"stageView.open"),"stageView.open",e))}))}function ph(){return!(!vr(Xn)||!Xn.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(dh||(dh={}));const gh=10;var mh=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 hh="v2";function vh(e){return mh(this,void 0,void 0,(function*(){vr(Xn,xt.content,xt.task),yh(),bh(e);const t=yield $s(Sn(hh,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return Sh(e.maxVisualMediaCount,t),t}))}function wh(e){return mh(this,void 0,void 0,(function*(){vr(Xn,xt.content,xt.task),yh(),bh(e);const t=yield $s(Sn(hh,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return Sh(e.maxVisualMediaCount,t),t}))}function Ch(){return!!(vr(Xn)&&Xn.supports.visualMedia&&Xn.supports.visualMedia.image&&Xn.supports.permissions)}function yh(){if(!Ch())throw _t}function bh(e){if(!e||e.maxVisualMediaCount>gh||e.maxVisualMediaCount<1)throw jt}function Sh(e,t){if(t.length>e)throw zt}const Eh="v2";var Ah,Ih;function Th(){if(vr(Xn,xt.content,xt.task),!Ch())throw _t;const e=Tt.Media;return $s(Sn(Eh,"visualMedia.hasPermission"),"permissions.has",e)}function Ph(){if(vr(Xn,xt.content,xt.task),!Ch())throw _t;const e=Tt.Media;return $s(Sn(Eh,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(Ah||(Ah={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Ih||(Ih={}));var Oh=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 Rh=null;function Fh(){return Oh(this,void 0,void 0,(function*(){return null===Rh&&(Rh=(yield no()).app.host.name),Rh}))}var kh=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 Mh(){return kh(this,void 0,void 0,(function*(){if(vr(Xn),!xh())throw _t;return!(!Xn.isLegacyTeams||$n.hostClientType!==Mt.android&&$n.hostClientType!==Mt.ios&&$n.hostClientType!==Mt.ipados&&$n.hostClientType!==Mt.visionOS||(yield Nh())!==Nt.teams)||(yield Bs(Sn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function Nh(){return kh(this,void 0,void 0,(function*(){return Fh()}))}function xh(){return vr(Xn)&&void 0!==Xn.supports.webStorage}const Dh="v2";var Uh;function Lh(e){const t=Sn(Dh,"call.startCall");return new Promise((n=>{var r;if(vr(Xn,xt.content,xt.task),!Hh())throw _t;if(!Xn.isLegacyTeams)return Ys(t,"call.startCall",[e],n);n(Bs(t,"executeDeepLink",rp(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Uh.Video),e.source)).then((e=>{if(!e)throw new Error(zn);return e})))}))}function Hh(){return!(!vr(Xn)||!Xn.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Uh||(Uh={}));const Vh="v1";function _h(){zi(Sn(Vh,"appInitialization.notifyAppLoaded"))}function Wh(){Ys(Sn(Vh,"appInitialization.notifySuccess"),Jr.Success,[fr])}function Bh(e){qi(Sn(Vh,"appInitialization.notifyFailure"),e)}function jh(e){$i(Sn(Vh,"appInitialization.notifyExpectedFailure"),e)}const zh=bn("thirdPartyCloudStorage"),$h="v2";class qh{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let Gh=[],Jh=null,Kh=!0,Zh=null;function Qh(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(vr(Xn,xt.content,xt.task),!Yh())throw _t;if(Zh)throw Zh=null,new Error("getDragAndDropFiles cannot be called twice");Zh=t,Kh=!0,Ys(Sn($h,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],Xh)}else{t([],{errorCode:It.INVALID_ARGUMENTS})}}function Xh(e){if(Zh)if(e&&e.error)Zh([],e.error),Zh=null;else if(e&&e.fileChunk)try{Kh||0!==e.fileChunk.chunkSequence||(zh("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),Kh=!0,Zh([],{errorCode:It.INTERNAL_ERROR,message:"error occurred while receiving data"}),Gh=[],Zh=null);const t=Fp(e.fileChunk,e.fileType);if(t?(Jh||(Jh=new qh(e.fileType,[])),Jh.assembleAttachment.push(t)):(zh(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),Zh?Zh([],{errorCode:It.INTERNAL_ERROR,message:"error occurred while receiving data"}):Zh=null,Gh=[],Zh=null,Kh=!0),Kh=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&Jh){const t=Rp(Jh.assembleAttachment,Jh.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});Gh.push(n)}e.isLastFile&&Zh&&(Zh(Gh,e.error),Gh=[],Zh=null,Kh=!0),Jh=null}}catch(e){Zh&&(Zh([],{errorCode:It.INTERNAL_ERROR,message:e}),Gh=[],Zh=null,Kh=!0)}else Zh([],{errorCode:It.INTERNAL_ERROR,message:"data received is null"}),Gh=[],Zh=null,Kh=!0}function Yh(){return!(!vr(Xn)||!Xn.supports.thirdPartyCloudStorage)}const ev="v1";function tv(e,t){ji(Sn(ev,"initialize"),t).then((()=>{e&&e()}))}function nv(){Em()}function rv(){Am()}function ov(e){hr(),Ys(Sn(ev,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=$n.frameContext),e(t)}))}function iv(e){Xi(Sn(ev,"registerOnThemeChangeHandlerHelper"),e)}function av(e){ps(Sn(ev,"registerFullScreenHandler"),"fullScreenChange",e,[])}function sv(e){ps(Sn(ev,"registerAppButtonClickHandler"),"appButtonClick",e,[xt.content])}function cv(e){ps(Sn(ev,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[xt.content])}function lv(e){ps(Sn(ev,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[xt.content])}function uv(e){es(Sn(ev,"registerBackButtonHandler"),e)}function dv(e){Tm(Sn(ev,"registerOnLoadHandler"),e)}function fv(e){Om(Sn(ev,"registerBeforeUnloadHandler"),e)}function pv(e){ps(Sn(ev,"registerFocusEnterHandler"),"focusEnter",e,[])}function gv(e){ps(Sn(ev,"registerChangeSettingsHandler"),"changeSettings",e,[xt.content])}function mv(e,t){vr(Xn),_a(Sn(ev,"getTabInstances"),t).then((t=>{e(t)}))}function hv(e,t){vr(Xn),Wa(Sn(ev,"getMruTabInstances"),t).then((t=>{e(t)}))}function vv(e){Ba(Sn(ev,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function wv(e,t){vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.task,xt.stage,xt.meetingStage);const n=null!=t?t:$t();Yi(Sn(ev,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Cv(e){ja(Sn(ev,"setFrameContext"),e)}function yv(e,t,n){ji(Sn(ev,"initializeWithFrameContext"),n).then((()=>t&&t())),ja(Sn(ev,"setFrameContext"),e)}const bv="v1";function Sv(e){Va(Sn(bv,"navigation.returnFocus"),e)}function Ev(e,t){vr(Xn);const n=null!=t?t:$t();Ha(Sn(bv,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Av(e,t){vr(Xn,xt.content,xt.sidePanel,xt.settings,xt.remove,xt.task,xt.stage,xt.meetingStage);const n=null!=t?t:$t();Ua(Sn(bv,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Iv(e){vr(Xn);const t=null!=e?e:$t();La(Sn(bv,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const Tv="v1";function Pv(e){za(Sn(Tv,"settings.setValidityState"),e)}function Ov(e){vr(Xn,xt.content,xt.settings,xt.remove,xt.sidePanel),$a(Sn(Tv,"settings.getSettings")).then((t=>{e(t)}))}function Rv(e,t){vr(Xn,xt.content,xt.settings,xt.sidePanel);const n=null!=t?t:$t();qa(Sn(Tv,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Fv(e){Ri(Sn(Tv,"settings.registerOnSaveHandler"),e)}function kv(e){ki(Sn(Tv,"settings.registerOnRemoveHandler"),e)}var Mv=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 Nv="v1";function xv(e,t){const n=Sn(Nv,"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?(vr(Xn,xt.content,xt.sidePanel,xt.meetingStage),Ys(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?Zo(n,Hv(e),r):Ko(n,Lv(e),r),new hg}function Dv(e){e=Vv(e);const{width:t,height:n}=e,r=Mv(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Jo(Sn(Nv,"tasks.updateTask"),e)}function Uv(e,t){Qo(Sn(Nv,"tasks.submitTask"),e,t)}function Lv(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:Lt.Small,width:e.width?e.width:Lt.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Hv(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:Lt.Small,width:e.width?e.width:Lt.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function Vv(e){return e.height=e.height?e.height:Lt.Small,e.width=e.width?e.width:Lt.Small,e}const _v="v2";var Wv,Bv;function jv(){return!(!vr(Xn,xt.meetingStage,xt.sidePanel,xt.content)||!Xn.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Wv||(Wv={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Bv||(Bv={}));class zv{getFluidTenantInfo(){return $v(),new Promise((e=>{e($s(Sn(_v,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return $v(),new Promise((t=>{t($s(Sn(_v,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return $v(),new Promise((e=>{e($s(Sn(_v,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return $v(),new Promise((t=>{t($s(Sn(_v,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return $v(),new Promise((e=>{e($s(Sn(_v,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return $v(),new Promise((t=>{t($s(Sn(_v,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return $v(),new Promise((t=>{t($s(Sn(_v,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return $v(),new Promise((t=>{t($s(Sn(_v,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return $v(),new zv}}function $v(){if(!jv())throw new Error("LiveShareHost Not supported")}var qv=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 Gv(e){try{return e.cartItems=Jv(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Jv(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Jv(e.accessories)),e}))}const Kv=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=qv(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Kv(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function Zv(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)Xv(t),Qv(t.accessories)}function Qv(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");Xv(t)}}}function Xv(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");ew(e.price),tw(e.quantity)}function Yv(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===bt(e))throw new Error("id must be a valid UUID")}}function ew(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 tw(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function nw(e){if(!Object.values(aw).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const rw="v2",ow={majorVersion:1,minorVersion:1};var iw,aw;function sw(){if(vr(Xn,xt.content,xt.task),!dw())throw _t;return $s(Sn(rw,"marketplace.getCart"),"marketplace.getCart",ow).then(Gv)}function cw(e){if(vr(Xn,xt.content,xt.task),!dw())throw _t;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return Yv(null==e?void 0:e.cartId),Zv(null==e?void 0:e.cartItems),$s(Sn(rw,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Kv(e.cartItems),cartVersion:ow})).then(Gv)}function lw(e){if(vr(Xn,xt.content,xt.task),!dw())throw _t;if(!e)throw new Error("removeCartItemsParams must be provided");if(Yv(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 $s(Sn(rw,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:ow})).then(Gv)}function uw(e){if(vr(Xn,xt.content,xt.task),!dw())throw _t;if(!e)throw new Error("updateCartStatusParams must be provided");return Yv(null==e?void 0:e.cartId),nw(null==e?void 0:e.cartStatus),$s(Sn(rw,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:ow})).then(Gv)}function dw(){return!(!vr(Xn)||!Xn.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(iw||(iw={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(aw||(aw={}))})(),r})()));
2
2
  //# sourceMappingURL=MicrosoftTeams.min.js.map