Guest User

Untitled

a guest
Nov 28th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /******/ (function(modules) { // webpackBootstrap
  2. /******/    // install a JSONP callback for chunk loading
  3. /******/    function webpackJsonpCallback(data) {
  4. /******/        var chunkIds = data[0];
  5. /******/        var moreModules = data[1];
  6. /******/        var executeModules = data[2];
  7. /******/
  8. /******/        // add "moreModules" to the modules object,
  9. /******/        // then flag all "chunkIds" as loaded and fire callback
  10. /******/        var moduleId, chunkId, i = 0, resolves = [];
  11. /******/        for(;i < chunkIds.length; i++) {
  12. /******/            chunkId = chunkIds[i];
  13. /******/            if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
  14. /******/                resolves.push(installedChunks[chunkId][0]);
  15. /******/            }
  16. /******/            installedChunks[chunkId] = 0;
  17. /******/        }
  18. /******/        for(moduleId in moreModules) {
  19. /******/            if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
  20. /******/                modules[moduleId] = moreModules[moduleId];
  21. /******/            }
  22. /******/        }
  23. /******/        if(parentJsonpFunction) parentJsonpFunction(data);
  24. /******/
  25. /******/        while(resolves.length) {
  26. /******/            resolves.shift()();
  27. /******/        }
  28. /******/
  29. /******/        // add entry modules from loaded chunk to deferred list
  30. /******/        deferredModules.push.apply(deferredModules, executeModules || []);
  31. /******/
  32. /******/        // run deferred modules when all chunks ready
  33. /******/        return checkDeferredModules();
  34. /******/    };
  35. /******/    function checkDeferredModules() {
  36. /******/        var result;
  37. /******/        for(var i = 0; i < deferredModules.length; i++) {
  38. /******/            var deferredModule = deferredModules[i];
  39. /******/            var fulfilled = true;
  40. /******/            for(var j = 1; j < deferredModule.length; j++) {
  41. /******/                var depId = deferredModule[j];
  42. /******/                if(installedChunks[depId] !== 0) fulfilled = false;
  43. /******/            }
  44. /******/            if(fulfilled) {
  45. /******/                deferredModules.splice(i--, 1);
  46. /******/                result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
  47. /******/            }
  48. /******/        }
  49. /******/
  50. /******/        return result;
  51. /******/    }
  52. /******/
  53. /******/    // The module cache
  54. /******/    var installedModules = {};
  55. /******/
  56. /******/    // object to store loaded and loading chunks
  57. /******/    // undefined = chunk not loaded, null = chunk preloaded/prefetched
  58. /******/    // Promise = chunk loading, 0 = chunk loaded
  59. /******/    var installedChunks = {
  60. /******/        35: 0
  61. /******/    };
  62. /******/
  63. /******/    var deferredModules = [];
  64. /******/
  65. /******/    // script path function
  66. /******/    function jsonpScriptSrc(chunkId) {
  67. /******/        return __webpack_require__.p + "" + ({"0":"DynamicFeaturedCollection-StaticCollection-StaticProduct-StaticProductRecommendations-StaticSearch","1":"vendors-DynamicFeaturedCollection-StaticCollection-StaticProduct-StaticProductRecommendations-StaticSearch","2":"DynamicFeaturedCollection-StaticCollection-StaticProductRecommendations-StaticSearch","3":"DynamicSearch-StaticHeader","4":"vendors-DynamicSearch-StaticHeader","5":"Account","6":"Contact","7":"ContainSwatchTooltips","8":"DynamicBlogPosts","9":"DynamicFeaturedCollection","10":"DynamicInstagramFeed","11":"DynamicMenuList","12":"DynamicNewsletter","13":"DynamicPromoBlocks","14":"DynamicRichText","15":"DynamicSearch","16":"DynamicTwitterFeed","17":"DynamicVideo","18":"GiftCard","19":"PXSMap","20":"Page","21":"StaticAnnouncement","22":"StaticArticle","23":"StaticBlog","24":"StaticCart","25":"StaticCollection","26":"StaticFooter","27":"StaticHeader","28":"StaticHighlightsBanners","29":"StaticPassword","30":"StaticProduct","31":"StaticProductRecommendations","32":"StaticRecentlyViewed","33":"StaticSearch","34":"StaticSlideshow","36":"vendors-StaticCart"}[chunkId]||chunkId) + ".bundle.js"
  68. /******/    }
  69. /******/
  70. /******/    // script path function
  71. /******/    function jsonpScriptSrc(chunkId) {
  72. /******/      const bundles = { '1': '{{ "vendors-DynamicFeaturedCollection-StaticCollection-StaticProduct-StaticProductRecommendations-StaticSearch.bundle.js" | asset_url }}','0': '{{ "DynamicFeaturedCollection-StaticCollection-StaticProduct-StaticProductRecommendations-StaticSearch.bundle.js" | asset_url }}','2': '{{ "DynamicFeaturedCollection-StaticCollection-StaticProductRecommendations-StaticSearch.bundle.js" | asset_url }}','25': '{{ "StaticCollection.bundle.js" | asset_url }}','31': '{{ "StaticProductRecommendations.bundle.js" | asset_url }}','33': '{{ "StaticSearch.bundle.js" | asset_url }}','9': '{{ "DynamicFeaturedCollection.bundle.js" | asset_url }}','30': '{{ "StaticProduct.bundle.js" | asset_url }}','10': '{{ "DynamicInstagramFeed.bundle.js" | asset_url }}','11': '{{ "DynamicMenuList.bundle.js" | asset_url }}','12': '{{ "DynamicNewsletter.bundle.js" | asset_url }}','13': '{{ "DynamicPromoBlocks.bundle.js" | asset_url }}','14': '{{ "DynamicRichText.bundle.js" | asset_url }}','16': '{{ "DynamicTwitterFeed.bundle.js" | asset_url }}','17': '{{ "DynamicVideo.bundle.js" | asset_url }}','18': '{{ "GiftCard.bundle.js" | asset_url }}','19': '{{ "PXSMap.bundle.js" | asset_url }}','20': '{{ "Page.bundle.js" | asset_url }}','21': '{{ "StaticAnnouncement.bundle.js" | asset_url }}','22': '{{ "StaticArticle.bundle.js" | asset_url }}','23': '{{ "StaticBlog.bundle.js" | asset_url }}','26': '{{ "StaticFooter.bundle.js" | asset_url }}','28': '{{ "StaticHighlightsBanners.bundle.js" | asset_url }}','29': '{{ "StaticPassword.bundle.js" | asset_url }}','32': '{{ "StaticRecentlyViewed.bundle.js" | asset_url }}','34': '{{ "StaticSlideshow.bundle.js" | asset_url }}','36': '{{ "vendors-StaticCart.bundle.js" | asset_url }}','24': '{{ "StaticCart.bundle.js" | asset_url }}','4': '{{ "vendors-DynamicSearch-StaticHeader.bundle.js" | asset_url }}','3': '{{ "DynamicSearch-StaticHeader.bundle.js" | asset_url }}','15': '{{ "DynamicSearch.bundle.js" | asset_url }}','27': '{{ "StaticHeader.bundle.js" | asset_url }}','5': '{{ "Account.bundle.js" | asset_url }}','6': '{{ "Contact.bundle.js" | asset_url }}','7': '{{ "ContainSwatchTooltips.bundle.js" | asset_url }}','8': '{{ "DynamicBlogPosts.bundle.js" | asset_url }}' };
  73. /******/      return bundles[chunkId];
  74. /******/    }
  75. /******/
  76. /******/    // The require function
  77. /******/    function __webpack_require__(moduleId) {
  78. /******/
  79. /******/        // Check if module is in cache
  80. /******/        if(installedModules[moduleId]) {
  81. /******/            return installedModules[moduleId].exports;
  82. /******/        }
  83. /******/        // Create a new module (and put it into the cache)
  84. /******/        var module = installedModules[moduleId] = {
  85. /******/            i: moduleId,
  86. /******/            l: false,
  87. /******/            exports: {}
  88. /******/        };
  89. /******/
  90. /******/        // Execute the module function
  91. /******/        modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  92. /******/
  93. /******/        // Flag the module as loaded
  94. /******/        module.l = true;
  95. /******/
  96. /******/        // Return the exports of the module
  97. /******/        return module.exports;
  98. /******/    }
  99. /******/
  100. /******/    // This file contains only the entry chunk.
  101. /******/    // The chunk loading function for additional chunks
  102. /******/    __webpack_require__.e = function requireEnsure(chunkId) {
  103. /******/        var promises = [];
  104. /******/
  105. /******/
  106. /******/        // JSONP chunk loading for javascript
  107. /******/
  108. /******/        var installedChunkData = installedChunks[chunkId];
  109. /******/        if(installedChunkData !== 0) { // 0 means "already installed".
  110. /******/
  111. /******/            // a Promise means "currently loading".
  112. /******/            if(installedChunkData) {
  113. /******/                promises.push(installedChunkData[2]);
  114. /******/            } else {
  115. /******/                // setup Promise in chunk cache
  116. /******/                var promise = new Promise(function(resolve, reject) {
  117. /******/                    installedChunkData = installedChunks[chunkId] = [resolve, reject];
  118. /******/                });
  119. /******/                promises.push(installedChunkData[2] = promise);
  120. /******/
  121. /******/                // start chunk loading
  122. /******/                var script = document.createElement('script');
  123. /******/                var onScriptComplete;
  124. /******/
  125. /******/                script.charset = 'utf-8';
  126. /******/                script.timeout = 120;
  127. /******/                if (__webpack_require__.nc) {
  128. /******/                    script.setAttribute("nonce", __webpack_require__.nc);
  129. /******/                }
  130. /******/                script.src = jsonpScriptSrc(chunkId);
  131. /******/
  132. /******/                // create error before stack unwound to get useful stacktrace later
  133. /******/                var error = new Error();
  134. /******/                onScriptComplete = function (event) {
  135. /******/                    // avoid mem leaks in IE.
  136. /******/                    script.onerror = script.onload = null;
  137. /******/                    clearTimeout(timeout);
  138. /******/                    var chunk = installedChunks[chunkId];
  139. /******/                    if(chunk !== 0) {
  140. /******/                        if(chunk) {
  141. /******/                            var errorType = event && (event.type === 'load' ? 'missing' : event.type);
  142. /******/                            var realSrc = event && event.target && event.target.src;
  143. /******/                            error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
  144. /******/                            error.name = 'ChunkLoadError';
  145. /******/                            error.type = errorType;
  146. /******/                            error.request = realSrc;
  147. /******/                            chunk[1](error);
  148. /******/                        }
  149. /******/                        installedChunks[chunkId] = undefined;
  150. /******/                    }
  151. /******/                };
  152. /******/                var timeout = setTimeout(function(){
  153. /******/                    onScriptComplete({ type: 'timeout', target: script });
  154. /******/                }, 120000);
  155. /******/                script.onerror = script.onload = onScriptComplete;
  156. /******/                document.head.appendChild(script);
  157. /******/            }
  158. /******/        }
  159. /******/        return Promise.all(promises);
  160. /******/    };
  161. /******/
  162. /******/    // expose the modules object (__webpack_modules__)
  163. /******/    __webpack_require__.m = modules;
  164. /******/
  165. /******/    // expose the module cache
  166. /******/    __webpack_require__.c = installedModules;
  167. /******/
  168. /******/    // define getter function for harmony exports
  169. /******/    __webpack_require__.d = function(exports, name, getter) {
  170. /******/        if(!__webpack_require__.o(exports, name)) {
  171. /******/            Object.defineProperty(exports, name, { enumerable: true, get: getter });
  172. /******/        }
  173. /******/    };
  174. /******/
  175. /******/    // define __esModule on exports
  176. /******/    __webpack_require__.r = function(exports) {
  177. /******/        if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  178. /******/            Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  179. /******/        }
  180. /******/        Object.defineProperty(exports, '__esModule', { value: true });
  181. /******/    };
  182. /******/
  183. /******/    // create a fake namespace object
  184. /******/    // mode & 1: value is a module id, require it
  185. /******/    // mode & 2: merge all properties of value into the ns
  186. /******/    // mode & 4: return value when already ns object
  187. /******/    // mode & 8|1: behave like require
  188. /******/    __webpack_require__.t = function(value, mode) {
  189. /******/        if(mode & 1) value = __webpack_require__(value);
  190. /******/        if(mode & 8) return value;
  191. /******/        if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  192. /******/        var ns = Object.create(null);
  193. /******/        __webpack_require__.r(ns);
  194. /******/        Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  195. /******/        if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  196. /******/        return ns;
  197. /******/    };
  198. /******/
  199. /******/    // getDefaultExport function for compatibility with non-harmony modules
  200. /******/    __webpack_require__.n = function(module) {
  201. /******/        var getter = module && module.__esModule ?
  202. /******/            function getDefault() { return module['default']; } :
  203. /******/            function getModuleExports() { return module; };
  204. /******/        __webpack_require__.d(getter, 'a', getter);
  205. /******/        return getter;
  206. /******/    };
  207. /******/
  208. /******/    // Object.prototype.hasOwnProperty.call
  209. /******/    __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  210. /******/
  211. /******/    // __webpack_public_path__
  212. /******/    __webpack_require__.p = "";
  213. /******/
  214. /******/    // on error function for async loading
  215. /******/    __webpack_require__.oe = function(err) { console.error(err); throw err; };
  216. /******/
  217. /******/    var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
  218. /******/    var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
  219. /******/    jsonpArray.push = webpackJsonpCallback;
  220. /******/    jsonpArray = jsonpArray.slice();
  221. /******/    for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
  222. /******/    var parentJsonpFunction = oldJsonpFunction;
  223. /******/
  224. /******/
  225. /******/    // add entry module to deferred list
  226. /******/    deferredModules.push([22,37]);
  227. /******/    // run deferred modules when ready
  228. /******/    return checkDeferredModules();
  229. /******/ })
  230. /************************************************************************/
  231. /******/ ({
  232.  
  233. /***/ 22:
  234. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  235.  
  236. "use strict";
  237. __webpack_require__.r(__webpack_exports__);
  238.  
  239. // EXTERNAL MODULE: ./node_modules/jquery/dist/jquery.js
  240. var jquery = __webpack_require__(2);
  241. var jquery_default = /*#__PURE__*/__webpack_require__.n(jquery);
  242.  
  243. // CONCATENATED MODULE: ./source/scripts/globals/jquery.js
  244. // jQuery plugins expect to find a global `jQuery` object, so we
  245. // need to attach it to the window.
  246. //
  247. // This is in its own file because we have to attach it before any
  248. // other imports happen, but with ES6 modules, all `import`s have
  249. // to be at the top.
  250.  
  251. window.jQuery = jquery_default.a;
  252. window.$ = jquery_default.a;
  253. // EXTERNAL MODULE: ./node_modules/jquery-trend/jquery.trend.js
  254. var jquery_trend = __webpack_require__(9);
  255.  
  256. // EXTERNAL MODULE: ./node_modules/jquery-revealer/jquery.revealer.js
  257. var jquery_revealer = __webpack_require__(10);
  258.  
  259. // EXTERNAL MODULE: ./node_modules/flickity/js/index.js
  260. var js = __webpack_require__(6);
  261. var js_default = /*#__PURE__*/__webpack_require__.n(js);
  262.  
  263. // CONCATENATED MODULE: ./source/scripts/globals/flickity-ios-fix.js
  264.  
  265.  // This is required to fix an iOS10 bug for Flickity.
  266. // It is our own implementation of the Flickity 2.0 fix found here: http://bit.ly/2kU4mKW
  267.  
  268. jquery_default()(window).on('dragStart', function (event) {
  269.   var $target = jquery_default()(event.target);
  270.   var $flickityEnabledEl = $target.closest('.flickity-enabled');
  271.  
  272.   if ($flickityEnabledEl.length) {
  273.     var flickity = js_default.a.data($flickityEnabledEl[0]);
  274.     window.removeEventListener('scroll', flickity);
  275.   }
  276. });
  277. // EXTERNAL MODULE: ./node_modules/scriptjs/dist/script.js
  278. var script = __webpack_require__(5);
  279. var script_default = /*#__PURE__*/__webpack_require__.n(script);
  280.  
  281. // EXTERNAL MODULE: ./node_modules/rimg-shopify/dist/index.es.js + 1 modules
  282. var index_es = __webpack_require__(7);
  283.  
  284. // CONCATENATED MODULE: ./source/scripts/Sections.js
  285. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  286.  
  287. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  288.  
  289. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  290.  
  291. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  292.  
  293. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  294.  
  295. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  296.  
  297. /**
  298.  * Allows a callback to be run once, when a target intersects the viewport.
  299.  * @constructor
  300.  * @param {Object} [options] options with which to construct the IntersectionObserver
  301.  * @param {string} [options.rootMargin='30%'] A string which specifies a set of offsets to add to
  302.  *                                          the root's bounding_box when calculating intersections.
  303.  * @param {number} [options.threshold=0] Ratio of intersection required to trigger callback
  304.  */
  305. var LazyLoader =
  306. /*#__PURE__*/
  307. function () {
  308.   function LazyLoader(options) {
  309.     _classCallCheck(this, LazyLoader);
  310.  
  311.     var defaultOptions = {
  312.       rootMargin: '30%',
  313.       threshold: 0
  314.     };
  315.     this.callbacks = new WeakMap();
  316.     this._observerCallback = this._observerCallback.bind(this);
  317.     this.observer = new IntersectionObserver(this._observerCallback, _objectSpread({}, defaultOptions, {}, options));
  318.   }
  319.   /**
  320.    * Add target and callback. Callback is only run once.
  321.    * @add
  322.    * @param {HTMLElement} target Target element
  323.    * @param {function} callback Callback to run when target begins intersecting
  324.    */
  325.  
  326.  
  327.   _createClass(LazyLoader, [{
  328.     key: "add",
  329.     value: function add(target, callback) {
  330.       this.callbacks.set(target, callback);
  331.       this.observer.observe(target);
  332.     }
  333.     /**
  334.      * Remove target. Associated callback is also removed.
  335.      * @remove
  336.      * @param {HTMLElement} target Target element
  337.      */
  338.  
  339.   }, {
  340.     key: "remove",
  341.     value: function remove(target) {
  342.       this.observer.unobserve(target);
  343.       this.callbacks.delete(target);
  344.     }
  345.     /**
  346.      * Disconnects IntersectionObserver if active
  347.      * @unload
  348.      */
  349.  
  350.   }, {
  351.     key: "unload",
  352.     value: function unload() {
  353.       this.observer.disconnect();
  354.     }
  355.     /**
  356.      * Runs associated callbacks for each entry, then removes that entry and callback
  357.      * @_observerCallback
  358.      * @param {IntersectionObserverEntry[]} entries Entries to check
  359.      * @param {InterserctionObserver} observer IntersectionObserver instance
  360.      */
  361.  
  362.   }, {
  363.     key: "_observerCallback",
  364.     value: function _observerCallback(entries, observer) {
  365.       var _this = this;
  366.  
  367.       entries.forEach(function (_ref) {
  368.         var isIntersecting = _ref.isIntersecting,
  369.             target = _ref.target;
  370.  
  371.         // do nothing unless target moved into state of intersection
  372.         if (isIntersecting === true) {
  373.           // make sure we stop observing before running the callback, so we don't
  374.           // somehow run the callback twice if element intersects twice quickly
  375.           observer.unobserve(target);
  376.  
  377.           var callback = _this.callbacks.get(target);
  378.  
  379.           if (typeof callback === 'function') {
  380.             callback();
  381.           }
  382.  
  383.           _this.callbacks.delete(target);
  384.         }
  385.       });
  386.     }
  387.   }]);
  388.  
  389.   return LazyLoader;
  390. }();
  391.  
  392. var Sections =
  393. /*#__PURE__*/
  394. function () {
  395.   function Sections() {
  396.     _classCallCheck(this, Sections);
  397.  
  398.     this.handlers = {};
  399.     this.instances = {};
  400.     this.options = {};
  401.     this.imports = {};
  402.     this.lazyLoader = null;
  403.     this._onSectionEvent = this._onSectionEvent.bind(this);
  404.     document.addEventListener('shopify:section:load', this._onSectionEvent);
  405.     document.addEventListener('shopify:section:unload', this._onSectionEvent);
  406.     document.addEventListener('shopify:section:select', this._onSectionEvent);
  407.     document.addEventListener('shopify:section:deselect', this._onSectionEvent);
  408.     document.addEventListener('shopify:block:select', this._onSectionEvent);
  409.     document.addEventListener('shopify:block:deselect', this._onSectionEvent);
  410.   }
  411.   /**
  412.    * Stop listening for section events, and unbind all handlers.
  413.    */
  414.  
  415.  
  416.   _createClass(Sections, [{
  417.     key: "unbind",
  418.     value: function unbind() {
  419.       document.removeEventListener('shopify:section:load', this._onSectionEvent);
  420.       document.removeEventListener('shopify:section:unload', this._onSectionEvent);
  421.       document.removeEventListener('shopify:section:select', this._onSectionEvent);
  422.       document.removeEventListener('shopify:section:deselect', this._onSectionEvent);
  423.       document.removeEventListener('shopify:block:select', this._onSectionEvent);
  424.       document.removeEventListener('shopify:block:deselect', this._onSectionEvent); // Unload all instances
  425.  
  426.       for (var i = 0; i < this.instances.length; i++) {
  427.         this._triggerInstanceEvent(this.instances[i], 'onSectionUnload');
  428.       }
  429.  
  430.       this.handlers = {};
  431.       this.options = {};
  432.       this.lazyLoader.unload();
  433.       this.lazyLoader = null;
  434.       this.instances = {};
  435.     }
  436.     /**
  437.      * Register a section handler.
  438.      *
  439.      * @param {string} type
  440.      *        The section type to handle. The handler will be called for all
  441.      *        sections with this type.
  442.      *
  443.      * @param {function} handler
  444.      *        The handler function is passed information about a specific section
  445.      *        instance. The handler is expected to return an object that will be
  446.      *        associated with the section instance.
  447.      *
  448.      *        Section handlers are passed an object with the following parameters:
  449.      *          {string} id
  450.      *          An ID that maps to a specific section instance. Typically the
  451.      *          section's filename for static sections, or a generated ID for
  452.      *          dynamic sections.
  453.      *
  454.      *          {string} type
  455.      *          The section type, as supplied when registered.
  456.      *
  457.      *          {Element} el
  458.      *          The root DOM element for the section instance.
  459.      *
  460.      *          {Object} data
  461.      *          Data loaded from the section script element. Defaults to an
  462.      *          empty object.
  463.      *
  464.      *          {Function} postMessage
  465.      *          A function that can be called to pass messages between sections.
  466.      *          The function should be called with a message "name", and
  467.      *          optionally some data.
  468.      *
  469.      * @param {object} options
  470.      *
  471.      * @param {boolean} options.lazy
  472.      *     If true, sections will only be initialized after they intersect the viewport + 30% margin
  473.      */
  474.  
  475.   }, {
  476.     key: "register",
  477.     value: function register(type, handler) {
  478.       var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  479.  
  480.       if (this.handlers[type]) {
  481.         console.warn("Sections: section handler already exists of type '".concat(type, "'."));
  482.       } // Store the section handler
  483.  
  484.  
  485.       this.handlers[type] = handler; // Store options
  486.  
  487.       this.options[type] = options; // Init sections for this type
  488.  
  489.       this._initSections(type);
  490.     }
  491.     /**
  492.      * Initialize sections already on the page.
  493.      */
  494.  
  495.   }, {
  496.     key: "_initSections",
  497.     value: function _initSections(type) {
  498.       var _this2 = this;
  499.  
  500.       // Fetch all existing sections of our type on the page
  501.       var dataEls = document.querySelectorAll("[data-section-type=\"".concat(type, "\"]"));
  502.       if (!dataEls) return; // Create an instance for each section
  503.  
  504.       var _loop = function _loop(i) {
  505.         var dataEl = dataEls[i];
  506.         var el = dataEl.parentNode; // Get instance ID
  507.  
  508.         var idEl = el.querySelector('[data-section-id]');
  509.  
  510.         if (!idEl) {
  511.           console.warn("Sections: unable to find section id for '".concat(type, "'."), el);
  512.           return "continue"; // eslint-disable-line no-continue
  513.         }
  514.  
  515.         var sectionId = idEl.getAttribute('data-section-id');
  516.  
  517.         if (!sectionId) {
  518.           console.warn("Sections: unable to find section id for '".concat(type, "'."), el);
  519.           return "continue"; // eslint-disable-line no-continue
  520.         }
  521.  
  522.         if (_this2.options[type] && _this2.options[type].lazy) {
  523.           if (_this2.lazyLoader === null) {
  524.             _this2.lazyLoader = new LazyLoader();
  525.           }
  526.  
  527.           _this2.lazyLoader.add(el, function () {
  528.             return _this2._createInstance(sectionId, el);
  529.           });
  530.         } else {
  531.           _this2._createInstance(sectionId, el);
  532.         }
  533.       };
  534.  
  535.       for (var i = 0; i < dataEls.length; i++) {
  536.         var _ret = _loop(i);
  537.  
  538.         if (_ret === "continue") continue;
  539.       }
  540.     }
  541.   }, {
  542.     key: "_onSectionEvent",
  543.     value: function _onSectionEvent(event) {
  544.       var el = event.target;
  545.       var _event$detail = event.detail,
  546.           sectionId = _event$detail.sectionId,
  547.           blockId = _event$detail.blockId;
  548.       var instance = this.instances[sectionId];
  549.  
  550.       switch (event.type) {
  551.         case 'shopify:section:load':
  552.           this._createInstance(sectionId, el);
  553.  
  554.           break;
  555.  
  556.         case 'shopify:section:unload':
  557.           this._triggerInstanceEvent(instance, 'onSectionUnload', {
  558.             el: el,
  559.             id: sectionId
  560.           });
  561.  
  562.           if (this.lazyLoader) {
  563.             this.lazyLoader.remove(el);
  564.           }
  565.  
  566.           delete this.instances[sectionId];
  567.           break;
  568.  
  569.         case 'shopify:section:select':
  570.           this._triggerInstanceEvent(instance, 'onSectionSelect', {
  571.             el: el,
  572.             id: sectionId
  573.           });
  574.  
  575.           break;
  576.  
  577.         case 'shopify:section:deselect':
  578.           this._triggerInstanceEvent(instance, 'onSectionDeselect', {
  579.             el: el,
  580.             id: sectionId
  581.           });
  582.  
  583.           break;
  584.  
  585.         case 'shopify:block:select':
  586.           this._triggerInstanceEvent(instance, 'onSectionBlockSelect', {
  587.             el: el,
  588.             id: blockId
  589.           });
  590.  
  591.           break;
  592.  
  593.         case 'shopify:block:deselect':
  594.           this._triggerInstanceEvent(instance, 'onSectionBlockDeselect', {
  595.             el: el,
  596.             id: blockId
  597.           });
  598.  
  599.           break;
  600.  
  601.         default:
  602.           break;
  603.       }
  604.     }
  605.   }, {
  606.     key: "_triggerInstanceEvent",
  607.     value: function _triggerInstanceEvent(instance, eventName) {
  608.       if (instance && instance[eventName]) {
  609.         for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
  610.           args[_key - 2] = arguments[_key];
  611.         }
  612.  
  613.         instance[eventName].apply(instance, args);
  614.       }
  615.     }
  616.   }, {
  617.     key: "_postMessage",
  618.     value: function _postMessage(name, data) {
  619.       var _this3 = this;
  620.  
  621.       Object.keys(this.instances).forEach(function (id) {
  622.         _this3._triggerInstanceEvent(_this3.instances[id], 'onSectionMessage', name, data);
  623.       });
  624.     }
  625.   }, {
  626.     key: "_createInstance",
  627.     value: function _createInstance(id, el) {
  628.       var _this4 = this;
  629.  
  630.       var typeEl = el.querySelector('[data-section-type]');
  631.       if (!typeEl) return;
  632.       var type = typeEl.getAttribute('data-section-type');
  633.       if (!type) return;
  634.       var handler = this.handlers[type];
  635.  
  636.       if (!handler) {
  637.         console.warn("Sections: unable to find section handler for type '".concat(type, "'."));
  638.         return;
  639.       }
  640.  
  641.       var data = this._loadData(el);
  642.  
  643.       var postMessage = this._postMessage.bind(this);
  644.  
  645.       var handlerParams = {
  646.         id: id,
  647.         type: type,
  648.         el: el,
  649.         data: data,
  650.         postMessage: postMessage
  651.       };
  652.  
  653.       if (!this.imports[type]) {
  654.         handler().then(function (_ref2) {
  655.           var Component = _ref2.default;
  656.           _this4.imports[type] = Component;
  657.           _this4.instances[id] = new Component(handlerParams);
  658.         });
  659.       } else {
  660.         this.instances[id] = new this.imports[type](handlerParams);
  661.       }
  662.     }
  663.   }, {
  664.     key: "_loadData",
  665.     value: function _loadData(el) {
  666.       var dataEl = el.querySelector('[data-section-data]');
  667.       if (!dataEl) return {}; // Load data from attribute, or innerHTML
  668.  
  669.       var data = dataEl.getAttribute('data-section-data') || dataEl.innerHTML;
  670.  
  671.       try {
  672.         return JSON.parse(data);
  673.       } catch (error) {
  674.         console.warn("Sections: invalid section data found. ".concat(error.message));
  675.         return {};
  676.       }
  677.     }
  678.   }]);
  679.  
  680.   return Sections;
  681. }();
  682.  
  683.  
  684. // CONCATENATED MODULE: ./source/scripts/checkPolyfills.js
  685. var polyfillUrls = []; // Checks if all IntersectionObserver and IntersectionObserverEntry
  686. // features are natively supported.
  687.  
  688. if (!('IntersectionObserver' in window && 'IntersectionObserverEntry' in window && 'intersectionRatio' in window.IntersectionObserverEntry.prototype)) {
  689.   polyfillUrls.push(document.querySelector('[data-scripts]').dataset.pxuPolyfills);
  690. } // Polyfill NodeList.forEach if required.
  691. // Polyfill is so small it doesn't need to load any external code.
  692.  
  693.  
  694. if (window.NodeList && !NodeList.prototype.forEach) {
  695.   NodeList.prototype.forEach = Array.prototype.forEach;
  696. }
  697.  
  698. /* harmony default export */ var checkPolyfills = (polyfillUrls);
  699. // CONCATENATED MODULE: ./source/scripts/Empire.js
  700. // jQuery plugins
  701.  
  702.  // eslint-disable-line
  703.  
  704.  // eslint-disable-line
  705. // Global imports
  706.  
  707.  
  708.  // Responsive Images
  709.  
  710.  // eslint-disable-line
  711. // Section Manager
  712.  
  713.  // Polyfills
  714.  
  715.  
  716.  
  717. var Empire_initEmpire = function initEmpire() {
  718.   index_es["a" /* default */].init('[data-rimg="lazy"]', {
  719.     round: 1
  720.   });
  721.   var sections = new Sections(); // Static sections
  722.  
  723.   sections.register('static-header', function () {
  724.     return Promise.all(/* import() | StaticHeader */[__webpack_require__.e(4), __webpack_require__.e(3), __webpack_require__.e(27)]).then(__webpack_require__.bind(null, 80));
  725.   });
  726.   sections.register('static-announcement', function () {
  727.     return __webpack_require__.e(/* import() | StaticAnnouncement */ 21).then(__webpack_require__.bind(null, 52));
  728.   });
  729.   sections.register('static-footer', function () {
  730.     return __webpack_require__.e(/* import() | StaticFooter */ 26).then(__webpack_require__.bind(null, 53));
  731.   });
  732.   sections.register('static-article', function () {
  733.     return __webpack_require__.e(/* import() | StaticArticle */ 22).then(__webpack_require__.bind(null, 54));
  734.   });
  735.   sections.register('static-blog', function () {
  736.     return __webpack_require__.e(/* import() | StaticBlog */ 23).then(__webpack_require__.bind(null, 55));
  737.   });
  738.   sections.register('static-cart', function () {
  739.     return Promise.all(/* import() | StaticCart */[__webpack_require__.e(36), __webpack_require__.e(24)]).then(__webpack_require__.bind(null, 56));
  740.   });
  741.   sections.register('static-collection', function () {
  742.     return Promise.all(/* import() | StaticCollection */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(2), __webpack_require__.e(25)]).then(__webpack_require__.bind(null, 57));
  743.   });
  744.   sections.register('static-password', function () {
  745.     return __webpack_require__.e(/* import() | StaticPassword */ 29).then(__webpack_require__.bind(null, 58));
  746.   });
  747.   sections.register('static-product', function () {
  748.     return Promise.all(/* import() | StaticProduct */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(30)]).then(__webpack_require__.bind(null, 59));
  749.   });
  750.   sections.register('static-product-recommendations', function () {
  751.     return Promise.all(/* import() | StaticProductRecommendations */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(2), __webpack_require__.e(31)]).then(__webpack_require__.bind(null, 81));
  752.   });
  753.   sections.register('static-recently-viewed', function () {
  754.     return __webpack_require__.e(/* import() | StaticRecentlyViewed */ 32).then(__webpack_require__.bind(null, 60));
  755.   });
  756.   sections.register('static-search', function () {
  757.     return Promise.all(/* import() | StaticSearch */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(2), __webpack_require__.e(33)]).then(__webpack_require__.bind(null, 61));
  758.   });
  759.   sections.register('static-highlights-banners', function () {
  760.     return __webpack_require__.e(/* import() | StaticHighlightsBanners */ 28).then(__webpack_require__.bind(null, 62));
  761.   });
  762.   sections.register('static-slideshow', function () {
  763.     return __webpack_require__.e(/* import() | StaticSlideshow */ 34).then(__webpack_require__.bind(null, 63));
  764.   }, {
  765.     lazy: true
  766.   }); // Dynamic sections (lazy loaded)\
  767.  
  768.   sections.register('dynamic-blog-posts', function () {
  769.     return __webpack_require__.e(/* import() | DynamicBlogPosts */ 8).then(__webpack_require__.bind(null, 64));
  770.   }, {
  771.     lazy: true
  772.   });
  773.   sections.register('dynamic-promo-mosaic', function () {
  774.     return __webpack_require__.e(/* import() | DynamicPromoBlocks */ 13).then(__webpack_require__.bind(null, 65));
  775.   }, {
  776.     lazy: true
  777.   });
  778.   sections.register('dynamic-promo-grid', function () {
  779.     return __webpack_require__.e(/* import() | DynamicPromoBlocks */ 13).then(__webpack_require__.bind(null, 65));
  780.   }, {
  781.     lazy: true
  782.   });
  783.   sections.register('dynamic-menu-list', function () {
  784.     return __webpack_require__.e(/* import() | DynamicMenuList */ 11).then(__webpack_require__.bind(null, 66));
  785.   }, {
  786.     lazy: true
  787.   });
  788.   sections.register('dynamic-twitter-feed', function () {
  789.     return __webpack_require__.e(/* import() | DynamicTwitterFeed */ 16).then(__webpack_require__.bind(null, 67));
  790.   }, {
  791.     lazy: true
  792.   });
  793.   sections.register('dynamic-instagram-feed', function () {
  794.     return __webpack_require__.e(/* import() | DynamicInstagramFeed */ 10).then(__webpack_require__.bind(null, 68));
  795.   }, {
  796.     lazy: true
  797.   });
  798.   sections.register('dynamic-featured-collection', function () {
  799.     return Promise.all(/* import() | DynamicFeaturedCollection */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(2), __webpack_require__.e(9)]).then(__webpack_require__.bind(null, 69));
  800.   }, {
  801.     lazy: true
  802.   });
  803.   sections.register('dynamic-featured-product', function () {
  804.     return Promise.all(/* import() | StaticProduct */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(30)]).then(__webpack_require__.bind(null, 59));
  805.   }, {
  806.     lazy: true
  807.   });
  808.   sections.register('dynamic-rich-text', function () {
  809.     return __webpack_require__.e(/* import() | DynamicRichText */ 14).then(__webpack_require__.bind(null, 70));
  810.   }, {
  811.     lazy: true
  812.   });
  813.   sections.register('dynamic-html', function () {
  814.     return __webpack_require__.e(/* import() | DynamicRichText */ 14).then(__webpack_require__.bind(null, 70));
  815.   }, {
  816.     lazy: true
  817.   });
  818.   sections.register('dynamic-search', function () {
  819.     return Promise.all(/* import() | DynamicSearch */[__webpack_require__.e(4), __webpack_require__.e(3), __webpack_require__.e(15)]).then(__webpack_require__.bind(null, 71));
  820.   }, {
  821.     lazy: true
  822.   });
  823.   sections.register('dynamic-video', function () {
  824.     return __webpack_require__.e(/* import() | DynamicVideo */ 17).then(__webpack_require__.bind(null, 72));
  825.   }, {
  826.     lazy: true
  827.   });
  828.   sections.register('pxs-newsletter', function () {
  829.     return __webpack_require__.e(/* import() | DynamicNewsletter */ 12).then(__webpack_require__.bind(null, 73));
  830.   }, {
  831.     lazy: true
  832.   });
  833.   sections.register('pxs-map', function () {
  834.     return __webpack_require__.e(/* import() | PXSMap */ 19).then(__webpack_require__.bind(null, 74));
  835.   }, {
  836.     lazy: true
  837.   });
  838.  
  839.   if (document.body.classList.contains('template-giftcard')) {
  840.     __webpack_require__.e(/* import() | GiftCard */ 18).then(__webpack_require__.bind(null, 75)).then(function (_ref) {
  841.       var GiftCard = _ref.default;
  842.       return new GiftCard();
  843.     });
  844.   }
  845.  
  846.   if (document.querySelector('[data-template-account]')) {
  847.     __webpack_require__.e(/* import() | Account */ 5).then(__webpack_require__.bind(null, 76)).then(function (_ref2) {
  848.       var Account = _ref2.default;
  849.       return new Account();
  850.     });
  851.   }
  852.  
  853.   if (document.body.classList.contains('template-contact')) {
  854.     __webpack_require__.e(/* import() | Contact */ 6).then(__webpack_require__.bind(null, 77)).then(function (_ref3) {
  855.       var Contact = _ref3.default;
  856.       return new Contact();
  857.     });
  858.   }
  859.  
  860.   if (document.body.classList.contains('template-page')) {
  861.     __webpack_require__.e(/* import() | Page */ 20).then(__webpack_require__.bind(null, 78)).then(function (_ref4) {
  862.       var Page = _ref4.default;
  863.       return new Page();
  864.     });
  865.   }
  866.  
  867.   if (document.querySelector('[data-swatch-tooltip]')) {
  868.     __webpack_require__.e(/* import() | ContainSwatchTooltips */ 7).then(__webpack_require__.bind(null, 79)).then(function (_ref5) {
  869.       var ContainSwatchTooltips = _ref5.default;
  870.       return new ContainSwatchTooltips();
  871.     });
  872.   } // Flickity hot fix until Webkit fixes this bug: https://bugs.webkit.org/show_bug.cgi?id=184250#c31
  873.  
  874.  
  875.   $(document).on('dragStart.flickity', '.flickity-enabled', function () {
  876.     document.ontouchmove = function (e) {
  877.       e.preventDefault();
  878.     };
  879.   });
  880.   $(document).on('dragEnd.flickity', '.flickity-enabled', function () {
  881.     document.ontouchmove = function () {
  882.       return true;
  883.     };
  884.   });
  885. };
  886.  
  887. if (checkPolyfills.length) {
  888.   script_default()(checkPolyfills, Empire_initEmpire);
  889. } else {
  890.   Empire_initEmpire();
  891. }
  892.  
  893. /***/ })
  894.  
  895. /******/ });
Add Comment
Please, Sign In to add comment