· 6 years ago · Oct 30, 2019, 04:26 AM
1var m, aa = "function" == typeof Object.create ? Object.create : function(a) {
2 var b = function() {};
3 b.prototype = a;
4 return new b
5}
6, ba;
7if ("function" == typeof Object.setPrototypeOf)
8 ba = Object.setPrototypeOf;
9else {
10 var ca;
11 a: {
12 var da = {
13 Ob: !0
14 }
15 , ea = {};
16 try {
17 ea.__proto__ = da;
18 ca = ea.Ob;
19 break a
20 } catch (a) {}
21 ca = !1
22 }
23 ba = ca ? function(a, b) {
24 a.__proto__ = b;
25 if (a.__proto__ !== b)
26 throw new TypeError(a + " is not extensible");
27 return a
28 }
29 : null
30}
31var fa = ba
32 , p = function(a, b) {
33 a.prototype = aa(b.prototype);
34 a.prototype.constructor = a;
35 if (fa)
36 fa(a, b);
37 else
38 for (var c in b)
39 if ("prototype" != c)
40 if (Object.defineProperties) {
41 var d = Object.getOwnPropertyDescriptor(b, c);
42 d && Object.defineProperty(a, c, d)
43 } else
44 a[c] = b[c];
45 a.ab = b.prototype
46}
47 , ha = function(a) {
48 var b = 0;
49 return function() {
50 return b < a.length ? {
51 done: !1,
52 value: a[b++]
53 } : {
54 done: !0
55 }
56 }
57}
58 , q = function(a) {
59 var b = "undefined" != typeof Symbol && Symbol.iterator && a[Symbol.iterator];
60 return b ? b.call(a) : {
61 next: ha(a)
62 }
63}
64 , r = "undefined" != typeof window && window === this ? this : "undefined" != typeof global && null != global ? global : this
65 , ia = "function" == typeof Object.defineProperties ? Object.defineProperty : function(a, b, c) {
66 a != Array.prototype && a != Object.prototype && (a[b] = c.value)
67}
68 , ja = function(a, b) {
69 if (b) {
70 var c = r;
71 a = a.split(".");
72 for (var d = 0; d < a.length - 1; d++) {
73 var e = a[d];
74 e in c || (c[e] = {});
75 c = c[e]
76 }
77 a = a[a.length - 1];
78 d = c[a];
79 b = b(d);
80 b != d && null != b && ia(c, a, {
81 configurable: !0,
82 writable: !0,
83 value: b
84 })
85 }
86};
87ja("Promise", function(a) {
88 function b() {
89 this.P = null
90 }
91 function c(h) {
92 return h instanceof e ? h : new e(function(g) {
93 g(h)
94 }
95 )
96 }
97 if (a)
98 return a;
99 b.prototype.fb = function(h) {
100 if (null == this.P) {
101 this.P = [];
102 var g = this;
103 this.gb(function() {
104 g.Wb()
105 })
106 }
107 this.P.push(h)
108 }
109 ;
110 var d = r.setTimeout;
111 b.prototype.gb = function(h) {
112 d(h, 0)
113 }
114 ;
115 b.prototype.Wb = function() {
116 for (; this.P && this.P.length; ) {
117 var h = this.P;
118 this.P = [];
119 for (var g = 0; g < h.length; ++g) {
120 var k = h[g];
121 h[g] = null;
122 try {
123 k()
124 } catch (l) {
125 this.Tb(l)
126 }
127 }
128 }
129 this.P = null
130 }
131 ;
132 b.prototype.Tb = function(h) {
133 this.gb(function() {
134 throw h;
135 })
136 }
137 ;
138 var e = function(h) {
139 this.l = 0;
140 this.ha = void 0;
141 this.ga = [];
142 var g = this.Na();
143 try {
144 h(g.resolve, g.reject)
145 } catch (k) {
146 g.reject(k)
147 }
148 };
149 e.prototype.Na = function() {
150 function h(l) {
151 return function(n) {
152 k || (k = !0,
153 l.call(g, n))
154 }
155 }
156 var g = this
157 , k = !1;
158 return {
159 resolve: h(this.wc),
160 reject: h(this.Xa)
161 }
162 }
163 ;
164 e.prototype.wc = function(h) {
165 if (h === this)
166 this.Xa(new TypeError("A Promise cannot resolve to itself"));
167 else if (h instanceof e)
168 this.yc(h);
169 else {
170 a: switch (typeof h) {
171 case "object":
172 var g = null != h;
173 break a;
174 case "function":
175 g = !0;
176 break a;
177 default:
178 g = !1
179 }
180 g ? this.vc(h) : this.mb(h)
181 }
182 }
183 ;
184 e.prototype.vc = function(h) {
185 var g = void 0;
186 try {
187 g = h.then
188 } catch (k) {
189 this.Xa(k);
190 return
191 }
192 "function" == typeof g ? this.zc(g, h) : this.mb(h)
193 }
194 ;
195 e.prototype.Xa = function(h) {
196 this.Db(2, h)
197 }
198 ;
199 e.prototype.mb = function(h) {
200 this.Db(1, h)
201 }
202 ;
203 e.prototype.Db = function(h, g) {
204 if (0 != this.l)
205 throw Error("Cannot settle(" + h + ", " + g + "): Promise already settled in state" + this.l);
206 this.l = h;
207 this.ha = g;
208 this.Yb()
209 }
210 ;
211 e.prototype.Yb = function() {
212 if (null != this.ga) {
213 for (var h = 0; h < this.ga.length; ++h)
214 f.fb(this.ga[h]);
215 this.ga = null
216 }
217 }
218 ;
219 var f = new b;
220 e.prototype.yc = function(h) {
221 var g = this.Na();
222 h.ya(g.resolve, g.reject)
223 }
224 ;
225 e.prototype.zc = function(h, g) {
226 var k = this.Na();
227 try {
228 h.call(g, k.resolve, k.reject)
229 } catch (l) {
230 k.reject(l)
231 }
232 }
233 ;
234 e.prototype.then = function(h, g) {
235 function k(x, O) {
236 return "function" == typeof x ? function(fb) {
237 try {
238 l(x(fb))
239 } catch (gb) {
240 n(gb)
241 }
242 }
243 : O
244 }
245 var l, n, A = new e(function(x, O) {
246 l = x;
247 n = O
248 }
249 );
250 this.ya(k(h, l), k(g, n));
251 return A
252 }
253 ;
254 e.prototype.catch = function(h) {
255 return this.then(void 0, h)
256 }
257 ;
258 e.prototype.ya = function(h, g) {
259 function k() {
260 switch (l.l) {
261 case 1:
262 h(l.ha);
263 break;
264 case 2:
265 g(l.ha);
266 break;
267 default:
268 throw Error("Unexpected state: " + l.l);
269 }
270 }
271 var l = this;
272 null == this.ga ? f.fb(k) : this.ga.push(k)
273 }
274 ;
275 e.resolve = c;
276 e.reject = function(h) {
277 return new e(function(g, k) {
278 k(h)
279 }
280 )
281 }
282 ;
283 e.race = function(h) {
284 return new e(function(g, k) {
285 for (var l = q(h), n = l.next(); !n.done; n = l.next())
286 c(n.value).ya(g, k)
287 }
288 )
289 }
290 ;
291 e.all = function(h) {
292 var g = q(h)
293 , k = g.next();
294 return k.done ? c([]) : new e(function(l, n) {
295 function A(fb) {
296 return function(gb) {
297 x[fb] = gb;
298 O--;
299 0 == O && l(x)
300 }
301 }
302 var x = []
303 , O = 0;
304 do
305 x.push(void 0),
306 O++,
307 c(k.value).ya(A(x.length - 1), n),
308 k = g.next();
309 while (!k.done)
310 }
311 )
312 }
313 ;
314 return e
315});
316var ka = function() {
317 ka = function() {}
318 ;
319 r.Symbol || (r.Symbol = la)
320}
321 , ma = function(a, b) {
322 this.Jb = a;
323 ia(this, "description", {
324 configurable: !0,
325 writable: !0,
326 value: b
327 })
328};
329ma.prototype.toString = function() {
330 return this.Jb
331}
332;
333var la = function() {
334 function a(c) {
335 if (this instanceof a)
336 throw new TypeError("Symbol is not a constructor");
337 return new ma("jscomp_symbol_" + (c || "") + "_" + b++,c)
338 }
339 var b = 0;
340 return a
341}()
342 , oa = function() {
343 ka();
344 var a = r.Symbol.iterator;
345 a || (a = r.Symbol.iterator = r.Symbol("Symbol.iterator"));
346 "function" != typeof Array.prototype[a] && ia(Array.prototype, a, {
347 configurable: !0,
348 writable: !0,
349 value: function() {
350 return na(ha(this))
351 }
352 });
353 oa = function() {}
354}
355 , na = function(a) {
356 oa();
357 a = {
358 next: a
359 };
360 a[r.Symbol.iterator] = function() {
361 return this
362 }
363 ;
364 return a
365}
366 , pa = function() {
367 this.oa = !1;
368 this.T = null;
369 this.cb = void 0;
370 this.O = 1;
371 this.lb = this.za = 0;
372 this.U = null
373}
374 , qa = function(a) {
375 if (a.oa)
376 throw new TypeError("Generator is already running");
377 a.oa = !0
378};
379pa.prototype.ra = function(a) {
380 this.cb = a
381}
382;
383pa.prototype.ua = function(a) {
384 this.U = {
385 kb: a,
386 bc: !0
387 };
388 this.O = this.za || this.lb
389}
390;
391pa.prototype.return = function(a) {
392 this.U = {
393 return: a
394 };
395 this.O = this.lb
396}
397;
398var ra = function(a, b, c) {
399 a.O = c;
400 return {
401 value: b
402 }
403}
404 , sa = function(a) {
405 this.a = new pa;
406 this.sc = a
407};
408sa.prototype.ra = function(a) {
409 qa(this.a);
410 if (this.a.T)
411 return ta(this, this.a.T.next, a, this.a.ra);
412 this.a.ra(a);
413 return ua(this)
414}
415;
416var va = function(a, b) {
417 qa(a.a);
418 var c = a.a.T;
419 if (c)
420 return ta(a, "return"in c ? c["return"] : function(d) {
421 return {
422 value: d,
423 done: !0
424 }
425 }
426 , b, a.a.return);
427 a.a.return(b);
428 return ua(a)
429};
430sa.prototype.ua = function(a) {
431 qa(this.a);
432 if (this.a.T)
433 return ta(this, this.a.T["throw"], a, this.a.ra);
434 this.a.ua(a);
435 return ua(this)
436}
437;
438var ta = function(a, b, c, d) {
439 try {
440 var e = b.call(a.a.T, c);
441 if (!(e instanceof Object))
442 throw new TypeError("Iterator result " + e + " is not an object");
443 if (!e.done)
444 return a.a.oa = !1,
445 e;
446 var f = e.value
447 } catch (h) {
448 return a.a.T = null,
449 a.a.ua(h),
450 ua(a)
451 }
452 a.a.T = null;
453 d.call(a.a, f);
454 return ua(a)
455}
456 , ua = function(a) {
457 for (; a.a.O; )
458 try {
459 var b = a.sc(a.a);
460 if (b)
461 return a.a.oa = !1,
462 {
463 value: b.value,
464 done: !1
465 }
466 } catch (c) {
467 a.a.cb = void 0,
468 a.a.ua(c)
469 }
470 a.a.oa = !1;
471 if (a.a.U) {
472 b = a.a.U;
473 a.a.U = null;
474 if (b.bc)
475 throw b.kb;
476 return {
477 value: b.return,
478 done: !0
479 }
480 }
481 return {
482 value: void 0,
483 done: !0
484 }
485}
486 , wa = function(a) {
487 this.next = function(b) {
488 return a.ra(b)
489 }
490 ;
491 this.throw = function(b) {
492 return a.ua(b)
493 }
494 ;
495 this.return = function(b) {
496 return va(a, b)
497 }
498 ;
499 oa();
500 this[Symbol.iterator] = function() {
501 return this
502 }
503}
504 , xa = function(a) {
505 function b(d) {
506 return a.next(d)
507 }
508 function c(d) {
509 return a.throw(d)
510 }
511 return new Promise(function(d, e) {
512 function f(h) {
513 h.done ? d(h.value) : Promise.resolve(h.value).then(b, c).then(f, e)
514 }
515 f(a.next())
516 }
517 )
518}
519 , t = function(a, b) {
520 return Object.prototype.hasOwnProperty.call(a, b)
521};
522ja("WeakMap", function(a) {
523 function b() {}
524 function c(g) {
525 if (!t(g, e)) {
526 var k = new b;
527 ia(g, e, {
528 value: k
529 })
530 }
531 }
532 function d(g) {
533 var k = Object[g];
534 k && (Object[g] = function(l) {
535 if (l instanceof b)
536 return l;
537 c(l);
538 return k(l)
539 }
540 )
541 }
542 if (function() {
543 if (!a || !Object.seal)
544 return !1;
545 try {
546 var g = Object.seal({})
547 , k = Object.seal({})
548 , l = new a([[g, 2], [k, 3]]);
549 if (2 != l.get(g) || 3 != l.get(k))
550 return !1;
551 l.delete(g);
552 l.set(k, 4);
553 return !l.has(g) && 4 == l.get(k)
554 } catch (n) {
555 return !1
556 }
557 }())
558 return a;
559 var e = "$jscomp_hidden_" + Math.random();
560 d("freeze");
561 d("preventExtensions");
562 d("seal");
563 var f = 0
564 , h = function(g) {
565 this.na = (f += Math.random() + 1).toString();
566 if (g) {
567 g = q(g);
568 for (var k; !(k = g.next()).done; )
569 k = k.value,
570 this.set(k[0], k[1])
571 }
572 };
573 h.prototype.set = function(g, k) {
574 c(g);
575 if (!t(g, e))
576 throw Error("WeakMap key fail: " + g);
577 g[e][this.na] = k;
578 return this
579 }
580 ;
581 h.prototype.get = function(g) {
582 return t(g, e) ? g[e][this.na] : void 0
583 }
584 ;
585 h.prototype.has = function(g) {
586 return t(g, e) && t(g[e], this.na)
587 }
588 ;
589 h.prototype.delete = function(g) {
590 return t(g, e) && t(g[e], this.na) ? delete g[e][this.na] : !1
591 }
592 ;
593 return h
594});
595ja("Map", function(a) {
596 if (function() {
597 if (!a || "function" != typeof a || !a.prototype.entries || "function" != typeof Object.seal)
598 return !1;
599 try {
600 var g = Object.seal({
601 x: 4
602 })
603 , k = new a(q([[g, "s"]]));
604 if ("s" != k.get(g) || 1 != k.size || k.get({
605 x: 4
606 }) || k.set({
607 x: 4
608 }, "t") != k || 2 != k.size)
609 return !1;
610 var l = k.entries()
611 , n = l.next();
612 if (n.done || n.value[0] != g || "s" != n.value[1])
613 return !1;
614 n = l.next();
615 return n.done || 4 != n.value[0].x || "t" != n.value[1] || !l.next().done ? !1 : !0
616 } catch (A) {
617 return !1
618 }
619 }())
620 return a;
621 oa();
622 var b = new WeakMap
623 , c = function(g) {
624 this.ka = {};
625 this.v = f();
626 this.size = 0;
627 if (g) {
628 g = q(g);
629 for (var k; !(k = g.next()).done; )
630 k = k.value,
631 this.set(k[0], k[1])
632 }
633 };
634 c.prototype.set = function(g, k) {
635 g = 0 === g ? 0 : g;
636 var l = d(this, g);
637 l.list || (l.list = this.ka[l.id] = []);
638 l.entry ? l.entry.value = k : (l.entry = {
639 next: this.v,
640 previous: this.v.previous,
641 head: this.v,
642 key: g,
643 value: k
644 },
645 l.list.push(l.entry),
646 this.v.previous.next = l.entry,
647 this.v.previous = l.entry,
648 this.size++);
649 return this
650 }
651 ;
652 c.prototype.delete = function(g) {
653 g = d(this, g);
654 return g.entry && g.list ? (g.list.splice(g.index, 1),
655 g.list.length || delete this.ka[g.id],
656 g.entry.previous.next = g.entry.next,
657 g.entry.next.previous = g.entry.previous,
658 g.entry.head = null,
659 this.size--,
660 !0) : !1
661 }
662 ;
663 c.prototype.clear = function() {
664 this.ka = {};
665 this.v = this.v.previous = f();
666 this.size = 0
667 }
668 ;
669 c.prototype.has = function(g) {
670 return !!d(this, g).entry
671 }
672 ;
673 c.prototype.get = function(g) {
674 return (g = d(this, g).entry) && g.value
675 }
676 ;
677 c.prototype.entries = function() {
678 return e(this, function(g) {
679 return [g.key, g.value]
680 })
681 }
682 ;
683 c.prototype.keys = function() {
684 return e(this, function(g) {
685 return g.key
686 })
687 }
688 ;
689 c.prototype.values = function() {
690 return e(this, function(g) {
691 return g.value
692 })
693 }
694 ;
695 c.prototype.forEach = function(g, k) {
696 for (var l = this.entries(), n; !(n = l.next()).done; )
697 n = n.value,
698 g.call(k, n[1], n[0], this)
699 }
700 ;
701 c.prototype[Symbol.iterator] = c.prototype.entries;
702 var d = function(g, k) {
703 var l = k && typeof k;
704 "object" == l || "function" == l ? b.has(k) ? l = b.get(k) : (l = "" + ++h,
705 b.set(k, l)) : l = "p_" + k;
706 var n = g.ka[l];
707 if (n && t(g.ka, l))
708 for (g = 0; g < n.length; g++) {
709 var A = n[g];
710 if (k !== k && A.key !== A.key || k === A.key)
711 return {
712 id: l,
713 list: n,
714 index: g,
715 entry: A
716 }
717 }
718 return {
719 id: l,
720 list: n,
721 index: -1,
722 entry: void 0
723 }
724 }
725 , e = function(g, k) {
726 var l = g.v;
727 return na(function() {
728 if (l) {
729 for (; l.head != g.v; )
730 l = l.previous;
731 for (; l.next != l.head; )
732 return l = l.next,
733 {
734 done: !1,
735 value: k(l)
736 };
737 l = null
738 }
739 return {
740 done: !0,
741 value: void 0
742 }
743 })
744 }
745 , f = function() {
746 var g = {};
747 return g.previous = g.next = g.head = g
748 }
749 , h = 0;
750 return c
751});
752ja("Set", function(a) {
753 if (function() {
754 if (!a || "function" != typeof a || !a.prototype.entries || "function" != typeof Object.seal)
755 return !1;
756 try {
757 var c = Object.seal({
758 x: 4
759 })
760 , d = new a(q([c]));
761 if (!d.has(c) || 1 != d.size || d.add(c) != d || 1 != d.size || d.add({
762 x: 4
763 }) != d || 2 != d.size)
764 return !1;
765 var e = d.entries()
766 , f = e.next();
767 if (f.done || f.value[0] != c || f.value[1] != c)
768 return !1;
769 f = e.next();
770 return f.done || f.value[0] == c || 4 != f.value[0].x || f.value[1] != f.value[0] ? !1 : e.next().done
771 } catch (h) {
772 return !1
773 }
774 }())
775 return a;
776 oa();
777 var b = function(c) {
778 this.g = new Map;
779 if (c) {
780 c = q(c);
781 for (var d; !(d = c.next()).done; )
782 this.add(d.value)
783 }
784 this.size = this.g.size
785 };
786 b.prototype.add = function(c) {
787 c = 0 === c ? 0 : c;
788 this.g.set(c, c);
789 this.size = this.g.size;
790 return this
791 }
792 ;
793 b.prototype.delete = function(c) {
794 c = this.g.delete(c);
795 this.size = this.g.size;
796 return c
797 }
798 ;
799 b.prototype.clear = function() {
800 this.g.clear();
801 this.size = 0
802 }
803 ;
804 b.prototype.has = function(c) {
805 return this.g.has(c)
806 }
807 ;
808 b.prototype.entries = function() {
809 return this.g.entries()
810 }
811 ;
812 b.prototype.values = function() {
813 return this.g.values()
814 }
815 ;
816 b.prototype.keys = b.prototype.values;
817 b.prototype[Symbol.iterator] = b.prototype.values;
818 b.prototype.forEach = function(c, d) {
819 var e = this;
820 this.g.forEach(function(f) {
821 return c.call(d, f, f, e)
822 })
823 }
824 ;
825 return b
826});
827var ya = function(a, b, c) {
828 if (null == a)
829 throw new TypeError("The 'this' value for String.prototype." + c + " must not be null or undefined");
830 if (b instanceof RegExp)
831 throw new TypeError("First argument to String.prototype." + c + " must not be a regular expression");
832 return a + ""
833};
834ja("String.prototype.endsWith", function(a) {
835 return a ? a : function(b, c) {
836 var d = ya(this, b, "endsWith");
837 b += "";
838 void 0 === c && (c = d.length);
839 c = Math.max(0, Math.min(c | 0, d.length));
840 for (var e = b.length; 0 < e && 0 < c; )
841 if (d[--c] != b[--e])
842 return !1;
843 return 0 >= e
844 }
845});
846ja("String.prototype.repeat", function(a) {
847 return a ? a : function(b) {
848 var c = ya(this, null, "repeat");
849 if (0 > b || 1342177279 < b)
850 throw new RangeError("Invalid count value");
851 b |= 0;
852 for (var d = ""; b; )
853 if (b & 1 && (d += c),
854 b >>>= 1)
855 c += c;
856 return d
857 }
858});
859window.Gc = !0;
860var u = this || self
861 , v = function(a) {
862 return "string" == typeof a
863}
864 , za = function() {}
865 , w = function(a) {
866 var b = typeof a;
867 if ("object" == b)
868 if (a) {
869 if (a instanceof Array)
870 return "array";
871 if (a instanceof Object)
872 return b;
873 var c = Object.prototype.toString.call(a);
874 if ("[object Window]" == c)
875 return "object";
876 if ("[object Array]" == c || "number" == typeof a.length && "undefined" != typeof a.splice && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("splice"))
877 return "array";
878 if ("[object Function]" == c || "undefined" != typeof a.call && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("call"))
879 return "function"
880 } else
881 return "null";
882 else if ("function" == b && "undefined" == typeof a.call)
883 return "object";
884 return b
885}
886 , Aa = function(a) {
887 var b = w(a);
888 return "array" == b || "object" == b && "number" == typeof a.length
889}
890 , y = function(a) {
891 return "function" == w(a)
892}
893 , Ba = function(a) {
894 var b = typeof a;
895 return "object" == b && null != a || "function" == b
896}
897 , Ca = function(a, b, c) {
898 return a.call.apply(a.bind, arguments)
899}
900 , Da = function(a, b, c) {
901 if (!a)
902 throw Error();
903 if (2 < arguments.length) {
904 var d = Array.prototype.slice.call(arguments, 2);
905 return function() {
906 var e = Array.prototype.slice.call(arguments);
907 Array.prototype.unshift.apply(e, d);
908 return a.apply(b, e)
909 }
910 }
911 return function() {
912 return a.apply(b, arguments)
913 }
914}
915 , Ea = function(a, b, c) {
916 Ea = Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? Ca : Da;
917 return Ea.apply(null, arguments)
918}
919 , Fa = function(a, b) {
920 var c = Array.prototype.slice.call(arguments, 1);
921 return function() {
922 var d = c.slice();
923 d.push.apply(d, arguments);
924 return a.apply(this, d)
925 }
926}
927 , Ga = Date.now || function() {
928 return +new Date
929}
930 , Ha = function(a, b) {
931 function c() {}
932 c.prototype = b.prototype;
933 a.ab = b.prototype;
934 a.prototype = new c;
935 a.prototype.constructor = a;
936 a.Hc = function(d, e, f) {
937 for (var h = Array(arguments.length - 2), g = 2; g < arguments.length; g++)
938 h[g - 2] = arguments[g];
939 return b.prototype[e].apply(d, h)
940 }
941};
942var Ia = function(a, b) {
943 for (var c in a)
944 if (b.call(void 0, a[c], c, a))
945 return !0;
946 return !1
947};
948var Ja = function(a, b) {
949 if (a !== b)
950 throw Error("Expected |type| == " + a + " but got: " + b);
951}
952 , Ka = function(a, b) {
953 if (v(a))
954 return a;
955 throw Error("Expected string for |" + b + "| but got " + w(a) + ": " + a);
956};
957var z = function(a) {
958 if (Error.captureStackTrace)
959 Error.captureStackTrace(this, z);
960 else {
961 var b = Error().stack;
962 b && (this.stack = b)
963 }
964 a && (this.message = String(a))
965};
966Ha(z, Error);
967z.prototype.name = "CustomError";
968var La = function(a, b) {
969 a = a.split("%s");
970 for (var c = "", d = a.length - 1, e = 0; e < d; e++)
971 c += a[e] + (e < b.length ? b[e] : "%s");
972 z.call(this, c + a[d])
973};
974Ha(La, z);
975La.prototype.name = "AssertionError";
976var Ma = function(a, b, c, d) {
977 var e = "Assertion failed";
978 if (c) {
979 e += ": " + c;
980 var f = d
981 } else
982 a && (e += ": " + a,
983 f = b);
984 throw new La("" + e,f || []);
985}
986 , B = function(a, b, c) {
987 a || Ma("", null, b, Array.prototype.slice.call(arguments, 2))
988}
989 , Na = function(a, b) {
990 throw new La("Failure" + (a ? ": " + a : ""),Array.prototype.slice.call(arguments, 1));
991}
992 , Oa = function(a, b, c) {
993 "number" == typeof a || Ma("Expected number but got %s: %s.", [w(a), a], b, Array.prototype.slice.call(arguments, 2));
994 return a
995}
996 , Pa = function(a, b, c) {
997 y(a) || Ma("Expected function but got %s: %s.", [w(a), a], b, Array.prototype.slice.call(arguments, 2))
998};
999var Qa = function() {
1000 this.ib = new Set;
1001 this.Ha = new Map;
1002 this.sa = new Map
1003};
1004Qa.prototype.add = function(a, b, c) {
1005 b = void 0 === b ? "" : b;
1006 c = void 0 === c ? null : c;
1007 B(null == c || "" != b);
1008 if ("" == b)
1009 this.ib.add(a);
1010 else if (c) {
1011 var d = this.sa.get(b);
1012 d || (d = new Map,
1013 this.sa.set(b, d));
1014 d.set(a, c)
1015 } else
1016 c = this.Ha.get(b),
1017 c || (c = new Set,
1018 this.Ha.set(b, c)),
1019 c.add(a)
1020}
1021;
1022Qa.prototype.filter = function(a) {
1023 var b = {}, c;
1024 for (c in a)
1025 b[c] = a[c];
1026 a = a.type;
1027 for (var d in b)
1028 this.ib.has(d) || null != b[d] && (a && this.Ha.has(a) && this.Ha.get(a).has(d) || (a && this.sa.has(a) && this.sa.get(a).has(d) && "object" == typeof b[d] ? b[d] = this.sa.get(a).get(d).filter(b[d]) : b[d] = "<redacted>"));
1029 return b
1030}
1031;
1032var C = new Qa;
1033C.add("id");
1034C.add("type");
1035var Ra = function(a, b) {
1036 if (!a)
1037 throw Error("object == null");
1038 Ka(a.type, "type");
1039 "any" != b && Ja(a.type, b);
1040 return {
1041 type: a.type
1042 }
1043};
1044C.add("version", "hello");
1045var Sa = function(a) {
1046 var b = Ra.call(this, a, "setClipboard");
1047 b.payload = Ka(a.payload, "payload");
1048 return b
1049}
1050 , Ta = function(a) {
1051 var b = {
1052 type: a.type
1053 };
1054 b.payload = a.payload;
1055 return b
1056}
1057 , D = function(a, b, c) {
1058 var d = Error.call(this, a + " returns error code: " + b + " details: " + c);
1059 this.message = d.message;
1060 "stack"in d && (this.stack = d.stack);
1061 this.Qb = a;
1062 this.errorCode = b;
1063 this.Vb = c
1064};
1065p(D, Error);
1066D.prototype.j = function() {
1067 return {
1068 type: "error",
1069 api: this.Qb,
1070 errorCode: this.errorCode,
1071 details: this.Vb,
1072 stack: this.stack
1073 }
1074}
1075;
1076var Ua = function(a) {
1077 var b = Ka(chrome.runtime.lastError.message, "unknown");
1078 return new D(a,"CHROME_RUNTIME",b)
1079}
1080 , E = function(a, b) {
1081 return b instanceof D ? b : new D(a,"UNEXPECTED_ERROR",String(b))
1082};
1083C.add("api", "error");
1084C.add("errorCode", "error");
1085C.add("details", "error");
1086C.add("stack", "error");
1087var Va = function(a) {
1088 return {
1089 j: function() {
1090 return {
1091 type: a
1092 }
1093 }
1094 }
1095}
1096 , Wa = Va("tabs.highlightResponse");
1097var F = function() {
1098 this.la = this.la;
1099 this.Z = this.Z
1100};
1101F.prototype.la = !1;
1102F.prototype.jb = function() {
1103 this.la || (this.la = !0,
1104 this.K())
1105}
1106;
1107var Xa = function(a, b) {
1108 a.la ? b() : (a.Z || (a.Z = []),
1109 a.Z.push(b))
1110};
1111F.prototype.K = function() {
1112 if (this.Z)
1113 for (; this.Z.length; )
1114 this.Z.shift()()
1115}
1116;
1117var Ya = function(a) {
1118 a && "function" == typeof a.jb && a.jb()
1119};
1120var Za = Array.prototype.indexOf ? function(a, b) {
1121 B(null != a.length);
1122 return Array.prototype.indexOf.call(a, b, void 0)
1123}
1124: function(a, b) {
1125 if (v(a))
1126 return v(b) && 1 == b.length ? a.indexOf(b, 0) : -1;
1127 for (var c = 0; c < a.length; c++)
1128 if (c in a && a[c] === b)
1129 return c;
1130 return -1
1131}
1132 , $a = Array.prototype.forEach ? function(a, b, c) {
1133 B(null != a.length);
1134 Array.prototype.forEach.call(a, b, c)
1135}
1136: function(a, b, c) {
1137 for (var d = a.length, e = v(a) ? a.split("") : a, f = 0; f < d; f++)
1138 f in e && b.call(c, e[f], f, a)
1139}
1140 , ab = function(a) {
1141 return Array.prototype.concat.apply([], arguments)
1142}
1143 , bb = function(a) {
1144 var b = a.length;
1145 if (0 < b) {
1146 for (var c = Array(b), d = 0; d < b; d++)
1147 c[d] = a[d];
1148 return c
1149 }
1150 return []
1151};
1152var cb = String.prototype.trim ? function(a) {
1153 return a.trim()
1154}
1155: function(a) {
1156 return /^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]
1157}
1158 , db = function(a, b) {
1159 return a < b ? -1 : a > b ? 1 : 0
1160};
1161var eb;
1162a: {
1163 var hb = u.navigator;
1164 if (hb) {
1165 var ib = hb.userAgent;
1166 if (ib) {
1167 eb = ib;
1168 break a
1169 }
1170 }
1171 eb = ""
1172}
1173var G = function(a) {
1174 return -1 != eb.indexOf(a)
1175};
1176var lb = function(a, b) {
1177 this.Gb = a === jb && b || "";
1178 this.Lb = kb
1179};
1180lb.prototype.toString = function() {
1181 return "Const{" + this.Gb + "}"
1182}
1183;
1184var kb = {}
1185 , jb = {}
1186 , mb = new lb(jb,"");
1187var nb = function() {
1188 this.wb = ""
1189};
1190nb.prototype.toString = function() {
1191 return "SafeScript{" + this.wb + "}"
1192}
1193;
1194nb.prototype.N = function(a) {
1195 this.wb = a;
1196 return this
1197}
1198;
1199(new nb).N("");
1200var pb = function() {
1201 this.Va = "";
1202 this.Ib = null;
1203 this.Mb = ob
1204};
1205pb.prototype.toString = function() {
1206 return "TrustedResourceUrl{" + this.Va + "}"
1207}
1208;
1209var ob = {};
1210var qb = function() {
1211 this.yb = ""
1212};
1213qb.prototype.toString = function() {
1214 return "SafeStyle{" + this.yb + "}"
1215}
1216;
1217qb.prototype.N = function(a) {
1218 this.yb = a;
1219 return this
1220}
1221;
1222(new qb).N("");
1223var rb = function() {
1224 this.xb = ""
1225};
1226rb.prototype.toString = function() {
1227 return "SafeStyleSheet{" + this.xb + "}"
1228}
1229;
1230rb.prototype.N = function(a) {
1231 this.xb = a;
1232 return this
1233}
1234;
1235(new rb).N("");
1236var H = function() {
1237 this.Ua = "";
1238 this.Kb = sb
1239};
1240H.prototype.toString = function() {
1241 return "SafeHtml{" + this.Ua + "}"
1242}
1243;
1244var tb = function(a) {
1245 if (a instanceof H && a.constructor === H && a.Kb === sb)
1246 return a.Ua;
1247 Na("expected object of type SafeHtml, got '" + a + "' of type " + w(a));
1248 return "type_error:SafeHtml"
1249}
1250 , sb = {};
1251H.prototype.N = function(a) {
1252 this.Ua = a;
1253 return this
1254}
1255;
1256(new H).N("<!DOCTYPE html>");
1257var ub = (new H).N("");
1258(new H).N("<br>");
1259var vb = function(a) {
1260 if (mb instanceof lb && mb.constructor === lb && mb.Lb === kb)
1261 var b = mb.Gb;
1262 else
1263 Na("expected object of type Const, got '" + mb + "'"),
1264 b = "type_error:Const";
1265 var c = new pb;
1266 c.Va = b;
1267 a: {
1268 try {
1269 var d = a && a.ownerDocument
1270 , e = d && (d.defaultView || d.parentWindow);
1271 e = e || u;
1272 if (e.Element && e.Location) {
1273 var f = e;
1274 break a
1275 }
1276 } catch (g) {}
1277 f = null
1278 }
1279 if (f && "undefined" != typeof f.HTMLIFrameElement && (!a || !(a instanceof f.HTMLIFrameElement) && (a instanceof f.Location || a instanceof f.Element))) {
1280 if (Ba(a))
1281 try {
1282 var h = a.constructor.displayName || a.constructor.name || Object.prototype.toString.call(a)
1283 } catch (g) {
1284 h = "<object could not be stringified>"
1285 }
1286 else
1287 h = void 0 === a ? "undefined" : null === a ? "null" : typeof a;
1288 Na("Argument is not a %s (or a non-Element, non-Location mock); got: %s", "HTMLIFrameElement", h)
1289 }
1290 c.Ib ? b = c.Ib : (c instanceof pb && c.constructor === pb && c.Mb === ob ? b = c.Va : (Na("expected object of type TrustedResourceUrl, got '" + c + "' of type " + w(c)),
1291 b = "type_error:TrustedResourceUrl"),
1292 b = b.toString());
1293 a.src = b
1294};
1295var I = String.prototype.repeat ? function(a, b) {
1296 return a.repeat(b)
1297}
1298: function(a, b) {
1299 return Array(b + 1).join(a)
1300}
1301;
1302var wb = function(a) {
1303 wb[" "](a);
1304 return a
1305};
1306wb[" "] = za;
1307var xb = G("Opera"), yb = G("Trident") || G("MSIE"), zb = G("Edge"), Ab = G("Gecko") && !(-1 != eb.toLowerCase().indexOf("webkit") && !G("Edge")) && !(G("Trident") || G("MSIE")) && !G("Edge"), Bb = -1 != eb.toLowerCase().indexOf("webkit") && !G("Edge"), Cb = function() {
1308 var a = u.document;
1309 return a ? a.documentMode : void 0
1310}, Db;
1311a: {
1312 var Eb = ""
1313 , Fb = function() {
1314 var a = eb;
1315 if (Ab)
1316 return /rv:([^\);]+)(\)|;)/.exec(a);
1317 if (zb)
1318 return /Edge\/([\d\.]+)/.exec(a);
1319 if (yb)
1320 return /\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);
1321 if (Bb)
1322 return /WebKit\/(\S+)/.exec(a);
1323 if (xb)
1324 return /(?:Version)[ \/]?(\S+)/.exec(a)
1325 }();
1326 Fb && (Eb = Fb ? Fb[1] : "");
1327 if (yb) {
1328 var Gb = Cb();
1329 if (null != Gb && Gb > parseFloat(Eb)) {
1330 Db = String(Gb);
1331 break a
1332 }
1333 }
1334 Db = Eb
1335}
1336var Hb = Db, Ib = {}, Jb;
1337Jb = u.document && yb ? Cb() : void 0;
1338var Kb = Object.freeze || function(a) {
1339 return a
1340}
1341;
1342var Lb = function(a, b, c) {
1343 this.reset(a, b, c, void 0, void 0)
1344};
1345Lb.prototype.Aa = null;
1346var Mb = 0;
1347Lb.prototype.reset = function(a, b, c, d, e) {
1348 "number" == typeof e || Mb++;
1349 this.Hb = d || Ga();
1350 this.X = a;
1351 this.ec = b;
1352 this.pb = c;
1353 delete this.Aa
1354}
1355;
1356Lb.prototype.Cb = function(a) {
1357 this.X = a
1358}
1359;
1360Lb.prototype.getMessage = function() {
1361 return this.ec
1362}
1363;
1364var J = function(a) {
1365 this.qa = a;
1366 this.ma = this.Ma = this.X = this.D = null
1367}
1368 , Nb = function(a, b) {
1369 this.name = a;
1370 this.value = b
1371};
1372Nb.prototype.toString = function() {
1373 return this.name
1374}
1375;
1376var K = new Nb("SEVERE",1E3)
1377 , Ob = new Nb("WARNING",900)
1378 , Pb = new Nb("INFO",800)
1379 , Qb = new Nb("CONFIG",700);
1380J.prototype.getName = function() {
1381 return this.qa
1382}
1383;
1384J.prototype.getParent = function() {
1385 return this.D
1386}
1387;
1388J.prototype.getChildren = function() {
1389 this.Ma || (this.Ma = {});
1390 return this.Ma
1391}
1392;
1393J.prototype.Cb = function(a) {
1394 this.X = a
1395}
1396;
1397var Rb = function(a) {
1398 if (a.X)
1399 return a.X;
1400 if (a.D)
1401 return Rb(a.D);
1402 Na("Root logger has no level set.");
1403 return null
1404};
1405J.prototype.log = function(a, b, c) {
1406 if (a.value >= Rb(this).value)
1407 for (y(b) && (b = b()),
1408 a = new Lb(a,String(b),this.qa),
1409 c && (a.Aa = c),
1410 c = this; c; ) {
1411 var d = c
1412 , e = a;
1413 if (d.ma)
1414 for (var f = 0; b = d.ma[f]; f++)
1415 b(e);
1416 c = c.getParent()
1417 }
1418}
1419;
1420J.prototype.info = function(a, b) {
1421 this.log(Pb, a, b)
1422}
1423;
1424var Sb = {}
1425 , Tb = null
1426 , Ub = function() {
1427 Tb || (Tb = new J(""),
1428 Sb[""] = Tb,
1429 Tb.Cb(Qb))
1430}
1431 , L = function(a) {
1432 Ub();
1433 var b;
1434 if (!(b = Sb[a])) {
1435 b = new J(a);
1436 var c = a.lastIndexOf(".")
1437 , d = a.substr(c + 1);
1438 c = L(a.substr(0, c));
1439 c.getChildren()[d] = b;
1440 b.D = c;
1441 Sb[a] = b
1442 }
1443 return b
1444};
1445var Vb = function(a) {
1446 var b = M;
1447 b && b.log(Ob, a, void 0)
1448}
1449 , N = function(a, b) {
1450 a && a.info(b, void 0)
1451};
1452var Wb = "StopIteration"in u ? u.StopIteration : {
1453 message: "StopIteration",
1454 stack: ""
1455}
1456 , Xb = function() {};
1457Xb.prototype.next = function() {
1458 throw Wb;
1459}
1460;
1461Xb.prototype.Nb = function() {
1462 return this
1463}
1464;
1465var Yb = function(a, b) {
1466 this.g = {};
1467 this.m = [];
1468 this.wa = this.h = 0;
1469 var c = arguments.length;
1470 if (1 < c) {
1471 if (c % 2)
1472 throw Error("Uneven number of arguments");
1473 for (var d = 0; d < c; d += 2)
1474 this.set(arguments[d], arguments[d + 1])
1475 } else
1476 a && this.addAll(a)
1477};
1478m = Yb.prototype;
1479m.H = function() {
1480 Zb(this);
1481 for (var a = [], b = 0; b < this.m.length; b++)
1482 a.push(this.g[this.m[b]]);
1483 return a
1484}
1485;
1486m.R = function() {
1487 Zb(this);
1488 return this.m.concat()
1489}
1490;
1491m.ja = function(a) {
1492 return $b(this.g, a)
1493}
1494;
1495m.clear = function() {
1496 this.g = {};
1497 this.wa = this.h = this.m.length = 0
1498}
1499;
1500m.remove = function(a) {
1501 return $b(this.g, a) ? (delete this.g[a],
1502 this.h--,
1503 this.wa++,
1504 this.m.length > 2 * this.h && Zb(this),
1505 !0) : !1
1506}
1507;
1508var Zb = function(a) {
1509 if (a.h != a.m.length) {
1510 for (var b = 0, c = 0; b < a.m.length; ) {
1511 var d = a.m[b];
1512 $b(a.g, d) && (a.m[c++] = d);
1513 b++
1514 }
1515 a.m.length = c
1516 }
1517 if (a.h != a.m.length) {
1518 var e = {};
1519 for (c = b = 0; b < a.m.length; )
1520 d = a.m[b],
1521 $b(e, d) || (a.m[c++] = d,
1522 e[d] = 1),
1523 b++;
1524 a.m.length = c
1525 }
1526};
1527m = Yb.prototype;
1528m.get = function(a, b) {
1529 return $b(this.g, a) ? this.g[a] : b
1530}
1531;
1532m.set = function(a, b) {
1533 $b(this.g, a) || (this.h++,
1534 this.m.push(a),
1535 this.wa++);
1536 this.g[a] = b
1537}
1538;
1539m.addAll = function(a) {
1540 if (a instanceof Yb)
1541 for (var b = a.R(), c = 0; c < b.length; c++)
1542 this.set(b[c], a.get(b[c]));
1543 else
1544 for (b in a)
1545 this.set(b, a[b])
1546}
1547;
1548m.forEach = function(a, b) {
1549 for (var c = this.R(), d = 0; d < c.length; d++) {
1550 var e = c[d]
1551 , f = this.get(e);
1552 a.call(b, f, e, this)
1553 }
1554}
1555;
1556m.clone = function() {
1557 return new Yb(this)
1558}
1559;
1560m.Nb = function(a) {
1561 Zb(this);
1562 var b = 0
1563 , c = this.wa
1564 , d = this
1565 , e = new Xb;
1566 e.next = function() {
1567 if (c != d.wa)
1568 throw Error("The map has changed since the iterator was created");
1569 if (b >= d.m.length)
1570 throw Wb;
1571 var f = d.m[b++];
1572 return a ? f : d.g[f]
1573 }
1574 ;
1575 return e
1576}
1577;
1578var $b = function(a, b) {
1579 return Object.prototype.hasOwnProperty.call(a, b)
1580};
1581var ac = function(a) {
1582 if (a.H && "function" == typeof a.H)
1583 return a.H();
1584 if (v(a))
1585 return a.split("");
1586 if (Aa(a)) {
1587 for (var b = [], c = a.length, d = 0; d < c; d++)
1588 b.push(a[d]);
1589 return b
1590 }
1591 b = [];
1592 c = 0;
1593 for (d in a)
1594 b[c++] = a[d];
1595 return b
1596}
1597 , bc = function(a, b, c) {
1598 if (a.forEach && "function" == typeof a.forEach)
1599 a.forEach(b, c);
1600 else if (Aa(a) || v(a))
1601 $a(a, b, c);
1602 else {
1603 if (a.R && "function" == typeof a.R)
1604 var d = a.R();
1605 else if (a.H && "function" == typeof a.H)
1606 d = void 0;
1607 else if (Aa(a) || v(a)) {
1608 d = [];
1609 for (var e = a.length, f = 0; f < e; f++)
1610 d.push(f)
1611 } else
1612 for (f in d = [],
1613 e = 0,
1614 a)
1615 d[e++] = f;
1616 e = ac(a);
1617 f = e.length;
1618 for (var h = 0; h < f; h++)
1619 b.call(c, e[h], d && d[h], a)
1620 }
1621};
1622var cc = /^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/
1623 , dc = function(a, b) {
1624 if (a) {
1625 a = a.split("&");
1626 for (var c = 0; c < a.length; c++) {
1627 var d = a[c].indexOf("=")
1628 , e = null;
1629 if (0 <= d) {
1630 var f = a[c].substring(0, d);
1631 e = a[c].substring(d + 1)
1632 } else
1633 f = a[c];
1634 b(f, e ? decodeURIComponent(e.replace(/\+/g, " ")) : "")
1635 }
1636 }
1637};
1638var P = function(a) {
1639 this.F = this.aa = this.S = "";
1640 this.B = null;
1641 this.W = this.I = "";
1642 this.C = this.cc = !1;
1643 if (a instanceof P) {
1644 this.C = a.C;
1645 ec(this, a.S);
1646 var b = a.aa;
1647 Q(this);
1648 this.aa = b;
1649 b = a.F;
1650 Q(this);
1651 this.F = b;
1652 fc(this, a.B);
1653 b = a.I;
1654 Q(this);
1655 this.I = b;
1656 gc(this, a.G.clone());
1657 a = a.W;
1658 Q(this);
1659 this.W = a
1660 } else
1661 a && (b = String(a).match(cc)) ? (this.C = !1,
1662 ec(this, b[1] || "", !0),
1663 a = b[2] || "",
1664 Q(this),
1665 this.aa = hc(a),
1666 a = b[3] || "",
1667 Q(this),
1668 this.F = hc(a, !0),
1669 fc(this, b[4]),
1670 a = b[5] || "",
1671 Q(this),
1672 this.I = hc(a, !0),
1673 gc(this, b[6] || "", !0),
1674 a = b[7] || "",
1675 Q(this),
1676 this.W = hc(a)) : (this.C = !1,
1677 this.G = new R(null,this.C))
1678};
1679P.prototype.toString = function() {
1680 var a = []
1681 , b = this.S;
1682 b && a.push(ic(b, jc, !0), ":");
1683 var c = this.F;
1684 if (c || "file" == b)
1685 a.push("//"),
1686 (b = this.aa) && a.push(ic(b, jc, !0), "@"),
1687 a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g, "%$1")),
1688 c = this.B,
1689 null != c && a.push(":", String(c));
1690 if (c = this.I)
1691 this.F && "/" != c.charAt(0) && a.push("/"),
1692 a.push(ic(c, "/" == c.charAt(0) ? kc : lc, !0));
1693 (c = this.G.toString()) && a.push("?", c);
1694 (c = this.W) && a.push("#", ic(c, mc));
1695 return a.join("")
1696}
1697;
1698P.prototype.resolve = function(a) {
1699 var b = this.clone()
1700 , c = !!a.S;
1701 c ? ec(b, a.S) : c = !!a.aa;
1702 if (c) {
1703 var d = a.aa;
1704 Q(b);
1705 b.aa = d
1706 } else
1707 c = !!a.F;
1708 c ? (d = a.F,
1709 Q(b),
1710 b.F = d) : c = null != a.B;
1711 d = a.I;
1712 if (c)
1713 fc(b, a.B);
1714 else if (c = !!a.I) {
1715 if ("/" != d.charAt(0))
1716 if (this.F && !this.I)
1717 d = "/" + d;
1718 else {
1719 var e = b.I.lastIndexOf("/");
1720 -1 != e && (d = b.I.substr(0, e + 1) + d)
1721 }
1722 e = d;
1723 if (".." == e || "." == e)
1724 d = "";
1725 else if (-1 != e.indexOf("./") || -1 != e.indexOf("/.")) {
1726 d = 0 == e.lastIndexOf("/", 0);
1727 e = e.split("/");
1728 for (var f = [], h = 0; h < e.length; ) {
1729 var g = e[h++];
1730 "." == g ? d && h == e.length && f.push("") : ".." == g ? ((1 < f.length || 1 == f.length && "" != f[0]) && f.pop(),
1731 d && h == e.length && f.push("")) : (f.push(g),
1732 d = !0)
1733 }
1734 d = f.join("/")
1735 } else
1736 d = e
1737 }
1738 c ? (Q(b),
1739 b.I = d) : c = "" !== a.G.toString();
1740 c ? gc(b, a.G.clone()) : c = !!a.W;
1741 c && (a = a.W,
1742 Q(b),
1743 b.W = a);
1744 return b
1745}
1746;
1747P.prototype.clone = function() {
1748 return new P(this)
1749}
1750;
1751var ec = function(a, b, c) {
1752 Q(a);
1753 a.S = c ? hc(b, !0) : b;
1754 a.S && (a.S = a.S.replace(/:$/, ""))
1755}
1756 , fc = function(a, b) {
1757 Q(a);
1758 if (b) {
1759 b = Number(b);
1760 if (isNaN(b) || 0 > b)
1761 throw Error("Bad port number " + b);
1762 a.B = b
1763 } else
1764 a.B = null
1765}
1766 , gc = function(a, b, c) {
1767 Q(a);
1768 b instanceof R ? (a.G = b,
1769 a.G.$a(a.C)) : (c || (b = ic(b, nc)),
1770 a.G = new R(b,a.C))
1771};
1772P.prototype.getQuery = function() {
1773 return this.G.toString()
1774}
1775;
1776P.prototype.removeParameter = function(a) {
1777 Q(this);
1778 this.G.remove(a);
1779 return this
1780}
1781;
1782var Q = function(a) {
1783 if (a.cc)
1784 throw Error("Tried to modify a read-only Uri");
1785};
1786P.prototype.$a = function(a) {
1787 this.C = a;
1788 this.G && this.G.$a(a)
1789}
1790;
1791var hc = function(a, b) {
1792 return a ? b ? decodeURI(a.replace(/%25/g, "%2525")) : decodeURIComponent(a) : ""
1793}
1794 , ic = function(a, b, c) {
1795 return v(a) ? (a = encodeURI(a).replace(b, oc),
1796 c && (a = a.replace(/%25([0-9a-fA-F]{2})/g, "%$1")),
1797 a) : null
1798}
1799 , oc = function(a) {
1800 a = a.charCodeAt(0);
1801 return "%" + (a >> 4 & 15).toString(16) + (a & 15).toString(16)
1802}
1803 , jc = /[#\/\?@]/g
1804 , lc = /[#\?:]/g
1805 , kc = /[#\?]/g
1806 , nc = /[#\?@]/g
1807 , mc = /#/g
1808 , R = function(a, b) {
1809 this.h = this.c = null;
1810 this.A = a || null;
1811 this.C = !!b
1812}
1813 , S = function(a) {
1814 a.c || (a.c = new Yb,
1815 a.h = 0,
1816 a.A && dc(a.A, function(b, c) {
1817 a.add(decodeURIComponent(b.replace(/\+/g, " ")), c)
1818 }))
1819};
1820m = R.prototype;
1821m.add = function(a, b) {
1822 S(this);
1823 this.A = null;
1824 a = pc(this, a);
1825 var c = this.c.get(a);
1826 c || this.c.set(a, c = []);
1827 c.push(b);
1828 this.h = Oa(this.h) + 1;
1829 return this
1830}
1831;
1832m.remove = function(a) {
1833 S(this);
1834 a = pc(this, a);
1835 return this.c.ja(a) ? (this.A = null,
1836 this.h = Oa(this.h) - this.c.get(a).length,
1837 this.c.remove(a)) : !1
1838}
1839;
1840m.clear = function() {
1841 this.c = this.A = null;
1842 this.h = 0
1843}
1844;
1845m.ja = function(a) {
1846 S(this);
1847 a = pc(this, a);
1848 return this.c.ja(a)
1849}
1850;
1851m.forEach = function(a, b) {
1852 S(this);
1853 this.c.forEach(function(c, d) {
1854 $a(c, function(e) {
1855 a.call(b, e, d, this)
1856 }, this)
1857 }, this)
1858}
1859;
1860m.R = function() {
1861 S(this);
1862 for (var a = this.c.H(), b = this.c.R(), c = [], d = 0; d < b.length; d++)
1863 for (var e = a[d], f = 0; f < e.length; f++)
1864 c.push(b[d]);
1865 return c
1866}
1867;
1868m.H = function(a) {
1869 S(this);
1870 var b = [];
1871 if (v(a))
1872 this.ja(a) && (b = ab(b, this.c.get(pc(this, a))));
1873 else {
1874 a = this.c.H();
1875 for (var c = 0; c < a.length; c++)
1876 b = ab(b, a[c])
1877 }
1878 return b
1879}
1880;
1881m.set = function(a, b) {
1882 S(this);
1883 this.A = null;
1884 a = pc(this, a);
1885 this.ja(a) && (this.h = Oa(this.h) - this.c.get(a).length);
1886 this.c.set(a, [b]);
1887 this.h = Oa(this.h) + 1;
1888 return this
1889}
1890;
1891m.get = function(a, b) {
1892 if (!a)
1893 return b;
1894 a = this.H(a);
1895 return 0 < a.length ? String(a[0]) : b
1896}
1897;
1898m.toString = function() {
1899 if (this.A)
1900 return this.A;
1901 if (!this.c)
1902 return "";
1903 for (var a = [], b = this.c.R(), c = 0; c < b.length; c++) {
1904 var d = b[c]
1905 , e = encodeURIComponent(String(d));
1906 d = this.H(d);
1907 for (var f = 0; f < d.length; f++) {
1908 var h = e;
1909 "" !== d[f] && (h += "=" + encodeURIComponent(String(d[f])));
1910 a.push(h)
1911 }
1912 }
1913 return this.A = a.join("&")
1914}
1915;
1916m.clone = function() {
1917 var a = new R;
1918 a.A = this.A;
1919 this.c && (a.c = this.c.clone(),
1920 a.h = this.h);
1921 return a
1922}
1923;
1924var pc = function(a, b) {
1925 b = String(b);
1926 a.C && (b = b.toLowerCase());
1927 return b
1928};
1929R.prototype.$a = function(a) {
1930 a && !this.C && (S(this),
1931 this.A = null,
1932 this.c.forEach(function(b, c) {
1933 var d = c.toLowerCase();
1934 c != d && (this.remove(c),
1935 this.remove(d),
1936 0 < b.length && (this.A = null,
1937 this.c.set(pc(this, d), bb(b)),
1938 this.h = Oa(this.h) + b.length))
1939 }, this));
1940 this.C = a
1941}
1942;
1943R.prototype.extend = function(a) {
1944 for (var b = 0; b < arguments.length; b++)
1945 bc(arguments[b], function(c, d) {
1946 this.add(d, c)
1947 }, this)
1948}
1949;
1950var qc = function(a, b) {
1951 F.call(this);
1952 this.Ga = a;
1953 this.rb = b;
1954 this.Ya = new Map;
1955 this.Sa = new Map;
1956 this.qb = this.$b.bind(this);
1957 this.tb = this.ac.bind(this)
1958};
1959p(qc, F);
1960qc.prototype.start = function() {
1961 this.Ga.addListener(this.tb);
1962 this.rb.addListener(this.qb)
1963}
1964;
1965qc.prototype.K = function() {
1966 this.Ga.removeListener(this.tb);
1967 this.rb.removeListener(this.qb);
1968 F.prototype.K.call(this)
1969}
1970;
1971qc.prototype.$b = function(a) {
1972 var b = new P(a.sender.url);
1973 b.F.endsWith("google.com") || (Vb("Rejecting incoming connection from domain: " + b.F),
1974 a.disconnect());
1975 if (b = this.Ya.get(a.name))
1976 b.onConnect(a);
1977 else
1978 a.disconnect()
1979}
1980;
1981qc.prototype.ac = function(a, b, c) {
1982 try {
1983 var d = Ra(a, "any").type;
1984 if ("hello" == d)
1985 return c({
1986 type: "hello",
1987 version: chrome.runtime.getManifest().version
1988 }),
1989 !1;
1990 var e = this.Sa.get(d);
1991 return e ? e.onMessage(a, b, c) : (Vb("No handler is registered for type: " + d),
1992 !1)
1993 } catch (f) {
1994 return M && M.log(K, "Error handling message", f),
1995 !1
1996 }
1997}
1998;
1999var rc = function(a, b) {
2000 var c = b.qa;
2001 a.Ya.has(c) ? M && M.log(K, "A service with name: " + c + " is already registered.", void 0) : (a.Ya.set(c, b),
2002 Xa(a, Fa(Ya, b)))
2003}
2004 , sc = function(a, b) {
2005 for (var c = b.nb(), d = 0; d < c.length; d++) {
2006 var e = c[d];
2007 if (a.Sa.has(e)) {
2008 M && M.log(K, "A message handler with type: " + e + " is already registered.", void 0);
2009 return
2010 }
2011 }
2012 for (d = 0; d < c.length; d++)
2013 a.Sa.set(c[d], b);
2014 Xa(a, Fa(Ya, b))
2015}
2016 , M = L("extension.EventPage");
2017var tc;
2018(tc = !yb) || (tc = 9 <= Number(Jb));
2019var uc = tc, vc;
2020if (vc = yb) {
2021 var wc;
2022 if (Object.prototype.hasOwnProperty.call(Ib, "9"))
2023 wc = Ib["9"];
2024 else {
2025 for (var xc = 0, yc = cb(String(Hb)).split("."), zc = cb("9").split("."), Ac = Math.max(yc.length, zc.length), Bc = 0; 0 == xc && Bc < Ac; Bc++) {
2026 var Cc = yc[Bc] || ""
2027 , Dc = zc[Bc] || "";
2028 do {
2029 var Ec = /(\d*)(\D*)(.*)/.exec(Cc) || ["", "", "", ""]
2030 , Fc = /(\d*)(\D*)(.*)/.exec(Dc) || ["", "", "", ""];
2031 if (0 == Ec[0].length && 0 == Fc[0].length)
2032 break;
2033 xc = db(0 == Ec[1].length ? 0 : parseInt(Ec[1], 10), 0 == Fc[1].length ? 0 : parseInt(Fc[1], 10)) || db(0 == Ec[2].length, 0 == Fc[2].length) || db(Ec[2], Fc[2]);
2034 Cc = Ec[3];
2035 Dc = Fc[3]
2036 } while (0 == xc)
2037 }
2038 wc = Ib["9"] = 0 <= xc
2039 }
2040 vc = !wc
2041}
2042var Gc = vc
2043 , Hc = function() {
2044 if (!u.addEventListener || !Object.defineProperty)
2045 return !1;
2046 var a = !1
2047 , b = Object.defineProperty({}, "passive", {
2048 get: function() {
2049 a = !0
2050 }
2051 });
2052 try {
2053 u.addEventListener("test", za, b),
2054 u.removeEventListener("test", za, b)
2055 } catch (c) {}
2056 return a
2057}();
2058var Ic = function(a, b) {
2059 this.type = a;
2060 this.currentTarget = this.target = b;
2061 this.defaultPrevented = this.Wa = !1
2062};
2063Ic.prototype.stopPropagation = function() {
2064 this.Wa = !0
2065}
2066;
2067Ic.prototype.preventDefault = function() {
2068 this.defaultPrevented = !0
2069}
2070;
2071var T = function(a, b) {
2072 Ic.call(this, a ? a.type : "");
2073 this.relatedTarget = this.currentTarget = this.target = null;
2074 this.button = this.screenY = this.screenX = this.clientY = this.clientX = this.offsetY = this.offsetX = 0;
2075 this.key = "";
2076 this.charCode = this.keyCode = 0;
2077 this.metaKey = this.shiftKey = this.altKey = this.ctrlKey = !1;
2078 this.state = null;
2079 this.pointerId = 0;
2080 this.pointerType = "";
2081 this.da = null;
2082 if (a) {
2083 var c = this.type = a.type
2084 , d = a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : null;
2085 this.target = a.target || a.srcElement;
2086 this.currentTarget = b;
2087 if (b = a.relatedTarget) {
2088 if (Ab) {
2089 a: {
2090 try {
2091 wb(b.nodeName);
2092 var e = !0;
2093 break a
2094 } catch (f) {}
2095 e = !1
2096 }
2097 e || (b = null)
2098 }
2099 } else
2100 "mouseover" == c ? b = a.fromElement : "mouseout" == c && (b = a.toElement);
2101 this.relatedTarget = b;
2102 d ? (this.clientX = void 0 !== d.clientX ? d.clientX : d.pageX,
2103 this.clientY = void 0 !== d.clientY ? d.clientY : d.pageY,
2104 this.screenX = d.screenX || 0,
2105 this.screenY = d.screenY || 0) : (this.offsetX = Bb || void 0 !== a.offsetX ? a.offsetX : a.layerX,
2106 this.offsetY = Bb || void 0 !== a.offsetY ? a.offsetY : a.layerY,
2107 this.clientX = void 0 !== a.clientX ? a.clientX : a.pageX,
2108 this.clientY = void 0 !== a.clientY ? a.clientY : a.pageY,
2109 this.screenX = a.screenX || 0,
2110 this.screenY = a.screenY || 0);
2111 this.button = a.button;
2112 this.keyCode = a.keyCode || 0;
2113 this.key = a.key || "";
2114 this.charCode = a.charCode || ("keypress" == c ? a.keyCode : 0);
2115 this.ctrlKey = a.ctrlKey;
2116 this.altKey = a.altKey;
2117 this.shiftKey = a.shiftKey;
2118 this.metaKey = a.metaKey;
2119 this.pointerId = a.pointerId || 0;
2120 this.pointerType = v(a.pointerType) ? a.pointerType : Jc[a.pointerType] || "";
2121 this.state = a.state;
2122 this.da = a;
2123 a.defaultPrevented && this.preventDefault()
2124 }
2125};
2126Ha(T, Ic);
2127var Jc = Kb({
2128 2: "touch",
2129 3: "pen",
2130 4: "mouse"
2131});
2132T.prototype.stopPropagation = function() {
2133 T.ab.stopPropagation.call(this);
2134 this.da.stopPropagation ? this.da.stopPropagation() : this.da.cancelBubble = !0
2135}
2136;
2137T.prototype.preventDefault = function() {
2138 T.ab.preventDefault.call(this);
2139 var a = this.da;
2140 if (a.preventDefault)
2141 a.preventDefault();
2142 else if (a.returnValue = !1,
2143 Gc)
2144 try {
2145 if (a.ctrlKey || 112 <= a.keyCode && 123 >= a.keyCode)
2146 a.keyCode = -1
2147 } catch (b) {}
2148}
2149;
2150var Kc = "closure_listenable_" + (1E6 * Math.random() | 0)
2151 , Lc = 0;
2152var Mc = function(a, b, c, d, e) {
2153 this.listener = a;
2154 this.proxy = null;
2155 this.src = b;
2156 this.type = c;
2157 this.capture = !!d;
2158 this.Qa = e;
2159 this.key = ++Lc;
2160 this.removed = this.Ka = !1
2161}
2162 , Nc = function(a) {
2163 a.removed = !0;
2164 a.listener = null;
2165 a.proxy = null;
2166 a.src = null;
2167 a.Qa = null
2168};
2169var Oc = function(a) {
2170 this.src = a;
2171 this.w = {};
2172 this.va = 0
2173};
2174Oc.prototype.add = function(a, b, c, d, e) {
2175 var f = a.toString();
2176 a = this.w[f];
2177 a || (a = this.w[f] = [],
2178 this.va++);
2179 var h = Pc(a, b, d, e);
2180 -1 < h ? (b = a[h],
2181 c || (b.Ka = !1)) : (b = new Mc(b,this.src,f,!!d,e),
2182 b.Ka = c,
2183 a.push(b));
2184 return b
2185}
2186;
2187Oc.prototype.remove = function(a, b, c, d) {
2188 a = a.toString();
2189 if (!(a in this.w))
2190 return !1;
2191 var e = this.w[a];
2192 b = Pc(e, b, c, d);
2193 return -1 < b ? (Nc(e[b]),
2194 B(null != e.length),
2195 Array.prototype.splice.call(e, b, 1),
2196 0 == e.length && (delete this.w[a],
2197 this.va--),
2198 !0) : !1
2199}
2200;
2201Oc.prototype.removeAll = function(a) {
2202 a = a && a.toString();
2203 var b = 0, c;
2204 for (c in this.w)
2205 if (!a || c == a) {
2206 for (var d = this.w[c], e = 0; e < d.length; e++)
2207 ++b,
2208 Nc(d[e]);
2209 delete this.w[c];
2210 this.va--
2211 }
2212 return b
2213}
2214;
2215Oc.prototype.hasListener = function(a, b) {
2216 var c = void 0 !== a
2217 , d = c ? a.toString() : ""
2218 , e = void 0 !== b;
2219 return Ia(this.w, function(f) {
2220 for (var h = 0; h < f.length; ++h)
2221 if (!(c && f[h].type != d || e && f[h].capture != b))
2222 return !0;
2223 return !1
2224 })
2225}
2226;
2227var Pc = function(a, b, c, d) {
2228 for (var e = 0; e < a.length; ++e) {
2229 var f = a[e];
2230 if (!f.removed && f.listener == b && f.capture == !!c && f.Qa == d)
2231 return e
2232 }
2233 return -1
2234};
2235var Qc = "closure_lm_" + (1E6 * Math.random() | 0)
2236 , Rc = {}
2237 , Sc = 0
2238 , Uc = function() {
2239 var a = Tc
2240 , b = uc ? function(c) {
2241 return a.call(b.src, b.listener, c)
2242 }
2243 : function(c) {
2244 c = a.call(b.src, b.listener, c);
2245 if (!c)
2246 return c
2247 }
2248 ;
2249 return b
2250}
2251 , Vc = function(a, b, c, d, e) {
2252 if ("array" == w(b))
2253 for (var f = 0; f < b.length; f++)
2254 Vc(a, b[f], c, d, e);
2255 else if (c = Wc(c),
2256 a && a[Kc])
2257 a.Ic(b, c, Ba(d) ? !!d.capture : !!d, e);
2258 else {
2259 if (!b)
2260 throw Error("Invalid event type");
2261 f = Ba(d) ? !!d.capture : !!d;
2262 var h = Xc(a);
2263 h || (a[Qc] = h = new Oc(a));
2264 c = h.add(b, c, !0, f, e);
2265 if (!c.proxy) {
2266 e = Uc();
2267 c.proxy = e;
2268 e.src = a;
2269 e.listener = c;
2270 if (a.addEventListener)
2271 Hc || (d = f),
2272 void 0 === d && (d = !1),
2273 a.addEventListener(b.toString(), e, d);
2274 else if (a.attachEvent)
2275 a.attachEvent(Yc(b.toString()), e);
2276 else if (a.addListener && a.removeListener)
2277 B("change" === b, "MediaQueryList only has a change event"),
2278 a.addListener(e);
2279 else
2280 throw Error("addEventListener and attachEvent are unavailable.");
2281 Sc++
2282 }
2283 }
2284}
2285 , Yc = function(a) {
2286 return a in Rc ? Rc[a] : Rc[a] = "on" + a
2287}
2288 , $c = function(a, b, c, d) {
2289 var e = !0;
2290 if (a = Xc(a))
2291 if (b = a.w[b.toString()])
2292 for (b = b.concat(),
2293 a = 0; a < b.length; a++) {
2294 var f = b[a];
2295 f && f.capture == c && !f.removed && (f = Zc(f, d),
2296 e = e && !1 !== f)
2297 }
2298 return e
2299}
2300 , Zc = function(a, b) {
2301 var c = a.listener
2302 , d = a.Qa || a.src;
2303 if (a.Ka && "number" != typeof a && a && !a.removed) {
2304 var e = a.src;
2305 if (e && e[Kc])
2306 e.Jc(a);
2307 else {
2308 var f = a.type
2309 , h = a.proxy;
2310 e.removeEventListener ? e.removeEventListener(f, h, a.capture) : e.detachEvent ? e.detachEvent(Yc(f), h) : e.addListener && e.removeListener && e.removeListener(h);
2311 Sc--;
2312 if (f = Xc(e)) {
2313 h = a.type;
2314 var g;
2315 if (g = h in f.w) {
2316 g = f.w[h];
2317 var k = Za(g, a), l;
2318 if (l = 0 <= k)
2319 B(null != g.length),
2320 Array.prototype.splice.call(g, k, 1);
2321 g = l
2322 }
2323 g && (Nc(a),
2324 0 == f.w[h].length && (delete f.w[h],
2325 f.va--));
2326 0 == f.va && (f.src = null,
2327 e[Qc] = null)
2328 } else
2329 Nc(a)
2330 }
2331 }
2332 return c.call(d, b)
2333}
2334 , Tc = function(a, b) {
2335 if (a.removed)
2336 return !0;
2337 if (!uc) {
2338 if (!b)
2339 a: {
2340 b = ["window", "event"];
2341 for (var c = u, d = 0; d < b.length; d++)
2342 if (c = c[b[d]],
2343 null == c) {
2344 b = null;
2345 break a
2346 }
2347 b = c
2348 }
2349 d = b;
2350 b = new T(d,this);
2351 c = !0;
2352 if (!(0 > d.keyCode || void 0 != d.returnValue)) {
2353 a: {
2354 var e = !1;
2355 if (0 == d.keyCode)
2356 try {
2357 d.keyCode = -1;
2358 break a
2359 } catch (h) {
2360 e = !0
2361 }
2362 if (e || void 0 == d.returnValue)
2363 d.returnValue = !0
2364 }
2365 d = [];
2366 for (e = b.currentTarget; e; e = e.parentNode)
2367 d.push(e);
2368 a = a.type;
2369 for (e = d.length - 1; !b.Wa && 0 <= e; e--) {
2370 b.currentTarget = d[e];
2371 var f = $c(d[e], a, !0, b);
2372 c = c && f
2373 }
2374 for (e = 0; !b.Wa && e < d.length; e++)
2375 b.currentTarget = d[e],
2376 f = $c(d[e], a, !1, b),
2377 c = c && f
2378 }
2379 return c
2380 }
2381 return Zc(a, new T(b,this))
2382}
2383 , Xc = function(a) {
2384 a = a[Qc];
2385 return a instanceof Oc ? a : null
2386}
2387 , ad = "__closure_events_fn_" + (1E9 * Math.random() >>> 0)
2388 , Wc = function(a) {
2389 B(a, "Listener can not be null.");
2390 if (y(a))
2391 return a;
2392 B(a.handleEvent, "An object listener must have handleEvent method.");
2393 a[ad] || (a[ad] = function(b) {
2394 return a.handleEvent(b)
2395 }
2396 );
2397 return a[ad]
2398};
2399var bd = {
2400 payload: "",
2401 type: "getClipboard"
2402}
2403 , cd = function() {
2404 F.call(this)
2405};
2406p(cd, F);
2407cd.prototype.onMessage = function(a, b, c) {
2408 b = Ra(a, "any");
2409 switch (b.type) {
2410 case "getClipboard":
2411 return dd(c),
2412 !0;
2413 case "setClipboard":
2414 try {
2415 var d = Sa(a);
2416 ed(d)
2417 } catch (e) {
2418 U && U.log(K, "Error handling SET_CLIPBOARD message", e)
2419 }
2420 break;
2421 default:
2422 U && U.log(K, "Unknown message type: " + b.type, void 0)
2423 }
2424 return !1
2425}
2426;
2427cd.prototype.nb = function() {
2428 return ["setClipboard", "getClipboard"]
2429}
2430;
2431var dd = function(a) {
2432 Vc(window, "paste", function(b) {
2433 (b = fd(b)) && b.getData ? (b = b.getData("text/plain")) ? (N(U, "Got clipboard from OS, length: " + b.length),
2434 a(Ta({
2435 payload: b,
2436 type: "getClipboard"
2437 }))) : a(Ta(bd)) : N(U, "Got invalid clipboardData.")
2438 });
2439 document.execCommand("paste")
2440}
2441 , ed = function(a) {
2442 Vc(window, "copy", function(b) {
2443 var c = a.payload
2444 , d = fd(b);
2445 d && d.setData ? (N(U, "Setting OS clipboard, length: " + c.length),
2446 d.setData("text/plain", c),
2447 b.preventDefault()) : N(U, "Got invalid clipboardData.")
2448 });
2449 document.execCommand("copy")
2450}
2451 , fd = function(a) {
2452 a = a.da;
2453 return a.clipboardData ? a.clipboardData : null
2454}
2455 , U = L("extension.ClipboardMessageHandler");
2456C.add("url", "downloads.init");
2457C.add("status", "downloads.getStatusResponse");
2458C.add("totalBytes", "downloads.getProgressResponse");
2459C.add("bytesReceived", "downloads.getProgressResponse");
2460C.add("estimatedEndTime", "downloads.getProgressResponse");
2461C.add("danger", "downloads.downloadResponse");
2462var gd = Va("downloads.initResponse")
2463 , hd = Va("downloads.openResponse")
2464 , id = Va("downloads.showResponse");
2465var jd = function(a, b) {
2466 this.dc = 100;
2467 this.Ub = a;
2468 this.uc = b;
2469 this.Fa = 0;
2470 this.v = null
2471};
2472jd.prototype.get = function() {
2473 if (0 < this.Fa) {
2474 this.Fa--;
2475 var a = this.v;
2476 this.v = a.next;
2477 a.next = null
2478 } else
2479 a = this.Ub();
2480 return a
2481}
2482;
2483jd.prototype.put = function(a) {
2484 this.uc(a);
2485 this.Fa < this.dc && (this.Fa++,
2486 a.next = this.v,
2487 this.v = a)
2488}
2489;
2490var kd = function(a) {
2491 u.setTimeout(function() {
2492 throw a;
2493 }, 0)
2494}, ld, md = function() {
2495 var a = u.MessageChannel;
2496 "undefined" === typeof a && "undefined" !== typeof window && window.postMessage && window.addEventListener && !G("Presto") && (a = function() {
2497 var e = document.createElement("IFRAME");
2498 e.style.display = "none";
2499 vb(e);
2500 document.documentElement.appendChild(e);
2501 var f = e.contentWindow;
2502 e = f.document;
2503 e.open();
2504 e.write(tb(ub));
2505 e.close();
2506 var h = "callImmediate" + Math.random()
2507 , g = "file:" == f.location.protocol ? "*" : f.location.protocol + "//" + f.location.host;
2508 e = Ea(function(k) {
2509 if (("*" == g || k.origin == g) && k.data == h)
2510 this.port1.onmessage()
2511 }, this);
2512 f.addEventListener("message", e, !1);
2513 this.port1 = {};
2514 this.port2 = {
2515 postMessage: function() {
2516 f.postMessage(h, g)
2517 }
2518 }
2519 }
2520 );
2521 if ("undefined" !== typeof a && !G("Trident") && !G("MSIE")) {
2522 var b = new a
2523 , c = {}
2524 , d = c;
2525 b.port1.onmessage = function() {
2526 if (void 0 !== c.next) {
2527 c = c.next;
2528 var e = c.hb;
2529 c.hb = null;
2530 e()
2531 }
2532 }
2533 ;
2534 return function(e) {
2535 d.next = {
2536 hb: e
2537 };
2538 d = d.next;
2539 b.port2.postMessage(0)
2540 }
2541 }
2542 return "undefined" !== typeof document && "onreadystatechange"in document.createElement("SCRIPT") ? function(e) {
2543 var f = document.createElement("SCRIPT");
2544 f.onreadystatechange = function() {
2545 f.onreadystatechange = null;
2546 f.parentNode.removeChild(f);
2547 f = null;
2548 e();
2549 e = null
2550 }
2551 ;
2552 document.documentElement.appendChild(f)
2553 }
2554 : function(e) {
2555 u.setTimeout(e, 0)
2556 }
2557};
2558var nd = function() {
2559 this.Ja = this.ba = null
2560}
2561 , pd = new jd(function() {
2562 return new od
2563}
2564,function(a) {
2565 a.reset()
2566}
2567);
2568nd.prototype.add = function(a, b) {
2569 var c = pd.get();
2570 c.set(a, b);
2571 this.Ja ? this.Ja.next = c : (B(!this.ba),
2572 this.ba = c);
2573 this.Ja = c
2574}
2575;
2576nd.prototype.remove = function() {
2577 var a = null;
2578 this.ba && (a = this.ba,
2579 this.ba = this.ba.next,
2580 this.ba || (this.Ja = null),
2581 a.next = null);
2582 return a
2583}
2584;
2585var od = function() {
2586 this.next = this.scope = this.Pa = null
2587};
2588od.prototype.set = function(a, b) {
2589 this.Pa = a;
2590 this.scope = b;
2591 this.next = null
2592}
2593;
2594od.prototype.reset = function() {
2595 this.next = this.scope = this.Pa = null
2596}
2597;
2598var ud = function(a, b) {
2599 qd || rd();
2600 sd || (qd(),
2601 sd = !0);
2602 td.add(a, b)
2603}, qd, rd = function() {
2604 if (u.Promise && u.Promise.resolve) {
2605 var a = u.Promise.resolve(void 0);
2606 qd = function() {
2607 a.then(vd)
2608 }
2609 } else
2610 qd = function() {
2611 var b = vd;
2612 !y(u.setImmediate) || u.Window && u.Window.prototype && !G("Edge") && u.Window.prototype.setImmediate == u.setImmediate ? (ld || (ld = md()),
2613 ld(b)) : u.setImmediate(b)
2614 }
2615}, sd = !1, td = new nd, vd = function() {
2616 for (var a; a = td.remove(); ) {
2617 try {
2618 a.Pa.call(a.scope)
2619 } catch (b) {
2620 kd(b)
2621 }
2622 pd.put(a)
2623 }
2624 sd = !1
2625};
2626var W = function(a) {
2627 this.l = 0;
2628 this.ha = void 0;
2629 this.ca = this.J = this.D = null;
2630 this.Ca = this.Oa = !1;
2631 if (a != za)
2632 try {
2633 var b = this;
2634 a.call(void 0, function(c) {
2635 V(b, 2, c)
2636 }, function(c) {
2637 if (!(c instanceof wd))
2638 try {
2639 if (c instanceof Error)
2640 throw c;
2641 throw Error("Promise rejected.");
2642 } catch (d) {}
2643 V(b, 3, c)
2644 })
2645 } catch (c) {
2646 V(this, 3, c)
2647 }
2648}
2649 , xd = function() {
2650 this.next = this.context = this.fa = this.$ = this.V = null;
2651 this.xa = !1
2652};
2653xd.prototype.reset = function() {
2654 this.context = this.fa = this.$ = this.V = null;
2655 this.xa = !1
2656}
2657;
2658var yd = new jd(function() {
2659 return new xd
2660}
2661,function(a) {
2662 a.reset()
2663}
2664)
2665 , zd = function(a, b, c) {
2666 var d = yd.get();
2667 d.$ = a;
2668 d.fa = b;
2669 d.context = c;
2670 return d
2671}
2672 , Ad = function() {
2673 var a = new W(za);
2674 V(a, 2, "not-started");
2675 return a
2676}
2677 , Bd = function(a) {
2678 return new W(function(b, c) {
2679 c(a)
2680 }
2681 )
2682}
2683 , Dd = function() {
2684 var a, b, c = new W(function(d, e) {
2685 a = d;
2686 b = e
2687 }
2688 );
2689 return new Cd(c,a,b)
2690};
2691W.prototype.then = function(a, b, c) {
2692 null != a && Pa(a, "opt_onFulfilled should be a function.");
2693 null != b && Pa(b, "opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");
2694 return Ed(this, y(a) ? a : null, y(b) ? b : null, c)
2695}
2696;
2697W.prototype.$goog_Thenable = !0;
2698var X = function(a, b) {
2699 return Ed(a, null, b, void 0)
2700};
2701W.prototype.cancel = function(a) {
2702 0 == this.l && ud(function() {
2703 var b = new wd(a);
2704 Fd(this, b)
2705 }, this)
2706}
2707;
2708var Fd = function(a, b) {
2709 if (0 == a.l)
2710 if (a.D) {
2711 var c = a.D;
2712 if (c.J) {
2713 for (var d = 0, e = null, f = null, h = c.J; h && (h.xa || (d++,
2714 h.V == a && (e = h),
2715 !(e && 1 < d))); h = h.next)
2716 e || (f = h);
2717 e && (0 == c.l && 1 == d ? Fd(c, b) : (f ? (d = f,
2718 B(c.J),
2719 B(null != d),
2720 d.next == c.ca && (c.ca = d),
2721 d.next = d.next.next) : Gd(c),
2722 Hd(c, e, 3, b)))
2723 }
2724 a.D = null
2725 } else
2726 V(a, 3, b)
2727}
2728 , Jd = function(a, b) {
2729 a.J || 2 != a.l && 3 != a.l || Id(a);
2730 B(null != b.$);
2731 a.ca ? a.ca.next = b : a.J = b;
2732 a.ca = b
2733}
2734 , Ed = function(a, b, c, d) {
2735 var e = zd(null, null, null);
2736 e.V = new W(function(f, h) {
2737 e.$ = b ? function(g) {
2738 try {
2739 var k = b.call(d, g);
2740 f(k)
2741 } catch (l) {
2742 h(l)
2743 }
2744 }
2745 : f;
2746 e.fa = c ? function(g) {
2747 try {
2748 var k = c.call(d, g);
2749 void 0 === k && g instanceof wd ? h(g) : f(k)
2750 } catch (l) {
2751 h(l)
2752 }
2753 }
2754 : h
2755 }
2756 );
2757 e.V.D = a;
2758 Jd(a, e);
2759 return e.V
2760};
2761W.prototype.Ec = function(a) {
2762 B(1 == this.l);
2763 this.l = 0;
2764 V(this, 2, a)
2765}
2766;
2767W.prototype.Fc = function(a) {
2768 B(1 == this.l);
2769 this.l = 0;
2770 V(this, 3, a)
2771}
2772;
2773var V = function(a, b, c) {
2774 if (0 == a.l) {
2775 a === c && (b = 3,
2776 c = new TypeError("Promise cannot resolve to itself"));
2777 a.l = 1;
2778 a: {
2779 var d = c
2780 , e = a.Ec
2781 , f = a.Fc;
2782 if (d instanceof W) {
2783 null != e && Pa(e, "opt_onFulfilled should be a function.");
2784 null != f && Pa(f, "opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");
2785 Jd(d, zd(e || za, f || null, a));
2786 var h = !0
2787 } else {
2788 if (d)
2789 try {
2790 var g = !!d.$goog_Thenable
2791 } catch (l) {
2792 g = !1
2793 }
2794 else
2795 g = !1;
2796 if (g)
2797 d.then(e, f, a),
2798 h = !0;
2799 else {
2800 if (Ba(d))
2801 try {
2802 var k = d.then;
2803 if (y(k)) {
2804 Kd(d, k, e, f, a);
2805 h = !0;
2806 break a
2807 }
2808 } catch (l) {
2809 f.call(a, l);
2810 h = !0;
2811 break a
2812 }
2813 h = !1
2814 }
2815 }
2816 }
2817 h || (a.ha = c,
2818 a.l = b,
2819 a.D = null,
2820 Id(a),
2821 3 != b || c instanceof wd || Ld(a, c))
2822 }
2823}
2824 , Kd = function(a, b, c, d, e) {
2825 var f = !1
2826 , h = function(k) {
2827 f || (f = !0,
2828 c.call(e, k))
2829 }
2830 , g = function(k) {
2831 f || (f = !0,
2832 d.call(e, k))
2833 };
2834 try {
2835 b.call(a, h, g)
2836 } catch (k) {
2837 g(k)
2838 }
2839}
2840 , Id = function(a) {
2841 a.Oa || (a.Oa = !0,
2842 ud(a.Xb, a))
2843}
2844 , Gd = function(a) {
2845 var b = null;
2846 a.J && (b = a.J,
2847 a.J = b.next,
2848 b.next = null);
2849 a.J || (a.ca = null);
2850 null != b && B(null != b.$);
2851 return b
2852};
2853W.prototype.Xb = function() {
2854 for (var a; a = Gd(this); )
2855 Hd(this, a, this.l, this.ha);
2856 this.Oa = !1
2857}
2858;
2859var Hd = function(a, b, c, d) {
2860 if (3 == c && b.fa && !b.xa)
2861 for (; a && a.Ca; a = a.D)
2862 a.Ca = !1;
2863 if (b.V)
2864 b.V.D = null,
2865 Md(b, c, d);
2866 else
2867 try {
2868 b.xa ? b.$.call(b.context) : Md(b, c, d)
2869 } catch (e) {
2870 Nd.call(null, e)
2871 }
2872 yd.put(b)
2873}
2874 , Md = function(a, b, c) {
2875 2 == b ? a.$.call(a.context, c) : a.fa && a.fa.call(a.context, c)
2876}
2877 , Ld = function(a, b) {
2878 a.Ca = !0;
2879 ud(function() {
2880 a.Ca && Nd.call(null, b)
2881 })
2882}
2883 , Nd = kd
2884 , wd = function(a) {
2885 z.call(this, a)
2886};
2887Ha(wd, z);
2888wd.prototype.name = "cancel";
2889var Cd = function(a, b, c) {
2890 this.zb = a;
2891 this.resolve = b;
2892 this.reject = c
2893};
2894var Y = function(a) {
2895 F.call(this);
2896 this.bb = a;
2897 this.M = Dd();
2898 this.Ta = this.kc.bind(this);
2899 this.o = null
2900};
2901p(Y, F);
2902var Qd = function(a) {
2903 var b = new Y(a);
2904 return X(Od({
2905 url: a,
2906 orderBy: ["-startTime"],
2907 limit: 1
2908 }).then(function(c) {
2909 if (0 == c.length)
2910 return b;
2911 B(1 == c.length, "A search query with limit=1 returns multiple items.");
2912 c = c[0];
2913 if (36E5 > Date.now() - new Date(c.startTime))
2914 switch (Pd(c)) {
2915 case "downloaded":
2916 b.M.resolve();
2917 b.o = c.id;
2918 break;
2919 case "downloading":
2920 chrome.downloads.onChanged.addListener(b.Ta),
2921 b.o = c.id
2922 }
2923 return b
2924 }), function() {
2925 return b
2926 })
2927};
2928Y.prototype.K = function() {
2929 chrome.downloads.onChanged.removeListener(this.Ta);
2930 F.prototype.K.call(this)
2931}
2932;
2933var Sd = function(a) {
2934 return a.o ? Rd(a.o).then(function(b) {
2935 return {
2936 type: "downloads.getProgressResponse",
2937 totalBytes: b.totalBytes,
2938 bytesReceived: b.bytesReceived,
2939 estimatedEndTime: b.estimatedEndTime ? (new Date(b.estimatedEndTime)).getTime() : void 0
2940 }
2941 }) : Bd(new D("DownloadItem.getProgress()","UNEXPECTED_ERROR","No pending download in progress"))
2942}
2943 , Td = function(a) {
2944 return a.o ? X(Rd(a.o).then(function(b) {
2945 return Pd(b)
2946 }), function() {
2947 return "interrupted"
2948 }) : Ad()
2949}
2950 , Pd = function(a) {
2951 switch (a.state) {
2952 case "complete":
2953 return a.exists ? "downloaded" : "not-started";
2954 case "interrupted":
2955 return "interrupted";
2956 case "in_progress":
2957 return "downloading";
2958 default:
2959 return "not-started"
2960 }
2961}
2962 , Rd = function(a) {
2963 return null == a ? Bd(new D("DownloadItem.getItemById","INVALID_ARGS","Missing required paramemter id")) : Od({
2964 id: a
2965 }).then(function(b) {
2966 return 1 != b.length ? Bd(new D("chrome.downloads.search","UNEXPECTED_ERROR","Multiple items returned for download id: " + a)) : b[0]
2967 })
2968}
2969 , Od = function(a) {
2970 var b = Dd();
2971 chrome.downloads.search(a, function(c) {
2972 chrome.runtime.lastError ? b.reject(Ua("chrome.downloads.search")) : b.resolve(c)
2973 });
2974 return b.zb
2975};
2976Y.prototype.open = function() {
2977 var a = this, b;
2978 return xa(new wa(new sa(function(c) {
2979 if (1 == c.O) {
2980 if (!a.o)
2981 throw new D("chrome.downloads.open","UNEXPECTED_ERROR","Missing downloadId");
2982 return ra(c, Rd(a.o), 2)
2983 }
2984 b = c.cb;
2985 if ("complete" != b.state)
2986 throw new D("chrome.downloads.open","UNEXPECTED_ERROR","Cannot open " + b.filename + " before the download is completed.");
2987 if (!b.exists)
2988 throw new D("chrome.downloads.open","DOWNLOAD_ITEM_DELETED","filename: " + b.filename);
2989 "safe" != b.danger && Ud && Ud.log(K, "Chrome marks file: " + b.filename + " as " + ("danger:" + b.danger + ", bravely continue."), void 0);
2990 return ra(c, Vd(a.o), 0)
2991 }
2992 )))
2993}
2994;
2995Y.prototype.show = function() {
2996 var a = this;
2997 return this.o ? Rd(this.o).then(function(b) {
2998 if ("complete" != b.state)
2999 throw new D("chrome.downloads.show","UNEXPECTED_ERROR","Cannot open " + b.filename + " before the download is completed.");
3000 if (!b.exists)
3001 throw new D("chrome.downloads.show","DOWNLOAD_ITEM_DELETED","filename: " + b.filename);
3002 chrome.downloads.show(a.o)
3003 }) : Bd(new D("chrome.downloads.show","UNEXPECTED_ERROR","Missing downloadId"))
3004}
3005;
3006Y.prototype.download = function() {
3007 var a = this;
3008 return Td(this).then(function(b) {
3009 if ("not-started" == b || "interrupted" == b)
3010 a.M = Dd(),
3011 chrome.downloads.onChanged.addListener(a.Ta),
3012 chrome.downloads.download({
3013 url: a.bb
3014 }, function(c) {
3015 chrome.runtime.lastError && a.M.reject(Ua("chrome.downloads.download"));
3016 a.o = c
3017 });
3018 return a.M.zb
3019 })
3020}
3021;
3022Y.prototype.kc = function(a) {
3023 var b = this;
3024 if (a.id == this.o)
3025 if (a.state)
3026 switch (a.state.current) {
3027 case "complete":
3028 this.M.resolve();
3029 break;
3030 case "interrupted":
3031 Rd(a.id).then(function(c) {
3032 b.M.reject(Wd(c.error, b.bb))
3033 }, function(c) {
3034 c = E("DownloadItem.getItemById", c);
3035 Ud && Ud.log(K, "Unexpected error finding download: " + c.message, void 0);
3036 b.M.reject(c)
3037 });
3038 break;
3039 case "in_progress":
3040 break;
3041 default:
3042 Ud && Ud.log(K, "Unexpected downloadItem state: " + a.state.current, void 0),
3043 this.M.reject(new D("chrome.downloads.download","UNEXPECTED_ERROR","state: " + a.state.current))
3044 }
3045 else
3046 a.paused && a.paused.current && this.M.reject(new D("chrome.downloads.download","USER_CANCELED",this.bb))
3047}
3048;
3049function Wd(a, b) {
3050 B(a, "Missing interrupt reason.");
3051 var c = "CHROME_RUNTIME";
3052 switch (a) {
3053 case "NETWORK_FAILED":
3054 c = "NETWORK_FAILED";
3055 break;
3056 case "NETWORK_TIMEOUT":
3057 c = "NETWORK_TIMEOUT";
3058 break;
3059 case "NETWORK_DISCONNECTED":
3060 c = "NETWORK_DISCONNECTED";
3061 break;
3062 case "FILE_NO_SPACE":
3063 c = "FILE_NO_SPACE";
3064 break;
3065 case "FILE_ACCESS_DENIED":
3066 c = "FILE_ACCESS_DENIED";
3067 break;
3068 case "SERVER_UNREACHABLE":
3069 case "SERVER_BAD_CONTENT":
3070 c = "SERVER_UNREACHABLE"
3071 }
3072 return new D("chrome.downloads.download",c,"url: " + b + " reason: " + a)
3073}
3074function Vd(a) {
3075 var b;
3076 return xa(new wa(new sa(function(c) {
3077 if (1 == c.O) {
3078 if ("undefined" == typeof browser) {
3079 chrome.downloads.open(a);
3080 c.O = 0;
3081 return
3082 }
3083 c.za = 3;
3084 return ra(c, browser.downloads.open(a), 5)
3085 }
3086 if (3 != c.O)
3087 c.O = 0,
3088 c.za = 0;
3089 else {
3090 c.za = 0;
3091 var d = c.U.kb;
3092 c.U = null;
3093 b = d;
3094 throw new D("browser.downloads.open","UNEXPECTED_ERROR",String(b));
3095 }
3096 }
3097 )))
3098}
3099var Ud = L("extension.DownloadItem");
3100var Xd = function() {
3101 this.Ia = void 0
3102};
3103Xd.prototype.j = function(a) {
3104 var b = [];
3105 Yd(this, a, b);
3106 return b.join("")
3107}
3108;
3109var Yd = function(a, b, c) {
3110 if (null == b)
3111 c.push("null");
3112 else {
3113 if ("object" == typeof b) {
3114 if ("array" == w(b)) {
3115 var d = b;
3116 b = d.length;
3117 c.push("[");
3118 for (var e = "", f = 0; f < b; f++)
3119 c.push(e),
3120 e = d[f],
3121 Yd(a, a.Ia ? a.Ia.call(d, String(f), e) : e, c),
3122 e = ",";
3123 c.push("]");
3124 return
3125 }
3126 if (b instanceof String || b instanceof Number || b instanceof Boolean)
3127 b = b.valueOf();
3128 else {
3129 c.push("{");
3130 f = "";
3131 for (d in b)
3132 Object.prototype.hasOwnProperty.call(b, d) && (e = b[d],
3133 "function" != typeof e && (c.push(f),
3134 Zd(d, c),
3135 c.push(":"),
3136 Yd(a, a.Ia ? a.Ia.call(b, d, e) : e, c),
3137 f = ","));
3138 c.push("}");
3139 return
3140 }
3141 }
3142 switch (typeof b) {
3143 case "string":
3144 Zd(b, c);
3145 break;
3146 case "number":
3147 c.push(isFinite(b) && !isNaN(b) ? String(b) : "null");
3148 break;
3149 case "boolean":
3150 c.push(String(b));
3151 break;
3152 case "function":
3153 c.push("null");
3154 break;
3155 default:
3156 throw Error("Unknown type: " + typeof b);
3157 }
3158 }
3159}
3160 , $d = {
3161 '"': '\\"',
3162 "\\": "\\\\",
3163 "/": "\\/",
3164 "\b": "\\b",
3165 "\f": "\\f",
3166 "\n": "\\n",
3167 "\r": "\\r",
3168 "\t": "\\t",
3169 "\x0B": "\\u000b"
3170}
3171 , ae = /\uffff/.test("\uffff") ? /[\\"\x00-\x1f\x7f-\uffff]/g : /[\\"\x00-\x1f\x7f-\xff]/g
3172 , Zd = function(a, b) {
3173 b.push('"', a.replace(ae, function(c) {
3174 var d = $d[c];
3175 d || (d = "\\u" + (c.charCodeAt(0) | 65536).toString(16).substr(1),
3176 $d[c] = d);
3177 return d
3178 }), '"')
3179};
3180var ce = function(a, b) {
3181 var c = Array.prototype.slice.call(arguments)
3182 , d = c.shift();
3183 if ("undefined" == typeof d)
3184 throw Error("[goog.string.format] Template required");
3185 return d.replace(/%([0\- \+]*)(\d+)?(\.(\d+))?([%sfdiu])/g, function(e, f, h, g, k, l, n, A) {
3186 if ("%" == l)
3187 return "%";
3188 var x = c.shift();
3189 if ("undefined" == typeof x)
3190 throw Error("[goog.string.format] Not enough arguments");
3191 arguments[0] = x;
3192 return be[l].apply(null, arguments)
3193 })
3194}
3195 , be = {
3196 s: function(a, b, c) {
3197 return isNaN(c) || "" == c || a.length >= Number(c) ? a : a = -1 < b.indexOf("-", 0) ? a + I(" ", Number(c) - a.length) : I(" ", Number(c) - a.length) + a
3198 },
3199 f: function(a, b, c, d, e) {
3200 d = a.toString();
3201 isNaN(e) || "" == e || (d = parseFloat(a).toFixed(e));
3202 var f = 0 > Number(a) ? "-" : 0 <= b.indexOf("+") ? "+" : 0 <= b.indexOf(" ") ? " " : "";
3203 0 <= Number(a) && (d = f + d);
3204 if (isNaN(c) || d.length >= Number(c))
3205 return d;
3206 d = isNaN(e) ? Math.abs(Number(a)).toString() : Math.abs(Number(a)).toFixed(e);
3207 a = Number(c) - d.length - f.length;
3208 return d = 0 <= b.indexOf("-", 0) ? f + d + I(" ", a) : f + I(0 <= b.indexOf("0", 0) ? "0" : " ", a) + d
3209 },
3210 d: function(a, b, c, d, e, f, h, g) {
3211 return be.f(parseInt(a, 10), b, c, d, 0, f, h, g)
3212 }
3213};
3214be.i = be.d;
3215be.u = be.d;
3216var ee = function() {
3217 this.b = new de;
3218 this.Ra = new Xd
3219};
3220ee.prototype.format = function(a) {
3221 a: if (null != a) {
3222 if (v(a)) {
3223 if (/^[\s\xa0]*$/.test(a)) {
3224 a = [];
3225 break a
3226 }
3227 a = JSON.parse(a)
3228 }
3229 var b = [];
3230 fe(this, a, b, 0);
3231 a = b
3232 } else
3233 a = [];
3234 b = "";
3235 for (var c = 0; c < a.length; c++) {
3236 var d = a[c];
3237 b += d instanceof H ? tb(d).toString() : d
3238 }
3239 return b
3240}
3241;
3242var fe = function(a, b, c, d) {
3243 var e = w(b);
3244 switch (e) {
3245 case "null":
3246 case "boolean":
3247 case "number":
3248 case "string":
3249 b = a.Ra.j(b);
3250 c.push(ge(a.b, b, e));
3251 break;
3252 case "array":
3253 c.push(a.b.Sb);
3254 for (e = 0; e < b.length; e++)
3255 0 < e && c.push(a.b.Ab),
3256 c.push(a.b.Ea),
3257 c.push(I(a.b.ta, d + a.b.Da)),
3258 fe(a, b[e], c, d + a.b.Da);
3259 0 < e && (c.push(a.b.Ea),
3260 c.push(I(a.b.ta, d)));
3261 c.push(a.b.Rb);
3262 break;
3263 case "object":
3264 c.push(a.b.hc);
3265 e = 0;
3266 for (var f in b)
3267 b.hasOwnProperty(f) && (0 < e && c.push(a.b.Ab),
3268 c.push(a.b.Ea),
3269 c.push(I(a.b.ta, d + a.b.Da)),
3270 c.push(he(a.b, a.Ra.j(f))),
3271 c.push(a.b.fc, a.b.ta),
3272 fe(a, b[f], c, d + a.b.Da),
3273 e++);
3274 0 < e && (c.push(a.b.Ea),
3275 c.push(I(a.b.ta, d)));
3276 c.push(a.b.gc);
3277 break;
3278 default:
3279 b = a.Ra.j(""),
3280 c.push(ge(a.b, b, "unknown"))
3281 }
3282}
3283 , de = function() {};
3284m = de.prototype;
3285m.ta = " ";
3286m.Ea = "\n";
3287m.hc = "{";
3288m.gc = "}";
3289m.Sb = "[";
3290m.Rb = "]";
3291m.Ab = ",";
3292m.fc = ":";
3293m.pc = "";
3294m.nc = "";
3295var he = function(a, b) {
3296 return a.pc + b + a.nc
3297};
3298de.prototype.qc = "";
3299de.prototype.oc = "";
3300var ge = function(a, b, c) {
3301 return ce(a.qc, c) + b + a.oc
3302};
3303de.prototype.Da = 2;
3304var ie = function() {
3305 F.call(this);
3306 this.qa = "chrome.downloads";
3307 this.Za = new Set
3308};
3309p(ie, F);
3310ie.prototype.jc = function(a) {
3311 this.Za.delete(a)
3312}
3313;
3314ie.prototype.onConnect = function(a) {
3315 this.Za.add(new je(a,this.jc.bind(this)))
3316}
3317;
3318ie.prototype.K = function() {
3319 this.Za.forEach(function(a) {
3320 a.close()
3321 });
3322 F.prototype.K.call(this)
3323}
3324;
3325var je = function(a, b) {
3326 var c = this;
3327 this.B = a;
3328 this.sb = this.Ga.bind(this);
3329 this.Y = function() {
3330 Ya(c.L);
3331 c.B.onMessage.removeListener(c.sb);
3332 c.B.onDisconnect.removeListener(c.Y);
3333 b(c)
3334 }
3335 ;
3336 this.pa = new ee;
3337 this.L = null;
3338 this.B.onMessage.addListener(this.sb);
3339 this.B.onDisconnect.addListener(this.Y)
3340};
3341je.prototype.close = function() {
3342 this.B.disconnect()
3343}
3344;
3345je.prototype.Ga = function(a) {
3346 N(ke, "Incoming message: " + this.pa.format(a));
3347 var b = Ra(a, "any")
3348 , c = this.xc.bind(this, a.id);
3349 try {
3350 switch (b.type) {
3351 case "hello":
3352 c({
3353 type: "helloResponse",
3354 version: chrome.runtime.getManifest().version
3355 });
3356 break;
3357 case "downloads.init":
3358 Ja("downloads.init", a.type);
3359 var d = Ka(a.url, "url");
3360 le(this, d, c);
3361 break;
3362 case "downloads.getStatus":
3363 me(this, c);
3364 break;
3365 case "downloads.getProgress":
3366 ne(this, c);
3367 break;
3368 case "downloads.download":
3369 oe(this, c);
3370 break;
3371 case "downloads.open":
3372 pe(this, c);
3373 break;
3374 case "downloads.show":
3375 qe(this, c);
3376 break;
3377 default:
3378 c((new D("DownloadSession.onMessage","INVALID_ARGS","Unknown message type: " + b.type)).j())
3379 }
3380 } catch (e) {
3381 c((new D("DownloadSession.onMessage","UNEXPECTED_ERROR",e.message)).j())
3382 }
3383}
3384;
3385var le = function(a, b, c) {
3386 X(Qd(b).then(function(d) {
3387 a.L = d;
3388 c(gd.j())
3389 }), function(d) {
3390 c(E("DownloadItem.create", d).j())
3391 })
3392}
3393 , me = function(a, b) {
3394 re(a, b) && X(Td(a.L).then(function(c) {
3395 b({
3396 type: "downloads.getStatusResponse",
3397 status: c
3398 })
3399 }), function(c) {
3400 b(E("DownloadItem.getStatus", c).j())
3401 })
3402}
3403 , ne = function(a, b) {
3404 re(a, b) && X(Sd(a.L).then(function(c) {
3405 b(c)
3406 }), function(c) {
3407 b(E("DownloadItem.getProgress", c).j())
3408 })
3409}
3410 , oe = function(a, b) {
3411 X(a.L.download().then(function() {
3412 Rd(a.L.o).then(function(c) {
3413 b({
3414 type: "downloads.downloadResponse",
3415 danger: c.danger
3416 })
3417 })
3418 }), function(c) {
3419 b(E("DownloadItem.getDetails or DownloadItem.download", c).j())
3420 })
3421}
3422 , pe = function(a, b) {
3423 re(a, b) && a.L.open().then(function() {
3424 b(hd.j())
3425 }, function(c) {
3426 b(E("DownloadItem.open", c).j())
3427 })
3428}
3429 , qe = function(a, b) {
3430 re(a, b) && X(a.L.show().then(function() {
3431 b(id.j())
3432 }), function(c) {
3433 b(E("DownloadItem.show", c).j())
3434 })
3435};
3436je.prototype.xc = function(a, b) {
3437 N(ke, "Outgoing message: " + this.pa.format(b));
3438 b.id = a;
3439 this.B.postMessage(b)
3440}
3441;
3442var re = function(a, b) {
3443 return a.L ? !0 : (b((new D("checkInitialized","INVALID_ARGS","this.downloadItem_ == null")).j()),
3444 !1)
3445}
3446 , ke = L("extension.NativeMessagingHandler");
3447var se = function(a) {
3448 F.call(this);
3449 this.qa = a;
3450 this.La = new Set
3451};
3452p(se, F);
3453se.prototype.ic = function(a) {
3454 this.La.delete(a)
3455}
3456;
3457se.prototype.onConnect = function(a) {
3458 this.La.add(new te(a,this.ic.bind(this)))
3459}
3460;
3461se.prototype.K = function() {
3462 this.La.forEach(function(a) {
3463 a.close()
3464 });
3465 F.prototype.K.call(this)
3466}
3467;
3468var te = function(a, b) {
3469 var c = this;
3470 this.ia = a;
3471 this.ea = chrome.runtime.connectNative(a.name);
3472 this.vb = this.mc.bind(this);
3473 this.ub = this.lc.bind(this);
3474 this.Y = function() {
3475 c.close();
3476 b(c)
3477 }
3478 ;
3479 this.pa = new ee;
3480 this.ia.onMessage.addListener(this.vb);
3481 this.ia.onDisconnect.addListener(this.Y);
3482 this.ea.onMessage.addListener(this.ub);
3483 this.ea.onDisconnect.addListener(this.Y)
3484};
3485te.prototype.close = function() {
3486 this.ia.onMessage.removeListener(this.vb);
3487 this.ia.onDisconnect.removeListener(this.Y);
3488 this.ea.onMessage.removeListener(this.ub);
3489 this.ea.onDisconnect.removeListener(this.Y);
3490 this.ia.disconnect();
3491 this.ea.disconnect()
3492}
3493;
3494te.prototype.lc = function(a) {
3495 N(ue, "Native => Webapp: " + this.pa.format(a));
3496 this.ia.postMessage(a)
3497}
3498;
3499te.prototype.mc = function(a) {
3500 N(ue, "Webapp => Native: " + this.pa.format(a));
3501 this.ea.postMessage(a)
3502}
3503;
3504var ue = L("extension.NativeMessagingHandler");
3505var ve = function() {
3506 F.apply(this, arguments)
3507};
3508p(ve, F);
3509ve.prototype.onMessage = function(a, b, c) {
3510 a = Ra(a, "any");
3511 try {
3512 switch (a.type) {
3513 case "tabs.highlight":
3514 return we(b, c);
3515 default:
3516 return xe(c, new D("TabsMessageHandler.onMessage","INVALID_ARGS","Unknown message type: " + a.type))
3517 }
3518 } catch (d) {
3519 return xe(c, new D("TabsMessageHandler.onMessage","UNEXPECTED_ERROR","Unexpected error: " + d.message))
3520 }
3521}
3522;
3523ve.prototype.nb = function() {
3524 return ["tabs.highlight"]
3525}
3526;
3527var we = function(a, b) {
3528 if (a.tab) {
3529 var c = a.tab.windowId
3530 , d = a.tab.index;
3531 chrome.windows.update(c, {
3532 focused: !0
3533 }, function() {
3534 chrome.tabs.highlight({
3535 windowId: c,
3536 tabs: d
3537 }, function() {
3538 b(Wa.j())
3539 })
3540 });
3541 return !0
3542 }
3543 b(Wa.j());
3544 return !1
3545};
3546function xe(a, b) {
3547 ye && ye.log(K, "Sending error: " + b.message, b);
3548 a(b.j());
3549 return !1
3550}
3551var ye = L("extension.TabsMessageHandler");
3552var ze = function() {
3553 this.Bb = Ga()
3554}
3555 , Ae = null;
3556ze.prototype.set = function(a) {
3557 this.Bb = a
3558}
3559;
3560ze.prototype.reset = function() {
3561 this.set(Ga())
3562}
3563;
3564ze.prototype.get = function() {
3565 return this.Bb
3566}
3567;
3568var Be = function(a) {
3569 this.rc = a || "";
3570 Ae || (Ae = new ze);
3571 this.Dc = Ae
3572};
3573m = Be.prototype;
3574m.eb = !0;
3575m.Eb = !0;
3576m.Bc = !0;
3577m.Ac = !0;
3578m.Fb = !1;
3579m.Cc = !1;
3580var Z = function(a) {
3581 return 10 > a ? "0" + a : String(a)
3582}
3583 , Ce = function(a, b) {
3584 a = (a.Hb - b) / 1E3;
3585 b = a.toFixed(3);
3586 var c = 0;
3587 if (1 > a)
3588 c = 2;
3589 else
3590 for (; 100 > a; )
3591 c++,
3592 a *= 10;
3593 for (; 0 < c--; )
3594 b = " " + b;
3595 return b
3596}
3597 , De = function(a) {
3598 Be.call(this, a)
3599};
3600Ha(De, Be);
3601var Ee = function(a, b) {
3602 var c = [];
3603 c.push(a.rc, " ");
3604 if (a.Eb) {
3605 var d = new Date(b.Hb);
3606 c.push("[", Z(d.getFullYear() - 2E3) + Z(d.getMonth() + 1) + Z(d.getDate()) + " " + Z(d.getHours()) + ":" + Z(d.getMinutes()) + ":" + Z(d.getSeconds()) + "." + Z(Math.floor(d.getMilliseconds() / 10)), "] ")
3607 }
3608 a.Bc && c.push("[", Ce(b, a.Dc.get()), "s] ");
3609 a.Ac && c.push("[", b.pb, "] ");
3610 a.Cc && c.push("[", b.X.name, "] ");
3611 c.push(b.getMessage());
3612 a.Fb && (b = b.Aa) && c.push("\n", b instanceof Error ? b.message : b.toString());
3613 a.eb && c.push("\n");
3614 return c.join("")
3615};
3616var Fe = function() {
3617 this.tc = Ea(this.Pb, this);
3618 this.Ba = new De;
3619 this.Ba.Eb = !1;
3620 this.Ba.Fb = !1;
3621 this.ob = this.Ba.eb = !1;
3622 this.Zb = {}
3623}
3624 , Ge = function() {
3625 var a = new Fe;
3626 if (1 != a.ob) {
3627 Ub();
3628 var b = Tb;
3629 var c = a.tc;
3630 b.ma || (b.ma = []);
3631 b.ma.push(c);
3632 a.ob = !0
3633 }
3634};
3635Fe.prototype.Pb = function(a) {
3636 function b(f) {
3637 if (f) {
3638 if (f.value >= K.value)
3639 return "error";
3640 if (f.value >= Ob.value)
3641 return "warn";
3642 if (f.value >= Qb.value)
3643 return "log"
3644 }
3645 return "debug"
3646 }
3647 if (!this.Zb[a.pb]) {
3648 var c = Ee(this.Ba, a)
3649 , d = He;
3650 if (d) {
3651 var e = b(a.X);
3652 Ie(d, e, c, a.Aa)
3653 }
3654 }
3655}
3656;
3657var He = u.console
3658 , Ie = function(a, b, c, d) {
3659 if (a[b])
3660 a[b](c, d || "");
3661 else
3662 a.log(c, d || "")
3663};
3664(function() {
3665 Ge();
3666 chrome.browserAction.onClicked.addListener(function() {
3667 return chrome.tabs.create({
3668 url: "https://remotedesktop.google.com/"
3669 })
3670 });
3671 var a = new qc(chrome.runtime.onMessageExternal,chrome.runtime.onConnectExternal);
3672 sc(a, new cd);
3673 sc(a, new ve);
3674 rc(a, new se("com.google.chrome.remote_assistance"));
3675 rc(a, new se("com.google.chrome.remote_desktop"));
3676 rc(a, new ie);
3677 a.start()
3678}
3679)();