@microsoft/teams-js 2.32.0-beta.1 → 2.32.0-beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. package/dist/esm/_virtual/os.js +1 -0
  2. package/dist/esm/_virtual/tty.js +1 -0
  3. package/dist/esm/_virtual/util.js +1 -0
  4. package/dist/esm/node_modules/.pnpm/debug@4.3.5/node_modules/debug/src/node.js +1 -1
  5. package/dist/esm/node_modules/.pnpm/rollup-plugin-node-polyfills@0.2.1/node_modules/rollup-plugin-node-polyfills/polyfills/buffer-es6.js +1 -0
  6. package/dist/esm/node_modules/.pnpm/rollup-plugin-node-polyfills@0.2.1/node_modules/rollup-plugin-node-polyfills/polyfills/os.js +1 -0
  7. package/dist/esm/node_modules/.pnpm/rollup-plugin-node-polyfills@0.2.1/node_modules/rollup-plugin-node-polyfills/polyfills/process-es6.js +1 -0
  8. package/dist/esm/node_modules/.pnpm/rollup-plugin-node-polyfills@0.2.1/node_modules/rollup-plugin-node-polyfills/polyfills/util.js +1 -0
  9. package/dist/esm/node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js +1 -1
  10. package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +20 -0
  11. package/dist/esm/packages/teams-js/src/internal/utils.js +1 -1
  12. package/dist/esm/packages/teams-js/src/private/copilot/eligibility.js +1 -1
  13. package/dist/esm/packages/teams-js/src/public/version.js +1 -1
  14. package/dist/umd/MicrosoftTeams.js +4 -2
  15. package/dist/umd/MicrosoftTeams.js.map +1 -1
  16. package/dist/umd/MicrosoftTeams.min.js +1 -1
  17. package/dist/umd/MicrosoftTeams.min.js.map +1 -1
  18. package/package.json +1 -1
  19. package/dist/esm/_virtual/__polyfill-node.os.js +0 -1
  20. package/dist/esm/_virtual/__polyfill-node.tty.js +0 -1
  21. package/dist/esm/_virtual/__polyfill-node.util.js +0 -1
  22. package/dist/esm/_virtual/_polyfill-node.buffer.js +0 -1
  23. package/dist/esm/_virtual/_polyfill-node.global.js +0 -1
  24. package/dist/esm/_virtual/_polyfill-node.os.js +0 -1
  25. package/dist/esm/_virtual/_polyfill-node.process.js +0 -1
  26. package/dist/esm/_virtual/_polyfill-node.util.js +0 -1
  27. /package/dist/esm/{_virtual/_polyfill-node._inherits.js → node_modules/.pnpm/rollup-plugin-node-polyfills@0.2.1/node_modules/rollup-plugin-node-polyfills/polyfills/inherits.js} +0 -0
  28. /package/dist/esm/{_virtual/_polyfill-node.tty.js → node_modules/.pnpm/rollup-plugin-node-polyfills@0.2.1/node_modules/rollup-plugin-node-polyfills/polyfills/tty.js} +0 -0
@@ -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:()=>bt,AppId:()=>Ir,ChannelType:()=>Ut,ChildAppWindow:()=>rg,DialogDimension:()=>Lt,EduType:()=>Ot,EmailAddress:()=>Of,ErrorCode:()=>Et,FileOpenPreference:()=>yt,FrameContexts:()=>Mt,HostClientType:()=>Ft,HostName:()=>kt,LiveShareHost:()=>Iw,NotificationTypes:()=>Lc,ParentAppWindow:()=>og,SecondaryM365ContentIdName:()=>St,TaskModuleDimension:()=>Lt,TeamType:()=>Nt,UserSettingTypes:()=>Dc,UserTeamRole:()=>xt,ViewerActionTypes:()=>Uc,app:()=>i,appEntity:()=>D,appInitialization:()=>Ce,appInstallDialog:()=>q,authentication:()=>a,barCode:()=>J,calendar:()=>ie,call:()=>ve,chat:()=>K,clipboard:()=>Z,conversations:()=>E,copilot:()=>I,dialog:()=>p,enablePrintCapability:()=>Dh,executeDeepLink:()=>Yh,externalAppAuthentication:()=>T,externalAppAuthenticationForCEA:()=>P,externalAppCardActions:()=>O,externalAppCardActionsForCEA:()=>R,externalAppCommands:()=>F,files:()=>k,geoLocation:()=>Y,getAdaptiveCardSchemaVersion:()=>tg,getContext:()=>Vh,getMruTabInstances:()=>Qh,getTabInstances:()=>Zh,hostEntity:()=>z,initialize:()=>Uh,initializeWithFrameContext:()=>tw,liveShare:()=>Ee,location:()=>te,logs:()=>S,mail:()=>ae,marketplace:()=>Ae,media:()=>G,meeting:()=>re,meetingRoom:()=>M,menus:()=>g,messageChannels:()=>N,monetization:()=>oe,navigateBack:()=>aw,navigateCrossDomain:()=>iw,navigateToTab:()=>ow,nestedAppAuth:()=>Q,notifications:()=>x,openFilePreview:()=>zc,otherAppStateChange:()=>L,pages:()=>y,people:()=>ce,print:()=>Hh,profile:()=>le,registerAppButtonClickHandler:()=>Bh,registerAppButtonHoverEnterHandler:()=>jh,registerAppButtonHoverLeaveHandler:()=>zh,registerBackButtonHandler:()=>$h,registerBeforeUnloadHandler:()=>Gh,registerChangeSettingsHandler:()=>Kh,registerCustomHandler:()=>Bc,registerFocusEnterHandler:()=>Jh,registerFullScreenHandler:()=>Wh,registerOnLoadHandler:()=>qh,registerOnThemeChangeHandler:()=>_h,registerUserSettingsChangeHandler:()=>jc,remoteCamera:()=>U,returnFocus:()=>rw,search:()=>ue,secondaryBrowser:()=>ee,sendCustomEvent:()=>Wc,sendCustomMessage:()=>_c,setFrameContext:()=>ew,settings:()=>be,shareDeepLink:()=>Xh,sharing:()=>fe,stageView:()=>ge,store:()=>$,tasks:()=>Se,teams:()=>_,teamsCore:()=>se,thirdPartyCloudStorage:()=>ye,uploadCustomApp:()=>Vc,version:()=>lr,videoEffects:()=>W,videoEffectsEx:()=>B,visualMedia:()=>he,webStorage:()=>we});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>Br,getTelemetryPort:()=>_r,isSupported:()=>Wr});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Kr,getDataLayerPort:()=>Gr,isSupported:()=>Jr});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Zr,registerOnResumeHandler:()=>Qr});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>no,FailedReason:()=>to,Messages:()=>eo,_initialize:()=>ao,_uninitialize:()=>so,getContext:()=>co,getFrameContext:()=>oo,initialize:()=>io,isInitialized:()=>ro,lifecycle:()=>o,notifyAppLoaded:()=>lo,notifyExpectedFailure:()=>po,notifyFailure:()=>fo,notifySuccess:()=>uo,openLink:()=>ho,registerHostToAppPerformanceMetricsHandler:()=>mo,registerOnThemeChangeHandler:()=>go});var a={};n.r(a),n.d(a,{DataResidency:()=>Vo,authenticate:()=>Io,getAuthToken:()=>Po,getUser:()=>Ro,initialize:()=>Eo,notifyFailure:()=>Uo,notifySuccess:()=>Lo,registerAuthenticationHandlers:()=>Ao});var s={};n.r(s),n.d(s,{isSupported:()=>Wo,resize:()=>_o});var c={};n.r(c),n.d(c,{isSupported:()=>jo,open:()=>Bo});var l={};n.r(l),n.d(l,{isSupported:()=>Go,registerOnMessageFromParent:()=>qo,sendMessageToDialog:()=>$o,sendMessageToParentFromDialog:()=>zo});var u={};n.r(u),n.d(u,{bot:()=>c,getDialogInfoFromBotUrlDialogInfo:()=>Xo,getDialogInfoFromUrlDialogInfo:()=>Qo,isSupported:()=>Zo,open:()=>Jo,parentCommunication:()=>l,submit:()=>Ko});var d={};n.r(d),n.d(d,{isSupported:()=>li,open:()=>ci});var f={};n.r(f),n.d(f,{bot:()=>d,isSupported:()=>di,open:()=>ui});var p={};n.r(p),n.d(p,{adaptiveCard:()=>f,initialize:()=>fi,isSupported:()=>pi,update:()=>s,url:()=>u});var g={};n.r(g),n.d(g,{DisplayMode:()=>mi,MenuItem:()=>wi,MenuListType:()=>hi,initialize:()=>Ei,isSupported:()=>Fi,setNavBarMenu:()=>Ti,setUpViews:()=>Ai,showActionMenu:()=>Oi});var m={};n.r(m),n.d(m,{initialize:()=>ki,isSupported:()=>ji,registerChangeConfigHandler:()=>Vi,registerOnRemoveHandler:()=>Ui,registerOnRemoveHandlerHelper:()=>Di,registerOnSaveHandler:()=>xi,registerOnSaveHandlerHelper:()=>Li,setConfig:()=>Ni,setValidityState:()=>Mi});var h={};n.r(h),n.d(h,{isSupported:()=>la,onClick:()=>aa,onHoverEnter:()=>sa,onHoverLeave:()=>ca});var w={};n.r(w),n.d(w,{isSupported:()=>fa,navigateTo:()=>ua,navigateToDefaultPage:()=>da});var v={};n.r(v),n.d(v,{enterFullscreen:()=>pa,exitFullscreen:()=>ga,isSupported:()=>ma});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>va,getTabInstances:()=>wa,isSupported:()=>Ca,navigateToTab:()=>ha});var y={};n.r(y),n.d(y,{EnterFocusType:()=>ya,ReturnFocusType:()=>ba,appButton:()=>h,backStack:()=>b,config:()=>m,currentApp:()=>w,fullTrust:()=>v,getConfig:()=>Ta,initializeWithFrameContext:()=>Ia,isSupported:()=>ka,navigateCrossDomain:()=>Pa,navigateToApp:()=>Oa,registerFocusEnterHandler:()=>Ea,registerFullScreenHandler:()=>Fa,returnFocus:()=>Sa,setCurrentFrame:()=>Aa,shareDeepLink:()=>Ra,tabs:()=>C});var b={};n.r(b),n.d(b,{_initialize:()=>Ja,isSupported:()=>Ya,navigateBack:()=>Ka,registerBackButtonHandler:()=>Za,registerBackButtonHandlerHelper:()=>Qa});var S={};n.r(S),n.d(S,{isSupported:()=>xc,registerGetLogHandler:()=>Nc});var E={};n.r(E),n.d(E,{closeConversation:()=>Gc,getChatMembers:()=>Jc,isSupported:()=>Kc,openConversation:()=>qc});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>el,isSupported:()=>Yc});var I={};n.r(I),n.d(I,{eligibility:()=>A});var T={};n.r(T),n.d(T,{ActionExecuteInvokeRequestType:()=>il,ActionExecuteResponseHandler:()=>ll,InvokeErrorCode:()=>cl,InvokeResponseType:()=>sl,OriginalRequestType:()=>al,SerializableActionExecuteInvokeRequest:()=>rl,authenticateAndResendRequest:()=>gl,authenticateWithOauth2:()=>wl,authenticateWithPowerPlatformConnectorPlugins:()=>vl,authenticateWithSSO:()=>ml,authenticateWithSSOAndResendRequest:()=>hl,isActionExecuteResponse:()=>ol,isInvokeError:()=>ul,isSupported:()=>Cl,validateActionExecuteInvokeRequest:()=>fl});var P={};n.r(P),n.d(P,{authenticateAndResendRequest:()=>Al,authenticateWithOauth:()=>El,authenticateWithSSO:()=>Sl,authenticateWithSSOAndResendRequest:()=>Il,isSupported:()=>Tl,validateInput:()=>Pl});var O={};n.r(O),n.d(O,{ActionOpenUrlErrorCode:()=>Fl,ActionOpenUrlType:()=>Rl,isSupported:()=>Nl,processActionOpenUrl:()=>Ml,processActionSubmit:()=>kl});var R={};n.r(R),n.d(R,{isSupported:()=>Hl,processActionOpenUrl:()=>Ul,processActionSubmit:()=>Dl});var F={};n.r(F),n.d(F,{isSupported:()=>Bl,processActionCommand:()=>Wl});var k={};n.r(k),n.d(k,{CloudStorageProvider:()=>zl,CloudStorageProviderFileAction:()=>Kl,CloudStorageProviderType:()=>$l,DocumentLibraryAccessType:()=>Gl,FileDownloadStatus:()=>Jl,SpecialDocumentLibraryType:()=>ql,addCloudStorageFolder:()=>Ql,addCloudStorageProvider:()=>iu,addCloudStorageProviderFile:()=>su,copyMoveFiles:()=>nu,deleteCloudStorageFolder:()=>Xl,deleteCloudStorageProviderFile:()=>lu,downloadCloudStorageProviderFile:()=>uu,getCloudStorageFolderContents:()=>Yl,getCloudStorageFolders:()=>Zl,getExternalProviders:()=>tu,getFileDownloads:()=>ru,openCloudStorageFile:()=>eu,openDownloadFolder:()=>ou,registerCloudStorageProviderContentChangeHandler:()=>pu,registerCloudStorageProviderListChangeHandler:()=>fu,removeCloudStorageProvider:()=>au,renameCloudStorageProviderFile:()=>cu,uploadCloudStorageProviderFile:()=>du});var M={};n.r(M),n.d(M,{getPairedMeetingRoomInfo:()=>hu,isSupported:()=>yu,registerMeetingRoomCapabilitiesUpdateHandler:()=>vu,registerMeetingRoomStatesUpdateHandler:()=>Cu,sendCommandToPairedMeetingRoom:()=>wu});var N={};n.r(N),n.d(N,{dataLayer:()=>t,isSupported:()=>bu,telemetry:()=>e});var x={};n.r(x),n.d(x,{isSupported:()=>Au,showNotification:()=>Eu});var L={};n.r(L),n.d(L,{isSupported:()=>Ru,notifyInstallCompleted:()=>Ou,registerAppInstallationHandler:()=>Tu,unregisterAppInstallationHandler:()=>Pu});var U={};n.r(U),n.d(U,{ControlCommand:()=>ku,ErrorReason:()=>Mu,SessionTerminatedReason:()=>Nu,getCapableParticipants:()=>xu,isSupported:()=>Bu,registerOnCapableParticipantsChangeHandler:()=>Hu,registerOnDeviceStateChangeHandler:()=>_u,registerOnErrorHandler:()=>Vu,registerOnSessionStatusChangeHandler:()=>Wu,requestControl:()=>Lu,sendControlCommand:()=>Uu,terminateSession:()=>Du});var D={};n.r(D),n.d(D,{isSupported:()=>$u,selectAppEntity:()=>zu});var H={};n.r(H),n.d(H,{getUserJoinedTeams:()=>Gu,isSupported:()=>Ju});var V={};n.r(V),n.d(V,{getConfigSetting:()=>Zu,isSupported:()=>Qu,joinedTeams:()=>H});var _={};n.r(_),n.d(_,{ChannelType:()=>Yu,fullTrust:()=>V,getTeamChannels:()=>ed,isSupported:()=>nd,refreshSiteUrl:()=>td});var W={};n.r(W),n.d(W,{EffectChangeType:()=>fd,EffectFailureReason:()=>pd,VideoFrameFormat:()=>dd,isSupported:()=>Cd,notifySelectedVideoEffectChanged:()=>md,registerForVideoEffect:()=>hd,registerForVideoFrame:()=>gd});var B={};n.r(B),n.d(B,{ErrorLevel:()=>jd,frameProcessingTimeoutInMs:()=>Wd,isSupported:()=>Qd,notifyFatalError:()=>ef,notifySelectedVideoEffectChanged:()=>Jd,registerForVideoEffect:()=>Kd,registerForVideoFrame:()=>zd,updatePersonalizedEffects:()=>Zd});var j={};n.r(j),n.d(j,{addAndConfigure:()=>lf,getAll:()=>uf,isSupported:()=>gf,reconfigure:()=>df,remove:()=>pf,rename:()=>ff});var z={};n.r(z),n.d(z,{AppTypes:()=>wf,isSupported:()=>vf,tab:()=>j});var $={};n.r($),n.d($,{StoreDialogType:()=>bf,errorInvalidDialogType:()=>Sf,errorMissingAppId:()=>Ef,errorMissingCollectionId:()=>Af,isSupported:()=>Tf,openStoreExperience:()=>If});var q={};n.r(q),n.d(q,{isSupported:()=>Kf,openAppInstallDialog:()=>Jf});var G={};n.r(G),n.d(G,{CameraStartMode:()=>ep,File:()=>ip,FileFormat:()=>Xf,ImageOutputFormats:()=>op,ImageUriType:()=>rp,Media:()=>up,MediaControllerEvent:()=>Yf,MediaType:()=>np,Source:()=>tp,VideoController:()=>fp,captureImage:()=>ap,hasPermission:()=>sp,requestPermission:()=>cp,scanBarCode:()=>mp,selectMedia:()=>pp,viewImages:()=>gp});var J={};n.r(J),n.d(J,{hasPermission:()=>Fp,isSupported:()=>Mp,requestPermission:()=>kp,scanBarCode:()=>Rp});var K={};n.r(K),n.d(K,{isSupported:()=>Dp,openChat:()=>xp,openGroupChat:()=>Up});var Z={};n.r(Z),n.d(Z,{isSupported:()=>Bp,read:()=>Wp,write:()=>_p});var Q={};n.r(Q),n.d(Q,{isNAAChannelRecommended:()=>jp});var X={};n.r(X),n.d(X,{chooseLocation:()=>Gp,isSupported:()=>Kp,showLocation:()=>Jp});var Y={};n.r(Y),n.d(Y,{getCurrentLocation:()=>Qp,hasPermission:()=>Xp,isSupported:()=>eg,map:()=>X,requestPermission:()=>Yp});var ee={};n.r(ee),n.d(ee,{isSupported:()=>sg,open:()=>ag});var te={};n.r(te),n.d(te,{getLocation:()=>lg,isSupported:()=>dg,showLocation:()=>ug});var ne={};n.r(ne),n.d(ne,{setOptions:()=>pg});var re={};n.r(re),n.d(re,{CallType:()=>Cg,EventActionSource:()=>bg,MeetingReactionType:()=>wg,MeetingType:()=>vg,SharingProtocol:()=>yg,appShareButton:()=>ne,getAppContentStageSharingCapabilities:()=>Mg,getAppContentStageSharingState:()=>xg,getAuthenticationTokenForAnonymousUser:()=>Tg,getIncomingClientAudioState:()=>Sg,getLiveStreamState:()=>Pg,getMeetingDetails:()=>Ag,getMeetingDetailsVerbose:()=>Ig,joinMeeting:()=>Hg,registerLiveStreamChangedHandler:()=>Fg,registerMeetingReactionReceivedHandler:()=>Dg,registerRaiseHandStateChangedHandler:()=>Ug,registerSpeakingStateChangeHandler:()=>Lg,requestAppAudioHandling:()=>Vg,requestStartLiveStreaming:()=>Og,requestStopLiveStreaming:()=>Rg,shareAppContentToStage:()=>kg,stopSharingAppContentToStage:()=>Ng,toggleIncomingClientAudio:()=>Eg,updateMicState:()=>Bg});var oe={};n.r(oe),n.d(oe,{isSupported:()=>Gg,openPurchaseExperience:()=>qg});var ie={};n.r(ie),n.d(ie,{composeMeeting:()=>Zg,isSupported:()=>Qg,openCalendarItem:()=>Kg});var ae={};n.r(ae),n.d(ae,{ComposeMailType:()=>nm,composeMail:()=>em,isSupported:()=>tm,openMailItem:()=>Yg});var se={};n.r(se),n.d(se,{enablePrintCapability:()=>om,isSupported:()=>um,print:()=>im,registerBeforeUnloadHandler:()=>cm,registerBeforeUnloadHandlerHelper:()=>lm,registerOnLoadHandler:()=>am,registerOnLoadHandlerHelper:()=>sm});var ce={};n.r(ce),n.d(ce,{isSupported:()=>mm,selectPeople:()=>pm});var le={};n.r(le),n.d(le,{isSupported:()=>ym,showProfile:()=>Cm});var ue={};n.r(ue),n.d(ue,{closeSearch:()=>Om,isSupported:()=>Pm,registerHandlers:()=>Im,unregisterHandlers:()=>Tm});var de={};n.r(de),n.d(de,{getContent:()=>km,isSupported:()=>Mm});var fe={};n.r(fe),n.d(fe,{SharingAPIMessages:()=>Lm,history:()=>de,isSupported:()=>Wm,shareWebContent:()=>Um});var pe={};n.r(pe),n.d(pe,{close:()=>jm,isSupported:()=>zm});var ge={};n.r(ge),n.d(ge,{StageViewOpenMode:()=>qm,isSupported:()=>Jm,open:()=>Gm,self:()=>pe});var me={};n.r(me),n.d(me,{captureImages:()=>Xm,isSupported:()=>eh,retrieveImages:()=>Ym});var he={};n.r(he),n.d(he,{CameraRestriction:()=>ih,Source:()=>ah,hasPermission:()=>sh,image:()=>me,requestPermission:()=>ch});var we={};n.r(we),n.d(we,{isSupported:()=>mh,isWebStorageClearedOnUserLogOut:()=>ph});var ve={};n.r(ve),n.d(ve,{CallModalities:()=>wh,isSupported:()=>Ch,startCall:()=>vh});var Ce={};n.r(Ce),n.d(Ce,{ExpectedFailureReason:()=>no,FailedReason:()=>to,Messages:()=>eo,notifyAppLoaded:()=>bh,notifyExpectedFailure:()=>Ah,notifyFailure:()=>Eh,notifySuccess:()=>Sh});var ye={};n.r(ye),n.d(ye,{getDragAndDropFiles:()=>Mh,isSupported:()=>xh});var be={};n.r(be),n.d(be,{getSettings:()=>lw,registerOnRemoveHandler:()=>fw,registerOnSaveHandler:()=>dw,setSettings:()=>uw,setValidityState:()=>cw});var Se={};n.r(Se),n.d(Se,{getDefaultSizeIfNotProvided:()=>yw,startTask:()=>mw,submitTask:()=>ww,updateTask:()=>hw});var Ee={};n.r(Ee),n.d(Ee,{ContainerState:()=>Ew,LiveShareHost:()=>Iw,UserMeetingRole:()=>Sw,isSupported:()=>Aw});var Ae={};n.r(Ae),n.d(Ae,{CartStatus:()=>Ww,Intent:()=>_w,addOrUpdateCartItems:()=>jw,cartVersion:()=>Vw,getCart:()=>Bw,isSupported:()=>qw,removeCartItems:()=>zw,updateCartStatus:()=>$w});var Ie=n(815),Te=n(933);const Pe=Re,Oe=2147483647;function Re(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return ke(e)}return Fe(e,t,n)}function Fe(e,t,n){if("string"==typeof e)return Le(e,t);if(ArrayBuffer.isView(e))return Be(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(De(e,ArrayBuffer)||e&&De(e.buffer,ArrayBuffer))return je(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(De(e,SharedArrayBuffer)||e&&De(e.buffer,SharedArrayBuffer)))return je(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return Re.from(r,t,n);const o=ut(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return Re.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function ke(e){return Me(e),Ne(e<0?0:0|xe(e))}function Me(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Ne(e){if(e>Oe)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,Re.prototype),t}function xe(e){if(e>=Oe)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Oe.toString(16)+" bytes");return 0|e}function Le(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Re.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|Ue(e,t);let r=Ne(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function Ue(e,t){if(Re.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||De(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return He(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Ve(e).length;default:if(o)return r?-1:He(e).length;t=(""+t).toLowerCase(),o=!0}}function De(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function He(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Ve(e){return Te.toByteArray(We(e))}Re.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),Re.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),Re.from=function(e,t,n){return Fe(e,t,n)},Object.setPrototypeOf(Re.prototype,Uint8Array.prototype),Object.setPrototypeOf(Re,Uint8Array),Re.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Re.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==Re.prototype};const _e=/[^+/0-9A-Za-z-_]/g;function We(e){if((e=(e=e.split("=")[0]).trim().replace(_e,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Be(e){if(De(e,Uint8Array)){const t=new Uint8Array(e);return je(t.buffer,t.byteOffset,t.byteLength)}return ze(e)}function je(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,Re.prototype),r}function ze(e){const t=e.length<0?0:0|xe(e.length),n=Ne(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function $e(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return Je(r)}function qe(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ke(this,t,n);case"utf8":case"utf-8":return $e(this,t,n);case"ascii":return Ze(this,t,n);case"latin1":case"binary":return Qe(this,t,n);case"base64":return Xe(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ye(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}Re.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?$e(this,0,e):qe.apply(this,arguments)};const Ge=4096;function Je(e){const t=e.length;if(t<=Ge)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ge));return n}function Ke(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=lt[e[r]];return o}function Ze(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function Qe(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function Xe(e,t,n){return 0===t&&n===e.length?Te.fromByteArray(e):Te.fromByteArray(e.slice(t,n))}function Ye(e,t,n){const r=e.slice(t,n);let o="";for(let e=0;e<r.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function et(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(ct(r))return a;e[n+a]=r}return a}function tt(e,t,n,r){return st(He(t,e.length-n),e,n,r)}function nt(e,t,n,r){return st(it(t),e,n,r)}function rt(e,t,n,r){return st(Ve(t),e,n,r)}function ot(e,t,n,r){return st(at(t,e.length-n),e,n,r)}function it(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function at(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function st(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function ct(e){return e!=e}Re.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return et(this,e,t,n);case"utf8":case"utf-8":return tt(this,e,t,n);case"ascii":case"latin1":case"binary":return nt(this,e,t,n);case"base64":return rt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const lt=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function ut(e){if(Re.isBuffer(e)){const t=0|xe(e.length),n=Ne(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||ct(e.length)?Ne(0):ze(e):"Buffer"===e.type&&Array.isArray(e.data)?ze(e.data):void 0}const dt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ft;const pt=new Uint8Array(16);function gt(){if(!ft&&(ft="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ft))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ft(pt)}const mt=[];for(let e=0;e<256;++e)mt.push((e+256).toString(16).slice(1));function ht(e,t=0){return mt[e[t+0]]+mt[e[t+1]]+mt[e[t+2]]+mt[e[t+3]]+"-"+mt[e[t+4]]+mt[e[t+5]]+"-"+mt[e[t+6]]+mt[e[t+7]]+"-"+mt[e[t+8]]+mt[e[t+9]]+"-"+mt[e[t+10]]+mt[e[t+11]]+mt[e[t+12]]+mt[e[t+13]]+mt[e[t+14]]+mt[e[t+15]]}const wt=function(e,t,n){if(dt.randomUUID&&!t&&!e)return dt.randomUUID();const r=(e=e||{}).random||(e.rng||gt)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return ht(r)},vt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const Ct=function(e){return"string"==typeof e&&vt.test(e)};var yt,bt,St,Et,At,It,Tt,Pt,Ot,Rt,Ft,kt,Mt,Nt,xt,Lt,Ut;function Dt(e){return void 0!==(null==e?void 0:e.errorCode)}!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(yt||(yt={})),function(e){e.M365Content="m365content"}(bt||(bt={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(St||(St={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(Et||(Et={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(At||(At={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(It||(It={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Tt||(Tt={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(Pt||(Pt={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Ot||(Ot={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Rt||(Rt={})),function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(Ft||(Ft={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(kt||(kt={})),function(e){e.settings="settings",e.content="content",e.authentication="authentication",e.remove="remove",e.task="task",e.sidePanel="sidePanel",e.stage="stage",e.meetingStage="meetingStage"}(Mt||(Mt={})),function(e){e[e.Standard=0]="Standard",e[e.Edu=1]="Edu",e[e.Class=2]="Class",e[e.Plc=3]="Plc",e[e.Staff=4]="Staff"}(Nt||(Nt={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(xt||(xt={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(Lt||(Lt={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Ut||(Ut={}));const Ht={errorCode:Et.NOT_SUPPORTED_ON_PLATFORM},Vt={majorVersion:1,minorVersion:5},_t={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},Wt=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),Bt=new Error("Invalid response: Received more images than the specified max limit in the response.");function jt(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function zt(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const n=e.split("."),r=t.split(".");function o(e){return/^\d+$/.test(e)}if(!n.every(o)||!r.every(o))return NaN;for(;n.length<r.length;)n.push("0");for(;r.length<n.length;)r.push("0");for(let e=0;e<n.length;++e)if(Number(n[e])!=Number(r[e]))return Number(n[e])>Number(r[e])?1:-1;return 0}function $t(){return wt()}function qt(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&qt(e[t])})),Object.freeze(e)}function Gt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Jt(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function Kt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Zt(e,t,n){return new Promise(((r,o)=>{const i=setTimeout(o,t,n);e().then((e=>{clearTimeout(i),r(e)})).catch((e=>{clearTimeout(i),o(e)}))}))}function Qt(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId.toString())+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl.toString()),(e.chatId||e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({chatId:e.chatId,channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function Xt(e){return!(zt(`${e.majorVersion}.${e.minorVersion}`,`${Vt.majorVersion}.${Vt.minorVersion}`)>=0)}function Yt(e){return"https:"===e.protocol}function en(e,t){return new Promise(((n,r)=>{if(e||r("MimeType cannot be null or empty."),t||r("Base64 string cannot be null or empty."),e.startsWith("image/")){const r=atob(t),o=new Uint8Array(r.length);for(let e=0;e<r.length;e++)o[e]=r.charCodeAt(e);n(new Blob([o],{type:e}))}const o=Pe.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function tn(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function nn(){if(rn())throw new Error("window object undefined at SSR check");return window}function rn(){return"undefined"==typeof window}function on(e,t){if(cn(e)||!ln(e)||!un(e))throw t||new Error("id is not valid.")}function an(e,t){const n=e.toString().toLocaleLowerCase();if(cn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Yt(e))throw t||new Error("Url should be a valid https url")}function sn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function cn(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function ln(e){return e.length<256&&e.length>4}function un(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function dn(e){if(!e)throw new Error("id must not be empty");if(!1===Ct(e))throw new Error("id must be a valid UUID")}const fn=!!performance&&"now"in performance;function pn(){return fn?performance.now()+performance.timeOrigin:void 0}function gn(e,t=0){if(t>1e3)return!1;if(void 0===e||"boolean"==typeof e||"number"==typeof e||"bigint"==typeof e||"string"==typeof e||null===e)return!0;if(Array.isArray(e))return e.every((e=>gn(e,t+1)));return!("object"!=typeof e||"[object Object]"!==Object.prototype.toString.call(e)||Object.getPrototypeOf(e)!==Object.prototype&&null!==Object.getPrototypeOf(e))&&Object.keys(e).every((n=>gn(e[n],t+1)))}class mn{constructor(e=$t()){this.uuid=e,dn(e)}toString(){return this.uuid}}const hn=new mn,wn=Ie.debug.formatArgs;Ie.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${hn.toString()}]`,wn.call(this,e)};const vn=(0,Ie.debug)("teamsJs");function Cn(e){return vn.extend(e)}function yn(e,t){return`${e}_${t}`}function bn(e){return/^v\d+_[\w.]+$/.test(e)}const Sn=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const En="2.0.1",An="2.0.2",In="2.0.3",Tn="2.0.4",Pn="2.0.1",On="1.9.0",Rn="2.0.0",Fn="1.7.0",kn="1.8.0",Mn="1.9.0",Nn=n.t(Sn,2).validOrigins,xn=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),Ln=/^https:\/\//,Un="https",Dn="teams.microsoft.com",Hn="The library has not yet been initialized",Vn="The runtime has not yet been initialized",_n="The runtime version is not supported",Wn="The call was not properly started";class Bn{}Bn.initializeCalled=!1,Bn.initializeCompleted=!1,Bn.additionalValidOrigins=[],Bn.initializePromise=void 0,Bn.isFramelessWindow=!1,Bn.frameContext=void 0,Bn.hostClientType=void 0,Bn.printCapabilityEnabled=!1;var jn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const zn=Cn("runtime"),$n=4;function qn(e){return e.apiVersion===$n}const Gn={apiVersion:-1,supports:{}};function Jn(e){if(qn(e))return!0;throw-1===e.apiVersion?new Error(Vn):new Error(_n)}let Kn=Gn;const Zn={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:_t,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},Qn=[Ft.desktop,Ft.web,Ft.rigel,Ft.surfaceHub,Ft.teamsRoomsWindows,Ft.teamsRoomsAndroid,Ft.teamsPhones,Ft.teamsDisplays],Xn=[Ft.android,Ft.ios,Ft.ipados],Yn=[...Qn,...Xn];function er(e){let t=e;if(t.apiVersion<$n&&tr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),qn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const tr=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,r=jn(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:r})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,r,o,i;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(r=null===(n=e.supports.dialog)||void 0===n?void 0:n.url)||void 0===r?void 0:r.bot,parentCommunication:(null===(o=e.supports.dialog)||void 0===o?void 0:o.url)?{}:void 0},update:null===(i=e.supports.dialog)||void 0===i?void 0:i.update}:void 0})}}}],nr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:Qn}],"1.9.0":[{capability:{location:{}},hostClientTypes:Yn}],"2.0.0":[{capability:{people:{}},hostClientTypes:Yn},{capability:{sharing:{}},hostClientTypes:[Ft.desktop,Ft.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[Ft.android,Ft.desktop,Ft.ios,Ft.teamsRoomsAndroid,Ft.teamsPhones,Ft.teamsDisplays,Ft.web]},{capability:{webStorage:{}},hostClientTypes:[Ft.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[Ft.android,Ft.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[Ft.android,Ft.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[Ft.android,Ft.ios,Ft.ipados]}]},rr=zn.extend("generateBackCompatRuntimeConfig");function or(e,t){const n=Object.assign({},e);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&("object"!=typeof t[r]||Array.isArray(t[r])?r in e||(n[r]=t[r]):n[r]=or(e[r]||{},t[r]));return n}function ir(e,t,n){rr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);rr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{zt(e,t)>=0&&n[t].forEach((e=>{void 0!==Bn.hostClientType&&e.hostClientTypes.includes(Bn.hostClientType)&&(r=or(r,e.capability))}))}));const o={apiVersion:$n,hostVersionsInfo:_t,isLegacyTeams:!0,supports:r};return rr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const ar=zn.extend("applyRuntimeConfig");function sr(e){"string"==typeof e.apiVersion&&(ar("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),ar("Fast-forwarding runtime %o",e);const t=er(e);ar("Applying runtime %o",t),Kn=qt(t)}function cr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const lr="2.32.0-beta.1",ur=Cn("internal"),dr=ur.extend("ensureInitializeCalled"),fr=ur.extend("ensureInitialized");function pr(){if(!Bn.initializeCalled)throw dr(Hn),new Error(Hn)}function gr(e,...t){if(!Bn.initializeCompleted)throw fr("%s. initializeCalled: %s",Hn,Bn.initializeCalled.toString()),new Error(Hn);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Bn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Bn.frameContext}".`)}return Jn(e)}function mr(e=En){const t=zt(Bn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function hr(){return Bn.hostClientType==Ft.android||Bn.hostClientType==Ft.ios||Bn.hostClientType==Ft.ipados}function wr(e=En){if(!hr()){throw{errorCode:Et.NOT_SUPPORTED_ON_PLATFORM}}if(!mr(e)){throw{errorCode:Et.OLD_PLATFORM}}}function vr(e){let t=Bn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&Ln.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),Bn.additionalValidOrigins=t}function Cr(e){if(cn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(!Sr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${yr}-${br}).`);if(Er(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const yr=4,br=256;function Sr(e){return e.length<br&&e.length>yr}function Er(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Ar(e){if(!(e instanceof Ir))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Ir{constructor(e){this.appIdAsString=e,Cr(e)}serialize(){return this.toString()}toString(){return this.appIdAsString}}function Tr(e){return null==e}var Pr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let Or=[];const Rr=Cn("validateOrigin");function Fr(){return Pr(this,void 0,void 0,(function*(){yield Mr()}))}function kr(){return 0===Or.length}function Mr(){return Pr(this,void 0,void 0,(function*(){return kr()?rn()?(Or=Nn,Nn):fetch(xn).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(Nr(JSON.stringify(e)))return Or=e.validOrigins,Or;throw new Error("Valid Origins List Is Invalid")}))})).catch((e=>(Rr("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Or=Nn,Or))):Or}))}function Nr(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return Rr("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function xr(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function Lr(e){return Mr().then((t=>{if(!Yt(e))return Rr("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>xr(e,n))))return!0;for(const e of Bn.additionalValidOrigins){if(xr("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return Rr("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,Bn.additionalValidOrigins),!1}))}var Ur=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let Dr;const Hr="v1",Vr=Cn("messageChannels.telemetry");function _r(){return Ur(this,void 0,void 0,(function*(){if(Dr)return Vr("Returning telemetry port from cache"),Dr;if(!Wr())throw Ht;return Dr=yield Gs(yn(Hr,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),Dr}))}function Wr(){var e;return!(!gr(Kn)||!(null===(e=Kn.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function Br(){Dr=void 0}var jr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let zr;const $r="v1",qr=Cn("messageChannels.dataLayer");function Gr(){return jr(this,void 0,void 0,(function*(){if(zr)return qr("Returning dataLayer port from cache"),zr;if(!Jr())throw Ht;return zr=yield Gs(yn($r,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),zr}))}function Jr(){var e;return!(!gr(Kn)||!(null===(e=Kn.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Kr(){zr=void 0}function Zr(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");gr(Kn),ys(e)}function Qr(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");gr(Kn),bs(e)}const Xr="v2",Yr=Cn("app"),eo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var to,no;function ro(){return Bn.initializeCompleted}function oo(){return Bn.frameContext}function io(e){return Fr(),Ki(yn(Xr,"app.initialize"),e)}function ao(e){Ls.currentWindow=e}function so(){Bn.initializeCalled&&(os(),Bn.initializeCalled=!1,Bn.initializeCompleted=!1,Bn.initializePromise=void 0,Bn.additionalValidOrigins=[],Bn.frameContext=void 0,Bn.hostClientType=void 0,Bn.isFramelessWindow=!1,Br(),Kr(),Hs())}function co(){return new Promise((e=>{pr(),e(Vs(yn(Xr,"app.getContext"),"getContext"))})).then((e=>wo(e)))}function lo(){pr(),Zi(yn(Xr,"app.notifyAppLoaded"))}function uo(){return Yi(yn(Xr,"app.notifySuccess"))}function fo(e){pr(),Xi(yn(Xr,"app.notifyFailure"),e)}function po(e){pr(),Qi(yn(Xr,"app.notifyExpectedFailure"),e)}function go(e){oa(yn(Xr,"app.registerOnThemeChangeHandler"),e)}function mo(e){ps(e)}function ho(e){return ia(yn(Xr,"app.openLink"),e)}function wo(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:kt.teams,clientType:e.hostClientType?e.hostClientType:Ft.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Bn.frameContext,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(to||(to={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(no||(no={})),Yr("teamsjs instance is version %s, starting at %s UTC (%s local)",lr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(rn())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,n="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?Yr("teamsjs is being used from %s. %s",t,n):Yr("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const vo="v1",Co="v2";let yo,bo,So;function Eo(){ss(yn(vo,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",Do,!1),ss(yn(vo,"authentication.registerAuthenticateFailureHandler"),"authentication.authenticate.failure",Ho,!1)}function Ao(e){So=e}function Io(e){const t=void 0!==e,n=t?e:So;if(!n)throw new Error("No parameters are provided for authentication");gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.remove,Mt.task,Mt.stage,Mt.meetingStage);return To(n.successCallback||n.failureCallback?yn(vo,"authentication.authenticate"):yn(Co,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(So=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(So=void 0)}}))}function To(e,t){return new Promise(((n,r)=>{if(Bn.hostClientType!==Ft.web){const r=sn(t.url);an(r),n(js(e,"authentication.authenticate",[r.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)})))}else yo={success:n,fail:r},Mo(t)}))}function Po(e){pr();return Oo(e&&(e.successCallback||e.failureCallback)?yn(vo,"authentication.getAuthToken"):yn(Co,"authentication.getAuthToken"),e).then((t=>e&&e.successCallback?(e.successCallback(t),""):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),"";throw t}))}function Oo(e,t){return new Promise((n=>{n(js(e,"authentication.getAuthToken",[null==t?void 0:t.resources,null==t?void 0:t.claims,null==t?void 0:t.silent,null==t?void 0:t.tenantId]))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function Ro(e){pr();return Fo(e&&(e.successCallback||e.failureCallback)?yn(vo,"authentication.getUser"):yn(Co,"authentication.getUser")).then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{const n=`Error returned, code = ${t.errorCode}, message = ${t.message}`;if(e&&e.failureCallback)return e.failureCallback(n),null;throw new Error(n)}))}function Fo(e){return new Promise((t=>{t(js(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function ko(){No();try{Ls.childWindow&&Ls.childWindow.close()}finally{Ls.childWindow=null,Ls.childOrigin=null}}function Mo(e){ko();let t=e.width||600,n=e.height||400;t=Math.min(t,Ls.currentWindow.outerWidth-400),n=Math.min(n,Ls.currentWindow.outerHeight-200);const r=sn(e.url.replace("{oauthRedirectMethod}","web"));an(r);let o=void 0!==Ls.currentWindow.screenLeft?Ls.currentWindow.screenLeft:Ls.currentWindow.screenX,i=void 0!==Ls.currentWindow.screenTop?Ls.currentWindow.screenTop:Ls.currentWindow.screenY;o+=Ls.currentWindow.outerWidth/2-t/2,i+=Ls.currentWindow.outerHeight/2-n/2,Ls.childWindow=Ls.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),Ls.childWindow?xo():Ho("FailedToOpenWindow")}function No(){bo&&(clearInterval(bo),bo=0),cs("initialize"),cs("navigateCrossDomain")}function xo(){No(),bo=Ls.currentWindow.setInterval((()=>{if(!Ls.childWindow||Ls.childWindow.closed)Ho("CancelledByUser");else{const e=Ls.childOrigin;try{Ls.childOrigin="*",Tc("ping")}finally{Ls.childOrigin=e}}}),100),ss(yn(vo,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[Mt.authentication,Bn.hostClientType])),ss(yn(vo,"authentication.authenticationWindow.registerNavigateCrossDomainHandler"),"navigateCrossDomain",(()=>!1))}function Lo(e,t){gr(Kn,Mt.authentication);Zs(yn(t?vo:Co,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Ac(Ls.parentWindow,(()=>setTimeout((()=>Ls.currentWindow.close()),200)))}function Uo(e,t){gr(Kn,Mt.authentication);Zs(yn(t?vo:Co,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Ac(Ls.parentWindow,(()=>setTimeout((()=>Ls.currentWindow.close()),200)))}function Do(e){try{yo&&yo.success(e)}finally{yo=void 0,ko()}}function Ho(e){try{yo&&yo.fail(new Error(e))}finally{yo=void 0,ko()}}var Vo;function _o(e){ei(yn(Yo,"dialog.update.resize"),e)}function Wo(){return!(!gr(Kn)||!Kn.supports.dialog)&&!!Kn.supports.dialog.update}function Bo(e,t,n){ni(yn(Yo,"dialog.url.bot.open"),e,t,n)}function jo(){return gr(Kn)&&void 0!==(Kn.supports.dialog&&Kn.supports.dialog.url&&Kn.supports.dialog.url.bot)}function zo(e){if(gr(Kn,Mt.task),!Go())throw Ht;Zs(yn(Yo,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function $o(e){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!Go())throw Ht;Zs(yn(Yo,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function qo(e){if(gr(Kn,Mt.task),!Go())throw Ht;for(cs("messageForChild"),ss(yn(Yo,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ai.reverse();ai.length>0;){e(ai.pop())}}function Go(){var e,t;return gr(Kn)&&!!(null===(t=null===(e=Kn.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Jo(e,t,n){ti(yn(Yo,"dialog.url.open"),e,t,n)}function Ko(e,t){ri(yn(Yo,"dialog.url.submit"),e,t)}function Zo(){return gr(Kn)&&void 0!==(Kn.supports.dialog&&Kn.supports.dialog.url)}function Qo(e){return{url:e.url,height:e.size?e.size.height:Lt.Small,width:e.size?e.size.width:Lt.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Xo(e){const t=Qo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(Vo||(Vo={}));const Yo="v2";function ei(e,t){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.task,Mt.meetingStage),!Wo())throw Ht;Zs(e,"tasks.updateTask",[t])}function ti(e,t,n,r){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!Zo())throw Ht;r&&ss(yn(Yo,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Zs(e,"tasks.startTask",[Qo(t)],((e,t)=>{null==n||n({err:e,result:t}),cs("messageForParent")}))}function ni(e,t,n,r){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!jo())throw Ht;r&&ss(yn(Yo,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Zs(e,"tasks.startTask",[Xo(t)],((e,t)=>{null==n||n({err:e,result:t}),cs("messageForParent")}))}function ri(e,t,n){if(gr(Kn,Mt.task),!Zo())throw Ht;Zs(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function oi(e){return{card:e.card,height:e.size?e.size.height:Lt.Small,width:e.size?e.size.width:Lt.Small,title:e.title}}function ii(e){const t=oi(e);return t.completionBotId=e.completionBotId,t}const ai=[];function si(e){Bn.frameContext&&(Bn.frameContext===Mt.task?ai.push(e):cs("messageForChild"))}function ci(e,t){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!li())throw Ht;const n=ii(e);Zs(yn(Yo,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function li(){const e=Kn.hostVersionsInfo&&Kn.hostVersionsInfo.adaptiveCardSchemaVersion&&!Xt(Kn.hostVersionsInfo.adaptiveCardSchemaVersion);return gr(Kn)&&void 0!==(e&&Kn.supports.dialog&&Kn.supports.dialog.card&&Kn.supports.dialog.card.bot)}function ui(e,t){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!di())throw Ht;const n=oi(e);Zs(yn(Yo,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function di(){const e=Kn.hostVersionsInfo&&Kn.hostVersionsInfo.adaptiveCardSchemaVersion&&!Xt(Kn.hostVersionsInfo.adaptiveCardSchemaVersion);return gr(Kn)&&void 0!==(e&&Kn.supports.dialog&&Kn.supports.dialog.card)}function fi(){ss(yn(Yo,"dialog.registerMessageForChildHandler"),"messageForChild",si,!1)}function pi(){return!(!gr(Kn)||!Kn.supports.dialog)}const gi="v2";var mi,hi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(mi||(mi={}));class wi{constructor(){this.enabled=!0,this.selected=!1}}let vi,Ci,yi,bi,Si;function Ei(){ss(yn(gi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Pi,!1),ss(yn(gi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Ri,!1),ss(yn(gi,"menus.registerSetModuleViewHandler"),"setModuleView",Ii,!1)}function Ai(e,t){if(gr(Kn),!Fi())throw Ht;yi=t,Zs(yn(gi,"menus.setUpViews"),"setUpViews",[e])}function Ii(e){yi&&yi(e)||(gr(Kn),Zs(yn(gi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Ti(e,t){if(gr(Kn),!Fi())throw Ht;vi=t,Zs(yn(gi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Pi(e){vi&&vi(e)||(gr(Kn),Zs(yn(gi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Oi(e,t){if(gr(Kn),!Fi())throw Ht;Ci=t,Zs(yn(gi,"menus.showActionMenu"),"showActionMenu",[e])}function Ri(e){Ci&&Ci(e)||(gr(Kn),Zs(yn(gi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Fi(){return!(!gr(Kn)||!Kn.supports.menus)}function ki(){ss(yn(Ma,"pages.config.registerSettingsSaveHandler"),"settings.save",Hi,!1),ss(yn(Ma,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Wi,!1)}function Mi(e){return Wa(yn(Ma,"pages.config.setValidityState"),e)}function Ni(e){return ja(yn(Ma,"pages.config.setConfig"),e)}function xi(e){Li(yn(Ma,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Tr(e)&&!ji())throw Ht}))}function Li(e,t,n){!Tr(t)&&gr(Kn,Mt.settings),n&&n(),bi=t,!Tr(t)&&Zs(e,"registerHandler",["save"])}function Ui(e){Di(yn(Ma,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Tr(e)&&!ji())throw Ht}))}function Di(e,t,n){!Tr(t)&&gr(Kn,Mt.remove,Mt.settings),n&&n(),Si=t,!Tr(t)&&Zs(e,"registerHandler",["remove"])}function Hi(e){const t=new _i(e);bi?bi(t):Ls.childWindow?Tc("settings.save",[e]):t.notifySuccess()}function Vi(e){us(yn(Ma,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[Mt.content],(()=>{if(!ji())throw Ht}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(hi||(hi={}));class _i{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Zs(yn(Ma,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Zs(yn(Ma,"pages.saveEvent.notifyFailure"),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function Wi(){const e=new Bi;Si?Si(e):Ls.childWindow?Tc("settings.remove",[]):e.notifySuccess()}class Bi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Zs(yn(Ma,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Zs(yn(Ma,"pages.removeEvent.notifyFailure"),"settings.remove.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}}function ji(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.config}class zi{}class $i extends zi{validate(e){return!0}deserialize(e){return e}}var qi=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Gi=6e4,Ji=Cn("app");function Ki(e,t){if(rn()){return Ji.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Zt((()=>ra(e,t)),Gi,new Error("SDK initialization timed out."))}function Zi(e){Zs(e,eo.AppLoaded,[lr])}function Qi(e,t){Zs(e,eo.ExpectedFailure,[t.reason,t.message])}function Xi(e,t){Zs(e,eo.Failure,[t.reason,t.message])}function Yi(e){return qi(this,void 0,void 0,(function*(){if(Bn.initializeCompleted)return ta(e);if(!Bn.initializePromise)throw new Error(Hn);return Bn.initializePromise.then((()=>ta(e)))}))}function ea(){var e;return gr(Kn)&&!!(null===(e=Kn.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ta(e){return qi(this,void 0,void 0,(function*(){return ea()?$s(eo.Success,[lr],new $i,e).then((()=>({hasFinishedSuccessfully:!0}))):(Zs(e,eo.Success,[lr]),{hasFinishedSuccessfully:"unknown"})}))}const na=Ji.extend("initializeHelper");function ra(e,t){return new Promise((n=>{Bn.initializeCalled||(Bn.initializeCalled=!0,rs(),Bn.initializePromise=Ds(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=En})=>{Bn.frameContext=e,Bn.hostClientType=t,Bn.clientSupportedSDKVersion=r;try{na("Parsing %s",n);const e=JSON.parse(n);if(na("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&sr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{na("Attempting to parse %s as an SDK version",n),isNaN(zt(n,En))||(Bn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(na("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");sr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;sr(ir(Bn.clientSupportedSDKVersion,Zn,nr))}}Bn.initializeCompleted=!0})),Eo(),Ei(),ki(),fi()),Array.isArray(t)&&vr(t),void 0!==Bn.initializePromise?n(Bn.initializePromise):na("GlobalVars.initializePromise is unexpectedly undefined")}))}function oa(e,t){!Tr(t)&&pr(),ds(e,t)}function ia(e,t){return new Promise((n=>{gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),n(_s(e,"executeDeepLink",t))}))}function aa(e){us(yn(Ma,"pages.appButton.onClick"),"appButtonClick",e,[Mt.content],(()=>{if(!la())throw Ht}))}function sa(e){us(yn(Ma,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[Mt.content],(()=>{if(!la())throw Ht}))}function ca(e){us(yn(Ma,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[Mt.content],(()=>{if(!la())throw Ht}))}function la(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.appButton}function ua(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),!fa())throw Ht;t(Bs(yn(Ma,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function da(){return new Promise((e=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),!fa())throw Ht;e(Bs(yn(Ma,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function fa(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.currentApp}function pa(){if(gr(Kn,Mt.content),!ma())throw Ht;Zs(yn(Ma,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function ga(){if(gr(Kn,Mt.content),!ma())throw Ht;Zs(yn(Ma,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function ma(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.fullTrust}function ha(e){return La(yn(Ma,"pages.tabs.navigateToTab"),e)}function wa(e){return Da(yn(Ma,"pages.tabs.getTabInstances"),e)}function va(e){return Ha(yn(Ma,"pages.tabs.getMruTabInstances"),e)}function Ca(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.tabs}var ya,ba;function Sa(e){const t=yn(Ma,"pages.returnFocus");if(gr(Kn),!ka())throw Ht;if(void 0===e&&Zs(t,"returnFocus",[!1]),"boolean"==typeof e)Zs(t,"returnFocus",[e]);else switch(e){case ba.PreviousLandmark:case ba.GoToActivityFeed:Zs(t,"returnFocus",[!1,e]);break;case ba.NextLandmark:Zs(t,"returnFocus",[!0,e])}}function Ea(e){us(yn(Ma,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!ka())throw Ht}))}function Aa(e){_a(yn(Ma,"pages.setCurrentFrame"),e)}function Ia(e,t,n){Fr(),Ki(yn(Ma,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Aa(e)}function Ta(){return Ba(yn(Ma,"pages.getConfig."))}function Pa(e){return Na(yn(Ma,"pages.navigateCrossDomain"),e)}function Oa(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),!ka())throw Ht;const n=yn(Ma,"pages.navigateToApp");if(Kn.isLegacyTeams){t(_s(n,"executeDeepLink",Qt(za(e)?e:$a(e))))}else{t(_s(n,"pages.navigateToApp",za(e)?qa(e):e))}}))}function Ra(e){return Va(yn(Ma,"pages.shareDeepLink"),e)}function Fa(e){us(yn(Ma,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Tr(e)&&!ka())throw Ht}))}function ka(){return!(!gr(Kn)||!Kn.supports.pages)}!function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(ya||(ya={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(ba||(ba={}));const Ma="v2";function Na(e,t){return new Promise((n=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.remove,Mt.task,Mt.stage,Mt.meetingStage),!ka())throw Ht;n(Ws(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function xa(e){return new Promise((t=>{if(gr(Kn),!Ya())throw Ht;t(Ws(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function La(e,t){return new Promise((n=>{if(gr(Kn),!Ca())throw Ht;n(Ws(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Ua(e,t){if(gr(Kn),!ka())throw Ht;Zs(e,"returnFocus",[t])}function Da(e,t){return new Promise((n=>{if(gr(Kn),!Ca())throw Ht;n(Vs(e,"getTabInstances",t))}))}function Ha(e,t){return new Promise((n=>{if(gr(Kn),!Ca())throw Ht;n(Vs(e,"getMruTabInstances",t))}))}function Va(e,t){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!ka())throw Ht;Zs(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function _a(e,t){if(gr(Kn,Mt.content),!ka())throw Ht;Zs(e,"setFrameContext",[t])}function Wa(e,t){if(gr(Kn,Mt.settings,Mt.remove),!ji())throw Ht;Zs(e,"settings.setValidityState",[t])}function Ba(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.settings,Mt.remove,Mt.sidePanel),!ka())throw Ht;t(Vs(e,"settings.getSettings"))}))}function ja(e,t){return new Promise((n=>{if(gr(Kn,Mt.content,Mt.settings,Mt.sidePanel),!ji())throw Ht;n(_s(e,"settings.setSettings",t))}))}function za(e){return e.appId instanceof Ir}function $a(e){return Object.assign(Object.assign({},e),{appId:new Ir(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function qa(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let Ga;function Ja(){ss(yn(Ma,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Xa,!1)}function Ka(){return xa(yn(Ma,"pages.backStack.navigateBack"))}function Za(e){Qa(yn(Ma,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Tr(e)&&!Ya())throw Ht}))}function Qa(e,t,n){!Tr(t)&&gr(Kn),n&&n(),Ga=t,!Tr(t)&&Zs(e,"registerHandler",["backButton"])}function Xa(){Ga&&Ga()||(Ls.childWindow?Tc("backButtonPress",[]):Ka())}function Ya(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.backStack}var es=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ts=Cn("handlers");class ns{static initializeHandlers(){ns.handlers.themeChange=fs,ns.handlers.load=hs,ns.handlers.beforeUnload=Cs,Ja()}static uninitializeHandlers(){ns.handlers={},ns.themeChangeHandler=null,ns.loadHandler=null,ns.beforeUnloadHandler=null,ns.beforeSuspendOrTerminateHandler=null,ns.resumeHandler=null}}function rs(){ns.initializeHandlers()}function os(){ns.uninitializeHandlers()}ns.handlers={},ns.themeChangeHandler=null,ns.loadHandler=null,ns.beforeUnloadHandler=null,ns.beforeSuspendOrTerminateHandler=null,ns.resumeHandler=null,ns.hostToAppPerformanceMetricsHandler=null;const is=ts.extend("callHandler");function as(e,t){const n=ns.handlers[e];if(n){is("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Ls.childWindow?(Tc(e,t),[!1,void 0]):(is("Handler for action message %s not found.",e),[!1,void 0])}function ss(e,t,n,r=!0,o=[]){n?(ns.handlers[t]=n,r&&Zs(e,"registerHandler",[t,...o])):delete ns.handlers[t]}function cs(e){delete ns.handlers[e]}function ls(e){return null!=ns.handlers[e]}function us(e,t,n,r,o){n&&gr(Kn,...r),o&&o(),ss(e,t,n)}function ds(e,t){ns.themeChangeHandler=t,!Tr(t)&&Zs(e,"registerHandler",["themeChange"])}function fs(e){ns.themeChangeHandler&&ns.themeChangeHandler(e),Ls.childWindow&&Tc("themeChange",[e])}function ps(e){ns.hostToAppPerformanceMetricsHandler=e}function gs(e){ns.hostToAppPerformanceMetricsHandler&&ns.hostToAppPerformanceMetricsHandler(e)}function ms(e,t){ns.loadHandler=t,!Tr(t)&&Zs(e,"registerHandler",["load"])}function hs(e){const t=ws(e);ns.resumeHandler?(ns.resumeHandler(t),Ls.childWindow&&Tc("load",[t])):ns.loadHandler&&(ns.loadHandler(e),Ls.childWindow&&Tc("load",[e]))}function ws(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function vs(e,t){ns.beforeUnloadHandler=t,!Tr(t)&&Zs(e,"registerHandler",["beforeUnload"])}function Cs(){return es(this,void 0,void 0,(function*(){const e=()=>{Zs(yn("v2","handleBeforeUnload"),"readyToUnload",[])};ns.beforeSuspendOrTerminateHandler?(yield ns.beforeSuspendOrTerminateHandler(),Ls.childWindow?Tc("beforeUnload"):e()):ns.beforeUnloadHandler&&ns.beforeUnloadHandler(e)||(Ls.childWindow?Tc("beforeUnload"):e())}))}function ys(e){ns.beforeSuspendOrTerminateHandler=e,!Tr(e)&&Zs(yn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function bs(e){ns.resumeHandler=e,!Tr(e)&&Zs(yn("v2","registerOnResumeHandler"),"registerHandler",["load"])}class Ss{static storeCallbackInformation(e,t){Ss.callbackInformation.set(e,t)}static clearMessages(){Ss.callbackInformation.clear()}static deleteMessageInformation(e){Ss.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?gs({actionName:e.func,messageDelay:n-r,requestStartedAt:r}):t("Unable to send performance metrics for event %s",e.func)}static handlePerformanceMetrics(e,t,n,r){const o=Ss.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(gs({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Ss.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Ss.callbackInformation=new Map;var Es=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const As=e=>{const{uuid:t}=e,n=Es(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Is=e=>{const{uuidAsString:t}=e,n=Es(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new mn(t):void 0})},Ts=e=>{const{uuidAsString:t}=e,n=Es(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new mn(t):void 0})},Ps=e=>{const{uuid:t}=e,n=Es(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Os=Cn("nestedAppAuthUtils"),Rs=Os.extend("tryPolyfillWithNestedAppAuthBridge");function Fs(e,t,n){var r;const o=Rs;if(Bn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=Ms(a,n);s&&(a.nestedAppAuthBridge=s)}const ks=Os.extend("createNestedAppAuthBridge");function Ms(e,t){const n=ks;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();t&&"object"==typeof t&&"NestedAppAuthRequest"===t.messageType?o(e):n("Unrecognized data format received by app, message being ignored. Message: %o",e)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var Ns=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const xs=Cn("communication");class Ls{}class Us{}function Ds(e,t){if(Us.messageListener=e=>oc(e),Ls.currentWindow=Ls.currentWindow||nn(),Ls.parentWindow=Ls.currentWindow.parent!==Ls.currentWindow.self?Ls.currentWindow.parent:Ls.currentWindow.opener,Ls.topWindow=Ls.currentWindow.top,(Ls.parentWindow||e)&&Ls.currentWindow.addEventListener("message",Us.messageListener,!1),!Ls.parentWindow){const e=Ls.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Bn.isFramelessWindow=!0,e.onNativeMessage=gc}try{return Ls.parentOrigin="*",js(t,"initialize",[lr,$n,e]).then((([e,t,n,r])=>(Fs(r,Ls.currentWindow,{onMessage:ac,sendPostMessage:Xs}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Ls.parentOrigin=null}}function Hs(){Ls.currentWindow&&Ls.currentWindow.removeEventListener("message",Us.messageListener,!1),Ls.currentWindow=null,Ls.parentWindow=null,Ls.parentOrigin=null,Ls.childWindow=null,Ls.childOrigin=null,Us.parentMessageQueue=[],Us.childMessageQueue=[],Us.nextMessageId=0,Us.callbacks.clear(),Us.promiseCallbacks.clear(),Us.portCallbacks.clear(),Us.legacyMessageIdsToUuidMap={},Ss.clearMessages()}function Vs(e,t,...n){return js(e,t,n).then((([e])=>e))}function _s(e,t,...n){return js(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function Ws(e,t,n,...r){return js(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function Bs(e,t,...n){return js(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function js(e,t,n=void 0){if(!bn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((r=>{r(Ks(nc(e,t,n).uuid))}))}function zs(e){return e.map((e=>cr(e)?e.serialize():e))}function $s(e,t,n,r,o){var i;return Ns(this,void 0,void 0,(function*(){const a=zs(t),[s]=yield js(r,e,a);if(o&&o(s)||!o&&Dt(s))throw new Error(`${s.errorCode}, message: ${null!==(i=s.message)&&void 0!==i?i:"None"}`);if(n.validate(s))return n.deserialize(s);throw new Error(`${Et.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function qs(e,t,n,r){var o;return Ns(this,void 0,void 0,(function*(){const i=zs(t),[a]=yield js(n,e,i);if(r&&r(a)||!r&&Dt(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Et.INTERNAL_ERROR}, message: Invalid response from host`)}))}function Gs(e,t,n=void 0){if(!bn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return Js(nc(e,t,n).uuid)}function Js(e){return new Promise(((t,n)=>{Us.portCallbacks.set(e,((e,r)=>{e instanceof MessagePort?t(e):n(r&&r.length>0?r[0]:new Error("Host responded without port or error details."))}))}))}function Ks(e){return new Promise((t=>{Us.promiseCallbacks.set(e,t)}))}function Zs(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!bn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const i=nc(e,t,o);r&&Us.callbacks.set(i.uuid,r)}Us.parentMessageQueue=[],Us.childMessageQueue=[],Us.topMessageQueue=[],Us.nextMessageId=0,Us.callbacks=new Map,Us.promiseCallbacks=new Map,Us.portCallbacks=new Map,Us.legacyMessageIdsToUuidMap={};const Qs=xs.extend("sendNestedAuthRequestToTopWindow");function Xs(e){const t=Qs,n=Ls.topWindow,r=Oc(e);return t("Message %s information: %o",kc(r),{actionName:r.func}),ec(n,r)}const Ys=xs.extend("sendRequestToTargetWindowHelper");function ec(e,t){const n=Ys,r=bc(e),o=As(t);if(Bn.isFramelessWindow)Ls.currentWindow&&Ls.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",kc(o),r),Ls.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=yc(e);e&&i?(n("Sending message %s to %s via postMessage",kc(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",kc(o),r),Cc(e).push(t))}return t}const tc=xs.extend("sendMessageToParentHelper");function nc(e,t,n){const r=tc,o=Ls.parentWindow,i=Pc(e,t,n);return Ss.storeCallbackInformation(i.uuid,{name:t,calledAt:i.timestamp}),r("Message %s information: %o",kc(i),{actionName:t,args:n}),ec(o,i)}const rc=xs.extend("processIncomingMessage");function oc(e){return Ns(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void rc("Unrecognized message format received by app, message being ignored. Message: %o",e);const t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;return cc(t,n).then((r=>{r?(lc(t,n),t===Ls.parentWindow?gc(e):t===Ls.childWindow&&wc(e)):rc("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",e,t,n)}))}))}const ic=xs.extend("processAuthBridgeMessage");function ac(e,t){var n,r;const o=ic;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),l=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?cc(c,l)?(Ls.topWindow&&!Ls.topWindow.closed&&c!==Ls.topWindow||(Ls.topWindow=c,Ls.topOrigin=l),Ls.topWindow&&Ls.topWindow.closed&&(Ls.topWindow=null,Ls.topOrigin=null),Ec(Ls.topWindow),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const sc=xs.extend("shouldProcessIncomingMessage");function cc(e,t){return Ns(this,void 0,void 0,(function*(){if(Ls.currentWindow&&e===Ls.currentWindow)return sc("Should not process message because it is coming from the current window"),!1;if(Ls.currentWindow&&Ls.currentWindow.location&&t&&t===Ls.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return sc("Message has an invalid origin of %s",t),!1}const n=yield Lr(e);return n||sc("Message has an invalid origin of %s",t),n}}))}function lc(e,t){Bn.isFramelessWindow||Ls.parentWindow&&!Ls.parentWindow.closed&&e!==Ls.parentWindow?Ls.childWindow&&!Ls.childWindow.closed&&e!==Ls.childWindow||(Ls.childWindow=e,Ls.childOrigin=t):(Ls.parentWindow=e,Ls.parentOrigin=t),Ls.parentWindow&&Ls.parentWindow.closed&&(Ls.parentWindow=null,Ls.parentOrigin=null),Ls.childWindow&&Ls.childWindow.closed&&(Ls.childWindow=null,Ls.childOrigin=null),Ec(Ls.parentWindow),Ec(Ls.childWindow)}const uc=xs.extend("handleIncomingMessageFromParent");function dc(e){const t=uc;if(!e.uuid)return Us.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=fc(Us.callbacks,t);if(n)return n;const r=fc(Us.promiseCallbacks,t);if(r)return r;const o=fc(Us.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",kc(e))}function fc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function pc(e,t){const n=fc(t,e.uuid);n&&t.delete(n),e.uuid?Us.legacyMessageIdsToUuidMap={}:delete Us.legacyMessageIdsToUuidMap[e.id]}function gc(e){const t=uc,n=pn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Ts(r),i=dc(o);if(i){const r=Us.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Ss.handlePerformanceMetrics(i,o,t,n),r&&(t("Invoking the registered callback for message %s with arguments %o",i.toString(),o.args),r.apply(null,[...o.args,o.isPartialResponse]),mc(e)||(t("Removing registered callback for message %s",i.toString()),pc(o,Us.callbacks)));const a=Us.promiseCallbacks.get(i);a&&(t("Invoking the registered promise callback for message %s with arguments %o",i.toString(),o.args),a(o.args),t("Removing registered promise callback for message %s",i.toString()),pc(o,Us.promiseCallbacks));const s=Us.portCallbacks.get(i);if(s){let n;t("Invoking the registered port callback for message %s with arguments %o",i.toString(),o.args),e.ports&&e.ports[0]instanceof MessagePort&&(n=e.ports[0]),s(n,o.args),t("Removing registered port callback for message %s",i.toString()),pc(o,Us.portCallbacks)}o.uuid&&(Us.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Ss.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',kc(r),r.func),as(r.func,r.args)}else t("Received an unknown message: %O",e)}function mc(e){return!0===e.data.isPartialResponse}const hc=xs.extend("handleIncomingMessageFromChild");function wc(e){if("id"in e.data&&"func"in e.data){const t=Is(e.data),[n,r]=as(t.func,t.args);n&&void 0!==r?(hc("Returning message %s from child back to child, action: %s.",kc(t),t.func),Ic(t.id,t.uuid,Array.isArray(r)?r:[r])):(hc("Relaying message %s from child to parent, action: %s. Relayed message will have a new id.",kc(t),t.func),Zs(yn("v2","tasks.startTask"),t.func,t.args,((...e)=>{if(Ls.childWindow){const n=e.pop();hc("Message from parent being relayed to child, id: %s",kc(t)),Ic(t.id,t.uuid,e,n)}})))}}function vc(){return Ls.topWindow!==Ls.parentWindow}function Cc(e){return e===Ls.topWindow&&vc()?Us.topMessageQueue:e===Ls.parentWindow?Us.parentMessageQueue:e===Ls.childWindow?Us.childMessageQueue:[]}function yc(e){return e===Ls.topWindow&&vc()?Ls.topOrigin:e===Ls.parentWindow?Ls.parentOrigin:e===Ls.childWindow?Ls.childOrigin:null}function bc(e){return e===Ls.topWindow&&vc()?"top":e===Ls.parentWindow?"parent":e===Ls.childWindow?"child":null}const Sc=xs.extend("flushMessageQueue");function Ec(e){const t=yc(e),n=Cc(e),r=bc(e);for(;e&&t&&n.length>0;){const o=n.shift();if(o){const n=As(o);Sc("Flushing message %s from %s message queue via postMessage.",kc(n),r),e.postMessage(n,t)}}}function Ac(e,t){let n;n=Ls.currentWindow.setInterval((()=>{0===Cc(e).length&&(clearInterval(n),t())}),100)}function Ic(e,t,n,r){const o=Ls.childWindow,i=Rc(e,t,n,r),a=Ps(i),s=yc(o);o&&s&&o.postMessage(a,s)}function Tc(e,t){const n=Ls.childWindow,r=Fc(e,t),o=yc(n);n&&o?n.postMessage(r,o):Cc(n).push(r)}function Pc(e,t,n){const r=Us.nextMessageId++,o=new mn;return Us.legacyMessageIdsToUuidMap[r]=o,{id:r,uuid:o,func:t,timestamp:Date.now(),monotonicTimestamp:pn(),args:n||[],apiVersionTag:e}}function Oc(e){const t=Us.nextMessageId++,n=new mn;return Us.legacyMessageIdsToUuidMap[t]=n,{id:t,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:pn(),args:[],data:e}}function Rc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Fc(e,t){return{func:e,args:t||[]}}function kc(e){return"uuidAsString"in e?`${e.uuidAsString} (legacy id: ${e.id})`:"uuid"in e&&void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const Mc="v1";function Nc(e){if(!Tr(e)&&gr(Kn),!Tr(e)&&!xc())throw Ht;e?ss(yn(Mc,"log.request"),"log.request",(()=>{const t=e();Zs(yn(Mc,"log.receive"),"log.receive",[t])})):cs("log.request")}function xc(){return!(!gr(Kn)||!Kn.supports.logs)}var Lc,Uc,Dc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Lc||(Lc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Uc||(Uc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Dc||(Dc={}));const Hc="v1";function Vc(e,t){gr(Kn),Zs(yn(Hc,"uploadCustomApp"),"uploadCustomApp",[e],t||jt())}function _c(e,t,n){gr(Kn),Zs(yn(Hc,"sendCustomMessage"),e,t,n)}function Wc(e,t){if(gr(Kn),!Ls.childWindow)throw new Error("The child window has not yet been initialized or is not present");Tc(e,t)}function Bc(e,t){gr(Kn),ss(yn(Hc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function jc(e,t){gr(Kn),ss(yn(Hc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function zc(e){gr(Kn,Mt.content,Mt.task);const t=[e.entityId,e.title,e.description,e.type,e.objectUrl,e.downloadUrl,e.webPreviewUrl,e.webEditUrl,e.baseUrl,e.editFile,e.subEntityId,e.viewerAction,e.fileOpenPreference,e.conversationId,e.sizeInBytes];Zs(yn(Hc,"openFilePreview"),"openFilePreview",t)}const $c="v1";function qc(e){return new Promise((t=>{if(gr(Kn,Mt.content),!Kc())throw Ht;const n=_s(yn($c,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&ss(yn($c,"conversations.registerStartConversationHandler"),"startConversation",((t,n,r,o)=>{var i;return null===(i=e.onStartConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),e.onCloseConversation&&ss(yn($c,"conversations.registerCloseConversationHandler"),"closeConversation",((t,n,r,o)=>{var i;return null===(i=e.onCloseConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),t(n)}))}function Gc(){if(gr(Kn,Mt.content),!Kc())throw Ht;Zs(yn($c,"conversations.closeConversation"),"conversations.closeConversation"),cs("startConversation"),cs("closeConversation")}function Jc(){return new Promise((e=>{if(gr(Kn),!Kc())throw Ht;e(Vs(yn($c,"conversations.getChatMember"),"getChatMembers"))}))}function Kc(){return!(!gr(Kn)||!Kn.supports.conversations)}var Zc=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Qc="v2",Xc=Cn("copilot");function Yc(){var e,t;return gr(Kn)&&(!!(null===(e=Kn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=Kn.supports.copilot)||void 0===t?void 0:t.eligibility))}function el(){var e,t;return Zc(this,void 0,void 0,(function*(){if(gr(Kn),!Yc())throw new Error(`Error code: ${Ht.errorCode}, message: Not supported on platform`);if(null===(e=Kn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)return Xc("Eligibility information is already available on runtime."),Kn.hostVersionsInfo.appEligibilityInformation;Xc("Eligibility information is not available on runtime. Requesting from host.");const n=yield Vs(yn(Qc,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo");if(Dt(n))throw new Error(`Error code: ${n.errorCode}, message: ${null!==(t=n.message)&&void 0!==t?t:"Failed to get eligibility information from the host."}`);if(!tl(n))throw new Error("Error deserializing eligibility information");return n}))}function tl(e){return void 0!==e.ageGroup&&void 0!==e.cohort&&void 0!==e.userClassification&&void 0!==e.isCopilotEligible&&void 0!==e.isCopilotEnabledRegion&&void 0!==e.isOptedOutByAdmin}const nl="v2";class rl{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function ol(e){const t=e;return t.responseType===sl.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const il="Action.Execute";var al,sl,cl;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(al||(al={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(sl||(sl={}));class ll extends zi{validate(e){return ol(e)}deserialize(e){return e}}function ul(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(cl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function dl(e){e.requestType===al.ActionExecuteInvokeRequest?fl(e):e.requestType===al.QueryMessageExtensionRequest&&pl(e)}function fl(e){if(e.type!==il){throw{errorCode:cl.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${il}"`}}if(!gn(e.data)){throw{errorCode:cl.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function pl(e){if(e.commandId.length>64)throw new Error("originalRequestInfo.commandId exceeds the maximum size of 64 characters");if(e.parameters.length>5)throw new Error("originalRequestInfo.parameters exceeds the maximum size of 5");for(const t of e.parameters){if(t.name.length>64)throw new Error("originalRequestInfo.parameters.name exceeds the maximum size of 64 characters");if(t.value.length>512)throw new Error("originalRequestInfo.parameters.value exceeds the maximum size of 512 characters")}}function gl(e,t,n){if(gr(Kn,Mt.content),!Cl())throw Ht;const r=new Ir(e);return dl(n),js(yn(nl,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[r.toString(),n,t.url.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function ml(e,t){if(gr(Kn,Mt.content),!Cl())throw Ht;const n=new Ir(e);return js(yn(nl,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function hl(e,t,n){if(gr(Kn,Mt.content),!Cl())throw Ht;const r=new Ir(e);return dl(n),js(yn(nl,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function wl(e,t,n){if(gr(Kn,Mt.content),!Cl())throw Ht;return on(e,new Error("titleId is Invalid.")),on(t,new Error("oauthConfigId is Invalid.")),js(yn(nl,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function vl(e,t,n){if(gr(Kn,Mt.content),!Cl())throw Ht;return on(e,new Error("titleId is Invalid.")),t&&an(t),js(yn(nl,"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins"),"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins",[e,null==t?void 0:t.toString(),null==n?void 0:n.width,null==n?void 0:n.height,null==n?void 0:n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Cl(){return!(!gr(Kn)||!Kn.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(cl||(cl={}));var yl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const bl="v2";function Sl(e,t,n){return yl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Tl())throw Ht;return Pl(e,t),qs("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.claims,n.silent],yn(bl,"externalAppAuthenticationForCEA.authenticateWithSSO"),ul)}))}function El(e,t,n){return yl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Tl())throw Ht;return Pl(e,t),qs("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],yn(bl,"externalAppAuthenticationForCEA.authenticateWithOauth"),ul)}))}function Al(e,t,n,r){return yl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Tl())throw Ht;return Pl(e,t),fl(r),$s("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new rl(r),n.url.href,n.width,n.height,n.isExternal],new ll,yn(bl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),ul)}))}function Il(e,t,n,r){return yl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Tl())throw Ht;return Pl(e,t),fl(r),$s("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new rl(r),n.claims,n.silent],new ll,yn(bl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),ul)}))}function Tl(){return!(!gr(Kn)||!Kn.supports.externalAppAuthenticationForCEA)}function Pl(e,t){on(t,new Error("conversation id is not valid.")),Ar(e)}const Ol="v2";var Rl,Fl;function kl(e,t){if(gr(Kn,Mt.content),!Nl())throw Ht;const n=new Ir(e);return js(yn(Ol,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Ml(e,t,n){if(gr(Kn,Mt.content),!Nl())throw Ht;const r=new Ir(e);return js(yn(Ol,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function Nl(){return!(!gr(Kn)||!Kn.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Rl||(Rl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Fl||(Fl={}));var xl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ll="v2";function Ul(e,t,n){return xl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Hl())throw Ht;Pl(e,t);const[r,o]=yield js(yn(Ll,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function Dl(e,t,n){return xl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Hl())throw Ht;Pl(e,t);const r=yield Vs(yn(Ll,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Hl(){return!(!gr(Kn)||!Kn.supports.externalAppCardActionsForCEA)}var Vl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const _l="v2";function Wl(e,t,n){return Vl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Bl())throw Ht;const r=new Ir(e),[o,i]=yield js(yn(_l,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Bl(){return!(!gr(Kn)||!Kn.supports.externalAppCommands)}const jl="v1";var zl,$l,ql,Gl,Jl,Kl;function Zl(e,t){if(gr(Kn,Mt.content),!e||0===e.length)throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");if(!t)throw new Error("[files.getCloudStorageFolders] Callback cannot be null");Zs(yn(jl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Ql(e,t){if(gr(Kn,Mt.content),!e||0===e.length)throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.addCloudStorageFolder] Callback cannot be null");Zs(yn(jl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Xl(e,t,n){if(gr(Kn,Mt.content),!e)throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");if(!n)throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");Zs(yn(jl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Yl(e,t,n){if(gr(Kn,Mt.content),!e||!t)throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");if(!n)throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");if("isSubdirectory"in e&&!e.isSubdirectory)throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");Zs(yn(jl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function eu(e,t,n){if(gr(Kn,Mt.content),!e||!t)throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");if(e.isSubdirectory)throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");Zs(yn(jl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function tu(e=!1,t){if(gr(Kn,Mt.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Zs(yn(jl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function nu(e,t,n,r,o=!1,i){if(gr(Kn,Mt.content),!e||0===e.length)throw new Error("[files.copyMoveFiles] selectedFiles cannot be null or empty");if(!t)throw new Error("[files.copyMoveFiles] providerCode cannot be null or empty");if(!n)throw new Error("[files.copyMoveFiles] destinationFolder cannot be null or empty");if(!r)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!i)throw new Error("[files.copyMoveFiles] callback cannot be null");Zs(yn(jl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function ru(e){if(gr(Kn,Mt.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Zs(yn(jl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function ou(e=void 0,t){if(gr(Kn,Mt.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Zs(yn(jl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function iu(e){if(gr(Kn,Mt.content),!e)throw gu(Et.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Zs(yn(jl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function au(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw gu(Et.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Zs(yn(jl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function su(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw gu(Et.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Zs(yn(jl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function cu(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw gu(Et.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Zs(yn(jl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function lu(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw gu(Et.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Zs(yn(jl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function uu(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw gu(Et.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Zs(yn(jl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function du(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw gu(Et.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw gu(Et.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Zs(yn(jl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function fu(e){if(gr(Kn),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");ss(yn(jl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function pu(e){if(gr(Kn),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");ss(yn(jl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function gu(e,t){return{errorCode:e,message:t}}!function(e){e.Dropbox="DROPBOX",e.Box="BOX",e.Sharefile="SHAREFILE",e.GoogleDrive="GOOGLEDRIVE",e.Egnyte="EGNYTE",e.SharePoint="SharePoint"}(zl||(zl={})),function(e){e[e.Sharepoint=0]="Sharepoint",e[e.WopiIntegration=1]="WopiIntegration",e[e.Google=2]="Google",e[e.OneDrive=3]="OneDrive",e[e.Recent=4]="Recent",e[e.Aggregate=5]="Aggregate",e[e.FileSystem=6]="FileSystem",e[e.Search=7]="Search",e[e.AllFiles=8]="AllFiles",e[e.SharedWithMe=9]="SharedWithMe"}($l||($l={})),function(e){e.ClassMaterials="classMaterials"}(ql||(ql={})),function(e){e.Readonly="readonly"}(Gl||(Gl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(Jl||(Jl={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Kl||(Kl={}));const mu="v1";function hu(){return new Promise((e=>{if(gr(Kn),!yu())throw Ht;e(Bs(yn(mu,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function wu(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(gr(Kn),!yu())throw Ht;t(Bs(yn(mu,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function vu(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(gr(Kn),!yu())throw Ht;ss(yn(mu,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{gr(Kn),e(t)}))}function Cu(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(gr(Kn),!yu())throw Ht;ss(yn(mu,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{gr(Kn),e(t)}))}function yu(){return!(!gr(Kn)||!Kn.supports.meetingRoom)}function bu(){return!(!gr(Kn)||!Kn.supports.messageChannels)}const Su="v1";function Eu(e){if(gr(Kn,Mt.content),!Au())throw Ht;Zs(yn(Su,"notifications.showNotification"),"notifications.showNotification",[e])}function Au(){return!(!gr(Kn)||!Kn.supports.notifications)}const Iu="v2";function Tu(e){if(!Ru())throw new Error(Et.NOT_SUPPORTED_ON_PLATFORM.toString());if(Tr(e))throw new Error(Et.INVALID_ARGUMENTS.toString());ss(yn(Iu,"otherApp.install"),"otherApp.install",e)}function Pu(){if(!Ru())throw new Error(Et.NOT_SUPPORTED_ON_PLATFORM.toString());Zs(yn(Iu,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),cs("otherApp.install")}function Ou(e){if(!Ru())throw new Error(Et.NOT_SUPPORTED_ON_PLATFORM.toString());return qs("otherApp.notifyInstallCompleted",[e.toString()],yn(Iu,"otherApp.notifyInstallCompleted"))}function Ru(){return!(!gr(Kn)||!Kn.supports.otherAppStateChange)}const Fu="v1";var ku,Mu,Nu;function xu(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;Zs(yn(Fu,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Lu(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;Zs(yn(Fu,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Uu(e,t){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!t)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;Zs(yn(Fu,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function Du(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;Zs(yn(Fu,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Hu(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;ss(yn(Fu,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Vu(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;ss(yn(Fu,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function _u(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;ss(yn(Fu,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Wu(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;ss(yn(Fu,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Bu(){return!(!gr(Kn)||!Kn.supports.remoteCamera)}!function(e){e.Reset="Reset",e.ZoomIn="ZoomIn",e.ZoomOut="ZoomOut",e.PanLeft="PanLeft",e.PanRight="PanRight",e.TiltUp="TiltUp",e.TiltDown="TiltDown"}(ku||(ku={})),function(e){e[e.CommandResetError=0]="CommandResetError",e[e.CommandZoomInError=1]="CommandZoomInError",e[e.CommandZoomOutError=2]="CommandZoomOutError",e[e.CommandPanLeftError=3]="CommandPanLeftError",e[e.CommandPanRightError=4]="CommandPanRightError",e[e.CommandTiltUpError=5]="CommandTiltUpError",e[e.CommandTiltDownError=6]="CommandTiltDownError",e[e.SendDataError=7]="SendDataError"}(Mu||(Mu={})),function(e){e[e.None=0]="None",e[e.ControlDenied=1]="ControlDenied",e[e.ControlNoResponse=2]="ControlNoResponse",e[e.ControlBusy=3]="ControlBusy",e[e.AckTimeout=4]="AckTimeout",e[e.ControlTerminated=5]="ControlTerminated",e[e.ControllerTerminated=6]="ControllerTerminated",e[e.DataChannelError=7]="DataChannelError",e[e.ControllerCancelled=8]="ControllerCancelled",e[e.ControlDisabled=9]="ControlDisabled",e[e.ControlTerminatedToAllowOtherController=10]="ControlTerminatedToAllowOtherController"}(Nu||(Nu={}));const ju="v1";function zu(e,t,n,r){if(gr(Kn,Mt.content),!$u())throw Ht;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!r)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");Zs(yn(ju,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function $u(){return!(!gr(Kn)||!Kn.supports.appEntity)}const qu="v1";function Gu(e){return new Promise((t=>{if(gr(Kn),!Ju())throw Ht;if((Bn.hostClientType===Ft.android||Bn.hostClientType===Ft.teamsRoomsAndroid||Bn.hostClientType===Ft.teamsPhones||Bn.hostClientType===Ft.teamsDisplays)&&!mr(Pn)){const e={errorCode:Et.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Vs(yn(qu,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function Ju(){return!(!gr(Kn)||!Kn.supports.teams)&&(!!Kn.supports.teams.fullTrust&&!!Kn.supports.teams.fullTrust.joinedTeams)}const Ku="v1";function Zu(e){return new Promise((t=>{if(gr(Kn),!Qu())throw Ht;t(Vs(yn(Ku,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function Qu(){return!(!gr(Kn)||!Kn.supports.teams)&&!!Kn.supports.teams.fullTrust}const Xu="v1";var Yu;function ed(e,t){if(gr(Kn,Mt.content),!nd())throw Ht;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Zs(yn(Xu,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function td(e,t){if(gr(Kn),!nd())throw Ht;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Zs(yn(Xu,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function nd(){return!(!gr(Kn)||!Kn.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Yu||(Yu={}));class rd{static setTimeout(e,t){const n=performance.now(),r=$t();return rd.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete rd.setTimeoutCallbacks[e]}static setInterval(e,t){rd.setTimeout((function n(){e(),rd.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in rd.setTimeoutCallbacks){const r=rd.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){rd.setTimeoutCallbacks[e].callback(),delete rd.setTimeoutCallbacks[e]}}}rd.setTimeoutCallbacks={};class od{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){rd.tick(),this.suitableForThisSession(e,t,n,r)||this.reportAndResetSession(this.getStatistics(),e,r,t,n),this.start()}processEnds(){const e=performance.now()-this.frameProcessingStartedAt,t=Math.floor(Math.max(0,Math.min(this.distributionBins.length-1,e)));this.distributionBins[t]+=1,this.sampleCount+=1}getStatistics(){return this.currentSession?{effectId:this.currentSession.effectId,effectParam:this.currentSession.effectParam,frameHeight:this.currentSession.frameHeight,frameWidth:this.currentSession.frameWidth,duration:performance.now()-this.currentSession.startedAtInMs,sampleCount:this.sampleCount,distributionBins:this.distributionBins.slice()}:null}start(){this.frameProcessingStartedAt=performance.now()}suitableForThisSession(e,t,n,r){return this.currentSession&&this.currentSession.effectId===e&&this.currentSession.effectParam===r&&this.currentSession.frameWidth===t&&this.currentSession.frameHeight===n}reportAndResetSession(e,t,n,r,o){e&&this.reportStatisticsResult(e),this.resetCurrentSession(this.getNextTimeout(t,this.currentSession),t,n,r,o),this.timeoutId&&rd.clearTimeout(this.timeoutId),this.timeoutId=rd.setTimeout((()=>this.reportAndResetSession(this.getStatistics(),t,n,r,o)).bind(this),this.currentSession.timeoutInMs)}resetCurrentSession(e,t,n,r,o){this.currentSession={startedAtInMs:performance.now(),timeoutInMs:e,effectId:t,effectParam:n,frameWidth:r,frameHeight:o},this.sampleCount=0,this.distributionBins.fill(0)}getNextTimeout(e,t){return t&&t.effectId===e?Math.min(od.maxSessionTimeoutInMs,2*t.timeoutInMs):od.initialSessionTimeoutInMs}}od.initialSessionTimeoutInMs=1e3,od.maxSessionTimeoutInMs=3e4;const id="v2";class ad{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new od(ad.distributionBinSize,(e=>this.reportPerformanceEvent(yn(id,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){rd.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(yn(id,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),ad.calculateFPSInterval)}setFrameProcessTimeLimit(e){this.frameProcessTimeLimit=e}reportApplyingVideoEffect(e,t){var n,r;(null===(n=this.applyingEffect)||void 0===n?void 0:n.effectId)===e&&(null===(r=this.applyingEffect)||void 0===r?void 0:r.effectParam)===t||(this.applyingEffect={effectId:e,effectParam:t},this.appliedEffect=void 0)}reportVideoEffectChanged(e,t){void 0===this.applyingEffect||this.applyingEffect.effectId!==e&&this.applyingEffect.effectParam!==t||(this.appliedEffect={effectId:e,effectParam:t},this.applyingEffect=void 0,this.isFirstFrameProcessed=!1)}reportStartFrameProcessing(e,t){rd.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))}reportFrameProcessed(){var e;this.appliedEffect&&(this.processedFrameCount++,this.frameProcessingTimeCost+=performance.now()-this.frameProcessingStartedAt,this.performanceStatistics.processEnds(),this.isFirstFrameProcessed||(this.isFirstFrameProcessed=!0,this.reportPerformanceEvent(yn(id,"videoPerformanceMonitor.reportFrameProcessed"),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(yn(id,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}ad.distributionBinSize=1e3,ad.calculateFPSInterval=1e3;var sd=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},cd=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const ld="v2",ud=rn()?void 0:new ad(Zs);var dd,fd,pd;function gd(e){if(gr(Kn,Mt.sidePanel),!Cd())throw Ht;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(ss(yn(ld,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==ud?void 0:ud.setFrameProcessTimeLimit(e.timeLimit)),!1),Ad())yd(e.videoFrameHandler,e.config);else{if(!Td())throw Ht;Sd(e.videoBufferHandler,e.config)}null==ud||ud.startMonitorSlowFrameProcessing()}function md(e,t){if(gr(Kn,Mt.sidePanel),!Cd())throw Ht;Zs(yn(ld,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function hd(e){if(gr(Kn,Mt.sidePanel),!Cd())throw Ht;ss(yn(ld,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Hd(e,ud),!1),Zs(yn(ld,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function wd(e){Zs(yn(ld,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function vd(e){Zs(yn(ld,"videoEffects.notifyError"),"video.notifyError",[e])}function Cd(){return gr(Kn)&&!!Kn.supports.video&&(!!Kn.supports.video.mediaStream||!!Kn.supports.video.sharedFrame)}function yd(e,t){if(gr(Kn,Mt.sidePanel),!Cd()||!Ad())throw Ht;ss(yn(ld,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>sd(this,void 0,void 0,(function*(){const{streamId:n}=t,r=bd(e,ud);yield Rd(n,r,vd,ud)}))),!1),Zs(yn(ld,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function bd(e,t){return n=>sd(this,void 0,void 0,(function*(){const r=n.videoFrame;null==t||t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=yield e(n);return null==t||t.reportFrameProcessed(),o}))}function Sd(e,t){if(gr(Kn,Mt.sidePanel),!Cd()||!Td())throw Ht;ss(yn(ld,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==ud||ud.reportStartFrameProcessing(t.width,t.height),e(Ed(t),(()=>{null==ud||ud.reportFrameProcessed(),wd(n)}),vd)}}),!1),Zs(yn(ld,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Ed(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=cd(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Ad(){var e;return gr(Kn,Mt.sidePanel)&&Id()&&!!(null===(e=Kn.supports.video)||void 0===e?void 0:e.mediaStream)}function Id(){var e,t,n,r;return!(!(null===(t=null===(e=nn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=nn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Td(){var e;return gr(Kn,Mt.sidePanel)&&!!(null===(e=Kn.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(dd||(dd={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(fd||(fd={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(pd||(pd={}));var Pd=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Od="v2";function Rd(e,t,n,r){var o,i;return Pd(this,void 0,void 0,(function*(){const a=Md();!rn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Nd(yield kd(e,n,r),new xd(n,t),a.writable)}))}function Fd(e,t,n,r){var o,i;return Pd(this,void 0,void 0,(function*(){const a=Md();!rn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Nd(yield kd(e,n,r),new Dd(n,t),a.writable)}))}function kd(e,t,n){return Pd(this,void 0,void 0,(function*(){if(rn())throw Ht;const r=nn().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function Md(){if(rn())throw Ht;const e=window.MediaStreamTrackGenerator;if(!e)throw Ht;return new e({kind:"video"})}function Nd(e,t,n){new(0,nn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class xd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Pd(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const r=yield this.videoFrameHandler({videoFrame:e}),o=new VideoFrame(r,{timestamp:n});t.enqueue(o),e.close(),r.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")}))}}class Ld{constructor(e,t){if(this.headerBuffer=e,this.notifyError=t,this.ONE_TEXTURE_INPUT_ID=1869900081,this.INVALID_HEADER_ERROR="Invalid video frame header",this.UNSUPPORTED_LAYOUT_ERROR="Unsupported texture layout",this.headerDataView=new Uint32Array(e),this.headerDataView.length<8)throw this.notifyError(this.INVALID_HEADER_ERROR),new Error(this.INVALID_HEADER_ERROR);if(this.headerDataView[0]!==this.ONE_TEXTURE_INPUT_ID)throw this.notifyError(this.UNSUPPORTED_LAYOUT_ERROR),new Error(this.UNSUPPORTED_LAYOUT_ERROR)}get oneTextureLayoutId(){return this.headerDataView[0]}get version(){return this.headerDataView[1]}get frameRowOffset(){return this.headerDataView[2]}get frameFormat(){return this.headerDataView[3]}get frameWidth(){return this.headerDataView[4]}get frameHeight(){return this.headerDataView[5]}get multiStreamHeaderRowOffset(){return this.headerDataView[6]}get multiStreamCount(){return this.headerDataView[7]}}class Ud{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;const n=new Uint32Array(e);for(let r=0,o=0;r<t;r++){const t=n[o++],r=n[o++],i=n[o++],a=new Uint8Array(e,r,i);this.metadataMap.set(t,a)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const e=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(void 0===e)return;const t=new Map,n=new TextDecoder("utf-8");let r=0;const o=e[r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24);for(let i=0;i<o&&r<e.length-1;i++){const o=e[++r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24),i=e.findIndex(((e,t,n)=>0==e&&t>r)),a=n.decode(e.slice(++r,i)),s=this.metadataMap.get(o);void 0!==s&&t.set(a,s);r=i+(4-(i-r)%4-1)}return t}}class Dd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Pd(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:r,metadata:{audioInferenceResult:o,attributes:i}={}}=yield this.extractVideoFrameAndMetadata(e),a=yield this.videoFrameHandler({videoFrame:r,audioInferenceResult:o,attributes:i}),s=new VideoFrame(a,{timestamp:n});t.enqueue(s),r.close(),e.close(),a.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=e=>Pd(this,void 0,void 0,(function*(){if(rn())throw Ht;if("NV12"!==e.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2);yield e.copyTo(n,{rect:t});const r=new Ld(n,this.notifyError),o={x:0,y:r.multiStreamHeaderRowOffset,width:e.codedWidth,height:e.codedHeight-r.multiStreamHeaderRowOffset},i=new ArrayBuffer(o.width*o.height*3/2);yield e.copyTo(i,{rect:o});const a=new Ud(i,r.multiStreamCount);return{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:r.frameRowOffset,width:r.frameWidth,height:r.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult,attributes:a.attributes}}})),ss(yn(Od,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function Hd(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Zs(yn(Od,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in pd?e:pd.InitializationFailure;Zs(yn(Od,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var Vd=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const _d="v2",Wd=2e3,Bd=rn()?void 0:new ad(Zs);var jd;function zd(e){var t,n;if(!Qd())throw Ht;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(gr(Kn,Mt.sidePanel)){if(ss(yn(_d,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Bd?void 0:Bd.setFrameProcessTimeLimit(e)),!1),null===(t=Kn.supports.video)||void 0===t?void 0:t.mediaStream)ss(yn(_d,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Vd(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=Bd?qd(e.videoFrameHandler,Bd):e.videoFrameHandler;r?yield Fd(n,o,Yd,Bd):yield Rd(n,o,Yd,Bd)}))),!1),Zs(yn(_d,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=Kn.supports.video)||void 0===n?void 0:n.sharedFrame))throw Ht;ss(yn(_d,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==Bd||Bd.reportStartFrameProcessing(t.width,t.height);const n=$d(),r=t.timestamp;e.videoBufferHandler(Gd(t),(()=>{n(),null==Bd||Bd.reportFrameProcessed(),Xd(r)}),Yd)}}),!1),Zs(yn(_d,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Bd||Bd.startMonitorSlowFrameProcessing()}}function $d(){const e=setTimeout((()=>{Yd(`Frame not processed in ${Wd}ms`,jd.Warn)}),Wd);return function(){clearTimeout(e)}}function qd(e,t){return n=>Vd(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=$d(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function Gd(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Jd(e,t,n){if(gr(Kn,Mt.sidePanel),!Qd())throw Ht;Zs(yn(_d,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Kd(e){if(gr(Kn,Mt.sidePanel),!Qd())throw Ht;ss(yn(_d,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Hd(e,Bd),!1),Zs(yn(_d,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Zd(e){if(gr(Kn,Mt.sidePanel),!Cd())throw Ht;Zs(yn(_d,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Qd(){return gr(Kn),Cd()}function Xd(e){Zs(yn(_d,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Yd(e,t=jd.Warn){Zs(yn(_d,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function ef(e){if(gr(Kn),!Cd())throw Ht;Yd(e,jd.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(jd||(jd={}));const tf="v2";class nf extends zi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class rf{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class of{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class af extends zi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class sf{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class cf extends zi{validate(e){const t=new af;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function lf(e,t){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(mf(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Et.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return $s("hostEntity.tab.addAndConfigure",[new of(e),t],new af,yn(tf,"hostEntity.tab.addAndConfigure"))}function uf(e){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return mf(e.threadId),$s("hostEntity.tab.getAll",[new of(e)],new cf,yn(tf,"hostEntity.tab.getAll"))}function df(e,t){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return hf(e),mf(t.threadId),$s("hostEntity.tab.reconfigure",[new rf(e),new of(t)],new nf,yn(tf,"hostEntity.tab.reconfigure"))}function ff(e,t){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return hf(e),mf(t.threadId),$s("hostEntity.tab.rename",[new rf(e),new of(t)],new nf,yn(tf,"hostEntity.tab.rename"))}function pf(e,t){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return mf(t.threadId),hf(e),$s("hostEntity.tab.remove",[new sf(e),new of(t)],new $i,yn(tf,"hostEntity.tab.remove"))}function gf(){var e;return!!(gr(Kn)&&vf()&&(null===(e=Kn.supports.hostEntity)||void 0===e?void 0:e.tab))}function mf(e){if(!e||0==e.length)throw new Error(`Error code: ${Et.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function hf(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Et.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var wf;function vf(){return!(!gr(Kn)||!Kn.supports.hostEntity)}!function(e){e.edu="EDU"}(wf||(wf={}));var Cf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const yf="v2";var bf;!function(e){e.FullStore="fullstore",e.SpecificStore="specificstore",e.InContextStore="ics",e.AppDetail="appdetail"}(bf||(bf={}));const Sf="Invalid store dialog type, but type needed to specify store to open",Ef="No App Id present, but AppId needed to open AppDetail store",Af="No Collection Id present, but CollectionId needed to open a store specific to a collection";function If(e){return Cf(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!Tf())throw Ht;if(void 0===e||!Object.values(bf).includes(e.dialogType))throw new Error(Sf);if(e.dialogType===bf.AppDetail&&!(e.appId instanceof Ir))throw new Error(Ef);if(e.dialogType===bf.SpecificStore&&!e.collectionId)throw new Error(Af);return qs("store.open",[e.dialogType,e.appId,e.collectionId],yn(yf,"store.open"))}))}function Tf(){return gr(Kn)&&!!Kn.supports.store}function Pf(e){const t=!e||e.length<=0,n=null==e?void 0:e.indexOf("@"),r=null==e?void 0:e.indexOf(".",n);if(t||-1===n||-1===r)throw new Error("Input email address does not have the correct format.")}class Of{constructor(e){this.val=e,Pf(e)}toString(){return this.val}}const Rf="/l/app/",Ff="/l/meeting/new",kf="attendees",Mf="startTime",Nf="endTime",xf="subject",Lf="content",Uf="/l/call/0/0",Df="source",Hf="withVideo",Vf="/l/chat/0/0",_f="users",Wf="topicName",Bf="message";function jf(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${_f}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Wf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Bf}=${encodeURIComponent(n)}`;return`${Un}://${Dn}${Vf}?${r}${o}${i}`}function zf(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${_f}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Hf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Df}=${encodeURIComponent(n)}`;return`${Un}://${Dn}${Uf}?${r}${o}${i}`}function $f(e,t,n,r,o){const i=void 0===e?"":`${kf}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Mf}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Nf}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${xf}=${encodeURIComponent(r)}`,l=void 0===o?"":`&${Lf}=${encodeURIComponent(o)}`;return`${Un}://${Dn}${Ff}?${i}${a}${s}${c}${l}`}function qf(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${Un}://${Dn}${Rf}${encodeURIComponent(e)}`}const Gf="v1";function Jf(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),!Kf())throw new Error("Not supported");const n=yn(Gf,"appInstallDialog.openAppInstallDialog");Kn.isLegacyTeams?t(_s(n,"executeDeepLink",qf(e.appId))):(Zs(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function Kf(){return!(!gr(Kn)||!Kn.supports.appInstallDialog)}const Zf="v1",Qf=Cn("media");var Xf,Yf,ep,tp,np,rp,op;!function(e){e.Base64="base64",e.ID="id"}(Xf||(Xf={}));class ip{}function ap(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),Bn.isFramelessWindow)if(mr(Fn))Zs(yn(Zf,"media.captureImage"),"captureImage",e);else{e({errorCode:Et.OLD_PLATFORM},[])}else{e({errorCode:Et.NOT_SUPPORTED_ON_PLATFORM},[])}}function sp(){if(gr(Kn,Mt.content,Mt.task),!lp())throw Ht;const e=At.Media;return new Promise((t=>{t(Bs(yn(Zf,"media.hasPermission"),"permissions.has",e))}))}function cp(){if(gr(Kn,Mt.content,Mt.task),!lp())throw Ht;const e=At.Media;return new Promise((t=>{t(Bs(yn(Zf,"media.requestPermission"),"permissions.request",e))}))}function lp(){return!(!gr(Kn)||!Kn.supports.permissions)}class up extends ip{constructor(e){super(),e&&(this.content=e.content,this.format=e.format,this.mimeType=e.mimeType,this.name=e.name,this.preview=e.preview,this.size=e.size)}getMedia(e){if(!e)throw new Error("[get Media] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),mr(kn))if(Ap(this.mimeType,this.format,this.content))mr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:Et.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:Et.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Zs(yn(Zf,"media.getMedia"),"getMedia",n,(function(n){if(e)if(n&&n.error)e(n.error,new Blob);else if(n&&n.mediaChunk)if(n.mediaChunk.chunkSequence<=0){const r=hp(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=wp(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):Qf(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Et.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=$t(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Tr(e)&&Zs(yn(Zf,"media.getMedia"),"getMedia",r),ss(yn(Zf,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),cs("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=hp(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),cs("getMedia"+t)}else{const e=wp(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Et.INTERNAL_ERROR,message:"data received is null"},new Blob),cs("getMedia"+t)}}))}}class dp{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){gr(Kn,Mt.content,Mt.task);try{wr(In)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Zs(yn(Zf,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(Yf.StopRecording,e)}}class fp extends dp{getMediaType(){return np.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Yf.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function pp(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),!mr(kn)){const e={errorCode:Et.OLD_PLATFORM};return void t(e,[])}try{vp(e)}catch(e){return void t(e,[])}if(!yp(e)){const e={errorCode:Et.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Zs(yn(Zf,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Cp(e)&&(null===(a=null===(i=null==e?void 0:e.videoProps)||void 0===i?void 0:i.videoController)||void 0===a||a.notifyEventToApp(o)));if(!r)return void t(n,[]);const s=[];for(const e of r)s.push(new up(e));t(n,s)}))}function gp(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),!mr(kn)){return void t({errorCode:Et.OLD_PLATFORM})}if(!Ip(e)){return void t({errorCode:Et.INVALID_ARGUMENTS})}const n=[e];Zs(yn(Zf,"media.viewImages"),"viewImages",n,t)}function mp(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),Bn.hostClientType!==Ft.desktop&&Bn.hostClientType!==Ft.web&&Bn.hostClientType!==Ft.rigel&&Bn.hostClientType!==Ft.teamsRoomsWindows&&Bn.hostClientType!==Ft.teamsRoomsAndroid&&Bn.hostClientType!==Ft.teamsPhones&&Bn.hostClientType!==Ft.teamsDisplays)if(mr(Mn))if(Tp(t))Zs(yn(Zf,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:Et.INVALID_ARGUMENTS},"")}else{e({errorCode:Et.OLD_PLATFORM},"")}else{e({errorCode:Et.NOT_SUPPORTED_ON_PLATFORM},"")}}function hp(e,t){if(null==e||null==t||e.length<=0)return null;let n=null,r=1;return e.sort(((e,t)=>e.sequence>t.sequence?1:-1)),e.forEach((e=>{e.sequence==r&&(n=n?new Blob([n,e.file],{type:t}):new Blob([e.file],{type:t}),r++)})),n}function wp(e,t){if(null==e||null==t)return null;const n=atob(e.chunk),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const o=new Uint8Array(r),i=new Blob([o],{type:t});return{sequence:e.chunkSequence,file:i}}function vp(e){Sp(e)?wr(An):Ep(e)?wr(In):bp(e)&&wr(Tn)}function Cp(e){return!(e.mediaType!=np.Video||!e.videoProps||!e.videoProps.videoController)}function yp(e){return!(null==e||e.maxMediaCount>10)}function bp(e){var t;return!((null==e?void 0:e.mediaType)!=np.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Sp(e){return!(!e||e.mediaType!=np.VideoAndImage&&!e.videoAndImageProps)}function Ep(e){return!(!e||e.mediaType!=np.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Ap(e,t,n){return null!=e&&null!=t&&t==Xf.ID&&null!=n}function Ip(e){return!(null==e||e.length<=0||e.length>10)}function Tp(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Pp(e){if(e){if(e.title&&"string"!=typeof e.title)return!1;if(e.setSelected&&"object"!=typeof e.setSelected)return!1;if(e.openOrgWideSearchInChatOrChannel&&"boolean"!=typeof e.openOrgWideSearchInChatOrChannel)return!1;if(e.singleSelect&&"boolean"!=typeof e.singleSelect)return!1}return!0}!function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(Yf||(Yf={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(ep||(ep={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(tp||(tp={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(np||(np={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(rp||(rp={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(op||(op={}));const Op="v2";function Rp(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.task),!Mp())throw Ht;if(!Tp(e))throw{errorCode:Et.INVALID_ARGUMENTS};t(Bs(yn(Op,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Fp(){if(gr(Kn,Mt.content,Mt.task),!Mp())throw Ht;const e=At.Media;return new Promise((t=>{t(Bs(yn(Op,"barCode.hasPermission"),"permissions.has",e))}))}function kp(){if(gr(Kn,Mt.content,Mt.task),!Mp())throw Ht;const e=At.Media;return new Promise((t=>{t(Bs(yn(Op,"barCode.requestPermission"),"permissions.request",e))}))}function Mp(){return!!(gr(Kn)&&Kn.supports.barCode&&Kn.supports.permissions)}const Np="v2";function xp(e){return Lp(yn(Np,"chat.openChat"),e)}function Lp(e,t){return new Promise((n=>{if(gr(Kn,Mt.content,Mt.task),!Dp())throw Ht;if(Kn.isLegacyTeams)n(_s(e,"executeDeepLink",jf([t.user],void 0,t.message)));else{n(_s(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Up(e){const t=yn(Np,"chat.openGroupChat");return new Promise((n=>{if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){const r={user:e.users[0],message:e.message};n(Lp(t,r))}else{if(gr(Kn,Mt.content,Mt.task),!Dp())throw Ht;if(Kn.isLegacyTeams)n(_s(t,"executeDeepLink",jf(e.users,e.topic,e.message)));else{n(_s(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function Dp(){return!(!gr(Kn)||!Kn.supports.chat)}var Hp=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Vp="v2";function _p(e){return Hp(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content,Mt.meetingStage,Mt.task,Mt.settings,Mt.stage,Mt.sidePanel),!Bp())throw Ht;if(!e.type||!Object.values(Rt).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Rt)}`);const t=yield tn(e),n={mimeType:e.type,content:t};return Bs(yn(Vp,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function Wp(){return Hp(this,void 0,void 0,(function*(){gr(Kn,Mt.content,Mt.meetingStage,Mt.task,Mt.settings,Mt.stage,Mt.sidePanel);const e=yn(Vp,"clipboard.read");if(!Bp())throw Ht;const t=yield Bs(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return en(e.mimeType,e.content)}return t}))}function Bp(){return Bn.isFramelessWindow?!(!gr(Kn)||!Kn.supports.clipboard):!!(gr(Kn)&&navigator&&navigator.clipboard&&Kn.supports.clipboard)}function jp(){var e;return null!==(e=gr(Kn)&&(Kn.isNAAChannelRecommended||zp()))&&void 0!==e&&e}function zp(){return!!(gr(Kn)&&$p()&&Kn.isLegacyTeams&&Kn.supports.nestedAppAuth)}function $p(){return Bn.hostClientType===Ft.android||Bn.hostClientType===Ft.ios||Bn.hostClientType===Ft.ipados}const qp="v2";function Gp(){if(gr(Kn,Mt.content,Mt.task),!Kp())throw Ht;return Bs(yn(qp,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Jp(e){if(gr(Kn,Mt.content,Mt.task),!Kp())throw Ht;if(!e)throw{errorCode:Et.INVALID_ARGUMENTS};return Bs(yn(qp,"geoLocation.showLocation"),"location.showLocation",e)}function Kp(){return!!(gr(Kn)&&Kn.supports.geoLocation&&Kn.supports.geoLocation.map&&Kn.supports.permissions)}const Zp="v2";function Qp(){if(gr(Kn,Mt.content,Mt.task),!eg())throw Ht;return Bs(yn(Zp,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Xp(){if(gr(Kn,Mt.content,Mt.task),!eg())throw Ht;const e=At.GeoLocation;return new Promise((t=>{t(Bs(yn(Zp,"geoLocation.hasPermission"),"permissions.has",e))}))}function Yp(){if(gr(Kn,Mt.content,Mt.task),!eg())throw Ht;const e=At.GeoLocation;return new Promise((t=>{t(Bs(yn(Zp,"geoLocation.requestPermission"),"permissions.request",e))}))}function eg(){return!!(gr(Kn)&&Kn.supports.geoLocation&&Kn.supports.permissions)}function tg(){return Kn.hostVersionsInfo?Kn.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const ng="v1";class rg{postMessage(e,t){gr(Kn),Zs(yn(ng,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||jt())}addEventListener(e,t){gr(Kn),"message"===e&&ss(yn(ng,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class og{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){gr(Kn,Mt.task),Zs(yn(ng,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||jt())}addEventListener(e,t){gr(Kn,Mt.task),"message"===e&&ss(yn(ng,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const ig="v2";function ag(e){if(gr(Kn,Mt.content),!sg())throw Ht;if(!e||!Yt(e))throw{errorCode:Et.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Bs(yn(ig,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function sg(){return!(!gr(Kn)||!Kn.supports.secondaryBrowser)}const cg="v1";function lg(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),!mr(On))throw{errorCode:Et.OLD_PLATFORM};if(!e)throw{errorCode:Et.INVALID_ARGUMENTS};if(!dg())throw Ht;Zs(yn(cg,"location.getLocation"),"location.getLocation",[e],t)}function ug(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),!mr(On))throw{errorCode:Et.OLD_PLATFORM};if(!e)throw{errorCode:Et.INVALID_ARGUMENTS};if(!dg())throw Ht;Zs(yn(cg,"location.showLocation"),"location.showLocation",[e],t)}function dg(){return!(!gr(Kn)||!Kn.supports.location)}const fg="v1";function pg(e){gr(Kn,Mt.sidePanel),e.contentUrl&&new URL(e.contentUrl),Zs(yn(fg,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var gg=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const mg="v1";var hg,wg,vg,Cg,yg,bg;function Sg(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Eg(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Ag(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage,Mt.settings,Mt.content),Zs(yn(mg,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Ig(){var e,t,n;return gg(this,void 0,void 0,(function*(){let r;gr(Kn,Mt.sidePanel,Mt.meetingStage,Mt.settings,Mt.content);try{const e=!0;r=yield Bs(yn("v2","meeting.getMeetingDetailsVerbose"),"meeting.getMeetingDetails",e)}catch(t){throw new Error(null===(e=null==t?void 0:t.errorCode)||void 0===e?void 0:e.toString())}if(((null===(t=r.details)||void 0===t?void 0:t.type)==Cg.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Cg.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Et.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Tg(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage,Mt.task),Zs(yn(mg,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Pg(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");gr(Kn,Mt.sidePanel),Zs(yn(mg,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Og(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");gr(Kn,Mt.sidePanel),Zs(yn(mg,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Rg(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");gr(Kn,Mt.sidePanel),Zs(yn(mg,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Fg(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");gr(Kn,Mt.sidePanel),ss(yn(mg,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function kg(e,t,n={sharingProtocol:yg.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Mg(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Ng(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function xg(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Lg(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),ss(yn(mg,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Ug(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),ss(yn(mg,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Dg(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),ss(yn(mg,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Hg(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));gr(Kn);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||bg.Other};return Bs(yn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Vg(e,t){if(!t)throw new Error("[requestAppAudioHandling] Callback response cannot be null");if(!e.micMuteStateChangedCallback)throw new Error("[requestAppAudioHandling] Callback Mic mute state handler cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),e.isAppHandlingAudio?_g(e,t):Wg(e,t)}function _g(e,t){Zs(yn(mg,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((n,r)=>{if(n&&null!=r)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(n)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${n.errorCode} ${n.message}`);if("boolean"!=typeof r)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");ss(yn(mg,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>gg(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);jg(n,n.isMicMuted===t.isMicMuted?hg.HostInitiated:hg.AppDeclinedToChange)}catch(e){jg(t,hg.AppFailedToChange)}}))));ss(yn(mg,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function Wg(e,t){Zs(yn(mg,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");ls("meeting.micStateChanged")&&cs("meeting.micStateChanged"),ls("meeting.audioDeviceSelectionChanged")&&cs("meeting.audioDeviceSelectionChanged"),t(n)}))}function Bg(e){jg(e,hg.AppInitiated)}function jg(e,t){gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.setMicStateWithReason"),"meeting.updateMicState",[e,t])}!function(e){e[e.HostInitiated=0]="HostInitiated",e[e.AppInitiated=1]="AppInitiated",e[e.AppDeclinedToChange=2]="AppDeclinedToChange",e[e.AppFailedToChange=3]="AppFailedToChange"}(hg||(hg={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(wg||(wg={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(vg||(vg={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Cg||(Cg={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(yg||(yg={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(bg||(bg={}));const zg="v1",$g="v2";function qg(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=yn(zg,"monetization.openPurchaseExperience")):(r=e,o=yn($g,"monetization.openPurchaseExperience"));return gr(Kn,Mt.content),Kt((()=>new Promise((e=>{if(!Gg())throw Ht;e(Bs(o,"monetization.openPurchaseExperience",r))}))),n)}function Gg(){return!(!gr(Kn)||!Kn.supports.monetization)}const Jg="v2";function Kg(e){return new Promise((t=>{if(gr(Kn,Mt.content),!Qg())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(_s(yn(Jg,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function Zg(e){return new Promise((t=>{if(gr(Kn,Mt.content),!Qg())throw new Error("Not supported");const n=yn(Jg,"calendar.composeMeeting");Kn.isLegacyTeams?t(_s(n,"executeDeepLink",$f(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(_s(n,"calendar.composeMeeting",e))}))}function Qg(){return!(!gr(Kn)||!Kn.supports.calendar)}const Xg="v2";function Yg(e){return new Promise((t=>{if(gr(Kn,Mt.content),!tm())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(_s(yn(Xg,"mail.openMailItem"),"mail.openMailItem",e))}))}function em(e){return new Promise((t=>{if(gr(Kn,Mt.content),!tm())throw new Error("Not supported");t(_s(yn(Xg,"mail.composeMail"),"mail.composeMail",e))}))}function tm(){return!(!gr(Kn)||!Kn.supports.mail)}var nm;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(nm||(nm={}));const rm="v2";function om(){if(!Bn.printCapabilityEnabled){if(gr(Kn),!um())throw Ht;Bn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(im(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function im(){nn().print()}function am(e){sm(yn(rm,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Tr(e)&&!um())throw Ht}))}function sm(e,t,n){!Tr(t)&&gr(Kn),!Tr(t)&&n&&n(),ms(e,t)}function cm(e){lm(yn(rm,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Tr(e)&&!um())throw Ht}))}function lm(e,t,n){!Tr(t)&&gr(Kn),!Tr(t)&&n&&n(),vs(e,t)}function um(){return!(!gr(Kn)||!Kn.supports.teamsCore)}const dm="v1",fm="v2";function pm(e,t){let n,r;gr(Kn,Mt.content,Mt.task,Mt.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=yn(dm,"people.selectPeople")):(r=e,o=yn(fm,"people.selectPeople")),Gt(gm,n,o,r)}function gm(e,t){return new Promise((n=>{if(!mr(Rn))throw{errorCode:Et.OLD_PLATFORM};if(!Pp(t))throw{errorCode:Et.INVALID_ARGUMENTS};if(!mm())throw Ht;n(Bs(e,"people.selectPeople",t))}))}function mm(){return!(!gr(Kn)||!Kn.supports.people)}function hm(e){return e?e.modality&&"string"!=typeof e.modality?[!1,"modality must be a string"]:e.targetElementBoundingRect&&"object"==typeof e.targetElementBoundingRect?e.triggerType&&"string"==typeof e.triggerType?wm(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function wm(e){return e?e.displayName&&"string"!=typeof e.displayName?[!1,"displayName must be a string"]:e.identifiers&&"object"==typeof e.identifiers?e.identifiers.AadObjectId||e.identifiers.Smtp||e.identifiers.Upn?e.identifiers.AadObjectId&&"string"!=typeof e.identifiers.AadObjectId?[!1,"AadObjectId identifier must be a string"]:e.identifiers.Smtp&&"string"!=typeof e.identifiers.Smtp?[!1,"Smtp identifier must be a string"]:e.identifiers.Upn&&"string"!=typeof e.identifiers.Upn?[!1,"Upn identifier must be a string"]:[!0,void 0]:[!1,"at least one valid identifier must be provided"]:[!1,"persona identifiers object must be provided"]:[!1,"persona object must be provided"]}const vm="v2";function Cm(e){return gr(Kn,Mt.content),new Promise((t=>{const[n,r]=hm(e);if(!n)throw{errorCode:Et.INVALID_ARGUMENTS,message:r};const o={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(Bs(yn(vm,"profile.showProfile"),"profile.showProfile",o))}))}function ym(){return!(!gr(Kn)||!Kn.supports.profile)}const bm="v2",Sm="search.queryChange",Em="search.queryClose",Am="search.queryExecute";function Im(e,t,n){if(gr(Kn,Mt.content),!Pm())throw Ht;ss(yn(bm,"search.registerOnClosedHandler"),Em,e),ss(yn(bm,"search.registerOnExecutedHandler"),Am,t),n&&ss(yn(bm,"search.registerOnChangeHandler"),Sm,n)}function Tm(){if(gr(Kn,Mt.content),!Pm())throw Ht;Zs(yn(bm,"search.unregisterHandlers"),"search.unregister"),cs(Sm),cs(Em),cs(Am)}function Pm(){return!(!gr(Kn)||!Kn.supports.search)}function Om(){return new Promise((e=>{if(gr(Kn,Mt.content),!Pm())throw new Error("Not supported");e(_s(yn(bm,"search.closeSearch"),"search.closeSearch"))}))}var Rm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Fm="v2";function km(){return Rm(this,void 0,void 0,(function*(){if(gr(Kn,Mt.sidePanel,Mt.meetingStage),!Mm())throw Ht;return yield Bs(yn(Fm,"sharing.history.getContent"),"sharing.history.getContent")}))}function Mm(){var e;return gr(Kn)&&void 0!==(null===(e=Kn.supports.sharing)||void 0===e?void 0:e.history)}const Nm="v1",xm="v2",Lm={shareWebContent:"sharing.shareWebContent"};function Um(e,t){try{Hm(e),Vm(e),_m(e)}catch(e){return Jt((()=>Promise.reject(e)),t)}gr(Kn,Mt.content,Mt.sidePanel,Mt.task,Mt.stage,Mt.meetingStage);return Jt(Dm,t,yn(t?Nm:xm,"sharing.shareWebContent"),e)}function Dm(e,t){return new Promise((n=>{if(!Wm())throw Ht;n(Bs(e,Lm.shareWebContent,t))}))}function Hm(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Et.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Vm(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:Et.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:Et.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function _m(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:Et.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:Et.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Wm(){return!(!gr(Kn)||!Kn.supports.sharing)}const Bm="v2";function jm(){return new Promise((e=>{if(gr(Kn,Mt.content),!zm())throw Ht;e(Bs(yn(Bm,"stageView.self.close"),"stageView.self.close"))}))}function zm(){var e;return gr(Kn)&&void 0!==(null===(e=Kn.supports.stageView)||void 0===e?void 0:e.self)}const $m="v2";var qm;function Gm(e){return new Promise((t=>{if(gr(Kn,Mt.content),!Jm())throw Ht;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Bs(yn($m,"stageView.open"),"stageView.open",e))}))}function Jm(){return!(!gr(Kn)||!Kn.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(qm||(qm={}));const Km=10;var Zm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Qm="v2";function Xm(e){return Zm(this,void 0,void 0,(function*(){gr(Kn,Mt.content,Mt.task),th(),nh(e);const t=yield Bs(yn(Qm,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return rh(e.maxVisualMediaCount,t),t}))}function Ym(e){return Zm(this,void 0,void 0,(function*(){gr(Kn,Mt.content,Mt.task),th(),nh(e);const t=yield Bs(yn(Qm,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return rh(e.maxVisualMediaCount,t),t}))}function eh(){return!!(gr(Kn)&&Kn.supports.visualMedia&&Kn.supports.visualMedia.image&&Kn.supports.permissions)}function th(){if(!eh())throw Ht}function nh(e){if(!e||e.maxVisualMediaCount>Km||e.maxVisualMediaCount<1)throw Wt}function rh(e,t){if(t.length>e)throw Bt}const oh="v2";var ih,ah;function sh(){if(gr(Kn,Mt.content,Mt.task),!eh())throw Ht;const e=At.Media;return Bs(yn(oh,"visualMedia.hasPermission"),"permissions.has",e)}function ch(){if(gr(Kn,Mt.content,Mt.task),!eh())throw Ht;const e=At.Media;return Bs(yn(oh,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(ih||(ih={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(ah||(ah={}));var lh=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let uh=null;function dh(){return lh(this,void 0,void 0,(function*(){return null===uh&&(uh=(yield co()).app.host.name),uh}))}var fh=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};function ph(){return fh(this,void 0,void 0,(function*(){if(gr(Kn),!mh())throw Ht;return!(!Kn.isLegacyTeams||Bn.hostClientType!==Ft.android&&Bn.hostClientType!==Ft.ios&&Bn.hostClientType!==Ft.ipados||(yield gh())!==kt.teams)||(yield Vs(yn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function gh(){return fh(this,void 0,void 0,(function*(){return dh()}))}function mh(){return gr(Kn)&&void 0!==Kn.supports.webStorage}const hh="v2";var wh;function vh(e){const t=yn(hh,"call.startCall");return new Promise((n=>{var r;if(gr(Kn,Mt.content,Mt.task),!Ch())throw Ht;if(!Kn.isLegacyTeams)return Zs(t,"call.startCall",[e],n);n(Vs(t,"executeDeepLink",zf(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(wh.Video),e.source)).then((e=>{if(!e)throw new Error(Wn);return e})))}))}function Ch(){return!(!gr(Kn)||!Kn.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(wh||(wh={}));const yh="v1";function bh(){Zi(yn(yh,"appInitialization.notifyAppLoaded"))}function Sh(){Zs(yn(yh,"appInitialization.notifySuccess"),eo.Success,[lr])}function Eh(e){Xi(yn(yh,"appInitialization.notifyFailure"),e)}function Ah(e){Qi(yn(yh,"appInitialization.notifyExpectedFailure"),e)}const Ih=Cn("thirdPartyCloudStorage"),Th="v2";class Ph{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let Oh=[],Rh=null,Fh=!0,kh=null;function Mh(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(gr(Kn,Mt.content,Mt.task),!xh())throw Ht;if(kh)throw kh=null,new Error("getDragAndDropFiles cannot be called twice");kh=t,Fh=!0,Zs(yn(Th,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],Nh)}else{t([],{errorCode:Et.INVALID_ARGUMENTS})}}function Nh(e){if(kh)if(e&&e.error)kh([],e.error),kh=null;else if(e&&e.fileChunk)try{Fh||0!==e.fileChunk.chunkSequence||(Ih("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),Fh=!0,kh([],{errorCode:Et.INTERNAL_ERROR,message:"error occurred while receiving data"}),Oh=[],kh=null);const t=wp(e.fileChunk,e.fileType);if(t?(Rh||(Rh=new Ph(e.fileType,[])),Rh.assembleAttachment.push(t)):(Ih(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),kh?kh([],{errorCode:Et.INTERNAL_ERROR,message:"error occurred while receiving data"}):kh=null,Oh=[],kh=null,Fh=!0),Fh=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&Rh){const t=hp(Rh.assembleAttachment,Rh.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});Oh.push(n)}e.isLastFile&&kh&&(kh(Oh,e.error),Oh=[],kh=null,Fh=!0),Rh=null}}catch(e){kh&&(kh([],{errorCode:Et.INTERNAL_ERROR,message:e}),Oh=[],kh=null,Fh=!0)}else kh([],{errorCode:Et.INTERNAL_ERROR,message:"data received is null"}),Oh=[],kh=null,Fh=!0}function xh(){return!(!gr(Kn)||!Kn.supports.thirdPartyCloudStorage)}const Lh="v1";function Uh(e,t){Ki(yn(Lh,"initialize"),t).then((()=>{e&&e()}))}function Dh(){om()}function Hh(){im()}function Vh(e){pr(),Zs(yn(Lh,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=Bn.frameContext),e(t)}))}function _h(e){oa(yn(Lh,"registerOnThemeChangeHandlerHelper"),e)}function Wh(e){us(yn(Lh,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Bh(e){us(yn(Lh,"registerAppButtonClickHandler"),"appButtonClick",e,[Mt.content])}function jh(e){us(yn(Lh,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[Mt.content])}function zh(e){us(yn(Lh,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[Mt.content])}function $h(e){Qa(yn(Lh,"registerBackButtonHandler"),e)}function qh(e){sm(yn(Lh,"registerOnLoadHandler"),e)}function Gh(e){lm(yn(Lh,"registerBeforeUnloadHandler"),e)}function Jh(e){us(yn(Lh,"registerFocusEnterHandler"),"focusEnter",e,[])}function Kh(e){us(yn(Lh,"registerChangeSettingsHandler"),"changeSettings",e,[Mt.content])}function Zh(e,t){gr(Kn),Da(yn(Lh,"getTabInstances"),t).then((t=>{e(t)}))}function Qh(e,t){gr(Kn),Ha(yn(Lh,"getMruTabInstances"),t).then((t=>{e(t)}))}function Xh(e){Va(yn(Lh,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Yh(e,t){gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage);const n=null!=t?t:jt();ia(yn(Lh,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function ew(e){_a(yn(Lh,"setFrameContext"),e)}function tw(e,t,n){Ki(yn(Lh,"initializeWithFrameContext"),n).then((()=>t&&t())),_a(yn(Lh,"setFrameContext"),e)}const nw="v1";function rw(e){Ua(yn(nw,"navigation.returnFocus"),e)}function ow(e,t){gr(Kn);const n=null!=t?t:jt();La(yn(nw,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function iw(e,t){gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.remove,Mt.task,Mt.stage,Mt.meetingStage);const n=null!=t?t:jt();Na(yn(nw,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function aw(e){gr(Kn);const t=null!=e?e:jt();xa(yn(nw,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const sw="v1";function cw(e){Wa(yn(sw,"settings.setValidityState"),e)}function lw(e){gr(Kn,Mt.content,Mt.settings,Mt.remove,Mt.sidePanel),Ba(yn(sw,"settings.getSettings")).then((t=>{e(t)}))}function uw(e,t){gr(Kn,Mt.content,Mt.settings,Mt.sidePanel);const n=null!=t?t:jt();ja(yn(sw,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function dw(e){Li(yn(sw,"settings.registerOnSaveHandler"),e)}function fw(e){Di(yn(sw,"settings.registerOnRemoveHandler"),e)}var pw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const gw="v1";function mw(e,t){const n=yn(gw,"tasks.startTask"),r=t?e=>{var n,r;return t(null!==(n=e.err)&&void 0!==n?n:"",null!==(r=e.result)&&void 0!==r?r:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),Zs(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?ni(n,Cw(e),r):ti(n,vw(e),r),new rg}function hw(e){e=yw(e);const{width:t,height:n}=e,r=pw(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ei(yn(gw,"tasks.updateTask"),e)}function ww(e,t){ri(yn(gw,"tasks.submitTask"),e,t)}function vw(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:Lt.Small,width:e.width?e.width:Lt.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Cw(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:Lt.Small,width:e.width?e.width:Lt.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function yw(e){return e.height=e.height?e.height:Lt.Small,e.width=e.width?e.width:Lt.Small,e}const bw="v2";var Sw,Ew;function Aw(){return!(!gr(Kn,Mt.meetingStage,Mt.sidePanel,Mt.content)||!Kn.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Sw||(Sw={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Ew||(Ew={}));class Iw{getFluidTenantInfo(){return Tw(),new Promise((e=>{e(Bs(yn(bw,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return Tw(),new Promise((e=>{e(Bs(yn(bw,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return Tw(),new Promise((e=>{e(Bs(yn(bw,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return Tw(),new Iw}}function Tw(){if(!Aw())throw new Error("LiveShareHost Not supported")}var Pw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Ow(e){try{return e.cartItems=Rw(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Rw(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Rw(e.accessories)),e}))}const Fw=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=Pw(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Fw(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function kw(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)Nw(t),Mw(t.accessories)}function Mw(e){if(null!=e){if(!Array.isArray(e)||0===e.length)throw new Error("CartItem.accessories must be a non-empty array");for(const t of e){if(t.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");Nw(t)}}}function Nw(e){if(!e.id)throw new Error("cartItem.id must not be empty");if(!e.name)throw new Error("cartItem.name must not be empty");Lw(e.price),Uw(e.quantity)}function xw(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===Ct(e))throw new Error("id must be a valid UUID")}}function Lw(e){if("number"!=typeof e||e<0)throw new Error(`price ${e} must be a number not less than 0`);if(parseFloat(e.toFixed(3))!==e)throw new Error(`price ${e} must have at most 3 decimal places`)}function Uw(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Dw(e){if(!Object.values(Ww).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Hw="v2",Vw={majorVersion:1,minorVersion:1};var _w,Ww;function Bw(){if(gr(Kn,Mt.content,Mt.task),!qw())throw Ht;return Bs(yn(Hw,"marketplace.getCart"),"marketplace.getCart",Vw).then(Ow)}function jw(e){if(gr(Kn,Mt.content,Mt.task),!qw())throw Ht;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return xw(null==e?void 0:e.cartId),kw(null==e?void 0:e.cartItems),Bs(yn(Hw,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Fw(e.cartItems),cartVersion:Vw})).then(Ow)}function zw(e){if(gr(Kn,Mt.content,Mt.task),!qw())throw Ht;if(!e)throw new Error("removeCartItemsParams must be provided");if(xw(null==e?void 0:e.cartId),!Array.isArray(null==e?void 0:e.cartItemIds)||0===(null==e?void 0:e.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return Bs(yn(Hw,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Vw})).then(Ow)}function $w(e){if(gr(Kn,Mt.content,Mt.task),!qw())throw Ht;if(!e)throw new Error("updateCartStatusParams must be provided");return xw(null==e?void 0:e.cartId),Dw(null==e?void 0:e.cartStatus),Bs(yn(Hw,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Vw})).then(Ow)}function qw(){return!(!gr(Kn)||!Kn.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(_w||(_w={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Ww||(Ww={}))})(),r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],l=i[1],u=new o(c(e,a,l)),d=0,f=l>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[d++]=t>>16&255,u[d++]=t>>8&255,u[d++]=255&t;2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[d++]=255&t);1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[d++]=t>>8&255,u[d++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function l(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function u(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(l(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},815:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function c(e){var i=Math.abs(e);return i>=o?l(e,i,o,"day"):i>=r?l(e,i,r,"hour"):i>=n?l(e,i,n,"minute"):i>=t?l(e,i,t,"second"):e+" ms"}function l(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>bt,AppId:()=>Ir,ChannelType:()=>Ut,ChildAppWindow:()=>rg,DialogDimension:()=>Lt,EduType:()=>Ot,EmailAddress:()=>Of,ErrorCode:()=>Et,FileOpenPreference:()=>yt,FrameContexts:()=>Mt,HostClientType:()=>Ft,HostName:()=>kt,LiveShareHost:()=>Iw,NotificationTypes:()=>Lc,ParentAppWindow:()=>og,SecondaryM365ContentIdName:()=>St,TaskModuleDimension:()=>Lt,TeamType:()=>Nt,UserSettingTypes:()=>Dc,UserTeamRole:()=>xt,ViewerActionTypes:()=>Uc,app:()=>i,appEntity:()=>D,appInitialization:()=>Ce,appInstallDialog:()=>q,authentication:()=>a,barCode:()=>J,calendar:()=>ie,call:()=>ve,chat:()=>K,clipboard:()=>Z,conversations:()=>E,copilot:()=>I,dialog:()=>p,enablePrintCapability:()=>Dh,executeDeepLink:()=>Yh,externalAppAuthentication:()=>T,externalAppAuthenticationForCEA:()=>P,externalAppCardActions:()=>O,externalAppCardActionsForCEA:()=>R,externalAppCommands:()=>F,files:()=>k,geoLocation:()=>Y,getAdaptiveCardSchemaVersion:()=>tg,getContext:()=>Vh,getMruTabInstances:()=>Qh,getTabInstances:()=>Zh,hostEntity:()=>z,initialize:()=>Uh,initializeWithFrameContext:()=>tw,liveShare:()=>Ee,location:()=>te,logs:()=>S,mail:()=>ae,marketplace:()=>Ae,media:()=>G,meeting:()=>re,meetingRoom:()=>M,menus:()=>g,messageChannels:()=>N,monetization:()=>oe,navigateBack:()=>aw,navigateCrossDomain:()=>iw,navigateToTab:()=>ow,nestedAppAuth:()=>Q,notifications:()=>x,openFilePreview:()=>zc,otherAppStateChange:()=>L,pages:()=>y,people:()=>ce,print:()=>Hh,profile:()=>le,registerAppButtonClickHandler:()=>Bh,registerAppButtonHoverEnterHandler:()=>jh,registerAppButtonHoverLeaveHandler:()=>zh,registerBackButtonHandler:()=>$h,registerBeforeUnloadHandler:()=>Gh,registerChangeSettingsHandler:()=>Kh,registerCustomHandler:()=>Bc,registerFocusEnterHandler:()=>Jh,registerFullScreenHandler:()=>Wh,registerOnLoadHandler:()=>qh,registerOnThemeChangeHandler:()=>_h,registerUserSettingsChangeHandler:()=>jc,remoteCamera:()=>U,returnFocus:()=>rw,search:()=>ue,secondaryBrowser:()=>ee,sendCustomEvent:()=>Wc,sendCustomMessage:()=>_c,setFrameContext:()=>ew,settings:()=>be,shareDeepLink:()=>Xh,sharing:()=>fe,stageView:()=>ge,store:()=>$,tasks:()=>Se,teams:()=>_,teamsCore:()=>se,thirdPartyCloudStorage:()=>ye,uploadCustomApp:()=>Vc,version:()=>lr,videoEffects:()=>W,videoEffectsEx:()=>B,visualMedia:()=>he,webStorage:()=>we});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>Br,getTelemetryPort:()=>_r,isSupported:()=>Wr});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Kr,getDataLayerPort:()=>Gr,isSupported:()=>Jr});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Zr,registerOnResumeHandler:()=>Qr});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>no,FailedReason:()=>to,Messages:()=>eo,_initialize:()=>ao,_uninitialize:()=>so,getContext:()=>co,getFrameContext:()=>oo,initialize:()=>io,isInitialized:()=>ro,lifecycle:()=>o,notifyAppLoaded:()=>lo,notifyExpectedFailure:()=>po,notifyFailure:()=>fo,notifySuccess:()=>uo,openLink:()=>ho,registerHostToAppPerformanceMetricsHandler:()=>mo,registerOnThemeChangeHandler:()=>go});var a={};n.r(a),n.d(a,{DataResidency:()=>Vo,authenticate:()=>Io,getAuthToken:()=>Po,getUser:()=>Ro,initialize:()=>Eo,notifyFailure:()=>Uo,notifySuccess:()=>Lo,registerAuthenticationHandlers:()=>Ao});var s={};n.r(s),n.d(s,{isSupported:()=>Wo,resize:()=>_o});var c={};n.r(c),n.d(c,{isSupported:()=>jo,open:()=>Bo});var l={};n.r(l),n.d(l,{isSupported:()=>Go,registerOnMessageFromParent:()=>qo,sendMessageToDialog:()=>$o,sendMessageToParentFromDialog:()=>zo});var u={};n.r(u),n.d(u,{bot:()=>c,getDialogInfoFromBotUrlDialogInfo:()=>Xo,getDialogInfoFromUrlDialogInfo:()=>Qo,isSupported:()=>Zo,open:()=>Jo,parentCommunication:()=>l,submit:()=>Ko});var d={};n.r(d),n.d(d,{isSupported:()=>li,open:()=>ci});var f={};n.r(f),n.d(f,{bot:()=>d,isSupported:()=>di,open:()=>ui});var p={};n.r(p),n.d(p,{adaptiveCard:()=>f,initialize:()=>fi,isSupported:()=>pi,update:()=>s,url:()=>u});var g={};n.r(g),n.d(g,{DisplayMode:()=>mi,MenuItem:()=>wi,MenuListType:()=>hi,initialize:()=>Ei,isSupported:()=>Fi,setNavBarMenu:()=>Ti,setUpViews:()=>Ai,showActionMenu:()=>Oi});var m={};n.r(m),n.d(m,{initialize:()=>ki,isSupported:()=>ji,registerChangeConfigHandler:()=>Vi,registerOnRemoveHandler:()=>Ui,registerOnRemoveHandlerHelper:()=>Di,registerOnSaveHandler:()=>xi,registerOnSaveHandlerHelper:()=>Li,setConfig:()=>Ni,setValidityState:()=>Mi});var h={};n.r(h),n.d(h,{isSupported:()=>la,onClick:()=>aa,onHoverEnter:()=>sa,onHoverLeave:()=>ca});var w={};n.r(w),n.d(w,{isSupported:()=>fa,navigateTo:()=>ua,navigateToDefaultPage:()=>da});var v={};n.r(v),n.d(v,{enterFullscreen:()=>pa,exitFullscreen:()=>ga,isSupported:()=>ma});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>va,getTabInstances:()=>wa,isSupported:()=>Ca,navigateToTab:()=>ha});var y={};n.r(y),n.d(y,{EnterFocusType:()=>ya,ReturnFocusType:()=>ba,appButton:()=>h,backStack:()=>b,config:()=>m,currentApp:()=>w,fullTrust:()=>v,getConfig:()=>Ta,initializeWithFrameContext:()=>Ia,isSupported:()=>ka,navigateCrossDomain:()=>Pa,navigateToApp:()=>Oa,registerFocusEnterHandler:()=>Ea,registerFullScreenHandler:()=>Fa,returnFocus:()=>Sa,setCurrentFrame:()=>Aa,shareDeepLink:()=>Ra,tabs:()=>C});var b={};n.r(b),n.d(b,{_initialize:()=>Ja,isSupported:()=>Ya,navigateBack:()=>Ka,registerBackButtonHandler:()=>Za,registerBackButtonHandlerHelper:()=>Qa});var S={};n.r(S),n.d(S,{isSupported:()=>xc,registerGetLogHandler:()=>Nc});var E={};n.r(E),n.d(E,{closeConversation:()=>Gc,getChatMembers:()=>Jc,isSupported:()=>Kc,openConversation:()=>qc});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>el,isSupported:()=>Yc});var I={};n.r(I),n.d(I,{eligibility:()=>A});var T={};n.r(T),n.d(T,{ActionExecuteInvokeRequestType:()=>il,ActionExecuteResponseHandler:()=>ll,InvokeErrorCode:()=>cl,InvokeResponseType:()=>sl,OriginalRequestType:()=>al,SerializableActionExecuteInvokeRequest:()=>rl,authenticateAndResendRequest:()=>gl,authenticateWithOauth2:()=>wl,authenticateWithPowerPlatformConnectorPlugins:()=>vl,authenticateWithSSO:()=>ml,authenticateWithSSOAndResendRequest:()=>hl,isActionExecuteResponse:()=>ol,isInvokeError:()=>ul,isSupported:()=>Cl,validateActionExecuteInvokeRequest:()=>fl});var P={};n.r(P),n.d(P,{authenticateAndResendRequest:()=>Al,authenticateWithOauth:()=>El,authenticateWithSSO:()=>Sl,authenticateWithSSOAndResendRequest:()=>Il,isSupported:()=>Tl,validateInput:()=>Pl});var O={};n.r(O),n.d(O,{ActionOpenUrlErrorCode:()=>Fl,ActionOpenUrlType:()=>Rl,isSupported:()=>Nl,processActionOpenUrl:()=>Ml,processActionSubmit:()=>kl});var R={};n.r(R),n.d(R,{isSupported:()=>Hl,processActionOpenUrl:()=>Ul,processActionSubmit:()=>Dl});var F={};n.r(F),n.d(F,{isSupported:()=>Bl,processActionCommand:()=>Wl});var k={};n.r(k),n.d(k,{CloudStorageProvider:()=>zl,CloudStorageProviderFileAction:()=>Kl,CloudStorageProviderType:()=>$l,DocumentLibraryAccessType:()=>Gl,FileDownloadStatus:()=>Jl,SpecialDocumentLibraryType:()=>ql,addCloudStorageFolder:()=>Ql,addCloudStorageProvider:()=>iu,addCloudStorageProviderFile:()=>su,copyMoveFiles:()=>nu,deleteCloudStorageFolder:()=>Xl,deleteCloudStorageProviderFile:()=>lu,downloadCloudStorageProviderFile:()=>uu,getCloudStorageFolderContents:()=>Yl,getCloudStorageFolders:()=>Zl,getExternalProviders:()=>tu,getFileDownloads:()=>ru,openCloudStorageFile:()=>eu,openDownloadFolder:()=>ou,registerCloudStorageProviderContentChangeHandler:()=>pu,registerCloudStorageProviderListChangeHandler:()=>fu,removeCloudStorageProvider:()=>au,renameCloudStorageProviderFile:()=>cu,uploadCloudStorageProviderFile:()=>du});var M={};n.r(M),n.d(M,{getPairedMeetingRoomInfo:()=>hu,isSupported:()=>yu,registerMeetingRoomCapabilitiesUpdateHandler:()=>vu,registerMeetingRoomStatesUpdateHandler:()=>Cu,sendCommandToPairedMeetingRoom:()=>wu});var N={};n.r(N),n.d(N,{dataLayer:()=>t,isSupported:()=>bu,telemetry:()=>e});var x={};n.r(x),n.d(x,{isSupported:()=>Au,showNotification:()=>Eu});var L={};n.r(L),n.d(L,{isSupported:()=>Ru,notifyInstallCompleted:()=>Ou,registerAppInstallationHandler:()=>Tu,unregisterAppInstallationHandler:()=>Pu});var U={};n.r(U),n.d(U,{ControlCommand:()=>ku,ErrorReason:()=>Mu,SessionTerminatedReason:()=>Nu,getCapableParticipants:()=>xu,isSupported:()=>Bu,registerOnCapableParticipantsChangeHandler:()=>Hu,registerOnDeviceStateChangeHandler:()=>_u,registerOnErrorHandler:()=>Vu,registerOnSessionStatusChangeHandler:()=>Wu,requestControl:()=>Lu,sendControlCommand:()=>Uu,terminateSession:()=>Du});var D={};n.r(D),n.d(D,{isSupported:()=>$u,selectAppEntity:()=>zu});var H={};n.r(H),n.d(H,{getUserJoinedTeams:()=>Gu,isSupported:()=>Ju});var V={};n.r(V),n.d(V,{getConfigSetting:()=>Zu,isSupported:()=>Qu,joinedTeams:()=>H});var _={};n.r(_),n.d(_,{ChannelType:()=>Yu,fullTrust:()=>V,getTeamChannels:()=>ed,isSupported:()=>nd,refreshSiteUrl:()=>td});var W={};n.r(W),n.d(W,{EffectChangeType:()=>fd,EffectFailureReason:()=>pd,VideoFrameFormat:()=>dd,isSupported:()=>Cd,notifySelectedVideoEffectChanged:()=>md,registerForVideoEffect:()=>hd,registerForVideoFrame:()=>gd});var B={};n.r(B),n.d(B,{ErrorLevel:()=>jd,frameProcessingTimeoutInMs:()=>Wd,isSupported:()=>Qd,notifyFatalError:()=>ef,notifySelectedVideoEffectChanged:()=>Jd,registerForVideoEffect:()=>Kd,registerForVideoFrame:()=>zd,updatePersonalizedEffects:()=>Zd});var j={};n.r(j),n.d(j,{addAndConfigure:()=>lf,getAll:()=>uf,isSupported:()=>gf,reconfigure:()=>df,remove:()=>pf,rename:()=>ff});var z={};n.r(z),n.d(z,{AppTypes:()=>wf,isSupported:()=>vf,tab:()=>j});var $={};n.r($),n.d($,{StoreDialogType:()=>bf,errorInvalidDialogType:()=>Sf,errorMissingAppId:()=>Ef,errorMissingCollectionId:()=>Af,isSupported:()=>Tf,openStoreExperience:()=>If});var q={};n.r(q),n.d(q,{isSupported:()=>Kf,openAppInstallDialog:()=>Jf});var G={};n.r(G),n.d(G,{CameraStartMode:()=>ep,File:()=>ip,FileFormat:()=>Xf,ImageOutputFormats:()=>op,ImageUriType:()=>rp,Media:()=>up,MediaControllerEvent:()=>Yf,MediaType:()=>np,Source:()=>tp,VideoController:()=>fp,captureImage:()=>ap,hasPermission:()=>sp,requestPermission:()=>cp,scanBarCode:()=>mp,selectMedia:()=>pp,viewImages:()=>gp});var J={};n.r(J),n.d(J,{hasPermission:()=>Fp,isSupported:()=>Mp,requestPermission:()=>kp,scanBarCode:()=>Rp});var K={};n.r(K),n.d(K,{isSupported:()=>Dp,openChat:()=>xp,openGroupChat:()=>Up});var Z={};n.r(Z),n.d(Z,{isSupported:()=>Bp,read:()=>Wp,write:()=>_p});var Q={};n.r(Q),n.d(Q,{isNAAChannelRecommended:()=>jp});var X={};n.r(X),n.d(X,{chooseLocation:()=>Gp,isSupported:()=>Kp,showLocation:()=>Jp});var Y={};n.r(Y),n.d(Y,{getCurrentLocation:()=>Qp,hasPermission:()=>Xp,isSupported:()=>eg,map:()=>X,requestPermission:()=>Yp});var ee={};n.r(ee),n.d(ee,{isSupported:()=>sg,open:()=>ag});var te={};n.r(te),n.d(te,{getLocation:()=>lg,isSupported:()=>dg,showLocation:()=>ug});var ne={};n.r(ne),n.d(ne,{setOptions:()=>pg});var re={};n.r(re),n.d(re,{CallType:()=>Cg,EventActionSource:()=>bg,MeetingReactionType:()=>wg,MeetingType:()=>vg,SharingProtocol:()=>yg,appShareButton:()=>ne,getAppContentStageSharingCapabilities:()=>Mg,getAppContentStageSharingState:()=>xg,getAuthenticationTokenForAnonymousUser:()=>Tg,getIncomingClientAudioState:()=>Sg,getLiveStreamState:()=>Pg,getMeetingDetails:()=>Ag,getMeetingDetailsVerbose:()=>Ig,joinMeeting:()=>Hg,registerLiveStreamChangedHandler:()=>Fg,registerMeetingReactionReceivedHandler:()=>Dg,registerRaiseHandStateChangedHandler:()=>Ug,registerSpeakingStateChangeHandler:()=>Lg,requestAppAudioHandling:()=>Vg,requestStartLiveStreaming:()=>Og,requestStopLiveStreaming:()=>Rg,shareAppContentToStage:()=>kg,stopSharingAppContentToStage:()=>Ng,toggleIncomingClientAudio:()=>Eg,updateMicState:()=>Bg});var oe={};n.r(oe),n.d(oe,{isSupported:()=>Gg,openPurchaseExperience:()=>qg});var ie={};n.r(ie),n.d(ie,{composeMeeting:()=>Zg,isSupported:()=>Qg,openCalendarItem:()=>Kg});var ae={};n.r(ae),n.d(ae,{ComposeMailType:()=>nm,composeMail:()=>em,isSupported:()=>tm,openMailItem:()=>Yg});var se={};n.r(se),n.d(se,{enablePrintCapability:()=>om,isSupported:()=>um,print:()=>im,registerBeforeUnloadHandler:()=>cm,registerBeforeUnloadHandlerHelper:()=>lm,registerOnLoadHandler:()=>am,registerOnLoadHandlerHelper:()=>sm});var ce={};n.r(ce),n.d(ce,{isSupported:()=>mm,selectPeople:()=>pm});var le={};n.r(le),n.d(le,{isSupported:()=>ym,showProfile:()=>Cm});var ue={};n.r(ue),n.d(ue,{closeSearch:()=>Om,isSupported:()=>Pm,registerHandlers:()=>Im,unregisterHandlers:()=>Tm});var de={};n.r(de),n.d(de,{getContent:()=>km,isSupported:()=>Mm});var fe={};n.r(fe),n.d(fe,{SharingAPIMessages:()=>Lm,history:()=>de,isSupported:()=>Wm,shareWebContent:()=>Um});var pe={};n.r(pe),n.d(pe,{close:()=>jm,isSupported:()=>zm});var ge={};n.r(ge),n.d(ge,{StageViewOpenMode:()=>qm,isSupported:()=>Jm,open:()=>Gm,self:()=>pe});var me={};n.r(me),n.d(me,{captureImages:()=>Xm,isSupported:()=>eh,retrieveImages:()=>Ym});var he={};n.r(he),n.d(he,{CameraRestriction:()=>ih,Source:()=>ah,hasPermission:()=>sh,image:()=>me,requestPermission:()=>ch});var we={};n.r(we),n.d(we,{isSupported:()=>mh,isWebStorageClearedOnUserLogOut:()=>ph});var ve={};n.r(ve),n.d(ve,{CallModalities:()=>wh,isSupported:()=>Ch,startCall:()=>vh});var Ce={};n.r(Ce),n.d(Ce,{ExpectedFailureReason:()=>no,FailedReason:()=>to,Messages:()=>eo,notifyAppLoaded:()=>bh,notifyExpectedFailure:()=>Ah,notifyFailure:()=>Eh,notifySuccess:()=>Sh});var ye={};n.r(ye),n.d(ye,{getDragAndDropFiles:()=>Mh,isSupported:()=>xh});var be={};n.r(be),n.d(be,{getSettings:()=>lw,registerOnRemoveHandler:()=>fw,registerOnSaveHandler:()=>dw,setSettings:()=>uw,setValidityState:()=>cw});var Se={};n.r(Se),n.d(Se,{getDefaultSizeIfNotProvided:()=>yw,startTask:()=>mw,submitTask:()=>ww,updateTask:()=>hw});var Ee={};n.r(Ee),n.d(Ee,{ContainerState:()=>Ew,LiveShareHost:()=>Iw,UserMeetingRole:()=>Sw,isSupported:()=>Aw});var Ae={};n.r(Ae),n.d(Ae,{CartStatus:()=>Ww,Intent:()=>_w,addOrUpdateCartItems:()=>jw,cartVersion:()=>Vw,getCart:()=>Bw,isSupported:()=>qw,removeCartItems:()=>zw,updateCartStatus:()=>$w});var Ie=n(815),Te=n(933);const Pe=Re,Oe=2147483647;function Re(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return ke(e)}return Fe(e,t,n)}function Fe(e,t,n){if("string"==typeof e)return Le(e,t);if(ArrayBuffer.isView(e))return Be(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(De(e,ArrayBuffer)||e&&De(e.buffer,ArrayBuffer))return je(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(De(e,SharedArrayBuffer)||e&&De(e.buffer,SharedArrayBuffer)))return je(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return Re.from(r,t,n);const o=ut(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return Re.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function ke(e){return Me(e),Ne(e<0?0:0|xe(e))}function Me(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Ne(e){if(e>Oe)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,Re.prototype),t}function xe(e){if(e>=Oe)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Oe.toString(16)+" bytes");return 0|e}function Le(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Re.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|Ue(e,t);let r=Ne(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function Ue(e,t){if(Re.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||De(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return He(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Ve(e).length;default:if(o)return r?-1:He(e).length;t=(""+t).toLowerCase(),o=!0}}function De(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function He(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Ve(e){return Te.toByteArray(We(e))}Re.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),Re.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),Re.from=function(e,t,n){return Fe(e,t,n)},Object.setPrototypeOf(Re.prototype,Uint8Array.prototype),Object.setPrototypeOf(Re,Uint8Array),Re.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Re.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==Re.prototype};const _e=/[^+/0-9A-Za-z-_]/g;function We(e){if((e=(e=e.split("=")[0]).trim().replace(_e,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Be(e){if(De(e,Uint8Array)){const t=new Uint8Array(e);return je(t.buffer,t.byteOffset,t.byteLength)}return ze(e)}function je(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,Re.prototype),r}function ze(e){const t=e.length<0?0:0|xe(e.length),n=Ne(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function $e(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return Je(r)}function qe(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ke(this,t,n);case"utf8":case"utf-8":return $e(this,t,n);case"ascii":return Ze(this,t,n);case"latin1":case"binary":return Qe(this,t,n);case"base64":return Xe(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ye(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}Re.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?$e(this,0,e):qe.apply(this,arguments)};const Ge=4096;function Je(e){const t=e.length;if(t<=Ge)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ge));return n}function Ke(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=lt[e[r]];return o}function Ze(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function Qe(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function Xe(e,t,n){return 0===t&&n===e.length?Te.fromByteArray(e):Te.fromByteArray(e.slice(t,n))}function Ye(e,t,n){const r=e.slice(t,n);let o="";for(let e=0;e<r.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function et(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(ct(r))return a;e[n+a]=r}return a}function tt(e,t,n,r){return st(He(t,e.length-n),e,n,r)}function nt(e,t,n,r){return st(it(t),e,n,r)}function rt(e,t,n,r){return st(Ve(t),e,n,r)}function ot(e,t,n,r){return st(at(t,e.length-n),e,n,r)}function it(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function at(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function st(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function ct(e){return e!=e}Re.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return et(this,e,t,n);case"utf8":case"utf-8":return tt(this,e,t,n);case"ascii":case"latin1":case"binary":return nt(this,e,t,n);case"base64":return rt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const lt=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function ut(e){if(Re.isBuffer(e)){const t=0|xe(e.length),n=Ne(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||ct(e.length)?Ne(0):ze(e):"Buffer"===e.type&&Array.isArray(e.data)?ze(e.data):void 0}const dt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ft;const pt=new Uint8Array(16);function gt(){if(!ft&&(ft="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ft))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ft(pt)}const mt=[];for(let e=0;e<256;++e)mt.push((e+256).toString(16).slice(1));function ht(e,t=0){return mt[e[t+0]]+mt[e[t+1]]+mt[e[t+2]]+mt[e[t+3]]+"-"+mt[e[t+4]]+mt[e[t+5]]+"-"+mt[e[t+6]]+mt[e[t+7]]+"-"+mt[e[t+8]]+mt[e[t+9]]+"-"+mt[e[t+10]]+mt[e[t+11]]+mt[e[t+12]]+mt[e[t+13]]+mt[e[t+14]]+mt[e[t+15]]}const wt=function(e,t,n){if(dt.randomUUID&&!t&&!e)return dt.randomUUID();const r=(e=e||{}).random||(e.rng||gt)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return ht(r)},vt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const Ct=function(e){return"string"==typeof e&&vt.test(e)};var yt,bt,St,Et,At,It,Tt,Pt,Ot,Rt,Ft,kt,Mt,Nt,xt,Lt,Ut;function Dt(e){return void 0!==(null==e?void 0:e.errorCode)}!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(yt||(yt={})),function(e){e.M365Content="m365content"}(bt||(bt={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(St||(St={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(Et||(Et={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(At||(At={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(It||(It={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Tt||(Tt={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(Pt||(Pt={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Ot||(Ot={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Rt||(Rt={})),function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(Ft||(Ft={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(kt||(kt={})),function(e){e.settings="settings",e.content="content",e.authentication="authentication",e.remove="remove",e.task="task",e.sidePanel="sidePanel",e.stage="stage",e.meetingStage="meetingStage"}(Mt||(Mt={})),function(e){e[e.Standard=0]="Standard",e[e.Edu=1]="Edu",e[e.Class=2]="Class",e[e.Plc=3]="Plc",e[e.Staff=4]="Staff"}(Nt||(Nt={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(xt||(xt={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(Lt||(Lt={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(Ut||(Ut={}));const Ht={errorCode:Et.NOT_SUPPORTED_ON_PLATFORM},Vt={majorVersion:1,minorVersion:5},_t={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},Wt=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),Bt=new Error("Invalid response: Received more images than the specified max limit in the response.");function jt(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function zt(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const n=e.split("."),r=t.split(".");function o(e){return/^\d+$/.test(e)}if(!n.every(o)||!r.every(o))return NaN;for(;n.length<r.length;)n.push("0");for(;r.length<n.length;)r.push("0");for(let e=0;e<n.length;++e)if(Number(n[e])!=Number(r[e]))return Number(n[e])>Number(r[e])?1:-1;return 0}function $t(){return wt()}function qt(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&qt(e[t])})),Object.freeze(e)}function Gt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function Jt(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function Kt(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Zt(e,t,n){return new Promise(((r,o)=>{const i=setTimeout(o,t,n);e().then((e=>{clearTimeout(i),r(e)})).catch((e=>{clearTimeout(i),o(e)}))}))}function Qt(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId.toString())+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl.toString()),(e.chatId||e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({chatId:e.chatId,channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function Xt(e){return!(zt(`${e.majorVersion}.${e.minorVersion}`,`${Vt.majorVersion}.${Vt.minorVersion}`)>=0)}function Yt(e){return"https:"===e.protocol}function en(e,t){return new Promise(((n,r)=>{if(e||r("MimeType cannot be null or empty."),t||r("Base64 string cannot be null or empty."),e.startsWith("image/")){const r=atob(t),o=new Uint8Array(r.length);for(let e=0;e<r.length;e++)o[e]=r.charCodeAt(e);n(new Blob([o],{type:e}))}const o=Pe.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function tn(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function nn(){if(rn())throw new Error("window object undefined at SSR check");return window}function rn(){return"undefined"==typeof window}function on(e,t){if(cn(e)||!ln(e)||!un(e))throw t||new Error("id is not valid.")}function an(e,t){const n=e.toString().toLocaleLowerCase();if(cn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Yt(e))throw t||new Error("Url should be a valid https url")}function sn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function cn(e){return new RegExp(`${/<script[^>]*>|&lt;script[^&]*&gt;|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|&lt;\/script[^&]*&gt;|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function ln(e){return e.length<256&&e.length>4}function un(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function dn(e){if(!e)throw new Error("id must not be empty");if(!1===Ct(e))throw new Error("id must be a valid UUID")}const fn=!!performance&&"now"in performance;function pn(){return fn?performance.now()+performance.timeOrigin:void 0}function gn(e,t=0){if(t>1e3)return!1;if(void 0===e||"boolean"==typeof e||"number"==typeof e||"bigint"==typeof e||"string"==typeof e||null===e)return!0;if(Array.isArray(e))return e.every((e=>gn(e,t+1)));return!("object"!=typeof e||"[object Object]"!==Object.prototype.toString.call(e)||Object.getPrototypeOf(e)!==Object.prototype&&null!==Object.getPrototypeOf(e))&&Object.keys(e).every((n=>gn(e[n],t+1)))}class mn{constructor(e=$t()){this.uuid=e,dn(e)}toString(){return this.uuid}}const hn=new mn,wn=Ie.debug.formatArgs;Ie.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${hn.toString()}]`,wn.call(this,e)};const vn=(0,Ie.debug)("teamsJs");function Cn(e){return vn.extend(e)}function yn(e,t){return`${e}_${t}`}function bn(e){return/^v\d+_[\w.]+$/.test(e)}const Sn=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const En="2.0.1",An="2.0.2",In="2.0.3",Tn="2.0.4",Pn="2.0.1",On="1.9.0",Rn="2.0.0",Fn="1.7.0",kn="1.8.0",Mn="1.9.0",Nn=n.t(Sn,2).validOrigins,xn=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),Ln=/^https:\/\//,Un="https",Dn="teams.microsoft.com",Hn="The library has not yet been initialized",Vn="The runtime has not yet been initialized",_n="The runtime version is not supported",Wn="The call was not properly started";class Bn{}Bn.initializeCalled=!1,Bn.initializeCompleted=!1,Bn.additionalValidOrigins=[],Bn.initializePromise=void 0,Bn.isFramelessWindow=!1,Bn.frameContext=void 0,Bn.hostClientType=void 0,Bn.printCapabilityEnabled=!1;var jn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const zn=Cn("runtime"),$n=4;function qn(e){return e.apiVersion===$n}const Gn={apiVersion:-1,supports:{}};function Jn(e){if(qn(e))return!0;throw-1===e.apiVersion?new Error(Vn):new Error(_n)}let Kn=Gn;const Zn={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:_t,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},Qn=[Ft.desktop,Ft.web,Ft.rigel,Ft.surfaceHub,Ft.teamsRoomsWindows,Ft.teamsRoomsAndroid,Ft.teamsPhones,Ft.teamsDisplays],Xn=[Ft.android,Ft.ios,Ft.ipados],Yn=[...Qn,...Xn];function er(e){let t=e;if(t.apiVersion<$n&&tr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),qn(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const tr=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,r=jn(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:r})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,r,o,i;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(r=null===(n=e.supports.dialog)||void 0===n?void 0:n.url)||void 0===r?void 0:r.bot,parentCommunication:(null===(o=e.supports.dialog)||void 0===o?void 0:o.url)?{}:void 0},update:null===(i=e.supports.dialog)||void 0===i?void 0:i.update}:void 0})}}}],nr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:Qn}],"1.9.0":[{capability:{location:{}},hostClientTypes:Yn}],"2.0.0":[{capability:{people:{}},hostClientTypes:Yn},{capability:{sharing:{}},hostClientTypes:[Ft.desktop,Ft.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[Ft.android,Ft.desktop,Ft.ios,Ft.teamsRoomsAndroid,Ft.teamsPhones,Ft.teamsDisplays,Ft.web]},{capability:{webStorage:{}},hostClientTypes:[Ft.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[Ft.android,Ft.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[Ft.android,Ft.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[Ft.android,Ft.ios,Ft.ipados]}]},rr=zn.extend("generateBackCompatRuntimeConfig");function or(e,t){const n=Object.assign({},e);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&("object"!=typeof t[r]||Array.isArray(t[r])?r in e||(n[r]=t[r]):n[r]=or(e[r]||{},t[r]));return n}function ir(e,t,n){rr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);rr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{zt(e,t)>=0&&n[t].forEach((e=>{void 0!==Bn.hostClientType&&e.hostClientTypes.includes(Bn.hostClientType)&&(r=or(r,e.capability))}))}));const o={apiVersion:$n,hostVersionsInfo:_t,isLegacyTeams:!0,supports:r};return rr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const ar=zn.extend("applyRuntimeConfig");function sr(e){"string"==typeof e.apiVersion&&(ar("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),ar("Fast-forwarding runtime %o",e);const t=er(e);ar("Applying runtime %o",t),Kn=qt(t)}function cr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const lr="2.32.0-beta.2",ur=Cn("internal"),dr=ur.extend("ensureInitializeCalled"),fr=ur.extend("ensureInitialized");function pr(){if(!Bn.initializeCalled)throw dr(Hn),new Error(Hn)}function gr(e,...t){if(!Bn.initializeCompleted)throw fr("%s. initializeCalled: %s",Hn,Bn.initializeCalled.toString()),new Error(Hn);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Bn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Bn.frameContext}".`)}return Jn(e)}function mr(e=En){const t=zt(Bn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function hr(){return Bn.hostClientType==Ft.android||Bn.hostClientType==Ft.ios||Bn.hostClientType==Ft.ipados}function wr(e=En){if(!hr()){throw{errorCode:Et.NOT_SUPPORTED_ON_PLATFORM}}if(!mr(e)){throw{errorCode:Et.OLD_PLATFORM}}}function vr(e){let t=Bn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&Ln.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),Bn.additionalValidOrigins=t}function Cr(e){if(cn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(!Sr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${yr}-${br}).`);if(Er(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const yr=4,br=256;function Sr(e){return e.length<br&&e.length>yr}function Er(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Ar(e){if(!(e instanceof Ir))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Ir{constructor(e){this.appIdAsString=e,Cr(e)}serialize(){return this.toString()}toString(){return this.appIdAsString}}function Tr(e){return null==e}var Pr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let Or=[];const Rr=Cn("validateOrigin");function Fr(){return Pr(this,void 0,void 0,(function*(){yield Mr()}))}function kr(){return 0===Or.length}function Mr(){return Pr(this,void 0,void 0,(function*(){return kr()?rn()?(Or=Nn,Nn):fetch(xn).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(Nr(JSON.stringify(e)))return Or=e.validOrigins,Or;throw new Error("Valid Origins List Is Invalid")}))})).catch((e=>(Rr("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Or=Nn,Or))):Or}))}function Nr(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return Rr("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function xr(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function Lr(e){return Mr().then((t=>{if(!Yt(e))return Rr("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>xr(e,n))))return!0;for(const e of Bn.additionalValidOrigins){if(xr("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return Rr("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,Bn.additionalValidOrigins),!1}))}var Ur=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let Dr;const Hr="v1",Vr=Cn("messageChannels.telemetry");function _r(){return Ur(this,void 0,void 0,(function*(){if(Dr)return Vr("Returning telemetry port from cache"),Dr;if(!Wr())throw Ht;return Dr=yield Gs(yn(Hr,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),Dr}))}function Wr(){var e;return!(!gr(Kn)||!(null===(e=Kn.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function Br(){Dr=void 0}var jr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let zr;const $r="v1",qr=Cn("messageChannels.dataLayer");function Gr(){return jr(this,void 0,void 0,(function*(){if(zr)return qr("Returning dataLayer port from cache"),zr;if(!Jr())throw Ht;return zr=yield Gs(yn($r,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),zr}))}function Jr(){var e;return!(!gr(Kn)||!(null===(e=Kn.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Kr(){zr=void 0}function Zr(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");gr(Kn),ys(e)}function Qr(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");gr(Kn),bs(e)}const Xr="v2",Yr=Cn("app"),eo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var to,no;function ro(){return Bn.initializeCompleted}function oo(){return Bn.frameContext}function io(e){return Fr(),Ki(yn(Xr,"app.initialize"),e)}function ao(e){Ls.currentWindow=e}function so(){Bn.initializeCalled&&(os(),Bn.initializeCalled=!1,Bn.initializeCompleted=!1,Bn.initializePromise=void 0,Bn.additionalValidOrigins=[],Bn.frameContext=void 0,Bn.hostClientType=void 0,Bn.isFramelessWindow=!1,Br(),Kr(),Hs())}function co(){return new Promise((e=>{pr(),e(Vs(yn(Xr,"app.getContext"),"getContext"))})).then((e=>wo(e)))}function lo(){pr(),Zi(yn(Xr,"app.notifyAppLoaded"))}function uo(){return Yi(yn(Xr,"app.notifySuccess"))}function fo(e){pr(),Xi(yn(Xr,"app.notifyFailure"),e)}function po(e){pr(),Qi(yn(Xr,"app.notifyExpectedFailure"),e)}function go(e){oa(yn(Xr,"app.registerOnThemeChangeHandler"),e)}function mo(e){ps(e)}function ho(e){return ia(yn(Xr,"app.openLink"),e)}function wo(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:kt.teams,clientType:e.hostClientType?e.hostClientType:Ft.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Bn.frameContext,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(to||(to={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(no||(no={})),Yr("teamsjs instance is version %s, starting at %s UTC (%s local)",lr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(rn())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,n="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?Yr("teamsjs is being used from %s. %s",t,n):Yr("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const vo="v1",Co="v2";let yo,bo,So;function Eo(){ss(yn(vo,"authentication.registerAuthenticateSuccessHandler"),"authentication.authenticate.success",Do,!1),ss(yn(vo,"authentication.registerAuthenticateFailureHandler"),"authentication.authenticate.failure",Ho,!1)}function Ao(e){So=e}function Io(e){const t=void 0!==e,n=t?e:So;if(!n)throw new Error("No parameters are provided for authentication");gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.remove,Mt.task,Mt.stage,Mt.meetingStage);return To(n.successCallback||n.failureCallback?yn(vo,"authentication.authenticate"):yn(Co,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(So=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(So=void 0)}}))}function To(e,t){return new Promise(((n,r)=>{if(Bn.hostClientType!==Ft.web){const r=sn(t.url);an(r),n(js(e,"authentication.authenticate",[r.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)})))}else yo={success:n,fail:r},Mo(t)}))}function Po(e){pr();return Oo(e&&(e.successCallback||e.failureCallback)?yn(vo,"authentication.getAuthToken"):yn(Co,"authentication.getAuthToken"),e).then((t=>e&&e.successCallback?(e.successCallback(t),""):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),"";throw t}))}function Oo(e,t){return new Promise((n=>{n(js(e,"authentication.getAuthToken",[null==t?void 0:t.resources,null==t?void 0:t.claims,null==t?void 0:t.silent,null==t?void 0:t.tenantId]))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function Ro(e){pr();return Fo(e&&(e.successCallback||e.failureCallback)?yn(vo,"authentication.getUser"):yn(Co,"authentication.getUser")).then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{const n=`Error returned, code = ${t.errorCode}, message = ${t.message}`;if(e&&e.failureCallback)return e.failureCallback(n),null;throw new Error(n)}))}function Fo(e){return new Promise((t=>{t(js(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function ko(){No();try{Ls.childWindow&&Ls.childWindow.close()}finally{Ls.childWindow=null,Ls.childOrigin=null}}function Mo(e){ko();let t=e.width||600,n=e.height||400;t=Math.min(t,Ls.currentWindow.outerWidth-400),n=Math.min(n,Ls.currentWindow.outerHeight-200);const r=sn(e.url.replace("{oauthRedirectMethod}","web"));an(r);let o=void 0!==Ls.currentWindow.screenLeft?Ls.currentWindow.screenLeft:Ls.currentWindow.screenX,i=void 0!==Ls.currentWindow.screenTop?Ls.currentWindow.screenTop:Ls.currentWindow.screenY;o+=Ls.currentWindow.outerWidth/2-t/2,i+=Ls.currentWindow.outerHeight/2-n/2,Ls.childWindow=Ls.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),Ls.childWindow?xo():Ho("FailedToOpenWindow")}function No(){bo&&(clearInterval(bo),bo=0),cs("initialize"),cs("navigateCrossDomain")}function xo(){No(),bo=Ls.currentWindow.setInterval((()=>{if(!Ls.childWindow||Ls.childWindow.closed)Ho("CancelledByUser");else{const e=Ls.childOrigin;try{Ls.childOrigin="*",Tc("ping")}finally{Ls.childOrigin=e}}}),100),ss(yn(vo,"authentication.authenticationWindow.registerInitializeHandler"),"initialize",(()=>[Mt.authentication,Bn.hostClientType])),ss(yn(vo,"authentication.authenticationWindow.registerNavigateCrossDomainHandler"),"navigateCrossDomain",(()=>!1))}function Lo(e,t){gr(Kn,Mt.authentication);Zs(yn(t?vo:Co,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Ac(Ls.parentWindow,(()=>setTimeout((()=>Ls.currentWindow.close()),200)))}function Uo(e,t){gr(Kn,Mt.authentication);Zs(yn(t?vo:Co,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Ac(Ls.parentWindow,(()=>setTimeout((()=>Ls.currentWindow.close()),200)))}function Do(e){try{yo&&yo.success(e)}finally{yo=void 0,ko()}}function Ho(e){try{yo&&yo.fail(new Error(e))}finally{yo=void 0,ko()}}var Vo;function _o(e){ei(yn(Yo,"dialog.update.resize"),e)}function Wo(){return!(!gr(Kn)||!Kn.supports.dialog)&&!!Kn.supports.dialog.update}function Bo(e,t,n){ni(yn(Yo,"dialog.url.bot.open"),e,t,n)}function jo(){return gr(Kn)&&void 0!==(Kn.supports.dialog&&Kn.supports.dialog.url&&Kn.supports.dialog.url.bot)}function zo(e){if(gr(Kn,Mt.task),!Go())throw Ht;Zs(yn(Yo,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function $o(e){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!Go())throw Ht;Zs(yn(Yo,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function qo(e){if(gr(Kn,Mt.task),!Go())throw Ht;for(cs("messageForChild"),ss(yn(Yo,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ai.reverse();ai.length>0;){e(ai.pop())}}function Go(){var e,t;return gr(Kn)&&!!(null===(t=null===(e=Kn.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Jo(e,t,n){ti(yn(Yo,"dialog.url.open"),e,t,n)}function Ko(e,t){ri(yn(Yo,"dialog.url.submit"),e,t)}function Zo(){return gr(Kn)&&void 0!==(Kn.supports.dialog&&Kn.supports.dialog.url)}function Qo(e){return{url:e.url,height:e.size?e.size.height:Lt.Small,width:e.size?e.size.width:Lt.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Xo(e){const t=Qo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(Vo||(Vo={}));const Yo="v2";function ei(e,t){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.task,Mt.meetingStage),!Wo())throw Ht;Zs(e,"tasks.updateTask",[t])}function ti(e,t,n,r){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!Zo())throw Ht;r&&ss(yn(Yo,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Zs(e,"tasks.startTask",[Qo(t)],((e,t)=>{null==n||n({err:e,result:t}),cs("messageForParent")}))}function ni(e,t,n,r){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!jo())throw Ht;r&&ss(yn(Yo,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Zs(e,"tasks.startTask",[Xo(t)],((e,t)=>{null==n||n({err:e,result:t}),cs("messageForParent")}))}function ri(e,t,n){if(gr(Kn,Mt.task),!Zo())throw Ht;Zs(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function oi(e){return{card:e.card,height:e.size?e.size.height:Lt.Small,width:e.size?e.size.width:Lt.Small,title:e.title}}function ii(e){const t=oi(e);return t.completionBotId=e.completionBotId,t}const ai=[];function si(e){Bn.frameContext&&(Bn.frameContext===Mt.task?ai.push(e):cs("messageForChild"))}function ci(e,t){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!li())throw Ht;const n=ii(e);Zs(yn(Yo,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function li(){const e=Kn.hostVersionsInfo&&Kn.hostVersionsInfo.adaptiveCardSchemaVersion&&!Xt(Kn.hostVersionsInfo.adaptiveCardSchemaVersion);return gr(Kn)&&void 0!==(e&&Kn.supports.dialog&&Kn.supports.dialog.card&&Kn.supports.dialog.card.bot)}function ui(e,t){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!di())throw Ht;const n=oi(e);Zs(yn(Yo,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function di(){const e=Kn.hostVersionsInfo&&Kn.hostVersionsInfo.adaptiveCardSchemaVersion&&!Xt(Kn.hostVersionsInfo.adaptiveCardSchemaVersion);return gr(Kn)&&void 0!==(e&&Kn.supports.dialog&&Kn.supports.dialog.card)}function fi(){ss(yn(Yo,"dialog.registerMessageForChildHandler"),"messageForChild",si,!1)}function pi(){return!(!gr(Kn)||!Kn.supports.dialog)}const gi="v2";var mi,hi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(mi||(mi={}));class wi{constructor(){this.enabled=!0,this.selected=!1}}let vi,Ci,yi,bi,Si;function Ei(){ss(yn(gi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Pi,!1),ss(yn(gi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Ri,!1),ss(yn(gi,"menus.registerSetModuleViewHandler"),"setModuleView",Ii,!1)}function Ai(e,t){if(gr(Kn),!Fi())throw Ht;yi=t,Zs(yn(gi,"menus.setUpViews"),"setUpViews",[e])}function Ii(e){yi&&yi(e)||(gr(Kn),Zs(yn(gi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Ti(e,t){if(gr(Kn),!Fi())throw Ht;vi=t,Zs(yn(gi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Pi(e){vi&&vi(e)||(gr(Kn),Zs(yn(gi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Oi(e,t){if(gr(Kn),!Fi())throw Ht;Ci=t,Zs(yn(gi,"menus.showActionMenu"),"showActionMenu",[e])}function Ri(e){Ci&&Ci(e)||(gr(Kn),Zs(yn(gi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Fi(){return!(!gr(Kn)||!Kn.supports.menus)}function ki(){ss(yn(Ma,"pages.config.registerSettingsSaveHandler"),"settings.save",Hi,!1),ss(yn(Ma,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Wi,!1)}function Mi(e){return Wa(yn(Ma,"pages.config.setValidityState"),e)}function Ni(e){return ja(yn(Ma,"pages.config.setConfig"),e)}function xi(e){Li(yn(Ma,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Tr(e)&&!ji())throw Ht}))}function Li(e,t,n){!Tr(t)&&gr(Kn,Mt.settings),n&&n(),bi=t,!Tr(t)&&Zs(e,"registerHandler",["save"])}function Ui(e){Di(yn(Ma,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Tr(e)&&!ji())throw Ht}))}function Di(e,t,n){!Tr(t)&&gr(Kn,Mt.remove,Mt.settings),n&&n(),Si=t,!Tr(t)&&Zs(e,"registerHandler",["remove"])}function Hi(e){const t=new _i(e);bi?bi(t):Ls.childWindow?Tc("settings.save",[e]):t.notifySuccess()}function Vi(e){us(yn(Ma,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[Mt.content],(()=>{if(!ji())throw Ht}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(hi||(hi={}));class _i{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Zs(yn(Ma,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Zs(yn(Ma,"pages.saveEvent.notifyFailure"),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function Wi(){const e=new Bi;Si?Si(e):Ls.childWindow?Tc("settings.remove",[]):e.notifySuccess()}class Bi{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Zs(yn(Ma,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Zs(yn(Ma,"pages.removeEvent.notifyFailure"),"settings.remove.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}}function ji(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.config}class zi{}class $i extends zi{validate(e){return!0}deserialize(e){return e}}var qi=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Gi=6e4,Ji=Cn("app");function Ki(e,t){if(rn()){return Ji.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Zt((()=>ra(e,t)),Gi,new Error("SDK initialization timed out."))}function Zi(e){Zs(e,eo.AppLoaded,[lr])}function Qi(e,t){Zs(e,eo.ExpectedFailure,[t.reason,t.message])}function Xi(e,t){Zs(e,eo.Failure,[t.reason,t.message])}function Yi(e){return qi(this,void 0,void 0,(function*(){if(Bn.initializeCompleted)return ta(e);if(!Bn.initializePromise)throw new Error(Hn);return Bn.initializePromise.then((()=>ta(e)))}))}function ea(){var e;return gr(Kn)&&!!(null===(e=Kn.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ta(e){return qi(this,void 0,void 0,(function*(){return ea()?$s(eo.Success,[lr],new $i,e).then((()=>({hasFinishedSuccessfully:!0}))):(Zs(e,eo.Success,[lr]),{hasFinishedSuccessfully:"unknown"})}))}const na=Ji.extend("initializeHelper");function ra(e,t){return new Promise((n=>{Bn.initializeCalled||(Bn.initializeCalled=!0,rs(),Bn.initializePromise=Ds(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=En})=>{Bn.frameContext=e,Bn.hostClientType=t,Bn.clientSupportedSDKVersion=r;try{na("Parsing %s",n);const e=JSON.parse(n);if(na("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&sr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{na("Attempting to parse %s as an SDK version",n),isNaN(zt(n,En))||(Bn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(na("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");sr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;sr(ir(Bn.clientSupportedSDKVersion,Zn,nr))}}Bn.initializeCompleted=!0})),Eo(),Ei(),ki(),fi()),Array.isArray(t)&&vr(t),void 0!==Bn.initializePromise?n(Bn.initializePromise):na("GlobalVars.initializePromise is unexpectedly undefined")}))}function oa(e,t){!Tr(t)&&pr(),ds(e,t)}function ia(e,t){return new Promise((n=>{gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),n(_s(e,"executeDeepLink",t))}))}function aa(e){us(yn(Ma,"pages.appButton.onClick"),"appButtonClick",e,[Mt.content],(()=>{if(!la())throw Ht}))}function sa(e){us(yn(Ma,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[Mt.content],(()=>{if(!la())throw Ht}))}function ca(e){us(yn(Ma,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[Mt.content],(()=>{if(!la())throw Ht}))}function la(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.appButton}function ua(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),!fa())throw Ht;t(Bs(yn(Ma,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function da(){return new Promise((e=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),!fa())throw Ht;e(Bs(yn(Ma,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function fa(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.currentApp}function pa(){if(gr(Kn,Mt.content),!ma())throw Ht;Zs(yn(Ma,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function ga(){if(gr(Kn,Mt.content),!ma())throw Ht;Zs(yn(Ma,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function ma(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.fullTrust}function ha(e){return La(yn(Ma,"pages.tabs.navigateToTab"),e)}function wa(e){return Da(yn(Ma,"pages.tabs.getTabInstances"),e)}function va(e){return Ha(yn(Ma,"pages.tabs.getMruTabInstances"),e)}function Ca(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.tabs}var ya,ba;function Sa(e){const t=yn(Ma,"pages.returnFocus");if(gr(Kn),!ka())throw Ht;if(void 0===e&&Zs(t,"returnFocus",[!1]),"boolean"==typeof e)Zs(t,"returnFocus",[e]);else switch(e){case ba.PreviousLandmark:case ba.GoToActivityFeed:Zs(t,"returnFocus",[!1,e]);break;case ba.NextLandmark:Zs(t,"returnFocus",[!0,e])}}function Ea(e){us(yn(Ma,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!ka())throw Ht}))}function Aa(e){_a(yn(Ma,"pages.setCurrentFrame"),e)}function Ia(e,t,n){Fr(),Ki(yn(Ma,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Aa(e)}function Ta(){return Ba(yn(Ma,"pages.getConfig."))}function Pa(e){return Na(yn(Ma,"pages.navigateCrossDomain"),e)}function Oa(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),!ka())throw Ht;const n=yn(Ma,"pages.navigateToApp");if(Kn.isLegacyTeams){t(_s(n,"executeDeepLink",Qt(za(e)?e:$a(e))))}else{t(_s(n,"pages.navigateToApp",za(e)?qa(e):e))}}))}function Ra(e){return Va(yn(Ma,"pages.shareDeepLink"),e)}function Fa(e){us(yn(Ma,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Tr(e)&&!ka())throw Ht}))}function ka(){return!(!gr(Kn)||!Kn.supports.pages)}!function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(ya||(ya={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(ba||(ba={}));const Ma="v2";function Na(e,t){return new Promise((n=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.remove,Mt.task,Mt.stage,Mt.meetingStage),!ka())throw Ht;n(Ws(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function xa(e){return new Promise((t=>{if(gr(Kn),!Ya())throw Ht;t(Ws(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function La(e,t){return new Promise((n=>{if(gr(Kn),!Ca())throw Ht;n(Ws(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Ua(e,t){if(gr(Kn),!ka())throw Ht;Zs(e,"returnFocus",[t])}function Da(e,t){return new Promise((n=>{if(gr(Kn),!Ca())throw Ht;n(Vs(e,"getTabInstances",t))}))}function Ha(e,t){return new Promise((n=>{if(gr(Kn),!Ca())throw Ht;n(Vs(e,"getMruTabInstances",t))}))}function Va(e,t){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!ka())throw Ht;Zs(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function _a(e,t){if(gr(Kn,Mt.content),!ka())throw Ht;Zs(e,"setFrameContext",[t])}function Wa(e,t){if(gr(Kn,Mt.settings,Mt.remove),!ji())throw Ht;Zs(e,"settings.setValidityState",[t])}function Ba(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.settings,Mt.remove,Mt.sidePanel),!ka())throw Ht;t(Vs(e,"settings.getSettings"))}))}function ja(e,t){return new Promise((n=>{if(gr(Kn,Mt.content,Mt.settings,Mt.sidePanel),!ji())throw Ht;n(_s(e,"settings.setSettings",t))}))}function za(e){return e.appId instanceof Ir}function $a(e){return Object.assign(Object.assign({},e),{appId:new Ir(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function qa(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let Ga;function Ja(){ss(yn(Ma,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Xa,!1)}function Ka(){return xa(yn(Ma,"pages.backStack.navigateBack"))}function Za(e){Qa(yn(Ma,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Tr(e)&&!Ya())throw Ht}))}function Qa(e,t,n){!Tr(t)&&gr(Kn),n&&n(),Ga=t,!Tr(t)&&Zs(e,"registerHandler",["backButton"])}function Xa(){Ga&&Ga()||(Ls.childWindow?Tc("backButtonPress",[]):Ka())}function Ya(){return!(!gr(Kn)||!Kn.supports.pages)&&!!Kn.supports.pages.backStack}var es=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const ts=Cn("handlers");class ns{static initializeHandlers(){ns.handlers.themeChange=fs,ns.handlers.load=hs,ns.handlers.beforeUnload=Cs,Ja()}static uninitializeHandlers(){ns.handlers={},ns.themeChangeHandler=null,ns.loadHandler=null,ns.beforeUnloadHandler=null,ns.beforeSuspendOrTerminateHandler=null,ns.resumeHandler=null}}function rs(){ns.initializeHandlers()}function os(){ns.uninitializeHandlers()}ns.handlers={},ns.themeChangeHandler=null,ns.loadHandler=null,ns.beforeUnloadHandler=null,ns.beforeSuspendOrTerminateHandler=null,ns.resumeHandler=null,ns.hostToAppPerformanceMetricsHandler=null;const is=ts.extend("callHandler");function as(e,t){const n=ns.handlers[e];if(n){is("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Ls.childWindow?(Tc(e,t),[!1,void 0]):(is("Handler for action message %s not found.",e),[!1,void 0])}function ss(e,t,n,r=!0,o=[]){n?(ns.handlers[t]=n,r&&Zs(e,"registerHandler",[t,...o])):delete ns.handlers[t]}function cs(e){delete ns.handlers[e]}function ls(e){return null!=ns.handlers[e]}function us(e,t,n,r,o){n&&gr(Kn,...r),o&&o(),ss(e,t,n)}function ds(e,t){ns.themeChangeHandler=t,!Tr(t)&&Zs(e,"registerHandler",["themeChange"])}function fs(e){ns.themeChangeHandler&&ns.themeChangeHandler(e),Ls.childWindow&&Tc("themeChange",[e])}function ps(e){ns.hostToAppPerformanceMetricsHandler=e}function gs(e){ns.hostToAppPerformanceMetricsHandler&&ns.hostToAppPerformanceMetricsHandler(e)}function ms(e,t){ns.loadHandler=t,!Tr(t)&&Zs(e,"registerHandler",["load"])}function hs(e){const t=ws(e);ns.resumeHandler?(ns.resumeHandler(t),Ls.childWindow&&Tc("load",[t])):ns.loadHandler&&(ns.loadHandler(e),Ls.childWindow&&Tc("load",[e]))}function ws(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function vs(e,t){ns.beforeUnloadHandler=t,!Tr(t)&&Zs(e,"registerHandler",["beforeUnload"])}function Cs(){return es(this,void 0,void 0,(function*(){const e=()=>{Zs(yn("v2","handleBeforeUnload"),"readyToUnload",[])};ns.beforeSuspendOrTerminateHandler?(yield ns.beforeSuspendOrTerminateHandler(),Ls.childWindow?Tc("beforeUnload"):e()):ns.beforeUnloadHandler&&ns.beforeUnloadHandler(e)||(Ls.childWindow?Tc("beforeUnload"):e())}))}function ys(e){ns.beforeSuspendOrTerminateHandler=e,!Tr(e)&&Zs(yn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function bs(e){ns.resumeHandler=e,!Tr(e)&&Zs(yn("v2","registerOnResumeHandler"),"registerHandler",["load"])}class Ss{static storeCallbackInformation(e,t){Ss.callbackInformation.set(e,t)}static clearMessages(){Ss.callbackInformation.clear()}static deleteMessageInformation(e){Ss.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?gs({actionName:e.func,messageDelay:n-r,requestStartedAt:r}):t("Unable to send performance metrics for event %s",e.func)}static handlePerformanceMetrics(e,t,n,r){const o=Ss.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(gs({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Ss.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Ss.callbackInformation=new Map;var Es=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const As=e=>{const{uuid:t}=e,n=Es(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Is=e=>{const{uuidAsString:t}=e,n=Es(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new mn(t):void 0})},Ts=e=>{const{uuidAsString:t}=e,n=Es(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new mn(t):void 0})},Ps=e=>{const{uuid:t}=e,n=Es(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Os=Cn("nestedAppAuthUtils"),Rs=Os.extend("tryPolyfillWithNestedAppAuthBridge");function Fs(e,t,n){var r;const o=Rs;if(Bn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=Ms(a,n);s&&(a.nestedAppAuthBridge=s)}const ks=Os.extend("createNestedAppAuthBridge");function Ms(e,t){const n=ks;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();t&&"object"==typeof t&&"NestedAppAuthRequest"===t.messageType?o(e):n("Unrecognized data format received by app, message being ignored. Message: %o",e)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var Ns=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const xs=Cn("communication");class Ls{}class Us{}function Ds(e,t){if(Us.messageListener=e=>oc(e),Ls.currentWindow=Ls.currentWindow||nn(),Ls.parentWindow=Ls.currentWindow.parent!==Ls.currentWindow.self?Ls.currentWindow.parent:Ls.currentWindow.opener,Ls.topWindow=Ls.currentWindow.top,(Ls.parentWindow||e)&&Ls.currentWindow.addEventListener("message",Us.messageListener,!1),!Ls.parentWindow){const e=Ls.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Bn.isFramelessWindow=!0,e.onNativeMessage=gc}try{return Ls.parentOrigin="*",js(t,"initialize",[lr,$n,e]).then((([e,t,n,r])=>(Fs(r,Ls.currentWindow,{onMessage:ac,sendPostMessage:Xs}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Ls.parentOrigin=null}}function Hs(){Ls.currentWindow&&Ls.currentWindow.removeEventListener("message",Us.messageListener,!1),Ls.currentWindow=null,Ls.parentWindow=null,Ls.parentOrigin=null,Ls.childWindow=null,Ls.childOrigin=null,Us.parentMessageQueue=[],Us.childMessageQueue=[],Us.nextMessageId=0,Us.callbacks.clear(),Us.promiseCallbacks.clear(),Us.portCallbacks.clear(),Us.legacyMessageIdsToUuidMap={},Ss.clearMessages()}function Vs(e,t,...n){return js(e,t,n).then((([e])=>e))}function _s(e,t,...n){return js(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function Ws(e,t,n,...r){return js(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function Bs(e,t,...n){return js(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function js(e,t,n=void 0){if(!bn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((r=>{r(Ks(nc(e,t,n).uuid))}))}function zs(e){return e.map((e=>cr(e)?e.serialize():e))}function $s(e,t,n,r,o){var i;return Ns(this,void 0,void 0,(function*(){const a=zs(t),[s]=yield js(r,e,a);if(o&&o(s)||!o&&Dt(s))throw new Error(`${s.errorCode}, message: ${null!==(i=s.message)&&void 0!==i?i:"None"}`);if(n.validate(s))return n.deserialize(s);throw new Error(`${Et.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function qs(e,t,n,r){var o;return Ns(this,void 0,void 0,(function*(){const i=zs(t),[a]=yield js(n,e,i);if(r&&r(a)||!r&&Dt(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Et.INTERNAL_ERROR}, message: Invalid response from host`)}))}function Gs(e,t,n=void 0){if(!bn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return Js(nc(e,t,n).uuid)}function Js(e){return new Promise(((t,n)=>{Us.portCallbacks.set(e,((e,r)=>{e instanceof MessagePort?t(e):n(r&&r.length>0?r[0]:new Error("Host responded without port or error details."))}))}))}function Ks(e){return new Promise((t=>{Us.promiseCallbacks.set(e,t)}))}function Zs(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!bn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const i=nc(e,t,o);r&&Us.callbacks.set(i.uuid,r)}Us.parentMessageQueue=[],Us.childMessageQueue=[],Us.topMessageQueue=[],Us.nextMessageId=0,Us.callbacks=new Map,Us.promiseCallbacks=new Map,Us.portCallbacks=new Map,Us.legacyMessageIdsToUuidMap={};const Qs=xs.extend("sendNestedAuthRequestToTopWindow");function Xs(e){const t=Qs,n=Ls.topWindow,r=Oc(e);return t("Message %s information: %o",kc(r),{actionName:r.func}),ec(n,r)}const Ys=xs.extend("sendRequestToTargetWindowHelper");function ec(e,t){const n=Ys,r=bc(e),o=As(t);if(Bn.isFramelessWindow)Ls.currentWindow&&Ls.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",kc(o),r),Ls.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=yc(e);e&&i?(n("Sending message %s to %s via postMessage",kc(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",kc(o),r),Cc(e).push(t))}return t}const tc=xs.extend("sendMessageToParentHelper");function nc(e,t,n){const r=tc,o=Ls.parentWindow,i=Pc(e,t,n);return Ss.storeCallbackInformation(i.uuid,{name:t,calledAt:i.timestamp}),r("Message %s information: %o",kc(i),{actionName:t,args:n}),ec(o,i)}const rc=xs.extend("processIncomingMessage");function oc(e){return Ns(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void rc("Unrecognized message format received by app, message being ignored. Message: %o",e);const t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;return cc(t,n).then((r=>{r?(lc(t,n),t===Ls.parentWindow?gc(e):t===Ls.childWindow&&wc(e)):rc("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",e,t,n)}))}))}const ic=xs.extend("processAuthBridgeMessage");function ac(e,t){var n,r;const o=ic;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),l=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?cc(c,l)?(Ls.topWindow&&!Ls.topWindow.closed&&c!==Ls.topWindow||(Ls.topWindow=c,Ls.topOrigin=l),Ls.topWindow&&Ls.topWindow.closed&&(Ls.topWindow=null,Ls.topOrigin=null),Ec(Ls.topWindow),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const sc=xs.extend("shouldProcessIncomingMessage");function cc(e,t){return Ns(this,void 0,void 0,(function*(){if(Ls.currentWindow&&e===Ls.currentWindow)return sc("Should not process message because it is coming from the current window"),!1;if(Ls.currentWindow&&Ls.currentWindow.location&&t&&t===Ls.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return sc("Message has an invalid origin of %s",t),!1}const n=yield Lr(e);return n||sc("Message has an invalid origin of %s",t),n}}))}function lc(e,t){Bn.isFramelessWindow||Ls.parentWindow&&!Ls.parentWindow.closed&&e!==Ls.parentWindow?Ls.childWindow&&!Ls.childWindow.closed&&e!==Ls.childWindow||(Ls.childWindow=e,Ls.childOrigin=t):(Ls.parentWindow=e,Ls.parentOrigin=t),Ls.parentWindow&&Ls.parentWindow.closed&&(Ls.parentWindow=null,Ls.parentOrigin=null),Ls.childWindow&&Ls.childWindow.closed&&(Ls.childWindow=null,Ls.childOrigin=null),Ec(Ls.parentWindow),Ec(Ls.childWindow)}const uc=xs.extend("handleIncomingMessageFromParent");function dc(e){const t=uc;if(!e.uuid)return Us.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=fc(Us.callbacks,t);if(n)return n;const r=fc(Us.promiseCallbacks,t);if(r)return r;const o=fc(Us.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",kc(e))}function fc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function pc(e,t){const n=fc(t,e.uuid);n&&t.delete(n),e.uuid?Us.legacyMessageIdsToUuidMap={}:delete Us.legacyMessageIdsToUuidMap[e.id]}function gc(e){const t=uc,n=pn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Ts(r),i=dc(o);if(i){const r=Us.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Ss.handlePerformanceMetrics(i,o,t,n),r&&(t("Invoking the registered callback for message %s with arguments %o",i.toString(),o.args),r.apply(null,[...o.args,o.isPartialResponse]),mc(e)||(t("Removing registered callback for message %s",i.toString()),pc(o,Us.callbacks)));const a=Us.promiseCallbacks.get(i);a&&(t("Invoking the registered promise callback for message %s with arguments %o",i.toString(),o.args),a(o.args),t("Removing registered promise callback for message %s",i.toString()),pc(o,Us.promiseCallbacks));const s=Us.portCallbacks.get(i);if(s){let n;t("Invoking the registered port callback for message %s with arguments %o",i.toString(),o.args),e.ports&&e.ports[0]instanceof MessagePort&&(n=e.ports[0]),s(n,o.args),t("Removing registered port callback for message %s",i.toString()),pc(o,Us.portCallbacks)}o.uuid&&(Us.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Ss.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',kc(r),r.func),as(r.func,r.args)}else t("Received an unknown message: %O",e)}function mc(e){return!0===e.data.isPartialResponse}const hc=xs.extend("handleIncomingMessageFromChild");function wc(e){if("id"in e.data&&"func"in e.data){const t=Is(e.data),[n,r]=as(t.func,t.args);n&&void 0!==r?(hc("Returning message %s from child back to child, action: %s.",kc(t),t.func),Ic(t.id,t.uuid,Array.isArray(r)?r:[r])):(hc("Relaying message %s from child to parent, action: %s. Relayed message will have a new id.",kc(t),t.func),Zs(yn("v2","tasks.startTask"),t.func,t.args,((...e)=>{if(Ls.childWindow){const n=e.pop();hc("Message from parent being relayed to child, id: %s",kc(t)),Ic(t.id,t.uuid,e,n)}})))}}function vc(){return Ls.topWindow!==Ls.parentWindow}function Cc(e){return e===Ls.topWindow&&vc()?Us.topMessageQueue:e===Ls.parentWindow?Us.parentMessageQueue:e===Ls.childWindow?Us.childMessageQueue:[]}function yc(e){return e===Ls.topWindow&&vc()?Ls.topOrigin:e===Ls.parentWindow?Ls.parentOrigin:e===Ls.childWindow?Ls.childOrigin:null}function bc(e){return e===Ls.topWindow&&vc()?"top":e===Ls.parentWindow?"parent":e===Ls.childWindow?"child":null}const Sc=xs.extend("flushMessageQueue");function Ec(e){const t=yc(e),n=Cc(e),r=bc(e);for(;e&&t&&n.length>0;){const o=n.shift();if(o){const n=As(o);Sc("Flushing message %s from %s message queue via postMessage.",kc(n),r),e.postMessage(n,t)}}}function Ac(e,t){let n;n=Ls.currentWindow.setInterval((()=>{0===Cc(e).length&&(clearInterval(n),t())}),100)}function Ic(e,t,n,r){const o=Ls.childWindow,i=Rc(e,t,n,r),a=Ps(i),s=yc(o);o&&s&&o.postMessage(a,s)}function Tc(e,t){const n=Ls.childWindow,r=Fc(e,t),o=yc(n);n&&o?n.postMessage(r,o):Cc(n).push(r)}function Pc(e,t,n){const r=Us.nextMessageId++,o=new mn;return Us.legacyMessageIdsToUuidMap[r]=o,{id:r,uuid:o,func:t,timestamp:Date.now(),monotonicTimestamp:pn(),args:n||[],apiVersionTag:e}}function Oc(e){const t=Us.nextMessageId++,n=new mn;return Us.legacyMessageIdsToUuidMap[t]=n,{id:t,uuid:n,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:pn(),args:[],data:e}}function Rc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Fc(e,t){return{func:e,args:t||[]}}function kc(e){return"uuidAsString"in e?`${e.uuidAsString} (legacy id: ${e.id})`:"uuid"in e&&void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const Mc="v1";function Nc(e){if(!Tr(e)&&gr(Kn),!Tr(e)&&!xc())throw Ht;e?ss(yn(Mc,"log.request"),"log.request",(()=>{const t=e();Zs(yn(Mc,"log.receive"),"log.receive",[t])})):cs("log.request")}function xc(){return!(!gr(Kn)||!Kn.supports.logs)}var Lc,Uc,Dc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Lc||(Lc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Uc||(Uc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Dc||(Dc={}));const Hc="v1";function Vc(e,t){gr(Kn),Zs(yn(Hc,"uploadCustomApp"),"uploadCustomApp",[e],t||jt())}function _c(e,t,n){gr(Kn),Zs(yn(Hc,"sendCustomMessage"),e,t,n)}function Wc(e,t){if(gr(Kn),!Ls.childWindow)throw new Error("The child window has not yet been initialized or is not present");Tc(e,t)}function Bc(e,t){gr(Kn),ss(yn(Hc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function jc(e,t){gr(Kn),ss(yn(Hc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function zc(e){gr(Kn,Mt.content,Mt.task);const t=[e.entityId,e.title,e.description,e.type,e.objectUrl,e.downloadUrl,e.webPreviewUrl,e.webEditUrl,e.baseUrl,e.editFile,e.subEntityId,e.viewerAction,e.fileOpenPreference,e.conversationId,e.sizeInBytes];Zs(yn(Hc,"openFilePreview"),"openFilePreview",t)}const $c="v1";function qc(e){return new Promise((t=>{if(gr(Kn,Mt.content),!Kc())throw Ht;const n=_s(yn($c,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&ss(yn($c,"conversations.registerStartConversationHandler"),"startConversation",((t,n,r,o)=>{var i;return null===(i=e.onStartConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),e.onCloseConversation&&ss(yn($c,"conversations.registerCloseConversationHandler"),"closeConversation",((t,n,r,o)=>{var i;return null===(i=e.onCloseConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),t(n)}))}function Gc(){if(gr(Kn,Mt.content),!Kc())throw Ht;Zs(yn($c,"conversations.closeConversation"),"conversations.closeConversation"),cs("startConversation"),cs("closeConversation")}function Jc(){return new Promise((e=>{if(gr(Kn),!Kc())throw Ht;e(Vs(yn($c,"conversations.getChatMember"),"getChatMembers"))}))}function Kc(){return!(!gr(Kn)||!Kn.supports.conversations)}var Zc=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Qc="v2",Xc=Cn("copilot");function Yc(){var e,t;return gr(Kn)&&(!!(null===(e=Kn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=Kn.supports.copilot)||void 0===t?void 0:t.eligibility))}function el(){var e,t;return Zc(this,void 0,void 0,(function*(){if(gr(Kn),!Yc())throw new Error(`Error code: ${Ht.errorCode}, message: Not supported on platform`);if(null===(e=Kn.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)return Xc("Eligibility information is already available on runtime."),Kn.hostVersionsInfo.appEligibilityInformation;Xc("Eligibility information is not available on runtime. Requesting from host.");const n=yield Vs(yn(Qc,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo");if(Dt(n))throw new Error(`Error code: ${n.errorCode}, message: ${null!==(t=n.message)&&void 0!==t?t:"Failed to get eligibility information from the host."}`);if(!tl(n))throw new Error("Error deserializing eligibility information");return n}))}function tl(e){return void 0!==e.ageGroup&&void 0!==e.cohort&&void 0!==e.userClassification&&void 0!==e.isCopilotEligible&&void 0!==e.isCopilotEnabledRegion&&void 0!==e.isOptedOutByAdmin&&(!e.featureSet||void 0!==e.featureSet.serverFeatures&&void 0!==e.featureSet.uxFeatures)}const nl="v2";class rl{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function ol(e){const t=e;return t.responseType===sl.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const il="Action.Execute";var al,sl,cl;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(al||(al={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(sl||(sl={}));class ll extends zi{validate(e){return ol(e)}deserialize(e){return e}}function ul(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(cl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function dl(e){e.requestType===al.ActionExecuteInvokeRequest?fl(e):e.requestType===al.QueryMessageExtensionRequest&&pl(e)}function fl(e){if(e.type!==il){throw{errorCode:cl.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${il}"`}}if(!gn(e.data)){throw{errorCode:cl.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function pl(e){if(e.commandId.length>64)throw new Error("originalRequestInfo.commandId exceeds the maximum size of 64 characters");if(e.parameters.length>5)throw new Error("originalRequestInfo.parameters exceeds the maximum size of 5");for(const t of e.parameters){if(t.name.length>64)throw new Error("originalRequestInfo.parameters.name exceeds the maximum size of 64 characters");if(t.value.length>512)throw new Error("originalRequestInfo.parameters.value exceeds the maximum size of 512 characters")}}function gl(e,t,n){if(gr(Kn,Mt.content),!Cl())throw Ht;const r=new Ir(e);return dl(n),js(yn(nl,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[r.toString(),n,t.url.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function ml(e,t){if(gr(Kn,Mt.content),!Cl())throw Ht;const n=new Ir(e);return js(yn(nl,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function hl(e,t,n){if(gr(Kn,Mt.content),!Cl())throw Ht;const r=new Ir(e);return dl(n),js(yn(nl,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function wl(e,t,n){if(gr(Kn,Mt.content),!Cl())throw Ht;return on(e,new Error("titleId is Invalid.")),on(t,new Error("oauthConfigId is Invalid.")),js(yn(nl,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function vl(e,t,n){if(gr(Kn,Mt.content),!Cl())throw Ht;return on(e,new Error("titleId is Invalid.")),t&&an(t),js(yn(nl,"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins"),"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins",[e,null==t?void 0:t.toString(),null==n?void 0:n.width,null==n?void 0:n.height,null==n?void 0:n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Cl(){return!(!gr(Kn)||!Kn.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(cl||(cl={}));var yl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const bl="v2";function Sl(e,t,n){return yl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Tl())throw Ht;return Pl(e,t),qs("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.claims,n.silent],yn(bl,"externalAppAuthenticationForCEA.authenticateWithSSO"),ul)}))}function El(e,t,n){return yl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Tl())throw Ht;return Pl(e,t),qs("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],yn(bl,"externalAppAuthenticationForCEA.authenticateWithOauth"),ul)}))}function Al(e,t,n,r){return yl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Tl())throw Ht;return Pl(e,t),fl(r),$s("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new rl(r),n.url.href,n.width,n.height,n.isExternal],new ll,yn(bl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),ul)}))}function Il(e,t,n,r){return yl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Tl())throw Ht;return Pl(e,t),fl(r),$s("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new rl(r),n.claims,n.silent],new ll,yn(bl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),ul)}))}function Tl(){return!(!gr(Kn)||!Kn.supports.externalAppAuthenticationForCEA)}function Pl(e,t){on(t,new Error("conversation id is not valid.")),Ar(e)}const Ol="v2";var Rl,Fl;function kl(e,t){if(gr(Kn,Mt.content),!Nl())throw Ht;const n=new Ir(e);return js(yn(Ol,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Ml(e,t,n){if(gr(Kn,Mt.content),!Nl())throw Ht;const r=new Ir(e);return js(yn(Ol,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function Nl(){return!(!gr(Kn)||!Kn.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Rl||(Rl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Fl||(Fl={}));var xl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Ll="v2";function Ul(e,t,n){return xl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Hl())throw Ht;Pl(e,t);const[r,o]=yield js(yn(Ll,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function Dl(e,t,n){return xl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Hl())throw Ht;Pl(e,t);const r=yield Vs(yn(Ll,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Hl(){return!(!gr(Kn)||!Kn.supports.externalAppCardActionsForCEA)}var Vl=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const _l="v2";function Wl(e,t,n){return Vl(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content),!Bl())throw Ht;const r=new Ir(e),[o,i]=yield js(yn(_l,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Bl(){return!(!gr(Kn)||!Kn.supports.externalAppCommands)}const jl="v1";var zl,$l,ql,Gl,Jl,Kl;function Zl(e,t){if(gr(Kn,Mt.content),!e||0===e.length)throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");if(!t)throw new Error("[files.getCloudStorageFolders] Callback cannot be null");Zs(yn(jl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Ql(e,t){if(gr(Kn,Mt.content),!e||0===e.length)throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.addCloudStorageFolder] Callback cannot be null");Zs(yn(jl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Xl(e,t,n){if(gr(Kn,Mt.content),!e)throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");if(!n)throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");Zs(yn(jl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Yl(e,t,n){if(gr(Kn,Mt.content),!e||!t)throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");if(!n)throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");if("isSubdirectory"in e&&!e.isSubdirectory)throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");Zs(yn(jl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function eu(e,t,n){if(gr(Kn,Mt.content),!e||!t)throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");if(e.isSubdirectory)throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");Zs(yn(jl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function tu(e=!1,t){if(gr(Kn,Mt.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Zs(yn(jl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function nu(e,t,n,r,o=!1,i){if(gr(Kn,Mt.content),!e||0===e.length)throw new Error("[files.copyMoveFiles] selectedFiles cannot be null or empty");if(!t)throw new Error("[files.copyMoveFiles] providerCode cannot be null or empty");if(!n)throw new Error("[files.copyMoveFiles] destinationFolder cannot be null or empty");if(!r)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!i)throw new Error("[files.copyMoveFiles] callback cannot be null");Zs(yn(jl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function ru(e){if(gr(Kn,Mt.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Zs(yn(jl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function ou(e=void 0,t){if(gr(Kn,Mt.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Zs(yn(jl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function iu(e){if(gr(Kn,Mt.content),!e)throw gu(Et.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Zs(yn(jl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function au(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw gu(Et.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Zs(yn(jl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function su(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw gu(Et.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Zs(yn(jl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function cu(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw gu(Et.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Zs(yn(jl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function lu(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw gu(Et.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Zs(yn(jl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function uu(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw gu(Et.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Zs(yn(jl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function du(e,t){if(gr(Kn,Mt.content),!t)throw gu(Et.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw gu(Et.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw gu(Et.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Zs(yn(jl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function fu(e){if(gr(Kn),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");ss(yn(jl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function pu(e){if(gr(Kn),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");ss(yn(jl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function gu(e,t){return{errorCode:e,message:t}}!function(e){e.Dropbox="DROPBOX",e.Box="BOX",e.Sharefile="SHAREFILE",e.GoogleDrive="GOOGLEDRIVE",e.Egnyte="EGNYTE",e.SharePoint="SharePoint"}(zl||(zl={})),function(e){e[e.Sharepoint=0]="Sharepoint",e[e.WopiIntegration=1]="WopiIntegration",e[e.Google=2]="Google",e[e.OneDrive=3]="OneDrive",e[e.Recent=4]="Recent",e[e.Aggregate=5]="Aggregate",e[e.FileSystem=6]="FileSystem",e[e.Search=7]="Search",e[e.AllFiles=8]="AllFiles",e[e.SharedWithMe=9]="SharedWithMe"}($l||($l={})),function(e){e.ClassMaterials="classMaterials"}(ql||(ql={})),function(e){e.Readonly="readonly"}(Gl||(Gl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(Jl||(Jl={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Kl||(Kl={}));const mu="v1";function hu(){return new Promise((e=>{if(gr(Kn),!yu())throw Ht;e(Bs(yn(mu,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function wu(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(gr(Kn),!yu())throw Ht;t(Bs(yn(mu,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function vu(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(gr(Kn),!yu())throw Ht;ss(yn(mu,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{gr(Kn),e(t)}))}function Cu(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(gr(Kn),!yu())throw Ht;ss(yn(mu,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{gr(Kn),e(t)}))}function yu(){return!(!gr(Kn)||!Kn.supports.meetingRoom)}function bu(){return!(!gr(Kn)||!Kn.supports.messageChannels)}const Su="v1";function Eu(e){if(gr(Kn,Mt.content),!Au())throw Ht;Zs(yn(Su,"notifications.showNotification"),"notifications.showNotification",[e])}function Au(){return!(!gr(Kn)||!Kn.supports.notifications)}const Iu="v2";function Tu(e){if(!Ru())throw new Error(Et.NOT_SUPPORTED_ON_PLATFORM.toString());if(Tr(e))throw new Error(Et.INVALID_ARGUMENTS.toString());ss(yn(Iu,"otherApp.install"),"otherApp.install",e)}function Pu(){if(!Ru())throw new Error(Et.NOT_SUPPORTED_ON_PLATFORM.toString());Zs(yn(Iu,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),cs("otherApp.install")}function Ou(e){if(!Ru())throw new Error(Et.NOT_SUPPORTED_ON_PLATFORM.toString());return qs("otherApp.notifyInstallCompleted",[e.toString()],yn(Iu,"otherApp.notifyInstallCompleted"))}function Ru(){return!(!gr(Kn)||!Kn.supports.otherAppStateChange)}const Fu="v1";var ku,Mu,Nu;function xu(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;Zs(yn(Fu,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Lu(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;Zs(yn(Fu,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Uu(e,t){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!t)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;Zs(yn(Fu,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function Du(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;Zs(yn(Fu,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Hu(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;ss(yn(Fu,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Vu(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;ss(yn(Fu,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function _u(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;ss(yn(Fu,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Wu(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(gr(Kn,Mt.sidePanel),!Bu())throw Ht;ss(yn(Fu,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Bu(){return!(!gr(Kn)||!Kn.supports.remoteCamera)}!function(e){e.Reset="Reset",e.ZoomIn="ZoomIn",e.ZoomOut="ZoomOut",e.PanLeft="PanLeft",e.PanRight="PanRight",e.TiltUp="TiltUp",e.TiltDown="TiltDown"}(ku||(ku={})),function(e){e[e.CommandResetError=0]="CommandResetError",e[e.CommandZoomInError=1]="CommandZoomInError",e[e.CommandZoomOutError=2]="CommandZoomOutError",e[e.CommandPanLeftError=3]="CommandPanLeftError",e[e.CommandPanRightError=4]="CommandPanRightError",e[e.CommandTiltUpError=5]="CommandTiltUpError",e[e.CommandTiltDownError=6]="CommandTiltDownError",e[e.SendDataError=7]="SendDataError"}(Mu||(Mu={})),function(e){e[e.None=0]="None",e[e.ControlDenied=1]="ControlDenied",e[e.ControlNoResponse=2]="ControlNoResponse",e[e.ControlBusy=3]="ControlBusy",e[e.AckTimeout=4]="AckTimeout",e[e.ControlTerminated=5]="ControlTerminated",e[e.ControllerTerminated=6]="ControllerTerminated",e[e.DataChannelError=7]="DataChannelError",e[e.ControllerCancelled=8]="ControllerCancelled",e[e.ControlDisabled=9]="ControlDisabled",e[e.ControlTerminatedToAllowOtherController=10]="ControlTerminatedToAllowOtherController"}(Nu||(Nu={}));const ju="v1";function zu(e,t,n,r){if(gr(Kn,Mt.content),!$u())throw Ht;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!r)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");Zs(yn(ju,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function $u(){return!(!gr(Kn)||!Kn.supports.appEntity)}const qu="v1";function Gu(e){return new Promise((t=>{if(gr(Kn),!Ju())throw Ht;if((Bn.hostClientType===Ft.android||Bn.hostClientType===Ft.teamsRoomsAndroid||Bn.hostClientType===Ft.teamsPhones||Bn.hostClientType===Ft.teamsDisplays)&&!mr(Pn)){const e={errorCode:Et.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(Vs(yn(qu,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function Ju(){return!(!gr(Kn)||!Kn.supports.teams)&&(!!Kn.supports.teams.fullTrust&&!!Kn.supports.teams.fullTrust.joinedTeams)}const Ku="v1";function Zu(e){return new Promise((t=>{if(gr(Kn),!Qu())throw Ht;t(Vs(yn(Ku,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function Qu(){return!(!gr(Kn)||!Kn.supports.teams)&&!!Kn.supports.teams.fullTrust}const Xu="v1";var Yu;function ed(e,t){if(gr(Kn,Mt.content),!nd())throw Ht;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Zs(yn(Xu,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function td(e,t){if(gr(Kn),!nd())throw Ht;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Zs(yn(Xu,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function nd(){return!(!gr(Kn)||!Kn.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Yu||(Yu={}));class rd{static setTimeout(e,t){const n=performance.now(),r=$t();return rd.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete rd.setTimeoutCallbacks[e]}static setInterval(e,t){rd.setTimeout((function n(){e(),rd.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in rd.setTimeoutCallbacks){const r=rd.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){rd.setTimeoutCallbacks[e].callback(),delete rd.setTimeoutCallbacks[e]}}}rd.setTimeoutCallbacks={};class od{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){rd.tick(),this.suitableForThisSession(e,t,n,r)||this.reportAndResetSession(this.getStatistics(),e,r,t,n),this.start()}processEnds(){const e=performance.now()-this.frameProcessingStartedAt,t=Math.floor(Math.max(0,Math.min(this.distributionBins.length-1,e)));this.distributionBins[t]+=1,this.sampleCount+=1}getStatistics(){return this.currentSession?{effectId:this.currentSession.effectId,effectParam:this.currentSession.effectParam,frameHeight:this.currentSession.frameHeight,frameWidth:this.currentSession.frameWidth,duration:performance.now()-this.currentSession.startedAtInMs,sampleCount:this.sampleCount,distributionBins:this.distributionBins.slice()}:null}start(){this.frameProcessingStartedAt=performance.now()}suitableForThisSession(e,t,n,r){return this.currentSession&&this.currentSession.effectId===e&&this.currentSession.effectParam===r&&this.currentSession.frameWidth===t&&this.currentSession.frameHeight===n}reportAndResetSession(e,t,n,r,o){e&&this.reportStatisticsResult(e),this.resetCurrentSession(this.getNextTimeout(t,this.currentSession),t,n,r,o),this.timeoutId&&rd.clearTimeout(this.timeoutId),this.timeoutId=rd.setTimeout((()=>this.reportAndResetSession(this.getStatistics(),t,n,r,o)).bind(this),this.currentSession.timeoutInMs)}resetCurrentSession(e,t,n,r,o){this.currentSession={startedAtInMs:performance.now(),timeoutInMs:e,effectId:t,effectParam:n,frameWidth:r,frameHeight:o},this.sampleCount=0,this.distributionBins.fill(0)}getNextTimeout(e,t){return t&&t.effectId===e?Math.min(od.maxSessionTimeoutInMs,2*t.timeoutInMs):od.initialSessionTimeoutInMs}}od.initialSessionTimeoutInMs=1e3,od.maxSessionTimeoutInMs=3e4;const id="v2";class ad{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new od(ad.distributionBinSize,(e=>this.reportPerformanceEvent(yn(id,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){rd.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(yn(id,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),ad.calculateFPSInterval)}setFrameProcessTimeLimit(e){this.frameProcessTimeLimit=e}reportApplyingVideoEffect(e,t){var n,r;(null===(n=this.applyingEffect)||void 0===n?void 0:n.effectId)===e&&(null===(r=this.applyingEffect)||void 0===r?void 0:r.effectParam)===t||(this.applyingEffect={effectId:e,effectParam:t},this.appliedEffect=void 0)}reportVideoEffectChanged(e,t){void 0===this.applyingEffect||this.applyingEffect.effectId!==e&&this.applyingEffect.effectParam!==t||(this.appliedEffect={effectId:e,effectParam:t},this.applyingEffect=void 0,this.isFirstFrameProcessed=!1)}reportStartFrameProcessing(e,t){rd.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))}reportFrameProcessed(){var e;this.appliedEffect&&(this.processedFrameCount++,this.frameProcessingTimeCost+=performance.now()-this.frameProcessingStartedAt,this.performanceStatistics.processEnds(),this.isFirstFrameProcessed||(this.isFirstFrameProcessed=!0,this.reportPerformanceEvent(yn(id,"videoPerformanceMonitor.reportFrameProcessed"),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(yn(id,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}ad.distributionBinSize=1e3,ad.calculateFPSInterval=1e3;var sd=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},cd=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const ld="v2",ud=rn()?void 0:new ad(Zs);var dd,fd,pd;function gd(e){if(gr(Kn,Mt.sidePanel),!Cd())throw Ht;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(ss(yn(ld,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==ud?void 0:ud.setFrameProcessTimeLimit(e.timeLimit)),!1),Ad())yd(e.videoFrameHandler,e.config);else{if(!Td())throw Ht;Sd(e.videoBufferHandler,e.config)}null==ud||ud.startMonitorSlowFrameProcessing()}function md(e,t){if(gr(Kn,Mt.sidePanel),!Cd())throw Ht;Zs(yn(ld,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function hd(e){if(gr(Kn,Mt.sidePanel),!Cd())throw Ht;ss(yn(ld,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Hd(e,ud),!1),Zs(yn(ld,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function wd(e){Zs(yn(ld,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function vd(e){Zs(yn(ld,"videoEffects.notifyError"),"video.notifyError",[e])}function Cd(){return gr(Kn)&&!!Kn.supports.video&&(!!Kn.supports.video.mediaStream||!!Kn.supports.video.sharedFrame)}function yd(e,t){if(gr(Kn,Mt.sidePanel),!Cd()||!Ad())throw Ht;ss(yn(ld,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>sd(this,void 0,void 0,(function*(){const{streamId:n}=t,r=bd(e,ud);yield Rd(n,r,vd,ud)}))),!1),Zs(yn(ld,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function bd(e,t){return n=>sd(this,void 0,void 0,(function*(){const r=n.videoFrame;null==t||t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=yield e(n);return null==t||t.reportFrameProcessed(),o}))}function Sd(e,t){if(gr(Kn,Mt.sidePanel),!Cd()||!Td())throw Ht;ss(yn(ld,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==ud||ud.reportStartFrameProcessing(t.width,t.height),e(Ed(t),(()=>{null==ud||ud.reportFrameProcessed(),wd(n)}),vd)}}),!1),Zs(yn(ld,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Ed(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=cd(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Ad(){var e;return gr(Kn,Mt.sidePanel)&&Id()&&!!(null===(e=Kn.supports.video)||void 0===e?void 0:e.mediaStream)}function Id(){var e,t,n,r;return!(!(null===(t=null===(e=nn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=nn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Td(){var e;return gr(Kn,Mt.sidePanel)&&!!(null===(e=Kn.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(dd||(dd={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(fd||(fd={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(pd||(pd={}));var Pd=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Od="v2";function Rd(e,t,n,r){var o,i;return Pd(this,void 0,void 0,(function*(){const a=Md();!rn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Nd(yield kd(e,n,r),new xd(n,t),a.writable)}))}function Fd(e,t,n,r){var o,i;return Pd(this,void 0,void 0,(function*(){const a=Md();!rn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Nd(yield kd(e,n,r),new Dd(n,t),a.writable)}))}function kd(e,t,n){return Pd(this,void 0,void 0,(function*(){if(rn())throw Ht;const r=nn().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function Md(){if(rn())throw Ht;const e=window.MediaStreamTrackGenerator;if(!e)throw Ht;return new e({kind:"video"})}function Nd(e,t,n){new(0,nn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class xd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Pd(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const r=yield this.videoFrameHandler({videoFrame:e}),o=new VideoFrame(r,{timestamp:n});t.enqueue(o),e.close(),r.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")}))}}class Ld{constructor(e,t){if(this.headerBuffer=e,this.notifyError=t,this.ONE_TEXTURE_INPUT_ID=1869900081,this.INVALID_HEADER_ERROR="Invalid video frame header",this.UNSUPPORTED_LAYOUT_ERROR="Unsupported texture layout",this.headerDataView=new Uint32Array(e),this.headerDataView.length<8)throw this.notifyError(this.INVALID_HEADER_ERROR),new Error(this.INVALID_HEADER_ERROR);if(this.headerDataView[0]!==this.ONE_TEXTURE_INPUT_ID)throw this.notifyError(this.UNSUPPORTED_LAYOUT_ERROR),new Error(this.UNSUPPORTED_LAYOUT_ERROR)}get oneTextureLayoutId(){return this.headerDataView[0]}get version(){return this.headerDataView[1]}get frameRowOffset(){return this.headerDataView[2]}get frameFormat(){return this.headerDataView[3]}get frameWidth(){return this.headerDataView[4]}get frameHeight(){return this.headerDataView[5]}get multiStreamHeaderRowOffset(){return this.headerDataView[6]}get multiStreamCount(){return this.headerDataView[7]}}class Ud{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;const n=new Uint32Array(e);for(let r=0,o=0;r<t;r++){const t=n[o++],r=n[o++],i=n[o++],a=new Uint8Array(e,r,i);this.metadataMap.set(t,a)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const e=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(void 0===e)return;const t=new Map,n=new TextDecoder("utf-8");let r=0;const o=e[r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24);for(let i=0;i<o&&r<e.length-1;i++){const o=e[++r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24),i=e.findIndex(((e,t,n)=>0==e&&t>r)),a=n.decode(e.slice(++r,i)),s=this.metadataMap.get(o);void 0!==s&&t.set(a,s);r=i+(4-(i-r)%4-1)}return t}}class Dd{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Pd(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:r,metadata:{audioInferenceResult:o,attributes:i}={}}=yield this.extractVideoFrameAndMetadata(e),a=yield this.videoFrameHandler({videoFrame:r,audioInferenceResult:o,attributes:i}),s=new VideoFrame(a,{timestamp:n});t.enqueue(s),r.close(),e.close(),a.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=e=>Pd(this,void 0,void 0,(function*(){if(rn())throw Ht;if("NV12"!==e.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2);yield e.copyTo(n,{rect:t});const r=new Ld(n,this.notifyError),o={x:0,y:r.multiStreamHeaderRowOffset,width:e.codedWidth,height:e.codedHeight-r.multiStreamHeaderRowOffset},i=new ArrayBuffer(o.width*o.height*3/2);yield e.copyTo(i,{rect:o});const a=new Ud(i,r.multiStreamCount);return{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:r.frameRowOffset,width:r.frameWidth,height:r.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult,attributes:a.attributes}}})),ss(yn(Od,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function Hd(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Zs(yn(Od,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in pd?e:pd.InitializationFailure;Zs(yn(Od,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var Vd=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const _d="v2",Wd=2e3,Bd=rn()?void 0:new ad(Zs);var jd;function zd(e){var t,n;if(!Qd())throw Ht;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(gr(Kn,Mt.sidePanel)){if(ss(yn(_d,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Bd?void 0:Bd.setFrameProcessTimeLimit(e)),!1),null===(t=Kn.supports.video)||void 0===t?void 0:t.mediaStream)ss(yn(_d,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Vd(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=Bd?qd(e.videoFrameHandler,Bd):e.videoFrameHandler;r?yield Fd(n,o,Yd,Bd):yield Rd(n,o,Yd,Bd)}))),!1),Zs(yn(_d,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=Kn.supports.video)||void 0===n?void 0:n.sharedFrame))throw Ht;ss(yn(_d,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==Bd||Bd.reportStartFrameProcessing(t.width,t.height);const n=$d(),r=t.timestamp;e.videoBufferHandler(Gd(t),(()=>{n(),null==Bd||Bd.reportFrameProcessed(),Xd(r)}),Yd)}}),!1),Zs(yn(_d,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Bd||Bd.startMonitorSlowFrameProcessing()}}function $d(){const e=setTimeout((()=>{Yd(`Frame not processed in ${Wd}ms`,jd.Warn)}),Wd);return function(){clearTimeout(e)}}function qd(e,t){return n=>Vd(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=$d(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function Gd(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Jd(e,t,n){if(gr(Kn,Mt.sidePanel),!Qd())throw Ht;Zs(yn(_d,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Kd(e){if(gr(Kn,Mt.sidePanel),!Qd())throw Ht;ss(yn(_d,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Hd(e,Bd),!1),Zs(yn(_d,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Zd(e){if(gr(Kn,Mt.sidePanel),!Cd())throw Ht;Zs(yn(_d,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Qd(){return gr(Kn),Cd()}function Xd(e){Zs(yn(_d,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Yd(e,t=jd.Warn){Zs(yn(_d,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function ef(e){if(gr(Kn),!Cd())throw Ht;Yd(e,jd.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(jd||(jd={}));const tf="v2";class nf extends zi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class rf{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class of{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class af extends zi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class sf{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class cf extends zi{validate(e){const t=new af;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function lf(e,t){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(mf(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Et.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return $s("hostEntity.tab.addAndConfigure",[new of(e),t],new af,yn(tf,"hostEntity.tab.addAndConfigure"))}function uf(e){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return mf(e.threadId),$s("hostEntity.tab.getAll",[new of(e)],new cf,yn(tf,"hostEntity.tab.getAll"))}function df(e,t){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return hf(e),mf(t.threadId),$s("hostEntity.tab.reconfigure",[new rf(e),new of(t)],new nf,yn(tf,"hostEntity.tab.reconfigure"))}function ff(e,t){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return hf(e),mf(t.threadId),$s("hostEntity.tab.rename",[new rf(e),new of(t)],new nf,yn(tf,"hostEntity.tab.rename"))}function pf(e,t){if(gr(Kn),!gf())throw new Error(`Error code: ${Et.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return mf(t.threadId),hf(e),$s("hostEntity.tab.remove",[new sf(e),new of(t)],new $i,yn(tf,"hostEntity.tab.remove"))}function gf(){var e;return!!(gr(Kn)&&vf()&&(null===(e=Kn.supports.hostEntity)||void 0===e?void 0:e.tab))}function mf(e){if(!e||0==e.length)throw new Error(`Error code: ${Et.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function hf(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Et.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var wf;function vf(){return!(!gr(Kn)||!Kn.supports.hostEntity)}!function(e){e.edu="EDU"}(wf||(wf={}));var Cf=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const yf="v2";var bf;!function(e){e.FullStore="fullstore",e.SpecificStore="specificstore",e.InContextStore="ics",e.AppDetail="appdetail"}(bf||(bf={}));const Sf="Invalid store dialog type, but type needed to specify store to open",Ef="No App Id present, but AppId needed to open AppDetail store",Af="No Collection Id present, but CollectionId needed to open a store specific to a collection";function If(e){return Cf(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),!Tf())throw Ht;if(void 0===e||!Object.values(bf).includes(e.dialogType))throw new Error(Sf);if(e.dialogType===bf.AppDetail&&!(e.appId instanceof Ir))throw new Error(Ef);if(e.dialogType===bf.SpecificStore&&!e.collectionId)throw new Error(Af);return qs("store.open",[e.dialogType,e.appId,e.collectionId],yn(yf,"store.open"))}))}function Tf(){return gr(Kn)&&!!Kn.supports.store}function Pf(e){const t=!e||e.length<=0,n=null==e?void 0:e.indexOf("@"),r=null==e?void 0:e.indexOf(".",n);if(t||-1===n||-1===r)throw new Error("Input email address does not have the correct format.")}class Of{constructor(e){this.val=e,Pf(e)}toString(){return this.val}}const Rf="/l/app/",Ff="/l/meeting/new",kf="attendees",Mf="startTime",Nf="endTime",xf="subject",Lf="content",Uf="/l/call/0/0",Df="source",Hf="withVideo",Vf="/l/chat/0/0",_f="users",Wf="topicName",Bf="message";function jf(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${_f}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Wf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Bf}=${encodeURIComponent(n)}`;return`${Un}://${Dn}${Vf}?${r}${o}${i}`}function zf(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${_f}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Hf}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Df}=${encodeURIComponent(n)}`;return`${Un}://${Dn}${Uf}?${r}${o}${i}`}function $f(e,t,n,r,o){const i=void 0===e?"":`${kf}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Mf}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Nf}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${xf}=${encodeURIComponent(r)}`,l=void 0===o?"":`&${Lf}=${encodeURIComponent(o)}`;return`${Un}://${Dn}${Ff}?${i}${a}${s}${c}${l}`}function qf(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${Un}://${Dn}${Rf}${encodeURIComponent(e)}`}const Gf="v1";function Jf(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage),!Kf())throw new Error("Not supported");const n=yn(Gf,"appInstallDialog.openAppInstallDialog");Kn.isLegacyTeams?t(_s(n,"executeDeepLink",qf(e.appId))):(Zs(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function Kf(){return!(!gr(Kn)||!Kn.supports.appInstallDialog)}const Zf="v1",Qf=Cn("media");var Xf,Yf,ep,tp,np,rp,op;!function(e){e.Base64="base64",e.ID="id"}(Xf||(Xf={}));class ip{}function ap(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),Bn.isFramelessWindow)if(mr(Fn))Zs(yn(Zf,"media.captureImage"),"captureImage",e);else{e({errorCode:Et.OLD_PLATFORM},[])}else{e({errorCode:Et.NOT_SUPPORTED_ON_PLATFORM},[])}}function sp(){if(gr(Kn,Mt.content,Mt.task),!lp())throw Ht;const e=At.Media;return new Promise((t=>{t(Bs(yn(Zf,"media.hasPermission"),"permissions.has",e))}))}function cp(){if(gr(Kn,Mt.content,Mt.task),!lp())throw Ht;const e=At.Media;return new Promise((t=>{t(Bs(yn(Zf,"media.requestPermission"),"permissions.request",e))}))}function lp(){return!(!gr(Kn)||!Kn.supports.permissions)}class up extends ip{constructor(e){super(),e&&(this.content=e.content,this.format=e.format,this.mimeType=e.mimeType,this.name=e.name,this.preview=e.preview,this.size=e.size)}getMedia(e){if(!e)throw new Error("[get Media] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),mr(kn))if(Ap(this.mimeType,this.format,this.content))mr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:Et.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:Et.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Zs(yn(Zf,"media.getMedia"),"getMedia",n,(function(n){if(e)if(n&&n.error)e(n.error,new Blob);else if(n&&n.mediaChunk)if(n.mediaChunk.chunkSequence<=0){const r=hp(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=wp(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):Qf(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Et.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=$t(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Tr(e)&&Zs(yn(Zf,"media.getMedia"),"getMedia",r),ss(yn(Zf,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),cs("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=hp(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),cs("getMedia"+t)}else{const e=wp(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Et.INTERNAL_ERROR,message:"data received is null"},new Blob),cs("getMedia"+t)}}))}}class dp{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){gr(Kn,Mt.content,Mt.task);try{wr(In)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Zs(yn(Zf,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(Yf.StopRecording,e)}}class fp extends dp{getMediaType(){return np.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Yf.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function pp(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),!mr(kn)){const e={errorCode:Et.OLD_PLATFORM};return void t(e,[])}try{vp(e)}catch(e){return void t(e,[])}if(!yp(e)){const e={errorCode:Et.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Zs(yn(Zf,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Cp(e)&&(null===(a=null===(i=null==e?void 0:e.videoProps)||void 0===i?void 0:i.videoController)||void 0===a||a.notifyEventToApp(o)));if(!r)return void t(n,[]);const s=[];for(const e of r)s.push(new up(e));t(n,s)}))}function gp(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),!mr(kn)){return void t({errorCode:Et.OLD_PLATFORM})}if(!Ip(e)){return void t({errorCode:Et.INVALID_ARGUMENTS})}const n=[e];Zs(yn(Zf,"media.viewImages"),"viewImages",n,t)}function mp(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),Bn.hostClientType!==Ft.desktop&&Bn.hostClientType!==Ft.web&&Bn.hostClientType!==Ft.rigel&&Bn.hostClientType!==Ft.teamsRoomsWindows&&Bn.hostClientType!==Ft.teamsRoomsAndroid&&Bn.hostClientType!==Ft.teamsPhones&&Bn.hostClientType!==Ft.teamsDisplays)if(mr(Mn))if(Tp(t))Zs(yn(Zf,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:Et.INVALID_ARGUMENTS},"")}else{e({errorCode:Et.OLD_PLATFORM},"")}else{e({errorCode:Et.NOT_SUPPORTED_ON_PLATFORM},"")}}function hp(e,t){if(null==e||null==t||e.length<=0)return null;let n=null,r=1;return e.sort(((e,t)=>e.sequence>t.sequence?1:-1)),e.forEach((e=>{e.sequence==r&&(n=n?new Blob([n,e.file],{type:t}):new Blob([e.file],{type:t}),r++)})),n}function wp(e,t){if(null==e||null==t)return null;const n=atob(e.chunk),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const o=new Uint8Array(r),i=new Blob([o],{type:t});return{sequence:e.chunkSequence,file:i}}function vp(e){Sp(e)?wr(An):Ep(e)?wr(In):bp(e)&&wr(Tn)}function Cp(e){return!(e.mediaType!=np.Video||!e.videoProps||!e.videoProps.videoController)}function yp(e){return!(null==e||e.maxMediaCount>10)}function bp(e){var t;return!((null==e?void 0:e.mediaType)!=np.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Sp(e){return!(!e||e.mediaType!=np.VideoAndImage&&!e.videoAndImageProps)}function Ep(e){return!(!e||e.mediaType!=np.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Ap(e,t,n){return null!=e&&null!=t&&t==Xf.ID&&null!=n}function Ip(e){return!(null==e||e.length<=0||e.length>10)}function Tp(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Pp(e){if(e){if(e.title&&"string"!=typeof e.title)return!1;if(e.setSelected&&"object"!=typeof e.setSelected)return!1;if(e.openOrgWideSearchInChatOrChannel&&"boolean"!=typeof e.openOrgWideSearchInChatOrChannel)return!1;if(e.singleSelect&&"boolean"!=typeof e.singleSelect)return!1}return!0}!function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(Yf||(Yf={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(ep||(ep={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(tp||(tp={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(np||(np={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(rp||(rp={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(op||(op={}));const Op="v2";function Rp(e){return new Promise((t=>{if(gr(Kn,Mt.content,Mt.task),!Mp())throw Ht;if(!Tp(e))throw{errorCode:Et.INVALID_ARGUMENTS};t(Bs(yn(Op,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function Fp(){if(gr(Kn,Mt.content,Mt.task),!Mp())throw Ht;const e=At.Media;return new Promise((t=>{t(Bs(yn(Op,"barCode.hasPermission"),"permissions.has",e))}))}function kp(){if(gr(Kn,Mt.content,Mt.task),!Mp())throw Ht;const e=At.Media;return new Promise((t=>{t(Bs(yn(Op,"barCode.requestPermission"),"permissions.request",e))}))}function Mp(){return!!(gr(Kn)&&Kn.supports.barCode&&Kn.supports.permissions)}const Np="v2";function xp(e){return Lp(yn(Np,"chat.openChat"),e)}function Lp(e,t){return new Promise((n=>{if(gr(Kn,Mt.content,Mt.task),!Dp())throw Ht;if(Kn.isLegacyTeams)n(_s(e,"executeDeepLink",jf([t.user],void 0,t.message)));else{n(_s(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Up(e){const t=yn(Np,"chat.openGroupChat");return new Promise((n=>{if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){const r={user:e.users[0],message:e.message};n(Lp(t,r))}else{if(gr(Kn,Mt.content,Mt.task),!Dp())throw Ht;if(Kn.isLegacyTeams)n(_s(t,"executeDeepLink",jf(e.users,e.topic,e.message)));else{n(_s(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function Dp(){return!(!gr(Kn)||!Kn.supports.chat)}var Hp=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Vp="v2";function _p(e){return Hp(this,void 0,void 0,(function*(){if(gr(Kn,Mt.content,Mt.meetingStage,Mt.task,Mt.settings,Mt.stage,Mt.sidePanel),!Bp())throw Ht;if(!e.type||!Object.values(Rt).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Rt)}`);const t=yield tn(e),n={mimeType:e.type,content:t};return Bs(yn(Vp,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function Wp(){return Hp(this,void 0,void 0,(function*(){gr(Kn,Mt.content,Mt.meetingStage,Mt.task,Mt.settings,Mt.stage,Mt.sidePanel);const e=yn(Vp,"clipboard.read");if(!Bp())throw Ht;const t=yield Bs(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return en(e.mimeType,e.content)}return t}))}function Bp(){return Bn.isFramelessWindow?!(!gr(Kn)||!Kn.supports.clipboard):!!(gr(Kn)&&navigator&&navigator.clipboard&&Kn.supports.clipboard)}function jp(){var e;return null!==(e=gr(Kn)&&(Kn.isNAAChannelRecommended||zp()))&&void 0!==e&&e}function zp(){return!!(gr(Kn)&&$p()&&Kn.isLegacyTeams&&Kn.supports.nestedAppAuth)}function $p(){return Bn.hostClientType===Ft.android||Bn.hostClientType===Ft.ios||Bn.hostClientType===Ft.ipados}const qp="v2";function Gp(){if(gr(Kn,Mt.content,Mt.task),!Kp())throw Ht;return Bs(yn(qp,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Jp(e){if(gr(Kn,Mt.content,Mt.task),!Kp())throw Ht;if(!e)throw{errorCode:Et.INVALID_ARGUMENTS};return Bs(yn(qp,"geoLocation.showLocation"),"location.showLocation",e)}function Kp(){return!!(gr(Kn)&&Kn.supports.geoLocation&&Kn.supports.geoLocation.map&&Kn.supports.permissions)}const Zp="v2";function Qp(){if(gr(Kn,Mt.content,Mt.task),!eg())throw Ht;return Bs(yn(Zp,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Xp(){if(gr(Kn,Mt.content,Mt.task),!eg())throw Ht;const e=At.GeoLocation;return new Promise((t=>{t(Bs(yn(Zp,"geoLocation.hasPermission"),"permissions.has",e))}))}function Yp(){if(gr(Kn,Mt.content,Mt.task),!eg())throw Ht;const e=At.GeoLocation;return new Promise((t=>{t(Bs(yn(Zp,"geoLocation.requestPermission"),"permissions.request",e))}))}function eg(){return!!(gr(Kn)&&Kn.supports.geoLocation&&Kn.supports.permissions)}function tg(){return Kn.hostVersionsInfo?Kn.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const ng="v1";class rg{postMessage(e,t){gr(Kn),Zs(yn(ng,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||jt())}addEventListener(e,t){gr(Kn),"message"===e&&ss(yn(ng,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class og{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){gr(Kn,Mt.task),Zs(yn(ng,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||jt())}addEventListener(e,t){gr(Kn,Mt.task),"message"===e&&ss(yn(ng,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const ig="v2";function ag(e){if(gr(Kn,Mt.content),!sg())throw Ht;if(!e||!Yt(e))throw{errorCode:Et.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Bs(yn(ig,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function sg(){return!(!gr(Kn)||!Kn.supports.secondaryBrowser)}const cg="v1";function lg(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),!mr(On))throw{errorCode:Et.OLD_PLATFORM};if(!e)throw{errorCode:Et.INVALID_ARGUMENTS};if(!dg())throw Ht;Zs(yn(cg,"location.getLocation"),"location.getLocation",[e],t)}function ug(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(gr(Kn,Mt.content,Mt.task),!mr(On))throw{errorCode:Et.OLD_PLATFORM};if(!e)throw{errorCode:Et.INVALID_ARGUMENTS};if(!dg())throw Ht;Zs(yn(cg,"location.showLocation"),"location.showLocation",[e],t)}function dg(){return!(!gr(Kn)||!Kn.supports.location)}const fg="v1";function pg(e){gr(Kn,Mt.sidePanel),e.contentUrl&&new URL(e.contentUrl),Zs(yn(fg,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var gg=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const mg="v1";var hg,wg,vg,Cg,yg,bg;function Sg(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Eg(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Ag(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage,Mt.settings,Mt.content),Zs(yn(mg,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Ig(){var e,t,n;return gg(this,void 0,void 0,(function*(){let r;gr(Kn,Mt.sidePanel,Mt.meetingStage,Mt.settings,Mt.content);try{const e=!0;r=yield Bs(yn("v2","meeting.getMeetingDetailsVerbose"),"meeting.getMeetingDetails",e)}catch(t){throw new Error(null===(e=null==t?void 0:t.errorCode)||void 0===e?void 0:e.toString())}if(((null===(t=r.details)||void 0===t?void 0:t.type)==Cg.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Cg.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Et.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Tg(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage,Mt.task),Zs(yn(mg,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Pg(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");gr(Kn,Mt.sidePanel),Zs(yn(mg,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function Og(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");gr(Kn,Mt.sidePanel),Zs(yn(mg,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Rg(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");gr(Kn,Mt.sidePanel),Zs(yn(mg,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function Fg(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");gr(Kn,Mt.sidePanel),ss(yn(mg,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function kg(e,t,n={sharingProtocol:yg.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Mg(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Ng(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function xg(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Lg(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),ss(yn(mg,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Ug(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),ss(yn(mg,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Dg(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),ss(yn(mg,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Hg(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));gr(Kn);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||bg.Other};return Bs(yn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Vg(e,t){if(!t)throw new Error("[requestAppAudioHandling] Callback response cannot be null");if(!e.micMuteStateChangedCallback)throw new Error("[requestAppAudioHandling] Callback Mic mute state handler cannot be null");gr(Kn,Mt.sidePanel,Mt.meetingStage),e.isAppHandlingAudio?_g(e,t):Wg(e,t)}function _g(e,t){Zs(yn(mg,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((n,r)=>{if(n&&null!=r)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(n)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${n.errorCode} ${n.message}`);if("boolean"!=typeof r)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");ss(yn(mg,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>gg(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);jg(n,n.isMicMuted===t.isMicMuted?hg.HostInitiated:hg.AppDeclinedToChange)}catch(e){jg(t,hg.AppFailedToChange)}}))));ss(yn(mg,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function Wg(e,t){Zs(yn(mg,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");ls("meeting.micStateChanged")&&cs("meeting.micStateChanged"),ls("meeting.audioDeviceSelectionChanged")&&cs("meeting.audioDeviceSelectionChanged"),t(n)}))}function Bg(e){jg(e,hg.AppInitiated)}function jg(e,t){gr(Kn,Mt.sidePanel,Mt.meetingStage),Zs(yn(mg,"meeting.setMicStateWithReason"),"meeting.updateMicState",[e,t])}!function(e){e[e.HostInitiated=0]="HostInitiated",e[e.AppInitiated=1]="AppInitiated",e[e.AppDeclinedToChange=2]="AppDeclinedToChange",e[e.AppFailedToChange=3]="AppFailedToChange"}(hg||(hg={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(wg||(wg={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(vg||(vg={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Cg||(Cg={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(yg||(yg={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(bg||(bg={}));const zg="v1",$g="v2";function qg(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=yn(zg,"monetization.openPurchaseExperience")):(r=e,o=yn($g,"monetization.openPurchaseExperience"));return gr(Kn,Mt.content),Kt((()=>new Promise((e=>{if(!Gg())throw Ht;e(Bs(o,"monetization.openPurchaseExperience",r))}))),n)}function Gg(){return!(!gr(Kn)||!Kn.supports.monetization)}const Jg="v2";function Kg(e){return new Promise((t=>{if(gr(Kn,Mt.content),!Qg())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(_s(yn(Jg,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function Zg(e){return new Promise((t=>{if(gr(Kn,Mt.content),!Qg())throw new Error("Not supported");const n=yn(Jg,"calendar.composeMeeting");Kn.isLegacyTeams?t(_s(n,"executeDeepLink",$f(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(_s(n,"calendar.composeMeeting",e))}))}function Qg(){return!(!gr(Kn)||!Kn.supports.calendar)}const Xg="v2";function Yg(e){return new Promise((t=>{if(gr(Kn,Mt.content),!tm())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(_s(yn(Xg,"mail.openMailItem"),"mail.openMailItem",e))}))}function em(e){return new Promise((t=>{if(gr(Kn,Mt.content),!tm())throw new Error("Not supported");t(_s(yn(Xg,"mail.composeMail"),"mail.composeMail",e))}))}function tm(){return!(!gr(Kn)||!Kn.supports.mail)}var nm;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(nm||(nm={}));const rm="v2";function om(){if(!Bn.printCapabilityEnabled){if(gr(Kn),!um())throw Ht;Bn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(im(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function im(){nn().print()}function am(e){sm(yn(rm,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Tr(e)&&!um())throw Ht}))}function sm(e,t,n){!Tr(t)&&gr(Kn),!Tr(t)&&n&&n(),ms(e,t)}function cm(e){lm(yn(rm,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Tr(e)&&!um())throw Ht}))}function lm(e,t,n){!Tr(t)&&gr(Kn),!Tr(t)&&n&&n(),vs(e,t)}function um(){return!(!gr(Kn)||!Kn.supports.teamsCore)}const dm="v1",fm="v2";function pm(e,t){let n,r;gr(Kn,Mt.content,Mt.task,Mt.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=yn(dm,"people.selectPeople")):(r=e,o=yn(fm,"people.selectPeople")),Gt(gm,n,o,r)}function gm(e,t){return new Promise((n=>{if(!mr(Rn))throw{errorCode:Et.OLD_PLATFORM};if(!Pp(t))throw{errorCode:Et.INVALID_ARGUMENTS};if(!mm())throw Ht;n(Bs(e,"people.selectPeople",t))}))}function mm(){return!(!gr(Kn)||!Kn.supports.people)}function hm(e){return e?e.modality&&"string"!=typeof e.modality?[!1,"modality must be a string"]:e.targetElementBoundingRect&&"object"==typeof e.targetElementBoundingRect?e.triggerType&&"string"==typeof e.triggerType?wm(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function wm(e){return e?e.displayName&&"string"!=typeof e.displayName?[!1,"displayName must be a string"]:e.identifiers&&"object"==typeof e.identifiers?e.identifiers.AadObjectId||e.identifiers.Smtp||e.identifiers.Upn?e.identifiers.AadObjectId&&"string"!=typeof e.identifiers.AadObjectId?[!1,"AadObjectId identifier must be a string"]:e.identifiers.Smtp&&"string"!=typeof e.identifiers.Smtp?[!1,"Smtp identifier must be a string"]:e.identifiers.Upn&&"string"!=typeof e.identifiers.Upn?[!1,"Upn identifier must be a string"]:[!0,void 0]:[!1,"at least one valid identifier must be provided"]:[!1,"persona identifiers object must be provided"]:[!1,"persona object must be provided"]}const vm="v2";function Cm(e){return gr(Kn,Mt.content),new Promise((t=>{const[n,r]=hm(e);if(!n)throw{errorCode:Et.INVALID_ARGUMENTS,message:r};const o={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(Bs(yn(vm,"profile.showProfile"),"profile.showProfile",o))}))}function ym(){return!(!gr(Kn)||!Kn.supports.profile)}const bm="v2",Sm="search.queryChange",Em="search.queryClose",Am="search.queryExecute";function Im(e,t,n){if(gr(Kn,Mt.content),!Pm())throw Ht;ss(yn(bm,"search.registerOnClosedHandler"),Em,e),ss(yn(bm,"search.registerOnExecutedHandler"),Am,t),n&&ss(yn(bm,"search.registerOnChangeHandler"),Sm,n)}function Tm(){if(gr(Kn,Mt.content),!Pm())throw Ht;Zs(yn(bm,"search.unregisterHandlers"),"search.unregister"),cs(Sm),cs(Em),cs(Am)}function Pm(){return!(!gr(Kn)||!Kn.supports.search)}function Om(){return new Promise((e=>{if(gr(Kn,Mt.content),!Pm())throw new Error("Not supported");e(_s(yn(bm,"search.closeSearch"),"search.closeSearch"))}))}var Rm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Fm="v2";function km(){return Rm(this,void 0,void 0,(function*(){if(gr(Kn,Mt.sidePanel,Mt.meetingStage),!Mm())throw Ht;return yield Bs(yn(Fm,"sharing.history.getContent"),"sharing.history.getContent")}))}function Mm(){var e;return gr(Kn)&&void 0!==(null===(e=Kn.supports.sharing)||void 0===e?void 0:e.history)}const Nm="v1",xm="v2",Lm={shareWebContent:"sharing.shareWebContent"};function Um(e,t){try{Hm(e),Vm(e),_m(e)}catch(e){return Jt((()=>Promise.reject(e)),t)}gr(Kn,Mt.content,Mt.sidePanel,Mt.task,Mt.stage,Mt.meetingStage);return Jt(Dm,t,yn(t?Nm:xm,"sharing.shareWebContent"),e)}function Dm(e,t){return new Promise((n=>{if(!Wm())throw Ht;n(Bs(e,Lm.shareWebContent,t))}))}function Hm(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Et.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Vm(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:Et.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:Et.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function _m(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:Et.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:Et.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Wm(){return!(!gr(Kn)||!Kn.supports.sharing)}const Bm="v2";function jm(){return new Promise((e=>{if(gr(Kn,Mt.content),!zm())throw Ht;e(Bs(yn(Bm,"stageView.self.close"),"stageView.self.close"))}))}function zm(){var e;return gr(Kn)&&void 0!==(null===(e=Kn.supports.stageView)||void 0===e?void 0:e.self)}const $m="v2";var qm;function Gm(e){return new Promise((t=>{if(gr(Kn,Mt.content),!Jm())throw Ht;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Bs(yn($m,"stageView.open"),"stageView.open",e))}))}function Jm(){return!(!gr(Kn)||!Kn.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(qm||(qm={}));const Km=10;var Zm=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};const Qm="v2";function Xm(e){return Zm(this,void 0,void 0,(function*(){gr(Kn,Mt.content,Mt.task),th(),nh(e);const t=yield Bs(yn(Qm,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return rh(e.maxVisualMediaCount,t),t}))}function Ym(e){return Zm(this,void 0,void 0,(function*(){gr(Kn,Mt.content,Mt.task),th(),nh(e);const t=yield Bs(yn(Qm,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return rh(e.maxVisualMediaCount,t),t}))}function eh(){return!!(gr(Kn)&&Kn.supports.visualMedia&&Kn.supports.visualMedia.image&&Kn.supports.permissions)}function th(){if(!eh())throw Ht}function nh(e){if(!e||e.maxVisualMediaCount>Km||e.maxVisualMediaCount<1)throw Wt}function rh(e,t){if(t.length>e)throw Bt}const oh="v2";var ih,ah;function sh(){if(gr(Kn,Mt.content,Mt.task),!eh())throw Ht;const e=At.Media;return Bs(yn(oh,"visualMedia.hasPermission"),"permissions.has",e)}function ch(){if(gr(Kn,Mt.content,Mt.task),!eh())throw Ht;const e=At.Media;return Bs(yn(oh,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(ih||(ih={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(ah||(ah={}));var lh=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let uh=null;function dh(){return lh(this,void 0,void 0,(function*(){return null===uh&&(uh=(yield co()).app.host.name),uh}))}var fh=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};function ph(){return fh(this,void 0,void 0,(function*(){if(gr(Kn),!mh())throw Ht;return!(!Kn.isLegacyTeams||Bn.hostClientType!==Ft.android&&Bn.hostClientType!==Ft.ios&&Bn.hostClientType!==Ft.ipados||(yield gh())!==kt.teams)||(yield Vs(yn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function gh(){return fh(this,void 0,void 0,(function*(){return dh()}))}function mh(){return gr(Kn)&&void 0!==Kn.supports.webStorage}const hh="v2";var wh;function vh(e){const t=yn(hh,"call.startCall");return new Promise((n=>{var r;if(gr(Kn,Mt.content,Mt.task),!Ch())throw Ht;if(!Kn.isLegacyTeams)return Zs(t,"call.startCall",[e],n);n(Vs(t,"executeDeepLink",zf(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(wh.Video),e.source)).then((e=>{if(!e)throw new Error(Wn);return e})))}))}function Ch(){return!(!gr(Kn)||!Kn.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(wh||(wh={}));const yh="v1";function bh(){Zi(yn(yh,"appInitialization.notifyAppLoaded"))}function Sh(){Zs(yn(yh,"appInitialization.notifySuccess"),eo.Success,[lr])}function Eh(e){Xi(yn(yh,"appInitialization.notifyFailure"),e)}function Ah(e){Qi(yn(yh,"appInitialization.notifyExpectedFailure"),e)}const Ih=Cn("thirdPartyCloudStorage"),Th="v2";class Ph{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let Oh=[],Rh=null,Fh=!0,kh=null;function Mh(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(gr(Kn,Mt.content,Mt.task),!xh())throw Ht;if(kh)throw kh=null,new Error("getDragAndDropFiles cannot be called twice");kh=t,Fh=!0,Zs(yn(Th,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],Nh)}else{t([],{errorCode:Et.INVALID_ARGUMENTS})}}function Nh(e){if(kh)if(e&&e.error)kh([],e.error),kh=null;else if(e&&e.fileChunk)try{Fh||0!==e.fileChunk.chunkSequence||(Ih("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),Fh=!0,kh([],{errorCode:Et.INTERNAL_ERROR,message:"error occurred while receiving data"}),Oh=[],kh=null);const t=wp(e.fileChunk,e.fileType);if(t?(Rh||(Rh=new Ph(e.fileType,[])),Rh.assembleAttachment.push(t)):(Ih(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),kh?kh([],{errorCode:Et.INTERNAL_ERROR,message:"error occurred while receiving data"}):kh=null,Oh=[],kh=null,Fh=!0),Fh=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&Rh){const t=hp(Rh.assembleAttachment,Rh.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});Oh.push(n)}e.isLastFile&&kh&&(kh(Oh,e.error),Oh=[],kh=null,Fh=!0),Rh=null}}catch(e){kh&&(kh([],{errorCode:Et.INTERNAL_ERROR,message:e}),Oh=[],kh=null,Fh=!0)}else kh([],{errorCode:Et.INTERNAL_ERROR,message:"data received is null"}),Oh=[],kh=null,Fh=!0}function xh(){return!(!gr(Kn)||!Kn.supports.thirdPartyCloudStorage)}const Lh="v1";function Uh(e,t){Ki(yn(Lh,"initialize"),t).then((()=>{e&&e()}))}function Dh(){om()}function Hh(){im()}function Vh(e){pr(),Zs(yn(Lh,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=Bn.frameContext),e(t)}))}function _h(e){oa(yn(Lh,"registerOnThemeChangeHandlerHelper"),e)}function Wh(e){us(yn(Lh,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Bh(e){us(yn(Lh,"registerAppButtonClickHandler"),"appButtonClick",e,[Mt.content])}function jh(e){us(yn(Lh,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[Mt.content])}function zh(e){us(yn(Lh,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[Mt.content])}function $h(e){Qa(yn(Lh,"registerBackButtonHandler"),e)}function qh(e){sm(yn(Lh,"registerOnLoadHandler"),e)}function Gh(e){lm(yn(Lh,"registerBeforeUnloadHandler"),e)}function Jh(e){us(yn(Lh,"registerFocusEnterHandler"),"focusEnter",e,[])}function Kh(e){us(yn(Lh,"registerChangeSettingsHandler"),"changeSettings",e,[Mt.content])}function Zh(e,t){gr(Kn),Da(yn(Lh,"getTabInstances"),t).then((t=>{e(t)}))}function Qh(e,t){gr(Kn),Ha(yn(Lh,"getMruTabInstances"),t).then((t=>{e(t)}))}function Xh(e){Va(yn(Lh,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Yh(e,t){gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.task,Mt.stage,Mt.meetingStage);const n=null!=t?t:jt();ia(yn(Lh,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function ew(e){_a(yn(Lh,"setFrameContext"),e)}function tw(e,t,n){Ki(yn(Lh,"initializeWithFrameContext"),n).then((()=>t&&t())),_a(yn(Lh,"setFrameContext"),e)}const nw="v1";function rw(e){Ua(yn(nw,"navigation.returnFocus"),e)}function ow(e,t){gr(Kn);const n=null!=t?t:jt();La(yn(nw,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function iw(e,t){gr(Kn,Mt.content,Mt.sidePanel,Mt.settings,Mt.remove,Mt.task,Mt.stage,Mt.meetingStage);const n=null!=t?t:jt();Na(yn(nw,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function aw(e){gr(Kn);const t=null!=e?e:jt();xa(yn(nw,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const sw="v1";function cw(e){Wa(yn(sw,"settings.setValidityState"),e)}function lw(e){gr(Kn,Mt.content,Mt.settings,Mt.remove,Mt.sidePanel),Ba(yn(sw,"settings.getSettings")).then((t=>{e(t)}))}function uw(e,t){gr(Kn,Mt.content,Mt.settings,Mt.sidePanel);const n=null!=t?t:jt();ja(yn(sw,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function dw(e){Li(yn(sw,"settings.registerOnSaveHandler"),e)}function fw(e){Di(yn(sw,"settings.registerOnRemoveHandler"),e)}var pw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const gw="v1";function mw(e,t){const n=yn(gw,"tasks.startTask"),r=t?e=>{var n,r;return t(null!==(n=e.err)&&void 0!==n?n:"",null!==(r=e.result)&&void 0!==r?r:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(gr(Kn,Mt.content,Mt.sidePanel,Mt.meetingStage),Zs(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?ni(n,Cw(e),r):ti(n,vw(e),r),new rg}function hw(e){e=yw(e);const{width:t,height:n}=e,r=pw(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ei(yn(gw,"tasks.updateTask"),e)}function ww(e,t){ri(yn(gw,"tasks.submitTask"),e,t)}function vw(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:Lt.Small,width:e.width?e.width:Lt.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Cw(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:Lt.Small,width:e.width?e.width:Lt.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function yw(e){return e.height=e.height?e.height:Lt.Small,e.width=e.width?e.width:Lt.Small,e}const bw="v2";var Sw,Ew;function Aw(){return!(!gr(Kn,Mt.meetingStage,Mt.sidePanel,Mt.content)||!Kn.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(Sw||(Sw={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(Ew||(Ew={}));class Iw{getFluidTenantInfo(){return Tw(),new Promise((e=>{e(Bs(yn(bw,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return Tw(),new Promise((e=>{e(Bs(yn(bw,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return Tw(),new Promise((e=>{e(Bs(yn(bw,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return Tw(),new Promise((t=>{t(Bs(yn(bw,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return Tw(),new Iw}}function Tw(){if(!Aw())throw new Error("LiveShareHost Not supported")}var Pw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Ow(e){try{return e.cartItems=Rw(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Rw(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Rw(e.accessories)),e}))}const Fw=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=Pw(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=Fw(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function kw(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)Nw(t),Mw(t.accessories)}function Mw(e){if(null!=e){if(!Array.isArray(e)||0===e.length)throw new Error("CartItem.accessories must be a non-empty array");for(const t of e){if(t.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");Nw(t)}}}function Nw(e){if(!e.id)throw new Error("cartItem.id must not be empty");if(!e.name)throw new Error("cartItem.name must not be empty");Lw(e.price),Uw(e.quantity)}function xw(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===Ct(e))throw new Error("id must be a valid UUID")}}function Lw(e){if("number"!=typeof e||e<0)throw new Error(`price ${e} must be a number not less than 0`);if(parseFloat(e.toFixed(3))!==e)throw new Error(`price ${e} must have at most 3 decimal places`)}function Uw(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Dw(e){if(!Object.values(Ww).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Hw="v2",Vw={majorVersion:1,minorVersion:1};var _w,Ww;function Bw(){if(gr(Kn,Mt.content,Mt.task),!qw())throw Ht;return Bs(yn(Hw,"marketplace.getCart"),"marketplace.getCart",Vw).then(Ow)}function jw(e){if(gr(Kn,Mt.content,Mt.task),!qw())throw Ht;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return xw(null==e?void 0:e.cartId),kw(null==e?void 0:e.cartItems),Bs(yn(Hw,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:Fw(e.cartItems),cartVersion:Vw})).then(Ow)}function zw(e){if(gr(Kn,Mt.content,Mt.task),!qw())throw Ht;if(!e)throw new Error("removeCartItemsParams must be provided");if(xw(null==e?void 0:e.cartId),!Array.isArray(null==e?void 0:e.cartItemIds)||0===(null==e?void 0:e.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return Bs(yn(Hw,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Vw})).then(Ow)}function $w(e){if(gr(Kn,Mt.content,Mt.task),!qw())throw Ht;if(!e)throw new Error("updateCartStatusParams must be provided");return xw(null==e?void 0:e.cartId),Dw(null==e?void 0:e.cartStatus),Bs(yn(Hw,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Vw})).then(Ow)}function qw(){return!(!gr(Kn)||!Kn.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(_w||(_w={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Ww||(Ww={}))})(),r})()));
2
2
  //# sourceMappingURL=MicrosoftTeams.min.js.map