PageSourceSearch

https://fridayreport.ai/assets/index-CCvocXmc.js

js fridayreport.ai collected 2026-10-05 13:59:22 UTC 209,669 bytes, 6 lines download raw bytes

1var Qo,Zo,Xo;(function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"})(Qo||(Qo={})),(function(e){e.view="view",e.edit="edit",e.editNew="editNew"})(Zo||(Zo={})),(function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"})(Xo||(Xo={}));function ke(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){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 S(e,t,n,r){return new(n||(n=Promise))(function(o,i){function c(g){try{m(r.next(g))}catch(f){i(f)}}function d(g){try{m(r.throw(g))}catch(f){i(f)}}function m(g){var f;g.done?o(g.value):(f=g.value,f instanceof n?f:new n(function(b){b(f)})).then(c,d)}m((r=r.apply(e,[])).next())})}const qi={childProxyingCommunication:!1};function Fv(){qi.childProxyingCommunication=!0}function Gi(){return qi.childProxyingCommunication}let io={disableEnforceOriginMatchForChildResponses:!1};function Yi(){return io}function Pl(e){io=e}function kv(e){return Pl(Object.assign(Object.assign({},io),e)),Yi()}var ei=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},fe=[],Z=[],Ol=typeof Uint8Array<"u"?Uint8Array:Array,ao=!1;function Ji(){ao=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)fe[t]=e[t],Z[e.charCodeAt(t)]=t;Z[45]=62,Z[95]=63}function _l(e){return fe[e>>18&63]+fe[e>>12&63]+fe[e>>6&63]+fe[63&e]}function Rl(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16)+(e[i+1]<<8)+e[i+2],o.push(_l(r));return o.join("")}function ti(e){var t;ao||Ji();for(var n=e.length,r=n%3,o="",i=[],c=16383,d=0,m=n-r;d<m;d+=c)i.push(Rl(e,d,d+c>m?m:d+c));return r===1?(t=e[n-1],o+=fe[t>>2],o+=fe[t<<4&63],o+="=="):r===2&&(t=(e[n-2]<<8)+e[n-1],o+=fe[t>>10],o+=fe[t>>4&63],o+=fe[t<<2&63],o+="="),i.push(o),i.join("")}function Mt(e,t,n,r,o){var i,c,d=8*o-r-1,m=(1<<d)-1,g=m>>1,f=-7,b=n?o-1:0,T=n?-1:1,R=e[t+b];for(b+=T,i=R&(1<<-f)-1,R>>=-f,f+=d;f>0;i=256*i+e[t+b],b+=T,f-=8);for(c=i&(1<<-f)-1,i>>=-f,f+=r;f>0;c=256*c+e[t+b],b+=T,f-=8);if(i===0)i=1-g;else{if(i===m)return c?NaN:1/0*(R?-1:1);c+=Math.pow(2,r),i-=g}return(R?-1:1)*c*Math.pow(2,i-r)}function Ki(e,t,n,r,o,i){var c,d,m,g=8*i-o-1,f=(1<<g)-1,b=f>>1,T=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,R=r?0:i-1,_=r?1:-1,k=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(d=isNaN(t)?1:0,c=f):(c=Math.floor(Math.log(t)/Math.LN2),t*(m=Math.pow(2,-c))<1&&(c--,m*=2),(t+=c+b>=1?T/m:T*Math.pow(2,1-b))*m>=2&&(c++,m/=2),c+b>=f?(d=0,c=f):c+b>=1?(d=(t*m-1)*Math.pow(2,o),c+=b):(d=t*Math.pow(2,b-1)*Math.pow(2,o),c=0));o>=8;e[n+R]=255&d,R+=_,d/=256,o-=8);for(c=c<<o|d,g+=o;g>0;e[n+R]=255&c,R+=_,c/=256,g-=8);e[n+R-_]|=128*k}var Ml={}.toString,Qi=Array.isArray||function(e){return Ml.call(e)=="[object Array]"};function Vt(){return v.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Se(e,t){if(Vt()<t)throw new RangeError("Invalid typed array length");return v.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=v.prototype:(e===null&&(e=new v(t)),e.length=t),e}function v(e,t,n){if(!(v.TYPED_ARRAY_SUPPORT||this instanceof v))return new v(e,t,n);if(typeof e=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return Xn(this,e)}return Zi(this,e,t,n)}function Zi(e,t,n,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?(function(o,i,c,d){if(i.byteLength,c<0||i.byteLength<c)throw new RangeError("'offset' is out of bounds");if(i.byteLength<c+(d||0))throw new RangeError("'length' is out of bounds");return i=c===void 0&&d===void 0?new Uint8Array(i):d===void 0?new Uint8Array(i,c):new Uint8Array(i,c,d),v.TYPED_ARRAY_SUPPORT?(o=i).__proto__=v.prototype:o=Bn(o,i),o})(e,t,n,r):typeof t=="string"?(function(o,i,c){if(typeof c=="string"&&c!==""||(c="utf8"),!v.isEncoding(c))throw new TypeError('"encoding" must be a valid string encoding');var d=0|ea(i,c);o=Se(o,d);var m=o.write(i,c);return m!==d&&(o=o.slice(0,m)),o})(e,t,n):(function(o,i){if(pe(i)){var c=0|so(i.length);return(o=Se(o,c)).length===0||i.copy(o,0,0,c),o}if(i){if(typeof ArrayBuffer<"u"&&i.buffer instanceof ArrayBuffer||"length"in i)return typeof i.length!="number"||(d=i.length)!=d?Se(o,0):Bn(o,i);if(i.type==="Buffer"&&Qi(i.data))return Bn(o,i.data)}var d;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")})(e,t)}function Xi(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Xn(e,t){if(Xi(t),e=Se(e,t<0?0:0|so(t)),!v.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function Bn(e,t){var n=t.length<0?0:0|so(t.length);e=Se(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function so(e){if(e>=Vt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Vt().toString(16)+" bytes");return 0|e}function pe(e){return!(e==null||!e._isBuffer)}function ea(e,t){if(pe(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var n=e.length;if(n===0)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Bt(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return oa(e).length;default:if(r)return Bt(e).length;t=(""+t).toLowerCase(),r=!0}}function Fl(e,t,n){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return zl(this,t,n);case"utf8":case"utf-8":return na(this,t,n);case"ascii":return jl(this,t,n);case"latin1":case"binary":return Hl(this,t,n);case"base64":return xl(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vl(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function je(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function ni(e,t,n,r,o){if(e.length===0)return-1;if(typeof n=="string"?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if(typeof t=="string"&&(t=v.from(t,r)),pe(t))return t.length===0?-1:ri(e,t,n,r,o);if(typeof t=="number")return t&=255,v.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):ri(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function ri(e,t,n,r,o){var i,c=1,d=e.length,m=t.length;if(r!==void 0&&((r=String(r).toLowerCase())==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(e.length<2||t.length<2)return-1;c=2,d/=2,m/=2,n/=2}function g(R,_){return c===1?R[_]:R.readUInt16BE(_*c)}if(o){var f=-1;for(i=n;i<d;i++)if(g(e,i)===g(t,f===-1?0:i-f)){if(f===-1&&(f=i),i-f+1===m)return f*c}else f!==-1&&(i-=i-f),f=-1}else for(n+m>d&&(n=d-m),i=n;i>=0;i--){for(var b=!0,T=0;T<m;T++)if(g(e,i+T)!==g(t,T)){b=!1;break}if(b)return i}return-1}function kl(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var c=0;c<r;++c){var d=parseInt(t.substr(2*c,2),16);if(isNaN(d))return c;e[n+c]=d}return c}function Ul(e,t,n,r){return fn(Bt(t,e.length-n),e,n,r)}function ta(e,t,n,r){return fn((function(o){for(var i=[],c=0;c<o.length;++c)i.push(255&o.charCodeAt(c));return i})(t),e,n,r)}function Nl(e,t,n,r){return ta(e,t,n,r)}function Dl(e,t,n,r){return fn(oa(t),e,n,r)}function Ll(e,t,n,r){return fn((function(o,i){for(var c,d,m,g=[],f=0;f<o.length&&!((i-=2)<0);
1++f)d=(c=o.charCodeAt(f))>>8,m=c%256,g.push(m),g.push(d);return g})(t,e.length-n),e,n,r)}function xl(e,t,n){return t===0&&n===e.length?ti(e):ti(e.slice(t,n))}function na(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,c,d,m,g=e[o],f=null,b=g>239?4:g>223?3:g>191?2:1;if(o+b<=n)switch(b){case 1:g<128&&(f=g);break;case 2:(192&(i=e[o+1]))==128&&(m=(31&g)<<6|63&i)>127&&(f=m);break;case 3:i=e[o+1],c=e[o+2],(192&i)==128&&(192&c)==128&&(m=(15&g)<<12|(63&i)<<6|63&c)>2047&&(m<55296||m>57343)&&(f=m);break;case 4:i=e[o+1],c=e[o+2],d=e[o+3],(192&i)==128&&(192&c)==128&&(192&d)==128&&(m=(15&g)<<18|(63&i)<<12|(63&c)<<6|63&d)>65535&&m<1114112&&(f=m)}f===null?(f=65533,b=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=b}return(function(T){var R=T.length;if(R<=oi)return String.fromCharCode.apply(String,T);for(var _="",k=0;k<R;)_+=String.fromCharCode.apply(String,T.slice(k,k+=oi));return _})(r)}v.TYPED_ARRAY_SUPPORT=ei.TYPED_ARRAY_SUPPORT===void 0||ei.TYPED_ARRAY_SUPPORT,Vt(),v.poolSize=8192,v._augment=function(e){return e.__proto__=v.prototype,e},v.from=function(e,t,n){return Zi(null,e,t,n)},v.TYPED_ARRAY_SUPPORT&&(v.prototype.__proto__=Uint8Array.prototype,v.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&v[Symbol.species]),v.alloc=function(e,t,n){return(function(r,o,i,c){return Xi(o),o<=0?Se(r,o):i!==void 0?typeof c=="string"?Se(r,o).fill(i,c):Se(r,o).fill(i):Se(r,o)})(null,e,t,n)},v.allocUnsafe=function(e){return Xn(null,e)},v.allocUnsafeSlow=function(e){return Xn(null,e)},v.isBuffer=ql,v.compare=function(e,t){if(!pe(e)||!pe(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},v.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}},v.concat=function(e,t){if(!Qi(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return v.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=v.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var i=e[n];if(!pe(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o),o+=i.length}return r},v.byteLength=ea,v.prototype._isBuffer=!0,v.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)je(this,t,t+1);return this},v.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)je(this,t,t+3),je(this,t+1,t+2);return this},v.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)je(this,t,t+7),je(this,t+1,t+6),je(this,t+2,t+5),je(this,t+3,t+4);return this},v.prototype.toString=function(){var e=0|this.length;return e===0?"":arguments.length===0?na(this,0,e):Fl.apply(this,arguments)},v.prototype.equals=function(e){if(!pe(e))throw new TypeError("Argument must be a Buffer");return this===e||v.compare(this,e)===0},v.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},v.prototype.compare=function(e,t,n,r,o){if(!pe(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),o===void 0&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),c=(n>>>=0)-(t>>>=0),d=Math.min(i,c),m=this.slice(r,o),g=e.slice(t,n),f=0;f<d;++f)if(m[f]!==g[f]){i=m[f],c=g[f];break}return i<c?-1:c<i?1:0},v.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},v.prototype.indexOf=function(e,t,n){return ni(this,e,t,n,!0)},v.prototype.lastIndexOf=function(e,t,n){return ni(this,e,t,n,!1)},v.prototype.write=function(e,t,n,r){if(t===void 0)r="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")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,r===void 0&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((n===void 0||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");for(var i=!1;;)switch(r){case"hex":return kl(this,e,t,n);case"utf8":case"utf-8":return Ul(this,e,t,n);case"ascii":return ta(this,e,t,n);case"latin1":case"binary":return Nl(this,e,t,n);case"base64":return Dl(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ll(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var oi=4096;function jl(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function Hl(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function zl(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=Wl(e[i]);return o}function Vl(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function j(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}
vendor: 4,445 bytes, line 1
1function J(e,t,n,r,o,i){if(!pe(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function Ft(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function kt(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function ra(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function ii(e,t,n,r,o){return o||ra(e,0,n,4),Ki(e,t,n,r,23,4),n+4}function ai(e,t,n,r,o){return o||ra(e,0,n,8),Ki(e,t,n,r,52,8),n+8}v.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=t===void 0?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),v.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=v.prototype;else{var o=t-e;n=new v(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},v.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},v.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},v.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e]},v.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8},v.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1]},v.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},v.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},v.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},v.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},v.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},v.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},v.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},v.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},v.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},v.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),Mt(this,e,!0,23,4)},v.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),Mt(this,e,!1,23,4)},v.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),Mt(this,e,!0,52,8)},v.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),Mt(this,e,!1,52,8)},v.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||J(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},v.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||J(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},v.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,1,255,0),v.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},v.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ft(this,e,t,!0),t+2},v.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ft(this,e,t,!1),t+2},v.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):kt(this,e,t,!0),t+4},v.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):kt(this,e,t,!1),t+4},v.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);J(this,e,t,n,o-1,-o)}var i=0,c=1,d=0;for(this[t]=255&e;++i<n&&(c*=256);
1)e<0&&d===0&&this[t+i-1]!==0&&(d=1),this[t+i]=(e/c|0)-d&255;return t+n},v.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);J(this,e,t,n,o-1,-o)}var i=n-1,c=1,d=0;for(this[t+i]=255&e;--i>=0&&(c*=256);)e<0&&d===0&&this[t+i+1]!==0&&(d=1),this[t+i]=(e/c|0)-d&255;return t+n},v.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,1,127,-128),v.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},v.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ft(this,e,t,!0),t+2},v.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ft(this,e,t,!1),t+2},v.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,4,2147483647,-2147483648),v.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):kt(this,e,t,!0),t+4},v.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),v.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):kt(this,e,t,!1),t+4},v.prototype.writeFloatLE=function(e,t,n){return ii(this,e,t,!0,n)},v.prototype.writeFloatBE=function(e,t,n){return ii(this,e,t,!1,n)},v.prototype.writeDoubleLE=function(e,t,n){return ai(this,e,t,!0,n)},v.prototype.writeDoubleBE=function(e,t,n){return ai(this,e,t,!1,n)},v.prototype.copy=function(e,t,n,r){if(n||(n=0),r||r===0||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!v.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},v.prototype.fill=function(e,t,n,r){if(typeof e=="string"){if(typeof t=="string"?(r=t,t=0,n=this.length):typeof n=="string"&&(r=n,n=this.length),e.length===1){var o=e.charCodeAt(0);o<256&&(e=o)}if(r!==void 0&&typeof r!="string")throw new TypeError("encoding must be a string");if(typeof r=="string"&&!v.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else typeof e=="number"&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=n===void 0?this.length:n>>>0,e||(e=0),typeof e=="number")for(i=t;i<n;++i)this[i]=e;else{var c=pe(e)?e:Bt(new v(e,r).toString()),d=c.length;for(i=0;i<n-t;++i)this[i+t]=c[i%d]}return this};var Bl=/[^+\/0-9A-Za-z-_]/g;function Wl(e){return e<16?"0"+e.toString(16):e.toString(16)}function Bt(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],c=0;c<r;++c){if((n=e.charCodeAt(c))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(c+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 oa(e){return(function(t){var n,r,o,i,c,d;ao||Ji();var m=t.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");c=t[m-2]==="="?2:t[m-1]==="="?1:0,d=new Ol(3*m/4-c),o=c>0?m-4:m;var g=0;for(n=0,r=0;n<o;n+=4,r+=3)i=Z[t.charCodeAt(n)]<<18|Z[t.charCodeAt(n+1)]<<12|Z[t.charCodeAt(n+2)]<<6|Z[t.charCodeAt(n+3)],d[g++]=i>>16&255,d[g++]=i>>8&255,d[g++]=255&i;return c===2?(i=Z[t.charCodeAt(n)]<<2|Z[t.charCodeAt(n+1)]>>4,d[g++]=255&i):c===1&&(i=Z[t.charCodeAt(n)]<<10|Z[t.charCodeAt(n+1)]<<4|Z[t.charCodeAt(n+2)]>>2,d[g++]=i>>8&255,d[g++]=255&i),d})((function(t){if((t=(function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")})(t).replace(Bl,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t})(e))}function fn(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function ql(e){return e!=null&&(!!e._isBuffer||si(e)||(function(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&si(t.slice(0,0))})(e))}function si(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}var li,ui,ci,C,he,di,fi,Wt,pi,qt;function et(e){return e?.errorCode!==void 0}(function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"})(li||(li={})),(function(e){e.M365Content="m365content"})(ui||(ui={})),(function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"})(ci||(ci={})),(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_E
1RROR=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"})(C||(C={})),(function(e){e.GeoLocation="geolocation",e.Media="media"})(he||(he={})),(function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"})(di||(di={})),(function(e){e.Faculty="faculty",e.Student="student",e.Other="other"})(fi||(fi={})),(function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"})(Wt||(Wt={})),(function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"})(pi||(pi={})),(function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"})(qt||(qt={}));var $,Gt,s,gi,hi,mi,X,vi;(function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.visionOS="visionOS",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"})($||($={})),(function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"})(Gt||(Gt={})),(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"})(s||(s={})),(function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"})(gi||(gi={})),(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"})(hi||(hi={})),(function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"})(mi||(mi={})),(function(e){e.Large="large",e.Medium="medium",e.Small="small"})(X||(X={})),(function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"})(vi||(vi={}));const p={errorCode:C.NOT_SUPPORTED_ON_PLATFORM},wi={majorVersion:1,minorVersion:5},Gl={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},Yl=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),Jl=new Error("Invalid response: Received more images than the specified max limit in the response.");var bi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Ut;const Kl=new Uint8Array(16);function Ql(){if(!Ut&&(Ut=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ut))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ut(Kl)}const z=[];for(let e=0;e<256;++e)z.push((e+256).toString(16).slice(1));function Zl(e,t=0){return z[e[t+0]]+z[e[t+1]]+z[e[t+2]]+z[e[t+3]]+"-"+z[e[t+4]]+z[e[t+5]]+"-"+z[e[t+6]]+z[e[t+7]]+"-"+z[e[t+8]]+z[e[t+9]]+"-"+z[e[t+10]]+z[e[t+11]]+z[e[t+12]]+z[e[t+13]]+z[e[t+14]]+z[e[t+15]]}function ia(e,t,n){if(bi.randomUUID&&!e)return bi.randomUUID();const r=(e=e||{}).random||(e.rng||Ql)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,Zl(r)}var Xl=/^(?:[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;function aa(e){return typeof e=="string"&&Xl.test(e)}function Ue(e){return(t,n)=>{if(!t)throw new Error(n)}}function pn(e,t){if(typeof e!="string"||typeof t!="string")return NaN;const n=e.split("."),r=t.split(".");function o(i){return/^\d+$/.test(i)}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 i=0;i<n.length;++i)if(Number(n[i])!=Number(r[i]))return Number(n[i])>Number(r[i])?1:-1;return 0}function lo(){return ia()}function sa(e){return Object.keys(e).forEach(t=>{e[t]!==null&&e[t]!==void 0&&typeof e[t]=="object"&&sa(e[t])}),Object.freeze(e)}function eu(e,t,...n){const r=e(...n);return r.then(o=>{t&&t(void 0,o)}).catch(o=>{t&&t(o)}),r}function yi(e,t,...n){const r=e(...n);return r.then(()=>{t&&t(null)}
1).catch(o=>{t&&t(o)}),r}function tu(e,t,...n){const r=e(...n);return r.then(o=>{t&&t(null,o)}).catch(o=>{t&&t(o,null)}),r}function nu(e,t,n){return new Promise((r,o)=>{const i=setTimeout(o,t,n);e().then(c=>{clearTimeout(i),r(c)}).catch(c=>{clearTimeout(i),o(c)})})}function ru(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 la(e){return!(pn(`${e.majorVersion}.${e.minorVersion}`,`${wi.majorVersion}.${wi.minorVersion}`)>=0)}function uo(e){return e.protocol==="https:"}function ou(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 i=atob(t),c=new Uint8Array(i.length);for(let d=0;d<i.length;d++)c[d]=i.charCodeAt(d);n(new Blob([c],{type:e}))}const o=v.from(t,"base64").toString();n(new Blob([o],{type:e}))})}function iu(e){return new Promise((t,n)=>{e.size===0&&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 Ke(){if(ue())throw new Error("window object undefined at SSR check");return window}function ue(){return typeof window>"u"}function me(e,t){if(co(e)||!(function(n){return n.length<256&&n.length>4})(e)||!(function(n){for(let r=0;r<n.length;r++){const o=n.charCodeAt(r);if(o<32||o>126)return!1}return!0})(e))throw t||new Error("id is not valid.")}function ua(e,t){const n=e.toString().toLocaleLowerCase();if(co(n))throw new Error("Invalid Url");if(n.length>2048)throw new Error("Url exceeds the maximum size of 2048 characters");if(!uo(e))throw new Error("Url should be a valid https url")}function au(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function co(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 su(e){if(!e)throw new Error("id must not be empty");if(aa(e)===!1)throw new Error("id must be a valid UUID")}const lu=!!performance&&"now"in performance;function gn(){return lu?performance.now()+performance.timeOrigin:void 0}function er(e,t=0){return t>1e3?!1:e===void 0||typeof e=="boolean"||typeof e=="number"||typeof e=="bigint"||typeof e=="string"||e===null?!0:Array.isArray(e)?e.every(n=>er(n,t+1)):!(typeof e!="object"||Object.prototype.toString.call(e)!=="[object Object]"||Object.getPrototypeOf(e)!==Object.prototype&&Object.getPrototypeOf(e)!==null)&&Object.keys(e).every(n=>er(e[n],t+1))}function Ci(e){var t,n;if(!(!((n=(t=e.hostVersionsInfo)===null||t===void 0?void 0:t.appEligibilityInformation)===null||n===void 0)&&n.ageGroup))return e;const r=e.hostVersionsInfo.appEligibilityInformation.ageGroup;return r?.toLowerCase()!=="nonadult"?e:Object.assign(Object.assign({},e),{hostVersionsInfo:Object.assign(Object.assign({},e.hostVersionsInfo),{appEligibilityInformation:Object.assign(Object.assign({},e.hostVersionsInfo.appEligibilityInformation),{ageGroup:Wt.NotAdult})})})}let Ve=class{constructor(t=lo()){this.uuid=t,su(t)}toString(){return this.uuid}serialize(){return this.toString()}};function uu(e){if(!(e instanceof Ve))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}const ca=e=>{const{uuid:t}=e,n=ke(e,["uuid"]),r=t?.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},cu=e=>{const{uuidAsString:t}=e,n=ke(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Ve(t):void 0})},du=e=>{const{uuidAsString:t}=e,n=ke(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Ve(t):void 0})},fu=e=>{const{uuid:t}=e,n=ke(e,["uuid"]),r=t?.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};var tr={exports:{}},Si,$i;function pu(){if($i)return Si;$i=1;var e=1e3,t=60*e,n=60*t,r=24*n,o=7*r,i=365.25*r;function c(d,m,g,f){var b=m>=1.5*g;return Math.round(d/g)+" "+f+(b?"s":"")}return Si=function(d,m){m=m||{};var g=typeof d;if(g==="string"&&d.length>0)return(function(f){if(!((f=String(f)).length>100)){var b=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(f);
1if(b){var T=parseFloat(b[1]);switch((b[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return T*i;case"weeks":case"week":case"w":return T*o;case"days":case"day":case"d":return T*r;case"hours":case"hour":case"hrs":case"hr":case"h":return T*n;case"minutes":case"minute":case"mins":case"min":case"m":return T*t;case"seconds":case"second":case"secs":case"sec":case"s":return T*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return T;default:return}}}})(d);if(g==="number"&&isFinite(d))return m.long?(function(f){var b=Math.abs(f);return b>=r?c(f,b,r,"day"):b>=n?c(f,b,n,"hour"):b>=t?c(f,b,t,"minute"):b>=e?c(f,b,e,"second"):f+" ms"})(d):(function(f){var b=Math.abs(f);return b>=r?Math.round(f/r)+"d":b>=n?Math.round(f/n)+"h":b>=t?Math.round(f/t)+"m":b>=e?Math.round(f/e)+"s":f+"ms"})(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))}}var gu=function(e){function t(o){let i,c,d,m=null;function g(...f){if(!g.enabled)return;const b=g,T=Number(new Date),R=T-(i||T);b.diff=R,b.prev=i,b.curr=T,i=T,f[0]=t.coerce(f[0]),typeof f[0]!="string"&&f.unshift("%O");let _=0;f[0]=f[0].replace(/%([a-zA-Z%])/g,(k,rt)=>{if(k==="%%")return"%";_++;const Vn=t.formatters[rt];if(typeof Vn=="function"){const Tl=f[_];k=Vn.call(b,Tl),f.splice(_,1),_--}return k}),t.formatArgs.call(b,f),(b.log||t.log).apply(b,f)}return g.namespace=o,g.useColors=t.useColors(),g.color=t.selectColor(o),g.extend=n,g.destroy=t.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(c!==t.namespaces&&(c=t.namespaces,d=t.enabled(o)),d),set:f=>{m=f}}),typeof t.init=="function"&&t.init(g),g}function n(o,i){const c=t(this.namespace+(i===void 0?":":i)+o);return c.log=this.log,c}function r(o){return o.toString().substring(2,o.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(o){return o instanceof Error?o.stack||o.message:o},t.disable=function(){const o=[...t.names.map(r),...t.skips.map(r).map(i=>"-"+i)].join(",");return t.enable(""),o},t.enable=function(o){let i;t.save(o),t.namespaces=o,t.names=[],t.skips=[];const c=(typeof o=="string"?o:"").split(/[\s,]+/),d=c.length;for(i=0;i<d;i++)c[i]&&((o=c[i].replace(/\*/g,".*?"))[0]==="-"?t.skips.push(new RegExp("^"+o.slice(1)+"$")):t.names.push(new RegExp("^"+o+"$")))},t.enabled=function(o){if(o[o.length-1]==="*")return!0;let i,c;for(i=0,c=t.skips.length;i<c;i++)if(t.skips[i].test(o))return!1;for(i=0,c=t.names.length;i<c;i++)if(t.names[i].test(o))return!0;return!1},t.humanize=pu(),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(o=>{t[o]=e[o]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(o){let i=0;for(let c=0;c<o.length;c++)i=(i<<5)-i+o.charCodeAt(c),i|=0;return t.colors[Math.abs(i)%t.colors.length]},t.enable(t.load()),t},hu={};(function(e,t){t.formatArgs=function(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const o="color: "+this.color;r.splice(1,0,o,"color: inherit");let i=0,c=0;r[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(i++,d==="%c"&&(c=i))}),r.splice(c,0,o)},t.save=function(r){try{r?t.storage.setItem("debug",r):t.storage.removeItem("debug")}catch{}},t.load=function(){let r;try{r=t.storage.getItem("debug")}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=hu.DEBUG),r},t.useColors=function(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=(function(){try{return localStorage}catch{}})(),t.destroy=(()=>{let r=!1;return()=>{r||(r=!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","#33
1CCCC","#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=gu(t);const{formatters:n}=e.exports;n.j=function(r){try{return JSON.stringify(r)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}}})(tr,tr.exports);var fo=tr.exports;const mu=new Ve,vu=fo.debug.formatArgs;fo.debug.formatArgs=function(e){e[0]=`(${new Date().toISOString()}): ${e[0]} [${mu.toString()}]`,vu.call(this,e)};const wu=fo.debug("teamsJs");function V(e){return wu.extend(e)}function l(e,t){return`${e}_${t}`}function po(e){return/^v\d+_[\w.]+$/.test(e)}function ee(e){return e.uuidAsString!==void 0?`${e.uuidAsString} (legacy id: ${e.id})`:e.uuid!==void 0?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const bu=V("flushMessageQueue");function go(e,t,n,r){if(e&&t&&n.length!==0)for(;n.length>0;){const o=n.shift();if(o){const i=ca(o);bu("Flushing message %s from %s message queue via postMessage.",ee(i),r),e.postMessage(i,t)}}}var yu=["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.office365.us","outlook-dod.office365.us","webmail.apps.mil","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","*.outlook.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net","fa000000125.officeapps.live.com","fa000000129.officeapps.live.com","fa000000124.officeapps.live.com","fa000000128.officeapps.live.com","fa000000136.mro1cdnstorage.public.cdn.office.net","fa000000136.mro1cdnstorage.public.onecdn.static.microsoft","substrate-msb-bizchatvnext-service.sdf01.substrate-msb-bingatwork.eastus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2sdf1.office-home-m365copilotapp.westus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2test1.office-home-m365copilotapp.westus2-test.cosmic-int.office.net","m365copilotapp.svc.cloud.microsoft","m365copilotapp.svc.cloud.dev.microsoft","ffc-copilot.officeapps.live.com","m365.cloud.dev.microsoft","m365.cloud.dev.microsoft:3001","portal.officeppe.com","ignite.m365.admin.cloud.microsoft","ignite.admin.cloud.microsoft","sdf.m365.admin.cloud.microsoft","admin-sdf.microsoft.com","canary.m365.admin.cloud.microsoft","ring0.m365.admin.cloud.microsoft","portal.office365.us","portal.apps.mil","www.ohome.apps.mil","www.office365.us"];const Yt="2.0.1",Cu="2.0.2",da="2.0.3",Su="2.0.4",$u="2.0.1",fa="1.9.0",Eu="2.0.0",Au="1.7.0",ho="1.8.0",Iu="2.0.0",Tu="1.9.0",Dt=yu,Ei=1500,Pu=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),hn="https",mn="teams.microsoft.com",pt="The library has not yet been initialized",Ou="The runtime has not yet been initialized",_u="The runtime version is not supported",Ru="The call was not properly started";let w=class{};w.initializeCalled=!1,w.initializeCompleted=!1,w.additionalValidOrigins=[],w.initializePromise=void 0,w.isFramelessWindow=!1,w.frameContext=void 0,w.hostClientType=void 0,w.printCapabilityEnabled=!1,w.teamsJsInstanceId=new Ve().toString();const pa=V("runtime"),Mu=4;function ga(e){return e.apiVersion===4}function Fu(e){if(ga(e))return!0;throw e.apiVersion===-1?new Error(Ou):new Error(_u)}let a={apiVersion:-1,supports:{}};
1const ku={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:{}}}},ha=[$.desktop,$.web,$.rigel,$.surfaceHub,$.teamsRoomsWindows,$.teamsRoomsAndroid,$.teamsPhones,$.teamsDisplays],Uu=[$.android,$.ios,$.ipados,$.visionOS],Ai=[...ha,...Uu];function Nu(e){let t=e;if(t.apiVersion<4&&Du.forEach(n=>{t.apiVersion===n.versionToUpgradeFrom&&(t=n.upgradeToNextVersion(t))}),ga(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const Du=[{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:(t=e.supports.dialog)===null||t===void 0?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,r=ke(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:(t=e.supports.dialog)===null||t===void 0?void 0:t.card,url:{bot:(r=(n=e.supports.dialog)===null||n===void 0?void 0:n.url)===null||r===void 0?void 0:r.bot,parentCommunication:!((o=e.supports.dialog)===null||o===void 0)&&o.url?{}:void 0},update:(i=e.supports.dialog)===null||i===void 0?void 0:i.update}:void 0})}}}],Lu="2.1.2",xu={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:ha}],"1.9.0":[{capability:{location:{}},hostClientTypes:Ai}],"2.0.0":[{capability:{people:{}},hostClientTypes:Ai},{capability:{sharing:{}},hostClientTypes:[$.desktop,$.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[$.android,$.desktop,$.ios,$.teamsRoomsAndroid,$.teamsPhones,$.teamsDisplays,$.web]},{capability:{webStorage:{}},hostClientTypes:[$.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[$.android,$.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[$.android,$.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[$.android,$.ios,$.ipados,$.visionOS]}],"2.1.2":[]},Wn=pa.extend("generateBackCompatRuntimeConfig");function ma(e,t){const n=Object.assign({},e);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(typeof t[r]!="object"||Array.isArray(t[r])?r in e||(n[r]=t[r]):n[r]=ma(e[r]||{},t[r]));return n}function ju(e,t,n){Wn("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);Wn("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach(i=>{pn(e,i)>=0&&n[i].forEach(c=>{w.hostClientType!==void 0&&c.hostClientTypes.includes(w.hostClientType)&&(r=ma(r,c.capability))})});const o={apiVersion:4,hostVersionsInfo:Gl,isLegacyTeams:!0,supports:r};
1return Wn("Runtime config after updating based on highestSupportedVersion: %o",o),o}const qn=pa.extend("applyRuntimeConfig");function Gn(e){typeof e.apiVersion=="string"&&(qn("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),qn("Fast-forwarding runtime %o",e);const t=Nu(e);qn("Applying runtime %o",t),a=sa(t)}function Hu(e){return e!=null&&e.serialize!==void 0&&typeof e.serialize=="function"}const Qe="2.52.0";let gt=class qe{static storeCallbackInformation(t,n){qe.callbackInformation.set(t,n)}static clearMessages(){qe.callbackInformation.clear()}static deleteMessageInformation(t){qe.callbackInformation.delete(t)}static handleOneWayPerformanceMetrics(t,n,r){const o=t.monotonicTimestamp;o&&r?Ui({actionName:t.func,messageDelay:r-o,requestStartedAt:o}):n("Unable to send performance metrics for event %s",t.func)}static handlePerformanceMetrics(t,n,r,o){const i=qe.callbackInformation.get(t);i&&n.monotonicTimestamp&&o?(Ui({actionName:i.name,messageDelay:o-n.monotonicTimestamp,requestStartedAt:i.calledAt}),qe.deleteMessageInformation(t)):r("Unable to send performance metrics for callback %s with arguments %o",t.toString(),n.args)}};gt.callbackInformation=new Map;const va=V("nestedAppAuthUtils"),zu=va.extend("tryPolyfillWithNestedAppAuthBridge"),Vu="v2";function Bu(e,t,n){var r;const o=zu;if(w.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");const i=(()=>{try{return JSON.parse(e)}catch{return null}})();if(!i||!(!((r=i.supports)===null||r===void 0)&&r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const c=t;if(c.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const d=(function(m,g){const f=Wu;if(!m)return f("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:b,sendPostMessage:T}=g,R=_=>k=>b(k,_);return{addEventListener:(_,k)=>{_==="message"?m.addEventListener(_,R(k)):f(`Event ${_} is not supported by nestedAppAuthBridge`)},postMessage:_=>{const k=(()=>{try{return JSON.parse(_)}catch{return null}})();if(!k||typeof k!="object"||k.messageType!=="NestedAppAuthRequest")return void f("Unrecognized data format received by app, message being ignored. Message: %o",_);const rt=l(Vu,"nestedAppAuth.execute");T(_,rt)},removeEventListener:(_,k)=>{m.removeEventListener(_,R(k))}}})(c,n);d&&(c.nestedAppAuthBridge=d)}const Wu=va.extend("createNestedAppAuthBridge"),qu=/^[A-Za-z][A-Za-z\d+.-]*:\/\//;function wa(e,t){const n=e.split("."),r=t.split(".");if(r.length!==n.length)return!1;let o=!1;for(let i=0;i<n.length;i++)if(n[i]!==r[i]){if(n[i]!=="*"||i===n.length-1||o)return!1;o=!0}return!0}let nr=class ba{constructor(t,n,r){this.protocol=t,this.host=n,this.logger=r}static canUse(t){return qu.test(t)}static create(t,n){const r=t.split("://");return new ba(r[0],r[1],n.extend("InternalURLPattern"))}test(t){return this.logger("Testing URL %s against pattern protocol: %s, host: %s",t,this.protocol,this.host),t.protocol===`${this.protocol}:`&&(!t.host||wa(this.host,t.host))}};function Gu(e){return nr.canUse(e)}function Yu(e,t){if(nr.canUse(e))return nr.create(e,t);t("No URL verifier available for pattern: %s",e)}let Re=[];const Ce=V("validateOrigin");let it;function ya(){return S(this,void 0,void 0,function*(){it||(yield Sa())})}function Ca(){return Re.length===0}function Sa(e=!1){return S(this,void 0,void 0,function*(){if(!Ca()&&!e)return Re;if(it)return it;if(ue())return Re=Dt,Dt;{Ce("Initiating fetch call to acquire valid origins list from CDN");const t=new AbortController,n=setTimeout(()=>t.abort(),Ei);return it=fetch(Pu,{signal:t.signal}).then(r=>{if(clearTimeout(n),!r.ok)throw new Error("Invalid Response from Fetch Call");return Ce("Fetch call completed and retrieved valid origins list from CDN"),r.json().then(o=>{if((function(i){let c=JSON.parse(i);try{c=JSON.parse(i)}catch{return!1}if(!c.validOrigins)return!1;for(const d of c.validOrigins)try{new URL("https://"+d)}catch{return Ce("isValidOriginsFromCDN call failed to validate origin: %s",d),!1}return!0})(JSON.stringify(o)))return Re=o.validOrigins,Re;throw new Error("Valid origins list retrieved from CDN is invali
1d")})}).catch(r=>(r.name==="AbortError"?Ce(`validOrigins fetch call to CDN failed due to Timeout of ${Ei} ms. Defaulting to fallback list`):Ce("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",r),Re=Dt,Re)),it}})}function Ju(e,t){let n;try{const r=Yu(e,Ce);if(!r)return!1;n=r}catch{return!1}return n.test(t)}function Ku(e,t){const n=Ca()?Dt:Re;return Ii(e,n)?Promise.resolve(!0):(Ce("Origin %s is not in the local valid origins list, fetching from CDN",e),Sa(t).then(r=>Ii(e,r)))}function Ii(e,t){for(const r of w.additionalValidOrigins)if(Ju(r,e))return!0;const n=e.host;return uo(e)?!!t.some(r=>wa(r,n))||(Ce(`Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.
2Origins approved by this library: %o
3Origins included in app.initialize: %o`,e,t,w.additionalValidOrigins),!1):(Ce("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1)}ya();const Be=V("communication");let y=class{},I=class{};function Qu(e,t){if(I.messageListener=n=>(function(r){return S(this,void 0,void 0,function*(){if(!r||!r.data||typeof r.data!="object")return void Ti("Unrecognized message format received by app, message being ignored. Message: %o",r);const o=r.source||r.originalEvent&&r.originalEvent.source,i=r.origin||r.originalEvent&&r.originalEvent.origin;return Ia(o,i).then(c=>{c?((function(d,m){w.isFramelessWindow||y.parentWindow&&!y.parentWindow.closed&&d!==y.parentWindow||(y.parentWindow=d,y.parentOrigin=m),y.parentWindow&&y.parentWindow.closed&&(y.parentWindow=null,y.parentOrigin=null),go(y.parentWindow,y.parentOrigin,I.parentMessageQueue,"parent")})(o,i),o!==y.parentWindow?df(o,i)&&ff(r,o,vn,(d,m)=>I.callbacks.set(d,m)):Oi(r)):Ti("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",r,o,i)})})})(n),y.currentWindow=y.currentWindow||Ke(),y.parentWindow=y.currentWindow.parent!==y.currentWindow.self?y.currentWindow.parent:y.currentWindow.opener,y.topWindow=y.currentWindow.top,(y.parentWindow||e)&&y.currentWindow.addEventListener("message",I.messageListener,!1),!y.parentWindow){const n=y.currentWindow;if(!n.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));w.isFramelessWindow=!0,n.onNativeMessage=Oi}try{return y.parentOrigin="*",x(t,"initialize",[Qe,Mu,e]).then(([n,r,o,i])=>(Bu(i,y.currentWindow,{onMessage:oc,sendPostMessage:ec}),{context:n,clientType:r,runtimeConfig:o,clientSupportedSDKVersion:i}))}finally{y.parentOrigin=null}}function Zu(){y.currentWindow&&y.currentWindow.removeEventListener("message",I.messageListener,!1),y.currentWindow=null,y.parentWindow=null,y.parentOrigin=null,I.parentMessageQueue=[],I.nextMessageId=0,I.callbacks.clear(),I.promiseCallbacks.clear(),I.portCallbacks.clear(),I.legacyMessageIdsToUuidMap={},gt.clearMessages(),cf()}function ve(e,t,...n){return x(e,t,n).then(([r])=>r)}function G(e,t,...n){return x(e,t,n).then(([r,o])=>{if(!r)throw new Error(o)})}function mo(e,t,n,...r){return x(e,t,r).then(([o,i])=>{if(!o)throw new Error(i||n)})}function A(e,t,...n){return x(e,t,n).then(([r,o])=>{if(r)throw r;return o})}function x(e,t,n=void 0){if(!po(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=>{const o=vn(e,t,n);var i;r((i=o.uuid,new Promise(c=>{I.promiseCallbacks.set(i,c)})))})}function $a(e){return e.map(t=>Hu(t)?t.serialize():t)}function B(e,t,n,r,o){var i;return S(this,void 0,void 0,function*(){const c=$a(t),[d]=yield x(r,e,c);if(o&&o(d)||!o&&et(d))throw new Error(`${d.errorCode}, message: ${(i=d.message)!==null&&i!==void 0?i:"None"}`);if(n.validate(d))return n.deserialize(d);throw new Error(`${C.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(d)}`)})}function D(e,t,n,r){var o;return S(this,void 0,void 0,function*(){const i=$a(t),[c]=yield x(n,e,i);if(r&&r(c)||!r&&et(c))throw new Error(`${c.errorCode}, message: ${(o=c.message)!==null&&o!==void 0?o:"None"}`);if(c!==void 0)throw new Error(`${C.INTERNAL_ERROR}, message: Invalid response from host`)})}function Ea(e,t,n=void 0){if(!po(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 o=vn(e,t,n).uuid,new Promise((i,c)=>{I.portCallbacks.set(o,(d,m)=>{d instanceof MessagePort?i(d):c(m&&m.length>0?m[0]:new Error("Host responded without port or error details."))})});var o}function h(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!po(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=vn(e,t,o);r&&I.callbacks.set(i.uuid,r)}I.parentMessageQueue=[],I.topMessageQueue=[],I.nextMessageId=0,I.callbacks=new Map,I.promiseCallbacks=new Map,I.portCallbacks=new Map,I.legacyMessageIdsToUuidMap={};const Xu=Be.extend("sendNestedAuthRequestToTopWindow");function ec(e,t){const n=Xu,r=y.topWindow,o=(function(i,c){const d=I.nextMessageId++,m=new Ve;return I.legacyMessageIdsToUuidMap[d]=m,{id:d,uuid:m,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:gn(),apiVersionTag:c,args:[],data:i}})(e,t);return n("Message %s information: %o",ee(o),{actionName:o.func}),Aa(r,o)}const tc=Be.extend("sendRequestToTargetWindowHelper");function Aa(e,t){const n=tc,r=(function(i){return i===y.topWindow&&rr()?"top":i===y.parentWindow?"parent":null})(e),o=ca(t);if(w.isFramelessWindow)y.currentWindow&&y.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",ee(o),r),y.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=(function(c){return c===y.topWindow&&rr()?y.topOrigin:c===y.parentWindow?y.parentOrigin:null})(e);e&&i?(n("Sending message %s to %s via postMessage",ee(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",ee(o),r),Ta(e).push(t))}return t}const nc=Be.extend("sendMessageToParentHelper");
3function vn(e,t,n,r,o){const i=nc,c=y.parentWindow,d=(function(m,g,f,b,T){const R=I.nextMessageId++,_=new Ve;I.legacyMessageIdsToUuidMap[R]=_;const k=b===!0?T:w.teamsJsInstanceId;return{id:R,uuid:_,func:g,timestamp:Date.now(),monotonicTimestamp:gn(),args:f||[],apiVersionTag:m,isProxiedFromChild:b!=null&&b,teamsJsInstanceId:k}})(e,t,n,r,o);return gt.storeCallbackInformation(d.uuid,{name:t,calledAt:d.timestamp}),i("Message %s information: %o",ee(d),{actionName:t,args:n}),Aa(c,d)}const Ti=Be.extend("processIncomingMessage"),rc=Be.extend("processAuthBridgeMessage");function oc(e,t){var n,r;const o=rc;if(!e||!e.data||typeof e.data!="object")return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,c]=i??[],d=(()=>{try{return JSON.parse(c)}catch{return null}})();if(!d||typeof d!="object"||d.messageType!=="NestedAppAuthResponse")return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const m=e.source||((n=e?.originalEvent)===null||n===void 0?void 0:n.source),g=e.origin||((r=e?.originalEvent)===null||r===void 0?void 0:r.origin);m?Ia(m,g)?(y.topWindow&&!y.topWindow.closed&&m!==y.topWindow||(y.topWindow=m,y.topOrigin=g),y.topWindow&&y.topWindow.closed&&(y.topWindow=null,y.topOrigin=null),go(y.topWindow,y.topOrigin,I.topMessageQueue,"top"),t(c)):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 Yn=Be.extend("shouldProcessIncomingMessage");function Ia(e,t){return S(this,void 0,void 0,function*(){if(y.currentWindow&&e===y.currentWindow)return Yn("Should not process message because it is coming from the current window"),!1;if(y.currentWindow&&y.currentWindow.location&&t&&t===y.currentWindow.location.origin)return!0;{let n;try{n=new URL(t)}catch{return Yn("Message has an invalid origin of %s",t),!1}const r=yield Ku(n);return r||Yn("Message has an invalid origin of %s",t),r}})}const Pi=Be.extend("handleIncomingMessageFromParent");function Lt(e,t){if(t){const n=[...e].find(([r,o])=>r.toString()===t.toString());if(n)return n[0]}}function Jn(e,t){const n=Lt(t,e.uuid);n&&t.delete(n),e.uuid?I.legacyMessageIdsToUuidMap={}:delete I.legacyMessageIdsToUuidMap[e.id]}function Oi(e){const t=Pi,n=gn();if("id"in e.data&&typeof e.data.id=="number"){const r=e.data,o=du(r),i=(function(c){const d=Pi;if(!c.uuid)return I.legacyMessageIdsToUuidMap[c.id];{const m=c.uuid,g=Lt(I.callbacks,m);if(g)return g;const f=Lt(I.promiseCallbacks,m);if(f)return f;const b=Lt(I.portCallbacks,m);if(b)return b}d("Received message %s that failed to produce a callbackId",ee(c))})(o);if(i){const c=I.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),gt.handlePerformanceMetrics(i,o,t,n),c&&(t("Invoking the registered callback for message %s with arguments %o",i.toString(),o.args),c.apply(null,[...o.args,o.isPartialResponse]),(function(g){return g.data.isPartialResponse===!0})(e)||(t("Removing registered callback for message %s",i.toString()),Jn(o,I.callbacks)));const d=I.promiseCallbacks.get(i);d&&(t("Invoking the registered promise callback for message %s with arguments %o",i.toString(),o.args),d(o.args),t("Removing registered promise callback for message %s",i.toString()),Jn(o,I.promiseCallbacks));const m=I.portCallbacks.get(i);if(m){let g;t("Invoking the registered port callback for message %s with arguments %o",i.toString(),o.args),e.ports&&e.ports[0]instanceof MessagePort&&(g=e.ports[0]),m(g,o.args),t("Removing registered port callback for message %s",i.toString()),Jn(o,I.portCallbacks)}o.uuid&&(I.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&typeof e.data.func=="string"){const r=e.data;gt.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',ee(r),r.func),hs(r.func,r.args)}else t("Received an unknown message: %O",e)}function rr(){return y.topWindow!==y.parentWindow}function Ta(e){return e===y.topWindow&&rr()?I.topMessageQueue:e===y.parentWindow?I.parentMessageQueue:[]}function Pa(e,t){let n;n=y.currentWindow.setInterval(()=>{Ta(e).length===0&&(clearInterval(n),t())},100)}const Oa=V("internal"),ic=Oa.extend("ensureInitializeCalled"),_i=Oa.extend("ensureInitialized");function W(){if(!w.initializeCalled)throw ic(pt),new Error(pt)}function u(e,...t){if(!w.initializeCompleted)throw _i("%s. initializeCalled: %s",pt,w.initializeCalled.toString()),new Error(pt);if(t&&t.length>0){let n=!1;for(let r=0;r<t.length;r++)if(t[r]===w.frameContext){n=!0;break}if(!n){const r=`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${w.frameContext}".`;throw _i(r),new Error(r)}}return Fu(e)}function te(e=Yt){const t=pn(w.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function ac(){return w.hostClientType==$.android||w.hostClientType==$.ios||w.hostClientType==$.ipados||w.hostClientType==$.visionOS}function xt(e=Yt){if(!ac())throw{errorCode:C.NOT_SUPPORTED_ON_PLATFORM};
3if(!te(e))throw{errorCode:C.OLD_PLATFORM}}function sc(e){let t=w.additionalValidOrigins.concat(e.filter(r=>typeof r=="string"&&Gu(r)));const n={};t=t.filter(r=>!n[r]&&(n[r]=!0,!0)),w.additionalValidOrigins=t}function lc(e){if(!cc(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${_a}-${Ra}).`)}function uc(e){if(co(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(dc(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const _a=4,Ra=256;function cc(e){return e.length<Ra&&e.length>_a}function dc(e){return[...e].some(t=>{const n=t.charCodeAt(0);return n<32||n>126})}function Ma(e){if(!(e instanceof ce))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}let fc=class{constructor(t){this.idAsString=t,uc(t)}serialize(){return this.toString()}toString(){return this.idAsString}},ce=class extends fc{constructor(t){super(t),lc(t)}toJSON(){return{appIdAsString:this.toString()}}};function M(e){return e==null}function pc(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");u(a),sf(e)}function gc(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");u(a),lf(e)}const hc=Object.freeze(Object.defineProperty({__proto__:null,registerBeforeSuspendOrTerminateHandler:pc,registerOnResumeHandler:gc},Symbol.toStringTag,{value:"Module"}));let at;const mc=V("messageChannels.telemetry");function vc(){return S(this,void 0,void 0,function*(){if(at)return mc("Returning telemetry port from cache"),at;if(!Fa())throw p;return at=yield Ea(l("v1","messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),at})}function Fa(){var e;return!(!u(a)||!(!((e=a.supports.messageChannels)===null||e===void 0)&&e.telemetry))}function ka(){at=void 0}const wc=Object.freeze(Object.defineProperty({__proto__:null,_clearTelemetryPort:ka,getTelemetryPort:vc,isSupported:Fa},Symbol.toStringTag,{value:"Module"}));let st;const bc=V("messageChannels.dataLayer");function yc(){return S(this,void 0,void 0,function*(){if(st)return bc("Returning dataLayer port from cache"),st;if(!Ua())throw p;return st=yield Ea(l("v1","messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),st})}function Ua(){var e;return!(!u(a)||!(!((e=a.supports.messageChannels)===null||e===void 0)&&e.dataLayer))}function Na(){st=void 0}const Cc=Object.freeze(Object.defineProperty({__proto__:null,_clearDataLayerPort:Na,getDataLayerPort:yc,isSupported:Ua},Symbol.toStringTag,{value:"Module"})),Ae="v2",Kn=V("app"),Me={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Jt,Kt;function Sc(){return w.initializeCompleted}function $c(){return w.frameContext}function Ec(e){return yn(l(Ae,"app.initialize"),e)}function Ac(e){y.currentWindow=e}function Ic(){w.initializeCalled&&(Kd(),w.initializeCalled=!1,w.initializeCompleted=!1,w.initializePromise=void 0,w.additionalValidOrigins=[],w.frameContext=void 0,w.hostClientType=void 0,w.isFramelessWindow=!1,ka(),Na(),Zu())}function Da(){return new Promise(e=>{W(),e(ve(l(Ae,"app.getContext"),"getContext"))}).then(e=>(function(t){var n;return{actionInfo:t.actionInfo,app:{locale:t.locale,sessionId:t.appSessionId?t.appSessionId:"",theme:t.theme?t.theme:"default",iconPositionVertical:t.appIconPosition,osLocaleInfo:t.osLocaleInfo,messageId:t.messageId,parentMessageId:t.parentMessageId,userClickTime:t.userClickTime,userClickTimeV2:t.userClickTimeV2,userFileOpenPreference:t.userFileOpenPreference,host:{name:t.hostName?t.hostName:Gt.teams,clientType:t.hostClientType?t.hostClientType:$.web,features:t.hostFeatures,sessionId:t.sessionId?t.sessionId:"",ringId:t.ringId,ancestors:t.hostAncestors},appLaunchId:t.appLaunchId,appId:t.appId?new ce(t.appId):void 0,manifestVersion:t.manifestVersion},page:{id:t.entityId,frameContext:t.frameContext?t.frameContext:w.frameContext,renderingSurface:t.renderingSurface?t.renderingSurface:void 0,subPageId:t.subEntityId,isFullScreen:t.isFullScreen,isMultiWindow:t.isMultiWindow,isBackgroun
3dLoad:t.isBackgroundLoad,sourceOrigin:t.sourceOrigin},user:{id:(n=t.userObjectId)!==null&&n!==void 0?n:"",displayName:t.userDisplayName,isCallingAllowed:t.isCallingAllowed,isPSTNCallingAllowed:t.isPSTNCallingAllowed,licenseType:t.userLicenseType,loginHint:t.loginHint,userPrincipalName:t.userPrincipalName,tenant:t.tid?{id:t.tid,teamsSku:t.tenantSKU}:void 0},channel:t.channelId?{id:t.channelId,displayName:t.channelName,relativeUrl:t.channelRelativeUrl,membershipType:t.channelType,defaultOneNoteSectionId:t.defaultOneNoteSectionId,ownerGroupId:t.hostTeamGroupId,ownerTenantId:t.hostTeamTenantId}:void 0,chat:t.chatId?{id:t.chatId}:void 0,meeting:t.meetingId?{id:t.meetingId}:void 0,sharepoint:t.sharepoint,team:t.teamId?{internalId:t.teamId,displayName:t.teamName,type:t.teamType,groupId:t.groupId,templateId:t.teamTemplateId,isArchived:t.isTeamArchived,userRole:t.userTeamRole}:void 0,sharePointSite:t.teamSiteUrl||t.teamSiteDomain||t.teamSitePath||t.mySitePath||t.mySiteDomain?{teamSiteUrl:t.teamSiteUrl,teamSiteDomain:t.teamSiteDomain,teamSitePath:t.teamSitePath,teamSiteId:t.teamSiteId,mySitePath:t.mySitePath,mySiteDomain:t.mySiteDomain}:void 0,dialogParameters:t.dialogParameters||{}}})(e))}function Tc(){W(),Za(l(Ae,"app.notifyAppLoaded"))}function Pc(){return md(l(Ae,"app.notifySuccess"))}function Oc(e){W(),es(l(Ae,"app.notifyFailure"),e)}function _c(e){W(),Xa(l(Ae,"app.notifyExpectedFailure"),e)}function Rc(e){ts(l(Ae,"app.registerOnThemeChangeHandler"),e)}function Mc(e){vd(l(Ae,"app.registerOnContextChangeHandler"),e)}function Fc(e){tf(e)}function kc(e){return ns(l(Ae,"app.openLink"),e)}(function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"})(Jt||(Jt={})),(function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"})(Kt||(Kt={})),Kn("teamsjs instance is version %s, starting at %s UTC (%s local)",Qe,new Date().toISOString(),new Date().toLocaleString()),(function(){if(ue())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&&t.length!==0?Kn("teamsjs is being used from %s. %s",t,n):Kn("teamsjs is being used from a script tag embedded directly in your html. %s",n)})();const Hv=Object.freeze(Object.defineProperty({__proto__:null,get ExpectedFailureReason(){return Kt},get FailedReason(){return Jt},Messages:Me,_initialize:Ac,_uninitialize:Ic,getContext:Da,getFrameContext:$c,initialize:Ec,isInitialized:Sc,lifecycle:hc,notifyAppLoaded:Tc,notifyExpectedFailure:_c,notifyFailure:Oc,notifySuccess:Pc,openLink:kc,registerHostToAppPerformanceMetricsHandler:Fc,registerOnContextChangeHandler:Mc,registerOnThemeChangeHandler:Rc},Symbol.toStringTag,{value:"Module"}));function Uc(e,t,n){Va(l(ne,"dialog.url.bot.open"),e,t,n)}function La(){return u(a)&&(a.supports.dialog&&a.supports.dialog.url&&a.supports.dialog.url.bot)!==void 0}const Nc=Object.freeze(Object.defineProperty({__proto__:null,isSupported:La,open:Uc},Symbol.toStringTag,{value:"Module"}));function Dc(e){if(u(a,s.task),!wn())throw p;h(l(ne,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Lc(e){if(u(a,s.content,s.sidePanel,s.meetingStage),!wn())throw p;h(l(ne,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function xc(e){if(u(a,s.task),!wn())throw p;for(q("messageForChild"),E(l(ne,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),jt.reverse();jt.length>0;)e(jt.pop())}function wn(){var e,t;return u(a)&&!!(!((t=(e=a.supports.dialog)===null||e===void 0?void 0:e.url)===null||t===void 0)&&t.parentCommunication)}const jc=Object.freeze(Object.defineProperty({__proto__:null,isSupported:wn,registerOnMessageFromParent:xc,sendMessageToDialog:Lc,sendMessageToParentFromDialog:Dc},Symbol.toStringTag,{value:"Module"}));function Hc(e,t,n){za(l(ne,"dialog.url.open"),e,t,n)}function zc(e,t){Ba(l(ne,"dialog.url.submit"),e,t)}function vo(){return u(a)&&(a.supports.dialog&&a.supports.dialog.url)!==void 0}function wo(e){return{url:e.url,height:e.size?e.size.height:X.Small,width:e.size?e.size.width:X.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function xa(e){const t=wo(e);return t.completionBotId=e.completionBotId,t}const Vc=Object.freeze(Object.defineProperty({__proto__:null,bot:Nc,getDialogInfoFromBotUrlDialogInfo:xa,getDialogInfoFromUrlDialogInfo:wo,isSupported:vo,open:Hc,parentCommunication:jc,submit:zc},Symbol.toStringTag,{value:"Module"}));function Bc(e){Ha(l(ne,"dialog.update.resize"),e)}
3function ja(){return!(!u(a)||!a.supports.dialog)&&!!a.supports.dialog.update}const Wc=Object.freeze(Object.defineProperty({__proto__:null,isSupported:ja,resize:Bc},Symbol.toStringTag,{value:"Module"})),ne="v2";function Ha(e,t){if(u(a,s.content,s.sidePanel,s.task,s.meetingStage),!ja())throw p;h(e,"tasks.updateTask",[t])}function za(e,t,n,r){if(u(a,s.content,s.sidePanel,s.meetingStage),!vo())throw p;r&&E(l(ne,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);const o=wo(t);h(e,"tasks.startTask",[o],(i,c)=>{n?.({err:i,result:c}),q("messageForParent")})}function Va(e,t,n,r){if(u(a,s.content,s.sidePanel,s.meetingStage),!La())throw p;r&&E(l(ne,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);const o=xa(t);h(e,"tasks.startTask",[o],(i,c)=>{n?.({err:i,result:c}),q("messageForParent")})}function Ba(e,t,n){if(u(a,s.content,s.task),!vo())throw p;w.frameContext===s.content&&console.warn(`dialog.submit should not be called from FrameContext.content.
4If dialog.submit was called from inside the dialog, please disregard this message.
5This issue occurs due to a bug in Teams mobile where the dialog is incorrectly identified as being in the content FrameContext.
6We are working to resolve this.`),h(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function Wa(e){return{card:e.card,height:e.size?e.size.height:X.Small,width:e.size?e.size.width:X.Small,title:e.title}}function qc(e){const t=Wa(e);return t.completionBotId=e.completionBotId,t}const jt=[];function Gc(e){w.frameContext&&(w.frameContext===s.task?jt.push(e):q("messageForChild"))}function Yc(e,t){if(u(a,s.content,s.sidePanel,s.meetingStage),!qa())throw p;const n=qc(e);h(l(ne,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],(r,o)=>{t?.({err:r,result:o})})}function qa(){const e=a.hostVersionsInfo&&a.hostVersionsInfo.adaptiveCardSchemaVersion&&!la(a.hostVersionsInfo.adaptiveCardSchemaVersion);return u(a)&&(e&&a.supports.dialog&&a.supports.dialog.card&&a.supports.dialog.card.bot)!==void 0}const Jc=Object.freeze(Object.defineProperty({__proto__:null,isSupported:qa,open:Yc},Symbol.toStringTag,{value:"Module"}));function Kc(e,t){if(u(a,s.content,s.sidePanel,s.meetingStage),!Ga())throw p;const n=Wa(e);h(l(ne,"dialog.adaptiveCard.open"),"tasks.startTask",[n],(r,o)=>{t?.({err:r,result:o})})}function Ga(){const e=a.hostVersionsInfo&&a.hostVersionsInfo.adaptiveCardSchemaVersion&&!la(a.hostVersionsInfo.adaptiveCardSchemaVersion);return u(a)&&(e&&a.supports.dialog&&a.supports.dialog.card)!==void 0}const Qc=Object.freeze(Object.defineProperty({__proto__:null,bot:Jc,isSupported:Ga,open:Kc},Symbol.toStringTag,{value:"Module"}));function Ya(){E(l(ne,"dialog.registerMessageForChildHandler"),"messageForChild",Gc,!1)}function Zc(){return!(!u(a)||!a.supports.dialog)}const zv=Object.freeze(Object.defineProperty({__proto__:null,adaptiveCard:Qc,initialize:Ya,isSupported:Zc,update:Wc,url:Vc},Symbol.toStringTag,{value:"Module"})),$e="v2";var or,ir;(function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"})(or||(or={}));let Xc=class{constructor(){this.enabled=!0,this.selected=!1}},ar,sr,lr;function Ja(){E(l($e,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",rd,!1),E(l($e,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",id,!1),E(l($e,"menus.registerSetModuleViewHandler"),"setModuleView",td,!1)}function ed(e,t){if(u(a),!bn())throw p;lr=t,h(l($e,"menus.setUpViews"),"setUpViews",[e])}function td(e){lr&&lr(e)||(u(a),h(l($e,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function nd(e,t){if(u(a),!bn())throw p;ar=t,h(l($e,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function rd(e){ar&&ar(e)||(u(a),h(l($e,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function od(e,t){if(u(a),!bn())throw p;sr=t,h(l($e,"menus.showActionMenu"),"showActionMenu",[e])}function id(e){sr&&sr(e)||(u(a),h(l($e,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function bn(){return!(!u(a)||!a.supports.menus)}(function(e){e.dropDown="dropDown",e.popOver="popOver"})(ir||(ir={}));const Bv=Object.freeze(Object.defineProperty({__proto__:null,get DisplayMode(){return or},MenuItem:Xc,get MenuListType(){return ir},initialize:Ja,isSupported:bn,setNavBarMenu:nd,setUpViews:ed,showActionMenu:od},Symbol.toStringTag,{value:"Module"}));let re=class{},bo=class extends re{validate(t){return!0}deserialize(t){return t}},ur,cr;function Ka(){E(l(O,"pages.config.registerSettingsSaveHandler"),"settings.save",cd,!1),E(l(O,"pages.config.registerSettingsRemoveHandler"),"settings.remove",pd,!1)}function ad(e){return ds(l(O,"pages.config.setValidityState"),e)}function sd(e){return ps(l(O,"pages.config.setConfig"),e)}function ld(e){yo(l(O,"pages.config.registerOnSaveHandler"),e,()=>{if(!M(e)&&!tt())throw p})}function yo(e,t,n){!M(t)&&u(a,s.settings),n&&n(),ur=t,!M(t)&&h(e,"registerHandler",["save"])}function ud(e){Co(l(O,"pages.config.registerOnRemoveHandler"),e,()=>{if(!M(e)&&!tt())throw p})}function Co(e,t,n){!M(t)&&u(a,s.remove,s.settings),n&&n(),cr=t,!M(t)&&h(e,"registerHandler",["remove"])}function cd(e){const t=new fd(e);ur?ur(t):se()?le("settings.save",[e]):t.notifySuccess()}function dd(e){Y(l(O,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[s.content],()=>{if(!tt())throw p})}let fd=class{constructor(t){this.notified=!1,this.result=t||{}}notifySuccess(){this.ensureNotNotified(),h(l(O,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(t){this.ensureNotNotified(),h(l(O,"pages.saveEvent.notifyFailure"),"settings.save.failure",[t]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}};function pd(){const e=new gd;cr?cr(e):se()?le("settings.remove",[]):e.notifySuccess()}let gd=class{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),h(l(O,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(t){this.ensureNotNotified(),h(l(O,"pages.removeEvent.notifyFailure"),"settings.remove.failure",[t]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}};
6function tt(){return!(!u(a)||!a.supports.pages)&&!!a.supports.pages.config}const hd=Object.freeze(Object.defineProperty({__proto__:null,initialize:Ka,isSupported:tt,registerChangeConfigHandler:dd,registerOnRemoveHandler:ud,registerOnRemoveHandlerHelper:Co,registerOnSaveHandler:ld,registerOnSaveHandlerHelper:yo,setConfig:sd,setValidityState:ad},Symbol.toStringTag,{value:"Module"})),Qa=V("app");function yn(e,t){return ue()?(Qa.extend("initialize")("window object undefined at initialization"),Promise.resolve()):nu(()=>(function(n,r){return new Promise(o=>{w.initializeCalled||(w.initializeCalled=!0,Jd(),w.initializePromise=Qu(r,n).then(({context:i,clientType:c,runtimeConfig:d,clientSupportedSDKVersion:m=Yt})=>{w.frameContext=i,w.hostClientType=c,w.clientSupportedSDKVersion=m;try{ot("Parsing %s",d);let g=JSON.parse(d);if(ot("Checking if %o is a valid runtime object",g??"null"),!g||!g.apiVersion)throw new Error("Received runtime config is invalid");g=Ci(g),d&&Gn(g)}catch(g){if(!(g instanceof SyntaxError))throw g;try{ot("Attempting to parse %s as an SDK version",d),isNaN(pn(d,Yt))||(w.clientSupportedSDKVersion=d);let f=JSON.parse(m);if(ot("givenRuntimeConfig parsed to %o",f??"null"),!f)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");f=Ci(f),Gn(f)}catch(f){if(!(f instanceof SyntaxError))throw f;Gn(ju(w.clientSupportedSDKVersion,ku,xu))}}w.initializeCompleted=!0}),Ja(),Ka(),Ya()),Array.isArray(r)&&sc(r),w.initializePromise!==void 0?o(w.initializePromise):ot("GlobalVars.initializePromise is unexpectedly undefined")})})(e,t),6e4,new Error("SDK initialization timed out."))}function Za(e){h(e,Me.AppLoaded,[Qe])}function Xa(e,t){h(e,Me.ExpectedFailure,[t.reason,t.message])}function es(e,t){h(e,Me.Failure,[t.reason,t.message,t.authHeader])}function md(e){return S(this,void 0,void 0,function*(){if(w.initializeCompleted)return Ri(e);if(!w.initializePromise)throw new Error(pt);return w.initializePromise.then(()=>Ri(e))})}function Ri(e){return S(this,void 0,void 0,function*(){return u(a)&&(!((t=a.supports.app)===null||t===void 0)&&t.notifySuccessResponse)?B(Me.Success,[Qe],new bo,e).then(()=>({hasFinishedSuccessfully:!0})):(h(e,Me.Success,[Qe]),{hasFinishedSuccessfully:"unknown"});var t})}const ot=Qa.extend("initializeHelper");function ts(e,t){!M(t)&&W(),Qd(e,t)}function vd(e,t){!M(t)&&W(),Zd(e,t)}function ns(e,t){return new Promise(n=>{u(a,s.content,s.sidePanel,s.settings,s.task,s.stage,s.meetingStage),n(G(e,"executeDeepLink",t))})}function wd(e){Y(l(O,"pages.appButton.onClick"),"appButtonClick",e,[s.content],()=>{if(!Cn())throw p})}function bd(e){Y(l(O,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[s.content],()=>{if(!Cn())throw p})}function yd(e){Y(l(O,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[s.content],()=>{if(!Cn())throw p})}function Cn(){return!(!u(a)||!a.supports.pages)&&!!a.supports.pages.appButton}const Cd=Object.freeze(Object.defineProperty({__proto__:null,isSupported:Cn,onClick:wd,onHoverEnter:bd,onHoverLeave:yd},Symbol.toStringTag,{value:"Module"}));function Sd(){gs()}function rs(){return as(l(O,"pages.backStack.navigateBack"))}function $d(e){So(l(O,"pages.backStack.registerBackButtonHandler"),e,()=>{if(!M(e)&&!$o())throw p})}function So(e,t,n){!M(t)&&u(a),n&&n(),qd(t),!M(t)&&h(e,"registerHandler",["backButton"])}function $o(){return!(!u(a)||!a.supports.pages)&&!!a.supports.pages.backStack}const Ed=Object.freeze(Object.defineProperty({__proto__:null,_initialize:Sd,isSupported:$o,navigateBack:rs,registerBackButtonHandler:$d,registerBackButtonHandlerHelper:So},Symbol.toStringTag,{value:"Module"}));function Ad(e){return new Promise(t=>{if(u(a,s.content,s.sidePanel,s.settings,s.task,s.stage,s.meetingStage),!Eo())throw p;t(A(l(O,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))})}function Id(){return new Promise(e=>{if(u(a,s.content,s.sidePanel,s.settings,s.task,s.stage,s.meetingStage),!Eo())throw p;e(A(l(O,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))})}function Eo(){return!(!u(a)||!a.supports.pages)&&!!a.supports.pages.currentApp}const Td=Object.freeze(Object.defineProperty({__proto__:null,isSupported:Eo,navigateTo:Ad,navigateToDefaultPage:Id},Symbol.toStringTag,{value:"Module"}));function Pd(){if(u(a,s.content),!Ao())throw p;h(l(O,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Od(){if(u(a,s.content),!Ao())throw p;h(l(O,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}
6function Ao(){return!(!u(a)||!a.supports.pages)&&!!a.supports.pages.fullTrust}const _d=Object.freeze(Object.defineProperty({__proto__:null,enterFullscreen:Pd,exitFullscreen:Od,isSupported:Ao},Symbol.toStringTag,{value:"Module"}));function Rd(e){return ss(l(O,"pages.tabs.navigateToTab"),e)}function Md(e){return ls(l(O,"pages.tabs.getTabInstances"),e)}function Fd(e){return us(l(O,"pages.tabs.getMruTabInstances"),e)}function Sn(){return!(!u(a)||!a.supports.pages)&&!!a.supports.pages.tabs}const kd=Object.freeze(Object.defineProperty({__proto__:null,getMruTabInstances:Fd,getTabInstances:Md,isSupported:Sn,navigateToTab:Rd},Symbol.toStringTag,{value:"Module"}));var dr,Ge;function Ud(e){const t=l(O,"pages.returnFocus");if(u(a),!we())throw p;if(e===void 0&&h(t,"returnFocus",[!1]),typeof e=="boolean")h(t,"returnFocus",[e]);else switch(e){case Ge.PreviousLandmark:case Ge.GoToActivityFeed:h(t,"returnFocus",[!1,e]);break;case Ge.NextLandmark:h(t,"returnFocus",[!0,e])}}function Nd(e){Y(l(O,"pages.registerFocusEnterHandler"),"focusEnter",e,[],()=>{if(!we())throw p})}function os(e){Io(l(O,"pages.setCurrentFrame"),e)}function Dd(e,t,n){ya(),yn(l(O,"pages.initializeWithFrameContext"),n).then(()=>t&&t()),os(e)}function Ld(){return fs(l(O,"pages.getConfig."))}function xd(e){return is(l(O,"pages.navigateCrossDomain"),e)}function jd(e){return new Promise(t=>{if(u(a,s.content,s.sidePanel,s.settings,s.task,s.stage,s.meetingStage),!we())throw p;const n=l(O,"pages.navigateToApp");if(a.isLegacyTeams){const r=Mi(e)?e:Bd(e);t(G(n,"executeDeepLink",ru(r)))}else{const r=Mi(e)?Wd(e):e;t(G(n,"pages.navigateToApp",r))}})}function Hd(e){return cs(l(O,"pages.shareDeepLink"),e)}function zd(e){Y(l(O,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],()=>{if(!M(e)&&!we())throw p})}function we(){return!(!u(a)||!a.supports.pages)}(function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"})(dr||(dr={})),(function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"})(Ge||(Ge={}));const Jv=Object.freeze(Object.defineProperty({__proto__:null,get EnterFocusType(){return dr},get ReturnFocusType(){return Ge},appButton:Cd,backStack:Ed,config:hd,currentApp:Td,fullTrust:_d,getConfig:Ld,initializeWithFrameContext:Dd,isSupported:we,navigateCrossDomain:xd,navigateToApp:jd,registerFocusEnterHandler:Nd,registerFullScreenHandler:zd,returnFocus:Ud,setCurrentFrame:os,shareDeepLink:Hd,tabs:kd},Symbol.toStringTag,{value:"Module"})),O="v2";function is(e,t){return new Promise(n=>{if(u(a,s.content,s.sidePanel,s.settings,s.remove,s.task,s.stage,s.meetingStage),!we())throw p;n(mo(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))})}function as(e){return new Promise(t=>{if(u(a),!$o())throw p;t(mo(e,"navigateBack","Back navigation is not supported in the current client or context."))})}function ss(e,t){return new Promise(n=>{if(u(a),!Sn())throw p;n(mo(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))})}function Vd(e,t){if(u(a),!we())throw p;h(e,"returnFocus",[t])}function ls(e,t){return new Promise(n=>{if(u(a),!Sn())throw p;n(ve(e,"getTabInstances",t))})}function us(e,t){return new Promise(n=>{if(u(a),!Sn())throw p;n(ve(e,"getMruTabInstances",t))})}function cs(e,t){if(u(a,s.content,s.sidePanel,s.meetingStage),!we())throw p;h(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function Io(e,t){if(u(a,s.content),!we())throw p;h(e,"setFrameContext",[t])}function ds(e,t){if(u(a,s.settings,s.remove),!tt())throw p;h(e,"settings.setValidityState",[t])}function fs(e){return new Promise(t=>{if(u(a,s.content,s.settings,s.remove,s.sidePanel),!we())throw p;t(ve(e,"settings.getSettings"))})}function ps(e,t){return new Promise(n=>{if(u(a,s.content,s.settings,s.sidePanel),!tt())throw p;n(G(e,"settings.setSettings",t))})}function Mi(e){return e.appId instanceof ce}function Bd(e){return Object.assign(Object.assign({},e),{appId:new ce(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function Wd(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let fr;function qd(e){fr=e}function gs(){E(l("v2","pages.backStack.registerBackButtonPressHandler"),"backButtonPress",Gd,!1)}function Gd(){fr&&fr()||(se()?le("backButtonPress",[]):rs())}const Yd=V("handlers");
6let P=class oe{static initializeHandlers(){oe.handlers.themeChange=Xd,oe.handlers.contextChange=ef,oe.handlers.load=rf,oe.handlers.beforeUnload=af,gs()}static uninitializeHandlers(){oe.handlers={},oe.themeChangeHandler=null,oe.beforeUnloadHandler=null,oe.beforeSuspendOrTerminateHandler=null,oe.resumeHandler=null,oe.contextChangeHandler=null}};function Jd(){P.initializeHandlers()}function Kd(){P.uninitializeHandlers()}P.handlers={},P.themeChangeHandler=null,P.loadHandler=null,P.beforeUnloadHandler=null,P.beforeSuspendOrTerminateHandler=null,P.resumeHandler=null,P.hostToAppPerformanceMetricsHandler=null,P.contextChangeHandler=null;const Fi=Yd.extend("callHandler");function hs(e,t){const n=P.handlers[e];return n?(Fi("Invoking the registered handler for message %s with arguments %o",e,t),[!0,n.apply(this,t)]):se()?(le(e,t),[!1,void 0]):(Fi("Handler for action message %s not found.",e),[!1,void 0])}function E(e,t,n,r=!0,o=[]){n?(P.handlers[t]=n,r&&h(e,"registerHandler",[t,...o])):delete P.handlers[t]}function q(e){delete P.handlers[e]}function ki(e){return P.handlers[e]!=null}function Y(e,t,n,r,o){n&&u(a,...r),o&&o(),E(e,t,n)}function Qd(e,t){P.themeChangeHandler=t,!M(t)&&h(e,"registerHandler",["themeChange"])}function Zd(e,t){P.contextChangeHandler=t,!M(t)&&h(e,"registerHandler",["contextChange"])}function Xd(e){P.themeChangeHandler&&P.themeChangeHandler(e),se()&&le("themeChange",[e])}function ef(e){P.contextChangeHandler&&P.contextChangeHandler(e),se()&&le("contextChange",[e])}function tf(e){P.hostToAppPerformanceMetricsHandler=e}function Ui(e){P.hostToAppPerformanceMetricsHandler&&P.hostToAppPerformanceMetricsHandler(e)}function nf(e,t){P.loadHandler=t,!M(t)&&h(e,"registerHandler",["load"])}function rf(e){const t={entityId:(n=e).entityId,contentUrl:new URL(n.contentUrl)};var n;P.resumeHandler?(P.resumeHandler(t),se()&&le("load",[t])):P.loadHandler&&(P.loadHandler(e),se()&&le("load",[e]))}function of(e,t){P.beforeUnloadHandler=t,!M(t)&&h(e,"registerHandler",["beforeUnload"])}function af(){return S(this,void 0,void 0,function*(){const e=()=>{h(l("v2","handleBeforeUnload"),"readyToUnload",[])};P.beforeSuspendOrTerminateHandler?(yield P.beforeSuspendOrTerminateHandler(),se()?le("beforeUnload"):e()):P.beforeUnloadHandler&&P.beforeUnloadHandler(e)||(se()?le("beforeUnload"):e())})}function sf(e){P.beforeSuspendOrTerminateHandler=e,!M(e)&&h(l("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function lf(e){P.resumeHandler=e,!M(e)&&h(l("v2","registerOnResumeHandler"),"registerHandler",["load"])}const uf=V("childProxyingCommunication");let F=class{};function cf(){F.window=null,F.origin=null,F.messageQueue=[]}function se(){return!!Gi()&&!!F.window}function df(e,t){return!!Gi()&&(F.window&&!F.window.closed&&e!==F.window||(F.window=e,F.origin=t),F.window&&F.window.closed?(F.window=null,F.origin=null,!1):F.window===e)}function ff(e,t,n,r){return S(this,void 0,void 0,function*(){F.window===t&&(go(F.window,F.origin,F.messageQueue,"child"),(function(o,i,c){if(o.data.id===void 0||o.data.func===void 0)return;const d=cu(o.data),[m,g]=hs(d.func,d.args);if(m&&g!==void 0)return lt("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",ee(d),d.func),void Ni(d.id,d.uuid,Array.isArray(g)?g:[g]);lt("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",ee(d),d.func),(function(f,b,T){const R=b(l("v2","tasks.startTask"),f.func,f.args,!0,f.teamsJsInstanceId),_=F.origin;T(R.uuid,(...k)=>{if(!F.window)return;if(!Yi().disableEnforceOriginMatchForChildResponses&&_!==F.origin)return void lt("Origin of child window has changed, not sending response back to child window");const rt=k.pop();lt("Message from parent being relayed to child, id: %s",ee(f)),Ni(f.id,f.uuid,k,rt)})})(d,i,c)})(e,n,r))})}F.messageQueue=[];const lt=uf.extend("handleIncomingMessageFromChild");function Ni(e,t,n,r){const o=F.window,i=(function(m,g,f,b){return{id:m,uuid:g,args:f||[],isPartialResponse:b}})(e,t,n,r),c=fu(i),d=F.origin;o&&d&&(lt("Sending message %s to %s via postMessage, args = %o",ee(c),"child",c.args),o.postMessage(c,d))}function le(e,t){const n=F.window,r=(function(i,c){return{func:i,args:c||[]}})(e,t),o=F.origin;n&&o?n.postMessage(r,o):F.messageQueue.push(r)}const Ct="v1";function Qv(e,t){u(a),h(l(Ct,"uploadCustomApp"),"uploadCustomApp",[e],t||Ue())}function Zv(e,t,n){u(a),h(l(Ct,"sendCustomMessage"),e,t,n)}function Xv(e,t){if(u(a),!se())throw new Error("The child window has not yet been initialized or is not present");le(e,t)}function ew(e,t){u(a),E(l(Ct,"registerCustomHandler"),e,(...n)=>t.apply(this,n))}function tw(e,t){u(a),E(l(Ct,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function nw(e){u(a,s.content,s.sidePanel,s.task);const t=[e.entityId,e.title,e.description,e.type,e.objectUrl,e.downloadUrl,e.webPreviewUrl,e.webEditUrl,e.baseUrl,e.editFile,e.subEntityId,e.viewerAction,e.fileOpenPreference,e.conversationId,e.sizeInBytes,e.messageId,e.callerInfo,e.atpData,e.shareUrl,e.replyChainId];h(l(Ct,"openFilePreview"),"openFilePreview",t)}const Ne="v2";let To=class{constructor(t){this.invokeRequest=t}serialize(){return this.invokeRequest}};function ms(e){const t=e;return t.responseType===Qt.ActionExecuteInvokeResponse&&t.value!==void 0&&t.statusCode!==void 0&&t.type!==void 0}const pr="Action.Execute";var ht,Qt,Ze,Zt;(function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"})(ht||(ht={})),(function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"})(Qt||(Qt={}));let Po=class extends re{validate(t){return ms(t)}deserialize(t){return t}};function De(e){if(typeof e!="object"||e===null)return!1;const t=e;return Object.values(Ze).includes(t.errorCode)&&(t.message===void 0||typeof t.message=="string")}function vs(e){e.requestType===ht.ActionExecuteInvokeRequest?$n(e):e.requestType===ht.QueryMessageExtensionRequest&&(function(t){if(t.commandId.length>64)throw new Error("originalRequestInfo.commandId exceeds the maximum size of 64 characters");if(t.parameters.length>5)throw new Error("originalRequestInfo.parameters exceeds the maximum size of 5");for(const n of t.parameters){if(n.name.length>64)throw new Error("originalRequestInfo.parameters.name exceeds the maximum size of 64 characters");if(n.value.length>512)throw new Error("originalRequestInfo.parameters.value exceeds the maximum size of 512 characters")}})(e)}function $n(e){if(e.type!==pr)throw{errorCode:Ze.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${pr}"`};if(!er(e.data))throw{errorCode:Ze.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}function pf(e,t,n){if(u(a,s.content,s.sidePanel),!Ie())throw p;const r=new ce(e);return vs(n),x(l(Ne,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[r.toString(),n,t.url.href,t.width,t.height,t.isExternal]).then(([o,i])=>{if(o&&i.responseType!=null)return i;throw i})}function gf(e,t){if(u(a,s.content,s.sidePanel),!Ie())throw p;const n=new ce(e);return x(l(Ne,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then(([r,o])=>{if(!r)throw o})}function hf(e,t,n){if(u(a,s.content,s.sidePanel),!Ie())throw p;const r=new ce(e);return vs(n),x(l(Ne,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then(([o,i])=>{if(o&&i.responseType!=null)return i;throw i})}function mf(e,t,n){if(u(a,s.content,s.sidePanel),!Ie())throw p;return me(e,new Error("titleId is Invalid.")),me(t,new Error("oauthConfigId is Invalid.")),x(l(Ne,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then(([r,o])=>{if(!r)throw o})}function vf(e,t,n){if(u(a,s.content,s.sidePanel),!Ie())throw p;return me(e,new Error("titleId is Invalid.")),t&&ua(t),x(l(Ne,"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins"),"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins",[e,t?.toString(),n?.width,n?.height,n?.isExternal]).then(([r,o])=>{if(!r)throw o})}(function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"})(Ze||(Ze={}));let En=class{constructor(t){this.param=t}serialize(){var t,n,r;return{connectorId:this.param.connectorId,oAuthConfigId:this.param.oAuthConfigId,traceId:(r=(n=(t=this.param.traceId)===null||t===void 0?void 0:t.toString)===null||n===void 0?void 0:n.call(t))!==null&&r!==void 0?r:this.param.traceId,windowParameters:this.param.windowParameters?Object.assign({},this.param.windowParameters):void 0}}};function wf(e){if(u(a,s.content,s.sidePanel),!Ie())throw p;return me(e.connectorId,new Error("connectorId is Invalid.")),me(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),D("externalAppAuthentication.authenticateWithConnector",[new En(e)],l(Ne,"externalAppAuthentication.authenticateWithConnector"),De)}(function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"})(Zt||(Zt={}));let bf=class extends re{validate(t){return typeof t=="string"&&t in Zt}deserialize(t){return t}};function yf(e){if(u(a,s.content,s.sidePanel),!Ie())throw p;return me(e.connectorId,new Error("connectorId is Invalid.")),me(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),B("externalAppAuthentication.getUserAuthenticationStateForConnector",[new En(e)],new bf,l(Ne,"externalAppAuthentication.getUserAuthenticationStateForConnector"),De)}function Cf(e){if(u(a,s.content,s.sidePanel),!Ie())throw p;return me(e.connectorId,new Error("connectorId is Invalid.")),me(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),D("externalAppAuthentication.disconnectConnector",[new En(e)],l(Ne,"externalAppAuthentication.disconnectConnector"),De)}
6function Ie(){return!(!u(a)||!a.supports.externalAppAuthentication)}const sw=Object.freeze(Object.defineProperty({__proto__:null,ActionExecuteInvokeRequestType:pr,ActionExecuteResponseHandler:Po,get InvokeErrorCode(){return Ze},get InvokeResponseType(){return Qt},get OriginalRequestType(){return ht},SerializableActionExecuteInvokeRequest:To,SerializableConnectorParameters:En,get UserAuthenticationState(){return Zt},authenticateAndResendRequest:pf,authenticateWithConnector:wf,authenticateWithOauth2:mf,authenticateWithPowerPlatformConnectorPlugins:vf,authenticateWithSSO:gf,authenticateWithSSOAndResendRequest:hf,disconnectConnector:Cf,getUserAuthenticationStateForConnector:yf,isActionExecuteResponse:ms,isInvokeError:De,isSupported:Ie,validateActionExecuteInvokeRequest:$n},Symbol.toStringTag,{value:"Module"}));function Sf(e){if(!M(e)&&u(a),!M(e)&&!ws())throw p;e?E(l("v1","log.request"),"log.request",()=>{const t=e();h(l("v1","log.receive"),"log.receive",[t])}):q("log.request")}function ws(){return!(!u(a)||!a.supports.logs)}const lw=Object.freeze(Object.defineProperty({__proto__:null,isSupported:ws,registerGetLogHandler:Sf},Symbol.toStringTag,{value:"Module"})),ut="v1";function $f(e){return new Promise(t=>{if(u(a,s.content),!An())throw p;const n=G(l(ut,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&E(l(ut,"conversations.registerStartConversationHandler"),"startConversation",(r,o,i,c)=>{var d;return(d=e.onStartConversation)===null||d===void 0?void 0:d.call(e,{subEntityId:r,conversationId:o,channelId:i,entityId:c})}),e.onCloseConversation&&E(l(ut,"conversations.registerCloseConversationHandler"),"closeConversation",(r,o,i,c)=>{var d;return(d=e.onCloseConversation)===null||d===void 0?void 0:d.call(e,{subEntityId:r,conversationId:o,channelId:i,entityId:c})}),t(n)})}function Ef(){if(u(a,s.content),!An())throw p;h(l(ut,"conversations.closeConversation"),"conversations.closeConversation"),q("startConversation"),q("closeConversation")}function Af(){return new Promise(e=>{if(u(a),!An())throw p;e(ve(l(ut,"conversations.getChatMember"),"getChatMembers"))})}function An(){return!(!u(a)||!a.supports.conversations)}const uw=Object.freeze(Object.defineProperty({__proto__:null,closeConversation:Ef,getChatMembers:Af,isSupported:An,openConversation:$f},Symbol.toStringTag,{value:"Module"})),If=V("copilot");function Tf(){var e;return u(a)&&!!(!((e=a.supports.copilot)===null||e===void 0)&&e.customTelemetry)}function Pf(e,t){var n;return t===void 0&&(t=(n=gn())!==null&&n!==void 0?n:Date.now()),S(this,void 0,void 0,function*(){return u(a),If("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),D("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],l("v2","copilot.customTelemetry.sendCustomTelemetryData"))})}const Of=Object.freeze(Object.defineProperty({__proto__:null,isSupported:Tf,sendCustomTelemetryData:Pf},Symbol.toStringTag,{value:"Module"})),Di=V("copilot");function bs(){var e,t;return u(a)&&(!!(!((e=a.hostVersionsInfo)===null||e===void 0)&&e.appEligibilityInformation)||!!(!((t=a.supports.copilot)===null||t===void 0)&&t.eligibility))}function _f(e){var t,n,r;return S(this,void 0,void 0,function*(){if(u(a),!bs())throw new Error(`Error code: ${p.errorCode}, message: Not supported on platform`);if(!((t=a.hostVersionsInfo)===null||t===void 0)&&t.appEligibilityInformation&&!e)return Di("Eligibility information is already available on runtime."),a.hostVersionsInfo.appEligibilityInformation;Di("Eligibility information is not available on runtime. Requesting from host.");const o=yield ve(l("v2","copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(et(o))throw new Error(`Error code: ${o.errorCode}, message: ${(n=o.message)!==null&&n!==void 0?n:"Failed to get eligibility information from the host."}`);if(!(function(i){return!(i.ageGroup===void 0||i.cohort===void 0||i.userClassification===void 0||i.isCopilotEligible===void 0||i.isCopilotEnabledRegion===void 0||i.isOptedOutByAdmin===void 0||i.featureSet&&(i.featureSet.serverFeatures===void 0||i.featureSet.uxFeatures===void 0))})(o))throw new Error("Error deserializing eligibility information");return((r=o.ageGroup)===null||r===void 0?void 0:r.toLowerCase())==="nonadult"&&(o.ageGroup=Wt.NotAdult),o})}const Rf=Object.freeze(Object.defineProperty({__proto__:null,getEligibilityInfo:_f,isSupported:bs},Symbol.toStringTag,{value:"Module"}));var gr,hr,mr,vr,wr,br,yr,Cr,mt;(function(e){e.EMAIL="email",e.TEXT="text",e.MEDIA="media",e.CALENDAR_INVITE="calendarInvite",e.WEB_PAGE="webPage",e.MIXED="mixed",e.TEAMS="teams",e.FILE="file"})(gr||(gr={})),(function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"})(hr||(hr={})),(function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"})(mr||(mr={})),(function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"})(vr||(vr={})),(function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"})(wr||(wr={})),(function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"})(br||(br={})),(function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"})(yr||(yr={})),(function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"})(Cr||(Cr={})),(function(e){e.ConsentNotAccepted="consent_not_accepted",e.PageContentBlockedPolicy="page_content_blocked_policy",e.PageContentBlockedDlp="page_content_blocked_dlp",e.PageContentTypeNotSupportedYet="page_content_type_not_supported_yet",e.PageContentSizeNotSupported="page_content_size_not_supported",e.PageContextChanged="page_context_changed",e.PageContentExtractionFailed="page_content_extraction_failed",e.PageContentSizeNotSupportedPDF="page_content_size_not_supported_pdf",e.NotSupportedOnPlatform="not_supported_on_platform",e.OtherError="other_error"})(mt||(mt={}));
6let ys=class extends Error{constructor(t,n){super(n),this.errorCode=t,this.name="SidePanelError"}};const dw=Object.freeze(Object.defineProperty({__proto__:null,get ContentItemType(){return gr},get CopilotMode(){return wr},get MediaSelectionType(){return hr},get SidePanelErrorCode(){return mt},SidePanelErrorImpl:ys,get TeamsContextType(){return yr},get TeamsDimensionName(){return vr},get TeamsSessionType(){return mr},get TranscriptState(){return br},get UserConsent(){return Cr}},Symbol.toStringTag,{value:"Module"})),Oo="v2";function Cs(){var e;return u(a)&&!!(!((e=a.supports.copilot)===null||e===void 0)&&e.sidePanel)}function _o(e){if(typeof e!="object"||e===null)return!1;const t=e;return Object.values(mt).includes(t.errorCode)&&(t.message===void 0||typeof t.message=="string")||et(e)}function Mf(e){return S(this,void 0,void 0,function*(){u(a);const t=e?[new Df(e)]:[];return B("copilot.sidePanel.getContent",t,new Uf,l(Oo,"copilot.sidePanel.getContent"),_o)})}function Ff(e){return S(this,void 0,void 0,function*(){u(a);const t=e?[new Lf(e)]:[];return B("copilot.sidePanel.preCheckUserConsent",t,new Nf,l(Oo,"copilot.sidePanel.preCheckUserConsent"),_o)})}function kf(e){Y(l(Oo,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[s.content],()=>{if(!Cs())throw Ss})}const Ss=new ys(mt.NotSupportedOnPlatform,"This API is not supported on the current platform.");let Uf=class extends re{validate(t){return t!==null&&typeof t=="object"}deserialize(t){return t}},Nf=class extends re{validate(t){return t!==null&&typeof t=="object"}deserialize(t){return t}},Df=class{constructor(t){this.contentRequest=t}serialize(){return this.contentRequest}},Lf=class{constructor(t){this.userConsentRequest=t}serialize(){return this.userConsentRequest}};const xf=Object.freeze(Object.defineProperty({__proto__:null,copilotSidePanelNotSupportedOnPlatformError:Ss,getContent:Mf,isResponseAReportableError:_o,isSupported:Cs,preCheckUserConsent:Ff,registerUserActionContentSelect:kf},Symbol.toStringTag,{value:"Module"}));function jf(){var e;return u(a)&&!!(!((e=a.supports.copilot)===null||e===void 0)&&e.view)}function Hf(){return S(this,void 0,void 0,function*(){u(a),yield B("copilot.view.closeSidePanel",[],new zf,l("v2","copilot.view.closeSidePanel"))})}let zf=class extends re{validate(t){return!0}deserialize(t){return t}};const Vf=Object.freeze(Object.defineProperty({__proto__:null,closeSidePanel:Hf,isSupported:jf},Symbol.toStringTag,{value:"Module"})),vw=Object.freeze(Object.defineProperty({__proto__:null,customTelemetry:Of,eligibility:Rf,sidePanel:xf,view:Vf},Symbol.toStringTag,{value:"Module"})),In="v2";function Bf(e,t,n){return S(this,void 0,void 0,function*(){if(u(a,s.content,s.sidePanel),!St())throw p;return We(e,t),D("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],l(In,"externalAppAuthenticationForCEA.authenticateWithSSO"),De)})}function Wf(e,t,n){return S(this,void 0,void 0,function*(){if(u(a,s.content,s.sidePanel),!St())throw p;return We(e,t),D("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],l(In,"externalAppAuthenticationForCEA.authenticateWithOauth"),De)})}function qf(e,t,n,r){return S(this,void 0,void 0,function*(){if(u(a,s.content,s.sidePanel),!St())throw p;return We(e,t),$n(r),B("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new To(r),n.url.href,n.width,n.height,n.isExternal],new Po,l(In,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),De)})}function Gf(e,t,n,r){return S(this,void 0,void 0,function*(){if(u(a,s.content,s.sidePanel),!St())throw p;return We(e,t),$n(r),B("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new To(r),n.authId,n.connectionName,n.claims,n.silent],new Po,l(In,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),De)})}function St(){return!(!u(a)||!a.supports.externalAppAuthenticationForCEA)}function We(e,t){me(t,new Error("conversation id is not valid.")),Ma(e)}const ww=Object.freeze(Object.defineProperty({__proto__:null,authenticateAndResendRequest:qf,authenticateWithOauth:Wf,authenticateWithSSO:Bf,authenticateWithSSOAndResendRequest:Gf,isSupported:St,validateInput:We},Symbol.toStringTag,{value:"Module"}));var Sr,$r;function Yf(e,t){if(u(a,s.content,s.sidePanel),!Ro())throw p;const n=new ce(e);return x(l("v2","externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then(([r,o])=>{if(!r)throw o})}function Jf(e,t,n){if(u(a,s.content,s.sidePanel),!Ro())throw p;const r=new ce(e);return x(l("v2","externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then(([o,i])=>{if(o)throw o;return i})}
6function Ro(){return!(!u(a)||!a.supports.externalAppCardActions)}(function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"})(Sr||(Sr={})),(function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"})($r||($r={}));const bw=Object.freeze(Object.defineProperty({__proto__:null,get ActionOpenUrlErrorCode(){return $r},get ActionOpenUrlType(){return Sr},isSupported:Ro,processActionOpenUrl:Jf,processActionSubmit:Yf},Symbol.toStringTag,{value:"Module"}));function Kf(e,t,n){return S(this,void 0,void 0,function*(){if(u(a,s.content,s.sidePanel),!Mo())throw p;We(e,t);const[r,o]=yield x(l("v2","externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o})}function Qf(e,t,n){return S(this,void 0,void 0,function*(){if(u(a,s.content,s.sidePanel),!Mo())throw p;We(e,t);const r=yield ve(l("v2","externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r})}function Mo(){return!(!u(a)||!a.supports.externalAppCardActionsForCEA)}const yw=Object.freeze(Object.defineProperty({__proto__:null,isSupported:Mo,processActionOpenUrl:Kf,processActionSubmit:Qf},Symbol.toStringTag,{value:"Module"}));var Er;(function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"})(Er||(Er={}));function Zf(e){if(typeof e!="object"||e===null)return!1;const t=e;return Object.values(Er).includes(t.errorCode)&&(t.message===void 0||typeof t.message=="string")}function Xf(e,t,n){return S(this,void 0,void 0,function*(){if(u(a,s.content,s.sidePanel),!$s())throw p;return(function(r,o){Ma(r),uu(o)})(e,n),D("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new Es(t),n],l("v2","externalAppCardActionsForDA.processActionOpenUrlDialog"),Zf)})}function $s(){return!(!u(a)||!a.supports.externalAppCardActionsForDA)}let Es=class{constructor(t){this.info=t}serialize(){const{url:t,title:n,size:r}=this.info;return{url:t.href,title:n,size:r}}};const Sw=Object.freeze(Object.defineProperty({__proto__:null,SerializableActionOpenUrlDialogInfo:Es,isSupported:$s,processActionOpenUrlDialog:Xf},Symbol.toStringTag,{value:"Module"}));function ep(e,t,n){return S(this,void 0,void 0,function*(){if(u(a,s.content,s.sidePanel),!As())throw p;const r=new ce(e),[o,i]=yield x(l("v2","externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i})}function As(){return!(!u(a)||!a.supports.externalAppCommands)}const $w=Object.freeze(Object.defineProperty({__proto__:null,isSupported:As,processActionCommand:ep},Symbol.toStringTag,{value:"Module"})),H="v1";var Ar,Ir,Tr,Pr,Or,_r;function tp(e,t){if(u(a,s.content),!e||e.length===0)throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");if(!t)throw new Error("[files.getCloudStorageFolders] Callback cannot be null");h(l(H,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function np(e,t){if(u(a,s.content),!e||e.length===0)throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.addCloudStorageFolder] Callback cannot be null");h(l(H,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function rp(e,t,n){if(u(a,s.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");h(l(H,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function op(e,t,n){if(u(a,s.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");h(l(H,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}
6function ip(e,t,n){if(u(a,s.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");h(l(H,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function ap(e=!1,t){if(u(a,s.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");h(l(H,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function sp(e,t,n,r,o=!1,i){if(u(a,s.content),!e||e.length===0)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");h(l(H,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function lp(e){if(u(a,s.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");h(l(H,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function up(e=void 0,t){if(u(a,s.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");h(l(H,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function cp(e){if(u(a,s.content),!e)throw K(C.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");h(l(H,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function dp(e,t){if(u(a,s.content),!t)throw K(C.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw K(C.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");h(l(H,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function fp(e,t){if(u(a,s.content),!t)throw K(C.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw K(C.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");h(l(H,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function pp(e,t){if(u(a,s.content),!t)throw K(C.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw K(C.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");h(l(H,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function gp(e,t){if(u(a,s.content),!t)throw K(C.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw K(C.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");h(l(H,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function hp(e,t){if(u(a,s.content),!t)throw K(C.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw K(C.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");h(l(H,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function mp(e,t){if(u(a,s.content),!t)throw K(C.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw K(C.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw K(C.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");h(l(H,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function vp(e){if(u(a),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");E(l(H,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function wp(e){if(u(a),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");E(l(H,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function K(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"})(Ar||(Ar={})),(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"})(Ir||(Ir={})),(function(e){e.ClassMaterials="classMaterials"})(Tr||(Tr={})),(function(e){e.Readonly="readonly"})(Pr||(Pr={})),(function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"})(Or||(Or={})),(function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"})(_r||(_r={}));const Ew=Object.freeze(Object.defineProperty({__proto__:null,get CloudStorageProvider(){return Ar},get CloudStorageProviderFileAction(){return _r},get CloudStorageProviderType(){return Ir},get DocumentLibraryAccessType(){return Pr},get FileDownloadStatus(){return Or},get SpecialDocumentLibraryType(){return Tr},addCloudStorageFolder:np,addCloudStorageProvider:cp,addCloudStorageProviderFile:fp,copyMoveFiles:sp,deleteCloudStorageFolder:rp,deleteCloudStorageProviderFile:gp,downloadCloudStorageProviderFile:hp,getCloudStorageFolderContents:op,getCloudStorageFolders:tp,getExternalProviders:ap,getFileDownloads:lp,openCloudStorageFile:ip,openDownloadFolder:up,registerCloudStorageProviderContentChangeHandler:wp,registerCloudStorageProviderListChangeHandler:vp,removeCloudStorageProvider:dp,renameCloudStorageProviderFile:pp,uploadCloudStorageProviderFile:mp},Symbol.toStringTag,{value:"Module"})),Tn="v1";function bp(){return new Promise(e=>{if(u(a),!$t())throw p;e(A(l(Tn,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))})}function yp(e){return new Promise(t=>{if(!e||e.length==0)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(u(a),!$t())throw p;t(A(l(Tn,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))})}function Cp(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(u(a),!$t())throw p;E(l(Tn,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",t=>{u(a),e(t)})}function Sp(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(u(a),!$t())throw p;E(l(Tn,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",t=>{u(a),e(t)})}
6function $t(){return!(!u(a)||!a.supports.meetingRoom)}const Aw=Object.freeze(Object.defineProperty({__proto__:null,getPairedMeetingRoomInfo:bp,isSupported:$t,registerMeetingRoomCapabilitiesUpdateHandler:Cp,registerMeetingRoomStatesUpdateHandler:Sp,sendCommandToPairedMeetingRoom:yp},Symbol.toStringTag,{value:"Module"}));function $p(){return!(!u(a)||!a.supports.messageChannels)}const Iw=Object.freeze(Object.defineProperty({__proto__:null,dataLayer:Cc,isSupported:$p,telemetry:wc},Symbol.toStringTag,{value:"Module"})),Ep="1.0.1",Ap={onMessage:function(e,t){if(!e||!e.data||typeof e.data!="object"||e.data===null)return void ct("Invalid message format, ignoring. Message: %o",e);if(!(function(i,c){if(c===Ht)try{return new URL(c).protocol==="https:"}catch(d){return Xt("Invalid message origin URL:",d),!1}return!1})(e.source,e.origin))return void ct("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=n??[],o=(()=>{try{return JSON.parse(r)}catch(i){return Xt("Failed to parse response message:",i),null}})();if(!o||o.messageType!=="NestedAppAuthResponse")return void ct("Invalid response format, ignoring. Message: %o",e);t(r)}};let Ht=null,Fo=!1;function Ip(e,t,n=!1){if(Fo=n,!e)throw new Error("Cannot polyfill nestedAppAuthBridge as the current window does not exist");if(!t)throw new Error("Top origin is required to initialize the Nested App Auth Bridge");try{const i=new URL(t);if(i.protocol!=="https:")throw new Error(`Invalid top origin: ${t}. Only HTTPS origins are allowed.`);Ht=i.origin}catch{throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void ct("Nested App Auth Bridge is already present");const o=(function(i){const c=new WeakMap,{onMessage:d}=Ap,m=g=>f=>d(f,g);return{addEventListener:(g,f)=>{if(g==="message"){const b=m(f);c.set(f,b),i.addEventListener(g,b)}else ct(`Event ${g} is not supported by nestedAppAuthBridge`)},postMessage:g=>{if(!i.top)throw new Error("window.top is not available for posting messages");try{const f=JSON.parse(g);if(typeof f=="object"&&f.messageType==="NestedAppAuthRequest"){const b=(function(T){const R=Date.now();return{id:Tp(),uuid:ia(),func:"nestedAppAuth.execute",timestamp:R,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:R,args:[],data:T}})(g);if(i===i.top||!Ht)return void Xt("Not in an embedded iframe; skipping postMessage.");i.top.postMessage(b,Ht)}}catch(f){return void Xt("Failed to parse message:",f,"Original message:",g)}},removeEventListener:(g,f)=>{const b=c.get(f);b&&(i.removeEventListener(g,b),c.delete(f))}}})(r);o&&(r.nestedAppAuthBridge=o)}function Tp(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function ct(...e){Fo&&console.log(...e)}function Xt(...e){Fo&&console.error(...e)}const Tw=Object.freeze(Object.defineProperty({__proto__:null,initialize:Ip,version:Ep},Symbol.toStringTag,{value:"Module"}));function Pp(e){if(u(a,s.content),!Is())throw p;h(l("v1","notifications.showNotification"),"notifications.showNotification",[e])}function Is(){return!(!u(a)||!a.supports.notifications)}const Pw=Object.freeze(Object.defineProperty({__proto__:null,isSupported:Is,showNotification:Pp},Symbol.toStringTag,{value:"Module"})),ko="v2";function Op(e){if(!Pn())throw new Error(C.NOT_SUPPORTED_ON_PLATFORM.toString());if(M(e))throw new Error(C.INVALID_ARGUMENTS.toString());E(l(ko,"otherApp.install"),"otherApp.install",e)}function _p(){if(!Pn())throw new Error(C.NOT_SUPPORTED_ON_PLATFORM.toString());h(l(ko,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),q("otherApp.install")}function Rp(e){if(!Pn())throw new Error(C.NOT_SUPPORTED_ON_PLATFORM.toString());return D("otherApp.notifyInstallCompleted",[e.toString()],l(ko,"otherApp.notifyInstallCompleted"))}function Pn(){return!(!u(a)||!a.supports.otherAppStateChange)}const Ow=Object.freeze(Object.defineProperty({__proto__:null,isSupported:Pn,notifyInstallCompleted:Rp,registerAppInstallationHandler:Op,unregisterAppInstallationHandler:_p},Symbol.toStringTag,{value:"Module"}));function Ts(){return u(a)&&!!a.supports.plugins}function Mp(e){return S(this,void 0,void 0,function*(){if(u(a),!e.func)throw new Error("func is required in PluginMessage.");return D("plugins.sendMessage",[new kp(e)],l("v2","plugins.sendMessage"))})}function Fp(e){Y(l("v2","plugins.receiveMessage"),"plugins.receiveMessage",(...t)=>{e((function(n){if(n.length===1&&(function(c){return!c||typeof c!="object"?!1:typeof c.func=="string"})(n[0]))return n[0];const[r,o,i]=n;return{func:typeof r=="string"?r:String(r??""),args:o,correlationId:typeof i=="string"?i:void 0}})(t))},Object.values(s),()=>{if(!Ts())throw new Error("Receiving plugin messages is not supported in the current host.")})}let kp=class{constructor(t){this.message=t}serialize(){return this.message}};const Rw=Object.freeze(Object.defineProperty({__proto__:null,isSupported:Ts,registerPluginMessage:Fp,sendPluginMessage:Mp},Symbol.toStringTag,{value:"Module"})),Le="v1";var Rr,Mr,Fr;function Up(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(u(a,s.sidePanel),!Te())throw p;h(l(Le,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Np(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(u(a,s.sidePanel),!Te())throw p;h(l(Le,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Dp(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(u(a,s.sidePanel),!Te())throw p;h(l(Le,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function Lp(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(u(a,s.sidePanel),!Te())throw p;h(l(Le,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function xp(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(u(a,s.sidePanel),!Te())throw p;E(l(Le,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function jp(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(u(a,s.sidePanel),!Te())throw p;E(l(Le,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Hp(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(u(a,s.sidePanel),!Te())throw p;E(l(Le,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function zp(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(u(a,s.sidePanel),!Te())throw p;E(l(Le,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}
6function Te(){return!(!u(a)||!a.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"})(Rr||(Rr={})),(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"})(Mr||(Mr={})),(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"})(Fr||(Fr={}));const Mw=Object.freeze(Object.defineProperty({__proto__:null,get ControlCommand(){return Rr},get ErrorReason(){return Mr},get SessionTerminatedReason(){return Fr},getCapableParticipants:Up,isSupported:Te,registerOnCapableParticipantsChangeHandler:xp,registerOnDeviceStateChangeHandler:Hp,registerOnErrorHandler:jp,registerOnSessionStatusChangeHandler:zp,requestControl:Np,sendControlCommand:Dp,terminateSession:Lp},Symbol.toStringTag,{value:"Module"}));function Vp(e,t,n,r){if(u(a,s.content),!Ps())throw p;if(!e||e.length==0)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!r)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");h(l("v1","appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Ps(){return!(!u(a)||!a.supports.appEntity)}const Fw=Object.freeze(Object.defineProperty({__proto__:null,isSupported:Ps,selectAppEntity:Vp},Symbol.toStringTag,{value:"Module"}));function Bp(e){return new Promise(t=>{if(u(a),!Os())throw p;if((w.hostClientType===$.android||w.hostClientType===$.teamsRoomsAndroid||w.hostClientType===$.teamsPhones||w.hostClientType===$.teamsDisplays)&&!te($u)){const n={errorCode:C.OLD_PLATFORM};throw new Error(JSON.stringify(n))}t(ve(l("v1","teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))})}function Os(){return!(!u(a)||!a.supports.teams)&&!!a.supports.teams.fullTrust&&!!a.supports.teams.fullTrust.joinedTeams}const Wp=Object.freeze(Object.defineProperty({__proto__:null,getUserJoinedTeams:Bp,isSupported:Os},Symbol.toStringTag,{value:"Module"}));function qp(e){return S(this,void 0,void 0,function*(){if(u(a),!_s())throw p;return B("getConfigSetting",[e],new bo,l("v1","teams.fullTrust.getConfigSetting"))})}function _s(){return!(!u(a)||!a.supports.teams)&&!!a.supports.teams.fullTrust}const Gp=Object.freeze(Object.defineProperty({__proto__:null,getConfigSetting:qp,isSupported:_s,joinedTeams:Wp},Symbol.toStringTag,{value:"Module"}));var kr;function Yp(e,t){if(u(a,s.content),!Uo())throw p;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");h(l("v1","teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Jp(e,t){if(u(a),!Uo())throw p;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");h(l("v1","teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Uo(){return!(!u(a)||!a.supports.teams)}(function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"})(kr||(kr={}));const kw=Object.freeze(Object.defineProperty({__proto__:null,get ChannelType(){return kr},fullTrust:Gp,getTeamChannels:Yp,isSupported:Uo,refreshSiteUrl:Jp},Symbol.toStringTag,{value:"Module"}));let Ye=class ye{static setTimeout(t,n){const r=performance.now(),o=lo();return ye.setTimeoutCallbacks[o]={callback:t,timeoutInMs:n,startedAtInMs:r},o}static clearTimeout(t){delete ye.setTimeoutCallbacks[t]}static setInterval(t,n){ye.setTimeout(function r(){t(),ye.setTimeout(r,n)},n)}static tick(){const t=performance.now(),n=[];for(const r in ye.setTimeoutCallbacks){const o=ye.setTimeoutCallbacks[r];t-o.startedAtInMs>=o.timeoutInMs&&n.push(r)}for(const r of n)ye.setTimeoutCallbacks[r].callback(),delete ye.setTimeoutCallbacks[r]}};Ye.setTimeoutCallbacks={};let Ur=class Nr{constructor(t,n){this.reportStatisticsResult=n,this.sampleCount=0,this.distributionBins=new Uint32Array(t)}processStarts(t,n,r,o){Ye.tick(),this.suitableForThisSession(t,n,r,o)||this.reportAndResetSession(this.getStatistics(),t,o,n,r),this.start()}processEnds(){const t=performance.now()-this.frameProcessingStartedAt,n=Math.floor(Math.max(0,Math.min(this.distributionBins.length-1,t)));this.distributionBins[n]+=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(t,n,r,o){return this.currentSession&&this.currentSession.effectId===t&&this.currentSession.effectParam
6===o&&this.currentSession.frameWidth===n&&this.currentSession.frameHeight===r}reportAndResetSession(t,n,r,o,i){t&&this.reportStatisticsResult(t),this.resetCurrentSession(this.getNextTimeout(n,this.currentSession),n,r,o,i),this.timeoutId&&Ye.clearTimeout(this.timeoutId),this.timeoutId=Ye.setTimeout((()=>this.reportAndResetSession(this.getStatistics(),n,r,o,i)).bind(this),this.currentSession.timeoutInMs)}resetCurrentSession(t,n,r,o,i){this.currentSession={startedAtInMs:performance.now(),timeoutInMs:t,effectId:n,effectParam:r,frameWidth:o,frameHeight:i},this.sampleCount=0,this.distributionBins.fill(0)}getNextTimeout(t,n){return n&&n.effectId===t?Math.min(Nr.maxSessionTimeoutInMs,2*n.timeoutInMs):Nr.initialSessionTimeoutInMs}};Ur.initialSessionTimeoutInMs=1e3,Ur.maxSessionTimeoutInMs=3e4;const Nt="v2";let en=class Dr{constructor(t){this.reportPerformanceEvent=t,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Ur(Dr.distributionBinSize,n=>this.reportPerformanceEvent(l(Nt,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[n]))}startMonitorSlowFrameProcessing(){Ye.setInterval(()=>{if(this.processedFrameCount===0)return;const t=this.frameProcessingTimeCost/this.processedFrameCount;t>this.frameProcessTimeLimit&&this.reportPerformanceEvent(l(Nt,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[t]),this.frameProcessingTimeCost=0,this.processedFrameCount=0},Dr.calculateFPSInterval)}setFrameProcessTimeLimit(t){this.frameProcessTimeLimit=t}reportApplyingVideoEffect(t,n){var r,o;((r=this.applyingEffect)===null||r===void 0?void 0:r.effectId)===t&&((o=this.applyingEffect)===null||o===void 0?void 0:o.effectParam)===n||(this.applyingEffect={effectId:t,effectParam:n},this.appliedEffect=void 0)}reportVideoEffectChanged(t,n){this.applyingEffect===void 0||this.applyingEffect.effectId!==t&&this.applyingEffect.effectParam!==n||(this.appliedEffect={effectId:t,effectParam:n},this.applyingEffect=void 0,this.isFirstFrameProcessed=!1)}reportStartFrameProcessing(t,n){Ye.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,t,n,this.appliedEffect.effectParam))}reportFrameProcessed(){var t;this.appliedEffect&&(this.processedFrameCount++,this.frameProcessingTimeCost+=performance.now()-this.frameProcessingStartedAt,this.performanceStatistics.processEnds(),this.isFirstFrameProcessed||(this.isFirstFrameProcessed=!0,this.reportPerformanceEvent(l(Nt,"videoPerformanceMonitor.reportFrameProcessed"),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,(t=this.appliedEffect)===null||t===void 0?void 0:t.effectParam])))}reportGettingTextureStream(t){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=t}reportTextureStreamAcquired(){if(this.gettingTextureStreamStartedAt!==void 0){const t=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(l(Nt,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,t])}}};en.distributionBinSize=1e3,en.calculateFPSInterval=1e3;const de="v2",ie=ue()?void 0:new en(h);var Lr,xr,vt;function Kp(e){if(u(a,s.sidePanel),!Ee())throw p;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(E(l(de,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",t=>ie?.setFrameProcessTimeLimit(t.timeLimit),!1),xi())(function(t,n){if(u(a,s.sidePanel),!Ee()||!xi())throw p;E(l(de,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",r=>S(this,void 0,void 0,function*(){const{streamId:o}=r;yield Rs(o,(function(c,d){return m=>S(this,void 0,void 0,function*(){const g=m.videoFrame;d?.reportStartFrameProcessing(g.codedWidth,g.codedHeight);const f=yield c(m);return d?.reportFrameProcessed(),f})})(t,ie),Li,ie)}),!1),h(l(de,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[n])})(e.videoFrameHandler,e.config);else{if(!ji())throw p;(function(t,n){if(u(a,s.sidePanel),!Ee()||!ji())throw p;E(l(de,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",r=>{if(r){const o=r.timestamp;ie?.reportStartFrameProcessing(r.width,r.height),t((function(i){if("videoFrameBuffer"in i)return i;{const{data:c}=i,d=ke(i,["data"]);return Object.assign(Object.assign({},d),{videoFrameBuffer:c})}})(r),()=>{ie?.reportFrameProcessed(),(function(i){h(l(de,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[i])})(o)},Li)}},!1),h(l(de,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[n])})(e.videoBufferHandler,e.config)}ie?.startMonitorSlowFrameProcessing()}function Qp(e,t){if(u(a,s.sidePanel),!Ee())throw p;h(l(de,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function Zp(e){if(u(a,s.sidePanel),!Ee())throw p;E(l(de,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Us(e,ie),!1),h(l(de,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function Li(e){h(l(de,"videoEffects.notifyError"),"video.notifyError",[e])}function Ee(){return u(a)&&!!a.supports.video&&(!!a.supports.video.mediaStream||!!a.supports.video.sharedFrame)}function xi(){var e;return u(a,s.sidePanel)&&(function(){var t,n,r,o;return!(!(!((n=(t=Ke().chrome)===null||t===void 0?void 0:t.webview)===null||n===void 0)&&n.getTextureStream)||!(!((o=(r=Ke().chrome)===null||r===void 0?void 0:r.webview)===null||o===void 0)&&o.registerTextureStream))})()&&!!(!((e=a.supports.video)===null||e===void 0)&&e.mediaStream)}function ji(){var e;return u(a,s.sidePanel)&&!!(!((e=a.supports.video)===null||e===void 0)&&e.sharedFrame)}(function(e){e.NV12="NV12"})(Lr||(Lr={})),(function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"})(xr||(xr={})),(function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"})(vt||(vt={}));const Uw=Object.freeze(Object.defineProperty({__proto__:null,get EffectChangeType(){return xr},get EffectFailureReason(){return vt},get VideoFrameFormat(){return Lr},isSupported:Ee,notifySelectedVideoEffectChanged:Qp,registerForVideoEffect:Zp,registerForVideoFrame:Kp},Symbol.toStringTag,{value:"Module"})),jr="v2";function Rs(e,t,n,r){var o,i;return S(this,void 0,void 0,function*(){const c=Fs();!ue()&&((i=(o=window.chrome)===null||o===void 0?void 0:o.webview)===null||i===void 0||i.registerTextureStream(e,c)),ks(yield Ms(e,n,r),new eg(n,t),c.writable)})}function Xp(e,t,n,r){var o,i;return S(this,void 0,void 0,function*(){const c=Fs();!ue()&&((i=(o=window.chrome)===null||o===void 0?void 0:o.webview)===null||i===void 0||i.registerTextureStream(e,c)),ks(yield Ms(e,n,r),new rg(n,t),c.writable)})}function Ms(e,t,n){return S(this,void 0,void 0,function*(){if(ue())throw p;const r=Ke().chrome;try{n?.reportGettingTextureStream(e);const o=(yield r.webview.getTextureStream(e)).getVideoTracks();if(o.length===0)throw new Error(`No video track in stream ${e}`);return n?.reportTextureStreamAcquired(),o[0]}catch(o){throw t(`Failed to get video track from stream ${e}, error: ${o}`),new Error(`Internal error: can't get video track from stream ${e}`)}})}function Fs(){if(ue())throw p;const e=window.MediaStreamTrackGenerator;if(!e)throw p;return new e({kind:"video"})}function ks(e,t,n){new(Ke()).MediaStreamTrackProcessor({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}let eg=class{constructor(t,n){this.notifyError=t,this.videoFrameHandler=n,this.transform=(r,o)=>S(this,void 0,void 0,function*(){const i=r.timestamp;if(i!==null)try{const c=yield this.videoFrameHandler({videoFrame:r}),d=new VideoFrame(c,{timestamp:i});o.enqueue(d),r.close(),c.close()}catch(c){r.close(),this.notifyError(c)}else this.notifyError("timestamp of the original video frame is null")})}},tg=class{constructor(t,n){if(this.headerBuffer=t,this.notifyError=n,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(t),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]}},ng=class{constructor(t,n){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;
6const r=new Uint32Array(t);for(let o=0,i=0;o<n;o++){const c=r[i++],d=r[i++],m=r[i++],g=new Uint8Array(t,d,m);this.metadataMap.set(c,g)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const t=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(t===void 0)return;const n=new Map,r=new TextDecoder("utf-8");let o=0;const i=t[o]+(t[++o]<<8)+(t[++o]<<16)+(t[++o]<<24);for(let c=0;c<i&&o<t.length-1;c++){const d=t[++o]+(t[++o]<<8)+(t[++o]<<16)+(t[++o]<<24),m=t.findIndex((b,T,R)=>b==0&&T>o),g=r.decode(t.slice(++o,m)),f=this.metadataMap.get(d);f!==void 0&&n.set(g,f),o=m+(4-(m-o)%4-1)}return n}},rg=class{constructor(t,n){this.notifyError=t,this.videoFrameHandler=n,this.shouldDiscardAudioInferenceResult=!1,this.transform=(r,o)=>S(this,void 0,void 0,function*(){const i=r.timestamp;if(i!==null)try{const{videoFrame:c,metadata:{audioInferenceResult:d,attributes:m}={}}=yield this.extractVideoFrameAndMetadata(r),g=yield this.videoFrameHandler({videoFrame:c,audioInferenceResult:d,attributes:m}),f=new VideoFrame(g,{timestamp:i});o.enqueue(f),c.close(),r.close(),g.close()}catch(c){r.close(),this.notifyError(c)}else this.notifyError("timestamp of the original video frame is null")}),this.extractVideoFrameAndMetadata=r=>S(this,void 0,void 0,function*(){if(ue())throw p;if(r.format!=="NV12")throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const o={x:0,y:0,width:r.codedWidth,height:2},i=new ArrayBuffer(o.width*o.height*3/2);yield r.copyTo(i,{rect:o});const c=new tg(i,this.notifyError),d={x:0,y:c.multiStreamHeaderRowOffset,width:r.codedWidth,height:r.codedHeight-c.multiStreamHeaderRowOffset},m=new ArrayBuffer(d.width*d.height*3/2);yield r.copyTo(m,{rect:d});const g=new ng(m,c.multiStreamCount);return{videoFrame:new VideoFrame(r,{timestamp:r.timestamp,visibleRect:{x:0,y:c.frameRowOffset,width:c.frameWidth,height:c.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:g.audioInferenceResult,attributes:g.attributes}}}),E(l(jr,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",({discardAudioInferenceResult:r})=>{this.shouldDiscardAudioInferenceResult=r})}};function Us(e,t){return(n,r)=>{t?.reportApplyingVideoEffect(n||"",r),e(n,r).then(()=>{t?.reportVideoEffectChanged(n||"",r),h(l(jr,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])}).catch(o=>{const i=o in vt?o:vt.InitializationFailure;h(l(jr,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,i,r])})}}const ae="v2",Ns=2e3,Q=ue()?void 0:new en(h);var Xe;function og(e){var t,n;if(!On())throw p;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(u(a,s.sidePanel)){if(E(l(ae,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",r=>Q?.setFrameProcessTimeLimit(r),!1),(t=a.supports.video)===null||t===void 0?void 0:t.mediaStream)E(l(ae,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",r=>S(this,void 0,void 0,function*(){const{streamId:o,metadataInTexture:i}=r,c=Q?(function(d,m){return g=>S(this,void 0,void 0,function*(){const f=g.videoFrame;m.reportStartFrameProcessing(f.codedWidth,f.codedHeight);const b=Hi(),T=yield d(g);return b(),m.reportFrameProcessed(),T})})(e.videoFrameHandler,Q):e.videoFrameHandler;i?yield Xp(o,c,dt,Q):yield Rs(o,c,dt,Q)}),!1),h(l(ae,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(!((n=a.supports.video)===null||n===void 0)&&n.sharedFrame))throw p;E(l(ae,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",r=>{if(r){Q?.reportStartFrameProcessing(r.width,r.height);const o=Hi(),i=r.timestamp;e.videoBufferHandler((function(c){return c.videoFrameBuffer=c.videoFrameBuffer||c.data,delete c.data,c})(r),()=>{o(),Q?.reportFrameProcessed(),(function(c){h(l(ae,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[c])})(i)},dt)}},!1),h(l(ae,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}Q?.startMonitorSlowFrameProcessing()}}function Hi(){const e=setTimeout(()=>{dt("Frame not processed in 2000ms",Xe.Warn)},Ns);return function(){clearTimeout(e)}}function ig(e,t,n){if(u(a,s.sidePanel),!On())throw p;h(l(ae,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function ag(e){if(u(a,s.sidePanel),!On())throw p;E(l(ae,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Us(e,Q),!1),h(l(ae,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function sg(e){if(u(a,s.sidePanel),!Ee())throw p;h(l(ae,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function On(){return u(a),Ee()}function dt(e,t=Xe.Warn){h(l(ae,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function lg(e){if(u(a),!Ee())throw p;dt(e,Xe.Fatal)}(function(e){e.Fatal="fatal",e.Warn="warn"})(Xe||(Xe={}));const jw=Object.freeze(Object.defineProperty({__proto__:null,get ErrorLevel(){return Xe},frameProcessingTimeoutInMs:Ns,isSupported:On,notifyFatalError:lg,notifySelectedVideoEffectChanged:ig,registerForVideoEffect:ag,registerForVideoFrame:og,updatePersonalizedEffects:sg},Symbol.toStringTag,{value:"Module"})),Et="v2";let Ds=class extends re{validate(t){return t.tabType==="ConfigurableTab"}deserialize(t){return t}},Ls=class{constructor(t){this.configurableTabInstance=t}serialize(){return this.configurableTabInstance}},At=class{constructor(t){this.hostEntityId=t}serialize(){return this.hostEntityId}},ug=class extends re{validate(t){return t.tabType==="ConfigurableTab"||t.tabType==="StaticTab"}deserialize(t){return t}},cg=class{constructor(t){this.hostEntityTabInstance=t}serialize(){return this.hostEntityTabInstance}},dg=class extends re{validate(t){return t.allTabs&&t.allTabs.forEac
6h(n=>{}),!0}deserialize(t){return t}};function fg(e,t){if(u(a),!nt())throw new Error(`Error code: ${C.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(It(e.threadId),t&&t.length===0)throw new Error(`Error code: ${C.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return B("hostEntity.tab.addAndConfigure",[new At(e),t],new ug,l(Et,"hostEntity.tab.addAndConfigure"))}function pg(e){if(u(a),!nt())throw new Error(`Error code: ${C.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return It(e.threadId),B("hostEntity.tab.getAll",[new At(e)],new dg,l(Et,"hostEntity.tab.getAll"))}function gg(e,t){if(u(a),!nt())throw new Error(`Error code: ${C.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return No(e),It(t.threadId),B("hostEntity.tab.reconfigure",[new Ls(e),new At(t)],new Ds,l(Et,"hostEntity.tab.reconfigure"))}function hg(e,t){if(u(a),!nt())throw new Error(`Error code: ${C.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return No(e),It(t.threadId),B("hostEntity.tab.rename",[new Ls(e),new At(t)],new Ds,l(Et,"hostEntity.tab.rename"))}function mg(e,t){if(u(a),!nt())throw new Error(`Error code: ${C.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return It(t.threadId),No(e),B("hostEntity.tab.remove",[new cg(e),new At(t)],new bo,l(Et,"hostEntity.tab.remove"))}function nt(){var e;return!!(u(a)&&xs()&&(!((e=a.supports.hostEntity)===null||e===void 0)&&e.tab))}function It(e){if(!e||e.length==0)throw new Error(`Error code: ${C.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function No(e){if(!e?.internalTabInstanceId||e.internalTabInstanceId.length===0)throw new Error(`Error code: ${C.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}const vg=Object.freeze(Object.defineProperty({__proto__:null,addAndConfigure:fg,getAll:pg,isSupported:nt,reconfigure:gg,remove:mg,rename:hg},Symbol.toStringTag,{value:"Module"}));var Hr;function xs(){return!(!u(a)||!a.supports.hostEntity)}(function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"})(Hr||(Hr={}));const Gw=Object.freeze(Object.defineProperty({__proto__:null,get AppTypes(){return Hr},isSupported:xs,tab:vg},Symbol.toStringTag,{value:"Module"})),_n="v2",zi="Invalid store dialog size";function wg(e){return S(this,void 0,void 0,function*(){Rn();const{size:t}=e??{};return D("store.openFullStore",[Mn(t)],l(_n,"store.openFullStore"))})}function bg(e){return S(this,void 0,void 0,function*(){Rn();const{size:t,appId:n}=e;if(!(n instanceof ce))throw new Error("No App Id present, but AppId needed to open AppDetail store");return D("store.openAppDetail",[Mn(t),n],l(_n,"store.openAppDetail"))})}function yg(e){return S(this,void 0,void 0,function*(){Rn();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=e??{};return D("store.openInContextStore",[Mn(t),n,r,o,i?.map(c=>c.toString())],l(_n,"store.openInContextStore"))})}function Cg(e){return S(this,void 0,void 0,function*(){Rn();const{size:t,collectionId:n}=e;if(n===void 0)throw new Error("No Collection Id present, but CollectionId needed to open a store specific to a collection");return D("store.openSpecificStore",[Mn(t),n],l(_n,"store.openSpecificStore"))})}function js(){return u(a)&&!!a.supports.store}function Rn(){if(u(a,s.content,s.sidePanel,s.meetingStage),!js())throw p}function Mn(e){if(e===void 0)return;const{width:t,height:n}=e;if(t!==void 0&&typeof t=="number"&&t<0)throw new Error(zi);if(n!==void 0&&typeof n=="number"&&n<0)throw new Error(zi);return JSON.stringify(e)}const Yw=Object.freeze(Object.defineProperty({__proto__:null,isSupported:js,openAppDetail:bg,openFullStore:wg,openInContextStore:yg,openSpecificStore:Cg},Symbol.toStringTag,{value:"Module"})),Pe="v1",xe=V("widgetHosting");function Hs(){return u(a)&&!!a.supports.widgetHosting}function Sg(e,t){return S(this,void 0,void 0,function*(){return W(),xe("Calling tool with widgetId and input: ",{widgetId:e,input:t}),B("widgetHosting.callTool",[new Fg(e,t)],new Rg,l(Pe,"widgetHosting.callTool"),et)})}function $g(e,t){return S(this,void 0,void 0,function*(){return W(),xe("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:t.prompt}),D("widgetHosting.sendFollowUpMessage",[new kg(e,t)],l(Pe,"widgetHosting.sendFollowUpMessage"))})}function Eg(e,t){return S(this,void 0,void 0,function*(){return W(),xe("Requesting display mode with widgetId: ",{widgetId:e,mode:t.mode}),D("widgetHosting.requestDisplayMode",[new Ug(e,t)],l(Pe,"widgetHosting.requestDisplayMode"))})}function Ag(e,t){return S(this,void 0,void 0,function*(){return W(),xe("Requesting modal with widgetId and options: ",{widgetId:e,options:t}),B("widgetHosting.requestModal",[new xg(e,t)],new Mg,l(Pe,"widgetHosting.requestModal"),et)})}function Ig(e,t){W(),xe("Notifying intrinsic height with widgetId: ",{widgetId:e,height:t}),D("widgetHosting.notifyIntrinsicHeight",[new Lg(e,t)],l(Pe,"widgetHosting.notifyIntrinsicHeight"))}function Tg(e,t,n){W(),xe("Content size changed with widgetId: ",{widgetId:e,width:t,height:n}),D("widgetHosting.contentSizeChanged",[new jg(e,t,n)],l(Pe,"widgetHosting.contentSizeChanged"))}function Pg(e,t){return S(this,void 0,void 0,function*(){return W(),xe("Setting widget state with widgetId: ",{widgetId:e,state:t}),D("widgetHosting.setWidgetState",[new Dg(e,t)],l(Pe,"widgetHosting.setWidgetState"))})}function Og(e,t){W(),xe("Opening external URL with widgetId: ",{widgetId:e,href:t.href}),D("widgetHosting.openExternal",[new Ng(e,t)],l(Pe,"widgetHosting.openExternal"))}function _g(e){Y(l(Pe,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",e,[],()=>{if(!Hs())throw new Error("Widget Hosting is not supported on this platform")})}let Rg=class extends re{validate(t){return t!==null&&typeof t=="object"}deserialize(t){return t}},Mg=class extends re{validate(t){return t!==null&&typeof t=="object"}deserialize(t){return t}},Fg=class{constructor(t,n){this.widgetId=t,this.toolInput=n}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}},kg=class{constructor(t,n){this.widgetId=t,this.args=n}serialize(){return{widgetId:this.widgetId,prompt:this.args.prompt}}},Ug=class{constructor(t,n){this.widgetId=t,this.args=n}serialize(){return{widgetId:this.widgetId,mode:this.args.mode}}},Ng=class{constructor(t,n){this.widgetId=t,this.payload=n}serialize(){return{widgetId:this.widgetId,href:this.payload.href}}},Dg=class{constructor(t,n){this.widgetId=t,this.state=n}serialize(){return{widgetId:this.widgetId,state:this.state}}},Lg=class{constructor(t,n){this.widgetId=t,this.height=n}serialize(){return{widgetId:this.widgetId,height:this.height}}},xg=class{constructor(t,n){this.widgetId=t,this.options=n}serialize(){return{widgetId:this.widgetId,id:this.options.id,title:this.options.title,content:this.options.content,width:this.options.width,height:this.options.height}}},jg=class{constructor(t,n,r){this.widgetId=t,this.width=n,this.height=r}serialize(){return{widgetId:this.widgetId,width:this.width,height:this.height}}};const ib=Object.freeze(Object.defineProperty({__proto__:null,callTool:Sg,contentSizeChanged:Tg,isSupported:Hs,notifyIntrinsicHeight:Ig,openExternal:Og,registerModalCloseHandler:_g,requestDisplayMode:Eg,requestModal:Ag,sendFollowUpMessage:$g,setWidgetState:Pg},Symbol.toStringTag,{value:"Module"}));function zs(e){const t=!e||e.length<=0,n=e?.indexOf("@"),r=e?.indexOf(".",n);if(t||n===-1||r===-1)throw new Error("Input email address does not have the correct format.")}let ab=class{constructor(t){this.val=t,zs(t)}toString(){return this.val}};function lb(){return a.hostVersionsInfo?a.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const tn="v1";let Hg=class{postMessage(t,n){u(a),h(l(tn,"appWindow.childAppWindow.postMessage"),"messageForChild",[t],n||Ue())}addEventListener(t,n){u(a),t==="message"&&E(l(tn,"appWindow.childAppWindow.addEventListener"),"messageForParent",n)}},cb=class{static get Instance(){return this._instance||(this._instance=new this)}postMessage(t,n){u(a,s.task),h(l(tn,"appWindow.parentAppWindow.postMessage"),"messageForParent",[t],n||Ue())}addEventListener(t,n){u(a,s.task),t==="message"&&E(l(tn,"appWindow.parentAppWindow.addEventListener"),"messageForChild",n)}};function Vs(){if(!w.printCapabilityEnabled){if(u(a),!Fn())throw p;w.printCapabilityEnabled=!0,document.addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&e.keyCode===80&&(Do(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())})}}function Do(){Ke().print()}function zg(e){Lo(l("v2","teamsAPIs_registerOnLoadHandler"),e,()=>{if(!M(e)&&!Fn())throw p})}function Lo(e,t,n){!M(t)&&u(a),!M(t)&&n&&n(),nf(e,t)}function Vg(e){xo(l("v2","teamsAPIs_registerBeforeUnloadHandler"),e,()=>{if(!M(e)&&!Fn())throw p})}
6function xo(e,t,n){!M(t)&&u(a),!M(t)&&n&&n(),of(e,t)}function Fn(){return!(!u(a)||!a.supports.teamsCore)}const fb=Object.freeze(Object.defineProperty({__proto__:null,enablePrintCapability:Vs,isSupported:Fn,print:Do,registerBeforeUnloadHandler:Vg,registerBeforeUnloadHandlerHelper:xo,registerOnLoadHandler:zg,registerOnLoadHandlerHelper:Lo},Symbol.toStringTag,{value:"Module"})),L="v1";function pb(e,t){yn(l(L,"initialize"),t).then(()=>{e&&e()})}function gb(){Vs()}function hb(){Do()}function mb(e){W(),h(l(L,"getContext"),"getContext",t=>{t.frameContext||(t.frameContext=w.frameContext),e(t)})}function vb(e){ts(l(L,"registerOnThemeChangeHandlerHelper"),e)}function wb(e){Y(l(L,"registerFullScreenHandler"),"fullScreenChange",e,[])}function bb(e){Y(l(L,"registerAppButtonClickHandler"),"appButtonClick",e,[s.content])}function yb(e){Y(l(L,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[s.content])}function Cb(e){Y(l(L,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[s.content])}function Sb(e){So(l(L,"registerBackButtonHandler"),e)}function $b(e){Lo(l(L,"registerOnLoadHandler"),e)}function Eb(e){xo(l(L,"registerBeforeUnloadHandler"),e)}function Ab(e){Y(l(L,"registerFocusEnterHandler"),"focusEnter",e,[])}function Ib(e){Y(l(L,"registerChangeSettingsHandler"),"changeSettings",e,[s.content])}function Tb(e,t){u(a),ls(l(L,"getTabInstances"),t).then(n=>{e(n)})}function Pb(e,t){u(a),us(l(L,"getMruTabInstances"),t).then(n=>{e(n)})}function Ob(e){cs(l(L,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function _b(e,t){u(a,s.content,s.sidePanel,s.settings,s.task,s.stage,s.meetingStage);const n=t??Ue();ns(l(L,"executeDeepLink"),e).then(()=>{n(!0)}).catch(r=>{n(!1,r.message)})}function Rb(e){Io(l(L,"setFrameContext"),e)}function Mb(e,t,n){yn(l(L,"initializeWithFrameContext"),n).then(()=>t&&t()),Io(l(L,"setFrameContext"),e)}const kn="v1";function Fb(e){Vd(l(kn,"navigation.returnFocus"),e)}function kb(e,t){u(a);const n=t??Ue();ss(l(kn,"navigation.navigateToTab"),e).then(()=>{n(!0)}).catch(r=>{n(!1,r.message)})}function Ub(e,t){u(a,s.content,s.sidePanel,s.settings,s.remove,s.task,s.stage,s.meetingStage);const n=t??Ue();is(l(kn,"navigation.navigateCrossDomain"),e).then(()=>{n(!0)}).catch(r=>{n(!1,r.message)})}function Nb(e){u(a);const t=e??Ue();as(l(kn,"navigation.navigateBack")).then(()=>{t(!0)}).catch(n=>{t(!1,n.message)})}const Oe="v2";var zr,Vr;function Bs(){return!(!u(a,s.meetingStage,s.sidePanel,s.content)||!a.supports.interactive)}(function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"})(zr||(zr={})),(function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"})(Vr||(Vr={}));let Bg=class Ws{getFluidTenantInfo(){return be(),new Promise(t=>{t(A(l(Oe,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))})}getFluidToken(t){return be(),new Promise(n=>{n(A(l(Oe,"interactive.getFluidToken"),"interactive.getFluidToken",t))})}getFluidContainerId(){return be(),new Promise(t=>{t(A(l(Oe,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))})}setFluidContainerId(t){return be(),new Promise(n=>{n(A(l(Oe,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",t))})}getNtpTime(){return be(),new Promise(t=>{t(A(l(Oe,"interactive.getNtpTime"),"interactive.getNtpTime"))})}registerClientId(t){return be(),new Promise(n=>{n(A(l(Oe,"interactive.registerClientId"),"interactive.registerClientId",t))})}getClientRoles(t){return be(),new Promise(n=>{n(A(l(Oe,"interactive.getClientRoles"),"interactive.getClientRoles",t))})}getClientInfo(t){return be(),new Promise(n=>{n(A(l(Oe,"interactive.getClientInfo"),"interactive.getClientInfo",t))})}static create(){return be(),new Ws}};function be(){if(!Bs())throw new Error("LiveShareHost Not supported")}const Db=Object.freeze(Object.defineProperty({__proto__:null,get ContainerState(){return Vr},LiveShareHost:Bg,get UserMeetingRole(){return zr},isSupported:Bs},Symbol.toStringTag,{value:"Module"})),Tt="v1",Pt="v2";let zt;function Wg(e){zt=e}function qg(e){const t=e!==void 0,n=t?e:zt;if(!n)throw new Error("No parameters are provided for authentication");return u(a,s.content,s.sidePanel,s.settings,s.remove,s.task,s.stage,s.meetingStage),(function(r,o){return S(this,void 0,void 0,function*(){const i=au(o.url);return ua(i),x(r,"authentication.authenticate",[i.href,o.width,o.height,o.isExternal]).then(([c,d])=>{if(c)return d;throw new Error(d)})})})(n.successCallback||n.failureCallback?l(Tt,"authentication.authenticate"):l(Pt,"authentication.authenticate"),n).then(r=>{try{return n&&n.successCallback?(n.successCallback(r),""):r}finally{t||(zt=void 0)}}).catch(r=>{try{if(n&&n.failureCallback)return n.failureCallback(r.message),"";throw r}finally{t||(zt=void 0)}})}function Gg(e){return W(),(function(t,n){return new Promise(r=>{r(x(t,"authentication.getAuthToken",[n?.resources,n?.claims,n?.silent,n?.tenantId]))}).then(([r,o])=>{if(r)return o;throw new Error(o)})})(e&&(e.successCallback||e.failureCallback)?l(Tt,"authentication.getAuthToken"):l(Pt,"authentication.getAuthToken"),e).then(t=>
6e&&e.successCallback?(e.successCallback(t),""):t).catch(t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),"";throw t})}function Yg(e){return W(),(function(t){return new Promise(n=>{n(x(t,"authentication.getUser"))}).then(([n,r])=>{if(n)return r;throw r})})(e&&(e.successCallback||e.failureCallback)?l(Tt,"authentication.getUser"):l(Pt,"authentication.getUser")).then(t=>e&&e.successCallback?(e.successCallback(t),null):t).catch(t=>{const n=`Error returned, code = ${t.errorCode}, message = ${t.message}`;if(e&&e.failureCallback)return e.failureCallback(n),null;throw new Error(n)})}function Jg(e,t){u(a,s.authentication);const n=l(t?Tt:Pt,"authentication.notifySuccess");h(n,"authentication.authenticate.success",[e]),Pa(y.parentWindow,()=>setTimeout(()=>y.currentWindow.close(),200))}function Kg(e,t){u(a,s.authentication);const n=l(t?Tt:Pt,"authentication.notifyFailure");h(n,"authentication.authenticate.failure",[e]),Pa(y.parentWindow,()=>setTimeout(()=>y.currentWindow.close(),200))}var Br;(function(e){e.Public="public",e.EUDB="eudb",e.Other="other"})(Br||(Br={}));const Lb=Object.freeze(Object.defineProperty({__proto__:null,get DataResidency(){return Br},authenticate:qg,getAuthToken:Gg,getUser:Yg,notifyFailure:Kg,notifySuccess:Jg,registerAuthenticationHandlers:Wg},Symbol.toStringTag,{value:"Module"}));function Qg(){return u(a)&&!!a.supports.appPerformanceMetrics}function Zg(e){u(a),E(l("v2","appPerformanceMetrics.memoryUsageHeartbeat"),"appPerformanceMetrics.memoryUsageHeartbeat",e)}const xb=Object.freeze(Object.defineProperty({__proto__:null,isSupported:Qg,registerHostMemoryMetricsHandler:Zg},Symbol.toStringTag,{value:"Module"})),Xg="/l/app/",eh="/l/meeting/new",th="attendees",nh="startTime",rh="endTime",oh="subject",ih="content",ah="/l/call/0/0",sh="source",lh="withVideo",uh="/l/chat/0/0",qs="users",ch="topicName",dh="message";
6function Gs(e,t,n){if(e.length===0)throw new Error("Must have at least one user when creating a chat deep link");const r=`${qs}=`+e.map(c=>encodeURIComponent(c)).join(","),o=t===void 0?"":`&${ch}=${encodeURIComponent(t)}`,i=n===void 0?"":`&${dh}=${encodeURIComponent(n)}`;return`${hn}://${mn}${uh}?${r}${o}${i}`}function fh(e,t,n){if(e.length===0)throw new Error("Must have at least one target when creating a call deep link");const r=`${qs}=`+e.map(c=>encodeURIComponent(c)).join(","),o=t===void 0?"":`&${lh}=${encodeURIComponent(t)}`,i=n===void 0?"":`&${sh}=${encodeURIComponent(n)}`;return`${hn}://${mn}${ah}?${r}${o}${i}`}function ph(e,t,n,r,o){const i=e===void 0?"":`${th}=`+e.map(f=>encodeURIComponent(f)).join(","),c=t===void 0?"":`&${nh}=${encodeURIComponent(t)}`,d=n===void 0?"":`&${rh}=${encodeURIComponent(n)}`,m=r===void 0?"":`&${oh}=${encodeURIComponent(r)}`,g=o===void 0?"":`&${ih}=${encodeURIComponent(o)}`;return`${hn}://${mn}${eh}?${i}${c}${d}${m}${g}`}function gh(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${hn}://${mn}${Xg}${encodeURIComponent(e)}`}function hh(e){return new Promise(t=>{if(u(a,s.content,s.sidePanel,s.settings,s.task,s.stage,s.meetingStage),!Ys())throw new Error("Not supported");const n=l("v1","appInstallDialog.openAppInstallDialog");a.isLegacyTeams?t(G(n,"executeDeepLink",gh(e.appId))):(h(n,"appInstallDialog.openAppInstallDialog",[e]),t())})}function Ys(){return!(!u(a)||!a.supports.appInstallDialog)}const jb=Object.freeze(Object.defineProperty({__proto__:null,isSupported:Ys,openAppInstallDialog:hh},Symbol.toStringTag,{value:"Module"})),ge="v1",mh=V("media");var nn,wt,Wr,qr,Fe,Gr,Yr;(function(e){e.Base64="base64",e.ID="id"})(nn||(nn={}));let Js=class{};function vh(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(u(a,s.content,s.task),!w.isFramelessWindow)return void e({errorCode:C.NOT_SUPPORTED_ON_PLATFORM},[]);if(!te(Au))return void e({errorCode:C.OLD_PLATFORM},[]);h(l(ge,"media.captureImage"),"captureImage",e)}function wh(){if(u(a,s.content,s.task),!Ks())throw p;const e=he.Media;return new Promise(t=>{t(A(l(ge,"media.hasPermission"),"permissions.has",e))})}function bh(){if(u(a,s.content,s.task),!Ks())throw p;const e=he.Media;return new Promise(t=>{t(A(l(ge,"media.requestPermission"),"permissions.request",e))})}function Ks(){return!(!u(a)||!a.supports.permissions)}class Qs extends Js{constructor(t){super(),t&&(this.content=t.content,this.format=t.format,this.mimeType=t.mimeType,this.name=t.name,this.preview=t.preview,this.size=t.size)}getMedia(t){if(!t)throw new Error("[get Media] Callback cannot be null");if(u(a,s.content,s.task),!te(ho))return void t({errorCode:C.OLD_PLATFORM},new Blob);if(!Rh(this.mimeType,this.format,this.content))return void t({errorCode:C.INVALID_ARGUMENTS},new Blob);te(Iu)?this.getMediaViaCallback(t):this.getMediaViaHandler(t)}getMediaViaCallback(t){const n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[this.content];h(l(ge,"media.getMedia"),"getMedia",r,function(o){if(t)if(o&&o.error)t(o.error,new Blob);else if(o&&o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const i=Jr(n.assembleAttachment,n.mediaMimeType);t(o.error,i??new Blob)}else{const i=Kr(o.mediaChunk,n.mediaMimeType);i?n.assembleAttachment.push(i):mh(`Received a null assemble attachment for when decoding chunk sequence ${o.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else t({errorCode:C.INTERNAL_ERROR,message:"data received is null"},new Blob)})}getMediaViaHandler(t){const n=lo(),r={mediaMimeType:this.mimeType,assembleAttachment:[]},o=[n,this.content];this.content&&!M(t)&&h(l(ge,"media.getMedia"),"getMedia",o),E(l(ge,"media.registerGetMediaRequestHandler"),"getMedia"+n,function(i){if(t){const c=JSON.parse(i);if(c.error)t(c.error,new Blob),q("getMedia"+n);else if(c.mediaChunk)if(c.mediaChunk.chunkSequence<=0){const d=Jr(r.assembleAttachment,r.mediaMimeType);t(c.error,d??new Blob),q("getMedia"+n)}else{const d=Kr(c.mediaChunk,r.mediaMimeType);d&&r.assembleAttachment.push(d)}else t({errorCode:C.INTERNAL_ERROR,message:"data received is null"},new Blob),q("getMedia"+n)}})}}class yh{constructor(t){this.controllerCallback=t}notifyEventToHost(t,n){u(a,s.content,s.task);try{xt(da)}catch(o){return void(n&&n(o))}const r={mediaType:this.getMediaType(),mediaControllerEvent:t};h(l(ge,"media.controller"),"media.controller",[r],o=>{n&&n(o)})}stop(t){this.notifyEventToHost(wt.StopRecording,t)}}class Ch extends yh{getMediaType(){return Fe.Video}notifyEventToApp(t){if(this.controllerCallback)switch(t){case wt.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Sh(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");
6if(u(a,s.content,s.task),!te(ho)){const r={errorCode:C.OLD_PLATFORM};return void t(r,[])}try{Ah(e)}catch(r){return void t(r,[])}if(!Th(e)){const r={errorCode:C.INVALID_ARGUMENTS};return void t(r,[])}const n=[e];h(l(ge,"media.selectMedia"),"selectMedia",n,(r,o,i)=>{var c,d;if(i)return void(Ih(e)&&((d=(c=e?.videoProps)===null||c===void 0?void 0:c.videoController)===null||d===void 0||d.notifyEventToApp(i)));if(!o)return void t(r,[]);const m=[];for(const g of o)m.push(new Qs(g));t(r,m)})}function $h(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(u(a,s.content,s.task),!te(ho))return void t({errorCode:C.OLD_PLATFORM});if(!Mh(e))return void t({errorCode:C.INVALID_ARGUMENTS});const n=[e];h(l(ge,"media.viewImages"),"viewImages",n,t)}function Eh(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(u(a,s.content,s.task),w.hostClientType===$.desktop||w.hostClientType===$.web||w.hostClientType===$.rigel||w.hostClientType===$.teamsRoomsWindows||w.hostClientType===$.teamsRoomsAndroid||w.hostClientType===$.teamsPhones||w.hostClientType===$.teamsDisplays)return void e({errorCode:C.NOT_SUPPORTED_ON_PLATFORM},"");if(!te(Tu))return void e({errorCode:C.OLD_PLATFORM},"");if(!Zs(t))return void e({errorCode:C.INVALID_ARGUMENTS},"");h(l(ge,"media.scanBarCode"),"media.scanBarCode",[t],e)}(function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"})(wt||(wt={})),(function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"})(Wr||(Wr={})),(function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"})(qr||(qr={})),(function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"})(Fe||(Fe={})),(function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"})(Gr||(Gr={})),(function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"})(Yr||(Yr={}));const zb=Object.freeze(Object.defineProperty({__proto__:null,get CameraStartMode(){return Wr},File:Js,get FileFormat(){return nn},get ImageOutputFormats(){return Yr},get ImageUriType(){return Gr},Media:Qs,get MediaControllerEvent(){return wt},get MediaType(){return Fe},get Source(){return qr},VideoController:Ch,captureImage:vh,hasPermission:wh,requestPermission:bh,scanBarCode:Eh,selectMedia:Sh,viewImages:$h},Symbol.toStringTag,{value:"Module"}));function Jr(e,t){if(e==null||t==null||e.length<=0)return null;let n=null,r=1;return e.sort((o,i)=>o.sequence>i.sequence?1:-1),e.forEach(o=>{o.sequence==r&&(n=n?new Blob([n,o.file],{type:t}):new Blob([o.file],{type:t}),r++)}),n}function Kr(e,t){if(e==null||t==null)return null;const n=atob(e.chunk),r=new Array(n.length);for(let c=0;c<n.length;c++)r[c]=n.charCodeAt(c);const o=new Uint8Array(r),i=new Blob([o],{type:t});return{sequence:e.chunkSequence,file:i}}function Ah(e){Oh(e)?xt(Cu):_h(e)?xt(da):Ph(e)&&xt(Su)}function Ih(e){return!(e.mediaType!=Fe.Video||!e.videoProps||!e.videoProps.videoController)}function Th(e){return!(e==null||e.maxMediaCount>10)}function Ph(e){var t;return!(e?.mediaType!=Fe.Image||!(!((t=e?.imageProps)===null||t===void 0)&&t.imageOutputFormats))}function Oh(e){return!(!e||e.mediaType!=Fe.VideoAndImage&&!e.videoAndImageProps)}function _h(e){return!(!e||e.mediaType!=Fe.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Rh(e,t,n){return e!=null&&t!=null&&t==nn.ID&&n!=null}function Mh(e){return!(e==null||e.length<=0||e.length>10)}function Zs(e){return!e||!(e.timeOutIntervalInSec===null||e.timeOutIntervalInSec!=null&&e.timeOutIntervalInSec<=0||e.timeOutIntervalInSec!=null&&e.timeOutIntervalInSec>60)}function Fh(e){return!(e&&(e.title&&typeof e.title!="string"||e.setSelected&&typeof e.setSelected!="object"||e.openOrgWideSearchInChatOrChannel&&typeof e.openOrgWideSearchInChatOrChannel!="boolean"||e.singleSelect&&typeof e.singleSelect!="boolean"))}const jo="v2";function kh(e){return new Promise(t=>{if(u(a,s.content,s.task),!Un())throw p;if(!Zs(e))throw{errorCode:C.INVALID_ARGUMENTS};t(A(l(jo,"barCode.scanBarCode"),"media.scanBarCode",e))})}function Uh(){if(u(a,s.content,s.task),!Un())throw p;const e=he.Media;return new Promise(t=>{t(A(l(jo,"barCode.hasPermission"),"permissions.has",e))})}function Nh(){if(u(a,s.content,s.task),!Un())throw p;const e=he.Media;return new Promise(t=>{t(A(l(jo,"barCode.requestPermission"),"permissions.request",e))})}function Un(){return!!(u(a)&&a.supports.barCode&&a.supports.permissions)}const Vb=Object.freeze(Object.defineProperty({__proto__:null,hasPermission:Uh,isSupported:Un,requestPermission:Nh,scanBarCode:kh},Symbol.toStringTag,{value:"Module"}));function Dh(e){return Xs(l("v2","chat.openChat"),e)}function Xs(e,t){return new Promise(n=>{if(u(a,s.content,s.task),!Ho())throw p;a.isLegacyTeams?n(G(e,"executeDeepLink",Gs([t.user],void 0,t.message))):n(G(e,"chat.openChat",{members:[t.user],message:t.message}))})}function Lh(e){const t=l("v2","chat.openGroupChat");return new Promise(n=>
6{if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(e.users.length===1){const r={user:e.users[0],message:e.message};n(Xs(t,r))}else{if(u(a,s.content,s.task),!Ho())throw p;a.isLegacyTeams?n(G(t,"executeDeepLink",Gs(e.users,e.topic,e.message))):n(G(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}})}function Ho(){return!(!u(a)||!a.supports.chat)}const Bb=Object.freeze(Object.defineProperty({__proto__:null,isSupported:Ho,openChat:Dh,openGroupChat:Lh},Symbol.toStringTag,{value:"Module"}));function xh(e){return S(this,void 0,void 0,function*(){if(u(a,s.content,s.meetingStage,s.task,s.settings,s.stage,s.sidePanel),!zo())throw p;if(!e.type||!Object.values(qt).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(qt)}`);const t=yield iu(e),n={mimeType:e.type,content:t};return A(l("v2","clipboard.write"),"clipboard.writeToClipboard",n)})}function jh(){return S(this,void 0,void 0,function*(){u(a,s.content,s.meetingStage,s.task,s.settings,s.stage,s.sidePanel);const e=l("v2","clipboard.read");if(!zo())throw p;const t=yield A(e,"clipboard.readFromClipboard");if(typeof t=="string"){const n=JSON.parse(t);return ou(n.mimeType,n.content)}return t})}function zo(){return w.isFramelessWindow?!(!u(a)||!a.supports.clipboard):!!(u(a)&&navigator&&navigator.clipboard&&a.supports.clipboard)}const Wb=Object.freeze(Object.defineProperty({__proto__:null,isSupported:zo,read:jh,write:xh},Symbol.toStringTag,{value:"Module"})),Hh={validate:e=>Array.isArray(e)||typeof e=="object",deserialize:e=>e};var rn;function zh(){var e;return(e=u(a)&&(a.isNAAChannelRecommended||!!(u(a)&&el()&&a.isLegacyTeams&&a.supports.nestedAppAuth)))!==null&&e!==void 0&&e}function Vh(){return u(a),y.parentOrigin}function Vo(){var e;return(e=u(a)&&a.canParentManageNAATrustedOrigins)!==null&&e!==void 0&&e}function Bh(){var e;return(e=u(a)&&(a.isDeeplyNestedAuthSupported||!!(u(a)&&el()&&a.isLegacyTeams&&te(Lu))))!==null&&e!==void 0&&e}function el(){return w.hostClientType===$.android||w.hostClientType===$.ios||w.hostClientType===$.ipados||w.hostClientType===$.visionOS}function Wh(e){return S(this,void 0,void 0,function*(){if(!Vo())throw p;const t=e.map(nl);return tl(rn.ADD,t)})}function qh(e){return S(this,void 0,void 0,function*(){if(!Vo())throw p;const t=e.map(nl);return tl(rn.DELETE,t)})}function tl(e,t){return S(this,void 0,void 0,function*(){if(window.parent!==window.top)throw new Error("This API is only available in the top-level parent.");if(!Array.isArray(t)||t.length===0)throw new Error(`The '${t}' parameter is required and must be a non-empty array.`);const n=[new Gh(e,t)];return B("nestedAppAuth.manageNAATrustedOrigins",n,Hh,l("v2","nestedAppAuth.manageNAATrustedOrigins"))})}function nl(e){try{return new URL(e).origin.toLowerCase()}catch{throw new Error(`Invalid origin provided: ${e}`)}}(function(e){e.ADD="ADD",e.DELETE="DELETE"})(rn||(rn={}));let Gh=class{constructor(t,n){this.action=t,this.appOrigins=n}serialize(){return{action:this.action,appOrigins:this.appOrigins}}};const Gb=Object.freeze(Object.defineProperty({__proto__:null,addNAATrustedOrigins:Wh,canParentManageNAATrustedOrigins:Vo,deleteNAATrustedOrigins:qh,getParentOrigin:Vh,isDeeplyNestedAuthSupported:Bh,isNAAChannelRecommended:zh},Symbol.toStringTag,{value:"Module"}));function Yh(){if(u(a,s.content,s.task),!Bo())throw p;return A(l("v2","geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Jh(e){if(u(a,s.content,s.task),!Bo())throw p;if(!e)throw{errorCode:C.INVALID_ARGUMENTS};return A(l("v2","geoLocation.showLocation"),"location.showLocation",e)}function Bo(){return!!(u(a)&&a.supports.geoLocation&&a.supports.geoLocation.map&&a.supports.permissions)}const Kh=Object.freeze(Object.defineProperty({__proto__:null,chooseLocation:Yh,isSupported:Bo,showLocation:Jh},Symbol.toStringTag,{value:"Module"})),Wo="v2";function Qh(){if(u(a,s.content,s.task),!Nn())throw p;return A(l(Wo,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Zh(){if(u(a,s.content,s.task),!Nn())throw p;const e=he.GeoLocation;return new Promise(t=>{t(A(l(Wo,"geoLocation.hasPermission"),"permissions.has",e))})}function Xh(){if(u(a,s.content,s.task),!Nn())throw p;const e=he.GeoLocation;return new Promise(t=>{t(A(l(Wo,"geoLocation.requestPermission"),"permissions.request",e))})}function Nn(){return!!(u(a)&&a.supports.geoLocation&&a.supports.permissions)}const Yb=Object.freeze(Object.defineProperty({__proto__:null,getCurrentLocation:Qh,hasPermission:Zh,isSupported:Nn,map:Kh,requestPermission:Xh},Symbol.toStringTag,{value:"Module"}));function em(e){if(u(a,s.content),!rl())throw p;if(!e||!uo(e))throw{errorCode:C.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return A(l("v2","secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}
6function rl(){return!(!u(a)||!a.supports.secondaryBrowser)}const Jb=Object.freeze(Object.defineProperty({__proto__:null,isSupported:rl,open:em},Symbol.toStringTag,{value:"Module"}));function tm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(u(a,s.content,s.task),!te(fa))throw{errorCode:C.OLD_PLATFORM};if(!e)throw{errorCode:C.INVALID_ARGUMENTS};if(!qo())throw p;h(l("v1","location.getLocation"),"location.getLocation",[e],t)}function nm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(u(a,s.content,s.task),!te(fa))throw{errorCode:C.OLD_PLATFORM};if(!e)throw{errorCode:C.INVALID_ARGUMENTS};if(!qo())throw p;h(l("v1","location.showLocation"),"location.showLocation",[e],t)}function qo(){return!(!u(a)||!a.supports.location)}const Kb=Object.freeze(Object.defineProperty({__proto__:null,getLocation:tm,isSupported:qo,showLocation:nm},Symbol.toStringTag,{value:"Module"}));function rm(e){u(a,s.sidePanel),e.contentUrl&&new URL(e.contentUrl),h(l("v1","meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}const om=Object.freeze(Object.defineProperty({__proto__:null,setOptions:rm},Symbol.toStringTag,{value:"Module"})),N="v1";var Je,Qr,Zr,bt,on,an;function im(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");u(a,s.sidePanel,s.meetingStage),h(l(N,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function am(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");u(a,s.sidePanel,s.meetingStage),h(l(N,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function sm(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");u(a,s.sidePanel,s.meetingStage,s.settings,s.content),h(l(N,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function lm(){var e,t,n;return S(this,void 0,void 0,function*(){let r;u(a,s.sidePanel,s.meetingStage,s.settings,s.content);try{r=yield A(l("v2","meeting.getMeetingDetailsVerbose"),"meeting.getMeetingDetails",!0)}catch(o){throw new Error((e=o?.errorCode)===null||e===void 0?void 0:e.toString())}if((((t=r.details)===null||t===void 0?void 0:t.type)==bt.GroupCall||((n=r.details)===null||n===void 0?void 0:n.type)==bt.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(C.NOT_SUPPORTED_ON_PLATFORM.toString());return r})}function um(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");u(a,s.sidePanel,s.meetingStage,s.task),h(l(N,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function cm(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");u(a,s.sidePanel),h(l(N,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function dm(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");u(a,s.sidePanel),h(l(N,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function fm(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");u(a,s.sidePanel),h(l(N,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function pm(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");u(a,s.sidePanel),E(l(N,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function gm(e,t,n={sharingProtocol:on.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");u(a,s.sidePanel,s.meetingStage),h(l(N,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function hm(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");u(a,s.sidePanel,s.meetingStage),h(l(N,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function mm(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");u(a,s.sidePanel,s.meetingStage),h(l(N,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function vm(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");u(a,s.sidePanel,s.meetingStage),h(l(N,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function wm(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");u(a,s.sidePanel,s.meetingStage),E(l(N,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function bm(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");u(a,s.sidePanel,s.meetingStage),E(l(N,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function ym(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");u(a,s.sidePanel,s.meetingStage),E(l(N,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Cm(e){if(e?.joinWebUrl===void 0||e?.joinWebUrl===null)return Promise.reject(new Error("Invalid joinMeetingParams"));u(a);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||an.Other};return A(l("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Sm(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");u(a,s.sidePanel,s.meetingStage),e.isAppHandlingAudio?(function(n,r){const o=(i,c)=>{if(i&&c!=null)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(i)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${i.errorCode} ${i.message}`);if(typeof c!="boolean")throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");const d=g=>S(this,void 0,void 0,function*(){try{const f=yield n.micMuteStateChangedCallback(g);Xr(f,f.isMicMuted===g.isMicMuted?Je.HostInitiated:Je.AppDeclinedToChange)}catch{Xr(g,Je.AppFailedToChange)}});E(l(N,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",d);const m=g=>{var f;(f=n.audioDeviceSelectionChangedCallback)===null||f===void 0||f.call(n,g)};
6E(l(N,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",m),r(c)};h(l(N,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[n.isAppHandlingAudio],o)})(e,t):(function(n,r){const o=(i,c)=>{if(i&&c!=null)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(i)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${i.errorCode} ${i.message}`);if(typeof c!="boolean")throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");ki("meeting.micStateChanged")&&q("meeting.micStateChanged"),ki("meeting.audioDeviceSelectionChanged")&&q("meeting.audioDeviceSelectionChanged"),r(c)};h(l(N,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[n.isAppHandlingAudio],o)})(e,t)}function $m(e){Xr(e,Je.AppInitiated)}function Xr(e,t){u(a,s.sidePanel,s.meetingStage),h(l(N,"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"})(Je||(Je={})),(function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"})(Qr||(Qr={})),(function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"})(Zr||(Zr={})),(function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"})(bt||(bt={})),(function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"})(on||(on={})),(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"})(an||(an={}));const Qb=Object.freeze(Object.defineProperty({__proto__:null,get CallType(){return bt},get EventActionSource(){return an},get MeetingReactionType(){return Qr},get MeetingType(){return Zr},get SharingProtocol(){return on},appShareButton:om,getAppContentStageSharingCapabilities:hm,getAppContentStageSharingState:vm,getAuthenticationTokenForAnonymousUser:um,getIncomingClientAudioState:im,getLiveStreamState:cm,getMeetingDetails:sm,getMeetingDetailsVerbose:lm,joinMeeting:Cm,registerLiveStreamChangedHandler:pm,registerMeetingReactionReceivedHandler:ym,registerRaiseHandStateChangedHandler:bm,registerSpeakingStateChangeHandler:wm,requestAppAudioHandling:Sm,requestStartLiveStreaming:dm,requestStopLiveStreaming:fm,shareAppContentToStage:gm,stopSharingAppContentToStage:mm,toggleIncomingClientAudio:am,updateMicState:$m},Symbol.toStringTag,{value:"Module"}));function Em(e,t){let n,r,o="";return typeof e=="function"?(n=e,r=t,o=l("v1","monetization.openPurchaseExperience")):(r=e,o=l("v2","monetization.openPurchaseExperience")),u(a,s.content),tu(()=>new Promise(i=>{if(!ol())throw p;i(A(o,"monetization.openPurchaseExperience",r))}),n)}function ol(){return!(!u(a)||!a.supports.monetization)}const Zb=Object.freeze(Object.defineProperty({__proto__:null,isSupported:ol,openPurchaseExperience:Em},Symbol.toStringTag,{value:"Module"}));function Am(e){return new Promise(t=>{if(u(a,s.content),!Go())throw new Error("Not supported");
6if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(G(l("v2","calendar.openCalendarItem"),"calendar.openCalendarItem",e))})}function Im(e){return new Promise(t=>{if(u(a,s.content),!Go())throw new Error("Not supported");const n=l("v2","calendar.composeMeeting");a.isLegacyTeams?t(G(n,"executeDeepLink",ph(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(G(n,"calendar.composeMeeting",e))})}function Go(){return!(!u(a)||!a.supports.calendar)}const Xb=Object.freeze(Object.defineProperty({__proto__:null,composeMeeting:Im,isSupported:Go,openCalendarItem:Am},Symbol.toStringTag,{value:"Module"}));function Qn(e){e&&e.length!==0&&e.forEach(t=>{zs(t)})}function Tm(e){if(u(a,s.content),!il())throw new Error("Not supported");return(function(t){if(!t.handoffId||t.handoffId.trim().length==0||t.handoffId.trim()==="")throw new Error("handoffId should not be null or empty string.");const n=t.composeMailParams;n.type===sn.New&&(Qn(n.toRecipients),Qn(n.ccRecipients),Qn(n.bccRecipients))})(e),D("mail.handoff.composeMail",[new Pm(e)],l("v2","mail.handoff.composeMail"))}function il(){return!!(u(a)&&a.supports.mail&&a.supports.mail.handoff)}let Pm=class{constructor(t){this.composeMailParamsWithHandoff=t}serialize(){return this.composeMailParamsWithHandoff}};const Om=Object.freeze(Object.defineProperty({__proto__:null,composeMailWithHandoff:Tm,isSupported:il},Symbol.toStringTag,{value:"Module"}));function _m(e){return new Promise(t=>{if(u(a,s.content),!Yo())throw new Error("Not supported");
6if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(G(l("v2","mail.openMailItem"),"mail.openMailItem",e))})}function Rm(e){return new Promise(t=>{if(u(a,s.content),!Yo())throw new Error("Not supported");t(G(l("v2","mail.composeMail"),"mail.composeMail",e))})}function Yo(){return!(!u(a)||!a.supports.mail)}var sn;(function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"})(sn||(sn={}));const ty=Object.freeze(Object.defineProperty({__proto__:null,get ComposeMailType(){return sn},composeMail:Rm,handoff:Om,isSupported:Yo,openMailItem:_m},Symbol.toStringTag,{value:"Module"}));function Mm(e,t){let n,r;u(a,s.content,s.task,s.settings);let o="";return typeof e=="function"?([n,r]=[e,t],o=l("v1","people.selectPeople")):(r=e,o=l("v2","people.selectPeople")),eu(Fm,n,o,r)}function Fm(e,t){return new Promise(n=>{if(!te(Eu))throw{errorCode:C.OLD_PLATFORM};if(!Fh(t))throw{errorCode:C.INVALID_ARGUMENTS};if(!al())throw p;n(A(e,"people.selectPeople",t))})}function al(){return!(!u(a)||!a.supports.people)}const ny=Object.freeze(Object.defineProperty({__proto__:null,isSupported:al,selectPeople:Mm},Symbol.toStringTag,{value:"Module"}));function km(e){return e?e.modality&&typeof e.modality!="string"?[!1,"modality must be a string"]:e.targetElementBoundingRect&&typeof e.targetElementBoundingRect=="object"?e.triggerType&&typeof e.triggerType=="string"?(function(t){return t?t.displayName&&typeof t.displayName!="string"?[!1,"displayName must be a string"]:!t.identifiers||typeof t.identifiers!="object"?[!1,"persona identifiers object must be provided"]:!t.identifiers.AadObjectId&&!t.identifiers.Smtp&&!t.identifiers.Upn?[!1,"at least one valid identifier must be provided"]:t.identifiers.AadObjectId&&typeof t.identifiers.AadObjectId!="string"?[!1,"AadObjectId identifier must be a string"]:t.identifiers.Smtp&&typeof t.identifiers.Smtp!="string"?[!1,"Smtp identifier must be a string"]:t.identifiers.Upn&&typeof t.identifiers.Upn!="string"?[!1,"Upn identifier must be a string"]:[!0,void 0]:[!1,"persona object must be provided"]})(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Um(e){return u(a,s.content),new Promise(t=>{const[n,r]=km(e);if(!n)throw{errorCode:C.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(A(l("v2","profile.showProfile"),"profile.showProfile",o))})}function Nm(){return!(!u(a)||!a.supports.profile)}const ry=Object.freeze(Object.defineProperty({__proto__:null,isSupported:Nm,showProfile:Um},Symbol.toStringTag,{value:"Module"})),ft="v2",sl="search.queryChange",ll="search.queryClose",ul="search.queryExecute";function Dm(e,t,n){if(u(a,s.content),!Dn())throw p;E(l(ft,"search.registerOnClosedHandler"),ll,e),E(l(ft,"search.registerOnExecutedHandler"),ul,t),n&&E(l(ft,"search.registerOnChangeHandler"),sl,n)}
6function Lm(){if(u(a,s.content),!Dn())throw p;h(l(ft,"search.unregisterHandlers"),"search.unregister"),q(sl),q(ll),q(ul)}function Dn(){return!(!u(a)||!a.supports.search)}function xm(){return new Promise(e=>{if(u(a,s.content),!Dn())throw new Error("Not supported");e(G(l(ft,"search.closeSearch"),"search.closeSearch"))})}const oy=Object.freeze(Object.defineProperty({__proto__:null,closeSearch:xm,isSupported:Dn,registerHandlers:Dm,unregisterHandlers:Lm},Symbol.toStringTag,{value:"Module"}));function jm(){return S(this,void 0,void 0,function*(){if(u(a,s.sidePanel,s.meetingStage),!cl())throw p;return yield A(l("v2","sharing.history.getContent"),"sharing.history.getContent")})}function cl(){var e;return u(a)&&((e=a.supports.sharing)===null||e===void 0?void 0:e.history)!==void 0}const Hm=Object.freeze(Object.defineProperty({__proto__:null,getContent:jm,isSupported:cl},Symbol.toStringTag,{value:"Module"})),dl={shareWebContent:"sharing.shareWebContent"};function zm(e,t){try{(function(r){if(!(r&&r.content&&r.content.length))throw{errorCode:C.INVALID_ARGUMENTS,message:"Shared content is missing"}})(e),(function(r){let o;if(r.content.some(i=>!i.type))throw o={errorCode:C.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},o;if(r.content.some(i=>i.type!==r.content[0].type))throw o={errorCode:C.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},o})(e),e.content.forEach(Bm)}catch(r){return yi(()=>Promise.reject(r),t)}u(a,s.content,s.sidePanel,s.task,s.stage,s.meetingStage);const n=l(t?"v1":"v2","sharing.shareWebContent");return yi(Vm,t,n,e)}function Vm(e,t){return new Promise(n=>{if(!fl())throw p;n(A(e,dl.shareWebContent,t))})}function Bm(e){if(e.type==="URL"){if(!e.url)throw{errorCode:C.INVALID_ARGUMENTS,message:"URLs are required for URL content types"}}else{if(e.type!=="FILE")throw{errorCode:C.INVALID_ARGUMENTS,message:"Content type is unsupported"};if(!e.url)throw{errorCode:C.INVALID_ARGUMENTS,message:"File URLs are required for File content types"}}}function fl(){return!(!u(a)||!a.supports.sharing)}const iy=Object.freeze(Object.defineProperty({__proto__:null,SharingAPIMessages:dl,history:Hm,isSupported:fl,shareWebContent:zm},Symbol.toStringTag,{value:"Module"}));function Wm(){return new Promise(e=>{if(u(a,s.content),!pl())throw p;e(A(l("v2","stageView.self.close"),"stageView.self.close"))})}function pl(){var e;return u(a)&&((e=a.supports.stageView)===null||e===void 0?void 0:e.self)!==void 0}const qm=Object.freeze(Object.defineProperty({__proto__:null,close:Wm,isSupported:pl},Symbol.toStringTag,{value:"Module"}));var eo;function Gm(e){return new Promise(t=>{if(u(a,s.content),!gl())throw p;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(A(l("v2","stageView.open"),"stageView.open",e))})}function gl(){return!(!u(a)||!a.supports.stageView)}(function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"})(eo||(eo={}));const ay=Object.freeze(Object.defineProperty({__proto__:null,get StageViewOpenMode(){return eo},isSupported:gl,open:Gm,self:qm},Symbol.toStringTag,{value:"Module"})),Ym=10;function Jm(e){return S(this,void 0,void 0,function*(){u(a,s.content,s.task),hl(),ml(e);const t=yield A(l("v2","visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return vl(e.maxVisualMediaCount,t),t})}function Km(e){return S(this,void 0,void 0,function*(){u(a,s.content,s.task),hl(),ml(e);const t=yield A(l("v2","visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return vl(e.maxVisualMediaCount,t),t})}function Ln(){return!!(u(a)&&a.supports.visualMedia&&a.supports.visualMedia.image&&a.supports.permissions)}function hl(){if(!Ln())throw p}function ml(e){if(!e||e.maxVisualMediaCount>Ym||e.maxVisualMediaCount<1)throw Yl}function vl(e,t){if(t.length>e)throw Jl}const Qm=Object.freeze(Object.defineProperty({__proto__:null,captureImages:Jm,isSupported:Ln,retrieveImages:Km},Symbol.toStringTag,{value:"Module"}));var to,no;function Zm(){if(u(a,s.content,s.task),!Ln())throw p;const e=he.Media;return A(l("v2","visualMedia.hasPermission"),"permissions.has",e)}function Xm(){if(u(a,s.content,s.task),!Ln())throw p;const e=he.Media;return A(l("v2","visualMedia.requestPermission"),"permissions.request",e)}(function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"})(to||(to={})),(function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"})(no||(no={}));const sy=Object.freeze(Object.defineProperty({__proto__:null,get CameraRestriction(){return to},get Source(){return no},hasPermission:Zm,image:Qm,requestPermission:Xm},Symbol.toStringTag,{value:"Module"}));let Zn=null;function ev(){return S(this,void 0,void 0,function*(){return Zn===null&&(Zn=(yield Da()).app.host.name),Zn})}function tv(){return S(this,void 0,void 0,function*(){if(u(a),!wl())throw p;return!(!a.isLegacyTeams||w.hostClientType!==$.android&&w.hostClientType!==$.ios&&w.hostClientType!==$.ipados&&w.hostClientType!==$.visionOS||(yield(function(){return S(this,void 0,void 0,function*(){return ev()})})())!==Gt.teams)||(yield ve(l("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))})}function wl(){return u(a)&&a.supports.webStorage!==void 0}const ly=Object.freeze(Object.defineProperty({__proto__:null,isSupported:wl,isWebStorageClearedOnUserLogOut:tv},Symbol.toStringTag,{value:"Module"}));var ln;function nv(e){const t=l("v2","call.startCall");return new Promise(n=>{var r;if(u(a,s.content,s.task),!bl())throw p;if(!a.isLegacyTeams)return h(t,"call.startCall",[e],n);n(ve(t,"executeDeepLink",fh(e.targets,(r=e.requestedModalities)===null||r===void 0?void 0:r.includes(ln.Video),e.source)).then(o=>{if(!o)throw new Error(Ru);return o}
6))})}function bl(){return!(!u(a)||!a.supports.call)}(function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"})(ln||(ln={}));const uy=Object.freeze(Object.defineProperty({__proto__:null,get CallModalities(){return ln},isSupported:bl,startCall:nv},Symbol.toStringTag,{value:"Module"})),xn="v1";function rv(){Za(l(xn,"appInitialization.notifyAppLoaded"))}function ov(){h(l(xn,"appInitialization.notifySuccess"),Me.Success,[Qe])}function iv(e){es(l(xn,"appInitialization.notifyFailure"),e)}function av(e){Xa(l(xn,"appInitialization.notifyExpectedFailure"),e)}const cy=Object.freeze(Object.defineProperty({__proto__:null,get ExpectedFailureReason(){return Kt},get FailedReason(){return Jt},Messages:Me,notifyAppLoaded:rv,notifyExpectedFailure:av,notifyFailure:iv,notifySuccess:ov},Symbol.toStringTag,{value:"Module"})),Vi=V("thirdPartyCloudStorage");let sv=class{constructor(t,n){this.fileType=t,this.assembleAttachment=n}},He=[],ze=null,_e=!0,U=null;function lv(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(!e||e==="")return void t([],{errorCode:C.INVALID_ARGUMENTS});if(u(a,s.content,s.task),!yl())throw p;if(U)throw U=null,new Error("getDragAndDropFiles cannot be called twice");U=t,_e=!0,h(l("v2","thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],uv)}function uv(e){if(U)if(e&&e.error)U([],e.error),U=null;else if(e&&e.fileChunk)try{_e||e.fileChunk.chunkSequence!==0||(Vi("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),_e=!0,U([],{errorCode:C.INTERNAL_ERROR,message:"error occurred while receiving data"}),He=[],U=null);const t=Kr(e.fileChunk,e.fileType);if(t?(ze||(ze=new sv(e.fileType,[])),ze.assembleAttachment.push(t)):(Vi(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),U?U([],{errorCode:C.INTERNAL_ERROR,message:"error occurred while receiving data"}):U=null,He=[],U=null,_e=!0),_e=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&ze){const n=Jr(ze.assembleAttachment,ze.fileType);if(n){const r=new File([n],e.fileName,{type:n.type});He.push(r)}e.isLastFile&&U&&(U(He,e.error),He=[],U=null,_e=!0),ze=null}}catch(t){U&&(U([],{errorCode:C.INTERNAL_ERROR,message:t}),He=[],U=null,_e=!0)}else U([],{errorCode:C.INTERNAL_ERROR,message:"data received is null"}),He=[],U=null,_e=!0}function yl(){return!(!u(a)||!a.supports.thirdPartyCloudStorage)}const fy=Object.freeze(Object.defineProperty({__proto__:null,getDragAndDropFiles:lv,isSupported:yl},Symbol.toStringTag,{value:"Module"})),Ot="v1";function cv(e){ds(l(Ot,"settings.setValidityState"),e)}function dv(e){u(a,s.content,s.settings,s.remove,s.sidePanel),fs(l(Ot,"settings.getSettings")).then(t=>{e(t)})}function fv(e,t){u(a,s.content,s.settings,s.sidePanel);const n=t??Ue();ps(l(Ot,"settings.setSettings"),e).then(()=>{n(!0)}).catch(r=>{n(!1,r.message)})}function pv(e){yo(l(Ot,"settings.registerOnSaveHandler"),e)}function gv(e){Co(l(Ot,"settings.registerOnRemoveHandler"),e)}const py=Object.freeze(Object.defineProperty({__proto__:null,getSettings:dv,registerOnRemoveHandler:gv,registerOnSaveHandler:pv,setSettings:fv,setValidityState:cv},Symbol.toStringTag,{value:"Module"})),Jo="v1";function hv(e,t){const n=l(Jo,"tasks.startTask"),r=t?o=>{var i,c;return t((i=o.err)!==null&&i!==void 0?i:"",(c=o.result)!==null&&c!==void 0?c:"")}:void 0;return e.card===void 0&&e.url===void 0||e.card?(u(a,s.content,s.sidePanel,s.meetingStage),h(n,"tasks.startTask",[e],t)):e.completionBotId!==void 0?Va(n,(function(o){if(o.url===void 0||o.completionBotId===void 0)throw new Error(`Both url ${o.url} and completionBotId ${o.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:o.url,size:{height:o.height?o.height:X.Small,width:o.width?o.width:X.Small},title:o.title,fallbackUrl:o.fallbackUrl,completionBotId:o.completionBotId}})(e),r):za(n,(function(o){if(o.url===void 0)throw new Error("url property of taskInfo object can't be undefined");return{url:o.url,size:{height:o.height?o.height:X.Small,width:o.width?o.width:X.Small},title:o.title,fallbackUrl:o.fallbackUrl}})(e),r),new Hg}function mv(e){e=Cl(e);const{width:t,height:n}=e,r=ke(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Ha(l(Jo,"tasks.updateTask"),e)}function vv(e,t){Ba(l(Jo,"tasks.submitTask"),e,t)}function Cl(e){return e.height=e.height?e.height:X.Small,e.width=e.width?e.width:X.Small,e}const gy=Object.freeze(Object.defineProperty({__proto__:null,getDefaultSizeIfNotProvided:Cl,startTask:hv,submitTask:vv,updateTask:mv},Symbol.toStringTag,{value:"Module"}));function jn(e){try{return e.cartItems=Sl(e.cartItems),e}catch{throw new Error("Error deserializing cart")}}function Sl(e){return e.map(t=>{if(t.imageURL){const n=new URL(t.imageURL);t.imageURL=n}return t.accessories&&(t.accessories=Sl(t.accessories)),t})}const $l=e=>{try{return e.map(t=>{const{imageURL:n,accessories:r}=t,o=ke(t,["imageURL","accessories"]),i=Object.assign({},o);return n&&(i.imageURL=n.href),r&&(i.accessories=$l(r)),i})}catch{throw new Error("Error serializing cart items")}};function wv(e){if(!Array.isArray(e)||e.length===0)throw new Error("cartItems must be a non-empty array");for(const t of e)El(t),bv(t.accessories)}function bv(e){if(e!=null){if(!Array.isArray(e)||e.length===0)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");El(t)}}}function El(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");yv(e.price),Cv(e.quantity)}function Ko(e){if(e!=null){if(!e)throw new Error("id must not be empty");if(aa(e)===!1)throw new Error("id must be a valid UUID")}}function yv(e){if(typeof e!="number"||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 Cv(e){if(typeof e!="number"||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Sv(e){if(!Object.values(un).includes(e))throw new Error(`cartStatus ${e}
6 is not valid`)}const Hn="v2",_t={majorVersion:1,minorVersion:1};var ro,un;function $v(){if(u(a,s.content,s.task),!Rt())throw p;return A(l(Hn,"marketplace.getCart"),"marketplace.getCart",_t).then(jn)}function Ev(e){if(u(a,s.content,s.task),!Rt())throw p;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return Ko(e?.cartId),wv(e?.cartItems),A(l(Hn,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:$l(e.cartItems),cartVersion:_t})).then(jn)}function Av(e){if(u(a,s.content,s.task),!Rt())throw p;if(!e)throw new Error("removeCartItemsParams must be provided");if(Ko(e?.cartId),!Array.isArray(e?.cartItemIds)||e?.cartItemIds.length===0)throw new Error("cartItemIds must be a non-empty array");return A(l(Hn,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:_t})).then(jn)}function Iv(e){if(u(a,s.content,s.task),!Rt())throw p;if(!e)throw new Error("updateCartStatusParams must be provided");return Ko(e?.cartId),Sv(e?.cartStatus),A(l(Hn,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:_t})).then(jn)}function Rt(){return!(!u(a)||!a.supports.marketplace)}(function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"})(ro||(ro={})),(function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"})(un||(un={}));const hy=Object.freeze(Object.defineProperty({__proto__:null,get CartStatus(){return un},get Intent(){return ro},addOrUpdateCartItems:Ev,cartVersion:_t,getCart:$v,isSupported:Rt,removeCartItems:Av,updateCartStatus:Iv},Symbol.toStringTag,{value:"Module"}));class Tv{constructor(t){this.event=t}serialize(){return{altKey:this.event.altKey,bubbles:this.event.bubbles,cancelBubble:this.event.cancelBubble,charCode:this.event.charCode,code:this.event.code,composed:this.event.composed,ctrlKey:this.event.ctrlKey,defaultPrevented:this.event.defaultPrevented,detail:this.event.detail,eventPhase:this.event.eventPhase,isComposing:this.event.isComposing,isTrusted:this.event.isTrusted,key:this.event.key,keyCode:this.event.keyCode,location:this.event.location,metaKey:this.event.metaKey,repeat:this.event.repeat,returnValue:this.event.returnValue,shiftKey:this.event.shiftKey,timeStamp:this.event.timeStamp,type:this.event.type,which:this.event.which}}}function Bi(e){return e.toLowerCase().split("+").sort().join("+")}function Pv(e,t){if((function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey||!!n.key&&n.key.toLowerCase()==="escape"})(t)){const n=(function(r){return[r.ctrlKey&&"ctrl",r.shiftKey&&"shift",r.altKey&&"alt",r.metaKey&&"meta",r.key.toLowerCase()].filter(Boolean).sort().join("+")})(t);if(e.has(n))return{matchedShortcut:n,isOverridable:cn.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function Wi(e){dn.clear(),e.shortcuts.forEach(t=>{dn.add(Bi(t))}),cn.clear(),e.overridableShortcuts.forEach(t=>{cn.add(Bi(t))})}class Ov extends re{validate(t){return t&&Array.isArray(t.shortcuts)&&Array.isArray(t.overridableShortcuts)}deserialize(t){return t}}function Al(e){if(e.target.closest(`[${Il}]`))return;const{matchedShortcut:t,isOverridable:n}=Pv(dn,e);if(!t||n&&yt&&yt(e,{matchedShortcut:t}))return;const r=new Tv(e);D("shortcutRelay.forwardShortcutEvent",[r],l("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const cn=new Set,dn=new Set;let yt,oo=!1;function _v(e){if(!zn())throw p;const t=yt;return yt=e,t}function Rv(){if(!zn())throw p;oo=!1,dn.clear(),cn.clear(),yt=void 0,document.removeEventListener("keydown",Al,{capture:!0})}function Mv(){return S(this,void 0,void 0,function*(){if(!zn())throw p;var e;Wi(yield B("shortcutRelay.getHostShortcuts",[],new Ov,l("v2","shortcutRelay.getHostShortcuts"))),oo||document.addEventListener("keydown",Al,{capture:!0}),oo=!0,e=t=>{Wi(t)},E(l("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)})}function zn(){return!(!u(a)||!a.supports.shortcutRelay)}const Il="data-disable-shortcuts-forwarding",my=Object.freeze(Object.defineProperty({__proto__:null,DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:Il,enableShortcutRelayCapability:Mv,isSupported:zn,resetIsShortcutRelayCapabilityEnabled:Rv,setOverridableShortcutHandler:_v},Symbol.toStringTag,{value:"Module"}));
6export{ui as ActionObjectType,ce as AppId,vi as ChannelType,Hg as ChildAppWindow,X as DialogDimension,pi as EduType,ab as EmailAddress,C as ErrorCode,li as FileOpenPreference,s as FrameContexts,$ as HostClientType,Gt as HostName,Bg as LiveShareHost,Qo as NotificationTypes,cb as ParentAppWindow,gi as RenderingSurfaces,ci as SecondaryM365ContentIdName,X as TaskModuleDimension,hi as TeamType,Ve as UUID,Zt as UserAuthenticationState,Xo as UserSettingTypes,mi as UserTeamRole,fc as ValidatedSafeString,Zo as ViewerActionTypes,Fv as activateChildProxyingCommunication,Hv as app,Fw as appEntity,cy as appInitialization,jb as appInstallDialog,xb as appPerformanceMetrics,Lb as authentication,Vb as barCode,Xb as calendar,uy as call,Bb as chat,Wb as clipboard,uw as conversations,vw as copilot,zv as dialog,gb as enablePrintCapability,_b as executeDeepLink,sw as externalAppAuthentication,ww as externalAppAuthenticationForCEA,bw as externalAppCardActions,yw as externalAppCardActionsForCEA,Sw as externalAppCardActionsForDA,$w as externalAppCommands,Ew as files,Yb as geoLocation,lb as getAdaptiveCardSchemaVersion,mb as getContext,Yi as getCurrentFeatureFlagsState,Pb as getMruTabInstances,Tb as getTabInstances,Gw as hostEntity,pb as initialize,Mb as initializeWithFrameContext,Db as liveShare,Kb as location,lw as logs,ty as mail,hy as marketplace,zb as media,Qb as meeting,Aw as meetingRoom,Bv as menus,Iw as messageChannels,Zb as monetization,Nb as navigateBack,Ub as navigateCrossDomain,kb as navigateToTab,Gb as nestedAppAuth,Tw as nestedAppAuthBridge,Pw as notifications,nw as openFilePreview,Ow as otherAppStateChange,kv as overwriteFeatureFlagsState,Jv as pages,ny as people,Rw as plugins,hb as print,ry as profile,bb as registerAppButtonClickHandler,yb as registerAppButtonHoverEnterHandler,Cb as registerAppButtonHoverLeaveHandler,Sb as registerBackButtonHandler,Eb as registerBeforeUnloadHandler,Ib as registerChangeSettingsHandler,ew as registerCustomHandler,Ab as registerFocusEnterHandler,wb as registerFullScreenHandler,$b as registerOnLoadHandler,vb as registerOnThemeChangeHandler,tw as registerUserSettingsChangeHandler,Mw as remoteCamera,Fb as returnFocus,oy as search,Jb as secondaryBrowser,Xv as sendCustomEvent,Zv as sendCustomMessage,Pl as setFeatureFlagsState,Rb as setFrameContext,py as settings,Ob as shareDeepLink,iy as sharing,my as shortcutRelay,dw as sidePanelInterfaces,ay as stageView,Yw as store,gy as tasks,kw as teams,fb as teamsCore,fy as thirdPartyCloudStorage,Qv as uploadCustomApp,Qe as version,Uw as videoEffects,jw as videoEffectsEx,sy as visualMedia,ly as webStorage,ib as widgetHosting};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.