-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathindex.html
2225 lines (1931 loc) · 410 KB
/
index.html
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
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html id="atomic" lang="en-US" class="atomic my3columns ua-ff ua-mac ua-ff21 l-out Pos-r https fp fp-v2 fp-default mini-uh-on uh-topbar-on ltr desktop Desktop bktFPGEMINIDAS701 bktFPPERF003 bktMULTISIGNOUTBR01">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Yahoo</title><meta http-equiv="x-dns-prefetch-control" content="on"><link rel="dns-prefetch" href="//s.yimg.com"><link rel="preconnect" href="//s.yimg.com"><link rel="dns-prefetch" href="//search.yahoo.com"><link rel="preconnect" href="//search.yahoo.com"><link rel="dns-prefetch" href="//csc.beap.bc.yahoo.com"><link rel="preconnect" href="//csc.beap.bc.yahoo.com"><link rel="dns-prefetch" href="//geo.yahoo.com"><link rel="preconnect" href="//geo.yahoo.com"><link rel="dns-prefetch" href="//video-api.yql.yahoo.com"><link rel="preconnect" href="//video-api.yql.yahoo.com"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="theme-color" content="#ffffff"><meta name="msapplication-navbutton-color" content="red"><meta name="msapplication-TileColor" content="#ffffff"><meta name="msapplication-TileImage" content="https://s.yimg.com/cv/apiv2/social/images/yahoo_default_logo.png"><meta name="application-name" content="Yahoo"><meta name="msapplication-tap-highlight" content="no"><meta name="full-screen" content="yes"><meta name="browsermode" content="application"><meta name="nightmode" content="disable"><meta name="layoutmode" content="fitscreen"><meta name="imagemode" content="force">
<meta name="description" content="News, email and search are just the beginning. Discover more every day. Find your yodel.">
<meta name="keywords" content="yahoo, yahoo home page, yahoo homepage, yahoo search, yahoo mail, yahoo messenger, yahoo games, news, finance, sport, entertainment">
<meta property="og:title" content="Yahoo" />
<meta property="og:type" content='website' />
<meta property="og:url" content="http://www.yahoo.com" />
<meta property="og:description" content="News, email and search are just the beginning. Discover more every day. Find your yodel."/>
<meta property="og:image" content="https://s.yimg.com/cv/apiv2/social/images/yahoo_default_logo.png"/>
<meta property="og:site_name" content="Yahoo" />
<meta property="fb:app_id" content="458584288257241" />
<meta name="format-detection" content="telephone=no" />
<link rel="icon" sizes="any" mask href="https://s.yimg.com/cv/apiv2/default/icons/favicon_y19_32x32_custom.svg">
<meta name="theme-color" content="#400090">
<link rel="shortcut icon" href="https://s.yimg.com/rz/l/favicon.ico" />
<link rel="canonical" href="https://www.yahoo.com/" /> <meta property="fb:pages" content="7040724713, 37510781596, 128015890542670, 73756409831, 1273983622628492, 183227235893, 107952415910993, 828031943896361, 338028696036, 228108177528276, 126435880711, 8603738371, 357311694375173, 168824166370, 116789651713844, 116789651713844, 284428852938, 116789651713844, 169590426398017, 150897358265131, 115060728528067, 358130347547704, 167601473274275, 166721106679241, 1573791532894850, 141301389258994, 138207559575213, 112996545439734, 345185573000, 131747896861126, 345185573000, 81262596234, 107143776010250, 137657892926963, 118757131504803" /> <meta name="referrer" content="unsafe-url"> <link href="https://s.yimg.com/os/yc/css/bundle.c60a6d54.css" rel="stylesheet" type="text/css">
<script>
var myYahoostartTime = new Date(),
afPerfHeadStart=new Date().getTime(),
ie;
ie = (function(){
var undef,
v = 3,
div = document.createElement('div'),
all = div.getElementsByTagName('i');
while (
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
all[0]
);
return v > 4 ? v : undef;
}());
if(ie && ie <9 ) {
if (document.documentElement.clientWidth > 980) {
document.documentElement.className += " centered-aligned-layout";
}
} else {
document.documentElement.className += " centered-aligned-layout";
}
document.documentElement.className += ' JsEnabled jsenabled';/* Modernizr 2.6.2 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-touch-cssclasses-teststyles-prefixes
*/
window.Modernizr=function(a,b,c){function w(a){j.cssText=a}function x(a,b){return w(m.join(a+";")+(b||""))}function y(a,b){return typeof a===b}function z(a,b){return!!~(""+a).indexOf(b)}function A(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:y(f,"function")?f.bind(d||b):f}return!1}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n={},o={},p={},q=[],r=q.slice,s,t=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},u={}.hasOwnProperty,v;!y(u,"undefined")&&!y(u.call,"undefined")?v=function(a,b){return u.call(a,b)}:v=function(a,b){return b in a&&y(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=r.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(r.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(r.call(arguments)))};return e}),n.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:t(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c};for(var B in n)v(n,B)&&(s=B.toLowerCase(),e[s]=n[B](),q.push((e[s]?"":"no-")+s));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)v(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},w(""),i=k=null,e._version=d,e._prefixes=m,e.testStyles=t,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+q.join(" "):""),e}(this,this.document);</script>
<link href="https://s.yimg.com/nn/lib/metro/g/myy/fallback_grid_0.0.3.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/nn/lib/metro/g/sda/sda_flex_0.0.26.css" rel="stylesheet" type="text/css"> <link href="https://s.yimg.com/os/yc/css/bundle.c60a6d54.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-applet-native-ads/atomic.ltr.9f86a497.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-applet-featurebar/atomic.ltr.4fdccfb2.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-wafer-ntk/atomic.desktop.ltr.1fd299b7.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-wafer-stream/atomic.desktop.ltr.575c6247.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-wafer-hpsetpromo/atomic.ltr.1bb98ff2.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-wafer-trending/atomic.ltr.5e5a6b0e.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-wafer-weather/atomic.ltr.45699b51.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-wafer-horoscope/atomic.ltr.ab0d1fdd.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-wafer-footer/atomic.ltr.5b979b2f.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-wafer-header/atomic.ltr.0bd42dac.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-wafer-user-intent/atomic.desktop.ltr.996e665a.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-wafer-header/custom.desktop.1c7eb152.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-wafer-ntk/custom.desktop.a69916e0.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-wafer-stream/custom.desktop.6909ce20.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/fp/css/tdv2-wafer-weather/common.desktop.f8075e32.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/c/5287f0f.caas-scrappy.min.css" rel="stylesheet" type="text/css"><link href="https://s.yimg.com/aaq/scp/css/viewer.809e2c9d.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="https://s.yimg.com/nn/lib/metro/g/sda/sda_modern_0.0.29.js" defer></script> <script type="text/javascript" src="https://s.yimg.com/aaq/fp/jsc/tdv2-wafer-stream.b9c2e2ec.js" defer></script> <script type="text/javascript" src="https://s.yimg.com/aaq/fp/jsc/tdv2-wafer-horoscope.9122b1d8.js" defer></script> <script type="text/javascript" src="https://s.yimg.com/aaq/fp/jsc/tdv2-wafer-header.desktop.f4ecfd82.js" defer></script> <script type="text/javascript" src="https://s.yimg.com/aaq/fp/jsc/tdv2-wafer-utils.1db6b956.js" defer></script> <script type="text/javascript" src="https://s.yimg.com/aaq/c/ea273b6.caas-scrappy.min.js" defer></script> <script type="text/javascript" src="https://s.yimg.com/os/yc/js/iframe-1.0.15.js" defer></script>
<link rel="search" type="application/opensearchdescription+xml" href="https://search.yahoo.com/opensearch.xml" title="Yahoo Search" />
<link rel="manifest" href="/manifest_desktop_us.json">
<meta name="oath:guce:consent-host" content="guce.yahoo.com"/>
<!-- Consent Manager Tag : Stubbed -->
<script type="text/javascript">/*! CMP 2.19.1 Copyright 2018 Oath Holdings, Inc. */!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=7)}([function(e,t,n){"use strict";var r=n(2),o=n.n(r),i=function(){return{parseQuery:function(e){var t={};if(e){"?"===e[0]&&(e=e.substring(1));for(var n=e.split("&"),r=0;r<n.length;r++){var o=n[r].split("=");o[0]&&(t[decodeURIComponent(o[0])]=decodeURIComponent(o[1]))}}return t},stringifyQuery:function(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")},isUndefined:function(e){return"undefined"!==e&&void 0===e},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},toBoolean:function(e){return"string"==typeof e?"true"===e||"1"===e:!!e},logMessage:function(e,t){window.console&&"function"==typeof console[e]&&window.console[e](t)},addWindowMessageListener:function(e,t){(e=e||window).addEventListener?e.addEventListener("message",t,!1):e.attachEvent("onmessage",t)},parsePostMessageData:function(e){var t=e||"";if("string"==typeof e)try{t=JSON.parse(e)}catch(e){}else try{t=JSON.parse(JSON.stringify(e))}catch(e){}return t},ajax:function(e,t,n,r){try{o()({withCredentials:t,useXDR:!0,url:e},function(e,t,r){if(e)n(void 0,0);else{var o=void 0!==t.statusCode?t.statusCode:200,i=r;try{i=200===o?JSON.parse(r):void 0}catch(e){}n(i,o)}})}catch(e){n(void 0,0)}},getMetaTagContent:function(e){var t=new RegExp(":","g"),n=e.replace(t,"\\:"),r=document.head.querySelector("[name="+n+"]");return r?r.content:void 0},documentReady:function(e){"loading"!==document.readyState?e():document.addEventListener?document.addEventListener("DOMContentLoaded",e):document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&e()})},isSafeUrl:function(e){return-1===(e=(e||"").replace(/\s/g,"")).toLowerCase().indexOf("javascript:")},isHostedUI:function(e){var t=RegExp(/\.oath\.com$/),n=document.createElement("a");return n.href=e,t.test(n.hostname)},isCookieExpireCapped:function(){try{var e=navigator.userAgent;return e.indexOf("Safari/")>-1&&-1===e.indexOf("Chrome/")&&-1===e.indexOf("Chromium/")}catch(e){}return!1}}}();t.a=i},function(e,t,n){"use strict";var r=n(0),o=function(){var e,t=function(e){return function(e){var t,n,r,o,i,a=document.cookie;if(t={},a)for(n=0,r=(i=a.split(";")).length;n<r;n++)t[(o=i[n].split(/=(.+)/))[0].trim()]=(o[1]||"").trim();return t[e]}(e)||function(e){if(window.localStorage){var t={},n=window.localStorage.getItem("_OATH_CMP_");return n&&(t=JSON.parse(n)),t[e]}}(e)},n=function(t,n,o){!function(t,n,o){var i=new Date,a=o?31536e6:864e5;i.setTime(i.getTime()+a);var s=e?"domain="+e+"; ":"";document.cookie=r.a.isUndefined(n)?t+"=; "+s+"path=/; Max-Age=0":t+"="+n+"; "+s+"path=/; expires="+i.toGMTString()+"; SameSite=None; Secure"}(t,n,o),o&&function(e,t){if(window.localStorage){var n=window.localStorage.getItem("_OATH_CMP_"),r=JSON.parse(n)||{};r[e]=t,window.localStorage.setItem("_OATH_CMP_",JSON.stringify(r))}}(t,n)},o=function(){var e=t("cmp"),n=e?r.a.parseQuery(e):{};return Math.round(Date.now()/1e3)-(n.t||0)>3600},i=function(){var e=Math.round(Date.now()/1e3),o=t("cmp"),i=o?r.a.parseQuery(o):{};i.t=e,n("cmp",r.a.stringifyQuery(i),!0)},a=function(){var e=t("cmp"),n=e?r.a.parseQuery(e):{};if(!r.a.isUndefined(n.j)&&!o())return r.a.toBoolean(n.j)},s=function(e){var o=t("cmp"),a=o?r.a.parseQuery(o):{};r.a.isUndefined(e)?delete a.j:(e=r.a.toBoolean(e),a.j=e?"1":"0"),n("cmp",r.a.stringifyQuery(a),!0),i()};return{setCookieDomain:function(t){if(!r.a.isCookieExpireCapped())if(t)try{var n=document.location.host.split(":")[0];new RegExp(t+"$").test(n)?e=t:r.a.logMessage("error","CMP Error: Invalid cookie domain. Domain must be an ancestor of the current domain")}catch(e){}else e=t},getConsentString:function(){var e=t("EuConsent");return"undefined"!==e?e:void 0},setConsentString:function(e,t){n("EuConsent",e,t),i()},isConsentStringStale:o,setGdprAppliesGlobally:function(e){if(e)return s(a()||r.a.toBoolean(e))},setIsUserInEU:function(e){if(!r.a.isUndefined(e))return s(a()||r.a.toBoolean(e))},setGdprApplies:s,getGdprApplies:a,getPubVendorListVersion:function(){var e=t("cmp"),n=e?r.a.parseQuery(e):{};return n.v&&parseInt(n.v)},setPubVendorListVersion:function(e){var o=t("cmp"),i=o?r.a.parseQuery(o):{};i.v=e,n("cmp",r.a.stringifyQuery(i),!0)},getAllowedOathVendorIds:function(){var e=t("cmp");return(e?r.a.parseQuery(e):{}).o||""},setAllowedOathVendorIds:function(e){var o=t("cmp"),i=o?r.a.parseQuery(o):{};e?i.o=e:delete i.o,n("cmp",r.a.stringifyQuery(i),!0)},getAcookieData:function(){return t("A1S")}}}();t.a=o},function(e,t,n){"use strict";var r=n(3),o=n(5),i=n(6);function a(e,t,n){var r=e;return o(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=i(t,{uri:e}),r.callback=n,r}function s(e,t,n){return u(t=a(e,t,n))}function u(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,o){t||(t=!0,e.callback(n,r,o))};function r(e){return clearTimeout(c),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,g)}function o(){if(!a){var t;clearTimeout(c),t=e.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var r=g,o=null;return 0!==t?r={body:function(){var e=void 0;if(e=u.response?u.response:u.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(u),v)try{e=JSON.parse(e)}catch(e){}return e}(),statusCode:t,method:d,headers:{},url:p,rawRequest:u}:o=new Error("Internal XMLHttpRequest Error"),n(o,r,r.body)}}var i,a,u=e.xhr||null;u||(u=e.cors||e.useXDR?new s.XDomainRequest:new s.XMLHttpRequest);var c,p=u.url=e.uri||e.url,d=u.method=e.method||"GET",f=e.body||e.data,l=u.headers=e.headers||{},m=!!e.sync,v=!1,g={body:void 0,headers:{},statusCode:0,method:d,url:p,rawRequest:u};if("json"in e&&!1!==e.json&&(v=!0,l.accept||l.Accept||(l.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(l["content-type"]||l["Content-Type"]||(l["Content-Type"]="application/json"),f=JSON.stringify(!0===e.json?f:e.json))),u.onreadystatechange=function(){4===u.readyState&&setTimeout(o,0)},u.onload=o,u.onerror=r,u.onprogress=function(){},u.onabort=function(){a=!0},u.ontimeout=r,u.open(d,p,!m,e.username,e.password),m||(u.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(c=setTimeout(function(){if(!a){a=!0,u.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}},e.timeout)),u.setRequestHeader)for(i in l)l.hasOwnProperty(i)&&u.setRequestHeader(i,l[i]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(u.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(u),u.send(f||null),u}e.exports=s,e.exports.default=s,s.XMLHttpRequest=r.XMLHttpRequest||function(){},s.XDomainRequest="withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){s["delete"===e?"del":e]=function(t,n,r){return(n=a(t,n,r)).method=e.toUpperCase(),u(n)}})},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(t,n(4))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){var t=n.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)n.call(r,o)&&(e[o]=r[o])}return e};var n=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(8);!function(){var e=!1;function t(e){var t,n="string"==typeof e.data,r=e.data;if(n)try{r=JSON.parse(e.data)}catch(e){}r&&(r.__cmpCall&&(t=r.__cmpCall,window.__cmp(t.command,t.parameter,function(r,o){var i={__cmpReturn:{returnValue:r,success:o,callId:t.callId}};e&&e.source&&e.source.postMessage(n?JSON.stringify(i):i,"*")})),r.__uspapiCall&&(t=r.__uspapiCall,window.__uspapi(t.command,t.version,function(r,o){var i={__uspapiReturn:{returnValue:r,success:o,callId:t.callId}};e&&e.source&&e.source.postMessage(n?JSON.stringify(i):i,"*")})))}"function"==typeof __cmp||(window.__cmp=function(){var t=arguments;if(__cmp.a=__cmp.a||[],!t.length)return __cmp.a;"ping"===t[0]?t[2]({gdprAppliesGlobally:e,cmpLoaded:!1},!0):__cmp.a.push([].slice.apply(t))},function e(){if(document.body&&document.body.firstChild){var t=document.body,n=document.createElement("iframe"),r=document.createElement("iframe");n.style.display="none",n.height=n.width=0,n.name="__cmpLocator",t.insertBefore(n,t.firstChild),r.style.display="none",r.height=r.width=0,r.name="__uspapiLocator",t.insertBefore(r,t.firstChild)}else setTimeout(e,5)}(),window.addEventListener?window.addEventListener("message",t,!1):window.attachEvent("onmessage",t)),"function"==typeof __uspapi||(window.__uspapi=function(e,t,n){var i,a;if("getUSPData"===e&&n){a=(i=r.a.getAcookieData())?Object(o.a)(i):{},window.__uspapi.acookie=a;var s,u=!a.gucConsentTypes||-1!==a.gucConsentTypes.indexOf("SELL_PERSONAL_INFORMATION"),c="CCPA"===a.jurisdiction;c&&u?s="1YNN":c&&!u?s="1YYN":!c&&u?s="1---":c||u||(s="1NYN"),n({version:1,uspString:s,isOathFirstParty:!0},!0)}"getDoNotSell"===e&&(n&&(a=(i=r.a.getAcookieData())?Object(o.a)(i):{},window.__uspapi.acookie=a,n({doNotSell:!!a.gucConsentTypes&&-1===a.gucConsentTypes.indexOf("SELL_PERSONAL_INFORMATION"),isOathFirstParty:!0},!0)))})}()},function(e,t,n){"use strict";var r="00",o="01",i="02",a="03",s="04",u="05",c=2,p=2,d=2,f=2,l=6,m=4,v=2,g=8,y=8,C={1:"NON_EU_CONSENT",2:"CORE_EU_CONSENT",4:"OATH_AS_THIRD_PARTY",8:"ANALYSIS_OF_COMMUNICATIONS",16:"PRECISE_GEOLOCATION",32:"CROSS_DEVICE_MAPPING",64:"ACCOUNT_MATCHING",128:"SEARCH_HISTORY",256:"FIRST_PARTY_ADS",512:"CONTENT_PERSONALIZATION",1024:"IAB",2048:"THIRD_PARTY_CONSENT",4096:"ALLOW_HUMANS_TO_READ_EMAILS",8192:"SELL_PERSONAL_INFORMATION"},S=["EU_OATH","NON_EU_OATH"],E=["REG","NON_REG"],T=["NOT_CONSENTED","CONSENTED","DECLARED_NON_EU"],h=["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","CU","CW","DJ","DM","EC","EG","SV","GQ","ER","ET","FK","FO","FJ","GF","PF","TF","GA","GM","GE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","IN","ID","IR","IQ","IM","IL","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","MO","MK","MG","MW","MY","MV","ML","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NC","NZ","NI","NE","NG","NU","NF","MP","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PR","QA","RE","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SB","SO","ZA","GS","SS","LK","SD","SR","SJ","SZ","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","US","BG","CZ","DK","DE","EE","IE","EL","ES","FR","HR","IT","CY","LT","LU","HU","MT","NL","AT","PL","PT","RO","SI","SK","FI","SE","UK","IS","LI","NO"],_=function(e){if(e)return function(e){if(e)return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}(btoa(String.fromCharCode.apply(null,e.replace(/\r|\n/g,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" "))))},O=function(e){if(void 0!==e){var t=["0000","0001","0010","0011","0100","0101","0110","0111","1000","1001","1010","1011","1100","1101","1110","1111"];return t[e>>>4&15]+t[15&e]}},N=function(e){if(e)return parseInt(function(e){if(e){for(var t=[],n=e.length-2;n>=0;)t.push(e.substr(n,2)),n-=2;return t.join("")}}(e),16)};t.a=function(e){var t,n={};if(!e)return{};try{var w,A=e.split("&");for(t=0;t<A.length;t++){var M=A[t];0===M.indexOf("d=")&&(w=M.slice(2)),0===M.indexOf("j=")&&(n.jurisdiction=M.slice(2))}if(!w)return{};var R=function(e){if(void 0!==e){for(var t="",n=0;n<e.length;n++)t+=O(e.charCodeAt(n));return{string:t,pos:0,readByteAsInt:function(){var e=parseInt(this.string.substr(this.pos,8),2);return this.pos+=8,e},readRemainingBinary:function(){return this.string.substr(this.pos)}}}}(function(e){if(e)return atob(function(e){if(e)return e.replace(/-/g,"+").replace(/_/g,"/")}(e))}(w));n.version=R.readByteAsInt(8),n.flags=R.readByteAsInt(8);var I=function(e){if(e){for(var t={},n=function(n){e=e.slice(n.length);var r=2*parseInt(e.slice(0,2),16);e=e.slice(2),t[n]=e.slice(0,r),e=e.slice(r)};""!==e;)n(e.slice(0,2).toUpperCase());return t}}(function(e){if(e){for(var t="",n=0;!(n>=e.length);)t+=parseInt(e.substr(n,4),2).toString(16).toUpperCase(),n+=4;return t}}(R.readRemainingBinary()));n.nonce=I[r];var L=I[o];n.creationTime=L?N(L):void 0,n.temporaryId=_(I[i]),n.agentId=_(I[a]);var b=I[s];n.expiryTime=b?N(b):void 0;var P=I[u]||"",G=0,U=N(P.substr(G,c));n.gucToS=S[U],G+=c;var D=N(P.substr(G,p));n.gucUserType=E[D],G+=p;var H=N(P.substr(G,d));n.gucConsentVersion=H,G+=d;var B=N(P.substr(G,f));n.gucConsented=T[B],G+=f;var x=N("00"+P.substr(G,l));n.gucValidityCheckTime=x,G+=l;var j=N("0000"+P.substr(G,m));n.gucExpiryTime=j,G+=m;var F=N(P.substr(G,v));n.gucJurisdiction=h[F],G+=v;var V=N(P.substr(G,g));n.gucHomeLocation=V,G+=g;var X=N(P.substr(G,y));if(G+=y,P.length>=G)for(n.gucConsentTypes=[],t=0;t<14;t++)X&1<<t&&n.gucConsentTypes.push(C[1<<t])}catch(e){}return n}}]);</script>
<!-- Consent Manager Tag : Script -->
<script type="text/javascript" src="https://s.yimg.com/aaq/cmp/version/2.19.1/cmp.js" async></script>
<script type="text/javascript"> (function() {
var beaconUrl = "/p.gif?rid=e8odnc5f7nc7l" + "&bucket=FPGEMINIDAS701,FPPERF003,MULTISIGNOUTBR01";
var shouldShowPrompt = function() {
var bodyClasses = document.body.className;
var showPrompt = (bodyClasses.indexOf("pushPromoVisible") === -1);
return showPrompt;
};
var tracker = {
instance: window.YAHOO && window.YAHOO.i13n && window.YAHOO.i13n.rapidInstance,
trackerWindowPath: 'rapidInstance'
};
window.YAHOO = window.YAHOO || {};
window.YAHOO.homepageClientConfig = {
"addToHomeScreen": {
"enabled": 1,
"forNativeApp": 0,
"shouldShowPrompt": shouldShowPrompt,
"useBeforeInstallPrompt": 1
},
"appOpenOnboarding": {
"enabled": 0
},
"beacon": {
"bucket": "FPGEMINIDAS701,FPPERF003,MULTISIGNOUTBR01",
"rid": "e8odnc5f7nc7l"
},
"onboarding": {
"installCardSwapCount": 3,
"installCoolOffTime": 168,
"installOnboardingType": "native",
"installSliderSwapCount": 1
},
"pageInfo": {
"device": "desktop",
"lang": "en-US",
"region": "US",
"site": "fp"
},
"promoSlots": {
"enabled": 1
},
"serviceWorker": {
"enabled": 1
},
"serviceWorkerFeatures": {
"didWrite": function didWrite() {
window.hpClientInstance.serviceWorker && window.hpClientInstance.serviceWorker.register().catch(function (){
// service worker reg failed likely due to non https or browser support.
// do nothing and keep this catch to avoid console error log
});
},
"values": {
"cache": 1,
"convertNotificationUrl": 0,
"offlineBeacon": 1,
"precache": 1
},
"write": true
},
"tracker": tracker,
"userConnectionToast": {
"enabled": 1
}
};
if (window.HomepageClient && window.HomepageClient.PWA) {
window.hpClientInstance = new window.HomepageClient.PWA(window.YAHOO.homepageClientConfig);
}
})();</script>
<script type="text/javascript">
window.cssUrls = ["https:\/\/s.yimg.com\/os\/yc\/css\/bundle.c60a6d54.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-applet-native-ads\/atomic.ltr.9f86a497.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-applet-featurebar\/atomic.ltr.4fdccfb2.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-wafer-ntk\/atomic.desktop.ltr.1fd299b7.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-wafer-stream\/atomic.desktop.ltr.575c6247.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-wafer-hpsetpromo\/atomic.ltr.1bb98ff2.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-wafer-trending\/atomic.ltr.5e5a6b0e.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-wafer-weather\/atomic.ltr.45699b51.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-wafer-horoscope\/atomic.ltr.ab0d1fdd.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-wafer-footer\/atomic.ltr.5b979b2f.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-wafer-header\/atomic.ltr.0bd42dac.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-wafer-user-intent\/atomic.desktop.ltr.996e665a.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-wafer-header\/custom.desktop.1c7eb152.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-wafer-ntk\/custom.desktop.a69916e0.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-wafer-stream\/custom.desktop.6909ce20.css","https:\/\/s.yimg.com\/aaq\/fp\/css\/tdv2-wafer-weather\/common.desktop.f8075e32.css","https:\/\/s.yimg.com\/aaq\/c\/5287f0f.caas-scrappy.min.css","https:\/\/s.yimg.com\/aaq\/scp\/css\/viewer.809e2c9d.css"];
window.comboCssKey = "";
window.lazyLoadCss = false;
</script>
</head>
<body class="my3columns ua-ff ua-mac ua-ff21 l-out Pos-r https fp fp-v2 fp-default mini-uh-on uh-topbar-on ltr
" dir="ltr">
<noscript></noscript>
<div id="darla-assets-js-top">
<script type='text/javascript' src='https://s.yimg.com/rq/darla/3-24-1/js/g-r-min.js'></script>
</div>
<header id="Header">
<div id="applet_p_50000398" class="hpsetbannerpromotdv2wafer Mb-20 " data-applet-guid="p_50000398" data-applet-type="hpsetbannerpromotdv2wafer" data-applet-params="_suid:50000398" data-i13n="auto:true;sec:app-bhpromo" data-i13n-sec="app-bhpromo"> <!-- App open -->
<div><div id="mega-banner-wrapper"><div id="mega-banner" class="Pos(f) Start(0) T(0) Miw(1000px) W(100%) Z(3) H(72px) has-scrolled_Mt($hideBannerMargin) hasScrolled_Mt($hideBannerMargin) modal-open_Mt($hideBannerMargin) Bg($bannerGradient) C(#fff) Trs($headerAnim)" data-test-locator="hpsetBanner"><div class="D(ib) Mstart(64px)"><div class="Fz(18px) Fw(b) Mt(13px) Mb(4px)">Make Yahoo Your Homepage</div><div id="mega-banner-desc" class="Fz(13px)">Discover something new every day from News, Sports, Finance, Entertainment and more!</div></div><ul class="D(ib) Pos(a) End(88px) Mt(21px)"><li class="D(ib)"><button type="button" id="mega-banner-add" class="Fz(13px) Pend(18px) Pstart(17px) H(29px) Bdrs(2px) Bgc($bannerBtn) C(#fff)" data-ylk="sec:app-bhpromo;t1:a1;elm:btn;elmt:click;itc:0;">Get</button></li><li class="D(ib) Mend(10px)"><button type="button" id="mega-banner-close" class="Fz(13px) C(#fff)" data-ylk="sec:app-bhpromo;t1:a1;elm:btn;elmt:click;itc:1;">No, thanks</button></li></ul><script type="text/javascript">
document.body.className += ' uh-banner-wide';
</script><script>!function(){var i,r,t,s={get:function(e,n){var o=this.getAll(e);return o?o[n]:null},getAll:function(e){var n=encodeURIComponent(e)+"=",o=document.cookie.indexOf(n),i=null,t={};if(-1<o){var r=document.cookie.indexOf(";",o);if(-1===r&&(r=document.cookie.length),0<(i=document.cookie.substring(o+n.length,r)).length){for(var s=i.split("&"),a=0,l=s.length;a<l;a++){var c=s[a].split("=");t[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return t}}return null},set:function(e,n,o,i,t,r,s){var a=this.getAll(e)||{};a[n]=o,this.setAll(e,a,i,t,r,s)},setAll:function(e,n,o,i,t,r){var s=encodeURIComponent(e)+"=",a=new Array;for(var l in n)0<l.length&&n.hasOwnProperty(l)&&a.push(encodeURIComponent(l)+"="+encodeURIComponent(n[l]));0<a.length?(s+=a.join("&"),o instanceof Date&&(s+="; expires="+o.toGMTString()),i&&(s+="; path="+i),t&&(s+="; domain="+t),r&&(s+="; secure")):s+="; expires="+new Date(0).toGMTString(),document.cookie=s},unset:function(e,n,o,i,t){var r=this.getAll(e);r&&(delete r[n],this.setAll(e,r,null,o,i,t))},unsetAll:function(e,n,o,i){this.setAll(e,null,new Date(0),n,o,i)}};function e(e){var n=this;n.browserName=e.browserName,n.cookieCreation=e.cookieCreation,n.extensionName=e.extensionName,n.enableIEInstallerLightbox=!1,n.browserVersion=e.browserVersion,n.osName="string"==typeof e.osName?e.osName.slice(0,3):"",n.extensions=e.extensions.extensions,n.hpCookieValue=e.hpCookieValue,n.xhrApiPath=e.xhrApiPath,n.IEInstallerBox=e.ieInstallerLightBox,n.bannerWrapper=r.getElementById("mega-banner-wrapper"),n.bannerAddNode=r.getElementById("mega-banner-add"),n.bannerCloseNode=r.getElementById("mega-banner-close"),n.ESC_KEY=27,n.ieLbNode=r.getElementById("ieInstallerLightbox"),n.docEl=r.querySelector("html"),n.bodyNode=r.querySelector("body"),n.initializer()}function n(){new e(t)}function o(e,n,o){i=e,r=n,t=o||{"browserName":"firefox","browserVersion":"21.0","cookieCreation":"client","extensionName":"homepage","extensions":{"cookieCreation":"client","enabled":1,"extensions":{"name":"homepage","homepage":{"chrome":{"enabled":true,"url":"https://chrome.google.com/webstore/detail/yahoo-homepage/pcopkgkhleadcmnfhhdfgfifcmjbokhf?extInstall=1&partner=ent-hp","minVersion":31,"maxVersion":0,"os":["win","mac"]},"firefox":{"enabled":1,"url":"https://addons.mozilla.org/en-US/firefox/addon/yahoo-homepage/","xpi":"https://addons.mozilla.org/firefox/downloads/latest/yahoo-homepage/addon-705134-latest.xpi","minVersion":38,"maxVersion":0,"os":["win","mac"]},"ie":{"enabled":false,"url":"https://sxh.yimg.com/jf/dyc/IEinstall/hpset_2018.06.28.01.exe","minVersion":11,"maxVersion":11,"os":["win"]},"markupFlagClassName":"yahoo_hp_set_ext_installed","markupFlagSelector":"body"},"partnerDisable":false},"disabledFrYhs":1,"hashTag":"extInstall?partner=oo-hpbanner"},"hpCookieValue":0,"ieInstallerLightBox":false,"osName":"mac os x","xhrApiPath":"/tdv2_fp/api/resource/HpSetCookieService"}}e.prototype={initializer:function(){var n=this;if(n.IEInstallerBox&&"ie"===n.browserName&&(i.indexedDB||!i.PointerEvent&&!i.MSPointerEvent||n.hideBanner(),n.setupIeInstallerLightbox()),"chrome"===n.browserName)n.handleVerification();else if("firefox"===n.browserName&&i.indexedDB){var e=i.indexedDB.open("test");e.onsuccess=n.handleVerification.bind(n),e.onerror=function(e){n.hideBanner()}}},hideBanner:function(){var e=this;e.bannerWrapper&&(e.bannerWrapper.classList.add("D(n)"),"client"===e.cookieCreation?e.initializeSubCookie("lbit"):e.initializeSubCookieOnServer()),e.bodyNode&&e.bodyNode.classList.remove("uh-banner-wide")},initializeSubCookie:function(e){var n=Math.floor((new Date).getTime()/1e3),o=s.get("ucs",e);(!o||o<n)&&this.setSubCookie(e,n)},setSubCookie:function(e,n){var o=(new Date).setFullYear((new Date).getFullYear()+1);s.set("ucs",e,n,new Date(o),"/",".yahoo.com")},initializeSubCookieOnServer:function(){var e;i.XMLHttpRequest&&(e=new XMLHttpRequest),e&&this.xhrApiPath&&(e.timeout=3e3,e.open("GET",this.xhrApiPath),e.withCredentials=!0,e.send())},hideBannerOnEsc:function(e){e.keyCode!==this.ESC_KEY||this.bannerWrapper.classList.contains("D(n)")||this.hideBanner()},handleInstall:function(){var e=this,n=e.extensions[e.extensionName]&&e.extensions[e.extensionName][e.browserName]||{},o=n.url||"",i=n.hashTag||"",t={chrome:e.installChromeExtension,firefox:e.installFirefoxExtension,ie:e.installExplorerRegistryKey};"firefox"===e.browserName&&57<=e.browserVersion&&(o=n.xpi),o&&t[e.browserName]&&(i&&r&&r.location&&(r.location.hash=i),t[e.browserName].call(e,o)),e.bannerWrapper&&e.hideBanner()},handleVerification:function(){var n=this,e=n.extensions[n.extensionName],o={chrome:[n.checkIsExcludedVersion,n.checkIsPartnerTraffic],firefox:[n.checkIsExcludedVersion,n.checkIsPartnerTraffic],ie:[n.checkIsExcludedVersion,n.checkDependenciesFail,n.checkIsPartnerTraffic]},i=!1;if(e&&o[n.browserName]&&o[n.browserName].length)for(var t=0;t<o[n.browserName].length&&(i=!o[n.browserName][t].call(n));t+=1);return i&&n.bannerAddNode&&n.bannerCloseNode&&(n.bannerAddNode.addEventListener("click",function(){n.handleInstall()}),n.bannerCloseNode.addEventListener("click",function(){n.hideBanner()}),n.docEl.addEventListener("keydown",function(e){n.hideBannerOnEsc(e)})),i},setupIeInstallerLightbox:function(){var e=this;e.handleVerification&&e.shouldEnableIEInstallerLightbox&&(e.handleVerification(),e.enableIeInstallerLightbox=e.shouldEnableIEInstallerLightbox(),e.enableIeInstallerLightbox&&e.ieLbNode&&e.bodyNode&&(e.bodyNode.appendChild(e.ieLbNode),e.ieLbNode.addEventListener("click",function(){e.hideIEInstallerLightBox()}),r.addEventListener("keydown",function(){e.hideIEInstallerLightBox()})))},hideIEInstallerLightBox:function(){this.ieLbNode&&this.ieLbNode.classList.add("D(n)")},checkIsExcludedVersion:function(){var e=this,n=e.extensions[e.extensionName]&&e.extensions[e.extensionName][e.browserName],o=!0;return n&&(!n.minVersion||e.browserVersion>=n.minVersion)&&(!n.maxVersion||e.browserVersion<=n.maxVersion)&&(!n.os||0<=n.os.indexOf(e.osName))&&(o=!1),o},checkDependenciesFail:function(){var e;return(e=this.checkIsHomepageSet()||this.checkHasNoIEInstallerLightbox())||(this.enableIEInstallerLightbox=!0),e},checkIsHomepageSet:function(){return this.checkHasHpCookie()},checkIsPartnerTraffic:function(){var e=!1;return!this.extensions.partnerDisable||-1===i.location.href.search("[?&]fr=")&&-1===i.location.href.search("[?&]yhs=")||(e=!0),e},checkHasHpCookie:function(){return"1"===this.hpCookieValue},checkHasNoIEInstallerLightbox:function(){return!this.ieLbNode},shouldEnableIEInstallerLightbox:function(){return this.enableIEInstallerLightbox},installChromeExtension:function(e){e&&i.open(e,"_blank")},installFirefoxExtension:function(e){if(e){var n=".xpi"===e.substr(-4)?"_self":"_blank";i.open(e,n)}},installExplorerRegistryKey:function(e){this.ieLbNode&&this.ieLbNode.classList.remove("D(n)"),e&&(0<e.indexOf("hpset")&&this.setHPCookie(),i.open(e,"_self"))},setHPCookie:function(){var e=new Date;e.setTime(e.getTime()+1728e5),r.cookie="HP=1; expires="+e+"; path=/; domain=.yahoo.com"}},"undefined"!=typeof module?(module.exports.HpSetPromoHandler=e,module.exports.defineGlobals=o,module.exports.initHPPromo=n):(o(window,document),n())}();</script></div><div class="fixed-space H(72px) has-scrolled_Mt($hideBannerMargin) hasScrolled_Mt($hideBannerMargin) modal-open_Mt($hideBannerMargin) Trs($headerAnim)"></div></div></div> <!-- App close -->
</div>
<div id="applet_p_50000372" class="headertdv2wafer wafer-rapid-module " data-applet-guid="p_50000372" data-applet-type="headertdv2wafer" data-applet-params="_suid:50000372" data-i13n="auto:true;sec:hd;useViewability:true" data-i13n-sec="hd" data-ylk="rspns:nav;t1:a1;t2:hd;itc:0;"> <!-- App open -->
<div><div><div id="header-wrapper" class="Bgc(#fff) Bdbc(t) Bdbs(s) Bdbw(1px) D(tb) Pos(f) Tbl(f) W(100%) Z(4) has-scrolled_Bdc($c-fuji-grey-d) Scrolling_Bdc($c-fuji-grey-d) has-scrolled_Bxsh($headerShadow) Scrolling_Bxsh($headerShadow) "><div class="Bgc(#fff) M(a) Maw(1301px) Miw(1000px) Pb(12px) Pt(22px) Pos(r) TranslateZ(0) Z(6)"><h1 class="Fz(0) Pstart(15px) Pos(a)"><a id="header-logo" href="https://www.yahoo.com/" class="D(b) Pos(r)" data-ylk="elm:img;elmt:logo;sec:hd;slk:logo"><img class="H(27px)!--sm1024 Mt(9px)!--sm1024 W(90px)!--sm1024" src="https://s.yimg.com/rz/p/yahoo_frontpage_en-US_s_f_p_205x58_frontpage_2x.png" height="58px" width="205px" alt="Yahoo" title="Yahoo"/></a></h1><div class="H(46px) Mend(396px) Mstart(255px) Maw(647px) Pos(r) Mstart(120px)--sm1024 Va(t)"><div class="D(tb) W(100%)"><form id="header-search-form" action="https://search.yahoo.com/search" class="D(tb) H(46px) Pos(r) Va(m) W(100%)" data-ylk="elm:kb-ent;elmt:srch;sec:srch;slk:srchweb;tar:search.yahoo.com" method="get" target="_top"><label for="header-search-input" class="Hidden">Search</label><input type="text" id="header-search-input" aria-autocomplete="list" aria-expanded="false" aria-label="" placeholder="" autoCapitalize="off" autoComplete="off" class="Bgc(t) Bd Bdrsbstart(2px)! Bdc(#b0b0b0) Bdendw(0) Bdrs(0) Bdrststart(2px)! Bxsh(n) Bxz(bb) D(b) Fz(18px) H(inh) M(0) O(0) Px(10px) W(100%) Bdc($c-fuji-blue-1-c):f Bdc(#949494):h" name="p"/><div class="D(tbc) H(100%) Ta(c) Va(t) W(90px)"><button id="header-desktop-search-button" class="Bgc(#5701ed) submit-btn Bd(n) Bdrsbend(2px) Bdrstend(2px) D(b) H(100%) M(0) P(0) rapid-noclick-resp W(100%)" data-ylk="elm:btn;elmt:srch;itc:0;rspns:nav;sec:srch;slk:srchweb;t1:a1;t2:srch;tar:search.yahoo.com;tar_uri:/search" type="submit" aria-label="Search"><svg class="Cur(p)" width="24" style="fill:#fff;stroke:#fff;stroke-width:0;vertical-align:bottom" height="24" viewBox="0 0 24 24" data-icon="search"><path d="M9 3C5.686 3 3 5.686 3 9c0 3.313 2.686 6 6 6s6-2.687 6-6c0-3.314-2.686-6-6-6m13.713 19.713c-.387.388-1.016.388-1.404 0l-7.404-7.404C12.55 16.364 10.85 17 9 17c-4.418 0-8-3.582-8-8 0-4.42 3.582-8 8-8s8 3.58 8 8c0 1.85-.634 3.55-1.69 4.905l7.403 7.404c.39.386.39 1.015 0 1.403"></path></svg></button></div><input type="hidden" class="V(h)" name="fr" value="yfp-t" data-fr="yfp-t" data-submit-only=""/><input type="hidden" class="V(h)" name="fr" value="yfp-t-s" data-fr="yfp-t-s" data-assist-only=""/><input type="hidden" class="V(h)" name="fp" value="1" data-fp="1"/><input type="hidden" class="V(h)" name="toggle" value="1" data-toggle="1"/><input type="hidden" class="V(h)" name="cop" value="mss" data-cop="mss"/><input type="hidden" class="V(h)" name="ei" value="UTF-8" data-ei="UTF-8"/></form></div></div><ul id="Skip-links" class="Pos(a) Start(255px) Start(120px)--sm1024"><li><a href="#header-nav-bar" class="Bg(#0078ff) C(#fff) D(ib) Op(1):f Ov(v):f P(5px):f W(a):f Op(0) Ov(h) Pos(a) Whs(nw) W(0)">Skip to Navigation</a></li><li><a href="#Main" class="Bg(#0078ff) C(#fff) D(ib) Op(1):f Ov(v):f P(5px):f W(a):f Op(0) Ov(h) Pos(a) Whs(nw) W(0)">Skip to Main Content</a></li><li><a href="#Aside" class="Bg(#0078ff) C(#fff) D(ib) Op(1):f Ov(v):f P(5px):f W(a):f Op(0) Ov(h) Pos(a) Whs(nw) W(0)">Skip to Related Content</a></li></ul><div class="menu-section"><ul class="End(48px) List(n) Mt(0) Pos(a) T(22px) header-menu wafer-tabs tabs" data-wf-boundary="menu-section" data-wf-active-class="active" data-wf-collapsable="true" data-wf-handle-hover="true" data-wf-handle-focus="true" data-wf-tabs-allowdefault="true" data-wf-target="header-menu"><li id="header-profile-menu" class="D(ib) H(46px) Mx(14px) Va(t) tab"><a id="header-signin-link" class="Bgc(#fff) Bdc(#6001d2) Bdrs(3px) Bds(s) Bdw(2px) C(#4d00ae) D(ib) Ell Fz(13px) Fw(b) H(19px) Lh(19px) Mend(5px) Mt(10px) Miw(66px) Px(6px) Py(2px) Ta(c) Td(n) active_Bgc(#6001d2) active_C(#fff)" href="https://login.yahoo.com/config/login?.src=fpctx&.intl=us&.lang=en-US&.done=https://www.yahoo.com" data-ylk="elm:btn;elmt:lgn;outcm:lgn;t3:usr"><span>Sign in</span></a></li><li id="header-notification-menu" class="D(ib) Mx(8px) Va(t) tab"><button id="header-notification-button" class="Bgc(t) Bd(0) Cur(p) P(10px) Mt(7px) H(36px) Pos(r) W(30px)" data-ylk="elm:btn;itc:1;slk:Notifications" aria-label="Notifications" aria-haspopup="true"><svg class="Pos(a) Start(2px) T(4px) Cur(p)" width="26" style="fill:#6001d2;stroke:#6001d2;stroke-width:0;vertical-align:bottom" height="26" viewBox="0 0 24 27" data-icon="bell-fill"><path d="M23.258 20.424c-.09-.07-.81-.662-1.394-1.7-.114-.2-.45-.914-.503-1.06-.143-.39-.243-.864-.398-1.543-.367-2.33-.34-5.656-.34-5.656 0-.076.003-.15.003-.226 0-4.07-2.926-7.465-6.825-8.28v-.19C13.8.788 12.994 0 12 0s-1.8.79-1.8 1.768v.19c-3.897.815-6.822 4.21-6.822 8.28 0 .076.002.15.004.226 0 0 .023 3.325-.344 5.657-.155.68-.255 1.154-.4 1.545-.053.145-.388.86-.502 1.06-.583 1.037-1.304 1.63-1.394 1.7-.315.24-.452.425-.452.425-.18.227-.29.51-.29.82C0 22.406.607 23 1.354 23c.037 0 .073-.004.11-.005h21.07c.037 0 .075.005.112.005.747 0 1.354-.596 1.354-1.33 0-.308-.108-.593-.29-.82 0 0-.137-.184-.452-.426zM12 27c1.657 0 3-1.343 3-3H9c0 1.657 1.343 3 3 3z"></path></svg><span id="header-notification-badge" class="Bg($fujiGradient) Bgc($c-fuji-red-2-b) Bdrs(24px) C(#fff) D(n) Fz(14px) Fw(b) H(17px) Op(.9) Pb(4px) Pt(3px) Pos(a) Start(16px) Ta(c) T(-8px) W(24px)"></span></button><div id="header-notification-panel" class="Bgc(#fff) Bdc(#d6d6da) Bdrs(6px) Bds(s) Bdw(1px) Bxsh($menuShadow) Fz(14px) List(n) Mt(10px) Mah(0) Mih(57px) Op(0) Ov(h) P(0) Pos(a) End(0) Trs($menuTransition) V(h) W(382px) active_Mah(478px) active_Op(1) active_V(v)" aria-live="polite"></div></li><li class="D(ib) H(46px) Mstart(14px) Mt(5px) Va(t) tab"><a id="header-mail-button" class="C(#4d00ae) D(b) H(22px) Lh(22px) Py(7px) Pos(r) Td(n)" data-ylk="t1:a1;t2:hd;slk:mail;elm:btn;itc:0" href="https://mail.yahoo.com/?.src=fp" title="Mail"><svg class="Pos(a) T(4px) Cur(p)" width="30" style="fill:#6001d2;stroke:#6001d2;stroke-width:0;vertical-align:bottom" height="30" viewBox="0 0 512 512" data-icon="NavMail"><path d="M460.586 91.31H51.504c-10.738 0-19.46 8.72-19.46 19.477v40.088l224 104.03 224-104.03v-40.088c0-10.757-8.702-19.478-19.458-19.478M32.046 193.426V402.96c0 10.758 8.72 19.48 19.458 19.48h409.082c10.756 0 19.46-8.722 19.46-19.48V193.428l-224 102.327-224-102.327z"></path></svg><span class="D(ib) Fz(14px) Fw(b) Lh(24px) Pstart(38px)">Mail</span></a><div id="header-mail-panel" class="Bgc(#fff) Bdc(#d6d6da) Bdrs(6px) Bds(s) Bdw(1px) Bxsh($menuShadow) Bxz(bb) Fz(14px) List(n) Mt(10px) Mah(0) Mih(57px) Op(0) Px(24px) Py(20px) Pos(a) End(0) Ta(c) Trs($menuTransition) V(h) W(382px) active_Mah(60px) active_Op(1) active_V(v)" aria-live="polite"><a class='C(#0078ff) Fw(b) Td(n)' href='https://login.yahoo.com/config/login?.src=fpctx&.intl=us&.lang=en-US&.done=https://www.yahoo.com' data-action-outcome='lgn' data-ylk='t1:a1;t2:hd;slk:mail;elm:btn;itc:0'>Sign in</a> to view your mail</div></li></ul></div></div><div class="Pb(10px) Pstart(22px) Pos(r) HideBottomBar_Mt($bottomBarHideMargin) modal-open_Mt($bottomBarHideMargin) HideBottomBar_Op(0) modal-open_Op(0) TranslateZ(0) Trs($navigationBarTransition)" id="header-nav-bar-wrapper" role="navigation"><ul class="Miw(1000px) Mx(a) My(0) Maw(1278px) Ov(h) Pt(8px) Whs(nw)" id="header-nav-bar"><li class="D(ib) Mstart(21px) Mend(17px) Mstart(11px)--sm1024"><a href="https://mail.yahoo.com/?.src=fp" class="C(#4d00ae) Fz(14px) Fw(b) Lh(2.1) Pos(r) Td(n) Td(u):h" data-ylk="elm:itm;elmt:pty;itc:0;rspns:nav;sec:nav;t1:a1;t2:hd;t3:tb;cpos:0;slk:Mail;t5:MAIL"><svg class="Mstart(-21px) Mend(6px) Mstart(-11px)--sm1024 Cur(p)" width="28" style="fill:#6001d2;stroke:#6001d2;stroke-width:0;vertical-align:bottom" height="28" viewBox="0 0 512 512" data-icon="NavMail"><path d="M460.586 91.31H51.504c-10.738 0-19.46 8.72-19.46 19.477v40.088l224 104.03 224-104.03v-40.088c0-10.757-8.702-19.478-19.458-19.478M32.046 193.426V402.96c0 10.758 8.72 19.48 19.458 19.48h409.082c10.756 0 19.46-8.722 19.46-19.48V193.428l-224 102.327-224-102.327z"></path></svg><b id="navbar-mail-dot" class="wafer-bind Pos(a) Bdrs(11px) W(8px) H(8px) T(-7px) Start(-4px) Bdw(2px) Bdc(#fff) Bds(s) Bg($fujiGradient)" data-wf-state-data-mail-count="[state.mailCount]" data-mail-count="0"></b>Mail<span id="navbar-mail-count" class="wafer-bind Fw(n) Mstart(3px)" data-wf-state-data-mail-count="[state.mailCount]" data-mail-count="0">(<span class="wafer-text Fz(14px) Mx(2px)" data-wf-state-text="[state.mailCount]"></span>)</span></a></li><li class="D(ib) Mstart(21px) Mend(17px) Mstart(11px)--sm1024"><a href="https://news.yahoo.com/coronavirus/" class="C(#4d00ae) Fz(14px) Fw(b) Lh(2.1) Pos(r) Td(n) Td(u):h" data-ylk="elm:itm;elmt:pty;itc:0;rspns:nav;sec:nav;t1:a1;t2:hd;t3:tb;cpos:1;slk:Coronavirus;t5:CORONAVIRUS">Coronavirus</a></li><li class="D(ib) Mstart(21px) Mend(17px) Mstart(11px)--sm1024"><a href="https://news.yahoo.com/" class="C(#4d00ae) Fz(14px) Fw(b) Lh(2.1) Pos(r) Td(n) Td(u):h" data-ylk="elm:itm;elmt:pty;itc:0;rspns:nav;sec:nav;t1:a1;t2:hd;t3:tb;cpos:2;slk:News;t5:NEWS">News</a></li><li class="D(ib) Mstart(21px) Mend(17px) Mstart(11px)--sm1024"><a href="https://finance.yahoo.com/" class="C(#4d00ae) Fz(14px) Fw(b) Lh(2.1) Pos(r) Td(n) Td(u):h" data-ylk="elm:itm;elmt:pty;itc:0;rspns:nav;sec:nav;t1:a1;t2:hd;t3:tb;cpos:3;slk:Finance;t5:FINANCE">Finance</a></li><li class="D(ib) Mstart(21px) Mend(17px) Mstart(11px)--sm1024"><a href="https://sports.yahoo.com/" class="C(#4d00ae) Fz(14px) Fw(b) Lh(2.1) Pos(r) Td(n) Td(u):h" data-ylk="elm:itm;elmt:pty;itc:0;rspns:nav;sec:nav;t1:a1;t2:hd;t3:tb;cpos:4;slk:Sports;t5:SPORTS">Sports</a></li><li class="D(ib) Mstart(21px) Mend(17px) Mstart(11px)--sm1024"><a href="https://news.yahoo.com/politics/" class="C(#4d00ae) Fz(14px) Fw(b) Lh(2.1) Pos(r) Td(n) Td(u):h" data-ylk="elm:itm;elmt:pty;itc:0;rspns:nav;sec:nav;t1:a1;t2:hd;t3:tb;cpos:5;slk:Politics;t5:POLITICS">Politics</a></li><li class="D(ib) Mstart(21px) Mend(17px) Mstart(11px)--sm1024"><a href="https://www.yahoo.com/entertainment/" class="C(#4d00ae) Fz(14px) Fw(b) Lh(2.1) Pos(r) Td(n) Td(u):h" data-ylk="elm:itm;elmt:pty;itc:0;rspns:nav;sec:nav;t1:a1;t2:hd;t3:tb;cpos:6;slk:Entertainment;t5:ENTERTAINMENT">Entertainment</a></li><li class="D(ib) Mstart(21px) Mend(17px) Mstart(11px)--sm1024"><a href="https://www.yahoo.com/lifestyle/" class="C(#4d00ae) Fz(14px) Fw(b) Lh(2.1) Pos(r) Td(n) Td(u):h" data-ylk="elm:itm;elmt:pty;itc:0;rspns:nav;sec:nav;t1:a1;t2:hd;t3:tb;cpos:7;slk:Lifestyle;t5:LIFESTYLE">Lifestyle</a></li><li class="D(ib) Mstart(21px) Mend(17px) Mstart(11px)--sm1024"><a href="https://shopping.yahoo.com/" class="C(#4d00ae) Fz(14px) Fw(b) Lh(2.1) Pos(r) Td(n) Td(u):h" data-ylk="elm:itm;elmt:pty;itc:0;rspns:nav;sec:nav;t1:a1;t2:hd;t3:tb;cpos:8;slk:Shopping;t5:SHOPPING">Shopping</a></li><li class="D(ib) Mstart(21px) Mend(17px) Mstart(11px)--sm1024"><a href="https://subscriptions.yahoo.com/?ncid=mbr_ryhacqnav00000017" class="C(#4d00ae) Fz(14px) Fw(b) Lh(2.1) Pos(r) Td(n) Td(u):h" data-ylk="elm:itm;elmt:pty;itc:0;rspns:nav;sec:nav;t1:a1;t2:hd;t3:tb;cpos:9;slk:Subscriptions;t5:SUBSCRIPTIONS">Subscriptions</a></li><li class="D(ib) Mstart(21px) Mend(17px) Mstart(11px)--sm1024"><a href="https://www.yahoo.com/video/" class="C(#4d00ae) Fz(14px) Fw(b) Lh(2.1) Pos(r) Td(n) Td(u):h" data-ylk="elm:itm;elmt:pty;itc:0;rspns:nav;sec:nav;t1:a1;t2:hd;t3:tb;cpos:10;slk:My Channel;t5:MY_CHANNEL">My Channel</a></li><li class="D(ib) Mstart(21px) Mend(17px) Mstart(11px)--sm1024"><a href="https://www.yahoo.com/everything/" class="C(#4d00ae) Fz(14px) Fw(b) Lh(2.1) Pos(r) Td(n) Td(u):h" data-ylk="elm:itm;elmt:pty;itc:0;rspns:nav;sec:nav;t1:a1;t2:hd;t3:tb;cpos:11;slk:More...;t5:MORE">More...</a></li></ul><script>!function(){var a,o,l,d,i,t,c=0;function e(e){var s,n=o.documentElement,t=n.classList.contains(d);n.classList.contains(i)||((s=e.scrollY)<a&&t&&(n.classList.remove(d),n.classList.add(l)),!n.classList.contains(l)&&a<s&&(c<s&&!t?(n.classList.add(d),n.classList.add(l)):s<c&&t&&(n.classList.remove(d),n.classList.add(l))),c=s)}function s(){t.wafer&&t.wafer.on&&d&&i&&(document.getElementById("header-nav-bar-wrapper").addEventListener("transitionend",function(e){setTimeout(function(){document.documentElement.classList.remove(l)},200)}),t.wafer.on("scroll",e))}function n(e,s,n){t=e,o=s,l="header-anim",d=(n=n||{"collapseThreshold":44,"hideClass":"HideBottomBar","modalOpenClass":"modal-open"}).hideClass||"",i=n.modalOpenClass||"",a=n.collapseThreshold||0}"undefined"!=typeof module?(module.exports.defineGlobals=n,module.exports.handleScroll=e,module.exports.initScrollHandler=s):(n(window,document),t.addEventListener("load",s))}();</script></div><script>Array.prototype.forEach||(Array.prototype.forEach=function(t,e){var s,i;if(null==this)throw new TypeError(" this is null or not defined");var a=Object(this),n=a.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(1<arguments.length&&(s=e),i=0;i<n;){var o;i in a&&(o=a[i],t.call(s,o,i,a)),i++}}),Array.prototype.filter||(Array.prototype.filter=function(t){"use strict";if(null==this)throw new TypeError;var e=Object(this),s=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var i=[],a=2<=arguments.length?arguments[1]:void 0,n=0;n<s;n++)if(n in e){var o=e[n];t.call(a,o,n,e)&&i.push(o)}return i}),Array.prototype.map||(Array.prototype.map=function(t,e){var s,i,a;if(null==this)throw new TypeError(" this is null or not defined");var n=Object(this),o=n.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(1<arguments.length&&(s=e),i=new Array(o),a=0;a<o;){var r,c;a in n&&(r=n[a],c=t.call(s,r,a,n),i[a]=c),a++}return i}),String.prototype.includes||(String.prototype.includes=function(t,e){"use strict";return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)});var assistJS=function(h,u){var g=function(){if("Microsoft Internet Explorer"!==h.navigator.appName)return!1;var t=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(h.navigator.userAgent);return t&&t[1]&&parseFloat(t[1])}();function t(t,e){function s(){}var i;t.prototype=Object.create?Object.create(e.prototype):(i=e.prototype,s.prototype=i,new s),t.prototype.constructor=t}function r(t){return"function"==typeof t.trim?t.trim():t.replace(/^\s+|\s+$/gm,"")}function e(t){if(g&&g<9&&void 0!==t.createTextRange){var e=t.createTextRange();e.collapse(!1),e.select()}else"number"==typeof t.selectionStart&&(t.selectionStart=t.selectionEnd=t.value.length)}function a(t){"focus"in t&&t.focus()}function c(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\\\$&")}function s(){this.config={}}function i(){this.itemList=[],this.selectedItem=!1}function n(t){this.saView=t,this.currentStatus=!1,this.callBackIdx=0,this.cbTable={},this.triggered=!1}function o(t,e){this.saModel=t,this.saView=e}function l(){this.config={searchBoxId:"yschsp",clearButtonId:"sbq-clear",fr2:"sa-gp-search",saBase:"//search.yahoo.com/sugg/gossip/gossip-us-ura/",ylcParam:{_r:2,gprid:"",n_rslt:0,n_sugg:0,pos:0,pqstr:"",pqstrl:0},gossipParam:{l:1,bm:3,output:"sd1",appid:"search.yahoo.com",nresults:10},max:255,clrLog:{},boldTag:"<b>{s}</b>",annotation:{},cssClass:{container:"sa-sbx-container",trayContainer:"sa lowlight",tray:"sa-tray",traySub:"sa-tray sub-assist no-wrap",ul:"sa-tray-list-container",liHighlight:"list-item-hover",li:"",span:"",text:"",aria:"sa-aria-live-region",actionContainer:"sa-fd-actn-cont",relatedSearches:"related-title",trendingNow:"trending-title"},text:{relatedSearches:"Related Searches",trendingNow:"Trending Now",ariaShown:"new suggestions shown",ariaClosed:"Suggestion box closed"},customEvent:!1,suppressEmptyQuery:!1,enableAnnotation:!1,enableIpos:!0,subAssist:!0,subTrayDelta:5,trayPadding:12,debug:!1,objectName:"SA",anykey:!1,clearBeaconing:!1,enableYlc:!0,autofocus:!1,highlight:{pattern:"",exact:!1},minQueryLength:0,enableTabRender:!0}}return h.YAHOO=h.YAHOO||{},s.prototype={set:function(t,e,s){t.setAttribute(e,s)},get:function(t,e){return t.getAttribute(e)},merge:function t(e,s){for(var i in s)"object"==typeof s[i]&&"object"==typeof e[i]?t(e[i],s[i]):e[i]=s[i]},extend:t,buildUrl:function(t,e){var s=[];for(var i in e)e.hasOwnProperty(i)&&s.push(encodeURIComponent(i)+"="+encodeURIComponent(e[i]));return 0<s.length&&(t=t+(-1===t.indexOf("?")?"?":"&")+s.join("&")),t},stopPropagation:function(t){t.returnValue=!1,t.cancelBubble=!0,t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation()},setFocus:function(t){e(t),a(t)},cursorEnd:e,select:function(t,e,s){if(g&&g<9&&void 0!==t.createTextRange){var i=t.createTextRange();i.moveStart("character",e),i.moveEnd("character",s),i.select()}else t.selectionStart=e,t.selectionEnd=s,a(t)},htmlEncode:function(t){return t.replace(/[\u00A0-\u9999<>\&]/gim,function(t){return"&#"+t.charCodeAt(0)+";"})},ae:function(t,e,s,i){if(i=i||!1,t.addEventListener)t.addEventListener(e,s,i);else{if(!t.attachEvent)return!1;t.attachEvent("on"+e,s)}},de:function(t,e,s){if(t.removeEventListener)t.removeEventListener(e,s);else{if(!t.detachEvent)return!1;t.detachEvent("on"+e,s)}},ts:function(){return Math.round((new Date).getTime()/1e3)},bold:function(t,e,s,i){var a,n,o=(i.pattern?i.pattern:"")+"(&[^;\\s]*)?(%needles)";return(a=i.exact?[c(s)]:s.split(/[\s|,]+/).filter(function(t){return""!==t}).sort(function(t,e){return e.length-t.length}).map(function(t){return c(t)})).length?(o=o.replace("%needles",a.join("|")),e=e.replace(new RegExp(o,"gi"),(n=t,function(t,e,s){return e&&!/\s/.test(s)?t:n.replace(/\{s\}/g,s)}))):e},debug:function(t){this.config.debug&&h.console&&h.console.log&&h.console.log(t)}},t(i,s),i.prototype.init=function(t,e){var s=this;if(this.saModel=e,this.config=t,this.clearButton=this.clearButton||u.getElementById(this.config.clearButtonId),this.searchbox=this.searchbox||u.getElementById(this.config.searchBoxId),!this.searchbox)return!1;this.config.gossipParam.pq=this.searchbox.value;for(var i=this.searchbox;i&&!this.formTag;)i.tagName&&"form"===i.tagName.toLowerCase()&&(this.formTag=i),i=i.parentNode;return!!this.formTag&&(this.container=u.createElement("div"),this.container.className=this.config.cssClass.container,this.trayContainer=u.createElement("div"),this.trayContainer.className=this.config.cssClass.trayContainer,this.container.appendChild(this.trayContainer),this.searchbox.parentNode.insertBefore(this.container,this.searchbox.nextSibling),this.searchbox.setAttribute("role","combobox"),this.searchbox.setAttribute("aria-autocomplete","both"),this.ae(h,"load",function(){s.aria=u.createElement("div"),s.aria.className=s.config.cssClass.aria,s.set(s.aria,"aria-live","polite"),s.aria.style.position="absolute",s.aria.style.left="-9999px",u.body.appendChild(s.aria)}),!0)},i.prototype.getWidth=function(t,e){var s,i={p:t,t:this.config.boldTag.replace("{s}",this.htmlEncode(t)),idx:0},a=u.createElement("div");a.className=this.config.cssClass.container;var n=u.createElement("div");n.className=this.config.cssClass.trayContainer,a.appendChild(n);var o=u.createElement("div");o.className=this.config.cssClass.traySub,o.style.left="-9999px",n.appendChild(o);var r=u.createElement("ul");r.className=this.config.cssClass.ul,o.appendChild(r);var c=this.createItem(i);e&&((s=u.createElement("span")).innerHTML=e,c.suggestionSpan.appendChild(s)),r.appendChild(c.li),this.searchbox.parentNode.insertBefore(a,this.searchbox.nextSibling);var l=c.suggestionSpan.clientWidth+this.config.subTrayDelta;return a.outerHTML="",l},i.prototype.display=function(t){var e=t.data,i=t.sqpos,s=t.hiddenNeedle,c=this,a={};this.hide(),this.selectedItem=!1,this.tray=u.createElement("div"),this.set(this.tray,"type","normal"),this.tray.className=this.config.cssClass.tray,i&&this.config.subAssist&&(this.tray.className=this.config.cssClass.traySub,this.tray.style.left=this.getWidth(s)+"px"),this.ul=u.createElement("ul"),this.ul.className=this.config.cssClass.ul,this.set(this.ul,"role","listbox"),this.tray.appendChild(this.ul),this.itemList=[],this.config.ylcParam.n_sugg=c.saModel.ylc.n_sugg,e.forEach(function(r){var t;if(r.idx=c.itemList.length,4===r.m&&c.config.text.trendingNow&&!a.trending){var e=u.createElement("span");e.className=c.config.cssClass.trendingNow,e.innerHTML=c.config.text.trendingNow,c.ul.appendChild(e),a.trending=!0}var s=c.createItem(r);!i&&c.config.enableAnnotation&&r.m&&c.config.annotation[r.m]&&r.fd&&(t=c.getItemAnnotation(r,s.suggestionSpan))&&s.suggestionSpan.appendChild(t),c.ul.appendChild(s.li),c.itemList.push(s.li),c.ae(s.li,"mouseenter",function(t){c.resetHighlight(),s.li.className=c.config.cssClass.li+" "+c.config.cssClass.liHighlight,c.selectedItem=r.idx}),c.ae(s.li,"mouseleave",function(t){s.li.className=c.config.cssClass.li}),c.ae(s.li,"click",function(t){var e,s,i,a,n=c.searchbox.value,o=t.target||t.srcElement;c.saModel.ylc.pos=r.idx+1,c.saModel.ylc.pqstr=n,c.saModel.ylc.pqstrl=n.length,c.saModel.ylc.use_case="",c.formTag.fr2&&(c.formTag.fr2.value=c.config.fr2),c.searchbox.value=r.p,o.tagName&&"a"===o.tagName.toLowerCase()&&(c.searchbox.value=c.get(o,"data"),c.saModel.ylc.use_case=o.innerHTML),c.hide(),c.saModel.addYlc(c.saModel.clickTarget),c.config.customEvent?(c.saModel.addYlk(o),e=c.searchbox,s="assistSelection",i={data:r},"function"==typeof h.CustomEvent?(a=new h.CustomEvent(s,{detail:i}),e.dispatchEvent(a)):"function"==typeof u.createEvent?((a=u.createEvent("CustomEvent")).initCustomEvent(s,!1,!1,i),e.dispatchEvent(a)):(u.attachEvent,document.documentElement[s]=i)):c.suggestionClick(t,r)})}),this.aria&&(this.set(this.aria,"aria-expanded","true"),this.aria.innerHTML="<p>"+c.itemList.length+" "+this.config.text.ariaShown+"</p>"),this.show()},i.prototype.suggestionClick=function(t,e){this.formTag.submit()},i.prototype.show=function(){this.shown=!0,this.resetHighlight(),this.trayContainer.appendChild(this.tray)},i.prototype.hide=function(){this.aria&&(this.set(this.aria,"aria-expanded","false"),this.aria.innerHTML="<p>"+this.config.text.ariaClosed+"</p>"),this.shown=!1,this.resetHighlight(),this.trayContainer.innerHTML=""},i.prototype.resetHightlight=i.prototype.resetHighlight=function(){!1!==this.selectedItem&&this.itemList.length&&(this.itemList[this.selectedItem].className=this.config.cssClass.li)},i.prototype.tab=function(){if(!this.shown||!this.itemList.length)return!1;if(!1!==this.selectedItem)this.searchbox.value=this.get(this.itemList[this.selectedItem],"data"),this.saModel.fetch();else{if(this.searchbox.value===this.get(this.itemList[0],"data"))return this.saModel.unset(),!1;this.searchbox.value=this.get(this.itemList[0],"data"),this.saModel.fetch()}return!0},i.prototype.moveUpDown=function(t){return!(!this.shown||!this.itemList.length)&&(this.resetHighlight(),t?!1===this.selectedItem||this.selectedItem<=0?this.selectedItem=this.itemList.length-1:this.selectedItem--:!1===this.selectedItem||this.selectedItem>=this.itemList.length-1?this.selectedItem=0:this.selectedItem++,this.itemList[this.selectedItem].className=this.config.cssClass.li+" "+this.config.cssClass.liHighlight,this.searchbox.value=this.get(this.itemList[this.selectedItem],"data"),!0)},i.prototype.createItem=function(t){var e=u.createElement("li"),s=this;if(e.className=this.config.cssClass.li,this.set(e,"pos",t.idx),this.set(e,"role","option"),this.config.formatResult){var i=this.config.ylcVal;i&&(i=i.replace("cposV",t.idx),s.config.ylcParam&&(i=i.replace("t9Val",s.config.ylcParam.n_sugg)),this.set(e,"data-ylk",i)),this.set(e,"data-position",t.idx)}s.set(e,"data",t.p);var a=u.createElement("span");a.className=s.config.cssClass.span,a.style.display="block",e.appendChild(a);var n=u.createElement("span");return n.className=s.config.cssClass.text,n.innerHTML=t.t,a.appendChild(n),{li:e,suggestionSpan:a}},i.prototype.getItemAnnotation=function(t){var e,s,i,a=this.config.annotation[t.m]||{},n=this.config.cssClass,o=t.fd,r="",c="",l=this.searchbox.clientWidth-2*this.config.trayPadding;if(a.subtitle&&o.subtitle){if(c=a.subtitle.replace("{subtitle}",this.htmlEncode(o.subtitle)),!(this.getWidth(t.p,c)<l))return e;r+=c}if(a.actions&&o.actions&&o.actions.length){for(c="",i=0;i<o.actions.length;i++)if(s=o.actions[i],c&&a.actionsSeparator&&(c+=a.actionsSeparator),c+=a.actions.replace("{text}",this.htmlEncode(s.text)).replace("{res}",this.htmlEncode(s.res)),l<this.getWidth(t.p,r+'<span class="'+n.actionContainer+'">'+c+"</span>")){c="";break}c&&(r+='<span class="'+n.actionContainer+'">'+c+"</span>")}return r&&((e=u.createElement("span")).innerHTML=r),e},t(n,s),n.prototype.unset=function(){this.triggered=!1,this.saView.hide()},n.prototype.jsonp=function(t,e){var s={command:this.saView.searchbox.value,t_stmp:this.ts(),callback:"YAHOO."+this.config.objectName+".cb."+t};this.merge(s,this.config.gossipParam),e&&this.merge(s,e);var i=this.buildUrl(this.config.saBase,s),a=u.getElementsByTagName("head")[0],n=u.createElement("script");this.set(n,"type","text/javascript"),this.set(n,"src",i),a.appendChild(n),this.ae(n,"load",function(){a.removeChild(n)})},n.prototype.read=function(e){var s,i=this,a=[],n=e.sqpos,o=e.q=e.q||"",r="";e&&"object"==typeof e.r&&0<e.r.length?(i.config.subAssist&&n&&(o=e.q.substr(n),r=e.q.substr(0,n),e.r.forEach(function(t){i.saView.getWidth(t.k)>i.saView.searchbox.clientWidth&&(n=0,o=e.q,r="")})),e.r.forEach(function(t){s=i.config.subAssist&&n?t.k.substr(n):t.k,a.push({p:t.k,t:i.bold(i.config.boldTag,i.htmlEncode(s),i.htmlEncode(o),i.config.highlight),fd:t.fd,m:t.m})}),this.ylc.n_sugg=e.r.length,this.ylc.pos=0,this.saView.display({data:a,sqpos:n,hiddenNeedle:r})):(this.ylc.n_sugg=0,this.ylc.pos=0,this.saView.hide()),e&&e.l&&(this.ylc.gprid=e.l.gprid)},n.prototype.fetch=function(){var t,e=this.saView.searchbox,s=this,i=null,a=s.lastValue===s.saView.searchbox.value;if(s.config.suppressEmptyQuery&&""==r(e.value))return s.unset(),!0;if(s.saView.shown&&a)return!0;if(this.config.enableIpos&&!a&&void 0!==s.lastValue&&((t=this.getCursorPosition())===e.value.length&&(t=null),null!==t&&(i={ipos:t})),s.lastValue=s.saView.searchbox.value,this.config.minQueryLength&&this.saView.searchbox.value.length<this.config.minQueryLength)return this.unset(),!1;if(this.config.max&&this.saView.searchbox.value.length>this.config.max)return this.unset(),!0;this.triggered=!0,this.callBackIdx++;var n="sacb"+this.callBackIdx;for(var o in s.cbTable)s.cbTable.hasOwnProperty(o)&&(s.cbTable[o]=function(){});this.cbTable[n]=function(t){s.read(t||{}),s.cbTable[n]=function(){}},this.jsonp(n,i)},n.prototype.getCursorPosition=function(){var t,e=this.saView.searchbox,s=null;return"number"==typeof e.selectionStart?s=e.selectionStart:u.selection&&(e.focus(),(t=u.selection.createRange()).moveStart("character",-u.activeElement.value.length),s=t.text.length),s},n.prototype.addYlc=function(t){var e=encodeURIComponent(this.saView.searchbox.value);this.ylc.query=e,this.ylc.qstrl=e.length,this.ylc.t_stmp=this.ts(),this.config.enableYlc&&this.ULT?this.saView.formTag.action=this.ULT.y64_token("ylc",t,this.ylc):this.debug("YLC logging is disabled")},n.prototype.addYlk=function(t){var e=this,s=[];if(["gprid","query","pqstr"].forEach(function(t){e.ylc[t]&&s.push(t+":"+e.ylc[t])}),e.config.ylcVal=e.config.ylcVal+";"+s.join(";"),t){var i=e.get(t,"data-ylk")+";"+s.join(";");e.set(t,"data-ylk",i)}},n.prototype.init=function(t){return this.config=t,this.ULT=h.YAHOO.ULT,this.ULT||(this.debug("ULT library is missing. Disabling ylc logging"),this.config.enableYlc=!1),this.ylc={},this.merge(this.ylc,this.config.ylcParam),this.clickTarget=this.config.clkLink?this.config.clkLink:this.saView.formTag.action,this.submitTarget=this.saView.formTag.action,!0},t(o,s),o.prototype.init=function(t){var l=this;l.lastValue=null,this.config=t,this.config.autofocus&&this.setFocus(this.saView.searchbox),!g||9<=g?this.ae(this.saView.searchbox,"input",function(t){l.saModel.fetch()}):8===g&&this.ae(this.saView.searchbox,"propertychange",function(t){"value"===t.propertyName&&!1===l.saView.selectedItem&&l.saModel.fetch()}),l.config.anykey&&this.ae(u,"keydown",function(t){var e=u.activeElement;if(!e.tagName||"input"!==e.tagName.toLowerCase()&&"textarea"!==e.tagName.toLowerCase())return 27===t.keyCode&&!l.saView.shown&&l.saView.searchbox.value.length?(l.select(l.saView.searchbox,0,l.saView.searchbox.value.length),void l.stopPropagation(t)):void(t.keyCode<=40||t.ctrlKey||t.metaKey||(l.saView.searchbox.value=r(l.saView.searchbox.value),""!==l.saView.searchbox.value&&(l.saView.searchbox.value+=" "),l.saModel.triggered=!0,l.setFocus(l.saView.searchbox)))}),this.ae(this.saView.searchbox,"keydown",function(t){switch(t.keyCode){case 40:l.saView.moveUpDown(!1),l.stopPropagation(t);break;case 38:l.saView.moveUpDown(!0),l.stopPropagation(t);break;case 27:if(!l.saView.shown)return;return l.cursorEnd(l.saView.searchbox),l.saView.searchbox.blur(),l.saModel.unset(),l.saView.resetHighlight(),l.saView.selectedItem=!1,l.stopPropagation(t),!1;case 9:if(l.saView.searchbox.selectionEnd==l.saView.searchbox.value.length&&l.saView.searchbox.selectionStart==l.saView.searchbox.value.length){if(!l.config.enableTabRender)return l.saModel.unset(),!1;if(l.saView.tab())return l.stopPropagation(t),!1}else l.saView.searchbox.selectionEnd=l.saView.searchbox.selectionStart=l.saView.searchbox.value.length,l.stopPropagation(t);break;case 39:l.saView.searchbox.selectionEnd==l.saView.searchbox.value.length&&l.saView.searchbox.selectionStart==l.saView.searchbox.value.length&&l.saView.tab();break;default:l.saView.resetHighlight(),l.saView.selectedItem=!1}});function e(t){if(g&&g<=8&&u.selection){var e,s,i=l.saView.searchbox,a=i.value.replace(/\r\n/g,"\n"),n=u.selection.createRange(),o=i.value.length,r=i.createTextRange();r.moveToBookmark(n.getBookmark());var c=i.createTextRange();c.collapse(!1),-1<r.compareEndPoints("StartToEnd",c)?e=s=o:(e=-r.moveStart("character",-o),e+=a.slice(0,e).split("\n").length-1,-1<r.compareEndPoints("EndToEnd",c)?s=o:(s=-r.moveEnd("character",-o),s+=a.slice(0,s).split("\n").length-1)),i.selectionStart=e,i.selectionEnd=s}l.lastValue!==l.saView.searchbox.value&&!1===l.saView.selectedItem&&l.saModel.fetch()}this.ae(this.saView.searchbox,"focus",function(t){l.saModel.triggered||l.saModel.fetch(),g&&9===g&&!l.ie9_attached&&(l.ae(u,"selectionchange",e),l.ie9_attached=!0)}),this.ae(this.saView.searchbox,"blur",function(t){g&&9===g&&l.ie9_attached&&(l.de(u,"selectionchange",e),l.ie9_attached=!1)}),this.ae(this.saView.searchbox,"click",function(t){l.saModel.triggered||l.saModel.fetch()});function s(t){if(l.saView.shown){for(var e=t.target?t.target:t.srcElement;e;){if(e===l.saView.formTag)return;e=e.parentNode}l.config.touchOriented&&l.stopPropagation(t),l.saModel.unset()}}return"ontouchstart"in h?(this.config.touchOriented=!0,this.ae(u.body,"touchstart",s,!0)):this.ae(u,"click",s),this.ae(this.saView.formTag,"submit",function(t){l.saModel.addYlc(l.saModel.submitTarget)}),this.saView.clearButton&&this.ae(this.saView.clearButton,"click",function(t){if(l.saView.searchbox.value="",l.saModel.triggered=!1,l.setFocus(l.saView.searchbox),l.config.enableYlc&&l.config.clearBeaconing&&l.saModel.ULT){var e={_r:2,actn:"clk",pos:1,sec:"clearsearch",slk:"clear",t1:"hdr",t2:"searchbox",t3:"clear"};l.merge(e,l.config.clrLog),l.saModel.ULT.beacon_click(e)}}),!0},t(l,s),l.prototype.saModelClass=n,l.prototype.saViewClass=i,l.prototype.saControlClass=o,l.prototype.init=function(t){return!(g&&g<8)&&("object"==typeof t&&this.merge(this.config,t),this.saView=new this.saViewClass,this.saModel=new this.saModelClass(this.saView),this.saControl=new this.saControlClass(this.saModel,this.saView),this.cb=this.saModel.cbTable,this.config.customEvent&&8===g&&(u.documentElement.assistSelection=null),this.ready=this.saView.init(this.config,this.saModel)&&this.saModel.init(this.config)&&this.saControl.init(this.config),!!this.ready&&(h.YAHOO[this.config.objectName]=this,void(h.performance&&"function"==typeof h.performance.now&&(this.latency=h.performance.now()))))},l};"undefined"!=typeof module&&(module.exports={assistJS:assistJS}),"undefined"!=typeof window&&(window.YAHOO=window.YAHOO||{},window.YAHOO.SAClass=assistJS(window,document));var init=function(t){window.YAHOO&&window.YAHOO.SAClass&&(window.YAHOO.SA=new window.YAHOO.SAClass,window.YAHOO.SA.init(t))};!function(){var d,o,a,i="data-submit-only",c="data-assist-only",s="data-trending-only",r=/\S/,l="-m",u=".modal-open";function e(e){var t=this;t.config=e||{},t.perf={},t.searchForm=o.querySelector("#header-search-form"),t.searchButton=o.querySelector("#header-search-button"),t.desktopSearchBtn=o.querySelector("#header-desktop-search-button"),t.trendingFrcode=o.querySelector("input["+s+"]"),t.searchForm&&(t.searchInput=t.searchForm.querySelector("#header-search-input")),t.searchInput&&(t.restoreInitialState(),t.attachEventListeners(),t.beaconReadiness())}function t(){d.YAHOO&&d.YAHOO.SAClass&&(d.YAHOO.SA=new d.YAHOO.SAClass,d.YAHOO.SA.init(a),d.YAHOO.SA_ADAPTER=new e(a.adapterConfig))}function n(e,t,n){d=e,o=t,a=n||{"adapterConfig":{"bucket":["FPGEMINIDAS701","FPPERF003","MULTISIGNOUTBR01"],"focusOnButtonClick":true,"i13nForm":{"elm":"kb-ent","elmt":"srch","itc":"0","rspns":"nav","sec":"srch","slk":"srchweb","t1":"a1","t2":"hd","tar":"search.yahoo.com"},"i13nSuggestion":{"cpos":"cposV","elm":"itm","elmt":"srch","itc":"0","rspns":"nav","sec":"srch","slk":"srchast","t1":"a1","t2":"srch","t3":"tray","t9":"10","gprid":"","query":"","pqstr":"","tar":"search.yahoo.com"},"searchOpenClassName":"search-open"},"autofocus":true,"boldTag":"<b class=\"Fw(n)\">{s}</b>","clearButtonId":"header-clear-search","cssClass":{"container":"header-search-assist","li":"Bd(n) Lh(1.1) List(n) Pos(r) Ta(l)","liHighlight":"Bgc(#c6d7ff)","span":"C(#000) Ff(ss) Fz(18px) Fw(b) Mend(40px) Pb(5px) Pend(3px) Pstart(10px) Pt(5px) Wow(bw)","tray":"Bgc(#fff) Pos(a) Start(0) End(90px)","trayContainer":"","ul":"Bdc($c-fuji-grey-d) Bdts(n) Bds(s) Bdw(1px) M(0) P(0)"},"customEvent":true,"enableTabRender":false,"formatResult":true,"gossipParam":{"appid":"fp"},"highlight":{"exact":true,"pattern":"^"},"initializeImmediately":false,"minQueryLength":1,"saBase":"https://search.yahoo.com/sugg/gossip/gossip-us-ura/","searchBoxId":"header-search-input","subAssist":false,"ylcVal":"cpos:cposV;elm:itm;elmt:srch;itc:0;rspns:nav;sec:srch;slk:srchast;t1:a1;t2:srch;t3:tray;t9:10;gprid:;query:;pqstr:;tar:search.yahoo.com"}}e.prototype={attachEventListeners:function(){var t=this;t.searchInput.addEventListener("keypress",function(e){t.perf.key||(t.perf.key=Date.now()),13===e.keyCode&&(e.preventDefault(),t.handleFormSubmission.call(t,e))}),t.searchInput.addEventListener("click",function(e){t.perf.focusClick||(t.perf.focusClick=Date.now())}),t.desktopSearchBtn&&t.desktopSearchBtn.addEventListener("click",function(e){e.preventDefault(),t.handleFormSubmission.call(t,e)}),t.searchInput.addEventListener("assistSelection",function(e){t.handleAssistSelection.call(t,e)}),t.searchButton&&t.config.focusOnButtonClick&&t.searchButton.addEventListener("click",function(e){t.handleSearchOpen.call(t,e)})},beaconClick:function(e,t){e=e||{};function n(){try{a.sendBeacon("/p.gif?beaconType=srch&source="+e.slk+"&rapid="+o+"&darla="+i+"&fromNavigationStart="+a.getPerfAttrDiff("navigationStart",c)+"&fromDomLoading="+a.getPerfAttrDiff("domLoading",c)+"&fromDomLoaded="+a.getPerfAttrDiff("domContentLoadedEventStart",c)+"&fromDomComplete="+a.getPerfAttrDiff("domComplete",c)+"&fromReadyToFocusClick="+((a.perf.focusClick||s)-s)+"&fromReadyToKey="+((a.perf.key||s)-s)+"&fromReadyToSearch="+(c-s)+"&now="+c+"&assistReady="+s)}catch(e){a.sendBeacon("/p.gif?beaconType=srch-error&error="+e)}t&&t.apply(a,[].concat(Array.prototype.slice.call(arguments)))}var a=this,r=d.YAHOO&&d.YAHOO.i13n&&d.YAHOO.i13n.rapidInstance||d.rapidInstance,o=r?1:0,i=d._adLT&&1<d._adLT.length?1:0,c=Date.now(),s=a.perf.ready;r?r.beaconClick(e.sec,e.slk,e._p,e,null,n):n()},beaconReadiness:function(){var e=this;e.perf.ready=Date.now(),e.sendBeacon("/p.gif?beaconType=saready&timeFromNavigationStart="+e.getPerfAttrDiff("navigationStart",e.perf.ready)+"&timeFromDomLoading="+e.getPerfAttrDiff("domLoading",e.perf.ready))},getItemI13n:function(e,t){var n={};try{n=JSON.parse(JSON.stringify(this.config.i13nSuggestion||{}))}catch(e){}return n._p=e,n.cpos=e,n.pqstr=t.pqstr,n.query=t.query,n.gprid=t.gprid,n},getPerfAttrDiff:function(e,t){var n,a=d.performance||d.webkitPerformance||d.msPerformance||d.mozPerformance||d.Performance,r=0;return a&&a.timing&&(n=a.timing[e]),n&&t&&(r=t-n),r},handleAssistSelection:function(e){var t=this,n=t.searchForm.querySelector("input["+c+"]"),a={};t.toggleInputState(c,!1),t.toggleInputState(i,!0),o.querySelector(u)&&n&&(n.value=n.value+l),t.trendingFrcode&&d.YAHOO&&d.YAHOO.SA&&d.YAHOO.SA.saModel.ylc&&0===d.YAHOO.SA.saModel.ylc.pqstrl&&(t.toggleInputState(c,!0),t.toggleInputState(s,!1),o.querySelector(u)&&t.trendingFrcode.value&&(t.trendingFrcode.value=t.trendingFrcode.value+l));var r=(e.detail&&e.detail.data&&e.detail.data.idx||0)+1;d.YAHOO&&d.YAHOO.SA&&d.YAHOO.SA.saModel.ylc&&(a=d.YAHOO.SA.saModel.ylc),t.beaconClick(t.getItemI13n(r,a),t.submitForm)},handleFormSubmission:function(e){var t=this,n=t.searchForm.querySelector("input["+i+"]");o.querySelector(u)&&n&&(n.value=n.value+l),r.test(t.searchInput.value)&&t.beaconClick(t.config.i13nForm,t.submitForm)},handleSearchOpen:function(e){var t=this;t.searchInput.value="",t.config.searchOpenClassName&&o.body.className.indexOf(t.config.searchOpenClassName)<0&&(o.body.className+=" "+t.config.searchOpenClassName),t.searchInput.focus()},restoreInitialState:function(){var e=this;e.toggleInputState(c,!0),e.toggleInputState(s,!0),e.toggleInputState(i,!1)},sendBeacon:function(e){e&&(this.config.bucket&&(e+="&bucket="+this.config.bucket),d.navigator&&"function"==typeof d.navigator.sendBeacon&&window.navigator.sendBeacon(e)||((new Image).src=e))},submitForm:function(){this.searchForm.submit()},toggleInputState:function(e,t){var n,a=this.searchForm.querySelectorAll("input["+e+"]"),r="disabled";for(n=0;n<a.length;n++)t?a[n].setAttribute(r,""):a[n].removeAttribute(r)}},"undefined"!=typeof module?(module.exports.AssistJsAdapter=e,module.exports.defineGlobals=n,module.exports.initAssistJs=t):(n(window,document),a.initializeImmediately?t():o.addEventListener("DOMContentLoaded",t))}();</script><div><style>.yns-panel{overflow:hidden;font-size:14px}.yns-panel-loading{background:url(https://s.yimg.com/ok/u/assets/img/spinner-24x24-anim.gif) no-repeat center center;opacity:.5;z-index:1;min-height:58px}.yns-panel-padding-btm{padding-bottom:40px}.yns-hide{display:none}.yns-panel-footer-action{background-color:#fff;border-top:solid 1px #f1f1f5;padding:10px 0;text-align:center;position:absolute;left:0;right:0;bottom:0}.yns-navigate-center{color:#000;line-height:20px;text-decoration:none}.yns-navigate-center:focus,.yns-navigate-center:hover{color:#0078ff;line-height:20px;text-decoration:none}.yns-panel-header{padding:10px 0 10px 16px}.yns-panel-header-title{color:#26282a;font-weight:700;line-height:17px}.yns-panel-error{padding:20px 0;text-align:center}.yns-indicator{background-color:#188fff;width:11px;height:11px;border:solid 1.5px #fff;display:inline-block;border-radius:50%}.yns-promo-title{color:#000}.yns-promo{display:none}.display-push-promos .yns-promo{display:block}.yns-promo.yns-container .yns-content{padding-right:115px}.yns-promo.yns-container .yns-promo-ctr{background-color:#188fff;border-radius:2px;border:none;color:#fff;cursor:pointer;font-size:13px;height:35px;max-width:111px;min-width:96px}.yns-promo.yns-container .yns-promo-button{position:absolute;top:4px;right:4px}.yns-container.yns-empty{padding:72px 0;position:relative}.display-push-promos .yns-empty{border-top:solid 1px #f1f1f5}.yns-container.yns-empty:hover{background-color:#fff}.yns-empty .yns-content{position:absolute;padding:0;text-align:center;width:100%}</style><script>/* version: 1.1.1 */
window.NotificationClient = (function () {
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
var createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
/* global XMLHttpRequest */
/* Provides read, update and create operations */
var ERROR = 'Error';
var GET = 'GET';
var NotificationRequest = function () {
function NotificationRequest(config) {
classCallCheck(this, NotificationRequest);
this._config = config;
}
/**
* _getRequestUrl
* Parses the request url, appends any path, and generates the params
* @param {object} requestConfig - Configs for the request - Object required
* @return {string} request url
*/
createClass(NotificationRequest, [{
key: '_getRequestUrl',
value: function _getRequestUrl(requestConfig) {
// providing an override for request based URL udpate
var url = requestConfig.url || this._config.service.url;
if (!url) {
return;
}
var temp = url.split('?');
var urlParts = {
path: temp[0],
queryParams: temp[1] ? temp[1].split('&') : []
};
// determine existing matrix params
temp = urlParts.path.split(';');
urlParts.path = temp[0];
urlParts.matrixParams = temp.slice(1);
var queryParams = requestConfig.queryParams,
matrixParams = requestConfig.matrixParams;
// add additional matrix params
if (matrixParams) {
Object.keys(matrixParams).forEach(function (key) {
urlParts.matrixParams.push(encodeURIComponent(key) + '=' + encodeURIComponent(matrixParams[key] || ''));
});
}
// add additional query params
if (queryParams) {
Object.keys(queryParams).forEach(function (key) {
urlParts.queryParams.push(encodeURIComponent(key) + '=' + encodeURIComponent(queryParams[key] || ''));
});
}
// construct the final url
var requestUrl = urlParts.path;
if (urlParts.matrixParams.length) {
requestUrl += ';' + urlParts.matrixParams.join(';');
}
if (urlParts.queryParams.length) {
requestUrl += '?' + urlParts.queryParams.join('&');
}
return requestUrl;
}
/**
* _getRequestBody
* Stringifies the request body
* @param {object} body - The body object
* @return {string} stringified body
*/
}, {
key: '_getRequestBody',
value: function _getRequestBody(body) {
return body && JSON.stringify(body) || '';
}
/**
* _parseRequestResult
* Parses the api response
* @param {object} response - The response object
* @return {object} response
*/
}, {
key: '_parseRequestResult',
value: function _parseRequestResult(response) {
if (typeof response === 'string') {
try {
response = JSON.parse(response);
} catch (e) {
response = {};
}
}
response = response || {};
return {
css: response.css,
count: response.count,
markup: response.html,
newCount: response.newCount
};
}
/**
* read
* Makes the read call
* @param {object} requestConfig - The requestConfig object
* @param {Function} callback - The callback function
* @return {void}
*/
}, {
key: 'read',
value: function read(requestConfig, callback) {
this._attemptRequest(GET, requestConfig, callback);
}
/**
* update
* Makes the update call
* @param {object} requestConfig - The requestConfig object
* @param {Function} callback - The callback function
* @return {void}
*/
}, {
key: 'update',
value: function update(requestConfig, callback) {
this._attemptRequest('PUT', requestConfig, callback);
}
/**
* create
* Makes the create call
* @param {object} requestConfig - The requestConfig object
* @param {Function} callback - The callback function
* @return {void}
*/
}, {
key: 'create',
value: function create(requestConfig, callback) {
this._attemptRequest('POST', requestConfig, callback);
}
/**
* _attemptRequest
* Attempts the XHR call
* @param {string} method - GET or POST method
* @param {object} requestConfig - The requestConfig object
* @param {Function} callback - The callback function
* @return {void}
*/
}, {
key: '_attemptRequest',
value: function _attemptRequest(method, requestConfig, callback) {
var attemptCount = this._config.service.attemptCount;
if (!requestConfig) {
requestConfig = {};
}
var url = this._getRequestUrl(requestConfig);
var requestBody = this._getRequestBody(requestConfig.body);
var requestParams = {
body: requestBody,
method: method,
url: url
};
this._sendRequest(requestParams, attemptCount, callback);
}
/**
* _sendRequest
* Attempts the XHR for specified number of times in case of error
* @param {object} requestParams - The requestParams object
* @param {number} attemptCount - GET or POST method
* @param {Function} callback - The callback function
* @return {void}
*/
}, {
key: '_sendRequest',
value: function _sendRequest(requestParams, attemptCount, callback) {
var self = this;
requestParams = requestParams || {};
var serviceConfig = self._config.service;
var attemptDelay = serviceConfig.attemptDelay * 1000;
var _requestParams = requestParams,
url = _requestParams.url,
body = _requestParams.body;
var request = new XMLHttpRequest();
request.open(requestParams.method, url);
request.responseType = serviceConfig.responseType;
request.timeout = serviceConfig.timeout;
var handleRequestError = function handleRequestError() {
if (attemptCount > 0) {
attemptCount--;
setTimeout(function () {
self._sendRequest(requestParams, attemptCount, callback);
}, attemptDelay);
} else {
callback && callback(new Error(ERROR + ': ' + request.status + ' ' + request.statusText), null);
}
};
request.onload = function requestOnLoad() {
if (request.status === 200) {
var response = self._parseRequestResult(request.response || request.responseText);
callback && callback(null, response, requestParams);
} else {
handleRequestError();
}
};
request.onerror = handleRequestError;
// Make the appropriate call
if (requestParams.method === GET) {
request.send();
} else {
request.send(body);
}
}
}]);
return NotificationRequest;
}();
var SPACE = ' ';
/**
* addClass
* Adds class to given node, if not already added
* @param {object} node current DOM element
* @param {string} className - the class to be added
* @return {void}
*/
function addClass(node, className) {
if (node && !hasClass(node, className)) {
var desiredClasses = node.className + SPACE + className;
node.className = desiredClasses;
}
}
/**
* hasClass
* Checks if given node has specified className
* @param {object} node current DOM element
* @param {string} className - className
* @return {boolean} whether node has the specified class
*/
function hasClass(node, className) {
var classes = node && node.className && node.className.split(SPACE);
return !!classes && classes.indexOf(className) !== -1;
}
/**
* removeClass
* Removes class from given node
* @param {object} node current DOM element
* @param {string} className - className
* @return {void}
*/
function removeClass(node, className) {
if (!node) {
return;
}
var classes = node.className && node.className.split(SPACE);
if (!classes) {
return;
}
var index = classes.indexOf(className);
if (index >= 0) {
classes.splice(index, 1);
}
node.className = classes.join(SPACE);
}
/**
* objectAssign
* Updates existing and adds new keys - mutates the orig object (shallow)
* @param {object} orig Original object
* @param {object} updates Updated object
* @return {void}
*/
function objectAssign(orig, updates) {
if (!orig) {
return;
}
if (!updates) {
return orig;
}
for (var key in updates) {
if (updates.hasOwnProperty(key)) {
orig[key] = updates[key];
}
}
}
var NotificationStore = function () {
function NotificationStore(config, request) {
classCallCheck(this, NotificationStore);
var self = this;
self._config = config;
self._markup = '';
self._newCount;
self._count;
self._request = request;
}
/**
* _replaceAllNotifications
* Renews the notification array
* @param {array} response service reponse
* @return {void}
*/
createClass(NotificationStore, [{
key: '_replaceAllNotifications',
value: function _replaceAllNotifications(response) {
// since we refresh the panel everytime
this._markup = response.markup || '';
this._newCount = response.newCount && parseInt(response.newCount, 10) || 0;
this._count = response.count && parseInt(response.count, 10) || 0;
}
/**
* resetCount
* Reset the new count to 0
* @return {void}
*/
}, {
key: 'resetNewCount',
value: function resetNewCount() {
this._newCount = 0;
}
/**
* _requestNotifications
* Makes a request to the api, renews the notification store is data is returned
* @param {object} requestOverride - matrix params to over ride the reqeust
* @param {Function} callback - The callback function
* @return {void}
*/
}, {
key: '_requestNotifications',
value: function _requestNotifications(requestOverride, callback) {
var self = this;
var panelConfig = self._config.panel;
var matrixParams = {
count: panelConfig.maxCount,
imageTag: panelConfig.imageTag
};
if (!requestOverride) {
requestOverride = {};
}
objectAssign(matrixParams, requestOverride.matrixParams);
var requestConfig = {
matrixParams: matrixParams
};
var _updateStore = function _updateStore(err, response) {
if (!err && response) {
self._replaceAllNotifications(response);
}
response = response || {};
callback && callback(err, response);
};
self._request.read(requestConfig, _updateStore);
}
/**
* getNotifications
* Returns the specified number or batch size notifications, or less (for collapsed panel)
* @return {object} notification markup and count
*/
}, {
key: 'getNotifications',
value: function getNotifications() {
return {
count: this._count,
markup: this._markup,
newCount: this._newCount
};
}
/**
* fetchNotifications
* Makes the API call to get notification data
* @param {object} requestOverride - matrix params to over ride the reqeust
* @param {Function} callback - The callback function
* @return {void}
*/
}, {
key: 'fetchNotifications',
value: function fetchNotifications(requestOverride, callback) {
this._requestNotifications(requestOverride, callback);
}
}]);
return NotificationStore;
}();
var constants = {
panelLoading: 'yns-panel-loading',
panelNodeId: 'yns-panel',
panelNodeClass: 'yns-panel',
panelHideElement: 'yns-hide',
panelError: 'yns-panel-error',
panelPaddingBtm: 'yns-panel-padding-btm'
};
var panelTemplate = '<div class="yns-panel-header{hideHeaderClass}">' + '<span class="yns-panel-header-title">' + '{headerMsg}' + '</span>' + '</div>' + '<div class="yns-panel-data">' + '<ul class="yns-notifications {paddingClass}">' + '{promoMarkup}' + '{notifMarkup}' + '</ul>' + '</div>' + '<div class="yns-panel-footer-action {hideClass}">' + '<a class="yns-navigate-center" ' + 'href="{notifCenterLink}" ' + 'data-ylk="sec:hd;subsec:notifications-viewall;slk:{notificationCenterNavMsg};"' + '>' + '{notificationCenterNavMsg}' + '</a>' + '</div>';
var panelEmptyTemplate = '<li class="yns-container yns-empty">' + '<div class="yns-content">' + '{emptyPanelMsg}' + '</div>' + '</li>';
var panelErrorTemplate = '<div class="yns-panel-error">' + '<span> {errorMsg} </span>' + '</div>';
var panelParentTemplate = '<div class="yns-panel" id="yns-panel"></div>';
var notifOnboardPromoTemplate = '<li class="yns-container yns-promo">' + '<div class="yns-link">' + '<img class="yns-img" src="https://s.yimg.com/cv/apiv2/notifications/default-notif-img.png-168x168.png" />' + '<div class="yns-content">' + '<span class="yns-promo-title yns-title">' + '{notifOnboardMsg}' + '</span>' + '<span class="yns-promo-button">' + '<button class="yns-promo-ctr js-push-subscribe" ' + 'data-subscription-topic="{subscriptionTopic}" ' + 'data-ylk="sec:hd;subsec:notifications-promo;slk:Notify Me;" ' + 'data-subscription-ylk="sec:hd;subsec:notifications-promo;" ' + '>' + '{notifOnboardBtnLabel}' + '</button>' + '</span>' + '</div>' + '</div>' + '</li>';
/* global document, window */
var EXPANDED_PANEL = 'expanded_panel';
var ERROR_PANEL = 'error_panel';
var NotificationView = function () {
function NotificationView(config, store) {
classCallCheck(this, NotificationView);
var self = this;
self._config = config;
self._panelNode = null;
self._store = store;
}
/**
* _renderPanel
* Renders the notification panel
* @param {string} template - Notification panel template
* @param {object} panelData - Notification panel data
* @return {object} notification panel display markup
*/
createClass(NotificationView, [{
key: '_generatePanelMarkup',
value: function _generatePanelMarkup(template, panelData) {
var config = this._config;
var isNotifPermissionGranted = void 0;
var isClientPromoEligible = void 0;
if (typeof window !== 'undefined') {
isNotifPermissionGranted = window.Notification && window.Notification.permission === 'granted';
isClientPromoEligible = hasClass(document.body, config.promos.eligibleBodyClass);
}
var shouldShowNotifOnboardPromo = config.promos.enableNotifOnboard && !isNotifPermissionGranted && isClientPromoEligible;
var promoMarkup = shouldShowNotifOnboardPromo ? notifOnboardPromoTemplate : '';
if (promoMarkup) {
promoMarkup = promoMarkup.replace('{notifOnboardBtnLabel}', config.promos.notifOnboardBtnLabel).replace('{notifOnboardMsg}', config.promos.notifOnboardMsg).replace('{subscriptionTopic}', config.promos.subscriptionTopic);
}
var hasAdditionalNotifs = panelData.newCount > config.panel.maxCount;
var newCount = hasAdditionalNotifs ? panelData.newCount : '';
var notifCenterPath = config.panel.notificationCenterPath;
var notifCenterLinkClass = notifCenterPath ? '' : constants.panelHideElement;
var panelHeaderDisplayClass = config.panel.headerMsg ? '' : ' ' + constants.panelHideElement;
var paddingClass = notifCenterPath ? constants.panelPaddingBtm : '';
var notifMarkup = void 0;
if (panelData.count) {
notifMarkup = panelData.markup;
} else {
var panelEmptyMarkup = panelEmptyTemplate;
notifMarkup = panelEmptyMarkup.replace('{emptyPanelMsg}', config.panel.emptyPanelMsg);
}
template = template.replace('{notifMarkup}', notifMarkup).replace('{promoMarkup}', promoMarkup).replace('{hideClass}', notifCenterLinkClass).replace('{notifCenterLink}', notifCenterPath).replace('{paddingClass}', paddingClass).replace('{headerMsg}', config.panel.headerMsg).replace('{hideHeaderClass}', panelHeaderDisplayClass).replace(/{notificationCenterNavMsg}/g, config.panel.notificationCenterNavMsg).replace(/{newCount}/g, newCount);
return template;
}
/**
* render
* Renders the panel based on type - collapsed, expanded, toast
* @param {string} templateType - template type to be used
* @param {Function} callback - The callback function
* @return {void}
*/
}, {
key: 'render',
value: function render(templateType, callback) {
var self = this;
if (!self._panelNode) {
callback && callback(new Error('No panel parent'));
return;
}
var template = void 0;
var parent = self._panelNode;
var panelMarkup = void 0;
var panelData = void 0;
switch (templateType) {
case EXPANDED_PANEL:
template = panelTemplate || '';
panelData = self._store.getNotifications();
panelMarkup = self._generatePanelMarkup(template, panelData);
parent.innerHTML = panelMarkup;
break;
case ERROR_PANEL:
template = panelErrorTemplate || '';
panelMarkup = template.replace('{errorMsg}', self._config.panel.errorMsg);
parent.innerHTML = panelMarkup;
break;
default:
break;
}
callback && callback();
}
/**
* createPanelParentNode
* Create the panel DOM structure
* @param {object} panelParentNode - Panel's parent node - from consumer
* @return {void}
*/
}, {
key: 'createPanelParentNode',
value: function createPanelParentNode(panelParentNode) {
if (!panelParentNode) {
return;
}
panelParentNode.innerHTML = panelParentTemplate;
// Store the panel node
this._panelNode = document.getElementById(constants.panelNodeId);
}
/**
* updateBadgeNode
* Updates the badge node if needed
* @param {object} badgeNode badge HTML node
* @return {void}
*/
}, {
key: 'updateBadgeNode',
value: function updateBadgeNode(badgeNode) {
if (badgeNode) {
var _store$getNotificatio = this._store.getNotifications(),
newCount = _store$getNotificatio.newCount;
var maxBadgeCount = this._config.badge.maxCount;
if (newCount) {
var badgeCount = newCount > maxBadgeCount ? maxBadgeCount + '+' : newCount;
badgeNode.innerHTML = badgeCount;
} else {
badgeNode.innerHTML = '';
}
}
}
/**
* addStyles
* Add panel css returned by service to page once
* @param {object} styles css style blob
* @return {void}
*/
}, {
key: 'addStyles',
value: function addStyles(styles) {
if (styles) {
if (typeof window !== 'undefined') {
var styleTag = document.getElementById(this._config.panel.styleTagId);
if (!styleTag) {
styleTag = document.createElement('style');
styleTag.type = 'text/css';
styleTag.id = this._config.panel.styleTagId;
styleTag.innerText = styles;
document.head.appendChild(styleTag);
}
}
}
}
}]);
return NotificationView;
}();
/* global document */
/* Updates the notification store when needed
Controls the notification view */
var EXPANDED_PANEL$1 = 'expanded_panel';
var ERROR_PANEL$1 = 'error_panel';
var PanelController = function () {
function PanelController(config, store, view) {
classCallCheck(this, PanelController);
var self = this;
self._store = store;
self._view = view;
self._config = config;
var panelConfig = self._config.panel;
self._panelParentNode = document.querySelector(panelConfig.parentSelector);
self._badgeNode = self._config.badge.selector && document.querySelector(self._config.badge.selector);
self._indicatorNode = panelConfig.indicatorSelector && document.querySelector(panelConfig.indicatorSelector);
}
/**
* createPanelParentNode
* Creates the base node for panel
* @return {void}
*/
createClass(PanelController, [{
key: 'createPanelParentNode',
value: function createPanelParentNode() {
this._view.createPanelParentNode(this._panelParentNode);
this._notifPanelNode = document.getElementById(constants.panelNodeId);
}
/**
* refreshPanelNode
* Shows the expanded panel - fetches data from store, calls view to render, attached delegates
* @param {object} requestOverride - matrix params to over ride the reqeust
* @param {Function} callback - The callback function
* @return {void}
*/
}, {
key: 'refreshPanelNode',
value: function refreshPanelNode(requestOverride, callback) {
var self = this;
addClass(self._notifPanelNode, constants.panelLoading);
self._store.fetchNotifications(requestOverride, function handleExpandedFetch(err, response) {
if (err) {
if (!self._notifPanelNode.innerHTML) {
self._view.render(ERROR_PANEL$1);
addClass(self._notifPanelNode, constants.panelLoading);
}
} else {
self._view.render(EXPANDED_PANEL$1);
self._view.updateBadgeNode(self._badgeNode);
self._showBadge();
self._showIndicator();
self._view.addStyles(response.css);
}
removeClass(self._notifPanelNode, constants.panelLoading);
callback && callback(err, response);
});
}
/**
* resetBadge
* Reset the badge count
* @return {void}
*/
}, {
key: 'resetBadge',
value: function resetBadge() {
var self = this;
self._store.resetNewCount();
self._view.updateBadgeNode(self._badgeNode);
addClass(self._badgeNode, self._config.badge.hideClass);
}
/**
* _showIndicator
* Add class to indicator node
* @return {void}
*/
}, {
key: '_showIndicator',
value: function _showIndicator() {
if (!this._indicatorNode) {
return;
}
var _store$getNotificatio = this._store.getNotifications(),
newCount = _store$getNotificatio.newCount;
if (newCount) {
addClass(this._indicatorNode, this._config.panel.indicatorClass);
} else {
removeClass(this._indicatorNode, this._config.panel.indicatorClass);
}
}
/**
* _showBadge
* Show/hide the badge count
* @return {void}
*/
}, {
key: '_showBadge',
value: function _showBadge() {
var self = this;
var _self$_store$getNotif = self._store.getNotifications(),
newCount = _self$_store$getNotif.newCount;
if (newCount) {
removeClass(self._badgeNode, self._config.badge.hideClass);
} else {
addClass(self._badgeNode, self._config.badge.hideClass);
}
}
}]);
return PanelController;
}();
var config = {
promos: {
eligibleBodyClass: 'display-push-promos',
enableNotifOnboard: true,
notifOnboardBtnLabel: 'Notify Me',
notifOnboardMsg: 'Get Notifications for Your Favorite Topics',
subscriptionTopic: 'gondor_homerun_news'
},
badge: {
hideClass: '',
maxCount: 5,
selector: ''
},
panel: {
emptyPanelMsg: 'You have no new notifications.',
errorMsg: '',
headerMsg: 'Notifications',
imageTag: 'img:40x40|2|80',
indicatorClass: 'yns-indicator',
indicatorSelector: null,
maxCount: 6,
notificationCenterNavMsg: 'View all {newCount} notifications',
notificationCenterPath: '',
styleTagId: 'notificationStyles',
parentSelector: null // required
},
service: {
attemptCount: 2,
attemptDelay: 1,
url: null, // required
responseType: 'json',
timeout: 1500
}
};
var Main = function () {
function Main(config$$1) {
classCallCheck(this, Main);
var self = this;
self.config = self._parseConfig(config$$1);
var validConfigs = self._validateRequiredConfigs();
// silently return if required configs are missing
if (!validConfigs) {
return;
}
self._request = new NotificationRequest(self.config);
self._store = new NotificationStore(self.config, self._request);