{"version":3,"sources":["webpack:///./src/js/public/index.js"],"names":["validateHttpUrl","string","url","URL","_","protocol","getConsentConfig","settings","window","amcb","status","consentStatus","config","revision","autorun","display","current_lang","cookie_name","mode","page_scripts","autoclear_cookies","remove_cookie_tables","gui_options","consent_modal","layout","banner_style","position","banner_position","transition","swap_buttons","settings_modal","modal_style","onFirstAction","user_preferences","cookie","updateGoogleConsent","stopCookiePulse","onAccept","onChange","changed_categories","languages","en","title","description","primary_btn","text","role","secondary_btn","save_settings_btn","accept_all_btn","reject_all_btn","close_btn_label","cookie_table_headers","name","platform","expiration","blocks","gpcNotice","toggle","value","enabled","readonly","enableTable","gpcDetected","links","arguments","length","undefined","linkText","privacy","notice","setting","dest","external","href","concat","target","getLinksHTML","language","updateCookieTables","hasOwnProperty","modal_position","cookies","cookieTables","getCookieTables","updatedBlocks","compact","map","block","_block$toggle","linkType","token","replace","table","get","isEmpty","cookie_table","regexMatchCookie","cookieMeta","regexCookies","forEach","meta","regex","RegExp","match","knownCookies","kc","keyBy","filter","necessary","functional","analytics","targeting","uncategorized","allCookies","Cookies","category","keys","includes","metaName","find","push","is_regex","setPulseListeners","_document$getElementB","btnID","buttonElement","document","getElementById","dataset","gaCategory","gaLabel","addEventListener","buttonAnalyticsHandler","settingsActionHandler","settingsCloseHandler","setStopListener","_document$getElementB2","settingsOpenHandler","event","label","currentTarget","id","gtag","action","toggleScroll","startCookiePulse","init","triggerTime","Math","floor","Date","now","cookiePulseStart","startTime","pulse","cookiePulse","setInterval","consent","updateScripts","getConfig","lang","updateLanguage","clearInterval","lock","body","classList","getGoogleConsentState","allowAds","allowAnalytics","allowFunctional","userPref","getUserPreferences","accept_type","rejected_categories","ad_storage","analytics_storage","functionality_storage","personalization_storage","security_storage","gtmConsentListeners","set","gtmConsent","redactAds","callback","gtmConsentListener","navigator","globalPrivacyControl","adConsent","npaGDPR","npaStates","localVar","privacyBannerActive","amcbgoogletag","opscobid","googletag","cmd","pubads","setRequestNonPersonalizedAds","setPrivacySettings","restrictDataProcessing","loadPrivacyConfig","detail","async","sessionCheck","JSON","parse","gpcSetMode","consentCheck","_window$amcb$settings","country_code","site_state","country","state","ip_state","inUS","result","local","stringify","_window$amcb$settings2","universalLinks","querySelectorAll","stateSpecificEls","el","remove","states","stateConsentDisplay","initCookieConsent","consentConfig","run","gpcOptOut","levels","accept","pull","theme","add","setThemeColor","color_scheme","amcbInitialized","CustomEvent","dispatchEvent"],"mappings":";;;;;;;;;;;;;;;;;wUAcA,MAkBMA,EAAmBC,IACvB,IAAIC,EACJ,IACEA,EAAM,IAAIC,IAAIF,GACd,MAAOG,GACP,OAAO,EAET,MAAwB,UAAjBF,EAAIG,UAAyC,WAAjBH,EAAIG,UA4BnCC,EAAmBA,KACvB,MAAQC,EAAaC,OAAOC,KAApBF,SACFG,EAASF,OAAOG,cAEtB,IAAIC,EAAS,CACXC,SAAU,EACVC,QAASJ,EAAOK,QAChBC,aAAc,KACdC,YAAa,mBACbC,KAAMR,EAAOQ,KACbC,cAAc,EACdC,mBAAmB,EACnBC,sBAAsB,EACtBC,YAAa,CACXC,cAAe,CACbC,OAAQjB,EAASkB,aACjBC,SAAUnB,EAASoB,gBACnBC,WAAY,QACZC,cAAc,GAEhBC,eAAgB,CACdN,OAAQjB,EAASwB,YACjBH,WAAY,UAGhBI,cAAe,SAAUC,EAAkBC,GACzCC,IACAC,KAEFC,SAAU,SAAUH,GAClBC,IACAC,KAEFE,SAAU,SAAUJ,EAAQK,GAC1BJ,IACAC,KAEFI,UAAW,CACTC,GAAI,CACFlB,cAAe,CACbmB,MAAO,wBACPC,YACE,yWACFC,YAAa,CACXC,KAAM,aACNC,KAAM,cAERC,cAAe,CACbF,KAAM,aACNC,KAAM,qBAGVhB,eAAgB,CACdY,MAAO,qBACPM,kBAAmB,gBACnBC,eAAgB,aAChBC,eAAgB,aAChBC,gBAAiB,QACjBC,qBAAsB,CACpB,CAAEC,KAAM,QACR,CAAEC,SAAU,YACZ,CAAEC,WAAY,cACd,CAAEZ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OC,IAAKF,EAAQ,gBA8B9BD,GAtToB,WAAsB,IAArBI,EAAKzK,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,QAC7B8D,SAASsC,KAAKC,UAAUqE,IAAI,KAADhK,OAAM+J,EAAK,SAsTtCE,CAAcnO,KAAKF,SAASsO,cAC5B3F,GAAiB,GAEjB,MAAM4F,EAAkB,IAAIC,YAAY,kBAAmB,CACzDrC,OAAQnC,MAEVxC,SAASsC,KAAK2E,cAAcF,M","file":"consent/banner-80f0485a.js","sourcesContent":["import get from \"lodash/get\"\nimport find from \"lodash/find\"\nimport \"vanilla-cookieconsent\"\nimport \"publicCSS/banner.scss\"\nimport pull from \"lodash/pull\"\nimport keys from \"lodash/keys\"\nimport Cookies from \"js-cookie\"\nimport keyBy from \"lodash/keyBy\"\nimport filter from \"lodash/filter\"\nimport isEmpty from \"lodash/isEmpty\"\nimport compact from \"lodash/compact\"\nimport \"vanilla-cookieconsent/dist/cookieconsent.css\"\n\n// Check consent initialization requirements\nconst consentCheck = () => {\n  const { country_code, site_state, ip_state } = window.amcb.settings\n  const country = country_code\n  const state = ip_state || site_state\n  const inUS = country === \"US\"\n  const mode = gpcDetected() || country !== \"US\" ? \"opt-in\" : \"opt-out\"\n\n  const result = {\n    display: true,\n    mode: mode,\n    enableTable: inUS,\n    local: state,\n  }\n  Cookies.set(\"alpha_consent_check_v3\", JSON.stringify(result))\n  return result\n}\n\n// Check if a string is a valid URL\nconst validateHttpUrl = (string) => {\n  let url\n  try {\n    url = new URL(string)\n  } catch (_) {\n    return false\n  }\n  return url.protocol === \"http:\" || url.protocol === \"https:\"\n}\n\n// Generate HTML for links in consent UI\nconst getLinksHTML = (settings = {}) => {\n  let links = {}\n  const linkText = {\n    privacy: \"Privacy Policy\",\n    notice: \"Notice Of Right To Opt-out\",\n  }\n\n  for (const setting in settings) {\n    if (setting in linkText) {\n      const dest = settings[setting]\n      const external = validateHttpUrl(dest)\n      const href = external ? dest : `/${dest}`\n      const target = external ? \"_blank\" : \"_self\"\n      const text = linkText[setting]\n      links[\n        setting\n      ] = `<a href=\"${href}\" class=\"cc-link\" target=\"${target}\">${text}</a>`\n    }\n  }\n\n  return links\n}\n\n// Get the consent initialization configuration object\nconst getConsentConfig = () => {\n  const { settings } = window.amcb\n  const status = window.consentStatus\n\n  let config = {\n    revision: 1,\n    autorun: status.display,\n    current_lang: \"en\",\n    cookie_name: \"alpha_consent_v3\",\n    mode: status.mode,\n    page_scripts: true,\n    autoclear_cookies: true,\n    remove_cookie_tables: true,\n    gui_options: {\n      consent_modal: {\n        layout: settings.banner_style,\n        position: settings.banner_position,\n        transition: \"slide\",\n        swap_buttons: false,\n      },\n      settings_modal: {\n        layout: settings.modal_style,\n        transition: \"slide\",\n      },\n    },\n    onFirstAction: function (user_preferences, cookie) {\n      updateGoogleConsent()\n      stopCookiePulse()\n    },\n    onAccept: function (cookie) {\n      updateGoogleConsent()\n      stopCookiePulse()\n    },\n    onChange: function (cookie, changed_categories) {\n      updateGoogleConsent()\n      stopCookiePulse()\n    },\n    languages: {\n      en: {\n        consent_modal: {\n          title: \"We value your privacy\",\n          description:\n            'Our site uses cookies to improve your experience. We may share information collected from cookies with our analytics and advertising partners. You may opt out of certain cookies if you wish, however, this may limit some features of the site. You may also <button id=\"s-o-bn\" type=\"button\" data-cc=\"c-settings\" class=\"cc-link\">Customize your choices</button>.',\n          primary_btn: {\n            text: \"Accept all\",\n            role: \"accept_all\",\n          },\n          secondary_btn: {\n            text: \"Reject all\",\n            role: \"accept_necessary\",\n          },\n        },\n        settings_modal: {\n          title: \"Cookie Preferences\",\n          save_settings_btn: \"Save settings\",\n          accept_all_btn: \"Accept all\",\n          reject_all_btn: \"Reject all\",\n          close_btn_label: \"Close\",\n          cookie_table_headers: [\n            { name: \"Name\" },\n            { platform: \"Platform\" },\n            { expiration: \"Expiration\" },\n            { description: \"Description\" },\n          ],\n          blocks: [\n            {\n              title: \"Cookie usage\",\n              description:\n                \"Our site uses cookies to ensure the basic functionalities of the website and to enhance your online experience. Information collected from some cookies may be shared with our analytics and marketing partners. You may opt-in or opt-out of each category of cookie. Opting out of some categories may impact your experience on the website. For more details relative to cookies and other sensitive data, please read the full [privacy].\",\n            },\n            gpcNotice(),\n            {\n              title: \"Necessary\",\n              description:\n                \"Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.\",\n              toggle: {\n                value: \"necessary\",\n                enabled: true,\n                readonly: true,\n              },\n            },\n            {\n              title: \"Functional\",\n              description:\n                \"Functional cookies help perform certain functionalities like remembering user preferences, collecting feedback, and other third-party features.\",\n              toggle: {\n                value: \"functional\",\n                enabled: status.enableTable,\n                readonly: false,\n              },\n            },\n            {\n              title: \"Analytics\",\n              description:\n                \"Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.\",\n              toggle: {\n                value: \"analytics\",\n                enabled: status.enableTable,\n                readonly: false,\n              },\n            },\n            {\n              title: \"Advertisement/Targeting\",\n              description:\n                \"Advertisement and Targeting cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.\",\n              toggle: {\n                value: \"targeting\",\n                enabled: status.enableTable,\n                readonly: false,\n              },\n            },\n            {\n              title: \"Other\",\n              description:\n                \"Other cookies are those that are being analyzed and have not been classified into a category as yet.\",\n              toggle: {\n                value: \"uncategorized\",\n                enabled: status.enableTable,\n                readonly: false,\n              },\n            },\n            {\n              title: \"More information\",\n              description: \"To review your rights, visit [notice].\",\n            },\n          ],\n        },\n      },\n    },\n  }\n\n  if (gpcDetected()) {\n    config.languages.en.consent_modal.description =\n      'A Global Privacy Control (GPC) signal was received from your browser. We have honored your request by opting you out of all non-essential cookies and personal data processing. You may also <button id=\"s-o-bn\" type=\"button\" data-cc=\"c-settings\" class=\"cc-link\">Customize your choices</button>.'\n    config.languages.en.consent_modal.primary_btn = {\n      text: \"Close\",\n      role: \"accept_selected\",\n    }\n    delete config.languages.en.consent_modal.secondary_btn\n  }\n\n  const links = getLinksHTML(settings)\n  for (const language in config.languages) {\n    const blocks = updateCookieTables(\n      config.languages[language].settings_modal.blocks,\n      links\n    )\n    config.languages[language].settings_modal.blocks = blocks\n  }\n\n  if (settings.hasOwnProperty(\"modal_position\")) {\n    config.gui_options.settings_modal.position = settings.modal_position\n  }\n  return config\n}\n\n// Set/Update cookie tables for each category of cookies\nconst updateCookieTables = (blocks, links = false) => {\n  const { cookies } = window.amcb\n  const cookieTables = getCookieTables(cookies)\n  const updatedBlocks = compact(blocks).map((block) => {\n    if (links) {\n      for (const linkType in links) {\n        const token = `[${linkType}]`\n        block.description = block.description.replace(token, links[linkType])\n      }\n    }\n\n    const table = get(cookieTables, block.toggle?.value, null)\n    if (!isEmpty(table)) block.cookie_table = table\n    return block\n  })\n\n  return updatedBlocks\n}\n\n// Set consent UI theme color scheme\nconst setThemeColor = (theme = \"light\") => {\n  document.body.classList.add(`c_${theme}mode`)\n}\n\n// Find cookies with variable names using regular expression\nconst regexMatchCookie = (name, regexCookies = []) => {\n  let cookieMeta\n  regexCookies.forEach((meta) => {\n    const regex = new RegExp(meta.name)\n    if (name.match(regex)) cookieMeta = meta\n  })\n  return cookieMeta\n}\n\n// Get cookie tables for all categories\nconst getCookieTables = (knownCookies) => {\n  const kc = keyBy(knownCookies, \"name\")\n  const regexCookies = filter(knownCookies, \"is_regex\")\n\n  let cookieTables = {\n    necessary: [],\n    functional: [],\n    analytics: [],\n    targeting: [],\n    uncategorized: [],\n  }\n  const allCookies = Cookies.get()\n  for (const name in allCookies) {\n    if (!isEmpty(allCookies[name])) {\n      const meta = name in kc ? kc[name] : regexMatchCookie(name, regexCookies)\n      let category = get(meta, \"category\", \"uncategorized\")\n      category = keys(cookieTables).includes(category)\n        ? category\n        : \"uncategorized\"\n      const metaName = get(meta, \"name\", name)\n      if (!find(cookieTables[category], [\"name\", metaName])) {\n        cookieTables[category].push({\n          name: metaName,\n          platform: get(meta, \"platform\", \"Unknown\"),\n          expiration: get(meta, \"expiration\", \"Unknown\"),\n          description: get(meta, \"description\", \"-\"),\n          is_regex: get(meta, \"is_regex\", false),\n        })\n      }\n    }\n  }\n  return cookieTables\n}\n\n// Pause cookie table updates while settings modal is open\nconst setPulseListeners = () => {\n  const BannerBtnIds = [\"c-p-bn\", \"c-s-bn\"]\n  BannerBtnIds.forEach((btnID) => {\n    const buttonElement = document.getElementById(btnID)\n    if (!buttonElement) return\n    buttonElement.dataset.gaCategory = \"Consent Banner\"\n    buttonElement.dataset.gaLabel =\n      btnID === \"c-p-bn\" ? \"Accept All\" : \"Reject All\"\n    buttonElement?.addEventListener(\"click\", buttonAnalyticsHandler)\n  })\n  const ActionBtnIds = [\"s-all-bn\", \"s-rall-bn\", \"s-sv-bn\"]\n  ActionBtnIds.forEach((btnID) => {\n    const buttonElement = document.getElementById(btnID)\n    buttonElement?.addEventListener(\"click\", settingsActionHandler)\n    buttonElement?.addEventListener(\"click\", buttonAnalyticsHandler)\n  })\n  document\n    .getElementById(\"s-c-bn\")\n    ?.addEventListener(\"click\", settingsCloseHandler)\n\n  setStopListener()\n}\n\nconst setStopListener = () => {\n  document\n    .getElementById(\"s-o-bn\")\n    ?.addEventListener(\"click\", settingsOpenHandler)\n}\n\nconst buttonAnalyticsHandler = (event) => {\n  const bannerButton = event.currentTarget\n  let label = \"\"\n  switch (bannerButton.id) {\n    case \"c-p-bn\":\n    case \"s-all-bn\":\n      label = \"Accept All\"\n      break\n    case \"c-s-bn\":\n    case \"s-rall-bn\":\n      label = \"Reject All\"\n      break\n    case \"s-sv-bn\":\n      label = \"Customize Choices\"\n      break\n  }\n  window.gtag(\"event\", \"cookie_consent\", {\n    action: label,\n  })\n}\n\nconst settingsActionHandler = () => toggleScroll(false)\nconst settingsCloseHandler = () => {\n  toggleScroll(false)\n  startCookiePulse()\n}\n\nconst settingsOpenHandler = () => {\n  toggleScroll()\n  stopCookiePulse()\n}\n\n// Update cookie tables and process scripts at a set interval\nconst startCookiePulse = (init = false) => {\n  const triggerTime = Math.floor(Date.now() / 1000)\n\n  if (init) {\n    setPulseListeners()\n    window.cookiePulseStart = triggerTime\n  }\n  const startTime = window.cookiePulseStart\n  if (triggerTime - startTime > 60) return\n\n  const pulse = get(window, \"cookiePulse\", false)\n  if (pulse) stopCookiePulse()\n  window.cookiePulse = setInterval(() => {\n    window.consent.updateScripts()\n    const languages = window.consent.getConfig(\"languages\")\n    for (const lang in languages) {\n      const blocks = updateCookieTables(languages[lang].settings_modal.blocks)\n      window.consent.getConfig(\"languages\")[lang].settings_modal.blocks = blocks\n      window.consent.updateLanguage(lang, true)\n    }\n    setStopListener()\n    if (Math.floor(Date.now() / 1000) - window.cookiePulseStart)\n      return stopCookiePulse()\n  }, 10000)\n}\n\n// Stop cookie table updates and script processing\nconst stopCookiePulse = () => {\n  const pulse = get(window, \"cookiePulse\", false)\n  if (pulse) clearInterval(pulse)\n  window.cookiePulse = false\n}\n\n// Toggle scrolling overlay background.\nconst toggleScroll = (lock = true) => {\n  const action = lock ? \"add\" : \"remove\"\n  document.body.classList[action](`noScroll`)\n}\n\n// Get current GTM consent state\nconst getGoogleConsentState = () => {\n  const consent = get(window, \"consent\", false)\n\n  if (isEmpty(consent)) return\n  let allowAds, allowAnalytics, allowFunctional\n\n  const userPref = consent.getUserPreferences()\n  switch (userPref.accept_type) {\n    case \"all\":\n      allowAds = true\n      allowAnalytics = true\n      allowFunctional = true\n      break\n\n    case \"necessary\":\n      allowAds = false\n      allowAnalytics = false\n      allowFunctional = false\n      break\n\n    case \"custom\":\n      allowAds = userPref.rejected_categories.includes(\"targeting\")\n      allowAnalytics = userPref.rejected_categories.includes(\"analytics\")\n      allowFunctional = userPref.rejected_categories.includes(\"functional\")\n      break\n  }\n\n  return {\n    ad_storage: allowAds ? \"granted\" : \"denied\",\n    analytics_storage: allowAnalytics ? \"granted\" : \"denied\",\n    functionality_storage: allowFunctional ? \"granted\" : \"denied\",\n    personalization_storage: \"granted\",\n    security_storage: \"granted\",\n  }\n}\n\n// Array for GTM callbacks\nconst gtmConsentListeners = []\n\n// Update local consent cookie and GMT via callbacks\nconst updateGoogleConsent = () => {\n  const consent = getGoogleConsentState()\n  window.consent.set(\"data\", {\n    value: {\n      gtmConsent: consent,\n      redactAds: consent.ad_storage === \"denied\",\n    },\n    mode: \"update\",\n  })\n\n  gtmConsentListeners.forEach((callback) => {\n    callback(consent)\n  })\n}\n\n// Set global listener for GTM to add callbacks\nwindow.gtmConsentListener = (callback) => {\n  gtmConsentListeners.push(callback)\n}\n\nconst stateConsentDisplay = (status) => {\n  const { site_state, ip_state } = window.amcb.settings\n  const state = ip_state || site_state\n\n  const universalLinks = document.querySelectorAll(`.amcb-universal`)\n  const stateSpecificEls = document.querySelectorAll(`.amcb-state-specific`)\n  universalLinks.forEach((el) =>\n    status.display ? el.classList.remove(\"amcb-hidden\") : el.remove()\n  )\n\n  stateSpecificEls.forEach((el) => {\n    state && el.dataset.states.includes(state)\n      ? el.classList.remove(\"amcb-hidden\")\n      : el.remove()\n  })\n}\n\nconst loadPrivacyConfig = (adConsent = null) => {\n  // Send non-personalized ads signal when required.\n  let npaGDPR = false\n  let npaStates = false\n  if (localVar.privacyBannerActive) {\n    if (consentStatus && consentStatus.display) {\n      if (consentStatus.mode === \"opt-in\") {\n        // Enable on-personalized ad mode for EEA and GDPR.\n        npaGDPR = true\n      } else if (adConsent !== null && !adConsent) {\n        // Enable restricted data processing (non-personalized ad mode) for States requiring consent opt-out.\n        npaStates = true\n      }\n    }\n  }\n  window.amcbgoogletag = window.opscobid || window.googletag || {}\n  window.amcbgoogletag.cmd.push(() => {\n    // Enable on-personalized ad modes.\n    if (npaGDPR) {\n      googletag.pubads().setRequestNonPersonalizedAds(1)\n    }\n    if (npaStates) {\n      googletag.pubads().setPrivacySettings({\n        restrictDataProcessing: true,\n      })\n    }\n  })\n}\n\n// Detect GPC signal\nconst gpcDetected = () => navigator.globalPrivacyControl\n\n// Display GPC notice in settings when GPC signal is detected\nconst gpcNotice = () => {\n  const noticeConfigBlock = {\n    title: \"Global Privacy Control Detected!\",\n    description:\n      \"A Global Privacy Control (GPC) signal was received from your browser. We have honored your request by opting you out of all non-essential cookies and personal data processing.\",\n  }\n  return gpcDetected() ? noticeConfigBlock : undefined\n}\n\n// Automaticly opt-out when GPC signal is detected\nconst gpcOptOut = () => {\n  const consent = window.consent\n  if (!consent) return\n\n  // Accept only manually opt-in categories\n  const levels = consent.get(\"level\")\n  if (gpcDetected()) {\n    window.gtag(\"event\", \"gcp_detected\")\n    consent.accept(pull(levels, \"necessary\"))\n  }\n\n\n}\n\n// Switch to opt-in mode when GPC signal is detected\nconst gpcSetMode = (status) => {\n  if (!gpcDetected()) return status\n  status.mode = \"opt-in\"\n  return status\n}\n\ndocument.body.addEventListener(\"amcbInitialized\", (event) => {\n  const adConsent = event.detail.ad_storage === \"granted\"\n  loadPrivacyConfig(adConsent)\n})\n\n// Initialize cookie consent UI\ndocument.addEventListener(\"DOMContentLoaded\", async () => {\n  window.amcb = amcb\n  let sessionCheck = Cookies.get(\"alpha_consent_check_v3\")\n  sessionCheck = sessionCheck ? JSON.parse(sessionCheck) : false\n  const status = gpcSetMode(sessionCheck ? sessionCheck : consentCheck())\n  stateConsentDisplay(status)\n  window.consentStatus = status\n  const consent = initCookieConsent()\n  window.consent = consent\n  const consentConfig = getConsentConfig()\n  consent.run(consentConfig)\n  gpcOptOut()\n  setThemeColor(amcb.settings.color_scheme)\n  startCookiePulse(true)\n  // Dispatch initialization event\n  const amcbInitialized = new CustomEvent(\"amcbInitialized\", {\n    detail: getGoogleConsentState(),\n  })\n  document.body.dispatchEvent(amcbInitialized)\n})\n"],"sourceRoot":""}