{"version":3,"sources":["webpack:///./app/components/m/anchor-navigation/index.js","webpack:///./node_modules/sticky-kit/dist/sticky-kit.js"],"names":["$","stick_in_parent","parent","offset_top","activeLink","document","querySelector","location","hash","activeHashLink","escapeSelector","classList","add","labelValue","innerHTML","labelHref","href","Array","from","querySelectorAll","forEach","element","addEventListener","window","matchMedia","matches","remove","toggle"],"mappings":";;;;;;;;;;;AAAA;AAAA;AAAA;AAAoC;;AAEpC;AACAA,CAAC,CAAC,aAAa,CAAC,CAACC,eAAe,CAAC;EAC/BC,MAAM,EAAE,MAAM;EACdC,UAAU,EAAE;AACd,CAAC,CAAC;;AAEF;AACA,IAAIC,UAAU,GAAGC,QAAQ,CAACC,aAAa,CAAC,mBAAmB,CAAC;AAC5D,IAAIC,QAAQ,CAACC,IAAI,EAAE;EACjB,MAAMC,cAAc,GAAGJ,QAAQ,CAACC,aAAa,CAAE,2BAA0BN,CAAC,CAACU,cAAc,CAACH,QAAQ,CAACC,IAAI,CAAE,GAAE,CAAC;EAC5G,IAAIC,cAAc,EAAE;IAClBL,UAAU,GAAGK,cAAc;EAC7B;AACF;AACAL,UAAU,CAACO,SAAS,CAACC,GAAG,CAAC,oBAAoB,CAAC;AAE9C,IAAIP,QAAQ,CAACC,aAAa,CAAC,qBAAqB,CAAC,EAAE;EACjD,IAAIF,UAAU,GAAGC,QAAQ,CAACC,aAAa,CAAC,qBAAqB,CAAC;EAC9D,IAAIO,UAAU,GAAGT,UAAU,CAACU,SAAS;EACrC,IAAIC,SAAS,GAAGX,UAAU,CAACY,IAAI;EAC/BX,QAAQ,CAACC,aAAa,CAAC,6BAA6B,CAAC,CAACQ,SAAS,GAAGD,UAAU;EAC5ER,QAAQ,CAACC,aAAa,CAAC,6BAA6B,CAAC,CAACU,IAAI,GAAGD,SAAS;EAEtEE,KAAK,CAACC,IAAI,CAACb,QAAQ,CAACc,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,CAACC,OAAO,CAAC,UAAUC,OAAO,EAAE;IACpFA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AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;AACA;AACA;AACA;;AAEA,CAAC","file":"anchor-nav.chunk.js","sourcesContent":["import 'sticky-kit/dist/sticky-kit';\r\n\r\n// sticky behavior\r\n$('.anchor-nav').stick_in_parent({\r\n  parent: 'body',\r\n  offset_top: 25,\r\n});\r\n\r\n// mobile links in dropdown\r\nlet activeLink = document.querySelector('.anchor-nav__link');\r\nif (location.hash) {\r\n  const activeHashLink = document.querySelector(`.anchor-nav__link[href~=${$.escapeSelector(location.hash)}]`);\r\n  if (activeHashLink) {\r\n    activeLink = activeHashLink;\r\n  }\r\n}\r\nactiveLink.classList.add('anchor-nav--active');\r\n\r\nif (document.querySelector('.anchor-nav--active')) {\r\n  let activeLink = document.querySelector('.anchor-nav--active');\r\n  let labelValue = activeLink.innerHTML;\r\n  let labelHref = activeLink.href;\r\n  document.querySelector('.anchor-nav__toggler__label').innerHTML = labelValue;\r\n  document.querySelector('.anchor-nav__toggler__label').href = labelHref;\r\n\r\n  Array.from(document.querySelectorAll('.anchor-nav__link')).forEach(function (element) {\r\n    element.addEventListener('click', () => {\r\n      // only for mobile view\r\n      if (window.matchMedia('(max-width: 768px)').matches) {\r\n        // change label and hide active link from list\r\n        document.querySelector('.anchor-nav--active').classList.remove('anchor-nav--active');\r\n        element.classList.add('anchor-nav--active');\r\n        activeLink = element;\r\n        labelValue = activeLink.innerHTML;\r\n        labelHref = activeLink.href;\r\n        document.querySelector('.anchor-nav__toggler__label').innerHTML = labelValue;\r\n        document.querySelector('.anchor-nav__toggler__label').href = labelHref;\r\n        // close dd after the value is selected\r\n        document.querySelector('.anchor-nav__navbar--collapse').classList.remove('show');\r\n        document.querySelector('.anchor-nav__navbar').classList.toggle('fullscreen');\r\n      }\r\n    });\r\n  });\r\n}\r\n\r\n// if open make fullscreen\r\nif (document.querySelector('.anchor-nav__toggler')) {\r\n  document.querySelector('.anchor-nav__toggler').addEventListener('click', () => {\r\n    document.querySelector('.anchor-nav__navbar').classList.toggle('fullscreen');\r\n  });\r\n}\r\n","// Generated by CoffeeScript 1.6.2\n/**\n@license Sticky-kit v1.1.3 | WTFPL | Leaf Corcoran 2015 | http://leafo.net\n*/\n\n\n(function() {\n  var $, win;\n\n  $ = this.jQuery || window.jQuery;\n\n  win = $(window);\n\n  $.fn.stick_in_parent = function(opts) {\n    var doc, elm, enable_bottoming, inner_scrolling, manual_spacer, offset_top, outer_width, parent_selector, recalc_every, sticky_class, _fn, _i, _len;\n\n    if (opts == null) {\n      opts = {};\n    }\n    sticky_class = opts.sticky_class, inner_scrolling = opts.inner_scrolling, recalc_every = opts.recalc_every, parent_selector = opts.parent, offset_top = opts.offset_top, manual_spacer = opts.spacer, enable_bottoming = opts.bottoming;\n    if (offset_top == null) {\n      offset_top = 0;\n    }\n    if (parent_selector == null) {\n      parent_selector = void 0;\n    }\n    if (inner_scrolling == null) {\n      inner_scrolling = true;\n    }\n    if (sticky_class == null) {\n      sticky_class = \"is_stuck\";\n    }\n    doc = $(document);\n    if (enable_bottoming == null) {\n      enable_bottoming = true;\n    }\n    outer_width = function(el) {\n      var computed, w, _el;\n\n      if (window.getComputedStyle) {\n        _el = el[0];\n        computed = window.getComputedStyle(el[0]);\n        w = parseFloat(computed.getPropertyValue(\"width\")) + parseFloat(computed.getPropertyValue(\"margin-left\")) + parseFloat(computed.getPropertyValue(\"margin-right\"));\n        if (computed.getPropertyValue(\"box-sizing\") !== \"border-box\") {\n          w += parseFloat(computed.getPropertyValue(\"border-left-width\")) + parseFloat(computed.getPropertyValue(\"border-right-width\")) + parseFloat(computed.getPropertyValue(\"padding-left\")) + parseFloat(computed.getPropertyValue(\"padding-right\"));\n        }\n        return w;\n      } else {\n        return el.outerWidth(true);\n      }\n    };\n    _fn = function(elm, padding_bottom, parent_top, parent_height, top, height, el_float, detached) {\n      var bottomed, detach, fixed, last_pos, last_scroll_height, offset, parent, recalc, recalc_and_tick, recalc_counter, spacer, tick;\n\n      if (elm.data(\"sticky_kit\")) {\n        return;\n      }\n      elm.data(\"sticky_kit\", true);\n      last_scroll_height = doc.height();\n      parent = elm.parent();\n      if (parent_selector != null) {\n        parent = parent.closest(parent_selector);\n      }\n      if (!parent.length) {\n        throw \"failed to find stick parent\";\n      }\n      fixed = false;\n      bottomed = false;\n      spacer = manual_spacer != null ? manual_spacer && elm.closest(manual_spacer) : $(\"<div />\");\n      if (spacer) {\n        spacer.css('position', elm.css('position'));\n      }\n      recalc = function() {\n        var border_top, padding_top, restore;\n\n        if (detached) {\n          return;\n        }\n        last_scroll_height = doc.height();\n        border_top = parseInt(parent.css(\"border-top-width\"), 10);\n        padding_top = parseInt(parent.css(\"padding-top\"), 10);\n        padding_bottom = parseInt(parent.css(\"padding-bottom\"), 10);\n        parent_top = parent.offset().top + border_top + padding_top;\n        parent_height = parent.height();\n        if (fixed) {\n          fixed = false;\n          bottomed = false;\n          if (manual_spacer == null) {\n            elm.insertAfter(spacer);\n            spacer.detach();\n          }\n          elm.css({\n            position: \"\",\n            top: \"\",\n            width: \"\",\n            bottom: \"\"\n          }).removeClass(sticky_class);\n          restore = true;\n        }\n        top = elm.offset().top - (parseInt(elm.css(\"margin-top\"), 10) || 0) - offset_top;\n        height = elm.outerHeight(true);\n        el_float = elm.css(\"float\");\n        if (spacer) {\n          spacer.css({\n            width: outer_width(elm),\n            height: height,\n            display: elm.css(\"display\"),\n            \"vertical-align\": elm.css(\"vertical-align\"),\n            \"float\": el_float\n          });\n        }\n        if (restore) {\n          return tick();\n        }\n      };\n      recalc();\n      if (height === parent_height) {\n        return;\n      }\n      last_pos = void 0;\n      offset = offset_top;\n      recalc_counter = recalc_every;\n      tick = function() {\n        var css, delta, recalced, scroll, will_bottom, win_height;\n\n        if (detached) {\n          return;\n        }\n        recalced = false;\n        if (recalc_counter != null) {\n          recalc_counter -= 1;\n          if (recalc_counter <= 0) {\n            recalc_counter = recalc_every;\n            recalc();\n            recalced = true;\n          }\n        }\n        if (!recalced && doc.height() !== last_scroll_height) {\n          recalc();\n          recalced = true;\n        }\n        scroll = win.scrollTop();\n        if (last_pos != null) {\n          delta = scroll - last_pos;\n        }\n        last_pos = scroll;\n        if (fixed) {\n          if (enable_bottoming) {\n            will_bottom = scroll + height + offset > parent_height + parent_top;\n            if (bottomed && !will_bottom) {\n              bottomed = false;\n              elm.css({\n                position: \"fixed\",\n                bottom: \"\",\n                top: offset\n              }).trigger(\"sticky_kit:unbottom\");\n            }\n          }\n          if (scroll < top) {\n            fixed = false;\n            offset = offset_top;\n            if (manual_spacer == null) {\n              if (el_float === \"left\" || el_float === \"right\") {\n                elm.insertAfter(spacer);\n              }\n              spacer.detach();\n            }\n            css = {\n              position: \"\",\n              width: \"\",\n              top: \"\"\n            };\n            elm.css(css).removeClass(sticky_class).trigger(\"sticky_kit:unstick\");\n          }\n          if (inner_scrolling) {\n            win_height = win.height();\n            if (height + offset_top > win_height) {\n              if (!bottomed) {\n                offset -= delta;\n                offset = Math.max(win_height - height, offset);\n                offset = Math.min(offset_top, offset);\n                if (fixed) {\n                  elm.css({\n                    top: offset + \"px\"\n                  });\n                }\n              }\n            }\n          }\n        } else {\n          if (scroll > top) {\n            fixed = true;\n            css = {\n              position: \"fixed\",\n              top: offset\n            };\n            css.width = elm.css(\"box-sizing\") === \"border-box\" ? elm.outerWidth() + \"px\" : elm.width() + \"px\";\n            elm.css(css).addClass(sticky_class);\n            if (manual_spacer == null) {\n              elm.after(spacer);\n              if (el_float === \"left\" || el_float === \"right\") {\n                spacer.append(elm);\n              }\n            }\n            elm.trigger(\"sticky_kit:stick\");\n          }\n        }\n        if (fixed && enable_bottoming) {\n          if (will_bottom == null) {\n            will_bottom = scroll + height + offset > parent_height + parent_top;\n          }\n          if (!bottomed && will_bottom) {\n            bottomed = true;\n            if (parent.css(\"position\") === \"static\") {\n              parent.css({\n                position: \"relative\"\n              });\n            }\n            return elm.css({\n              position: \"absolute\",\n              bottom: padding_bottom,\n              top: \"auto\"\n            }).trigger(\"sticky_kit:bottom\");\n          }\n        }\n      };\n      recalc_and_tick = function() {\n        recalc();\n        return tick();\n      };\n      detach = function() {\n        detached = true;\n        win.off(\"touchmove\", tick);\n        win.off(\"scroll\", tick);\n        win.off(\"resize\", recalc_and_tick);\n        $(document.body).off(\"sticky_kit:recalc\", recalc_and_tick);\n        elm.off(\"sticky_kit:detach\", detach);\n        elm.removeData(\"sticky_kit\");\n        elm.css({\n          position: \"\",\n          bottom: \"\",\n          top: \"\",\n          width: \"\"\n        });\n        parent.position(\"position\", \"\");\n        if (fixed) {\n          if (manual_spacer == null) {\n            if (el_float === \"left\" || el_float === \"right\") {\n              elm.insertAfter(spacer);\n            }\n            spacer.remove();\n          }\n          return elm.removeClass(sticky_class);\n        }\n      };\n      win.on(\"touchmove\", tick);\n      win.on(\"scroll\", tick);\n      win.on(\"resize\", recalc_and_tick);\n      $(document.body).on(\"sticky_kit:recalc\", recalc_and_tick);\n      elm.on(\"sticky_kit:detach\", detach);\n      return setTimeout(tick, 0);\n    };\n    for (_i = 0, _len = this.length; _i < _len; _i++) {\n      elm = this[_i];\n      _fn($(elm));\n    }\n    return this;\n  };\n\n}).call(this);\n"],"sourceRoot":""}