-
Notifications
You must be signed in to change notification settings - Fork 0
/
app_compiled.js
775 lines (744 loc) · 337 KB
/
app_compiled.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
var f,aa=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}},ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a},ca=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");
},da=ca(this),ea=function(a,b){if(b)a:{var c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}};
ea("Symbol",function(a){if(a)return a;var b=function(g,h){this.$jscomp$symbol$id_=g;ba(this,"description",{configurable:!0,writable:!0,value:h})};b.prototype.toString=function(){return this.$jscomp$symbol$id_};var c="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",d=0,e=function(g){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new b(c+(g||"")+"_"+d++,g)};return e});
ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(aa(this))}})}return a});
var fa=function(a){a={next:a};a[Symbol.iterator]=function(){return this};return a},ha=function(a){return a.raw=a},ia=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}},ja="function"==typeof Object.create?Object.create:function(a){var b=function(){};b.prototype=a;return new b},ka;
if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}
var oa=ka,n=function(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.superClass_=b.prototype},qa=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};
ea("WeakMap",function(a){function b(){}function c(l){var m=typeof l;return"object"===m&&null!==l||"function"===m}function d(l){if(!qa(l,g)){var m=new b;ba(l,g,{value:m})}}function e(l){var m=Object[l];m&&(Object[l]=function(p){if(p instanceof b)return p;Object.isExtensible(p)&&d(p);return m(p)})}if(function(){if(!a||!Object.seal)return!1;try{var l=Object.seal({}),m=Object.seal({}),p=new a([[l,2],[m,3]]);if(2!=p.get(l)||3!=p.get(m))return!1;p.delete(l);p.set(m,4);return!p.has(l)&&4==p.get(m)}catch(r){return!1}}())return a;
var g="$jscomp_hidden_"+Math.random();e("freeze");e("preventExtensions");e("seal");var h=0,k=function(l){this.id_=(h+=Math.random()+1).toString();if(l){l=ia(l);for(var m;!(m=l.next()).done;)m=m.value,this.set(m[0],m[1])}};k.prototype.set=function(l,m){if(!c(l))throw Error("Invalid WeakMap key");d(l);if(!qa(l,g))throw Error("WeakMap key fail: "+l);l[g][this.id_]=m;return this};k.prototype.get=function(l){return c(l)&&qa(l,g)?l[g][this.id_]:void 0};k.prototype.has=function(l){return c(l)&&qa(l,g)&&
qa(l[g],this.id_)};k.prototype.delete=function(l){return c(l)&&qa(l,g)&&qa(l[g],this.id_)?delete l[g][this.id_]:!1};return k});
ea("Map",function(a){if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var k=Object.seal({x:4}),l=new a(ia([[k,"s"]]));if("s"!=l.get(k)||1!=l.size||l.get({x:4})||l.set({x:4},"t")!=l||2!=l.size)return!1;var m=l.entries(),p=m.next();if(p.done||p.value[0]!=k||"s"!=p.value[1])return!1;p=m.next();return p.done||4!=p.value[0].x||"t"!=p.value[1]||!m.next().done?!1:!0}catch(r){return!1}}())return a;var b=new WeakMap,c=function(k){this.data_={};this.head_=
g();this.size=0;if(k){k=ia(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}};c.prototype.set=function(k,l){k=0===k?0:k;var m=d(this,k);m.list||(m.list=this.data_[m.id]=[]);m.entry?m.entry.value=l:(m.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:k,value:l},m.list.push(m.entry),this.head_.previous.next=m.entry,this.head_.previous=m.entry,this.size++);return this};c.prototype.delete=function(k){k=d(this,k);return k.entry&&k.list?(k.list.splice(k.index,1),k.list.length||
delete this.data_[k.id],k.entry.previous.next=k.entry.next,k.entry.next.previous=k.entry.previous,k.entry.head=null,this.size--,!0):!1};c.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=g();this.size=0};c.prototype.has=function(k){return!!d(this,k).entry};c.prototype.get=function(k){return(k=d(this,k).entry)&&k.value};c.prototype.entries=function(){return e(this,function(k){return[k.key,k.value]})};c.prototype.keys=function(){return e(this,function(k){return k.key})};c.prototype.values=
function(){return e(this,function(k){return k.value})};c.prototype.forEach=function(k,l){for(var m=this.entries(),p;!(p=m.next()).done;)p=p.value,k.call(l,p[1],p[0],this)};c.prototype[Symbol.iterator]=c.prototype.entries;var d=function(k,l){var m=l&&typeof l;"object"==m||"function"==m?b.has(l)?m=b.get(l):(m=""+ ++h,b.set(l,m)):m="p_"+l;var p=k.data_[m];if(p&&qa(k.data_,m))for(k=0;k<p.length;k++){var r=p[k];if(l!==l&&r.key!==r.key||l===r.key)return{id:m,list:p,index:k,entry:r}}return{id:m,list:p,index:-1,
entry:void 0}},e=function(k,l){var m=k.head_;return fa(function(){if(m){for(;m.head!=k.head_;)m=m.previous;for(;m.next!=m.head;)return m=m.next,{done:!1,value:l(m)};m=null}return{done:!0,value:void 0}})},g=function(){var k={};return k.previous=k.next=k.head=k},h=0;return c});ea("Array.prototype.find",function(a){return a?a:function(b,c){a:{var d=this;d instanceof String&&(d=String(d));for(var e=d.length,g=0;g<e;g++){var h=d[g];if(b.call(c,h,g,d)){b=h;break a}}b=void 0}return b}});
var ra=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};ea("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=ra(this,b,"startsWith");b+="";var e=d.length,g=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var h=0;h<g&&c<e;)if(d[c++]!=b[h++])return!1;return h>=g}});
ea("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});var sa=function(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var g=c++;return{value:b(g,a[g]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e};ea("Array.prototype.keys",function(a){return a?a:function(){return sa(this,function(b){return b})}});
ea("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(k){return k};var e=[],g="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof g){b=g.call(b);for(var h=0;!(g=b.next()).done;)e.push(c.call(d,g.value,h++))}else for(g=b.length,h=0;h<g;h++)e.push(c.call(d,b[h],h));return e}});ea("Array.prototype.values",function(a){return a?a:function(){return sa(this,function(b,c){return c})}});
ea("Array.prototype.entries",function(a){return a?a:function(){return sa(this,function(b,c){return[b,c]})}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});ea("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var g=d[c];if(g===b||Object.is(g,b))return!0}return!1}});
ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==ra(this,b,"includes").indexOf(b,c||0)}});var ta="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)qa(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||ta});ea("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var ua=ua||{},q=this||self,va=function(a){a.instance_=void 0;a.getInstance=function(){return a.instance_?a.instance_:a.instance_=new a}},wa=function(a){var b=typeof a;return"object"!=b?b:a?Array.isArray(a)?"array":b:"null"},xa=function(a){var b=wa(a);return"array"==b||"object"==b&&"number"==typeof a.length},t=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},Aa=function(a){return Object.prototype.hasOwnProperty.call(a,ya)&&a[ya]||(a[ya]=++za)},ya="closure_uid_"+(1E9*Math.random()>>>
0),za=0,Ba=function(a,b,c){return a.call.apply(a.bind,arguments)},Ca=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}},u=function(a,b,c){u=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?Ba:Ca;return u.apply(null,arguments)},Da=function(a,b){var c=
Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}},v=function(a,b){a=a.split(".");var c=q;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}:c[d]=b},x=function(a,b){function c(){}c.prototype=b.prototype;a.superClass_=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.base=function(d,e,g){for(var h=
Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return b.prototype[e].apply(d,h)}},Ea=function(a){return a};function Fa(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,Fa);else{var c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));void 0!==b&&(this.cause=b)}x(Fa,Error);Fa.prototype.name="CustomError";var Ga;function Ha(a,b){a=a.split("%s");for(var c="",d=a.length-1,e=0;e<d;e++)c+=a[e]+(e<b.length?b[e]:"%s");Fa.call(this,c+a[d])}x(Ha,Fa);Ha.prototype.name="AssertionError";function Ia(a,b,c,d){var e="Assertion failed";if(c){e+=": "+c;var g=d}else a&&(e+=": "+a,g=b);throw new Ha(""+e,g||[]);}
var y=function(a,b,c){a||Ia("",null,b,Array.prototype.slice.call(arguments,2));return a},Ja=function(a,b,c){null==a&&Ia("Expected to exist: %s.",[a],b,Array.prototype.slice.call(arguments,2));return a},Ka=function(a,b){throw new Ha("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},La=function(a,b,c){"number"!==typeof a&&Ia("Expected number but got %s: %s.",[wa(a),a],b,Array.prototype.slice.call(arguments,2));return a},Ma=function(a,b,c){"string"!==typeof a&&Ia("Expected string but got %s: %s.",
[wa(a),a],b,Array.prototype.slice.call(arguments,2));return a},Na=function(a,b,c){"function"!==typeof a&&Ia("Expected function but got %s: %s.",[wa(a),a],b,Array.prototype.slice.call(arguments,2))},Oa=function(a,b,c){t(a)||Ia("Expected object but got %s: %s.",[wa(a),a],b,Array.prototype.slice.call(arguments,2))},Pa=function(a,b,c){Array.isArray(a)||Ia("Expected array but got %s: %s.",[wa(a),a],b,Array.prototype.slice.call(arguments,2))},Qa=function(a,b,c){t(a)&&1==a.nodeType||Ia("Expected Element but got %s: %s.",
[wa(a),a],b,Array.prototype.slice.call(arguments,2))},Sa=function(a,b,c,d){a instanceof b||Ia("Expected instanceof %s but got %s.",[Ra(b),Ra(a)],c,Array.prototype.slice.call(arguments,3));return a};function Ra(a){return a instanceof Function?a.displayName||a.name||"unknown type name":a instanceof Object?a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a):null===a?"null":typeof a};var Ta=Array.prototype.indexOf?function(a,b){y(null!=a.length);return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if("string"===typeof a)return"string"!==typeof b||1!=b.length?-1:a.indexOf(b,0);for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},Ua=Array.prototype.forEach?function(a,b,c){y(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e="string"===typeof a?a.split(""):a,g=0;g<d;g++)g in e&&b.call(c,e[g],g,a)},Va=Array.prototype.map?
function(a,b,c){y(null!=a.length);return Array.prototype.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),g="string"===typeof a?a.split(""):a,h=0;h<d;h++)h in g&&(e[h]=b.call(c,g[h],h,a));return e},Wa=Array.prototype.some?function(a,b,c){y(null!=a.length);return Array.prototype.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e="string"===typeof a?a.split(""):a,g=0;g<d;g++)if(g in e&&b.call(c,e[g],g,a))return!0;return!1},Xa=Array.prototype.every?function(a,b){y(null!=a.length);return Array.prototype.every.call(a,
b,void 0)}:function(a,b){for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)if(e in d&&!b.call(void 0,d[e],e,a))return!1;return!0};function Ya(a,b){b=Za(a,b);return 0>b?null:"string"===typeof a?a.charAt(b):a[b]}function Za(a,b){for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return e;return-1}function $a(a,b){return 0<=Ta(a,b)}function ab(a){if(!Array.isArray(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}
function bb(a,b){b=Ta(a,b);var c;if(c=0<=b)y(null!=a.length),Array.prototype.splice.call(a,b,1);return c}function cb(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]}function db(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(xa(d)){var e=a.length||0,g=d.length||0;a.length=e+g;for(var h=0;h<g;h++)a[e+h]=d[h]}else a.push(d)}}function eb(a,b,c,d){y(null!=a.length);Array.prototype.splice.apply(a,fb(arguments,1))}
function fb(a,b,c){y(null!=a.length);return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)}function gb(a,b,c){if(!xa(a)||!xa(b)||a.length!=b.length)return!1;var d=a.length;c=c||hb;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function hb(a,b){return a===b};var ib=Object.freeze||function(a){return a};function jb(a){a&&"function"==typeof a.dispose&&a.dispose()};var C=function(){this.disposed_=this.disposed_;this.onDisposeCallbacks_=this.onDisposeCallbacks_};C.prototype.disposed_=!1;C.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())};var kb=function(a,b){b=Da(jb,b);a.disposed_?b():(a.onDisposeCallbacks_||(a.onDisposeCallbacks_=[]),a.onDisposeCallbacks_.push(b))};C.prototype.disposeInternal=function(){if(this.onDisposeCallbacks_)for(;this.onDisposeCallbacks_.length;)this.onDisposeCallbacks_.shift()()};var lb=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.propagationStopped_=!1};lb.prototype.stopPropagation=function(){this.propagationStopped_=!0};lb.prototype.preventDefault=function(){this.defaultPrevented=!0};var mb="PointerEvent"in q,nb="MSPointerEvent"in q&&!(!q.navigator||!q.navigator.msPointerEnabled),ob=function(){if(!q.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});try{q.addEventListener("test",function(){},b),q.removeEventListener("test",function(){},b)}catch(c){}return a}();var pb=function(a){return/^[\s\xa0]*$/.test(a)},qb=String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]},yb=function(a){if(!rb.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(sb,"&"));-1!=a.indexOf("<")&&(a=a.replace(tb,"<"));-1!=a.indexOf(">")&&(a=a.replace(ub,">"));-1!=a.indexOf('"')&&(a=a.replace(vb,"""));-1!=a.indexOf("'")&&(a=a.replace(wb,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(xb,"�"));return a},sb=/&/g,tb=
/</g,ub=/>/g,vb=/"/g,wb=/'/g,xb=/\x00/g,rb=/[\x00&<>"']/,zb=function(a,b){return-1!=a.indexOf(b)},Bb=function(a,b){var c=0;a=qb(String(a)).split(".");b=qb(String(b)).split(".");for(var d=Math.max(a.length,b.length),e=0;0==c&&e<d;e++){var g=a[e]||"",h=b[e]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""];if(0==g[0].length&&0==h[0].length)break;c=Ab(0==g[1].length?0:parseInt(g[1],10),0==h[1].length?0:parseInt(h[1],10))||Ab(0==g[2].length,0==h[2].length)||Ab(g[2],
h[2]);g=g[3];h=h[3]}while(0==c)}return c},Ab=function(a,b){return a<b?-1:a>b?1:0};function Cb(){var a=q.navigator;return a&&(a=a.userAgent)?a:""}function D(a){return zb(Cb(),a)};function Db(){return D("Trident")||D("MSIE")}function Eb(){return D("Firefox")||D("FxiOS")}function Fb(){return(D("Chrome")||D("CriOS"))&&!D("Edge")||D("Silk")}function Gb(a){var b={};a.forEach(function(c){b[c[0]]=c[1]});return function(c){return b[c.find(function(d){return d in b})]||""}}
function Hb(){var a=Cb();if(Db()){var b=/rv: *([\d\.]*)/.exec(a);if(b&&b[1])a=b[1];else{b="";var c=/MSIE +([\d\.]+)/.exec(a);if(c&&c[1])if(a=/Trident\/(\d.\d)/.exec(a),"7.0"==c[1])if(a&&a[1])switch(a[1]){case "4.0":b="8.0";break;case "5.0":b="9.0";break;case "6.0":b="10.0";break;case "7.0":b="11.0"}else b="7.0";else b=c[1];a=b}return a}c=RegExp("([A-Z][\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?","g");b=[];for(var d;d=c.exec(a);)b.push([d[1],d[2],d[3]||void 0]);a=Gb(b);return D("Opera")?a(["Version","Opera"]):
D("Edge")?a(["Edge"]):D("Edg/")?a(["Edg"]):D("Silk")?a(["Silk"]):Fb()?a(["Chrome","CriOS","HeadlessChrome"]):(a=b[2])&&a[1]||""};function Ib(){return D("iPhone")&&!D("iPod")&&!D("iPad")}function Jb(){return Ib()||D("iPad")||D("iPod")};var Lb=function(a){Lb[" "](a);return a};Lb[" "]=function(){};var Mb=function(a,b){try{return Lb(a[b]),!0}catch(c){}return!1},Ob=function(a,b){var c=Nb;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var Pb=D("Opera"),E=Db(),Qb=D("Edge"),Rb=Qb||E,F=D("Gecko")&&!(zb(Cb().toLowerCase(),"webkit")&&!D("Edge"))&&!(D("Trident")||D("MSIE"))&&!D("Edge"),Sb=zb(Cb().toLowerCase(),"webkit")&&!D("Edge"),Tb=Sb&&D("Mobile"),Ub=D("Macintosh"),Vb=D("Windows"),Wb=D("Android"),Xb=Ib(),Yb=D("iPad"),Zb=D("iPod"),$b=Jb(),ac=function(){var a=q.document;return a?a.documentMode:void 0},bc;
a:{var cc="",dc=function(){var a=Cb();if(F)return/rv:([^\);]+)(\)|;)/.exec(a);if(Qb)return/Edge\/([\d\.]+)/.exec(a);if(E)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Sb)return/WebKit\/(\S+)/.exec(a);if(Pb)return/(?:Version)[ \/]?(\S+)/.exec(a)}();dc&&(cc=dc?dc[1]:"");if(E){var ec=ac();if(null!=ec&&ec>parseFloat(cc)){bc=String(ec);break a}}bc=cc}var fc=bc,Nb={},gc=function(a){return Ob(a,function(){return 0<=Bb(fc,a)})},hc;
if(q.document&&E){var ic=ac();hc=ic?ic:parseInt(fc,10)||void 0}else hc=void 0;var jc=hc;var lc=function(a,b){lb.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.platformModifierKey=!1;this.pointerId=0;this.pointerType="";this.event_=null;if(a){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||
a.srcElement;this.currentTarget=b;(b=a.relatedTarget)?F&&(Mb(b,"nodeName")||(b=null)):"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;d?(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0):(this.offsetX=Sb||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=Sb||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==
a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.key=a.key||"";this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.platformModifierKey=Ub?a.metaKey:a.ctrlKey;this.pointerId=a.pointerId||0;this.pointerType="string"===typeof a.pointerType?a.pointerType:kc[a.pointerType]||"";this.state=a.state;this.event_=a;a.defaultPrevented&&
lc.superClass_.preventDefault.call(this)}};x(lc,lb);var kc=ib({2:"touch",3:"pen",4:"mouse"});lc.prototype.stopPropagation=function(){lc.superClass_.stopPropagation.call(this);this.event_.stopPropagation?this.event_.stopPropagation():this.event_.cancelBubble=!0};lc.prototype.preventDefault=function(){lc.superClass_.preventDefault.call(this);var a=this.event_;a.preventDefault?a.preventDefault():a.returnValue=!1};var mc="closure_listenable_"+(1E6*Math.random()|0),nc=function(a){return!(!a||!a[mc])};var oc=0;var pc=function(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.handler=e;this.key=++oc;this.removed=this.callOnce=!1},qc=function(a){a.removed=!0;a.listener=null;a.proxy=null;a.src=null;a.handler=null};function rc(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function sc(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return!0;return!1}function tc(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function uc(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function vc(a,b){for(var c in a)if(a[c]==b)return!0;return!1}function wc(a,b){a:{for(var c in a)if(b.call(void 0,a[c],c,a)){b=c;break a}b=void 0}return b&&a[b]}function xc(){var a=yc,b;for(b in a)return!1;return!0}
function zc(a,b,c){if(null!==a&&b in a)throw Error('The object already contains the key "'+b+'"');a[b]=c}function Ac(a){var b={},c;for(c in a)b[c]=a[c];return b}var Bc="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Cc(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var g=0;g<Bc.length;g++)c=Bc[g],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}}
function Dc(a){var b=arguments.length;if(1==b&&Array.isArray(arguments[0]))return Dc.apply(null,arguments[0]);if(b%2)throw Error("Uneven number of arguments");for(var c={},d=0;d<b;d+=2)c[arguments[d]]=arguments[d+1];return c}function Ec(a){var b=arguments.length;if(1==b&&Array.isArray(arguments[0]))return Ec.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=!0;return c};var Fc=function(a){this.src=a;this.listeners={};this.typeCount_=0};Fc.prototype.add=function(a,b,c,d,e){var g=a.toString();a=this.listeners[g];a||(a=this.listeners[g]=[],this.typeCount_++);var h=Gc(a,b,d,e);-1<h?(b=a[h],c||(b.callOnce=!1)):(b=new pc(b,this.src,g,!!d,e),b.callOnce=c,a.push(b));return b};
Fc.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.listeners))return!1;var e=this.listeners[a];b=Gc(e,b,c,d);return-1<b?(qc(e[b]),y(null!=e.length),Array.prototype.splice.call(e,b,1),0==e.length&&(delete this.listeners[a],this.typeCount_--),!0):!1};var Hc=function(a,b){var c=b.type;c in a.listeners&&bb(a.listeners[c],b)&&(qc(b),0==a.listeners[c].length&&(delete a.listeners[c],a.typeCount_--))};
Fc.prototype.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.listeners)if(!a||c==a){for(var d=this.listeners[c],e=0;e<d.length;e++)++b,qc(d[e]);delete this.listeners[c];this.typeCount_--}return b};Fc.prototype.getListeners=function(a,b){a=this.listeners[a.toString()];var c=[];if(a)for(var d=0;d<a.length;++d){var e=a[d];e.capture==b&&c.push(e)}return c};Fc.prototype.getListener=function(a,b,c,d){a=this.listeners[a.toString()];var e=-1;a&&(e=Gc(a,b,c,d));return-1<e?a[e]:null};
Fc.prototype.hasListener=function(a,b){var c=void 0!==a,d=c?a.toString():"",e=void 0!==b;return sc(this.listeners,function(g){for(var h=0;h<g.length;++h)if(!(c&&g[h].type!=d||e&&g[h].capture!=b))return!0;return!1})};var Gc=function(a,b,c,d){for(var e=0;e<a.length;++e){var g=a[e];if(!g.removed&&g.listener==b&&g.capture==!!c&&g.handler==d)return e}return-1};var Ic="closure_lm_"+(1E6*Math.random()|0),Jc={},Kc=0,Mc=function(a,b,c,d,e){if(d&&d.once)return Lc(a,b,c,d,e);if(Array.isArray(b)){for(var g=0;g<b.length;g++)Mc(a,b[g],c,d,e);return null}c=Nc(c);return nc(a)?a.listen(b,c,t(d)?!!d.capture:!!d,e):Oc(a,b,c,!1,d,e)},Oc=function(a,b,c,d,e,g){if(!b)throw Error("Invalid event type");var h=t(e)?!!e.capture:!!e,k=Pc(a);k||(a[Ic]=k=new Fc(a));c=k.add(b,c,d,h,g);if(c.proxy)return c;d=Qc();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)ob||(e=h),void 0===
e&&(e=!1),a.addEventListener(b.toString(),d,e);else if(a.attachEvent)a.attachEvent(Rc(b.toString()),d);else if(a.addListener&&a.removeListener)y("change"===b,"MediaQueryList only has a change event"),a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");Kc++;return c},Qc=function(){var a=Sc,b=function(c){return a.call(b.src,b.listener,c)};return b},Lc=function(a,b,c,d,e){if(Array.isArray(b)){for(var g=0;g<b.length;g++)Lc(a,b[g],c,d,e);return null}c=Nc(c);return nc(a)?
a.listenOnce(b,c,t(d)?!!d.capture:!!d,e):Oc(a,b,c,!0,d,e)},Tc=function(a,b,c,d,e){if(Array.isArray(b))for(var g=0;g<b.length;g++)Tc(a,b[g],c,d,e);else d=t(d)?!!d.capture:!!d,c=Nc(c),nc(a)?a.unlisten(b,c,d,e):a&&(a=Pc(a))&&(b=a.getListener(b,c,d,e))&&Uc(b)},Uc=function(a){if("number"!==typeof a&&a&&!a.removed){var b=a.src;if(nc(b))Hc(b.eventTargetListeners_,a);else{var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent?b.detachEvent(Rc(c),d):b.addListener&&
b.removeListener&&b.removeListener(d);Kc--;(c=Pc(b))?(Hc(c,a),0==c.typeCount_&&(c.src=null,b[Ic]=null)):qc(a)}}},Rc=function(a){return a in Jc?Jc[a]:Jc[a]="on"+a},Sc=function(a,b){if(a.removed)a=!0;else{b=new lc(b,this);var c=a.listener,d=a.handler||a.src;a.callOnce&&Uc(a);a=c.call(d,b)}return a},Pc=function(a){a=a[Ic];return a instanceof Fc?a:null},Vc="__closure_events_fn_"+(1E9*Math.random()>>>0),Nc=function(a){y(a,"Listener can not be null.");if("function"===typeof a)return a;y(a.handleEvent,"An object listener must have handleEvent method.");
a[Vc]||(a[Vc]=function(b){return a.handleEvent(b)});return a[Vc]};function Wc(){};var Xc=function(a,b){this.limit_=100;this.create_=a;this.reset_=b;this.occupants_=0;this.head_=null};Xc.prototype.get=function(){if(0<this.occupants_){this.occupants_--;var a=this.head_;this.head_=a.next;a.next=null}else a=this.create_();return a};Xc.prototype.put=function(a){this.reset_(a);this.occupants_<this.limit_&&(this.occupants_++,a.next=this.head_,this.head_=a)};var Yc=function(){},Zc=function(a){return a},$c=function(a){var b=!1,c;return function(){b||(c=a(),b=!0);return c}};var ad={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};var bd;var ed=function(a,b){this.stringConstValueWithSecurityContract__googStringSecurityPrivate_=a===cd&&b||"";this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_=dd};ed.prototype.implementsGoogStringTypedString=!0;ed.prototype.getTypedStringValue=function(){return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_};ed.prototype.toString=function(){return"Const{"+this.stringConstValueWithSecurityContract__googStringSecurityPrivate_+"}"};
var fd=function(a){if(a instanceof ed&&a.constructor===ed&&a.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_===dd)return a.stringConstValueWithSecurityContract__googStringSecurityPrivate_;Ka("expected object of type Const, got '"+a+"'");return"type_error:Const"},dd={},cd={};var gd={},hd=function(a,b){this.privateDoNotAccessOrElseSafeScriptWrappedValue_=b===gd?a:"";this.implementsGoogStringTypedString=!0};hd.prototype.toString=function(){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_.toString()};hd.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_.toString()};
var id=function(a){if(a instanceof hd&&a.constructor===hd)return a.privateDoNotAccessOrElseSafeScriptWrappedValue_;Ka("expected object of type SafeScript, got '"+a+"' of type "+wa(a));return"type_error:SafeScript"};var kd=function(a,b){this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_=b===jd?a:""};kd.prototype.toString=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_+""};kd.prototype.implementsGoogStringTypedString=!0;kd.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_.toString()};
var ld=function(a){if(a instanceof kd&&a.constructor===kd)return a.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;Ka("expected object of type TrustedResourceUrl, got '"+a+"' of type "+wa(a));return"type_error:TrustedResourceUrl"},jd={};var nd=function(a,b){this.privateDoNotAccessOrElseSafeUrlWrappedValue_=b===md?a:""};nd.prototype.toString=function(){return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString()};nd.prototype.implementsGoogStringTypedString=!0;nd.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString()};
var od=function(a){if(a instanceof nd&&a.constructor===nd)return a.privateDoNotAccessOrElseSafeUrlWrappedValue_;Ka("expected object of type SafeUrl, got '"+a+"' of type "+wa(a));return"type_error:SafeUrl"},pd=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,qd=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,rd=function(a){if(a instanceof nd)return a;a="object"==typeof a&&a.implementsGoogStringTypedString?a.getTypedStringValue():String(a);qd.test(a)?a=new nd(a,md):(a=String(a).replace(/(%0A|%0D)/g,""),a=a.match(pd)?
new nd(a,md):null);return a},md={},sd=new nd("about:invalid#zClosurez",md);var td={},ud=function(a,b){this.privateDoNotAccessOrElseSafeStyleWrappedValue_=b===td?a:"";this.implementsGoogStringTypedString=!0};ud.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_};ud.prototype.toString=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_.toString()};
var vd=function(a){if(a instanceof ud&&a.constructor===ud)return a.privateDoNotAccessOrElseSafeStyleWrappedValue_;Ka("expected object of type SafeStyle, got '"+a+"' of type "+wa(a));return"type_error:SafeStyle"},wd=new ud("",td);function xd(a){if(a instanceof nd)return'url("'+od(a).replace(/</g,"%3c").replace(/[\\"]/g,"\\$&")+'")';a=a instanceof ed?fd(a):yd(String(a));if(/[{;}]/.test(a))throw new Ha("Value does not allow [{;}], got: %s.",[a]);return a}
function yd(a){var b=a.replace(zd,"$1").replace(zd,"$1").replace(Ad,"url");if(Bd.test(b)){if(Cd.test(a))return Ka("String value disallows comments, got: "+a),"zClosurez";for(var c=b=!0,d=0;d<a.length;d++){var e=a.charAt(d);"'"==e&&c?b=!b:'"'==e&&b&&(c=!c)}if(!b||!c)return Ka("String value requires balanced quotes, got: "+a),"zClosurez";if(!Dd(a))return Ka("String value requires balanced square brackets and one identifier per pair of brackets, got: "+a),"zClosurez"}else return Ka("String value allows only [-,.\"'%_!#/ a-zA-Z0-9\\[\\]] and simple functions, got: "+
a),"zClosurez";return Ed(a)}function Dd(a){for(var b=!0,c=/^[-_a-zA-Z0-9]$/,d=0;d<a.length;d++){var e=a.charAt(d);if("]"==e){if(b)return!1;b=!0}else if("["==e){if(!b)return!1;b=!1}else if(!b&&!c.test(e))return!1}return b}
var Bd=RegExp("^[-,.\"'%_!#/ a-zA-Z0-9\\[\\]]+$"),Ad=RegExp("\\b(url\\([ \t\n]*)('[ -&(-\\[\\]-~]*'|\"[ !#-\\[\\]-~]*\"|[!#-&*-\\[\\]-~]*)([ \t\n]*\\))","g"),zd=RegExp("\\b(calc|cubic-bezier|fit-content|hsl|hsla|linear-gradient|matrix|minmax|radial-gradient|repeat|rgb|rgba|(rotate|scale|translate)(X|Y|Z|3d)?|var)\\([-+*/0-9a-zA-Z.%#\\[\\], ]+\\)","g"),Cd=/\/\*/;
function Ed(a){return a.replace(Ad,function(b,c,d,e){var g="";d=d.replace(/^(['"])(.*)\1$/,function(h,k,l){g=k;return l});b=(rd(d)||sd).getTypedStringValue();return c+g+b+g+e})};var Fd={},Gd=function(a,b){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_=b===Fd?a:"";this.implementsGoogStringTypedString=!0};Gd.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_.toString()};Gd.prototype.toString=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_.toString()};
var Id=function(a){return Hd(a).toString()},Hd=function(a){if(a instanceof Gd&&a.constructor===Gd)return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;Ka("expected object of type SafeHtml, got '"+a+"' of type "+wa(a));return"type_error:SafeHtml"},Kd=function(a){return a instanceof Gd?a:Jd(yb("object"==typeof a&&a.implementsGoogStringTypedString?a.getTypedStringValue():String(a)))},Ld=function(a){if(a instanceof Gd)return a;a=Kd(a);return Jd(Id(a).replace(/(\r\n|\r|\n)/g,"<br>"))},Nd=function(a){var b=
Kd(Md),c=[],d=function(e){Array.isArray(e)?e.forEach(d):(e=Kd(e),c.push(Id(e)))};a.forEach(d);return Jd(c.join(Id(b)))},Od=function(a){return Nd(Array.prototype.slice.call(arguments))},Jd=function(a){if(void 0===bd){var b=null;var c=q.trustedTypes;if(c&&c.createPolicy)try{b=c.createPolicy("goog#html",{createHTML:Ea,createScript:Ea,createScriptURL:Ea})}catch(d){q.console&&q.console.error(d.message)}bd=b}a=(b=bd)?b.createHTML(a):a;return new Gd(a,Fd)},Pd=/^[a-zA-Z0-9-]+$/,Qd={action:!0,cite:!0,data:!0,
formaction:!0,href:!0,manifest:!0,poster:!0,src:!0},Rd={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},Md=new Gd(q.trustedTypes&&q.trustedTypes.emptyHTML||"",Fd);var Sd=function(a,b){Ma(fd(a),"must provide justification");y(!pb(fd(a)),"must provide non-empty justification");return Jd(b)};var Td={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},Ud=$c(function(){if("undefined"===typeof document)return!1;var a=document.createElement("div"),b=document.createElement("div");b.appendChild(document.createElement("div"));a.appendChild(b);if(!a.firstChild)return!1;b=a.firstChild.firstChild;a.innerHTML=Hd(Md);return!b.parentElement}),Vd=function(a,b){if(Ud())for(;a.lastChild;)a.removeChild(a.lastChild);a.innerHTML=Hd(b)},Wd=function(a,b){if(a.tagName&&Td[a.tagName.toUpperCase()])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+
a.tagName+".");Vd(a,b)};var G=function(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0};G.prototype.clone=function(){return new G(this.x,this.y)};G.prototype.toString=function(){return"("+this.x+", "+this.y+")"};G.prototype.equals=function(a){return a instanceof G&&Xd(this,a)};var Xd=function(a,b){return a==b?!0:a&&b?a.x==b.x&&a.y==b.y:!1},Yd=function(a,b){return new G(a.x-b.x,a.y-b.y)};f=G.prototype;f.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};
f.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};f.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};f.translate=function(a,b){a instanceof G?(this.x+=a.x,this.y+=a.y):(this.x+=Number(a),"number"===typeof b&&(this.y+=b));return this};f.scale=function(a,b){this.x*=a;this.y*="number"===typeof b?b:a;return this};var Zd=function(a,b){this.width=a;this.height=b};f=Zd.prototype;f.clone=function(){return new Zd(this.width,this.height)};f.toString=function(){return"("+this.width+" x "+this.height+")"};f.aspectRatio=function(){return this.width/this.height};f.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};f.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
f.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};f.scale=function(a,b){this.width*=a;this.height*="number"===typeof b?b:a;return this};var $d=function(a){return a.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},ce=function(a){return zb(a,"&")?"document"in q?ae(a):be(a):a},ae=function(a){var b={"&":"&","<":"<",">":">",""":'"'};var c=q.document.createElement("div");return a.replace(de,function(d,e){var g=b[d];if(g)return g;"#"==e.charAt(0)&&(e=Number("0"+e.slice(1)),isNaN(e)||(g=String.fromCharCode(e)));g||(Wd(c,Sd(new ed(cd,"Single HTML entity."),d+" ")),g=c.firstChild.nodeValue.slice(0,-1));return b[d]=
g})},be=function(a){return a.replace(/&([^;]+);/g,function(b,c){switch(c){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:return"#"!=c.charAt(0)||(c=Number("0"+c.slice(1)),isNaN(c))?b:String.fromCharCode(c)}})},de=/&([^;\s<&]+);?/g,ee=function(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},fe=String.prototype.repeat?function(a,b){return a.repeat(b)}:function(a,b){return Array(b+1).join(a)},ge=function(a){return null==
a?"":String(a)},he=function(a){return String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()})},ie=function(a){return a.replace(RegExp("(^|[\\s]+)([a-z])","g"),function(b,c,d){return c+d.toUpperCase()})};var ke=function(a){return a?new je(I(a)):Ga||(Ga=new je)},me=function(a,b){var c=b||document;return c.querySelectorAll&&c.querySelector?c.querySelectorAll("."+a):le(document,"*",a,b)},ne=function(a,b){var c=b||document;if(c.getElementsByClassName)a=c.getElementsByClassName(a)[0];else{c=document;var d=b||c;a=d.querySelectorAll&&d.querySelector&&a?d.querySelector(a?"."+a:""):le(c,"*",a,b)[0]||null}return a||null},le=function(a,b,c,d){a=d||a;b=b&&"*"!=b?String(b).toUpperCase():"";if(a.querySelectorAll&&
a.querySelector&&(b||c))return a.querySelectorAll(b+(c?"."+c:""));if(c&&a.getElementsByClassName){a=a.getElementsByClassName(c);if(b){d={};for(var e=0,g=0,h;h=a[g];g++)b==h.nodeName&&(d[e++]=h);d.length=e;return d}return a}a=a.getElementsByTagName(b||"*");if(c){d={};for(g=e=0;h=a[g];g++)b=h.className,"function"==typeof b.split&&$a(b.split(/\s+/),c)&&(d[e++]=h);d.length=e;return d}return a},pe=function(a,b){rc(b,function(c,d){c&&"object"==typeof c&&c.implementsGoogStringTypedString&&(c=c.getTypedStringValue());
"style"==d?a.style.cssText=c:"class"==d?a.className=c:"for"==d?a.htmlFor=c:oe.hasOwnProperty(d)?a.setAttribute(oe[d],c):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,c):a[d]=c})},oe={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},re=function(a){a=a.document;a=qe(a)?a.documentElement:
a.body;return new Zd(a.clientWidth,a.clientHeight)},ue=function(a){var b=se(a);a=te(a);return E&&gc("10")&&a.pageYOffset!=b.scrollTop?new G(b.scrollLeft,b.scrollTop):new G(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)},se=function(a){return a.scrollingElement?a.scrollingElement:!Sb&&qe(a)?a.documentElement:a.body||a.documentElement},te=function(a){return a.parentWindow||a.defaultView},we=function(a,b,c){return ve(document,arguments)},ve=function(a,b){var c=b[1],d=xe(a,String(b[0]));c&&("string"===
typeof c?d.className=c:Array.isArray(c)?d.className=c.join(" "):pe(d,c));2<b.length&&ye(a,d,b,2);return d},ye=function(a,b,c,d){function e(k){k&&b.appendChild("string"===typeof k?a.createTextNode(k):k)}for(;d<c.length;d++){var g=c[d];if(!xa(g)||t(g)&&0<g.nodeType)e(g);else{a:{if(g&&"number"==typeof g.length){if(t(g)){var h="function"==typeof g.item||"string"==typeof g.item;break a}if("function"===typeof g){h="function"==typeof g.item;break a}}h=!1}Ua(h?cb(g):g,e)}}},xe=function(a,b){b=String(b);"application/xhtml+xml"===
a.contentType&&(b=b.toLowerCase());return a.createElement(b)},qe=function(a){return"CSS1Compat"==a.compatMode},ze=function(a,b){y(null!=a&&null!=b,"goog.dom.appendChild expects non-null arguments");a.appendChild(b)},Ae=function(a,b){ye(I(a),a,arguments,1)},Be=function(a){for(var b;b=a.firstChild;)a.removeChild(b)},Ce=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null},De=function(a){return void 0!=a.children?a.children:Array.prototype.filter.call(a.childNodes,function(b){return 1==
b.nodeType})},Fe=function(a){return void 0!==a.firstElementChild?a.firstElementChild:Ee(a.firstChild)},Ee=function(a){for(;a&&1!=a.nodeType;)a=a.nextSibling;return a},Ge=function(a){return t(a)&&1==a.nodeType},He=function(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a},I=function(a){y(a,"Node cannot be null or undefined.");return 9==
a.nodeType?a:a.ownerDocument||a.document},Ie=function(a,b){y(null!=a,"goog.dom.setTextContent expects a non-null value for node");if("textContent"in a)a.textContent=b;else if(3==a.nodeType)a.data=String(b);else if(a.firstChild&&3==a.firstChild.nodeType){for(;a.lastChild!=a.firstChild;)a.removeChild(y(a.lastChild));a.firstChild.data=String(b)}else{Be(a);var c=I(a);a.appendChild(c.createTextNode(String(b)))}},Je={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Ke={IMG:" ",BR:"\n"},Me=function(a){return a.hasAttribute("tabindex")&&
Le(a)},Ne=function(a,b){b?a.tabIndex=0:(a.tabIndex=-1,a.removeAttribute("tabIndex"))},Le=function(a){a=a.tabIndex;return"number"===typeof a&&0<=a&&32768>a},Pe=function(a){var b=[];Oe(a,b,!1);return b.join("")},Oe=function(a,b,c){if(!(a.nodeName in Je))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Ke)b.push(Ke[a.nodeName]);else for(a=a.firstChild;a;)Oe(a,b,c),a=a.nextSibling},Qe=function(a,b){for(var c=0;a;){y("parentNode"!=a.name);
if(b(a))return a;a=a.parentNode;c++}return null},Re=function(a){try{var b=a&&a.activeElement;return b&&b.nodeName?b:null}catch(c){return null}},je=function(a){this.document_=a||q.document||document};f=je.prototype;f.getDomHelper=ke;f.getElement=function(a){return"string"===typeof a?this.document_.getElementById(a):a};f.getElementsByTagName=function(a,b){return(b||this.document_).getElementsByTagName(String(a))};f.getElementByClass=function(a,b){return ne(a,b||this.document_)};
f.getRequiredElementByClass=function(a){var b=ne(a,this.document_);return y(b,"No element found with className: "+a)};f.setProperties=pe;f.createDom=function(a,b,c){return ve(this.document_,arguments)};f.createElement=function(a){return xe(this.document_,a)};f.createTextNode=function(a){return this.document_.createTextNode(String(a))};f.appendChild=ze;f.append=Ae;f.canHaveChildren=function(a){if(1!=a.nodeType)return!1;switch(a.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "COMMAND":case "EMBED":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "KEYGEN":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case "SCRIPT":case "SOURCE":case "STYLE":case "TRACK":case "WBR":return!1}return!0};
f.removeChildren=Be;f.removeNode=Ce;f.getChildren=De;f.getFirstElementChild=Fe;f.isElement=Ge;f.contains=He;
f.isFocusable=function(a){var b;(b="A"==a.tagName&&a.hasAttribute("href")||"INPUT"==a.tagName||"TEXTAREA"==a.tagName||"SELECT"==a.tagName||"BUTTON"==a.tagName?!a.disabled&&(!a.hasAttribute("tabindex")||Le(a)):Me(a))&&E?(a="function"!==typeof a.getBoundingClientRect||E&&null==a.parentElement?{height:a.offsetHeight,width:a.offsetWidth}:a.getBoundingClientRect(),a=null!=a&&0<a.height&&0<a.width):a=b;return a};var Se,Te=function(){var a=q.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!D("Presto")&&(a=function(){var e=xe(document,"IFRAME");e.style.display="none";document.documentElement.appendChild(e);var g=e.contentWindow;e=g.document;e.open();e.close();var h="callImmediate"+Math.random(),k="file:"==g.location.protocol?"*":g.location.protocol+"//"+g.location.host;e=u(function(l){if(("*"==k||l.origin==k)&&l.data==h)this.port1.onmessage()},
this);g.addEventListener("message",e,!1);this.port1={};this.port2={postMessage:function(){g.postMessage(h,k)}}});if("undefined"!==typeof a&&!Db()){var b=new a,c={},d=c;b.port1.onmessage=function(){if(void 0!==c.next){c=c.next;var e=c.cb;c.cb=null;e()}};return function(e){d.next={cb:e};d=d.next;b.port2.postMessage(0)}}return function(e){q.setTimeout(e,0)}};function Ue(a){q.setTimeout(function(){throw a;},0)};var Ve=function(){this.workTail_=this.workHead_=null};Ve.prototype.add=function(a,b){var c=We.get();c.set(a,b);this.workTail_?this.workTail_.next=c:(y(!this.workHead_),this.workHead_=c);this.workTail_=c};Ve.prototype.remove=function(){var a=null;this.workHead_&&(a=this.workHead_,this.workHead_=this.workHead_.next,this.workHead_||(this.workTail_=null),a.next=null);return a};var We=new Xc(function(){return new Xe},function(a){return a.reset()}),Xe=function(){this.next=this.scope=this.fn=null};
Xe.prototype.set=function(a,b){this.fn=a;this.scope=b;this.next=null};Xe.prototype.reset=function(){this.next=this.scope=this.fn=null};var Ye,Ze=!1,$e=new Ve,bf=function(a,b){Ye||af();Ze||(Ye(),Ze=!0);$e.add(a,b)},af=function(){if(q.Promise&&q.Promise.resolve){var a=q.Promise.resolve(void 0);Ye=function(){a.then(cf)}}else Ye=function(){var b=cf;"function"!==typeof q.setImmediate||q.Window&&q.Window.prototype&&!D("Edge")&&q.Window.prototype.setImmediate==q.setImmediate?(Se||(Se=Te()),Se(b)):q.setImmediate(b)}},cf=function(){for(var a;a=$e.remove();){try{a.fn.call(a.scope)}catch(b){Ue(b)}We.put(a)}Ze=!1};var df=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var gf=function(a){this.state_=0;this.result_=void 0;this.callbackEntriesTail_=this.callbackEntries_=this.parent_=null;this.hadUnhandledRejection_=this.executing_=!1;if(a!=Yc)try{var b=this;a.call(void 0,function(c){ef(b,2,c)},function(c){if(!(c instanceof ff))try{if(c instanceof Error)throw c;throw Error("Promise rejected.");}catch(d){}ef(b,3,c)})}catch(c){ef(this,3,c)}},hf=function(){this.next=this.context=this.onRejected=this.onFulfilled=this.child=null;this.always=!1};
hf.prototype.reset=function(){this.context=this.onRejected=this.onFulfilled=this.child=null;this.always=!1};var jf=new Xc(function(){return new hf},function(a){a.reset()}),kf=function(a,b,c){var d=jf.get();d.onFulfilled=a;d.onRejected=b;d.context=c;return d};
gf.prototype.then=function(a,b,c){null!=a&&Na(a,"opt_onFulfilled should be a function.");null!=b&&Na(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return lf(this,"function"===typeof a?a:null,"function"===typeof b?b:null,c)};gf.prototype.$goog_Thenable=!0;gf.prototype.thenCatch=function(a,b){return lf(this,null,a,b)};gf.prototype.catch=gf.prototype.thenCatch;
gf.prototype.cancel=function(a){if(0==this.state_){var b=new ff(a);bf(function(){mf(this,b)},this)}};
var mf=function(a,b){if(0==a.state_)if(a.parent_){var c=a.parent_;if(c.callbackEntries_){for(var d=0,e=null,g=null,h=c.callbackEntries_;h&&(h.always||(d++,h.child==a&&(e=h),!(e&&1<d)));h=h.next)e||(g=h);e&&(0==c.state_&&1==d?mf(c,b):(g?(d=g,y(c.callbackEntries_),y(null!=d),d.next==c.callbackEntriesTail_&&(c.callbackEntriesTail_=d),d.next=d.next.next):nf(c),of(c,e,3,b)))}a.parent_=null}else ef(a,3,b)},qf=function(a,b){a.callbackEntries_||2!=a.state_&&3!=a.state_||pf(a);y(null!=b.onFulfilled);a.callbackEntriesTail_?
a.callbackEntriesTail_.next=b:a.callbackEntries_=b;a.callbackEntriesTail_=b},lf=function(a,b,c,d){var e=kf(null,null,null);e.child=new gf(function(g,h){e.onFulfilled=b?function(k){try{var l=b.call(d,k);g(l)}catch(m){h(m)}}:g;e.onRejected=c?function(k){try{var l=c.call(d,k);void 0===l&&k instanceof ff?h(k):g(l)}catch(m){h(m)}}:h});e.child.parent_=a;qf(a,e);return e.child};gf.prototype.unblockAndFulfill_=function(a){y(1==this.state_);this.state_=0;ef(this,2,a)};
gf.prototype.unblockAndReject_=function(a){y(1==this.state_);this.state_=0;ef(this,3,a)};
var ef=function(a,b,c){if(0==a.state_){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.state_=1;a:{var d=c,e=a.unblockAndFulfill_,g=a.unblockAndReject_;if(d instanceof gf){null!=e&&Na(e,"opt_onFulfilled should be a function.");null!=g&&Na(g,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");qf(d,kf(e||Yc,g||null,a));var h=!0}else if(df(d))d.then(e,g,a),h=!0;else{if(t(d))try{var k=d.then;if("function"===typeof k){rf(d,k,
e,g,a);h=!0;break a}}catch(l){g.call(a,l);h=!0;break a}h=!1}}h||(a.result_=c,a.state_=b,a.parent_=null,pf(a),3!=b||c instanceof ff||sf(a,c))}},rf=function(a,b,c,d,e){var g=!1,h=function(l){g||(g=!0,c.call(e,l))},k=function(l){g||(g=!0,d.call(e,l))};try{b.call(a,h,k)}catch(l){k(l)}},pf=function(a){a.executing_||(a.executing_=!0,bf(a.executeCallbacks_,a))},nf=function(a){var b=null;a.callbackEntries_&&(b=a.callbackEntries_,a.callbackEntries_=b.next,b.next=null);a.callbackEntries_||(a.callbackEntriesTail_=
null);null!=b&&y(null!=b.onFulfilled);return b};gf.prototype.executeCallbacks_=function(){for(var a;a=nf(this);)of(this,a,this.state_,this.result_);this.executing_=!1};
var of=function(a,b,c,d){if(3==c&&b.onRejected&&!b.always)for(;a&&a.hadUnhandledRejection_;a=a.parent_)a.hadUnhandledRejection_=!1;if(b.child)b.child.parent_=null,tf(b,c,d);else try{b.always?b.onFulfilled.call(b.context):tf(b,c,d)}catch(e){uf.call(null,e)}jf.put(b)},tf=function(a,b,c){2==b?a.onFulfilled.call(a.context,c):a.onRejected&&a.onRejected.call(a.context,c)},sf=function(a,b){a.hadUnhandledRejection_=!0;bf(function(){a.hadUnhandledRejection_&&uf.call(null,b)})},uf=Ue,ff=function(a){Fa.call(this,
a)};x(ff,Fa);ff.prototype.name="cancel";/*
Copyright 2005, 2007 Bob Ippolito. All Rights Reserved.
Copyright The Closure Library Authors.
SPDX-License-Identifier: MIT
*/
var J=function(a,b){this.sequence_=[];this.onCancelFunction_=a;this.defaultScope_=b||null;this.hadError_=this.fired_=!1;this.result_=void 0;this.silentlyCanceled_=this.blocking_=this.blocked_=!1;this.unhandledErrorId_=0;this.parent_=null;this.branches_=0};x(J,Wc);
J.prototype.cancel=function(a){if(this.fired_)this.result_ instanceof J&&this.result_.cancel();else{if(this.parent_){var b=this.parent_;delete this.parent_;a?b.cancel(a):(b.branches_--,0>=b.branches_&&b.cancel())}this.onCancelFunction_?this.onCancelFunction_.call(this.defaultScope_,this):this.silentlyCanceled_=!0;this.fired_||this.errback(new vf(this))}};J.prototype.continue_=function(a,b){this.blocked_=!1;wf(this,a,b)};var wf=function(a,b,c){a.fired_=!0;a.result_=c;a.hadError_=!b;xf(a)};
J.prototype.check_=function(){if(this.fired_){if(!this.silentlyCanceled_)throw new yf(this);this.silentlyCanceled_=!1}};J.prototype.callback=function(a){this.check_();zf(a);wf(this,!0,a)};J.prototype.errback=function(a){this.check_();zf(a);wf(this,!1,a)};
var zf=function(a){y(!(a instanceof J),"An execution sequence may not be initiated with a blocking Deferred.")},Bf=function(a,b,c){return Af(a,b,null,c)},Af=function(a,b,c,d){y(!a.blocking_,"Blocking Deferreds can not be re-used");a.sequence_.push([b,c,d]);a.fired_&&xf(a);return a};J.prototype.then=function(a,b,c){var d,e,g=new gf(function(h,k){e=h;d=k});Af(this,e,function(h){h instanceof vf?g.cancel():d(h);return Cf},this);return g.then(a,b,c)};J.prototype.$goog_Thenable=!0;
J.prototype.isError=function(a){return a instanceof Error};
var Df=function(a){return Wa(a.sequence_,function(b){return"function"===typeof b[1]})},Cf={},xf=function(a){if(a.unhandledErrorId_&&a.fired_&&Df(a)){var b=a.unhandledErrorId_,c=Ef[b];c&&(q.clearTimeout(c.id_),delete Ef[b]);a.unhandledErrorId_=0}a.parent_&&(a.parent_.branches_--,delete a.parent_);b=a.result_;for(var d=c=!1;a.sequence_.length&&!a.blocked_;){var e=a.sequence_.shift(),g=e[0],h=e[1];e=e[2];if(g=a.hadError_?h:g)try{var k=g.call(e||a.defaultScope_,b);k===Cf&&(k=void 0);void 0!==k&&(a.hadError_=
a.hadError_&&(k==b||a.isError(k)),a.result_=b=k);if(df(b)||"function"===typeof q.Promise&&b instanceof q.Promise)d=!0,a.blocked_=!0}catch(l){b=l,a.hadError_=!0,Df(a)||(c=!0)}}a.result_=b;d&&(k=u(a.continue_,a,!0),d=u(a.continue_,a,!1),b instanceof J?(Af(b,k,d),b.blocking_=!0):b.then(k,d));c&&(b=new Ff(b),Ef[b.id_]=b,a.unhandledErrorId_=b.id_)},Gf=function(a){var b=new J;b.callback(a);return b},If=function(){var a=new J;a.errback(Hf);return a},yf=function(){Fa.call(this)};x(yf,Fa);
yf.prototype.message="Deferred has already fired";yf.prototype.name="AlreadyCalledError";var vf=function(){Fa.call(this)};x(vf,Fa);vf.prototype.message="Deferred was canceled";vf.prototype.name="CanceledError";var Ff=function(a){this.id_=q.setTimeout(u(this.throwError,this),0);this.error_=a};Ff.prototype.throwError=function(){y(Ef[this.id_],"Cannot throw an error that is not scheduled.");delete Ef[this.id_];throw this.error_;};var Ef={};var Jf,Kf;var K=function(){C.call(this);this.eventTargetListeners_=new Fc(this);this.actualEventTarget_=this;this.parentEventTarget_=null};x(K,C);K.prototype[mc]=!0;f=K.prototype;f.getParentEventTarget=function(){return this.parentEventTarget_};f.setParentEventTarget=function(a){this.parentEventTarget_=a};f.addEventListener=function(a,b,c,d){Mc(this,a,b,c,d)};f.removeEventListener=function(a,b,c,d){Tc(this,a,b,c,d)};
f.dispatchEvent=function(a){Lf(this);var b=this.getParentEventTarget();if(b){var c=[];for(var d=1;b;b=b.getParentEventTarget())c.push(b),y(1E3>++d,"infinite loop")}b=this.actualEventTarget_;d=a.type||a;if("string"===typeof a)a=new lb(a,b);else if(a instanceof lb)a.target=a.target||b;else{var e=a;a=new lb(d,b);Cc(a,e)}e=!0;if(c)for(var g=c.length-1;!a.propagationStopped_&&0<=g;g--){var h=a.currentTarget=c[g];e=Mf(h,d,!0,a)&&e}a.propagationStopped_||(h=a.currentTarget=b,e=Mf(h,d,!0,a)&&e,a.propagationStopped_||
(e=Mf(h,d,!1,a)&&e));if(c)for(g=0;!a.propagationStopped_&&g<c.length;g++)h=a.currentTarget=c[g],e=Mf(h,d,!1,a)&&e;return e};f.disposeInternal=function(){K.superClass_.disposeInternal.call(this);this.eventTargetListeners_&&this.eventTargetListeners_.removeAll(void 0);this.parentEventTarget_=null};f.listen=function(a,b,c,d){Lf(this);return this.eventTargetListeners_.add(String(a),b,!1,c,d)};f.listenOnce=function(a,b,c,d){return this.eventTargetListeners_.add(String(a),b,!0,c,d)};
f.unlisten=function(a,b,c,d){return this.eventTargetListeners_.remove(String(a),b,c,d)};var Mf=function(a,b,c,d){b=a.eventTargetListeners_.listeners[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,g=0;g<b.length;++g){var h=b[g];if(h&&!h.removed&&h.capture==c){var k=h.listener,l=h.handler||h.src;h.callOnce&&Hc(a.eventTargetListeners_,h);e=!1!==k.call(l,d)&&e}}return e&&!d.defaultPrevented};K.prototype.getListeners=function(a,b){return this.eventTargetListeners_.getListeners(String(a),b)};
K.prototype.getListener=function(a,b,c,d){return this.eventTargetListeners_.getListener(String(a),b,c,d)};K.prototype.hasListener=function(a,b){return this.eventTargetListeners_.hasListener(void 0!==a?String(a):void 0,b)};var Lf=function(a){y(a.eventTargetListeners_,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var Nf=function(){K.call(this);this.namespace_="google-analytics";this.storage_=chrome.storage.local;chrome.storage.onChanged.addListener(u(this.onStorageChanged_,this))};n(Nf,K);Nf.prototype.onStorageChanged_=function(a,b){"local"==b&&Of(this,a)&&this.dispatchEvent("a")};var Of=function(a,b){return Wa(uc(b),function(c){return 0==c.lastIndexOf(this.namespace_,0)},a)};
Nf.prototype.get=function(a){var b=new J,c=this.namespace_+"."+a;this.storage_.get(c,function(d){chrome.runtime.lastError?b.errback(chrome.runtime.lastError):(d=d[c],b.callback(null!=d?d.toString():void 0))});return b};Nf.prototype.set=function(a,b){var c=new J,d={};d[this.namespace_+"."+a]=b;this.storage_.set(d,function(){chrome.runtime.lastError?c.errback(chrome.runtime.lastError):c.callback()});return c};var Pf=function(a,b){this.childIterator_=a[q.Symbol.iterator]();this.mapFn_=b};Pf.prototype[Symbol.iterator]=function(){return this};Pf.prototype.next=function(){var a=this.childIterator_.next();return{value:a.done?void 0:this.mapFn_.call(void 0,a.value),done:a.done}};var Qf=function(a,b){return new Pf(a,b)};var Rf=function(){};Rf.prototype.next=function(){return Sf};var Sf=ib({done:!0,value:void 0});Rf.prototype.__iterator__=function(){return this};var Wf=function(a){if(a instanceof Tf||a instanceof Uf||a instanceof Vf)return a;if("function"==typeof a.next)return new Tf(function(){return a});if("function"==typeof a[Symbol.iterator])return new Tf(function(){return a[Symbol.iterator]()});if("function"==typeof a.__iterator__)return new Tf(function(){return a.__iterator__()});throw Error("Not an iterator or iterable.");},Tf=function(a){this.func_=a};Tf.prototype.__iterator__=function(){return new Uf(this.func_())};
Tf.prototype[Symbol.iterator]=function(){return new Vf(this.func_())};Tf.prototype.toEs6=function(){return new Vf(this.func_())};var Uf=function(a){this.iter_=a};n(Uf,Rf);Uf.prototype.next=function(){return this.iter_.next()};Uf.prototype[Symbol.iterator]=function(){return new Vf(this.iter_)};Uf.prototype.toEs6=function(){return new Vf(this.iter_)};var Vf=function(a){Tf.call(this,function(){return a});this.iter_=a};n(Vf,Tf);Vf.prototype.next=function(){return this.iter_.next()};var Xf=function(a,b){this.map_={};this.keys_=[];this.version_=this.size=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)};f=Xf.prototype;f.getCount=function(){return this.size};f.getValues=function(){Yf(this);for(var a=[],b=0;b<this.keys_.length;b++)a.push(this.map_[this.keys_[b]]);return a};f.getKeys=function(){Yf(this);return this.keys_.concat()};f.containsKey=function(a){return this.has(a)};
f.has=function(a){return Zf(this.map_,a)};f.containsValue=function(a){for(var b=0;b<this.keys_.length;b++){var c=this.keys_[b];if(Zf(this.map_,c)&&this.map_[c]==a)return!0}return!1};f.equals=function(a,b){if(this===a)return!0;if(this.size!=a.getCount())return!1;b=b||$f;Yf(this);for(var c,d=0;c=this.keys_[d];d++)if(!b(this.get(c),a.get(c)))return!1;return!0};var $f=function(a,b){return a===b};Xf.prototype.clear=function(){this.map_={};this.keys_.length=0;this.setSizeInternal_(0);this.version_=0};
Xf.prototype.remove=function(a){return this.delete(a)};Xf.prototype.delete=function(a){return Zf(this.map_,a)?(delete this.map_[a],this.setSizeInternal_(this.size-1),this.version_++,this.keys_.length>2*this.size&&Yf(this),!0):!1};
var Yf=function(a){if(a.size!=a.keys_.length){for(var b=0,c=0;b<a.keys_.length;){var d=a.keys_[b];Zf(a.map_,d)&&(a.keys_[c++]=d);b++}a.keys_.length=c}if(a.size!=a.keys_.length){var e={};for(c=b=0;b<a.keys_.length;)d=a.keys_[b],Zf(e,d)||(a.keys_[c++]=d,e[d]=1),b++;a.keys_.length=c}};f=Xf.prototype;f.get=function(a,b){return Zf(this.map_,a)?this.map_[a]:b};f.set=function(a,b){Zf(this.map_,a)||(this.setSizeInternal_(this.size+1),this.keys_.push(a),this.version_++);this.map_[a]=b};
f.addAll=function(a){if(a instanceof Xf)for(var b=a.getKeys(),c=0;c<b.length;c++)this.set(b[c],a.get(b[c]));else for(b in a)this.set(b,a[b])};f.forEach=function(a,b){for(var c=this.getKeys(),d=0;d<c.length;d++){var e=c[d],g=this.get(e);a.call(b,g,e,this)}};f.clone=function(){return new Xf(this)};f.keys=function(){return Wf(this.__iterator__(!0)).toEs6()};f.values=function(){return Wf(this.__iterator__(!1)).toEs6()};f.entries=function(){var a=this;return Qf(this.keys(),function(b){return[b,a.get(b)]})};
f.__iterator__=function(a){Yf(this);var b=0,c=this.version_,d=this,e=new Rf;e.next=function(){if(c!=d.version_)throw Error("The map has changed since the iterator was created");if(b>=d.keys_.length)return Sf;var g=d.keys_[b++];return{value:a?g:d.map_[g],done:!1}};return e};f.setSizeInternal_=function(a){this.size=a};var Zf=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var ag={id:"hitType",name:"t",valueType:"text",maxLength:void 0,defaultValue:void 0},bg={id:"sessionControl",name:"sc",valueType:"text",maxLength:void 0,defaultValue:void 0},cg={id:"description",name:"cd",valueType:"text",maxLength:2048,defaultValue:void 0},dg={HIT_TYPE:ag,ANONYMIZE_IP:{id:"anonymizeIp",name:"aip",valueType:"boolean",maxLength:void 0,defaultValue:void 0},QUEUE_TIME:{id:"queueTime",name:"qt",valueType:"integer",maxLength:void 0,defaultValue:void 0},CACHE_BUSTER:{id:"cacheBuster",name:"z",
valueType:"text",maxLength:void 0,defaultValue:void 0},SESSION_CONTROL:bg,SESSION_GROUP:{id:"sessionGroup",name:"sg",valueType:"text",maxLength:void 0,defaultValue:void 0},USER_ID:{id:"userId",name:"uid",valueType:"text",maxLength:void 0,defaultValue:void 0},NON_INTERACTION:{id:"nonInteraction",name:"ni",valueType:"boolean",maxLength:void 0,defaultValue:void 0},DESCRIPTION:cg,TITLE:{id:"title",name:"dt",valueType:"text",maxLength:1500,defaultValue:void 0},APP_ID:{id:"appId",name:"aid",valueType:"text",
maxLength:150,defaultValue:void 0},APP_INSTALLER_ID:{id:"appInstallerId",name:"aiid",valueType:"text",maxLength:150,defaultValue:void 0},EVENT_CATEGORY:{id:"eventCategory",name:"ec",valueType:"text",maxLength:150,defaultValue:void 0},EVENT_ACTION:{id:"eventAction",name:"ea",valueType:"text",maxLength:500,defaultValue:void 0},EVENT_LABEL:{id:"eventLabel",name:"el",valueType:"text",maxLength:500,defaultValue:void 0},EVENT_VALUE:{id:"eventValue",name:"ev",valueType:"integer",maxLength:void 0,defaultValue:void 0},
SOCIAL_NETWORK:{id:"socialNetwork",name:"sn",valueType:"text",maxLength:50,defaultValue:void 0},SOCIAL_ACTION:{id:"socialAction",name:"sa",valueType:"text",maxLength:50,defaultValue:void 0},SOCIAL_TARGET:{id:"socialTarget",name:"st",valueType:"text",maxLength:2048,defaultValue:void 0},TRANSACTION_ID:{id:"transactionId",name:"ti",valueType:"text",maxLength:500,defaultValue:void 0},TRANSACTION_AFFILIATION:{id:"transactionAffiliation",name:"ta",valueType:"text",maxLength:500,defaultValue:void 0},TRANSACTION_REVENUE:{id:"transactionRevenue",
name:"tr",valueType:"currency",maxLength:void 0,defaultValue:void 0},TRANSACTION_SHIPPING:{id:"transactionShipping",name:"ts",valueType:"currency",maxLength:void 0,defaultValue:void 0},TRANSACTION_TAX:{id:"transactionTax",name:"tt",valueType:"currency",maxLength:void 0,defaultValue:void 0},CURRENCY_CODE:{id:"currencyCode",name:"cu",valueType:"text",maxLength:10,defaultValue:void 0},ITEM_PRICE:{id:"itemPrice",name:"ip",valueType:"currency",maxLength:void 0,defaultValue:void 0},ITEM_QUANTITY:{id:"itemQuantity",
name:"iq",valueType:"integer",maxLength:void 0,defaultValue:void 0},ITEM_CODE:{id:"itemCode",name:"ic",valueType:"text",maxLength:500,defaultValue:void 0},ITEM_NAME:{id:"itemName",name:"in",valueType:"text",maxLength:500,defaultValue:void 0},ITEM_CATEGORY:{id:"itemCategory",name:"iv",valueType:"text",maxLength:500,defaultValue:void 0},CAMPAIGN_SOURCE:{id:"campaignSource",name:"cs",valueType:"text",maxLength:100,defaultValue:void 0},CAMPAIGN_MEDIUM:{id:"campaignMedium",name:"cm",valueType:"text",maxLength:50,
defaultValue:void 0},CAMPAIGN_NAME:{id:"campaignName",name:"cn",valueType:"text",maxLength:100,defaultValue:void 0},CAMPAIGN_KEYWORD:{id:"campaignKeyword",name:"ck",valueType:"text",maxLength:500,defaultValue:void 0},CAMPAIGN_CONTENT:{id:"campaignContent",name:"cc",valueType:"text",maxLength:500,defaultValue:void 0},CAMPAIGN_ID:{id:"campaignId",name:"ci",valueType:"text",maxLength:100,defaultValue:void 0},GCLID:{id:"gclid",name:"gclid",valueType:"text",maxLength:void 0,defaultValue:void 0},DCLID:{id:"dclid",
name:"dclid",valueType:"text",maxLength:void 0,defaultValue:void 0},PAGE_LOAD_TIME:{id:"pageLoadTime",name:"plt",valueType:"integer",maxLength:void 0,defaultValue:void 0},DNS_TIME:{id:"dnsTime",name:"dns",valueType:"integer",maxLength:void 0,defaultValue:void 0},TCP_CONNECT_TIME:{id:"tcpConnectTime",name:"tcp",valueType:"integer",maxLength:void 0,defaultValue:void 0},SERVER_RESPONSE_TIME:{id:"serverResponseTime",name:"srt",valueType:"integer",maxLength:void 0,defaultValue:void 0},PAGE_DOWNLOAD_TIME:{id:"pageDownloadTime",
name:"pdt",valueType:"integer",maxLength:void 0,defaultValue:void 0},REDIRECT_RESPONSE_TIME:{id:"redirectResponseTime",name:"rrt",valueType:"integer",maxLength:void 0,defaultValue:void 0},TIMING_CATEGORY:{id:"timingCategory",name:"utc",valueType:"text",maxLength:150,defaultValue:void 0},TIMING_VAR:{id:"timingVar",name:"utv",valueType:"text",maxLength:500,defaultValue:void 0},TIMING_VALUE:{id:"timingValue",name:"utt",valueType:"integer",maxLength:void 0,defaultValue:void 0},TIMING_LABEL:{id:"timingLabel",
name:"utl",valueType:"text",maxLength:500,defaultValue:void 0},EX_DESCRIPTION:{id:"exDescription",name:"exd",valueType:"text",maxLength:150,defaultValue:void 0},EX_FATAL:{id:"exFatal",name:"exf",valueType:"boolean",maxLength:void 0,defaultValue:"1"}};var eg={id:"anonymizeIp",name:"aip",valueType:"boolean",maxLength:void 0,defaultValue:void 0},fg={id:"apiVersion",name:"v",valueType:"text",maxLength:void 0,defaultValue:void 0},gg={id:"appName",name:"an",valueType:"text",maxLength:100,defaultValue:void 0},hg={id:"appVersion",name:"av",valueType:"text",maxLength:100,defaultValue:void 0},ig={id:"clientId",name:"cid",valueType:"text",maxLength:void 0,defaultValue:void 0},jg={id:"language",name:"ul",valueType:"text",maxLength:20,defaultValue:void 0},
kg={id:"libVersion",name:"_v",valueType:"text",maxLength:void 0,defaultValue:void 0},lg={id:"sampleRateOverride",name:"usro",valueType:"integer",maxLength:void 0,defaultValue:void 0},mg={id:"screenColors",name:"sd",valueType:"text",maxLength:20,defaultValue:void 0},og={id:"screenResolution",name:"sr",valueType:"text",maxLength:20,defaultValue:void 0},pg={id:"trackingId",name:"tid",valueType:"text",maxLength:void 0,defaultValue:void 0},qg={id:"viewportSize",name:"vp",valueType:"text",maxLength:20,
defaultValue:void 0},rg={ANONYMIZE_IP:eg,API_VERSION:fg,APP_NAME:gg,APP_VERSION:hg,CLIENT_ID:ig,LANGUAGE:jg,LIBRARY_VERSION:kg,SAMPLE_RATE_OVERRIDE:lg,SCREEN_COLORS:mg,SCREEN_RESOLUTION:og,TRACKING_ID:pg,VIEWPORT_SIZE:qg},tg=function(a){if("string"!==typeof a)return a;var b=sg(a,dg);if(t(b))return b;b=sg(a,rg);if(t(b))return b;b=/^dimension(\d+)$/.exec(a);if(null!==b){a=parseInt(b[1],10);if(1>a||200<a)throw Error("Expected dimension index range 1-200, but was : "+a);return{id:"dimension"+a,name:"cd"+
a,valueType:"text",maxLength:150,defaultValue:void 0}}b=/^metric(\d+)$/.exec(a);if(null!==b){a=parseInt(b[1],10);if(1>a||200<a)throw Error("Expected metric index range 1-200, but was : "+a);return{id:"metric"+a,name:"cm"+a,valueType:"integer",maxLength:void 0,defaultValue:void 0}}throw Error(a+" is not a valid parameter name.");},sg=function(a,b){b=wc(b,function(c){return c.id==a&&"metric"!=a&&"dimension"!=a});return t(b)?b:null};var ug=function(a){if(a.getCount&&"function"==typeof a.getCount)a=a.getCount();else if(xa(a)||"string"===typeof a)a=a.length;else{var b=0,c;for(c in a)b++;a=b}return a},vg=function(a){if(a.getValues&&"function"==typeof a.getValues)return a.getValues();if("undefined"!==typeof Map&&a instanceof Map||"undefined"!==typeof Set&&a instanceof Set)return Array.from(a.values());if("string"===typeof a)return a.split("");if(xa(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return tc(a)},wg=function(a){if(a.getKeys&&
"function"==typeof a.getKeys)return a.getKeys();if(!a.getValues||"function"!=typeof a.getValues){if("undefined"!==typeof Map&&a instanceof Map)return Array.from(a.keys());if(!("undefined"!==typeof Set&&a instanceof Set)){if(xa(a)||"string"===typeof a){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return uc(a)}}},xg=function(a,b,c){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,c);else if(xa(a)||"string"===typeof a)Array.prototype.forEach.call(a,b,c);else for(var d=wg(a),e=vg(a),
g=e.length,h=0;h<g;h++)b.call(c,e[h],d&&d[h],a)},yg=function(a,b){if("function"==typeof a.every)return a.every(b,void 0);if(xa(a)||"string"===typeof a)return Array.prototype.every.call(a,b,void 0);for(var c=wg(a),d=vg(a),e=d.length,g=0;g<e;g++)if(!b.call(void 0,d[g],c&&c[g],a))return!1;return!0};var zg=function(a){this.entries_=new Xf;if(0<arguments.length%2)throw Error("Uneven number of arguments to ParameterMap constructor.");for(var b=arguments,c=0;c<b.length;c+=2)this.set(b[c],b[c+1])};zg.prototype.set=function(a,b){if(null==b)throw Error("undefined-or-null value for key: "+a.name);this.entries_.set(a.name,{key:a,value:b})};zg.prototype.remove=function(a){this.entries_.delete(a.name)};zg.prototype.get=function(a){a=this.entries_.get(a.name,null);return null===a?null:a.value};
zg.prototype.addAll=function(a){this.entries_.addAll(a.entries_)};var Ag=function(a,b){Ua(Array.from(a.entries_.values()),function(c){b(c.key,c.value)})};zg.prototype.clone=function(){var a=new zg;a.entries_=this.entries_.clone();return a};zg.prototype.equals=function(a){return this.entries_.size!==a.entries_.size?!1:Xa(Array.from(this.entries_.values()),function(b){return b.value==a.get(b.key)})};
zg.prototype.contains=function(a){return Xa(Array.from(a.entries_.values()),u(function(b){return b.value==this.get(b.key)},this))};zg.prototype.toString=function(){var a={};Ag(this,function(b,c){a[b.id]=c});return JSON.stringify(a)};function Bg(a){this.channelManager_=a;this.channel_=a.getChannel();this.params_=new zg;this.anonymizeIps_=this.startSession_=!1}Bg.prototype.set=function(a,b){if(null==b)throw Error("Value must be defined and not null. Parameter="+a.id);a=tg(a);this.params_.set(a,b)};Bg.prototype.addFilter=function(a){this.channelManager_.addFilter(a)};
Bg.prototype.send=function(a,b){var c=this.params_.clone();b instanceof zg?c.addAll(b):t(b)&&rc(b,function(d,e){null!=d&&c.set(tg(e),d)},this);this.startSession_&&(this.startSession_=!1,c.set(bg,"start"));this.anonymizeIps_&&c.set(eg,!0);return this.channel_.send(a,c)};var Cg=function(a,b){var c={description:b};a.set(cg,b);a.send("appview",c)};Bg.prototype.sendTiming=function(a,b,c){this.send("timing",{timingCategory:a,timingVar:b,timingLabel:void 0,timingValue:c,sampleRateOverride:void 0})};var Gg=function(a){var b=Dg();if(!Kf){var c=Dg();Kf=new Eg(c,new Fg(c))}c=Kf;this.libVersion_="ca1.6.0";this.appName_="cros_recovery_tool";this.appVersion_=a;this.settings_=b;this.channelFactory_=c};var Hg=[],Ig=function(a){y(!Object.isSealed(a),"Cannot use getInstance() with a sealed constructor.");if(a.instance_&&a.hasOwnProperty("instance_"))return a.instance_;Hg.push(a);var b=new a;a.instance_=b;y(a.hasOwnProperty("instance_"),"Could not instantiate singleton.");return b};var Jg=function(){};Jg.prototype.send=function(){return Gf()};var Kg=function(a){this.filters_=[];this.delegate_=a};Kg.prototype.addFilter=function(a){if("function"!==typeof a)throw Error("Invalid filter. Must be a function.");this.filters_.push(a)};Kg.prototype.send=function(a,b){if(0==this.filters_.length)return this.delegate_.send(a,b);var c=new Lg(a,b);return Bf(Mg(this,0,c),function(){if(!c.canceled_)return this.delegate_.send(a,b)},this)};
var Mg=function(a,b,c){return Bf(Bf(Gf(),function(){return this.filters_[b](c)},a),function(){if(++b<this.filters_.length&&!c.canceled_)return Mg(this,b,c)},a)},Lg=function(a,b){this.type_=a;this.parameters_=b;this.canceled_=!1};Lg.prototype.getParameters=function(){return this.parameters_};Lg.prototype.cancel=function(){this.canceled_=!0};function Ng(a){this.destination_=a}Ng.prototype.send=function(a,b){this.destination_.push({hitType:a,parameters:b});return Gf()};var Pg=function(a,b){var c=Ig(Jg);this.settings_=a;this.diverted_=[];this.channels_={enabled:new Ng(this.diverted_),disabled:c};this.channel_=this.channels_.enabled;Af(Og(this.settings_),Da(this.onSettingsReady_,b),this.onSettingsLoadFailed_,this)};
Pg.prototype.onSettingsReady_=function(a){if(null===this.diverted_)throw Error("Channel setup already completed.");this.channels_.enabled=a();Qg(this);Ua(this.diverted_,function(b){this.send(b.hitType,b.parameters)},this);this.diverted_=null;Rg(this.settings_,u(this.onSettingsChanged_,this))};Pg.prototype.onSettingsLoadFailed_=function(){if(null===this.diverted_)throw Error("Channel setup already completed.");this.channel_=this.channels_.enabled=this.channels_.disabled;this.diverted_=null};
Pg.prototype.send=function(a,b){return this.channel_.send(a,b)};var Qg=function(a){a.channel_=Sg(a.settings_)?a.channels_.enabled:a.channels_.disabled};Pg.prototype.onSettingsChanged_=function(a){switch(a){case "analytics.tracking-permitted":Qg(this)}};var Tg=function(a,b){this.bufferedFilters_=[];var c=u(function(){this.filterChannel_=new Kg(b.getChannel());Ua(this.bufferedFilters_,function(d){this.filterChannel_.addFilter(d)},this);this.bufferedFilters_=null;return this.filterChannel_},this);this.channel_=new Pg(a,c)};Tg.prototype.getChannel=function(){return this.channel_};Tg.prototype.addFilter=function(a){this.filterChannel_?this.filterChannel_.addFilter(a):this.bufferedFilters_.push(a)};
var Eg=function(a,b){this.settings_=a;this.sharedChannelProvider_=b};Eg.prototype.create=function(){return new Tg(this.settings_,this.sharedChannelProvider_)};function Ug(){for(var a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".split(""),b=0,c=a.length;b<c;b++)switch(a[b]){case "x":a[b]=Math.floor(16*Math.random()).toString(16);break;case "y":a[b]=(Math.floor(4*Math.random())+8).toString(16)}return a.join("")};var Vg=function(a,b,c,d,e,g){J.call(this,e,g);this.list_=a;this.deferredResults_=[];this.fireOnOneCallback_=!!b;this.fireOnOneErrback_=!!c;this.consumeErrors_=!!d;for(b=this.numFinished_=0;b<a.length;b++)Af(a[b],u(this.handleCallback_,this,b,!0),u(this.handleCallback_,this,b,!1));0!=a.length||this.fireOnOneCallback_||this.callback(this.deferredResults_)};x(Vg,J);
Vg.prototype.handleCallback_=function(a,b,c){this.numFinished_++;this.deferredResults_[a]=[b,c];this.fired_||(this.fireOnOneCallback_&&b?this.callback([a,c]):this.fireOnOneErrback_&&!b?this.errback(c):this.numFinished_==this.list_.length&&this.callback(this.deferredResults_));this.consumeErrors_&&!b&&(c=null);return c};Vg.prototype.errback=function(a){Vg.superClass_.errback.call(this,a);for(a=0;a<this.list_.length;a++)this.list_[a].cancel()};
var Wg=function(a){return Bf(new Vg(a,!1,!0),function(b){for(var c=[],d=0;d<b.length;d++)c[d]=b[d][1];return c})};var Yg=function(){this.storage_=new Nf;this.sampleRate_=100;this.changeListeners_=[];this.permitted_=this.userId_=null;this.ready_=Xg(this);Bf(this.ready_,function(){this.storageListenerKey_=Mc(this.storage_,"a",u(this.handleStorageChanged_,this))},this)},Xg=function(a){return Bf(Zg(a),function(){return this},a)},Zg=function(a){return Wg([$g(a),ah(a)])},Og=function(a){var b=new J;Af(a.ready_,b.callback,b.errback,b);return b};
Yg.prototype.handleStorageChanged_=function(){bh(this);var a=ch(this),b=Sg(this);Bf(Zg(this),function(){a!=ch(this)&&dh(this,"analytics.user-id");b!=Sg(this)&&dh(this,"analytics.tracking-permitted")},this)};
var Rg=function(a,b){bh(a);a.changeListeners_.push(b)},Sg=function(a){bh(a);if(a=a.permitted_)a=q._gaUserPrefs,a=!(a&&a.ioo&&a.ioo());return a},$g=function(a){return Bf(a.storage_.get("analytics.tracking-permitted"),function(b){this.permitted_=!0;if(void 0!==b)switch(b){case "true":this.permitted_=!0;break;case "false":this.permitted_=!1}},a)},ch=function(a){bh(a);if("string"!==typeof a.userId_)throw Error("Invalid state. UserID is not a string.");return a.userId_},ah=function(a){return Bf(a.storage_.get("analytics.user-id"),
function(b){void 0!==b?this.userId_=b:eh(this)},a)},eh=function(a){a.userId_=Ug();Bf(a.storage_.set("analytics.user-id",a.userId_),function(){dh(this,"analytics.user-id")},a)},fh=function(a){bh(a);return a.sampleRate_},dh=function(a,b){Ua(a.changeListeners_,function(c){c(b)})};Yg.prototype.dispose=function(){null!=this.storageListenerKey_&&Uc(this.storageListenerKey_)};var bh=function(a){if(!Og(a).fired_)throw Error("Settings object accessed prior to entering ready state.");};var gh=function(a,b){this.settings_=a;this.delegate_=b};gh.prototype.send=function(a,b){b.set(ig,ch(this.settings_));return this.delegate_.send(a,b)};var hh=function(a){this.delegate_=a};hh.prototype.send=function(a,b){ih(b);jh(b);return this.delegate_.send(a,b)};var ih=function(a){Ag(a,function(b,c){void 0!==b.maxLength&&"text"==b.valueType&&0<b.maxLength&&c.length>b.maxLength&&a.set(b,c.substring(0,b.maxLength))})},jh=function(a){Ag(a,function(b,c){void 0!==b.defaultValue&&c==b.defaultValue&&a.remove(b)})};var Hf={status:"device-offline",details:void 0},kh={status:"rate-limited",details:void 0},lh={status:"sampled-out",details:void 0},mh={status:"sent",details:void 0};var nh=function(a,b){this.tokens_=a;this.delegate_=b};nh.prototype.send=function(a,b){var c=this.tokens_;var d=c.timeSource_(),e=Math.floor((d-c.lastFilled_)*c.fillRate_);0<e&&(c.availableTokens_=Math.min(c.availableTokens_+e,c.maxTokens_),c.lastFilled_=d);1>c.availableTokens_?c=!1:(--c.availableTokens_,c=!0);return c||"item"==a||"transaction"==a?this.delegate_.send(a,b):Gf(kh)};function oh(){y(!0);y(!0);y(!0);this.availableTokens_=60;this.maxTokens_=500;this.fillRate_=5E-4;this.timeSource_=function(){return(new Date).getTime()};this.lastFilled_=this.timeSource_()};var ph=function(a,b){this.settings_=a;this.delegate_=b};ph.prototype.send=function(a,b){var c=b.get(ig);c=parseInt(c.split("-")[1],16);if("timing"!=a)var d=fh(this.settings_);else(d=b.get(lg))&&b.remove(lg),d=d||fh(this.settings_);return c<655.36*d?this.delegate_.send(a,b):Gf(lh)};var qh=function(a){try{return q.JSON.parse(a)}catch(b){}a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);};var rh=function(a,b){this.name=a;this.value=b};rh.prototype.toString=function(){return this.name};var sh=new rh("OFF",Infinity),th=new rh("SEVERE",1E3),uh=new rh("WARNING",900),vh=new rh("CONFIG",700),wh=new rh("FINE",500),xh=function(){this.capacity_=0;this.clear()},yh;xh.prototype.clear=function(){this.buffer_=Array(this.capacity_);this.curIndex_=-1;this.isFull_=!1};var zh=function(a,b,c){this.reset(a||sh,b,c,void 0,void 0)};zh.prototype.reset=function(a,b){this.msg_=b};
zh.prototype.getMessage=function(){return this.msg_};var Ah=function(a,b){this.level=null;this.handlers=[];this.parent=(void 0===b?null:b)||null;this.children=[];this.logger={getName:function(){return a}}},Bh=function(a){if(a.level)return a.level;if(a.parent)return Bh(a.parent);Ka("Root logger has no level set.");return sh};Ah.prototype.publish=function(a){for(var b=this;b;)b.handlers.forEach(function(c){c(a)}),b=b.parent};
var Ch=function(){this.entries={};var a=new Ah("");a.level=vh;this.entries[""]=a},Dh,Eh=function(a,b){var c=a.entries[b];if(c)return c;c=Eh(a,b.slice(0,Math.max(b.lastIndexOf("."),0)));var d=new Ah(b,c);a.entries[b]=d;c.children.push(d);return d},Fh=function(){Dh||(Dh=new Ch);return Dh},Gh=function(a,b,c){var d;if(d=a)if(d=a&&b){d=b.value;var e=a?Bh(Eh(Fh(),a.getName())):sh;d=d>=e.value}if(d){b=b||sh;d=Eh(Fh(),a.getName());"function"===typeof c&&(c=c());yh||(yh=new xh);e=yh;a=a.getName();if(0<e.capacity_){var g=
(e.curIndex_+1)%e.capacity_;e.curIndex_=g;e.isFull_?(e=e.buffer_[g],e.reset(b,c,a),a=e):(e.isFull_=g==e.capacity_-1,a=e.buffer_[g]=new zh(b,c,a))}else a=new zh(b,c,a);d.publish(a)}},Hh=function(a,b){a&&Gh(a,th,b)},Ih=function(a,b){a&&Gh(a,wh,b)};var Jh=function(){};Jh.prototype.cachedOptions_=null;var Lh=function(a){var b;(b=a.cachedOptions_)||(b={},Kh(a)&&(b[0]=!0,b[1]=!0),b=a.cachedOptions_=b);return b};var Mh,Nh=function(){};x(Nh,Jh);var Oh=function(a){return(a=Kh(a))?new ActiveXObject(a):new XMLHttpRequest},Kh=function(a){if(!a.ieProgId_&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.ieProgId_=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.ieProgId_};
Mh=new Nh;var Ph=function(a,b){K.call(this);this.interval_=a||1;this.timerObject_=b||q;this.boundTick_=u(this.tick_,this);this.last_=Date.now()};x(Ph,K);f=Ph.prototype;f.enabled=!1;f.timer_=null;f.setInterval=function(a){this.interval_=a;this.timer_&&this.enabled?(this.stop(),this.start()):this.timer_&&this.stop()};
f.tick_=function(){if(this.enabled){var a=Date.now()-this.last_;0<a&&a<.8*this.interval_?this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_-a):(this.timer_&&(this.timerObject_.clearTimeout(this.timer_),this.timer_=null),this.dispatchEvent("tick"),this.enabled&&(this.stop(),this.start()))}};f.start=function(){this.enabled=!0;this.timer_||(this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_),this.last_=Date.now())};
f.stop=function(){this.enabled=!1;this.timer_&&(this.timerObject_.clearTimeout(this.timer_),this.timer_=null)};f.disposeInternal=function(){Ph.superClass_.disposeInternal.call(this);this.stop();delete this.timerObject_};var Qh=function(a,b,c){if("function"===typeof a)c&&(a=u(a,c));else if(a&&"function"==typeof a.handleEvent)a=u(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:q.setTimeout(a,b||0)};var Rh=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$"),Sh=function(a,b){if(a){a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),e=null;if(0<=d){var g=a[c].substring(0,d);e=a[c].substring(d+1)}else g=a[c];b(g,e?decodeURIComponent(e.replace(/\+/g," ")):"")}}};var Th=function(a){K.call(this);this.headers=new Map;this.xmlHttpFactory_=a||null;this.active_=!1;this.xhrOptions_=this.xhr_=null;this.lastError_=this.lastMethod_=this.lastUri_="";this.inAbort_=this.inOpen_=this.inSend_=this.errorDispatched_=!1;this.timeoutInterval_=0;this.timeoutId_=null;this.responseType_="";this.useXhr2Timeout_=this.progressEventsEnabled_=this.withCredentials_=!1;this.trustToken_=null};x(Th,K);Th.prototype.logger_=Eh(Fh(),"goog.net.XhrIo").logger;
var Uh=/^https?$/i,Vh=["POST","PUT"],Wh=[],Xh=function(a,b,c,d){var e=new Th;Wh.push(e);b&&e.listen("complete",b);e.listenOnce("ready",e.cleanupSend_);e.send(a,c,d,void 0)};Th.prototype.cleanupSend_=function(){this.dispose();bb(Wh,this)};Th.prototype.setTrustToken=function(a){this.trustToken_=a};
Th.prototype.send=function(a,b,c,d){if(this.xhr_)throw Error("[goog.net.XhrIo] Object is active with another request="+this.lastUri_+"; newUri="+a);b=b?b.toUpperCase():"GET";this.lastUri_=a;this.lastError_="";this.lastMethod_=b;this.errorDispatched_=!1;this.active_=!0;this.xhr_=this.xmlHttpFactory_?Oh(this.xmlHttpFactory_):Oh(Mh);this.xhrOptions_=this.xmlHttpFactory_?Lh(this.xmlHttpFactory_):Lh(Mh);this.xhr_.onreadystatechange=u(this.onReadyStateChange_,this);this.progressEventsEnabled_&&"onprogress"in
this.xhr_&&(this.xhr_.onprogress=u(function(h){this.onProgressHandler_(h,!0)},this),this.xhr_.upload&&(this.xhr_.upload.onprogress=u(this.onProgressHandler_,this)));try{Ih(this.logger_,Yh(this,"Opening Xhr")),this.inOpen_=!0,this.xhr_.open(b,String(a),!0),this.inOpen_=!1}catch(h){Ih(this.logger_,Yh(this,"Error opening Xhr: "+h.message));this.error_(5,h);return}a=c||"";c=new Map(this.headers);if(d)if(Object.getPrototypeOf(d)===Object.prototype)for(var e in d)c.set(e,d[e]);else if("function"===typeof d.keys&&
"function"===typeof d.get){e=ia(d.keys());for(var g=e.next();!g.done;g=e.next())g=g.value,c.set(g,d.get(g))}else throw Error("Unknown input type for opt_headers: "+String(d));d=Array.from(c.keys()).find(function(h){return"content-type"==h.toLowerCase()});e=q.FormData&&a instanceof q.FormData;!$a(Vh,b)||d||e||c.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");b=ia(c);for(d=b.next();!d.done;d=b.next())c=ia(d.value),d=c.next().value,c=c.next().value,this.xhr_.setRequestHeader(d,
c);this.responseType_&&(this.xhr_.responseType=this.responseType_);"withCredentials"in this.xhr_&&this.xhr_.withCredentials!==this.withCredentials_&&(this.xhr_.withCredentials=this.withCredentials_);if("setTrustToken"in this.xhr_&&this.trustToken_)try{this.xhr_.setTrustToken(this.trustToken_)}catch(h){Ih(this.logger_,Yh(this,"Error SetTrustToken: "+h.message))}try{Zh(this),0<this.timeoutInterval_&&(this.useXhr2Timeout_=$h(this.xhr_),Ih(this.logger_,Yh(this,"Will abort after "+this.timeoutInterval_+
"ms if incomplete, xhr2 "+this.useXhr2Timeout_)),this.useXhr2Timeout_?(this.xhr_.timeout=this.timeoutInterval_,this.xhr_.ontimeout=u(this.timeout_,this)):this.timeoutId_=Qh(this.timeout_,this.timeoutInterval_,this)),Ih(this.logger_,Yh(this,"Sending request")),this.inSend_=!0,this.xhr_.send(a),this.inSend_=!1}catch(h){Ih(this.logger_,Yh(this,"Send error: "+h.message)),this.error_(5,h)}};var $h=function(a){return E&&gc(9)&&"number"===typeof a.timeout&&void 0!==a.ontimeout};
Th.prototype.timeout_=function(){"undefined"!=typeof ua&&this.xhr_&&(this.lastError_="Timed out after "+this.timeoutInterval_+"ms, aborting",Ih(this.logger_,Yh(this,this.lastError_)),this.dispatchEvent("timeout"),this.abort(8))};Th.prototype.error_=function(a,b){this.active_=!1;this.xhr_&&(this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1);this.lastError_=b;ai(this);bi(this)};var ai=function(a){a.errorDispatched_||(a.errorDispatched_=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
Th.prototype.abort=function(){this.xhr_&&this.active_&&(Ih(this.logger_,Yh(this,"Aborting")),this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),bi(this))};Th.prototype.disposeInternal=function(){this.xhr_&&(this.active_&&(this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1),bi(this,!0));Th.superClass_.disposeInternal.call(this)};
Th.prototype.onReadyStateChange_=function(){if(!this.disposed_)if(this.inOpen_||this.inSend_||this.inAbort_)ci(this);else this.onReadyStateChangeEntryPoint_()};Th.prototype.onReadyStateChangeEntryPoint_=function(){ci(this)};
var ci=function(a){if(a.active_&&"undefined"!=typeof ua)if(a.xhrOptions_[1]&&4==di(a)&&2==ei(a))Ih(a.logger_,Yh(a,"Local request error detected and ignored"));else if(a.inSend_&&4==di(a))Qh(a.onReadyStateChange_,0,a);else if(a.dispatchEvent("readystatechange"),4==di(a)){Ih(a.logger_,Yh(a,"Request complete"));a.active_=!1;try{var b=ei(a);a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var g=String(a.lastUri_).match(Rh)[1]||
null;!g&&q.self&&q.self.location&&(g=q.self.location.protocol.slice(0,-1));e=!Uh.test(g?g.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{try{var h=2<di(a)?a.xhr_.statusText:""}catch(k){Ih(a.logger_,"Can not get status: "+k.message),h=""}a.lastError_=h+" ["+ei(a)+"]";ai(a)}}finally{bi(a)}}};
Th.prototype.onProgressHandler_=function(a,b){y("progress"===a.type,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(fi(a,"progress"));this.dispatchEvent(fi(a,b?"downloadprogress":"uploadprogress"))};
var fi=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},bi=function(a,b){if(a.xhr_){Zh(a);var c=a.xhr_,d=a.xhrOptions_[0]?function(){}:null;a.xhr_=null;a.xhrOptions_=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){Hh(a.logger_,"Problem encountered resetting onreadystatechange: "+e.message)}}},Zh=function(a){a.xhr_&&a.useXhr2Timeout_&&(a.xhr_.ontimeout=null);a.timeoutId_&&(q.clearTimeout(a.timeoutId_),a.timeoutId_=null)};
Th.prototype.isActive=function(){return!!this.xhr_};var di=function(a){return a.xhr_?a.xhr_.readyState:0},ei=function(a){try{return 2<di(a)?a.xhr_.status:-1}catch(b){return-1}},gi=function(a){try{return a.xhr_?a.xhr_.responseText:""}catch(b){return Ih(a.logger_,"Can not get responseText: "+b.message),""}};Th.prototype.getResponseHeader=function(a){if(this.xhr_&&4==di(this))return a=this.xhr_.getResponseHeader(a),null===a?void 0:a};
Th.prototype.getAllResponseHeaders=function(){return this.xhr_&&2<=di(this)?this.xhr_.getAllResponseHeaders()||"":""};var Yh=function(a,b){return b+" ["+a.lastMethod_+" "+a.lastUri_+" "+ei(a)+"]"};var ii=function(a,b){var c=Array.prototype.slice.call(arguments),d=c.shift();if("undefined"==typeof d)throw Error("[goog.string.format] Template required");return d.replace(/%([0\- \+]*)(\d+)?(\.(\d+))?([%sfdiu])/g,function(e,g,h,k,l,m,p,r){if("%"==m)return"%";var w=c.shift();if("undefined"==typeof w)throw Error("[goog.string.format] Not enough arguments");arguments[0]=w;return hi[m].apply(null,arguments)})},hi={s:function(a,b,c){return isNaN(c)||""==c||a.length>=Number(c)?a:a=-1<b.indexOf("-",0)?
a+fe(" ",Number(c)-a.length):fe(" ",Number(c)-a.length)+a},f:function(a,b,c,d,e){d=a.toString();isNaN(e)||""==e||(d=parseFloat(a).toFixed(e));var g=0>Number(a)?"-":0<=b.indexOf("+")?"+":0<=b.indexOf(" ")?" ":"";0<=Number(a)&&(d=g+d);if(isNaN(c)||d.length>=Number(c))return d;d=isNaN(e)?Math.abs(Number(a)).toString():Math.abs(Number(a)).toFixed(e);a=Number(c)-d.length-g.length;return d=0<=b.indexOf("-",0)?g+d+fe(" ",a):g+fe(0<=b.indexOf("0",0)?"0":" ",a)+d},d:function(a,b,c,d,e,g,h,k){return hi.f(parseInt(a,
10),b,c,d,0,g,h,k)}};hi.i=hi.d;hi.u=hi.d;var ji=function(a){this.domain_=this.userInfo_=this.scheme_="";this.port_=null;this.fragment_=this.path_="";this.ignoreCase_=this.isReadOnly_=!1;if(a instanceof ji){this.ignoreCase_=a.ignoreCase_;ki(this,a.scheme_);var b=a.userInfo_;L(this);this.userInfo_=b;b=a.domain_;L(this);this.domain_=b;li(this,a.port_);b=a.path_;L(this);this.path_=b;mi(this,a.queryData_.clone());a=a.fragment_;L(this);this.fragment_=a}else a&&(b=String(a).match(Rh))?(this.ignoreCase_=!1,ki(this,b[1]||"",!0),a=b[2]||"",L(this),
this.userInfo_=ni(a),a=b[3]||"",L(this),this.domain_=ni(a,!0),li(this,b[4]),a=b[5]||"",L(this),this.path_=ni(a,!0),mi(this,b[6]||"",!0),a=b[7]||"",L(this),this.fragment_=ni(a)):(this.ignoreCase_=!1,this.queryData_=new oi(null,this.ignoreCase_))};
ji.prototype.toString=function(){var a=[],b=this.scheme_;b&&a.push(pi(b,qi,!0),":");var c=this.domain_;if(c||"file"==b)a.push("//"),(b=this.userInfo_)&&a.push(pi(b,qi,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.port_,null!=c&&a.push(":",String(c));if(c=this.path_)this.domain_&&"/"!=c.charAt(0)&&a.push("/"),a.push(pi(c,"/"==c.charAt(0)?ri:si,!0));(c=this.queryData_.toString())&&a.push("?",c);(c=this.fragment_)&&a.push("#",pi(c,ti));return a.join("")};
ji.prototype.resolve=function(a){var b=this.clone(),c=!!a.scheme_;c?ki(b,a.scheme_):c=!!a.userInfo_;if(c){var d=a.userInfo_;L(b);b.userInfo_=d}else c=!!a.domain_;c?(d=a.domain_,L(b),b.domain_=d):c=null!=a.port_;d=a.path_;if(c)li(b,a.port_);else if(c=!!a.path_){if("/"!=d.charAt(0))if(this.domain_&&!this.path_)d="/"+d;else{var e=b.path_.lastIndexOf("/");-1!=e&&(d=b.path_.slice(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(zb(e,"./")||zb(e,"/.")){d=0==e.lastIndexOf("/",0);e=e.split("/");for(var g=[],
h=0;h<e.length;){var k=e[h++];"."==k?d&&h==e.length&&g.push(""):".."==k?((1<g.length||1==g.length&&""!=g[0])&&g.pop(),d&&h==e.length&&g.push("")):(g.push(k),d=!0)}d=g.join("/")}else d=e}c?(L(b),b.path_=d):c=""!==a.queryData_.toString();c?mi(b,a.queryData_.clone()):c=!!a.fragment_;c&&(a=a.fragment_,L(b),b.fragment_=a);return b};ji.prototype.clone=function(){return new ji(this)};
var ki=function(a,b,c){L(a);a.scheme_=c?ni(b,!0):b;a.scheme_&&(a.scheme_=a.scheme_.replace(/:$/,""))},li=function(a,b){L(a);if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.port_=b}else a.port_=null},mi=function(a,b,c){L(a);b instanceof oi?(a.queryData_=b,a.queryData_.setIgnoreCase(a.ignoreCase_)):(c||(b=pi(b,ui)),a.queryData_=new oi(b,a.ignoreCase_))};ji.prototype.getQuery=function(){return this.queryData_.toString()};
ji.prototype.removeParameter=function(a){L(this);this.queryData_.remove(a);return this};var L=function(a){if(a.isReadOnly_)throw Error("Tried to modify a read-only Uri");};ji.prototype.setIgnoreCase=function(a){this.ignoreCase_=a;this.queryData_&&this.queryData_.setIgnoreCase(a)};
var ni=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},pi=function(a,b,c){return"string"===typeof a?(a=encodeURI(a).replace(b,vi),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},vi=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},qi=/[#\/\?@]/g,si=/[#\?:]/g,ri=/[#\?]/g,ui=/[#\?@]/g,ti=/#/g,oi=function(a,b){this.count_=this.keyMap_=null;this.encodedQuery_=a||null;this.ignoreCase_=!!b},wi=function(a){a.keyMap_||(a.keyMap_=
new Map,a.count_=0,a.encodedQuery_&&Sh(a.encodedQuery_,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};f=oi.prototype;f.getCount=function(){wi(this);return this.count_};f.add=function(a,b){wi(this);this.encodedQuery_=null;a=xi(this,a);var c=this.keyMap_.get(a);c||this.keyMap_.set(a,c=[]);c.push(b);this.count_=La(this.count_)+1;return this};
f.remove=function(a){wi(this);a=xi(this,a);return this.keyMap_.has(a)?(this.encodedQuery_=null,this.count_=La(this.count_)-this.keyMap_.get(a).length,this.keyMap_.delete(a)):!1};f.clear=function(){this.keyMap_=this.encodedQuery_=null;this.count_=0};f.containsKey=function(a){wi(this);a=xi(this,a);return this.keyMap_.has(a)};f.containsValue=function(a){var b=this.getValues();return $a(b,a)};
f.forEach=function(a,b){wi(this);this.keyMap_.forEach(function(c,d){c.forEach(function(e){a.call(b,e,d,this)},this)},this)};f.getKeys=function(){wi(this);for(var a=Array.from(this.keyMap_.values()),b=Array.from(this.keyMap_.keys()),c=[],d=0;d<b.length;d++)for(var e=a[d],g=0;g<e.length;g++)c.push(b[d]);return c};
f.getValues=function(a){wi(this);var b=[];if("string"===typeof a)this.containsKey(a)&&(b=b.concat(this.keyMap_.get(xi(this,a))));else{a=Array.from(this.keyMap_.values());for(var c=0;c<a.length;c++)b=b.concat(a[c])}return b};f.set=function(a,b){wi(this);this.encodedQuery_=null;a=xi(this,a);this.containsKey(a)&&(this.count_=La(this.count_)-this.keyMap_.get(a).length);this.keyMap_.set(a,[b]);this.count_=La(this.count_)+1;return this};
f.get=function(a,b){if(!a)return b;a=this.getValues(a);return 0<a.length?String(a[0]):b};f.toString=function(){if(this.encodedQuery_)return this.encodedQuery_;if(!this.keyMap_)return"";for(var a=[],b=Array.from(this.keyMap_.keys()),c=0;c<b.length;c++){var d=b[c],e=encodeURIComponent(String(d));d=this.getValues(d);for(var g=0;g<d.length;g++){var h=e;""!==d[g]&&(h+="="+encodeURIComponent(String(d[g])));a.push(h)}}return this.encodedQuery_=a.join("&")};
f.clone=function(){var a=new oi;a.encodedQuery_=this.encodedQuery_;this.keyMap_&&(a.keyMap_=new Map(this.keyMap_),a.count_=this.count_);return a};var xi=function(a,b){b=String(b);a.ignoreCase_&&(b=b.toLowerCase());return b};
oi.prototype.setIgnoreCase=function(a){a&&!this.ignoreCase_&&(wi(this),this.encodedQuery_=null,this.keyMap_.forEach(function(b,c){var d=c.toLowerCase();c!=d&&(this.remove(c),this.remove(d),0<b.length&&(this.encodedQuery_=null,this.keyMap_.set(xi(this,d),cb(b)),this.count_=La(this.count_)+b.length))},this));this.ignoreCase_=a};oi.prototype.extend=function(a){for(var b=0;b<arguments.length;b++)xg(arguments[b],function(c,d){this.add(d,c)},this)};var yi=function(a,b){this.serverUrl_=a;this.maxPostLength_=b};yi.prototype.send=function(a,b){if(!navigator.onLine)return If();var c=new J;a=zi(a,b);a.length>this.maxPostLength_?c.errback({status:"payload-too-big",details:ii("Encoded hit length == %s, but should be <= %s.",a.length,this.maxPostLength_)}):Xh(this.serverUrl_,function(){c.callback(mh)},"POST",a);return c};var zi=function(a,b){var c=new oi;c.add(ag.name,a);Ag(b,function(d,e){c.add(d.name,e.toString())});return c.toString()};var Ai=function(a){C.call(this);this.handler_=a;this.keys_={}};x(Ai,C);var Bi=[];Ai.prototype.listen=function(a,b,c,d){Array.isArray(b)||(b&&(Bi[0]=b.toString()),b=Bi);for(var e=0;e<b.length;e++){var g=Mc(a,b[e],c||this.handleEvent,d||!1,this.handler_||this);if(!g)break;this.keys_[g.key]=g}return this};Ai.prototype.listenOnce=function(a,b,c,d){return Ci(this,a,b,c,d)};
var Ci=function(a,b,c,d,e,g){if(Array.isArray(c))for(var h=0;h<c.length;h++)Ci(a,b,c[h],d,e,g);else{b=Lc(b,c,d||a.handleEvent,e,g||a.handler_||a);if(!b)return a;a.keys_[b.key]=b}return a};
Ai.prototype.unlisten=function(a,b,c,d,e){if(Array.isArray(b))for(var g=0;g<b.length;g++)this.unlisten(a,b[g],c,d,e);else c=c||this.handleEvent,d=t(d)?!!d.capture:!!d,e=e||this.handler_||this,c=Nc(c),d=!!d,b=nc(a)?a.getListener(b,c,d,e):a?(a=Pc(a))?a.getListener(b,c,d,e):null:null,b&&(Uc(b),delete this.keys_[b.key]);return this};Ai.prototype.removeAll=function(){rc(this.keys_,function(a,b){this.keys_.hasOwnProperty(b)&&Uc(a)},this);this.keys_={}};
Ai.prototype.disposeInternal=function(){Ai.superClass_.disposeInternal.call(this);this.removeAll()};Ai.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var Di=function(){K.call(this);this.eventHandler_=new Ai(this);this.eventHandler_.listen(window,["online","offline"],this.handleChange_)};x(Di,K);Di.prototype.handleChange_=function(){this.dispatchEvent(navigator.onLine?"online":"offline")};Di.prototype.disposeInternal=function(){Di.superClass_.disposeInternal.call(this);this.eventHandler_.dispose();this.eventHandler_=null};var Fg=function(a){this.settings_=a;this.serverAddress_="https://www.google-analytics.com/collect";this.maxPostLength_=8192};Fg.prototype.getChannel=function(){if(!this.channel_){if(!Og(this.settings_).fired_)throw Error("Cannot construct shared channel prior to settings being ready.");new Di;var a=new hh(new yi(this.serverAddress_,this.maxPostLength_)),b=new oh;this.channel_=new gh(this.settings_,new ph(this.settings_,new nh(b,a)))}return this.channel_};var Ei=new Xf,Dg=function(){Jf||(Jf=new Yg);return Jf};var M={},Fi=function(){var a;if(!(a=this.analyticsService_)){a=Ei.get("cros_recovery_tool",null);var b=chrome.runtime.getManifest().version;null===a&&(a=new Gg(b),Ei.set("cros_recovery_tool",a))}this.analyticsService_=a;(a=this.tracker_)||(b=this.analyticsService_,a=new Bg(b.channelFactory_.create()),a.set(kg,b.libVersion_),a.set(fg,1),a.set(gg,b.appName_),a.set(hg,b.appVersion_),a.set(pg,"UA-51966559-1"),(b=navigator.language||navigator.browserLanguage)&&a.set(jg,b),(b=screen.colorDepth+"-bit")&&
a.set(mg,b),(b=[screen.width,screen.height].join("x"))&&a.set(og,b),b=re(window),(b=[b.width,b.height].join("x"))&&a.set(qg,b));this.tracker_=a;chrome.metricsPrivate&&chrome.metricsPrivate.getIsCrashReportingEnabled?chrome.metricsPrivate.getIsCrashReportingEnabled(this.initAnalytics_):this.initAnalytics_(!1)};
Fi.prototype.initAnalytics_=function(a){this.analyticsService_&&Bf(Og(this.analyticsService_.settings_),function(b){bh(b);var c=b.permitted_!=a;b.permitted_=a;b.storage_.set("analytics.tracking-permitted",a.toString());c&&dh(b,"analytics.tracking-permitted")})};Fi.prototype.sendTiming=function(a,b){this.tracker_.sendTiming("recovery_timing",a,b)};M.GoogleAnalytics=Fi;var Gi=function(a){this.map_=new Xf;this.size=0;a&&this.addAll(a)},Hi=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+Aa(a):b.slice(0,1)+a};f=Gi.prototype;f.getCount=function(){return this.map_.size};f.add=function(a){this.map_.set(Hi(a),a);this.setSizeInternal_(this.map_.size)};f.addAll=function(a){a=vg(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c]);this.setSizeInternal_(this.map_.size)};f.removeAll=function(a){a=vg(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c]);this.setSizeInternal_(this.map_.size)};
f.delete=function(a){a=this.map_.remove(Hi(a));this.setSizeInternal_(this.map_.size);return a};f.remove=function(a){return this.delete(a)};f.clear=function(){this.map_.clear();this.setSizeInternal_(0)};f.has=function(a){return this.map_.containsKey(Hi(a))};f.contains=function(a){return this.map_.containsKey(Hi(a))};f.intersection=function(a){var b=new Gi;a=vg(a);for(var c=0;c<a.length;c++){var d=a[c];this.contains(d)&&b.add(d)}};f.getValues=function(){return this.map_.getValues()};f.values=function(){return this.map_.values()};
f.clone=function(){return new Gi(this)};f.equals=function(a){return this.getCount()==ug(a)&&Ii(this,a)};var Ii=function(a,b){var c=ug(b);if(a.getCount()>c)return!1;!(b instanceof Gi)&&5<c&&(b=new Gi(b));return yg(a,function(d){var e=b;return e.contains&&"function"==typeof e.contains?e.contains(d):e.containsValue&&"function"==typeof e.containsValue?e.containsValue(d):xa(e)||"string"===typeof e?$a(e,d):vc(e,d)})};Gi.prototype.__iterator__=function(){return this.map_.__iterator__(!1)};
Gi.prototype[Symbol.iterator]=function(){return this.values()};Gi.prototype.setSizeInternal_=function(a){this.size=a};M.AppConfig={};M.Capabilities={};M.DeviceInfo={};M.DeviceInfoChromebook={};M.DeviceInfoDummy={};M.DeviceInfoLocal={};M.RawDeviceInfo={};M.RecoveryImage={};M.RecoveryChannel={STABLE:"RECOVERY_CHANNEL_STABLE",BETA:"RECOVERY_CHANNEL_BETA",DEV:"RECOVERY_CHANNEL_DEV",LTS:"RECOVERY_CHANNEL_LTS",LTC:"RECOVERY_CHANNEL_LTC"};M.Platform={LINUX:"Linux",CHROMEOS:"CrOS",MAC:"Mac",WIN:"Windows",OTHER:"Unknown Platform"};
M.Stage={UNKNOWN:"unknown",DOWNLOAD:"download",VERIFY_DOWNLOAD:"verifyDownload",UNZIP:"unzip",WRITE:"write",VERIFY_WRITE:"verifyWrite",COMPLETE:"complete"};M.Runtime={CHROME_APP:"chromeApp",EXTENSION:"extension"};M.ImageWriterPrivateStub=function(){this.onDeviceAttached=new M.ChromeEventStub;this.onDeviceRemoved=new M.ChromeEventStub;this.onWriteProgress=new M.ChromeEventStub;this.onWriteComplete=new M.ChromeEventStub;this.onWriteError=new M.ChromeEventStub;this.firstDrive_=0;this.numExposedDrives=2;this.progressIntervalId_=null;this.progressStage_=M.Stage.UNKNOWN;this.progressPercent_=0;this.stagesRemaining_=[];this.failOnStage_=this.writeDrive_=null;this.failOnPercent_=0;this.failureErrorMessage_="TESTING"};
f=M.ImageWriterPrivateStub.prototype;f.listRemovableStorageDevices=function(a){for(var b=[],c=0;c<this.numExposedDrives;c++)b.push(Ac(M.ImageWriterPrivateStub.DRIVES_[(this.firstDrive_+c)%M.ImageWriterPrivateStub.DRIVES_.length]));window.setTimeout(function(){a(b)},M.ImageWriterPrivateStub.CALLBACK_DELAY_MS_)};
f.writeFromUrl=function(a,b,c,d){this.writeDrive_||(this.writeDrive_=a,this.stagesRemaining_=[M.Stage.DOWNLOAD,M.Stage.VERIFY_DOWNLOAD,M.Stage.UNZIP,M.Stage.WRITE,M.Stage.VERIFY_WRITE,M.Stage.COMPLETE],this.progressIntervalId_=window.setInterval(u(this.makeProgress_,this),M.ImageWriterPrivateStub.PROGRESS_UPDATE_DELAY_MS_),window.setTimeout(d,M.ImageWriterPrivateStub.CALLBACK_DELAY_MS_))};
f.writeFromFile=function(a,b,c){this.writeDrive_||(this.writeDrive_=a,this.stagesRemaining_=[M.Stage.WRITE,M.Stage.VERIFY_WRITE,M.Stage.COMPLETE],this.progressIntervalId_=window.setInterval(u(this.makeProgress_,this),M.ImageWriterPrivateStub.PROGRESS_UPDATE_DELAY_MS_),window.setTimeout(c,M.ImageWriterPrivateStub.CALLBACK_DELAY_MS_))};f.cancelWrite=function(a){Ji(this);window.setTimeout(a,M.ImageWriterPrivateStub.CALLBACK_DELAY_MS_)};
f.destroyPartitions=function(a,b){this.writeDrive_||(this.writeDrive_=a,this.stagesRemaining_=[M.Stage.WRITE,M.Stage.COMPLETE],this.progressIntervalId_=window.setInterval(u(this.makeProgress_,this),M.ImageWriterPrivateStub.PROGRESS_UPDATE_DELAY_MS_),window.setTimeout(b,M.ImageWriterPrivateStub.CALLBACK_DELAY_MS_))};
var Ki=function(a){return{stage:a.progressStage_,percentComplete:a.progressPercent_}},Ji=function(a){window.clearInterval(a.progressIntervalId_);a.writeDrive_=null;a.progressStage_=M.Stage.UNKNOWN;a.progressPercent_=0;a.stagesRemaining_=[]};
M.ImageWriterPrivateStub.prototype.makeProgress_=function(){this.progressStage_==M.Stage.UNKNOWN&&(this.progressStage_=this.stagesRemaining_.shift(),this.progressPercent_=0);this.progressStage_==M.Stage.COMPLETE?(this.onWriteComplete.trigger(Ki(this)),Ji(this)):this.failOnStage_==this.progressStage_&&this.progressPercent_>=this.failOnPercent_?(this.onWriteError.trigger(Ki(this),this.failureErrorMessage_),Ji(this)):(this.onWriteProgress.trigger(Ki(this)),this.progressPercent_+=M.ImageWriterPrivateStub.PROGRESS_UPDATE_STEP_,
100<this.progressPercent_&&(this.progressStage_=this.stagesRemaining_.shift(),this.progressPercent_=0))};M.ImageWriterPrivateStub.CALLBACK_DELAY_MS_=10;M.ImageWriterPrivateStub.DRIVE_ROTATION_DELAY_MS_=1E4;M.ImageWriterPrivateStub.PROGRESS_UPDATE_DELAY_MS_=50;M.ImageWriterPrivateStub.PROGRESS_UPDATE_STEP_=10;
M.ImageWriterPrivateStub.DRIVES_=[{capacity:7803174912,model:"DataTraveler 2.0",storageUnitId:"/dev/sdb",vendor:"Kingston"},{capacity:3901587456,model:"Cruzer",storageUnitId:"/dev/sdc",vendor:"SanDisk"},{capacity:3901587456,model:"Store 'n' Go",storageUnitId:"/dev/sdd",vendor:"Verbatim"},{capacity:215606349824,model:"Extreme",storageUnitId:"/dev/sde",vendor:"SanDisk"}];M.ChromeEventStub=function(){this.listeners_=[]};f=M.ChromeEventStub.prototype;
f.trigger=function(a){var b=arguments;this.listeners_.forEach(function(c){c.apply(void 0,b)})};f.addListener=function(a){this.listeners_.push(a)};f.removeListener=function(a){bb(this.listeners_,a)};f.hasListener=function(a){return 0<=this.listeners_.indexOf(a)};f.hasListeners=function(){return 0<this.listeners_.length};M.logger=Eh(Fh(),"recovery").logger;M.recoveryChannelOrder={};M.recoveryChannelOrder[M.RecoveryChannel.STABLE]=0;M.recoveryChannelOrder[M.RecoveryChannel.BETA]=1;M.recoveryChannelOrder[M.RecoveryChannel.DEV]=2;M.recoveryChannelOrder[M.RecoveryChannel.LTS]=3;M.recoveryChannelOrder[M.RecoveryChannel.LTC]=4;M.installImageWriterStub=function(){chrome.imageWriterPrivate=new M.ImageWriterPrivateStub;var a=M.logger;a&&Gh(a,uh,"You are using the ImageWriterPrivate stub API.")};
chrome.imageWriterPrivate||M.installImageWriterStub();
M.probeCapabilities=function(){for(var a=parseInt,b=1,c=Hb().split("."),d=[];0<b&&c.length;)d.push(c.shift()),b--;c.length&&d.push(c.join("."));a=a(d[0],10);isNaN(a)&&(a=0);b=M.Platform.OTHER;D("CrOS")?b=M.Platform.CHROMEOS:D("Linux")?b=M.Platform.LINUX:D("Macintosh")?b=M.Platform.MAC:D("Windows")&&(b=M.Platform.WIN);return{platform:b,writeImage:b==M.Platform.CHROMEOS||b==M.Platform.WIN||b==M.Platform.MAC&&37<=a,destroyPartitions:36<=a,saveAsDownload:!1,runtime:chrome.app&&chrome.app.window?M.Runtime.CHROME_APP:
M.Runtime.EXTENSION}};M.CAPABILITIES=M.probeCapabilities();var Li="OnHub"==window.appType||"?OnHub"==window.location.search,Mi="WorkspaceHardware"==window.appType||"?WorkspaceHardware"==window.location.search;console.log("App running in OnHub mode:"+Li);
M.appConfig=Li?{messageCatalogPostfix:"_ON_HUB",recovery_config_urls:[""],imageMap:{"OnHub TGR 1900":"img/devices/whirlwind.jpg","OnHub SRT-AC1900":"img/devices/arkham.jpg"},analyticsAppType:M.GoogleAnalytics.appType.ONHUB,allowPopulateUsingModelNumber:!1,sampleHwid:"WHIRLWIND A-C 1126",allowSelectByHwid:!1,selectByModelFirst:!0}:Mi?{messageCatalogPostfix:"_WORKSPACE_HARDWARE",recovery_config_urls:[""],
imageMap:{"Acer Chromebase 24":"img/devices/buddy.png","Meet Compute System - Series One":"img/devices/endeavour.png","Asus Meet Compute System":"img/devices/excelsior.png","CTL Meet Compute System":"img/devices/excelsior.png","ASUS Chromebox 3 (CN65)":"img/devices/teemo.png","CTL Chromebox CBx1":"img/devices/wukong.png","Acer Chromebase CA24I2":"img/devices/karma.png"},analyticsAppType:M.GoogleAnalytics.appType.WORKSPACE_HARDWARE,allowPopulateUsingModelNumber:!1,sampleHwid:"ENDEAVOUR A-C 1126",allowSelectByHwid:!0,
selectByModelFirst:!1}:{messageCatalogPostfix:"",recovery_config_urls:["",""],imageMap:{"Acer C7 Chromebook":"img/devices/parrot.jpg","Acer C7 Chromebook IVB":"img/devices/parrot.jpg","Acer AC700-1099 Wifi":"img/devices/zgb.jpg","Acer AC700-1529 3G":"img/devices/zgb.jpg","Acer C720 Chromebook":"img/devices/peppy.jpg","ASUS Chromebox":"img/devices/panther.jpg",
"Cr-48":"img/devices/mario.jpg","Dell Chromebook 11":"img/devices/wolf.jpg","Google Chromebook Pixel":"img/devices/link.jpg","HP Pavilion Chromebook 14":"img/devices/butterfly.jpg","HP Chromebook 14 q000-q099 / HP Chromebook 14-SMB Atheros":"img/devices/falco.jpg","HP Chromebook 14 q000-q099 WP2 / HP Chromebook 14-SMB Intel Corp":"img/devices/falco.jpg","HP Chromebook 11 1100-1199 / HP Chromebook 11 G1":"img/devices/spring.jpg","HP Chromebox CB1-(000-099) / HP Chromebox G1":"img/devices/zako.jpg",
"Lenovo Thinkpad X131e Chromebook":"img/devices/stout.jpg","Samsung Chromebook":"img/devices/snow.jpg","Samsung Chromebook Series 5 Non-US-Wifi":"img/devices/alex.jpg","Samsung Chromebook Series 5 Non-US 3G":"img/devices/alex.jpg","Samsung Chromebook Series 5 US-Wifi":"img/devices/alex.jpg","Samsung Chromebook Series 5 US-3G":"img/devices/alex.jpg","Samsung Chromebook Series 5 550":"img/devices/lumpy.jpg","Samsung Chromebox Series 3":"img/devices/stumpy.jpg","Toshiba Chromebook":"img/devices/leon.jpg"},
analyticsAppType:M.GoogleAnalytics.appType.CHROMEBOOK,allowPopulateUsingModelNumber:!0,sampleHwid:"LINK DALE A-C 1126",allowSelectByHwid:!0,selectByModelFirst:!1};v("recovery.appConfig",M.appConfig);M.DUMMY_DEVICE={name:"",photourl:"img/devices/unknown.png"};v("recovery.DUMMY_DEVICE",M.DUMMY_DEVICE);M.UNKNOWN_DEVICE_IMAGE="img/devices/unknown.png";v("recovery.UNKNOWN_DEVICE_IMAGE",M.UNKNOWN_DEVICE_IMAGE);M.RECOVERY_CONFIG_URLS=M.appConfig.recovery_config_urls;v("recovery.RECOVERY_CONFIG_URLS",M.RECOVERY_CONFIG_URLS);
M.devices=[];v("recovery.devices",M.devices);M.oems={};v("recovery.oems",M.oems);M.imageMap=M.appConfig.imageMap;v("recovery.imageMap",M.imageMap);M.getMatchingDevice=function(a){var b=M.devices.filter(function(c){return c.hwidMatchRegExp&&c.hwidMatchRegExp.test(a)});return 1==b.length?b[0]:null};M.isValidModelFamilyPrefix=function(a){for(var b=0;b<M.devices.length;b++)for(var c=M.devices[b].modelFamilies.getValues(),d=0;d<c.length;d++){var e=c[d];if(0==a.lastIndexOf(e,0)||0==e.lastIndexOf(a,0))return!0}return!1};
M.getDeviceAnalyticsModel=function(a){var b=null;a&&a.hwidMatchRegExp&&a.hwidMatchRegExp.source&&(a=/^\^?(\w+) .*/.exec(a.hwidMatchRegExp.source))&&1<a.length&&(b=a[1]);return b};M.controllers={};
var Qi=function(a){a.app=this;this.applyScope_=u(a.$apply,a);this.platform=M.CAPABILITIES.platform;this.writeParams={device:M.DUMMY_DEVICE,target:null,recoveryChannel:null,saveAsDownload:!1};this.sortedAvailableRecoveryChannels=[];this.userHwid="";this.writeErrorCode=this.selectedSku=this.selectedOem=null;this.writeCancelled=!1;this.enableAdvancedSettings=!0;this.step=null;this.allowLocalFile=this.allowErase=!0;this.userFeedbackFormFeatureEnabled=!1;this.online=navigator.onLine;this.ga=Ni(this);chrome.chromeosInfoPrivate&&
chrome.chromeosInfoPrivate.get(["hwid"],u(function(){this.applyScope_()},this));this.startTime=Date.now();M.CAPABILITIES.writeImage?this.online&&Oi(this):(Pi(this),this.step=null,Cg(this.ga.tracker_,M.GoogleAnalytics.pageView.UNSUPPORTED_PAGE))},Ni=function(a){var b=new M.GoogleAnalytics,c=chrome.runtime.getManifest().version;b.tracker_.set("dimension2",c);b.tracker_.set("dimension3",a.platform);a=window.navigator.appVersion.match(/Chrome\/([0-9.]*)/);b.tracker_.set("dimension1",a?a[1]:"n/a");b.tracker_.set("dimension12",
M.appConfig.analyticsAppType);Cg(b.tracker_,M.GoogleAnalytics.pageView.FIRST_PAGE);return b};Qi.prototype.reset=function(){this.writeParams={device:M.DUMMY_DEVICE,target:null,recoveryChannel:null,saveAsDownload:!1};this.userHwid="";this.selectedSku=this.selectedOem=null;Pi(this);this.step=null;this.enableAdvancedSettings=this.allowLocalFile=this.allowErase=!0;Cg(this.ga.tracker_,M.GoogleAnalytics.pageView.WELCOME_PAGE)};Qi.prototype.close=function(){window.close();chrome.imageWriterPrivate.cancelWrite(function(){})};
var Pi=function(a){a.writeErrorCode=null;a.writeCancelled=!1},Ri=function(a){a=a.sortedAvailableRecoveryChannels;if(0<a.length)return a[0];console.warn("No channels found. Unexpected since there are recovery images.");return null},Si=function(a){a.step=3;a.allowErase=!0;a.allowLocalFile=!0;Cg(a.ga.tracker_,M.GoogleAnalytics.pageView.WRITE_CONFIRM_PAGE)};Qi.prototype.writeImage=function(){Pi(this);this.step=3;this.allowLocalFile=this.allowErase=!1;Cg(this.ga.tracker_,M.GoogleAnalytics.pageView.WRITE_PAGE)};
var Ti=function(a){a.writeParams.device.recoveryImages&&(a.sortedAvailableRecoveryChannels=Object.keys(a.writeParams.device.recoveryImages).sort(function(b,c){return M.recoveryChannelOrder[b]-M.recoveryChannelOrder[c]}))};Qi.prototype.sendFeedback=function(){chrome.runtime.sendMessage("gfdkimpbcpahaombhbimeihdjnejgicl",{requestFeedback:!0,feedbackInfo:{categoryTag:"chromeos-recovery-tool",description:"",systemInformation:[{key:"appVersion",value:chrome.runtime.getManifest().version}]}})};
var Oi=function(a){M.RECOVERY_CONFIG_URLS.forEach(function(b){Xh(b,Qi.prototype.loadRecoveryJsonCallback_.bind(a))})},Ui=function(a){var b={};switch(a.channel){case "LTR":b.channel=M.RecoveryChannel.LTS;break;case "LTC":b.channel=M.RecoveryChannel.LTC;break;case "DEV":case "dev-channel":b.channel=M.RecoveryChannel.DEV;break;case "BETA":case "beta-channel":b.channel=M.RecoveryChannel.BETA;break;default:b.channel=M.RecoveryChannel.STABLE}b.file=a.file;b.filesize=a.filesize;b.zipfilesize=a.zipfilesize;
b.url=a.url;b.md5=a.md5;b.sha1=a.sha1;b.chromeOsVersion=a.version;b.chromeVersion=a.chrome_version;return b};
Qi.prototype.loadRecoveryJsonCallback_=function(a){a=a.target;if(200==ei(a)){try{var b=JSON.parse(gi(a))}catch(g){return}a={};b=ia(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c.hwidmatch)if(Object.keys(a).includes(c.hwidmatch)){var d=a[c.hwidmatch],e=Ui(c);Object.keys(d.recoveryImages).includes(c.channel)&&console.warn("Channel: "+e.channel+" has been previously encountered for "+c.hwidmatch+". Replacing.");d.recoveryImages[e.channel]=e}else d={},d.manufacturer=c.manufacturer.trim(),d.name=
c.name.trim(),d.model=c.model.trim(),d.desc=c.desc,d.hwidmatch=c.hwidmatch,d.photourl=c.photourl,d.recoveryImages={},c=Ui(c),d.recoveryImages[c.channel]=c,d.modelFamilies=new Gi,d.hwidMatchRegExp=new RegExp(d.hwidmatch),(c=/^\^(\w+)/.exec(d.hwidmatch))&&1<c.length?d.modelFamilies.add(c[1]):console.warn('match pattern does not begin with "^": '+d.hwidmatch),M.oems[d.manufacturer]=M.oems[d.manufacturer]||{},M.oems[d.manufacturer][d.name]=d,M.devices.push(d),a[d.hwidmatch]=d;else console.warn("No hwidmatch for "+
c.name+". Skipping");this.ga.sendTiming(M.GoogleAnalytics.timingVar.DOWNLOAD_RECOVERY_JSON,Date.now()-this.startTime);this.applyScope_()}};v("recovery.controllers.AppController",Qi);M.controllers.AppController=Qi;var Vi=function(){this.removeList_=[]};Vi.prototype.add=function(a,b){a.addListener(b);this.removeList_.push(function(){a.removeListener(b)})};Vi.prototype.removeAll=function(){this.removeList_.forEach(function(a){a()})};Vi.prototype.removeAll=Vi.prototype.removeAll;Vi.prototype.add=Vi.prototype.add;v("recovery.ListenerCollection",Vi);M.ListenerCollection=Vi;var Wi=function(){};Wi.prototype.reset=function(){};M.RateEstimator=Wi;var Xi={ACTIVEDESCENDANT:"activedescendant",ATOMIC:"atomic",AUTOCOMPLETE:"autocomplete",BUSY:"busy",CHECKED:"checked",COLINDEX:"colindex",CONTROLS:"controls",CURRENT:"current",DESCRIBEDBY:"describedby",DISABLED:"disabled",DROPEFFECT:"dropeffect",EXPANDED:"expanded",FLOWTO:"flowto",GRABBED:"grabbed",HASPOPUP:"haspopup",HIDDEN:"hidden",INVALID:"invalid",LABEL:"label",LABELLEDBY:"labelledby",LEVEL:"level",LIVE:"live",MULTILINE:"multiline",MULTISELECTABLE:"multiselectable",ORIENTATION:"orientation",OWNS:"owns",
POSINSET:"posinset",PRESSED:"pressed",READONLY:"readonly",RELEVANT:"relevant",REQUIRED:"required",ROWINDEX:"rowindex",SELECTED:"selected",SETSIZE:"setsize",SORT:"sort",VALUEMAX:"valuemax",VALUEMIN:"valuemin",VALUENOW:"valuenow",VALUETEXT:"valuetext"};var Yi;var Zi={ALERT:"alert",ALERTDIALOG:"alertdialog",APPLICATION:"application",ARTICLE:"article",BANNER:"banner",BUTTON:"button",CHECKBOX:"checkbox",COLUMNHEADER:"columnheader",COMBOBOX:"combobox",COMPLEMENTARY:"complementary",CONTENTINFO:"contentinfo",DEFINITION:"definition",DIALOG:"dialog",DIRECTORY:"directory",DOCUMENT:"document",FORM:"form",GRID:"grid",GRIDCELL:"gridcell",GROUP:"group",HEADING:"heading",IMG:"img",LINK:"link",LIST:"list",LISTBOX:"listbox",LISTITEM:"listitem",LOG:"log",MAIN:"main",MARQUEE:"marquee",
MATH:"math",MENU:"menu",MENUBAR:"menubar",MENU_ITEM:"menuitem",MENU_ITEM_CHECKBOX:"menuitemcheckbox",MENU_ITEM_RADIO:"menuitemradio",NAVIGATION:"navigation",NOTE:"note",OPTION:"option",PRESENTATION:"presentation",PROGRESSBAR:"progressbar",RADIO:"radio",RADIOGROUP:"radiogroup",REGION:"region",ROW:"row",ROWGROUP:"rowgroup",ROWHEADER:"rowheader",SCROLLBAR:"scrollbar",SEARCH:"search",SEPARATOR:"separator",SLIDER:"slider",SPINBUTTON:"spinbutton",STATUS:"status",TAB:"tab",TAB_LIST:"tablist",TAB_PANEL:"tabpanel",
TEXTBOX:"textbox",TEXTINFO:"textinfo",TIMER:"timer",TOOLBAR:"toolbar",TOOLTIP:"tooltip",TREE:"tree",TREEGRID:"treegrid",TREEITEM:"treeitem"};Ec("A AREA BUTTON HEAD INPUT LINK MENU META OPTGROUP OPTION PROGRESS STYLE SELECT SOURCE TEXTAREA TITLE TRACK".split(" "));
var $i="combobox grid group listbox menu menubar radiogroup row rowgroup tablist textbox toolbar tree treegrid".split(" "),aj=function(a,b){b?(y(vc(Zi,b),"No such ARIA role "+b),a.setAttribute("role",b)):a.removeAttribute("role")},N=function(a,b,c){Array.isArray(c)&&(c=c.join(" "));var d=bj(b);""===c||void 0==c?(Yi||(c={},Yi=(c.atomic=!1,c.autocomplete="none",c.dropeffect="none",c.haspopup=!1,c.live="off",c.multiline=!1,c.multiselectable=!1,c.orientation="vertical",c.readonly=!1,c.relevant="additions text",
c.required=!1,c.sort="none",c.busy=!1,c.disabled=!1,c.hidden=!1,c.invalid="false",c)),c=Yi,b in c?a.setAttribute(d,c[b]):a.removeAttribute(d)):a.setAttribute(d,c)},cj=function(a,b){a=a.getAttribute(bj(b));return null==a||void 0==a?"":String(a)},dj=function(a){var b=cj(a,"activedescendant");return I(a).getElementById(b)},ej=function(a,b){var c="";b&&(c=b.id,y(c,"The active element should have an id."));N(a,"activedescendant",c)},bj=function(a){y(a,"ARIA attribute cannot be empty.");y(vc(Xi,a),"No such ARIA attribute "+
a);return"aria-"+a};var fj=function(a){return"string"==typeof a.className?a.className:a.getAttribute&&a.getAttribute("class")||""},gj=function(a){return a.classList?a.classList:fj(a).match(/\S+/g)||[]},hj=function(a,b){"string"==typeof a.className?a.className=b:a.setAttribute&&a.setAttribute("class",b)},ij=function(a,b){return a.classList?a.classList.contains(b):$a(gj(a),b)},O=function(a,b){if(a.classList)a.classList.add(b);else if(!ij(a,b)){var c=fj(a);hj(a,c+(0<c.length?" "+b:b))}},jj=function(a,b){if(a.classList)Array.prototype.forEach.call(b,
function(e){O(a,e)});else{var c={};Array.prototype.forEach.call(gj(a),function(e){c[e]=!0});Array.prototype.forEach.call(b,function(e){c[e]=!0});b="";for(var d in c)b+=0<b.length?" "+d:d;hj(a,b)}},kj=function(a,b){a.classList?a.classList.remove(b):ij(a,b)&&hj(a,Array.prototype.filter.call(gj(a),function(c){return c!=b}).join(" "))},lj=function(a,b){a.classList?Array.prototype.forEach.call(b,function(c){kj(a,c)}):hj(a,Array.prototype.filter.call(gj(a),function(c){return!$a(b,c)}).join(" "))},mj=function(a,
b,c){c?O(a,b):kj(a,b)};var nj=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d};f=nj.prototype;f.getWidth=function(){return this.right-this.left};f.clone=function(){return new nj(this.top,this.right,this.bottom,this.left)};f.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};
f.contains=function(a){return this&&a?a instanceof nj?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1};f.expand=function(a,b,c,d){t(a)?(this.top-=a.top,this.right+=a.right,this.bottom+=a.bottom,this.left-=a.left):(this.top-=a,this.right+=Number(b),this.bottom+=Number(c),this.left-=Number(d));return this};
f.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};f.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};f.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};
f.translate=function(a,b){a instanceof G?(this.left+=a.x,this.right+=a.x,this.top+=a.y,this.bottom+=a.y):(La(a),this.left+=a,this.right+=a,"number"===typeof b&&(this.top+=b,this.bottom+=b));return this};f.scale=function(a,b){b="number"===typeof b?b:a;this.left*=a;this.right*=a;this.top*=b;this.bottom*=b;return this};var oj=function(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d};f=oj.prototype;f.clone=function(){return new oj(this.left,this.top,this.width,this.height)};f.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};
f.intersection=function(a){var b=Math.max(this.left,a.left),c=Math.min(this.left+this.width,a.left+a.width);if(b<=c){var d=Math.max(this.top,a.top);a=Math.min(this.top+this.height,a.top+a.height);d<=a&&(this.left=b,this.top=d,this.width=c-b,this.height=a-d)}};f.contains=function(a){return a instanceof G?a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height:this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height};
f.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};f.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};f.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};
f.translate=function(a,b){a instanceof G?(this.left+=a.x,this.top+=a.y):(this.left+=La(a),"number"===typeof b&&(this.top+=b));return this};f.scale=function(a,b){b="number"===typeof b?b:a;this.left*=a;this.width*=a;this.top*=b;this.height*=b;return this};var P=function(a,b,c){if("string"===typeof b)(b=pj(a,b))&&(a.style[b]=c);else for(var d in b){c=a;var e=b[d],g=pj(c,d);g&&(c.style[g]=e)}},qj={},pj=function(a,b){var c=qj[b];if(!c){var d=he(b);c=d;void 0===a.style[d]&&(d=(Sb?"Webkit":F?"Moz":E?"ms":null)+ie(d),void 0!==a.style[d]&&(c=d));qj[b]=c}return c},rj=function(a,b){var c=I(a);return c.defaultView&&c.defaultView.getComputedStyle&&(a=c.defaultView.getComputedStyle(a,null))?a[b]||a.getPropertyValue(b)||"":""},sj=function(a,b){return rj(a,b)||
(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]},uj=function(a,b,c){if(b instanceof G){var d=b.x;b=b.y}else d=b,b=c;a.style.left=tj(d,!1);a.style.top=tj(b,!1)},vj=function(a){try{return a.getBoundingClientRect()}catch(b){return{left:0,top:0,right:0,bottom:0}}},wj=function(a){if(E&&!(8<=Number(jc)))return y(a&&"offsetParent"in a),a.offsetParent;var b=I(a),c=sj(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(11==a.nodeType&&a.host&&(a=a.host),c=sj(a,
"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null},yj=function(a){for(var b=new nj(0,Infinity,Infinity,0),c=ke(a),d=c.document_.body,e=c.document_.documentElement,g=se(c.document_);a=wj(a);)if(!(E&&0==a.clientWidth||Sb&&0==a.clientHeight&&a==d)&&a!=d&&a!=e&&"visible"!=sj(a,"overflow")){var h=xj(a),k=new G(a.clientLeft,a.clientTop);h.x+=k.x;h.y+=k.y;b.top=Math.max(b.top,
h.y);b.right=Math.min(b.right,h.x+a.clientWidth);b.bottom=Math.min(b.bottom,h.y+a.clientHeight);b.left=Math.max(b.left,h.x)}d=g.scrollLeft;g=g.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,g);c=re(te(c.document_)||window);b.right=Math.min(b.right,d+c.width);b.bottom=Math.min(b.bottom,g+c.height);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null},Bj=function(a,b){b=b||se(document);var c=b||se(document);var d=xj(a),e=xj(c),g=zj(c);if(c==se(document)){var h=d.x-c.scrollLeft;
d=d.y-c.scrollTop;!E||10<=Number(jc)||(h+=g.left,d+=g.top)}else h=d.x-e.x-g.left,d=d.y-e.y-g.top;a=Aj(a);g=c.clientHeight-a.height;e=c.scrollLeft;var k=c.scrollTop;e+=Math.min(h,Math.max(h-(c.clientWidth-a.width),0));k+=Math.min(d,Math.max(d-g,0));c=new G(e,k);b.scrollLeft=c.x;b.scrollTop=c.y},xj=function(a){var b=I(a);Oa(a,"Parameter is required");var c=new G(0,0);var d=b?I(b):document;d=!E||9<=Number(jc)||qe(ke(d).document_)?d.documentElement:d.body;if(a==d)return c;a=vj(a);b=ue(ke(b).document_);
c.x=a.left+b.x;c.y=a.top+b.y;return c},Dj=function(a,b){a=Cj(a);b=Cj(b);return new G(a.x-b.x,a.y-b.y)},Ej=function(a){a=vj(a);return new G(a.left,a.top)},Cj=function(a){y(a);if(1==a.nodeType)return Ej(a);a=a.changedTouches?a.changedTouches[0]:a;return new G(a.clientX,a.clientY)},tj=function(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a},Fj=function(a){var b=Aj;if("none"!=sj(a,"display"))return b(a);var c=a.style,d=c.display,e=c.visibility,g=c.position;c.visibility="hidden";c.position=
"absolute";c.display="inline";a=b(a);c.display=d;c.position=g;c.visibility=e;return a},Aj=function(a){var b=a.offsetWidth,c=a.offsetHeight,d=Sb&&!b&&!c;return(void 0===b||d)&&a.getBoundingClientRect?(a=vj(a),new Zd(a.right-a.left,a.bottom-a.top)):new Zd(b,c)},Gj=function(a){var b=xj(a);a=Fj(a);return new oj(b.x,b.y,a.width,a.height)},Q=function(a,b){a.style.display=b?"":"none"},Hj=function(a){return"rtl"==sj(a,"direction")},Ij=F?"MozUserSelect":Sb||Qb?"WebkitUserSelect":null,Jj=function(a,b,c){c=
c?null:a.getElementsByTagName("*");if(Ij){if(b=b?"none":"",a.style&&(a.style[Ij]=b),c){a=0;for(var d;d=c[a];a++)d.style&&(d.style[Ij]=b)}}else if(E&&(b=b?"on":"",a.setAttribute("unselectable",b),c))for(a=0;d=c[a];a++)d.setAttribute("unselectable",b)},Kj=function(a,b){if(/^\d+px?$/.test(b))return parseInt(b,10);var c=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;b=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return+b},Lj=function(a,b){return(b=
a.currentStyle?a.currentStyle[b]:null)?Kj(a,b):0},Mj={thin:2,medium:4,thick:6},Nj=function(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;b=a.currentStyle?a.currentStyle[b+"Width"]:null;return b in Mj?Mj[b]:Kj(a,b)},zj=function(a){if(E&&!(9<=Number(jc))){var b=Nj(a,"borderLeft"),c=Nj(a,"borderRight"),d=Nj(a,"borderTop");a=Nj(a,"borderBottom");return new nj(d,c,a,b)}b=rj(a,"borderLeftWidth");c=rj(a,"borderRightWidth");d=rj(a,"borderTopWidth");a=rj(a,"borderBottomWidth");return new nj(parseFloat(d),
parseFloat(c),parseFloat(a),parseFloat(b))};var Oj=function(){};va(Oj);Oj.prototype.nextId_=0;Oj.prototype.idPrefix_="";var Pj=function(a){return a.idPrefix_+":"+(a.nextId_++).toString(36)};var R=function(a){K.call(this);this.dom_=a||ke();this.rightToLeft_=Qj;this.id_=null;this.inDocument_=!1;this.element_=null;this.googUiComponentHandler_=void 0;this.childIndex_=this.children_=this.parent_=this.model_=null;this.pointerEventsEnabled_=this.wasDecorated_=!1};x(R,K);R.prototype.idGenerator_=Oj.getInstance();
var Qj=null,Rj=function(a,b){switch(a){case 1:return b?"disable":"enable";case 2:return b?"highlight":"unhighlight";case 4:return b?"activate":"deactivate";case 8:return b?"select":"unselect";case 16:return b?"check":"uncheck";case 32:return b?"focus":"blur";case 64:return b?"open":"close"}throw Error("Invalid component state");},Sj=function(a){return a.id_||(a.id_=Pj(a.idGenerator_))},Tj=function(a,b){if(a.parent_&&a.parent_.childIndex_){var c=a.parent_.childIndex_,d=a.id_;d in c&&delete c[d];zc(a.parent_.childIndex_,
b,a)}a.id_=b};R.prototype.getElement=function(){return this.element_};var Uj=function(a){a=a.element_;y(a,"Can not call getElementStrict before rendering/decorating.");return a};R.prototype.getElementByClass=function(a){return this.element_?this.dom_.getElementByClass(a,this.element_):null};R.prototype.getRequiredElementByClass=function(a){var b=this.getElementByClass(a);y(b,"Expected element in component with class: %s",a);return b};
R.prototype.getHandler=function(){this.googUiComponentHandler_||(this.googUiComponentHandler_=new Ai(this));return y(this.googUiComponentHandler_)};var Wj=function(a,b){if(a==b)throw Error("Unable to set parent component");if(b&&a.parent_&&a.id_&&Vj(a.parent_,a.id_)&&a.parent_!=b)throw Error("Unable to set parent component");a.parent_=b;R.superClass_.setParentEventTarget.call(a,b)};f=R.prototype;f.getParent=function(){return this.parent_};
f.setParentEventTarget=function(a){if(this.parent_&&this.parent_!=a)throw Error("Method not supported");R.superClass_.setParentEventTarget.call(this,a)};f.getDomHelper=function(){return this.dom_};f.createDom=function(){this.element_=this.dom_.createElement("DIV")};f.render=function(a){Xj(this,a)};
var Xj=function(a,b,c){if(a.inDocument_)throw Error("Component already rendered");a.element_||a.createDom();b?b.insertBefore(a.element_,c||null):a.dom_.document_.body.appendChild(a.element_);a.parent_&&!a.parent_.inDocument_||a.enterDocument()};f=R.prototype;
f.decorate=function(a){if(this.inDocument_)throw Error("Component already rendered");if(a&&this.canDecorate(a)){this.wasDecorated_=!0;var b=I(a);this.dom_&&this.dom_.document_==b||(this.dom_=ke(a));this.decorateInternal(a);this.enterDocument()}else throw Error("Invalid element to decorate");};f.canDecorate=function(){return!0};f.decorateInternal=function(a){this.element_=a};f.enterDocument=function(){this.inDocument_=!0;Yj(this,function(a){!a.inDocument_&&a.getElement()&&a.enterDocument()})};
f.exitDocument=function(){Yj(this,function(a){a.inDocument_&&a.exitDocument()});this.googUiComponentHandler_&&this.googUiComponentHandler_.removeAll();this.inDocument_=!1};
f.disposeInternal=function(){this.inDocument_&&this.exitDocument();this.googUiComponentHandler_&&(this.googUiComponentHandler_.dispose(),delete this.googUiComponentHandler_);Yj(this,function(a){a.dispose()});!this.wasDecorated_&&this.element_&&Ce(this.element_);this.parent_=this.model_=this.element_=this.childIndex_=this.children_=null;R.superClass_.disposeInternal.call(this)};f.getModel=function(){return this.model_};f.setModel=function(a){this.model_=a};
f.addChild=function(a,b){this.addChildAt(a,Zj(this),b)};
f.addChildAt=function(a,b,c){y(!!a,"Provided element must not be null.");if(a.inDocument_&&(c||!this.inDocument_))throw Error("Component already rendered");if(0>b||b>Zj(this))throw Error("Child component index out of bounds");this.childIndex_&&this.children_||(this.childIndex_={},this.children_=[]);if(a.getParent()==this){var d=Sj(a);this.childIndex_[d]=a;bb(this.children_,a)}else zc(this.childIndex_,Sj(a),a);Wj(a,this);eb(this.children_,b,0,a);a.inDocument_&&this.inDocument_&&a.getParent()==this?
(c=this.getContentElement(),(c.childNodes[b]||null)!=a.getElement()&&(a.getElement().parentElement==c&&c.removeChild(a.getElement()),b=c.childNodes[b]||null,c.insertBefore(a.getElement(),b))):c?(this.element_||this.createDom(),b=ak(this,b+1),Xj(a,this.getContentElement(),b?b.element_:null)):this.inDocument_&&!a.inDocument_&&a.element_&&a.element_.parentNode&&1==a.element_.parentNode.nodeType&&a.enterDocument()};f.getContentElement=function(){return this.element_};
f.isRightToLeft=function(){null==this.rightToLeft_&&(this.rightToLeft_=Hj(this.inDocument_?this.element_:this.dom_.document_.body));return this.rightToLeft_};f.setRightToLeft=function(a){if(this.inDocument_)throw Error("Component already rendered");this.rightToLeft_=a};
var Zj=function(a){return a.children_?a.children_.length:0},Vj=function(a,b){a.childIndex_&&b?(a=a.childIndex_,b=(null!==a&&b in a?a[b]:void 0)||null):b=null;return b},ak=function(a,b){return a.children_?a.children_[b]||null:null},Yj=function(a,b,c){a.children_&&a.children_.forEach(b,c)},bk=function(a,b){return a.children_&&b?a.children_.indexOf(b):-1};
R.prototype.removeChild=function(a,b){if(a){var c="string"===typeof a?a:Sj(a);a=Vj(this,c);if(c&&a){var d=this.childIndex_;c in d&&delete d[c];bb(this.children_,a);b&&(a.exitDocument(),a.element_&&Ce(a.element_));Wj(a,null)}}if(!a)throw Error("Child is not in parent component");return a};R.prototype.removeChildren=function(a){for(var b=[];this.children_&&0!=this.children_.length;){var c=b,d=c.push;var e=this.removeChild(ak(this,0),a);d.call(c,e)}return b};var ck=function(a){a.writeImageController=this;this.app=a.app;this.applyScope=u(a.$apply,a);this.stage=null;this.percentComplete=this.startTime=0;this.listeners_=new M.ListenerCollection;this.app.writeParams.device?this.app.writeParams.target?(this.listeners_.add(chrome.imageWriterPrivate.onWriteComplete,u(this.onComplete,this)),this.listeners_.add(chrome.imageWriterPrivate.onWriteError,u(this.onError,this)),this.app.writeError=null,this.app.writeCancelled=!1,this.start()):(a=this.app,Pi(a),a.step=
2,a.allowErase=!0,a.allowLocalFile=!0,Cg(a.ga.tracker_,M.GoogleAnalytics.pageView.SELECT_TARGET_PAGE)):(a=this.app,Pi(a),a.step=1,a.allowErase=!0,a.allowLocalFile=!0,Cg(a.ga.tracker_,M.GoogleAnalytics.pageView.SELECT_DEVICE_PAGE))};f=ck.prototype;
f.start=function(){var a=this;if(this.app.writeParams.device.local)chrome.imageWriterPrivate.writeFromFile(this.app.writeParams.target.storageUnitId,this.app.writeParams.device.file,function(){if(chrome.runtime.lastError)a.onError(null,"DEVICE_WRITE_ERROR")});else if(this.app.writeParams.device.recoveryImages){if(this.app.writeParams.recoveryChannel)var b=this.app.writeParams.recoveryChannel;else if(b=Ri(this.app),!b){console.error("Unable to write image due to missing expected recovery channel.");
return}b=this.app.writeParams.device.recoveryImages[b];chrome.imageWriterPrivate.writeFromUrl(this.app.writeParams.target.storageUnitId,b.url,{imageHash:b.md5,saveAsDownload:this.app.writeParams.saveAsDownload},function(){if(chrome.runtime.lastError)a.onError(null,"DEVICE_WRITE_ERROR")})}this.startTime=Date.now()};f.back=function(){Si(this.app)};f.forward=function(){var a=this.app;Pi(a);a.step=null;a.allowErase=!0;a.allowLocalFile=!0;Cg(a.ga.tracker_,M.GoogleAnalytics.pageView.WRITE_COMPLETE_PAGE)};
f.cancel=function(){this.listeners_.removeAll();chrome.imageWriterPrivate.cancelWrite(u(function(){this.app.writeCancelled=!0;this.back();this.applyScope()},this))};
f.onComplete=function(){if(this.stage){var a=Date.now();this.stage==M.Stage.DOWNLOAD?this.app.ga.sendTiming(M.GoogleAnalytics.timingVar.DOWNLOAD_IMAGE,a-this.startTime):this.stage==M.Stage.VERIFY_DOWNLOAD?this.app.ga.sendTiming(M.GoogleAnalytics.timingVar.VERIFY_DOWNLOADED_IMAGE,a-this.startTime):this.stage==M.Stage.UNZIP?this.app.ga.sendTiming(M.GoogleAnalytics.timingVar.UNPACK_IMAGE,a-this.startTime):this.stage==M.Stage.WRITE?this.app.ga.sendTiming(M.GoogleAnalytics.timingVar.BURN_IMAGE,a-this.startTime):
this.stage==M.Stage.VERIFY_WRITE&&this.app.ga.sendTiming(M.GoogleAnalytics.timingVar.VERIFY_BURNED_IMAGE,a-this.startTime);this.startTime=a}this.listeners_.removeAll();this.forward();this.applyScope()};f.onError=function(a,b){this.app.ga.tracker_.set("dimension9",b);this.app.ga.tracker_.send("event",{eventCategory:"image_writer_error",eventAction:"image_writer_error",eventLabel:void 0,eventValue:void 0});this.listeners_.removeAll();this.app.writeErrorCode=b;Si(this.app);this.applyScope()};
v("recovery.controllers.WriteImageController",ck);M.controllers.WriteImageController=ck;var dk=function(a){M.controllers.WriteImageController.call(this,a);a.eraseDeviceController=this};n(dk,M.controllers.WriteImageController);dk.prototype.start=function(){chrome.imageWriterPrivate.destroyPartitions(this.app.writeParams.target.storageUnitId,function(){})};dk.prototype.back=function(){var a=this.app;a.step=null;a.allowErase=!1;a.allowLocalFile=!0;Cg(a.ga.tracker_,M.GoogleAnalytics.pageView.ERASE_CONFIRM_PAGE)};
dk.prototype.forward=function(){var a=this.app;Pi(a);a.step=null;a.allowErase=!1;a.allowLocalFile=!0;Cg(a.ga.tracker_,M.GoogleAnalytics.pageView.ERASE_COMPLETE_PAGE)};v("recovery.controllers.EraseDeviceController",dk);var ek=function(a,b){this.devices_=null;this.callback_=a;this.pollInterval_=b||2E3;this.interval_=setInterval(u(this.poll_,this),this.pollInterval_);this.poll_()};ek.prototype.stop=function(){clearInterval(this.interval_)};ek.prototype.poll_=function(){chrome.imageWriterPrivate.listRemovableStorageDevices(u(this.update_,this))};
ek.prototype.update_=function(a){a=a.filter(function(b){return 0<b.capacity});gb(a,this.devices_,function(b,c){return b.storageUnitId==c.storageUnitId})||(this.devices_=a,this.callback_(a))};v("recovery.DriveListUpdater",ek);M.DriveListUpdater=ek;var fk=function(a){a.selectTargetController=this;this.app=a.app;this.applyScope_=u(a.$apply,a);this.selectedUsb=this.app.writeParams.target;this.canContinue=!1;var b=new M.DriveListUpdater(u(this.onDevicesChanged_,this));a.$on("$destroy",function(){b.stop()});a.$watch("selectTargetController.selectedUsb",u(this.onDeviceSelected_,this))},gk=function(){var a=document.getElementById("select-usb-device");a&&a.getElementsByClassName("jfk-select")[0].focus()};
fk.prototype.onDevicesChanged_=function(a){this.selectedUsb&&(this.selectedUsb=a.filter(function(b){return b.storageUnitId==this.selectedUsb.storageUnitId},this)[0]);this.applyScope_();gk()};
fk.prototype.onDeviceSelected_=function(){if(this.selectedUsb){this.app.ga.tracker_.set("dimension4",this.selectedUsb.vendor+" "+this.selectedUsb.model);var a=this.selectedUsb.capacity;this.app.ga.tracker_.set("dimension10",1E9<a?(a/1E9).toFixed(0)+"GB":(a/1E6).toFixed(0)+"MB");this.app.ga.tracker_.set("dimension11",this.selectedUsb.removable.toString());if(this.app.writeParams.device.local)this.canContinue=!0,this.app.writeParams.target=this.selectedUsb;else{var b=this.app.sortedAvailableRecoveryChannels;
a=this.app.writeParams.device.recoveryImages[b[0]].filesize;b=ia(b);for(var c=b.next();!c.done;c=b.next())c=this.app.writeParams.device.recoveryImages[c.value].filesize,c>a&&(a=c);this.selectedUsb.capacity>=a?(this.canContinue=!0,this.app.writeParams.target=this.selectedUsb):(this.canContinue=!1,this.app.writeParams.target=null)}}else this.canContinue=!1,this.app.writeParams.target=null};v("recovery.controllers.SelectTargetController",fk);M.controllers.SelectTargetController=fk;var hk=function(a){M.controllers.SelectTargetController.call(this,a);a.eraseSelectTargetController=this;a.app.writeParams.device={local:!0};a.app.step=null};n(hk,M.controllers.SelectTargetController);v("recovery.controllers.EraseSelectTargetController",hk);var ik=function(a,b,c,d,e){this.removeDashes_=a;this.pattern_=b;this.prefixPattern_=c;this.checksumCharsLen_=d;this.generateChecksum_=e};ik.prototype.hasValidChecksum=function(a){if(!a)return!1;a=jk(a,this.removeDashes_);var b=a.slice(a.length-this.checksumCharsLen_,a.length);return this.generateChecksum_(a.slice(0,a.length-this.checksumCharsLen_).trim())==b};ik.prototype.isValidPattern=function(a){a=jk(a,!1);return this.pattern_.test(a)};
ik.prototype.isValidPrefix=function(a){return a?(a=jk(a,!1),this.prefixPattern_.test(a)):!0};var jk=function(a,b){a=a.toUpperCase().trim().replace(/\s+/g," ");b&&(a=a.replace(/-/g,""));return a};v("recovery.HwidDef",ik);M.HwidDef=ik;/*
JavaScript Zlib and Deflate Library
The MIT License
Copyright (c) 2011 imaya
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var kk="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array;var lk=new (kk?Uint8Array:Array)(256),mk;for(mk=0;256>mk;++mk){var nk=mk,ok=nk,pk=7;for(nk>>>=1;nk;nk>>>=1)ok<<=1,ok|=nk&1,--pk;lk[mk]=(ok<<pk&255)>>>0};var rk=function(a){var b=void 0,c;"number"===typeof b||(b=0);var d=a.length;var e=-1;for(c=d&7;c--;++b)e=e>>>8^qk[(e^a[b])&255];for(c=d>>3;c--;b+=8)e=e>>>8^qk[(e^a[b])&255],e=e>>>8^qk[(e^a[b+1])&255],e=e>>>8^qk[(e^a[b+2])&255],e=e>>>8^qk[(e^a[b+3])&255],e=e>>>8^qk[(e^a[b+4])&255],e=e>>>8^qk[(e^a[b+5])&255],e=e>>>8^qk[(e^a[b+6])&255],e=e>>>8^qk[(e^a[b+7])&255];return(e^4294967295)>>>0},sk=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,
2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,
3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,
879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,
4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,
83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,
1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],qk=kk?new Uint32Array(sk):sk;/*
zlib.heap.js
The MIT License
Copyright (c) 2011 imaya
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var tk=[],uk;for(uk=0;288>uk;uk++)switch(!0){case 143>=uk:tk.push([uk+48,8]);break;case 255>=uk:tk.push([uk-144+400,9]);break;case 279>=uk:tk.push([uk-256,7]);break;case 287>=uk:tk.push([uk-280+192,8]);break;default:throw Error("invalid literal: "+uk);}
var vk=function(){function a(e){switch(!0){case 3===e:return[257,e-3,0];case 4===e:return[258,e-4,0];case 5===e:return[259,e-5,0];case 6===e:return[260,e-6,0];case 7===e:return[261,e-7,0];case 8===e:return[262,e-8,0];case 9===e:return[263,e-9,0];case 10===e:return[264,e-10,0];case 12>=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,
e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:throw Error("invalid length: "+e);}}var b=[],c;for(c=3;258>=c;c++){var d=a(c);b[c]=
d[2]<<24|d[1]<<16|d[0]}return b}();kk&&new Uint32Array(vk);/*
JavaScript Inflate Library
The MIT License
Copyright (c) 2012 imaya
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var wk=function(a){var b=a.length,c=0,d=Number.POSITIVE_INFINITY,e,g,h;for(g=0;g<b;++g)a[g]>c&&(c=a[g]),a[g]<d&&(d=a[g]);d=1<<c;var k=new (kk?Uint32Array:Array)(d);var l=1;var m=0;for(e=2;l<=c;){for(g=0;g<b;++g)if(a[g]===l){var p=0;var r=m;for(h=0;h<l;++h)p=p<<1|r&1,r>>=1;r=l<<16|g;for(h=p;h<d;h+=e)k[h]=r;++m}++l;m<<=1;e<<=1}};var xk=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];kk&&new Uint16Array(xk);var yk=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258];kk&&new Uint16Array(yk);var zk=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0];kk&&new Uint8Array(zk);var Ak=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];kk&&new Uint16Array(Ak);
var Bk=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];kk&&new Uint8Array(Bk);var Ck=new (kk?Uint8Array:Array)(288),Dk,Ek;Dk=0;for(Ek=Ck.length;Dk<Ek;++Dk)Ck[Dk]=143>=Dk?8:255>=Dk?9:279>=Dk?7:8;wk(Ck);var Fk=new (kk?Uint8Array:Array)(30),Gk,Hk;Gk=0;for(Hk=Fk.length;Gk<Hk;++Gk)Fk[Gk]=5;wk(Fk);var Ik=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];kk&&new Uint16Array(Ik);var Jk=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258];kk&&new Uint16Array(Jk);var Kk=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0];kk&&new Uint8Array(Kk);var Lk=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];kk&&new Uint16Array(Lk);
var Mk=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];kk&&new Uint8Array(Mk);var Nk=new (kk?Uint8Array:Array)(288),Ok,Pk;Ok=0;for(Pk=Nk.length;Ok<Pk;++Ok)Nk[Ok]=143>=Ok?8:255>=Ok?9:279>=Ok?7:8;wk(Nk);var Qk=new (kk?Uint8Array:Array)(30),Rk,Sk;Rk=0;for(Sk=Qk.length;Rk<Sk;++Rk)Qk[Rk]=5;wk(Qk);/*
zlib.js
JavaScript Zlib and Deflate Library
The MIT License
Copyright (c) 2011 imaya
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
M.HwidDefV1V2={};var Tk=RegExp("^(\\w+ ){2,3}(\\w+-?){1,3} \\d{4}$"),Uk=RegExp("^((\\w+ ?){1,3}|(\\w+ ){2,3}(\\w+-?){1,3} ?|(\\w+ ){2,3}(\\w+-?){1,3} \\d{0,4})$");function Vk(a){a=((rk(M.HwidDef.stringToUint8Array(a))&4294967295)>>>0).toString();a=parseInt(a,10);if(Number.isFinite(a)){a=String(a);var b=a.indexOf(".");-1===b&&(b=a.length);var c="-"===a[0]?"-":"";c&&(a=a.substring(1));a=c+fe("0",Math.max(0,4-b))+a}else a=String(a);return a.slice(a.length-4,a.length)}
M.HwidDefV1V2.create=function(){return new M.HwidDef(!1,Tk,Uk,4,Vk)};M.HwidDefV3Base32={};var Wk=RegExp("^\\w+ (?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]{4}-?)+(?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]{1,4})?$"),Xk=RegExp("^\\w+ ?(?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]{4}-?)*(?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]{1,3})?$");function Yk(a){a=rk(M.HwidDef.stringToUint8Array(a))&1023;return"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"[a>>5]+"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"[a&31]}M.HwidDefV3Base32.create=function(){return new M.HwidDef(!0,Wk,Xk,2,Yk)};M.HwidDefV3Base8192={};M.HwidDefV3Base8192Impl=function(){};M.HwidDefV3Base8192Impl.prototype.generateChecksum_=function(a){a=rk(M.HwidDef.stringToUint8Array(a))&255;return"23456789"[a>>5]+"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"[a&31]};
var Zk=function(a){return M.HwidDefV3Base8192Impl.MODEL_AND_RLZ_PATTERN_.test(a)||M.HwidDefV3Base8192Impl.MODEL_PATTERN_.test(a)},$k=function(a){a=a.toUpperCase().trim().replace(/\s+/g," ");if(!a)return{success:!1,checksum:"",not_checksum:""};a=a.split(" ");var b=!1;2==a.length?b=Zk(a[0])&&M.HwidDefV3Base8192Impl.COMPONENT_PATTERN_.test(a[1]):3==a.length&&(b=Zk(a[0])&&M.HwidDefV3Base8192Impl.CONFIGLESS_PATTERN_.test(a[1])&&M.HwidDefV3Base8192Impl.COMPONENT_PATTERN_.test(a[2]));var c=a.length-1,d=
a[c].slice(a[c].length-2,a[c].length);a[c]=a[c].slice(0,a[c].length-2);a[c]=a[c].replace(/-/g,"");return{success:b,checksum:d,not_checksum:a.join(" ").trim()}};M.HwidDefV3Base8192Impl.prototype.hasValidChecksum=function(a){a=$k(a);var b=a.checksum;return this.generateChecksum_(a.not_checksum)==b};M.HwidDefV3Base8192Impl.prototype.isValidPattern=function(a){return $k(a).success};
M.HwidDefV3Base8192Impl.prototype.isValidPrefix=function(a){if(!a)return!0;a=a.toUpperCase().trim().replace(/\s+/g," ");a=a.split(" ");if(1<=a.length){if(!Zk(a[0]))return!1;if(1==a.length)return!0}return 2==a.length?a[1]?M.HwidDefV3Base8192Impl.CONFIGLESS_PARTIAL_.test(a[1])||M.HwidDefV3Base8192Impl.COMPONENT_PARTIAL_.test(a[1]):!0:3==a.length?M.HwidDefV3Base8192Impl.CONFIGLESS_PARTIAL_.test(a[1])?a[2]?M.HwidDefV3Base8192Impl.COMPONENT_PARTIAL_.test(a[2]):!0:!1:!1};
v("recovery.HwidDefV3Base8192Impl",M.HwidDefV3Base8192Impl);M.HwidDefV3Base8192Impl.MODEL_PATTERN_=/^[A-Z0-9]+$/;M.HwidDefV3Base8192Impl.MODEL_AND_RLZ_PATTERN_=/^[A-Z0-9]+-\w+$/;M.HwidDefV3Base8192Impl.CONFIGLESS_PATTERN_=/^(?:[A-F0-9]+-)+[A-F0-9]+$/;M.HwidDefV3Base8192Impl.CONFIGLESS_PARTIAL_=/^(?:[A-F0-9]+-)*(?:[A-F0-9]+)?$/;M.HwidDefV3Base8192Impl.COMPONENT_PATTERN_=RegExp("^(?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567][23456789][ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]-)*(?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567][23456789][ABCDEFGHIJKLMNOPQRSTUVWXYZ234567])$");
M.HwidDefV3Base8192Impl.COMPONENT_PARTIAL_=RegExp("^(?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567][23456789][ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]-?)*(?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]|[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567][23456789])?$");M.HwidDefV3Base8192.create=function(){return new M.HwidDefV3Base8192Impl};var al=function(a){this.hwidDefs_=a};al.prototype.isValidPrefix=function(a){return this.hwidDefs_.some(function(b){return b.isValidPrefix(a)})};al.prototype.isValidPattern=function(a){return this.hwidDefs_.some(function(b){return b.isValidPattern(a)})};al.prototype.hasValidChecksum=function(a){return this.hwidDefs_.some(function(b){return b.hasValidChecksum(a)})};v("recovery.HwidValidator",al);M.HwidValidator=al;var bl=function(a){a.selectByHwidController=this;this.app=a.app;this.selectController=a.selectDeviceController;u(a.$apply,a);this.app.writeParams.device=M.DUMMY_DEVICE;this.app.hwidPlaceholder="e.g. "+M.appConfig.sampleHwid;this.app.enableAdvancedSettings=!0;a.$watch("app.userHwid",u(this.watchHwid,this))};
bl.prototype.watchHwid=function(){var a=M.HwidValidator.createDefaultValidator(),b=null;if(pb(ge(this.app.userHwid)))this.app.hwidEntryMessageStyle="",this.app.hwidEntryMessageKey="";else{b=this.app.userHwid.replace(/^[\s\xa0]+/,"").toUpperCase();if(b!=this.app.userHwid){this.app.userHwid=b;return}(b=M.getMatchingDevice(this.app.userHwid))?(this.app.hwidEntryMessageStyle="match",a.isValidPattern(this.app.userHwid)&&a.hasValidChecksum(this.app.userHwid)?this.app.hwidEntryMessageKey="HWID_MATCH_FOUND_AND_CHECKSUM_VERIFIED":
this.app.hwidEntryMessageKey="HWID_MATCH_FOUND"):M.isValidModelFamilyPrefix(this.app.userHwid)?a.isValidPrefix(this.app.userHwid)?(this.app.hwidEntryMessageStyle="message",this.app.hwidEntryMessageKey="HWID_KEEP_TYPING"):(this.app.hwidEntryMessageStyle="error",this.app.hwidEntryMessageKey="HWID_INVALID_MODEL"):(this.app.hwidEntryMessageStyle="error",this.app.hwidEntryMessageKey="HWID_INVALID_MODEL")}this.app.writeParams.device=b||M.DUMMY_DEVICE;this.selectController.canContinue=!!b;this.app.writeParams.recoveryChannel=
null;Ti(this.app);b&&(this.app.ga.tracker_.set("dimension6",this.app.userHwid),this.app.ga.tracker_.set("dimension8",this.app.userHwid.split(" ")[0]))};v("recovery.controllers.SelectDeviceByHwidController",bl);M.controllers.SelectDeviceByHwidController=bl;var cl=function(a){a.selectByModelController=this;this.app=a.app;this.selectController=a.selectDeviceController;this.selectController.canContinue=!1;this.app.enableAdvancedSettings=!0;Object.keys(M.oems).sort();this.onOemSelected();this.app.hasSelectByHwid=M.appConfig.allowSelectByHwid;a.$watch("app.selectedOem",u(this.onOemSelected,this));a.$watch("app.selectedSku",u(this.onSkuSelected,this))};cl.prototype.onOemSelected=function(){var a=this.app.selectedOem;a&&Object.keys(M.oems[a]).sort();this.onSkuSelected()};
cl.prototype.onSkuSelected=function(){var a=this.app.selectedOem,b=this.app.selectedSku;a&&b&&M.oems[a]&&M.oems[a][b]?(this.selectController.canContinue=!0,this.app.writeParams.device=M.oems[a][b],(a=M.getDeviceAnalyticsModel(this.app.writeParams.device))&&this.app.ga.tracker_.set("dimension8",a)):(this.selectController.canContinue=!1,this.app.writeParams.device=M.DUMMY_DEVICE);this.app.writeParams.recoveryChannel=null;Ti(this.app)};v("recovery.controllers.SelectDeviceByModelController",cl);
M.controllers.SelectDeviceByModelController=cl;var dl=function(a){a.selectDeviceController=this;this.app=a.app;this.app.step=1;this.app.allowErase=!0;this.app.allowLocalFile=!0;this.canContinue=!1;this.SelectionTypes={HWID:"HWID",MAKE_MODEL:"MAKE_MODEL"};M.appConfig.selectByModelFirst&&(a.app.selectionType=this.SelectionTypes.MAKE_MODEL);a.app.selectionType==this.SelectionTypes.MAKE_MODEL?(this.app.ga.tracker_.set("dimension7",M.GoogleAnalytics.selection.MODEL),this.app.selectionType=this.SelectionTypes.MAKE_MODEL):(this.app.ga.tracker_.set("dimension7",
M.GoogleAnalytics.selection.HWID),this.app.selectionType=this.SelectionTypes.HWID)};v("recovery.controllers.SelectDeviceController",dl);M.controllers.SelectDeviceController=dl;var el=function(){K.call(this);this.state_="none"};x(el,K);el.prototype.setState=function(a){this.state_!=a&&(this.state_=a,this.dispatchEvent("change"))};el.prototype.getState=function(){return this.state_};var fl=function(a,b,c){c=void 0===c?!1:c;R.call(this,b);this.retainLastTransition_=c;this.backgroundColor_="#fff";this.size_=0;this.status_=a};x(fl,R);var gl={UP:0,RIGHT:1,DOWN:2,LEFT:3};f=fl.prototype;f.setSize=function(a){y(!this.getElement(),"Cannot setSize after activity indicator is rendered.");this.size_=a};
f.createDom=function(){fl.superClass_.createDom.call(this);var a=this.getDomHelper();this.contentElement_=a.createDom("DIV");this.iconLayer_=a.createDom("DIV","jfk-activityIndicator-icon");var b=["jfk-activityIndicator"];1==this.size_&&b.push("jfk-activityIndicator-small");this.element_=a.createDom("DIV",b,this.contentElement_,this.iconLayer_)};f.getContentElement=function(){return this.contentElement_};
f.enterDocument=function(){fl.superClass_.enterDocument.call(this);this.getHandler().listen(this.status_,"change",this.runAnimationLoop_)};
f.runAnimationLoop_=function(){if(!this.lastTransitionProperties_||this.lastTransitionProperties_.complete){this.removeChildren(!0);var a,b=a=this.backgroundColor_,c=2,d=this.lastTransitionProperties_;d&&(a=d.endColor,b=d.endShadowColor,c=d.direction,y($a(tc(gl),c)),c=(c+1)%4,y($a(tc(gl),c)));d=this.status_.getState();switch(d){case "loading":var e=hl[c];var g=e[0];e=e[1];break;case "none":e=g=this.backgroundColor_;break;case "offline":g="#999";e="#777";break;default:Ka("should not reach default case")}y(g);
y(e);a=new il(d,c,g,a,a,b,g,e,this.size_,this.getDomHelper());this.lastTransitionProperties_={complete:!1,endColor:a.endColor,endShadowColor:a.endShadowColor,direction:a.direction};this.addChild(a,!0);this.getHandler().listenOnce(a,"b",this.handleTransitionEnd_);Qh(Da(this.cleanupTransition_,a),0,this);jl(this)}};f.cleanupTransition_=function(a){this.inDocument_&&(a.play(),Qh(function(){!this.disposed_&&this.inDocument_&&this.started&&!this.complete&&this.handleTransitionEnd_()},500,a))};
f.handleTransitionEnd_=function(a){this.lastTransitionProperties_.complete=!0;a=a.target;var b=this.status_.getState();b==a.state&&"loading"!=b||this.runAnimationLoop_();jl(this);this.retainLastTransition_||jb(a)};
var jl=function(a){a.iconLayer_.style.opacity="offline"==a.status_.getState()?1:0},hl={0:["#00B15F","#008948"],1:["#3C78F8","#2159bd"],2:["#FA2424","#9e1212"],3:["#FFD34B","#dea11a"]},il=function(a,b,c,d,e,g,h,k,l,m){R.call(this,m);this.state=a;this.complete=!1;this.direction=b;this.startBackgroundColor=c;this.endBackgroundColor=d;this.startColor=e;this.startShadowColor=g;this.endColor=h;this.endShadowColor=k;this.circleDiameter_=1==l?16:19};x(il,R);
il.prototype.createDom=function(){il.superClass_.createDom.call(this);var a=this.getElement(),b=this.getDomHelper();O(a,"jfk-activityIndicator-circle-transition");var c=b.createDom("DIV","jfk-activityIndicator-mask"),d=b.createDom("DIV","jfk-activityIndicator-mask");y(a);b.append(a,c,d);var e=b.createDom("DIV","jfk-activityIndicator-circle");b.appendChild(c,e);P(e,"backgroundColor",this.startBackgroundColor);var g=b.createDom("DIV","jfk-activityIndicator-circle");b.appendChild(d,g);P(g,"backgroundColor",
this.endBackgroundColor);a=b.createDom("DIV","jfk-activityIndicator-circle");var h=b.createDom("DIV","jfk-activityIndicator-circle");b.appendChild(c,a);b.appendChild(d,h);P(a,"backgroundColor",this.startColor);P(h,"backgroundColor",this.endShadowColor);this.firstCircle_=a;this.secondCircle_=h;this.firstBackgroundCircle_=e;this.secondBackgroundCircle_=g;this.firstMask_=c;this.secondMask_=d;b=this.circleDiameter_+"px";c=Math.ceil(this.circleDiameter_/2)+"px";d="-"+c;switch(this.direction){case 1:P(this.firstMask_,
{left:0,top:0});P(this.secondMask_,{left:c,top:0});P(this.firstCircle_,{left:0,top:0});P(this.secondCircle_,{width:0,left:0});P(this.firstBackgroundCircle_,{left:0,top:0});P(this.secondBackgroundCircle_,{left:d});break;case 3:P(this.firstMask_,{left:c,top:0});P(this.secondMask_,{left:0,top:0});P(this.firstCircle_,{left:d,top:0});P(this.secondCircle_,{width:0,left:c});P(this.firstBackgroundCircle_,{left:d,top:0});break;case 0:P(this.firstMask_,{left:0,top:c});P(this.secondMask_,{left:0,top:0});P(this.firstCircle_,
{left:0,top:d});P(this.secondCircle_,{top:c,height:0});P(this.firstBackgroundCircle_,{left:0,top:d});break;case 2:P(this.firstMask_,{left:0,top:0});P(this.secondMask_,{left:0,top:c});P(this.firstCircle_,{left:0,top:0});P(this.secondCircle_,{left:0,height:0});P(this.firstBackgroundCircle_,{left:0,top:0});P(this.secondBackgroundCircle_,{top:d});break;default:Ka("should not reach default case")}d=this.direction;b=0==d||2==d?{width:b,height:c}:{width:c,height:b};P(this.firstMask_,b);P(this.secondMask_,
b);O(a,"jfk-activityIndicator-transition");O(h,"jfk-activityIndicator-transition-second")};
il.prototype.play=function(){y(this.inDocument_,"Must be in document at this point.");F&&Fj(this.getElement());this.started=!0;kl(this,this.secondCircle_,this.handleTransitionEnd_);P(this.firstCircle_,"backgroundColor",this.startShadowColor);P(this.secondCircle_,"backgroundColor",this.endColor);var a=this.circleDiameter_+"px",b=Math.ceil(this.circleDiameter_/2)+"px",c="-"+b;switch(this.direction){case 1:P(this.firstCircle_,{width:0,left:b});P(this.secondCircle_,{left:c,width:a});break;case 3:P(this.firstCircle_,
{width:0,left:0});P(this.secondCircle_,{width:a,left:0});break;case 0:P(this.firstCircle_,{top:0,height:0});P(this.secondCircle_,{top:0,height:a});break;case 2:P(this.firstCircle_,{top:b,height:0});P(this.secondCircle_,{top:c,height:a});break;default:Ka("should not reach default case")}};var kl=function(a,b,c){var d=!1;a.getHandler().listenOnce(b,["webkitTransitionEnd","transitionend"],function(){d||(d=!0,c.call(a))})};
il.prototype.handleTransitionEnd_=function(){this.complete=!0;this.dispatchEvent("b");Q(this.secondBackgroundCircle_,!1)};var ll=function(a,b){this.$parse_=a;this.prefix_=b},pl=function(a,b,c,d){d.setEnabled&&c.hasOwnProperty("ngDisabled")&&b.$watch(c.ngDisabled,function(e){d.setEnabled(void 0===e||!e)});d.setModel&&c.hasOwnProperty(a.prefix_+"ModelValue")&&b.$watch(c[a.prefix_+"ModelValue"],function(e){d.setModel(null!=e?e:ml)});d.getElement&&c.hasOwnProperty("tabindex")&&c.$observe("tabindex",function(e){d.getElement().setAttribute("tabindex",e)});c.hasOwnProperty(a.prefix_+"ComponentAs")&&a.register(b,c[a.prefix_+
"ComponentAs"],d);nl(a,b,c,d);b.$on("$destroy",function(){if("function"===typeof d.getElement){var e=d.getElement();if(e){var g=angular.element(e);"function"===typeof g.remove.$original?g.remove.$original.apply(g):ol(e)}}d.dispose()})},ol=function(a){var b=angular.element(a);b.unbind();b.removeData();b=0;for(a=a.childNodes||[];b<a.length;b++)ol(a[b])},nl=function(a,b,c,d){rc(c,function(e,g){if(0==g.lastIndexOf(a.prefix_+"On",0)){e=g.slice((a.prefix_+"On").length);e=e[0].toLowerCase()+e.slice(1);var h=
a.$parse_(c[g]);ql(b,d,e,function(k){rl(b,h,k)})}})},rl=function(a,b,c){sl(a,function(){b(a,{$event:c})})},sl=function(a,b){a.$root.$$phase?a.$eval(b):a.$apply(b)},ql=function(a,b,c,d){var e=Mc(b,c,d);a.$on("$destroy",function(){Uc(e)})};ll.prototype.register=function(a,b,c){b=this.$parse_(b).assign;if(!b)throw Error("Angular scope expression non-assignable.");b(a,c)};ll.$inject=["$parse","prefix"];var ml={},tl=1<angular.version.major||2<=angular.version.minor?1:-1;
angular.module("ng.g.GoogAdapter",[]).factory("gGoogAdapter",["$parse",function(a){return new ll(a,"g")}]);var ul=angular.module("jfkCommon",[]);ul.factory("jfkCommon",["$parse",function(a){return new ll(a,"jfk")}]);ul.PRIORITY_BEFORE_NG_MODEL=tl;var vl=angular.module("jfkActivityIndicator",[ul.name]);
vl.directive("jfkActivityIndicator",["jfkCommon",function(a){var b="g"===a.prefix_+"",c=function(d){return b?"gActivityIndicator"+ie(d):d};return{replace:!0,restrict:"EAM",scope:{loading:"&"+c("loading"),offline:"&"+c("offline"),size:"@"+c("size"),backgroundColor:"@"+c("backgroundColor")},template:"<span></span>",link:function(d,e,g){var h=new el,k=new fl(h),l=function(m){k.backgroundColor_=m||"#fff"};k.setSize("small"===d.size?1:0);l(d.backgroundColor);k.render(e[0]);pl(a,d.$parent,g,k);nl(a,d.$parent,
g,h);d.$watch(function(m){if(m.offline())return"offline";m=m.loading();return void 0===m||m?"loading":"none"},function(m){h.setState(m)});d.$watch(function(m){return m.backgroundColor},l)}}}]);var wl=function(a,b){this.rows_=a||[];this.useSimilar_=!b};wl.prototype.requestMatchingRows=function(a,b,c){if(this.useSimilar_){var d=this.rows_,e=xl(a,b,d);0==e.length&&(e=yl(a,b,d));b=e}else b=xl(a,b,this.rows_);c(a,b)};
var xl=function(a,b,c){var d=[];if(""!=a){a=ee(a);a=new RegExp("(^|\\W+)"+a,"i");for(var e=0;e<c.length&&d.length<b;e++){var g=c[e];String(g).match(a)&&d.push(g)}}return d},yl=function(a,b,c){for(var d=[],e=0;e<c.length;e++){var g=c[e],h=a.toLowerCase(),k=String(g).toLowerCase(),l=0;if(-1!=k.indexOf(h))l=parseInt((k.indexOf(h)/4).toString(),10);else for(var m=h.split(""),p=-1,r=10,w=0,z;z=m[w];w++)z=k.indexOf(z),z>p?(p=z-p-1,p>r-5&&(p=r-5),l+=p,p=z):(l+=r,r+=5);l<6*h.length&&d.push({str:g,score:l,
index:e})}d.sort(function(B,A){var pa=B.score-A.score;return 0!=pa?pa:B.index-A.index});a=[];for(w=0;w<b&&w<d.length;w++)a.push(d[w].str);return a};var zl=function(a,b,c){K.call(this);this.matcher_=a;this.selectionHandler_=c;this.renderer_=b;Mc(b,["hilite","select","canceldismiss","dismiss"],this.handleEvent,!1,this);this.token_=null;this.rows_=[];this.hiliteId_=-1;this.firstRowId_=0;this.dismissTimer_=this.target_=null;this.inputToAnchorMap_={}};x(zl,K);f=zl.prototype;f.maxMatches_=10;f.autoHilite_=!0;f.allowFreeSelect_=!1;f.wrap_=!1;f.triggerSuggestionsOnUpdate_=!1;f.getToken=function(){return this.token_};
f.handleEvent=function(a){var b=this.matcher_;if(a.target==this.renderer_)switch(a.type){case "hilite":this.hiliteId(a.row);break;case "select":var c=!1;if("number"===typeof a.row){a=a.row;var d=this.rows_[Al(this,a)];c=!!d&&b.isRowDisabled&&b.isRowDisabled(d);d&&!c&&this.hiliteId_!=a&&this.hiliteId(a)}c||Bl(this);break;case "canceldismiss":Cl(this);break;case "dismiss":Dl(this)}};f.isOpen=function(){return this.renderer_.isVisible()};
var El=function(a){for(var b=a.firstRowId_+a.rows_.length-1,c=a.hiliteId_,d=0;d<a.rows_.length;d++){if(c>=a.firstRowId_&&c<b)c++;else if(-1==c)c=a.firstRowId_;else if(a.allowFreeSelect_&&c==b){a.hiliteId(-1);break}else if(a.wrap_&&c==b)c=a.firstRowId_;else break;if(a.hiliteId(c))break}},Fl=function(a){for(var b=a.firstRowId_+a.rows_.length-1,c=a.hiliteId_,d=0;d<a.rows_.length;d++){if(c>a.firstRowId_)c--;else if(a.allowFreeSelect_&&c==a.firstRowId_){a.hiliteId(-1);break}else if(!a.wrap_||-1!=c&&c!=
a.firstRowId_)break;else c=b;if(a.hiliteId(c))break}};zl.prototype.hiliteId=function(a){var b=Al(this,a),c=this.rows_[b];return c&&this.matcher_.isRowDisabled&&this.matcher_.isRowDisabled(c)?!1:(this.hiliteId_=a,this.renderer_.hiliteId(a),-1!=b)};
var Bl=function(a){var b=Al(a,a.hiliteId_);if(-1!=b){var c=a.rows_[b],d=a.selectionHandler_;if(d.activeElement_){var e=c.toString();if(d.multi_){var g=Gl(d,d.getValue(),Hl(d.activeElement_)[0]),h=Il(d,d.getValue());d.separatorCheck_&&!d.separatorCheck_.test(e)&&(e=e.replace(/[\s\xa0]+$/,"")+d.defaultSeparator_);d.whitespaceWrapEntries_&&(0==g||pb(h[g-1])||(e=" "+e),g==h.length-1&&(e+=" "));if(e!=h[g]){h[g]=e;e=d.activeElement_;(F||E)&&e.blur();e.value=h.join("");for(var k=0,l=0;l<=g;l++)k+=h[l].length;
e.focus();d.setCursorPosition(k)}}else d.setValue(e);d.rowJustSelected_=!0}a.triggerSuggestionsOnUpdate_?(a.token_=null,Dl(a)):a.dismiss();a.dispatchEvent({type:"update",row:c,index:b});a.triggerSuggestionsOnUpdate_&&a.selectionHandler_.update(!0);return!0}a.dismiss();a.dispatchEvent({type:"update",row:null,index:null});return!1};
zl.prototype.dismiss=function(){this.hiliteId_=-1;this.token_=null;this.firstRowId_+=this.rows_.length;this.rows_=[];window.clearTimeout(this.dismissTimer_);this.dismissTimer_=null;this.renderer_.dismiss();this.dispatchEvent("suggestionsupdate");this.dispatchEvent("dismiss")};var Dl=function(a){a.dismissTimer_||(a.dismissTimer_=window.setTimeout(u(a.dismiss,a),100))};
zl.prototype.immediatelyCancelDelayedDismiss_=function(){return this.dismissTimer_?(window.clearTimeout(this.dismissTimer_),this.dismissTimer_=null,!0):!1};var Cl=function(a){a.immediatelyCancelDelayedDismiss_()||window.setTimeout(u(a.immediatelyCancelDelayedDismiss_,a),10)};zl.prototype.disposeInternal=function(){zl.superClass_.disposeInternal.call(this);delete this.inputToAnchorMap_;this.renderer_.dispose();this.selectionHandler_.dispose();this.matcher_=null};
zl.prototype.matchListener_=function(a,b,c){this.token_==a&&this.renderRows(b,c)};
zl.prototype.renderRows=function(a,b){var c="object"==wa(b)&&b;b=(c?c.getPreserveHilited():b)?Al(this,this.hiliteId_):-1;this.firstRowId_+=this.rows_.length;this.rows_=a;for(var d=[],e=0;e<a.length;++e)d.push({id:this.firstRowId_+e,data:a[e]});a=null;this.target_&&(a=this.inputToAnchorMap_[Aa(this.target_)]||this.target_);this.renderer_.setAnchorElement(a);this.renderer_.renderRows(d,this.token_,this.target_);a=this.autoHilite_;c&&void 0!==c.getAutoHilite()&&(a=c.getAutoHilite());this.hiliteId_=-1;
(a||0<=b)&&0!=d.length&&this.token_&&(0<=b?this.hiliteId(this.firstRowId_+b):El(this));this.dispatchEvent("suggestionsupdate")};var Al=function(a,b){b-=a.firstRowId_;return 0>b||b>=a.rows_.length?-1:b};zl.prototype.attachInputs=function(a){var b=this.selectionHandler_;b.attachInputs.apply(b,arguments)};zl.prototype.update=function(a){this.selectionHandler_.update(a)};var Hl=function(a){var b=0,c=0;Jl(a)&&(b=a.selectionStart,c=-1);return[b,c]},Jl=function(a){try{return"number"==typeof a.selectionStart}catch(b){return!1}};var Ml=function(a,b,c,d,e,g){if(Ub&&e)return Kl(a);if(e&&!d)return!1;if(!F){"number"===typeof b&&(b=Ll(b));var h=17==b||18==b||Ub&&91==b;if((!c||Ub)&&h||Ub&&16==b&&(d||g))return!1}if((Sb||Qb)&&d&&c)switch(a){case 220:case 219:case 221:case 192:case 186:case 189:case 187:case 188:case 190:case 191:case 192:case 222:return!1}if(E&&d&&b==a)return!1;switch(a){case 13:return F?g||e?!1:!(c&&d):!0;case 27:return!(Sb||Qb||F)}return F&&(d||e||g)?!1:Kl(a)},Kl=function(a){if(48<=a&&57>=a||96<=a&&106>=a||65<=
a&&90>=a||(Sb||Qb)&&0==a)return!0;switch(a){case 32:case 43:case 63:case 64:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:case 163:case 58:return!0;case 173:return F;default:return!1}},Ll=function(a){if(F)a=Nl(a);else if(Ub&&Sb)switch(a){case 93:a=91}return a},Nl=function(a){switch(a){case 61:return 187;case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return a}};var Ol=function(a,b,c,d){lc.call(this,d);this.type="key";this.keyCode=a;this.charCode=b;this.repeat=c};x(Ol,lc);var Ql=function(a,b){K.call(this);a&&Pl(this,a,b)};x(Ql,K);f=Ql.prototype;f.element_=null;f.keyPressKey_=null;f.keyDownKey_=null;f.keyUpKey_=null;f.lastKey_=-1;f.keyCode_=-1;f.altKey_=!1;
var Rl={3:13,12:144,63232:38,63233:40,63234:37,63235:39,63236:112,63237:113,63238:114,63239:115,63240:116,63241:117,63242:118,63243:119,63244:120,63245:121,63246:122,63247:123,63248:44,63272:46,63273:36,63275:35,63276:33,63277:34,63289:144,63302:45},Sl={Up:38,Down:40,Left:37,Right:39,Enter:13,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"U+007F":46,Home:36,End:35,PageUp:33,PageDown:34,Insert:45},Tl=Ub&&F;
Ql.prototype.handleKeyDown_=function(a){if(Sb||Qb)if(17==this.lastKey_&&!a.ctrlKey||18==this.lastKey_&&!a.altKey||Ub&&91==this.lastKey_&&!a.metaKey)this.keyCode_=this.lastKey_=-1;-1==this.lastKey_&&(a.ctrlKey&&17!=a.keyCode?this.lastKey_=17:a.altKey&&18!=a.keyCode?this.lastKey_=18:a.metaKey&&91!=a.keyCode&&(this.lastKey_=91));Ml(a.keyCode,this.lastKey_,a.shiftKey,a.ctrlKey,a.altKey,a.metaKey)?(this.keyCode_=Ll(a.keyCode),Tl&&(this.altKey_=a.altKey)):this.handleEvent(a)};
Ql.prototype.handleKeyup_=function(a){this.keyCode_=this.lastKey_=-1;this.altKey_=a.altKey};
Ql.prototype.handleEvent=function(a){var b=a.event_,c=b.altKey;if(E&&"keypress"==a.type){var d=this.keyCode_;var e=13!=d&&27!=d?b.keyCode:0}else(Sb||Qb)&&"keypress"==a.type?(d=this.keyCode_,e=0<=b.charCode&&63232>b.charCode&&Kl(d)?b.charCode:0):("keypress"==a.type?(Tl&&(c=this.altKey_),b.keyCode==b.charCode?32>b.keyCode?(d=b.keyCode,e=0):(d=this.keyCode_,e=b.charCode):(d=b.keyCode||this.keyCode_,e=b.charCode||0)):(d=b.keyCode||this.keyCode_,e=b.charCode||0),Ub&&63==e&&224==d&&(d=191));var g=d=Ll(d);
d?63232<=d&&d in Rl?g=Rl[d]:25==d&&a.shiftKey&&(g=9):b.keyIdentifier&&b.keyIdentifier in Sl&&(g=Sl[b.keyIdentifier]);if(!F||"keypress"!=a.type||Ml(g,this.lastKey_,a.shiftKey,a.ctrlKey,c,a.metaKey))a=g==this.lastKey_,this.lastKey_=g,b=new Ol(g,e,a,b),b.altKey=c,this.dispatchEvent(b)};Ql.prototype.getElement=function(){return this.element_};
var Pl=function(a,b,c){a.keyUpKey_&&a.detach();a.element_=b;a.keyPressKey_=Mc(a.element_,"keypress",a,c);a.keyDownKey_=Mc(a.element_,"keydown",a.handleKeyDown_,c,a);a.keyUpKey_=Mc(a.element_,"keyup",a.handleKeyup_,c,a)};Ql.prototype.detach=function(){this.keyPressKey_&&(Uc(this.keyPressKey_),Uc(this.keyDownKey_),Uc(this.keyUpKey_),this.keyUpKey_=this.keyDownKey_=this.keyPressKey_=null);this.element_=null;this.keyCode_=this.lastKey_=-1};
Ql.prototype.disposeInternal=function(){Ql.superClass_.disposeInternal.call(this);this.detach()};var Ul=function(a,b,c,d){C.call(this);d=d||150;this.multi_=null!=c?c:!0;this.separators_=a||",;";this.defaultSeparator_=this.separators_.substring(0,1);a=this.multi_?"[\\s"+this.separators_+"]+":"[\\s]+";this.trimmer_=new RegExp("^"+a+"|"+a+"$","g");this.separatorCheck_=new RegExp("\\s*["+this.separators_+"]$");this.literals_=b||"";this.preventSelectionOnTab_=!1;this.preventDefaultOnTab_=this.multi_;this.timer_=0<d?new Ph(d):null;this.eh_=new Ai(this);this.activateHandler_=new Ai(this);this.keyHandler_=
new Ql;this.lastKeyCode_=-1};x(Ul,C);f=Ul.prototype;f.whitespaceWrapEntries_=!0;f.generateNewTokenOnLiteral_=!0;f.upsideDown_=!1;f.separatorUpdates_=!0;f.separatorSelects_=!0;f.activeTimeoutId_=null;f.activeElement_=null;f.lastValue_="";f.waitingForIme_=!1;f.rowJustSelected_=!1;f.updateDuringTyping_=!0;f.getValue=function(){return this.activeElement_.value};f.setValue=function(a){this.activeElement_.value=a};
f.setCursorPosition=function(a){var b=this.activeElement_;Jl(b)&&(b.selectionStart=a);b=this.activeElement_;Jl(b)&&(b.selectionEnd=a)};f.attachInputs=function(a){for(var b=0;b<arguments.length;b++){var c=arguments[b];Ge(c)&&(aj(c,"combobox"),N(c,"autocomplete","list"));this.eh_.listen(c,"focus",this.handleFocus);this.eh_.listen(c,"blur",this.handleBlur);if(!this.activeElement_&&(this.activateHandler_.listen(c,"keydown",this.onKeyDownOnInactiveElement_),Ge(c))){var d=I(c);Re(d)==c&&Vl(this,c)}}};
f.disposeInternal=function(){Ul.superClass_.disposeInternal.call(this);null!=this.activeTimeoutId_&&window.clearTimeout(this.activeTimeoutId_);this.eh_.dispose();delete this.eh_;this.activateHandler_.dispose();this.keyHandler_.dispose();jb(this.timer_)};
f.handleKeyEvent=function(a){switch(a.keyCode){case 40:if(this.ac_.isOpen())return this.upsideDown_?Fl(this.ac_):El(this.ac_),a.preventDefault(),!0;if(!this.multi_)return this.update(!0),a.preventDefault(),!0;break;case 38:if(this.ac_.isOpen())return this.upsideDown_?El(this.ac_):Fl(this.ac_),a.preventDefault(),!0;break;case 9:if(!this.ac_.isOpen()||a.shiftKey||this.preventSelectionOnTab_)this.ac_.dismiss();else if(this.update(),Bl(this.ac_)&&this.preventDefaultOnTab_)return a.preventDefault(),!0;
break;case 13:if(this.ac_.isOpen()){if(this.update(),Bl(this.ac_))return a.preventDefault(),a.stopPropagation(),!0}else this.ac_.dismiss();break;case 27:if(this.ac_.isOpen())return this.ac_.dismiss(),a.preventDefault(),a.stopPropagation(),!0;break;case 229:if(!this.waitingForIme_)return this.waitingForIme_||(this.eh_.listen(this.activeElement_,"keyup",this.onKeyUp_),this.eh_.listen(this.activeElement_,"keypress",this.onKeyPress_),this.waitingForIme_=!0),!0;break;default:this.timer_&&!this.updateDuringTyping_&&
(this.timer_.stop(),this.timer_.start())}return Wl(this,a)};var Wl=function(a,b){var c=a.multi_&&b.charCode&&-1!=a.separators_.indexOf(String.fromCharCode(b.charCode));a.separatorUpdates_&&c&&a.update();return a.separatorSelects_&&c&&Bl(a.ac_)?(b.preventDefault(),!0):!1};Ul.prototype.handleKeyUp=function(){return!1};Ul.prototype.handleFocus=function(a){Vl(this,a.target||null)};
var Vl=function(a,b){a.activateHandler_.removeAll();a.ac_&&Cl(a.ac_);b!=a.activeElement_&&(a.activeElement_=b,a.timer_&&(a.timer_.start(),a.eh_.listen(a.timer_,"tick",a.onTick_)),a.lastValue_=a.getValue(),Pl(a.keyHandler_,a.activeElement_),a.eh_.listen(a.keyHandler_,"key",a.onKey_),a.eh_.listen(a.activeElement_,"mousedown",a.onMouseDown_),E&&a.eh_.listen(a.activeElement_,"keypress",a.onIeKeyPress_))};f=Ul.prototype;
f.handleBlur=function(){this.activeElement_&&(this.eh_.unlisten(this.keyHandler_,"key",this.onKey_),this.keyHandler_.detach(),this.eh_.unlisten(this.activeElement_,"keyup",this.handleKeyUp),this.eh_.unlisten(this.activeElement_,"mousedown",this.onMouseDown_),E&&this.eh_.unlisten(this.activeElement_,"keypress",this.onIeKeyPress_),this.waitingForIme_&&Xl(this),this.activeElement_=null,this.timer_&&(this.timer_.stop(),this.eh_.unlisten(this.timer_,"tick",this.onTick_)),this.ac_&&Dl(this.ac_))};
f.onTick_=function(){this.update()};f.onKeyDownOnInactiveElement_=function(a){this.handleFocus(a)};f.onKey_=function(a){this.lastKeyCode_=a.keyCode;this.ac_&&this.handleKeyEvent(a)};f.onKeyPress_=function(){this.waitingForIme_&&229!=this.lastKeyCode_&&Xl(this)};f.onKeyUp_=function(a){this.waitingForIme_&&(13==a.keyCode||77==a.keyCode&&a.ctrlKey)&&Xl(this)};f.onMouseDown_=function(a){this.ac_&&this.handleMouseDown(a)};f.handleMouseDown=function(){};
var Xl=function(a){a.waitingForIme_&&(a.waitingForIme_=!1,a.eh_.unlisten(a.activeElement_,"keypress",a.onKeyPress_),a.eh_.unlisten(a.activeElement_,"keyup",a.onKeyUp_))};Ul.prototype.onIeKeyPress_=function(a){Wl(this,a)};
Ul.prototype.update=function(a){if(this.activeElement_&&(a||this.getValue()!=this.lastValue_)){if(a||!this.rowJustSelected_){a=Hl(this.activeElement_)[0];var b=this.getValue();a=Il(this,b)[Gl(this,b,a)];a=this.trimmer_?String(a).replace(this.trimmer_,""):a;if(this.ac_){this.ac_.target_=this.activeElement_;b=this.ac_;var c=this.getValue();b.token_!=a&&(b.token_=a,b.matcher_.requestMatchingRows(b.token_,b.maxMatches_,u(b.matchListener_,b),c),Cl(b))}}this.lastValue_=this.getValue()}this.rowJustSelected_=
!1};var Gl=function(a,b,c){a=Il(a,b);if(c==b.length)return a.length-1;for(var d=b=0,e=0;d<a.length&&e<=c;d++)e+=a[d].length,b=d;return b},Il=function(a,b){if(!a.multi_)return[b];b=String(b).split("");for(var c=[],d=[],e=0,g=!1;e<b.length;e++)a.literals_&&-1!=a.literals_.indexOf(b[e])?(a.generateNewTokenOnLiteral_&&!g&&(c.push(d.join("")),d.length=0),d.push(b[e]),g=!g):g||-1==a.separators_.indexOf(b[e])?d.push(b[e]):(d.push(b[e]),c.push(d.join("")),d.length=0);c.push(d.join(""));return c};var Yl=function(a,b,c){C.call(this);this.url_=a;this.useSimilar_=!b;this.xhr_=new Th(c)};x(Yl,C);f=Yl.prototype;f.method_="GET";f.content_=void 0;f.headers_=null;f.lastListenerKey_=null;f.setContent=function(a){this.content_=a};f.xhrCallback=function(a,b,c){c=gi(c.target);var d=[];if(c)try{d=JSON.parse(c)}catch(e){}b(a,d)};
f.requestMatchingRows=function(a,b,c){var d=this.useSimilar_;var e=new ji(this.url_);L(e);e.queryData_.set("token",a);b=String(b);L(e);e.queryData_.set("max_matches",b);d=String(Number(d));L(e);e.queryData_.set("use_similar",d);if(e=e.toString())a=u(this.xhrCallback,this,a,c),this.xhr_.isActive()&&this.xhr_.abort(),this.lastListenerKey_&&Uc(this.lastListenerKey_),this.lastListenerKey_=Lc(this.xhr_,"success",a),this.xhr_.send(e,this.method_,this.content_,this.headers_)};
f.disposeInternal=function(){this.xhr_.dispose();Yl.superClass_.disposeInternal.call(this)};var Zl=function(a,b,c){C.call(this);this.listener_=a;this.interval_=b||0;this.handler_=c;this.callback_=u(this.doAction_,this)};x(Zl,C);f=Zl.prototype;f.id_=0;f.disposeInternal=function(){Zl.superClass_.disposeInternal.call(this);this.stop();delete this.listener_;delete this.handler_};f.start=function(a){this.stop();this.id_=Qh(this.callback_,void 0!==a?a:this.interval_)};f.stop=function(){this.isActive()&&q.clearTimeout(this.id_);this.id_=0};f.isActive=function(){return 0!=this.id_};
f.doAction_=function(){this.id_=0;this.listener_&&this.listener_.call(this.handler_)};var yc={},$l=null,am=function(a){a=Aa(a);delete yc[a];xc()&&$l&&$l.stop()},cm=function(){$l||($l=new Zl(function(){bm()},20));var a=$l;a.isActive()||a.start()},bm=function(){var a=Date.now();rc(yc,function(b){dm(b,a)});xc()||cm()};var em=function(){K.call(this);this.state_=0;this.endTime=this.startTime=null};x(em,K);em.prototype.onBegin=function(){this.dispatchAnimationEvent("begin")};em.prototype.onEnd=function(){this.dispatchAnimationEvent("end")};em.prototype.onStop=function(){this.dispatchAnimationEvent("stop")};em.prototype.dispatchAnimationEvent=function(a){this.dispatchEvent(a)};var fm=function(a,b,c,d){em.call(this);if(!Array.isArray(a)||!Array.isArray(b))throw Error("Start and end parameters must be arrays");if(a.length!=b.length)throw Error("Start and end points must be the same length");this.startPoint=a;this.endPoint=b;this.duration=c;this.accel_=d;this.coords=[];this.progress=0;this.lastFrame=null};x(fm,em);f=fm.prototype;
f.play=function(a){if(a||0==this.state_)this.progress=0,this.coords=this.startPoint;else if(1==this.state_)return!1;am(this);this.startTime=a=Date.now();-1==this.state_&&(this.startTime-=this.duration*this.progress);this.endTime=this.startTime+this.duration;this.lastFrame=this.startTime;if(!this.progress)this.onBegin();this.dispatchAnimationEvent("play");-1==this.state_&&this.dispatchAnimationEvent("resume");this.state_=1;var b=Aa(this);b in yc||(yc[b]=this);cm();dm(this,a);return!0};
f.stop=function(a){am(this);this.state_=0;a&&(this.progress=1);gm(this,this.progress);this.onStop();this.onEnd()};f.pause=function(){1==this.state_&&(am(this),this.state_=-1,this.dispatchAnimationEvent("pause"))};f.disposeInternal=function(){0==this.state_||this.stop(!1);this.dispatchAnimationEvent("destroy");fm.superClass_.disposeInternal.call(this)};f.destroy=function(){this.dispose()};
var dm=function(a,b){La(a.startTime);La(a.endTime);La(a.lastFrame);b<a.startTime&&(a.endTime=b+a.endTime-a.startTime,a.startTime=b);a.progress=(b-a.startTime)/(a.endTime-a.startTime);1<a.progress&&(a.progress=1);a.lastFrame=b;gm(a,a.progress);if(1==a.progress)a.state_=0,am(a),a.dispatchAnimationEvent("finish"),a.onEnd();else if(1==a.state_)a.onAnimate()},gm=function(a,b){"function"===typeof a.accel_&&(b=a.accel_(b));a.coords=Array(a.startPoint.length);for(var c=0;c<a.startPoint.length;c++)a.coords[c]=
(a.endPoint[c]-a.startPoint[c])*b+a.startPoint[c]};fm.prototype.onAnimate=function(){this.dispatchAnimationEvent("animate")};fm.prototype.dispatchAnimationEvent=function(a){this.dispatchEvent(new hm(a,this))};var hm=function(a,b){lb.call(this,a);this.coords=b.coords;this.x=b.coords[0];this.y=b.coords[1];this.z=b.coords[2];this.duration=b.duration;this.progress=b.progress;this.state=b.state_};x(hm,lb);var im=function(){if(Vb){var a=/Windows NT ([0-9.]+)/;return(a=a.exec(Cb()))?a[1]:"0"}return Ub?(a=/1[0|1][_.][0-9_.]+/,(a=a.exec(Cb()))?a[0].replace(/_/g,"."):"10"):Wb?(a=/Android\s+([^\);]+)(\)|;)/,(a=a.exec(Cb()))?a[1]:""):Xb||Yb||Zb?(a=/(?:iPhone|CPU)\s+OS\s+(\S+)/,(a=a.exec(Cb()))?a[1].replace(/_/g,"."):""):""}();var jm=Eb(),km=Ib()||D("iPod"),lm=D("iPad"),mm=D("Android")&&!(Fb()||Eb()||D("Opera")||D("Silk")),nm=Fb(),om;if(om=D("Safari")){var pm;(pm=Fb()||D("Coast")||D("Opera")||D("Edge")||D("Edg/"))||(pm=D("OPR"));om=!(pm||Eb()||D("Silk")||D("Android"))}var qm=om&&!Jb();var rm=function(a){return(a=a.exec(Cb()))?a[1]:""},sm=function(){if(jm)return rm(/Firefox\/([0-9.]+)/);if(E||Qb||Pb)return fc;if(nm){if(Jb()||D("Macintosh")){var a=rm(/CriOS\/([0-9.]+)/);if(a)return a}return rm(/Chrome\/([0-9.]+)/)}if(qm&&!Jb())return rm(/Version\/([0-9.]+)/);if(km||lm){if(a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Cb()))return a[1]+"."+a[2]}else if(mm)return(a=rm(/Android\s+([0-9.]+)/))?a:rm(/Version\/([0-9.]+)/);return""}();var tm=function(a,b,c,d,e){fm.call(this,b,c,d,e);this.element=a};x(tm,fm);f=tm.prototype;f.updateStyle=function(){};f.isRightToLeft=function(){void 0===this.rightToLeft_&&(this.rightToLeft_=Hj(this.element));return this.rightToLeft_};f.onAnimate=function(){this.updateStyle();tm.superClass_.onAnimate.call(this)};f.onEnd=function(){this.updateStyle();tm.superClass_.onEnd.call(this)};f.onBegin=function(){this.updateStyle();tm.superClass_.onBegin.call(this)};
var um=function(a,b,c,d,e){"number"===typeof b&&(b=[b]);"number"===typeof c&&(c=[c]);tm.call(this,a,b,c,d,e);if(1!=b.length||1!=c.length)throw Error("Start and end points must be 1D");this.lastOpacityUpdate_=-1};x(um,tm);var vm=1/1024;f=um.prototype;
f.updateStyle=function(){var a=this.coords[0];if(Math.abs(a-this.lastOpacityUpdate_)>=vm){var b=this.element;y(b);b=b.style;"opacity"in b?b.opacity=a:"MozOpacity"in b?b.MozOpacity=a:"filter"in b&&(b.filter=""===a?"":"alpha(opacity="+100*Number(a)+")");this.lastOpacityUpdate_=a}};f.onBegin=function(){this.lastOpacityUpdate_=-1;um.superClass_.onBegin.call(this)};f.onEnd=function(){this.lastOpacityUpdate_=-1;um.superClass_.onEnd.call(this)};f.show=function(){this.element.style.display=""};
f.hide=function(){this.element.style.display="none"};var wm=function(a,b,c){um.call(this,a,1,0,b,c)};x(wm,um);wm.prototype.onBegin=function(){this.show();wm.superClass_.onBegin.call(this)};wm.prototype.onEnd=function(){this.hide();wm.superClass_.onEnd.call(this)};var xm=function(a,b,c){um.call(this,a,0,1,b,c)};x(xm,um);xm.prototype.onBegin=function(){this.show();xm.superClass_.onBegin.call(this)};var Am=function(a,b,c,d,e,g,h,k,l){y(c);var m=ym(c),p=Gj(a),r=yj(a);r&&p.intersection(new oj(r.left,r.top,r.right-r.left,r.bottom-r.top));r=ke(a);var w=ke(c);if(r.document_!=w.document_){var z=r.document_.body;w=te(w.document_);var B=new G(0,0);var A=(A=I(z))?te(A):window;if(Mb(A,"parent")){var pa=z;do{var Kb=A==w?xj(pa):Ej(y(pa));B.x+=Kb.x;B.y+=Kb.y}while(A&&A!=w&&A!=A.parent&&(pa=A.frameElement)&&(A=A.parent))}z=Yd(B,xj(z));!E||9<=Number(jc)||qe(r.document_)||(z=Yd(z,ue(r.document_)));p.left+=z.x;
p.top+=z.y}a=zm(a,b);b=p.left;a&4?b+=p.width:a&2&&(b+=p.width/2);p=new G(b,p.top+(a&1?p.height:0));p=Yd(p,m);e&&(p.x+=(a&4?-1:1)*e.x,p.y+=(a&1?-1:1)*e.y);if(h)if(l)var H=l;else if(H=yj(c))H.top-=m.y,H.right-=m.x,H.bottom-=m.y,H.left-=m.x;e=H;l=p.clone();m=zm(c,d);d=Fj(c);H=k?k.clone():d.clone();k=l;l=H;k=k.clone();l=l.clone();H=0;if(g||0!=m)m&4?k.x-=l.width+(g?g.right:0):m&2?k.x-=l.width/2:g&&(k.x+=g.left),m&1?k.y-=l.height+(g?g.bottom:0):g&&(k.y+=g.top);h&&(e?(g=k,m=l,H=0,65==(h&65)&&(g.x<e.left||
g.x>=e.right)&&(h&=-2),132==(h&132)&&(g.y<e.top||g.y>=e.bottom)&&(h&=-5),g.x<e.left&&h&1&&(g.x=e.left,H|=1),h&16&&(p=g.x,g.x<e.left&&(g.x=e.left,H|=4),g.x+m.width>e.right&&(m.width=Math.min(e.right-g.x,p+m.width-e.left),m.width=Math.max(m.width,0),H|=4)),g.x+m.width>e.right&&h&1&&(g.x=Math.max(e.right-m.width,e.left),H|=1),h&2&&(H|=(g.x<e.left?16:0)|(g.x+m.width>e.right?32:0)),g.y<e.top&&h&4&&(g.y=e.top,H|=2),h&32&&(p=g.y,g.y<e.top&&(g.y=e.top,H|=8),g.y+m.height>e.bottom&&(m.height=Math.min(e.bottom-
g.y,p+m.height-e.top),m.height=Math.max(m.height,0),H|=8)),g.y+m.height>e.bottom&&h&4&&(g.y=Math.max(e.bottom-m.height,e.top),H|=2),h&8&&(H|=(g.y<e.top?64:0)|(g.y+m.height>e.bottom?128:0)),h=H):h=256,H=h);g=new oj(0,0,0,0);g.left=k.x;g.top=k.y;g.width=l.width;g.height=l.height;h=H;h&496||(uj(c,new G(g.left,g.top)),H=new Zd(g.width,g.height),d==H||d&&H&&d.width==H.width&&d.height==H.height||(g=H,k=I(c),d=qe(ke(k).document_),!E||gc("10")||d?(c=c.style,F?c.MozBoxSizing="border-box":Sb?c.WebkitBoxSizing=
"border-box":c.boxSizing="border-box",c.width=Math.max(g.width,0)+"px",c.height=Math.max(g.height,0)+"px"):(k=c.style,d?(E?(d=Lj(c,"paddingLeft"),e=Lj(c,"paddingRight"),l=Lj(c,"paddingTop"),m=Lj(c,"paddingBottom"),d=new nj(l,e,m,d)):(d=rj(c,"paddingLeft"),e=rj(c,"paddingRight"),l=rj(c,"paddingTop"),m=rj(c,"paddingBottom"),d=new nj(parseFloat(l),parseFloat(e),parseFloat(m),parseFloat(d))),c=zj(c),k.pixelWidth=g.width-c.left-d.left-d.right-c.right,k.pixelHeight=g.height-c.top-d.top-d.bottom-c.bottom):
(k.pixelWidth=g.width,k.pixelHeight=g.height))));return h},ym=function(a){if(a=a.offsetParent){var b="HTML"==a.tagName||"BODY"==a.tagName;if(!b||"static"!=sj(a,"position")){var c=xj(a);if(!b){b=Hj(a);var d;if(d=b){d=qm&&0<=Bb(sm,10);var e;if(e=$b)e=0<=Bb(im,10);var g=nm&&0<=Bb(sm,85);d=F||d||e||g}b=d?-a.scrollLeft:b&&!Rb&&"visible"!=sj(a,"overflowX")?a.scrollWidth-a.clientWidth-a.scrollLeft:a.scrollLeft;c=Yd(c,new G(b,a.scrollTop))}}}return c||new G},zm=function(a,b){return(b&8&&Hj(a)?b^4:b)&-9};var Bm=function(a,b,c,d){K.call(this);this.parent_=a||document.body;this.dom_=ke(this.parent_);this.reposition_=!a;this.element_=null;this.token_="";this.rows_=[];this.rowDivs_=[];this.startRenderingRows_=this.hilitedRow_=-1;this.visible_=!1;this.className="ac-renderer";this.rowClassName="ac-row";this.legacyActiveClassName_="active";this.activeClassName="ac-active";this.highlightedClassName="ac-highlighted";this.customRenderer_=b||null;this.useStandardHighlighting_=null!=d?d:!0;this.matchWordBoundary_=
!0;this.highlightAllTokens_=!1;this.rightAlign_=!!c;this.topAlign_=!1;this.menuFadeDuration_=0;this.showScrollbarsIfTooLarge_=!1};x(Bm,K);f=Bm.prototype;f.borderWidth_=0;f.getElement=function(){return this.element_};f.setAnchorElement=function(a){this.anchorElement_=a};f.renderRows=function(a,b,c){this.token_=b;this.rows_=a;this.hilitedRow_=-1;this.startRenderingRows_=Date.now();this.target_=c;this.rowDivs_=[];Cm(this)};
f.dismiss=function(){this.visible_&&(this.visible_=!1,Dm(this,!1),0<this.menuFadeDuration_?(jb(this.animation_),this.animation_=new wm(this.element_,this.menuFadeDuration_),this.animation_.play()):Q(this.element_,!1))};f.show=function(){this.visible_||(this.visible_=!0,Dm(this,!0),0<this.menuFadeDuration_?(jb(this.animation_),this.animation_=new xm(this.element_,this.menuFadeDuration_),this.animation_.play()):Q(this.element_,!0))};
var Dm=function(a,b){a.target_&&(N(a.target_,"haspopup",b),N(y(a.element_),"expanded",b),N(a.target_,"expanded",b),b?N(a.target_,"owns",a.element_.id):(a.target_.removeAttribute(bj("owns")),ej(a.target_,null)))};Bm.prototype.isVisible=function(){return this.visible_};
var Em=function(a,b){var c=0<=b&&b<a.rows_.length?a.rows_[b]:void 0,d=0<=b&&b<a.rowDivs_.length?a.rowDivs_[b]:void 0;a.dispatchEvent({type:"rowhilite",rowNode:d,row:c?c.data:null})&&(0<=a.hilitedRow_&&lj(y(a.rowDivs_[a.hilitedRow_]),[a.activeClassName,a.legacyActiveClassName_]),a.hilitedRow_=b,d&&(jj(d,[a.activeClassName,a.legacyActiveClassName_]),a.target_&&ej(a.target_,d),Bj(d,a.element_)))};
Bm.prototype.hiliteId=function(a){if(-1==a)Em(this,-1);else for(var b=0;b<this.rows_.length;b++)if(this.rows_[b].id==a){Em(this,b);break}};
var Fm=function(a){if(!a.element_){var b=a.dom_.createDom("DIV",{style:"display:none"});a.showScrollbarsIfTooLarge_&&(b.style.overflowY="auto");a.element_=b;y(b);jj(b,qb(a.className).split(" "));aj(b,"listbox");b.id=Pj(Oj.getInstance());a.dom_.appendChild(a.parent_,b);Mc(b,"click",a.handleClick_,!1,a);Mc(b,"mousedown",a.handleMouseDown_,!1,a);Mc(b,"mouseover",a.handleMouseOver_,!1,a)}},Cm=function(a){Fm(a);a.topAlign_&&(a.element_.style.visibility="hidden");a.widthProvider_&&(a.element_.style.minWidth=
a.widthProvider_.clientWidth-a.borderWidth_+"px");a.maxWidthProvider_&&(a.element_.style.maxWidth=a.maxWidthProvider_.clientWidth-a.borderWidth_+"px");a.rowDivs_.length=0;a.dom_.removeChildren(a.element_);if(a.customRenderer_&&a.customRenderer_.render)a.customRenderer_.render(a,a.element_,a.rows_,a.token_);else{var b=null;a.rows_.forEach(function(c){var d=this.token_,e=this.dom_.createDom("DIV",{className:this.rowClassName,id:Pj(Oj.getInstance())});aj(e,"option");this.customRenderer_&&this.customRenderer_.renderRow?
this.customRenderer_.renderRow(c,d,e):Ie(e,c.data.toString());d&&this.useStandardHighlighting_&&(this.wasHighlightedAtLeastOnce_=!1,Gm(this,e,d));O(e,this.rowClassName);this.rowDivs_.push(e);c=e;this.topAlign_?this.element_.insertBefore(c,b):this.dom_.appendChild(this.element_,c);b=c},a)}0==a.rows_.length?a.dismiss():(a.show(),a.reposition(),Jj(a.element_,!0))};
Bm.prototype.reposition=function(){if(this.target_&&this.reposition_){var a=this.anchorElement_||this.target_;var b=this.rightAlign_?5:1;this.topAlign_&&(b^=1);var c=65;this.showScrollbarsIfTooLarge_&&(this.element_.style.height="",c|=32);Am(a,b,this.element_,b^1,null,null,c);this.topAlign_&&(this.element_.style.visibility="visible")}};
Bm.prototype.disposeInternal=function(){this.element_&&(Tc(this.element_,"click",this.handleClick_,!1,this),Tc(this.element_,"mousedown",this.handleMouseDown_,!1,this),Tc(this.element_,"mouseover",this.handleMouseOver_,!1,this),this.dom_.removeNode(this.element_),this.element_=null,this.visible_=!1);jb(this.animation_);this.parent_=null;Bm.superClass_.disposeInternal.call(this)};
var Gm=function(a,b,c){if(a.highlightAllTokens_||!a.wasHighlightedAtLeastOnce_)if(3==b.nodeType){var d=null;Array.isArray(c)&&1<c.length&&!a.highlightAllTokens_&&(d=c.slice(1));c=Hm(a,c);if(0!=c.length){var e=b.nodeValue,g=a.matchWordBoundary_?new RegExp("\\b(?:"+c+")","gi"):new RegExp(c,"gi");c=[];for(var h=0,k=g.exec(e),l=0;k;)l++,c.push(e.substring(h,k.index)),c.push(e.substring(k.index,g.lastIndex)),h=g.lastIndex,k=g.exec(e);c.push(e.substring(h));if(1<c.length){d=a.highlightAllTokens_?l:1;for(e=
0;e<d;e++)g=2*e,b.nodeValue=c[g],h=a.dom_.createElement("B"),h.className=a.highlightedClassName,a.dom_.appendChild(h,a.dom_.createTextNode(c[g+1])),h=b.parentNode.insertBefore(h,b.nextSibling),b.parentNode.insertBefore(a.dom_.createTextNode(""),h.nextSibling),b=h.nextSibling;b.nodeValue=c.slice(2*d).join("");a.wasHighlightedAtLeastOnce_=!0}else d&&Gm(a,b,d)}}else for(b=b.firstChild;b;)d=b.nextSibling,Gm(a,b,c),b=d},Hm=function(a,b){var c="";if(!b)return c;Array.isArray(b)&&(b=b.filter(function(d){return!pb(ge(d))}));
a.highlightAllTokens_?Array.isArray(b)?c=b.map(ee).join("|"):(c=b.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,""),c=ee(c),c=c.replace(/ /g,"|")):Array.isArray(b)?c=0<b.length?ee(b[0]):"":/^\W/.test(b)||(c=ee(b));return c},Im=function(a,b){for(;b&&b!=a.element_&&!ij(b,a.rowClassName);)b=b.parentNode;return b?a.rowDivs_.indexOf(b):-1};Bm.prototype.handleClick_=function(a){var b=Im(this,a.target);0<=b&&this.dispatchEvent({type:"select",row:this.rows_[b].id});a.stopPropagation()};
Bm.prototype.handleMouseDown_=function(a){a.stopPropagation();a.preventDefault()};Bm.prototype.handleMouseOver_=function(a){a=Im(this,a.target);0<=a&&!(300>Date.now()-this.startRenderingRows_)&&this.dispatchEvent({type:"hilite",row:this.rows_[a].id})};var S=angular.module("jfkAutocomplete",[ul.name]);S.RENDERER_CLASS_NAME="goog-menu jfk-ac-renderer";S.ROW_CLASS_NAME="goog-menuitem";S.ACTIVE_ROW_CLASS_NAME="goog-menuitem-highlight";S.INPUT_CLASS_NAME="jfk-textinput";S.CONFLICTING_ATTRIBUTES_=["values","url","customMatcher"];S.XSSI_PREFIX_=")]}'\n";var Jm=function(a,b){Yl.call(this,a,b)};n(Jm,Yl);
Jm.prototype.xhrCallback=function(a,b,c){var d=c.target;c=S.XSSI_PREFIX_;if(d.xhr_)b:{d=d.xhr_.responseText,c&&0==d.indexOf(c)&&(d=d.substring(c.length)),c=d;if(q.JSON)try{var e=q.JSON.parse(c);y("object"==typeof e);var g=e;break b}catch(h){}g=qh(c)}else g=void 0;b(a,g)};
S.directive("jfkAutocomplete",["$parse","jfkCommon",function(a,b){return{restrict:"A",require:"?ngModel",link:function(c,d,e,g){S.validateAttributes_(e);var h,k=e.hasOwnProperty("fuzzy"),l=e.hasOwnProperty("createMenuInParent");if(e.hasOwnProperty("ngList")){var m=e.ngList||",";y("/"!=m[0]!=m[m.length-1],"Invalid ngList value: "+m+" Autocomplete input does not support regular expressions")}pe(d[0],{autocomplete:"off"});d.addClass(S.INPUT_CLASS_NAME);S.setAccessibilityProperties_(d[0]);e.hasOwnProperty("values")&&
c.$watch(e.values,function(p){h=S.rebuildAutocomplete_(b,c,e,g,h,new wl(p,!k),d[0],m,l)},!0);e.hasOwnProperty("url")&&c.$watch(e.url,function(p){p=new Jm(p,!k);h=S.rebuildAutocomplete_(b,c,e,g,h,p,d[0],m,l)});e.hasOwnProperty("customMatcher")&&c.$watch(e.customMatcher,function(p){h=S.rebuildAutocomplete_(b,c,e,g,h,{requestMatchingRows:p},d[0],m,l)})}}}]);
S.validateAttributes_=function(a){var b=0;Ua(S.CONFLICTING_ATTRIBUTES_,function(c){a.hasOwnProperty(c)&&b++});if(1!=b)throw Error("Exactly one attribute must be set of the following: "+S.CONFLICTING_ATTRIBUTES_);};S.setAccessibilityProperties_=function(a){aj(a,"combobox");N(a,"autocomplete","list")};S.createRenderer_=function(a,b){a=new Bm(b,a);a.className=S.RENDERER_CLASS_NAME;a.rowClassName=S.ROW_CLASS_NAME;a.activeClassName=S.ACTIVE_ROW_CLASS_NAME;return a};
S.attachAutocomplete_=function(a,b,c,d,e,g){e=S.createRenderer_(e,g?b.parentNode:void 0);e.matchWordBoundary_=!d;a=new zl(a,e,c);c.ac_=a;c.attachInputs(b);return a};
S.rebuildAutocomplete_=function(a,b,c,d,e,g,h,k,l){e&&e.dispose();c.hasOwnProperty("customInputHandler")?(y(!c.hasOwnProperty("ngList")||pb(ge(c.ngList)),"Custom input handler and ngList with delimiter values are mutually exclusive properties."),e=b.$eval(c.customInputHandler),y(e,"Custom input handler must be defined.")):e=new Ul(k,null,null!=k);if(c.hasOwnProperty("customRenderer")){var m=b.$eval(c.customRenderer);y(m,"Custom renderer must be defined.")}var p=!1;c.hasOwnProperty("matchWithinWords")&&
(p="true"==c.matchWithinWords);e=S.attachAutocomplete_(g,h,e,p,m,l);c.maxMatches&&(e.maxMatches_=c.maxMatches);c.hasOwnProperty("autoHilite")&&(e.autoHilite_="true"==c.autoHilite);c.hasOwnProperty("allowFreeSelect")&&(e.allowFreeSelect_="true"==c.allowFreeSelect);c.hasOwnProperty("triggerSuggestionsOnUpdate")&&(e.triggerSuggestionsOnUpdate_="true"==c.triggerSuggestionsOnUpdate);d&&ql(b,e,"update",function(r){b.$apply(function(){null!=k?d.$setViewValue(h.value):null!=r.row&&d.$setViewValue(r.row)})});
pl(a,b,c,e);return e};var Km={LEFT:0,BOTTOM:1,TOP:2,RIGHT:3};/*
SPDX-License-Identifier: Apache-2.0
*/
var Lm="href rel src srcdoc action formaction sandbox cite poster icon style".split(" ");var Mm={};var Nm=function(){},Om=function(a,b){if(b!==Mm)throw Error("Bad secret");this.privateDoNotAccessOrElseWrappedAttrPrefix=a};n(Om,Nm);Om.prototype.toString=function(){return this.privateDoNotAccessOrElseWrappedAttrPrefix};function Pm(a){if(!Array.isArray(a)||!Array.isArray(a.raw))throw new TypeError("safeAttr is a template literal tag function and should be called using the tagged template syntax. For example, safeAttr`foo`;");};var Qm={sanitizedContentKindHtml:!0},Rm={sanitizedContentHtmlAttribute:!0},Sm=function(){throw Error("Do not instantiate directly");};Sm.prototype.contentDir=null;Sm.prototype.getContent=function(){return this.content};Sm.prototype.toString=function(){return this.content};var Tm=function(a){if(a.contentKind!==Qm)throw Error("Sanitized content was not of kind HTML.");return Sd(new ed(cd,"Soy SanitizedContent of kind HTML produces SafeHtml-contract-compliant value."),a.toString())},Um=function(){Sm.call(this)};
x(Um,Sm);Um.prototype.contentKind=Qm;var Vm=function(){Sm.call(this)};x(Vm,Sm);Vm.prototype.contentKind=Rm;Vm.prototype.contentDir=1;var Wm=function(a,b,c){(b=null!=a&&a.contentKind===b)&&y(a.constructor===c);return b};var Xm=function(a){if(null!=a)switch(a.contentDir){case 1:return 1;case -1:return-1;case 0:return 0}return null},Ym=function(a){function b(c){this.content=c}b.prototype=a.prototype;return function(c,d){c=new b(String(c));void 0!==d&&(c.contentDir=d);return c}}(Um),Zm={},T=function(a){Wm(a,Qm,Um)?(a=a.getContent(),a=String(a).replace($m,"").replace(an,"<"),a=String(a).replace(bn,cn)):a=String(a).replace(dn,cn);return a},en=function(a){Wm(a,Rm,Vm)&&(a=a.getContent());return(a&&!a.startsWith(" ")?
" ":"")+a},fn={},gn=function(){y(fn===fn,"found an incorrect call marker, was an internal function called from the top level?")},hn={"\x00":"�","\t":"	","\n":" ","\v":"","\f":"","\r":" "," ":" ",'"':""","&":"&","'":"'","-":"-","/":"/","<":"<","=":"=",">":">","`":"`","\u0085":"…","\u00a0":" ","\u2028":"
","\u2029":"
"},cn=function(a){return hn[a]},dn=/[\x00\x22\x26\x27\x3c\x3e]/g,bn=/[\x00\x22\x27\x3c\x3e]/g,jn=/^(?!on|src|(?:action|archive|background|cite|classid|codebase|content|data|dsync|href|http-equiv|longdesc|style|usemap)\s*$)(?:[a-z0-9_$:-]*)$/i,
kn=function(a){a=String(a);return jn.test(a)?a:(Ka("Bad value `%s` for |filterHtmlAttributes",[a]),"zSoyz")},$m=/<(?:!|\/?([a-zA-Z][a-zA-Z0-9:\-]*))(?:[^>'"]|"[^"]*"|'[^']*')*>/g,an=/</g;/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
function ln(a,b,c){a=a(b||mn,void 0);c=(c||ke()).createElement("DIV");t(a)?a instanceof Sm?a=Tm(a):(Ka("Soy template output is unsafe for use as HTML: "+a),a=Kd("zSoyz")):a=Kd(String(a));b=a.getTypedStringValue();var d=b.match(nn);y(!d,"This template starts with a %s, which cannot be a child of a <div>, as required by soy internals. Consider using goog.soy.renderElement instead.\nTemplate output: %s",d&&d[0],b);Vd(c,a);1==c.childNodes.length&&(a=c.firstChild,1==a.nodeType&&(c=a));return c}
var nn=/^<(body|caption|col|colgroup|head|html|tr|td|th|tbody|thead|tfoot)>/i,mn={};var on=function(a,b){var c=a.showCloseBox;a=a.uid;gn();Zm["jfk.templates.bubble.main"]?c=Zm["jfk.templates.bubble.main"]({showCloseBox:c,uid:a},b):(b='<div class="'+T("jfk-bubble")+'" role="alertdialog"'+(a?' aria-describedby="'+T(a)+'"':"")+'><div class="'+T("jfk-bubble-content-id")+'"'+(a?' id="'+T(a)+'"':"")+"></div>",c&&(b+='<div class="'+T("jfk-bubble-closebtn-id")+" "+T("jfk-bubble-closebtn")+'" aria-label="',b+="Close".replace(bn,cn),b+='" role="button" tabindex=0></div>'),b+='<div class="'+
T("jfk-bubble-arrow-id")+" "+T("jfk-bubble-arrow")+'"><div class="'+T("jfk-bubble-arrowimplbefore")+'"></div><div class="'+T("jfk-bubble-arrowimplafter")+'"></div></div></div>',c=Ym(b));return c};var pn=function(){};pn.prototype.reposition=function(){};var qn=function(a,b){this.className_=a;this.disableSubpixels_=!!b;this.arrowClassMap_={0:this.className_+"-arrowright",1:this.className_+"-arrowup",2:this.className_+"-arrowdown",3:this.className_+"-arrowleft"}};n(qn,pn);f=qn.prototype;f.setAnchorElement=function(a){this.anchorElement_=a};f.setPosition=function(a,b,c,d){null!=a&&(this.boxPosition_=a);null!=b&&(this.arrowAlignment_=b);"number"===typeof c&&(this.arrowOffset_=Math.max(c,15));"number"===typeof d&&(this.offsetFromAnchor_=d)};
f.reposition=function(a,b,c){y(this.arrowElement_,"Must call setElements first.");a=this.arrowAlignment_;2==a&&(a=0);this.reposition_(this.boxPosition_,(rn(this.boxPosition_),a),2==this.arrowAlignment_?rn(this.boxPosition_)?this.boxElement_.offsetHeight/2:this.boxElement_.offsetWidth/2:this.arrowOffset_,0,c)};f.setAutoReposition=function(a){this.isAutoReposition_=a};
f.reposition_=function(a,b,c,d,e){if(this.anchorElement_){var g=sn(a,b),h=this.anchorElement_,k=this.boxElement_,l=this.viewport_;var m=Fj(h);a:{m=(rn(a)?m.height/2:m.width/2)-c;var p=zm(h,g);if(l)l=l.clone(),k&&(k=ym(k),l.left+=k.x,l.right+=k.x,l.top+=k.y,l.bottom+=k.y);else if(l=yj(h),!l)break a;h=Gj(h);h=new nj(h.top,h.left+h.width,h.top+h.height,h.left);rn(a)?h.top<l.top&&!(p&1)?m-=l.top-h.top:h.bottom>l.bottom&&p&1&&(m-=h.bottom-l.bottom):h.left<l.left&&!(p&4)?m-=l.left-h.left:h.right>l.right&&
p&4&&(m-=h.right-l.right)}m=rn(a)?new G(this.offsetFromAnchor_,m):new G(m,this.offsetFromAnchor_);p=rn(a)?6:9;this.allowBoxOverflowOnPositioningFail_&&2==d&&(p=rn(a)?4:1);h=a^3;rn(a)&&"rtl"==this.anchorElement_.dir&&(h=a);g=Am(this.anchorElement_,sn(h,b),this.boxElement_,g,m,e,this.isAutoReposition_?p:0,void 0,this.viewport_);if(2!=d&&g&496){this.reposition_(a^3,b,c,this.allowBoxOverflowOnPositioningFail_&&0==d?1:2,e);return}!this.disableSubpixels_||g&496||(d=parseFloat(this.boxElement_.style.left),
e=parseFloat(this.boxElement_.style.top),y(!isNaN(d)&&!isNaN(e),"Could not parse position."),isFinite(d)&&0==d%1&&isFinite(e)&&0==e%1||uj(this.boxElement_,Math.round(d),Math.round(e)))}tn(this,a,b,c)};
var tn=function(a,b,c,d){var e=a.arrowElement_;rc(a.arrowClassMap_,function(g){mj(e,g,!1)},a);O(e,a.arrowClassMap_[b]);e.style.top=e.style.left=e.style.right=e.style.bottom="";a.anchorElement_?(c=Dj(a.anchorElement_,a.boxElement_),d=un(a.anchorElement_,b),rn(b)?e.style.top=vn(c.y+d.y,a.boxElement_.offsetHeight-15)+"px":e.style.left=vn(c.x+d.x,a.boxElement_.offsetWidth-15)+"px"):e.style[0==c?rn(b)?"top":"left":rn(b)?"bottom":"right"]=d+"px"},vn=function(a,b){return 15>b?15:Math.min(Math.max(a,15),
b)},sn=function(a,b){switch(a){case 2:return 0==b?1:5;case 1:return 0==b?0:4;case 0:return 0==b?12:13;default:return 0==b?8:9}},un=function(a,b){var c=0,d=0;a=Fj(a);switch(b){case 2:c=a.width/2;break;case 1:c=a.width/2;d=a.height;break;case 0:d=a.height/2;break;case 3:c=a.width,d=a.height/2}return new G(c,d)},rn=function(a){return 0==a||3==a};f=qn.prototype;f.isAutoReposition_=!1;f.arrowAlignment_=2;f.arrowOffset_=20;f.boxPosition_=3;f.viewport_=null;f.offsetFromAnchor_=-5;
f.allowBoxOverflowOnPositioningFail_=!1;function wn(a,b){if(void 0!==a.tagName){if("script"===a.tagName.toLowerCase())throw Error("Use setTextContent with a SafeScript.");if("style"===a.tagName.toLowerCase())throw Error("Use setTextContent with a SafeStyleSheet.");}a.innerHTML=Hd(b)}
function xn(a,b){var c=yn;if(0===c.length)throw Error("No prefixes are provided");if(c.map(function(d){if(d instanceof Om)d=d.privateDoNotAccessOrElseWrappedAttrPrefix;else throw Error("Unexpected type when unwrapping SafeAttributePrefix");return d}).every(function(d){return 0!=="value".indexOf(d)}))throw Error('Attribute "value" does not match any of the allowed prefixes.');a.setAttribute("value",b)};var zn=function(){},An=new zn,Bn=["click","keydown","keyup"];zn.prototype.listen=function(a,b,c,d,e){var g=function(h){var k=Nc(b),l=Ge(h.target)?h.target.getAttribute("role")||null:null;"click"!=h.type||0!=h.event_.button||Ub&&h.ctrlKey?13!=h.keyCode&&3!=h.keyCode||"keyup"==h.type?32!=h.keyCode||"keyup"!=h.type||"button"!=l&&"tab"!=l&&"radio"!=l||(k.call(d,h),h.preventDefault()):(h.type="keypress",k.call(d,h)):k.call(d,h)};g.listener_=b;g.scope_=d;e?e.listen(a,Bn,g,c):Mc(a,Bn,g,c)};
zn.prototype.unlisten=function(a,b,c,d,e){for(var g,h=0;g=Bn[h];h++){var k=a;var l=g;var m=!!c;l=nc(k)?k.getListeners(l,m):k?(k=Pc(k))?k.getListeners(l,m):[]:[];for(k=0;m=l[k];k++){var p=m.listener;if(p.listener_==b&&p.scope_==d){e?e.unlisten(a,g,m.listener,c,d):Tc(a,g,m.listener,c,d);break}}}};var Cn=function(a,b){Array.isArray(b)||(b=[b]);y(0<b.length,"At least one Css3Property should be specified.");b=b.map(function(c){if("string"===typeof c)return c;Oa(c,"Expected css3 property to be an object.");var d=c.property+" "+c.duration+"s "+c.timing+" "+c.delay+"s";y(c.property&&"number"===typeof c.duration&&c.timing&&"number"===typeof c.delay,"Unexpected css3 property value: %s",d);return d});P(a,"transition",b.join(","))},Dn=$c(function(){if(E)return gc("10.0");var a=xe(document,"DIV"),b=
Sb?"-webkit":F?"-moz":E?"-ms":null,c={transition:"opacity 1s linear"};b&&(c[b+"-transition"]="opacity 1s linear");c={style:c};if(!Pd.test("div"))throw Error("Invalid tag name <div>.");if("DIV"in Rd)throw Error("Tag name <div> is not allowed for SafeHtml.");b=void 0;var d="";if(c)for(m in c)if(Object.prototype.hasOwnProperty.call(c,m)){if(!Pd.test(m))throw Error('Invalid attribute name "'+m+'".');var e=c[m];if(null!=e){var g=void 0;var h=m;if(e instanceof ed)e=fd(e);else if("style"==h.toLowerCase()){if(!t(e))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+
typeof e+" given: "+e);if(!(e instanceof ud)){var k="";for(g in e)if(Object.prototype.hasOwnProperty.call(e,g)){if(!/^[-_a-zA-Z0-9]+$/.test(g))throw Error("Name allows only [-_a-zA-Z0-9], got: "+g);var l=e[g];null!=l&&(l=Array.isArray(l)?l.map(xd).join(" "):xd(l),k+=g+":"+l+";")}e=k?new ud(k,td):wd}e=vd(e)}else{if(/^on/i.test(h))throw Error('Attribute "'+h+'" requires goog.string.Const value, "'+e+'" given.');if(h.toLowerCase()in Qd)if(e instanceof kd)e=ld(e).toString();else if(e instanceof nd)e=
od(e);else if("string"===typeof e)e=(rd(e)||sd).getTypedStringValue();else throw Error('Attribute "'+h+'" on tag "div" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+e+'" given.');}e.implementsGoogStringTypedString&&(e=e.getTypedStringValue());y("string"===typeof e||"number"===typeof e,"String or number value expected, got "+typeof e+" with value: "+e);g=h+'="'+yb(String(e))+'"';d+=" "+g}}var m="<div"+d;null==b?b=[]:Array.isArray(b)||(b=[b]);!0===ad.div?(y(!b.length,"Void tag <div> does not allow content."),
m+=">"):(b=Od(b),m+=">"+Id(b)+"</div>");m=Jd(m);Wd(a,m);a=a.firstChild;y(a.nodeType==Node.ELEMENT_NODE);m=a.style[he("transition")];return""!=("undefined"!==typeof m?m:a.style[pj(a,"transition")]||"")});var En=function(a,b,c,d,e){em.call(this);this.element_=a;this.duration_=b;this.initialStyle_=c;this.finalStyle_=d;this.transitions_=Array.isArray(e)?e:[e]};x(En,em);f=En.prototype;f.play=function(){if(1==this.state_)return!1;this.onBegin();this.dispatchAnimationEvent("play");this.startTime=Date.now();this.state_=1;if(Dn())return P(this.element_,this.initialStyle_),this.timerId_=Qh(this.play_,void 0,this),!0;this.stop_(!1);return!1};
f.play_=function(){Fj(this.element_);Cn(this.element_,this.transitions_);P(this.element_,this.finalStyle_);this.timerId_=Qh(u(this.stop_,this,!1),1E3*this.duration_)};f.stop=function(){1==this.state_&&this.stop_(!0)};f.stop_=function(a){P(this.element_,"transition","");q.clearTimeout(this.timerId_);P(this.element_,this.finalStyle_);this.endTime=Date.now();this.state_=0;if(a)this.onStop();else this.dispatchAnimationEvent("finish");this.onEnd()};f.disposeInternal=function(){this.stop();En.superClass_.disposeInternal.call(this)};
f.pause=function(){y(!1,"Css3 transitions does not support pause action.")};var Fn=function(a,b,c,d){return new En(a,.218,{opacity:c},{opacity:d},{property:"opacity",duration:.218,timing:b,delay:0})};var Hn=function(a,b){K.call(this);this.handler_=new Ai(this);a=a||null;Gn(this);this.element_=a;b&&(this.type_=b)};x(Hn,K);f=Hn.prototype;f.element_=null;f.autoHide_=!0;f.autoHidePartners_=null;f.autoHideRegion_=null;f.isVisible_=!1;f.shouldHideAsync_=!1;f.lastShowTime_=-1;f.lastHideTime_=-1;f.hideOnEscape_=!1;f.enableCrossIframeDismissal_=!0;f.type_="toggle_display";f.getType=function(){return this.type_};f.getElement=function(){return this.element_};
f.setAutoHide=function(a){Gn(this);this.autoHide_=a};f.getHandler=function(){return this.handler_};var Gn=function(a){if(a.isVisible_)throw Error("Can not change this state of the popup while showing.");};Hn.prototype.isVisible=function(){return this.isVisible_};Hn.prototype.isOrWasRecentlyVisible=function(){return this.isVisible_||150>Date.now()-this.lastHideTime_};
Hn.prototype.setVisible=function(a){this.showTransition_&&this.showTransition_.stop();this.hideTransition_&&this.hideTransition_.stop();if(a){if(!this.isVisible_&&this.dispatchEvent("beforeshow")){if(!this.element_)throw Error("Caller must call setElement before trying to show the popup");this.reposition();a=I(this.element_);this.hideOnEscape_&&this.handler_.listen(a,"keydown",this.onDocumentKeyDown_,!0);if(this.autoHide_)if(this.handler_.listen(a,"mousedown",this.onDocumentMouseDown_,!0),E){try{var b=
a.activeElement}catch(d){}for(;b&&"IFRAME"==b.nodeName;){try{var c=b.contentDocument||b.contentWindow.document}catch(d){break}a=c;b=a.activeElement}this.handler_.listen(a,"mousedown",this.onDocumentMouseDown_,!0);this.handler_.listen(a,"deactivate",this.onDocumentBlur_)}else this.handler_.listen(a,"blur",this.onDocumentBlur_);"toggle_display"==this.type_?(this.element_.style.visibility="visible",Q(this.element_,!0)):"move_offscreen"==this.type_&&this.reposition();this.isVisible_=!0;this.lastShowTime_=
Date.now();this.lastHideTime_=-1;if(this.showTransition_)Lc(this.showTransition_,"end",this.onShow,!1,this),this.showTransition_.play();else this.onShow()}}else In(this)};Hn.prototype.reposition=function(){};
var In=function(a,b){if(!a.isVisible_||!a.dispatchEvent({type:"beforehide",target:b}))return!1;a.handler_&&a.handler_.removeAll();a.isVisible_=!1;a.lastHideTime_=Date.now();a.hideTransition_?(Lc(a.hideTransition_,"end",Da(a.continueHidingPopup_,b),!1,a),a.hideTransition_.play()):a.continueHidingPopup_(b);return!0};f=Hn.prototype;
f.continueHidingPopup_=function(a){"toggle_display"==this.type_?this.shouldHideAsync_?Qh(this.hidePopupElement,0,this):this.hidePopupElement():"move_offscreen"==this.type_&&(this.element_.style.top="-10000px");this.dispatchEvent({type:"hide",target:a})};f.hidePopupElement=function(){this.element_.style.visibility="hidden";Q(this.element_,!1)};f.onShow=function(){this.dispatchEvent("show")};
f.onDocumentMouseDown_=function(a){a=a.target;He(this.element_,a)||Jn(this,a)||this.autoHideRegion_&&!He(this.autoHideRegion_,a)||150>Date.now()-this.lastShowTime_||In(this,a)};f.onDocumentKeyDown_=function(a){27==a.keyCode&&In(this,a.target)&&(a.preventDefault(),a.stopPropagation())};
f.onDocumentBlur_=function(a){if(this.enableCrossIframeDismissal_){var b=I(this.element_);if("undefined"!=typeof document.activeElement){if(a=b.activeElement,!a||He(this.element_,a)||"BODY"==a.tagName||Jn(this,a))return}else if(a.target!=b)return;150>Date.now()-this.lastShowTime_||In(this)}};var Jn=function(a,b){return Wa(a.autoHidePartners_||[],function(c){return b===c||He(c,b)})};
Hn.prototype.disposeInternal=function(){Hn.superClass_.disposeInternal.call(this);this.handler_.dispose();jb(this.showTransition_);jb(this.hideTransition_);delete this.element_;delete this.handler_;delete this.autoHidePartners_};var Kn=function(a,b){this.popupCorner_=8;this.position_=b||void 0;Hn.call(this,a)};x(Kn,Hn);Kn.prototype.setPosition=function(a){this.position_=a||void 0;this.isVisible()&&this.reposition()};Kn.prototype.reposition=function(){if(this.position_){var a=!this.isVisible()&&"move_offscreen"!=this.getType(),b=this.getElement();a&&(b.style.visibility="hidden",Q(b,!0));this.position_.reposition(b,this.popupCorner_,this.margin_);a&&Q(b,!1)}};function Ln(a){R.call(this,a);this.arrowPosition_=new qn(this.className_,!0);this.popup_=new Kn;kb(this,this.popup_);this.hideYPosition_=0;this.extraCssClasses_=[]}x(Ln,R);f=Ln.prototype;f.className_="jfk-bubble";f.showCloseButton_=!0;f.disposeOnHide_=!1;f.setAnchorElement=function(a){this.arrowPosition_.setAnchorElement(a);this.reposition()};
f.setPosition=function(a,b,c,d,e){y(!this.inDocument_,"Must call setPosition() before rendering");this.arrowPosition_.allowBoxOverflowOnPositioningFail_=!!e;this.arrowPosition_.setPosition(a,b,c,d)};var Mn=function(a,b){y(!a.inDocument_,"Must call showCloseButton() before rendering");a.showCloseButton_=b};Ln.prototype.addClassName=function(a){y(!this.inDocument_,"Must call addClassName() before rendering");this.extraCssClasses_.push(a)};
Ln.prototype.setContent=function(a){y("string"===typeof a||a.nodeType||a instanceof Um||a instanceof Gd,"Content must be a string or HTML.");this.content_=a;Nn(this,a)};var Nn=function(a,b){a=a.getContentElement();b&&a&&("string"===typeof b?Ie(a,b):b instanceof Um?wn(a,Tm(b)):b instanceof Gd?wn(a,b):(wn(a,Md),ze(a,b)))};f=Ln.prototype;f.setAutoHide=function(a){this.popup_.setAutoHide(a)};f.setAutoReposition=function(a){this.arrowPosition_.setAutoReposition(a)};
f.getContentElement=function(){return this.getElementByClass(this.className_+"-content-id")};f.createDom=function(){this.element_=ln(on,{showCloseBox:this.showCloseButton_,uid:"bubble-"+Aa(this)},this.getDomHelper());Nn(this,this.content_);Q(this.getElement(),!1);var a=this.popup_,b=this.getElement();Gn(a);a.element_=b;if(!Tb){a=this.popup_;b=Fn(this.getElement(),"ease-out",0,1);var c=Fn(this.getElement(),"ease-in",1,0);a.showTransition_=b;a.hideTransition_=c}jj(this.getElement(),this.extraCssClasses_)};
f.enterDocument=function(){Ln.superClass_.enterDocument.call(this);this.getHandler().listen(this.popup_,["beforeshow","show","beforehide","hide"],this.handlePopupEvent_);if(this.showCloseButton_){var a=this.getHandler(),b=this.getElementByClass(this.className_+"-closebtn-id");An.listen(b,Da(this.setVisible,!1),void 0,a.handler_||a,a)}a=this.getElement();y(a,"getElement() returns null.");b=this.getElementByClass(this.className_+"-arrow-id");y(b,"No arrow element is found!");var c=this.arrowPosition_;
c.boxElement_=a;c.arrowElement_=b;this.popup_.setPosition(this.arrowPosition_)};f.setVisible=function(a){this.popup_.setVisible(a)};f.isVisible=function(){return this.popup_.isVisible()};f.isOrWasRecentlyVisible=function(){return this.popup_.isOrWasRecentlyVisible()};f.reposition=function(){this.isVisible()&&this.popup_.reposition()};f.handleScroll_=function(){var a=Cj(this.getElement());this.hideYPosition_&&a.y<this.hideYPosition_&&this.setVisible(!1);return!1};
f.handlePopupEvent_=function(a){if("show"==a.type||"hide"==a.type){var b=this.getHandler(),c=this.getDomHelper();c=E?te(c.document_):c.document_;"show"==a.type?b.listen(c,"scroll",this.handleScroll_):b.unlisten(c,"scroll",this.handleScroll_)}b=this.dispatchEvent(a.type);this.disposeOnHide_&&"hide"==a.type&&this.dispose();return b};function On(a,b){Ln.call(this,b);this.setAnchorElement(a);this.disposeOnHide_=!0;this.addClassName("jfk-bubble-promo")}x(On,Ln);On.prototype.enterDocument=function(){On.superClass_.enterDocument.call(this);this.setVisible(!0)};var Pn=angular.module("jfkBubble",[ul.name]);Pn.ALIGNMENT_MAP_={LEFT_OR_TOP:0,RIGHT_OR_BOTTOM:1,CENTER:2};Pn.service("jfkBubbleService",function(){return new Qn});var Qn=function(){this.bubble_=null},Rn=function(a,b,c){if(a.bubble_)throw Error("Only one bubble component allowed to be registered.");var d=new Ln;Mn(d,!0);d.setContent(b);c(d);a.bubble_=d};
Qn.prototype.showBubbleMessage=function(a,b){if(a){this.bubble_||Rn(this,we("DIV"),function(d){d.render(document.body)});var c=this.bubble_.getContentElement().firstChild;Ie(c,a);this.bubble_.setAnchorElement(b);this.bubble_.setVisible(!0)}};Qn.prototype.showBubbleMessage=Qn.prototype.showBubbleMessage;
Qn.prototype.showPromoBubble=function(a,b,c,d,e,g){b=new On(b);if(Ge(a))b.setContent(a);else{var h=we("DIV");Ie(h,a);b.setContent(h)}Mn(b,!!c);b.setAutoReposition(!!e);d&&b.setPosition(d);g&&b.addClassName(g);b.render(document.body);return b};Qn.prototype.showPromoBubble=Qn.prototype.showPromoBubble;Pn.directive("jfkSharedBubble",["jfkBubbleService",function(a){return{restrict:"A",link:function(b,c){var d=c[0],e=d.nextSibling;Rn(a,d,function(g){e?Xj(g,e.parentNode,e):g.render(d.parent)})}}}]);
Pn.directive("jfkBubble",["jfkCommon",function(a){return{restrict:"A",link:function(b,c,d){function e(){sl(b,function(){})}var g=c[0];c=c.parent()[0];if(!c)throw Error("The bubble element must have a parent.");var h=new Ln;h.setContent(g);h.setAnchorElement(c);Mn(h,d.hasOwnProperty("jfkBubbleShowCloseButton")?"true"==d.jfkBubbleShowCloseButton.toLowerCase():!0);h.setAutoReposition(d.hasOwnProperty("jfkBubbleAutoReposition")?"true"==d.jfkBubbleAutoReposition.toLowerCase():!0);(d.hasOwnProperty("jfkBubblePosition")||
d.hasOwnProperty("jfkBubbleAlignment"))&&h.setPosition(d.hasOwnProperty("jfkBubblePosition")?Km[d.jfkBubblePosition]:void 0,d.hasOwnProperty("jfkBubbleAlignment")?Pn.ALIGNMENT_MAP_[d.jfkBubbleAlignment]:void 0);d.hasOwnProperty("jfkBubbleCssClass")&&h.addClassName(d.jfkBubbleCssClass);d.hasOwnProperty("jfkAutoHide")&&h.setAutoHide("true"==d.jfkAutoHide.toLowerCase());h.listen("show",e);h.listen("hide",e);h.render(document.body);pl(a,b,d,h);a.register(b,d.jfkBubble,new Sn(h))}}}]);
var Sn=function(a){this.bubble_=a};v("ng.jfk.Bubble.BubbleHandle",Sn);Sn.prototype.show=function(){this.bubble_.setVisible(!0)};Sn.prototype.show=Sn.prototype.show;Sn.prototype.hide=function(){this.bubble_.setVisible(!1)};Sn.prototype.hide=Sn.prototype.hide;Sn.prototype.toggle=function(a){this.bubble_.setVisible(void 0!==a?a:!this.bubble_.isOrWasRecentlyVisible())};Sn.prototype.toggle=Sn.prototype.toggle;
Sn.prototype.setAnchorElement=function(a){this.bubble_.setAnchorElement(a&&a.target?a.target:a)};Sn.prototype.setAnchorElement=Sn.prototype.setAnchorElement;Sn.prototype.isOrWasRecentlyVisible=function(){return this.bubble_.isOrWasRecentlyVisible()};Sn.prototype.isOrWasRecentlyVisible=Sn.prototype.isOrWasRecentlyVisible;
Pn.directive("jfkPromoBubble",["jfkBubbleService","jfkCommon",function(a,b){return{restrict:"A",link:function(c,d,e){var g=d.parent()[0];if(!g)throw Error("The promo bubble element must have a parent.");g.removeChild(d[0]);c.$on("$destroy",function(){angular.element(d[0]).remove()});var h=e.hasOwnProperty("jfkPromoBubbleShowCloseButton")?"true"==e.jfkPromoBubbleShowCloseButton.toLowerCase():!0,k=e.hasOwnProperty("jfkPromoBubbleAutoReposition")?"true"==e.jfkPromoBubbleAutoReposition.toLowerCase():
!0,l;e.hasOwnProperty("jfkPromoBubblePosition")&&(l=Km[e.jfkPromoBubblePosition]);var m;e.hasOwnProperty("jfkPromoBubbleCssClass")&&(m=e.jfkPromoBubbleCssClass);b.register(c,e.jfkPromoBubble,new Tn(function(){var p=a.showPromoBubble(d[0],g,h,l,k,m);pl(b,c,e,p);return p}))}}}]);var Tn=function(a){this.bubble_=null;this.bubbleConstructor_=a};v("ng.jfk.Bubble.PromoBubbleHandle",Tn);Tn.prototype.show=function(){this.bubble_&&this.bubble_.dispose();this.bubble_=this.bubbleConstructor_()};
Tn.prototype.show=Tn.prototype.show;Tn.prototype.hide=function(){this.bubble_.setVisible(!1)};Tn.prototype.hide=Tn.prototype.hide;Tn.prototype.isOrWasRecentlyVisible=function(){return!!this.bubble_&&!this.bubble_.disposed_&&this.bubble_.isOrWasRecentlyVisible()};Tn.prototype.isOrWasRecentlyVisible=Tn.prototype.isOrWasRecentlyVisible;var Un={NONE:0,START:1,END:2,BOTH:3};var Vn=function(a,b){if(Zm["jfk.templates.button.strict"])return Zm["jfk.templates.button.strict"](a,b);a=a||{};var c=a.attributes,d=a.content,e=a.disabled,g=a.id,h=a.tabindex,k=a.title,l=a.usingKennedyTooltip,m=a.value;g='<div role="button"'+(g?' id="'+T(g)+'"':"")+' class="';var p=a||{};a=p.classes;var r=p.disabled,w=p.checked,z=p.style;p=p.width;gn();if(Zm["jfk.templates.button.classes_"])b=Zm["jfk.templates.button.classes_"]({classes:a,disabled:r,checked:w,style:z,width:p},b);else{b="goog-inline-block jfk-button ";
switch(t(z)?z.toString():z){case 0:b+="jfk-button-standard";break;case 2:b+="jfk-button-action";break;case 3:b+="jfk-button-primary";break;case 1:b+="jfk-button-default";break;case 4:b+="jfk-button-flat";break;case 5:b+="jfk-button-mini";break;case 6:b+="jfk-button-contrast";break;default:b+="jfk-button-standard"}b+=((p&&p.isInvokableFn&&(1).isInvokableFn?p.contentKind!==(1).contentKind?0:p.toString()===(1).toString():1==p)?" jfk-button-narrow":"")+(w?" jfk-button-checked":"")+(a?" "+a:"")+(r?" jfk-button-disabled":
"")}c=g+T(b)+'"'+(e?' aria-disabled="true"':' tabindex="'+(h?T(h):"0")+'"')+(k?l?' data-tooltip="'+T(k)+'"':' title="'+T(k)+'"':"")+(m?' value="'+T(m)+'"':"")+(c?en(Wm(c,Rm,Vm)?c.getContent():kn(c)):"")+">";d=null!=d?d:"";d=Wm(d,Qm,Um)?d:d instanceof Gd?Ym(Id(d)):d instanceof Gd?Ym(Hd(d).toString()):Ym(String(String(d)).replace(dn,cn),Xm(d));return Ym(c+d+"</div>")};var Wn={};var Xn={},Yn=null,Zn=function(a){var b;y(xa(a),"encodeByteArray takes an array as a parameter");void 0===b&&(b=0);if(!Yn){Yn={};for(var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),d=["+/=","+/","-_=","-_.","-_"],e=0;5>e;e++){var g=c.concat(d[e].split(""));Xn[e]=g;for(var h=0;h<g.length;h++){var k=g[h],l=Yn[k];void 0===l?Yn[k]=h:y(l===h)}}}b=Xn[b];c=Array(Math.floor(a.length/3));d=b[64]||"";for(e=g=0;g<a.length-2;g+=3){l=a[g];var m=a[g+1];k=a[g+2];h=b[l>>2];l=b[(l&
3)<<4|m>>4];m=b[(m&15)<<2|k>>6];k=b[k&63];c[e++]=""+h+l+m+k}h=0;k=d;switch(a.length-g){case 2:h=a[g+1],k=b[(h&15)<<2]||d;case 1:a=a[g],c[e]=""+b[a>>2]+b[(a&3)<<4|h>>4]+k+d}return c.join("")};var $n="undefined"!==typeof Uint8Array,ao={};var bo,co=function(a){if(ao!==ao)throw Error("illegal external caller");this.value_=a;if(null!=a&&0===a.length)throw Error("ByteString should be constructed with non-empty values");};var eo="function"===typeof Symbol&&"symbol"===typeof Symbol()?Symbol("INTERNAL_ARRAY_STATE"):void 0;function fo(a,b){Object.isFrozen(a)||(eo?a[eo]|=b:void 0!==a.internalArrayState?a.internalArrayState|=b:Object.defineProperties(a,{internalArrayState:{value:b,configurable:!0,writable:!0,enumerable:!1}}))}Object.getOwnPropertyDescriptor(Array.prototype,"jspbArrayState");function go(a){Pa(a,"state is only maintained on arrays.");a=eo?a[eo]:a.internalArrayState;return null==a?0:a}
function ho(a){return Array.isArray(a)?!!(go(a)&1):!1}function io(a){Pa(a,"state is only maintained on arrays.");fo(a,1);return a}function jo(a){return Array.isArray(a)?!!(go(a)&2):!1}function ko(a){if(!Array.isArray(a))throw Error("cannot mark non-array as immutable");fo(a,2)}function lo(a,b){if(!Array.isArray(a))throw Error("cannot mark non-array as mutable");b?fo(a,8):Object.isFrozen(a)||(eo?a[eo]&=-9:void 0!==a.internalArrayState&&(a.internalArrayState&=-9))};function mo(a){return null!==a&&"object"===typeof a&&!Array.isArray(a)&&a.constructor===Object}var no=Symbol("exempted jspb subclass"),oo=Symbol("generated by jspb"),po=Object.freeze(io([])),qo=function(a){if(jo(a.internalArray_))throw Error("Cannot mutate an immutable Message");},ro="undefined"!=typeof Symbol&&"undefined"!=typeof Symbol.hasInstance;function so(a){return{value:a,configurable:!1,writable:!1,enumerable:!1}};function to(a){return a.displayName||a.name||"unknown type name"}function uo(a,b){if(!(a instanceof b))throw Error("Expected instanceof "+to(b)+" but got "+(a&&to(a.constructor)));return a}function vo(a,b){var c=void 0===c?!1:c;if(Array.isArray(a))return new b(a);if(c)return new b};var wo=function(){throw Error("please construct maps as mutable then call toImmutable");};if(ro){var xo=function(){throw Error("Cannot perform instanceof checks on ImmutableMap");},yo={};Object.defineProperties(wo,(yo[Symbol.hasInstance]=so(xo),yo));y(wo[Symbol.hasInstance]===xo,"defineProperties did not work: was it monkey-patched?")};function zo(a){switch(typeof a){case "number":return isFinite(a)?a:String(a);case "object":if(a&&!Array.isArray(a)){if($n&&null!=a&&a instanceof Uint8Array)return Zn(a);if(a instanceof co){var b=a.value_;null!=b&&"string"!==typeof b&&($n&&b instanceof Uint8Array?b=Zn(b):(Ka("Cannot coerce to b64 string: "+wa(b)),b=null));return null==b?"":a.value_=b}}}return a};function Ao(a,b){b=void 0===b?Bo:b;Pa(a);return Co(a,b)}function Do(a,b){if(null!=a){if(Array.isArray(a))a=Co(a,b);else if(mo(a)){var c={},d;for(d in a)c[d]=Do(a[d],b);a=c}else a=b(a);return a}}function Co(a,b){Pa(a);for(var c=a.slice(),d=0;d<c.length;d++)c[d]=Do(c[d],b);ho(a)&&io(c);return c}function Eo(a){if(a&&"object"==typeof a&&a.toJSON)return a.toJSON();a=zo(a);return Array.isArray(a)?Ao(a,Eo):a}function Bo(a){return $n&&null!=a&&a instanceof Uint8Array?new Uint8Array(a):a};var Fo=function(a){return a.internalSparseObject_||(a.internalSparseObject_=a.internalArray_[a.pivot_+a.arrayIndexOffset]={})},Go=function(a,b,c){return-1===b?null:b>=a.pivot_?a.internalSparseObject_?a.internalSparseObject_[b]:void 0:(void 0===c?0:c)&&a.internalSparseObject_&&(c=a.internalSparseObject_[b],null!=c)?c:a.internalArray_[b+a.arrayIndexOffset]},Ho=function(a,b,c,d){d=void 0===d?!1:d;qo(a);b<a.pivot_&&!d?a.internalArray_[b+a.arrayIndexOffset]=c:Fo(a)[b]=c},Io=function(a,b,c,d){c=void 0===
c?!0:c;var e=Go(a,b,d);Array.isArray(e)||(e=po);if(jo(a.internalArray_))c&&(ko(e),Object.freeze(e));else if(e===po||jo(e))e=io(e.slice()),Ho(a,b,e,d);return e};var Jo=function(a,b,c){Sa(this,Jo,"The message constructor should only be used by subclasses");y(this.constructor!==Jo,"Message is an abstract class and cannot be directly constructed");if(!0!==this[no]){y(!0===this[oo],"Message can only be subclassed by proto gencode.");var d=Object.getPrototypeOf(y(Object.getPrototypeOf(this)));y(d.hasOwnProperty(oo),"Generated jspb classes should not be extended")}a||(a=Ko);Ko=null;d=this.constructor.messageId;a||(a=d?[d]:[]);this.arrayIndexOffset=(d?0:-1)-(this.constructor.internalGroupNumberDoNotUse||
0);this.internalWrappers_=void 0;this.internalArray_=a;a:{d=this.internalArray_.length;a=d-1;if(d&&(d=this.internalArray_[a],mo(d))){this.pivot_=a-this.arrayIndexOffset;this.internalSparseObject_=d;break a}void 0!==b&&-1<b?(this.pivot_=Math.max(b,a+1-this.arrayIndexOffset),this.internalSparseObject_=void 0):this.pivot_=Number.MAX_VALUE}if(c)for(b=0;b<c.length;b++)if(a=c[b],a<this.pivot_)a+=this.arrayIndexOffset,(d=this.internalArray_[a])?Array.isArray(d)&&io(d):this.internalArray_[a]=po;else{d=Fo(this);
var e=d[a];e?Array.isArray(e)&&io(e):d[a]=po}};f=Jo.prototype;f.toJSON=function(){return Ao(this.internalArray_,Eo)};f.getExtension=function(a){Sa(this,a.extendeeCtor);return a.getExtensionFn(Sa(this,Jo))};f.hasExtension=function(a){Sa(this,a.extendeeCtor);y(!a.isRepeated,"repeated extensions don't support hasExtension");var b=Sa(this,Jo);return null!=Go(b,a.fieldIndex)};
f.clone=function(){var a=Sa(this,Jo),b=Ao(a.internalArray_);Sa(a,Jo);Pa(b);Ko=b;b=new a.constructor(b);Sa(b,Jo);Ko=null;Lo(b,a);return b};f.toString=function(){return this.internalArray_.toString()};
function Lo(a,b){y(a,"expected `to` to be non-null");y(b,"expected `from` to be non-null");b.internalUnknownFields_&&(a.internalUnknownFields_=b.internalUnknownFields_.slice());var c=b.internalWrappers_;if(c){b=b.internalSparseObject_;for(var d in c){var e=c[d];if(e){var g=!(!b||!b[d]),h=+d;if(Array.isArray(e)){if(e.length){var k=a,l=e[0].constructor;g=void 0===g?!1:g;var m=jo(k.internalArray_);var p=k;var r=l,w=g,z=m;z=void 0===z?!0:z;p.internalWrappers_||(p.internalWrappers_={});var B=jo(p.internalArray_);
l=p.internalWrappers_[h];w=Io(p,h,!0,w);var A=B||jo(w);if(!l){l=[];B=B||A;for(var pa=0;pa<w.length;pa++){var Kb=w[pa];B=B||jo(Kb);Kb=vo(Kb,r);void 0!==Kb&&(l.push(Kb),A&&ko(Kb.internalArray_))}p.internalWrappers_[h]=l;lo(w,!B)}r=A||z;z=jo(l);r&&!z&&(Object.isFrozen(l)&&(p.internalWrappers_[h]=l=l.slice()),ko(l),Object.freeze(l));!r&&z&&(p.internalWrappers_[h]=l=l.slice());p=l;h=Io(k,h,g);if(!(k=m)&&(k=h)){k=h;if(!Array.isArray(k))throw Error("cannot check mutability state of non-array");k=!(go(k)&
8)}if(k){for(k=0;k<p.length;k++)(g=p[k])&&jo(g.internalArray_)&&!m&&(p[k]=p[k].toMutable(Wn),h[k]=p[k].internalArray_);lo(h,!0)}h=p;for(m=0;m<Math.min(h.length,e.length);m++)Lo(h[m],Sa(e[m],Jo))}}else Sa(e,Jo),m=a,k=g,k=void 0===k?!1:k,g=m,l=e.constructor,r=k,-1===h?g=null:(g.internalWrappers_||(g.internalWrappers_={}),(p=g.internalWrappers_[h])?g=p:(l=vo(Go(g,h,r),l),void 0==l?g=p:(g.internalWrappers_[h]=l,jo(g.internalArray_)&&ko(l.internalArray_),g=l))),null!=g&&jo(g.internalArray_)&&!jo(m.internalArray_)&&
(g=g.toMutable(Wn),Ho(m,h,g.internalArray_,k),m.internalWrappers_[h]=g),h=g,h&&Lo(h,e)}}}}var Ko;var Mo=function(){Jo.call(this,void 0);throw Error("ImmutableMessage is not instantiable");};n(Mo,Jo);Mo.prototype.clone=function(){return Jo.prototype.clone.call(this)};if(ro){var No=function(){throw Error("Cannot perform instanceof checks for MutableMessage");},Oo={};Object.defineProperties(Mo,(Oo[Symbol.hasInstance]=so(No),Oo));y(Mo[Symbol.hasInstance]===No,"broken defineProperties implementation")};y(!0);var Po=function(){Jo.apply(this,arguments)};n(Po,Jo);Po.prototype.toMutable=function(){return this};if(ro){var Qo=function(){throw Error("Cannot perform instanceof checks for MutableMessage");},Ro={};Object.defineProperties(Po,(Ro[Symbol.hasInstance]=so(Qo),Ro));y(Po[Symbol.hasInstance]===Qo,"defineProperties did not work: was it monkey-patched?")};function So(a,b,c,d,e,g){if(a=a.internalWrappers_&&a.internalWrappers_[c])if(Array.isArray(a)){e=g.copyRepeatedFields?io(a.slice()):a;g=0<e.length?e[0].constructor:void 0;qo(b);if(null!=e){Pa(e);d=io([]);a=!1;for(var h=0;h<e.length;h++)d[h]=uo(e[h],Ja(g)).internalArray_,a=a||jo(d[h]);b.internalWrappers_||(b.internalWrappers_={});b.internalWrappers_[c]=e;lo(d,!a)}else b.internalWrappers_&&(b.internalWrappers_[c]=void 0),d=po;Ho(b,c,d)}else e=a.constructor,g=Sa(a,Jo),qo(b),b.internalWrappers_||(b.internalWrappers_=
{}),e=null!=g?uo(g,Ja(e)).internalArray_:g,b.internalWrappers_[c]=g,Ho(b,c,e);else $n&&d instanceof Uint8Array?(e=d,Sa(e,Uint8Array),e=e.length?new co(new Uint8Array(e)):bo||(bo=new co(null))):(Array.isArray(d)&&(e?ko(d):ho(d)&&g.copyRepeatedFields&&(d=d.slice())),e=d),Ho(b,c,e)};var To=function(){Po.apply(this,arguments)};n(To,Po);
To.prototype.toMutable=function(a){if(a!==Wn)throw Error("requires a valid immutable API token");if(jo(this.internalArray_)){Sa(this,Jo);a={copyRepeatedFields:!0};var b=jo(this.internalArray_);if(b&&!a.copyRepeatedFields)throw Error("copyRepeatedFields must be true for frozen messages");var c=new this.constructor;this.internalUnknownFields_&&(c.internalUnknownFields_=this.internalUnknownFields_.slice());for(var d=this.internalArray_,e=0;e<d.length;e++){var g=d[e];if(e===d.length-1&&mo(g))for(k in g){var h=
+k;Number.isNaN(h)?Fo(c)[k]=g[k]:So(this,c,h,g[k],b,a)}else So(this,c,e-this.arrayIndexOffset,g,b,a)}var k=c}else k=this;return k};To.prototype[oo]=!0;if(ro){var Uo={};Object.defineProperties(To,(Uo[Symbol.hasInstance]=so(Object[Symbol.hasInstance]),Uo));y(To[Symbol.hasInstance]===Object[Symbol.hasInstance],"broken defineProperties implementation")};var Vo={STANDARD:0,DEFAULT:1,ACTION:2,PRIMARY:3,FLAT:4,MINI:5,CONTRAST:6},Wo={NORMAL:0,NARROW:1};var Xo=function(a){C.call(this);this.dom=a||ke()};n(Xo,C);Xo.prototype.initAriaState=function(){aj(this.getElement(),this.getAriaRole());N(this.getElement(),"live","polite")};Xo.prototype.getAriaRole=function(){return"tooltip"};var Yo=function(a){Xo.call(this,a);this.contentEl_=this.dom.createDom("DIV","jfk-tooltip-contentId");this.arrowEl_=this.dom.createDom("DIV","jfk-tooltip-arrow",this.dom.createDom("DIV","jfk-tooltip-arrowimplbefore"),this.dom.createDom("DIV","jfk-tooltip-arrowimplafter"));this.tooltipEl_=this.dom.createDom("DIV",{"class":"jfk-tooltip",role:"tooltip"},this.contentEl_,this.arrowEl_);this.initAriaState()};n(Yo,Xo);Yo.prototype.getElement=function(){return this.tooltipEl_};
Yo.prototype.getContentElement=function(){return this.contentEl_};Yo.prototype.disposeInternal=function(){Xo.prototype.disposeInternal.call(this);this.tooltipEl_&&Ce(this.tooltipEl_)};var Zo=function(a){Yo.call(this,a)};n(Zo,Yo);Zo.prototype.initAriaState=function(){aj(this.getElement(),this.getAriaRole())};var bp=function(a){return ce(qb(a.replace($o,function(b,c){return ap.test(c)?"":" "}).replace(/[\t\n ]+/g," ")))},ap=/^(?:abbr|acronym|address|b|em|i|small|strong|su[bp]|u)$/i,$o=/<[!\/]?([a-z0-9]+)([\/ ][^>]*)?>/gi;var cp={},dp=function(a){Ai.call(this);this.domHelper_=a;this.delay_=new Zl(this.throttledHover_,0,this);kb(this,this.delay_);var b=window;this.mutationObserver_="function"===typeof b.MutationObserver?new b.MutationObserver(u(this.handleAttributesChange_,this)):null;a=a.document_;this.listen(a,"mouseout mousedown click blur focusout keydown".split(" "),this.clearActiveElement_,!0);this.listen(a,["mouseover","focus","focusin"],this.setActiveElement_,!0)};n(dp,Ai);
dp.prototype.disposeInternal=function(){ep(this);Ai.prototype.disposeInternal.call(this)};var fp=function(a,b){switch(b.type){case "mousedown":case "mouseover":case "mouseout":case "click":a.isKeyboardEvent_=!1;break;case "keydown":a.isKeyboardEvent_=!0}};
dp.prototype.setActiveElement_=function(a){this.mutationObserver_&&this.mutationObserver_.disconnect();fp(this,a);var b=a.target;a="focus"==a.type||"focusin"==a.type;var c=this.tooltip_&&He(this.tooltip_.getContentElement(),b);if(this.isKeyboardEvent_||!a||c){this.isFocusEvent_=a;if(a=b&&b.getAttribute&&this.mutationObserver_)a=b.getAttribute("role")||null,a=$a($i,a);a&&(this.mutationObserver_.observe(b,{attributes:!0}),(a=dj(b))&&(b=a));this.activeEl_=b}else this.activeEl_=null;gp(this)};
dp.prototype.clearActiveElement_=function(a){fp(this,a);var b=a.target;a="mousedown"==a.type||"click"==a.type;b=this.tooltip_&&He(this.tooltip_.getContentElement(),b);a&&b||(this.activeEl_=null,gp(this))};dp.prototype.handleAttributesChange_=function(a){Ua(a,u(function(b){var c=dj(b.target);c&&"aria-activedescendant"==b.attributeName&&(this.activeEl_=c,gp(this))},this))};
var gp=function(a){if(!(a.delay_.isActive()&&a.hoverEl_&&a.tooltipHideDelayMs_)){ep(a);var b=null!=a.tooltipHideDelayMs_?a.tooltipHideDelayMs_:50;a.delay_.start(a.hoverEl_?b:300)}},ep=function(a){a.secondaryTimerId_&&(q.clearTimeout(a.secondaryTimerId_),a.secondaryTimerId_=0,a.hoverEl_=null)};
dp.prototype.throttledHover_=function(){if(!this.activeEl_)hp(this),this.tooltipHideDelayMs_=this.hoverEl_=null;else if(!(this.hoverEl_&&this.tooltip_&&He(this.tooltip_.getElement(),this.activeEl_))||this.hoverEl_.getAttribute("data-tooltip-unhoverable")){var a=Qe(this.activeEl_,function(k){return k.getAttribute&&(k.getAttribute("data-tooltip-contained")||k.getAttribute("data-tooltip")||k.jfkTooltipHtmlInternal)&&!k.getAttribute("data-tooltip-suspended")}),b=!1;this.hoverEl_&&this.hoverEl_!=a&&(hp(this),
this.tooltipHideDelayMs_=this.hoverEl_=null,b=!0);if(!this.hoverEl_&&a&&(this.hoverEl_=a,!(a.getAttribute("data-tooltip-only-on-overflow")&&a.offsetWidth>=a.scrollWidth&&a.offsetHeight>=a.scrollHeight||this.isFocusEvent_&&"mouse"==a.getAttribute("data-tooltip-trigger")))){var c=Md;if(a.getAttribute("data-tooltip-contained"))for(var d=me("jfk-tooltip-data",a),e=0;e<d.length;e++){if(d[e].parentNode==a){c=d[e].cloneNode(!0);break}}else c=a.jfkTooltipHtmlInternal?a.jfkTooltipHtmlInternal:Ld(a.getAttribute("data-tooltip"));
d=a.getAttribute("data-tooltip-align");e=a.getAttribute("data-tooltip-class");var g=a.getAttribute("data-tooltip-offset");g=pb(ge(g))?-1:Number(g);var h=a.getAttribute("data-tooltip-hide-delay");h=pb(ge(h))?null:Number(h);if(!b&&(a=a.getAttribute("data-tooltip-delay"),a=Math.max(0,a-300))){this.secondaryTimerId_=Qh(Da(this.showTooltipImpl_,this.hoverEl_,c,d,g,e,h),a,this);return}this.showTooltipImpl_(this.hoverEl_,c,d,g,e,h)}}};
var ip=function(a){if(a)switch(a.toLowerCase().split(",")[0]){case "l":return 0;case "t":return 2;case "r":return 3}return 1};
dp.prototype.showTooltipImpl_=function(a,b,c,d,e,g){this.secondaryTimerId_=0;this.tooltipHideDelayMs_=g;if(!this.tooltip_){this.tooltip_=new Zo(this.domHelper_);hp(this);ze(this.domHelper_.document_.body,this.tooltip_.getElement());kb(this,this.tooltip_);this.tooltipPos_=new qn("jfk-tooltip",!0);this.tooltipPos_.setAutoReposition(!0);this.tooltipPos_.allowBoxOverflowOnPositioningFail_=!0;g=this.tooltipPos_;var h=this.tooltip_.getElement(),k=this.tooltip_.arrowEl_;g.boxElement_=h;g.arrowElement_=k}a:{if(c)switch(c.toLowerCase().split(",")[1]){case "l":g=
0;break a;case "r":g=1;break a}g=2}this.tooltipPos_.setPosition(ip(c),g,void 0,d);kj(this.tooltip_.getElement(),"jfk-tooltip-hide");this.tooltipClass_!=e&&(this.tooltipClass_&&!pb(ge(this.tooltipClass_))&&kj(this.tooltip_.getElement(),this.tooltipClass_),pb(ge(e))||O(this.tooltip_.getElement(),e),this.tooltipClass_=e);uj(this.tooltip_.getElement(),0,0);if(b instanceof Gd)wn(this.tooltip_.getContentElement(),b);else for(Be(this.tooltip_.getContentElement());c=b.firstChild;)this.tooltip_.getContentElement().appendChild(c);
this.tooltipPos_.setAnchorElement(a);this.tooltipPos_.reposition(null,0)};var hp=function(a){a.tooltip_&&O(a.tooltip_.getElement(),"jfk-tooltip-hide")};var jp=function(){},kp;va(jp);var mp=function(){var a=new lp;a.getCssClass=function(){return"jfk-checkbox"};return a},np={button:"pressed",checkbox:"checked",menuitem:"selected",menuitemcheckbox:"checked",menuitemradio:"checked",radio:"checked",tab:"selected",treeitem:"selected"};f=jp.prototype;f.getAriaRole=function(){};f.createDom=function(a){return a.getDomHelper().createDom("DIV",this.getClassNames(a).join(" "),a.getContent())};f.getContentElement=function(a){return a};
f.enableClassName=function(a,b,c){(a=a.getElement?a.getElement():a)&&(c?jj:lj)(a,[b])};f.canDecorate=function(){return!0};
f.decorate=function(a,b){b.id&&Tj(a,b.id);var c=this.getContentElement(b);c&&c.firstChild?op(a,c.firstChild.nextSibling?cb(c.childNodes):c.firstChild):a.content_=null;var d=0,e=this.getCssClass(),g=this.getCssClass(),h=!1,k=!1,l=cb(gj(b));l.forEach(function(m){h||m!=e?k||m!=g?d|=this.getStateFromClass(m):k=!0:(h=!0,g==e&&(k=!0));1==this.getStateFromClass(m)&&(Qa(c),Me(c)&&Ne(c,!1))},this);a.state_=d;h||(l.push(e),g==e&&(k=!0));k||l.push(g);(a=a.extraClassNames_)&&l.push.apply(l,a);h&&k&&!a||hj(b,
l.join(" "));return b};f.initializeDom=function(a){a.isRightToLeft()&&this.setRightToLeft(a.getElement(),!0);a.isEnabled()&&this.setFocusable(a,a.isVisible())};
var pp=function(a,b,c){if(a=c||a.getAriaRole())y(b,"The element passed as a first parameter cannot be null."),c=b.getAttribute("role")||null,a!=c&&aj(b,a)},qp=function(a,b,c){y(b);y(c);var d=b.ariaLabel_;null!=d&&a.setAriaLabel(c,d);b.isVisible()||N(c,"hidden",!b.isVisible());b.isEnabled()||a.updateAriaState(c,1,!b.isEnabled());U(b,8)&&a.updateAriaState(c,8,b.isSelected());U(b,16)&&a.updateAriaState(c,16,b.isChecked());U(b,64)&&a.updateAriaState(c,64,b.isOpen())};f=jp.prototype;
f.setAriaLabel=function(a,b){N(a,"label",b)};f.setAllowTextSelection=function(a,b){Jj(a,!b,!E)};f.setRightToLeft=function(a,b){this.enableClassName(a,this.getCssClass()+"-rtl",b)};f.isFocusable=function(a){var b;return U(a,32)&&(b=a.getKeyEventTarget())?Me(b):!1};f.setFocusable=function(a,b){var c;if(U(a,32)&&(c=a.getKeyEventTarget())){if(!b&&a.state_&32){try{c.blur()}catch(d){}a.state_&32&&a.handleBlur(null)}Me(c)!=b&&Ne(c,b)}};f.setVisible=function(a,b){Q(a,b);a&&N(a,"hidden",!b)};
f.setState=function(a,b,c){var d=a.getElement();if(d){var e=this.getClassForState(b);e&&this.enableClassName(a,e,c);this.updateAriaState(d,b,c)}};f.updateAriaState=function(a,b,c){kp||(kp={1:"disabled",8:"selected",16:"checked",64:"expanded"});y(a,"The element passed as a first parameter cannot be null.");b=kp[b];var d=a.getAttribute("role")||null;d&&(d=np[d]||b,b="checked"==b||"selected"==b?d:b);b&&N(a,b,c)};
f.setContent=function(a,b){var c=this.getContentElement(a);c&&(Be(c),b&&("string"===typeof b?Ie(c,b):(a=function(d){if(d){var e=I(c);c.appendChild("string"===typeof d?e.createTextNode(d):d)}},Array.isArray(b)?b.forEach(a):!xa(b)||"nodeType"in b?a(b):cb(b).forEach(a))))};f.getKeyEventTarget=function(a){return a.getElement()};f.getCssClass=function(){return"goog-control"};
f.getClassNames=function(a){var b=this.getCssClass(),c=[b],d=this.getCssClass();d!=b&&c.push(d);b=a.getState();for(d=[];b;){var e=b&-b;d.push(this.getClassForState(e));b&=~e}c.push.apply(c,d);(a=a.extraClassNames_)&&c.push.apply(c,a);return c};f.getClassForState=function(a){this.classByState_||rp(this);return this.classByState_[a]};
f.getStateFromClass=function(a){if(!this.stateByClass_){this.classByState_||rp(this);var b=this.classByState_,c={},d;for(d in b)c[b[d]]=d;this.stateByClass_=c}a=parseInt(this.stateByClass_[a],10);return isNaN(a)?0:a};var rp=function(a){var b=a.getCssClass(),c=!zb(b.replace(/\xa0|\s/g," ")," ");y(c,"ControlRenderer has an invalid css class: '"+b+"'");a.classByState_={1:b+"-disabled",2:b+"-hover",4:b+"-active",8:b+"-selected",16:b+"-checked",32:b+"-focused",64:b+"-open"}};var sp=function(){};x(sp,jp);va(sp);f=sp.prototype;f.getAriaRole=function(){return"button"};f.updateAriaState=function(a,b,c){switch(b){case 8:case 16:y(a,"The button DOM element cannot be null.");N(a,"pressed",c);break;default:case 64:case 1:sp.superClass_.updateAriaState.call(this,a,b,c)}};f.createDom=function(a){var b=sp.superClass_.createDom.call(this,a);this.setTooltip(b,a.getTooltip());var c=a.getValue();c&&this.setValue(b,c);U(a,16)&&this.updateAriaState(b,16,a.isChecked());return b};
f.decorate=function(a,b){b=sp.superClass_.decorate.call(this,a,b);var c=this.getValue(b);a.value_=c;a.tooltip_=this.getTooltip(b);U(a,16)&&this.updateAriaState(b,16,a.isChecked());return b};f.getValue=function(){};f.setValue=function(){};f.getTooltip=function(a){return a.title};f.setTooltip=function(a,b){a&&(b?a.title=b:a.removeAttribute("title"))};
f.setCollapsed=function(a,b){var c=a.isRightToLeft(),d=this.getCssClass()+"-collapse-left",e=this.getCssClass()+"-collapse-right";a.enableClassName(c?e:d,!!(b&1));a.enableClassName(c?d:e,!!(b&2))};f.getCssClass=function(){return"goog-button"};var tp={MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSECANCEL:"mousecancel",MOUSEMOVE:"mousemove",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave"};var up={MOUSEDOWN:mb?"pointerdown":nb?"MSPointerDown":"mousedown",MOUSEUP:mb?"pointerup":nb?"MSPointerUp":"mouseup",MOUSECANCEL:mb?"pointercancel":nb?"MSPointerCancel":"mousecancel",MOUSEMOVE:mb?"pointermove":nb?"MSPointerMove":"mousemove",MOUSEOVER:mb?"pointerover":nb?"MSPointerOver":"mouseover",MOUSEOUT:mb?"pointerout":nb?"MSPointerOut":"mouseout",MOUSEENTER:mb?"pointerenter":nb?"MSPointerEnter":"mouseenter",MOUSELEAVE:mb?"pointerleave":nb?"MSPointerLeave":"mouseleave"};var wp=function(a,b){if(!a)throw Error("Invalid class name "+a);if("function"!==typeof b)throw Error("Invalid decorator function "+b);vp[a]=b},xp={},vp={};var V=function(a,b,c){R.call(this,c);if(!b){for(b=this.constructor;b;){var d=Aa(b);if(d=xp[d])break;b=(b=Object.getPrototypeOf(b.prototype))&&b.constructor}b=d?"function"===typeof d.getInstance?d.getInstance():new d:null}this.renderer_=b;this.content_=void 0!==a?a:null;this.ariaLabel_=null};x(V,R);f=V.prototype;f.content_=null;f.state_=0;f.supportedStates_=39;f.autoStates_=255;f.statesWithTransitionEvents_=0;f.visible_=!0;f.extraClassNames_=null;f.handleMouseEvents_=!0;f.allowTextSelection_=!1;
f.preferredAriaRole_=null;var zp=function(a,b){a.inDocument_&&b!=a.handleMouseEvents_&&yp(a,b);a.handleMouseEvents_=b};f=V.prototype;f.getKeyEventTarget=function(){return this.renderer_.getKeyEventTarget(this)};f.getKeyHandler=function(){return this.keyHandler_||(this.keyHandler_=new Ql)};f.addClassName=function(a){a&&(this.extraClassNames_?$a(this.extraClassNames_,a)||this.extraClassNames_.push(a):this.extraClassNames_=[a],this.renderer_.enableClassName(this,a,!0))};
f.enableClassName=function(a,b){b?this.addClassName(a):a&&this.extraClassNames_&&bb(this.extraClassNames_,a)&&(0==this.extraClassNames_.length&&(this.extraClassNames_=null),this.renderer_.enableClassName(this,a,!1))};f.createDom=function(){var a=this.renderer_.createDom(this);this.element_=a;pp(this.renderer_,a,this.getPreferredAriaRole());this.allowTextSelection_||this.renderer_.setAllowTextSelection(a,!1);this.isVisible()||this.renderer_.setVisible(a,!1)};f.getPreferredAriaRole=function(){return this.preferredAriaRole_};
f.setAriaLabel=function(a){this.ariaLabel_=a;var b=this.getElement();b&&this.renderer_.setAriaLabel(b,a)};f.getContentElement=function(){return this.renderer_.getContentElement(this.getElement())};f.canDecorate=function(a){return this.renderer_.canDecorate(a)};f.decorateInternal=function(a){this.element_=a=this.renderer_.decorate(this,a);pp(this.renderer_,a,this.getPreferredAriaRole());this.allowTextSelection_||this.renderer_.setAllowTextSelection(a,!1);this.visible_="none"!=a.style.display};
f.enterDocument=function(){V.superClass_.enterDocument.call(this);qp(this.renderer_,this,Uj(this));this.renderer_.initializeDom(this);if(this.supportedStates_&-2&&(this.handleMouseEvents_&&yp(this,!0),U(this,32))){var a=this.getKeyEventTarget();if(a){var b=this.getKeyHandler();Pl(b,a);this.getHandler().listen(b,"key",this.handleKeyEvent).listen(a,"focus",this.handleFocus).listen(a,"blur",this.handleBlur)}}};
var yp=function(a,b){var c=a.pointerEventsEnabled_?up:tp,d=a.getHandler(),e=a.getElement();b?(d.listen(e,c.MOUSEDOWN,a.handleMouseDown).listen(e,[c.MOUSEUP,c.MOUSECANCEL],a.handleMouseUp).listen(e,"mouseover",a.handleMouseOver).listen(e,"mouseout",a.handleMouseOut),a.pointerEventsEnabled_&&d.listen(e,"gotpointercapture",a.preventPointerCapture_),a.handleContextMenu!=Yc&&d.listen(e,"contextmenu",a.handleContextMenu),E&&(gc(9)||d.listen(e,"dblclick",a.handleDblClick),a.ieMouseEventSequenceSimulator_||
(a.ieMouseEventSequenceSimulator_=new Ap(a),kb(a,a.ieMouseEventSequenceSimulator_)))):(d.unlisten(e,c.MOUSEDOWN,a.handleMouseDown).unlisten(e,[c.MOUSEUP,c.MOUSECANCEL],a.handleMouseUp).unlisten(e,"mouseover",a.handleMouseOver).unlisten(e,"mouseout",a.handleMouseOut),a.pointerEventsEnabled_&&d.unlisten(e,"gotpointercapture",a.preventPointerCapture_),a.handleContextMenu!=Yc&&d.unlisten(e,"contextmenu",a.handleContextMenu),E&&(gc(9)||d.unlisten(e,"dblclick",a.handleDblClick),jb(a.ieMouseEventSequenceSimulator_),
a.ieMouseEventSequenceSimulator_=null))};V.prototype.exitDocument=function(){V.superClass_.exitDocument.call(this);this.keyHandler_&&this.keyHandler_.detach();this.isVisible()&&this.isEnabled()&&this.renderer_.setFocusable(this,!1)};V.prototype.disposeInternal=function(){V.superClass_.disposeInternal.call(this);this.keyHandler_&&(this.keyHandler_.dispose(),delete this.keyHandler_);delete this.renderer_;this.ieMouseEventSequenceSimulator_=this.extraClassNames_=this.content_=null};
V.prototype.getContent=function(){return this.content_};V.prototype.setContent=function(a){this.renderer_.setContent(this.getElement(),a);this.content_=a};var op=function(a,b){a.content_=b};f=V.prototype;f.getCaption=function(){var a=this.getContent();if(!a)return"";if("string"!==typeof a)if(Array.isArray(a))a=a.map(Pe).join("");else{var b=[];Oe(a,b,!0);a=b.join("");a=a.replace(/ \xAD /g," ").replace(/\xAD/g,"");a=a.replace(/\u200B/g,"");a=a.replace(/ +/g," ");" "!=a&&(a=a.replace(/^\s*/,""))}return $d(a)};
f.setRightToLeft=function(a){V.superClass_.setRightToLeft.call(this,a);var b=this.getElement();b&&this.renderer_.setRightToLeft(b,a)};f.setAllowTextSelection=function(a){this.allowTextSelection_=a;var b=this.getElement();b&&this.renderer_.setAllowTextSelection(b,a)};f.isVisible=function(){return this.visible_};
f.setVisible=function(a,b){return b||this.visible_!=a&&this.dispatchEvent(a?"show":"hide")?((b=this.getElement())&&this.renderer_.setVisible(b,a),this.isEnabled()&&this.renderer_.setFocusable(this,a),this.visible_=a,!0):!1};f.isEnabled=function(){return!(this.state_&1)};
f.setEnabled=function(a){var b=this.getParent();b&&"function"==typeof b.isEnabled&&!b.isEnabled()||!Bp(this,1,!a)||(a||(this.setActive(!1),this.setHighlighted(!1)),this.isVisible()&&this.renderer_.setFocusable(this,a),this.setState(1,!a,!0))};f.setHighlighted=function(a){Bp(this,2,a)&&this.setState(2,a)};f.isActive=function(){return!!(this.state_&4)};f.setActive=function(a){Bp(this,4,a)&&this.setState(4,a)};f.isSelected=function(){return!!(this.state_&8)};
f.setSelected=function(a){Bp(this,8,a)&&this.setState(8,a)};f.isChecked=function(){return!!(this.state_&16)};f.setChecked=function(a){Bp(this,16,a)&&this.setState(16,a)};f.setFocused=function(a){Bp(this,32,a)&&this.setState(32,a)};f.isOpen=function(){return!!(this.state_&64)};f.setOpen=function(a){Bp(this,64,a)&&this.setState(64,a)};f.getState=function(){return this.state_};
f.setState=function(a,b,c){c||1!=a?U(this,a)&&b!=!!(this.state_&a)&&(this.renderer_.setState(this,a,b),this.state_=b?this.state_|a:this.state_&~a):this.setEnabled(!b)};var U=function(a,b){return!!(a.supportedStates_&b)};V.prototype.setSupportedState=function(a,b){if(this.inDocument_&&this.state_&a&&!b)throw Error("Component already rendered");!b&&this.state_&a&&this.setState(a,!1);this.supportedStates_=b?this.supportedStates_|a:this.supportedStates_&~a};
var Cp=function(a,b){return!!(a.autoStates_&b)&&U(a,b)},Bp=function(a,b,c){return U(a,b)&&!!(a.state_&b)!=c&&(!(a.statesWithTransitionEvents_&b)||a.dispatchEvent(Rj(b,c)))&&!a.disposed_};V.prototype.handleMouseOver=function(a){!Dp(a,this.getElement())&&this.dispatchEvent("enter")&&this.isEnabled()&&Cp(this,2)&&this.setHighlighted(!0)};V.prototype.handleMouseOut=function(a){!Dp(a,this.getElement())&&this.dispatchEvent("leave")&&(Cp(this,4)&&this.setActive(!1),Cp(this,2)&&this.setHighlighted(!1))};
V.prototype.preventPointerCapture_=function(a){var b=a.target;b.releasePointerCapture&&b.releasePointerCapture(a.pointerId)};V.prototype.handleContextMenu=Yc;var Dp=function(a,b){return!!a.relatedTarget&&He(b,a.relatedTarget)};f=V.prototype;
f.handleMouseDown=function(a){this.isEnabled()&&(Cp(this,2)&&this.setHighlighted(!0),0!=a.event_.button||Ub&&a.ctrlKey||(Cp(this,4)&&this.setActive(!0),this.renderer_&&this.renderer_.isFocusable(this)&&this.getKeyEventTarget().focus()));this.allowTextSelection_||0!=a.event_.button||Ub&&a.ctrlKey||a.preventDefault()};f.handleMouseUp=function(a){this.isEnabled()&&(Cp(this,2)&&this.setHighlighted(!0),this.isActive()&&this.performActionInternal(a)&&Cp(this,4)&&this.setActive(!1))};
f.handleDblClick=function(a){this.isEnabled()&&this.performActionInternal(a)};f.performActionInternal=function(a){Cp(this,16)&&this.setChecked(!this.isChecked());Cp(this,8)&&this.setSelected(!0);Cp(this,64)&&this.setOpen(!this.isOpen());var b=new lb("action",this);a&&(b.altKey=a.altKey,b.ctrlKey=a.ctrlKey,b.metaKey=a.metaKey,b.shiftKey=a.shiftKey,b.platformModifierKey=a.platformModifierKey);return this.dispatchEvent(b)};f.handleFocus=function(){Cp(this,32)&&this.setFocused(!0)};
f.handleBlur=function(){Cp(this,4)&&this.setActive(!1);Cp(this,32)&&this.setFocused(!1)};f.handleKeyEvent=function(a){return this.isVisible()&&this.isEnabled()&&this.handleKeyEventInternal(a)?(a.preventDefault(),a.stopPropagation(),!0):!1};f.handleKeyEventInternal=function(a){return 13==a.keyCode&&this.performActionInternal(a)};if("function"!==typeof V)throw Error("Invalid component class "+V);if("function"!==typeof jp)throw Error("Invalid renderer class "+jp);var Ep=Aa(V);xp[Ep]=jp;
wp("goog-control",function(){return new V(null)});var Ap=function(a){C.call(this);this.control_=a;this.clickExpected_=!1;this.handler_=new Ai(this);kb(this,this.handler_);var b=Uj(this.control_);a=a.pointerEventsEnabled_?up:tp;this.handler_.listen(b,a.MOUSEDOWN,this.handleMouseDown_).listen(b,a.MOUSEUP,this.handleMouseUp_).listen(b,"click",this.handleClick_)};x(Ap,C);var Fp=!E||9<=Number(jc);Ap.prototype.handleMouseDown_=function(){this.clickExpected_=!1};
Ap.prototype.handleMouseUp_=function(){this.clickExpected_=!0};var Gp=function(a,b){if(!Fp)return a.button=0,a.type=b,a;var c=document.createEvent("MouseEvents");c.initMouseEvent(b,a.bubbles,a.cancelable,a.view||null,a.detail,a.screenX,a.screenY,a.clientX,a.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,0,a.relatedTarget||null);return c};
Ap.prototype.handleClick_=function(a){if(this.clickExpected_)this.clickExpected_=!1;else{var b=a.event_,c=b.button,d=b.type,e=Gp(b,"mousedown");this.control_.handleMouseDown(new lc(e,a.currentTarget));e=Gp(b,"mouseup");this.control_.handleMouseUp(new lc(e,a.currentTarget));Fp||(b.button=c,b.type=d)}};Ap.prototype.disposeInternal=function(){this.control_=null;Ap.superClass_.disposeInternal.call(this)};var Hp=function(){};x(Hp,sp);va(Hp);f=Hp.prototype;f.getAriaRole=function(){};f.createDom=function(a){zp(a,!1);a.autoStates_&=-256;a.setSupportedState(32,!1);return a.getDomHelper().createDom("BUTTON",{"class":this.getClassNames(a).join(" "),disabled:!a.isEnabled(),title:a.getTooltip()||"",value:a.getValue()||""},a.getCaption()||"")};f.canDecorate=function(a){return"BUTTON"==a.tagName||"INPUT"==a.tagName&&("button"==a.type||"submit"==a.type||"reset"==a.type)};
f.decorate=function(a,b){zp(a,!1);a.autoStates_&=-256;a.setSupportedState(32,!1);if(b.disabled){var c=Ma(this.getClassForState(1));O(b,c)}return Hp.superClass_.decorate.call(this,a,b)};f.initializeDom=function(a){a.getHandler().listen(a.getElement(),"click",a.performActionInternal)};f.setAllowTextSelection=function(){};f.setRightToLeft=function(){};f.isFocusable=function(a){return a.isEnabled()};f.setFocusable=function(){};
f.setState=function(a,b,c){Hp.superClass_.setState.call(this,a,b,c);(a=a.getElement())&&1==b&&(a.disabled=c)};f.getValue=function(a){return a.value};f.setValue=function(a,b){a&&(a.value=b)};f.updateAriaState=function(){};var Ip=function(a,b,c){V.call(this,a,b||Hp.getInstance(),c)};x(Ip,V);f=Ip.prototype;f.getValue=function(){return this.value_};f.setValue=function(a){this.value_=a;this.renderer_.setValue(this.getElement(),a)};f.getTooltip=function(){return this.tooltip_};f.setTooltip=function(a){this.tooltip_=a;this.renderer_.setTooltip(this.getElement(),a)};f.setCollapsed=function(a){this.renderer_.setCollapsed(this,a)};f.disposeInternal=function(){Ip.superClass_.disposeInternal.call(this);delete this.value_;delete this.tooltip_};
f.enterDocument=function(){Ip.superClass_.enterDocument.call(this);if(U(this,32)){var a=this.getKeyEventTarget();a&&this.getHandler().listen(a,"keyup",this.handleKeyEventInternal)}};f.handleKeyEventInternal=function(a){return 13==a.keyCode&&"key"==a.type||32==a.keyCode&&"keyup"==a.type?this.performActionInternal(a):32==a.keyCode};wp("goog-button",function(){return new Ip(null)});var Jp=ha(["value"]),Lp=function(a,b,c,d){Ip.call(this,a,Kp.getInstance(),b);this.style_=c||0;this.width_=d||0;this.usingKennedyTooltip_=!1};x(Lp,Ip);Lp.prototype.getWidth=function(){return this.width_};var Np=function(a,b){a.width_!=b&&(a.width_=b,Mp(a))};f=Lp.prototype;
f.setTooltip=function(a){this.tooltip_=a;var b=this.getElement();if(b)if(this.usingKennedyTooltip_){var c=a instanceof Gd?bp(Id(a)):a;b.removeAttribute("title");b.removeAttribute("data-tooltip-contained");b.removeAttribute("data-tooltip");a?(a instanceof Gd?b.jfkTooltipHtmlInternal=a:(b.setAttribute("data-tooltip",a),b.jfkTooltipHtmlInternal=null),b.setAttribute("aria-label",c)):(b.jfkTooltipHtmlInternal=null,b.removeAttribute("aria-label"));a=ke(b)||ke();b=Aa(a.document_);cp[b]||(cp[b]=new dp(a))}else a?
b.title=a:b.removeAttribute("title")};f.setEnabled=function(a){this.isEnabled()!=a&&(Lp.superClass_.setEnabled.call(this,a),Mp(this))};f.focus=function(){var a=Uj(this);try{a.focus()}catch(b){}};f.setFocused=function(a){Lp.superClass_.setFocused.call(this,a);this.setNoFocusOutline_(!1)};f.handleMouseDown=function(a){Lp.superClass_.handleMouseDown.call(this,a);this.isEnabled()&&this.setNoFocusOutline_(!0)};f.handleMouseUp=function(a){Lp.superClass_.handleMouseUp.call(this,a);this.isEnabled()&&this.setNoFocusOutline_(!0)};
f.setNoFocusOutline_=function(a){this.getElement()&&mj(this.getElement(),"jfk-button-clear-outline",a)};
var Mp=function(a){a.getElement()&&Op(a.renderer_,a)},Pp=function(a){a=new Lp(a,void 0);a.setSupportedState(16,!0);return a},Kp=function(){this.standardButtonClass_=this.getCssClass()+"-standard";this.actionButtonClass_=this.getCssClass()+"-action";this.primaryButtonClass_=this.getCssClass()+"-primary";this.defaultButtonClass_=this.getCssClass()+"-default";this.flatButtonClass_=this.getCssClass()+"-flat";this.narrowButtonClass_=this.getCssClass()+"-narrow";this.miniButtonClass_=this.getCssClass()+
"-mini";this.contrastButtonClass_=this.getCssClass()+"-contrast"};x(Kp,sp);Kp.getInstance=function(){return Ig(Kp)};Kp.prototype.updateButton_=function(a,b,c){a&&c.style_!=a&&(c.style_=a,Mp(c));b&&Np(c,b)};Kp.prototype.getCssClass=function(){return"jfk-button"};
Kp.prototype.createDom=function(a){Sa(a,Lp,"Button is expected to be instance of jfk.Button");var b=a.getDomHelper(),c=ln(Vn,{disabled:!a.isEnabled(),checked:a.isChecked(),style:a.style_,title:a.getTooltip(),usingKennedyTooltip:a.usingKennedyTooltip_,value:a.getValue(),width:a.getWidth()},b);b.append(c,a.getContent());this.decorate(a,c);return c};
Kp.prototype.decorate=function(a,b){Kp.superClass_.decorate.call(this,a,b);this.classNamesToButtonUpdater_||(this.classNamesToButtonUpdater_=Dc(this.standardButtonClass_,Da(this.updateButton_,0,null),this.actionButtonClass_,Da(this.updateButton_,2,null),this.primaryButtonClass_,Da(this.updateButton_,3,null),this.defaultButtonClass_,Da(this.updateButton_,1,null),this.flatButtonClass_,Da(this.updateButton_,4,null),this.miniButtonClass_,Da(this.updateButton_,5,null),this.contrastButtonClass_,Da(this.updateButton_,
6,null),this.narrowButtonClass_,Da(this.updateButton_,null,1)));for(var c=gj(b),d=0;d<c.length;++d){var e=this.classNamesToButtonUpdater_[c[d]];e&&e(a)}if(c=b.getAttribute("data-tooltip"))a.tooltip_=c,a.usingKennedyTooltip_=!0;return b};
var yn=[function(a){Pm(a);var b=a[0].toLowerCase();if(0===b.indexOf("on")||0==="on".indexOf(b))throw Error("Prefix '"+a[0]+"' does not guarantee the attribute to be safe as it is also a prefix for event handler attributesPlease use 'addEventListener' to set event handlers.");Lm.forEach(function(c){if(0===c.indexOf(b))throw Error("Prefix '"+a[0]+"' does not guarantee the attribute to be safe as it is also a prefix for the security sensitive attribute '"+(c+"'. Please use native or safe DOM APIs to set the attribute."));
});return new Om(b,Mm)}(Jp)];Kp.prototype.getValue=function(a){return a.getAttribute("value")||""};Kp.prototype.setValue=function(a,b){a&&xn(a,b)};
var Op=function(a,b){function c(h,k){(h?d:e).push(k)}y(b.getElement(),"Button element must already exist when updating style.");var d=[],e=[],g=b.style_;c(0==g,a.standardButtonClass_);c(2==g,a.actionButtonClass_);c(3==g,a.primaryButtonClass_);c(4==g,a.flatButtonClass_);c(5==g,a.miniButtonClass_);c(1==g,a.defaultButtonClass_);c(6==g,a.contrastButtonClass_);c(1==b.getWidth(),a.narrowButtonClass_);c(!b.isEnabled(),a.getCssClass()+"-disabled");lj(b.getElement(),e);jj(b.getElement(),d)};var Qp=angular.module("jfkButton",[ul.name]),Rp={STANDARD:0,DEFAULT:1,ACTION:2,PRIMARY:3,FLAT:4,MINI:5},Sp;for(Sp in Rp)Vo[Sp]=Rp[Sp];var Tp={NORMAL:0,NARROW:1};for(Sp in Tp)Wo[Sp]=Tp[Sp];function Up(a,b){if("BUTTON"!=a[0].nodeName.toUpperCase()&&b.hasOwnProperty("ngClick")&&b.hasOwnProperty("ngDisabled"))throw Error("Error: ng-click found with ng-disabled on a jfk-button on a non <button>. This won't respect ng-disabled. Did you mean to use jfk-on-action instead?");}
function Vp(a,b,c){var d=cb(a[0].childNodes);Be(a[0]);c.decorate(a[0]);(a=c.getContentElement())&&Ae(a,d);O(c.getElement(),"goog-inline-block");O(c.getElement(),"jfk-button-standard");b.hasOwnProperty("jfkButtonStyle")&&b.$observe("jfkButtonStyle",function(e){e=Vo[e];c.style_!=e&&(c.style_=e,Mp(c))});b.hasOwnProperty("jfkButtonWidth")&&b.$observe("jfkButtonWidth",function(e){Np(c,Wo[e])});b.hasOwnProperty("jfkButtonCollapsed")&&b.$observe("jfkButtonCollapsed",function(e){c.setCollapsed(Un[e])})}
Qp.directive("jfkButton",["jfkCommon",function(a){return{link:function(b,c,d){Up(c,d);var e=new Lp("");Vp(c,d,e);pl(a,b,d,e)},restrict:"EAM"}}]);Qp.directive("jfkToggleButton",["jfkCommon",function(a){return{link:function(b,c,d,e){Up(c,d);var g=Pp("");Vp(c,d,g);pl(a,b,d,g);e&&(e.$render=function(){g.setChecked(e.$viewValue)},ql(b,g,"action",function(){b.$apply(function(){e.$setViewValue(g.isChecked())})}))},require:"?ngModel",restrict:"EAM"}}]);var Xp=function(a){K.call(this);this.items_=[];Wp(this,a)};x(Xp,K);Xp.prototype.selectedItem_=null;Xp.prototype.selectionHandler_=null;var Yp=function(a,b){a.selectionHandler_=b};Xp.prototype.getItemCount=function(){return this.items_.length};Xp.prototype.getItemAt=function(a){return this.items_[a]||null};var Wp=function(a,b){b&&(b.forEach(function(c){Zp(this,c,!1)},a),db(a.items_,b))};f=Xp.prototype;f.addItem=function(a){this.addItemAt(a,this.getItemCount())};
f.addItemAt=function(a,b){a&&(Zp(this,a,!1),eb(this.items_,b,0,a))};f.removeItem=function(a){a&&bb(this.items_,a)&&a==this.selectedItem_&&(this.selectedItem_=null,this.dispatchEvent("select"))};f.getSelectedItem=function(){return this.selectedItem_};f.getItems=function(){return cb(this.items_)};f.setSelectedItem=function(a){a!=this.selectedItem_&&(Zp(this,this.selectedItem_,!1),this.selectedItem_=a,Zp(this,a,!0));this.dispatchEvent("select")};
f.getSelectedIndex=function(){var a=this.selectedItem_;return a?this.items_.indexOf(a):-1};f.setSelectedIndex=function(a){this.setSelectedItem(this.getItemAt(a))};f.clear=function(){ab(this.items_);this.selectedItem_=null};f.disposeInternal=function(){Xp.superClass_.disposeInternal.call(this);delete this.items_;this.selectedItem_=null};var Zp=function(a,b,c){b&&("function"==typeof a.selectionHandler_?a.selectionHandler_(b,c):"function"==typeof b.setSelected&&b.setSelected(c))};var $p=angular.module("jfkSegmentedButtons",[ul.name]),bq=function(a,b){this.scope_=a;this.element_=b;this.buttonsInDomOrder_=[];this.selectionModel_=new Xp;this.enabled_=!0;Yp(this.selectionModel_,function(c,d){c.setChecked(d)});a.$watch(function(){aq(this)}.bind(this));a.$on("$destroy",u(function(){this.selectionModel_.dispose()},this))};
bq.prototype.add=function(a){this.selectionModel_.addItem(a);a.listen("action",function(b){this.selectionModel_.getSelectedItem()!=b.target?this.selectionModel_.setSelectedItem(b.target):b.target.setChecked(!0)},void 0,this);a.setEnabled(this.enabled_)};bq.prototype.remove=function(a){this.selectionModel_.disposed_||this.selectionModel_.removeItem(a)};
var cq=function(a,b){a.selectionModel_.listen("select",function(d){var e=d.target.getSelectedItem();e&&e.getModel&&e.model_!=b.$viewValue&&this.scope_.$apply(function(){b.$setViewValue(e.model_)})},void 0,a);b.$render=u(function(){var d=Za(this.selectionModel_.getItems(),function(e){return e.getModel&&e.model_==b.$viewValue});this.selectionModel_.setSelectedIndex(d)},a);var c=[];a.scope_.$watch(u(function(){if(!this.selectionModel_.disposed_){var d=this.selectionModel_.getItems().map(function(e){return e.getModel&&
e.model_});gb(c,d)||(c=d,b.$render())}},a))};bq.prototype.setEnabled=function(a){this.enabled_=a;this.selectionModel_.getItems().forEach(function(b){b.setEnabled(a)})};
var aq=function(a){var b=dq(a);gb(b,a.buttonsInDomOrder_)||(b.forEach(function(c,d){var e=0==d;d=d==b.length-1;c.setCollapsed(Un[e&&d?"NONE":e?"END":d?"START":"BOTH"])}),a.buttonsInDomOrder_=b)},dq=function(a){var b=me("jfk-button",a.element_[0]);return Va(b,function(c){return Ya(this.selectionModel_.getItems(),function(d){return d.getElement()==c})},a).filter(Zc)};bq.$inject=["$scope","$element"];
$p.directive("jfkSegmentedButtonGroup",function(){return{controller:bq,restrict:"EA",require:["jfkSegmentedButtonGroup","?ngModel"],link:function(a,b,c,d){b.addClass("jfk-segmented-button-group");d[1]&&cq(d[0],d[1]);aq(d[0]);c.ngDisabled&&a.$watch(c.ngDisabled,function(e){d[0].setEnabled(!e)})}}});
$p.directive("jfkSegmentedButton",["jfkCommon",function(a){var b={NORMAL:0,NARROW:1};return{restrict:"EA",scope:!0,require:"^jfkSegmentedButtonGroup",link:function(c,d,e,g){d.addClass("goog-inline-block");var h=cb(d[0].childNodes);Be(d[0]);var k=Pp(null);k.render(d[0]);(d=k.getContentElement())&&Ae(d,h);pl(a,c,e,k);e.hasOwnProperty("jfkButtonWidth")&&e.$observe("jfkButtonWidth",function(l){Np(k,b[l])});g.add(k);c.$on("$destroy",function(){g.remove(k);k.dispose()})}}}]);var eq=function(a,b){var c=function(e){return null==e||isNaN(e)?null:!!e},d=function(e,g,h,k){e.setLabel?e.setLabel(g):e.setChecked&&ql(k,g,"click",function(l){!He(e.getElement(),l.target)&&e.isEnabled()&&(e.setChecked(!e.isChecked()),e.dispatchEvent(b))})};return function(e,g){var h="g"===g.prefix_+""?"gCheckboxTristate":"tristate";return{priority:tl,replace:!0,require:"?ngModel",restrict:"EAM",template:"<span></span>",link:function(k,l,m,p){l.unbind("click");var r=new a,w=m.hasOwnProperty(h);if(m.ngClick){var z=
e(m.ngClick);ql(k,r,b,function(A){k.$apply(function(){z(k,{$event:A})})})}for(var B=l[0].parentNode;B;B=B.parentNode)if(B.tagName&&"LABEL"==B.tagName){d(r,B,g,k);break}m.$observe("id",function(A){A&&setTimeout(function(){var pa=document.querySelector("label[for="+A+"]");pa&&d(r,pa,g,k)},0)});pl(g,k,m,r);r.render(l[0]);p&&(w&&(ab(p.$formatters),ab(p.$parsers),p.$formatters.push(c)),p.$render=function(){r.setChecked(w?p.$viewValue:!!p.$viewValue)},ql(k,r,b,function(){var A=r.isChecked()||w&&null==r.checked_&&
null;k.$apply(function(){p.$setViewValue(A)})}));m.ngChecked&&k.$watch(m.ngChecked,function(A){r.setChecked(w?c(A):!!A)})}}}};var fq=function(a,b){a=a||{};var c=a.attributes;var d=a.classes,e=a.checked,g=a.disabled,h=a.id,k=a.tabindex,l=a.undetermined,m=a.ariaLabel;a=a.ariaLabelledBy;gn();Zm["jfk.templates.checkbox.main"]?c=Zm["jfk.templates.checkbox.main"]({attributes:c,classes:d,checked:e,disabled:g,id:h,tabindex:k,undetermined:l,ariaLabel:m,ariaLabelledBy:a},b):(b=l?" "+T("jfk-checkbox-undetermined"):e?" "+T("jfk-checkbox-checked"):" "+T("jfk-checkbox-unchecked"),e=l?"mixed":e?"true":"false",m=a?' aria-labelledby="'+
T(a)+'"':m?' aria-label="'+T(m)+'"':"",d='<span class="'+T("jfk-checkbox")+" "+T("goog-inline-block")+b+(g?" "+T("jfk-checkbox-disabled"):"")+(d?" "+T(d):"")+'" role="checkbox" aria-checked="'+e+'"'+m+(h?' id="'+T(h)+'"':"")+(g?' aria-disabled="true" tabindex="-1"':' tabindex="'+(k?T(k):"0")+'"'),c?(c=Wm(c,Rm,Vm)?c.getContent():kn(c),c=en(c)):c="",c=Ym(d+c+' dir="ltr"><div class="'+T("jfk-checkbox-checkmark")+'" role="presentation"></div></span>'));return c};var lp=function(){};x(lp,jp);va(lp);lp.prototype.createDom=function(a){var b=a.getDomHelper().createDom("SPAN",this.getClassNames(a).join(" "));gq(this,b,a.checked_);return b};lp.prototype.decorate=function(a,b){b=lp.superClass_.decorate.call(this,a,b);y(b);var c=gj(b),d=!1;$a(c,hq(this,null))?d=null:$a(c,hq(this,!0))?d=!0:$a(c,hq(this,!1))&&(d=!1);a.checked_=d;y(b,"The element cannot be null.");N(b,"checked",null==d?"mixed":1==d?"true":"false");return b};lp.prototype.getAriaRole=function(){return"checkbox"};
var gq=function(a,b,c){if(b){y(b);var d=hq(a,c);y(d);y(b);ij(b,d)||(rc(iq,function(e){e=hq(this,e);y(b);mj(b,e,e==d)},a),N(b,"checked",null==c?"mixed":1==c?"true":"false"))}};lp.prototype.getCssClass=function(){return"goog-checkbox"};var hq=function(a,b){a=a.getCssClass();if(1==b)return a+"-checked";if(0==b)return a+"-unchecked";if(null==b)return a+"-undetermined";throw Error("Invalid checkbox state: "+b);};var jq=function(a,b,c){c=c||lp.getInstance();V.call(this,null,c,b);this.checked_=void 0!==a?a:!1};x(jq,V);var iq={CHECKED:!0,UNCHECKED:!1,UNDETERMINED:null};f=jq.prototype;f.label_=null;f.isChecked=function(){return 1==this.checked_};f.setChecked=function(a){a!=this.checked_&&(this.checked_=a,gq(this.renderer_,this.getElement(),this.checked_))};
f.setLabel=function(a){if(this.inDocument_){var b=!!(this.state_&32);this.exitDocument();this.label_=a;this.enterDocument();b&&Uj(this).focus()}else this.label_=a};f.toggle=function(){this.setChecked(this.checked_?!1:!0)};
f.enterDocument=function(){jq.superClass_.enterDocument.call(this);if(this.handleMouseEvents_){var a=this.getHandler();this.label_&&a.listen(this.label_,"click",this.handleClickOrSpace_).listen(this.label_,"mouseover",this.handleMouseOver).listen(this.label_,"mouseout",this.handleMouseOut).listen(this.label_,"mousedown",this.handleMouseDown).listen(this.label_,"mouseup",this.handleMouseUp);a.listen(this.getElement(),"click",this.handleClickOrSpace_)}a=Uj(this);if(this.label_&&a!=this.label_&&pb(cj(a,
"label"))){if(!this.label_.id){var b=this.label_;var c=Sj(this)+".lbl";b.id=c}N(a,"labelledby",this.label_.id)}};f.handleClickOrSpace_=function(a){a.stopPropagation();var b=this.checked_?"uncheck":"check";this.isEnabled()&&!a.target.href&&this.dispatchEvent(b)&&(a.preventDefault(),this.toggle(),this.dispatchEvent("change"))};f.handleKeyEventInternal=function(a){32==a.keyCode&&(this.performActionInternal(a),this.handleClickOrSpace_(a));return!1};wp("goog-checkbox",function(){return new jq});var kq=function(a,b){var c=mp();jq.call(this,a,b,c);this.setSupportedState(4,!0)};n(kq,jq);f=kq.prototype;f.createDom=function(){this.element_=ln(fq,{checked:this.isChecked(),disabled:!this.isEnabled(),undetermined:null==this.checked_},this.getDomHelper())};
f.decorateInternal=function(a){jq.prototype.decorateInternal.call(this,a);O(a,"goog-inline-block");this.getElement().dir="ltr";this.getElementByClass("jfk-checkbox-checkmark")||(a=this.getDomHelper().createDom("DIV","jfk-checkbox-checkmark"),this.getElement().appendChild(a));aj(this.getRequiredElementByClass("jfk-checkbox-checkmark"),"presentation")};f.setFocused=function(a){jq.prototype.setFocused.call(this,a);this.setNoFocusOutline_(!1)};
f.handleMouseDown=function(a){jq.prototype.handleMouseDown.call(this,a);this.isEnabled()&&this.setNoFocusOutline_(!0)};f.setNoFocusOutline_=function(a){this.getElement()&&mj(this.getElement(),"jfk-checkbox-clearOutline",a)};var lq=eq(kq,"change");var mq=function(a,b){a=a||{};a=a.checked;gn();Zm["jfk.templates.slideToggle.main"]?b=Zm["jfk.templates.slideToggle.main"]({checked:a},b):(b='<div class="'+T("jfk-slideToggle")+" "+T("goog-inline-block")+(a?" "+T("jfk-slideToggle-checked"):"")+'"><div class="'+T("jfk-slideToggle-on")+'">',b=b+'on</div><div class="'+(T("jfk-slideToggle-off")+'">'),b=b+'off</div><div class="'+(T("jfk-slideToggle-thumb")+'"></div></div>'),b=Ym(b));return b};function nq(a){Ip.call(this,"",oq.getInstance(),a);this.setSupportedState(16,!0)}x(nq,Ip);nq.prototype.setFocused=function(a){nq.superClass_.setFocused.call(this,a);this.setNoFocusOutline_(!1)};nq.prototype.handleMouseDown=function(a){nq.superClass_.handleMouseDown.call(this,a);this.isEnabled()&&this.setNoFocusOutline_(!0)};nq.prototype.setNoFocusOutline_=function(a){this.getElement()&&mj(this.getElement(),"jfk-slideToggle-clearOutline",a)};var oq=function(){};x(oq,sp);oq.getInstance=function(){return Ig(oq)};
oq.prototype.createDom=function(a){return ln(mq,{checked:a.isChecked()},a.getDomHelper())};oq.prototype.canDecorate=function(){return!1};oq.prototype.getCssClass=function(){return"jfk-slideToggle"};var pq=eq(nq,"action");var qq=function(a,b){a=a.checked;gn();Zm["jfk.templates.star.main"]?b=Zm["jfk.templates.star.main"]({checked:a},b):(b='<div class="'+T("jfk-star")+(a?" "+T("jfk-star-checked"):"")+'" role="button" aria-label="',b+="Toggle star".replace(bn,cn),b=Ym(b+('" aria-checked="'+(a?"true":"false")+'"></div>')));return b};var rq=function(){};x(rq,sp);va(rq);f=rq.prototype;f.createDom=function(a){var b=this.getClassNames(a);b=a.getDomHelper().createDom("DIV","goog-inline-block "+b.join(" "),this.createButton(a.getContent(),a.getDomHelper()));this.setTooltip(b,a.getTooltip());return b};f.getAriaRole=function(){return"button"};f.getContentElement=function(a){return a&&a.firstChild&&a.firstChild.firstChild};
f.createButton=function(a,b){return b.createDom("DIV","goog-inline-block "+(this.getCssClass()+"-outer-box"),b.createDom("DIV","goog-inline-block "+(this.getCssClass()+"-inner-box"),a))};f.canDecorate=function(a){return"DIV"==a.tagName};
f.decorate=function(a,b){y(b);sq(b,!0);sq(b,!1);a:{var c=a.getDomHelper().getFirstElementChild(b);var d=this.getCssClass()+"-outer-box";if(c&&ij(c,d)&&(c=a.getDomHelper().getFirstElementChild(c),d=this.getCssClass()+"-inner-box",c&&ij(c,d))){c=!0;break a}c=!1}c||b.appendChild(this.createButton(b.childNodes,a.getDomHelper()));jj(b,["goog-inline-block",this.getCssClass()]);return rq.superClass_.decorate.call(this,a,b)};f.getCssClass=function(){return"goog-custom-button"};
var sq=function(a,b){if(a)for(var c=b?a.firstChild:a.lastChild,d;c&&c.parentNode==a;){d=b?c.nextSibling:c.previousSibling;if(3==c.nodeType){var e=c.nodeValue;if(""==qb(e))a.removeChild(c);else{c.nodeValue=b?e.replace(/^[\s\xa0]+/,""):e.replace(/[\s\xa0]+$/,"");break}}else break;c=d}};var tq=function(a,b,c){Ip.call(this,a,b||rq.getInstance(),c);this.setSupportedState(16,!0)};x(tq,Ip);wp("goog-toggle-button",function(){return new tq(null)});var vq=function(a,b){tq.call(this,"",a||uq.getInstance(),b)};n(vq,tq);var uq=function(){};n(uq,sp);uq.prototype.getCssClass=function(){return"jfk-star"};uq.prototype.createDom=function(a){return ln(qq,{checked:a.isChecked()},a.getDomHelper())};uq.prototype.getAriaRole=function(){return"checkbox"};uq.prototype.updateAriaState=function(a,b,c){16==b?(y(a,"The button DOM element cannot be null."),N(a,"checked",c)):sp.prototype.updateAriaState.call(this,a,b,c)};uq.getInstance=function(){return Ig(uq)};var wq=eq(vq,"action");var xq=angular.module("jfkCheckbox",[ul.name]);xq.directive("jfkCheckbox",["$parse","jfkCommon",lq]);xq.directive("jfkSlideToggle",["$parse","jfkCommon",pq]);xq.directive("jfkStar",["$parse","jfkCommon",wq]);var yq=function(a,b){R.call(this,b);this.label_=a||""},zq;x(yq,R);yq.prototype.ffKeyRestoreValue_=null;yq.prototype.labelRestoreDelayMs=10;var Aq=function(){null==zq&&(zq="placeholder"in xe(document,"INPUT"));return zq};f=yq.prototype;f.hasFocus_=!1;f.createDom=function(){this.element_=this.getDomHelper().createDom("INPUT",{type:"text"})};
f.decorateInternal=function(a){yq.superClass_.decorateInternal.call(this,a);this.label_||(this.label_=a.getAttribute("label")||"");Re(I(a))==a&&(this.hasFocus_=!0,a=this.getElement(),y(a),kj(a,this.labelCssClassName));Aq()&&(this.getElement().placeholder=this.label_);a=this.getElement();y(a,"The label input element cannot be null.");N(a,"label",this.label_)};
f.enterDocument=function(){yq.superClass_.enterDocument.call(this);var a=new Ai(this);a.listen(this.getElement(),"focus",this.handleFocus_);a.listen(this.getElement(),"blur",this.handleBlur_);if(Aq())this.eventHandler_=a;else{F&&a.listen(this.getElement(),["keypress","keydown","keyup"],this.handleEscapeKeys_);var b=I(this.getElement());a.listen(b?te(b):window,"load",this.handleWindowLoad_);this.eventHandler_=a;Bq(this)}this.check_();this.getElement().labelInput_=this};
f.exitDocument=function(){yq.superClass_.exitDocument.call(this);this.eventHandler_&&(this.eventHandler_.dispose(),this.eventHandler_=null);this.getElement().labelInput_=null};var Bq=function(a){!a.formAttached_&&a.eventHandler_&&a.getElement().form&&(a.eventHandler_.listen(a.getElement().form,"submit",a.handleFormSubmit_),a.formAttached_=!0)};f=yq.prototype;
f.disposeInternal=function(){yq.superClass_.disposeInternal.call(this);this.eventHandler_&&(this.eventHandler_.dispose(),this.eventHandler_=null)};f.labelCssClassName="label-input-label";f.handleFocus_=function(){this.hasFocus_=!0;var a=this.getElement();y(a);kj(a,this.labelCssClassName);if(!Aq()&&!Cq(this)&&!this.inFocusAndSelect_){var b=this;a=function(){b.getElement()&&(b.getElement().value="")};E?Qh(a,10):a()}};
f.handleBlur_=function(){Aq()||(this.eventHandler_.unlisten(this.getElement(),"click",this.handleFocus_),this.ffKeyRestoreValue_=null);this.hasFocus_=!1;this.check_()};f.handleEscapeKeys_=function(a){27==a.keyCode&&("keydown"==a.type?this.ffKeyRestoreValue_=this.getElement().value:"keypress"==a.type?this.getElement().value=this.ffKeyRestoreValue_:"keyup"==a.type&&(this.ffKeyRestoreValue_=null),a.preventDefault())};
f.handleFormSubmit_=function(){Cq(this)||(this.getElement().value="",Qh(this.handleAfterSubmit_,10,this))};f.handleAfterSubmit_=function(){Cq(this)||(this.getElement().value=this.label_)};f.handleWindowLoad_=function(){this.check_()};f.hasFocus=function(){return this.hasFocus_};var Cq=function(a){return!!a.getElement()&&""!=a.getElement().value&&a.getElement().value!=a.label_};f=yq.prototype;f.clear=function(){this.getElement().value="";null!=this.ffKeyRestoreValue_&&(this.ffKeyRestoreValue_="")};
f.reset=function(){Cq(this)&&(this.clear(),this.check_())};f.setValue=function(a){null!=this.ffKeyRestoreValue_&&(this.ffKeyRestoreValue_=a);this.getElement().value=a;this.check_()};f.getValue=function(){return null!=this.ffKeyRestoreValue_?this.ffKeyRestoreValue_:Cq(this)?this.getElement().value:""};f.setLabel=function(a){var b=this.getElement();Aq()?(b&&(b.placeholder=a),this.label_=a):Cq(this)||(b&&(b.value=""),this.label_=a,this.restoreLabel_());b&&N(b,"label",this.label_)};
f.check_=function(){var a=this.getElement();y(a,"The label input element cannot be null.");Aq()?this.getElement().placeholder!=this.label_&&(this.getElement().placeholder=this.label_):Bq(this);N(a,"label",this.label_);Cq(this)?(a=this.getElement(),y(a),kj(a,this.labelCssClassName)):(this.inFocusAndSelect_||this.hasFocus_||(a=this.getElement(),y(a),O(a,this.labelCssClassName)),Aq()||Qh(this.restoreLabel_,this.labelRestoreDelayMs,this))};
f.setEnabled=function(a){this.getElement().disabled=!a;var b=this.getElement();y(b);mj(b,this.labelCssClassName+"-disabled",!a)};f.isEnabled=function(){return!this.getElement().disabled};f.restoreLabel_=function(){!this.getElement()||Cq(this)||this.hasFocus_||(this.getElement().value=this.label_)};var Dq=angular.module("jfkInput",[ul.name]);Dq.directive("jfkInput",["jfkCommon",function(a){return{link:function(b,c,d){var e=c[0];if("INPUT"!=e.tagName)throw Error("jfkInput directive must be on an INPUT tag, not "+e.tagName);c.addClass("jfk-textinput");var g=new yq;g.decorate(e);d.$observe("placeholder",function(h){g.setLabel(h||"")});pl(a,b,d,g)}}}]);var Eq=function(){};x(Eq,sp);va(Eq);f=Eq.prototype;f.createDom=function(a){var b=this.getClassNames(a);b=a.getDomHelper().createDom("DIV","goog-inline-block "+b.join(" "),a.getContent());this.setTooltip(b,a.getTooltip());return b};f.getAriaRole=function(){return"button"};f.canDecorate=function(a){return"DIV"==a.tagName};f.decorate=function(a,b){y(b);O(b,"goog-inline-block");return Eq.superClass_.decorate.call(this,a,b)};f.getValue=function(){return""};f.getCssClass=function(){return"goog-flat-button"};
wp("goog-flat-button",function(){return new Ip(null,Eq.getInstance())});var Fq=function(a){this.ariaRole_=a};va(Fq);Fq.prototype.getAriaRole=function(){return this.ariaRole_};var Gq=function(a,b){a&&(a.tabIndex=b?0:-1)};Fq.prototype.createDom=function(a){return a.getDomHelper().createDom("DIV",this.getClassNames(a).join(" "))};Fq.prototype.getContentElement=function(a){return a};Fq.prototype.canDecorate=function(a){return"DIV"==a.tagName};
Fq.prototype.decorate=function(a,b){b.id&&Tj(a,b.id);var c=this.getCssClass(),d=!1,e=gj(b);e&&Array.prototype.forEach.call(e,function(g){g==c?d=!0:g&&(g==c+"-disabled"?a.setEnabled(!1):g==c+"-horizontal"?a.setOrientation("horizontal"):g==c+"-vertical"&&a.setOrientation("vertical"))},this);d||O(b,c);Hq(this,a,this.getContentElement(b));return b};
var Hq=function(a,b,c){if(c)for(var d=c.firstChild,e;d&&d.parentNode==c;){e=d.nextSibling;if(1==d.nodeType){var g=a.getDecoratorForChild(d);g&&(g.element_=d,b.isEnabled()||g.setEnabled(!1),b.addChild(g),g.decorate(d))}else d.nodeValue&&""!=qb(d.nodeValue)||c.removeChild(d);d=e}};f=Fq.prototype;f.getDecoratorForChild=function(a){a:{y(a);a=gj(a);for(var b=0,c=a.length;b<c;b++){var d=a[b];if(d=d in vp?vp[d]():null){a=d;break a}}a=null}return a};
f.initializeDom=function(a){a=a.getElement();y(a,"The container DOM element cannot be null.");Jj(a,!0,F);E&&(a.hideFocus=!0);var b=this.getAriaRole();b&&aj(a,b)};f.getKeyEventTarget=function(a){return a.getElement()};f.getCssClass=function(){return"goog-container"};f.getClassNames=function(a){var b=this.getCssClass(),c=[b,"horizontal"==a.orientation_?b+"-horizontal":b+"-vertical"];a.isEnabled()||c.push(b+"-disabled");return c};var Iq=function(a,b,c){R.call(this,c);this.renderer_=b||Fq.getInstance();this.orientation_=a||"vertical"};x(Iq,R);f=Iq.prototype;f.keyEventTarget_=null;f.keyHandler_=null;f.renderer_=null;f.orientation_=null;f.visible_=!0;f.enabled_=!0;f.focusable_=!0;f.highlightedIndex_=-1;f.openItem_=null;f.mouseButtonPressed_=!1;f.allowFocusableChildren_=!1;f.openFollowsHighlight_=!0;f.childElementIdMap_=null;f.getKeyEventTarget=function(){return this.keyEventTarget_||this.renderer_.getKeyEventTarget(this)};
f.getKeyHandler=function(){return this.keyHandler_||(this.keyHandler_=new Ql(this.getKeyEventTarget()))};f.createDom=function(){this.element_=this.renderer_.createDom(this)};f.getContentElement=function(){return this.renderer_.getContentElement(this.getElement())};f.canDecorate=function(a){return this.renderer_.canDecorate(a)};f.decorateInternal=function(a){this.element_=this.renderer_.decorate(this,a);"none"==a.style.display&&(this.visible_=!1)};
f.enterDocument=function(){Iq.superClass_.enterDocument.call(this);Yj(this,function(c){c.inDocument_&&Jq(this,c)},this);var a=this.getElement();this.renderer_.initializeDom(this);this.setVisible(this.visible_,!0);var b=this.pointerEventsEnabled_?up:tp;this.getHandler().listen(this,"enter",this.handleEnterItem).listen(this,"highlight",this.handleHighlightItem).listen(this,"unhighlight",this.handleUnHighlightItem).listen(this,"open",this.handleOpenItem).listen(this,"close",this.handleCloseItem).listen(a,
b.MOUSEDOWN,this.handleMouseDown).listen(I(a),[b.MOUSEUP,b.MOUSECANCEL],this.handleDocumentMouseUp).listen(a,[b.MOUSEDOWN,b.MOUSEUP,b.MOUSECANCEL,"mouseover","mouseout","contextmenu"],this.handleChildMouseEvents);this.pointerEventsEnabled_&&this.getHandler().listen(a,"gotpointercapture",this.preventPointerCapture_);this.isFocusable()&&Kq(this,!0)};f.preventPointerCapture_=function(a){var b=a.target;b.releasePointerCapture&&b.releasePointerCapture(a.pointerId)};
var Kq=function(a,b){var c=a.getHandler(),d=a.getKeyEventTarget();b?c.listen(d,"focus",a.handleFocus).listen(d,"blur",a.handleBlur).listen(a.getKeyHandler(),"key",a.handleKeyEvent):c.unlisten(d,"focus",a.handleFocus).unlisten(d,"blur",a.handleBlur).unlisten(a.getKeyHandler(),"key",a.handleKeyEvent)};f=Iq.prototype;f.exitDocument=function(){this.setHighlightedIndex(-1);this.openItem_&&this.openItem_.setOpen(!1);this.mouseButtonPressed_=!1;Iq.superClass_.exitDocument.call(this)};
f.disposeInternal=function(){Iq.superClass_.disposeInternal.call(this);this.keyHandler_&&(this.keyHandler_.dispose(),this.keyHandler_=null);this.renderer_=this.openItem_=this.childElementIdMap_=this.keyEventTarget_=null};f.handleEnterItem=function(){return!0};
f.handleHighlightItem=function(a){var b=bk(this,a.target);if(-1<b&&b!=this.highlightedIndex_){var c=Lq(this);c&&c.setHighlighted(!1);this.highlightedIndex_=b;c=Lq(this);this.mouseButtonPressed_&&c.setActive(!0);this.openFollowsHighlight_&&this.openItem_&&c!=this.openItem_&&(U(c,64)?c.setOpen(!0):this.openItem_.setOpen(!1))}b=this.getElement();y(b,"The DOM element for the container cannot be null.");null!=a.target.getElement()&&N(b,"activedescendant",a.target.getElement().id)};
f.handleUnHighlightItem=function(a){a.target==Lq(this)&&(this.highlightedIndex_=-1);a=this.getElement();y(a,"The DOM element for the container cannot be null.");a.removeAttribute(bj("activedescendant"))};f.handleOpenItem=function(a){(a=a.target)&&a!=this.openItem_&&a.getParent()==this&&(this.openItem_&&this.openItem_.setOpen(!1),this.openItem_=a)};
f.handleCloseItem=function(a){a.target==this.openItem_&&(this.openItem_=null);var b=this.getElement(),c=a.target.getElement();b&&a.target.state_&2&&c&&ej(b,c)};f.handleMouseDown=function(a){this.enabled_&&(this.mouseButtonPressed_=!0);var b=this.getKeyEventTarget();b&&Me(b)?b.focus():a.preventDefault()};f.handleDocumentMouseUp=function(){this.mouseButtonPressed_=!1};
f.handleChildMouseEvents=function(a){var b=this.pointerEventsEnabled_?up:tp;a:{var c=a.target;if(this.childElementIdMap_)for(var d=this.getElement();c&&c!==d;){var e=c.id;if(e in this.childElementIdMap_){c=this.childElementIdMap_[e];break a}c=c.parentNode}c=null}if(c)switch(a.type){case b.MOUSEDOWN:c.handleMouseDown(a);break;case b.MOUSEUP:case b.MOUSECANCEL:c.handleMouseUp(a);break;case "mouseover":c.handleMouseOver(a);break;case "mouseout":c.handleMouseOut(a);break;case "contextmenu":c.handleContextMenu(a)}};
f.handleFocus=function(){};f.handleBlur=function(){this.setHighlightedIndex(-1);this.mouseButtonPressed_=!1;this.openItem_&&this.openItem_.setOpen(!1)};f.handleKeyEvent=function(a){return this.isEnabled()&&this.isVisible()&&(0!=Zj(this)||this.keyEventTarget_)&&this.handleKeyEventInternal(a)?(a.preventDefault(),a.stopPropagation(),!0):!1};
f.handleKeyEventInternal=function(a){var b=Lq(this);if(b&&"function"==typeof b.handleKeyEvent&&b.handleKeyEvent(a)||this.openItem_&&this.openItem_!=b&&"function"==typeof this.openItem_.handleKeyEvent&&this.openItem_.handleKeyEvent(a))return!0;if(a.shiftKey||a.ctrlKey||a.metaKey||a.altKey)return!1;switch(a.keyCode){case 27:if(this.isFocusable())this.getKeyEventTarget().blur();else return!1;break;case 36:Mq(this);break;case 35:Nq(this);break;case 38:if("vertical"==this.orientation_)Oq(this);else return!1;
break;case 37:if("horizontal"==this.orientation_)this.isRightToLeft()?Pq(this):Oq(this);else return!1;break;case 40:if("vertical"==this.orientation_)Pq(this);else return!1;break;case 39:if("horizontal"==this.orientation_)this.isRightToLeft()?Oq(this):Pq(this);else return!1;break;default:return!1}return!0};var Jq=function(a,b){var c=b.getElement();c=c.id||(c.id=Sj(b));a.childElementIdMap_||(a.childElementIdMap_={});a.childElementIdMap_[c]=b};f=Iq.prototype;
f.addChild=function(a,b){Sa(a,V,"The child of a container must be a control");Iq.superClass_.addChild.call(this,a,b)};
f.addChildAt=function(a,b,c){Sa(a,V);a.statesWithTransitionEvents_|=2;a.statesWithTransitionEvents_|=64;!this.isFocusable()&&this.allowFocusableChildren_||a.setSupportedState(32,!1);zp(a,!1);var d=a.getParent()==this?bk(this,a):-1;Iq.superClass_.addChildAt.call(this,a,b,c);a.inDocument_&&this.inDocument_&&Jq(this,a);a=d;-1==a&&(a=Zj(this));a==this.highlightedIndex_?this.highlightedIndex_=Math.min(Zj(this)-1,b):a>this.highlightedIndex_&&b<=this.highlightedIndex_?this.highlightedIndex_++:a<this.highlightedIndex_&&
b>this.highlightedIndex_&&this.highlightedIndex_--};f.removeChild=function(a,b){a="string"===typeof a?Vj(this,a):a;Sa(a,V);if(a){var c=bk(this,a);-1!=c&&(c==this.highlightedIndex_?(a.setHighlighted(!1),this.highlightedIndex_=-1):c<this.highlightedIndex_&&this.highlightedIndex_--);var d=a.getElement();d&&d.id&&this.childElementIdMap_&&(c=this.childElementIdMap_,d=d.id,d in c&&delete c[d])}a=Iq.superClass_.removeChild.call(this,a,b);zp(a,!0);return a};
f.setOrientation=function(a){if(this.getElement())throw Error("Component already rendered");this.orientation_=a};f.isVisible=function(){return this.visible_};f.setVisible=function(a,b){if(b||this.visible_!=a&&this.dispatchEvent(a?"show":"hide")){this.visible_=a;var c=this.getElement();c&&(Q(c,a),this.isFocusable()&&Gq(this.getKeyEventTarget(),this.enabled_&&this.visible_),b||this.dispatchEvent(this.visible_?"aftershow":"afterhide"));return!0}return!1};f.isEnabled=function(){return this.enabled_};
f.setEnabled=function(a){this.enabled_!=a&&this.dispatchEvent(a?"enable":"disable")&&(a?(this.enabled_=!0,Yj(this,function(b){b.wasDisabled?delete b.wasDisabled:b.setEnabled(!0)})):(Yj(this,function(b){b.isEnabled()?b.setEnabled(!1):b.wasDisabled=!0}),this.mouseButtonPressed_=this.enabled_=!1),this.isFocusable()&&Gq(this.getKeyEventTarget(),a&&this.visible_))};f.isFocusable=function(){return this.focusable_};
f.setFocusable=function(a){a!=this.focusable_&&this.inDocument_&&Kq(this,a);this.focusable_=a;this.enabled_&&this.visible_&&Gq(this.getKeyEventTarget(),a)};f.setHighlightedIndex=function(a){(a=ak(this,a))?a.setHighlighted(!0):-1<this.highlightedIndex_&&Lq(this).setHighlighted(!1)};f.setHighlighted=function(a){this.setHighlightedIndex(bk(this,a))};
var Lq=function(a){return ak(a,a.highlightedIndex_)},Mq=function(a){Qq(a,function(b,c){return(b+1)%c},Zj(a)-1)},Nq=function(a){Qq(a,function(b,c){b--;return 0>b?c-1:b},0)},Pq=function(a){Qq(a,function(b,c){return(b+1)%c},a.highlightedIndex_)},Oq=function(a){Qq(a,function(b,c){b--;return 0>b?c-1:b},a.highlightedIndex_)},Qq=function(a,b,c){c=0>c?bk(a,a.openItem_):c;var d=Zj(a);c=b.call(a,c,d);for(var e=0;e<=d;){var g=ak(a,c);if(g&&a.canHighlightItem(g)){a.setHighlightedIndex(c);break}e++;c=b.call(a,
c,d)}};Iq.prototype.canHighlightItem=function(a){return a.isVisible()&&a.isEnabled()&&U(a,2)};var Rq=function(){};x(Rq,jp);va(Rq);Rq.prototype.getCssClass=function(){return"goog-menuheader"};var Sq=function(a,b,c){V.call(this,a,c||Rq.getInstance(),b);this.setSupportedState(1,!1);this.setSupportedState(2,!1);this.setSupportedState(4,!1);this.setSupportedState(32,!1);this.state_=1};x(Sq,V);wp("goog-menuheader",function(){return new Sq(null)});var Tq=function(){this.classNameCache_=[]};x(Tq,jp);va(Tq);var Uq=function(a,b){var c=a.classNameCache_[b];if(!c){switch(b){case 0:c=a.getCssClass()+"-highlight";break;case 1:c=a.getCssClass()+"-checkbox";break;case 2:c=a.getCssClass()+"-content"}a.classNameCache_[b]=c}return c};f=Tq.prototype;f.getAriaRole=function(){return"menuitem"};
f.createDom=function(a){var b=a.getDomHelper().createDom("DIV",this.getClassNames(a).join(" "),Vq(this,a.getContent(),a.getDomHelper()));Wq(this,a,b,U(a,8)||U(a,16));return b};f.getContentElement=function(a){return a&&a.firstChild};f.decorate=function(a,b){y(b);var c=Fe(b),d=Uq(this,2);c&&ij(c,d)||b.appendChild(Vq(this,b.childNodes,a.getDomHelper()));ij(b,"goog-option")&&(a.setCheckable(!0),this.setCheckable(a,b,!0));return Tq.superClass_.decorate.call(this,a,b)};
f.setContent=function(a,b){var c=this.getContentElement(a),d=Xq(this,a)?c.firstChild:null;Tq.superClass_.setContent.call(this,a,b);d&&!Xq(this,a)&&c.insertBefore(d,c.firstChild||null)};var Vq=function(a,b,c){a=Uq(a,2);return c.createDom("DIV",a,b)};Tq.prototype.setSelectable=function(a,b,c){a&&b&&Wq(this,a,b,c)};Tq.prototype.setCheckable=function(a,b,c){a&&b&&Wq(this,a,b,c)};
var Xq=function(a,b){return(b=a.getContentElement(b))?(b=b.firstChild,a=Uq(a,1),!!b&&Ge(b)&&ij(b,a)):!1},Wq=function(a,b,c,d){pp(a,c,b.getPreferredAriaRole());qp(a,b,c);d!=Xq(a,c)&&(mj(c,"goog-option",d),c=a.getContentElement(c),d?(a=Uq(a,1),c.insertBefore(b.getDomHelper().createDom("DIV",a),c.firstChild||null)):c.removeChild(c.firstChild))};
Tq.prototype.getClassForState=function(a){switch(a){case 2:return Uq(this,0);case 16:case 8:return"goog-option-selected";default:return Tq.superClass_.getClassForState.call(this,a)}};Tq.prototype.getStateFromClass=function(a){var b=Uq(this,0);switch(a){case "goog-option-selected":return 16;case b:return 2;default:return Tq.superClass_.getStateFromClass.call(this,a)}};Tq.prototype.getCssClass=function(){return"goog-menuitem"};var W=function(a,b,c,d){V.call(this,a,d||Tq.getInstance(),c);this.setValue(b)};x(W,V);f=W.prototype;f.getValue=function(){var a=this.model_;return null!=a?a:this.getCaption()};f.setValue=function(a){this.setModel(a)};f.setSupportedState=function(a,b){W.superClass_.setSupportedState.call(this,a,b);switch(a){case 8:this.isChecked()&&!b&&this.setChecked(!1);(a=this.getElement())&&this.renderer_.setSelectable(this,a,b);break;case 16:(a=this.getElement())&&this.renderer_.setCheckable(this,a,b)}};
f.setSelectable=function(a){this.setSupportedState(8,a)};f.setCheckable=function(a){this.setSupportedState(16,a)};f.getCaption=function(){var a=this.getContent();return Array.isArray(a)?(a=Va(a,function(b){return Ge(b)&&(ij(b,"goog-menuitem-accel")||ij(b,"goog-menuitem-mnemonic-separator"))?"":Pe(b)}).join(""),$d(a)):W.superClass_.getCaption.call(this)};
f.handleMouseUp=function(a){var b=this.getParent();if(b){var c=b.openingCoords;b.openingCoords=null;if(c&&"number"===typeof a.clientX&&Xd(c,new G(a.clientX,a.clientY)))return}W.superClass_.handleMouseUp.call(this,a)};f.handleKeyEventInternal=function(a){return a.keyCode==this.mnemonicKey_&&this.performActionInternal(a)?!0:W.superClass_.handleKeyEventInternal.call(this,a)};f.getMnemonic=function(){return this.mnemonicKey_};wp("goog-menuitem",function(){return new W(null)});
W.prototype.getPreferredAriaRole=function(){return U(this,16)?"menuitemcheckbox":U(this,8)?"menuitemradio":W.superClass_.getPreferredAriaRole.call(this)};W.prototype.getParent=function(){return V.prototype.getParent.call(this)};W.prototype.getParentEventTarget=function(){return V.prototype.getParentEventTarget.call(this)};var Yq=function(){};x(Yq,jp);va(Yq);Yq.prototype.createDom=function(a){return a.getDomHelper().createDom("DIV",this.getCssClass())};Yq.prototype.decorate=function(a,b){b.id&&Tj(a,b.id);if("HR"==b.tagName){var c=b;a=b=this.createDom(a);y(null!=a&&null!=c,"goog.dom.insertSiblingBefore expects non-null arguments");c.parentNode&&c.parentNode.insertBefore(a,c);Ce(c)}else O(b,this.getCssClass());return b};Yq.prototype.setContent=function(){};Yq.prototype.getCssClass=function(){return"goog-menuseparator"};var Zq=function(a,b){V.call(this,null,a||Yq.getInstance(),b);this.setSupportedState(1,!1);this.setSupportedState(2,!1);this.setSupportedState(4,!1);this.setSupportedState(32,!1);this.state_=1};x(Zq,V);Zq.prototype.enterDocument=function(){Zq.superClass_.enterDocument.call(this);var a=this.getElement();y(a,"The DOM element for the separator cannot be null.");aj(a,"separator")};wp("goog-menuseparator",function(){return new Zq});var $q=function(a){this.ariaRole_=a||"menu"};x($q,Fq);va($q);f=$q.prototype;f.canDecorate=function(a){return"UL"==a.tagName||$q.superClass_.canDecorate.call(this,a)};f.getDecoratorForChild=function(a){return"HR"==a.tagName?new Zq:$q.superClass_.getDecoratorForChild.call(this,a)};f.containsElement=function(a,b){return He(a.getElement(),b)};f.getCssClass=function(){return"goog-menu"};
f.initializeDom=function(a){$q.superClass_.initializeDom.call(this,a);a=a.getElement();y(a,"The menu DOM element cannot be null.");N(a,"haspopup","true")};var ar=function(a){Zq.call(this,Yq.getInstance(),a)};x(ar,Zq);wp("goog-menuseparator",function(){return new Zq});var br=function(a,b){Iq.call(this,"vertical",b||$q.getInstance(),a);this.setFocusable(!1)};x(br,Iq);f=br.prototype;f.allowAutoFocus_=!0;f.allowHighlightDisabled_=!1;f.getCssClass=function(){return this.renderer_.getCssClass()};f.containsElement=function(a){if(this.renderer_.containsElement(this,a))return!0;for(var b=0,c=Zj(this);b<c;b++){var d=ak(this,b);if("function"==typeof d.containsElement&&d.containsElement(a))return!0}return!1};f.addItem=function(a){this.addChild(a,!0)};
f.addItemAt=function(a,b){this.addChildAt(a,b,!0)};f.removeItem=function(a){(a=this.removeChild(a,!0))&&a.dispose()};f.getItemAt=function(a){return ak(this,a)};f.getItemCount=function(){return Zj(this)};f.getItems=function(){var a=[];Yj(this,function(b){a.push(b)});return a};f.setPosition=function(a,b){var c=this.isVisible();c||Q(this.getElement(),!0);var d=this.getElement(),e=xj(d);a instanceof G&&(b=a.y,a=a.x);a=La(a)-e.x;uj(d,d.offsetLeft+a,d.offsetTop+(Number(b)-e.y));c||Q(this.getElement(),!1)};
f.setVisible=function(a,b,c){(b=br.superClass_.setVisible.call(this,a,b))&&a&&this.inDocument_&&this.allowAutoFocus_&&this.getKeyEventTarget().focus();this.openingCoords=a&&c&&"number"===typeof c.clientX?new G(c.clientX,c.clientY):null;return b};f.handleEnterItem=function(a){this.allowAutoFocus_&&this.getKeyEventTarget().focus();return br.superClass_.handleEnterItem.call(this,a)};f.canHighlightItem=function(a){return(this.allowHighlightDisabled_||a.isEnabled())&&a.isVisible()&&U(a,2)};
f.decorateInternal=function(a){var b=this.renderer_;var c=this.getDomHelper();c=le(c.document_,"DIV",b.getCssClass()+"-content",a);for(var d=c.length,e=0;e<d;e++)Hq(b,this,c[e]);br.superClass_.decorateInternal.call(this,a)};f.handleKeyEventInternal=function(a){var b=br.superClass_.handleKeyEventInternal.call(this,a);b||Yj(this,function(c){!b&&c.getMnemonic&&c.mnemonicKey_==a.keyCode&&(this.isEnabled()&&this.setHighlighted(c),b=c.handleKeyEvent(a))},this);return b};
f.setHighlightedIndex=function(a){br.superClass_.setHighlightedIndex.call(this,a);(a=ak(this,a))&&Bj(a.getElement(),this.getElement())};var cr=function(a,b,c){this.element=a;this.corner=b;this.overflow_=c};x(cr,pn);cr.prototype.reposition=function(a,b,c){Am(this.element,this.corner,a,b,void 0,c,this.overflow_)};var dr=function(a,b,c,d){cr.call(this,a,b);this.lastResortOverflow_=c?5:0;this.overflowConstraint_=d||void 0};x(dr,cr);dr.prototype.getLastResortOverflow=function(){return this.lastResortOverflow_};dr.prototype.setLastResortOverflow=function(a){this.lastResortOverflow_=a};
dr.prototype.reposition=function(a,b,c,d){var e=Am(this.element,this.corner,a,b,null,c,10,d,this.overflowConstraint_);if(e&496){var g=er(e,this.corner);b=er(e,b);e=Am(this.element,g,a,b,null,c,10,d,this.overflowConstraint_);e&496&&(g=er(e,g),b=er(e,b),Am(this.element,g,a,b,null,c,this.lastResortOverflow_,d,this.overflowConstraint_))}};var er=function(a,b){a&48&&(b^=4);a&192&&(b^=1);return b};var fr=function(a,b,c,d){dr.call(this,a,b,c||d);(c||d)&&this.setLastResortOverflow(65|(d?32:132))};x(fr,dr);var gr=function(){};x(gr,rq);va(gr);f=gr.prototype;f.getContentElement=function(a){return gr.superClass_.getContentElement.call(this,a&&a.firstChild)};f.decorate=function(a,b){var c=le(document,"*","goog-menu",b)[0];if(c){Q(c,!1);ze(I(c).body,c);var d=new br;d.decorate(c);a.setMenu(d)}return gr.superClass_.decorate.call(this,a,b)};f.createButton=function(a,b){return gr.superClass_.createButton.call(this,[this.createCaption(a,b),this.createDropdown(b)],b)};
f.createCaption=function(a,b){return b.createDom("DIV","goog-inline-block "+(this.getCssClass()+"-caption"),a)};f.createDropdown=function(a){return a.createDom("DIV","goog-inline-block "+(this.getCssClass()+"-dropdown"),"\u00a0")};f.getCssClass=function(){return"goog-menu-button"};var hr=function(){this.classNameCache_=[]};x(hr,Tq);va(hr);hr.prototype.createDom=function(a){var b=hr.superClass_.createDom.call(this,a);y(b);O(b,"goog-submenu");ir(this,a,b);return b};hr.prototype.decorate=function(a,b){b=hr.superClass_.decorate.call(this,a,b);y(b);O(b,"goog-submenu");ir(this,a,b);var c=le(document,"DIV","goog-menu",b);if(c.length){var d=new br(a.getDomHelper());c=c[0];Q(c,!1);a.getDomHelper().document_.body.appendChild(c);d.decorate(c);a.setMenu(d,!0)}return b};
hr.prototype.setContent=function(a,b){var c=this.getContentElement(a),d=c&&c.lastChild;hr.superClass_.setContent.call(this,a,b);d&&c.lastChild!=d&&ij(d,"goog-submenu-arrow")&&c.appendChild(d)};hr.prototype.initializeDom=function(a){hr.superClass_.initializeDom.call(this,a);var b=a.getContentElement(),c=a.getDomHelper();c=le(c.document_,"SPAN","goog-submenu-arrow",b)[0];jr(a,c);c!=b.lastChild&&b.appendChild(c);a=a.getElement();y(a,"The sub menu DOM element cannot be null.");N(a,"haspopup","true")};
var ir=function(a,b,c){var d=b.getDomHelper().createDom("SPAN");d.className="goog-submenu-arrow";jr(b,d);a.getContentElement(c).appendChild(d)},jr=function(a,b){y(b);a.isRightToLeft()?(O(b,"goog-submenu-arrow-rtl"),Ie(b,a.alignToEnd_?"\u25c4":"\u25ba")):(kj(b,"goog-submenu-arrow-rtl"),Ie(b,a.alignToEnd_?"\u25ba":"\u25c4"))};var kr=function(a,b,c,d){W.call(this,a,b,c,d||hr.getInstance())};x(kr,W);f=kr.prototype;f.dismissTimer_=null;f.showTimer_=null;f.menuIsVisible_=!1;f.subMenu_=null;f.externalSubMenu_=!1;f.alignToEnd_=!0;f.isPositionAdjustable_=!1;f.enterDocument=function(){kr.superClass_.enterDocument.call(this);this.getHandler().listen(this.getParent(),"hide",this.onParentHidden_);this.subMenu_&&lr(this,this.subMenu_,!0)};
f.exitDocument=function(){this.getHandler().unlisten(this.getParent(),"hide",this.onParentHidden_);this.subMenu_&&(lr(this,this.subMenu_,!1),this.externalSubMenu_||(this.subMenu_.exitDocument(),Ce(this.subMenu_.getElement())));kr.superClass_.exitDocument.call(this)};f.disposeInternal=function(){this.subMenu_&&!this.externalSubMenu_&&this.subMenu_.dispose();this.subMenu_=null;kr.superClass_.disposeInternal.call(this)};
f.setHighlighted=function(a){kr.superClass_.setHighlighted.call(this,a);a||(this.dismissTimer_&&q.clearTimeout(this.dismissTimer_),this.dismissTimer_=Qh(this.dismissSubMenu,218,this))};f.showSubMenu=function(){var a=this.getParent();a&&Lq(a)==this&&(mr(this,!0),nr(this))};f.dismissSubMenu=function(){var a=this.subMenu_;a&&a.getParent()==this&&(mr(this,!1),Yj(a,function(b){"function"==typeof b.dismissSubMenu&&b.dismissSubMenu()}))};
var or=function(a){a.dismissTimer_&&q.clearTimeout(a.dismissTimer_);a.showTimer_&&q.clearTimeout(a.showTimer_)};kr.prototype.setVisible=function(a,b){(a=kr.superClass_.setVisible.call(this,a,b))&&!this.isVisible()&&this.dismissSubMenu();return a};var nr=function(a){Yj(a.getParent(),function(b){b!=this&&"function"==typeof b.dismissSubMenu&&(b.dismissSubMenu(),or(b))},a)};f=kr.prototype;
f.handleKeyEvent=function(a){var b=a.keyCode,c=this.isRightToLeft()?37:39,d=this.isRightToLeft()?39:37;if(!this.menuIsVisible_){if(!this.isEnabled()||b!=c&&13!=b&&b!=this.mnemonicKey_)return!1;this.showSubMenu();Mq(this.getMenu());or(this)}else if(!this.getMenu().handleKeyEvent(a))if(b==d)this.dismissSubMenu();else return!1;a.preventDefault();return!0};f.onChildEnter_=function(){this.subMenu_.getParent()==this&&(or(this),this.getParentEventTarget().setHighlighted(this),nr(this))};
f.onParentHidden_=function(a){a.target==this.getParentEventTarget()&&(this.dismissSubMenu(),or(this))};f.handleMouseOver=function(a){this.isEnabled()&&(or(this),this.showTimer_=Qh(this.showSubMenu,218,this));kr.superClass_.handleMouseOver.call(this,a)};f.performActionInternal=function(a){or(this);if(U(this,8)||U(this,16))return kr.superClass_.performActionInternal.call(this,a);this.showSubMenu();return!0};
var mr=function(a,b){!b&&a.getMenu()&&a.getMenu().setHighlightedIndex(-1);a.dispatchEvent(Rj(64,b));var c=a.getMenu();b!=a.menuIsVisible_&&mj(y(a.getElement()),"goog-submenu-open",b);if(b!=c.isVisible()&&(b&&(c.inDocument_||c.render(),c.setHighlightedIndex(-1)),c.setVisible(b),b)){c=new dr(a.getElement(),a.alignToEnd_?12:8,a.isPositionAdjustable_);var d=a.getMenu(),e=d.getElement();d.isVisible()||(e.style.visibility="hidden",Q(e,!0));c.reposition(e,a.alignToEnd_?8:12);d.isVisible()||(Q(e,!1),e.style.visibility=
"visible")}a.menuIsVisible_=b},lr=function(a,b,c){var d=a.getHandler();(c?d.listen:d.unlisten).call(d,b,"enter",a.onChildEnter_)};f=kr.prototype;f.addItem=function(a){this.getMenu().addChild(a,!0)};f.addItemAt=function(a,b){this.getMenu().addChildAt(a,b,!0)};f.removeItem=function(a){(a=this.getMenu().removeChild(a,!0))&&a.dispose()};f.getItemAt=function(a){return ak(this.getMenu(),a)};f.getItemCount=function(){return Zj(this.getMenu())};f.getItems=function(){return this.getMenu().getItems()};
f.getMenu=function(){this.subMenu_?this.externalSubMenu_&&this.subMenu_.getParent()!=this&&Wj(this.subMenu_,this):this.setMenu(new br(this.getDomHelper()),!0);this.subMenu_.getElement()||this.subMenu_.createDom();return this.subMenu_};f.setMenu=function(a,b){var c=this.subMenu_;a!=c&&(c&&(this.dismissSubMenu(),this.inDocument_&&lr(this,c,!1)),this.subMenu_=a,this.externalSubMenu_=!b,a&&(Wj(a,this),a.setVisible(!1,!0),a.allowAutoFocus_=!1,a.setFocusable(!1),this.inDocument_&&lr(this,a,!0)))};
f.containsElement=function(a){return this.getMenu().containsElement(a)};wp("goog-submenu",function(){return new kr(null)});var X=function(a,b,c,d,e){Ip.call(this,a,c||gr.getInstance(),d);this.setSupportedState(64,!0);this.menuPosition_=new fr(null,9);b&&this.setMenu(b);this.menuMargin_=null;this.timer_=new Ph(500);this.closeOnEnterOrSpace_=!0;this.menuRenderer_=e||$q.getInstance()};x(X,Ip);f=X.prototype;f.isFocusablePopupMenu_=!1;f.renderMenuAsSibling_=!1;f.selectFirstOnEnterOrSpace_=!1;
f.enterDocument=function(){X.superClass_.enterDocument.call(this);pr(this,!0);this.menu_&&qr(this,this.menu_,!0);N(Uj(this),"haspopup",!!this.menu_)};f.exitDocument=function(){X.superClass_.exitDocument.call(this);pr(this,!1);if(this.menu_){this.setOpen(!1);this.menu_.exitDocument();qr(this,this.menu_,!1);var a=this.menu_.getElement();a&&Ce(a)}};f.disposeInternal=function(){X.superClass_.disposeInternal.call(this);this.menu_&&(this.menu_.dispose(),delete this.menu_);delete this.positionElement_;this.timer_.dispose()};
f.handleMouseDown=function(a){X.superClass_.handleMouseDown.call(this,a);this.isActive()&&(this.setOpen(!this.isOpen(),a),this.menu_&&(a=this.isOpen(),this.menu_.mouseButtonPressed_=a))};f.handleMouseUp=function(a){X.superClass_.handleMouseUp.call(this,a);this.menu_&&!this.isActive()&&(this.menu_.mouseButtonPressed_=!1)};f.performActionInternal=function(){this.setActive(!1);return!0};f.handleDocumentMouseDown=function(a){this.menu_&&this.menu_.isVisible()&&!this.containsElement(a.target)&&this.setOpen(!1)};
f.containsElement=function(a){return a&&He(this.getElement(),a)||this.menu_&&this.menu_.containsElement(a)||!1};
f.handleKeyEventInternal=function(a){if(32==a.keyCode){if(a.preventDefault(),"keyup"!=a.type)return!0}else if("key"!=a.type)return!1;if(this.menu_&&this.menu_.isVisible()){var b=13==a.keyCode||32==a.keyCode,c=this.menu_.handleKeyEvent(a);return c&&this.menu_&&this.menu_.openItem_ instanceof kr||!(27==a.keyCode||b&&this.closeOnEnterOrSpace_)?c:(this.setOpen(!1),!0)}return 40==a.keyCode||38==a.keyCode||32==a.keyCode||13==a.keyCode?(this.setOpen(!0,a),!0):!1};f.handleMenuAction=function(){this.setOpen(!1)};
f.handleMenuBlur=function(){this.isActive()||this.setOpen(!1)};f.handleBlur=function(a){this.isFocusablePopupMenu_||this.setOpen(!1);X.superClass_.handleBlur.call(this,a)};f.getMenu=function(){this.menu_||this.setMenu(new br(this.getDomHelper(),this.menuRenderer_));return this.menu_||null};
f.setMenu=function(a){var b=this.menu_;if(a!=b&&(b&&(this.setOpen(!1),this.inDocument_&&qr(this,b,!1),delete this.menu_),this.inDocument_&&N(Uj(this),"haspopup",!!a),a)){this.menu_=a;Wj(a,this);a.setVisible(!1);var c=this.isFocusablePopupMenu_;(a.allowAutoFocus_=c)&&a.setFocusable(!0);this.inDocument_&&qr(this,a,!0)}return b};f.addItem=function(a){this.getMenu().addChild(a,!0)};f.addItemAt=function(a,b){this.getMenu().addChildAt(a,b,!0)};
f.removeItem=function(a){(a=this.getMenu().removeChild(a,!0))&&a.dispose()};f.getItemAt=function(a){return this.menu_?ak(this.menu_,a):null};f.getItemCount=function(){return this.menu_?Zj(this.menu_):0};f.setVisible=function(a,b){(a=X.superClass_.setVisible.call(this,a,b))&&!this.isVisible()&&this.setOpen(!1);return a};f.setEnabled=function(a){X.superClass_.setEnabled.call(this,a);this.isEnabled()||this.setOpen(!1)};
var rr=function(a){a=a.menuPosition_.corner;return 9==a||8==a},sr=function(a){return a.menuPosition_.getLastResortOverflow&&!!(a.menuPosition_.lastResortOverflow_&32)};
X.prototype.setOpen=function(a,b){X.superClass_.setOpen.call(this,a);if(this.menu_&&!!(this.state_&64)==a){if(a){if(!this.menu_.inDocument_)if(this.renderMenuAsSibling_){var c=this.getElement();(c=void 0!==c.nextElementSibling?c.nextElementSibling:Ee(c.nextSibling))?Xj(this.menu_,c.parentNode,c):this.menu_.render(this.getElement().parentNode)}else this.menu_.render();this.viewportBox_=yj(this.getElement());this.buttonRect_=Gj(this.getElement());this.positionMenu();c=!!b&&(13==b.keyCode||32==b.keyCode);
b&&(40==b.keyCode||38==b.keyCode)||c&&this.selectFirstOnEnterOrSpace_?Mq(this.menu_):this.menu_.setHighlightedIndex(-1)}else{this.setActive(!1);this.menu_.mouseButtonPressed_=!1;if(c=this.getElement())N(c,"activedescendant",""),N(c,"owns","");if(null!=this.originalSize_&&(this.originalSize_=void 0,c=this.menu_.getElement())){var d="";if(d instanceof Zd){var e=d.height;d=d.width}else e="";c.style.width=tj(d,!0);c.style.height=tj(e,!0)}}this.menu_.setVisible(a,!1,b);this.disposed_||(b=this.getHandler(),
c=a?b.listen:b.unlisten,c.call(b,this.getDomHelper().document_,"mousedown",this.handleDocumentMouseDown,!0),this.isFocusablePopupMenu_&&c.call(b,this.menu_,"blur",this.handleMenuBlur),c.call(b,this.timer_,"tick",this.onTick_),a?this.timer_.start():this.timer_.stop())}this.menu_&&this.menu_.getElement()&&Uj(this.menu_).removeAttribute(bj("hidden"))};
X.prototype.positionMenu=function(){if(this.menu_.inDocument_){var a=this.positionElement_||this.getElement(),b=this.menuPosition_;this.menuPosition_.element=a;a=this.menu_.getElement();this.menu_.isVisible()||(a.style.visibility="hidden",Q(a,!0));!this.originalSize_&&sr(this)&&(this.originalSize_=Fj(a));b.reposition(a,b.corner^1,this.menuMargin_,this.originalSize_);this.menu_.isVisible()||(Q(a,!1),a.style.visibility="visible")}};
X.prototype.onTick_=function(){var a=Gj(this.getElement()),b=yj(this.getElement());var c=this.buttonRect_;(c=!(c==a||c&&a&&c.left==a.left&&c.width==a.width&&c.top==a.top&&c.height==a.height))||(c=this.viewportBox_,c=!(c==b||c&&b&&c.top==b.top&&c.right==b.right&&c.bottom==b.bottom&&c.left==b.left));c&&(this.menu_.inDocument_&&b&&this.viewportBox_&&b.getWidth()<this.viewportBox_.getWidth()&&(c=this.menu_.getElement(),this.menu_.isVisible()||(c.style.visibility="hidden",Q(c,!0)),uj(c,new G(0,0))),this.buttonRect_=
a,this.viewportBox_=b,this.positionMenu())};var qr=function(a,b,c){var d=a.getHandler();c=c?d.listen:d.unlisten;c.call(d,b,"action",a.handleMenuAction);c.call(d,b,"close",a.handleCloseItem);c.call(d,b,"highlight",a.handleHighlightItem);c.call(d,b,"unhighlight",a.handleUnHighlightItem)},pr=function(a,b){var c=a.getHandler();(b?c.listen:c.unlisten).call(c,a.getElement(),"keydown",a.handleKeyDownEvent_)};X.prototype.handleHighlightItem=function(a){(a=a.target.getElement())&&tr(this,a)};
X.prototype.handleKeyDownEvent_=function(a){U(this,32)&&this.getKeyEventTarget()&&this.menu_&&this.menu_.isVisible()&&a.stopPropagation()};X.prototype.handleUnHighlightItem=function(){if(!Lq(this.menu_)){var a=this.getElement();y(a,"The menu button DOM element cannot be null.");N(a,"activedescendant","");N(a,"owns","")}};X.prototype.handleCloseItem=function(a){if(this.isOpen()&&a.target instanceof W){a=a.target;var b=a.getElement();a.isVisible()&&a.state_&2&&null!=b&&tr(this,b)}};
var tr=function(a,b){a=a.getElement();y(a,"The menu button DOM element cannot be null.");b=dj(b)||b;if(!b.id){var c=Oj.getInstance();b.id=Pj(c)}ej(a,b);N(a,"owns",b.id)};wp("goog-menu-button",function(){return new X(null)});var ur=function(){};x(ur,Eq);va(ur);f=ur.prototype;f.createDom=function(a){var b=this.getClassNames(a);b=a.getDomHelper().createDom("DIV","goog-inline-block "+b.join(" "),[this.createCaption(a.getContent(),a.getDomHelper()),this.createDropdown(a.getDomHelper())]);this.setTooltip(b,a.getTooltip());return b};f.getContentElement=function(a){return a&&a.firstChild};
f.decorate=function(a,b){var c=le(document,"*","goog-menu",b)[0];if(c){Q(c,!1);a.getDomHelper().document_.body.appendChild(c);var d=new br;d.decorate(c);a.setMenu(d)}le(document,"*",this.getCssClass()+"-caption",b)[0]||b.appendChild(this.createCaption(b.childNodes,a.getDomHelper()));le(document,"*",this.getCssClass()+"-dropdown",b)[0]||b.appendChild(this.createDropdown(a.getDomHelper()));return ur.superClass_.decorate.call(this,a,b)};
f.createCaption=function(a,b){return b.createDom("DIV","goog-inline-block "+(this.getCssClass()+"-caption"),a)};f.createDropdown=function(a){return a.createDom("DIV",{"class":"goog-inline-block "+(this.getCssClass()+"-dropdown"),"aria-hidden":!0},"\u00a0")};f.getCssClass=function(){return"goog-flat-menu-button"};wp("goog-flat-menu-button",function(){return new X(null,null,ur.getInstance())});var vr=function(a,b,c,d,e){X.call(this,a,b,c,d,e||new $q("listbox"));this.defaultCaption_=this.getContent();this.initialAriaLabel_=null;this.preferredAriaRole_="listbox"};x(vr,X);f=vr.prototype;f.selectionModel_=null;f.enterDocument=function(){vr.superClass_.enterDocument.call(this);wr(this);xr(this)};f.decorateInternal=function(a){vr.superClass_.decorateInternal.call(this,a);(a=this.getCaption())?(this.defaultCaption_=a,wr(this)):this.getSelectedItem()||this.setSelectedIndex(0)};
f.disposeInternal=function(){vr.superClass_.disposeInternal.call(this);this.selectionModel_&&(this.selectionModel_.dispose(),this.selectionModel_=null);this.defaultCaption_=null};f.handleMenuAction=function(a){this.setSelectedItem(a.target);vr.superClass_.handleMenuAction.call(this,a);a.stopPropagation();this.dispatchEvent("action")};f.handleSelectionChange=function(){var a=this.getSelectedItem();vr.superClass_.setValue.call(this,a&&a.getValue());wr(this)};
f.setMenu=function(a){var b=vr.superClass_.setMenu.call(this,a);a!=b&&(this.selectionModel_&&this.selectionModel_.clear(),a&&(this.selectionModel_?Yj(a,function(c){yr(c);this.selectionModel_.addItem(c)},this):zr(this,a)));return b};f.addItem=function(a){yr(a);vr.superClass_.addItem.call(this,a);this.selectionModel_?this.selectionModel_.addItem(a):zr(this,this.getMenu());Ar(this)};
f.addItemAt=function(a,b){yr(a);vr.superClass_.addItemAt.call(this,a,b);this.selectionModel_?this.selectionModel_.addItemAt(a,b):zr(this,this.getMenu())};f.removeItem=function(a){vr.superClass_.removeItem.call(this,a);this.selectionModel_&&this.selectionModel_.removeItem(a)};f.setSelectedItem=function(a){if(this.selectionModel_){var b=this.getSelectedItem();this.selectionModel_.setSelectedItem(a);a!=b&&this.dispatchEvent("change")}};f.setSelectedIndex=function(a){this.selectionModel_&&this.setSelectedItem(this.selectionModel_.getItemAt(a))};
f.setValue=function(a){if(null!=a&&this.selectionModel_)for(var b=0,c;c=this.selectionModel_.getItemAt(b);b++)if(c&&"function"==typeof c.getValue&&c.getValue()==a){this.setSelectedItem(c);return}this.setSelectedItem(null)};f.getValue=function(){var a=this.getSelectedItem();return a?a.getValue():null};f.getSelectedItem=function(){return this.selectionModel_?this.selectionModel_.getSelectedItem():null};
f.getSelectedIndex=function(){return this.selectionModel_?this.selectionModel_.getSelectedIndex():-1};
var zr=function(a,b){a.selectionModel_=new Xp;b&&Yj(b,function(c){yr(c);this.selectionModel_.addItem(c)},a);xr(a)},xr=function(a){a.selectionModel_&&a.getHandler().listen(a.selectionModel_,"select",a.handleSelectionChange)},wr=function(a){var b=a.getSelectedItem();a.setContent(b?b.getCaption():a.defaultCaption_);var c=a.renderer_.getContentElement(a.getElement());c&&a.getDomHelper().isElement(c)&&(null==a.initialAriaLabel_&&(a.initialAriaLabel_=cj(c,"label")),b=(b=b?b.getElement():null)?cj(b,"label"):
a.initialAriaLabel_,N(c,"label",b),Ar(a))},Ar=function(a){var b=a.renderer_;if(b&&(b=b.getContentElement(a.getElement()))){var c=Uj(a);b.id||(b.id=Pj(Oj.getInstance()));aj(b,"option");N(b,"selected",!0);N(c,"activedescendant",b.id);a.selectionModel_&&(c=a.selectionModel_.getItems(),N(b,"setsize",Br(c)),a=a.selectionModel_.getSelectedIndex(),N(b,"posinset",0<=a?Br(c.slice(0,a+1)):0))}},Br=function(a){return a.filter(function(b){return b instanceof W}).length},yr=function(a){a.preferredAriaRole_=a instanceof
W?"option":"separator"};vr.prototype.setOpen=function(a,b){vr.superClass_.setOpen.call(this,a,b);this.isOpen()?this.getMenu().setHighlightedIndex(this.getSelectedIndex()):Ar(this)};wp("goog-select",function(){return new vr(null)});function Cr(a,b,c){vr.call(this,a,b,ur.getInstance(),c);this.prefixTracker_=new Dr(1E3);kb(this,this.prefixTracker_)}x(Cr,vr);Cr.prototype.createDom=function(){Cr.superClass_.createDom.call(this);O(this.getElement(),"jfk-select")};
Cr.prototype.positionMenu=function(){if(this.getMenu().inDocument_){var a=Uj(this),b=rr(this)?8:12,c=this.getMenu().getElement(),d=!1;this.getMenu().isVisible()||(d=!0,c.style.visibility="hidden",Q(c,!0));var e=Math.max(this.getSelectedIndex(),0);e=ak(this.getMenu(),e);var g=0;if(sr(this)){var h=c.scrollTop;c.style.overflowY="visible";c.style.height="auto";d||(g=0,e&&(g=Cj(e.getElement()).y-Cj(a).y),g=h-g)}d=e?e.getElement().offsetTop:0;h=yj(a);var k=0;h&&(k=yj(c),k=Math.min(Math.max(h.top,k.top+
2),k.bottom-2)-h.top);Am(a,b,c,rr(this)?8:12,new G(0,k-d),null,65|(sr(this)?32:132),null);sr(this)&&(b=0,e&&(b=Cj(e.getElement()).y-Cj(a).y),c.style.overflowY="auto",c.scrollTop=g+b);this.getMenu().isVisible()||(Q(c,!1),c.style.visibility="visible")}};
Cr.prototype.handleKeyEventInternal=function(a){var b=Cr.superClass_.handleKeyEventInternal.call(this,a);return"key"!=a.type||!this.getMenu()||a.altKey||a.ctrlKey||a.metaKey||a.platformModifierKey?b:this.isOpen()||32!=a.keyCode?b?(!this.isOpen()||38!=a.keyCode&&40!=a.keyCode||Er(this),!0):Kl(a.keyCode)?(a=a.charCode?String.fromCharCode(a.charCode):" ",this.prefixTracker_.add(a),b=this.prefixTracker_.currentPrefix_,this.prefixTracker_.cycling_?Fr(this,a,!1):Fr(this,b,1<b.length),!0):!1:(this.prefixTracker_.resetPrefix(),
b)};
var Er=function(a){var b=Lq(a.getMenu());b&&Bj(b.getElement(),a.getMenu().getContentElement())},Fr=function(a,b,c){var d=a.isOpen()?a.getMenu().highlightedIndex_:a.getSelectedIndex();b=new RegExp("^"+ee(b),"i");c||++d;d=0>d?0:d;for(var e=a.getMenu(),g=0,h=Zj(e);g<h;++g){c=(d+g)%h;var k=ak(e,c),l=k.getCaption();if(k.isEnabled()&&l&&b.test(l)){b=c;a.isOpen()?(a.getMenu().setHighlightedIndex(b),Er(a)):a.setSelectedIndex(b);break}}},Dr=function(a){C.call(this);this.delay_=new Zl(this.resetPrefix,a,this);
kb(this,this.delay_)};x(Dr,C);Dr.prototype.add=function(a){y(1==a.length,"nextLetter: '"+a+"' must be a single character");a==this.currentPrefix_?this.cycling_=!0:this.cycling_||(this.currentPrefix_+=a);this.delay_.start()};Dr.prototype.resetPrefix=function(){this.currentPrefix_="";this.cycling_=!1};Dr.prototype.cycling_=!1;Dr.prototype.currentPrefix_="";var Gr=function(a,b,c){W.call(this,a,b,c);this.setCheckable(!0)};x(Gr,W);wp("goog-checkbox-menuitem",function(){return new Gr(null)});var Hr=function(){this.classNameCache_=[]};x(Hr,Tq);va(Hr);Hr.prototype.decorate=function(a,b){b=Hr.superClass_.decorate.call(this,a,b);this.setCheckable(a,b,!0);y(b);ij(b,this.getCssClass()+"-fully-checked")?Ir(a,2):ij(b,this.getCssClass()+"-partially-checked")?Ir(a,1):Ir(a,0);return b};Hr.prototype.getCssClass=function(){return"goog-tristatemenuitem"};var Jr=function(a,b,c,d,e){W.call(this,a,b,c,d||new Hr);this.setCheckable(!0);this.alwaysAllowPartial_=e||!1};x(Jr,W);Jr.prototype.checkState_=0;Jr.prototype.allowPartial_=!1;Jr.prototype.alwaysAllowPartial_=!1;
var Ir=function(a,b){Kr(a,b);a.allowPartial_=1==b},Kr=function(a,b){a.dispatchEvent(0!=b?"check":"uncheck")&&(a.setState(16,0!=b),a.checkState_=b,b=a.renderer_,b.enableClassName(a,b.getCssClass()+"-partially-checked",1==a.checkState_),b.enableClassName(a,b.getCssClass()+"-fully-checked",2==a.checkState_))};
Jr.prototype.performActionInternal=function(a){switch(this.checkState_){case 0:Kr(this,this.alwaysAllowPartial_||this.allowPartial_?1:2);break;case 1:Kr(this,2);break;case 2:Kr(this,0)}var b=this.renderer_.getCssClass()+"-checkbox";a=a.target&&ij(a.target,b);return this.dispatchEvent(a||this.allowPartial_?"change":"action")};wp("goog-tristatemenuitem",function(){return new Jr(null)});var Y=angular.module("jfkMenu",[ul.name]);Y.getOrCreateTitleElement=function(a){var b=De(a);return 1>=b.length?(b=document.createElement("span"),a.insertBefore(b,a.firstChild),b):b[0]};Y.setItemMarker=function(a){a[0][Y.MENU_ITEM_MARKER_]=!0};var Lr=function(a){this.jfkCommon_=a;this.menu_=new br;this.menu_.allowAutoFocus_=!1;this.menuItemParent_=null;this.menuItems_=[]};Y.ITEM_POSITION="menuPosition";Lr.prototype.getMenu=function(){return this.menu_};
Lr.prototype.getNumChangedPositions=function(){if(!this.menuItemParent_)return 0;for(var a=0,b=this.menuItemParent_.firstChild,c=0,d=0;b;)b[Y.MENU_ITEM_MARKER_]&&(b[Y.ITEM_POSITION]!=c&&a++,d++),c++,b=b.nextSibling;return d!=this.menuItems_.length?-1:a};Lr.prototype.insertMenuItem_=function(a){var b=this.getMenu(),c=a.element,d=a.item,e=Y.getIndexInParent_(c,b);c[Y.ITEM_POSITION]=e;b.addChildAt(d,e,!d.inDocument_);this.menuItemParent_=c.parentNode;this.menuItems_.push(a)};
Y.getIndexInParent_=function(a,b){for(var c=0,d=a.parentNode.firstChild;d;){if(d===a)return Math.min(c,Zj(b));d[Y.MENU_ITEM_MARKER_]&&c++;d=d.nextSibling}throw Error("Could not find index of menu item");};
var Mr=function(a,b,c,d,e){a.render(c[0]);c=a.getMenu();e?e.setMenu(c):c.setFocusable(!0);pl(a.jfkCommon_,b,d,c)},Nr=function(a,b,c,d){var e={item:d,element:c};b.$evalAsync(u(a.insertMenuItem_,a,e));b.$on("$destroy",u(function(){var g=this.getMenu();d.getParent()&&!g.disposed_&&(g.removeChild(d),bb(this.menuItems_,e))},a))};Lr.prototype.render=function(a){var b=this.getMenu();b.render(a);return b.getElement()};var Or=function(){this.registerSelect_=this.menu_=null};
Or.prototype.setMenu=function(a){this.menu_=a};Or.prototype.getMenu=function(){return this.menu_};
Y.directive("jfkMenu",function(){return{require:["jfkMenu","^?jfkMenuHolder"],controller:["jfkCommon",Lr],link:function(a,b,c,d){var e=d[0];Mr(e,a,b,c,d[1]);a.$watch(u(e.getNumChangedPositions,e),function(g){if(-1!==g){g=e.getMenu();for(var h=0;h<e.menuItems_.length;h++){var k=e.menuItems_[h].element,l=e.menuItems_[h].item,m=Y.getIndexInParent_(k,e.menu_);k[Y.ITEM_POSITION]=m;g.addChildAt(l,m,!l.inDocument_)}}})},restrict:"EAM"}});Y.MENU_ITEM_MARKER_="jfkMenuItemMarker";
Y.buildItemLinkFunction_=function(a,b){return["jfkCommon",function(c){return{require:["^jfkMenu"],priority:200,terminal:!0,transclude:"element",compile:function(d,e,g){return function(h,k,l,m){m=m[0];Y.setItemMarker(k);k=k[0];var p=g(h,function(){});p=a(p[0],h,l);var r=l.jfkCloseOnAction;Mc(p,"action",function(w){(!r&&b||r&&!h.$eval(r))&&w.stopPropagation()});Nr(m,h,k,p);pl(c,h,l,p)}},restrict:"EAM"}}]};Y.directive("jfkMenuItem",Y.buildItemLinkFunction_(function(a){return new W(a)},!1));
Y.directive("jfkMenuChild",Y.buildItemLinkFunction_(function(a){return new V(a)},!0));Y.directive("jfkCheckBoxMenuItem",Y.buildItemLinkFunction_(function(a,b,c){var d=new Gr(a);c.ngChecked&&b.$watch(c.ngChecked,function(e){d.setChecked(!!e)});d.listen("action",function(){var e=d.isChecked()?new lb("check"):new lb("uncheck");y(nc(d),"Can not use goog.events.dispatchEvent with non-goog.events.Listenable instance.");d.dispatchEvent(e)});return d},!1));
Y.directive("jfkTriStateMenuItem",Y.buildItemLinkFunction_(function(a,b,c){var d=new Jr(a);d.render(a[0]);c.ngChecked&&b.$watch(c.ngChecked,function(e){null!=e&&Ir(d,!0===e?2:!1===e?0:1)});return d},!1));
Y.directive("jfkSubMenu",["jfkCommon",function(a){return{name:"jfkMenuHolder",require:["^jfkMenu","jfkMenuHolder"],priority:200,controller:Or,transclude:!1,compile:function(){return function(b,c,d,e){var g=e[0];e=e[1];Y.setItemMarker(c);c=c[0];var h=c.children[0];if("SPAN"!==h.nodeName)throw Error("SubMenu requires a SPAN with the caption as the first child");h=new kr(h);e=e.getMenu();var k=e.getElement().parentElement;Ce(k);ze(document.body,k);e.setFocusable(!1);Wj(h,g.getMenu());h.setMenu(e);Nr(g,
b,c,h);b.$on("$destroy",function(){Ce(k)});pl(a,b,d,h)}},restrict:"EAM"}}]);Y.directive("jfkMenuSeparator",Y.buildItemLinkFunction_(function(a){var b=new ar;angular.element(a).remove();return b},!1));var Pr=angular.module("jfkMenuButton",[Y.name,ul.name]),Qr=function(a,b){a.hasOwnProperty("jfkMenuButtonCollapsed")&&a.$observe("jfkMenuButtonCollapsed",function(c){b.setCollapsed(Un[c])})};
Pr.directive("jfkMenuButton",["jfkCommon",function(a){return{name:"jfkMenuHolder",controller:Or,require:["jfkMenuHolder"],restrict:"EAM",link:function(b,c,d,e){e=e[0].getMenu();e=new X(Y.getOrCreateTitleElement(c[0]),e,ur.getInstance());e.menuPosition_.setLastResortOverflow&&e.menuPosition_.setLastResortOverflow(33);e.isFocusablePopupMenu_=!0;Qr(d,e);e.render(c[0]);pl(a,b,d,e)}}}]);var Rr=angular.module("jfkSelect",[Y.name,ul.name]);
Rr.directive("jfkSelect",["jfkCommon",function(a){return{name:"jfkMenuHolder",controller:Or,require:["jfkMenuHolder","^?ngModel"],restrict:"EAM",link:function(b,c,d,e){function g(){if(m)try{p=!1;var r=m.$viewValue;l.setValue(null!=r?r:ml)}finally{p=!0}}var h=e[0],k=h.getMenu();k.setFocusable(!1);var l=new Cr(Y.getOrCreateTitleElement(c[0]),k);h.registerSelect_&&h.registerSelect_(l,b);l.menuPosition_.setLastResortOverflow&&l.menuPosition_.setLastResortOverflow(33);l.render(c[0]);b.$watch(function(){var r=
[];Yj(k,function(w){r.push(Sj(w));r.push(w.getModel&&w.model_)});return r},function(){var r=l.isOpen();l.setMenu(null);l.setMenu(k);g();l.setOpen(r)},!0);var m=e[1],p=!0;m&&(m.$render=g,b.$on("$destroy",function(){m=null}),ql(b,l,"change",function(){p&&sl(b,function(){var r=l.getValue();m.$setViewValue(r==ml?null:r)})}));pl(a,b,d,l)}}}]);var Sr=angular.module("recoveryDirectives",[]).config(["$controllerProvider",function(a){a.allowGlobals()}]);M.overrideJfkSelectTabIndex=function(a,b){setTimeout(function(){a.getElementsByClassName("jfk-select")[0].setAttribute("tabindex",b)},0)};Sr.directive("overrideJfkSelectTabindex",function(){return{link:function(a,b,c){M.overrideJfkSelectTabIndex(b[0],c.overrideJfkSelectTabindex)}}});
Sr.directive("appFooter",function(){return{restrict:"E",scope:{disableForward:"=",disableBack:"=",forward:"&",back:"&",forwardText:"@",backText:"@",hideForward:"@",hideBack:"@"},templateUrl:"html/footer.html"}});M.directives=Sr;var Tr={COMPACT_DECIMAL_SHORT_PATTERN:{1E3:{other:"0K"},1E4:{other:"00K"},1E5:{other:"000K"},1E6:{other:"0M"},1E7:{other:"00M"},1E8:{other:"000M"},1E9:{other:"0B"},1E10:{other:"00B"},1E11:{other:"000B"},1E12:{other:"0T"},1E13:{other:"00T"},1E14:{other:"000T"}},COMPACT_DECIMAL_LONG_PATTERN:{1E3:{other:"0 thousand"},1E4:{other:"00 thousand"},1E5:{other:"000 thousand"},1E6:{other:"0 million"},1E7:{other:"00 million"},1E8:{other:"000 million"},1E9:{other:"0 billion"},1E10:{other:"00 billion"},1E11:{other:"000 billion"},
1E12:{other:"0 trillion"},1E13:{other:"00 trillion"},1E14:{other:"000 trillion"}}},Ur=Tr;Ur=Tr;var Vr={AED:[2,"dh","\u062f.\u0625."],ALL:[0,"Lek","Lek"],AUD:[2,"$","AU$"],BDT:[2,"\u09f3","Tk"],BGN:[2,"lev","lev"],BRL:[2,"R$","R$"],CAD:[2,"$","C$"],CDF:[2,"FrCD","CDF"],CHF:[2,"CHF","CHF"],CLP:[0,"$","CL$"],CNY:[2,"\u00a5","RMB\u00a5"],COP:[32,"$","COL$"],CRC:[0,"\u20a1","CR\u20a1"],CZK:[50,"K\u010d","K\u010d"],DKK:[50,"kr.","kr."],DOP:[2,"RD$","RD$"],EGP:[2,"\u00a3","LE"],ETB:[2,"Birr","Birr"],EUR:[2,"\u20ac","\u20ac"],GBP:[2,"\u00a3","GB\u00a3"],HKD:[2,"$","HK$"],HRK:[2,"kn","kn"],HUF:[34,
"Ft","Ft"],IDR:[0,"Rp","Rp"],ILS:[34,"\u20aa","IL\u20aa"],INR:[2,"\u20b9","Rs"],IRR:[0,"Rial","IRR"],ISK:[0,"kr","kr"],JMD:[2,"$","JA$"],JPY:[0,"\u00a5","JP\u00a5"],KRW:[0,"\u20a9","KR\u20a9"],LKR:[2,"Rs","SLRs"],LTL:[2,"Lt","Lt"],MNT:[0,"\u20ae","MN\u20ae"],MVR:[2,"Rf","MVR"],MXN:[2,"$","Mex$"],MYR:[2,"RM","RM"],NOK:[50,"kr","NOkr"],PAB:[2,"B/.","B/."],PEN:[2,"S/.","S/."],PHP:[2,"\u20b1","PHP"],PKR:[0,"Rs","PKRs."],PLN:[50,"z\u0142","z\u0142"],RON:[2,"RON","RON"],RSD:[0,"din","RSD"],RUB:[50,"\u20bd",
"RUB"],SAR:[2,"SAR","SAR"],SEK:[50,"kr","kr"],SGD:[2,"$","S$"],THB:[2,"\u0e3f","THB"],TRY:[2,"\u20ba","TRY"],TWD:[2,"$","NT$"],TZS:[0,"TSh","TSh"],UAH:[2,"\u0433\u0440\u043d.","UAH"],USD:[2,"$","US$"],UYU:[2,"$","$U"],VND:[48,"\u20ab","VN\u20ab"],YER:[0,"Rial","Rial"],ZAR:[2,"R","ZAR"]};var Wr={DECIMAL_SEP:".",GROUP_SEP:",",PERCENT:"%",ZERO_DIGIT:"0",PLUS_SIGN:"+",MINUS_SIGN:"-",EXP_SYMBOL:"E",PERMILL:"\u2030",INFINITY:"\u221e",NAN:"NaN",DECIMAL_PATTERN:"#,##0.###",SCIENTIFIC_PATTERN:"#E0",PERCENT_PATTERN:"#,##0%",CURRENCY_PATTERN:"\u00a4#,##0.00",DEF_CURRENCY_CODE:"USD"},Xr=Wr;Xr=Wr;var as=function(a){this.intlCurrencyCode_=null;this.currencyStyle_=0;this.overrideNumberFormatSymbols_=null;this.maximumIntegerDigits_=40;this.minimumIntegerDigits_=1;this.significantDigits_=0;this.maximumFractionDigits_=3;this.minExponentDigits_=this.minimumFractionDigits_=0;this.showTrailingZeros_=this.useSignForPositiveExponent_=!1;this.positiveSuffix_=this.positivePrefix_="";this.negativePrefix_=Z(this).MINUS_SIGN;this.negativeSuffix_="";this.multiplier_=1;this.negativePercentSignExpected_=!1;
this.groupingArray_=[];this.useExponentialNotation_=this.decimalSeparatorAlwaysShown_=!1;this.compactStyle_=0;this.baseFormattingNumber_=null;this.pattern_="string"===typeof a?a:"";if("number"===typeof a)switch(a){case 1:Yr(this,Z(this).DECIMAL_PATTERN);break;case 2:Yr(this,Z(this).SCIENTIFIC_PATTERN);break;case 3:Yr(this,Z(this).PERCENT_PATTERN);break;case 4:a=Z(this).CURRENCY_PATTERN;var b=["0"],c=Vr[Zr(this)];if(c){c=c[0]&7;if(0<c){b.push(".");for(var d=0;d<c;d++)b.push("0")}a=a.replace(/0.00/g,
b.join(""))}Yr(this,a);break;case 5:$r(this,1);break;case 6:$r(this,2);break;default:throw Error("Unsupported pattern type.");}else Yr(this,a)},Z=function(a){return a.overrideNumberFormatSymbols_||Xr},Zr=function(a){return a.intlCurrencyCode_||Z(a).DEF_CURRENCY_CODE},bs=function(a,b){if(0<a.significantDigits_&&0<b)throw Error("Can't combine significant digits and minimum fraction digits");a.minimumFractionDigits_=b},cs=function(a,b){if(308<b)throw Error("Unsupported maximum fraction digits: "+b);
a.maximumFractionDigits_=b},Yr=function(a,b){a.pattern_=b.replace(/ /g,"\u00a0");var c=[0];a.positivePrefix_=ds(a,b,c);for(var d=c[0],e=-1,g=0,h=0,k=0,l=-1,m=b.length,p=!0;c[0]<m&&p;c[0]++)switch(b.charAt(c[0])){case "#":0<h?k++:g++;0<=l&&0>e&&l++;break;case "0":if(0<k)throw Error('Unexpected "0" in pattern "'+b+'"');h++;0<=l&&0>e&&l++;break;case ",":0<l&&a.groupingArray_.push(l);l=0;break;case ".":if(0<=e)throw Error('Multiple decimal separators in pattern "'+b+'"');e=g+h+k;break;case "E":if(a.useExponentialNotation_)throw Error('Multiple exponential symbols in pattern "'+
b+'"');a.useExponentialNotation_=!0;a.minExponentDigits_=0;c[0]+1<m&&"+"==b.charAt(c[0]+1)&&(c[0]++,a.useSignForPositiveExponent_=!0);for(;c[0]+1<m&&"0"==b.charAt(c[0]+1);)c[0]++,a.minExponentDigits_++;if(1>g+h||1>a.minExponentDigits_)throw Error('Malformed exponential pattern "'+b+'"');p=!1;break;default:c[0]--,p=!1}0==h&&0<g&&0<=e&&(h=e,0==h&&h++,k=g-h,g=h-1,h=1);if(0>e&&0<k||0<=e&&(e<g||e>g+h)||0==l)throw Error('Malformed pattern "'+b+'"');k=g+h+k;a.maximumFractionDigits_=0<=e?k-e:0;0<=e&&(a.minimumFractionDigits_=
g+h-e,0>a.minimumFractionDigits_&&(a.minimumFractionDigits_=0));a.minimumIntegerDigits_=(0<=e?e:k)-g;a.useExponentialNotation_&&(a.maximumIntegerDigits_=g+a.minimumIntegerDigits_,0==a.maximumFractionDigits_&&0==a.minimumIntegerDigits_&&(a.minimumIntegerDigits_=1));a.groupingArray_.push(Math.max(0,l));a.decimalSeparatorAlwaysShown_=0==e||e==k;d=c[0]-d;a.positiveSuffix_=ds(a,b,c);c[0]<b.length&&";"==b.charAt(c[0])?(c[0]++,1!=a.multiplier_&&(a.negativePercentSignExpected_=!0),a.negativePrefix_=ds(a,
b,c),c[0]+=d,a.negativeSuffix_=ds(a,b,c)):(a.negativePrefix_+=a.positivePrefix_,a.negativeSuffix_+=a.positiveSuffix_)},$r=function(a,b){a.compactStyle_=b;Yr(a,Z(a).DECIMAL_PATTERN);bs(a,0);cs(a,2);if(0<a.minimumFractionDigits_)throw Error("Can't combine significant digits and minimum fraction digits");a.significantDigits_=2};
as.prototype.parse=function(a,b){b=b||[0];if(0!==this.compactStyle_)throw Error("Parsing of compact numbers is unimplemented");a=a.replace(/ |\u202f/g,"\u00a0");var c=a.indexOf(this.positivePrefix_,b[0])==b[0],d=a.indexOf(this.negativePrefix_,b[0])==b[0];c&&d&&(this.positivePrefix_.length>this.negativePrefix_.length?d=!1:this.positivePrefix_.length<this.negativePrefix_.length&&(c=!1));c?b[0]+=this.positivePrefix_.length:d&&(b[0]+=this.negativePrefix_.length);if(a.indexOf(Z(this).INFINITY,b[0])==b[0]){b[0]+=
Z(this).INFINITY.length;var e=Infinity}else{e=a;var g=!1,h=!1,k=!1,l=-1,m=1,p=Z(this).DECIMAL_SEP,r=Z(this).GROUP_SEP,w=Z(this).EXP_SYMBOL;if(0!=this.compactStyle_)throw Error("Parsing of compact style numbers is not implemented");r=r.replace(/\u202f/g,"\u00a0");for(var z="";b[0]<e.length;b[0]++){var B=e.charAt(b[0]),A=es(this,B);if(0<=A&&9>=A)z+=A,k=!0;else if(B==p.charAt(0)){if(g||h)break;z+=".";g=!0}else if(B==r.charAt(0)&&("\u00a0"!=r.charAt(0)||b[0]+1<e.length&&0<=es(this,e.charAt(b[0]+1)))){if(g||
h)break}else if(B==w.charAt(0)){if(h)break;z+="E";h=!0;l=b[0]}else if("+"==B||"-"==B){if(k&&l!=b[0]-1)break;z+=B}else if(1==this.multiplier_&&B==Z(this).PERCENT.charAt(0)){if(1!=m)break;m=100;if(k){b[0]++;break}}else if(1==this.multiplier_&&B==Z(this).PERMILL.charAt(0)){if(1!=m)break;m=1E3;if(k){b[0]++;break}}else break}1!=this.multiplier_&&(m=this.multiplier_);e=parseFloat(z)/m}if(c){if(a.indexOf(this.positiveSuffix_,b[0])!=b[0])return NaN;b[0]+=this.positiveSuffix_.length}else if(d){if(a.indexOf(this.negativeSuffix_,
b[0])!=b[0])return NaN;b[0]+=this.negativeSuffix_.length}return d?-e:e};
as.prototype.format=function(a){if(this.minimumFractionDigits_>this.maximumFractionDigits_)throw Error("Min value must be less than max value");if(isNaN(a))return Z(this).NAN;var b=[];var c=null===this.baseFormattingNumber_?a:this.baseFormattingNumber_,d=a;if(0==this.compactStyle_)var e=fs;else c=Math.abs(c),d=Math.abs(d),e=gs(this,1>=c?0:hs(c)).divisorBase,d=is(d,-e),js(this,d),c=is(c,-e),c=js(this,c),e=gs(this,e+hs(c.intValue));a=is(a,-e.divisorBase);(c=0>a||0==a&&0>1/a)?e.negative_prefix?b.push(e.negative_prefix):
(b.push(e.prefix),b.push(this.negativePrefix_)):(b.push(e.prefix),b.push(this.positivePrefix_));if(isFinite(a))if(a*=c?-1:1,a*=this.multiplier_,this.useExponentialNotation_)if(d=a,0==d)ks(this,d,this.minimumIntegerDigits_,b),ls(this,0,b);else{var g=Math.log(d)/Math.log(10);y(!0);g=Math.floor(g+2E-15);d=is(d,-g);var h=this.minimumIntegerDigits_;1<this.maximumIntegerDigits_&&this.maximumIntegerDigits_>this.minimumIntegerDigits_?(h=g%this.maximumIntegerDigits_,0>h&&(h=this.maximumIntegerDigits_+h),d=
is(d,h),g-=h,h=1):1>this.minimumIntegerDigits_?(g++,d=is(d,-1)):(g-=this.minimumIntegerDigits_-1,d=is(d,this.minimumIntegerDigits_-1));ks(this,d,h,b);ls(this,g,b)}else ks(this,a,this.minimumIntegerDigits_,b);else b.push(Z(this).INFINITY);c?e.negative_suffix?b.push(e.negative_suffix):(isFinite(a)&&b.push(e.suffix),b.push(this.negativeSuffix_)):(isFinite(a)&&b.push(e.suffix),b.push(this.positiveSuffix_));return b.join("")};
var js=function(a,b){var c=is(b,a.maximumFractionDigits_);0<a.significantDigits_&&(c=ms(c,a.significantDigits_,a.maximumFractionDigits_));c=Math.round(c);isFinite(c)?(b=Math.floor(is(c,-a.maximumFractionDigits_)),a=Math.floor(c-is(b,a.maximumFractionDigits_))):a=0;return{intValue:b,fracValue:a}},ks=function(a,b,c,d){if(a.minimumFractionDigits_>a.maximumFractionDigits_)throw Error("Min value must be less than max value");d||(d=[]);b=js(a,b);var e=b.intValue,g=b.fracValue,h=0==e?0:hs(e)+1,k=0<a.minimumFractionDigits_||
0<g||a.showTrailingZeros_&&h<a.significantDigits_;b=a.minimumFractionDigits_;k&&(b=a.showTrailingZeros_&&0<a.significantDigits_?a.significantDigits_-h:a.minimumFractionDigits_);var l="";for(h=e;1E20<h;)l="0"+l,h=Math.round(is(h,-1));l=h+l;var m=Z(a).DECIMAL_SEP;h=Z(a).ZERO_DIGIT.charCodeAt(0);var p=l.length,r=0;if(0<e||0<c){for(e=p;e<c;e++)d.push(String.fromCharCode(h));if(2<=a.groupingArray_.length)for(c=1;c<a.groupingArray_.length;c++)r+=a.groupingArray_[c];c=p-r;if(0<c){e=a.groupingArray_;r=p=
0;for(var w,z=Z(a).GROUP_SEP,B=l.length,A=0;A<B;A++)if(d.push(String.fromCharCode(h+1*Number(l.charAt(A)))),1<B-A)if(w=e[r],A<c){var pa=c-A;(1===w||0<w&&1===pa%w)&&d.push(z)}else r<e.length&&(A===c?r+=1:w===A-c-p+1&&(d.push(z),p+=w,r+=1))}else{c=l;l=a.groupingArray_;e=Z(a).GROUP_SEP;w=c.length;z=[];for(p=l.length-1;0<=p&&0<w;p--){r=l[p];for(B=0;B<r&&0<=w-B-1;B++)z.push(String.fromCharCode(h+1*Number(c.charAt(w-B-1))));w-=r;0<w&&z.push(e)}d.push.apply(d,z.reverse())}}else k||d.push(String.fromCharCode(h));
(a.decimalSeparatorAlwaysShown_||k)&&d.push(m);g=String(g);k=g.split("e+");2==k.length&&(g=String(ms(parseFloat(k[0]),a.significantDigits_,1)),g=g.replace(".",""),g+=fe("0",parseInt(k[1],10)-g.length+1));a.maximumFractionDigits_+1>g.length&&(g="1"+fe("0",a.maximumFractionDigits_-g.length)+g);for(a=g.length;"0"==g.charAt(a-1)&&a>b+1;)a--;for(b=1;b<a;b++)d.push(String.fromCharCode(h+1*Number(g.charAt(b))))},ls=function(a,b,c){c.push(Z(a).EXP_SYMBOL);0>b?(b=-b,c.push(Z(a).MINUS_SIGN)):a.useSignForPositiveExponent_&&
c.push(Z(a).PLUS_SIGN);b=""+b;for(var d=Z(a).ZERO_DIGIT,e=b.length;e<a.minExponentDigits_;e++)c.push(d);c.push(b)},es=function(a,b){b=b.charCodeAt(0);if(48<=b&&58>b)return b-48;a=Z(a).ZERO_DIGIT.charCodeAt(0);return a<=b&&b<a+10?b-a:-1},ds=function(a,b,c){for(var d="",e=!1,g=b.length;c[0]<g;c[0]++){var h=b.charAt(c[0]);if("'"==h)c[0]+1<g&&"'"==b.charAt(c[0]+1)?(c[0]++,d+="'"):e=!e;else if(e)d+=h;else switch(h){case "#":case "0":case ",":case ".":case ";":return d;case "\u00a4":if(c[0]+1<g&&"\u00a4"==
b.charAt(c[0]+1))c[0]++,d+=Zr(a);else switch(a.currencyStyle_){case 0:h=Zr(a);d+=h in Vr?Vr[h][1]:h;break;case 2:h=Zr(a);var k=Vr[h];d+=k?h==k[1]?h:h+" "+k[1]:h;break;case 1:h=Zr(a),d+=h in Vr?Vr[h][2]:h}break;case "%":if(!a.negativePercentSignExpected_&&1!=a.multiplier_)throw Error("Too many percent/permill");if(a.negativePercentSignExpected_&&100!=a.multiplier_)throw Error("Inconsistent use of percent/permill characters");a.multiplier_=100;a.negativePercentSignExpected_=!1;d+=Z(a).PERCENT;break;
case "\u2030":if(!a.negativePercentSignExpected_&&1!=a.multiplier_)throw Error("Too many percent/permill");if(a.negativePercentSignExpected_&&1E3!=a.multiplier_)throw Error("Inconsistent use of percent/permill characters");a.multiplier_=1E3;a.negativePercentSignExpected_=!1;d+=Z(a).PERMILL;break;default:d+=h}}return d},fs={divisorBase:0,negative_prefix:"",negative_suffix:"",prefix:"",suffix:""},gs=function(a,b){a=1==a.compactStyle_?Ur.COMPACT_DECIMAL_SHORT_PATTERN:Ur.COMPACT_DECIMAL_LONG_PATTERN;
null==a&&(a=Ur.COMPACT_DECIMAL_SHORT_PATTERN);if(3>b)return fs;b=Math.min(14,b);var c=a[is(1,b)];for(--b;!c&&3<=b;)c=a[is(1,b)],b--;if(!c)return fs;c=c.other;var d=a="",e=c.indexOf(";");0<=e&&(c=c.substring(0,e),e=c.substring(e+1))&&(d=/([^0]*)(0+)(.*)/.exec(e),a=d[1],d=d[3]);return c&&"0"!=c?(c=/([^0]*)(0+)(.*)/.exec(c))?{divisorBase:b+1-(c[2].length-1),negative_prefix:a,negative_suffix:d,prefix:c[1],suffix:c[3]}:fs:fs},hs=function(a){if(!isFinite(a))return 0<a?a:0;for(var b=0;1<=(a/=10);)b++;return b},
is=function(a,b){y(0==b%1,'Cannot shift by fractional digits "%s".',b);if(!a||!isFinite(a)||0==b)return a;a=String(a).split("e");return parseFloat(a[0]+"e"+(parseInt(a[1]||0,10)+b))},ns=function(a,b){y(0==b%1,'Cannot round to fractional digits "%s".',b);return a&&isFinite(a)?is(Math.round(is(a,b)),-b):a},ms=function(a,b,c){if(!a)return a;b=b-hs(a)-1;return b<-c?ns(a,-c):ns(a,b)};var os=angular.module("recoveryTranslate",[]).config(["$controllerProvider",function(a){a.allowGlobals()}]);os.filter("translate",function(){return os.translate_});os.filter("translateApiError",function(){return os.translateApiError_});os.filter("decimal",function(){return os.formatDecimal_});os.filter("percent",function(){return os.formatPercent_});
os.translateApiError_=function(a,b){if(!a)return"";var c="APIERRMSG_"+a;b=os.translate_(c,b);b==c&&(b=os.translate_("APIERRMSG_UNKNOWN",[a]));switch(c){case "APIERRMSG_UNZIP_ERROR":case "APIERRMSG_DOWNLOAD_INTERRUPTED":case "APIERRMSG_DEVICE_WRITE_ERROR":break;default:b+=os.translate_("ERRMSG_PLEASE_TRY_AGAIN")}return b};
os.translate_=function(a,b){if(!a)return"";var c=Array.prototype.slice.call(arguments,1),d,e=M.appConfig.messageCatalogPostfix;e&&(d=chrome.i18n.getMessage(a+e,c));d||(d=chrome.i18n.getMessage(a,c));if(d)return d;(d=M.logger)&&Gh(d,uh,"Failed translation for the key "+a+" with parameters "+c);return a};os.formatDecimal_=function(a,b){var c=new as(1);void 0!=b&&(bs(c,b),cs(c,b));return c.format(a)};os.formatPercent_=function(a,b){var c=new as(3);void 0!=b&&(bs(c,b),cs(c,b));return c.format(a)};
M.translateModule=os;var ps=angular.module("recovery",["ngSanitize",M.directives.name,M.translateModule.name,S.name,Pn.name,Qp.name,xq.name,Dq.name,Y.name,Pr.name,$p.name,Rr.name,vl.name]).config(["$controllerProvider",function(a){a.allowGlobals()}]);v("recovery.module",ps);ps.configure=function(a){a.imgSrcSanitizationWhitelist(/^\s*chrome-extension:/)};ps.configure.$inject=["$compileProvider"];ps.config(["$compileProvider",ps.configure]);v("ng.safehtml.googSceHelper.isGoogHtmlType",function(a){return a&&a.implementsGoogStringTypedString?!0:!1});v("ng.safehtml.googSceHelper.isCOMPILED",function(){return!0});v("ng.safehtml.googSceHelper.unwrapAny",function(a){if(a instanceof kd)return ld(a).toString();if(a instanceof Gd)return Id(a);if(a instanceof nd)return od(a);if(a instanceof ud)return vd(a);if(a instanceof hd)return id(a).toString();throw Error();});
v("ng.safehtml.googSceHelper.unwrapGivenContext",function(a,b){if("html"==a)return Id(b);if("resourceUrl"==a||"templateUrl"==a)return ld(b).toString();if("url"==a)return b instanceof kd?ld(b).toString():od(b);if("css"==a)return vd(b);if("js"==a)return id(b).toString();throw Error();});