diff --git a/dist/js/editor.blocks.js b/dist/js/editor.blocks.js index 0744a1ce..c9023035 100644 --- a/dist/js/editor.blocks.js +++ b/dist/js/editor.blocks.js @@ -81,31 +81,23 @@ /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 9); +/******/ return __webpack_require__(__webpack_require__.s = 72); /******/ }) /************************************************************************/ -/******/ ([ -/* 0 */, -/* 1 */, -/* 2 */, -/* 3 */, -/* 4 */, -/* 5 */, -/* 6 */, -/* 7 */, -/* 8 */, -/* 9 */ +/******/ ({ + +/***/ 72: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _blocks_button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10); +/* harmony import */ var _blocks_button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73); /* harmony import */ var _blocks_button__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_blocks_button__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _blocks_group__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); +/* harmony import */ var _blocks_group__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74); /* harmony import */ var _blocks_group__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_blocks_group__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _blocks_paragraph__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12); +/* harmony import */ var _blocks_paragraph__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(75); /* harmony import */ var _blocks_paragraph__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_blocks_paragraph__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _blocks_separator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13); +/* harmony import */ var _blocks_separator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(76); /* harmony import */ var _blocks_separator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_blocks_separator__WEBPACK_IMPORTED_MODULE_3__); @@ -113,79 +105,96 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/* 10 */ + +/***/ 73: /***/ (function(module, exports) { wp.domReady(function () { - wp.blocks.unregisterBlockStyle('core/button', 'fill'); - wp.blocks.unregisterBlockStyle('core/button', 'outline'); - wp.blocks.unregisterBlockStyle('core/button', 'squared'); - wp.blocks.registerBlockStyle('core/button', { - name: 'primary', - label: 'Primary', - isDefault: true - }); - wp.blocks.registerBlockStyle('core/button', { - name: 'secondary', - label: 'Secondary' - }); - wp.blocks.registerBlockStyle('core/button', { - name: 'text', - label: 'Text' - }); + + wp.blocks.unregisterBlockStyle('core/button', 'fill'); + wp.blocks.unregisterBlockStyle('core/button', 'outline'); + wp.blocks.unregisterBlockStyle('core/button', 'squared'); + + wp.blocks.registerBlockStyle('core/button', { + name: 'primary', + label: 'Primary', + isDefault: true + }); + + wp.blocks.registerBlockStyle('core/button', { + name: 'secondary', + label: 'Secondary' + }); + + wp.blocks.registerBlockStyle('core/button', { + name: 'text', + label: 'Text' + }); }); /***/ }), -/* 11 */ + +/***/ 74: /***/ (function(module, exports) { wp.domReady(function () { - wp.blocks.registerBlockStyle('core/group', { - name: 'dark', - label: 'Dark' - }); - wp.blocks.registerBlockStyle('core/group', { - name: 'darker', - label: 'Darker' - }); - wp.blocks.registerBlockStyle('core/group', { - name: 'accent', - label: 'Accent' - }); + + wp.blocks.registerBlockStyle('core/group', { + name: 'dark', + label: 'Dark' + }); + + wp.blocks.registerBlockStyle('core/group', { + name: 'darker', + label: 'Darker' + }); + + wp.blocks.registerBlockStyle('core/group', { + name: 'accent', + label: 'Accent' + }); }); /***/ }), -/* 12 */ + +/***/ 75: /***/ (function(module, exports) { wp.domReady(function () { - wp.blocks.registerBlockStyle('core/paragraph', { - name: 'lead', - label: 'Lead' - }); + + wp.blocks.registerBlockStyle('core/paragraph', { + name: 'lead', + label: 'Lead' + }); }); /***/ }), -/* 13 */ + +/***/ 76: /***/ (function(module, exports) { wp.domReady(function () { - wp.blocks.unregisterBlockStyle('core/separator', 'default'); - wp.blocks.unregisterBlockStyle('core/separator', 'wide'); - wp.blocks.unregisterBlockStyle('core/separator', 'dots'); - wp.blocks.registerBlockStyle('core/separator', { - name: 'decorative', - label: 'Decorative' - }); - wp.blocks.registerBlockStyle('core/separator', { - name: 'simple', - label: 'Simple' - }); - wp.blocks.registerBlockStyle('core/separator', { - name: 'elaborate', - label: 'Elaborate' - }); + + wp.blocks.unregisterBlockStyle('core/separator', 'default'); + wp.blocks.unregisterBlockStyle('core/separator', 'wide'); + wp.blocks.unregisterBlockStyle('core/separator', 'dots'); + + wp.blocks.registerBlockStyle('core/separator', { + name: 'decorative', + label: 'Decorative' + }); + + wp.blocks.registerBlockStyle('core/separator', { + name: 'simple', + label: 'Simple' + }); + + wp.blocks.registerBlockStyle('core/separator', { + name: 'elaborate', + label: 'Elaborate' + }); }); /***/ }) -/******/ ]); \ No newline at end of file + +/******/ }); \ No newline at end of file diff --git a/dist/js/editor.blocks.min.js b/dist/js/editor.blocks.min.js index 7151d50b..34d729f2 100644 --- a/dist/js/editor.blocks.min.js +++ b/dist/js/editor.blocks.min.js @@ -1 +1 @@ -!function(e){var r={};function t(o){if(r[o])return r[o].exports;var l=r[o]={i:o,l:!1,exports:{}};return e[o].call(l.exports,l,l.exports,t),l.l=!0,l.exports}t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var l in e)t.d(o,l,function(r){return e[r]}.bind(null,l));return o},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=9)}([,,,,,,,,,function(e,r,t){"use strict";t.r(r);t(10),t(11),t(12),t(13)},function(e,r){wp.domReady((function(){wp.blocks.unregisterBlockStyle("core/button","fill"),wp.blocks.unregisterBlockStyle("core/button","outline"),wp.blocks.unregisterBlockStyle("core/button","squared"),wp.blocks.registerBlockStyle("core/button",{name:"primary",label:"Primary",isDefault:!0}),wp.blocks.registerBlockStyle("core/button",{name:"secondary",label:"Secondary"}),wp.blocks.registerBlockStyle("core/button",{name:"text",label:"Text"})}))},function(e,r){wp.domReady((function(){wp.blocks.registerBlockStyle("core/group",{name:"dark",label:"Dark"}),wp.blocks.registerBlockStyle("core/group",{name:"darker",label:"Darker"}),wp.blocks.registerBlockStyle("core/group",{name:"accent",label:"Accent"})}))},function(e,r){wp.domReady((function(){wp.blocks.registerBlockStyle("core/paragraph",{name:"lead",label:"Lead"})}))},function(e,r){wp.domReady((function(){wp.blocks.unregisterBlockStyle("core/separator","default"),wp.blocks.unregisterBlockStyle("core/separator","wide"),wp.blocks.unregisterBlockStyle("core/separator","dots"),wp.blocks.registerBlockStyle("core/separator",{name:"decorative",label:"Decorative"}),wp.blocks.registerBlockStyle("core/separator",{name:"simple",label:"Simple"}),wp.blocks.registerBlockStyle("core/separator",{name:"elaborate",label:"Elaborate"})}))}]); \ No newline at end of file +!function(e){var r={};function t(o){if(r[o])return r[o].exports;var l=r[o]={i:o,l:!1,exports:{}};return e[o].call(l.exports,l,l.exports,t),l.l=!0,l.exports}t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var l in e)t.d(o,l,function(r){return e[r]}.bind(null,l));return o},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=72)}({72:function(e,r,t){"use strict";t.r(r);t(73),t(74),t(75),t(76)},73:function(e,r){wp.domReady((function(){wp.blocks.unregisterBlockStyle("core/button","fill"),wp.blocks.unregisterBlockStyle("core/button","outline"),wp.blocks.unregisterBlockStyle("core/button","squared"),wp.blocks.registerBlockStyle("core/button",{name:"primary",label:"Primary",isDefault:!0}),wp.blocks.registerBlockStyle("core/button",{name:"secondary",label:"Secondary"}),wp.blocks.registerBlockStyle("core/button",{name:"text",label:"Text"})}))},74:function(e,r){wp.domReady((function(){wp.blocks.registerBlockStyle("core/group",{name:"dark",label:"Dark"}),wp.blocks.registerBlockStyle("core/group",{name:"darker",label:"Darker"}),wp.blocks.registerBlockStyle("core/group",{name:"accent",label:"Accent"})}))},75:function(e,r){wp.domReady((function(){wp.blocks.registerBlockStyle("core/paragraph",{name:"lead",label:"Lead"})}))},76:function(e,r){wp.domReady((function(){wp.blocks.unregisterBlockStyle("core/separator","default"),wp.blocks.unregisterBlockStyle("core/separator","wide"),wp.blocks.unregisterBlockStyle("core/separator","dots"),wp.blocks.registerBlockStyle("core/separator",{name:"decorative",label:"Decorative"}),wp.blocks.registerBlockStyle("core/separator",{name:"simple",label:"Simple"}),wp.blocks.registerBlockStyle("core/separator",{name:"elaborate",label:"Elaborate"})}))}}); \ No newline at end of file diff --git a/dist/js/scripts.js b/dist/js/scripts.js index 38a6a453..ea99bb52 100644 --- a/dist/js/scripts.js +++ b/dist/js/scripts.js @@ -81,7 +81,7 @@ /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 14); +/******/ return __webpack_require__(__webpack_require__.s = 77); /******/ }) /************************************************************************/ /******/ ([ @@ -92,56 +92,517 @@ module.exports = jQuery; /***/ }), /* 1 */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; -function _classCallCheck(instance, Constructor) { + +exports.__esModule = true; + +exports.default = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } -} - -module.exports = _classCallCheck; +}; /***/ }), /* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _defineProperty = __webpack_require__(60); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + 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; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.6.9' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(31)('wks'); +var uid = __webpack_require__(32); +var Symbol = __webpack_require__(10).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(37), __esModule: true }; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(66), __esModule: true }; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(14)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _from = __webpack_require__(5); + +var _from2 = _interopRequireDefault(_from); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } else { + return (0, _from2.default)(arr); + } +}; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(10); +var core = __webpack_require__(3); +var ctx = __webpack_require__(25); +var hide = __webpack_require__(12); +var has = __webpack_require__(15); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(13); +var IE8_DOM_DEFINE = __webpack_require__(42); +var toPrimitive = __webpack_require__(43); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(7) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(11); +var createDesc = __webpack_require__(20); +module.exports = __webpack_require__(7) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(19); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), +/* 14 */ /***/ (function(module, exports) { -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); +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; } -} +}; -function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; -} -module.exports = _createClass; +/***/ }), +/* 15 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + /***/ }), -/* 3 */ +/* 16 */ /***/ (function(module, exports, __webpack_require__) { -var arrayWithoutHoles = __webpack_require__(5); +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(18); +module.exports = function (it) { + return Object(defined(it)); +}; -var iterableToArray = __webpack_require__(6); -var nonIterableSpread = __webpack_require__(7); +/***/ }), +/* 17 */ +/***/ (function(module, exports) { -function _toConsumableArray(arr) { - return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread(); -} +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; -module.exports = _toConsumableArray; /***/ }), -/* 4 */ +/* 18 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(48); +var enumBugKeys = __webpack_require__(33); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(31)('keys'); +var uid = __webpack_require__(32); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports) { + +module.exports = true; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(41); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(19); +var document = __webpack_require__(10).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(28); +var defined = __webpack_require__(18); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(29); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(17); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(3); +var global = __webpack_require__(10); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __webpack_require__(24) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' +}); + + +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(11).f; +var has = __webpack_require__(15); +var TAG = __webpack_require__(4)('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(63), __esModule: true }; + +/***/ }), +/* 36 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @@ -314,49 +775,671 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! /***/ }), -/* 5 */ -/***/ (function(module, exports) { - -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { - arr2[i] = arr[i]; - } +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { - return arr2; - } -} +__webpack_require__(38); +__webpack_require__(53); +module.exports = __webpack_require__(3).Array.from; -module.exports = _arrayWithoutHoles; /***/ }), -/* 6 */ -/***/ (function(module, exports) { +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { -function _iterableToArray(iter) { - if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); -} +"use strict"; + +var $at = __webpack_require__(39)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(40)(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); -module.exports = _iterableToArray; /***/ }), -/* 7 */ -/***/ (function(module, exports) { +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance"); -} +var toInteger = __webpack_require__(17); +var defined = __webpack_require__(18); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; -module.exports = _nonIterableSpread; /***/ }), -/* 8 */, -/* 9 */, -/* 10 */, -/* 11 */, -/* 12 */, -/* 13 */, -/* 14 */ +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(24); +var $export = __webpack_require__(9); +var redefine = __webpack_require__(44); +var hide = __webpack_require__(12); +var Iterators = __webpack_require__(21); +var $iterCreate = __webpack_require__(45); +var setToStringTag = __webpack_require__(34); +var getPrototypeOf = __webpack_require__(52); +var ITERATOR = __webpack_require__(4)('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(7) && !__webpack_require__(14)(function () { + return Object.defineProperty(__webpack_require__(26)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(19); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(12); + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(46); +var descriptor = __webpack_require__(20); +var setToStringTag = __webpack_require__(34); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(12)(IteratorPrototype, __webpack_require__(4)('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(13); +var dPs = __webpack_require__(47); +var enumBugKeys = __webpack_require__(33); +var IE_PROTO = __webpack_require__(23)('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(26)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(51).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(11); +var anObject = __webpack_require__(13); +var getKeys = __webpack_require__(22); + +module.exports = __webpack_require__(7) ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(15); +var toIObject = __webpack_require__(27); +var arrayIndexOf = __webpack_require__(49)(false); +var IE_PROTO = __webpack_require__(23)('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(27); +var toLength = __webpack_require__(30); +var toAbsoluteIndex = __webpack_require__(50); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(17); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(10).document; +module.exports = document && document.documentElement; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(15); +var toObject = __webpack_require__(16); +var IE_PROTO = __webpack_require__(23)('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(25); +var $export = __webpack_require__(9); +var toObject = __webpack_require__(16); +var call = __webpack_require__(54); +var isArrayIter = __webpack_require__(55); +var toLength = __webpack_require__(30); +var createProperty = __webpack_require__(56); +var getIterFn = __webpack_require__(57); + +$export($export.S + $export.F * !__webpack_require__(59)(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(13); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(21); +var ITERATOR = __webpack_require__(4)('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__(11); +var createDesc = __webpack_require__(20); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(58); +var ITERATOR = __webpack_require__(4)('iterator'); +var Iterators = __webpack_require__(21); +module.exports = __webpack_require__(3).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(29); +var TAG = __webpack_require__(4)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(4)('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } + +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(61), __esModule: true }; + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(62); +var $Object = __webpack_require__(3).Object; +module.exports = function defineProperty(it, key, desc) { + return $Object.defineProperty(it, key, desc); +}; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(9); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(7), 'Object', { defineProperty: __webpack_require__(11).f }); + + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(64); +module.exports = __webpack_require__(3).Object.keys; + + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(16); +var $keys = __webpack_require__(22); + +__webpack_require__(65)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(9); +var core = __webpack_require__(3); +var fails = __webpack_require__(14); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(67); +module.exports = __webpack_require__(3).Object.assign; + + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(9); + +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(68) }); + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var DESCRIPTORS = __webpack_require__(7); +var getKeys = __webpack_require__(22); +var gOPS = __webpack_require__(69); +var pIE = __webpack_require__(70); +var toObject = __webpack_require__(16); +var IObject = __webpack_require__(28); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(14)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } return T; +} : $assign; + + +/***/ }), +/* 69 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), +/* 70 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 71 */, +/* 72 */, +/* 73 */, +/* 74 */, +/* 75 */, +/* 76 */, +/* 77 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -366,84 +1449,98 @@ __webpack_require__.r(__webpack_exports__); var external_jQuery_ = __webpack_require__(0); var external_jQuery_default = /*#__PURE__*/__webpack_require__.n(external_jQuery_); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js +// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/array/from.js +var from = __webpack_require__(5); +var from_default = /*#__PURE__*/__webpack_require__.n(from); + +// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/classCallCheck.js var classCallCheck = __webpack_require__(1); var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck); -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js +// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/createClass.js var createClass = __webpack_require__(2); var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass); // CONCATENATED MODULE: ./src/utils.js // checks if box1 and box2 overlap function overlapping(box1, box2) { - var overlappingX = box1.x + box1.width >= box2.x && box2.x + box2.width >= box1.x; - var overlappingY = box1.y + box1.height >= box2.y && box2.y + box2.height >= box1.y; - return overlappingX && overlappingY; -} // chechks if box1 is completely inside box2 + var overlappingX = box1.x + box1.width >= box2.x && box2.x + box2.width >= box1.x; + var overlappingY = box1.y + box1.height >= box2.y && box2.y + box2.height >= box1.y; + return overlappingX && overlappingY; +} +// chechks if box1 is completely inside box2 function inside(box1, box2) { - var insideX = box1.x >= box2.x && box1.x + box1.width <= box2.x + box2.width; - var insideY = box1.y >= box2.y && box1.y + box1.height <= box2.y + box2.height; - return insideX && insideY; -} // chechks if box1 is completely inside box2 + var insideX = box1.x >= box2.x && box1.x + box1.width <= box2.x + box2.width; + var insideY = box1.y >= box2.y && box1.y + box1.height <= box2.y + box2.height; + return insideX && insideY; +} +// chechks if box1 is completely inside box2 function insideHalf(box1, box2) { - var insideX = box1.x + box1.width / 2 >= box2.x && box2.x + box2.width >= box1.x + box1.width / 2; - var insideY = box1.y + box1.height / 2 >= box2.y && box2.y + box2.height >= box1.y + box1.height / 2; - return insideX && insideY; + var insideX = box1.x + box1.width / 2 >= box2.x && box2.x + box2.width >= box1.x + box1.width / 2; + var insideY = box1.y + box1.height / 2 >= box2.y && box2.y + box2.height >= box1.y + box1.height / 2; + return insideX && insideY; } -function reloadRellax(element) { - var rellax = jQuery(element).data('rellax'); - - if (rellax) { - rellax._reset(); - - rellax._cachePosition(); - rellax._prepareElement(); +function reloadRellax(element) { + var rellax = jQuery(element).data('rellax'); - rellax._updatePosition(); - } + if (rellax) { + rellax._reset(); + rellax._cachePosition(); + rellax._prepareElement(); + rellax._updatePosition(); + } } + var debounce = function debounce(func, wait) { - var timeout = null; - return function () { - var context = this; - var args = arguments; + var timeout = null; - var later = function later() { - func.apply(context, args); - }; + return function () { + var context = this; + var args = arguments; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - }; + var later = function later() { + func.apply(context, args); + }; + + clearTimeout(timeout); + timeout = setTimeout(later, wait); + }; }; + var hasTouchScreen = function hasTouchScreen() { - var hasTouchScreen = false; + var hasTouchScreen = false; + + if ("maxTouchPoints" in navigator) { + hasTouchScreen = navigator.maxTouchPoints > 0; + } else if ("msMaxTouchPoints" in navigator) { + hasTouchScreen = navigator.msMaxTouchPoints > 0; + } else { + var mQ = window.matchMedia && matchMedia("(pointer:coarse)"); + if (mQ && mQ.media === "(pointer:coarse)") { + hasTouchScreen = !!mQ.matches; + } else if ('orientation' in window) { + hasTouchScreen = true; + } else { + var UA = navigator.userAgent; + hasTouchScreen = /\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(UA) || /\b(Android|Windows Phone|iPad|iPod)\b/i.test(UA); + } + } - if ("maxTouchPoints" in navigator) { - hasTouchScreen = navigator.maxTouchPoints > 0; - } else if ("msMaxTouchPoints" in navigator) { - hasTouchScreen = navigator.msMaxTouchPoints > 0; - } else { - var mQ = window.matchMedia && matchMedia("(pointer:coarse)"); + return hasTouchScreen; +}; +// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/keys.js +var keys = __webpack_require__(35); +var keys_default = /*#__PURE__*/__webpack_require__.n(keys); - if (mQ && mQ.media === "(pointer:coarse)") { - hasTouchScreen = !!mQ.matches; - } else if ('orientation' in window) { - hasTouchScreen = true; - } else { - var UA = navigator.userAgent; - hasTouchScreen = /\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(UA) || /\b(Android|Windows Phone|iPad|iPod)\b/i.test(UA); - } - } +// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/assign.js +var object_assign = __webpack_require__(6); +var assign_default = /*#__PURE__*/__webpack_require__.n(object_assign); - return hasTouchScreen; -}; -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js -var toConsumableArray = __webpack_require__(3); +// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/toConsumableArray.js +var toConsumableArray = __webpack_require__(8); var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); // CONCATENATED MODULE: ./src/components/globalService.js @@ -453,934 +1550,885 @@ var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableA -var globalService_GlobalService = -/*#__PURE__*/ -function () { - function GlobalService() { - classCallCheck_default()(this, GlobalService); - this.props = {}; - this.newProps = {}; - this.renderCallbacks = []; - this.resizeCallbacks = []; - this.observeCallbacks = []; - this.scrollCallbacks = []; - this.currentMutationList = []; - this.frameRendered = true; - this.useOrientation = hasTouchScreen() && 'orientation' in window; - this._init(); - } +var globalService_GlobalService = function () { + function GlobalService() { + classCallCheck_default()(this, GlobalService); - createClass_default()(GlobalService, [{ - key: "_init", - value: function _init() { - var $window = external_jQuery_default()(window); + this.props = {}; + this.newProps = {}; + this.renderCallbacks = []; + this.resizeCallbacks = []; + this.observeCallbacks = []; + this.scrollCallbacks = []; + this.currentMutationList = []; + this.frameRendered = true; + this.useOrientation = hasTouchScreen() && 'orientation' in window; - var updateProps = this._updateProps.bind(this); + this._init(); + } - var renderLoop = this._renderLoop.bind(this); + createClass_default()(GlobalService, [{ + key: '_init', + value: function _init() { + var $window = external_jQuery_default()(window); + var updateProps = this._updateProps.bind(this); + var renderLoop = this._renderLoop.bind(this); - updateProps(); - external_jQuery_default()(updateProps); + updateProps(); - this._bindOnResize(); + external_jQuery_default()(updateProps); + + this._bindOnResize(); + this._bindOnScroll(); + this._bindOnLoad(); + this._bindObserver(); + this._bindCustomizer(); + + requestAnimationFrame(renderLoop); + } + }, { + key: '_bindOnResize', + value: function _bindOnResize() { + var $window = external_jQuery_default()(window); + var updateProps = this._updateProps.bind(this); + + if (this.useOrientation) { + $window.on('orientationchange', function () { + $window.one('resize', updateProps); + }); + } else { + $window.on('resize', updateProps); + } + } + }, { + key: '_bindOnScroll', + value: function _bindOnScroll() { + external_jQuery_default()(window).on('scroll', this._updateScroll.bind(this)); + } + }, { + key: '_bindOnLoad', + value: function _bindOnLoad() { + external_jQuery_default()(window).on('load', this._updateProps.bind(this)); + } + }, { + key: '_bindObserver', + value: function _bindObserver() { + var self = this; + var updateProps = this._updateProps.bind(this); + var observeCallback = this._observeCallback.bind(this); + + var observeAndUpdateProps = function observeAndUpdateProps() { + observeCallback(); + self._updateProps(true); + self.currentMutationList = []; + }; + + var debouncedObserveCallback = debounce(observeAndUpdateProps, 300); + + if (!window.MutationObserver) { + return; + } + + var observer = new MutationObserver(function (mutationList) { + self.currentMutationList = self.currentMutationList.concat(mutationList); + debouncedObserveCallback(); + }); + + observer.observe(document.body, { + childList: true, + subtree: true + }); + } + }, { + key: '_bindCustomizer', + value: function _bindCustomizer() { + if (typeof wp !== "undefined" && typeof wp.customize !== "undefined") { + if (typeof wp.customize.selectiveRefresh !== "undefined") { + wp.customize.selectiveRefresh.bind('partial-content-rendered', this._updateProps.bind(this)); + } + wp.customize.bind('change', this._updateProps.bind(this)); + } + } + }, { + key: '_updateProps', + value: function _updateProps() { + var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + this._updateSize(force); + this._updateScroll(force); + } + }, { + key: '_observeCallback', + value: function _observeCallback() { + var mutationList = this.currentMutationList; + + external_jQuery_default.a.each(this.observeCallbacks, function (i, fn) { + fn(mutationList); + }); + } + }, { + key: '_renderLoop', + value: function _renderLoop() { + if (!this.frameRendered) { + this._renderCallback(); + this.frameRendered = true; + } + window.requestAnimationFrame(this._renderLoop.bind(this)); + } + }, { + key: '_renderCallback', + value: function _renderCallback() { + var passedArguments = arguments; + external_jQuery_default.a.each(this.renderCallbacks, function (i, fn) { + fn.apply(undefined, toConsumableArray_default()(passedArguments)); + }); + } + }, { + key: '_resizeCallback', + value: function _resizeCallback() { + var passedArguments = arguments; + external_jQuery_default.a.each(this.resizeCallbacks, function (i, fn) { + fn.apply(undefined, toConsumableArray_default()(passedArguments)); + }); + } + }, { + key: '_scrollCallback', + value: function _scrollCallback() { + var passedArguments = arguments; + external_jQuery_default.a.each(this.scrollCallbacks, function (i, fn) { + fn.apply(undefined, toConsumableArray_default()(passedArguments)); + }); + } + }, { + key: '_updateScroll', + value: function _updateScroll() { + var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + this.newProps = assign_default()({}, this.newProps, { + scrollY: window.pageYOffset, + scrollX: window.pageXOffset + }); + + this._shouldUpdate(this._scrollCallback.bind(this)); + } + }, { + key: '_updateSize', + value: function _updateSize() { + var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + var body = document.body; + var html = document.documentElement; + var bodyScrollHeight = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight); + var htmlScrollHeight = Math.max(html.scrollHeight, html.offsetHeight); + + this.newProps = assign_default()({}, this.newProps, { + scrollHeight: Math.max(bodyScrollHeight, htmlScrollHeight), + adminBarHeight: this.getAdminBarHeight(), + windowWidth: this.useOrientation && window.screen && window.screen.availWidth || window.innerWidth, + windowHeight: this.useOrientation && window.screen && window.screen.availHeight || window.innerHeight + }); + + this._shouldUpdate(this._resizeCallback.bind(this)); + } + }, { + key: '_shouldUpdate', + value: function _shouldUpdate(callback) { + var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + + if (this._hasNewProps() || force) { + this.props = assign_default()({}, this.props, this.newProps); + this.newProps = {}; + this.frameRendered = false; + + if (typeof callback === "function") { + callback(); + } + } + } + }, { + key: '_hasNewProps', + value: function _hasNewProps() { + var _this = this; + + return keys_default()(this.newProps).some(function (key) { + return _this.newProps[key] !== _this.props[key]; + }); + } + }, { + key: 'getAdminBarHeight', + value: function getAdminBarHeight() { + var adminBar = document.getElementById('wpadminbar'); + + if (adminBar) { + var box = adminBar.getBoundingClientRect(); + return box.height; + } + + return 0; + } + }, { + key: 'registerOnResize', + value: function registerOnResize(fn) { + if (typeof fn === "function" && this.resizeCallbacks.indexOf(fn) < 0) { + this.resizeCallbacks.push(fn); + } + } + }, { + key: 'registerOnScroll', + value: function registerOnScroll(fn) { + if (typeof fn === "function" && this.scrollCallbacks.indexOf(fn) < 0) { + this.scrollCallbacks.push(fn); + } + } + }, { + key: 'registerObserverCallback', + value: function registerObserverCallback(fn) { + if (typeof fn === "function" && this.observeCallbacks.indexOf(fn) < 0) { + this.observeCallbacks.push(fn); + } + } + }, { + key: 'registerRender', + value: function registerRender(fn) { + if (typeof fn === "function" && this.renderCallbacks.indexOf(fn) < 0) { + this.renderCallbacks.push(fn); + } + } + }, { + key: 'getProps', + value: function getProps() { + return this.props; + } + }]); + + return GlobalService; +}(); + +/* harmony default export */ var globalService = (new globalService_GlobalService()); +// CONCATENATED MODULE: ./src/components/hero.js - this._bindOnScroll(); - this._bindOnLoad(); - this._bindObserver(); - this._bindCustomizer(); - requestAnimationFrame(renderLoop); - } - }, { - key: "_bindOnResize", - value: function _bindOnResize() { - var $window = external_jQuery_default()(window); - - var updateProps = this._updateProps.bind(this); - - if (this.useOrientation) { - $window.on('orientationchange', function () { - $window.one('resize', updateProps); - }); - } else { - $window.on('resize', updateProps); - } - } - }, { - key: "_bindOnScroll", - value: function _bindOnScroll() { - external_jQuery_default()(window).on('scroll', this._updateScroll.bind(this)); - } - }, { - key: "_bindOnLoad", - value: function _bindOnLoad() { - external_jQuery_default()(window).on('load', this._updateProps.bind(this)); - } - }, { - key: "_bindObserver", - value: function _bindObserver() { - var self = this; - var updateProps = this._updateProps.bind(this); +var hero_Hero = function () { + function Hero(element) { + var _this = this; + + classCallCheck_default()(this, Hero); + + this.element = element; + this.progress = 0; + this.timeline = new TimelineMax({ paused: true, onComplete: function onComplete() { + _this.paused = true; + } }); + this.pieces = this.getMarkupPieces(); + this.paused = false; + this.offset = 0; + this.update(); + this.updateOnScroll(); + this.init(); + } + + createClass_default()(Hero, [{ + key: 'init', + value: function init() { + var _this2 = this; + + globalService.registerOnScroll(function () { + _this2.update(); + }); + + globalService.registerRender(function () { + _this2.updateOnScroll(); + }); + + this.addIntroToTimeline(); + this.timeline.addLabel('middle'); + this.addOutroToTimeline(); + this.timeline.addLabel('end'); + + this.pauseTimelineOnScroll(); + this.timeline.play(); + } + }, { + key: 'update', + value: function update() { + var _GlobalService$getPro = globalService.getProps(), + scrollY = _GlobalService$getPro.scrollY; + + this.box = this.element.getBoundingClientRect(); + this.view = { + x: this.box.x, + y: this.box.y + scrollY, + width: this.box.width, + height: this.box.height + }; + } + }, { + key: 'updateOnScroll', + value: function updateOnScroll() { + var _GlobalService$getPro2 = globalService.getProps(), + scrollY = _GlobalService$getPro2.scrollY, + scrollHeight = _GlobalService$getPro2.scrollHeight, + windowHeight = _GlobalService$getPro2.windowHeight; + + // used to calculate animation progress + + + var length = windowHeight * 0.5; + var middleMin = 0; + var middleMax = scrollHeight - windowHeight - length * 0.5; + var middle = this.view.y + (this.box.height - windowHeight) * 0.5; + var middleMid = Math.max(middleMin, Math.min(middle, middleMax)); + + this.start = middleMid - length * 0.5; + this.end = this.start + length; + + this.progress = (scrollY - this.start) / (this.end - this.start); + this.updateTimelineOnScroll(); + } + }, { + key: 'updateTimelineOnScroll', + value: function updateTimelineOnScroll() { + + if (!this.paused) { + return; + } - var observeCallback = this._observeCallback.bind(this); + var currentProgress = this.timeline.progress(); + var middleTime = this.timeline.getLabelTime('middle'); + var endTime = this.timeline.getLabelTime('end'); - var observeAndUpdateProps = function observeAndUpdateProps() { - observeCallback(); + // ( this.progress - 0.5 ) / ( 1 - 0.5 ) = ( newTlProgress - minTlProgress ) / ( 1 - minTlProgress ); + // ( this.progress - 0.5 ) * 2 * ( 1 - minTlProgress ) = ( newTlProgress - minTlProgress ); + // newTlProgress = ( this.progress - 0.5 ) * 2 * ( 1 - minTlProgress ) + minTlProgress; + var minTlProgress = middleTime / endTime; + var newTlProgress = (this.progress - 0.5) * 2 * (1 - minTlProgress) + minTlProgress; + newTlProgress = Math.min(Math.max(minTlProgress, newTlProgress), 1); - self._updateProps(true); + if (currentProgress === newTlProgress) { + return; + } - self.currentMutationList = []; - }; + this.timeline.progress(newTlProgress); + } + }, { + key: 'getMarkupPieces', + value: function getMarkupPieces() { + var container = jQuery(this.element).find('.novablocks-hero__inner-container'); + var headline = container.children().filter('.c-headline').first(); + var title = headline.find('.c-headline__primary'); + var subtitle = headline.find('.c-headline__secondary'); + var separator = headline.next('.wp-block-separator'); + var sepFlower = separator.find('.c-separator__symbol'); + var sepLine = separator.find('.c-separator__line'); + var sepArrow = separator.find('.c-separator__arrow'); + var othersBefore = headline.prevAll(); + var othersAfter = headline.length ? headline.nextAll().not(separator) : container.children(); + + return { headline: headline, title: title, subtitle: subtitle, separator: separator, sepFlower: sepFlower, sepLine: sepLine, sepArrow: sepArrow, othersBefore: othersBefore, othersAfter: othersAfter }; + } + }, { + key: 'addIntroToTimeline', + value: function addIntroToTimeline() { + var timeline = this.timeline; + + var _GlobalService$getPro3 = globalService.getProps(), + windowWidth = _GlobalService$getPro3.windowWidth; + + var _pieces = this.pieces, + headline = _pieces.headline, + title = _pieces.title, + subtitle = _pieces.subtitle, + separator = _pieces.separator, + sepFlower = _pieces.sepFlower, + sepLine = _pieces.sepLine, + sepArrow = _pieces.sepArrow, + othersBefore = _pieces.othersBefore, + othersAfter = _pieces.othersAfter; + + + if (title.length && title.text().trim().length) { + + var splitTitle = new SplitText(title, { wordsClass: 'c-headline__word' }); + + splitTitle.lines.forEach(function (line) { + var words = from_default()(line.children); + var letters = []; + + words.forEach(function (word) { + letters.push.apply(letters, toConsumableArray_default()(word.children)); + }); + + letters.forEach(function (letter) { + var box = letter.getBoundingClientRect(); + var width = letter.offsetWidth; + var offset = box.x - windowWidth / 2; + + var offsetPercent = 2 * offset / windowWidth; + var move = 400 * letters.length * offsetPercent; + + timeline.from(letter, 0.72, { + x: move, + ease: Expo.easeOut + }, 0); + }); + }); + + timeline.fromTo(title, 0.89, { + opacity: 0 + }, { + opacity: 1, + ease: Expo.easeOut + }, 0); + + // aici era title dar facea un glitch ciudat + timeline.fromTo(headline, 1, { + 'y': 30 + }, { + 'y': 0, + ease: Expo.easeOut + }, 0); + } - var debouncedObserveCallback = debounce(observeAndUpdateProps, 300); + if (subtitle.length) { + timeline.fromTo(subtitle, 0.65, { opacity: 0 }, { opacity: 1, ease: Quint.easeOut }, '-=0.65'); + timeline.fromTo(subtitle, 0.9, { y: 30 }, { y: 0, ease: Quint.easeOut }, '-=0.65'); + } - if (!window.MutationObserver) { - return; - } + if (separator.length) { - var observer = new MutationObserver(function (mutationList) { - self.currentMutationList = self.currentMutationList.concat(mutationList); - debouncedObserveCallback(); - }); - observer.observe(document.body, { - childList: true, - subtree: true - }); - } - }, { - key: "_bindCustomizer", - value: function _bindCustomizer() { - if (typeof wp !== "undefined" && typeof wp.customize !== "undefined") { - if (typeof wp.customize.selectiveRefresh !== "undefined") { - wp.customize.selectiveRefresh.bind('partial-content-rendered', this._updateProps.bind(this)); - } - - wp.customize.bind('change', this._updateProps.bind(this)); - } - } - }, { - key: "_updateProps", - value: function _updateProps() { - var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + if (sepFlower.length) { + timeline.fromTo(sepFlower, 0.15, { opacity: 0 }, { opacity: 1, ease: Quint.easeOut }, '-=0.6'); + timeline.fromTo(sepFlower, 0.55, { rotation: -270 }, { rotation: 0, ease: Back.easeOut }, '-=0.5'); + } - this._updateSize(force); + if (sepLine.length) { + timeline.fromTo(sepLine, 0.6, { width: 0 }, { width: '42%', opacity: 1, ease: Quint.easeOut }, '-=0.55'); + timeline.fromTo(separator, 0.6, { width: 0 }, { width: '100%', opacity: 1, ease: Quint.easeOut }, '-=0.6'); + } - this._updateScroll(force); - } - }, { - key: "_observeCallback", - value: function _observeCallback() { - var mutationList = this.currentMutationList; - external_jQuery_default.a.each(this.observeCallbacks, function (i, fn) { - fn(mutationList); - }); - } - }, { - key: "_renderLoop", - value: function _renderLoop() { - if (!this.frameRendered) { - this._renderCallback(); + if (sepArrow.length) { + timeline.fromTo(sepArrow, 0.2, { opacity: 0 }, { opacity: 1, ease: Quint.easeOut }, '-=0.27'); + } + } - this.frameRendered = true; - } + if (othersAfter.length) { + timeline.fromTo(othersAfter, 0.5, { opacity: 0 }, { opacity: 1, ease: Quint.easeOut }, '-=0.28'); + timeline.fromTo(othersAfter, 0.75, { y: -20 }, { y: 0 }, '-=0.5'); + } - window.requestAnimationFrame(this._renderLoop.bind(this)); - } - }, { - key: "_renderCallback", - value: function _renderCallback() { - var passedArguments = arguments; - external_jQuery_default.a.each(this.renderCallbacks, function (i, fn) { - fn.apply(void 0, toConsumableArray_default()(passedArguments)); - }); - } - }, { - key: "_resizeCallback", - value: function _resizeCallback() { - var passedArguments = arguments; - external_jQuery_default.a.each(this.resizeCallbacks, function (i, fn) { - fn.apply(void 0, toConsumableArray_default()(passedArguments)); - }); - } - }, { - key: "_scrollCallback", - value: function _scrollCallback() { - var passedArguments = arguments; - external_jQuery_default.a.each(this.scrollCallbacks, function (i, fn) { - fn.apply(void 0, toConsumableArray_default()(passedArguments)); - }); - } - }, { - key: "_updateScroll", - value: function _updateScroll() { - var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - this.newProps = Object.assign({}, this.newProps, { - scrollY: window.pageYOffset, - scrollX: window.pageXOffset - }); - - this._shouldUpdate(this._scrollCallback.bind(this)); - } - }, { - key: "_updateSize", - value: function _updateSize() { - var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - var body = document.body; - var html = document.documentElement; - var bodyScrollHeight = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight); - var htmlScrollHeight = Math.max(html.scrollHeight, html.offsetHeight); - this.newProps = Object.assign({}, this.newProps, { - scrollHeight: Math.max(bodyScrollHeight, htmlScrollHeight), - adminBarHeight: this.getAdminBarHeight(), - windowWidth: this.useOrientation && window.screen && window.screen.availWidth || window.innerWidth, - windowHeight: this.useOrientation && window.screen && window.screen.availHeight || window.innerHeight - }); - - this._shouldUpdate(this._resizeCallback.bind(this)); - } - }, { - key: "_shouldUpdate", - value: function _shouldUpdate(callback) { - var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (this._hasNewProps() || force) { - this.props = Object.assign({}, this.props, this.newProps); - this.newProps = {}; - this.frameRendered = false; - - if (typeof callback === "function") { - callback(); - } - } - } - }, { - key: "_hasNewProps", - value: function _hasNewProps() { - var _this = this; - - return Object.keys(this.newProps).some(function (key) { - return _this.newProps[key] !== _this.props[key]; - }); - } - }, { - key: "getAdminBarHeight", - value: function getAdminBarHeight() { - var adminBar = document.getElementById('wpadminbar'); - - if (adminBar) { - var box = adminBar.getBoundingClientRect(); - return box.height; - } + if (othersBefore.length) { + timeline.fromTo(othersBefore, 0.5, { opacity: 0 }, { opacity: 1, ease: Quint.easeOut }, '-=0.75'); + timeline.fromTo(othersBefore, 0.75, { y: 20 }, { y: 0 }, '-=0.75'); + } - return 0; - } - }, { - key: "registerOnResize", - value: function registerOnResize(fn) { - if (typeof fn === "function" && this.resizeCallbacks.indexOf(fn) < 0) { - this.resizeCallbacks.push(fn); - } - } - }, { - key: "registerOnScroll", - value: function registerOnScroll(fn) { - if (typeof fn === "function" && this.scrollCallbacks.indexOf(fn) < 0) { - this.scrollCallbacks.push(fn); - } - } - }, { - key: "registerObserverCallback", - value: function registerObserverCallback(fn) { - if (typeof fn === "function" && this.observeCallbacks.indexOf(fn) < 0) { - this.observeCallbacks.push(fn); - } - } - }, { - key: "registerRender", - value: function registerRender(fn) { - if (typeof fn === "function" && this.renderCallbacks.indexOf(fn) < 0) { - this.renderCallbacks.push(fn); - } - } - }, { - key: "getProps", - value: function getProps() { - return this.props; - } - }]); + this.timeline = timeline; + } + }, { + key: 'addOutroToTimeline', + value: function addOutroToTimeline() { + var _pieces2 = this.pieces, + title = _pieces2.title, + subtitle = _pieces2.subtitle, + othersBefore = _pieces2.othersBefore, + othersAfter = _pieces2.othersAfter, + separator = _pieces2.separator, + sepLine = _pieces2.sepLine, + sepFlower = _pieces2.sepFlower, + sepArrow = _pieces2.sepArrow; + + var timeline = this.timeline; + + timeline.fromTo(title, 1.08, { + y: 0 + }, { + opacity: 0, + y: -60, + ease: Quad.easeIn + }, 'middle'); + + timeline.to(subtitle, 1.08, { + opacity: 0, + y: -90, + ease: Quad.easeIn + }, 'middle'); + + timeline.to(othersBefore, 1.08, { + y: 60, + opacity: 0, + ease: Quad.easeIn + }, 'middle'); + + timeline.to(othersAfter, 1.08, { + y: 60, + opacity: 0, + ease: Quad.easeIn + }, 'middle'); + + timeline.to(sepLine, 0.86, { width: '0%', opacity: 0, ease: Quad.easeIn }, '-=0.94'); + timeline.to(separator, 0.86, { width: '0%', opacity: 0, ease: Quad.easeIn }, '-=0.86'); + timeline.to(sepFlower, 1, { rotation: 180 }, '-=1.08'); + timeline.to(sepFlower, 0.11, { opacity: 0 }, '-=0.03'); + timeline.to(sepArrow, 0.14, { opacity: 0 }, '-=1.08'); + + this.timeline = timeline; + } + }, { + key: 'pauseTimelineOnScroll', + value: function pauseTimelineOnScroll() { + var _this3 = this; + + var middleTime = this.timeline.getLabelTime('middle'); + var endTime = this.timeline.getLabelTime('end'); + + this.timeline.eventCallback('onUpdate', function (tl) { + var time = tl.time(); + + // calculate the current timeline progress relative to middle and end labels + // in such a way that timelineProgress is 0.5 for middle and 1 for end + // because we don't want the animation to be stopped before the middle label + var tlProgress = (time - middleTime) / (endTime - middleTime); + var pastMiddle = time > middleTime; + var pastScroll = tlProgress * 0.5 + 0.5 >= _this3.progress; + + if (pastMiddle && pastScroll) { + tl.pause(); + _this3.timeline.eventCallback('onUpdate', null); + _this3.paused = true; + } + }, ["{self}"]); + } + }]); - return GlobalService; + return Hero; }(); -/* harmony default export */ var globalService = (new globalService_GlobalService()); -// CONCATENATED MODULE: ./src/components/hero.js +/* harmony default export */ var components_hero = (hero_Hero); +// CONCATENATED MODULE: ./src/components/commentsArea.js +var commentsArea_CommentsArea = function () { + function CommentsArea(element) { + classCallCheck_default()(this, CommentsArea); -var hero_Hero = -/*#__PURE__*/ -function () { - function Hero(element) { - var _this = this; + this.$element = external_jQuery_default()(element); + this.$checkbox = this.$element.find('.c-comments-toggle__checkbox'); + this.$content = this.$element.find('.comments-area__content'); + this.$contentWrap = this.$element.find('.comments-area__wrap'); - classCallCheck_default()(this, Hero); + // overwrite CSS that hides the comments area content + this.$contentWrap.css('display', 'block'); - this.element = element; - this.progress = 0; - this.timeline = new TimelineMax({ - paused: true, - onComplete: function onComplete() { - _this.paused = true; - } - }); - this.pieces = this.getMarkupPieces(); - this.paused = false; - this.offset = 0; - this.update(); - this.updateOnScroll(); - this.init(); - } + this.$checkbox.on('change', this.onChange.bind(this)); - createClass_default()(Hero, [{ - key: "init", - value: function init() { - var _this2 = this; - - globalService.registerOnScroll(function () { - _this2.update(); - }); - globalService.registerRender(function () { - _this2.updateOnScroll(); - }); - this.addIntroToTimeline(); - this.timeline.addLabel('middle'); - this.addOutroToTimeline(); - this.timeline.addLabel('end'); - this.pauseTimelineOnScroll(); - this.timeline.play(); - } - }, { - key: "update", - value: function update() { - var _GlobalService$getPro = globalService.getProps(), - scrollY = _GlobalService$getPro.scrollY; - - this.box = this.element.getBoundingClientRect(); - this.view = { - x: this.box.x, - y: this.box.y + scrollY, - width: this.box.width, - height: this.box.height - }; - } - }, { - key: "updateOnScroll", - value: function updateOnScroll() { - var _GlobalService$getPro2 = globalService.getProps(), - scrollY = _GlobalService$getPro2.scrollY, - scrollHeight = _GlobalService$getPro2.scrollHeight, - windowHeight = _GlobalService$getPro2.windowHeight; // used to calculate animation progress - - - var length = windowHeight * 0.5; - var middleMin = 0; - var middleMax = scrollHeight - windowHeight - length * 0.5; - var middle = this.view.y + (this.box.height - windowHeight) * 0.5; - var middleMid = Math.max(middleMin, Math.min(middle, middleMax)); - this.start = middleMid - length * 0.5; - this.end = this.start + length; - this.progress = (scrollY - this.start) / (this.end - this.start); - this.updateTimelineOnScroll(); - } - }, { - key: "updateTimelineOnScroll", - value: function updateTimelineOnScroll() { - if (!this.paused) { - return; - } + this.checkWindowLocationComments(); + } - var currentProgress = this.timeline.progress(); - var middleTime = this.timeline.getLabelTime('middle'); - var endTime = this.timeline.getLabelTime('end'); // ( this.progress - 0.5 ) / ( 1 - 0.5 ) = ( newTlProgress - minTlProgress ) / ( 1 - minTlProgress ); - // ( this.progress - 0.5 ) * 2 * ( 1 - minTlProgress ) = ( newTlProgress - minTlProgress ); - // newTlProgress = ( this.progress - 0.5 ) * 2 * ( 1 - minTlProgress ) + minTlProgress; + createClass_default()(CommentsArea, [{ + key: 'onChange', + value: function onChange() { + this.toggle(false); + } + }, { + key: 'toggle', + value: function toggle() { + var instant = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + var $contentWrap = this.$contentWrap; + var isChecked = this.$checkbox.prop('checked'); + var newHeight = isChecked ? this.$content.outerHeight() : 0; + + if (instant) { + $contentWrap.css('height', newHeight); + } else { + TweenMax.to($contentWrap, .4, { + height: newHeight, + onComplete: function onComplete() { + if (isChecked) { + $contentWrap.css('height', ''); + } + } + }); + } + } + }, { + key: 'checkWindowLocationComments', + value: function checkWindowLocationComments() { + if (window.location.href.indexOf('#comment') === -1) { + this.$checkbox.prop('checked', false); + this.toggle(true); + } + } + }]); - var minTlProgress = middleTime / endTime; - var newTlProgress = (this.progress - 0.5) * 2 * (1 - minTlProgress) + minTlProgress; - newTlProgress = Math.min(Math.max(minTlProgress, newTlProgress), 1); + return CommentsArea; +}(); - if (currentProgress === newTlProgress) { - return; - } +/* harmony default export */ var commentsArea = (commentsArea_CommentsArea); +// CONCATENATED MODULE: ./src/components/header.js - this.timeline.progress(newTlProgress); - } - }, { - key: "getMarkupPieces", - value: function getMarkupPieces() { - var container = jQuery(this.element).find('.novablocks-hero__inner-container'); - var headline = container.children().filter('.c-headline').first(); - var title = headline.find('.c-headline__primary'); - var subtitle = headline.find('.c-headline__secondary'); - var separator = headline.next('.wp-block-separator'); - var sepFlower = separator.find('.c-separator__symbol'); - var sepLine = separator.find('.c-separator__line'); - var sepArrow = separator.find('.c-separator__arrow'); - var othersBefore = headline.prevAll(); - var othersAfter = headline.length ? headline.nextAll().not(separator) : container.children(); - return { - headline: headline, - title: title, - subtitle: subtitle, - separator: separator, - sepFlower: sepFlower, - sepLine: sepLine, - sepArrow: sepArrow, - othersBefore: othersBefore, - othersAfter: othersAfter - }; - } - }, { - key: "addIntroToTimeline", - value: function addIntroToTimeline() { - var timeline = this.timeline; - - var _GlobalService$getPro3 = globalService.getProps(), - windowWidth = _GlobalService$getPro3.windowWidth; - - var _this$pieces = this.pieces, - headline = _this$pieces.headline, - title = _this$pieces.title, - subtitle = _this$pieces.subtitle, - separator = _this$pieces.separator, - sepFlower = _this$pieces.sepFlower, - sepLine = _this$pieces.sepLine, - sepArrow = _this$pieces.sepArrow, - othersBefore = _this$pieces.othersBefore, - othersAfter = _this$pieces.othersAfter; - - if (title.length && title.text().trim().length) { - var splitTitle = new SplitText(title, { - wordsClass: 'c-headline__word' - }); - splitTitle.lines.forEach(function (line) { - var words = Array.from(line.children); - var letters = []; - words.forEach(function (word) { - letters.push.apply(letters, toConsumableArray_default()(word.children)); - }); - letters.forEach(function (letter) { - var box = letter.getBoundingClientRect(); - var width = letter.offsetWidth; - var offset = box.x - windowWidth / 2; - var offsetPercent = 2 * offset / windowWidth; - var move = 400 * letters.length * offsetPercent; - timeline.from(letter, 0.72, { - x: move, - ease: Expo.easeOut - }, 0); - }); - }); - timeline.fromTo(title, 0.89, { - opacity: 0 - }, { - opacity: 1, - ease: Expo.easeOut - }, 0); // aici era title dar facea un glitch ciudat - - timeline.fromTo(headline, 1, { - 'y': 30 - }, { - 'y': 0, - ease: Expo.easeOut - }, 0); - } - if (subtitle.length) { - timeline.fromTo(subtitle, 0.65, { - opacity: 0 - }, { - opacity: 1, - ease: Quint.easeOut - }, '-=0.65'); - timeline.fromTo(subtitle, 0.9, { - y: 30 - }, { - y: 0, - ease: Quint.easeOut - }, '-=0.65'); - } - if (separator.length) { - if (sepFlower.length) { - timeline.fromTo(sepFlower, 0.15, { - opacity: 0 - }, { - opacity: 1, - ease: Quint.easeOut - }, '-=0.6'); - timeline.fromTo(sepFlower, 0.55, { - rotation: -270 - }, { - rotation: 0, - ease: Back.easeOut - }, '-=0.5'); - } - - if (sepLine.length) { - timeline.fromTo(sepLine, 0.6, { - width: 0 - }, { - width: '42%', - opacity: 1, - ease: Quint.easeOut - }, '-=0.55'); - timeline.fromTo(separator, 0.6, { - width: 0 - }, { - width: '100%', - opacity: 1, - ease: Quint.easeOut - }, '-=0.6'); - } - - if (sepArrow.length) { - timeline.fromTo(sepArrow, 0.2, { - opacity: 0 - }, { - opacity: 1, - ease: Quint.easeOut - }, '-=0.27'); - } - } - if (othersAfter.length) { - timeline.fromTo(othersAfter, 0.5, { - opacity: 0 - }, { - opacity: 1, - ease: Quint.easeOut - }, '-=0.28'); - timeline.fromTo(othersAfter, 0.75, { - y: -20 - }, { - y: 0 - }, '-=0.5'); - } - if (othersBefore.length) { - timeline.fromTo(othersBefore, 0.5, { - opacity: 0 - }, { - opacity: 1, - ease: Quint.easeOut - }, '-=0.75'); - timeline.fromTo(othersBefore, 0.75, { - y: 20 - }, { - y: 0 - }, '-=0.75'); - } - this.timeline = timeline; - } - }, { - key: "addOutroToTimeline", - value: function addOutroToTimeline() { - var _this$pieces2 = this.pieces, - title = _this$pieces2.title, - subtitle = _this$pieces2.subtitle, - othersBefore = _this$pieces2.othersBefore, - othersAfter = _this$pieces2.othersAfter, - separator = _this$pieces2.separator, - sepLine = _this$pieces2.sepLine, - sepFlower = _this$pieces2.sepFlower, - sepArrow = _this$pieces2.sepArrow; - var timeline = this.timeline; - timeline.fromTo(title, 1.08, { - y: 0 - }, { - opacity: 0, - y: -60, - ease: Quad.easeIn - }, 'middle'); - timeline.to(subtitle, 1.08, { - opacity: 0, - y: -90, - ease: Quad.easeIn - }, 'middle'); - timeline.to(othersBefore, 1.08, { - y: 60, - opacity: 0, - ease: Quad.easeIn - }, 'middle'); - timeline.to(othersAfter, 1.08, { - y: 60, - opacity: 0, - ease: Quad.easeIn - }, 'middle'); - timeline.to(sepLine, 0.86, { - width: '0%', - opacity: 0, - ease: Quad.easeIn - }, '-=0.94'); - timeline.to(separator, 0.86, { - width: '0%', - opacity: 0, - ease: Quad.easeIn - }, '-=0.86'); - timeline.to(sepFlower, 1, { - rotation: 180 - }, '-=1.08'); - timeline.to(sepFlower, 0.11, { - opacity: 0 - }, '-=0.03'); - timeline.to(sepArrow, 0.14, { - opacity: 0 - }, '-=1.08'); - this.timeline = timeline; - } - }, { - key: "pauseTimelineOnScroll", - value: function pauseTimelineOnScroll() { - var _this3 = this; - - var middleTime = this.timeline.getLabelTime('middle'); - var endTime = this.timeline.getLabelTime('end'); - this.timeline.eventCallback('onUpdate', function (tl) { - var time = tl.time(); // calculate the current timeline progress relative to middle and end labels - // in such a way that timelineProgress is 0.5 for middle and 1 for end - // because we don't want the animation to be stopped before the middle label - - var tlProgress = (time - middleTime) / (endTime - middleTime); - var pastMiddle = time > middleTime; - var pastScroll = tlProgress * 0.5 + 0.5 >= _this3.progress; - - if (pastMiddle && pastScroll) { - tl.pause(); - - _this3.timeline.eventCallback('onUpdate', null); - - _this3.paused = true; - } - }, ["{self}"]); - } - }]); +var defaults = { + offsetTargetElement: null +}; - return Hero; -}(); +var header_Header = function () { + function Header(element, args) { + classCallCheck_default()(this, Header); + if (!element) return; -// CONCATENATED MODULE: ./src/components/commentsArea.js + this.element = element; + this.options = assign_default()({}, defaults, args); + this.$header = external_jQuery_default()(this.element); + this.$toggle = external_jQuery_default()('.c-menu-toggle'); + this.$toggleWrap = external_jQuery_default()('.c-menu-toggle__wrap'); + this.scrolled = false; + this.inversed = false; + this.wasSticky = external_jQuery_default()('body').is('.has-site-header-fixed'); + this.offset = 0; + this.scrollOffset = 0; + this.mobileHeaderHeight = 0; -var commentsArea_CommentsArea = -/*#__PURE__*/ -function () { - function CommentsArea(element) { - classCallCheck_default()(this, CommentsArea); + this.createMobileHeader(); - this.$element = external_jQuery_default()(element); - this.$checkbox = this.$element.find('.c-comments-toggle__checkbox'); - this.$content = this.$element.find('.comments-area__content'); - this.$contentWrap = this.$element.find('.comments-area__wrap'); // overwrite CSS that hides the comments area content + this.onResize(); + this.render(false); + globalService.registerOnResize(this.onResize.bind(this)); - this.$contentWrap.css('display', 'block'); - this.$checkbox.on('change', this.onChange.bind(this)); - this.checkWindowLocationComments(); - } + this.initialize(); + } - createClass_default()(CommentsArea, [{ - key: "onChange", - value: function onChange() { - this.toggle(false); - } - }, { - key: "toggle", - value: function toggle() { - var instant = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - var $contentWrap = this.$contentWrap; - var isChecked = this.$checkbox.prop('checked'); - var newHeight = isChecked ? this.$content.outerHeight() : 0; - - if (instant) { - $contentWrap.css('height', newHeight); - } else { - TweenMax.to($contentWrap, .4, { - height: newHeight, - onComplete: function onComplete() { - if (isChecked) { - $contentWrap.css('height', ''); - } - } - }); - } - } - }, { - key: "checkWindowLocationComments", - value: function checkWindowLocationComments() { - if (window.location.href.indexOf('#comment') === -1) { - this.$checkbox.prop('checked', false); - this.toggle(true); - } - } - }]); + createClass_default()(Header, [{ + key: 'initialize', + value: function initialize() { + this.timeline = this.getInroTimeline(); - return CommentsArea; -}(); + external_jQuery_default()('.site-header__wrapper').css('transition', 'none'); + this.$header.addClass('site-header--fixed site-header--ready'); + this.$mobileHeader.addClass('site-header--fixed site-header--ready'); -// CONCATENATED MODULE: ./src/components/header.js + this.timeline.play(); + } + }, { + key: 'update', + value: function update() { + this.updatePageOffset(); + this.updateHeaderOffset(); + this.updateMobileHeaderOffset(); + } + }, { + key: 'getInroTimeline', + value: function getInroTimeline() { + var element = this.element; + var timeline = new TimelineMax({ paused: true }); + var height = external_jQuery_default()(element).outerHeight(); + var transitionEasing = Power4.easeOut; + var transitionDuration = 0.5; + timeline.to(element, transitionDuration, { opacity: 1, ease: transitionEasing }, 0); + timeline.to({ height: 0 }, transitionDuration, { + height: height, + onUpdate: this.onHeightUpdate.bind(this), + onUpdateParams: ["{self}"], + onComplete: function onComplete() { + external_jQuery_default()('.site-header__wrapper').css('transition', ''); + }, + ease: transitionEasing + }, 0); + + return timeline; + } + }, { + key: 'onHeightUpdate', + value: function onHeightUpdate(tween) { + this.getProps(); + this.box = assign_default()(this.box, { height: tween.target.height }); + this.setVisibleHeaderHeight(); + this.update(); + } + }, { + key: 'getMobileHeaderHeight', + value: function getMobileHeaderHeight() { + var mobileHeaderHeight = this.$mobileHeader.css('height', '').outerHeight(); + var toggleHeight = this.$toggleWrap.css('height', '').outerHeight(); + return Math.max(mobileHeaderHeight, toggleHeight); + } + }, { + key: 'isMobileHeaderVisibile', + value: function isMobileHeaderVisibile() { + return this.$mobileHeader.is(':visible'); + } + }, { + key: 'setVisibleHeaderHeight', + value: function setVisibleHeaderHeight() { + this.visibleHeaderHeight = this.isMobileHeaderVisibile() ? this.mobileHeaderHeight : this.box.height; + } + }, { + key: 'getProps', + value: function getProps() { + this.box = this.element.getBoundingClientRect(); + this.scrollOffset = this.getScrollOffset(); + this.mobileHeaderHeight = this.getMobileHeaderHeight(); + } + }, { + key: 'onResize', + value: function onResize() { + var $header = external_jQuery_default()(this.element); + var wasScrolled = $header.hasClass('site-header--scrolled'); + + $header.css('transition', 'none'); + $header.removeClass('site-header--scrolled'); + + this.shouldMakeHeaderStatic(); + this.getProps(); + this.setVisibleHeaderHeight(); + + $header.toggleClass('site-header--scrolled', wasScrolled); + + if (window.requestIdleCallback) { + requestIdleCallback(function () { + $header.css('transition', ''); + }); + } else { + setTimeout(function () { + $header.css('transition', ''); + }, 0); + } + this.update(); + } + }, { + key: 'shouldMakeHeaderStatic', + value: function shouldMakeHeaderStatic() { + var $body = external_jQuery_default()('body'); + var _GlobalService$getPro = globalService.getProps(), + windowHeight = _GlobalService$getPro.windowHeight; -var defaults = { - offsetTargetElement: null -}; + if (this.wasSticky) { + $body.toggleClass('has-site-header-fixed', this.visibleHeaderHeight < windowHeight * 0.2); + } + } + }, { + key: 'updateHeaderOffset', + value: function updateHeaderOffset() { + if (!this.element) return; -var header_Header = -/*#__PURE__*/ -function () { - function Header(element, args) { - classCallCheck_default()(this, Header); - - if (!element) return; - this.element = element; - this.options = Object.assign({}, defaults, args); - this.$header = external_jQuery_default()(this.element); - this.$toggle = external_jQuery_default()('.c-menu-toggle'); - this.$toggleWrap = external_jQuery_default()('.c-menu-toggle__wrap'); - this.scrolled = false; - this.inversed = false; - this.wasSticky = external_jQuery_default()('body').is('.has-site-header-fixed'); - this.offset = 0; - this.scrollOffset = 0; - this.mobileHeaderHeight = 0; - this.createMobileHeader(); - this.onResize(); - this.render(false); - globalService.registerOnResize(this.onResize.bind(this)); - this.initialize(); - } + this.element.style.marginTop = this.offset + 'px'; + } + }, { + key: 'updateMobileHeaderOffset', + value: function updateMobileHeaderOffset() { + if (!this.$mobileHeader) return; + + this.$mobileHeader.css({ + height: this.mobileHeaderHeight, + marginTop: this.offset + 'px' + }); + + external_jQuery_default()('.site-header__inner-container').css({ + marginTop: this.mobileHeaderHeight + }); + + this.$toggleWrap.css({ + height: this.mobileHeaderHeight, + marginTop: this.offset + 'px' + }); + } + }, { + key: 'getScrollOffset', + value: function getScrollOffset() { + var _GlobalService$getPro2 = globalService.getProps(), + adminBarHeight = _GlobalService$getPro2.adminBarHeight, + scrollY = _GlobalService$getPro2.scrollY; - createClass_default()(Header, [{ - key: "initialize", - value: function initialize() { - this.timeline = this.getInroTimeline(); - external_jQuery_default()('.site-header__wrapper').css('transition', 'none'); - this.$header.addClass('site-header--fixed site-header--ready'); - this.$mobileHeader.addClass('site-header--fixed site-header--ready'); - this.timeline.play(); - } - }, { - key: "update", - value: function update() { - this.updatePageOffset(); - this.updateHeaderOffset(); - this.updateMobileHeaderOffset(); - } - }, { - key: "getInroTimeline", - value: function getInroTimeline() { - var element = this.element; - var timeline = new TimelineMax({ - paused: true - }); - var height = external_jQuery_default()(element).outerHeight(); - var transitionEasing = Power4.easeOut; - var transitionDuration = 0.5; - timeline.to(element, transitionDuration, { - opacity: 1, - ease: transitionEasing - }, 0); - timeline.to({ - height: 0 - }, transitionDuration, { - height: height, - onUpdate: this.onHeightUpdate.bind(this), - onUpdateParams: ["{self}"], - onComplete: function onComplete() { - external_jQuery_default()('.site-header__wrapper').css('transition', ''); - }, - ease: transitionEasing - }, 0); - return timeline; - } - }, { - key: "onHeightUpdate", - value: function onHeightUpdate(tween) { - this.getProps(); - this.box = Object.assign(this.box, { - height: tween.target.height - }); - this.setVisibleHeaderHeight(); - this.update(); - } - }, { - key: "getMobileHeaderHeight", - value: function getMobileHeaderHeight() { - var mobileHeaderHeight = this.$mobileHeader.css('height', '').outerHeight(); - var toggleHeight = this.$toggleWrap.css('height', '').outerHeight(); - return Math.max(mobileHeaderHeight, toggleHeight); - } - }, { - key: "isMobileHeaderVisibile", - value: function isMobileHeaderVisibile() { - return this.$mobileHeader.is(':visible'); - } - }, { - key: "setVisibleHeaderHeight", - value: function setVisibleHeaderHeight() { - this.visibleHeaderHeight = this.isMobileHeaderVisibile() ? this.mobileHeaderHeight : this.box.height; - } - }, { - key: "getProps", - value: function getProps() { - this.box = this.element.getBoundingClientRect(); - this.scrollOffset = this.getScrollOffset(); - this.mobileHeaderHeight = this.getMobileHeaderHeight(); - } - }, { - key: "onResize", - value: function onResize() { - var $header = external_jQuery_default()(this.element); - var wasScrolled = $header.hasClass('site-header--scrolled'); - $header.css('transition', 'none'); - $header.removeClass('site-header--scrolled'); - this.shouldMakeHeaderStatic(); - this.getProps(); - this.setVisibleHeaderHeight(); - $header.toggleClass('site-header--scrolled', wasScrolled); - - if (window.requestIdleCallback) { - requestIdleCallback(function () { - $header.css('transition', ''); - }); - } else { - setTimeout(function () { - $header.css('transition', ''); - }, 0); - } + var offsetTargetElement = this.options.offsetTargetElement; - this.update(); - } - }, { - key: "shouldMakeHeaderStatic", - value: function shouldMakeHeaderStatic() { - var $body = external_jQuery_default()('body'); - var _GlobalService$getPro = globalService.getProps(), - windowHeight = _GlobalService$getPro.windowHeight; + if (offsetTargetElement) { + var offsetTargetBox = offsetTargetElement.getBoundingClientRect(); + var targetBottom = offsetTargetBox.top + scrollY + offsetTargetBox.height; + var headerOffset = adminBarHeight + this.offset + this.box.height / 2; + return targetBottom - headerOffset; + } - if (this.wasSticky) { - $body.toggleClass('has-site-header-fixed', this.visibleHeaderHeight < windowHeight * 0.2); - } - } - }, { - key: "updateHeaderOffset", - value: function updateHeaderOffset() { - if (!this.element) return; - this.element.style.marginTop = this.offset + 'px'; - } - }, { - key: "updateMobileHeaderOffset", - value: function updateMobileHeaderOffset() { - if (!this.$mobileHeader) return; - this.$mobileHeader.css({ - height: this.mobileHeaderHeight, - marginTop: this.offset + 'px' - }); - external_jQuery_default()('.site-header__inner-container').css({ - marginTop: this.mobileHeaderHeight - }); - this.$toggleWrap.css({ - height: this.mobileHeaderHeight, - marginTop: this.offset + 'px' - }); - } - }, { - key: "getScrollOffset", - value: function getScrollOffset() { - var _GlobalService$getPro2 = globalService.getProps(), - adminBarHeight = _GlobalService$getPro2.adminBarHeight, - scrollY = _GlobalService$getPro2.scrollY; - - var offsetTargetElement = this.options.offsetTargetElement; - - if (offsetTargetElement) { - var offsetTargetBox = offsetTargetElement.getBoundingClientRect(); - var targetBottom = offsetTargetBox.top + scrollY + offsetTargetBox.height; - var headerOffset = adminBarHeight + this.offset + this.box.height / 2; - return targetBottom - headerOffset; - } + return 0; + } + }, { + key: 'updatePageOffset', + value: function updatePageOffset() { + var $page = external_jQuery_default()('#page'); + var $hero = external_jQuery_default()('.has-hero .novablocks-hero').first().find('.novablocks-hero__foreground'); + + $page.css('paddingTop', this.visibleHeaderHeight + this.offset + 'px'); + $hero.css('marginTop', this.offset + 'px'); + } + }, { + key: 'createMobileHeader', + value: function createMobileHeader() { + if (this.createdMobileHeader) return; - return 0; - } - }, { - key: "updatePageOffset", - value: function updatePageOffset() { - var $page = external_jQuery_default()('#page'); - var $hero = external_jQuery_default()('.has-hero .novablocks-hero').first().find('.novablocks-hero__foreground'); - $page.css('paddingTop', this.visibleHeaderHeight + this.offset + 'px'); - $hero.css('marginTop', this.offset + 'px'); - } - }, { - key: "createMobileHeader", - value: function createMobileHeader() { - if (this.createdMobileHeader) return; - var $mobileHeader = external_jQuery_default()('.site-header--mobile'); - - if ($mobileHeader.length) { - this.$mobileHeader = $mobileHeader; - this.createdMobileHeader = true; - return; - } + var $mobileHeader = external_jQuery_default()('.site-header--mobile'); - this.$mobileHeader = external_jQuery_default()('