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AAIkC,GAAW,IAAIC,MAAOC,UACtBC,EAAaxE,KAAKY,IAAI,EAAG,IAAMyD,EAAWJ,IAC1CQ,EAAKpC,OAAOqC,YAAW,WACvBvC,EAASkC,EAAWG,EACxB,GAAGA,GAEH,OADAP,EAAWI,EAAWG,EACfC,CACX,GAECpC,OAAO+B,uBACR/B,OAAO+B,qBAAuB,SAAUK,GACpCE,aAAaF,EACjB,EAEP,CAzBD,GAkDK9E,OAAOiF,UACRjF,OAAOiF,QAAU,SAAUC,GAIvB,IAHA,IAAIC,EAAWnF,OAAOoF,KAAKF,GACvBrC,EAAIsC,EAAS3D,OACb6D,EAAW,IAAIvF,MAAM+C,GAClBA,KAAKwC,EAASxC,GAAK,CAACsC,EAAStC,GAAIqC,EAAIC,EAAStC,KAErD,OAAOwC,CACX,E","sources":["webpack:///./html/wp-content/themes/ls/src/js/helpers/polyfills/olderBrowsers.js"],"sourcesContent":["// Array.from\n// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/from?v=example\n// Production steps of ECMA-262, Edition 6, 22.1.2.1\nif (!Array.from) {\n Array.from = (function () {\n var toStr = Object.prototype.toString;\n var isCallable = function (fn) {\n return typeof fn === 'function' || toStr.call(fn) === '[object Function]';\n };\n var toInteger = function (value) {\n var number = Number(value);\n if (isNaN(number)) {\n return 0;\n }\n if (number === 0 || !isFinite(number)) {\n return number;\n }\n return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n };\n var maxSafeInteger = Math.pow(2, 53) - 1;\n var toLength = function (value) {\n var len = toInteger(value);\n return Math.min(Math.max(len, 0), maxSafeInteger);\n };\n\n // The length property of the from method is 1.\n return function from(arrayLike /*, mapFn, thisArg */) {\n // 1. Let C be the this value.\n var C = this;\n\n // 2. Let items be ToObject(arrayLike).\n var items = Object(arrayLike);\n\n // 3. ReturnIfAbrupt(items).\n if (arrayLike == null) {\n throw new TypeError(\n 'Array.from requires an array-like object - not null or undefined'\n );\n }\n\n // 4. If mapfn is undefined, then let mapping be false.\n var mapFn = arguments.length > 1 ? arguments[1] : void undefined;\n var T;\n if (typeof mapFn !== 'undefined') {\n // 5. else\n // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.\n if (!isCallable(mapFn)) {\n throw new TypeError(\n 'Array.from: when provided, the second argument must be a function'\n );\n }\n\n // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.\n if (arguments.length > 2) {\n T = arguments[2];\n }\n }\n\n // 10. Let lenValue be Get(items, \"length\").\n // 11. Let len be ToLength(lenValue).\n var len = toLength(items.length);\n\n // 13. If IsConstructor(C) is true, then\n // 13. a. Let A be the result of calling the [[Construct]] internal method\n // of C with an argument list containing the single item len.\n // 14. a. Else, Let A be ArrayCreate(len).\n var A = isCallable(C) ? Object(new C(len)) : new Array(len);\n\n // 16. Let k be 0.\n var k = 0;\n // 17. Repeat, while k < len… (also steps a - h)\n var kValue;\n while (k < len) {\n kValue = items[k];\n if (mapFn) {\n A[k] =\n typeof T === 'undefined'\n ? mapFn(kValue, k)\n : mapFn.call(T, kValue, k);\n } else {\n // A[k] = kValue;\n }\n k += 1;\n }\n // 18. Let putStatus be Put(A, \"length\", len, true).\n A.length = len;\n // 20. Return A.\n return A;\n };\n })();\n}\n\n// Object.assign\n// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\nif (typeof Object.assign !== 'function') {\n // Must be writable: true, enumerable: false, configurable: true\n Object.defineProperty(Object, 'assign', {\n value: function assign(target) {\n // .length of function is 2\n 'use strict';\n if (target === null || target === undefined) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var to = Object(target);\n\n for (var index = 1; index < arguments.length; index++) {\n var nextSource = arguments[index];\n\n if (nextSource !== null && nextSource !== undefined) {\n for (var nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n },\n writable: true,\n configurable: true,\n });\n}\n\n// forEach polyfill\n// Production steps of ECMA-262, Edition 5, 15.4.4.18\n// Reference: http://es5.github.io/#x15.4.4.18\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\nif (!Array.prototype.forEach) {\n Array.prototype.forEach = function (callback /*, thisArg*/) {\n var T, k;\n\n if (this == null) {\n throw new TypeError('this is null or not defined');\n }\n\n // 1. Let O be the result of calling toObject() passing the\n // |this| value as the argument.\n var O = Object(this);\n\n // 2. Let lenValue be the result of calling the Get() internal\n // method of O with the argument \"length\".\n // 3. Let len be toUint32(lenValue).\n var len = O.length >>> 0;\n\n // 4. If isCallable(callback) is false, throw a TypeError exception.\n // See: http://es5.github.com/#x9.11\n if (typeof callback !== 'function') {\n throw new TypeError(callback + ' is not a function');\n }\n\n // 5. If thisArg was supplied, let T be thisArg; else let\n // T be undefined.\n if (arguments.length > 1) {\n T = arguments[1];\n }\n\n // 6. Let k be 0.\n k = 0;\n\n // 7. Repeat while k < len.\n while (k < len) {\n var kValue;\n\n // a. Let Pk be ToString(k).\n // This is implicit for LHS operands of the in operator.\n // b. Let kPresent be the result of calling the HasProperty\n // internal method of O with argument Pk.\n // This step can be combined with c.\n // c. If kPresent is true, then\n if (k in O) {\n // i. Let kValue be the result of calling the Get internal\n // method of O with argument Pk.\n kValue = O[k];\n\n // ii. Call the Call internal method of callback with T as\n // the this value and argument list containing kValue, k, and O.\n callback.call(T, kValue, k, O);\n }\n // d. Increase k by 1.\n k++;\n }\n // 8. return undefined.\n };\n}\n\n// Polyfill for forEach on NodeList\nif (window.NodeList && !NodeList.prototype.forEach) {\n NodeList.prototype.forEach = function (callback, thisArg) {\n thisArg = thisArg || window;\n for (var i = 0; i < this.length; i++) {\n callback.call(thisArg, this[i], i, this);\n }\n };\n}\n\n//////////////////////// \"Closest\" polyfill IE11\nif (!Element.prototype.matches)\n Element.prototype.matches =\n Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\n\nif (!Element.prototype.closest) {\n Element.prototype.closest = function (s) {\n var el = this;\n if (!document.documentElement.contains(el)) return null;\n do {\n if (el.matches(s)) return el;\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n return null;\n };\n}\n//////////////////////// END \"Closest\" polyfill IE11\n\n//////////////////////// String.prototype.includes() polyfill IE11\nif (!String.prototype.includes) {\n Object.defineProperty(String.prototype, 'includes', {\n value: function (search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > this.length) {\n return false;\n } else {\n return this.indexOf(search, start) !== -1;\n }\n },\n });\n}\n//////////////////////// END String.prototype.includes() polyfill IE11\n\n//////////////////////// Array.prototype.includes() polyfill IE11\n// https://tc39.github.io/ecma262/#sec-array.prototype.includes\nif (!Array.prototype.includes) {\n Object.defineProperty(Array.prototype, 'includes', {\n value: function (valueToFind, fromIndex) {\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n\n // 1. Let O be ? ToObject(this value).\n var o = Object(this);\n\n // 2. Let len be ? ToLength(? Get(O, \"length\")).\n var len = o.length >>> 0;\n\n // 3. If len is 0, return false.\n if (len === 0) {\n return false;\n }\n\n // 4. Let n be ? ToInteger(fromIndex).\n // (If fromIndex is undefined, this step produces the value 0.)\n var n = fromIndex | 0;\n\n // 5. If n ≥ 0, then\n // a. Let k be n.\n // 6. Else n < 0,\n // a. Let k be len + n.\n // b. If k < 0, let k be 0.\n var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n function sameValueZero(x, y) {\n return (\n x === y ||\n (typeof x === 'number' &&\n typeof y === 'number' &&\n isNaN(x) &&\n isNaN(y))\n );\n }\n\n // 7. Repeat, while k < len\n while (k < len) {\n // a. Let elementK be the result of ? Get(O, ! ToString(k)).\n // b. If SameValueZero(valueToFind, elementK) is true, return true.\n if (sameValueZero(o[k], valueToFind)) {\n return true;\n }\n // c. Increase k by 1.\n k++;\n }\n\n // 8. Return false\n return false;\n },\n });\n}\n//////////////////////// END Array.prototype.includes() polyfill IE11\n\n///////// timer ///////////\n// http://paulirish.com/2011/requestanimationframe-for-smart-animating/\n// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating\n// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel\n// MIT license\n\n(function () {\n let lastTime = 0;\n const vendors = ['ms', 'moz', 'webkit', 'o'];\n for (let x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\n window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];\n window.cancelAnimationFrame =\n window[vendors[x] + 'CancelAnimationFrame'] ||\n window[vendors[x] + 'CancelRequestAnimationFrame'];\n }\n if (!window.requestAnimationFrame) {\n window.requestAnimationFrame = function (callback) {\n let currTime = new Date().getTime();\n let timeToCall = Math.max(0, 16 - (currTime - lastTime));\n let id = window.setTimeout(() => {\n callback(currTime + timeToCall);\n }, timeToCall);\n lastTime = currTime + timeToCall;\n return id;\n };\n }\n if (!window.cancelAnimationFrame) {\n window.cancelAnimationFrame = function (id) {\n clearTimeout(id);\n };\n }\n})();\n\n//USAGE INSIDE THE PROTOTYPE\n\n/*\nthis.counter = 0\n...\nlogTimer() {\n \"use strict\";\n setTimeout(() => {\n if (this.counter < 4) {\n console.log(\"hello\");\n window.requestAnimationFrame(this.logTimer.bind(this));\n }\n this.counter++;\n }, 4000);\n },\n...\n\n p.logtimer(); hello hello hello hello\n */\n\n///////// end of timer ///////////\n\n///////// Object.entries ///////////\nif (!Object.entries) {\n Object.entries = function (obj) {\n var ownProps = Object.keys(obj),\n i = ownProps.length,\n resArray = new Array(i); // preallocate the Array\n while (i--) resArray[i] = [ownProps[i], obj[ownProps[i]]];\n\n return resArray;\n };\n}\n///////// end Object.entries ///////////\n"],"names":["toStr","isCallable","maxSafeInteger","toLength","Array","from","Object","prototype","toString","fn","call","Math","pow","value","len","number","Number","isNaN","isFinite","floor","abs","toInteger","min","max","arrayLike","items","TypeError","T","mapFn","arguments","length","kValue","A","this","k","assign","defineProperty","target","to","index","nextSource","nextKey","hasOwnProperty","writable","configurable","forEach","callback","O","window","NodeList","thisArg","i","Element","matches","msMatchesSelector","webkitMatchesSelector","closest","s","el","document","documentElement","contains","parentElement","parentNode","nodeType","String","includes","search","start","indexOf","valueToFind","fromIndex","o","x","y","n","lastTime","vendors","requestAnimationFrame","cancelAnimationFrame","currTime","Date","getTime","timeToCall","id","setTimeout","clearTimeout","entries","obj","ownProps","keys","resArray"],"sourceRoot":""}