@googleworkspace/meet-addons 0.9.1-670722405 → 0.10.0-671117181
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.d.ts +1 -91
- package/meet.addons.js +63 -62
- package/package.json +1 -1
package/meet.addons.d.ts
CHANGED
|
@@ -2,42 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
// Original file: live_sharing.v2.types.d.ts
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* Represents that a failure event occurred before, during, or after a co-activity.
|
|
7
|
-
*
|
|
8
|
-
* - `FAILURE_EVENT_UNSPECIFIED`: Failure event that's not specified in the
|
|
9
|
-
* predefined types.
|
|
10
|
-
*
|
|
11
|
-
* - `FAILURE_USER_INSUFFICIENT_TIER`: Failure due to the user membership tier not
|
|
12
|
-
* having sufficient privileges. For example, user not having a premium
|
|
13
|
-
* membership for the add-on app.
|
|
14
|
-
*
|
|
15
|
-
* - `FAILURE_USER_UNKNOWN`: Failure due to user sign-in or a related failure.
|
|
16
|
-
*
|
|
17
|
-
* - `FAILURE_USER_CANCELLED`: Failure due to cancellation of the operation by the
|
|
18
|
-
* user.
|
|
19
|
-
*
|
|
20
|
-
* - `FAILURE_USER_UNAUTHORIZED`: Failure due to the user being in the wrong locale
|
|
21
|
-
* or age group, etc., effectively being an unauthorized user for the co-activity.
|
|
22
|
-
*
|
|
23
|
-
* - `FAILURE_APP_GENERIC_ERROR`: Failure due to a generic error with the add-on app.
|
|
24
|
-
*
|
|
25
|
-
* - `FAILURE_APP_NETWORK_CONNECTIVITY`: Failure due to a network connectivity issue
|
|
26
|
-
* between the add-on app and its servers.
|
|
27
|
-
*
|
|
28
|
-
* - `FAILURE_APP_STARTUP`: Failure due to an error in starting the add-on app.
|
|
29
|
-
*/
|
|
30
|
-
export type LiveSharingFailureEventType =
|
|
31
|
-
| 'FAILURE_EVENT_UNSPECIFIED'
|
|
32
|
-
| 'FAILURE_USER_INSUFFICIENT_TIER'
|
|
33
|
-
| 'FAILURE_USER_UNKNOWN'
|
|
34
|
-
| 'FAILURE_USER_CANCELLED'
|
|
35
|
-
| 'FAILURE_USER_UNAUTHORIZED'
|
|
36
|
-
| 'FAILURE_APP_GENERIC_ERROR'
|
|
37
|
-
| 'FAILURE_APP_NETWORK_CONNECTIVITY'
|
|
38
|
-
| 'FAILURE_APP_STARTUP';
|
|
39
|
-
|
|
40
|
-
|
|
41
5
|
|
|
42
6
|
/**
|
|
43
7
|
* Binary-encoded state for CoDoing experiences.
|
|
@@ -321,14 +285,6 @@ export type FrameOpenReason =
|
|
|
321
285
|
| 'START_ACTIVITY'
|
|
322
286
|
| 'JOIN_ACTIVITY';
|
|
323
287
|
|
|
324
|
-
/**
|
|
325
|
-
* The different reasons why the activity was ended:
|
|
326
|
-
*
|
|
327
|
-
* - `END_REASON_UNSPECIFIED`: The reason for ending the activity is
|
|
328
|
-
* unspecified.
|
|
329
|
-
*/
|
|
330
|
-
export type EndActivityReason = 'END_REASON_UNSPECIFIED';
|
|
331
|
-
|
|
332
288
|
/**
|
|
333
289
|
* A client-initiated message sent from one add-on frame to another.
|
|
334
290
|
*/
|
|
@@ -368,6 +324,7 @@ export type ErrorType =
|
|
|
368
324
|
| 'MissingUrlParameter'
|
|
369
325
|
| 'NeedsMainStageContext'
|
|
370
326
|
| 'NeedsSidePanelContext'
|
|
327
|
+
| 'NoActivityFound'
|
|
371
328
|
| 'NotSupportedInMeetCall'
|
|
372
329
|
| 'NotSupportedInStandalone'
|
|
373
330
|
| 'RequiresEapEnrollment'
|
|
@@ -414,26 +371,6 @@ export interface ActivityStartingState {
|
|
|
414
371
|
additionalData?: string;
|
|
415
372
|
}
|
|
416
373
|
|
|
417
|
-
/**
|
|
418
|
-
* Starting state of an individual add-on frame.
|
|
419
|
-
* @ignore Exclusively intended for use by the rooms standalone add-on.
|
|
420
|
-
*/
|
|
421
|
-
export interface AddonStartingState {
|
|
422
|
-
/**
|
|
423
|
-
* The URL that the side panel opens for users starting the add-on.
|
|
424
|
-
* The length of this URL must be less than 512 characters.
|
|
425
|
-
*/
|
|
426
|
-
sidePanelUrl?: string;
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* Data internal to the add-on that it can use to initialize itself. Useful
|
|
430
|
-
* for communicating application-specific state to users joining the
|
|
431
|
-
* activity that cannot be stored in the URLs.
|
|
432
|
-
* The length of this string must be less than 4,096 characters.
|
|
433
|
-
*/
|
|
434
|
-
additionalData?: string;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
374
|
/**
|
|
438
375
|
* The client object that an add-on uses to communicate with Meet web.
|
|
439
376
|
*/
|
|
@@ -464,11 +401,6 @@ export interface MeetAddonClient {
|
|
|
464
401
|
eventHandler: AddonCallbacks[T],
|
|
465
402
|
): void;
|
|
466
403
|
|
|
467
|
-
/**
|
|
468
|
-
* Retrieves information about the Meet platform in which the add-on is
|
|
469
|
-
* running.
|
|
470
|
-
*/
|
|
471
|
-
getMeetPlatformInfo(): Promise<MeetPlatformInfo>;
|
|
472
404
|
/**
|
|
473
405
|
* Retrieves the action causing the add-on frame to be opened.
|
|
474
406
|
*/
|
|
@@ -547,18 +479,6 @@ export interface MeetMainStageClient extends MeetAddonClient {
|
|
|
547
479
|
loadSidePanel(): Promise<void>;
|
|
548
480
|
}
|
|
549
481
|
|
|
550
|
-
/**
|
|
551
|
-
* The `MeetAddonClient` for the rooms standalone component of an add-on.
|
|
552
|
-
* @ignore Exclusively intended for use by the rooms standalone add-on.
|
|
553
|
-
*/
|
|
554
|
-
export interface MeetRoomsStandaloneClient extends MeetAddonClient {
|
|
555
|
-
/**
|
|
556
|
-
* Sets or updates information about the initial state of the add-on that's
|
|
557
|
-
* used when the add-on is transferred into a Meet call.
|
|
558
|
-
*/
|
|
559
|
-
setAddonStartingState(addonStartingState: AddonStartingState): Promise<void>;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
482
|
/**
|
|
563
483
|
* The AddonSession interface. Used to interact with Meet.
|
|
564
484
|
*/
|
|
@@ -575,16 +495,6 @@ export interface AddonSession {
|
|
|
575
495
|
): Promise<CoWatchingClient>;
|
|
576
496
|
}
|
|
577
497
|
|
|
578
|
-
/**
|
|
579
|
-
* Information about the Meet platform in which the add-on is running.
|
|
580
|
-
*/
|
|
581
|
-
export interface MeetPlatformInfo {
|
|
582
|
-
/**
|
|
583
|
-
* Whether the meeting is running on Meet Rooms hardware.
|
|
584
|
-
*/
|
|
585
|
-
isMeetHardware: boolean;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
498
|
|
|
589
499
|
// Original file: guaranteed_delivery_types.d.ts
|
|
590
500
|
|
package/meet.addons.js
CHANGED
|
@@ -5,67 +5,68 @@ a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=
|
|
|
5
5
|
SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
7
|
var l=this||self,ea=function(a,b){a:{var c=["CLOSURE_FLAGS"];for(var d=l,e=0;e<c.length;e++)if(d=d[c[e]],d==null){c=null;break a}c=d}a=c&&c[a];return a!=null?a:b},fa=function(a,b,c){return a.call.apply(a.bind,arguments)},ha=function(a,b,c){ha=fa;return ha.apply(null,arguments)},ia=function(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)}},ja=function(a,b){function c(){}c.prototype=b.prototype;a.sb=b.prototype;a.prototype=
|
|
8
|
-
new c;a.prototype.constructor=a;a.ob=function(d,e,g){for(var f=Array(arguments.length-2),h=2;h<arguments.length;h++)f[h-2]=arguments[h];return b.prototype[e].apply(d,f)}};function ka(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,ka);else{const c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}ja(ka,Error);ka.prototype.name="CustomError";function m(a){l.setTimeout(()=>{throw a;},0)};var la=ea(610401301,!1),ma=ea(645172343,!0);var na;const oa=l.navigator;na=oa?oa.userAgentData||null:null;function pa(a){return la?na?na.brands.some(({brand:b})=>b&&b.indexOf(a)!=-1):!1:!1}function p(a){var b;a:{if(b=l.navigator)if(b=b.userAgent)break a;b=""}return b.indexOf(a)!=-1};function q(){return la?!!na&&na.brands.length>0:!1}function qa(){return q()?pa("Chromium"):(p("Chrome")||p("CriOS"))&&!(q()?0:p("Edge"))||p("Silk")};function ra(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};!p("Android")||qa();qa();p("Safari")&&(qa()||(q()?0:p("Coast"))||(q()?0:p("Opera"))||(q()?0:p("Edge"))||(q()?pa("Microsoft Edge"):p("Edg/"))||q()&&pa("Opera"));function sa(a){let b="",c=0;const d=a.length-10240;for(;c<d;)b+=String.fromCharCode.apply(null,a.subarray(c,c+=10240));b+=String.fromCharCode.apply(null,c?a.subarray(c):a);return btoa(b)}const ta=/[-_.]/g,ua={"-":"+",_:"/",".":"="};function va(a){return ua[a]||""}function wa(a){return a!=null&&a instanceof Uint8Array}var xa={};let ya;function za(a){if(a!==xa)throw Error("illegal external caller");}var Ba=function(){return ya||(ya=new Aa(null,xa))},Aa=class{constructor(a,b){za(b);this.Z=a;if(a!=null&&a.length===0)throw Error("ByteString should be constructed with non-empty values");}};var Ca=function(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let Da;function Ea(){const a=Error();Ca(a,"incident");m(a)}function Fa(a){a=Error(a);Ca(a,"warning");return a};function Ga(){return typeof BigInt==="function"};function Ha(a){return Array.prototype.slice.call(a)};var r=Symbol(),
|
|
8
|
+
new c;a.prototype.constructor=a;a.ob=function(d,e,g){for(var f=Array(arguments.length-2),h=2;h<arguments.length;h++)f[h-2]=arguments[h];return b.prototype[e].apply(d,f)}};function ka(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,ka);else{const c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}ja(ka,Error);ka.prototype.name="CustomError";function m(a){l.setTimeout(()=>{throw a;},0)};var la=ea(610401301,!1),ma=ea(645172343,!0);var na;const oa=l.navigator;na=oa?oa.userAgentData||null:null;function pa(a){return la?na?na.brands.some(({brand:b})=>b&&b.indexOf(a)!=-1):!1:!1}function p(a){var b;a:{if(b=l.navigator)if(b=b.userAgent)break a;b=""}return b.indexOf(a)!=-1};function q(){return la?!!na&&na.brands.length>0:!1}function qa(){return q()?pa("Chromium"):(p("Chrome")||p("CriOS"))&&!(q()?0:p("Edge"))||p("Silk")};function ra(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};!p("Android")||qa();qa();p("Safari")&&(qa()||(q()?0:p("Coast"))||(q()?0:p("Opera"))||(q()?0:p("Edge"))||(q()?pa("Microsoft Edge"):p("Edg/"))||q()&&pa("Opera"));function sa(a){let b="",c=0;const d=a.length-10240;for(;c<d;)b+=String.fromCharCode.apply(null,a.subarray(c,c+=10240));b+=String.fromCharCode.apply(null,c?a.subarray(c):a);return btoa(b)}const ta=/[-_.]/g,ua={"-":"+",_:"/",".":"="};function va(a){return ua[a]||""}function wa(a){return a!=null&&a instanceof Uint8Array}var xa={};let ya;function za(a){if(a!==xa)throw Error("illegal external caller");}var Ba=function(){return ya||(ya=new Aa(null,xa))},Aa=class{constructor(a,b){za(b);this.Z=a;if(a!=null&&a.length===0)throw Error("ByteString should be constructed with non-empty values");}};var Ca=function(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let Da;function Ea(){const a=Error();Ca(a,"incident");m(a)}function Fa(a){a=Error(a);Ca(a,"warning");return a};function Ga(){return typeof BigInt==="function"};function Ha(a){return Array.prototype.slice.call(a)};var r=Symbol(),Ja=Symbol(),Ka=Symbol();function La(a,b){b[r]=(a|0)&-14591}function Ma(a,b){b[r]=(a|34)&-14557};var Na={},Oa={};function Pa(a){return!(!a||typeof a!=="object"||a.rb!==Oa)}function Qa(a){return a!==null&&typeof a==="object"&&!Array.isArray(a)&&a.constructor===Object}function Ra(a,b,c){if(a!=null)if(typeof a==="string")a=a?new Aa(a,xa):Ba();else if(a.constructor!==Aa)if(wa(a))a=a.length?new Aa(c?a:new Uint8Array(a),xa):Ba();else{if(!b)throw Error();a=void 0}return a}function Sa(a){return!Array.isArray(a)||a.length?!1:(a[r]|0)&1?!0:!1}var Ta;const Ua=[];Ua[r]=55;Ta=Object.freeze(Ua);
|
|
9
9
|
function Va(a){if(a&2)throw Error();}var Wa=Object.freeze({});Object.freeze({});var Xa=Object.freeze({});function Ya(a){a.qb=!0;return a};var Za=Ya(a=>typeof a==="number"),$a=Ya(a=>typeof a==="string"),ab=Ya(a=>typeof a==="boolean");var bb=typeof l.BigInt==="function"&&typeof l.BigInt(0)==="bigint";var hb=Ya(a=>bb?a>=cb&&a<=db:a[0]==="-"?eb(a,fb):eb(a,gb));const fb=Number.MIN_SAFE_INTEGER.toString(),cb=bb?BigInt(Number.MIN_SAFE_INTEGER):void 0,gb=Number.MAX_SAFE_INTEGER.toString(),db=bb?BigInt(Number.MAX_SAFE_INTEGER):void 0;function eb(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 t=0,v=0;function ib(a){const b=a>>>0;t=b;v=(a-b)/4294967296>>>0}function jb(a){if(a<0){ib(0-a);const [b,c]=kb(t,v);t=b>>>0;v=c>>>0}else ib(a)}function lb(a,b){b>>>=0;a>>>=0;if(b<=2097151)var c=""+(4294967296*b+a);else Ga()?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+mb(c)+mb(a));return c}
|
|
10
|
-
function mb(a){a=String(a);return"0000000".slice(a.length)+a}function kb(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
function
|
|
14
|
-
e));v*=1E6;t=t*1E6+g;t>=4294967296&&(v+=Math.trunc(t/4294967296),v>>>=0,t>>>=0)}if(b){const [d,e]=kb(t,v);t=d;v=e}}a=t;b=v;if(b&2147483648)if(Ga())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{const [c,d]=kb(a,b);a="-"+lb(c,d)}else a=lb(a,b)}return a}function
|
|
15
|
-
function
|
|
16
|
-
function y(a,b,c,d,e){const g=b>>14&1023||536870912;if(c>=g||e&&!ma){let f=b;if(b&256)e=a[a.length-1];else{if(d==null)return f;e=a[g+(+!!(b&512)-1)]={};f|=256}e[c]=d;c<g&&(a[c+(+!!(b&512)-1)]=void 0);f!==b&&(a[r]=f);return f}a[c+(+!!(b&512)-1)]=d;b&256&&(a=a[a.length-1],c in a&&delete a[c]);return b}var A=function(a,b,c,d){c=z(a,d)===c?c:-1;return
|
|
17
|
-
function B(a,b,c,d){const e=a.h;let g=e[r];Va(g);y(e,g,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}var z=function(a,b){a=a.h;return Vb(
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
a.L(this,a.D,a.F,!0):a.Xa?a.L(this,a.F,void 0===Wa?2:4,!0):a.L(this,a.F,a.defaultValue,!0);return a.pb&&b==null?a.defaultValue:b}hasExtension(a){a.D?a=
|
|
23
|
-
function
|
|
24
|
-
0,n);else if(k||g||f)e.length=n;f&&e.push(f)}k=e}else k=a}return k};function
|
|
25
|
-
|
|
26
|
-
message:"This method is not supported in standalone mode.",g:"Do not call this method in standalone mode."},
|
|
27
|
-
g:"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."},
|
|
28
|
-
message:"Origin of the ActivityStartingState iframeURLs does not match the origin of the URLs provided in the Add-on manifest.",g:"Ensure that the ActivityStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest."},
|
|
29
|
-
|
|
30
|
-
message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,g:"Ensure the type of the argument provided matches the expected type."}),
|
|
31
|
-
g:"Send one of the available commands in the frame message."},
|
|
32
|
-
message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",g:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},
|
|
33
|
-
g:"Only instantiate the AddonSession once."},
|
|
34
|
-
g:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest."},
|
|
35
|
-
function
|
|
36
|
-
function
|
|
37
|
-
g:"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}.`,g:"No further information is available."};case 0:return
|
|
38
|
-
message:`Could not connect to ${a} channel.`,g:"No further information is available."}}return c;default:return
|
|
39
|
-
(g===1||g===4&&32&f))){
|
|
40
|
-
u[r];Va(G);if(a==null)y(u,G,1);else{var c=a,d;a=((d=
|
|
41
|
-
typeof a.additionalData!=="string")throw new
|
|
42
|
-
this.context=a;this.Da={};
|
|
43
|
-
c:"UNKNOWN"}async getActivityStartingState(){var a=(await
|
|
44
|
-
|
|
45
|
-
e,!1);this.port1={};this.port2={postMessage:function(){g.postMessage(f,h)}}});if(typeof a!=="undefined"){var b=new a,c={},d=c;b.port1.onmessage=function(){if(c.next!==void 0){c=c.next;var e=c.ua;c.ua=null;e()}};return function(e){d.next={ua:e};d=d.next;b.port2.postMessage(0)}}return function(e){l.setTimeout(e,0)}};class
|
|
46
|
-
var
|
|
47
|
-
R.prototype.cancel=function(a){if(this.l==0){var b=new S(a);
|
|
48
|
-
var
|
|
49
|
-
h);k===void 0&&h instanceof S?f(h):g(k)}catch(n){f(n)}}:f});e.v.B=a;
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
{a.j.delete(b);const g=
|
|
55
|
-
this.ta&&this.Ca)c.resolve(this.Ya);else if(this.I.add(c),
|
|
56
|
-
async function
|
|
57
|
-
var
|
|
58
|
-
W,d=new Q;b=C(d,15,O,b);await c(a,T(b))},
|
|
59
|
-
` ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=
|
|
60
|
-
|
|
61
|
-
class
|
|
62
|
-
function
|
|
63
|
-
const
|
|
64
|
-
function
|
|
65
|
-
|
|
66
|
-
|
|
10
|
+
function mb(a){a=String(a);return"0000000".slice(a.length)+a}function kb(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};const nb=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function rb(a){const b=typeof a;switch(b){case "bigint":return!0;case "number":return Number.isFinite(a)}return b!=="string"?!1:nb.test(a)}function w(a){if(a!=null){if(!Number.isFinite(a))throw Fa("enum");a|=0}return a}
|
|
11
|
+
function sb(a){if(!rb(a))throw Fa("int64");switch(typeof a){case "string":return tb(a);case "bigint":var b=a=BigInt.asIntN(64,a);if($a(b)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(b))throw Error(String(b));}else if(Za(b)&&!Number.isSafeInteger(b))throw Error(String(b));a=bb?BigInt(a):ab(a)?a?"1":"0":$a(a)?a.trim()||"0":String(a);return a;default:return ub(a)}}
|
|
12
|
+
function ub(a){a=Math.trunc(a);if(!Number.isSafeInteger(a)){jb(a);var b=t,c=v;if(a=c&2147483648)b=~b+1>>>0,c=~c>>>0,b==0&&(c=c+1>>>0);b=c*4294967296+(b>>>0);a=a?-b:b}return a}
|
|
13
|
+
function tb(a){var b=Math.trunc(Number(a));if(Number.isSafeInteger(b))return String(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));if(!(a[0]==="-"?a.length<20||a.length===20&&Number(a.substring(0,7))>-922337:a.length<19||a.length===19&&Number(a.substring(0,6))<922337)){if(a.length<16)jb(Number(a));else if(Ga())a=BigInt(a),t=Number(a&BigInt(4294967295))>>>0,v=Number(a>>BigInt(32)&BigInt(4294967295));else{b=+(a[0]==="-");v=t=0;const c=a.length;for(let d=0+b,e=(c-b)%6+b;e<=c;d=e,e+=6){const g=Number(a.slice(d,
|
|
14
|
+
e));v*=1E6;t=t*1E6+g;t>=4294967296&&(v+=Math.trunc(t/4294967296),v>>>=0,t>>>=0)}if(b){const [d,e]=kb(t,v);t=d;v=e}}a=t;b=v;if(b&2147483648)if(Ga())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{const [c,d]=kb(a,b);a="-"+lb(c,d)}else a=lb(a,b)}return a}function vb(a){if(a!=null&&typeof a!=="string")throw Error();return a}function wb(a,b,c){if(a!=null&&typeof a==="object"&&a.na===Na)return a;if(Array.isArray(a)){var d=a[r]|0,e=d;e===0&&(e|=c&32);e|=c&2;e!==d&&(a[r]=e);return new b(a)}};var Bb=function(a){var b=xb(a);if(b)return b;if(Math.random()>.01)return a;if(yb===void 0)if(typeof Proxy!=="function")yb=null;else try{yb=Proxy.toString().indexOf("[native code]")!==-1?Proxy:null}catch{yb=null}b=yb;if(!b)return a;b=new b(a,{set(c,d,e){zb();c[d]=e;return!0}});Ab(a,b);return b};function zb(){Ea()}let Cb=void 0,Db=void 0;var xb=function(a){let b;return(b=Cb)==null?void 0:b.get(a)};function Ab(a,b){(Cb||(Cb=new WeakMap)).set(a,b);(Db||(Db=new WeakMap)).set(b,a)}let yb=void 0;let Eb;function Fb(a,b){Eb=b;a=new a(b);Eb=void 0;return a};function Gb(a,b){return Hb(b)}function Hb(a){switch(typeof a){case "number":return isFinite(a)?a:String(a);case "bigint":return hb(a)?Number(a):String(a);case "boolean":return a?1:0;case "object":if(a)if(Array.isArray(a)){if(Sa(a))return}else{if(wa(a))return sa(a);if(a instanceof Aa){const b=a.Z;return b==null?"":typeof b==="string"?b:a.Z=sa(b)}}}return a};function Ib(a,b,c){a=Ha(a);var d=a.length;const e=b&256?a[d-1]:void 0;d+=e?-1:0;for(b=b&512?1:0;b<d;b++)a[b]=c(a[b]);if(e){b=a[b]={};for(const g in e)b[g]=c(e[g])}return a}function Jb(a,b,c,d,e){if(a!=null){if(Array.isArray(a))a=Sa(a)?void 0:e&&(a[r]|0)&2?a:Kb(a,b,c,d!==void 0,e);else if(Qa(a)){const g={};for(let f in a)g[f]=Jb(a[f],b,c,d,e);a=g}else a=b(a,d);return a}}
|
|
15
|
+
function Kb(a,b,c,d,e){const g=d||c?a[r]|0:0;d=d?!!(g&32):void 0;a=Ha(a);for(let f=0;f<a.length;f++)a[f]=Jb(a[f],b,c,d,e);c&&c(g,a);return a}function Lb(a){return a.na===Na?a.toJSON():Hb(a)};function Mb(a,b,c=Ma){if(a!=null){if(a instanceof Uint8Array)return b?a:new Uint8Array(a);if(Array.isArray(a)){var d=a[r]|0;if(d&2)return a;b&&(b=d===0||!!(d&32)&&!(d&64||!(d&16)));return b?(a[r]=(d|34)&-12293,a):Kb(a,Mb,d&4?Ma:c,!0,!0)}a.na===Na&&(c=a.h,d=c[r],a=d&2?a:Fb(a.constructor,Nb(c,d,!0)));return a}}function Nb(a,b,c){const d=c||b&2?Ma:La,e=!!(b&32);a=Ib(a,b,g=>Mb(g,e,d));a[r]=a[r]|32|(c?2:0);return a}function Ob(a){const b=a.h,c=b[r];return c&2?Fb(a.constructor,Nb(b,c,!1)):a};var Pb=function(a,b){a=a.h;return x(a,a[r],b)};function Qb(a,b,c,d){b=d+(+!!(b&512)-1);if(!(b<0||b>=a.length||b>=c))return a[b]}var x=function(a,b,c,d){if(c===-1)return null;const e=b>>14&1023||536870912;if(c>=e){if(b&256)return a[a.length-1][c]}else{var g=a.length;if(d&&b&256&&(d=a[g-1][c],d!=null)){if(Qb(a,b,e,c)&&Ja!=null){var f;a=(f=Da)!=null?f:Da={};f=a[Ja]||0;f>=4||(a[Ja]=f+1,Ea())}return d}return Qb(a,b,e,c)}},Rb=function(a,b,c){const d=a.h;let e=d[r];Va(e);y(d,e,b,c);return a};
|
|
16
|
+
function y(a,b,c,d,e){const g=b>>14&1023||536870912;if(c>=g||e&&!ma){let f=b;if(b&256)e=a[a.length-1];else{if(d==null)return f;e=a[g+(+!!(b&512)-1)]={};f|=256}e[c]=d;c<g&&(a[c+(+!!(b&512)-1)]=void 0);f!==b&&(a[r]=f);return f}a[c+(+!!(b&512)-1)]=d;b&256&&(a=a[a.length-1],c in a&&delete a[c]);return b}var A=function(a,b,c,d){c=z(a,d)===c?c:-1;return Sb(a,b,c)!==void 0};function Tb(a){return!!(2&a)&&!!(4&a)||!!(2048&a)}
|
|
17
|
+
function B(a,b,c,d){const e=a.h;let g=e[r];Va(g);y(e,g,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}var z=function(a,b){a=a.h;return Ub(Vb(a),a,a[r],b)};function Vb(a){let b;return(b=a[Ka])!=null?b:a[Ka]=new Map}function Ub(a,b,c,d){let e=a.get(d);if(e!=null)return e;e=0;for(let g=0;g<d.length;g++){const f=d[g];x(b,c,f)!=null&&(e!==0&&(c=y(b,c,e)),e=f)}a.set(d,e);return e}function Sb(a,b,c,d){a=a.h;let e=a[r];const g=x(a,e,c,d);b=wb(g,b,e);b!==g&&b!=null&&y(a,e,c,b,d);return b}
|
|
18
|
+
var Wb=function(a,b,c){b=Sb(a,b,c,!1);if(b==null)return b;a=a.h;let d=a[r];if(!(d&2)){const e=Ob(b);e!==b&&(b=e,y(a,d,c,b,!1))}return b},Xb=function(a,b,c){c==null&&(c=void 0);return Rb(a,b,c)},C=function(a,b,c,d){d==null&&(d=void 0);a:{const f=a.h;var e=f[r];Va(e);if(d==null){var g=Vb(f);if(Ub(g,f,e,c)===b)g.set(c,0);else break a}else{g=f;const h=Vb(g),k=Ub(h,g,e,c);k!==b&&(k&&(e=y(g,e,k)),h.set(c,b))}y(f,e,b,d)}return a};function Yb(a,b){a=(2&b?a|2:a&-3)|32;return a&=-2049}
|
|
19
|
+
function Zb(a,b,c){32&b&&c||(a&=-33);return a}
|
|
20
|
+
var $b=function(a){a=Pb(a,1);a!=null&&(typeof a==="bigint"?hb(a)?a=Number(a):(a=BigInt.asIntN(64,a),a=hb(a)?Number(a):String(a)):a=rb(a)?typeof a==="number"?ub(a):tb(a):void 0);return a!=null?a:0},D=function(a,b){a=Pb(a,b);a=a==null||typeof a==="string"?a:void 0;return a!=null?a:""},E=function(a,b){a=Pb(a,b);a=a==null?a:Number.isFinite(a)?a|0:void 0;return a!=null?a:0},F=function(a,b,c,d){c=z(a,d)===c?c:-1;return Wb(a,b,c)},H=function(a,b,c){return B(a,b,vb(c),"")};let I;
|
|
21
|
+
var bc=function(a){try{return I=!0,JSON.stringify(ac(a),Gb)}finally{I=!1}},J=class{constructor(a){a:{a==null&&(a=Eb);Eb=void 0;if(a==null){var b=96;a=[]}else{if(!Array.isArray(a))throw Error("narr");b=a[r]|0;if(b&2048)throw Error("farr");if(b&64)break a;var c=a;b|=64;var d=c.length;if(d&&(--d,Qa(c[d]))){b|=256;c=d-(+!!(b&512)-1);if(c>=1024)throw Error("pvtlmt");b=b&-16760833|(c&1023)<<14}}a[r]=b}this.h=a}toJSON(){return ac(this)}getExtension(a){const b=a.D?a.Xa?a.L(this,a.D,a.F,void 0===Wa?2:4,!0):
|
|
22
|
+
a.L(this,a.D,a.F,!0):a.Xa?a.L(this,a.F,void 0===Wa?2:4,!0):a.L(this,a.F,a.defaultValue,!0);return a.pb&&b==null?a.defaultValue:b}hasExtension(a){a.D?a=Sb(this,a.D,a.F,!0)!==void 0:(a=a.D?a.L(this,a.D,a.F,!0):a.L(this,a.F,null,!0),a=(a===null?void 0:a)!==void 0);return a}clone(){const a=this.h;return Fb(this.constructor,Nb(a,a[r],!1))}};J.prototype.na=Na;J.prototype.toString=function(){try{return I=!0,ac(this).toString()}finally{I=!1}};
|
|
23
|
+
function ac(a){a=I?a.h:Kb(a.h,Lb,void 0,void 0,!1);{var b=!I;let n=a.length;if(n){var c=a[n-1],d=Qa(c);d?n--:c=void 0;var e=a;if(d){b:{var g=c;var f={};d=!1;if(g)for(var h in g){if(isNaN(+h)){f[h]=g[h];continue}let u=g[h];Array.isArray(u)&&(Sa(u)||Pa(u)&&u.size===0)&&(u=null);u==null&&(d=!0);u!=null&&(f[h]=u)}if(d){for(let u in f)break b;f=null}else f=g}g=f==null?c!=null:f!==c}for(;n>0;n--){h=e[n-1];if(!(h==null||Sa(h)||Pa(h)&&h.size===0))break;var k=!0}if(e!==a||g||k){if(!b)e=Array.prototype.slice.call(e,
|
|
24
|
+
0,n);else if(k||g||f)e.length=n;f&&e.push(f)}k=e}else k=a}return k};function cc(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[r]|=32;b=Fb(a,b)}return b}};var dc=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[r]|=34;return new a(b)}}(class extends J{});var ec=class extends J{setSeconds(a){return B(this,1,a==null?a:sb(a),"0")}};var gc=class extends J{ya(){return z(this,fc)}},fc=[2,3];var hc=class extends J{};var K=class extends Error{constructor({errorType:a,message:b,g:c}){super(`Meet Add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},ic={errorType:"InternalError",message:"An unexpected error has occurred.",g:"No further information is available."},L={errorType:"InternalError",message:"An unexpected error has occurred.",g:"No further information is available."},jc={errorType:"MissingUrlParameter",message:"Missing required Meet SDK URL parameter",g:"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
|
+
kc={errorType:"NeedsMainStageContext",message:"This method can only be invoked if the addon is running in the main stage.",g:"Use getFrameType to check whether the addon is running in the main stage before invoking this method."},lc={errorType:"NeedsSidePanelContext",message:"This method can only be invoked if the addon is running in the side panel.",g:"Use getFrameType to check whether the addon is running in the side panel before invoking this method."},mc={errorType:"NotSupportedInStandalone",
|
|
26
|
+
message:"This method is not supported in standalone mode.",g:"Do not call this method in standalone mode."},nc={errorType:"InternalError",message:"The frame type URL parameter is set to an unexpected value.",g:"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)."},oc={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.",
|
|
27
|
+
g:"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."},pc={errorType:"DestinationNotReady",message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",g:"Make sure the destination frame has connected before sending messages to it."},qc={errorType:"InvalidActivityStartingState",
|
|
28
|
+
message:"Origin of the ActivityStartingState iframeURLs does not match the origin of the URLs provided in the Add-on manifest.",g:"Ensure that the ActivityStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest."},rc={errorType:"ActivityStartingStateMissingAttributes",message:"The supplied ActivityStartingState object does not contain any recognized attributes.",g:"Ensure that the ActivityStartingState object contains at least one of the following attributes: mainStageUrl, sidePanelUrl, additionalData."},
|
|
29
|
+
sc={errorType:"ActivityStartingStateUnrecognizedAttributes",message:"The supplied ActivityStartingState object contains attributes that are not recognized.",g:"Ensure that the ActivityStartingState object has only the following attributes: mainStageUrl, sidePanelUrl, additionalData."},uc=a=>({errorType:"ArgumentNullError",message:`The argument supplied for '${a}' was 'null' but a value was expected.`,g:"Ensure you are passing a value of the expected type for the argument."}),M=(a,b,c)=>({errorType:"ArgumentTypeError",
|
|
30
|
+
message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,g:"Ensure the type of the argument provided matches the expected type."}),vc=a=>({errorType:"InternalError",message:`Could not connect to ${a} channel. Unknown error`,g:"No further information is available."}),wc={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",g:"Ensure that no activity is ongoing."},xc={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",
|
|
31
|
+
g:"Send one of the available commands in the frame message."},yc={errorType:"NoActivityFound",message:"No activity found.",g:"Ensure that the activity is started before performing this operation."},zc={errorType:"RequiresEapEnrollment",message:"This feature is only available to early access partners.",g:"Meet add-on early access enrollment is currently closed."},Ac={errorType:"UserNotInitiator",message:"Operation cannot be performed because the user is not the initiator of the current activity.",
|
|
32
|
+
g:"Ensure that the user is the initiator of the current activity or that the activity has ended."},Bc={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",g:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Cc={errorType:"SizeLimitExceededFrameToFrameMessage",message:"The size of the frame to frame message exceeds the limits allowed.",
|
|
33
|
+
g:"Ensure that the frame to frame message size is less than 1,000,000 characters."},Dc={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",g:"Only instantiate the AddonSession once."},Ec={errorType:"UserCancelled",message:"The user cancelled starting an activity.",g:"The user needs to click continue to start the activity."},Fc={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",g:"Do not call this method during a Meet call."},
|
|
34
|
+
Gc={errorType:"InvalidAddonStartingState",message:"Origin of the AddonStartingState iframeURLs does not match the origin of the URLs provided in the Add-on manifest.",g:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest."},Hc={errorType:"SizeLimitExceededAddonStartingState",message:"The size of the AddonStartingState URLs and/or its data exceed the limits allowed.",g:"Ensure that the AddonStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."};
|
|
35
|
+
function Ic(a){switch(a){case 0:return ic;case 1:return pc;case 2:return qc;case 3:return wc;case 4:return xc;case 5:return zc;case 6:return mc;case 7:return Ac;case 8:return Bc;case 9:return Cc;case 10:return Ec;case 11:return Fc;case 12:return Gc;case 13:return Hc;case 14:return yc;default:return L}}
|
|
36
|
+
function Jc(a){let b;var c=(b=E(a,1))!=null?b:0;a=Kc(a.ya());switch(c){case 1:return{errorType:"InternalError",message:`Could not connect to ${a} channel. Meet did not respond with a MessagePort.`,g:"No further information is available."};case 2:return{errorType:"InternalError",message:`Could not connect to ${a}. A conflicting ${a} exists.`,g:"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}.`,
|
|
37
|
+
g:"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}.`,g:"No further information is available."};case 0:return vc(a);case 5:a:switch(a){case "coActivity":c={errorType:"InternalError",message:`Could not connect to ${a} channel. The coActivity was not found.`,g:`Consider starting the ${a} only after after the startActivity promise returns.`};break a;default:c={errorType:"InternalError",
|
|
38
|
+
message:`Could not connect to ${a} channel.`,g:"No further information is available."}}return c;default:return vc(a)}}function Kc(a){switch(a){case 2:return"coActivity";case 3:return"guaranteed delivery";case 0:return"unknown";default:return"unknown"}}function Lc({errorType:a,message:b,g:c},d=""){throw new K({errorType:a,message:d?`${b} ${d}`:b,g:c});}function Mc(a,b){Lc({...jc,message:`${jc.message}: ${a}. In URL ${b}`})};var Oc=function(a){var b=new Nc;return B(b,1,w(a),0)},Nc=class extends J{getFrameType(){return E(this,1)}};var Pc=function(a){var b=a.h,c=b[r];a=c;var d=!(2&c),e=Nc,g=void 0===Wa?2:5;g=(c=!!(2&a))?1:g;d&&(d=!c);c=x(b,a,1);c=Array.isArray(c)?c:Ta;var f=c[r]|0,h=!!(4&f);if(!h){var k=f;k===0&&(k=Yb(k,a));f=c;k|=1;var n=a;const G=!!(2&k);G&&(n|=2);let P=!G,ob=!0,Ia=0,pb=0;for(;Ia<f.length;Ia++){const qb=wb(f[Ia],e,n);if(qb instanceof e){if(!G){const tc=!!((qb.h[r]|0)&2);P&&(P=!tc);ob&&(ob=tc)}f[pb++]=qb}}pb<Ia&&(f.length=pb);k|=4;k=ob?k|16:k&-17;k=P?k|8:k&-9;f[r]=k;G&&Object.freeze(f);f=k}if(d&&!(8&f||!c.length&&
|
|
39
|
+
(g===1||g===4&&32&f))){Tb(f)&&(c=Ha(c),f=Yb(f,a),a=y(b,a,1,c));d=c;e=f;for(f=0;f<d.length;f++)k=d[f],n=Ob(k),k!==n&&(d[f]=n);e|=8;e=d.length?e&-17:e|16;f=d[r]=e}let u;g===1||g===4&&32&f?Tb(f)||(a=f,b=!!(32&f),f|=!c.length||16&f&&(!h||b)?2:2048,f!==a&&(c[r]=f),Object.freeze(c)):(h=g!==5?!1:!!(32&f)||Tb(f)||!!xb(c),(g===2||h)&&Tb(f)&&(c=Ha(c),f=Yb(f,a),f=Zb(f,a,!1),c[r]=f,a=y(b,a,1,c)),Tb(f)||(b=f,f=Zb(f,a,!1),f!==b&&(c[r]=f)),h&&(u=Bb(c)));return u||c},Rc=function(a){{var b=new Qc;const u=b.h;let G=
|
|
40
|
+
u[r];Va(G);if(a==null)y(u,G,1);else{var c=a,d;a=((d=Db)==null?void 0:d.get(c))||c;c=d=a[r]|0;var e=!!(2&d)||!!(2048&d),g=e||Object.isFrozen(a),f;if(f=!g)f=void 0===Xa||!1;var h=!0,k=!0;for(let P=0;P<a.length;P++){var n=a[P];e||(n=!!((n.h[r]|0)&2),h&&(h=!n),k&&(k=n))}e||(d|=5,d=h?d|8:d&-9,d=k?d|16:d&-17);if(f||g&&d!==c)a=Ha(a),c=0,d=Yb(d,G),d=Zb(d,G,!0);d!==c&&(a[r]=d);y(u,G,1,a)}}return b},Qc=class extends J{};var Sc=class extends J{constructor(){super()}};var Uc=function(a){var b=new Tc;return B(b,1,w(a),0)},Tc=class extends J{constructor(){super()}};var Vc=class extends J{Ja(a){return H(this,2,a)}};var Wc=class extends J{};var Yc=class extends J{R(){return z(this,Xc)}ja(){return F(this,Qc,2,Xc)}Y(a){return C(this,2,Xc,a)}getMeetingInfo(){return F(this,Wc,3,Xc)}},Xc=[2,3,4,5];var $c=class extends J{za(){return z(this,Zc)}},Zc=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17];var ad=class extends J{constructor(){super()}ja(){return Wb(this,Qc,1)}Y(a){return Xb(this,1,a)}};var bd=class extends J{constructor(){super()}ja(){return Wb(this,Qc,1)}Y(a){return Xb(this,1,a)}};var cd=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),dd=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function ed(a){a&&typeof a.dispose=="function"&&a.dispose()};var N=function(){this.o=this.o;this.A=this.A};N.prototype.o=!1;N.prototype.dispose=function(){this.o||(this.o=!0,this.ea())};N.prototype[Symbol.dispose]=function(){this.dispose()};var fd=function(a,b){a.o?b():(a.A||(a.A=[]),a.A.push(b))};N.prototype.ea=function(){if(this.A)for(;this.A.length;)this.A.shift()()};var gd=function({ra:a,Fa:b}){if(a===null)throw new K(uc("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&&
|
|
41
|
+
typeof a.additionalData!=="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(sc);if(Object.keys(a).length===0)throw new K(rc);}},hd=function(a){const b=[];var c=b.push;var d=Oc(2);d=H(d,2,a.mainStageUrl);d=H(d,3,a.additionalData);c.call(b,d);c=b.push;d=Oc(1);d=H(d,2,a.sidePanelUrl);a=H(d,3,a.additionalData);c.call(b,a);return b},pd=class extends N{constructor(a){super();
|
|
42
|
+
this.context=a;this.Da={};id(this.context.i.fb,b=>{switch(b.content.za()){case 7:const d=this.Da.frameToFrameMessage;b=F(b.content,Vc,7,Zc);if(d&&b){var c=E(b,1);c=cd.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:D(b,2)})}break;case 16:jd(this.context.i)}})}async getMeetingInfo(){const a=await kd(this.context.i,Uc(2));return{meetingId:D(a.getMeetingInfo(),1)}}async getFrameOpenReason(){let a;const b=(a=this.context.ca.Ua)!=null?a:0;let c;return(c=dd.get(b))!=null?
|
|
43
|
+
c:"UNKNOWN"}async getActivityStartingState(){var a=(await kd(this.context.i,Uc(1))).ja();const b=a==null?void 0:Pc(a).find(c=>c.getFrameType()===2);a=a==null?void 0:Pc(a).find(c=>c.getFrameType()===1);return{mainStageUrl:(b==null?void 0:D(b,2))||void 0,sidePanelUrl:(a==null?void 0:D(a,2))||void 0,additionalData:(a==null?void 0:D(a,3))||void 0}}async setActivityStartingState(a){gd({ra:a,Fa:!0});a=hd(a);await ld(this.context.i,(new ad).Y(Rc(a)))}on(a,b){this.Da[a]=b}async closeAddon(){await md(this.context.i)}async startActivity(a){gd({ra:a,
|
|
44
|
+
Fa:!1});const b=new bd;a&&(a=hd(a),b.Y(Rc(a)));await nd(this.context.i,b)}async endActivity(a){var b=od,c=this.context.i,d=new Sc;a=B(d,1,w(a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0),0);await b(c,a)}};var qd=cc(class extends J{getFrameOpenReason(){return E(this,5)}});function rd(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");c?b=qd(atob(c)):(Mc("meet_sdk",b),b=void 0);(c=D(b,1))||Mc("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new K(nc);const d=D(b,2);d||Mc("meet_control_channel_name",a);const e=D(b,4);e||Mc("addon_cloud_project_number",a);var g;a=(g=b.getFrameOpenReason())!=null?g:0;g=D(b,3)||"https://meet.google.com";return{Ua:a,frameType:c,Qa:d,cloudProjectNumber:e,Ga:g}};var sd=class extends J{constructor(){super()}};var td=class extends J{constructor(){super()}};var wd=function(){var a=new ud,b=new td;return C(a,1,vd,b)},ud=class extends J{constructor(){super()}ya(){return z(this,vd)}},vd=[1,2];var xd=class extends J{constructor(){super()}};var yd=class extends J{constructor(){super()}};var zd=class extends J{constructor(){super()}Ja(a){return H(this,2,a)}};var Ad=class extends J{constructor(){super()}};var Bd=class extends J{constructor(){super()}};var Q=class extends J{constructor(){super()}za(){return z(this,O)}},O=[1,2,5,6,7,8,9,10,11,13,14,15,16];var Cd=class extends J{},Dd=cc(Cd),Ed=[1,2];class Fd{constructor(a,b){this.data=a;this.channel=b}};var Gd=Promise;var Id=function(a){const b=new MessageChannel;Hd(b.port1,a);return b},Kd=function(a,b){Hd(a,b);return new Jd(a)};class Jd{constructor(a){this.hb=a}send(a,b,c=[]){b=Id(b);this.hb.postMessage(a,[b.port2].concat(c))}N(a,b){return new Gd(c=>{this.send(a,c,b)})}}const Hd=function(a,b){b&&(a.onmessage=c=>{var d=c.data;c=Kd(c.ports[0]);b(new Fd(d,c))})};class Ld{constructor(a,b){this.Za=100;this.Ra=a;this.kb=b;this.V=0;this.U=null}get(){let a;this.V>0?(this.V--,a=this.U,this.U=a.next,a.next=null):a=this.Ra();return a}put(a){this.kb(a);this.V<this.Za&&(this.V++,a.next=this.U,this.U=a)}};var Md=function(){var a=document;var b="IFRAME";a.contentType==="application/xhtml+xml"&&(b=b.toLowerCase());return a.createElement(b)};var Nd=function(){};var Od,Pd=function(){var a=l.MessageChannel;typeof a==="undefined"&&typeof window!=="undefined"&&window.postMessage&&window.addEventListener&&!p("Presto")&&(a=function(){var e=Md();e.style.display="none";document.documentElement.appendChild(e);var g=e.contentWindow;e=g.document;e.open();e.close();var f="callImmediate"+Math.random(),h=g.location.protocol=="file:"?"*":g.location.protocol+"//"+g.location.host;e=ha(function(k){if((h=="*"||k.origin==h)&&k.data==f)this.port1.onmessage()},this);g.addEventListener("message",
|
|
45
|
+
e,!1);this.port1={};this.port2={postMessage:function(){g.postMessage(f,h)}}});if(typeof a!=="undefined"){var b=new a,c={},d=c;b.port1.onmessage=function(){if(c.next!==void 0){c=c.next;var e=c.ua;c.ua=null;e()}};return function(e){d.next={ua:e};d=d.next;b.port2.postMessage(0)}}return function(e){l.setTimeout(e,0)}};class Qd{constructor(){this.aa=this.J=null}add(a,b){const c=Rd.get();c.set(a,b);this.aa?this.aa.next=c:this.J=c;this.aa=c}remove(){let a=null;this.J&&(a=this.J,this.J=this.J.next,this.J||(this.aa=null),a.next=null);return a}}var Rd=new Ld(()=>new Sd,a=>a.reset());class Sd{constructor(){this.next=this.scope=this.ga=null}set(a,b){this.ga=a;this.scope=b;this.next=null}reset(){this.next=this.scope=this.ga=null}};let Td,Ud=!1,Vd=new Qd,Xd=(a,b)=>{Td||Wd();Ud||(Td(),Ud=!0);Vd.add(a,b)},Wd=()=>{if(l.Promise&&l.Promise.resolve){const a=l.Promise.resolve(void 0);Td=()=>{a.then(Yd)}}else Td=()=>{var a=Yd;typeof l.setImmediate!=="function"||l.Window&&l.Window.prototype&&l.Window.prototype.setImmediate==l.setImmediate?(Od||(Od=Pd()),Od(a)):l.setImmediate(a)}};var Yd=()=>{let a;for(;a=Vd.remove();){try{a.ga.call(a.scope)}catch(b){m(b)}Rd.put(a)}Ud=!1};var R=function(a){this.l=0;this.Ha=void 0;this.C=this.u=this.B=null;this.S=this.fa=!1;if(a!=Nd)try{var b=this;a.call(void 0,function(c){Zd(b,2,c)},function(c){Zd(b,3,c)})}catch(c){Zd(this,3,c)}},$d=function(){this.next=this.context=this.H=this.M=this.v=null;this.K=!1};$d.prototype.reset=function(){this.context=this.H=this.M=this.v=null;this.K=!1};
|
|
46
|
+
var ae=new Ld(function(){return new $d},function(a){a.reset()}),be=function(a,b,c){var d=ae.get();d.M=a;d.H=b;d.context=c;return d},de=function(){var a,b,c=new R(function(d,e){a=d;b=e});return new ce(c,a,b)};R.prototype.then=function(a,b,c){return ee(this,typeof a==="function"?a:null,typeof b==="function"?b:null,c)};R.prototype.$goog_Thenable=!0;var ge=function(a,b){b=be(b,b);b.K=!0;fe(a,b)};R.prototype.lb=function(a,b){return ee(this,null,a,b)};R.prototype.catch=R.prototype.lb;
|
|
47
|
+
R.prototype.cancel=function(a){if(this.l==0){var b=new S(a);Xd(function(){he(this,b)},this)}};
|
|
48
|
+
var he=function(a,b){if(a.l==0)if(a.B){var c=a.B;if(c.u){for(var d=0,e=null,g=null,f=c.u;f&&(f.K||(d++,f.v==a&&(e=f),!(e&&d>1)));f=f.next)e||(g=f);e&&(c.l==0&&d==1?he(c,b):(g?(d=g,d.next==c.C&&(c.C=d),d.next=d.next.next):ie(c),je(c,e,3,b)))}a.B=null}else Zd(a,3,b)},fe=function(a,b){a.u||a.l!=2&&a.l!=3||ke(a);a.C?a.C.next=b:a.u=b;a.C=b},ee=function(a,b,c,d){var e=be(null,null,null);e.v=new R(function(g,f){e.M=b?function(h){try{var k=b.call(d,h);g(k)}catch(n){f(n)}}:g;e.H=c?function(h){try{var k=c.call(d,
|
|
49
|
+
h);k===void 0&&h instanceof S?f(h):g(k)}catch(n){f(n)}}:f});e.v.B=a;fe(a,e);return e.v};R.prototype.mb=function(a){this.l=0;Zd(this,2,a)};R.prototype.nb=function(a){this.l=0;Zd(this,3,a)};
|
|
50
|
+
var Zd=function(a,b,c){if(a.l==0){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.l=1;a:{var d=c,e=a.mb,g=a.nb;if(d instanceof R){fe(d,be(e||Nd,g||null,a));var f=!0}else{if(d)try{var h=!!d.$goog_Thenable}catch(n){h=!1}else h=!1;if(h)d.then(e,g,a),f=!0;else{h=typeof d;if(h=="object"&&d!=null||h=="function")try{var k=d.then;if(typeof k==="function"){le(d,k,e,g,a);f=!0;break a}}catch(n){g.call(a,n);f=!0;break a}f=!1}}}f||(a.Ha=c,a.l=b,a.B=null,ke(a),b!=3||c instanceof S||me(a,c))}},
|
|
51
|
+
le=function(a,b,c,d,e){var g=!1,f=function(k){g||(g=!0,c.call(e,k))},h=function(k){g||(g=!0,d.call(e,k))};try{b.call(a,f,h)}catch(k){h(k)}},ke=function(a){a.fa||(a.fa=!0,Xd(a.Ta,a))},ie=function(a){var b=null;a.u&&(b=a.u,a.u=b.next,b.next=null);a.u||(a.C=null);return b};R.prototype.Ta=function(){for(var a;a=ie(this);)je(this,a,this.l,this.Ha);this.fa=!1};
|
|
52
|
+
var je=function(a,b,c,d){if(c==3&&b.H&&!b.K)for(;a&&a.S;a=a.B)a.S=!1;if(b.v)b.v.B=null,ne(b,c,d);else try{b.K?b.M.call(b.context):ne(b,c,d)}catch(e){oe.call(null,e)}ae.put(b)},ne=function(a,b,c){b==2?a.M.call(a.context,c):a.H&&a.H.call(a.context,c)},me=function(a,b){a.S=!0;Xd(function(){a.S&&oe.call(null,b)})},oe=m,S=function(a){ka.call(this,a)};ja(S,ka);S.prototype.name="cancel";var ce=function(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let pe=1,qe=new WeakMap;
|
|
53
|
+
var se=function(a,b,c){var d=re;a.Ma.has(b);d(b,c)},ue=class extends N{constructor(){super();this.Ma=new Set}signal(){const a=new te;this.Ma.add(a);fd(this,ia(ed,a));return a}},re=function(a,b){return new Promise(c=>{ve(()=>{a.ta&&(a.Ya=b,a.Ca=!0);for(const {qa:d,slot:e}of a.j.values())try{e(b,{signal:a,qa:d})}catch(g){m(g)}for(const d of a.I)d.resolve(b);a.I.clear();c()})})},id=function(a,b,c){const d=pe++;ve(()=>{we(a,d,b,c)});return d},we=function(a,b,c,d){if(!a.o)if(d){if(!d.o){const e=()=>{ve(()=>
|
|
54
|
+
{a.j.delete(b);const g=qe.get(d);g&&ra(g,e)})};a.j.set(b,{qa:b,slot:c,da:e});xe(d,e)}}else a.j.set(b,{qa:b,slot:c,da:()=>a.j.delete(b)})},te=class extends N{constructor(){super();this.ta=!1;this.j=new Map;this.I=new Set;this.Ca=!1}detach(a){ve(()=>{const b=this.j.get(a);b&&b.da()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){const c=de();ve(()=>{if(this.o)c.reject(new S("Signal initially disposed"));else if(b&&b.o)c.reject(new S("Owner initially disposed"));else if(a&&
|
|
55
|
+
this.ta&&this.Ca)c.resolve(this.Ya);else if(this.I.add(c),ge(c.promise,()=>{this.I.delete(c)}),b){const d=()=>{c.reject(new S("Owner asynchronously disposed"))};ge(c.promise,()=>{const e=qe.get(b);e&&ra(e,d)});xe(b,d)}});return c.promise}ea(){super.ea();ve(()=>{for(const {da:a}of this.j.values())a();this.j.clear();for(const a of this.I)a.reject(new S("Signal asynchronously disposed"));this.I.clear()})}};const ye=[];let ze=!1;function ve(a){ye.push(a);Ae()}
|
|
56
|
+
async function Ae(){if(!ze)try{ze=!0;let a=Be(0);for(;a<ye.length;)await Promise.resolve(),a=Be(a)}catch(a){m(a)}finally{ye.length=0,ze=!1}}function Be(a){const b=a+100;for(;a<b&&a<ye.length;)try{ye[a++]()}catch(c){m(c)}return a}function xe(a,b){if(a.o)b();else{var c=qe.get(a);if(c)c.push(b);else{const d=[b];qe.set(a,d);fd(a,()=>{for(const e of[...d])e();qe.delete(a)})}}};function T(a){var b=new Cd;a=C(b,1,Ed,a);return{content:bc(a)}}const Ce=new ue;function De(a,b){const c=Ce.signal();return{channel:Kd(a,d=>{const e=b(d.data);se(Ce,c,{content:e,jb:d})}),signal:c}};let Ee;var U=class extends J{getState(){const a=this.h;let b=a[r];const c=x(a,b,1),d=Ra(c,!0,!!(b&34));d!=null&&d!==c&&y(a,b,1,d);return d==null?Ba():d}};var V=class extends J{};var Ge=class extends J{ha(){return F(this,U,2,Fe)}W(a){C(this,2,Fe,a)}T(){return A(this,U,2,Fe)}ia(){return F(this,V,3,Fe)}X(a){C(this,3,Fe,a)}ka(){return A(this,V,3,Fe)}},Fe=[2,3];var He=cc(class extends J{});var Je=cc(class extends J{R(){return z(this,Ie)}}),Ie=[1,2];var Ke=({destination:a,origin:b,tb:c,Na:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");const g=Id(e);a.postMessage(c?{n:d,t:c}:d,b,[g.port2]);return Kd(g.port1,e)};function Le(a,b,c){const d=new ue,e=d.signal();a=Ke({destination:window.parent,origin:b,Na:a,onMessage:g=>{const f=Dd(g.data.content);z(f,Ed)===2&&se(d,e,{content:F(f,$c,2,Ed),jb:g,messagePort:g.data.messagePort})}});return new Me(e,a,c)}
|
|
57
|
+
var jd=async function(a){a=a.channel;var b=a.N;var c=new Q;var d=new Ad;c=C(c,13,O,d);await b.call(a,T(c))},kd=async function(a,b){var c=W,d=new Q;b=C(d,9,O,b);a=await c(a,T(b));let e;return(e=F(Dd(a.data.content),$c,2,Ed))==null?void 0:F(e,Yc,9,Zc)},ld=async function(a,b){var c=W,d=new Q;b=C(d,8,O,b);await c(a,T(b))},md=async function(a){var b=W;var c=new Q;var d=new sd;c=C(c,11,O,d);await b(a,T(c))},nd=async function(a,b){var c=W,d=new Q;b=C(d,14,O,b);await c(a,T(b))},od=async function(a,b){var c=
|
|
58
|
+
W,d=new Q;b=C(d,15,O,b);await c(a,T(b))},Ne=async function(a){setInterval(async()=>{await jd(a)},1E3)},W=async function(a,b){(a=await a.channel.N(b))||Lc(L,"Falsy response received from the message channel."+` ${JSON.stringify(a)}`);(b=a.data)||Lc(L,"Data field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);(b=b.content)||Lc(L,"Content field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);let c=void 0;try{c=Dd(b)}catch(d){Lc(L,"The ControlMessage can't be deserialized."+
|
|
59
|
+
` ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=F(c,$c,2,Ed))||Lc(L,"MeetToAddonMessage field on ControlMessage is falsy."+` ${JSON.stringify(b)}`);b=b==null?void 0:F(b,hc,10,Zc);if((b==null?void 0:E(b,1))!==void 0)throw new K(Ic(E(b,1)));return a},Oe=async function(a,b,c){var d=W,e=new Q;b=C(e,1,O,b);d=await d(a,T(b));a=d.data.messagePort;var g;(d=(g=F(Dd(d.data.content),$c,2,Ed))==null?void 0:F(g,gc,1,Zc))!=null?g=d:(g=new gc,g=B(g,1,w(0),0));return{channel:a?De(a,c):void 0,response:g}},Pe=async function(a){const b=
|
|
60
|
+
wd(),{channel:c,response:d}=await Oe(a,b,e=>Je(e));if(!c)throw new K(Jc(d));return c},Qe=async function(a){var b=W;var c=new Q;var d=new Bd;c=C(c,5,O,d);await b(a,T(c))},Re=async function(a){var b=W;var c=new Q;var d=new yd;c=C(c,6,O,d);await b(a,T(c))},Se=async function(a,b,c){var d=W,e=new Q,g=new zd;b=B(g,1,w(b),0).Ja(c);e=C(e,7,O,b);await d(a,T(e))};
|
|
61
|
+
class Me extends N{constructor(a,b,c){super();this.fb=a;this.channel=b;a=Ee||(Ee=dc("[0,10,0]"));a=Ob(a);a=Rb(a,4,vb("671117181"));b=a.h;var d=b[r];b=d&2?a:Fb(a.constructor,Nb(b,d,!0));a=new Q;d=new xd;b=Xb(d,2,b);c=H(b,3,c);c=C(a,2,O,c);this.channel.send(T(c));Ne(this)}};let Te;var Ue=class{constructor(a){var b=Te;this.ca=a;this.i=b}delete(){throw Error("Not implemented.");}};var We=class extends J{constructor(){super()}pa(a){return B(this,1,a==null?a:sb(a),"0")}ha(){return F(this,U,2,Ve)}W(a){C(this,2,Ve,a)}T(){return A(this,U,2,Ve)}ia(){return F(this,V,3,Ve)}X(a){C(this,3,Ve,a)}ka(){return A(this,V,3,Ve)}},Ve=[2,3];var Xe=class extends J{constructor(){super()}};var Ye=class extends J{constructor(){super()}};var Ze=class extends J{constructor(){super()}oa(a){return Rb(this,4,vb(a))}};var af=class extends J{constructor(){super()}pa(a){return B(this,1,a==null?a:sb(a),"0")}ha(){return F(this,U,2,$e)}W(a){C(this,2,$e,a)}T(){return A(this,U,2,$e)}ia(){return F(this,V,3,$e)}X(a){C(this,3,$e,a)}ka(){return A(this,V,3,$e)}},$e=[2,3],bf=[5,6];var cf=class extends J{constructor(){super()}oa(a){return H(this,1,a)}};var ef=class extends J{constructor(){super()}R(){return z(this,df)}},df=[1,2,3];function ff(a){var b=new gf;let c=0,d;return(...e)=>{if(hf(b)){jf(b);var g=!0}else g=!1;g?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;let f;(f=d)==null||f()},kf(b))))}};var kf=function(a){const b=a.wa;let c;a=Date.now()-((c=a.la[a.index])!=null?c:0);return a>=b?0:b-a},hf=function(a){const b=a.wa;let c;return Date.now()-((c=a.la[a.index])!=null?c:0)>=b},jf=function(a){a.la[a.index]=Date.now();a.index=(a.index+1)%a.ab},gf=class{constructor(){this.ab=1;this.wa=500;this.la=[];this.index=0}};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.Ea!=null||(this.Ea=setInterval(()=>{this.config.eb()},this.config.Wa));return this}shutdown(){clearInterval(this.Ea)}};function nf(){const a=new Map,b={set(c,d){a.set(c,d);return b},ba:()=>a};return b};function of(a){if(a.T()){var b=a.ha().getState();a=Uint8Array;za(xa);var c=b.Z;if(c!=null&&!wa(c))if(typeof c==="string"){ta.test(c)&&(c=c.replace(ta,va));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.Z=c;return{bytes:new a(b||0)}}}function pf(a,b){a.W(qf(b));return a}function rf(a,b){a.W(qf(b));return a}function qf(a){var b=new U;return B(b,1,Ra(a.bytes,!1,!1),Ba())}
|
|
62
|
+
function sf(a){if(a.ka()){a=a.ia();var b,c,d=D(a,1),e=(c=(b=Wb(a,ec,2))==null?void 0:$b(b))!=null?c:0;c=a.h;let g=c[r];const f=x(c,g,4);b=f==null||typeof f==="number"?f:f==="NaN"||f==="Infinity"||f==="-Infinity"?Number(f):void 0;b!=null&&b!==f&&y(c,g,4,b);return{mediaId:d,mediaPlayoutPosition:e,mediaPlayoutRate:b!=null?b:0,playbackState:tf.get(E(a,3))}}}function uf(a,b){a.X(vf(b));return a}function wf(a,b){a.X(vf(b));return a}
|
|
63
|
+
const tf=nf().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").ba(),xf=nf().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).ba();function vf(a){var b=new V;b=H(b,1,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=B(b,4,c,0);c=(new ec).setSeconds(a.mediaPlayoutPosition);b=Xb(b,2,c);a=xf.get(a.playbackState);return B(b,3,w(a),0)}
|
|
64
|
+
function yf({activityTitle:a}){return(new Ze).oa(a)}function zf(a,b){var c=new Ye;b=B(c,1,w(b.G),0);C(a,6,bf,b);return a}function Af(a){var b=new Xe;C(a,5,bf,b);return a};const Bf=nf().set("co-doing",1).set("co-watching",2).ba();async function Cf(a,b,c){var d=b.N,e=new ef;var g=(new cf).oa(a.activityTitle);var f=Bf.get(a.sa);g=B(g,2,w(f),0);e=C(e,3,df,g);d=await d.call(b,e,He);let h;e=Pb(d,1);e=e==null||typeof e==="boolean"?e:typeof e==="number"?!!e:void 0;if((h=e!=null?e:!1)!=null&&h)return new Df(a,b,c,Wb(d,Ge,2));throw new lf;}
|
|
65
|
+
var Ef=function(a,b){const c=a.config.Aa(b);c&&!a.config.xa(a.s,c)&&(a.s=c,a.ma=$b(b),a.Sa(a.s))},X=function(a,b){const {state:c,bb:d,context:e}=b(a.s);a.s=c;a.notify(a.s,e,d)};
|
|
66
|
+
class Df{constructor(a,b,c,d){this.va=a;this.P=b;this.config=c;this.Sa=ff(e=>void this.va.Ba(e));Ff(this.P,e=>{const g=e.R();switch(g){case 1:Ef(this,F(e,Ge,1,Ie));break;case 2:case 0:console.warn(`IllegalMessage: ${g} - ${"Unhandled message"} - ${"Please raise a bug with the MeetJS team"}`)}});this.Va=(new mf({Wa:1E3,eb:()=>{var e,g;const f=(g=(e=this.va).ib)==null?void 0:g.call(e);this.s!==null&&(this.s={...this.s,...f},e=new ef,g=this.config.Ka((new We).pa(this.ma),this.s),e=C(e,1,df,g),this.P.send(e))}})).start();
|
|
67
|
+
this.s=null;this.ma=0;d&&Ef(this,d)}disconnect(){this.P.shutdown();this.Va.shutdown()}notify(a,b,c){var d=c?yf(c):void 0;c=this.config;var e=c.La,g=(new af).pa(this.ma);d=Xb(g,4,d);a=e.call(c,d,a);a=this.config.Ia(a,b);b=this.P;c=b.send;e=new ef;a=C(e,2,df,a);c.call(b,a)}};var Gf=class{constructor(a){this.m=a}broadcastStateUpdate(a){X(this.m,()=>({state:a,context:{}}))}disconnect(){this.m.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.m=a}notifySwitchedToMedia(a,b,c){X(this.m,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},bb:{activityTitle:a},context:{G:1}}))}notifyPauseState(a,b){X(this.m,c=>{if(c==null)throw Error("Invalid before coWatchingState");return{state:{...c,playbackState:a?"PAUSE":"PLAY",mediaPlayoutPosition:b},context:{G:3}}})}notifySeekToTimestamp(a){X(this.m,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},
|
|
67
68
|
context:{G:2}}})}notifyPlayoutRate(a){X(this.m,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutRate:a},context:{G:4}}})}notifyBuffering(a){X(this.m,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a,playbackState:"BUFFERING"},context:{G:3}}})}notifyReady(a){X(this.m,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},context:{G:3}}})}disconnect(){this.m.disconnect()}};
|
|
68
|
-
function
|
|
69
|
-
async function
|
|
70
|
-
a)}};let
|
|
71
|
-
return
|
|
69
|
+
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};var Ff=function(a,b){const c=id(a.signal,d=>{b(d)});a.j.push(c)},Kf=class{constructor(a,b){this.channel=a;this.signal=b;this.j=[]}send(a){this.channel.send(bc(a))}async N(a,b){a=await this.channel.N(bc(a));return b(a.data)}shutdown(){this.j.forEach(a=>{this.signal.detach(a)})}};function Lf(a,b){var c=Mf;const d=a.signal(),e=a.signal();id(b,g=>{const f=c(g)?d:e;se(a,f,g)},a);return{gb:d,cb:e}}function Nf(a,b,c,d=e=>e){id(c,e=>{se(a,b,d(e))},a)};async function Of(a,b){if(b)return a=await Cf({activityTitle:b.activityTitle,sa:"co-watching",ib:()=>b.onCoWatchingStateQuery(),Ba:c=>{b.onCoWatchingStateChanged(c)}},a,{La:uf,Ka:wf,Ia:zf,Aa:sf,xa:Jf}),new If(a)}async function Pf(a,b){if(b)return a=await Cf({activityTitle:b.activityTitle,sa:"co-doing",Ba:c=>{b.onCoDoingStateChanged(c)}},a,{La:pf,Ka:rf,Ia:Af,Aa:of,xa:Hf}),new Gf(a)}
|
|
70
|
+
async function Qf(a){const b=new ue,c=b.signal();a=await a;Nf(b,c,a.signal,g=>g.content);const {gb:d,cb:e}=Lf(b,c);return{Oa:new Kf(a.channel,d),Pa:new Kf(a.channel,e)}}function Mf(a){a:switch(a.R()){case 1:a=F(a,Ge,1,Ie);break a;default:throw Error("CA Message arrived with no known content message set");}return a.T()};async function Rf(a,b){({Oa:a}=await Qf(Pe(a.i)));b=await Pf(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function Sf(a,b){({Pa:a}=await Qf(Pe(a.i)));b=await Of(a,b);if(!b)throw Error("Failed to create co-watching session");return b};var Tf=class extends pd{async notifySidePanel(a){await Se(this.context.i,1,a)}async unloadSidePanel(){await Qe(this.context.i)}async loadSidePanel(){await Re(this.context.i)}};var Uf=class extends pd{async notifyMainStage(a){await Se(this.context.i,2,a)}};var Vf=class{constructor(a){a=a.cloudProjectNumber;const b=rd();if(b.cloudProjectNumber!==a)throw new K(oc);const c=b.Ga,d=b.Qa;let e;Te=(e=Te)!=null?e:Le(d,c,a);this.O=new Ue(b)}async createMainStageClient(){var a=this.O;if(a.ca.frameType!==2)throw new K(kc);return await Promise.resolve(new Tf(a))}async createSidePanelClient(){var a=this.O;if(a.ca.frameType!==1)throw new K(lc);return await Promise.resolve(new Uf(a))}async createCoWatchingClient(a){return await Sf(this.O,a)}async createCoDoingClient(a){return await Rf(this.O,
|
|
71
|
+
a)}};let Wf=null;var Xf={addon:{getFrameType:function(){a:{var a=rd().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(uc("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(Wf&&rd().Ga!=="integration.test.google.com")throw new K(Dc);
|
|
72
|
+
return Wf=new Vf(a)}}},Yf=["meet"],Y=l;Yf[0]in Y||typeof Y.execScript=="undefined"||Y.execScript("var "+Yf[0]);for(var Z;Yf.length&&(Z=Yf.shift());)Yf.length||Xf===void 0?Y=Y[Z]&&Y[Z]!==Object.prototype[Z]?Y[Z]:Y[Z]={}:Y[Z]=Xf;}).call(this);
|
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": "0.
|
|
4
|
+
"version": "0.10.0-671117181",
|
|
5
5
|
"repository": "googleworkspace/meet",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"homepage": "https://developers.google.com/meet/add-ons/guides/overview",
|