forked from cbracco/html5-test-page
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeen-tracking.min.js.map
1 lines (1 loc) · 190 KB
/
keen-tracking.min.js.map
1
{"version":3,"sources":["webpack://Keen/webpack/bootstrap","webpack://Keen/./node_modules/keen-core/lib/utils/each.js","webpack://Keen/./node_modules/keen-core/lib/utils/extend.js","webpack://Keen/(webpack)/buildin/global.js","webpack://Keen/./lib/config-default.js","webpack://Keen/./node_modules/promise-polyfill/src/polyfill.js","webpack://Keen/./node_modules/promise-polyfill/src/finally.js","webpack://Keen/./lib/index.js","webpack://Keen/./node_modules/component-emitter/index.js","webpack://Keen/./node_modules/whatwg-fetch/fetch.js","webpack://Keen/./lib/utils/queue.js","webpack://Keen/./lib/extend-events.js","webpack://Keen/./lib/utils/deepExtend.js","webpack://Keen/./lib/utils/md5.js","webpack://Keen/./lib/helpers/getScreenProfile.js","webpack://Keen/./lib/helpers/getWindowProfile.js","webpack://Keen/./lib/helpers/getDomNodePath.js","webpack://Keen/./lib/helpers/getBasicDomNodeProfile.js","webpack://Keen/./node_modules/promise-polyfill/src/index.js","webpack://Keen/./lib/browser.js","webpack://Keen/./node_modules/keen-core/lib/index.js","webpack://Keen/./node_modules/keen-core/lib/utils/parse-params.js","webpack://Keen/./node_modules/keen-core/lib/utils/serialize.js","webpack://Keen/./lib/utils/listener.js","webpack://Keen/./lib/record-events-browser.js","webpack://Keen/./node_modules/timers-browserify/main.js","webpack://Keen/./node_modules/setimmediate/setImmediate.js","webpack://Keen/./node_modules/process/browser.js","webpack://Keen/./node_modules/keen-core/lib/utils/base64.js","webpack://Keen/./lib/utils/fetchRetry.js","webpack://Keen/./lib/utils/unique.js","webpack://Keen/./lib/utils/cache-browser.js","webpack://Keen/./lib/defer-events.js","webpack://Keen/./lib/browser-auto-tracking.js","webpack://Keen/./lib/helpers/getBrowserProfile.js","webpack://Keen/./lib/helpers/getDatetimeIndex.js","webpack://Keen/./lib/helpers/getDomainName.js","webpack://Keen/./lib/helpers/getDomNodeProfile.js","webpack://Keen/./lib/helpers/getDomNodeAttributes.js","webpack://Keen/./lib/helpers/getNParents.js","webpack://Keen/./lib/helpers/getScrollState.js","webpack://Keen/./lib/helpers/getUniqueId.js","webpack://Keen/./lib/utils/cookie.js","webpack://Keen/./node_modules/js-cookie/src/js.cookie.js","webpack://Keen/./lib/utils/serializeForm.js","webpack://Keen/./lib/utils/timer.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","cb","Array","length","target","arguments","prop","g","this","Function","e","window","configDefault","queue","capacity","interval","retry","limit","initialDelay","retryOnResponseStatuses","unique","cache","dbName","dbCollectionName","dbCollectionKey","maxAge","__webpack_exports__","global","_index__WEBPACK_IMPORTED_MODULE_0__","_finally__WEBPACK_IMPORTED_MODULE_1__","globalNS","self","Error","Promise","callback","constructor","then","resolve","reason","reject","_keenCore","_interopRequireDefault","_queue","KeenCore","helpers","on","client","extensions","events","collections","config","recordDeferredEvents","writeKey","str","String","referrerPolicy","setGlobalProperties","props","log","Emitter","obj","mixin","addEventListener","event","fn","_callbacks","push","once","off","apply","removeListener","removeAllListeners","removeEventListener","callbacks","splice","emit","args","len","slice","listeners","hasListeners","fetch","support","searchParams","iterable","blob","Blob","formData","arrayBuffer","viewClasses","isDataView","DataView","isPrototypeOf","isArrayBufferView","ArrayBuffer","isView","indexOf","toString","Headers","append","normalizeName","normalizeValue","oldValue","map","has","set","forEach","thisArg","keys","items","iteratorFor","values","entries","iterator","methods","Request","clone","body","_bodyInit","Body","Response","status","statusText","headers","url","error","response","type","redirectStatuses","redirect","RangeError","location","input","init","request","xhr","XMLHttpRequest","onload","rawHeaders","options","getAllResponseHeaders","replace","split","line","parts","shift","trim","join","responseURL","responseText","onerror","TypeError","ontimeout","open","method","credentials","withCredentials","responseType","setRequestHeader","send","polyfill","test","toLowerCase","next","done","undefined","isArray","header","getOwnPropertyNames","consumed","bodyUsed","fileReaderReady","reader","result","readBlobAsArrayBuffer","FileReader","promise","readAsArrayBuffer","bufferClone","buf","view","Uint8Array","byteLength","buffer","_initBody","_bodyText","_bodyBlob","FormData","_bodyFormData","URLSearchParams","_bodyArrayBuffer","rejected","text","readAsText","chars","fromCharCode","readArrayBufferAsText","decode","json","JSON","parse","upcased","toUpperCase","referrer","form","bytes","decodeURIComponent","bodyInit","ok","_componentEmitter","_configDefault","configQueue","_objectSpread","timer","check","shouldFlushQueue","flush","pause","clearInterval","start","setInterval","eventCollection","eventModifier","_typeof","handleValidationError","eventsModifier","_each","modifierResult","_deepExtend","deepExtend","message","concat","stringify","j","MD5","_","f","charCodeAt","charAt","M","V","h","md5_ii","md5_hh","md5_gg","md5_ff","safe_add","Y","X","md5_cmn","bit_rol","output","screen","orientation","angle","innerWidth","innerHeight","html","document","documentElement","height","offsetHeight","width","offsetWidth","scrollHeight","Math","max","clientHeight","ratio","availHeight","parseFloat","toFixed","availWidth","el","nodeName","stack","parentNode","sibCount","sibIndex","childNodes","sib","hasAttribute","id","unshift","class","getAttribute","href","all_attrs","_getDomNodeAttributes","getDomNodeAttributes","EXCLUDE_VALUE_REGEX","node_name","tag_name","tagName","title","setImmediate","_finally__WEBPACK_IMPORTED_MODULE_0__","setTimeoutFunc","setTimeout","noop","_state","_handled","_value","_deferreds","doResolve","handle","deferred","_immediateFn","onFulfilled","onRejected","ret","newValue","finale","_unhandledRejectionFn","Handler","ex","prom","all","arr","remaining","res","val","race","err","console","warn","_index","_extend","_listener","_recordEventsBrowser","_deferEvents","_extendEvents","_browserAutoTracking","_getBrowserProfile","_getDatetimeIndex","_getDomainName","_getDomNodePath","_getDomNodeProfile","_getScreenProfile","_getScrollState","_getUniqueId","_getWindowProfile","_cookie","_serializeForm","_timer","recordEvent","recordEvents","deferEvent","deferEvents","queueCapacity","queueInterval","extendEvent","extendEvents","initAutoTracking","initAutoTrackingCore","getBrowserProfile","getDatetimeIndex","getDomainName","getDomNodePath","getDomNodeProfile","getScreenProfile","getScrollState","getUniqueId","getWindowProfile","listener","listenerCore","utils","cookie","serializeForm","listenTo","listenerHash","eventType","selector","keenGlobals","webpackKeenGlobals","Keen","extendLibrary","KeenTracking","env","previousKeen","each","extend","parseParams","serialize","Client","configure","debug","isDefined","resources","legacyVersion","enabled","loaded","version","base","projects","projectId","queries","source","previous","noConflict","ready","host","protocol","requestType","navigator","userAgent","masterKey","path","baseUrl","arg","readyState","DOMContentLoaded","testDom","domReady","match","urlParams","pl","search","query","exec","data","encodeURIComponent","ctx","domListeners","attachEvent","addListener","evt","srcElement","handlers","elem","nodeList","querySelectorAll","matches","survivors","handler","hash","eventCollectionOrConfigObject","eventBody","_this","configObject","collection","checkValidation","extendedEventsHash","getExtendedEventBody","_unique","isUniqueResult","created","eventsHash","eventList","index","extendedEventBody","_base","_fetchRetry","_ref","_ref$configObject","sendBeacon","getRequestUrl","api_key","base64","encode","modified","Date","getTime","appVersion","getUrlMaxLength","img","createElement","naturalHeight","naturalWidth","src","Authorization","Content-Type","connectionError","responseJSON","error_code","eventsSavedSuccessfuly","filter","success","checkEventsSavedSuccessfuly","scope","Timeout","clearFn","_id","_clearFn","clearTimeout","timeout","close","unref","ref","enroll","item","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","_onTimeout","clearImmediate","process","registerImmediate","channel","messagePrefix","onGlobalMessage","nextHandle","tasksByHandle","currentlyRunningATask","doc","attachTo","getPrototypeOf","nextTick","runIfPresent","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","canUsePostMessage","MessageChannel","port1","port2","script","onreadystatechange","removeChild","appendChild","random","task","run","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","draining","queueIndex","cleanUpNextTick","drainQueue","marker","runClearTimeout","Item","array","browser","argv","versions","prependListener","prependOnceListener","binding","cwd","chdir","dir","umask","i1","i2","i3","e1","e2","e3","e4","utf8","isNaN","c2","c3","cc","retriesLimit","retryInitialDelay","retryOn","retriesCount","wrappedFetch","_md","_cacheBrowser","uniqueIds","isUnique","customCacheConfig","configCache","stringifiedEvent","hashingMethod","expiryTime","now","alreadySentEvent","find","storage","getFromCache","saveToCache","db","indexedDBAvailable","cachingEnabled","cacheConfig","initializeIndexedDb","requestCacheConfig","dbConnectionRequest","indexedDB","onupgradeneeded","objectStore","createObjectStore","keyPath","createIndex","onsuccess","requestSave","transaction","add","configOptions","indexCleanUp","upperBoundOpenKeyRange","IDBKeyRange","upperBound","openCursor","cursor","responseFromCache","transactionDelete","num","Number","clonedQueueConfig","clonedQueueEvents","lib","ignoreDisabledFormFields","ignoreFormFieldTypes","recordClicks","recordFormSubmits","recordInputChanges","recordPageUnloads","recordPageViews","recordPageViewsOnExit","recordScrollState","shareUuidAcrossDomains","collectIpAddress","collectUuid","catchError","domElementOptions","recordTextContent","redactTextContent","session_cookie","session_uuid","expire","uuid","prodperfectTestData","domainName","hostname","cookieDomain","domain","initialReferrer","tracker_loaded_at_time","toISOString","tracker_load_uuid_value","addons","ua_string","date_time","ip","remove_ip_property","date","browserProfile","scrollState","event_uuid","iso_time_full","local_time_full","session","tracked_by","pkg","tracker_load_uuid","tracker_loaded_at","prodperfect_test_data","user","page","description","scroll_state","time_on_page","round","getMiliSecondsSinceDate","time_on_page_ms","ip_address","geo","user_agent","tech","profile","full","info","initial","time","local","utc","keen","timestamp","element","serializerOptions","disabled","ignoreTypes","fields","x","action","_package","cookies","cookieEnabled","codeName","appCodeName","getDocumentDescription","language","appName","online","onLine","platform","useragent","querySelector","content","hour_of_day","getHours","day_of_week","parseInt","getDay","day_of_month","getDate","month","getMonth","year","getFullYear","extractHostname","splitArr","arrLen","_getBasicDomNodeProfile","getBasicDomNodeProfile","n_parents","_getNParents","getNParents","nParents","text_content","getTextContent","x_position","offsetLeft","clientLeft","y_position","offsetTop","clientTop","textContent","attributeNodes","attributes","attrs","node","parents","parent","nth_parent","state","pixel","pixel_max","ratio_max","pageYOffset","scrollTop","getScrollableArea","crypto","getRandomValues","v","_jsCookie","expires","Cookies","getJSON","daysUntilExpire","remove","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_RESULT__","converter","api","defaults","setMilliseconds","getMilliseconds","write","escape","toUTCString","secure","rdecode","read","withConverter","serializer","hash_serializer","str_serialize","elements","radio_store","k_r_success_contrls","k_r_submitter","checked","empty","selectOptions","isSelectedOptions","option","allowedEmpty","hasValue","selected","brackets","hash_assign","between","_values","string","children","RegExp","parse_keys","existing","count","clear"],"mappings":"qBACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QA0DA,OArDAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EA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C1BzqB,EAAK1C,KAAK4V,EAAM,IAGpB,OAAOlT,EAiEM4qB,CAAWhyB,GACIN,OAEvB,CAEH,IAAIuyB,EAAW5mB,EAAOrL,GAQlBiyB,GACGvxB,MAAMoK,QAAQmnB,KACjB5mB,EAAOrL,GAAO,CAAEiyB,IAGlB5mB,EAAOrL,GAAK0E,KAAKhF,IAGjB2L,EAAOrL,GAAON,EAIlB,OAAO2L,EAIT,SAASulB,EAAcvlB,EAAQrL,EAAKN,GAOlC,OALAA,EAAQA,EAAM2J,QAAQ,WAAY,QAIlC3J,GAHAA,EAAQmb,mBAAmBnb,IAGb2J,QAAQ,OAAQ,KACvBgC,GAAUA,EAAS,IAAM,IAAMwP,mBAAmB7a,GAAO,IAAMN,iCCnQjE,SAASmO,EAAM8Y,GACpB,OAAI3lB,gBAAgB6M,IAAU,EACrB,IAAIA,EAAM8Y,IAEnB3lB,KAAKkxB,MAAQvL,GAAO,EACb3lB,iEAGT6M,EAAMxN,UAAU8N,MAAQ,WACtB,IAAI5L,EAAOvB,KAKX,OAJAA,KAAKiN,QACLjN,KAAKO,SAAW6M,YAAY,WAC1B7L,EAAK2vB,SACJ,KACIlxB,MAGT6M,EAAMxN,UAAU4N,MAAQ,WAEtB,OADAC,cAAclN,KAAKO,UACZP,MAGT6M,EAAMxN,UAAUX,MAAQ,WACtB,OAAOsB,KAAKkxB,OAGdrkB,EAAMxN,UAAU8xB,MAAQ,WAEtB,OADAnxB,KAAKkxB,MAAQ,EACNlxB","file":"keen-tracking.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 18);\n","module.exports = each;\n\nfunction each(o, cb, s){\n var n;\n if (!o){\n return 0;\n }\n s = !s ? o : s;\n if (o instanceof Array){\n // Indexed arrays, needed for Safari\n for (n=0; n<o.length; n++) {\n if (cb.call(s, o[n], n, o) === false){\n return 0;\n }\n }\n } else {\n // Hashtables\n for (n in o){\n if (o.hasOwnProperty(n)) {\n if (cb.call(s, o[n], n, o) === false){\n return 0;\n }\n }\n }\n }\n return 1;\n}\n","module.exports = extend;\n\nfunction extend(target){\n for (var i = 1; i < arguments.length; i++) {\n for (var prop in arguments[i]){\n target[prop] = arguments[i][prop];\n }\n }\n return target;\n};\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","export const configDefault = {\n\n // defer events - queue\n // https://github.com/keen/keen-tracking.js/blob/master/docs/defer-events.md\n queue: {\n capacity: 5000,\n interval: 15,\n },\n\n // connection problems - retry request\n retry: {\n limit: 10,\n initialDelay: 200,\n retryOnResponseStatuses: [\n 408,\n 500,\n 502,\n 503,\n 504\n ]\n },\n\n unique: false, // record only unique events?\n // if so - store unique events hashes to compare\n cache: {\n /*\n storage: 'indexeddb', // uncomment for persistence\n */\n dbName: 'keenTracking', // indexedDB name\n dbCollectionName: 'events',\n dbCollectionKey: 'hash',\n\n /*\n hashingMethod: 'md5', // if undefined - store as stringified JSON\n */\n maxAge: 60 * 1000, // store for 1 minute\n }\n}\n\nexport default configDefault;\n","import Promise from './index';\nimport promiseFinally from './finally';\n\n/** @suppress {undefinedVars} */\nvar globalNS = (function() {\n // the only reliable means to get the global object is\n // `Function('return this')()`\n // However, this causes CSP violations in Chrome apps.\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('unable to locate global object');\n})();\n\nif (!('Promise' in globalNS)) {\n globalNS['Promise'] = Promise;\n} else if (!globalNS.Promise.prototype['finally']) {\n globalNS.Promise.prototype['finally'] = promiseFinally;\n}\n","/**\n * @this {Promise}\n */\nfunction finallyConstructor(callback) {\n var constructor = this.constructor;\n return this.then(\n function(value) {\n return constructor.resolve(callback()).then(function() {\n return value;\n });\n },\n function(reason) {\n return constructor.resolve(callback()).then(function() {\n return constructor.reject(reason);\n });\n }\n );\n}\n\nexport default finallyConstructor;\n","import KeenCore from 'keen-core';\nimport each from 'keen-core/lib/utils/each';\nimport extend from 'keen-core/lib/utils/extend';\nimport { queue } from'./utils/queue';\n\nKeenCore.helpers = KeenCore.helpers || {};\n\n// Install internal queue\nKeenCore.on('client', function(client){\n client.extensions = {\n events: [],\n collections: {}\n };\n client.queue = queue(client.config.queue);\n client.queue.on('flush', function(){\n client.recordDeferredEvents();\n });\n});\n\n// Accessors\nKeenCore.prototype.writeKey = function(str){\n if (!arguments.length) return this.config.writeKey;\n this.config.writeKey = (str ? String(str) : null);\n return this;\n};\n\nKeenCore.prototype.referrerPolicy = function(str){\n if (!arguments.length) return this.config.referrerPolicy;\n this.config.referrerPolicy = (str ? String(str) : null);\n return this;\n};\n\n// DEPRECATED\nKeenCore.prototype.setGlobalProperties = function(props){\n KeenCore.log('This method has been removed. Check out #extendEvents: https://github.com/keen/keen-tracking.js#extend-events');\n return this;\n};\n\nexport default KeenCore;\n","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n\r\n // Remove event specific arrays for event types that no\r\n // one is subscribed for to avoid memory leak.\r\n if (callbacks.length === 0) {\r\n delete this._callbacks['$' + event];\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n\r\n var args = new Array(arguments.length - 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n for (var i = 1; i < arguments.length; i++) {\r\n args[i - 1] = arguments[i];\r\n }\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n","(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ')\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status === undefined ? 200 : options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n","import Emitter from 'component-emitter';\n\nimport configDefault from '../config-default.js';\n\nexport function queue(configQueue = {}) {\n if (this instanceof queue === false) {\n return new queue(configQueue);\n }\n this.capacity = 0;\n this.config = {\n ...configDefault.queue,\n ...configQueue\n };\n this.events = {\n // \"collection-1\": [],\n // \"collection-2\": []\n };\n this.interval = 0;\n this.timer = null;\n return this;\n}\n\nEmitter(queue.prototype);\n\nqueue.prototype.check = function() {\n if (shouldFlushQueue(this)) {\n this.flush();\n }\n if (this.config.interval === 0 || this.capacity === 0) {\n this.pause();\n }\n return this;\n};\n\nqueue.prototype.flush = function() {\n this.emit('flush');\n this.interval = 0;\n return this;\n};\n\nqueue.prototype.pause = function() {\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n return this;\n};\n\nqueue.prototype.start = function() {\n var self = this;\n self.pause();\n self.timer = setInterval(function() {\n self.interval++;\n self.check();\n }, 1000);\n return self;\n};\n\nfunction shouldFlushQueue(props) {\n if (props.capacity > 0 && props.interval >= props.config.interval) {\n return true;\n }\n else if (props.capacity >= props.config.capacity) {\n return true;\n }\n return false;\n}\n","import { deepExtend } from './utils/deepExtend';\nimport each from 'keen-core/lib/utils/each';\n\nexport function extendEvent(eventCollection, eventModifier){\n if (arguments.length !== 2 || typeof eventCollection !== 'string'\n || ('object' !== typeof eventModifier && 'function' !== typeof eventModifier)) {\n handleValidationError.call(this, 'Incorrect arguments provided to #extendEvent method');\n return;\n }\n this.extensions.collections[eventCollection] = this.extensions.collections[eventCollection] || [];\n this.extensions.collections[eventCollection].push(eventModifier);\n this.emit('extendEvent', eventCollection, eventModifier);\n return this;\n}\n\nexport function extendEvents(eventsModifier){\n if (arguments.length !== 1 || ('object' !== typeof eventsModifier && 'function' !== typeof eventsModifier)) {\n handleValidationError.call(this, 'Incorrect arguments provided to #extendEvents method');\n return;\n }\n this.extensions.events.push(eventsModifier);\n this.emit('extendEvents', eventsModifier);\n return this;\n}\n\nfunction handleValidationError(message){\n this.emit('error', `Event(s) not extended: ${message}`);\n}\n\nexport function getExtendedEventBody(result, queue){\n if (queue && queue.length > 0) {\n each(queue, function(eventModifier, i){\n let modifierResult = (typeof eventModifier === 'function') ? eventModifier() : eventModifier;\n deepExtend(result, modifierResult);\n });\n }\n return result;\n}\n","export const deepExtend = function(target){\n for (var i = 1; i < arguments.length; i++) {\n // Copy unique items from incoming array\n if (target instanceof Array && arguments[i] instanceof Array) {\n for (var j = 0; j < arguments[i].length; j++) {\n if (target.indexOf(arguments[i][j]) < 0) {\n target.push(arguments[i][j]);\n }\n }\n }\n // Blend objects\n else {\n for (var prop in arguments[i]){\n // Recurse when both contain objects of same name\n // and incoming is not a null object\n if (typeof target[prop] !== 'undefined'\n && typeof arguments[i][prop] === 'object'\n && arguments[i][prop] !== null) {\n deepExtend(target[prop], clone(arguments[i][prop]));\n }\n // Otherwise just copy it over...\n else if (\n arguments[i][prop] !== undefined &&\n typeof arguments[i][prop] !== 'function') {\n target[prop] = clone(arguments[i][prop]);\n }\n }\n }\n }\n return target;\n}\n\nfunction clone(input){\n return JSON.parse( JSON.stringify(input) );\n}\n","export const MD5 = function(d){const result = M(V(Y(X(d),8*d.length)));return result.toLowerCase()};function M(d){for(var _,m=\"0123456789ABCDEF\",f=\"\",r=0;r<d.length;r++)_=d.charCodeAt(r),f+=m.charAt(_>>>4&15)+m.charAt(15&_);return f}function X(d){for(var _=Array(d.length>>2),m=0;m<_.length;m++)_[m]=0;for(m=0;m<8*d.length;m+=8)_[m>>5]|=(255&d.charCodeAt(m/8))<<m%32;return _}function V(d){for(var _=\"\",m=0;m<32*d.length;m+=8)_+=String.fromCharCode(d[m>>5]>>>m%32&255);return _}function Y(d,_){d[_>>5]|=128<<_%32,d[14+(_+64>>>9<<4)]=_;for(var m=1732584193,f=-271733879,r=-1732584194,i=271733878,n=0;n<d.length;n+=16){var h=m,t=f,g=r,e=i;f=md5_ii(f=md5_ii(f=md5_ii(f=md5_ii(f=md5_hh(f=md5_hh(f=md5_hh(f=md5_hh(f=md5_gg(f=md5_gg(f=md5_gg(f=md5_gg(f=md5_ff(f=md5_ff(f=md5_ff(f=md5_ff(f,r=md5_ff(r,i=md5_ff(i,m=md5_ff(m,f,r,i,d[n+0],7,-680876936),f,r,d[n+1],12,-389564586),m,f,d[n+2],17,606105819),i,m,d[n+3],22,-1044525330),r=md5_ff(r,i=md5_ff(i,m=md5_ff(m,f,r,i,d[n+4],7,-176418897),f,r,d[n+5],12,1200080426),m,f,d[n+6],17,-1473231341),i,m,d[n+7],22,-45705983),r=md5_ff(r,i=md5_ff(i,m=md5_ff(m,f,r,i,d[n+8],7,1770035416),f,r,d[n+9],12,-1958414417),m,f,d[n+10],17,-42063),i,m,d[n+11],22,-1990404162),r=md5_ff(r,i=md5_ff(i,m=md5_ff(m,f,r,i,d[n+12],7,1804603682),f,r,d[n+13],12,-40341101),m,f,d[n+14],17,-1502002290),i,m,d[n+15],22,1236535329),r=md5_gg(r,i=md5_gg(i,m=md5_gg(m,f,r,i,d[n+1],5,-165796510),f,r,d[n+6],9,-1069501632),m,f,d[n+11],14,643717713),i,m,d[n+0],20,-373897302),r=md5_gg(r,i=md5_gg(i,m=md5_gg(m,f,r,i,d[n+5],5,-701558691),f,r,d[n+10],9,38016083),m,f,d[n+15],14,-660478335),i,m,d[n+4],20,-405537848),r=md5_gg(r,i=md5_gg(i,m=md5_gg(m,f,r,i,d[n+9],5,568446438),f,r,d[n+14],9,-1019803690),m,f,d[n+3],14,-187363961),i,m,d[n+8],20,1163531501),r=md5_gg(r,i=md5_gg(i,m=md5_gg(m,f,r,i,d[n+13],5,-1444681467),f,r,d[n+2],9,-51403784),m,f,d[n+7],14,1735328473),i,m,d[n+12],20,-1926607734),r=md5_hh(r,i=md5_hh(i,m=md5_hh(m,f,r,i,d[n+5],4,-378558),f,r,d[n+8],11,-2022574463),m,f,d[n+11],16,1839030562),i,m,d[n+14],23,-35309556),r=md5_hh(r,i=md5_hh(i,m=md5_hh(m,f,r,i,d[n+1],4,-1530992060),f,r,d[n+4],11,1272893353),m,f,d[n+7],16,-155497632),i,m,d[n+10],23,-1094730640),r=md5_hh(r,i=md5_hh(i,m=md5_hh(m,f,r,i,d[n+13],4,681279174),f,r,d[n+0],11,-358537222),m,f,d[n+3],16,-722521979),i,m,d[n+6],23,76029189),r=md5_hh(r,i=md5_hh(i,m=md5_hh(m,f,r,i,d[n+9],4,-640364487),f,r,d[n+12],11,-421815835),m,f,d[n+15],16,530742520),i,m,d[n+2],23,-995338651),r=md5_ii(r,i=md5_ii(i,m=md5_ii(m,f,r,i,d[n+0],6,-198630844),f,r,d[n+7],10,1126891415),m,f,d[n+14],15,-1416354905),i,m,d[n+5],21,-57434055),r=md5_ii(r,i=md5_ii(i,m=md5_ii(m,f,r,i,d[n+12],6,1700485571),f,r,d[n+3],10,-1894986606),m,f,d[n+10],15,-1051523),i,m,d[n+1],21,-2054922799),r=md5_ii(r,i=md5_ii(i,m=md5_ii(m,f,r,i,d[n+8],6,1873313359),f,r,d[n+15],10,-30611744),m,f,d[n+6],15,-1560198380),i,m,d[n+13],21,1309151649),r=md5_ii(r,i=md5_ii(i,m=md5_ii(m,f,r,i,d[n+4],6,-145523070),f,r,d[n+11],10,-1120210379),m,f,d[n+2],15,718787259),i,m,d[n+9],21,-343485551),m=safe_add(m,h),f=safe_add(f,t),r=safe_add(r,g),i=safe_add(i,e)}return Array(m,f,r,i)}function md5_cmn(d,_,m,f,r,i){return safe_add(bit_rol(safe_add(safe_add(_,d),safe_add(f,i)),r),m)}function md5_ff(d,_,m,f,r,i,n){return md5_cmn(_&m|~_&f,d,_,r,i,n)}function md5_gg(d,_,m,f,r,i,n){return md5_cmn(_&f|m&~f,d,_,r,i,n)}function md5_hh(d,_,m,f,r,i,n){return md5_cmn(_^m^f,d,_,r,i,n)}function md5_ii(d,_,m,f,r,i,n){return md5_cmn(m^(_|~f),d,_,r,i,n)}function safe_add(d,_){var m=(65535&d)+(65535&_);return(d>>16)+(_>>16)+(m>>16)<<16|65535&m}function bit_rol(d,_){return d<<_|d>>>32-_}\n\nexport default MD5;\n","export function getScreenProfile(){\n var keys, output;\n\n if ('undefined' == typeof window || !window.screen) return {};\n\n keys = ['height', 'width', 'colorDepth', 'pixelDepth', 'availHeight', 'availWidth'];\n output = {};\n\n for (var i = 0; i < keys.length; i++) {\n output[keys[i]] = window.screen[keys[i]] ? window.screen[keys[i]] : null;\n }\n\n output.orientation = {\n 'angle' : window.screen.orientation ? window.screen.orientation['angle'] : 0,\n 'type' : window.innerWidth > window.innerHeight ? 'landscape': 'portrait'\n };\n\n return output;\n}\n","export function getWindowProfile(){\n var body, html, output;\n\n if ('undefined' == typeof document) return {};\n\n body = document.body;\n html = document.documentElement;\n\n output = {\n 'height': ('innerHeight' in window) ? window.innerHeight : document.documentElement.offsetHeight,\n 'width': ('innerWidth' in window) ? window.innerWidth : document.documentElement.offsetWidth,\n 'scrollHeight': Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight ) || null\n };\n\n if (window.screen) {\n output.ratio = {\n 'height': (window.screen.availHeight) ? parseFloat( (window.innerHeight/window.screen.availHeight).toFixed(2) ) : null,\n 'width': (window.screen.availWidth) ? parseFloat( (window.innerWidth/window.screen.availWidth).toFixed(2) ) : null\n };\n }\n\n return output;\n}\n\n/*\n Notes:\n document.documentElement.offsetHeight/Width is a workaround for IE8 and below, where window.innerHeight/Width is undefined\n*/\n","export function getDomNodePath(el){\n if (!el.nodeName) return '';\n\n var stack = [];\n while ( el.parentNode != null ) {\n // console.log(el.nodeName);\n var sibCount = 0;\n var sibIndex = 0;\n for ( var i = 0; i < el.parentNode.childNodes.length; i++ ) {\n var sib = el.parentNode.childNodes[i];\n if ( sib.nodeName == el.nodeName ) {\n if ( sib === el ) {\n sibIndex = sibCount;\n }\n sibCount++;\n }\n }\n if ( el.hasAttribute('id') && el.id != '' ) {\n stack.unshift(el.nodeName.toLowerCase() + '#' + el.id);\n } else if ( sibCount > 1 ) {\n stack.unshift(el.nodeName.toLowerCase() + ':eq(' + sibIndex + ')');\n } else {\n stack.unshift(el.nodeName.toLowerCase());\n }\n el = el.parentNode;\n }\n\n return stack.slice(1).join(' > ');\n}\n\n\n// via: http://stackoverflow.com/a/16742828/2511985\n","import { getDomNodeAttributes } from './getDomNodeAttributes';\n\nconst EXCLUDE_VALUE_REGEX = /^((?!value).)*$/;\n\nexport function getBasicDomNodeProfile(el) {\n return {\n class: (el.getAttribute && el.getAttribute('class')) || null,\n href: el.href || null,\n id: (el.getAttribute && el.getAttribute('id')) || null,\n name: (el.getAttribute && el.getAttribute('name')) || null,\n all_attrs: getDomNodeAttributes(el, EXCLUDE_VALUE_REGEX),\n node_name: el.nodeName,\n tag_name: el.tagName,\n text: el.text,\n title: el.title,\n type: el.type\n };\n}\n","import promiseFinally from './finally';\n\n// Store setTimeout reference so promise-polyfill will be unaffected by\n// other code modifying setTimeout (like sinon.useFakeTimers())\nvar setTimeoutFunc = setTimeout;\n\nfunction noop() {}\n\n// Polyfill for Function.prototype.bind\nfunction bind(fn, thisArg) {\n return function() {\n fn.apply(thisArg, arguments);\n };\n}\n\n/**\n * @constructor\n * @param {Function} fn\n */\nfunction Promise(fn) {\n if (!(this instanceof Promise))\n throw new TypeError('Promises must be constructed via new');\n if (typeof fn !== 'function') throw new TypeError('not a function');\n /** @type {!number} */\n this._state = 0;\n /** @type {!boolean} */\n this._handled = false;\n /** @type {Promise|undefined} */\n this._value = undefined;\n /** @type {!Array<!Function>} */\n this._deferreds = [];\n\n doResolve(fn, this);\n}\n\nfunction handle(self, deferred) {\n while (self._state === 3) {\n self = self._value;\n }\n if (self._state === 0) {\n self._deferreds.push(deferred);\n return;\n }\n self._handled = true;\n Promise._immediateFn(function() {\n var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n return;\n }\n var ret;\n try {\n ret = cb(self._value);\n } catch (e) {\n reject(deferred.promise, e);\n return;\n }\n resolve(deferred.promise, ret);\n });\n}\n\nfunction resolve(self, newValue) {\n try {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self)\n throw new TypeError('A promise cannot be resolved with itself.');\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = newValue.then;\n if (newValue instanceof Promise) {\n self._state = 3;\n self._value = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(bind(then, newValue), self);\n return;\n }\n }\n self._state = 1;\n self._value = newValue;\n finale(self);\n } catch (e) {\n reject(self, e);\n }\n}\n\nfunction reject(self, newValue) {\n self._state = 2;\n self._value = newValue;\n finale(self);\n}\n\nfunction finale(self) {\n if (self._state === 2 && self._deferreds.length === 0) {\n Promise._immediateFn(function() {\n if (!self._handled) {\n Promise._unhandledRejectionFn(self._value);\n }\n });\n }\n\n for (var i = 0, len = self._deferreds.length; i < len; i++) {\n handle(self, self._deferreds[i]);\n }\n self._deferreds = null;\n}\n\n/**\n * @constructor\n */\nfunction Handler(onFulfilled, onRejected, promise) {\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}\n\nPromise.prototype['catch'] = function(onRejected) {\n return this.then(null, onRejected);\n};\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n // @ts-ignore\n var prom = new this.constructor(noop);\n\n handle(this, new Handler(onFulfilled, onRejected, prom));\n return prom;\n};\n\nPromise.prototype['finally'] = promiseFinally;\n\nPromise.all = function(arr) {\n return new Promise(function(resolve, reject) {\n if (!arr || typeof arr.length === 'undefined')\n throw new TypeError('Promise.all accepts an array');\n var args = Array.prototype.slice.call(arr);\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n\n function res(i, val) {\n try {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n var then = val.then;\n if (typeof then === 'function') {\n then.call(\n val,\n function(val) {\n res(i, val);\n },\n reject\n );\n return;\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n } catch (ex) {\n reject(ex);\n }\n }\n\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.resolve = function(value) {\n if (value && typeof value === 'object' && value.constructor === Promise) {\n return value;\n }\n\n return new Promise(function(resolve) {\n resolve(value);\n });\n};\n\nPromise.reject = function(value) {\n return new Promise(function(resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function(values) {\n return new Promise(function(resolve, reject) {\n for (var i = 0, len = values.length; i < len; i++) {\n values[i].then(resolve, reject);\n }\n });\n};\n\n// Use polyfill for setImmediate for performance gains\nPromise._immediateFn =\n (typeof setImmediate === 'function' &&\n function(fn) {\n setImmediate(fn);\n }) ||\n function(fn) {\n setTimeoutFunc(fn, 0);\n };\n\nPromise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n if (typeof console !== 'undefined' && console) {\n console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\n }\n};\n\nexport default Promise;\n","import KeenCore from './index';\nimport each from 'keen-core/lib/utils/each';\nimport extend from 'keen-core/lib/utils/extend';\nimport { listenerCore } from './utils/listener';\nimport {\n recordEvent,\n recordEvents\n} from './record-events-browser';\nimport {\n deferEvent,\n deferEvents,\n queueCapacity,\n queueInterval,\n recordDeferredEvents\n} from './defer-events';\nimport { extendEvent, extendEvents } from './extend-events';\nimport { initAutoTrackingCore } from './browser-auto-tracking';\nimport { getBrowserProfile } from './helpers/getBrowserProfile';\nimport { getDatetimeIndex } from './helpers/getDatetimeIndex';\nimport { getDomainName } from './helpers/getDomainName';\nimport { getDomNodePath } from './helpers/getDomNodePath';\nimport { getDomNodeProfile } from './helpers/getDomNodeProfile';\nimport { getScreenProfile } from './helpers/getScreenProfile';\nimport { getScrollState } from './helpers/getScrollState';\nimport { getUniqueId } from './helpers/getUniqueId';\nimport { getWindowProfile } from './helpers/getWindowProfile';\nimport { cookie } from './utils/cookie';\nimport { deepExtend } from './utils/deepExtend';\nimport { serializeForm } from './utils/serializeForm';\nimport { timer } from './utils/timer';\n\n// ------------------------\n// Methods\n// ------------------------\nextend(KeenCore.prototype, {\n recordEvent,\n recordEvents\n});\n\nextend(KeenCore.prototype, {\n deferEvent,\n deferEvents,\n queueCapacity,\n queueInterval,\n recordDeferredEvents\n});\nextend(KeenCore.prototype, {\n extendEvent,\n extendEvents\n});\n\n// ------------------------\n// Auto-Tracking\n// ------------------------\nconst initAutoTracking = initAutoTrackingCore(KeenCore);\nextend(KeenCore.prototype, {\n initAutoTracking\n});\n\n// ------------------------\n// Helpers\n// ------------------------\nextend(KeenCore.helpers, {\n getBrowserProfile,\n getDatetimeIndex,\n getDomainName,\n getDomNodePath,\n getDomNodeProfile,\n getScreenProfile,\n getScrollState,\n getUniqueId,\n getWindowProfile\n});\n\n// ------------------------\n// Utils\n// ------------------------\nconst listener = listenerCore(KeenCore);\nextend(KeenCore.utils, {\n cookie,\n deepExtend,\n listener,\n serializeForm,\n timer\n});\n\nKeenCore.listenTo = (listenerHash) => {\n each(listenerHash, (callback, key) => {\n let split = key.split(' ');\n let eventType = split[0],\n selector = split.slice(1, split.length).join(' ');\n // Create an unassigned listener\n return listener(selector).on(eventType, callback);\n });\n};\n\nexport let keenGlobals = undefined;\nif (typeof webpackKeenGlobals !== 'undefined') {\n keenGlobals = webpackKeenGlobals;\n}\n\nexport const Keen = KeenCore.extendLibrary(KeenCore); // deprecated, left for backward compatibility\nexport const KeenTracking = Keen;\nexport default Keen;\n","(function(env){\n var previousKeen = env.Keen || undefined;\n var each = require('./utils/each'),\n extend = require('./utils/extend'),\n parseParams = require('./utils/parse-params'),\n serialize = require('./utils/serialize');\n\n var Emitter = require('component-emitter');\n\n function Client(props){\n if (this instanceof Client === false) {\n return new Client(props);\n }\n this.configure(props);\n\n // Set up event handling\n if (Client.debug) {\n this.on('error', Client.log);\n }\n this.emit('ready');\n Client.emit('client', this);\n }\n\n if (previousKeen && typeof previousKeen.resources === 'undefined') {\n Client.legacyVersion = previousKeen;\n }\n\n Emitter(Client);\n Emitter(Client.prototype);\n\n extend(Client, {\n debug: false,\n enabled: true,\n loaded: false,\n version: '__VERSION__'\n });\n\n // Set or extend helpers\n Client.helpers = Client.helpers || {};\n\n // Set or extend resources\n Client.resources = Client.resources || {};\n extend(Client.resources, {\n 'base' : '{protocol}://{host}',\n 'version' : '{protocol}://{host}/3.0',\n 'projects' : '{protocol}://{host}/3.0/projects',\n 'projectId' : '{protocol}://{host}/3.0/projects/{projectId}',\n 'events' : '{protocol}://{host}/3.0/projects/{projectId}/events',\n 'queries' : '{protocol}://{host}/3.0/projects/{projectId}/queries'\n });\n\n // Set or extend utils\n Client.utils = Client.utils || {};\n extend(Client.utils, {\n 'each' : each,\n 'extend' : extend,\n 'parseParams' : parseParams,\n 'serialize' : serialize\n });\n\n Client.extendLibrary = function(target, source) {\n var previous = previousKeen || source;\n if (isDefined(previous) && isDefined(previous.resources)) {\n each(previous, function(value, key) {\n if (typeof value === 'object') {\n target[key] = target[key] || {};\n extend(target[key], value);\n }\n else {\n target[key] = target[key] || value;\n }\n });\n extend(target.prototype, previous.prototype);\n }\n return target;\n };\n\n Client.log = function(str){\n if (Client.debug && typeof console === 'object') {\n console.log('[Keen]', str);\n }\n };\n\n Client.noConflict = function(){\n if (typeof env.Keen !== 'undefined') {\n env.Keen = Client.legacyVersion || previousKeen;\n }\n return Client;\n };\n\n Client.ready = function(fn){\n if (Client.loaded) {\n fn();\n }\n else {\n Client.once('ready', fn);\n }\n };\n\n Client.prototype.configure = function(obj){\n var config = obj || {};\n this.config = this.config || {\n projectId : undefined,\n writeKey : undefined,\n host : 'api.keen.io',\n protocol : 'https',\n requestType : 'jsonp',\n resources : extend({}, Client.resources)\n };\n\n // IE<10 request shim\n if (typeof window !== 'undefined' && window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf('MSIE') > -1) {\n config.protocol = document.location.protocol.replace(':', '');\n }\n\n if (config.host) {\n config.host.replace(/.*?:\\/\\//g, '');\n }\n\n extend(this.config, config);\n return this;\n };\n\n Client.prototype.masterKey = function(str){\n if (!arguments.length) return this.config.masterKey;\n this.config.masterKey = str ? String(str) : null;\n return this;\n };\n\n Client.prototype.projectId = function(str){\n if (!arguments.length) return this.config.projectId;\n this.config.projectId = (str ? String(str) : null);\n return this;\n };\n\n Client.prototype.resources = function(obj){\n if (!arguments.length) return this.config.resources;\n var self = this;\n if (typeof obj === 'object') {\n each(obj, function(value, key){\n self.config.resources[key] = (value ? value : null);\n });\n }\n return self;\n };\n\n Client.prototype.url = function(name){\n var args = Array.prototype.slice.call(arguments, 1),\n baseUrl = this.config.resources.base || '{protocol}://{host}',\n path;\n\n if (name && typeof name === 'string') {\n if (this.config.resources[name]) {\n path = this.config.resources[name];\n }\n else {\n path = baseUrl + name;\n }\n }\n else {\n path = baseUrl;\n }\n\n each(this.config, function(value, key){\n if (typeof value !== 'object') {\n path = path.replace('{' + key + '}', value);\n }\n });\n\n each(args, function(arg, i){\n if (typeof arg === 'string') {\n path += '/' + arg;\n }\n else if (typeof arg === 'object') {\n path += '?';\n each(arg, function(value, key){\n path += key + '=' + value + '&';\n });\n path = path.slice(0, -1);\n }\n });\n\n return path;\n };\n\n domReady(function(){\n Client.loaded = true;\n Client.emit('ready');\n });\n\n function domReady(fn){\n if (Client.loaded || typeof document === 'undefined') {\n fn();\n return;\n }\n // Firefox 3.5 shim\n if(document.readyState == null && document.addEventListener){\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(){\n document.removeEventListener('DOMContentLoaded', DOMContentLoaded, false);\n document.readyState = 'complete';\n }, false);\n document.readyState = 'loading';\n }\n testDom(fn);\n }\n\n function testDom(fn){\n if (/in/.test(document.readyState)) {\n setTimeout(function(){\n testDom(fn);\n }, 9);\n }\n else {\n fn();\n }\n }\n\n function isDefined(target) {\n return typeof target !== 'undefined';\n }\n\n function isUndefined(target) {\n return typeof target === 'undefined';\n }\n\n module.exports = Client;\n\n}).call(this, typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {});\n","module.exports = parseParams;\n\nfunction parseParams(str){\n // via: http://stackoverflow.com/a/2880929/2511985\n var urlParams = {},\n match,\n pl = /\\+/g, // Regex for replacing addition symbol with a space\n search = /([^&=]+)=?([^&]*)/g,\n decode = function (s) { return decodeURIComponent(s.replace(pl, \" \")); },\n query = str.split(\"?\")[1];\n\n while (!!(match=search.exec(query))) {\n urlParams[decode(match[1])] = decode(match[2]);\n }\n return urlParams;\n};\n","var each = require('./each'),\n extend = require('./extend');\n\nmodule.exports = serialize;\n\nfunction serialize(data){\n var query = [];\n each(data, function(value, key){\n if ('string' !== typeof value) {\n value = JSON.stringify(value);\n }\n query.push(key + '=' + encodeURIComponent(value));\n });\n return query.join('&');\n}\n","import Emitter from 'component-emitter';\nimport each from 'keen-core/lib/utils/each';\n/*\n\n // Create a new element listner\n var myClickerCatcher = Keen.utils.listener(\".nav li > a\");\n\n // Listen for a given event\n myClicker.on(\"click\", function(e){\n // do stuff!\n });\n\n // Listen for event once\n myClicker.once(\"click\", function(e){ });\n\n // Cancel a given event listener\n myClicker.off(\"click\");\n\n // Cancel all event listners\n myClicker.off();\n\n*/\n\nexport const listenerCore = function(ctx){\n\n // Make sure this object exists\n ctx.domListeners = ctx.domListeners || {\n /*\n 'click': {\n '.nav li > a': [fn, fn, fn]\n }\n */\n };\n\n function listener(str){\n if (!str) return;\n if (this instanceof listener === false) {\n return new listener(str);\n }\n this.selector = str;\n return this;\n }\n\n listener.prototype.on = function(str, fn){\n var self = this;\n\n if (arguments.length !== 2 || 'string' !== typeof str || 'function' !== typeof fn) return this;\n\n // Set each listener on a parent dictionary, indexed by event:\n if ('undefined' === typeof ctx.domListeners[str]) {\n addListener(str, eventHandler(str));\n ctx.domListeners[str] = {};\n }\n ctx.domListeners[str][self.selector] = ctx.domListeners[str][self.selector] || [];\n ctx.domListeners[str][self.selector].push(fn);\n return self;\n };\n\n listener.prototype.once = function(str, fn){\n var self = this;\n function on() {\n self.off(str, on);\n return fn.apply(self, arguments);\n }\n on.fn = fn;\n self.on(str, on);\n return self;\n };\n\n listener.prototype.off = function(str, fn){\n var self = this, survivors = [];\n if (arguments.length === 2) {\n each(ctx.domListeners[str][self.selector], function(handler, i){\n if (handler === fn || handler.fn === fn) return;\n survivors.push(handler);\n });\n ctx.domListeners[str][self.selector] = survivors;\n }\n else if (arguments.length === 1) {\n try {\n delete ctx.domListeners[str][self.selector];\n }\n catch(e){\n ctx.domListeners[str][self.selector] = [];\n }\n }\n else {\n // loop over every eventType and delete handlers\n each(ctx.domListeners, function(hash, eventType){\n // if ('undefined' === typeof hash[str]) return;\n try {\n delete ctx.domListeners[eventType][self.selector];\n }\n catch(e){\n ctx.domListeners[eventType][self.selector] = function(){};\n }\n });\n }\n return self;\n };\n\n function eventHandler(eventType){\n return function(e){\n var evt, target;\n\n evt = e || window.event;\n target = evt.target || evt.srcElement;\n\n // If nothing assigned to this event type, let it go\n if ('undefined' === ctx.domListeners[eventType]) return;\n\n each(ctx.domListeners[eventType], function(handlers, key){\n\n if (matches(target, key)) {\n // Call all handlers for this eventType + node\n each(handlers, function(fn, i){\n fn(evt);\n });\n }\n else if ('window' === key) {\n // Call all handlers\n each(handlers, function(fn, i){\n fn(evt);\n });\n }\n return;\n });\n };\n }\n\n return listener;\n}\n\n\n// ------------------------------\n// Attach global event listener\n// ------------------------------\n\nfunction addListener(eventType, fn){\n if (document.addEventListener) {\n document.addEventListener(eventType, fn, false);\n } else {\n document.attachEvent(\"on\" + eventType, fn);\n }\n}\n\n\n// ------------------------------\n// Match DOM element to selector\n// ------------------------------\n\nfunction matches(elem, selector) {\n // We'll use querySelectorAll to find all element matching the selector,\n // then check if the given element is included in that list.\n // Executing the query on the parentNode reduces the resulting nodeList,\n // document doesn't have a parentNode, though.\n var nodeList = ( elem.parentNode || document ).querySelectorAll( selector ) || [],\n i = nodeList.length;\n\n // loop on the nodeList\n while ( i-- ) {\n if ( nodeList[i] == elem ) { return true; }\n }\n return false;\n}\n","import 'promise-polyfill/src/polyfill';\nimport 'whatwg-fetch';\n\nimport base64 from 'keen-core/lib/utils/base64';\nimport each from 'keen-core/lib/utils/each';\nimport extend from 'keen-core/lib/utils/extend';\n\nimport Keen from './index';\nimport { getExtendedEventBody } from './extend-events';\nimport fetchRetry from './utils/fetchRetry';\nimport isUnique from './utils/unique';\n\n// ------------------------------\n// .recordEvent\n// ------------------------------\n\nexport function recordEvent(eventCollectionOrConfigObject, eventBody, callback){\n let eventCollection = eventCollectionOrConfigObject;\n let useBeaconApi = false;\n let unique;\n let configObject;\n let clientConfig = this.config;\n\n if (typeof eventCollectionOrConfigObject === 'object'\n && eventCollectionOrConfigObject) {\n // slowly but surely we migrate to one object with all args\n configObject = eventCollectionOrConfigObject;\n eventCollection = eventCollectionOrConfigObject.collection;\n eventBody = eventCollectionOrConfigObject.event;\n callback = eventCollectionOrConfigObject.callback;\n unique = eventCollectionOrConfigObject.unique;\n }\n\n const url = this.url('events', encodeURIComponent(eventCollection));\n let data = {};\n\n if (!checkValidation.call(this, callback)) {\n return;\n }\n\n if (!eventCollection || typeof eventCollection !== 'string') {\n handleValidationError.call(this, 'Collection name must be a string.', callback);\n return;\n }\n\n extend(data, eventBody);\n\n // ------------------------------\n // Run extendEvent(s) transforms\n // ------------------------------\n const extendedEventsHash = {};\n getExtendedEventBody(extendedEventsHash, this.extensions.events);\n getExtendedEventBody(extendedEventsHash, this.extensions.collections[eventCollection]);\n getExtendedEventBody(extendedEventsHash, [data]);\n\n if (unique) {\n return isUnique(configObject, extendedEventsHash).then(isUniqueResult => {\n if (!isUniqueResult) {\n return Promise.resolve({\n created: false,\n message: '[NOT_UNIQUE] This event has already been recorded'\n });\n }\n return recordEvent.call(this, { ...eventCollectionOrConfigObject, unique: undefined });\n });\n }\n\n this.emit('recordEvent', eventCollection, extendedEventsHash);\n\n if (!Keen.enabled) {\n handleValidationError.call(this, 'Keen.enabled is set to false.', callback);\n return false;\n }\n\n return send.call(this, { url, extendedEventsHash, callback, configObject, eventCollection });\n}\n\n// ------------------------------\n// .recordEvents\n// ------------------------------\n\nexport function recordEvents(eventsHash, callback){\n const self = this;\n const url = this.url('events');\n\n if (!checkValidation.call(this, callback)) {\n return;\n }\n\n if ('object' !== typeof eventsHash || eventsHash instanceof Array) {\n handleValidationError.call(this, 'First argument must be an object', callback );\n return;\n }\n\n if (arguments.length > 2) {\n handleValidationError.call(this, 'Incorrect arguments provided to #recordEvents method', callback);\n return;\n }\n\n // ------------------------------\n // Run extendEvent(s) transforms\n // ------------------------------\n const extendedEventsHash = {};\n each(eventsHash, function(eventList, eventCollection){\n // Find or create collection on new hash\n extendedEventsHash[eventCollection] = extendedEventsHash[eventCollection] || [];\n // Loop over each eventBody in the existing hash\n each(eventList, function(eventBody, index){\n // Create a new data object\n let extendedEventBody = {};\n // Process \"events\" transform pipeline\n getExtendedEventBody(extendedEventBody, self.extensions.events);\n // Process \"collection\" transform pipeline\n getExtendedEventBody(extendedEventBody, self.extensions.collections[eventCollection]);\n // Blend existing eventBody data into the result\n getExtendedEventBody(extendedEventBody, [eventBody]);\n // Push extendedEventBody into new hash\n extendedEventsHash[eventCollection].push(extendedEventBody);\n });\n });\n\n this.emit('recordEvents', extendedEventsHash);\n\n if (!Keen.enabled) {\n handleValidationError.call(this, 'Keen.enabled is set to false.', callback);\n return false;\n }\n\n return send.call(this, { url, extendedEventsHash, callback });\n}\n\nfunction send({ url, extendedEventsHash, callback, configObject = {}, eventCollection}){\n const clientConfig = this.config;\n const requestType = configObject.requestType // specific method for one request\n || this.config.requestType; // global request type of client\n\n if (\n navigator && navigator.sendBeacon &&\n (requestType === 'beaconAPI' || requestType === 'beacon')\n // so you can send specific recordEvent() using beaconAPI\n // even if your global client's config prefers Fetch\n ) {\n navigator.sendBeacon(\n `${url}?api_key=${this.writeKey()}`,\n JSON.stringify(extendedEventsHash)\n );\n if (callback) {\n // Beacon API is not handling responses nor errors\n callback();\n }\n return this;\n }\n\n // this is IMAGE beacon, not the Beacon API. deprecated\n if (requestType === 'beacon' || requestType === 'img') {\n const getRequestUrl = this.url('events', encodeURIComponent(eventCollection), {\n api_key : this.writeKey(),\n data : encodeURIComponent( base64.encode( JSON.stringify(extendedEventsHash) ) ),\n modified : new Date().getTime()\n });\n const getRequestUrlOkLength = getRequestUrl.length < getUrlMaxLength();\n\n if (getRequestUrlOkLength) {\n sendBeacon.call(this, getRequestUrl, callback);\n }\n else {\n if (callback) {\n callback('Beacon URL length exceeds current browser limit, and XHR is not supported.', null);\n }\n }\n return this;\n }\n\n if (typeof fetch !== 'undefined') {\n return sendFetch.call(this, 'POST', url, extendedEventsHash, callback);\n }\n\n return this;\n}\n\nfunction sendFetch(method, url, data, callback = undefined){\n const self = this;\n\n return fetchRetry(url, {\n method,\n body: data ? JSON.stringify(data) : '',\n mode: 'cors',\n redirect: 'follow',\n referrerPolicy: self.referrerPolicy() || 'unsafe-url',\n headers: {\n 'Authorization': self.writeKey(),\n 'Content-Type': 'application/json'\n },\n // keepalive: true, not supported for CORS yet\n retry: self.config.retry\n })\n .catch(connectionError => {\n if (typeof callback !== 'undefined') {\n callback.call(self, connectionError, null);\n }\n self.emit('error', connectionError);\n return Promise.reject(connectionError);\n })\n .then(response => {\n if (response.ok) {\n return response.json();\n }\n\n return response.json().then(responseJSON => {\n return Promise.reject({\n error_code: responseJSON.error_code,\n body: responseJSON.message,\n status: response.status,\n ok: false,\n statusText: response.statusText\n });\n });\n }).then(responseJSON => {\n const eventsSavedSuccessfuly = checkEventsSavedSuccessfuly(responseJSON);\n if (eventsSavedSuccessfuly) {\n if (typeof callback !== 'undefined') {\n callback.call(self, null, responseJSON);\n }\n return Promise.resolve(responseJSON);\n } else {\n if (typeof callback !== 'undefined') {\n callback.call(self, responseJSON, null);\n }\n self.emit('error', responseJSON);\n return Promise.reject(responseJSON);\n }\n });\n}\n\nfunction checkEventsSavedSuccessfuly(response){\n // single event\n if (typeof response.created !== 'undefined') {\n if (response.created) {\n return true;\n }\n return false;\n }\n // multiple events\n const responseKeys = Object.keys(response);\n const notSavedEvents = responseKeys\n .map(collection => {\n return response[collection].filter(event => !event.success);\n })\n .filter(collection => collection.length > 0);\n\n if (notSavedEvents.length === 0) {\n return true;\n }\n\n return false;\n}\n\n// Validation\nfunction checkValidation(callback){\n\n if (!this.projectId()) {\n handleValidationError.call(this, 'Keen.Client is missing a projectId property.', callback);\n return false;\n }\n if (!this.writeKey()) {\n handleValidationError.call(this, 'Keen.Client is missing a writeKey property.', callback);\n return false;\n }\n return true;\n}\n\nfunction handleValidationError(message, callback){\n const err = `Event(s) not recorded: ${message}`;\n this.emit('error', err);\n if (callback) {\n callback.call(this, err, null);\n }\n}\n\nfunction getUrlMaxLength(){\n if ('undefined' !== typeof window && navigator) {\n if (navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0) {\n return 1900;\n }\n }\n return 16000;\n}\n\n/*\n DEPRECATED METHODS\n*/\n\n// Image Beacon Requests\n// DEPRECATED\nfunction sendBeacon(url, callback){\n var self = this,\n img = document.createElement('img'),\n loaded = false;\n\n img.onload = function() {\n loaded = true;\n if ('naturalHeight' in this) {\n if (this.naturalHeight + this.naturalWidth === 0) {\n this.onerror();\n return;\n }\n } else if (this.width + this.height === 0) {\n this.onerror();\n return;\n }\n if (callback) {\n callback.call(self);\n }\n };\n img.onerror = function() {\n loaded = true;\n if (callback) {\n callback.call(self, 'An error occurred!', null);\n }\n };\n img.src = url + '&c=clv1';\n}\n","var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // 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\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // 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.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","module.exports = {\n map: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",\n encode: function (n) {\n \"use strict\";\n var o = \"\", i = 0, m = this.map, i1, i2, i3, e1, e2, e3, e4;\n n = this.utf8.encode(n);\n while (i < n.length) {\n i1 = n.charCodeAt(i++); i2 = n.charCodeAt(i++); i3 = n.charCodeAt(i++);\n e1 = (i1 >> 2); e2 = (((i1 & 3) << 4) | (i2 >> 4)); e3 = (isNaN(i2) ? 64 : ((i2 & 15) << 2) | (i3 >> 6));\n e4 = (isNaN(i2) || isNaN(i3)) ? 64 : i3 & 63;\n o = o + m.charAt(e1) + m.charAt(e2) + m.charAt(e3) + m.charAt(e4);\n } return o;\n },\n decode: function (n) {\n \"use strict\";\n var o = \"\", i = 0, m = this.map, cc = String.fromCharCode, e1, e2, e3, e4, c1, c2, c3;\n n = n.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n while (i < n.length) {\n e1 = m.indexOf(n.charAt(i++)); e2 = m.indexOf(n.charAt(i++));\n e3 = m.indexOf(n.charAt(i++)); e4 = m.indexOf(n.charAt(i++));\n c1 = (e1 << 2) | (e2 >> 4); c2 = ((e2 & 15) << 4) | (e3 >> 2);\n c3 = ((e3 & 3) << 6) | e4;\n o = o + (cc(c1) + ((e3 != 64) ? cc(c2) : \"\")) + (((e4 != 64) ? cc(c3) : \"\"));\n } return this.utf8.decode(o);\n },\n utf8: {\n encode: function (n) {\n \"use strict\";\n var o = \"\", i = 0, cc = String.fromCharCode, c;\n while (i < n.length) {\n c = n.charCodeAt(i++); o = o + ((c < 128) ? cc(c) : ((c > 127) && (c < 2048)) ?\n (cc((c >> 6) | 192) + cc((c & 63) | 128)) : (cc((c >> 12) | 224) + cc(((c >> 6) & 63) | 128) + cc((c & 63) | 128)));\n } return o;\n },\n decode: function (n) {\n \"use strict\";\n var o = \"\", i = 0, cc = String.fromCharCode, c2, c;\n while (i < n.length) {\n c = n.charCodeAt(i);\n o = o + ((c < 128) ? [cc(c), i++][0] : ((c > 191) && (c < 224)) ?\n [cc(((c & 31) << 6) | ((c2 = n.charCodeAt(i + 1)) & 63)), (i += 2)][0] :\n [cc(((c & 15) << 12) | (((c2 = n.charCodeAt(i + 1)) & 63) << 6) | ((c3 = n.charCodeAt(i + 2)) & 63)), (i += 3)][0]);\n } return o;\n }\n }\n};\n","import 'promise-polyfill/src/polyfill';\nimport 'whatwg-fetch';\n\nimport configDefault from '../config-default.js';\n\nexport default function(url, options) {\n const config = {\n ...configDefault,\n ...(options.retry || {})\n };\n\n const retriesLimit = config.retry.limit;\n const retryInitialDelay = config.retry.initialDelay;\n const retryOn = config.retry.retryOnResponseStatuses;\n let retriesCount = 0;\n\n if (retryOn && !(retryOn instanceof Array)) {\n throw {\n name: 'ArgumentError',\n message: 'retryOn property expects an array'\n }\n }\n\n return new Promise(function(resolve, reject) {\n const wrappedFetch = function(n) {\n fetch(url, options)\n .then(function(response) {\n if (retryOn.indexOf(response.status) === -1) {\n resolve(response);\n } else {\n if (n > 0) {\n retry();\n } else {\n reject(response);\n }\n }\n })\n .catch(function(error) {\n if (n > 0) {\n retry();\n } else {\n reject(error);\n }\n });\n };\n\n function retry() {\n retriesCount = retriesCount + 1;\n setTimeout(function() {\n wrappedFetch(retriesLimit - retriesCount);\n }, 2^retriesCount * retryInitialDelay);\n }\n\n wrappedFetch(retriesLimit - retriesCount);\n });\n};\n","import 'promise-polyfill/src/polyfill';\n\nimport md5 from './md5';\nimport { getFromCache, saveToCache } from './cache-browser';\n\nimport configDefault from '../config-default.js';\n\nlet uniqueIds = [];\n\nexport const isUnique = (customCacheConfig, extendedEventBody) => {\n const configCache = { ...configDefault.cache, ...customCacheConfig.cache };\n const stringifiedEvent = JSON.stringify(extendedEventBody);\n const { hashingMethod } = configCache;\n const hash = hashingMethod && hashingMethod.toLowerCase() === 'md5'\n ? md5(stringifiedEvent) : stringifiedEvent;\n const expiryTime = configCache.maxAge ? (Date.now() + configCache.maxAge) : undefined;\n const item = {\n hash,\n expiryTime\n };\n if (expiryTime){\n const now = Date.now();\n uniqueIds = uniqueIds.filter(item => item.expiryTime > now);\n }\n\n const alreadySentEvent = uniqueIds.find(item => item.hash === hash);\n if (alreadySentEvent) {\n if (alreadySentEvent.expiryTime && alreadySentEvent.expiryTime < Date.now()) {\n uniqueIds = uniqueIds.filter(item => item.hash !== hash);\n } else {\n return Promise.resolve(false);\n }\n }\n uniqueIds.push(item);\n if (configCache.storage && configCache.storage.toLowerCase() === 'indexeddb') {\n return getFromCache(hash, configCache).then(alreadySentEvent => {\n if (alreadySentEvent) {\n return false;\n }\n saveToCache(hash, configCache);\n return true;\n });\n }\n\n return Promise.resolve(true);\n}\n\nexport default isUnique;\n","import 'promise-polyfill/src/polyfill';\nimport 'whatwg-fetch';\n\nimport md5 from './md5';\n\nimport configDefault from '../config-default.js';\n\nif (typeof self === 'undefined') {\n throw 'IndexedDB is available only in Browser ENV';\n}\n\nconst indexedDBAvailable = 'indexedDB' in self;\nlet cachingEnabled = true;\n\nif (!indexedDBAvailable) {\n // console.log(\"Your browser doesn't support a stable version of IndexedDB.\");\n cachingEnabled = false; // graceful degradation\n}\n\nlet db;\nlet cacheConfig = {\n ...configDefault.cache\n};\n\nfunction initializeIndexedDb(requestCacheConfig = {}){\n if (db) { return Promise.resolve(); }\n if (!cachingEnabled) { return Promise.resolve(); }\n cacheConfig = {\n ...cacheConfig,\n ...requestCacheConfig\n };\n return new Promise((resolve, reject) => {\n const dbConnectionRequest = self.indexedDB.open(cacheConfig.dbName);\n dbConnectionRequest.onerror = function(event) {\n cachingEnabled = false;\n resolve();\n };\n\n dbConnectionRequest.onupgradeneeded = function(event) {\n const db = event.target.result;\n const objectStore = db\n .createObjectStore(cacheConfig.dbCollectionName,\n { keyPath: cacheConfig.dbCollectionKey });\n objectStore.createIndex(\n cacheConfig.dbCollectionKey,\n cacheConfig.dbCollectionKey,\n { unique: true }\n );\n objectStore.createIndex('expiryTime', 'expiryTime', { unique: false });\n };\n\n dbConnectionRequest.onsuccess = function(event) {\n db = event.target.result;\n db.onerror = function(event) {\n cachingEnabled = false; // graceful degradation\n };\n resolve(db);\n };\n });\n}\n\nexport const saveToCache = (hash, configOptions = {}) => {\n return initializeIndexedDb(configOptions).then(() => {\n const transactionSave = db\n .transaction(cacheConfig.dbCollectionName, \"readwrite\")\n .objectStore(cacheConfig.dbCollectionName);\n const requestSave = transactionSave.add({\n hash,\n expiryTime: Date.now() + cacheConfig.maxAge\n });\n requestSave.onsuccess = function(event) {\n };\n requestSave.onerror = function(event) {\n cachingEnabled = false;\n };\n });\n}\n\nexport const getFromCache = (hash, configOptions = {}) => {\n return initializeIndexedDb(configOptions).then(() => {\n return new Promise((resolve, reject) => {\n if (!cachingEnabled) {\n return resolve(null);\n }\n\n const transactionCleanUp = db\n .transaction(cacheConfig.dbCollectionName, \"readwrite\")\n .objectStore(cacheConfig.dbCollectionName);\n const indexCleanUp = transactionCleanUp.index('expiryTime');\n const upperBoundOpenKeyRange = IDBKeyRange.upperBound(Date.now(), true);\n indexCleanUp.openCursor(upperBoundOpenKeyRange).onsuccess = function(event) {\n let cursor = event.target.result;\n if (cursor) {\n let transactionDelete = db\n .transaction(cacheConfig.dbCollectionName, \"readwrite\")\n .objectStore(cacheConfig.dbCollectionName)\n .delete(event.target.result.value[cacheConfig.dbCollectionKey]);\n cursor.continue();\n }\n };\n\n const transactionIndex = db\n .transaction(cacheConfig.dbCollectionName, \"readwrite\")\n .objectStore(cacheConfig.dbCollectionName);\n const index = transactionIndex.index(cacheConfig.dbCollectionKey);\n const responseFromCache = index.get(hash);\n responseFromCache.onsuccess = function(event) {\n if (!event.target.result ||\n event.target.result.expiryTime < Date.now()\n ) {\n if (event.target.result && event.target.result.expiryTime < Date.now()){\n const transactionDelete = db\n .transaction(cacheConfig.dbCollectionName, \"readwrite\")\n .objectStore(cacheConfig.dbCollectionName)\n .delete(event.target.result[cacheConfig.dbCollectionKey]);\n transactionDelete.onsuccess = (event) => {\n resolve(getFromCache(hash, configOptions));\n };\n transactionDelete.onerror = (event) => {\n cachingEnabled = false;\n resolve(getFromCache(hash, configOptions));\n };\n return resolve(null);\n }\n return resolve(null);\n } else {\n return resolve(event.target.result);\n }\n };\n responseFromCache.onerror = function(event) {\n cachingEnabled = false;\n resolve(getFromCache(hash, configOptions));\n };\n });\n });\n}\n","import Keen from './index';\nimport each from 'keen-core/lib/utils/each';\nimport { queue } from './utils/queue';\n\nexport function deferEvent(eventCollection, eventBody){\n\n if (arguments.length !== 2 || typeof eventCollection !== 'string') {\n handleValidationError.call(this, 'Incorrect arguments provided to #deferEvent method');\n return;\n }\n\n this.queue.events[eventCollection] = this.queue.events[eventCollection] || [];\n this.queue.events[eventCollection].push(eventBody);\n this.queue.capacity++;\n if (!this.queue.timer) {\n this.queue.start();\n }\n this.emit('deferEvent', eventCollection, eventBody);\n return this;\n}\n\nexport function deferEvents(eventsHash){\n var self = this;\n\n if (arguments.length !== 1 || typeof eventsHash !== 'object') {\n handleValidationError.call(this, 'Incorrect arguments provided to #deferEvents method');\n return;\n }\n\n each(eventsHash, function(eventList, eventCollection){\n self.queue.events[eventCollection] = self.queue.events[eventCollection] || [];\n self.queue.events[eventCollection] = self.queue.events[eventCollection].concat(eventList);\n self.queue.capacity = self.queue.capacity + eventList.length;\n if (!self.queue.timer) {\n self.queue.start();\n }\n });\n self.emit('deferEvents', eventsHash);\n return self;\n}\n\nexport function queueCapacity(num){\n if (!arguments.length) return this.queue.config.capacity;\n this.queue.config.capacity = num ? Number(num): 0;\n this.queue.check();\n return this;\n}\n\nexport function queueInterval(num){\n if (!arguments.length) return this.queue.config.interval;\n this.queue.config.interval = num ? Number(num): 0;\n this.queue.check();\n return this;\n}\n\nexport function recordDeferredEvents(){\n const self = this;\n\n if (self.queue.capacity > 0) {\n self.queue.pause();\n let clonedQueueConfig = { ...self.queue.config };\n let clonedQueueEvents = { ...self.queue.events };\n self.queue = queue();\n self.queue.config = clonedQueueConfig;\n self.queue.on('flush', function(){\n self.recordDeferredEvents();\n });\n self.emit('recordDeferredEvents', clonedQueueEvents);\n self.recordEvents(clonedQueueEvents, (err, res) => {\n if (err) {\n self.emit('recordDeferredEventsError', err, clonedQueueEvents);\n }\n });\n }\n return self;\n}\n\nexport function unloadDeferredEvents(){\n self.queue.pause();\n each(self.queue.events, function(events, collection){\n self.recordEvent(collection, events);\n });\n}\n\nfunction handleValidationError(message){\n this.emit('error', `Event(s) not deferred: ${message}`);\n}\n","import pkg from '../package.json';\n\nexport function initAutoTrackingCore(lib) {\n return function(obj = {}) {\n const client = this;\n const helpers = lib.helpers;\n const utils = lib.utils;\n\n const options = utils.extend({\n ignoreDisabledFormFields: false,\n ignoreFormFieldTypes: ['password'],\n recordClicks: true,\n recordFormSubmits: true,\n recordInputChanges: false,\n recordPageUnloads: false,\n recordPageViews: true,\n recordPageViewsOnExit: false,\n recordScrollState: true,\n shareUuidAcrossDomains: false,\n collectIpAddress: true,\n collectUuid: true,\n catchError: undefined // optional, function(someError) - error handler\n }, obj);\n\n const defaultDomElementOptions = {\n recordTextContent: true,\n redactTextContent: true\n }\n\n options.domElementOptions = utils.extend(defaultDomElementOptions, obj.domElementOptions);\n\n if (client.config.requestType === 'beaconAPI' && options.catchError) {\n throw `You cannot use the BeaconAPI and catchError function in the same time, because BeaconAPI ignores errors. For requests with error handling - use requestType: 'fetch'`;\n return;\n }\n\n if (\n client.config.requestType === 'jsonp' // jsonp is deprecated, it's the default value from old keen's client\n ) {\n if (options.catchError) {\n client.config.requestType = 'fetch';\n } else {\n client.config.requestType = 'beaconAPI';\n }\n }\n\n const session_cookie = new utils.cookie('prodperfect_session');\n let session_uuid = session_cookie.get('session_uuid');\n if (!session_uuid) {\n session_uuid = helpers.getUniqueId();\n }\n session_cookie.set('session_uuid', session_uuid);\n session_cookie.expire(1/48);\n\n const prodperfectTestData = new utils.cookie('prodperfect_test').get('test_run_data');\n\n const now = new Date();\n const cookie = new utils.cookie('keen');\n\n const domainName = helpers.getDomainName(window.location.hostname);\n const cookieDomain = domainName && options.shareUuidAcrossDomains ? {\n domain: '.' + domainName\n } : {};\n\n let uuid;\n if (options.collectUuid) {\n uuid = cookie.get('uuid');\n if (!uuid) {\n uuid = helpers.getUniqueId();\n cookie.set('uuid', uuid, cookieDomain);\n }\n }\n\n let initialReferrer = cookie.get('initialReferrer');\n if (!initialReferrer){\n initialReferrer = document && document.referrer || undefined;\n cookie.set('initialReferrer', initialReferrer, cookieDomain);\n }\n\n const tracker_loaded_at_time = now.toISOString();\n const tracker_load_uuid_value = helpers.getUniqueId();\n\n const addons = [\n {\n name: 'keen:ua_parser',\n input: {\n ua_string: 'user_agent'\n },\n output: 'tech'\n },\n {\n name: 'keen:url_parser',\n input: {\n url: 'url.full'\n },\n output: 'url.info'\n },\n {\n name: 'keen:url_parser',\n input: {\n url: 'referrer.full'\n },\n output: 'referrer.info'\n },\n {\n name: 'keen:date_time_parser',\n input: {\n date_time: 'keen.timestamp'\n },\n output: 'time.utc'\n },\n {\n name: 'keen:date_time_parser',\n input: {\n date_time: 'local_time_full'\n },\n output: 'time.local'\n }\n ];\n\n let ip_address = '${keen.ip}';\n addons.push({\n name: 'keen:ip_to_geo',\n input: {\n ip: 'ip_address',\n remove_ip_property: !options.collectIpAddress\n },\n output : 'geo'\n });\n\n client.extendEvents(function() {\n const browserProfile = helpers.getBrowserProfile();\n let scrollState = {};\n \n if (options.recordScrollState) {\n scrollState = helpers.getScrollState();\n }\n\n return {\n event_uuid: helpers.getUniqueId(),\n iso_time_full: new Date().toISOString(),\n local_time_full: new Date().toString(),\n session: {\n session_uuid: session_uuid\n },\n tracked_by: pkg.name + '-' + pkg.version,\n tracker_load_uuid: tracker_load_uuid_value,\n tracker_loaded_at: tracker_loaded_at_time,\n prodperfect_test_data: prodperfectTestData,\n user: {\n uuid\n },\n page: {\n title: document ? document.title : null,\n description: browserProfile.description,\n scroll_state: scrollState,\n time_on_page: getSecondsSinceDate(now),\n time_on_page_ms: getMiliSecondsSinceDate(now)\n },\n\n ip_address,\n geo: { /* Enriched */ },\n\n user_agent: '${keen.user_agent}',\n tech: {\n profile: browserProfile\n /* Enriched */\n },\n\n url: {\n full: window ? window.location.href : '',\n info: { /* Enriched */ }\n },\n\n referrer: {\n initial: initialReferrer,\n full: document ? document.referrer : '',\n info: { /* Enriched */ }\n },\n\n time: {\n local: { /* Enriched */ },\n utc: { /* Enriched */ }\n },\n\n keen: {\n timestamp: new Date().toISOString(),\n addons,\n }\n };\n });\n\n if (options.recordClicks === true) {\n utils.listener('*').on('click', function(e) {\n const el = e.target;\n const event = {\n element: helpers.getDomNodeProfile(el, options.domElementOptions)\n };\n\n if (options.catchError) {\n return client\n .recordEvent({\n collection: 'clicks',\n event\n }).catch(err => {\n options.catchError(err);\n });\n }\n\n return client\n .recordEvent({\n collection: 'clicks',\n event\n });\n });\n }\n\n if (options.recordFormSubmits === true) {\n utils.listener('form').on('submit', function(e) {\n const el = e.target;\n const serializerOptions = {\n disabled: options.ignoreDisabledFormFields,\n ignoreTypes: options.ignoreFormFieldTypes\n };\n const fields = utils.serializeForm(el, serializerOptions);\n const keys = Object.keys(fields);\n for (let x = 0; x < keys.length; x++) {\n fields[keys[x]] = '---REDACTED---';\n }\n const event = {\n form: {\n action: el.action,\n fields: fields,\n method: el.method\n },\n element: helpers.getDomNodeProfile(el, options.domElementOptions)\n };\n\n if (options.catchError) {\n return client\n .recordEvent({\n collection: 'form_submissions',\n event\n })\n .catch(err => {\n options.catchError(err);\n });\n }\n\n return client.recordEvent({\n collection: 'form_submissions',\n event\n });\n });\n }\n\n if (options.recordInputChanges === true) {\n utils.listener('*').on('change', function (e) {\n var el = e.target;\n var props = {\n element: helpers.getDomNodeProfile(el, options.domElementOptions),\n page: {\n scroll_state: helpers.getScrollState()\n }\n };\n client.recordEvent('changes', props);\n });\n }\n\n if (options.recordPageUnloads === true && window.addEventListener) {\n window.addEventListener('beforeunload', function (e) {\n client.recordEvent('pageunloads');\n }, false);\n }\n\n if (options.recordPageViews === true && !options.recordPageViewsOnExit) {\n if (options.catchError) {\n client\n .recordEvent({\n collection: 'pageviews'\n })\n .catch(err => {\n options.catchError(err);\n });\n } else {\n client\n .recordEvent({\n collection: 'pageviews'\n });\n }\n }\n\n if (options.recordPageViewsOnExit && typeof window !== 'undefined') {\n window.addEventListener('beforeunload', () => {\n client.config.requestType = 'beaconAPI'; // you can run beforeunload only with beaconAPI\n client.recordEvent({\n collection: 'pageviews'\n });\n });\n }\n\n return client;\n };\n}\n\nfunction getSecondsSinceDate(date) {\n return Math.round(getMiliSecondsSinceDate(date) / 1000);\n}\n\nfunction getMiliSecondsSinceDate(date) {\n return new Date().getTime() - date.getTime();\n}\n","import { getScreenProfile } from './getScreenProfile';\nimport { getWindowProfile } from './getWindowProfile';\n\nexport function getBrowserProfile() {\n return {\n 'cookies' : ('undefined' !== typeof navigator.cookieEnabled) ? navigator.cookieEnabled : false,\n 'codeName' : navigator.appCodeName,\n 'description': getDocumentDescription(),\n 'language' : navigator.language,\n 'name' : navigator.appName,\n 'online' : navigator.onLine,\n 'platform' : navigator.platform,\n 'useragent' : navigator.userAgent,\n 'version' : navigator.appVersion,\n 'screen' : getScreenProfile(),\n 'window' : getWindowProfile()\n }\n}\n\nfunction getDocumentDescription() {\n var el;\n if (document && typeof document.querySelector === 'function') {\n el = document.querySelector('meta[name=\"description\"]');\n }\n return el ? el.content : '';\n}\n","export function getDatetimeIndex(input){\n var date = input || new Date();\n return {\n 'hour_of_day' : date.getHours(),\n 'day_of_week' : parseInt( 1 + date.getDay() ),\n 'day_of_month' : date.getDate(),\n 'month' : parseInt( 1 + date.getMonth() ),\n 'year' : date.getFullYear()\n };\n}\n","function extractHostname(url) {\n var hostname;\n //find & remove protocol (http, ftp, etc.) and get hostname\n\n if (url.indexOf(\"://\") > -1) {\n hostname = url.split('/')[2];\n }\n else {\n hostname = url.split('/')[0];\n }\n\n //find & remove port number\n hostname = hostname.split(':')[0];\n //find & remove \"?\"\n hostname = hostname.split('?')[0];\n\n return hostname;\n}\n\n// To address those who want the \"root domain,\" use this function:\nexport function getDomainName(url) {\n var domain = extractHostname(url),\n splitArr = domain.split('.'),\n arrLen = splitArr.length;\n\n //extracting the root domain here\n //if there is a subdomain\n if (arrLen > 2) {\n domain = splitArr[arrLen - 2] + '.' + splitArr[arrLen - 1];\n //check to see if it's using a Country Code Top Level Domain (ccTLD) (i.e. \".me.uk\")\n if (splitArr[arrLen - 2].length == 2 && splitArr[arrLen - 1].length == 2) {\n //this is using a ccTLD\n domain = splitArr[arrLen - 3] + '.' + domain;\n }\n }\n return domain;\n}\n","import { getDomNodePath } from './getDomNodePath';\nimport { getBasicDomNodeProfile } from './getBasicDomNodeProfile';\nimport { getNParents } from './getNParents';\n\nconst getTextContent = (el, options) => {\n if(!options.recordTextContent || !el.textContent) {\n return null;\n }\n\n if(options.redactTextContent) {\n return '---REDACTED---';\n }\n\n return el.textContent;\n}\n\nexport function getDomNodeProfile(el, options = {}) {\n return {\n ...getBasicDomNodeProfile(el),\n action: el.action,\n method: el.method,\n n_parents: getNParents(el, options.nParents),\n selector: getDomNodePath(el),\n text_content: getTextContent(el, options),\n x_position: el.offsetLeft || el.clientLeft || null,\n y_position: el.offsetTop || el.clientTop || null\n };\n}\n","export function getDomNodeAttributes(el, filter) {\n let i,\n attributeNodes = el.attributes || {},\n length = attributeNodes.length,\n attrs = {};\n\n for ( i = 0; i < length; i++ ){\n const node = attributeNodes[i];\n\n if(filter == '' || filter.test(node.name)) {\n attrs[node.name] = node.value;\n }\n }\n\n return attrs;\n}\n","import { getBasicDomNodeProfile } from './getBasicDomNodeProfile';\n\nexport function getNParents(element, nParents = 5, parents = []) {\n let parent = element.parentNode;\n\n if (nParents === 0 || !parent) {\n return parents;\n }\n\n return getNParents(\n parent,\n nParents - 1,\n parents.concat({\n ...getBasicDomNodeProfile(parent),\n nth_parent: parents.length + 1\n })\n )\n}\n","import extend from 'keen-core/lib/utils/extend';\n\nexport function getScrollState(obj){\n var config = typeof obj === 'object' ? obj : {};\n var state = extend({\n pixel: 0,\n pixel_max: 0,\n ratio: null,\n ratio_max: null\n }, config);\n\n if (typeof window !== undefined || typeof document !== undefined) {\n state.pixel = getScrollOffset() + getWindowHeight();\n if (state.pixel > state.pixel_max) {\n state.pixel_max = state.pixel;\n }\n state.ratio = parseFloat(Number(state.pixel / getScrollableArea()).toFixed(2));\n state.ratio_max = parseFloat(Number(state.pixel_max / getScrollableArea()).toFixed(2));\n }\n\n return state;\n}\n\nfunction getScrollableArea() {\n var body = document.body;\n var html = document.documentElement;\n return Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight ) || null;\n}\n\nfunction getScrollOffset() {\n return (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;\n}\n\nfunction getWindowHeight() {\n return window.innerHeight || document.documentElement.clientHeight;\n}\n","export function getUniqueId() {\n // uuidv4\n if (typeof crypto !== 'undefined' && crypto.getRandomValues) {\n // browser\n return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c =>\n (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)\n )\n } else {\n // node & older browsers\n let str = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n return str.replace(/[xy]/g, function(c) {\n let r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);\n return v.toString(16);\n });\n }\n}\n","import Cookies from 'js-cookie';\nimport extend from 'keen-core/lib/utils/extend';\n\nexport const cookie = function(str){\n if (!arguments.length) return;\n if (this instanceof cookie === false) {\n return new cookie(str);\n }\n\n this.config = {\n key: str,\n options: {\n expires: 365\n }\n };\n this.data = this.get();\n return this;\n}\n\ncookie.prototype.get = function(str){\n var data = {};\n\n if (Cookies.get(this.config.key)) {\n data = Cookies.getJSON(this.config.key);\n }\n if (str && typeof data === 'object' && typeof data !== null) {\n return (typeof data[str] !== 'undefined') ? data[str] : null;\n }\n else {\n return data;\n }\n};\n\ncookie.prototype.set = function(str, value, options){\n if (!arguments.length || !this.enabled()) return this;\n if (typeof str === 'string' && arguments.length >= 2) {\n this.data[str] = value ? value : null;\n }\n else if (typeof str === 'object' && arguments.length === 1) {\n extend(this.data, str);\n }\n Cookies.set(\n this.config.key,\n this.data,\n extend(this.config.options, options || {})\n );\n return this;\n};\n\ncookie.prototype.expire = function(daysUntilExpire){\n if (daysUntilExpire) {\n Cookies.set(\n this.config.key,\n this.data,\n extend(this.config.options, { expires: daysUntilExpire })\n );\n } else {\n Cookies.remove(this.config.key);\n this.data = {};\n }\n return this;\n};\n\ncookie.prototype.options = function(obj){\n if (!arguments.length) return this.config.options;\n this.config.options = (typeof obj === 'object') ? obj : {};\n return this;\n};\n\ncookie.prototype.enabled = function(){\n return navigator.cookieEnabled;\n};\n","/*!\n * JavaScript Cookie v2.1.0\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n(function (factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(factory);\n\t} else if (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t} else {\n\t\tvar _OldCookies = window.Cookies;\n\t\tvar api = window.Cookies = factory();\n\t\tapi.noConflict = function () {\n\t\t\twindow.Cookies = _OldCookies;\n\t\t\treturn api;\n\t\t};\n\t}\n}(function () {\n\tfunction extend () {\n\t\tvar i = 0;\n\t\tvar result = {};\n\t\tfor (; i < arguments.length; i++) {\n\t\t\tvar attributes = arguments[ i ];\n\t\t\tfor (var key in attributes) {\n\t\t\t\tresult[key] = attributes[key];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction init (converter) {\n\t\tfunction api (key, value, attributes) {\n\t\t\tvar result;\n\n\t\t\t// Write\n\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tattributes = extend({\n\t\t\t\t\tpath: '/'\n\t\t\t\t}, api.defaults, attributes);\n\n\t\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\t\tvar expires = new Date();\n\t\t\t\t\texpires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);\n\t\t\t\t\tattributes.expires = expires;\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tresult = JSON.stringify(value);\n\t\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\t\tvalue = result;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\n\t\t\t\tif (!converter.write) {\n\t\t\t\t\tvalue = encodeURIComponent(String(value))\n\t\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\t\t\t\t} else {\n\t\t\t\t\tvalue = converter.write(value, key);\n\t\t\t\t}\n\n\t\t\t\tkey = encodeURIComponent(String(key));\n\t\t\t\tkey = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);\n\t\t\t\tkey = key.replace(/[\\(\\)]/g, escape);\n\n\t\t\t\treturn (document.cookie = [\n\t\t\t\t\tkey, '=', value,\n\t\t\t\t\tattributes.expires && '; expires=' + attributes.expires.toUTCString(), // use expires attribute, max-age is not supported by IE\n\t\t\t\t\tattributes.path && '; path=' + attributes.path,\n\t\t\t\t\tattributes.domain && '; domain=' + attributes.domain,\n\t\t\t\t\tattributes.secure ? '; secure' : ''\n\t\t\t\t].join(''));\n\t\t\t}\n\n\t\t\t// Read\n\n\t\t\tif (!key) {\n\t\t\t\tresult = {};\n\t\t\t}\n\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all. Also prevents odd result when\n\t\t\t// calling \"get()\"\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar rdecode = /(%[0-9A-Z]{2})+/g;\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar name = parts[0].replace(rdecode, decodeURIComponent);\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tcookie = converter.read ?\n\t\t\t\t\t\tconverter.read(cookie, name) : converter(cookie, name) ||\n\t\t\t\t\t\tcookie.replace(rdecode, decodeURIComponent);\n\n\t\t\t\t\tif (this.json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tresult = cookie;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!key) {\n\t\t\t\t\t\tresult[name] = cookie;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tapi.get = api.set = api;\n\t\tapi.getJSON = function () {\n\t\t\treturn api.apply({\n\t\t\t\tjson: true\n\t\t\t}, [].slice.call(arguments));\n\t\t};\n\t\tapi.defaults = {};\n\n\t\tapi.remove = function (key, attributes) {\n\t\t\tapi(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\n}));\n","/*\n This is a modified copy of https://github.com/defunctzombie/form-serialize/ v0.7.1\n Includes a new configuration option:\n * ignoreTypes - Array, Default: [], Example: [ 'password' ]\n*/\n\n// types which indicate a submit action and are not successful controls\n// these will be ignored\nvar k_r_submitter = /^(?:submit|button|image|reset|file)$/i;\n\n// node names which could be successful controls\nvar k_r_success_contrls = /^(?:input|select|textarea|keygen)/i;\n\n// Matches bracket notation.\nvar brackets = /(\\[[^\\[\\]]*\\])/g;\n\n// serializes form fields\n// @param form MUST be an HTMLForm element\n// @param options is an optional argument to configure the serialization. Default output\n// with no options specified is a url encoded string\n// - hash: [true | false] Configure the output type. If true, the output will\n// be a js object.\n// - serializer: [function] Optional serializer function to override the default one.\n// The function takes 3 arguments (result, key, value) and should return new result\n// hash and url encoded str serializers are provided with this module\n// - disabled: [true | false]. If true serialize disabled fields.\n// - empty: [true | false]. If true serialize empty fields\nexport function serializeForm(form, options) {\n if (typeof options != 'object') {\n options = { hash: !!options };\n }\n else if (options.hash === undefined) {\n options.hash = true;\n }\n\n var result = (options.hash) ? {} : '';\n var serializer = options.serializer || ((options.hash) ? hash_serializer : str_serialize);\n\n var elements = form && form.elements ? form.elements : [];\n\n // Object store each radio and set if it's empty or not\n var radio_store = Object.create(null);\n\n for (var i=0 ; i<elements.length ; ++i) {\n var element = elements[i];\n\n // NEW: Skip ignored field types\n if (options.ignoreTypes && options.ignoreTypes.indexOf(element.type) > -1) {\n continue;\n }\n // ingore disabled fields\n if ((!options.disabled && element.disabled) || !element.name) {\n continue;\n }\n // ignore anyhting that is not considered a success field\n if (!k_r_success_contrls.test(element.nodeName) ||\n k_r_submitter.test(element.type)) {\n continue;\n }\n\n var key = element.name;\n var val = element.value;\n\n // we can't just use element.value for checkboxes cause some browsers lie to us\n // they say \"on\" for value when the box isn't checked\n if ((element.type === 'checkbox' || element.type === 'radio') && !element.checked) {\n val = undefined;\n }\n\n // If we want empty elements\n if (options.empty) {\n if (element.type === 'checkbox' && !element.checked) {\n val = '';\n }\n\n // for radio\n if (element.type === 'radio') {\n if (!radio_store[element.name] && !element.checked) {\n radio_store[element.name] = false;\n }\n else if (element.checked) {\n radio_store[element.name] = true;\n }\n }\n\n // if options empty is true, continue only if its radio\n if (val == undefined && element.type == 'radio') {\n continue;\n }\n }\n else {\n // value-less fields are ignored unless options.empty is true\n if (!val) {\n continue;\n }\n }\n\n // multi select boxes\n if (element.type === 'select-multiple') {\n val = [];\n\n var selectOptions = element.options;\n var isSelectedOptions = false;\n for (var j=0 ; j<selectOptions.length ; ++j) {\n var option = selectOptions[j];\n var allowedEmpty = options.empty && !option.value;\n var hasValue = (option.value || allowedEmpty);\n if (option.selected && hasValue) {\n isSelectedOptions = true;\n\n // If using a hash serializer be sure to add the\n // correct notation for an array in the multi-select\n // context. Here the name attribute on the select element\n // might be missing the trailing bracket pair. Both names\n // \"foo\" and \"foo[]\" should be arrays.\n if (options.hash && key.slice(key.length - 2) !== '[]') {\n result = serializer(result, key + '[]', option.value);\n }\n else {\n result = serializer(result, key, option.value);\n }\n }\n }\n\n if (!isSelectedOptions && options.empty) {\n result = serializer(result, key, '');\n }\n continue;\n }\n\n result = serializer(result, key, val);\n }\n\n if (options.empty) {\n for (var key in radio_store) {\n if (!radio_store[key]) {\n result = serializer(result, key, '');\n }\n }\n }\n\n return result;\n}\n\nfunction parse_keys(string) {\n var keys = [];\n var prefix = /^([^\\[\\]]*)/;\n var children = new RegExp(brackets);\n var match = prefix.exec(string);\n\n if (match[1]) {\n keys.push(match[1]);\n }\n\n while ((match = children.exec(string)) !== null) {\n keys.push(match[1]);\n }\n\n return keys;\n}\n\nfunction hash_assign(result, keys, value) {\n if (keys.length === 0) {\n result = value;\n return result;\n }\n\n var key = keys.shift();\n var between = key.match(/^\\[(.+?)\\]$/);\n\n if (key === '[]') {\n result = result || [];\n\n if (Array.isArray(result)) {\n result.push(hash_assign(null, keys, value));\n }\n else {\n // This might be the result of bad name attributes like \"[][foo]\",\n // in this case the original `result` object will already be\n // assigned to an object literal. Rather than coerce the object to\n // an array, or cause an exception the attribute \"_values\" is\n // assigned as an array.\n result._values = result._values || [];\n result._values.push(hash_assign(null, keys, value));\n }\n\n return result;\n }\n\n // Key is an attribute name and can be assigned directly.\n if (!between) {\n result[key] = hash_assign(result[key], keys, value);\n }\n else {\n var string = between[1];\n // +var converts the variable into a number\n // better than parseInt because it doesn't truncate away trailing\n // letters and actually fails if whole thing is not a number\n var index = +string;\n\n // If the characters between the brackets is not a number it is an\n // attribute name and can be assigned directly.\n if (isNaN(index)) {\n result = result || {};\n result[string] = hash_assign(result[string], keys, value);\n }\n else {\n result = result || [];\n result[index] = hash_assign(result[index], keys, value);\n }\n }\n\n return result;\n}\n\n// Object/hash encoding serializer.\nfunction hash_serializer(result, key, value) {\n var matches = key.match(brackets);\n\n // Has brackets? Use the recursive assignment function to walk the keys,\n // construct any missing objects in the result tree and make the assignment\n // at the end of the chain.\n if (matches) {\n var keys = parse_keys(key);\n hash_assign(result, keys, value);\n }\n else {\n // Non bracket notation can make assignments directly.\n var existing = result[key];\n\n // If the value has been assigned already (for instance when a radio and\n // a checkbox have the same name attribute) convert the previous value\n // into an array before pushing into it.\n //\n // NOTE: If this requirement were removed all hash creation and\n // assignment could go through `hash_assign`.\n if (existing) {\n if (!Array.isArray(existing)) {\n result[key] = [ existing ];\n }\n\n result[key].push(value);\n }\n else {\n result[key] = value;\n }\n }\n\n return result;\n}\n\n// urlform encoding serializer\nfunction str_serialize(result, key, value) {\n // encode newlines as \\r\\n cause the html spec says so\n value = value.replace(/(\\r)?\\n/g, '\\r\\n');\n value = encodeURIComponent(value);\n\n // spaces should be '+' rather than '%20'.\n value = value.replace(/%20/g, '+');\n return result + (result ? '&' : '') + encodeURIComponent(key) + '=' + value;\n}\n","export function timer(num){\n if (this instanceof timer === false) {\n return new timer(num);\n }\n this.count = num || 0;\n return this;\n}\n\ntimer.prototype.start = function(){\n var self = this;\n this.pause();\n this.interval = setInterval(function(){\n self.count++;\n }, 1000);\n return this;\n};\n\ntimer.prototype.pause = function(){\n clearInterval(this.interval);\n return this;\n};\n\ntimer.prototype.value = function(){\n return this.count;\n};\n\ntimer.prototype.clear = function(){\n this.count = 0;\n return this;\n};\n"],"sourceRoot":""}