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,QA3Db,EA6DA,OAAOpB,CAEf,WAAE,IAAAwG,EAAAA,EACFpB,EAAQsB,MAAK,SAAC1G,GACV,GACIkF,GACAlF,EAAOO,eAAiB2E,IACvBlF,EAAOQ,YACRR,EAAO6E,MAAMzD,QArEb,EAuEA,OAAOpB,CAEf,WAAE,IAAAuG,EAAAA,EAEFnB,EAAQ,EAEhB,GAER,GAAG,CAACjB,EAAiBI,IAErB,IAAQM,EAAU7E,EAAV6E,MAER,OACI1F,EAAAA,cAAAA,EAAAA,SAAA,KACK0F,EAAMzD,OAAS,GACZjC,EAAAA,cAACyH,EAAAA,QAAM,CACH5I,gBAAgB,sDAChBC,MAAO+B,EAAO/B,QAASwG,aAAkB,EAAlBA,EAAoBxG,OAC3CC,UAAU,KACVC,cAAe6B,EAAO8E,eACtBxG,gBAAiBA,KAEd+G,EAAUvC,IAAI,yBACb3D,EAAAA,cAACY,EAAAA,QAAK,CAACC,OAAQA,EAAQC,iBAAkBkF,IAE7ChG,EAAAA,cAAA,OACIG,UAAU,wEAQTuF,EAAMgC,KAAI,SAACC,EAAMC,GAAK,OACnB5H,EAAAA,cAAA,OACImC,IAAKwF,EAAKE,MAAMC,aAChB3H,UAAS,qWAAAR,OAQDiI,EAAQ,GAAKA,GAAS,EAChB,2BACA,GAAE,0CAAAjI,OAEViI,EAAQ,EAAI,YAAc,GAAE,uCAGlC5H,EAAAA,cAAC+H,EAAAA,QAAS,CACNxG,IAAKoG,EAAKE,MAAMC,aAChBtG,IAAKmG,EAAKnG,IACVC,IAAKkG,EAAKlG,MAEZ,MAOlC","sources":["webpack:///./html/wp-content/themes/ls/src/js/main/components/module/Module.tsx","webpack:///./html/wp-content/themes/ls/src/js/main/components/regionalLogos/App.tsx","webpack:///./html/wp-content/themes/ls/src/js/main/components/regionalLogos/Debug.tsx","webpack:///./html/wp-content/themes/ls/src/js/main/components/regionalLogos/LogoImage.tsx","webpack:///./node_modules/js-cookie/dist/js.cookie.mjs","webpack:///./html/wp-content/themes/ls/src/js/main/components/regionalLogos/RegionalLogos.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { populateFootnoteSection } from 'root/core/footnoteSection';\n\ntype Footnote = {\n text: string;\n add_footnote: boolean;\n footnote: string;\n};\n\ntype ModuleProps = {\n moduleClassName?: string;\n title?: string;\n titleSize?: 'h2' | 'h3';\n titleFootnote?: Footnote;\n subtitle?: string;\n subtitleFootnote?: Footnote;\n backgroundColor?: 'black' | 'white' | 'grey';\n removeContainer?: boolean;\n moduleSpacing?: string;\n children: React.ReactNode;\n};\nfunction Module({\n moduleClassName,\n title,\n titleSize,\n titleFootnote,\n subtitle,\n subtitleFootnote,\n backgroundColor,\n removeContainer,\n moduleSpacing,\n children,\n}: ModuleProps) {\n const { textColorClass, backgroundColorClass } = (() => {\n switch (backgroundColor) {\n case 'black':\n return {\n textColorClass: 'gb-text-color--lightest',\n backgroundColorClass: 'gb-background-color--darkest',\n };\n case 'grey':\n return {\n textColorClass: 'gb-text-color--darkest',\n backgroundColorClass: 'gb-background-color--light',\n };\n case 'white':\n default:\n return {\n textColorClass: 'gb-text-color--darkest',\n backgroundColorClass: 'gb-background-color--lightest',\n };\n }\n })();\n\n const titleSizeClass = titleSize ? `gb-${titleSize}` : '';\n const addFootnote = (originalString: string, footnote?: Footnote) => {\n return footnote?.add_footnote && footnote?.footnote ? (\n {originalString}\n ) : (\n originalString\n );\n };\n\n useEffect(() => {\n populateFootnoteSection();\n }, [title, subtitle, titleFootnote, subtitleFootnote]);\n\n return (\n <>\n \n
\n
\n
\n
\n {title && (\n \n {addFootnote(title, titleFootnote)}\n \n )}\n {subtitle && (\n

\n {addFootnote(subtitle, subtitleFootnote)}\n

\n )}\n
\n
\n
\n
\n
\n {children}\n
\n \n \n );\n}\nexport default Module;\n","import ReactDOM from 'react-dom';\nimport React from 'react';\nimport RegionalLogos from 'root/main/components/regionalLogos/RegionalLogos';\n\nexport default function () {\n const rootEls = document.querySelectorAll(\n '[data-react=regionalLogos]'\n ) as NodeListOf;\n rootEls.forEach(root => {\n ReactDOM.render(\n ,\n root\n );\n });\n}\n","import React from 'react';\nimport { Region } from 'root/main/components/regionalLogos/types';\ninterface DebugProps {\n region: Region;\n reactProductType: string | undefined;\n}\nexport default function Debug({ region, reactProductType }: DebugProps) {\n return (\n \n

\n Region: {region.country_code}\n {region.state_code ? `_${region.state_code}` : ''} || Product Type:{' '}\n {reactProductType}\n

\n \n );\n}\n","import React from 'react';\n\ntype LogoImageProps = {\n src: string;\n alt?: string;\n url?: string;\n};\n\nconst logoTWClasses =\n 'tw-block tw-h-auto tw-max-w-full mob-l:tw-w-[210px] tw-min-h-[50px] tw-object-contain tw-relative tw-transition-all tw-duration-[1.1s] tw-ease-out';\n\nfunction LogoImage({ src, alt, url }: LogoImageProps) {\n return (\n <>\n {url ? (\n \n \n \n ) : (\n \n )}\n \n );\n}\nexport default LogoImage;\n","/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n","import React, { useEffect, useState } from 'react';\nimport Module from 'root/main/components/module/Module';\nimport Cookies from 'js-cookie';\nimport LogoImage from 'root/main/components/regionalLogos/LogoImage';\nimport Debug from 'root/main/components/regionalLogos/Debug';\nimport { Region } from 'root/main/components/regionalLogos/types';\n\ninterface RegionalLogosProps {\n reactRegionalLogos: string | undefined;\n}\ninterface RegionalLogosParsedData {\n defaultRegionCountryCode?: string;\n productType?: string;\n title?: string;\n backgroundColor?: 'white' | 'grey' | 'black';\n regions?: Region[];\n}\n\ndeclare global {\n interface Window {\n registerCookieComplianceCallback: (params: {\n callback: () => void;\n category?: string;\n rejectCallback?: () => unknown;\n pendingCallback?: () => unknown;\n isCallOptanonWrapper?: boolean;\n }) => void;\n }\n}\n\nexport default function RegionalLogos(props: RegionalLogosProps) {\n const MIN_LOGOS_COUNT = 3;\n const [userCountryCode, setUserCountryCode] = useState('');\n const [userStateCode, setUserStateCode] = useState('');\n const regionalLogosProps = (props.reactRegionalLogos &&\n JSON.parse(props.reactRegionalLogos)) as RegionalLogosParsedData | undefined;\n const [region, setRegion] = useState({\n country_code: userCountryCode,\n state_code: userStateCode,\n logos: [],\n title: regionalLogosProps?.title ?? '',\n title_footnote: {\n text: '',\n add_footnote: false,\n footnote: '',\n },\n });\n const { defaultRegionCountryCode, productType, backgroundColor, regions } =\n regionalLogosProps ?? {};\n const urlParams = new URLSearchParams(window.location.search);\n\n useEffect(() => {\n const geoCookie = Cookies.get('geoConfig');\n const viewFromParam = urlParams.get('view_from');\n if (geoCookie) {\n const countryCode = JSON.parse(geoCookie).country_code;\n const stateCode = JSON.parse(geoCookie).state_code;\n countryCode && setUserCountryCode(countryCode);\n window.registerCookieComplianceCallback({\n callback: () => stateCode && setUserStateCode(stateCode),\n category: 'targeting',\n rejectCallback: () => setUserStateCode(''),\n });\n }\n if (viewFromParam) {\n const [viewFromCountryCode, viewFromStateCode] =\n viewFromParam?.split('_') ?? [];\n viewFromCountryCode && setUserCountryCode(viewFromCountryCode);\n window.registerCookieComplianceCallback({\n callback: () => viewFromStateCode && setUserStateCode(viewFromStateCode),\n category: 'targeting',\n rejectCallback: () => setUserStateCode(''),\n });\n }\n if (regions) {\n setRegion(() => {\n return (\n regions.find((region: Region) => {\n if (\n region.country_code === userCountryCode?.toLowerCase() &&\n region.state_code === userStateCode?.toLowerCase() &&\n region.logos.length >= MIN_LOGOS_COUNT\n ) {\n return region;\n }\n }) ??\n regions.find((region: Region) => {\n if (\n region.country_code === userCountryCode?.toLowerCase() &&\n !region.state_code &&\n region.logos.length >= MIN_LOGOS_COUNT\n ) {\n return region;\n }\n }) ??\n regions.find((region: Region) => {\n if (\n defaultRegionCountryCode &&\n region.country_code === defaultRegionCountryCode &&\n !region.state_code &&\n region.logos.length >= MIN_LOGOS_COUNT\n ) {\n return region;\n }\n }) ??\n // fallback\n regions[0]\n );\n });\n }\n }, [userCountryCode, userStateCode]);\n\n const { logos } = region;\n\n return (\n <>\n {logos.length > 0 && (\n \n {!!urlParams.get('debug_regional_logos') && (\n \n )}\n \n {logos.map((logo, index) => (\n 5 && index <= 9\n ? 'tw-hidden mob-l:tw-block'\n : ''\n }\n ${index > 9 ? 'tw-hidden' : ''}\n `}\n >\n \n \n ))}\n \n \n )}\n \n );\n}\n"],"names":["_ref","moduleClassName","title","titleSize","titleFootnote","subtitle","subtitleFootnote","backgroundColor","removeContainer","moduleSpacing","children","_ref2","textColorClass","backgroundColorClass","titleSizeClass","concat","addFootnote","originalString","footnote","add_footnote","React","useEffect","populateFootnoteSection","className","document","querySelectorAll","forEach","root","ReactDOM","RegionalLogos","reactRegionalLogos","dataset","Debug","region","reactProductType","style","color","fontSize","fontWeight","textAlign","country_code","state_code","logoTWClasses","src","alt","url","href","loading","width","height","target","i","arguments","length","source","key","api","init","converter","defaultAttributes","set","name","value","attributes","expires","Date","now","toUTCString","encodeURIComponent","replace","decodeURIComponent","escape","stringifiedAttributes","attributeName","split","cookie","write","Object","create","get","cookies","jar","parts","slice","join","found","read","e","remove","withAttributes","this","withConverter","freeze","path","props","_regionalLogosProps$t","_useState","useState","_useState2","_slicedToArray","userCountryCode","setUserCountryCode","_useState3","_useState4","userStateCode","setUserStateCode","regionalLogosProps","JSON","parse","_useState5","logos","title_footnote","text","_useState6","setRegion","defaultRegionCountryCode","productType","regions","urlParams","URLSearchParams","window","location","search","geoCookie","Cookies","viewFromParam","countryCode","stateCode","registerCookieComplianceCallback","callback","category","rejectCallback","_viewFromParam$split","_ref3","viewFromCountryCode","viewFromStateCode","_ref4","_ref5","_regions$find","find","toLowerCase","Module","map","logo","index","sizes","medium_large","LogoImage"],"sourceRoot":""}