b7b023927b038fc5a461fb8c3d157db2f41164a49b9a258232b40356803acb8f

Source Code:

(function(e){var d=window.AmazonUIPageJS||window.P,x=d._namespace||d.attributeErrors,t=x?x("AmazonGatewayHerotatorJS",""):d;t.guardFatal?t.guardFatal(e)(t,window):t.execute(function(){e(t,window)})})(function(e,d,x){e.when("generic-observable").register("gw-herotator-controller",function(e){var c=function(){};return function(d){function m(){g.notifyObservers("delayBegin")}function y(){g.notifyObservers("delayInterrupted")}function x(a){for(var b=0;b<l.length;b++)if(l[b]===a)return b+1}function n(a){a=
a||{};return{delay_complete:a.delay_complete||c,js_ready:a.js_ready||c,fg_loaded:a.fg_loaded||c,mouse_move:a.mouse_move||c,mouse_leave:a.mouse_leave||c,delay_interrupted_timeout:a.delay_interrupted_timeout||c,rotation_complete:a.rotation_complete||c,goto_card:function(a){a!==h&&b.user_navigation(l[a-1])},user_navigation:a.user_navigation||function(a){b=new B(a)},user_interaction:a.user_interaction||function(){b.user_navigation(l[h-1])},stop_autorotation:a.stop_autorotation||function(){b.user_navigation(l[h-
1])},pause:a.pause||c,resume:a.resume||c}}function r(){function a(){!f&&p[c]&&(b=1===z?new v:new H)}m();var c=l[(h-1+1)%z+1-1],f=!0;return new n({fg_loaded:function(b){b===c&&a()},delay_complete:function(){f=!1;a()},mouse_move:function(){b=new C},pause:function(){b=new q}})}function C(){y();return new n({mouse_move:y,mouse_leave:function(){b=new r},delay_interrupted_timeout:function(){b.mouse_leave()},pause:function(){b=new q(!0)}})}function q(a){y();return new n({mouse_move:function(){a=!0;y()},
mouse_leave:function(){a=!1},resume:function(){b=a?new C:0<k?new r:new v}})}function H(){g.notifyObservers("autorotating");h=(h-1+1)%z+1;g.notifyObservers("gotoCard",h);k--;return new n({rotation_complete:function(){b=0<k?new r:new v},mouse_move:function(){b=0<k?new I:new v},pause:function(){b=new F}})}function I(a){var c=!1;return new n({rotation_complete:function(){m();b=c?new q:new C},pause:function(){c=!0},resume:function(){c=!1}})}function F(){var a=!1;return new n({rotation_complete:function(){m();
b=new q(a)},mouse_move:function(){a=!0},mouse_leave:function(){a=!1}})}function B(a){g.notifyObservers("userNavigation");h=x(a);g.notifyObservers("gotoCard",h);return new n({rotation_complete:function(){b=new v},user_navigation:function(a){b=new D(a)},user_interaction:c})}function D(a){return new n({rotation_complete:function(){b=new B(a)},user_navigation:function(b){a=b},user_interaction:c})}function v(){g.notifyObservers("stopAutorotation");return new n({})}d=d||{};var g=new e,b=new function(){function a(){p[A]&&
d&&(g.notifyObservers("ready"),b=new r,e&&b.pause(),f&&b.stop_autorotation())}var d=!1,f=!1,e=!1;return new n({fg_loaded:function(b){b===A&&a()},js_ready:function(){d=!0;a()},user_navigation:c,stop_autorotation:function(){f=!0},pause:function(){e=!0},resume:function(){e=!1}})},l=d.fgIDs||[],z=l.length,A=l[0],h=d.card_num||1,p={},k=d.circular?Infinity:z;return{delayComplete:function(){b.delay_complete()},jsReady:function(){b.js_ready()},fgLoaded:function(a){p[a]=!0;A===a&&g.notifyObservers("atfLoaded");
b.fg_loaded(a)},mouseMove:function(){b.mouse_move()},mouseLeave:function(){b.mouse_leave()},delayInterruptedTimeout:function(){b.delay_interrupted_timeout()},rotationComplete:function(){b.rotation_complete()},gotoCard:function(a){b.goto_card(a)},userInteraction:function(){b.user_interaction()},userNavigation:function(a){b.user_navigation(a)},stopAutorotation:function(){b.stop_autorotation()},pause:function(){b.pause()},resume:function(){b.resume()},addObserver:g.addObserver,removeObserver:g.removeObserver}}});
"use strict";e.register("herotator",function(){return function(t,c){function u(a){return function(){e.when("gw-desktop-herotator/controller").execute(function(){f[a]()})}}function m(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)}function y(a,b){g[a]=[];var c=b.length;if(0<c)for(var d=0;d<c;d++)(function(c){var d=new Image;d.onload=function(){g[a].splice(I(g[a],d),1);g[a]&&0===g[a].length&&e.when("gw-desktop-herotator/controller").execute(function(){var b=document.getElementById("gw-ftGr-"+
a),c=b.className,c=c.replace(/\s*\ba\-lazy\-loaded\b\s*/,"");b.className=c;f.fgLoaded(a)})};g[a].push(d);d.src=b[c].src})(d);else e.when("gw-desktop-herotator/controller").execute(function(){f.fgLoaded(a)})}function x(){v=Date.now();d.uet&&d.uet("cf","hero-first-image",{wb:1});d.uex&&d.uex("ld","hero-first-image",{wb:1})}function n(){z||q()}function r(){h=h?Math.min(h,Date.now()):Date.now();clearTimeout(B.timeout_id);clearTimeout(r.timeout_id);r.timeout_id=setTimeout(function(){r.timeout_id=0;f.delayInterruptedTimeout()},
3E3)}function C(){z=!0}function q(){q.sent||(clearTimeout(q.timeout),q.timeout=setTimeout(function(){H(t.uri,t.data);q.sent=!0},2E3))}function H(a,b){e.when("A").execute(function(c){c.$.ajax(a,{async:!1,cache:!1,type:"post",data:b})})}function I(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;c<a.length;c++)if(a[c]===b)return c}function F(a){"object"===typeof d.ue&&"function"===typeof d.ue.count&&d.ue.count(a,(d.ue.count(a)||0)+1)}function B(a){A<h&&(l-=h-A,h=0);A=Date.now();B.timeout_id=setTimeout(function(){l=
b;f.delayComplete()},l)}function D(a,b){D.current_card!==b&&(D.current_card=b,p.gotoPage(b),E.notifyObservers("page_changed"));setTimeout(function(){f.rotationComplete()},250)}var v=Date.now(),g={},b=5E3,l=b,z=!1,A=0,h=0,p,k,a=document.getElementById("gw-desktop-herotator").getElementsByTagName("ol")[0],E,f;m(a,"click",u("userInteraction"));m(a,"mouseenter",u("mouseMove"));m(a,"mousemove",u("mouseMove"));m(a,"mouseleave",u("mouseLeave"));m(a,"touchstart",u("userInteraction"));m(a,"touchmove",u("userInteraction"));
m(a,"touchend",u("userInteraction"));m(a,"touchcancel",u("userInteraction"));for(var a=document.getElementById("gw-desktop-herotator").getElementsByTagName("li")[0],w=0,G=a.childNodes[w];G&&"div"!==String(G.nodeName).toLowerCase();)w++,G=a.childNodes[w];w=G;a=String(w.id).replace(/^gw-ftGr-/,"");w=w.getElementsByTagName("img");y(a,w||[]);for(var J=[a],a=0;c[a];)J.push(c[a].fgID),a++;e.when("gw-herotator-controller").execute(function(a){f=new a({fgIDs:J});f.addObserver("atfLoaded",x);f.addObserver("delayBegin",
B);f.addObserver("delayInterrupted",r);f.addObserver("gotoCard",D);f.addObserver("userNavigation",n);f.addObserver("stopAutorotation",C);f.addObserver("ready",function(){var a=Date.now()-v;l=Math.max(b-a,1);"use strict";e.register("herotator-controls",function(){function a(){c.show();k(".a-carousel-left").css("z-index",10);k(".a-carousel-right").css("z-index",10)}function b(){c.hide()}var c=k(".a-carousel-rounded-buttons .a-carousel-left,.a-carousel-rounded-buttons .a-carousel-right");k(".a-carousel-rounded-buttons .a-carousel-left").attr("cel_widget_id",
"gw-desktop-hero-left-cel");k(".a-carousel-rounded-buttons .a-carousel-right").attr("cel_widget_id","gw-desktop-hero-right-cel");k(".a-carousel-rounded-buttons .a-carousel-left").addClass("celwidget");k(".a-carousel-rounded-buttons .a-carousel-right").addClass("celwidget");k(".a-carousel-rounded-buttons .a-carousel-left").click(function(a){F("gw-desktop-hero-left")});k(".a-carousel-rounded-buttons .a-carousel-right").click(function(a){F("gw-desktop-hero-right")});var e=k("#gw-desktop-herotator");
e.addClass("gw-desktop-herotator-ready");1<e.find(".a-carousel-card").length?(a(),d.GWI&&d.GWI.recordLatency("gwHerotatorActive")):b();return{activePage:function(a){},show:a,hide:b}});k("#gw-desktop-herotator").addClass("gw-desktop-herotator-ready")});e.register("gw-desktop-herotator/controller");e.when("generic-observable").register("gw-desktop-herotator",function(a){E=new a;return{getAutorotationDelay:function(){return b},setAutorotationDelay:function(a){a=parseInt(a,10);l=a-(b-l);b=a},stopAutorotation:function(){f.stopAutorotation()},
disableNavigation:function(){e.now("herotator-controls").execute(function(a){a.hide()});p.pause()},enableNavigation:function(){e.now("herotator-controls").execute(function(a){a.show()});p.resume()},pause:function(){f.pause()},resume:function(){f.resume()},addObserver:E.addObserver,removeObserver:E.removeObserver}})});e.when("A","a-carousel-framework","gwAjax").execute(function(a,b,g){function h(){var a=0;for(d.GWI&&d.GWI.recordLatency("gw-hero-btf-populate");c[a];){var b=c[a].fgID,e=c[a].content,
f=document.getElementById("gw-ftGr-"+b);k(f).html(e);e=f.getElementsByTagName("img");y(b,e);a++}}k=a.$;b.onInit("gateway-desktop-layout.herotator",function(){var d=a.$("#gw-desktop-herotator \x3e .a-carousel-container");p=b.getCarousel(d);p.onChange("pageNumber",function(){var a=p.getAttr("pageNumber");f.gotoCard(a);a-=2;c[a]&&c[a].callbackUrl&&(g(c[a].callbackUrl,{type:"POST",id:"desktop-herotator-btf-"+c[a].fgID}),delete c[a].callbackUrl)});e.when("herotator-controls").execute(function(a){p.onChange("pageNumber",
function(){var b=p.getAttr("pageNumber");a.activePage(b)})});h();e.when("gw-desktop-herotator").register("gw-desktop-herotator/dom-ready");e.when("gw-desktop-herotator/controller","gw-desktop-herotator").execute(function(){f.jsReady()})})})}})});