@googleworkspace/meet-addons 1.2.0-dev-743307388 → 1.2.0-dev-744092633
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/meet.addons.mjs +67 -68
- package/meet.addons.screenshare.mjs +16 -15
- package/package.json +1 -1
package/meet.addons.mjs
CHANGED
|
@@ -4,73 +4,72 @@ function da(a,b){if(b)a:{var c=ca;a=a.split(".");for(var d=0;d<a.length-1;d++){v
|
|
|
4
4
|
Copyright The Closure Library Authors.
|
|
5
5
|
SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
|
-
var ea=this||self;function fa(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}}function ha(a,b){function c(){}c.prototype=b.prototype;a.pa=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.na=function(d,e,f){for(var h=Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return b.prototype[e].apply(d,h)}};function ia(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,ia);else{const c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}ha(ia,Error);ia.prototype.name="CustomError";function ja(a){ea.setTimeout(()=>{throw a;},0)};function ka(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};const la=/[-_.]/g,ma={"-":"+",_:"/",".":"="};function na(a){return ma[a]||""}var oa={};function pa(){return qa||(qa=new ra(null,oa))}var ra=class{constructor(a,b){sa(b);this.g=a;if(a!=null&&a.length===0)throw Error("ByteString should be constructed with non-empty values");}};let qa;function sa(a){if(a!==oa)throw Error("illegal external caller");};function ta(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let ua=void 0;function va(a){a=Error(a);ta(a,"warning");return a}function wa(a,b
|
|
8
|
-
function
|
|
9
|
-
function
|
|
10
|
-
function
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
function
|
|
14
|
-
function rb(a,b,c){if(a!=null&&typeof a==="object"&&Ga(a))return a;if(Array.isArray(a)){var d=a[l]|0,e=d;e===0&&(e|=c&32);e|=c&2;e!==d&&(a[l]=e);return new b(a)}};function sb(a){return a};function w(a,b,c,d,e){d=d?!!(b&32):void 0;const f=[];let h=a.length,k,g,n,z=!1;if(b&64){if(b&256?(h--,k=a[h],g=h):(g=4294967295,k=void 0),!(e||b&512)){z=!0;var r;n=((r=tb)!=null?r:sb)(k?g- -1:b>>16&1023||536870912,-1,a,k);g=n+-1}}else g=4294967295,b&1||(k=h&&a[h-1],Ia(k)?(h--,g=h,n=0):k=void 0);r=void 0;for(let v=0;v<h;v++){let A=a[v];if(A!=null&&(A=c(A,d))!=null)if(v>=g){var G=void 0;((G=r)!=null?G:r={})[v- -1]=A}else f[v]=A}if(k)for(let v in k)if(a=k[v],a!=null&&(a=c(a,d))!=null)if(G=+v,G<n)f[G+
|
|
7
|
+
var ea=this||self;function fa(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}}function ha(a,b){function c(){}c.prototype=b.prototype;a.pa=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.na=function(d,e,f){for(var h=Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return b.prototype[e].apply(d,h)}};function ia(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,ia);else{const c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}ha(ia,Error);ia.prototype.name="CustomError";function ja(a){ea.setTimeout(()=>{throw a;},0)};function ka(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};const la=/[-_.]/g,ma={"-":"+",_:"/",".":"="};function na(a){return ma[a]||""}var oa={};function pa(){return qa||(qa=new ra(null,oa))}var ra=class{constructor(a,b){sa(b);this.g=a;if(a!=null&&a.length===0)throw Error("ByteString should be constructed with non-empty values");}};let qa;function sa(a){if(a!==oa)throw Error("illegal external caller");};function ta(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let ua=void 0;function va(a){a=Error(a);ta(a,"warning");return a};function wa(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var xa=wa(),ya=wa(),za=wa("m_m",!0);const l=wa("jas",!0);var Aa;const Ba=[];Ba[l]=55;Aa=Object.freeze(Ba);var Ca={};function m(a,b){return b===void 0?a.h!==Da&&!!(2&(a.l[l]|0)):!!(2&b)&&a.h!==Da}const Da={};function Ea(a){return a!==null&&typeof a==="object"&&!Array.isArray(a)&&a.constructor===Object}function Fa(a,b){if(a!=null)if(typeof a==="string")a=a?new ra(a,oa):pa();else if(a.constructor!==ra)if(a!=null&&a instanceof Uint8Array)a=a.length?new ra(new Uint8Array(a),oa):pa();else{if(!b)throw Error();a=void 0}return a}var Ga=Object.freeze({});function Ha(){return typeof BigInt==="function"};function Ia(a){a.oa=!0;return a};var Ja=Ia(a=>typeof a==="number"),Ka=Ia(a=>typeof a==="string"),La=Ia(a=>typeof a==="boolean");var Ma=typeof ea.BigInt==="function"&&typeof ea.BigInt(0)==="bigint";function p(a){var b=a;if(Ka(b)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(b))throw Error(String(b));}else if(Ja(b)&&!Number.isSafeInteger(b))throw Error(String(b));return Ma?BigInt(a):a=La(a)?a?"1":"0":Ka(a)?a.trim()||"0":String(a)}var Sa=Ia(a=>Ma?a>=Na&&a<=Oa:a[0]==="-"?Pa(a,Qa):Pa(a,Ra));const Qa=Number.MIN_SAFE_INTEGER.toString(),Na=Ma?BigInt(Number.MIN_SAFE_INTEGER):void 0,Ra=Number.MAX_SAFE_INTEGER.toString(),Oa=Ma?BigInt(Number.MAX_SAFE_INTEGER):void 0;
|
|
8
|
+
function Pa(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){const d=a[c],e=b[c];if(d>e)return!1;if(d<e)return!0}};let q=0,t=0;function Ta(a){const b=a>>>0;q=b;t=(a-b)/4294967296>>>0}function Ua(a){if(a<0){Ta(-a);const [b,c]=Va(q,t);q=b>>>0;t=c>>>0}else Ta(a)}function Wa(a,b){b>>>=0;a>>>=0;if(b<=2097151)var c=""+(4294967296*b+a);else Ha()?c=""+(BigInt(b)<<BigInt(32)|BigInt(a)):(c=(a>>>24|b<<8)&16777215,b=b>>16&65535,a=(a&16777215)+c*6777216+b*6710656,c+=b*8147497,b*=2,a>=1E7&&(c+=a/1E7>>>0,a%=1E7),c>=1E7&&(b+=c/1E7>>>0,c%=1E7),c=b+Xa(c)+Xa(a));return c}
|
|
9
|
+
function Xa(a){a=String(a);return"0000000".slice(a.length)+a}function Ya(){var a=q,b=t;if(b&2147483648)if(Ha())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{const [c,d]=Va(a,b);a="-"+Wa(c,d)}else a=Wa(a,b);return a}function Va(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};const Za=typeof BigInt==="function"?BigInt.asIntN:void 0,$a=Number.isSafeInteger,ab=Number.isFinite,bb=Math.trunc;function cb(a){if(a==null||typeof a==="number")return a;if(a==="NaN"||a==="Infinity"||a==="-Infinity")return Number(a)}const db=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function eb(a){switch(typeof a){case "bigint":return!0;case "number":return ab(a);case "string":return db.test(a);default:return!1}}
|
|
10
|
+
function fb(a){if(a!=null){if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;ab(a)}}function gb(a){if(a!=null)a:{if(!eb(a))throw va("int64");switch(typeof a){case "string":a=hb(a);break a;case "bigint":a=p(Za(64,a));break a;default:a=kb(a)}}return a}function lb(a){const b=a.length;return a[0]==="-"?b<20?!0:b===20&&Number(a.substring(0,7))>-922337:b<19?!0:b===19&&Number(a.substring(0,6))<922337}
|
|
11
|
+
function mb(a){if(lb(a))return a;if(a.length<16)Ua(Number(a));else if(Ha())a=BigInt(a),q=Number(a&BigInt(4294967295))>>>0,t=Number(a>>BigInt(32)&BigInt(4294967295));else{const b=+(a[0]==="-");t=q=0;const c=a.length;for(let d=b,e=(c-b)%6+b;e<=c;d=e,e+=6){const f=Number(a.slice(d,e));t*=1E6;q=q*1E6+f;q>=4294967296&&(t+=Math.trunc(q/4294967296),t>>>=0,q>>>=0)}if(b){const [d,e]=Va(q,t);q=d;t=e}}return Ya()}
|
|
12
|
+
function kb(a){a=bb(a);if(!$a(a)){Ua(a);var b=q,c=t;if(a=c&2147483648)b=~b+1>>>0,c=~c>>>0,b==0&&(c=c+1>>>0);const d=c*4294967296+(b>>>0);b=Number.isSafeInteger(d)?d:Wa(b,c);a=typeof b==="number"?a?-b:b:a?"-"+b:b}return a}function hb(a){var b=bb(Number(a));if($a(b))return String(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));return mb(a)}function u(a){if(a!=null&&typeof a!=="string")throw Error();return a}
|
|
13
|
+
function nb(a,b,c){if(a!=null&&typeof a==="object"&&a[za]===Ca)return a;if(Array.isArray(a)){var d=a[l]|0,e=d;e===0&&(e|=c&32);e|=c&2;e!==d&&(a[l]=e);return new b(a)}};function ob(a){return a};function w(a,b,c,d,e){d=d?!!(b&32):void 0;const f=[];let h=a.length,k,g,n,z=!1;if(b&64){if(b&256?(h--,k=a[h],g=h):(g=4294967295,k=void 0),!(e||b&512)){z=!0;var r;n=((r=pb)!=null?r:ob)(k?g- -1:b>>16&1023||536870912,-1,a,k);g=n+-1}}else g=4294967295,b&1||(k=h&&a[h-1],Ea(k)?(h--,g=h,n=0):k=void 0);r=void 0;for(let v=0;v<h;v++){let A=a[v];if(A!=null&&(A=c(A,d))!=null)if(v>=g){var G=void 0;((G=r)!=null?G:r={})[v- -1]=A}else f[v]=A}if(k)for(let v in k)if(a=k[v],a!=null&&(a=c(a,d))!=null)if(G=+v,G<n)f[G+
|
|
15
14
|
-1]=a;else{let A;((A=r)!=null?A:r={})[v]=a}r&&(z?f.push(r):f[g]=r);e&&(f[l]=b&67043905|(r!=null?290:34));return f}
|
|
16
|
-
function
|
|
17
|
-
a=a.g=btoa(c)}return a}return}return a}let
|
|
18
|
-
function
|
|
19
|
-
function y(a,b,c,d){const e=c+-1;var f=a.length-1;let h;if(e>=f&&((h=b)!=null?h:b=a[l]|0)&256)return a[f][c]=d,b;if(e<=f)return a[e]=d,b;d!==void 0&&(f=b>>16&1023||536870912,c>=f?d!=null&&(a[f+-1]={[c]:d},b|=256,a[l]=b):a[e]=d);return b}function
|
|
20
|
-
function C(a,b,c,d){
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
var J=class{constructor(a){a:{if(a==null){var b=96;a=[]}else{if(!Array.isArray(a))throw Error("narr");b=a[l]|0;8192&b||!(64&b)||2&b||
|
|
25
|
-
J.prototype[
|
|
26
|
-
|
|
27
|
-
message:"This method is not supported in standalone mode.",i:"Do not call this method in standalone mode."},
|
|
28
|
-
|
|
29
|
-
message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",i:"Make sure the destination frame has connected before sending messages to it."},
|
|
30
|
-
message:"The supplied ActivityStartingState object does not contain any recognized attributes.",i:"Ensure that the ActivityStartingState object contains at least one of the following attributes: mainStageUrl, sidePanelUrl, additionalData."},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
i:"No further information is available."}),
|
|
34
|
-
message:"This feature is only available to early access partners.",i:"Meet add-on early access enrollment is currently closed."},
|
|
35
|
-
i:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},
|
|
36
|
-
message:"The user cancelled starting an activity.",i:"The user needs to click continue to start the activity."},
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
function
|
|
40
|
-
i:"This method might require EAP enrollment."};case 4:return{errorType:"InternalError",message:`Could not connect to ${a} channel. The addon is not authorized for this ${a}.`,i:"No further information is available."};case 0:return
|
|
41
|
-
i:"No further information is available."}}return c;default:return
|
|
42
|
-
g=n}if(k&&!(8&g||!a.length&&(h===1||h===4&&32&g))){
|
|
43
|
-
"string")throw new K(M("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new K(
|
|
44
|
-
var
|
|
45
|
-
a:0;let c;return(c=
|
|
46
|
-
d)}on(a,b){this.h[a]=b}async getMeetPlatformInfo(){const a=await
|
|
47
|
-
aa:d,cloudProjectNumber:e,R:f}};var
|
|
48
|
-
function
|
|
49
|
-
function
|
|
50
|
-
function
|
|
51
|
-
function
|
|
52
|
-
function
|
|
53
|
-
function
|
|
54
|
-
function
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
function
|
|
58
|
-
async function
|
|
59
|
-
async function
|
|
60
|
-
async function X(a,b){(a=await a.channel.C(b))||N(L,"Falsy response received from the message channel."+` ${JSON.stringify(a)}`);(b=a.data)||N(L,"Data field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);(b=b.content)||N(L,"Content field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);let c=void 0;try{c=
|
|
61
|
-
` ${JSON.stringify(b)}`);b=b==null?void 0:H(b,
|
|
62
|
-
async function
|
|
63
|
-
class
|
|
64
|
-
function
|
|
65
|
-
function
|
|
66
|
-
0;return{mediaId:c,mediaPlayoutPosition:b,mediaPlayoutRate:d,playbackState:
|
|
67
|
-
function
|
|
68
|
-
function
|
|
69
|
-
class
|
|
70
|
-
e=D(e,1,
|
|
15
|
+
function qb(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return Sa(a)?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){var b=a[l]|0;return a.length===0&&b&1?void 0:w(a,b,qb,!1,!1)}if(a[za]===Ca)return rb(a);if(a instanceof ra){b=a.g;if(b==null)a="";else if(typeof b==="string")a=b;else{let c="",d=0;const e=b.length-10240;for(;d<e;)c+=String.fromCharCode.apply(null,b.subarray(d,d+=10240));c+=String.fromCharCode.apply(null,d?b.subarray(d):
|
|
16
|
+
b);a=a.g=btoa(c)}return a}return}return a}let pb;function rb(a){a=a.l;return w(a,a[l]|0,qb,void 0,!1)};function sb(){if(ya!=null){var a;var b=(a=ua)!=null?a:ua={};a=b[ya]||0;a>=5||(b[ya]=a+1,b=Error(),ta(b,"incident"),ja(b))}};function tb(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){const d=a[l]|0;if(a.length===0&&d&1)return;if(d&2)return a;var c;if(c=b)c=d===0||!!(d&32)&&!(d&64||!(d&16));return c?(a[l]|=34,d&4&&Object.freeze(a),a):w(a,d,tb,b!==void 0,!0)}if(a[za]===Ca)return b=a.l,c=b[l]|0,m(a,c)?a:w(b,c,tb,!0,!0);if(a instanceof ra)return a}function ub(a){var b=a.l;const c=b[l]|0;if(!m(a,c))return a;a=new a.constructor(w(b,c,tb,!0,!0));b=a.l;b[l]&=-3;return a}
|
|
17
|
+
function vb(a){if(a.h!==Da)return!1;let b=a.l;b=w(b,b[l]|0,tb,!0,!0);b[l]&=-3;a.l=b;a.h=void 0;return!0}function wb(a){if(!vb(a)&&m(a,a.l[l]|0))throw Error();};const xb=p(0);function x(a,b){return yb(a.l,void 0,b)}function yb(a,b,c,d,e){if(c===-1)return null;d=c+(d?0:-1);const f=a.length-1;let h;if(d>=f&&(b!=null?b:a[l]|0)&256)b=a[f][c],h=!0;else if(d<=f)b=a[d];else return;if(e&&b!=null){e=e(b);if(e==null)return e;if(e!==b)return h?a[f][c]=e:a[d]=e,e}return b}function zb(a,b,c){wb(a);const d=a.l;y(d,d[l]|0,b,c);return a}
|
|
18
|
+
function y(a,b,c,d){const e=c+-1;var f=a.length-1;let h;if(e>=f&&((h=b)!=null?h:b=a[l]|0)&256)return a[f][c]=d,b;if(e<=f)return a[e]=d,b;d!==void 0&&(f=b>>16&1023||536870912,c>=f?d!=null&&(a[f+-1]={[c]:d},b|=256,a[l]=b):a[e]=d);return b}function Ab(a,b,c,d){const e=a.l;var f=e[l]|0;a=B(a,d)===c?c:-1;return Bb(e,f,b,a)!==void 0}function Cb(a){return!!(2&a)&&!!(4&a)||!!(1024&a)}function Db(a){return Fa(a,!0)}
|
|
19
|
+
function C(a,b,c,d){wb(a);const e=a.l;y(e,e[l]|0,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}function B(a,b){a=a.l;return Eb(Fb(a),a,void 0,b)}function Fb(a){let b;return(b=a[xa])!=null?b:a[xa]=new Map}function Eb(a,b,c,d){let e=a.get(d);if(e!=null)return e;e=0;for(let f=0;f<d.length;f++){const h=d[f];yb(b,c,h)!=null&&(e!==0&&(c=y(b,c,e)),e=h)}a.set(d,e);return e}function Bb(a,b,c,d){const e=yb(a,b,d);c=nb(e,c,b);c!==e&&c!=null&&y(a,b,d,c);return c}
|
|
20
|
+
function Gb(a,b,c){let d=a.l,e=d[l]|0;b=Bb(d,e,b,c);if(b==null)return b;e=d[l]|0;if(!m(a,e)){const f=ub(b);f!==b&&(vb(a)&&(d=a.l,e=d[l]|0),b=f,y(d,e,c,b))}return b}function Hb(a){a==null&&(a=void 0);return a}function Ib(a,b,c){c=Hb(c);zb(a,b,c);return a}function D(a,b,c,d){d=Hb(d);a:{wb(a);const h=a.l;var e=h[l]|0;if(d==null){var f=Fb(h);if(Eb(f,h,e,c)===b)f.set(c,0);else break a}else{f=h;const k=Fb(f),g=Eb(k,f,e,c);g!==b&&(g&&(e=y(f,e,g)),k.set(c,b))}y(h,e,b,d)}return a}
|
|
21
|
+
function Jb(a,b){wb(a);const c=a.l;let d=c[l]|0;if(b==null)return y(c,d,1),a;let e=b[l]|0,f=e;const h=Cb(e),k=h||Object.isFrozen(b);let g=!0,n=!0;for(let r=0;r<b.length;r++){var z=b[r];h||(z=m(z),g&&(g=!z),n&&(n=z))}h||(e=g?13:5,e=n?e|16:e&-17);k&&e===f||(b=[...b],f=0,e=Kb(e,d),e=Lb(e,d,!0));e!==f&&(b[l]=e);y(c,d,1,b);return a}function Kb(a,b){2&a&&(a|=16);a=(2&b?a|2:a&-3)|32;return a&=-1025}function Lb(a,b,c){32&b&&c||(a&=-33);return a}
|
|
22
|
+
function Mb(a){a=x(a,1);a=a==null||typeof a==="boolean"?a:typeof a==="number"?!!a:void 0;return a!=null?a:!1}function E(a,b){a=x(a,b);a=a==null||typeof a==="string"?a:void 0;return a!=null?a:""}function F(a,b){a=x(a,b);a=a==null?a:ab(a)?a|0:void 0;return a!=null?a:0}function H(a,b,c,d){c=B(a,d)===c?c:-1;return Gb(a,b,c)}function I(a,b,c){if(c!=null){if(!ab(c))throw va("enum");c|=0}return C(a,b,c,0)};function Nb(){var a=Ob||(Ob=Pb("[1,2,0]"));a=ub(a);a=zb(a,4,u("dev-744092633"));const b=a.l,c=b[l]|0;return m(a,c)?a:new a.constructor(w(b,c,tb,!0,!0))}
|
|
23
|
+
var J=class{constructor(a){a:{if(a==null){var b=96;a=[]}else{if(!Array.isArray(a))throw Error("narr");b=a[l]|0;8192&b||!(64&b)||2&b||sb();if(b&1024)throw Error("farr");if(b&64){b&16384||(a[l]=b|16384);var c=a;break a}var d=a;b|=64;var e=d.length;if(e){var f=e-1;e=d[f];if(Ea(e)){b|=256;const h=b&512?0:-1;f-=h;if(f>=1024)throw Error("pvtlmt");for(c in e){const k=+c;if(k<f)d[k+h]=e[c],delete e[c];else break}b=b&-67043329|(f&1023)<<16}}}a[l]=b|16384;c=a}this.l=c}toJSON(){return rb(this)}};
|
|
24
|
+
J.prototype[za]=Ca;J.prototype.toString=function(){return this.l.toString()};function Qb(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[l]|=32;b=new a(b)}return b}};var Pb=function(a){return b=>{b=JSON.parse(b);if(!Array.isArray(b)){var c=typeof b;throw Error("Expected jspb data to be an array, got "+(c!="object"?c:b?Array.isArray(b)?"array":c:"null")+": "+b);}b[l]|=34;return new a(b)}}(class extends J{});var Rb=class extends J{};function Sb(a){var b=new Tb(500);let c=0,d;return(...e)=>{Ub(b)?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;let f;(f=d)==null||f()},Vb(b))))}}function Wb(a){var b=new Tb(100),c=Promise.resolve();return(...d)=>Ub(b)?a(...d):c};function Ub(a){return Xb(a,a.index)>=a.g?(a.h[a.index]=Date.now(),a.index=(a.index+1)%1,!0):!1}function Vb(a){const b=a.g;a=Xb(a,a.index);return a>=b?0:b-a}function Xb(a,b){let c;return Date.now()-((c=a.h[b])!=null?c:-1*a.g)}var Tb=class{constructor(a){this.g=a;this.h=[];this.index=0}};var Yb=class extends J{},Zb=[2,3];var $b=class extends J{};var K=class extends Error{constructor({errorType:a,message:b,i:c}){super(`Meet add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},L={errorType:"InternalError",message:"An unexpected error has occurred.",i:"No further information is available."},ac={errorType:"MissingUrlParameter",message:"Missing required Meet SDK URL parameter",i:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not strip URL parameters (e.g. as part of a redirect)."},
|
|
25
|
+
bc={errorType:"NeedsMainStageContext",message:"This method can only be invoked if the addon is running in the main stage.",i:"Use getFrameType to check whether the addon is running in the main stage before invoking this method."},cc={errorType:"NeedsSidePanelContext",message:"This method can only be invoked if the addon is running in the side panel.",i:"Use getFrameType to check whether the addon is running in the side panel before invoking this method."},dc={errorType:"NotSupportedInStandalone",
|
|
26
|
+
message:"This method is not supported in standalone mode.",i:"Do not call this method in standalone mode."},ec={errorType:"MustBeIframed",message:"The SDK must be run in an iframe as part of a Google Meet add-on.",i:"See https://developers.google.com/meet/add-ons/guides/deploy-add-on to deploy to Meet."},fc={errorType:"InternalError",message:"The frame type URL parameter is set to an unexpected value.",i:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not modify URL parameters (e.g. as part of a redirect)."},
|
|
27
|
+
gc={errorType:"InvalidCloudProjectNumber",message:"Cloud Project Number provided by meet does not match the one passed in by the SDK. Ensure that the correct Cloud Project Number is passed to the SDK as a string.",i:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not modify URL parameters (e.g. as part of a redirect) and ensure that the correct Cloud Project Number was passed into the SDK as a string."},hc={errorType:"DestinationNotReady",
|
|
28
|
+
message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",i:"Make sure the destination frame has connected before sending messages to it."},ic={errorType:"InvalidActivityStartingState",message:"Origin of the ActivityStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",i:"Ensure that the ActivityStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},jc={errorType:"ActivityStartingStateMissingAttributes",
|
|
29
|
+
message:"The supplied ActivityStartingState object does not contain any recognized attributes.",i:"Ensure that the ActivityStartingState object contains at least one of the following attributes: mainStageUrl, sidePanelUrl, additionalData."},kc={errorType:"ActivityStartingStateUnrecognizedAttributes",message:"The supplied ActivityStartingState object contains attributes that are not recognized.",i:"Ensure that the ActivityStartingState object has only the following attributes: mainStageUrl, sidePanelUrl, additionalData."},
|
|
30
|
+
lc={errorType:"AddonStartingStateMissingAttributes",message:"The supplied AddonStartingState object does not contain any recognized attributes.",i:"Ensure that the AddonStartingState object contains at least one of the following attributes: sidePanelUrl, additionalData."},mc={errorType:"AddonStartingStateUnrecognizedAttributes",message:"The supplied AddonStartingState object contains attributes that are not recognized.",i:"Ensure that the AddonStartingState object has only the following attributes: sidePanelUrl, additionalData."},
|
|
31
|
+
oc=a=>({errorType:"ArgumentNullError",message:`The argument supplied for '${a}' was 'null' but a value was expected.`,i:"Ensure you are passing a value of the expected type for the argument."}),M=(a,b,c)=>({errorType:"ArgumentTypeError",message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,i:"Ensure the type of the argument provided matches the expected type."}),pc=a=>({errorType:"InternalError",message:`Could not connect to ${a} channel. Unknown error`,
|
|
32
|
+
i:"No further information is available."}),qc={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",i:"Ensure that no activity is ongoing."},rc={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",i:"Send one of the available commands in the frame message."},sc={errorType:"NoActivityFound",message:"No activity found.",i:"Ensure that the activity is started before performing this operation."},tc={errorType:"RequiresEapEnrollment",
|
|
33
|
+
message:"This feature is only available to early access partners.",i:"Meet add-on early access enrollment is currently closed."},uc={errorType:"UserNotInitiator",message:"Operation cannot be performed because the user is not the initiator of the current activity.",i:"Ensure that the user is the initiator of the current activity or that the activity has ended."},vc={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",
|
|
34
|
+
i:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},wc={errorType:"SizeLimitExceededFrameToFrameMessage",message:"The size of the frame to frame message exceeds the limits allowed.",i:"Ensure that the frame to frame message size is less than 1,000,000 characters."},xc={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",i:"Only instantiate the AddonSession once."},yc={errorType:"UserCancelled",
|
|
35
|
+
message:"The user cancelled starting an activity.",i:"The user needs to click continue to start the activity."},zc={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",i:"Do not call this method during a Meet call."},Ac={errorType:"InvalidAddonStartingState",message:"Origin of the AddonStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",i:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},
|
|
36
|
+
Bc={errorType:"SizeLimitExceededAddonStartingState",message:"The size of the AddonStartingState URLs and/or its data exceed the limits allowed.",i:"Ensure that the AddonStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Cc={errorType:"MeetingPolicyPreventsStartingActivity",message:"A meeting policy (such as using host control settings) prevents the user from starting the activity.",i:"Have a meeting host or administrator modify the necessary settings to allow the current user to start the activity."};
|
|
37
|
+
function Dc(a){switch(a){case 0:return L;case 1:return hc;case 2:return ic;case 3:return qc;case 4:return rc;case 5:return tc;case 6:return dc;case 7:return uc;case 8:return vc;case 9:return wc;case 10:return yc;case 11:return zc;case 12:return Ac;case 13:return Bc;case 14:return sc;case 15:return Cc;default:return L}}
|
|
38
|
+
function Ec(a){let b;var c=(b=F(a,1))!=null?b:0;a=Fc(B(a,Zb));switch(c){case 1:return{errorType:"InternalError",message:`Could not connect to ${a} channel. Meet did not respond with a MessagePort.`,i:"No further information is available."};case 2:return{errorType:"InternalError",message:`Could not connect to ${a}. A conflicting ${a} exists.`,i:"No further information is available."};case 3:return{errorType:"InternalError",message:`Could not connect to ${a} channel. The addon does not have permission to open a ${a}.`,
|
|
39
|
+
i:"This method might require EAP enrollment."};case 4:return{errorType:"InternalError",message:`Could not connect to ${a} channel. The addon is not authorized for this ${a}.`,i:"No further information is available."};case 0:return pc(a);case 5:a:switch(a){case "co":c={errorType:"InternalError",message:`Could not connect to ${a} channel. The coActivity was not found.`,i:`Consider starting the ${a} only after after the startActivity promise returns.`};break a;default:c={errorType:"InternalError",message:`Could not connect to ${a} channel.`,
|
|
40
|
+
i:"No further information is available."}}return c;default:return pc(a)}}function Fc(a){switch(a){case 2:return"co";case 3:return"gd";case 0:return"unknown";default:return"unknown"}}function N({errorType:a,message:b,i:c},d=""){throw new K({errorType:a,message:d?`${b} ${d}`:b,i:c});}function Gc(a,b){N({...ac,message:`${ac.message}: ${a}. In URL ${b}`})};function Hc(a){var b=new Ic;return I(b,1,a)}function Jc(a,b){return C(a,2,u(b),"")}function Kc(a,b){return C(a,3,u(b),"")}var Ic=class extends J{getFrameType(){return F(this,1)}};function Lc(a){var b=a.l,c=b;b=b[l]|0;var d=Ic,e=void 0===Ga?2:4,f=m(a,b);const h=f?1:e;e=h===3;var k=!f;(h===2||k)&&vb(a)&&(c=a.l,b=c[l]|0);a=yb(c,b,1);a=Array.isArray(a)?a:Aa;var g=a[l]|0;f=!!(4&g);if(!f){var n=g;n===0&&(n=Kb(n,b),n|=16);g=a;n|=1;var z=b;const r=!!(2&n);r&&(z|=2);let G=!r,v=!0,A=0,ib=0;for(;A<g.length;A++){const jb=nb(g[A],d,z);if(jb instanceof d){if(!r){const nc=m(jb);G&&(G=!nc);v&&(v=nc)}g[ib++]=jb}}ib<A&&(g.length=ib);n|=4;n=v?n|16:n&-17;n=G?n|8:n&-9;g[l]=n;r&&Object.freeze(g);
|
|
41
|
+
g=n}if(k&&!(8&g||!a.length&&(h===1||h===4&&32&g))){Cb(g)&&(a=[...a],g=Kb(g,b),b=y(c,b,1,a));d=a;k=g;for(g=0;g<d.length;g++)n=d[g],z=ub(n),n!==z&&(d[g]=z);k|=8;k=d.length?k&-17:k|16;g=d[l]=k}h===1||h===4&&32&g?Cb(g)||(c=g,b=!!(32&g),g|=!a.length||16&g&&(!f||b)?2:1024,g!==c&&(a[l]=g),Object.freeze(a)):(h===2&&Cb(g)&&(a=[...a],g=Kb(g,b),g=Lb(g,b,e),a[l]=g,b=y(c,b,1,a)),Cb(g)||(c=g,g=Lb(g,b,e),g!==c&&(a[l]=g)));return a}function Mc(a){var b=new Nc;return Jb(b,a)}var Nc=class extends J{};var Oc=class extends J{};var Pc=class extends J{};var Qc=class extends J{};var Rc=class extends J{};var Sc=class extends J{};var Tc=class extends J{getMeetPlatformInfo(){return Gb(this,Rc,1)}};var Uc=class extends J{getMeetingInfo(){return Gb(this,Sc,1)}};var Vc=class extends J{},O=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21];var Wc=class extends J{};var Xc=class extends J{};var Yc=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),Zc=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function $c(a){a&&typeof a.dispose=="function"&&a.dispose()};function P(){this.s=this.s;this.g=this.g}P.prototype.s=!1;P.prototype.dispose=function(){this.s||(this.s=!0,this.G())};P.prototype[Symbol.dispose]=function(){this.dispose()};function ad(a,b){a.s?b():(a.g||(a.g=[]),a.g.push(b))}P.prototype.G=function(){if(this.g)for(;this.g.length;)this.g.shift()()};function bd({I:a,P:b}){if(a===null)throw new K(oc("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new K(M("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new K(M("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new K(M("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!==
|
|
42
|
+
"string")throw new K(M("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new K(kc);if(Object.keys(a).length===0)throw new K(jc);}}function cd(a){const b=[];b.push(Kc(Jc(Hc(2),a.mainStageUrl),a.additionalData));b.push(Kc(Jc(Hc(1),a.sidePanelUrl),a.additionalData));return b}
|
|
43
|
+
var ld=class extends P{constructor(a){super();this.context=a;this.h={};dd(this.context.g.T,b=>{switch(B(b.content,O)){case 7:const d=this.h.frameToFrameMessage;b=H(b.content,Qc,7,O);if(d&&b){var c=F(b,1);c=Yc.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:E(b,2)})}}})}async getMeetingInfo(){const a=await ed(this.context.g);return{meetingId:E(a.getMeetingInfo(),1),meetingCode:E(a.getMeetingInfo(),2)}}async getFrameOpenReason(){let a;const b=(a=this.context.h.ba)!=null?
|
|
44
|
+
a:0;let c;return(c=Zc.get(b))!=null?c:"UNKNOWN"}async getActivityStartingState(){var a=Gb(await fd(this.context.g),Nc,1);const b=a==null?void 0:Lc(a).find(c=>c.getFrameType()===2);a=a==null?void 0:Lc(a).find(c=>c.getFrameType()===1);return{mainStageUrl:(b==null?void 0:E(b,2))||void 0,sidePanelUrl:(a==null?void 0:E(a,2))||void 0,additionalData:(a==null?void 0:E(a,3))||void 0}}async setActivityStartingState(a){bd({I:a,P:!0});var b=cd(a);a=gd;var c=this.context.g;var d=new Wc;b=Mc(b);d=Ib(d,1,b);await a(c,
|
|
45
|
+
d)}on(a,b){this.h[a]=b}async getMeetPlatformInfo(){const a=await hd(this.context.g);return{isMeetHardware:Mb(a.getMeetPlatformInfo())}}async closeAddon(){await id(this.context.g)}async startActivity(a){bd({I:a,P:!1});const b=new Xc;a&&(a=cd(a),a=Mc(a),Ib(b,1,a));await jd(this.context.g,b)}async endActivity(a){var b=kd,c=this.context.g,d=new Oc;a=I(d,1,a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0);await b(c,a)}};var md=Qb(class extends J{getFrameOpenReason(){return F(this,5)}});function nd(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");if(c)b=md(atob(c));else{var d;((d=window.top)!=null?d:window)===window?N(ec):Gc("meet_sdk",b);b=void 0}(c=E(b,1))||Gc("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new K(fc);(d=E(b,2))||Gc("meet_control_channel_name",a);const e=E(b,4);e||Gc("addon_cloud_project_number",a);var f;a=(f=b.getFrameOpenReason())!=null?f:0;f=E(b,3)||"https://meet.google.com";return{ba:a,frameType:c,
|
|
46
|
+
aa:d,cloudProjectNumber:e,R:f}};var od=class extends J{};var pd=class extends J{};var qd=class extends J{};function rd(){var a=new sd,b=new qd;return D(a,1,td,b)}var sd=class extends J{},td=[1,2];function ud(a){var b=new vd;return Ib(b,2,a)}function wd(a,b){return C(a,3,u(b),"")}var vd=class extends J{};var xd=class extends J{};var yd=class extends J{};var zd=class extends J{};var Ad=class extends J{};var Bd=class extends J{};var Cd=class extends J{};var Dd=class extends J{setAddonStartingState(a){return Ib(this,1,a)}};var Ed=class extends J{};function Fd(a,b){return D(a,2,Q,b)}var R=class extends J{},Q=[1,2,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20];function Gd(a){return H(a,Vc,2,Hd)}var Id=class extends J{},Jd=Qb(Id),Hd=[1,2];class Kd{constructor(a,b){this.data=a;this.channel=b}};var Ld=Promise;function Md(a){const b=new MessageChannel;Nd(b.port1,a);return b}function Od(a,b){Nd(a,b);return new Pd(a)}class Pd{constructor(a){this.g=a}send(a,b,c=[]){b=Md(b);this.g.postMessage(a,[b.port2].concat(c))}C(a,b){return new Ld(c=>{this.send(a,c,b)})}}function Nd(a,b){b&&(a.onmessage=c=>{var d=c.data;c=Od(c.ports[0]);b(new Kd(d,c))})};var Qd=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?a=>a&&AsyncContext.Snapshot.wrap(a):a=>a;function Rd(a,b){a.m(b);a.h<100&&(a.h++,b.next=a.g,a.g=b)}class Sd{constructor(a,b){this.j=a;this.m=b;this.h=0;this.g=null}get(){let a;this.h>0?(this.h--,a=this.g,this.g=a.next,a.next=null):a=this.j();return a}};function Td(){var a=Ud;let b=null;a.g&&(b=a.g,a.g=a.g.next,a.g||(a.h=null),b.next=null);return b}class Vd{constructor(){this.h=this.g=null}add(a,b){const c=Wd.get();c.set(a,b);this.h?this.h.next=c:this.g=c;this.h=c}}var Wd=new Sd(()=>new Xd,a=>a.reset());class Xd{constructor(){this.next=this.g=this.h=null}set(a,b){this.h=a;this.g=b;this.next=null}reset(){this.next=this.g=this.h=null}};let Yd,Zd=!1,Ud=new Vd,ae=(a,b)=>{Yd||$d();Zd||(Yd(),Zd=!0);Ud.add(a,b)},$d=()=>{const a=Promise.resolve(void 0);Yd=()=>{a.then(be)}};function be(){let a;for(;a=Td();){try{a.h.call(a.g)}catch(b){ja(b)}Rd(Wd,a)}Zd=!1};function ce(){};function S(a){this.g=0;this.S=void 0;this.m=this.h=this.j=null;this.u=this.B=!1;if(a!=ce)try{const b=this;a.call(void 0,function(c){de(b,2,c)},function(c){de(b,3,c)})}catch(b){de(this,3,b)}}function ee(){this.next=this.context=this.h=this.m=this.g=null;this.j=!1}ee.prototype.reset=function(){this.context=this.h=this.m=this.g=null;this.j=!1};var fe=new Sd(function(){return new ee},function(a){a.reset()});function ge(a,b,c){const d=fe.get();d.m=a;d.h=b;d.context=c;return d}
|
|
47
|
+
function he(){let a,b;const c=new S(function(d,e){a=d;b=e});return new ie(c,a,b)}S.prototype.then=function(a,b,c){return je(this,Qd(typeof a==="function"?a:null),Qd(typeof b==="function"?b:null),c)};S.prototype.$goog_Thenable=!0;function ke(a,b){b=Qd(b);b=ge(b,b);b.j=!0;le(a,b)}S.prototype.cancel=function(a){if(this.g==0){const b=new T(a);ae(function(){me(this,b)},this)}};
|
|
48
|
+
function me(a,b){if(a.g==0)if(a.j){var c=a.j;if(c.h){var d=0,e=null,f=null;for(let h=c.h;h&&(h.j||(d++,h.g==a&&(e=h),!(e&&d>1)));h=h.next)e||(f=h);e&&(c.g==0&&d==1?me(c,b):(f?(d=f,d.next==c.m&&(c.m=d),d.next=d.next.next):ne(c),oe(c,e,3,b)))}a.j=null}else de(a,3,b)}function le(a,b){a.h||a.g!=2&&a.g!=3||pe(a);a.m?a.m.next=b:a.h=b;a.m=b}
|
|
49
|
+
function je(a,b,c,d){const e=ge(null,null,null);e.g=new S(function(f,h){e.m=b?function(k){try{const g=b.call(d,k);f(g)}catch(g){h(g)}}:f;e.h=c?function(k){try{const g=c.call(d,k);g===void 0&&k instanceof T?h(k):f(g)}catch(g){h(g)}}:h});e.g.j=a;le(a,e);return e.g}S.prototype.la=function(a){this.g=0;de(this,2,a)};S.prototype.ma=function(a){this.g=0;de(this,3,a)};
|
|
50
|
+
function de(a,b,c){if(a.g==0){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.g=1;a:{var d=c,e=a.la,f=a.ma;if(d instanceof S){le(d,ge(e||ce,f||null,a));var h=!0}else{if(d)try{var k=!!d.$goog_Thenable}catch(g){k=!1}else k=!1;if(k)d.then(e,f,a),h=!0;else{k=typeof d;if(k=="object"&&d!=null||k=="function")try{const g=d.then;if(typeof g==="function"){qe(d,g,e,f,a);h=!0;break a}}catch(g){f.call(a,g);h=!0;break a}h=!1}}}h||(a.S=c,a.g=b,a.j=null,pe(a),b!=3||c instanceof T||re(a,c))}}
|
|
51
|
+
function qe(a,b,c,d,e){function f(g){k||(k=!0,d.call(e,g))}function h(g){k||(k=!0,c.call(e,g))}let k=!1;try{b.call(a,h,f)}catch(g){f(g)}}function pe(a){a.B||(a.B=!0,ae(a.ka,a))}function ne(a){let b=null;a.h&&(b=a.h,a.h=b.next,b.next=null);a.h||(a.m=null);return b}S.prototype.ka=function(){let a;for(;a=ne(this);)oe(this,a,this.g,this.S);this.B=!1};
|
|
52
|
+
function oe(a,b,c,d){if(c==3&&b.h&&!b.j)for(;a&&a.u;a=a.j)a.u=!1;if(b.g)b.g.j=null,se(b,c,d);else try{b.j?b.m.call(b.context):se(b,c,d)}catch(e){te.call(null,e)}Rd(fe,b)}function se(a,b,c){b==2?a.m.call(a.context,c):a.h&&a.h.call(a.context,c)}function re(a,b){a.u=!0;ae(function(){a.u&&te.call(null,b)})}var te=ja;function T(a){ia.call(this,a)}ha(T,ia);T.prototype.name="cancel";function ie(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let ue=1,ve=new WeakMap;function we(a,b,c){var d=xe;a.h.has(b);d(b,c)}var ze=class extends P{constructor(){super();this.h=new Set}signal(){const a=new ye;this.h.add(a);ad(this,fa($c,a));return a}};function xe(a,b){return new Promise(c=>{Ae(()=>{a.K&&(a.da=b,a.O=!0);for(const {H:d,slot:e}of a.o.values())try{e(b,{signal:a,H:d})}catch(f){ja(f)}for(const d of a.A)d.resolve(b);a.A.clear();c()})})}function dd(a,b,c){const d=ue++;Ae(()=>{Be(a,d,b,c)});return d}
|
|
53
|
+
function Be(a,b,c,d){if(!a.s)if(d){if(!d.s){const e=()=>{Ae(()=>{a.o.delete(b);const f=ve.get(d);f&&ka(f,e)})};a.o.set(b,{H:b,slot:c,F:e});Ce(d,e)}}else a.o.set(b,{H:b,slot:c,F:()=>a.o.delete(b)})}
|
|
54
|
+
var ye=class extends P{constructor(){super();this.K=!1;this.o=new Map;this.A=new Set;this.O=!1}detach(a){Ae(()=>{const b=this.o.get(a);b&&b.F()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){const c=he();Ae(()=>{if(this.s)c.reject(new T("Signal initially disposed"));else if(b&&b.s)c.reject(new T("Owner initially disposed"));else if(a&&this.K&&this.O)c.resolve(this.da);else if(this.A.add(c),ke(c.promise,()=>{this.A.delete(c)}),b){const d=()=>{c.reject(new T("Owner asynchronously disposed"))};
|
|
55
|
+
ke(c.promise,()=>{const e=ve.get(b);e&&ka(e,d)});Ce(b,d)}});return c.promise}G(){super.G();Ae(()=>{for(const {F:a}of this.o.values())a();this.o.clear();for(const a of this.A)a.reject(new T("Signal asynchronously disposed"));this.A.clear()})}};const De=[];let Ee=!1;function Ae(a){De.push(a);Fe()}async function Fe(){if(!Ee)try{Ee=!0;let a=Ge(0);for(;a<De.length;)await Promise.resolve(),a=Ge(a)}catch(a){ja(a)}finally{De.length=0,Ee=!1}}
|
|
56
|
+
function Ge(a){const b=a+100;for(;a<b&&a<De.length;)try{De[a++]()}catch(c){ja(c)}return a}function Ce(a,b){if(a.s)b();else{var c=ve.get(a);if(c)c.push(b);else{const d=[b];ve.set(a,d);ad(a,()=>{for(const e of[...d])e();ve.delete(a)})}}};function U(a){var b=new Id;a=D(b,1,Hd,a);return{content:JSON.stringify(rb(a))}}const He=new ze;function Ie(a,b){const c=He.signal();return{channel:Od(a,d=>{const e=b(d.data);we(He,c,{content:e,ja:d})}),signal:c}};let Ob;var V=class extends J{};var W=class extends J{};var Ke=class extends J{j(){return H(this,V,2,Je)}g(){return Ab(this,V,2,Je)}m(){return H(this,W,3,Je)}u(){return Ab(this,W,3,Je)}},Je=[2,3];var Le=Qb(class extends J{});var Me=Qb(class extends J{}),Ne=[1,2];var Oe=({destination:a,origin:b,qa:c,X:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");const f=Md(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return Od(f.port1,e)};function Pe(a,b,c){const d=new ze,e=d.signal();a=Oe({destination:window.parent,origin:b,X:a,onMessage:f=>{const h=Jd(f.data.content);B(h,Hd)===2&&we(d,e,{content:Gd(h),ja:f,messagePort:f.data.messagePort})}});return new Qe(e,a,c)}async function ed(a){var b=X;var c=new R;var d=new zd;c=D(c,19,Q,d);a=await b(a,U(c));let e;return(e=Gd(Jd(a.data.content)))==null?void 0:H(e,Uc,20,O)}
|
|
57
|
+
async function fd(a){var b=X;var c=new R;var d=new pd;c=D(c,17,Q,d);a=await b(a,U(c));let e;return(e=Gd(Jd(a.data.content)))==null?void 0:H(e,Pc,18,O)}async function gd(a,b){var c=X,d=new R;b=D(d,8,Q,b);await c(a,U(b))}async function hd(a){var b=X;var c=new R;var d=new yd;c=D(c,18,Q,d);a=await b(a,U(c));let e;return(e=Gd(Jd(a.data.content)))==null?void 0:H(e,Tc,19,O)}async function id(a){var b=X;var c=new R;var d=new od;c=D(c,11,Q,d);await b(a,U(c))}
|
|
58
|
+
async function jd(a,b){var c=X,d=new R;b=D(d,14,Q,b);await c(a,U(b))}async function kd(a,b){var c=X,d=new R;b=D(d,15,Q,b);await c(a,U(b))}async function Re(a){await a.h()}
|
|
59
|
+
async function X(a,b){(a=await a.channel.C(b))||N(L,"Falsy response received from the message channel."+` ${JSON.stringify(a)}`);(b=a.data)||N(L,"Data field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);(b=b.content)||N(L,"Content field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);let c=void 0;try{c=Jd(b)}catch(d){N(L,"The ControlMessage can't be deserialized."+` ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=Gd(c))||N(L,"MeetToAddonMessage field on ControlMessage is falsy."+
|
|
60
|
+
` ${JSON.stringify(b)}`);b=b==null?void 0:H(b,$b,10,O);if((b==null?void 0:F(b,1))!==void 0)throw new K(Dc(F(b,1)));return a}async function Se(a,b,c){var d=X,e=new R;b=D(e,1,Q,b);d=await d(a,U(b));a=d.data.messagePort;var f;(d=(f=Gd(Jd(d.data.content)))==null?void 0:H(f,Yb,1,O))!=null?f=d:(f=new Yb,f=I(f,1,0));return{channel:a?Ie(a,c):void 0,response:f}}async function Te(a){const b=rd(),{channel:c,response:d}=await Se(a,b,e=>Me(e));if(!c)throw new K(Ec(d));return c}
|
|
61
|
+
async function Ue(a){var b=X;var c=new R;var d=new Ed;c=D(c,5,Q,d);await b(a,U(c))}async function Ve(a){var b=X;var c=new R;var d=new xd;c=D(c,6,Q,d);await b(a,U(c))}async function We(a,b,c){var d=X,e=new R,f=new Ad;b=I(f,1,b);c=C(b,2,u(c),"");e=D(e,7,Q,c);await d(a,U(e))}async function Xe(a,b){var c=X,d=new R;b=D(d,16,Q,b);await c(a,U(b))}
|
|
62
|
+
class Qe extends P{constructor(a,b,c){super();this.T=a;this.channel=b;this.h=Wb(async()=>{var d=this.channel,e=d.C;var f=new R;var h=new Bd;f=D(f,13,Q,h);await e.call(d,U(f))});a=Nb();E(a,4);fb(x(a,1));fb(x(a,2));fb(x(a,3));c=Fd(new R,wd(ud(a),c));this.channel.send(U(c));dd(this.T,async d=>{switch(B(d.content,O)){case 16:await Re(this)}})}};let Ye;var Ze=class{constructor(a){var b=Ye;this.h=a;this.g=b}delete(){throw Error("Not implemented.");}};var af=class extends J{j(){return H(this,V,2,$e)}g(){return Ab(this,V,2,$e)}m(){return H(this,W,3,$e)}u(){return Ab(this,W,3,$e)}},$e=[2,3];var bf=class extends J{};var cf=class extends J{};var df=class extends J{};var ff=class extends J{j(){return H(this,V,2,ef)}g(){return Ab(this,V,2,ef)}m(){return H(this,W,3,ef)}u(){return Ab(this,W,3,ef)}},ef=[2,3],gf=[5,6];var hf=class extends J{};var jf=class extends J{},kf=[1,2,3];var lf=class extends Error{constructor(){super("Failed to create CoActivity: Connection refused - Meet refused to begin Live Sharing")}};var mf=class{constructor(a){this.config=a}start(){this.g!=null||(this.g=setInterval(()=>{this.config.ga()},this.config.ca));return this}shutdown(){clearInterval(this.g)}};function nf(){const a=new Map,b={set(c,d){a.set(c,d);return b},D:()=>a};return b};function of(a){if(a.g()){a=a.j();a=yb(a.l,void 0,1,void 0,Db);var b=a==null?pa():a;a=Uint8Array;sa(oa);var c=b.g;if(!(c==null||c!=null&&c instanceof Uint8Array))if(typeof c==="string"){la.test(c)&&(c=c.replace(la,na));c=atob(c);const d=new Uint8Array(c.length);for(let e=0;e<c.length;e++)d[e]=c.charCodeAt(e);c=d}else c=null;b=c==null?c:b.g=c;return{bytes:new a(b||0)}}}function pf(a,b){b=qf(b);D(a,2,ef,b);return a}function rf(a,b){b=qf(b);D(a,2,$e,b);return a}
|
|
63
|
+
function qf(a){var b=new V;return C(b,1,Fa(a.bytes,!1),pa())}
|
|
64
|
+
function sf(a){if(a.u()){a=a.m();var b,c=E(a,1);if((b=Gb(a,Rb,2))==null)b=void 0;else{b=x(b,1);var d=typeof b;b!=null&&(d==="bigint"?b=p(Za(64,b)):eb(b)?d==="string"?(d=bb(Number(b)),$a(d)?b=p(d):(d=b.indexOf("."),d!==-1&&(b=b.substring(0,d)),b=Ha()?p(Za(64,BigInt(b))):p(mb(b)))):$a(b)?b=p(kb(b)):(b=bb(b),$a(b)?b=String(b):(d=String(b),lb(d)?b=d:(Ua(b),b=Ya())),b=p(b)):b=void 0);b=b!=null?b:xb}b=b!=null?Sa(b)?Number(b):String(b):void 0;b=b!=null?b:0;let e;d=(e=yb(a.l,void 0,4,void 0,cb))!=null?e:
|
|
65
|
+
0;return{mediaId:c,mediaPlayoutPosition:b,mediaPlayoutRate:d,playbackState:tf.get(F(a,3))}}}function uf(a,b){b=vf(b);D(a,3,ef,b);return a}function wf(a,b){b=vf(b);D(a,3,$e,b);return a}const tf=nf().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").D(),xf=nf().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).D();
|
|
66
|
+
function vf(a){var b=new W;b=C(b,1,u(a.mediaId),"");var c=a.mediaPlayoutRate;if(c!=null&&typeof c!=="number")throw Error(`Value of float/double field must be a number, found ${typeof c}: ${c}`);b=C(b,4,c,0);c=new Rb;c=C(c,1,gb(a.mediaPlayoutPosition),"0");b=Ib(b,2,c);a=xf.get(a.playbackState);return I(b,3,a)}function yf({activityTitle:a}){var b=new df;return zb(b,4,u(a))}function zf(a,b){var c=new cf;b=I(c,1,b.v);D(a,6,gf,b);return a}function Af(a){var b=new bf;D(a,5,gf,b);return a};const Bf=nf().set("co-doing",1).set("co-watching",2).D();async function Cf(a,b,c){var d=b.C,e=new jf;var f=new hf;f=C(f,1,u(a.activityTitle),"");var h=Bf.get(a.J);f=I(f,2,h);e=D(e,3,kf,f);d=await d.call(b,e,Le);let k;if((k=Mb(d))!=null&&k)return new Df(a,b,c,Gb(d,Ke,2));throw new lf;}
|
|
67
|
+
function Ef(a,b){const c=a.config.M(b);if(c&&!a.config.L(a.g,c)){a.g=c;let d;b=x(b,1);b!=null&&(typeof b==="bigint"?Sa(b)?b=Number(b):(b=Za(64,b),b=Sa(b)?Number(b):String(b)):b=eb(b)?typeof b==="number"?kb(b):hb(b):void 0);b=(d=b)!=null?d:0;a.j=b;a.u(a.g)}}function Y(a,b){const {state:c,ea:d,context:e}=b(a.g);a.g=c;a.notify(a.g,e,d)}
|
|
68
|
+
class Df{constructor(a,b,c,d){this.m=a;this.h=b;this.config=c;this.u=Sb(e=>void this.m.N(e));Ff(this.h,e=>{const f=B(e,Ne);switch(f){case 1:Ef(this,H(e,Ke,1,Ne));break;case 2:case 0:console.warn(`IllegalMessage: ${f} - ${"Unhandled message"} - ${"Please raise a bug with the MeetJS team"}`)}});this.B=(new mf({ca:1E3,ga:()=>{var e,f,h=(f=(e=this.m).ia)==null?void 0:f.call(e);if(this.g!==null){this.g={...this.g,...h};e=new jf;f=this.config;h=f.V;var k=new af;k=C(k,1,gb(this.j),"0");f=h.call(f,k,this.g);
|
|
69
|
+
e=D(e,1,kf,f);this.h.send(e)}}})).start();this.g=null;this.j=0;d&&Ef(this,d)}disconnect(){this.h.shutdown();this.B.shutdown()}notify(a,b,c){var d=c?yf(c):void 0;c=this.config;var e=c.W;var f=new ff;f=C(f,1,gb(this.j),"0");d=Ib(f,4,d);a=e.call(c,d,a);a=this.config.U(a,b);b=this.h;c=b.send;e=new jf;a=D(e,2,kf,a);c.call(b,a)}};var Gf=class{constructor(a){this.g=a}broadcastStateUpdate(a){Y(this.g,()=>({state:a,context:{}}))}disconnect(){this.g.disconnect()}};function Hf(a,b){return a==null||b==null?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var If=class{constructor(a){this.g=a}notifySwitchedToMedia(a,b,c){Y(this.g,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},ea:{activityTitle:a},context:{v:1}}))}notifyPauseState(a,b){Y(this.g,c=>{if(c==null)throw Error("Invalid before coWatchingState");return{state:{...c,playbackState:a?"PAUSE":"PLAY",mediaPlayoutPosition:b},context:{v:3}}})}notifySeekToTimestamp(a){Y(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},
|
|
71
70
|
context:{v:2}}})}notifyPlayoutRate(a){Y(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutRate:a},context:{v:4}}})}notifyBuffering(a){Y(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a,playbackState:"BUFFERING"},context:{v:3}}})}notifyReady(a){Y(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},context:{v:3}}})}disconnect(){this.g.disconnect()}};
|
|
72
|
-
function
|
|
73
|
-
async function
|
|
74
|
-
+!!a.additionalData)throw new K(
|
|
75
|
-
a)}async createRoomsStandaloneClient(){var a=this.g;if(a.h.frameType!==2)throw new K(
|
|
76
|
-
return
|
|
71
|
+
function Jf(a,b){if(a==null||b==null)return!1;const c=a.playbackState==="PLAY"?3*Math.max(a.mediaPlayoutRate,1):0,d=Math.abs(a.mediaPlayoutPosition-b.mediaPlayoutPosition);return a.mediaId===b.mediaId&&a.mediaPlayoutRate===b.mediaPlayoutRate&&d<=c&&a.playbackState===b.playbackState};function Ff(a,b){const c=dd(a.signal,d=>{b(d)});a.o.push(c)}var Kf=class{constructor(a,b){this.channel=a;this.signal=b;this.o=[]}send(a){this.channel.send(JSON.stringify(rb(a)))}async C(a,b){a=await this.channel.C(JSON.stringify(rb(a)));return b(a.data)}shutdown(){this.o.forEach(a=>{this.signal.detach(a)})}};function Lf(a,b){var c=Mf;const d=a.signal(),e=a.signal();dd(b,f=>{const h=c(f)?d:e;we(a,h,f)},a);return{ha:d,fa:e}}function Nf(a,b,c,d=e=>e){dd(c,e=>{we(a,b,d(e))},a)};async function Of(a,b){if(b)return a=await Cf({activityTitle:b.activityTitle,J:"co-watching",ia:()=>b.onCoWatchingStateQuery(),N:c=>{b.onCoWatchingStateChanged(c)}},a,{W:uf,V:wf,U:zf,M:sf,L:Jf}),new If(a)}async function Pf(a,b){if(b)return a=await Cf({activityTitle:b.activityTitle,J:"co-doing",N:c=>{b.onCoDoingStateChanged(c)}},a,{W:pf,V:rf,U:Af,M:of,L:Hf}),new Gf(a)}
|
|
72
|
+
async function Qf(a){const b=new ze,c=b.signal();a=await a;Nf(b,c,a.signal,f=>f.content);const {ha:d,fa:e}=Lf(b,c);return{Y:new Kf(a.channel,d),Z:new Kf(a.channel,e)}}function Mf(a){a:switch(B(a,Ne)){case 1:a=H(a,Ke,1,Ne);break a;default:throw Error("CA Message arrived with no known content message set");}return a.g()};async function Rf(a,b){({Y:a}=await Qf(Te(a.g)));b=await Pf(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function Sf(a,b){({Z:a}=await Qf(Te(a.g)));b=await Of(a,b);if(!b)throw Error("Failed to create co-watching session");return b};var Tf=class extends ld{async notifySidePanel(a){await We(this.context.g,1,a)}async unloadSidePanel(){await Ue(this.context.g)}async loadSidePanel(){await Ve(this.context.g)}};var Uf=class extends ld{async setAddonStartingState(a){if(a===null)throw new K(oc("addonStartingState"));if(typeof a!=="object")throw new K(M("addonStartingState",typeof a,"object | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new K(M("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!=="string")throw new K(M("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.sidePanelUrl+
|
|
73
|
+
+!!a.additionalData)throw new K(mc);if(Object.keys(a).length===0)throw new K(lc);var b=[];b.push(Kc(Jc(Hc(1),a.sidePanelUrl),a.additionalData));a=this.context.g;var c=new Dd,d=c.setAddonStartingState,e=new Cd;b=Jb(e,b);await Xe(a,d.call(c,b))}};var Vf=class extends ld{async notifyMainStage(a){await We(this.context.g,2,a)}};var Wf=class{constructor(a){a=a.cloudProjectNumber;const b=nd();if(b.cloudProjectNumber!==a)throw new K(gc);const c=b.R,d=b.aa;let e;Ye=(e=Ye)!=null?e:Pe(d,c,a);this.g=new Ze(b)}async createMainStageClient(){var a=this.g;if(a.h.frameType!==2)throw new K(bc);return await Promise.resolve(new Tf(a))}async createSidePanelClient(){var a=this.g;if(a.h.frameType!==1)throw new K(cc);return await Promise.resolve(new Vf(a))}async createCoWatchingClient(a){return await Sf(this.g,a)}async createCoDoingClient(a){return await Rf(this.g,
|
|
74
|
+
a)}async createRoomsStandaloneClient(){var a=this.g;if(a.h.frameType!==2)throw new K(bc);return await Promise.resolve(new Uf(a))}};let Xf=null;for(var Yf={addon:{getFrameType:function(){a:{var a=nd().frameType;switch(a){case 2:a="MAIN_STAGE";break a;case 1:a="SIDE_PANEL";break a;default:throw Error(`Unknown frame type: ${a}`);}}return a},createAddonSession:async function(a){if(a===null)throw new K(oc("config"));if(typeof a!=="object")throw new K(M("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new K(M("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(Xf&&nd().R!=="integration.test.google.com")throw new K(xc);
|
|
75
|
+
return Xf=new Wf(a)}}},Zf=["meet"],Z=ea,$f;Zf.length&&($f=Zf.shift());)Zf.length||Yf===void 0?Z[$f]&&Z[$f]!==Object.prototype[$f]?Z=Z[$f]:Z=Z[$f]={}:Z[$f]=Yf;}).apply(topLevel);export const meet = topLevel.meet;
|
|
@@ -3,18 +3,19 @@ const topLevel = typeof global !== 'undefined' ? global : typeof self !== 'undef
|
|
|
3
3
|
Copyright The Closure Library Authors.
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
var l=this||self;function
|
|
7
|
-
var
|
|
8
|
-
j:u};let
|
|
9
|
-
-1]=a;else{let t;((t=q)!=null?t:q={})[r]=a}q&&(n?g.push(q):g[h]=q);d&&(g[
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
var l=this||self;function ba(a){return a};var u=class extends Error{constructor(a,b){super(`Meet Addon Screenshare Info error: ${`${a}${b?` - ${b}`:""}`}`)}};function v(a){throw new a.j(a.message,a.o);}
|
|
7
|
+
var ca={message:"cloudProjectNumber was not defined.",o:"Ensure that cloudProjectNumber is provided in the call to exposeToMeetWhenScreensharing.",j:u},da={message:"additionalData was defined, but startActivityOnOpen was not true.",o:"Ensure that startActivityOnOpen is set to true if additionalData is provided in the call to exposeToMeetWhenScreensharing.",j:u},ea={message:"Received an incorrect value for startActivityOnOpen.",o:"Ensure that startActivityOnOpen is set to true if a mainStageUrl is provided in the call to exposeToMeetWhenScreensharing.",
|
|
8
|
+
j:u};let fa;function ha(a){l.setTimeout(()=>{throw a;},0)};var ia={},w=null;function ja(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let ka=void 0;function x(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var y=x(),z=x("m_m",!0);const A=x("jas",!0);var B;const la=[];la[A]=55;B=Object.freeze(la);var C={};function D(a,b){return b===void 0?a.g!==E&&!!(2&(a.i[A]|0)):!!(2&b)&&a.g!==E}const E={};function F(a){return a!==null&&typeof a==="object"&&!Array.isArray(a)&&a.constructor===Object}function ma(a,b,c){const e=b&512?0:-1,d=a.length;b=b&64?b&256:!!d&&F(a[d-1]);const g=d+(b?-1:0);for(let f=0;f<g;f++)c(f-e,a[f]);if(b){a=a[d-1];for(const f in a)!isNaN(f)&&c(+f,a[f])}}var na={};var G=typeof l.BigInt==="function"&&typeof l.BigInt(0)==="bigint";const oa=Number.MIN_SAFE_INTEGER.toString(),pa=G?BigInt(Number.MIN_SAFE_INTEGER):void 0,qa=Number.MAX_SAFE_INTEGER.toString(),ra=G?BigInt(Number.MAX_SAFE_INTEGER):void 0;function sa(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){const e=a[c],d=b[c];if(e>d)return!1;if(e<d)return!0}};const ta=Number.isFinite;function ua(a){if(a==null)return a;if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;return ta(a)?a|0:void 0}function H(a){if(a!=null&&typeof a!=="string")throw Error();return a};function va(a){return a};function I(a,b,c,e,d){e=e?!!(b&32):void 0;const g=[];let f=a.length,k,h,m,n=!1;if(b&64){if(b&256?(f--,k=a[f],h=f):(h=4294967295,k=void 0),!(d||b&512)){n=!0;var q;m=((q=wa)!=null?q:va)(k?h- -1:b>>16&1023||536870912,-1,a,k);h=m+-1}}else h=4294967295,b&1||(k=f&&a[f-1],F(k)?(f--,h=f,m=0):k=void 0);q=void 0;for(let r=0;r<f;r++){let t=a[r];if(t!=null&&(t=c(t,e))!=null)if(r>=h){var p=void 0;((p=q)!=null?p:q={})[r- -1]=t}else g[r]=t}if(k)for(let r in k)if(a=k[r],a!=null&&(a=c(a,e))!=null)if(p=+r,p<m)g[p+
|
|
9
|
+
-1]=a;else{let t;((t=q)!=null?t:q={})[r]=a}q&&(n?g.push(q):g[h]=q);d&&(g[A]=b&67043905|(q!=null?290:34));return g}function xa(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return(G?a>=pa&&a<=ra:a[0]==="-"?sa(a,oa):sa(a,qa))?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){const b=a[A]|0;return a.length===0&&b&1?void 0:I(a,b,xa,!1,!1)}if(a[z]===C)return ya(a);return}return a}let wa;
|
|
10
|
+
function ya(a){a=a.i;return I(a,a[A]|0,xa,void 0,!1)};let J,za;function Aa(a){switch(typeof a){case "boolean":return J||(J=[0,void 0,!0]);case "number":return a>0?void 0:a===0?za||(za=[0,void 0]):[-a,void 0];case "string":return[0,a];case "object":return a}}function Ba(a,b,c){a=Ca(a,b[0],b[1],c?1:2);b!==J&&c&&(a[A]|=8192);return a}
|
|
11
|
+
function Ca(a,b,c,e){if(a==null){var d=96;c?(a=[c],d|=512):a=[];b&&(d=d&-67043329|(b&1023)<<16)}else{if(!Array.isArray(a))throw Error("narr");d=a[A]|0;8192&d||!(64&d)||2&d||Da();if(d&1024)throw Error("farr");if(d&64)return e!==3||d&16384||(a[A]=d|16384),a;e===1||e===2||(d|=64);if(c&&(d|=512,c!==a[0]))throw Error("mid");a:{c=a;var g=c.length;if(g){var f=g-1;const h=c[f];if(F(h)){d|=256;b=d&512?0:-1;f-=b;if(f>=1024)throw Error("pvtlmt");for(var k in h)if(g=+k,g<f)c[g+b]=h[k],delete h[k];else break;
|
|
12
|
+
d=d&-67043329|(f&1023)<<16;break a}}if(b){k=Math.max(b,g-(d&512?0:-1));if(k>1024)throw Error("spvt");d=d&-67043329|(k&1023)<<16}}}e===3&&(d|=16384);a[A]=d;return a}function Da(){if(y!=null){var a;var b=(a=ka)!=null?a:ka={};a=b[y]||0;a>=5||(b[y]=a+1,b=Error(),ja(b,"incident"),ha(b))}};function K(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){const e=a[A]|0;if(a.length===0&&e&1)return;if(e&2)return a;var c;if(c=b)c=e===0||!!(e&32)&&!(e&64||!(e&16));return c?(a[A]|=34,e&4&&Object.freeze(a),a):I(a,e,K,b!==void 0,!0)}if(a[z]===C)return b=a.i,c=b[A]|0,D(a,c)?a:I(b,c,K,!0,!0)}function L(a){if(a.g!==E)var b=!1;else b=a.i,b=I(b,b[A]|0,K,!0,!0),b[A]&=-3,a.i=b,a.g=void 0,b=!0;if(!b&&D(a,a.i[A]|0))throw Error();};function M(a,b,c){L(a);const e=a.i;N(e,e[A]|0,b,c);return a}function N(a,b,c,e,d){const g=c+(d?0:-1);var f=a.length-1;let k;if(g>=f&&((k=b)!=null?k:b=a[A]|0)&256)return a[f][c]=e,b;if(g<=f)return a[g]=e,b;e!==void 0&&(f=b>>16&1023||536870912,c>=f?e!=null&&(a[f+(d?0:-1)]={[c]:e},b|=256,a[A]=b):a[g]=e);return b}function O(a,b,c,e){L(a);const d=a.i;N(d,d[A]|0,b,(e==="0"?Number(c)===0:c===e)?void 0:c);return a}function P(a,b){2&a&&(a|=16);a=(2&b?a|2:a&-3)|32;return a&=-1025}
|
|
13
|
+
function Ea(a,b){32&b||(a&=-33);return a};var Q=class{constructor(a){this.i=Ca(a,void 0,void 0,3)}toJSON(){var a=ya(this);return a}};Q.prototype[z]=C;Q.prototype.toString=function(){return this.i.toString()};function R(a,b){for(;b>127;)a.g.push(b&127|128),b>>>=7;a.g.push(b)}var Fa=class{constructor(){this.g=[]}length(){return this.g.length}end(){const a=this.g;this.g=[];return a}};function S(a,b){b.length!==0&&(a.l.push(b),a.h+=b.length)}function Ga(a,b){R(a.g,b*8+2);b=a.g.end();S(a,b);b.push(a.h);return b}function Ha(a,b){var c=b.pop();for(c=a.h+a.g.length()-c;c>127;)b.push(c&127|128),c>>>=7,a.h++;b.push(c);a.h++}var Ia=class{constructor(){this.l=[];this.h=0;this.g=new Fa}};function T(){const a=class{constructor(){throw Error();}};Object.setPrototypeOf(a,a.prototype);return a}var U=T(),Ja=T();var V=class{constructor(a,b){this.g=a;a=ba(U);this.h=!!a&&b===a||!1}};function Ka(a,b,c,e,d){b=La(b,e);b!=null&&(c=Ga(a,c),d(b,a),Ha(a,c))}const Ma=new V(Ka,U),Na=new V(Ka,U);var Oa=Symbol(),Pa=Symbol();let Qa,W;
|
|
14
|
+
function X(a){var b=Ra,c=Sa,e=a[Oa];if(e)return e;e={};e.A=a;e.m=Aa(a[0]);var d=a[1];let g=1;d&&d.constructor===Object&&(e.s=d,d=a[++g],typeof d==="function"&&(e.u=!0,Qa!=null||(Qa=d),W!=null||(W=a[g+1]),d=a[g+=2]));const f={};for(;d&&Array.isArray(d)&&d.length&&typeof d[0]==="number"&&d[0]>0;){for(var k=0;k<d.length;k++)f[d[k]]=d;d=a[++g]}for(k=1;d!==void 0;){typeof d==="number"&&(k+=d,d=a[++g]);let n;var h=void 0;d instanceof V?n=d:(n=Ma,g--);let q;if((q=n)==null?0:q.h){d=a[++g];h=a;var m=g;typeof d===
|
|
15
|
+
"function"&&(d=d(),h[m]=d);h=d}d=a[++g];m=k+1;typeof d==="number"&&d<0&&(m-=d,d=a[++g]);for(;k<m;k++){const p=f[k];h?c(e,k,n,h,p):b(e,k,n,p)}}return a[Oa]=e}function La(a,b){if(a instanceof Q)return a.i;if(Array.isArray(a))return Ba(a,b,!1)};function Ra(a,b,c){a[b]=c.g}function Sa(a,b,c,e){let d,g;const f=c.g;a[b]=(k,h,m)=>f(k,h,m,g||(g=X(e).m),d||(d=Ta(e)))}function Ta(a){let b=a[Pa];if(!b){const c=X(a);b=(e,d)=>Ua(e,d,c);a[Pa]=b}return b}function Ua(a,b,c){ma(a,a[A]|0|(c.m[1]?512:0),(e,d)=>{if(d!=null){var g=Va(c,e);g&&g(b,d,e)}})}
|
|
16
|
+
function Va(a,b){var c=a[b];if(c)return c;if(c=a.s)if(c=c[b]){c=Array.isArray(c)?c[0]instanceof V?c:[Na,c]:[c,void 0];var e=c[0].g;if(c=c[1]){const d=Ta(c),g=X(c).m;c=a.u?W(g,d):(f,k,h)=>e(f,k,h,g,d)}else c=e;return a[b]=c}};function Wa(a,b,c){b=b==null||typeof b==="string"?b:void 0;b!=null&&(b=(fa||(fa=new TextEncoder)).encode(b),R(a.g,c*8+2),R(a.g,b.length),S(a,a.g.end()),S(a,b))};function Xa(a){var b=new Ya;if(a!=null){if(!ta(a))throw b=Error("enum"),ja(b,"warning"),b;a|=0}return O(b,1,a,0)}var Ya=class extends Q{};var Za=class extends Q{};var $a=class extends Q{};$a.prototype.h=function(a){return function(){const b=new Ia;Ua(this.i,b,X(a));S(b,b.g.end());const c=new Uint8Array(b.h),e=b.l,d=e.length;let g=0;for(let f=0;f<d;f++){const k=e[f];c.set(k,g);g+=k.length}b.l=[c];return c}}([0,new V(Wa,Ja),-1,[0,function(a,b,c=U){return new V(b,c)}(function(a,b,c,e,d){if(a.g()!==2)return!1;var g=a.h;e=Ba(void 0,e,!0);var f=b[A]|0;if(f&2)throw Error();const k=f&512?na:void 0;if(c===-1)var h=null;else{h=c+(k?0:-1);var m=b.length-1;h>=m&&(f!=null?f:b[A]|0)&256?h=b[m][c]:
|
|
17
|
+
h<=m?h=b[h]:h=void 0}h=Array.isArray(h)?h:B;m=h!==B;if(64&f||!(8192&f)||!m){let n=m=h===B?55:h[A]|0;if(2&n||2&n&&4&n||1024&n||4&n&&!(32&n))h=[...h],m=0,n=P(n,f),f=N(b,f,c,h,k);b=n;b===0&&(b=P(b,f),b|=16);n=Ea((b|1)&-13,f);n!==m&&(h[A]=n)}h.push(e);g.call(a,e,d);return!0},function(a,b,c,e,d){if(Array.isArray(b))for(let m=0;m<b.length;m++){var g=a,f=c,k=d,h=La(b[m],e);h!=null&&(f=Ga(g,f),k(h,g),Ha(g,f))}}),[0,new V(function(a,b,c){b=ua(b);if(b!=null)if(b=parseInt(b,10),R(a.g,c*8),a=a.g,c=b,c>=0)R(a,
|
|
18
|
+
c);else{for(b=0;b<9;b++)a.g.push(c&127|128),c>>=7;a.g.push(1)}},T()),new V(Wa,Ja),-1]],new V(function(a,b,c){b=b==null||typeof b==="boolean"?b:typeof b==="number"?!!b:void 0;b!=null&&(R(a.g,c*8),a.g.g.push(b?1:0))},T())]);function ab(){let a,b;const c=(b=(a=(new URL(bb||window.location.href)).searchParams.get("meet_capture_handle_origins"))==null?void 0:a.split(",").filter(e=>{try{return(new URL(e)).origin.endsWith(".google.com")}catch(d){return!1}}))!=null?b:[];return c.length===0?cb:c}let bb="";const cb=["https://meet.google.com"];for(var db={exposeToMeetWhenScreensharing:function(a){var b=a.v,c=a.cloudProjectNumber,e=a.additionalData,d=a.mainStageUrl,g=a.sidePanelUrl;a=a.startActivityOnOpen;c||v(ca);var f=new $a;c=M(f,2,H(c));b&&M(c,1,H(b));b=[];e&&!a&&v(da);d&&!a&&v(ea);if(g){f=b.push;var k=Xa(1);g=O(k,2,H(g),"");g=O(g,3,H(e),"");f.call(b,g)}d&&(g=b.push,f=Xa(2),d=O(f,2,H(d),""),e=O(d,3,H(e),""),g.call(b,e));{e=new Za;d=b;L(e);const r=e.i;let t=r[A]|0;if(d==null)N(r,t,1);else{g=b=d[A]|0;k=(f=!!(2&b)&&!!(4&b)||!!(1024&b))||
|
|
19
|
+
Object.isFrozen(d);var h=!0,m=!0;for(let aa=0;aa<d.length;aa++){var n=d[aa];f||(n=D(n),h&&(h=!n),m&&(m=n))}f||(b=h?13:5,b=m?b|16:b&-17);k&&b===g||(d=[...d],g=0,b=P(b,t),b=Ea(b,t));b!==g&&(d[A]=b);N(r,t,1,d)}}e==null&&(e=void 0);M(c,3,e);if(a!=null&&typeof a!=="boolean"){var q=typeof a;throw Error(`Expected boolean but got ${q!="object"?q:a?Array.isArray(a)?"array":q:"null"}: ${a}`);}M(c,4,a);a=c.h();var p;p===void 0&&(p=0);if(!w)for(w={},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),
|
|
20
|
+
e=["+/=","+/","-_=","-_.","-_"],d=0;d<5;d++)for(b=c.concat(e[d].split("")),ia[d]=b,g=0;g<b.length;g++)f=b[g],w[f]===void 0&&(w[f]=g);p=ia[p];c=Array(Math.floor(a.length/3));e=p[64]||"";for(d=b=0;b<a.length-2;b+=3)k=a[b],h=a[b+1],f=a[b+2],g=p[k>>2],k=p[(k&3)<<4|h>>4],h=p[(h&15)<<2|f>>6],f=p[f&63],c[d++]=g+k+h+f;g=0;f=e;switch(a.length-b){case 2:g=a[b+1],f=p[(g&15)<<2]||e;case 1:a=a[b],c[d]=p[a>>2]+p[(a&3)<<4|g>>4]+f+e}a=c.join("");p=window;p.top===p.self&&(a={handle:a,permittedOrigins:ab(),exposeOrigin:!0},
|
|
21
|
+
(q=p.navigator.mediaDevices)==null||q.setCaptureHandleConfig(a))}},eb=["meet","addon","screensharing"],Y=l,Z;eb.length&&(Z=eb.shift());)eb.length||db===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=db;}).apply(topLevel);export const meet = topLevel.meet;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@googleworkspace/meet-addons",
|
|
3
3
|
"description": "The Google Meet add-ons SDK lets you embed your app into Google Meet as an add-on where users can discover, share, and collaborate in the app without leaving Meet",
|
|
4
|
-
"version": "1.2.0-dev-
|
|
4
|
+
"version": "1.2.0-dev-744092633",
|
|
5
5
|
"repository": "googleworkspace/meet",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"homepage": "https://developers.google.com/meet/add-ons/guides/overview",
|