e.h.length)throw Error(\"The string supplied is too short to be a phone number\");null!=f&&(c=new z(e.toString()),ib(c,f,new z),a=fb(a,c.toString(),f,-1),2!=a&&4!=a&&5!=a&&(e=c));a=e.toString();c=a.length;if(2>c)throw Error(\"The string supplied is too short to be a phone number\");\nif(17d;++d){c=void 0;if(a.length {if(b.hasOwnProperty(c))return!1;b[c]=1;return!0})}V.getSupportedRegionCodes=function(){return Fb(Oa())};\nV.getSupportedCallingCodes=function(){return Fb(Qa())};V.getExample=function(a,b){var c;b?c=Ya(a,Bb(b)):c=Ya(a,0);return new V(c,a)};V.getAsYouType=function(a){return new Z(a)};V.prototype.toJSON=function(){return this.g};V.prototype.toJSON=V.prototype.toJSON;V.prototype.ia=function(){return this.g.canBeInternationallyDialled};V.prototype.canBeInternationallyDialled=V.prototype.ia;V.prototype.za=function(){return this.g.valid};V.prototype.isValid=V.prototype.za;V.prototype.ya=function(){return this.g.possible};\nV.prototype.isPossible=V.prototype.ya;V.prototype.ua=function(){return this.g.type};V.prototype.getType=V.prototype.ua;V.prototype.xa=function(){return\"mobile\"===this.g.type||\"fixed-line-or-mobile\"===this.g.type};V.prototype.isMobile=V.prototype.xa;V.prototype.wa=function(){return\"fixed-line\"===this.g.type||\"fixed-line-or-mobile\"===this.g.type};V.prototype.isFixedLine=V.prototype.wa;V.prototype.qa=function(a){return this.g.number[null==a?\"e164\":a]};V.prototype.getNumber=V.prototype.qa;\nV.prototype.ra=function(a){return Wa(this.h,a)};V.prototype.getNumberFrom=V.prototype.ra;V.prototype.ta=function(){return this.g.regionCode};V.prototype.getRegionCode=V.prototype.ta;V.prototype.ha=function(){return Eb(this.g.regionCode)};V.prototype.getCountryCode=V.prototype.ha;function Z(a){this.l=a;this.j=new jb(a);this.g=this.h=\"\"}Z.prototype.pa=function(a){this.h+=a;var b=this.j;b.ka=qb(b,a);return this.g=b.ka};Z.prototype.addChar=Z.prototype.pa;Z.prototype.Aa=function(){return this.g};\nZ.prototype.number=Z.prototype.Aa;Z.prototype.Ba=function(){return\"\"===this.h?this.g:this.reset(this.h.slice(0,this.h.length-1))};Z.prototype.removeChar=Z.prototype.Ba;Z.prototype.reset=function(a){var b=this.j;b.ka=\"\";A(b.s);A(b.aa);A(b.v);b.$=0;b.ca=\"\";A(b.h);b.o=\"\";A(b.g);b.u=!0;b.na=!1;b.ba=!1;b.da=!1;b.j=[];b.ga=!1;b.l!=b.va&&(b.l=kb(b,b.la));this.g=this.h=\"\";if(a){b=0;for(var c=a.length;b { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\nfunction minBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt)\n : undefined;\n}\n\nmodule.exports = minBy;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","\"use strict\";\nexports.__esModule = true;\nvar typeable_1 = require(\"typeable\");\nfunction numberSize(value, options) {\n if (options === void 0) { options = {}; }\n if (!typeable_1.isNumber(value))\n return false;\n var min = options.min, minOrEqual = options.minOrEqual, max = options.max, maxOrEqual = options.maxOrEqual;\n if (typeable_1.isNumber(min) && !(value > min))\n return false;\n if (typeable_1.isNumber(minOrEqual) && !(value >= minOrEqual))\n return false;\n if (typeable_1.isNumber(max) && !(value < max))\n return false;\n if (typeable_1.isNumber(maxOrEqual) && !(value <= maxOrEqual))\n return false;\n return true;\n}\nexports.numberSize = numberSize;\n","//! moment-timezone.js\n//! version : 0.5.47\n//! Copyright (c) JS Foundation and other contributors\n//! license : MIT\n//! github.com/moment/moment-timezone\n\n(function (root, factory) {\n\t\"use strict\";\n\n\t/*global define*/\n\tif (typeof module === 'object' && module.exports) {\n\t\tmodule.exports = factory(require('moment')); // Node\n\t} else if (typeof define === 'function' && define.amd) {\n\t\tdefine(['moment'], factory); // AMD\n\t} else {\n\t\tfactory(root.moment); // Browser\n\t}\n}(this, function (moment) {\n\t\"use strict\";\n\n\t// Resolves es6 module loading issue\n\tif (moment.version === undefined && moment.default) {\n\t\tmoment = moment.default;\n\t}\n\n\t// Do not load moment-timezone a second time.\n\t// if (moment.tz !== undefined) {\n\t// \tlogError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion);\n\t// \treturn moment;\n\t// }\n\n\tvar VERSION = \"0.5.47\",\n\t\tzones = {},\n\t\tlinks = {},\n\t\tcountries = {},\n\t\tnames = {},\n\t\tguesses = {},\n\t\tcachedGuess;\n\n\tif (!moment || typeof moment.version !== 'string') {\n\t\tlogError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/');\n\t}\n\n\tvar momentVersion = moment.version.split('.'),\n\t\tmajor = +momentVersion[0],\n\t\tminor = +momentVersion[1];\n\n\t// Moment.js version check\n\tif (major < 2 || (major === 2 && minor < 6)) {\n\t\tlogError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com');\n\t}\n\n\t/************************************\n\t\tUnpacking\n\t************************************/\n\n\tfunction charCodeToInt(charCode) {\n\t\tif (charCode > 96) {\n\t\t\treturn charCode - 87;\n\t\t} else if (charCode > 64) {\n\t\t\treturn charCode - 29;\n\t\t}\n\t\treturn charCode - 48;\n\t}\n\n\tfunction unpackBase60(string) {\n\t\tvar i = 0,\n\t\t\tparts = string.split('.'),\n\t\t\twhole = parts[0],\n\t\t\tfractional = parts[1] || '',\n\t\t\tmultiplier = 1,\n\t\t\tnum,\n\t\t\tout = 0,\n\t\t\tsign = 1;\n\n\t\t// handle negative numbers\n\t\tif (string.charCodeAt(0) === 45) {\n\t\t\ti = 1;\n\t\t\tsign = -1;\n\t\t}\n\n\t\t// handle digits before the decimal\n\t\tfor (i; i < whole.length; i++) {\n\t\t\tnum = charCodeToInt(whole.charCodeAt(i));\n\t\t\tout = 60 * out + num;\n\t\t}\n\n\t\t// handle digits after the decimal\n\t\tfor (i = 0; i < fractional.length; i++) {\n\t\t\tmultiplier = multiplier / 60;\n\t\t\tnum = charCodeToInt(fractional.charCodeAt(i));\n\t\t\tout += num * multiplier;\n\t\t}\n\n\t\treturn out * sign;\n\t}\n\n\tfunction arrayToInt (array) {\n\t\tfor (var i = 0; i < array.length; i++) {\n\t\t\tarray[i] = unpackBase60(array[i]);\n\t\t}\n\t}\n\n\tfunction intToUntil (array, length) {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tarray[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds\n\t\t}\n\n\t\tarray[length - 1] = Infinity;\n\t}\n\n\tfunction mapIndices (source, indices) {\n\t\tvar out = [], i;\n\n\t\tfor (i = 0; i < indices.length; i++) {\n\t\t\tout[i] = source[indices[i]];\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction unpack (string) {\n\t\tvar data = string.split('|'),\n\t\t\toffsets = data[2].split(' '),\n\t\t\tindices = data[3].split(''),\n\t\t\tuntils = data[4].split(' ');\n\n\t\tarrayToInt(offsets);\n\t\tarrayToInt(indices);\n\t\tarrayToInt(untils);\n\n\t\tintToUntil(untils, indices.length);\n\n\t\treturn {\n\t\t\tname : data[0],\n\t\t\tabbrs : mapIndices(data[1].split(' '), indices),\n\t\t\toffsets : mapIndices(offsets, indices),\n\t\t\tuntils : untils,\n\t\t\tpopulation : data[5] | 0\n\t\t};\n\t}\n\n\t/************************************\n\t\tZone object\n\t************************************/\n\n\tfunction Zone (packedString) {\n\t\tif (packedString) {\n\t\t\tthis._set(unpack(packedString));\n\t\t}\n\t}\n\n\tfunction closest (num, arr) {\n\t\tvar len = arr.length;\n\t\tif (num < arr[0]) {\n\t\t\treturn 0;\n\t\t} else if (len > 1 && arr[len - 1] === Infinity && num >= arr[len - 2]) {\n\t\t\treturn len - 1;\n\t\t} else if (num >= arr[len - 1]) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tvar mid;\n\t\tvar lo = 0;\n\t\tvar hi = len - 1;\n\t\twhile (hi - lo > 1) {\n\t\t\tmid = Math.floor((lo + hi) / 2);\n\t\t\tif (arr[mid] <= num) {\n\t\t\t\tlo = mid;\n\t\t\t} else {\n\t\t\t\thi = mid;\n\t\t\t}\n\t\t}\n\t\treturn hi;\n\t}\n\n\tZone.prototype = {\n\t\t_set : function (unpacked) {\n\t\t\tthis.name = unpacked.name;\n\t\t\tthis.abbrs = unpacked.abbrs;\n\t\t\tthis.untils = unpacked.untils;\n\t\t\tthis.offsets = unpacked.offsets;\n\t\t\tthis.population = unpacked.population;\n\t\t},\n\n\t\t_index : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\tuntils = this.untils,\n\t\t\t\ti;\n\n\t\t\ti = closest(target, untils);\n\t\t\tif (i >= 0) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t},\n\n\t\tcountries : function () {\n\t\t\tvar zone_name = this.name;\n\t\t\treturn Object.keys(countries).filter(function (country_code) {\n\t\t\t\treturn countries[country_code].zones.indexOf(zone_name) !== -1;\n\t\t\t});\n\t\t},\n\n\t\tparse : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\toffsets = this.offsets,\n\t\t\t\tuntils = this.untils,\n\t\t\t\tmax = untils.length - 1,\n\t\t\t\toffset, offsetNext, offsetPrev, i;\n\n\t\t\tfor (i = 0; i < max; i++) {\n\t\t\t\toffset = offsets[i];\n\t\t\t\toffsetNext = offsets[i + 1];\n\t\t\t\toffsetPrev = offsets[i ? i - 1 : i];\n\n\t\t\t\tif (offset < offsetNext && tz.moveAmbiguousForward) {\n\t\t\t\t\toffset = offsetNext;\n\t\t\t\t} else if (offset > offsetPrev && tz.moveInvalidForward) {\n\t\t\t\t\toffset = offsetPrev;\n\t\t\t\t}\n\n\t\t\t\tif (target < untils[i] - (offset * 60000)) {\n\t\t\t\t\treturn offsets[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn offsets[max];\n\t\t},\n\n\t\tabbr : function (mom) {\n\t\t\treturn this.abbrs[this._index(mom)];\n\t\t},\n\n\t\toffset : function (mom) {\n\t\t\tlogError(\"zone.offset has been deprecated in favor of zone.utcOffset\");\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t},\n\n\t\tutcOffset : function (mom) {\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t}\n\t};\n\n\t/************************************\n\t\tCountry object\n\t************************************/\n\n\tfunction Country (country_name, zone_names) {\n\t\tthis.name = country_name;\n\t\tthis.zones = zone_names;\n\t}\n\n\t/************************************\n\t\tCurrent Timezone\n\t************************************/\n\n\tfunction OffsetAt(at) {\n\t\tvar timeString = at.toTimeString();\n\t\tvar abbr = timeString.match(/\\([a-z ]+\\)/i);\n\t\tif (abbr && abbr[0]) {\n\t\t\t// 17:56:31 GMT-0600 (CST)\n\t\t\t// 17:56:31 GMT-0600 (Central Standard Time)\n\t\t\tabbr = abbr[0].match(/[A-Z]/g);\n\t\t\tabbr = abbr ? abbr.join('') : undefined;\n\t\t} else {\n\t\t\t// 17:56:31 CST\n\t\t\t// 17:56:31 GMT+0800 (台北標準時間)\n\t\t\tabbr = timeString.match(/[A-Z]{3,5}/g);\n\t\t\tabbr = abbr ? abbr[0] : undefined;\n\t\t}\n\n\t\tif (abbr === 'GMT') {\n\t\t\tabbr = undefined;\n\t\t}\n\n\t\tthis.at = +at;\n\t\tthis.abbr = abbr;\n\t\tthis.offset = at.getTimezoneOffset();\n\t}\n\n\tfunction ZoneScore(zone) {\n\t\tthis.zone = zone;\n\t\tthis.offsetScore = 0;\n\t\tthis.abbrScore = 0;\n\t}\n\n\tZoneScore.prototype.scoreOffsetAt = function (offsetAt) {\n\t\tthis.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset);\n\t\tif (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) {\n\t\t\tthis.abbrScore++;\n\t\t}\n\t};\n\n\tfunction findChange(low, high) {\n\t\tvar mid, diff;\n\n\t\twhile ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) {\n\t\t\tmid = new OffsetAt(new Date(low.at + diff));\n\t\t\tif (mid.offset === low.offset) {\n\t\t\t\tlow = mid;\n\t\t\t} else {\n\t\t\t\thigh = mid;\n\t\t\t}\n\t\t}\n\n\t\treturn low;\n\t}\n\n\tfunction userOffsets() {\n\t\tvar startYear = new Date().getFullYear() - 2,\n\t\t\tlast = new OffsetAt(new Date(startYear, 0, 1)),\n\t\t\tlastOffset = last.offset,\n\t\t\toffsets = [last],\n\t\t\tchange, next, nextOffset, i;\n\n\t\tfor (i = 1; i < 48; i++) {\n\t\t\tnextOffset = new Date(startYear, i, 1).getTimezoneOffset();\n\t\t\tif (nextOffset !== lastOffset) {\n\t\t\t\t// Create OffsetAt here to avoid unnecessary abbr parsing before checking offsets\n\t\t\t\tnext = new OffsetAt(new Date(startYear, i, 1));\n\t\t\t\tchange = findChange(last, next);\n\t\t\t\toffsets.push(change);\n\t\t\t\toffsets.push(new OffsetAt(new Date(change.at + 6e4)));\n\t\t\t\tlast = next;\n\t\t\t\tlastOffset = nextOffset;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0; i < 4; i++) {\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 0, 1)));\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 6, 1)));\n\t\t}\n\n\t\treturn offsets;\n\t}\n\n\tfunction sortZoneScores (a, b) {\n\t\tif (a.offsetScore !== b.offsetScore) {\n\t\t\treturn a.offsetScore - b.offsetScore;\n\t\t}\n\t\tif (a.abbrScore !== b.abbrScore) {\n\t\t\treturn a.abbrScore - b.abbrScore;\n\t\t}\n\t\tif (a.zone.population !== b.zone.population) {\n\t\t\treturn b.zone.population - a.zone.population;\n\t\t}\n\t\treturn b.zone.name.localeCompare(a.zone.name);\n\t}\n\n\tfunction addToGuesses (name, offsets) {\n\t\tvar i, offset;\n\t\tarrayToInt(offsets);\n\t\tfor (i = 0; i < offsets.length; i++) {\n\t\t\toffset = offsets[i];\n\t\t\tguesses[offset] = guesses[offset] || {};\n\t\t\tguesses[offset][name] = true;\n\t\t}\n\t}\n\n\tfunction guessesForUserOffsets (offsets) {\n\t\tvar offsetsLength = offsets.length,\n\t\t\tfilteredGuesses = {},\n\t\t\tout = [],\n\t\t\tcheckedOffsets = {},\n\t\t\ti, j, offset, guessesOffset;\n\n\t\tfor (i = 0; i < offsetsLength; i++) {\n\t\t\toffset = offsets[i].offset;\n\t\t\tif (checkedOffsets.hasOwnProperty(offset)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tguessesOffset = guesses[offset] || {};\n\t\t\tfor (j in guessesOffset) {\n\t\t\t\tif (guessesOffset.hasOwnProperty(j)) {\n\t\t\t\t\tfilteredGuesses[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcheckedOffsets[offset] = true;\n\t\t}\n\n\t\tfor (i in filteredGuesses) {\n\t\t\tif (filteredGuesses.hasOwnProperty(i)) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction rebuildGuess () {\n\n\t\t// use Intl API when available and returning valid time zone\n\t\ttry {\n\t\t\tvar intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\t\t\tif (intlName && intlName.length > 3) {\n\t\t\t\tvar name = names[normalizeName(intlName)];\n\t\t\t\tif (name) {\n\t\t\t\t\treturn name;\n\t\t\t\t}\n\t\t\t\tlogError(\"Moment Timezone found \" + intlName + \" from the Intl api, but did not have that data loaded.\");\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// Intl unavailable, fall back to manual guessing.\n\t\t}\n\n\t\tvar offsets = userOffsets(),\n\t\t\toffsetsLength = offsets.length,\n\t\t\tguesses = guessesForUserOffsets(offsets),\n\t\t\tzoneScores = [],\n\t\t\tzoneScore, i, j;\n\n\t\tfor (i = 0; i < guesses.length; i++) {\n\t\t\tzoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength);\n\t\t\tfor (j = 0; j < offsetsLength; j++) {\n\t\t\t\tzoneScore.scoreOffsetAt(offsets[j]);\n\t\t\t}\n\t\t\tzoneScores.push(zoneScore);\n\t\t}\n\n\t\tzoneScores.sort(sortZoneScores);\n\n\t\treturn zoneScores.length > 0 ? zoneScores[0].zone.name : undefined;\n\t}\n\n\tfunction guess (ignoreCache) {\n\t\tif (!cachedGuess || ignoreCache) {\n\t\t\tcachedGuess = rebuildGuess();\n\t\t}\n\t\treturn cachedGuess;\n\t}\n\n\t/************************************\n\t\tGlobal Methods\n\t************************************/\n\n\tfunction normalizeName (name) {\n\t\treturn (name || '').toLowerCase().replace(/\\//g, '_');\n\t}\n\n\tfunction addZone (packed) {\n\t\tvar i, name, split, normalized;\n\n\t\tif (typeof packed === \"string\") {\n\t\t\tpacked = [packed];\n\t\t}\n\n\t\tfor (i = 0; i < packed.length; i++) {\n\t\t\tsplit = packed[i].split('|');\n\t\t\tname = split[0];\n\t\t\tnormalized = normalizeName(name);\n\t\t\tzones[normalized] = packed[i];\n\t\t\tnames[normalized] = name;\n\t\t\taddToGuesses(normalized, split[2].split(' '));\n\t\t}\n\t}\n\n\tfunction getZone (name, caller) {\n\n\t\tname = normalizeName(name);\n\n\t\tvar zone = zones[name];\n\t\tvar link;\n\n\t\tif (zone instanceof Zone) {\n\t\t\treturn zone;\n\t\t}\n\n\t\tif (typeof zone === 'string') {\n\t\t\tzone = new Zone(zone);\n\t\t\tzones[name] = zone;\n\t\t\treturn zone;\n\t\t}\n\n\t\t// Pass getZone to prevent recursion more than 1 level deep\n\t\tif (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) {\n\t\t\tzone = zones[name] = new Zone();\n\t\t\tzone._set(link);\n\t\t\tzone.name = names[name];\n\t\t\treturn zone;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction getNames () {\n\t\tvar i, out = [];\n\n\t\tfor (i in names) {\n\t\t\tif (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out.sort();\n\t}\n\n\tfunction getCountryNames () {\n\t\treturn Object.keys(countries);\n\t}\n\n\tfunction addLink (aliases) {\n\t\tvar i, alias, normal0, normal1;\n\n\t\tif (typeof aliases === \"string\") {\n\t\t\taliases = [aliases];\n\t\t}\n\n\t\tfor (i = 0; i < aliases.length; i++) {\n\t\t\talias = aliases[i].split('|');\n\n\t\t\tnormal0 = normalizeName(alias[0]);\n\t\t\tnormal1 = normalizeName(alias[1]);\n\n\t\t\tlinks[normal0] = normal1;\n\t\t\tnames[normal0] = alias[0];\n\n\t\t\tlinks[normal1] = normal0;\n\t\t\tnames[normal1] = alias[1];\n\t\t}\n\t}\n\n\tfunction addCountries (data) {\n\t\tvar i, country_code, country_zones, split;\n\t\tif (!data || !data.length) return;\n\t\tfor (i = 0; i < data.length; i++) {\n\t\t\tsplit = data[i].split('|');\n\t\t\tcountry_code = split[0].toUpperCase();\n\t\t\tcountry_zones = split[1].split(' ');\n\t\t\tcountries[country_code] = new Country(\n\t\t\t\tcountry_code,\n\t\t\t\tcountry_zones\n\t\t\t);\n\t\t}\n\t}\n\n\tfunction getCountry (name) {\n\t\tname = name.toUpperCase();\n\t\treturn countries[name] || null;\n\t}\n\n\tfunction zonesForCountry(country, with_offset) {\n\t\tcountry = getCountry(country);\n\n\t\tif (!country) return null;\n\n\t\tvar zones = country.zones.sort();\n\n\t\tif (with_offset) {\n\t\t\treturn zones.map(function (zone_name) {\n\t\t\t\tvar zone = getZone(zone_name);\n\t\t\t\treturn {\n\t\t\t\t\tname: zone_name,\n\t\t\t\t\toffset: zone.utcOffset(new Date())\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\n\t\treturn zones;\n\t}\n\n\tfunction loadData (data) {\n\t\taddZone(data.zones);\n\t\taddLink(data.links);\n\t\taddCountries(data.countries);\n\t\ttz.dataVersion = data.version;\n\t}\n\n\tfunction zoneExists (name) {\n\t\tif (!zoneExists.didShowError) {\n\t\t\tzoneExists.didShowError = true;\n\t\t\t\tlogError(\"moment.tz.zoneExists('\" + name + \"') has been deprecated in favor of !moment.tz.zone('\" + name + \"')\");\n\t\t}\n\t\treturn !!getZone(name);\n\t}\n\n\tfunction needsOffset (m) {\n\t\tvar isUnixTimestamp = (m._f === 'X' || m._f === 'x');\n\t\treturn !!(m._a && (m._tzm === undefined) && !isUnixTimestamp);\n\t}\n\n\tfunction logError (message) {\n\t\tif (typeof console !== 'undefined' && typeof console.error === 'function') {\n\t\t\tconsole.error(message);\n\t\t}\n\t}\n\n\t/************************************\n\t\tmoment.tz namespace\n\t************************************/\n\n\tfunction tz (input) {\n\t\tvar args = Array.prototype.slice.call(arguments, 0, -1),\n\t\t\tname = arguments[arguments.length - 1],\n\t\t\tout = moment.utc.apply(null, args),\n\t\t\tzone;\n\n\t\tif (!moment.isMoment(input) && needsOffset(out) && (zone = getZone(name))) {\n\t\t\tout.add(zone.parse(out), 'minutes');\n\t\t}\n\n\t\tout.tz(name);\n\n\t\treturn out;\n\t}\n\n\ttz.version = VERSION;\n\ttz.dataVersion = '';\n\ttz._zones = zones;\n\ttz._links = links;\n\ttz._names = names;\n\ttz._countries\t= countries;\n\ttz.add = addZone;\n\ttz.link = addLink;\n\ttz.load = loadData;\n\ttz.zone = getZone;\n\ttz.zoneExists = zoneExists; // deprecated in 0.1.0\n\ttz.guess = guess;\n\ttz.names = getNames;\n\ttz.Zone = Zone;\n\ttz.unpack = unpack;\n\ttz.unpackBase60 = unpackBase60;\n\ttz.needsOffset = needsOffset;\n\ttz.moveInvalidForward = true;\n\ttz.moveAmbiguousForward = false;\n\ttz.countries = getCountryNames;\n\ttz.zonesForCountry = zonesForCountry;\n\n\t/************************************\n\t\tInterface with Moment.js\n\t************************************/\n\n\tvar fn = moment.fn;\n\n\tmoment.tz = tz;\n\n\tmoment.defaultZone = null;\n\n\tmoment.updateOffset = function (mom, keepTime) {\n\t\tvar zone = moment.defaultZone,\n\t\t\toffset;\n\n\t\tif (mom._z === undefined) {\n\t\t\tif (zone && needsOffset(mom) && !mom._isUTC && mom.isValid()) {\n\t\t\t\tmom._d = moment.utc(mom._a)._d;\n\t\t\t\tmom.utc().add(zone.parse(mom), 'minutes');\n\t\t\t}\n\t\t\tmom._z = zone;\n\t\t}\n\t\tif (mom._z) {\n\t\t\toffset = mom._z.utcOffset(mom);\n\t\t\tif (Math.abs(offset) < 16) {\n\t\t\t\toffset = offset / 60;\n\t\t\t}\n\t\t\tif (mom.utcOffset !== undefined) {\n\t\t\t\tvar z = mom._z;\n\t\t\t\tmom.utcOffset(-offset, keepTime);\n\t\t\t\tmom._z = z;\n\t\t\t} else {\n\t\t\t\tmom.zone(offset, keepTime);\n\t\t\t}\n\t\t}\n\t};\n\n\tfn.tz = function (name, keepTime) {\n\t\tif (name) {\n\t\t\tif (typeof name !== 'string') {\n\t\t\t\tthrow new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']');\n\t\t\t}\n\t\t\tthis._z = getZone(name);\n\t\t\tif (this._z) {\n\t\t\t\tmoment.updateOffset(this, keepTime);\n\t\t\t} else {\n\t\t\t\tlogError(\"Moment Timezone has no data for \" + name + \". See http://momentjs.com/timezone/docs/#/data-loading/.\");\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif (this._z) { return this._z.name; }\n\t};\n\n\tfunction abbrWrap (old) {\n\t\treturn function () {\n\t\t\tif (this._z) { return this._z.abbr(this); }\n\t\t\treturn old.call(this);\n\t\t};\n\t}\n\n\tfunction resetZoneWrap (old) {\n\t\treturn function () {\n\t\t\tthis._z = null;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\t}\n\n\tfunction resetZoneWrap2 (old) {\n\t\treturn function () {\n\t\t\tif (arguments.length > 0) this._z = null;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\t}\n\n\tfn.zoneName = abbrWrap(fn.zoneName);\n\tfn.zoneAbbr = abbrWrap(fn.zoneAbbr);\n\tfn.utc = resetZoneWrap(fn.utc);\n\tfn.local = resetZoneWrap(fn.local);\n\tfn.utcOffset = resetZoneWrap2(fn.utcOffset);\n\n\tmoment.tz.setDefault = function(name) {\n\t\tif (major < 2 || (major === 2 && minor < 9)) {\n\t\t\tlogError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.');\n\t\t}\n\t\tmoment.defaultZone = name ? getZone(name) : null;\n\t\treturn moment;\n\t};\n\n\t// Cloning a moment should include the _z property.\n\tvar momentProperties = moment.momentProperties;\n\tif (Object.prototype.toString.call(momentProperties) === '[object Array]') {\n\t\t// moment 2.8.1+\n\t\tmomentProperties.push('_z');\n\t\tmomentProperties.push('_a');\n\t} else if (momentProperties) {\n\t\t// moment 2.7.0\n\t\tmomentProperties._z = null;\n\t}\n\n\t// INJECT DATA\n\n\treturn moment;\n}));\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\n\nmodule.exports = function (object, key, method) {\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));\n } catch (error) { /* empty */ }\n};\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nexports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var props = toIndexedObject(Properties);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);\n return O;\n};\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [0, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nexports.__esModule = true;\nvar merge = require(\"lodash.merge\");\nvar builtInHandlers = require(\"./handlers\");\n/*\n* A core error handling class.\n*/\nvar Handler = /** @class */ (function () {\n /*\n * Class constructor.\n */\n function Handler(_a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.failFast, failFast = _c === void 0 ? false : _c, _d = _b.handlers, handlers = _d === void 0 ? {} : _d, _e = _b.context, context = _e === void 0 ? null : _e;\n this.failFast = failFast;\n this.handlers = merge(builtInHandlers, handlers);\n this.context = context;\n }\n /*\n * Returns a new instance of HandlerError instance.\n */\n Handler.prototype._createHandlerError = function (recipe) {\n var handler = recipe.handler, _a = recipe.code, code = _a === void 0 ? 422 : _a;\n var message = typeof recipe.message === 'function'\n ? recipe.message()\n : recipe.message;\n message = this._createString(message, recipe); // apply variables to a message\n return { handler: handler, message: message, code: code };\n };\n /*\n * Replaces variables in a string (e.g. `%{variable}`) with object key values.\n */\n Handler.prototype._createString = function (template, data) {\n if (!template) {\n return template;\n }\n for (var key in data) {\n template = template.replace(\"%{\" + key + \"}\", data[key]);\n }\n return template;\n };\n /*\n * Validates the `error` against the `recipes`.\n */\n Handler.prototype.handle = function (error, recipes) {\n if (recipes === void 0) { recipes = []; }\n return __awaiter(this, void 0, void 0, function () {\n var errors, _i, recipes_1, recipe, condition, result, name, handler, match;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n errors = [];\n _i = 0, recipes_1 = recipes;\n _a.label = 1;\n case 1:\n if (!(_i < recipes_1.length)) return [3 /*break*/, 6];\n recipe = recipes_1[_i];\n condition = recipe.condition;\n if (!condition) return [3 /*break*/, 3];\n return [4 /*yield*/, condition.call(this.context, error, recipe)];\n case 2:\n result = _a.sent();\n if (!result)\n return [3 /*break*/, 5];\n _a.label = 3;\n case 3:\n name = recipe.handler;\n handler = this.handlers[name];\n if (!handler) {\n throw new Error(\"Unknown handler \" + name);\n }\n return [4 /*yield*/, handler.call(this.context, error, recipe)];\n case 4:\n match = _a.sent();\n if (match) {\n errors.push(this._createHandlerError(recipe));\n if (this.failFast)\n return [3 /*break*/, 6];\n }\n _a.label = 5;\n case 5:\n _i++;\n return [3 /*break*/, 1];\n case 6: return [2 /*return*/, errors];\n }\n });\n });\n };\n return Handler;\n}());\nexports.Handler = Handler;\n","'use strict';\nvar $String = String;\n\nmodule.exports = function (argument) {\n try {\n return $String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","'use strict';\nvar $TypeError = TypeError;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991\n\nmodule.exports = function (it) {\n if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');\n return it;\n};\n","'use strict';\nvar isCallable = require('../internals/is-callable');\nvar definePropertyModule = require('../internals/object-define-property');\nvar makeBuiltIn = require('../internals/make-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nmodule.exports = function (O, key, value, options) {\n if (!options) options = {};\n var simple = options.enumerable;\n var name = options.name !== undefined ? options.name : key;\n if (isCallable(value)) makeBuiltIn(value, name, options);\n if (options.global) {\n if (simple) O[key] = value;\n else defineGlobalProperty(key, value);\n } else {\n try {\n if (!options.unsafe) delete O[key];\n else if (O[key]) simple = true;\n } catch (error) { /* empty */ }\n if (simple) O[key] = value;\n else definePropertyModule.f(O, key, {\n value: value,\n enumerable: false,\n configurable: !options.nonConfigurable,\n writable: !options.nonWritable\n });\n } return O;\n};\n","(function(window, factory) {\n\tvar lazySizes = factory(window, window.document);\n\twindow.lazySizes = lazySizes;\n\tif(typeof module == 'object' && module.exports){\n\t\tmodule.exports = lazySizes;\n\t}\n}(window, function l(window, document) {\n\t'use strict';\n\t/*jshint eqnull:true */\n\tif(!document.getElementsByClassName){return;}\n\n\tvar lazysizes, lazySizesConfig;\n\n\tvar docElem = document.documentElement;\n\n\tvar Date = window.Date;\n\n\tvar supportPicture = window.HTMLPictureElement;\n\n\tvar _addEventListener = 'addEventListener';\n\n\tvar _getAttribute = 'getAttribute';\n\n\tvar addEventListener = window[_addEventListener];\n\n\tvar setTimeout = window.setTimeout;\n\n\tvar requestAnimationFrame = window.requestAnimationFrame || setTimeout;\n\n\tvar requestIdleCallback = window.requestIdleCallback;\n\n\tvar regPicture = /^picture$/i;\n\n\tvar loadEvents = ['load', 'error', 'lazyincluded', '_lazyloaded'];\n\n\tvar regClassCache = {};\n\n\tvar forEach = Array.prototype.forEach;\n\n\tvar hasClass = function(ele, cls) {\n\t\tif(!regClassCache[cls]){\n\t\t\tregClassCache[cls] = new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)');\n\t\t}\n\t\treturn regClassCache[cls].test(ele[_getAttribute]('class') || '') && regClassCache[cls];\n\t};\n\n\tvar addClass = function(ele, cls) {\n\t\tif (!hasClass(ele, cls)){\n\t\t\tele.setAttribute('class', (ele[_getAttribute]('class') || '').trim() + ' ' + cls);\n\t\t}\n\t};\n\n\tvar removeClass = function(ele, cls) {\n\t\tvar reg;\n\t\tif ((reg = hasClass(ele,cls))) {\n\t\t\tele.setAttribute('class', (ele[_getAttribute]('class') || '').replace(reg, ' '));\n\t\t}\n\t};\n\n\tvar addRemoveLoadEvents = function(dom, fn, add){\n\t\tvar action = add ? _addEventListener : 'removeEventListener';\n\t\tif(add){\n\t\t\taddRemoveLoadEvents(dom, fn);\n\t\t}\n\t\tloadEvents.forEach(function(evt){\n\t\t\tdom[action](evt, fn);\n\t\t});\n\t};\n\n\tvar triggerEvent = function(elem, name, detail, noBubbles, noCancelable){\n\t\tvar event = document.createEvent('Event');\n\n\t\tif(!detail){\n\t\t\tdetail = {};\n\t\t}\n\n\t\tdetail.instance = lazysizes;\n\n\t\tevent.initEvent(name, !noBubbles, !noCancelable);\n\n\t\tevent.detail = detail;\n\n\t\telem.dispatchEvent(event);\n\t\treturn event;\n\t};\n\n\tvar updatePolyfill = function (el, full){\n\t\tvar polyfill;\n\t\tif( !supportPicture && ( polyfill = (window.picturefill || lazySizesConfig.pf) ) ){\n\t\t\tif(full && full.src && !el[_getAttribute]('srcset')){\n\t\t\t\tel.setAttribute('srcset', full.src);\n\t\t\t}\n\t\t\tpolyfill({reevaluate: true, elements: [el]});\n\t\t} else if(full && full.src){\n\t\t\tel.src = full.src;\n\t\t}\n\t};\n\n\tvar getCSS = function (elem, style){\n\t\treturn (getComputedStyle(elem, null) || {})[style];\n\t};\n\n\tvar getWidth = function(elem, parent, width){\n\t\twidth = width || elem.offsetWidth;\n\n\t\twhile(width < lazySizesConfig.minSize && parent && !elem._lazysizesWidth){\n\t\t\twidth = parent.offsetWidth;\n\t\t\tparent = parent.parentNode;\n\t\t}\n\n\t\treturn width;\n\t};\n\n\tvar rAF = (function(){\n\t\tvar running, waiting;\n\t\tvar firstFns = [];\n\t\tvar secondFns = [];\n\t\tvar fns = firstFns;\n\n\t\tvar run = function(){\n\t\t\tvar runFns = fns;\n\n\t\t\tfns = firstFns.length ? secondFns : firstFns;\n\n\t\t\trunning = true;\n\t\t\twaiting = false;\n\n\t\t\twhile(runFns.length){\n\t\t\t\trunFns.shift()();\n\t\t\t}\n\n\t\t\trunning = false;\n\t\t};\n\n\t\tvar rafBatch = function(fn, queue){\n\t\t\tif(running && !queue){\n\t\t\t\tfn.apply(this, arguments);\n\t\t\t} else {\n\t\t\t\tfns.push(fn);\n\n\t\t\t\tif(!waiting){\n\t\t\t\t\twaiting = true;\n\t\t\t\t\t(document.hidden ? setTimeout : requestAnimationFrame)(run);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\trafBatch._lsFlush = run;\n\n\t\treturn rafBatch;\n\t})();\n\n\tvar rAFIt = function(fn, simple){\n\t\treturn simple ?\n\t\t\tfunction() {\n\t\t\t\trAF(fn);\n\t\t\t} :\n\t\t\tfunction(){\n\t\t\t\tvar that = this;\n\t\t\t\tvar args = arguments;\n\t\t\t\trAF(function(){\n\t\t\t\t\tfn.apply(that, args);\n\t\t\t\t});\n\t\t\t}\n\t\t;\n\t};\n\n\tvar throttle = function(fn){\n\t\tvar running;\n\t\tvar lastTime = 0;\n\t\tvar gDelay = lazySizesConfig.throttleDelay;\n\t\tvar rICTimeout = lazySizesConfig.ricTimeout;\n\t\tvar run = function(){\n\t\t\trunning = false;\n\t\t\tlastTime = Date.now();\n\t\t\tfn();\n\t\t};\n\t\tvar idleCallback = requestIdleCallback && rICTimeout > 49 ?\n\t\t\tfunction(){\n\t\t\t\trequestIdleCallback(run, {timeout: rICTimeout});\n\n\t\t\t\tif(rICTimeout !== lazySizesConfig.ricTimeout){\n\t\t\t\t\trICTimeout = lazySizesConfig.ricTimeout;\n\t\t\t\t}\n\t\t\t} :\n\t\t\trAFIt(function(){\n\t\t\t\tsetTimeout(run);\n\t\t\t}, true)\n\t\t;\n\n\t\treturn function(isPriority){\n\t\t\tvar delay;\n\n\t\t\tif((isPriority = isPriority === true)){\n\t\t\t\trICTimeout = 33;\n\t\t\t}\n\n\t\t\tif(running){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\trunning = true;\n\n\t\t\tdelay = gDelay - (Date.now() - lastTime);\n\n\t\t\tif(delay < 0){\n\t\t\t\tdelay = 0;\n\t\t\t}\n\n\t\t\tif(isPriority || delay < 9){\n\t\t\t\tidleCallback();\n\t\t\t} else {\n\t\t\t\tsetTimeout(idleCallback, delay);\n\t\t\t}\n\t\t};\n\t};\n\n\t//based on http://modernjavascript.blogspot.de/2013/08/building-better-debounce.html\n\tvar debounce = function(func) {\n\t\tvar timeout, timestamp;\n\t\tvar wait = 99;\n\t\tvar run = function(){\n\t\t\ttimeout = null;\n\t\t\tfunc();\n\t\t};\n\t\tvar later = function() {\n\t\t\tvar last = Date.now() - timestamp;\n\n\t\t\tif (last < wait) {\n\t\t\t\tsetTimeout(later, wait - last);\n\t\t\t} else {\n\t\t\t\t(requestIdleCallback || run)(run);\n\t\t\t}\n\t\t};\n\n\t\treturn function() {\n\t\t\ttimestamp = Date.now();\n\n\t\t\tif (!timeout) {\n\t\t\t\ttimeout = setTimeout(later, wait);\n\t\t\t}\n\t\t};\n\t};\n\n\t(function(){\n\t\tvar prop;\n\n\t\tvar lazySizesDefaults = {\n\t\t\tlazyClass: 'lazyload',\n\t\t\tloadedClass: 'lazyloaded',\n\t\t\tloadingClass: 'lazyloading',\n\t\t\tpreloadClass: 'lazypreload',\n\t\t\terrorClass: 'lazyerror',\n\t\t\t//strictClass: 'lazystrict',\n\t\t\tautosizesClass: 'lazyautosizes',\n\t\t\tsrcAttr: 'data-src',\n\t\t\tsrcsetAttr: 'data-srcset',\n\t\t\tsizesAttr: 'data-sizes',\n\t\t\t//preloadAfterLoad: false,\n\t\t\tminSize: 40,\n\t\t\tcustomMedia: {},\n\t\t\tinit: true,\n\t\t\texpFactor: 1.5,\n\t\t\thFac: 0.8,\n\t\t\tloadMode: 2,\n\t\t\tloadHidden: true,\n\t\t\tricTimeout: 0,\n\t\t\tthrottleDelay: 125,\n\t\t};\n\n\t\tlazySizesConfig = window.lazySizesConfig || window.lazysizesConfig || {};\n\n\t\tfor(prop in lazySizesDefaults){\n\t\t\tif(!(prop in lazySizesConfig)){\n\t\t\t\tlazySizesConfig[prop] = lazySizesDefaults[prop];\n\t\t\t}\n\t\t}\n\n\t\twindow.lazySizesConfig = lazySizesConfig;\n\n\t\tsetTimeout(function(){\n\t\t\tif(lazySizesConfig.init){\n\t\t\t\tinit();\n\t\t\t}\n\t\t});\n\t})();\n\n\tvar loader = (function(){\n\t\tvar preloadElems, isCompleted, resetPreloadingTimer, loadMode, started;\n\n\t\tvar eLvW, elvH, eLtop, eLleft, eLright, eLbottom, isBodyHidden;\n\n\t\tvar regImg = /^img$/i;\n\t\tvar regIframe = /^iframe$/i;\n\n\t\tvar supportScroll = ('onscroll' in window) && !(/(gle|ing)bot/.test(navigator.userAgent));\n\n\t\tvar shrinkExpand = 0;\n\t\tvar currentExpand = 0;\n\n\t\tvar isLoading = 0;\n\t\tvar lowRuns = -1;\n\n\t\tvar resetPreloading = function(e){\n\t\t\tisLoading--;\n\t\t\tif(!e || isLoading < 0 || !e.target){\n\t\t\t\tisLoading = 0;\n\t\t\t}\n\t\t};\n\n\t\tvar isVisible = function (elem) {\n\t\t\tif (isBodyHidden == null) {\n\t\t\t\tisBodyHidden = getCSS(document.body, 'visibility') == 'hidden';\n\t\t\t}\n\n\t\t\treturn isBodyHidden || (getCSS(elem.parentNode, 'visibility') != 'hidden' && getCSS(elem, 'visibility') != 'hidden');\n\t\t};\n\n\t\tvar isNestedVisible = function(elem, elemExpand){\n\t\t\tvar outerRect;\n\t\t\tvar parent = elem;\n\t\t\tvar visible = isVisible(elem);\n\n\t\t\teLtop -= elemExpand;\n\t\t\teLbottom += elemExpand;\n\t\t\teLleft -= elemExpand;\n\t\t\teLright += elemExpand;\n\n\t\t\twhile(visible && (parent = parent.offsetParent) && parent != document.body && parent != docElem){\n\t\t\t\tvisible = ((getCSS(parent, 'opacity') || 1) > 0);\n\n\t\t\t\tif(visible && getCSS(parent, 'overflow') != 'visible'){\n\t\t\t\t\touterRect = parent.getBoundingClientRect();\n\t\t\t\t\tvisible = eLright > outerRect.left &&\n\t\t\t\t\t\teLleft < outerRect.right &&\n\t\t\t\t\t\teLbottom > outerRect.top - 1 &&\n\t\t\t\t\t\teLtop < outerRect.bottom + 1\n\t\t\t\t\t;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn visible;\n\t\t};\n\n\t\tvar checkElements = function() {\n\t\t\tvar eLlen, i, rect, autoLoadElem, loadedSomething, elemExpand, elemNegativeExpand, elemExpandVal,\n\t\t\t\tbeforeExpandVal, defaultExpand, preloadExpand, hFac;\n\t\t\tvar lazyloadElems = lazysizes.elements;\n\n\t\t\tif((loadMode = lazySizesConfig.loadMode) && isLoading < 8 && (eLlen = lazyloadElems.length)){\n\n\t\t\t\ti = 0;\n\n\t\t\t\tlowRuns++;\n\n\t\t\t\tdefaultExpand = (!lazySizesConfig.expand || lazySizesConfig.expand < 1) ?\n\t\t\t\t\tdocElem.clientHeight > 500 && docElem.clientWidth > 500 ? 500 : 370 :\n\t\t\t\t\tlazySizesConfig.expand;\n\n\t\t\t\tlazysizes._defEx = defaultExpand;\n\n\t\t\t\tpreloadExpand = defaultExpand * lazySizesConfig.expFactor;\n\t\t\t\thFac = lazySizesConfig.hFac;\n\t\t\t\tisBodyHidden = null;\n\n\t\t\t\tif(currentExpand < preloadExpand && isLoading < 1 && lowRuns > 2 && loadMode > 2 && !document.hidden){\n\t\t\t\t\tcurrentExpand = preloadExpand;\n\t\t\t\t\tlowRuns = 0;\n\t\t\t\t} else if(loadMode > 1 && lowRuns > 1 && isLoading < 6){\n\t\t\t\t\tcurrentExpand = defaultExpand;\n\t\t\t\t} else {\n\t\t\t\t\tcurrentExpand = shrinkExpand;\n\t\t\t\t}\n\n\t\t\t\tfor(; i < eLlen; i++){\n\n\t\t\t\t\tif(!lazyloadElems[i] || lazyloadElems[i]._lazyRace){continue;}\n\n\t\t\t\t\tif(!supportScroll){unveilElement(lazyloadElems[i]);continue;}\n\n\t\t\t\t\tif(!(elemExpandVal = lazyloadElems[i][_getAttribute]('data-expand')) || !(elemExpand = elemExpandVal * 1)){\n\t\t\t\t\t\telemExpand = currentExpand;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(beforeExpandVal !== elemExpand){\n\t\t\t\t\t\teLvW = innerWidth + (elemExpand * hFac);\n\t\t\t\t\t\telvH = innerHeight + elemExpand;\n\t\t\t\t\t\telemNegativeExpand = elemExpand * -1;\n\t\t\t\t\t\tbeforeExpandVal = elemExpand;\n\t\t\t\t\t}\n\n\t\t\t\t\trect = lazyloadElems[i].getBoundingClientRect();\n\n\t\t\t\t\tif ((eLbottom = rect.bottom) >= elemNegativeExpand &&\n\t\t\t\t\t\t(eLtop = rect.top) <= elvH &&\n\t\t\t\t\t\t(eLright = rect.right) >= elemNegativeExpand * hFac &&\n\t\t\t\t\t\t(eLleft = rect.left) <= eLvW &&\n\t\t\t\t\t\t(eLbottom || eLright || eLleft || eLtop) &&\n\t\t\t\t\t\t(lazySizesConfig.loadHidden || isVisible(lazyloadElems[i])) &&\n\t\t\t\t\t\t((isCompleted && isLoading < 3 && !elemExpandVal && (loadMode < 3 || lowRuns < 4)) || isNestedVisible(lazyloadElems[i], elemExpand))){\n\t\t\t\t\t\tunveilElement(lazyloadElems[i]);\n\t\t\t\t\t\tloadedSomething = true;\n\t\t\t\t\t\tif(isLoading > 9){break;}\n\t\t\t\t\t} else if(!loadedSomething && isCompleted && !autoLoadElem &&\n\t\t\t\t\t\tisLoading < 4 && lowRuns < 4 && loadMode > 2 &&\n\t\t\t\t\t\t(preloadElems[0] || lazySizesConfig.preloadAfterLoad) &&\n\t\t\t\t\t\t(preloadElems[0] || (!elemExpandVal && ((eLbottom || eLright || eLleft || eLtop) || lazyloadElems[i][_getAttribute](lazySizesConfig.sizesAttr) != 'auto')))){\n\t\t\t\t\t\tautoLoadElem = preloadElems[0] || lazyloadElems[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(autoLoadElem && !loadedSomething){\n\t\t\t\t\tunveilElement(autoLoadElem);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tvar throttledCheckElements = throttle(checkElements);\n\n\t\tvar switchLoadingClass = function(e){\n\t\t\tvar elem = e.target;\n\n\t\t\tif (elem._lazyCache) {\n\t\t\t\tdelete elem._lazyCache;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresetPreloading(e);\n\t\t\taddClass(elem, lazySizesConfig.loadedClass);\n\t\t\tremoveClass(elem, lazySizesConfig.loadingClass);\n\t\t\taddRemoveLoadEvents(elem, rafSwitchLoadingClass);\n\t\t\ttriggerEvent(elem, 'lazyloaded');\n\t\t};\n\t\tvar rafedSwitchLoadingClass = rAFIt(switchLoadingClass);\n\t\tvar rafSwitchLoadingClass = function(e){\n\t\t\trafedSwitchLoadingClass({target: e.target});\n\t\t};\n\n\t\tvar changeIframeSrc = function(elem, src){\n\t\t\ttry {\n\t\t\t\telem.contentWindow.location.replace(src);\n\t\t\t} catch(e){\n\t\t\t\telem.src = src;\n\t\t\t}\n\t\t};\n\n\t\tvar handleSources = function(source){\n\t\t\tvar customMedia;\n\n\t\t\tvar sourceSrcset = source[_getAttribute](lazySizesConfig.srcsetAttr);\n\n\t\t\tif( (customMedia = lazySizesConfig.customMedia[source[_getAttribute]('data-media') || source[_getAttribute]('media')]) ){\n\t\t\t\tsource.setAttribute('media', customMedia);\n\t\t\t}\n\n\t\t\tif(sourceSrcset){\n\t\t\t\tsource.setAttribute('srcset', sourceSrcset);\n\t\t\t}\n\t\t};\n\n\t\tvar lazyUnveil = rAFIt(function (elem, detail, isAuto, sizes, isImg){\n\t\t\tvar src, srcset, parent, isPicture, event, firesLoad;\n\n\t\t\tif(!(event = triggerEvent(elem, 'lazybeforeunveil', detail)).defaultPrevented){\n\n\t\t\t\tif(sizes){\n\t\t\t\t\tif(isAuto){\n\t\t\t\t\t\taddClass(elem, lazySizesConfig.autosizesClass);\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem.setAttribute('sizes', sizes);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tsrcset = elem[_getAttribute](lazySizesConfig.srcsetAttr);\n\t\t\t\tsrc = elem[_getAttribute](lazySizesConfig.srcAttr);\n\n\t\t\t\tif(isImg) {\n\t\t\t\t\tparent = elem.parentNode;\n\t\t\t\t\tisPicture = parent && regPicture.test(parent.nodeName || '');\n\t\t\t\t}\n\n\t\t\t\tfiresLoad = detail.firesLoad || (('src' in elem) && (srcset || src || isPicture));\n\n\t\t\t\tevent = {target: elem};\n\n\t\t\t\taddClass(elem, lazySizesConfig.loadingClass);\n\n\t\t\t\tif(firesLoad){\n\t\t\t\t\tclearTimeout(resetPreloadingTimer);\n\t\t\t\t\tresetPreloadingTimer = setTimeout(resetPreloading, 2500);\n\t\t\t\t\taddRemoveLoadEvents(elem, rafSwitchLoadingClass, true);\n\t\t\t\t}\n\n\t\t\t\tif(isPicture){\n\t\t\t\t\tforEach.call(parent.getElementsByTagName('source'), handleSources);\n\t\t\t\t}\n\n\t\t\t\tif(srcset){\n\t\t\t\t\telem.setAttribute('srcset', srcset);\n\t\t\t\t} else if(src && !isPicture){\n\t\t\t\t\tif(regIframe.test(elem.nodeName)){\n\t\t\t\t\t\tchangeIframeSrc(elem, src);\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem.src = src;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(isImg && (srcset || isPicture)){\n\t\t\t\t\tupdatePolyfill(elem, {src: src});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(elem._lazyRace){\n\t\t\t\tdelete elem._lazyRace;\n\t\t\t}\n\t\t\tremoveClass(elem, lazySizesConfig.lazyClass);\n\n\t\t\trAF(function(){\n\t\t\t\t// Part of this can be removed as soon as this fix is older: https://bugs.chromium.org/p/chromium/issues/detail?id=7731 (2015)\n\t\t\t\tvar isLoaded = elem.complete && elem.naturalWidth > 1;\n\n\t\t\t\tif( !firesLoad || isLoaded){\n\t\t\t\t\tif (isLoaded) {\n\t\t\t\t\t\taddClass(elem, 'ls-is-cached');\n\t\t\t\t\t}\n\t\t\t\t\tswitchLoadingClass(event);\n\t\t\t\t\telem._lazyCache = true;\n\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\tif ('_lazyCache' in elem) {\n\t\t\t\t\t\t\tdelete elem._lazyCache;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 9);\n\t\t\t\t}\n\t\t\t}, true);\n\t\t});\n\n\t\tvar unveilElement = function (elem){\n\t\t\tvar detail;\n\n\t\t\tvar isImg = regImg.test(elem.nodeName);\n\n\t\t\t//allow using sizes=\"auto\", but don't use. it's invalid. Use data-sizes=\"auto\" or a valid value for sizes instead (i.e.: sizes=\"80vw\")\n\t\t\tvar sizes = isImg && (elem[_getAttribute](lazySizesConfig.sizesAttr) || elem[_getAttribute]('sizes'));\n\t\t\tvar isAuto = sizes == 'auto';\n\n\t\t\tif( (isAuto || !isCompleted) && isImg && (elem[_getAttribute]('src') || elem.srcset) && !elem.complete && !hasClass(elem, lazySizesConfig.errorClass) && hasClass(elem, lazySizesConfig.lazyClass)){return;}\n\n\t\t\tdetail = triggerEvent(elem, 'lazyunveilread').detail;\n\n\t\t\tif(isAuto){\n\t\t\t\t autoSizer.updateElem(elem, true, elem.offsetWidth);\n\t\t\t}\n\n\t\t\telem._lazyRace = true;\n\t\t\tisLoading++;\n\n\t\t\tlazyUnveil(elem, detail, isAuto, sizes, isImg);\n\t\t};\n\n\t\tvar onload = function(){\n\t\t\tif(isCompleted){return;}\n\t\t\tif(Date.now() - started < 999){\n\t\t\t\tsetTimeout(onload, 999);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar afterScroll = debounce(function(){\n\t\t\t\tlazySizesConfig.loadMode = 3;\n\t\t\t\tthrottledCheckElements();\n\t\t\t});\n\n\t\t\tisCompleted = true;\n\n\t\t\tlazySizesConfig.loadMode = 3;\n\n\t\t\tthrottledCheckElements();\n\n\t\t\taddEventListener('scroll', function(){\n\t\t\t\tif(lazySizesConfig.loadMode == 3){\n\t\t\t\t\tlazySizesConfig.loadMode = 2;\n\t\t\t\t}\n\t\t\t\tafterScroll();\n\t\t\t}, true);\n\t\t};\n\n\t\treturn {\n\t\t\t_: function(){\n\t\t\t\tstarted = Date.now();\n\n\t\t\t\tlazysizes.elements = document.getElementsByClassName(lazySizesConfig.lazyClass);\n\t\t\t\tpreloadElems = document.getElementsByClassName(lazySizesConfig.lazyClass + ' ' + lazySizesConfig.preloadClass);\n\n\t\t\t\taddEventListener('scroll', throttledCheckElements, true);\n\n\t\t\t\taddEventListener('resize', throttledCheckElements, true);\n\n\t\t\t\tif(window.MutationObserver){\n\t\t\t\t\tnew MutationObserver( throttledCheckElements ).observe( docElem, {childList: true, subtree: true, attributes: true} );\n\t\t\t\t} else {\n\t\t\t\t\tdocElem[_addEventListener]('DOMNodeInserted', throttledCheckElements, true);\n\t\t\t\t\tdocElem[_addEventListener]('DOMAttrModified', throttledCheckElements, true);\n\t\t\t\t\tsetInterval(throttledCheckElements, 999);\n\t\t\t\t}\n\n\t\t\t\taddEventListener('hashchange', throttledCheckElements, true);\n\n\t\t\t\t//, 'fullscreenchange'\n\t\t\t\t['focus', 'mouseover', 'click', 'load', 'transitionend', 'animationend', 'webkitAnimationEnd'].forEach(function(name){\n\t\t\t\t\tdocument[_addEventListener](name, throttledCheckElements, true);\n\t\t\t\t});\n\n\t\t\t\tif((/d$|^c/.test(document.readyState))){\n\t\t\t\t\tonload();\n\t\t\t\t} else {\n\t\t\t\t\taddEventListener('load', onload);\n\t\t\t\t\tdocument[_addEventListener]('DOMContentLoaded', throttledCheckElements);\n\t\t\t\t\tsetTimeout(onload, 20000);\n\t\t\t\t}\n\n\t\t\t\tif(lazysizes.elements.length){\n\t\t\t\t\tcheckElements();\n\t\t\t\t\trAF._lsFlush();\n\t\t\t\t} else {\n\t\t\t\t\tthrottledCheckElements();\n\t\t\t\t}\n\t\t\t},\n\t\t\tcheckElems: throttledCheckElements,\n\t\t\tunveil: unveilElement\n\t\t};\n\t})();\n\n\n\tvar autoSizer = (function(){\n\t\tvar autosizesElems;\n\n\t\tvar sizeElement = rAFIt(function(elem, parent, event, width){\n\t\t\tvar sources, i, len;\n\t\t\telem._lazysizesWidth = width;\n\t\t\twidth += 'px';\n\n\t\t\telem.setAttribute('sizes', width);\n\n\t\t\tif(regPicture.test(parent.nodeName || '')){\n\t\t\t\tsources = parent.getElementsByTagName('source');\n\t\t\t\tfor(i = 0, len = sources.length; i < len; i++){\n\t\t\t\t\tsources[i].setAttribute('sizes', width);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!event.detail.dataAttr){\n\t\t\t\tupdatePolyfill(elem, event.detail);\n\t\t\t}\n\t\t});\n\t\tvar getSizeElement = function (elem, dataAttr, width){\n\t\t\tvar event;\n\t\t\tvar parent = elem.parentNode;\n\n\t\t\tif(parent){\n\t\t\t\twidth = getWidth(elem, parent, width);\n\t\t\t\tevent = triggerEvent(elem, 'lazybeforesizes', {width: width, dataAttr: !!dataAttr});\n\n\t\t\t\tif(!event.defaultPrevented){\n\t\t\t\t\twidth = event.detail.width;\n\n\t\t\t\t\tif(width && width !== elem._lazysizesWidth){\n\t\t\t\t\t\tsizeElement(elem, parent, event, width);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tvar updateElementsSizes = function(){\n\t\t\tvar i;\n\t\t\tvar len = autosizesElems.length;\n\t\t\tif(len){\n\t\t\t\ti = 0;\n\n\t\t\t\tfor(; i < len; i++){\n\t\t\t\t\tgetSizeElement(autosizesElems[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tvar debouncedUpdateElementsSizes = debounce(updateElementsSizes);\n\n\t\treturn {\n\t\t\t_: function(){\n\t\t\t\tautosizesElems = document.getElementsByClassName(lazySizesConfig.autosizesClass);\n\t\t\t\taddEventListener('resize', debouncedUpdateElementsSizes);\n\t\t\t},\n\t\t\tcheckElems: debouncedUpdateElementsSizes,\n\t\t\tupdateElem: getSizeElement\n\t\t};\n\t})();\n\n\tvar init = function(){\n\t\tif(!init.i){\n\t\t\tinit.i = true;\n\t\t\tautoSizer._();\n\t\t\tloader._();\n\t\t}\n\t};\n\n\tlazysizes = {\n\t\tcfg: lazySizesConfig,\n\t\tautoSizer: autoSizer,\n\t\tloader: loader,\n\t\tinit: init,\n\t\tuP: updatePolyfill,\n\t\taC: addClass,\n\t\trC: removeClass,\n\t\thC: hasClass,\n\t\tfire: triggerEvent,\n\t\tgW: getWidth,\n\t\trAF: rAF,\n\t};\n\n\treturn lazysizes;\n}\n));\n","\"use strict\";\nexports.__esModule = true;\nvar typeable_1 = require(\"typeable\");\nfunction stringUppercase(value) {\n if (!typeable_1.isString(value))\n return false;\n return value === value.toUpperCase();\n}\nexports.stringUppercase = stringUppercase;\n;\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Object = Object;\n\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n","'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : key + '';\n};\n","'use strict';\nmodule.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","/*\n * Vuescroll v4.9.0-beta.15\n * (c) 2018-2018 Yi(Yves) Wang\n * Released under the MIT License\n * Github: https://github.com/YvesCoding/vuescroll\n * Website: http://vuescrolljs.yvescoding.org/\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue')) :\n typeof define === 'function' && define.amd ? define(['vue'], factory) :\n (global.vuescroll = factory(global.Vue));\n}(this, (function (Vue) { 'use strict';\n\n Vue = Vue && Vue.hasOwnProperty('default') ? Vue['default'] : Vue;\n\n var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n var defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n };\n\n var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n var toConsumableArray = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n };\n\n /* istanbul ignore next */\n var isServer = function isServer() {\n return Vue.prototype.$isServer;\n };\n\n function deepCopy(from, to, shallow) {\n if (shallow && isUndef(to)) {\n return from;\n }\n\n if (isArray(from)) {\n to = [];\n from.forEach(function (item, index) {\n to[index] = deepCopy(item, to[index]);\n });\n } else if (from) {\n if (!isPlainObj(from)) {\n return from;\n }\n to = {};\n for (var key in from) {\n to[key] = _typeof(from[key]) === 'object' ? deepCopy(from[key], to[key]) : from[key];\n }\n }\n return to;\n }\n\n function mergeObject(from, to, force, shallow) {\n if (shallow && isUndef(to)) {\n return from;\n }\n\n to = to || {};\n\n if (isArray(from)) {\n if (!isArray(to) && force) {\n to = [];\n }\n if (isArray(to)) {\n from.forEach(function (item, index) {\n to[index] = mergeObject(item, to[index], force, shallow);\n });\n }\n } else if (from) {\n if (!isPlainObj(from)) {\n if (force) {\n to = from;\n }\n } else {\n for (var key in from) {\n if (_typeof(from[key]) === 'object') {\n if (isUndef(to[key])) {\n to[key] = deepCopy(from[key], to[key], shallow);\n } else {\n mergeObject(from[key], to[key], force, shallow);\n }\n } else {\n if (isUndef(to[key]) || force) to[key] = from[key];\n }\n }\n }\n }\n\n return to;\n }\n\n function defineReactive(target, key, source, souceKey) {\n /* istanbul ignore if */\n if (!source[key] && typeof source !== 'function') {\n return;\n }\n souceKey = souceKey || key;\n Object.defineProperty(target, key, {\n get: function get$$1() {\n return source[souceKey];\n },\n\n configurable: true\n });\n }\n\n function getAccurateSize(dom) {\n var vague = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var clientWidth = void 0;\n var clientHeight = void 0;\n try {\n clientWidth = +window.getComputedStyle(dom).width.slice(0, -2);\n clientHeight = +window.getComputedStyle(dom).height.slice(0, -2);\n } catch (error) /* istanbul ignore next */{\n clientWidth = dom.clientWidth;\n clientHeight = dom.clientHeight;\n }\n if (vague) {\n clientHeight = Math.round(clientHeight);\n clientWidth = Math.round(clientWidth);\n }\n return {\n clientHeight: clientHeight,\n clientWidth: clientWidth\n };\n }\n\n var scrollBarWidth = void 0;\n function getGutter() {\n /* istanbul ignore next */\n if (isServer()) return 0;\n if (scrollBarWidth !== undefined) return scrollBarWidth;\n var outer = document.createElement('div');\n outer.style.visibility = 'hidden';\n outer.style.width = '100px';\n outer.style.position = 'absolute';\n outer.style.top = '-9999px';\n document.body.appendChild(outer);\n\n var widthNoScroll = outer.offsetWidth;\n outer.style.overflow = 'scroll';\n\n var inner = document.createElement('div');\n inner.style.width = '100%';\n outer.appendChild(inner);\n\n var widthWithScroll = inner.offsetWidth;\n outer.parentNode.removeChild(outer);\n scrollBarWidth = widthNoScroll - widthWithScroll;\n\n return scrollBarWidth;\n }\n\n function eventCenter(dom, eventName, hander) {\n var capture = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'on';\n\n type == 'on' ? dom.addEventListener(eventName, hander, capture) : dom.removeEventListener(eventName, hander, capture);\n }\n\n var error = function error(msg) {\n console.error('[vuescroll] ' + msg);\n };\n var warn = function warn(msg) {\n console.warn('[vuescroll] ' + msg);\n };\n\n function isChildInParent(child, parent) {\n var flag = false;\n if (!child || !parent) {\n return flag;\n }\n while (child.parentNode !== parent && child.parentNode.nodeType !== 9 && !child.parentNode._isVuescroll) {\n child = child.parentNode;\n }\n if (child.parentNode == parent) {\n flag = true;\n }\n return flag;\n }\n\n function isSupportTouch() {\n /* istanbul ignore if */\n if (isServer()) return false;\n return 'ontouchstart' in window;\n }\n\n function getPrefix(global) {\n var docStyle = document.documentElement.style;\n var engine;\n /* istanbul ignore if */\n if (global.opera && Object.prototype.toString.call(opera) === '[object Opera]') {\n engine = 'presto';\n } /* istanbul ignore next */else if ('MozAppearance' in docStyle) {\n engine = 'gecko';\n } else if ('WebkitAppearance' in docStyle) {\n engine = 'webkit';\n } /* istanbul ignore next */else if (typeof navigator.cpuClass === 'string') {\n engine = 'trident';\n }\n var vendorPrefix = {\n trident: 'ms',\n gecko: 'moz',\n webkit: 'webkit',\n presto: 'O'\n }[engine];\n return vendorPrefix;\n }\n\n function getComplitableStyle(property, value) {\n /* istanbul ignore if */\n if (isServer()) return false;\n\n var compatibleValue = '-' + getPrefix(window) + '-' + value;\n var testElm = document.createElement('div');\n testElm.style[property] = compatibleValue;\n if (testElm.style[property] == compatibleValue) {\n return compatibleValue;\n }\n /* istanbul ignore next */\n return false;\n }\n\n function isIE() {\n /* istanbul ignore if */\n if (isServer()) return false;\n\n var agent = navigator.userAgent.toLowerCase();\n return agent.indexOf('msie') !== -1 || agent.indexOf('trident') !== -1 || agent.indexOf(' edge/') !== -1;\n }\n\n /**\n * Insert children into user-passed slot at vnode level\n */\n function insertChildrenIntoSlot(h) {\n var parentVnode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var childVNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var data = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var swapChildren = arguments[4];\n\n /* istanbul ignore if */\n if (parentVnode && parentVnode.length > 1) {\n return swapChildren ? [].concat(toConsumableArray(childVNode), toConsumableArray(parentVnode)) : [].concat(toConsumableArray(parentVnode), toConsumableArray(childVNode));\n }\n\n parentVnode = parentVnode[0];\n\n var _getVnodeInfo = getVnodeInfo(parentVnode),\n ch = _getVnodeInfo.ch,\n tag = _getVnodeInfo.tag,\n isComponent = _getVnodeInfo.isComponent;\n\n if (isComponent) {\n parentVnode.data = mergeObject({ attrs: parentVnode.componentOptions.propsData }, parentVnode.data, false, // force: false\n true // shallow: true\n );\n }\n ch = swapChildren ? [].concat(toConsumableArray(childVNode), toConsumableArray(ch)) : [].concat(toConsumableArray(ch), toConsumableArray(childVNode));\n delete parentVnode.data.slot;\n\n return h(tag, mergeObject(data, parentVnode.data, false, true), ch);\n }\n\n /**\n * Get the info of a vnode,\n * vnode must be parentVnode\n */\n function getVnodeInfo(vnode) {\n if (!vnode || vnode.length > 1) return {};\n\n vnode = vnode[0] ? vnode[0] : vnode;\n var isComponent = !!vnode.componentOptions;\n var ch = void 0;\n var tag = void 0;\n\n if (isComponent) {\n ch = vnode.componentOptions.children || [];\n tag = vnode.componentOptions.tag;\n } else {\n ch = vnode.children || [];\n tag = vnode.tag;\n }\n\n return {\n isComponent: isComponent,\n ch: ch,\n tag: tag\n };\n }\n\n /**\n * Get the vuescroll instance instead of\n * user pass component like slot.\n */\n function getRealParent(ctx) {\n var parent = ctx.$parent;\n if (!parent._isVuescrollRoot && parent) {\n parent = parent.$parent;\n }\n return parent;\n }\n\n var isArray = function isArray(_) {\n return Array.isArray(_);\n };\n var isPlainObj = function isPlainObj(_) {\n return Object.prototype.toString.call(_) == '[object Object]';\n };\n var isUndef = function isUndef(_) {\n return typeof _ === 'undefined';\n };\n\n function getNumericValue(distance, size) {\n var number = void 0;\n if (!(number = /(-?\\d+(?:\\.\\d+?)?)%$/.exec(distance))) {\n number = distance - 0;\n } else {\n number = number[1] - 0;\n number = size * number / 100;\n }\n return number;\n }\n\n var api = {\n mounted: function mounted() {\n vsInstances[this._uid] = this;\n },\n beforeDestroy: function beforeDestroy() {\n delete vsInstances[this._uid];\n },\n\n methods: {\n // public api\n scrollTo: function scrollTo(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var animate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n this.internalScrollTo(x, y, animate, force);\n },\n scrollBy: function scrollBy(_ref2) {\n var _ref2$dx = _ref2.dx,\n dx = _ref2$dx === undefined ? 0 : _ref2$dx,\n _ref2$dy = _ref2.dy,\n dy = _ref2$dy === undefined ? 0 : _ref2$dy;\n var animate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var _vuescroll$state = this.vuescroll.state,\n _vuescroll$state$inte = _vuescroll$state.internalScrollLeft,\n internalScrollLeft = _vuescroll$state$inte === undefined ? 0 : _vuescroll$state$inte,\n _vuescroll$state$inte2 = _vuescroll$state.internalScrollTop,\n internalScrollTop = _vuescroll$state$inte2 === undefined ? 0 : _vuescroll$state$inte2;\n\n if (dx) {\n internalScrollLeft += getNumericValue(dx, this.scrollPanelElm.scrollWidth - this.$el.clientWidth);\n }\n if (dy) {\n internalScrollTop += getNumericValue(dy, this.scrollPanelElm.scrollHeight - this.$el.clientHeight);\n }\n this.internalScrollTo(internalScrollLeft, internalScrollTop, animate);\n },\n scrollIntoView: function scrollIntoView(elm) {\n var animate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n var parentElm = this.$el;\n\n if (typeof elm === 'string') {\n elm = parentElm.querySelector(elm);\n }\n\n if (!isChildInParent(elm, parentElm)) {\n warn('The element or selector you passed is not the element of Vuescroll, please pass the element that is in Vuescroll to scrollIntoView API. ');\n return;\n }\n\n // parent elm left, top\n\n var _$el$getBoundingClien = this.$el.getBoundingClientRect(),\n left = _$el$getBoundingClien.left,\n top = _$el$getBoundingClien.top;\n // child elm left, top\n\n\n var _elm$getBoundingClien = elm.getBoundingClientRect(),\n childLeft = _elm$getBoundingClien.left,\n childTop = _elm$getBoundingClien.top;\n\n var diffX = left - childLeft;\n var diffY = top - childTop;\n\n this.scrollBy({\n dx: -diffX,\n dy: -diffY\n }, animate);\n },\n refresh: function refresh() {\n this.refreshInternalStatus();\n // refresh again to keep status is correct\n this.$nextTick(this.refreshInternalStatus);\n },\n\n // Get the times you have scrolled!\n getScrollingTimes: function getScrollingTimes() {\n return this.vuescroll.state.scrollingTimes;\n },\n\n // Clear the times you have scrolled!\n clearScrollingTimes: function clearScrollingTimes() {\n this.vuescroll.state.scrollingTimes = 0;\n }\n }\n };\n\n /** Public Api */\n\n /**\n * Refresh all\n */\n var vsInstances = {};\n function refreshAll() {\n for (var vs in vsInstances) {\n vsInstances[vs].refresh();\n }\n }\n\n /**\n * Compatible to scroller's animation function\n */\n function createEasingFunction(easing, easingPattern) {\n return function (time) {\n return easingPattern(easing, time);\n };\n }\n\n /**\n * Calculate the easing pattern\n * @link https://github.com/cferdinandi/smooth-scroll/blob/master/src/js/smooth-scroll.js\n * modified by wangyi7099\n * @param {String} type Easing pattern\n * @param {Number} time Time animation should take to complete\n * @returns {Number}\n */\n function easingPattern(easing, time) {\n var pattern = null;\n /* istanbul ignore next */\n {\n // Default Easing Patterns\n if (easing === 'easeInQuad') pattern = time * time; // accelerating from zero velocity\n if (easing === 'easeOutQuad') pattern = time * (2 - time); // decelerating to zero velocity\n if (easing === 'easeInOutQuad') pattern = time < 0.5 ? 2 * time * time : -1 + (4 - 2 * time) * time; // acceleration until halfway, then deceleration\n if (easing === 'easeInCubic') pattern = time * time * time; // accelerating from zero velocity\n if (easing === 'easeOutCubic') pattern = --time * time * time + 1; // decelerating to zero velocity\n if (easing === 'easeInOutCubic') pattern = time < 0.5 ? 4 * time * time * time : (time - 1) * (2 * time - 2) * (2 * time - 2) + 1; // acceleration until halfway, then deceleration\n if (easing === 'easeInQuart') pattern = time * time * time * time; // accelerating from zero velocity\n if (easing === 'easeOutQuart') pattern = 1 - --time * time * time * time; // decelerating to zero velocity\n if (easing === 'easeInOutQuart') pattern = time < 0.5 ? 8 * time * time * time * time : 1 - 8 * --time * time * time * time; // acceleration until halfway, then deceleration\n if (easing === 'easeInQuint') pattern = time * time * time * time * time; // accelerating from zero velocity\n if (easing === 'easeOutQuint') pattern = 1 + --time * time * time * time * time; // decelerating to zero velocity\n if (easing === 'easeInOutQuint') pattern = time < 0.5 ? 16 * time * time * time * time * time : 1 + 16 * --time * time * time * time * time; // acceleration until halfway, then deceleration\n }\n return pattern || time; // no easing, no acceleration\n }\n\n function requestAnimationFrame(global) {\n // Check for request animation Frame support\n var requestFrame = global.requestAnimationFrame || global.webkitRequestAnimationFrame || global.mozRequestAnimationFrame || global.oRequestAnimationFrame;\n var isNative = !!requestFrame;\n\n if (requestFrame && !/requestAnimationFrame\\(\\)\\s*\\{\\s*\\[native code\\]\\s*\\}/i.test(requestFrame.toString())) {\n isNative = false;\n }\n\n if (isNative) {\n return function (callback, root) {\n requestFrame(callback, root);\n };\n }\n\n var TARGET_FPS = 60;\n var requests = {};\n var rafHandle = 1;\n var intervalHandle = null;\n var lastActive = +new Date();\n\n return function (callback) {\n var callbackHandle = rafHandle++;\n\n // Store callback\n requests[callbackHandle] = callback;\n\n // Create timeout at first request\n if (intervalHandle === null) {\n intervalHandle = setInterval(function () {\n var time = +new Date();\n var currentRequests = requests;\n\n // Reset data structure before executing callbacks\n requests = {};\n\n for (var key in currentRequests) {\n if (currentRequests.hasOwnProperty(key)) {\n currentRequests[key](time);\n lastActive = time;\n }\n }\n\n // Disable the timeout when nothing happens for a certain\n // period of time\n if (time - lastActive > 2500) {\n clearInterval(intervalHandle);\n intervalHandle = null;\n }\n }, 1000 / TARGET_FPS);\n }\n\n return callbackHandle;\n };\n }\n\n /*\n * Scroller\n * http://github.com/zynga/scroller\n *\n * Copyright 2011, Zynga Inc.\n * Licensed under the MIT License.\n * https://raw.github.com/zynga/scroller/master/MIT-LICENSE.txt\n *\n * Based on the work of: Unify Project (unify-project.org)\n * http://unify-project.org\n * Copyright 2011, Deutsche Telekom AG\n * License: MIT + Apache (V2)\n */\n\n /**\n * Generic animation class with support for dropped frames both optional easing and duration.\n *\n * Optional duration is useful when the lifetime is defined by another condition than time\n * e.g. speed of an animating object, etc.\n *\n * Dropped frame logic allows to keep using the same updater logic independent from the actual\n * rendering. This eases a lot of cases where it might be pretty complex to break down a state\n * based on the pure time difference.\n */\n var time = Date.now || function () {\n return +new Date();\n };\n var desiredFrames = 60;\n var millisecondsPerSecond = 1000;\n var running = {};\n var counter = 1;\n\n var core = { effect: {} };\n var global$1 = null;\n\n if (typeof window !== 'undefined') {\n global$1 = window;\n } else {\n global$1 = {};\n }\n\n core.effect.Animate = {\n /**\n * A requestAnimationFrame wrapper / polyfill.\n *\n * @param callback {Function} The callback to be invoked before the next repaint.\n * @param root {HTMLElement} The root element for the repaint\n */\n requestAnimationFrame: requestAnimationFrame(global$1),\n /**\n * Stops the given animation.\n *\n * @param id {Integer} Unique animation ID\n * @return {Boolean} Whether the animation was stopped (aka, was running before)\n */\n stop: function stop(id) {\n var cleared = running[id] != null;\n if (cleared) {\n running[id] = null;\n }\n\n return cleared;\n },\n\n /**\n * Whether the given animation is still running.\n *\n * @param id {Integer} Unique animation ID\n * @return {Boolean} Whether the animation is still running\n */\n isRunning: function isRunning(id) {\n return running[id] != null;\n },\n\n /**\n * Start the animation.\n *\n * @param stepCallback {Function} Pointer to function which is executed on every step.\n * Signature of the method should be `function(percent, now, virtual) { return continueWithAnimation; }`\n * @param verifyCallback {Function} Executed before every animation step.\n * Signature of the method should be `function() { return continueWithAnimation; }`\n * @param completedCallback {Function}\n * Signature of the method should be `function(droppedFrames, finishedAnimation) {}`\n * @param duration {Integer} Milliseconds to run the animation\n * @param easingMethod {Function} Pointer to easing function\n * Signature of the method should be `function(percent) { return modifiedValue; }`\n * @param root {Element ? document.body} Render root, when available. Used for internal\n * usage of requestAnimationFrame.\n * @return {Integer} Identifier of animation. Can be used to stop it any time.\n */\n start: function start(stepCallback, verifyCallback, completedCallback, duration, easingMethod, root) {\n var start = time();\n var lastFrame = start;\n var percent = 0;\n var dropCounter = 0;\n var id = counter++;\n\n if (!root) {\n root = document.body;\n }\n\n // Compacting running db automatically every few new animations\n if (id % 20 === 0) {\n var newRunning = {};\n for (var usedId in running) {\n newRunning[usedId] = true;\n }\n running = newRunning;\n }\n\n // This is the internal step method which is called every few milliseconds\n var step = function step(virtual) {\n // Normalize virtual value\n var render = virtual !== true;\n\n // Get current time\n var now = time();\n\n // Verification is executed before next animation step\n if (!running[id] || verifyCallback && !verifyCallback(id)) {\n running[id] = null;\n completedCallback && completedCallback(desiredFrames - dropCounter / ((now - start) / millisecondsPerSecond), id, false);\n return;\n }\n\n // For the current rendering to apply let's update omitted steps in memory.\n // This is important to bring internal state variables up-to-date with progress in time.\n if (render) {\n var droppedFrames = Math.round((now - lastFrame) / (millisecondsPerSecond / desiredFrames)) - 1;\n for (var j = 0; j < Math.min(droppedFrames, 4); j++) {\n step(true);\n dropCounter++;\n }\n }\n\n // Compute percent value\n if (duration) {\n percent = (now - start) / duration;\n if (percent > 1) {\n percent = 1;\n }\n }\n\n // Execute step callback, then...\n var value = easingMethod ? easingMethod(percent) : percent;\n if ((stepCallback(value, now, render) === false || percent === 1) && render) {\n running[id] = null;\n completedCallback && completedCallback(desiredFrames - dropCounter / ((now - start) / millisecondsPerSecond), id, percent === 1 || duration == null);\n } else if (render) {\n lastFrame = now;\n core.effect.Animate.requestAnimationFrame(step, root);\n }\n };\n\n // Mark as running\n running[id] = true;\n\n // Init first step\n core.effect.Animate.requestAnimationFrame(step, root);\n\n // Return unique animation ID\n return id;\n }\n };\n\n var baseConfig = {\n // vuescroll\n vuescroll: {\n // vuescroll's size(height/width) should be a percent(100%)\n // or be a number that is equal to its parentNode's width or\n // height ?\n sizeStrategy: 'percent',\n /** Whether to detect dom resize or not */\n detectResize: true\n },\n scrollPanel: {\n // when component mounted.. it will automatically scrolls.\n initialScrollY: false,\n initialScrollX: false,\n // feat: #11\n scrollingX: true,\n scrollingY: true,\n speed: 300,\n easing: undefined,\n // Sometimes, the nativebar maybe on the left,\n // See https://github.com/YvesCoding/vuescroll/issues/64\n verticalNativeBarPos: 'right'\n },\n\n //\n rail: {\n background: '#01a99a',\n opacity: 0,\n border: 'none',\n /** Rail's size(Height/Width) , default -> 6px */\n size: '6px',\n /** Specify rail's border-radius, or the border-radius of rail and bar will be equal to the rail's size. default -> false **/\n specifyBorderRadius: false,\n /** Rail the distance from the two ends of the X axis and Y axis. **/\n gutterOfEnds: null,\n /** Rail the distance from the side of container. **/\n gutterOfSide: '2px',\n /** Whether to keep rail show or not, default -> false, event content height is not enough */\n keepShow: false\n },\n bar: {\n /** How long to hide bar after mouseleave, default -> 500 */\n showDelay: 500,\n /** Specify bar's border-radius, or the border-radius of rail and bar will be equal to the rail's size. default -> false **/\n specifyBorderRadius: false,\n /** Whether to show bar on scrolling, default -> true */\n onlyShowBarOnScroll: true,\n /** Whether to keep show or not, default -> false */\n keepShow: false,\n /** Bar's background , default -> #00a650 */\n background: 'rgb(3, 185, 118)',\n /** Bar's opacity, default -> 1 */\n opacity: 1,\n /** Styles when you hover scrollbar, it will merge into the current style */\n hoverStyle: false,\n /** false or a percent, like 10% */\n minSize: false\n },\n scrollButton: {\n enable: false,\n background: 'rgb(3, 185, 118)',\n opacity: 1,\n step: 180,\n mousedownStep: 30\n }\n };\n /**\n * validate the options\n * @export\n * @param {any} ops\n */\n function validateOps(ops) {\n var renderError = false;\n var scrollPanel = ops.scrollPanel;\n var _ops$bar = ops.bar,\n vBar = _ops$bar.vBar,\n hBar = _ops$bar.hBar;\n var _ops$rail = ops.rail,\n vRail = _ops$rail.vRail,\n hRail = _ops$rail.hRail;\n\n // validate scrollPanel\n\n var initialScrollY = scrollPanel['initialScrollY'];\n var initialScrollX = scrollPanel['initialScrollX'];\n\n if (initialScrollY && !String(initialScrollY).match(/^\\d+(\\.\\d+)?(%)?$/)) {\n warn('The prop `initialScrollY` or `initialScrollX` should be a percent number like `10%` or an exact number that greater than or equal to 0 like `100`.');\n }\n if (initialScrollX && !String(initialScrollX).match(/^\\d+(\\.\\d+)?(%)?$/)) {\n warn('The prop `initialScrollY` or `initialScrollX` should be a percent number like `10%` or an exact number that greater than or equal to 0 like `100`.');\n }\n\n // validate deprecated vBar/hBar vRail/hRail\n if (vBar || hBar || vRail || hRail) {\n warn('The options: vRail, hRail, vBar, hBar have been deprecated since v4.7.0,' + 'please use corresponing rail/bar instead!');\n }\n\n if (_extraValidate) {\n _extraValidate = [].concat(_extraValidate);\n _extraValidate.forEach(function (hasError) {\n if (hasError(ops)) {\n renderError = true;\n }\n });\n }\n return renderError;\n }\n\n var _extraValidate = null;\n var extendOpts = function extendOpts(extraOpts, extraValidate) {\n extraOpts = [].concat(extraOpts);\n extraOpts.forEach(function (opts) {\n mergeObject(opts, baseConfig);\n });\n\n _extraValidate = extraValidate;\n };\n\n// all modes\n var modes = ['slide', 'native'];\n// do nothing\n var NOOP = function NOOP() {};\n// some small changes.\n var smallChangeArray = ['mergedOptions.vuescroll.pullRefresh.tips', 'mergedOptions.vuescroll.pushLoad.tips', 'mergedOptions.rail', 'mergedOptions.bar'];\n// refresh/load dom ref/key...\n var __REFRESH_DOM_NAME = 'refreshDom';\n var __LOAD_DOM_NAME = 'loadDom';\n\n// detect content size change\n function installResizeDetection(element, callback) {\n return injectObject(element, callback);\n }\n\n function injectObject(element, callback) {\n if (element.hasResized) {\n return;\n }\n\n var OBJECT_STYLE = 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;';\n // define a wrap due to ie's zIndex bug\n var objWrap = document.createElement('div');\n objWrap.style.cssText = OBJECT_STYLE;\n var object = document.createElement('object');\n object.style.cssText = OBJECT_STYLE;\n object.type = 'text/html';\n object.tabIndex = -1;\n object.onload = function () {\n eventCenter(object.contentDocument.defaultView, 'resize', callback);\n };\n // https://github.com/wnr/element-resize-detector/blob/aafe9f7ea11d1eebdab722c7c5b86634e734b9b8/src/detection-strategy/object.js#L159\n if (!isIE()) {\n object.data = 'about:blank';\n }\n objWrap.isResizeElm = true;\n objWrap.appendChild(object);\n element.appendChild(objWrap);\n if (isIE()) {\n object.data = 'about:blank';\n }\n return function destroy() {\n if (object.contentDocument) {\n eventCenter(object.contentDocument.defaultView, 'resize', callback, 'off');\n }\n element.removeChild(objWrap);\n element.hasResized = false;\n };\n }\n\n var scrollMap = {\n vertical: {\n size: 'height',\n opsSize: 'width',\n posName: 'top',\n opposName: 'bottom',\n sidePosName: 'right',\n page: 'pageY',\n scroll: 'scrollTop',\n scrollSize: 'scrollHeight',\n offset: 'offsetHeight',\n client: 'clientY',\n axis: 'Y',\n scrollButton: {\n start: 'top',\n end: 'bottom'\n }\n },\n horizontal: {\n size: 'width',\n opsSize: 'height',\n posName: 'left',\n opposName: 'right',\n sidePosName: 'bottom',\n page: 'pageX',\n scroll: 'scrollLeft',\n scrollSize: 'scrollWidth',\n offset: 'offsetWidth',\n client: 'clientX',\n axis: 'X',\n scrollButton: {\n start: 'left',\n end: 'right'\n }\n }\n };\n\n var colorCache = {};\n var rgbReg = /rgb\\(/;\n var extractRgbColor = /rgb\\((.*)\\)/;\n\n /* istanbul ignore next */\n function createBarEvent(ctx) {\n var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'mouse';\n\n var parent = getRealParent(ctx);\n var moveEventName = type == 'mouse' ? 'mousemove' : 'touchmove';\n var endEventName = type == 'mouse' ? 'mouseup' : 'touchend';\n\n function mousedown(e) {\n e.stopImmediatePropagation();\n e.preventDefault();\n\n var event = type == 'mouse' ? e : e.touches[0];\n\n document.onselectstart = function () {\n return false;\n };\n ctx.axisStartPos = event[ctx.bar.client] - ctx.$refs['thumb'].getBoundingClientRect()[ctx.bar.posName];\n\n // Tell parent that the mouse has been down.\n ctx.setBarDrag(true);\n eventCenter(document, moveEventName, mousemove);\n eventCenter(document, endEventName, mouseup);\n }\n\n function mousemove(e) {\n if (!ctx.axisStartPos) {\n return;\n }\n\n var thubmParent = ctx.$refs.thumb.parentNode;\n\n var event = type == 'mouse' ? e : e.touches[0];\n\n var delta = event[ctx.bar.client] - thubmParent.getBoundingClientRect()[ctx.bar.posName];\n delta = delta / ctx.barScale;\n\n var percent = (delta - ctx.axisStartPos) / thubmParent[ctx.bar.offset];\n parent.scrollTo(defineProperty({}, ctx.bar.axis.toLowerCase(), parent.scrollPanelElm[ctx.bar.scrollSize] * percent), false);\n }\n\n function mouseup() {\n ctx.setBarDrag(false);\n parent.hideBar();\n\n document.onselectstart = null;\n ctx.axisStartPos = 0;\n\n eventCenter(document, moveEventName, mousemove, false, 'off');\n eventCenter(document, endEventName, mouseup, false, 'off');\n }\n\n return mousedown;\n }\n\n /* istanbul ignore next */\n function createScrollButtonEvent(ctx, type) {\n var env = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'mouse';\n\n var parent = getRealParent(ctx);\n var endEventName = env == 'mouse' ? 'mouseup' : 'touchend';\n var _ctx$ops$scrollButton = ctx.ops.scrollButton,\n step = _ctx$ops$scrollButton.step,\n mousedownStep = _ctx$ops$scrollButton.mousedownStep;\n\n var stepWithDirection = type == 'start' ? -step : step;\n var mousedownStepWithDirection = type == 'start' ? -mousedownStep : mousedownStep;\n var ref = requestAnimationFrame(window);\n\n var isMouseDown = false;\n var isMouseout = true;\n var timeoutId = void 0;\n\n function start(e) {\n /* istanbul ignore if */\n\n if (3 == e.which) {\n return;\n }\n\n e.stopImmediatePropagation();\n e.preventDefault();\n\n isMouseout = false;\n\n parent.scrollBy(defineProperty({}, 'd' + ctx.bar.axis.toLowerCase(), stepWithDirection));\n\n eventCenter(document, endEventName, endPress, false);\n\n if (env == 'mouse') {\n var elm = ctx.$refs[type];\n eventCenter(elm, 'mouseenter', enter, false);\n eventCenter(elm, 'mouseleave', leave, false);\n }\n\n clearTimeout(timeoutId);\n timeoutId = setTimeout(function () {\n isMouseDown = true;\n ref(pressing, window);\n }, 500);\n }\n\n function pressing() {\n if (isMouseDown && !isMouseout) {\n parent.scrollBy(defineProperty({}, 'd' + ctx.bar.axis.toLowerCase(), mousedownStepWithDirection), false);\n ref(pressing, window);\n }\n }\n\n function endPress() {\n clearTimeout(timeoutId);\n isMouseDown = false;\n eventCenter(document, endEventName, endPress, false, 'off');\n if (env == 'mouse') {\n var elm = ctx.$refs[type];\n eventCenter(elm, 'mouseenter', enter, false, 'off');\n eventCenter(elm, 'mouseleave', leave, false, 'off');\n }\n }\n\n function enter() {\n isMouseout = false;\n pressing();\n }\n\n function leave() {\n isMouseout = true;\n }\n\n return start;\n }\n\n// Transform a common color int oa `rgbA` color\n function getRgbAColor(color, opacity) {\n var id = color + '&' + opacity;\n if (colorCache[id]) {\n return colorCache[id];\n }\n\n var div = document.createElement('div');\n div.style.background = color;\n document.body.appendChild(div);\n var computedColor = window.getComputedStyle(div).backgroundColor;\n document.body.removeChild(div);\n\n /* istanbul ignore if */\n if (!rgbReg.test(computedColor)) {\n return color;\n }\n\n return colorCache[id] = 'rgba(' + extractRgbColor.exec(computedColor)[1] + ', ' + opacity + ')';\n }\n\n function createTrackEvent(ctx, type) {\n return function handleClickTrack(e) {\n var parent = getRealParent(ctx);\n\n var _ctx$bar = ctx.bar,\n client = _ctx$bar.client,\n offset = _ctx$bar.offset,\n posName = _ctx$bar.posName,\n axis = _ctx$bar.axis;\n\n var thumb = ctx.$refs['thumb'];\n\n e.preventDefault();\n e.stopImmediatePropagation();\n\n /* istanbul ignore if */\n if (!thumb) return;\n\n var barOffset = thumb[offset];\n var event = type == 'touchstart' ? e.touches[0] : e;\n\n var percent = (event[client] - e.currentTarget.getBoundingClientRect()[posName] - barOffset / 2) / (e.currentTarget[offset] - barOffset);\n\n parent.scrollTo(defineProperty({}, axis.toLowerCase(), percent * 100 + '%'));\n };\n }\n\n function createScrollbarButton(h, barContext, type) {\n var _style;\n\n if (!barContext.ops.scrollButton.enable) {\n return null;\n }\n\n var size = barContext.ops.rail.size;\n var borderColor = barContext.ops.scrollButton.background;\n var wrapperProps = {\n class: ['__bar-button', '__bar-button-is-' + barContext.type + '-' + type],\n style: (_style = {}, defineProperty(_style, barContext.bar.scrollButton[type], 0), defineProperty(_style, 'width', size), defineProperty(_style, 'height', size), _style),\n ref: type\n };\n\n var innerProps = {\n class: '__bar-button-inner',\n style: {\n border: 'calc(' + size + ' / 2.5) solid ' + borderColor\n },\n on: {}\n };\n\n /* istanbul ignore next */\n {\n if (isSupportTouch()) {\n innerProps.on['touchstart'] = createScrollButtonEvent(barContext, type, 'touch');\n } else {\n innerProps.on['mousedown'] = createScrollButtonEvent(barContext, type);\n }\n }\n\n return h(\n 'div',\n wrapperProps,\n [h('div', innerProps)]\n );\n }\n\n var bar = {\n name: 'bar',\n props: {\n ops: Object,\n state: Object,\n hideBar: Boolean,\n otherBarHide: Boolean,\n type: String\n },\n computed: {\n bar: function bar() {\n return scrollMap[this.type];\n },\n barSize: function barSize() {\n var minSize = this.ops.bar.minSize;\n return minSize ? Math.max(this.state.size, minSize) : this.state.size;\n },\n barScale: function barScale() {\n return (1 - this.barSize) / (1 - this.state.size);\n }\n },\n render: function render(h) {\n var _style2, _style3, _style4;\n\n var vm = this;\n\n /** Scrollbar style */\n\n var scrollDistance = vm.state.posValue * vm.state.size;\n var pos = scrollDistance * this.barScale / this.barSize;\n var style = (_style2 = {}, defineProperty(_style2, vm.bar.size, this.barSize * 100 + '%'), defineProperty(_style2, 'background', vm.ops.bar.background), defineProperty(_style2, 'opacity', vm.state.opacity), defineProperty(_style2, 'transform', 'translate' + scrollMap[vm.type].axis + '(' + pos + '%)'), _style2);\n var bar = {\n style: style,\n class: '__bar-is-' + vm.type,\n ref: 'thumb',\n on: {\n mouseenter: function mouseenter() {\n vm.setBarHoverStyles();\n },\n mouseleave: function mouseleave() {\n vm.tryRestoreBarStyles();\n }\n }\n };\n\n /** Get rgbA format background color */\n var railBackgroundColor = getRgbAColor(vm.ops.rail.background, vm.ops.rail.opacity);\n\n /** Rail Data */\n var railSize = vm.ops.rail.size;\n var endPos = vm.otherBarHide ? 0 : railSize;\n var rail = {\n class: '__rail-is-' + vm.type,\n style: (_style3 = {\n borderRadius: vm.ops.rail.specifyBorderRadius || railSize,\n background: railBackgroundColor,\n border: vm.ops.rail.border\n }, defineProperty(_style3, vm.bar.opsSize, railSize), defineProperty(_style3, vm.bar.posName, vm.ops.rail['gutterOfEnds'] || 0), defineProperty(_style3, vm.bar.opposName, vm.ops.rail['gutterOfEnds'] || endPos), defineProperty(_style3, vm.bar.sidePosName, vm.ops.rail['gutterOfSide']), _style3)\n };\n\n // left space for scroll button\n var buttonSize = vm.ops.scrollButton.enable ? railSize : 0;\n var barWrapper = {\n class: '__bar-wrap-is-' + vm.type,\n style: (_style4 = {\n borderRadius: vm.ops.rail.specifyBorderRadius || railSize\n }, defineProperty(_style4, vm.bar.posName, buttonSize), defineProperty(_style4, vm.bar.opposName, buttonSize), _style4),\n on: {}\n };\n\n /* istanbul ignore if */\n if (isSupportTouch()) {\n bar.on['touchstart'] = createBarEvent(this, 'touch');\n barWrapper.on['touchstart'] = createTrackEvent(this, 'touchstart');\n } else {\n bar.on['mousedown'] = createBarEvent(this);\n barWrapper.on['mousedown'] = createTrackEvent(this, 'mousedown');\n }\n\n return h(\n 'div',\n rail,\n [createScrollbarButton(h, this, 'start'), this.hideBar ? null : h(\n 'div',\n barWrapper,\n [h('div', bar)]\n ), createScrollbarButton(h, this, 'end')]\n );\n },\n data: function data() {\n return {\n // Use to restore bar styles after hovering the bars, on enable\n // when option hoverStyle is not `falsy`.\n originBarStyle: null,\n isBarDragging: false\n };\n },\n\n methods: {\n setBarDrag: function setBarDrag(val) /* istanbul ignore next */{\n this.$emit('setBarDrag', this.isBarDragging = val);\n\n if (!val) {\n this.tryRestoreBarStyles();\n }\n },\n tryRestoreBarStyles: function tryRestoreBarStyles() {\n var _this = this;\n\n /* istanbul ignore if */\n if (this.isBarDragging || !this.originBarStyle) return;\n\n Object.keys(this.originBarStyle).forEach(function (key) {\n _this.$refs.thumb.style[key] = _this.originBarStyle[key];\n });\n },\n setBarHoverStyles: function setBarHoverStyles() {\n var _this2 = this;\n\n var hoverBarStyle = this.ops.bar.hoverStyle;\n /* istanbul ignore next */\n if (!hoverBarStyle) return;\n\n if (!this.originBarStyle) {\n this.originBarStyle = {};\n Object.keys(hoverBarStyle).forEach(function (key) {\n _this2.originBarStyle[key] = _this2.$refs.thumb.style[key];\n });\n }\n\n mergeObject(hoverBarStyle, this.$refs.thumb.style, true);\n }\n }\n };\n\n function getBarData(vm, type) {\n var axis = scrollMap[type].axis;\n /** type.charAt(0) = vBar/hBar */\n var barType = type.charAt(0) + 'Bar';\n\n var hideBar = !vm.bar[barType].state.size || !vm.mergedOptions.scrollPanel['scrolling' + axis] || vm.refreshLoad && type !== 'vertical';\n\n var keepShowRail = vm.mergedOptions.rail.keepShow;\n\n if (hideBar && !keepShowRail) {\n return null;\n }\n\n return {\n props: {\n type: type,\n ops: {\n bar: vm.mergedOptions.bar,\n rail: vm.mergedOptions.rail,\n scrollButton: vm.mergedOptions.scrollButton\n },\n state: vm.bar[barType].state,\n hideBar: hideBar\n },\n on: {\n setBarDrag: vm.setBarDrag\n },\n ref: type + 'Bar',\n key: type\n };\n }\n\n /**\n * create bars\n *\n * @param {any} size\n * @param {any} type\n */\n function createBar(h, vm) {\n var verticalBarProps = getBarData(vm, 'vertical');\n var horizontalBarProps = getBarData(vm, 'horizontal');\n\n return [verticalBarProps ? h('bar', _extends({}, verticalBarProps, {\n props: _extends({ otherBarHide: !horizontalBarProps }, verticalBarProps.props)\n })) : null, horizontalBarProps ? h('bar', _extends({}, horizontalBarProps, {\n props: _extends({ otherBarHide: !verticalBarProps }, horizontalBarProps.props)\n })) : null];\n }\n\n /**\n * This is like a HOC, It extracts the common parts of the\n * native-mode, slide-mode and mix-mode.\n * Each mode must implement the following methods:\n * 1. refreshInternalStatus : use to refresh the component\n * 2. recordCurrentPos : use the record the current scroll postion.\n * 3. destroy : Destroy some registryed events before component destroy.\n * 4. updateBarStateAndEmitEvent: use to update bar states and emit events.\n */\n\n var withBase = function withBase(_ref) {\n var _render = _ref.render,\n name = _ref.name,\n components = _ref.components,\n mixins = _ref.mixins,\n Vue$$1 = _ref.Vue;\n\n return Vue$$1.component(name || 'vue-scroll', {\n props: {\n ops: { type: Object }\n },\n components: components,\n mixins: [api].concat(toConsumableArray([].concat(mixins))),\n created: function created() {\n var _this = this;\n\n /**\n * Begin to merge options\n */\n\n var _gfc = mergeObject(this.$vuescrollConfig || {}, {});\n var ops = mergeObject(baseConfig, _gfc);\n\n this.$options.propsData.ops = this.$options.propsData.ops || {};\n Object.keys(this.$options.propsData.ops).forEach(function (key) {\n {\n defineReactive(_this.mergedOptions, key, _this.$options.propsData.ops);\n }\n });\n // from ops to mergedOptions\n mergeObject(ops, this.mergedOptions);\n\n this._isVuescrollRoot = true;\n this.renderError = validateOps(this.mergedOptions);\n },\n render: function render(h) {\n var vm = this;\n if (vm.renderError) {\n return h('div', [[vm.$slots['default']]]);\n }\n\n // vuescroll data\n var data = {\n style: {\n height: vm.vuescroll.state.height,\n width: vm.vuescroll.state.width,\n padding: 0\n },\n class: '__vuescroll'\n };\n\n if (!isSupportTouch()) {\n data.on = {\n mouseenter: function mouseenter() {\n vm.vuescroll.state.pointerLeave = false;\n vm.updateBarStateAndEmitEvent();\n },\n mouseleave: function mouseleave() {\n vm.vuescroll.state.pointerLeave = true;\n vm.hideBar();\n },\n mousemove: function mousemove() /* istanbul ignore next */{\n vm.vuescroll.state.pointerLeave = false;\n vm.updateBarStateAndEmitEvent();\n }\n };\n } /* istanbul ignore next */else {\n data.on = {\n touchstart: function touchstart() {\n vm.vuescroll.state.pointerLeave = false;\n vm.updateBarStateAndEmitEvent();\n },\n touchend: function touchend() {\n vm.vuescroll.state.pointerLeave = true;\n vm.hideBar();\n },\n touchmove: function touchmove() /* istanbul ignore next */{\n vm.vuescroll.state.pointerLeave = false;\n vm.updateBarStateAndEmitEvent();\n }\n };\n }\n\n var ch = [_render(h, vm)].concat(toConsumableArray(createBar(h, vm)));\n\n var _customContainer = this.$slots['scroll-container'];\n if (_customContainer) {\n return insertChildrenIntoSlot(h, _customContainer, ch, data);\n }\n\n return h(\n 'div',\n data,\n [ch]\n );\n },\n mounted: function mounted() {\n var _this2 = this;\n\n if (!this.renderError) {\n this.initVariables();\n this.initWatchOpsChange();\n // Call external merged Api\n this.refreshInternalStatus();\n\n this.updatedCbs.push(function () {\n _this2.scrollToAnchor();\n _this2.updateBarStateAndEmitEvent();\n });\n }\n },\n updated: function updated() {\n var _this3 = this;\n\n this.updatedCbs.forEach(function (cb) {\n cb.call(_this3);\n });\n // Clear\n this.updatedCbs = [];\n },\n beforeDestroy: function beforeDestroy() {\n // remove registryed resize event\n if (this.destroyParentDomResize) {\n this.destroyParentDomResize();\n this.destroyParentDomResize = null;\n }\n\n if (this.destroy) {\n this.destroy();\n }\n },\n\n\n /** ------------------------------- Computed ----------------------------- */\n computed: {\n scrollPanelElm: function scrollPanelElm() {\n return this.$refs['scrollPanel']._isVue ? this.$refs['scrollPanel'].$el : this.$refs['scrollPanel'];\n }\n },\n data: function data() {\n return {\n vuescroll: {\n state: {\n isDragging: false,\n pointerLeave: true,\n /** Internal states to record current positions */\n internalScrollTop: 0,\n internalScrollLeft: 0,\n /** Current scrolling directions */\n posX: null,\n posY: null,\n /** Default sizeStrategies */\n height: '100%',\n width: '100%',\n /** How many times you have scrolled */\n scrollingTimes: 0,\n // current size strategy\n currentSizeStrategy: 'percent'\n }\n },\n bar: {\n vBar: {\n state: {\n posValue: 0,\n size: 0,\n opacity: 0\n }\n },\n hBar: {\n state: {\n posValue: 0,\n size: 0,\n opacity: 0\n }\n }\n },\n mergedOptions: {\n vuescroll: {},\n scrollPanel: {},\n scrollContent: {},\n rail: {},\n bar: {}\n },\n updatedCbs: [],\n renderError: false\n };\n },\n\n /** ------------------------------- Methods -------------------------------- */\n methods: {\n /** ------------------------ Handlers --------------------------- */\n handleScroll: function handleScroll(nativeEvent) {\n this.recordCurrentPos();\n this.updateBarStateAndEmitEvent('handle-scroll', nativeEvent);\n },\n scrollingComplete: function scrollingComplete() {\n this.vuescroll.state.scrollingTimes++;\n this.updateBarStateAndEmitEvent('handle-scroll-complete');\n },\n setBarDrag: function setBarDrag(val) {\n /* istanbul ignore next */\n this.vuescroll.state.isDragging = val;\n },\n\n\n /** ------------------------ Some Helpers --------------------------- */\n\n /*\n * To have a good ux, instead of hiding bar immediately, we hide bar\n * after some seconds by using this simple debounce-hidebar method.\n */\n showAndDefferedHideBar: function showAndDefferedHideBar(forceHideBar) {\n var _this4 = this;\n\n this.showBar();\n\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n this.timeoutId = 0;\n }\n\n this.timeoutId = setTimeout(function () {\n _this4.timeoutId = 0;\n _this4.hideBar(forceHideBar);\n }, this.mergedOptions.bar.showDelay);\n },\n showBar: function showBar() {\n var opacity = this.mergedOptions.bar.opacity;\n this.bar.vBar.state.opacity = opacity;\n this.bar.hBar.state.opacity = opacity;\n },\n hideBar: function hideBar(forceHideBar) {\n // when in non-native mode dragging content\n // in slide mode, just return\n /* istanbul ignore next */\n if (this.vuescroll.state.isDragging) {\n return;\n }\n\n if (forceHideBar && !this.mergedOptions.bar.keepShow) {\n this.bar.hBar.state.opacity = 0;\n this.bar.vBar.state.opacity = 0;\n }\n\n // add isDragging condition\n // to prevent from hiding bar while dragging the bar\n if (!this.mergedOptions.bar.keepShow && !this.vuescroll.state.isDragging && this.vuescroll.state.pointerLeave) {\n this.bar.vBar.state.opacity = 0;\n this.bar.hBar.state.opacity = 0;\n }\n },\n useNumbericSize: function useNumbericSize() {\n var _this5 = this;\n\n this.usePercentSize();\n setTimeout(function () {\n _this5.vuescroll.state.currentSizeStrategy = 'number';\n\n var el = _this5.$el;\n _this5.vuescroll.state.height = el.offsetHeight + 'px';\n _this5.vuescroll.state.width = el.offsetWidth + 'px';\n }, 0);\n },\n usePercentSize: function usePercentSize() {\n this.vuescroll.state.currentSizeStrategy = 'percent';\n\n this.vuescroll.state.height = '100%';\n this.vuescroll.state.width = '100%';\n },\n\n // Set its size to be equal to its parentNode\n setVsSize: function setVsSize() {\n if (this.destroyParentDomResize) {\n this.destroyParentDomResize();\n this.destroyParentDomResize = null;\n }\n\n if (this.mergedOptions.vuescroll.sizeStrategy == 'number') {\n this.useNumbericSize();\n this.registryParentResize();\n } else if (this.mergedOptions.vuescroll.sizeStrategy == 'percent') {\n this.usePercentSize();\n }\n },\n\n\n /** ------------------------ Init --------------------------- */\n initWatchOpsChange: function initWatchOpsChange() {\n var _this6 = this;\n\n var watchOpts = {\n deep: true,\n sync: true\n };\n this.$watch('mergedOptions', function () {\n setTimeout(function () {\n if (_this6.isSmallChangeThisTick) {\n _this6.isSmallChangeThisTick = false;\n _this6.updateBarStateAndEmitEvent('options-change');\n return;\n }\n _this6.refreshInternalStatus();\n\n // record current position\n _this6.recordCurrentPos();\n }, 0);\n }, watchOpts);\n\n /**\n * We also watch `small` changes, and when small changes happen, we send\n * a signal to vuescroll, to tell it:\n * 1. we don't need to registry resize\n * 2. we don't need to registry scroller.\n */\n smallChangeArray.forEach(function (opts) {\n _this6.$watch(opts, function () {\n _this6.isSmallChangeThisTick = true;\n }, watchOpts);\n });\n },\n\n // scrollTo hash-anchor while mounted component have mounted.\n scrollToAnchor: function scrollToAnchor() /* istanbul ignore next */{\n var validateHashSelector = function validateHashSelector(hash) {\n return (/^#[a-zA-Z_]\\d*$/.test(hash)\n );\n };\n\n var hash = window.location.hash;\n if (!hash || (hash = hash.slice(hash.lastIndexOf('#'))) && !validateHashSelector(hash)) {\n return;\n }\n\n var elm = document.querySelector(hash);\n if (!isChildInParent(elm, this.$el) || this.mergedOptions.scrollPanel.initialScrollY || this.mergedOptions.scrollPanel.initialScrollX) {\n return;\n }\n\n this.scrollIntoView(elm);\n },\n\n\n /** ------------------------ Registry Resize --------------------------- */\n\n registryParentResize: function registryParentResize() {\n var resizeEnable = this.mergedOptions.vuescroll.detectResize;\n this.destroyParentDomResize = resizeEnable ? installResizeDetection(this.$el.parentNode, this.useNumbericSize) : function () {};\n }\n }\n });\n };\n\n /**\n * Start to scroll to a position\n */\n function goScrolling(x, y, startLocationX, startLocationY, maxX, maxY, speed, easing, scrollingComplete, render) {\n // deltaX,\n // deltaY,\n var deltaX = x - startLocationX;\n var deltaY = y - startLocationY;\n var positionX = startLocationX;\n var positionY = startLocationY;\n /**\n * keep the limit of scroll delta.\n */\n /* istanbul ignore next */\n if (startLocationY + deltaY < 0) {\n deltaY = -startLocationY;\n }\n if (startLocationY + deltaY > maxY) {\n deltaY = maxY - startLocationY;\n }\n if (startLocationX + deltaX < 0) {\n deltaX = -startLocationX;\n }\n if (startLocationX + deltaX > maxX) {\n deltaX = maxX - startLocationX;\n }\n\n var easingMethod = createEasingFunction(easing, easingPattern);\n\n var stepCallback = function stepCallback(percentage) {\n positionX = startLocationX + deltaX * percentage;\n positionY = startLocationY + deltaY * percentage;\n render(Math.floor(positionX), Math.floor(positionY));\n };\n\n var verifyCallback = function verifyCallback() {\n return Math.abs(positionY - startLocationY) <= Math.abs(deltaY) || Math.abs(positionX - startLocationX) <= Math.abs(deltaX);\n };\n\n core.effect.Animate.start(stepCallback, verifyCallback, scrollingComplete, speed, easingMethod);\n }\n\n /**\n * Init following things\n * 1. Component\n * 2. Render\n * 3. Config\n */\n function _install() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _components = opts._components,\n render = opts.render,\n Vue$$1 = opts.Vue,\n _opts$components = opts.components,\n components = _opts$components === undefined ? {} : _opts$components,\n _opts$config = opts.config,\n config = _opts$config === undefined ? {} : _opts$config,\n _opts$ops = opts.ops,\n ops = _opts$ops === undefined ? {} : _opts$ops,\n validator = opts.validator;\n\n // Init component\n\n var comp = _components = _components || {};\n comp.forEach(function (_) {\n components[_.name] = _;\n });\n\n opts.components = components;\n opts.Vue = Vue$$1;\n opts.render = render;\n\n // Create component\n withBase(opts);\n\n // Init Config\n extendOpts(config, validator);\n // Inject global config\n Vue$$1.prototype.$vuescrollConfig = ops;\n }\n\n /**\n * Get the children of parent those are in viewport\n */\n function getCurrentViewportDom(parent, container) {\n var children = parent.children;\n var domFragment = [];\n\n var isCurrentview = function isCurrentview(dom) {\n var _dom$getBoundingClien = dom.getBoundingClientRect(),\n left = _dom$getBoundingClien.left,\n top = _dom$getBoundingClien.top,\n width = _dom$getBoundingClien.width,\n height = _dom$getBoundingClien.height;\n\n var _container$getBoundin = container.getBoundingClientRect(),\n parentLeft = _container$getBoundin.left,\n parentTop = _container$getBoundin.top,\n parentHeight = _container$getBoundin.height,\n parentWidth = _container$getBoundin.width;\n\n if (left - parentLeft + width > 0 && left - parentLeft < parentWidth && top - parentTop + height > 0 && top - parentTop < parentHeight) {\n return true;\n }\n return false;\n };\n\n for (var i = 0; i < children.length; i++) {\n var dom = children.item(i);\n if (isCurrentview(dom) && !dom.isResizeElm) {\n domFragment.push(dom);\n }\n }\n return domFragment;\n }\n\n function scrollTo(elm, x, y) {\n var speed = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 300;\n var easing = arguments[4];\n var animate = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n var scrollingComplete = arguments[6];\n\n var scrollLeft = void 0,\n scrollTop = void 0,\n scrollHeight = void 0,\n scrollWidth = void 0,\n clientWidth = void 0,\n clientHeight = void 0;\n\n var _elm = elm,\n nodeType = _elm.nodeType;\n\n\n if (!nodeType) {\n warn('You must pass a dom for the first param, ' + 'for window scrolling, ' + 'you can pass document as the first param.');\n\n return;\n }\n\n if (nodeType == 9) {\n // document\n elm = elm.scrollingElement;\n }\n\n var _elm2 = elm;\n scrollLeft = _elm2.scrollLeft;\n scrollTop = _elm2.scrollTop;\n scrollHeight = _elm2.scrollHeight;\n scrollWidth = _elm2.scrollWidth;\n clientWidth = _elm2.clientWidth;\n clientHeight = _elm2.clientHeight;\n\n\n if (typeof x === 'undefined') {\n x = scrollLeft;\n } else {\n x = getNumericValue(x, scrollWidth - clientWidth);\n }\n if (typeof y === 'undefined') {\n y = scrollTop;\n } else {\n y = getNumericValue(y, scrollHeight - clientHeight);\n }\n\n if (animate) {\n goScrolling(x, y, scrollLeft, scrollTop, scrollWidth, scrollHeight, speed, easing, scrollingComplete, function (x, y) {\n elm.scrollLeft = x;\n elm.scrollTop = y;\n });\n } else {\n elm.scrollTop = y;\n elm.scrollLeft = x;\n }\n }\n\n var nativeApi = {\n methods: {\n nativeScrollTo: function nativeScrollTo(x, y, animate) {\n scrollTo(this.scrollPanelElm, x, y, this.mergedOptions.scrollPanel.speed, this.mergedOptions.scrollPanel.easing, animate, this.scrollingComplete.bind(this));\n },\n getCurrentviewDomNative: function getCurrentviewDomNative() {\n var parent = this.scrollContentElm;\n var domFragment = getCurrentViewportDom(parent, this.$el);\n return domFragment;\n }\n }\n };\n\n// begin importing\n var scrollPanel = {\n name: 'scrollPanel',\n props: { ops: { type: Object, required: true } },\n methods: {\n // trigger scrollPanel options initialScrollX,\n // initialScrollY\n updateInitialScroll: function updateInitialScroll() {\n var x = 0;\n var y = 0;\n\n var parent = getRealParent(this);\n\n if (this.ops.initialScrollX) {\n x = this.ops.initialScrollX;\n }\n if (this.ops.initialScrollY) {\n y = this.ops.initialScrollY;\n }\n if (x || y) {\n parent.scrollTo({ x: x, y: y });\n }\n }\n },\n mounted: function mounted() {\n var _this = this;\n\n setTimeout(function () {\n if (!_this._isDestroyed) {\n _this.updateInitialScroll();\n }\n }, 0);\n },\n render: function render(h) {\n // eslint-disable-line\n var data = {\n class: ['__panel'],\n style: {}\n };\n\n var parent = getRealParent(this);\n\n var _customPanel = parent.$slots['scroll-panel'];\n if (_customPanel) {\n return insertChildrenIntoSlot(h, _customPanel, this.$slots.default, data);\n }\n\n return h(\n 'div',\n data,\n [[this.$slots.default]]\n );\n }\n };\n\n function getPanelData(context) {\n // scrollPanel data start\n var data = {\n ref: 'scrollPanel',\n style: {},\n class: [],\n nativeOn: {\n '&scroll': context.handleScroll\n },\n props: {\n ops: context.mergedOptions.scrollPanel\n }\n };\n data.class.push('__native');\n // dynamic set overflow scroll\n // feat: #11\n if (context.mergedOptions.scrollPanel.scrollingY) {\n data.style['overflowY'] = context.bar.vBar.state.size ? 'scroll' : '';\n } else {\n data.style['overflowY'] = 'hidden';\n }\n\n if (context.mergedOptions.scrollPanel.scrollingX) {\n data.style['overflowX'] = context.bar.hBar.state.size ? 'scroll' : '';\n } else {\n data.style['overflowX'] = 'hidden';\n }\n\n var gutter = getGutter();\n /* istanbul ignore if */\n if (!gutter) {\n data.class.push('__hidebar');\n } else {\n // hide system bar by use a negative value px\n // gutter should be 0 when manually disable scrollingX #14\n if (context.bar.vBar.state.size && context.mergedOptions.scrollPanel.scrollingY) {\n if (context.mergedOptions.scrollPanel.verticalNativeBarPos == 'right') {\n data.style.marginRight = '-' + gutter + 'px';\n } /* istanbul ignore next */else {\n data.style.marginLeft = '-' + gutter + 'px';\n }\n }\n if (context.bar.hBar.state.size && context.mergedOptions.scrollPanel.scrollingX) {\n data.style.height = 'calc(100% + ' + gutter + 'px)';\n }\n }\n\n // clear legency styles of slide mode...\n data.style.transformOrigin = '';\n data.style.transform = '';\n\n return data;\n }\n\n /**\n * create a scrollPanel\n *\n * @param {any} size\n * @param {any} context\n * @returns\n */\n function createPanel(h, context) {\n var data = {};\n\n data = getPanelData(context);\n\n return h(\n 'scrollPanel',\n data,\n [getPanelChildren(h, context)]\n );\n }\n\n function getPanelChildren(h, context) {\n var viewStyle = {};\n var data = {\n style: viewStyle,\n ref: 'scrollContent',\n class: '__view'\n };\n var _customContent = context.$slots['scroll-content'];\n\n if (context.mergedOptions.scrollPanel.scrollingX) {\n viewStyle.width = getComplitableStyle('width', 'fit-content');\n } else {\n data.style['width'] = '100%';\n }\n\n if (context.mergedOptions.scrollPanel.padding) {\n data.style.paddingRight = context.mergedOptions.rail.size;\n }\n\n if (_customContent) {\n return insertChildrenIntoSlot(h, _customContent, context.$slots.default, data);\n }\n\n return h(\n 'div',\n data,\n [context.$slots.default]\n );\n }\n\n function getPanelData$1(context) {\n // scrollPanel data start\n var data = {\n ref: 'scrollPanel',\n style: {},\n class: [],\n props: {\n ops: context.mergedOptions.scrollPanel\n }\n };\n\n data.class.push('__slide');\n\n if (context.mergedOptions.scrollPanel.scrollingX && !context.refreshLoad) {\n var width = getComplitableStyle('width', 'fit-content');\n if (width) {\n data.style['width'] = width;\n } /* istanbul ignore next */else {\n data['display'] = 'inline-block';\n }\n } else {\n data.style['width'] = '100%';\n }\n\n if (context.mergedOptions.scrollPanel.padding) {\n data.style.paddingRight = context.mergedOptions.rail.size;\n }\n\n return data;\n }\n\n function getPanelChildren$1(h, context) {\n var renderChildren = getVnodeInfo(context.$slots['scroll-panel']).ch || context.$slots.default;\n\n /* istanbul ignore if */\n if (!renderChildren) {\n context.$slots.default = renderChildren = [];\n }\n\n for (var i = 0; i < renderChildren.length; i++) {\n var key = renderChildren[i].key;\n if (key === __LOAD_DOM_NAME || key === __REFRESH_DOM_NAME) {\n renderChildren.splice(i, 1);\n i--;\n }\n }\n\n // handle refresh\n if (context.mergedOptions.vuescroll.pullRefresh.enable) {\n renderChildren.unshift(h(\n 'div',\n {\n 'class': { __refresh: true, __none: !context.refrehDomVisiable },\n ref: __REFRESH_DOM_NAME,\n key: __REFRESH_DOM_NAME\n },\n [createTipDom(h, context, 'refresh', context.pullRefreshTip)]\n ));\n }\n\n // handle load\n if (context.mergedOptions.vuescroll.pushLoad.enable) {\n renderChildren.push(h(\n 'div',\n {\n ref: __LOAD_DOM_NAME,\n key: __LOAD_DOM_NAME,\n 'class': { __load: true, __none: !context.loadDomVisiable }\n },\n [createTipDom(h, context, 'load', context.pushLoadTip)]\n ));\n }\n\n return context.$slots.default;\n }\n\n// Create load or refresh tip dom of each stages\n function createTipDom(h, context, type, tip) {\n var stage = context.vuescroll.state[type + 'Stage'];\n var dom = null;\n // Return user specified animation dom\n /* istanbul ignore if */\n if (dom = context.$slots[type + '-' + stage]) {\n return dom;\n }\n\n switch (stage) {\n // The dom will show at deactive stage\n case 'deactive':\n case 'active':\n {\n var className = 'active';\n if (stage == 'deactive') {\n className += ' deactive';\n }\n\n dom = h(\n 'svg',\n {\n 'class': className,\n attrs: { version: '1.1',\n xmlns: 'http://www.w3.org/2000/svg',\n xmlnsXlink: 'http://www.w3.org/1999/xlink',\n x: '0px',\n y: '0px',\n viewBox: '0 0 1000 1000',\n 'enable-background': 'new 0 0 1000 1000',\n xmlSpace: 'preserve'\n }\n },\n [h('metadata', [' Svg Vector Icons : http://www.sfont.cn ']), h('g', [h(\n 'g',\n {\n attrs: { transform: 'matrix(1 0 0 -1 0 1008)' }\n },\n [h('path', {\n attrs: { d: 'M10,543l490,455l490-455L885,438L570,735.5V18H430v717.5L115,438L10,543z' }\n })]\n )])]\n );\n }\n break;\n case 'start':\n dom = h(\n 'svg',\n {\n attrs: { viewBox: '0 0 50 50' },\n 'class': 'start' },\n [h('circle', {\n attrs: { stroke: 'true', cx: '25', cy: '25', r: '20' },\n 'class': 'bg-path' }), h('circle', {\n attrs: { cx: '25', cy: '25', r: '20' },\n 'class': 'active-path' })]\n );\n break;\n case 'beforeDeactive':\n dom = h(\n 'svg',\n {\n attrs: {\n viewBox: '0 0 1024 1024',\n version: '1.1',\n xmlns: 'http://www.w3.org/2000/svg',\n 'p-id': '3562'\n }\n },\n [h('path', {\n attrs: {\n d: 'M512 0C229.706831 0 0 229.667446 0 512s229.667446 512 512 512c282.293169 0 512-229.667446 512-512S794.332554 0 512 0z m282.994215 353.406031L433.2544 715.145846a31.484062 31.484062 0 0 1-22.275938 9.231754h-0.4096a31.586462 31.586462 0 0 1-22.449231-9.814646L228.430769 546.327631a31.507692 31.507692 0 0 1 45.701908-43.386093l137.4208 144.785724L750.442338 308.854154a31.507692 31.507692 0 1 1 44.551877 44.551877z',\n fill: '',\n 'p-id': '3563'\n }\n })]\n );\n break;\n }\n return [dom, tip];\n }\n\n /**\n * create a scrollPanel\n *\n * @param {any} size\n * @param {any} context\n * @returns\n */\n function createPanel$1(h, context) {\n var data = getPanelData$1(context);\n\n return h(\n 'scrollPanel',\n data,\n [getPanelChildren$1(h, context)]\n );\n }\n\n// begin importing\n /**\n * create a scrollPanel\n *\n * @param {any} size\n * @param {any} vm\n * @returns\n */\n function createPanel$2(h, vm) {\n if (vm.mode == 'native') {\n return createPanel(h, vm);\n } else if (vm.mode == 'slide') {\n return createPanel$1(h, vm);\n }\n }\n\n var slideApi = {\n methods: {\n slideScrollTo: function slideScrollTo(x, y, animate, force) {\n if (typeof x === 'undefined') {\n x = this.vuescroll.state.internalScrollLeft || 0;\n } else {\n x = getNumericValue(x, this.scroller.__maxScrollLeft);\n }\n if (typeof y === 'undefined') {\n y = this.vuescroll.state.internalScrollTop || 0;\n } else {\n y = getNumericValue(y, this.scroller.__maxScrollTop);\n }\n\n this.scroller.scrollTo(x, y, animate, undefined, force);\n },\n zoomBy: function zoomBy(factor, animate, originLeft, originTop, callback) {\n if (!this.scroller) {\n warn('zoomBy and zoomTo are only for slide mode!');\n return;\n }\n this.scroller.zoomBy(factor, animate, originLeft, originTop, callback);\n },\n zoomTo: function zoomTo(level) {\n var animate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var originLeft = arguments[2];\n var originTop = arguments[3];\n var callback = arguments[4];\n\n if (!this.scroller) {\n warn('zoomBy and zoomTo are only for slide mode!');\n return;\n }\n this.scroller.zoomTo(level, animate, originLeft, originTop, callback);\n },\n getCurrentPage: function getCurrentPage() {\n if (!this.scroller || !this.mergedOptions.vuescroll.paging) {\n warn('getCurrentPage and goToPage are only for slide mode and paging is enble!');\n return;\n }\n return this.scroller.getCurrentPage();\n },\n goToPage: function goToPage(dest) {\n var animate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!this.scroller || !this.mergedOptions.vuescroll.paging) {\n warn('getCurrentPage and goToPage are only for slide mode and paging is enble!');\n return;\n }\n this.scroller.goToPage(dest, animate);\n },\n triggerRefreshOrLoad: function triggerRefreshOrLoad(type) {\n if (!this.scroller) {\n warn('You can only use triggerRefreshOrLoad in slide mode!');\n return;\n }\n\n var isRefresh = this.mergedOptions.vuescroll.pullRefresh.enable;\n var isLoad = this.mergedOptions.vuescroll.pushLoad.enable;\n\n if (type == 'refresh' && !isRefresh) {\n warn('refresh must be enabled!');\n return;\n } else if (type == 'load' && !isLoad) {\n warn('load must be enabled and content\\'s height > container\\'s height!');\n return;\n } else if (type !== 'refresh' && type !== 'load') {\n warn('param must be one of load and refresh!');\n return;\n }\n\n /* istanbul ignore if */\n if (this.vuescroll.state[type + 'Stage'] == 'start') {\n return;\n }\n\n this.scroller.triggerRefreshOrLoad(type);\n return true;\n },\n getCurrentviewDomSlide: function getCurrentviewDomSlide() {\n var parent = this.scrollPanelElm;\n var domFragment = getCurrentViewportDom(parent, this.$el);\n return domFragment;\n }\n }\n };\n\n var api$1 = {\n // mix slide and nitive modes apis.\n mixins: [slideApi, nativeApi],\n methods: {\n // private api\n internalScrollTo: function internalScrollTo(destX, destY, animate, force) {\n if (this.mode == 'native') {\n this.nativeScrollTo(destX, destY, animate);\n }\n // for non-native we use scroller's scorllTo\n else if (this.mode == 'slide') {\n this.slideScrollTo(destX, destY, animate, force);\n }\n },\n getCurrentviewDom: function getCurrentviewDom() {\n return this.mode == 'slide' ? this.getCurrentviewDomSlide() : this.getCurrentviewDomNative();\n }\n }\n };\n\n /*\n * Scroller\n * http://github.com/zynga/scroller\n *\n * modified by wangyi7099\n *\n * Copyright 2011, Zynga Inc.\n * Licensed under the MIT License.\n * https://raw.github.com/zynga/scroller/master/MIT-LICENSE.txt\n *\n * Based on the work of: Unify Project (unify-project.org)\n * http://unify-project.org\n * Copyright 2011, Deutsche Telekom AG\n * License: MIT + Apache (V2)\n */\n var animatingMethod = null;\n\n var noAnimatingMethod = null;\n\n function Scroller(callback, options) {\n this.__callback = callback;\n\n this.options = {\n /** Enable scrolling on x-axis */\n scrollingX: true,\n\n /** Enable scrolling on y-axis */\n scrollingY: true,\n\n /** Enable animations for deceleration, snap back, zooming and scrolling */\n animating: true,\n\n /** duration for animations triggered by scrollTo/zoomTo */\n animationDuration: 250,\n\n /** Enable bouncing (content can be slowly moved outside and jumps back after releasing) */\n bouncing: true,\n\n /** Enable locking to the main axis if user moves only slightly on one of them at start */\n locking: true,\n\n /** Enable pagination mode (switching between full page content panes) */\n paging: false,\n\n /** Enable snapping of content to a configured pixel grid */\n snapping: false,\n\n /** Enable zooming of content via API, fingers and mouse wheel */\n zooming: false,\n\n /** Minimum zoom level */\n minZoom: 0.5,\n\n /** Maximum zoom level */\n maxZoom: 3,\n\n /** Multiply or decrease scrolling speed **/\n speedMultiplier: 1,\n\n /** Callback that is fired on the later of touch end or deceleration end,\n provided that another scrolling action has not begun. Used to know\n when to fade out a scrollbar. */\n scrollingComplete: NOOP,\n\n animatingEasing: 'easeOutCubic',\n\n noAnimatingEasing: 'easeInOutCubic',\n\n /** This configures the amount of change applied to deceleration when reaching boundaries **/\n penetrationDeceleration: 0.03,\n\n /** This configures the amount of change applied to acceleration when reaching boundaries **/\n penetrationAcceleration: 0.08\n };\n\n for (var key in options) {\n this.options[key] = options[key];\n }\n\n animatingMethod = createEasingFunction(this.options.animatingEasing, easingPattern);\n noAnimatingMethod = createEasingFunction(this.options.noAnimatingEasing, easingPattern);\n }\n\n var members = {\n /*\n ---------------------------------------------------------------------------\n INTERNAL FIELDS :: STATUS\n ---------------------------------------------------------------------------\n */\n\n /** {Boolean} Whether only a single finger is used in touch handling */\n __isSingleTouch: false,\n\n /** {Boolean} Whether a touch event sequence is in progress */\n __isTracking: false,\n\n /** {Boolean} Whether a deceleration animation went to completion. */\n __didDecelerationComplete: false,\n\n /**\n * {Boolean} Whether a gesture zoom/rotate event is in progress. Activates when\n * a gesturestart event happens. This has higher priority than dragging.\n */\n __isGesturing: false,\n\n /**\n * {Boolean} Whether the user has moved by such a distance that we have enabled\n * dragging mode. Hint: It's only enabled after some pixels of movement to\n * not interrupt with clicks etc.\n */\n __isDragging: false,\n\n /**\n * {Boolean} Not touching and dragging anymore, and smoothly animating the\n * touch sequence using deceleration.\n */\n __isDecelerating: false,\n\n /**\n * {Boolean} Smoothly animating the currently configured change\n */\n __isAnimating: false,\n\n /*\n ---------------------------------------------------------------------------\n INTERNAL FIELDS :: DIMENSIONS\n ---------------------------------------------------------------------------\n */\n\n /** {Integer} Available outer left position (from document perspective) */\n __clientLeft: 0,\n\n /** {Integer} Available outer top position (from document perspective) */\n __clientTop: 0,\n\n /** {Integer} Available outer width */\n __clientWidth: 0,\n\n /** {Integer} Available outer height */\n __clientHeight: 0,\n\n /** {Integer} Outer width of content */\n __contentWidth: 0,\n\n /** {Integer} Outer height of content */\n __contentHeight: 0,\n\n /** {Integer} Snapping width for content */\n __snapWidth: 100,\n\n /** {Integer} Snapping height for content */\n __snapHeight: 100,\n\n /** {Integer} Height to assign to refresh area */\n __refreshHeight: null,\n /** {Integer} Height to assign to refresh area */\n __loadHeight: null,\n /** {Boolean} Whether the refresh process is enabled when the event is released now */\n __refreshActive: false,\n\n /** {Function} Callback to execute on activation. This is for signalling the user about a refresh is about to happen when he release */\n __refreshActivate: null,\n\n __refreshBeforeDeactivate: null,\n\n /** {Function} Callback to execute on deactivation. This is for signalling the user about the refresh being cancelled */\n __refreshDeactivate: null,\n\n /** {Function} Callback to execute to start the actual refresh. Call {@link #refreshFinish} when done */\n __refreshStart: null,\n\n __loadActive: null,\n\n __loadActivate: null,\n\n __loadBeforeDeactivate: null,\n\n __loadDeactivate: null,\n\n __loadStart: null,\n /** {Number} Zoom level */\n __zoomLevel: 1,\n\n /** {Number} Scroll position on x-axis */\n __scrollLeft: 0,\n\n /** {Number} Scroll position on y-axis */\n __scrollTop: 0,\n\n /** {Integer} Maximum allowed scroll position on x-axis */\n __maxScrollLeft: 0,\n\n /** {Integer} Maximum allowed scroll position on y-axis */\n __maxScrollTop: 0,\n\n /* {Number} Scheduled left position (final position when animating) */\n __scheduledLeft: 0,\n\n /* {Number} Scheduled top position (final position when animating) */\n __scheduledTop: 0,\n\n /* {Number} Scheduled zoom level (final scale when animating) */\n __scheduledZoom: 0,\n\n /**\n * current page\n */\n __currentPageX: null,\n\n __currentPageY: null,\n\n /**\n * total page\n */\n __totalXPage: null,\n\n __totalYPage: null,\n /*\n ---------------------------------------------------------------------------\n INTERNAL FIELDS :: LAST POSITIONS\n ---------------------------------------------------------------------------\n */\n /** whether the scroller is disabled or not */\n __disable: false,\n /** {Number} Left position of finger at start */\n __lastTouchLeft: null,\n\n /** {Number} Top position of finger at start */\n __lastTouchTop: null,\n\n /** {Date} Timestamp of last move of finger. Used to limit tracking range for deceleration speed. */\n __lastTouchMove: null,\n\n /** {Array} List of positions, uses three indexes for each state: left, top, timestamp */\n __positions: null,\n\n /*\n ---------------------------------------------------------------------------\n INTERNAL FIELDS :: DECELERATION SUPPORT\n ---------------------------------------------------------------------------\n */\n\n /** {Integer} Minimum left scroll position during deceleration */\n __minDecelerationScrollLeft: null,\n\n /** {Integer} Minimum top scroll position during deceleration */\n __minDecelerationScrollTop: null,\n\n /** {Integer} Maximum left scroll position during deceleration */\n __maxDecelerationScrollLeft: null,\n\n /** {Integer} Maximum top scroll position during deceleration */\n __maxDecelerationScrollTop: null,\n\n /** {Number} Current factor to modify horizontal scroll position with on every step */\n __decelerationVelocityX: null,\n\n /** {Number} Current factor to modify vertical scroll position with on every step */\n __decelerationVelocityY: null,\n\n /*\n ---------------------------------------------------------------------------\n PUBLIC API\n ---------------------------------------------------------------------------\n */\n\n /**\n * Configures the dimensions of the client (outer) and content (inner) elements.\n * Requires the available space for the outer element and the outer size of the inner element.\n * All values which are falsy (null or zero etc.) are ignored and the old value is kept.\n *\n * @param clientWidth {Integer ? null} Inner width of outer element\n * @param clientHeight {Integer ? null} Inner height of outer element\n * @param contentWidth {Integer ? null} Outer width of inner element\n * @param contentHeight {Integer ? null} Outer height of inner element\n */\n setDimensions: function setDimensions(clientWidth, clientHeight, contentWidth, contentHeight, animate) {\n var noScroll = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;\n\n var self = this;\n\n // Only update values which are defined\n if (clientWidth === +clientWidth) {\n self.__clientWidth = clientWidth;\n }\n\n if (clientHeight === +clientHeight) {\n self.__clientHeight = clientHeight;\n }\n\n if (contentWidth === +contentWidth) {\n self.__contentWidth = contentWidth;\n }\n\n if (contentHeight === +contentHeight) {\n self.__contentHeight = contentHeight;\n }\n\n // Refresh maximums\n self.__computeScrollMax();\n\n if (!noScroll) {\n // Refresh scroll position\n self.scrollTo(self.__scrollLeft, self.__scrollTop, animate);\n }\n },\n\n /**\n * Sets the client coordinates in relation to the document.\n *\n * @param left {Integer ? 0} Left position of outer element\n * @param top {Integer ? 0} Top position of outer element\n */\n setPosition: function setPosition(left, top) {\n var self = this;\n\n self.__clientLeft = left || 0;\n self.__clientTop = top || 0;\n },\n\n /**\n * Configures the snapping (when snapping is active)\n *\n * @param width {Integer} Snapping width\n * @param height {Integer} Snapping height\n */\n setSnapSize: function setSnapSize(width, height) {\n var self = this;\n\n self.__snapWidth = width;\n self.__snapHeight = height;\n },\n\n /**\n * Activates pull-to-refresh. A special zone on the top of the list to start a list refresh whenever\n * the user event is released during visibility of this zone. This was introduced by some apps on iOS like\n * the official Twitter client.\n *\n * @param height {Integer} Height of pull-to-refresh zone on top of rendered list\n * @param activateCallback {Function} Callback to execute on activation. This is for signalling the user about a refresh is about to happen when he release.\n * @param deactivateCallback {Function} Callback to execute on deactivation. This is for signalling the user about the refresh being cancelled.\n * @param startCallback {Function} Callback to execute to start the real async refresh action. Call {@link #finishPullToRefresh} after finish of refresh.\n */\n activatePullToRefresh: function activatePullToRefresh(height, _ref) {\n var activateCallback = _ref.activateCallback,\n deactivateCallback = _ref.deactivateCallback,\n startCallback = _ref.startCallback,\n beforeDeactivateCallback = _ref.beforeDeactivateCallback,\n beforeDeactiveEnd = _ref.beforeDeactiveEnd;\n\n var self = this;\n\n self.__refreshHeight = height;\n self.__refreshActivate = activateCallback;\n self.__refreshBeforeDeactivate = beforeDeactivateCallback;\n self.__refreshBeforeDeactiveEnd = beforeDeactiveEnd;\n self.__refreshDeactivate = deactivateCallback;\n self.__refreshStart = startCallback;\n },\n activatePushToLoad: function activatePushToLoad(height, _ref2) {\n var activateCallback = _ref2.activateCallback,\n deactivateCallback = _ref2.deactivateCallback,\n startCallback = _ref2.startCallback,\n beforeDeactivateCallback = _ref2.beforeDeactivateCallback,\n beforeDeactiveEnd = _ref2.beforeDeactiveEnd;\n\n var self = this;\n\n self.__loadHeight = height;\n self.__loadActivate = activateCallback;\n self.__loadBeforeDeactivate = beforeDeactivateCallback;\n self.__loadBeforeDeactiveEnd = beforeDeactiveEnd;\n self.__loadDeactivate = deactivateCallback;\n self.__loadStart = startCallback;\n },\n\n /**\n * Starts pull-to-refresh manually.\n */\n triggerRefreshOrLoad: function triggerRefreshOrLoad() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'refresh';\n\n var wasDecelerating = this.__isDecelerating;\n if (wasDecelerating) {\n core.effect.Animate.stop(wasDecelerating);\n this.__isDecelerating = false;\n }\n // Use publish instead of scrollTo to allow scrolling to out of boundary position\n // We don't need to normalize scrollLeft, zoomLevel, etc. here because we only y-scrolling when pull-to-refresh is enabled\n if (type == 'refresh') {\n this.__publish(this.__scrollLeft, -this.__refreshHeight, this.__zoomLevel, true);\n if (this.__refreshStart) {\n this.__refreshStart();\n this.__refreshActive = true;\n }\n } else if (type == 'load') {\n this.__publish(this.__scrollLeft, this.__maxScrollTop + this.__loadHeight, this.__zoomLevel, true);\n if (this.__loadStart) {\n this.__loadStart();\n this.__loadActive = true;\n }\n }\n },\n\n /**\n * Signalizes that pull-to-refresh is finished.\n */\n finishRefreshOrLoad: function finishRefreshOrLoad() {\n var self = this;\n\n if (self.__refreshBeforeDeactivate && self.__refreshActive) {\n self.__refreshActive = false;\n self.__refreshBeforeDeactivate(function () {\n if (self.__refreshBeforeDeactiveEnd) {\n self.__refreshBeforeDeactiveEnd();\n }\n self.__refreshBeforeDeactiveStarted = true;\n self.scrollTo(self.__scrollLeft, self.__scrollTop, true);\n });\n } else if (self.__refreshDeactivate && self.__refreshActive) {\n self.__refreshActive = false;\n self.__refreshDeactivate();\n self.scrollTo(self.__scrollLeft, self.__scrollTop, true);\n }\n\n if (self.__loadBeforeDeactivate && self.__loadActive) {\n self.__loadActive = false;\n self.__loadBeforeDeactivate(function () {\n if (self.__loadBeforeDeactiveEnd) {\n self.__loadBeforeDeactiveEnd();\n }\n self.__loadBeforeDeactiveStarted = true;\n self.scrollTo(self.__scrollLeft, self.__scrollTop, true);\n });\n } else if (self.__loadDeactivate && self.__loadActive) {\n self.__loadActive = false;\n self.__loadDeactivate();\n self.scrollTo(self.__scrollLeft, self.__scrollTop, true);\n }\n },\n\n /**\n * Returns the scroll position and zooming values\n *\n * @return {Map} `left` and `top` scroll position and `zoom` level\n */\n getValues: function getValues() {\n var self = this;\n\n return {\n left: self.__scrollLeft,\n top: self.__scrollTop,\n zoom: self.__zoomLevel\n };\n },\n\n /**\n * Returns the maximum scroll values\n *\n * @return {Map} `left` and `top` maximum scroll values\n */\n getScrollMax: function getScrollMax() {\n var self = this;\n\n return {\n left: self.__maxScrollLeft,\n top: self.__maxScrollTop\n };\n },\n\n /**\n * Zooms to the given level. Supports optional animation. Zooms\n * the center when no coordinates are given.\n *\n * @param level {Number} Level to zoom to\n * @param animate {Boolean ? false} Whether to use animation\n * @param originLeft {Number ? null} Zoom in at given left coordinate\n * @param originTop {Number ? null} Zoom in at given top coordinate\n * @param callback {Function ? null} A callback that gets fired when the zoom is complete.\n */\n zoomTo: function zoomTo(level, animate, originLeft, originTop, callback) {\n var self = this;\n\n if (!self.options.zooming) {\n throw new Error('Zooming is not enabled!');\n }\n\n // Add callback if exists\n if (callback) {\n self.__zoomComplete = callback;\n }\n\n // Stop deceleration\n if (self.__isDecelerating) {\n core.effect.Animate.stop(self.__isDecelerating);\n self.__isDecelerating = false;\n }\n\n var oldLevel = self.__zoomLevel;\n\n // Normalize input origin to center of viewport if not defined\n if (originLeft == null) {\n originLeft = self.__clientWidth / 2;\n }\n\n if (originTop == null) {\n originTop = self.__clientHeight / 2;\n }\n\n // Limit level according to configuration\n level = Math.max(Math.min(level, self.options.maxZoom), self.options.minZoom);\n\n // Recompute maximum values while temporary tweaking maximum scroll ranges\n self.__computeScrollMax(level);\n\n // Recompute left and top coordinates based on new zoom level\n var left = (originLeft + self.__scrollLeft) * level / oldLevel - originLeft;\n var top = (originTop + self.__scrollTop) * level / oldLevel - originTop;\n\n // Limit x-axis\n if (left > self.__maxScrollLeft) {\n left = self.__maxScrollLeft;\n } else if (left < 0) {\n left = 0;\n }\n\n // Limit y-axis\n if (top > self.__maxScrollTop) {\n top = self.__maxScrollTop;\n } else if (top < 0) {\n top = 0;\n }\n\n // Push values out\n self.__publish(left, top, level, animate);\n },\n\n /**\n * Zooms the content by the given factor.\n *\n * @param factor {Number} Zoom by given factor\n * @param animate {Boolean ? false} Whether to use animation\n * @param originLeft {Number ? 0} Zoom in at given left coordinate\n * @param originTop {Number ? 0} Zoom in at given top coordinate\n * @param callback {Function ? null} A callback that gets fired when the zoom is complete.\n */\n zoomBy: function zoomBy(factor, animate, originLeft, originTop, callback) {\n var self = this;\n\n self.zoomTo(self.__zoomLevel * factor, animate, originLeft, originTop, callback);\n },\n\n /**\n * Scrolls to the given position. Respect limitations and snapping automatically.\n *\n * @param left {Number?null} Horizontal scroll position, keeps current if value is null
\n * @param top {Number?null} Vertical scroll position, keeps current if value isnull
\n * @param animate {Boolean?false} Whether the scrolling should happen using an animation\n * @param zoom {Number?null} Zoom level to go to\n */\n scrollTo: function scrollTo(left, top, animate, zoom, force) {\n var self = this;\n\n // Stop deceleration\n if (self.__isDecelerating) {\n core.effect.Animate.stop(self.__isDecelerating);\n self.__isDecelerating = false;\n }\n\n // Correct coordinates based on new zoom level\n if (zoom != null && zoom !== self.__zoomLevel) {\n if (!self.options.zooming) {\n throw new Error('Zooming is not enabled!');\n }\n\n left *= zoom;\n top *= zoom;\n\n // Recompute maximum values while temporary tweaking maximum scroll ranges\n self.__computeScrollMax(zoom);\n } else {\n // Keep zoom when not defined\n zoom = self.__zoomLevel;\n }\n\n if (!self.options.scrollingX && !force) {\n left = self.__scrollLeft;\n } else {\n if (self.options.paging) {\n left = Math.round(left / self.__clientWidth) * self.__clientWidth;\n } else if (self.options.snapping) {\n left = Math.round(left / self.__snapWidth) * self.__snapWidth;\n }\n }\n\n if (!self.options.scrollingY && !force) {\n top = self.__scrollTop;\n } else {\n if (self.options.paging) {\n top = Math.round(top / self.__clientHeight) * self.__clientHeight;\n } else if (self.options.snapping) {\n top = Math.round(top / self.__snapHeight) * self.__snapHeight;\n }\n }\n\n if (!force) {\n // Limit for allowed ranges\n left = Math.max(Math.min(self.__maxScrollLeft, left), 0);\n top = Math.max(Math.min(self.__maxScrollTop, top), 0);\n }\n\n // Don't animate when no change detected, still call publish to make sure\n // that rendered position is really in-sync with internal data\n if (left === self.__scrollLeft && top === self.__scrollTop) {\n animate = false;\n }\n\n // Publish new values\n if (!self.__isTracking) {\n self.__publish(left, top, zoom, animate);\n }\n },\n\n /**\n * Scroll by the given offset\n *\n * @param left {Number ? 0} Scroll x-axis by given offset\n * @param top {Number ? 0} Scroll x-axis by given offset\n * @param animate {Boolean ? false} Whether to animate the given change\n */\n scrollBy: function scrollBy(left, top, animate) {\n var self = this;\n\n var startLeft = self.__isAnimating ? self.__scheduledLeft : self.__scrollLeft;\n var startTop = self.__isAnimating ? self.__scheduledTop : self.__scrollTop;\n\n self.scrollTo(startLeft + (left || 0), startTop + (top || 0), animate);\n },\n getCurrentPage: function getCurrentPage() {\n this.__computePage();\n return {\n x: this.__currentPageX,\n y: this.__currentPageY\n };\n },\n goToPage: function goToPage(_ref3, animate) {\n var x = _ref3.x,\n y = _ref3.y;\n\n if (isNaN(x)) {\n x = 1;\n }\n if (isNaN(y)) {\n y = 1;\n }\n this.scrollTo((x - 1) * this.__clientWidth, (y - 1) * this.__clientHeight, animate);\n },\n\n\n /*\n ---------------------------------------------------------------------------\n EVENT CALLBACKS\n ---------------------------------------------------------------------------\n */\n\n /**\n * Mouse wheel handler for zooming support\n */\n doMouseZoom: function doMouseZoom(wheelDelta, timeStamp, pageX, pageY) {\n var self = this;\n var change = wheelDelta > 0 ? 0.97 : 1.03;\n\n return self.zoomTo(self.__zoomLevel * change, false, pageX - self.__clientLeft, pageY - self.__clientTop);\n },\n\n /**\n * Touch start handler for scrolling support\n */\n doTouchStart: function doTouchStart(touches, timeStamp) {\n // Array-like check is enough here\n if (touches.length == null) {\n throw new Error('Invalid touch list: ' + touches);\n }\n\n if (timeStamp instanceof Date) {\n timeStamp = timeStamp.valueOf();\n }\n if (typeof timeStamp !== 'number') {\n throw new Error('Invalid timestamp value: ' + timeStamp);\n }\n\n var self = this;\n\n // Reset interruptedAnimation flag\n self.__interruptedAnimation = true;\n\n // Stop deceleration\n if (self.__isDecelerating) {\n core.effect.Animate.stop(self.__isDecelerating);\n self.__isDecelerating = false;\n self.__interruptedAnimation = true;\n }\n\n // Stop animation\n if (self.__isAnimating) {\n core.effect.Animate.stop(self.__isAnimating);\n self.__isAnimating = false;\n self.__interruptedAnimation = true;\n }\n\n // Use center point when dealing with two fingers\n var currentTouchLeft, currentTouchTop;\n var isSingleTouch = touches.length === 1;\n if (isSingleTouch) {\n currentTouchLeft = touches[0].pageX;\n currentTouchTop = touches[0].pageY;\n } else {\n currentTouchLeft = Math.abs(touches[0].pageX + touches[1].pageX) / 2;\n currentTouchTop = Math.abs(touches[0].pageY + touches[1].pageY) / 2;\n }\n\n // Store initial positions\n self.__initialTouchLeft = currentTouchLeft;\n self.__initialTouchTop = currentTouchTop;\n\n // Store current zoom level\n self.__zoomLevelStart = self.__zoomLevel;\n\n // Store initial touch positions\n self.__lastTouchLeft = currentTouchLeft;\n self.__lastTouchTop = currentTouchTop;\n\n // Store initial move time stamp\n self.__lastTouchMove = timeStamp;\n\n // Reset initial scale\n self.__lastScale = 1;\n\n // Reset locking flags\n self.__enableScrollX = !isSingleTouch && self.options.scrollingX;\n self.__enableScrollY = !isSingleTouch && self.options.scrollingY;\n\n // Reset tracking flag\n self.__isTracking = true;\n\n // Reset deceleration complete flag\n self.__didDecelerationComplete = false;\n\n // Dragging starts directly with two fingers, otherwise lazy with an offset\n self.__isDragging = !isSingleTouch;\n\n // Some features are in multi touch scenarios\n self.__isSingleTouch = isSingleTouch;\n\n // Clearing data structure\n self.__positions = [];\n },\n\n /**\n * Touch move handler for scrolling support\n */\n doTouchMove: function doTouchMove(touches, timeStamp, scale) {\n // Array-like check is enough here\n if (touches.length == null) {\n throw new Error('Invalid touch list: ' + touches);\n }\n\n if (timeStamp instanceof Date) {\n timeStamp = timeStamp.valueOf();\n }\n if (typeof timeStamp !== 'number') {\n throw new Error('Invalid timestamp value: ' + timeStamp);\n }\n\n var self = this;\n\n // Ignore event when tracking is not enabled (event might be outside of element)\n if (!self.__isTracking) {\n return;\n }\n\n var currentTouchLeft, currentTouchTop;\n\n // Compute move based around of center of fingers\n if (touches.length === 2) {\n currentTouchLeft = Math.abs(touches[0].pageX + touches[1].pageX) / 2;\n currentTouchTop = Math.abs(touches[0].pageY + touches[1].pageY) / 2;\n } else {\n currentTouchLeft = touches[0].pageX;\n currentTouchTop = touches[0].pageY;\n }\n\n var positions = self.__positions;\n\n // Are we already is dragging mode?\n if (self.__isDragging) {\n // Compute move distance\n var moveX = currentTouchLeft - self.__lastTouchLeft;\n var moveY = currentTouchTop - self.__lastTouchTop;\n\n // Read previous scroll position and zooming\n var scrollLeft = self.__scrollLeft;\n var scrollTop = self.__scrollTop;\n var level = self.__zoomLevel;\n\n // Work with scaling\n if (scale != null && self.options.zooming) {\n var oldLevel = level;\n\n // Recompute level based on previous scale and new scale\n level = level / self.__lastScale * scale;\n\n // Limit level according to configuration\n level = Math.max(Math.min(level, self.options.maxZoom), self.options.minZoom);\n\n // Only do further compution when change happened\n if (oldLevel !== level) {\n // Compute relative event position to container\n var currentTouchLeftRel = currentTouchLeft - self.__clientLeft;\n var currentTouchTopRel = currentTouchTop - self.__clientTop;\n\n // Recompute left and top coordinates based on new zoom level\n scrollLeft = (currentTouchLeftRel + scrollLeft) * level / oldLevel - currentTouchLeftRel;\n scrollTop = (currentTouchTopRel + scrollTop) * level / oldLevel - currentTouchTopRel;\n\n // Recompute max scroll values\n self.__computeScrollMax(level);\n }\n }\n\n var shouldBounce = false;\n\n if (self.__enableScrollX) {\n scrollLeft -= moveX * this.options.speedMultiplier;\n var maxScrollLeft = self.__maxScrollLeft;\n\n if (scrollLeft > maxScrollLeft || scrollLeft < 0) {\n // Slow down on the edges\n if (self.options.bouncing) {\n if (Array.isArray(self.options.bouncing)) {\n if (scrollLeft > maxScrollLeft && self.__enableBounce('right') || scrollLeft < 0 && self.__enableBounce('left')) {\n shouldBounce = true;\n }\n } else {\n shouldBounce = true;\n }\n }\n\n if (shouldBounce) {\n scrollLeft += moveX / 2 * this.options.speedMultiplier;\n } else if (scrollLeft > maxScrollLeft) {\n scrollLeft = maxScrollLeft;\n } else {\n scrollLeft = 0;\n }\n }\n }\n\n // Compute new vertical scroll position\n if (self.__enableScrollY) {\n scrollTop -= moveY * this.options.speedMultiplier;\n var maxScrollTop = self.__maxScrollTop;\n\n if (scrollTop > maxScrollTop || scrollTop < 0) {\n shouldBounce = false;\n // Slow down on the edges\n if (self.options.bouncing) {\n if (Array.isArray(self.options.bouncing)) {\n if (scrollTop > maxScrollTop && self.__enableBounce('bottom') || scrollTop < 0 && self.__enableBounce('top')) {\n shouldBounce = true;\n }\n } else {\n shouldBounce = true;\n }\n }\n\n if (shouldBounce) {\n scrollTop += moveY / 2 * this.options.speedMultiplier;\n\n // Support pull-to-refresh (only when only y is scrollable)\n if (!self.__enableScrollX && (self.__refreshHeight != null || self.__loadHeight != null)) {\n if (!self.__refreshActive && scrollTop <= -self.__refreshHeight) {\n self.__refreshActive = true;\n if (self.__refreshActivate) {\n self.__refreshActivate();\n }\n } else if (self.__refreshActive && scrollTop > -self.__refreshHeight) {\n self.__refreshActive = false;\n if (self.__refreshDeactivate) {\n self.__refreshDeactivate();\n }\n }\n // handle for push-load\n else if (!self.__loadActive && scrollTop >= self.__maxScrollTop + self.__loadHeight && self.__loadHeight > 0) {\n self.__loadActive = true;\n if (self.__loadActivate) {\n self.__loadActivate();\n }\n } else if (self.__loadActive && scrollTop < self.__maxScrollTop + self.__loadHeight) {\n self.__loadActive = false;\n if (self.__loadDeactivate) {\n self.__loadDeactivate();\n }\n }\n }\n } else if (scrollTop > maxScrollTop) {\n scrollTop = maxScrollTop;\n } else {\n scrollTop = 0;\n }\n }\n }\n\n // Keep list from growing infinitely (holding min 10, max 20 measure points)\n if (positions.length > 60) {\n positions.splice(0, 30);\n }\n\n // Track scroll movement for decleration\n positions.push(scrollLeft, scrollTop, timeStamp);\n\n // Sync scroll position\n self.__publish(scrollLeft, scrollTop, level);\n\n // Otherwise figure out whether we are switching into dragging mode now.\n } else {\n var minimumTrackingForScroll = self.options.locking ? 3 : 0;\n var minimumTrackingForDrag = 5;\n\n var distanceX = Math.abs(currentTouchLeft - self.__initialTouchLeft);\n var distanceY = Math.abs(currentTouchTop - self.__initialTouchTop);\n\n self.__enableScrollX = self.options.scrollingX && distanceX >= minimumTrackingForScroll;\n self.__enableScrollY = self.options.scrollingY && distanceY >= minimumTrackingForScroll;\n\n positions.push(self.__scrollLeft, self.__scrollTop, timeStamp);\n\n self.__isDragging = (self.__enableScrollX || self.__enableScrollY) && (distanceX >= minimumTrackingForDrag || distanceY >= minimumTrackingForDrag);\n if (self.__isDragging) {\n self.__interruptedAnimation = false;\n }\n }\n\n // Update last touch positions and time stamp for next event\n self.__lastTouchLeft = currentTouchLeft;\n self.__lastTouchTop = currentTouchTop;\n self.__lastTouchMove = timeStamp;\n self.__lastScale = scale;\n },\n\n /**\n * Touch end handler for scrolling support\n */\n doTouchEnd: function doTouchEnd(timeStamp) {\n if (timeStamp instanceof Date) {\n timeStamp = timeStamp.valueOf();\n }\n if (typeof timeStamp !== 'number') {\n throw new Error('Invalid timestamp value: ' + timeStamp);\n }\n\n var self = this;\n\n // Ignore event when tracking is not enabled (no touchstart event on element)\n // This is required as this listener ('touchmove') sits on the document and not on the element itself.\n if (!self.__isTracking) {\n return;\n }\n\n // Not touching anymore (when two finger hit the screen there are two touch end events)\n self.__isTracking = false;\n\n // Be sure to reset the dragging flag now. Here we also detect whether\n // the finger has moved fast enough to switch into a deceleration animation.\n if (self.__isDragging) {\n // Reset dragging flag\n self.__isDragging = false;\n\n // Start deceleration\n // Verify that the last move detected was in some relevant time frame\n if (self.__isSingleTouch && self.options.animating && timeStamp - self.__lastTouchMove <= 100) {\n // Then figure out what the scroll position was about 100ms ago\n var positions = self.__positions;\n var endPos = positions.length - 1;\n var startPos = endPos;\n\n // Move pointer to position measured 100ms ago\n for (var i = endPos; i > 0 && positions[i] > self.__lastTouchMove - 100; i -= 3) {\n startPos = i;\n }\n\n // If start and stop position is identical in a 100ms timeframe,\n // we cannot compute any useful deceleration.\n if (startPos !== endPos) {\n // Compute relative movement between these two points\n var timeOffset = positions[endPos] - positions[startPos];\n var movedLeft = self.__scrollLeft - positions[startPos - 2];\n var movedTop = self.__scrollTop - positions[startPos - 1];\n\n // Based on 50ms compute the movement to apply for each render step\n self.__decelerationVelocityX = movedLeft / timeOffset * (1000 / 60);\n self.__decelerationVelocityY = movedTop / timeOffset * (1000 / 60);\n\n // How much velocity is required to start the deceleration\n var minVelocityToStartDeceleration = self.options.paging || self.options.snapping ? 4 : 1;\n\n // Verify that we have enough velocity to start deceleration\n if (Math.abs(self.__decelerationVelocityX) > minVelocityToStartDeceleration || Math.abs(self.__decelerationVelocityY) > minVelocityToStartDeceleration) {\n // Deactivate pull-to-refresh when decelerating\n if (!self.__refreshActive && !self.__loadActive) {\n self.__startDeceleration(timeStamp);\n }\n } else {\n self.__scrollComplete();\n }\n } else {\n self.__scrollComplete();\n }\n } else if (timeStamp - self.__lastTouchMove > 100) {\n self.__scrollComplete();\n }\n }\n\n // If this was a slower move it is per default non decelerated, but this\n // still means that we want snap back to the bounds which is done here.\n // This is placed outside the condition above to improve edge case stability\n // e.g. touchend fired without enabled dragging. This should normally do not\n // have modified the scroll positions or even showed the scrollbars though.\n if (!self.__isDecelerating) {\n if (self.__refreshActive && self.__refreshStart) {\n // Use publish instead of scrollTo to allow scrolling to out of boundary position\n // We don't need to normalize scrollLeft, zoomLevel, etc. here because we only y-scrolling when pull-to-refresh is enabled\n self.__publish(self.__scrollLeft, -self.__refreshHeight, self.__zoomLevel, true);\n\n if (self.__refreshStart) {\n self.__refreshStart();\n }\n } else if (self.__loadActive && self.__loadStart) {\n // Use publish instead of scrollTo to allow scrolling to out of boundary position\n // We don't need to normalize scrollLeft, zoomLevel, etc. here because we only y-scrolling when pull-to-refresh is enabled\n self.__publish(self.__scrollLeft, self.__maxScrollTop + self.__loadHeight, self.__zoomLevel, true);\n\n if (self.__loadStart) {\n self.__loadStart();\n }\n } else {\n if (self.__interruptedAnimation || self.__isDragging) {\n self.__scrollComplete();\n }\n self.scrollTo(self.__scrollLeft, self.__scrollTop, true, self.__zoomLevel);\n\n // Directly signalize deactivation (nothing todo on refresh?)\n if (self.__refreshActive) {\n self.__refreshActive = false;\n if (self.__refreshDeactivate) {\n self.__refreshDeactivate();\n }\n } else if (self.__loadActive) {\n self.__loadActive = false;\n if (self.__loadDeactivate) {\n self.__loadDeactivate();\n }\n }\n }\n }\n\n // Fully cleanup list\n self.__positions.length = 0;\n },\n\n /** Handle for scroll/publish */\n onScroll: NOOP,\n\n stop: function stop() {\n var self = this;\n\n self.__disable = true;\n },\n start: function start() {\n var self = this;\n\n self.__disable = true;\n },\n __enableBounce: function __enableBounce(direction) {\n var self = this;\n\n return self.options.bouncing === true || self.options.bouncing.indexOf(direction) > -1;\n },\n /*\n ---------------------------------------------------------------------------\n PRIVATE API\n ---------------------------------------------------------------------------\n */\n\n /**\n * Applies the scroll position to the content element\n *\n * @param left {Number} Left scroll position\n * @param top {Number} Top scroll position\n * @param animate {Boolean?false} Whether animation should be used to move to the new coordinates\n */\n __publish: function __publish(left, top, zoom, animate) {\n var self = this;\n if (self.__disable) {\n return;\n }\n if (isNaN(left)) {\n left = this.__scrollLeft;\n }\n if (isNaN(top)) {\n top = this.__scrollTop;\n }\n // Remember whether we had an animation, then we try to continue based on the current \"drive\" of the animation\n var wasAnimating = self.__isAnimating;\n if (wasAnimating) {\n core.effect.Animate.stop(wasAnimating);\n self.__isAnimating = false;\n }\n\n if (animate && self.options.animating) {\n // Keep scheduled positions for scrollBy/zoomBy functionality\n self.__scheduledLeft = left;\n self.__scheduledTop = top;\n self.__scheduledZoom = zoom;\n\n var oldLeft = self.__scrollLeft;\n var oldTop = self.__scrollTop;\n var oldZoom = self.__zoomLevel;\n\n var diffLeft = left - oldLeft;\n var diffTop = top - oldTop;\n var diffZoom = zoom - oldZoom;\n\n var step = function step(percent, now, render) {\n if (render) {\n self.__scrollLeft = oldLeft + diffLeft * percent;\n self.__scrollTop = oldTop + diffTop * percent;\n self.__zoomLevel = oldZoom + diffZoom * percent;\n\n // Push values out\n if (self.__callback) {\n self.__callback(self.__scrollLeft, self.__scrollTop, self.__zoomLevel);\n self.onScroll();\n }\n }\n };\n\n var verify = function verify(id) {\n return self.__isAnimating === id;\n };\n\n var completed = function completed(renderedFramesPerSecond, animationId, wasFinished) {\n if (animationId === self.__isAnimating) {\n self.__isAnimating = false;\n }\n if (self.__didDecelerationComplete || wasFinished) {\n self.__scrollComplete();\n }\n\n if (self.options.zooming) {\n self.__computeScrollMax();\n if (self.__zoomComplete) {\n self.__zoomComplete();\n self.__zoomComplete = null;\n }\n }\n\n if (self.__refreshBeforeDeactiveStarted) {\n self.__refreshBeforeDeactiveStarted = false;\n if (self.__refreshDeactivate) self.__refreshDeactivate();\n }\n\n if (self.__loadBeforeDeactiveStarted) {\n self.__loadBeforeDeactiveStarted = false;\n if (self.__loadDeactivate) self.__loadDeactivate();\n }\n };\n\n // When continuing based on previous animation we choose an ease-out animation instead of ease-in-out\n self.__isAnimating = core.effect.Animate.start(step, verify, completed, self.options.animationDuration, wasAnimating ? animatingMethod : noAnimatingMethod);\n } else {\n self.__scheduledLeft = self.__scrollLeft = left;\n self.__scheduledTop = self.__scrollTop = top;\n self.__scheduledZoom = self.__zoomLevel = zoom;\n\n // Push values out\n if (self.__callback) {\n self.__callback(left, top, zoom);\n self.onScroll();\n }\n\n // Fix max scroll ranges\n if (self.options.zooming) {\n self.__computeScrollMax();\n if (self.__zoomComplete) {\n self.__zoomComplete();\n self.__zoomComplete = null;\n }\n }\n\n if (self.__refreshBeforeDeactiveStarted) {\n self.__refreshBeforeDeactiveStarted = false;\n if (self.__refreshDeactivate) self.__refreshDeactivate();\n }\n\n if (self.__loadBeforeDeactiveStarted) {\n self.__loadBeforeDeactiveStarted = false;\n if (self.__loadDeactivate) self.__loadDeactivate();\n }\n }\n },\n\n /**\n * Recomputes scroll minimum values based on client dimensions and content dimensions.\n */\n __computeScrollMax: function __computeScrollMax(zoomLevel) {\n var self = this;\n\n if (zoomLevel == null) {\n zoomLevel = self.__zoomLevel;\n }\n\n self.__maxScrollLeft = Math.max(self.__contentWidth * zoomLevel - self.__clientWidth, 0);\n self.__maxScrollTop = Math.max(self.__contentHeight * zoomLevel - self.__clientHeight, 0);\n },\n /** compute current page total page */\n __computePage: function __computePage() {\n var self = this;\n var clientWidth = self.__clientWidth;\n var clientHeight = self.__clientHeight;\n var left = self.__scrollLeft;\n var top = self.__scrollTop;\n self.__totalXPage = Math.ceil(self.__contentWidth / clientWidth);\n self.__currentPageX = Math.ceil(left / clientWidth + 1);\n self.__totalYPage = Math.ceil(self.__contentHeight / clientHeight);\n self.__currentPageY = Math.ceil(top / clientHeight + 1);\n },\n /** complete scroll*/\n __scrollComplete: function __scrollComplete() {\n var self = this;\n self.options.scrollingComplete();\n },\n /*\n ---------------------------------------------------------------------------\n ANIMATION (DECELERATION) SUPPORT\n ---------------------------------------------------------------------------\n */\n\n /**\n * Called when a touch sequence end and the speed of the finger was high enough\n * to switch into deceleration mode.\n */\n __startDeceleration: function __startDeceleration() {\n var self = this;\n\n if (self.options.paging) {\n var scrollLeft = Math.max(Math.min(self.__scrollLeft, self.__maxScrollLeft), 0);\n var scrollTop = Math.max(Math.min(self.__scrollTop, self.__maxScrollTop), 0);\n var clientWidth = self.__clientWidth;\n var clientHeight = self.__clientHeight;\n\n // We limit deceleration not to the min/max values of the allowed range, but to the size of the visible client area.\n // Each page should have exactly the size of the client area.\n self.__minDecelerationScrollLeft = Math.floor(scrollLeft / clientWidth) * clientWidth;\n self.__minDecelerationScrollTop = Math.floor(scrollTop / clientHeight) * clientHeight;\n self.__maxDecelerationScrollLeft = Math.ceil(scrollLeft / clientWidth) * clientWidth;\n self.__maxDecelerationScrollTop = Math.ceil(scrollTop / clientHeight) * clientHeight;\n } else {\n self.__minDecelerationScrollLeft = 0;\n self.__minDecelerationScrollTop = 0;\n self.__maxDecelerationScrollLeft = self.__maxScrollLeft;\n self.__maxDecelerationScrollTop = self.__maxScrollTop;\n }\n\n // Wrap class method\n var step = function step(percent, now, render) {\n self.__stepThroughDeceleration(render);\n };\n\n // How much velocity is required to keep the deceleration running\n var minVelocityToKeepDecelerating = self.options.snapping ? 4 : 0.001;\n\n // Detect whether it's still worth to continue animating steps\n // If we are already slow enough to not being user perceivable anymore, we stop the whole process here.\n var verify = function verify() {\n var shouldContinue = Math.abs(self.__decelerationVelocityX) >= minVelocityToKeepDecelerating || Math.abs(self.__decelerationVelocityY) >= minVelocityToKeepDecelerating;\n if (!shouldContinue) {\n self.__didDecelerationComplete = true;\n }\n return shouldContinue;\n };\n\n var completed = function completed() {\n if (!self.__isDecelerating) {\n return;\n }\n self.__isDecelerating = false;\n if (self.__didDecelerationComplete) {\n self.__scrollComplete();\n }\n\n // Animate to grid when snapping is active, otherwise just fix out-of-boundary positions\n self.scrollTo(self.__scrollLeft, self.__scrollTop, self.options.snapping);\n };\n\n // Start animation and switch on flag\n self.__isDecelerating = core.effect.Animate.start(step, verify, completed);\n },\n\n /**\n * Called on every step of the animation\n *\n * @param inMemory {Boolean?false} Whether to not render the current step, but keep it in memory only. Used internally only!\n */\n __stepThroughDeceleration: function __stepThroughDeceleration(render) {\n var self = this;\n\n //\n // COMPUTE NEXT SCROLL POSITION\n //\n\n // Add deceleration to scroll position\n var scrollLeft = self.__scrollLeft + self.__decelerationVelocityX;\n var scrollTop = self.__scrollTop + self.__decelerationVelocityY;\n\n //\n // HARD LIMIT SCROLL POSITION FOR NON BOUNCING MODE\n //\n var bounceX = false;\n var bounceY = false;\n\n if (scrollLeft < 0 && self.__enableBounce('left') || scrollLeft > self.__maxDecelerationScrollLeft && self.__enableBounce('right')) {\n bounceX = true;\n }\n\n if (scrollTop < 0 && self.__enableBounce('top') || scrollTop > self.__maxDecelerationScrollTop && self.__enableBounce('bottom')) {\n bounceY = true;\n }\n\n if (!bounceX) {\n var scrollLeftFixed = Math.max(Math.min(self.__maxDecelerationScrollLeft, scrollLeft), self.__minDecelerationScrollLeft);\n if (scrollLeftFixed !== scrollLeft) {\n scrollLeft = scrollLeftFixed;\n self.__decelerationVelocityX = 0;\n }\n }\n\n if (!bounceY) {\n var scrollTopFixed = Math.max(Math.min(self.__maxDecelerationScrollTop, scrollTop), self.__minDecelerationScrollTop);\n if (scrollTopFixed !== scrollTop) {\n scrollTop = scrollTopFixed;\n self.__decelerationVelocityY = 0;\n }\n }\n\n //\n // UPDATE SCROLL POSITION\n //\n\n if (render) {\n self.__publish(scrollLeft, scrollTop, self.__zoomLevel);\n } else {\n self.__scrollLeft = scrollLeft;\n self.__scrollTop = scrollTop;\n }\n\n //\n // SLOW DOWN\n //\n\n // Slow down velocity on every iteration\n if (!self.options.paging) {\n // This is the factor applied to every iteration of the animation\n // to slow down the process. This should emulate natural behavior where\n // objects slow down when the initiator of the movement is removed\n var frictionFactor = 0.95;\n\n self.__decelerationVelocityX *= frictionFactor;\n self.__decelerationVelocityY *= frictionFactor;\n }\n\n //\n // BOUNCING SUPPORT\n //\n\n if (self.options.bouncing) {\n var scrollOutsideX = 0;\n var scrollOutsideY = 0;\n\n // This configures the amount of change applied to deceleration/acceleration when reaching boundaries\n var penetrationDeceleration = self.options.penetrationDeceleration;\n var penetrationAcceleration = self.options.penetrationAcceleration;\n\n if (bounceX) {\n // Check limits\n if (scrollLeft < self.__minDecelerationScrollLeft) {\n scrollOutsideX = self.__minDecelerationScrollLeft - scrollLeft;\n } else if (scrollLeft > self.__maxDecelerationScrollLeft) {\n scrollOutsideX = self.__maxDecelerationScrollLeft - scrollLeft;\n }\n }\n\n if (bounceY) {\n if (scrollTop < self.__minDecelerationScrollTop) {\n scrollOutsideY = self.__minDecelerationScrollTop - scrollTop;\n } else if (scrollTop > self.__maxDecelerationScrollTop) {\n scrollOutsideY = self.__maxDecelerationScrollTop - scrollTop;\n }\n }\n\n // Slow down until slow enough, then flip back to snap position\n if (scrollOutsideX !== 0) {\n if (scrollOutsideX * self.__decelerationVelocityX <= 0) {\n self.__decelerationVelocityX += scrollOutsideX * penetrationDeceleration;\n } else {\n self.__decelerationVelocityX = scrollOutsideX * penetrationAcceleration;\n }\n }\n\n if (scrollOutsideY !== 0) {\n if (scrollOutsideY * self.__decelerationVelocityY <= 0) {\n self.__decelerationVelocityY += scrollOutsideY * penetrationDeceleration;\n } else {\n self.__decelerationVelocityY = scrollOutsideY * penetrationAcceleration;\n }\n }\n }\n }\n };\n\n// Copy over members to prototype\n for (var key in members) {\n Scroller.prototype[key] = members[key];\n }\n\n /* DOM-based rendering (Uses 3D when available, falls back on margin when transform not available) */\n function render$1(content, global, suffix, value) {\n var x = null;\n var y = null;\n\n if (typeof content == 'string') {\n y = content == 'vertical' ? (x = 0) || value : (x = value) && 0;\n }\n\n var vendorPrefix = getPrefix(global);\n\n var helperElem = document.createElement('div');\n var undef;\n\n var perspectiveProperty = vendorPrefix + 'Perspective';\n var transformProperty = 'transform'; //vendorPrefix + 'Transform';\n\n if (helperElem.style[perspectiveProperty] !== undef) {\n if (typeof content == 'string') {\n return defineProperty({}, transformProperty, 'translate3d(' + x + suffix + ',' + y + suffix + ',0)');\n }\n return function (left, top, zoom) {\n content.style[transformProperty] = 'translate3d(' + -left + suffix + ',' + -top + suffix + ',0) scale(' + zoom + ')';\n };\n } else if (helperElem.style[transformProperty] !== undef) {\n if (typeof content == 'string') {\n return defineProperty({}, transformProperty, 'translate(' + x + suffix + ',' + y + suffix + ')');\n }\n return function (left, top, zoom) {\n content.style[transformProperty] = 'translate(' + -left + suffix + ',' + -top + suffix + ') scale(' + zoom + ')';\n };\n }\n }\n\n function listenContainer(container, scroller, eventCallback, zooming, preventDefault, preventDefaultOnMove) {\n var destroy = null;\n // for touch\n function touchstart(e) {\n // Don't react if initial down happens on a form element\n if (e.touches[0] && e.touches[0].target && e.touches[0].target.tagName.match(/input|textarea|select/i)) {\n return;\n }\n eventCallback('mousedown');\n scroller.doTouchStart(e.touches, e.timeStamp);\n if (preventDefault) {\n e.preventDefault();\n }\n // here , we want to manully prevent default, so we\n // set passive to false\n // see https://developer.mozilla.org/zh-CN/docs/Web/API/EventTarget/addEventListener\n document.addEventListener('touchmove', touchmove, { passive: false });\n }\n function touchmove(e) {\n eventCallback('mousemove');\n scroller.doTouchMove(e.touches, e.timeStamp, e.scale);\n if (preventDefaultOnMove) {\n e.preventDefault();\n }\n }\n function touchend(e) {\n eventCallback('mouseup');\n scroller.doTouchEnd(e.timeStamp);\n document.removeEventListener('touchmove', touchmove);\n }\n function touchcancel(e) {\n scroller.doTouchEnd(e.timeStamp);\n }\n\n // for mouse\n function mousedownEvent(e) {\n if (e.target.tagName.match(/input|textarea|select/i)) {\n return;\n }\n eventCallback('mousedown');\n scroller.doTouchStart([{\n pageX: e.pageX,\n pageY: e.pageY\n }], e.timeStamp);\n\n if (preventDefault) {\n e.preventDefault();\n }\n\n mousedown = true;\n }\n function mousemove(e) {\n if (!mousedown) {\n return;\n }\n eventCallback('mousemove');\n scroller.doTouchMove([{\n pageX: e.pageX,\n pageY: e.pageY\n }], e.timeStamp);\n if (preventDefaultOnMove) {\n e.preventDefault();\n }\n mousedown = true;\n }\n function mouseup(e) {\n if (!mousedown) {\n return;\n }\n eventCallback('mouseup');\n scroller.doTouchEnd(e.timeStamp);\n\n mousedown = false;\n }\n function zoomHandle(e) {\n scroller.doMouseZoom(e.detail ? e.detail * -120 : e.wheelDelta, e.timeStamp, e.pageX, e.pageY);\n }\n if ('ontouchstart' in window) {\n container.addEventListener('touchstart', touchstart, false);\n\n document.addEventListener('touchend', touchend, false);\n\n document.addEventListener('touchcancel', touchcancel, false);\n\n destroy = function destroy() {\n container.removeEventListener('touchstart', touchstart, false);\n\n document.removeEventListener('touchend', touchend, false);\n\n document.removeEventListener('touchcancel', touchcancel, false);\n };\n } else {\n var mousedown = false;\n\n container.addEventListener('mousedown', mousedownEvent, false);\n\n document.addEventListener('mousemove', mousemove, false);\n\n document.addEventListener('mouseup', mouseup, false);\n if (zooming) {\n container.addEventListener(navigator.userAgent.indexOf('Firefox') > -1 ? 'DOMMouseScroll' : 'mousewheel', zoomHandle, false);\n }\n // container.addEventListener(navigator.userAgent.indexOf(\"Firefox\") > -1 ? \"DOMMouseScroll\" : \"mousewheel\", function(e) {\n // scroller.doMouseZoom(e.detail ? (e.detail * -120) : e.wheelDelta, e.timeStamp, e.pageX, e.pageY);\n // }, false);\n destroy = function destroy() {\n container.removeEventListener('mousedown', mousedownEvent, false);\n document.removeEventListener('mousemove', mousemove, false);\n document.removeEventListener('mouseup', mouseup, false);\n container.removeEventListener(navigator.userAgent.indexOf('Firefox') > -1 ? 'DOMMouseScroll' : 'mousewheel', zoomHandle, false);\n };\n }\n // handle __publish event\n scroller.onScroll = function () {\n eventCallback('onscroll');\n };\n return destroy;\n }\n\n /**\n * These mixes is exclusive for slide mode\n */\n\n /**\n * @description refresh and load callback\n */\n function createStateCallbacks(type, stageType, vm, tipDom) {\n var listeners = vm.$listeners;\n\n var activateCallback = function activateCallback() {\n vm.vuescroll.state[stageType] = 'active';\n vm.$emit(type + '-activate', vm, tipDom);\n };\n\n var deactivateCallback = function deactivateCallback() {\n vm.vuescroll.state[stageType] = 'deactive';\n vm.$emit(type + '-deactivate', vm, tipDom);\n };\n\n var beforeDeactiveEnd = function beforeDeactiveEnd() {\n vm.vuescroll.state[stageType] = 'beforeDeactiveEnd';\n vm.$emit(type + '-before-deactivate-end', vm, tipDom);\n };\n\n var startCallback = function startCallback() {\n vm.vuescroll.state[stageType] = 'start';\n setTimeout(function () {\n vm.scroller.finishRefreshOrLoad();\n }, 2000); // Default start stage duration\n };\n\n var beforeDeactivateCallback = function beforeDeactivateCallback(done) {\n vm.vuescroll.state[stageType] = 'beforeDeactive';\n setTimeout(function () {\n done();\n }, 500); // Default before-deactivated stage duration\n };\n\n /* istanbul ignore if */\n if (listeners[type + '-before-deactivate']) {\n beforeDeactivateCallback = function beforeDeactivateCallback(done) {\n vm.vuescroll.state[stageType] = 'beforeDeactive';\n vm.$emit(type + '-before-deactivate', vm, tipDom, done.bind(vm.scroller));\n };\n }\n\n /* istanbul ignore if */\n if (listeners[type + '-start']) {\n startCallback = function startCallback() {\n vm.vuescroll.state[stageType] = 'start';\n vm.$emit(type + '-start', vm, tipDom, vm.scroller.finishRefreshOrLoad.bind(vm.scroller));\n };\n }\n\n return {\n activateCallback: activateCallback,\n deactivateCallback: deactivateCallback,\n startCallback: startCallback,\n beforeDeactivateCallback: beforeDeactivateCallback,\n beforeDeactiveEnd: beforeDeactiveEnd\n };\n }\n\n var slideMix = {\n mounted: function mounted() {\n this.vsMounted = true;\n },\n\n computed: {\n pullRefreshTip: function pullRefreshTip() {\n return this.mergedOptions.vuescroll.pullRefresh.tips[this.vuescroll.state.refreshStage];\n },\n pushLoadTip: function pushLoadTip() {\n return this.mergedOptions.vuescroll.pushLoad.tips[this.vuescroll.state.loadStage];\n },\n refreshLoad: function refreshLoad() {\n return this.mergedOptions.vuescroll.pullRefresh.enable || this.mergedOptions.vuescroll.pushLoad.enable;\n },\n refrehDomVisiable: function refrehDomVisiable() {\n return this.vsMounted && this.outTheTopBoundary;\n },\n loadDomVisiable: function loadDomVisiable() {\n return this.vsMounted && this.outTheBottomBoundary;\n }\n },\n data: function data() {\n return {\n vuescroll: {\n state: {\n /** Default tips of refresh and load */\n refreshStage: 'deactive',\n loadStage: 'deactive'\n }\n },\n vsMounted: false,\n outTheTopBoundary: false,\n outTheBottomBoundary: false\n };\n },\n\n methods: {\n // Update:\n // 1. update height/width\n // 2. update refresh or load\n updateScroller: function updateScroller() {\n this.updateDimesion();\n this.registryRefreshLoad();\n },\n updateDimesion: function updateDimesion() {\n var clientWidth = this.$el.clientWidth;\n var clientHeight = this.$el.clientHeight;\n var contentWidth = this.scrollPanelElm.scrollWidth;\n var contentHeight = this.scrollPanelElm.scrollHeight;\n var refreshHeight = 0;\n var loadHeight = 0;\n // If the refresh option is true,let's give a \"margin-top\" style to\n // the refresh-tip dom. let it to be invisible when doesn't trigger\n // refresh.\n if (this.mergedOptions.vuescroll.pullRefresh.enable) {\n if (this.vsMounted) {\n var refreshDom = this.$refs[__REFRESH_DOM_NAME].elm || this.$refs[__REFRESH_DOM_NAME];\n refreshHeight = refreshDom.offsetHeight;\n refreshDom.style.marginTop = -refreshHeight + 'px';\n }\n }\n if (this.mergedOptions.vuescroll.pushLoad.enable) {\n if (this.vsMounted) {\n var loadDom = this.$refs[__LOAD_DOM_NAME].elm || this.$refs[__LOAD_DOM_NAME];\n loadHeight = loadDom.offsetHeight;\n contentHeight -= loadHeight;\n loadDom.style.bottom = '-' + loadHeight + 'px';\n }\n }\n if (this.scroller) {\n this.scroller.setDimensions(clientWidth, clientHeight, contentWidth, contentHeight, false);\n }\n },\n registryRefreshLoad: function registryRefreshLoad() {\n // registry refresh\n if (this.mergedOptions.vuescroll.pullRefresh.enable) {\n this.registryEvent('refresh');\n }\n // registry load\n if (this.mergedOptions.vuescroll.pushLoad.enable) {\n this.registryEvent('load');\n }\n },\n registryScroller: function registryScroller() {\n var _this = this;\n\n var _mergedOptions$vuescr = this.mergedOptions.vuescroll.scroller,\n preventDefault = _mergedOptions$vuescr.preventDefault,\n preventDefaultOnMove = _mergedOptions$vuescr.preventDefaultOnMove;\n\n var paging = this.mergedOptions.vuescroll.paging;\n var snapping = this.mergedOptions.vuescroll.snapping.enable;\n // disale zooming when refresh or load enabled\n var zooming = !this.refreshLoad && !paging && !snapping && this.mergedOptions.vuescroll.zooming;\n var _mergedOptions$scroll = this.mergedOptions.scrollPanel,\n scrollingY = _mergedOptions$scroll.scrollingY,\n scrollingX = _mergedOptions$scroll.scrollingX;\n\n\n var scrollingComplete = this.scrollingComplete.bind(this);\n\n // Initialize Scroller\n this.scroller = new Scroller(render$1(this.scrollPanelElm, window, 'px'), _extends({}, this.mergedOptions.vuescroll.scroller, {\n zooming: zooming,\n scrollingY: scrollingY,\n scrollingX: scrollingX && !this.refreshLoad,\n animationDuration: this.mergedOptions.scrollPanel.speed,\n paging: paging,\n snapping: snapping,\n scrollingComplete: scrollingComplete\n }));\n\n // Set snap\n if (snapping) {\n this.scroller.setSnapSize(this.mergedOptions.vuescroll.snapping.width, this.mergedOptions.vuescroll.snapping.height);\n }\n var rect = this.$el.getBoundingClientRect();\n this.scroller.setPosition(rect.left + this.$el.clientLeft, rect.top + this.$el.clientTop);\n\n // Get destroy callback\n var cb = listenContainer(this.$el, this.scroller, function (eventType) {\n // Thie is to dispatch the event from the scroller.\n // to let vuescroll refresh the dom\n switch (eventType) {\n case 'mousedown':\n _this.vuescroll.state.isDragging = true;\n break;\n case 'onscroll':\n {\n /**\n * Trigger auto load\n */\n var stage = _this.vuescroll.state['loadStage'];\n var _mergedOptions$vuescr2 = _this.mergedOptions.vuescroll.pushLoad,\n enable = _mergedOptions$vuescr2.enable,\n auto = _mergedOptions$vuescr2.auto,\n autoLoadDistance = _mergedOptions$vuescr2.autoLoadDistance;\n var _scroller = _this.scroller,\n __scrollTop = _scroller.__scrollTop,\n __maxScrollTop = _scroller.__maxScrollTop;\n\n if (stage != 'start' && enable && auto && !_this.lockAutoLoad && // auto load debounce\n autoLoadDistance >= __maxScrollTop - __scrollTop) {\n _this.lockAutoLoad = true;\n _this.triggerRefreshOrLoad('load');\n }\n\n if (autoLoadDistance < __maxScrollTop - __scrollTop) {\n _this.lockAutoLoad = false;\n }\n\n _this.handleScroll(false);\n }\n\n break;\n case 'mouseup':\n _this.vuescroll.state.isDragging = false;\n break;\n }\n }, zooming, preventDefault, preventDefaultOnMove);\n\n this.updateScroller();\n\n return cb;\n },\n updateSlideModeBarState: function updateSlideModeBarState() {\n // update slide mode scrollbars' state\n var heightPercentage = void 0,\n widthPercentage = void 0;\n var vuescroll = this.$el;\n var scroller = this.scroller;\n\n var outerLeft = 0;\n var outerTop = 0;\n\n var _getAccurateSize = getAccurateSize(this.$el, true /* Use Math.round */\n ),\n clientWidth = _getAccurateSize.clientWidth,\n clientHeight = _getAccurateSize.clientHeight;\n\n var contentWidth = clientWidth + this.scroller.__maxScrollLeft;\n var contentHeight = clientHeight + this.scroller.__maxScrollTop;\n\n var __enableScrollX = clientWidth < contentWidth && this.mergedOptions.scrollPanel.scrollingX;\n var __enableScrollY = clientHeight < contentHeight && this.mergedOptions.scrollPanel.scrollingY;\n\n // We should take the the height or width that is\n // out of horizontal bountry into the total length\n if (__enableScrollX) {\n /* istanbul ignore if */\n if (scroller.__scrollLeft < 0) {\n outerLeft = -scroller.__scrollLeft;\n } /* istanbul ignore next */else if (scroller.__scrollLeft > scroller.__maxScrollLeft) {\n outerLeft = scroller.__scrollLeft - scroller.__maxScrollLeft;\n }\n }\n // out of vertical bountry\n if (__enableScrollY) {\n if (scroller.__scrollTop < 0) {\n outerTop = -scroller.__scrollTop;\n } else if (scroller.__scrollTop > scroller.__maxScrollTop) {\n outerTop = scroller.__scrollTop - scroller.__maxScrollTop;\n }\n }\n\n heightPercentage = clientHeight / (contentHeight + outerTop);\n widthPercentage = clientWidth / (contentWidth + outerLeft);\n\n var scrollTop = Math.min(Math.max(0, scroller.__scrollTop), scroller.__maxScrollTop);\n var scrollLeft = Math.min(Math.max(0, scroller.__scrollLeft), scroller.__maxScrollLeft);\n\n this.bar.vBar.state.posValue = (scrollTop + outerTop) * 100 / vuescroll.clientHeight;\n this.bar.hBar.state.posValue = (scrollLeft + outerLeft) * 100 / vuescroll.clientWidth;\n\n /* istanbul ignore if */\n if (scroller.__scrollLeft < 0) {\n this.bar.hBar.state.posValue = 0;\n }\n if (scroller.__scrollTop < 0) {\n this.bar.vBar.state.posValue = 0;\n }\n\n this.bar.vBar.state.size = heightPercentage < 1 ? heightPercentage : 0;\n this.bar.hBar.state.size = widthPercentage < 1 ? widthPercentage : 0;\n },\n registryEvent: function registryEvent(type) {\n var domName = type == 'refresh' ? __REFRESH_DOM_NAME : __LOAD_DOM_NAME;\n var activateFunc = type == 'refresh' ? this.scroller.activatePullToRefresh : this.scroller.activatePushToLoad;\n var stageType = type == 'refresh' ? 'refreshStage' : 'loadStage';\n var tipDom = this.$refs[domName].elm || this.$refs[domName];\n var cbs = createStateCallbacks(type, stageType, this, tipDom);\n var height = tipDom.offsetHeight;\n\n activateFunc.bind(this.scroller)(height, cbs);\n },\n recordSlideCurrentPos: function recordSlideCurrentPos() {\n var state = this.vuescroll.state;\n var axis = {\n x: this.scroller.__scrollLeft,\n y: this.scroller.__scrollTop\n };\n var maxScrollTop = this.scroller.__maxScrollTop;\n\n var oldX = state.internalScrollLeft;\n var oldY = state.internalScrollTop;\n\n state.posX = oldX - axis.x > 0 ? 'right' : oldX - axis.x < 0 ? 'left' : null;\n state.posY = oldY - axis.y > 0 ? 'up' : oldY - axis.y < 0 ? 'down' : null;\n\n state.internalScrollLeft = axis.x;\n state.internalScrollTop = axis.y;\n\n if (axis.y < 0) {\n this.outTheTopBoundary = true;\n this.outTheBottomBoundary = false;\n } else if (axis.y > maxScrollTop) {\n this.outTheTopBoundary = false;\n this.outTheBottomBoundary = true;\n } else {\n this.outTheTopBoundary = false;\n this.outTheBottomBoundary = false;\n }\n }\n }\n };\n\n /**\n * These mixes is exclusive for native mode\n */\n\n var nativeMix = {\n methods: {\n updateNativeModeBarState: function updateNativeModeBarState() {\n var container = this.scrollPanelElm;\n var isPercent = this.vuescroll.state.currentSizeStrategy == 'percent';\n var clientWidth = isPercent ? container.clientWidth : this.vuescroll.state.width.slice(0, -2); // xxxpx ==> xxx\n var clientHeight = isPercent ? container.clientHeight : this.vuescroll.state.height.slice(0, -2);\n\n var heightPercentage = clientHeight / container.scrollHeight;\n var widthPercentage = clientWidth / container.scrollWidth;\n\n this.bar.vBar.state.posValue = container.scrollTop * 100 / clientHeight;\n this.bar.hBar.state.posValue = container.scrollLeft * 100 / clientWidth;\n\n this.bar.vBar.state.size = heightPercentage < 1 ? heightPercentage : 0;\n this.bar.hBar.state.size = widthPercentage < 1 ? widthPercentage : 0;\n },\n recordNativeCurrentPos: function recordNativeCurrentPos() {\n var state = this.vuescroll.state;\n var axis = {\n x: this.scrollPanelElm.scrollLeft,\n y: this.scrollPanelElm.scrollTop\n };\n var oldX = state.internalScrollLeft;\n var oldY = state.internalScrollTop;\n\n state.posX = oldX - axis.x > 0 ? 'right' : oldX - axis.x < 0 ? 'left' : null;\n state.posY = oldY - axis.y > 0 ? 'up' : oldY - axis.y < 0 ? 'down' : null;\n\n state.internalScrollLeft = axis.x;\n state.internalScrollTop = axis.y;\n }\n },\n computed: {\n scrollContentElm: function scrollContentElm() {\n return this.$refs['scrollContent']._isVue ? this.$refs['scrollContent'].$el : this.$refs['scrollContent'];\n }\n }\n };\n\n var core$1 = {\n mixins: [api$1, slideMix, nativeMix],\n mounted: function mounted() {\n if (!this._isDestroyed && !this.renderError) {\n if (this.mode == 'slide') {\n this.updatedCbs.push(this.updateScroller);\n }\n }\n },\n\n computed: {\n mode: function mode() {\n return this.mergedOptions.vuescroll.mode;\n }\n },\n methods: {\n destroy: function destroy() {\n if (this.destroyScroller) {\n this.scroller.stop();\n this.destroyScroller();\n this.destroyScroller = null;\n }\n\n /* istanbul ignore next */\n if (this.destroyResize) {\n this.destroyResize();\n }\n },\n updateBarStateAndEmitEvent: function updateBarStateAndEmitEvent(eventType) {\n var nativeEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n if (this.mode == 'native') {\n this.updateNativeModeBarState();\n } else if (this.mode == 'slide') {\n /* istanbul ignore if */\n if (!this.scroller) {\n return;\n }\n\n this.updateSlideModeBarState();\n }\n if (eventType) {\n this.emitEvent(eventType, nativeEvent);\n }\n if (this.mergedOptions.bar.onlyShowBarOnScroll) {\n if (eventType == 'handle-scroll' || eventType == 'handle-resize' || eventType == 'refresh-status' || eventType == 'window-resize' || eventType == 'options-change') {\n this.showAndDefferedHideBar(true /* forceHideBar: true */);\n }\n } else {\n this.showAndDefferedHideBar();\n }\n },\n emitEvent: function emitEvent(eventType) {\n var nativeEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var _scrollPanelElm = this.scrollPanelElm,\n scrollHeight = _scrollPanelElm.scrollHeight,\n scrollWidth = _scrollPanelElm.scrollWidth,\n clientHeight = _scrollPanelElm.clientHeight,\n clientWidth = _scrollPanelElm.clientWidth,\n scrollTop = _scrollPanelElm.scrollTop,\n scrollLeft = _scrollPanelElm.scrollLeft;\n\n\n var vertical = {\n type: 'vertical'\n };\n var horizontal = {\n type: 'horizontal'\n };\n\n if (this.mode == 'slide') {\n scrollHeight = this.scroller.__contentHeight;\n scrollWidth = this.scroller.__contentWidth;\n scrollTop = this.scroller.__scrollTop;\n scrollLeft = this.scroller.__scrollLeft;\n clientHeight = this.$el.clientHeight;\n clientWidth = this.$el.clientWidth;\n }\n\n vertical['process'] = Math.min(scrollTop / (scrollHeight - clientHeight), 1);\n horizontal['process'] = Math.min(scrollLeft / (scrollWidth - clientWidth), 1);\n\n vertical['barSize'] = this.bar.vBar.state.size;\n horizontal['barSize'] = this.bar.hBar.state.size;\n vertical['scrollTop'] = scrollTop;\n horizontal['scrollLeft'] = scrollLeft;\n // Current scroll direction\n vertical['directionY'] = this.vuescroll.state.posY;\n horizontal['directionX'] = this.vuescroll.state.posX;\n\n this.$emit(eventType, vertical, horizontal, nativeEvent);\n },\n recordCurrentPos: function recordCurrentPos() {\n var mode = this.mode;\n if (this.mode !== this.lastMode) {\n mode = this.lastMode;\n this.lastMode = this.mode;\n }\n\n if (mode == 'slide') {\n this.recordSlideCurrentPos();\n } else {\n this.recordNativeCurrentPos();\n }\n },\n initVariables: function initVariables() {\n this.lastMode = this.mode;\n this.$el._isVuescroll = true;\n this.clearScrollingTimes();\n },\n refreshMode: function refreshMode() {\n var x = this.vuescroll.state.internalScrollLeft;\n var y = this.vuescroll.state.internalScrollTop;\n if (this.destroyScroller) {\n this.scroller.stop();\n this.destroyScroller();\n this.destroyScroller = null;\n }\n\n if (this.mode !== this.lastMode) {\n this.registryResize(true);\n }\n\n if (this.mode == 'slide') {\n this.destroyScroller = this.registryScroller();\n } else if (this.mode == 'native') {\n // remove the legacy transform style attribute\n this.scrollPanelElm.style.transform = '';\n this.scrollPanelElm.style.transformOrigin = '';\n }\n // keep the last-mode's position.\n this.scrollTo({ x: x, y: y }, false /* animate */, false /* force */);\n },\n refreshInternalStatus: function refreshInternalStatus() {\n // 1.set vuescroll height or width according to\n // sizeStrategy\n this.setVsSize();\n // 2. registry resize event\n this.registryResize();\n // 3. registry scroller if mode is 'slide'\n // or remove 'transform origin' is the mode is not `slide`\n this.refreshMode();\n // 4. update scrollbar's height/width\n this.updateBarStateAndEmitEvent('refresh-status');\n },\n registryResize: function registryResize(isDestroyResize) {\n var _this = this;\n\n var resizeEnable = this.mergedOptions.vuescroll.detectResize;\n\n /* istanbul ignore next */\n if (this.destroyResize && !isDestroyResize && resizeEnable) {\n return;\n }\n\n if (this.destroyResize) {\n this.destroyResize();\n }\n\n if (!resizeEnable) {\n return;\n }\n\n var contentElm = null;\n if (this.mode == 'slide') {\n contentElm = this.scrollPanelElm;\n } else if (this.mode == 'native') {\n // scrollContent maybe a vue-component or a pure-dom\n contentElm = this.scrollContentElm;\n }\n\n var vm = this;\n var handleWindowResize = function handleWindowResize() /* istanbul ignore next */{\n vm.updateBarStateAndEmitEvent('window-resize');\n if (vm.mode == 'slide') {\n vm.updatedCbs.push(vm.updateScroller);\n vm.$forceUpdate();\n }\n };\n\n var handleDomResize = function handleDomResize() {\n var currentSize = {};\n if (_this.mode == 'slide') {\n currentSize['width'] = _this.scroller.__contentWidth;\n currentSize['height'] = _this.scroller.__contentHeight;\n _this.updateBarStateAndEmitEvent('handle-resize', currentSize);\n // update scroller should after rendering\n _this.updatedCbs.push(_this.updateScroller);\n _this.$forceUpdate();\n } else if (_this.mode == 'native') {\n currentSize['width'] = _this.scrollPanelElm.scrollWidth;\n currentSize['height'] = _this.scrollPanelElm.scrollHeight;\n _this.updateBarStateAndEmitEvent('handle-resize', currentSize);\n }\n\n // Since content sie changes, we should tell parent to set\n // correct size to fit content's size\n // this.setVsSize();\n };\n window.addEventListener('resize', handleWindowResize, false);\n\n var destroyDomResize = installResizeDetection(contentElm, handleDomResize);\n\n var destroyWindowResize = function destroyWindowResize() {\n window.removeEventListener('resize', handleWindowResize, false);\n };\n\n this.destroyResize = function () {\n destroyWindowResize();\n destroyDomResize();\n\n _this.destroyResize = null;\n };\n }\n }\n };\n\n var mixins = [core$1];\n\n /**\n * The slide mode config\n */\n var config = {\n // vuescroll\n vuescroll: {\n // pullRefresh or pushLoad is only for the slide mode...\n pullRefresh: {\n enable: false,\n tips: {\n deactive: 'Pull to Refresh',\n active: 'Release to Refresh',\n start: 'Refreshing...',\n beforeDeactive: 'Refresh Successfully!'\n }\n },\n pushLoad: {\n enable: false,\n tips: {\n deactive: 'Push to Load',\n active: 'Release to Load',\n start: 'Loading...',\n beforeDeactive: 'Load Successfully!'\n },\n auto: false,\n autoLoadDistance: 0\n },\n paging: false,\n zooming: true,\n snapping: {\n enable: false,\n width: 100,\n height: 100\n },\n /* shipped scroll options */\n scroller: {\n /** Enable bouncing (content can be slowly moved outside and jumps back after releasing) */\n bouncing: true,\n /** Enable locking to the main axis if user moves only slightly on one of them at start */\n locking: true,\n /** Minimum zoom level */\n minZoom: 0.5,\n /** Maximum zoom level */\n maxZoom: 3,\n /** Multiply or decrease scrolling speed **/\n speedMultiplier: 1,\n /** This configures the amount of change applied to deceleration when reaching boundaries **/\n penetrationDeceleration: 0.03,\n /** This configures the amount of change applied to acceleration when reaching boundaries **/\n penetrationAcceleration: 0.08,\n /** Whether call e.preventDefault event when sliding the content or not */\n preventDefault: false,\n /** Whether call preventDefault when (mouse/touch)move*/\n preventDefaultOnMove: true\n }\n }\n };\n /**\n * validate the options\n * @export\n * @param {any} ops\n */\n function validator(ops) {\n var renderError = false;\n var vuescroll = ops.vuescroll;\n\n // validate pushLoad, pullReresh, snapping\n\n if (vuescroll.paging == vuescroll.snapping.enable && vuescroll.paging && (vuescroll.pullRefresh || vuescroll.pushLoad)) {\n error('paging, snapping, (pullRefresh with pushLoad) can only one of them to be true.');\n }\n\n return renderError;\n }\n\n /**\n * The native mode config\n */\n\n var config$1 = {\n //\n scrollContent: {\n padding: false\n }\n };\n /**\n * validate the options\n * @export\n * @param {any} ops\n */\n function validator$1() {\n var renderError = false;\n return renderError;\n }\n\n var config$2 = {\n // vuescroll\n vuescroll: {\n mode: 'native'\n }\n };\n /**\n * validate the options\n * @export\n * @param {any} ops\n */\n function validator$2(ops) {\n var renderError = false;\n var vuescroll = ops.vuescroll;\n\n // validate modes\n\n if (!~modes.indexOf(vuescroll.mode)) {\n error('Unknown mode: ' + vuescroll.mode + ',the vuescroll\\'s option \"mode\" should be one of the ' + modes);\n renderError = true;\n }\n\n return renderError;\n }\n\n var configs = [config$2, config, config$1];\n var validators = [validator$2, validator, validator$1];\n\n function install(Vue$$1) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n opts._components = [scrollPanel, bar];\n opts.mixins = mixins;\n opts.render = createPanel$2;\n opts.Vue = Vue$$1;\n opts.config = configs;\n opts.validator = validators;\n\n _install(opts);\n }\n\n var Vuescroll = {\n install: install,\n version: '4.9.0-beta.15',\n refreshAll: refreshAll,\n scrollTo: scrollTo\n };\n\n /* istanbul ignore if */\n if (typeof window !== 'undefined' && window.Vue) {\n window.Vue.use(Vuescroll);\n }\n\n return Vuescroll;\n\n})));\n","'use strict';\n/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\n\nmodule.exports = NATIVE_SYMBOL &&\n !Symbol.sham &&\n typeof Symbol.iterator == 'symbol';\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar $Object = Object;\nvar split = uncurryThis(''.split);\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !$Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) === 'String' ? split(it, '') : $Object(it);\n} : $Object;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","import Component, { mixins } from 'vue-class-component';\nimport { I18nMixin } from '../helpers/i18n';\nimport { uid } from '../helpers/utils';\n\n@Component\nexport default class Base extends mixins(I18nMixin) {\n declare public $el: HTMLElement;\n\n public uniqId: string;\n\n public beforeCreate(): void {\n this.uniqId = uid();\n }\n}\n","\n\n\n\n\n\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent(\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */,\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options =\n typeof scriptExports === 'function' ? scriptExports.options : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) {\n // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection(h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","import { render, staticRenderFns } from \"./Accordion.vue?vue&type=template&id=0b4ee900\"\nimport script from \"./Accordion.vue?vue&type=script&lang=ts\"\nexport * from \"./Accordion.vue?vue&type=script&lang=ts\"\nimport style0 from \"./Accordion.vue?vue&type=style&index=0&id=0b4ee900&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',[_vm._t(\"title\"),_vm._v(\" \"),(_vm.showButton)?_c('div',{staticClass:\"g-container c-collapse\"},[_c('button',{staticClass:\"u-pull-right c-button c-button--small c-button--transparent c-button--expand c-button--aqua c-collapse__button\",style:({'margin-top': _vm.moveTop}),attrs:{\"type\":\"button\"},domProps:{\"innerHTML\":_vm._s(_vm.expandLabel)},on:{\"click\":function($event){_vm.expand(!_vm.isExpanded())}}})]):_vm._e(),_vm._v(\" \"),_vm._t(\"default\")],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n \n \n\n\n\n \n \n\n\n\n\n\n","import { render, staticRenderFns } from \"./AccordionItem.vue?vue&type=template&id=e3709558\"\nimport script from \"./AccordionItem.vue?vue&type=script&lang=ts\"\nexport * from \"./AccordionItem.vue?vue&type=script&lang=ts\"\nimport style0 from \"./AccordionItem.vue?vue&type=style&index=0&id=e3709558&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{class:{'is-active': _vm.isOpened}},[_c('div',{staticClass:\"v-accordion-item__top\",on:{\"click\":_vm.onClick}},[_vm._t(\"title\",null,{\"isExpanded\":_vm.isOpened})],2),_vm._v(\" \"),_c('div',{staticClass:\"v-accordion-item__content\",style:({'height': _vm.isOpened ? 'auto' : '0', 'overflow': 'hidden'})},[_vm._t(\"content\",null,{\"isExpanded\":_vm.isOpened})],2)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { createDecorator } from 'vue-class-component';\n\nexport const FunctionalComponent = createDecorator((options) => {\n (options as any).functional = true;\n});\n","import cookies from 'js-cookie';\nimport { CreateElement, VNode } from 'vue';\nimport { Component, Vue } from 'vue-property-decorator';\nimport { FunctionalComponent } from '../decorators';\n\n@Component\n@FunctionalComponent\nexport default class AdminBar extends Vue {\n protected render(createElement: CreateElement): VNode {\n if (!cookies.get('SHOW_ADMIN_BAR')) {\n return createElement();\n }\n\n const editUrl = window.africaOptions.page.editUrl;\n const status = window.africaOptions.page.status;\n if (!editUrl || !status) {\n return createElement();\n }\n // Currently we able to show only published and draft posts.\n const POST_STATUS_PUBLISH = 'publish';\n\n const nodes = [\n createElement('a', {\n attrs: {\n href: '/cms/wp-admin',\n },\n style: {\n marginRight: '6px',\n },\n }, [\n createElement('i', { staticClass: 'u-fa u-fa-dashboard', staticStyle: { marginRight: '6px' }}),\n 'Dashboard',\n ]),\n ];\n\n if (editUrl) {\n let label = 'Edit Page';\n if (status && status !== POST_STATUS_PUBLISH) {\n label += ' (draft)';\n }\n nodes.push(createElement('a', {\n attrs: {\n href: editUrl,\n },\n }, [\n createElement('i', { staticClass: 'u-fa u-fa-pencil', staticStyle: { marginRight: '6px' }}),\n label,\n ]));\n }\n\n document.body.classList.add('has-admin-bar');\n\n return createElement('div', {\n staticClass: 'c-admin-bar',\n }, nodes);\n }\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"is-loaded\"},[_c('form',{staticClass:\"c-form c-form--bordered c-form--online-payment\",attrs:{\"novalidate\":\"\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.onSubmit.apply(null, arguments)}}},[_c('div',{staticClass:\"c-form__header\"},[_c('div',{staticClass:\"u-text-large u-text-strong\"},[_vm._v(_vm._s(_vm.t('Start your payment')))]),_vm._v(\" \"),_c('div',[_vm._v(_vm._s(_vm.t('Fill in your details below.')))])]),_vm._v(\" \"),_c('div',{staticClass:\"c-form__body\"},[_c('div',{staticClass:\"c-form__column\"},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.errors.gateway.length > 0),expression:\"errors.gateway.length > 0\"}],staticClass:\"c-control-group\"},[_c('div',{staticClass:\"c-help-block\"},_vm._l((_vm.errors.gateway),function(error){return _c('div',{domProps:{\"textContent\":_vm._s(error)}})}),0)]),_vm._v(\" \"),(_vm.cardsImageUrl)?_c('div',{staticClass:\"c-control-group\"},[_c('strong',{staticClass:\"u-h4 u-my-0\"},[_vm._v(_vm._s(_vm.t('We accept'))+\":\")]),_vm._v(\" \"),_c('img',{staticClass:\"u-image-adaptive u-my-2\",attrs:{\"src\":_vm.cardsImageUrl,\"alt\":\"\"}})]):_vm._e(),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.paymentChoose),expression:\"paymentChoose\"}],staticClass:\"c-control-group\"},[_c('strong',{staticClass:\"u-h4 u-mt-0 u-mb-3\"},[_vm._v(_vm._s(_vm.t('Select payment method'))+\":\")]),_vm._v(\" \"),_c('div',{staticClass:\"c-radio-group\"},[_c('div',{staticClass:\"c-radio c-radio--large\"},[_c('label',{staticClass:\"c-radio__label\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selectedPaymentType),expression:\"selectedPaymentType\"}],staticClass:\"c-radio__input\",class:{'active': _vm.selectedPaymentType === _vm.PAYMENT_TYPES.BANKING},attrs:{\"type\":\"radio\",\"name\":\"payment_type\"},domProps:{\"value\":_vm.PAYMENT_TYPES.BANKING,\"checked\":_vm._q(_vm.selectedPaymentType,_vm.PAYMENT_TYPES.BANKING)},on:{\"change\":function($event){_vm.selectedPaymentType=_vm.PAYMENT_TYPES.BANKING}}}),_vm._v(\" \"),_c('span',{staticClass:\"c-radio__icon\"}),_vm._v(\" \"),_c('span',{staticClass:\"c-radio__text\"},[_vm._v(_vm._s(_vm.t('Home Banking')))])])]),_vm._v(\" \"),_c('div',{staticClass:\"c-radio c-radio--large\"},[_c('label',{staticClass:\"c-radio__label\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selectedPaymentType),expression:\"selectedPaymentType\"}],staticClass:\"c-radio__input\",class:{'active': _vm.selectedPaymentType === _vm.PAYMENT_TYPES.CARD},attrs:{\"type\":\"radio\",\"name\":\"payment_type\"},domProps:{\"value\":_vm.PAYMENT_TYPES.CARD,\"checked\":_vm._q(_vm.selectedPaymentType,_vm.PAYMENT_TYPES.CARD)},on:{\"change\":function($event){_vm.selectedPaymentType=_vm.PAYMENT_TYPES.CARD}}}),_vm._v(\" \"),_c('span',{staticClass:\"c-radio__icon\"}),_vm._v(\" \"),_c('span',{staticClass:\"c-radio__text\"},[_vm._v(_vm._s(_vm.t('Pay with Card')))])])])])]),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.cardsChoose && _vm.additionalFee > 0 && _vm.selectedPaymentType === _vm.PAYMENT_TYPES.CARD),expression:\"cardsChoose && additionalFee > 0 && selectedPaymentType === PAYMENT_TYPES.CARD\"}],staticClass:\"c-control-group\"},[_c('div',{staticClass:\"c-radio-group\"},[_c('div',{staticClass:\"c-radio c-radio--large\"},[_c('label',{staticClass:\"c-radio__label\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selectedCardType),expression:\"selectedCardType\"}],staticClass:\"c-radio__input\",class:{'active': _vm.selectedCardType === _vm.CARD_TYPES.CREDIT},attrs:{\"type\":\"radio\",\"name\":\"card_type\"},domProps:{\"value\":_vm.CARD_TYPES.CREDIT,\"checked\":_vm._q(_vm.selectedCardType,_vm.CARD_TYPES.CREDIT)},on:{\"change\":function($event){_vm.selectedCardType=_vm.CARD_TYPES.CREDIT}}}),_vm._v(\" \"),_c('span',{staticClass:\"c-radio__icon\"}),_vm._v(\" \"),_c('span',{staticClass:\"c-radio__text\"},[_vm._v(_vm._s(_vm.creditCardLabel))])])]),_vm._v(\" \"),_c('div',{staticClass:\"c-radio c-radio--large\"},[_c('label',{staticClass:\"c-radio__label\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selectedCardType),expression:\"selectedCardType\"}],staticClass:\"c-radio__input\",class:{'active': _vm.selectedCardType === _vm.CARD_TYPES.DEBIT},attrs:{\"type\":\"radio\",\"name\":\"card_type\"},domProps:{\"value\":_vm.CARD_TYPES.DEBIT,\"checked\":_vm._q(_vm.selectedCardType,_vm.CARD_TYPES.DEBIT)},on:{\"change\":function($event){_vm.selectedCardType=_vm.CARD_TYPES.DEBIT}}}),_vm._v(\" \"),_c('span',{staticClass:\"c-radio__icon\"}),_vm._v(\" \"),_c('span',{staticClass:\"c-radio__text\"},[_vm._v(_vm._s(_vm.debitCardLabel))])])])])]),_vm._v(\" \"),_c('div',{staticClass:\"c-control-group\"},[_c('label',{staticClass:\"c-control-label\"},[_vm._v(_vm._s(_vm.t('Payment amount in GBP'))+\": \"),_c('span',{staticClass:\"u-text-danger\"},[_vm._v(\"*\")])]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.amount),expression:\"amount\"}],staticClass:\"c-input\",attrs:{\"type\":\"text\",\"name\":\"amount\",\"placeholder\":\"0.00\",\"autocomplete\":\"off\"},domProps:{\"value\":(_vm.amount)},on:{\"input\":function($event){if($event.target.composing)return;_vm.amount=$event.target.value}}})]),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showFee),expression:\"showFee\"}],staticClass:\"c-control-group\"},[_c('label',{staticClass:\"c-control-label\"},[_vm._v(_vm._s(_vm.t('Total amount'))+\" (\"+_vm._s(_vm.t('Credit card fee'))+\" \"+_vm._s(_vm.additionalFee)+\"%):\")]),_vm._v(\" \"),_c('input',{staticClass:\"c-input\",attrs:{\"type\":\"text\",\"name\":\"total-amount\",\"disabled\":\"\"},domProps:{\"value\":_vm.total}})]),_vm._v(\" \"),_c('div',{staticClass:\"c-control-group\"},[_c('label',{staticClass:\"c-control-label\"},[_vm._v(_vm._s(_vm.t('Invoice or quote reference no.'))+\": \"),_c('span',{staticClass:\"u-text-danger\"},[_vm._v(\"*\")])]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.invoice),expression:\"invoice\"}],staticClass:\"c-input\",class:{'has-error': _vm.errors.invoice.length > 0},attrs:{\"type\":\"text\",\"name\":\"invoice\",\"placeholder\":\"123456\",\"autocomplete\":\"off\"},domProps:{\"value\":(_vm.invoice)},on:{\"input\":function($event){if($event.target.composing)return;_vm.invoice=$event.target.value}}}),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.errors.invoice.length > 0),expression:\"errors.invoice.length > 0\"}],staticClass:\"c-help-block\"},_vm._l((_vm.errors.invoice),function(error){return _c('div',{domProps:{\"textContent\":_vm._s(error)}})}),0)]),_vm._v(\" \"),_c('div',{staticClass:\"c-control-group\"},[_c('label',{staticClass:\"c-control-label\"},[_vm._v(_vm._s(_vm.t('Name'))+\": \"),_c('span',{staticClass:\"u-text-danger\"},[_vm._v(\"*\")])]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.name),expression:\"name\"}],staticClass:\"c-input\",class:{'has-error': _vm.errors.person.length > 0},attrs:{\"type\":\"text\",\"autocomplete\":\"name\",\"name\":\"name\"},domProps:{\"value\":(_vm.name)},on:{\"input\":function($event){if($event.target.composing)return;_vm.name=$event.target.value}}}),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.errors.person.length > 0),expression:\"errors.person.length > 0\"}],staticClass:\"c-help-block\"},_vm._l((_vm.errors.person),function(error){return _c('div',{domProps:{\"textContent\":_vm._s(error)}})}),0)]),_vm._v(\" \"),_c('div',{staticClass:\"c-control-group u-mb-0\"},[_c('button',{staticClass:\"c-button c-button--primary c-button--block c-button--large u-text-uppercase u-px-2\",attrs:{\"type\":\"submit\",\"disabled\":_vm.hasErrors}},[_vm._v(\"\\n \"+_vm._s(_vm.t('Continue', 'payment'))+\"\\n \")])])])])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n \n \n\n\n\n \n \n\n \n\n\n\n","import { render, staticRenderFns } from \"./Altapay.vue?vue&type=template&id=57892029\"\nimport script from \"./Altapay.vue?vue&type=script&lang=ts\"\nexport * from \"./Altapay.vue?vue&type=script&lang=ts\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{directives:[{name:\"scroll\",rawName:\"v-scroll\",value:(_vm.handleScrollThrottled),expression:\"handleScrollThrottled\"}],class:{'v-anchor-navbar': true, 'c-anchor-navbar--fixed': _vm.isFixed, 'c-anchor-navbar--toggled': _vm.isToggled, 'c-anchor-navbar--mobile': _vm.isMenuTooBig}},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.isMounted),expression:\"isMounted\"}],ref:\"wrap\",staticClass:\"c-anchor-navbar__wrap\"},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.pinnedAnchor !== null && _vm.isToggled === false),expression:\"pinnedAnchor !== null && isToggled === false\"}],staticClass:\"c-anchor-navbar__toggle\"},[_c('button',{staticClass:\"c-anchor-navbar__trigger\",domProps:{\"textContent\":_vm._s(_vm.pinnedAnchor && _vm.pinnedAnchor.name)},on:{\"click\":_vm.toggle}})]),_vm._v(\" \"),_c('div',{class:{'c-anchor-navbar__inner': true, 'c-anchor-navbar__inner--toggled': _vm.isToggled}},_vm._l((_vm.scrollAnchors),function(anchor,index){return _c('a',{key:anchor.id,class:{'c-anchor-navbar__button': true, 'is-active': _vm.isActive(anchor), 'left-border': index === 0, 'right-border': index+1 === _vm.scrollAnchors.length },attrs:{\"href\":\"#\",\"role\":\"button\"},on:{\"click\":function($event){return _vm.onClick(anchor, $event)}}},[_c('span',{domProps:{\"textContent\":_vm._s(anchor.name)}})])}),0)])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*!\n * vuex v3.6.2\n * (c) 2021 Evan You\n * @license MIT\n */\nfunction applyMixin (Vue) {\n var version = Number(Vue.version.split('.')[0]);\n\n if (version >= 2) {\n Vue.mixin({ beforeCreate: vuexInit });\n } else {\n // override init and inject vuex init procedure\n // for 1.x backwards compatibility.\n var _init = Vue.prototype._init;\n Vue.prototype._init = function (options) {\n if ( options === void 0 ) options = {};\n\n options.init = options.init\n ? [vuexInit].concat(options.init)\n : vuexInit;\n _init.call(this, options);\n };\n }\n\n /**\n * Vuex init hook, injected into each instances init hooks list.\n */\n\n function vuexInit () {\n var options = this.$options;\n // store injection\n if (options.store) {\n this.$store = typeof options.store === 'function'\n ? options.store()\n : options.store;\n } else if (options.parent && options.parent.$store) {\n this.$store = options.parent.$store;\n }\n }\n}\n\nvar target = typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\nvar devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\nfunction devtoolPlugin (store) {\n if (!devtoolHook) { return }\n\n store._devtoolHook = devtoolHook;\n\n devtoolHook.emit('vuex:init', store);\n\n devtoolHook.on('vuex:travel-to-state', function (targetState) {\n store.replaceState(targetState);\n });\n\n store.subscribe(function (mutation, state) {\n devtoolHook.emit('vuex:mutation', mutation, state);\n }, { prepend: true });\n\n store.subscribeAction(function (action, state) {\n devtoolHook.emit('vuex:action', action, state);\n }, { prepend: true });\n}\n\n/**\n * Get the first item that pass the test\n * by second argument function\n *\n * @param {Array} list\n * @param {Function} f\n * @return {*}\n */\nfunction find (list, f) {\n return list.filter(f)[0]\n}\n\n/**\n * Deep copy the given object considering circular structure.\n * This function caches all nested objects and its copies.\n * If it detects circular structure, use cached copy to avoid infinite loop.\n *\n * @param {*} obj\n * @param {Array