@googleworkspace/meet-addons 1.2.0-dev-882204219 → 1.2.0-dev-883351576

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 CHANGED
@@ -1,5 +1,248 @@
1
1
 
2
2
 
3
+ // Original file: live_sharing.v2.types.d.ts
4
+
5
+
6
+ /**
7
+ * Binary-encoded state for CoDoing experiences.
8
+ */
9
+ export interface CoDoingState {
10
+ bytes: Uint8Array;
11
+ }
12
+
13
+
14
+ /**
15
+ * Host-provided set of base configuration options.
16
+ */
17
+ export interface CoActivityDelegate {
18
+ /**
19
+ * User-suitable string describing the CoActivity.
20
+ */
21
+ activityTitle: string;
22
+ }
23
+
24
+
25
+ /**
26
+ * Host-provided set of callbacks required to operate a CoDoing experience.
27
+ */
28
+ export interface CoDoingDelegate extends CoActivityDelegate {
29
+ /**
30
+ * Callback for state updates broadcast by other participants in the meeting.
31
+ *
32
+ * Note: This isn't called in response to local changes.
33
+ *
34
+ * @param update the state update to be applied.
35
+ */
36
+ onCoDoingStateChanged(newState: CoDoingState): void;
37
+ }
38
+
39
+
40
+
41
+ /**
42
+ * Client-constructed CoDoing experience with hooks for hosts to notify
43
+ * of state updates.
44
+ */
45
+ export interface CoDoingClient {
46
+ /**
47
+ * Broadcasts state to all other current participants, and is the default
48
+ * state for any participant until some other state is broadcast.
49
+ *
50
+ * **Note:** This shared state is eventually consistent across
51
+ * participants. For predictable behavior, this binary state should be
52
+ * complete, not partial, as the Meet add-ons SDK doesn't provide
53
+ * guarantees around the delivery of individual messages -- only eventual
54
+ * consistency.
55
+ *
56
+ * **Note:** In a race condition where two participants call this method
57
+ * simultaneously, the Meet add-ons SDK selects a canonical winning
58
+ * update. The losing update might or might not be applied to participants,
59
+ * but the winning update is always applied later.
60
+ */
61
+ broadcastStateUpdate(newState: CoDoingState): void;
62
+ }
63
+
64
+
65
+
66
+ /**
67
+ * Current PlaybackState for CoWatching experiences.
68
+ */
69
+ export type PlaybackState =
70
+ | 'INVALID'
71
+ | 'BUFFERING'
72
+ | 'PLAY'
73
+ | 'PAUSE'
74
+ | 'ENDED';
75
+
76
+ /**
77
+ * State for CoWatching experiences.
78
+ */
79
+ export interface CoWatchingState {
80
+ /**
81
+ * The identifier for the media being played.
82
+ *
83
+ * Note: The actual format only matters to the co-watching app.
84
+ */
85
+ mediaId: string;
86
+
87
+ /** The current position of the media playout, in seconds. */
88
+ mediaPlayoutPosition: number;
89
+
90
+ /** The current playout rate, where {@code 1.0} is normal speed. */
91
+ mediaPlayoutRate: number;
92
+
93
+ /** The current player state, such as Paused, Playing, Buffering, etc. */
94
+ playbackState: PlaybackState;
95
+ }
96
+
97
+
98
+
99
+ type CoWatchingQueryResponse = Pick<CoWatchingState, 'mediaPlayoutPosition'>;
100
+
101
+
102
+ /**
103
+ * Host-provided set of callbacks required to operate a CoWatching experience.
104
+ */
105
+ export interface CoWatchingDelegate extends CoActivityDelegate {
106
+ /**
107
+ * Apply the supplied state to media playout, up to and including switching
108
+ * to a new media stream if the mediaId changes.
109
+ *
110
+ * @param state the new state to be applied to the player.
111
+ */
112
+ onCoWatchingStateChanged(newState: CoWatchingState): void;
113
+
114
+ /**
115
+ * Return the current state of the local media playout. This is called
116
+ * regularly so it should be written to be performant.
117
+ *
118
+ * @return a {@link CoWatchingState} describing the current state.
119
+ */
120
+ onCoWatchingStateQuery(): CoWatchingQueryResponse;
121
+ }
122
+
123
+
124
+
125
+ /**
126
+ * Client-constructed CoWatching experience with hooks for hosts to manage the
127
+ * state.
128
+ */
129
+ export interface CoWatchingClient {
130
+ /**
131
+ * Notify Meet that the user has switched media so Meet can pass that along
132
+ * to other users.
133
+ *
134
+ * @param mediaTitle The title of the media switched to. This title is
135
+ * reflected in the Meet UI when other users are considering connecting to
136
+ * the co-watching session.
137
+ * @param mediaId The string URI of the media switched to.
138
+ * @param mediaPlayoutPosition The position at which the media began playout.
139
+ */
140
+ notifySwitchedToMedia(
141
+ mediaTitle: string,
142
+ mediaId: string,
143
+ mediaPlayoutPosition: number,
144
+ ): void;
145
+
146
+ /**
147
+ * Notify Meet that the user has paused or unpaused the playback of media, so
148
+ * Meet can mirror that action for other users.
149
+ *
150
+ * @param paused The new paused or unpaused state.
151
+ */
152
+ notifyPauseState(paused: boolean, mediaPlayoutPosition: number): void;
153
+
154
+ /**
155
+ * Notify Meet that the user has sought the playback point of the media, so
156
+ * Meet can mirror that action for other users.
157
+ *
158
+ * @param mediaPlayoutPosition The timestamp that the user sought.
159
+ */
160
+ notifySeekToTimestamp(mediaPlayoutPosition: number): void;
161
+
162
+ /**
163
+ * Notify Meet that the user updated the playout rate of the media to a new
164
+ * value (for example, 1.25x).
165
+ *
166
+ * @param rate The rate at which the media is now being played.
167
+ * @param mediaPlayoutPosition The position at which the media began playout
168
+ */
169
+ notifyPlayoutRate(rate: number, mediaPlayoutPosition: number): void;
170
+
171
+ /**
172
+ * Notify Meet that the media isn't ready to be played due to
173
+ * buffering, a prior media switch, seeking, or normal network
174
+ * congestion.
175
+ *
176
+ * @param mediaPlayoutPosition The timestamp at which the media is paused or
177
+ * waiting for buffering to complete.
178
+ */
179
+ notifyBuffering(mediaPlayoutPosition: number): void;
180
+
181
+ /**
182
+ * Notify Meet that the buffering is complete and the media is now ready to
183
+ * play, starting at the supplied timestamp.
184
+ *
185
+ * @param mediaPlayoutPosition The timestamp at which the media is buffered
186
+ * and is now ready to play.
187
+ */
188
+ notifyReady(mediaPlayoutPosition: number): void;
189
+ }
190
+
191
+
192
+
193
+ // Original file: index.types.d.ts
194
+
195
+
196
+ /**
197
+ * Parameters to retrieve the add-on session.
198
+ */
199
+ export interface AddonSessionOptions {
200
+ /**
201
+ * The Google Cloud project number of the add-on.
202
+ */
203
+ cloudProjectNumber: string;
204
+ }
205
+
206
+ /**
207
+ * The main entry point for accessing Meet add-on functionality. Available
208
+ * globally under `window.meet.addon`.
209
+ */
210
+ export interface MeetAddon {
211
+ /**
212
+ * Returns the {@link
213
+ * https://developers.google.com/meet/add-ons/reference/websdk/addon_sdk.frametype
214
+ * | FrameType} in which the add-on is running in.
215
+ */
216
+ getFrameType: () => FrameType;
217
+
218
+ /**
219
+ * Creates an add-on session.
220
+ */
221
+ createAddonSession: (options: AddonSessionOptions) => Promise<AddonSession>;
222
+ }
223
+
224
+ /** The structure of the top-level add-on export. */
225
+ interface MeetAddonExport {
226
+ addon: MeetAddon;
227
+ }
228
+
229
+ /** The structure of an error generated from the Meet add-ons SDK. */
230
+ interface MeetAddonError extends Error {
231
+ readonly errorType: ErrorType;
232
+ }
233
+
234
+ /**
235
+ * The main entry point for accessing Meet add-on functionality.
236
+ */
237
+ export const meet: MeetAddonExport;
238
+
239
+ declare global {
240
+ export interface Window {
241
+ meet: MeetAddonExport;
242
+ }
243
+ }
244
+
245
+
3
246
  // Original file: client.types.d.ts
4
247
 
5
248
 
@@ -257,246 +500,3 @@ export interface AddonSession {
257
500
  coWatchingDelegate: CoWatchingDelegate,
258
501
  ): Promise<CoWatchingClient>;
259
502
  }
260
-
261
-
262
- // Original file: index.types.d.ts
263
-
264
-
265
- /**
266
- * Parameters to retrieve the add-on session.
267
- */
268
- export interface AddonSessionOptions {
269
- /**
270
- * The Google Cloud project number of the add-on.
271
- */
272
- cloudProjectNumber: string;
273
- }
274
-
275
- /**
276
- * The main entry point for accessing Meet add-on functionality. Available
277
- * globally under `window.meet.addon`.
278
- */
279
- export interface MeetAddon {
280
- /**
281
- * Returns the {@link
282
- * https://developers.google.com/meet/add-ons/reference/websdk/addon_sdk.frametype
283
- * | FrameType} in which the add-on is running in.
284
- */
285
- getFrameType: () => FrameType;
286
-
287
- /**
288
- * Creates an add-on session.
289
- */
290
- createAddonSession: (options: AddonSessionOptions) => Promise<AddonSession>;
291
- }
292
-
293
- /** The structure of the top-level add-on export. */
294
- interface MeetAddonExport {
295
- addon: MeetAddon;
296
- }
297
-
298
- /** The structure of an error generated from the Meet add-ons SDK. */
299
- interface MeetAddonError extends Error {
300
- readonly errorType: ErrorType;
301
- }
302
-
303
- /**
304
- * The main entry point for accessing Meet add-on functionality.
305
- */
306
- export const meet: MeetAddonExport;
307
-
308
- declare global {
309
- export interface Window {
310
- meet: MeetAddonExport;
311
- }
312
- }
313
-
314
-
315
- // Original file: live_sharing.v2.types.d.ts
316
-
317
-
318
- /**
319
- * Binary-encoded state for CoDoing experiences.
320
- */
321
- export interface CoDoingState {
322
- bytes: Uint8Array;
323
- }
324
-
325
-
326
- /**
327
- * Host-provided set of base configuration options.
328
- */
329
- export interface CoActivityDelegate {
330
- /**
331
- * User-suitable string describing the CoActivity.
332
- */
333
- activityTitle: string;
334
- }
335
-
336
-
337
- /**
338
- * Host-provided set of callbacks required to operate a CoDoing experience.
339
- */
340
- export interface CoDoingDelegate extends CoActivityDelegate {
341
- /**
342
- * Callback for state updates broadcast by other participants in the meeting.
343
- *
344
- * Note: This isn't called in response to local changes.
345
- *
346
- * @param update the state update to be applied.
347
- */
348
- onCoDoingStateChanged(newState: CoDoingState): void;
349
- }
350
-
351
-
352
-
353
- /**
354
- * Client-constructed CoDoing experience with hooks for hosts to notify
355
- * of state updates.
356
- */
357
- export interface CoDoingClient {
358
- /**
359
- * Broadcasts state to all other current participants, and is the default
360
- * state for any participant until some other state is broadcast.
361
- *
362
- * **Note:** This shared state is eventually consistent across
363
- * participants. For predictable behavior, this binary state should be
364
- * complete, not partial, as the Meet add-ons SDK doesn't provide
365
- * guarantees around the delivery of individual messages -- only eventual
366
- * consistency.
367
- *
368
- * **Note:** In a race condition where two participants call this method
369
- * simultaneously, the Meet add-ons SDK selects a canonical winning
370
- * update. The losing update might or might not be applied to participants,
371
- * but the winning update is always applied later.
372
- */
373
- broadcastStateUpdate(newState: CoDoingState): void;
374
- }
375
-
376
-
377
-
378
- /**
379
- * Current PlaybackState for CoWatching experiences.
380
- */
381
- export type PlaybackState =
382
- | 'INVALID'
383
- | 'BUFFERING'
384
- | 'PLAY'
385
- | 'PAUSE'
386
- | 'ENDED';
387
-
388
- /**
389
- * State for CoWatching experiences.
390
- */
391
- export interface CoWatchingState {
392
- /**
393
- * The identifier for the media being played.
394
- *
395
- * Note: The actual format only matters to the co-watching app.
396
- */
397
- mediaId: string;
398
-
399
- /** The current position of the media playout, in seconds. */
400
- mediaPlayoutPosition: number;
401
-
402
- /** The current playout rate, where {@code 1.0} is normal speed. */
403
- mediaPlayoutRate: number;
404
-
405
- /** The current player state, such as Paused, Playing, Buffering, etc. */
406
- playbackState: PlaybackState;
407
- }
408
-
409
-
410
-
411
- type CoWatchingQueryResponse = Pick<CoWatchingState, 'mediaPlayoutPosition'>;
412
-
413
-
414
- /**
415
- * Host-provided set of callbacks required to operate a CoWatching experience.
416
- */
417
- export interface CoWatchingDelegate extends CoActivityDelegate {
418
- /**
419
- * Apply the supplied state to media playout, up to and including switching
420
- * to a new media stream if the mediaId changes.
421
- *
422
- * @param state the new state to be applied to the player.
423
- */
424
- onCoWatchingStateChanged(newState: CoWatchingState): void;
425
-
426
- /**
427
- * Return the current state of the local media playout. This is called
428
- * regularly so it should be written to be performant.
429
- *
430
- * @return a {@link CoWatchingState} describing the current state.
431
- */
432
- onCoWatchingStateQuery(): CoWatchingQueryResponse;
433
- }
434
-
435
-
436
-
437
- /**
438
- * Client-constructed CoWatching experience with hooks for hosts to manage the
439
- * state.
440
- */
441
- export interface CoWatchingClient {
442
- /**
443
- * Notify Meet that the user has switched media so Meet can pass that along
444
- * to other users.
445
- *
446
- * @param mediaTitle The title of the media switched to. This title is
447
- * reflected in the Meet UI when other users are considering connecting to
448
- * the co-watching session.
449
- * @param mediaId The string URI of the media switched to.
450
- * @param mediaPlayoutPosition The position at which the media began playout.
451
- */
452
- notifySwitchedToMedia(
453
- mediaTitle: string,
454
- mediaId: string,
455
- mediaPlayoutPosition: number,
456
- ): void;
457
-
458
- /**
459
- * Notify Meet that the user has paused or unpaused the playback of media, so
460
- * Meet can mirror that action for other users.
461
- *
462
- * @param paused The new paused or unpaused state.
463
- */
464
- notifyPauseState(paused: boolean, mediaPlayoutPosition: number): void;
465
-
466
- /**
467
- * Notify Meet that the user has sought the playback point of the media, so
468
- * Meet can mirror that action for other users.
469
- *
470
- * @param mediaPlayoutPosition The timestamp that the user sought.
471
- */
472
- notifySeekToTimestamp(mediaPlayoutPosition: number): void;
473
-
474
- /**
475
- * Notify Meet that the user updated the playout rate of the media to a new
476
- * value (for example, 1.25x).
477
- *
478
- * @param rate The rate at which the media is now being played.
479
- * @param mediaPlayoutPosition The position at which the media began playout
480
- */
481
- notifyPlayoutRate(rate: number, mediaPlayoutPosition: number): void;
482
-
483
- /**
484
- * Notify Meet that the media isn't ready to be played due to
485
- * buffering, a prior media switch, seeking, or normal network
486
- * congestion.
487
- *
488
- * @param mediaPlayoutPosition The timestamp at which the media is paused or
489
- * waiting for buffering to complete.
490
- */
491
- notifyBuffering(mediaPlayoutPosition: number): void;
492
-
493
- /**
494
- * Notify Meet that the buffering is complete and the media is now ready to
495
- * play, starting at the supplied timestamp.
496
- *
497
- * @param mediaPlayoutPosition The timestamp at which the media is buffered
498
- * and is now ready to play.
499
- */
500
- notifyReady(mediaPlayoutPosition: number): void;
501
- }
502
-
package/meet.addons.mjs CHANGED
@@ -4,75 +4,74 @@ 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){a:{var b=["CLOSURE_FLAGS"];for(var c=ea,d=0;d<b.length;d++)if(c=c[b[d]],c==null){b=null;break a}b=c}a=b&&b[a];return a!=null?a:!0}function ha(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)}}
8
- function ia(a,b){function c(){}c.prototype=b.prototype;a.qa=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.oa=function(d,e,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[e].apply(d,g)}};function ja(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,ja);else{const c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}ia(ja,Error);ja.prototype.name="CustomError";function ka(a){ea.setTimeout(()=>{throw a;},0)};var la=fa(748402147),ma=fa(824656860);function na(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};const oa=/[-_.]/g,pa={"-":"+",_:"/",".":"="};function qa(a){return pa[a]||""}var ra={};function sa(){return ta||(ta=new ua(null,ra))}var ua=class{constructor(a,b){va(b);this.g=a;if(a!=null&&a.length===0)throw Error("ByteString should be constructed with non-empty values");}};let ta;function va(a){if(a!==ra)throw Error("illegal external caller");};function wa(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let xa=void 0;function ya(a){a=Error(a);wa(a,"warning");return a};function za(){return typeof BigInt==="function"};function Aa(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var Ba=Aa(),Ca=Aa(),Da=Aa("m_m",!0);const l=Aa("jas",!0);var Ea;const Fa=[];Fa[l]=7;Ea=Object.freeze(Fa);var Ga={};function m(a,b){return b===void 0?a.g!==Ha&&!!(2&(a.l[l]|0)):!!(2&b)&&a.g!==Ha}const Ha={};function Ia(a,b){if(a!=null)if(typeof a==="string")a=a?new ua(a,ra):sa();else if(a.constructor!==ua)if(a!=null&&a instanceof Uint8Array)a=a.length?new ua(new Uint8Array(a),ra):sa();else{if(!b)throw Error();a=void 0}return a}var Ja=Object.freeze({});function Ka(a){a.pa=!0;return a};var La=Ka(a=>typeof a==="number"),Ma=Ka(a=>typeof a==="string"),Na=Ka(a=>typeof a==="boolean");var Oa=typeof ea.BigInt==="function"&&typeof ea.BigInt(0)==="bigint";function p(a){var b=a;if(Ma(b)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(b))throw Error(String(b));}else if(La(b)&&!Number.isSafeInteger(b))throw Error(String(b));return Oa?BigInt(a):a=Na(a)?a?"1":"0":Ma(a)?a.trim()||"0":String(a)}var Ua=Ka(a=>Oa?a>=Pa&&a<=Qa:a[0]==="-"?Ra(a,Sa):Ra(a,Ta));const Sa=Number.MIN_SAFE_INTEGER.toString(),Pa=Oa?BigInt(Number.MIN_SAFE_INTEGER):void 0,Ta=Number.MAX_SAFE_INTEGER.toString(),Qa=Oa?BigInt(Number.MAX_SAFE_INTEGER):void 0;
9
- function Ra(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 Va(a){const b=a>>>0;q=b;t=(a-b)/4294967296>>>0}function Wa(a){if(a<0){Va(-a);const [b,c]=Xa(q,t);q=b>>>0;t=c>>>0}else Va(a)}function Ya(a,b){b>>>=0;a>>>=0;if(b<=2097151)var c=""+(4294967296*b+a);else za()?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+Za(c)+Za(a));return c}
10
- function Za(a){a=String(a);return"0000000".slice(a.length)+a}function $a(){var a=q,b=t;if(b&2147483648)if(za())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{const [c,d]=Xa(a,b);a="-"+Ya(c,d)}else a=Ya(a,b);return a}function Xa(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};function ab(a,b=`unexpected value ${a}!`){throw Error(b);};const bb=typeof BigInt==="function"?BigInt.asIntN:void 0,cb=Number.isSafeInteger,db=Number.isFinite,eb=Math.trunc;function fb(a){if(a==null||typeof a==="number")return a;if(a==="NaN"||a==="Infinity"||a==="-Infinity")return Number(a)}const gb=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function hb(a){switch(typeof a){case "bigint":return!0;case "number":return db(a);case "string":return gb.test(a);default:return!1}}
11
- function ib(a){if(a!=null){if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;db(a)}}
12
- function lb(a){var b=void 0;b!=null||(b=ma?1024:0);if(!hb(a))throw ya("int64");const c=typeof a;switch(b){case 512:switch(c){case "string":return mb(a);case "bigint":return String(bb(64,a));default:return nb(a)}case 1024:switch(c){case "string":return ob(a);case "bigint":return p(bb(64,a));default:return pb(a)}case 0:switch(c){case "string":return mb(a);case "bigint":return p(bb(64,a));default:return qb(a)}default:return ab(b,"Unknown format requested type for int64")}}
13
- function rb(a){var b=a.length;if(a[0]==="-"?b<20||b===20&&a<="-9223372036854775808":b<19||b===19&&a<="9223372036854775807")return a;if(a.length<16)Wa(Number(a));else if(za())a=BigInt(a),q=Number(a&BigInt(4294967295))>>>0,t=Number(a>>BigInt(32)&BigInt(4294967295));else{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]=Xa(q,t);q=d;t=e}}return $a()}
14
- function qb(a){a=eb(a);if(!cb(a)){Wa(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:Ya(b,c);a=typeof b==="number"?a?-b:b:a?"-"+b:b}return a}function nb(a){a=eb(a);cb(a)?a=String(a):(Wa(a),a=$a());return a}function mb(a){var b=eb(Number(a));if(cb(b))return String(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));return rb(a)}
15
- function ob(a){var b=eb(Number(a));if(cb(b))return p(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));return za()?p(bb(64,BigInt(a))):p(rb(a))}function pb(a){return cb(a)?p(qb(a)):p(nb(a))}function sb(a){const b=typeof a;if(a==null)return a;if(b==="bigint")return p(bb(64,a));if(hb(a))return b==="string"?ob(a):pb(a)}function u(a){if(a!=null&&typeof a!=="string")throw Error();return a}
16
- function tb(a,b,c){if(a!=null&&a[Da]===Ga)return a;if(Array.isArray(a)){var d=a[l]|0;c=d|c&32|c&2;c!==d&&(a[l]=c);return new b(a)}};function ub(a){return a};function vb(a,b,c,d){var e=d!==void 0;d=!!d;const f=[];var g=a.length;let h,k=4294967295,n=!1;const r=!!(b&64),z=r?b&128?0:-1:void 0;if(!(b&1||(h=g&&a[g-1],h!=null&&typeof h==="object"&&h.constructor===Object?(g--,k=g):h=void 0,!r||b&128||e))){n=!0;var A;k=((A=wb)!=null?A:ub)(k-z,z,a,h,void 0)+z}b=void 0;for(e=0;e<g;e++)if(A=a[e],A!=null&&(A=c(A,d))!=null)if(r&&e>=k){const I=e-z;let J;((J=b)!=null?J:b={})[I]=A}else f[e]=A;if(h)for(let I in h){a=h[I];if(a==null||(a=c(a,d))==null)continue;g=+I;let J;
17
- if(r&&!Number.isNaN(g)&&(J=g+z)<k)f[J]=a;else{let R;((R=b)!=null?R:b={})[I]=a}}b&&(n?f.push(b):f[k]=b);return f}
18
- function xb(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return Ua(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:vb(a,b,xb)}if(a!=null&&a[Da]===Ga)return yb(a);if(a instanceof ua){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):
19
- b);a=a.g=btoa(c)}return a}return}return a}let wb;function yb(a){a=a.l;return vb(a,a[l]|0,xb)};function zb(a,b,c,d=0){if(a==null){var e=32;c?(a=[c],e|=128):a=[];b&&(e=e&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw Error("narr");e=a[l]|0;if(la&&1&e)throw Error("rfarr");2048&e&&!(2&e)&&Ab();if(e&256)throw Error("farr");if(e&64)return(e|d)!==e&&(a[l]=e|d),a;if(c&&(e|=128,c!==a[0]))throw Error("mid");a:{c=a;e|=64;var f=c.length;if(f){var g=f-1;const k=c[g];if(k!=null&&typeof k==="object"&&k.constructor===Object){b=e&128?0:-1;g-=b;if(g>=1024)throw Error("pvtlmt");for(var h in k)if(f=
20
- +h,f<g)c[f+b]=k[h],delete k[h];else break;e=e&-16760833|(g&1023)<<14;break a}}if(b){h=Math.max(b,f-(e&128?0:-1));if(h>1024)throw Error("spvt");e=e&-16760833|(h&1023)<<14}}}a[l]=e|64|d;return a}function Ab(){if(la)throw Error("carr");if(Ca!=null){var a;var b=(a=xa)!=null?a:xa={};a=b[Ca]||0;a>=5||(b[Ca]=a+1,b=Error(),wa(b,"incident"),ka(b))}};function Bb(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){var c=a[l]|0;a.length===0&&c&1?a=void 0:c&2||(!b||4096&c||16&c?a=Cb(a,c,!1,b&&!(c&16)):(a[l]|=34,c&4&&Object.freeze(a)));return a}if(a!=null&&a[Da]===Ga)return b=a.l,c=b[l]|0,m(a,c)?a:Db(a,b,c)?Eb(a,b):Cb(b,c);if(a instanceof ua)return a}function Eb(a,b,c){a=new a.constructor(b);c&&(a.g=Ha);a.A=Ha;return a}function Cb(a,b,c,d){d!=null||(d=!!(34&b));a=vb(a,b,Bb,d);d=32;c&&(d|=2);b=b&16769217|d;a[l]=b;return a}
21
- function Fb(a){const b=a.l,c=b[l]|0;return m(a,c)?Db(a,b,c)?Eb(a,b,!0):new a.constructor(Cb(b,c,!1)):a}function Gb(a){if(a.g!==Ha)return!1;var b=a.l;b=Cb(b,b[l]|0);b[l]|=2048;a.l=b;a.g=void 0;a.A=void 0;return!0}function Hb(a){if(!Gb(a)&&m(a,a.l[l]|0))throw Error();}function Ib(a,b){b===void 0&&(b=a[l]|0);b&32&&!(b&4096)&&(a[l]=b|4096)}function Db(a,b,c){return c&2?!0:c&32&&!(c&4096)?(b[l]=c|2,a.g=Ha,!0):!1};const Jb=p(0);function v(a,b,c,d){a=Kb(a.l,b,c,d);if(a!==null)return a}function Kb(a,b,c,d){if(b===-1)return null;const e=b+(c?0:-1),f=a.length-1;let g,h;if(!(f<1+(c?0:-1))){if(e>=f)if(g=a[f],g!=null&&typeof g==="object"&&g.constructor===Object)c=g[b],h=!0;else if(e===f)c=g;else return;else c=a[e];if(d&&c!=null){d=d(c);if(d==null)return d;if(!Object.is(d,c))return h?g[b]=d:a[e]=d,d}return c}}function Lb(a,b,c){Hb(a);const d=a.l;w(d,d[l]|0,b,c);return a}
22
- function w(a,b,c,d){const e=c+-1;var f=a.length-1;if(f>=0&&e>=f){const g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object)return g[c]=d,b}if(e<=f)return a[e]=d,b;if(d!==void 0){let g;f=((g=b)!=null?g:b=a[l]|0)>>14&1023||536870912;c>=f?d!=null&&(a[f+-1]={[c]:d}):a[e]=d}return b}function Mb(a,b,c,d){const e=a.l;var f=e[l]|0;a=x(a,d)===c?c:-1;return Nb(e,f,b,a)!==void 0}function Ob(a){return!!(2&a)&&!!(4&a)||!!(256&a)}function Pb(a){return Ia(a,!0)}
23
- function y(a,b,c,d){Hb(a);const e=a.l;w(e,e[l]|0,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}function x(a,b){a=a.l;return Qb(Rb(a),a,void 0,b)}function Rb(a){let b;return(b=a[Ba])!=null?b:a[Ba]=new Map}function Qb(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 g=d[f];Kb(b,g)!=null&&(e!==0&&(c=w(b,c,e)),e=g)}a.set(d,e);return e}
24
- function Nb(a,b,c,d){let e=!1;d=Kb(a,d,void 0,f=>{const g=tb(f,c,b);e=g!==f&&g!=null;return g});if(d!=null)return e&&!m(d)&&Ib(a,b),d}function Sb(a,b,c){let d=a.l,e=d[l]|0;b=Nb(d,e,b,c);if(b==null)return b;e=d[l]|0;if(!m(a,e)){const f=Fb(b);f!==b&&(Gb(a)&&(d=a.l,e=d[l]|0),b=f,e=w(d,e,c,b),Ib(d,e))}return b}function Tb(a){a==null&&(a=void 0);return a}function Ub(a,b,c){c=Tb(c);Lb(a,b,c);c&&!m(c)&&Ib(a.l);return a}
25
- function B(a,b,c,d){d=Tb(d);a:{var e=d;Hb(a);const h=a.l;var f=h[l]|0;if(e==null){var g=Rb(h);if(Qb(g,h,f,c)===b)g.set(c,0);else break a}else{g=h;const k=Rb(g),n=Qb(k,g,f,c);n!==b&&(n&&(f=w(g,f,n)),k.set(c,b))}w(h,f,b,e)}d&&!m(d)&&Ib(a.l);return a}
26
- function Vb(a,b){Hb(a);const c=a.l;let d=c[l]|0;if(b==null)return w(c,d,1),a;let e=b===Ea?7:b[l]|0,f=e;const g=Ob(e),h=g||Object.isFrozen(b);let k=!0,n=!0;for(let z=0;z<b.length;z++){var r=b[z];g||(r=m(r),k&&(k=!r),n&&(n=r))}g||(e=k?13:5,e=n?e&-4097:e|4096);h&&e===f||(b=[...b],f=0,e=Wb(e,d));e!==f&&(b[l]=e);d=w(c,d,1,b);2&e||!(4096&e||16&e)||Ib(c,d);return a}function Wb(a,b){return a=(2&b?a|2:a&-3)&-273}
27
- function Xb(a){a=v(a,1);a=a==null||typeof a==="boolean"?a:typeof a==="number"?!!a:void 0;return a!=null?a:!1}function Yb(a){a=ma?v(a,1,void 0,sb):sb(v(a,1));return a!=null?a:Jb}function C(a,b){a=v(a,b);a=a==null||typeof a==="string"?a:void 0;return a!=null?a:""}function D(a,b){a=v(a,b);a=a==null?a:db(a)?a|0:void 0;return a!=null?a:0}function E(a,b,c,d){c=x(a,d)===c?c:-1;return Sb(a,b,c)}function Zb(a,b){return y(a,1,b==null?b:lb(b),"0")}
28
- function F(a,b,c){if(c!=null){if(!db(c))throw ya("enum");c|=0}return y(a,b,c,0)};function $b(){var a=ac||(ac=bc("[1,2,0]"));a=Fb(a);a=Lb(a,4,u("dev-882204219"));const b=a.l,c=b[l]|0;return m(a,c)?a:Db(a,b,c)?Eb(a,b):new a.constructor(Cb(b,c,!0))}var G=class{constructor(a){this.l=zb(a,void 0,void 0,2048)}toJSON(){return yb(this)}};G.prototype[Da]=Ga;G.prototype.toString=function(){return this.l.toString()};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[l]|=32;b=new a(b)}return b}};var bc=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 G{});var dc=class extends G{};function ec(a){var b=new fc(500);let c=0,d;return(...e)=>{hc(b)?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;let f;(f=d)==null||f()},ic(b))))}}function jc(a){var b=new fc(100),c=Promise.resolve();return(...d)=>hc(b)?a(...d):c};function hc(a){return kc(a,a.index)>=a.g?(a.h[a.index]=Date.now(),a.index=(a.index+1)%1,!0):!1}function ic(a){const b=a.g;a=kc(a,a.index);return a>=b?0:b-a}function kc(a,b){let c;return Date.now()-((c=a.h[b])!=null?c:-1*a.g)}var fc=class{constructor(a){this.g=a;this.h=[];this.index=0}};var lc=class extends G{},mc=[2,3];var nc=class extends G{};var H=class extends Error{constructor({errorType:a,message:b,i:c}){super(`Meet add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},K={errorType:"InternalError",message:"An unexpected error has occurred.",i:"No further information is available."},oc={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)."},
29
- pc={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."},qc={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."},rc={errorType:"NotSupportedInStandalone",
30
- message:"This method is not supported in standalone mode.",i:"Do not call this method in standalone mode."},sc={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."},tc={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)."},
31
- uc={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."},vc={errorType:"DestinationNotReady",
32
- 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."},wc={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."},yc={errorType:"ActivityStartingStateMissingAttributes",
33
- 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."},zc={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."},
34
- Ac={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."},Bc={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."},
35
- Cc=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."}),L=(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."}),Dc=a=>({errorType:"InternalError",message:`Could not connect to ${a} channel. Unknown error`,
36
- i:"No further information is available."}),Ec={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",i:"Ensure that no activity is ongoing."},Fc={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",i:"Send one of the available commands in the frame message."},Gc={errorType:"NoActivityFound",message:"No activity found.",i:"Ensure that the activity is started before performing this operation."},Hc={errorType:"RequiresEapEnrollment",
37
- message:"This feature is only available to early access partners.",i:"Meet add-on early access enrollment is currently closed."},Ic={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."},Jc={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",
38
- i:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Kc={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."},Lc={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",i:"Only instantiate the AddonSession once."},Mc={errorType:"UserCancelled",
39
- message:"The user cancelled starting an activity.",i:"The user needs to click continue to start the activity."},Nc={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",i:"Do not call this method during a Meet call."},Oc={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."},
40
- Pc={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."},Qc={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."};
41
- function Rc(a){switch(a){case 0:return K;case 1:return vc;case 2:return wc;case 3:return Ec;case 4:return Fc;case 5:return Hc;case 6:return rc;case 7:return Ic;case 8:return Jc;case 9:return Kc;case 10:return Mc;case 11:return Nc;case 12:return Oc;case 13:return Pc;case 14:return Gc;case 15:return Qc;default:return K}}
42
- function Sc(a){let b;var c=(b=D(a,1))!=null?b:0;a=Tc(x(a,mc));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}.`,
43
- 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 Dc(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.`,
44
- i:"No further information is available."}}return c;default:return Dc(a)}}function Tc(a){switch(a){case 2:return"co";case 3:return"gd";case 0:return"unknown";default:return"unknown"}}function M({errorType:a,message:b,i:c},d=""){throw new H({errorType:a,message:d?`${b} ${d}`:b,i:c});}function Uc(a,b){M({...oc,message:`${oc.message}: ${a}. In URL ${b}`})};function Vc(a){var b=new Wc;return F(b,1,a)}function Xc(a,b){return y(a,2,u(b),"")}function Yc(a,b){return y(a,3,u(b),"")}var Wc=class extends G{getFrameType(){return D(this,1)}};function Zc(a){var b=a.l,c=b,d=b[l]|0,e=Wc;b=void 0===Ja?2:4;var f=m(a,d);const g=f?1:b;b=g===3;var h=!f;(g===2||h)&&Gb(a)&&(c=a.l,d=c[l]|0);a=Kb(c,1);f=Array.isArray(a)?a:Ea;var k=f===Ea?7:f[l]|0;a=k;2&d&&(a|=2);var n=a|1;if(a=!(4&n)){var r=f,z=d;const A=!!(2&n);A&&(z|=2);let I=!A,J=!0,R=0,jb=0;for(;R<r.length;R++){const kb=tb(r[R],e,z);if(kb instanceof e){if(!A){const xc=m(kb);I&&(I=!xc);J&&(J=xc)}r[jb++]=kb}}jb<R&&(r.length=jb);n|=4;n=J?n&-4097:n|4096;n=I?n|8:n&-9}n!==k&&(f[l]=n,2&n&&Object.freeze(f));
45
- if(h&&!(8&n||!f.length&&(g===1||(g!==4?0:2&n||!(16&n)&&32&d)))){Ob(n)&&(f=[...f],n=Wb(n,d),d=w(c,d,1,f));e=f;h=n;for(k=0;k<e.length;k++)r=e[k],n=Fb(r),r!==n&&(e[k]=n);h|=8;n=h=e.length?h|4096:h&-4097;f[l]=n}h=e=n;g===1||(g!==4?0:2&e||!(16&e)&&32&d)?Ob(e)||(e|=!f.length||a&&!(4096&e)||32&d&&!(4096&e||16&e)?2:256,e!==h&&(f[l]=e),Object.freeze(f)):(g===2&&Ob(e)&&(f=[...f],h=0,e=Wb(e,d),d=w(c,d,1,f)),Ob(e)||(b||(e|=16),e!==h&&(f[l]=e)));2&e||!(4096&e||16&e)||Ib(c,d);return f}
46
- function $c(a){var b=new ad;return Vb(b,a)}var ad=class extends G{};var bd=class extends G{};function cd(a){return Sb(a,ad,1)}var dd=class extends G{};var ed=class extends G{};var fd=class extends G{};var gd=class extends G{};var hd=class extends G{getMeetPlatformInfo(){return Sb(this,fd,1)}};var id=class extends G{getMeetingInfo(){return Sb(this,gd,1)}};var jd=class extends G{},N=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21];var kd=class extends G{};var ld=class extends G{};var md=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),nd=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function od(a){a&&typeof a.dispose=="function"&&a.dispose()};function O(){this.o=this.o;this.g=this.g}O.prototype.o=!1;O.prototype.dispose=function(){this.o||(this.o=!0,this.H())};O.prototype[Symbol.dispose]=function(){this.dispose()};function pd(a,b){a.o?b():(a.g||(a.g=[]),a.g.push(b))}O.prototype.H=function(){if(this.g)for(;this.g.length;)this.g.shift()()};function qd({J:a,R:b}){if(a===null)throw new H(Cc("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new H(L("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new H(L("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new H(L("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!==
47
- "string")throw new H(L("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new H(zc);if(Object.keys(a).length===0)throw new H(yc);}}function rd(a){const b=[];b.push(Yc(Xc(Vc(2),a.mainStageUrl),a.additionalData));b.push(Yc(Xc(Vc(1),a.sidePanelUrl),a.additionalData));return b}
48
- var Ad=class extends O{constructor(a){super();this.context=a;this.h={};sd(this.context.g.U,b=>{switch(x(b.content,N)){case 7:const d=this.h.frameToFrameMessage;b=E(b.content,ed,7,N);if(d&&b){var c=D(b,1);c=md.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:C(b,2)})}}},this)}async getMeetingInfo(){var a=await td(this.context.g);var b=a.getMeetingInfo();b=C(b,1);a=a.getMeetingInfo();a=C(a,2);return{meetingId:b,meetingCode:a}}async getFrameOpenReason(){let a;const b=(a=
49
- this.context.h.da)!=null?a:0;let c;return(c=nd.get(b))!=null?c:"UNKNOWN"}async getActivityStartingState(){var a=cd(await ud(this.context.g));const b=a==null?void 0:Zc(a).find(c=>c.getFrameType()===2);a=a==null?void 0:Zc(a).find(c=>c.getFrameType()===1);return{mainStageUrl:(b==null?void 0:C(b,2))||void 0,sidePanelUrl:(a==null?void 0:C(a,2))||void 0,additionalData:(a==null?void 0:C(a,3))||void 0}}async setActivityStartingState(a){qd({J:a,R:!0});var b=rd(a);a=vd;var c=this.context.g;var d=new kd;b=$c(b);
50
- d=Ub(d,1,b);await a(c,d)}on(a,b){this.h[a]=b}async getMeetPlatformInfo(){var a=(await wd(this.context.g)).getMeetPlatformInfo();return{isMeetHardware:Xb(a)}}async closeAddon(){await xd(this.context.g)}async startActivity(a){qd({J:a,R:!1});const b=new ld;a&&(a=rd(a),a=$c(a),Ub(b,1,a));await yd(this.context.g,b)}async endActivity(a){var b=zd,c=this.context.g,d=new bd;a=F(d,1,a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0);await b(c,a)}};var Bd=cc(class extends G{getFrameOpenReason(){return D(this,5)}});function Cd(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");if(c)b=Bd(atob(c));else{var d;((d=window.top)!=null?d:window)===window?M(sc):Uc("meet_sdk",b);b=void 0}(c=C(b,1))||Uc("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new H(tc);(d=C(b,2))||Uc("meet_control_channel_name",a);const e=C(b,4);e||Uc("addon_cloud_project_number",a);var f;a=(f=b.getFrameOpenReason())!=null?f:0;f=C(b,3)||"https://meet.google.com";return{da:a,frameType:c,
51
- ca:d,cloudProjectNumber:e,S:f}};var Dd=class extends G{};var Ed=class extends G{};var Fd=class extends G{};function Gd(){var a=new Hd,b=new Fd;return B(a,1,Id,b)}var Hd=class extends G{},Id=[1,2];function Jd(a){var b=new Kd;return Ub(b,2,a)}function Ld(a,b){return y(a,3,u(b),"")}var Kd=class extends G{};var Md=class extends G{};var Nd=class extends G{};var Od=class extends G{};var Pd=class extends G{};var Qd=class extends G{};var Rd=class extends G{};var Sd=class extends G{setAddonStartingState(a){return Ub(this,1,a)}};var Td=class extends G{};function Ud(a,b){return B(a,2,P,b)}var Q=class extends G{},P=[1,2,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20];function Vd(a){return E(a,jd,2,Wd)}var Xd=class extends G{},Yd=cc(Xd),Wd=[1,2];class Zd{constructor(a,b){this.data=a;this.channel=b}};var $d=Promise;function ae(a){const b=new MessageChannel;be(b.port1,a);return b}function ce(a,b){be(a,b);return new de(a)}class de{constructor(a){this.g=a}send(a,b,c=[]){b=ae(b);this.g.postMessage(a,[b.port2].concat(c))}D(a,b){return new $d(c=>{this.send(a,c,b)})}}function be(a,b){b&&(a.onmessage=c=>{var d=c.data;c=ce(c.ports[0]);b(new Zd(d,c))})};var ee=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?a=>a&&AsyncContext.Snapshot.wrap(a):a=>a;function fe(a,b){a.m(b);a.h<100&&(a.h++,b.next=a.g,a.g=b)}class ge{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 he(){var a=ie;let b=null;a.g&&(b=a.g,a.g=a.g.next,a.g||(a.h=null),b.next=null);return b}class je{constructor(){this.h=this.g=null}add(a,b){const c=ke.get();c.set(a,b);this.h?this.h.next=c:this.g=c;this.h=c}}var ke=new ge(()=>new le,a=>a.reset());class le{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 me,ne=!1,ie=new je,pe=(a,b)=>{me||oe();ne||(me(),ne=!0);ie.add(a,b)},oe=()=>{const a=Promise.resolve(void 0);me=()=>{a.then(qe)}};function qe(){let a;for(;a=he();){try{a.h.call(a.g)}catch(b){ka(b)}fe(ke,a)}ne=!1};function re(){};function S(a){this.g=0;this.T=void 0;this.m=this.h=this.j=null;this.u=this.A=!1;if(a!=re)try{const b=this;a.call(void 0,function(c){se(b,2,c)},function(c){se(b,3,c)})}catch(b){se(this,3,b)}}function te(){this.next=this.context=this.h=this.m=this.g=null;this.j=!1}te.prototype.reset=function(){this.context=this.h=this.m=this.g=null;this.j=!1};var ue=new ge(function(){return new te},function(a){a.reset()});function ve(a,b,c){const d=ue.get();d.m=a;d.h=b;d.context=c;return d}
52
- function we(){let a,b;const c=new S(function(d,e){a=d;b=e});return new xe(c,a,b)}S.prototype.then=function(a,b,c){return ye(this,ee(typeof a==="function"?a:null),ee(typeof b==="function"?b:null),c)};S.prototype.$goog_Thenable=!0;function ze(a,b){b=ee(b);b=ve(b,b);b.j=!0;Ae(a,b)}S.prototype.cancel=function(a){if(this.g==0){const b=new T(a);pe(function(){Be(this,b)},this)}};
53
- function Be(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 g=c.h;g&&(g.j||(d++,g.g==a&&(e=g),!(e&&d>1)));g=g.next)e||(f=g);e&&(c.g==0&&d==1?Be(c,b):(f?(d=f,d.next==c.m&&(c.m=d),d.next=d.next.next):Ce(c),De(c,e,3,b)))}a.j=null}else se(a,3,b)}function Ae(a,b){a.h||a.g!=2&&a.g!=3||Ee(a);a.m?a.m.next=b:a.h=b;a.m=b}
54
- function ye(a,b,c,d){const e=ve(null,null,null);e.g=new S(function(f,g){e.m=b?function(h){try{const k=b.call(d,h);f(k)}catch(k){g(k)}}:f;e.h=c?function(h){try{const k=c.call(d,h);k===void 0&&h instanceof T?g(h):f(k)}catch(k){g(k)}}:g});e.g.j=a;Ae(a,e);return e.g}S.prototype.na=function(a){this.g=0;se(this,2,a)};S.prototype.Y=function(a){this.g=0;se(this,3,a)};
55
- function se(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.na,f=a.Y;if(d instanceof S){Ae(d,ve(e||re,f||null,a));var g=!0}else{if(d)try{var h=!!d.$goog_Thenable}catch(k){h=!1}else h=!1;if(h)d.then(e,f,a),g=!0;else{h=typeof d;if(h=="object"&&d!=null||h=="function")try{const k=d.then;if(typeof k==="function"){Fe(d,k,e,f,a);g=!0;break a}}catch(k){f.call(a,k);g=!0;break a}g=!1}}}g||(a.T=c,a.g=b,a.j=null,Ee(a),b!=3||c instanceof T||Ge(a,c))}}
56
- function Fe(a,b,c,d,e){function f(k){h||(h=!0,d.call(e,k))}function g(k){h||(h=!0,c.call(e,k))}let h=!1;try{b.call(a,g,f)}catch(k){f(k)}}function Ee(a){a.A||(a.A=!0,pe(a.ma,a))}function Ce(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.ma=function(){let a;for(;a=Ce(this);)De(this,a,this.g,this.T);this.A=!1};
57
- function De(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,He(b,c,d);else try{b.j?b.m.call(b.context):He(b,c,d)}catch(e){Ie.call(null,e)}fe(ue,b)}function He(a,b,c){b==2?a.m.call(a.context,c):a.h&&a.h.call(a.context,c)}function Ge(a,b){a.u=!0;pe(function(){a.u&&Ie.call(null,b)})}var Ie=ka;function T(a){ja.call(this,a)}ia(T,ja);T.prototype.name="cancel";function xe(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let Je=1,Ke=new WeakMap;function Le(a,b,c){var d=Me;a.h.has(b);d(b,c)}var Oe=class extends O{constructor(){super();this.h=new Set}signal(){const a=new Ne;this.h.add(a);pd(this,ha(od,a));return a}};function Me(a,b){return new Promise(c=>{Pe(()=>{a.L&&(a.fa=b,a.P=!0);for(const {I:d,slot:e}of a.v.values())try{e(b,{signal:a,I:d})}catch(f){ka(f)}for(const d of a.C)d.resolve(b);a.C.clear();c()})})}function sd(a,b,c){const d=Je++;Pe(()=>{Qe(a,d,b,c)})}
58
- function Qe(a,b,c,d){if(!a.o)if(d){if(!d.o){const e=()=>{Pe(()=>{a.v.delete(b);const f=Ke.get(d);f&&na(f,e)})};a.v.set(b,{I:b,slot:c,G:e});Re(d,e)}}else a.v.set(b,{I:b,slot:c,G:()=>a.v.delete(b)})}
59
- var Ne=class extends O{constructor(){super();this.L=!1;this.v=new Map;this.C=new Set;this.P=!1}detach(a){Pe(()=>{const b=this.v.get(a);b&&b.G()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){const c=we();Pe(()=>{if(this.o)c.reject(new T("Signal initially disposed"));else if(b&&b.o)c.reject(new T("Owner initially disposed"));else if(a&&this.L&&this.P)c.resolve(this.fa);else if(this.C.add(c),ze(c.promise,()=>{this.C.delete(c)}),b){const d=()=>{c.reject(new T("Owner asynchronously disposed"))};
60
- ze(c.promise,()=>{const e=Ke.get(b);e&&na(e,d)});Re(b,d)}});return c.promise}H(){super.H();Pe(()=>{for(const {G:a}of this.v.values())a();this.v.clear();for(const a of this.C)a.reject(new T("Signal asynchronously disposed"));this.C.clear()})}};const Se=[];let Te=!1;function Pe(a){Se.push(a);Ue()}async function Ue(){if(!Te)try{Te=!0;let a=Ve(0);for(;a<Se.length;)await Promise.resolve(),a=Ve(a)}catch(a){ka(a)}finally{Se.length=0,Te=!1}}
61
- function Ve(a){const b=a+100;for(;a<b&&a<Se.length;)try{Se[a++]()}catch(c){ka(c)}return a}function Re(a,b){if(a.o)b();else{var c=Ke.get(a);if(c)c.push(b);else{const d=[b];Ke.set(a,d);pd(a,()=>{for(const e of[...d])e();Ke.delete(a)})}}};function U(a){var b=new Xd;a=B(b,1,Wd,a);return{content:JSON.stringify(yb(a))}}const We=new Oe;function Xe(a,b){const c=We.signal();return{channel:ce(a,d=>{const e=b(d.data);Le(We,c,{content:e,la:d})}),signal:c}};let ac;var V=class extends G{};var W=class extends G{};var Ze=class extends G{j(){return E(this,V,2,Ye)}h(){return Mb(this,V,2,Ye)}m(){return E(this,W,3,Ye)}u(){return Mb(this,W,3,Ye)}},Ye=[2,3];var $e=cc(class extends G{});var af=cc(class extends G{}),bf=[1,2];var cf=({destination:a,origin:b,ra:c,Z:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");const f=ae(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return ce(f.port1,e)};function df(a,b,c){const d=new Oe,e=d.signal();a=cf({destination:window.parent,origin:b,Z:a,onMessage:f=>{const g=Yd(f.data.content);x(g,Wd)===2&&Le(d,e,{content:Vd(g),la:f,messagePort:f.data.messagePort})}});return new ef(e,a,c)}async function td(a){var b=X;var c=new Q;var d=new Od;c=B(c,19,P,d);a=await b(a,U(c));let e;return(e=Vd(Yd(a.data.content)))==null?void 0:E(e,id,20,N)}
62
- async function ud(a){var b=X;var c=new Q;var d=new Ed;c=B(c,17,P,d);a=await b(a,U(c));let e;return(e=Vd(Yd(a.data.content)))==null?void 0:E(e,dd,18,N)}async function vd(a,b){var c=X,d=new Q;b=B(d,8,P,b);await c(a,U(b))}async function wd(a){var b=X;var c=new Q;var d=new Nd;c=B(c,18,P,d);a=await b(a,U(c));let e;return(e=Vd(Yd(a.data.content)))==null?void 0:E(e,hd,19,N)}async function xd(a){var b=X;var c=new Q;var d=new Dd;c=B(c,11,P,d);await b(a,U(c))}
63
- async function yd(a,b){var c=X,d=new Q;b=B(d,14,P,b);await c(a,U(b))}async function zd(a,b){var c=X,d=new Q;b=B(d,15,P,b);await c(a,U(b))}async function ff(a){await a.h()}
64
- async function X(a,b){(a=await a.channel.D(b))||M(K,"Falsy response received from the message channel."+` ${JSON.stringify(a)}`);(b=a.data)||M(K,"Data field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);(b=b.content)||M(K,"Content field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);let c=void 0;try{c=Yd(b)}catch(d){M(K,"The ControlMessage can't be deserialized."+` ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=Vd(c))||M(K,"MeetToAddonMessage field on ControlMessage is falsy."+
65
- ` ${JSON.stringify(b)}`);b=b==null?void 0:E(b,nc,10,N);if((b==null?void 0:D(b,1))!==void 0)throw a=D(b,1),new H(Rc(a));return a}async function gf(a,b,c){var d=X,e=new Q;b=B(e,1,P,b);d=await d(a,U(b));a=d.data.messagePort;var f;(d=(f=Vd(Yd(d.data.content)))==null?void 0:E(f,lc,1,N))!=null?f=d:(f=new lc,f=F(f,1,0));return{channel:a?Xe(a,c):void 0,response:f}}async function hf(a){const b=Gd(),{channel:c,response:d}=await gf(a,b,e=>af(e));if(!c)throw new H(Sc(d));return c}
66
- async function jf(a){var b=X;var c=new Q;var d=new Td;c=B(c,5,P,d);await b(a,U(c))}async function kf(a){var b=X;var c=new Q;var d=new Md;c=B(c,6,P,d);await b(a,U(c))}async function lf(a,b,c){var d=X,e=new Q,f=new Pd;b=F(f,1,b);c=y(b,2,u(c),"");e=B(e,7,P,c);await d(a,U(e))}async function mf(a,b){var c=X,d=new Q;b=B(d,16,P,b);await c(a,U(b))}
67
- class ef extends O{constructor(a,b,c){super();this.U=a;this.channel=b;this.h=jc(async()=>{var d=this.channel,e=d.D;var f=new Q;var g=new Qd;f=B(f,13,P,g);await e.call(d,U(f))});a=$b();C(a,4);ib(v(a,1));ib(v(a,2));ib(v(a,3));c=Ud(new Q,Ld(Jd(a),c));this.channel.send(U(c));sd(this.U,async d=>{switch(x(d.content,N)){case 16:await ff(this)}},this)}};let nf;var of=class{constructor(a){var b=nf;this.h=a;this.g=b}delete(){throw Error("Not implemented.");}};var qf=class extends G{j(){return E(this,V,2,pf)}h(){return Mb(this,V,2,pf)}m(){return E(this,W,3,pf)}u(){return Mb(this,W,3,pf)}},pf=[2,3];var rf=class extends G{};var sf=class extends G{};var tf=class extends G{};var vf=class extends G{j(){return E(this,V,2,uf)}h(){return Mb(this,V,2,uf)}m(){return E(this,W,3,uf)}u(){return Mb(this,W,3,uf)}},uf=[2,3],wf=[5,6];var xf=class extends G{};var yf=class extends G{},zf=[1,2,3];var Af=class extends Error{constructor(){super("Failed to create CoActivity: Connection refused - Meet refused to begin Live Sharing")}};var Bf=class{constructor(a){this.config=a}start(){this.g!=null||(this.g=setInterval(()=>{this.config.ia()},this.config.ea));return this}shutdown(){clearInterval(this.g)}};function Cf(a){return Ua(a)?Number(a):String(a)};function Df(){const a=new Map,b={set(c,d){a.set(c,d);return b},F:()=>a};return b};function Ef(a){if(a.h()){a=a.j();a=v(a,1,void 0,Pb);var b=a==null?sa():a;a=Uint8Array;va(ra);var c=b.g;if(!(c==null||c!=null&&c instanceof Uint8Array))if(typeof c==="string"){c=oa.test(c)?c.replace(oa,qa):c;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 Ff(a,b){b=Gf(b);B(a,2,uf,b);return a}function Hf(a,b){b=Gf(b);B(a,2,pf,b);return a}
68
- function Gf(a){var b=new V;return y(b,1,Ia(a.bytes,!1),sa())}function If(a){if(a.u()){a=a.m();var b,c=C(a,1);var d=(b=Sb(a,dc,2))==null?void 0:Yb(b);b=d!=null?Cf(d):void 0;b=b!=null?b:0;let e;d=(e=v(a,4,void 0,fb))!=null?e:0;return{mediaId:c,mediaPlayoutPosition:b,mediaPlayoutRate:d,playbackState:Jf.get(D(a,3))}}}function Kf(a,b){b=Lf(b);B(a,3,uf,b);return a}function Mf(a,b){b=Lf(b);B(a,3,pf,b);return a}
69
- const Jf=Df().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").F(),Nf=Df().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).F();function Lf(a){var b=new W;b=y(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=y(b,4,c,0);c=new dc;c=Zb(c,a.mediaPlayoutPosition);b=Ub(b,2,c);a=Nf.get(a.playbackState);return F(b,3,a)}
70
- function Of({activityTitle:a}){var b=new tf;return Lb(b,4,u(a))}function Pf(a,b){var c=new sf;b=F(c,1,b.B);B(a,6,wf,b);return a}function Qf(a){var b=new rf;B(a,5,wf,b);return a};const Rf=Df().set("co-doing",1).set("co-watching",2).F();async function Sf(a,b,c){var d=b.D,e=new yf;var f=new xf;f=y(f,1,u(a.activityTitle),"");var g=Rf.get(a.K);f=F(f,2,g);e=B(e,3,zf,f);d=await d.call(b,e,$e);let h;if((h=Xb(d))!=null&&h)return new Tf(a,b,c,Sb(d,Ze,2));throw new Af;}function Uf(a,b){const c=a.config.N(b);c&&!a.config.M(a.g,c)&&(a.g=c,a.j=Cf(Yb(b)),a.u(a.g))}function Y(a,b){const {state:c,ga:d,context:e}=b(a.g);a.g=c;a.notify(a.g,e,d)}
71
- class Tf{constructor(a,b,c,d){this.m=a;this.h=b;this.config=c;this.u=ec(e=>void this.m.O(e));Vf(this.h,e=>{const f=x(e,bf);switch(f){case 1:Uf(this,E(e,Ze,1,bf));break;case 2:case 0:console.warn(`IllegalMessage: ${f} - ${"Unhandled message"} - ${"Please raise a bug with the MeetJS team"}`)}});this.A=(new Bf({ea:1E3,ia:()=>{var e,f,g=(f=(e=this.m).ka)==null?void 0:f.call(e);if(this.g!==null){this.g={...this.g,...g};e=new yf;f=this.config;g=f.W;var h=new qf;h=Zb(h,this.j);f=g.call(f,h,this.g);e=B(e,
72
- 1,zf,f);this.h.send(e)}}})).start();this.g=null;this.j=0;d&&Uf(this,d)}disconnect(){this.h.shutdown();this.A.shutdown()}notify(a,b,c){var d=c?Of(c):void 0;c=this.config;var e=c.X;var f=new vf;f=Zb(f,this.j);d=Ub(f,4,d);a=e.call(c,d,a);a=this.config.V(a,b);b=this.h;c=b.send;e=new yf;a=B(e,2,zf,a);c.call(b,a)}};var Wf=class{constructor(a){this.g=a}broadcastStateUpdate(a){Y(this.g,()=>({state:a,context:{}}))}disconnect(){this.g.disconnect()}};function Xf(a,b){return a==null||b==null?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var Yf=class{constructor(a){this.g=a}notifySwitchedToMedia(a,b,c){Y(this.g,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},ga:{activityTitle:a},context:{B: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:{B:3}}})}notifySeekToTimestamp(a){Y(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},
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.qa=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.oa=function(d,e,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[e].apply(d,g)}};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)};var ka,la;a:{for(var ma=["CLOSURE_FLAGS"],na=ea,oa=0;oa<ma.length;oa++)if(na=na[ma[oa]],na==null){la=null;break a}la=na}var pa=la&&la[748402147];ka=pa!=null?pa:!0;function qa(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};const ra=/[-_.]/g,sa={"-":"+",_:"/",".":"="};function ta(a){return sa[a]||""}var ua={};function va(){return wa||(wa=new xa(null,ua))}var xa=class{constructor(a,b){ya(b);this.g=a;if(a!=null&&a.length===0)throw Error("ByteString should be constructed with non-empty values");}};let wa;function ya(a){if(a!==ua)throw Error("illegal external caller");};function za(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let Aa=void 0;function Ba(a){a=Error(a);za(a,"warning");return a};function Ca(){return typeof BigInt==="function"};function Da(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var Ea=Da(),Fa=Da(),Ga=Da("m_m",!0);const l=Da("jas",!0);var Ha;const Ia=[];Ia[l]=7;Ha=Object.freeze(Ia);var Ja={};function m(a,b){return b===void 0?a.g!==Ka&&!!(2&(a.l[l]|0)):!!(2&b)&&a.g!==Ka}const Ka={};function La(a,b){if(a!=null)if(typeof a==="string")a=a?new xa(a,ua):va();else if(a.constructor!==xa)if(a!=null&&a instanceof Uint8Array)a=a.length?new xa(new Uint8Array(a),ua):va();else{if(!b)throw Error();a=void 0}return a}var Ma=Object.freeze({});function Na(a){a.pa=!0;return a};var Oa=Na(a=>typeof a==="number"),Pa=Na(a=>typeof a==="string"),Qa=Na(a=>typeof a==="boolean");var Ra=typeof ea.BigInt==="function"&&typeof ea.BigInt(0)==="bigint";function p(a){var b=a;if(Pa(b)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(b))throw Error(String(b));}else if(Oa(b)&&!Number.isSafeInteger(b))throw Error(String(b));return Ra?BigInt(a):a=Qa(a)?a?"1":"0":Pa(a)?a.trim()||"0":String(a)}var Xa=Na(a=>Ra?a>=Sa&&a<=Ta:a[0]==="-"?Ua(a,Va):Ua(a,Wa));const Va=Number.MIN_SAFE_INTEGER.toString(),Sa=Ra?BigInt(Number.MIN_SAFE_INTEGER):void 0,Wa=Number.MAX_SAFE_INTEGER.toString(),Ta=Ra?BigInt(Number.MAX_SAFE_INTEGER):void 0;
8
+ function Ua(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 Ya(a){const b=a>>>0;q=b;t=(a-b)/4294967296>>>0}function Za(a){if(a<0){Ya(-a);const [b,c]=$a(q,t);q=b>>>0;t=c>>>0}else Ya(a)}function ab(a,b){b>>>=0;a>>>=0;if(b<=2097151)var c=""+(4294967296*b+a);else Ca()?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+bb(c)+bb(a));return c}
9
+ function bb(a){a=String(a);return"0000000".slice(a.length)+a}function cb(){var a=q,b=t;if(b&2147483648)if(Ca())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{const [c,d]=$a(a,b);a="-"+ab(c,d)}else a=ab(a,b);return a}function $a(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};function db(a,b=`unexpected value ${a}!`){throw Error(b);};const eb=typeof BigInt==="function"?BigInt.asIntN:void 0,fb=Number.isSafeInteger,gb=Number.isFinite,hb=Math.trunc;function ib(a){if(a==null||typeof a==="number")return a;if(a==="NaN"||a==="Infinity"||a==="-Infinity")return Number(a)}const jb=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function kb(a){switch(typeof a){case "bigint":return!0;case "number":return gb(a);case "string":return jb.test(a);default:return!1}}
10
+ function lb(a){if(a!=null){if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;gb(a)}}
11
+ function mb(a){var b=void 0;b!=null||(b=1024);if(!kb(a))throw Ba("int64");const c=typeof a;switch(b){case 512:switch(c){case "string":return pb(a);case "bigint":return String(eb(64,a));default:return qb(a)}case 1024:switch(c){case "string":return rb(a);case "bigint":return p(eb(64,a));default:return sb(a)}case 0:switch(c){case "string":return pb(a);case "bigint":return p(eb(64,a));default:return tb(a)}default:return db(b,"Unknown format requested type for int64")}}
12
+ function ub(a){var b=a.length;if(a[0]==="-"?b<20||b===20&&a<="-9223372036854775808":b<19||b===19&&a<="9223372036854775807")return a;if(a.length<16)Za(Number(a));else if(Ca())a=BigInt(a),q=Number(a&BigInt(4294967295))>>>0,t=Number(a>>BigInt(32)&BigInt(4294967295));else{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]=$a(q,t);q=d;t=e}}return cb()}
13
+ function tb(a){a=hb(a);if(!fb(a)){Za(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:ab(b,c);a=typeof b==="number"?a?-b:b:a?"-"+b:b}return a}function qb(a){a=hb(a);fb(a)?a=String(a):(Za(a),a=cb());return a}function pb(a){var b=hb(Number(a));if(fb(b))return String(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));return ub(a)}
14
+ function rb(a){var b=hb(Number(a));if(fb(b))return p(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));return Ca()?p(eb(64,BigInt(a))):p(ub(a))}function sb(a){return fb(a)?p(tb(a)):p(qb(a))}function vb(a){const b=typeof a;if(a==null)return a;if(b==="bigint")return p(eb(64,a));if(kb(a))return b==="string"?rb(a):sb(a)}function u(a){if(a!=null&&typeof a!=="string")throw Error();return a}
15
+ function wb(a,b,c){if(a!=null&&a[Ga]===Ja)return a;if(Array.isArray(a)){var d=a[l]|0;c=d|c&32|c&2;c!==d&&(a[l]=c);return new b(a)}};function xb(a){return a};function yb(a,b,c,d){var e=d!==void 0;d=!!d;const f=[];var g=a.length;let h,k=4294967295,n=!1;const r=!!(b&64),z=r?b&128?0:-1:void 0;if(!(b&1||(h=g&&a[g-1],h!=null&&typeof h==="object"&&h.constructor===Object?(g--,k=g):h=void 0,!r||b&128||e))){n=!0;var A;k=((A=zb)!=null?A:xb)(k-z,z,a,h,void 0)+z}b=void 0;for(e=0;e<g;e++)if(A=a[e],A!=null&&(A=c(A,d))!=null)if(r&&e>=k){const H=e-z;let I;((I=b)!=null?I:b={})[H]=A}else f[e]=A;if(h)for(let H in h){a=h[H];if(a==null||(a=c(a,d))==null)continue;g=+H;let I;
16
+ if(r&&!Number.isNaN(g)&&(I=g+z)<k)f[I]=a;else{let R;((R=b)!=null?R:b={})[H]=a}}b&&(n?f.push(b):f[k]=b);return f}
17
+ function Ab(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return Xa(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:yb(a,b,Ab)}if(a!=null&&a[Ga]===Ja)return Bb(a);if(a instanceof xa){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):
18
+ b);a=a.g=btoa(c)}return a}return}return a}let zb;function Bb(a){a=a.l;return yb(a,a[l]|0,Ab)};function Cb(a,b,c,d=0){if(a==null){var e=32;c?(a=[c],e|=128):a=[];b&&(e=e&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw Error("narr");e=a[l]|0;if(ka&&1&e)throw Error("rfarr");2048&e&&!(2&e)&&Db();if(e&256)throw Error("farr");if(e&64)return(e|d)!==e&&(a[l]=e|d),a;if(c&&(e|=128,c!==a[0]))throw Error("mid");a:{c=a;e|=64;var f=c.length;if(f){var g=f-1;const k=c[g];if(k!=null&&typeof k==="object"&&k.constructor===Object){b=e&128?0:-1;g-=b;if(g>=1024)throw Error("pvtlmt");for(var h in k)if(f=
19
+ +h,f<g)c[f+b]=k[h],delete k[h];else break;e=e&-16760833|(g&1023)<<14;break a}}if(b){h=Math.max(b,f-(e&128?0:-1));if(h>1024)throw Error("spvt");e=e&-16760833|(h&1023)<<14}}}a[l]=e|64|d;return a}function Db(){if(ka)throw Error("carr");if(Fa!=null){var a;var b=(a=Aa)!=null?a:Aa={};a=b[Fa]||0;a>=5||(b[Fa]=a+1,b=Error(),za(b,"incident"),ja(b))}};function Eb(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){var c=a[l]|0;a.length===0&&c&1?a=void 0:c&2||(!b||4096&c||16&c?a=Fb(a,c,!1,b&&!(c&16)):(a[l]|=34,c&4&&Object.freeze(a)));return a}if(a!=null&&a[Ga]===Ja)return b=a.l,c=b[l]|0,m(a,c)?a:Gb(a,b,c)?Hb(a,b):Fb(b,c);if(a instanceof xa)return a}function Hb(a,b,c){a=new a.constructor(b);c&&(a.g=Ka);a.A=Ka;return a}function Fb(a,b,c,d){d!=null||(d=!!(34&b));a=yb(a,b,Eb,d);d=32;c&&(d|=2);b=b&16769217|d;a[l]=b;return a}
20
+ function Ib(a){const b=a.l,c=b[l]|0;return m(a,c)?Gb(a,b,c)?Hb(a,b,!0):new a.constructor(Fb(b,c,!1)):a}function Jb(a){if(a.g!==Ka)return!1;var b=a.l;b=Fb(b,b[l]|0);b[l]|=2048;a.l=b;a.g=void 0;a.A=void 0;return!0}function Kb(a){if(!Jb(a)&&m(a,a.l[l]|0))throw Error();}function Lb(a,b){b===void 0&&(b=a[l]|0);b&32&&!(b&4096)&&(a[l]=b|4096)}function Gb(a,b,c){return c&2?!0:c&32&&!(c&4096)?(b[l]=c|2,a.g=Ka,!0):!1};const Mb=p(0);function v(a,b,c,d){a=Nb(a.l,b,c,d);if(a!==null)return a}function Nb(a,b,c,d){if(b===-1)return null;const e=b+(c?0:-1),f=a.length-1;let g,h;if(!(f<1+(c?0:-1))){if(e>=f)if(g=a[f],g!=null&&typeof g==="object"&&g.constructor===Object)c=g[b],h=!0;else if(e===f)c=g;else return;else c=a[e];if(d&&c!=null){d=d(c);if(d==null)return d;if(!Object.is(d,c))return h?g[b]=d:a[e]=d,d}return c}}function Ob(a,b,c){Kb(a);const d=a.l;w(d,d[l]|0,b,c);return a}
21
+ function w(a,b,c,d){const e=c+-1;var f=a.length-1;if(f>=0&&e>=f){const g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object)return g[c]=d,b}if(e<=f)return a[e]=d,b;if(d!==void 0){let g;f=((g=b)!=null?g:b=a[l]|0)>>14&1023||536870912;c>=f?d!=null&&(a[f+-1]={[c]:d}):a[e]=d}return b}function Pb(a,b,c,d){const e=a.l;var f=e[l]|0;a=x(a,d)===c?c:-1;return Qb(e,f,b,a)!==void 0}function Rb(a){return!!(2&a)&&!!(4&a)||!!(256&a)}function Sb(a){return La(a,!0)}
22
+ function y(a,b,c,d){Kb(a);const e=a.l;w(e,e[l]|0,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}function x(a,b){a=a.l;return Tb(Ub(a),a,void 0,b)}function Ub(a){let b;return(b=a[Ea])!=null?b:a[Ea]=new Map}function Tb(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 g=d[f];Nb(b,g)!=null&&(e!==0&&(c=w(b,c,e)),e=g)}a.set(d,e);return e}
23
+ function Qb(a,b,c,d){let e=!1;d=Nb(a,d,void 0,f=>{const g=wb(f,c,b);e=g!==f&&g!=null;return g});if(d!=null)return e&&!m(d)&&Lb(a,b),d}function Vb(a,b,c){let d=a.l,e=d[l]|0;b=Qb(d,e,b,c);if(b==null)return b;e=d[l]|0;if(!m(a,e)){const f=Ib(b);f!==b&&(Jb(a)&&(d=a.l,e=d[l]|0),b=f,e=w(d,e,c,b),Lb(d,e))}return b}function Wb(a){a==null&&(a=void 0);return a}function Xb(a,b,c){c=Wb(c);Ob(a,b,c);c&&!m(c)&&Lb(a.l);return a}
24
+ function B(a,b,c,d){d=Wb(d);a:{var e=d;Kb(a);const h=a.l;var f=h[l]|0;if(e==null){var g=Ub(h);if(Tb(g,h,f,c)===b)g.set(c,0);else break a}else{g=h;const k=Ub(g),n=Tb(k,g,f,c);n!==b&&(n&&(f=w(g,f,n)),k.set(c,b))}w(h,f,b,e)}d&&!m(d)&&Lb(a.l);return a}
25
+ function Yb(a,b){Kb(a);const c=a.l;let d=c[l]|0;if(b==null)return w(c,d,1),a;let e=b===Ha?7:b[l]|0,f=e;const g=Rb(e),h=g||Object.isFrozen(b);let k=!0,n=!0;for(let z=0;z<b.length;z++){var r=b[z];g||(r=m(r),k&&(k=!r),n&&(n=r))}g||(e=k?13:5,e=n?e&-4097:e|4096);h&&e===f||(b=[...b],f=0,e=Zb(e,d));e!==f&&(b[l]=e);d=w(c,d,1,b);2&e||!(4096&e||16&e)||Lb(c,d);return a}function Zb(a,b){return a=(2&b?a|2:a&-3)&-273}
26
+ function $b(a){a=v(a,1);a=a==null||typeof a==="boolean"?a:typeof a==="number"?!!a:void 0;return a!=null?a:!1}function ac(a){a=v(a,1,void 0,vb);return a!=null?a:Mb}function C(a,b){a=v(a,b);a=a==null||typeof a==="string"?a:void 0;return a!=null?a:""}function D(a,b){a=v(a,b);a=a==null?a:gb(a)?a|0:void 0;return a!=null?a:0}function E(a,b,c,d){c=x(a,d)===c?c:-1;return Vb(a,b,c)}function bc(a,b){return y(a,1,b==null?b:mb(b),"0")}
27
+ function F(a,b,c){if(c!=null){if(!gb(c))throw Ba("enum");c|=0}return y(a,b,c,0)};function cc(){var a=dc||(dc=ec("[1,2,0]"));a=Ib(a);a=Ob(a,4,u("dev-883351576"));const b=a.l,c=b[l]|0;return m(a,c)?a:Gb(a,b,c)?Hb(a,b):new a.constructor(Fb(b,c,!0))}var G=class{constructor(a){this.l=Cb(a,void 0,void 0,2048)}toJSON(){return Bb(this)}};G.prototype[Ga]=Ja;G.prototype.toString=function(){return this.l.toString()};function fc(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 ec=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 G{});var hc=class extends G{};function ic(a){var b=new jc(500);let c=0,d;return(...e)=>{kc(b)?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;let f;(f=d)==null||f()},lc(b))))}}function mc(a){var b=new jc(100),c=Promise.resolve();return(...d)=>kc(b)?a(...d):c};function kc(a){return nc(a,a.index)>=a.g?(a.h[a.index]=Date.now(),a.index=(a.index+1)%1,!0):!1}function lc(a){const b=a.g;a=nc(a,a.index);return a>=b?0:b-a}function nc(a,b){let c;return Date.now()-((c=a.h[b])!=null?c:-1*a.g)}var jc=class{constructor(a){this.g=a;this.h=[];this.index=0}};var oc=class extends G{},pc=[2,3];var qc=class extends G{};var J=class extends Error{constructor({errorType:a,message:b,i:c}){super(`Meet add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},K={errorType:"InternalError",message:"An unexpected error has occurred.",i:"No further information is available."},rc={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)."},
28
+ sc={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."},tc={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."},uc={errorType:"NotSupportedInStandalone",
29
+ message:"This method is not supported in standalone mode.",i:"Do not call this method in standalone mode."},vc={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."},wc={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)."},
30
+ xc={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."},yc={errorType:"DestinationNotReady",
31
+ 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."},Ac={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."},Bc={errorType:"ActivityStartingStateMissingAttributes",
32
+ 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."},Cc={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."},
33
+ Dc={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."},Ec={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."},
34
+ Fc=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."}),L=(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."}),Gc=a=>({errorType:"InternalError",message:`Could not connect to ${a} channel. Unknown error`,
35
+ i:"No further information is available."}),Hc={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",i:"Ensure that no activity is ongoing."},Ic={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",i:"Send one of the available commands in the frame message."},Jc={errorType:"NoActivityFound",message:"No activity found.",i:"Ensure that the activity is started before performing this operation."},Kc={errorType:"RequiresEapEnrollment",
36
+ message:"This feature is only available to early access partners.",i:"Meet add-on early access enrollment is currently closed."},Lc={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."},Mc={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",
37
+ i:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Nc={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."},Oc={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",i:"Only instantiate the AddonSession once."},Pc={errorType:"UserCancelled",
38
+ message:"The user cancelled starting an activity.",i:"The user needs to click continue to start the activity."},Qc={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",i:"Do not call this method during a Meet call."},Rc={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."},
39
+ Sc={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."},Tc={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."};
40
+ function Uc(a){switch(a){case 0:return K;case 1:return yc;case 2:return Ac;case 3:return Hc;case 4:return Ic;case 5:return Kc;case 6:return uc;case 7:return Lc;case 8:return Mc;case 9:return Nc;case 10:return Pc;case 11:return Qc;case 12:return Rc;case 13:return Sc;case 14:return Jc;case 15:return Tc;default:return K}}
41
+ function Vc(a){let b;var c=(b=D(a,1))!=null?b:0;a=Wc(x(a,pc));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}.`,
42
+ 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 Gc(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.`,
43
+ i:"No further information is available."}}return c;default:return Gc(a)}}function Wc(a){switch(a){case 2:return"co";case 3:return"gd";case 0:return"unknown";default:return"unknown"}}function M({errorType:a,message:b,i:c},d=""){throw new J({errorType:a,message:d?`${b} ${d}`:b,i:c});}function Xc(a,b){M({...rc,message:`${rc.message}: ${a}. In URL ${b}`})};function Yc(a){var b=new Zc;return F(b,1,a)}function $c(a,b){return y(a,2,u(b),"")}function ad(a,b){return y(a,3,u(b),"")}var Zc=class extends G{getFrameType(){return D(this,1)}};function bd(a){var b=a.l,c=b,d=b[l]|0,e=Zc;b=void 0===Ma?2:4;var f=m(a,d);const g=f?1:b;b=g===3;var h=!f;(g===2||h)&&Jb(a)&&(c=a.l,d=c[l]|0);a=Nb(c,1);f=Array.isArray(a)?a:Ha;var k=f===Ha?7:f[l]|0;a=k;2&d&&(a|=2);var n=a|1;if(a=!(4&n)){var r=f,z=d;const A=!!(2&n);A&&(z|=2);let H=!A,I=!0,R=0,nb=0;for(;R<r.length;R++){const ob=wb(r[R],e,z);if(ob instanceof e){if(!A){const zc=m(ob);H&&(H=!zc);I&&(I=zc)}r[nb++]=ob}}nb<R&&(r.length=nb);n|=4;n=I?n&-4097:n|4096;n=H?n|8:n&-9}n!==k&&(f[l]=n,2&n&&Object.freeze(f));
44
+ if(h&&!(8&n||!f.length&&(g===1||(g!==4?0:2&n||!(16&n)&&32&d)))){Rb(n)&&(f=[...f],n=Zb(n,d),d=w(c,d,1,f));e=f;h=n;for(k=0;k<e.length;k++)r=e[k],n=Ib(r),r!==n&&(e[k]=n);h|=8;n=h=e.length?h|4096:h&-4097;f[l]=n}h=e=n;g===1||(g!==4?0:2&e||!(16&e)&&32&d)?Rb(e)||(e|=!f.length||a&&!(4096&e)||32&d&&!(4096&e||16&e)?2:256,e!==h&&(f[l]=e),Object.freeze(f)):(g===2&&Rb(e)&&(f=[...f],h=0,e=Zb(e,d),d=w(c,d,1,f)),Rb(e)||(b||(e|=16),e!==h&&(f[l]=e)));2&e||!(4096&e||16&e)||Lb(c,d);return f}
45
+ function cd(a){var b=new dd;return Yb(b,a)}var dd=class extends G{};var ed=class extends G{};function fd(a){return Vb(a,dd,1)}var gd=class extends G{};var hd=class extends G{};var id=class extends G{};var jd=class extends G{};var kd=class extends G{getMeetPlatformInfo(){return Vb(this,id,1)}};var ld=class extends G{getMeetingInfo(){return Vb(this,jd,1)}};var md=class extends G{},N=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21];var nd=class extends G{};var od=class extends G{};var pd=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),qd=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function rd(a){a&&typeof a.dispose=="function"&&a.dispose()};function O(){this.o=this.o;this.g=this.g}O.prototype.o=!1;O.prototype.dispose=function(){this.o||(this.o=!0,this.H())};O.prototype[Symbol.dispose]=function(){this.dispose()};function sd(a,b){a.o?b():(a.g||(a.g=[]),a.g.push(b))}O.prototype.H=function(){if(this.g)for(;this.g.length;)this.g.shift()()};function td({J:a,R:b}){if(a===null)throw new J(Fc("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new J(L("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new J(L("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new J(L("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!==
46
+ "string")throw new J(L("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new J(Cc);if(Object.keys(a).length===0)throw new J(Bc);}}function ud(a){const b=[];b.push(ad($c(Yc(2),a.mainStageUrl),a.additionalData));b.push(ad($c(Yc(1),a.sidePanelUrl),a.additionalData));return b}
47
+ var Dd=class extends O{constructor(a){super();this.context=a;this.h={};vd(this.context.g.U,b=>{switch(x(b.content,N)){case 7:const d=this.h.frameToFrameMessage;b=E(b.content,hd,7,N);if(d&&b){var c=D(b,1);c=pd.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:C(b,2)})}}},this)}async getMeetingInfo(){var a=await wd(this.context.g);var b=a.getMeetingInfo();b=C(b,1);a=a.getMeetingInfo();a=C(a,2);return{meetingId:b,meetingCode:a}}async getFrameOpenReason(){let a;const b=(a=
48
+ this.context.h.da)!=null?a:0;let c;return(c=qd.get(b))!=null?c:"UNKNOWN"}async getActivityStartingState(){var a=fd(await xd(this.context.g));const b=a==null?void 0:bd(a).find(c=>c.getFrameType()===2);a=a==null?void 0:bd(a).find(c=>c.getFrameType()===1);return{mainStageUrl:(b==null?void 0:C(b,2))||void 0,sidePanelUrl:(a==null?void 0:C(a,2))||void 0,additionalData:(a==null?void 0:C(a,3))||void 0}}async setActivityStartingState(a){td({J:a,R:!0});var b=ud(a);a=yd;var c=this.context.g;var d=new nd;b=cd(b);
49
+ d=Xb(d,1,b);await a(c,d)}on(a,b){this.h[a]=b}async getMeetPlatformInfo(){var a=(await zd(this.context.g)).getMeetPlatformInfo();return{isMeetHardware:$b(a)}}async closeAddon(){await Ad(this.context.g)}async startActivity(a){td({J:a,R:!1});const b=new od;a&&(a=ud(a),a=cd(a),Xb(b,1,a));await Bd(this.context.g,b)}async endActivity(a){var b=Cd,c=this.context.g,d=new ed;a=F(d,1,a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0);await b(c,a)}};var Ed=fc(class extends G{getFrameOpenReason(){return D(this,5)}});function Fd(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");if(c)b=Ed(atob(c));else{var d;((d=window.top)!=null?d:window)===window?M(vc):Xc("meet_sdk",b);b=void 0}(c=C(b,1))||Xc("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new J(wc);(d=C(b,2))||Xc("meet_control_channel_name",a);const e=C(b,4);e||Xc("addon_cloud_project_number",a);var f;a=(f=b.getFrameOpenReason())!=null?f:0;f=C(b,3)||"https://meet.google.com";return{da:a,frameType:c,
50
+ ca:d,cloudProjectNumber:e,S:f}};var Gd=class extends G{};var Hd=class extends G{};var Id=class extends G{};function Jd(){var a=new Kd,b=new Id;return B(a,1,Ld,b)}var Kd=class extends G{},Ld=[1,2];function Md(a){var b=new Nd;return Xb(b,2,a)}function Od(a,b){return y(a,3,u(b),"")}var Nd=class extends G{};var Pd=class extends G{};var Qd=class extends G{};var Rd=class extends G{};var Sd=class extends G{};var Td=class extends G{};var Ud=class extends G{};var Vd=class extends G{setAddonStartingState(a){return Xb(this,1,a)}};var Wd=class extends G{};function Xd(a,b){return B(a,2,P,b)}var Q=class extends G{},P=[1,2,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20];function Yd(a){return E(a,md,2,Zd)}var $d=class extends G{},ae=fc($d),Zd=[1,2];class be{constructor(a,b){this.data=a;this.channel=b}};var ce=Promise;function de(a){const b=new MessageChannel;ee(b.port1,a);return b}function fe(a,b){ee(a,b);return new ge(a)}class ge{constructor(a){this.g=a}send(a,b,c=[]){b=de(b);this.g.postMessage(a,[b.port2].concat(c))}D(a,b){return new ce(c=>{this.send(a,c,b)})}}function ee(a,b){b&&(a.onmessage=c=>{var d=c.data;c=fe(c.ports[0]);b(new be(d,c))})};var he=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?a=>a&&AsyncContext.Snapshot.wrap(a):a=>a;function ie(a,b){a.m(b);a.h<100&&(a.h++,b.next=a.g,a.g=b)}class je{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 ke(){var a=le;let b=null;a.g&&(b=a.g,a.g=a.g.next,a.g||(a.h=null),b.next=null);return b}class me{constructor(){this.h=this.g=null}add(a,b){const c=ne.get();c.set(a,b);this.h?this.h.next=c:this.g=c;this.h=c}}var ne=new je(()=>new oe,a=>a.reset());class oe{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 pe,qe=!1,le=new me,se=(a,b)=>{pe||re();qe||(pe(),qe=!0);le.add(a,b)},re=()=>{const a=Promise.resolve(void 0);pe=()=>{a.then(te)}};function te(){let a;for(;a=ke();){try{a.h.call(a.g)}catch(b){ja(b)}ie(ne,a)}qe=!1};function ue(){};function S(a){this.g=0;this.T=void 0;this.m=this.h=this.j=null;this.u=this.A=!1;if(a!=ue)try{const b=this;a.call(void 0,function(c){ve(b,2,c)},function(c){ve(b,3,c)})}catch(b){ve(this,3,b)}}function we(){this.next=this.context=this.h=this.m=this.g=null;this.j=!1}we.prototype.reset=function(){this.context=this.h=this.m=this.g=null;this.j=!1};var xe=new je(function(){return new we},function(a){a.reset()});function ye(a,b,c){const d=xe.get();d.m=a;d.h=b;d.context=c;return d}
51
+ function ze(){let a,b;const c=new S(function(d,e){a=d;b=e});return new Ae(c,a,b)}S.prototype.then=function(a,b,c){return Be(this,he(typeof a==="function"?a:null),he(typeof b==="function"?b:null),c)};S.prototype.$goog_Thenable=!0;function Ce(a,b){b=he(b);b=ye(b,b);b.j=!0;De(a,b)}S.prototype.cancel=function(a){if(this.g==0){const b=new T(a);se(function(){Ee(this,b)},this)}};
52
+ function Ee(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 g=c.h;g&&(g.j||(d++,g.g==a&&(e=g),!(e&&d>1)));g=g.next)e||(f=g);e&&(c.g==0&&d==1?Ee(c,b):(f?(d=f,d.next==c.m&&(c.m=d),d.next=d.next.next):Fe(c),Ge(c,e,3,b)))}a.j=null}else ve(a,3,b)}function De(a,b){a.h||a.g!=2&&a.g!=3||He(a);a.m?a.m.next=b:a.h=b;a.m=b}
53
+ function Be(a,b,c,d){const e=ye(null,null,null);e.g=new S(function(f,g){e.m=b?function(h){try{const k=b.call(d,h);f(k)}catch(k){g(k)}}:f;e.h=c?function(h){try{const k=c.call(d,h);k===void 0&&h instanceof T?g(h):f(k)}catch(k){g(k)}}:g});e.g.j=a;De(a,e);return e.g}S.prototype.na=function(a){this.g=0;ve(this,2,a)};S.prototype.Y=function(a){this.g=0;ve(this,3,a)};
54
+ function ve(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.na,f=a.Y;if(d instanceof S){De(d,ye(e||ue,f||null,a));var g=!0}else{if(d)try{var h=!!d.$goog_Thenable}catch(k){h=!1}else h=!1;if(h)d.then(e,f,a),g=!0;else{h=typeof d;if(h=="object"&&d!=null||h=="function")try{const k=d.then;if(typeof k==="function"){Ie(d,k,e,f,a);g=!0;break a}}catch(k){f.call(a,k);g=!0;break a}g=!1}}}g||(a.T=c,a.g=b,a.j=null,He(a),b!=3||c instanceof T||Je(a,c))}}
55
+ function Ie(a,b,c,d,e){function f(k){h||(h=!0,d.call(e,k))}function g(k){h||(h=!0,c.call(e,k))}let h=!1;try{b.call(a,g,f)}catch(k){f(k)}}function He(a){a.A||(a.A=!0,se(a.ma,a))}function Fe(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.ma=function(){let a;for(;a=Fe(this);)Ge(this,a,this.g,this.T);this.A=!1};
56
+ function Ge(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,Ke(b,c,d);else try{b.j?b.m.call(b.context):Ke(b,c,d)}catch(e){Le.call(null,e)}ie(xe,b)}function Ke(a,b,c){b==2?a.m.call(a.context,c):a.h&&a.h.call(a.context,c)}function Je(a,b){a.u=!0;se(function(){a.u&&Le.call(null,b)})}var Le=ja;function T(a){ia.call(this,a)}ha(T,ia);T.prototype.name="cancel";function Ae(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let Me=1,Ne=new WeakMap;function Oe(a,b,c){var d=Pe;a.h.has(b);d(b,c)}var Re=class extends O{constructor(){super();this.h=new Set}signal(){const a=new Qe;this.h.add(a);sd(this,fa(rd,a));return a}};function Pe(a,b){return new Promise(c=>{Se(()=>{a.L&&(a.fa=b,a.P=!0);for(const {I:d,slot:e}of a.v.values())try{e(b,{signal:a,I:d})}catch(f){ja(f)}for(const d of a.C)d.resolve(b);a.C.clear();c()})})}function vd(a,b,c){const d=Me++;Se(()=>{Te(a,d,b,c)})}
57
+ function Te(a,b,c,d){if(!a.o)if(d){if(!d.o){const e=()=>{Se(()=>{a.v.delete(b);const f=Ne.get(d);f&&qa(f,e)})};a.v.set(b,{I:b,slot:c,G:e});Ue(d,e)}}else a.v.set(b,{I:b,slot:c,G:()=>a.v.delete(b)})}
58
+ var Qe=class extends O{constructor(){super();this.L=!1;this.v=new Map;this.C=new Set;this.P=!1}detach(a){Se(()=>{const b=this.v.get(a);b&&b.G()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){const c=ze();Se(()=>{if(this.o)c.reject(new T("Signal initially disposed"));else if(b&&b.o)c.reject(new T("Owner initially disposed"));else if(a&&this.L&&this.P)c.resolve(this.fa);else if(this.C.add(c),Ce(c.promise,()=>{this.C.delete(c)}),b){const d=()=>{c.reject(new T("Owner asynchronously disposed"))};
59
+ Ce(c.promise,()=>{const e=Ne.get(b);e&&qa(e,d)});Ue(b,d)}});return c.promise}H(){super.H();Se(()=>{for(const {G:a}of this.v.values())a();this.v.clear();for(const a of this.C)a.reject(new T("Signal asynchronously disposed"));this.C.clear()})}};const Ve=[];let We=!1;function Se(a){Ve.push(a);Xe()}async function Xe(){if(!We)try{We=!0;let a=Ye(0);for(;a<Ve.length;)await Promise.resolve(),a=Ye(a)}catch(a){ja(a)}finally{Ve.length=0,We=!1}}
60
+ function Ye(a){const b=a+100;for(;a<b&&a<Ve.length;)try{Ve[a++]()}catch(c){ja(c)}return a}function Ue(a,b){if(a.o)b();else{var c=Ne.get(a);if(c)c.push(b);else{const d=[b];Ne.set(a,d);sd(a,()=>{for(const e of[...d])e();Ne.delete(a)})}}};function U(a){var b=new $d;a=B(b,1,Zd,a);return{content:JSON.stringify(Bb(a))}}const Ze=new Re;function $e(a,b){const c=Ze.signal();return{channel:fe(a,d=>{const e=b(d.data);Oe(Ze,c,{content:e,la:d})}),signal:c}};let dc;var V=class extends G{};var W=class extends G{};var bf=class extends G{j(){return E(this,V,2,af)}h(){return Pb(this,V,2,af)}m(){return E(this,W,3,af)}u(){return Pb(this,W,3,af)}},af=[2,3];var cf=fc(class extends G{});var df=fc(class extends G{}),ef=[1,2];var ff=({destination:a,origin:b,ra:c,Z:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");const f=de(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return fe(f.port1,e)};function gf(a,b,c){const d=new Re,e=d.signal();a=ff({destination:window.parent,origin:b,Z:a,onMessage:f=>{const g=ae(f.data.content);x(g,Zd)===2&&Oe(d,e,{content:Yd(g),la:f,messagePort:f.data.messagePort})}});return new hf(e,a,c)}async function wd(a){var b=X;var c=new Q;var d=new Rd;c=B(c,19,P,d);a=await b(a,U(c));let e;return(e=Yd(ae(a.data.content)))==null?void 0:E(e,ld,20,N)}
61
+ async function xd(a){var b=X;var c=new Q;var d=new Hd;c=B(c,17,P,d);a=await b(a,U(c));let e;return(e=Yd(ae(a.data.content)))==null?void 0:E(e,gd,18,N)}async function yd(a,b){var c=X,d=new Q;b=B(d,8,P,b);await c(a,U(b))}async function zd(a){var b=X;var c=new Q;var d=new Qd;c=B(c,18,P,d);a=await b(a,U(c));let e;return(e=Yd(ae(a.data.content)))==null?void 0:E(e,kd,19,N)}async function Ad(a){var b=X;var c=new Q;var d=new Gd;c=B(c,11,P,d);await b(a,U(c))}
62
+ async function Bd(a,b){var c=X,d=new Q;b=B(d,14,P,b);await c(a,U(b))}async function Cd(a,b){var c=X,d=new Q;b=B(d,15,P,b);await c(a,U(b))}async function jf(a){await a.h()}
63
+ async function X(a,b){(a=await a.channel.D(b))||M(K,"Falsy response received from the message channel."+` ${JSON.stringify(a)}`);(b=a.data)||M(K,"Data field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);(b=b.content)||M(K,"Content field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);let c=void 0;try{c=ae(b)}catch(d){M(K,"The ControlMessage can't be deserialized."+` ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=Yd(c))||M(K,"MeetToAddonMessage field on ControlMessage is falsy."+
64
+ ` ${JSON.stringify(b)}`);b=b==null?void 0:E(b,qc,10,N);if((b==null?void 0:D(b,1))!==void 0)throw a=D(b,1),new J(Uc(a));return a}async function kf(a,b,c){var d=X,e=new Q;b=B(e,1,P,b);d=await d(a,U(b));a=d.data.messagePort;var f;(d=(f=Yd(ae(d.data.content)))==null?void 0:E(f,oc,1,N))!=null?f=d:(f=new oc,f=F(f,1,0));return{channel:a?$e(a,c):void 0,response:f}}async function lf(a){const b=Jd(),{channel:c,response:d}=await kf(a,b,e=>df(e));if(!c)throw new J(Vc(d));return c}
65
+ async function mf(a){var b=X;var c=new Q;var d=new Wd;c=B(c,5,P,d);await b(a,U(c))}async function nf(a){var b=X;var c=new Q;var d=new Pd;c=B(c,6,P,d);await b(a,U(c))}async function of(a,b,c){var d=X,e=new Q,f=new Sd;b=F(f,1,b);c=y(b,2,u(c),"");e=B(e,7,P,c);await d(a,U(e))}async function pf(a,b){var c=X,d=new Q;b=B(d,16,P,b);await c(a,U(b))}
66
+ class hf extends O{constructor(a,b,c){super();this.U=a;this.channel=b;this.h=mc(async()=>{var d=this.channel,e=d.D;var f=new Q;var g=new Td;f=B(f,13,P,g);await e.call(d,U(f))});a=cc();C(a,4);lb(v(a,1));lb(v(a,2));lb(v(a,3));c=Xd(new Q,Od(Md(a),c));this.channel.send(U(c));vd(this.U,async d=>{switch(x(d.content,N)){case 16:await jf(this)}},this)}};let qf;var rf=class{constructor(a){var b=qf;this.h=a;this.g=b}delete(){throw Error("Not implemented.");}};var tf=class extends G{j(){return E(this,V,2,sf)}h(){return Pb(this,V,2,sf)}m(){return E(this,W,3,sf)}u(){return Pb(this,W,3,sf)}},sf=[2,3];var uf=class extends G{};var vf=class extends G{};var wf=class extends G{};var yf=class extends G{j(){return E(this,V,2,xf)}h(){return Pb(this,V,2,xf)}m(){return E(this,W,3,xf)}u(){return Pb(this,W,3,xf)}},xf=[2,3],zf=[5,6];var Af=class extends G{};var Bf=class extends G{},Cf=[1,2,3];var Df=class extends Error{constructor(){super("Failed to create CoActivity: Connection refused - Meet refused to begin Live Sharing")}};var Ef=class{constructor(a){this.config=a}start(){this.g!=null||(this.g=setInterval(()=>{this.config.ia()},this.config.ea));return this}shutdown(){clearInterval(this.g)}};function Ff(a){return Xa(a)?Number(a):String(a)};function Gf(){const a=new Map,b={set(c,d){a.set(c,d);return b},F:()=>a};return b};function Hf(a){if(a.h()){a=a.j();a=v(a,1,void 0,Sb);var b=a==null?va():a;a=Uint8Array;ya(ua);var c=b.g;if(!(c==null||c!=null&&c instanceof Uint8Array))if(typeof c==="string"){c=ra.test(c)?c.replace(ra,ta):c;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 If(a,b){b=Jf(b);B(a,2,xf,b);return a}function Kf(a,b){b=Jf(b);B(a,2,sf,b);return a}
67
+ function Jf(a){var b=new V;return y(b,1,La(a.bytes,!1),va())}function Lf(a){if(a.u()){a=a.m();var b,c=C(a,1);var d=(b=Vb(a,hc,2))==null?void 0:ac(b);b=d!=null?Ff(d):void 0;b=b!=null?b:0;let e;d=(e=v(a,4,void 0,ib))!=null?e:0;return{mediaId:c,mediaPlayoutPosition:b,mediaPlayoutRate:d,playbackState:Mf.get(D(a,3))}}}function Nf(a,b){b=Of(b);B(a,3,xf,b);return a}function Pf(a,b){b=Of(b);B(a,3,sf,b);return a}
68
+ const Mf=Gf().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").F(),Qf=Gf().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).F();function Of(a){var b=new W;b=y(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=y(b,4,c,0);c=new hc;c=bc(c,a.mediaPlayoutPosition);b=Xb(b,2,c);a=Qf.get(a.playbackState);return F(b,3,a)}
69
+ function Rf({activityTitle:a}){var b=new wf;return Ob(b,4,u(a))}function Sf(a,b){var c=new vf;b=F(c,1,b.B);B(a,6,zf,b);return a}function Tf(a){var b=new uf;B(a,5,zf,b);return a};const Uf=Gf().set("co-doing",1).set("co-watching",2).F();async function Vf(a,b,c){var d=b.D,e=new Bf;var f=new Af;f=y(f,1,u(a.activityTitle),"");var g=Uf.get(a.K);f=F(f,2,g);e=B(e,3,Cf,f);d=await d.call(b,e,cf);let h;if((h=$b(d))!=null&&h)return new Wf(a,b,c,Vb(d,bf,2));throw new Df;}function Xf(a,b){const c=a.config.N(b);c&&!a.config.M(a.g,c)&&(a.g=c,a.j=Ff(ac(b)),a.u(a.g))}function Y(a,b){const {state:c,ga:d,context:e}=b(a.g);a.g=c;a.notify(a.g,e,d)}
70
+ class Wf{constructor(a,b,c,d){this.m=a;this.h=b;this.config=c;this.u=ic(e=>void this.m.O(e));Yf(this.h,e=>{const f=x(e,ef);switch(f){case 1:Xf(this,E(e,bf,1,ef));break;case 2:case 0:console.warn(`IllegalMessage: ${f} - ${"Unhandled message"} - ${"Please raise a bug with the MeetJS team"}`)}});this.A=(new Ef({ea:1E3,ia:()=>{var e,f,g=(f=(e=this.m).ka)==null?void 0:f.call(e);if(this.g!==null){this.g={...this.g,...g};e=new Bf;f=this.config;g=f.W;var h=new tf;h=bc(h,this.j);f=g.call(f,h,this.g);e=B(e,
71
+ 1,Cf,f);this.h.send(e)}}})).start();this.g=null;this.j=0;d&&Xf(this,d)}disconnect(){this.h.shutdown();this.A.shutdown()}notify(a,b,c){var d=c?Rf(c):void 0;c=this.config;var e=c.X;var f=new yf;f=bc(f,this.j);d=Xb(f,4,d);a=e.call(c,d,a);a=this.config.V(a,b);b=this.h;c=b.send;e=new Bf;a=B(e,2,Cf,a);c.call(b,a)}};var Zf=class{constructor(a){this.g=a}broadcastStateUpdate(a){Y(this.g,()=>({state:a,context:{}}))}disconnect(){this.g.disconnect()}};function $f(a,b){return a==null||b==null?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var ag=class{constructor(a){this.g=a}notifySwitchedToMedia(a,b,c){Y(this.g,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},ga:{activityTitle:a},context:{B: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:{B:3}}})}notifySeekToTimestamp(a){Y(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},
73
72
  context:{B:2}}})}notifyPlayoutRate(a){Y(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutRate:a},context:{B:4}}})}notifyBuffering(a){Y(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a,playbackState:"BUFFERING"},context:{B:3}}})}notifyReady(a){Y(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},context:{B:3}}})}disconnect(){this.g.disconnect()}};
74
- function Zf(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 Vf(a,b){sd(a.signal,c=>{b(c)},a.g)}var $f=class{constructor(a,b){this.channel=a;this.signal=b;this.g=new O}send(a){this.channel.send(JSON.stringify(yb(a)))}async D(a,b){a=await this.channel.D(JSON.stringify(yb(a)));return b(a.data)}shutdown(){this.g.dispose()}};function ag(a,b){var c=bg;const d=a.signal(),e=a.signal();sd(b,f=>{const g=c(f)?d:e;Le(a,g,f)},a);return{ja:d,ha:e}}function cg(a,b,c,d){const e=d!=null?d:f=>f;sd(c,f=>{Le(a,b,e(f))},a)};async function dg(a,b){if(b)return a=await Sf({activityTitle:b.activityTitle,K:"co-watching",ka:()=>b.onCoWatchingStateQuery(),O:c=>{b.onCoWatchingStateChanged(c)}},a,{X:Kf,W:Mf,V:Pf,N:If,M:Zf}),new Yf(a)}async function eg(a,b){if(b)return a=await Sf({activityTitle:b.activityTitle,K:"co-doing",O:c=>{b.onCoDoingStateChanged(c)}},a,{X:Ff,W:Hf,V:Qf,N:Ef,M:Xf}),new Wf(a)}
75
- async function fg(a){var b=new Oe,c=b.signal();a=await a;cg(b,c,a.signal,f=>f.content);const {ja:d,ha:e}=ag(b,c);b=new $f(a.channel,d);c=new $f(a.channel,e);return{aa:b,ba:c}}function bg(a){a:switch(x(a,bf)){case 1:a=E(a,Ze,1,bf);break a;default:throw Error("CA Message arrived with no known content message set");}return a.h()};async function gg(a,b){({aa:a}=await fg(hf(a.g)));b=await eg(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function hg(a,b){({ba:a}=await fg(hf(a.g)));b=await dg(a,b);if(!b)throw Error("Failed to create co-watching session");return b};var ig=class extends Ad{async notifySidePanel(a){await lf(this.context.g,1,a)}async unloadSidePanel(){await jf(this.context.g)}async loadSidePanel(){await kf(this.context.g)}};var jg=class extends Ad{async setAddonStartingState(a){if(a===null)throw new H(Cc("addonStartingState"));if(typeof a!=="object")throw new H(L("addonStartingState",typeof a,"object | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new H(L("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!=="string")throw new H(L("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.sidePanelUrl+
76
- +!!a.additionalData)throw new H(Bc);if(Object.keys(a).length===0)throw new H(Ac);var b=[];b.push(Yc(Xc(Vc(1),a.sidePanelUrl),a.additionalData));a=this.context.g;var c=new Sd,d=c.setAddonStartingState,e=new Rd;b=Vb(e,b);await mf(a,d.call(c,b))}};var kg=class extends Ad{async notifyMainStage(a){await lf(this.context.g,2,a)}};var lg=class{constructor(a){a=a.cloudProjectNumber;const b=Cd();if(b.cloudProjectNumber!==a)throw new H(uc);const c=b.S,d=b.ca;let e;nf=(e=nf)!=null?e:df(d,c,a);this.g=new of(b)}async createMainStageClient(){var a=this.g;if(a.h.frameType!==2)throw new H(pc);return await Promise.resolve(new ig(a))}async createSidePanelClient(){var a=this.g;if(a.h.frameType!==1)throw new H(qc);return await Promise.resolve(new kg(a))}async createCoWatchingClient(a){return await hg(this.g,a)}async createCoDoingClient(a){return await gg(this.g,
77
- a)}async createRoomsStandaloneClient(){var a=this.g;if(a.h.frameType!==2)throw new H(pc);return await Promise.resolve(new jg(a))}};let mg=null;for(var ng={addon:{getFrameType:function(){a:{var a=Cd().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 H(Cc("config"));if(typeof a!=="object")throw new H(L("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new H(L("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(mg&&Cd().S!=="integration.test.google.com")throw new H(Lc);
78
- return mg=new lg(a)}}},og=["meet"],Z=ea,pg;og.length&&(pg=og.shift());)og.length||ng===void 0?Z[pg]&&Z[pg]!==Object.prototype[pg]?Z=Z[pg]:Z=Z[pg]={}:Z[pg]=ng;}).apply(topLevel);export const meet = topLevel.meet;
73
+ function bg(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 Yf(a,b){vd(a.signal,c=>{b(c)},a.g)}var cg=class{constructor(a,b){this.channel=a;this.signal=b;this.g=new O}send(a){this.channel.send(JSON.stringify(Bb(a)))}async D(a,b){a=await this.channel.D(JSON.stringify(Bb(a)));return b(a.data)}shutdown(){this.g.dispose()}};function dg(a,b){var c=eg;const d=a.signal(),e=a.signal();vd(b,f=>{const g=c(f)?d:e;Oe(a,g,f)},a);return{ja:d,ha:e}}function fg(a,b,c,d){const e=d!=null?d:f=>f;vd(c,f=>{Oe(a,b,e(f))},a)};async function gg(a,b){if(b)return a=await Vf({activityTitle:b.activityTitle,K:"co-watching",ka:()=>b.onCoWatchingStateQuery(),O:c=>{b.onCoWatchingStateChanged(c)}},a,{X:Nf,W:Pf,V:Sf,N:Lf,M:bg}),new ag(a)}async function hg(a,b){if(b)return a=await Vf({activityTitle:b.activityTitle,K:"co-doing",O:c=>{b.onCoDoingStateChanged(c)}},a,{X:If,W:Kf,V:Tf,N:Hf,M:$f}),new Zf(a)}
74
+ async function ig(a){var b=new Re,c=b.signal();a=await a;fg(b,c,a.signal,f=>f.content);const {ja:d,ha:e}=dg(b,c);b=new cg(a.channel,d);c=new cg(a.channel,e);return{aa:b,ba:c}}function eg(a){a:switch(x(a,ef)){case 1:a=E(a,bf,1,ef);break a;default:throw Error("CA Message arrived with no known content message set");}return a.h()};async function jg(a,b){({aa:a}=await ig(lf(a.g)));b=await hg(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function kg(a,b){({ba:a}=await ig(lf(a.g)));b=await gg(a,b);if(!b)throw Error("Failed to create co-watching session");return b};var lg=class extends Dd{async notifySidePanel(a){await of(this.context.g,1,a)}async unloadSidePanel(){await mf(this.context.g)}async loadSidePanel(){await nf(this.context.g)}};var mg=class extends Dd{async setAddonStartingState(a){if(a===null)throw new J(Fc("addonStartingState"));if(typeof a!=="object")throw new J(L("addonStartingState",typeof a,"object | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new J(L("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!=="string")throw new J(L("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.sidePanelUrl+
75
+ +!!a.additionalData)throw new J(Ec);if(Object.keys(a).length===0)throw new J(Dc);var b=[];b.push(ad($c(Yc(1),a.sidePanelUrl),a.additionalData));a=this.context.g;var c=new Vd,d=c.setAddonStartingState,e=new Ud;b=Yb(e,b);await pf(a,d.call(c,b))}};var ng=class extends Dd{async notifyMainStage(a){await of(this.context.g,2,a)}};var og=class{constructor(a){a=a.cloudProjectNumber;const b=Fd();if(b.cloudProjectNumber!==a)throw new J(xc);const c=b.S,d=b.ca;let e;qf=(e=qf)!=null?e:gf(d,c,a);this.g=new rf(b)}async createMainStageClient(){var a=this.g;if(a.h.frameType!==2)throw new J(sc);return await Promise.resolve(new lg(a))}async createSidePanelClient(){var a=this.g;if(a.h.frameType!==1)throw new J(tc);return await Promise.resolve(new ng(a))}async createCoWatchingClient(a){return await kg(this.g,a)}async createCoDoingClient(a){return await jg(this.g,
76
+ a)}async createRoomsStandaloneClient(){var a=this.g;if(a.h.frameType!==2)throw new J(sc);return await Promise.resolve(new mg(a))}};let pg=null;for(var qg={addon:{getFrameType:function(){a:{var a=Fd().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 J(Fc("config"));if(typeof a!=="object")throw new J(L("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new J(L("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(pg&&Fd().S!=="integration.test.google.com")throw new J(Oc);
77
+ return pg=new og(a)}}},rg=["meet"],Z=ea,sg;rg.length&&(sg=rg.shift());)rg.length||qg===void 0?Z[sg]&&Z[sg]!==Object.prototype[sg]?Z=Z[sg]:Z=Z[sg]={}:Z[sg]=qg;}).apply(topLevel);export const meet = topLevel.meet;
@@ -1,40 +1,5 @@
1
1
 
2
2
 
3
- // Original file: index.types.d.ts
4
-
5
-
6
- /**
7
- * The main entry point for accessing Meet add-on screenshare functionality.
8
- * Available globally under `window.meet.addon.screensharing`, or by importing
9
- * `meet.addon.screensharing`.
10
- */
11
- export interface MeetAddonScreenshare {
12
- /**
13
- * Enables a third-party site to set content and its corresponding add-on when
14
- * transitioning from screen sharing to the Meet add-on.
15
- */
16
- exposeToMeetWhenScreensharing(
17
- clientScreenshareInfo: AddonScreenshareInfo,
18
- ): void;
19
- }
20
-
21
- /** The structure of the top-level add-on screenshare export. */
22
- interface MeetAddonScreenshareExport {
23
- addon: {screensharing: MeetAddonScreenshare};
24
- }
25
-
26
- /**
27
- * The main entry point for accessing Meet add-on screenshare functionality.
28
- */
29
- export const meet: MeetAddonScreenshareExport;
30
-
31
- declare global {
32
- export interface Window {
33
- meet: MeetAddonScreenshareExport;
34
- }
35
- }
36
-
37
-
38
3
  // Original file: screenshare_info.types.d.ts
39
4
 
40
5
  /**
@@ -68,3 +33,38 @@ export interface AddonScreenshareInfo {
68
33
  */
69
34
  mainStageUrl?: string;
70
35
  }
36
+
37
+
38
+ // Original file: index.types.d.ts
39
+
40
+
41
+ /**
42
+ * The main entry point for accessing Meet add-on screenshare functionality.
43
+ * Available globally under `window.meet.addon.screensharing`, or by importing
44
+ * `meet.addon.screensharing`.
45
+ */
46
+ export interface MeetAddonScreenshare {
47
+ /**
48
+ * Enables a third-party site to set content and its corresponding add-on when
49
+ * transitioning from screen sharing to the Meet add-on.
50
+ */
51
+ exposeToMeetWhenScreensharing(
52
+ clientScreenshareInfo: AddonScreenshareInfo,
53
+ ): void;
54
+ }
55
+
56
+ /** The structure of the top-level add-on screenshare export. */
57
+ interface MeetAddonScreenshareExport {
58
+ addon: {screensharing: MeetAddonScreenshare};
59
+ }
60
+
61
+ /**
62
+ * The main entry point for accessing Meet add-on screenshare functionality.
63
+ */
64
+ export const meet: MeetAddonScreenshareExport;
65
+
66
+ declare global {
67
+ export interface Window {
68
+ meet: MeetAddonScreenshareExport;
69
+ }
70
+ }
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-882204219",
4
+ "version": "1.2.0-dev-883351576",
5
5
  "repository": "googleworkspace/meet",
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "homepage": "https://developers.google.com/meet/add-ons/guides/overview",