{"version":3,"sources":["vendor/smooth-scroll.js","components/smoothScroll.js"],"names":["root","factory","define","amd","exports","module","SmoothScroll","global","window","this","defaults","ignore","header","topOnEmptyHash","speed","speedAsDuration","durationMax","durationMin","clip","offset","easing","customEasing","updateURL","popstate","emitEvents","extend","merged","Array","prototype","forEach","call","arguments","obj","key","hasOwnProperty","escapeCharacters","id","charAt","substr","codeUnit","string","String","length","index","result","firstCodeUnit","charCodeAt","InvalidCharacterError","toString","getDocumentHeight","Math","max","document","body","scrollHeight","documentElement","offsetHeight","clientHeight","getHeaderHeight","elem","parseInt","getComputedStyle","height","offsetTop","emitEvent","type","options","anchor","toggle","CustomEvent","event","bubbles","detail","dispatchEvent","selector","settings","fixedHeader","animationInterval","smoothScroll","cancelScroll","noEvent","cancelAnimationFrame","animateScroll","_settings","isNum","Object","anchorElem","tagName","startLocation","pageYOffset","querySelector","start","percentage","position","headerHeight","endLocation","location","offsetParent","min","innerHeight","getEndLocation","distance","documentHeight","timeLapsed","abs","getSpeed","stopAnimateScroll","currentLocation","focus","activeElement","setAttribute","style","outline","scrollTo","adjustFocus","loopAnimateScroll","timestamp","time","pattern","easingPattern","floor","requestAnimationFrame","history","pushState","JSON","stringify","title","matchMedia","matches","clickHandler","defaultPrevented","button","metaKey","ctrlKey","shiftKey","target","closest","toLowerCase","hostname","pathname","test","href","hash","decodeURIComponent","e","preventDefault","replaceState","state","setHistory","popstateHandler","destroy","removeEventListener","Element","addEventListener","init","dmx","Component","attributes","default","Number","enum","methods","goto","_scroll","props","performUpdate","updatedProps"],"mappings":";;;;;;;;;;;;;CAQA,SAAAA,EAAAC,GACA,mBAAAC,QAAAA,OAAAC,IACAD,OAAA,IAAA,WACA,OAAAD,EAAAD,EACA,IACA,iBAAAI,QACAC,OAAAD,QAAAH,EAAAD,GAEAA,EAAAM,aAAAL,EAAAD,EAEA,CAVA,CAUA,oBAAAO,OAAAA,OAAA,oBAAAC,OAAAA,OAAAC,MAAA,SAAAD,GAEA,aAMA,IAAAE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,KAAA8F,OACAD,QAAA,GAGA1I,OAAA,CACA6C,KAAAxB,OACAqH,QAAA,iBACAE,KAAA,CAAA,SAAA,aAAA,cAAA,cAAA,cAAA,gBAAA,iBAAA,iBAAA,iBAAA,cAAA,eAAA,eAAA,kBAIAC,QAAA,CACAC,KAAAlE,GAEA,iBAAAA,IACAA,EAAA5C,SAAAsC,cAAAM,IAEAvF,KAAA0J,QAAAjF,cAAAc,EACA,GAGA0D,OACAjJ,KAAA0J,QAAA,IAAA7J,aAAAG,KAAA2J,MAAA1F,SAAA,IAAAjE,KAAA2J,MAAA9I,WAAA,EAAAP,iBAAA,GACA,EAEAsJ,cAAAC,GACA7J,KAAA0J,QAAAb,UACA7I,KAAA0J,QAAA,IAAA7J,aAAAG,KAAA2J,MAAA1F,SAAA,IAAAjE,KAAA2J,MAAA9I,WAAA,EAAAP,iBAAA,GACA,EAEAuI,QAAA,WACA7I,KAAA0J,QAAAb,SACA","file":"dmxSmoothScroll.js","sourcesContent":["/*!\n * smooth-scroll v16.1.2\n * Animate scrolling to anchor links\n * (c) 2020 Chris Ferdinandi\n * MIT License\n * http://github.com/cferdinandi/smooth-scroll\n */\n\n(function (root, factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine([], (function () {\n\t\t\treturn factory(root);\n\t\t}));\n\t} else if (typeof exports === 'object') {\n\t\tmodule.exports = factory(root);\n\t} else {\n\t\troot.SmoothScroll = factory(root);\n\t}\n})(typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this, (function (window) {\n\n\t'use strict';\n\n\t//\n\t// Default settings\n\t//\n\n\tvar defaults = {\n\n\t\t// Selectors\n\t\tignore: '[data-scroll-ignore]',\n\t\theader: null,\n\t\ttopOnEmptyHash: true,\n\n\t\t// Speed & Duration\n\t\tspeed: 500,\n\t\tspeedAsDuration: false,\n\t\tdurationMax: null,\n\t\tdurationMin: null,\n\t\tclip: true,\n\t\toffset: 0,\n\n\t\t// Easing\n\t\teasing: 'easeInOutCubic',\n\t\tcustomEasing: null,\n\n\t\t// History\n\t\tupdateURL: true,\n\t\tpopstate: true,\n\n\t\t// Custom Events\n\t\temitEvents: true\n\n\t};\n\n\n\t//\n\t// Utility Methods\n\t//\n\n\t/**\n\t * Check if browser supports required methods\n\t * @return {Boolean} Returns true if all required methods are supported\n\t */\n\tvar supports = function () {\n\t\treturn (\n\t\t\t'querySelector' in document &&\n\t\t\t'addEventListener' in window &&\n\t\t\t'requestAnimationFrame' in window &&\n\t\t\t'closest' in window.Element.prototype\n\t\t);\n\t};\n\n\t/**\n\t * Merge two or more objects together.\n\t * @param {Object} objects The objects to merge together\n\t * @returns {Object} Merged values of defaults and options\n\t */\n\tvar extend = function () {\n\t\tvar merged = {};\n\t\tArray.prototype.forEach.call(arguments, (function (obj) {\n\t\t\tfor (var key in obj) {\n\t\t\t\tif (!obj.hasOwnProperty(key)) return;\n\t\t\t\tmerged[key] = obj[key];\n\t\t\t}\n\t\t}));\n\t\treturn merged;\n\t};\n\n\t/**\n\t * Check to see if user prefers reduced motion\n\t * @param {Object} settings Script settings\n\t */\n\tvar reduceMotion = function () {\n\t\tif ('matchMedia' in window && window.matchMedia('(prefers-reduced-motion)').matches) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\t/**\n\t * Get the height of an element.\n\t * @param {Node} elem The element to get the height of\n\t * @return {Number} The element's height in pixels\n\t */\n\tvar getHeight = function (elem) {\n\t\treturn parseInt(window.getComputedStyle(elem).height, 10);\n\t};\n\n\t/**\n\t * Escape special characters for use with querySelector\n\t * @author Mathias Bynens\n\t * @link https://github.com/mathiasbynens/CSS.escape\n\t * @param {String} id The anchor ID to escape\n\t */\n\tvar escapeCharacters = function (id) {\n\n\t\t// Remove leading hash\n\t\tif (id.charAt(0) === '#') {\n\t\t\tid = id.substr(1);\n\t\t}\n\n\t\tvar string = String(id);\n\t\tvar length = string.length;\n\t\tvar index = -1;\n\t\tvar codeUnit;\n\t\tvar result = '';\n\t\tvar firstCodeUnit = string.charCodeAt(0);\n\t\twhile (++index < length) {\n\t\t\tcodeUnit = string.charCodeAt(index);\n\t\t\t// Note: there’s no need to special-case astral symbols, surrogate\n\t\t\t// pairs, or lone surrogates.\n\n\t\t\t// If the character is NULL (U+0000), then throw an\n\t\t\t// `InvalidCharacterError` exception and terminate these steps.\n\t\t\tif (codeUnit === 0x0000) {\n\t\t\t\tthrow new InvalidCharacterError(\n\t\t\t\t\t'Invalid character: the input contains U+0000.'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// If the character is in the range [\\1-\\1F] (U+0001 to U+001F) or is\n\t\t\t\t// U+007F, […]\n\t\t\t\t(codeUnit >= 0x0001 && codeUnit <= 0x001F) || codeUnit == 0x007F ||\n\t\t\t\t// If the character is the first character and is in the range [0-9]\n\t\t\t\t// (U+0030 to U+0039), […]\n\t\t\t\t(index === 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||\n\t\t\t\t// If the character is the second character and is in the range [0-9]\n\t\t\t\t// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]\n\t\t\t\t(\n\t\t\t\t\tindex === 1 &&\n\t\t\t\t\tcodeUnit >= 0x0030 && codeUnit <= 0x0039 &&\n\t\t\t\t\tfirstCodeUnit === 0x002D\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// http://dev.w3.org/csswg/cssom/#escape-a-character-as-code-point\n\t\t\t\tresult += '\\\\' + codeUnit.toString(16) + ' ';\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If the character is not handled by one of the above rules and is\n\t\t\t// greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or\n\t\t\t// is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to\n\t\t\t// U+005A), or [a-z] (U+0061 to U+007A), […]\n\t\t\tif (\n\t\t\t\tcodeUnit >= 0x0080 ||\n\t\t\t\tcodeUnit === 0x002D ||\n\t\t\t\tcodeUnit === 0x005F ||\n\t\t\t\tcodeUnit >= 0x0030 && codeUnit <= 0x0039 ||\n\t\t\t\tcodeUnit >= 0x0041 && codeUnit <= 0x005A ||\n\t\t\t\tcodeUnit >= 0x0061 && codeUnit <= 0x007A\n\t\t\t) {\n\t\t\t\t// the character itself\n\t\t\t\tresult += string.charAt(index);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Otherwise, the escaped character.\n\t\t\t// http://dev.w3.org/csswg/cssom/#escape-a-character\n\t\t\tresult += '\\\\' + string.charAt(index);\n\n\t\t}\n\n\t\t// Return sanitized hash\n\t\treturn '#' + result;\n\n\t};\n\n\t/**\n\t * Calculate the easing pattern\n\t * @link https://gist.github.com/gre/1650294\n\t * @param {String} type Easing pattern\n\t * @param {Number} time Time animation should take to complete\n\t * @returns {Number}\n\t */\n\tvar easingPattern = function (settings, time) {\n\t\tvar pattern;\n\n\t\t// Default Easing Patterns\n\t\tif (settings.easing === 'easeInQuad') pattern = time * time; // accelerating from zero velocity\n\t\tif (settings.easing === 'easeOutQuad') pattern = time * (2 - time); // decelerating to zero velocity\n\t\tif (settings.easing === 'easeInOutQuad') pattern = time < 0.5 ? 2 * time * time : -1 + (4 - 2 * time) * time; // acceleration until halfway, then deceleration\n\t\tif (settings.easing === 'easeInCubic') pattern = time * time * time; // accelerating from zero velocity\n\t\tif (settings.easing === 'easeOutCubic') pattern = (--time) * time * time + 1; // decelerating to zero velocity\n\t\tif (settings.easing === 'easeInOutCubic') pattern = time < 0.5 ? 4 * time * time * time : (time - 1) * (2 * time - 2) * (2 * time - 2) + 1; // acceleration until halfway, then deceleration\n\t\tif (settings.easing === 'easeInQuart') pattern = time * time * time * time; // accelerating from zero velocity\n\t\tif (settings.easing === 'easeOutQuart') pattern = 1 - (--time) * time * time * time; // decelerating to zero velocity\n\t\tif (settings.easing === 'easeInOutQuart') pattern = time < 0.5 ? 8 * time * time * time * time : 1 - 8 * (--time) * time * time * time; // acceleration until halfway, then deceleration\n\t\tif (settings.easing === 'easeInQuint') pattern = time * time * time * time * time; // accelerating from zero velocity\n\t\tif (settings.easing === 'easeOutQuint') pattern = 1 + (--time) * time * time * time * time; // decelerating to zero velocity\n\t\tif (settings.easing === 'easeInOutQuint') pattern = time < 0.5 ? 16 * time * time * time * time * time : 1 + 16 * (--time) * time * time * time * time; // acceleration until halfway, then deceleration\n\n\t\t// Custom Easing Patterns\n\t\tif (!!settings.customEasing) pattern = settings.customEasing(time);\n\n\t\treturn pattern || time; // no easing, no acceleration\n\t};\n\n\t/**\n\t * Determine the document's height\n\t * @returns {Number}\n\t */\n\tvar getDocumentHeight = function () {\n\t\treturn Math.max(\n\t\t\tdocument.body.scrollHeight, document.documentElement.scrollHeight,\n\t\t\tdocument.body.offsetHeight, document.documentElement.offsetHeight,\n\t\t\tdocument.body.clientHeight, document.documentElement.clientHeight\n\t\t);\n\t};\n\n\t/**\n\t * Calculate how far to scroll\n\t * Clip support added by robjtede - https://github.com/cferdinandi/smooth-scroll/issues/405\n\t * @param {Element} anchor The anchor element to scroll to\n\t * @param {Number} headerHeight Height of a fixed header, if any\n\t * @param {Number} offset Number of pixels by which to offset scroll\n\t * @param {Boolean} clip If true, adjust scroll distance to prevent abrupt stops near the bottom of the page\n\t * @returns {Number}\n\t */\n\tvar getEndLocation = function (anchor, headerHeight, offset, clip) {\n\t\tvar location = 0;\n\t\tif (anchor.offsetParent) {\n\t\t\tdo {\n\t\t\t\tlocation += anchor.offsetTop;\n\t\t\t\tanchor = anchor.offsetParent;\n\t\t\t} while (anchor);\n\t\t}\n\t\tlocation = Math.max(location - headerHeight - offset, 0);\n\t\tif (clip) {\n\t\t\tlocation = Math.min(location, getDocumentHeight() - window.innerHeight);\n\t\t}\n \t\treturn location;\n\t};\n\n\t/**\n\t * Get the height of the fixed header\n\t * @param {Node} header The header\n\t * @return {Number} The height of the header\n\t */\n\tvar getHeaderHeight = function (header) {\n\t\treturn !header ? 0 : (getHeight(header) + header.offsetTop);\n\t};\n\n\t/**\n\t * Calculate the speed to use for the animation\n\t * @param {Number} distance The distance to travel\n\t * @param {Object} settings The plugin settings\n\t * @return {Number} How fast to animate\n\t */\n\tvar getSpeed = function (distance, settings) {\n\t\tvar speed = settings.speedAsDuration ? settings.speed : Math.abs(distance / 1000 * settings.speed);\n\t\tif (settings.durationMax && speed > settings.durationMax) return settings.durationMax;\n\t\tif (settings.durationMin && speed < settings.durationMin) return settings.durationMin;\n\t\treturn parseInt(speed, 10);\n\t};\n\n\tvar setHistory = function (options) {\n\n\t\t// Make sure this should run\n\t\tif (!history.replaceState || !options.updateURL || history.state) return;\n\n\t\t// Get the hash to use\n\t\tvar hash = window.location.hash;\n\t\thash = hash ? hash : '';\n\n\t\t// Set a default history\n\t\thistory.replaceState(\n\t\t\t{\n\t\t\t\tsmoothScroll: JSON.stringify(options),\n\t\t\t\tanchor: hash ? hash : window.pageYOffset\n\t\t\t},\n\t\t\tdocument.title,\n\t\t\thash ? hash : window.location.href\n\t\t);\n\n\t};\n\n\t/**\n\t * Update the URL\n\t * @param {Node} anchor The anchor that was scrolled to\n\t * @param {Boolean} isNum If true, anchor is a number\n\t * @param {Object} options Settings for Smooth Scroll\n\t */\n\tvar updateURL = function (anchor, isNum, options) {\n\n\t\t// Bail if the anchor is a number\n\t\tif (isNum) return;\n\n\t\t// Verify that pushState is supported and the updateURL option is enabled\n\t\tif (!history.pushState || !options.updateURL) return;\n\n\t\t// Update URL\n\t\thistory.pushState(\n\t\t\t{\n\t\t\t\tsmoothScroll: JSON.stringify(options),\n\t\t\t\tanchor: anchor.id\n\t\t\t},\n\t\t\tdocument.title,\n\t\t\tanchor === document.documentElement ? '#top' : '#' + anchor.id\n\t\t);\n\n\t};\n\n\t/**\n\t * Bring the anchored element into focus\n\t * @param {Node} anchor The anchor element\n\t * @param {Number} endLocation The end location to scroll to\n\t * @param {Boolean} isNum If true, scroll is to a position rather than an element\n\t */\n\tvar adjustFocus = function (anchor, endLocation, isNum) {\n\n\t\t// Is scrolling to top of page, blur\n\t\tif (anchor === 0) {\n\t\t\tdocument.body.focus();\n\t\t}\n\n\t\t// Don't run if scrolling to a number on the page\n\t\tif (isNum) return;\n\n\t\t// Otherwise, bring anchor element into focus\n\t\tanchor.focus();\n\t\tif (document.activeElement !== anchor) {\n\t\t\tanchor.setAttribute('tabindex', '-1');\n\t\t\tanchor.focus();\n\t\t\tanchor.style.outline = 'none';\n\t\t}\n\t\twindow.scrollTo(0 , endLocation);\n\n\t};\n\n\t/**\n\t * Emit a custom event\n\t * @param {String} type The event type\n\t * @param {Object} options The settings object\n\t * @param {Node} anchor The anchor element\n\t * @param {Node} toggle The toggle element\n\t */\n\tvar emitEvent = function (type, options, anchor, toggle) {\n\t\tif (!options.emitEvents || typeof window.CustomEvent !== 'function') return;\n\t\tvar event = new CustomEvent(type, {\n\t\t\tbubbles: true,\n\t\t\tdetail: {\n\t\t\t\tanchor: anchor,\n\t\t\t\ttoggle: toggle\n\t\t\t}\n\t\t});\n\t\tdocument.dispatchEvent(event);\n\t};\n\n\n\t//\n\t// SmoothScroll Constructor\n\t//\n\n\tvar SmoothScroll = function (selector, options) {\n\n\t\t//\n\t\t// Variables\n\t\t//\n\n\t\tvar smoothScroll = {}; // Object for public APIs\n\t\tvar settings, anchor, toggle, fixedHeader, eventTimeout, animationInterval;\n\n\n\t\t//\n\t\t// Methods\n\t\t//\n\n\t\t/**\n\t\t * Cancel a scroll-in-progress\n\t\t */\n\t\tsmoothScroll.cancelScroll = function (noEvent) {\n\t\t\tcancelAnimationFrame(animationInterval);\n\t\t\tanimationInterval = null;\n\t\t\tif (noEvent) return;\n\t\t\temitEvent('scrollCancel', settings);\n\t\t};\n\n\t\t/**\n\t\t * Start/stop the scrolling animation\n\t\t * @param {Node|Number} anchor The element or position to scroll to\n\t\t * @param {Element} toggle The element that toggled the scroll event\n\t\t * @param {Object} options\n\t\t */\n\t\tsmoothScroll.animateScroll = function (anchor, toggle, options) {\n\n\t\t\t// Cancel any in progress scrolls\n\t\t\tsmoothScroll.cancelScroll();\n\n\t\t\t// Local settings\n\t\t\tvar _settings = extend(settings || defaults, options || {}); // Merge user options with defaults\n\n\t\t\t// Selectors and variables\n\t\t\tvar isNum = Object.prototype.toString.call(anchor) === '[object Number]' ? true : false;\n\t\t\tvar anchorElem = isNum || !anchor.tagName ? null : anchor;\n\t\t\tif (!isNum && !anchorElem) return;\n\t\t\tvar startLocation = window.pageYOffset; // Current location on the page\n\t\t\tif (_settings.header && !fixedHeader) {\n\t\t\t\t// Get the fixed header if not already set\n\t\t\t\tfixedHeader = document.querySelector(_settings.header);\n\t\t\t}\n\t\t\tvar headerHeight = getHeaderHeight(fixedHeader);\n\t\t\tvar endLocation = isNum ? anchor : getEndLocation(anchorElem, headerHeight, parseInt((typeof _settings.offset === 'function' ? _settings.offset(anchor, toggle) : _settings.offset), 10), _settings.clip); // Location to scroll to\n\t\t\tvar distance = endLocation - startLocation; // distance to travel\n\t\t\tvar documentHeight = getDocumentHeight();\n\t\t\tvar timeLapsed = 0;\n\t\t\tvar speed = getSpeed(distance, _settings);\n\t\t\tvar start, percentage, position;\n\n\t\t\t/**\n\t\t\t * Stop the scroll animation when it reaches its target (or the bottom/top of page)\n\t\t\t * @param {Number} position Current position on the page\n\t\t\t * @param {Number} endLocation Scroll to location\n\t\t\t * @param {Number} animationInterval How much to scroll on this loop\n\t\t\t */\n\t\t\tvar stopAnimateScroll = function (position, endLocation) {\n\n\t\t\t\t// Get the current location\n\t\t\t\tvar currentLocation = window.pageYOffset;\n\n\t\t\t\t// Check if the end location has been reached yet (or we've hit the end of the document)\n\t\t\t\tif (position == endLocation || currentLocation == endLocation || ((startLocation < endLocation && window.innerHeight + currentLocation) >= documentHeight)) {\n\n\t\t\t\t\t// Clear the animation timer\n\t\t\t\t\tsmoothScroll.cancelScroll(true);\n\n\t\t\t\t\t// Bring the anchored element into focus\n\t\t\t\t\tadjustFocus(anchor, endLocation, isNum);\n\n\t\t\t\t\t// Emit a custom event\n\t\t\t\t\temitEvent('scrollStop', _settings, anchor, toggle);\n\n\t\t\t\t\t// Reset start\n\t\t\t\t\tstart = null;\n\t\t\t\t\tanimationInterval = null;\n\n\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Loop scrolling animation\n\t\t\t */\n\t\t\tvar loopAnimateScroll = function (timestamp) {\n\t\t\t\tif (!start) { start = timestamp; }\n\t\t\t\ttimeLapsed += timestamp - start;\n\t\t\t\tpercentage = speed === 0 ? 0 : (timeLapsed / speed);\n\t\t\t\tpercentage = (percentage > 1) ? 1 : percentage;\n\t\t\t\tposition = startLocation + (distance * easingPattern(_settings, percentage));\n\t\t\t\twindow.scrollTo(0, Math.floor(position));\n\t\t\t\tif (!stopAnimateScroll(position, endLocation)) {\n\t\t\t\t\tanimationInterval = window.requestAnimationFrame(loopAnimateScroll);\n\t\t\t\t\tstart = timestamp;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Reset position to fix weird iOS bug\n\t\t\t * @link https://github.com/cferdinandi/smooth-scroll/issues/45\n\t\t\t */\n\t\t\tif (window.pageYOffset === 0) {\n\t\t\t\twindow.scrollTo(0, 0);\n\t\t\t}\n\n\t\t\t// Update the URL\n\t\t\tupdateURL(anchor, isNum, _settings);\n\n\t\t\t// If the user prefers reduced motion, jump to location\n\t\t\tif (reduceMotion()) {\n\t\t\t\twindow.scrollTo(0, Math.floor(endLocation));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Emit a custom event\n\t\t\temitEvent('scrollStart', _settings, anchor, toggle);\n\n\t\t\t// Start scrolling animation\n\t\t\tsmoothScroll.cancelScroll(true);\n\t\t\twindow.requestAnimationFrame(loopAnimateScroll);\n\n\t\t};\n\n\t\t/**\n\t\t * If smooth scroll element clicked, animate scroll\n\t\t */\n\t\tvar clickHandler = function (event) {\n\n\t\t\t// Don't run if event was canceled but still bubbled up\n\t\t\t// By @mgreter - https://github.com/cferdinandi/smooth-scroll/pull/462/\n\t\t\tif (event.defaultPrevented) return;\n\n\t\t\t// Don't run if right-click or command/control + click or shift + click\n\t\t\tif (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey) return;\n\n\t\t\t// Check if event.target has closest() method\n\t\t\t// By @totegi - https://github.com/cferdinandi/smooth-scroll/pull/401/\n\t\t\tif (!('closest' in event.target)) return;\n\n\t\t\t// Check if a smooth scroll link was clicked\n\t\t\ttoggle = event.target.closest(selector);\n\t\t\tif (!toggle || toggle.tagName.toLowerCase() !== 'a' || event.target.closest(settings.ignore)) return;\n\n\t\t\t// Only run if link is an anchor and points to the current page\n\t\t\tif (toggle.hostname !== window.location.hostname || toggle.pathname !== window.location.pathname || !/#/.test(toggle.href)) return;\n\n\t\t\t// Get an escaped version of the hash\n\t\t\tvar hash;\n\t\t\ttry {\n\t\t\t\thash = escapeCharacters(decodeURIComponent(toggle.hash));\n\t\t\t} catch(e) {\n\t\t\t\thash = escapeCharacters(toggle.hash);\n\t\t\t}\n\n\t\t\t// Get the anchored element\n\t\t\tvar anchor;\n\t\t\tif (hash === '#') {\n\t\t\t\tif (!settings.topOnEmptyHash) return;\n\t\t\t\tanchor = document.documentElement;\n\t\t\t} else {\n\t\t\t\tanchor = document.querySelector(hash);\n\t\t\t}\n\t\t\tanchor = !anchor && hash === '#top' ? document.documentElement : anchor;\n\n\t\t\t// If anchored element exists, scroll to it\n\t\t\tif (!anchor) return;\n\t\t\tevent.preventDefault();\n\t\t\tsetHistory(settings);\n\t\t\tsmoothScroll.animateScroll(anchor, toggle);\n\n\t\t};\n\n\t\t/**\n\t\t * Animate scroll on popstate events\n\t\t */\n\t\tvar popstateHandler = function (event) {\n\n\t\t\t// Stop if history.state doesn't exist (ex. if clicking on a broken anchor link).\n\t\t\t// fixes `Cannot read property 'smoothScroll' of null` error getting thrown.\n\t\t\tif (history.state === null) return;\n\n\t\t\t// Only run if state is a popstate record for this instantiation\n\t\t\tif (!history.state.smoothScroll || history.state.smoothScroll !== JSON.stringify(settings)) return;\n\n\t\t\t// Only run if state includes an anchor\n\n\t\t\t// if (!history.state.anchor && history.state.anchor !== 0) return;\n\n\t\t\t// Get the anchor\n\t\t\tvar anchor = history.state.anchor;\n\t\t\tif (typeof anchor === 'string' && anchor) {\n\t\t\t\tanchor = document.querySelector(escapeCharacters(history.state.anchor));\n\t\t\t\tif (!anchor) return;\n\t\t\t}\n\n\t\t\t// Animate scroll to anchor link\n\t\t\tsmoothScroll.animateScroll(anchor, null, {updateURL: false});\n\n\t\t};\n\n\t\t/**\n\t\t * Destroy the current initialization.\n\t\t */\n\t\tsmoothScroll.destroy = function () {\n\n\t\t\t// If plugin isn't already initialized, stop\n\t\t\tif (!settings) return;\n\n\t\t\t// Remove event listeners\n\t\t\tdocument.removeEventListener('click', clickHandler, false);\n\t\t\twindow.removeEventListener('popstate', popstateHandler, false);\n\n\t\t\t// Cancel any scrolls-in-progress\n\t\t\tsmoothScroll.cancelScroll();\n\n\t\t\t// Reset variables\n\t\t\tsettings = null;\n\t\t\tanchor = null;\n\t\t\ttoggle = null;\n\t\t\tfixedHeader = null;\n\t\t\teventTimeout = null;\n\t\t\tanimationInterval = null;\n\n\t\t};\n\n\t\t/**\n\t\t * Initialize Smooth Scroll\n\t\t * @param {Object} options User settings\n\t\t */\n\t\tvar init = function () {\n\n\t\t\t// feature test\n\t\t\tif (!supports()) throw 'Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.';\n\n\t\t\t// Destroy any existing initializations\n\t\t\tsmoothScroll.destroy();\n\n\t\t\t// Selectors and variables\n\t\t\tsettings = extend(defaults, options || {}); // Merge user options with defaults\n\t\t\tfixedHeader = settings.header ? document.querySelector(settings.header) : null; // Get the fixed header\n\n\t\t\t// When a toggle is clicked, run the click handler\n\t\t\tdocument.addEventListener('click', clickHandler, false);\n\n\t\t\t// If updateURL and popState are enabled, listen for pop events\n\t\t\tif (settings.updateURL && settings.popstate) {\n\t\t\t\twindow.addEventListener('popstate', popstateHandler, false);\n\t\t\t}\n\n\t\t};\n\n\n\t\t//\n\t\t// Initialize plugin\n\t\t//\n\n\t\tinit();\n\n\n\t\t//\n\t\t// Public APIs\n\t\t//\n\n\t\treturn smoothScroll;\n\n\t};\n\n\treturn SmoothScroll;\n\n}));\n","dmx.Component('smooth-scroll', {\r\n\r\n attributes: {\r\n selector: {\r\n // must be a valid CSS selector\r\n type: String,\r\n default: 'a[href*=\"#\"]',\r\n },\r\n\r\n ignore: {\r\n // must be a valid CSS selector\r\n type: String,\r\n default: '[data-scroll-ignore]',\r\n },\r\n\r\n header: {\r\n // must be a valid CSS selector\r\n type: String,\r\n default: null,\r\n },\r\n\r\n speed: {\r\n type: Number,\r\n default: 500,\r\n },\r\n\r\n offset: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n easing: {\r\n type: String,\r\n default: 'easeInOutCubic',\r\n enum: ['Linear', 'easeInQuad', 'easeInCubic', 'easeInQuart', 'easeInQuint', 'easeInOutQuad', 'easeInOutCubic', 'easeInOutQuart', 'easeInOutQuint', 'easeOutQuad', 'easeOutCubic', 'easeOutQuart', 'easeOutQuint'],\r\n },\r\n },\r\n\r\n methods: {\r\n goto (location) {\r\n // location is selector or number\r\n if (typeof location == 'string') {\r\n location = document.querySelector(location);\r\n }\r\n this._scroll.animateScroll(location);\r\n },\r\n },\r\n\r\n init () {\r\n this._scroll = new SmoothScroll(this.props.selector, { ...this.props, updateURL: false, speedAsDuration: true });\r\n },\r\n\r\n performUpdate (updatedProps) {\r\n this._scroll.destroy();\r\n this._scroll = new SmoothScroll(this.props.selector, { ...this.props, updateURL: false, speedAsDuration: true });\r\n },\r\n\r\n destroy: function () {\r\n this._scroll.destroy();\r\n },\r\n \r\n});\r\n"]}