(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["vendors~app"],{ /***/ "./node_modules/@babel/runtime/helpers/classCallCheck.js": /*!***************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } module.exports = _classCallCheck; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/createClass.js": /*!************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/createClass.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } module.exports = _createClass; /***/ }), /***/ "./node_modules/axios/index.js": /*!*************************************!*\ !*** ./node_modules/axios/index.js ***! \*************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(/*! ./lib/axios */ "./node_modules/axios/lib/axios.js"); /***/ }), /***/ "./node_modules/axios/lib/adapters/xhr.js": /*!************************************************!*\ !*** ./node_modules/axios/lib/adapters/xhr.js ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); var settle = __webpack_require__(/*! ./../core/settle */ "./node_modules/axios/lib/core/settle.js"); var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "./node_modules/axios/lib/helpers/buildURL.js"); var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "./node_modules/axios/lib/helpers/parseHeaders.js"); var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js"); var createError = __webpack_require__(/*! ../core/createError */ "./node_modules/axios/lib/core/createError.js"); module.exports = function xhrAdapter(config) { return new Promise(function dispatchXhrRequest(resolve, reject) { var requestData = config.data; var requestHeaders = config.headers; if (utils.isFormData(requestData)) { delete requestHeaders['Content-Type']; // Let the browser set it } var request = new XMLHttpRequest(); // HTTP basic authentication if (config.auth) { var username = config.auth.username || ''; var password = config.auth.password || ''; requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); } request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); // Set the request timeout in MS request.timeout = config.timeout; // Listen for ready state request.onreadystatechange = function handleLoad() { if (!request || request.readyState !== 4) { return; } // The request errored out and we didn't get a response, this will be // handled by onerror instead // With one exception: request that using file: protocol, most browsers // will return status as 0 even though it's a successful request if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { return; } // Prepare the response var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; var response = { data: responseData, status: request.status, statusText: request.statusText, headers: responseHeaders, config: config, request: request }; settle(resolve, reject, response); // Clean up request request = null; }; // Handle browser request cancellation (as opposed to a manual cancellation) request.onabort = function handleAbort() { if (!request) { return; } reject(createError('Request aborted', config, 'ECONNABORTED', request)); // Clean up request request = null; }; // Handle low level network errors request.onerror = function handleError() { // Real errors are hidden from us by the browser // onerror should only fire if it's a network error reject(createError('Network Error', config, null, request)); // Clean up request request = null; }; // Handle timeout request.ontimeout = function handleTimeout() { reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', request)); // Clean up request request = null; }; // Add xsrf header // This is only done if running in a standard browser environment. // Specifically not if we're in a web worker, or react-native. if (utils.isStandardBrowserEnv()) { var cookies = __webpack_require__(/*! ./../helpers/cookies */ "./node_modules/axios/lib/helpers/cookies.js"); // Add xsrf header var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined; if (xsrfValue) { requestHeaders[config.xsrfHeaderName] = xsrfValue; } } // Add headers to the request if ('setRequestHeader' in request) { utils.forEach(requestHeaders, function setRequestHeader(val, key) { if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { // Remove Content-Type if data is undefined delete requestHeaders[key]; } else { // Otherwise add header to the request request.setRequestHeader(key, val); } }); } // Add withCredentials to request if needed if (config.withCredentials) { request.withCredentials = true; } // Add responseType to request if needed if (config.responseType) { try { request.responseType = config.responseType; } catch (e) { // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. if (config.responseType !== 'json') { throw e; } } } // Handle progress if needed if (typeof config.onDownloadProgress === 'function') { request.addEventListener('progress', config.onDownloadProgress); } // Not all browsers support upload events if (typeof config.onUploadProgress === 'function' && request.upload) { request.upload.addEventListener('progress', config.onUploadProgress); } if (config.cancelToken) { // Handle cancellation config.cancelToken.promise.then(function onCanceled(cancel) { if (!request) { return; } request.abort(); reject(cancel); // Clean up request request = null; }); } if (requestData === undefined) { requestData = null; } // Send the request request.send(requestData); }); }; /***/ }), /***/ "./node_modules/axios/lib/axios.js": /*!*****************************************!*\ !*** ./node_modules/axios/lib/axios.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(/*! ./utils */ "./node_modules/axios/lib/utils.js"); var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/axios/lib/helpers/bind.js"); var Axios = __webpack_require__(/*! ./core/Axios */ "./node_modules/axios/lib/core/Axios.js"); var mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ "./node_modules/axios/lib/core/mergeConfig.js"); var defaults = __webpack_require__(/*! ./defaults */ "./node_modules/axios/lib/defaults.js"); /** * Create an instance of Axios * * @param {Object} defaultConfig The default config for the instance * @return {Axios} A new instance of Axios */ function createInstance(defaultConfig) { var context = new Axios(defaultConfig); var instance = bind(Axios.prototype.request, context); // Copy axios.prototype to instance utils.extend(instance, Axios.prototype, context); // Copy context to instance utils.extend(instance, context); return instance; } // Create the default instance to be exported var axios = createInstance(defaults); // Expose Axios class to allow class inheritance axios.Axios = Axios; // Factory for creating new instances axios.create = function create(instanceConfig) { return createInstance(mergeConfig(axios.defaults, instanceConfig)); }; // Expose Cancel & CancelToken axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "./node_modules/axios/lib/cancel/Cancel.js"); axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./node_modules/axios/lib/cancel/CancelToken.js"); axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js"); // Expose all/spread axios.all = function all(promises) { return Promise.all(promises); }; axios.spread = __webpack_require__(/*! ./helpers/spread */ "./node_modules/axios/lib/helpers/spread.js"); module.exports = axios; // Allow use of default import syntax in TypeScript module.exports.default = axios; /***/ }), /***/ "./node_modules/axios/lib/cancel/Cancel.js": /*!*************************************************!*\ !*** ./node_modules/axios/lib/cancel/Cancel.js ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * A `Cancel` is an object that is thrown when an operation is canceled. * * @class * @param {string=} message The message. */ function Cancel(message) { this.message = message; } Cancel.prototype.toString = function toString() { return 'Cancel' + (this.message ? ': ' + this.message : ''); }; Cancel.prototype.__CANCEL__ = true; module.exports = Cancel; /***/ }), /***/ "./node_modules/axios/lib/cancel/CancelToken.js": /*!******************************************************!*\ !*** ./node_modules/axios/lib/cancel/CancelToken.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Cancel = __webpack_require__(/*! ./Cancel */ "./node_modules/axios/lib/cancel/Cancel.js"); /** * A `CancelToken` is an object that can be used to request cancellation of an operation. * * @class * @param {Function} executor The executor function. */ function CancelToken(executor) { if (typeof executor !== 'function') { throw new TypeError('executor must be a function.'); } var resolvePromise; this.promise = new Promise(function promiseExecutor(resolve) { resolvePromise = resolve; }); var token = this; executor(function cancel(message) { if (token.reason) { // Cancellation has already been requested return; } token.reason = new Cancel(message); resolvePromise(token.reason); }); } /** * Throws a `Cancel` if cancellation has been requested. */ CancelToken.prototype.throwIfRequested = function throwIfRequested() { if (this.reason) { throw this.reason; } }; /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ CancelToken.source = function source() { var cancel; var token = new CancelToken(function executor(c) { cancel = c; }); return { token: token, cancel: cancel }; }; module.exports = CancelToken; /***/ }), /***/ "./node_modules/axios/lib/cancel/isCancel.js": /*!***************************************************!*\ !*** ./node_modules/axios/lib/cancel/isCancel.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function isCancel(value) { return !!(value && value.__CANCEL__); }; /***/ }), /***/ "./node_modules/axios/lib/core/Axios.js": /*!**********************************************!*\ !*** ./node_modules/axios/lib/core/Axios.js ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "./node_modules/axios/lib/helpers/buildURL.js"); var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./node_modules/axios/lib/core/InterceptorManager.js"); var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./node_modules/axios/lib/core/dispatchRequest.js"); var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "./node_modules/axios/lib/core/mergeConfig.js"); /** * Create a new instance of Axios * * @param {Object} instanceConfig The default config for the instance */ function Axios(instanceConfig) { this.defaults = instanceConfig; this.interceptors = { request: new InterceptorManager(), response: new InterceptorManager() }; } /** * Dispatch a request * * @param {Object} config The config specific for this request (merged with this.defaults) */ Axios.prototype.request = function request(config) { /*eslint no-param-reassign:0*/ // Allow for axios('example/url'[, config]) a la fetch API if (typeof config === 'string') { config = arguments[1] || {}; config.url = arguments[0]; } else { config = config || {}; } config = mergeConfig(this.defaults, config); config.method = config.method ? config.method.toLowerCase() : 'get'; // Hook up interceptors middleware var chain = [dispatchRequest, undefined]; var promise = Promise.resolve(config); this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { chain.unshift(interceptor.fulfilled, interceptor.rejected); }); this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { chain.push(interceptor.fulfilled, interceptor.rejected); }); while (chain.length) { promise = promise.then(chain.shift(), chain.shift()); } return promise; }; Axios.prototype.getUri = function getUri(config) { config = mergeConfig(this.defaults, config); return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); }; // Provide aliases for supported request methods utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { /*eslint func-names:0*/ Axios.prototype[method] = function(url, config) { return this.request(utils.merge(config || {}, { method: method, url: url })); }; }); utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { /*eslint func-names:0*/ Axios.prototype[method] = function(url, data, config) { return this.request(utils.merge(config || {}, { method: method, url: url, data: data })); }; }); module.exports = Axios; /***/ }), /***/ "./node_modules/axios/lib/core/InterceptorManager.js": /*!***********************************************************!*\ !*** ./node_modules/axios/lib/core/InterceptorManager.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); function InterceptorManager() { this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` * * @return {Number} An ID used to remove interceptor later */ InterceptorManager.prototype.use = function use(fulfilled, rejected) { this.handlers.push({ fulfilled: fulfilled, rejected: rejected }); return this.handlers.length - 1; }; /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` */ InterceptorManager.prototype.eject = function eject(id) { if (this.handlers[id]) { this.handlers[id] = null; } }; /** * Iterate over all the registered interceptors * * This method is particularly useful for skipping over any * interceptors that may have become `null` calling `eject`. * * @param {Function} fn The function to call for each interceptor */ InterceptorManager.prototype.forEach = function forEach(fn) { utils.forEach(this.handlers, function forEachHandler(h) { if (h !== null) { fn(h); } }); }; module.exports = InterceptorManager; /***/ }), /***/ "./node_modules/axios/lib/core/createError.js": /*!****************************************************!*\ !*** ./node_modules/axios/lib/core/createError.js ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var enhanceError = __webpack_require__(/*! ./enhanceError */ "./node_modules/axios/lib/core/enhanceError.js"); /** * Create an Error with the specified message, config, error code, request and response. * * @param {string} message The error message. * @param {Object} config The config. * @param {string} [code] The error code (for example, 'ECONNABORTED'). * @param {Object} [request] The request. * @param {Object} [response] The response. * @returns {Error} The created error. */ module.exports = function createError(message, config, code, request, response) { var error = new Error(message); return enhanceError(error, config, code, request, response); }; /***/ }), /***/ "./node_modules/axios/lib/core/dispatchRequest.js": /*!********************************************************!*\ !*** ./node_modules/axios/lib/core/dispatchRequest.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); var transformData = __webpack_require__(/*! ./transformData */ "./node_modules/axios/lib/core/transformData.js"); var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js"); var defaults = __webpack_require__(/*! ../defaults */ "./node_modules/axios/lib/defaults.js"); var isAbsoluteURL = __webpack_require__(/*! ./../helpers/isAbsoluteURL */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js"); var combineURLs = __webpack_require__(/*! ./../helpers/combineURLs */ "./node_modules/axios/lib/helpers/combineURLs.js"); /** * Throws a `Cancel` if cancellation has been requested. */ function throwIfCancellationRequested(config) { if (config.cancelToken) { config.cancelToken.throwIfRequested(); } } /** * Dispatch a request to the server using the configured adapter. * * @param {object} config The config that is to be used for the request * @returns {Promise} The Promise to be fulfilled */ module.exports = function dispatchRequest(config) { throwIfCancellationRequested(config); // Support baseURL config if (config.baseURL && !isAbsoluteURL(config.url)) { config.url = combineURLs(config.baseURL, config.url); } // Ensure headers exist config.headers = config.headers || {}; // Transform request data config.data = transformData( config.data, config.headers, config.transformRequest ); // Flatten headers config.headers = utils.merge( config.headers.common || {}, config.headers[config.method] || {}, config.headers || {} ); utils.forEach( ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function cleanHeaderConfig(method) { delete config.headers[method]; } ); var adapter = config.adapter || defaults.adapter; return adapter(config).then(function onAdapterResolution(response) { throwIfCancellationRequested(config); // Transform response data response.data = transformData( response.data, response.headers, config.transformResponse ); return response; }, function onAdapterRejection(reason) { if (!isCancel(reason)) { throwIfCancellationRequested(config); // Transform response data if (reason && reason.response) { reason.response.data = transformData( reason.response.data, reason.response.headers, config.transformResponse ); } } return Promise.reject(reason); }); }; /***/ }), /***/ "./node_modules/axios/lib/core/enhanceError.js": /*!*****************************************************!*\ !*** ./node_modules/axios/lib/core/enhanceError.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Update an Error with the specified config, error code, and response. * * @param {Error} error The error to update. * @param {Object} config The config. * @param {string} [code] The error code (for example, 'ECONNABORTED'). * @param {Object} [request] The request. * @param {Object} [response] The response. * @returns {Error} The error. */ module.exports = function enhanceError(error, config, code, request, response) { error.config = config; if (code) { error.code = code; } error.request = request; error.response = response; error.isAxiosError = true; error.toJSON = function() { return { // Standard message: this.message, name: this.name, // Microsoft description: this.description, number: this.number, // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, // Axios config: this.config, code: this.code }; }; return error; }; /***/ }), /***/ "./node_modules/axios/lib/core/mergeConfig.js": /*!****************************************************!*\ !*** ./node_modules/axios/lib/core/mergeConfig.js ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js"); /** * Config-specific merge-function which creates a new config-object * by merging two configuration objects together. * * @param {Object} config1 * @param {Object} config2 * @returns {Object} New object resulting from merging config2 to config1 */ module.exports = function mergeConfig(config1, config2) { // eslint-disable-next-line no-param-reassign config2 = config2 || {}; var config = {}; utils.forEach(['url', 'method', 'params', 'data'], function valueFromConfig2(prop) { if (typeof config2[prop] !== 'undefined') { config[prop] = config2[prop]; } }); utils.forEach(['headers', 'auth', 'proxy'], function mergeDeepProperties(prop) { if (utils.isObject(config2[prop])) { config[prop] = utils.deepMerge(config1[prop], config2[prop]); } else if (typeof config2[prop] !== 'undefined') { config[prop] = config2[prop]; } else if (utils.isObject(config1[prop])) { config[prop] = utils.deepMerge(config1[prop]); } else if (typeof config1[prop] !== 'undefined') { config[prop] = config1[prop]; } }); utils.forEach([ 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken', 'socketPath' ], function defaultToConfig2(prop) { if (typeof config2[prop] !== 'undefined') { config[prop] = config2[prop]; } else if (typeof config1[prop] !== 'undefined') { config[prop] = config1[prop]; } }); return config; }; /***/ }), /***/ "./node_modules/axios/lib/core/settle.js": /*!***********************************************!*\ !*** ./node_modules/axios/lib/core/settle.js ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var createError = __webpack_require__(/*! ./createError */ "./node_modules/axios/lib/core/createError.js"); /** * Resolve or reject a Promise based on response status. * * @param {Function} resolve A function that resolves the promise. * @param {Function} reject A function that rejects the promise. * @param {object} response The response. */ module.exports = function settle(resolve, reject, response) { var validateStatus = response.config.validateStatus; if (!validateStatus || validateStatus(response.status)) { resolve(response); } else { reject(createError( 'Request failed with status code ' + response.status, response.config, null, response.request, response )); } }; /***/ }), /***/ "./node_modules/axios/lib/core/transformData.js": /*!******************************************************!*\ !*** ./node_modules/axios/lib/core/transformData.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); /** * Transform the data for a request or a response * * @param {Object|String} data The data to be transformed * @param {Array} headers The headers for the request or response * @param {Array|Function} fns A single function or Array of functions * @returns {*} The resulting transformed data */ module.exports = function transformData(data, headers, fns) { /*eslint no-param-reassign:0*/ utils.forEach(fns, function transform(fn) { data = fn(data, headers); }); return data; }; /***/ }), /***/ "./node_modules/axios/lib/defaults.js": /*!********************************************!*\ !*** ./node_modules/axios/lib/defaults.js ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { var utils = __webpack_require__(/*! ./utils */ "./node_modules/axios/lib/utils.js"); var normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ "./node_modules/axios/lib/helpers/normalizeHeaderName.js"); var DEFAULT_CONTENT_TYPE = { 'Content-Type': 'application/x-www-form-urlencoded' }; function setContentTypeIfUnset(headers, value) { if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { headers['Content-Type'] = value; } } function getDefaultAdapter() { var adapter; // Only Node.JS has a process variable that is of [[Class]] process if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { // For node use HTTP adapter adapter = __webpack_require__(/*! ./adapters/http */ "./node_modules/axios/lib/adapters/xhr.js"); } else if (typeof XMLHttpRequest !== 'undefined') { // For browsers use XHR adapter adapter = __webpack_require__(/*! ./adapters/xhr */ "./node_modules/axios/lib/adapters/xhr.js"); } return adapter; } var defaults = { adapter: getDefaultAdapter(), transformRequest: [function transformRequest(data, headers) { normalizeHeaderName(headers, 'Accept'); normalizeHeaderName(headers, 'Content-Type'); if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data) ) { return data; } if (utils.isArrayBufferView(data)) { return data.buffer; } if (utils.isURLSearchParams(data)) { setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); return data.toString(); } if (utils.isObject(data)) { setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); return JSON.stringify(data); } return data; }], transformResponse: [function transformResponse(data) { /*eslint no-param-reassign:0*/ if (typeof data === 'string') { try { data = JSON.parse(data); } catch (e) { /* Ignore */ } } return data; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a * timeout is not created. */ timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, validateStatus: function validateStatus(status) { return status >= 200 && status < 300; } }; defaults.headers = { common: { 'Accept': 'application/json, text/plain, */*' } }; utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { defaults.headers[method] = {}; }); utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); }); module.exports = defaults; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js"))) /***/ }), /***/ "./node_modules/axios/lib/helpers/bind.js": /*!************************************************!*\ !*** ./node_modules/axios/lib/helpers/bind.js ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function bind(fn, thisArg) { return function wrap() { var args = new Array(arguments.length); for (var i = 0; i < args.length; i++) { args[i] = arguments[i]; } return fn.apply(thisArg, args); }; }; /***/ }), /***/ "./node_modules/axios/lib/helpers/buildURL.js": /*!****************************************************!*\ !*** ./node_modules/axios/lib/helpers/buildURL.js ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); function encode(val) { return encodeURIComponent(val). replace(/%40/gi, '@'). replace(/%3A/gi, ':'). replace(/%24/g, '$'). replace(/%2C/gi, ','). replace(/%20/g, '+'). replace(/%5B/gi, '['). replace(/%5D/gi, ']'); } /** * Build a URL by appending params to the end * * @param {string} url The base of the url (e.g., http://www.google.com) * @param {object} [params] The params to be appended * @returns {string} The formatted url */ module.exports = function buildURL(url, params, paramsSerializer) { /*eslint no-param-reassign:0*/ if (!params) { return url; } var serializedParams; if (paramsSerializer) { serializedParams = paramsSerializer(params); } else if (utils.isURLSearchParams(params)) { serializedParams = params.toString(); } else { var parts = []; utils.forEach(params, function serialize(val, key) { if (val === null || typeof val === 'undefined') { return; } if (utils.isArray(val)) { key = key + '[]'; } else { val = [val]; } utils.forEach(val, function parseValue(v) { if (utils.isDate(v)) { v = v.toISOString(); } else if (utils.isObject(v)) { v = JSON.stringify(v); } parts.push(encode(key) + '=' + encode(v)); }); }); serializedParams = parts.join('&'); } if (serializedParams) { var hashmarkIndex = url.indexOf('#'); if (hashmarkIndex !== -1) { url = url.slice(0, hashmarkIndex); } url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; } return url; }; /***/ }), /***/ "./node_modules/axios/lib/helpers/combineURLs.js": /*!*******************************************************!*\ !*** ./node_modules/axios/lib/helpers/combineURLs.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Creates a new URL by combining the specified URLs * * @param {string} baseURL The base URL * @param {string} relativeURL The relative URL * @returns {string} The combined URL */ module.exports = function combineURLs(baseURL, relativeURL) { return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; }; /***/ }), /***/ "./node_modules/axios/lib/helpers/cookies.js": /*!***************************************************!*\ !*** ./node_modules/axios/lib/helpers/cookies.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); module.exports = ( utils.isStandardBrowserEnv() ? // Standard browser envs support document.cookie (function standardBrowserEnv() { return { write: function write(name, value, expires, path, domain, secure) { var cookie = []; cookie.push(name + '=' + encodeURIComponent(value)); if (utils.isNumber(expires)) { cookie.push('expires=' + new Date(expires).toGMTString()); } if (utils.isString(path)) { cookie.push('path=' + path); } if (utils.isString(domain)) { cookie.push('domain=' + domain); } if (secure === true) { cookie.push('secure'); } document.cookie = cookie.join('; '); }, read: function read(name) { var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); return (match ? decodeURIComponent(match[3]) : null); }, remove: function remove(name) { this.write(name, '', Date.now() - 86400000); } }; })() : // Non standard browser env (web workers, react-native) lack needed support. (function nonStandardBrowserEnv() { return { write: function write() {}, read: function read() { return null; }, remove: function remove() {} }; })() ); /***/ }), /***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js": /*!*********************************************************!*\ !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Determines whether the specified URL is absolute * * @param {string} url The URL to test * @returns {boolean} True if the specified URL is absolute, otherwise false */ module.exports = function isAbsoluteURL(url) { // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed // by any combination of letters, digits, plus, period, or hyphen. return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); }; /***/ }), /***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js": /*!***********************************************************!*\ !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); module.exports = ( utils.isStandardBrowserEnv() ? // Standard browser envs have full support of the APIs needed to test // whether the request URL is of the same origin as current location. (function standardBrowserEnv() { var msie = /(msie|trident)/i.test(navigator.userAgent); var urlParsingNode = document.createElement('a'); var originURL; /** * Parse a URL to discover it's components * * @param {String} url The URL to be parsed * @returns {Object} */ function resolveURL(url) { var href = url; if (msie) { // IE needs attribute set twice to normalize properties urlParsingNode.setAttribute('href', href); href = urlParsingNode.href; } urlParsingNode.setAttribute('href', href); // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils return { href: urlParsingNode.href, protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', host: urlParsingNode.host, search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', hostname: urlParsingNode.hostname, port: urlParsingNode.port, pathname: (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname : '/' + urlParsingNode.pathname }; } originURL = resolveURL(window.location.href); /** * Determine if a URL shares the same origin as the current location * * @param {String} requestURL The URL to test * @returns {boolean} True if URL shares the same origin, otherwise false */ return function isURLSameOrigin(requestURL) { var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; return (parsed.protocol === originURL.protocol && parsed.host === originURL.host); }; })() : // Non standard browser envs (web workers, react-native) lack needed support. (function nonStandardBrowserEnv() { return function isURLSameOrigin() { return true; }; })() ); /***/ }), /***/ "./node_modules/axios/lib/helpers/normalizeHeaderName.js": /*!***************************************************************!*\ !*** ./node_modules/axios/lib/helpers/normalizeHeaderName.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js"); module.exports = function normalizeHeaderName(headers, normalizedName) { utils.forEach(headers, function processHeader(value, name) { if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { headers[normalizedName] = value; delete headers[name]; } }); }; /***/ }), /***/ "./node_modules/axios/lib/helpers/parseHeaders.js": /*!********************************************************!*\ !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js"); // Headers whose duplicates are ignored by node // c.f. https://nodejs.org/api/http.html#http_message_headers var ignoreDuplicateOf = [ 'age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent' ]; /** * Parse headers into an object * * ``` * Date: Wed, 27 Aug 2014 08:58:49 GMT * Content-Type: application/json * Connection: keep-alive * Transfer-Encoding: chunked * ``` * * @param {String} headers Headers needing to be parsed * @returns {Object} Headers parsed into an object */ module.exports = function parseHeaders(headers) { var parsed = {}; var key; var val; var i; if (!headers) { return parsed; } utils.forEach(headers.split('\n'), function parser(line) { i = line.indexOf(':'); key = utils.trim(line.substr(0, i)).toLowerCase(); val = utils.trim(line.substr(i + 1)); if (key) { if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { return; } if (key === 'set-cookie') { parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); } else { parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; } } }); return parsed; }; /***/ }), /***/ "./node_modules/axios/lib/helpers/spread.js": /*!**************************************************!*\ !*** ./node_modules/axios/lib/helpers/spread.js ***! \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Syntactic sugar for invoking a function and expanding an array for arguments. * * Common use case would be to use `Function.prototype.apply`. * * ```js * function f(x, y, z) {} * var args = [1, 2, 3]; * f.apply(null, args); * ``` * * With `spread` this example can be re-written. * * ```js * spread(function(x, y, z) {})([1, 2, 3]); * ``` * * @param {Function} callback * @returns {Function} */ module.exports = function spread(callback) { return function wrap(arr) { return callback.apply(null, arr); }; }; /***/ }), /***/ "./node_modules/axios/lib/utils.js": /*!*****************************************!*\ !*** ./node_modules/axios/lib/utils.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/axios/lib/helpers/bind.js"); var isBuffer = __webpack_require__(/*! is-buffer */ "./node_modules/axios/node_modules/is-buffer/index.js"); /*global toString:true*/ // utils is a library of generic helper functions non-specific to axios var toString = Object.prototype.toString; /** * Determine if a value is an Array * * @param {Object} val The value to test * @returns {boolean} True if value is an Array, otherwise false */ function isArray(val) { return toString.call(val) === '[object Array]'; } /** * Determine if a value is an ArrayBuffer * * @param {Object} val The value to test * @returns {boolean} True if value is an ArrayBuffer, otherwise false */ function isArrayBuffer(val) { return toString.call(val) === '[object ArrayBuffer]'; } /** * Determine if a value is a FormData * * @param {Object} val The value to test * @returns {boolean} True if value is an FormData, otherwise false */ function isFormData(val) { return (typeof FormData !== 'undefined') && (val instanceof FormData); } /** * Determine if a value is a view on an ArrayBuffer * * @param {Object} val The value to test * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false */ function isArrayBufferView(val) { var result; if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { result = ArrayBuffer.isView(val); } else { result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); } return result; } /** * Determine if a value is a String * * @param {Object} val The value to test * @returns {boolean} True if value is a String, otherwise false */ function isString(val) { return typeof val === 'string'; } /** * Determine if a value is a Number * * @param {Object} val The value to test * @returns {boolean} True if value is a Number, otherwise false */ function isNumber(val) { return typeof val === 'number'; } /** * Determine if a value is undefined * * @param {Object} val The value to test * @returns {boolean} True if the value is undefined, otherwise false */ function isUndefined(val) { return typeof val === 'undefined'; } /** * Determine if a value is an Object * * @param {Object} val The value to test * @returns {boolean} True if value is an Object, otherwise false */ function isObject(val) { return val !== null && typeof val === 'object'; } /** * Determine if a value is a Date * * @param {Object} val The value to test * @returns {boolean} True if value is a Date, otherwise false */ function isDate(val) { return toString.call(val) === '[object Date]'; } /** * Determine if a value is a File * * @param {Object} val The value to test * @returns {boolean} True if value is a File, otherwise false */ function isFile(val) { return toString.call(val) === '[object File]'; } /** * Determine if a value is a Blob * * @param {Object} val The value to test * @returns {boolean} True if value is a Blob, otherwise false */ function isBlob(val) { return toString.call(val) === '[object Blob]'; } /** * Determine if a value is a Function * * @param {Object} val The value to test * @returns {boolean} True if value is a Function, otherwise false */ function isFunction(val) { return toString.call(val) === '[object Function]'; } /** * Determine if a value is a Stream * * @param {Object} val The value to test * @returns {boolean} True if value is a Stream, otherwise false */ function isStream(val) { return isObject(val) && isFunction(val.pipe); } /** * Determine if a value is a URLSearchParams object * * @param {Object} val The value to test * @returns {boolean} True if value is a URLSearchParams object, otherwise false */ function isURLSearchParams(val) { return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; } /** * Trim excess whitespace off the beginning and end of a string * * @param {String} str The String to trim * @returns {String} The String freed of excess whitespace */ function trim(str) { return str.replace(/^\s*/, '').replace(/\s*$/, ''); } /** * Determine if we're running in a standard browser environment * * This allows axios to run in a web worker, and react-native. * Both environments support XMLHttpRequest, but not fully standard globals. * * web workers: * typeof window -> undefined * typeof document -> undefined * * react-native: * navigator.product -> 'ReactNative' * nativescript * navigator.product -> 'NativeScript' or 'NS' */ function isStandardBrowserEnv() { if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || navigator.product === 'NativeScript' || navigator.product === 'NS')) { return false; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ); } /** * Iterate over an Array or an Object invoking a function for each item. * * If `obj` is an Array callback will be called passing * the value, index, and complete array for each item. * * If 'obj' is an Object callback will be called passing * the value, key, and complete object for each property. * * @param {Object|Array} obj The object to iterate * @param {Function} fn The callback to invoke for each item */ function forEach(obj, fn) { // Don't bother if no value provided if (obj === null || typeof obj === 'undefined') { return; } // Force an array if not already something iterable if (typeof obj !== 'object') { /*eslint no-param-reassign:0*/ obj = [obj]; } if (isArray(obj)) { // Iterate over array values for (var i = 0, l = obj.length; i < l; i++) { fn.call(null, obj[i], i, obj); } } else { // Iterate over object keys for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { fn.call(null, obj[key], key, obj); } } } } /** * Accepts varargs expecting each argument to be an object, then * immutably merges the properties of each object and returns result. * * When multiple objects contain the same key the later object in * the arguments list will take precedence. * * Example: * * ```js * var result = merge({foo: 123}, {foo: 456}); * console.log(result.foo); // outputs 456 * ``` * * @param {Object} obj1 Object to merge * @returns {Object} Result of all merge properties */ function merge(/* obj1, obj2, obj3, ... */) { var result = {}; function assignValue(val, key) { if (typeof result[key] === 'object' && typeof val === 'object') { result[key] = merge(result[key], val); } else { result[key] = val; } } for (var i = 0, l = arguments.length; i < l; i++) { forEach(arguments[i], assignValue); } return result; } /** * Function equal to merge with the difference being that no reference * to original objects is kept. * * @see merge * @param {Object} obj1 Object to merge * @returns {Object} Result of all merge properties */ function deepMerge(/* obj1, obj2, obj3, ... */) { var result = {}; function assignValue(val, key) { if (typeof result[key] === 'object' && typeof val === 'object') { result[key] = deepMerge(result[key], val); } else if (typeof val === 'object') { result[key] = deepMerge({}, val); } else { result[key] = val; } } for (var i = 0, l = arguments.length; i < l; i++) { forEach(arguments[i], assignValue); } return result; } /** * Extends object a by mutably adding to it the properties of object b. * * @param {Object} a The object to be extended * @param {Object} b The object to copy properties from * @param {Object} thisArg The object to bind function to * @return {Object} The resulting value of object a */ function extend(a, b, thisArg) { forEach(b, function assignValue(val, key) { if (thisArg && typeof val === 'function') { a[key] = bind(val, thisArg); } else { a[key] = val; } }); return a; } module.exports = { isArray: isArray, isArrayBuffer: isArrayBuffer, isBuffer: isBuffer, isFormData: isFormData, isArrayBufferView: isArrayBufferView, isString: isString, isNumber: isNumber, isObject: isObject, isUndefined: isUndefined, isDate: isDate, isFile: isFile, isBlob: isBlob, isFunction: isFunction, isStream: isStream, isURLSearchParams: isURLSearchParams, isStandardBrowserEnv: isStandardBrowserEnv, forEach: forEach, merge: merge, deepMerge: deepMerge, extend: extend, trim: trim }; /***/ }), /***/ "./node_modules/axios/node_modules/is-buffer/index.js": /*!************************************************************!*\ !*** ./node_modules/axios/node_modules/is-buffer/index.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ module.exports = function isBuffer (obj) { return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) } /***/ }), /***/ "./node_modules/core-js/internals/a-function.js": /*!******************************************************!*\ !*** ./node_modules/core-js/internals/a-function.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function (it) { if (typeof it != 'function') { throw TypeError(String(it) + ' is not a function'); } return it; }; /***/ }), /***/ "./node_modules/core-js/internals/a-possible-prototype.js": /*!****************************************************************!*\ !*** ./node_modules/core-js/internals/a-possible-prototype.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js"); module.exports = function (it) { if (!isObject(it) && it !== null) { throw TypeError("Can't set " + String(it) + ' as a prototype'); } return it; }; /***/ }), /***/ "./node_modules/core-js/internals/advance-string-index.js": /*!****************************************************************!*\ !*** ./node_modules/core-js/internals/advance-string-index.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var charAt = __webpack_require__(/*! ../internals/string-multibyte */ "./node_modules/core-js/internals/string-multibyte.js").charAt; // `AdvanceStringIndex` abstract operation // https://tc39.github.io/ecma262/#sec-advancestringindex module.exports = function (S, index, unicode) { return index + (unicode ? charAt(S, index).length : 1); }; /***/ }), /***/ "./node_modules/core-js/internals/an-object.js": /*!*****************************************************!*\ !*** ./node_modules/core-js/internals/an-object.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js"); module.exports = function (it) { if (!isObject(it)) { throw TypeError(String(it) + ' is not an object'); } return it; }; /***/ }), /***/ "./node_modules/core-js/internals/array-for-each.js": /*!**********************************************************!*\ !*** ./node_modules/core-js/internals/array-for-each.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").forEach; var sloppyArrayMethod = __webpack_require__(/*! ../internals/sloppy-array-method */ "./node_modules/core-js/internals/sloppy-array-method.js"); // `Array.prototype.forEach` method implementation // https://tc39.github.io/ecma262/#sec-array.prototype.foreach module.exports = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) { return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } : [].forEach; /***/ }), /***/ "./node_modules/core-js/internals/array-includes.js": /*!**********************************************************!*\ !*** ./node_modules/core-js/internals/array-includes.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js"); var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js"); var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js"); // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject($this); var length = toLength(O.length); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) { if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; module.exports = { // `Array.prototype.includes` method // https://tc39.github.io/ecma262/#sec-array.prototype.includes includes: createMethod(true), // `Array.prototype.indexOf` method // https://tc39.github.io/ecma262/#sec-array.prototype.indexof indexOf: createMethod(false) }; /***/ }), /***/ "./node_modules/core-js/internals/array-iteration.js": /*!***********************************************************!*\ !*** ./node_modules/core-js/internals/array-iteration.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var bind = __webpack_require__(/*! ../internals/bind-context */ "./node_modules/core-js/internals/bind-context.js"); var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js"); var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js"); var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js"); var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "./node_modules/core-js/internals/array-species-create.js"); var push = [].push; // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation var createMethod = function (TYPE) { var IS_MAP = TYPE == 1; var IS_FILTER = TYPE == 2; var IS_SOME = TYPE == 3; var IS_EVERY = TYPE == 4; var IS_FIND_INDEX = TYPE == 6; var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; return function ($this, callbackfn, that, specificCreate) { var O = toObject($this); var self = IndexedObject(O); var boundFunction = bind(callbackfn, that, 3); var length = toLength(self.length); var index = 0; var create = specificCreate || arraySpeciesCreate; var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; var value, result; for (;length > index; index++) if (NO_HOLES || index in self) { value = self[index]; result = boundFunction(value, index, O); if (TYPE) { if (IS_MAP) target[index] = result; // map else if (result) switch (TYPE) { case 3: return true; // some case 5: return value; // find case 6: return index; // findIndex case 2: push.call(target, value); // filter } else if (IS_EVERY) return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; }; }; module.exports = { // `Array.prototype.forEach` method // https://tc39.github.io/ecma262/#sec-array.prototype.foreach forEach: createMethod(0), // `Array.prototype.map` method // https://tc39.github.io/ecma262/#sec-array.prototype.map map: createMethod(1), // `Array.prototype.filter` method // https://tc39.github.io/ecma262/#sec-array.prototype.filter filter: createMethod(2), // `Array.prototype.some` method // https://tc39.github.io/ecma262/#sec-array.prototype.some some: createMethod(3), // `Array.prototype.every` method // https://tc39.github.io/ecma262/#sec-array.prototype.every every: createMethod(4), // `Array.prototype.find` method // https://tc39.github.io/ecma262/#sec-array.prototype.find find: createMethod(5), // `Array.prototype.findIndex` method // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex findIndex: createMethod(6) }; /***/ }), /***/ "./node_modules/core-js/internals/array-method-has-species-support.js": /*!****************************************************************************!*\ !*** ./node_modules/core-js/internals/array-method-has-species-support.js ***! \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js"); var V8_VERSION = __webpack_require__(/*! ../internals/v8-version */ "./node_modules/core-js/internals/v8-version.js"); var SPECIES = wellKnownSymbol('species'); module.exports = function (METHOD_NAME) { // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/677 return V8_VERSION >= 51 || !fails(function () { var array = []; var constructor = array.constructor = {}; constructor[SPECIES] = function () { return { foo: 1 }; }; return array[METHOD_NAME](Boolean).foo !== 1; }); }; /***/ }), /***/ "./node_modules/core-js/internals/array-reduce.js": /*!********************************************************!*\ !*** ./node_modules/core-js/internals/array-reduce.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js"); var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js"); var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js"); var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js"); // `Array.prototype.{ reduce, reduceRight }` methods implementation var createMethod = function (IS_RIGHT) { return function (that, callbackfn, argumentsLength, memo) { aFunction(callbackfn); var O = toObject(that); var self = IndexedObject(O); var length = toLength(O.length); var index = IS_RIGHT ? length - 1 : 0; var i = IS_RIGHT ? -1 : 1; if (argumentsLength < 2) while (true) { if (index in self) { memo = self[index]; index += i; break; } index += i; if (IS_RIGHT ? index < 0 : length <= index) { throw TypeError('Reduce of empty array with no initial value'); } } for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) { memo = callbackfn(memo, self[index], index, O); } return memo; }; }; module.exports = { // `Array.prototype.reduce` method // https://tc39.github.io/ecma262/#sec-array.prototype.reduce left: createMethod(false), // `Array.prototype.reduceRight` method // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright right: createMethod(true) }; /***/ }), /***/ "./node_modules/core-js/internals/array-species-create.js": /*!****************************************************************!*\ !*** ./node_modules/core-js/internals/array-species-create.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js"); var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js"); var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js"); var SPECIES = wellKnownSymbol('species'); // `ArraySpeciesCreate` abstract operation // https://tc39.github.io/ecma262/#sec-arrayspeciescreate module.exports = function (originalArray, length) { var C; if (isArray(originalArray)) { C = originalArray.constructor; // cross-realm fallback if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; else if (isObject(C)) { C = C[SPECIES]; if (C === null) C = undefined; } } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); }; /***/ }), /***/ "./node_modules/core-js/internals/bind-context.js": /*!********************************************************!*\ !*** ./node_modules/core-js/internals/bind-context.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js"); // optional / simple context binding module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 0: return function () { return fn.call(that); }; case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /***/ "./node_modules/core-js/internals/classof-raw.js": /*!*******************************************************!*\ !*** ./node_modules/core-js/internals/classof-raw.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /***/ "./node_modules/core-js/internals/classof.js": /*!***************************************************!*\ !*** ./node_modules/core-js/internals/classof.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "./node_modules/core-js/internals/to-string-tag-support.js"); var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js"); var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js"); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); // ES3 wrong here var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (error) { /* empty */ } }; // getting tag from ES6+ `Object.prototype.toString` module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { var O, tag, result; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag // builtinTag case : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result; }; /***/ }), /***/ "./node_modules/core-js/internals/copy-constructor-properties.js": /*!***********************************************************************!*\ !*** ./node_modules/core-js/internals/copy-constructor-properties.js ***! \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "./node_modules/core-js/internals/own-keys.js"); var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js"); var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js"); module.exports = function (target, source) { var keys = ownKeys(source); var defineProperty = definePropertyModule.f; var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); } }; /***/ }), /***/ "./node_modules/core-js/internals/create-non-enumerable-property.js": /*!**************************************************************************!*\ !*** ./node_modules/core-js/internals/create-non-enumerable-property.js ***! \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js"); var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js"); var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js"); module.exports = DESCRIPTORS ? function (object, key, value) { return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /***/ "./node_modules/core-js/internals/create-property-descriptor.js": /*!**********************************************************************!*\ !*** ./node_modules/core-js/internals/create-property-descriptor.js ***! \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /***/ "./node_modules/core-js/internals/descriptors.js": /*!*******************************************************!*\ !*** ./node_modules/core-js/internals/descriptors.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); // Thank's IE8 for his funny defineProperty module.exports = !fails(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /***/ "./node_modules/core-js/internals/document-create-element.js": /*!*******************************************************************!*\ !*** ./node_modules/core-js/internals/document-create-element.js ***! \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js"); var document = global.document; // typeof document.createElement is 'object' in old IE var EXISTS = isObject(document) && isObject(document.createElement); module.exports = function (it) { return EXISTS ? document.createElement(it) : {}; }; /***/ }), /***/ "./node_modules/core-js/internals/dom-iterables.js": /*!*********************************************************!*\ !*** ./node_modules/core-js/internals/dom-iterables.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { // iterable DOM collections // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods module.exports = { CSSRuleList: 0, CSSStyleDeclaration: 0, CSSValueList: 0, ClientRectList: 0, DOMRectList: 0, DOMStringList: 0, DOMTokenList: 1, DataTransferItemList: 0, FileList: 0, HTMLAllCollection: 0, HTMLCollection: 0, HTMLFormElement: 0, HTMLSelectElement: 0, MediaList: 0, MimeTypeArray: 0, NamedNodeMap: 0, NodeList: 1, PaintRequestList: 0, Plugin: 0, PluginArray: 0, SVGLengthList: 0, SVGNumberList: 0, SVGPathSegList: 0, SVGPointList: 0, SVGStringList: 0, SVGTransformList: 0, SourceBufferList: 0, StyleSheetList: 0, TextTrackCueList: 0, TextTrackList: 0, TouchList: 0 }; /***/ }), /***/ "./node_modules/core-js/internals/enum-bug-keys.js": /*!*********************************************************!*\ !*** ./node_modules/core-js/internals/enum-bug-keys.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { // IE8- don't enum bug keys module.exports = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; /***/ }), /***/ "./node_modules/core-js/internals/export.js": /*!**************************************************!*\ !*** ./node_modules/core-js/internals/export.js ***! \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f; var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js"); var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js"); var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js"); var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "./node_modules/core-js/internals/copy-constructor-properties.js"); var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js"); /* options.target - name of the target object options.global - target is the global object options.stat - export as static methods of target options.proto - export as prototype methods of target options.real - real prototype method for the `pure` version options.forced - export even if the native feature is available options.bind - bind methods to the target, required for the `pure` version options.wrap - wrap constructors to preventing global pollution, required for the `pure` version options.unsafe - use the simple assignment of property instead of delete + defineProperty options.sham - add a flag to not completely full polyfills options.enumerable - export as enumerable property options.noTargetGet - prevent calling a getter on target */ module.exports = function (options, source) { var TARGET = options.target; var GLOBAL = options.global; var STATIC = options.stat; var FORCED, target, key, targetProperty, sourceProperty, descriptor; if (GLOBAL) { target = global; } else if (STATIC) { target = global[TARGET] || setGlobal(TARGET, {}); } else { target = (global[TARGET] || {}).prototype; } if (target) for (key in source) { sourceProperty = source[key]; if (options.noTargetGet) { descriptor = getOwnPropertyDescriptor(target, key); targetProperty = descriptor && descriptor.value; } else targetProperty = target[key]; FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target if (!FORCED && targetProperty !== undefined) { if (typeof sourceProperty === typeof targetProperty) continue; copyConstructorProperties(sourceProperty, targetProperty); } // add a flag to not completely full polyfills if (options.sham || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty(sourceProperty, 'sham', true); } // extend global redefine(target, key, sourceProperty, options); } }; /***/ }), /***/ "./node_modules/core-js/internals/fails.js": /*!*************************************************!*\ !*** ./node_modules/core-js/internals/fails.js ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (error) { return true; } }; /***/ }), /***/ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js": /*!******************************************************************************!*\ !*** ./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js ***! \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js"); var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js"); var regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ "./node_modules/core-js/internals/regexp-exec.js"); var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js"); var SPECIES = wellKnownSymbol('species'); var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { // #replace needs built-in support for named groups. // #match works fine because it just return the exec results, even if it has // a "grops" property. var re = /./; re.exec = function () { var result = []; result.groups = { a: '7' }; return result; }; return ''.replace(re, '$') !== '7'; }); // IE <= 11 replaces $0 with the whole match, as if it was $& // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 var REPLACE_KEEPS_$0 = (function () { return 'a'.replace(/./, '$0') === '$0'; })(); // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec // Weex JS has frozen built-in prototypes, so use try / catch wrapper var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { var re = /(?:)/; var originalExec = re.exec; re.exec = function () { return originalExec.apply(this, arguments); }; var result = 'ab'.split(re); return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; }); module.exports = function (KEY, length, exec, sham) { var SYMBOL = wellKnownSymbol(KEY); var DELEGATES_TO_SYMBOL = !fails(function () { // String methods call symbol-named RegEp methods var O = {}; O[SYMBOL] = function () { return 7; }; return ''[KEY](O) != 7; }); var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { // Symbol-named RegExp methods call .exec var execCalled = false; var re = /a/; if (KEY === 'split') { // We can't use real regex here since it causes deoptimization // and serious performance degradation in V8 // https://github.com/zloirock/core-js/issues/306 re = {}; // RegExp[@@split] doesn't call the regex's exec method, but first creates // a new one. We need to return the patched regex when creating the new one. re.constructor = {}; re.constructor[SPECIES] = function () { return re; }; re.flags = ''; re[SYMBOL] = /./[SYMBOL]; } re.exec = function () { execCalled = true; return null; }; re[SYMBOL](''); return !execCalled; }); if ( !DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || (KEY === 'replace' && !(REPLACE_SUPPORTS_NAMED_GROUPS && REPLACE_KEEPS_$0)) || (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) ) { var nativeRegExpMethod = /./[SYMBOL]; var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { if (regexp.exec === regexpExec) { if (DELEGATES_TO_SYMBOL && !forceStringMethod) { // The native String method already delegates to @@method (this // polyfilled function), leasing to infinite recursion. // We avoid it by directly calling the native @@method method. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; } return { done: true, value: nativeMethod.call(str, regexp, arg2) }; } return { done: false }; }, { REPLACE_KEEPS_$0: REPLACE_KEEPS_$0 }); var stringMethod = methods[0]; var regexMethod = methods[1]; redefine(String.prototype, KEY, stringMethod); redefine(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) // 21.2.5.11 RegExp.prototype[@@split](string, limit) ? function (string, arg) { return regexMethod.call(string, this, arg); } // 21.2.5.6 RegExp.prototype[@@match](string) // 21.2.5.9 RegExp.prototype[@@search](string) : function (string) { return regexMethod.call(string, this); } ); } if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true); }; /***/ }), /***/ "./node_modules/core-js/internals/get-built-in.js": /*!********************************************************!*\ !*** ./node_modules/core-js/internals/get-built-in.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var path = __webpack_require__(/*! ../internals/path */ "./node_modules/core-js/internals/path.js"); var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); var aFunction = function (variable) { return typeof variable == 'function' ? variable : undefined; }; module.exports = function (namespace, method) { return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace]) : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method]; }; /***/ }), /***/ "./node_modules/core-js/internals/global.js": /*!**************************************************!*\ !*** ./node_modules/core-js/internals/global.js ***! \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var check = function (it) { return it && it.Math == Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 module.exports = // eslint-disable-next-line no-undef check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || check(typeof self == 'object' && self) || check(typeof global == 'object' && global) || // eslint-disable-next-line no-new-func Function('return this')(); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) /***/ }), /***/ "./node_modules/core-js/internals/has.js": /*!***********************************************!*\ !*** ./node_modules/core-js/internals/has.js ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /***/ "./node_modules/core-js/internals/hidden-keys.js": /*!*******************************************************!*\ !*** ./node_modules/core-js/internals/hidden-keys.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = {}; /***/ }), /***/ "./node_modules/core-js/internals/html.js": /*!************************************************!*\ !*** ./node_modules/core-js/internals/html.js ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js"); module.exports = getBuiltIn('document', 'documentElement'); /***/ }), /***/ "./node_modules/core-js/internals/ie8-dom-define.js": /*!**********************************************************!*\ !*** ./node_modules/core-js/internals/ie8-dom-define.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js"); var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); var createElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js"); // Thank's IE8 for his funny defineProperty module.exports = !DESCRIPTORS && !fails(function () { return Object.defineProperty(createElement('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /***/ "./node_modules/core-js/internals/indexed-object.js": /*!**********************************************************!*\ !*** ./node_modules/core-js/internals/indexed-object.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js"); var split = ''.split; // fallback for non-array-like ES3 and non-enumerable old V8 strings module.exports = fails(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins return !Object('z').propertyIsEnumerable(0); }) ? function (it) { return classof(it) == 'String' ? split.call(it, '') : Object(it); } : Object; /***/ }), /***/ "./node_modules/core-js/internals/inherit-if-required.js": /*!***************************************************************!*\ !*** ./node_modules/core-js/internals/inherit-if-required.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js"); var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js"); // makes subclassing work correct for wrapped built-ins module.exports = function ($this, dummy, Wrapper) { var NewTarget, NewTargetPrototype; if ( // it can work only with native `setPrototypeOf` setPrototypeOf && // we haven't completely correct pre-ES6 way for getting `new.target`, so use this typeof (NewTarget = dummy.constructor) == 'function' && NewTarget !== Wrapper && isObject(NewTargetPrototype = NewTarget.prototype) && NewTargetPrototype !== Wrapper.prototype ) setPrototypeOf($this, NewTargetPrototype); return $this; }; /***/ }), /***/ "./node_modules/core-js/internals/inspect-source.js": /*!**********************************************************!*\ !*** ./node_modules/core-js/internals/inspect-source.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/core-js/internals/shared-store.js"); var functionToString = Function.toString; // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper if (typeof store.inspectSource != 'function') { store.inspectSource = function (it) { return functionToString.call(it); }; } module.exports = store.inspectSource; /***/ }), /***/ "./node_modules/core-js/internals/internal-state.js": /*!**********************************************************!*\ !*** ./node_modules/core-js/internals/internal-state.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ "./node_modules/core-js/internals/native-weak-map.js"); var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js"); var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js"); var objectHas = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js"); var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js"); var WeakMap = global.WeakMap; var set, get, has; var enforce = function (it) { return has(it) ? get(it) : set(it, {}); }; var getterFor = function (TYPE) { return function (it) { var state; if (!isObject(it) || (state = get(it)).type !== TYPE) { throw TypeError('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (NATIVE_WEAK_MAP) { var store = new WeakMap(); var wmget = store.get; var wmhas = store.has; var wmset = store.set; set = function (it, metadata) { wmset.call(store, it, metadata); return metadata; }; get = function (it) { return wmget.call(store, it) || {}; }; has = function (it) { return wmhas.call(store, it); }; } else { var STATE = sharedKey('state'); hiddenKeys[STATE] = true; set = function (it, metadata) { createNonEnumerableProperty(it, STATE, metadata); return metadata; }; get = function (it) { return objectHas(it, STATE) ? it[STATE] : {}; }; has = function (it) { return objectHas(it, STATE); }; } module.exports = { set: set, get: get, has: has, enforce: enforce, getterFor: getterFor }; /***/ }), /***/ "./node_modules/core-js/internals/is-array.js": /*!****************************************************!*\ !*** ./node_modules/core-js/internals/is-array.js ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js"); // `IsArray` abstract operation // https://tc39.github.io/ecma262/#sec-isarray module.exports = Array.isArray || function isArray(arg) { return classof(arg) == 'Array'; }; /***/ }), /***/ "./node_modules/core-js/internals/is-forced.js": /*!*****************************************************!*\ !*** ./node_modules/core-js/internals/is-forced.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); var replacement = /#|\.prototype\./; var isForced = function (feature, detection) { var value = data[normalize(feature)]; return value == POLYFILL ? true : value == NATIVE ? false : typeof detection == 'function' ? fails(detection) : !!detection; }; var normalize = isForced.normalize = function (string) { return String(string).replace(replacement, '.').toLowerCase(); }; var data = isForced.data = {}; var NATIVE = isForced.NATIVE = 'N'; var POLYFILL = isForced.POLYFILL = 'P'; module.exports = isForced; /***/ }), /***/ "./node_modules/core-js/internals/is-object.js": /*!*****************************************************!*\ !*** ./node_modules/core-js/internals/is-object.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /***/ "./node_modules/core-js/internals/is-pure.js": /*!***************************************************!*\ !*** ./node_modules/core-js/internals/is-pure.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = false; /***/ }), /***/ "./node_modules/core-js/internals/is-regexp.js": /*!*****************************************************!*\ !*** ./node_modules/core-js/internals/is-regexp.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js"); var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js"); var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js"); var MATCH = wellKnownSymbol('match'); // `IsRegExp` abstract operation // https://tc39.github.io/ecma262/#sec-isregexp module.exports = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp'); }; /***/ }), /***/ "./node_modules/core-js/internals/native-symbol.js": /*!*********************************************************!*\ !*** ./node_modules/core-js/internals/native-symbol.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); module.exports = !!Object.getOwnPropertySymbols && !fails(function () { // Chrome 38 Symbol has incorrect toString conversion // eslint-disable-next-line no-undef return !String(Symbol()); }); /***/ }), /***/ "./node_modules/core-js/internals/native-weak-map.js": /*!***********************************************************!*\ !*** ./node_modules/core-js/internals/native-weak-map.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js"); var WeakMap = global.WeakMap; module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); /***/ }), /***/ "./node_modules/core-js/internals/object-create.js": /*!*********************************************************!*\ !*** ./node_modules/core-js/internals/object-create.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "./node_modules/core-js/internals/object-define-properties.js"); var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js"); var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js"); var html = __webpack_require__(/*! ../internals/html */ "./node_modules/core-js/internals/html.js"); var documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js"); var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js"); var GT = '>'; var LT = '<'; var PROTOTYPE = 'prototype'; var SCRIPT = 'script'; var IE_PROTO = sharedKey('IE_PROTO'); var EmptyConstructor = function () { /* empty */ }; var scriptTag = function (content) { return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; }; // Create object with fake `null` prototype: use ActiveX Object with cleared prototype var NullProtoObjectViaActiveX = function (activeXDocument) { activeXDocument.write(scriptTag('')); activeXDocument.close(); var temp = activeXDocument.parentWindow.Object; activeXDocument = null; // avoid memory leak return temp; }; // Create object with fake `null` prototype: use iframe Object with cleared prototype var NullProtoObjectViaIFrame = function () { // Thrash, waste and sodomy: IE GC bug var iframe = documentCreateElement('iframe'); var JS = 'java' + SCRIPT + ':'; var iframeDocument; iframe.style.display = 'none'; html.appendChild(iframe); // https://github.com/zloirock/core-js/issues/475 iframe.src = String(JS); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(scriptTag('document.F=Object')); iframeDocument.close(); return iframeDocument.F; }; // Check for document.domain and active x support // No need to use active x approach when document.domain is not set // see https://github.com/es-shims/es5-shim/issues/150 // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 // avoid IE GC bug var activeXDocument; var NullProtoObject = function () { try { /* global ActiveXObject */ activeXDocument = document.domain && new ActiveXObject('htmlfile'); } catch (error) { /* ignore */ } NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); var length = enumBugKeys.length; while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; return NullProtoObject(); }; hiddenKeys[IE_PROTO] = true; // `Object.create` method // https://tc39.github.io/ecma262/#sec-object.create module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { EmptyConstructor[PROTOTYPE] = anObject(O); result = new EmptyConstructor(); EmptyConstructor[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = NullProtoObject(); return Properties === undefined ? result : defineProperties(result, Properties); }; /***/ }), /***/ "./node_modules/core-js/internals/object-define-properties.js": /*!********************************************************************!*\ !*** ./node_modules/core-js/internals/object-define-properties.js ***! \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js"); var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js"); var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js"); // `Object.defineProperties` method // https://tc39.github.io/ecma262/#sec-object.defineproperties module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = objectKeys(Properties); var length = keys.length; var index = 0; var key; while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]); return O; }; /***/ }), /***/ "./node_modules/core-js/internals/object-define-property.js": /*!******************************************************************!*\ !*** ./node_modules/core-js/internals/object-define-property.js ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js"); var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "./node_modules/core-js/internals/ie8-dom-define.js"); var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js"); var nativeDefineProperty = Object.defineProperty; // `Object.defineProperty` method // https://tc39.github.io/ecma262/#sec-object.defineproperty exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return nativeDefineProperty(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /***/ "./node_modules/core-js/internals/object-get-own-property-descriptor.js": /*!******************************************************************************!*\ !*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***! \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js"); var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "./node_modules/core-js/internals/object-property-is-enumerable.js"); var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js"); var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js"); var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js"); var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "./node_modules/core-js/internals/ie8-dom-define.js"); var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject(O); P = toPrimitive(P, true); if (IE8_DOM_DEFINE) try { return nativeGetOwnPropertyDescriptor(O, P); } catch (error) { /* empty */ } if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]); }; /***/ }), /***/ "./node_modules/core-js/internals/object-get-own-property-names.js": /*!*************************************************************************!*\ !*** ./node_modules/core-js/internals/object-get-own-property-names.js ***! \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "./node_modules/core-js/internals/object-keys-internal.js"); var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js"); var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method // https://tc39.github.io/ecma262/#sec-object.getownpropertynames exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return internalObjectKeys(O, hiddenKeys); }; /***/ }), /***/ "./node_modules/core-js/internals/object-get-own-property-symbols.js": /*!***************************************************************************!*\ !*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***! \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /***/ "./node_modules/core-js/internals/object-keys-internal.js": /*!****************************************************************!*\ !*** ./node_modules/core-js/internals/object-keys-internal.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js"); var indexOf = __webpack_require__(/*! ../internals/array-includes */ "./node_modules/core-js/internals/array-includes.js").indexOf; var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js"); module.exports = function (object, names) { var O = toIndexedObject(object); var i = 0; var result = []; var key; for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~indexOf(result, key) || result.push(key); } return result; }; /***/ }), /***/ "./node_modules/core-js/internals/object-keys.js": /*!*******************************************************!*\ !*** ./node_modules/core-js/internals/object-keys.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "./node_modules/core-js/internals/object-keys-internal.js"); var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js"); // `Object.keys` method // https://tc39.github.io/ecma262/#sec-object.keys module.exports = Object.keys || function keys(O) { return internalObjectKeys(O, enumBugKeys); }; /***/ }), /***/ "./node_modules/core-js/internals/object-property-is-enumerable.js": /*!*************************************************************************!*\ !*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***! \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var nativePropertyIsEnumerable = {}.propertyIsEnumerable; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); // `Object.prototype.propertyIsEnumerable` method implementation // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = getOwnPropertyDescriptor(this, V); return !!descriptor && descriptor.enumerable; } : nativePropertyIsEnumerable; /***/ }), /***/ "./node_modules/core-js/internals/object-set-prototype-of.js": /*!*******************************************************************!*\ !*** ./node_modules/core-js/internals/object-set-prototype-of.js ***! \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ "./node_modules/core-js/internals/a-possible-prototype.js"); // `Object.setPrototypeOf` method // https://tc39.github.io/ecma262/#sec-object.setprototypeof // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { var CORRECT_SETTER = false; var test = {}; var setter; try { setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; setter.call(test, []); CORRECT_SETTER = test instanceof Array; } catch (error) { /* empty */ } return function setPrototypeOf(O, proto) { anObject(O); aPossiblePrototype(proto); if (CORRECT_SETTER) setter.call(O, proto); else O.__proto__ = proto; return O; }; }() : undefined); /***/ }), /***/ "./node_modules/core-js/internals/object-to-string.js": /*!************************************************************!*\ !*** ./node_modules/core-js/internals/object-to-string.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "./node_modules/core-js/internals/to-string-tag-support.js"); var classof = __webpack_require__(/*! ../internals/classof */ "./node_modules/core-js/internals/classof.js"); // `Object.prototype.toString` method implementation // https://tc39.github.io/ecma262/#sec-object.prototype.tostring module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() { return '[object ' + classof(this) + ']'; }; /***/ }), /***/ "./node_modules/core-js/internals/own-keys.js": /*!****************************************************!*\ !*** ./node_modules/core-js/internals/own-keys.js ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js"); var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js"); var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "./node_modules/core-js/internals/object-get-own-property-symbols.js"); var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); // all object keys, includes non-enumerable and symbols module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { var keys = getOwnPropertyNamesModule.f(anObject(it)); var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; }; /***/ }), /***/ "./node_modules/core-js/internals/path.js": /*!************************************************!*\ !*** ./node_modules/core-js/internals/path.js ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); module.exports = global; /***/ }), /***/ "./node_modules/core-js/internals/redefine.js": /*!****************************************************!*\ !*** ./node_modules/core-js/internals/redefine.js ***! \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js"); var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js"); var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js"); var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js"); var getInternalState = InternalStateModule.get; var enforceInternalState = InternalStateModule.enforce; var TEMPLATE = String(String).split('String'); (module.exports = function (O, key, value, options) { var unsafe = options ? !!options.unsafe : false; var simple = options ? !!options.enumerable : false; var noTargetGet = options ? !!options.noTargetGet : false; if (typeof value == 'function') { if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key); enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : ''); } if (O === global) { if (simple) O[key] = value; else setGlobal(key, value); return; } else if (!unsafe) { delete O[key]; } else if (!noTargetGet && O[key]) { simple = true; } if (simple) O[key] = value; else createNonEnumerableProperty(O, key, value); // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, 'toString', function toString() { return typeof this == 'function' && getInternalState(this).source || inspectSource(this); }); /***/ }), /***/ "./node_modules/core-js/internals/regexp-exec-abstract.js": /*!****************************************************************!*\ !*** ./node_modules/core-js/internals/regexp-exec-abstract.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(/*! ./classof-raw */ "./node_modules/core-js/internals/classof-raw.js"); var regexpExec = __webpack_require__(/*! ./regexp-exec */ "./node_modules/core-js/internals/regexp-exec.js"); // `RegExpExec` abstract operation // https://tc39.github.io/ecma262/#sec-regexpexec module.exports = function (R, S) { var exec = R.exec; if (typeof exec === 'function') { var result = exec.call(R, S); if (typeof result !== 'object') { throw TypeError('RegExp exec method returned something other than an Object or null'); } return result; } if (classof(R) !== 'RegExp') { throw TypeError('RegExp#exec called on incompatible receiver'); } return regexpExec.call(R, S); }; /***/ }), /***/ "./node_modules/core-js/internals/regexp-exec.js": /*!*******************************************************!*\ !*** ./node_modules/core-js/internals/regexp-exec.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var regexpFlags = __webpack_require__(/*! ./regexp-flags */ "./node_modules/core-js/internals/regexp-flags.js"); var stickyHelpers = __webpack_require__(/*! ./regexp-sticky-helpers */ "./node_modules/core-js/internals/regexp-sticky-helpers.js"); var nativeExec = RegExp.prototype.exec; // This always refers to the native implementation, because the // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, // which loads this file before patching the method. var nativeReplace = String.prototype.replace; var patchedExec = nativeExec; var UPDATES_LAST_INDEX_WRONG = (function () { var re1 = /a/; var re2 = /b*/g; nativeExec.call(re1, 'a'); nativeExec.call(re2, 'a'); return re1.lastIndex !== 0 || re2.lastIndex !== 0; })(); var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET; // nonparticipating capturing group, copied from es5-shim's String#split patch. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y; if (PATCH) { patchedExec = function exec(str) { var re = this; var lastIndex, reCopy, match, i; var sticky = UNSUPPORTED_Y && re.sticky; var flags = regexpFlags.call(re); var source = re.source; var charsAdded = 0; var strCopy = str; if (sticky) { flags = flags.replace('y', ''); if (flags.indexOf('g') === -1) { flags += 'g'; } strCopy = String(str).slice(re.lastIndex); // Support anchored sticky behavior. if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) { source = '(?: ' + source + ')'; strCopy = ' ' + strCopy; charsAdded++; } // ^(? + rx + ) is needed, in combination with some str slicing, to // simulate the 'y' flag. reCopy = new RegExp('^(?:' + source + ')', flags); } if (NPCG_INCLUDED) { reCopy = new RegExp('^' + source + '$(?!\\s)', flags); } if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; match = nativeExec.call(sticky ? reCopy : re, strCopy); if (sticky) { if (match) { match.input = match.input.slice(charsAdded); match[0] = match[0].slice(charsAdded); match.index = re.lastIndex; re.lastIndex += match[0].length; } else re.lastIndex = 0; } else if (UPDATES_LAST_INDEX_WRONG && match) { re.lastIndex = re.global ? match.index + match[0].length : lastIndex; } if (NPCG_INCLUDED && match && match.length > 1) { // Fix browsers whose `exec` methods don't consistently return `undefined` // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ nativeReplace.call(match[0], reCopy, function () { for (i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undefined) match[i] = undefined; } }); } return match; }; } module.exports = patchedExec; /***/ }), /***/ "./node_modules/core-js/internals/regexp-flags.js": /*!********************************************************!*\ !*** ./node_modules/core-js/internals/regexp-flags.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); // `RegExp.prototype.flags` getter implementation // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags module.exports = function () { var that = anObject(this); var result = ''; if (that.global) result += 'g'; if (that.ignoreCase) result += 'i'; if (that.multiline) result += 'm'; if (that.dotAll) result += 's'; if (that.unicode) result += 'u'; if (that.sticky) result += 'y'; return result; }; /***/ }), /***/ "./node_modules/core-js/internals/regexp-sticky-helpers.js": /*!*****************************************************************!*\ !*** ./node_modules/core-js/internals/regexp-sticky-helpers.js ***! \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var fails = __webpack_require__(/*! ./fails */ "./node_modules/core-js/internals/fails.js"); // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError, // so we use an intermediate function. function RE(s, f) { return RegExp(s, f); } exports.UNSUPPORTED_Y = fails(function () { // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError var re = RE('a', 'y'); re.lastIndex = 2; return re.exec('abcd') != null; }); exports.BROKEN_CARET = fails(function () { // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 var re = RE('^r', 'gy'); re.lastIndex = 2; return re.exec('str') != null; }); /***/ }), /***/ "./node_modules/core-js/internals/require-object-coercible.js": /*!********************************************************************!*\ !*** ./node_modules/core-js/internals/require-object-coercible.js ***! \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { // `RequireObjectCoercible` abstract operation // https://tc39.github.io/ecma262/#sec-requireobjectcoercible module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /***/ "./node_modules/core-js/internals/set-global.js": /*!******************************************************!*\ !*** ./node_modules/core-js/internals/set-global.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js"); module.exports = function (key, value) { try { createNonEnumerableProperty(global, key, value); } catch (error) { global[key] = value; } return value; }; /***/ }), /***/ "./node_modules/core-js/internals/shared-key.js": /*!******************************************************!*\ !*** ./node_modules/core-js/internals/shared-key.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js"); var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js"); var keys = shared('keys'); module.exports = function (key) { return keys[key] || (keys[key] = uid(key)); }; /***/ }), /***/ "./node_modules/core-js/internals/shared-store.js": /*!********************************************************!*\ !*** ./node_modules/core-js/internals/shared-store.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js"); var SHARED = '__core-js_shared__'; var store = global[SHARED] || setGlobal(SHARED, {}); module.exports = store; /***/ }), /***/ "./node_modules/core-js/internals/shared.js": /*!**************************************************!*\ !*** ./node_modules/core-js/internals/shared.js ***! \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js"); var store = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/core-js/internals/shared-store.js"); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: '3.6.1', mode: IS_PURE ? 'pure' : 'global', copyright: '© 2019 Denis Pushkarev (zloirock.ru)' }); /***/ }), /***/ "./node_modules/core-js/internals/sloppy-array-method.js": /*!***************************************************************!*\ !*** ./node_modules/core-js/internals/sloppy-array-method.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); module.exports = function (METHOD_NAME, argument) { var method = [][METHOD_NAME]; return !method || !fails(function () { // eslint-disable-next-line no-useless-call,no-throw-literal method.call(null, argument || function () { throw 1; }, 1); }); }; /***/ }), /***/ "./node_modules/core-js/internals/species-constructor.js": /*!***************************************************************!*\ !*** ./node_modules/core-js/internals/species-constructor.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js"); var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js"); var SPECIES = wellKnownSymbol('species'); // `SpeciesConstructor` abstract operation // https://tc39.github.io/ecma262/#sec-speciesconstructor module.exports = function (O, defaultConstructor) { var C = anObject(O).constructor; var S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S); }; /***/ }), /***/ "./node_modules/core-js/internals/string-multibyte.js": /*!************************************************************!*\ !*** ./node_modules/core-js/internals/string-multibyte.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js"); var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js"); // `String.prototype.{ codePointAt, at }` methods implementation var createMethod = function (CONVERT_TO_STRING) { return function ($this, pos) { var S = String(requireObjectCoercible($this)); var position = toInteger(pos); var size = S.length; var first, second; if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; first = S.charCodeAt(position); return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? S.charAt(position) : first : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; }; }; module.exports = { // `String.prototype.codePointAt` method // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat codeAt: createMethod(false), // `String.prototype.at` method // https://github.com/mathiasbynens/String.prototype.at charAt: createMethod(true) }; /***/ }), /***/ "./node_modules/core-js/internals/string-repeat.js": /*!*********************************************************!*\ !*** ./node_modules/core-js/internals/string-repeat.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js"); var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js"); // `String.prototype.repeat` method implementation // https://tc39.github.io/ecma262/#sec-string.prototype.repeat module.exports = ''.repeat || function repeat(count) { var str = String(requireObjectCoercible(this)); var result = ''; var n = toInteger(count); if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions'); for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str; return result; }; /***/ }), /***/ "./node_modules/core-js/internals/string-trim.js": /*!*******************************************************!*\ !*** ./node_modules/core-js/internals/string-trim.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js"); var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "./node_modules/core-js/internals/whitespaces.js"); var whitespace = '[' + whitespaces + ']'; var ltrim = RegExp('^' + whitespace + whitespace + '*'); var rtrim = RegExp(whitespace + whitespace + '*$'); // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation var createMethod = function (TYPE) { return function ($this) { var string = String(requireObjectCoercible($this)); if (TYPE & 1) string = string.replace(ltrim, ''); if (TYPE & 2) string = string.replace(rtrim, ''); return string; }; }; module.exports = { // `String.prototype.{ trimLeft, trimStart }` methods // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart start: createMethod(1), // `String.prototype.{ trimRight, trimEnd }` methods // https://tc39.github.io/ecma262/#sec-string.prototype.trimend end: createMethod(2), // `String.prototype.trim` method // https://tc39.github.io/ecma262/#sec-string.prototype.trim trim: createMethod(3) }; /***/ }), /***/ "./node_modules/core-js/internals/this-number-value.js": /*!*************************************************************!*\ !*** ./node_modules/core-js/internals/this-number-value.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js"); // `thisNumberValue` abstract operation // https://tc39.github.io/ecma262/#sec-thisnumbervalue module.exports = function (value) { if (typeof value != 'number' && classof(value) != 'Number') { throw TypeError('Incorrect invocation'); } return +value; }; /***/ }), /***/ "./node_modules/core-js/internals/to-absolute-index.js": /*!*************************************************************!*\ !*** ./node_modules/core-js/internals/to-absolute-index.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js"); var max = Math.max; var min = Math.min; // Helper for a popular repeating case of the spec: // Let integer be ? ToInteger(index). // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). module.exports = function (index, length) { var integer = toInteger(index); return integer < 0 ? max(integer + length, 0) : min(integer, length); }; /***/ }), /***/ "./node_modules/core-js/internals/to-indexed-object.js": /*!*************************************************************!*\ !*** ./node_modules/core-js/internals/to-indexed-object.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // toObject with fallback for non-array-like ES3 strings var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js"); var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js"); module.exports = function (it) { return IndexedObject(requireObjectCoercible(it)); }; /***/ }), /***/ "./node_modules/core-js/internals/to-integer.js": /*!******************************************************!*\ !*** ./node_modules/core-js/internals/to-integer.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { var ceil = Math.ceil; var floor = Math.floor; // `ToInteger` abstract operation // https://tc39.github.io/ecma262/#sec-tointeger module.exports = function (argument) { return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); }; /***/ }), /***/ "./node_modules/core-js/internals/to-length.js": /*!*****************************************************!*\ !*** ./node_modules/core-js/internals/to-length.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js"); var min = Math.min; // `ToLength` abstract operation // https://tc39.github.io/ecma262/#sec-tolength module.exports = function (argument) { return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; /***/ }), /***/ "./node_modules/core-js/internals/to-object.js": /*!*****************************************************!*\ !*** ./node_modules/core-js/internals/to-object.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js"); // `ToObject` abstract operation // https://tc39.github.io/ecma262/#sec-toobject module.exports = function (argument) { return Object(requireObjectCoercible(argument)); }; /***/ }), /***/ "./node_modules/core-js/internals/to-primitive.js": /*!********************************************************!*\ !*** ./node_modules/core-js/internals/to-primitive.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js"); // `ToPrimitive` abstract operation // https://tc39.github.io/ecma262/#sec-toprimitive // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (input, PREFERRED_STRING) { if (!isObject(input)) return input; var fn, val; if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /***/ "./node_modules/core-js/internals/to-string-tag-support.js": /*!*****************************************************************!*\ !*** ./node_modules/core-js/internals/to-string-tag-support.js ***! \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js"); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var test = {}; test[TO_STRING_TAG] = 'z'; module.exports = String(test) === '[object z]'; /***/ }), /***/ "./node_modules/core-js/internals/uid.js": /*!***********************************************!*\ !*** ./node_modules/core-js/internals/uid.js ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports) { var id = 0; var postfix = Math.random(); module.exports = function (key) { return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); }; /***/ }), /***/ "./node_modules/core-js/internals/use-symbol-as-uid.js": /*!*************************************************************!*\ !*** ./node_modules/core-js/internals/use-symbol-as-uid.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "./node_modules/core-js/internals/native-symbol.js"); module.exports = NATIVE_SYMBOL // eslint-disable-next-line no-undef && !Symbol.sham // eslint-disable-next-line no-undef && typeof Symbol.iterator == 'symbol'; /***/ }), /***/ "./node_modules/core-js/internals/user-agent.js": /*!******************************************************!*\ !*** ./node_modules/core-js/internals/user-agent.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js"); module.exports = getBuiltIn('navigator', 'userAgent') || ''; /***/ }), /***/ "./node_modules/core-js/internals/v8-version.js": /*!******************************************************!*\ !*** ./node_modules/core-js/internals/v8-version.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); var userAgent = __webpack_require__(/*! ../internals/user-agent */ "./node_modules/core-js/internals/user-agent.js"); var process = global.process; var versions = process && process.versions; var v8 = versions && versions.v8; var match, version; if (v8) { match = v8.split('.'); version = match[0] + match[1]; } else if (userAgent) { match = userAgent.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = userAgent.match(/Chrome\/(\d+)/); if (match) version = match[1]; } } module.exports = version && +version; /***/ }), /***/ "./node_modules/core-js/internals/well-known-symbol.js": /*!*************************************************************!*\ !*** ./node_modules/core-js/internals/well-known-symbol.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js"); var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js"); var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "./node_modules/core-js/internals/native-symbol.js"); var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "./node_modules/core-js/internals/use-symbol-as-uid.js"); var WellKnownSymbolsStore = shared('wks'); var Symbol = global.Symbol; var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid; module.exports = function (name) { if (!has(WellKnownSymbolsStore, name)) { if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name]; else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); } return WellKnownSymbolsStore[name]; }; /***/ }), /***/ "./node_modules/core-js/internals/whitespaces.js": /*!*******************************************************!*\ !*** ./node_modules/core-js/internals/whitespaces.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { // a string of all valid unicode whitespaces // eslint-disable-next-line max-len module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; /***/ }), /***/ "./node_modules/core-js/modules/es.array.for-each.js": /*!***********************************************************!*\ !*** ./node_modules/core-js/modules/es.array.for-each.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js"); var forEach = __webpack_require__(/*! ../internals/array-for-each */ "./node_modules/core-js/internals/array-for-each.js"); // `Array.prototype.forEach` method // https://tc39.github.io/ecma262/#sec-array.prototype.foreach $({ target: 'Array', proto: true, forced: [].forEach != forEach }, { forEach: forEach }); /***/ }), /***/ "./node_modules/core-js/modules/es.array.map.js": /*!******************************************************!*\ !*** ./node_modules/core-js/modules/es.array.map.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js"); var $map = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").map; var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js"); var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map'); // FF49- issue var USES_TO_LENGTH = HAS_SPECIES_SUPPORT && !fails(function () { [].map.call({ length: -1, 0: 1 }, function (it) { throw it; }); }); // `Array.prototype.map` method // https://tc39.github.io/ecma262/#sec-array.prototype.map // with adding support of @@species $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, { map: function map(callbackfn /* , thisArg */) { return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); /***/ }), /***/ "./node_modules/core-js/modules/es.array.reduce.js": /*!*********************************************************!*\ !*** ./node_modules/core-js/modules/es.array.reduce.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js"); var $reduce = __webpack_require__(/*! ../internals/array-reduce */ "./node_modules/core-js/internals/array-reduce.js").left; var sloppyArrayMethod = __webpack_require__(/*! ../internals/sloppy-array-method */ "./node_modules/core-js/internals/sloppy-array-method.js"); // `Array.prototype.reduce` method // https://tc39.github.io/ecma262/#sec-array.prototype.reduce $({ target: 'Array', proto: true, forced: sloppyArrayMethod('reduce') }, { reduce: function reduce(callbackfn /* , initialValue */) { return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); } }); /***/ }), /***/ "./node_modules/core-js/modules/es.date.to-string.js": /*!***********************************************************!*\ !*** ./node_modules/core-js/modules/es.date.to-string.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js"); var DatePrototype = Date.prototype; var INVALID_DATE = 'Invalid Date'; var TO_STRING = 'toString'; var nativeDateToString = DatePrototype[TO_STRING]; var getTime = DatePrototype.getTime; // `Date.prototype.toString` method // https://tc39.github.io/ecma262/#sec-date.prototype.tostring if (new Date(NaN) + '' != INVALID_DATE) { redefine(DatePrototype, TO_STRING, function toString() { var value = getTime.call(this); // eslint-disable-next-line no-self-compare return value === value ? nativeDateToString.call(this) : INVALID_DATE; }); } /***/ }), /***/ "./node_modules/core-js/modules/es.function.name.js": /*!**********************************************************!*\ !*** ./node_modules/core-js/modules/es.function.name.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js"); var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f; var FunctionPrototype = Function.prototype; var FunctionPrototypeToString = FunctionPrototype.toString; var nameRE = /^\s*function ([^ (]*)/; var NAME = 'name'; // Function instances `.name` property // https://tc39.github.io/ecma262/#sec-function-instances-name if (DESCRIPTORS && !(NAME in FunctionPrototype)) { defineProperty(FunctionPrototype, NAME, { configurable: true, get: function () { try { return FunctionPrototypeToString.call(this).match(nameRE)[1]; } catch (error) { return ''; } } }); } /***/ }), /***/ "./node_modules/core-js/modules/es.number.constructor.js": /*!***************************************************************!*\ !*** ./node_modules/core-js/modules/es.number.constructor.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js"); var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js"); var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js"); var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js"); var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js"); var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "./node_modules/core-js/internals/inherit-if-required.js"); var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js"); var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js"); var getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js").f; var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f; var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f; var trim = __webpack_require__(/*! ../internals/string-trim */ "./node_modules/core-js/internals/string-trim.js").trim; var NUMBER = 'Number'; var NativeNumber = global[NUMBER]; var NumberPrototype = NativeNumber.prototype; // Opera ~12 has broken Object#toString var BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER; // `ToNumber` abstract operation // https://tc39.github.io/ecma262/#sec-tonumber var toNumber = function (argument) { var it = toPrimitive(argument, false); var first, third, radix, maxCode, digits, length, index, code; if (typeof it == 'string' && it.length > 2) { it = trim(it); first = it.charCodeAt(0); if (first === 43 || first === 45) { third = it.charCodeAt(2); if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix } else if (first === 48) { switch (it.charCodeAt(1)) { case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i default: return +it; } digits = it.slice(2); length = digits.length; for (index = 0; index < length; index++) { code = digits.charCodeAt(index); // parseInt parses a string to a first unavailable symbol // but ToNumber should return NaN if a string contains unavailable symbols if (code < 48 || code > maxCode) return NaN; } return parseInt(digits, radix); } } return +it; }; // `Number` constructor // https://tc39.github.io/ecma262/#sec-number-constructor if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) { var NumberWrapper = function Number(value) { var it = arguments.length < 1 ? 0 : value; var dummy = this; return dummy instanceof NumberWrapper // check on 1..constructor(foo) case && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER) ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it); }; for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : ( // ES3: 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES2015 (in case, if modules with ES2015 Number statics required before): 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' ).split(','), j = 0, key; keys.length > j; j++) { if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) { defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key)); } } NumberWrapper.prototype = NumberPrototype; NumberPrototype.constructor = NumberWrapper; redefine(global, NUMBER, NumberWrapper); } /***/ }), /***/ "./node_modules/core-js/modules/es.number.to-fixed.js": /*!************************************************************!*\ !*** ./node_modules/core-js/modules/es.number.to-fixed.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js"); var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js"); var thisNumberValue = __webpack_require__(/*! ../internals/this-number-value */ "./node_modules/core-js/internals/this-number-value.js"); var repeat = __webpack_require__(/*! ../internals/string-repeat */ "./node_modules/core-js/internals/string-repeat.js"); var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); var nativeToFixed = 1.0.toFixed; var floor = Math.floor; var pow = function (x, n, acc) { return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); }; var log = function (x) { var n = 0; var x2 = x; while (x2 >= 4096) { n += 12; x2 /= 4096; } while (x2 >= 2) { n += 1; x2 /= 2; } return n; }; var FORCED = nativeToFixed && ( 0.00008.toFixed(3) !== '0.000' || 0.9.toFixed(0) !== '1' || 1.255.toFixed(2) !== '1.25' || 1000000000000000128.0.toFixed(0) !== '1000000000000000128' ) || !fails(function () { // V8 ~ Android 4.3- nativeToFixed.call({}); }); // `Number.prototype.toFixed` method // https://tc39.github.io/ecma262/#sec-number.prototype.tofixed $({ target: 'Number', proto: true, forced: FORCED }, { // eslint-disable-next-line max-statements toFixed: function toFixed(fractionDigits) { var number = thisNumberValue(this); var fractDigits = toInteger(fractionDigits); var data = [0, 0, 0, 0, 0, 0]; var sign = ''; var result = '0'; var e, z, j, k; var multiply = function (n, c) { var index = -1; var c2 = c; while (++index < 6) { c2 += n * data[index]; data[index] = c2 % 1e7; c2 = floor(c2 / 1e7); } }; var divide = function (n) { var index = 6; var c = 0; while (--index >= 0) { c += data[index]; data[index] = floor(c / n); c = (c % n) * 1e7; } }; var dataToString = function () { var index = 6; var s = ''; while (--index >= 0) { if (s !== '' || index === 0 || data[index] !== 0) { var t = String(data[index]); s = s === '' ? t : s + repeat.call('0', 7 - t.length) + t; } } return s; }; if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits'); // eslint-disable-next-line no-self-compare if (number != number) return 'NaN'; if (number <= -1e21 || number >= 1e21) return String(number); if (number < 0) { sign = '-'; number = -number; } if (number > 1e-21) { e = log(number * pow(2, 69, 1)) - 69; z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1); z *= 0x10000000000000; e = 52 - e; if (e > 0) { multiply(0, z); j = fractDigits; while (j >= 7) { multiply(1e7, 0); j -= 7; } multiply(pow(10, j, 1), 0); j = e - 1; while (j >= 23) { divide(1 << 23); j -= 23; } divide(1 << j); multiply(1, 1); divide(2); result = dataToString(); } else { multiply(0, z); multiply(1 << -e, 0); result = dataToString() + repeat.call('0', fractDigits); } } if (fractDigits > 0) { k = result.length; result = sign + (k <= fractDigits ? '0.' + repeat.call('0', fractDigits - k) + result : result.slice(0, k - fractDigits) + '.' + result.slice(k - fractDigits)); } else { result = sign + result; } return result; } }); /***/ }), /***/ "./node_modules/core-js/modules/es.object.to-string.js": /*!*************************************************************!*\ !*** ./node_modules/core-js/modules/es.object.to-string.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "./node_modules/core-js/internals/to-string-tag-support.js"); var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js"); var toString = __webpack_require__(/*! ../internals/object-to-string */ "./node_modules/core-js/internals/object-to-string.js"); // `Object.prototype.toString` method // https://tc39.github.io/ecma262/#sec-object.prototype.tostring if (!TO_STRING_TAG_SUPPORT) { redefine(Object.prototype, 'toString', toString, { unsafe: true }); } /***/ }), /***/ "./node_modules/core-js/modules/es.regexp.exec.js": /*!********************************************************!*\ !*** ./node_modules/core-js/modules/es.regexp.exec.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js"); var exec = __webpack_require__(/*! ../internals/regexp-exec */ "./node_modules/core-js/internals/regexp-exec.js"); $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, { exec: exec }); /***/ }), /***/ "./node_modules/core-js/modules/es.regexp.to-string.js": /*!*************************************************************!*\ !*** ./node_modules/core-js/modules/es.regexp.to-string.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js"); var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); var flags = __webpack_require__(/*! ../internals/regexp-flags */ "./node_modules/core-js/internals/regexp-flags.js"); var TO_STRING = 'toString'; var RegExpPrototype = RegExp.prototype; var nativeToString = RegExpPrototype[TO_STRING]; var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); // FF44- RegExp#toString has a wrong name var INCORRECT_NAME = nativeToString.name != TO_STRING; // `RegExp.prototype.toString` method // https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring if (NOT_GENERIC || INCORRECT_NAME) { redefine(RegExp.prototype, TO_STRING, function toString() { var R = anObject(this); var p = String(R.source); var rf = R.flags; var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf); return '/' + p + '/' + f; }, { unsafe: true }); } /***/ }), /***/ "./node_modules/core-js/modules/es.string.match.js": /*!*********************************************************!*\ !*** ./node_modules/core-js/modules/es.string.match.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js"); var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js"); var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js"); var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "./node_modules/core-js/internals/advance-string-index.js"); var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "./node_modules/core-js/internals/regexp-exec-abstract.js"); // @@match logic fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) { return [ // `String.prototype.match` method // https://tc39.github.io/ecma262/#sec-string.prototype.match function match(regexp) { var O = requireObjectCoercible(this); var matcher = regexp == undefined ? undefined : regexp[MATCH]; return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); }, // `RegExp.prototype[@@match]` method // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match function (regexp) { var res = maybeCallNative(nativeMatch, regexp, this); if (res.done) return res.value; var rx = anObject(regexp); var S = String(this); if (!rx.global) return regExpExec(rx, S); var fullUnicode = rx.unicode; rx.lastIndex = 0; var A = []; var n = 0; var result; while ((result = regExpExec(rx, S)) !== null) { var matchStr = String(result[0]); A[n] = matchStr; if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); n++; } return n === 0 ? null : A; } ]; }); /***/ }), /***/ "./node_modules/core-js/modules/es.string.replace.js": /*!***********************************************************!*\ !*** ./node_modules/core-js/modules/es.string.replace.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js"); var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js"); var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js"); var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js"); var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js"); var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "./node_modules/core-js/internals/advance-string-index.js"); var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "./node_modules/core-js/internals/regexp-exec-abstract.js"); var max = Math.max; var min = Math.min; var floor = Math.floor; var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g; var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g; var maybeToString = function (it) { return it === undefined ? it : String(it); }; // @@replace logic fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) { return [ // `String.prototype.replace` method // https://tc39.github.io/ecma262/#sec-string.prototype.replace function replace(searchValue, replaceValue) { var O = requireObjectCoercible(this); var replacer = searchValue == undefined ? undefined : searchValue[REPLACE]; return replacer !== undefined ? replacer.call(searchValue, O, replaceValue) : nativeReplace.call(String(O), searchValue, replaceValue); }, // `RegExp.prototype[@@replace]` method // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace function (regexp, replaceValue) { if (reason.REPLACE_KEEPS_$0 || (typeof replaceValue === 'string' && replaceValue.indexOf('$0') === -1)) { var res = maybeCallNative(nativeReplace, regexp, this, replaceValue); if (res.done) return res.value; } var rx = anObject(regexp); var S = String(this); var functionalReplace = typeof replaceValue === 'function'; if (!functionalReplace) replaceValue = String(replaceValue); var global = rx.global; if (global) { var fullUnicode = rx.unicode; rx.lastIndex = 0; } var results = []; while (true) { var result = regExpExec(rx, S); if (result === null) break; results.push(result); if (!global) break; var matchStr = String(result[0]); if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); } var accumulatedResult = ''; var nextSourcePosition = 0; for (var i = 0; i < results.length; i++) { result = results[i]; var matched = String(result[0]); var position = max(min(toInteger(result.index), S.length), 0); var captures = []; // NOTE: This is equivalent to // captures = result.slice(1).map(maybeToString) // but for some reason `nativeSlice.call(result, 1, result.length)` (called in // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); var namedCaptures = result.groups; if (functionalReplace) { var replacerArgs = [matched].concat(captures, position, S); if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); var replacement = String(replaceValue.apply(undefined, replacerArgs)); } else { replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); } if (position >= nextSourcePosition) { accumulatedResult += S.slice(nextSourcePosition, position) + replacement; nextSourcePosition = position + matched.length; } } return accumulatedResult + S.slice(nextSourcePosition); } ]; // https://tc39.github.io/ecma262/#sec-getsubstitution function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { var tailPos = position + matched.length; var m = captures.length; var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; if (namedCaptures !== undefined) { namedCaptures = toObject(namedCaptures); symbols = SUBSTITUTION_SYMBOLS; } return nativeReplace.call(replacement, symbols, function (match, ch) { var capture; switch (ch.charAt(0)) { case '$': return '$'; case '&': return matched; case '`': return str.slice(0, position); case "'": return str.slice(tailPos); case '<': capture = namedCaptures[ch.slice(1, -1)]; break; default: // \d\d? var n = +ch; if (n === 0) return match; if (n > m) { var f = floor(n / 10); if (f === 0) return match; if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); return match; } capture = captures[n - 1]; } return capture === undefined ? '' : capture; }); } }); /***/ }), /***/ "./node_modules/core-js/modules/es.string.split.js": /*!*********************************************************!*\ !*** ./node_modules/core-js/modules/es.string.split.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js"); var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "./node_modules/core-js/internals/is-regexp.js"); var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js"); var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js"); var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "./node_modules/core-js/internals/species-constructor.js"); var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "./node_modules/core-js/internals/advance-string-index.js"); var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js"); var callRegExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "./node_modules/core-js/internals/regexp-exec-abstract.js"); var regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ "./node_modules/core-js/internals/regexp-exec.js"); var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js"); var arrayPush = [].push; var min = Math.min; var MAX_UINT32 = 0xFFFFFFFF; // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); }); // @@split logic fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) { var internalSplit; if ( 'abbc'.split(/(b)*/)[1] == 'c' || 'test'.split(/(?:)/, -1).length != 4 || 'ab'.split(/(?:ab)*/).length != 2 || '.'.split(/(.?)(.?)/).length != 4 || '.'.split(/()()/).length > 1 || ''.split(/.?/).length ) { // based on es5-shim implementation, need to rework it internalSplit = function (separator, limit) { var string = String(requireObjectCoercible(this)); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (separator === undefined) return [string]; // If `separator` is not a regex, use native split if (!isRegExp(separator)) { return nativeSplit.call(string, separator, lim); } var output = []; var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); var lastLastIndex = 0; // Make `global` and avoid `lastIndex` issues by working with a copy var separatorCopy = new RegExp(separator.source, flags + 'g'); var match, lastIndex, lastLength; while (match = regexpExec.call(separatorCopy, string)) { lastIndex = separatorCopy.lastIndex; if (lastIndex > lastLastIndex) { output.push(string.slice(lastLastIndex, match.index)); if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1)); lastLength = match[0].length; lastLastIndex = lastIndex; if (output.length >= lim) break; } if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop } if (lastLastIndex === string.length) { if (lastLength || !separatorCopy.test('')) output.push(''); } else output.push(string.slice(lastLastIndex)); return output.length > lim ? output.slice(0, lim) : output; }; // Chakra, V8 } else if ('0'.split(undefined, 0).length) { internalSplit = function (separator, limit) { return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit); }; } else internalSplit = nativeSplit; return [ // `String.prototype.split` method // https://tc39.github.io/ecma262/#sec-string.prototype.split function split(separator, limit) { var O = requireObjectCoercible(this); var splitter = separator == undefined ? undefined : separator[SPLIT]; return splitter !== undefined ? splitter.call(separator, O, limit) : internalSplit.call(String(O), separator, limit); }, // `RegExp.prototype[@@split]` method // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split // // NOTE: This cannot be properly polyfilled in engines that don't support // the 'y' flag. function (regexp, limit) { var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit); if (res.done) return res.value; var rx = anObject(regexp); var S = String(this); var C = speciesConstructor(rx, RegExp); var unicodeMatching = rx.unicode; var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (SUPPORTS_Y ? 'y' : 'g'); // ^(? + rx + ) is needed, in combination with some S slicing, to // simulate the 'y' flag. var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; var p = 0; var q = 0; var A = []; while (q < S.length) { splitter.lastIndex = SUPPORTS_Y ? q : 0; var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); var e; if ( z === null || (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p ) { q = advanceStringIndex(S, q, unicodeMatching); } else { A.push(S.slice(p, q)); if (A.length === lim) return A; for (var i = 1; i <= z.length - 1; i++) { A.push(z[i]); if (A.length === lim) return A; } q = p = e; } } A.push(S.slice(p)); return A; } ]; }, !SUPPORTS_Y); /***/ }), /***/ "./node_modules/core-js/modules/web.dom-collections.for-each.js": /*!**********************************************************************!*\ !*** ./node_modules/core-js/modules/web.dom-collections.for-each.js ***! \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js"); var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "./node_modules/core-js/internals/dom-iterables.js"); var forEach = __webpack_require__(/*! ../internals/array-for-each */ "./node_modules/core-js/internals/array-for-each.js"); var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js"); for (var COLLECTION_NAME in DOMIterables) { var Collection = global[COLLECTION_NAME]; var CollectionPrototype = Collection && Collection.prototype; // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach); } catch (error) { CollectionPrototype.forEach = forEach; } } /***/ }), /***/ "./node_modules/gsap/CSSPlugin.js": /*!****************************************!*\ !*** ./node_modules/gsap/CSSPlugin.js ***! \****************************************/ /*! exports provided: CSSPlugin, default, _getBBox, _createElement, checkPrefix */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSPlugin", function() { return CSSPlugin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return CSSPlugin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getBBox", function() { return _getBBox; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_createElement", function() { return _createElement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkPrefix", function() { return _checkPropPrefix; }); /* harmony import */ var _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./gsap-core.js */ "./node_modules/gsap/gsap-core.js"); /*! * CSSPlugin 3.0.4 * https://greensock.com * * Copyright 2008-2019, GreenSock. All rights reserved. * Subject to the terms at https://greensock.com/standard-license or for * Club GreenSock members, the agreement issued with that membership. * @author: Jack Doyle, jack@greensock.com */ /* eslint-disable */ var _win, _doc, _docElement, _pluginInitted, _tempDiv, _tempDivStyler, _recentSetterPlugin, _windowExists = function _windowExists() { return typeof window !== "undefined"; }, _transformProps = {}, _RAD2DEG = 180 / Math.PI, _DEG2RAD = Math.PI / 180, _atan2 = Math.atan2, _bigNum = 1e8, _capsExp = /([A-Z])/g, _numWithUnitExp = /[-+=\.]*\d+[\.e-]*\d*[a-z%]*/g, _horizontalExp = /(?:left|right|width|margin|padding|x)/i, _complexExp = /[\s,\(]\S/, _propertyAliases = { autoAlpha: "opacity,visibility", scale: "scaleX,scaleY", alpha: "opacity" }, _renderCSSProp = function _renderCSSProp(ratio, data) { return data.set(data.t, data.p, ~~((data.s + data.c * ratio) * 1000) / 1000 + data.u, data); }, _renderPropWithEnd = function _renderPropWithEnd(ratio, data) { return data.set(data.t, data.p, ratio === 1 ? data.e : ~~((data.s + data.c * ratio) * 1000) / 1000 + data.u, data); }, _renderCSSPropWithBeginning = function _renderCSSPropWithBeginning(ratio, data) { return data.set(data.t, data.p, ratio ? ~~((data.s + data.c * ratio) * 1000) / 1000 + data.u : data.b, data); }, //if units change, we need a way to render the original unit/value when the tween goes all the way back to the beginning (ratio:0) _renderRoundedCSSProp = function _renderRoundedCSSProp(ratio, data) { var value = data.s + data.c * ratio; data.set(data.t, data.p, ~~(value + (value < 0 ? -.5 : .5)) + data.u, data); }, _renderNonTweeningValue = function _renderNonTweeningValue(ratio, data) { return data.set(data.t, data.p, ratio ? data.e : data.b, data); }, _renderNonTweeningValueOnlyAtEnd = function _renderNonTweeningValueOnlyAtEnd(ratio, data) { return data.set(data.t, data.p, ratio !== 1 ? data.b : data.e, data); }, _setterCSSStyle = function _setterCSSStyle(target, property, value) { return target.style[property] = value; }, _setterCSSProp = function _setterCSSProp(target, property, value) { return target.style.setProperty(property, value); }, _setterTransform = function _setterTransform(target, property, value) { return target._gsap[property] = value; }, _setterScale = function _setterScale(target, property, value) { return target._gsap.scaleX = target._gsap.scaleY = value; }, _setterScaleWithRender = function _setterScaleWithRender(target, property, value, data, ratio) { var cache = target._gsap; cache.scaleX = cache.scaleY = value; cache.renderTransform(ratio, cache); }, _setterTransformWithRender = function _setterTransformWithRender(target, property, value, data, ratio) { var cache = target._gsap; cache[property] = value; cache.renderTransform(ratio, cache); }, _transformProp = "transform", _transformOriginProp = _transformProp + "Origin", _supports3D, _createElement = function _createElement(type, ns) { var e = _doc.createElementNS ? _doc.createElementNS((ns || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), type) : _doc.createElement(type); //some servers swap in https for http in the namespace which can break things, making "style" inaccessible. return e.style ? e : _doc.createElement(type); //some environments won't allow access to the element's style when created with a namespace in which case we default to the standard createElement() to work around the issue. Also note that when GSAP is embedded directly inside an SVG file, createElement() won't allow access to the style object in Firefox (see https://greensock.com/forums/topic/20215-problem-using-tweenmax-in-standalone-self-containing-svg-file-err-cannot-set-property-csstext-of-undefined/). }, _getComputedProperty = function _getComputedProperty(target, property, skipPrefixFallback) { var cs = getComputedStyle(target); return cs[property] || cs.getPropertyValue(property.replace(_capsExp, "-$1").toLowerCase()) || cs.getPropertyValue(property) || !skipPrefixFallback && _getComputedProperty(target, _checkPropPrefix(property) || property, 1) || ""; //css variables may not need caps swapped out for dashes and lowercase. }, _prefixes = "O,Moz,ms,Ms,Webkit".split(","), _checkPropPrefix = function _checkPropPrefix(property, element) { var e = element || _tempDiv, s = e.style, i = 5; if (property in s) { return property; } property = property.charAt(0).toUpperCase() + property.substr(1); while (i-- && !(_prefixes[i] + property in s)) {} return i < 0 ? null : (i === 3 ? "ms" : i >= 0 ? _prefixes[i] : "") + property; }, _initCore = function _initCore() { if (_windowExists()) { _win = window; _doc = _win.document; _docElement = _doc.documentElement; _tempDiv = _createElement("div") || { style: {} }; _tempDivStyler = _createElement("div"); _transformProp = _checkPropPrefix(_transformProp); _transformOriginProp = _checkPropPrefix(_transformOriginProp); _tempDiv.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0"; //make sure to override certain properties that may contaminate measurements, in case the user has overreaching style sheets. _supports3D = !!_checkPropPrefix("perspective"); _pluginInitted = 1; } }, _getBBoxHack = function _getBBoxHack(swapIfPossible) { //works around issues in some browsers (like Firefox) that don't correctly report getBBox() on SVG elements inside a element and/or . We try creating an SVG, adding it to the documentElement and toss the element in there so that it's definitely part of the rendering tree, then grab the bbox and if it works, we actually swap out the original getBBox() method for our own that does these extra steps whenever getBBox is needed. This helps ensure that performance is optimal (only do all these extra steps when absolutely necessary...most elements don't need it). var svg = _createElement("svg", this.ownerSVGElement && this.ownerSVGElement.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), oldParent = this.parentNode, oldSibling = this.nextSibling, oldCSS = this.style.cssText, bbox; _docElement.appendChild(svg); svg.appendChild(this); this.style.display = "block"; if (swapIfPossible) { try { bbox = this.getBBox(); this._gsapBBox = this.getBBox; //store the original this.getBBox = _getBBoxHack; } catch (e) {} } else if (this._gsapBBox) { bbox = this._gsapBBox(); } if (oldSibling) { oldParent.insertBefore(this, oldSibling); } else { oldParent.appendChild(this); } _docElement.removeChild(svg); this.style.cssText = oldCSS; return bbox; }, _getAttributeFallbacks = function _getAttributeFallbacks(target, attributesArray) { var i = attributesArray.length; while (i--) { if (target.hasAttribute(attributesArray[i])) { return target.getAttribute(attributesArray[i]); } } }, _getBBox = function _getBBox(target) { var bounds; try { bounds = target.getBBox(); //Firefox throws errors if you try calling getBBox() on an SVG element that's not rendered (like in a or ). https://bugzilla.mozilla.org/show_bug.cgi?id=612118 } catch (error) { bounds = _getBBoxHack.call(target, true); } //some browsers (like Firefox) misreport the bounds if the element has zero width and height (it just assumes it's at x:0, y:0), thus we need to manually grab the position in that case. return bounds && !bounds.width && !bounds.x && !bounds.y ? { x: +_getAttributeFallbacks(target, ["x", "cx", "x1"]) || 0, y: +_getAttributeFallbacks(target, ["y", "cy", "y1"]) || 0, width: 0, height: 0 } : bounds; }, _isSVG = function _isSVG(e) { return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) && _getBBox(e)); }, //reports if the element is an SVG on which getBBox() actually works _removeProperty = function _removeProperty(target, property) { if (property) { var style = target.style; if (property in _transformProps) { property = _transformProp; } if (style.removeProperty) { if (property.substr(0, 2) === "ms" || property.substr(0, 6) === "webkit") { //Microsoft and some Webkit browsers don't conform to the standard of capitalizing the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be "ms-transform" instead of "-ms-transform" for IE9, for example) property = "-" + property; } style.removeProperty(property.replace(_capsExp, "-$1").toLowerCase()); } else { //note: old versions of IE use "removeAttribute()" instead of "removeProperty()" style.removeAttribute(property); } } }, _addNonTweeningPT = function _addNonTweeningPT(plugin, target, property, beginning, end, onlySetAtEnd) { var pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](plugin._pt, target, property, 0, 1, onlySetAtEnd ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue); plugin._pt = pt; pt.b = beginning; pt.e = end; plugin._props.push(property); return pt; }, _nonConvertibleUnits = { deg: 1, rad: 1, turn: 1 }, //takes a single value like 20px and converts it to the unit specified, like "%", returning only the numeric amount. _convertToUnit = function _convertToUnit(target, property, value, unit) { var curValue = parseFloat(value), curUnit = (value + "").substr((curValue + "").length) || "px", style = _tempDiv.style, horizontal = _horizontalExp.test(property), isRootSVG = target.tagName.toLowerCase() === "svg", measureProperty = (isRootSVG ? "client" : "offset") + (horizontal ? "Width" : "Height"), amount = 100, toPixels = unit === "px", px, parent, cache, isSVG; if (unit === curUnit || _nonConvertibleUnits[unit] || _nonConvertibleUnits[curUnit]) { return curValue; } isSVG = target.getCTM && _isSVG(target); if (unit === "%" && _transformProps[property]) { //transforms are relative to the size of the element itself! return Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(curValue / (isSVG ? target.getBBox()[horizontal ? "width" : "height"] : target[measureProperty]) * amount); } style[horizontal ? "width" : "height"] = amount + (toPixels ? curUnit : unit); parent = unit === "em" && target.appendChild && !isRootSVG ? target : target.parentNode; if (isSVG) { parent = (target.ownerSVGElement || {}).parentNode; } if (!parent || parent === _doc || !parent.appendChild) { parent = _doc.body; } cache = parent._gsap; if (cache && unit === "%" && cache.width && horizontal && cache.time === _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_ticker"].time) { return Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(curValue / cache.width * amount); } else { parent.appendChild(_tempDiv); px = _tempDiv[measureProperty]; parent.removeChild(_tempDiv); if (horizontal && unit === "%") { cache = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_getCache"])(parent); cache.time = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_ticker"].time; cache.width = parent[measureProperty]; } } return Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(toPixels ? px * curValue / amount : amount / px * curValue); }, _get = function _get(target, property, unit, uncache) { var value; if (!_pluginInitted) { _initCore(); } if (property in _propertyAliases && property !== "transform") { property = _propertyAliases[property]; if (~property.indexOf(",")) { property = property.split(",")[0]; } } if (_transformProps[property] && property !== "transform") { value = _parseTransform(target, uncache); value = property !== "transformOrigin" ? value[property] : _firstTwoOnly(_getComputedProperty(target, _transformOriginProp)) + value.zOrigin + "px"; } else { value = target.style[property]; if (!value || value === "auto" || uncache || ~value.indexOf("calc(")) { value = _getComputedProperty(target, property) || Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_getProperty"])(target, property) || (property === "opacity" ? 1 : 0); } } return unit ? _convertToUnit(target, property, value, unit) + unit : value; }, _tweenComplexCSSString = function _tweenComplexCSSString(target, prop, start, end) { //note: we call _tweenComplexCSSString.call(pluginInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus "this" would refer to the plugin. var pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](this._pt, target.style, prop, 0, 1, _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_renderComplexString"]), index = 0, matchIndex = 0, a, result, startValues, startNum, color, startValue, endValue, endNum, chunk, endUnit, startUnit, relative, endValues; pt.b = start; pt.e = end; start += ""; //ensure values are strings end += ""; if (end === "auto") { target.style[prop] = end; end = _getComputedProperty(target, prop) || end; target.style[prop] = start; } a = [start, end]; Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_colorStringFilter"])(a); //pass an array with the starting and ending values and let the filter do whatever it needs to the values. start = a[0]; end = a[1]; startValue = start.indexOf("rgba("); endValue = end.indexOf("rgba("); if (!!startValue !== !!endValue) { // for things like boxShadow, sometimes the browser provides the computed values with the color FIRST, but the user provides it with the color LAST, so flip them if necessary. if (startValue) { start = start.substr(startValue) + " " + start.substr(0, startValue - 1); } else { end = end.substr(endValue) + " " + end.substr(0, endValue - 1); } } startValues = start.match(_numWithUnitExp) || []; endValues = end.match(_numWithUnitExp) || []; if (endValues.length) { while (result = _numWithUnitExp.exec(end)) { endValue = result[0]; chunk = end.substring(index, result.index); if (color) { color = (color + 1) % 5; } else if (chunk.substr(-5) === "rgba(") { color = 1; } if (endValue !== (startValue = startValues[matchIndex++] || "")) { startNum = parseFloat(startValue) || 0; startUnit = startValue.substr((startNum + "").length); relative = endValue.charAt(1) === "=" ? +(endValue.charAt(0) + "1") : 0; if (relative) { endValue = endValue.substr(2); } endNum = parseFloat(endValue); endUnit = endValue.substr((endNum + "").length); index = _numWithUnitExp.lastIndex - endUnit.length; if (!endUnit) { //if something like "perspective:300" is passed in and we must add a unit to the end endUnit = endUnit || _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units[prop] || startUnit; if (index === end.length) { end += endUnit; pt.e += endUnit; } } if (startUnit !== endUnit) { startNum = _convertToUnit(target, prop, startValue, endUnit) || 0; } //these nested PropTweens are handled in a special way - we'll never actually call a render or setter method on them. We'll just loop through them in the parent complex string PropTween's render method. pt._pt = { _next: pt._pt, p: chunk || matchIndex === 1 ? chunk : ",", //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case. s: startNum, c: relative ? relative * endNum : endNum - startNum, m: color && color < 4 ? Math.round : 0 }; } } pt.c = index < end.length ? end.substring(index, end.length) : ""; //we use the "c" of the PropTween to store the final part of the string (after the last number) } else { pt.r = prop === "display" && end === "none" ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue; } if (_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_relExp"].test(end)) { pt.e = 0; //if the end string contains relative values or dynamic random(...) values, delete the end it so that on the final render we don't actually set it to the string with += or -= characters (forces it to use the calculated value). } this._pt = pt; //start the linked list with this new PropTween. Remember, we call _tweenComplexCSSString.call(pluginInstance...) to ensure that it's scoped properly. We may call it from within another plugin too, thus "this" would refer to the plugin. return pt; }, _keywordToPercent = { top: "0%", bottom: "100%", left: "0%", right: "100%", center: "50%" }, _convertKeywordsToPercentages = function _convertKeywordsToPercentages(value) { var split = value.split(" "), x = split[0], y = split[1] || "50%"; if (x === "top" || x === "bottom" || y === "left" || y === "right") { //the user provided them in the wrong order, so flip them value = x; x = y; y = value; } split[0] = _keywordToPercent[x] || x; split[1] = _keywordToPercent[y] || y; return split.join(" "); }, _renderClearProps = function _renderClearProps(ratio, data) { if (data.tween && data.tween._time === data.tween._dur) { var target = data.t, style = target.style, props = data.u, prop, clearTransforms, i; if (props === "all" || props === true) { style.cssText = ""; clearTransforms = 1; } else { props = props.split(","); i = props.length; while (--i > -1) { prop = props[i]; if (_transformProps[prop]) { clearTransforms = 1; prop = prop === "transformOrigin" ? _transformOriginProp : _transformProp; } _removeProperty(target, prop); } } if (clearTransforms) { _removeProperty(target, _transformProp); clearTransforms = target._gsap; if (clearTransforms) { if (clearTransforms.svg) { target.removeAttribute("transform"); } _parseTransform(target, 1); // force all the cached values back to "normal"/identity, otherwise if there's another tween that's already set to render transforms on this element, it could display the wrong values. } } } }, // note: specialProps should return 1 if (and only if) they have a non-zero priority. It indicates we need to sort the linked list. _specialProps = { clearProps: function clearProps(plugin, target, property, endValue, tween) { if (tween.data !== "isFromStart") { var pt = plugin._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](plugin._pt, target, property, 0, 0, _renderClearProps); pt.u = endValue; pt.pr = -10; pt.tween = tween; plugin._props.push(property); return 1; } } /* className feature (about 0.4kb gzipped). , className(plugin, target, property, endValue, tween) { let _renderClassName = (ratio, data) => { data.css.render(ratio, data.css); if (!ratio || ratio === 1) { let inline = data.rmv, target = data.t, p; target.setAttribute("class", ratio ? data.e : data.b); for (p in inline) { _removeProperty(target, p); } } }, _getAllStyles = (target) => { let styles = {}, computed = getComputedStyle(target), p; for (p in computed) { if (isNaN(p) && p !== "cssText" && p !== "length") { styles[p] = computed[p]; } } _setDefaults(styles, _parseTransform(target, 1)); return styles; }, startClassList = target.getAttribute("class"), style = target.style, cssText = style.cssText, cache = target._gsap, classPT = cache.classPT, inlineToRemoveAtEnd = {}, data = {t:target, plugin:plugin, rmv:inlineToRemoveAtEnd, b:startClassList, e:(endValue.charAt(1) !== "=") ? endValue : startClassList.replace(new RegExp("(?:\\s|^)" + endValue.substr(2) + "(?![\\w-])"), "") + ((endValue.charAt(0) === "+") ? " " + endValue.substr(2) : "")}, changingVars = {}, startVars = _getAllStyles(target), transformRelated = /(transform|perspective)/i, endVars, p; if (classPT) { classPT.r(1, classPT.d); _removeLinkedListItem(classPT.d.plugin, classPT, "_pt"); } target.setAttribute("class", data.e); endVars = _getAllStyles(target, true); target.setAttribute("class", startClassList); for (p in endVars) { if (endVars[p] !== startVars[p] && !transformRelated.test(p)) { changingVars[p] = endVars[p]; if (!style[p] && style[p] !== "0") { inlineToRemoveAtEnd[p] = 1; } } } cache.classPT = plugin._pt = new PropTween(plugin._pt, target, "className", 0, 0, _renderClassName, data, 0, -11); if (style.cssText !== cssText) { //only apply if things change. Otherwise, in cases like a background-image that's pulled dynamically, it could cause a refresh. See https://greensock.com/forums/topic/20368-possible-gsap-bug-switching-classnames-in-chrome/. style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity). } _parseTransform(target, true); //to clear the caching of transforms data.css = new gsap.plugins.css(); data.css.init(target, changingVars, tween); plugin._props.push(...data.css._props); return 1; } */ }, /* * -------------------------------------------------------------------------------------- * TRANSFORMS * -------------------------------------------------------------------------------------- */ _identity2DMatrix = [1, 0, 0, 1, 0, 0], _rotationalProperties = {}, _isNullTransform = function _isNullTransform(value) { return value === "matrix(1, 0, 0, 1, 0, 0)" || value === "none" || !value; }, _getComputedTransformMatrixAsArray = function _getComputedTransformMatrixAsArray(target) { var matrixString = _getComputedProperty(target, _transformProp); return _isNullTransform(matrixString) ? _identity2DMatrix : matrixString.substr(7).match(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_numExp"]).map(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"]); }, _getMatrix = function _getMatrix(target, force2D) { var cache = target._gsap, style = target.style, matrix = _getComputedTransformMatrixAsArray(target), parent, nextSibling, temp, addedToDOM; if (cache.svg && target.getAttribute("transform")) { temp = target.transform.baseVal.consolidate().matrix; //ensures that even complex values like "translate(50,60) rotate(135,0,0)" are parsed because it mashes it into a matrix. matrix = [temp.a, temp.b, temp.c, temp.d, temp.e, temp.f]; return matrix.join(",") === "1,0,0,1,0,0" ? _identity2DMatrix : matrix; } else if (matrix === _identity2DMatrix && !target.offsetParent && target !== _docElement && !cache.svg) { //note: if offsetParent is null, that means the element isn't in the normal document flow, like if it has display:none or one of its ancestors has display:none). Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397 //browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px). temp = style.display; style.display = "block"; parent = target.parentNode; if (!parent || !target.offsetParent) { addedToDOM = 1; //flag nextSibling = target.nextSibling; _docElement.appendChild(target); //we must add it to the DOM in order to get values properly } matrix = _getComputedTransformMatrixAsArray(target); if (temp) { style.display = temp; } else { _removeProperty(target, "display"); } if (addedToDOM) { if (nextSibling) { parent.insertBefore(target, nextSibling); } else if (parent) { parent.appendChild(target); } else { _docElement.removeChild(target); } } } return force2D && matrix.length > 6 ? [matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]] : matrix; }, _applySVGOrigin = function _applySVGOrigin(target, origin, originIsAbsolute, smooth, matrixArray, pluginToAddPropTweensTo) { var cache = target._gsap, matrix = matrixArray || _getMatrix(target, true), xOriginOld = cache.xOrigin || 0, yOriginOld = cache.yOrigin || 0, xOffsetOld = cache.xOffset || 0, yOffsetOld = cache.yOffset || 0, a = matrix[0], b = matrix[1], c = matrix[2], d = matrix[3], tx = matrix[4], ty = matrix[5], originSplit = origin.split(" "), xOrigin = parseFloat(originSplit[0]) || 0, yOrigin = parseFloat(originSplit[1]) || 0, bounds, determinant, x, y; if (!originIsAbsolute) { bounds = _getBBox(target); xOrigin = bounds.x + (~originSplit[0].indexOf("%") ? xOrigin / 100 * bounds.width : xOrigin); yOrigin = bounds.y + (~(originSplit[1] || originSplit[0]).indexOf("%") ? yOrigin / 100 * bounds.height : yOrigin); } else if (matrix !== _identity2DMatrix && (determinant = a * d - b * c)) { //if it's zero (like if scaleX and scaleY are zero), skip it to avoid errors with dividing by zero. x = xOrigin * (d / determinant) + yOrigin * (-c / determinant) + (c * ty - d * tx) / determinant; y = xOrigin * (-b / determinant) + yOrigin * (a / determinant) - (a * ty - b * tx) / determinant; xOrigin = x; yOrigin = y; } if (smooth || smooth !== false && cache.smooth) { tx = xOrigin - xOriginOld; ty = yOrigin - yOriginOld; cache.xOffset = xOffsetOld + (tx * a + ty * c) - tx; cache.yOffset = yOffsetOld + (tx * b + ty * d) - ty; } else { cache.xOffset = cache.yOffset = 0; } cache.xOrigin = xOrigin; cache.yOrigin = yOrigin; cache.smooth = !!smooth; cache.origin = origin; cache.originIsAbsolute = !!originIsAbsolute; target.style[_transformOriginProp] = "0px 0px"; //otherwise, if someone sets an origin via CSS, it will likely interfere with the SVG transform attribute ones (because remember, we're baking the origin into the matrix() value). if (pluginToAddPropTweensTo) { _addNonTweeningPT(pluginToAddPropTweensTo, cache, "xOrigin", xOriginOld, xOrigin); _addNonTweeningPT(pluginToAddPropTweensTo, cache, "yOrigin", yOriginOld, yOrigin); _addNonTweeningPT(pluginToAddPropTweensTo, cache, "xOffset", xOffsetOld, cache.xOffset); _addNonTweeningPT(pluginToAddPropTweensTo, cache, "yOffset", yOffsetOld, cache.yOffset); } }, _parseTransform = function _parseTransform(target, uncache) { var cache = target._gsap || new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["GSCache"](target); if ("x" in cache && !uncache && !cache.uncache) { return cache; } var style = target.style, invertedScaleX = cache.scaleX < 0, xOrigin = cache.xOrigin || 0, yOrigin = cache.yOrigin || 0, px = "px", deg = "deg", origin = _getComputedProperty(target, _transformOriginProp) || "0", x, y, z, scaleX, scaleY, rotation, rotationX, rotationY, skewX, skewY, perspective, matrix, angle, cos, sin, a, b, c, d, a12, a22, t1, t2, t3, a13, a23, a33, a42, a43, a32; x = y = z = rotation = rotationX = rotationY = skewX = skewY = perspective = 0; scaleX = scaleY = 1; cache.svg = !!(target.getCTM && _isSVG(target)); matrix = _getMatrix(target, cache.svg); if (cache.svg) { _applySVGOrigin(target, origin, cache.originIsAbsolute, cache.smooth !== false, matrix); } if (matrix !== _identity2DMatrix) { a = matrix[0]; //a11 b = matrix[1]; //a21 c = matrix[2]; //a31 d = matrix[3]; //a41 x = a12 = matrix[4]; y = a22 = matrix[5]; //2D matrix if (matrix.length === 6) { scaleX = Math.sqrt(a * a + b * b); scaleY = Math.sqrt(d * d + c * c); rotation = a || b ? _atan2(b, a) * _RAD2DEG : 0; //note: if scaleX is 0, we cannot accurately measure rotation. Same for skewX with a scaleY of 0. Therefore, we default to the previously recorded value (or zero if that doesn't exist). skewX = c || d ? _atan2(c, d) * _RAD2DEG + rotation : 0; if (cache.svg) { x -= xOrigin - (xOrigin * a + yOrigin * c); y -= yOrigin - (xOrigin * b + yOrigin * d); } //3D matrix } else { a32 = matrix[6]; a42 = matrix[7]; a13 = matrix[8]; a23 = matrix[9]; a33 = matrix[10]; a43 = matrix[11]; x = matrix[12]; y = matrix[13]; z = matrix[14]; angle = _atan2(a32, a33); rotationX = angle * _RAD2DEG; //rotationX if (angle) { cos = Math.cos(-angle); sin = Math.sin(-angle); t1 = a12 * cos + a13 * sin; t2 = a22 * cos + a23 * sin; t3 = a32 * cos + a33 * sin; a13 = a12 * -sin + a13 * cos; a23 = a22 * -sin + a23 * cos; a33 = a32 * -sin + a33 * cos; a43 = a42 * -sin + a43 * cos; a12 = t1; a22 = t2; a32 = t3; } //rotationY angle = _atan2(-c, a33); rotationY = angle * _RAD2DEG; if (angle) { cos = Math.cos(-angle); sin = Math.sin(-angle); t1 = a * cos - a13 * sin; t2 = b * cos - a23 * sin; t3 = c * cos - a33 * sin; a43 = d * sin + a43 * cos; a = t1; b = t2; c = t3; } //rotationZ angle = _atan2(b, a); rotation = angle * _RAD2DEG; if (angle) { cos = Math.cos(angle); sin = Math.sin(angle); t1 = a * cos + b * sin; t2 = a12 * cos + a22 * sin; b = b * cos - a * sin; a22 = a22 * cos - a12 * sin; a = t1; a12 = t2; } if (rotationX && Math.abs(rotationX) + Math.abs(rotation) > 359.9) { //when rotationY is set, it will often be parsed as 180 degrees different than it should be, and rotationX and rotation both being 180 (it looks the same), so we adjust for that here. rotationX = rotation = 0; rotationY = 180 - rotationY; } scaleX = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(Math.sqrt(a * a + b * b + c * c)); scaleY = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(Math.sqrt(a22 * a22 + a32 * a32)); angle = _atan2(a12, a22); skewX = Math.abs(angle) > 0.0002 ? angle * _RAD2DEG : 0; perspective = a43 ? 1 / (a43 < 0 ? -a43 : a43) : 0; } if (cache.svg) { //sense if there are CSS transforms applied on an SVG element in which case we must overwrite them when rendering. The transform attribute is more reliable cross-browser, but we can't just remove the CSS ones because they may be applied in a CSS rule somewhere (not just inline). matrix = target.getAttribute("transform"); cache.forceCSS = target.setAttribute("transform", "") || !_isNullTransform(_getComputedProperty(target, _transformProp)); matrix && target.setAttribute("transform", matrix); } } if (Math.abs(skewX) > 90 && Math.abs(skewX) < 270) { if (invertedScaleX) { scaleX *= -1; skewX += rotation <= 0 ? 180 : -180; rotation += rotation <= 0 ? 180 : -180; } else { scaleY *= -1; skewX += skewX <= 0 ? 180 : -180; } } cache.x = ((cache.xPercent = x && Math.round(target.offsetWidth / 2) === Math.round(-x) ? -50 : 0) ? 0 : x) + px; cache.y = ((cache.yPercent = y && Math.round(target.offsetHeight / 2) === Math.round(-y) ? -50 : 0) ? 0 : y) + px; cache.z = z + px; cache.scaleX = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(scaleX); cache.scaleY = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(scaleY); cache.rotation = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(rotation) + deg; cache.rotationX = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(rotationX) + deg; cache.rotationY = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(rotationY) + deg; cache.skewX = skewX + deg; cache.skewY = skewY + deg; cache.transformPerspective = perspective + px; if (cache.zOrigin = parseFloat(origin.split(" ")[2]) || 0) { style[_transformOriginProp] = _firstTwoOnly(origin); } cache.xOffset = cache.yOffset = 0; cache.force3D = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].force3D; cache.renderTransform = cache.svg ? _renderSVGTransforms : _supports3D ? _renderCSSTransforms : _renderNon3DTransforms; cache.uncache = 0; return cache; }, _firstTwoOnly = function _firstTwoOnly(value) { return (value = value.split(" "))[0] + " " + value[1]; }, //for handling transformOrigin values, stripping out the 3rd dimension _addPxTranslate = function _addPxTranslate(target, start, value) { var unit = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(start); return Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(parseFloat(start) + parseFloat(_convertToUnit(target, "x", value + "px", unit))) + unit; }, _renderNon3DTransforms = function _renderNon3DTransforms(ratio, cache) { cache.z = "0px"; cache.rotationY = cache.rotationX = "0deg"; cache.force3D = 0; _renderCSSTransforms(ratio, cache); }, _zeroDeg = "0deg", _zeroPx = "0px", _endParenthesis = ") ", _renderCSSTransforms = function _renderCSSTransforms(ratio, cache) { var _ref = cache || this, xPercent = _ref.xPercent, yPercent = _ref.yPercent, x = _ref.x, y = _ref.y, z = _ref.z, rotation = _ref.rotation, rotationY = _ref.rotationY, rotationX = _ref.rotationX, skewX = _ref.skewX, skewY = _ref.skewY, scaleX = _ref.scaleX, scaleY = _ref.scaleY, transformPerspective = _ref.transformPerspective, force3D = _ref.force3D, target = _ref.target, zOrigin = _ref.zOrigin, transforms = "", use3D = force3D === "auto" && ratio && ratio !== 1 || force3D === true; // Safari has a bug that causes it not to render 3D transform-origin values properly, so we force the z origin to 0, record it in the cache, and then do the math here to offset the translate values accordingly (basically do the 3D transform-origin part manually) if (zOrigin && (rotationX !== _zeroDeg || rotationY !== _zeroDeg)) { var angle = parseFloat(rotationY) * _DEG2RAD, a13 = Math.sin(angle), a33 = Math.cos(angle), cos; angle = parseFloat(rotationX) * _DEG2RAD; cos = Math.cos(angle); x = _addPxTranslate(target, x, a13 * cos * -zOrigin); y = _addPxTranslate(target, y, -Math.sin(angle) * -zOrigin); z = _addPxTranslate(target, z, a33 * cos * -zOrigin + zOrigin); } if (xPercent || yPercent) { transforms = "translate(" + xPercent + "%, " + yPercent + "%) "; } if (use3D || x !== _zeroPx || y !== _zeroPx || z !== _zeroPx) { transforms += z !== _zeroPx || use3D ? "translate3d(" + x + ", " + y + ", " + z + ") " : "translate(" + x + ", " + y + _endParenthesis; } if (transformPerspective !== _zeroPx) { transforms += "perspective(" + transformPerspective + _endParenthesis; } if (rotation !== _zeroDeg) { transforms += "rotate(" + rotation + _endParenthesis; } if (rotationY !== _zeroDeg) { transforms += "rotateY(" + rotationY + _endParenthesis; } if (rotationX !== _zeroDeg) { transforms += "rotateX(" + rotationX + _endParenthesis; } if (skewX !== _zeroDeg || skewY !== _zeroDeg) { transforms += "skew(" + skewX + ", " + skewY + _endParenthesis; } if (scaleX !== 1 || scaleY !== 1) { transforms += "scale(" + scaleX + ", " + scaleY + _endParenthesis; } target.style[_transformProp] = transforms || "translate(0, 0)"; }, _renderSVGTransforms = function _renderSVGTransforms(ratio, cache) { var _ref2 = cache || this, xPercent = _ref2.xPercent, yPercent = _ref2.yPercent, x = _ref2.x, y = _ref2.y, rotation = _ref2.rotation, skewX = _ref2.skewX, skewY = _ref2.skewY, scaleX = _ref2.scaleX, scaleY = _ref2.scaleY, target = _ref2.target, xOrigin = _ref2.xOrigin, yOrigin = _ref2.yOrigin, xOffset = _ref2.xOffset, yOffset = _ref2.yOffset, forceCSS = _ref2.forceCSS, tx = parseFloat(x), ty = parseFloat(y), a11, a21, a12, a22, temp; rotation = parseFloat(rotation); skewX = parseFloat(skewX); skewY = parseFloat(skewY); if (skewY) { //for performance reasons, we combine all skewing into the skewX and rotation values. Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of 10 degrees. skewY = parseFloat(skewY); skewX += skewY; rotation += skewY; } if (rotation || skewX) { rotation *= _DEG2RAD; skewX *= _DEG2RAD; a11 = Math.cos(rotation) * scaleX; a21 = Math.sin(rotation) * scaleX; a12 = Math.sin(rotation - skewX) * -scaleY; a22 = Math.cos(rotation - skewX) * scaleY; if (skewX) { skewY *= _DEG2RAD; temp = Math.tan(skewX - skewY); temp = Math.sqrt(1 + temp * temp); a12 *= temp; a22 *= temp; if (skewY) { temp = Math.tan(skewY); temp = Math.sqrt(1 + temp * temp); a11 *= temp; a21 *= temp; } } a11 = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(a11); a21 = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(a21); a12 = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(a12); a22 = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(a22); } else { a11 = scaleX; a22 = scaleY; a21 = a12 = 0; } if (tx && !~(x + "").indexOf("px") || ty && !~(y + "").indexOf("px")) { tx = _convertToUnit(target, "x", x, "px"); ty = _convertToUnit(target, "y", y, "px"); } if (xOrigin || yOrigin || xOffset || yOffset) { tx = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(tx + xOrigin - (xOrigin * a11 + yOrigin * a12) + xOffset); ty = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(ty + yOrigin - (xOrigin * a21 + yOrigin * a22) + yOffset); } if (xPercent || yPercent) { //The SVG spec doesn't support percentage-based translation in the "transform" attribute, so we merge it into the translation to simulate it. temp = target.getBBox(); tx = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(tx + xPercent / 100 * temp.width); ty = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(ty + yPercent / 100 * temp.height); } temp = "matrix(" + a11 + "," + a21 + "," + a12 + "," + a22 + "," + tx + "," + ty + ")"; target.setAttribute("transform", temp); if (forceCSS) { //some browsers prioritize CSS transforms over the transform attribute. When we sense that the user has CSS transforms applied, we must overwrite them this way (otherwise some browser simply won't render the transform attribute changes!) target.style[_transformProp] = temp; } }, _addRotationalPropTween = function _addRotationalPropTween(plugin, target, property, startNum, endValue, relative) { var cap = 360, isString = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_isString"])(endValue), endNum = parseFloat(endValue) * (isString && ~endValue.indexOf("rad") ? _RAD2DEG : 1), change = relative ? endNum * relative : endNum - startNum, finalValue = startNum + change + "deg", direction, pt; if (isString) { direction = endValue.split("_")[1]; if (direction === "short") { change %= cap; if (change !== change % (cap / 2)) { change += change < 0 ? cap : -cap; } } if (direction === "cw" && change < 0) { change = (change + cap * _bigNum) % cap - ~~(change / cap) * cap; } else if (direction === "ccw" && change > 0) { change = (change - cap * _bigNum) % cap - ~~(change / cap) * cap; } } plugin._pt = pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](plugin._pt, target, property, startNum, change, _renderPropWithEnd); pt.e = finalValue; pt.u = "deg"; plugin._props.push(property); return pt; }, _addRawTransformPTs = function _addRawTransformPTs(plugin, transforms, target) { //for handling cases where someone passes in a whole transform string, like transform: "scale(2, 3) rotate(20deg) translateY(30em)" var style = _tempDivStyler.style, startCache = target._gsap, endCache, p, startValue, endValue, startNum, endNum, startUnit, endUnit; style.cssText = getComputedStyle(target).cssText + ";position:absolute;display:block;"; //%-based translations will fail unless we set the width/height to match the original target (and padding/borders can affect it) style[_transformProp] = transforms; _doc.body.appendChild(_tempDivStyler); endCache = _parseTransform(_tempDivStyler, 1); for (p in _transformProps) { startValue = startCache[p]; endValue = endCache[p]; if (startValue !== endValue && p !== "perspective") { //tweening to no perspective gives very unintuitive results - just keep the same perspective in that case. startUnit = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(startValue); endUnit = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(endValue); startNum = startUnit !== endUnit ? _convertToUnit(target, p, startValue, endUnit) : parseFloat(startValue); endNum = parseFloat(endValue); plugin._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](plugin._pt, startCache, p, startNum, endNum - startNum, _renderCSSProp); plugin._pt.u = endUnit; plugin._props.push(p); } } _doc.body.removeChild(_tempDivStyler); }; var CSSPlugin = { name: "css", register: _initCore, targetTest: function targetTest(target) { return target.style && target.nodeType; }, init: function init(target, vars, tween, index, targets) { var props = this._props, style = target.style, startValue, endValue, endNum, startNum, type, specialProp, p, startUnit, endUnit, relative, isTransformRelated, transformPropTween, cache, smooth, hasPriority; if (!_pluginInitted) { _initCore(); } for (p in vars) { if (p === "autoRound") { continue; } endValue = vars[p]; if (_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_plugins"][p] && Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_checkPlugin"])(p, vars, tween, index, target, targets)) { //plugins continue; } type = typeof endValue; specialProp = _specialProps[p]; if (type === "function") { endValue = endValue.call(tween, index, target, targets); type = typeof endValue; } if (type === "string" && ~endValue.indexOf("random(")) { endValue = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_replaceRandom"])(endValue); } if (specialProp) { if (specialProp(this, target, p, endValue, tween)) { hasPriority = 1; } } else if (p.substr(0, 2) === "--") { //CSS variable this.add(style, "setProperty", getComputedStyle(target).getPropertyValue(p) + "", endValue + "", index, targets, 0, 0, p); } else { startValue = _get(target, p); startNum = parseFloat(startValue); relative = type === "string" && endValue.charAt(1) === "=" ? +(endValue.charAt(0) + "1") : 0; if (relative) { endValue = endValue.substr(2); } endNum = parseFloat(endValue); if (p in _propertyAliases) { if (p === "autoAlpha") { //special case where we control the visibility along with opacity. We still allow the opacity value to pass through and get tweened. if (startNum === 1 && _get(target, "visibility") === "hidden" && endNum) { //if visibility is initially set to "hidden", we should interpret that as intent to make opacity 0 (a convenience) startNum = 0; } _addNonTweeningPT(this, style, "visibility", startNum ? "inherit" : "hidden", endNum ? "inherit" : "hidden", !endNum); } if (p !== "scale" && p !== "transform") { p = _propertyAliases[p]; if (~p.indexOf(",")) { p = p.split(",")[0]; } } } isTransformRelated = p in _transformProps; //--- TRANSFORM-RELATED --- if (isTransformRelated) { if (!transformPropTween) { cache = target._gsap; smooth = vars.smoothOrigin !== false && cache.smooth; transformPropTween = this._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](this._pt, style, _transformProp, 0, 1, cache.renderTransform, cache, 0, -1); //the first time through, create the rendering PropTween so that it runs LAST (in the linked list, we keep adding to the beginning) transformPropTween.dep = 1; //flag it as dependent so that if things get killed/overwritten and this is the only PropTween left, we can safely kill the whole tween. } if (p === "scale") { this._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](this._pt, cache, "scaleY", cache.scaleY, relative ? relative * endNum : endNum - cache.scaleY); props.push("scaleY", p); p += "X"; } else if (p === "transformOrigin") { endValue = _convertKeywordsToPercentages(endValue); //in case something like "left top" or "bottom right" is passed in. Convert to percentages. if (cache.svg) { _applySVGOrigin(target, endValue, 0, smooth, 0, this); } else { endUnit = parseFloat(endValue.split(" ")[2]); //handle the zOrigin separately! if (endUnit !== cache.zOrigin) { _addNonTweeningPT(this, cache, "zOrigin", cache.zOrigin, endUnit); } _addNonTweeningPT(this, style, p, _firstTwoOnly(startValue), _firstTwoOnly(endValue)); } continue; } else if (p === "svgOrigin") { _applySVGOrigin(target, endValue, 1, smooth, 0, this); continue; } else if (p in _rotationalProperties) { _addRotationalPropTween(this, cache, p, startNum, endValue, relative); continue; } else if (p === "smoothOrigin") { _addNonTweeningPT(this, cache, "smooth", cache.smooth, endValue); continue; } else if (p === "force3D") { cache[p] = endValue; continue; } else if (p === "transform") { _addRawTransformPTs(this, endValue, target); continue; } } else if (!(p in style)) { p = _checkPropPrefix(p) || p; } if (isTransformRelated || (endNum || endNum === 0) && (startNum || startNum === 0) && !_complexExp.test(endValue) && p in style) { startUnit = (startValue + "").substr((startNum + "").length); endUnit = (endValue + "").substr((endNum + "").length) || (p in _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units ? _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units[p] : startUnit); if (startUnit !== endUnit) { startNum = _convertToUnit(target, p, startValue, endUnit); } this._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](this._pt, isTransformRelated ? cache : style, p, startNum, relative ? relative * endNum : endNum - startNum, endUnit === "px" && vars.autoRound !== false && !isTransformRelated ? _renderRoundedCSSProp : _renderCSSProp); this._pt.u = endUnit || 0; if (startUnit !== endUnit) { //when the tween goes all the way back to the beginning, we need to revert it to the OLD/ORIGINAL value (with those units). We record that as a "b" (beginning) property and point to a render method that handles that. (performance optimization) this._pt.b = startValue; this._pt.r = _renderCSSPropWithBeginning; } } else if (!(p in style)) { if (p in target) { //maybe it's not a style - it could be a property added directly to an element in which case we'll try to animate that. this.add(target, p, target[p], endValue, index, targets); } else { Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_missingPlugin"])(p, endValue); continue; } } else { _tweenComplexCSSString.call(this, target, p, startValue, endValue); } props.push(p); } } if (hasPriority) { Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_sortPropTweensByPriority"])(this); } }, get: _get, aliases: _propertyAliases, getSetter: function getSetter(target, property, plugin) { //returns a setter function that accepts target, property, value and applies it accordingly. Remember, properties like "x" aren't as simple as target.style.property = value because they've got to be applied to a proxy object and then merged into a transform string in a renderer. return property in _transformProps && property !== _transformOriginProp && (target._gsap.x || _get(target, "x")) ? plugin && _recentSetterPlugin === plugin ? property === "scale" ? _setterScale : _setterTransform : (_recentSetterPlugin = plugin || {}) && (property === "scale" ? _setterScaleWithRender : _setterTransformWithRender) : target.style && !Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_isUndefined"])(target.style[property]) ? _setterCSSStyle : ~property.indexOf("-") ? _setterCSSProp : Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_getSetter"])(target, property); } }; _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"].utils.checkPrefix = _checkPropPrefix; (function (positionAndScale, rotation, others, aliases) { var all = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_forEachName"])(positionAndScale + "," + rotation + "," + others, function (name) { _transformProps[name] = 1; }); Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_forEachName"])(rotation, function (name) { _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units[name] = "deg"; _rotationalProperties[name] = 1; }); _propertyAliases[all[13]] = positionAndScale + "," + rotation; Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_forEachName"])(aliases, function (name) { var split = name.split(":"); _propertyAliases[split[1]] = all[split[0]]; }); })("x,y,z,scale,scaleX,scaleY,xPercent,yPercent", "rotation,rotationX,rotationY,skewX,skewY", "transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective", "0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,9:rotateX,10:rotateY"); Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_forEachName"])("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective", function (name) { _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units[name] = "px"; }); _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"].registerPlugin(CSSPlugin); /***/ }), /***/ "./node_modules/gsap/gsap-core.js": /*!****************************************!*\ !*** ./node_modules/gsap/gsap-core.js ***! \****************************************/ /*! exports provided: GSCache, Animation, Timeline, Tween, PropTween, gsap, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ, TweenMax, TweenLite, TimelineMax, TimelineLite, default, wrap, wrapYoyo, distribute, random, snap, normalize, getUnit, clamp, splitColor, toArray, mapRange, pipe, unitize, interpolate, _getProperty, _numExp, _isString, _isUndefined, _renderComplexString, _relExp, _setDefaults, _removeLinkedListItem, _forEachName, _sortPropTweensByPriority, _colorStringFilter, _replaceRandom, _checkPlugin, _plugins, _ticker, _config, _roundModifier, _round, _missingPlugin, _getSetter, _getCache */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GSCache", function() { return GSCache; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return Animation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timeline", function() { return Timeline; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tween", function() { return Tween; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropTween", function() { return PropTween; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gsap", function() { return gsap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power0", function() { return Power0; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power1", function() { return Power1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power2", function() { return Power2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power3", function() { return Power3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power4", function() { return Power4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Linear", function() { return Linear; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Quad", function() { return Quad; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cubic", function() { return Cubic; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Quart", function() { return Quart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Quint", function() { return Quint; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Strong", function() { return Strong; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Elastic", function() { return Elastic; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Back", function() { return Back; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SteppedEase", function() { return SteppedEase; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bounce", function() { return Bounce; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sine", function() { return Sine; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Expo", function() { return Expo; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Circ", function() { return Circ; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TweenMax", function() { return Tween; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TweenLite", function() { return Tween; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimelineMax", function() { return Timeline; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimelineLite", function() { return Timeline; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return gsap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return wrap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapYoyo", function() { return wrapYoyo; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distribute", function() { return distribute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "random", function() { return random; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "snap", function() { return snap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalize", function() { return normalize; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUnit", function() { return getUnit; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clamp", function() { return clamp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "splitColor", function() { return splitColor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapRange", function() { return mapRange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unitize", function() { return unitize; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return interpolate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getProperty", function() { return _getProperty; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_numExp", function() { return _numExp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_isString", function() { return _isString; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_isUndefined", function() { return _isUndefined; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_renderComplexString", function() { return _renderComplexString; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_relExp", function() { return _relExp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_setDefaults", function() { return _setDefaults; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_removeLinkedListItem", function() { return _removeLinkedListItem; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_forEachName", function() { return _forEachName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_sortPropTweensByPriority", function() { return _sortPropTweensByPriority; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_colorStringFilter", function() { return _colorStringFilter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_replaceRandom", function() { return _replaceRandom; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_checkPlugin", function() { return _checkPlugin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_plugins", function() { return _plugins; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_ticker", function() { return _ticker; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_config", function() { return _config; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_roundModifier", function() { return _roundModifier; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_round", function() { return _round; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_missingPlugin", function() { return _missingPlugin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getSetter", function() { return _getSetter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getCache", function() { return _getCache; }); function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } /*! * GSAP 3.0.4 * https://greensock.com * * @license Copyright 2008-2019, GreenSock. All rights reserved. * Subject to the terms at https://greensock.com/standard-license or for * Club GreenSock members, the agreement issued with that membership. * @author: Jack Doyle, jack@greensock.com */ /* eslint-disable */ var _config = { autoSleep: 120, force3D: "auto", nullTargetWarn: 1, units: { lineHeight: "" } }, _defaults = { duration: .5, overwrite: false, delay: 0 }, _bigNum = 1e8, _tinyNum = 1 / _bigNum, _2PI = Math.PI * 2, _HALF_PI = _2PI / 4, _gsID = 0, _sqrt = Math.sqrt, _cos = Math.cos, _sin = Math.sin, _isString = function _isString(value) { return typeof value === "string"; }, _isFunction = function _isFunction(value) { return typeof value === "function"; }, _isNumber = function _isNumber(value) { return typeof value === "number"; }, _isUndefined = function _isUndefined(value) { return typeof value === "undefined"; }, _isObject = function _isObject(value) { return typeof value === "object"; }, _isNotFalse = function _isNotFalse(value) { return value !== false; }, _windowExists = function _windowExists() { return typeof window !== "undefined"; }, _isFuncOrString = function _isFuncOrString(value) { return _isFunction(value) || _isString(value); }, _isArray = Array.isArray, _strictNumExp = /(?:-?\.?\d|\.)+/gi, //only numbers (including negatives and decimals) but NOT relative values. _numExp = /[-+=\.]*\d+[\.e\-\+]*\d*[e\-\+]*\d*/gi, //finds any numbers, including ones that start with += or -=, negative numbers, and ones in scientific notation like 1e-8. _complexStringNumExp = /[-+=\.]*\d+(?:\.|e-|e)*\d*/gi, //duplicate so that while we're looping through matches from exec(), it doesn't contaminate the lastIndex of _numExp which we use to search for colors too. _parenthesesExp = /\(([^()]+)\)/i, //finds the string between parentheses. _relExp = /[\+-]=-?[\.\d]+/, _delimitedValueExp = /[#\-+\.]*\b[a-z\d-=+%.]+/gi, _globalTimeline, _win, _coreInitted, _doc, _globals = {}, _installScope = {}, _coreReady, _install = function _install(scope) { return (_installScope = _merge(scope, _globals)) && gsap; }, _missingPlugin = function _missingPlugin(property, value) { return console.warn("Invalid property", property, "set to", value, "Missing plugin? gsap.registerPlugin()"); }, _warn = function _warn(message, suppress) { return !suppress && console.warn(message); }, _addGlobal = function _addGlobal(name, obj) { return name && (_globals[name] = obj) && _installScope && (_installScope[name] = obj) || _globals; }, _emptyFunc = function _emptyFunc() { return 0; }, _reservedProps = {}, _lazyTweens = [], _lazyLookup = {}, _plugins = {}, _effects = {}, _nextGCFrame = 30, _harnessPlugins = [], _callbackNames = "onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", _harness = function _harness(targets) { var target = targets[0], harnessPlugin, i; if (!_isObject(target) && !_isFunction(target)) { targets = [targets]; } if (!(harnessPlugin = (target._gsap || {}).harness)) { i = _harnessPlugins.length; while (i-- && !_harnessPlugins[i].targetTest(target)) {} harnessPlugin = _harnessPlugins[i]; } i = targets.length; while (i--) { targets[i] && (targets[i]._gsap || (targets[i]._gsap = new GSCache(targets[i], harnessPlugin))) || targets.splice(i, 1); } return targets; }, _getCache = function _getCache(target) { return target._gsap || _harness(toArray(target))[0]._gsap; }, _getProperty = function _getProperty(target, property) { var currentValue = target[property]; return _isFunction(currentValue) ? target[property]() : _isUndefined(currentValue) && target.getAttribute(property) || currentValue; }, _forEachName = function _forEachName(names, func) { return (names = names.split(",")).forEach(func) || names; }, //split a comma-delimited list of names into an array, then run a forEach() function and return the split array (this is just a way to consolidate/shorten some code). _round = function _round(value) { return Math.round(value * 10000) / 10000; }, _arrayContainsAny = function _arrayContainsAny(toSearch, toFind) { //searches one array to find matches for any of the items in the toFind array. As soon as one is found, it returns true. It does NOT return all the matches; it's simply a boolean search. var l = toFind.length, i = 0; for (; toSearch.indexOf(toFind[i]) < 0 && ++i < l;) {} return i < l; }, _parseVars = function _parseVars(params, type, parent) { //reads the arguments passed to one of the key methods and figures out if the user is defining things with the OLD/legacy syntax where the duration is the 2nd parameter, and then it adjusts things accordingly and spits back the corrected vars object (with the duration added if necessary, as well as runBackwards or startAt or immediateRender). type 0 = to()/staggerTo(), 1 = from()/staggerFrom(), 2 = fromTo()/staggerFromTo() var isLegacy = _isNumber(params[1]), varsIndex = (isLegacy ? 2 : 1) + (type < 2 ? 0 : 1), vars = params[varsIndex], i; if (isLegacy) { vars.duration = params[1]; } if (type === 1) { vars.runBackwards = 1; vars.immediateRender = _isNotFalse(vars.immediateRender); } else if (type === 2) { i = params[varsIndex - 1]; //"from" vars vars.startAt = i; vars.immediateRender = _isNotFalse(vars.immediateRender); } vars.parent = parent; return vars; }, _lazyRender = function _lazyRender() { var l = _lazyTweens.length, a = _lazyTweens.slice(0), i, tween; _lazyLookup = {}; _lazyTweens.length = 0; for (i = 0; i < l; i++) { tween = a[i]; if (tween && tween._lazy) { tween.render(tween._lazy[0], tween._lazy[1], true)._lazy = 0; } } }, _lazySafeRender = function _lazySafeRender(animation, time, suppressEvents, force) { if (_lazyTweens.length) { _lazyRender(); } animation.render(time, suppressEvents, force); if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render. _lazyRender(); } }, _numericIfPossible = function _numericIfPossible(value) { var n = parseFloat(value); return n || n === 0 ? n : value; }, _passThrough = function _passThrough(p) { return p; }, _setDefaults = function _setDefaults(obj, defaults) { for (var p in defaults) { if (!(p in obj)) { obj[p] = defaults[p]; } } return obj; }, _setKeyframeDefaults = function _setKeyframeDefaults(obj, defaults) { for (var p in defaults) { if (!(p in obj) && p !== "duration" && p !== "ease") { obj[p] = defaults[p]; } } }, _merge = function _merge(base, toMerge) { for (var p in toMerge) { base[p] = toMerge[p]; } return base; }, _mergeDeep = function _mergeDeep(base, toMerge) { for (var p in toMerge) { base[p] = _isObject(toMerge[p]) ? _mergeDeep(base[p] || (base[p] = {}), toMerge[p]) : toMerge[p]; } return base; }, _copyExcluding = function _copyExcluding(obj, excluding) { var copy = {}, p; for (p in obj) { if (!(p in excluding)) { copy[p] = obj[p]; } } return copy; }, _inheritDefaults = function _inheritDefaults(vars) { var parent = vars.parent || _globalTimeline, func = vars.keyframes ? _setKeyframeDefaults : _setDefaults; if (_isNotFalse(vars.inherit)) { while (parent) { func(vars, parent.vars.defaults); parent = parent.parent; } } return vars; }, _arraysMatch = function _arraysMatch(a1, a2) { var i = a1.length, match = i === a2.length; while (match && i-- && a1[i] === a2[i]) {} return i < 0; }, _addLinkedListItem = function _addLinkedListItem(parent, child, firstProp, lastProp, sortBy) { if (firstProp === void 0) { firstProp = "_first"; } if (lastProp === void 0) { lastProp = "_last"; } var prev = parent[lastProp], t; if (sortBy) { t = child[sortBy]; while (prev && prev[sortBy] > t) { prev = prev._prev; } } if (prev) { child._next = prev._next; prev._next = child; } else { child._next = parent[firstProp]; parent[firstProp] = child; } if (child._next) { child._next._prev = child; } else { parent[lastProp] = child; } child._prev = prev; child.parent = parent; return child; }, _removeLinkedListItem = function _removeLinkedListItem(parent, child, firstProp, lastProp) { if (firstProp === void 0) { firstProp = "_first"; } if (lastProp === void 0) { lastProp = "_last"; } var prev = child._prev, next = child._next; if (prev) { prev._next = next; } else if (parent[firstProp] === child) { parent[firstProp] = next; } if (next) { next._prev = prev; } else if (parent[lastProp] === child) { parent[lastProp] = prev; } child._dp = parent; //record the parent as _dp just so we can revert if necessary. But parent should be null to indicate the item isn't in a linked list. child._next = child._prev = child.parent = null; }, _removeFromParent = function _removeFromParent(child, onlyIfParentHasAutoRemove) { if (child.parent && (!onlyIfParentHasAutoRemove || child.parent.autoRemoveChildren)) { child.parent.remove(child); } child._act = 0; }, _uncache = function _uncache(animation) { var a = animation; while (a) { a._dirty = 1; a = a.parent; } return animation; }, _recacheAncestors = function _recacheAncestors(animation) { var parent = animation.parent; while (parent && parent.parent) { //sometimes we must force a re-sort of all children and update the duration/totalDuration of all ancestor timelines immediately in case, for example, in the middle of a render loop, one tween alters another tween's timeScale which shoves its startTime before 0, forcing the parent timeline to shift around and shiftChildren() which could affect that next tween's render (startTime). Doesn't matter for the root timeline though. parent._dirty = 1; parent.totalDuration(); parent = parent.parent; } return animation; }, _hasNoPausedAncestors = function _hasNoPausedAncestors(animation) { return !animation || animation._ts && _hasNoPausedAncestors(animation.parent); }, _elapsedCycleDuration = function _elapsedCycleDuration(animation) { return animation._repeat ? _animationCycle(animation._tTime, animation = animation.duration() + animation._rDelay) * animation : 0; }, // feed in the totalTime and cycleDuration and it'll return the cycle (iteration minus 1) and if the playhead is exactly at the very END, it will NOT bump up to the next cycle. _animationCycle = function _animationCycle(tTime, cycleDuration) { return (tTime /= cycleDuration) && ~~tTime === tTime ? ~~tTime - 1 : ~~tTime; }, _parentToChildTotalTime = function _parentToChildTotalTime(parentTime, child) { return child._ts > 0 ? (parentTime - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (parentTime - child._start) * child._ts; }, /* _totalTimeToTime = (clampedTotalTime, duration, repeat, repeatDelay, yoyo) => { let cycleDuration = duration + repeatDelay, time = _round(clampedTotalTime % cycleDuration); if (time > duration) { time = duration; } return (yoyo && (~~(clampedTotalTime / cycleDuration) & 1)) ? duration - time : time; }, */ _addToTimeline = function _addToTimeline(timeline, child, position) { child.parent && _removeFromParent(child); child._start = position + child._delay; child._end = child._start + (child.totalDuration() / child._ts || 0); _addLinkedListItem(timeline, child, "_first", "_last", timeline._sort ? "_start" : 0); timeline._recent = child; if (child._time || !child._dur && child._initted) { //in case, for example, the _start is moved on a tween that has already rendered. Imagine it's at its end state, then the startTime is moved WAY later (after the end of this timeline), it should render at its beginning. var curTime = (timeline.rawTime() - child._start) * child._ts; if (!child._dur || _clamp(0, child.totalDuration(), curTime) - child._tTime > _tinyNum) { child.render(curTime, true); } } _uncache(timeline); //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate. if (timeline._dp && timeline._time >= timeline._dur && timeline._ts && timeline._dur < timeline.duration()) { //in case any of the ancestors had completed but should now be enabled... var tl = timeline; while (tl._dp) { tl.totalTime(tl._tTime, true); //moves the timeline (shifts its startTime) if necessary, and also enables it. tl = tl._dp; } } return timeline; }, _attemptInitTween = function _attemptInitTween(tween, totalTime, force, suppressEvents) { _initTween(tween, totalTime); if (!tween._initted) { return 1; } if (!force && tween._pt && (tween._dur && tween.vars.lazy !== false || !tween._dur && tween.vars.lazy)) { _lazyTweens.push(tween); tween._lazy = [totalTime, suppressEvents]; return 1; } }, _renderZeroDurationTween = function _renderZeroDurationTween(tween, totalTime, suppressEvents, force) { var prevRatio = tween._zTime < 0 ? 0 : 1, ratio = totalTime < 0 ? 0 : 1, repeatDelay = tween._rDelay, tTime = 0, pt, iteration, prevIteration; if (repeatDelay && tween._repeat) { //in case there's a zero-duration tween that has a repeat with a repeatDelay tTime = _clamp(0, tween._tDur, totalTime); iteration = _animationCycle(tTime, repeatDelay); prevIteration = _animationCycle(tween._tTime, repeatDelay); if (iteration !== prevIteration) { prevRatio = 1 - ratio; if (tween.vars.repeatRefresh && tween._initted) { tween.invalidate(); } } } if (!tween._initted && _attemptInitTween(tween, totalTime, force, suppressEvents)) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately. return; } if (ratio !== prevRatio || force || tween._zTime === _tinyNum || !totalTime && tween._zTime) { tween._zTime = totalTime || (suppressEvents ? _tinyNum : 0); //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. tween.ratio = ratio; if (tween._from) { ratio = 1 - ratio; } tween._time = 0; tween._tTime = tTime; if (!suppressEvents) { _callback(tween, "onStart"); } pt = tween._pt; while (pt) { pt.r(ratio, pt.d); pt = pt._next; } if (!ratio && tween._startAt && !tween._onUpdate && tween._start) { //if the tween is positioned at the VERY beginning (_start 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values. tween._startAt.render(totalTime, true, force); } if (tween._onUpdate && !suppressEvents) { _callback(tween, "onUpdate"); } if (tTime && tween._repeat && !suppressEvents && tween.parent) { _callback(tween, "onRepeat"); } if ((totalTime >= tween._tDur || totalTime < 0) && tween.ratio === ratio) { tween.ratio && _removeFromParent(tween, 1); if (!suppressEvents) { _callback(tween, tween.ratio ? "onComplete" : "onReverseComplete", true); tween._prom && tween._prom(); } } } }, _findNextPauseTween = function _findNextPauseTween(animation, prevTime, time) { var child; if (time > prevTime) { child = animation._first; while (child && child._start <= time) { if (!child._dur && child.data === "isPause" && child._start > prevTime) { return child; } child = child._next; } } else { child = animation._last; while (child && child._start >= time) { if (!child._dur && child.data === "isPause" && child._start < prevTime) { return child; } child = child._prev; } } }, _onUpdateTotalDuration = function _onUpdateTotalDuration(animation) { if (animation instanceof Timeline) { return _uncache(animation); } var repeat = animation._repeat; animation._tDur = !repeat ? animation._dur : repeat < 0 ? 1e20 : _round(animation._dur * (repeat + 1) + animation._rDelay * repeat); _uncache(animation.parent); //if the tween's duration changed, the parent timeline's duration may have changed, so flag it as "dirty" return animation; }, _zeroPosition = { _start: 0, endTime: _emptyFunc }, _parsePosition = function _parsePosition(animation, position, useBuildFrom) { var labels = animation.labels, recent = animation._recent || _zeroPosition, clippedDuration = animation.duration() >= _bigNum ? recent.endTime(false) : animation._dur, //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead. //buildFrom = useBuildFrom ? animation._build : "auto", i, offset; if (_isString(position) && (isNaN(position) || position in labels)) { //if the string is a number like "1", check to see if there's a label with that name, otherwise interpret it as a number (absolute value). i = position.charAt(0); if (i === "<" || i === ">") { return (i === "<" ? recent._start : recent.endTime(recent._repeat >= 0)) + (parseFloat(position.substr(1)) || 0); } i = position.indexOf("="); if (i < 0) { if (!(position in labels)) { labels[position] = clippedDuration; } return labels[position]; } offset = +(position.charAt(i - 1) + position.substr(i + 1)); return i > 1 ? _parsePosition(animation, position.substr(0, i - 1)) + offset : clippedDuration + offset; } return position == null ? clippedDuration : +position; //return (position == null) ? (isNaN(buildFrom) ? clippedDuration : buildFrom) : (buildFrom === ">>" ? clippedDuration : +buildFrom || 0) + (+position); }, _conditionalReturn = function _conditionalReturn(value, func) { return value || value === 0 ? func(value) : func; }, _clamp = function _clamp(min, max, value) { return value < min ? min : value > max ? max : value; }, getUnit = function getUnit(value) { return (value + "").substr((parseFloat(value) + "").length); }, clamp = function clamp(min, max, value) { return _conditionalReturn(value, function (v) { return _clamp(min, max, v); }); }, _slice = [].slice, _isArrayLike = function _isArrayLike(value) { return value && _isObject(value) && "length" in value && value.length - 1 in value && _isObject(value[0]) && !value.nodeType && value !== _win; }, _flatten = function _flatten(ar, leaveStrings, accumulator) { if (accumulator === void 0) { accumulator = []; } return ar.forEach(function (value) { var _accumulator; return _isString(value) && !leaveStrings || _isArrayLike(value) ? (_accumulator = accumulator).push.apply(_accumulator, toArray(value)) : accumulator.push(value); }) || accumulator; }, toArray = function toArray(value, leaveStrings) { //takes any value and returns an array. If it's a string (and leaveStrings isn't true), it'll use document.querySelectorAll() and convert that to an array. It'll also accept iterables like jQuery objects. return _isString(value) && !leaveStrings && (_coreInitted || !_wake()) ? _slice.call(_doc.querySelectorAll(value), 0) : _isArray(value) ? _flatten(value, leaveStrings) : _isArrayLike(value) ? _slice.call(value, 0) : value ? [value] : []; }, //for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following distribute = function distribute(v) { if (_isFunction(v)) { return v; } var vars = _isObject(v) ? v : { each: v }, //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all. ease = _parseEase(vars.ease), from = vars.from || 0, base = parseFloat(vars.base) || 0, cache = {}, isDecimal = from > 0 && from < 1, ratios = isNaN(from) || isDecimal, axis = vars.axis, ratioX = from, ratioY = from; if (_isString(from)) { ratioX = ratioY = { center: .5, edges: .5, end: 1 }[from] || 0; } else if (!isDecimal && ratios) { ratioX = from[0]; ratioY = from[1]; } return function (i, target, a) { var l = (a || vars).length, distances = cache[l], originX, originY, x, y, d, j, max, min, wrapAt; if (!distances) { wrapAt = vars.grid === "auto" ? 0 : (vars.grid || [1, _bigNum])[1]; if (!wrapAt) { max = -_bigNum; while (max < (max = a[wrapAt++].getBoundingClientRect().left) && wrapAt < l) {} wrapAt--; } distances = cache[l] = []; originX = ratios ? Math.min(wrapAt, l) * ratioX - .5 : from % wrapAt; originY = ratios ? l * ratioY / wrapAt - .5 : from / wrapAt | 0; max = 0; min = _bigNum; for (j = 0; j < l; j++) { x = j % wrapAt - originX; y = originY - (j / wrapAt | 0); distances[j] = d = !axis ? _sqrt(x * x + y * y) : Math.abs(axis === "y" ? y : x); if (d > max) { max = d; } if (d < min) { min = d; } } distances.max = max - min; distances.min = min; distances.v = l = (parseFloat(vars.amount) || parseFloat(vars.each) * (wrapAt > l ? l - 1 : !axis ? Math.max(wrapAt, l / wrapAt) : axis === "y" ? l / wrapAt : wrapAt) || 0) * (from === "edges" ? -1 : 1); distances.b = l < 0 ? base - l : base; distances.u = getUnit(vars.amount || vars.each) || 0; //unit ease = ease && l < 0 ? _invertEase(ease) : ease; } l = (distances[i] - distances.min) / distances.max || 0; return _round(distances.b + (ease ? ease(l) : l) * distances.v) + distances.u; //round in order to work around floating point errors }; }, _roundModifier = function _roundModifier(v) { //pass in 0.1 get a function that'll round to the nearest tenth, or 5 to round to the closest 5, or 0.001 to the closest 1000th, etc. var p = v < 1 ? Math.pow(10, (v + "").length - 2) : 1; //to avoid floating point math errors (like 24 * 0.1 == 2.4000000000000004), we chop off at a specific number of decimal places (much faster than toFixed() return function (raw) { return ~~(Math.round(parseFloat(raw) / v) * v * p) / p + (_isNumber(raw) ? 0 : getUnit(raw)); }; }, snap = function snap(snapTo, value) { var isArray = _isArray(snapTo), radius, is2D; if (!isArray && _isObject(snapTo)) { radius = isArray = snapTo.radius || _bigNum; snapTo = toArray(snapTo.values); if (is2D = !_isNumber(snapTo[0])) { radius *= radius; //performance optimization so we don't have to Math.sqrt() in the loop. } } return _conditionalReturn(value, !isArray ? _roundModifier(snapTo) : function (raw) { var x = parseFloat(is2D ? raw.x : raw), y = parseFloat(is2D ? raw.y : 0), min = _bigNum, closest = 0, i = snapTo.length, dx, dy; while (i--) { if (is2D) { dx = snapTo[i].x - x; dy = snapTo[i].y - y; dx = dx * dx + dy * dy; } else { dx = Math.abs(snapTo[i] - x); } if (dx < min) { min = dx; closest = i; } } closest = !radius || min <= radius ? snapTo[closest] : raw; return is2D || closest === raw || _isNumber(raw) ? closest : closest + getUnit(raw); }); }, random = function random(min, max, roundingIncrement, returnFunction) { return _conditionalReturn(_isArray(min) ? !max : roundingIncrement === true ? !!(roundingIncrement = 0) : !returnFunction, function () { return _isArray(min) ? min[~~(Math.random() * min.length)] : (roundingIncrement = roundingIncrement || 1e-5) && (returnFunction = roundingIncrement < 1 ? Math.pow(10, (roundingIncrement + "").length - 2) : 1) && ~~(Math.round((min + Math.random() * (max - min)) / roundingIncrement) * roundingIncrement * returnFunction) / returnFunction; }); }, pipe = function pipe() { for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) { functions[_key] = arguments[_key]; } return function (value) { return functions.reduce(function (v, f) { return f(v); }, value); }; }, unitize = function unitize(func, unit) { return function (value) { return func(parseFloat(value)) + (unit || getUnit(value)); }; }, normalize = function normalize(min, max, value) { return mapRange(min, max, 0, 1, value); }, _wrapArray = function _wrapArray(a, wrapper, value) { return _conditionalReturn(value, function (index) { return a[~~wrapper(index)]; }); }, wrap = function wrap(min, max, value) { // NOTE: wrap() CANNOT be an arrow function! A very odd compiling bug causes problems (unrelated to GSAP). var range = max - min; return _isArray(min) ? _wrapArray(min, wrap(0, min.length), max) : _conditionalReturn(value, function (value) { return (range + (value - min) % range) % range + min; }); }, wrapYoyo = function wrapYoyo(min, max, value) { var range = max - min, total = range * 2; return _isArray(min) ? _wrapArray(min, wrapYoyo(0, min.length - 1), max) : _conditionalReturn(value, function (value) { value = (total + (value - min) % total) % total; return min + (value > range ? total - value : value); }); }, _replaceRandom = function _replaceRandom(value) { //replaces all occurrences of random(...) in a string with the calculated random value. can be a range like random(-100, 100, 5) or an array like random([0, 100, 500]) var prev = 0, s = "", i, nums, end, isArray; while (~(i = value.indexOf("random(", prev))) { end = value.indexOf(")", i); isArray = value.charAt(i + 7) === "["; nums = value.substr(i + 7, end - i - 7).match(isArray ? _delimitedValueExp : _strictNumExp); s += value.substr(prev, i - prev) + random(isArray ? nums : +nums[0], +nums[1], +nums[2] || 1e-5); prev = end + 1; } return s + value.substr(prev, value.length - prev); }, mapRange = function mapRange(inMin, inMax, outMin, outMax, value) { var inRange = inMax - inMin, outRange = outMax - outMin; return _conditionalReturn(value, function (value) { return outMin + (value - inMin) / inRange * outRange; }); }, interpolate = function interpolate(start, end, progress, mutate) { var func = isNaN(start + end) ? 0 : function (p) { return (1 - p) * start + p * end; }; if (!func) { var isString = _isString(start), master = {}, p, i, interpolators, l, il; progress === true && (mutate = 1) && (progress = null); if (isString) { start = { p: start }; end = { p: end }; } else if (_isArray(start) && !_isArray(end)) { interpolators = []; l = start.length; il = l - 2; for (i = 1; i < l; i++) { interpolators.push(interpolate(start[i - 1], start[i])); //build the interpolators up front as a performance optimization so that when the function is called many times, it can just reuse them. } l--; func = function func(p) { p *= l; var i = Math.min(il, ~~p); return interpolators[i](p - i); }; progress = end; } else if (!mutate) { start = _merge(_isArray(start) ? [] : {}, start); } if (!interpolators) { for (p in end) { _addPropTween.call(master, start, p, "get", end[p]); } func = function func(p) { return _renderPropTweens(p, master) || (isString ? start.p : start); }; } } return _conditionalReturn(progress, func); }, _getLabelInDirection = function _getLabelInDirection(timeline, fromTime, backward) { //used for nextLabel() and previousLabel() var labels = timeline.labels, min = _bigNum, p, distance, label; for (p in labels) { distance = labels[p] - fromTime; if (distance < 0 === !!backward && distance && min > (distance = Math.abs(distance))) { label = p; min = distance; } } return label; }, _callback = function _callback(animation, type, executeLazyFirst) { var v = animation.vars, callback = v[type], params, scope; if (!callback) { return; } params = v[type + "Params"]; scope = v.callbackScope || animation; if (executeLazyFirst && _lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values. _lazyRender(); } return params ? callback.apply(scope, params) : callback.call(scope); }, _interrupt = function _interrupt(animation) { _removeFromParent(animation); if (animation.progress() < 1) { _callback(animation, "onInterrupt"); } return animation; }, _quickTween, _createPlugin = function _createPlugin(config) { config = !config.name && config["default"] || config; //UMD packaging wraps things oddly, so for example MotionPathHelper becomes {MotionPathHelper:MotionPathHelper, default:MotionPathHelper}. var name = config.name, isFunc = _isFunction(config), Plugin = name && !isFunc && config.init ? function () { this._props = []; } : config, //in case someone passes in an object that's not a plugin, like CustomEase instanceDefaults = { init: _emptyFunc, render: _renderPropTweens, add: _addPropTween, kill: _killPropTweensOf, modifier: _addPluginModifier, rawVars: 0 }, statics = { targetTest: 0, get: 0, getSetter: _getSetter, aliases: {}, register: 0 }; _wake(); if (config !== Plugin) { if (_plugins[name]) { return; } _setDefaults(Plugin, _setDefaults(_copyExcluding(config, instanceDefaults), statics)); //static methods _merge(Plugin.prototype, _merge(instanceDefaults, _copyExcluding(config, statics))); //instance methods _plugins[Plugin.prop = name] = Plugin; if (config.targetTest) { _harnessPlugins.push(Plugin); _reservedProps[name] = 1; } name = (name === "css" ? "CSS" : name.charAt(0).toUpperCase() + name.substr(1)) + "Plugin"; //for the global name. "motionPath" should become MotionPathPlugin } _addGlobal(name, Plugin); if (config.register) { config.register(gsap, Plugin, PropTween); } }, /* * -------------------------------------------------------------------------------------- * COLORS * -------------------------------------------------------------------------------------- */ _255 = 255, _colorLookup = { aqua: [0, _255, _255], lime: [0, _255, 0], silver: [192, 192, 192], black: [0, 0, 0], maroon: [128, 0, 0], teal: [0, 128, 128], blue: [0, 0, _255], navy: [0, 0, 128], white: [_255, _255, _255], olive: [128, 128, 0], yellow: [_255, _255, 0], orange: [_255, 165, 0], gray: [128, 128, 128], purple: [128, 0, 128], green: [0, 128, 0], red: [_255, 0, 0], pink: [_255, 192, 203], cyan: [0, _255, _255], transparent: [_255, _255, _255, 0] }, _hue = function _hue(h, m1, m2) { h = h < 0 ? h + 1 : h > 1 ? h - 1 : h; return (h * 6 < 1 ? m1 + (m2 - m1) * h * 6 : h < .5 ? m2 : h * 3 < 2 ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * _255 + .5 | 0; }, splitColor = function splitColor(v, toHSL) { var a = !v ? _colorLookup.black : _isNumber(v) ? [v >> 16, v >> 8 & _255, v & _255] : 0, r, g, b, h, s, l, max, min, d, wasHSL; if (!a) { if (v.substr(-1) === ",") { //sometimes a trailing comma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)" - in this example "blue," has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value. v = v.substr(0, v.length - 1); } if (_colorLookup[v]) { a = _colorLookup[v]; } else if (v.charAt(0) === "#") { if (v.length === 4) { //for shorthand like #9F0 r = v.charAt(1); g = v.charAt(2); b = v.charAt(3); v = "#" + r + r + g + g + b + b; } v = parseInt(v.substr(1), 16); a = [v >> 16, v >> 8 & _255, v & _255]; } else if (v.substr(0, 3) === "hsl") { a = wasHSL = v.match(_strictNumExp); if (!toHSL) { h = +a[0] % 360 / 360; s = +a[1] / 100; l = +a[2] / 100; g = l <= .5 ? l * (s + 1) : l + s - l * s; r = l * 2 - g; if (a.length > 3) { a[3] *= 1; //cast as number } a[0] = _hue(h + 1 / 3, r, g); a[1] = _hue(h, r, g); a[2] = _hue(h - 1 / 3, r, g); } else if (~v.indexOf("=")) { //if relative values are found, just return the raw strings with the relative prefixes in place. return v.match(_numExp); } } else { a = v.match(_strictNumExp) || _colorLookup.transparent; } a = a.map(Number); } if (toHSL && !wasHSL) { r = a[0] / _255; g = a[1] / _255; b = a[2] / _255; max = Math.max(r, g, b); min = Math.min(r, g, b); l = (max + min) / 2; if (max === min) { h = s = 0; } else { d = max - min; s = l > 0.5 ? d / (2 - max - min) : d / (max + min); h = max === r ? (g - b) / d + (g < b ? 6 : 0) : max === g ? (b - r) / d + 2 : (r - g) / d + 4; h *= 60; } a[0] = h + .5 | 0; a[1] = s * 100 + .5 | 0; a[2] = l * 100 + .5 | 0; } return a; }, _formatColors = function _formatColors(s, toHSL) { var colors = (s + "").match(_colorExp), charIndex = 0, parsed = "", i, color, temp; if (!colors) { return s; } for (i = 0; i < colors.length; i++) { color = colors[i]; temp = s.substr(charIndex, s.indexOf(color, charIndex) - charIndex); charIndex += temp.length + color.length; color = splitColor(color, toHSL); if (color.length === 3) { color.push(1); } parsed += temp + (toHSL ? "hsla(" + color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : "rgba(" + color.join(",")) + ")"; } return parsed + s.substr(charIndex); }, _colorExp = function () { var s = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b", //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc., p; for (p in _colorLookup) { s += "|" + p + "\\b"; } return new RegExp(s + ")", "gi"); }(), _hslExp = /hsl[a]?\(/, _colorStringFilter = function _colorStringFilter(a) { var combined = a.join(" "), toHSL; _colorExp.lastIndex = 0; if (_colorExp.test(combined)) { toHSL = _hslExp.test(combined); a[0] = _formatColors(a[0], toHSL); a[1] = _formatColors(a[1], toHSL); } }, /* * -------------------------------------------------------------------------------------- * TICKER * -------------------------------------------------------------------------------------- */ _tickerActive, _ticker = function () { var _getTime = Date.now, _lagThreshold = 500, _adjustedLag = 33, _startTime = _getTime(), _lastUpdate = _startTime, _gap = 1 / 60, _nextTime = _gap, _listeners = [], _id, _req, _raf, _self, _tick = function _tick(v) { var elapsed = _getTime() - _lastUpdate, manual = v === true, overlap, dispatch; if (elapsed > _lagThreshold) { _startTime += elapsed - _adjustedLag; } _lastUpdate += elapsed; _self.time = (_lastUpdate - _startTime) / 1000; overlap = _self.time - _nextTime; if (overlap > 0 || manual) { _self.frame++; _nextTime += overlap + (overlap >= _gap ? 0.004 : _gap - overlap); dispatch = 1; } if (!manual) { //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise. _id = _req(_tick); } if (dispatch) { _listeners.forEach(function (l) { return l(_self.time, elapsed, _self.frame, v); }); } }; _self = { time: 0, frame: 0, tick: function tick() { _tick(true); }, wake: function wake() { if (_coreReady) { if (!_coreInitted && _windowExists()) { _win = _coreInitted = window; _doc = _win.document || {}; _globals.gsap = gsap; (_win.gsapVersions || (_win.gsapVersions = [])).push(gsap.version); _install(_installScope || _win.GreenSockGlobals || !_win.gsap && _win || {}); _raf = _win.requestAnimationFrame; } _id && _self.sleep(); _req = _raf || function (f) { return setTimeout(f, (_nextTime - _self.time) * 1000 + 1 | 0); }; _tickerActive = 1; _tick(2); } }, sleep: function sleep() { (_raf ? _win.cancelAnimationFrame : clearTimeout)(_id); _tickerActive = 0; _req = _emptyFunc; }, lagSmoothing: function lagSmoothing(threshold, adjustedLag) { _lagThreshold = threshold || 1 / _tinyNum; //zero should be interpreted as basically unlimited _adjustedLag = Math.min(adjustedLag, _lagThreshold, 0); }, fps: function fps(_fps) { _gap = 1 / (_fps || 60); _nextTime = _self.time + _gap; }, add: function add(callback) { _listeners.indexOf(callback) < 0 && _listeners.push(callback); _wake(); }, remove: function remove(callback) { var i; ~(i = _listeners.indexOf(callback)) && _listeners.splice(i, 1); }, _listeners: _listeners }; return _self; }(), _wake = function _wake() { return !_tickerActive && _ticker.wake(); }, //also ensures the core classes are initialized. /* * ------------------------------------------------- * EASING * ------------------------------------------------- */ _easeMap = {}, _customEaseExp = /^[\d.\-M][\d.\-,\s]/, _quotesExp = /["']/g, _parseObjectInString = function _parseObjectInString(value) { //takes a string like "{wiggles:10, type:anticipate})" and turns it into a real object. Notice it ends in ")" and includes the {} wrappers. This is because we only use this function for parsing ease configs and prioritized optimization rather than reusability. var obj = {}, split = value.substr(1, value.length - 3).split(":"), key = split[0], i = 1, l = split.length, index, val, parsedVal; for (; i < l; i++) { val = split[i]; index = i !== l - 1 ? val.lastIndexOf(",") : val.length; parsedVal = val.substr(0, index); obj[key] = isNaN(parsedVal) ? parsedVal.replace(_quotesExp, "").trim() : +parsedVal; key = val.substr(index + 1).trim(); } return obj; }, _configEaseFromString = function _configEaseFromString(name) { //name can be a string like "elastic.out(1,0.5)", and pass in _easeMap as obj and it'll parse it out and call the actual function like _easeMap.Elastic.easeOut.config(1,0.5). It will also parse custom ease strings as long as CustomEase is loaded and registered (internally as _easeMap._CE). var split = (name + "").split("("), ease = _easeMap[split[0]]; return ease && split.length > 1 && ease.config ? ease.config.apply(null, ~name.indexOf("{") ? [_parseObjectInString(split[1])] : _parenthesesExp.exec(name)[1].split(",").map(_numericIfPossible)) : _easeMap._CE && _customEaseExp.test(name) ? _easeMap._CE("", name) : ease; }, _invertEase = function _invertEase(ease) { return function (p) { return 1 - ease(1 - p); }; }, // potential future feature - allow yoyoEase to be set in children and have those affected when the parent/ancestor timeline yoyos. Not sure it's worth the kb. // _propagateYoyoEase = (timeline, isYoyo) => { // let child = timeline._first, ease; // while (child) { // if (child instanceof Timeline) { // _propagateYoyoEase(child, isYoyo); // } else if (child.vars.yoyoEase && (!child._yoyo || !child._repeat) && child._yoyo !== isYoyo) { // if (child.timeline) { // _propagateYoyoEase(child.timeline, isYoyo); // } else { // ease = child._ease; // child._ease = child._yEase; // child._yEase = ease; // child._yoyo = isYoyo; // } // } // child = child._next; // } // }, _parseEase = function _parseEase(ease, defaultEase) { return !ease ? defaultEase : (_isFunction(ease) ? ease : _easeMap[ease] || _configEaseFromString(ease)) || defaultEase; }, _insertEase = function _insertEase(names, easeIn, easeOut, easeInOut) { if (easeOut === void 0) { easeOut = function easeOut(p) { return 1 - easeIn(1 - p); }; } if (easeInOut === void 0) { easeInOut = function easeInOut(p) { return p < .5 ? easeIn(p * 2) / 2 : 1 - easeIn((1 - p) * 2) / 2; }; } var ease = { easeIn: easeIn, easeOut: easeOut, easeInOut: easeInOut }, lowercaseName; _forEachName(names, function (name) { _easeMap[name] = _globals[name] = ease; _easeMap[lowercaseName = name.toLowerCase()] = easeOut; for (var p in ease) { _easeMap[lowercaseName + (p === "easeIn" ? ".in" : p === "easeOut" ? ".out" : ".inOut")] = _easeMap[name + "." + p] = ease[p]; } }); return ease; }, _easeInOutFromOut = function _easeInOutFromOut(easeOut) { return function (p) { return p < .5 ? (1 - easeOut(1 - p * 2)) / 2 : .5 + easeOut((p - .5) * 2) / 2; }; }, _configElastic = function _configElastic(type, amplitude, period) { var p1 = amplitude >= 1 ? amplitude : 1, //note: if amplitude is < 1, we simply adjust the period for a more natural feel. Otherwise the math doesn't work right and the curve starts at 1. p2 = (period || (type ? .3 : .45)) / (amplitude < 1 ? amplitude : 1), p3 = p2 / _2PI * (Math.asin(1 / p1) || 0), easeOut = function easeOut(p) { return p === 1 ? 1 : p1 * Math.pow(2, -10 * p) * _sin((p - p3) * p2) + 1; }, ease = type === "out" ? easeOut : type === "in" ? function (p) { return 1 - easeOut(1 - p); } : _easeInOutFromOut(easeOut); p2 = _2PI / p2; //precalculate to optimize ease.config = function (amplitude, period) { return _configElastic(type, amplitude, period); }; return ease; }, _configBack = function _configBack(type, overshoot) { if (overshoot === void 0) { overshoot = 1.70158; } var easeOut = function easeOut(p) { return --p * p * ((overshoot + 1) * p + overshoot) + 1; }, ease = type === "out" ? easeOut : type === "in" ? function (p) { return 1 - easeOut(1 - p); } : _easeInOutFromOut(easeOut); ease.config = function (overshoot) { return _configBack(type, overshoot); }; return ease; }; // a cheaper (kb and cpu) but more mild way to get a parameterized weighted ease by feeding in a value between -1 (easeIn) and 1 (easeOut) where 0 is linear. // _weightedEase = ratio => { // let y = 0.5 + ratio / 2; // return p => (2 * (1 - p) * p * y + p * p); // }, // a stronger (but more expensive kb/cpu) parameterized weighted ease that lets you feed in a value between -1 (easeIn) and 1 (easeOut) where 0 is linear. // _weightedEaseStrong = ratio => { // ratio = .5 + ratio / 2; // let o = 1 / 3 * (ratio < .5 ? ratio : 1 - ratio), // b = ratio - o, // c = ratio + o; // return p => p === 1 ? p : 3 * b * (1 - p) * (1 - p) * p + 3 * c * (1 - p) * p * p + p * p * p; // }; _forEachName("Linear,Quad,Cubic,Quart,Quint,Strong", function (name, i) { var power = i < 5 ? i + 1 : i; _insertEase(name + ",Power" + (power - 1), i ? function (p) { return Math.pow(p, power); } : function (p) { return p; }, function (p) { return 1 - Math.pow(1 - p, power); }, function (p) { return p < .5 ? Math.pow(p * 2, power) / 2 : 1 - Math.pow((1 - p) * 2, power) / 2; }); }); _easeMap.Linear.easeNone = _easeMap.none = _easeMap.Linear.easeIn; _insertEase("Elastic", _configElastic("in"), _configElastic("out"), _configElastic()); (function (n, c) { var n1 = 1 / c, n2 = 2 * n1, n3 = 2.5 * n1, easeOut = function easeOut(p) { return p < n1 ? n * p * p : p < n2 ? n * Math.pow(p - 1.5 / c, 2) + .75 : p < n3 ? n * (p -= 2.25 / c) * p + .9375 : n * Math.pow(p - 2.625 / c, 2) + .984375; }; _insertEase("Bounce", function (p) { return 1 - easeOut(1 - p); }, easeOut); })(7.5625, 2.75); _insertEase("Expo", function (p) { return p ? Math.pow(2, 10 * (p - 1)) : 0; }); _insertEase("Circ", function (p) { return -(_sqrt(1 - p * p) - 1); }); _insertEase("Sine", function (p) { return -_cos(p * _HALF_PI) + 1; }); _insertEase("Back", _configBack("in"), _configBack("out"), _configBack()); _easeMap.SteppedEase = _easeMap.steps = _globals.SteppedEase = { config: function config(steps, immediateStart) { if (steps === void 0) { steps = 1; } var p1 = 1 / steps, p2 = steps + (immediateStart ? 0 : 1), p3 = immediateStart ? 1 : 0, max = 1 - _tinyNum; return function (p) { return ((p2 * _clamp(0, max, p) | 0) + p3) * p1; }; } }; _defaults.ease = _easeMap["quad.out"]; /* * -------------------------------------------------------------------------------------- * CACHE * -------------------------------------------------------------------------------------- */ var GSCache = function GSCache(target, harness) { this.id = _gsID++; target._gsap = this; this.target = target; this.harness = harness; this.get = harness ? harness.get : _getProperty; this.set = harness ? harness.getSetter : _getSetter; }; /* * -------------------------------------------------------------------------------------- * ANIMATION * -------------------------------------------------------------------------------------- */ var Animation = /*#__PURE__*/ function () { function Animation(vars, time) { var parent = vars.parent || _globalTimeline; this.vars = vars; this._dur = this._tDur = +vars.duration || 0; this._delay = +vars.delay || 0; if (this._repeat = vars.repeat || 0) { this._rDelay = vars.repeatDelay || 0; this._yoyo = !!vars.yoyo || !!vars.yoyoEase; _onUpdateTotalDuration(this); } this._ts = 1; this.data = vars.data; if (!_tickerActive) { _ticker.wake(); } if (parent) { _addToTimeline(parent, this, time || time === 0 ? time : parent._time); } if (vars.reversed) { this.reversed(true); } if (vars.paused) { this.paused(true); } } var _proto = Animation.prototype; _proto.delay = function delay(value) { if (value || value === 0) { this._delay = value; return this; } return this._delay; }; _proto.duration = function duration(value) { var isSetter = arguments.length, repeat = this._repeat, repeatCycles = repeat > 0 ? repeat * ((isSetter ? value : this._dur) + this._rDelay) : 0; return isSetter ? this.totalDuration(repeat < 0 ? value : value + repeatCycles) : this.totalDuration() && this._dur; }; _proto.totalDuration = function totalDuration(value) { if (!arguments.length) { return this._tDur; } var repeat = this._repeat, isInfinite = (value || this._rDelay) && repeat < 0; this._tDur = isInfinite ? 1e20 : value; this._dur = isInfinite ? value : (value - repeat * this._rDelay) / (repeat + 1); this._dirty = 0; _uncache(this.parent); return this; }; _proto.totalTime = function totalTime(_totalTime, suppressEvents) { _wake(); if (!arguments.length) { return this._tTime; } var parent = this.parent || this._dp, start; if (parent && parent.smoothChildTiming && this._ts) { start = this._start; // if (!parent._dp && parent._time === parent._dur) { // if a root timeline completes...and then a while later one of its children resumes, we must shoot the playhead forward to where it should be raw-wise, otherwise the child will jump to the end. Down side: this assumes it's using the _ticker.time as a reference. // parent._time = _ticker.time - parent._start; // } this._start = parent._time - (this._ts > 0 ? _totalTime / this._ts : ((this._dirty ? this.totalDuration() : this._tDur) - _totalTime) / -this._ts); this._end += this._start - start; if (!parent._dirty) { //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here. _uncache(parent); } //in case any of the ancestor timelines had completed but should now be enabled, we should reset their totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The start of that child would get pushed out, but one of the ancestors may have completed. while (parent.parent) { if (parent.parent._time !== parent._start + (parent._ts > 0 ? parent._tTime / parent._ts : (parent.totalDuration() - parent._tTime) / -parent._ts)) { parent.totalTime(parent._tTime, true); } parent = parent.parent; } if (!this.parent) { //if the animation doesn't have a parent, put it back into its last parent (recorded as _dp for exactly cases like this). _addToTimeline(this._dp, this, this._start - this._delay); } } if (this._tTime !== _totalTime || !this._dur) { this._ts || (this._pTime = _totalTime); // otherwise, if an animation is paused, then the playhead is moved back to zero, then resumed, it'd revert back to the original time at the pause _lazySafeRender(this, _totalTime, suppressEvents); } return this; }; _proto.time = function time(value, suppressEvents) { return arguments.length ? this.totalTime((value + _elapsedCycleDuration(this)) % this.duration() || (value ? this._dur : 0), suppressEvents) : this._time; // note: if the modulus results in 0, the playhead could be exactly at the end or the beginning, and we always defer to the END with a non-zero value, otherwise if you set the time() to the very end (duration()), it would render at the START! }; _proto.totalProgress = function totalProgress(value, suppressEvents) { return arguments.length ? this.totalTime(this.totalDuration() * value, suppressEvents) : this._tTime / this.totalDuration(); }; _proto.progress = function progress(value, suppressEvents) { return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - value : value) + _elapsedCycleDuration(this), suppressEvents) : this.duration() ? this._time / this._dur : this.ratio; }; _proto.iteration = function iteration(value, suppressEvents) { var cycleDuration = this.duration() + this._rDelay; return arguments.length ? this.totalTime(this._time + (value - 1) * cycleDuration, suppressEvents) : this._repeat ? _animationCycle(this._tTime, cycleDuration) + 1 : 1; }; _proto.timeScale = function timeScale(value) { if (!arguments.length) { return this._ts || this._pauseTS || 0; } if (this._pauseTS !== null) { this._pauseTS = value; return this; } this._ts = value; return _recacheAncestors(this).totalTime(this._tTime, true); }; _proto.paused = function paused(value) { var isPaused = !this._ts; if (!arguments.length) { return isPaused; } if (isPaused !== value) { if (value) { this._pauseTS = this._ts; this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()); // if the pause occurs during the delay phase, make sure that's factored in when resuming. this._ts = this._act = 0; //we use a timeScale of 0 to indicate a paused state, but we record the old "real" timeScale as _pauseTS so we can revert when unpaused. } else { this._ts = this._pauseTS || 1; this._pauseTS = null; value = this._tTime || this._pTime; //only defer to _pTime (pauseTime) if tTime is zero. Remember, someone could pause() an animation, then scrub the playhead and resume(). if (this.progress() === 1) { // edge case: animation.progress(1).pause().play() wouldn't render again because the playhead is already at the end, but the call to totalTime() below will add it back to its parent...and not remove it again (since removing only happens upon rendering at a new time). Offsetting the _tTime slightly is done simply to cause the final render in totalTime() that'll pop it off its timeline (if autoRemoveChildren is true, of course). this._tTime -= _tinyNum; } this.totalTime(value, true); } } return this; }; _proto.startTime = function startTime(value) { if (arguments.length) { if (this.parent && this.parent._sort) { _addToTimeline(this.parent, this, value - this._delay); } return this; } return this._start; }; _proto.endTime = function endTime(includeRepeats) { return this._start + (_isNotFalse(includeRepeats) ? this.totalDuration() : this.duration()) / Math.abs(this._ts); }; _proto.rawTime = function rawTime(wrapRepeats) { var parent = this.parent || this._dp; // _dp = detatched parent return !parent ? this._tTime : wrapRepeats && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : !this._ts ? this._tTime : _parentToChildTotalTime(parent.rawTime(wrapRepeats), this); } // globalTime(rawTime) { // let animation = this, // time = arguments.length ? rawTime : animation.rawTime(); // while (animation) { // time = animation._start + time / (animation._ts || 1); // animation = animation.parent; // } // return time; // } ; _proto.repeat = function repeat(value) { if (arguments.length) { this._repeat = value; return _onUpdateTotalDuration(this); } return this._repeat; }; _proto.repeatDelay = function repeatDelay(value) { if (arguments.length) { this._rDelay = value; return _onUpdateTotalDuration(this); } return this._rDelay; }; _proto.yoyo = function yoyo(value) { if (arguments.length) { this._yoyo = value; return this; } return this._yoyo; }; _proto.seek = function seek(position, suppressEvents) { return this.totalTime(_parsePosition(this, position), _isNotFalse(suppressEvents)); }; _proto.restart = function restart(includeDelay, suppressEvents) { return this.play().totalTime(includeDelay ? -this._delay : 0, _isNotFalse(suppressEvents)); }; _proto.play = function play(from, suppressEvents) { if (from != null) { this.seek(from, suppressEvents); } return this.reversed(false).paused(false); }; _proto.reverse = function reverse(from, suppressEvents) { if (from != null) { this.seek(from || this.totalDuration(), suppressEvents); } return this.reversed(true).paused(false); }; _proto.pause = function pause(atTime, suppressEvents) { if (atTime != null) { this.seek(atTime, suppressEvents); } return this.paused(true); }; _proto.resume = function resume() { return this.paused(false); }; _proto.reversed = function reversed(value) { var ts = this._ts || this._pauseTS || 0; if (arguments.length) { if (value !== this.reversed()) { this[this._pauseTS === null ? "_ts" : "_pauseTS"] = Math.abs(ts) * (value ? -1 : 1); this.totalTime(this._tTime, true); } return this; } return ts < 0; }; _proto.invalidate = function invalidate() { this._initted = 0; return this; }; _proto.isActive = function isActive(hasStarted) { var parent = this.parent || this._dp, start = this._start, rawTime; return !parent || this._ts && (this._initted || !hasStarted) && parent.isActive(hasStarted) && (rawTime = parent.rawTime(true)) >= start && rawTime < this.endTime(true) - _tinyNum; }; _proto.eventCallback = function eventCallback(type, callback, params) { var vars = this.vars; if (arguments.length > 1) { if (!callback) { delete vars[type]; } else { vars[type] = callback; if (params) { vars[type + "Params"] = params; } if (type === "onUpdate") { this._onUpdate = callback; } } return this; } return vars[type]; }; _proto.then = function then(onFulfilled) { var _this = this; return new Promise(function (resolve) { var f = onFulfilled || _passThrough, _resolve = function _resolve() { var _then = _this.then; _this.then = null; // temporarily null the then() method to avoid an infinite loop (see https://github.com/greensock/GSAP/issues/322) f = f(_this); if (f && (f.then || f === _this)) { _this._prom = f; _this.then = _then; } resolve(f); _this.then = _then; }; if (_this._initted && _this.totalProgress() === 1 && _this._ts >= 0 || !_this._tTime && _this._ts < 0) { _resolve(); } else { _this._prom = _resolve; } }); }; _proto.kill = function kill() { _interrupt(this); }; return Animation; }(); _setDefaults(Animation.prototype, { _time: 0, _start: 0, _end: 0, _tTime: 0, _tDur: 0, _dirty: 0, _repeat: 0, _yoyo: false, parent: 0, _initted: false, _rDelay: 0, _ts: 1, _dp: 0, ratio: 0, _zTime: -_tinyNum, _prom: 0, _pauseTS: null }); /* * ------------------------------------------------- * TIMELINE * ------------------------------------------------- */ var Timeline = /*#__PURE__*/ function (_Animation) { _inheritsLoose(Timeline, _Animation); function Timeline(vars, time) { var _this2; if (vars === void 0) { vars = {}; } _this2 = _Animation.call(this, vars, time) || this; _this2.labels = {}; _this2.smoothChildTiming = _isNotFalse(vars.smoothChildTiming); _this2.autoRemoveChildren = !!vars.autoRemoveChildren; _this2._sort = _isNotFalse(vars.sortChildren); return _this2; } var _proto2 = Timeline.prototype; _proto2.to = function to(targets, vars, position) { new Tween(targets, _parseVars(arguments, 0, this), _parsePosition(this, _isNumber(vars) ? arguments[3] : position)); return this; }; _proto2.from = function from(targets, vars, position) { new Tween(targets, _parseVars(arguments, 1, this), _parsePosition(this, _isNumber(vars) ? arguments[3] : position)); return this; }; _proto2.fromTo = function fromTo(targets, fromVars, toVars, position) { new Tween(targets, _parseVars(arguments, 2, this), _parsePosition(this, _isNumber(fromVars) ? arguments[4] : position)); return this; }; _proto2.set = function set(targets, vars, position) { vars.duration = 0; vars.parent = this; if (!vars.repeatDelay) { vars.repeat = 0; } vars.immediateRender = !!vars.immediateRender; new Tween(targets, vars, _parsePosition(this, position)); return this; }; _proto2.call = function call(callback, params, position) { return _addToTimeline(this, Tween.delayedCall(0, callback, params), _parsePosition(this, position)); } //ONLY for backward compatibility! Maybe delete? ; _proto2.staggerTo = function staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) { vars.duration = duration; vars.stagger = vars.stagger || stagger; vars.onComplete = onCompleteAll; vars.onCompleteParams = onCompleteAllParams; vars.parent = this; new Tween(targets, vars, _parsePosition(this, position)); return this; }; _proto2.staggerFrom = function staggerFrom(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) { vars.runBackwards = 1; vars.immediateRender = _isNotFalse(vars.immediateRender); return this.staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams); }; _proto2.staggerFromTo = function staggerFromTo(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams) { toVars.startAt = fromVars; toVars.immediateRender = _isNotFalse(toVars.immediateRender); return this.staggerTo(targets, duration, toVars, stagger, position, onCompleteAll, onCompleteAllParams); }; _proto2.render = function render(totalTime, suppressEvents, force) { var prevTime = this._time, tDur = this._dirty ? this.totalDuration() : this._tDur, dur = this._dur, tTime = totalTime > tDur - _tinyNum && totalTime >= 0 && this !== _globalTimeline ? tDur : totalTime < _tinyNum ? 0 : totalTime, crossingStart = this._zTime < 0 !== totalTime < 0 && (this._initted || !dur), time, child, next, iteration, cycleDuration, prevPaused, pauseTween, timeScale, prevStart, prevIteration, yoyo, isYoyo; if (tTime !== this._tTime || force || crossingStart) { if (crossingStart) { if (!dur) { prevTime = this._zTime; } if (totalTime || !suppressEvents) { //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. this._zTime = totalTime; } } time = tTime; prevStart = this._start; timeScale = this._ts; prevPaused = timeScale === 0; if (prevTime !== this._time && dur) { //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump). time += this._time - prevTime; } if (this._repeat) { //adjust the time for repeats and yoyos yoyo = this._yoyo; cycleDuration = dur + this._rDelay; time = _round(tTime % cycleDuration); //round to avoid floating point errors. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!) if (time > dur || tDur === tTime) { time = dur; } iteration = ~~(tTime / cycleDuration); if (iteration && iteration === tTime / cycleDuration) { time = dur; iteration--; } prevIteration = _animationCycle(this._tTime, cycleDuration); if (yoyo && iteration & 1) { time = dur - time; isYoyo = 1; } /* make sure children at the end/beginning of the timeline are rendered properly. If, for example, a 3-second long timeline rendered at 2.9 seconds previously, and now renders at 3.2 seconds (which would get translated to 2.8 seconds if the timeline yoyos or 0.2 seconds if it just repeats), there could be a callback or a short tween that's at 2.95 or 3 seconds in which wouldn't render. So we need to push the timeline to the end (and/or beginning depending on its yoyo value). Also we must ensure that zero-duration tweens at the very beginning or end of the Timeline work. */ if (iteration !== prevIteration && !this._lock) { var rewinding = yoyo && prevIteration & 1, doesWrap = rewinding === (yoyo && iteration & 1); if (iteration < prevIteration) { rewinding = !rewinding; } prevTime = rewinding ? 0 : dur; this._lock = 1; this.render(prevTime, suppressEvents, !dur)._lock = 0; if (!suppressEvents && this.parent) { _callback(this, "onRepeat"); } if (prevTime !== this._time || prevPaused !== !this._ts) { return this; } if (doesWrap) { this._lock = 2; prevTime = rewinding ? dur + 0.0001 : -0.0001; this.render(prevTime, true); } this._lock = 0; if (!this._ts && !prevPaused) { return this; } //in order for yoyoEase to work properly when there's a stagger, we must swap out the ease in each sub-tween. //_propagateYoyoEase(this, isYoyo); } } if (this._hasPause && !this._forcing && this._lock < 2) { pauseTween = _findNextPauseTween(this, _round(prevTime), _round(time)); if (pauseTween) { tTime -= time - (time = pauseTween._start); } } this._tTime = tTime; this._time = time; this._act = !timeScale; //as long as it's not paused, force it to be active so that if the user renders independent of the parent timeline, it'll be forced to re-render on the next tick. if (!this._initted) { this._onUpdate = this.vars.onUpdate; this._initted = 1; } if (!prevTime && time && !suppressEvents) { _callback(this, "onStart"); } if (time >= prevTime && totalTime >= 0) { child = this._first; while (child) { next = child._next; if ((child._act || time >= child._start) && child._ts && pauseTween !== child) { if (child.parent !== this) { // an extreme edge case - the child's render could do something like kill() the "next" one in the linked list, or reparent it. In that case we must re-initiate the whole render to be safe. return this.render(totalTime, suppressEvents, force); } child.render(child._ts > 0 ? (time - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (time - child._start) * child._ts, suppressEvents, force); if (time !== this._time || !this._ts && !prevPaused) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete pauseTween = 0; break; } } child = next; } } else { child = this._last; var adjustedTime = totalTime < 0 ? totalTime : time; //when the playhead goes backward beyond the start of this timeline, we must pass that information down to the child animations so that zero-duration tweens know whether to render their starting or ending values. while (child) { next = child._prev; if ((child._act || adjustedTime <= child._end) && child._ts && pauseTween !== child) { if (child.parent !== this) { // an extreme edge case - the child's render could do something like kill() the "next" one in the linked list, or reparent it. In that case we must re-initiate the whole render to be safe. return this.render(totalTime, suppressEvents, force); } child.render(child._ts > 0 ? (adjustedTime - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (adjustedTime - child._start) * child._ts, suppressEvents, force); if (time !== this._time || !this._ts && !prevPaused) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete pauseTween = 0; break; } } child = next; } } if (pauseTween && !suppressEvents) { this.pause(); pauseTween.render(time >= prevTime ? 0 : -_tinyNum)._zTime = time >= prevTime ? 1 : -1; if (this._ts) { //the callback resumed playback! So since we may have held back the playhead due to where the pause is positioned, go ahead and jump to where it's SUPPOSED to be (if no pause happened). this._start = prevStart; //if the pause was at an earlier time and the user resumed in the callback, it could reposition the timeline (changing its startTime), throwing things off slightly, so we make sure the _start doesn't shift. return this.render(totalTime, suppressEvents, force); } } if (this._onUpdate && !suppressEvents) { _callback(this, "onUpdate", true); } if (tTime === tDur || !tTime && this._ts < 0) if (prevStart === this._start || Math.abs(timeScale) !== Math.abs(this._ts)) if (!time || tDur >= this.totalDuration()) { (totalTime || !dur) && _removeFromParent(this, 1); if (!suppressEvents && !(totalTime < 0 && !prevTime)) { _callback(this, tTime === tDur ? "onComplete" : "onReverseComplete", true); this._prom && this._prom(); } } } return this; }; _proto2.add = function add(child, position) { var _this3 = this; if (!_isNumber(position)) { position = _parsePosition(this, position); } if (!(child instanceof Animation)) { if (_isArray(child)) { child.forEach(function (obj) { return _this3.add(obj, position); }); return _uncache(this); } if (_isString(child)) { return this.addLabel(child, position); } if (_isFunction(child)) { child = Tween.delayedCall(0, child); } else { return this; } } return this !== child ? _addToTimeline(this, child, position) : this; //don't allow a timeline to be added to itself as a child! } // buildFrom(position, absolute) { // this._build = (position === ">>" || position === "auto") ? position : (position === "<<") ? 0 : _parsePosition(this, position, !absolute); // return this; // } ; _proto2.getChildren = function getChildren(nested, tweens, timelines, ignoreBeforeTime) { if (nested === void 0) { nested = true; } if (tweens === void 0) { tweens = true; } if (timelines === void 0) { timelines = true; } if (ignoreBeforeTime === void 0) { ignoreBeforeTime = -_bigNum; } var a = [], child = this._first; while (child) { if (child._start >= ignoreBeforeTime) { if (child instanceof Tween) { if (tweens) { a.push(child); } } else { if (timelines) { a.push(child); } if (nested) { a.push.apply(a, child.getChildren(true, tweens, timelines)); } } } child = child._next; } return a; }; _proto2.getById = function getById(id) { var animations = this.getChildren(1, 1, 1), i = animations.length; while (i--) { if (animations[i].vars.id === id) { return animations[i]; } } }; _proto2.remove = function remove(child) { if (_isString(child)) { return this.removeLabel(child); } if (_isFunction(child)) { return this.killTweensOf(child); } _removeLinkedListItem(this, child); if (child === this._recent) { this._recent = this._last; } return _uncache(this); }; _proto2.totalTime = function totalTime(_totalTime2, suppressEvents) { if (!arguments.length) { return this._tTime; } this._forcing = 1; if (!this.parent && !this._dp && this._ts) { //special case for the global timeline (or any other that has no parent or detached parent). this._start = _ticker.time - (this._ts > 0 ? _totalTime2 / this._ts : (this.totalDuration() - _totalTime2) / -this._ts); } _Animation.prototype.totalTime.call(this, _totalTime2, suppressEvents); this._forcing = 0; return this; }; _proto2.addLabel = function addLabel(label, position) { this.labels[label] = _parsePosition(this, position); return this; }; _proto2.removeLabel = function removeLabel(label) { delete this.labels[label]; return this; }; _proto2.addPause = function addPause(position, callback, params) { var t = Tween.delayedCall(0, callback || _emptyFunc, params); t.data = "isPause"; this._hasPause = 1; return _addToTimeline(this, t, _parsePosition(this, position)); }; _proto2.removePause = function removePause(position) { var child = this._first; position = _parsePosition(this, position); while (child) { if (child._start === position && child.data === "isPause") { _removeFromParent(child); } child = child._next; } }; _proto2.killTweensOf = function killTweensOf(targets, props, onlyActive) { var tweens = this.getTweensOf(targets, onlyActive), i = tweens.length; while (i--) { _overwritingTween !== tweens[i] && tweens[i].kill(targets, props); } return this; }; _proto2.getTweensOf = function getTweensOf(targets, onlyActive) { var a = [], parsedTargets = toArray(targets), child = this._first, children; while (child) { if (child instanceof Tween) { if (_arrayContainsAny(child._targets, parsedTargets) && (!onlyActive || child.isActive(onlyActive === "started"))) { a.push(child); } } else if ((children = child.getTweensOf(parsedTargets, onlyActive)).length) { a.push.apply(a, children); } child = child._next; } return a; }; _proto2.tweenTo = function tweenTo(position, vars) { var tl = this, endTime = _parsePosition(tl, position), startAt = vars && vars.startAt, tween = Tween.to(tl, _setDefaults({ ease: "none", lazy: false, time: endTime, duration: Math.abs(endTime - (startAt && "time" in startAt ? startAt.time : tl._time)) / tl.timeScale() || _tinyNum, onStart: function onStart() { tl.pause(); var duration = Math.abs(endTime - tl._time) / tl.timeScale(); if (tween._dur !== duration) { tween._dur = duration; tween.render(tween._time, true, true); } if (vars && vars.onStart) { //in case the user had an onStart in the vars - we don't want to overwrite it. vars.onStart.apply(tween, vars.onStartParams || []); } } }, vars)); return tween; }; _proto2.tweenFromTo = function tweenFromTo(fromPosition, toPosition, vars) { return this.tweenTo(toPosition, _setDefaults({ startAt: { time: _parsePosition(this, fromPosition) } }, vars)); }; _proto2.recent = function recent() { return this._recent; }; _proto2.nextLabel = function nextLabel(afterTime) { if (afterTime === void 0) { afterTime = this._time; } return _getLabelInDirection(this, _parsePosition(this, afterTime)); }; _proto2.previousLabel = function previousLabel(beforeTime) { if (beforeTime === void 0) { beforeTime = this._time; } return _getLabelInDirection(this, _parsePosition(this, beforeTime), 1); }; _proto2.currentLabel = function currentLabel(value) { return arguments.length ? this.seek(value, true) : this.previousLabel(this._time + _tinyNum); }; _proto2.shiftChildren = function shiftChildren(amount, adjustLabels, ignoreBeforeTime) { if (ignoreBeforeTime === void 0) { ignoreBeforeTime = 0; } var child = this._first, labels = this.labels, p; while (child) { if (child._start >= ignoreBeforeTime) { child._start += amount; } child = child._next; } if (adjustLabels) { for (p in labels) { if (labels[p] >= ignoreBeforeTime) { labels[p] += amount; } } } return _uncache(this); }; _proto2.invalidate = function invalidate() { var child = this._first; this._lock = 0; while (child) { child.invalidate(); child = child._next; } return _Animation.prototype.invalidate.call(this); }; _proto2.clear = function clear(includeLabels) { if (includeLabels === void 0) { includeLabels = true; } var child = this._first, next; while (child) { next = child._next; this.remove(child); child = next; } this._time = this._tTime = 0; if (includeLabels) { this.labels = {}; } return _uncache(this); }; _proto2.totalDuration = function totalDuration(value) { var max = 0, self = this, child = self._last, prevStart = _bigNum, repeat = self._repeat, repeatCycles = repeat * self._rDelay || 0, isInfinite = repeat < 0, prev, end; if (!arguments.length) { if (self._dirty) { while (child) { prev = child._prev; //record it here in case the tween changes position in the sequence... if (child._dirty) { child.totalDuration(); //could change the tween._startTime, so make sure the animation's cache is clean before analyzing it. } if (child._start > prevStart && self._sort && child._ts && !self._lock) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence self._lock = 1; //prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add(). _addToTimeline(self, child, child._start - child._delay); self._lock = 0; } else { prevStart = child._start; } if (child._start < 0 && child._ts) { //children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found. max -= child._start; if (!self.parent && !self._dp || self.parent && self.parent.smoothChildTiming) { self._start += child._start / self._ts; self._time -= child._start; self._tTime -= child._start; } self.shiftChildren(-child._start, false, -_bigNum); prevStart = 0; } end = child._end = child._start + child._tDur / Math.abs(child._ts || child._pauseTS || _tinyNum); if (end > max && child._ts) { max = _round(end); } child = prev; } self._dur = self === _globalTimeline && self._time > max ? self._time : Math.min(_bigNum, max); self._tDur = isInfinite && (self._dur || repeatCycles) ? 1e20 : Math.min(_bigNum, max * (repeat + 1) + repeatCycles); self._end = self._start + (self._tDur / Math.abs(self._ts || self._pauseTS || _tinyNum) || 0); self._dirty = 0; } return self._tDur; } return isInfinite ? self : self.timeScale(self.totalDuration() / value); }; Timeline.updateRoot = function updateRoot(time) { if (_globalTimeline._ts) { _lazySafeRender(_globalTimeline, _parentToChildTotalTime(time, _globalTimeline)); } if (_ticker.frame >= _nextGCFrame) { _nextGCFrame += _config.autoSleep || 120; var child = _globalTimeline._first; if (!child || !child._ts) if (_config.autoSleep && _ticker._listeners.length < 2) { while (child && !child._ts) { child = child._next; } if (!child) { _ticker.sleep(); } } } }; return Timeline; }(Animation); _setDefaults(Timeline.prototype, { _lock: 0, _hasPause: 0, _forcing: 0 }); var _addComplexStringPropTween = function _addComplexStringPropTween(target, prop, start, end, setter, stringFilter, funcParam) { //note: we call _addComplexStringPropTween.call(tweenInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus "this" would refer to the plugin. var pt = new PropTween(this._pt, target, prop, 0, 1, _renderComplexString, null, setter), index = 0, matchIndex = 0, result, startNums, color, endNum, chunk, startNum, hasRandom, a; pt.b = start; pt.e = end; start += ""; //ensure values are strings end += ""; if (hasRandom = ~end.indexOf("random(")) { end = _replaceRandom(end); } if (stringFilter) { a = [start, end]; stringFilter(a, target, prop); //pass an array with the starting and ending values and let the filter do whatever it needs to the values. start = a[0]; end = a[1]; } startNums = start.match(_complexStringNumExp) || []; while (result = _complexStringNumExp.exec(end)) { endNum = result[0]; chunk = end.substring(index, result.index); if (color) { color = (color + 1) % 5; } else if (chunk.substr(-5) === "rgba(") { color = 1; } if (endNum !== startNums[matchIndex++]) { startNum = parseFloat(startNums[matchIndex - 1]) || 0; //these nested PropTweens are handled in a special way - we'll never actually call a render or setter method on them. We'll just loop through them in the parent complex string PropTween's render method. pt._pt = { _next: pt._pt, p: chunk || matchIndex === 1 ? chunk : ",", //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case. s: startNum, c: endNum.charAt(1) === "=" ? parseFloat(endNum.substr(2)) * (endNum.charAt(0) === "-" ? -1 : 1) : parseFloat(endNum) - startNum, m: color && color < 4 ? Math.round : 0 }; index = _complexStringNumExp.lastIndex; } } pt.c = index < end.length ? end.substring(index, end.length) : ""; //we use the "c" of the PropTween to store the final part of the string (after the last number) pt.fp = funcParam; if (_relExp.test(end) || hasRandom) { pt.e = 0; //if the end string contains relative values or dynamic random(...) values, delete the end it so that on the final render we don't actually set it to the string with += or -= characters (forces it to use the calculated value). } this._pt = pt; //start the linked list with this new PropTween. Remember, we call _addComplexStringPropTween.call(tweenInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus "this" would refer to the plugin. return pt; }, _addPropTween = function _addPropTween(target, prop, start, end, index, targets, modifier, stringFilter, funcParam) { if (_isFunction(end)) { end = end(index || 0, target, targets); } var currentValue = target[prop], parsedStart = start !== "get" ? start : !_isFunction(currentValue) ? currentValue : funcParam ? target[prop.indexOf("set") || !_isFunction(target["get" + prop.substr(3)]) ? prop : "get" + prop.substr(3)](funcParam) : target[prop](), setter = !_isFunction(currentValue) ? _setterPlain : funcParam ? _setterFuncWithParam : _setterFunc, pt; if (_isString(end)) { if (~end.indexOf("random(")) { end = _replaceRandom(end); } if (end.charAt(1) === "=") { end = parseFloat(parsedStart) + parseFloat(end.substr(2)) * (end.charAt(0) === "-" ? -1 : 1) + (getUnit(parsedStart) || 0); } } if (parsedStart !== end) { if (!isNaN(parsedStart + end)) { pt = new PropTween(this._pt, target, prop, +parsedStart || 0, end - (parsedStart || 0), typeof currentValue === "boolean" ? _renderBoolean : _renderPlain, 0, setter); if (funcParam) { pt.fp = funcParam; } if (modifier) { pt.modifier(modifier, this, target); } return this._pt = pt; } !currentValue && !(prop in target) && _missingPlugin(prop, end); return _addComplexStringPropTween.call(this, target, prop, parsedStart, end, setter, stringFilter || _config.stringFilter, funcParam); } }, //creates a copy of the vars object and processes any function-based values (putting the resulting values directly into the copy) as well as strings with "random()" in them. It does NOT process relative values. _processVars = function _processVars(vars, index, target, targets, tween) { if (_isFunction(vars)) { vars = _parseFuncOrString(vars, tween, index, target, targets); } if (!_isObject(vars) || vars.style && vars.nodeType || _isArray(vars)) { return _isString(vars) ? _parseFuncOrString(vars, tween, index, target, targets) : vars; } var copy = {}, p; for (p in vars) { copy[p] = _parseFuncOrString(vars[p], tween, index, target, targets); } return copy; }, _checkPlugin = function _checkPlugin(property, vars, tween, index, target, targets) { var plugin, pt, ptLookup, i; if (_plugins[property] && (plugin = new _plugins[property]()).init(target, plugin.rawVars ? vars[property] : _processVars(vars[property], index, target, targets, tween), tween, index, targets) !== false) { tween._pt = pt = new PropTween(tween._pt, target, property, 0, 1, plugin.render, plugin, 0, plugin.priority); if (tween !== _quickTween) { ptLookup = tween._ptLookup[tween._targets.indexOf(target)]; //note: we can't use tween._ptLookup[index] because for staggered tweens, the index from the fullTargets array won't match what it is in each individual tween that spawns from the stagger. i = plugin._props.length; while (i--) { ptLookup[plugin._props[i]] = pt; } } } return plugin; }, _overwritingTween, //store a reference temporarily so we can avoid overwriting itself. _initTween = function _initTween(tween, time) { var vars = tween.vars, ease = vars.ease, startAt = vars.startAt, immediateRender = vars.immediateRender, lazy = vars.lazy, onUpdate = vars.onUpdate, onUpdateParams = vars.onUpdateParams, callbackScope = vars.callbackScope, runBackwards = vars.runBackwards, yoyoEase = vars.yoyoEase, keyframes = vars.keyframes, autoRevert = vars.autoRevert, dur = tween._dur, prevStartAt = tween._startAt, targets = tween._targets, parent = tween.parent, fullTargets = parent && parent.data === "nested" ? parent.parent._targets : targets, autoOverwrite = tween._overwrite === "auto", tl = tween.timeline, cleanVars, i, p, pt, target, hasPriority, gsData, harness, plugin, ptLookup, index, harnessVars; if (tl && (!keyframes || !ease)) { ease = "none"; } tween._ease = _parseEase(ease, _defaults.ease); tween._yEase = yoyoEase ? _invertEase(_parseEase(yoyoEase === true ? ease : yoyoEase, _defaults.ease)) : 0; if (yoyoEase && tween._yoyo && !tween._repeat) { //there must have been a parent timeline with yoyo:true that is currently in its yoyo phase, so flip the eases. yoyoEase = tween._yEase; tween._yEase = tween._ease; tween._ease = yoyoEase; } if (!tl) { //if there's an internal timeline, skip all the parsing because we passed that task down the chain. if (prevStartAt) { prevStartAt.render(-1, true).kill(); } if (startAt) { _removeFromParent(tween._startAt = Tween.set(targets, _setDefaults({ data: "isStart", overwrite: false, parent: parent, immediateRender: true, lazy: _isNotFalse(lazy), startAt: null, delay: 0, onUpdate: onUpdate, onUpdateParams: onUpdateParams, callbackScope: callbackScope, stagger: 0 }, startAt))); //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, from, to).fromTo(e, to, from); if (immediateRender) { if (time > 0) { !autoRevert && (tween._startAt = 0); //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in Timeline instances where immediateRender was false or when autoRevert is explicitly set to true. } else if (dur) { return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a Timeline, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting. } } } else if (runBackwards && dur) { //from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards) if (prevStartAt) { !autoRevert && (tween._startAt = 0); } else { if (time) { //in rare cases (like if a from() tween runs and then is invalidate()-ed), immediateRender could be true but the initial forced-render gets skipped, so there's no need to force the render in this context when the _time is greater than 0 immediateRender = false; } _removeFromParent(tween._startAt = Tween.set(targets, _merge(_copyExcluding(vars, _reservedProps), { overwrite: false, data: "isFromStart", //we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in. lazy: immediateRender && _isNotFalse(lazy), immediateRender: immediateRender, //zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after) stagger: 0, parent: parent //ensures that nested tweens that had a stagger are handled properly, like gsap.from(".class", {y:gsap.utils.wrap([-100,100])}) }))); if (!immediateRender) { _initTween(tween._startAt, _tinyNum); //ensures that the initial values are recorded } else if (!time) { return; } } } cleanVars = _copyExcluding(vars, _reservedProps); tween._pt = 0; harness = targets[0] ? _getCache(targets[0]).harness : 0; harnessVars = harness && vars[harness.prop]; //someone may need to specify CSS-specific values AND non-CSS values, like if the element has an "x" property plus it's a standard DOM element. We allow people to distinguish by wrapping plugin-specific stuff in a css:{} object for example. lazy = dur && _isNotFalse(lazy) || lazy && !dur; for (i = 0; i < targets.length; i++) { target = targets[i]; gsData = target._gsap || _harness(targets)[i]._gsap; tween._ptLookup[i] = ptLookup = {}; if (_lazyLookup[gsData.id]) { _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end) } index = fullTargets === targets ? i : fullTargets.indexOf(target); if (harness && (plugin = new harness()).init(target, harnessVars || cleanVars, tween, index, fullTargets) !== false) { tween._pt = pt = new PropTween(tween._pt, target, plugin.name, 0, 1, plugin.render, plugin, 0, plugin.priority); plugin._props.forEach(function (name) { ptLookup[name] = pt; }); if (plugin.priority) { hasPriority = 1; } } if (!harness || harnessVars) { for (p in cleanVars) { if (_plugins[p] && (plugin = _checkPlugin(p, cleanVars, tween, index, target, fullTargets))) { if (plugin.priority) { hasPriority = 1; } } else { ptLookup[p] = pt = _addPropTween.call(tween, target, p, "get", cleanVars[p], index, fullTargets, 0, vars.stringFilter); } } } if (tween._op && tween._op[i]) { tween.kill(target, tween._op[i]); } if (autoOverwrite && tween._pt) { _overwritingTween = tween; _globalTimeline.killTweensOf(target, ptLookup, "started"); //Also make sure the overwriting doesn't overwrite THIS tween!!! _overwritingTween = 0; } if (tween._pt && lazy) { _lazyLookup[gsData.id] = 1; } } if (hasPriority) { _sortPropTweensByPriority(tween); } if (tween._onInit) { //plugins like RoundProps must wait until ALL of the PropTweens are instantiated. In the plugin's init() function, it sets the _onInit on the tween instance. May not be pretty/intuitive, but it's fast and keeps file size down. tween._onInit(tween); } } tween._from = !tl && !!vars.runBackwards; //nested timelines should never run backwards - the backwards-ness is in the child tweens. tween._onUpdate = onUpdate; tween._initted = 1; }, _addAliasesToVars = function _addAliasesToVars(targets, vars) { var harness = targets[0] ? _getCache(targets[0]).harness : 0, propertyAliases = harness && harness.aliases, copy, p, i, aliases; if (!propertyAliases) { return vars; } copy = _merge({}, vars); for (p in propertyAliases) { if (p in copy) { aliases = propertyAliases[p].split(","); i = aliases.length; while (i--) { copy[aliases[i]] = copy[p]; } } } return copy; }, _parseFuncOrString = function _parseFuncOrString(value, tween, i, target, targets) { return _isFunction(value) ? value.call(tween, i, target, targets) : _isString(value) && ~value.indexOf("random(") ? _replaceRandom(value) : value; }, _staggerTweenProps = _callbackNames + ",repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase", _staggerPropsToSkip = (_staggerTweenProps + ",id,stagger,delay,duration,paused").split(","); /* * -------------------------------------------------------------------------------------- * TWEEN * -------------------------------------------------------------------------------------- */ var Tween = /*#__PURE__*/ function (_Animation2) { _inheritsLoose(Tween, _Animation2); function Tween(targets, vars, time) { var _this4; if (typeof vars === "number") { time.duration = vars; vars = time; time = null; } _this4 = _Animation2.call(this, _inheritDefaults(vars), time) || this; var _this4$vars = _this4.vars, duration = _this4$vars.duration, delay = _this4$vars.delay, immediateRender = _this4$vars.immediateRender, stagger = _this4$vars.stagger, overwrite = _this4$vars.overwrite, keyframes = _this4$vars.keyframes, defaults = _this4$vars.defaults, parsedTargets = _isArray(targets) && _isNumber(targets[0]) ? [targets] : toArray(targets), tl, i, copy, l, p, curTarget, staggerFunc, staggerVarsToMerge; _this4._targets = parsedTargets.length ? _harness(parsedTargets) : _warn("GSAP target " + targets + " not found. https://greensock.com", !_config.nullTargetWarn) || []; _this4._ptLookup = []; //PropTween lookup. An array containing an object for each target, having keys for each tweening property _this4._overwrite = overwrite; if (keyframes || stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) { vars = _this4.vars; tl = _this4.timeline = new Timeline({ data: "nested", defaults: defaults || {} }); tl.kill(); tl.parent = _assertThisInitialized(_this4); if (keyframes) { _setDefaults(tl.vars.defaults, { ease: "none" }); keyframes.forEach(function (frame) { return tl.to(parsedTargets, frame, ">"); }); } else { l = parsedTargets.length; staggerFunc = stagger ? distribute(stagger) : _emptyFunc; if (_isObject(stagger)) { //users can pass in callbacks like onStart/onComplete in the stagger object. These should fire with each individual tween. for (p in stagger) { if (~_staggerTweenProps.indexOf(p)) { if (!staggerVarsToMerge) { staggerVarsToMerge = {}; } staggerVarsToMerge[p] = stagger[p]; } } } for (i = 0; i < l; i++) { copy = {}; for (p in vars) { if (_staggerPropsToSkip.indexOf(p) < 0) { copy[p] = vars[p]; } } copy.stagger = 0; if (staggerVarsToMerge) { _merge(copy, staggerVarsToMerge); } if (vars.yoyoEase && !vars.repeat) { //so that propagation works properly when a ancestor timeline yoyos copy.yoyoEase = vars.yoyoEase; } curTarget = parsedTargets[i]; //don't just copy duration or delay because if they're a string or function, we'd end up in an infinite loop because _isFuncOrString() would evaluate as true in the child tweens, entering this loop, etc. So we parse the value straight from vars and default to 0. copy.duration = +_parseFuncOrString(duration, _assertThisInitialized(_this4), i, curTarget, parsedTargets); copy.delay = (+_parseFuncOrString(delay, _assertThisInitialized(_this4), i, curTarget, parsedTargets) || 0) - _this4._delay; if (!stagger && l === 1 && copy.delay) { // if someone does delay:"random(1, 5)", repeat:-1, for example, the delay shouldn't be inside the repeat. _this4._delay = delay = copy.delay; _this4._start += delay; copy.delay = 0; } tl.to(curTarget, copy, staggerFunc(i, curTarget, parsedTargets)); } duration = delay = 0; } duration || _this4.duration(duration = tl.duration()); } else { _this4.timeline = 0; //speed optimization, faster lookups (no going up the prototype chain) } if (overwrite === true) { _overwritingTween = _assertThisInitialized(_this4); _globalTimeline.killTweensOf(parsedTargets); _overwritingTween = 0; } if (immediateRender || !duration && !keyframes && _this4._start === _this4.parent._time && _isNotFalse(immediateRender) && _hasNoPausedAncestors(_assertThisInitialized(_this4)) && _this4.parent.data !== "nested") { _this4._tTime = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render) _this4.render(Math.max(0, -delay)); //in case delay is negative } return _this4; } var _proto3 = Tween.prototype; _proto3.render = function render(totalTime, suppressEvents, force) { var prevTime = this._time, tDur = this._tDur, dur = this._dur, tTime = totalTime > tDur - _tinyNum && totalTime >= 0 ? tDur : totalTime < _tinyNum ? 0 : totalTime, time, pt, iteration, cycleDuration, prevIteration, isYoyo, ratio, timeline, yoyoEase; if (!dur) { _renderZeroDurationTween(this, totalTime, suppressEvents, force); } else if (tTime !== this._tTime || !totalTime || force || this._startAt && this._zTime < 0 !== totalTime < 0) { //this senses if we're crossing over the start time, in which case we must record _zTime and force the render, but we do it in this lengthy conditional way for performance reasons (usually we can skip the calculations): this._initted && (this._zTime < 0) !== (totalTime < 0) time = tTime; timeline = this.timeline; if (this._repeat) { //adjust the time for repeats and yoyos cycleDuration = dur + this._rDelay; time = _round(tTime % cycleDuration); //round to avoid floating point errors. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!) if (time > dur) { time = dur; } iteration = ~~(tTime / cycleDuration); if (iteration && iteration === tTime / cycleDuration) { time = dur; iteration--; } isYoyo = this._yoyo && iteration & 1; if (isYoyo) { yoyoEase = this._yEase; time = dur - time; } prevIteration = _animationCycle(this._tTime, cycleDuration); if (time === prevTime && !force && this._initted) { //could be during the repeatDelay part. No need to render and fire callbacks. return this; } if (iteration !== prevIteration) { //timeline && this._yEase && _propagateYoyoEase(timeline, isYoyo); //repeatRefresh functionality if (this.vars.repeatRefresh && !this._lock) { this._lock = force = 1; //force, otherwise if lazy is true, the _attemptInitTween() will return and we'll jump out and get caught bouncing on each tick. this.render(cycleDuration * iteration, true).invalidate()._lock = 0; } } } if (!this._initted && _attemptInitTween(this, time, force, suppressEvents)) { return this; } this._tTime = tTime; this._time = time; if (!this._act && this._ts) { this._act = 1; //as long as it's not paused, force it to be active so that if the user renders independent of the parent timeline, it'll be forced to re-render on the next tick. this._lazy = 0; } this.ratio = ratio = (yoyoEase || this._ease)(time / dur); if (this._from) { this.ratio = ratio = 1 - ratio; } if (!prevTime && time && !suppressEvents) { _callback(this, "onStart"); } pt = this._pt; while (pt) { pt.r(ratio, pt.d); pt = pt._next; } timeline && timeline.render(totalTime < 0 ? totalTime : !time && isYoyo ? -_tinyNum : timeline._dur * ratio, suppressEvents, force) || this._startAt && (this._zTime = totalTime); if (this._onUpdate && !suppressEvents) { if (totalTime < 0 && this._startAt) { this._startAt.render(totalTime, true, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete. } _callback(this, "onUpdate"); } if (this._repeat) if (iteration !== prevIteration && this.vars.onRepeat && !suppressEvents && this.parent) { _callback(this, "onRepeat"); } if ((tTime === tDur || !tTime) && this._tTime === tTime) { if (totalTime < 0 && this._startAt && !this._onUpdate) { this._startAt.render(totalTime, true, force); } (totalTime || !dur) && (tTime || this._ts < 0) && _removeFromParent(this, 1); // don't remove if we're rendering at exactly a time of 0, as there could be autoRevert values that should get set on the next tick (if the playhead goes backward beyond the startTime, negative totalTime). if (!suppressEvents && !(totalTime < 0 && !prevTime)) { _callback(this, tTime === tDur ? "onComplete" : "onReverseComplete", true); this._prom && this._prom(); } } } return this; }; _proto3.targets = function targets() { return this._targets; }; _proto3.invalidate = function invalidate() { this._pt = this._op = this._startAt = this._onUpdate = this._act = this._lazy = 0; this._ptLookup = []; if (this.timeline) { this.timeline.invalidate(); } return _Animation2.prototype.invalidate.call(this); }; _proto3.kill = function kill(targets, vars) { if (vars === void 0) { vars = "all"; } if (!targets && (!vars || vars === "all")) { this._lazy = 0; if (this.parent) { return _interrupt(this); } } if (this.timeline) { this.timeline.killTweensOf(targets, vars, _overwritingTween && _overwritingTween.vars.overwrite !== true); return this; } var parsedTargets = this._targets, killingTargets = targets ? toArray(targets) : parsedTargets, propTweenLookup = this._ptLookup, firstPT = this._pt, overwrittenProps, curLookup, curOverwriteProps, props, p, pt, i; if ((!vars || vars === "all") && _arraysMatch(parsedTargets, killingTargets)) { return _interrupt(this); } overwrittenProps = this._op = this._op || []; if (vars !== "all") { //so people can pass in a comma-delimited list of property names if (_isString(vars)) { p = {}; _forEachName(vars, function (name) { return p[name] = 1; }); vars = p; } vars = _addAliasesToVars(parsedTargets, vars); } i = parsedTargets.length; while (i--) { if (~killingTargets.indexOf(parsedTargets[i])) { curLookup = propTweenLookup[i]; if (vars === "all") { overwrittenProps[i] = vars; props = curLookup; curOverwriteProps = {}; } else { curOverwriteProps = overwrittenProps[i] = overwrittenProps[i] || {}; props = vars; } for (p in props) { pt = curLookup && curLookup[p]; if (pt) { if (!("kill" in pt.d) || pt.d.kill(p) === true) { _removeLinkedListItem(this, pt, "_pt"); } delete curLookup[p]; } if (curOverwriteProps !== "all") { curOverwriteProps[p] = 1; } } } } if (this._initted && !this._pt && firstPT) { //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening. _interrupt(this); } return this; }; Tween.to = function to(targets, vars) { return new Tween(targets, vars, arguments[2]); }; Tween.from = function from(targets, vars) { return new Tween(targets, _parseVars(arguments, 1)); }; Tween.delayedCall = function delayedCall(delay, callback, params, scope) { return new Tween(callback, 0, { immediateRender: false, lazy: false, overwrite: false, delay: delay, onComplete: callback, onReverseComplete: callback, onCompleteParams: params, onReverseCompleteParams: params, callbackScope: scope }); }; Tween.fromTo = function fromTo(targets, fromVars, toVars) { return new Tween(targets, _parseVars(arguments, 2)); }; Tween.set = function set(targets, vars) { vars.duration = 0; if (!vars.repeatDelay) { vars.repeat = 0; } return new Tween(targets, vars); }; Tween.killTweensOf = function killTweensOf(targets, props, onlyActive) { return _globalTimeline.killTweensOf(targets, props, onlyActive); }; return Tween; }(Animation); _setDefaults(Tween.prototype, { _targets: [], _lazy: 0, _startAt: 0, _op: 0, _onInit: 0 }); //add the pertinent timeline methods to Tween instances so that users can chain conveniently and create a timeline automatically. (removed due to concerns that it'd ultimately add to more confusion especially for beginners) // _forEachName("to,from,fromTo,set,call,add,addLabel,addPause", name => { // Tween.prototype[name] = function() { // let tl = new Timeline(); // return _addToTimeline(tl, this)[name].apply(tl, toArray(arguments)); // } // }); //for backward compatibility. Leverage the timeline calls. _forEachName("staggerTo,staggerFrom,staggerFromTo", function (name) { Tween[name] = function () { var tl = new Timeline(), params = toArray(arguments); params.splice(name === "staggerFromTo" ? 5 : 4, 0, 0); return tl[name].apply(tl, params); }; }); /* * -------------------------------------------------------------------------------------- * PROPTWEEN * -------------------------------------------------------------------------------------- */ var _setterPlain = function _setterPlain(target, property, value) { return target[property] = value; }, _setterFunc = function _setterFunc(target, property, value) { return target[property](value); }, _setterFuncWithParam = function _setterFuncWithParam(target, property, value, data) { return target[property](data.fp, value); }, _setterAttribute = function _setterAttribute(target, property, value) { return target.setAttribute(property, value); }, _getSetter = function _getSetter(target, property) { return _isFunction(target[property]) ? _setterFunc : _isUndefined(target[property]) && target.setAttribute ? _setterAttribute : _setterPlain; }, _renderPlain = function _renderPlain(ratio, data) { return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 10000) / 10000, data); }, _renderBoolean = function _renderBoolean(ratio, data) { return data.set(data.t, data.p, !!(data.s + data.c * ratio), data); }, _renderComplexString = function _renderComplexString(ratio, data) { var pt = data._pt, s = ""; if (!ratio && data.b) { //b = beginning string s = data.b; } else if (ratio === 1 && data.e) { //e = ending string s = data.e; } else { while (pt) { s = pt.p + (pt.m ? pt.m(pt.s + pt.c * ratio) : Math.round((pt.s + pt.c * ratio) * 10000) / 10000) + s; //we use the "p" property for the text inbetween (like a suffix). And in the context of a complex string, the modifier (m) is typically just Math.round(), like for RGB colors. pt = pt._next; } s += data.c; //we use the "c" of the PropTween to store the final chunk of non-numeric text. } data.set(data.t, data.p, s, data); }, _renderPropTweens = function _renderPropTweens(ratio, data) { var pt = data._pt; while (pt) { pt.r(ratio, pt.d); pt = pt._next; } }, _addPluginModifier = function _addPluginModifier(modifier, tween, target, property) { var pt = this._pt, next; while (pt) { next = pt._next; if (pt.p === property) { pt.modifier(modifier, tween, target); } pt = next; } }, _killPropTweensOf = function _killPropTweensOf(property) { var pt = this._pt, hasNonDependentRemaining, next; while (pt) { next = pt._next; if (pt.p === property && !pt.op || pt.op === property) { _removeLinkedListItem(this, pt, "_pt"); } else if (!pt.dep) { hasNonDependentRemaining = 1; } pt = next; } return !hasNonDependentRemaining; }, _setterWithModifier = function _setterWithModifier(target, property, value, data) { data.mSet(target, property, data.m.call(data.tween, value, data.mt), data); }, _sortPropTweensByPriority = function _sortPropTweensByPriority(parent) { var pt = parent._pt, next, pt2, first, last; //sorts the PropTween linked list in order of priority because some plugins need to do their work after ALL of the PropTweens were created (like RoundPropsPlugin and ModifiersPlugin) while (pt) { next = pt._next; pt2 = first; while (pt2 && pt2.pr > pt.pr) { pt2 = pt2._next; } if (pt._prev = pt2 ? pt2._prev : last) { pt._prev._next = pt; } else { first = pt; } if (pt._next = pt2) { pt2._prev = pt; } else { last = pt; } pt = next; } parent._pt = first; }; //PropTween key: t = target, p = prop, r = renderer, d = data, s = start, c = change, op = overwriteProperty (ONLY populated when it's different than p), pr = priority, _next/_prev for the linked list siblings, set = setter, m = modifier, mSet = modifierSetter (the original setter, before a modifier was added) var PropTween = /*#__PURE__*/ function () { function PropTween(next, target, prop, start, change, renderer, data, setter, priority) { this.t = target; this.s = start; this.c = change; this.p = prop; this.r = renderer || _renderPlain; this.d = data || this; this.set = setter || _setterPlain; this.pr = priority || 0; this._next = next; if (next) { next._prev = this; } } var _proto4 = PropTween.prototype; _proto4.modifier = function modifier(func, tween, target) { this.mSet = this.mSet || this.set; //in case it was already set (a PropTween can only have one modifier) this.set = _setterWithModifier; this.m = func; this.mt = target; //modifier target this.tween = tween; }; return PropTween; }(); //Initialization tasks _forEachName(_callbackNames + ",parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert", function (name) { _reservedProps[name] = 1; if (name.substr(0, 2) === "on") _reservedProps[name + "Params"] = 1; }); _globals.TweenMax = _globals.TweenLite = Tween; _globals.TimelineLite = _globals.TimelineMax = Timeline; _globalTimeline = new Timeline({ sortChildren: false, defaults: _defaults, autoRemoveChildren: true, id: "root" }); _config.stringFilter = _colorStringFilter; /* * -------------------------------------------------------------------------------------- * GSAP * -------------------------------------------------------------------------------------- */ var _gsap = { registerPlugin: function registerPlugin() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } args.forEach(function (config) { return _createPlugin(config); }); }, timeline: function timeline(vars) { return new Timeline(vars); }, getTweensOf: function getTweensOf(targets, onlyActive) { return _globalTimeline.getTweensOf(targets, onlyActive); }, getProperty: function getProperty(target, property, unit, uncache) { if (_isString(target)) { //in case selector text or an array is passed in target = toArray(target)[0]; } var getter = _getCache(target || {}).get, format = unit ? _passThrough : _numericIfPossible; if (unit === "native") { unit = ""; } return !target ? target : !property ? function (property, unit, uncache) { return format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache)); } : format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache)); }, quickSetter: function quickSetter(target, property, unit) { target = toArray(target); if (target.length > 1) { var setters = target.map(function (t) { return gsap.quickSetter(t, property, unit); }), l = setters.length; return function (value) { var i = l; while (i--) { setters[i](value); } }; } target = target[0] || {}; var Plugin = _plugins[property], cache = _getCache(target), setter = Plugin ? function (value) { var p = new Plugin(); _quickTween._pt = 0; p.init(target, unit ? value + unit : value, _quickTween, 0, [target]); p.render(1, p); _quickTween._pt && _renderPropTweens(1, _quickTween); } : cache.set(target, property); return Plugin ? setter : function (value) { return setter(target, property, unit ? value + unit : value, cache, 1); }; }, isTweening: function isTweening(targets) { return _globalTimeline.getTweensOf(targets, true).length > 0; }, defaults: function defaults(value) { if (value && value.ease) { value.ease = _parseEase(value.ease, _defaults.ease); } return _mergeDeep(_defaults, value || {}); }, config: function config(value) { return _mergeDeep(_config, value || {}); }, registerEffect: function registerEffect(_ref) { var name = _ref.name, effect = _ref.effect, plugins = _ref.plugins, defaults = _ref.defaults, extendTimeline = _ref.extendTimeline; (plugins || "").split(",").forEach(function (pluginName) { return pluginName && !_plugins[pluginName] && !_globals[pluginName] && _warn(name + " effect requires " + pluginName + " plugin."); }); _effects[name] = function (targets, vars) { return effect(toArray(targets), _setDefaults(vars || {}, defaults)); }; if (extendTimeline) { Timeline.prototype[name] = function (targets, vars, position) { return this.add(_effects[name](targets, _isObject(vars) ? vars : (position = vars) && {}), position); }; } }, registerEase: function registerEase(name, ease) { _easeMap[name] = _parseEase(ease); }, parseEase: function parseEase(ease, defaultEase) { return arguments.length ? _parseEase(ease, defaultEase) : _easeMap; }, getById: function getById(id) { return _globalTimeline.getById(id); }, exportRoot: function exportRoot(vars, includeDelayedCalls) { if (vars === void 0) { vars = {}; } var tl = new Timeline(vars), child, next; tl.smoothChildTiming = _isNotFalse(vars.smoothChildTiming); _globalTimeline.remove(tl); tl._dp = 0; //otherwise it'll get re-activated when adding children and be re-introduced into _globalTimeline's linked list (then added to itself). tl._time = tl._tTime = _globalTimeline._time; child = _globalTimeline._first; while (child) { next = child._next; if (includeDelayedCalls || !(!child._dur && child instanceof Tween && child.vars.onComplete === child._targets[0])) { _addToTimeline(tl, child, child._start - child._delay); } child = next; } _addToTimeline(_globalTimeline, tl, 0); return tl; }, utils: { wrap: wrap, wrapYoyo: wrapYoyo, distribute: distribute, random: random, snap: snap, normalize: normalize, getUnit: getUnit, clamp: clamp, splitColor: splitColor, toArray: toArray, mapRange: mapRange, pipe: pipe, unitize: unitize, interpolate: interpolate }, install: _install, effects: _effects, ticker: _ticker, updateRoot: Timeline.updateRoot, plugins: _plugins, globalTimeline: _globalTimeline, core: { PropTween: PropTween, globals: _addGlobal, Tween: Tween, Timeline: Timeline, Animation: Animation, getCache: _getCache } }; _forEachName("to,from,fromTo,delayedCall,set,killTweensOf", function (name) { return _gsap[name] = Tween[name]; }); _ticker.add(Timeline.updateRoot); _quickTween = _gsap.to({}, { duration: 0 }); // ---- EXTRA PLUGINS -------------------------------------------------------- var _getPluginPropTween = function _getPluginPropTween(plugin, prop) { var pt = plugin._pt; while (pt && pt.p !== prop && pt.op !== prop && pt.fp !== prop) { pt = pt._next; } return pt; }, _addModifiers = function _addModifiers(tween, modifiers) { var targets = tween._targets, p, i, pt; for (p in modifiers) { i = targets.length; while (i--) { pt = tween._ptLookup[i][p]; if (pt && (pt = pt.d)) { if (pt._pt) { // is a plugin pt = _getPluginPropTween(pt, p); } pt && pt.modifier && pt.modifier(modifiers[p], tween, targets[i], p); } } } }, _buildModifierPlugin = function _buildModifierPlugin(name, modifier) { return { name: name, rawVars: 1, //don't pre-process function-based values or "random()" strings. init: function init(target, vars, tween) { tween._onInit = function (tween) { var temp, p; if (_isString(vars)) { temp = {}; _forEachName(vars, function (name) { return temp[name] = 1; }); //if the user passes in a comma-delimited list of property names to roundProps, like "x,y", we round to whole numbers. vars = temp; } if (modifier) { temp = {}; for (p in vars) { temp[p] = modifier(vars[p]); } vars = temp; } _addModifiers(tween, vars); }; } }; }; //register core plugins var gsap = _gsap.registerPlugin({ name: "attr", init: function init(target, vars, tween, index, targets) { for (var p in vars) { this.add(target, "setAttribute", (target.getAttribute(p) || 0) + "", vars[p], index, targets, 0, 0, p); //this.add(target, "setAttribute", (target.getAttribute((p in target.dataset ? (p = "data-" + p) : p)) || 0) + "", vars[p], index, targets, 0, 0, p); this._props.push(p); } } }, { name: "endArray", init: function init(target, value) { var i = value.length; while (i--) { this.add(target, i, target[i] || 0, value[i]); } } }, _buildModifierPlugin("roundProps", _roundModifier), _buildModifierPlugin("modifiers"), _buildModifierPlugin("snap", snap)) || _gsap; //to prevent the core plugins from being dropped via aggressive tree shaking, we must include them in the variable declaration in this way. Tween.version = Timeline.version = gsap.version = "3.0.4"; _coreReady = 1; if (_windowExists()) { _wake(); } var Power0 = _easeMap.Power0, Power1 = _easeMap.Power1, Power2 = _easeMap.Power2, Power3 = _easeMap.Power3, Power4 = _easeMap.Power4, Linear = _easeMap.Linear, Quad = _easeMap.Quad, Cubic = _easeMap.Cubic, Quart = _easeMap.Quart, Quint = _easeMap.Quint, Strong = _easeMap.Strong, Elastic = _easeMap.Elastic, Back = _easeMap.Back, SteppedEase = _easeMap.SteppedEase, Bounce = _easeMap.Bounce, Sine = _easeMap.Sine, Expo = _easeMap.Expo, Circ = _easeMap.Circ; //export some internal methods/orojects for use in CSSPlugin so that we can externalize that file and allow custom builds that exclude it. /***/ }), /***/ "./node_modules/gsap/index.js": /*!************************************!*\ !*** ./node_modules/gsap/index.js ***! \************************************/ /*! exports provided: gsap, default, CSSPlugin, TweenMax, TweenLite, TimelineMax, TimelineLite, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gsap", function() { return gsapWithCSS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return gsapWithCSS; }); /* harmony import */ var _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./gsap-core.js */ "./node_modules/gsap/gsap-core.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TweenMax", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["TweenMax"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TweenLite", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["TweenLite"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimelineMax", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["TimelineMax"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimelineLite", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["TimelineLite"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power0", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power0"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power1", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power1"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power2", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power2"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power3", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power3"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power4", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power4"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Linear", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Linear"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Quad", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Quad"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cubic", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Cubic"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Quart", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Quart"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Quint", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Quint"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Strong", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Strong"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Elastic", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Elastic"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Back", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Back"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SteppedEase", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["SteppedEase"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bounce", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Bounce"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sine", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Sine"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Expo", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Expo"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Circ", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Circ"]; }); /* harmony import */ var _CSSPlugin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CSSPlugin.js */ "./node_modules/gsap/CSSPlugin.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CSSPlugin", function() { return _CSSPlugin_js__WEBPACK_IMPORTED_MODULE_1__["CSSPlugin"]; }); var gsapWithCSS = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"].registerPlugin(_CSSPlugin_js__WEBPACK_IMPORTED_MODULE_1__["CSSPlugin"]) || _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"]; // to protect from tree shaking /***/ }), /***/ "./node_modules/materialize-css/dist/css/materialize.min.css": /*!*******************************************************************!*\ !*** ./node_modules/materialize-css/dist/css/materialize.min.css ***! \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./node_modules/materialize-css/dist/js/materialize.js": /*!*************************************************************!*\ !*** ./node_modules/materialize-css/dist/js/materialize.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! * Materialize v1.0.0 (http://materializecss.com) * Copyright 2014-2017 Materialize * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE) */ var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /*! cash-dom 1.3.5, https://github.com/kenwheeler/cash @license MIT */ (function (factory) { window.cash = factory(); })(function () { var doc = document, win = window, ArrayProto = Array.prototype, slice = ArrayProto.slice, filter = ArrayProto.filter, push = ArrayProto.push; var noop = function () {}, isFunction = function (item) { // @see https://crbug.com/568448 return typeof item === typeof noop && item.call; }, isString = function (item) { return typeof item === typeof ""; }; var idMatch = /^#[\w-]*$/, classMatch = /^\.[\w-]*$/, htmlMatch = /<.+>/, singlet = /^\w+$/; function find(selector, context) { context = context || doc; var elems = classMatch.test(selector) ? context.getElementsByClassName(selector.slice(1)) : singlet.test(selector) ? context.getElementsByTagName(selector) : context.querySelectorAll(selector); return elems; } var frag; function parseHTML(str) { if (!frag) { frag = doc.implementation.createHTMLDocument(null); var base = frag.createElement("base"); base.href = doc.location.href; frag.head.appendChild(base); } frag.body.innerHTML = str; return frag.body.childNodes; } function onReady(fn) { if (doc.readyState !== "loading") { fn(); } else { doc.addEventListener("DOMContentLoaded", fn); } } function Init(selector, context) { if (!selector) { return this; } // If already a cash collection, don't do any further processing if (selector.cash && selector !== win) { return selector; } var elems = selector, i = 0, length; if (isString(selector)) { elems = idMatch.test(selector) ? // If an ID use the faster getElementById check doc.getElementById(selector.slice(1)) : htmlMatch.test(selector) ? // If HTML, parse it into real elements parseHTML(selector) : // else use `find` find(selector, context); // If function, use as shortcut for DOM ready } else if (isFunction(selector)) { onReady(selector);return this; } if (!elems) { return this; } // If a single DOM element is passed in or received via ID, return the single element if (elems.nodeType || elems === win) { this[0] = elems; this.length = 1; } else { // Treat like an array and loop through each item. length = this.length = elems.length; for (; i < length; i++) { this[i] = elems[i]; } } return this; } function cash(selector, context) { return new Init(selector, context); } var fn = cash.fn = cash.prototype = Init.prototype = { // jshint ignore:line cash: true, length: 0, push: push, splice: ArrayProto.splice, map: ArrayProto.map, init: Init }; Object.defineProperty(fn, "constructor", { value: cash }); cash.parseHTML = parseHTML; cash.noop = noop; cash.isFunction = isFunction; cash.isString = isString; cash.extend = fn.extend = function (target) { target = target || {}; var args = slice.call(arguments), length = args.length, i = 1; if (args.length === 1) { target = this; i = 0; } for (; i < length; i++) { if (!args[i]) { continue; } for (var key in args[i]) { if (args[i].hasOwnProperty(key)) { target[key] = args[i][key]; } } } return target; }; function each(collection, callback) { var l = collection.length, i = 0; for (; i < l; i++) { if (callback.call(collection[i], collection[i], i, collection) === false) { break; } } } function matches(el, selector) { var m = el && (el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector || el.oMatchesSelector); return !!m && m.call(el, selector); } function getCompareFunction(selector) { return ( /* Use browser's `matches` function if string */ isString(selector) ? matches : /* Match a cash element */ selector.cash ? function (el) { return selector.is(el); } : /* Direct comparison */ function (el, selector) { return el === selector; } ); } function unique(collection) { return cash(slice.call(collection).filter(function (item, index, self) { return self.indexOf(item) === index; })); } cash.extend({ merge: function (first, second) { var len = +second.length, i = first.length, j = 0; for (; j < len; i++, j++) { first[i] = second[j]; } first.length = i; return first; }, each: each, matches: matches, unique: unique, isArray: Array.isArray, isNumeric: function (n) { return !isNaN(parseFloat(n)) && isFinite(n); } }); var uid = cash.uid = "_cash" + Date.now(); function getDataCache(node) { return node[uid] = node[uid] || {}; } function setData(node, key, value) { return getDataCache(node)[key] = value; } function getData(node, key) { var c = getDataCache(node); if (c[key] === undefined) { c[key] = node.dataset ? node.dataset[key] : cash(node).attr("data-" + key); } return c[key]; } function removeData(node, key) { var c = getDataCache(node); if (c) { delete c[key]; } else if (node.dataset) { delete node.dataset[key]; } else { cash(node).removeAttr("data-" + name); } } fn.extend({ data: function (name, value) { if (isString(name)) { return value === undefined ? getData(this[0], name) : this.each(function (v) { return setData(v, name, value); }); } for (var key in name) { this.data(key, name[key]); } return this; }, removeData: function (key) { return this.each(function (v) { return removeData(v, key); }); } }); var notWhiteMatch = /\S+/g; function getClasses(c) { return isString(c) && c.match(notWhiteMatch); } function hasClass(v, c) { return v.classList ? v.classList.contains(c) : new RegExp("(^| )" + c + "( |$)", "gi").test(v.className); } function addClass(v, c, spacedName) { if (v.classList) { v.classList.add(c); } else if (spacedName.indexOf(" " + c + " ")) { v.className += " " + c; } } function removeClass(v, c) { if (v.classList) { v.classList.remove(c); } else { v.className = v.className.replace(c, ""); } } fn.extend({ addClass: function (c) { var classes = getClasses(c); return classes ? this.each(function (v) { var spacedName = " " + v.className + " "; each(classes, function (c) { addClass(v, c, spacedName); }); }) : this; }, attr: function (name, value) { if (!name) { return undefined; } if (isString(name)) { if (value === undefined) { return this[0] ? this[0].getAttribute ? this[0].getAttribute(name) : this[0][name] : undefined; } return this.each(function (v) { if (v.setAttribute) { v.setAttribute(name, value); } else { v[name] = value; } }); } for (var key in name) { this.attr(key, name[key]); } return this; }, hasClass: function (c) { var check = false, classes = getClasses(c); if (classes && classes.length) { this.each(function (v) { check = hasClass(v, classes[0]); return !check; }); } return check; }, prop: function (name, value) { if (isString(name)) { return value === undefined ? this[0][name] : this.each(function (v) { v[name] = value; }); } for (var key in name) { this.prop(key, name[key]); } return this; }, removeAttr: function (name) { return this.each(function (v) { if (v.removeAttribute) { v.removeAttribute(name); } else { delete v[name]; } }); }, removeClass: function (c) { if (!arguments.length) { return this.attr("class", ""); } var classes = getClasses(c); return classes ? this.each(function (v) { each(classes, function (c) { removeClass(v, c); }); }) : this; }, removeProp: function (name) { return this.each(function (v) { delete v[name]; }); }, toggleClass: function (c, state) { if (state !== undefined) { return this[state ? "addClass" : "removeClass"](c); } var classes = getClasses(c); return classes ? this.each(function (v) { var spacedName = " " + v.className + " "; each(classes, function (c) { if (hasClass(v, c)) { removeClass(v, c); } else { addClass(v, c, spacedName); } }); }) : this; } }); fn.extend({ add: function (selector, context) { return unique(cash.merge(this, cash(selector, context))); }, each: function (callback) { each(this, callback); return this; }, eq: function (index) { return cash(this.get(index)); }, filter: function (selector) { if (!selector) { return this; } var comparator = isFunction(selector) ? selector : getCompareFunction(selector); return cash(filter.call(this, function (e) { return comparator(e, selector); })); }, first: function () { return this.eq(0); }, get: function (index) { if (index === undefined) { return slice.call(this); } return index < 0 ? this[index + this.length] : this[index]; }, index: function (elem) { var child = elem ? cash(elem)[0] : this[0], collection = elem ? this : cash(child).parent().children(); return slice.call(collection).indexOf(child); }, last: function () { return this.eq(-1); } }); var camelCase = function () { var camelRegex = /(?:^\w|[A-Z]|\b\w)/g, whiteSpace = /[\s-_]+/g; return function (str) { return str.replace(camelRegex, function (letter, index) { return letter[index === 0 ? "toLowerCase" : "toUpperCase"](); }).replace(whiteSpace, ""); }; }(); var getPrefixedProp = function () { var cache = {}, doc = document, div = doc.createElement("div"), style = div.style; return function (prop) { prop = camelCase(prop); if (cache[prop]) { return cache[prop]; } var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), prefixes = ["webkit", "moz", "ms", "o"], props = (prop + " " + prefixes.join(ucProp + " ") + ucProp).split(" "); each(props, function (p) { if (p in style) { cache[p] = prop = cache[prop] = p; return false; } }); return cache[prop]; }; }(); cash.prefixedProp = getPrefixedProp; cash.camelCase = camelCase; fn.extend({ css: function (prop, value) { if (isString(prop)) { prop = getPrefixedProp(prop); return arguments.length > 1 ? this.each(function (v) { return v.style[prop] = value; }) : win.getComputedStyle(this[0])[prop]; } for (var key in prop) { this.css(key, prop[key]); } return this; } }); function compute(el, prop) { return parseInt(win.getComputedStyle(el[0], null)[prop], 10) || 0; } each(["Width", "Height"], function (v) { var lower = v.toLowerCase(); fn[lower] = function () { return this[0].getBoundingClientRect()[lower]; }; fn["inner" + v] = function () { return this[0]["client" + v]; }; fn["outer" + v] = function (margins) { return this[0]["offset" + v] + (margins ? compute(this, "margin" + (v === "Width" ? "Left" : "Top")) + compute(this, "margin" + (v === "Width" ? "Right" : "Bottom")) : 0); }; }); function registerEvent(node, eventName, callback) { var eventCache = getData(node, "_cashEvents") || setData(node, "_cashEvents", {}); eventCache[eventName] = eventCache[eventName] || []; eventCache[eventName].push(callback); node.addEventListener(eventName, callback); } function removeEvent(node, eventName, callback) { var events = getData(node, "_cashEvents"), eventCache = events && events[eventName], index; if (!eventCache) { return; } if (callback) { node.removeEventListener(eventName, callback); index = eventCache.indexOf(callback); if (index >= 0) { eventCache.splice(index, 1); } } else { each(eventCache, function (event) { node.removeEventListener(eventName, event); }); eventCache = []; } } fn.extend({ off: function (eventName, callback) { return this.each(function (v) { return removeEvent(v, eventName, callback); }); }, on: function (eventName, delegate, callback, runOnce) { // jshint ignore:line var originalCallback; if (!isString(eventName)) { for (var key in eventName) { this.on(key, delegate, eventName[key]); } return this; } if (isFunction(delegate)) { callback = delegate; delegate = null; } if (eventName === "ready") { onReady(callback); return this; } if (delegate) { originalCallback = callback; callback = function (e) { var t = e.target; while (!matches(t, delegate)) { if (t === this || t === null) { return t = false; } t = t.parentNode; } if (t) { originalCallback.call(t, e); } }; } return this.each(function (v) { var finalCallback = callback; if (runOnce) { finalCallback = function () { callback.apply(this, arguments); removeEvent(v, eventName, finalCallback); }; } registerEvent(v, eventName, finalCallback); }); }, one: function (eventName, delegate, callback) { return this.on(eventName, delegate, callback, true); }, ready: onReady, /** * Modified * Triggers browser event * @param String eventName * @param Object data - Add properties to event object */ trigger: function (eventName, data) { if (document.createEvent) { var evt = document.createEvent('HTMLEvents'); evt.initEvent(eventName, true, false); evt = this.extend(evt, data); return this.each(function (v) { return v.dispatchEvent(evt); }); } } }); function encode(name, value) { return "&" + encodeURIComponent(name) + "=" + encodeURIComponent(value).replace(/%20/g, "+"); } function getSelectMultiple_(el) { var values = []; each(el.options, function (o) { if (o.selected) { values.push(o.value); } }); return values.length ? values : null; } function getSelectSingle_(el) { var selectedIndex = el.selectedIndex; return selectedIndex >= 0 ? el.options[selectedIndex].value : null; } function getValue(el) { var type = el.type; if (!type) { return null; } switch (type.toLowerCase()) { case "select-one": return getSelectSingle_(el); case "select-multiple": return getSelectMultiple_(el); case "radio": return el.checked ? el.value : null; case "checkbox": return el.checked ? el.value : null; default: return el.value ? el.value : null; } } fn.extend({ serialize: function () { var query = ""; each(this[0].elements || this, function (el) { if (el.disabled || el.tagName === "FIELDSET") { return; } var name = el.name; switch (el.type.toLowerCase()) { case "file": case "reset": case "submit": case "button": break; case "select-multiple": var values = getValue(el); if (values !== null) { each(values, function (value) { query += encode(name, value); }); } break; default: var value = getValue(el); if (value !== null) { query += encode(name, value); } } }); return query.substr(1); }, val: function (value) { if (value === undefined) { return getValue(this[0]); } return this.each(function (v) { return v.value = value; }); } }); function insertElement(el, child, prepend) { if (prepend) { var first = el.childNodes[0]; el.insertBefore(child, first); } else { el.appendChild(child); } } function insertContent(parent, child, prepend) { var str = isString(child); if (!str && child.length) { each(child, function (v) { return insertContent(parent, v, prepend); }); return; } each(parent, str ? function (v) { return v.insertAdjacentHTML(prepend ? "afterbegin" : "beforeend", child); } : function (v, i) { return insertElement(v, i === 0 ? child : child.cloneNode(true), prepend); }); } fn.extend({ after: function (selector) { cash(selector).insertAfter(this); return this; }, append: function (content) { insertContent(this, content); return this; }, appendTo: function (parent) { insertContent(cash(parent), this); return this; }, before: function (selector) { cash(selector).insertBefore(this); return this; }, clone: function () { return cash(this.map(function (v) { return v.cloneNode(true); })); }, empty: function () { this.html(""); return this; }, html: function (content) { if (content === undefined) { return this[0].innerHTML; } var source = content.nodeType ? content[0].outerHTML : content; return this.each(function (v) { return v.innerHTML = source; }); }, insertAfter: function (selector) { var _this = this; cash(selector).each(function (el, i) { var parent = el.parentNode, sibling = el.nextSibling; _this.each(function (v) { parent.insertBefore(i === 0 ? v : v.cloneNode(true), sibling); }); }); return this; }, insertBefore: function (selector) { var _this2 = this; cash(selector).each(function (el, i) { var parent = el.parentNode; _this2.each(function (v) { parent.insertBefore(i === 0 ? v : v.cloneNode(true), el); }); }); return this; }, prepend: function (content) { insertContent(this, content, true); return this; }, prependTo: function (parent) { insertContent(cash(parent), this, true); return this; }, remove: function () { return this.each(function (v) { if (!!v.parentNode) { return v.parentNode.removeChild(v); } }); }, text: function (content) { if (content === undefined) { return this[0].textContent; } return this.each(function (v) { return v.textContent = content; }); } }); var docEl = doc.documentElement; fn.extend({ position: function () { var el = this[0]; return { left: el.offsetLeft, top: el.offsetTop }; }, offset: function () { var rect = this[0].getBoundingClientRect(); return { top: rect.top + win.pageYOffset - docEl.clientTop, left: rect.left + win.pageXOffset - docEl.clientLeft }; }, offsetParent: function () { return cash(this[0].offsetParent); } }); fn.extend({ children: function (selector) { var elems = []; this.each(function (el) { push.apply(elems, el.children); }); elems = unique(elems); return !selector ? elems : elems.filter(function (v) { return matches(v, selector); }); }, closest: function (selector) { if (!selector || this.length < 1) { return cash(); } if (this.is(selector)) { return this.filter(selector); } return this.parent().closest(selector); }, is: function (selector) { if (!selector) { return false; } var match = false, comparator = getCompareFunction(selector); this.each(function (el) { match = comparator(el, selector); return !match; }); return match; }, find: function (selector) { if (!selector || selector.nodeType) { return cash(selector && this.has(selector).length ? selector : null); } var elems = []; this.each(function (el) { push.apply(elems, find(selector, el)); }); return unique(elems); }, has: function (selector) { var comparator = isString(selector) ? function (el) { return find(selector, el).length !== 0; } : function (el) { return el.contains(selector); }; return this.filter(comparator); }, next: function () { return cash(this[0].nextElementSibling); }, not: function (selector) { if (!selector) { return this; } var comparator = getCompareFunction(selector); return this.filter(function (el) { return !comparator(el, selector); }); }, parent: function () { var result = []; this.each(function (item) { if (item && item.parentNode) { result.push(item.parentNode); } }); return unique(result); }, parents: function (selector) { var last, result = []; this.each(function (item) { last = item; while (last && last.parentNode && last !== doc.body.parentNode) { last = last.parentNode; if (!selector || selector && matches(last, selector)) { result.push(last); } } }); return unique(result); }, prev: function () { return cash(this[0].previousElementSibling); }, siblings: function (selector) { var collection = this.parent().children(selector), el = this[0]; return collection.filter(function (i) { return i !== el; }); } }); return cash; }); ; var Component = function () { /** * Generic constructor for all components * @constructor * @param {Element} el * @param {Object} options */ function Component(classDef, el, options) { _classCallCheck(this, Component); // Display error if el is valid HTML Element if (!(el instanceof Element)) { console.error(Error(el + ' is not an HTML Element')); } // If exists, destroy and reinitialize in child var ins = classDef.getInstance(el); if (!!ins) { ins.destroy(); } this.el = el; this.$el = cash(el); } /** * Initializes components * @param {class} classDef * @param {Element | NodeList | jQuery} els * @param {Object} options */ _createClass(Component, null, [{ key: "init", value: function init(classDef, els, options) { var instances = null; if (els instanceof Element) { instances = new classDef(els, options); } else if (!!els && (els.jquery || els.cash || els instanceof NodeList)) { var instancesArr = []; for (var i = 0; i < els.length; i++) { instancesArr.push(new classDef(els[i], options)); } instances = instancesArr; } return instances; } }]); return Component; }(); ; // Required for Meteor package, the use of window prevents export by Meteor (function (window) { if (window.Package) { M = {}; } else { window.M = {}; } // Check for jQuery M.jQueryLoaded = !!window.jQuery; })(window); // AMD if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return M; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); // Common JS } else {} M.version = '1.0.0'; M.keys = { TAB: 9, ENTER: 13, ESC: 27, ARROW_UP: 38, ARROW_DOWN: 40 }; /** * TabPress Keydown handler */ M.tabPressed = false; M.keyDown = false; var docHandleKeydown = function (e) { M.keyDown = true; if (e.which === M.keys.TAB || e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) { M.tabPressed = true; } }; var docHandleKeyup = function (e) { M.keyDown = false; if (e.which === M.keys.TAB || e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) { M.tabPressed = false; } }; var docHandleFocus = function (e) { if (M.keyDown) { document.body.classList.add('keyboard-focused'); } }; var docHandleBlur = function (e) { document.body.classList.remove('keyboard-focused'); }; document.addEventListener('keydown', docHandleKeydown, true); document.addEventListener('keyup', docHandleKeyup, true); document.addEventListener('focus', docHandleFocus, true); document.addEventListener('blur', docHandleBlur, true); /** * Initialize jQuery wrapper for plugin * @param {Class} plugin javascript class * @param {string} pluginName jQuery plugin name * @param {string} classRef Class reference name */ M.initializeJqueryWrapper = function (plugin, pluginName, classRef) { jQuery.fn[pluginName] = function (methodOrOptions) { // Call plugin method if valid method name is passed in if (plugin.prototype[methodOrOptions]) { var params = Array.prototype.slice.call(arguments, 1); // Getter methods if (methodOrOptions.slice(0, 3) === 'get') { var instance = this.first()[0][classRef]; return instance[methodOrOptions].apply(instance, params); } // Void methods return this.each(function () { var instance = this[classRef]; instance[methodOrOptions].apply(instance, params); }); // Initialize plugin if options or no argument is passed in } else if (typeof methodOrOptions === 'object' || !methodOrOptions) { plugin.init(this, arguments[0]); return this; } // Return error if an unrecognized method name is passed in jQuery.error("Method " + methodOrOptions + " does not exist on jQuery." + pluginName); }; }; /** * Automatically initialize components * @param {Element} context DOM Element to search within for components */ M.AutoInit = function (context) { // Use document.body if no context is given var root = !!context ? context : document.body; var registry = { Autocomplete: root.querySelectorAll('.autocomplete:not(.no-autoinit)'), Carousel: root.querySelectorAll('.carousel:not(.no-autoinit)'), Chips: root.querySelectorAll('.chips:not(.no-autoinit)'), Collapsible: root.querySelectorAll('.collapsible:not(.no-autoinit)'), Datepicker: root.querySelectorAll('.datepicker:not(.no-autoinit)'), Dropdown: root.querySelectorAll('.dropdown-trigger:not(.no-autoinit)'), Materialbox: root.querySelectorAll('.materialboxed:not(.no-autoinit)'), Modal: root.querySelectorAll('.modal:not(.no-autoinit)'), Parallax: root.querySelectorAll('.parallax:not(.no-autoinit)'), Pushpin: root.querySelectorAll('.pushpin:not(.no-autoinit)'), ScrollSpy: root.querySelectorAll('.scrollspy:not(.no-autoinit)'), FormSelect: root.querySelectorAll('select:not(.no-autoinit)'), Sidenav: root.querySelectorAll('.sidenav:not(.no-autoinit)'), Tabs: root.querySelectorAll('.tabs:not(.no-autoinit)'), TapTarget: root.querySelectorAll('.tap-target:not(.no-autoinit)'), Timepicker: root.querySelectorAll('.timepicker:not(.no-autoinit)'), Tooltip: root.querySelectorAll('.tooltipped:not(.no-autoinit)'), FloatingActionButton: root.querySelectorAll('.fixed-action-btn:not(.no-autoinit)') }; for (var pluginName in registry) { var plugin = M[pluginName]; plugin.init(registry[pluginName]); } }; /** * Generate approximated selector string for a jQuery object * @param {jQuery} obj jQuery object to be parsed * @returns {string} */ M.objectSelectorString = function (obj) { var tagStr = obj.prop('tagName') || ''; var idStr = obj.attr('id') || ''; var classStr = obj.attr('class') || ''; return (tagStr + idStr + classStr).replace(/\s/g, ''); }; // Unique Random ID M.guid = function () { function s4() { return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); } return function () { return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); }; }(); /** * Escapes hash from special characters * @param {string} hash String returned from this.hash * @returns {string} */ M.escapeHash = function (hash) { return hash.replace(/(:|\.|\[|\]|,|=|\/)/g, '\\$1'); }; M.elementOrParentIsFixed = function (element) { var $element = $(element); var $checkElements = $element.add($element.parents()); var isFixed = false; $checkElements.each(function () { if ($(this).css('position') === 'fixed') { isFixed = true; return false; } }); return isFixed; }; /** * @typedef {Object} Edges * @property {Boolean} top If the top edge was exceeded * @property {Boolean} right If the right edge was exceeded * @property {Boolean} bottom If the bottom edge was exceeded * @property {Boolean} left If the left edge was exceeded */ /** * @typedef {Object} Bounding * @property {Number} left left offset coordinate * @property {Number} top top offset coordinate * @property {Number} width * @property {Number} height */ /** * Escapes hash from special characters * @param {Element} container Container element that acts as the boundary * @param {Bounding} bounding element bounding that is being checked * @param {Number} offset offset from edge that counts as exceeding * @returns {Edges} */ M.checkWithinContainer = function (container, bounding, offset) { var edges = { top: false, right: false, bottom: false, left: false }; var containerRect = container.getBoundingClientRect(); // If body element is smaller than viewport, use viewport height instead. var containerBottom = container === document.body ? Math.max(containerRect.bottom, window.innerHeight) : containerRect.bottom; var scrollLeft = container.scrollLeft; var scrollTop = container.scrollTop; var scrolledX = bounding.left - scrollLeft; var scrolledY = bounding.top - scrollTop; // Check for container and viewport for each edge if (scrolledX < containerRect.left + offset || scrolledX < offset) { edges.left = true; } if (scrolledX + bounding.width > containerRect.right - offset || scrolledX + bounding.width > window.innerWidth - offset) { edges.right = true; } if (scrolledY < containerRect.top + offset || scrolledY < offset) { edges.top = true; } if (scrolledY + bounding.height > containerBottom - offset || scrolledY + bounding.height > window.innerHeight - offset) { edges.bottom = true; } return edges; }; M.checkPossibleAlignments = function (el, container, bounding, offset) { var canAlign = { top: true, right: true, bottom: true, left: true, spaceOnTop: null, spaceOnRight: null, spaceOnBottom: null, spaceOnLeft: null }; var containerAllowsOverflow = getComputedStyle(container).overflow === 'visible'; var containerRect = container.getBoundingClientRect(); var containerHeight = Math.min(containerRect.height, window.innerHeight); var containerWidth = Math.min(containerRect.width, window.innerWidth); var elOffsetRect = el.getBoundingClientRect(); var scrollLeft = container.scrollLeft; var scrollTop = container.scrollTop; var scrolledX = bounding.left - scrollLeft; var scrolledYTopEdge = bounding.top - scrollTop; var scrolledYBottomEdge = bounding.top + elOffsetRect.height - scrollTop; // Check for container and viewport for left canAlign.spaceOnRight = !containerAllowsOverflow ? containerWidth - (scrolledX + bounding.width) : window.innerWidth - (elOffsetRect.left + bounding.width); if (canAlign.spaceOnRight < 0) { canAlign.left = false; } // Check for container and viewport for Right canAlign.spaceOnLeft = !containerAllowsOverflow ? scrolledX - bounding.width + elOffsetRect.width : elOffsetRect.right - bounding.width; if (canAlign.spaceOnLeft < 0) { canAlign.right = false; } // Check for container and viewport for Top canAlign.spaceOnBottom = !containerAllowsOverflow ? containerHeight - (scrolledYTopEdge + bounding.height + offset) : window.innerHeight - (elOffsetRect.top + bounding.height + offset); if (canAlign.spaceOnBottom < 0) { canAlign.top = false; } // Check for container and viewport for Bottom canAlign.spaceOnTop = !containerAllowsOverflow ? scrolledYBottomEdge - (bounding.height - offset) : elOffsetRect.bottom - (bounding.height + offset); if (canAlign.spaceOnTop < 0) { canAlign.bottom = false; } return canAlign; }; M.getOverflowParent = function (element) { if (element == null) { return null; } if (element === document.body || getComputedStyle(element).overflow !== 'visible') { return element; } return M.getOverflowParent(element.parentElement); }; /** * Gets id of component from a trigger * @param {Element} trigger trigger * @returns {string} */ M.getIdFromTrigger = function (trigger) { var id = trigger.getAttribute('data-target'); if (!id) { id = trigger.getAttribute('href'); if (id) { id = id.slice(1); } else { id = ''; } } return id; }; /** * Multi browser support for document scroll top * @returns {Number} */ M.getDocumentScrollTop = function () { return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; }; /** * Multi browser support for document scroll left * @returns {Number} */ M.getDocumentScrollLeft = function () { return window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; }; /** * @typedef {Object} Edges * @property {Boolean} top If the top edge was exceeded * @property {Boolean} right If the right edge was exceeded * @property {Boolean} bottom If the bottom edge was exceeded * @property {Boolean} left If the left edge was exceeded */ /** * @typedef {Object} Bounding * @property {Number} left left offset coordinate * @property {Number} top top offset coordinate * @property {Number} width * @property {Number} height */ /** * Get time in ms * @license https://raw.github.com/jashkenas/underscore/master/LICENSE * @type {function} * @return {number} */ var getTime = Date.now || function () { return new Date().getTime(); }; /** * Returns a function, that, when invoked, will only be triggered at most once * during a given window of time. Normally, the throttled function will run * as much as it can, without ever going more than once per `wait` duration; * but if you'd like to disable the execution on the leading edge, pass * `{leading: false}`. To disable execution on the trailing edge, ditto. * @license https://raw.github.com/jashkenas/underscore/master/LICENSE * @param {function} func * @param {number} wait * @param {Object=} options * @returns {Function} */ M.throttle = function (func, wait, options) { var context = void 0, args = void 0, result = void 0; var timeout = null; var previous = 0; options || (options = {}); var later = function () { previous = options.leading === false ? 0 : getTime(); timeout = null; result = func.apply(context, args); context = args = null; }; return function () { var now = getTime(); if (!previous && options.leading === false) previous = now; var remaining = wait - (now - previous); context = this; args = arguments; if (remaining <= 0) { clearTimeout(timeout); timeout = null; previous = now; result = func.apply(context, args); context = args = null; } else if (!timeout && options.trailing !== false) { timeout = setTimeout(later, remaining); } return result; }; }; ; /* v2.2.0 2017 Julian Garnier Released under the MIT license */ var $jscomp = { scope: {} };$jscomp.defineProperty = "function" == typeof Object.defineProperties ? Object.defineProperty : function (e, r, p) { if (p.get || p.set) throw new TypeError("ES3 does not support getters and setters.");e != Array.prototype && e != Object.prototype && (e[r] = p.value); };$jscomp.getGlobal = function (e) { return "undefined" != typeof window && window === e ? e : "undefined" != typeof global && null != global ? global : e; };$jscomp.global = $jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX = "jscomp_symbol_"; $jscomp.initSymbol = function () { $jscomp.initSymbol = function () {};$jscomp.global.Symbol || ($jscomp.global.Symbol = $jscomp.Symbol); };$jscomp.symbolCounter_ = 0;$jscomp.Symbol = function (e) { return $jscomp.SYMBOL_PREFIX + (e || "") + $jscomp.symbolCounter_++; }; $jscomp.initSymbolIterator = function () { $jscomp.initSymbol();var e = $jscomp.global.Symbol.iterator;e || (e = $jscomp.global.Symbol.iterator = $jscomp.global.Symbol("iterator"));"function" != typeof Array.prototype[e] && $jscomp.defineProperty(Array.prototype, e, { configurable: !0, writable: !0, value: function () { return $jscomp.arrayIterator(this); } });$jscomp.initSymbolIterator = function () {}; };$jscomp.arrayIterator = function (e) { var r = 0;return $jscomp.iteratorPrototype(function () { return r < e.length ? { done: !1, value: e[r++] } : { done: !0 }; }); }; $jscomp.iteratorPrototype = function (e) { $jscomp.initSymbolIterator();e = { next: e };e[$jscomp.global.Symbol.iterator] = function () { return this; };return e; };$jscomp.array = $jscomp.array || {};$jscomp.iteratorFromArray = function (e, r) { $jscomp.initSymbolIterator();e instanceof String && (e += "");var p = 0, m = { next: function () { if (p < e.length) { var u = p++;return { value: r(u, e[u]), done: !1 }; }m.next = function () { return { done: !0, value: void 0 }; };return m.next(); } };m[Symbol.iterator] = function () { return m; };return m; }; $jscomp.polyfill = function (e, r, p, m) { if (r) { p = $jscomp.global;e = e.split(".");for (m = 0; m < e.length - 1; m++) { var u = e[m];u in p || (p[u] = {});p = p[u]; }e = e[e.length - 1];m = p[e];r = r(m);r != m && null != r && $jscomp.defineProperty(p, e, { configurable: !0, writable: !0, value: r }); } };$jscomp.polyfill("Array.prototype.keys", function (e) { return e ? e : function () { return $jscomp.iteratorFromArray(this, function (e) { return e; }); }; }, "es6-impl", "es3");var $jscomp$this = this; (function (r) { M.anime = r(); })(function () { function e(a) { if (!h.col(a)) try { return document.querySelectorAll(a); } catch (c) {} }function r(a, c) { for (var d = a.length, b = 2 <= arguments.length ? arguments[1] : void 0, f = [], n = 0; n < d; n++) { if (n in a) { var k = a[n];c.call(b, k, n, a) && f.push(k); } }return f; }function p(a) { return a.reduce(function (a, d) { return a.concat(h.arr(d) ? p(d) : d); }, []); }function m(a) { if (h.arr(a)) return a; h.str(a) && (a = e(a) || a);return a instanceof NodeList || a instanceof HTMLCollection ? [].slice.call(a) : [a]; }function u(a, c) { return a.some(function (a) { return a === c; }); }function C(a) { var c = {}, d;for (d in a) { c[d] = a[d]; }return c; }function D(a, c) { var d = C(a), b;for (b in a) { d[b] = c.hasOwnProperty(b) ? c[b] : a[b]; }return d; }function z(a, c) { var d = C(a), b;for (b in c) { d[b] = h.und(a[b]) ? c[b] : a[b]; }return d; }function T(a) { a = a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (a, c, d, k) { return c + c + d + d + k + k; });var c = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a); a = parseInt(c[1], 16);var d = parseInt(c[2], 16), c = parseInt(c[3], 16);return "rgba(" + a + "," + d + "," + c + ",1)"; }function U(a) { function c(a, c, b) { 0 > b && (b += 1);1 < b && --b;return b < 1 / 6 ? a + 6 * (c - a) * b : .5 > b ? c : b < 2 / 3 ? a + (c - a) * (2 / 3 - b) * 6 : a; }var d = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a = parseInt(d[1]) / 360;var b = parseInt(d[2]) / 100, f = parseInt(d[3]) / 100, d = d[4] || 1;if (0 == b) f = b = a = f;else { var n = .5 > f ? f * (1 + b) : f + b - f * b, k = 2 * f - n, f = c(k, n, a + 1 / 3), b = c(k, n, a);a = c(k, n, a - 1 / 3); }return "rgba(" + 255 * f + "," + 255 * b + "," + 255 * a + "," + d + ")"; }function y(a) { if (a = /([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a)) return a[2]; }function V(a) { if (-1 < a.indexOf("translate") || "perspective" === a) return "px";if (-1 < a.indexOf("rotate") || -1 < a.indexOf("skew")) return "deg"; }function I(a, c) { return h.fnc(a) ? a(c.target, c.id, c.total) : a; }function E(a, c) { if (c in a.style) return getComputedStyle(a).getPropertyValue(c.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()) || "0"; }function J(a, c) { if (h.dom(a) && u(W, c)) return "transform";if (h.dom(a) && (a.getAttribute(c) || h.svg(a) && a[c])) return "attribute";if (h.dom(a) && "transform" !== c && E(a, c)) return "css";if (null != a[c]) return "object"; }function X(a, c) { var d = V(c), d = -1 < c.indexOf("scale") ? 1 : 0 + d;a = a.style.transform;if (!a) return d;for (var b = [], f = [], n = [], k = /(\w+)\((.+?)\)/g; b = k.exec(a);) { f.push(b[1]), n.push(b[2]); }a = r(n, function (a, b) { return f[b] === c; });return a.length ? a[0] : d; }function K(a, c) { switch (J(a, c)) {case "transform": return X(a, c);case "css": return E(a, c);case "attribute": return a.getAttribute(c);}return a[c] || 0; }function L(a, c) { var d = /^(\*=|\+=|-=)/.exec(a);if (!d) return a;var b = y(a) || 0;c = parseFloat(c);a = parseFloat(a.replace(d[0], ""));switch (d[0][0]) {case "+": return c + a + b;case "-": return c - a + b;case "*": return c * a + b;} }function F(a, c) { return Math.sqrt(Math.pow(c.x - a.x, 2) + Math.pow(c.y - a.y, 2)); }function M(a) { a = a.points;for (var c = 0, d, b = 0; b < a.numberOfItems; b++) { var f = a.getItem(b);0 < b && (c += F(d, f));d = f; }return c; }function N(a) { if (a.getTotalLength) return a.getTotalLength();switch (a.tagName.toLowerCase()) {case "circle": return 2 * Math.PI * a.getAttribute("r");case "rect": return 2 * a.getAttribute("width") + 2 * a.getAttribute("height");case "line": return F({ x: a.getAttribute("x1"), y: a.getAttribute("y1") }, { x: a.getAttribute("x2"), y: a.getAttribute("y2") });case "polyline": return M(a);case "polygon": var c = a.points;return M(a) + F(c.getItem(c.numberOfItems - 1), c.getItem(0));} }function Y(a, c) { function d(b) { b = void 0 === b ? 0 : b;return a.el.getPointAtLength(1 <= c + b ? c + b : 0); }var b = d(), f = d(-1), n = d(1);switch (a.property) {case "x": return b.x;case "y": return b.y; case "angle": return 180 * Math.atan2(n.y - f.y, n.x - f.x) / Math.PI;} }function O(a, c) { var d = /-?\d*\.?\d+/g, b;b = h.pth(a) ? a.totalLength : a;if (h.col(b)) { if (h.rgb(b)) { var f = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(b);b = f ? "rgba(" + f[1] + ",1)" : b; } else b = h.hex(b) ? T(b) : h.hsl(b) ? U(b) : void 0; } else f = (f = y(b)) ? b.substr(0, b.length - f.length) : b, b = c && !/\s/g.test(b) ? f + c : f;b += "";return { original: b, numbers: b.match(d) ? b.match(d).map(Number) : [0], strings: h.str(a) || c ? b.split(d) : [] }; }function P(a) { a = a ? p(h.arr(a) ? a.map(m) : m(a)) : [];return r(a, function (a, d, b) { return b.indexOf(a) === d; }); }function Z(a) { var c = P(a);return c.map(function (a, b) { return { target: a, id: b, total: c.length }; }); }function aa(a, c) { var d = C(c);if (h.arr(a)) { var b = a.length;2 !== b || h.obj(a[0]) ? h.fnc(c.duration) || (d.duration = c.duration / b) : a = { value: a }; }return m(a).map(function (a, b) { b = b ? 0 : c.delay;a = h.obj(a) && !h.pth(a) ? a : { value: a };h.und(a.delay) && (a.delay = b);return a; }).map(function (a) { return z(a, d); }); }function ba(a, c) { var d = {}, b;for (b in a) { var f = I(a[b], c);h.arr(f) && (f = f.map(function (a) { return I(a, c); }), 1 === f.length && (f = f[0]));d[b] = f; }d.duration = parseFloat(d.duration);d.delay = parseFloat(d.delay);return d; }function ca(a) { return h.arr(a) ? A.apply(this, a) : Q[a]; }function da(a, c) { var d;return a.tweens.map(function (b) { b = ba(b, c);var f = b.value, e = K(c.target, a.name), k = d ? d.to.original : e, k = h.arr(f) ? f[0] : k, w = L(h.arr(f) ? f[1] : f, k), e = y(w) || y(k) || y(e);b.from = O(k, e);b.to = O(w, e);b.start = d ? d.end : a.offset;b.end = b.start + b.delay + b.duration;b.easing = ca(b.easing);b.elasticity = (1E3 - Math.min(Math.max(b.elasticity, 1), 999)) / 1E3;b.isPath = h.pth(f);b.isColor = h.col(b.from.original);b.isColor && (b.round = 1);return d = b; }); }function ea(a, c) { return r(p(a.map(function (a) { return c.map(function (b) { var c = J(a.target, b.name);if (c) { var d = da(b, a);b = { type: c, property: b.name, animatable: a, tweens: d, duration: d[d.length - 1].end, delay: d[0].delay }; } else b = void 0;return b; }); })), function (a) { return !h.und(a); }); }function R(a, c, d, b) { var f = "delay" === a;return c.length ? (f ? Math.min : Math.max).apply(Math, c.map(function (b) { return b[a]; })) : f ? b.delay : d.offset + b.delay + b.duration; }function fa(a) { var c = D(ga, a), d = D(S, a), b = Z(a.targets), f = [], e = z(c, d), k;for (k in a) { e.hasOwnProperty(k) || "targets" === k || f.push({ name: k, offset: e.offset, tweens: aa(a[k], d) }); }a = ea(b, f);return z(c, { children: [], animatables: b, animations: a, duration: R("duration", a, c, d), delay: R("delay", a, c, d) }); }function q(a) { function c() { return window.Promise && new Promise(function (a) { return p = a; }); }function d(a) { return g.reversed ? g.duration - a : a; }function b(a) { for (var b = 0, c = {}, d = g.animations, f = d.length; b < f;) { var e = d[b], k = e.animatable, h = e.tweens, n = h.length - 1, l = h[n];n && (l = r(h, function (b) { return a < b.end; })[0] || l);for (var h = Math.min(Math.max(a - l.start - l.delay, 0), l.duration) / l.duration, w = isNaN(h) ? 1 : l.easing(h, l.elasticity), h = l.to.strings, p = l.round, n = [], m = void 0, m = l.to.numbers.length, t = 0; t < m; t++) { var x = void 0, x = l.to.numbers[t], q = l.from.numbers[t], x = l.isPath ? Y(l.value, w * x) : q + w * (x - q);p && (l.isColor && 2 < t || (x = Math.round(x * p) / p));n.push(x); }if (l = h.length) for (m = h[0], w = 0; w < l; w++) { p = h[w + 1], t = n[w], isNaN(t) || (m = p ? m + (t + p) : m + (t + " ")); } else m = n[0];ha[e.type](k.target, e.property, m, c, k.id);e.currentValue = m;b++; }if (b = Object.keys(c).length) for (d = 0; d < b; d++) { H || (H = E(document.body, "transform") ? "transform" : "-webkit-transform"), g.animatables[d].target.style[H] = c[d].join(" "); }g.currentTime = a;g.progress = a / g.duration * 100; }function f(a) { if (g[a]) g[a](g); }function e() { g.remaining && !0 !== g.remaining && g.remaining--; }function k(a) { var k = g.duration, n = g.offset, w = n + g.delay, r = g.currentTime, x = g.reversed, q = d(a);if (g.children.length) { var u = g.children, v = u.length; if (q >= g.currentTime) for (var G = 0; G < v; G++) { u[G].seek(q); } else for (; v--;) { u[v].seek(q); } }if (q >= w || !k) g.began || (g.began = !0, f("begin")), f("run");if (q > n && q < k) b(q);else if (q <= n && 0 !== r && (b(0), x && e()), q >= k && r !== k || !k) b(k), x || e();f("update");a >= k && (g.remaining ? (t = h, "alternate" === g.direction && (g.reversed = !g.reversed)) : (g.pause(), g.completed || (g.completed = !0, f("complete"), "Promise" in window && (p(), m = c()))), l = 0); }a = void 0 === a ? {} : a;var h, t, l = 0, p = null, m = c(), g = fa(a);g.reset = function () { var a = g.direction, c = g.loop;g.currentTime = 0;g.progress = 0;g.paused = !0;g.began = !1;g.completed = !1;g.reversed = "reverse" === a;g.remaining = "alternate" === a && 1 === c ? 2 : c;b(0);for (a = g.children.length; a--;) { g.children[a].reset(); } };g.tick = function (a) { h = a;t || (t = h);k((l + h - t) * q.speed); };g.seek = function (a) { k(d(a)); };g.pause = function () { var a = v.indexOf(g);-1 < a && v.splice(a, 1);g.paused = !0; };g.play = function () { g.paused && (g.paused = !1, t = 0, l = d(g.currentTime), v.push(g), B || ia()); };g.reverse = function () { g.reversed = !g.reversed;t = 0;l = d(g.currentTime); };g.restart = function () { g.pause(); g.reset();g.play(); };g.finished = m;g.reset();g.autoplay && g.play();return g; }var ga = { update: void 0, begin: void 0, run: void 0, complete: void 0, loop: 1, direction: "normal", autoplay: !0, offset: 0 }, S = { duration: 1E3, delay: 0, easing: "easeOutElastic", elasticity: 500, round: 0 }, W = "translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "), H, h = { arr: function (a) { return Array.isArray(a); }, obj: function (a) { return -1 < Object.prototype.toString.call(a).indexOf("Object"); }, pth: function (a) { return h.obj(a) && a.hasOwnProperty("totalLength"); }, svg: function (a) { return a instanceof SVGElement; }, dom: function (a) { return a.nodeType || h.svg(a); }, str: function (a) { return "string" === typeof a; }, fnc: function (a) { return "function" === typeof a; }, und: function (a) { return "undefined" === typeof a; }, hex: function (a) { return (/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a) ); }, rgb: function (a) { return (/^rgb/.test(a) ); }, hsl: function (a) { return (/^hsl/.test(a) ); }, col: function (a) { return h.hex(a) || h.rgb(a) || h.hsl(a); } }, A = function () { function a(a, d, b) { return (((1 - 3 * b + 3 * d) * a + (3 * b - 6 * d)) * a + 3 * d) * a; }return function (c, d, b, f) { if (0 <= c && 1 >= c && 0 <= b && 1 >= b) { var e = new Float32Array(11);if (c !== d || b !== f) for (var k = 0; 11 > k; ++k) { e[k] = a(.1 * k, c, b); }return function (k) { if (c === d && b === f) return k;if (0 === k) return 0;if (1 === k) return 1;for (var h = 0, l = 1; 10 !== l && e[l] <= k; ++l) { h += .1; }--l;var l = h + (k - e[l]) / (e[l + 1] - e[l]) * .1, n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (.001 <= n) { for (h = 0; 4 > h; ++h) { n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (0 === n) break;var m = a(l, c, b) - k, l = l - m / n; }k = l; } else if (0 === n) k = l;else { var l = h, h = h + .1, g = 0;do { m = l + (h - l) / 2, n = a(m, c, b) - k, 0 < n ? h = m : l = m; } while (1e-7 < Math.abs(n) && 10 > ++g);k = m; }return a(k, d, f); }; } }; }(), Q = function () { function a(a, b) { return 0 === a || 1 === a ? a : -Math.pow(2, 10 * (a - 1)) * Math.sin(2 * (a - 1 - b / (2 * Math.PI) * Math.asin(1)) * Math.PI / b); }var c = "Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "), d = { In: [[.55, .085, .68, .53], [.55, .055, .675, .19], [.895, .03, .685, .22], [.755, .05, .855, .06], [.47, 0, .745, .715], [.95, .05, .795, .035], [.6, .04, .98, .335], [.6, -.28, .735, .045], a], Out: [[.25, .46, .45, .94], [.215, .61, .355, 1], [.165, .84, .44, 1], [.23, 1, .32, 1], [.39, .575, .565, 1], [.19, 1, .22, 1], [.075, .82, .165, 1], [.175, .885, .32, 1.275], function (b, c) { return 1 - a(1 - b, c); }], InOut: [[.455, .03, .515, .955], [.645, .045, .355, 1], [.77, 0, .175, 1], [.86, 0, .07, 1], [.445, .05, .55, .95], [1, 0, 0, 1], [.785, .135, .15, .86], [.68, -.55, .265, 1.55], function (b, c) { return .5 > b ? a(2 * b, c) / 2 : 1 - a(-2 * b + 2, c) / 2; }] }, b = { linear: A(.25, .25, .75, .75) }, f = {}, e;for (e in d) { f.type = e, d[f.type].forEach(function (a) { return function (d, f) { b["ease" + a.type + c[f]] = h.fnc(d) ? d : A.apply($jscomp$this, d); }; }(f)), f = { type: f.type }; }return b; }(), ha = { css: function (a, c, d) { return a.style[c] = d; }, attribute: function (a, c, d) { return a.setAttribute(c, d); }, object: function (a, c, d) { return a[c] = d; }, transform: function (a, c, d, b, f) { b[f] || (b[f] = []);b[f].push(c + "(" + d + ")"); } }, v = [], B = 0, ia = function () { function a() { B = requestAnimationFrame(c); }function c(c) { var b = v.length;if (b) { for (var d = 0; d < b;) { v[d] && v[d].tick(c), d++; }a(); } else cancelAnimationFrame(B), B = 0; }return a; }();q.version = "2.2.0";q.speed = 1;q.running = v;q.remove = function (a) { a = P(a);for (var c = v.length; c--;) { for (var d = v[c], b = d.animations, f = b.length; f--;) { u(a, b[f].animatable.target) && (b.splice(f, 1), b.length || d.pause()); } } };q.getValue = K;q.path = function (a, c) { var d = h.str(a) ? e(a)[0] : a, b = c || 100;return function (a) { return { el: d, property: a, totalLength: N(d) * (b / 100) }; }; };q.setDashoffset = function (a) { var c = N(a);a.setAttribute("stroke-dasharray", c);return c; };q.bezier = A;q.easings = Q;q.timeline = function (a) { var c = q(a);c.pause();c.duration = 0;c.add = function (d) { c.children.forEach(function (a) { a.began = !0;a.completed = !0; });m(d).forEach(function (b) { var d = z(b, D(S, a || {}));d.targets = d.targets || a.targets;b = c.duration;var e = d.offset;d.autoplay = !1;d.direction = c.direction;d.offset = h.und(e) ? b : L(e, b);c.began = !0;c.completed = !0;c.seek(d.offset);d = q(d);d.began = !0;d.completed = !0;d.duration > b && (c.duration = d.duration);c.children.push(d); });c.seek(0);c.reset();c.autoplay && c.restart();return c; };return c; };q.random = function (a, c) { return Math.floor(Math.random() * (c - a + 1)) + a; };return q; }); ;(function ($, anim) { 'use strict'; var _defaults = { accordion: true, onOpenStart: undefined, onOpenEnd: undefined, onCloseStart: undefined, onCloseEnd: undefined, inDuration: 300, outDuration: 300 }; /** * @class * */ var Collapsible = function (_Component) { _inherits(Collapsible, _Component); /** * Construct Collapsible instance * @constructor * @param {Element} el * @param {Object} options */ function Collapsible(el, options) { _classCallCheck(this, Collapsible); var _this3 = _possibleConstructorReturn(this, (Collapsible.__proto__ || Object.getPrototypeOf(Collapsible)).call(this, Collapsible, el, options)); _this3.el.M_Collapsible = _this3; /** * Options for the collapsible * @member Collapsible#options * @prop {Boolean} [accordion=false] - Type of the collapsible * @prop {Function} onOpenStart - Callback function called before collapsible is opened * @prop {Function} onOpenEnd - Callback function called after collapsible is opened * @prop {Function} onCloseStart - Callback function called before collapsible is closed * @prop {Function} onCloseEnd - Callback function called after collapsible is closed * @prop {Number} inDuration - Transition in duration in milliseconds. * @prop {Number} outDuration - Transition duration in milliseconds. */ _this3.options = $.extend({}, Collapsible.defaults, options); // Setup tab indices _this3.$headers = _this3.$el.children('li').children('.collapsible-header'); _this3.$headers.attr('tabindex', 0); _this3._setupEventHandlers(); // Open first active var $activeBodies = _this3.$el.children('li.active').children('.collapsible-body'); if (_this3.options.accordion) { // Handle Accordion $activeBodies.first().css('display', 'block'); } else { // Handle Expandables $activeBodies.css('display', 'block'); } return _this3; } _createClass(Collapsible, [{ key: "destroy", /** * Teardown component */ value: function destroy() { this._removeEventHandlers(); this.el.M_Collapsible = undefined; } /** * Setup Event Handlers */ }, { key: "_setupEventHandlers", value: function _setupEventHandlers() { var _this4 = this; this._handleCollapsibleClickBound = this._handleCollapsibleClick.bind(this); this._handleCollapsibleKeydownBound = this._handleCollapsibleKeydown.bind(this); this.el.addEventListener('click', this._handleCollapsibleClickBound); this.$headers.each(function (header) { header.addEventListener('keydown', _this4._handleCollapsibleKeydownBound); }); } /** * Remove Event Handlers */ }, { key: "_removeEventHandlers", value: function _removeEventHandlers() { var _this5 = this; this.el.removeEventListener('click', this._handleCollapsibleClickBound); this.$headers.each(function (header) { header.removeEventListener('keydown', _this5._handleCollapsibleKeydownBound); }); } /** * Handle Collapsible Click * @param {Event} e */ }, { key: "_handleCollapsibleClick", value: function _handleCollapsibleClick(e) { var $header = $(e.target).closest('.collapsible-header'); if (e.target && $header.length) { var $collapsible = $header.closest('.collapsible'); if ($collapsible[0] === this.el) { var $collapsibleLi = $header.closest('li'); var $collapsibleLis = $collapsible.children('li'); var isActive = $collapsibleLi[0].classList.contains('active'); var index = $collapsibleLis.index($collapsibleLi); if (isActive) { this.close(index); } else { this.open(index); } } } } /** * Handle Collapsible Keydown * @param {Event} e */ }, { key: "_handleCollapsibleKeydown", value: function _handleCollapsibleKeydown(e) { if (e.keyCode === 13) { this._handleCollapsibleClickBound(e); } } /** * Animate in collapsible slide * @param {Number} index - 0th index of slide */ }, { key: "_animateIn", value: function _animateIn(index) { var _this6 = this; var $collapsibleLi = this.$el.children('li').eq(index); if ($collapsibleLi.length) { var $body = $collapsibleLi.children('.collapsible-body'); anim.remove($body[0]); $body.css({ display: 'block', overflow: 'hidden', height: 0, paddingTop: '', paddingBottom: '' }); var pTop = $body.css('padding-top'); var pBottom = $body.css('padding-bottom'); var finalHeight = $body[0].scrollHeight; $body.css({ paddingTop: 0, paddingBottom: 0 }); anim({ targets: $body[0], height: finalHeight, paddingTop: pTop, paddingBottom: pBottom, duration: this.options.inDuration, easing: 'easeInOutCubic', complete: function (anim) { $body.css({ overflow: '', paddingTop: '', paddingBottom: '', height: '' }); // onOpenEnd callback if (typeof _this6.options.onOpenEnd === 'function') { _this6.options.onOpenEnd.call(_this6, $collapsibleLi[0]); } } }); } } /** * Animate out collapsible slide * @param {Number} index - 0th index of slide to open */ }, { key: "_animateOut", value: function _animateOut(index) { var _this7 = this; var $collapsibleLi = this.$el.children('li').eq(index); if ($collapsibleLi.length) { var $body = $collapsibleLi.children('.collapsible-body'); anim.remove($body[0]); $body.css('overflow', 'hidden'); anim({ targets: $body[0], height: 0, paddingTop: 0, paddingBottom: 0, duration: this.options.outDuration, easing: 'easeInOutCubic', complete: function () { $body.css({ height: '', overflow: '', padding: '', display: '' }); // onCloseEnd callback if (typeof _this7.options.onCloseEnd === 'function') { _this7.options.onCloseEnd.call(_this7, $collapsibleLi[0]); } } }); } } /** * Open Collapsible * @param {Number} index - 0th index of slide */ }, { key: "open", value: function open(index) { var _this8 = this; var $collapsibleLi = this.$el.children('li').eq(index); if ($collapsibleLi.length && !$collapsibleLi[0].classList.contains('active')) { // onOpenStart callback if (typeof this.options.onOpenStart === 'function') { this.options.onOpenStart.call(this, $collapsibleLi[0]); } // Handle accordion behavior if (this.options.accordion) { var $collapsibleLis = this.$el.children('li'); var $activeLis = this.$el.children('li.active'); $activeLis.each(function (el) { var index = $collapsibleLis.index($(el)); _this8.close(index); }); } // Animate in $collapsibleLi[0].classList.add('active'); this._animateIn(index); } } /** * Close Collapsible * @param {Number} index - 0th index of slide */ }, { key: "close", value: function close(index) { var $collapsibleLi = this.$el.children('li').eq(index); if ($collapsibleLi.length && $collapsibleLi[0].classList.contains('active')) { // onCloseStart callback if (typeof this.options.onCloseStart === 'function') { this.options.onCloseStart.call(this, $collapsibleLi[0]); } // Animate out $collapsibleLi[0].classList.remove('active'); this._animateOut(index); } } }], [{ key: "init", value: function init(els, options) { return _get(Collapsible.__proto__ || Object.getPrototypeOf(Collapsible), "init", this).call(this, this, els, options); } /** * Get Instance */ }, { key: "getInstance", value: function getInstance(el) { var domElem = !!el.jquery ? el[0] : el; return domElem.M_Collapsible; } }, { key: "defaults", get: function () { return _defaults; } }]); return Collapsible; }(Component); M.Collapsible = Collapsible; if (M.jQueryLoaded) { M.initializeJqueryWrapper(Collapsible, 'collapsible', 'M_Collapsible'); } })(cash, M.anime); ;(function ($, anim) { 'use strict'; var _defaults = { alignment: 'left', autoFocus: true, constrainWidth: true, container: null, coverTrigger: true, closeOnClick: true, hover: false, inDuration: 150, outDuration: 250, onOpenStart: null, onOpenEnd: null, onCloseStart: null, onCloseEnd: null, onItemClick: null }; /** * @class */ var Dropdown = function (_Component2) { _inherits(Dropdown, _Component2); function Dropdown(el, options) { _classCallCheck(this, Dropdown); var _this9 = _possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).call(this, Dropdown, el, options)); _this9.el.M_Dropdown = _this9; Dropdown._dropdowns.push(_this9); _this9.id = M.getIdFromTrigger(el); _this9.dropdownEl = document.getElementById(_this9.id); _this9.$dropdownEl = $(_this9.dropdownEl); /** * Options for the dropdown * @member Dropdown#options * @prop {String} [alignment='left'] - Edge which the dropdown is aligned to * @prop {Boolean} [autoFocus=true] - Automatically focus dropdown el for keyboard * @prop {Boolean} [constrainWidth=true] - Constrain width to width of the button * @prop {Element} container - Container element to attach dropdown to (optional) * @prop {Boolean} [coverTrigger=true] - Place dropdown over trigger * @prop {Boolean} [closeOnClick=true] - Close on click of dropdown item * @prop {Boolean} [hover=false] - Open dropdown on hover * @prop {Number} [inDuration=150] - Duration of open animation in ms * @prop {Number} [outDuration=250] - Duration of close animation in ms * @prop {Function} onOpenStart - Function called when dropdown starts opening * @prop {Function} onOpenEnd - Function called when dropdown finishes opening * @prop {Function} onCloseStart - Function called when dropdown starts closing * @prop {Function} onCloseEnd - Function called when dropdown finishes closing */ _this9.options = $.extend({}, Dropdown.defaults, options); /** * Describes open/close state of dropdown * @type {Boolean} */ _this9.isOpen = false; /** * Describes if dropdown content is scrollable * @type {Boolean} */ _this9.isScrollable = false; /** * Describes if touch moving on dropdown content * @type {Boolean} */ _this9.isTouchMoving = false; _this9.focusedIndex = -1; _this9.filterQuery = []; // Move dropdown-content after dropdown-trigger if (!!_this9.options.container) { $(_this9.options.container).append(_this9.dropdownEl); } else { _this9.$el.after(_this9.dropdownEl); } _this9._makeDropdownFocusable(); _this9._resetFilterQueryBound = _this9._resetFilterQuery.bind(_this9); _this9._handleDocumentClickBound = _this9._handleDocumentClick.bind(_this9); _this9._handleDocumentTouchmoveBound = _this9._handleDocumentTouchmove.bind(_this9); _this9._handleDropdownClickBound = _this9._handleDropdownClick.bind(_this9); _this9._handleDropdownKeydownBound = _this9._handleDropdownKeydown.bind(_this9); _this9._handleTriggerKeydownBound = _this9._handleTriggerKeydown.bind(_this9); _this9._setupEventHandlers(); return _this9; } _createClass(Dropdown, [{ key: "destroy", /** * Teardown component */ value: function destroy() { this._resetDropdownStyles(); this._removeEventHandlers(); Dropdown._dropdowns.splice(Dropdown._dropdowns.indexOf(this), 1); this.el.M_Dropdown = undefined; } /** * Setup Event Handlers */ }, { key: "_setupEventHandlers", value: function _setupEventHandlers() { // Trigger keydown handler this.el.addEventListener('keydown', this._handleTriggerKeydownBound); // Item click handler this.dropdownEl.addEventListener('click', this._handleDropdownClickBound); // Hover event handlers if (this.options.hover) { this._handleMouseEnterBound = this._handleMouseEnter.bind(this); this.el.addEventListener('mouseenter', this._handleMouseEnterBound); this._handleMouseLeaveBound = this._handleMouseLeave.bind(this); this.el.addEventListener('mouseleave', this._handleMouseLeaveBound); this.dropdownEl.addEventListener('mouseleave', this._handleMouseLeaveBound); // Click event handlers } else { this._handleClickBound = this._handleClick.bind(this); this.el.addEventListener('click', this._handleClickBound); } } /** * Remove Event Handlers */ }, { key: "_removeEventHandlers", value: function _removeEventHandlers() { this.el.removeEventListener('keydown', this._handleTriggerKeydownBound); this.dropdownEl.removeEventListener('click', this._handleDropdownClickBound); if (this.options.hover) { this.el.removeEventListener('mouseenter', this._handleMouseEnterBound); this.el.removeEventListener('mouseleave', this._handleMouseLeaveBound); this.dropdownEl.removeEventListener('mouseleave', this._handleMouseLeaveBound); } else { this.el.removeEventListener('click', this._handleClickBound); } } }, { key: "_setupTemporaryEventHandlers", value: function _setupTemporaryEventHandlers() { // Use capture phase event handler to prevent click document.body.addEventListener('click', this._handleDocumentClickBound, true); document.body.addEventListener('touchend', this._handleDocumentClickBound); document.body.addEventListener('touchmove', this._handleDocumentTouchmoveBound); this.dropdownEl.addEventListener('keydown', this._handleDropdownKeydownBound); } }, { key: "_removeTemporaryEventHandlers", value: function _removeTemporaryEventHandlers() { // Use capture phase event handler to prevent click document.body.removeEventListener('click', this._handleDocumentClickBound, true); document.body.removeEventListener('touchend', this._handleDocumentClickBound); document.body.removeEventListener('touchmove', this._handleDocumentTouchmoveBound); this.dropdownEl.removeEventListener('keydown', this._handleDropdownKeydownBound); } }, { key: "_handleClick", value: function _handleClick(e) { e.preventDefault(); this.open(); } }, { key: "_handleMouseEnter", value: function _handleMouseEnter() { this.open(); } }, { key: "_handleMouseLeave", value: function _handleMouseLeave(e) { var toEl = e.toElement || e.relatedTarget; var leaveToDropdownContent = !!$(toEl).closest('.dropdown-content').length; var leaveToActiveDropdownTrigger = false; var $closestTrigger = $(toEl).closest('.dropdown-trigger'); if ($closestTrigger.length && !!$closestTrigger[0].M_Dropdown && $closestTrigger[0].M_Dropdown.isOpen) { leaveToActiveDropdownTrigger = true; } // Close hover dropdown if mouse did not leave to either active dropdown-trigger or dropdown-content if (!leaveToActiveDropdownTrigger && !leaveToDropdownContent) { this.close(); } } }, { key: "_handleDocumentClick", value: function _handleDocumentClick(e) { var _this10 = this; var $target = $(e.target); if (this.options.closeOnClick && $target.closest('.dropdown-content').length && !this.isTouchMoving) { // isTouchMoving to check if scrolling on mobile. setTimeout(function () { _this10.close(); }, 0); } else if ($target.closest('.dropdown-trigger').length || !$target.closest('.dropdown-content').length) { setTimeout(function () { _this10.close(); }, 0); } this.isTouchMoving = false; } }, { key: "_handleTriggerKeydown", value: function _handleTriggerKeydown(e) { // ARROW DOWN OR ENTER WHEN SELECT IS CLOSED - open Dropdown if ((e.which === M.keys.ARROW_DOWN || e.which === M.keys.ENTER) && !this.isOpen) { e.preventDefault(); this.open(); } } /** * Handle Document Touchmove * @param {Event} e */ }, { key: "_handleDocumentTouchmove", value: function _handleDocumentTouchmove(e) { var $target = $(e.target); if ($target.closest('.dropdown-content').length) { this.isTouchMoving = true; } } /** * Handle Dropdown Click * @param {Event} e */ }, { key: "_handleDropdownClick", value: function _handleDropdownClick(e) { // onItemClick callback if (typeof this.options.onItemClick === 'function') { var itemEl = $(e.target).closest('li')[0]; this.options.onItemClick.call(this, itemEl); } } /** * Handle Dropdown Keydown * @param {Event} e */ }, { key: "_handleDropdownKeydown", value: function _handleDropdownKeydown(e) { if (e.which === M.keys.TAB) { e.preventDefault(); this.close(); // Navigate down dropdown list } else if ((e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) && this.isOpen) { e.preventDefault(); var direction = e.which === M.keys.ARROW_DOWN ? 1 : -1; var newFocusedIndex = this.focusedIndex; var foundNewIndex = false; do { newFocusedIndex = newFocusedIndex + direction; if (!!this.dropdownEl.children[newFocusedIndex] && this.dropdownEl.children[newFocusedIndex].tabIndex !== -1) { foundNewIndex = true; break; } } while (newFocusedIndex < this.dropdownEl.children.length && newFocusedIndex >= 0); if (foundNewIndex) { this.focusedIndex = newFocusedIndex; this._focusFocusedItem(); } // ENTER selects choice on focused item } else if (e.which === M.keys.ENTER && this.isOpen) { // Search for and ") + ''; } }, { key: "renderRow", value: function renderRow(days, isRTL, isRowSelected) { return '' + (isRTL ? days.reverse() : days).join('') + ''; } }, { key: "renderTable", value: function renderTable(opts, data, randId) { return '
' + this.renderHead(opts) + this.renderBody(data) + '
'; } }, { key: "renderHead", value: function renderHead(opts) { var i = void 0, arr = []; for (i = 0; i < 7; i++) { arr.push("" + this.renderDayName(opts, i, true) + ""); } return '' + (opts.isRTL ? arr.reverse() : arr).join('') + ''; } }, { key: "renderBody", value: function renderBody(rows) { return '' + rows.join('') + ''; } }, { key: "renderTitle", value: function renderTitle(instance, c, year, month, refYear, randId) { var i = void 0, j = void 0, arr = void 0, opts = this.options, isMinYear = year === opts.minYear, isMaxYear = year === opts.maxYear, html = '
', monthHtml = void 0, yearHtml = void 0, prev = true, next = true; for (arr = [], i = 0; i < 12; i++) { arr.push(''); } monthHtml = ''; if ($.isArray(opts.yearRange)) { i = opts.yearRange[0]; j = opts.yearRange[1] + 1; } else { i = year - opts.yearRange; j = 1 + year + opts.yearRange; } for (arr = []; i < j && i <= opts.maxYear; i++) { if (i >= opts.minYear) { arr.push(""); } } yearHtml = ""; var leftArrow = ''; html += ""; html += '
'; if (opts.showMonthAfterYear) { html += yearHtml + monthHtml; } else { html += monthHtml + yearHtml; } html += '
'; if (isMinYear && (month === 0 || opts.minMonth >= month)) { prev = false; } if (isMaxYear && (month === 11 || opts.maxMonth <= month)) { next = false; } var rightArrow = ''; html += ""; return html += '
'; } /** * refresh the HTML */ }, { key: "draw", value: function draw(force) { if (!this.isOpen && !force) { return; } var opts = this.options, minYear = opts.minYear, maxYear = opts.maxYear, minMonth = opts.minMonth, maxMonth = opts.maxMonth, html = '', randId = void 0; if (this._y <= minYear) { this._y = minYear; if (!isNaN(minMonth) && this._m < minMonth) { this._m = minMonth; } } if (this._y >= maxYear) { this._y = maxYear; if (!isNaN(maxMonth) && this._m > maxMonth) { this._m = maxMonth; } } randId = 'datepicker-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2); for (var c = 0; c < 1; c++) { this._renderDateDisplay(); html += this.renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId); } this.destroySelects(); this.calendarEl.innerHTML = html; // Init Materialize Select var yearSelect = this.calendarEl.querySelector('.orig-select-year'); var monthSelect = this.calendarEl.querySelector('.orig-select-month'); M.FormSelect.init(yearSelect, { classes: 'select-year', dropdownOptions: { container: document.body, constrainWidth: false } }); M.FormSelect.init(monthSelect, { classes: 'select-month', dropdownOptions: { container: document.body, constrainWidth: false } }); // Add change handlers for select yearSelect.addEventListener('change', this._handleYearChange.bind(this)); monthSelect.addEventListener('change', this._handleMonthChange.bind(this)); if (typeof this.options.onDraw === 'function') { this.options.onDraw(this); } } /** * Setup Event Handlers */ }, { key: "_setupEventHandlers", value: function _setupEventHandlers() { this._handleInputKeydownBound = this._handleInputKeydown.bind(this); this._handleInputClickBound = this._handleInputClick.bind(this); this._handleInputChangeBound = this._handleInputChange.bind(this); this._handleCalendarClickBound = this._handleCalendarClick.bind(this); this._finishSelectionBound = this._finishSelection.bind(this); this._handleMonthChange = this._handleMonthChange.bind(this); this._closeBound = this.close.bind(this); this.el.addEventListener('click', this._handleInputClickBound); this.el.addEventListener('keydown', this._handleInputKeydownBound); this.el.addEventListener('change', this._handleInputChangeBound); this.calendarEl.addEventListener('click', this._handleCalendarClickBound); this.doneBtn.addEventListener('click', this._finishSelectionBound); this.cancelBtn.addEventListener('click', this._closeBound); if (this.options.showClearBtn) { this._handleClearClickBound = this._handleClearClick.bind(this); this.clearBtn.addEventListener('click', this._handleClearClickBound); } } }, { key: "_setupVariables", value: function _setupVariables() { var _this56 = this; this.$modalEl = $(Datepicker._template); this.modalEl = this.$modalEl[0]; this.calendarEl = this.modalEl.querySelector('.datepicker-calendar'); this.yearTextEl = this.modalEl.querySelector('.year-text'); this.dateTextEl = this.modalEl.querySelector('.date-text'); if (this.options.showClearBtn) { this.clearBtn = this.modalEl.querySelector('.datepicker-clear'); } this.doneBtn = this.modalEl.querySelector('.datepicker-done'); this.cancelBtn = this.modalEl.querySelector('.datepicker-cancel'); this.formats = { d: function () { return _this56.date.getDate(); }, dd: function () { var d = _this56.date.getDate(); return (d < 10 ? '0' : '') + d; }, ddd: function () { return _this56.options.i18n.weekdaysShort[_this56.date.getDay()]; }, dddd: function () { return _this56.options.i18n.weekdays[_this56.date.getDay()]; }, m: function () { return _this56.date.getMonth() + 1; }, mm: function () { var m = _this56.date.getMonth() + 1; return (m < 10 ? '0' : '') + m; }, mmm: function () { return _this56.options.i18n.monthsShort[_this56.date.getMonth()]; }, mmmm: function () { return _this56.options.i18n.months[_this56.date.getMonth()]; }, yy: function () { return ('' + _this56.date.getFullYear()).slice(2); }, yyyy: function () { return _this56.date.getFullYear(); } }; } /** * Remove Event Handlers */ }, { key: "_removeEventHandlers", value: function _removeEventHandlers() { this.el.removeEventListener('click', this._handleInputClickBound); this.el.removeEventListener('keydown', this._handleInputKeydownBound); this.el.removeEventListener('change', this._handleInputChangeBound); this.calendarEl.removeEventListener('click', this._handleCalendarClickBound); } }, { key: "_handleInputClick", value: function _handleInputClick() { this.open(); } }, { key: "_handleInputKeydown", value: function _handleInputKeydown(e) { if (e.which === M.keys.ENTER) { e.preventDefault(); this.open(); } } }, { key: "_handleCalendarClick", value: function _handleCalendarClick(e) { if (!this.isOpen) { return; } var $target = $(e.target); if (!$target.hasClass('is-disabled')) { if ($target.hasClass('datepicker-day-button') && !$target.hasClass('is-empty') && !$target.parent().hasClass('is-disabled')) { this.setDate(new Date(e.target.getAttribute('data-year'), e.target.getAttribute('data-month'), e.target.getAttribute('data-day'))); if (this.options.autoClose) { this._finishSelection(); } } else if ($target.closest('.month-prev').length) { this.prevMonth(); } else if ($target.closest('.month-next').length) { this.nextMonth(); } } } }, { key: "_handleClearClick", value: function _handleClearClick() { this.date = null; this.setInputValue(); this.close(); } }, { key: "_handleMonthChange", value: function _handleMonthChange(e) { this.gotoMonth(e.target.value); } }, { key: "_handleYearChange", value: function _handleYearChange(e) { this.gotoYear(e.target.value); } /** * change view to a specific month (zero-index, e.g. 0: January) */ }, { key: "gotoMonth", value: function gotoMonth(month) { if (!isNaN(month)) { this.calendars[0].month = parseInt(month, 10); this.adjustCalendars(); } } /** * change view to a specific full year (e.g. "2012") */ }, { key: "gotoYear", value: function gotoYear(year) { if (!isNaN(year)) { this.calendars[0].year = parseInt(year, 10); this.adjustCalendars(); } } }, { key: "_handleInputChange", value: function _handleInputChange(e) { var date = void 0; // Prevent change event from being fired when triggered by the plugin if (e.firedBy === this) { return; } if (this.options.parse) { date = this.options.parse(this.el.value, this.options.format); } else { date = new Date(Date.parse(this.el.value)); } if (Datepicker._isDate(date)) { this.setDate(date); } } }, { key: "renderDayName", value: function renderDayName(opts, day, abbr) { day += opts.firstDay; while (day >= 7) { day -= 7; } return abbr ? opts.i18n.weekdaysAbbrev[day] : opts.i18n.weekdays[day]; } /** * Set input value to the selected date and close Datepicker */ }, { key: "_finishSelection", value: function _finishSelection() { this.setInputValue(); this.close(); } /** * Open Datepicker */ }, { key: "open", value: function open() { if (this.isOpen) { return; } this.isOpen = true; if (typeof this.options.onOpen === 'function') { this.options.onOpen.call(this); } this.draw(); this.modal.open(); return this; } /** * Close Datepicker */ }, { key: "close", value: function close() { if (!this.isOpen) { return; } this.isOpen = false; if (typeof this.options.onClose === 'function') { this.options.onClose.call(this); } this.modal.close(); return this; } }], [{ key: "init", value: function init(els, options) { return _get(Datepicker.__proto__ || Object.getPrototypeOf(Datepicker), "init", this).call(this, this, els, options); } }, { key: "_isDate", value: function _isDate(obj) { return (/Date/.test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime()) ); } }, { key: "_isWeekend", value: function _isWeekend(date) { var day = date.getDay(); return day === 0 || day === 6; } }, { key: "_setToStartOfDay", value: function _setToStartOfDay(date) { if (Datepicker._isDate(date)) date.setHours(0, 0, 0, 0); } }, { key: "_getDaysInMonth", value: function _getDaysInMonth(year, month) { return [31, Datepicker._isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; } }, { key: "_isLeapYear", value: function _isLeapYear(year) { // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951 return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; } }, { key: "_compareDates", value: function _compareDates(a, b) { // weak date comparison (use setToStartOfDay(date) to ensure correct result) return a.getTime() === b.getTime(); } }, { key: "_setToStartOfDay", value: function _setToStartOfDay(date) { if (Datepicker._isDate(date)) date.setHours(0, 0, 0, 0); } /** * Get Instance */ }, { key: "getInstance", value: function getInstance(el) { var domElem = !!el.jquery ? el[0] : el; return domElem.M_Datepicker; } }, { key: "defaults", get: function () { return _defaults; } }]); return Datepicker; }(Component); Datepicker._template = [''].join(''); M.Datepicker = Datepicker; if (M.jQueryLoaded) { M.initializeJqueryWrapper(Datepicker, 'datepicker', 'M_Datepicker'); } })(cash); ;(function ($) { 'use strict'; var _defaults = { dialRadius: 135, outerRadius: 105, innerRadius: 70, tickRadius: 20, duration: 350, container: null, defaultTime: 'now', // default time, 'now' or '13:14' e.g. fromNow: 0, // Millisecond offset from the defaultTime showClearBtn: false, // internationalization i18n: { cancel: 'Cancel', clear: 'Clear', done: 'Ok' }, autoClose: false, // auto close when minute is selected twelveHour: true, // change to 12 hour AM/PM clock from 24 hour vibrate: true, // vibrate the device when dragging clock hand // Callbacks onOpenStart: null, onOpenEnd: null, onCloseStart: null, onCloseEnd: null, onSelect: null }; /** * @class * */ var Timepicker = function (_Component16) { _inherits(Timepicker, _Component16); function Timepicker(el, options) { _classCallCheck(this, Timepicker); var _this57 = _possibleConstructorReturn(this, (Timepicker.__proto__ || Object.getPrototypeOf(Timepicker)).call(this, Timepicker, el, options)); _this57.el.M_Timepicker = _this57; _this57.options = $.extend({}, Timepicker.defaults, options); _this57.id = M.guid(); _this57._insertHTMLIntoDOM(); _this57._setupModal(); _this57._setupVariables(); _this57._setupEventHandlers(); _this57._clockSetup(); _this57._pickerSetup(); return _this57; } _createClass(Timepicker, [{ key: "destroy", /** * Teardown component */ value: function destroy() { this._removeEventHandlers(); this.modal.destroy(); $(this.modalEl).remove(); this.el.M_Timepicker = undefined; } /** * Setup Event Handlers */ }, { key: "_setupEventHandlers", value: function _setupEventHandlers() { this._handleInputKeydownBound = this._handleInputKeydown.bind(this); this._handleInputClickBound = this._handleInputClick.bind(this); this._handleClockClickStartBound = this._handleClockClickStart.bind(this); this._handleDocumentClickMoveBound = this._handleDocumentClickMove.bind(this); this._handleDocumentClickEndBound = this._handleDocumentClickEnd.bind(this); this.el.addEventListener('click', this._handleInputClickBound); this.el.addEventListener('keydown', this._handleInputKeydownBound); this.plate.addEventListener('mousedown', this._handleClockClickStartBound); this.plate.addEventListener('touchstart', this._handleClockClickStartBound); $(this.spanHours).on('click', this.showView.bind(this, 'hours')); $(this.spanMinutes).on('click', this.showView.bind(this, 'minutes')); } }, { key: "_removeEventHandlers", value: function _removeEventHandlers() { this.el.removeEventListener('click', this._handleInputClickBound); this.el.removeEventListener('keydown', this._handleInputKeydownBound); } }, { key: "_handleInputClick", value: function _handleInputClick() { this.open(); } }, { key: "_handleInputKeydown", value: function _handleInputKeydown(e) { if (e.which === M.keys.ENTER) { e.preventDefault(); this.open(); } } }, { key: "_handleClockClickStart", value: function _handleClockClickStart(e) { e.preventDefault(); var clockPlateBR = this.plate.getBoundingClientRect(); var offset = { x: clockPlateBR.left, y: clockPlateBR.top }; this.x0 = offset.x + this.options.dialRadius; this.y0 = offset.y + this.options.dialRadius; this.moved = false; var clickPos = Timepicker._Pos(e); this.dx = clickPos.x - this.x0; this.dy = clickPos.y - this.y0; // Set clock hands this.setHand(this.dx, this.dy, false); // Mousemove on document document.addEventListener('mousemove', this._handleDocumentClickMoveBound); document.addEventListener('touchmove', this._handleDocumentClickMoveBound); // Mouseup on document document.addEventListener('mouseup', this._handleDocumentClickEndBound); document.addEventListener('touchend', this._handleDocumentClickEndBound); } }, { key: "_handleDocumentClickMove", value: function _handleDocumentClickMove(e) { e.preventDefault(); var clickPos = Timepicker._Pos(e); var x = clickPos.x - this.x0; var y = clickPos.y - this.y0; this.moved = true; this.setHand(x, y, false, true); } }, { key: "_handleDocumentClickEnd", value: function _handleDocumentClickEnd(e) { var _this58 = this; e.preventDefault(); document.removeEventListener('mouseup', this._handleDocumentClickEndBound); document.removeEventListener('touchend', this._handleDocumentClickEndBound); var clickPos = Timepicker._Pos(e); var x = clickPos.x - this.x0; var y = clickPos.y - this.y0; if (this.moved && x === this.dx && y === this.dy) { this.setHand(x, y); } if (this.currentView === 'hours') { this.showView('minutes', this.options.duration / 2); } else if (this.options.autoClose) { $(this.minutesView).addClass('timepicker-dial-out'); setTimeout(function () { _this58.done(); }, this.options.duration / 2); } if (typeof this.options.onSelect === 'function') { this.options.onSelect.call(this, this.hours, this.minutes); } // Unbind mousemove event document.removeEventListener('mousemove', this._handleDocumentClickMoveBound); document.removeEventListener('touchmove', this._handleDocumentClickMoveBound); } }, { key: "_insertHTMLIntoDOM", value: function _insertHTMLIntoDOM() { this.$modalEl = $(Timepicker._template); this.modalEl = this.$modalEl[0]; this.modalEl.id = 'modal-' + this.id; // Append popover to input by default var containerEl = document.querySelector(this.options.container); if (this.options.container && !!containerEl) { this.$modalEl.appendTo(containerEl); } else { this.$modalEl.insertBefore(this.el); } } }, { key: "_setupModal", value: function _setupModal() { var _this59 = this; this.modal = M.Modal.init(this.modalEl, { onOpenStart: this.options.onOpenStart, onOpenEnd: this.options.onOpenEnd, onCloseStart: this.options.onCloseStart, onCloseEnd: function () { if (typeof _this59.options.onCloseEnd === 'function') { _this59.options.onCloseEnd.call(_this59); } _this59.isOpen = false; } }); } }, { key: "_setupVariables", value: function _setupVariables() { this.currentView = 'hours'; this.vibrate = navigator.vibrate ? 'vibrate' : navigator.webkitVibrate ? 'webkitVibrate' : null; this._canvas = this.modalEl.querySelector('.timepicker-canvas'); this.plate = this.modalEl.querySelector('.timepicker-plate'); this.hoursView = this.modalEl.querySelector('.timepicker-hours'); this.minutesView = this.modalEl.querySelector('.timepicker-minutes'); this.spanHours = this.modalEl.querySelector('.timepicker-span-hours'); this.spanMinutes = this.modalEl.querySelector('.timepicker-span-minutes'); this.spanAmPm = this.modalEl.querySelector('.timepicker-span-am-pm'); this.footer = this.modalEl.querySelector('.timepicker-footer'); this.amOrPm = 'PM'; } }, { key: "_pickerSetup", value: function _pickerSetup() { var $clearBtn = $("").appendTo(this.footer).on('click', this.clear.bind(this)); if (this.options.showClearBtn) { $clearBtn.css({ visibility: '' }); } var confirmationBtnsContainer = $('
'); $('').appendTo(confirmationBtnsContainer).on('click', this.close.bind(this)); $('').appendTo(confirmationBtnsContainer).on('click', this.done.bind(this)); confirmationBtnsContainer.appendTo(this.footer); } }, { key: "_clockSetup", value: function _clockSetup() { if (this.options.twelveHour) { this.$amBtn = $('
AM
'); this.$pmBtn = $('
PM
'); this.$amBtn.on('click', this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm); this.$pmBtn.on('click', this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm); } this._buildHoursView(); this._buildMinutesView(); this._buildSVGClock(); } }, { key: "_buildSVGClock", value: function _buildSVGClock() { // Draw clock hands and others var dialRadius = this.options.dialRadius; var tickRadius = this.options.tickRadius; var diameter = dialRadius * 2; var svg = Timepicker._createSVGEl('svg'); svg.setAttribute('class', 'timepicker-svg'); svg.setAttribute('width', diameter); svg.setAttribute('height', diameter); var g = Timepicker._createSVGEl('g'); g.setAttribute('transform', 'translate(' + dialRadius + ',' + dialRadius + ')'); var bearing = Timepicker._createSVGEl('circle'); bearing.setAttribute('class', 'timepicker-canvas-bearing'); bearing.setAttribute('cx', 0); bearing.setAttribute('cy', 0); bearing.setAttribute('r', 4); var hand = Timepicker._createSVGEl('line'); hand.setAttribute('x1', 0); hand.setAttribute('y1', 0); var bg = Timepicker._createSVGEl('circle'); bg.setAttribute('class', 'timepicker-canvas-bg'); bg.setAttribute('r', tickRadius); g.appendChild(hand); g.appendChild(bg); g.appendChild(bearing); svg.appendChild(g); this._canvas.appendChild(svg); this.hand = hand; this.bg = bg; this.bearing = bearing; this.g = g; } }, { key: "_buildHoursView", value: function _buildHoursView() { var $tick = $('
'); // Hours view if (this.options.twelveHour) { for (var i = 1; i < 13; i += 1) { var tick = $tick.clone(); var radian = i / 6 * Math.PI; var radius = this.options.outerRadius; tick.css({ left: this.options.dialRadius + Math.sin(radian) * radius - this.options.tickRadius + 'px', top: this.options.dialRadius - Math.cos(radian) * radius - this.options.tickRadius + 'px' }); tick.html(i === 0 ? '00' : i); this.hoursView.appendChild(tick[0]); // tick.on(mousedownEvent, mousedown); } } else { for (var _i2 = 0; _i2 < 24; _i2 += 1) { var _tick = $tick.clone(); var _radian = _i2 / 6 * Math.PI; var inner = _i2 > 0 && _i2 < 13; var _radius = inner ? this.options.innerRadius : this.options.outerRadius; _tick.css({ left: this.options.dialRadius + Math.sin(_radian) * _radius - this.options.tickRadius + 'px', top: this.options.dialRadius - Math.cos(_radian) * _radius - this.options.tickRadius + 'px' }); _tick.html(_i2 === 0 ? '00' : _i2); this.hoursView.appendChild(_tick[0]); // tick.on(mousedownEvent, mousedown); } } } }, { key: "_buildMinutesView", value: function _buildMinutesView() { var $tick = $('
'); // Minutes view for (var i = 0; i < 60; i += 5) { var tick = $tick.clone(); var radian = i / 30 * Math.PI; tick.css({ left: this.options.dialRadius + Math.sin(radian) * this.options.outerRadius - this.options.tickRadius + 'px', top: this.options.dialRadius - Math.cos(radian) * this.options.outerRadius - this.options.tickRadius + 'px' }); tick.html(Timepicker._addLeadingZero(i)); this.minutesView.appendChild(tick[0]); } } }, { key: "_handleAmPmClick", value: function _handleAmPmClick(e) { var $btnClicked = $(e.target); this.amOrPm = $btnClicked.hasClass('am-btn') ? 'AM' : 'PM'; this._updateAmPmView(); } }, { key: "_updateAmPmView", value: function _updateAmPmView() { if (this.options.twelveHour) { this.$amBtn.toggleClass('text-primary', this.amOrPm === 'AM'); this.$pmBtn.toggleClass('text-primary', this.amOrPm === 'PM'); } } }, { key: "_updateTimeFromInput", value: function _updateTimeFromInput() { // Get the time var value = ((this.el.value || this.options.defaultTime || '') + '').split(':'); if (this.options.twelveHour && !(typeof value[1] === 'undefined')) { if (value[1].toUpperCase().indexOf('AM') > 0) { this.amOrPm = 'AM'; } else { this.amOrPm = 'PM'; } value[1] = value[1].replace('AM', '').replace('PM', ''); } if (value[0] === 'now') { var now = new Date(+new Date() + this.options.fromNow); value = [now.getHours(), now.getMinutes()]; if (this.options.twelveHour) { this.amOrPm = value[0] >= 12 && value[0] < 24 ? 'PM' : 'AM'; } } this.hours = +value[0] || 0; this.minutes = +value[1] || 0; this.spanHours.innerHTML = this.hours; this.spanMinutes.innerHTML = Timepicker._addLeadingZero(this.minutes); this._updateAmPmView(); } }, { key: "showView", value: function showView(view, delay) { if (view === 'minutes' && $(this.hoursView).css('visibility') === 'visible') { // raiseCallback(this.options.beforeHourSelect); } var isHours = view === 'hours', nextView = isHours ? this.hoursView : this.minutesView, hideView = isHours ? this.minutesView : this.hoursView; this.currentView = view; $(this.spanHours).toggleClass('text-primary', isHours); $(this.spanMinutes).toggleClass('text-primary', !isHours); // Transition view hideView.classList.add('timepicker-dial-out'); $(nextView).css('visibility', 'visible').removeClass('timepicker-dial-out'); // Reset clock hand this.resetClock(delay); // After transitions ended clearTimeout(this.toggleViewTimer); this.toggleViewTimer = setTimeout(function () { $(hideView).css('visibility', 'hidden'); }, this.options.duration); } }, { key: "resetClock", value: function resetClock(delay) { var view = this.currentView, value = this[view], isHours = view === 'hours', unit = Math.PI / (isHours ? 6 : 30), radian = value * unit, radius = isHours && value > 0 && value < 13 ? this.options.innerRadius : this.options.outerRadius, x = Math.sin(radian) * radius, y = -Math.cos(radian) * radius, self = this; if (delay) { $(this.canvas).addClass('timepicker-canvas-out'); setTimeout(function () { $(self.canvas).removeClass('timepicker-canvas-out'); self.setHand(x, y); }, delay); } else { this.setHand(x, y); } } }, { key: "setHand", value: function setHand(x, y, roundBy5) { var _this60 = this; var radian = Math.atan2(x, -y), isHours = this.currentView === 'hours', unit = Math.PI / (isHours || roundBy5 ? 6 : 30), z = Math.sqrt(x * x + y * y), inner = isHours && z < (this.options.outerRadius + this.options.innerRadius) / 2, radius = inner ? this.options.innerRadius : this.options.outerRadius; if (this.options.twelveHour) { radius = this.options.outerRadius; } // Radian should in range [0, 2PI] if (radian < 0) { radian = Math.PI * 2 + radian; } // Get the round value var value = Math.round(radian / unit); // Get the round radian radian = value * unit; // Correct the hours or minutes if (this.options.twelveHour) { if (isHours) { if (value === 0) value = 12; } else { if (roundBy5) value *= 5; if (value === 60) value = 0; } } else { if (isHours) { if (value === 12) { value = 0; } value = inner ? value === 0 ? 12 : value : value === 0 ? 0 : value + 12; } else { if (roundBy5) { value *= 5; } if (value === 60) { value = 0; } } } // Once hours or minutes changed, vibrate the device if (this[this.currentView] !== value) { if (this.vibrate && this.options.vibrate) { // Do not vibrate too frequently if (!this.vibrateTimer) { navigator[this.vibrate](10); this.vibrateTimer = setTimeout(function () { _this60.vibrateTimer = null; }, 100); } } } this[this.currentView] = value; if (isHours) { this['spanHours'].innerHTML = value; } else { this['spanMinutes'].innerHTML = Timepicker._addLeadingZero(value); } // Set clock hand and others' position var cx1 = Math.sin(radian) * (radius - this.options.tickRadius), cy1 = -Math.cos(radian) * (radius - this.options.tickRadius), cx2 = Math.sin(radian) * radius, cy2 = -Math.cos(radian) * radius; this.hand.setAttribute('x2', cx1); this.hand.setAttribute('y2', cy1); this.bg.setAttribute('cx', cx2); this.bg.setAttribute('cy', cy2); } }, { key: "open", value: function open() { if (this.isOpen) { return; } this.isOpen = true; this._updateTimeFromInput(); this.showView('hours'); this.modal.open(); } }, { key: "close", value: function close() { if (!this.isOpen) { return; } this.isOpen = false; this.modal.close(); } /** * Finish timepicker selection. */ }, { key: "done", value: function done(e, clearValue) { // Set input value var last = this.el.value; var value = clearValue ? '' : Timepicker._addLeadingZero(this.hours) + ':' + Timepicker._addLeadingZero(this.minutes); this.time = value; if (!clearValue && this.options.twelveHour) { value = value + " " + this.amOrPm; } this.el.value = value; // Trigger change event if (value !== last) { this.$el.trigger('change'); } this.close(); this.el.focus(); } }, { key: "clear", value: function clear() { this.done(null, true); } }], [{ key: "init", value: function init(els, options) { return _get(Timepicker.__proto__ || Object.getPrototypeOf(Timepicker), "init", this).call(this, this, els, options); } }, { key: "_addLeadingZero", value: function _addLeadingZero(num) { return (num < 10 ? '0' : '') + num; } }, { key: "_createSVGEl", value: function _createSVGEl(name) { var svgNS = 'http://www.w3.org/2000/svg'; return document.createElementNS(svgNS, name); } /** * @typedef {Object} Point * @property {number} x The X Coordinate * @property {number} y The Y Coordinate */ /** * Get x position of mouse or touch event * @param {Event} e * @return {Point} x and y location */ }, { key: "_Pos", value: function _Pos(e) { if (e.targetTouches && e.targetTouches.length >= 1) { return { x: e.targetTouches[0].clientX, y: e.targetTouches[0].clientY }; } // mouse event return { x: e.clientX, y: e.clientY }; } /** * Get Instance */ }, { key: "getInstance", value: function getInstance(el) { var domElem = !!el.jquery ? el[0] : el; return domElem.M_Timepicker; } }, { key: "defaults", get: function () { return _defaults; } }]); return Timepicker; }(Component); Timepicker._template = [''].join(''); M.Timepicker = Timepicker; if (M.jQueryLoaded) { M.initializeJqueryWrapper(Timepicker, 'timepicker', 'M_Timepicker'); } })(cash); ;(function ($) { 'use strict'; var _defaults = {}; /** * @class * */ var CharacterCounter = function (_Component17) { _inherits(CharacterCounter, _Component17); /** * Construct CharacterCounter instance * @constructor * @param {Element} el * @param {Object} options */ function CharacterCounter(el, options) { _classCallCheck(this, CharacterCounter); var _this61 = _possibleConstructorReturn(this, (CharacterCounter.__proto__ || Object.getPrototypeOf(CharacterCounter)).call(this, CharacterCounter, el, options)); _this61.el.M_CharacterCounter = _this61; /** * Options for the character counter */ _this61.options = $.extend({}, CharacterCounter.defaults, options); _this61.isInvalid = false; _this61.isValidLength = false; _this61._setupCounter(); _this61._setupEventHandlers(); return _this61; } _createClass(CharacterCounter, [{ key: "destroy", /** * Teardown component */ value: function destroy() { this._removeEventHandlers(); this.el.CharacterCounter = undefined; this._removeCounter(); } /** * Setup Event Handlers */ }, { key: "_setupEventHandlers", value: function _setupEventHandlers() { this._handleUpdateCounterBound = this.updateCounter.bind(this); this.el.addEventListener('focus', this._handleUpdateCounterBound, true); this.el.addEventListener('input', this._handleUpdateCounterBound, true); } /** * Remove Event Handlers */ }, { key: "_removeEventHandlers", value: function _removeEventHandlers() { this.el.removeEventListener('focus', this._handleUpdateCounterBound, true); this.el.removeEventListener('input', this._handleUpdateCounterBound, true); } /** * Setup counter element */ }, { key: "_setupCounter", value: function _setupCounter() { this.counterEl = document.createElement('span'); $(this.counterEl).addClass('character-counter').css({ float: 'right', 'font-size': '12px', height: 1 }); this.$el.parent().append(this.counterEl); } /** * Remove counter element */ }, { key: "_removeCounter", value: function _removeCounter() { $(this.counterEl).remove(); } /** * Update counter */ }, { key: "updateCounter", value: function updateCounter() { var maxLength = +this.$el.attr('data-length'), actualLength = this.el.value.length; this.isValidLength = actualLength <= maxLength; var counterString = actualLength; if (maxLength) { counterString += '/' + maxLength; this._validateInput(); } $(this.counterEl).html(counterString); } /** * Add validation classes */ }, { key: "_validateInput", value: function _validateInput() { if (this.isValidLength && this.isInvalid) { this.isInvalid = false; this.$el.removeClass('invalid'); } else if (!this.isValidLength && !this.isInvalid) { this.isInvalid = true; this.$el.removeClass('valid'); this.$el.addClass('invalid'); } } }], [{ key: "init", value: function init(els, options) { return _get(CharacterCounter.__proto__ || Object.getPrototypeOf(CharacterCounter), "init", this).call(this, this, els, options); } /** * Get Instance */ }, { key: "getInstance", value: function getInstance(el) { var domElem = !!el.jquery ? el[0] : el; return domElem.M_CharacterCounter; } }, { key: "defaults", get: function () { return _defaults; } }]); return CharacterCounter; }(Component); M.CharacterCounter = CharacterCounter; if (M.jQueryLoaded) { M.initializeJqueryWrapper(CharacterCounter, 'characterCounter', 'M_CharacterCounter'); } })(cash); ;(function ($) { 'use strict'; var _defaults = { duration: 200, // ms dist: -100, // zoom scale TODO: make this more intuitive as an option shift: 0, // spacing for center image padding: 0, // Padding between non center items numVisible: 5, // Number of visible items in carousel fullWidth: false, // Change to full width styles indicators: false, // Toggle indicators noWrap: false, // Don't wrap around and cycle through items. onCycleTo: null // Callback for when a new slide is cycled to. }; /** * @class * */ var Carousel = function (_Component18) { _inherits(Carousel, _Component18); /** * Construct Carousel instance * @constructor * @param {Element} el * @param {Object} options */ function Carousel(el, options) { _classCallCheck(this, Carousel); var _this62 = _possibleConstructorReturn(this, (Carousel.__proto__ || Object.getPrototypeOf(Carousel)).call(this, Carousel, el, options)); _this62.el.M_Carousel = _this62; /** * Options for the carousel * @member Carousel#options * @prop {Number} duration * @prop {Number} dist * @prop {Number} shift * @prop {Number} padding * @prop {Number} numVisible * @prop {Boolean} fullWidth * @prop {Boolean} indicators * @prop {Boolean} noWrap * @prop {Function} onCycleTo */ _this62.options = $.extend({}, Carousel.defaults, options); // Setup _this62.hasMultipleSlides = _this62.$el.find('.carousel-item').length > 1; _this62.showIndicators = _this62.options.indicators && _this62.hasMultipleSlides; _this62.noWrap = _this62.options.noWrap || !_this62.hasMultipleSlides; _this62.pressed = false; _this62.dragged = false; _this62.offset = _this62.target = 0; _this62.images = []; _this62.itemWidth = _this62.$el.find('.carousel-item').first().innerWidth(); _this62.itemHeight = _this62.$el.find('.carousel-item').first().innerHeight(); _this62.dim = _this62.itemWidth * 2 + _this62.options.padding || 1; // Make sure dim is non zero for divisions. _this62._autoScrollBound = _this62._autoScroll.bind(_this62); _this62._trackBound = _this62._track.bind(_this62); // Full Width carousel setup if (_this62.options.fullWidth) { _this62.options.dist = 0; _this62._setCarouselHeight(); // Offset fixed items when indicators. if (_this62.showIndicators) { _this62.$el.find('.carousel-fixed-item').addClass('with-indicators'); } } // Iterate through slides _this62.$indicators = $('
    '); _this62.$el.find('.carousel-item').each(function (el, i) { _this62.images.push(el); if (_this62.showIndicators) { var $indicator = $('
  • '); // Add active to first by default. if (i === 0) { $indicator[0].classList.add('active'); } _this62.$indicators.append($indicator); } }); if (_this62.showIndicators) { _this62.$el.append(_this62.$indicators); } _this62.count = _this62.images.length; // Cap numVisible at count _this62.options.numVisible = Math.min(_this62.count, _this62.options.numVisible); // Setup cross browser string _this62.xform = 'transform'; ['webkit', 'Moz', 'O', 'ms'].every(function (prefix) { var e = prefix + 'Transform'; if (typeof document.body.style[e] !== 'undefined') { _this62.xform = e; return false; } return true; }); _this62._setupEventHandlers(); _this62._scroll(_this62.offset); return _this62; } _createClass(Carousel, [{ key: "destroy", /** * Teardown component */ value: function destroy() { this._removeEventHandlers(); this.el.M_Carousel = undefined; } /** * Setup Event Handlers */ }, { key: "_setupEventHandlers", value: function _setupEventHandlers() { var _this63 = this; this._handleCarouselTapBound = this._handleCarouselTap.bind(this); this._handleCarouselDragBound = this._handleCarouselDrag.bind(this); this._handleCarouselReleaseBound = this._handleCarouselRelease.bind(this); this._handleCarouselClickBound = this._handleCarouselClick.bind(this); if (typeof window.ontouchstart !== 'undefined') { this.el.addEventListener('touchstart', this._handleCarouselTapBound); this.el.addEventListener('touchmove', this._handleCarouselDragBound); this.el.addEventListener('touchend', this._handleCarouselReleaseBound); } this.el.addEventListener('mousedown', this._handleCarouselTapBound); this.el.addEventListener('mousemove', this._handleCarouselDragBound); this.el.addEventListener('mouseup', this._handleCarouselReleaseBound); this.el.addEventListener('mouseleave', this._handleCarouselReleaseBound); this.el.addEventListener('click', this._handleCarouselClickBound); if (this.showIndicators && this.$indicators) { this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this); this.$indicators.find('.indicator-item').each(function (el, i) { el.addEventListener('click', _this63._handleIndicatorClickBound); }); } // Resize var throttledResize = M.throttle(this._handleResize, 200); this._handleThrottledResizeBound = throttledResize.bind(this); window.addEventListener('resize', this._handleThrottledResizeBound); } /** * Remove Event Handlers */ }, { key: "_removeEventHandlers", value: function _removeEventHandlers() { var _this64 = this; if (typeof window.ontouchstart !== 'undefined') { this.el.removeEventListener('touchstart', this._handleCarouselTapBound); this.el.removeEventListener('touchmove', this._handleCarouselDragBound); this.el.removeEventListener('touchend', this._handleCarouselReleaseBound); } this.el.removeEventListener('mousedown', this._handleCarouselTapBound); this.el.removeEventListener('mousemove', this._handleCarouselDragBound); this.el.removeEventListener('mouseup', this._handleCarouselReleaseBound); this.el.removeEventListener('mouseleave', this._handleCarouselReleaseBound); this.el.removeEventListener('click', this._handleCarouselClickBound); if (this.showIndicators && this.$indicators) { this.$indicators.find('.indicator-item').each(function (el, i) { el.removeEventListener('click', _this64._handleIndicatorClickBound); }); } window.removeEventListener('resize', this._handleThrottledResizeBound); } /** * Handle Carousel Tap * @param {Event} e */ }, { key: "_handleCarouselTap", value: function _handleCarouselTap(e) { // Fixes firefox draggable image bug if (e.type === 'mousedown' && $(e.target).is('img')) { e.preventDefault(); } this.pressed = true; this.dragged = false; this.verticalDragged = false; this.reference = this._xpos(e); this.referenceY = this._ypos(e); this.velocity = this.amplitude = 0; this.frame = this.offset; this.timestamp = Date.now(); clearInterval(this.ticker); this.ticker = setInterval(this._trackBound, 100); } /** * Handle Carousel Drag * @param {Event} e */ }, { key: "_handleCarouselDrag", value: function _handleCarouselDrag(e) { var x = void 0, y = void 0, delta = void 0, deltaY = void 0; if (this.pressed) { x = this._xpos(e); y = this._ypos(e); delta = this.reference - x; deltaY = Math.abs(this.referenceY - y); if (deltaY < 30 && !this.verticalDragged) { // If vertical scrolling don't allow dragging. if (delta > 2 || delta < -2) { this.dragged = true; this.reference = x; this._scroll(this.offset + delta); } } else if (this.dragged) { // If dragging don't allow vertical scroll. e.preventDefault(); e.stopPropagation(); return false; } else { // Vertical scrolling. this.verticalDragged = true; } } if (this.dragged) { // If dragging don't allow vertical scroll. e.preventDefault(); e.stopPropagation(); return false; } } /** * Handle Carousel Release * @param {Event} e */ }, { key: "_handleCarouselRelease", value: function _handleCarouselRelease(e) { if (this.pressed) { this.pressed = false; } else { return; } clearInterval(this.ticker); this.target = this.offset; if (this.velocity > 10 || this.velocity < -10) { this.amplitude = 0.9 * this.velocity; this.target = this.offset + this.amplitude; } this.target = Math.round(this.target / this.dim) * this.dim; // No wrap of items. if (this.noWrap) { if (this.target >= this.dim * (this.count - 1)) { this.target = this.dim * (this.count - 1); } else if (this.target < 0) { this.target = 0; } } this.amplitude = this.target - this.offset; this.timestamp = Date.now(); requestAnimationFrame(this._autoScrollBound); if (this.dragged) { e.preventDefault(); e.stopPropagation(); } return false; } /** * Handle Carousel CLick * @param {Event} e */ }, { key: "_handleCarouselClick", value: function _handleCarouselClick(e) { // Disable clicks if carousel was dragged. if (this.dragged) { e.preventDefault(); e.stopPropagation(); return false; } else if (!this.options.fullWidth) { var clickedIndex = $(e.target).closest('.carousel-item').index(); var diff = this._wrap(this.center) - clickedIndex; // Disable clicks if carousel was shifted by click if (diff !== 0) { e.preventDefault(); e.stopPropagation(); } this._cycleTo(clickedIndex); } } /** * Handle Indicator CLick * @param {Event} e */ }, { key: "_handleIndicatorClick", value: function _handleIndicatorClick(e) { e.stopPropagation(); var indicator = $(e.target).closest('.indicator-item'); if (indicator.length) { this._cycleTo(indicator.index()); } } /** * Handle Throttle Resize * @param {Event} e */ }, { key: "_handleResize", value: function _handleResize(e) { if (this.options.fullWidth) { this.itemWidth = this.$el.find('.carousel-item').first().innerWidth(); this.imageHeight = this.$el.find('.carousel-item.active').height(); this.dim = this.itemWidth * 2 + this.options.padding; this.offset = this.center * 2 * this.itemWidth; this.target = this.offset; this._setCarouselHeight(true); } else { this._scroll(); } } /** * Set carousel height based on first slide * @param {Booleam} imageOnly - true for image slides */ }, { key: "_setCarouselHeight", value: function _setCarouselHeight(imageOnly) { var _this65 = this; var firstSlide = this.$el.find('.carousel-item.active').length ? this.$el.find('.carousel-item.active').first() : this.$el.find('.carousel-item').first(); var firstImage = firstSlide.find('img').first(); if (firstImage.length) { if (firstImage[0].complete) { // If image won't trigger the load event var imageHeight = firstImage.height(); if (imageHeight > 0) { this.$el.css('height', imageHeight + 'px'); } else { // If image still has no height, use the natural dimensions to calculate var naturalWidth = firstImage[0].naturalWidth; var naturalHeight = firstImage[0].naturalHeight; var adjustedHeight = this.$el.width() / naturalWidth * naturalHeight; this.$el.css('height', adjustedHeight + 'px'); } } else { // Get height when image is loaded normally firstImage.one('load', function (el, i) { _this65.$el.css('height', el.offsetHeight + 'px'); }); } } else if (!imageOnly) { var slideHeight = firstSlide.height(); this.$el.css('height', slideHeight + 'px'); } } /** * Get x position from event * @param {Event} e */ }, { key: "_xpos", value: function _xpos(e) { // touch event if (e.targetTouches && e.targetTouches.length >= 1) { return e.targetTouches[0].clientX; } // mouse event return e.clientX; } /** * Get y position from event * @param {Event} e */ }, { key: "_ypos", value: function _ypos(e) { // touch event if (e.targetTouches && e.targetTouches.length >= 1) { return e.targetTouches[0].clientY; } // mouse event return e.clientY; } /** * Wrap index * @param {Number} x */ }, { key: "_wrap", value: function _wrap(x) { return x >= this.count ? x % this.count : x < 0 ? this._wrap(this.count + x % this.count) : x; } /** * Tracks scrolling information */ }, { key: "_track", value: function _track() { var now = void 0, elapsed = void 0, delta = void 0, v = void 0; now = Date.now(); elapsed = now - this.timestamp; this.timestamp = now; delta = this.offset - this.frame; this.frame = this.offset; v = 1000 * delta / (1 + elapsed); this.velocity = 0.8 * v + 0.2 * this.velocity; } /** * Auto scrolls to nearest carousel item. */ }, { key: "_autoScroll", value: function _autoScroll() { var elapsed = void 0, delta = void 0; if (this.amplitude) { elapsed = Date.now() - this.timestamp; delta = this.amplitude * Math.exp(-elapsed / this.options.duration); if (delta > 2 || delta < -2) { this._scroll(this.target - delta); requestAnimationFrame(this._autoScrollBound); } else { this._scroll(this.target); } } } /** * Scroll to target * @param {Number} x */ }, { key: "_scroll", value: function _scroll(x) { var _this66 = this; // Track scrolling state if (!this.$el.hasClass('scrolling')) { this.el.classList.add('scrolling'); } if (this.scrollingTimeout != null) { window.clearTimeout(this.scrollingTimeout); } this.scrollingTimeout = window.setTimeout(function () { _this66.$el.removeClass('scrolling'); }, this.options.duration); // Start actual scroll var i = void 0, half = void 0, delta = void 0, dir = void 0, tween = void 0, el = void 0, alignment = void 0, zTranslation = void 0, tweenedOpacity = void 0, centerTweenedOpacity = void 0; var lastCenter = this.center; var numVisibleOffset = 1 / this.options.numVisible; this.offset = typeof x === 'number' ? x : this.offset; this.center = Math.floor((this.offset + this.dim / 2) / this.dim); delta = this.offset - this.center * this.dim; dir = delta < 0 ? 1 : -1; tween = -dir * delta * 2 / this.dim; half = this.count >> 1; if (this.options.fullWidth) { alignment = 'translateX(0)'; centerTweenedOpacity = 1; } else { alignment = 'translateX(' + (this.el.clientWidth - this.itemWidth) / 2 + 'px) '; alignment += 'translateY(' + (this.el.clientHeight - this.itemHeight) / 2 + 'px)'; centerTweenedOpacity = 1 - numVisibleOffset * tween; } // Set indicator active if (this.showIndicators) { var diff = this.center % this.count; var activeIndicator = this.$indicators.find('.indicator-item.active'); if (activeIndicator.index() !== diff) { activeIndicator.removeClass('active'); this.$indicators.find('.indicator-item').eq(diff)[0].classList.add('active'); } } // center // Don't show wrapped items. if (!this.noWrap || this.center >= 0 && this.center < this.count) { el = this.images[this._wrap(this.center)]; // Add active class to center item. if (!$(el).hasClass('active')) { this.$el.find('.carousel-item').removeClass('active'); el.classList.add('active'); } var transformString = alignment + " translateX(" + -delta / 2 + "px) translateX(" + dir * this.options.shift * tween * i + "px) translateZ(" + this.options.dist * tween + "px)"; this._updateItemStyle(el, centerTweenedOpacity, 0, transformString); } for (i = 1; i <= half; ++i) { // right side if (this.options.fullWidth) { zTranslation = this.options.dist; tweenedOpacity = i === half && delta < 0 ? 1 - tween : 1; } else { zTranslation = this.options.dist * (i * 2 + tween * dir); tweenedOpacity = 1 - numVisibleOffset * (i * 2 + tween * dir); } // Don't show wrapped items. if (!this.noWrap || this.center + i < this.count) { el = this.images[this._wrap(this.center + i)]; var _transformString = alignment + " translateX(" + (this.options.shift + (this.dim * i - delta) / 2) + "px) translateZ(" + zTranslation + "px)"; this._updateItemStyle(el, tweenedOpacity, -i, _transformString); } // left side if (this.options.fullWidth) { zTranslation = this.options.dist; tweenedOpacity = i === half && delta > 0 ? 1 - tween : 1; } else { zTranslation = this.options.dist * (i * 2 - tween * dir); tweenedOpacity = 1 - numVisibleOffset * (i * 2 - tween * dir); } // Don't show wrapped items. if (!this.noWrap || this.center - i >= 0) { el = this.images[this._wrap(this.center - i)]; var _transformString2 = alignment + " translateX(" + (-this.options.shift + (-this.dim * i - delta) / 2) + "px) translateZ(" + zTranslation + "px)"; this._updateItemStyle(el, tweenedOpacity, -i, _transformString2); } } // center // Don't show wrapped items. if (!this.noWrap || this.center >= 0 && this.center < this.count) { el = this.images[this._wrap(this.center)]; var _transformString3 = alignment + " translateX(" + -delta / 2 + "px) translateX(" + dir * this.options.shift * tween + "px) translateZ(" + this.options.dist * tween + "px)"; this._updateItemStyle(el, centerTweenedOpacity, 0, _transformString3); } // onCycleTo callback var $currItem = this.$el.find('.carousel-item').eq(this._wrap(this.center)); if (lastCenter !== this.center && typeof this.options.onCycleTo === 'function') { this.options.onCycleTo.call(this, $currItem[0], this.dragged); } // One time callback if (typeof this.oneTimeCallback === 'function') { this.oneTimeCallback.call(this, $currItem[0], this.dragged); this.oneTimeCallback = null; } } /** * Cycle to target * @param {Element} el * @param {Number} opacity * @param {Number} zIndex * @param {String} transform */ }, { key: "_updateItemStyle", value: function _updateItemStyle(el, opacity, zIndex, transform) { el.style[this.xform] = transform; el.style.zIndex = zIndex; el.style.opacity = opacity; el.style.visibility = 'visible'; } /** * Cycle to target * @param {Number} n * @param {Function} callback */ }, { key: "_cycleTo", value: function _cycleTo(n, callback) { var diff = this.center % this.count - n; // Account for wraparound. if (!this.noWrap) { if (diff < 0) { if (Math.abs(diff + this.count) < Math.abs(diff)) { diff += this.count; } } else if (diff > 0) { if (Math.abs(diff - this.count) < diff) { diff -= this.count; } } } this.target = this.dim * Math.round(this.offset / this.dim); // Next if (diff < 0) { this.target += this.dim * Math.abs(diff); // Prev } else if (diff > 0) { this.target -= this.dim * diff; } // Set one time callback if (typeof callback === 'function') { this.oneTimeCallback = callback; } // Scroll if (this.offset !== this.target) { this.amplitude = this.target - this.offset; this.timestamp = Date.now(); requestAnimationFrame(this._autoScrollBound); } } /** * Cycle to next item * @param {Number} [n] */ }, { key: "next", value: function next(n) { if (n === undefined || isNaN(n)) { n = 1; } var index = this.center + n; if (index >= this.count || index < 0) { if (this.noWrap) { return; } index = this._wrap(index); } this._cycleTo(index); } /** * Cycle to previous item * @param {Number} [n] */ }, { key: "prev", value: function prev(n) { if (n === undefined || isNaN(n)) { n = 1; } var index = this.center - n; if (index >= this.count || index < 0) { if (this.noWrap) { return; } index = this._wrap(index); } this._cycleTo(index); } /** * Cycle to nth item * @param {Number} [n] * @param {Function} callback */ }, { key: "set", value: function set(n, callback) { if (n === undefined || isNaN(n)) { n = 0; } if (n > this.count || n < 0) { if (this.noWrap) { return; } n = this._wrap(n); } this._cycleTo(n, callback); } }], [{ key: "init", value: function init(els, options) { return _get(Carousel.__proto__ || Object.getPrototypeOf(Carousel), "init", this).call(this, this, els, options); } /** * Get Instance */ }, { key: "getInstance", value: function getInstance(el) { var domElem = !!el.jquery ? el[0] : el; return domElem.M_Carousel; } }, { key: "defaults", get: function () { return _defaults; } }]); return Carousel; }(Component); M.Carousel = Carousel; if (M.jQueryLoaded) { M.initializeJqueryWrapper(Carousel, 'carousel', 'M_Carousel'); } })(cash); ;(function ($) { 'use strict'; var _defaults = { onOpen: undefined, onClose: undefined }; /** * @class * */ var TapTarget = function (_Component19) { _inherits(TapTarget, _Component19); /** * Construct TapTarget instance * @constructor * @param {Element} el * @param {Object} options */ function TapTarget(el, options) { _classCallCheck(this, TapTarget); var _this67 = _possibleConstructorReturn(this, (TapTarget.__proto__ || Object.getPrototypeOf(TapTarget)).call(this, TapTarget, el, options)); _this67.el.M_TapTarget = _this67; /** * Options for the select * @member TapTarget#options * @prop {Function} onOpen - Callback function called when feature discovery is opened * @prop {Function} onClose - Callback function called when feature discovery is closed */ _this67.options = $.extend({}, TapTarget.defaults, options); _this67.isOpen = false; // setup _this67.$origin = $('#' + _this67.$el.attr('data-target')); _this67._setup(); _this67._calculatePositioning(); _this67._setupEventHandlers(); return _this67; } _createClass(TapTarget, [{ key: "destroy", /** * Teardown component */ value: function destroy() { this._removeEventHandlers(); this.el.TapTarget = undefined; } /** * Setup Event Handlers */ }, { key: "_setupEventHandlers", value: function _setupEventHandlers() { this._handleDocumentClickBound = this._handleDocumentClick.bind(this); this._handleTargetClickBound = this._handleTargetClick.bind(this); this._handleOriginClickBound = this._handleOriginClick.bind(this); this.el.addEventListener('click', this._handleTargetClickBound); this.originEl.addEventListener('click', this._handleOriginClickBound); // Resize var throttledResize = M.throttle(this._handleResize, 200); this._handleThrottledResizeBound = throttledResize.bind(this); window.addEventListener('resize', this._handleThrottledResizeBound); } /** * Remove Event Handlers */ }, { key: "_removeEventHandlers", value: function _removeEventHandlers() { this.el.removeEventListener('click', this._handleTargetClickBound); this.originEl.removeEventListener('click', this._handleOriginClickBound); window.removeEventListener('resize', this._handleThrottledResizeBound); } /** * Handle Target Click * @param {Event} e */ }, { key: "_handleTargetClick", value: function _handleTargetClick(e) { this.open(); } /** * Handle Origin Click * @param {Event} e */ }, { key: "_handleOriginClick", value: function _handleOriginClick(e) { this.close(); } /** * Handle Resize * @param {Event} e */ }, { key: "_handleResize", value: function _handleResize(e) { this._calculatePositioning(); } /** * Handle Resize * @param {Event} e */ }, { key: "_handleDocumentClick", value: function _handleDocumentClick(e) { if (!$(e.target).closest('.tap-target-wrapper').length) { this.close(); e.preventDefault(); e.stopPropagation(); } } /** * Setup Tap Target */ }, { key: "_setup", value: function _setup() { // Creating tap target this.wrapper = this.$el.parent()[0]; this.waveEl = $(this.wrapper).find('.tap-target-wave')[0]; this.originEl = $(this.wrapper).find('.tap-target-origin')[0]; this.contentEl = this.$el.find('.tap-target-content')[0]; // Creating wrapper if (!$(this.wrapper).hasClass('.tap-target-wrapper')) { this.wrapper = document.createElement('div'); this.wrapper.classList.add('tap-target-wrapper'); this.$el.before($(this.wrapper)); this.wrapper.append(this.el); } // Creating content if (!this.contentEl) { this.contentEl = document.createElement('div'); this.contentEl.classList.add('tap-target-content'); this.$el.append(this.contentEl); } // Creating foreground wave if (!this.waveEl) { this.waveEl = document.createElement('div'); this.waveEl.classList.add('tap-target-wave'); // Creating origin if (!this.originEl) { this.originEl = this.$origin.clone(true, true); this.originEl.addClass('tap-target-origin'); this.originEl.removeAttr('id'); this.originEl.removeAttr('style'); this.originEl = this.originEl[0]; this.waveEl.append(this.originEl); } this.wrapper.append(this.waveEl); } } /** * Calculate positioning */ }, { key: "_calculatePositioning", value: function _calculatePositioning() { // Element or parent is fixed position? var isFixed = this.$origin.css('position') === 'fixed'; if (!isFixed) { var parents = this.$origin.parents(); for (var i = 0; i < parents.length; i++) { isFixed = $(parents[i]).css('position') == 'fixed'; if (isFixed) { break; } } } // Calculating origin var originWidth = this.$origin.outerWidth(); var originHeight = this.$origin.outerHeight(); var originTop = isFixed ? this.$origin.offset().top - M.getDocumentScrollTop() : this.$origin.offset().top; var originLeft = isFixed ? this.$origin.offset().left - M.getDocumentScrollLeft() : this.$origin.offset().left; // Calculating screen var windowWidth = window.innerWidth; var windowHeight = window.innerHeight; var centerX = windowWidth / 2; var centerY = windowHeight / 2; var isLeft = originLeft <= centerX; var isRight = originLeft > centerX; var isTop = originTop <= centerY; var isBottom = originTop > centerY; var isCenterX = originLeft >= windowWidth * 0.25 && originLeft <= windowWidth * 0.75; // Calculating tap target var tapTargetWidth = this.$el.outerWidth(); var tapTargetHeight = this.$el.outerHeight(); var tapTargetTop = originTop + originHeight / 2 - tapTargetHeight / 2; var tapTargetLeft = originLeft + originWidth / 2 - tapTargetWidth / 2; var tapTargetPosition = isFixed ? 'fixed' : 'absolute'; // Calculating content var tapTargetTextWidth = isCenterX ? tapTargetWidth : tapTargetWidth / 2 + originWidth; var tapTargetTextHeight = tapTargetHeight / 2; var tapTargetTextTop = isTop ? tapTargetHeight / 2 : 0; var tapTargetTextBottom = 0; var tapTargetTextLeft = isLeft && !isCenterX ? tapTargetWidth / 2 - originWidth : 0; var tapTargetTextRight = 0; var tapTargetTextPadding = originWidth; var tapTargetTextAlign = isBottom ? 'bottom' : 'top'; // Calculating wave var tapTargetWaveWidth = originWidth > originHeight ? originWidth * 2 : originWidth * 2; var tapTargetWaveHeight = tapTargetWaveWidth; var tapTargetWaveTop = tapTargetHeight / 2 - tapTargetWaveHeight / 2; var tapTargetWaveLeft = tapTargetWidth / 2 - tapTargetWaveWidth / 2; // Setting tap target var tapTargetWrapperCssObj = {}; tapTargetWrapperCssObj.top = isTop ? tapTargetTop + 'px' : ''; tapTargetWrapperCssObj.right = isRight ? windowWidth - tapTargetLeft - tapTargetWidth + 'px' : ''; tapTargetWrapperCssObj.bottom = isBottom ? windowHeight - tapTargetTop - tapTargetHeight + 'px' : ''; tapTargetWrapperCssObj.left = isLeft ? tapTargetLeft + 'px' : ''; tapTargetWrapperCssObj.position = tapTargetPosition; $(this.wrapper).css(tapTargetWrapperCssObj); // Setting content $(this.contentEl).css({ width: tapTargetTextWidth + 'px', height: tapTargetTextHeight + 'px', top: tapTargetTextTop + 'px', right: tapTargetTextRight + 'px', bottom: tapTargetTextBottom + 'px', left: tapTargetTextLeft + 'px', padding: tapTargetTextPadding + 'px', verticalAlign: tapTargetTextAlign }); // Setting wave $(this.waveEl).css({ top: tapTargetWaveTop + 'px', left: tapTargetWaveLeft + 'px', width: tapTargetWaveWidth + 'px', height: tapTargetWaveHeight + 'px' }); } /** * Open TapTarget */ }, { key: "open", value: function open() { if (this.isOpen) { return; } // onOpen callback if (typeof this.options.onOpen === 'function') { this.options.onOpen.call(this, this.$origin[0]); } this.isOpen = true; this.wrapper.classList.add('open'); document.body.addEventListener('click', this._handleDocumentClickBound, true); document.body.addEventListener('touchend', this._handleDocumentClickBound); } /** * Close Tap Target */ }, { key: "close", value: function close() { if (!this.isOpen) { return; } // onClose callback if (typeof this.options.onClose === 'function') { this.options.onClose.call(this, this.$origin[0]); } this.isOpen = false; this.wrapper.classList.remove('open'); document.body.removeEventListener('click', this._handleDocumentClickBound, true); document.body.removeEventListener('touchend', this._handleDocumentClickBound); } }], [{ key: "init", value: function init(els, options) { return _get(TapTarget.__proto__ || Object.getPrototypeOf(TapTarget), "init", this).call(this, this, els, options); } /** * Get Instance */ }, { key: "getInstance", value: function getInstance(el) { var domElem = !!el.jquery ? el[0] : el; return domElem.M_TapTarget; } }, { key: "defaults", get: function () { return _defaults; } }]); return TapTarget; }(Component); M.TapTarget = TapTarget; if (M.jQueryLoaded) { M.initializeJqueryWrapper(TapTarget, 'tapTarget', 'M_TapTarget'); } })(cash); ;(function ($) { 'use strict'; var _defaults = { classes: '', dropdownOptions: {} }; /** * @class * */ var FormSelect = function (_Component20) { _inherits(FormSelect, _Component20); /** * Construct FormSelect instance * @constructor * @param {Element} el * @param {Object} options */ function FormSelect(el, options) { _classCallCheck(this, FormSelect); // Don't init if browser default version var _this68 = _possibleConstructorReturn(this, (FormSelect.__proto__ || Object.getPrototypeOf(FormSelect)).call(this, FormSelect, el, options)); if (_this68.$el.hasClass('browser-default')) { return _possibleConstructorReturn(_this68); } _this68.el.M_FormSelect = _this68; /** * Options for the select * @member FormSelect#options */ _this68.options = $.extend({}, FormSelect.defaults, options); _this68.isMultiple = _this68.$el.prop('multiple'); // Setup _this68.el.tabIndex = -1; _this68._keysSelected = {}; _this68._valueDict = {}; // Maps key to original and generated option element. _this68._setupDropdown(); _this68._setupEventHandlers(); return _this68; } _createClass(FormSelect, [{ key: "destroy", /** * Teardown component */ value: function destroy() { this._removeEventHandlers(); this._removeDropdown(); this.el.M_FormSelect = undefined; } /** * Setup Event Handlers */ }, { key: "_setupEventHandlers", value: function _setupEventHandlers() { var _this69 = this; this._handleSelectChangeBound = this._handleSelectChange.bind(this); this._handleOptionClickBound = this._handleOptionClick.bind(this); this._handleInputClickBound = this._handleInputClick.bind(this); $(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) { el.addEventListener('click', _this69._handleOptionClickBound); }); this.el.addEventListener('change', this._handleSelectChangeBound); this.input.addEventListener('click', this._handleInputClickBound); } /** * Remove Event Handlers */ }, { key: "_removeEventHandlers", value: function _removeEventHandlers() { var _this70 = this; $(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) { el.removeEventListener('click', _this70._handleOptionClickBound); }); this.el.removeEventListener('change', this._handleSelectChangeBound); this.input.removeEventListener('click', this._handleInputClickBound); } /** * Handle Select Change * @param {Event} e */ }, { key: "_handleSelectChange", value: function _handleSelectChange(e) { this._setValueToInput(); } /** * Handle Option Click * @param {Event} e */ }, { key: "_handleOptionClick", value: function _handleOptionClick(e) { e.preventDefault(); var option = $(e.target).closest('li')[0]; var key = option.id; if (!$(option).hasClass('disabled') && !$(option).hasClass('optgroup') && key.length) { var selected = true; if (this.isMultiple) { // Deselect placeholder option if still selected. var placeholderOption = $(this.dropdownOptions).find('li.disabled.selected'); if (placeholderOption.length) { placeholderOption.removeClass('selected'); placeholderOption.find('input[type="checkbox"]').prop('checked', false); this._toggleEntryFromArray(placeholderOption[0].id); } selected = this._toggleEntryFromArray(key); } else { $(this.dropdownOptions).find('li').removeClass('selected'); $(option).toggleClass('selected', selected); } // Set selected on original select option // Only trigger if selected state changed var prevSelected = $(this._valueDict[key].el).prop('selected'); if (prevSelected !== selected) { $(this._valueDict[key].el).prop('selected', selected); this.$el.trigger('change'); } } e.stopPropagation(); } /** * Handle Input Click */ }, { key: "_handleInputClick", value: function _handleInputClick() { if (this.dropdown && this.dropdown.isOpen) { this._setValueToInput(); this._setSelectedStates(); } } /** * Setup dropdown */ }, { key: "_setupDropdown", value: function _setupDropdown() { var _this71 = this; this.wrapper = document.createElement('div'); $(this.wrapper).addClass('select-wrapper ' + this.options.classes); this.$el.before($(this.wrapper)); this.wrapper.appendChild(this.el); if (this.el.disabled) { this.wrapper.classList.add('disabled'); } // Create dropdown this.$selectOptions = this.$el.children('option, optgroup'); this.dropdownOptions = document.createElement('ul'); this.dropdownOptions.id = "select-options-" + M.guid(); $(this.dropdownOptions).addClass('dropdown-content select-dropdown ' + (this.isMultiple ? 'multiple-select-dropdown' : '')); // Create dropdown structure. if (this.$selectOptions.length) { this.$selectOptions.each(function (el) { if ($(el).is('option')) { // Direct descendant option. var optionEl = void 0; if (_this71.isMultiple) { optionEl = _this71._appendOptionWithIcon(_this71.$el, el, 'multiple'); } else { optionEl = _this71._appendOptionWithIcon(_this71.$el, el); } _this71._addOptionToValueDict(el, optionEl); } else if ($(el).is('optgroup')) { // Optgroup. var selectOptions = $(el).children('option'); $(_this71.dropdownOptions).append($('
  • ' + el.getAttribute('label') + '
  • ')[0]); selectOptions.each(function (el) { var optionEl = _this71._appendOptionWithIcon(_this71.$el, el, 'optgroup-option'); _this71._addOptionToValueDict(el, optionEl); }); } }); } this.$el.after(this.dropdownOptions); // Add input dropdown this.input = document.createElement('input'); $(this.input).addClass('select-dropdown dropdown-trigger'); this.input.setAttribute('type', 'text'); this.input.setAttribute('readonly', 'true'); this.input.setAttribute('data-target', this.dropdownOptions.id); if (this.el.disabled) { $(this.input).prop('disabled', 'true'); } this.$el.before(this.input); this._setValueToInput(); // Add caret var dropdownIcon = $(''); this.$el.before(dropdownIcon[0]); // Initialize dropdown if (!this.el.disabled) { var dropdownOptions = $.extend({}, this.options.dropdownOptions); // Add callback for centering selected option when dropdown content is scrollable dropdownOptions.onOpenEnd = function (el) { var selectedOption = $(_this71.dropdownOptions).find('.selected').first(); if (selectedOption.length) { // Focus selected option in dropdown M.keyDown = true; _this71.dropdown.focusedIndex = selectedOption.index(); _this71.dropdown._focusFocusedItem(); M.keyDown = false; // Handle scrolling to selected option if (_this71.dropdown.isScrollable) { var scrollOffset = selectedOption[0].getBoundingClientRect().top - _this71.dropdownOptions.getBoundingClientRect().top; // scroll to selected option scrollOffset -= _this71.dropdownOptions.clientHeight / 2; // center in dropdown _this71.dropdownOptions.scrollTop = scrollOffset; } } }; if (this.isMultiple) { dropdownOptions.closeOnClick = false; } this.dropdown = M.Dropdown.init(this.input, dropdownOptions); } // Add initial selections this._setSelectedStates(); } /** * Add option to value dict * @param {Element} el original option element * @param {Element} optionEl generated option element */ }, { key: "_addOptionToValueDict", value: function _addOptionToValueDict(el, optionEl) { var index = Object.keys(this._valueDict).length; var key = this.dropdownOptions.id + index; var obj = {}; optionEl.id = key; obj.el = el; obj.optionEl = optionEl; this._valueDict[key] = obj; } /** * Remove dropdown */ }, { key: "_removeDropdown", value: function _removeDropdown() { $(this.wrapper).find('.caret').remove(); $(this.input).remove(); $(this.dropdownOptions).remove(); $(this.wrapper).before(this.$el); $(this.wrapper).remove(); } /** * Setup dropdown * @param {Element} select select element * @param {Element} option option element from select * @param {String} type * @return {Element} option element added */ }, { key: "_appendOptionWithIcon", value: function _appendOptionWithIcon(select, option, type) { // Add disabled attr if disabled var disabledClass = option.disabled ? 'disabled ' : ''; var optgroupClass = type === 'optgroup-option' ? 'optgroup-option ' : ''; var multipleCheckbox = this.isMultiple ? "" : option.innerHTML; var liEl = $('
  • '); var spanEl = $(''); spanEl.html(multipleCheckbox); liEl.addClass(disabledClass + " " + optgroupClass); liEl.append(spanEl); // add icons var iconUrl = option.getAttribute('data-icon'); if (!!iconUrl) { var imgEl = $("\"\""); liEl.prepend(imgEl); } // Check for multiple type. $(this.dropdownOptions).append(liEl[0]); return liEl[0]; } /** * Toggle entry from option * @param {String} key Option key * @return {Boolean} if entry was added or removed */ }, { key: "_toggleEntryFromArray", value: function _toggleEntryFromArray(key) { var notAdded = !this._keysSelected.hasOwnProperty(key); var $optionLi = $(this._valueDict[key].optionEl); if (notAdded) { this._keysSelected[key] = true; } else { delete this._keysSelected[key]; } $optionLi.toggleClass('selected', notAdded); // Set checkbox checked value $optionLi.find('input[type="checkbox"]').prop('checked', notAdded); // use notAdded instead of true (to detect if the option is selected or not) $optionLi.prop('selected', notAdded); return notAdded; } /** * Set text value to input */ }, { key: "_setValueToInput", value: function _setValueToInput() { var values = []; var options = this.$el.find('option'); options.each(function (el) { if ($(el).prop('selected')) { var text = $(el).text(); values.push(text); } }); if (!values.length) { var firstDisabled = this.$el.find('option:disabled').eq(0); if (firstDisabled.length && firstDisabled[0].value === '') { values.push(firstDisabled.text()); } } this.input.value = values.join(', '); } /** * Set selected state of dropdown to match actual select element */ }, { key: "_setSelectedStates", value: function _setSelectedStates() { this._keysSelected = {}; for (var key in this._valueDict) { var option = this._valueDict[key]; var optionIsSelected = $(option.el).prop('selected'); $(option.optionEl).find('input[type="checkbox"]').prop('checked', optionIsSelected); if (optionIsSelected) { this._activateOption($(this.dropdownOptions), $(option.optionEl)); this._keysSelected[key] = true; } else { $(option.optionEl).removeClass('selected'); } } } /** * Make option as selected and scroll to selected position * @param {jQuery} collection Select options jQuery element * @param {Element} newOption element of the new option */ }, { key: "_activateOption", value: function _activateOption(collection, newOption) { if (newOption) { if (!this.isMultiple) { collection.find('li.selected').removeClass('selected'); } var option = $(newOption); option.addClass('selected'); } } /** * Get Selected Values * @return {Array} Array of selected values */ }, { key: "getSelectedValues", value: function getSelectedValues() { var selectedValues = []; for (var key in this._keysSelected) { selectedValues.push(this._valueDict[key].el.value); } return selectedValues; } }], [{ key: "init", value: function init(els, options) { return _get(FormSelect.__proto__ || Object.getPrototypeOf(FormSelect), "init", this).call(this, this, els, options); } /** * Get Instance */ }, { key: "getInstance", value: function getInstance(el) { var domElem = !!el.jquery ? el[0] : el; return domElem.M_FormSelect; } }, { key: "defaults", get: function () { return _defaults; } }]); return FormSelect; }(Component); M.FormSelect = FormSelect; if (M.jQueryLoaded) { M.initializeJqueryWrapper(FormSelect, 'formSelect', 'M_FormSelect'); } })(cash); ;(function ($, anim) { 'use strict'; var _defaults = {}; /** * @class * */ var Range = function (_Component21) { _inherits(Range, _Component21); /** * Construct Range instance * @constructor * @param {Element} el * @param {Object} options */ function Range(el, options) { _classCallCheck(this, Range); var _this72 = _possibleConstructorReturn(this, (Range.__proto__ || Object.getPrototypeOf(Range)).call(this, Range, el, options)); _this72.el.M_Range = _this72; /** * Options for the range * @member Range#options */ _this72.options = $.extend({}, Range.defaults, options); _this72._mousedown = false; // Setup _this72._setupThumb(); _this72._setupEventHandlers(); return _this72; } _createClass(Range, [{ key: "destroy", /** * Teardown component */ value: function destroy() { this._removeEventHandlers(); this._removeThumb(); this.el.M_Range = undefined; } /** * Setup Event Handlers */ }, { key: "_setupEventHandlers", value: function _setupEventHandlers() { this._handleRangeChangeBound = this._handleRangeChange.bind(this); this._handleRangeMousedownTouchstartBound = this._handleRangeMousedownTouchstart.bind(this); this._handleRangeInputMousemoveTouchmoveBound = this._handleRangeInputMousemoveTouchmove.bind(this); this._handleRangeMouseupTouchendBound = this._handleRangeMouseupTouchend.bind(this); this._handleRangeBlurMouseoutTouchleaveBound = this._handleRangeBlurMouseoutTouchleave.bind(this); this.el.addEventListener('change', this._handleRangeChangeBound); this.el.addEventListener('mousedown', this._handleRangeMousedownTouchstartBound); this.el.addEventListener('touchstart', this._handleRangeMousedownTouchstartBound); this.el.addEventListener('input', this._handleRangeInputMousemoveTouchmoveBound); this.el.addEventListener('mousemove', this._handleRangeInputMousemoveTouchmoveBound); this.el.addEventListener('touchmove', this._handleRangeInputMousemoveTouchmoveBound); this.el.addEventListener('mouseup', this._handleRangeMouseupTouchendBound); this.el.addEventListener('touchend', this._handleRangeMouseupTouchendBound); this.el.addEventListener('blur', this._handleRangeBlurMouseoutTouchleaveBound); this.el.addEventListener('mouseout', this._handleRangeBlurMouseoutTouchleaveBound); this.el.addEventListener('touchleave', this._handleRangeBlurMouseoutTouchleaveBound); } /** * Remove Event Handlers */ }, { key: "_removeEventHandlers", value: function _removeEventHandlers() { this.el.removeEventListener('change', this._handleRangeChangeBound); this.el.removeEventListener('mousedown', this._handleRangeMousedownTouchstartBound); this.el.removeEventListener('touchstart', this._handleRangeMousedownTouchstartBound); this.el.removeEventListener('input', this._handleRangeInputMousemoveTouchmoveBound); this.el.removeEventListener('mousemove', this._handleRangeInputMousemoveTouchmoveBound); this.el.removeEventListener('touchmove', this._handleRangeInputMousemoveTouchmoveBound); this.el.removeEventListener('mouseup', this._handleRangeMouseupTouchendBound); this.el.removeEventListener('touchend', this._handleRangeMouseupTouchendBound); this.el.removeEventListener('blur', this._handleRangeBlurMouseoutTouchleaveBound); this.el.removeEventListener('mouseout', this._handleRangeBlurMouseoutTouchleaveBound); this.el.removeEventListener('touchleave', this._handleRangeBlurMouseoutTouchleaveBound); } /** * Handle Range Change * @param {Event} e */ }, { key: "_handleRangeChange", value: function _handleRangeChange() { $(this.value).html(this.$el.val()); if (!$(this.thumb).hasClass('active')) { this._showRangeBubble(); } var offsetLeft = this._calcRangeOffset(); $(this.thumb).addClass('active').css('left', offsetLeft + 'px'); } /** * Handle Range Mousedown and Touchstart * @param {Event} e */ }, { key: "_handleRangeMousedownTouchstart", value: function _handleRangeMousedownTouchstart(e) { // Set indicator value $(this.value).html(this.$el.val()); this._mousedown = true; this.$el.addClass('active'); if (!$(this.thumb).hasClass('active')) { this._showRangeBubble(); } if (e.type !== 'input') { var offsetLeft = this._calcRangeOffset(); $(this.thumb).addClass('active').css('left', offsetLeft + 'px'); } } /** * Handle Range Input, Mousemove and Touchmove */ }, { key: "_handleRangeInputMousemoveTouchmove", value: function _handleRangeInputMousemoveTouchmove() { if (this._mousedown) { if (!$(this.thumb).hasClass('active')) { this._showRangeBubble(); } var offsetLeft = this._calcRangeOffset(); $(this.thumb).addClass('active').css('left', offsetLeft + 'px'); $(this.value).html(this.$el.val()); } } /** * Handle Range Mouseup and Touchend */ }, { key: "_handleRangeMouseupTouchend", value: function _handleRangeMouseupTouchend() { this._mousedown = false; this.$el.removeClass('active'); } /** * Handle Range Blur, Mouseout and Touchleave */ }, { key: "_handleRangeBlurMouseoutTouchleave", value: function _handleRangeBlurMouseoutTouchleave() { if (!this._mousedown) { var paddingLeft = parseInt(this.$el.css('padding-left')); var marginLeft = 7 + paddingLeft + 'px'; if ($(this.thumb).hasClass('active')) { anim.remove(this.thumb); anim({ targets: this.thumb, height: 0, width: 0, top: 10, easing: 'easeOutQuad', marginLeft: marginLeft, duration: 100 }); } $(this.thumb).removeClass('active'); } } /** * Setup dropdown */ }, { key: "_setupThumb", value: function _setupThumb() { this.thumb = document.createElement('span'); this.value = document.createElement('span'); $(this.thumb).addClass('thumb'); $(this.value).addClass('value'); $(this.thumb).append(this.value); this.$el.after(this.thumb); } /** * Remove dropdown */ }, { key: "_removeThumb", value: function _removeThumb() { $(this.thumb).remove(); } /** * morph thumb into bubble */ }, { key: "_showRangeBubble", value: function _showRangeBubble() { var paddingLeft = parseInt($(this.thumb).parent().css('padding-left')); var marginLeft = -7 + paddingLeft + 'px'; // TODO: fix magic number? anim.remove(this.thumb); anim({ targets: this.thumb, height: 30, width: 30, top: -30, marginLeft: marginLeft, duration: 300, easing: 'easeOutQuint' }); } /** * Calculate the offset of the thumb * @return {Number} offset in pixels */ }, { key: "_calcRangeOffset", value: function _calcRangeOffset() { var width = this.$el.width() - 15; var max = parseFloat(this.$el.attr('max')) || 100; // Range default max var min = parseFloat(this.$el.attr('min')) || 0; // Range default min var percent = (parseFloat(this.$el.val()) - min) / (max - min); return percent * width; } }], [{ key: "init", value: function init(els, options) { return _get(Range.__proto__ || Object.getPrototypeOf(Range), "init", this).call(this, this, els, options); } /** * Get Instance */ }, { key: "getInstance", value: function getInstance(el) { var domElem = !!el.jquery ? el[0] : el; return domElem.M_Range; } }, { key: "defaults", get: function () { return _defaults; } }]); return Range; }(Component); M.Range = Range; if (M.jQueryLoaded) { M.initializeJqueryWrapper(Range, 'range', 'M_Range'); } Range.init($('input[type=range]')); })(cash, M.anime); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) /***/ }), /***/ "./node_modules/process/browser.js": /*!*****************************************!*\ !*** ./node_modules/process/browser.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }), /***/ "./node_modules/setimmediate/setImmediate.js": /*!***************************************************!*\ !*** ./node_modules/setimmediate/setImmediate.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) { "use strict"; if (global.setImmediate) { return; } var nextHandle = 1; // Spec says greater than zero var tasksByHandle = {}; var currentlyRunningATask = false; var doc = global.document; var registerImmediate; function setImmediate(callback) { // Callback can either be a function or a string if (typeof callback !== "function") { callback = new Function("" + callback); } // Copy function arguments var args = new Array(arguments.length - 1); for (var i = 0; i < args.length; i++) { args[i] = arguments[i + 1]; } // Store and register the task var task = { callback: callback, args: args }; tasksByHandle[nextHandle] = task; registerImmediate(nextHandle); return nextHandle++; } function clearImmediate(handle) { delete tasksByHandle[handle]; } function run(task) { var callback = task.callback; var args = task.args; switch (args.length) { case 0: callback(); break; case 1: callback(args[0]); break; case 2: callback(args[0], args[1]); break; case 3: callback(args[0], args[1], args[2]); break; default: callback.apply(undefined, args); break; } } function runIfPresent(handle) { // From the spec: "Wait until any invocations of this algorithm started before this one have completed." // So if we're currently running a task, we'll need to delay this invocation. if (currentlyRunningATask) { // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a // "too much recursion" error. setTimeout(runIfPresent, 0, handle); } else { var task = tasksByHandle[handle]; if (task) { currentlyRunningATask = true; try { run(task); } finally { clearImmediate(handle); currentlyRunningATask = false; } } } } function installNextTickImplementation() { registerImmediate = function(handle) { process.nextTick(function () { runIfPresent(handle); }); }; } function canUsePostMessage() { // The test against `importScripts` prevents this implementation from being installed inside a web worker, // where `global.postMessage` means something completely different and can't be used for this purpose. if (global.postMessage && !global.importScripts) { var postMessageIsAsynchronous = true; var oldOnMessage = global.onmessage; global.onmessage = function() { postMessageIsAsynchronous = false; }; global.postMessage("", "*"); global.onmessage = oldOnMessage; return postMessageIsAsynchronous; } } function installPostMessageImplementation() { // Installs an event handler on `global` for the `message` event: see // * https://developer.mozilla.org/en/DOM/window.postMessage // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages var messagePrefix = "setImmediate$" + Math.random() + "$"; var onGlobalMessage = function(event) { if (event.source === global && typeof event.data === "string" && event.data.indexOf(messagePrefix) === 0) { runIfPresent(+event.data.slice(messagePrefix.length)); } }; if (global.addEventListener) { global.addEventListener("message", onGlobalMessage, false); } else { global.attachEvent("onmessage", onGlobalMessage); } registerImmediate = function(handle) { global.postMessage(messagePrefix + handle, "*"); }; } function installMessageChannelImplementation() { var channel = new MessageChannel(); channel.port1.onmessage = function(event) { var handle = event.data; runIfPresent(handle); }; registerImmediate = function(handle) { channel.port2.postMessage(handle); }; } function installReadyStateChangeImplementation() { var html = doc.documentElement; registerImmediate = function(handle) { // Create a