{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./.tmp/app_col_core/js/techhub.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$observerNavLinks","$","on","folders","theme","folder","subfolder","$thisButton","this","compareUrl","data","catTag","split","drawer","src","title","placement","class","detailsUrl","closest","find","trigger","observerCallback","entries","forEach","entry","isIntersecting","sectionId","target","getAttribute","$activeItem","filter","$ofs","removeClass","addClass","ofs","slideToItem","window","addEventListener","intersectionObserver","IntersectionObserver","headerHeight","outerHeight","css","viewportHeight","height","margin","root","document","rootMargin","threshold","observerOptions","length","each","section","observe","location","hash","querySelector","scrollIntoView","setTimeout","$anchor","hasClass","first"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,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AK,yBAAyB2C,QAAQ1C,QAAQ,WAE3D","file":"techhub.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 318);\n","'use strict';\n\nlet $observerNavLinks; // this is the collection of nav links that will be updated by the intersectionObserver\n\n/**\n * Builds the markup for the cat-tag component, given the folder and subfolder (aka category and subcategory)\n * @param {string} folders A comma-sparated string of folder,subfolder\n * @param {string} theme The category theme that is used to build the styling class. Eg. 'warm' -> 'cat-tag--warm'\n * @returns {string} An HTML string of the cat-tag markup\n */\nconst buildCatTag = (folders, theme) => {\n const [folder, subfolder] = folders.split(',');\n return `
\n
${folder}
\n ${subfolder ? `
${subfolder}
` : ''}\n
`;\n};\n\n/**\n * Click event handler for the Compare button.\n * Fetches the compare content asset and displays it in a drawer,\n * with the cat-tag component as the drawer title.\n */\n$('.js-compare-category').on('click', function () {\n const $thisButton = $(this);\n const compareUrl = $thisButton.data('compare-url');\n const catTag = buildCatTag($thisButton.data('folders'), $thisButton.data('cat-theme'));\n\n $.drawer({\n src: compareUrl, // example: Page-AjaxContent?cids=tech-warm-insulating-compare\n title: catTag,\n placement: 'bottom',\n class: 'drawer--tech-compare'\n });\n});\n\n/**\n * Click event for the Learn More button.\n * Fetches one or more content assets and displays them in a drawer.\n */\n$('.js-show-tech-details').on('click', function () {\n const detailsUrl = $(this).closest('.card').data('details-url');\n $.drawer({\n src: detailsUrl, // example: Page-AjaxContent?cids=tech-DoubleWall,tech-warm-insulating-compare\n placement: 'bottom',\n class: 'drawer--tech-details'\n });\n});\n\n/**\n * Closes the drawer when the user clicks on an in-page anchor. Otherwise, the drawer remains open\n * because the user is not navigating to a new page.\n */\n$('body').on('click', '.tech-nav__link', function () {\n $(this).closest('.drawer__content').find('.close').trigger('click');\n});\n\n/**\n * Handles the intersection occurance.\n * Makes active the button which corresponds to the section that is intersecting.\n * Also calls slideToItem() on the button's overflowSlider, so if the active button is\n * overflowing the container, it will slide into view.\n * @param {Array} entries an array of elements that may be interseting with the hit area of the intersectionObserver.\n */\nconst observerCallback = function (entries) {\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n // activate the button which corresponds to the section that is interseting with the hit area\n const sectionId = entry.target.getAttribute('id');\n const $activeItem = $observerNavLinks.filter('[aria-controls=\"#' + sectionId + '\"]');\n const $ofs = $observerNavLinks.closest('.overflow-slider');\n\n $observerNavLinks.removeClass('active');\n $activeItem.addClass('active');\n $ofs[0].ofs.slideToItem($ofs, $activeItem);\n }\n });\n};\n\n/**\n * Creates the options object for the instersectionObserver, defining the root (document)\n * and rootMargin such that the hit area is a thin horizontal line just under the top-nav element.\n * When a section intersects with this line, the intersectionObserver will call its callback function.\n * ╔═══════════════════╗\n * ║ [ HEADER ] ║\n * ║ [ TOP NAV ] ║\n * ║---┌───────────┐---║ <-- defines an intersection hit area\n * ║ │ │ ║ of 100% wide, 0px tall, placed\n * ║ │ │ ║ just under the top nav element.\n * ║ └───────────┘ ║\n * ║ ┌───────────┐ ║\n * ╚═══╧═══════════╧═══╝\n * Paste this into the console to see the \"hit area\":\n * $('body').prepend(`
`);\n * @returns {Object} the options object for an intersectionObserver\n */\nconst observerOptions = () => {\n let headerHeight = $('header').outerHeight() + $('.tech-hub__top-nav').outerHeight() + 16;\n $('html').css('scroll-padding-top', headerHeight);\n\n const viewportHeight = $(window).height();\n headerHeight += 8; // 0.5rem more than the scroll offset, to ensure we're into the next section.\n const margin = `-${headerHeight}px 0px ${headerHeight - viewportHeight}px 0px`;\n\n return {\n root: document,\n rootMargin: margin,\n threshold: 0\n };\n};\n\nwindow.addEventListener('load', () => {\n const intersectionObserver = new IntersectionObserver(observerCallback, observerOptions());\n if ($('.tech-hub__subcat-links').length) {\n // we're on a category page (Warm, Dry, Cool, Protected, or Footwear)\n $observerNavLinks = $('.tech-hub__subcat-link');\n $('.tech-hub-subcategory').each((i, section) => {\n intersectionObserver.observe(section);\n });\n } else {\n // we're on the All Tech page\n $observerNavLinks = $('.tech-hub__cat-btn');\n $('.tech-hub-category').each((i, section) => {\n intersectionObserver.observe(section);\n });\n }\n\n // if we find a named anchor in the page URL that points to a technology card,\n // for example: /tech-hub.html#warmreflective-omni-heat-reflective\n // scroll to that card and auto-open the details drawer.\n if (window.location.hash) {\n document.querySelector(window.location.hash).scrollIntoView();\n // wait for scroll to finish\n setTimeout(() => {\n const $anchor = $(window.location.hash);\n if ($anchor.hasClass('card')) {\n $anchor.find('.js-show-tech-details').first().trigger('click');\n }\n }, 1000);\n }\n});\n"],"sourceRoot":""}