Created
September 20, 2024 00:00
-
-
Save trinaldi/fd09d3e34c949f8dc7b06b07c37036b1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(__wpcc){var aa;"undefined"===typeof aa&&(aa=function(){});aa.p="";}).call(this || window, (window.__wpcc = window.__wpcc || {})); | |
(function(__wpcc){var g=function(a){return a.replace(/["]/g,b=>ba[b])},k=function(a){return a.replace(/"/g,b=>Object.keys(ba).find(c=>ba[c]===b)||"")},ca=function(a){return a.map(b=>b.replace(/\s\s+/g," "))},m=function(a,...b){a=[ca(a),b].reduce((c,d)=>(d.forEach((e,f)=>(c[f]=c[f]||[]).push(e)),c),[]).reduce((c,d)=>c.concat(d));return document.createRange().createContextualFragment(a.flat().join(""))},p=function(a,...b){return[ca(a),b].reduce((c,d)=>(d.forEach((e,f)=>(c[f]=c[f]||[]).push(e)),c),[]).reduce((c, | |
d)=>c.concat(d)).flat().join("")},ha=function(a,b){{const d=da[ea];a=d&&d[a]&&d[a][b]?d[a][b]:0}var c;return{currencyCode:(null===(c=fa[ea])||void 0===c?void 0:c.currencyCode)||"",units:a,nanos:0}},ia=async function(a){return new Promise((b,c)=>{const d=setTimeout(()=>{clearTimeout(d);c(Error("Timeout"))},a)})},ja=function(a,b=50,c={}){function d(...x){const K=this;return new Promise((I,C)=>{const Y=n&&void 0===l;void 0!==l&&clearTimeout(l);l=setTimeout(function(){l=void 0;q=Date.now();if(!n){const Xa= | |
a.apply(K,x);t&&t(Xa);y.forEach(({resolve:Ya})=>Ya(Xa));y=[]}},e());if(Y)return C=a.apply(K,x),t&&t(C),I(C);y.push({resolve:I,reject:C})})}function e(){if(void 0!==u){const x=Date.now()-q;if(x+b>=u)return u-x}return b}var f,h;let l;const n=null!==(f=c.isImmediate)&&void 0!==f?f:!1,t=null!==(h=c.callback)&&void 0!==h?h:!1,u=c.maxWait;let q=Date.now(),y=[];d.cancel=function(x){void 0!==l&&clearTimeout(l);y.forEach(({reject:K})=>K(x));y=[]};return d},ka=function(a){return(a=document.cookie.match(new RegExp("(^| )"+ | |
a+"=([^;]+)")))?a[2]:null},r,la=r||(r={});la.ADSGUIDE="adsguide";la.ANIMATE="animate";la.ANIMATION_FRAME="requestAnimationFrame";la.GLUE="glue";la.G_RECAPTCHA="grecaptcha";la.INTERSECTION_OBS="IntersectionObserver";la.MATCH_MEDIA="matchMedia";la.MDC="mdc";la.JSDOM="jsdom";var v,ma=v||(v={});ma.XL="xl";ma.LG="lg";ma.MD="md";ma.SM="sm";var w,z=w||(w={});z.ALT_TEXT="alt-text";z.ARIA_EXPANDED="aria-expanded";z.ARIA_HIDDEN="aria-hidden";z.ARIA_LABEL="aria-label";z.BACKGROUND_COLOR="background-color"; | |
z.BODY="body";z.CALLOUT="callout";z.CARD="card";z.CARDS="cards";z.CAROUSEL_ARIA_LABELS="carousel-aria-labels";z.CHATBOT_AGENT_ID="agent-id";z.CHATBOT_CONTEXT_ID="context-id";z.CLASS_NAMES="class-names";z.CI_APPENDIX="ci-appendix";z.CTA="cta";z.CTA_ARIA_DESCRIPTION="cta-aria-description";z.CTA_BLOCK="cta-block";z.CTA_LABEL="cta-label";z.CTA_POSITION="cta-position";z.CTA_TEXT="cta-text";z.CTA_URL="cta-url";z.COPY="copy";z.DISABLED="disabled";z.DISCLAIMER="disclaimer";z.EYEBROW="eyebrow"; | |
z.GTM_CTA_NAME="cta-name";z.GTM_MODULE_NAME="module-name";z.HAS_TRANSPARENCY="has-transparency";z.HEADLINE="headline";z.HREF="href";z.HTML="html";z.ICON="icon";z.ICON_ID="icon-id";z.ICON_IMAGE="icon-image";z.ICON_SIZE="icon-size";z.ICON_TYPE="icon-type";z.IMAGE="image";z.IMAGES="images";z.INDEX="index";z.INERT="inert";z.LABEL="label";z.LOCALE="locale";z.LOGO_IMAGE="logo-image";z.MEDIA_ALIGNMENT="media-alignment";z.MODAL_ARIA_LABELS="modal-aria-labels";z.MTE="mte";z.NAVIGATION_ARIA_LABELS="navigation-aria-labels"; | |
z.NO_CODELESS_INCENTIVE="no-codeless-incentive";z.OFFICE_HOURS="office-hours";z.PANELS="panels";z.ROLE="role";z.SUBHEADLINE="subheadline";z.SPACER="spacer";z.SUF_SUBID="suf-subid";z.TABINDEX="tabindex";z.THEME="theme";z.THUMBNAIL="thumbnail";z.WIDGET_TEXT="widget-text";z.WIDTHS="widths";z.YOUTUBE_DATA="youtube-data";z.YOUTUBE_ID="youtube-id";var A,na=A||(A={});na.ACTIVE="active";na.ERROR="error";na.HIDDEN="hidden";na.LOCK="lock";na.MTO_HIDDEN="mto-hidden";na.NO_SCROLL="glue-no-scroll";na.OPEN="open"; | |
na.PANEL_BUTTON_NO_POINTER="gads-contact-hub-panel__button--no-pointer";na.PAUSE="pause";na.REDUCED_MOTION="reduced-motion";na.SHOW="show";na.SO_RPL="so-rpl";var oa,pa=oa||(oa={});pa.BLOCK="block";pa.NONE="none";var qa,ra=qa||(qa={});ra.GLUE_MODAL=".glue-modal";ra.GLUE_HEADLINE=".glue-headline";var B,D=B||(B={});D.CHATBOT_LOADED="Chatbot:ready";D.AMA_CLIENT_READY="AMAClient:ready";D.BLUR="blur";D.BM_WIDGET_CLOSED="bm-widget-conversation-closed";D.BM_WIDGET_MAXIMIZED="bm-widget-conversation-maximized"; | |
D.BM_WIDGET_MINIMIZED="bm-widget-conversation-minimized";D.CLICK="click";D.CHANGE="change";D.CONTEXT_MENU="contextmenu";D.CYO_SELECTED_INCENTIVE_CHANGED="CYO:selectedIncentiveChanged";D.DOM_CONTENT_LOADED="DOMContentLoaded";D.FINISH="finish";D.FOCUS="focus";D.FOCUSOUT="focusout";D.GADS_HEADER_HIDE="GADS:headerHide";D.GADS_UPDATE_CTA_SUFFIX="GADS:updateCtaSuffix";D.GADS_UPDATE_CTA_PARAMS="GADS:updateCtaParams";D.FORM_UPDATE="form-update";D.GLUE_HEADER_HIDE="glueheaderhide";D.GLUE_HEADER_SHOW="glueheadershow"; | |
D.GLUE_MODAL_CLOSED="GlueModal:closed";D.GLUE_MODAL_OPEN="GlueModal:opened";D.INPUT="input";D.KEYDOWN="keydown";D.KEYPRESS="keypress";D.KEYUP="keyup";D.LOAD="load";D.MDC_SELECT_CHANGE="MDCSelect:change";D.MOUSEDOWN="mousedown";D.MOUSEENTER="mouseenter";D.MOUSELEAVE="mouseleave";D.MOUSEMOVE="mousemove";D.MOUSEOVER="mouseover";D.MOUSEUP="mouseup";D.PAGESHOW="pageshow";D.RESIZE="resize";D.SCROLL="scroll";D.SUBMIT="submit";D.TOUCHEND="touchend";D.TOUCHSTART="touchstart";D.TRANSITION_END="transitionend"; | |
var sa,ta=sa||(sa={});ta[ta.SM=28]="SM";ta[ta.MD=40]="MD";var E,ua=E||(E={});ua.CREATEANDMANAGEADS="createandmanageads";ua.SIGNIN="signin";ua.SSO_ADD_ACCOUNT="gads-sso-add-another-account";ua.SSO_CREATE_ACCOUNT="gads-sso-create-new-google-ads-account";ua.SSO_MANAGE_ACCOUNT="gads-sso-manage-your-google-account";ua.SSO_PRIVACY_POLICY="gads-sso-privacy-policy";ua.SSO_SIGN_OUT="gads-sso-sign-out";ua.SSO_TERMS="gads-sso-terms";ua.STARTNOW="startnow";var va;(va||(va={})).AFTER_BEGIN="afterbegin"; | |
var F,wa=F||(F={});wa.ARROW_DOWN="ArrowDown";wa.ARROW_LEFT="ArrowLeft";wa.ARROW_RIGHT="ArrowRight";wa.ARROW_UP="ArrowUp";wa.ENTER="Enter";wa.ESCAPE="Escape";wa.SPACE="Space";wa.TAB="Tab";var G,xa=G||(G={});xa.AUTO="auto";xa.SMOOTH="smooth";var ya,za=ya||(ya={});za.STANDARD="Standard";za.EXTENDED="Extended";za.SPACER_5="5";za.SPACER_6="6";za.SPACER_7="7";var H,J=H||(H={});J[J.THIRTY=30]="THIRTY";J[J.FIFTY=50]="FIFTY";J[J.SIXTY=60]="SIXTY";J[J.ONE_HUNDRED=100]="ONE_HUNDRED";J[J.TWO_HUNDRED=200]="TWO_HUNDRED"; | |
J[J.FOUR_HUNDRED=400]="FOUR_HUNDRED";J[J.FIVE_HUNDRED=500]="FIVE_HUNDRED";J[J.EIGHT_HUNDRED=800]="EIGHT_HUNDRED";J[J.THREE_THOUSAND=3E3]="THREE_THOUSAND";var Aa,Ba=Aa||(Aa={});Ba.ANDROID="ANDROID";Ba.IOS="IOS";Ba.MAC_SAFARI="mac-safari";var Ca,Da=Ca||(Ca={});Da.DESKTOP="DESKTOP";Da.IPAD="IPAD";Da.MOBILE="MOBILE";Da.TABLET="TABLET";var Ea={ADS:{DOMAIN:"https://ads.google.com",NON_LOCALIZED_URLS:{SIGNUP:"/signup",NAV_LOGIN:"/nav/login"}}},Fa,Ga=Fa||(Fa={});Ga.AUTHUSER="authuser";Ga.WEBSITE="website";var Ha=class{constructor(){this._handlers=[];this.mediaQuery=null;this.isReducedMotion=!1;r.MATCH_MEDIA in window&&(this.mediaQuery=window.matchMedia("(prefers-reduced-motion: reduce)"),this.isReducedMotion=this.mediaQuery.matches,this.mediaQuery.addEventListener(B.CHANGE,()=>{var a,b;this.isReducedMotion=null===(a=this.mediaQuery)||void 0===a?void 0:a.matches;for(const c of this._handlers)c.call(this,null===(b=this.mediaQuery)||void 0===b?void 0:b.matches)}))}subscribe(a){this._handlers.push(a)}}, | |
Ia=new Ha;var Ja=class{constructor(){this._defaultParams="";this._htmlImage=[];this._isDev="dev"===document.documentElement.getAttribute("environment");this._isRtl=!1;this._url=this._locale="";this._incentiveStatus=!1}get defaultParams(){return this._defaultParams}set defaultParams(a){this._defaultParams=a}get incentiveStatus(){return this._incentiveStatus}set incentiveStatus(a){this._incentiveStatus=a}get htmlImage(){return this._htmlImage}set htmlImage(a){if(null===a||void 0===a?0:a.length)this._htmlImage= | |
a;else throw Error("No HTML image has been provided");}get isDev(){return this._isDev}set isDev(a){this._isDev=a}get isRtl(){return this._isRtl}set isRtl(a){this._isRtl=a}get locale(){return this._locale}set locale(a){this._locale=a}get url(){return this._url}set url(a){this._url=a}},L=new Ja;var ba={'"':"""};var M=class extends HTMLElement{constructor(){super(...arguments);this.cta=[]}get default_page_params(){return L.defaultParams}set default_page_params(a){L.defaultParams=a}get no_incentive(){return L.incentiveStatus}set no_incentive(a){L.incentiveStatus=a}get isDev(){return L.isDev}set isDev(a){L.isDev=a}set isLangRtl(a){L.isRtl=a}get locale(){return L.locale}set locale(a){L.locale=a}get url(){return L.url}set url(a){L.url=a}get ctaInfo(){const a=this.getAttribute(w.CTA);return"string"===typeof a? | |
JSON.parse(k(a)):this.cta.length?this.cta:null}get ctaBlock(){return this.ctaInfo?this.ctaInfo.map(a=>null===a.text&&null===a.url||a.hide?"":p` | |
<gads-button ${this.unpackCta(a)}></gads-button> | |
`):""}get gtmModuleName(){return this.getAttribute(w.GTM_MODULE_NAME)||""}getCtaByGtmName(a){var b;const c=null===(b=this.ctaInfo)||void 0===b?void 0:b.find(d=>(null!==d.text||null!==d.url)&&d.gtm_cta_name===a);return c?p` | |
<gads-button ${this.unpackCta(c)}></gads-button> | |
`:""}assignAttrs(...a){Object.assign(this,...a)}render(){return new DocumentFragment}connectedCallback(){this.firstElementChild||this.replaceChildren(this.render())}prefersReducedMotion(){return Ia.isReducedMotion}formatEto(a){return null===a||void 0===a?void 0:a.replace(/[-\s]/g,"")}formatMultiImage(a,b=!0){if(!a.length)return"";a=("string"===typeof a?JSON.parse(k(a)):a).map(c=>{const d={alt:c.aria_description||"",breakpoint:c.breakpoint,has_transparency:c.has_transparency,url:c.image?c.image.url: | |
""};return c.use_html_image?{...d,html_image:c.html_image,use_html_image:c.use_html_image}:{...d}});return b?g(JSON.stringify(a)):a}getMediaBreakpoint(a){return{sm:"(min-width: 1px)",md:"(min-width: 600px)",lg:"(min-width: 1024px)",xl:"(min-width: 1440px)"}[a]||""}unpackCta(a){let b="",c="";a.chatbot_agent_id&&a.chatbot_context_id&&(b=` | |
agent-id="${a.chatbot_agent_id}" | |
context-id="${a.chatbot_context_id}" | |
`);a.gtm_cta_name&&(c=` | |
cta-name="${a.gtm_cta_name}" | |
module-name="${this.gtmModuleName.toLowerCase()}" | |
`);return` | |
cta-text="${a.text}" | |
emphasis=${a.emphasis} | |
label="${a.aria_description||""}" | |
${b} | |
${c} | |
${a.url?`cta-url="${this.relativizeKintaroLink(a.url)}"`:""} | |
${a.reversed?`reversed="${a.reversed}"`:""} | |
${a.icon?`icon-type="${a.icon}"`:""} | |
${a.icon_id?`icon-id="${a.icon_id}"`:""} | |
${a.label?`cta-label="${a.label}"`:""} | |
${a.default_subid_position?`cta-position="${a.default_subid_position}"`:""} | |
${a.special_triggers?`special-triggers="${a.special_triggers}"`:""} | |
`}relativizeKintaroLink(a){if(null===a||void 0===a?0:a.startsWith("/home/")){let b=this.url.split("/").length,c=".";for(;2<b;)c+="/..",b--;return c+a}return a}setExternalLink(a=""){return(null===a||void 0===a?0:a.match(/https?:\/\/.*?google\.*?com/))?'target="_blank" rel="noopener noreferrer"':(null===a||void 0===a?0:a.match(/https?:\/\//))?'target="_blank" rel="noopener noreferrer nofollow"':""}};var {replace:Ka}="",La=/[&<>'"]/g,Ma={"&":"&","<":"<",">":">","'":"'",'"':"""},Na=a=>Ma[a];var Oa=class{constructor(){var a;this.userAgent=((null===(a=window.navigator)||void 0===a?void 0:a.userAgent)||window.opera).toLowerCase()}getDeviceType(){let a=Ca.DESKTOP;const b=RegExp("(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))");window.navigator.userAgent.includes("jsdom")||(/windows phone/i.test(this.userAgent)&&(a=Ca.MOBILE),/android/i.test(this.userAgent)&&(a=Ca.MOBILE),/iPhone|iPod/.test(this.userAgent)&&!window.MSStream&& | |
(a=Ca.MOBILE),/Mobile/i.test(this.userAgent)&&(a=Ca.MOBILE),/Macintosh/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent)&&(null===navigator||void 0===navigator?0:navigator.maxTouchPoints)&&1<(null===navigator||void 0===navigator?void 0:navigator.maxTouchPoints)&&(a=Ca.IPAD),b.test(this.userAgent)&&(a=Ca.TABLET));return a}osType(){let a=Ca.DESKTOP;window.navigator.userAgent.includes("jsdom")||(/android/i.test(this.userAgent)&&(a=Aa.ANDROID),/iPhone|iPod/i.test(this.userAgent)&& | |
(a=Aa.IOS),-1!==this.userAgent.indexOf("safari")&&-1===this.userAgent.indexOf("chrome")&&-1===this.userAgent.indexOf("iphone")&&-1===this.userAgent.indexOf("ipad")&&(a=Aa.MAC_SAFARI));return a}isMobile(){return this.getDeviceType()===Ca.MOBILE}isTablet(){return this.getDeviceType()===Ca.TABLET}isDesktop(){return!(this.isMobile()||this.isTablet())}};var Pa,Qa=Pa||(Pa={});Qa.ANY="a";Qa.DESKTOP="c";Qa.IPAD="t";Qa.MOBILE="m";Qa.TABLET="t";var Ra=/\{POSITION}|\{position}|\{Position}/,Sa=new RegExp(/([Ww]{2}-[Ww]{2})/),Ta=new RegExp(/((!o2)|(!o3))/),Ua=RegExp(/((!o2)-[A-Za-z]{1,}-[A-Za-z]{2}-[A-Za-z0-9]{2}-[0-9]{2})/),Va=RegExp(/((!o3)[_-][A-Za-z]+(?:-[A-Za-z0-9]+)*)/),Wa={CONVERSION_CTAS:"a[href*=subid]",ADS_INTERNAL_CTAS:`a[href*="/home/"]:not([target="_blank"]), a[href*="${Ea.ADS.DOMAIN}"] | |
[target="_blank"]:not([href*="/localservices/signup/"])`},N=class{constructor(){this.adsInternalCtas=null;var a=(new Oa).getDeviceType();this.deviceValue=Pa[a]||Pa.ANY;this.conversionCtas=document.querySelectorAll(Wa.CONVERSION_CTAS);a=(new URLSearchParams(window.location.search)).get("subid");let b=(new URLSearchParams(window.location.search)).get("suffix");a&&b&&(b=null);this.urlSubidParam=a?Ka.call(a,La,Na):null;this.urlSuffixParam=b?Ka.call(b,La,Na):null;const c=document.querySelector(w.HTML); | |
this.ciAppendix=(null===c||void 0===c?void 0:c.getAttribute(w.CI_APPENDIX))||"";b&&(L.defaultParams=Ka.call(b,La,Na),this.ciAppendix=Ka.call(b,La,Na));if(this.defaultParams=(null===c||void 0===c?void 0:c.getAttribute(w.SUF_SUBID))||""){var d=(null===c||void 0===c?void 0:c.getAttribute(w.MTE))||"";this.defaultParams+=d}if(b){d=this.defaultParams.split(Ta)[0];let e="-";this.defaultParams.match(Ta)&&(this.defaultParams.includes("!o2")&&(e="!o2-"),this.defaultParams.includes("!o3")&&(e="!o3-"));this.defaultParams= | |
d+e+this.ciAppendix}this.locale=(null===c||void 0===c?void 0:c.getAttribute(w.LOCALE))||"";for(const e of this.conversionCtas)e.classList.add(A.SO_RPL),this.urlSubidParam&&!this.hasHardSubid(e)&&(this.propagateUrlSubid(e),this.urlSubidParam.match(Ra)&&N.assignPositionSegment(e)),N.assignDeviceSegment(e,this.deviceValue);this.urlSubidParam&&this.propagateUrlSubidInternalLinks();this.urlSubidParam||a||!b||(this.propagateUrlSuffixConversionLinks(),this.propagateUrlSuffixInternalLinks());document.addEventListener(B.GADS_UPDATE_CTA_PARAMS, | |
e=>{const {selector:f,position:h}=e.detail;this.updateCtaParams(f,h)});document.addEventListener(B.GADS_UPDATE_CTA_SUFFIX,e=>{const {suffix:f,resetInternalLinks:h}=e.detail;this.updateCtaSuffixParams(f,h)})}get noCodelessIncentive(){return document.documentElement.hasAttribute(w.NO_CODELESS_INCENTIVE)}async updateCtaSuffixParams(a,b=!1){this.propagateUrlSuffixInternalLinks(b?"":a);b=document.querySelectorAll(Wa.CONVERSION_CTAS);for(const c of b)a?N.addOrReplaceSubidSuffix(c,a):this.urlSubidParam? | |
this.propagateUrlSubid(c):(b=this.defaultParams.includes("!o2")?"!o2":"!o3",b=this.noCodelessIncentive?"":this.defaultParams.split(b)[1],N.addOrReplaceSubidSuffix(c,b))}async propagateUrlSubidInternalLinks(){var a,b;this.adsInternalCtas=document.querySelectorAll(Wa.ADS_INTERNAL_CTAS);for(const c of this.adsInternalCtas)if(c.classList.add("so-rpl"),!this.hasHardSubid(c)){const d=c.href,e=0<d.indexOf("?")?"&":"?";c.href=`${d}${e}${"subid"}=${this.urlSubidParam}`;(null===(a=this.urlSubidParam)||void 0=== | |
a?0:a.includes("{device}"))&&N.assignDeviceSegment(c,this.deviceValue);(null===(b=this.urlSubidParam)||void 0===b?0:b.match(Ra))&&N.assignPositionSegment(c)}}async propagateUrlSuffixConversionLinks(){for(const a of this.conversionCtas){const b=a.href.split(Ta)[0];let c="-";a.href.match(Ta)&&(a.href.includes("!o2")&&(c="!o2-"),a.href.includes("!o3")&&(c="!o3-"));a.href=b+c+this.ciAppendix;a.href.includes("{device}")&&N.assignDeviceSegment(a,this.deviceValue);a.href.match(Ra)&&N.assignPositionSegment(a); | |
"root"!==this.locale&&a.href.match(Sa)&&(a.href=N.assignLocaleLangSegment(this.locale,a.href))}}async propagateUrlSuffixInternalLinks(a=""){this.adsInternalCtas=document.querySelectorAll(Wa.ADS_INTERNAL_CTAS);for(const b of this.adsInternalCtas){const c=new URL(b.href);a?c.searchParams.has("subid")?N.addOrReplaceSubidSuffix(b,a):(c.searchParams.set("suffix",a),b.href=c.href):(this.urlSuffixParam?c.searchParams.set("suffix",this.urlSuffixParam):(c.searchParams.delete("suffix"),this.urlSubidParam&& | |
c.searchParams.set("subid",this.urlSubidParam)),b.href=c.href)}}propagateUrlSubid(a){var b,c,d,e,f;const h=a.href.split("subid")[0]||a.href,l=a.href.split(Ua)[1]||"",n=this.ciAppendix?`!o3${this.ciAppendix}`:a.href.split(Va)[1]||"";let t=this.urlSubidParam;this.noCodelessIncentive||(!l||null!==(b=this.urlSubidParam)&&void 0!==b&&b.includes(l)?!n||null!==(d=this.urlSubidParam)&&void 0!==d&&d.includes(n)||(t=(null===(e=this.urlSubidParam)||void 0===e?0:e.match(Va))?null===(f=this.urlSubidParam)||void 0=== | |
f?void 0:f.replace(this.urlSubidParam.split(Va)[1],n):`${this.urlSubidParam}${n.slice(3)}`):t=(null===(c=this.urlSubidParam)||void 0===c?0:c.match(Ua))?this.urlSubidParam.replace(this.urlSubidParam.split(Ua)[1],l):`${this.urlSubidParam}${l.slice(3)}`);return a.href=`${h}${"subid"}=${t}`}updateCtaParams(a,b){a=document.querySelectorAll(a);for(const c of a)c.href=N.getUrlWithDefaultParams({baseUrl:c.href,position:b,defaultParams:this.defaultParams,noCodelessIncentive:this.noCodelessIncentive,locale:this.locale}), | |
this.urlSubidParam&&this.propagateUrlSubid(c),N.assignDeviceSegment(c,this.deviceValue)}static getUrlWithDefaultParams(a){let {baseUrl:b,defaultParams:c}=a;const {position:d,locale:e,noCodelessIncentive:f}=a;f&&(c=c.replace(Ua,"!o2").replace(Va,"!o3"));if(!b.includes("subid")&&c){a=c;"root"!==e&&(a=this.assignLocaleLangSegment(e,a));if(d)a=a.replace(new RegExp(Ra),d);else return b;-1<b.indexOf("?")&&(a=a.replace("?","&"));b+=a}return b}static dispatchUpdateCtaParamsEvent(a,b=""){document.dispatchEvent(new CustomEvent(B.GADS_UPDATE_CTA_PARAMS, | |
{detail:{selector:a,position:b}}))}static dispatchPropagateSuffixEvent(a="",b=!1){document.dispatchEvent(new CustomEvent(B.GADS_UPDATE_CTA_SUFFIX,{detail:{suffix:a,resetInternalLinks:b}}))}static addOrReplaceSubidSuffix(a,b){const c=new URL(a.href.toLowerCase());var d=c.searchParams.get("subid");if(d){var e=d.search(/![o0]\d/)||-1;e=-1!==e?e+3:d.length;d=d.substring(0,e);b=(b&&"-"!==b.charAt(0)?"-":"")+b.toLowerCase();c.searchParams.set("subid",d+b);a.href=decodeURI(c.href)}}static assignDeviceSegment(a, | |
b){const c=a.href;c.includes("subid")&&c.includes("{device}")&&(a.href=c.replace("{device}",b))}static assignLocaleLangSegment(a,b){return b.replace(Sa,`${a.split("_").reverse().join("-")}`)}static assignPositionSegment(a){var b;const c=null===(b=a.parentElement)||void 0===b?void 0:b.getAttribute(w.CTA_POSITION);c&&(a.href=a.href.replace(Ra,c))}hasHardSubid(a){var b,c;return!(null===(c=null===(b=a.parentElement)||void 0===b?void 0:b.getAttribute(w.CTA_URL))||void 0===c||!c.includes("subid"))}};var O,Za=O||(O={});Za.CARD_SELECTOR="gads-choose-incentives-offer";Za.INCENTIVES_BANNER="gads-incentives-banner.cyo";Za.IN_PAGE_BANNER_UNSELECTED="gads-in-page-banner.cyo-unselected";Za.IN_PAGE_BANNER_SELECTED="gads-in-page-banner.cyo-selected";Za.IN_PAGE_BANNER_CLAIMED="gads-in-page-banner.cyo-claimed";var $a={AED:{symbol:"\u062f.\u0625.",symbolNative:"\u062f.\u0625.",code:"AED",divisor:1,divisorSymbol:"\u062f\u0631\u0647\u0645"},ARS:{symbol:"AR$",symbolNative:"$",code:"ARS"},AUD:{symbol:"AU$",symbolNative:"$",code:"AUD"},BRL:{symbol:"R$",symbolNative:"R$",code:"BRL"},CAD:{symbol:"CA$",symbolNative:"$",code:"CAD"},CHF:{symbol:"Fr.",symbolNative:"\u20a3",code:"CHF"},CNY:{symbol:"CN\u00a5",symbolNative:"\u5143",code:"CNY"},EUR:{symbol:"\u20ac",symbolNative:"\u20ac",code:"EUR"},GBP:{symbol:"\u00a3", | |
symbolNative:"\u00a3",code:"GBP"},ILS:{symbol:"\u20aa",symbolNative:"\u20aa",code:"ILS"},INR:{symbol:"Rs.",symbolNative:"\u20b9",code:"INR"},JPY:{symbol:"\u00a5",symbolNative:"\u00a5",code:"JPY",divisor:1E4,divisorSymbol:"\u4e07\u5186"},KRW:{symbol:"\u20a9",symbolNative:"\u20a9",code:"KRW",divisor:1E4,divisorSymbol:"\ub9cc\uc6d0"},MXN:{symbol:"MX$",symbolNative:"$",code:"MXN"},PLN:{symbol:"z\u0142",symbolNative:"z\u0142",code:"PLN"},TRY:{symbol:"TL",symbolNative:"\u20ba",code:"TRY"},UAH:{symbol:"\u20b4", | |
symbolNative:"\u0433\u0440\u043d",code:"UAH"},USD:{symbol:"$",symbolNative:"$",code:"USD"}},fa={ar_ae:{currencyCode:"AED",format:"{units} {divisorSymbol}"},de_ch:{currencyCode:"CHF",format:"{code} {units}"},de_de:{currencyCode:"EUR",format:"{units} {symbolNative}"},en_au:{currencyCode:"AUD",format:"{symbolNative}{units}"},en_ca:{currencyCode:"CAD",format:"{symbolNative}{units} {code}"},en_in:{currencyCode:"INR",format:"{symbolNative}{units}"},en_uk:{currencyCode:"GBP",format:"{symbolNative}{units}"}, | |
en_us:{currencyCode:"USD",format:"{symbolNative}{units}"},"es-419_ar":{currencyCode:"ARS",format:"{units} {code}",thousandsSeparator:"."},es_es:{currencyCode:"EUR",format:"{units} {symbolNative}"},es_us:{currencyCode:"USD",format:"{symbolNative}{units}",thousandsSeparator:","},"es-419_cl":{currencyCode:"USD",format:"{code} {symbolNative}{units}",thousandsSeparator:","},"es-419_co":{currencyCode:"USD",format:"{code} {symbolNative}{units}",thousandsSeparator:","},"es-419_mx":{currencyCode:"MXN",format:"{code} {units}", | |
thousandsSeparator:","},"es-419_pe":{currencyCode:"USD",format:"{code} {symbolNative}{units}",thousandsSeparator:","},fr_ca:{currencyCode:"CAD",format:"{symbolNative}{units} {code}"},fr_fr:{currencyCode:"EUR",format:"{units} {symbolNative}"},it_it:{currencyCode:"EUR",format:"{units} {symbolNative}"},iw_il:{currencyCode:"ILS",format:"{symbolNative}{units}"},ja_jp:{currencyCode:"JPY",format:"{units} {divisorSymbol}",thousandsSeparator:","},ko_kr:{currencyCode:"KRW",format:"{units}{divisorSymbol}"}, | |
nl_nl:{currencyCode:"EUR",format:"{units} {symbolNative}"},pl_pl:{currencyCode:"PLN",format:"{units} {code}"},"pt-BR_br":{currencyCode:"BRL",format:"{symbolNative}{units}",thousandsSeparator:"."},tr_tr:{currencyCode:"TRY",format:"{units} {symbol}"},uk_ua:{currencyCode:"UAH",format:"{units} {symbolNative}",thousandsSeparator:","},"zh-CN_cn":{currencyCode:"CNY",format:"{units}{symbolNative}"}};var ab,ea=(null===(ab=document.querySelector("html"))||void 0===ab?void 0:ab.getAttribute("locale"))||"",bb={TARGET:0,AWARD:1},da={ar_ae:[[1600,1600],[5E3,3500],[9600,5E3]],de_ch:[[400,400],[1200,800],[2400,1200]],de_de:[[400,400],[1200,800],[2400,1200]],en_au:[[600,600],[1800,1200],[3600,1800]],en_ca:[[600,600],[1800,1200],[3600,1800]],en_in:[[2E4,2E4],[6E4,4E4],[12E4,6E4]],en_uk:[[400,400],[1200,800],[2400,1200]],en_us:[[500,500],[1500,1E3],[3E3,1500]],"es-419_ar":[[65E3,65E3],[2E5,125E3],[39E4, | |
195E3]],es_es:[[400,400],[1200,800],[2400,1200]],es_us:[[500,500],[1500,1E3],[3E3,1500]],"es-419_cl":[[350,350],[1E3,700],[2100,1E3]],"es-419_co":[[350,350],[1E3,700],[2100,1E3]],"es-419_mx":[[7E3,7E3],[2E4,15E3],[42E3,2E4]],"es-419_pe":[[350,350],[1E3,700],[2100,1E3]],fr_ca:[[600,600],[1800,1200],[3600,1800]],fr_fr:[[400,400],[1200,800],[2400,1200]],it_it:[[400,400],[1200,800],[2400,1200]],iw_il:[[1500,1500],[4500,3E3],[9E3,4500]],ja_jp:[[6E4,6E4],[18E4,12E4],[36E4,18E4]],ko_kr:[[6E5,6E5],[18E5, | |
12E5],[36E5,18E5]],nl_nl:[[400,400],[1200,800],[2400,1200]],pl_pl:[[1200,1200],[3500,2500],[7200,3500]],"pt-BR_br":[[1200,1200],[3500,2500],[7200,3600]],tr_tr:[[5500,5500],[15E3,1E4],[33E3,16500]],uk_ua:[[1E4,1E4],[3E4,2E4],[6E4,3E4]],"zh-CN_cn":[[3E3,3E3],[9E3,6E3],[18E3,9E3]]};ha(0,bb.AWARD);ha(0,bb.TARGET);ha(0,bb.AWARD);ha(0,bb.TARGET);ha(1,bb.AWARD);ha(1,bb.TARGET);ha(2,bb.AWARD);ha(2,bb.TARGET);var cb=class{constructor(){this.marketingClient=null;this.localStorageAccount="0";this.removeURLPilotIncentive=()=>{try{localStorage.getItem("agc.pilot.load")&&localStorage.removeItem("agc.pilot.load")}catch(a){}};this.marketingClient=null;this.marketingClientReady=new Promise(a=>{window.addEventListener(B.LOAD,async()=>{this.removeURLPilotIncentive();await this.onClientReady(a)})})}async onClientReady(a){try{await Promise.race([new Promise(b=>{window.addEventListener(B.AMA_CLIENT_READY,c=>{this.marketingClient= | |
c.detail;b()})}),ia(15E3)])}catch(b){this.marketingClient=null}a()}async getAdsAccounts(){try{await this.marketingClientReady;if(!this.marketingClient)return null;const a=await this.marketingClient.getAdsAccounts();return a?a.customersList:null}catch(a){return null}}async loadUserInfo(){try{return await this.marketingClientReady,this.marketingClient?await this.marketingClient.loadUserInfo():null}catch(a){return null}}async callChooseYourOwnIncentiveOffer(a,b){await this.marketingClientReady;if(this.marketingClient)try{return await this.marketingClient.callChooseYourOwnIncentiveOffer(a, | |
b)}catch(c){}}async recordInPageInteraction(a,b,c){await this.marketingClientReady;if(this.marketingClient)return await this.marketingClient.recordInPageInteraction(a,b,c)}async setMarketingClientUser(a){await this.marketingClientReady;this.marketingClient&&this.marketingClient.setAuthUser(a)}},db=new cb;var eb=class{constructor(){this.adsGuideEnabled=!1;this.adsGuideEnabled=null!==document.querySelector("gads-ads-guide");this.initChatbot()}loadScript(a,b,c){const d=document.createElement("script");d.crossOrigin="use-credentials";d.src=a;d.onload=b;c&&(d.onerror=c);document.head.appendChild(d)}dispatchLoadedEvent(a){document.dispatchEvent(new CustomEvent(B.CHATBOT_LOADED,{detail:{adsGuideEnabled:a}}))}loadAdsGuide(){this.loadScript("https://www.gstatic.com/greentea/adsguide/prod/v1/web/main.dart.js", | |
()=>{window.adsguide.isEnabled(a=>{a?this.dispatchLoadedEvent(a):this.deleteAdsGuideElements()})},()=>{this.deleteAdsGuideElements()})}initChatbot(){this.adsGuideEnabled&&this.loadAdsGuide();document.addEventListener(B.CHATBOT_LOADED,()=>{this.bindEvents();this.unhideButtons()})}bindEvents(){if(this.adsGuideEnabled){var a=document.querySelectorAll('[data-g-cta-name="signin"]');for(const b of a)b.addEventListener(B.CLICK,()=>{db.recordInPageInteraction("AGCCaptureSignInCtaButton",{action:"ACTION_CLICK"})}); | |
a=document.querySelectorAll('[data-g-cta-name="startnow"]');for(const b of a)b.addEventListener(B.CLICK,()=>{db.recordInPageInteraction("AGCStartNowCtaButton",{action:"ACTION_CLICK"})})}}deleteAdsGuideElements(){var a;null===(a=document.querySelector("gads-ads-guide"))||void 0===a?void 0:a.remove();document.querySelectorAll('button[data-bm-widget-agent-id], [special-triggers="ads_guide"]').forEach(b=>b.remove())}unhideButtons(){if(null!==document.querySelector("gads-ads-guide")){const a=document.querySelectorAll('button[data-bm-widget-agent-id], [special-triggers="ads_guide"]'); | |
for(const b of a)b.classList.remove(A.HIDDEN)}}};var fb=document.querySelector("html"),gb=[];"zh-CN_cn"!==(null===fb||void 0===fb?void 0:fb.getAttribute("locale"))&&gb.push("https://ads.google.com/aw/google_ads_prefetch.js?paths=/aw,/aw_cm,/aw_express/management"); | |
var hb=class{constructor(){window.addEventListener("DOMContentLoaded",()=>{window.setTimeout(()=>{gb.forEach(a=>{this.loadAllAssets_(a)})},5E3)})}loadAllAssets_(a){const b=document.querySelector("script"),c=document.createElement("script");c.async=!0;c.src=a;(null===b||void 0===b?0:b.parentNode)&&b.parentNode.insertBefore(c,b)}};var ib={HATS_API_KEY:"AIzaSyAR-4b6KCht7eStidHlWV3vH77vPviLCFs",LISTNR_PRODUCT_ID:717991,COLOR_SCHEME:1,ZINDEX:1E4,ENABLE_TEST_MODE:!1},jb={ja_jp:"ja"},kb=[{trigger_id:"toTF8YGRE0dViXZ4LDd0RMoA5JSZ",urlLocales:["ja"],urlPath:"/home/"}];var lb=document.querySelector(w.HTML),mb=null===lb||void 0===lb?void 0:lb.getAttribute(w.LOCALE),nb=class{constructor(){mb&&jb[mb]&&window.addEventListener(B.DOM_CONTENT_LOADED,()=>{this.initialize()})}initialize(){let a=window.location.pathname;const b=window.help.service.Lazy.create(ib.LISTNR_PRODUCT_ID,{apiKey:ib.HATS_API_KEY,locale:mb&&jb[mb]});b?kb.forEach(c=>{let d=null;if(c.urlPathRegex)d=new RegExp(c.urlPathRegex);else{const e=a.split("/"),f=e.findIndex(h=>"home"===h);a=`/${e.slice(f,e.length).join("/")}`}(c.urlPath=== | |
a||d&&a.match(d))&&c.urlPathExcludes!==a&&mb&&c.urlLocales.includes(jb[mb])&&this.triggerHatsSurvey(b,c.trigger_id,mb)}):window.console.warn("HaTS API not loaded.")}triggerHatsSurvey(a,b,c){window.console.warn("HaTS may be served with ID:",b,c);a.requestSurvey({triggerId:b,enableTestingMode:ib.ENABLE_TEST_MODE,callback:d=>{d.surveyData&&a.presentSurvey({surveyData:d.surveyData,productData:{customData:{Locale:c}},colorScheme:ib.COLOR_SCHEME,customZIndex:ib.ZINDEX})}})}};var ob=class extends M{constructor(){super(...arguments);this.adsGuideLinks=this.adsGuideButtons=null}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()),this.adsGuideButtons=document.querySelectorAll('button[special-triggers="ads_guide"], [data-bm-widget-layout]'),this.adsGuideLinks=document.querySelectorAll('a[special-triggers="ads_guide"]'));document.addEventListener(B.CHATBOT_LOADED,a=>{const b=()=>{a.detail.adsGuideEnabled&&window.adsguide.startChat()};this.addClickListener(this.adsGuideButtons, | |
b);this.addClickListener(this.adsGuideLinks,b)});new eb}addClickListener(a,b){null===a||void 0===a?void 0:a.forEach(c=>{c.addEventListener(B.CLICK,b)})}render(){return m``}};customElements.define("gads-ads-guide",ob);var pb=class extends M{constructor(){super(...arguments);this.copy="";this.checkNav=()=>{document.querySelector(".glue-header--double")&&this.classList.add("under-tier-2-nav")}}get gtmModuleName(){return this.nodeName}get copyText(){return this.getAttribute(w.COPY)||this.copy}connectedCallback(){this.firstElementChild||this.replaceChildren(this.render());this.checkNav()}render(){return m` | |
<section class="glue-page gads-banner"> | |
<div class="gads-banner__container gads-banner__container--desktop"> | |
<p class="glue-font-weight-medium glue-text-center"> | |
${this.copyText}${this.ctaBlock?this.ctaBlock[0]:""} | |
</p> | |
</div> | |
</section> | |
`}};customElements.define("gads-banner",pb);var qb=class extends M{get ctaText(){return this.getAttribute(w.CTA_TEXT)||""}get ctaLabel(){return this.getAttribute(w.CTA_LABEL)||""}get ctaUrl(){const a=this.getAttribute(w.CTA_URL)||"",b=this.getAttribute(w.CTA_POSITION)||"";return N.getUrlWithDefaultParams({baseUrl:a,position:b,defaultParams:this.default_page_params,noCodelessIncentive:this.no_incentive,locale:this.locale})}get ctaHidden(){return this.hasAttribute("cta-hidden")}get ariaLabel(){return this.getAttribute(w.LABEL)||""}get ariaControls(){return this.getAttribute("cta-aria-controls")|| | |
""}get ariaExpanded(){return this.getAttribute("cta-aria-expanded")||""}get ariaHasPopup(){return this.getAttribute("cta-aria-haspopup")||""}get gtmCtaName(){return this.getAttribute(w.GTM_CTA_NAME)||""}get specialTriggers(){return this.getAttribute("special-triggers")||""}get iconType(){return this.getAttribute(w.ICON_TYPE)||""}get iconId(){return this.getAttribute(w.ICON_ID)||""}get chatbotAgentId(){return this.getAttribute(w.CHATBOT_AGENT_ID)||""}get chatbotContextId(){return this.getAttribute(w.CHATBOT_CONTEXT_ID)|| | |
""}get isChatbotButton(){return this.hasAttribute(w.CHATBOT_AGENT_ID)||this.hasAttribute(w.CHATBOT_CONTEXT_ID)}get iconSize(){return this.getAttribute(w.ICON_SIZE)||""}get isTfnButton(){return"PHONE"===this.iconId||"tfn"===this.gtmCtaName}get isIconInline(){return this.hasAttribute("label-icon-inline")}get isButtonHidden(){return this.hasAttribute("hide")}classNameLookup(a){return{high:"glue-button--high-emphasis",medium:"glue-button--medium-emphasis",low:"glue-button--low-emphasis",tonal:"glue-button--tonal", | |
reversed:"glue-button--reversed","reversed-alt":"glue-button--reversed-alternate","glue-icon":"glue-button--icon","glue-icon-right":"glue-button--icon-right","lg-icon":"lg-icon","lg-icon-right":"lg-icon lg-icon-right","lg-icon-top":"lg-icon lg-icon-top"}[a]||""}get classNames(){const a=this.getAttribute("emphasis")||"medium";var b=this.getAttribute("reversed")||"",c=this.getAttribute(w.ICON_TYPE)||"";const d=c.includes("lg-icon")?"":this.classNameLookup(a);b=this.classNameLookup(b);c=this.classNameLookup(c); | |
return`${"inline"===a?"glue-link glue-inline-link":"glue-button"} ${d} ${b} ${c} ${this.isTfnButton?"hidden":""} ${this.isButtonHidden?"hidden":""}`}get iconSizeClassName(){return this.iconSize?p`class-names="glue-icon--${this.iconSize}px"`:""}render(){const a=this.iconType&&this.iconId?p` | |
<div class="icon-wrapper"> | |
<gads-icon icon-id="${this.iconId}" ${this.iconSizeClassName}></gads-icon> | |
</div> | |
`:"",b=p` | |
<div class="gads-button-text__container"> | |
<div class="gads-button-text__headline"> | |
${a} | |
${this.ctaText} | |
</div> | |
<span class="glue-label">${this.ctaLabel}</span> | |
</div> | |
`,c=p` | |
${a} | |
<div class="gads-button-text__container ${a?"glue-text-left":""}"> | |
<span>${this.ctaText}</span> | |
<span class="glue-label">${this.ctaLabel}</span> | |
</div> | |
`,d=()=>this.ctaLabel?this.isIconInline?b:c:p` | |
${a} | |
${this.ctaText} | |
`,e=()=>this.isChatbotButton?this.chatbotAgentId&&this.chatbotContextId?p` | |
<button class="${this.classNames} glue-button--icon hidden" | |
aria-label="${this.ctaLabel}" | |
data-bm-widget-agent-id='${this.chatbotAgentId}' | |
data-bm-widget-context='${this.chatbotContextId}' | |
data-bm-widget-layout="advanced" | |
data-g-cta-name='${this.gtmCtaName?this.gtmCtaName:"chatbot"}' | |
${this.gtmModuleName?`data-g-module-name="${this.gtmModuleName}"`:""}> | |
<div class="icon-wrapper"><gads-icon icon-id="CHAT"></gads-icon></div> | |
<span class="bm-widget-button-text">${this.ctaText}</span> | |
</button> | |
`:p` | |
<span>Missing data for Chatbot: Agent-ID or Context ID</span> | |
`:p` | |
<button class="glue-button ${this.classNames}" | |
${this.ariaLabel?`aria-label="${this.ariaLabel}"`:""} | |
${this.ariaControls?`aria-controls="${this.ariaControls}"`:""} | |
${this.ariaExpanded?`aria-expanded="${this.ariaExpanded}"`:""} | |
${this.ariaHasPopup?`aria-haspopup="${this.ariaHasPopup}"`:""} | |
${this.ctaHidden?'aria-hidden="true" tabindex="-1"':""} | |
${this.gtmCtaName?`data-g-cta-name="${this.gtmCtaName}"`:""} | |
${this.gtmModuleName?`data-g-module-name="${this.gtmModuleName}"`:""} | |
${this.specialTriggers?`special-triggers="${this.specialTriggers}"`:""}> | |
${d()} | |
</button> | |
`,f=this.gtmCtaName?p` | |
<a class="${this.classNames}" | |
href="${this.ctaUrl}" | |
${this.ariaLabel?`aria-label="${this.ariaLabel}"`:""} | |
${this.ctaHidden?'aria-hidden="true" tabindex="-1"':""} | |
${this.gtmCtaName?`data-g-cta-name="${this.gtmCtaName}"`:""} | |
${this.gtmModuleName?`data-g-module-name="${this.gtmModuleName}"`:""} | |
${this.specialTriggers?`special-triggers="${this.specialTriggers}"`:""} | |
${this.setExternalLink(this.ctaUrl)}> | |
${d()} | |
</a> | |
`:p`<span> Missing gtm_cta_name </span>`;return m`${this.ctaUrl?f:e()}`}};customElements.define("gads-button",qb);var rb=class{constructor(){this.currentBp="";this._handlers=[];this.monitor();const a=ja(this.monitor.bind(this),H.SIXTY);window.addEventListener(B.RESIZE,()=>a())}subscribe(a){this._handlers.push(a)}getBpName(a=window.innerWidth){return 600>a?v.SM:1024>a?v.MD:1440>a?v.LG:v.XL}monitor(){const a=this.getBpName(window.innerWidth);if(a!==this.currentBp){for(const b of this._handlers)b.call(this,a);this.currentBp=a}}},P=new rb;var sb=class extends M{constructor(){super(...arguments);this.cards=[];this.carousel_aria_labels={};this.case_study_cards=[];this.carouselCards=[];this.headline="";this.image=null;this.isSingleCard=!1;this.media_alignment="";this.modal_aria_labels=null;this.theme=""}get gtmModuleName(){return this.nodeName.toLowerCase()}get cardsObj(){if(this.case_study_cards&&0<this.case_study_cards.length)return this.case_study_cards;if(this.cards&&0<this.cards.length)return this.cards;const a=this.getAttribute(w.CARDS); | |
if(a)return JSON.parse(k(a));throw Error("No cards provided.");}get backgroundImage(){var a=this.image||this.getAttribute(w.IMAGE);a="string"===typeof a?JSON.parse(k(a)):a;return a.image?a.image.url:null}get headlineText(){return this.getAttribute(w.HEADLINE)||this.headline}get mediaAlignment(){return this.getAttribute("media_alignment")||this.media_alignment||"Right"}get carouselAriaLabels(){const a=this.getAttribute(w.CAROUSEL_ARIA_LABELS)||this.carousel_aria_labels;return!a||"string"!==typeof a&& | |
0===Object.keys(a).length?null:"string"===typeof a?JSON.parse(k(a)):a}get closeModalLabel(){var a=this.modal_aria_labels||this.getAttribute(w.MODAL_ARIA_LABELS);a="string"===typeof a?JSON.parse(k(a)):a;return null===a||void 0===a?void 0:a.aria_close_modal}get themeColor(){let a=this.getAttribute(w.THEME)||this.theme;a||this.backgroundImage||(a="white-theme");return a}render(){1===this.cardsObj.length&&(this.isSingleCard=!0);return m` | |
<section | |
class="glue-text-center glue-spacer-5-top glue-spacer-5-bottom case-study-container ${this.themeColor}" | |
${this.backgroundImage&&!this.themeColor?`style="background-image: url(${this.backgroundImage}=w1); width: 100%"`:""}> | |
<div class="glue-page"> | |
${this.headlineText?p` | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-1 glue-grid__col--span-2-xl"></div> | |
<div class="glue-grid__col glue-grid__col--span-10 glue-grid__col--span-8-xl"> | |
<h2 class="glue-headline glue-headline--headline-2 ${this.ctaBlock?"cta-headline":""}"> | |
<span class="glue-font-weight-medium">${this.headlineText}</span> | |
</h2> | |
${this.ctaBlock?p` <div class="glue-spacer-5-bottom">${this.ctaBlock}</div>`:""} | |
</div> | |
</div>`:""} | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-1 glue-grid__col--span-0-md"></div> | |
<div class="glue-grid__col glue-grid__col--span-10 glue-grid__col--span-12-md"> | |
<gads-carousel | |
${this.backgroundImage?`background-image="${this.backgroundImage}"`:null} | |
cards="${g(JSON.stringify(this.cardsObj))}" | |
cards-per-page="1" | |
${this.carouselAriaLabels?`carousel-aria-labels="${g(JSON.stringify(this.carouselAriaLabels))}"`:null} | |
class="${"case-study"}" | |
${"case-study"} | |
media-alignment="${this.mediaAlignment}" | |
${this.closeModalLabel?`modal-aria-labels="${this.closeModalLabel}"`:null} | |
module-name="${this.gtmModuleName}" | |
${this.isSingleCard?"no-dots":""}> | |
</gads-carousel> | |
</div> | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-case-study-carousel",sb);var tb=(a="")=>(null===a||void 0===a?0:a.match(/https?:\/\/.*?google\.*?com/))?'target="_blank" rel="noopener noreferrer"':(null===a||void 0===a?0:a.match(/https?:\/\//))?'target="_blank" rel="noopener noreferrer nofollow"':"",ub=a=>{var b=a.get(w.BODY);const c=a.get(w.CTA_URL);var d=a.get("first-card-featured"),e=a.get(w.GTM_CTA_NAME),f=a.get(w.GTM_MODULE_NAME);const h=a.get(w.HEADLINE);var l=a.get(w.ICON);d=d&&JSON.parse(k(d));const n=a.has("is-glue-carousel");a=a.get(w.HAS_TRANSPARENCY);l=l?p` | |
<gads-image | |
class="glue-card__asset glue-card__asset--logo" | |
image="${l}" | |
widths="sm:48" | |
aria-hidden="true" | |
${a?w.HAS_TRANSPARENCY:""}> | |
</gads-image>`:"";b=p` | |
<div class="glue-card__content"> | |
<h3 class="glue-headline glue-headline--headline-5">${h}</h3> | |
${b?p`<p class="glue-card__description">${k(b)}</p>`:""} | |
</div> | |
`;e=p` | |
<a class="glue-card tools-card animated-card ${n?"glue-carousel__item":""}" | |
href="${c}" | |
${tb(c)} | |
aria-label="${h}" | |
data-g-cta-name="${e}" | |
data-g-module-name="${f}"> | |
<div class="glue-card__inner ${d?"tools-card__featured":""}"> | |
${l} | |
${b} | |
<div class="glue-card__cta glue-card__cta--arrow"> | |
<span class="glue-button glue-button--low-emphasis glue-button--icon"> | |
<svg class="glue-icon glue-icon--arrow-forward" aria-hidden="true" role="presentation" viewBox="0 0 24 24"> | |
<path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z" /> | |
</svg> | |
</span> | |
</div> | |
</div> | |
</a> | |
`;f=p` | |
<article class="glue-card tools-card animated-card ${n?"glue-carousel__item":""}" | |
aria-label="${h}" | |
data-g-module-name="${f}"> | |
<div class="glue-card__inner ${d?"tools-card__featured":""}"> | |
${l} | |
${b} | |
</div> | |
</article> | |
`;return c?e:f},vb={budgetCard:a=>{const b=a.get(w.BODY),c=a.get(w.HEADLINE),d=a.get(w.IMAGE);a=a.get(w.HAS_TRANSPARENCY);return p` | |
<article class="budget-card glue-card glue-card-border"> | |
<div class="glue-card__inner"> | |
<gads-image class="glue-card__asset glue-card__asset--logo" | |
image="${d}" widths="xl:84,lg:84,md:84,sm:60" | |
aria-hidden="true" | |
${a?w.HAS_TRANSPARENCY:""}></gads-image> | |
<div class="glue-card__content"> | |
<h3 class="glue-headline glue-headline--headline-3"> | |
<span class="glue-font-weight-medium">${c}</span> | |
</h3> | |
<p class="glue-card__description glue-body--large">${b}</p> | |
</div> | |
</div> | |
</article> | |
`},calloutCard:a=>{var b=a.get(w.BACKGROUND_COLOR),c=a.get(w.COPY);c=c?k(c):null;var d=a.get("cta-button");d=d?JSON.parse(k(d)):null;const e=a.get(w.HEADLINE);a=a.has("spotlight");const f=!(null===d||void 0===d||!d.text),h=!f&&d&&!!Object.keys(d).length,l=f||h?`a href="${null===d||void 0===d?void 0:d.url}" ${tb(null===d||void 0===d?void 0:d.url)} aria-label="${null===d||void 0===d?void 0:d.aria_description}"`:"div",n=p` | |
<div class="glue-card__cta glue-card__cta--arrow"> | |
<div class="glue-button glue-button--low-emphasis"> | |
<gads-button cta-hidden cta-text="${null===d||void 0===d?void 0:d.text}" emphasis="low" | |
icon-type="glue-icon-right" icon-id="${null===d||void 0===d?void 0:d.icon_id}" | |
label="${null===d||void 0===d?void 0:d.label}"></gads-button> | |
</div> | |
</div> | |
`,t=p` | |
<${l} class="glue-card tout-card"> | |
<div class="glue-card__inner ${b?`${b}-background`:""}"> | |
<div class="glue-card__content"> | |
<h3 class="glue-headline glue-headline--headline-5"> | |
<span class="glue-font-weight-medium">${e}</span> | |
</h3> | |
${c?p` | |
<p class="glue-card__description">${c}</p> | |
`:null} | |
</div> | |
${f?n:""} | |
</div> | |
</${l}> | |
`;b=p` | |
<${l} class="glue-card spotlight-card"> | |
<div class="glue-card__inner ${b?`${b}-background`:""}"> | |
<div class="glue-card__content ${h?"":"no-arrow"}"> | |
<h3 class="glue-eyebrow"> | |
<span class="icon-container"> | |
<gads-icon icon-id="LIGHTBULB" class-names="lightbulb glue-icon--20px"></gads-icon> | |
</span> | |
${e} | |
</h3> | |
<div class="glue-card__description"> | |
${c} | |
${f?p`<span class="glue-link glue-inline-link">${null===d||void 0===d?void 0:d.label}</span>`:""} | |
</div> | |
</div> | |
${h?n:""} | |
</div> | |
</${l}> | |
`;return a?b:t},carouselCards:a=>ub(a),caseStudyCard:a=>{function b(K){var I,C;const Y=a.get(w.HAS_TRANSPARENCY);return(null===e||void 0===e?0:e.headline)?p` | |
<div class="callout-container callout-${K} callout-${e.color} ${t}"> | |
<div class="callout-header"> | |
<span class="callout-headline glue-font-weight-medium">${e.headline}</span> | |
${e.icon_enabled?p` | |
${(null===(I=e.icon_image.image)||void 0===I?0:I.url)?p` | |
<gads-image | |
class="icon-circle" | |
image="${null===(C=e.icon_image.image)||void 0===C?void 0:C.url}" | |
widths="sm:60" | |
aria-hidden="true"> | |
${Y?w.HAS_TRANSPARENCY:""}> | |
</gads-image> | |
`:p` | |
<div class="icon-circle"> | |
<span class="arrow-top"> | |
<svg width="14" height="17" viewBox="0 0 14 17" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
<path d="M7.00247 3.31817L12.1561 8.47185L13.7393 6.87747L7.00247 0.140625L0.265625 6.87747L1.84878 8.46062L7.00247 3.31817ZM0.265625 14.8157L1.84878 16.3989L7.00247 11.2564L12.1561 16.4101L13.7393 14.8157L7.00247 8.07887L0.265625 14.8157Z"/> | |
</svg> | |
</span> | |
</div>`} | |
`:""} | |
</div> | |
<div> | |
<span>${e.copy}</span> | |
</div> | |
</div> | |
`:""}const c=a.get(w.MEDIA_ALIGNMENT);var d=a.get(w.CALLOUT);const e=d?JSON.parse(k(d)):null;d=(d=a.get("cta-button"))?JSON.parse(k(d)):null;var f=a.get(w.GTM_MODULE_NAME),h=a.get(w.LOGO_IMAGE);h=h?JSON.parse(k(h)):null;var l=a.get(w.IMAGES);l=l?JSON.parse(k(l)):null;const n="Right"===c,t="Right"===c?"callout-right":"callout-left",u=a.get(w.MODAL_ARIA_LABELS);var q=a.get(w.YOUTUBE_DATA);const y=q?JSON.parse(k(q)):null;q=1==(null===l||void 0===l?void 0:l.length)?"image-container-single":"";const x= | |
p` | |
<gads-image | |
images="${g(JSON.stringify(l))}" | |
widths="xl:535,lg:534,md:943,sm:543" | |
lazy> | |
</gads-image> | |
`;f=y&&y.url?p` | |
<gads-video | |
cta="${g(JSON.stringify(d))}" | |
${u?`modal-aria-labels="${u}"`:null} | |
module-name="${f}" | |
video-id="${y.url}" | |
youtube-data="${g(JSON.stringify(y))}"> | |
</gads-video>`:d&&d.url?p` | |
<gads-button | |
cta-text="${d.text}" | |
cta-url="${d.url}" | |
cta-name="${d.gtm_cta_name}" | |
emphasis="${d.emphasis}" | |
icon-id="${d.icon_id}" | |
icon-type="${d.icon}" | |
label="${d.aria_description}" | |
module-name="${f}"> | |
</gads-button> | |
`:null;return p` | |
<div class="glue-card glue-card-border glue-carousel__item case-study-card ${(null===l||void 0===l?0:l.length)?"image-carousel-container":"no-image-container"}"> | |
<div class="glue-card__inner glue-text-center card-container" data-media-alignment="${c}"> | |
${(null===l||void 0===l?0:l.length)?p` | |
<div class="image-container image-container-left ${q}"> | |
${x} | |
${b("desktop")} | |
</div> | |
`:""} | |
<div class="info-container ${h?"":"no-logo"}"> | |
<div class="glue-spacer-5-top"> | |
${(null===h||void 0===h?0:h.length)?p` | |
<div class="logo-image ${(null===l||void 0===l?0:l.length)?"has-image":""}"> | |
<gads-image | |
images="${g(JSON.stringify(h))}" | |
widths="xl:96,lg:64, md:64, sm:64" | |
lazy> | |
</gads-image> | |
</div>`:null} | |
${(null===e||void 0===e?0:e.headline)?b("mobile"):""} | |
</div> | |
<div class="content-container"> | |
<h3 class="glue-headline glue-headline--headline-4"> | |
<span class="glue-font-weight-medium"> | |
${a.get(w.HEADLINE)} | |
</span> | |
</h3> | |
<p class="case-study-body">${a.get(w.BODY)}</p> | |
</div> | |
${null!==l&&void 0!==l&&l.length||null===e||void 0===e||!e.headline?null:b("desktop")} | |
${(null===d||void 0===d?0:d.text)?p` | |
<div class="icon-container"> | |
${f} | |
</div> | |
`:""} | |
</div> | |
${n&&(null===l||void 0===l?0:l.length)?p` | |
<div class="image-container image-container-right"> | |
${x} | |
${b("desktop")} | |
</div> | |
`:""} | |
</div> | |
</div> | |
`},categoryNavigationCard:a=>{const b=a.get(w.BODY),c=a.get(w.HEADLINE),d=a.get(w.IMAGE),e=a.get(w.CTA_URL),f=a.get(w.GTM_CTA_NAME),h=a.get(w.GTM_MODULE_NAME);a=a.get(w.HAS_TRANSPARENCY);return p` | |
<a href="${e}" class="cat-nav-card glue-card glue-card-border" ${tb(e)} data-g-cta-name="${f}" data-g-module-name="${h}"> | |
<article class="glue-card__inner"> | |
<gads-image class="logo" | |
image="${d}" | |
widths="xl:100,lg:100,md:100,sm:100" | |
aria-hidden="true" | |
${a?w.HAS_TRANSPARENCY:""} | |
></gads-image> | |
<div class="glue-card__content"> | |
<h3 class="glue-headline glue-headline--headline-5">${c}</h3> | |
<p>${b}</p> | |
</div> | |
</article> | |
</a> | |
`},featureCard:a=>{const b=a.get(w.BACKGROUND_COLOR),c=a.get(w.BODY);var d=a.get(w.CTA_BLOCK),e=d?JSON.parse(k(d))[0]:null;const f=a.get(w.GTM_MODULE_NAME);d=a.get(w.HEADLINE);var h=a.get(w.IMAGES);h=h?JSON.parse(k(h)):null;const l=a.get(w.WIDTHS),n=a.get(w.YOUTUBE_ID);a=a.has("is-glue-carousel");h=n?p`<gads-video video-id="${n}" poster-images="${g(JSON.stringify(h))}" poster-icon-color="play-button-white" widths="${l}"></gads-video>`:p`<gads-image images="${g(JSON.stringify(h))}" widths="${l}" round-corners lazy></gads-image>`; | |
e=e&&e.text?p` | |
<gads-button | |
cta-text="${e.text}" | |
cta-url="${e.url}" | |
cta-name="${e.gtm_cta_name}" | |
emphasis="${e.emphasis}" | |
icon-id="${e.icon_id}" | |
label="${e.aria_description}" | |
module-name="${f}" | |
${e.hide?"cta-hidden hide":""}> | |
</gads-button> | |
`:"";return p` | |
<div class="${b?`background-color-${b}`:""} ${a?"glue-carousel__item glue-card":""}"> | |
${h} | |
<article class="feature-body glue-text-left glue-spacer-3-top"> | |
<h3 class="glue-headline glue-headline--headline-5 glue-spacer-1-bottom feature-headline"> | |
<span class="glue-font-weight-medium">${d}</span> | |
</h3> | |
<p class="glue-spacer-2-bottom feature-body">${c}</p> | |
<div class="glue-spacer-3-bottom feature-link"> | |
${e} | |
</div> | |
</article> | |
</div> | |
`},incentivesCard:a=>{const b=a.get(w.BODY),c=a.get(w.HEADLINE),d=a.get(w.SUBHEADLINE),e=a.get(w.EYEBROW),f=a.get("flip-subheadline"),h=a.get("strikethrough");a=()=>h?`<s class="strikethrough">${h}</s>`:"";return p` | |
<div class="glue-card incentives-card" tabindex="0" role="checkbox" aria-checked="false"> | |
<div class="glue-card__inner"> | |
<div class="glue-text-center glue-card__content"> | |
<div class="checkmark"> | |
<gads-icon icon-id="CHECKMARK" class-names="checkmark-icon glue-icon--24px"></gads-icon> | |
</div> | |
<div class="eyebrow-container"> | |
<span class="offer-eyebrow glue-font-weight-medium">${null===e||void 0===e?void 0:e.toUpperCase()}</span> | |
</div> | |
<div class="card-desktop-container glue-spacer-1-top glue-spacer-1-bottom"> | |
${f?`<span class="glue-blue-text glue-font-weight-bold flip-headline">${d}</span>`:""} | |
<h3 class="glue-headline glue-headline--headline-3 glue-blue-text"> | |
${a()} | |
<span class="glue-font-weight-bold">${c}</span> | |
</h3> | |
${f?"":`<span class="glue-blue-text glue-font-weight-bold">${d}</span>`} | |
</div> | |
<h3 class="glue-headline glue-headline--headline-3 glue-blue-text card-mobile-headline glue-spacer-1-top glue-spacer-1-bottom"> | |
<span class="glue-font-weight-medium">${f?`${d} `:""}${a()} ${c}${f?"":` ${d}`}</span> | |
</h3> | |
<p class="card-body">${b}</p> | |
</div> | |
</div> | |
</div> | |
`},productCard:a=>{const b=a.get(w.BODY),c=a.get(w.CTA_BLOCK),d=a.get(w.HEADLINE);a=a.get(w.IMAGES);a="string"===typeof a?JSON.parse(k(a)):a;return p` | |
<div class="product-card animated-card"> | |
<div class="glue-card"> | |
<div class="glue-card__inner glue-text-center"> | |
${a?p` | |
<gads-image images="${g(JSON.stringify(a))}" widths="xl:340,lg:340,md:446,sm:340" lazy></gads-image> | |
`:null} | |
<div class="glue-card__content"> | |
<h3 class="glue-headline glue-headline--headline-5">${d}</h3> | |
${b?p`<p class="glue-card__description">${k(b)}</p>`:""} | |
</div> | |
${c?p` | |
<div class="glue-card__cta"> | |
${c} | |
</div> | |
`:null} | |
</div> | |
</div> | |
</div> | |
`},resourceGoalCard:a=>{const b=a.get(w.BODY);var c=a.get(w.CTA),d=a.get(w.IMAGE);const e=a.get(w.GTM_MODULE_NAME);if(d&&c)return c=JSON.parse(k(c))[0],d=JSON.parse(k(d)),a=a.get(w.INDEX),p` | |
<a class="resource-card-container" href="${c.url}" aria-labelledby="resource-card-headline__${a}" | |
${tb(c.url)} data-g-cta-name="${c.gtm_cta_name}" data-g-module-name="${e}"> | |
<gads-image image="${d.image.url}" widths="lg:503,md:445,sm:319" | |
alt-text="${d.aria_description}" image-class="resource-card"></gads-image> | |
<div class="copy-container"> | |
<p id="resource-card-headline__${a}" class="glue-headline glue-headline--headline-5"> | |
${b} | |
</p> | |
<div class="cta-block"> | |
<gads-button cta-hidden cta-text="${c.text}" emphasis="${c.emphasis}" | |
icon-type="${c.icon}" icon-id="${c.icon_id}" label="${c.aria_description}" | |
cta-name="${c.gtm_cta_name}" module-name="${e}"></gads-button> | |
</div> | |
</div> | |
</a> | |
`;throw Error("An Image is required for Resource goals cards");},stackedCard:a=>{const b=a.get(w.BODY),c=a.get(w.HEADLINE);var d=a.get(w.IMAGES);d=d?JSON.parse(k(d)):null;a=a.get(w.WIDTHS);return p` | |
<article class="glue-carousel__item glue-card"> | |
<div aria-label="${c}" class="glue-card__inner"> | |
${d?p` | |
<gads-image | |
images="${g(JSON.stringify(d))}" | |
widths="${a}" | |
lazy | |
round-corners> | |
</gads-image> | |
`:null} | |
<div class="glue-text-center glue-spacer-3-top"> | |
<h3 class="glue-headline glue-headline--headline-5 glue-spacer-2-bottom animated-card-title"> | |
<span class="glue-font-weight-medium">${c}</span> | |
</h3> | |
<p class="card-body">${b}</p> | |
</div> | |
</div> | |
</article> | |
`},staggeredCard3UpCard:a=>{const b=a.get(w.IMAGE),c=a.get(w.BODY),d=a.get(w.HEADLINE);a=a.get(w.HAS_TRANSPARENCY);return p` | |
<article class="staggered-card3-up-card glue-card"> | |
<div class="glue-card__inner"> | |
<gads-image class="asset" | |
image="${b}" | |
widths="xl:64,lg:64,md:64,sm:64" | |
aria-hidden="true" | |
${a?w.HAS_TRANSPARENCY:""} | |
></gads-image> | |
<div class="content"> | |
<h3 class="glue-headline glue-headline--headline-4"> | |
<span class="glue-font-weight-medium">${d}</span> | |
</h3> | |
<p class="glue-card__description">${c}</p> | |
</div> | |
</div> | |
</article> | |
`}};vb.toolsCard=ub;var wb=class extends M{render(){const a=this.getAttribute("card-type");if(a){const b=new Map;Array.from(this.attributes).forEach(c=>{c.name===w.CTA_URL&&(c.value=this.relativizeKintaroLink(c.value));b.set(c.name,c.value)});this.ctaInfo&&b.set(w.CTA_BLOCK,this.ctaBlock);return m` | |
${vb[a](b)} | |
`}throw Error("The card-type attribute has not been supplied.");}};customElements.define("gads-card",wb);var xb=class extends M{constructor(){super(...arguments);this._panelPadding=24;this._panelMemo=[];this._animation=void 0;this.animated_text_items=[];this.bg_color="";this.carousel_aria_labels={};this.media_alignment=this.headline=this.copy=""}connectedCallback(){let a=this.querySelector(".panels");a||(this.replaceChildren(this.render()),a=this.querySelector(".panels"));this._panelList=null===a||void 0===a?void 0:a.querySelectorAll(".panel");const b=null===a||void 0===a?void 0:a.querySelectorAll("a"); | |
b&&b.forEach(c=>{c.addEventListener(B.FOCUS,({target:d})=>{d=d.closest("li");const e=null===d||void 0===d?void 0:d.classList.contains(A.ACTIVE);d&&!e&&this.goToPanel(d);this._animation&&this._animation.pause()})});this._panelList&&this._panelList.forEach(c=>{c.addEventListener(B.CLICK,({target:d})=>{d.classList.contains("main-copy-item")&&(this.goToPanel(d),this._animation&&this._animation.pause())});c.addEventListener(B.BLUR,()=>{this._animation&&this._animation.play()});c.addEventListener(B.FOCUS, | |
({target:d})=>{this.goToPanel(d);this._animation&&this._animation.pause()})});a.addEventListener(B.MOUSEOVER,()=>{this._animation&&this._animation.pause()});a.addEventListener(B.MOUSELEAVE,()=>{this._animation&&this._animation.play()});if(r.INTERSECTION_OBS in window){const c=new IntersectionObserver((d=>{for(const e of d)e.isIntersecting&&(d=this.querySelector(".active"),this.startIndicator(d),c.unobserve(this))}).bind(this),{threshold:.5});c.observe(this)}P.subscribe(c=>{const {XL:d,LG:e}=v;c=[d, | |
e].includes(c);const f=ja(this.updatePanelHeight.bind(this),35);c&&(this.updatePanelHeight(),window.addEventListener(B.RESIZE,()=>f()))});window.addEventListener(B.LOAD,()=>{r.GLUE in window&&(a.classList.add("js-connected"),this.updatePanelHeight(),this.pauseIndicator())});r.MATCH_MEDIA in window&&window.matchMedia("(orientation: portrait)").addEventListener(B.CHANGE,()=>{this.updatePanelHeight()});this.setBackgroundColor()}setBackgroundColor(){this.classList.add(`bg-${this.firstElementChild.dataset.bgColor}`)}goToPanel(a){const b= | |
this.querySelector(".active"),c=this.querySelector(`#${null===b||void 0===b?void 0:b.id}-image`),d=this.querySelector(`#${a.id}-image`);b&&b.classList.replace(A.ACTIVE,"inactive");a.classList.replace("inactive",A.ACTIVE);c&&c.classList.add("hidden");d&&d.classList.remove("hidden");this.updatePanelHeight()}updatePanelHeight(){var a;this.clearIndicator();var b=this.querySelectorAll(".inactive");const c=this.querySelector(".active");for(var d of b)d.style.height=`${d.firstElementChild.offsetHeight}px`; | |
b=c.firstElementChild;d=null===(a=c.firstElementChild)||void 0===a?void 0:a.nextElementSibling;c.style.height=`${b.offsetHeight+d.offsetHeight+this._panelPadding}px`;r.ANIMATE in HTMLElement.prototype&&this.startIndicator(c)}startIndicator(a){this._animation=a.animate({top:["-100%","0%"]},{duration:8E3,pseudoElement:"::after"});this.indicatorFinishedHandler()}pauseIndicator(){this._animation&&this._animation.pause()}clearIndicator(){this._animation&&this._animation.cancel()}indicatorFinishedHandler(){this._animation&& | |
this._animation.addEventListener(B.FINISH,()=>{if(this._panelList)for(const [a,b]of this._panelList.entries())if(b.classList.contains(A.ACTIVE)){this.goToPanel(a<this._panelList.length-1?this._panelList[a+1]:this._panelList[0]);break}})}get gtmModuleName(){return this.nodeName}get backgroundColor(){return this.getAttribute("bg-color")||this.bg_color}get mainHeadline(){return this.headline||this.getAttribute(w.HEADLINE)||""}get mainCopy(){return this.copy||this.getAttribute(w.COPY)||""}get mediaAlignment(){return this.media_alignment|| | |
this.getAttribute(w.MEDIA_ALIGNMENT)||""}get panelMemo(){return this._panelMemo}set panelMemo(a){this._panelMemo=a}get panelObjects(){if(this._panelMemo.length)return this._panelMemo;let a=this.getAttribute("animated-text-items")||this.animated_text_items;if("string"===typeof a)try{a=JSON.parse(k(a))}catch(b){throw Error("Card info is in an incompatible format");}Array.isArray(a)&&(this._panelMemo=a.map(b=>{const {body:c,title:d}=b;return{body:c,images:this.formatMultiImage(b.imgs,!1),title:d}})); | |
return this._panelMemo}get carouselAriaLabels(){const a=this.getAttribute(w.CAROUSEL_ARIA_LABELS)||this.carousel_aria_labels;return!a||"string"!==typeof a&&0===Object.keys(a).length?null:"string"===typeof a?JSON.parse(k(a)):a}render(){const a="Right"===this.mediaAlignment,b=a?"glue-order-2-xl glue-order-2-lg":"glue-order-1-xl glue-order-1-lg";return m` | |
<div class="glue-page" data-bg-color="${this.backgroundColor}"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-2 glue-grid__col--span-1-lg glue-grid__col--span-2-xl"></div> | |
<div class="glue-grid__col glue-grid__col--span-8 glue-grid__col--span-10-lg glue-grid__col--span-8-xl headline-container"> | |
<h2 class="glue-headline glue-headline--headline-2 glue-spacer-2-bottom glue-spacer-1-top animated-headline" aria-label="${this.mainHeadline}"> | |
<span class="glue-font-weight-medium">${this.mainHeadline}</span> | |
</h2> | |
<p class="main-copy">${this.mainCopy}</p> | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-2 glue-grid__col--span-1-lg glue-grid__col--span-2-xl"></div> | |
<div class="glue-grid__col glue-grid__col--span-0-sm glue-grid__col--span-2-md glue-grid__col--span-1"></div> | |
<div class="glue-grid__col glue-grid__col--span-4-sm glue-grid__col--span-8-md glue-grid__col--span-5 ${a?"glue-order-1-xl glue-order-1-lg":"glue-order-2-xl glue-order-2-lg"}"> | |
<div class="panels-container glue-text-center"> | |
<ul class="panels glue-no-bullet" role="list"> | |
${this.panelObjects.map((c,d)=>p` | |
<li id="panel-${d}" class="panel glue-spacer-4-bottom main-copy-item ${0===d?A.ACTIVE:"inactive"}" tabindex="0"> | |
<h3 class="glue-headline glue-headline--headline-5 glue-spacer-2-bottom" aria-label="${c.title} - ${c.images[0].alt}">${c.title}</h3> | |
<p class="glue-spacer-1-bottom panel-body">${c.body}</p> | |
</li> | |
`)} | |
</ul> | |
<div class="main-btn-container glue-spacer-3-bottom"> | |
${this.ctaBlock} | |
</div> | |
</div> | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-5 panel-images-wrapper ${b}" aria-hidden="true"> | |
<div class="panel-images"> | |
${this.panelObjects.map((c,d)=>(c=c.images)?p` | |
<div id="panel-${d}-image" class="panel-image-container ${0===d?"":"hidden"}"> | |
<div class="panel-image"> | |
<gads-image images="${g(JSON.stringify(c))}" widths="xl:504,lg:428" round-corners lazy></gads-image> | |
</div> | |
</div> | |
`:"")} | |
</div> | |
</div> | |
</div> | |
<div class="carousel-container"> | |
<gads-carousel | |
animated-text | |
cards="${g(JSON.stringify(this.panelObjects))}" | |
cards-per-page="1" | |
${this.carouselAriaLabels?`carousel-aria-labels="${g(JSON.stringify(this.carouselAriaLabels))}"`:null} | |
mobile-only | |
></gads-carousel> | |
</div> | |
</div> | |
`}};customElements.define("gads-animated-text",xb);var yb=class extends M{constructor(){var a,b;super(...arguments);this._carousel=null;this._carouselEl=this.querySelector(".glue-carousel");this._carouselListDiv=this.querySelector(".glue-carousel__viewport");this._carouselItems=this.querySelectorAll(".glue-carousel__item");this._modalEls=this.querySelectorAll(".gads-video-modal");this._carouselNav=this.querySelector(".gads-carousel__navigation--container");this._carouselNavPrevBtn=null===(a=this._carouselNav)||void 0===a?void 0:a.firstElementChild; | |
this._carouselNavNextBtn=null===(b=this._carouselNav)||void 0===b?void 0:b.lastElementChild}connectedCallback(){var a,b;this.firstElementChild||(this.replaceChildren(this.render()),this._carouselEl=this.querySelector(".glue-carousel"),this._carouselItems=this.querySelectorAll(".glue-carousel__item"),this._modalEls=this.querySelectorAll(".gads-video-modal"),this._carouselListDiv=this.querySelector(".glue-carousel__viewport"),this._carouselNav=this.querySelector(".gads-carousel__navigation--container"), | |
this._carouselNavPrevBtn=null===(a=this._carouselNav)||void 0===a?void 0:a.firstElementChild,this._carouselNavNextBtn=null===(b=this._carouselNav)||void 0===b?void 0:b.lastElementChild);if(this._carouselEl&&r.GLUE in window){this._carousel=new glue.Carousel(this._carouselEl,{cardsPerPage:this.cardsPerPage,currentSlide:this.startingSlide,cyclical:this.isCyclical,navigation:this.showDots,peekOut:this.peekOut});const c=new window.MutationObserver(d=>{d.forEach(e=>{this.carouselAttrsHandler(e.target)})}); | |
this._carouselItems&&this._carouselItems.forEach(d=>{this.carouselAttrsHandler(d);c.observe(d,{attributeFilter:[w.ARIA_HIDDEN]})});window.addEventListener(B.DOM_CONTENT_LOADED,()=>{this._modalEls&&this._modalEls.forEach(d=>{this._carouselListDiv&&this._carouselListDiv.append(d)})})}P.getBpName()===v.SM&&this._carouselNav&&(this._carouselNav.setAttribute(w.ARIA_HIDDEN,"true"),this._carouselNavPrevBtn&&this._carouselNavNextBtn&&(this._carouselNavPrevBtn.setAttribute(w.TABINDEX,"-1"),this._carouselNavNextBtn.setAttribute(w.TABINDEX, | |
"-1")));P.subscribe(c=>{c=c===v.SM;this._carouselNav&&this._carouselNavPrevBtn&&this._carouselNavNextBtn&&(c?(this._carouselNav.setAttribute(w.ARIA_HIDDEN,"true"),this._carouselNavPrevBtn.setAttribute(w.TABINDEX,"-1"),this._carouselNavNextBtn.setAttribute(w.TABINDEX,"-1")):(this._carouselNav.removeAttribute(w.ARIA_HIDDEN),this._carouselNavPrevBtn.removeAttribute(w.TABINDEX),this._carouselNavNextBtn.removeAttribute(w.TABINDEX)))})}get gtmModuleName(){return this.getAttribute(w.GTM_MODULE_NAME)||this.nodeName.toLowerCase()}get carouselEl(){return this._carouselEl}set carouselEl(a){this._carouselEl= | |
a}get carousel(){return this._carousel}set carousel(a){this._carousel=a instanceof glue.Carousel?a:null}get cardsPerPage(){return Number(this.getAttribute("cards-per-page"))||3}get peekOut(){return!this.hasAttribute("no-peek")}get startingSlide(){return Number(this.getAttribute("start"))||1}get isCyclical(){return this.hasAttribute("cyclical")}get showDots(){return!this.hasAttribute("no-dots")}get cards(){const a=this.getAttribute("cards");return a?JSON.parse(k(a)):null}get isImageOnly(){return this.hasAttribute("image-only")}get isAnimatedText(){return this.hasAttribute("animated-text")}get isFeature3Up(){return this.hasAttribute("feature-3up")}get isCarouselCard(){return this.hasAttribute("carousel-card")}get carouselDescription(){return this.getAttribute("carousel-description")|| | |
""}get isCaseStudy(){return this.hasAttribute("case-study")}get isCaseStudyMobile(){return this.hasAttribute("case-study-mobile")}get isStacked2Up(){return this.hasAttribute("stacked-2up")}get mediaAlignment(){return this.getAttribute(w.MEDIA_ALIGNMENT)||""}get backgroundColor(){return this.getAttribute(w.BACKGROUND_COLOR)||""}get carouselAriaLabels(){const a=this.getAttribute(w.CAROUSEL_ARIA_LABELS);return a?JSON.parse(k(a)):null}get modalAriaLabels(){return this.getAttribute(w.MODAL_ARIA_LABELS)|| | |
""}carouselAttrsHandler(a){a.removeAttribute(w.ARIA_HIDDEN)}imageCardRender(a){return p` | |
<article class="glue-carousel__item glue-card"> | |
<div aria-label="${a.aria_description}"class="glue-card__inner"> | |
<gads-image | |
image="${a.url}" | |
widths="lg:416,md:460,sm:543" | |
lazy> | |
</gads-image> | |
</div> | |
</article> | |
`}animatedTextCardRender(a){return p` | |
<article class="glue-carousel__item glue-card"> | |
<div aria-label="${a.title}" class="glue-card__inner"> | |
<gads-image | |
images="${g(JSON.stringify(a.images))}" | |
widths="xl:503,lg:427,md:450,sm:400" | |
lazy | |
round-corners> | |
</gads-image> | |
<div class="glue-text-center glue-spacer-3-top"> | |
<h3 class="glue-headline glue-headline--headline-5 glue-spacer-2-bottom animated-card-title">${a.title}</h3> | |
<p class="animated-card-body">${a.body}</p> | |
</div> | |
</div> | |
</article> | |
`}feature3UpCardRender(a){return p` | |
<gads-card | |
background-color="${this.backgroundColor}" | |
${a.body?`body="${a.body}"`:null} | |
card-type="featureCard" | |
${Array.isArray(a.cta)&&a.cta.every(b=>b.url)?`cta-block="${g(JSON.stringify(a.cta))}"`:null} | |
${a.headline?`headline="${a.headline}"`:null} | |
headline="${a.headline}" | |
images="${this.formatMultiImage(a.images,!0)}" | |
is-glue-carousel | |
widths="md:459,sm:473" | |
${a.youtube_id?`youtube-id="${a.youtube_id}"`:null}> | |
</gads-card> | |
`}cardCarouselRender(a){return p` | |
<gads-card | |
${a.body?`body="${g(a.body)}"`:null} | |
card-type="toolsCard" | |
${a.gtm_cta_name?`cta-name="${a.gtm_cta_name}"`:null} | |
${a.cta_url?`cta-url="${a.cta_url}"`:null} | |
is-glue-carousel | |
module-name="${this.gtmModuleName}" | |
${a.has_transparency?`has-transparency="${a.has_transparency}"`:null} | |
${a.title?`headline="${a.title}"`:null} | |
${a.icon&&Object.keys(a.icon).length?`icon="${a.icon.url}"`:null}> | |
</gads-card> | |
`}caseStudyCardRender(a){return p` | |
<gads-card | |
${a.body?`body="${a.body}"`:null} | |
${a.data_callout.headline?`callout="${g(JSON.stringify(a.data_callout))}"`:null} | |
card-type="caseStudyCard" | |
${a.cta.text||a.cta.url?`cta-button="${g(JSON.stringify(a.cta))}"`:null} | |
headline="${a.headline}" | |
${a.image.length?`images="${this.formatMultiImage(a.image,!0)}"`:null} | |
${a.logo_image.length?`logo-image="${this.formatMultiImage(a.logo_image,!0)}"`:null} | |
media-alignment="${this.mediaAlignment}" | |
${this.modalAriaLabels?`modal-aria-labels="${this.modalAriaLabels}"`:null} | |
module-name="${this.gtmModuleName}" | |
${a.youtube.url?`youtube-data="${g(JSON.stringify(a.youtube))}"`:null}> | |
</gads-card> | |
`}caseStudyMobileCardRender(a){return p` | |
<gads-card | |
${a.body?`body="${a.body}"`:null} | |
${a.data_callout.headline?`callout="${g(JSON.stringify(a.data_callout))}"`:null} | |
card-type="caseStudyMobileCard" | |
${a.cta.text||a.cta.url?`cta-button="${g(JSON.stringify(a.cta))}"`:null} | |
headline="${a.headline}" | |
${a.image.length?`images="${this.formatMultiImage(a.image,!0)}"`:null} | |
${a.logo_image.length?`logo-image="${this.formatMultiImage(a.logo_image,!0)}"`:null} | |
${this.modalAriaLabels?`modal-aria-labels="${this.modalAriaLabels}"`:null} | |
module-name="${this.gtmModuleName}" | |
${a.youtube.url?`youtube-data="${g(JSON.stringify(a.youtube))}"`:null}> | |
</gads-card> | |
`}stacked2UpCardRender(a){return p` | |
<gads-card | |
${a.body?`body="${a.body}"`:null} | |
card-type="stackedCard" | |
${this.ctaBlock?`cta-button="${g(JSON.stringify(this.ctaBlock))}"`:null} | |
headline="${a.headline}" | |
images="${this.formatMultiImage(a.images,!0)}" | |
widths="sm:550"> | |
</gads-card> | |
`}carouselRender(a){return p` | |
<li> | |
${this.isImageOnly?this.imageCardRender(a):this.isAnimatedText?this.animatedTextCardRender(a):this.isFeature3Up?this.feature3UpCardRender(a):this.isCarouselCard?this.cardCarouselRender(a):this.isCaseStudy?this.caseStudyCardRender(a):this.isCaseStudyMobile?this.caseStudyMobileCardRender(a):this.isStacked2Up?this.stacked2UpCardRender(a):""} | |
</li> | |
`}render(){var a,b,c,d;return this.cards?m` | |
<section class="glue-carousel glue-carousel--cards glue-carousel--has-navigation" aria-label="${this.carouselDescription}"> | |
<div class="glue-carousel__viewport"> | |
<ul class="glue-carousel__list"> | |
${this.cards.map(e=>this.carouselRender(e))} | |
</ul> | |
</div> | |
<div class="${1<this.cards.length?"gads-carousel__navigation--container":"hidden"}"> | |
<button class="glue-carousel__button glue-carousel__button--prev" aria-label="${(null===(a=this.carouselAriaLabels)||void 0===a?void 0:a.aria_go_previous_slide)||""}"> | |
<svg role="presentation" aria-hidden="true" class="glue-icon glue-icon--32px" viewBox="0 0 24 24"><path d="M16.41 5.41L15 4l-8 8 8 8 1.41-1.41L9.83 12" /></svg> | |
</button> | |
<nav class="glue-carousel__navigation" aria-label="${(null===(b=this.carouselAriaLabels)||void 0===b?void 0:b.aria_choose_page)||""}" data-glue-carousel-navigation-label="${(null===(c=this.carouselAriaLabels)||void 0===c?void 0:c.aria_go_slide)||""} $glue_carousel_page_number$"></nav> | |
<button class="glue-carousel__button glue-carousel__button--next" aria-label="${(null===(d=this.carouselAriaLabels)||void 0===d?void 0:d.aria_go_next_slide)||""}"> | |
<svg role="presentation" aria-hidden="true" class="glue-icon glue-icon--32px" viewBox="0 0 24 24"><path d="M7.59 18.59L9 20l8-8-8-8-1.41 1.41L14.17 12" /></svg> | |
</button> | |
</div> | |
</section> | |
`:m``}};customElements.define("gads-carousel",yb);var zb,Ab=zb||(zb={});Ab.KAKAOTALK="kakaotalk";Ab.LINE="line";Ab.WECHAT="wechat";Ab.ZALO="zalo"; | |
var Bb=class extends M{constructor(){super(...arguments);this.chat_widget_provider=null;this.tooltip_text=this.panel_subheadline=this.panel_headline=this.panel_image=this.panel_alt_text=this.mobile_url=this.fab_icon=this.cta_label="";this._chatTooltipCloseButton=document.querySelector("button.chat-widget__tooltip-close-button");this._chatWidgetAnchor=document.querySelector('a[data-chat-widget-layout="floating"]');this._chatWidgetButton=document.querySelector('button[data-chat-widget-layout="floating"]'); | |
this._chatWidgetContainer=document.querySelector("div.chat-widget__container");this._chatWidgetPanel=document.querySelector("div.chat-widget__panel");this._chatWidgetTooltip=document.querySelector("div.chat-widget__tooltip");this._gadsStickyCta=document.querySelector("gads-sticky-cta");this._useLinkedButton=this._emptyPanelData=this._isMobile=!1}connectedCallback(){var a;this.firstElementChild||(this.replaceChildren(this.render()),this._chatTooltipCloseButton=document.querySelector("button.chat-widget__tooltip-close-button"), | |
this._chatWidgetAnchor=document.querySelector('a[data-chat-widget-layout="floating"]'),this._chatWidgetButton=document.querySelector('button[data-chat-widget-layout="floating"]'),this._chatWidgetContainer=document.querySelector("div.chat-widget__container"),this._chatWidgetPanel=document.querySelector("div.chat-widget__panel"),this._chatWidgetTooltip=document.querySelector("div.chat-widget__tooltip"),this._gadsStickyCta=document.querySelector("gads-sticky-cta"));"true"===(null===(a=this._chatWidgetContainer)|| | |
void 0===a?void 0:a.dataset.emptyPanel)&&(this._emptyPanelData=!0);this._useLinkedButton=this._emptyPanelData||this._isMobile;if(!window.navigator.userAgent.includes(r.JSDOM)){const b=()=>{this._chatWidgetButton&&this._chatWidgetTooltip&&this._chatWidgetPanel&&(this._chatWidgetButton.classList.toggle(A.OPEN),this._chatWidgetTooltip.classList.toggle(A.HIDDEN,!0),this._chatWidgetPanel.classList.toggle(A.HIDDEN))};a=()=>{this._chatWidgetTooltip&&this._chatWidgetPanel&&this._chatWidgetTooltip.classList.toggle(A.HIDDEN, | |
!0)};this._isMobile=P.getBpName()===(v.SM||v.MD);this._useLinkedButton=this._emptyPanelData||this._isMobile;this._gadsStickyCta&&this._chatWidgetContainer&&this._chatWidgetContainer.classList.toggle("translate-up",this._isMobile);this._chatWidgetAnchor&&this._chatWidgetButton&&this._chatWidgetPanel&&(this._chatWidgetAnchor.classList.toggle(A.HIDDEN,!this._useLinkedButton),this._chatWidgetButton.classList.toggle(A.HIDDEN,this._useLinkedButton),this._useLinkedButton&&this._chatWidgetPanel.classList.toggle(A.HIDDEN, | |
!0));!this._chatWidgetButton||this._useLinkedButton&&this.mobileUrl||this._chatWidgetButton.addEventListener(B.CLICK,b);this._chatTooltipCloseButton&&this._chatTooltipCloseButton.addEventListener(B.CLICK,a);P.subscribe(c=>{this._isMobile=c===(v.SM||v.MD);this._useLinkedButton=this._emptyPanelData||this._isMobile;this._gadsStickyCta&&this._chatWidgetContainer&&this._chatWidgetContainer.classList.toggle("translate-up",this._isMobile);this._chatWidgetAnchor&&this._chatWidgetButton&&this._chatWidgetPanel&& | |
(this._chatWidgetAnchor.classList.toggle(A.HIDDEN,!this._useLinkedButton),this._chatWidgetButton.classList.toggle(A.HIDDEN,this._useLinkedButton),this._useLinkedButton&&(this._chatWidgetButton.classList.toggle(A.OPEN,!1),this._chatWidgetPanel.classList.toggle(A.HIDDEN,!0)));this._chatWidgetButton&&this.mobileUrl&&this._chatWidgetButton.removeEventListener(B.CLICK,b);this._chatWidgetButton&&!this._useLinkedButton&&this._chatWidgetButton.addEventListener(B.CLICK,b)})}}get chatWidgetProvider(){return this.getAttribute("chat-widget-provider")|| | |
this.chat_widget_provider}get ctaLabel(){return this.getAttribute(w.CTA_LABEL)||this.cta_label}get fabIcon(){const a=this.getAttribute("fab-icon")||this.fab_icon;return"string"===typeof a?JSON.parse(k(a)):a}get mobileUrl(){return this.getAttribute("mobile-url")||this.mobile_url}get panelHeadline(){return this.getAttribute("panel-headline")||this.panel_headline}get panelImage(){const a=this.getAttribute("panel-image")||this.panel_image;return"string"===typeof a?JSON.parse(k(a)):a}get panelImageAltText(){return this.getAttribute("panel-alt-text")|| | |
this.panel_alt_text}get panelSubheadline(){return this.getAttribute("panel-subheadline")||this.panel_subheadline}get tooltipText(){return this.getAttribute("tooltip-text")||this.tooltip_text}get emptyPanelData(){var a;return!(this.panelHeadline&&this.panelSubheadline&&this.panelImageAltText&&(null===(a=this.panelImage)||void 0===a?0:a.url))}render(){var a,b;return m` | |
<div class="chat-widget__container" data-empty-panel="${this.emptyPanelData}"> | |
<button | |
data-chat-widget-layout="floating" | |
data-chat-widget-provider="${this.chatWidgetProvider}" | |
data-g-cta-name="chat-widget-${this.chatWidgetProvider}" | |
data-g-module-name="gads-chat-widget-third-party-${this.chatWidgetProvider}" | |
aria-label="${this.ctaLabel}"> | |
<gads-image aria-hidden="true" image="${this.fabIcon.url}" widths="sm:${this.chatWidgetProvider===zb.ZALO?56:40}" image-class="chat-widget__logo"></gads-image> | |
<gads-icon class-names="glue-icon--social glue-icon--24px" icon-id="CLOSE"></gads-icon> | |
</button> | |
${this.mobileUrl?p`<a | |
href="${this.mobileUrl}" | |
${this.setExternalLink(this.mobileUrl)} | |
data-chat-widget-layout="floating" | |
data-chat-widget-provider="${this.chatWidgetProvider}" | |
data-g-cta-name="chat-widget-${this.chatWidgetProvider}" | |
data-g-module-name="gads-chat-widget-third-party-${this.chatWidgetProvider}" | |
aria-label="${this.ctaLabel}"> | |
<img aria-hidden="true" class="chat-widget__logo" src="${null===(a=this.fabIcon)||void 0===a?void 0:a.url}"> | |
</a>`:""} | |
<div class="chat-widget__tooltip"> | |
<span class="chat-widget__tooltip-text">${this.tooltipText}</span> | |
<button class="chat-widget__tooltip-close-button"> | |
<gads-icon icon-id="CLOSE" class-names="glue-icon--social glue-icon--24px"></gads-icon> | |
</button> | |
</div> | |
<div class="chat-widget__panel hidden"> | |
<gads-image image="${null===(b=this.panelImage)||void 0===b?void 0:b.url}" widths="sm:96" alt-text="${this.panelImageAltText}"></gads-image> | |
<div class="chat-widget__panel-text"> | |
<span class="chat-widget__panel-text chat-widget__panel-text--headline"> | |
${this.panelHeadline} | |
</span> | |
<span class="chat-widget__panel-text chat-widget__panel-text--subheadline"> | |
${this.panelSubheadline} | |
</span> | |
</div> | |
</div> | |
</div> | |
`}};customElements.define("gads-chat-widget-third-party",Bb);var Cb=class extends M{constructor(){super(...arguments);this._imgMemo=[]}get images(){if(this._imgMemo.length)return this._imgMemo;var a=L.htmlImage;if(a.length)return this._imgMemo=a,this.removeAttribute("images"),this._imgMemo;if(a=this.getAttribute(w.IMAGES))return this._imgMemo=JSON.parse(k(a));throw Error("No images provided");}get widths(){return this.getAttribute(w.WIDTHS)||""}get isEagerLoading(){return this.hasAttribute("loading-eager")}get isHighPriority(){return this.hasAttribute("priority-high")}setBreakpoints(a, | |
b){const c=["xl","lg","md","sm"];var d=a.breakpoint;a=c.indexOf(d)+1;d=[d];for(let e=a;e<c.length&&!b.find(f=>f.breakpoint===c[e]);e++)d.push(c[e]);return d.join(",")}setStyle(a){const b=a.global_styling,c=a.rtl_global_styling;a=a.localized_styling;let d=new Map,e="";return b?(d=this.combineStyling(b,d),c&&L.isRtl&&(d=this.combineStyling(c,d)),a&&(d=this.combineStyling(a,d)),d.forEach((f,h)=>{h&&f&&(e+=`${h}:${f};`)}),e.trim()):""}combineStyling(a,b){a.replace(/\n/g,"").replace(/ {2}/g,"").split(";").forEach(c=> | |
{const [d,e]=c.split(":");b.set(d,e)});return b}render(){const a=this.images,b=1<a.length;return m` | |
<section class="editable-image" is-rtl="${L.isRtl}" aria-label="${a[0].alt?a[0].alt:a[0].aria_description}"> | |
${a.map(c=>{var d,e;const f=L.isRtl?null===(d=c.html_image.image_rtl)||void 0===d?void 0:d.url:null===(e=c.html_image.image)||void 0===e?void 0:e.url;if(!f)return console.warn("HTML Image file is missing from KCS."),p`<div class="error-message">HTML Image file is missing from KCS</div>`;d=c.html_image.has_transparency?"has-transparency":"";return p` | |
<editable-image-inner role="img" class="image-wrapper ${b?"image-wrapper--responsive":""}" | |
${b?`breakpoint="${this.setBreakpoints(c,a)}"`:""}> | |
<gads-image | |
image="${f}" | |
widths="${this.widths}" | |
${d} | |
alt-text="${c.alt?c.alt:c.aria_description}" | |
${this.isEagerLoading?"loading-eager":null} | |
${this.isHighPriority?"priority-high":null}> | |
</gads-image> | |
<div class="editable-image--text-wrapper"> | |
${c.html_image.content.map(h=>p` | |
<div class="editable-image--text ${h.id}" | |
style='${this.setStyle(h)}'> | |
<div>${h.text}</div> | |
</div>`)} | |
</div> | |
</editable-image-inner> | |
`})} | |
</section> | |
`}};customElements.define("gads-editable-image",Cb);var Db=class extends M{constructor(){super(...arguments);this.staticImg=this.querySelector("img");this.textWrapper=this.querySelector(".editable-image--text-wrapper")}connectedCallback(){if(r.ANIMATION_FRAME in window){this.staticImg||(this.staticImg=this.querySelector("img"));const a=()=>{var b;if(null!==this.offsetParent){const c=(null===(b=this.parentElement)||void 0===b?void 0:b.clientWidth)||0;this.textWrapper&&(this.textWrapper.style.transform=`scale(${c/600})`)}window.requestAnimationFrame(a)}; | |
window.requestAnimationFrame(a)}}};customElements.define("editable-image-inner",Db);var Eb=class extends M{constructor(){super(...arguments);this.imageMap=null;this.rawData=[]}connectedCallback(){this.firstElementChild||this.replaceChildren(this.render())}get altText(){var a=this.getAttribute("alt-text");if(a)return a;if(a=this.getAttribute(w.IMAGES))if(a=JSON.parse(k(a)),a.length)return a.filter(b=>b.breakpoint===v.XL)[0].alt;return""}get image(){return this.getAttribute(w.IMAGE)||""}get images(){var a;if(this.imageMap)return this.imageMap;var b=this.getAttribute(w.IMAGES);if(b){b= | |
JSON.parse(k(b));const c=new Map;for(const d of b){let e;e=d.html_image&&d.use_html_image&&Object.prototype.hasOwnProperty.call(d.html_image,"content")?d.html_image:d.url;c.set(d.breakpoint,e);c.set(d.url,null===(a=d.has_transparency)||void 0===a?void 0:a.toString())}this.imageMap=c;this.rawData=b;return c}return null}get imageClass(){const a=this.getAttribute("image-class")||"",b=this.hasAttribute("round-corners")&&"round-corners";return`${a}${b?` ${b}`:""}`}get isSingleImage(){return this.hasAttribute(w.IMAGE)}get pictureClass(){return this.getAttribute("picture-class")|| | |
""}get widths(){return this.getAttribute(w.WIDTHS)||""}get widthsMap(){const a=new Map;if(this.widths){const b=this.widths.split(",");for(const c of b){const [d,e]=c.split(":");a.set(d.trim(),e.trim())}}return a}get isEagerLoading(){return this.hasAttribute("loading-eager")}get isHighPriority(){return this.hasAttribute("priority-high")}closestImage(a){var b;const c={lg:v.XL,md:v.LG,sm:v.MD},d=null===(b=this.images)||void 0===b?void 0:b.get(a);return d||a!==v.XL?d||this.closestImage(c[a]):""}createMultiImageSrcset(){var a; | |
if(!this.images)return[""];const b=[];this.widthsMap.forEach((d,e)=>{var f;const h=this.closestImage(e);if("string"===typeof h){const l="true"===(null===(f=this.images)||void 0===f?void 0:f.get(h));b.push(this.sourceMarkup(h,d,e,l))}});const [c]=(null===(a=this.images)||void 0===a?void 0:a.values())||"";a=[...this.widthsMap.keys()].pop()||"xl";"string"===typeof c&&b.push(this.imgMarkup(c,`${this.widthsMap.get(a)}`,this.altText,this.imageClass));return b}createSingleImageSrcset(){const a=[],b=this.hasAttribute(w.HAS_TRANSPARENCY); | |
this.widthsMap.forEach((d,e)=>{a.push(this.sourceMarkup(this.image,d,e,b))});const c=[...this.widthsMap.keys()].pop()||"xl";a.push(this.imgMarkup(this.image,`${this.widthsMap.get(c)}`,this.altText,this.imageClass));return a}htmlImage(){return m` | |
<gads-editable-image | |
images="${g(JSON.stringify(this.rawData))}" | |
widths='${this.widths}' | |
${this.isEagerLoading?"loading-eager":null} | |
${this.isHighPriority?"priority-high":null}> | |
</gads-editable-image> | |
`}imgMarkup(a,b,c,d){return p` | |
<img src="${`${a}=w${b}-rw-v1`}" | |
alt="${g(c)}" | |
${d?`class="${d}"`:""} | |
width="${b}" | |
${this.isEagerLoading?"":'loading="lazy"'} | |
${this.isHighPriority?'fetchpriority="high"':""}> | |
`}sourceMarkup(a,b,c,d){return p` | |
<source srcset="${`${a}=${d?"s0":`w${b}`}-rw-v1${d?"":`, ${a}=w${2*Number(b)}-rw-v1 2x`}`}" | |
width="${b}" | |
media="${this.getMediaBreakpoint(c)}" | |
type="image/webp"> | |
`}render(){var a,b;return(null===(b=null===(a=this.images)||void 0===a?void 0:a.values().next().value)||void 0===b?0:b.content)?this.htmlImage():m` | |
<picture class="${this.pictureClass}"> | |
${this.isSingleImage?this.createSingleImageSrcset():this.createMultiImageSrcset()} | |
</picture> | |
`}};customElements.define("gads-image",Eb);var Fb=class extends M{constructor(){super(...arguments);this._androidEl=this.querySelector(".android-badge");this._appleEl=this.querySelector(".apple-badge")}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()),this._androidEl=this.querySelector(".android-badge"),this._appleEl=this.querySelector(".apple-badge"));var a=(new Oa).getDeviceType();const b=(new Oa).osType();a=a===Ca.IPAD&&b===Aa.MAC_SAFARI;b===Aa.ANDROID&&this._appleEl&&this._appleEl.classList.add(A.HIDDEN); | |
(b===Aa.IOS||a)&&this._androidEl&&this._androidEl.classList.add(A.HIDDEN)}get imageCtaObject(){const a=this.getAttribute("image-cta");return a?JSON.parse(k(a)):a}render(){var a;return m` | |
${null===(a=this.imageCtaObject)||void 0===a?void 0:a.map(b=>{var c=b.url;const d=c.includes("apple.com");c=c.includes("google.com");return p` | |
<a href="${b.url}" | |
aria-label="${b.label}" | |
class="${d?"apple-badge":""} ${c?"android-badge":""}" | |
data-g-cta-name="${b.gtm_cta_name}" | |
data-g-module-name="${this.gtmModuleName.toLowerCase()}" | |
${this.setExternalLink(b.url)}> | |
<gads-image | |
image="${b.image.url}" | |
widths="${d?"sm:160":"sm:178"}" | |
${(null===b||void 0===b?0:b.has_transparency)?w.HAS_TRANSPARENCY:""} | |
></gads-image> | |
</a> | |
`})} | |
`}};customElements.define("gads-image-cta",Fb);var Gb=(a,b=100)=>{let c=!0;return()=>{c&&(a(),c=!1,setTimeout(()=>c=!0,b))}};var Hb=class extends M{constructor(){var a,b;super(...arguments);this._banner=this.querySelector(".incentives-banner");this._bannerMobile=this.querySelector(".incentives-banner__container--mobile");this._bannerCtasArr=this.querySelectorAll(".incentives-banner__container .glue-link");this._isSticky=null===(a=this._banner)||void 0===a?void 0:a.dataset.sticky;this._isModal=null===(b=this._banner)||void 0===b?void 0:b.dataset.modal;this._modalEl=this.querySelector(".incentives-banner-modal");this._modalCloseBtn= | |
this.querySelector(".incentives-banner-modal .glue-modal__close-btn");this.activeBp=!0;this.background_color="blue";this.copy="";this.icon=null;this.is_sticky=!1;this.modal_aria_labels=null;this.modal_copy=this.modal_subheadline=this.modal_headline=this.mobile_copy="";this.modal_cta=[];this.modal_terms_conditions_headline="";this.modal_terms_conditions_items=[];this.opens_modal=!1}get gtmModuleName(){return this.nodeName}get sticky(){return this.getAttribute("is-sticky")||this.is_sticky}get backgroundColor(){return this.getAttribute(w.BACKGROUND_COLOR)|| | |
this.background_color}get iconImage(){var a,b=this.getAttribute(w.ICON)||this.icon;if(!b)return null;b="string"===typeof b?JSON.parse(k(b)):b;return(null===(a=null===b||void 0===b?void 0:b.image)||void 0===a?0:a.url)?b:null}get copyText(){const a=this.getAttribute(w.COPY)||this.copy,b=this.getAttribute("mobile-copy")||this.mobile_copy;return{text:a,mobileText:b}}get opensModal(){return this.getAttribute("opens-modal")||this.opens_modal}get modalText(){const a=this.getAttribute("modal-headline")|| | |
this.modal_headline,b=this.getAttribute("modal-subheadline")||this.modal_subheadline,c=this.getAttribute("modal-copy")||this.modal_copy;var d=this.getAttribute("modal-cta")||this.modal_cta;d=(d="string"===typeof d?JSON.parse(k(d)):d)&&d.map(l=>p`<gads-button ${this.unpackCta(l)}></gads-button>`);var e=this.getAttribute(w.MODAL_ARIA_LABELS)||this.modal_aria_labels;e=(e="string"===typeof e?JSON.parse(k(e)):e)?e.aria_close_modal:"";const f=this.getAttribute("modal-subheadline")||this.modal_terms_conditions_headline; | |
var h=this.getAttribute("modal-tc-items")||this.modal_terms_conditions_items;h="string"===typeof h?JSON.parse(k(h)):h;return{aria_close_modal:e,copy:c,cta:d,headline:a,subheadline:b,tcHeadline:f,tcItems:h}}connectedCallback(){var a,b;this.firstElementChild||(this.replaceChildren(this.render()),this._banner=this.querySelector(".incentives-banner"),this._bannerMobile=this.querySelector(".incentives-banner__container--mobile"),this._bannerCtasArr=this.querySelectorAll(".incentives-banner__container .glue-link"), | |
this._isSticky=null===(a=this._banner)||void 0===a?void 0:a.dataset.sticky,this._modalEl=this.querySelector(".incentives-banner-modal"),this._isModal=null===(b=this._banner)||void 0===b?void 0:b.dataset.modal,this._modalCloseBtn=this.querySelector(".incentives-banner-modal .glue-modal__close-btn"));const c=ja((()=>{200<window.scrollY&&this._bannerMobile.classList.add("incentives-banner--active")}).bind(this),H.TWO_HUNDRED);a=Gb(()=>{const d=200<window.scrollY;"false"===this._isSticky&&d&&this._bannerMobile.classList.remove("incentives-banner--active"); | |
d?c():this._bannerMobile.classList.remove("incentives-banner--active")},H.ONE_HUNDRED);window.addEventListener(B.SCROLL,a);a=()=>{r.GLUE in window&&this._modalEl&&this._bannerCtasArr&&[...this._bannerCtasArr].forEach(d=>{const e=new glue.Modal(this._modalEl,d,this._modalCloseBtn);d.addEventListener(B.CLICK,()=>e.open())})};"true"===this._isModal&&a()}renderIconImage(){try{const a=this.iconImage;return a&&p` | |
<gads-image | |
aria-hidden="true" | |
class="banner-icon" | |
image="${a.image.url||""}" | |
widths="lg:32,md:38,sm:48" | |
${a.has_transparency?"has-transparency":""} | |
></gads-image> | |
`||""}catch(a){return""}}render(){const a=this.modalText;return m` | |
<section class="glue-page incentives-banner" data-modal="${this.opensModal}" data-sticky="${this.sticky}"> | |
<div class="incentives-banner__container incentives-banner__container--mobile incentives-banner__container--${this.backgroundColor}" tabindex="-1"> | |
${this.renderIconImage()} | |
<p class="glue-font-weight-medium glue-text-center"> | |
<span class="incentives-banner-copy"> | |
${this.copyText.mobileText} | |
</span> | |
${this.ctaBlock[0]} | |
</p> | |
</div> | |
<div class="incentives-banner__container incentives-banner__container--desktop incentives-banner__container--${this.backgroundColor}"> | |
${this.renderIconImage()} | |
<p class="glue-font-weight-medium glue-text-center"> | |
<span class="incentives-banner-copy"> | |
${this.copyText.text} | |
</span> | |
${this.ctaBlock[1]} | |
</p> | |
</div> | |
</section> | |
<div class="incentives-banner-modal glue-modal glue-modal--dark" role="dialog" | |
aria-modal="true" aria-labelledby="incentives-banner-modal__label" | |
aria-describedby="incentives-banner-modal__content"> | |
<div class="glue-page"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-1 glue-grid__col--span-0-md"></div> | |
<div class="incentives-banner-modal__container glue-grid__col glue-grid__col--span-10 glue-grid__col--span-12-md"> | |
<button class="glue-modal__close-btn" aria-label="${a.aria_close_modal}"></button> | |
<div class="glue-grid glue-spacer-5-top glue-spacer-5-bottom"> | |
<div class="glue-grid__col glue-grid__col--span-1"></div> | |
<div class="glue-grid__col glue-grid__col--span-8 glue-grid__col--span-10-md"> | |
<p class="glue-eyebrow glue-text-center">${a.headline}</h3> | |
<h4 id="incentives-banner-modal__label" class="glue-headline glue-headline--headline-3 glue-text-center"> | |
<span class="glue-font-weight-medium">${a.subheadline}</span> | |
</h4> | |
<div id="incentives-banner-modal__content"> | |
<p class="glue-text-center">${a.copy}</p> | |
<div class="glue-text-center"> | |
${a.cta} | |
</div> | |
<div class="incentives-banner-modal__terms--container glue-spacer-5-top"> | |
<h5 class="incentives-banner-modal__terms--headline glue-headline glue-headline--headline-5"> | |
<span class="glue-font-weight-medium">${a.tcHeadline}</span> | |
</h5> | |
<ol> | |
${a.tcItems&&[...a.tcItems].map(b=>b?p`<li>${b}</li>`:"")} | |
</ol> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
`}};customElements.define("gads-incentives-banner",Hb);var Ib=class extends M{constructor(){super(...arguments);this.carousel_aria_labels=this.cards="";this.nextBtn=this.querySelector(".next");this.prevBtn=this.querySelector(".previous");this.cardList=this.querySelectorAll(".gads-carousel-card");this.snapport=this.querySelector(".carousel-snapport");this.dotsContainer=this.querySelector(".pagination-dots");this.cardRects=[];this.cardsPerPage=0}static get observedAttributes(){return["current-card"]}attributeChangedCallback(a,b,c){b&&(this.moveCarousel(Number(c)), | |
a=this.dotsContainer?this.dotsContainer.children:null)&&(a[Number(b)||0].classList.remove("glue-is-active"),a[Number(c)].classList.add("glue-is-active"))}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()),this.nextBtn=this.querySelector(".next"),this.prevBtn=this.querySelector(".previous"),this.cardList=this.querySelectorAll(".gads-carousel-card"),this.snapport=this.querySelector(".carousel-snapport"),this.dotsContainer=this.querySelector(".pagination-dots"));this.nextBtn.addEventListener(B.CLICK, | |
()=>{this.currentCard++});this.prevBtn.addEventListener(B.CLICK,()=>{this.currentCard--});if(r.INTERSECTION_OBS in window){const b=new IntersectionObserver(d=>{for(const e of d)e.target.isEqualNode(this.cardList[0])&&(e.isIntersecting?this.prevBtn.setAttribute(w.DISABLED,"true"):this.prevBtn.removeAttribute(w.DISABLED)),e.target.isEqualNode(this.cardList[this.cardList.length-1])&&(e.isIntersecting?this.nextBtn.setAttribute(w.DISABLED,"true"):this.nextBtn.removeAttribute(w.DISABLED))},{root:this.snapport, | |
threshold:1}),c=this.snapport.clientWidth;for(const d of this.cardList){b.observe(d);const e=d.getBoundingClientRect();this.calcCardCount(d,e,c)}}this.dotsBuilder();const a=ja(()=>{this.cardsPerPage=this.currentCard=0;this.cardRects=[];const b=this.snapport.clientWidth;for(const c of this.cardList){const d=c.getBoundingClientRect();this.calcCardCount(c,d,b)}this.dotsBuilder()},500);window.addEventListener(B.RESIZE,()=>{a()});this.setAttribute("current-card","0")}get gtmModuleName(){return this.getAttribute(w.GTM_MODULE_NAME)|| | |
this.nodeName}get cardsObject(){const a=this.getAttribute(w.CARDS);if(!a)throw Error("No cards were supplied to the carousel");return JSON.parse(k(a))}get currentCard(){return Number(this.getAttribute("current-card"))}set currentCard(a){this.setAttribute("current-card",Math.max(Math.min(a,this.cardList.length-1),0).toString())}get carouselAriaLabels(){const a=this.getAttribute(w.CAROUSEL_ARIA_LABELS);return a?JSON.parse(k(a)):null}get carouselIndex(){return this.getAttribute(w.INDEX)||"0"}calcCardCount(a, | |
b,c){this.cardRects.push(b);a.offsetLeft+b.width<c&&this.cardsPerPage++}cardBuilder(a){var b;const c=[];for(const [d,e]of Object.entries(a))e&&"_"!==d.charAt(0)&&(d===w.CTA?c.push(`cta='${g(JSON.stringify(e))}'`):d===w.IMAGE?c.push(`image="${g(JSON.stringify(a.image))}"`):d===w.ICON?c.push(`icon="${"string"!==typeof a.icon&&"url"in a.icon?null===(b=a.icon)||void 0===b?void 0:b.url:""}"`):c.push(`${d.replace("_","-")}=${JSON.stringify(e)}`));return p` | |
<li class="gads-carousel-card"> | |
<gads-card | |
card-type="${this.cardType("string"===typeof a._collectionId?a._collectionId:"")}" | |
module-name="${this.gtmModuleName}" | |
index="${this.carouselIndex}${a._documentId}" | |
${c.join(" ")} | |
></gads-card> | |
</li> | |
`}cardType(a){return a.replace(/([A-Z])/,b=>b.toLowerCase())}dotsBuilder(){var a;this.dotsContainer.replaceWith(null===(a=this.dotsContainer)||void 0===a?void 0:a.cloneNode(!1));if(a=this.cardList.length-this.cardsPerPage){this.classList.remove("carousel-disabled");this.firstElementChild&&this.firstElementChild.classList.remove("glue-page");this.dotsContainer=this.querySelector(".pagination-dots");const b=[];for(let c=0;c<=a;c++){const d=p` | |
<button | |
class="pagination-dot glue-carousel__dot${c?"":" glue-is-active"}" | |
data-jump-to="${c}" | |
aria-hidden="true" | |
tabindex="-1" | |
><span class="glue-visually-hidden">Go to slide ${c}</span></button> | |
`;b.push(d)}this.dotsContainer.insertAdjacentHTML(va.AFTER_BEGIN,b.join(""));this.dotsListener()}else this.classList.add("carousel-disabled"),this.firstElementChild&&this.firstElementChild.classList.add("glue-page")}dotsListener(){const a=this.dotsContainer?this.dotsContainer.children:null;if(a)for(const b of a)b.addEventListener(B.CLICK,({target:c})=>{this.currentCard=Number(c.dataset.jumpTo)})}moveCarousel(a){this.snapport&&this.snapport.scroll({left:this.cardList[a].offsetLeft-this.cardRects[0].x, | |
behavior:G.SMOOTH})}render(){var a,b;return m` | |
<section class="custom-carousel"> | |
<ul class="carousel-snapport"> | |
${this.cardsObject.map(c=>this.cardBuilder(c))} | |
</ul> | |
<div class="carousel-buttons" aria-hidden="true"> | |
<button class="previous glue-carousel__button glue-carousel__button--prev" aria-label="${(null===(a=this.carouselAriaLabels)||void 0===a?void 0:a.aria_previous_slide)||""}" tabindex="-1"> | |
<svg class="glue-icon glue-icon--32px" viewBox="0 0 24 24"><path d="M16.41 5.41L15 4l-8 8 8 8 1.41-1.41L9.83 12"></path></svg> | |
</button> | |
<button class="next glue-carousel__button glue-carousel__button--next" aria-label="${(null===(b=this.carouselAriaLabels)||void 0===b?void 0:b.aria_next_slide)||""}" tabindex="-1"> | |
<svg class="glue-icon glue-icon--32px" viewBox="0 0 24 24"><path d="M7.59 18.59L9 20l8-8-8-8-1.41 1.41L14.17 12"></path></svg> | |
</button> | |
</div> | |
<div class="pagination-dots glue-carousel__navigation"></div> | |
</section> | |
`}};customElements.define("gads-custom-carousel",Ib);var Jb=class extends M{get labelText(){return this.getAttribute("label")||""}get headlineText(){return this.getAttribute(w.HEADLINE)||""}get ctaUrl(){return this.getAttribute(w.CTA_URL)||""}get gtmModuleName(){return this.getAttribute(w.GTM_MODULE_NAME)||""}get gtmCtaName(){return this.getAttribute(w.GTM_CTA_NAME)||""}get buttonAriaLabel(){return this.getAttribute(w.CTA_ARIA_DESCRIPTION)||""}render(){return m` | |
<div class="jumplink-basic-card__wrapper"> | |
<div class="jumplink-basic-card__content"> | |
<span class="jumplink-basic-card__label glue-label"> | |
${this.labelText} | |
</span> | |
<span class="glue-headline glue-headline--headline-5"> | |
${this.headlineText} | |
</span> | |
</div> | |
<gads-button | |
class="card-cta" | |
cta-name="${this.gtmCtaName}" | |
cta-url="${this.ctaUrl}" | |
emphasis="low" | |
icon-type="glue-icon" | |
icon-id="OPEN_NEW" | |
label="${this.buttonAriaLabel}" | |
module-name="${this.gtmModuleName}"> | |
</gads-button> | |
</div> | |
`}};customElements.define("gads-jumplink-basic-card",Jb);var Kb=class extends M{get time(){return this.getAttribute("time")||""}get timeAriaLabel(){return this.getAttribute("time-aria-label")||""}get headlineText(){return this.getAttribute(w.HEADLINE)||""}get ctaUrl(){return this.getAttribute(w.CTA_URL)||""}get gtmCtaName(){return this.getAttribute(w.GTM_CTA_NAME)||""}get gtmModuleName(){return this.getAttribute(w.GTM_MODULE_NAME)||""}get buttonAriaLabel(){return this.getAttribute(w.CTA_ARIA_DESCRIPTION)||""}render(){return m` | |
<div class="jumplink-list-card__wrapper"> | |
<div> | |
<gads-time-pill class="jumplink-list-card__card--desktop" time="${this.time}" ${this.timeAriaLabel?`time-aria-label="${this.timeAriaLabel}"`:""}></gads-time-pill> | |
<span class="jumplink-list-card__title">${this.headlineText}</span> | |
<gads-time-pill class="jumplink-list-card__card--mobile" time="${this.time}" ${this.timeAriaLabel?`time-aria-label="${this.timeAriaLabel}"`:""}></gads-time-pill> | |
</div> | |
<gads-button | |
class="jumplink-list-card__cta" | |
cta-name="${this.gtmCtaName}" | |
cta-url="${this.ctaUrl}" | |
emphasis="low" | |
icon-type="glue-icon" | |
icon-id="OPEN_NEW" | |
label="${this.buttonAriaLabel}" | |
module-name="${this.gtmModuleName}"> | |
</gads-button> | |
</div> | |
`}};customElements.define("gads-jumplink-list-card",Kb);var Lb=class extends M{constructor(){super(...arguments);this.cta_label="";this.video_thumbnail=null;this.video_thumbnail_aria_description=""}get headlineText(){return this.getAttribute(w.HEADLINE)||""}get ctaUrl(){return this.getAttribute(w.CTA_URL)||this.url}get ctaLabel(){return this.getAttribute(w.CTA_LABEL)||this.cta_label}get gtmCtaName(){return this.getAttribute(w.GTM_CTA_NAME)||""}get gtmModuleName(){return this.getAttribute(w.GTM_MODULE_NAME)||""}get imageObj(){const a=this.getAttribute("video-thumbnail")|| | |
this.video_thumbnail;if("string"===typeof a)try{return JSON.parse(k(a))}catch(b){throw Error("Error processing the image object in Video Card");}return a||null}get videoThumbnailAria(){return this.getAttribute("video-thumbnail-aria")||""}get buttonAriaLabel(){return this.getAttribute(w.CTA_ARIA_DESCRIPTION)||""}render(){var a;return m` | |
<div class="jumplink-video-card__wrapper"> | |
<a class="jumplink-video-card__thumbnail" | |
href="${this.ctaUrl}" target="_blank" rel="noopener noreferrer" | |
aria-label="${this.videoThumbnailAria}" | |
data-g-module-name="${this.gtmModuleName}" | |
data-g-cta-name="${this.gtmCtaName}"> | |
<gads-image | |
alt-text="${this.headlineText} - ${this.ctaLabel}" | |
image="${null===(a=this.imageObj)||void 0===a?void 0:a.url}" | |
tabindex="-1" | |
widths="xl:340,lg:276,md:218,sm:380"> | |
</gads-image> | |
<div class="glue-video__info"> | |
<gads-icon icon-id="VIDEO_YOUTUBE_BLACK" class-names="glue-video__play-button"></gads-icon> | |
</div> | |
</a> | |
<div class="jumplink-video-card__content"> | |
<span class="glue-headline glue-headline--headline-5 glue-text-center" aria-hidden="true"> | |
${this.headlineText} | |
</span> | |
<gads-button | |
class="jumplink-video-card__cta" | |
cta-hidden | |
cta-name="${this.gtmCtaName}" | |
cta-text="${this.ctaLabel}" | |
cta-url="${this.ctaUrl}" | |
emphasis="low" | |
icon-id="OPEN_NEW" | |
icon-type="glue-icon-right" | |
label="${this.buttonAriaLabel}" | |
module-name="${this.gtmModuleName}"> | |
</gads-button> | |
</div> | |
</div> | |
`}};customElements.define("gads-jumplink-video-card",Lb);var Mb;(Mb||(Mb={})).PAUSE="pause"; | |
var Nb=class extends M{constructor(){super(...arguments);this.vidEl=null}static get observedAttributes(){return[Mb.PAUSE]}connectedCallback(){this.firstElementChild||this.replaceChildren(this.render());this.vidEl=this.querySelector("video");this.reduceMotion(Ia.isReducedMotion);Ia.subscribe(a=>{this.reduceMotion(a)});this.observePlay&&r.INTERSECTION_OBS in window&&(new IntersectionObserver(this.componentInViewport.bind(this),{root:null})).observe(this)}componentInViewport(a){this.reduceMotion(Ia.isReducedMotion);for(const b of a)this.vidEl&& | |
(b.isIntersecting?this.vidEl.play():(this.vidEl.pause(),this.vidEl.currentTime=0))}get adContent(){const a=this.getAttribute("icon")||"",b=this.getAttribute("ad-title")||"",c=this.getAttribute("ad-url")||"";return p` | |
<div class="overlay-content"> | |
<gads-image image="${a}" widths="sm:${({full:"40",small:"30"})[this.overlayType]}" role="presentation"></gads-image> | |
<span class="copy-wrapper"> | |
<div class="title">${b}</div> | |
<div class="url">${c}</div> | |
</span> | |
</div> | |
`}get label(){return this.getAttribute("label")||""}get autoplay(){return this.hasAttribute("autoplay")}get boxShadow(){var a;return this.hasAttribute("box-shadow")&&"false"!==(null===(a=this.getAttribute("box-shadow"))||void 0===a?void 0:a.toLowerCase())}get loop(){var a;return this.hasAttribute("loop")&&"false"!==(null===(a=this.getAttribute("loop"))||void 0===a?void 0:a.toLowerCase())}get overlayType(){return this.getAttribute("overlay-type")||"none"}set pause(a){this.setAttribute(Mb.PAUSE, | |
a.toString())}get observePlay(){return this.hasAttribute("observe-play")}get timerText(){return this.getAttribute("full-overlay-timer")||""}get videoMp4(){return this.getAttribute("video-mp4")||""}get videoWebm(){return this.getAttribute("video-webm")||""}get reducedMotionPoster(){return Number(this.getAttribute("poster-time"))||0}reduceMotion(a){this.pause=a;this.vidEl&&(this.vidEl.currentTime=a?this.reducedMotionPoster:0)}get width(){return this.getAttribute("width")||"360px"}get theme(){return this.getAttribute(w.THEME)|| | |
"light"}get fullOverlayExtraContent(){return{ctaText:this.getAttribute("full-button-text")||"",skipAd:this.getAttribute("full-skip")||""}}attributeChangedCallback(a,b,c){a===Mb.PAUSE&&this.vidEl&&("true"===c?this.vidEl.pause():"false"!==c||this.observePlay||this.vidEl.play())}overlay(a){return{small:p` | |
<div class="overlay-container progress-bar" aria-hidden="true"> | |
${this.adContent} | |
</div> | |
`,full:p` | |
<div class="overlay-container progress-bar full-overlay-container" aria-hidden="true"> | |
<div class="full-extra-content"> | |
<div class="skip"> | |
<p>${this.fullOverlayExtraContent.skipAd}</p> | |
<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#f1f3f4"><path d="M13.917 15.792V4.229H16.208V15.792ZM3.792 15.792V4.229L12.542 10Z"/></svg> | |
</div> | |
<div class="timer ${this.theme}"> | |
${this.timerText} | |
</div> | |
</div> | |
${this.adContent} | |
<button aria-hidden="true" tabindex="-1" class="glue-button glue-button--high-emphasis">${this.fullOverlayExtraContent.ctaText}</button> | |
</div> | |
`}[a]||""}render(){return this.videoMp4||this.videoWebm?m` | |
<section class="video-wrapper ${"full"===this.overlayType?"full-overlay":""} ${this.boxShadow?"video-wrapper--shadow":""} " | |
${this.label?`aria-label="${this.label}"`:""} | |
style="width: ${this.width}"> | |
<video | |
${this.autoplay?"autoplay":""} | |
${this.loop?"loop":""} | |
muted | |
playsinline | |
preload="none" | |
width=${this.width} | |
aria-hidden="true"> | |
${this.videoWebm?p`<source src="${this.videoWebm}" type="video/webm">`:""} | |
${this.videoMp4?p`<source src="${this.videoMp4}" type="video/mp4">`:""} | |
</video> | |
${this.overlay(this.overlayType)} | |
</section> | |
`:m``}};customElements.define("gads-presentational-video",Nb);var Ob=class{async apiRequest(){let a=null;try{window.fetch&&await window.fetch("https://accounts.google.com/ListAccounts?authuser=0&source=ads.google.site",{method:"POST",credentials:"include"}).then(b=>b.json()).then(b=>{a=b[1]})}catch(b){}return a}displayProfileAvatar(){const a=setInterval(()=>{const b=document.querySelectorAll(".gads-profile-avatar"),c=document.querySelectorAll(".gads-sign-in-button");b&&c&&(b.forEach(d=>{d.classList.remove("gads-profile-avatar--hidden")}),c.forEach(d=>{d.classList.add("gads-sign-in-button--hidden")})); | |
clearInterval(a)},H.ONE_HUNDRED)}addUserToNavButton(a,b){a=a.match(RegExp('cta-url="(?:https://)?([^"]+)"'));document.querySelectorAll(`a[href*='${a?a[1]:null}']`).forEach(c=>{this.addUserToHref(c,b)})}addUserToHref(a,b){if(a.href.includes("authuser=")){const c=a.href.indexOf("authuser=");a.href.replace("authuser=","");a.href=a.href.slice(0,c);a.href+=b}else a.href+=a.href.includes("?")?`&${b}`:`?${b}`}addCurrentUserToUrl(a=0,b=[]){const c=`${"authuser="}${a}`;b.forEach(d=>{d&&this.addUserToNavButton(d, | |
c)});a=document.querySelectorAll("a[href*='//policies.google.com/privacy']");b=document.querySelectorAll("a[href*='//myaccount.google.com/termsofservice']");a.forEach(d=>{this.addUserToHref(d,c)});b.forEach(d=>{this.addUserToHref(d,c)})}addContinueToUrl(){const a=`${"continue="}${window.location.href}`,b=document.querySelectorAll("a[href*='//accounts.google.com/Logout']"),c=document.querySelectorAll("a[href*='//myaccount.google.com/']"),d=document.querySelectorAll("a[href*='//accounts.google.com/AddSession']"); | |
b.forEach(e=>{e.href.includes(a)||(e.href+=e.href.includes("?")?`&${a}`:`?${a}`)});c.forEach(e=>{e.href.includes(a)||e.href.includes("//myaccount.google.com/termsofservice")||(e.href+=e.href.includes("?")?`&${a}`:`?${a}`)});d.forEach(e=>{e.href.includes(a)||(e.href+=e.href.includes("?")?`&${a}`:`?${a}`)})}getSessionIndex(){var a=(new URLSearchParams(window.location.search)).get(Fa.AUTHUSER);const b=Number(a);if(a&&!isNaN(b))return this.setSessionIndex(b),b;a=ka("ADS_CUSTOMER_ACCOUNT_SESSION_INFO"); | |
return(a=null===a||void 0===a?void 0:a.match(RegExp("authuser-([0-9]+)")))&&Number(a[1])||0}setSessionIndex(a,b=!1){try{const c=ka("ADS_CUSTOMER_ACCOUNT_SESSION_INFO"),d=null===c||void 0===c?void 0:c.match(RegExp("authuser-([0-9]+)")),e=`.${window.location.host}`;let f=`authuser-${a}`;c&&d&&(f=c.replace(d[0],f));document.cookie=`${"ADS_CUSTOMER_ACCOUNT_SESSION_INFO"}=${f}; ${e?`domain=${e}; `:""}path=/; secure;`}catch(c){}this.updateAuthUserQueryParam(a);b&&window.location.reload()}updateAuthUserQueryParam(a){const b= | |
new URLSearchParams(window.location.search);b.set(Fa.AUTHUSER,String(a));window.history.replaceState(null,"",`?${b.toString()}`)}initBFCache(){const a=document.querySelectorAll(".gads-profile-avatar"),b=document.querySelectorAll(".gads-sign-in-card");a&&b&&(null===a||void 0===a?void 0:a.forEach(c=>{c.classList.add("gads-profile-avatar--hidden")}),null===b||void 0===b?void 0:b.forEach(c=>{c.classList.add("gads-sign-in-card--hidden")}))}},Q=new Ob;var R,Pb=R||(R={});Pb.CTA_SIGN_IN="cta-sign-in";Pb.CTA_START_NOW="cta-start-now";Pb.NAV_CTA="nav-cta";Pb.PROFILE_ALT_TEXT="profile-alt-text";Pb.TYPE="type";Pb.MOCK_API="mock-api-data";Pb.TYPE_DEFAULT="desktop";Pb.LOGGED_IN_URL="logged-in-url";Pb.PROFILE_CTA_NAME="profile-cta-name";Pb.PROFILE_IMAGE_PLACEHOLDER="profile-image-placeholder";var S,T=S||(S={});T.PROFILE_AVATAR="gads-profile-avatar";T.SSO_CARD="gads-sign-in-card";T.SSO_CARD_HIDDEN="gads-sign-in-card--hidden";T.PROFILE_PREFIX="gads-sign-in-card--profile-"; | |
T.SECONDARY_ACCOUNTS_LIST="gads-secondary-accounts-list";T.SECONDARY_ACCOUNTS_ITEM="gads-sign-in-card__account-item";T.SECONDARY_ACCOUNT_IMAGE="gads-sign-in-card__secondary-profile";T.SECONDARY_ACCOUNT_NAME="gads-sign-in-card__secondary-name";T.SECONDARY_ACCOUNT_EMAIL="gads-sign-in-card__secondary-email";T.SECONDARY_ACCOUNT_INFO="gads-sign-in-card__account-info";T.SIGN_IN_CARD_ACCOUNT_ADD_PARENT="gads-sign-in-card__account-item--add";T.PRIMARY_ACCOUNT_PROFILE="gads-main-profile"; | |
T.PRIMARY_ACCOUNT_AVATAR="gads-profile-avatar";T.PRIMARY_ACCOUNT_AVATAR_IMAGE="gads-profile-avatar__image";T.PRIMARY_ACCOUNT_IMAGE="gads-sign-in-card__main-image";T.PRIMARY_ACCOUNT_NAME="gads-sign-in-card__name";T.PRIMARY_ACCOUNT_EMAIL="gads-sign-in-card__email"; | |
var Qb=class extends M{constructor(){super(...arguments);this.api_response=null;this.isOpened=!1;this.logged_in_url="";this.nav_cta=[];this.profileEmail=this.profile_cta_name=this.profile_alt_text="";this.profileImageUrl=this.profileImageBuildPlaceholder||"";this.profileName=this.profileIndex="";this.secondaryProfilesArray=[];this.type=R.TYPE_DEFAULT;this.profileAvatar=()=>p` | |
<div class="gads-profile-avatar__container"> | |
<button class="gads-profile-avatar gads-profile-avatar--hidden gads-profile-avatar--${this.deviceType} glue-text-center" aria-expanded="false" data-g-module-name="${this.gtmModuleName}" data-g-cta-name="gads-sso-profile-avatar" ${this.deviceType===R.TYPE_DEFAULT?'aria-live="assertive"':""}> | |
<gads-image | |
widths="xl:40,lg:40,md:40,sm:40" | |
image="${this.profileImageUrl}" | |
image-class="gads-profile-avatar__image"> | |
</gads-image> | |
</button> | |
</div> | |
`;this.secondaryAccount=(a="",b="",c="",d)=>{c=null===c||void 0===c?void 0:c.replace("s48-c","s160-c");return p` | |
<button class="gads-sign-in-card__account-item gads-sign-in-card--profile-${d}" tabindex="0" data-position="${d}" aria-label="Change account to ${a} (${b})"> | |
<gads-image | |
widths="xl:32,lg:32,md:32,sm:32" | |
image="${c}" | |
image-class="gads-sign-in-card__secondary-profile"> | |
</gads-image> | |
<div class="gads-sign-in-card__account-info"> | |
<div class="gads-sign-in-card__secondary-name"> | |
${a} | |
</div> | |
<div class="gads-sign-in-card__secondary-email"> | |
${b} | |
</div> | |
</div> | |
</button> | |
`};this.card=()=>p` | |
<div class="gads-sign-in-card gads-sign-in-card--hidden glue-text-center"> | |
<div class="gads-main-profile" data-position="${this.profileIndex}"> | |
<gads-image | |
widths="xl:80,lg:80,md:80,sm:80" | |
image="${this.profileImageUrl}" | |
alt-text="${this.profileAltText}" | |
image-class="gads-sign-in-card__main-image"> | |
</gads-image> | |
<div class="gads-sign-in-card__main-image sso__main-image--placeholder" style="display: none;"></div> | |
<div class="gads-sign-in-card__name glue-body"> | |
${this.profileName} | |
</div> | |
<div class="gads-sign-in-card__email glue-body"> | |
${this.profileEmail} | |
</div> | |
</div> | |
<div class="gads-sign-in-card__manage-btn"> | |
${this.getCtaByGtmName(E.SSO_MANAGE_ACCOUNT)} | |
</div> | |
<div class="gads-sign-in-card__accounts"> | |
<div class="gads-secondary-accounts-list"> | |
${this.getSecondaryProfiles} | |
</div> | |
<div class="gads-sign-in-card__account-item gads-sign-in-card__account-item--add"> | |
<svg class="gads-sign-in-card__add-profile-icon" width="20" height="14" viewBox="0 0 20 14" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"> | |
<path d="M10.8334 3.66683C10.8334 1.82516 9.34171 0.333496 7.50004 0.333496C5.65837 0.333496 4.16671 1.82516 4.16671 3.66683C4.16671 5.5085 5.65837 7.00016 7.50004 7.00016C9.34171 7.00016 10.8334 5.5085 10.8334 3.66683ZM9.16671 3.66683C9.16671 4.5835 8.41671 5.3335 7.50004 5.3335C6.58337 5.3335 5.83337 4.5835 5.83337 3.66683C5.83337 2.75016 6.58337 2.00016 7.50004 2.00016C8.41671 2.00016 9.16671 2.75016 9.16671 3.66683ZM0.833374 12.0002V13.6668H14.1667V12.0002C14.1667 9.7835 9.72504 8.66683 7.50004 8.66683C5.27504 8.66683 0.833374 9.7835 0.833374 12.0002ZM2.50004 12.0002C2.66671 11.4085 5.25004 10.3335 7.50004 10.3335C9.74171 10.3335 12.3167 11.4002 12.5 12.0002H2.50004ZM16.6667 9.50016V7.00016H19.1667V5.3335H16.6667V2.8335H15V5.3335H12.5V7.00016H15V9.50016H16.6667Z" fill="#3C4043"/> | |
</svg> | |
${this.getCtaByGtmName(E.SSO_ADD_ACCOUNT)} | |
</div> | |
</div> | |
<div class="gads-sign-in-card__signout"> | |
<div class="gads-sign-in-card__signout-btn"> | |
${this.getCtaByGtmName(E.SSO_SIGN_OUT)} | |
</div> | |
</div> | |
<div class="gads-sign-in-card__links glue-body"> | |
<div class="gads-sign-in-card__link-item"> | |
${this.getCtaByGtmName(E.SSO_PRIVACY_POLICY)} | |
</div> | |
<div class="gads-sign-in-card__link-separator"> | |
· | |
</div> | |
<div class="gads-sign-in-card__link-item"> | |
${this.getCtaByGtmName(E.SSO_TERMS)} | |
</div> | |
</div> | |
</div> | |
`}connectedCallback(){Q.apiRequest().then(a=>{this.api_response=a;this.handleApiRequest()});this.firstElementChild||this.replaceChildren(this.render());this.bfCacheHandler()}get gtmModuleName(){var a;return(null===(a=this.getAttribute(w.GTM_MODULE_NAME))||void 0===a?void 0:a.toLowerCase())||this.nodeName}get ctaStartNow(){return this.getAttribute(R.CTA_START_NOW)||null}get ctaSignIn(){return this.getAttribute(R.CTA_SIGN_IN)||null}get deviceType(){return this.getAttribute(R.TYPE)||this.type}get profileAltText(){return this.getAttribute(R.PROFILE_ALT_TEXT)|| | |
this.profile_alt_text}get profileCtaName(){return this.getAttribute(R.PROFILE_CTA_NAME)||this.profile_cta_name}get profileImageBuildPlaceholder(){return this.getAttribute(R.PROFILE_IMAGE_PLACEHOLDER)}get getLoggedInUrl(){return this.getAttribute(R.LOGGED_IN_URL)||this.logged_in_url}get getSecondaryProfiles(){return this.secondaryProfilesArray}set setSecondaryProfiles(a){this.secondaryProfilesArray=a}handleApiRequest(){if(!this.api_response){const a=this.getAttribute(R.MOCK_API);a&&(this.api_response= | |
JSON.parse(k(a)))}if(this.api_response&&0<this.api_response.length)try{const a=this.getResponseValidatedSessionIndex();this.getPrimaryAccount();this.getSecondaryAccounts();this.initClickOutside();this.hideIfHeaderHidesOnScroll();Q.displayProfileAvatar();Q.addCurrentUserToUrl(a,[this.ctaStartNow,this.ctaSignIn]);this.replaceChildren(this.render());this.addClickToSecondaryAccounts(`.${S.SECONDARY_ACCOUNTS_ITEM}`);this.addClickHandlerToAddAccountParent()}catch(a){}else this.hideProfileAvatarContainer(); | |
Q.addContinueToUrl()}hideProfileAvatarContainer(){document.querySelectorAll(".gads-profile-avatar__container").forEach(a=>a.classList.add(A.HIDDEN))}initClickOutside(){const a=setInterval(()=>{const b=document.querySelectorAll(`.${S.SSO_CARD}`),c=document.querySelectorAll(`.${S.PRIMARY_ACCOUNT_AVATAR}`);b&&c&&(window.addEventListener(B.CLICK,({target:d})=>{var e;let f=!0;if(null===(e=d.parentElement)||void 0===e?0:e.classList.contains(`${S.SECONDARY_ACCOUNT_INFO}`))f=!1;[...b,...c].forEach(h=>{if(h.contains(d)|| | |
d.classList.contains(`${S.PRIMARY_ACCOUNT_AVATAR}`)||d.classList.contains(`${S.PRIMARY_ACCOUNT_AVATAR_IMAGE}`))f=!1});f&&(b.forEach(h=>{h&&h.classList.add(S.SSO_CARD_HIDDEN)}),this.isOpened=!1)}),clearInterval(a))},H.ONE_HUNDRED)}handleSecondaryProfileClick(a){var b,c;Q.setSessionIndex(a,!0);const d=`${S.PROFILE_PREFIX}${a}`,e=document.querySelectorAll(`.${S.SECONDARY_ACCOUNTS_LIST}`),f=document.querySelectorAll(`.${S.PRIMARY_ACCOUNT_PROFILE}`),h=Number(f[0].dataset.position),l=document.querySelectorAll(`.${S.PRIMARY_ACCOUNT_NAME}`), | |
n=document.querySelectorAll(`.${S.PRIMARY_ACCOUNT_EMAIL}`),t=document.querySelectorAll(`img.${S.PRIMARY_ACCOUNT_IMAGE}`),u=document.querySelectorAll(`img.${S.PRIMARY_ACCOUNT_AVATAR_IMAGE}`);e.forEach(C=>{const Y=m` | |
${this.secondaryAccount(l[0].innerHTML,n[0].innerHTML,t[0].src,h)} | |
`;C.appendChild(Y)});this.addClickToSecondaryAccounts(`.${S.PROFILE_PREFIX}${h}`);const q=document.querySelector(`.${d}`),y=null===q||void 0===q?void 0:q.querySelector(`.${S.SECONDARY_ACCOUNT_IMAGE}`),x=null===y||void 0===y?void 0:y.src,K=null===(b=null===q||void 0===q?void 0:q.querySelector(`.${S.SECONDARY_ACCOUNT_NAME}`))||void 0===b?void 0:b.innerHTML,I=null===(c=null===q||void 0===q?void 0:q.querySelector(`.${S.SECONDARY_ACCOUNT_EMAIL}`))||void 0===c?void 0:c.innerHTML;f.forEach(C=>{C.dataset.position= | |
a.toString()||""});u.forEach(C=>{C.setAttribute("aria-label",`${this.profileAltText} ${null===K||void 0===K?void 0:K.trim()} (${null===I||void 0===I?void 0:I.trim()})`)});u.forEach(C=>{C.src=x||""});t.forEach(C=>{C.src=x||""});l.forEach(C=>{C.innerHTML=K||""});n.forEach(C=>{C.innerHTML=I||""});e.forEach(C=>{const Y=C.querySelector(`.${d}`);Y&&C.removeChild(Y)});Q.addCurrentUserToUrl(a,[this.ctaStartNow,this.ctaSignIn])}getPrimaryAccount(){const a=this.getResponseValidatedSessionIndex();this.profileIndex= | |
a;this.profileName=Ka.call(this.api_response[a][2],La,Na);this.profileEmail=Ka.call(this.api_response[a][3],La,Na);this.profileImageUrl=this.api_response[a][4].replace("s48-c","s160-c");const b=setInterval(()=>{const c=document.querySelectorAll(`.${S.PROFILE_AVATAR}`),d=document.querySelectorAll(`.${S.SSO_CARD}`);c&&(c.forEach(e=>{var f,h;e.children[0].setAttribute("aria-label",`${this.profileAltText} ${null===(f=this.profileName)||void 0===f?void 0:f.trim()} (${null===(h=this.profileEmail)||void 0=== | |
h?void 0:h.trim()})`);e.addEventListener(B.CLICK,()=>{e.setAttribute("aria-expanded",`${!this.isOpened}`);d.forEach(l=>{l&&l.classList.toggle(S.SSO_CARD_HIDDEN,this.isOpened)});this.isOpened=!this.isOpened})}),clearInterval(b))},H.ONE_HUNDRED)}getSecondaryAccounts(){const a=this.getResponseValidatedSessionIndex(),b=[];this.api_response.map((c,d)=>{d!=a&&b.push(this.secondaryAccount(Ka.call(c[2],La,Na),Ka.call(c[3],La,Na),c[4],d))});this.setSecondaryProfiles=b}addClickHandlerToAddAccountParent(){document.querySelectorAll(`.${S.SIGN_IN_CARD_ACCOUNT_ADD_PARENT}`).forEach(a=> | |
{const b=a.querySelector('a[href*="accounts.google.com"]');b&&a.addEventListener(B.CLICK,c=>{c.target!==b&&b.click()})})}addClickToSecondaryAccounts(a){document.querySelectorAll(`.${S.SECONDARY_ACCOUNTS_LIST}`).forEach(b=>{b.querySelectorAll(a).forEach(c=>{const d=c.dataset.position?Number(c.dataset.position):0;c.addEventListener(B.CLICK,()=>{this.handleSecondaryProfileClick(d)});c.addEventListener("keypress",e=>{if("Enter"===e.code||"Space"===e.code)e.preventDefault(),this.handleSecondaryProfileClick(d)})})})}getResponseValidatedSessionIndex(){let a= | |
Q.getSessionIndex();a>=this.api_response.length&&(a=0,Q.setSessionIndex(0));return a}bfCacheHandler(){window.addEventListener(B.PAGESHOW,a=>{a.persisted&&(Q.initBFCache(),Q.apiRequest().then(b=>{this.api_response=b;this.handleApiRequest()}))})}hideIfHeaderHidesOnScroll(){document.addEventListener(B.GADS_HEADER_HIDE,()=>{document.querySelectorAll(`.${S.SSO_CARD}`).forEach(a=>{null===a||void 0===a?void 0:a.classList.add(S.SSO_CARD_HIDDEN)});this.isOpened=!1})}render(){return m` | |
${this.profileAvatar()} | |
${this.card()} | |
`}};customElements.define("gads-single-sign-on",Qb);var Rb=class extends M{constructor(){super(...arguments);this.api_response=null;this.isOpened=!1;this.logged_in_url="";this.nav_cta=[];this.profileEmail=this.profile_cta_name=this.profile_alt_text="";this.profileImageUrl=this.profileImageBuildPlaceholder||"";this.profileName=this.profileIndex="";this.secondaryProfilesArray=[];this.type=R.TYPE_DEFAULT;this.adsAccountsArray=[];this.modal=this.ads_account_status=null;this.profileAvatar=()=>{var a,b;return p` | |
<div class="gads-profile-avatar__container"> | |
<button class="gads-profile-avatar gads-profile-avatar--hidden gads-profile-avatar--${this.deviceType} glue-text-center" aria-expanded="false" data-g-module-name="${this.gtmModuleName}" data-g-cta-name="${this.profileCtaName}" ${this.deviceType===R.TYPE_DEFAULT?'aria-live="assertive"':""}> | |
<gads-image | |
widths="xl:40,lg:40,md:40,sm:40" | |
image="${this.profileImageUrl}" | |
image-class="gads-profile-avatar__image" | |
alt-text="${this.profileAltText} ${null===(a=this.profileName)||void 0===a?void 0:a.trim()} (${null===(b=this.profileEmail)||void 0===b?void 0:b.trim()})"> | |
</gads-image> | |
</button> | |
</div> | |
`};this.secondaryAccount=(a="",b="",c="",d)=>{c=null===c||void 0===c?void 0:c.replace("s48-c","s160-c");return p` | |
<button class="gads-sign-in-card__account-item gads-sign-in-card--profile-${d}" tabindex="0" data-position="${d}" aria-label="Change account to ${a} (${b})"> | |
<gads-image | |
widths="xl:32,lg:32,md:32,sm:32" | |
image="${c}" | |
image-class="gads-sign-in-card__secondary-profile"> | |
</gads-image> | |
<div class="gads-sign-in-card__account-info"> | |
<div class="gads-sign-in-card__secondary-name"> | |
${a} | |
</div> | |
<div class="gads-sign-in-card__secondary-email"> | |
${b} | |
</div> | |
</div> | |
</button> | |
`};this.adsAccountItem=a=>{if(!this.ctaInfo||!this.ctaInfo[5])return"";const b=this.ctaInfo[5].url.replace(/({cid})/g,a.customerId.toString());return p` | |
<a href="${b}" class="gads-sign-in-card__ads-account-item"> | |
<div class="gads-sign-in-card__ads-account-info"> | |
<div class="gads-sign-in-card__ads-account-title"> | |
${Ka.call(a.customerDescriptiveName?a.customerDescriptiveName:this.ctaInfo[5].text,La,Na)} | |
</div> | |
<div class="gads-sign-in-card__ads-account-id"> | |
${a.externalCustomerId} | |
</div> | |
</div> | |
${this.renderAccountStatus(a.customerStatus)} | |
</a> | |
`};this.initModal=()=>{const a=document.querySelector(`${".gads-sso-modal"}--${this.deviceType}`),b=document.querySelector(`${".gads-sign-in-card__ads-account-item--add"}-${this.deviceType}`),c=document.querySelector(`${".gads-sso-modal"}--${this.deviceType} ${"[data-g-cta-name=gads-sso-modal-cancel]"}`);if(r.GLUE in window&&a){const d=new glue.Modal(a,b);null===b||void 0===b?void 0:b.addEventListener(B.CLICK,()=>d.open());null===c||void 0===c?void 0:c.addEventListener(B.CLICK,()=>d.close())}}; | |
this.card=()=>p` | |
<div class="gads-sign-in-card gads-sign-in-card--hidden glue-text-center"> | |
<div class="gads-sign-in-card__scrollable"> | |
<div class="gads-main-profile" data-position="${this.profileIndex}"> | |
<gads-image | |
widths="xl:70,lg:70,md:70,sm:70" | |
image="${this.profileImageUrl}" | |
alt-text="${this.profileAltText}" | |
image-class="gads-sign-in-card__main-image"> | |
</gads-image> | |
<div class="gads-sign-in-card__main-image sso__main-image--placeholder" style="display: none;"></div> | |
<div class="gads-sign-in-card__name glue-body"> | |
${this.profileName} | |
</div> | |
<div class="gads-sign-in-card__email glue-body"> | |
${this.profileEmail} | |
</div> | |
</div> | |
<div class="gads-sign-in-card__manage-btn"> | |
${this.getCtaByGtmName(E.SSO_MANAGE_ACCOUNT)} | |
</div> | |
<div class="gads-sign-in-card__ads-accounts"> | |
<div class="gads-sign-in-card__ads-accounts-array"></div> | |
<div class="gads-sign-in-card__ads-account-item gads-sign-in-card__ads-account-item--add gads-sign-in-card__ads-account-item--add-${this.deviceType}"> | |
<svg class="gads-sign-in-card__add-profile-icon" width="20" height="14" viewBox="0 0 20 14" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"> | |
<path d="M10.8334 3.66683C10.8334 1.82516 9.34171 0.333496 7.50004 0.333496C5.65837 0.333496 4.16671 1.82516 4.16671 3.66683C4.16671 5.5085 5.65837 7.00016 7.50004 7.00016C9.34171 7.00016 10.8334 5.5085 10.8334 3.66683ZM9.16671 3.66683C9.16671 4.5835 8.41671 5.3335 7.50004 5.3335C6.58337 5.3335 5.83337 4.5835 5.83337 3.66683C5.83337 2.75016 6.58337 2.00016 7.50004 2.00016C8.41671 2.00016 9.16671 2.75016 9.16671 3.66683ZM0.833374 12.0002V13.6668H14.1667V12.0002C14.1667 9.7835 9.72504 8.66683 7.50004 8.66683C5.27504 8.66683 0.833374 9.7835 0.833374 12.0002ZM2.50004 12.0002C2.66671 11.4085 5.25004 10.3335 7.50004 10.3335C9.74171 10.3335 12.3167 11.4002 12.5 12.0002H2.50004ZM16.6667 9.50016V7.00016H19.1667V5.3335H16.6667V2.8335H15V5.3335H12.5V7.00016H15V9.50016H16.6667Z" fill="#3C4043"/> | |
</svg> | |
${this.getCtaByGtmName(E.SSO_CREATE_ACCOUNT)} | |
</div> | |
</div> | |
<div class="gads-sign-in-card__accounts"> | |
<div class="gads-secondary-accounts-list"> | |
${this.secondaryProfiles} | |
</div> | |
</div> | |
</div> | |
<div class="gads-sign-in-card__sticky"> | |
<div class="gads-sign-in-card__signout"> | |
<div class="gads-sign-in-card__signout-btn"> | |
${this.getCtaByGtmName(E.SSO_SIGN_OUT)} | |
</div> | |
</div> | |
<div class="gads-sign-in-card__links glue-body"> | |
<div class="gads-sign-in-card__link-item"> | |
${this.getCtaByGtmName(E.SSO_PRIVACY_POLICY)} | |
</div> | |
<div class="gads-sign-in-card__link-separator"> | |
· | |
</div> | |
<div class="gads-sign-in-card__link-item"> | |
${this.getCtaByGtmName(E.SSO_TERMS)} | |
</div> | |
</div> | |
</div> | |
</div> | |
`}connectedCallback(){Q.apiRequest().then(a=>{this.api_response=a;this.handleApiRequest()});this.firstElementChild||this.replaceChildren(this.render());this.bfCacheHandler()}get gtmModuleName(){var a;return(null===(a=this.getAttribute(w.GTM_MODULE_NAME))||void 0===a?void 0:a.toLowerCase())||this.nodeName}get ctaStartNow(){return this.getAttribute(R.CTA_START_NOW)||null}get ctaSignIn(){return this.getAttribute(R.CTA_SIGN_IN)||null}get deviceType(){return this.getAttribute(R.TYPE)||this.type}get profileAltText(){return this.getAttribute(R.PROFILE_ALT_TEXT)|| | |
this.profile_alt_text}get profileCtaName(){return this.getAttribute(R.PROFILE_CTA_NAME)||this.profile_cta_name}get profileImageBuildPlaceholder(){return this.getAttribute(R.PROFILE_IMAGE_PLACEHOLDER)}get loggedInUrl(){return this.getAttribute(R.LOGGED_IN_URL)||this.logged_in_url}get secondaryProfiles(){return this.secondaryProfilesArray}set updateSecondaryProfiles(a){this.secondaryProfilesArray=a}get adsAccountStatus(){const a=this.getAttribute("ads-account-status")||this.ads_account_status;return"string"=== | |
typeof a?JSON.parse(k(a)):a}get modalObj(){const a=this.getAttribute("modal")||this.modal;return"string"===typeof a?JSON.parse(k(a)):a}get modalCtaBlock(){return this.modalObj.cta?this.modalObj.cta.map(a=>null!==a.text||null!==a.url?p` | |
<gads-button ${this.unpackCta(a)}></gads-button> | |
`:""):[""]}handleApiRequest(){if(!this.api_response){const a=this.getAttribute(R.MOCK_API);a&&(this.api_response=JSON.parse(k(a)))}if(this.api_response&&this.api_response.length)try{const a=this.getResponseValidatedSessionIndex();this.getPrimaryAccount();this.getSecondaryAccounts();this.initClickOutside();this.hideIfHeaderHidesOnScroll();Q.displayProfileAvatar();this.replaceChildren(this.render());this.addClickToSecondaryAccounts(`.${S.SECONDARY_ACCOUNTS_ITEM}`);this.initModal();Q.addCurrentUserToUrl(a, | |
[this.ctaStartNow,this.ctaSignIn,this.modalCtaBlock[1]]);db.setMarketingClientUser(a);this.renderAdsAccounts()}catch(a){}else this.hideProfileAvatarContainer();Q.addContinueToUrl()}hideProfileAvatarContainer(){document.querySelectorAll(".gads-profile-avatar__container").forEach(a=>a.classList.add(A.HIDDEN))}initClickOutside(){const a=setInterval(()=>{const b=document.querySelectorAll(`.${S.SSO_CARD}`),c=document.querySelectorAll(`.${S.PRIMARY_ACCOUNT_AVATAR}`),d=document.querySelectorAll(".gads-sso-modal"); | |
b&&c&&(window.addEventListener(B.CLICK,({target:e})=>{var f;let h=!0;if(null===(f=e.parentElement)||void 0===f?0:f.classList.contains(`${S.SECONDARY_ACCOUNT_INFO}`))h=!1;[...b,...c,...d].forEach(l=>{if(l.contains(e)||e.classList.contains(`${S.PRIMARY_ACCOUNT_AVATAR}`)||e.classList.contains(`${S.PRIMARY_ACCOUNT_AVATAR_IMAGE}`))h=!1});h&&(b.forEach(l=>{l&&l.classList.add(S.SSO_CARD_HIDDEN)}),this.isOpened=!1)}),clearInterval(a))},H.ONE_HUNDRED)}handleSecondaryProfileClick(a){var b,c;Q.setSessionIndex(a, | |
!0);document.querySelectorAll(`.${S.SSO_CARD}`).forEach(C=>{C&&C.classList.add(S.SSO_CARD_HIDDEN)});this.isOpened=!this.isOpened;const d=`${S.PROFILE_PREFIX}${a}`,e=document.querySelectorAll(`.${S.SECONDARY_ACCOUNTS_LIST}`),f=document.querySelectorAll(`.${S.PRIMARY_ACCOUNT_PROFILE}`),h=Number(f[0].dataset.position),l=document.querySelectorAll(`.${S.PRIMARY_ACCOUNT_NAME}`),n=document.querySelectorAll(`.${S.PRIMARY_ACCOUNT_EMAIL}`),t=document.querySelectorAll(`img.${S.PRIMARY_ACCOUNT_IMAGE}`),u=document.querySelectorAll(`img.${S.PRIMARY_ACCOUNT_AVATAR_IMAGE}`); | |
e.forEach(C=>{const Y=m` | |
${this.secondaryAccount(l[0].innerHTML,n[0].innerHTML,t[0].src,h)} | |
`;C.appendChild(Y)});this.addClickToSecondaryAccounts(`.${S.PROFILE_PREFIX}${h}`);const q=document.querySelector(`.${d}`),y=null===q||void 0===q?void 0:q.querySelector(`.${S.SECONDARY_ACCOUNT_IMAGE}`),x=null===y||void 0===y?void 0:y.src,K=null===(b=null===q||void 0===q?void 0:q.querySelector(`.${S.SECONDARY_ACCOUNT_NAME}`))||void 0===b?void 0:b.innerHTML,I=null===(c=null===q||void 0===q?void 0:q.querySelector(`.${S.SECONDARY_ACCOUNT_EMAIL}`))||void 0===c?void 0:c.innerHTML;f.forEach(C=>{C.dataset.position= | |
a.toString()||""});u.forEach(C=>{C.setAttribute("aria-label",`${this.profileAltText} ${null===K||void 0===K?void 0:K.trim()} (${null===I||void 0===I?void 0:I.trim()})`)});u.forEach(C=>{C.src=x||""});t.forEach(C=>{C.src=x||""});l.forEach(C=>{C.innerHTML=K||""});n.forEach(C=>{C.innerHTML=I||""});e.forEach(C=>{const Y=C.querySelector(`.${d}`);Y&&C.removeChild(Y)});Q.addCurrentUserToUrl(a,[this.ctaStartNow,this.ctaSignIn,this.modalCtaBlock[1]]);db.setMarketingClientUser(a);this.renderAdsAccounts()}getPrimaryAccount(){const a= | |
this.getResponseValidatedSessionIndex();this.profileIndex=a;this.profileName=Ka.call(this.api_response[a][2],La,Na);this.profileEmail=Ka.call(this.api_response[a][3],La,Na);this.profileImageUrl=this.api_response[a][4].replace("s48-c","s160-c");const b=setInterval(()=>{const c=document.querySelectorAll(`.${S.PROFILE_AVATAR}`),d=document.querySelectorAll(`.${S.SSO_CARD}`);c&&(c.forEach(e=>{var f,h;e.children[0].setAttribute("alt-text",`${this.profileAltText} ${null===(f=this.profileName)||void 0=== | |
f?void 0:f.trim()} (${null===(h=this.profileEmail)||void 0===h?void 0:h.trim()})`);e.addEventListener(B.CLICK,()=>{e.setAttribute("aria-expanded",`${!this.isOpened}`);d.forEach(l=>{l&&l.classList.toggle(S.SSO_CARD_HIDDEN,this.isOpened)});this.isOpened=!this.isOpened})}),clearInterval(b))},H.ONE_HUNDRED)}getSecondaryAccounts(){const a=this.getResponseValidatedSessionIndex(),b=[];this.api_response.map((c,d)=>{d!=a&&b.push(this.secondaryAccount(Ka.call(c[2],La,Na),Ka.call(c[3],La,Na),c[4],d))});this.updateSecondaryProfiles= | |
b}addClickToSecondaryAccounts(a){document.querySelectorAll(`.${S.SECONDARY_ACCOUNTS_LIST}`).forEach(b=>{b.querySelectorAll(a).forEach(c=>{const d=c.dataset.position?Number(c.dataset.position):0;c.addEventListener(B.CLICK,()=>{this.handleSecondaryProfileClick(d)});c.addEventListener(B.KEYPRESS,e=>{if(e.code===F.ENTER||e.code===F.SPACE)e.preventDefault(),this.handleSecondaryProfileClick(d)})})})}getResponseValidatedSessionIndex(){let a=Q.getSessionIndex();a>=this.api_response.length&&(a=0,Q.setSessionIndex(0)); | |
return a}bfCacheHandler(){window.addEventListener(B.PAGESHOW,a=>{a.persisted&&(Q.initBFCache(),this.isOpened=!1,Q.apiRequest().then(b=>{this.api_response=b;this.handleApiRequest()}))})}hideIfHeaderHidesOnScroll(){document.addEventListener(B.GADS_HEADER_HIDE,()=>{this.querySelectorAll(`.${S.SSO_CARD}`).forEach(a=>{null===a||void 0===a?void 0:a.classList.add(S.SSO_CARD_HIDDEN)});this.isOpened=!1})}renderAccountStatus(a){var b;if(!this.adsAccountStatus.map(d=>d.key).includes(a))return"";const c=null=== | |
(b=this.adsAccountStatus.find(d=>d.key===a))||void 0===b?void 0:b.value;return c?p`<div class="gads-sign-in-card__ads-account-status">${c}</div>`:""}async renderAdsAccounts(){const a=document.querySelectorAll(".gads-sign-in-card__ads-accounts-array");a.forEach(d=>{d.innerHTML=this.renderLoader()});const b=await db.getAdsAccounts(),c=this.ctaInfo&&this.ctaInfo[5];if(b&&c){this.adsAccountsArray=b.map(e=>this.adsAccountItem(e));a.forEach(e=>{e.innerHTML=this.adsAccountsArray.join("")});N.dispatchUpdateCtaParamsEvent(".gads-sign-in-card__ads-account-item:not(.gads-sign-in-card__ads-account-item--add)", | |
c.default_subid_position);N.dispatchUpdateCtaParamsEvent(".gads-sso-modal__ctas a",this.modalObj.cta[1].default_subid_position);const d=this.getResponseValidatedSessionIndex();document.querySelectorAll(".gads-sign-in-card__ads-account-item:not(.gads-sign-in-card__ads-account-item--add)").forEach(e=>{Q.addUserToHref(e,`${Fa.AUTHUSER}=${d}`)})}else a.forEach(d=>{d.innerHTML=""})}renderLoader(){return p` | |
<div class="gads-sign-in-card__loader-wrapper"> | |
<div class="gads-sign-in-card__loader"></div> | |
</div> | |
`}renderModal(){return p` | |
<div class="gads-sso-modal gads-sso-modal--${this.deviceType} glue-modal" aria-labelledby="gads-sso-modal__headline--${this.deviceType}" aria-describedby="gads-sso-modal__copy--${this.deviceType}"> | |
<div class="gads-sso-modal__inner"> | |
<h2 id="gads-sso-modal__headline--${this.deviceType}" class="gads-sso-modal__headline glue-headline glue-headline--headline-5"> | |
${this.modalObj.headline} | |
</h2> | |
<p id="gads-sso-modal__copy--${this.deviceType}" class="gads-sso-modal__copy"> | |
${this.modalObj.copy} | |
</p> | |
<div class="gads-sso-modal__ctas"> | |
${this.modalCtaBlock} | |
</div> | |
</div> | |
<button class="glue-modal__close-btn"></button> | |
</div> | |
`}render(){return m` | |
${this.profileAvatar()} | |
${this.card()} | |
${this.renderModal()} | |
`}};customElements.define("gads-single-sign-on-v2",Rb);var Sb=class extends M{constructor(){super(...arguments);this.encoded_url="";this.social_gtm_names={};this.social_labels={};this.subject_text="";this.socialEl=this.querySelector(".glue-social")}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()),this.socialEl=this.querySelector(".glue-social"));this.socialEl&&r.GLUE in window&&new glue.Social(this.socialEl)}get encodedURL(){return this.getAttribute("encoded-url")||""}get encodedURI(){return this.encodedURL?encodeURIComponent(this.encodedURL): | |
""}get subjectText(){const a=this.getAttribute("subject-text")||"";return encodeURIComponent(k(a))}get socialGtmNames(){const a=this.getAttribute("social-gtm-names");return"string"===typeof a?JSON.parse(k(a)):this.social_gtm_names}get socialLabels(){const a=this.getAttribute("social-labels");return"string"===typeof a?JSON.parse(k(a)):this.social_labels}render(){const a=this.socialGtmNames,b=this.socialLabels,c=this.gtmModuleName;return m` | |
<section class="glue-social"> | |
<div class="glue-social__group"> | |
<p class="glue-social__title glue-social__title--inline"> | |
<gads-icon icon-id="SHARE" class-names="glue-icon--24px"></gads-icon> | |
${null===b||void 0===b?void 0:b.share} | |
</p> | |
<ul class="glue-social__list" role="list"> | |
<li class="glue-social__item"> | |
<a class="glue-social__link" title="${null===b||void 0===b?void 0:b.send_via_email}" target="_blank" | |
href="mailto:?subject=${this.subjectText}&body=${this.encodedURI}" | |
data-g-module-name="${c}" data-g-cta-name="${null===a||void 0===a?void 0:a.email}"> | |
<gads-icon icon-id="EMAIL" class-names="glue-icon--social mail-icon glue-icon--24px"></gads-icon> | |
</a> | |
</li> | |
<li class="glue-social__item"> | |
<div class="glue-social__popover"> | |
<div class="glue-social__icon-trigger" | |
${b.get_shareable_link?`aria-label="${b.get_shareable_link}" title="${b.get_shareable_link}"`:""} | |
id="share-popover-trigger" | |
data-g-module-name="${c}" | |
data-g-cta-name="${null===a||void 0===a?void 0:a.copy_open_tooltip}"> | |
<gads-icon icon-id="LINK" class-names="glue-icon--social glue-icon--24px"></gads-icon> | |
</div> | |
<div class="glue-social__dialog" id="share-popover-dialog"> | |
<gads-icon icon-id="LINK" class-names="glue-icon--social glue-icon--24px"></gads-icon> | |
<div class="glue-social__copy" glue-copy-success="${b.copied_to_clipboard}" glue-copy-fail="${b.press_ctrl_c}"> | |
<input class="glue-social__copy-input" readonly="" type="text" value="${this.encodedURL}"> | |
<button class="glue-social__copy-btn" id="share-copy-btn" data-g-module-name="${c}" data-g-cta-name="${null===a||void 0===a?void 0:a.copy_link}">${null===b||void 0===b?void 0:b.copy_link}</button> | |
</div> | |
<div ${b.close_tooltip?`aria-label="${b.close_tooltip}"`:""} class="glue-social__close-btn"> | |
\u00d7 | |
</div> | |
</div> | |
</div> | |
</li> | |
<li class="glue-social__item"> | |
<a class="glue-social__link" href="https://www.facebook.com/sharer/sharer.php?u=${this.encodedURI}" target="_blank" | |
title="${null===b||void 0===b?void 0:b.share_facebook}" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" | |
data-g-module-name="${c}" data-g-cta-name="${null===a||void 0===a?void 0:a.facebook}"> | |
<gads-icon icon-id="POST_FACEBOOK" class-names="glue-icon--social glue-icon--color-facebook glue-icon--24px"></gads-icon> | |
</a> | |
</li> | |
<li class="glue-social__item"> | |
<a class="glue-social__link" href="https://www.linkedin.com/shareArticle?url=${this.encodedURI}&mini=true" target="_blank" | |
title="${null===b||void 0===b?void 0:b.share_linkedin}" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" | |
data-g-module-name="${c}" data-g-cta-name="${null===a||void 0===a?void 0:a.linkedin}"> | |
<gads-icon icon-id="POST_LINKEDIN" class-names="glue-icon--social glue-icon--color-linkedin glue-icon--24px"></gads-icon> | |
</a> | |
</li> | |
<li class="glue-social__item"> | |
<a class="glue-social__link" href="https://twitter.com/intent/tweet?text=${this.subjectText}&url=${this.encodedURI}" target="_blank" | |
title="${null===b||void 0===b?void 0:b.share_twitter}" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" | |
data-g-module-name="${c}" data-g-cta-name="${null===a||void 0===a?void 0:a.twitter}"> | |
<gads-icon icon-id="TWITTER" class-names="glue-icon--social glue-icon--color-twitter glue-icon--24px"></gads-icon> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</section> | |
`}};customElements.define("gads-social",Sb);var Tb,Ub=Tb||(Tb={});Ub.GLUE_FOOTER=".glue-footer";Ub.LANG_PICKER="#lang-selector"; | |
var Vb=class extends M{constructor(){super(...arguments);this._footerEl=this._footer=null;this._langPickerEl=this.querySelector(Tb.LANG_PICKER);this.help=this.headline=this.google_link=this.global_links=this.follow_us=this.disclaimer=this.columns_aria_label=this.columns="";this.hide_lang_picker=!1;this.social_links="";this.handleLangPickerChange=()=>{window.location.href=Ea.ADS.DOMAIN+this.langPickerEl.value};this.langPickerMapper=()=>[{value:"ru",copy:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439"}, | |
{value:"fr",copy:"Fran\u00e7ais"},{value:"fr_dz",copy:"Alg\u00e9rie - Fran\u00e7ais"},{value:"es-419",copy:"Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"es-419_ar",copy:"Argentina - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"en_au",copy:"Australia - English"},{value:"fr_be",copy:"Belgique - Fran\u00e7ais"},{value:"nl_be",copy:"Belgi\u00eb - Nederlands"},{value:"es-419_bo",copy:"Bolivia - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"pt-BR_br",copy:"Brasil - Portugu\u00eas (Brasil)"},{value:"en_ca", | |
copy:"Canada - English"},{value:"fr_ca",copy:"Canada - Fran\u00e7ais"},{value:"es-419_cl",copy:"Chile - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"es-419_co",copy:"Colombia - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"es-419_cr",copy:"Costa Rica - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"en_cy",copy:"Cyprus - English"},{value:"da_dk",copy:"Danmark - Dansk"},{value:"de_de",copy:"Deutschland - Deutsch"},{value:"es-419_ec",copy:"Ecuador - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"et_ee",copy:"Eesti - Eesti"}, | |
{value:"en_eg",copy:"Egypt - English"},{value:"es-419_sv",copy:"El Salvador - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"en",copy:"English"},{value:"ca_es",copy:"Espanya - Catal\u00e0"},{value:"es_es",copy:"Espa\u00f1a - Espa\u00f1ol"},{value:"es_us",copy:"Estados Unidos - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"fr_fr",copy:"France - Fran\u00e7ais"},{value:"es-419_gt",copy:"Guatemala - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"es-419_hn",copy:"Honduras - Espa\u00f1ol (Latinoam\u00e9rica)"}, | |
{value:"en_hk",copy:"Hong Kong - English"},{value:"hr_hr",copy:"Hrvatska - Hrvatski"},{value:"en_in",copy:"India - English"},{value:"id_id",copy:"Indonesia - Bahasa Indonesia"},{value:"en_id",copy:"Indonesia - English"},{value:"en_ie",copy:"Ireland - English"},{value:"it_it",copy:"Italia - Italiano"},{value:"lv_lv",copy:"Latvija - Latvie\u0161u"},{value:"lt_lt",copy:"Lietuva - Lietuvi\u0173"},{value:"hu_hu",copy:"Magyarorsz\u00e1g - Magyar"},{value:"en_my",copy:"Malaysia - English"},{value:"fr_ma", | |
copy:"Maroc - Fran\u00e7ais"},{value:"es-419_mx",copy:"M\u00e9xico - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"nl_nl",copy:"Nederland - Nederlands"},{value:"en_nz",copy:"New Zealand - English"},{value:"es-419_ni",copy:"Nicaragua - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"en_ng",copy:"Nigeria - English"},{value:"no_no",copy:"Norge - Norsk"},{value:"en_pk",copy:"Pakistan - English"},{value:"es-419_pa",copy:"Panam\u00e1 - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"es-419_py",copy:"Paraguay - Espa\u00f1ol (Latinoam\u00e9rica)"}, | |
{value:"es-419_pe",copy:"Per\u00fa - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"en_ph",copy:"Philippines - English"},{value:"pl_pl",copy:"Polska - Polski"},{value:"pt-PT_pt",copy:"Portugal - Portugu\u00eas (Portugal)"},{value:"es-419_pr",copy:"Puerto Rico - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"es-419_do",copy:"Rep\u00fablica Dominicana - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"ro_ro",copy:"Rom\u00e2nia - Rom\u00e2n\u0103"},{value:"en_sa",copy:"Saudi Arabia - English"},{value:"de_ch",copy:"Schweiz - Deutsch"}, | |
{value:"en_sg",copy:"Singapore - English"},{value:"sl_si",copy:"Slovenija - Sloven\u0161\u010dina"},{value:"sk_sk",copy:"Slovensko - Sloven\u010dina"},{value:"en_za",copy:"South Africa - English"},{value:"fr_ch",copy:"Suisse - Fran\u00e7ais"},{value:"fi_fi",copy:"Suomi - Suomi"},{value:"sv_se",copy:"Sverige - Svenska"},{value:"fr_tn",copy:"Tunisie - Fran\u00e7ais"},{value:"tr_tr",copy:"T\u00fcrkiye - T\u00fcrk\u00e7e"},{value:"en_ae",copy:"United Arab Emirates - English"},{value:"en_uk",copy:"United Kingdom - English"}, | |
{value:"en_us",copy:"United States - English"},{value:"es-419_uy",copy:"Uruguay - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"es-419_ve",copy:"Venezuela - Espa\u00f1ol (Latinoam\u00e9rica)"},{value:"vi_vn",copy:"Vi\u1ec7t Nam - Ti\u1ebfng Vi\u1ec7t"},{value:"de_at",copy:"\u00d6sterreich - Deutsch"},{value:"cs_cz",copy:"\u010cesk\u00e1 Republika - \u010ce\u0161tina"},{value:"el_gr",copy:"\u0395\u03bb\u03bb\u03ac\u03b4\u03b1 - \u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac"},{value:"ru_by",copy:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u044c - \u0420\u0443\u0441\u0441\u043a\u0438\u0439"}, | |
{value:"bg_bg",copy:"\u0411\u044a\u043b\u0433\u0430\u0440\u0438\u044f - \u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438"},{value:"ru_kz",copy:"\u041a\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043d - \u0420\u0443\u0441\u0441\u043a\u0438\u0439"},{value:"sr_rs",copy:"\u0421\u0440\u0431\u0438\u0458\u0430 - \u0421\u0440\u043f\u0441\u043a\u0438"},{value:"uk_ua",copy:"\u0423\u043a\u0440\u0430\u0457\u043d\u0430 - \u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430"},{value:"hi_in",copy:"\u092d\u093e\u0930\u0924 - \u0939\u093f\u0928\u094d\u0926\u0940"}, | |
{value:"th_th",copy:"\u0e44\u0e17\u0e22 - \u0e44\u0e17\u0e22"},{value:"iw_il",copy:"\u202b\u05d9\u05e9\u05e8\u05d0\u05dc - \u05e2\u05d1\u05e8\u05d9\u05ea\u202c"},{value:"ar_ae",copy:"\u202b\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062a \u0627\u0644\u0639\u0631\u0628\u064a\u0629 \u0627\u0644\u0645\u062a\u062d\u062f\u0629 - \u0627\u0644\u0639\u0631\u0628\u064a\u0629\u202c"},{value:"ar",copy:"\u202b\u0627\u0644\u0639\u0631\u0628\u064a\u0629\u202c"},{value:"ar_sa",copy:"\u202b\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064a\u0629 \u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629 - \u0627\u0644\u0639\u0631\u0628\u064a\u0629\u202c"}, | |
{value:"ar_eg",copy:"\u202b\u0645\u0635\u0631 - \u0627\u0644\u0639\u0631\u0628\u064a\u0629\u202c"},{value:"zh-CN_cn",copy:"\u4e2d\u56fd - \u4e2d\u6587\uff08\u7b80\u4f53\u4e2d\u6587\uff09"},{value:"zh-TW_tw",copy:"\u53f0\u7063 - \u4e2d\u6587\uff08\u7e41\u9ad4\u4e2d\u6587\uff09"},{value:"ja_jp",copy:"\u65e5\u672c - \u65e5\u672c\u8a9e"},{value:"ko_kr",copy:"\ub300\ud55c\ubbfc\uad6d - \ud55c\uad6d\uc5b4"}].map(a=>this.langPickerOption(a.value,a.copy));this.langPickerOption=(a,b)=>{const c="root"===this.locale? | |
"en":this.locale.replace("_ALL","");return p` | |
<option value="/intl/${a}/home/" ${c===a?"selected":""}> | |
${b} | |
</option> | |
`};this.langPickerRender=p` | |
<select | |
name="lang-selector" | |
id="lang-selector" | |
class="glue-form__dropdown glue-footer__lang-dropdown" | |
aria-label="Change language or region"> | |
${this.langPickerMapper()} | |
</select> | |
`}connectedCallback(){this.footerEl=this.querySelector(Tb.GLUE_FOOTER);this.firstElementChild||(this.replaceChildren(this.render()),this.footerEl=this.querySelector(Tb.GLUE_FOOTER),this.langPickerEl=this.querySelector(Tb.LANG_PICKER));r.GLUE in window&&(this.footer=new glue.Footer(this.footerEl));this.langPickerEl&&this.langPickerEl.addEventListener(B.CHANGE,()=>{this.handleLangPickerChange()})}get footerEl(){return this._footerEl}set footerEl(a){this._footerEl=a}get footer(){return this._footer}set footer(a){a instanceof | |
glue.Footer&&(this._footer=a)}get langPickerEl(){return this._langPickerEl}set langPickerEl(a){this._langPickerEl=a}get columnsList(){const a=this.getAttribute("columns")||this.columns;return"string"===typeof a?JSON.parse(k(a)):a}get columnsAriaLabel(){return this.getAttribute("columns-aria-label")||this.columns_aria_label}get disclaimerText(){return this.getAttribute(w.DISCLAIMER)||this.disclaimer}get globalLinksList(){const a=this.getAttribute("global-links")||this.global_links;return"string"=== | |
typeof a?JSON.parse(k(a)):a}get helpButton(){const a=this.getAttribute("help")||this.help;return"string"===typeof a?JSON.parse(k(a)):a}get googleLink(){const a=this.getAttribute("google-link")||this.google_link;return"string"===typeof a?JSON.parse(k(a)):a}get followUsText(){return this.getAttribute("follow-us")||this.follow_us}get hideLangPicker(){return this.getAttribute("hide-lang-picker")||this.hide_lang_picker}get socialLinks(){const a=this.getAttribute("social-links")||this.social_links;return"string"=== | |
typeof a?JSON.parse(k(a)):a}get headlineText(){return this.getAttribute(w.HEADLINE)||this.headline}render(){var a,b,c,d,e,f,h,l,n;return m` | |
<footer class="glue-footer glue-spacer-3-top"> | |
<h2 class="glue-visually-hidden">${this.headlineText}</h2> | |
${this.followUsText&&(null===(a=this.socialLinks)||void 0===a?0:a.length)?p` | |
<section class="glue-footer__upper"> | |
<section class="glue-social"> | |
<div class="glue-social__group"> | |
<p class="glue-social__title glue-social__title--inline"> | |
${this.followUsText} | |
</p> | |
<ul class="glue-social__list" role="list"> | |
${this.socialLinks.map(t=>t.url?p` | |
<li class="glue-social__item"> | |
<a class="glue-social__link" href="${t.url}" ${this.setExternalLink(t.url)} aria-label="${t.label}"> | |
<gads-icon icon-id="${t.icon_id}" class-names="glue-icon--24px"></gads-icon> | |
</a> | |
</li> | |
`:"")} | |
</ul> | |
</div> | |
</section> | |
</section> | |
`:""} | |
<nav class="glue-footer__site-links" aria-label="${this.columnsAriaLabel}"> | |
<div class="glue-footer__site-links-grid glue-footer__site-links-grid--5-col"> | |
${null===(b=this.columnsList)||void 0===b?void 0:b.map((t,u)=>p` | |
<div class="glue-footer__site-links-column"> | |
<h3 class="glue-footer__site-links-header"> | |
<span class="glue-footer__site-links-header-button" id="column-${u}-toggle"> | |
<span class="glue-footer__site-links-header-text">${t.headline}</span> | |
<svg viewBox="0 0 24 24" class="glue-icon glue-icon--32px expand-more"> | |
<path d="M5.41 7.59L4 9l8 8 8-8-1.41-1.41L12 14.17" /> | |
</svg> | |
</span> | |
</h3> | |
<div class="glue-footer__site-links-list" id="column-${u}-content"> | |
<ul class="glue-no-bullet" role="list"> | |
${t.links.map(q=>p` | |
<li class="glue-footer__site-links-list-item"> | |
<a class="glue-footer__link" href="${this.relativizeKintaroLink(q.url)}" ${this.setExternalLink(q.url)}>${q.text}</a> | |
</li> | |
`)} | |
</ul> | |
</div> | |
</div> | |
`)} | |
</div> | |
</nav> | |
${this.disclaimerText?p` | |
<div class="glue-footer__global glue-footer__disclaimer-text"> | |
<p class="disclaimer-text">${this.disclaimerText}</p> | |
</div> | |
`:""} | |
<section class="glue-footer__global"> | |
<div class="glue-footer__logo"> | |
<a href="${null===(c=this.googleLink)||void 0===c?void 0:c.url}" title="${null===(d=this.googleLink)||void 0===d?void 0:d.label}" target="_blank" rel="noopener noreferrer"> | |
<svg id="${null===(e=this.googleLink)||void 0===e?void 0:e.icon_id}" viewBox="0 0 74 24" class="glue-icon google-logo" width="74"> | |
<path d="M9.24 8.19v2.46h5.88c-.18 1.38-.64 2.39-1.34 3.1-.86.86-2.2 1.8-4.54 1.8-3.62 0-6.45-2.92-6.45-6.54s2.83-6.54 6.45-6.54c1.95 0 3.38.77 4.43 1.76L15.4 2.5C13.94 1.08 11.98 0 9.24 0 4.28 0 .11 4.04.11 9s4.17 9 9.13 9c2.68 0 4.7-.88 6.28-2.52 1.62-1.62 2.13-3.91 2.13-5.75 0-.57-.04-1.1-.13-1.54H9.24zm15.76-2c-3.21 0-5.83 2.44-5.83 5.81 0 3.34 2.62 5.81 5.83 5.81s5.83-2.46 5.83-5.81c0-3.37-2.62-5.81-5.83-5.81zm0 9.33c-1.76 0-3.28-1.45-3.28-3.52 0-2.09 1.52-3.52 3.28-3.52s3.28 1.43 3.28 3.52c0 2.07-1.52 3.52-3.28 3.52zm28.58-8.03h-.09c-.57-.68-1.67-1.3-3.06-1.3C47.53 6.19 45 8.72 45 12c0 3.26 2.53 5.81 5.43 5.81 1.39 0 2.49-.62 3.06-1.32h.09v.81c0 2.22-1.19 3.41-3.1 3.41-1.56 0-2.53-1.12-2.93-2.07l-2.22.92c.64 1.54 2.33 3.43 5.15 3.43 2.99 0 5.52-1.76 5.52-6.05V6.49h-2.42v1zm-2.93 8.03c-1.76 0-3.1-1.5-3.1-3.52 0-2.05 1.34-3.52 3.1-3.52 1.74 0 3.1 1.5 3.1 3.54.01 2.03-1.36 3.5-3.1 3.5zM38 6.19c-3.21 0-5.83 2.44-5.83 5.81 0 3.34 2.62 5.81 5.83 5.81s5.83-2.46 5.83-5.81c0-3.37-2.62-5.81-5.83-5.81zm0 9.33c-1.76 0-3.28-1.45-3.28-3.52 0-2.09 1.52-3.52 3.28-3.52s3.28 1.43 3.28 3.52c0 2.07-1.52 3.52-3.28 3.52zM58 .24h2.51v17.57H58zm10.26 15.28c-1.3 0-2.22-.59-2.82-1.76l7.77-3.21-.26-.66c-.48-1.3-1.96-3.7-4.97-3.7-2.99 0-5.48 2.35-5.48 5.81 0 3.26 2.46 5.81 5.76 5.81 2.66 0 4.2-1.63 4.84-2.57l-1.98-1.32c-.66.96-1.56 1.6-2.86 1.6zm-.18-7.15c1.03 0 1.91.53 2.2 1.28l-5.25 2.17c0-2.44 1.73-3.45 3.05-3.45z" /> | |
</svg> | |
</a> | |
</div> | |
<ul class="glue-footer__global-links glue-no-bullet" role="list"> | |
${null===(f=this.globalLinksList)||void 0===f?void 0:f.map(t=>p` | |
<li class="glue-footer__global-links-list-item"> | |
<a class="glue-footer__link" href="${t.url}" ${this.setExternalLink(t.url)}>${t.text}</a> | |
</li> | |
`)} | |
</ul> | |
<ul class="glue-footer__global-links glue-footer__global-links--extra glue-no-bullet" role="list"> | |
<li class="glue-footer__global-links-list-item glue-footer__global-links-list-item--extra"> | |
<a class="glue-footer__link help-link" href="${null===(h=this.helpButton)||void 0===h?void 0:h.url}" ${this.setExternalLink(null===(l=this.helpButton)||void 0===l?void 0:l.url)}> | |
<svg class="glue-icon glue-icon--24px" viewBox="0 0 24 24"> | |
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z" /> | |
</svg> | |
<span class="help-label">${null===(n=this.helpButton)||void 0===n?void 0:n.label}</span> | |
</a> | |
</li> | |
<li class="glue-footer__global-links-list-item glue-footer__global-links-list-item--extra"> | |
${this.hideLangPicker?"":this.langPickerRender} | |
</li> | |
</ul> | |
</section> | |
</footer> | |
`}};customElements.define("gads-simple-footer",Vb);var Wb=class extends M{constructor(){super(...arguments);this.ctaEl=this.querySelector(".gads-sticky-cta")}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()),this.ctaEl=this.querySelector(".gads-sticky-cta"));let a=0;if(this.ctaEl&&(this.SimpleFooterHandler(),this.HeroCtaHandler(),"false"===this.isSticky)){P.getBpName()===v.SM&&(this.ctaEl.classList.remove(A.HIDDEN),a=this.ctaEl.offsetHeight,this.ctaEl.style.bottom=`-${a}px`,this.ctaEl.classList.remove("gads-sticky-cta__invisible")); | |
const b=Gb(()=>{const c=200<window.scrollY;this.ctaEl&&(this.ctaEl.style.translate=c?`0 -${a}px`:`0 ${a}px`)},H.THIRTY);window.addEventListener(B.SCROLL,b);P.subscribe(c=>{c=c===v.SM;this.ctaEl&&(c?(this.ctaEl.classList.remove(A.HIDDEN),a=this.ctaEl.offsetHeight,this.ctaEl.style.bottom=`-${a}px`,this.ctaEl.classList.remove("gads-sticky-cta__invisible"),window.addEventListener(B.SCROLL,b)):(this.ctaEl.classList.add(A.HIDDEN,"gads-sticky-cta__invisible"),window.removeEventListener(B.SCROLL,b)))})}}get gtmModuleName(){return this.nodeName}get isSticky(){return this.getAttribute("is-sticky")|| | |
""}SimpleFooterHandler(){const a=document.querySelector(Tb.GLUE_FOOTER);P.getBpName()===v.SM&&a&&a.classList.add("glue-spacer-6-bottom");P.subscribe(b=>null===a||void 0===a?void 0:a.classList.toggle("glue-spacer-6-bottom",b===v.SM))}ButtonParamRegex(a){var b=this.ctaBlock[0];a=RegExp(a);return(b=null===b||void 0===b?void 0:b.match(a))?b[1]:null}HeroCtaHandler(){var a,b=this.ButtonParamRegex('cta-url="(.*?)"');const c=this.ButtonParamRegex('cta-text="([^"]+)"');b&&c&&(b=document.querySelector(`${".hero-cta"} a[href*='${b}']`))&& | |
(null===(a=b.textContent)||void 0===a?0:a.includes(c))&&b.classList.add("hero-hide-mobile")}render(){return m` | |
<div class="gads-sticky-cta ${"false"===this.isSticky?"hidden gads-sticky-cta__invisible":""}" data-sticky="${this.isSticky}"> | |
${this.ctaBlock} | |
</div> | |
`}};customElements.define("gads-sticky-cta",Wb);var Xb=class extends M{get time(){return this.getAttribute("time")||""}get timeAriaLabel(){return this.getAttribute("time-aria-label")||""}get template(){return this.getAttribute("template")||"light"}render(){return m` | |
<span class="timestamp-container" ${this.timeAriaLabel?p`aria-label="${this.timeAriaLabel}" role="img"`:""}> | |
<span class="timestamp timestamp--${this.template}"> | |
<gads-icon icon-id="TIME" class-names="timestamp-icon"></gads-icon> | |
<span class="glue-label timestamp-duration">${this.time}</span> | |
</span> | |
</span> | |
`}};customElements.define("gads-time-pill",Xb);var Yb,Zb=()=>Yb?Yb:window.YT?new Promise(a=>{a(!0)}):Yb=new Promise((a,b)=>{window.onYouTubeIframeAPIReady=()=>{try{a(!0)}catch(c){b(c)}};if(null===document.getElementById("youtube-api")){const c=document.createElement("script");c.id="youtube-api";const d=document.getElementsByTagName("script")[0];d&&d.parentNode?(c.setAttribute("src","https://www.youtube.com/iframe_api"),d.parentNode.insertBefore(c,d)):console.log("No script tag in the dom to attach to")}}),$b=class extends M{constructor(){super(...arguments); | |
this._modalOpenState=!1;this._vidEl=this.querySelector(".glue-video");this._modalEl=this.querySelector(".glue-modal");this._playerInstance=null}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()),this._vidEl=this.querySelector(".glue-video"));if(r.GLUE in window&&this._vidEl&&(this._vidEl=this.querySelector(".glue-video"),this._modalEl=this.querySelector(".glue-modal"),null!==this._vidEl)){if(this.showInline)Zb().then(()=>{this._playerInstance||(this._playerInstance=new glue.YoutubeVideo(this._vidEl))}); | |
else{if(null===this._modalEl)return;const a=this.querySelector(qa.GLUE_MODAL),b=new glue.Modal(a,this._vidEl.firstElementChild);this._vidEl.addEventListener(B.CLICK,async()=>{await Zb();this._playerInstance||(this._playerInstance=new glue.YoutubeVideo(this._modalEl));b.open()});this._vidEl.addEventListener(B.KEYPRESS,async c=>{c.code!==F.ENTER&&c.code!==F.SPACE||this.modalIsOpen||(c.preventDefault(),await Zb(),this._playerInstance||(this._playerInstance=new glue.YoutubeVideo(this._modalEl)),b.open())}); | |
a.addEventListener(B.GLUE_MODAL_OPEN,()=>{this.modalOpenState=!0});a.addEventListener(B.GLUE_MODAL_CLOSED,()=>{var c;this.modalOpenState=!1;const d=null===(c=this._playerInstance)||void 0===c?void 0:c.getPlayer();d&&d.pauseVideo()})}P.subscribe(a=>{var b;const {XL:c,LG:d,MD:e,SM:f}=v;[c,d,e,f].includes(a)&&(a=null===(b=this._playerInstance)||void 0===b?void 0:b.getPlayer())&&a.pauseVideo()})}}set modalOpenState(a){this._modalOpenState=a}get modalIsOpen(){return this._modalOpenState}get videoId(){return this.getAttribute("video-id")|| | |
""}get poster(){return this.getAttribute("poster")||""}get posterImages(){const a=this.getAttribute("poster-images");return"string"===typeof a?JSON.parse(k(a)):null}get showInline(){return this.hasAttribute("inline")}get widths(){return this.getAttribute(w.WIDTHS)||""}get displayType(){return this.showInline?"inline":"modal"}get ctaButton(){return this.getAttribute(w.CTA)}get youtubeData(){return this.getAttribute("youtube-data")}get hasPosterImage(){return this.hasAttribute("poster-images")||this.hasAttribute("poster")}get modalBtnInfo(){return{dest:this.getAttribute("video-btn-destination")|| | |
"",text:this.getAttribute("video-btn-text")||""}}get modalLabels(){return this.getAttribute(w.MODAL_ARIA_LABELS)||""}get ariaAlt(){return this.getAttribute("alt-text")||""}get isEagerLoading(){return this.hasAttribute("loading-eager")}get isHighPriority(){return this.hasAttribute("priority-high")}classNameLookup(a){return{"play-button":"glue-video__play-button","play-button-red":"glue-video__play-button--red","play-button-white":"glue-video__play-button--white"}[a]||""}inline(){return p` | |
<div class="glue-video__container glue-video__container--inline" | |
data-glue-yt-video-vid="${this.videoId}"></div> | |
`}modal(){return p` | |
<div class="glue-modal glue-modal--dark gads-video-modal" role="dialog" aria-modal="true"> | |
<button class="glue-modal__close-btn" aria-label="${this.modalLabels}"></button> | |
<section | |
class="glue-video__container glue-modal__content-wrapper" | |
data-glue-yt-video-vid="${this.videoId}" | |
data-glue-yt-video-height="100%" | |
data-glue-yt-video-width="100%"> | |
</section> | |
${this.modalBtnInfo.text?p` | |
<gads-button | |
cta-text="${this.modalBtnInfo.text}" | |
cta-url="${this.modalBtnInfo.dest}" | |
cta-name="yt-modal-btn-${this.videoId}"> | |
</gads-button> | |
`:""} | |
</div> | |
`}posterImage(){return this.poster?p` | |
<gads-image | |
alt-text="${this.ariaAlt}" | |
image-class="glue-video__preview-image" | |
image="${this.poster}" | |
picture-class="glue-video__preview" | |
widths="${this.widths}" | |
${this.isEagerLoading?"loading-eager":""} | |
${this.isHighPriority?"priority-high":""}> | |
</gads-image> | |
`:this.posterImages?p` | |
<gads-image | |
image-class="glue-video__preview-image" | |
images="${g(JSON.stringify(this.posterImages))}" | |
picture-class="glue-video__preview" | |
widths="${this.widths}" | |
${this.isEagerLoading?"loading-eager":""} | |
${this.isHighPriority?"priority-high":""}> | |
</gads-image> | |
`:null}posterOverlay(){const a=this.getAttribute("video-label")||null;var b=this.getAttribute("poster-icon-color")||null;b=b?this.classNameLookup(b):"";b=`${this.classNameLookup("play-button")} ${b}`.trim();return p` | |
<gads-icon icon-id="VIDEO_YOUTUBE" class-names="${b}"></gads-icon> | |
${a?p` | |
<div class="glue-video__label-container"> | |
<p class="glue-video__label glue-video__label--light glue-video__label--highlight glue-font-weight-medium">${a}</p> | |
</div> | |
`:""} | |
`}posterDuration(){const a=this.getAttribute("show-duration"),b=this.getAttribute("duration-label");return a?p` | |
<gads-time-pill time="${a}" time-aria-label="${b}" template="dark"></gads-time-pill> | |
`:""}youtubeCta(){const a=this.ctaButton?JSON.parse(k(this.ctaButton)):"";return p` | |
<div class="glue-video" data-glue-yt-video-vid="${this.videoId}"> | |
<gads-button ${this.unpackCta(a)}></gads-button> | |
</div> | |
${this.modal()} | |
`}render(){return m` | |
<div class="glue-video"> | |
${this.hasPosterImage?p` | |
<div class="glue-video__preview-container | |
glue-video__preview-container--${this.displayType}" tabindex="0" role="button"> | |
${this.posterImage()} | |
<div class="glue-video__info"> | |
${this.posterOverlay()} | |
${this.posterDuration()} | |
</div> | |
</div> | |
${this.showInline?this.inline():this.modal()} | |
`:this.youtubeCta()} | |
</div> | |
`}};customElements.define("gads-video",$b);var U={};U.AWPrefetch=hb;U.AdsGuideImplementation=eb;U.EditableImage=Cb;U.EditableImageInner=Db;U.GadsAdsGuide=ob;U.GadsBanner=pb;U.GadsButton=qb;U.GadsCarousel=yb;U.GadsChatWidgetThirdParty=Bb;U.GadsComponent=M;U.GadsCustomCarousel=Ib;U.GadsImage=Eb;U.GadsImageCTA=Fb;U.GadsIncentivesBanner=Hb;U.GadsJumplinkBasicCard=Jb;U.GadsJumplinkListCard=Kb;U.GadsJumplinkVideoCard=Lb;U.GadsPresentationalVideo=Nb;U.GadsSingleSignOn=Qb;U.GadsSingleSignOnV2=Rb;U.GadsSocial=Sb;U.GadsStickyCTA=Wb;U.GadsTimePill=Xb; | |
U.GadsVideo=$b;U.HaTSSurvey=nb;U.SubIDOperations=N;var ac=class extends M{constructor(){super(...arguments);this.a11y_check_copy=this.facets=this.headline="";this.a11y_check_id=null;this.aria_button_selected="";this._facetPillEls=this.querySelectorAll(".facet-pill");this._imageSlotEls=this.querySelectorAll(".image-slot");this._textColumnEls=this.querySelectorAll(".text-column");this._textColumnWrapper=this.querySelector(".text-column-wrapper");this._pillsWrapper=this.querySelector(".facet-pills-wrapper");this._pillsSmMdSlide=this.querySelector(".facet-pills-container"); | |
this._pillBorderAnim=void 0;this._facetActiveIndex=0;this._isReducedMotion=Ia.isReducedMotion;this._hasHoverListeners=this._isAccessible=this._pillsShouldSlide=!1;this._pillsAnimDuration=8E3;this._pillsSlideDuration=200;this.transitionPlay=()=>{this._pillBorderAnim&&"idle"!==this._pillBorderAnim.playState&&this._pillBorderAnim.play()};this.transitionPause=()=>{this._pillBorderAnim&&"idle"!==this._pillBorderAnim.playState&&this._pillBorderAnim.pause()}}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()), | |
this._facetPillEls=this.querySelectorAll(".facet-pill"),this._imageSlotEls=this.querySelectorAll(".image-slot"),this._textColumnEls=this.querySelectorAll(".text-column"),this._pillsWrapper=this.querySelector(".facet-pills-wrapper"),this._pillsSmMdSlide=this.querySelector(".facet-pills-container"),this._textColumnWrapper=this.querySelector(".text-column-wrapper"));this.scrollOnClick();this.setShouldSlide();P.subscribe(()=>{this.setShouldSlide()});r.INTERSECTION_OBS in window?(new IntersectionObserver(this.componentInViewport.bind(this), | |
{root:null,rootMargin:"0px",threshold:0})).observe(this._facetPillEls[1]):(this.facetTransition(),this.addListeners())}get gtmModuleName(){return this.nodeName}componentInViewport(a,b){for(const c of a)c.isIntersecting&&(this.facetTransition(),this.addListeners(),b.disconnect())}setShouldSlide(){this._pillsSmMdSlide&&this._pillsWrapper&&(this._pillsShouldSlide=this._pillsSmMdSlide.scrollWidth>this._pillsWrapper.scrollWidth)}addListeners(){for(const [b,c]of this._facetPillEls.entries())c.addEventListener(B.CLICK, | |
()=>{this.showFacetActive(b)});this.addHoverListeners();const a=this.querySelector(".adsFormatA11yCheck");null===a||void 0===a?void 0:a.addEventListener(B.CHANGE,()=>{(this._isAccessible=a.checked)&&this._pillBorderAnim?(this._pillBorderAnim.cancel(),this.removeHoverListeners()):this._hasHoverListeners||(this.facetTransition(),this.addHoverListeners())})}showFacetActive(a){this._pillBorderAnim&&this._pillBorderAnim.cancel();const b=a===this._facetActiveIndex,c=!(this._facetPillEls.length-1!==a||!this._pillsShouldSlide); | |
for(const d of this.facetActiveEls)d.classList.remove(A.ACTIVE);this._facetActiveIndex=a%this._facetPillEls.length;for(const d of this.facetActiveEls)d.classList.add(A.ACTIVE);this._isAccessible||(b||c?this.removeHoverListeners():this.facetTransition())}get facetActiveEls(){return[this._facetPillEls[this._facetActiveIndex],this._imageSlotEls[this._facetActiveIndex],this._textColumnEls[this._facetActiveIndex]]}facetTransition(){this._pillsShouldSlide&&this.pillsSmMdSlide();r.ANIMATE in HTMLElement.prototype&& | |
!this._isReducedMotion&&this.pillBorderAnimInit()}pillBorderAnimInit(){const a=this._facetPillEls[this._facetActiveIndex+1]||this._facetPillEls[0],b=a.querySelector(".facet-pill-border rect"),c=b.getTotalLength()+5;b.style.strokeDasharray=c.toString();b.style.strokeDashoffset=c.toString();b.classList.add("next");this._pillBorderAnim=b.animate([{strokeDashoffset:c,strokeWidth:4},{strokeDashoffset:0,strokeWidth:4,offset:.98,easing:"cubic-bezier(0.11, 0, 0.5, 0)"},{strokeDashoffset:0,strokeWidth:8,easing:"ease-out"}], | |
{duration:this._pillsAnimDuration,delay:this._pillsShouldSlide?this._pillsSlideDuration:0,fill:"forwards"});this.addCurrentAnimListeners(a,b)}addCurrentAnimListeners(a,b){a.addEventListener(B.MOUSEOVER,this.transitionPause);a.addEventListener(B.MOUSELEAVE,this.transitionPlay);const c=this._pillBorderAnim;c&&(c.onfinish=()=>{b.classList.remove("next");this.showFacetActive(this._facetActiveIndex+1)},c.oncancel=()=>{this.removeCurrentAnimListeners(a);b.classList.remove("next")})}removeCurrentAnimListeners(a){a.removeEventListener(B.MOUSEOVER, | |
this.transitionPause);a.removeEventListener(B.MOUSELEAVE,this.transitionPlay)}addHoverListeners(){this._textColumnWrapper&&(this._textColumnWrapper.addEventListener(B.MOUSEOVER,this.transitionPause.bind(this)),this._textColumnWrapper.addEventListener(B.MOUSELEAVE,this.transitionPlay.bind(this)),this._hasHoverListeners=!0)}removeHoverListeners(){this._textColumnWrapper&&(this._textColumnWrapper.removeEventListener(B.MOUSEOVER,this.transitionPause.bind(this)),this._textColumnWrapper.removeEventListener(B.MOUSELEAVE, | |
this.transitionPlay.bind(this)),this._hasHoverListeners=!1)}pillsSmMdSlide(){const a=this._facetPillEls[this._facetActiveIndex],b=P.getBpName()===v.SM?sa.SM:sa.MD;this._pillsSmMdSlide.scrollTo({left:a.offsetLeft-b,top:0,behavior:this._isReducedMotion?G.AUTO:G.SMOOTH})}scrollOnClick(){const a=()=>{const b={top:this._pillsWrapper.getBoundingClientRect().top+window.scrollY-100,behavior:this._isReducedMotion?G.AUTO:G.SMOOTH};window.scroll(b)};P.getBpName()===(v.SM||v.MD)&&this._pillsWrapper.addEventListener(B.CLICK, | |
a);P.subscribe(b=>{const {SM:c,MD:d}=v;[c,d].includes(b)?this._pillsWrapper.addEventListener(B.CLICK,a):this._pillsWrapper.removeEventListener(B.CLICK,a)})}get facetPills(){return this.facetItems.map((a,b)=>p` | |
<li class="facet-list-item"> | |
<button class="facet-pill ${0===b?A.ACTIVE:""}"> | |
<gads-icon class-names="facet-icon" icon-id="${a.icon}"></gads-icon> | |
${a.name} | |
<span class="screen-reader-only">- ${this.ariaButtonSelected}</span> | |
<svg class="facet-pill-border" height="52" width="100%" role="presentation" aria-hidden="true"> | |
<rect height="52" width="100%" ry="26"/> | |
</svg> | |
</button> | |
</li> | |
`).join("")}get textColumns(){return this.facetItems.map((a,b)=>p` | |
<div class="text-column ${0===b?A.ACTIVE:""}"> | |
<h3 class="glue-headline glue-headline--headline-3"> | |
${a.subheadline} | |
</h3> | |
<p class="text-column-copy">${a.copy}</p> | |
<div class="cta-container"> | |
${this.textColumnCtaBlock(a.cta)} | |
</div> | |
</div> | |
`).join("")}textColumnCtaBlock(a){return(a="string"===typeof a?JSON.parse(k(a)):a)?a.map(b=>p`<gads-button ${this.unpackCta(b)}></gads-button>`):""}get imageSlots(){return this.facetItems.map((a,b)=>{a=this.formatMultiImage(a.images,!0);return p` | |
<div class="image-slot ${0===b?A.ACTIVE:""}"> | |
<gads-image | |
images="${a}" | |
widths="lg:390,md:770,sm:533" | |
loading-eager> | |
</gads-image> | |
</div> | |
`}).join("")}get headlineTxt(){return this.getAttribute(w.HEADLINE)||this.headline}get facetItems(){const a=this.getAttribute("facets")||this.facets;return"string"===typeof a?JSON.parse(k(a)):a}get ariaButtonSelected(){return this.getAttribute("aria-button-selected")||this.aria_button_selected}get a11yCheckCopy(){return this.getAttribute("accessibility-check-copy")||this.a11y_check_copy}get a11yCheckId(){return this.getAttribute("accessibility-check-id")||this.a11y_check_id||"adsFormatA11yCheck"}render(){return m` | |
<section class="glue-page glue-spacer-5-top glue-spacer-5-bottom"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-0 glue-grid__col--span-1-md"></div> | |
<div class="headline-wrapper glue-text-center | |
glue-grid__col glue-grid__col--span-4-sm glue-grid__col--span-10-md"> | |
<h2 class="glue-headline glue-headline--headline-2"> | |
${this.headlineTxt} | |
</h2> | |
<div class="screen-reader-hidden-interaction glue-spacer-3-bottom"> | |
<input type="checkbox" class="adsFormatA11yCheck" id="${this.a11yCheckId}" aria-labelledby="${this.a11yCheckId}-label"> | |
<label id="${this.a11yCheckId}-label" for="${this.a11yCheckId}" aria-hidden="true">${this.a11yCheckCopy}</label> | |
</div> | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-0 glue-grid__col--span-1-xl"></div> | |
<div class="glue-grid__col glue-grid__col--span-0 glue-grid__col--span-1-xl"></div> | |
<div class="facet-pills-wrapper | |
glue-grid__col glue-grid__col--span-4-sm glue-grid__col--span-12-md | |
glue-grid__col--span-3-lg"> | |
<ul class="facet-pills-container"> | |
${this.facetPills} | |
</ul> | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-0 glue-grid__col--span-1-md glue-grid__col--span-0-lg"></div> | |
<div class="image-slot-wrapper glue-text-center | |
glue-grid__col glue-grid__col--span-4-sm glue-grid__col--span-10-md | |
glue-grid__col--span-5-lg glue-grid__col--span-4-xl"> | |
${this.imageSlots} | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-0 glue-grid__col--span-1-md glue-grid__col--span-0-lg"></div> | |
<div class="glue-grid__col glue-grid__col--span-0 glue-grid__col--span-1-md glue-grid__col--span-0-lg"></div> | |
<div class="text-column-wrapper glue-text-center | |
glue-grid__col glue-grid__col--span-4-sm glue-grid__col--span-10-md | |
glue-grid__col--span-4-lg glue-grid__col--span-3-xl"> | |
${this.textColumns} | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-ads-format",ac);var bc=class extends M{constructor(){super(...arguments);this.reduced_motion_alt_headline=this.animation_play_tooltip=this.animation_pause_tooltip=this.animated_items="";this.static_version=this.reversed=!1;this.subheadline=this.static_text="";this.currentAnimatedItem_=0;this.headlineAnimation=null;this.headlines=[];this.imageAnimation=null;this.images=[];this.stateMap=new Map;this.animationButtons={};this.subHeadlineCont=this.querySelector(".subheadline-content");this.reducedMotionAlt=this.querySelector(".reduced-motion-alt"); | |
this.heroSection=this.querySelector(".gads-animated-hero")}connectedCallback(){var a,b,c,d,e,f;this.firstElementChild||(this.replaceChildren(this.render()),this.subHeadlineCont=this.querySelector(".subheadline-content"),this.reducedMotionAlt=this.querySelector(".reduced-motion-alt"),this.heroSection=this.querySelector(".gads-animated-hero"));if((null===(b=null===(a=this.firstElementChild)||void 0===a?void 0:a.classList)||void 0===b?0:b.contains("reverse-order"))||(null===(d=null===(c=this.firstElementChild)|| | |
void 0===c?void 0:c.classList)||void 0===d?0:d.contains("reverse-order-static")))this.isReverseContent=!0;if(null===(f=null===(e=this.firstElementChild)||void 0===e?void 0:e.classList)||void 0===f?0:f.contains("static-version"))this.isStaticVersion=!0;this.headlines=[...this.querySelectorAll(".cycling-headline")];this.images=[...this.querySelectorAll(".cycling-image")];this.animationButtons={play:this.querySelector(".play"),pause:this.querySelector(".pause")};const h=this.querySelector(".aria-headline"); | |
a=()=>{const n=parseInt(window.getComputedStyle(this.heroSection).paddingTop),t=this.subHeadlineCont.offsetHeight,u=parseInt(window.getComputedStyle(this.reducedMotionAlt).marginTop);let q=this.reducedMotionAlt.offsetHeight+u;const y=1.5*n+q+t;this.images[1].style.top=`${y}px`;this.images[3].style.top=`${y}px`;(new ResizeObserver(x=>{x=x[0];q=x.contentBoxSize?(Array.isArray(x.contentBoxSize)?x.contentBoxSize[0]:x.contentBoxSize).blockSize+u:x.contentRect.height+u;x=1.5*n+q+t;this.images[1].style.top= | |
`${x}px`;this.images[3].style.top=`${x}px`})).observe(this.reducedMotionAlt)};const l=ja(a.bind(this),H.FIFTY);this.prefersReducedMotion()&&(h.style.display=oa.NONE,this.isReverseContent&&this.firstElementChild&&this.firstElementChild.classList.remove("reverse-order"),a(),window.addEventListener(B.RESIZE,()=>l()));Ia.subscribe(n=>{n?(this.clearAnimations(),h.style.display=oa.NONE,this.isReverseContent&&this.firstElementChild&&this.firstElementChild.classList.remove("reverse-order"),l()):(this.setUpAnimation(), | |
h.style.display=oa.BLOCK,this.isReverseContent&&this.firstElementChild&&this.firstElementChild.classList.add("reverse-order"))});this.stateMap=new Map(this.headlines.map((n,t)=>[t,t+1>=this.headlines.length?0:t+1]));this.setUpAnimation();window.addEventListener(B.LOAD,()=>{this.isDev&&this.isStaticVersion&&this.validateStaticHeadlineCopy()});window.addEventListener(B.DOM_CONTENT_LOADED,()=>this.alignTextOnResize())}get gtmModuleName(){return this.nodeName}animateElements(a,b){var c=[...a.classList].find(h=> | |
h.includes("color-"));b.parentElement&&b.parentElement.setAttribute("color",`bg-${c}`);c=P.getBpName(window.innerWidth);var d=[{transform:"translateY(0px)",opacity:"1",offset:.15},{transform:"translateY(0px)",opacity:"1",offset:.75},{transform:"translateY(30px)",opacity:"0",offset:.9}];const e=[{transform:"translateY(-30px)",opacity:"0",easing:"ease-out"},...d];d=[{transform:"translateY(-60px)",opacity:"0",easing:"ease-out"},...d];d={sm:e,md:e,lg:this.isStaticVersion?e:d,xl:this.isStaticVersion?e: | |
d};const f=[{opacity:"0",easing:"ease-out"},{opacity:"1",offset:.3},{opacity:"1",offset:.8},{opacity:"0",offset:1}];this.headlineAnimation=this.isStaticVersion?a.animate(f,3750):a.animate(d[c],3E3);this.imageAnimation=b.animate(e,3E3);this.isStaticVersion?Promise.resolve(this.imageAnimation.finished).then(()=>{this.currentAnimatedItem=this.stateMap.get(this.currentAnimatedItem)||0;this.animateElements(this.headlines[this.currentAnimatedItem],this.images[this.currentAnimatedItem])}).catch(()=>{b.parentElement&& | |
b.parentElement.removeAttribute("color")}):Promise.all([this.headlineAnimation.finished,this.imageAnimation.finished]).then(()=>{this.currentAnimatedItem=this.stateMap.get(this.currentAnimatedItem)||0;this.animateElements(this.headlines[this.currentAnimatedItem],this.images[this.currentAnimatedItem])}).catch(()=>{b.parentElement&&b.parentElement.removeAttribute("color")})}clearAnimations(){this.headlineAnimation&&this.headlineAnimation.cancel();this.imageAnimation&&this.imageAnimation.cancel()}playButtonHandler(){this.headlineAnimation&& | |
this.imageAnimation&&(this.headlineAnimation.play(),this.imageAnimation.play());const a=this.images[this.currentAnimatedItem_].firstElementChild;"GADS-PRESENTATIONAL-VIDEO"===(null===a||void 0===a?void 0:a.tagName)&&a.setAttribute(Mb.PAUSE,"false");this.animationButtons.play&&this.animationButtons.pause&&(this.animationButtons.play.classList.add(A.HIDDEN),this.animationButtons.pause.classList.remove(A.HIDDEN))}pauseButtonHandler(){this.headlineAnimation&&this.imageAnimation&&(this.headlineAnimation.pause(), | |
this.imageAnimation.pause());const a=this.images[this.currentAnimatedItem_].firstElementChild;"GADS-PRESENTATIONAL-VIDEO"===(null===a||void 0===a?void 0:a.nodeName)&&a.setAttribute(Mb.PAUSE,"true");this.animationButtons.play&&this.animationButtons.pause&&(this.animationButtons.play.classList.remove(A.HIDDEN),this.animationButtons.pause.classList.add(A.HIDDEN))}setUpAnimation(){const {isReducedMotion:a}=Ia;r.ANIMATE in HTMLElement.prototype&&!a?(this.animateElements(this.headlines[0],this.images[0]), | |
this.animationButtons.play&&this.animationButtons.pause&&(this.animationButtons.pause.classList.remove(A.HIDDEN),this.animationButtons.play.addEventListener(B.CLICK,()=>this.playButtonHandler()),this.animationButtons.play.addEventListener(B.KEYPRESS,({code:b})=>{if(b===F.SPACE||b===F.ENTER)this.playButtonHandler(),this.animationButtons.pause&&this.animationButtons.pause.focus()}),this.animationButtons.pause.addEventListener(B.CLICK,()=>this.pauseButtonHandler()),this.animationButtons.pause.addEventListener(B.KEYPRESS, | |
({code:b})=>{if(b===F.SPACE||b===F.ENTER)this.pauseButtonHandler(),this.animationButtons.play&&this.animationButtons.play.focus()}))):(this.headlines[0].classList.add(A.REDUCED_MOTION),this.animationButtons.play&&this.animationButtons.pause&&(this.animationButtons.pause.classList.add(A.HIDDEN),this.animationButtons.play.removeEventListener(B.CLICK,this.playButtonHandler),this.animationButtons.play.removeEventListener(B.KEYUP,this.playButtonHandler),this.animationButtons.pause.removeEventListener(B.CLICK, | |
this.pauseButtonHandler),this.animationButtons.pause.removeEventListener(B.KEYUP,this.pauseButtonHandler)))}alignTextOnResize(){const a=this.querySelector(".animated-hero-items"),b=null===a||void 0===a?void 0:a.querySelector(".cycling-headlines-wrapper"),c=null===a||void 0===a?void 0:a.querySelector(".spacer");if(a&&b&&c){var d=e=>{a.classList.toggle("animated-hero-items--centered",e<b.offsetWidth+c.offsetWidth)};P.getBpName()===v.LG&&d(a.offsetWidth);"ResizeObserver"in window&&P.subscribe(e=>{e= | |
[v.SM,v.MD].includes(e);const f=new ResizeObserver(Gb(()=>{d(a.offsetWidth)},H.FIFTY));e?f.disconnect():f.observe(a)})}}get altHeadline(){return this.getAttribute("reduced-motion-alt-headline")||this.reduced_motion_alt_headline}get animatedItems(){const a=this.getAttribute("animated-items")||this.animated_items;return"string"===typeof a?JSON.parse(k(a)):a}get ariaHeadline(){let a="";if(this.isStaticVersion)a=this.animatedItems[0].animated_hero_text;else for(const b of this.animatedItems)a+=`${b.animated_hero_text}, `; | |
return a=this.isReverseContent?`${this.staticText} ${a}`:a+this.staticText}get currentAnimatedItem(){return this.currentAnimatedItem_}set currentAnimatedItem(a){this.currentAnimatedItem_=a}get imageContent(){return this.animatedItems.map((a,b)=>{var c,d;if(a.animated_hero_video&&Object.hasOwnProperty.call(a.animated_hero_video,"theme")){const f=a.animated_hero_video;return p` | |
<div class="cycling-image cycling-image-${b} color-${a.color}"> | |
<gads-presentational-video | |
ad-title="${f.ad_title}" | |
ad-url="${f.ad_url}" | |
aria-label="${f.aria_description}" | |
autoplay | |
icon="${f.icon.url}" | |
loop | |
overlay-type="${f.overlay_type}" | |
theme="${f.theme}" | |
video-mp4="${(null===(c=f.video_mp4)||void 0===c?void 0:c.url)||""}" | |
video-webm="${(null===(d=f.video_webm)||void 0===d?void 0:d.url)||""}" | |
width="240px" | |
></gads-presentational-video> | |
</div> | |
`}c=a.animated_hero_image;d=this.formatMultiImage(c,!0);const e=c.every(f=>(f=f.use_html_image&&f.html_image&&0!==Object.keys(f.html_image).length?f.html_image.image:f.image)?f.height>f.width:!1);return p` | |
<div class="cycling-image cycling-image-${b} color-${a.color}"> | |
<gads-image | |
images="${d}" | |
widths="${(()=>this.isStaticVersion?e?"xl:230,lg:180,md:170,sm:215":"xl:290,lg:220,md:210,sm:270":this.isReverseContent?e?"lg:175,sm:158":"lg:230,sm:240":e?"lg:230,sm:190":"lg:290,sm:270")()}" | |
round-corners | |
lazy | |
></gads-image> | |
</div> | |
`}).join("")}get isReverseContent(){return this.hasAttribute("reversed")||this.reversed}set isReverseContent(a){this.reversed=a}get isStaticVersion(){return this.hasAttribute("static-version")||this.static_version}set isStaticVersion(a){this.static_version=a}get staticText(){return this.getAttribute("static-text")||this.static_text}get subHeadline(){return this.getAttribute(w.SUBHEADLINE)||this.subheadline}get tooltipPause(){return this.getAttribute("tooltip-pause")||this.animation_pause_tooltip}get tooltipPlay(){return this.getAttribute("tooltip-play")|| | |
this.animation_play_tooltip}animationClass(){const a=this.isReverseContent,b=this.isStaticVersion;let c="";!b&&a?c="reverse-order":b&&!a?c="static-version":b&&a&&(c="static-version reverse-order-static");return c}validateStaticHeadlineCopy(){const a=this.querySelector(".static-version-headlines");var b=a.querySelector(qa.GLUE_HEADLINE);b=3*(parseInt(window.getComputedStyle(b).getPropertyValue("line-height"))+2);const c=a.clientHeight,d=p` | |
<div class="error-message">Headline copy does not fit in 3 lines</div> | |
`;c>b&&(a.innerHTML=d)}isStaticLongCopy(){return 40<=(this.animatedItems[0].animated_hero_text+this.staticText).replace(/(<|<)br\s*\/*(>|>)/g,"").length}cyclingHeadlinesRender(){return p` | |
<div class="cycling-headlines-wrapper glue-text-center" aria-hidden="true"> | |
${this.animatedItems.map(a=>p` | |
<h2 class="glue-headline cycling-headline hero-headline color-${a.color}"> | |
<span class="glue-font-weight-bold">${a.animated_hero_text}</span> | |
</h2> | |
`).join("")} | |
</div> | |
<div class="static-text"> | |
<div class="static-headline-wrapper"> | |
<p class="glue-headline glue-text-center"> | |
<span class="hero-headline glue-font-weight-bold">${this.staticText}</span> | |
${this.animationControlsRender()} | |
</p> | |
</div> | |
</div> | |
`}staticHeadlinesRender(){const a=this.isStaticLongCopy()?"long-version":"",b=this.isReverseContent,c=e=>` | |
<span class="glue-headline cycling-headline color-${e.color}"> | |
${this.animatedItems[0].animated_hero_text} | |
</span> | |
`,d=` | |
<span class="glue-headline static-headline"> | |
${this.staticText} | |
</span> | |
`;return p` | |
<div class="static-version-headlines ${a}" aria-hidden="true"> | |
${this.animatedItems.map(e=>p` | |
<div class="headline-wrapper"> | |
${b?d+c(e):c(e)+d} | |
</div> | |
`).join("")} | |
</div> | |
`}headlinesRender(){return this.animatedItems.map(a=>p` | |
<div class="glue-headline cycling-headline hero-headline color-${a.color}"> | |
<span class="glue-font-weight-bold">${a.animated_hero_text}</span> | |
</div> | |
`).join("")}animationControlsRender(){return p` | |
<div class="animation-control-btn-wrapper"> | |
<button class="play hidden" aria-label="${this.tooltipPlay}"> | |
<svg role="presentation" width="28" height="28" viewBox="0 0 28 28"> | |
<path fill="#5f6368" d="M.666 14C.666 6.64 6.639.667 13.999.667S27.333 6.64 27.333 14s-5.974 13.333-13.334 13.333C6.64 27.333.666 21.36.666 14Zm18.667 0-8-6v12l8-6Z" /> | |
</svg> | |
</button> | |
<div class="tooltip"><p class="tooltip-content">${this.tooltipPlay}</p></div> | |
<button class="pause" aria-label="${this.tooltipPause}"> | |
<svg role="presentation" width="28" height="28" viewBox="0 0 28 28"> | |
<path fill="#5f6368" fill-rule="evenodd" clip-rule="evenodd" d="M14 .667C6.64.667.665 6.64.665 14s5.973 13.333 13.333 13.333S27.333 21.36 27.333 14 21.359.667 13.999.667Zm-1.334 18.666H9.999V8.667h2.667v10.666Zm2.667 0h2.666V8.667h-2.666v10.666Z" /> | |
</svg> | |
</button> | |
<div class="tooltip"><p class="tooltip-content">${this.tooltipPause}</p></div> | |
</div> | |
`}render(){var a;const b=this.isStaticVersion,c=b?"glue-page":"";return m` | |
<section class="gads-animated-hero glue-spacer-6-bottom glue-spacer-6-top | |
${this.animationClass()}"> | |
<h1 class="glue-visually-hidden aria-headline">${this.ariaHeadline}</h1> | |
<div class="animated-hero-items ${c}"> | |
${b?this.staticHeadlinesRender():this.cyclingHeadlinesRender()} | |
<div class="spacer"> | |
<div class="cycling-images-wrapper"> | |
${this.imageContent} | |
</div> | |
${b?this.animationControlsRender():""} | |
</div> | |
</div> | |
<div class="reduced-motion-alt" role="heading" aria-level="1" | |
aria-label="${null===(a=this.altHeadline)||void 0===a?void 0:a.replace(/<[^>]*>?/gm,"").replace(" "," ")}"> | |
<div class="glue-page"> | |
<h2 class="glue-headline reduced-motion-alt--headline"> | |
<span class="glue-font-weight-bold">${this.altHeadline}</span> | |
</h2> | |
</div> | |
</div> | |
<div class="glue-page subheadline-content"> | |
<div class="subheadline glue-text-center glue-spacer-4-bottom"> | |
<p class="glue-body--large">${this.subHeadline}</p> | |
</div> | |
<div class="ctas glue-text-center hero-cta"> | |
${this.ctaBlock} | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-animated-hero",bc);var V={PREHEADLINE:".animated-hero2-up__animated-preheadline",HEADLINE:".animated-hero2-up__animated-headline",ANIMATED_IMAGE_DESKTOP:".animated-hero2-up__image--desktop",ANIMATED_IMAGE_MOBILE:".animated-hero2-up__image--mobile",SECTION_ELEMENT:".animated-hero-2up",MAIN_ELEMENT:"gads-animated-hero2-up",PAUSE:".pause",PLAY:".play"},cc={ANIMATION_ARIA_LABEL:"animation-aria-labels",COPY:"copy",DATA_MAIN_THEME:"data-main-theme",DATA_THEME:"data-theme",ITEMS:"items"},dc={PREHEADLINE:"preheadline",HEADLINE:"headline", | |
IMAGE_DESKTOP:"imageDesktop",IMAGE_MOBILE:"imageMobile"},ec=class extends M{constructor(){super(...arguments);this.animation_aria_labels={};this.dataTheme=this.copy=null;this.images=[];this.isPlaying=!0;this.items=[];this.mainElement=this.querySelector(V.MAIN_ELEMENT);this.pause=this.querySelector(V.PAUSE);this.play=this.querySelector(V.PLAY);this.sectionElement=this.querySelector(V.SECTION_ELEMENT);this.animatedPreheadlines=this.querySelectorAll(V.PREHEADLINE);this.animatedHeadlines=this.querySelectorAll(V.HEADLINE); | |
this.animatedImagesDesktop=this.querySelectorAll(V.ANIMATED_IMAGE_DESKTOP);this.animatedImagesMobile=this.querySelectorAll(V.ANIMATED_IMAGE_MOBILE);this.animatedItem={preheadline:null,headline:null,imageDesktop:null,imageMobile:null};this.animationPreheadline=[{opacity:"1"},{opacity:"1"}];this.animationHeadline=[{opacity:"0",transform:"translateY(-30px)"},{opacity:"1",transform:"translateY(0)",offset:.15},{opacity:"1",transform:"translateY(0)",offset:.8},{opacity:"0",transform:"translateY(50px)"}]; | |
this.animationImage=[{opacity:"0",transform:"translateY(-95px)"},{opacity:"1",transform:"translateY(0)",offset:.15},{opacity:"1",transform:"translateY(0)",offset:.8},{opacity:"0",transform:"translateY(50px)"}];this.animationTiming={duration:3E3}}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()),this.animatedPreheadlines=this.querySelectorAll(V.PREHEADLINE),this.animatedHeadlines=this.querySelectorAll(V.HEADLINE),this.animatedImagesDesktop=this.querySelectorAll(V.ANIMATED_IMAGE_DESKTOP), | |
this.animatedImagesMobile=this.querySelectorAll(V.ANIMATED_IMAGE_MOBILE),this.sectionElement=this.querySelector(V.SECTION_ELEMENT),this.pause=this.querySelector(V.PAUSE),this.play=this.querySelector(V.PLAY));window.addEventListener(B.DOM_CONTENT_LOADED,()=>{this.addAnimations()});this.actionsHandler()}get copyText(){return this.getAttribute(cc.COPY)||this.copy}get gtmModuleName(){return this.nodeName}get itemsElement(){const a=this.getAttribute(cc.ITEMS)||this.items;return"string"===typeof a?JSON.parse(a): | |
a}get animationAriaLabels(){const a=this.getAttribute(cc.ANIMATION_ARIA_LABEL)||this.animation_aria_labels;return"string"===typeof a?JSON.parse(a):a}get animatedItemsImages(){const a=this.getAttribute(cc.ITEMS)||this.items;return"string"===typeof a?JSON.parse(a):a}addAnimations(){0<this.animatedPreheadlines.length&&this.addAnimationToElement(this.animatedPreheadlines,this.animationPreheadline,0,dc.PREHEADLINE);0<this.animatedHeadlines.length&&this.addAnimationToElement(this.animatedHeadlines,this.animationHeadline, | |
0,dc.HEADLINE);0<this.animatedImagesDesktop.length&&this.addAnimationToElement(this.animatedImagesDesktop,this.animationImage,0,dc.IMAGE_DESKTOP);0<this.animatedImagesMobile.length&&this.addAnimationToElement(this.animatedImagesMobile,this.animationImage,0,dc.IMAGE_MOBILE)}addAnimationToElement(a,b,c,d){var e,f;this.animatedItem[d]=a[c].animate(b,this.animationTiming);this.dataTheme=a[c].getAttribute(cc.DATA_THEME)||this.dataTheme;null===(e=this.sectionElement)||void 0===e?void 0:e.setAttribute(cc.DATA_MAIN_THEME, | |
this.dataTheme||"");null===(f=this.animatedItem[d])||void 0===f?void 0:f.addEventListener(B.FINISH,()=>{var h;this.animatedItem[d]&&(null===(h=this.animatedItem[d])||void 0===h?void 0:h.cancel(),c===a.length-1?c=0:c++,this.addAnimationToElement(a,b,c,d))})}playButtonHandler(){var a,b,c,d,e,f,h;this.isPlaying=!0;null===(a=this.animatedItem.preheadline)||void 0===a?void 0:a.play();null===(b=this.animatedItem.headline)||void 0===b?void 0:b.play();null===(c=this.animatedItem.imageMobile)||void 0===c? | |
void 0:c.play();null===(d=this.animatedItem.imageDesktop)||void 0===d?void 0:d.play();null===(e=this.play)||void 0===e?void 0:e.classList.add(A.HIDDEN);null===(f=this.pause)||void 0===f?void 0:f.classList.remove(A.HIDDEN);null===(h=this.pause)||void 0===h?void 0:h.focus()}pauseButtonHandler(){var a,b,c,d,e,f,h;this.isPlaying=!1;null===(a=this.animatedItem.preheadline)||void 0===a?void 0:a.pause();null===(b=this.animatedItem.headline)||void 0===b?void 0:b.pause();null===(c=this.animatedItem.imageMobile)|| | |
void 0===c?void 0:c.pause();null===(d=this.animatedItem.imageDesktop)||void 0===d?void 0:d.pause();null===(e=this.pause)||void 0===e?void 0:e.classList.add(A.HIDDEN);null===(f=this.play)||void 0===f?void 0:f.classList.remove(A.HIDDEN);null===(h=this.play)||void 0===h?void 0:h.focus()}actionsHandler(){var a,b;null===(a=this.pause)||void 0===a?void 0:a.addEventListener(B.CLICK,()=>{this.pauseButtonHandler()});null===(b=this.play)||void 0===b?void 0:b.addEventListener(B.CLICK,()=>{this.playButtonHandler()})}imagesMarkup(a, | |
b){return b.map(c=>{c=this.formatMultiImage(c.images,!0);return p` | |
<div class="animated-hero2-up__image animated-image ${a}"> | |
<gads-image | |
widths="xl:352,lg:320,md:352,sm:250" | |
images="${"string"===typeof c?c:null}" | |
loading-eager | |
></gads-image> | |
</div> | |
`})}animationControlsRender(){var a,b,c,d;return p` | |
<div class="animation-control-btn-wrapper"> | |
<button class="play hidden" aria-label="${null===(a=this.animationAriaLabels)||void 0===a?void 0:a.aria_play_animation}"> | |
<gads-icon icon-id="PLAY_CIRCLE_SMALL" class-names="animated-hero2-up__icon"></gads-icon> | |
</button> | |
<div class="tooltip"><p class="tooltip-content">${null===(b=this.animationAriaLabels)||void 0===b?void 0:b.aria_play_animation}</p></div> | |
<button class="pause" aria-label="${null===(c=this.animationAriaLabels)||void 0===c?void 0:c.aria_pause_animation}"> | |
<gads-icon icon-id="PAUSE_CIRCLE_SMALL" class-names="animated-hero2-up__icon"></gads-icon> | |
</button> | |
<div class="tooltip"><p class="tooltip-content">${null===(d=this.animationAriaLabels)||void 0===d?void 0:d.aria_pause_animation}</p></div> | |
</div> | |
`}render(){return m` | |
<section class="animated-hero-2up" data-main-theme=""> | |
<div class="glue-page"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-1"></div> | |
<div class="glue-grid__col glue-grid__col--span-10"> | |
<div class="animated-hero2-up__content glue-text-center"> | |
<div class="animated-hero2-up__wrapper"> | |
<h1 class="glue-headline glue-headline--headline-1 animated-hero2-up__copy-container"> | |
${this.itemsElement.map(a=>p` | |
<span class="glue-font-weight-bold animated-hero2-up__animated-preheadline"> | |
${a.preheadline} | |
</span> | |
`)} | |
</h1> | |
<h2 class="glue-headline glue-headline--headline-1 glue-has-bottom-margin animated-hero2-up__copy-container"> | |
${this.itemsElement.map(a=>p` | |
<span class="glue-font-weight-bold animated-hero2-up__animated-headline" data-theme="${a.theme}"> | |
${a.headline} | |
</span> | |
`)} | |
</h2> | |
<div class="animated-hero2-up__image-container show-in-mobile"> | |
<div class="cycling-images-wrapper"></div> | |
${this.imagesMarkup("animated-hero2-up__image--mobile",this.animatedItemsImages)} | |
</div> | |
<p class="animated-hero2-up__copy body-copy glue-body--large glue-spacer-3-bottom"> | |
${this.copyText} | |
</p> | |
<div class="animated-hero2-up__cta-container glue-text-center hero-cta"> | |
${this.ctaBlock} | |
</div> | |
</div> | |
<div class="animated-hero2-up__image-container show-in-desktop"> | |
<div class="cycling-images-wrapper"></div> | |
${this.imagesMarkup("animated-hero2-up__image--desktop",this.animatedItemsImages)} | |
</div> | |
${this.animationControlsRender()} | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-animated-hero2-up",ec);var fc=class extends M{constructor(){super(...arguments);this._headerCont=this.querySelector(".budget-header__container");this._cardsElements=this.querySelectorAll(".budget-card");this._headerContHeight=0;this.cards=this.headline_colored=this.headline=this._headerContPadTop=""}get gtmModuleName(){return this.nodeName}get headlineText(){return this.getAttribute(w.HEADLINE)||this.headline}get cardsObj(){const a=this.getAttribute(w.CARDS)||this.cards;return"string"===typeof a?JSON.parse(k(a)):a}stickyHeaderHandler(){var a; | |
this._headerCont&&(this._headerContHeight=null===(a=this._headerCont)||void 0===a?void 0:a.offsetHeight,this._headerCont.style.top=` | |
calc(50vh - ${this._headerContHeight/2}px - ${this._headerContPadTop}) | |
`)}cardsFocus(){const a=new IntersectionObserver(b=>{b.forEach(c=>{c.isIntersecting?c.target.classList.remove("budget-card--inactive"):c.target.classList.add("budget-card--inactive")})},{threshold:.99});this._cardsElements&&this._cardsElements.forEach(b=>a.observe(b))}connectedCallback(){this.firstElementChild||this.replaceChildren(this.render());this._headerCont=this.querySelector(".budget-header__container");this._headerContPadTop=window.getComputedStyle(this._headerCont).paddingTop;this._cardsElements= | |
this.querySelectorAll(".budget-card");this.stickyHeaderHandler();r.INTERSECTION_OBS in window&&this.cardsFocus();const a=ja(this.stickyHeaderHandler.bind(this),50),b=ja(this.cardsFocus.bind(this),50);window.addEventListener(B.RESIZE,()=>{a();r.INTERSECTION_OBS in window&&b()})}render(){return m` | |
<section class="budget glue-page glue-spacer-5-top glue-spacer-5-bottom"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-1"></div> | |
<div class="budget-header__container glue-grid__col glue-grid__col--span-12 glue-grid__col--span-4-lg glue-grid__col--span-4-xl glue-grid__col--align-top"> | |
<div class="budget-header__headline-container"> | |
<h2 class="budget-header__headline glue-headline glue-headline--headline-2"> | |
<span class="glue-font-weight-medium">${this.headlineText}</span> | |
</h2> | |
</div> | |
<div class="budget-header__cta-container"> | |
${this.ctaBlock} | |
</div> | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-1"></div> | |
<div class="glue-grid__col glue-grid__col--span-12 glue-grid__col--span-5-lg glue-grid__col--span-5-xl"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-1"></div> | |
<div class="budget-cards__container glue-grid__col glue-grid__col--span-10 glue-grid__col--span-5-lg glue-grid__col--span-5-xl"> | |
<ul class="glue-cards"> | |
${this.cardsObj.map(a=>{var b;return p` | |
<li> | |
<gads-card | |
body="${a.body}" | |
card-type="budgetCard" | |
headline="${a.title}" | |
image="${null===(b=a.image.image)||void 0===b?void 0:b.url}" | |
${a.image.has_transparency?`${w.HAS_TRANSPARENCY}='true'`:""} | |
></gads-card> | |
</li> | |
`})} | |
</ul> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-budget",fc);var gc=class extends M{constructor(){super(...arguments);this.headline=this.copy=this.background_color="";this.stats=[];this.statStrips=this.querySelectorAll(".stat-strip");this._isReducedMotion=Ia.isReducedMotion}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()),this.statStrips=this.querySelectorAll(".stat-strip"));this.statStrips.forEach(a=>{this._isReducedMotion?a.classList.add("stat-strip--animation-finished"):r.INTERSECTION_OBS in window&&r.ANIMATE in HTMLElement.prototype? | |
(new IntersectionObserver(this.componentInViewport.bind(this),{root:null})).observe(a):this.animateStats(a)})}get gtmModuleName(){return this.nodeName}get bgColor(){return this.getAttribute(w.BACKGROUND_COLOR)||this.background_color}get headlineText(){return this.headline||this.getAttribute(w.HEADLINE)||""}get copyText(){return this.copy||this.getAttribute(w.COPY)||""}get statItems(){const a=this.getAttribute("stats");return"string"===typeof a?JSON.parse(k(a)):this.stats}componentInViewport(a,b){for(const c of a)a= | |
c.target,c.isIntersecting&&a instanceof HTMLElement&&(this.animateStats(a),b.disconnect())}animateStats(a){const b=[...a.children],c=a.animate([{transform:"translateY(0)"},{transform:`translateY(calc(-100% + ${b[0].offsetHeight}px))`}],{duration:3E3,fill:"forwards",easing:`steps(${b.length-1}, end)`}),d=setInterval(()=>{c.updatePlaybackRate(1.5*c.playbackRate)},300);c.onfinish=()=>{clearInterval(d);c.cancel();a.classList.add("stat-strip--animation-finished")}}renderStats(a){const b=a?"stat--with-icons": | |
"";return this.statItems.map(c=>{var d,e,f,h;const l=(null===(d=c.icon)||void 0===d?0:d.icon_id)||(null===(h=null===(f=null===(e=c.icon)||void 0===e?void 0:e.icon_image)||void 0===f?void 0:f.image)||void 0===h?0:h.url)?this.renderIcon(c.icon):"<div></div>";d=c.subheadline?` | |
<p class="glue-spacer-2-top">${c.subheadline}</p> | |
`:"";return p` | |
<div class="stat ${b}"> | |
${l} | |
<div class="stat-animation"> | |
<div class="glue-visually-hidden">${c.stat_number}${c.stat_unit}</div> | |
<div class="stat-strip" aria-hidden="true"> | |
${this.renderStatSteps(c)} | |
</div> | |
</div> | |
${d} | |
</div> | |
`}).join("")}renderStatSteps(a){const b=a.stat_number;let c=20;c>b&&(c=b);const d=b/c,e=[0];for(let f=1;f<c;f++)e.push(Math.trunc(d*f));e.push(b);return e.map(f=>p` | |
<div class="stat-step"> | |
<span>${f}</span> | |
<span>${a.stat_unit}</span> | |
</div> | |
`).join("")}renderIcon(a){var b,c,d,e;const f=a.icon_color,h=null===(c=null===(b=a.icon_image)||void 0===b?void 0:b.image)||void 0===c?void 0:c.url;b=p` | |
<div> | |
<gads-image | |
widths="sm:36" | |
image="${h}" | |
alt-text="${null===(d=a.icon_image)||void 0===d?void 0:d.aria_description}" | |
${(null===(e=a.icon_image)||void 0===e?0:e.has_transparency)?w.HAS_TRANSPARENCY:""} | |
lazy | |
></gads-image> | |
</div> | |
`;a=p` | |
<div class="stat-icon stat-icon--${f} glue-spacer-2-bottom"> | |
<gads-icon class-names="glue-icon--24px" icon-id="${a.icon_id}"></gads-icon> | |
</div> | |
`;return h?b:a}render(){const a=this.headlineText?` | |
<h2 class="headline glue-headline glue-headline--headline-3 glue-text-center"> | |
<span class="glue-font-weight-medium">${this.headlineText}</span> | |
</h2> | |
`:"",b=this.copyText?` | |
<p class="body-copy glue-spacer-3-bottom">${this.copyText}</p> | |
`:"",c=this.ctaBlock?` | |
<div class="cta-container">${this.ctaBlock}</div> | |
`:"";var d=this.statItems.length;const e=this.statItems.some(h=>{var l,n,t,u;return(null===(l=null===h||void 0===h?void 0:h.icon)||void 0===l?void 0:l.icon_id)||(null===(u=null===(t=null===(n=null===h||void 0===h?void 0:h.icon)||void 0===n?void 0:n.icon_image)||void 0===t?void 0:t.image)||void 0===u?void 0:u.url)}),f=(4<d?"Author up to 4 stats maximum":null)||(0==d?"Author at least 1 stat to use this module":null);d=f?` | |
<div class="error-message">${f}</div> | |
`:` | |
<div class="stats-container stats-container--${d}-column"> | |
${this.renderStats(e)} | |
</div> | |
`;return m` | |
<section class="glue-spacer-6-bottom glue-spacer-6-top"> | |
<div class="glue-page callout-container ${this.bgColor&&"white"!==this.bgColor?`callout-container--bg callout-container--bg-${this.bgColor}`:""}"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-2"></div> | |
<div class="callout-header glue-grid__col glue-grid__col--span-8 glue-text-center"> | |
${a} | |
${b} | |
${c} | |
</div> | |
</div> | |
${d} | |
</div> | |
</section> | |
`}};customElements.define("gads-callout-animated-stat",gc);var hc="ChooseYourOwnIncentiveClaimOfferBauButterbar ChooseYourOwnIncentiveTreatmentButterbar ChooseYourOwnIncentiveOfferSelectionModule ChooseYourOwnIncentiveLowOfferButton ChooseYourOwnIncentiveMediumOfferButton ChooseYourOwnIncentiveHighOfferButton ChooseYourOwnIncentiveClaimOfferOfferSelectionModuleButton ChooseYourOwnIncentiveClaimOfferButterbar ChooseYourOwnIncentiveSignInCtaButton ChooseYourOwnIncentiveStartNowCtaButton".split(" "),ic=class{async log(a,b,c){const {userIncentiveOfferState:d, | |
selectedIncentive:e}=c;b={action:b,userIncentiveOfferState:d};hc.includes(a)&&(b.offeredIncentiveSubIdSuffix=null===e||void 0===e?void 0:e.subidSuffix);try{return db.recordInPageInteraction(a,b)}catch(f){}}},jc=new ic;var kc,lc=kc||(kc={});lc.IN_PAGE_BANNER='gads-in-page-banner[class*="cyo"]';lc.NAV_SIGNIN_CTA='gads-mega-nav a[data-g-cta-name="signin"], gads-mega-nav-v2 a[data-g-cta-name="signin"]';lc.NAV_SUF_CTA='gads-mega-nav a[data-g-cta-name="startnow"], gads-mega-nav-v2 a[data-g-cta-name="startnow"]';lc.SUF_CTA='a[data-g-cta-name="startnow"]';lc.INCENTIVES_BANNER_MODAL_TRIGGER_CTA='button[data-g-cta-name="sxgyincentivetnc"]';lc.INCENTIVES_BANNER_MODAL_SUF_CTA='a[data-g-cta-name="sxgyincentivestartnow"]'; | |
lc.CHOOSE_NOW_CTA='button[data-g-cta-name="choose-now"]'; | |
var mc={[O.CARD_SELECTOR]:[".incentives-card"],[O.INCENTIVES_BANNER]:[".incentives-banner-copy","#incentives-banner-modal__label","#incentives-banner-modal__content"],[O.IN_PAGE_BANNER_SELECTED]:[".gads-in-page-banner__content-main"],[O.IN_PAGE_BANNER_UNSELECTED]:[".gads-in-page-banner__content-main"],[O.IN_PAGE_BANNER_CLAIMED]:[".gads-in-page-banner__content-main"]},nc={awardAmount:"AWARD_AMOUNT",targetAmount:"TARGET_AMOUNT",awardAmount0:"AWARD_AMOUNT_0",targetAmount0:"TARGET_AMOUNT_0",awardAmount1:"AWARD_AMOUNT_1", | |
targetAmount1:"TARGET_AMOUNT_1",awardAmount2:"AWARD_AMOUNT_2",targetAmount2:"TARGET_AMOUNT_2"},oc=class{constructor(){this.logScrollEvent=!0;this.elements={};this.initAllElements();this.previousState=this.state=this.getInitialState()}getInitialState(){return{availableIncentives:[],experimentArmSubid:"",userIncentiveOfferState:"NO_OFFER",incentiveUiTreatment:"UNKNOWN",selectedIncentive:null,activeUiElements:[],reverted:!1}}async loadExperiment(){const a=await db.loadUserInfo();if(a){this.updateNoCodelessIncentive(a.offerUiTreatment); | |
var b=document.documentElement.getAttribute(w.MTE)||a.experimentArmSubid;b&&this.setMendelExperiment(b);this.updateState({availableIncentives:a.availableIncentives,experimentArmSubid:b,userIncentiveOfferState:a.userIncentiveOfferState,incentiveUiTreatment:a.offerUiTreatment,selectedIncentive:a.offeredIncentive})}}initAllElements(){Object.values(O).forEach(a=>{this.getElement(a)})}removeInactiveElements(){const {activeUiElements:a}=this.state;Object.values(O).forEach(b=>{a.includes(b)||this.removeElement(b)})}getElement(a){this.elements[a]|| | |
(this.elements[a]=document.querySelector(a));return this.elements[a]}removeElement(a){(a=this.getElement(a))&&a.remove()}replacePlaceholderCopy(a,b,c=!1){let d=this.getElement(a);if(!d)throw Error("No element");c&&(d=null===d||void 0===d?void 0:d.cloneNode(!0));d.querySelectorAll(mc[a].join(",")).forEach(e=>{for(const f in b)nc[f]&&(e.innerHTML=e.innerHTML.replace(new RegExp(`{(?:<wbr>)?${nc[f]}(?:<wbr>)?}`,"g"),b[f]))});return d}updateState(a){this.previousState=this.state;a={...this.state,reverted:!1, | |
...a};this.state={...a,...this.getActiveUiElements(a)};this.updateUiElements()}revertToPreviousState(){this.updateState({...this.previousState,reverted:!0})}getActiveUiElements(a){const {CARD_SELECTOR:b,INCENTIVES_BANNER:c,IN_PAGE_BANNER_UNSELECTED:d,IN_PAGE_BANNER_SELECTED:e,IN_PAGE_BANNER_CLAIMED:f}=O;switch(a.userIncentiveOfferState){case "OFFER_REVEALED":return this.isControlArm(a)?{activeUiElements:[c]}:{activeUiElements:[b,a.selectedIncentive?e:d]};case "OFFER_CLAIMED":return{activeUiElements:this.isControlArm(a)? | |
[c]:[f]};default:return{activeUiElements:[]}}}updateNoCodelessIncentive(a){"BAU"!==a&&document.documentElement.setAttribute(w.NO_CODELESS_INCENTIVE,"true")}async updateUiElements(){this.removeInactiveElements();this.handleIncentiveSelection();this.isInitialLoad()&&(this.logClickEvents(kc.NAV_SIGNIN_CTA,"ChooseYourOwnIncentiveSignInCtaButton"),this.logClickEvents(kc.NAV_SUF_CTA,"ChooseYourOwnIncentiveStartNowCtaButton"));this.state.activeUiElements.forEach(a=>{switch(a){case O.CARD_SELECTOR:this.updateCardSelector(a); | |
break;case O.IN_PAGE_BANNER_UNSELECTED:case O.IN_PAGE_BANNER_SELECTED:case O.IN_PAGE_BANNER_CLAIMED:this.updateInPageBanner(a);break;case O.INCENTIVES_BANNER:this.updateIncentivesBanner(a)}});(this.isInitialLoad()||this.isSelectedIncentiveChange())&&this.updateCtasSubid()}async handleIncentiveSelection(){if(this.isSelectedIncentiveChange()&&(document.dispatchEvent(new CustomEvent(B.CYO_SELECTED_INCENTIVE_CHANGED)),!this.isInitialLoad()&&!this.state.reverted))try{await this.updateIncentiveSelectionInClient()}catch(a){this.revertToPreviousState()}}async updateIncentiveSelectionInClient(){var a, | |
b;let c=null===(a=this.state.selectedIncentive)||void 0===a?void 0:a.subidSuffix;a="SELECT";this.state.selectedIncentive||(c=null===(b=this.previousState.selectedIncentive)||void 0===b?void 0:b.subidSuffix,a="DESELECT");if(c)return db.callChooseYourOwnIncentiveOffer(c,a)}updateCardSelector(a){this.isInitialLoad()&&(this.logCardSelectorEvents(),this.updateCardsCopy(a,this.state.availableIncentives),this.unhideElement(this.getElement(a)))}updateInPageBanner(a){if(this.isInitialLoad()||this.isSelectedIncentiveChange()){this.isInitialLoad()&& | |
jc.log("ChooseYourOwnIncentiveTreatmentButterbar","VIEW",this.state);var b=a===O.IN_PAGE_BANNER_UNSELECTED?this.getHigherIncentive():this.state.selectedIncentive;this.updateBannerCopyAndShow(a,b)}}updateIncentivesBanner(a){const {selectedIncentive:b}=this.state,c=this.getElement(a);if(this.isSelectedIncentiveChange()&&b){try{this.replacePlaceholderCopy(a,this.getAmountReplacements(b))}catch(d){}jc.log("ChooseYourOwnIncentiveBauButterbar","VIEW",this.state);this.logClickEvents(kc.INCENTIVES_BANNER_MODAL_TRIGGER_CTA, | |
"ChooseYourOwnIncentiveLearnMoreBauButterbar",c);this.logClickEvents(kc.INCENTIVES_BANNER_MODAL_SUF_CTA,"ChooseYourOwnIncentiveClaimOfferBauButterbar",c);this.unhideElement(c)}}logCardSelectorEvents(){const a=this.getElement(O.CARD_SELECTOR);if(a){var b=new IntersectionObserver(c=>{c.forEach(d=>{d.isIntersecting&&(this.logScrollEvent&&jc.log("ChooseYourOwnIncentiveOfferSelectionModule","SCROLL",this.state),jc.log("ChooseYourOwnIncentiveOfferSelectionModule","VIEW",this.state),b.unobserve(a))})}); | |
b.observe(a);this.logClickEvents(kc.SUF_CTA,"ChooseYourOwnIncentiveClaimOfferOfferSelectionModuleButton",a)}}getAmountReplacements(a,b=""){const {awardAmount:c,targetAmount:d}=a;return{[`awardAmount${b}`]:c?this.getAmount(c):"",[`targetAmount${b}`]:d?this.getAmount(d):""}}getHigherIncentive(){return this.state.availableIncentives[this.state.availableIncentives.length-1]||null}updateBannerCopyAndShow(a,b){var c;if(b){var d=document.querySelector(kc.IN_PAGE_BANNER);try{const e=this.replacePlaceholderCopy(a, | |
this.getAmountReplacements(b),!0);d&&e&&(d.replaceWith(e),null===(c=e.querySelector(kc.CHOOSE_NOW_CTA))||void 0===c?void 0:c.addEventListener(B.CLICK,()=>{jc.log("ChooseYourOwnIncentiveChooseNowTreatmentButterbarButton","CLICK",this.state);this.logScrollEvent=!1}),this.logClickEvents(kc.SUF_CTA,"ChooseYourOwnIncentiveClaimOfferButterbar",e),this.unhideElement(e))}catch(e){}}}updateCardsCopy(a,b){const c={};for(let d=0;d<b.length;d++){const e=this.getAmountReplacements(b[d],d.toString());Object.assign(c, | |
e)}this.setCardSelectorClass(a,c);try{this.replacePlaceholderCopy(a,c)}catch(d){}}setCardSelectorClass(a,b){var c;a=this.getElement(a);b=b.awardAmount2.length;let d="";8<b?d="gads-choose-incentives-offer--extra-compact":5<b&&(d="gads-choose-incentives-offer--compact");d&&(null===(c=null===a||void 0===a?void 0:a.firstElementChild)||void 0===c?void 0:c.classList.add(d))}unhideElement(a){null===a||void 0===a?void 0:a.classList.remove(A.HIDDEN);null===a||void 0===a?void 0:a.classList.remove(A.MTO_HIDDEN); | |
null===a||void 0===a?void 0:a.removeAttribute(w.ARIA_HIDDEN)}isControlArm({incentiveUiTreatment:a}){return"BAU"===a}isInitialLoad(){return"UNKNOWN"===this.previousState.incentiveUiTreatment}isSelectedIncentiveChange(){return this.previousState.selectedIncentive!==this.state.selectedIncentive}async updateCtasSubid(){const a=this.getSubidSuffix();N.dispatchPropagateSuffixEvent(a,null===this.state.selectedIncentive||""===this.state.selectedIncentive.subidSuffix||"adshp-hv-q4-22"===this.state.selectedIncentive.subidSuffix|| | |
"cyoipilot-0"===this.state.selectedIncentive.subidSuffix)}getSubidSuffix(){const {experimentArmSubid:a,selectedIncentive:b}=this.state;return(b?b.subidSuffix:"")+a}getAmount(a){var b=document.documentElement.getAttribute(w.LOCALE)||"";{const n=fa[b];var c=$a[a.currencyCode]||null;if(n&&c){({thousandsSeparator:b}=n);var {code:d,symbol:e,symbolNative:f}=c,h=a.currencyCode===n.currencyCode,l=c.divisor||1;c=c.divisorSymbol||"";a=h?a.units/l:a.units;h=h?n.format:"{code} {units}";b=b?a.toString().replace(/\B(?=(\d{3})+(?!\d))/g, | |
b):a.toString();b=h.replace("{symbolNative}",f).replace("{symbol}",e).replace("{units}",b).replace("{code}",d).replace("{divisorSymbol}",c)}else b=a.units.toString()}return b}logClickEvents(a,b,c){(c||document).querySelectorAll(a).forEach(d=>{d.addEventListener(B.CLICK,()=>{jc.log(b,"CLICK",this.state)})})}setMendelExperiment(a){a.split("|").every(b=>b.match(/-[a-z]+-00\d+-00\d+/))&&window.dataLayer&&window.dataLayer.push({event:"set_experiment",experiments:a})}},pc=new oc;var qc={ARIA_CHECKED:"aria-checked",ARIA_DISABLED:"aria-disabled",BANNER_COPY:"banner-copy",BANNER_CTA:"banner-cta",DISABLED_BANNER_HEADLINE:"disabled-banner-headline",ENABLED_BANNER_HEADLINE:"enabled-banner-headline",FLIP_CARD_SUBHEADLINE:"flip-card-subheadline",OFFER_BANNER:"offer-banner"},rc={BUTTON:".glue-button",CARD_BODY:".card-body",GLUE_HEADLINE:".glue-headline",INCENTIVES_CARD:".incentives-card",OFFER_BANNER:".offer-banner",RADIO_BUTTON:".card-radio",SPAN:"span"},sc={ACTIVE_OFFER:"active-offer", | |
SELECTED_CARD:"selected-card"},tc=class extends M{constructor(){super(...arguments);this.banner_copy=null;this.banner_cta=[];this.icon=this.headline=this.flip_card_subheadline=this.enabled_banner_headline=this.disabled_banner_headline=null;this.incentives_cards=[];this.subheadline=null;this._isReducedMotion=Ia.isReducedMotion;this.offerBannnerButton=this.offerBanner=null}connectedCallback(){this.firstElementChild||this.replaceChildren(this.render());document.addEventListener(B.CYO_SELECTED_INCENTIVE_CHANGED, | |
()=>{this.handleCardSelection()});window.addEventListener(B.LOAD,async()=>{this.offerBanner=this.querySelector(rc.OFFER_BANNER);this.offerBannnerButton=this.querySelector(rc.BUTTON);await pc.loadExperiment();this.handleCardsEvents()})}handleCardsEvents(){this.querySelectorAll(rc.INCENTIVES_CARD).forEach((a,b)=>{a.addEventListener(B.CLICK,()=>{this.toggleSelectedIncentive(b)});a.addEventListener(B.KEYUP,c=>{c.code!==F.ENTER&&c.code!==F.SPACE||this.toggleSelectedIncentive(b)})})}toggleSelectedIncentive(a){var b; | |
const c=pc.state.availableIncentives[a],d=(null===(b=pc.state.selectedIncentive)||void 0===b?void 0:b.subidSuffix)!==(null===c||void 0===c?void 0:c.subidSuffix)?c:null;pc.updateState({selectedIncentive:d});d&&jc.log(["ChooseYourOwnIncentiveLowOfferButton","ChooseYourOwnIncentiveMediumOfferButton","ChooseYourOwnIncentiveHighOfferButton"][a],"CLICK",pc.state)}handleCardSelection(){var a;const {availableIncentives:b,selectedIncentive:c}=pc.state,d=P.getBpName()===v.SM,e=b.findIndex(({subidSuffix:f})=> | |
f===(null===c||void 0===c?void 0:c.subidSuffix));null===(a=this.querySelectorAll(rc.INCENTIVES_CARD))||void 0===a?void 0:a.forEach((f,h)=>{f.classList.remove(sc.SELECTED_CARD);f.setAttribute(qc.ARIA_CHECKED,"false");e===h&&(f.classList.add(sc.SELECTED_CARD),f.setAttribute(qc.ARIA_CHECKED,"true"))});c&&d&&this.scrollToBanner();this.toggleOfferBanner()}scrollToBanner(){var a;null===(a=this.offerBanner)||void 0===a?void 0:a.scrollIntoView({block:"center",behavior:this._isReducedMotion?G.AUTO:G.SMOOTH})}toggleOfferBanner(){var a, | |
b,c,d;const e=null!==pc.state.selectedIncentive;this.offerBannnerButton&&(this.offerBannnerButton.setAttribute(w.ARIA_HIDDEN,e?"false":"true"),this.offerBannnerButton.setAttribute(w.TABINDEX,e?"0":"-1"));null===(a=this.offerBanner)||void 0===a?void 0:a.classList.toggle(sc.ACTIVE_OFFER,e);null===(b=this.offerBanner)||void 0===b?void 0:b.classList.toggle(w.DISABLED,!e);null===(c=this.offerBanner)||void 0===c?void 0:c.setAttribute(qc.ARIA_DISABLED,e?"false":"true");null===(d=this.offerBanner)||void 0=== | |
d?void 0:d.setAttribute(w.ARIA_HIDDEN,e?"false":"true")}get headlineText(){return this.getAttribute(w.HEADLINE)||this.headline}get subheadlineText(){return this.getAttribute(w.SUBHEADLINE)||this.subheadline}get flipSubheadline(){return this.hasAttribute(qc.FLIP_CARD_SUBHEADLINE)||this.flip_card_subheadline}get iconImage(){const a=this.getAttribute(w.ICON)||this.icon;return a&&0!==Object.keys(a).length?"string"===typeof a?JSON.parse(a):a:null}get cardsObj(){const a=this.getAttribute(w.CARDS)||this.incentives_cards; | |
return"string"===typeof a?JSON.parse(a):a}get enabledBannerHeadline(){return this.getAttribute(qc.ENABLED_BANNER_HEADLINE)||this.enabled_banner_headline}get disabledBannerHeadline(){return this.getAttribute(qc.DISABLED_BANNER_HEADLINE)||this.disabled_banner_headline}get bannerCopyText(){return this.getAttribute(qc.BANNER_COPY)||this.banner_copy}get gtmModuleName(){return this.nodeName}renderBannerCta(){var a=this.getAttribute(qc.BANNER_CTA)||this.banner_cta;return(a="string"===typeof a?JSON.parse(a): | |
a)?p` | |
<gads-button ${this.unpackCta(a)} cta-hidden></gads-button> | |
`:null}renderIconImage(){const a=this.iconImage;return a&&p` | |
<gads-image | |
aria-hidden="true" | |
class="offer-icon" | |
image="${a.image.url||null}" | |
widths="lg:86" | |
${a.has_transparency?"has-transparency":null} | |
></gads-image> | |
`||null}render(){return m` | |
<section | |
class="glue-spacer-5-top glue-spacer-5-bottom blue-theme gads-choose-incentives-offer" | |
tabindex="0"> | |
<div class="glue-fullbleed"> | |
<div class="glue-page"> | |
<div class="glue-grid"> | |
<div | |
class="glue-grid__col glue-grid__col--span-1-md glue-grid__col--span-0-sm"></div> | |
<div | |
class="glue-grid__col glue-grid__col--span-4-sm glue-grid__col--span-10-md"> | |
<div | |
class="mobile-headline-container glue-spacer-5-top glue-spacer-3-bottom"> | |
${this.headlineText?p` | |
<h2 class="glue-headline glue-headline--headline-2"> | |
<span class="glue-font-weight-medium">${this.headlineText}</span> | |
</h2> | |
`:null} | |
${this.subheadlineText?p` | |
<div class="subheadline-text glue-spacer-2-top"> | |
${this.subheadlineText} | |
</div> | |
`:null} | |
</div> | |
<div | |
class="glue-spacer-3-bottom offer-container white-bg-container"> | |
<div class="desktop-headline-container"> | |
${this.renderIconImage()} | |
${this.headlineText?p` | |
<h2 class="glue-headline glue-headline--headline-3 glue-spacer-2-bottom"> | |
<span class="glue-font-weight-medium">${this.headlineText}</span> | |
</h2> | |
`:null} | |
${this.subheadline?p` | |
<div class="subheadline-text"> | |
${this.subheadlineText} | |
</div> | |
`:null} | |
</div> | |
<div class="incentives-cards"> | |
<ul class="glue-cards"> | |
${this.cardsObj.map(a=>p` | |
<li> | |
<gads-card | |
body="${a.body}" | |
card-type="incentivesCard" | |
eyebrow="${a.eyebrow}" | |
headline="${a.headline}" | |
module-name="${this.nodeName}" | |
subheadline="${a.subheadline}" | |
strikethrough="${a.strikethrough_text}" | |
${this.flipSubheadline?'flip-subheadline="true"':""} | |
widths="xl:315,lg:280,md:459,sm:473" | |
></gads-card> | |
</li> | |
`)} | |
</ul> | |
<div class="offer-banner glue-spacer-3-top disabled" | |
aria-hidden="true" aria-disabled="true"> | |
<div class="banner-copy"> | |
${this.disabledBannerHeadline?p` | |
<h4 class="glue-headline glue-headline--headline-6 disabled-headline">${this.disabledBannerHeadline}</h4> | |
`:null} | |
${this.enabledBannerHeadline?p` | |
<h4 class="glue-headline glue-headline--headline-5 enabled-headline"> | |
<span class="glue-font-weight-medium">${this.enabledBannerHeadline}</span> | |
</h4> | |
`:null} | |
${this.bannerCopyText?p` | |
<p class="enabled-headline">${this.bannerCopyText}</p> | |
`:null} | |
</div> | |
${this.renderBannerCta()} | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-choose-incentives-offer",tc);var uc,vc=uc||(uc={});vc.PANEL_BUTTON=".glue-expansion-panel__button";vc.PANEL_HEADLINE=".gads-contact-hub-panel__headline--container > .glue-headline";vc.PANEL=".glue-expansion-panel";vc.PANELS=".glue-expansion-panels";vc.EXPANDABLE_PANEL_CONTENT=".gads-contact-hub-panel__content-inner"; | |
var wc=class extends M{constructor(){var a;super(...arguments);this._panelsEl=this.querySelector(uc.PANELS);this._panelBtns=null===(a=this._panelsEl)||void 0===a?void 0:a.querySelectorAll(uc.PANEL_BUTTON);this._expandablePanelContent=this.querySelector(uc.EXPANDABLE_PANEL_CONTENT);this._isPanelExpandable=!1;this.media_alignment=this.image=this.headline="";this.panels=[]}connectedCallback(){var a;this.firstElementChild||(this.replaceChildren(this.render()),this._panelsEl=this.querySelector(uc.PANELS), | |
this._panelBtns=null===(a=this._panelsEl)||void 0===a?void 0:a.querySelectorAll(uc.PANEL_BUTTON));this._isPanelExpandable=(this._expandablePanelContent=this.querySelector(uc.EXPANDABLE_PANEL_CONTENT))?!0:!1;r.GLUE in window&&this._panelsEl&&this._isPanelExpandable&&(new glue.ExpansionPanels(this._panelsEl),this._panelBtns&&this._panelBtns.forEach(b=>{b.setAttribute(w.ROLE,"group");this.panelBtnCleanup(b);b.addEventListener(B.CLICK,()=>this.panelBtnCleanup(b))}))}get gtmModuleName(){return this.nodeName.toLowerCase()}get headlineText(){return this.getAttribute(w.HEADLINE)|| | |
this.headline}get imageObj(){const a=this.getAttribute(w.IMAGE)||this.image;return"string"===typeof a?JSON.parse(k(a)):this.image}get mediaAlignment(){return this.getAttribute(w.MEDIA_ALIGNMENT)||this.media_alignment}get panelsObj(){const a=this.getAttribute(w.PANELS)||this.panels;return"string"===typeof a?JSON.parse(k(a)):a}isConsolidatedShort(){return this.panelsObj.some(a=>"consolidated_panel_items"in a&&5>=a.consolidated_panel_items.length&&0<a.consolidated_panel_items.length)}isConsolidatedLong(){return this.panelsObj.some(a=> | |
"consolidated_panel_items"in a&&5<a.consolidated_panel_items.length)}panelBtnCleanup(a){a.setAttribute("tabindex","-1");if(a.classList.contains(A.PANEL_BUTTON_NO_POINTER)){a.removeAttribute("title");a.removeAttribute("aria-expanded");const b=a.cloneNode(!1);for(;a.hasChildNodes();)a.firstChild&&b.appendChild(a.firstChild);a.parentNode&&a.parentNode.replaceChild(b,a)}}imageRender(){var a;const b=this.isConsolidatedShort()?"":"glue-grid__col--span-4-xl",c=(null===(a=this.imageObj.html_image)||void 0=== | |
a?0:a.content)&&this.imageObj.use_html_image?this.htmlImage():this.standardImage();return p` | |
<div class="gads-contact-hub__image--container glue-grid__col | |
glue-grid__col--span-5 ${b}"> | |
${c} | |
</div> | |
`}htmlImage(){return p` | |
<gads-image | |
images="${g(JSON.stringify([this.imageObj]))}" | |
widths="xl:${this.xlImageWidth()},lg:339,md:263,sm:263" | |
lazy | |
${this.imageObj.has_transparency?w.HAS_TRANSPARENCY:""}> | |
</gads-image> | |
`}standardImage(){return p` | |
<gads-image | |
alt-text="${this.imageObj.aria_description}" | |
image="${this.imageObj.image.url}" | |
widths="xl:${this.xlImageWidth()},lg:339,md:263,sm:263" | |
lazy | |
${this.imageObj.has_transparency?w.HAS_TRANSPARENCY:""}> | |
</gads-image> | |
`}xlImageWidth(){return this.isConsolidatedShort()?"503":"389"}panelLinkRender(a){return a.chatbot_agent_id&&a.chatbot_context_id?p` | |
<button class="glue-inline-link" | |
data-bm-widget-agent-id='${a.chatbot_agent_id}' | |
data-bm-widget-context='${a.chatbot_context_id}' | |
data-bm-widget-layout="inline" | |
data-g-cta-name='${a.gtm_cta_name?a.gtm_cta_name:"chatbot"}' | |
data-g-module-name="${this.gtmModuleName}"> | |
<span class="bm-widget-button-text" | |
aria-label="${a.panel_link_aria_description||""}"> | |
${a.headline} | |
</span> | |
</button> | |
`:a.chatbot_agent_id||a.chatbot_context_id?p`<span>Missing data for Chatbot: Agent-ID or Context ID</span>`:a.special_triggers?p` | |
<a aria-label="${a.panel_link_aria_description||""}" | |
${a.gtm_cta_name?`data-g-cta-name="${a.gtm_cta_name}"`:""} | |
data-g-module-name="${this.gtmModuleName}" | |
${a.special_triggers?`special-triggers="${a.special_triggers}"`:""}> | |
${a.headline} | |
</a> | |
`:a.panel_link?p` | |
<a href="${this.relativizeKintaroLink(a.panel_link)}" | |
aria-label="${a.panel_link_aria_description||""}" | |
${a.gtm_cta_name?`data-g-cta-name="${a.gtm_cta_name}"`:""} | |
data-g-module-name="${this.gtmModuleName}" | |
${this.setExternalLink(a.panel_link)}> | |
${a.headline} | |
</a> | |
`:a.headline}panelsRender(){return this.panelsObj.map((a,b)=>{b++;return"consolidated_panel_items"in a?this.isConsolidatedShort()?this.panelConsolidatedRender(a,b):"":this.panelStandardRender(a,b)})}panelStandardRender(a,b){var c,d,e,f,h,l,n;this._isPanelExpandable=!1;a.expanded_copy&&(this._isPanelExpandable=0<a.expanded_copy.length);return p` | |
<article class="glue-expansion-panel ${a.chatbot_agent_id?"gads-contact-hub-panel__chatbot":""}"> | |
<div class="glue-expansion-panel__toggle"> | |
<span class="glue-expansion-panel__button ${this._isPanelExpandable?"":"gads-contact-hub-panel__button--no-pointer"}" | |
id="gads-contact-hub-panel-${b}-toggle" | |
data-glue-expansion-panel-toggle-for="gads-contact-hub-panel-${b}-content"> | |
<div class="gads-contact-hub-panel__header--container"> | |
${a.image&&(null===(c=a.image)||void 0===c?0:c.image.url)?p` | |
<gads-image aria-hidden="true" | |
image="${(null===(d=a.image)||void 0===d?void 0:d.image.url)||""}" | |
widths="sm:32" | |
lazy | |
${(null===(e=a.image)||void 0===e?0:e.has_transparency)?w.HAS_TRANSPARENCY:""}> | |
</gads-image> | |
`:""} | |
<div class="gads-contact-hub-panel__headline--container"> | |
<h3 id="gads-contact-hub-panel-${b}-headline" class="glue-headline glue-headline--headline-5"> | |
${this.panelLinkRender(a)} | |
</h3> | |
<p class="glue-font-weight-medium" aria-hidden="true">${a.eyebrow}</p> | |
</div> | |
</div> | |
${this._isPanelExpandable?p` | |
<svg aria-hidden="true" viewBox="0 0 24 24" class="glue-icon glue-expansion-panel__header-arrow"> | |
<path d="M5.41 7.59L4 9l8 8 8-8-1.41-1.41L12 14.17"></path> | |
</svg> | |
`:""} | |
</span> | |
</div> | |
<div class="glue-expansion-panel__content" id="gads-contact-hub-panel-${b}-content"> | |
${this._isPanelExpandable?p` | |
<div class="gads-contact-hub-panel__content-inner"> | |
${a.expanded_image&&(null===(f=a.expanded_image)||void 0===f?0:f.image.url)?p` | |
<gads-image alt-text="${(null===(h=a.expanded_image)||void 0===h?void 0:h.aria_description)||""}" | |
image="${(null===(l=a.expanded_image)||void 0===l?void 0:l.image.url)||""}" | |
widths="sm:108" | |
${(null===(n=a.image)||void 0===n?0:n.has_transparency)?w.HAS_TRANSPARENCY:""}> | |
</gads-image> | |
`:""} | |
<p>${a.expanded_copy}</p> | |
</div> | |
`:""} | |
</div> | |
</article> | |
`}panelConsolidatedRender(a,b){var c,d,e;return p` | |
<article class="gads-contact-hub__consolidated-panel"> | |
<div class="gads-contact-hub-panel__header--container"> | |
${a.image&&(null===(c=a.image)||void 0===c?0:c.image.url)?p` | |
<gads-image aria-hidden="true" | |
image="${(null===(d=a.image)||void 0===d?void 0:d.image.url)||""}" | |
widths="sm:32" | |
lazy | |
${(null===(e=a.image)||void 0===e?0:e.has_transparency)?w.HAS_TRANSPARENCY:""}> | |
</gads-image> | |
`:""} | |
<div class="gads-contact-hub-panel__headline--container"> | |
<h3 id="gads-contact-hub-panel-${b}-headline" class="glue-headline glue-headline--headline-5"> | |
${a.headline} | |
</h3> | |
</div> | |
</div> | |
<ul class="gads-contact-hub__consolidated-list"> | |
${this.consolidatedItemsRender(a.consolidated_panel_items)} | |
</ul> | |
</article> | |
`}consolidatedItemsRender(a){const b=a.length;return a.map((c,d)=>p` | |
<li class="gads-contact-hub__consolidated-item ${Math.ceil(b/2)===d?"gads-contact-hub__consolidated-item--middle":""}"> | |
<div> | |
<span class="gads-contact-hub__consolidated-item-country glue-font-weight-medium"> | |
${c.country} | |
</span> | |
<span class="gads-contact-hub__consolidated-item-availability"> | |
${c.availability} | |
</span> | |
</div> | |
<div class="gads-contact-hub__consolidated-item-cta"> | |
<gads-button | |
cta-name="${c.gtm_cta_name}" | |
cta-text="${c.telephone_formatted}" | |
cta-url="tel:${c.telephone}" | |
emphasis="low" | |
icon-id="PHONE" | |
icon-type="glue-icon" | |
label="${c.telephone_aria_label}" | |
module-name="${this.gtmModuleName}"> | |
</gads-button> | |
</div> | |
</li> | |
`).join("")}renderConsolidatedLong(){var a=this.panelsObj.filter(c=>!("consolidated_panel_items"in c)),b=this.panelsObj.filter(c=>"consolidated_panel_items"in c)[0];a=a.length?` | |
<div class="glue-grid__col glue-grid__col--span-1 glue-grid__col--span-2-xl"></div> | |
<div class="gads-contact-hub__consolidated-long-ctas-container glue-spacer-4-bottom | |
glue-grid__col glue-grid__col--span-10 glue-grid__col--span-8-xl"> | |
${a.map(c=>"consolidated_panel_items"in c?"":c.chatbot_agent_id&&c.chatbot_context_id?p` | |
<button class="glue-button glue-button--medium-emphasis glue-button--icon" | |
aria-label="${c.panel_link_aria_description}" | |
data-bm-widget-agent-id="${c.chatbot_agent_id}" | |
data-bm-widget-context="${c.chatbot_context_id}" | |
data-bm-widget-layout="advanced" | |
data-g-cta-name="${c.gtm_cta_name}" | |
data-g-module-name="${this.gtmModuleName}"> | |
<div class="icon-wrapper"><gads-icon icon-id="CHAT"></gads-icon></div> | |
<span class="bm-widget-button-text">${c.headline}</span> | |
</button> | |
`:p` | |
<gads-button | |
cta-text="${c.headline}" | |
cta-url="${c.panel_link}" | |
label="${c.panel_link_aria_description}" | |
icon-id="${c.consolidated_version_cta_icon}" | |
icon-type="glue-icon" | |
cta-name="${c.gtm_cta_name}" | |
module-name="${this.gtmModuleName}" | |
agent-id="${c.chatbot_agent_id}" | |
context-id="${c.chatbot_context_id}"> | |
</gads-button> | |
`).join("")} | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-1 glue-grid__col--span-2-xl"></div> | |
`:"";b="consolidated_panel_items"in b?` | |
<div class="glue-grid__col glue-grid__col--span-2 glue-grid__col--span-1-lg"></div> | |
<div class="glue-grid__col glue-grid__col--span-8 glue-grid__col--span-10-lg"> | |
<div class="gads-contact-hub-consolidated-panel__headline"> | |
${b.headline} | |
</div> | |
<ul class="gads-contact-hub__consolidated-list gads-contact-hub__consolidated-list--long"> | |
${this.consolidatedItemsRender(b.consolidated_panel_items)} | |
</ul> | |
</div> | |
`:"";return p` | |
${a} | |
${b} | |
`}renderStandard(){const a=this.isConsolidatedShort()?"glue-grid__col glue-grid__col--span-8-md glue-grid__col--span-5":"glue-grid__col glue-grid__col--span-7 glue-grid__col--span-6-xl",b=this.isConsolidatedShort()?"glue-grid__col glue-grid__col--span-2-md glue-grid__col--span-1-lg":"glue-grid__col glue-grid__col--span-0 glue-grid__col--span-1-xl",c=this.imageRender();return p` | |
<div class="${b}"></div> | |
${"Right"!==this.mediaAlignment?c:""} | |
<div class="${a}"> | |
<section class="glue-expansion-panels"> | |
${this.panelsRender()} | |
</section> | |
</div> | |
${"Right"===this.mediaAlignment?c:""} | |
`}render(){const a=this.isConsolidatedShort()?"gads-contact-hub--consolidated-short":"";return m` | |
<section id="gads-contact-hub" class="${a} | |
gads-contact-hub glue-page glue-spacer-5-bottom glue-spacer-5-top"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-1 glue-grid__col--span-2-xl"></div> | |
<div class="gads-contact-hub__header--container glue-grid__col glue-grid__col--span-10 glue-grid__col--span-8-xl"> | |
<h2 id="gads-contact-hub-headline" class="glue-headline glue-headline--headline-2 glue-text-center"> | |
<span class="glue-font-weight-medium">${this.headlineText}</span> | |
</h2> | |
</div> | |
</div> | |
<div class="gads-contact-hub__content--container glue-grid"> | |
${this.isConsolidatedLong()?this.renderConsolidatedLong():this.renderStandard()} | |
</div> | |
</section> | |
`}};customElements.define("gads-contact-hub",wc);var xc=class extends M{constructor(){super(...arguments);this.headline=this.descriptor="";this.expansion_panels_content=[];this.expansion_panels_labels=null}connectedCallback(){this.firstElementChild||this.replaceChildren(this.render());if(r.GLUE in window){const a=this.querySelector(".glue-expansion-panels");a&&new glue.ExpansionPanels(a)}}get panelId(){return this.getAttribute("expansion-panels-id")||this.descriptor}get content(){const a=this.getAttribute("expansion-panels-content")||this.expansion_panels_content; | |
return"string"===typeof a?JSON.parse(k(a)):a}get headlineText(){return this.getAttribute(w.HEADLINE)||this.headline}get expansionPanelsLabels(){const a=this.getAttribute("expansion-panels-labels")||this.expansion_panels_labels;return"string"===typeof a?JSON.parse(k(a)):a}panelBuilder(a,b){return p` | |
<div class="glue-expansion-panel"> | |
<h3 class="glue-expansion-panel__toggle"> | |
<span class="glue-expansion-panel__button" | |
id="expansion-panels-${this.panelId}-${b+1}-toggle" | |
data-glue-expansion-panel-toggle-for="expansion-panels-${this.panelId}-${b+1}-content"> | |
<span class="glue-expansion-panel__header-text">${a.headline}</span> | |
<div class="icon-wrapper glue-icon glue-expansion-panel__header-arrow"> | |
<gads-icon icon-id="expand_more"></gads-icon> | |
</div> | |
</span> | |
</h3> | |
<div class="glue-expansion-panel__content" id="expansion-panels-${this.panelId}-${b+1}-content"> | |
<div>${a.copy}</div> | |
</div> | |
</div> | |
`}render(){var a,b,c;const d=p` | |
<button aria-label="${(null===(a=this.expansionPanelsLabels)||void 0===a?void 0:a.button_aria_label)||""}" | |
class="glue-expansion-panels__toggle-all glue-button | |
glue-button--low-emphasis glue-button--icon-right"> | |
<span class="glue-expansion-panels__toggle-text | |
glue-expansion-panels__toggle-text--expanded"> | |
${(null===(b=this.expansionPanelsLabels)||void 0===b?void 0:b.expand_all)||""} | |
</span> | |
<span class="glue-expansion-panels__toggle-text | |
glue-expansion-panels__toggle-text--collapsed"> | |
${(null===(c=this.expansionPanelsLabels)||void 0===c?void 0:c.collapse_all)||""} | |
</span> | |
<span class="icon-wrapper"> | |
<gads-icon icon-id="expand_all"></gads-icon> | |
</span> | |
</button> | |
`;return m` | |
<section class="glue-page glue-spacer-6-top glue-spacer-6-bottom gads-expansion-panels-container"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-0-sm glue-grid__col--span-1-md"></div> | |
<div class="glue-grid__col glue-grid__col--span-4-sm glue-grid__col--span-10-md"> | |
<h3 class="glue-headline glue-headline--headline-3">${this.headlineText}</h3> | |
<div class="glue-expansion-panels" | |
data-glue-expansion-panels-key="${this.panelId}"> | |
<div class="glue-expansion-panels__header"> | |
${d} | |
</div> | |
${this.content.map((e,f)=>this.panelBuilder(e,f))} | |
</div> | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-0-sm glue-grid__col--span-1-md"></div> | |
</div> | |
</section> | |
`}};customElements.define("gads-expansion-panels",xc);var yc={INPUT:"input",MDC_TEXT_FIELD:".mdc-text-field",MDC_SELECT:".mdc-select"},zc=class{constructor(){this.result=new Map}init(a){const b=[...a.querySelectorAll(yc.MDC_TEXT_FIELD)];a=[...a.querySelectorAll(yc.MDC_SELECT)];b.forEach(c=>{const d=new mdc.textField.MDCTextField(c);(c=c.getAttribute("key"))&&this.result.set(c,d)});a.forEach(c=>{const d=new mdc.select.MDCSelect(c);(c=c.getAttribute("key"))&&this.result.set(c,d)});return this.result}};var Ac={MATERIAL_MDC:"https://www.gstatic.com/glue/v26_0/material-components-web.min.js",GLUE_MATERIAL:"https://www.gstatic.com/glue/v26_0/glue-material.min.css"},Bc={LINK:"link",SCRIPT:"script"},Cc=class{constructor(){var a=document.createElement(Bc.LINK);a.rel="stylesheet";a.href=Ac.GLUE_MATERIAL;document.head.appendChild(a);a=document.createElement(Bc.SCRIPT);a.src=Ac.MATERIAL_MDC;document.body.appendChild(a)}static getInstance(){Cc.instance||(Cc.instance=new Cc);return Cc.instance}};var W={AVAILABLE_ERROR:".form-calculator2-up__results__unavailable",BUDGET_RESULTS:".form-calculator2-up__results",BUDGET_WRAPPER:".form-calculator2-up__module",BUDGET:".form-calculator2-up__budget",ERROR_LOWER:".form-calculator2-up__budget__input__error_lower",ERROR_NEGATIVE:".form-calculator2-up__budget__input__error_negative",ESTIMATE_BUDGET_CTA:".form-calculator2-up__budget__button button",FORM_INDUSTRY_ANCHOR:".form-calculator2-up__budget__industry .mdc-select__anchor",FORM_INPUT_BUDGET:".form-calculator2-up__budget__leads input", | |
FORM_INPUT_POSTAL:".form-calculator2-up__budget__postalcode input",FORM_INPUT:".mdc-text-field input",FORM_LABEL_BUDGET:".form-calculator2-up__budget__leads",FORM_SELECT_INDUSTRY:".form-calculator2-up__budget__industry input",FORM_SELECT_COUNTRY:".form-calculator2-up__budget__countrycode input",RENDER_MAX:".form-calculator2-up__max",RENDER_MIN:".form-calculator2-up__min",CURRENCYPRE:".currencypositionpre",CURRENCYPOST:".currencypositionpost",RESET_CTA:".form-calculator2-up__results__reset",RESULT_AVAILABLE:".form-calculator2-up__results__available", | |
RESULT_BUDGET:".budget",RESULT_CATEGORY:".category",RESULT_POSTALCODE:".postalcode",RESULT_COUNTRYCODE:".countrycode",RESULT:".form-calculator2-up__results",INDUSTRY_MY_SELECT:"#industry-myselect",COUNTRY_MY_SELECT:"#country-myselect"},Dc={BUDGET_HEADLINE:"budget_headline",FORM_INDUSTRY_DROPDOWN:"form_industry_dropdown_nested",FORM_COUNTRY_DROPDOWN:"form_country_dropdown_nested",FORM_INDUSTRY_PLACEHOLDER:"form_industry_placeholder",FORM_COUNTRY_PLACEHOLDER:"form_country_placeholder",FORM_LEADS_ERROR_GREATER:"form_leads_error_greater", | |
FORM_LEADS_ERROR_MAX:"form_leads_error_max",FORM_LEADS_PLACEHOLDER:"form_leads_placeholder",FORM_ZIPCODE_PLACEHOLDER:"form_zipcode_placeholder",LANG:"lang",LOCALE:"locale",REQUESTCATEGORIES:"requestcategories"},Ec={CATEGORY:"categories.json",POSTAL:"postal.json",PRICE:"price.json",DATAEMEA:"data.json"},Fc=["en_us","en_ca"],Gc=class extends M{constructor(){super(...arguments);this.copy=this.budget_headline=null;this.currency="USD";this.form_industry_dropdown_nested=[];this.form_country_dropdown_nested= | |
[];this.headline=this.form_zipcode_placeholder=this.form_leads_placeholder=this.form_leads_error_max=this.form_leads_error_greater=this.form_country_placeholder=this.form_industry_placeholder=null;this.isAvailable=!1;this.result_copy=this.result_budget_month=this.result_availability=null;this.result_cta=[];this.result_unavailable=null;this.data={categories:[],postal:[],price:[],dataemea:[]};this.mdcInputs=(new zc).init(this);this.budget=document.querySelector(W.BUDGET);this.budgetWrapper=document.querySelector(W.BUDGET_WRAPPER); | |
this.errorNegative=document.querySelector(W.ERROR_NEGATIVE);this.errorLower=document.querySelector(W.ERROR_LOWER);this.htmlLang=document.querySelector(w.HTML);this.inputPostalCode=document.querySelector(W.FORM_INPUT_POSTAL);this.inputBudget=document.querySelector(W.FORM_INPUT_BUDGET);this.industryAnchor=document.querySelector(W.FORM_INDUSTRY_ANCHOR);this.labelBudget=document.querySelector(W.FORM_LABEL_BUDGET);this.maxElement=document.querySelector(W.RENDER_MAX);this.minElement=document.querySelector(W.RENDER_MIN); | |
this.currencyPre=document.querySelectorAll(W.CURRENCYPRE);this.currencyPost=document.querySelectorAll(W.CURRENCYPOST);this.result=document.querySelector(W.RESULT);this.resultBudget=document.querySelector(W.RESULT_BUDGET);this.resultCategory=document.querySelector(W.RESULT_CATEGORY);this.resultPostalcode=document.querySelector(W.RESULT_POSTALCODE);this.resultCountrycode=document.querySelector(W.RESULT_COUNTRYCODE);this.selectCountry=document.querySelector(W.FORM_SELECT_COUNTRY);this.selectIndustry= | |
document.querySelector(W.FORM_SELECT_INDUSTRY);this.industryMySelect=document.querySelector(W.INDUSTRY_MY_SELECT);this.countryMySelect=document.querySelector(W.COUNTRY_MY_SELECT)}connectedCallback(){var a;const b=null===(a=this.htmlLang)||void 0===a?void 0:a.getAttribute(Dc.LOCALE);this.firstElementChild||this.replaceChildren(this.render());Cc.getInstance();this.apiRequest();this.disabledCharKey();a=document.querySelector(W.ESTIMATE_BUDGET_CTA);null===a||void 0===a?void 0:a.setAttribute(w.DISABLED, | |
"");null===a||void 0===a?void 0:a.addEventListener(B.CLICK,()=>{Fc.forEach(c=>{c===b?this.handlerSubmitClick():this.handlerSubmitClickEmea()})});a&&this.submitVisibilityHandler(a);a=document.querySelector(W.RESET_CTA);null===a||void 0===a?void 0:a.addEventListener(B.CLICK,()=>{this.resetBudget()})}get gtmModuleName(){return this.nodeName}get headlineText(){return this.getAttribute(w.HEADLINE)||this.headline}get copyText(){return this.getAttribute(w.COPY)||this.copy}get copyCurrency(){return this.currency}get formIndustryPlaceholder(){return this.getAttribute(Dc.FORM_INDUSTRY_PLACEHOLDER)|| | |
this.form_industry_placeholder}get formCountryPlaceholder(){return this.getAttribute(Dc.FORM_COUNTRY_PLACEHOLDER)||this.form_country_placeholder}get formLeadsPlaceholder(){return this.getAttribute(Dc.FORM_LEADS_PLACEHOLDER)||this.form_leads_placeholder}get formZipcodePlaceholder(){return this.getAttribute(Dc.FORM_ZIPCODE_PLACEHOLDER)||this.form_zipcode_placeholder}get formIndustryItems(){return this.form_industry_dropdown_nested}get formCountryItems(){return this.form_country_dropdown_nested}get budgetHeadline(){return this.getAttribute(Dc.BUDGET_HEADLINE)|| | |
this.budget_headline}get errorGreater(){return this.getAttribute(Dc.FORM_LEADS_ERROR_GREATER)||this.form_leads_error_greater}get errorMax(){return this.getAttribute(Dc.FORM_LEADS_ERROR_MAX)||this.form_leads_error_max}get resultBudgetMonth(){return this.result_budget_month}get resultCopy(){return this.result_copy}get resultCta(){return this.result_cta}get resultAvailability(){return this.result_availability}get resultUnavailable(){return this.result_unavailable}async apiRequest(){if(window.fetch){var a= | |
await window.fetch(`${"/home/static/local-services-ads/en_us/"}${Ec.PRICE}`);a.ok&&(a=await a.json(),this.data.price=this.formatData(a));a=await window.fetch(`${"/home/static/local-services-ads/en_us/"}${Ec.POSTAL}`);a.ok&&(a=await a.json(),this.data.postal=this.formatData(a));a=await window.fetch(`${"/home/static/local-services-ads/en_us/"}${Ec.CATEGORY}`);a.ok&&(a=await a.json(),this.data.categories=this.formatData(a));a=await window.fetch(`${"/home/static/local-services-ads/emea/"}${Ec.DATAEMEA}`); | |
a.ok&&(a=await a.json(),this.data.dataemea=this.formatData(a))}}formatData(a){const b=[],c=a[0];a.forEach(d=>{const e={};d.forEach((f,h)=>{h=c[h].replace(/\s/g,"-").toLowerCase();e[h]=f});b.push(e)});return b}getRegionByPostalCode(a){const b=this.data.postal.find(c=>c["postal-code"]===a);return null===b||void 0===b?void 0:b.region}getCategory(a){const b=this.data.categories.find(c=>c.category===a);return null===b||void 0===b?void 0:b.id}getMinMaxPrice(a,b){return this.data.price.find(c=>c.region=== | |
a&&c.category===b)}getMinMaxPriceEmea(a,b){return this.data.dataemea.find(c=>{const d=c.region.toLowerCase(),e=c.category,f=c.currencycode;c=c.currencypos;return d===a&&e===b&&f&&c})}displayAvailability(a,b){var c,d;const e=document.querySelector(W.RESULT_AVAILABLE),f=document.querySelector(W.AVAILABLE_ERROR);(this.isAvailable=a&&b?!0:!1)?(null===e||void 0===e?void 0:e.classList.remove(A.HIDDEN),null===f||void 0===f?void 0:f.classList.add(A.HIDDEN)):(null===(c=this.budgetWrapper)||void 0===c?void 0: | |
c.classList.add(A.HIDDEN),null===(d=this.result)||void 0===d?void 0:d.classList.remove(A.HIDDEN),null===e||void 0===e?void 0:e.classList.add(A.HIDDEN),null===f||void 0===f?void 0:f.classList.remove(A.HIDDEN))}displayResult(a,b,c,d){var e,f,h;0<a.length&&b&&(null===(e=this.budget)||void 0===e?void 0:e.classList.add(A.ACTIVE),null===(f=this.budgetWrapper)||void 0===f?void 0:f.classList.add(A.HIDDEN),null===(h=this.result)||void 0===h?void 0:h.classList.remove(A.HIDDEN));this.resultBudget&&this.resultCategory&& | |
this.resultPostalcode&&b&&d&&c&&(this.resultBudget.textContent=b,this.resultCategory.textContent=d,this.resultPostalcode.textContent=c)}displayResultEmea(a,b,c,d){var e,f,h;0<a.length&&b&&(null===(e=this.budget)||void 0===e?void 0:e.classList.add(A.ACTIVE),null===(f=this.budgetWrapper)||void 0===f?void 0:f.classList.add(A.HIDDEN),null===(h=this.result)||void 0===h?void 0:h.classList.remove(A.HIDDEN));this.resultBudget&&this.resultCategory&&this.resultCountrycode&&b&&d&&c&&(this.resultBudget.textContent= | |
b,this.resultCategory.textContent=d,this.resultCountrycode.textContent=c)}displayMinMaxPriceValues(a){var b,c=a.budget,d=a.minus;a=a.plus;d&&a&&c&&(d=parseInt(d)*parseInt(c),c=parseInt(a)*parseInt(c),(a=null===(b=this.htmlLang)||void 0===b?void 0:b.getAttribute(Dc.LANG))&&this.minElement&&this.maxElement&&(b={style:"currency",currency:this.copyCurrency,minimumFractionDigits:0,maximumFractionDigits:0},this.minElement.textContent=d.toLocaleString(a,b),this.maxElement.textContent=c.toLocaleString(a, | |
b)))}displayMinMaxPriceValuesEmea(a){var b,c=a.budget,d=a.minus;const e=a.plus,f=a.currencycode;a=a.currencypos;d&&e&&c&&(d=parseInt(d)*parseInt(c),c=parseInt(e)*parseInt(c),(null===(b=this.htmlLang)||void 0===b?0:b.getAttribute(Dc.LANG))&&this.minElement&&this.maxElement&&this.currencyPre&&this.currencyPost&&a&&f&&(this.minElement.textContent=d.toLocaleString(),this.maxElement.textContent=c.toLocaleString(),"pre"===a.toLowerCase()?(this.currencyPre.forEach(h=>{null===h||void 0===h?void 0:h.classList.remove(A.HIDDEN); | |
h.textContent=f}),this.currencyPost.forEach(h=>{null===h||void 0===h?void 0:h.classList.add(A.HIDDEN)})):"post"===a.toLowerCase()&&(this.currencyPost.forEach(h=>{null===h||void 0===h?void 0:h.classList.remove(A.HIDDEN);h.textContent=f}),this.currencyPre.forEach(h=>{null===h||void 0===h?void 0:h.classList.add(A.HIDDEN)}))))}disabledCharKey(){var a;null===(a=this.inputBudget)||void 0===a?void 0:a.addEventListener(B.KEYDOWN,b=>{if(!(new RegExp(/^[0-9]|Backspace$/)).test(b.key))return b.preventDefault(), | |
!1})}validateLeadsPerMonth(a,b){var c,d,e,f,h,l,n,t;null===(c=this.htmlLang)||void 0===c||c.getAttribute(Dc.LOCALE);Fc.forEach(()=>!1);a=b?parseFloat(b):0;if(0>=a)return null===(d=this.labelBudget)||void 0===d?void 0:d.classList.add(A.ERROR),null===(e=this.errorNegative)||void 0===e?void 0:e.classList.add(A.SHOW),null===(f=this.errorLower)||void 0===f?void 0:f.classList.remove(A.SHOW),!1;if(1E4<a)return null===(h=this.labelBudget)||void 0===h?void 0:h.classList.add(A.ERROR),null===(l=this.errorLower)|| | |
void 0===l?void 0:l.classList.add(A.SHOW),null===(n=this.errorNegative)||void 0===n?void 0:n.classList.remove(A.SHOW),!1;null===(t=this.labelBudget)||void 0===t?void 0:t.classList.remove(A.ERROR);return!0}submitVisibilityHandler(a){const b=this.inputPostalCode||this.selectCountry;[b,this.inputBudget,this.industryAnchor].forEach(c=>{null===c||void 0===c?void 0:c.addEventListener(B.FOCUSOUT,()=>{var d,e;const f=null===(d=this.inputBudget)||void 0===d?void 0:d.value;d=null===b||void 0===b?void 0:b.value; | |
const h=null===(e=this.selectIndustry)||void 0===e?void 0:e.value;f&&d&&h?a.removeAttribute(w.DISABLED):a.setAttribute(w.DISABLED,"")})})}handlerSubmitClick(){var a,b,c,d,e,f,h;let l=void 0,n;n=this.getRegionByPostalCode(null===(a=this.inputPostalCode)||void 0===a?void 0:a.value);a=this.getCategory(null===(b=this.selectIndustry)||void 0===b?void 0:b.value);n&&a?(l=this.getMinMaxPrice(n,a),this.validateLeadsPerMonth(l,null===(c=this.inputBudget)||void 0===c?void 0:c.value)&&(b={budget:null===(d=this.inputBudget)|| | |
void 0===d?void 0:d.value,minus:null===l||void 0===l?void 0:l.minus,plus:null===l||void 0===l?void 0:l.plus},this.displayMinMaxPriceValues(b),this.displayResult(a,null===(e=this.inputBudget)||void 0===e?void 0:e.value,null===(f=this.inputPostalCode)||void 0===f?void 0:f.value,null===(h=this.selectIndustry)||void 0===h?void 0:h.value.replace(/_/g," ")),this.displayAvailability(n,l))):this.displayAvailability(n,l)}handlerSubmitClickEmea(){var a,b,c,d,e,f,h;const l=null===(a=this.selectIndustry)||void 0=== | |
a?void 0:a.value;(a=null===(b=this.selectCountry)||void 0===b?void 0:b.value)&&l&&(b=this.getMinMaxPriceEmea(a,l),this.validateLeadsPerMonth(b,null===(c=this.inputBudget)||void 0===c?void 0:c.value)&&(c={budget:null===(d=this.inputBudget)||void 0===d?void 0:d.value,minus:null===b||void 0===b?void 0:b.priceperlead,plus:null===b||void 0===b?void 0:b.maxpriceperlead,currencycode:null===b||void 0===b?void 0:b.currencycode,currencypos:null===b||void 0===b?void 0:b.currencypos},this.displayMinMaxPriceValuesEmea(c), | |
this.displayResultEmea(l,null===(e=this.inputBudget)||void 0===e?void 0:e.value,null===(f=this.countryMySelect)||void 0===f?void 0:f.textContent,null===(h=this.industryMySelect)||void 0===h?void 0:h.textContent)),this.displayAvailability(a,b))}resetBudget(){var a,b,c,d,e;null===(a=this.budget)||void 0===a?void 0:a.classList.remove(A.ACTIVE);null===(b=this.budgetWrapper)||void 0===b?void 0:b.classList.remove(A.HIDDEN);null===(c=this.errorLower)||void 0===c?void 0:c.classList.remove(A.SHOW);null=== | |
(d=this.errorNegative)||void 0===d?void 0:d.classList.remove(A.SHOW);null===(e=this.result)||void 0===e?void 0:e.classList.add(A.HIDDEN)}render(){return m` | |
<section class="glue-page form-calculator2-up"> | |
<div class="glue-grid form-calculator2-up__grid"> | |
<div class="glue-grid__col glue-grid__col--span-0-sm glue-grid__col--span-1-lg"></div> | |
<div class="glue-grid__col glue-grid__col--span-4-sm glue-grid__col--span-6-md glue-grid__col--span-4-lg"> | |
<div class="form-calculator2-up__content"> | |
${this.headlineText?p` | |
<h2 class="form-calculator2-up__headline glue-headline glue-headline--headline-2"> | |
<span class="glue-font-weight-medium">${this.headlineText}</span> | |
</h2> | |
`:null} | |
${this.copyText?p` | |
<p class="form-calculator2-up__copy">${this.copyText}</p> | |
`:null} | |
</div> | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-0-sm glue-grid__col--span-1-lg"></div> | |
<div class="glue-grid__col glue-grid__col--span-4-sm glue-grid__col--span-6-md glue-grid__col--span-5-lg"> | |
<div class="form-calculator2-up__budget"> | |
<div class="form-calculator2-up__budget__wrapper"> | |
<div class="form-calculator2-up__module"> | |
${this.budgetHeadline?p` | |
<p class="form-calculator2-up__budget__headline glue-headline glue-headline--headline-5"> | |
<span class="glue-font-weight-medium">${this.budgetHeadline}</span> | |
</p> | |
`:null} | |
${Fc.includes(this.locale)?p` | |
<label class="form-calculator2-up__budget__input form-calculator2-up__budget__postalcode | |
mdc-text-field mdc-text-field--outlined glue-text-field"> | |
<span class="mdc-notched-outline"> | |
<span class="mdc-notched-outline__leading"></span> | |
<span class="mdc-notched-outline__notch"> | |
<span class="mdc-floating-label" id="address-label"> | |
${this.formZipcodePlaceholder} | |
</span> | |
</span> | |
<span class="mdc-notched-outline__trailing"></span> | |
</span> | |
<input class="mdc-text-field__input" name="address" | |
type="text" aria-labelledby="address-label" | |
autocomplete="off"> | |
</label>`:p` | |
<div class="form-calculator2-up__budget__countrycode mdc-select mdc-select--outlined glue-select"> | |
<input type="hidden" name="country"> | |
<div class="mdc-select__anchor" role="button" aria-haspopup="listbox" | |
aria-labelledby="label-country country-myselect"> | |
<span id="country-myselect" class="mdc-select__selected-text"></span> | |
<span class="mdc-select__dropdown-icon"> | |
<svg class="mdc-select__dropdown-icon-graphic" viewBox="7 10 10 5"> | |
<polygon class="mdc-select__dropdown-icon-inactive" stroke="none" fill-rule="evenodd" points="7 10 12 15 17 10"></polygon> | |
<polygon class="mdc-select__dropdown-icon-active" stroke="none" fill-rule="evenodd" points="7 15 12 10 17 15"></polygon> | |
</svg> | |
</span> | |
<span class="mdc-notched-outline"> | |
<span class="mdc-notched-outline__leading"></span> | |
<span class="mdc-notched-outline__notch"> | |
<span id="label-country" class="mdc-floating-label"> | |
${this.formCountryPlaceholder} | |
</span> | |
</span> | |
<span class="mdc-notched-outline__trailing"></span> | |
</span> | |
</div> | |
<div class="mdc-select__menu mdc-menu mdc-menu-surface"> | |
<ul class="mdc-list" role="listbox"> | |
<li class="mdc-list-item mdc-list-item--selected" aria-selected="true" | |
data-value="" role="option" aria-setsize="3" aria-posinset="1"> | |
<span class="mdc-list-item__ripple"></span> | |
</li> | |
${this.formCountryItems.map(a=>{const b=a.key.toLowerCase();return p` | |
<li class="mdc-list-item" data-value="${b}" role="option" | |
aria-setsize="3" aria-posinset="2"> | |
<span class="mdc-list-item__ripple"></span> | |
<span class="mdc-list-item__text">${a.value}</span> | |
</li> | |
`})} | |
</ul> | |
</div> | |
</div>`} | |
<label class="form-calculator2-up__budget__input form-calculator2-up__budget__leads | |
mdc-text-field mdc-text-field--outlined glue-text-field"> | |
<span class="mdc-notched-outline"> | |
<span class="mdc-notched-outline__leading"></span> | |
<span class="mdc-notched-outline__notch"> | |
<span class="mdc-floating-label" id="leads-label"> | |
${this.formLeadsPlaceholder} | |
</span> | |
</span> | |
<span class="mdc-notched-outline__trailing"></span> | |
</span> | |
<input class="mdc-text-field__input" name="leads" | |
type="number" aria-labelledby="leads-label" | |
autocomplete="off"> | |
</label> | |
<div class="form-calculator2-up__budget__input__error"> | |
<span class="form-calculator2-up__budget__input__error_negative">${this.errorGreater}</span> | |
<span class="form-calculator2-up__budget__input__error_lower">${this.errorMax}</span> | |
</div> | |
<div class="form-calculator2-up__budget__industry mdc-select mdc-select--outlined glue-select"> | |
<input type="hidden" name="industry"> | |
<div class="mdc-select__anchor" role="button" aria-haspopup="listbox" | |
aria-labelledby="label-industry industry-myselect"> | |
<span id="industry-myselect" class="mdc-select__selected-text"></span> | |
<span class="mdc-select__dropdown-icon"> | |
<svg class="mdc-select__dropdown-icon-graphic" viewBox="7 10 10 5"> | |
<polygon class="mdc-select__dropdown-icon-inactive" stroke="none" fill-rule="evenodd" points="7 10 12 15 17 10"></polygon> | |
<polygon class="mdc-select__dropdown-icon-active" stroke="none" fill-rule="evenodd" points="7 15 12 10 17 15"></polygon> | |
</svg> | |
</span> | |
<span class="mdc-notched-outline"> | |
<span class="mdc-notched-outline__leading"></span> | |
<span class="mdc-notched-outline__notch"> | |
<span id="label-industry" class="mdc-floating-label"> | |
${this.formIndustryPlaceholder} | |
</span> | |
</span> | |
<span class="mdc-notched-outline__trailing"></span> | |
</span> | |
</div> | |
<div class="mdc-select__menu mdc-menu mdc-menu-surface"> | |
<ul class="mdc-list" role="listbox"> | |
<li class="mdc-list-item mdc-list-item--selected" aria-selected="true" | |
data-value="" role="option" aria-setsize="3" aria-posinset="1"> | |
<span class="mdc-list-item__ripple"></span> | |
</li> | |
${this.formIndustryItems.map(a=>{const b=a.key.replace(/\s/g,"_").toLowerCase(),c=a.value;return a.value?p` | |
<li class="mdc-list-item" data-value="${b}" role="option" | |
aria-setsize="3" aria-posinset="2"> | |
<span class="mdc-list-item__ripple"></span> | |
<span class="mdc-list-item__text">${c}</span> | |
</li> | |
`:""})} | |
</ul> | |
</div> | |
</div> | |
${this.ctaBlock?p` | |
<div class="form-calculator2-up__budget__button"> | |
${this.ctaBlock} | |
</div> | |
`:null} | |
</div> | |
<div class="form-calculator2-up__results hidden"> | |
<button class="form-calculator2-up__results__reset" aria-labe="Reset form"> | |
<gads-icon icon-id="RESET" class-names="glue-icon--24px form-calculator2-up__results__reset__svg"> | |
</button> | |
<div class="form-calculator2-up__results__available"> | |
<div class="form-calculator2-up__results__wrapper"> | |
${this.resultCopy?p` | |
<h2 class="form-calculator2-up__results__estimated glue-headline glue-headline--headline-5">${this.resultCopy}</h2> | |
`:null} | |
<div class="form-calculator2-up__results__budget"> | |
<h3 class="glue-headline glue-headline--headline-3"> | |
<span class="currencypositionpre"></span> | |
<span class="form-calculator2-up__min glue-font-weight-medium"></span> | |
<span class="currencypositionpost"></span> - <span class="currencypositionpre"></span> | |
<span class="form-calculator2-up__max glue-font-weight-medium"></span> | |
<span class="currencypositionpost"></span> | |
</h3> | |
${this.resultBudgetMonth?p` | |
<p class="glue-spacer-1-top glue-headline glue-headline--headline-5"> | |
<span class="glue-font-weight-medium">${this.resultBudgetMonth}</span> | |
</p> | |
`:null} | |
</div> | |
<div class="form-calculator2-up__results__bottom"> | |
<div class="form-calculator2-up__results__cta"> | |
${this.resultCta.map(a=>p` | |
<gads-button | |
icon-type="${a.icon}" | |
icon-id="${a.icon_id}" | |
cta-name="${a.gtm_cta_name}" | |
cta-text="${a.text}" | |
emphasis="${a.emphasis}" | |
cta-url="${a.url}" | |
${this.unpackCta(a)} | |
></gads-button> | |
`)} | |
</div> | |
${this.resultAvailability?p` | |
<p class="form-calculator2-up__results__availability glue-small-text">${this.resultAvailability}</p> | |
`:null} | |
</div> | |
</div> | |
</div> | |
${this.resultUnavailable?p` | |
<div class="form-calculator2-up__results__unavailable hidden"> | |
<div class="form-calculator2-up__results__unavailable__wrapper"> | |
<p class="glue-headline glue-headline--headline-4"> | |
<span class="glue-font-weight-medium">${this.resultUnavailable}</span> | |
</p> | |
</div> | |
</div> | |
`:null} | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-form-calculator2-up",Gc);var Hc=class extends M{constructor(){super(...arguments);this.carousel_aria_labels=null;this.goals=this.headline="";this._isReducedMotion=Ia.isReducedMotion;this._tabPanels=this.querySelector(".glue-tabpanels");this._tabPanelList=this.querySelector(".glue-tabpanels__page-list")}get headlineText(){return this.getAttribute(w.HEADLINE)||this.headline}get goalsObj(){const a=this.getAttribute("goals")||this.goals;return"string"===typeof a?JSON.parse(k(a)):a}featureMediaRender(a){return a&&Object.keys(a).length? | |
p` | |
<gads-feature-media | |
headline="${a.headline}" | |
copy="${a.copy}" | |
media-alignment="${a.media_alignment}" | |
${a.images.length?`images="${g(JSON.stringify(a.images))}"`:null} | |
${a.thumbnail?`thumbnail="${g(JSON.stringify(a.thumbnail))}"`:null} | |
layout-size="${"Small"}" | |
${a.video?`video="${g(JSON.stringify(a.video))}"`:null} | |
can-hide | |
></gads-feature-media> | |
`:""}relatedProductsRender(a){return a&&Object.keys(a).length?p` | |
<gads-related-products | |
cards="${g(JSON.stringify(a.product_cards))}" | |
${a.featured_product&&Object.keys(a.featured_product).length?`featured-product="${g(JSON.stringify(a.featured_product))}"`:null} | |
headline="${a.headline}" | |
subheadline="${a.subheadline}" | |
view-more-cta-text="${a.view_more_cta_text}" | |
view-less-cta-text="${a.view_less_cta_text}" | |
></gads-related-products> | |
`:""}resourceGoalCarouselRender(a){return a&&Object.keys(a).length?p` | |
<gads-resource-goal-carousel | |
cards="${g(JSON.stringify(a.cards))}" | |
carousel-aria-labels="${g(JSON.stringify(a.carousel_aria_labels))}" | |
headline="${a.headline}" | |
document-id="${a._documentId}" | |
></gads-resource-goal-carousel> | |
`:""}pillsSmMdSlide(a){const b=P.getBpName()===v.SM?sa.SM:sa.MD;this._tabPanelList.scrollTo({left:a.offsetLeft-b,behavior:this._isReducedMotion?G.AUTO:G.SMOOTH})}scrollOnClick(a){a={top:a.getBoundingClientRect().top+window.scrollY-170,behavior:this._isReducedMotion?G.AUTO:G.SMOOTH};window.scroll(a)}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()),this._tabPanels=this.querySelector(".glue-tabpanels"),this._tabPanelList=this.querySelector(".glue-tabpanels__page-list")); | |
this._tabPanels&&r.GLUE in window&&new glue.TabPanels(this._tabPanels,{panelsCount:5,isResponsive:!1});this._tabPanelList&&this._tabPanelList.addEventListener(B.CLICK,a=>{a=a.target;a.classList.contains("glue-tab")&&(this.scrollOnClick(this._tabPanelList),this.pillsSmMdSlide(a))})}render(){return m` | |
<section class="gads-goal-selector glue-spacer-4-bottom"> | |
<div class="gads-goal-selector__container"> | |
<div class="glue-page"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-2"></div> | |
<div class="glue-grid__col glue-grid__col--span-8"> | |
<h2 class="glue-headline glue-headline--headline-4 glue-text-center glue-spacer-4-bottom"> | |
<span class="glue-font-weight-medium">${this.headlineText}</span> | |
</h2> | |
</div> | |
</div> | |
</div> | |
<div class="glue-tabpanels"> | |
<div class="glue-tabpanels__page-list--container"> | |
<div class="glue-tabpanels__page-list"> | |
${this.goalsObj.map(a=>p`<div data-g-module-name='gads-goal-selector' data-g-cta-name=${a.gtm_cta_name}>${a.tab_name}</div>`)} | |
</div> | |
</div> | |
<div class="glue-tabpanels__panel-list"> | |
${this.goalsObj.map((a,b)=>p` | |
<div id="gads-goal-selector-tab-${b}"> | |
<div id="gads-goal-selector-tab-${b}-content" class="glue-tabpanels__panel-content"> | |
${this.featureMediaRender(a.tab_content_feature_media)} | |
${this.relatedProductsRender(a.tab_content_related_products)} | |
${this.resourceGoalCarouselRender(a.tab_content_resource_goal_carousel)} | |
</div> | |
</div> | |
`)} | |
</div> | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-goal-selector",Hc);var Ic=[A.NO_SCROLL,"gridwall-filter-open"],Jc=[A.SHOW],Kc=class extends M{constructor(){super(...arguments);this.filter_heading=this.filter_aria_labels=this.cards="";this.show_more_cards=this.filter_categories=null;this.bp=P.getBpName();this.cardEls=[...this.querySelectorAll(".gridwall-card")];this.currentRow=1;this.currentWidths=[];this.filterCtrl=null;this.hiddenFrom=5;this.hasHiddenRows=[];this.timeout=null;this.filterEl=this.querySelector(".glue-filter");this.panelGroupEl=this.querySelector(".glue-expansion-panels"); | |
this.openFilterBtn=this.querySelector(".open-filter-btn");this.filterContainer=this.querySelector(".filter-container");this.closeFilterBtn=this.querySelector(".close-filter-btn");this.checkboxWrappers=this.querySelectorAll(".checkbox-wrapper");this.allCards=this.querySelectorAll(".gridwall-card");this.gridwallWrapper=this.querySelector(".gridwall-wrapper");this.showMoreBtn=this.querySelector(".show-more-btn");this.resetFilters=this.querySelector(".reset-filters");this.checkboxes=this.querySelectorAll("input[type=checkbox]"); | |
this.contentTypeParam=(new URLSearchParams(window.location.search)).get("content-type");this.resetFiltersSR=this.querySelector(".reset-filters--screen-reader");this.disableResetFilters=!0;this.filterResult=this.querySelector(".glue-filter-result")}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()),this.cardEls=[...this.querySelectorAll(".gridwall-card")],this.filterEl=this.querySelector(".glue-filter"),this.panelGroupEl=this.querySelector(".glue-expansion-panels"),this.openFilterBtn= | |
this.querySelector(".open-filter-btn"),this.filterContainer=this.querySelector(".filter-container"),this.closeFilterBtn=this.querySelector(".close-filter-btn"),this.checkboxWrappers=this.querySelectorAll(".checkbox-wrapper"),this.allCards=this.querySelectorAll(".gridwall-card"),this.gridwallWrapper=this.querySelector(".gridwall-wrapper"),this.showMoreBtn=this.querySelector(".show-more-btn"),this.resetFilters=this.querySelector(".reset-filters"),this.resetFiltersSR=this.querySelector(".reset-filters--screen-reader"), | |
this.filterResult=this.querySelector(".glue-filter-result"));if(r.GLUE in window){this.panelGroupEl&&new glue.ExpansionPanels(this.panelGroupEl);this.filterEl&&(this.filterCtrl=new glue.Filter(this.filterEl));this.updateSpacerValues().then(()=>{(this.hasHiddenRows=this.querySelectorAll(this.nextRowQuery()))?this.calcShowMore():this.showMoreBtn.style.display=oa.NONE});this.filterEl.addEventListener(B.CHANGE,async()=>{this.checkboxClasses();const f=this.querySelectorAll(".item-checked");this.checkResetFilter(f); | |
await this.toggleCardVisibility(this.cardEls,!0);this.showMoreBtn.style.display=oa.NONE;this.checkboxClasses();for(const h of this.allCards)h.classList.toggle("remove",!h.classList.contains("glue-filter-is-matching"));this.filterCtrl&&(this.cardEls=this.filterCtrl.getFilteredItems());await this.updateSpacerValues();this.calcShowMore();this.toggleCardVisibility(this.cardEls,!1)});this.resetFilters.addEventListener(B.CLICK,async()=>{const f=this.querySelectorAll(".item-checked");this.resetFiltersSR.innerText= | |
this.resetFiltersSR.dataset.text||"";this.resetFilters.setAttribute(w.DISABLED,"");this.filterCtrl&&this.filterCtrl.reset();f.forEach(h=>{h.classList.remove("item-checked")});await this.toggleCardVisibility(this.cardEls,!0);for(const h of this.allCards)h.classList.toggle("remove",!h.classList.contains("glue-filter-is-matching"));this.filterCtrl&&(this.cardEls=this.filterCtrl.getFilteredItems());await this.updateSpacerValues();this.calcShowMore();this.toggleCardVisibility(this.cardEls,!1);this.resetFiltersSR.innerText= | |
""});const a=f=>{f.code===F.ESCAPE&&d()},b=f=>{f.target.classList.contains(A.NO_SCROLL)&&d()},c=f=>{var h,l;const n=[...document.body.children].filter(q=>"NOSCRIPT"!==q.nodeName&&"SCRIPT"!==q.nodeName&&"MAIN"!==q.nodeName),t=[...(null===(h=this.parentElement)||void 0===h?void 0:h.children)].filter(q=>q!==this),u=this.filterContainer.parentElement;h=[...(null===(l=null===u||void 0===u?void 0:u.parentElement)||void 0===l?void 0:l.children)].filter(q=>q!==u);l=[...t,n,h].flat();f?(l.forEach(q=>{q.setAttribute(w.INERT, | |
"true")}),l.forEach(q=>{q.setAttribute(w.ARIA_HIDDEN,"true")})):(l.forEach(q=>{q.removeAttribute(w.INERT)}),l.forEach(q=>{q.removeAttribute(w.ARIA_HIDDEN)}))},d=()=>{this.filterContainer.classList.remove(...Jc);document.body.classList.remove(...Ic);const f=this.openFilterBtn.querySelector(".glue-button");c(!1);f.setAttribute(w.ARIA_EXPANDED,"false");f.focus();document.removeEventListener(B.CLICK,b,{capture:!0})};this.openFilterBtn.addEventListener(B.CLICK,()=>{document.body.classList.add(...Ic);this.filterContainer.classList.add(...Jc); | |
this.filterContainer.setAttribute(w.ROLE,"dialog");this.filterContainer.focus();this.openFilterBtn.querySelector(".glue-button").setAttribute(w.ARIA_EXPANDED,"true");this.closeFilterBtn.addEventListener(B.CLICK,d,{once:!0});document.addEventListener(B.CLICK,b,{capture:!0});c(!0);document.addEventListener(B.KEYUP,a,{once:!0})});this.checkboxes.forEach(f=>{if(f.id===this.contentTypeParam){var h=f.closest(".glue-expansion-panel");h=null===h||void 0===h?void 0:h.querySelector(".glue-expansion-panel__button"); | |
h instanceof HTMLElement&&h.click();f.click();this.disableResetFilters=!1}});const e=ja(()=>{this.calcShowMore()},H.FIVE_HUNDRED);window.addEventListener(B.RESIZE,()=>e());P.subscribe(f=>{this.bp=f;const {SM:h,MD:l,LG:n,XL:t}=v,u=[n,t].includes(f);f=[h,l].includes(f);this.filterContainer.classList.contains(A.SHOW)&&u&&this.closeFilterBtn.click();f&&this.filterResult.setAttribute("aria-live","off");this.updateSpacerValues()});this.showMoreBtn.addEventListener(B.CLICK,()=>{var f=this.hasHiddenRows[this.hasHiddenRows.length- | |
1];this.hiddenFrom+=2;this.calcShowMore();f=f.nextElementSibling;(f=null===f||void 0===f?void 0:f.getElementsByTagName("a")[0])&&f.focus()})}}get filterCategoryGroups(){var a=this.getAttribute("filter-categories");a="string"===typeof a?JSON.parse(k(a)):this.filter_categories;return null===a||void 0===a?void 0:a.category_group}get filterHeading(){return this.getAttribute("filter-heading")||this.filter_heading}get gridCards(){const a=this.getAttribute(w.CARDS)||this.cards;return("string"===typeof a? | |
JSON.parse(k(a)):a)||[]}get ariaCloseFilter(){const a=this.getAttribute("filter-aria-labels")||this.filter_aria_labels;return a?("string"===typeof a?JSON.parse(k(a)):a).aria_close_filter:""}get ariaResetFilter(){const a=this.getAttribute("filter-aria-labels")||this.filter_aria_labels;return a?("string"===typeof a?JSON.parse(k(a)):a).aria_reset_filters:""}get ariaResetFilterScreenReader(){const a=this.getAttribute("aria-reset-filters-screen-reader")||this.filter_aria_labels;return a?("string"===typeof a? | |
JSON.parse(k(a)):a).aria_reset_filters_screen_reader:""}get showMoreCardsButton(){const a=this.getAttribute("show-more-cards")||this.show_more_cards;return a?"string"===typeof a?JSON.parse(k(a)):a:null}gtmCtaName(a){return a.startsWith("/home/resources/")?this.replaceSlashes(a.replace("/home/resources/","")):this.replaceSlashes((new URL(a)).pathname.toString())}replaceSlashes(a){return a.replace(/^\/?|\/?$/g,"").replace("/","-")}get gtmModuleName(){return this.nodeName.toLowerCase()}buildCard(a,b){const c= | |
this.buildDataAttribute(a.filter_category),d=this.determineCardType(a);return p` | |
<article | |
aria-labelledby="card-${b}-headline" | |
class="gridwall-card ${0<b?"glue-filter-result__item":"glue-filter-is-matching featured-card"}" | |
type="${d}" | |
${c} | |
${0===b?"":'data-glue-filter-initial="true"'}> | |
<a href="${this.relativizeKintaroLink(a.destination)}" ${this.setExternalLink(a.destination)} | |
data-g-cta-name="${a.destination?this.gtmCtaName(a.destination):""}" | |
data-g-module-name="${this.gtmModuleName}"> | |
${this.cardHasImage(a)?this.extractImage(a):""} | |
<div class="copy-section ${a.yt_vid_time?"has-time-pill":""}"> | |
${a.eyebrow?p`<p class="glue-label glue-font-weight-medium eyebrow glue-spacer-1-bottom">${a.eyebrow}</p>`:""} | |
<div class="headline-container glue-spacer-1-bottom"> | |
${a.short_headline?p` | |
<h2 class="glue-headline glue-headline--headline-5 short-headline card-headline">${a.short_headline}</h2> | |
<h2 class="glue-headline glue-headline--headline-5 long-headline card-headline" id="card-${b}-headline">${a.headline}</h2> | |
`:p` | |
<h2 class="glue-headline glue-headline--headline-5 card-headline" id="card-${b}-headline">${a.headline}</h2> | |
`} | |
</div> | |
<div class="cta-section"> | |
<p class="format"> | |
<svg width="14" height="14" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="presentation"> | |
<path d="M12.25 1.777v10.5H1.75v-10.5h10.5Zm0-1.5H1.75c-.825 0-1.5.675-1.5 1.5v10.5c0 .825.675 1.5 1.5 1.5h10.5c.825 0 1.5-.675 1.5-1.5v-10.5c0-.825-.675-1.5-1.5-1.5Zm-3.75 10.5H3.25v-1.5H8.5v1.5Zm2.25-3h-7.5v-1.5h7.5v1.5Zm0-3h-7.5v-1.5h7.5v1.5Z" fill="currentColor" /> | |
</svg> | |
${a.format} | |
</p> | |
<div class="icon" aria-hidden="true" role="presentation"> | |
<svg viewBox="0 0 24 24" fill="#1A73E8"> | |
<path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z" /> | |
</svg> | |
</div> | |
</div> | |
</div> | |
</a> | |
</article> | |
`}buildDataAttribute(a){const b=[];for(const d in a){const e=`data-glue-filter-${d}`;var c=a[d];c=Array.isArray(c)?c.join(" "):c;b.push(`${e}="${c.toLowerCase()}"`)}return b.join(" ")}buildFilter(){const a=[],b=[...(new Set(this.gridCards.flatMap(c=>Object.values(null===c||void 0===c?void 0:c.filter_category)).flat()))];for(const c of this.filterCategoryGroups)a.push(p` | |
<div class="glue-expansion-panel"> | |
<h3 class="glue-expansion-panel__toggle"> | |
<span class="glue-expansion-panel__button" data-glue-expansion-panel-toggle-for="${c.category_group_id}"> | |
<span class="glue-expansion-panel__header-text">${c.category_group_name}</span> | |
<svg role="presentation" aria-hidden="true" class="glue-icon glue-expansion-panel__header-arrow" viewBox="0 0 24 24"> | |
<path d="M5.41 7.59L4 9l8 8 8-8-1.41-1.41L12 14.17" /> | |
</svg> | |
</span> | |
</h3> | |
<div class="glue-expansion-panel__content" id="${c.category_group_id}"> | |
<div class="glue-filter-control" | |
data-glue-filter-id="${c.category_group_id}" | |
role="list" | |
aria-controls="glue-filter-result-container"> | |
${c.category.map(d=>{const e=-1!==b.findIndex(f=>d.category_id===f.toLowerCase())?"":A.HIDDEN;return p` | |
<div class="mdc-form-field checkbox-wrapper glue-spacer-1-bottom ${e}"> | |
<div role="listitem" class="checkbox mdc-checkbox"> | |
<input type="checkbox" | |
id="${d.category_id}" | |
value="${d.category_id}" | |
data-parent="${c.category_group_id}" | |
class="glue-filter__item mdc-checkbox__native-control filter-option"> | |
<div class="mdc-checkbox__background" aria-hidden="true" tabindex="-1"> | |
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24"> | |
<path class="mdc-checkbox__checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59" /> | |
</svg> | |
<div class="mdc-checkbox__mixedmark"></div> | |
</div> | |
<div class="mdc-checkbox__ripple"></div> | |
</div> | |
<label for="${d.category_id}"> | |
${d.category_name} | |
</label> | |
</div> | |
`})} | |
</div> | |
</div> | |
</div> | |
`);return p` | |
<div class="glue-expansion-panels"> | |
<div class="glue-expansion-panels__header"> | |
<h2 class="glue-eyebrow ${"filter-heading"}">${this.filterHeading}</h2> | |
<button class="close-filter-btn" aria-label="${this.ariaCloseFilter}"> | |
<svg role="presentation" aria-hidden="true" class="glue-icon glue-icon--18px" viewBox="0 0 24 24"> | |
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" /> | |
</svg> | |
</button> | |
</div> | |
${a.join("")} | |
<div class="glue-filter-control glue-spacer-3-top" | |
data-glue-filter-id="initial" | |
aria-controls="glue-filter-result-container"> | |
<button class="glue-button glue-button--low-emphasis reset-filters" ${this.disableResetFilters?"disabled":""}>${this.ariaResetFilter}</button> | |
<div | |
aria-live="assertive" | |
class="reset-filters--screen-reader screen-reader-only" | |
data-text="${this.ariaResetFilterScreenReader}"> | |
</div> | |
</div> | |
</div> | |
`}checkResetFilter(a){0<a.length?this.resetFilters.removeAttribute(w.DISABLED):this.resetFilters.setAttribute(w.DISABLED,"")}calcShowMore(){this.hasHiddenRows=this.querySelectorAll(this.nextRowQuery());const a=this.hasHiddenRows[this.hasHiddenRows.length-1];if(a){this.showMoreBtn.style.display=oa.BLOCK;for(var b=0;b<this.hasHiddenRows.length;b++)this.hasHiddenRows[b].classList.toggle("remove",!1),this.hasHiddenRows[b].firstElementChild.tabIndex=0,this.hasHiddenRows[b].removeAttribute(w.ARIA_HIDDEN), | |
this.hasHiddenRows[b].firstElementChild.removeAttribute(w.ARIA_HIDDEN);b=[];for(var c=a.nextElementSibling;c;)b.push(c),c=c.nextElementSibling;for(c=0;c<b.length;c++)b[c].tabIndex=-1,b[c].firstElementChild.tabIndex=-1,b[c].setAttribute(w.ARIA_HIDDEN,"true"),b[c].firstElementChild.setAttribute(w.ARIA_HIDDEN,"true")}this.hasHiddenRows&&null!==a&&void 0!==a&&a.nextElementSibling||(this.showMoreBtn.style.display=oa.NONE)}checkboxClasses(){this.checkboxWrappers.forEach(a=>{const b=a.querySelector("input"); | |
a.classList.toggle("item-checked",b.checked)})}createVisibilityPromise(a,b,c){return new Promise(d=>{a.classList.contains("remove")&&d();a.addEventListener(B.TRANSITION_END,()=>{d()},{once:!0});setTimeout(()=>{a.classList.toggle(A.HIDDEN,c)},5*b)})}determineCardType(a){return a.yt_vid_id?"video":this.cardHasImage(a)?"image":"text"}extractImage(a){var b,c,d;const e=!!a.yt_vid_id;let f=null,h=!1;let l=null,n=null;const t=a.landscape_image,u=a.portrait_image;e?(n=(null===(b=t.image)||void 0===b?0:b.url)? | |
t:a.image[0],h=!n):(null===(c=u.image)||void 0===c?0:c.url)&&(null===(d=t.image)||void 0===d?0:d.url)?f=[u,t]:a.image.length&&2<=a.image.length?f=a.image:h=!0;h=f?!f.every(y=>y.image.url):!0;if(!h&&f){l=this.formatMultiImage(f);f[1].breakpoint=v.SM;var q=f[1]}a=p` | |
<div class="video-container"> | |
<gads-image | |
alt-text="${null===n||void 0===n?void 0:n.aria_description}" | |
image-span="1" | |
image="${null===n||void 0===n?void 0:n.image.url}" | |
widths="xl:273,lg:432,md:450,sm:599"> | |
</gads-image> | |
<gads-image | |
alt-text="${null===n||void 0===n?void 0:n.aria_description}" | |
image-span="2" | |
image="${null===n||void 0===n?void 0:n.image.url}" | |
widths="xl:616,lg:845,md:950,sm:599"> | |
</gads-image> | |
<gads-icon icon-id="VIDEO_YOUTUBE" class="glue-video__play-button glue-video__play-button--white glue-icon--32px"></gads-icon> | |
${a.yt_vid_time?p` | |
<gads-time-pill time="${a.yt_vid_time}" time-aria-label="${a.yt_vid_time_label}" template="dark"></gads-time-pill> | |
`:""} | |
</div> | |
`;q=p` | |
<div class="image-container"> | |
<gads-image | |
image-span='1' | |
image='${null===q||void 0===q?void 0:q.image.url}' | |
widths="xl:276,md:449,sm:599"${(null===q||void 0===q?0:q.has_transparency)?` ${w.HAS_TRANSPARENCY}`:""}> | |
</gads-image> | |
<gads-image | |
image-span='2' | |
images='${l}' | |
widths="xl:300,lg:290,md:300,sm:599"> | |
</gads-image> | |
</div> | |
`;return e?p` | |
${n&&n.image.url?a:this.isDev?"<div class='missing-image'> Video card image is missing... </div>":""} | |
`:p` | |
${h?this.isDev?"<div class='missing-image'> Portrait/Landscape image is missing... </div>":"":q} | |
`}cardHasImage(a){var b,c,d=null===(b=a.landscape_image)||void 0===b?void 0:b.image;b=null===(c=a.portrait_image)||void 0===c?void 0:c.image;a=0<a.image.length;d=null!==d&&0<Object.keys(d).length;return null!==b&&0<Object.keys(b).length||d||a}getSpacerValue(a){0===a&&(this.currentWidths=this.bp===v.XL?[1,2]:[2]);if(this.currentWidths.length)a=this.currentWidths.pop();else{const b=this.pickCardWidths();a=b.pop();this.currentWidths=b;this.currentRow++}return a}nextRowQuery(){return`[data-grid-row='${this.hiddenFrom}'], | |
[data-grid-row='${this.hiddenFrom-1}']`}pickCardWidths(){var a={"default":[[1,1],[2]],sm:[[1]],xl:[[1,1,1],[1,2],[2,1]]};a=a[this.bp]||a["default"];return[...a[Math.floor(Math.random()*a.length)]]}toggleCardVisibility(a,b){return new Promise(c=>{const d=[];for(let e=1;e<a.length;e++)d.push(this.createVisibilityPromise(a[e],e,b));Promise.all(d).then(()=>c())})}updateSpacerValues(){return new Promise(a=>{this.timeout&&clearTimeout(this.timeout);for(const [b,c]of this.allCards.entries())if(c.classList.contains("glue-filter-is-matching")){const d= | |
this.getSpacerValue(b);c.dataset.gridSpan=`${d}`;c.dataset.gridRow=`${this.currentRow}`;this.currentRow>=this.hiddenFrom&&c.classList.toggle("remove",!0)}else c.dataset.gridRow="0",c.classList.toggle("remove",!0);this.currentRow=1;setTimeout(()=>a(),H.EIGHT_HUNDRED)})}render(){const a=this.filterCategoryGroups.map(b=>b.category_group_id).join(" ")+" initial";return m` | |
<div class="glue-spacer-6-bottom glue-spacer-6-top gridwall-page"> | |
<div class="glue-page"> | |
<div class="glue-grid glue-filter"> | |
<div class="glue-grid__col glue-grid__col--span-12 glue-spacer-4-bottom gridwall-filter"> | |
<gads-button | |
class="open-filter-btn" | |
cta-text="${this.filterHeading}" | |
icon-type="glue-icon-right" | |
icon-id="EXPAND_MORE" | |
cta-aria-controls="gads-gridwall-filter-container" | |
cta-aria-haspopup="true" | |
cta-aria-expanded="false"> | |
</gads-button> | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-12 glue-grid__col--span-4-lg glue-grid__col--span-3-xl"> | |
<div id="gads-gridwall-filter-container" class="filter-container" tabindex="-1"> | |
<div class="glue-filter" id="resource-cards-filter"> | |
${this.buildFilter()} | |
</div> | |
</div> | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-12 glue-grid__col--span-8-lg glue-grid__col--span-9-xl"> | |
<div class="gridwall-wrapper"> | |
<section class="gridwall glue-filter-result" id="glue-filter-result-container" | |
data-glue-filter-ids="${a}" aria-live="polite" aria-atomic="true"> | |
${this.gridCards.length?this.gridCards.map((b,c)=>this.buildCard(b,c)):"<span>Gridwall is not authored with any Gridwall Cards</span>"} | |
</section> | |
</div> | |
${this.showMoreCardsButton?p` | |
<gads-button | |
class="show-more-btn glue-spacer-5-top" | |
cta-name="${this.showMoreCardsButton.gtm_cta_name}" | |
cta-text="${this.showMoreCardsButton.text}" | |
emphasis="${this.showMoreCardsButton.emphasis}" | |
label="${this.showMoreCardsButton.aria_description}" | |
module-name="${this.gtmModuleName}"> | |
</gads-button> | |
`:""} | |
</div> | |
</div> | |
</div> | |
</div> | |
`}};customElements.define("gads-grid-wall",Kc);var Lc=class extends M{constructor(){super(...arguments);this.copy=this.headline=this.icon="";this._jumpLinks=this.querySelectorAll(".gads-hero-jumplinks__cta--container .glue-button")}get gtmModuleName(){return this.nodeName}get headlineText(){return this.getAttribute(w.HEADLINE)||this.headline}get bodyCopy(){return this.getAttribute(w.COPY)||this.copy}get eyebrowObj(){const a=this.getAttribute(w.ICON)||this.icon;return"string"===typeof a?JSON.parse(k(a)):a}get buttonsObj(){var a=this.getAttribute(w.CTA)|| | |
this.ctaInfo;return(a="string"===typeof a?JSON.parse(k(a)):a)&&a.map(b=>p`<gads-button icon-size="24" label-icon-inline ${this.unpackCta(b)}></gads-button>`)}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()),this._jumpLinks=this.querySelectorAll(".gads-hero-jumplinks__cta--container .glue-button"));const a=r.GLUE in window&&new glue.SmoothScroll;a&&this._jumpLinks&&this._jumpLinks.forEach(b=>{const c=b.href||"",d=c.slice(c.lastIndexOf("#")+1,c.length);b.addEventListener(B.CLICK, | |
()=>{a.scrollToId(d,{hash:!1,offset:{x:0,y:120}})})})}render(){var a,b;return m` | |
<section class="gads-hero-jumplinks glue-spacer-6-top"> | |
<div class="glue-page"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-2"></div> | |
<div class="glue-grid__col glue-grid__col--span-8"> | |
${(null===(a=this.eyebrowObj.image)||void 0===a?0:a.url)?p` | |
<div class="gads-hero-jumplinks__eyebrow-icon--container glue-spacer-3-bottom"> | |
<div class="gads-hero-jumplinks__eyebrow-icon--inner"> | |
<gads-image alt-text="${this.eyebrowObj.aria_description}" image=${null===(b=this.eyebrowObj.image)||void 0===b?void 0:b.url} widths="xl:60,lg:60,md:60,sm:60"> | |
</gads-image> | |
</div> | |
</div> | |
`:""} | |
<h1 class="gads-hero-jumplinks__headline glue-headline glue-text-center glue-spacer-2-bottom"> | |
${this.headlineText} | |
</h1> | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-2"></div> | |
</div> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-3"></div> | |
<div class="glue-grid__col glue-grid__col--span-6"> | |
<p class="gads-hero-jumplinks__copy glue-text-center"> | |
${this.bodyCopy} | |
</p> | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-3"></div> | |
</div> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-1"></div> | |
<div class="glue-grid__col glue-grid__col--span-10"> | |
${this.buttonsObj?p` | |
<div class="gads-hero-jumplinks__cta--container glue-spacer-5-top"> | |
${this.buttonsObj} | |
</div> | |
`:""} | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-1"></div> | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-hero-jump-links",Lc);var Mc=class extends M{constructor(){super(...arguments);this.contactBtn=this.querySelector(".gads-hero-support__cta-contact");this.jumpLinks=this.querySelectorAll(".gads-hero-support__cta--container .glue-button");this.contactHub=new wc;this.contactHubLink=null;this.image=this.headline=this.eyebrow_text=this.eyebrow_icon=this.gtm_cta_name=this.cta_schedule_text=this.cta_eto_text=this.cta_eto_number=this.cta_eto_label=this.cta_contact_text="";this.disable_scheduler=!1}connectedCallback(){this.firstElementChild|| | |
(this.replaceChildren(this.render()),this.contactBtn=this.querySelector(".gads-hero-support__cta-contact"),this.jumpLinks=this.querySelectorAll(".gads-hero-support__cta--container .glue-button"));window.addEventListener(B.DOM_CONTENT_LOADED,()=>{const a=this.contactBtn&&r.GLUE in window&&new glue.SmoothScroll,b=this.jumpLinks&&r.GLUE in window&&new glue.SmoothScroll,c=()=>{this.contactHubLink&&this.contactHubLink.focus({preventScroll:!0})};a&&this.contactHub&&this.contactBtn&&this.contactBtn.addEventListener(B.CLICK, | |
()=>{var d;const e=[...document.querySelectorAll(uc.PANEL)].find(f=>"none"!==window.getComputedStyle(f).display);this.contactHubLink=null===(d=null===e||void 0===e?void 0:e.querySelector(uc.PANEL_HEADLINE))||void 0===d?void 0:d.firstElementChild;a.scrollToId(this.contactHub.gtmModuleName,{hash:!1,offset:{x:0,y:120}});setTimeout(c,100)});b&&this.jumpLinks&&this.jumpLinks.forEach(d=>{const e=d.href||"",f=e.slice(e.lastIndexOf("#")+1,e.length);d.addEventListener(B.CLICK,()=>{b.scrollToId(f,{hash:!1, | |
offset:{x:0,y:120}});setTimeout(c,100)})})})}get gtmModuleName(){return this.nodeName.toLowerCase()}get headlineText(){return this.getAttribute(w.HEADLINE)||this.headline}get eyebrowObj(){var a=this.getAttribute("eyebrow-icon")||this.eyebrow_icon;a="string"===typeof a?JSON.parse(k(a)):a;const b=this.getAttribute("eyebrow-text")||this.eyebrow_text;return{eyebrow_icon:a,eyebrow_text:b}}get imageObj(){const a=this.getAttribute(w.IMAGE)||this.image;return"string"===typeof a?JSON.parse(k(a)):a}legacyCTAEtoRender(){const a= | |
this.getAttribute("cta-eto-label")||this.cta_eto_label,b=this.formatEto(this.getAttribute("cta-eto-number")||this.cta_eto_number),c=this.getAttribute("cta-eto-text")||this.cta_eto_text,d=this.getAttribute(w.GTM_CTA_NAME)||this.gtm_cta_name;return b?p` | |
<gads-button | |
cta-label="${a}" | |
cta-name="${d}" | |
cta-text="${c}" | |
cta-url="tel:${b}" | |
icon-type="glue-icon" | |
icon-id="PHONE" | |
icon-size="24" | |
label="${c}" | |
module-name="${this.gtmModuleName}"> | |
</gads-button>`:""}legacyCTAContactRender(){const a=this.getAttribute("cta-contact-text")||this.cta_contact_text;return a?p` | |
<gads-button | |
class="gads-hero-support__cta-contact" | |
cta-name="viewallcontactoptions" | |
cta-text="${a}" | |
label="${a}" | |
icon-type="glue-icon" | |
icon-id="ARROW_DOWNWARD" | |
icon-size="24" | |
module-name="${this.gtmModuleName}"> | |
</gads-button>`:""}legacyCTASchedulerCtaRender(){const a=this.getAttribute("cta-schedule-text")||this.cta_schedule_text;return a?p` | |
<gads-button | |
class="gads-hero-support__cta-schedule" | |
cta-name="schedulemeeting" | |
cta-text="${a}" | |
cta-url="${this.relativizeKintaroLink("/home/contact-us/schedule/")}" | |
label="${a}" | |
icon-type="glue-icon" | |
icon-id="CALENDAR" | |
icon-size="24" | |
module-name="${this.gtmModuleName}"> | |
</gads-button>`:""}standardImage(){return p` | |
<gads-image | |
class="gads-hero-support__image" | |
alt-text="${this.imageObj.aria_description}" | |
image="${this.imageObj.image.url}" | |
widths="lg:747,md:446,sm:599" | |
${this.imageObj.has_transparency?w.HAS_TRANSPARENCY:""} | |
loading-eager | |
priority-high> | |
</gads-image> | |
`}htmlImage(){return p` | |
<gads-image | |
class="gads-hero-support__image" | |
images="${g(JSON.stringify([this.imageObj]))}" | |
widths="lg:747,md:446,sm:599" | |
${this.imageObj.has_transparency?w.HAS_TRANSPARENCY:""} | |
loading-eager | |
priority-high> | |
</gads-image> | |
`}render(){var a,b,c,d;return m` | |
<section class="gads-hero-support glue-spacer-5-top"> | |
<div class="glue-page"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-1 glue-grid__col--span-2-xl"></div> | |
<div class="glue-grid__col glue-grid__col--span-10 glue-grid__col--span-8-xl"> | |
<div class="gads-hero-support__eyebrow-icon--container glue-spacer-2-bottom"> | |
<div class="gads-hero-support__eyebrow-icon--inner"> | |
<gads-image aria-hidden="true" | |
image="${null===(a=this.eyebrowObj.eyebrow_icon)||void 0===a?void 0:a.image.url}" | |
widths="sm:22" | |
${(null===(c=null===(b=this.eyebrowObj)||void 0===b?void 0:b.eyebrow_icon)||void 0===c?0:c.has_transparency)?w.HAS_TRANSPARENCY:""}> | |
</gads-image> | |
<span class="gads-hero-support__eyebrow-icon--text">${this.eyebrowObj.eyebrow_text}</span> | |
</div> | |
</div> | |
<h1 class="gads-hero-support__headline glue-headline glue-text-center glue-spacer-4-bottom">${this.headlineText}</h1> | |
<div class="gads-hero-support__cta--container"> | |
${this.legacyCTAEtoRender()} | |
${this.disable_scheduler?"":this.legacyCTASchedulerCtaRender()} | |
${this.legacyCTAContactRender()} | |
${this.ctaBlock} | |
</div> | |
${(null===(d=this.imageObj.html_image)||void 0===d?0:d.content)&&this.imageObj.use_html_image?this.htmlImage():this.standardImage()} | |
</div> | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-hero-support",Mc);var Nc,Oc=Nc||(Nc={});Oc.TARGET_SCROLL_CLASS="target-scroll-class";Oc.INCENTIVE_PILL="incentive-pill";Oc.HIDE_IMAGE_ON_MOBILE="hide-image-on-mobile";var Pc,Qc=Pc||(Pc={});Qc.TRIGGER_EL="gads-button .glue-button";Qc.TARGET_EL=".gads-in-page-banner__content-cta";Qc.INCENTIVE_PILL=".gads-in-page-banner__image--pill"; | |
var Rc=["blue","green","grey","yellow"],Sc=class extends M{constructor(){super(...arguments);this.background_color="blue";this.image=null;this.headline=this.copy="";this.mobile_background_image=null;this.incentive_pill=this.target_scroll_class="";this.hide_image_on_mobile=!1;this._isReducedMotion=Ia.isReducedMotion;this._triggerEl=this.querySelector(Pc.TRIGGER_EL);this._targetEl=this.querySelector(Pc.TARGET_EL)}connectedCallback(){this.firstElementChild||this.replaceChildren(this.render());this._triggerEl= | |
this.querySelector(Pc.TRIGGER_EL);this._targetEl=this.querySelector(Pc.TARGET_EL);this.initTargetScroll()}attributeChangedCallback(a,b,c){a===Nc.INCENTIVE_PILL&&(a=this.querySelector(Pc.INCENTIVE_PILL))&&(a.innerHTML=c)}static get observedAttributes(){return[Nc.INCENTIVE_PILL]}get gtmModuleName(){return this.nodeName}get backgroundColor(){const a=this.getAttribute(w.BACKGROUND_COLOR)||this.background_color,b=Rc.find(c=>c===a.toLowerCase());if(b)return b;throw Error(`${this.nodeName} - Unsupported color. Please pick between: ${Rc}`); | |
}get imagesObj(){var a,b=this.getAttribute(w.IMAGE)||this.image;b="string"===typeof b?JSON.parse(k(b)):b;return(null===(a=null===b||void 0===b?void 0:b.image)||void 0===a?0:a.url)?b:null}get mobileBgsObj(){var a,b=this.getAttribute("mobile-bg-image")||this.mobile_background_image;b="string"===typeof b?JSON.parse(b):b;return(null===(a=null===b||void 0===b?void 0:b.image)||void 0===a?0:a.url)?b:null}get headlineText(){return this.getAttribute(w.HEADLINE)||this.headline}get copyText(){return this.getAttribute(w.COPY)|| | |
this.copy}get targetScrollClassText(){return this.getAttribute(Nc.TARGET_SCROLL_CLASS)||this.target_scroll_class}get incentivePill(){return this.getAttribute(Nc.INCENTIVE_PILL)||this.incentive_pill}get hideImageOnMobile(){const a=this.getAttribute(Nc.HIDE_IMAGE_ON_MOBILE);return a?"true"===a:this.hide_image_on_mobile}initTargetScroll(){if(this._targetEl&&this._triggerEl){const a=document.querySelector(`.${this._targetEl.dataset.target}`);a&&this._triggerEl.addEventListener(B.CLICK,()=>{const b=a.getBoundingClientRect().top; | |
window.scrollTo({top:b,behavior:this._isReducedMotion?G.AUTO:G.SMOOTH});const c=()=>{Math.floor(b)===Math.floor(window.scrollY)&&(a.focus(),window.removeEventListener(B.SCROLL,c))};window.addEventListener(B.SCROLL,c)})}}imageRender(){var a;return this.incentivePill?p` | |
<div class="gads-in-page-banner__image gads-in-page-banner__image--pill"> | |
${this.incentivePill} | |
</div> | |
`:this.imagesObj?p` | |
<gads-image class="gads-in-page-banner__image ${this.hideImageOnMobile?"gads-in-page-banner__image--hide-on-mobile":""}" alt-text="${this.imagesObj.aria_description}" image="${null===(a=this.imagesObj.image)||void 0===a?void 0:a.url}" ${this.imagesObj.has_transparency?w.HAS_TRANSPARENCY:""} widths="sm:80" lazy></gads-image> | |
`:""}ctaBlockRender(){return this.ctaBlock?this.targetScrollClassText?p` | |
<div class="gads-in-page-banner__content-cta" | |
data-target="${this.targetScrollClassText}"> | |
${this.ctaBlock} | |
</div> | |
`:p` | |
<div class="gads-in-page-banner__content-cta"> | |
${this.ctaBlock} | |
</div> | |
`:""}render(){var a,b,c;return m` | |
<section class="gads-in-page-banner glue-page glue-spacer-3-bottom glue-spacer-3-top ${(null===(b=null===(a=this.mobileBgsObj)||void 0===a?void 0:a.image)||void 0===b?0:b.url)?"mobile-alt-layout":""}"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-1"></div> | |
<div class="glue-grid__col glue-grid__col--span-10"> | |
<div class="gads-in-page-banner__content | |
gads-in-page-banner__bg-color--${this.backgroundColor} | |
${this.ctaBlock?"":"gads-in-page-banner__no-cta"}"> | |
${this.mobileBgsObj?p` | |
<div class="gads-in-page-banner__bg-image"> | |
<gads-image alt-text="${this.mobileBgsObj.aria_description}" image="${null===(c=this.mobileBgsObj.image)||void 0===c?void 0:c.url}" ${this.mobileBgsObj.has_transparency?w.HAS_TRANSPARENCY:""} widths="sm:172" lazy></gads-image> | |
</div>`:""} | |
<div class="gads-in-page-banner__content-main"> | |
${this.imageRender()} | |
<div class="gads-in-page-banner__content-text"> | |
<p class="glue-headline glue-headline--headline-5"> | |
${this.headlineText} | |
</p> | |
${this.copyText?p` | |
<p class="glue-font-smoothing"> | |
${this.copyText} | |
</p> | |
`:""} | |
</div> | |
</div> | |
${this.ctaBlockRender()} | |
</div> | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-in-page-banner",Sc);var Tc=class extends M{constructor(){super(...arguments);this.copy=this.headline=this.jumplink_id=this.eyebrow_color=this.eyebrow_label=this.eyebrow_icon_id=this.background_color="";this.card_type="list-card";this.cards=[]}get gtmModuleName(){return this.nodeName.toLowerCase()}get jumplinkId(){return this.getAttribute("jumplink-id")||this.jumplink_id}get headlineText(){return this.getAttribute(w.HEADLINE)||this.headline}get copyText(){return this.getAttribute(w.COPY)||this.copy}get eyebrowText(){return this.getAttribute("eyebrow-label")|| | |
this.eyebrow_label}get eyebrowIconId(){return this.getAttribute("eyebrow-icon-id")||this.eyebrow_icon_id}get eyebrowColor(){return this.getAttribute("eyebrow-color")||this.eyebrow_color}get cardType(){return this.getAttribute("card-type")||this.card_type}get backgroundVariation(){return this.getAttribute(w.BACKGROUND_COLOR)||this.background_color}get cardsList(){const a=this.getAttribute(w.CARDS)||this.cards;return a?"string"===typeof a?JSON.parse(k(a)):a:[]}glueGrids(){return{offsetCol:"list-card"=== | |
this.cardType?"glue-grid__col glue-grid__col--span-0-sm glue-grid__col--span-2 glue-grid__col--span-1-md glue-grid__col--span-2-xl":"glue-grid__col glue-grid__col--span-0-sm glue-grid__col--span-2 glue-grid__col--span-1-md glue-grid__col--span-1-xl",containerCol:"list-card"===this.cardType?"glue-grid__col glue-grid__col--span-8 glue-grid__col--span-10-md glue-grid__col--span-8-xl":"glue-grid__col glue-grid__col--span-8 glue-grid__col--span-12-md glue-grid__col--span-12-lg glue-grid__col--span-10-xl"}}render(){return m` | |
<section class="gads-jumplink-section gads-jumplink-section--${this.backgroundVariation}" id="${this.jumplinkId}"> | |
<div class="glue-page"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-0-sm glue-grid__col--span-2 glue-grid__col--span-1-md glue-grid__col--span-2-xl"></div> | |
<div class="glue-grid__col glue-grid__col--span-8 glue-grid__col--span-10-md glue-grid__col--span-8-xl"> | |
<div class="gads-jumplink-section__eyebrow-icon--container"> | |
<div class="gads-jumplink-section__eyebrow-icon--inner"> | |
<gads-icon icon-id="${this.eyebrowIconId}" class-names="gads-jumplink-section__eyebrow-icon glue-icon glue-icon--24px glue-icon--${this.eyebrowColor}" aria-hidden="true"></gads-icon> | |
<span class="gads-jumplink-section__eyebrow-icon--text gads-jumplink-section__eyebrow-icon--${this.eyebrowColor}">${this.eyebrowText}</span> | |
</div> | |
</div> | |
<h2 class="gads-jumplink-section__headline glue-headline glue-headline--headline-2 glue-text-center glue-spacer-2-bottom"> | |
<span class="glue-font-weight-medium">${this.headlineText}</span> | |
</h2> | |
<p class="gads-jumplink-section__copy glue-body--large glue-text-center glue-spacer-5-bottom"> | |
${this.copyText} | |
</p> | |
</div> | |
</div> | |
<div class="glue-grid"> | |
<div class="glue-grid__col ${this.glueGrids().offsetCol}"></div> | |
<div class="glue-grid__col ${this.glueGrids().containerCol}"> | |
<div class="gads-jumplink-section__list gads-jumplink-section__list--${this.cardType}"> | |
${this.cardsList?[...this.cardsList].map(a=>p` | |
<gads-jumplink-${this.cardType} | |
${a.time?`time="${a.time}"`:null} | |
${a.time_aria_label?`time-aria-label="${a.time_aria_label}"`:null} | |
headline="${a.card_heading}" | |
cta-url="${a.cta_url}" | |
cta-name="${a.gtm_cta_name}" | |
${a.cta_label?`cta-label="${a.cta_label}"`:null} | |
${a.cta_aria_description?`cta-aria-description="${a.cta_aria_description}"`:null} | |
module-name="${this.gtmModuleName}" | |
label="${a.label}" | |
${a.video_thumbnail?`video-thumbnail="${g(JSON.stringify(a.video_thumbnail))}"`:null} | |
${a.video_thumbnail_aria_description?`video-thumbnail-aria="${a.video_thumbnail_aria_description}"`:null}> | |
</gads-jumplink-${this.cardType}> | |
`):""} | |
</div> | |
</div> | |
</div> | |
${this.ctaBlock?p` <div class="cta-container glue-text-center glue-spacer-5-top">${this.ctaBlock}</div>`:""} | |
</div> | |
</section> | |
`}};customElements.define("gads-jump-link-section",Tc);var Uc=(a="")=>(null===a||void 0===a?0:a.match(/https?:\/\/.*?google\.*?com/))?'target="_blank" rel="noopener noreferrer"':(null===a||void 0===a?0:a.match(/https?:\/\//))?'target="_blank" rel="noopener noreferrer nofollow"':"",Vc=a=>{var b;return a?(a=null===(b=a.split("/home/")[1])||void 0===b?void 0:b.split("/").join("-").slice(0,-1))?a:"overview":""},Xc=(a,b,c,d,e=null)=>p` | |
<div class="glue-header__container"> | |
<div class="glue-header__lock-up"> | |
${"desktop"===a?p` | |
<button class="mobile-close-nav-btn" aria-label="${null===d||void 0===d?void 0:d.aria_close_nav_drawer}"> | |
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="presentation"> | |
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z" fill="#202124"/> | |
</svg> | |
</button> | |
`:""} | |
${"mobile"===a?p` | |
<div class="glue-header__hamburger"> | |
<button class="glue-header__drawer-toggle-btn" aria-label="${null===d||void 0===d?void 0:d.aria_open_nav_drawer}"> | |
<svg class="glue-icon glue-icon--24px" role="presentation" aria-hidden="true" viewBox="0 0 24 24"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"></path></svg> | |
</button> | |
</div> | |
`:""} | |
<div class="glue-header__logo"> | |
<a class="glue-header__logo-link" href="${c}" title="Google ${b}"> | |
${p` | |
<div class="glue-header__logo-container"> | |
<svg class="glue-header__logo-svg" role="presentation" aria-hidden="true" viewBox="0 0 74 24"><path fill="#4285F4" d="M9.24 8.19v2.46h5.88c-.18 1.38-.64 2.39-1.34 3.1-.86.86-2.2 1.8-4.54 1.8-3.62 0-6.45-2.92-6.45-6.54s2.83-6.54 6.45-6.54c1.95 0 3.38.77 4.43 1.76L15.4 2.5C13.94 1.08 11.98 0 9.24 0 4.28 0 .11 4.04.11 9s4.17 9 9.13 9c2.68 0 4.7-.88 6.28-2.52 1.62-1.62 2.13-3.91 2.13-5.75 0-.57-.04-1.1-.13-1.54H9.24z"></path><path fill="#EA4335" d="M25 6.19c-3.21 0-5.83 2.44-5.83 5.81 0 3.34 2.62 5.81 5.83 5.81s5.83-2.46 5.83-5.81c0-3.37-2.62-5.81-5.83-5.81zm0 9.33c-1.76 0-3.28-1.45-3.28-3.52 0-2.09 1.52-3.52 3.28-3.52s3.28 1.43 3.28 3.52c0 2.07-1.52 3.52-3.28 3.52z"></path><path fill="#4285F4" d="M53.58 7.49h-.09c-.57-.68-1.67-1.3-3.06-1.3C47.53 6.19 45 8.72 45 12c0 3.26 2.53 5.81 5.43 5.81 1.39 0 2.49-.62 3.06-1.32h.09v.81c0 2.22-1.19 3.41-3.1 3.41-1.56 0-2.53-1.12-2.93-2.07l-2.22.92c.64 1.54 2.33 3.43 5.15 3.43 2.99 0 5.52-1.76 5.52-6.05V6.49h-2.42v1zm-2.93 8.03c-1.76 0-3.1-1.5-3.1-3.52 0-2.05 1.34-3.52 3.1-3.52 1.74 0 3.1 1.5 3.1 3.54.01 2.03-1.36 3.5-3.1 3.5z"></path><path fill="#FBBC05" d="M38 6.19c-3.21 0-5.83 2.44-5.83 5.81 0 3.34 2.62 5.81 5.83 5.81s5.83-2.46 5.83-5.81c0-3.37-2.62-5.81-5.83-5.81zm0 9.33c-1.76 0-3.28-1.45-3.28-3.52 0-2.09 1.52-3.52 3.28-3.52s3.28 1.43 3.28 3.52c0 2.07-1.52 3.52-3.28 3.52z"></path><path fill="#34A853" d="M58 .24h2.51v17.57H58z"></path><path fill="#EA4335" d="M68.26 15.52c-1.3 0-2.22-.59-2.82-1.76l7.77-3.21-.26-.66c-.48-1.3-1.96-3.7-4.97-3.7-2.99 0-5.48 2.35-5.48 5.81 0 3.26 2.46 5.81 5.76 5.81 2.66 0 4.2-1.63 4.84-2.57l-1.98-1.32c-.66.96-1.56 1.6-2.86 1.6zm-.18-7.15c1.03 0 1.91.53 2.2 1.28l-5.25 2.17c0-2.44 1.73-3.45 3.05-3.45z"></path></svg> | |
</div> | |
`} | |
<span class="glue-header__logo--product" aria-hidden="true">${b}</span> | |
</a> | |
</div> | |
${e&&"mobile"===a?Wc(e,a):""} | |
</div> | |
</div> | |
`,Yc=(a,b="desktop",c=null)=>p` | |
<div class="gads-mega-nav-cta-container glue-header__container${"desktop"===b?" glue-header__container--cta":""}"> | |
<div class="glue-header__cta"> | |
${a.ctaBlock} | |
${a.disclaimer?p` | |
<div class="header-phone-number__rollover"> | |
<span class="glue-font-weight-medium">${a.disclaimer}</span> | |
</div> | |
`:""} | |
${c&&"desktop"===b?Wc(c,b):""} | |
</div> | |
</div> | |
`,bd=(a,b,c)=>p` | |
<ul class="glue-header__list glue-header__list--nested glue-header__deep-nav"> | |
${a.subcategories.map(d=>{const e=Zc(d.heading_link,b);return p` | |
${d.heading&&!d.heading.startsWith("{")?p` | |
<li class="glue-header__item l2-link ${e?"glue-header__item--active glue-header--is-active":""}"> | |
<a class="glue-header__link glue-headline glue-headline--headline-6${!d.links.length||d.links.some(f=>f.has_arrow)?" l2-link-no-nested":""}" | |
href="${d.heading_link||"#"}" | |
data-g-cta-name="${Vc(d.heading_link)}" | |
data-g-module-name="gads-mega-nav" | |
${e?'aria-current="page"':""}> | |
${d.heading} | |
${!d.links.length||d.links.some(f=>f.has_arrow)?p` | |
<svg width="16" height="12" role="presentation" aria-hidden="true" class="glue-icon glue-icon--18px" viewBox="0 0 16 12" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
<path d="M10 0L8.59 1.41L12.17 5H0V7H12.17L8.59 10.59L10 12L16 6L10 0Z" fill="#202124"/> | |
</svg> | |
`:""} | |
</a> | |
${d.heading_link_additional_text?p`<p class="l2-additional-text">${d.heading_link_additional_text}</p>`:""} | |
</li> | |
`:""} | |
${d.links.length?p` | |
${d.links.map(f=>{var h,l;const n=Zc(f.cta_url,b,c),t=(null===c||void 0===c?void 0:c.parent_url)&&(null===(h=f.cta_url)||void 0===h?void 0:h.endsWith(c.parent_url));return f.cta_text?p` | |
<li class="glue-header__item ${n?"glue-header__item--active glue-header--is-active":""}${f.has_arrow?" l2-link":""}"> | |
<a class="glue-header__link l3-link${f.has_arrow?" glue-headline glue-headline--headline-6 l2-link-no-nested l3-link--has-arrow":""}" | |
href="${t?"#":f.cta_url}" | |
data-g-cta-name="${Vc(f.cta_url)}" | |
data-g-module-name="gads-mega-nav" | |
${n?'aria-current="page"':""}> | |
${f.cta_text} | |
</a> | |
${t&&(null===(l=c.links)||void 0===l?0:l.length)?$c(c.links,b):""} | |
</li> | |
`:""})} | |
`:""} | |
`})} | |
${a.featured_items.length?ad(a):""} | |
</ul> | |
`,cd=(a,b,c)=>p` | |
<div class="desktop-nav-panels-wrapper"> | |
${Object.keys(a).map(d=>{const e=a[d];return e.subcategories.length?p` | |
<div class="desktop-nav-panel" data-nav-panel-index="${d}" id="nav-panel-index-${d}" role="menu" aria-label="${e.category_name}"> | |
<div class="links-panel"> | |
<div class="category-heading"> | |
<h5 class="glue-headline glue-headline--headline-5" aria-hidden="true">${e.category_name}</h5> | |
</div> | |
<div class="subcategory-wrapper"> | |
${e.subcategories.map(f=>{const h=Zc(f.heading_link,b);return p` | |
<div class="subcategory"> | |
${f.heading&&!f.heading.startsWith("{")?p`<div class="subcategory-heading${h?" glue-header__item--active glue-header--is-active":""}"> | |
${f.heading_link?p` | |
<a class="glue-headline glue-headline--headline-6 cat-heading cat-heading-link" | |
${h?'aria-current="page"':""} | |
href="${f.heading_link}" | |
data-g-cta-name="${Vc(f.heading_link)}" | |
data-g-module-name="gads-mega-nav" | |
${f.heading_link_additional_text?`aria-label="${f.heading}. ${f.heading_link_additional_text}."`:""}> | |
${f.heading} | |
<svg width="16" height="12" role="presentation" aria-hidden="true" class="glue-icon glue-icon--18px" viewBox="0 0 16 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 0L8.59 1.41L12.17 5H0V7H12.17L8.59 10.59L10 12L16 6L10 0Z" fill="currentColor"/></svg> | |
</a> | |
`:p` | |
<p class="glue-headline glue-headline--headline-6 cat-heading">${f.heading}</p> | |
`} | |
<span aria-hidden="true"> | |
${f.heading_link_additional_text?p`<p class="l2-additional-text">${f.heading_link_additional_text}</p>`:""} | |
</span> | |
</div>`:""} | |
<div class="subcategory-links"> | |
${f.links.map(l=>{const n=Zc(l.cta_url,b,c);return l.cta_text?p` | |
<a href="${l.cta_url}" | |
role="menuitem" | |
class="sub-cat-link${n?" sub-cat-link-active":""}${l.has_arrow?" glue-headline glue-headline--headline-6 cat-heading cat-heading-link sub-cat-link--has-arrow":""}" | |
data-g-cta-name="${Vc(l.cta_url)}" | |
data-g-module-name="gads-mega-nav" | |
${n?'aria-current="page"':""}> | |
${l.cta_text} | |
${l.has_arrow?p` | |
<svg width="16" height="12" role="presentation" aria-hidden="true" class="glue-icon glue-icon--18px" viewBox="0 0 16 12" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
<path d="M10 0L8.59 1.41L12.17 5H0V7H12.17L8.59 10.59L10 12L16 6L10 0Z" fill="currentColor"/> | |
</svg> | |
`:null} | |
</a> | |
`:""})} | |
</div> | |
</div> | |
`})} | |
</div> | |
</div> | |
${e.featured_items.length?ad(e):""} | |
</div> | |
`:""})} | |
</div> | |
`,ad=a=>p` | |
<div class="glue-header__item featured-item featured-item-${a.featured_background_color}"> | |
${a.featured_image.image?p` | |
<gads-image | |
class="featured-image" | |
image="${a.featured_image.image.url}" | |
widths="lg:317" | |
alt-text="${a.featured_image.aria_description}" | |
${a.featured_image.has_transparency?w.HAS_TRANSPARENCY:""}> | |
</gads-image>`:""} | |
<div class="featured-item-headline-wrapper glue-spacer-2-bottom glue-spacer-2-top"> | |
<span class="featured-item-headline glue-headline glue-headline--headline-5">${a.featured_headline}</span> | |
</div> | |
${a.featured_items.map(b=>p` | |
<a href="${b.featured_link_url}" class="glue-headline glue-headline--headline-6 glue-spacer-2-bottom glue-spacer-1-top featured-item-link-title"> | |
${b.featured_link_text} | |
<svg width="16" height="12" role="presentation" aria-hidden="true" class="glue-icon" viewBox="0 0 16 12" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M10 0L8.59 1.41L12.17 5H0V7H12.17L8.59 10.59L10 12L16 6L10 0Z" fill="currentColor"/></svg> | |
</a> | |
<p class="featured-body-copy glue-spacer-2-bottom">${b.featured_body_copy}</p> | |
`)} | |
</div> | |
`,Zc=(a,b,c)=>{b=!(null===a||void 0===a||!a.endsWith(b));a=!!((null===c||void 0===c?0:c.parent_url)&&(null===a||void 0===a?0:a.endsWith(c.parent_url)));return b||a},dd=({subcategories:a},b)=>{if(!a)return!1;const c=b.includes("/home/resources/")?"/home/resources/":b;return(b=a.some(d=>{var e;return null===(e=d.heading_link)||void 0===e?void 0:e.endsWith(c)}))?b:a.some(d=>d.links.length&&d.links.some(e=>{var f;return null===(f=e.cta_url)||void 0===f?void 0:f.endsWith(c)}))},ed=({sub_links:a},b)=> | |
(null===a||void 0===a?void 0:a.some(c=>{var d;return null===(d=c.cta_url)||void 0===d?void 0:d.endsWith(b)}))||!1,fd=(a,b,c,d)=>p` | |
<div class="glue-header__container glue-header__container--linkbar"> | |
<nav class="glue-header__link-bar" aria-label="${b}"> | |
<ul class="glue-header__list"> | |
${null===d||void 0===d||!d.links||(null===d||void 0===d?0:d.campaign_name)&&d.campaign_image?null:p` | |
<li class="glue-header__item glue-header--is-active tier-2-desktop-bar"> | |
<a class="glue-header__link tier-2-parent-false-link" href="#" tabindex="-1"></a> | |
${$c(d.links,c,!0)} | |
</li> | |
`} | |
${Object.keys(a).map((e,f)=>{const h=a[e],l=h.subcategories.length,n=h.category_link,t=Zc(n,c),u=!d&&dd(h,c),q=(null===d||void 0===d?void 0:d.parent_url)&&dd(h,d.parent_url);return p` | |
<li class="glue-header__item | |
${t||u?" glue-header__item--active glue-header--is-active":""} | |
${q?" tier-2-active-parent":""}"> | |
<a class="glue-header__link glue-headline glue-headline--headline-5 initial-links${l?" has-nested-links":""}" | |
href="${l?"#":n}" | |
title="${h.category_name}" | |
${!l&&(null===n||void 0===n?0:n.match("http"))?'target="_blank" rel="noopener noreferrer"':""} | |
${l?` | |
data-deep-nav-index="${e}" | |
aria-haspopup="menu" | |
aria-controls="nav-panel-index-${f}" | |
`:` | |
data-g-cta-name="${Vc(n)}" | |
data-g-module-name="gads-mega-nav" | |
`} | |
${t?'aria-current="page"':""}> | |
${h.category_name} | |
${l?'<span class="arrow"></span>':""} | |
</a> | |
${l?bd(h,c,d):null} | |
</li> | |
`})} | |
</ul> | |
</nav> | |
</div> | |
`,$c=(a,b,c=!1)=>p` | |
<ul class="glue-header__list ${c?"tier-2-list glue-header__list--nested glue-header__deep-nav":""}" role="menu"> | |
${a.map(d=>{if(d.cta_text){var e=ed(d,b);const f=d.cta_url?Zc(d.cta_url,b):!1,h=d.sub_links&&d.sub_links.length;e=e?"glue-header--is-active glue-header__item--active":f?"glue-header__item--active":"";return p` | |
<li class="glue-header__item ${e}" role="none"> | |
<a class="glue-header__link ${h?"has-nested-links":""}" | |
href="${d.cta_url&&!h?d.cta_url:"#"}" role="menuitem" | |
${!h&&d.cta_url?` | |
data-g-cta-name="${Vc(d.cta_url)}" | |
data-g-module-name="gads-mega-nav-tier-2" | |
`:null} | |
${d.cta_url?Uc(d.cta_url):null} | |
${h?'aria-expanded="false"':""}> | |
${d.cta_text} | |
${h?'<span class="arrow"></span>':""} | |
</a> | |
${h&&d.sub_links?$c(d.sub_links,b):""} | |
</li> | |
`}return""}).join("")} | |
</ul> | |
`,Wc=(a,b)=>a.isV2?p` | |
<gads-single-sign-on-v2 | |
${a.adsAccountStatus?`ads-account-status="${g(JSON.stringify(a.adsAccountStatus))}"`:null} | |
cta='${a.cardCta}' | |
cta-sign-in='${a.signIn}' | |
cta-start-now='${a.startNow}' | |
logged-in-url='${a.loggedInUrl}' | |
mock-api-data='${a.mockApi}' | |
${a.modal?`modal="${g(JSON.stringify(a.modal))}"`:null} | |
module-name='${a.moduleName}' | |
profile-alt-text='${a.profileAltText}' | |
profile-cta-name='${a.profileCtaName}' | |
profile-image-placeholder='${a.profileImageBuildPlaceholder}' | |
type='${b}'> | |
</gads-single-sign-on-v2> | |
`:p` | |
<gads-single-sign-on | |
cta='${a.cardCta}' | |
cta-sign-in='${a.signIn}' | |
cta-start-now='${a.startNow}' | |
logged-in-url='${a.loggedInUrl}' | |
mock-api-data='${a.mockApi}' | |
module-name='${a.moduleName}' | |
profile-alt-text='${a.profileAltText}' | |
profile-cta-name='${a.profileCtaName}' | |
profile-image-placeholder='${a.profileImageBuildPlaceholder}' | |
type='${b}'> | |
</gads-single-sign-on> | |
`,gd=(a,b)=>{var c,d,e;return a?p` | |
<div class="gads-mega-nav__subnav"> | |
<div class="gads-mega-nav__subnav-campaign-container"> | |
${(null===(d=null===(c=a.campaign_image)||void 0===c?void 0:c.image)||void 0===d?0:d.url)?p` | |
<gads-image | |
aria-hidden="true" | |
image="${a.campaign_image.image.url}" | |
role="presentation" | |
widths="sm:20"> | |
</gads-image> | |
`:null} | |
${a.campaign_name?p` | |
<span class="gads-mega-nav__subnav-campaign-name"> | |
${a.campaign_name} | |
</span> | |
`:null} | |
</div> | |
${(null===(e=a.links)||void 0===e?0:e.length)?p` | |
<ul class="glue-header__list"> | |
${a.links.map(f=>{if(!f.cta_url)return null;const h=Zc(f.cta_url,b)?" gads-mega-nav__subnav-link--is-active":null;return p` | |
<li class="glue-header__item"> | |
<a class="glue-header__link${h}" | |
href="${f.cta_url}" | |
${Uc(f.cta_url)} | |
data-g-cta-name="${Vc(f.cta_url)}" | |
data-g-module-name="gads-mega-nav-tier-2"> | |
${f.cta_text} | |
</a> | |
</li> | |
`})} | |
</ul> | |
`:null} | |
</div> | |
`:null};var hd="sunday monday tuesday wednesday thursday friday saturday".split(" "),id=class{constructor(){this.officeOpen=!0;this.etoContent=null;this.etoButtons=[];this.scheduleButtons=[];this.excludedModules=["gads-contact-hub"]}isOfficeOpen(){this.etoButtons=document.querySelectorAll("[data-g-cta-name='tfn']");this.scheduleButtons=document.querySelectorAll("[data-g-cta-name='schedulemeeting']");var a=document.getElementsByTagName("header")[0].getAttribute(w.OFFICE_HOURS);this.etoContent=a?JSON.parse(k(a)): | |
null;if(!(this.etoContent&&this.etoContent.open_hour&&this.etoContent.close_hour&&this.etoContent.open_days.length))return!0;var b=new Date,c=b.getTimezoneOffset()/60+this.etoContent.gmt_offset;const d=b.getHours();var e=new Date(b.setHours(d+(0<c?Math.floor(c):Math.ceil(c))));a=e.getTime();e=e.getDay();if(!this.etoContent.open_days.includes(hd[e]))return!1;let f;var h=e=null;if(this.etoContent.dst_start&&this.etoContent.dst_end){h=this.etoContent.dst_start.split("-");const l=this.etoContent.dst_end.split("-"); | |
e=new Date(a);e.setMonth(Number(h[1])-1);e.setDate(Number(h[2]));e.setHours(2);e.setMinutes(0);e=e.getTime();f=new Date(a);Number(l[1])<Number(h[1])&&f.setFullYear(Number(h[0])+1);f.setMonth(Number(l[1])-1);f.setDate(Number(l[2]));f.setHours(2);f.setMinutes(0);h=f.getTime()}e&&h&&a>e&&a<h&&(e=new Date(b.setHours(d+c+1)),a=e.getTime());b=new Date(a);c=new Date(a);b.setHours(this.etoContent.open_hour);c.setHours(this.etoContent.close_hour);b.setMinutes(this.etoContent.open_minute);c.setMinutes(this.etoContent.close_minute); | |
b.setSeconds(0);c.setSeconds(0);return a>b.getTime()&&a<c.getTime()}checkButtons(a){const b=!a;var c=document.getElementsByTagName("gads-contact-hub")[0];c=null===c||void 0===c?void 0:c.querySelector("[data-bm-widget-agent-id]");for(const d of this.scheduleButtons)d.classList.toggle(A.HIDDEN,!b&&this.shouldHideButton(d));for(const d of this.etoButtons)d.classList.toggle(A.HIDDEN,b&&this.shouldHideButton(d));if(!a&&c){if(null!==document.querySelector("gads-ads-guide"))return;c.classList.add(w.DISABLED)}this.checkSimpleEndCap()}displayContactButtons(){this.officeOpen= | |
this.isOfficeOpen();this.checkButtons(this.officeOpen);document.addEventListener(B.CHATBOT_LOADED,()=>{this.officeOpen=this.isOfficeOpen();this.checkButtons(this.officeOpen)})}shouldHideButton(a){a=a.getAttribute("data-g-module-name")||"";return!this.excludedModules.includes(a)}checkSimpleEndCap(){const a=document.querySelector("gads-simple-end-cap");var b=null===a||void 0===a?void 0:a.getElementsByClassName("glue-button");b=b?Array.from(b):[];return b.length?b.every(c=>c.classList.contains(A.HIDDEN))&& | |
(null===a||void 0===a?void 0:a.classList.add(A.HIDDEN)):!1}},jd=new id;var kd=class extends M{constructor(){super(...arguments);this.content_jump_text=this.categories_aria_label=this.categories="";this.cta_sticky=null;this.eto_number=this.eto_disclaimer="";this.hide_on_scroll=!1;this.homepage_url="";this.navigation_aria_labels=null;this.office_hours=this.product=this.parent_menu_aria="";this.single_sign_on=null;this.tier_2={};this.pageShader=this.querySelector(".page-shader");this.mainNavLinks=this.querySelectorAll(".initial-links");this.panelCache=[];this.headerEl= | |
this.querySelector(".glue-header");this.glueNav=null;this.tier2DesktopBar=this.querySelector(".tier-2-desktop-bar")}connectedCallback(){var a;this.headerEl||(this.replaceChildren(this.render()),this.headerEl=this.querySelector(".glue-header"),this.pageShader=this.querySelector(".page-shader"),this.mainNavLinks=this.querySelectorAll(".initial-links"),this.tier2DesktopBar=this.querySelector(".tier-2-desktop-bar"));const b=null===(a=this.headerEl)||void 0===a?void 0:a.hasAttribute("hide-on-scroll"); | |
if(r.GLUE in window&&this.headerEl){this.glueNav=new glue.Header(this.headerEl,{hideOnScroll:b,steppedNav:!0});this.tier2DesktopBar&&this.tier2DesktopBar.parentNode&&this.tier2DesktopBar.parentNode.appendChild(this.tier2DesktopBar);this.querySelectorAll('[href="#"]').forEach(d=>{d.addEventListener(B.CLICK,e=>e.preventDefault())});(a=this.querySelector(".mobile-close-nav-btn"))&&a.addEventListener(B.CLICK,()=>{this.glueNav&&this.glueNav.drawer.close()});a=window.matchMedia(this.getMediaBreakpoint(v.LG)); | |
const c=d=>{this.desktopNavPanelHandler(d)};this.addEventListener(B.KEYUP,d=>{d.code===F.ESCAPE&&c(d)});a.matches&&(this.mainNavLinks.forEach(d=>{d.addEventListener(B.CLICK,c);this.setExpandedAttribute(d)}),this.pageShader.addEventListener(B.CLICK,c));a.onchange=d=>{d.matches?(this.querySelector(`.${"desktop-nav-panel"}.${A.SHOW}`)&&this.pageShader.classList.add("nav-open"),this.mainNavLinks.forEach(e=>{e.addEventListener(B.CLICK,c);this.pageShader.addEventListener(B.CLICK,c);this.setExpandedAttribute(e)})): | |
(this.pageShader.classList.remove("nav-open"),this.mainNavLinks.forEach(e=>{e.removeEventListener(B.CLICK,c);this.pageShader.removeEventListener(B.CLICK,c);this.setExpandedAttribute(e,!1)}))};(new ResizeObserver(()=>{this.checkPanelHeightOverflow()})).observe(this.headerEl);this.glueNav.root.addEventListener(B.GLUE_HEADER_HIDE,()=>{const d=new Event(B.GADS_HEADER_HIDE);document.dispatchEvent(d)})}jd.displayContactButtons()}setExpandedAttribute(a,b=!0){a.classList.contains("has-nested-links")&&(b? | |
a.setAttribute(w.ARIA_EXPANDED,"false"):a.removeAttribute(w.ARIA_EXPANDED))}checkPanelHeightOverflow(){for(const a of this.panelCache){const b=window.innerHeight;a.offsetHeight+96>b?(a.classList.add("overflow-height"),a.style.setProperty("--variable-height",`${b-48}px`)):(a.classList.remove("overflow-height"),a.style.removeProperty("--variable-height"))}}desktopNavPanelHandler(a){const b=a.currentTarget;b.classList.contains("has-nested-links")&&a.preventDefault();a=this.querySelector(`[data-nav-panel-index="${b.dataset.deepNavIndex}"]`); | |
var c=this.querySelector(`.${"desktop-nav-panel"}.${A.SHOW}`);if(c&&c!==a){c.classList.remove(A.SHOW);if(c=c.previousElementSibling)c.classList.remove(A.ACTIVE),c.setAttribute(w.ARIA_EXPANDED,"false");this.pageShader.classList.remove("nav-open");document.body.classList.remove(A.NO_SCROLL);this.checkPanelHeightOverflow()}c=b.nextElementSibling;(null===c||void 0===c?0:c.classList.contains("desktop-nav-panel"))?(c.classList.toggle(A.SHOW),b.setAttribute(w.ARIA_EXPANDED,`${"true"!==b.ariaExpanded}`), | |
this.pageShader.classList.toggle("nav-open"),document.body.classList.toggle(A.NO_SCROLL),this.checkPanelHeightOverflow()):a&&(a=null===a||void 0===a?void 0:a.cloneNode(!0),this.panelCache.push(a),b.insertAdjacentElement("afterend",a),this.checkPanelHeightOverflow(),a.classList.add(A.SHOW),document.body.classList.add(A.NO_SCROLL),this.pageShader.classList.add("nav-open"),b.setAttribute(w.ARIA_EXPANDED,"true"));b.classList.toggle(A.ACTIVE)}get contentJumpText(){return this.getAttribute("content-jump-text")|| | |
this.content_jump_text}get categoryData(){var a=this.getAttribute("categories")||this.categories;a="string"===typeof a?JSON.parse(k(a)):a;for(const c of a){c.category_link&&(c.category_link=this.relativizeKintaroLink(c.category_link));var b=c.subcategories;if(b.length)for(const d of b)if(d.heading_link&&(d.heading_link=this.relativizeKintaroLink(d.heading_link)),b=d.links,b.length)for(const e of b)e.cta_url&&(e.cta_url=this.relativizeKintaroLink(e.cta_url))}return a}get categoryAriaLabel(){return this.getAttribute("categories-aria-label")|| | |
this.categories_aria_label}get gtmModuleName(){return this.nodeName}get hideOnScroll(){const a=this.getAttribute("hide-on-scroll")||this.hide_on_scroll;return"boolean"===typeof a?a:"true"===a}get homepageUrl(){return this.relativizeKintaroLink(this.getAttribute("homepage-url")||this.homepage_url)}get navCtaInfo(){const a=this.getAttribute("eto-number")||this.eto_number;return{ctaBlock:this.ctaBlock,disclaimer:this.getAttribute("eto-disclaimer")||this.eto_disclaimer,tel:a,tel_formatted:this.formatEto(a)|| | |
""}}get parentMenuAria(){return this.getAttribute("parent-menu-aria")||this.parent_menu_aria}get productName(){return this.getAttribute("product")||this.product}get officeHours(){return this.getAttribute(w.OFFICE_HOURS)||this.office_hours}get navigationAriaLabels(){const a=this.navigation_aria_labels||this.getAttribute(w.NAVIGATION_ARIA_LABELS);return"string"===typeof a?JSON.parse(k(a)):a}get singleSignOn(){const a=this.getAttribute("single-sign-on");return a?JSON.parse(k(a)):this.single_sign_on|| | |
null}get ssoCardCta(){var a;return(null===(a=this.singleSignOn)||void 0===a?0:a.cta)?g(JSON.stringify(this.singleSignOn.cta)):null}get ssoMockApi(){var a;return(null===(a=this.singleSignOn)||void 0===a?0:a.mock_api_data)?g(JSON.stringify(this.singleSignOn.mock_api_data)):null}get ssoNavCta(){var a;return(null===(a=this.singleSignOn)||void 0===a?0:a.nav_cta)?g(JSON.stringify(this.singleSignOn.nav_cta)):null}get ssoProfileAltText(){var a;return(null===(a=this.singleSignOn)||void 0===a?void 0:a.profile_alt_text)|| | |
null}get ssoProfileCtaName(){var a;return(null===(a=this.singleSignOn)||void 0===a?void 0:a.profile_cta_name)||null}get ssoImageBuildPlaceholder(){var a,b;return(null===(b=null===(a=this.singleSignOn)||void 0===a?void 0:a.profile_image_placeholder)||void 0===b?void 0:b.url)||null}get ssoLoggedInUrl(){var a;return(null===(a=this.singleSignOn)||void 0===a?void 0:a.logged_in_url)||null}get ssoInfo(){if(!this.singleSignOn)return null;let a={signIn:this.getCtaByGtmName(E.SIGNIN),startNow:this.getCtaByGtmName(E.STARTNOW), | |
cardCta:this.ssoCardCta,mockApi:this.ssoMockApi,profileAltText:this.ssoProfileAltText,profileCtaName:this.ssoProfileCtaName,profileImageBuildPlaceholder:this.ssoImageBuildPlaceholder,loggedInUrl:this.ssoLoggedInUrl,moduleName:this.gtmModuleName};"is_v2"in this.singleSignOn&&(a={...a,adsAccountStatus:this.singleSignOn.ads_account_status,modal:this.singleSignOn.modal,isV2:!0});return a}get stickyCTA(){var a=this.getAttribute("cta-sticky")||this.cta_sticky;if(a){a="string"===typeof a?JSON.parse(k(a)): | |
a;const b="string"===typeof a.cta?JSON.parse(k(a.cta)):a.cta;return b?{cta:b,is_sticky:a.is_sticky}:null}return null}get tier2(){var a,b=this.getAttribute("tier-2")||this.tier_2;if(!b)return null;b="string"===typeof b?JSON.parse(k(b)):b;if(null===(a=b.links)||void 0===a||!a.length)return null;for(const c of b.links)if(c.cta_url&&(c.cta_url=this.relativizeKintaroLink(c.cta_url)),a=c.sub_links,null===a||void 0===a?0:a.length)for(const d of a)d.cta_url&&(d.cta_url=this.relativizeKintaroLink(d.cta_url)); | |
return b}render(){const a=this.tier2;var b=g(JSON.stringify(this.officeHours)),c=this.hideOnScroll?"hide-on-scroll":null,d=p` | |
<a href="#main-page-content" class="glue-header__link glue-header__skip-content"> | |
${this.contentJumpText} | |
</a> | |
`,e=Xc("mobile",this.productName,this.homepageUrl,this.navigationAriaLabels,this.ssoInfo),f=Yc(this.navCtaInfo,"mobile"),h=Xc("desktop",this.productName,this.homepageUrl,this.navigationAriaLabels),l=p` | |
<div class="glue-header__container glue-header__stepped-nav"> | |
<div class="glue-header__stepped-nav-controls-container"> | |
<div class="glue-header__stepped-nav-controls" data-glue-steppednav-label="${this.parentMenuAria}"> | |
<div class="glue-header__stepped-nav-controls-arrow"> | |
<svg role="presentation" aria-hidden="true" class="glue-icon glue-icon--18px" viewBox="0 0 24 24"><path d="M16.41 5.41L15 4l-8 8 8 8 1.41-1.41L9.83 12"></path></svg> | |
<svg role="presentation" aria-hidden="true" class="glue-icon glue-icon--18px glue-header__stepped-nav-subnav-icon" viewBox="0 0 24 24"><path d="M7.59 18.59L9 20l8-8-8-8-1.41 1.41L14.17 12"></path></svg> | |
</div> | |
<div class="glue-header__stepped-nav-controls-title glue-header__link glue-headline glue-headline--headline-5"></div> | |
</div> | |
</div> | |
<div class="glue-header__stepped-nav-menus"></div> | |
</div> | |
`,n=fd(this.categoryData,this.categoryAriaLabel,this.url,a),t=Yc(this.navCtaInfo,"desktop",this.ssoInfo),u=(null===a||void 0===a?0:a.campaign_image)&&a.campaign_name?gd(this.tier2,this.url):null,q=cd(this.categoryData,this.url,a);var y=(y=this.stickyCTA)?p` | |
<gads-sticky-cta | |
cta="${g(JSON.stringify(y.cta))}" | |
is-sticky="${y.is_sticky}"> | |
</gads-sticky-cta>`:"";return m` | |
<header class="glue-header ${a?"glue-header--double":"glue-header--single"}" | |
office-hours="${b}" | |
${c}> | |
${d} | |
<div class="glue-header__bar glue-header__bar--mobile"> | |
<div class="glue-header__tier"> | |
${e} | |
${f} | |
</div> | |
</div> | |
<div class="glue-header__bar glue-header__bar--desktop glue-header__drawer"> | |
<div class="glue-header__tier"> | |
${h} | |
${l} | |
${n} | |
${t} | |
${u} | |
</div> | |
</div> | |
<div class="glue-header__drawer-backdrop"></div> | |
</header> | |
${q} | |
<div class="page-shader"></div> | |
${y} | |
`}};customElements.define("gads-mega-nav",kd);var ld={CLOSE_NAV:".mobile-close-nav-btn",GLUE_HEADER_LINK:".glue-header__link",HASH_LINKS:'[href="#"]',HEADER:".glue-header",ITEM_HAS_SUBLINKS:".item-has-sublinks",MAIN_NAV_LINKS:".glue-header__link-bar .glue-header__link.initial-links",MAIN_NAV_SUBLINKS:".subcategory-link",MEGANAV_SUBNAV:".meganav-subnav",STACKED_HEADER_LAYOUT:".stacked-header-layout",SUBNAV_DESKTOP_BAR:".subnav-desktop-bar",SUBNAV_LIST:".subnav-list"},md={ARIA_CONTROLS:"aria-controls",CATEGORIES_ARIA_LABEL:"categories-aria-label", | |
CONTENT_JUMP:"content-jump-text",CTA_STICKY:"cta-sticky",DATA:"categories",ETO_DISCLAIMER:"eto-disclaimer",ETO_NUMBER:"eto-number",HOMEPAGE:"homepage-url",IS_STACKED_LAYOUT:"is-stacked-layout",MENU_ARIA:"parent-menu-aria",PRODUCT:"product",SINGLE_SIGN_ON:"single-sign-on",SMALL_FONT_TREATMENT:"small-font-treatment"},X={DESKTOP_PANEL:"desktop-nav-panel",FIXED:"fixed",HAS_NESTED_LINKS:"has-nested-links",IS_SCROLLING:"is-scrolling",NAV_OPEN:"nav-open",OVERFLOW_HEIGHT:"overflow-height",PAGE_SHADER:"page-shader", | |
POSITION_FIXED:"position-fixed",POSITION_RELATIVE:"position-relative"},nd={VARIABLE_HEIGHT:"--variable-height"},od={DESKTOP:"desktop",MOBILE:"mobile"},pd={BACKWARDS:"backwards",FORWARD:"forward"},qd=class extends M{constructor(){super(...arguments);this.categories=[];this.subNav=this.single_sign_on=this.office_hours=this.product=this.parent_menu_aria=this.navigation_aria_labels=this.homepage_url=this.eto_number=this.eto_disclaimer=this.cta_sticky=this.content_jump_text=this.categories_aria_label= | |
null;this.small_font_treatment=this.is_stacked_layout=!1;this.panelCache=[];this.glueNav=null;this.mainNavLinks=[];this.pageShader=null;this.currentMainNavLink=0;this.openPanel=null;this.focusedIndex=0}connectedCallback(){var a;this.firstElementChild||this.replaceChildren(this.render());this.mainNavLinks=Array.from(this.querySelectorAll(ld.MAIN_NAV_LINKS));this.pageShader=this.querySelector("."+X.PAGE_SHADER);const b=this.querySelector(ld.CLOSE_NAV),c=this.querySelector(ld.HEADER),d=this.querySelector(ld.STACKED_HEADER_LAYOUT), | |
e=this.querySelector(ld.MEGANAV_SUBNAV),f=null===e||void 0===e?void 0:e.querySelectorAll(ld.ITEM_HAS_SUBLINKS),h=d?128:64;let l=0;if(r.GLUE in window&&c){this.glueNav=new glue.Header(c,{hideOnScroll:!1,steppedNav:!0});this.querySelectorAll(ld.HASH_LINKS).forEach(u=>{u.addEventListener(B.CLICK,q=>{q.preventDefault()})});null===b||void 0===b?void 0:b.addEventListener(B.CLICK,()=>{var u;null===(u=this.glueNav)||void 0===u?void 0:u.drawer.close()});let n=!1;const t=u=>{if(u instanceof KeyboardEvent){const {ENTER:q, | |
ESCAPE:y,SPACE:x,ARROW_LEFT:K,ARROW_RIGHT:I,ARROW_DOWN:C}=F;[q,y,x,K,I,C].includes(u.code)&&this.desktopNavPanelHandler(u,l)}else n?n=!1:this.desktopNavPanelHandler(u,l)};window.matchMedia(this.getMediaBreakpoint(v.LG)).matches&&(null===(a=this.pageShader)||void 0===a?void 0:a.addEventListener(B.MOUSEENTER,t),this.mainNavLinks.forEach((u,q)=>{var y;u.classList.contains(X.HAS_NESTED_LINKS)&&(q=this.querySelector(`[data-nav-panel-index="${q}"]`),q=null===q||void 0===q?void 0:q.cloneNode(!0),u.insertAdjacentElement("afterend", | |
q),this.panelCache.push(q),u.addEventListener(B.MOUSEENTER,x=>{n=!1;t(x)}),u.addEventListener(B.MOUSELEAVE,x=>{t(x)}));if(q=null===(y=u.parentElement)||void 0===y?void 0:y.querySelectorAll(ld.MAIN_NAV_SUBLINKS)){const x=Array.from(q).filter(this.isFocusable);x.forEach(K=>{K.addEventListener(B.KEYDOWN,I=>{if(I instanceof KeyboardEvent){var C=I.key===F.ARROW_DOWN,Y=I.key===F.ARROW_UP,Xa=I.key===F.ARROW_LEFT,Ya=I.key===F.ARROW_RIGHT,Kd=I.key===F.TAB;if(C||Y)I.preventDefault(),this.focusedIndex=C?(this.focusedIndex+ | |
1)%x.length:(this.focusedIndex-1+x.length)%x.length,x[this.focusedIndex].focus();if(Xa||Ya)this.navigateMenu(Ya?pd.FORWARD:pd.BACKWARDS),this.focusedIndex=0;I.key===F.ESCAPE&&(this.openPanel&&this.closeDesktopNavPanel(),u.focus());Kd&&(I.preventDefault(),this.navigateMenu(I.shiftKey?pd.BACKWARDS:pd.FORWARD))}})})}u.addEventListener(B.KEYDOWN,x=>{x instanceof KeyboardEvent&&(x.code===F.SPACE||x.code===F.ARROW_DOWN)&&x.preventDefault()});u.addEventListener(B.KEYDOWN,x=>{n=!0;t(x)});u.setAttribute(w.ARIA_EXPANDED, | |
"false")}),null===f||void 0===f?void 0:f.forEach(u=>{const q=u.querySelector(ld.SUBNAV_LIST),y=u.querySelector(ld.GLUE_HEADER_LINK);q&&(u.addEventListener(B.MOUSEENTER,()=>{this.togglePanelAndShader(!0,q);y&&this.setExpandedAttribute(y,!0)}),u.addEventListener(B.MOUSELEAVE,()=>{this.togglePanelAndShader(!1,q);y&&this.setExpandedAttribute(y,!1)}),u.addEventListener(B.KEYUP,x=>{const K=q.classList.contains(A.SHOW);if(x instanceof KeyboardEvent)switch(x.code){case F.ENTER:case F.SPACE:this.togglePanelAndShader(!K, | |
q);x=null===y||void 0===y?void 0:y.getAttribute(w.ARIA_EXPANDED);y&&("true"===x?this.setExpandedAttribute(y,!1):this.setExpandedAttribute(y,!0));break;case F.ESCAPE:K&&(this.togglePanelAndShader(!1,q),y&&this.setExpandedAttribute(y,!1))}}))}));a=new ResizeObserver(()=>{e&&(P.getBpName()===v.LG||P.getBpName()===v.XL)&&window.scrollY>h&&(null===e||void 0===e?void 0:e.classList.add(X.POSITION_FIXED));this.checkPanelHeightOverflow()});e&&window.addEventListener(B.SCROLL,function(){P.getBpName()===v.SM|| | |
P.getBpName()===v.MD?null===c||void 0===c?void 0:c.classList.add(X.FIXED):(l=window.scrollY,null===c||void 0===c?void 0:c.classList.add(X.POSITION_RELATIVE),null===e||void 0===e?void 0:e.classList.remove(X.POSITION_RELATIVE),null===e||void 0===e?void 0:e.classList.add(X.IS_SCROLLING),l>h&&(null===e||void 0===e?void 0:e.classList.add(X.POSITION_FIXED)),l<h&&(null===e||void 0===e?void 0:e.classList.remove(X.POSITION_FIXED)))},!1);a.observe(c)}jd.displayContactButtons()}isFocusable(a){return!(0===a.offsetWidth|| | |
0===a.offsetHeight||0>a.tabIndex)}navigateMenu(a){this.openPanel?(this.currentMainNavLink=+(this.openPanel.dataset.navPanelIndex||0),this.closeDesktopNavPanel()):this.currentMainNavLink=this.mainNavLinks.indexOf(document.activeElement);(a=this.mainNavLinks[a===pd.FORWARD?this.currentMainNavLink+1:this.currentMainNavLink-1])&&a.focus()}togglePanelAndShader(a,b){var c;null===b||void 0===b?void 0:b.classList.toggle(A.SHOW,a);null===(c=this.pageShader)||void 0===c?void 0:c.classList.toggle(X.NAV_OPEN, | |
a);document.body.classList.toggle(A.NO_SCROLL,a)}setExpandedAttribute(a,b){a.classList.contains(X.HAS_NESTED_LINKS)&&(b?a.setAttribute(w.ARIA_EXPANDED,"true"):a.setAttribute(w.ARIA_EXPANDED,"false"))}checkPanelHeightOverflow(){for(const a of this.panelCache){const b=window.innerHeight;a.offsetHeight+96>b?(a.classList.add(X.OVERFLOW_HEIGHT),a.style.setProperty(nd.VARIABLE_HEIGHT,`${b-48}px`)):(a.classList.remove(X.OVERFLOW_HEIGHT),a.style.removeProperty(nd.VARIABLE_HEIGHT))}}shadePage(){var a;document.body.classList.add(A.NO_SCROLL); | |
null===(a=this.pageShader)||void 0===a?void 0:a.classList.add(X.NAV_OPEN)}unshadePage(){var a;document.body.classList.remove(A.NO_SCROLL);null===(a=this.pageShader)||void 0===a?void 0:a.classList.remove(X.NAV_OPEN)}openDesktopNavPanel(a){var b;null===(b=a.nextElementSibling)||void 0===b?void 0:b.classList.add(A.SHOW);this.openPanel=this.querySelector(`.${X.DESKTOP_PANEL}.${A.SHOW}`);a.setAttribute(w.ARIA_EXPANDED,`${"true"!==a.ariaExpanded}`);this.shadePage();this.checkPanelHeightOverflow()}closeDesktopNavPanel(){var a, | |
b;const c=null===(a=this.openPanel)||void 0===a?void 0:a.previousElementSibling;null===(b=this.openPanel)||void 0===b?void 0:b.classList.remove(A.SHOW);this.openPanel=null;this.focusedIndex=0;c&&(c.classList.remove(A.ACTIVE),c.setAttribute(w.ARIA_EXPANDED,"false"));this.unshadePage();this.checkPanelHeightOverflow()}desktopNavPanelHandler(a,b){var c,d;const e=a.currentTarget,f=a instanceof KeyboardEvent&&a.code===F.ESCAPE,h=a instanceof KeyboardEvent&&a.code===F.ENTER,l=a instanceof KeyboardEvent&& | |
a.code===F.SPACE,n=a instanceof KeyboardEvent&&a.code===F.ARROW_LEFT,t=a instanceof KeyboardEvent&&a.code===F.ARROW_RIGHT,u=a instanceof KeyboardEvent&&a.code===F.ARROW_DOWN,q=a instanceof MouseEvent&&a.type===B.MOUSEENTER;if(!(5<b)){e.classList.contains(X.HAS_NESTED_LINKS)&&a.preventDefault();b=e.nextElementSibling;var y=e.classList.contains(X.PAGE_SHADER);a=a.target;var x=null===(c=document.activeElement)||void 0===c?void 0:c.nextElementSibling;c=null===x||void 0===x?void 0:x.querySelector(ld.MAIN_NAV_SUBLINKS); | |
a=a.dataset.deepNavIndex===(null===(d=this.openPanel)||void 0===d?void 0:d.dataset.navPanelIndex);(h||l)&&b&&(this.openPanel?(this.closeDesktopNavPanel(),a||this.openDesktopNavPanel(e)):(this.openDesktopNavPanel(e),null===c||void 0===c?void 0:c.focus()));u&&b&&(this.openPanel?a||(this.closeDesktopNavPanel(),this.openDesktopNavPanel(e)):this.openDesktopNavPanel(e),null===c||void 0===c?void 0:c.focus());f&&b&&this.openPanel&&this.closeDesktopNavPanel();q&&(y?this.closeDesktopNavPanel():(this.openPanel&& | |
this.closeDesktopNavPanel(),this.openDesktopNavPanel(e)));if(t||n)this.openPanel&&this.closeDesktopNavPanel(),this.navigateMenu(t?pd.FORWARD:pd.BACKWARDS)}}setDataGName(a){var b;return a?(a=null===(b=a.split("/home/")[1])||void 0===b?void 0:b.split("/").join("-").slice(0,-1))?a:"overview":""}isCurrentPage(a,b,c){b=!(null===a||void 0===a||!a.endsWith(b));a=(null===c||void 0===c?0:c.parent_url)?!(null===a||void 0===a||!a.includes(c.parent_url)):!1;return b||a}isCurrentPageParent({subcategories:a},b){return a? | |
a.some(c=>{var d;return null===(d=c.links)||void 0===d?void 0:d.some(e=>e.link_group.some(f=>{var h,l,n,t;return f.sub_nav?(null===(h=f.sub_nav.links)||void 0===h?0:h.length)?null===(l=f.sub_nav.links)||void 0===l?void 0:l.some(u=>{var q,y;return(null===(q=u.sub_links)||void 0===q?0:q.length)?u.sub_links.some(x=>{var K;return null===(K=x.cta_url)||void 0===K?void 0:K.endsWith(this.url)}):null===(y=u.cta_url)||void 0===y?void 0:y.endsWith(this.url)}):null===(n=f.sub_nav.parent_url)||void 0===n?void 0: | |
n.endsWith(b):null===(t=f.cta_url)||void 0===t?void 0:t.endsWith(b)}))}):!1}isSubNavCurrentPageParent({sub_links:a},b){return(null===a||void 0===a?void 0:a.some(c=>{var d;return null===(d=c.cta_url)||void 0===d?void 0:d.endsWith(b)}))||!1}hasActiveSubNav(){var a,b;for(const c of this.categoryData)for(const d of c.subcategories)for(const e of d.links)for(const f of e.link_group)if((null===(a=f.sub_nav)||void 0===a?void 0:a.parent_url)===this.url||(null===(b=f.sub_nav)||void 0===b?0:b.parent_url)&& | |
this.url.includes(f.sub_nav.parent_url))this.subNav=f.sub_nav}get contentJumpText(){return this.getAttribute(md.CONTENT_JUMP)||this.content_jump_text}get categoryData(){var a=this.getAttribute(md.DATA)||this.categories;a="string"===typeof a?JSON.parse(a):a;for(const b of a){b.cta_link&&(b.cta_link=this.relativizeKintaroLink(b.cta_link));const c=b.subcategories;if(c.length)for(const d of c)for(const e of d.links)if(e.link_group.length)for(const f of e.link_group)if(f.cta_url&&(f.cta_url=this.relativizeKintaroLink(f.cta_url)), | |
f.sub_nav&&f.sub_nav.links&&f.sub_nav.links.length)for(const h of f.sub_nav.links)if(h.cta_url=this.relativizeKintaroLink(h.cta_url),h.sub_links.length)for(const l of h.sub_links)l.cta_url=this.relativizeKintaroLink(l.cta_url)}return a}get categoryAriaLabel(){return this.getAttribute(md.CATEGORIES_ARIA_LABEL)||this.categories_aria_label}get gtmModuleName(){return this.nodeName.toLowerCase()}get homepageUrl(){const a=this.getAttribute(md.HOMEPAGE)||this.homepage_url;return"string"===typeof a?this.relativizeKintaroLink(a): | |
null}get navCtaInfo(){const a=this.getAttribute(md.ETO_NUMBER)||this.eto_number;return{ctaBlock:this.ctaBlock,disclaimer:this.getAttribute(md.ETO_DISCLAIMER)||this.eto_disclaimer,tel:a,tel_formatted:this.formatEto(a)||""}}get parentMenuAria(){return this.getAttribute(md.MENU_ARIA)||this.parent_menu_aria}get productName(){return this.getAttribute(md.PRODUCT)||this.product}get officeHours(){return this.getAttribute(w.OFFICE_HOURS)||this.office_hours}get navigationAriaLabels(){const a=this.navigation_aria_labels|| | |
this.getAttribute(w.NAVIGATION_ARIA_LABELS);return"string"===typeof a?JSON.parse(a):a}get singleSignOn(){const a=this.getAttribute(md.SINGLE_SIGN_ON);return a?JSON.parse(a):this.single_sign_on||null}get ssoCardCta(){var a;return JSON.stringify(null===(a=this.singleSignOn)||void 0===a?void 0:a.cta)||null}get ssoMockApi(){var a;return(null===(a=this.singleSignOn)||void 0===a?0:a.mock_api_data)?JSON.stringify(this.singleSignOn.mock_api_data):null}get ssoNavCta(){var a;return JSON.stringify(null===(a= | |
this.singleSignOn)||void 0===a?void 0:a.nav_cta)||null}get ssoProfileAltText(){var a;return(null===(a=this.singleSignOn)||void 0===a?void 0:a.profile_alt_text)||null}get ssoProfileCtaName(){var a;return(null===(a=this.singleSignOn)||void 0===a?void 0:a.profile_cta_name)||null}get ssoImageBuildPlaceholder(){var a,b;return(null===(b=null===(a=this.singleSignOn)||void 0===a?void 0:a.profile_image_placeholder)||void 0===b?void 0:b.url)||null}get ssoLoggedInUrl(){var a;return(null===(a=this.singleSignOn)|| | |
void 0===a?void 0:a.logged_in_url)||null}get ssoInfo(){if(!this.singleSignOn)return null;let a={signIn:this.ctaBlock[2],startNow:this.ctaBlock[3],cardCta:this.ssoCardCta,mockApi:this.ssoMockApi,profileAltText:this.ssoProfileAltText,profileCtaName:this.ssoProfileCtaName,profileImageBuildPlaceholder:this.ssoImageBuildPlaceholder,loggedInUrl:this.ssoLoggedInUrl,moduleName:this.gtmModuleName};"is_v2"in this.singleSignOn&&(a={...a,adsAccountStatus:this.singleSignOn.ads_account_status,modal:this.singleSignOn.modal, | |
isV2:!0});return a}get stickyCTA(){var a=this.getAttribute(md.CTA_STICKY)||this.cta_sticky;if(a){a="string"===typeof a?JSON.parse(a):a;const b="string"===typeof a.cta?JSON.parse(a.cta):a.cta;return b?{cta:b,is_sticky:a.is_sticky}:null}return null}get isStackedLayout(){return this.hasAttribute(md.IS_STACKED_LAYOUT)||this.is_stacked_layout}get isSmallFontTreatment(){return this.hasAttribute(md.SMALL_FONT_TREATMENT)||this.small_font_treatment}colorLockup(a,b=null){var c;return p` | |
<div class="glue-header__container"> | |
<div class="glue-header__lock-up"> | |
${a===od.DESKTOP?p` | |
<button class="mobile-close-nav-btn" aria-label="${null===(c=this.navigationAriaLabels)||void 0===c?void 0:c.aria_close_nav_drawer}"> | |
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="presentation"> | |
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z" fill="#202124"/> | |
</svg> | |
</button> | |
`:""} | |
${a===od.MOBILE?p` | |
<div class="glue-header__hamburger"> | |
<button class="glue-header__drawer-toggle-btn" aria-label="${this.navigationAriaLabels.aria_open_nav_drawer}"> | |
<svg class="glue-icon glue-icon--24px" role="presentation" aria-hidden="true" viewBox="0 0 24 24"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"></path></svg> | |
</button> | |
</div> | |
`:""} | |
<div class="glue-header__logo"> | |
<a class="glue-header__logo-link" href="${this.homepageUrl}" title="Google ${this.productName}"> | |
<div class="glue-header__logo-container"> | |
<gads-icon icon-id="GOOGLE_COLOR_LOGO" class-names="glue-header__logo-svg"></gads-icon> | |
</div> | |
<span class="glue-header__logo--product" aria-hidden="true">${this.productName}</span> | |
</a> | |
</div> | |
${b&&a===od.MOBILE?this.renderSSO(b,a):""} | |
</div> | |
</div> | |
`}renderCtas(a="desktop",b=null){var c,d,e,f;return p` | |
<div class="gads-mega-nav-cta-container glue-header__container${a===od.DESKTOP?" glue-header__container--cta":""}"> | |
<div class="glue-header__cta"> | |
${(null===(d=null===(c=this.subNav)||void 0===c?void 0:c.cta)||void 0===d?0:d.length)?p` | |
<div class="subnav-cta-container"> | |
${this.subNav.cta.map(h=>p`<gads-button ${this.unpackCta(h)}></gads-button>`)} | |
</div> | |
`:null} | |
<div class="nav-cta-container ${(null===(f=null===(e=this.subNav)||void 0===e?void 0:e.cta)||void 0===f?0:f.length)?"hide":""}"> | |
${this.navCtaInfo.ctaBlock} | |
${this.navCtaInfo.disclaimer?p` | |
<div class="header-phone-number__rollover"> | |
<span class="glue-font-weight-medium">${this.navCtaInfo.disclaimer}</span> | |
</div> | |
`:""} | |
</div> | |
${b&&a===od.DESKTOP?this.renderSSO(b,a):""} | |
</div> | |
</div> | |
`}renderSSO(a,b){return a.isV2?p` | |
<gads-single-sign-on-v2 | |
${a.adsAccountStatus?`ads-account-status="${g(JSON.stringify(a.adsAccountStatus))}"`:null} | |
cta='${a.cardCta}' | |
cta-sign-in='${a.signIn}' | |
cta-start-now='${a.startNow}' | |
logged-in-url='${a.loggedInUrl}' | |
mock-api-data='${a.mockApi}' | |
${a.modal?`modal="${g(JSON.stringify(a.modal))}"`:null} | |
module-name='${a.moduleName}' | |
profile-alt-text='${a.profileAltText}' | |
profile-cta-name='${a.profileCtaName}' | |
profile-image-placeholder='${a.profileImageBuildPlaceholder}' | |
type='${b}'> | |
</gads-single-sign-on-v2> | |
`:p` | |
<gads-single-sign-on | |
cta='${a.cardCta}' | |
logged-in-url='${a.loggedInUrl}' | |
mock-api-data='${a.mockApi}' | |
module-name='${a.moduleName}' | |
profile-alt-text='${a.profileAltText}' | |
profile-cta-name='${a.profileCtaName}' | |
profile-image-placeholder='${a.profileImageBuildPlaceholder}' | |
cta-sign-in='${a.signIn}' | |
cta-start-now='${a.startNow}' | |
type=${b}> | |
</gads-single-sign-on> | |
`}buildLinkbar(){return p` | |
<div class="glue-header__container glue-header__container--linkbar"> | |
<nav class="glue-header__link-bar" aria-label="${this.categoryAriaLabel}"> | |
<ul class="glue-header__list"> | |
${this.categoryData.map((a,b)=>{var c;const d=a.subcategories.length,e=a.cta_link,f=e?this.isCurrentPage(e,this.url):!1,h=this.isCurrentPageParent(a,this.url),l=this.subNav?null===(c=this.subNav.links)||void 0===c?void 0:c.some(n=>{var t,u;return(null===(t=n.sub_links)||void 0===t?0:t.length)?n.sub_links.some(q=>{var y;return null===(y=q.cta_url)||void 0===y?void 0:y.endsWith(this.url)}):null===(u=n.cta_url)||void 0===u?void 0:u.endsWith(this.url)}):!1;return p` | |
<li class="glue-header__item | |
${f||h?"glue-header__item--active glue-header--is-active":""} | |
${l?"active-subnav":""} | |
${h&&!l?"active-page-parent":""} | |
"> | |
<a class="glue-header__link glue-headline glue-headline--headline-5 initial-links${d?" has-nested-links":""}" | |
href="${d?"#":e}" | |
title="${a.cta_name}" | |
${!d&&e?this.setExternalLink(e):null} | |
${d?` | |
data-deep-nav-index="${b}" | |
aria-haspopup="menu" | |
aria-controls="nav-panel-index-${b}" | |
`:` | |
${e?`data-g-cta-name="${this.setDataGName(e)}"`:""} | |
data-g-module-name="${this.gtmModuleName}" | |
`}> | |
<span>${a.cta_name}</span> | |
</a> | |
${d?this.buildDeepNav(a,this.url):""} | |
</li> | |
`})} | |
</ul> | |
</nav> | |
</div> | |
`}buildMobileSubNav(a,b,c=!1){var d;return p` | |
<ul class="glue-header__list ${c?"subnav-list glue-header__list--nested glue-header__deep-nav":""}" role="menu" aria-hidden="true"> | |
${null===(d=a.links)||void 0===d?void 0:d.map(e=>{var f;if(e.cta_text){var h=this.isSubNavCurrentPageParent(e,b);const l=e.cta_url?this.isCurrentPage(e.cta_url,b):!1,n=e.sub_links&&e.sub_links.length;h=h?"glue-header--is-active glue-header__item--active":l?"glue-header__item--active":"";return p` | |
<li class="glue-header__item ${h}" role="none"> | |
<a class="glue-header__link ${n?"has-nested-links":""}" | |
href="${e.cta_url&&!n?e.cta_url:"#"}" role="menuitem" | |
${n?"":` | |
${e.cta_url?`data-g-cta-name="${this.setDataGName(e.cta_url)}"`:""} | |
data-g-module-name="${this.gtmModuleName}" | |
`} | |
${e.cta_url?this.setExternalLink(e.cta_url):null} | |
${l?'aria-current="page"':""}> | |
${e.cta_text} | |
</a> | |
${n?p` | |
${null===(f=e.sub_links)||void 0===f?void 0:f.map(t=>p` | |
<li class="glue-header__item subnav-link"> | |
<a class="glue-header__link" | |
href=${t.cta_url} | |
${t.cta_url?`data-g-cta-name="${this.setDataGName(t.cta_url)}"`:""} | |
data-g-module-name="${this.gtmModuleName}" | |
role="menuitem" | |
> | |
${t.cta_text} | |
</a> | |
</li> | |
`)} | |
`:""} | |
</li> | |
`}return""}).join("")} | |
</ul> | |
`}buildDeepNav(a,b){return p` | |
<ul class="glue-header__list glue-header__list--nested glue-header__deep-nav" role="menubar"> | |
${a.subcategories.map(c=>p` | |
${c.grouping_label?p` | |
<li class="glue-header__item l2-link l2-link-mobile" aria-hidden="true"> | |
<div class="glue-header__link glue-font-weight-bold glue-headline glue-headline--headline-6"> | |
${c.grouping_label} | |
</div> | |
<div class="l2-link-border-bottom"></div> | |
</li> | |
`:""} | |
${c.links?c.links.map(d=>d.link_group.map(e=>{const f=e.sub_nav?e.sub_nav.links:!1,h=f?this.isCurrentPage(e.cta_url,b,this.subNav):this.isCurrentPage(e.cta_url,b);f&&this.url===e.cta_url&&(this.subNav=e.sub_nav);return e.cta_text?p` | |
<li class="glue-header__item ${h?"glue-header__item--active glue-header--is-active":""}"> | |
<a class="glue-header__link l2-link" | |
href="${h&&f?"#":e.cta_url}" | |
data-g-module-name="${this.gtmModuleName}" | |
role="menuitem" | |
${f?'aria-haspopup="menu"':""} | |
${e.cta_url?`data-g-cta-name="${this.setDataGName(e.cta_url)}"`:""} | |
${h?'aria-current="page"':""}> | |
${e.cta_text} | |
</a> | |
${f&&h&&this.subNav?this.buildMobileSubNav(this.subNav,b):""} | |
</li> | |
`:""}).join("")).join(""):""} | |
`)} | |
</ul> | |
`}buildDesktopNavPanel(){return p` | |
<div class="desktop-nav-panels-wrapper"> | |
${this.categoryData.map((a,b)=>a.subcategories.length?this.buildCategoryPanel(a,b):"")} | |
</div> | |
`}buildCategoryPanel(a,b){return p` | |
<div class="desktop-nav-panel" data-nav-panel-index="${b}" id="nav-panel-index-${b}" role="menu" aria-label="${a.cta_name}"> | |
<div class="links-panel"> | |
${a.subcategories.map(c=>this.buildSubcategoryGroup(c))} | |
</div> | |
</div> | |
`}buildSubcategoryGroup(a){return p` | |
<div class="category-group | |
${1<a.links.length?"double-column":"single-column"} | |
${a.grouping_label?"":"no-grouping-label"}"> | |
${a.grouping_label?p` | |
<p class="category-grouping-label" aria-hidden="true">${a.grouping_label}</p> | |
`:null} | |
<div class="subcategory-group"> | |
${a.links.map(b=>this.buildLinkGroup(b))} | |
</div> | |
</div> | |
`}buildLinkGroup(a){return p` | |
<ul class="subcategory" role="presentation"> | |
${a.link_group.map(b=>this.buildLink(b))} | |
</ul> | |
`}buildLink(a){const b=a.cta_url?this.isCurrentPage(a.cta_url,this.url):!1;return p` | |
<li class="subnav-item${b?" active":""}"> | |
<a class="subcategory-link" | |
${a.cta_url?`data-g-cta-name="${this.setDataGName(a.cta_url)}"`:""} | |
data-g-module-name="${this.gtmModuleName}" | |
href="${a.cta_url||"#"}" | |
role="menuitem"> | |
${a.cta_text} | |
${a.additional_text?p` | |
<p class="subcategory-text">${a.additional_text}</p> | |
`:""} | |
</a> | |
</li> | |
`}renderSubNav(){var a,b,c;if(!this.subNav)return"";const d=(null===(b=null===(a=this.subNav.campaign_image)||void 0===a?void 0:a.image)||void 0===b?0:b.url)?p` | |
<gads-image | |
image="${this.subNav.campaign_image.image.url}" | |
widths="sm:24" role="presentation" | |
aria-hidden="true" | |
></gads-image> | |
`:"";a=this.subNav.campaign_name?p` | |
<span class="campaign-name">${this.subNav.campaign_name}</span> | |
`:"";b=(null===(c=this.subNav.links)||void 0===c?0:c.length)?p` | |
<ul class="glue-header__list"> | |
${this.subNav.links.map(e=>this.renderSubNavLink(e))} | |
</ul> | |
`:"";return p` | |
<div class="meganav-subnav ${this.isStackedLayout?"drop-line":""}"> | |
<div class="subnav-campaign-container"> | |
${d} | |
${a} | |
</div> | |
${b} | |
${this.subNav.cta?p` | |
<div class="subnav-cta-container"> | |
${this.subNav.cta.map(e=>p`<gads-button ${this.unpackCta(e)}></gads-button>`)} | |
</div> | |
`:""} | |
</div> | |
`}renderSubNavLink(a){const b=a.sub_links&&0<a.sub_links.length,c=a.cta_url&&this.isCurrentPage(a.cta_url,this.url)||this.isSubNavCurrentPageParent(a,this.url)?"subnav-link--is-active":"";return b?this.renderSubNavWithSubLinks(a,c):this.renderSubNavLinkWithoutSubLinks(a,c)}renderSubNavWithSubLinks(a,b){var c;return p` | |
<li class="glue-header__item item-has-sublinks"> | |
<a class="glue-header__link initial-links has-nested-links ${b}" aria-haspopup="menu" href="#" aria-expanded="false"> | |
<span>${a.cta_text}</span> | |
</a> | |
<ul class="subnav-list"> | |
${null===(c=a.sub_links)||void 0===c?void 0:c.map(d=>this.renderSubNavLinkWithoutSubLinks(d))} | |
</ul> | |
</li> | |
`}renderSubNavLinkWithoutSubLinks(a,b){return p` | |
<li class="glue-header__item"> | |
<a class="glue-header__link ${b?b:""}" | |
${a.cta_url?`data-g-cta-name="${this.setDataGName(a.cta_url)}"`:""} | |
data-g-module-name="${this.gtmModuleName}" | |
href="${a.cta_url}" | |
${a.cta_url?this.setExternalLink(a.cta_url):null}> | |
<span>${a.cta_text}</span> | |
</a> | |
</li> | |
`}stickyCTARender(a){return a?p` | |
<gads-sticky-cta | |
cta='${JSON.stringify(a.cta)}' | |
is-sticky="${a.is_sticky}"> | |
</gads-sticky-cta>`:""}render(){this.hasActiveSubNav();return m` | |
<header | |
class="glue-header | |
${this.isStackedLayout?"stacked-header-layout":""} | |
${this.isSmallFontTreatment?"small-font-treatment":""} | |
${this.subNav?"has-subnav":""}" | |
office-hours='${JSON.stringify(this.officeHours)}'> | |
${this.contentJumpText?p` | |
<a href="#main-page-content" class="glue-header__link glue-header__skip-content"> | |
${this.contentJumpText} | |
</a> | |
`:null} | |
<div class="glue-header__bar glue-header__bar--mobile"> | |
<div class="glue-header__tier"> | |
${this.colorLockup(od.MOBILE,this.ssoInfo)} | |
${this.renderCtas(od.MOBILE,this.ssoInfo)} | |
</div> | |
</div> | |
<div class="glue-header__bar glue-header__bar--desktop glue-header__drawer ${this.subNav?"position-relative":""}"> | |
<div class="glue-header__tier"> | |
${this.colorLockup(od.DESKTOP)} | |
<div class="glue-header__container glue-header__stepped-nav"> | |
<div class="glue-header__stepped-nav-controls-container"> | |
<div class="glue-header__stepped-nav-controls" data-glue-steppednav-label="${this.parentMenuAria}"> | |
<div class="glue-header__stepped-nav-controls-arrow"> | |
<svg role="presentation" aria-hidden="true" class="glue-icon glue-icon--18px" viewBox="0 0 24 24"><path d="M16.41 5.41L15 4l-8 8 8 8 1.41-1.41L9.83 12"></path></svg> | |
<svg role="presentation" aria-hidden="true" class="glue-icon glue-icon--18px glue-header__stepped-nav-subnav-icon" viewBox="0 0 24 24"><path d="M7.59 18.59L9 20l8-8-8-8-1.41 1.41L14.17 12"></path></svg> | |
</div> | |
<div class="glue-header__stepped-nav-controls-title glue-header__link glue-headline glue-headline--headline-5"></div> | |
</div> | |
</div> | |
<div class="glue-header__stepped-nav-menus"></div> | |
</div> | |
${this.buildLinkbar()} | |
${this.renderCtas(od.DESKTOP,this.ssoInfo)} | |
</div> | |
</div> | |
<div class="glue-header__drawer-backdrop"></div> | |
${this.subNav?this.renderSubNav():null} | |
</header> | |
${this.buildDesktopNavPanel()} | |
<div class="page-shader"></div> | |
${this.stickyCTARender(this.stickyCTA)} | |
`}};customElements.define("gads-mega-nav-v2",qd);var rd=class extends M{constructor(){var a;super(...arguments);this.disclaimer="";this.featured_product={};this.first_card_featured=!1;this.headline="";this.product_cards=void 0;this.subheadline="";this.tools_cards=void 0;this.view_more_cta_text=this.view_less_cta_text="";this.hiddenCardsContainerElem=this.querySelector(".hidden-cards");this.hiddenCardsElem=null===(a=this.hiddenCardsContainerElem)||void 0===a?void 0:a.querySelectorAll(".animated-card");this.showBtn=this.querySelector(".show-more-btn button"); | |
this.showBtnSvg=this.querySelector(".show-more-btn svg")}connectedCallback(){var a;this.firstElementChild||(this.replaceChildren(this.render()),this.hiddenCardsContainerElem=this.querySelector(".hidden-cards"),this.hiddenCardsElem=null===(a=this.hiddenCardsContainerElem)||void 0===a?void 0:a.querySelectorAll(".animated-card"),this.showBtn=this.querySelector(".show-more-btn button"),this.showBtnSvg=this.querySelector(".show-more-btn svg"));if(this.hiddenCardsContainerElem){a=this.hiddenCardsContainerElem.getAttribute("view-more-cta-text"); | |
const b=this.hiddenCardsContainerElem.getAttribute("view-less-cta-text");if(a&&b){const d=new Map([[a,b],[b,a]]);this.hiddenCardsElem&&this.hiddenCardsElem.forEach((e,f)=>{e.style.transitionDelay=`${100*(f+4)}ms`;e.ariaHidden="false"});this.showBtn&&this.showBtn.addEventListener(B.CLICK,()=>{var e;this.showBtn&&this.showBtn.lastChild&&(this.showBtn.lastChild.textContent=d.get(null===(e=this.showBtn.textContent)||void 0===e?void 0:e.trim()));if(this.hiddenCardsContainerElem)if(this.hiddenCardsContainerElem.classList.contains(A.ACTIVE)){this.hiddenCardsElem&& | |
this.hiddenCardsElem.forEach((h,l)=>{h.style.transitionDelay=`${40*l}ms`;h.ariaHidden="true"});this.hiddenCardsContainerElem.classList.remove(A.ACTIVE,"glue-spacer-5-top");this.showBtnSvg&&this.showBtnSvg.classList.remove("icon-rotated");const f=setTimeout(()=>{this.hiddenCardsContainerElem&&(this.hiddenCardsContainerElem.style.maxHeight="0",this.hiddenCardsContainerElem.style.overflow="hidden",clearTimeout(f))},H.FOUR_HUNDRED)}else this.hiddenCardsElem&&this.hiddenCardsElem.forEach((f,h)=>{f.style.transitionDelay= | |
`${100*(h+10)}ms`;f.ariaHidden="false"}),this.hiddenCardsContainerElem.style.maxHeight=`${this.hiddenCardsContainerElem.scrollHeight}px`,this.hiddenCardsContainerElem.style.overflow="unset",this.hiddenCardsContainerElem.classList.add(A.ACTIVE,"glue-spacer-5-top"),this.showBtnSvg&&this.showBtnSvg.classList.add("icon-rotated")});this.hiddenCardsContainerElem.addEventListener(B.TRANSITION_END,e=>{"max-height"===e.propertyName&&this.showBtn&&(e=this.showBtn.getBoundingClientRect().top+window.scrollY- | |
120,window.scroll({top:e,behavior:G.SMOOTH}))})}else throw Error("View more/less button text has not been supplied");const c=ja((()=>{var d;if(null===(d=this.hiddenCardsContainerElem)||void 0===d?0:d.classList.contains(A.ACTIVE))this.hiddenCardsContainerElem.style.maxHeight=`${this.hiddenCardsContainerElem.scrollHeight}px`}).bind(this),100);window.addEventListener(B.RESIZE,()=>c())}}get gtmModuleName(){return this.nodeName.toLowerCase()}get featuredProduct(){const a=this.getAttribute("featured-product")|| | |
this.featured_product;return!a||"{}"===a||"string"!==typeof a&&0===Object.keys(a).length?null:"string"===typeof a?JSON.parse(k(a)):a}get headlineText(){return this.getAttribute(w.HEADLINE)||this.headline}get subHeadline(){return this.getAttribute(w.SUBHEADLINE)||this.subheadline}get disclaimerText(){return this.getAttribute(w.DISCLAIMER)||this.disclaimer}get cardData(){const a=this.getAttribute(w.CARDS)||this.product_cards||this.tools_cards;return"string"===typeof a?JSON.parse(k(a)):a}get topCards(){return 3< | |
this.cardData.length?this.cardData.slice(0,3):this.cardData}get hiddenCardsContainer(){return 3<this.cardData.length?this.cardData.slice(3):null}get viewMoreCtaText(){return this.getAttribute("view-more-cta-text")||this.view_more_cta_text}get viewLessCtaText(){return this.getAttribute("view-less-cta-text")||this.view_less_cta_text}get cardType(){return""}get isToolsCard(){return"toolsCard"===this.cardType}get firstCardFeatured(){return this.getAttribute("first-card-featured")||this.first_card_featured}fallbackClasses(){return 2=== | |
this.cardData.length?"fallback-layout":""}featuredProductRender(a){return p` | |
<gads-featured-product | |
body-copy="${g(JSON.stringify(a.body_copy))}" | |
cta="${g(JSON.stringify(a.cta))}" | |
image="${g(JSON.stringify(a.image))}" | |
main-headline="${a.main_headline}" | |
media-alignment="${a.media_alignment}" | |
${a.image.has_transparency?w.HAS_TRANSPARENCY:""} | |
></gads-featured-product> | |
`}hiddenCardsContainerRender(){var a;return p` | |
<div class="hidden-cards-container glue-spacer-5-top"> | |
<div class="glue-text-center show-more-btn"> | |
<gads-button cta-text="${this.viewMoreCtaText}" icon-type="glue-icon-right" icon-id="EXPAND_MORE"></gads-button> | |
</div> | |
<div class="related-cards-container hidden-cards ${this.isToolsCard?"related-tools-cards":""}" | |
view-more-cta-text="${this.viewMoreCtaText}" | |
view-less-cta-text="${this.viewLessCtaText}"> | |
${null===(a=this.hiddenCardsContainer)||void 0===a?void 0:a.map(b=>{var c,d;return"headline"in b?p` | |
<gads-card | |
${b.body?`body="${g(b.body)}"`:null} | |
card-type="${this.cardType}" | |
${b.cta.length?`cta="${g(JSON.stringify(b.cta))}"`:null} | |
${b.headline?`headline="${b.headline}"`:null} | |
${b.images.length?`images="${this.formatMultiImage(b.images,!0)}"`:null} | |
module-name="${this.gtmModuleName}"> | |
</gads-card> | |
`:p` | |
<gads-card | |
${b.body?`body="${g(b.body)}"`:null} | |
card-type="${this.cardType}" | |
${b.gtm_cta_name?`cta-name="${b.gtm_cta_name}"`:null} | |
${b.cta_url?`cta-url="${b.cta_url}"`:null} | |
${b.has_transparency?`has-transparency="${b.has_transparency}"`:null} | |
${b.title?`headline="${b.title}"`:null} | |
${(null===(c=b.icon)||void 0===c?0:c.url)?`icon="${null===(d=b.icon)||void 0===d?void 0:d.url}"`:null} | |
module-name="${this.gtmModuleName}"> | |
</gads-card> | |
`})} | |
</div> | |
</div> | |
`}topCardsRender(){return p` | |
<div class="related-cards-container glue-spacer-5-top ${this.fallbackClasses()} ${this.isToolsCard?"related-tools-cards":""}"> | |
${this.topCards.map((a,b)=>{var c,d;return"headline"in a?p` | |
<gads-card | |
${a.body?`body="${g(a.body)}"`:null} | |
card-type="${this.cardType}" | |
${a.cta.length?`cta="${g(JSON.stringify(a.cta))}"`:null} | |
first-card-featured="${0===b?this.firstCardFeatured:null}" | |
${a.headline?`headline="${a.headline}"`:null} | |
${a.images.length?`images="${this.formatMultiImage(a.images,!0)}"`:null} | |
module-name="${this.gtmModuleName}"> | |
</gads-card> | |
`:p` | |
<gads-card | |
${a.body?`body="${g(a.body)}"`:null} | |
card-type="${this.cardType}" | |
${a.gtm_cta_name?`cta-name="${a.gtm_cta_name}"`:null} | |
${a.cta_url?`cta-url="${a.cta_url}"`:null} | |
first-card-featured="${0===b?this.firstCardFeatured:null}" | |
${a.has_transparency?`has-transparency="${a.has_transparency}"`:null} | |
${a.title?`headline="${a.title}"`:null} | |
${(null===(c=a.icon)||void 0===c?0:c.url)?`icon="${null===(d=a.icon)||void 0===d?void 0:d.url}"`:null} | |
module-name="${this.gtmModuleName}"> | |
</gads-card> | |
`})} | |
</div> | |
`}disclaimerRender(){return p` | |
<div class="disclaimer-container"> | |
<p class="glue-font-weight-regular glue-small-text"> | |
${this.disclaimerText} | |
</p> | |
</div> | |
`}render(){const a=this.featuredProduct;return m` | |
<section class="gads-related-items glue-spacer-6-bottom ${a?"":"glue-spacer-6-top"}"> | |
<div class="${a?"gads-related-items__container--arc":"gads-related-items__container"}"> | |
<div class="glue-page"> | |
${this.headlineText||this.subHeadline?p` | |
<div class="glue-grid glue-text-center"> | |
<div class="glue-grid__col glue-grid__col--span-0-sm glue-grid__col--span-2"></div> | |
<div class="copy-section glue-grid__col glue-grid__col--span-8"> | |
${this.headlineText?p` | |
<h2 class="main-headline glue-headline glue-headline--headline-2"> | |
<span class="glue-spacer-2-bottom glue-font-weight-medium">${this.headlineText}</span> | |
</h2> | |
`:""} | |
${this.subHeadline?p` | |
<p class="main-subheadline ${a?"main-subheadline--spacer":""}">${this.subHeadline}</p> | |
`:""} | |
</div> | |
</div> | |
`:""} | |
${a?this.featuredProductRender(a):""} | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-1 ${this.isToolsCard?"glue-grid__col--span-0-md":""} glue-grid__col--span-0-lg"></div> | |
<div class="glue-grid__col glue-grid__col--span-10 ${this.isToolsCard?"glue-grid__col--span-12-md":""} glue-grid__col--span-12-lg"> | |
${this.topCardsRender()} | |
${this.disclaimerText?this.disclaimerRender():""} | |
${this.hiddenCardsContainer?this.hiddenCardsContainerRender():""} | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("related-various",rd);var sd=class extends rd{get cardType(){return"productCard"}};customElements.define("gads-related-products",sd);var td=class extends rd{get cardType(){return"toolsCard"}};customElements.define("gads-related-tools",td);var ud=class extends M{constructor(){super(...arguments);this.gtm_cta_name=this.copy="";this.button=this.querySelector(".glue-button");this._isReducedMotion=Ia.isReducedMotion}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()),this.button=this.querySelector(".glue-button"));window.addEventListener(B.DOM_CONTENT_LOADED,()=>{this.button&&this.button.addEventListener(B.CLICK,()=>{window.scroll({top:0,behavior:this._isReducedMotion?G.AUTO:G.SMOOTH});document.body.setAttribute(w.TABINDEX, | |
"-1");document.body.focus();document.body.removeAttribute(w.TABINDEX)})})}get copyText(){return this.getAttribute(w.COPY)||this.copy}get gtmCtaName(){return this.getAttribute(w.GTM_CTA_NAME)||this.gtm_cta_name}get gtmModuleName(){return this.getAttribute(w.GTM_MODULE_NAME)||this.nodeName.toLowerCase()}render(){return m` | |
<section class="gads-resource-jumplink-to-top"> | |
<gads-button | |
cta-name="${this.gtmCtaName}" | |
cta-text="${this.copyText}" | |
icon-type="glue-icon" | |
icon-id="ARROW_UPWARD" | |
icon-size="24" | |
emphasis="high" | |
module-name="${this.gtmModuleName}" | |
></gads-button> | |
</section> | |
`}};customElements.define("gads-resource-jumplink-to-top",ud);var vd=class extends M{constructor(){super(...arguments);this.article_copy_blocks=this.headline="";this._listItem=this.querySelectorAll(".gads-resource-toc__item");this.listItem=(a,b)=>p` | |
<li data-article="${a}" class="gads-resource-toc__item"> | |
<a href="javascript:void(0)" class="glue-inline-link">${b}</a> | |
</li> | |
`}connectedCallback(){function a(c){b&&b.scrollToId(c,{hash:!1,offset:{x:0,y:100}});(c=document.getElementById(c))&&c.focus({preventScroll:!0})}this.firstElementChild||(this.replaceChildren(this.render()),this._listItem=this.querySelectorAll(".gads-resource-toc__item"));const b=r.GLUE in window&&new glue.SmoothScroll;b&&this._listItem&&this._listItem.forEach(c=>{const d=c.dataset.article;d&&(c.addEventListener(B.CLICK,()=>{a(d)}),c.addEventListener(B.KEYPRESS,e=>{e.code===F.ENTER&&a(d)}))})}get headlineText(){const a= | |
this.getAttribute(w.HEADLINE);return"string"===typeof a?a:this.headline}get articleCopyBlocks(){var a=this.getAttribute("article-copy-blocks");return(a="string"===typeof a?JSON.parse(k(a)):this.article_copy_blocks)&&Array.isArray(a)?a.map(b=>this.listItem(b.article_id,b.article_title)):[""]}render(){return m` | |
<section class="gads-resource-toc"> | |
<div class="gads-resource-toc__wrapper glue-page"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-0-sm glue-grid__col--span-1-xl"></div> | |
<nav class="gads-resource-toc__list glue-grid__col glue-grid__col--span-3-lg glue-grid__col--span-2-xl" aria-labelledby="gads-resource-toc__title"> | |
<p id="gads-resource-toc__title" class="gads-resource-toc__title">${this.headlineText}</p> | |
<ol> | |
${this.articleCopyBlocks} | |
</ol> | |
</nav> | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-resource-table-of-contents",vd);var wd={CONTENT_JUMP:"content-jump-text",CTA_STICKY:"cta-sticky",HIDE_ON_SCROLL:"hide-on-scroll",LOCKUP_TEXT:"lockup-text",ROLLOVER_TEXT:"rollover-text",SINGLE_SIGN_ON:"single-sign-on",TEL:"tel"},xd={GLUE_IS_SHOWING_DRAWER:"glue-is-showing-drawer"},yd={GLUE_HEADER:".glue-header",GLUE_HEADER_DRAWER:".glue-header__drawer",BUTTON:"gads-button"},zd=class extends M{constructor(){var a;super(...arguments);this.content_jump_text=null;this.cta_sticky={};this.hide_on_scroll=!1;this.lockup_text=null;this.navigation_aria_labels= | |
{};this.office_hours={};this.rollover_text=null;this.single_sign_on={};this.header=void 0;this.headerEl=this.querySelector(yd.GLUE_HEADER);this.drawerEl=this.querySelector(yd.GLUE_HEADER_DRAWER);this.drawerButtons=null===(a=this.drawerEl)||void 0===a?void 0:a.querySelectorAll(yd.BUTTON)}connectedCallback(){var a,b;this.firstElementChild||(this.replaceChildren(this.render()),this.headerEl=this.querySelector(yd.GLUE_HEADER),this.drawerButtons=null===(a=this.drawerEl)||void 0===a?void 0:a.querySelectorAll(yd.BUTTON)); | |
let c=P.getBpName();const d=null===(b=this.headerEl)||void 0===b?void 0:b.hasAttribute(wd.HIDE_ON_SCROLL),{SM:e,MD:f}=v;if(this.drawerButtons&&[e,f].includes(c))for(const h of this.drawerButtons)(a=h.firstElementChild)&&a.setAttribute(w.TABINDEX,"-1");P.subscribe(h=>{c=h;h=[e,f].includes(c);if(this.drawerButtons)for(const l of this.drawerButtons){const n=l.firstElementChild;n&&(h?n.setAttribute(w.TABINDEX,"-1"):n.removeAttribute(w.TABINDEX))}});window.addEventListener(B.DOM_CONTENT_LOADED,()=>{this.headerEl&& | |
r.GLUE in window&&(this.header=new glue.Header(this.headerEl,{hideOnScroll:d}));this.addEventListener(B.CLICK,()=>{var h;if([e,f].includes(c)){const l=null===(h=this.headerEl)||void 0===h?void 0:h.classList.contains(xd.GLUE_IS_SHOWING_DRAWER);if(this.drawerButtons)for(const n of this.drawerButtons)(h=n.firstElementChild)&&(l?h.removeAttribute(w.TABINDEX):h.setAttribute(w.TABINDEX,"-1"))}})});jd.displayContactButtons()}get gtmModuleName(){return this.nodeName}get lockupText(){return this.getAttribute(wd.LOCKUP_TEXT)|| | |
this.lockup_text}get contentJumpText(){return this.getAttribute(wd.CONTENT_JUMP)||this.content_jump_text}get rolloverText(){return this.getAttribute(wd.ROLLOVER_TEXT)||this.rollover_text}get officeHours(){const a=this.getAttribute(w.OFFICE_HOURS)||this.office_hours;return a&&0!==Object.keys(a).length?"string"===typeof a?a:g(JSON.stringify(a)):null}get openAriaLabel(){const a=this.getAttribute(w.NAVIGATION_ARIA_LABELS)||this.navigation_aria_labels;return a&&0!==Object.keys(a).length?("string"===typeof a? | |
JSON.parse(k(a)):a).aria_open_nav_drawer:null}get singleSignOn(){const a=this.getAttribute(wd.SINGLE_SIGN_ON)||this.single_sign_on;return a&&0!==Object.keys(a).length?"string"===typeof a?JSON.parse(k(a)):a:null}get ssoCardCta(){var a;return(null===(a=this.singleSignOn)||void 0===a?0:a.cta)?g(JSON.stringify(this.singleSignOn.cta)):null}get ssoMockApi(){var a;return null!==(a=this.singleSignOn)&&void 0!==a&&a.mock_api_data?g(this.singleSignOn.mock_api_data):null}get ssoProfileAltText(){var a;return(null=== | |
(a=this.singleSignOn)||void 0===a?void 0:a.profile_alt_text)||null}get ssoProfileCtaName(){var a;return(null===(a=this.singleSignOn)||void 0===a?void 0:a.profile_cta_name)||null}get ssoImageBuildPlaceholder(){var a,b;return(null===(b=null===(a=this.singleSignOn)||void 0===a?void 0:a.profile_image_placeholder)||void 0===b?void 0:b.url)||null}get ssoLoggedInUrl(){var a;return(null===(a=this.singleSignOn)||void 0===a?void 0:a.logged_in_url)||null}get hideOnScroll(){const a=this.getAttribute(wd.HIDE_ON_SCROLL)|| | |
this.hide_on_scroll;return"boolean"===typeof a?a:"true"===a}renderGoogleLogo(){return p` | |
<div class="glue-header__logo"> | |
<a class="glue-header__logo-link" href="#" title="Google"> | |
<div class="glue-header__logo-container"> | |
<gads-icon icon-id="GOOGLE_COLOR_LOGO" class-names="glue-header__logo-svg"></gads-icon> | |
</div> | |
${this.lockupText?p` | |
<span class="glue-header__logo--product">${this.lockupText}</span> | |
`:null} | |
</a> | |
</div> | |
`}renderSSO(a){if(!this.singleSignOn)return null;const b=this.getCtaByGtmName(E.STARTNOW)||this.getCtaByGtmName(E.CREATEANDMANAGEADS);return"is_v2"in this.singleSignOn?p` | |
<gads-single-sign-on-v2 | |
${this.singleSignOn.ads_account_status?`ads-account-status="${g(JSON.stringify(this.singleSignOn.ads_account_status))}"`:null} | |
cta='${this.ssoCardCta}' | |
cta-sign-in='${this.getCtaByGtmName(E.SIGNIN).replace(/\s{2,}/g," ").trim()}' | |
cta-start-now='${b.replace(/\s{2,}/g," ").trim()}' | |
logged-in-url='${this.ssoLoggedInUrl}' | |
mock-api-data='${this.ssoMockApi}' | |
${this.singleSignOn.modal?`modal="${g(JSON.stringify(this.singleSignOn.modal))}"`:null} | |
module-name='${this.gtmModuleName}' | |
profile-cta-name='${this.ssoProfileCtaName}' | |
profile-alt-text='${this.ssoProfileAltText}' | |
profile-image-placeholder='${this.ssoImageBuildPlaceholder}' | |
type='${a}'> | |
</gads-single-sign-on> | |
`:p` | |
<gads-single-sign-on | |
cta='${this.ssoCardCta}' | |
cta-sign-in='${this.getCtaByGtmName(E.SIGNIN).replace(/\s{2,}/g," ").trim()}' | |
cta-start-now='${b.replace(/\s{2,}/g," ").trim()}' | |
mock-api-data='${this.ssoMockApi}' | |
profile-alt-text='${this.ssoProfileAltText}' | |
profile-cta-name='${this.ssoProfileCtaName}' | |
profile-image-placeholder='${this.ssoImageBuildPlaceholder}' | |
logged-in-url='${this.ssoLoggedInUrl}' | |
type='${a}'> | |
</gads-single-sign-on> | |
`}renderStickyCTA(){var a=this.getAttribute(wd.CTA_STICKY)||this.cta_sticky;if(!a||0===Object.keys(a).length)return null;a="string"===typeof a?JSON.parse(k(a)):a;return a.cta?p` | |
<gads-sticky-cta | |
cta="${g(JSON.stringify(a.cta))}" | |
is-sticky="${a.is_sticky}"> | |
</gads-sticky-cta> | |
`:null}render(){return m` | |
<header class="glue-header glue-header--single" ${this.officeHours?`office-hours='${this.officeHours}'`:null} ${this.hideOnScroll?"hide-on-scroll":null}> | |
${this.contentJumpText?p` | |
<a href="#main-page-content" class="glue-header__link glue-header__skip-content">${this.contentJumpText}</a> | |
`:null} | |
<div class="glue-header__bar glue-header__bar--mobile"> | |
<div class="glue-header__tier"> | |
<div class="glue-header__container"> | |
<div class="glue-header__lock-up"> | |
<div class="glue-header__hamburger"> | |
<button class="glue-header__drawer-toggle-btn" ${this.openAriaLabel?`aria-label="${this.openAriaLabel}"`:null}> | |
<gads-icon icon-id="MENU" class-names="glue-icon--24px"></gads-icon> | |
</button> | |
</div> | |
${this.renderGoogleLogo()} | |
${this.renderSSO("mobile")} | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="glue-header__bar glue-header__bar--desktop glue-header__drawer"> | |
<div class="glue-header__tier"> | |
<div class="glue-header__container"> | |
<div class="glue-header__lock-up"> | |
${this.renderGoogleLogo()} | |
</div> | |
</div> | |
<div class="glue-header__container glue-header__container--linkbar"> | |
<nav class="glue-header__link-bar"></nav> | |
</div> | |
${this.ctaBlock?p` | |
<div class="glue-header__container glue-header__container--cta"> | |
<div class="glue-header__cta header-phone-number"> | |
<div class="gads-mega-nav-cta-container glue-header__container"> | |
<div class="glue-header__cta"> | |
${this.ctaBlock} | |
${this.rolloverText?p` | |
<div class="header-phone-number__rollover"> | |
<span class="glue-font-weight-medium">${this.rolloverText}</span> | |
</div> | |
`:null} | |
${this.renderSSO("desktop")} | |
</div> | |
</div> | |
</div> | |
</div> | |
`:null} | |
</div> | |
</div> | |
<div class="glue-header__drawer-backdrop"></div> | |
${this.renderStickyCTA()} | |
</header> | |
`}};customElements.define("gads-simple-nav",zd);var Ad={GADS_ADS_FORMAT:"GadsAdsFormat",GADS_SIMPLE_BULLETED_LIST:"GadsSimpleBulletedList"},Bd={CARDS:"cards",DEFAULT_CONTENT:"defaultContent",PANEL_ID:"panel-wrapper"},Cd={FADE_OUT_GREEN:"fade-out-green",FADE_OUT_WHITE:"fade-out-white",GLUE_TAB:"glue-tab",GLUE_TAB_PANELS:"glue-tabpanels",GLUE_TAB_PANELS_LIST:"glue-tabpanels__page-list",GLUE_TAB_PANELS_WRAPPER:"glue-tabpanels__panel-list"},Dd={TAB:`.${Cd.GLUE_TAB}`,TAB_PANELS:`.${Cd.GLUE_TAB_PANELS}`,TAB_PANELS_LIST:`.${Cd.GLUE_TAB_PANELS_LIST}`, | |
TAB_PANELS_WRAPPER:`.${Cd.GLUE_TAB_PANELS_WRAPPER}`},Ed=class extends M{constructor(){super(...arguments);this.cards=[];this.copy=null;this.default_content=[];this.headline=null;this.tabPanels=this.querySelector(Dd.TAB_PANELS)}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()),this.tabPanels=this.querySelector(Dd.TAB_PANELS));if(this.tabPanels&&r.GLUE in window){const a=new glue.TabPanels(this.tabPanels,{panelsCount:5,isResponsive:!1}),b=document.querySelectorAll(Dd.TAB), | |
c=a.tabsComponent,d=Dd.TAB&&r.GLUE in window&&new glue.SmoothScroll;b&&c&&b.forEach((e,f)=>{e.addEventListener(B.CLICK,()=>{const h=c.getActiveTab();e.classList.remove(Cd.FADE_OUT_GREEN,Cd.FADE_OUT_WHITE);f+1!==h&&b[h-1].classList.add(Cd.FADE_OUT_WHITE);f+1===h&&(b[f].classList.add(Cd.FADE_OUT_GREEN),setTimeout(()=>{c.setActiveTab(1);e.blur()},50));d&&d.scrollToId(Bd.PANEL_ID,{hash:!1,offset:{x:0,y:120}})})})}}get defaultContent(){const a=this.getAttribute(Bd.DEFAULT_CONTENT)||this.default_content; | |
return"string"===typeof a?JSON.parse(a):a}get headlineText(){return this.getAttribute(w.HEADLINE)||this.headline}get smallCardsObj(){const a=this.getAttribute(Bd.CARDS)||this.cards;return"string"===typeof a?JSON.parse(a):a}get copyText(){return this.getAttribute(w.COPY)||this.copy}tabContentRender(a){return null===a||void 0===a?void 0:a.map(b=>{if(b._collectionId===Ad.GADS_ADS_FORMAT&&"facets"in b)return this.adsFormatRender(b);if(b._collectionId===Ad.GADS_SIMPLE_BULLETED_LIST&&"bullets"in b)return this.simpleBulletedListRender(b)}).join("")}adsFormatRender(a){return p` | |
<gads-ads-format | |
headline="${a.headline}" | |
facets="${g(JSON.stringify(a.facets))}" | |
${a.a11y_check_copy?`accessibility-check-copy="${a.a11y_check_copy}"`:null} | |
${a.a11y_check_id?`accessibility-check-id="${a.a11y_check_id}"`:null} | |
></gads-ads-format> | |
`}simpleBulletedListRender(a){return p` | |
<gads-simple-bulleted-list | |
headline="${a.headline}" | |
copy="${a.copy}" | |
bullets="${g(JSON.stringify(a.bullets))}" | |
${a.thumbnail?`thumbnail="${g(JSON.stringify(a.thumbnail))}"`:null} | |
></gads-simple-bulleted-list> | |
`}imageRender(a){var b;return(null===(b=a.image)||void 0===b?0:b.url)?p` | |
<gads-image | |
image="${a.image.url}" | |
widths="lg:32,md:24,sm:24" | |
></gads-image> | |
`:null}render(){return m` | |
<section class="gads-small-card-content-switcher"> | |
<div class="gads-small-card-content-switcher__container"> | |
${this.headlineText?p` | |
<div class="glue-page"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-2"></div> | |
<div class="glue-grid__col glue-grid__col--span-8 glue-spacer-4-bottom glue-text-center"> | |
<h2 class="glue-headline glue-headline--headline-2 glue-spacer-2-bottom"> | |
<span class="glue-font-weight-medium">${this.headlineText}</span> | |
</h2> | |
<span class="gads-small-card-content-switcher__subheadline glue-body"> | |
${this.copyText} | |
</span> | |
</div> | |
</div> | |
</div> | |
<div class="glue-tabpanels"> | |
<div class="glue-page"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-0-sm glue-grid__col--span-0-md glue-grid__col--span-1-lg"></div> | |
<div class="glue-grid__col glue-grid__col--span-4-sm glue-grid__col--span-12-md glue-grid__col--span-10-lg"> | |
<div class="glue-tabpanels__page-list--container"> | |
<div class="glue-tabpanels__page-list glue-tabs__tablist"> | |
<div class="glue-tab glue-tab__default">default</div> | |
${this.smallCardsObj.map(a=>p` | |
<div data-g-module-name="gads-small-card-content-switcher" | |
data-g-cta-name="${a.gtm_cta_name}" | |
class="glue-tab"> | |
${a.thumbnail?this.imageRender(a.thumbnail):null} | |
<span class="glue-tab__title glue-headline glue-headline--headline-6"> | |
${a.headline} | |
</span> | |
<span class="glue-tab__subtitle glue-small-text"> | |
${a.copy} | |
</span> | |
</div> | |
`)} | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
`:""} | |
<div class="glue-tabpanels__panel-list" id="panel-wrapper"> | |
<div id="gads-small-card-content-switcher-tab-0"> | |
<div id="gads-small-card-content-switcher-tab-0-content" | |
class="glue-tabpanels__panel-content"> | |
${this.tabContentRender(this.defaultContent)} | |
</div> | |
</div> | |
${this.smallCardsObj.map((a,b)=>p` | |
<div id="gads-small-card-content-switcher-tab-${b+1}"> | |
<div id="gads-small-card-content-switcher-tab-${b+1}-content" | |
class="glue-tabpanels__panel-content"> | |
${this.tabContentRender(a.content)} | |
</div> | |
</div> | |
`)} | |
</div> | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-small-card-content-switcher",Ed);var Fd=class{constructor(){this.result=new Map}init(a){const b=[...a.querySelectorAll(".mdc-text-field:not(.leadgenautocomplete)")],c=[...a.querySelectorAll(".mdc-select")];a=[...a.querySelectorAll(".mdc-form-field")];b.forEach(d=>{const e=new mdc.textField.MDCTextField(d),f=d.querySelector("input");e.listen(B.CHANGE,()=>{const l=new CustomEvent(B.FORM_UPDATE,{bubbles:!0,detail:{id:null===f||void 0===f?void 0:f.name,valid:e.valid&&""!==(null===f||void 0===f?void 0:f.value),value:null===f||void 0=== | |
f?void 0:f.value}});d.dispatchEvent(l)});const h=d.getAttribute("key");h&&this.result.set(h,e)});c.forEach(d=>{const e=new mdc.select.MDCSelect(d);e.listen(B.MDC_SELECT_CHANGE,()=>{const h=new CustomEvent(B.FORM_UPDATE,{bubbles:!0,detail:{id:e.selectedText.id,valid:e.valid&&""!==e.value,value:e.value,selectedText:e.selectedText.textContent}});d.dispatchEvent(h)});const f=d.getAttribute("key");f&&this.result.set(f,e)});a.forEach(d=>{const e=new mdc.formField.MDCFormField(d),f=d.querySelector(".mdc-checkbox"), | |
h=d.querySelector("input");if(f){const l=new mdc.checkbox.MDCCheckbox(d);e.input=l;l.listen(B.CLICK,()=>{const n=new CustomEvent(B.FORM_UPDATE,{bubbles:!0,detail:{id:null===h||void 0===h?void 0:h.name,value:l.checked,valid:l.checked}});d.dispatchEvent(n)})}});return this.result}};var Gd=class extends M{constructor(){super(...arguments);this.leadgen_data=this.form_name=this.agree_terms=this.agree_contact=this.fields_required_industry=this.field_industry=this.field_budget_option_4=this.field_budget_option_3=this.field_budget_option_2=this.field_budget_option_1=this.field_budget=this.field_marketing_objective_brand_awareness=this.field_marketing_objective_leads=this.field_marketing_objective_offline_sales=this.field_marketing_objective_online_sales=this.field_marketing_objective= | |
this.field_business_email=this.field_business_website=this.field_business_name=this.field_first_name=this.fields_required_message=this.disclaimer=this.fail_message=this.fail_headline=this.thankyou_message=this.thankyou_headline=this.recaptcha_site_key=this.leadgen_industries_url=this.cta_label=this.copy_required_fields=this.copy=this.headline=null;this.modalTriggerCtas=document.querySelectorAll('[href="#smart-calc-form"]');this.modalEl=this.querySelector(".smart-calc-modal");this.modalCloseBtn=this.querySelector(".smart-calc-modal .glue-modal__close-btn"); | |
this.formEl=this.querySelector(".smart-calc-form-el");this.formInputEls=this.querySelectorAll("input");this.mdcInputs=(new Fd).init(this);this.formInputSubid=this.querySelector('input[name="subid"]');this.formRequiredCheckboxes=this.querySelectorAll(".smart-calc-form-required-checkbox");this.formRecaptchaContainer=this.querySelector(".recaptcha-container");this.submitBtn=this.querySelector(".submit-btn");this.data={budget:"","collects-pii-spii-checkbox":"",company:"",email:"",firstName:"","g-recaptcha-response":"", | |
industry:"",Legaldisclaimer:"",marketingobjective:"",website:""};this.recaptchaSuccess=!0;this.leadgenJsonLoaded=this.leadgenInit=!1;this.urlSubidParam=(new URLSearchParams(window.location.search)).get("subid")||"";this.formbox_url=""}get headlineText(){return this.getAttribute(w.HEADLINE)||this.headline}get copyText(){return this.getAttribute(w.COPY)||this.copy}get copyRequiredFieldsText(){return this.getAttribute("copy_required_fields")||this.copy_required_fields}get ctaLabelText(){return this.getAttribute("cta_label")|| | |
this.cta_label}get leadgenIndustriesUrl(){return this.getAttribute("leadgen_industries_url")||this.leadgen_industries_url}get recaptchaSiteKey(){return this.getAttribute("recaptcha_site_key")||this.recaptcha_site_key}get thankyouHeadlineText(){return this.getAttribute("thankyou_headline")||this.thankyou_headline}get thankyouMessageText(){return this.getAttribute("thankyou_message")||this.thankyou_message}get failHeadlineText(){return this.getAttribute("fail_headline")||this.fail_headline}get failMessageText(){return this.getAttribute("fail_message")|| | |
this.fail_message}get agreeContactText(){return this.getAttribute("agree_contact")||this.agree_contact}get agreeTermsText(){return this.getAttribute("agree_terms")||this.agree_terms}get requiredIndustryText(){return this.getAttribute("fields_required_industry")||this.fields_required_industry}get formBoxContent(){return{disclaimer:this.disclaimer||"",generic_validation_text:this.getAttribute("fields_required_message")||this.fields_required_message,formbox_elements:[{id:"firstName",field_name:"firstName", | |
label:this.getAttribute("field_first_name")||this.field_first_name,required:!0,type:"text"},{id:"company",field_name:"company",label:this.getAttribute("field_business_name")||this.field_business_name,required:!0,type:"text"},{id:"website",field_name:"website",label:this.getAttribute("field_business_website")||this.field_business_website,pattern:"^(http:\\/\\/www\\.|https:\\/\\/www\\.|Http:\\/\\/|http:\\/\\/|Https:\\/\\/|https:\\/\\/)?[A-Za-z0-9]+([\\-\\.]{1}[A-Za-z0-9]+)*\\.[A-Za-z]{2,5}(:[0-9]{1,5})?(\\/.*)?$", | |
required:!0,type:"text"},{id:"email",field_name:"email",label:this.getAttribute("field_business_email")||this.field_business_email,pattern:"[a-zA-Z0-9\\._%+\\-]+@[a-zA-Z0-9\\.\\-]+\\.[a-zA-Z]{2,}$",required:!0,type:"email"},{id:"marketingobjective",field_name:"marketingobjective",label:this.getAttribute("field_marketing_objective")||this.field_marketing_objective,options:[{label:this.getAttribute("field_marketing_objective_online_sales")||this.field_marketing_objective_online_sales,value:"online-sales"}, | |
{label:this.getAttribute("field_marketing_objective_offline_sales")||this.field_marketing_objective_offline_sales,value:"offline-sales"},{label:this.getAttribute("field_marketing_objective_leads")||this.field_marketing_objective_leads,value:"leads"},{label:this.getAttribute("field_marketing_objective_brand_awareness")||this.field_marketing_objective_brand_awareness,value:"brand-awareness"}],required:!0,type:"select"},{id:"budget",field_name:"budget",label:this.getAttribute("field_budget")||this.field_budget, | |
options:[{label:this.getAttribute("field_budget_option_1")||this.field_budget_option_1,value:"budget-option-1"},{label:this.getAttribute("field_budget_option_2")||this.field_budget_option_2,value:"budget-option-2"},{label:this.getAttribute("field_budget_option_3")||this.field_budget_option_3,value:"budget-option-3"},{label:this.getAttribute("field_budget_option_4")||this.field_budget_option_4,value:"budget-option-4"}],required:!0,type:"select"},{id:"industry",field_name:"industry",label:this.getAttribute("field_industry")|| | |
this.field_industry,required:!0,type:"leadgenautocomplete"},{id:"Form_name__c",field_name:"Form_name__c",initial_value:this.getAttribute("form_name")||this.form_name,label:"Form_name__c",type:"hidden"},{id:"subid",field_name:"subid",initial_value:"",label:"Subid",type:"hidden"}]}}connectedCallback(){var a,b,c=document.createElement("link");c.rel="stylesheet";c.href="https://www.gstatic.com/glue/v26_0/glue-material.min.css";document.head.appendChild(c);c=document.createElement("script");c.src="https://www.google.com/recaptcha/api.js"; | |
document.body.appendChild(c);c=document.createElement("script");c.src="https://www.gstatic.com/glue/v26_0/material-components-web.min.js";document.body.appendChild(c);this.firstElementChild||this.replaceChildren(this.render());this.modalTriggerCtas=document.querySelectorAll('[href="#smart-calc-form"]');this.modalEl=this.querySelector(".smart-calc-modal");this.modalCloseBtn=this.querySelector(".smart-calc-modal .glue-modal__close-btn");this.formEl=this.querySelector(".smart-calc-form-el");this.formInputEls= | |
this.querySelectorAll("input");this.formRecaptchaContainer=this.querySelector(".recaptcha-container");this.formRequiredCheckboxes=this.querySelectorAll(".smart-calc-form-required-checkbox");this.submitBtn=this.querySelector(".submit-btn");this.formboxUrl=(null===(a=this.formEl)||void 0===a?void 0:a.dataset.fbxUrl)||"";const d=this.data;[...this.formInputEls].forEach(l=>{l=l.name;const n=this.mdcInputs.get(l),t=(null===n||void 0===n?void 0:n.value)||"";n&&(d[l]=t)});r.GLUE in window&&this.modalEl&& | |
this.modalTriggerCtas&&[...this.modalTriggerCtas].forEach(l=>{const n=new glue.Modal(this.modalEl,l,this.modalCloseBtn);l.addEventListener(B.CLICK,()=>{this.leadgenInit||this.initLeadgen();n.open()})});const e=l=>{this.data["g-recaptcha-response"]=l;this.checkValid(this.recaptchaSuccess=!0)},f=()=>this.checkValid(this.recaptchaSuccess=!1),h=(null===(b=this.modalEl)||void 0===b?void 0:b.getAttribute("data-recaptcha"))||"";this.isJsAgent()||window.addEventListener(B.LOAD,()=>{grecaptcha.ready(()=>{r.G_RECAPTCHA in | |
window&&this.formRecaptchaContainer&&grecaptcha.render(this.formRecaptchaContainer,{sitekey:h,callback:e,"expired-callback":f})})});this.formInputSubid&&(this.formInputSubid.value=this.urlSubidParam);a=this.querySelector('input[name="Form_name__c"]');this.formNameCValue=null===a||void 0===a?void 0:a.value;this.checkValid();this.addEventListener(B.FORM_UPDATE,l=>{({detail:l}=l);if(l){const n=l.value;d[l.id]=l.valid?n:""}this.checkValid()});this.submitBtn&&this.submitBtn.addEventListener(B.CLICK,l=> | |
{l.preventDefault();this.submitHandler()});window.addEventListener(B.PAGESHOW,()=>{this.checkValid(this.recaptchaSuccess=!1);grecaptcha.ready(()=>grecaptcha.reset())})}checkValid(a=this.recaptchaSuccess){var b;const c=Object.values(this.data).every(Boolean);a=a&&[...this.formRequiredCheckboxes].every(d=>d.checked);null===(b=this.submitBtn)||void 0===b?void 0:b.toggleAttribute(w.DISABLED,!c||!a)}async submitHandler(){var a,b;null===(a=this.submitBtn)||void 0===a?void 0:a.setAttribute(w.DISABLED,"true"); | |
null===(b=this.submitBtn)||void 0===b?void 0:b.blur();this.formboxUrl&&(a={formbox_url:this.formboxUrl},this.modalEl&&(this.modalEl.setAttribute("view","LOADING"),await this.saveFormbox(this.data,a).then(()=>{var c;return null===(c=this.modalEl)||void 0===c?void 0:c.setAttribute("view","THANKS")}).catch(c=>{if(this.modalEl)throw this.modalEl.setAttribute("view","FAIL"),Error("Could not save lead data: "+c);})))}async initLeadgen(){var a;const b=this.querySelector("#leadgen-dropdown"),c=this.querySelector("leadgen-autocomplete"); | |
await this.handleLeadgenJSON(b,c);this.setupIndustryGroups(c);this.setupLeadgenInput(c);null===(a=this.modalEl)||void 0===a?void 0:a.setAttribute("view","FORM");this.leadgenInit=!0}isJsAgent(){return window.navigator.userAgent.includes(r.JSDOM)}async handleLeadgenJSON(a,b){var c;const d=(null===(c=this.modalEl)||void 0===c?void 0:c.getAttribute("data-source"))||"";(c=await this.getIndustriesJSON(d))?(c=await this.renderLeadgen(c),a&&b&&(a.innerHTML=c,b.appendChild(a.content.cloneNode(!0)))):this.leadgenJsonLoaded= | |
!1}setupIndustryGroups(a){const b=null===a||void 0===a?void 0:a.querySelector(".mdc-select__menu");a=[...((null===a||void 0===a?void 0:a.querySelectorAll('[is="industry-group-title"]'))||[])];b&&this.leadgenJsonLoaded&&a.forEach(c=>{this.setupIndustryObserver(c);this.setupIndustryGroupObserver(c,b)})}setupIndustryObserver(a){[...a.querySelectorAll("li")].forEach(b=>{var c,d;const e=null===(d=null===(c=b.querySelector(".mdc-list-item__text"))||void 0===c?void 0:c.textContent)||void 0===d?void 0:d.toLowerCase(); | |
(new MutationObserver(f=>{f.forEach(h=>{"attributes"===h.type&&h.target instanceof HTMLElement&&(h=(h=h.target.getAttribute(h.attributeName||""))&&(null===e||void 0===e?void 0:e.includes(h.toLowerCase())),b.classList.toggle(A.HIDDEN,!h))})})).observe(b,{attributes:!0,attributeFilter:["query"]})})}setupIndustryGroupObserver(a,b){(new MutationObserver(()=>{const c=![...a.querySelectorAll("li")].some(d=>!d.classList.contains(A.HIDDEN));a.classList.toggle(A.HIDDEN,c)})).observe(b,{attributes:!0,attributeFilter:["class"], | |
subtree:!0})}setupLeadgenInput(a){var b=document.querySelector(".mdc-text-field.leadgenautocomplete");r.MDC in window&&b&&(b=new mdc.textField.MDCTextField(b),this.leadgenJsonLoaded?(this.setupLeadgenKeyUpEvent(b,a),this.setupLeadgenFocusOutEvent(b,a),this.setupLeadgenClickEvent(b,a)):this.setupDefaultLeadgenValidation(b))}setupLeadgenKeyUpEvent(a,b){const c=null===b||void 0===b?void 0:b.querySelector(".mdc-select__menu"),d=[...((null===b||void 0===b?void 0:b.querySelectorAll('[is="industry-group-title"]'))|| | |
[])],e=null===b||void 0===b?void 0:b.querySelectorAll('[is="industry-title"]');a.listen(B.INPUT,f=>{const h=""===a.value;h?(null===c||void 0===c?void 0:c.classList.remove("mdc-menu-surface--open"),a.valid=!1):(new Promise(l=>{null===e||void 0===e?void 0:e.forEach(n=>{n.setAttribute("query",a.value)});l(!0)})).then(()=>{setTimeout(()=>{var l=!h&&d.some(n=>!n.classList.contains(A.HIDDEN));null===c||void 0===c?void 0:c.classList.toggle("mdc-menu-surface--open",l);a.valid=l;l=f.target;if(l instanceof | |
HTMLElement){const n=new CustomEvent(B.FORM_UPDATE,{bubbles:!0,detail:{id:"industry",valid:!1,value:""}});l.dispatchEvent(n)}},100)})})}setupLeadgenFocusOutEvent(a,b){const c=null===b||void 0===b?void 0:b.querySelector(".mdc-select__menu");a.listen(B.FOCUSOUT,()=>{""===a.value&&(null===c||void 0===c?void 0:c.classList.remove("mdc-menu-surface--open"),a.valid=!1)})}setupLeadgenClickEvent(a,b){const c=null===b||void 0===b?void 0:b.querySelector(".mdc-select__menu");null===b||void 0===b?void 0:b.addEventListener(B.CLICK, | |
d=>{var e;d=d.target;if(d instanceof HTMLElement&&d.classList.contains("clickable")){const f=d.getAttribute("group-title")||"",h=(null===(e=d.textContent)||void 0===e?void 0:e.trim())||a.value;e=`${f} - ${h}`;a.value=e;e=new CustomEvent(B.FORM_UPDATE,{bubbles:!0,detail:{id:"industry",valid:a.valid&&""!==a.value,value:e}});d.dispatchEvent(e);null===c||void 0===c?void 0:c.classList.remove("mdc-menu-surface--open")}})}setupDefaultLeadgenValidation(a){const b=document.querySelector("#industry-helper-text"), | |
c=document.querySelectorAll(".mdc-text-field-helper-text").item(0);b&&c&&(b.innerHTML=c.innerHTML);a.useNativeValidation=!0}getLeadgeData(){const a=this.getAttribute("leadgen_data")||"{}";return JSON.parse(k(a))}async getIndustriesJSON(a){if(""===a&&this.hasAttribute("leadgen_data"))return this.leadgenJsonLoaded=!0,this.getLeadgeData();a=await fetch(a);if(a.ok)return this.leadgenJsonLoaded=!0,a.json();404===a.status?console.warn("JSON file not found at the specified URL."):console.warn("An error occurred while fetching the JSON.")}async renderLeadgen(a){const b= | |
[];try{for(const c in a)if(c){let d=`<li><ul is="industry-group-title"><span class="group-title">${c}</span>`;const e=a[c];for(const f of e)f&&(d+=`<li is="industry-title" class="mdc-list-item clickable" group-title="${c}">`,d+='<span class="mdc-list-item__ripple"></span>',d+=`<span class="mdc-list-item__text clickable" group-title="${c}">${f}`,d+="</span></li>");d+="</ul></li>";b.push(d)}}catch(c){console.warn("Could not render Industries field: "+c)}return` | |
<div class="mdc-select__menu mdc-menu mdc-menu-surface"> | |
<ul role="listbox" class="mdc-list">${b.join("")}</ul> | |
</div> | |
`}saveFormbox(a,b){const c=new FormData;c.append("budget",`${a.budget}`);c.append("collects-pii-spii-checkbox",`${a["collects-pii-spii-checkbox"]}`);c.append("company",`${a.company}`);c.append("email",`${a.email}`);c.append("firstName",`${a.firstName}`);c.append("Form_name__c",`${this.formNameCValue}`);c.append("g-recaptcha-response",`${a["g-recaptcha-response"]}`);c.append("industry",`${a.industry}`);c.append("Legaldisclaimer",`${a.Legaldisclaimer}`);c.append("marketingobjective",`${a.marketingobjective}`); | |
c.append("subid",`${this.urlSubidParam}`);c.append("website",`${a.website}`);return this.postFetchHandler(b.formbox_url,c)}async postFetchHandler(a,b,c){return fetch(a,{method:"POST",body:b,headers:c}).then(d=>{if(!d.ok)throw Error("Response error: "+d);return d.json()}).then(d=>d).catch(d=>{throw Error("Save post error: "+d);})}get formboxUrl(){return this.getAttribute("formbox-url")||this.formbox_url}set formboxUrl(a){this.formbox_url=a}renderModalHeader(){return p` | |
<div class="smart-calc-form-headline glue-grid__col glue-grid__col--span-0 glue-grid__col--span-2-md glue-grid__col--span-1-xl"></div> | |
<div class="smart-calc-form-headline glue-text-center glue-grid__col | |
glue-grid__col--span-8 glue-spacer-5-bottom"> | |
<h2 id="modal-label" class="glue-headline glue-headline--headline-2 glue-spacer-2-bottom"> | |
<span class="glue-font-weight-medium">${this.headlineText}</span> | |
</h2> | |
<p id="modal-content"> | |
${this.copyText} | |
</p> | |
</div> | |
`}renderLoading(){return p` | |
<div class="smart-calc-form-loading"> | |
<svg class="spinner" role="presentation" width="65px" height="65px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"> | |
<circle class="path" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"></circle> | |
</svg> | |
</div> | |
`}renderForm(){var a,b;const c=(null===(a=this.formBoxContent)||void 0===a?0:a.disclaimer)?` | |
<p class="glue-small-text glue-spacer-3-bottom">${this.formBoxContent.disclaimer}</p> | |
`:"";a=` | |
<div class="smart-calc-form-disclaimer glue-grid__col glue-grid__col--span-3-md glue-grid__col--span-2-xl"></div> | |
<div class="smart-calc-form-disclaimer glue-grid__col glue-grid__col--span-1-md"></div> | |
<div class="smart-calc-form-disclaimer glue-grid__col glue-grid__col--span-10 glue-grid__col--span-8-xl glue-spacer-3-top"> | |
<span class="glue-small-text">${this.copyRequiredFieldsText}</span> | |
</div> | |
`;return p` | |
<div class="glue-grid__col glue-grid__col--span-0 glue-grid__col--span-3-md glue-grid__col--span-2-xl"></div> | |
<section id="smart-calc-form-section" aria-live="polite" | |
class="smart-calc-form-section glue-grid__col glue-grid__col--span-6"> | |
<form class="glue-form smart-calc-form-el" is="smart-calc-form-section" | |
data-fbx-url="${this.formboxUrl}" | |
autocomplete="off"> | |
<ul class="glue-form__group"> | |
${null===(b=this.formBoxContent)||void 0===b?void 0:b.formbox_elements.map(d=>{if("hidden"===d.type)return` | |
<input class="smart-calc-form-hidden-input" type="hidden" | |
name="${d.field_name}" value="${d.initial_value}" required /> | |
`;let e;"text"===d.type||"email"===d.type||"tel"===d.type?e=this.renderInput(d.field_name,d.label,!0,d.type,this.formBoxContent.generic_validation_text,d.pattern):"select"===d.type&&d.options?e=this.renderSelect(d.field_name,d.label,d.options,!0,this.formBoxContent.generic_validation_text):"leadgenautocomplete"===d.type&&(e=this.renderInput(d.field_name,d.label,!0,d.type,this.requiredIndustryText)+'\n <leadgen-autocomplete>\n <template id="leadgen-dropdown">\n </template>\n </leadgen-autocomplete>\n '); | |
return` | |
<li class="glue-form__element">${e}</li> | |
`})} | |
<li class="glue-form__element glue-spacer-4-top glue-spacer-5-bottom"> | |
${this.renderCheckboxes()} | |
</li> | |
</ul> | |
<div class="glue-text-center"> | |
${c} | |
${'\n <div class="recaptcha-container glue-spacer-5-bottom"></div>\n '} | |
<button disabled | |
class="disabled glue-button glue-button--high-emphasis submit-btn" data-g-cta-name="get-your-media-plan"> | |
${this.ctaLabelText} | |
</button> | |
</div> | |
</form> | |
</section> | |
${a} | |
`}renderInput(a,b,c,d,e,f=""){return p` | |
<label key="${a}" class="form-element mdc-text-field mdc-text-field--outlined | |
mdc-text-field--with-trailing-icon glue-text-field ${c?"glue-text-field--required":""} ${d}"> | |
<input class="mdc-text-field__input" | |
name="${a}" | |
type="${d||"text"}" | |
aria-labelledby="${a}-label" | |
${e?`aria-controls="${a}-helper-text"`:""} | |
${c?"required":""} | |
${f?`pattern="${f}"`:""}> | |
<svg class="mdc-text-field__icon mdc-text-field__icon--trailing glue-icon" role="presentation" aria-hidden="true" viewBox="0 0 24 24"> | |
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" /> | |
</svg> | |
<span class="mdc-notched-outline"> | |
<span class="mdc-notched-outline__leading"></span> | |
<span class="mdc-notched-outline__notch"> | |
<span class="mdc-floating-label" id="${a}-label">${b}</span> | |
</span> | |
<span class="mdc-notched-outline__trailing"></span> | |
</span> | |
</label> | |
${e?` | |
<div class="mdc-text-field-helper-line"> | |
<div id="${a}-helper-text" aria-hidden="true" | |
class="mdc-text-field-helper-text mdc-text-field-helper-text--validation-msg"> | |
${e} | |
</div> | |
</div> | |
`:""} | |
`}renderSelect(a,b,c,d,e){return p` | |
<div key="${a}" class="mdc-select mdc-select--outlined | |
glue-select form-element ${d?"mdc-select--required":""}"> | |
<input type="hidden" name="${a}"> | |
<div class="mdc-select__anchor" role="button" aria-haspopup="listbox" | |
aria-labelledby="label-${a} ${a}" aria-controls="${a}-helper-text" | |
aria-describedby="${a}-helper-text"> | |
<span id="${a}" class="mdc-select__selected-text"></span> | |
<span class="mdc-select__dropdown-icon"> | |
<svg class="mdc-select__dropdown-icon-graphic" viewBox="7 10 10 5"> | |
<polygon class="mdc-select__dropdown-icon-inactive" stroke="none" fill-rule="evenodd" points="7 10 12 15 17 10"></polygon> | |
<polygon class="mdc-select__dropdown-icon-active" stroke="none" fill-rule="evenodd" points="7 15 12 10 17 15"></polygon> | |
</svg> | |
</span> | |
<span class="mdc-notched-outline"> | |
<span class="mdc-notched-outline__leading"></span> | |
<span class="mdc-notched-outline__notch"> | |
<span id="label-${a}" class="mdc-floating-label">${b}</span> | |
</span> | |
<span class="mdc-notched-outline__trailing"></span> | |
</span> | |
</div> | |
<div class="mdc-select__menu mdc-menu mdc-menu-surface"> | |
<ul class="mdc-list" role="listbox"> | |
<li class="mdc-list-item mdc-list-item--selected" data-value="" | |
role="option" aria-selected="true" | |
aria-setsize="${c.length}" aria-posinset="1"> | |
<span class="mdc-list-item__ripple"></span> | |
</li> | |
${c.filter(f=>null!==f.label).map((f,h)=>p` | |
<li class="mdc-list-item" data-value="${f.value||`${a}'-'${h+1}`}" role="option" | |
aria-setsize="${c.length}" aria-posinset="${h+2}"> | |
<span class="mdc-list-item__ripple"></span> | |
<span class="mdc-list-item__text">${f.label||f}</span> | |
</li> | |
`)} | |
</ul> | |
</div> | |
</div> | |
<p id="${a}-helper-text"class="mdc-select-helper-text | |
mdc-select-helper-text--validation-msg glue-select-helper-text"> | |
${e} | |
</p> | |
`}renderCheckboxes(){return p` | |
<div class="mdc-touch-target-wrapper glue-spacer-3-bottom"> | |
${this.agreeContactText?` | |
<div class="mdc-form-field"> | |
<div class="mdc-checkbox mdc-checkbox--touch glue-checkbox"> | |
<input type="checkbox" class="smart-calc-form-required-checkbox mdc-checkbox__native-control" | |
id="Legaldisclaimer" name="Legaldisclaimer"> | |
<div class="mdc-checkbox__background"> | |
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24"> | |
<path class="mdc-checkbox__checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path> | |
</svg> | |
<div class="mdc-checkbox__mixedmark"></div> | |
</div> | |
<div class="mdc-checkbox__ripple"></div> | |
</div> | |
<label for="Legaldisclaimer"> | |
${this.agreeContactText} | |
</label> | |
</div> | |
`:""} | |
</div> | |
<div class="mdc-touch-target-wrapper"> | |
${this.agreeTermsText?` | |
<div class="mdc-form-field"> | |
<div class="mdc-checkbox mdc-checkbox--touch glue-checkbox"> | |
<input type="checkbox" class="smart-calc-form-required-checkbox mdc-checkbox__native-control" | |
id="collects-pii-spii-checkbox" name="collects-pii-spii-checkbox"> | |
<div class="mdc-checkbox__background"> | |
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24"> | |
<path class="mdc-checkbox__checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path> | |
</svg> | |
<div class="mdc-checkbox__mixedmark"></div> | |
</div> | |
<div class="mdc-checkbox__ripple"></div> | |
</div> | |
<label for="collects-pii-spii-checkbox"> | |
${this.agreeTermsText} | |
</label> | |
</div> | |
`:""} | |
</div> | |
`}renderThankYou(){return p` | |
<div class="smart-calc-thank-you glue-text-center | |
glue-grid__col glue-grid__col--span-12 glue-grid__col--span-10-xl"> | |
<p class="glue-headline glue-headline--headline-4">${this.thankyouHeadlineText}</p> | |
<p>${this.thankyouMessageText}<p> | |
</div> | |
`}renderFailMsg(){return p` | |
<div class="smart-calc-fail-msg glue-text-center | |
glue-grid__col glue-grid__col--span-12 glue-grid__col--span-10-xl"> | |
<p class="glue-headline glue-headline--headline-4">${this.failHeadlineText}</p> | |
<p>${this.failMessageText}<p> | |
</div> | |
`}render(){return m` | |
<div class="smart-calc-modal glue-modal glue-modal--dark" role="dialog" aria-modal="true" | |
aria-labelledby="modal-label" aria-describedby="modal-content" view="INIT" | |
data-source="${this.leadgenIndustriesUrl}" data-recaptcha="${this.recaptchaSiteKey}"> | |
<div class="glue-page"> | |
<div class="glue-grid modal-wrapper"> | |
<div class="glue-grid__col glue-grid__col--span-1-xl"></div> | |
<div class="smart-calc-modal-container glue-grid__col | |
glue-grid__col--span-12 glue-grid__col--span-10-xl"> | |
<div class="glue-grid glue-spacer-6-top glue-spacer-5-bottom"> | |
${this.renderModalHeader()} | |
${this.renderLoading()} | |
${this.renderForm()} | |
${this.renderThankYou()} | |
${this.renderFailMsg()} | |
</div> | |
<button class="glue-modal__close-btn" aria-label="Close the modal"></button> | |
</div> | |
</div> | |
</div> | |
</div> | |
`}};customElements.define("gads-smart-calc-form",Gd);var Hd=class extends M{constructor(){super(...arguments);this.main_headline=this.tabbar_id="";this.tabs=null;this.visually_hidden_headline="";this.tabPanels=this.querySelector(".glue-tabpanels")}connectedCallback(){var a;this.firstElementChild||(this.replaceChildren(this.render()),this.tabPanels=this.querySelector(".glue-tabpanels"));if(this.tabPanels&&r.GLUE in window){const b={panelsCount:(null===(a=this.tabs)||void 0===a?void 0:a.length)||2};new glue.TabPanels(this.tabPanels,b)}}get tabsList(){const a= | |
this.getAttribute("tabs")||this.tabs;return"string"===typeof a?JSON.parse(k(a)):a}get tabBarId(){return this.getAttribute("tabbar-id")||this.tabbar_id}get tabNames(){return this.tabsList.map(a=>p`<div data-g-module-name="gads-tab-bar" data-g-cta-name="${a.gtm_cta_name}">${a.tab_text}</div>`).join("")}get headlineText(){return this.getAttribute(w.HEADLINE)||this.main_headline}get visuallyHiddenHeadline(){return this.getAttribute("visually-hidden-headline")||this.visually_hidden_headline}tabPanelImageRender(a, | |
b,c){return p` | |
<gads-image | |
image="${a}" | |
widths="xl:593,lg:511,md:369,sm:599" | |
${b?`alt-text="${g(b)}"`:null} | |
round-corners | |
lazy-trigger=".gads-tab-bar__panel-image" | |
${c?w.HAS_TRANSPARENCY:""}> | |
</gads-image> | |
`}htmlImagestabPanelImageRender(a,b){return p` | |
<gads-image | |
images="${g(JSON.stringify([a]))}" | |
widths="xl:593,lg:511,md:369,sm:599" | |
round-corners | |
lazy-trigger=".gads-tab-bar__panel-image" | |
${b?w.HAS_TRANSPARENCY:""}> | |
</gads-image> | |
`}buildHeadline(){return this.headlineText?p` | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-0 glue-grid__col--span-1-md glue-grid__col--span-2-lg"></div> | |
<div class="glue-grid__col glue-grid__col--span-4-sm glue-grid__col--span-10-md glue-grid__col--span-8-lg"> | |
<h2 class="glue-headline glue-headline--headline-2 glue-text-center glue-spacer-3-bottom"> | |
<span class="glue-font-weight-medium">${this.headlineText}</span> | |
</h2> | |
</div> | |
</div> | |
`:this.visuallyHiddenHeadline?p` | |
<h2 class="glue-visually-hidden"> | |
${this.visuallyHiddenHeadline} | |
</h2> | |
`:""}tabPanelRender(a,b){var c,d,e,f,h,l;return p` | |
<div id="${this.tabBarId}-tab-${b}"> | |
<h2 class="glue-tabpanels__panel-toggle"> | |
<div class="glue-tabpanels__panel-button" id="${this.tabBarId}-tab-${b}-toggle"> | |
<span class="glue-tabpanels__panel-title">${a.tab_text}</span> | |
<svg role="presentation" aria-hidden="true" class="glue-icon glue-expansion-panel__header-arrow" viewBox="0 0 24 24"> | |
<path d="M5.41 7.59L4 9l8 8 8-8-1.41-1.41L12 14.17" /> | |
</svg> | |
</div> | |
</h2> | |
<div id="${this.tabBarId}-tab-${b}-content" class="glue-tabpanels__panel-content"> | |
<div class="glue-grid"> | |
<div class="gads-tab-bar__panel-image glue-grid__col glue-grid__col--span-5"> | |
${(null===(d=null===(c=a.image.html_image)||void 0===c?void 0:c.image)||void 0===d?0:d.url)&&(null===(e=a.image.html_image)||void 0===e?0:e.content)&&a.image.use_html_image?this.htmlImagestabPanelImageRender(a.image,a.image.has_transparency):this.tabPanelImageRender(a.image.image.url,a.image.aria_description,a.image.has_transparency)} | |
</div> | |
<div class="gads-tab-bar__panel-copy glue-grid__col glue-grid__col--span-5"> | |
<h3 class="glue-headline glue-headline--headline-4 glue-spacer-2-bottom"> | |
<span class="glue-font-weight-medium">${a.content_heading}</span> | |
</h3> | |
<p>${a.content_body}</p> | |
</div> | |
<div class="gads-tab-bar__panel-image glue-grid__col glue-grid__col--span-5"> | |
${(null===(h=null===(f=a.image.html_image)||void 0===f?void 0:f.image)||void 0===h?0:h.url)&&(null===(l=a.image.html_image)||void 0===l?0:l.content)&&a.image.use_html_image?this.htmlImagestabPanelImageRender(a.image,a.image.has_transparency):this.tabPanelImageRender(a.image.image.url,a.image.aria_description,a.image.has_transparency)} | |
</div> | |
</div> | |
</div> | |
</div> | |
`}render(){return m` | |
<section class="glue-page glue-spacer-6-top glue-spacer-6-bottom"> | |
${this.buildHeadline()} | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-1"></div> | |
<div class="glue-grid__col glue-grid__col--span-10"> | |
<div class="glue-tabpanels glue-tabpanels--centeredtabs"> | |
<div class="glue-tabpanels__page-list"> | |
${this.tabNames} | |
</div> | |
<div class="glue-tabpanels__panel-list"> | |
${this.tabsList.map((a,b)=>this.tabPanelRender(a,b))} | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-tab-bar",Hd);var Id=class extends M{constructor(){super(...arguments);this._panelsEl=this.querySelector(".glue-expansion-panels");this.headline=this.copy="";this.icon=[];this.layout_order="";this.panels=[];this.show_expansion_panels=!1}connectedCallback(){this.firstElementChild||(this.replaceChildren(this.render()),this._panelsEl=this.querySelector(".glue-expansion-panels"));r.GLUE in window&&this._panelsEl&&new glue.ExpansionPanels(this._panelsEl)}get gtmModuleName(){return this.nodeName}get headlineText(){return this.getAttribute(w.HEADLINE)|| | |
this.headline}get copyText(){return this.getAttribute(w.COPY)||this.copy}get layoutOrder(){return this.getAttribute("layout-order")||this.layout_order}get panelsObj(){const a=this.getAttribute(w.PANELS)||this.panels;return"string"===typeof a?JSON.parse(k(a)):a}get showExpansionPanels(){return this.hasAttribute("show-expansion-panels")||this.show_expansion_panels}checkCopy(a){return this.showExpansionPanels?a.headline:`${a.headline} - ${a.copy}`}panelBuilder(){const a=this.showExpansionPanels;return this.panelsObj.map((b, | |
c)=>{var d,e;return p` | |
<div class="glue-expansion-panel ${a?"":"is-static"}"> | |
<h3 class="glue-expansion-panel__toggle"> | |
<span class="glue-expansion-panel__button column-expansion-panel ${a?"":"gads-contact-hub-panel__button--no-pointer"}" | |
id="panel-${c}-toggle" data-glue-expansion-panel-toggle-for="panel-${c}-content" ${a?"":'aria-expanded="true"'}> | |
${(null===(e=null===(d=b.icon)||void 0===d?void 0:d.image)||void 0===e?0:e.url)?p` | |
<gads-image aria-hidden="true" | |
image="${b.icon.image.url}" | |
widths="sm:24" | |
lazy> | |
</gads-image> | |
`:""} | |
<span class="glue-expansion-panel__header-text">${b.headline}</span> | |
${b.copy?p` | |
<svg aria-hidden="true" viewBox="0 0 24 24" class="glue-icon glue-expansion-panel__header-arrow"> | |
<path d="M5.41 7.59L4 9l8 8 8-8-1.41-1.41L12 14.17"></path> | |
</svg> | |
`:""} | |
</span> | |
</h3> | |
<div | |
class="glue-expansion-panel__content${b.copy?"":" hidden"}" | |
${a?"":"data-glue-expansion-panel-initial='expanded'"} | |
id="panel-${c}-content"> | |
<div> | |
<p class="copy-text">${b.copy}</p> | |
${b.html_copy?p` | |
<div class="html-copy"> | |
${b.html_copy} | |
</div> | |
`:null} | |
</div> | |
</div> | |
</div> | |
`})}render(){return m` | |
<section class="glue-spacer-5-top glue-spacer-5-bottom glue-fullbleed"> | |
<div class="glue-fullbleed"> | |
<div class="glue-page"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-1-xl glue-grid__col--span-0-lg glue-grid__col--span-1-md glue-grid__col--span-0-sm"></div> | |
<div class="glue-grid__col glue-grid__col--span-4-sm glue-grid__col--span-10-md glue-grid__col--span-12-lg glue-grid__col--span-10-xl"> | |
<div class="glue-grid"> | |
<div class="glue-grid__col glue-grid__col--span-4-sm glue-grid__col--span-10-md glue-grid__col--span-5-lg glue-grid__col--span-4-xl"> | |
${this.headlineText?p` | |
<h2 class="glue-headline glue-headline--headline-2 glue-spacer-2-bottom"> | |
<span class="glue-font-weight-medium">${this.headlineText}</span> | |
</h2> | |
`:null} | |
${this.copyText?p` | |
<p class="two-column-list--body glue-spacer-2-bottom copy-text"> | |
${this.copyText} | |
</p> | |
`:null} | |
${this.ctaBlock?p` | |
<div class="cta-container"> | |
${this.ctaBlock} | |
</div> | |
`:null} | |
</div> | |
<div class="glue-grid__col glue-grid__col--span-4-sm glue-grid__col--span-10-md glue-grid__col--span-7-lg glue-grid__col--span-6-xl two-column-list--button-container"> | |
<div class="glue-expansion-panels ${this.showExpansionPanels?"":"no-expansion-panels"}"> | |
${this.panelBuilder()} | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
`}};customElements.define("gads-two-column-list",Id);var Z={};Z.GadsAdsFormat=ac;Z.GadsAnimatedHero=bc;Z.GadsAnimatedHero2Up=ec;Z.GadsAnimatedText=xb;Z.GadsBudget=fc;Z.GadsCalloutAnimatedStat=gc;Z.GadsChooseIncentivesOffer=tc;Z.GadsContactHub=wc;Z.GadsExpansionPanels=xc;Z.GadsFormCalculator2Up=Gc;Z.GadsGoalSelector=Hc;Z.GadsGridWall=Kc;Z.GadsHeroJumpLinks=Lc;Z.GadsHeroSupport=Mc;Z.GadsInPageBanner=Sc;Z.GadsJumpLinkSection=Tc;Z.GadsMegaNav=kd;Z.GadsMegaNavV2=qd;Z.GadsRelatedProducts=sd;Z.GadsRelatedTools=td;Z.GadsResourceJumplinkToTop=ud; | |
Z.GadsResourceTableOfContents=vd;Z.GadsSimpleFooter=Vb;Z.GadsSimpleNav=zd;Z.GadsSmallCardContentSwitcher=Ed;Z.GadsSmartCalcForm=Gd;Z.GadsTabBar=Hd;Z.GadsTwoColumnList=Id;var Jd={};Object.defineProperty(Jd,"__esModule",{value:!0});Jd.isGrpcClient=Jd.Selectors=Jd.EventNames=void 0;var Ld=Jd.EventNames||(Jd.EventNames={});Ld.AMA_CLIENT_READY="AMAClient:ready";Ld.LOAD="load";(Jd.Selectors||(Jd.Selectors={})).MARKETING_CLIENT_SCRIPT="marketing-client";Jd.isGrpcClient=function(a){return["getAdsAccounts","setAuthUser"].every(b=>b in a)};var Md={};Object.defineProperty(Md,"__esModule",{value:!0});Md.AmaClientService=void 0; | |
Md.AmaClientService=class{static loadMarketingClient(){Promise.all([new Promise(a=>{if("complete"===document.readyState)return a();window.addEventListener(Jd.EventNames.LOAD,()=>a())}),new Promise(a=>{if(window.MarketingClient)return a(window.MarketingClient);const b=document.getElementById(Jd.Selectors.MARKETING_CLIENT_SCRIPT);null===b||void 0===b?void 0:b.addEventListener(Jd.EventNames.LOAD,()=>a(window.MarketingClient))})]).then(()=>{(0,Jd.isGrpcClient)(window.MarketingClient)&&window.dispatchEvent(new CustomEvent(Jd.EventNames.AMA_CLIENT_READY, | |
{detail:window.MarketingClient}))})}};Object.defineProperty({},"__esModule",{value:!0});new U.GadsImage;new U.SubIDOperations;new U.AWPrefetch;new U.HaTSSurvey;new Z.GadsAnimatedHero;Md.AmaClientService.loadMarketingClient();}).call(this || window, (window.__wpcc = window.__wpcc || {})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment