1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[294],{1466:function(e,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.HeroCanvasCarouselClient=void 0;var r,o=d(t(2265)),i=(r=t(9772))&&r.__esModule?r:{default:r},a=t(4547),u=t(5472),c=t(2736),l=t(5706),s=t(7437);function d(e,n){if("function"==typeof WeakMap)var t=new WeakMap,r=new WeakMap;return(d=function(e,n){if(!n&&e&&e.__esModule)return e;var o,i,a={__proto__:null,default:e};if(null===e||"object"!=w(e)&&"function"!=typeof e)return a;if(o=n?r:t){if(o.has(e))return o.get(e);o.set(e,a)}for(var u in e)"default"!==u&&({}).hasOwnProperty.call(e,u)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,u))&&(i.get||i.set)?o(a,u,i):a[u]=e[u]);return a})(e,n)}function f(e){return function(e){if(Array.isArray(e))return I(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||S(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=S(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(u)throw i}}}}function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function m(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach(function(n){var r,o;r=n,o=t[n],(r=function(e){var n=function(e,n){if("object"!=w(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!=w(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==w(n)?n:n+""}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function h(){var e,n,t="function"==typeof Symbol?Symbol:{},r=t.iterator||"@@iterator",o=t.toStringTag||"@@toStringTag";function i(t,r,o,i){var c=Object.create((r&&r.prototype instanceof u?r:u).prototype);return g(c,"_invoke",function(t,r,o){var i,u,c,l=0,s=o||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(n,t){return i=n,u=0,c=e,f.n=t,a}};function v(t,r){for(u=t,c=r,n=0;!d&&l&&!o&&n<s.length;n++){var o,i=s[n],v=f.p,p=i[2];t>3?(o=p===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=v&&((o=t<2&&v<i[1])?(u=0,f.v=r,f.n=i[1]):v<p&&(o=t<3||i[0]>r||r>p)&&(i[4]=t,i[5]=r,f.n=p,u=0))}if(o||t>1)return a;throw d=!0,r}return function(o,s,p){if(l>1)throw TypeError("Generator is already running");for(d&&1===s&&v(s,p),u=s,c=p;(n=u<2?e:c)||!d;){i||(u?u<3?(u>1&&(f.n=-1),v(u,c)):f.n=c:f.v=c);try{if(l=2,i){if(u||(o="next"),n=i[o]){if(!(n=n.call(i,c)))throw TypeError("iterator result is not an object");if(!n.done)return n;c=n.value,u<2&&(u=0)}else 1===u&&(n=i.return)&&n.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((n=(d=f.n<0)?c:t.call(r,f))!==a)break}catch(n){i=e,u=1,c=n}finally{l=1}}return{value:n,done:d}}}(t,o,i),!0),c}var a={};function u(){}function c(){}function l(){}n=Object.getPrototypeOf;var s=[][r]?n(n([][r]())):(g(n={},r,function(){return this}),n),d=l.prototype=u.prototype=Object.create(s);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,g(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return c.prototype=l,g(d,"constructor",l),g(l,"constructor",c),c.displayName="GeneratorFunction",g(l,o,"GeneratorFunction"),g(d),g(d,o,"Generator"),g(d,r,function(){return this}),g(d,"toString",function(){return"[object Generator]"}),(h=function(){return{w:i,m:f}})()}function g(e,n,t,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(g=function(e,n,t,r){function i(n,t){g(e,n,function(e){return this._invoke(n,t,e)})}n?o?o(e,n,{value:t,enumerable:!r,configurable:!r,writable:!r}):e[n]=t:(i("next",0),i("throw",1),i("return",2))})(e,n,t,r)}function y(e,n,t,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void t(e)}u.done?n(c):Promise.resolve(c).then(r,o)}function b(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var i=e.apply(n,t);function a(e){y(i,r,o,a,u,"next",e)}function u(e){y(i,r,o,a,u,"throw",e)}a(void 0)})}}function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;c=!1}else for(;
1!(c=(r=i.call(t)).done)&&(u.push(r.value),u.length!==n);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,n)||S(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,n){if(e){if("string"==typeof e)return I(e,n);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?I(e,n):void 0}}function I(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var k=n.HeroCanvasCarouselClient=function(e){var n=e.items,t=e.banner,r=e.loading,d=void 0!==r&&r,p=e.error,g=e.shimmerCount,y=e.autoplay,S=void 0===y||y,I=e.autoplaySpeed,k=void 0===I?5e3:I,A=e.showDots,E=e.showArrows,C=e.loop,M=e.ariaLabel,x=e.onSlideChange,T=e.onCarouselInit,j="".concat(t||"").trim().toLowerCase()||"safeway",P="".concat(j,"/home/*/*.*"),R=["topc2","topc3","topc5"];function G(){return"".concat(Math.floor(1e4+9e4*Math.random()))}var O=(0,o.useRef)(null),N=(0,o.useRef)(null),H=_((0,o.useState)(function(){var e,n;return e=new Set,n={},R.forEach(function(t){for(var r=G();e.has(r);)r=G();e.add(r),n[t]=r}),n}),2),q=H[0];H[1];var L=(0,o.useRef)(!1),F=(0,o.useRef)(!1),W=(0,o.useRef)(!1),B=(0,o.useRef)(new Set),D=(0,o.useRef)(!1),V=(0,o.useRef)(!1),z=(0,o.useRef)(!1),X=(0,o.useRef)(0),$=(0,o.useRef)(null);(0,o.useRef)(!0);var Y=(0,o.useRef)(new Set),U=(0,o.useRef)({}),J=(0,o.useRef)(!1),K=(0,o.useRef)(new Set),Q=(0,o.useRef)({}),Z=(0,o.useRef)({}),ee=(0,o.useRef)(new Set),en=(0,o.useRef)(0),et=(0,o.useRef)(function(){}),er=(0,o.useRef)(!1),eo=(0,o.useRef)(null),ei=(0,o.useRef)(function(){return -1}),ea=(0,o.useRef)(function(){return!1});function eu(e,n){if(n){console.warn("[HeroCanvas][GAM][debug] ".concat(e),n);return}console.warn("[HeroCanvas][GAM][debug] ".concat(e))}var ec=_((0,o.useState)([]),2),el=ec[0],es=ec[1],ed=_((0,o.useState)([]),2),ef=ed[0],ev=ed[1],ep=_((0,o.useState)([]),2),em=ep[0],eh=ep[1],eg=_((0,o.useState)(!1),2),ey=eg[0],eb=eg[1],ew=_((0,o.useState)(!0),2),e_=ew[0],eS=ew[1],eI=o.default.useMemo(function(){return function(e){if(!e)return[];if("object"===w(e)&&!Array.isArray(e)&&"containerItems"in e)return(e.containerItems||[]).map(function(e,n){return(0,a.transformHeroCanvasItem)(e,n)});if(Array.isArray(e)){if(0===e.length)return[];var n=e[0];return n&&(n.itemName||"collections"===n.type||n.collectionsImage)?e.map(function(e,n){return(0,a.transformHeroCanvasItem)(e,n)}):e}return[]}(n)},[n]),ek=_((0,o.useState)(eI),2),eA=ek[0],eE=ek[1];(0,o.useEffect)(function(){eE(eI),L.current=!1,W.current=!1,B.current.clear(),D.current=!1,V.current=!1,z.current=!1,X.current=0,$.current&&(clearTimeout($.current),$.current=null),Object.values(U.current).forEach(function(e){clearTimeout(e)}),Object.values(Q.current).forEach(function(e){clearTimeout(e)}),Object.values(Z.current).forEach(function(e){clearTimeout(e)}),U.current={},Q.current={},Z.current={},ee.current.clear(),Y.current.clear(),es([]),ev([]),eh([]),eb(!1),eS(!0)},[eI]),(0,o.useEffect)(function(){if(ey&&0==el.length){L.current=!0,W.current=!0;return}},[el,ey]),(0,o.useEffect)(function(){if(ey){if(0===el.length){eS(!0);return}var e=new Set(el);ev(function(e){var n=new Set(e);return el.forEach(function(e){return n.add(e)}),Array.from(n).sort(function(e,n){return e-n})}),requestAnimationFrame(function(){e.forEach(function(e){document.querySelectorAll('[data-slide-index="'.concat(e,'"]')).forEach(function(e){e.setAttribute("data-gam-hidden","true"),e.setAttribute("aria-hidden","true");var n=e.closest(".slick-slide");n&&(n.style.visibility="hidden",n.style.pointerEvents="none")})})}),es([]),eS(!0)}},[el,eI,ey]);var eC=o.default.useMemo(function(){var e;return e=new Set,eA.map(function(n,t){if("sponsored-GAM"===n.bannerType){var r="".concat(n.pos||"topc2").toLowerCase(),o=q["topc2"===r||"topc3"===r||"topc5"===r?r:"topc2"];(!o||e.has(o))&&(o=function(e){for(var n="".concat(Math.floor(1e4+9e4*Math.random()));e.has(n);)n="".concat(Math.floor(1e4+9e4*Math.random()));return n}(e)),e.add(o);var i=n.pos||"topc2";return m(m({},n),{},{gamProps:m({id:"gamSection_".concat(o),"data-gamid":o,role:"presentation","data-fluid":void 0!==n.fluid?n.fluid:"true","data-runtimecontext":void 0!==n.rc?n.rc:"","data-bannerposition":i,"data-taxonomyid":void 0!==n.txpath?n.txpath:"","data-aisleid":"1_","data-insidecarousel":void 0!==n.insideCarousel?n.insideCarousel:"true","data-lastsponsoredbannerincarousel":void 0!==n.lastSponsoredBannerInCarousel?n.lastSponsoredBannerInCarousel:"false","data-gamfeatureflagvalue":void 0!==n.gamFeatureFlagValue?n.gamFeatureFlagValue:"true","data-adunitpath":P,"data-gamnetworkcode":"prod:22389494054,
1nonprod:22825627079","data-pageid":"home","data-isrestrictedpage":"false","data-restrictedsearchtermlist":"null","data-spapage":"false","data-bannervariation":"HeroBanner"},n.gamProps||{}),gamContainerProps:m({id:"gamcontainer_".concat(o),className:"ab-lazy-function","data-lazy-function":"lazyAdXContent_".concat(o)},n.gamContainerProps||{})})}return n})},[eA,q]),eM=_((0,o.useState)(eC),2),ex=eM[0],eT=eM[1];(0,o.useEffect)(function(){eT(eC)},[eC]),(0,o.useEffect)(function(){if(V.current&&!d&&!e_){var e,n=!1;return(e=b(h().m(function e(){return h().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,new Promise(function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})});case 1:return e.n=2,new Promise(function(e){return setTimeout(e,120)});case 2:n||eS(!0);case 3:return e.a(2)}},e)})),function(){return e.apply(this,arguments)})(),function(){n=!0}}},[ex,d,e_]);var ej=_((0,o.useState)(0),2),eP=ej[0],eR=ej[1],eG=_((0,o.useState)(!0),2),eO=eG[0],eN=eG[1],eH=(0,o.useCallback)(function(){var e=O.current;e&&e.slickPause(),eN(!1)},[]),eq=(0,o.useRef)(1),eL=(0,o.useRef)(!1),eF=o.default.useMemo(function(){return ex.map(function(e){return{slide:e,isSponsoredGAM:"sponsored-GAM"===e.bannerType,isValid:"sponsored-GAM"===e.bannerType||(0,l.filterValidSlides)([e]).length>0}})},[ex]),eW=o.default.useMemo(function(){return new Set(em)},[em]),eB=o.default.useMemo(function(){return eF.filter(function(e){var n,t=e.slide,r=e.isSponsoredGAM;if(!e.isValid)return!1;if(!r)return!0;var o=null===(n=t.gamContainerProps)||void 0===n?void 0:n.id;return!o||!eW.has(o)}).map(function(e){return e.slide})},[eF,eW]),eD=o.default.useMemo(function(){return eF.filter(function(e){return!e.isSponsoredGAM&&e.isValid}).map(function(e){return e.slide})},[eF]),eV=o.default.useMemo(function(){return eB.length},[eB]),ez=o.default.useMemo(function(){return"visible-".concat(ex.length)},[ex.length]);(0,o.useEffect)(function(){if(0===eV){0!==eP&&eR(0);return}eP>=eV&&eR(eV-1)},[eP,eV]);var eX=d||void 0!==p&&p||0===eD.length,e$=(0,o.useCallback)(function(e){var n,t=eF[e];if(!t||!t.isValid)return!0;if(!t.isSponsoredGAM)return!1;var r=null===(n=t.slide)||void 0===n||null===(n=n.gamContainerProps)||void 0===n?void 0:n.id;return!!r&&eW.has(r)},[eF,eW]),eY=(0,o.useCallback)(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=eF.length;if(0===t)return -1;for(var r=1;r<=t;r++){var o=((e+r*n)%t+t)%t;if(!e$(o))return o}return -1},[eF.length,e$]);ei.current=eY,ea.current=e$;var eU=(0,o.useCallback)(function(e){for(var n=0,t=0;t<e&&t<eF.length;t++)!e$(t)&&n++;return n},[eF.length,e$]),eJ=(0,o.useCallback)(function(e){var n=eF.length;return n<=0?e:(e%n+n)%n},[eF.length]),eK=(0,o.useCallback)(function(e){en.current=e;var n=eU(e);eR(function(e){return e!==n?n:e})},[eU]);et.current=eK;var eQ=(0,o.useCallback)(function(e){en.current=e;var n=e$(e),t=eq.current;if(n){var r=eY(e,t);r>=0&&r!==e&&!eL.current&&(eL.current=!0,setTimeout(function(){var e;eL.current=!1,null===(e=O.current)||void 0===e||null===(e=e.innerSlider)||void 0===e||e.slickGoTo(r,!0)},0));return}var o=eU(e);eR(o),null==x||x(o);var i=eB[o];if(i){var a,u=(0,l.getSlideTrackingData)(i,o,eV);"undefined"!=typeof window&&null!==(a=window.AB)&&void 0!==a&&null!==(a=a.DATALAYER)&&void 0!==a&&a.trackHeroCanvasView&&window.AB.DATALAYER.trackHeroCanvasView(u)}},[eB,eV,x,e$,eY,eU]);(0,o.useEffect)(function(){if(0!==em.length&&e$(en.current)){var e,n=eY(en.current,1);n>=0&&(null===(e=O.current)||void 0===e||null===(e=e.innerSlider)||void 0===e||e.slickGoTo(n,!0))}},[em,e$,eY]),(0,o.useEffect)(function(){var e,n=null===(e=O.current)||void 0===e?void 0:e.innerSlider;if(n&&0!==em.length){n.__origSlideHandler||(n.__origSlideHandler=n.slideHandler);var t=n.__origSlideHandler;return n.slideHandler=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=null!==(a=null===(u=n.state)||void 0===u?void 0:u.slideCount)&&void 0!==a?a:0;if(o>0){var i=(e%o+o)%o;if(ea.current(i)){var a,u,c,l,s=null!==(c=null===(l=n.state)||void 0===l?void 0:l.currentSlide)&&void 0!==c?c:0,d=ei.current(i,e>=s?1:-1);if(d>=0&&d!==i){var f=d;return e>=o?f=o+d:e<0&&(f=d-o),t.call(n,f,r)}}}return t.call(n,e,r)},function(){n.__origSlideHandler&&(n.slideHandler=n.__origSlideHandler,delete n.__origSlideHandler)}}},[em]),(0,o.useEffect)(function(){var e,n=null===(e=O.current)||void 0===e?void 0:e.innerSlider;if(n&&0!==em.length){n.__origSwipeStart||(n.__origSwipeStart=n.swipeStart),n.__origSwipeMove||(n.__origSwipeMove=n.swipeMove),n.__origSwipeEnd||(n.__origSwipeEnd=n.swipeEnd);var t=n.__origSwipeStart,r=n.__origSwipeMove,o=n.__origSwipeEnd,i=!1,a=1,u=0;return n.swipeStart=function(e){return i=!1,u=0,t.call(n,e)},n.swipeMove=function(e){var t,o,c,l,s,d,f=null===(t=n.state)||void 0===t?void 0:t.touchObject;if(!(null!=f&&f.startX)||null==(d=void 0!==e.touches&&e.touches.length>0?e.touches[0].pageX:e.clientX))return r.call(n,e);var v=d-f.startX;if(u=v,5>Math.abs(v))return r.call(n,e);var p=v<0?1:-1,m=null!==(o=null===(c=n.state)||void 0===c?void 0:c.currentSlide)&&void 0!==o?o:0,h=null!==(l=null===(s=n.state)||void 0===s?void 0:s.slideCount)&&void 0!==l?l:0;if(h<=0)return r.call(n,e);if(ea.current(((m+p)%h+h)%h)){i=!0,a=p;return}return i=!1,r.call(n,e)},n.swipeEnd=function(e){if(!i)return o.call(n,e);var t,r,c,l,s,d,f,v,p,m,h=a;i=!1;var g=null!==(t=null===(r=n.state)||void 0===r?void 0:r.currentSlide)&&void 0!==t?t:0,y=null!==(c=null===(l=n.state)||void 0===l?void 0:l.slideCount)&&void 0!==c?c:0,b=null!==(s=null!==(d=null===(f=n.list)||void 0===f?void 0:f.offsetWidth)&&void 0!==d?d:null===(v=n.state)||void 0===v?void 0:v.slideWidth)&&void 0!==s?s:0,w=null!==(p=null===(m=n.props)||void 0===m?void 0:m.touchThreshold)&&void 0!==p?p:5,_=Math.abs(u)>b/w;if(n.setState({dragging:!1,swiping:!1,swipeLeft:null,touchObject:{}}),_&&y>0){var S=ei.current(g,h);if(S>=0&&S!==g){et.current(S);var I=S;1===h&&S<g?I=y+S:-1===h&&S>g&&(I=S-y),n.slideHandler(I,!1);return}}},function(){n.__origSwipeStart&&(n.swipeStart=n.__origSwipeStart,delete n.__origSwipeStart),n.__origSwipeMove&&(n.swipeMove=n.__origSwipeMove,delete n.__origSwipeMove),n.__origSwipeEnd&&(n.swipeEnd=n.__origSwipeEnd,delete n.__origSwipeEnd)}}},[em]),(0,o.useEffect)(function(){if(!e$(en.current)){var e=eU(en.current);eR(function(n){return n!==e?e:n})}},[em,e$,eU]),(0,o.useEffect)(function(){if(!eX){var e,n=null===(e=N.current)||void 0===e?void 0:e.querySelector(".hero-carousel__slides");if(n){var t=function(){if(er.current){var e=n.querySelector(".slick-track >
1 .slick-slide.slick-current:not(.slick-cloned) [data-slide-index]")||n.querySelector(".slick-track > .slick-slide.slick-current [data-slide-index]");if(e){var t=Number(e.getAttribute("data-slide-index"));Number.isFinite(t)&&!(t<0)&&(ea.current(t)||et.current(t))}}},r=new MutationObserver(function(e){var n,r=v(e);try{for(r.s();!(n=r.n()).done;){var o,i=n.value.target;if(null!==(o=i.classList)&&void 0!==o&&o.contains("slick-slide")&&(i.classList.contains("slick-current")||i.classList.contains("slick-active"))){t();break}}}catch(e){r.e(e)}finally{r.f()}});return r.observe(n,{attributes:!0,attributeFilter:["class"],subtree:!0}),function(){return r.disconnect()}}}},[eX]),(0,o.useEffect)(function(){0!==em.length&&requestAnimationFrame(function(){em.forEach(function(e){document.querySelectorAll('[data-gam-container-id="'.concat(e,'"]')).forEach(function(e){var n=e.closest(".slick-slide");n&&(n.style.visibility="hidden",n.style.pointerEvents="none")})})})},[em]),(0,o.useEffect)(function(){if(0!==em.length){var e=document.querySelector(".hero-carousel__slides");if(e){var n=function(){var n=e.querySelector(".slick-slide.slick-current");if(n&&n.querySelector('[data-gam-hidden="true"]')){var t=eY(en.current,1);t>=0&&!eL.current&&(eL.current=!0,setTimeout(function(){var e;eL.current=!1,null===(e=O.current)||void 0===e||null===(e=e.innerSlider)||void 0===e||e.slickGoTo(t,!0)},0))}},t=new MutationObserver(function(e){var t,r=v(e);try{for(r.s();!(t=r.n()).done;){var o,i=t.value.target;if(null!==(o=i.classList)&&void 0!==o&&o.contains("slick-slide")&&(i.classList.contains("slick-current")||i.classList.contains("slick-active"))){n();break}}}catch(e){r.e(e)}finally{r.f()}});return t.observe(e,{attributes:!0,attributeFilter:["class"],subtree:!0}),n(),function(){return t.disconnect()}}}},[em,eY]);var eZ=(0,o.useRef)(!1),e0=(0,o.useRef)(null);(0,o.useEffect)(function(){if(e0.current&&(clearInterval(e0.current),e0.current=null),eO&&S&&!(eV<=1))return e0.current=setInterval(function(){if(!eZ.current){var e=en.current,n=ei.current(e,1);if(n>=0&&n!==e){var t,r=null===(o=O.current)||void 0===o?void 0:o.innerSlider;if(r){var o,i,a,u=null!==(i=null===(a=r.state)||void 0===a?void 0:a.slideCount)&&void 0!==i?i:0;r.slideHandler(n<e&&u>1?u+n:n)}else null===(t=O.current)||void 0===t||t.slickGoTo(n)}}},k),function(){e0.current&&(clearInterval(e0.current),e0.current=null)}},[eO,S,eV,k]);var e1=(0,o.useCallback)(function(){eN(function(e){var n=!e,t=O.current;return t&&(n?t.slickPlay():t.slickPause()),n})},[]);(0,o.useEffect)(function(){var e=function(e){if(O.current){if("ArrowLeft"===e.key){eH();var n=eY(en.current,-1);n>=0&&O.current.slickGoTo(n)}if("ArrowRight"===e.key){eH();var t=eY(en.current,1);t>=0&&O.current.slickGoTo(t)}}};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[eH]);var e2=(0,o.useCallback)(function(){if("undefined"!=typeof document){var e,n=null===(e=N.current)||void 0===e?void 0:e.querySelector(".hero-carousel__slides");if(n){var t=function(e,n){e.querySelectorAll("a[href], area[href], button, input, select, textarea, iframe, [tabindex]").forEach(function(e){if(!e.dataset.heroOriginalTabindex){var t=e.getAttribute("tabindex");e.dataset.heroOriginalTabindex=null===t?"__none__":t}if(n){var r=e.dataset.heroOriginalTabindex;"__none__"===r?e.removeAttribute("tabindex"):r&&e.setAttribute("tabindex",r)}else e.setAttribute("tabindex","-1")})};n.querySelectorAll(".slick-track > .slick-slide").forEach(function(e){var n=e.classList.contains("slick-active")||e.classList.contains("slick-current"),r="true"===e.getAttribute("aria-hidden"),o="hidden"===e.style.visibility,i=!!e.querySelector('[data-gam-hidden="true"]'),a=n&&!r&&!o&&!i;a?e.removeAttribute("inert"):e.setAttribute("inert",""),t(e,a);var u=e.querySelector('[data-slide-container="true"]');if(u){var c="true"===u.getAttribute("data-no-focus");u.setAttribute("tabindex",a&&!c?"0":"-1"),u.setAttribute("aria-hidden",a?"false":"true")}})}}},[]);function e3(e){if("undefined"!=typeof window&&e)try{var n=e7(e);if(n&&n.src&&n.contentWindow){var t={windowSize:window.innerWidth};try{n.contentWindow.postMessage(t,n.src)}catch(e){console.warn("[postMessage] sendWindowSizeToGAM failed",e)}}}catch(e){console.warn("[postMessage] sendWindowSizeToGamIframe exception",e)}}function e5(e){if(!e)return null;if("IFRAME"===e.tagName)return e;if(e.shadowRoot){var n=e5(e.shadowRoot);if(n)return n}for(var t=0;t<e.childNodes.length;t++){var r=e5(e.childNodes[t]);if(r)return r}return null}function e4(e){if(!e||"undefined"==typeof document)return null;for(var n=document.querySelectorAll('[id="'.concat(e,'"]')),t=0;t<n.length;t++){var r=n[t],o=r.closest(".slick-slide");if(!o||!o.classList.contains("slick-cloned"))return r}return n[0]||document.getElementById(e)}function e6(e){if(!e||"undefined"==typeof document)return null;var n=e4(e),t=null==n?void 0:n.closest('.google-adManager[data-banner-type="sponsored-GAM"]');if(t)return t;var r=document.querySelector('.google-adManager[data-banner-type="sponsored-GAM"] div[id="'.concat(e,'"]'));return(null==r?void 0:r.closest('.google-adManager[data-banner-type="sponsored-GAM"]'))||null}function e7(e){if(!e)return null;var n=e4(e);if(!n)return null;var t=e8(e);
1if(t)return t;var r=e5(n);if(r)return r;var o=n.querySelector('div[id^="google_ads_iframe_"][id$="__container__"]');if(o){var i=e5(o);if(i)return i}var a=e6(e);if(a){var u=e5(a);if(u)return u}return null}function e8(e){if(!e)return null;var n=e4(e);if(!n)return null;var t=n.querySelector('div[id^="google_ads_iframe_"][id$="__container__"]');return t?t.querySelector('iframe[id^="google_ads_iframe_"]')||e5(t):null}function e9(e,n,t){if("undefined"!=typeof window){var r,o=e>=0&&(null===(r=ex[e])||void 0===r||null===(r=r.gamContainerProps)||void 0===r?void 0:r.id)||"",i="".concat(t||o||"");if(i){if(n){var a=!!e7(i),u=ee.current.has(i),c=K.current.has(i);if(eu("setSponsoredSlideHidden:hide-attempt",{index:e,containerId:i,hasIframeNow:a,isConfirmedLoaded:u,isTrackedActive:c}),a||u){eu("setSponsoredSlideHidden:skip-hide-valid-container",{index:e,containerId:i,hasIframeNow:a,isConfirmedLoaded:u,isTrackedActive:c});return}}requestAnimationFrame(function(){if(n){var t=!!e7(i),r=ee.current.has(i);if(t||r){eu("setSponsoredSlideHidden:skip-hide-valid-container-raf-recheck",{index:e,containerId:i,hasIframeNow:t,isConfirmedLoaded:r});return}}var o=e4(i),a=function(e){for(var n=0;n<e.length;n++){var t=e[n],r=t.closest(".slick-slide");if(!r||!r.classList.contains("slick-cloned"))return t}return e[0]||null},u=a(document.querySelectorAll('[data-slide-container="true"][data-gam-container-id="'.concat(i,'"]')));if(u||(u=null==o?void 0:o.closest('[data-slide-container="true"], .slick-slide')),!u&&e>=0&&(u=a(document.querySelectorAll('[data-slide-container="true"][data-slide-index="'.concat(e,'"]')))),!u){var c=a(document.querySelectorAll('[data-slide-container="true"] [id="'.concat(i,'"]')));u=(null==c?void 0:c.closest('[data-slide-container="true"], .slick-slide'))||null}if(!u){var l=e6(i);u=null==l?void 0:l.closest('[data-slide-container="true"], .slick-slide')}if(!u&&o)for(var s=o;s&&s!==document.body;){if(s.matches('[data-slide-container="true"], .hero-canvas, .hero-carousel__slide, .slick-slide')){u=s;break}s=s.parentElement}if(!u){eu("setSponsoredSlideHidden:slide-node-not-found",{index:e,shouldHide:n,containerId:i,hasContainer:!!o});return}eh(function(e){var t=e.includes(i);return n?t?e:[].concat(f(e),[i]):t?e.filter(function(e){return e!==i}):e}),e>=0&&ev(function(t){var r=t.includes(e);return n?r?t:[].concat(f(t),[e]).sort(function(e,n){return e-n}):r?t.filter(function(n){return n!==e}):t});var d=u.closest(".slick-slide");n?(u.setAttribute("data-gam-hidden","true"),u.setAttribute("aria-hidden","true"),d&&(d.style.visibility="hidden",d.style.pointerEvents="none")):(u.setAttribute("data-gam-hidden","false"),u.removeAttribute("aria-hidden"),d&&(d.style.removeProperty("visibility"),d.style.removeProperty("pointer-events"))),eu("setSponsoredSlideHidden:applied",{index:e,shouldHide:n,containerId:i,dataGamHidden:u.getAttribute("data-gam-hidden")})})}}}function ne(e){return e?ex.findIndex(function(n){if("sponsored-GAM"!==n.bannerType)return!1;var t,r,o=null===(t=n.gamContainerProps)||void 0===t?void 0:t.id;if(o&&o===e)return!0;var i=null===(r=n.gamProps)||void 0===r?void 0:r["data-gamid"];return!!i&&"gamcontainer_".concat(i)===e}):-1}function nn(){return(nn=b(h().m(function e(){var n,t,r,o,i,a,u,c,l,s,d,p,g,y,_,S,I,k,A;return h().w(function(e){for(;;)switch(e.n){case 0:if(g=function(e,n,t){if(e){if(Z.current[e]){eu("empty-signal already scheduled",m({containerId:e,reason:n},t));return}eu("empty-signal scheduled",m({containerId:e,reason:n,confirmAfterMs:600,snapshot:d(e)},t)),Z.current[e]=setTimeout(function(){if(delete Z.current[e],s(e)){eu("empty-signal cancelled (iframe detected)",m({containerId:e,reason:n,snapshot:d(e)},t));return}eu("empty-signal confirmed-no-remove (await strict timeout validation)",m({containerId:e,reason:n,snapshot:d(e)},t)),p(e)},600)}},p=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:800;if(e){Q.current[e]&&(clearTimeout(Q.current[e]),delete Q.current[e]);var t=Date.now();eu("scheduleIframeValidation:start",{containerId:e,firstCheckMs:200,maxWaitMs:n,snapshot:d(e)});var r=function(){var o=Date.now()-t;if(!K.current.has(e)){delete Q.current[e],eu("scheduleIframeValidation:stop-not-active",{containerId:e,elapsedMs:o,snapshot:d(e)});return}if(s(e)){delete Q.current[e],ee.current.add(e);var i=ne(e);i>=0&&e9(i,!1,e),eu("scheduleIframeValidation:ready",{containerId:e,elapsedMs:o,readyCarouselIndex:i,snapshot:d(e)});return}if(o>=n){delete Q.current[e];var a=e8(e),u=e7(e),c=ne(e),l=ee.current.has(e);eu("scheduleIframeValidation:timeout-no-remove",{containerId:e,elapsedMs:o,hasNestedIframe:!!a,hasAnyIframe:!!u,anyIframeId:null==u?void 0:u.id,timeoutCarouselIndex:c,isConfirmedLoaded:l,snapshot:d(e)}),a||u||l||(eu("scheduleIframeValidation:timeout-hide-attempt-delayed-confirm",{containerId:e,elapsedMs:o,timeoutCarouselIndex:c}),setTimeout(function(){var n=e8(e),t=e7(e),r=ee.current.has(e);if(n||t||r){eu("scheduleIframeValidation:timeout-hide-cancelled-late-iframe",{containerId:e,timeoutCarouselIndex:c,hasLatestNestedIframe:!!n,hasLatestAnyIframe:!!t,latestAnyIframeId:null==t?void 0:t.id,latestConfirmedLoaded:r});return}eu("scheduleIframeValidation:timeout-hide-confirmed",{containerId:e,timeoutCarouselIndex:c}),e9(c,!0,e)},350));return}(o<300||o%1e3<180)&&eu("scheduleIframeValidation:poll",{containerId:e,elapsedMs:o,snapshot:d(e)}),Q.current[e]=setTimeout(r,180)};Q.current[e]=setTimeout(r,200)}},d=function(e){var n=document.getElementById(e),t=n?e5(n):null,r=null==n?void 0:n.querySelector('div[id^="google_ads_iframe_"][id$="__container__"]'),o=e8(e),i=r?e5(r):null,a=e6(e),u=a?e5(a):null;return{containerId:e,hasContainer:!!n,hasDeepIframe:!!t,deepIframeId:null==t?void 0:t.id,hasGptContainerDiv:!!r,gptContainerId:null==r?void 0:r.id,hasNestedGptIframe:!!o,nestedGptIframeId:null==o?void 0:o.id,hasGptIframe:!!i,gptIframeId:null==i?void 0:i.id,hasSponsoredRoot:!!a,hasRootIframe:!!u,rootIframeId:null==u?void 0:u.id,isActiveTracked:K.current.has(e),isConfirmedLoaded:ee.current.has(e)}},s=function(e){return!!e&&(!!ee.current.has(e)||!!e8(e))},l=function(e){var n="".concat((null==e?void 0:e.id)||"").toLowerCase().match(/(topc2|topc3|topc5)_\d+/);return null==n?void 0:n[1]},c=function(e,n){if(e){var t,r,o=document.getElementById(e),i=null==o?void 0:o.parentElement,a=null==i?void 0:i.querySelector("ad-manager"),u=null==a||null===(r=a.getAttribute("data-bannerposition"))||void 0===r?void 0:r.toLowerCase();if("topc2"===u||"topc3"===u||"topc5"===u)return u}var c="".concat(n.pos||(null===(t=n.gamProps)||void 0===t?void 0:t["data-bannerposition"])||"").toLowerCase().trim();if("topc2"===c||"topc3"===c||"topc5"===c)return c},u=function(e,n){if(n){var t,r=document.getElementById(n);if(null!=r&&r.parentElement){var o=r.parentElement.querySelector('div[id^="gamcontainer_"]');
1if(null!=o&&o.id)return o.id}}var i=null===(t=e.gamContainerProps)||void 0===t?void 0:t.id;return"string"==typeof i&&i.length>0?i:void 0},i=function(){return(i=b(h().m(function e(n){var t,o,i=arguments;return h().w(function(e){for(;;)switch(e.n){case 0:if(t=i.length>1&&void 0!==i[1]?i[1]:200,!(n<=0)){e.n=1;break}return e.a(2);case 1:return e.n=2,new Promise(function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})});case 2:o=Date.now();case 3:if(!(Date.now()-o<t)){e.n=6;break}if(!(r().length>=n)){e.n=4;break}return e.a(2);case 4:return e.n=5,new Promise(function(e){return setTimeout(e,50)});case 5:e.n=3;break;case 6:return e.a(2)}},e)}))).apply(this,arguments)},o=function(e){return i.apply(this,arguments)},r=function(){var e=document.querySelectorAll('.google-adManager[data-banner-type="sponsored-GAM"]'),n=[];return e.forEach(function(e){var t=e.querySelector('div[id^="gamcontainer_"]');null!=t&&t.id&&n.push(t.id)}),n},"undefined"!=typeof window){e.n=1;break}return e.a(2);case 1:if(n=window.gamParamCall,t=window.slotGenerator,a=ex.filter(function(e){return"sponsored-GAM"===e.bannerType}),!V.current){e.n=2;break}return e.n=2,o(a.length);case 2:y=a.map(function(e){var n,t=null===(n=e.gamProps)||void 0===n?void 0:n.id;return u(e,t)}).filter(function(e){return"string"==typeof e&&e.length>0}),_=a.map(function(e){var n;return"".concat(e.pos||(null===(n=e.gamProps)||void 0===n?void 0:n["data-bannerposition"])||"")}),V.current||eu("destroyExistingSlotsForContainers:initial-pass-skipped",{liveDomContainerIds:y,liveBannerPositions:_}),K.current=new Set(y),(S=window.googletag)&&"object"===w(S)&&Array.isArray(S.cmd)&&!J.current&&(J.current=!0,S.cmd.push(function(){try{var e="function"==typeof S.pubads?S.pubads():null;if(!e||"function"!=typeof e.addEventListener)return;var n=function(e){if(!e)return"";if(e.startsWith("gamcontainer_"))return e;if(e.startsWith("gamSection_")){var n=e.replace("gamSection_",""),t="gamcontainer_".concat(n);if(document.getElementById(t))return t}var r=document.getElementById(e),o=null==r?void 0:r.closest('.google-adManager[data-banner-type="sponsored-GAM"]'),i=null==o?void 0:o.querySelector('div[id^="gamcontainer_"]');return(null==i?void 0:i.id)||e},t=function(e){if(!e)return!1;var t=n(e);if(K.current.has(t))return!0;var r=document.getElementById(t)||document.getElementById(e);return!!r&&!!r.closest('.google-adManager[data-banner-type="sponsored-GAM"]')};e.addEventListener("slotResponseReceived",function(e){try{var r=null!=e&&e.slot&&"function"==typeof e.slot.getSlotElementId?e.slot.getSlotElementId():"";if(!r||!t(r))return;var o=n(r),i=!!(null!=e&&e.slot&&"function"==typeof e.slot.getResponseInformation&&e.slot.getResponseInformation());if(!i){eu("slotResponseReceived:no-response",{slotId:r,containerId:o,snapshot:d(o)}),g(o,"slotResponseReceived-noResponse",{slotId:r});return}eu("slotResponseReceived:has-response",{slotId:r,containerId:o,hasResponse:i,snapshot:d(o)});var a=ne(o);a>=0&&e9(a,!1,o),Z.current[o]&&(clearTimeout(Z.current[o]),delete Z.current[o],eu("empty-signal cancelled on has-response",{slotId:r,containerId:o})),s(o)&&ee.current.add(o),p(o),e3(o)}catch(e){console.warn("[HeroCanvas][GAM] slotResponseReceived listener failure",e)}}),e.addEventListener("slotRenderEnded",function(e){try{var r=null!=e&&e.slot&&"function"==typeof e.slot.getSlotElementId?e.slot.getSlotElementId():"";if(!r||!t(r))return;var o=n(r);if((null==e?void 0:e.isEmpty)===!0)eu("slotRenderEnded:empty",{slotId:r,containerId:o,snapshot:d(o)}),g(o,"slotRenderEnded-empty",{slotId:r});else{eu("slotRenderEnded:filled",{slotId:r,containerId:o,isEmpty:null==e?void 0:e.isEmpty,snapshot:d(o)});var i=ne(o);i>=0&&e9(i,!1,o),Z.current[o]&&(clearTimeout(Z.current[o]),delete Z.current[o],eu("empty-signal cancelled on render-filled",{slotId:r,containerId:o})),s(o)&&ee.current.add(o),p(o)}}catch(e){console.warn("[HeroCanvas][GAM] slotRenderEnded listener failure",e)}}),e.addEventListener("slotOnload",function(e){try{var r=null!=e&&e.slot&&"function"==typeof e.slot.getSlotElementId?e.slot.getSlotElementId():"";if(!r||!t(r))return;var o=n(r);eu("slotOnload",{slotId:r,containerId:o,snapshot:d(o)});var i=ne(o);i>=0&&e9(i,!1,o),Z.current[o]&&(clearTimeout(Z.current[o]),delete Z.current[o],eu("empty-signal cancelled on slotOnload",{slotId:r,containerId:o})),Q.current[o]&&(clearTimeout(Q.current[o]),delete Q.current[o]),s(o)&&ee.current.add(o),p(o),e3(o)}catch(e){console.warn("[HeroCanvas][GAM] slotOnload listener failure",e)}})}catch(e){console.warn("[HeroCanvas][GAM] failed to attach pubads listeners",e)}})),I=[],k=h().m(function e(r){var o,i,s,m,g,y,b,w,_,S,k,A,E,C,M,x,T,j,P,R,G,O;return h().w(function(e){for(;;)switch(e.p=e.n){case 0:E=function(e){function n(e){if(!e)return null;if("IFRAME"===e.tagName)return e;if(e.shadowRoot){var t=n(e.shadowRoot);if(t)return t}for(var r=0;r<e.childNodes.length;r++){var o=n(e.childNodes[r]);if(o)return o}return null}e&&function(){if(e){var t=n(e);if(t&&t.src){var r,o={windowSize:window.innerWidth};try{null===(r=t.contentWindow)||void 0===r||r.postMessage(o,t.src)}catch(e){console.warn("postMessage failed",e)}return}var i=new MutationObserver(function(t,r){var o=n(e);if(o&&o.src){try{null===(i=o.contentWindow)||void 0===i||i.postMessage({windowSize:window.innerWidth},o.src)}catch(e){console.warn("postMessage failed",e)}r.disconnect()}var i,a,u=v(t);try{for(u.s();!(a=u.n()).done;){var c=a.value;if("attributes"===c.type&&"IFRAME"===c.target.tagName){var l,s=c.target;if(s.src){try{null===(l=s.contentWindow)||void 0===l||l.postMessage({windowSize:window.innerWidth},s.src)}catch(e){console.warn("postMessage failed",e)}r.disconnect();return}}}}catch(e){u.e(e)}finally{u.f()}});try{i.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["src"]})}catch(t){var a=0,u=function(){var t,r=n(e);if(r&&r.src){try{null===(t=r.contentWindow)||void 0===t||t.postMessage({windowSize:window.innerWidth},r.src)}catch(e){console.warn("postMessage failed",e)}return}a++<100&&setTimeout(u,200)};
1u()}setTimeout(function(){try{i.disconnect()}catch(e){}})}}()},m=(null==(s=(i=a[r]).gamProps?document.getElementById(i.gamProps.id):null)?void 0:s.id)||(null===(o=i.gamProps)||void 0===o?void 0:o.id),(g=u(i,m))&&I.push(g),y=g?ex.findIndex(function(e){var n;return(null===(n=e.gamContainerProps)||void 0===n?void 0:n.id)===g}):-1,b=r,w=y>=0?y:b,_=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(g){var t=g,o=function(){var n=e7(t),o=c(t,i),a=l(n),u=!!n&&!!o&&!!a&&o!==a;if(n&&!u){t&&U.current[t]&&(clearTimeout(U.current[t]),delete U.current[t]),w>=0&&e9(w,!1,t),D.current&&w>=0&&es(function(e){return e.filter(function(e){return e!==w})});return}u&&console.warn("[HeroCanvas][GAM] iframe position mismatch in container",{containerId:t,expectedPosition:o,actualPosition:a,iframeId:null==n?void 0:n.id,adId:m}),B.current.has(t)||(B.current.add(t),w>=0&&(U.current[t]&&clearTimeout(U.current[t]),U.current[t]=setTimeout(function(){var e=e7(t),n=c(t,i),r=l(e),o=!!e&&!!n&&!!r&&n!==r;(!e||o)&&p(t,1200),delete U.current[t]},800)),D.current&&w>=0&&es(function(e){return e.includes(w)?e:[].concat(f(e),[w])}),console.warn("[HeroCanvas][GAM] iframe missing in mounted GAM container",{phase:e,carouselIndex:w,gamBannerIndex:r,slideId:i.id,adId:m,containerId:t}))};if(n>0){setTimeout(o,n);return}o()}},S={};try{n&&(S=(null==(k=n(m))?void 0:k.detail)||{})}catch(e){}if(!(!S||0===Object.keys(S).length)){e.n=1;break}return console.warn("[HeroCanvas][GAM] Empty gam detail before slotGenerator",{index:r,adId:m,containerId:g,position:i.pos||(null===(A=i.gamProps)||void 0===A?void 0:A["data-bannerposition"])}),_("empty-gam-detail",200),e.a(2,0);case 1:if(e.p=1,C=(g=u(i,m)||g)?document.getElementById(g):null,!(t&&g&&C)){e.n=4;break}if(x=i.pos||(null===(M=i.gamProps)||void 0===M?void 0:M["data-bannerposition"])||"topc2",!Y.current.has(g)){e.n=3;break}if(!e7(g)){e.n=2;break}return e.a(2,0);case 2:return eu("slot-generated-iframe-missing:skip-destroy-and-recreate",{containerId:g,bannerPositionForRecovery:x,snapshot:d(g)}),p(g,1600),e.a(2,0);case 3:if(T=x,S.containerId=g,S.divId=g,S.slotElementId=g,S.adContainerId=g,S.isInsideCarousel=!0,S.sizes="fluid",S.bannerPosition=T,S.bannerposition=T,S.position=T,r===a.length-1&&(S.enableSRA=!0),t(S,g),Y.current.add(g),p(g),j=function(e){E(e)},P=function(e){return!!e&&(!!e.childElementCount&&e.childElementCount>0||!!e.children&&e.children.length>0||"string"==typeof e.innerHTML&&e.innerHTML.trim().length>0||!!e.querySelectorAll&&e.querySelectorAll("*:scope > *").length>0||!!e.shadowRoot&&e.shadowRoot.childElementCount>0)},C&&P(C))j(C),_("children-present",120);else if(C){R=new MutationObserver(function(e,n){var t,r=v(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(o.addedNodes&&o.addedNodes.length>0){j(C),_("mutation-added-nodes",120),n.disconnect();return}}}catch(e){r.e(e)}finally{r.f()}P(C)&&(j(C),_("mutation-visible-children",120),n.disconnect())});try{R.observe(C,{childList:!0,subtree:!0})}catch(e){G=0,(O=function(){if(P(C)){j(C);return}G++<100&&setTimeout(O,200)})()}setTimeout(function(){try{R.disconnect()}catch(e){}},300)}_("post-slot-generator",120);case 4:e.n=6;break;case 5:e.p=5,e.v;case 6:return e.a(2)}},e,null,[[1,5]])}),A=0;case 3:if(!(A<a.length)){e.n=6;break}return e.d(function(e){if(null!=e){var n=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],t=0;if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}}throw TypeError(w(e)+" is not iterable")}(k(A)),4);case 4:if(0!==e.v){e.n=5;break}return e.a(3,5);case 5:A++,e.n=3;break;case 6:setTimeout(function(){I.forEach(function(e){var n=e7(e);if(n){var t=ex.find(function(n){var t;return(null===(t=n.gamContainerProps)||void 0===t?void 0:t.id)===e});if(t){var r=c(e,t),o=l(n);r&&o&&r!==o&&console.warn("[HeroCanvas][GAM] non-destructive position mismatch",{containerId:e,expectedPosition:r,actualPosition:o,iframeId:n.id})}}}),D.current=!0,es([]),eb(!0),eS(!0)},1200);case 7:return e.a(2)}},e)}))).apply(this,arguments)}return(0,o.useEffect)(function(){eX||requestAnimationFrame(function(){e2()})},[e2,eP,em,ef,eF.length,eX]),(0,o.useEffect)(function(){if(!L.current&&!F.current&&!d){if(e="undefined"!=typeof window?window.googletag:void 0,n="undefined"!=typeof window?window.isConsentCookieEnabled:void 0,e&&"object"===w(e)&&void 0!==e._loaded_&&!1===e._loaded_||n&&"object"===w(n)&&!1===n.functional){eT(function(e){return e.filter(function(e){return"sponsored-GAM"!==e.bannerType})});return}if(ex.some(function(e){return"sponsored-GAM"===e.bannerType})){var e,n,t=ex.filter(function(e){return"sponsored-GAM"===e.bannerType}).map(function(e){var n;return null===(n=e.gamContainerProps)||void 0===n?void 0:n.id}
1).filter(Boolean);if(0!==t.length){var r=null,o=null,i=function(){!W.current&&!F.current&&!L.current&&(!V.current||!z.current)&&t.every(function(e){return document.getElementById(e)})&&(r&&r.disconnect(),o&&clearTimeout(o),F.current=!0,b(h().m(function e(){return h().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,function(){return nn.apply(this,arguments)}();case 1:L.current=!0;case 2:return e.p=2,F.current=!1,e.f(2);case 3:return e.a(2)}},e,null,[[0,,2,3]])}))())};return o=setTimeout(i,120),(r=new MutationObserver(function(){i()})).observe(document.body,{childList:!0,subtree:!0}),function(){r&&r.disconnect(),o&&clearTimeout(o),$.current&&(clearTimeout($.current),$.current=null)}}}}},[ex,d]),(0,o.useEffect)(function(){if("undefined"!=typeof window){var e=function(e){var n=e.data;if(n&&"object"===w(n)&&n.isHeroCanvasCarousel&&n.isSwiped){var t=n.direction;if("left"===t||"right"===t){eH();var r="left"===t?1:-1;eq.current=r;var o=Date.now(),i=eo.current,a=i&&o-i.at<320?i.from:en.current,u=ei.current(a,r);if(!(u<0)){if(i&&o-i.at<320&&i.from===a&&i.to===u)return;er.current=!0,eo.current={from:a,to:u,at:o},et.current(u);var c=null===(l=O.current)||void 0===l?void 0:l.innerSlider;if(c&&"function"==typeof c.slideHandler){var l,s,d,f,v=null!==(d=null===(f=c.state)||void 0===f?void 0:f.slideCount)&&void 0!==d?d:0,p=u;1===r&&u<a&&v>1?p=v+u:-1===r&&u>a&&v>1&&(p=u-v),c.slideHandler(p);return}if(c&&"function"==typeof c.slickGoTo){c.slickGoTo(u);return}"function"==typeof(null===(s=O.current)||void 0===s?void 0:s.slickGoTo)&&O.current.slickGoTo(u)}}}};return window.addEventListener("message",e),function(){return window.removeEventListener("message",e)}}},[eH]),(0,o.useEffect)(function(){var e=function(){eC.forEach(function(e){if((null==e?void 0:e.bannerType)==="sponsored-GAM"){var n,t,r=null!==(n=e.gamContainerProps)&&void 0!==n&&n.id||null!==(t=e.gamProps)&&void 0!==t&&t["data-gamid"]?"gamcontainer_".concat(e.gamProps["data-gamid"]):void 0;r&&e3(r)}})};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[eC]),(0,s.jsxs)("div",{ref:N,className:"hero-carousel-container abs-carousel","aria-label":void 0===M?"Hero Banner Carousel":M,role:"region",onMouseEnter:function(){eZ.current=!0},onMouseLeave:function(){eZ.current=!1},children:[(0,s.jsx)("div",{className:"hero-carousel__slides p-0 slick-initialized slick-slider",children:eX?(0,s.jsx)(c.HeroCanvasShimmer,{count:void 0===g?1:g}):(0,s.jsx)(i.default,m(m({ref:O,className:"slick-list draggable"},{dots:void 0!==A&&A&&eV>1,arrows:!1,infinite:(void 0===C||C)&&eV>1,slidesToShow:1,slidesToScroll:1,autoplay:!1,autoplaySpeed:k,pauseOnHover:!1,accessibility:!0,adaptiveHeight:!1,beforeChange:function(e,n){er.current=!0,eo.current={from:eJ(e),to:eJ(n),at:Date.now()};var t=n>e?1:-1;eq.current=t},afterChange:eQ,onSwipe:function(){eH()},onInit:function(){return null==T?void 0:T()}}),{},{children:eF.map(function(e,n){var t=e.slide,r=e.isSponsoredGAM;if(!e.isValid)return null;var o=null===(a=t.gamContainerProps)||void 0===a?void 0:a.id,i=r&&!!o&&eW.has(o);if(r){var a,c,l,d=t.id||(null===(c=t.gamContainerProps)||void 0===c?void 0:c.id)||(null===(l=t.gamProps)||void 0===l?void 0:l.id)||"sponsored-gam-slide-".concat(n);return(0,s.jsx)("div",{className:"hero-canvas hero-carousel__slide","data-slide-index":n,"data-gam-container-id":o,"data-gam-hidden":i?"true":"false",tabIndex:-1,"data-slide-container":"true","data-no-focus":"true","aria-label":"","aria-hidden":i||void 0,children:(0,s.jsxs)("div",{className:"google-adManager hero-banner-unit__injection","data-banner-type":"sponsored-GAM",children:[(0,s.jsx)("ad-manager",m({},t.gamProps||{})),(0,s.jsx)("div",m({},t.gamContainerProps||{}))]})},d)}return(0,s.jsx)("div",{className:"hero-carousel__slide-inner","data-slide-index":n,children:(0,s.jsx)(u.HeroCanvasCard,m(m({},t),{},{slideIndex:n}))},t.id||"slide-".concat(n))})}),ez)}),!eX&&eV>1&&(void 0===E||E)&&(0,s.jsx)("div",{className:"hero-carousel",style:{height:"auto",maxHeight:"none",paddingLeft:"0.2em",paddingRight:"0.2em"},children:(0,s.jsx)("div",{className:"hero-carousel__controls","data-qa":"hm_hrcvs_crsl_cmpt",children:(0,s.jsx)("div",{className:"hero-carousel__controls","data-qa":"hm_hrcvs_crsl_cmpt",children:(0,s.jsxs)("div",{className:"hero-carousel__controls-group",children:[(0,s.jsx)("button",{className:"pds-icon-btn pds-icon-btn-size_small pds-icon-btn-trans
1parent--neutral align-items-center justify-content-center hero-carousel__control hero-carousel__control--pause ".concat(eO?"expanded d-block":"expanded d-none").trim(),"aria-label":"Pause Carousel slide",tabIndex:eO?0:-1,"data-qa":"hm_hrcvs_crsl_ps","aria-hidden":!eO,type:"button",onClick:e1,children:(0,s.jsx)("span",{className:"svg-pause-icon-with-background hero-carousel__control-icon"})}),(0,s.jsx)("button",{className:"pds-icon-btn pds-icon-btn-size_small pds-icon-btn-transparent--neutral align-items-center justify-content-center hero-carousel__control hero-carousel__control--play ".concat(eO?"collapsed d-none":"collapsed d-block").trim(),"aria-label":"Play Carousel slide",tabIndex:eO?-1:0,"data-qa":"hm_hrcvs_crsl_ply","aria-hidden":eO,type:"button",onClick:e1,children:(0,s.jsx)("span",{className:"svg-play-icon-with-background hero-carousel__control-icon","aria-hidden":"true"})}),(0,s.jsxs)("div",{className:"hero-carousel__controls-group__slide-count",children:[(0,s.jsx)("span",{className:"hero-carousel__counter-sr-only","data-qa":"hm_hrcvs_crsl_cnt",children:"Current Slide ".concat(eP+1," of ").concat(eV)}),(0,s.jsx)("span",{className:"hero-carousel__counter align-items-center","aria-hidden":"true",children:"".concat(eP+1,"/").concat(eV)})]}),(0,s.jsx)("button",{className:"pds-icon-btn pds-icon-btn-size_small pds-icon-btn-transparent--neutral align-items-center justify-content-center hero-carousel__control hero-carousel__control--next expanded","aria-label":"Next slide",tabIndex:0,type:"button",onClick:function(){eH();var e=en.current,n=eY(e,1);if(n>=0){et.current(n);var t=null===(r=O.current)||void 0===r?void 0:r.innerSlider;if(t){var r,o,i,a=null!==(o=null===(i=t.state)||void 0===i?void 0:i.slideCount)&&void 0!==o?o:0;t.slideHandler(n<e&&a>1?a+n:n)}else{var u=O.current;"function"==typeof(null==u?void 0:u.slickGoTo)?u.slickGoTo(n):"function"==typeof(null==u?void 0:u.slickNext)&&u.slickNext()}}else{var c=O.current;"function"==typeof(null==c?void 0:c.slickNext)&&c.slickNext()}setTimeout(function(){var e=N.current;if(e){var n=e.querySelector(".slick-slide.slick-current.slick-active");if(n){n.setAttribute("tabindex","-1"),n.focus();var t=n.querySelector(".google-adManager");if(t){var r,o=t.querySelector("iframe");null!=o&&o.src&&(null===(r=o.contentWindow)||void 0===r||r.postMessage({handleADA:!0},o.src))}}}},250)},children:(0,s.jsx)("span",{className:"svg-next-icon-with-background hero-carousel__control-icon","aria-hidden":"true"})})]})})})})]})};n.default=k}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.