Socket
Socket
Sign inDemoInstall

@analytics/core

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@analytics/core - npm Package Compare versions

Comparing version 0.10.2 to 0.10.3

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.10.3](https://github.com/DavidWells/analytics/compare/@analytics/core@0.10.2...@analytics/core@0.10.3) (2021-02-15)
**Note:** Version bump only for package @analytics/core
## [0.10.2](https://github.com/DavidWells/analytics/compare/@analytics/core@0.10.1...@analytics/core@0.10.2) (2021-02-01)

@@ -8,0 +16,0 @@

2

dist/@analytics/core.min.js

@@ -1,1 +0,1 @@

var _analytics=function(t){"use strict";var e=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}};var n=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var r=function(){throw new TypeError("")};var R=function(t){return e(t)||n(t)||r()};function i(t,e){return t(e={exports:{}},e.exports),e.exports}var U=i(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(t){return n(t)}:e.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(t)}e.exports=r}),V=i(function(t){var e=function(a){var c,t=Object.prototype,s=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i,o,a,u,e=e&&e.prototype instanceof g?e:g,e=Object.create(e.prototype),r=new O(r||[]);return e._invoke=(i=t,o=n,a=r,u=f,function(t,e){if(u===d)throw new Error("");if(u===h){if("throw"===t)throw e;return P()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){var r=function t(e,n){var r=e.iterator[n.method];if(r===c){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=c,t(e,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("")}return y}r=l(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,y;var r=r.arg;if(!r)return n.method="throw",n.arg=new TypeError(""),n.delegate=null,y;{if(!r.done)return r;n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=c)}n.delegate=null;return y}(n,a);if(r){if(r===y)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(u===f)throw u=h,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);u=d;r=l(i,o,a);if("normal"===r.type){if(u=a.done?h:p,r.arg!==y)return{value:r.arg,done:a.done}}else"throw"===r.type&&(u=h,a.method="throw",a.arg=r.arg)}}),e}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var f="suspendedStart",p="suspendedYield",d="executing",h="completed",y={};function g(){}function m(){}function v(){}var b={};b[r]=function(){return this};e=Object.getPrototypeOf,e=e&&e(e(k([])));e&&e!==t&&s.call(e,r)&&(b=e);var w=v.prototype=g.prototype=Object.create(b);function x(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function E(a,u){var e;this._invoke=function(n,r){function t(){return new u(function(t,e){!function e(t,n,r,i){t=l(a[t],a,n);if("throw"!==t.type){var o=t.arg,n=o.value;return n&&"object"==typeof n&&s.call(n,"__await")?u.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):u.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)})}i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function k(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,t=function t(){for(;++n<e.length;)if(s.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=c,t.done=!0,t};return t.next=t}}return{next:P}}function P(){return{value:c,done:!0}}return((m.prototype=w.constructor=v).constructor=m).displayName=o(v,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,o(t,i,"GeneratorFunction")),t.prototype=Object.create(w),t},a.awrap=function(t){return{__await:t}},x(E.prototype),E.prototype[n]=function(){return this},a.AsyncIterator=E,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new E(u(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},x(w),o(w,i,"Generator"),w[r]=function(){return this},w.toString=function(){return"[object Generator]"},a.keys=function(n){var t,r=[];for(t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=k,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(I),!t)for(var e in this)"t"===e.charAt(0)&&s.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=s.call(i,"catchLoc"),u=s.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!u)throw new Error("");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&s.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r,i=n.completion;return"throw"===i.type&&(r=i.arg,I(n)),r}}throw new Error("")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=c),y}},a}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});function c(t,e,n,r,i,o,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,i)}var G=function(u){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=u.apply(t,a);function i(t){c(r,e,n,i,o,"next",t)}function o(t){c(r,e,n,i,o,"throw",t)}i(void 0)})}};var p=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};function o(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}var $=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(n,!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e};function F(t,e,n,r,i){for(e=e.split?e.split("."):e,r=0;r<e.length;r++)t=t?t[e[r]]:i;return t===i?n:t}function a(t,e,n,r,i,o){return"undefined"!=typeof window&&(1<arguments.length?document.cookie=t+"="+encodeURIComponent(e)+(n?"; expires="+new Date(+new Date+1e3*n).toUTCString()+(r?"; path="+r:"")+(i?"; domain="+i:"")+(o?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+t+"=")[1]||"").split(";")[0]))}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var B="object"===("undefined"==typeof self?"undefined":u(self))&&self.self===self&&self||"object"===("undefined"==typeof global?"undefined":u(global))&&global.global===global&&global||void 0;!function(){try{a("_c_","1");var t=-1!==document.cookie.indexOf("_c_");a("_c_","",-1)}catch(t){return}}();function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function X(t){return"function"==typeof t}function J(t){return"string"==typeof t}function W(t){if("object"===s(t)&&null!==t){for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}}function l(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}var Y="undefined"!=typeof document;function H(t){return function(t){var e,n={},r=/([^&=]+)=?([^&]*)/g;for(;o=r.exec(t);){var i=l(o[1]),o=l(o[2]);"[]"===i.substring(i.length-2)?(i=i.substring(0,i.length-2),(n[i]||(n[i]=[])).push(o)):n[i]=""===o||o}for(e in n){var a=e.split("[");1<a.length&&(function(t,e,n){for(var r=e.length-1,i=0;i<r;++i){var o=e[i];o in t||(t[o]={}),t=t[o]}t[e[r]]=n}(n,a.map(function(t){return t.replace(/[?[\]\\ ]/g,"")}),n[e]),delete n[e])}return n}(function(t){if(t){t=t.match(/\?(.*)/);return t&&t[1]?t[1].split("#")[0]:""}return Y&&window.location.search.substring(1)}(t))}function Z(){for(var t="",e=0,n=4294967295*Math.random()|0;e++<36;){var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[e-1],i=15&n;t+="-"==r||"4"==r?r:("x"==r?i:3&i|8).toString(16),n=e%8==0?4294967295*Math.random()|0:n>>4}return t}var y="function",g="undefined",m="reducer",f="@@redux/",v=f+"INIT",b=f+Math.random().toString(36),d=function(){return("undefined"==typeof Symbol?"undefined":U(Symbol))===y&&Symbol.observable||"@@observable"}(),h=" != "+y;function K(t,e,n){if(U(e)===y&&U(n)===g&&(n=e,e=void 0),U(n)!==g){if(U(n)!==y)throw new Error("enhancer"+h);return n(K)(t,e)}if(U(t)!==y)throw new Error(m+h);var r=t,i=e,o=[],a=o,u=!1;function c(){a===o&&(a=o.slice())}function s(){return i}function l(e){if(U(e)!==y)throw new Error("Listener"+h);var n=!0;return c(),a.push(e),function(){var t;n&&(n=!1,c(),t=a.indexOf(e),a.splice(t,1))}}function f(t){if(!W(t))throw new Error("Act != obj");if(U(t.type)===g)throw new Error("ActType "+g);if(u)throw new Error("Dispatch in "+m);try{u=!0,i=r(i,t)}finally{u=!1}for(var e=o=a,n=0;n<e.length;n++)(0,e[n])();return t}return f({type:v}),p({dispatch:f,subscribe:l,getState:s,replaceReducer:function(t){if(U(t)!==y)throw new Error("next "+m+h);r=t,f({type:v})}},d,function(){var n=l;return p({subscribe:function(t){if("object"!==U(t))throw new TypeError("Observer != obj");function e(){t.next&&t.next(i)}return e(),{unsubscribe:n(e)}}},d,function(){return this})})}function Q(t){for(var e=Object.keys(t),p={},n=0;n<e.length;n++){var r=e[n];U(t[r])===y&&(p[r]=t[r])}var d,i,h=Object.keys(p);try{i=p,Object.keys(i).forEach(function(t){var e=i[t],n=e(void 0,{type:v});if(U(n)===g||U(e(void 0,{type:b}))===g)throw new Error(m+" "+t+" "+g)})}catch(t){d=t}return function(t,e){var n=0<arguments.length&&void 0!==t?t:{},r=1<arguments.length?e:void 0;if(d)throw d;for(var i=!1,o={},a=0;a<h.length;a++){var u=h[a],c=p[u],s=n[u],l=c(s,r);if(U(l)===g){var f=(f=u,"action "+((c=(c=r)&&c.type)&&c.toString()||"?")+m+" "+f+" returns "+g);throw new Error(f)}o[u]=l,i=i||l!==s}return i?o:n}}function tt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}var et=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],nt=["name","EVENTS","config","loaded"],rt=et.reduce(function(t,e){return t[e]=e,t},{registerPluginType:function(t){return"registerPlugin:".concat(t)},pluginReadyType:function(t){return"ready:".concat(t)}});var w="analytics",it="userId",ot="anonymousId",x="__",at=x+"anon_id",ut=x+"user_id",ct=x+"user_traits",E=Object.freeze({ANON_ID:at,USER_ID:ut,USER_TRAITS:ct}),st=/^utm_/,lt=/^an_prop_/,ft=/^an_trait_/;function pt(t){return{userId:t.getItem(ut),anonymousId:t.getItem(at),traits:t.getItem(ct)||{}}}var dt=function(t){return x+"TEMP"+x+t};var S={};function I(t,e){S[t]&&X(S[t])&&(S[t](e),delete S[t])}function O(i,o,a){return new Promise(function(e,n){return o()?e(i):a<1?n($($({},i),{},{queue:!0})):(r=10,new Promise(function(t){return setTimeout(t,r)}).then(function(t){return O(i,o,a-10).then(e,n)}));var r})}function ht(i,t,o){var n,a=t(),e=i.getState(),u=e.plugins,t=e.context,c=e.queue,s=e.user;!t.offline&&c&&c.actions&&c.actions.length&&((n=c.actions.reduce(function(t,e,n){return u[e.plugin].loaded?(t.process.push(e),t.processIndex.push(n)):(t.requeue.push(e),t.requeueIndex.push(n)),t},{processIndex:[],process:[],requeue:[],requeueIndex:[]})).processIndex&&n.processIndex.length&&(n.processIndex.forEach(function(t){var e=c.actions[t],n=e.plugin,r=e.payload.type,t=a[n][r];t&&X(t)&&(t({payload:e=function(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return[it,ot].reduce(function(t,e){return n.hasOwnProperty(e)&&r[e]&&r[e]!==n[e]&&(t[e]=r[e]),t},n)}(e.payload,s),config:u[n].config,instance:o}),n="".concat(r,":").concat(n),i.dispatch($($({},e),{},{type:n,_:{called:n,from:"queueDrain"}})))}),t=c.actions.filter(function(t,e){return!~n.processIndex.indexOf(e)}),c.actions=t))}var k=function(t){if(Array.isArray(t))return t};var P=function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n};var _=function(){throw new TypeError("")};var j=function(t,e){return k(t)||P(t,e)||_()};var A=/Start$/,N=/^bootstrap/,T=/^ready/;function L(){return(L=G(V.mark(function t(n,e,r,i,o){var a,u,c,s,l,f,p,d,h;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a=X(e)?e():e,u=n.type,c=u.replace(A,""),n._&&n._.called)return t.abrupt("return",n);t.next=5;break;case 5:return s=r.getState(),f=function(e,t,n){var r=1<arguments.length&&void 0!==t?t:{},i=2<arguments.length&&void 0!==n?n:{};return Object.keys(e).filter(function(t){var e=i.plugins||{};return"boolean"==typeof e[t]?e[t]:!1!==e.all&&(!r[t]||!1!==r[t].enabled)}).map(function(t){return e[t]})}(a,s.plugins,n.options),u===rt.initializeStart&&n.fromEnable&&(f=Object.keys(s.plugins).filter(function(t){var e=s.plugins[t];return n.plugins.includes(t)&&!e.initialized}).map(function(t){return a[t]})),l=f.map(function(t){return t.name}),f=function(o,a){var t=yt(o).map(function(t){return q(t,a)});return a.reduce(function(t,e){var n=e.name,r=yt(o,n).map(function(t){return q(t,a)}),i=j(r,3),e=i[0],r=i[1],i=i[2];return e.length&&(t.beforeNS[n]=e),r.length&&(t.duringNS[n]=r),i.length&&(t.afterNS[n]=i),t},{before:t[0],beforeNS:{},during:t[1],duringNS:{},after:t[2],afterNS:{}})}(u,f),t.next=12,z({action:n,data:{exact:f.before,namespaced:f.beforeNS},state:s,allPlugins:a,allMatches:f,instance:r,store:i,EVENTS:o});case 12:if(mt(p=t.sent,l.length))return t.abrupt("return",p);t.next=15;break;case 15:if(u!==c){t.next=19;break}d=p,t.next=22;break;case 19:return t.next=21,z({action:$($({},p),{},{type:c}),data:{exact:f.during,namespaced:f.duringNS},state:s,allPlugins:a,allMatches:f,instance:r,store:i,EVENTS:o});case 21:d=t.sent;case 22:if(u.match(A))return h="".concat(c,"End"),t.next=26,z({action:$($({},d),{},{type:h}),data:{exact:f.after,namespaced:f.afterNS},state:s,allPlugins:a,allMatches:f,instance:r,store:i,EVENTS:o});t.next=28;break;case 26:(h=t.sent).meta&&h.meta.hasCallback&&I(h.meta.rid,{payload:h});case 28:return t.abrupt("return",p);case 29:case"end":return t.stop()}},t)}))).apply(this,arguments)}function z(){return M.apply(this,arguments)}function M(){return(M=G(V.mark(function t(e){var p,a,d,h,n,y,r,g,i,m,v,b,w,x,o,u;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return p=e.data,a=e.action,d=e.instance,u=e.state,h=e.allPlugins,n=e.allMatches,y=e.store,r=e.EVENTS,g=u.plugins,i=u.context,m=a.type,v=m.match(A),u=p.exact.map(function(t){return t.pluginName}),v&&(u=n.during.map(function(t){return t.pluginName})),b=function(d,h){return function(t,e,n){var r=e.config,i=e.name,e="".concat(i,".").concat(t.type);n&&(e=n.event);var o,a,u,c,s,l,f,p,e=t.type.match(A)?(u=i,c=e,s=h,l=n,f=t,function(t,e){var n=l?l.name:u,r=e&&vt(e)?e:s;if(l&&(!(r=e&&vt(e)?e:[u]).includes(u)||1!==r.length))throw new Error("Method ".concat(c," can only abort ").concat(u," plugin. ").concat(JSON.stringify(r)," input valid"));return $($({},f),{},{abort:{reason:t,plugins:r,caller:c,_:n}})}):(o=t,a=e,function(){throw new Error(o.type+" action not cancellable. Remove abort in "+a)});return{payload:(p=t,Object.keys(p).reduce(function(t,e){return"type"===e||(W(p[e])?t[e]=Object.assign({},p[e]):t[e]=p[e]),t},{})),instance:d,config:r||{},abort:e}}}(d,u),w=p.exact.reduce(function(t,e){var n=e.pluginName,r=e.methodName,e=!1;return r.match(/^initialize/)||r.match(/^reset/)||(e=!g[n].loaded),i.offline&&r.match(/^(page|track|identify)/)&&(e=!0),t["".concat(n)]=e,t},{}),t.next=10,p.exact.reduce(function(){var r=G(V.mark(function t(e,n,r){var u,i,o;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return u=n.pluginName,t.next=3,e;case 3:if(i=t.sent,p.namespaced&&p.namespaced[u])return t.next=7,p.namespaced[u].reduce(function(){var r=G(V.mark(function t(e,n,r){var i,o,a;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=function(r,i,o){return function(t,e){var n=o||i;return $($({},r),{},{abort:{reason:t,plugins:e||[i],caller:m,from:n}})}},t.next=3,e;case 3:if(i=t.sent,n.method&&X(n.method)){t.next=6;break}return t.abrupt("return",i);case 6:return function(t,e){var n=wt(t);if(n&&n.name===e){var r=wt(n.method),r=r?"or "+r.method:"";throw new Error([e+" plugin is calling method "+t,"Plugins cant call self","Use ".concat(n.method," ").concat(r," in ").concat(e," plugin insteadof ").concat(t)].join("\n"))}}(n.methodName,n.pluginName),t.next=9,n.method({payload:i,instance:d,abort:o(i,u,n.pluginName),config:D(n.pluginName,g,h),plugins:g});case 9:return a=t.sent,a=W(a)?a:{},t.abrupt("return",Promise.resolve($($({},i),a)));case 12:case"end":return t.stop()}},t)}));return function(t,e,n){return r.apply(this,arguments)}}(),Promise.resolve(a));t.next=11;break;case 7:o=t.sent,i[u]=o,t.next=12;break;case 11:i[u]=a;case 12:return t.abrupt("return",Promise.resolve(i));case 13:case"end":return t.stop()}},t)}));return function(t,e,n){return r.apply(this,arguments)}}(),Promise.resolve({}));case 10:return x=t.sent,t.next=13,p.exact.reduce(function(){var r=G(V.mark(function t(e,n,r){var i,o,a,u,c,s,l,f;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=p.exact.length===r+1,o=n.pluginName,a=h[o],t.next=5,e;case 5:if(u=t.sent,c=x[o]||{},v&&(c=u),gt(c,o))return C({data:c,method:m,instance:d,pluginName:o,store:y}),t.abrupt("return",Promise.resolve(u));t.next=11;break;case 11:if(gt(u,o))return i&&C({data:u,method:m,instance:d,store:y}),t.abrupt("return",Promise.resolve(u));t.next=14;break;case 14:if(w.hasOwnProperty(o)&&!0===w[o])return y.dispatch({type:"queue",plugin:o,payload:c,_:{called:"queue",from:"queueMechanism"}}),t.abrupt("return",Promise.resolve(u));t.next=17;break;case 17:return s=b(x[o],h[o]),t.next=20,a[m]({abort:s.abort,payload:c,instance:d,config:D(o,g,h),plugins:g});case 20:return f=t.sent,l=W(f)?f:{},s=$($({},u),l),gt(f=x[o],o)?C({data:f,method:m,instance:d,pluginName:o,store:y}):(l="".concat(m,":").concat(o),(l.match(/:/g)||[]).length<2&&!m.match(N)&&!m.match(T)&&(f=v?s:c,d.dispatch($($({},f),{},{type:l,_:{called:l,from:"submethod"}})))),t.abrupt("return",Promise.resolve(s));case 26:case"end":return t.stop()}},t)}));return function(t,e,n){return r.apply(this,arguments)}}(),Promise.resolve(a));case 13:if(o=t.sent,m.match(A)||m.match(/^registerPlugin/)||m.match(T)||m.match(N)||m.match(/^params/)||m.match(/^userIdChanged/)){t.next=21;break}if(r.plugins.includes(m),o._&&o._.originalAction===m)return t.abrupt("return",o);t.next=18;break;case 18:u=$($({},o),{_:{originalAction:o.type,called:o.type,from:"engineEnd"}}),mt(o,p.exact.length)&&!m.match(/End$/)&&(u=$($({},u),{type:o.type+"Aborted"})),y.dispatch(u);case 21:return t.abrupt("return",o);case 22:case"end":return t.stop()}},t)}))).apply(this,arguments)}function C(t){var e=t.data,n=t.method,r=(t.instance,t.pluginName),r=n+"Aborted"+(r?":"+r:"");t.store.dispatch($($({},e),{},{type:r,_:{called:r,from:"abort"}}))}function D(t,e,n){t=e[t]||n[t];return t&&t.config?t.config:{}}function q(n,t){return t.reduce(function(t,e){return e[n]?t.concat({methodName:n,pluginName:e.name,method:e[n]}):t},[])}function yt(t,e){var n=t.replace(A,""),e=e?":".concat(e):"";return["".concat(t).concat(e),"".concat(n).concat(e),"".concat(n,"End").concat(e)]}function gt(t,e){t=t.abort;return t&&(!0===t||(bt(t,e)||t&&bt(t.plugins,e)))}function mt(t,e){var n=t.abort;if(n){if(!0===n||J(n))return 1;t=n.plugins;return vt(n)&&n.length===e||vt(t)&&t.length===e}}function vt(t){return Array.isArray(t)}function bt(t,e){return!(!t||!vt(t))&&t.includes(e)}function wt(t){t=t.match(/(.*):(.*)/);return!!t&&{method:t[1],name:t[2]}}function xt(y,g,m){var v={};return function(h){return function(d){return function(){var e=G(V.mark(function t(e){var n,r,i,o,a,u,c,s,l,f,p;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.type,r=e.abort,i=e.plugins,o=e,r)return t.abrupt("return",d(e));t.next=4;break;case 4:if(n===rt.enablePlugin&&h.dispatch({type:rt.initializeStart,plugins:i,disabled:[],fromEnable:!0,meta:e.meta}),n===rt.disablePlugin&&setTimeout(function(){return I(e.meta.rid,{payload:e})},0),n===rt.initializeEnd&&(a=g(),u=Object.keys(a),p=u.filter(function(t){return i.includes(t)}).map(function(t){return a[t]}),c=[],s=[],l=e.disabled,f=p.map(function(e){var t=e.loaded,n=e.name;return O(e,t,1e4).then(function(t){return v[n]||(h.dispatch({type:rt.pluginReadyType(n),name:n,events:Object.keys(e).filter(function(t){return!nt.includes(t)})}),v[n]=!0),c=c.concat(n),e}).catch(function(t){if(t instanceof Error)throw new Error(t);return s=s.concat(t.name),t})}),Promise.all(f).then(function(t){var e={plugins:c,failed:s,disabled:l};setTimeout(function(){u.length===f.length+l.length&&h.dispatch($($({},{type:rt.ready}),e))},0)})),n!==rt.bootstrap)return/^ready:([^:]*)$/.test(n)&&setTimeout(function(){return ht(h,g,y)},0),t.next=11,function(){return L.apply(this,arguments)}(e,g,y,h,m);t.next=13;break;case 11:return p=t.sent,t.abrupt("return",d(p));case 13:return t.abrupt("return",d(o));case 14:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}()}}}function Et(){var a=this;kt(this,Et),p(this,"before",[]),p(this,"after",[]),p(this,"addMiddleware",function(t,e){a[e]=a[e].concat(t)}),p(this,"removeMiddleware",function(e,t){var n=a[t].findIndex(function(t){return t===e});-1!==n&&(a[t]=[].concat(R(a[t].slice(0,n)),R(a[t].slice(n+1))))}),p(this,"dynamicMiddlewares",function(o){return function(i){return function(r){return function(t){var e={getState:i.getState,dispatch:function(t){return i.dispatch(t)}},n=a[o].map(function(t){return t(e)});return tt.apply(void 0,R(n))(r)(t)}}}})}var St,It,Ot,kt=function(t,e){if(!(t instanceof e))throw new TypeError("")};function Pt(t,e){return t.substring(e.length+1,t.length)}function _t(t,n,r){return t.reduce(function(t,e){return t[e]=$($({},r[e]),{enabled:n}),t},r)}St=function(){if(!Y)return!1;var t=navigator.appVersion;return~t.indexOf("Win")?"Windows":~t.indexOf("Mac")?"MacOS":~t.indexOf("X11")?"UNIX":~t.indexOf("Linux")?"Linux":"Unknown OS"}(),It=Y?document.referrer:null,Ot=function(){if(Y){var t=navigator,e=t.language,n=t.languages,t=t.userLanguage;return t||(n&&n.length?n[0]:e)}}(),f=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){}}();var jt={initialized:!1,sessionId:Z(),app:null,version:null,debug:!1,offline:!!Y&&!navigator.onLine,os:{name:St},userAgent:Y?navigator.userAgent:"node",library:{name:w,version:"0.10.1"},timezone:f,locale:Ot,campaign:{},referrer:It};function At(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:jt,e=1<arguments.length?arguments[1]:void 0,n=t.initialized,r=e.type,i=e.campaign;switch(r){case rt.campaign:return $($({},t),{campaign:i});case rt.offline:return $($({},t),{offline:!0});case rt.online:return $($({},t),{offline:!1});default:return n?t:$($($({},jt),t),{initialized:!0})}}var Nt=["plugins","reducers","storage"];function Tt(t){var e=t;try{e=JSON.parse(JSON.stringify(t))}catch(t){}return e}var Lt=/#.*$/;function zt(t){var e=function(){if(Y)for(var t,e=document.getElementsByTagName("link"),n=0;t=e[n];n++)if("canonical"===t.getAttribute("rel"))return t.getAttribute("href")}();return e?e.match(/\?/)?e:e+t:window.location.href.replace(Lt,"")}function Mt(t){var e=0<arguments.length&&void 0!==t?t:{};if(!Y)return e;var n=(u=document).title,r=u.referrer,i=window,o=i.location,a=i.innerWidth,t=i.innerHeight,u=o.hash,o=zt(i=o.search),t={title:n,url:o,path:"/"+((o=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(o=o))&&o[3]?o[3].split("?")[0].replace(Lt,""):""),hash:u,search:i,width:a,height:t};return r&&""!==r&&(t.referrer=r),$($({},t),e)}var Ct={last:{},history:[]};function Dt(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ct,e=1<arguments.length?arguments[1]:void 0,n=e.properties,r=e.options,i=e.meta;if(e.type!==rt.page)return t;r=Tt($({properties:n,meta:i},Object.keys(r).length&&{options:r}));return $($({},t),{last:r,history:t.history.concat(r)})}var qt={last:{},history:[]};function Rt(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:qt,e=1<arguments.length?arguments[1]:void 0,n=e.type,r=e.meta,i=e.options,o=e.event,e=e.properties;if(n!==rt.track)return t;r=Tt($($({event:o,properties:e},Object.keys(i).length&&{options:i}),{},{meta:r}));return $($({},t),{last:r,history:t.history.concat(r)})}var Ut={actions:[]};function Vt(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ut,e=1<arguments.length?arguments[1]:void 0,n=e.type,r=e.payload;switch(n){case"queue":var i=r&&r.type&&r.type===rt.identify?[e].concat(t.actions):t.actions.concat(e);return $($({},t),{},{actions:i});case"dequeue":return[];default:return t}}function Gt(t){var e=function(t,e,n){if(!Y)return!1;var r=window[(n?"add":"remove")+"EventListener"];t.split(" ").forEach(function(t){r(t,e)})}.bind(null,"online offline",function(){return Promise.resolve(!navigator.onLine).then(t)});return e(!0),1}function $t(){var o=x+w+x;return B[o]=[],function(i){return function(t,e,n){var n=i(t,e,n),r=n.dispatch;return Object.assign(n,{dispatch:function(t){var e=t.action||t;return B[o].push(e),r(t)}})}}}function Ft(){return function(){return tt(tt.apply(null,arguments),$t())}}function Bt(t){return t?(e=t,Array.isArray(e)?t:[t]):[];var e}function Xt(t,e,n){var r,i,o=0<arguments.length&&void 0!==t?t:{},t=1<arguments.length?e:void 0,e=2<arguments.length?n:void 0,n=Z();return t&&(S[n]=(r=t,i=function(t){return(t||Array.prototype.slice.call(arguments)).reduce(function(t,e){return t||(X(e)?e:t)},!1)}(e),function(t){i&&i(t),r(t)})),$($({},o),{},{rid:n,ts:(new Date).getTime()},t?{hasCallback:!0}:{})}function Jt(){function t(){return c}function u(){throw new Error("Abort disabled inListener")}var r,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=e.reducers||{},i=e.initialUser||{},a=(e.plugins||[]).reduce(function(t,n){if(X(n))return t.middlewares=t.middlewares.concat(n),t;if(n.NAMESPACE&&(n.name=n.NAMESPACE),!n.name)throw new Error("https://lytics.dev/errors/1");var e=n.EVENTS?Object.keys(n.EVENTS).map(function(t){return n.EVENTS[t]}):[],r=!(!1===n.enabled),i=!(n.config&&!1===n.config.enabled);t.pluginEnabled[n.name]=r&&i,delete n.enabled,n.methods&&(t.methods[n.name]=Object.keys(n.methods).reduce(function(t,e){var r;return t[e]=(r=n.methods[e],function(){var n=Array.prototype.slice.call(arguments),t=Array.apply(null,Array(r.length)).map(function(){}).map(function(t,e){if(n[e]||!1===n[e]||null===n[e])return n[e]}).concat(j);return r.apply({instance:j},t)}),t},{}),delete n.methods);e=Object.keys(n).concat(e),e=new Set(t.events.concat(e));if(t.events=Array.from(e),t.pluginsArray=t.pluginsArray.concat(n),t.plugins[n.name])throw new Error(n.name+"AlreadyLoaded");return t.plugins[n.name]=n,t.plugins[n.name].loaded||(t.plugins[n.name].loaded=function(){return!0}),t},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),o=e.storage||{getItem:function(t){return B[t]},setItem:function(t,e){return B[t]=e},removeItem:function(t){return B[t]=void 0}},l=(r=o,function(t,e,n){e=e.getState("user")[t];if(e)return e;if(n&&W(n)&&n[t])return n[t];n=pt(r)[t];return n||(B[dt(t)]?B[dt(t)]:null)}),c=a.plugins,s=a.events.filter(function(t){return!nt.includes(t)}),f=new Set(s.concat(et).filter(function(t){return!nt.includes(t)})),p=Array.from(f).sort(),d=s.sort(),h=new Et,y=h.addMiddleware,g=h.removeMiddleware,m=h.dynamicMiddlewares,f=H(),s=pt(o),h=$($($($({},s),i),f.an_uid?{userId:f.an_uid}:{}),f.an_aid?{anonymousId:f.an_aid}:{});h.anonymousId||(h.anonymousId=Z());var v,b,w,x,E,S,I,O,k,P,_,i=$({enable:function(e,n){return new Promise(function(t){L.dispatch({type:rt.enablePlugin,plugins:Bt(e),_:{originalAction:rt.enablePlugin}},t,[n])})},disable:function(e,n){return new Promise(function(t){L.dispatch({type:rt.disablePlugin,plugins:Bt(e),_:{originalAction:rt.disablePlugin}},t,[n])})}},a.methods),j={identify:(w=G(V.mark(function t(e,n,r,i){var o,a,u,c,s;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=J(e)?e:null,a=W(e)?e:n,u=r||{},c=j.user(),B[dt(it)]=o,s=o||a.userId||l(it,j,a),t.abrupt("return",new Promise(function(t){L.dispatch($({type:rt.identifyStart,userId:s,traits:a||{},options:u,anonymousId:c.anonymousId},c.id&&c.id!==o&&{previousId:c.id}),t,[n,r,i])}));case 7:case"end":return t.stop()}},t)})),function(t,e,n,r){return w.apply(this,arguments)}),track:(b=G(V.mark(function t(e,n,r,i){var o,a,u;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((o=W(e)?e.event:e)&&J(o)){t.next=3;break}throw new Error("EventMissing");case 3:return a=W(e)?e:n||{},u=W(r)?r:{},t.abrupt("return",new Promise(function(t){L.dispatch({type:rt.trackStart,event:o,properties:a,options:u,userId:l(it,j,n),anonymousId:l(ot,j,n)},t,[n,r,i])}));case 6:case"end":return t.stop()}},t)})),function(t,e,n,r){return b.apply(this,arguments)}),page:(v=G(V.mark(function t(n,r,i){var o,a;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=W(n)?n:{},a=W(r)?r:{},t.abrupt("return",new Promise(function(t,e){L.dispatch({type:rt.pageStart,properties:Mt(o),options:a,userId:l(it,j,o),anonymousId:l(ot,j,o)},t,[n,r,i])}));case 3:case"end":return t.stop()}},t)})),function(t,e,n){return v.apply(this,arguments)}),user:function(t){if(t===it||"id"===t)return l(it,j);if(t===ot||"anonId"===t)return l(ot,j);var e=j.getState("user");return t?F(e,t):e},reset:function(n){return new Promise(function(t,e){L.dispatch({type:rt.resetStart},t,n)})},ready:function(t){return j.on(rt.ready,t)},on:function(n,r){if(!n||!X(r))return!1;if(n===rt.bootstrap)throw new Error(".on disabled for "+n);var i=/Start$|Start:/;if("*"===n){var t=function(){return function(e){return function(t){return t.type.match(i)&&r({payload:t,instance:j,plugins:c}),e(t)}}},e=function(){return function(e){return function(t){return t.type.match(i)||r({payload:t,instance:j,plugins:c}),e(t)}}};return y(t,Wt),y(e,Yt),function(){g(t,Wt),g(e,Yt)}}function o(){return function(e){return function(t){return t.type===n&&r({payload:t,instance:j,plugins:c,abort:u}),e(t)}}}var a=n.match(i)?Wt:Yt;return y(o,a),function(){return g(o,a)}},once:function(t,e){if(!t||!X(e))return!1;if(t===rt.bootstrap)throw new Error(".once disabled for "+t);var n=j.on(t,function(t){t=t.payload;e({payload:t,instance:j,plugins:c,abort:u}),n()});return n},getState:function(t){var e=L.getState();return t?F(e,t):Object.assign({},e)},dispatch:function(t){var e,n=J(t)?{type:t}:t;if(e=n.type,et.includes(e))throw new Error("reserved action "+n.type);t=t._||{},t=$($({},n),{},{_:$({originalAction:n.type},t)});L.dispatch(t)},enablePlugin:i.enable,disablePlugin:i.disable,plugins:i,storage:{getItem:o.getItem,setItem:function(t,e,n){L.dispatch({type:rt.setItemStart,key:t,value:e,options:n})},removeItem:function(t,e){L.dispatch({type:rt.removeItemStart,key:t,options:e})}},setAnonymousId:function(t,e){j.storage.setItem(at,t,e)},events:{all:p,core:et,plugins:d}},p=a.middlewares.concat([function(){return function(e){return function(t){return t.meta||(t.meta=Xt()),e(t)}}},m(Wt),xt(j,t,{all:p,plugins:d}),(k=o,function(t){return function(o){return function(t){var e=t.type,n=t.key,r=t.value,i=t.options;if(e===rt.setItem||e===rt.removeItem){if(t.abort)return o(t);e===rt.setItem?k.setItem(n,r,i):k.removeItem(n,i)}return o(t)}}}),(p=(I=j).storage,O=p.setItem,p.getItem,function(c){return function(u){return function(t){var r,e,n,i,o,a;return t.type===rt.bootstrap&&(r=t.params,n=t.user,(e=t.persistedUser).anonymousId!==n.anonymousId&&O(at,n.anonymousId),e.userId!==n.userId&&O(ut,n.userId),(n=Object.keys(t.params)).length&&(i=r.an_uid,o=r.an_event,a=n.reduce(function(t,e){var n;return(e.match(st)||e.match(/^(d|g)clid/))&&(n="campaign"===(n=e.replace(st,""))?"name":n,t.campaign[n]=r[e]),e.match(lt)&&(t.props[e.replace(lt,"")]=r[e]),e.match(ft)&&(t.traits[e.replace(ft,"")]=r[e]),t},{campaign:{},props:{},traits:{}}),c.dispatch($($({type:rt.params,raw:r},a),i?{userId:i}:{})),i&&setTimeout(function(){return I.identify(i,a.traits)},0),o&&setTimeout(function(){return I.track(o,a.props)},0),Object.keys(a.campaign).length&&c.dispatch({type:rt.campaign,campaign:a.campaign}))),u(t)}}}),(x=(d=(d=j).storage).setItem,E=d.removeItem,S=d.getItem,function(u){return function(a){return function(t){var e,n,r=t.userId,i=t.traits,o=t.options;return t.type===rt.reset&&([ut,ct,at].forEach(function(t){E(t)}),[it,ot,"traits"].forEach(function(t){B[dt(t)]=void 0})),t.type===rt.identify&&(S(at)||x(at,Z()),e=S(ut),n=S(ct)||{},e&&e!==r&&u.dispatch({type:rt.userIdChanged,old:{userId:e,traits:n},new:{userId:r,traits:i},options:o}),r&&x(ut,r),i&&x(ct,$($({},n),i))),a(t)}}}),m(Yt)]),d={context:At,user:(_=o,function(t,e){var n=0<arguments.length&&void 0!==t?t:{},r=1<arguments.length&&void 0!==e?e:{};if(r.type===rt.setItemEnd){if(r.key===at)return $($({},n),{anonymousId:r.value});if(r.key===ut)return $($({},n),{userId:r.value})}switch(r.type){case rt.identify:return Object.assign({},n,{userId:r.userId,traits:$($({},n.traits),r.traits)});case rt.reset:return[ut,at,ct].forEach(function(t){_.removeItem(t)}),Object.assign({},n,{userId:null,anonymousId:null,traits:{}});default:return n}}),page:Dt,track:Rt,plugins:(P=t,function(t,e){var n=0<arguments.length&&void 0!==t?t:{},r=1<arguments.length?e:void 0,t={};if("initialize:aborted"===r.type)return n;if(/^registerPlugin:([^:]*)$/.test(r.type)){var e=Pt(r.type,"registerPlugin"),i=P()[e];if(!i||!e)return n;var o=r.enabled;return t[e]={enabled:o,initialized:!!o&&Boolean(!i.initialize),loaded:!!o&&Boolean(i.loaded()),config:i.config||{}},$($({},n),t)}if(/^initialize:([^:]*)$/.test(r.type)){o=Pt(r.type,rt.initialize),i=P()[o];return i&&o?(t[o]=$($({},n[o]),{initialized:!0,loaded:Boolean(i.loaded())}),$($({},n),t)):n}if(/^ready:([^:]*)$/.test(r.type))return t[r.name]=$($({},n[r.name]),{loaded:!0}),$($({},n),t);switch(r.type){case rt.disablePlugin:return $($({},n),_t(r.plugins,!1,n));case rt.enablePlugin:return $($({},n),_t(r.plugins,!0,n));default:return n}}),queue:Vt},m=tt,o=tt;Y&&e.debug&&((T=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__)&&(m=T({trace:!0,traceLimit:25})),o=function(t){return 0===arguments.length?$t():W(U(t))?Ft():Ft().apply(null,arguments)});var A,N,T=(A=e,Object.keys(A).reduce(function(t,e){return Nt.includes(e)||(t[e]=A[e]),t},{})),e={context:T,user:h,plugins:a.pluginsArray.reduce(function(t,e){var n=e.name,r=e.config,i=e.loaded,o=a.pluginEnabled[n];return t[n]={enabled:o,initialized:!!o&&Boolean(!e.initialize),loaded:Boolean(i()),config:r||{}},t},{})},L=K(Q($($({},d),n)),e,o(m(function(){for(var t=arguments.length,a=new Array(t),e=0;e<t;e++)a[e]=arguments[e];return function(o){return function(t,e,n){var e=o(t,e,n),r=e.dispatch,n=[],i={getState:e.getState,dispatch:function(t){return r(t)}},n=a.map(function(t){return t(i)}),r=tt.apply(void 0,R(n))(e.dispatch);return $($({},e),{},{dispatch:r})}}}.apply(void 0,R(p)))));L.dispatch=(N=L.dispatch,function(t,e,n){n=Xt(t.meta,e,Bt(n)),n=$($({},t),{meta:n});return N.apply(null,[n])});p=Object.keys(c);L.dispatch({type:rt.bootstrap,plugins:p,config:T,params:f,user:h,persistedUser:s});var z,M,C,D=p.filter(function(t){return a.pluginEnabled[t]}),q=p.filter(function(t){return!a.pluginEnabled[t]});return L.dispatch({type:rt.registerPlugins,plugins:p,enabled:a.pluginEnabled}),a.pluginsArray.map(function(t,e){var n=t.bootstrap,r=t.config,i=t.name;n&&X(n)&&n({instance:j,config:r,payload:t}),L.dispatch({type:rt.registerPluginType(i),name:i,enabled:a.pluginEnabled[i],plugin:t}),a.pluginsArray.length===e+1&&L.dispatch({type:rt.initializeStart,plugins:D,disabled:q})}),Gt(function(t){L.dispatch({type:t?rt.offline:rt.online})}),z=L,M=t,C=j,setInterval(function(){return ht(z,M,C)},3e3),j}var Wt="before",Yt="after";return t.default=Jt,t.init=Jt,t.Analytics=Jt,t.EVENTS=rt,t.CONSTANTS=E,t}({});
var _analytics=function(t){"use strict";var e=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}};var n=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var r=function(){throw new TypeError("")};var R=function(t){return e(t)||n(t)||r()};function i(t,e){return t(e={exports:{}},e.exports),e.exports}var U=i(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(t){return n(t)}:e.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(t)}e.exports=r}),V=i(function(t){var e=function(a){var c,t=Object.prototype,s=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i,o,a,u,e=e&&e.prototype instanceof g?e:g,e=Object.create(e.prototype),r=new O(r||[]);return e._invoke=(i=t,o=n,a=r,u=f,function(t,e){if(u===d)throw new Error("");if(u===h){if("throw"===t)throw e;return P()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){var r=function t(e,n){var r=e.iterator[n.method];if(r===c){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=c,t(e,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("")}return y}r=l(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,y;var r=r.arg;if(!r)return n.method="throw",n.arg=new TypeError(""),n.delegate=null,y;{if(!r.done)return r;n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=c)}n.delegate=null;return y}(n,a);if(r){if(r===y)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(u===f)throw u=h,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);u=d;r=l(i,o,a);if("normal"===r.type){if(u=a.done?h:p,r.arg!==y)return{value:r.arg,done:a.done}}else"throw"===r.type&&(u=h,a.method="throw",a.arg=r.arg)}}),e}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var f="suspendedStart",p="suspendedYield",d="executing",h="completed",y={};function g(){}function m(){}function v(){}var b={};b[r]=function(){return this};e=Object.getPrototypeOf,e=e&&e(e(k([])));e&&e!==t&&s.call(e,r)&&(b=e);var w=v.prototype=g.prototype=Object.create(b);function x(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function E(a,u){var e;this._invoke=function(n,r){function t(){return new u(function(t,e){!function e(t,n,r,i){t=l(a[t],a,n);if("throw"!==t.type){var o=t.arg,n=o.value;return n&&"object"==typeof n&&s.call(n,"__await")?u.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):u.resolve(n).then(function(t){o.value=t,r(o)},function(t){return e("throw",t,r,i)})}i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function k(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,t=function t(){for(;++n<e.length;)if(s.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=c,t.done=!0,t};return t.next=t}}return{next:P}}function P(){return{value:c,done:!0}}return((m.prototype=w.constructor=v).constructor=m).displayName=o(v,i,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,o(t,i,"GeneratorFunction")),t.prototype=Object.create(w),t},a.awrap=function(t){return{__await:t}},x(E.prototype),E.prototype[n]=function(){return this},a.AsyncIterator=E,a.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new E(u(t,e,n,r),i);return a.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},x(w),o(w,i,"Generator"),w[r]=function(){return this},w.toString=function(){return"[object Generator]"},a.keys=function(n){var t,r=[];for(t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=k,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(I),!t)for(var e in this)"t"===e.charAt(0)&&s.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=s.call(i,"catchLoc"),u=s.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!u)throw new Error("");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&s.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r,i=n.completion;return"throw"===i.type&&(r=i.arg,I(n)),r}}throw new Error("")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=c),y}},a}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});function c(t,e,n,r,i,o,a){try{var u=t[o](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,i)}var G=function(u){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=u.apply(t,a);function i(t){c(r,e,n,i,o,"next",t)}function o(t){c(r,e,n,i,o,"throw",t)}i(void 0)})}};var p=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};function o(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}var $=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(n,!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e};function F(t,e,n,r,i){for(e=e.split?e.split("."):e,r=0;r<e.length;r++)t=t?t[e[r]]:i;return t===i?n:t}function a(t,e,n,r,i,o){return"undefined"!=typeof window&&(1<arguments.length?document.cookie=t+"="+encodeURIComponent(e)+(n?"; expires="+new Date(+new Date+1e3*n).toUTCString()+(r?"; path="+r:"")+(i?"; domain="+i:"")+(o?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+t+"=")[1]||"").split(";")[0]))}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var B="object"===("undefined"==typeof self?"undefined":u(self))&&self.self===self&&self||"object"===("undefined"==typeof global?"undefined":u(global))&&global.global===global&&global||void 0;!function(){try{a("_c_","1");var t=-1!==document.cookie.indexOf("_c_");a("_c_","",-1)}catch(t){return}}();function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function X(t){return"function"==typeof t}function J(t){return"string"==typeof t}function W(t){if("object"===s(t)&&null!==t){for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}}function l(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}var Y="undefined"!=typeof document;function H(t){return function(t){var e,n={},r=/([^&=]+)=?([^&]*)/g;for(;o=r.exec(t);){var i=l(o[1]),o=l(o[2]);"[]"===i.substring(i.length-2)?(i=i.substring(0,i.length-2),(n[i]||(n[i]=[])).push(o)):n[i]=""===o||o}for(e in n){var a=e.split("[");1<a.length&&(function(t,e,n){for(var r=e.length-1,i=0;i<r;++i){var o=e[i];o in t||(t[o]={}),t=t[o]}t[e[r]]=n}(n,a.map(function(t){return t.replace(/[?[\]\\ ]/g,"")}),n[e]),delete n[e])}return n}(function(t){if(t){t=t.match(/\?(.*)/);return t&&t[1]?t[1].split("#")[0]:""}return Y&&window.location.search.substring(1)}(t))}function Z(){for(var t="",e=0,n=4294967295*Math.random()|0;e++<36;){var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[e-1],i=15&n;t+="-"==r||"4"==r?r:("x"==r?i:3&i|8).toString(16),n=e%8==0?4294967295*Math.random()|0:n>>4}return t}var y="function",g="undefined",m="reducer",f="@@redux/",v=f+"INIT",b=f+Math.random().toString(36),d=function(){return("undefined"==typeof Symbol?"undefined":U(Symbol))===y&&Symbol.observable||"@@observable"}(),h=" != "+y;function K(t,e,n){if(U(e)===y&&U(n)===g&&(n=e,e=void 0),U(n)!==g){if(U(n)!==y)throw new Error("enhancer"+h);return n(K)(t,e)}if(U(t)!==y)throw new Error(m+h);var r=t,i=e,o=[],a=o,u=!1;function c(){a===o&&(a=o.slice())}function s(){return i}function l(e){if(U(e)!==y)throw new Error("Listener"+h);var n=!0;return c(),a.push(e),function(){var t;n&&(n=!1,c(),t=a.indexOf(e),a.splice(t,1))}}function f(t){if(!W(t))throw new Error("Act != obj");if(U(t.type)===g)throw new Error("ActType "+g);if(u)throw new Error("Dispatch in "+m);try{u=!0,i=r(i,t)}finally{u=!1}for(var e=o=a,n=0;n<e.length;n++)(0,e[n])();return t}return f({type:v}),p({dispatch:f,subscribe:l,getState:s,replaceReducer:function(t){if(U(t)!==y)throw new Error("next "+m+h);r=t,f({type:v})}},d,function(){var n=l;return p({subscribe:function(t){if("object"!==U(t))throw new TypeError("Observer != obj");function e(){t.next&&t.next(i)}return e(),{unsubscribe:n(e)}}},d,function(){return this})})}function Q(t){for(var e=Object.keys(t),p={},n=0;n<e.length;n++){var r=e[n];U(t[r])===y&&(p[r]=t[r])}var d,i,h=Object.keys(p);try{i=p,Object.keys(i).forEach(function(t){var e=i[t],n=e(void 0,{type:v});if(U(n)===g||U(e(void 0,{type:b}))===g)throw new Error(m+" "+t+" "+g)})}catch(t){d=t}return function(t,e){var n=0<arguments.length&&void 0!==t?t:{},r=1<arguments.length?e:void 0;if(d)throw d;for(var i=!1,o={},a=0;a<h.length;a++){var u=h[a],c=p[u],s=n[u],l=c(s,r);if(U(l)===g){var f=(f=u,"action "+((c=(c=r)&&c.type)&&c.toString()||"?")+m+" "+f+" returns "+g);throw new Error(f)}o[u]=l,i=i||l!==s}return i?o:n}}function tt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}var et=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],nt=["name","EVENTS","config","loaded"],rt=et.reduce(function(t,e){return t[e]=e,t},{registerPluginType:function(t){return"registerPlugin:".concat(t)},pluginReadyType:function(t){return"ready:".concat(t)}});var w="analytics",it="userId",ot="anonymousId",x="__",at=x+"anon_id",ut=x+"user_id",ct=x+"user_traits",E=Object.freeze({ANON_ID:at,USER_ID:ut,USER_TRAITS:ct}),st=/^utm_/,lt=/^an_prop_/,ft=/^an_trait_/;function pt(t){return{userId:t.getItem(ut),anonymousId:t.getItem(at),traits:t.getItem(ct)||{}}}var dt=function(t){return x+"TEMP"+x+t};var S={};function I(t,e){S[t]&&X(S[t])&&(S[t](e),delete S[t])}function O(i,o,a){return new Promise(function(e,n){return o()?e(i):a<1?n($($({},i),{},{queue:!0})):(r=10,new Promise(function(t){return setTimeout(t,r)}).then(function(t){return O(i,o,a-10).then(e,n)}));var r})}function ht(i,t,o){var n,a=t(),e=i.getState(),u=e.plugins,t=e.context,c=e.queue,s=e.user;!t.offline&&c&&c.actions&&c.actions.length&&((n=c.actions.reduce(function(t,e,n){return u[e.plugin].loaded?(t.process.push(e),t.processIndex.push(n)):(t.requeue.push(e),t.requeueIndex.push(n)),t},{processIndex:[],process:[],requeue:[],requeueIndex:[]})).processIndex&&n.processIndex.length&&(n.processIndex.forEach(function(t){var e=c.actions[t],n=e.plugin,r=e.payload.type,t=a[n][r];t&&X(t)&&(t({payload:e=function(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return[it,ot].reduce(function(t,e){return n.hasOwnProperty(e)&&r[e]&&r[e]!==n[e]&&(t[e]=r[e]),t},n)}(e.payload,s),config:u[n].config,instance:o}),n="".concat(r,":").concat(n),i.dispatch($($({},e),{},{type:n,_:{called:n,from:"queueDrain"}})))}),t=c.actions.filter(function(t,e){return!~n.processIndex.indexOf(e)}),c.actions=t))}var k=function(t){if(Array.isArray(t))return t};var P=function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n};var _=function(){throw new TypeError("")};var j=function(t,e){return k(t)||P(t,e)||_()};var A=/Start$/,N=/^bootstrap/,T=/^ready/;function L(){return(L=G(V.mark(function t(n,e,r,i,o){var a,u,c,s,l,f,p,d,h;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a=X(e)?e():e,u=n.type,c=u.replace(A,""),n._&&n._.called)return t.abrupt("return",n);t.next=5;break;case 5:return s=r.getState(),f=function(e,t,n){var r=1<arguments.length&&void 0!==t?t:{},i=2<arguments.length&&void 0!==n?n:{};return Object.keys(e).filter(function(t){var e=i.plugins||{};return"boolean"==typeof e[t]?e[t]:!1!==e.all&&(!r[t]||!1!==r[t].enabled)}).map(function(t){return e[t]})}(a,s.plugins,n.options),u===rt.initializeStart&&n.fromEnable&&(f=Object.keys(s.plugins).filter(function(t){var e=s.plugins[t];return n.plugins.includes(t)&&!e.initialized}).map(function(t){return a[t]})),l=f.map(function(t){return t.name}),f=function(o,a){var t=yt(o).map(function(t){return q(t,a)});return a.reduce(function(t,e){var n=e.name,r=yt(o,n).map(function(t){return q(t,a)}),i=j(r,3),e=i[0],r=i[1],i=i[2];return e.length&&(t.beforeNS[n]=e),r.length&&(t.duringNS[n]=r),i.length&&(t.afterNS[n]=i),t},{before:t[0],beforeNS:{},during:t[1],duringNS:{},after:t[2],afterNS:{}})}(u,f),t.next=12,z({action:n,data:{exact:f.before,namespaced:f.beforeNS},state:s,allPlugins:a,allMatches:f,instance:r,store:i,EVENTS:o});case 12:if(mt(p=t.sent,l.length))return t.abrupt("return",p);t.next=15;break;case 15:if(u!==c){t.next=19;break}d=p,t.next=22;break;case 19:return t.next=21,z({action:$($({},p),{},{type:c}),data:{exact:f.during,namespaced:f.duringNS},state:s,allPlugins:a,allMatches:f,instance:r,store:i,EVENTS:o});case 21:d=t.sent;case 22:if(u.match(A))return h="".concat(c,"End"),t.next=26,z({action:$($({},d),{},{type:h}),data:{exact:f.after,namespaced:f.afterNS},state:s,allPlugins:a,allMatches:f,instance:r,store:i,EVENTS:o});t.next=28;break;case 26:(h=t.sent).meta&&h.meta.hasCallback&&I(h.meta.rid,{payload:h});case 28:return t.abrupt("return",p);case 29:case"end":return t.stop()}},t)}))).apply(this,arguments)}function z(){return M.apply(this,arguments)}function M(){return(M=G(V.mark(function t(e){var p,a,d,h,n,y,r,g,i,m,v,b,w,x,o,u;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return p=e.data,a=e.action,d=e.instance,u=e.state,h=e.allPlugins,n=e.allMatches,y=e.store,r=e.EVENTS,g=u.plugins,i=u.context,m=a.type,v=m.match(A),u=p.exact.map(function(t){return t.pluginName}),v&&(u=n.during.map(function(t){return t.pluginName})),b=function(d,h){return function(t,e,n){var r=e.config,i=e.name,e="".concat(i,".").concat(t.type);n&&(e=n.event);var o,a,u,c,s,l,f,p,e=t.type.match(A)?(u=i,c=e,s=h,l=n,f=t,function(t,e){var n=l?l.name:u,r=e&&vt(e)?e:s;if(l&&(!(r=e&&vt(e)?e:[u]).includes(u)||1!==r.length))throw new Error("Method ".concat(c," can only abort ").concat(u," plugin. ").concat(JSON.stringify(r)," input valid"));return $($({},f),{},{abort:{reason:t,plugins:r,caller:c,_:n}})}):(o=t,a=e,function(){throw new Error(o.type+" action not cancellable. Remove abort in "+a)});return{payload:(p=t,Object.keys(p).reduce(function(t,e){return"type"===e||(W(p[e])?t[e]=Object.assign({},p[e]):t[e]=p[e]),t},{})),instance:d,config:r||{},abort:e}}}(d,u),w=p.exact.reduce(function(t,e){var n=e.pluginName,r=e.methodName,e=!1;return r.match(/^initialize/)||r.match(/^reset/)||(e=!g[n].loaded),i.offline&&r.match(/^(page|track|identify)/)&&(e=!0),t["".concat(n)]=e,t},{}),t.next=10,p.exact.reduce(function(){var r=G(V.mark(function t(e,n,r){var u,i,o;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return u=n.pluginName,t.next=3,e;case 3:if(i=t.sent,p.namespaced&&p.namespaced[u])return t.next=7,p.namespaced[u].reduce(function(){var r=G(V.mark(function t(e,n,r){var i,o,a;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=function(r,i,o){return function(t,e){var n=o||i;return $($({},r),{},{abort:{reason:t,plugins:e||[i],caller:m,from:n}})}},t.next=3,e;case 3:if(i=t.sent,n.method&&X(n.method)){t.next=6;break}return t.abrupt("return",i);case 6:return function(t,e){var n=wt(t);if(n&&n.name===e){var r=wt(n.method),r=r?"or "+r.method:"";throw new Error([e+" plugin is calling method "+t,"Plugins cant call self","Use ".concat(n.method," ").concat(r," in ").concat(e," plugin insteadof ").concat(t)].join("\n"))}}(n.methodName,n.pluginName),t.next=9,n.method({payload:i,instance:d,abort:o(i,u,n.pluginName),config:D(n.pluginName,g,h),plugins:g});case 9:return a=t.sent,a=W(a)?a:{},t.abrupt("return",Promise.resolve($($({},i),a)));case 12:case"end":return t.stop()}},t)}));return function(t,e,n){return r.apply(this,arguments)}}(),Promise.resolve(a));t.next=11;break;case 7:o=t.sent,i[u]=o,t.next=12;break;case 11:i[u]=a;case 12:return t.abrupt("return",Promise.resolve(i));case 13:case"end":return t.stop()}},t)}));return function(t,e,n){return r.apply(this,arguments)}}(),Promise.resolve({}));case 10:return x=t.sent,t.next=13,p.exact.reduce(function(){var r=G(V.mark(function t(e,n,r){var i,o,a,u,c,s,l,f;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=p.exact.length===r+1,o=n.pluginName,a=h[o],t.next=5,e;case 5:if(u=t.sent,c=x[o]||{},v&&(c=u),gt(c,o))return C({data:c,method:m,instance:d,pluginName:o,store:y}),t.abrupt("return",Promise.resolve(u));t.next=11;break;case 11:if(gt(u,o))return i&&C({data:u,method:m,instance:d,store:y}),t.abrupt("return",Promise.resolve(u));t.next=14;break;case 14:if(w.hasOwnProperty(o)&&!0===w[o])return y.dispatch({type:"queue",plugin:o,payload:c,_:{called:"queue",from:"queueMechanism"}}),t.abrupt("return",Promise.resolve(u));t.next=17;break;case 17:return s=b(x[o],h[o]),t.next=20,a[m]({abort:s.abort,payload:c,instance:d,config:D(o,g,h),plugins:g});case 20:return f=t.sent,l=W(f)?f:{},s=$($({},u),l),gt(f=x[o],o)?C({data:f,method:m,instance:d,pluginName:o,store:y}):(l="".concat(m,":").concat(o),(l.match(/:/g)||[]).length<2&&!m.match(N)&&!m.match(T)&&(f=v?s:c,d.dispatch($($({},f),{},{type:l,_:{called:l,from:"submethod"}})))),t.abrupt("return",Promise.resolve(s));case 26:case"end":return t.stop()}},t)}));return function(t,e,n){return r.apply(this,arguments)}}(),Promise.resolve(a));case 13:if(o=t.sent,m.match(A)||m.match(/^registerPlugin/)||m.match(T)||m.match(N)||m.match(/^params/)||m.match(/^userIdChanged/)){t.next=21;break}if(r.plugins.includes(m),o._&&o._.originalAction===m)return t.abrupt("return",o);t.next=18;break;case 18:u=$($({},o),{_:{originalAction:o.type,called:o.type,from:"engineEnd"}}),mt(o,p.exact.length)&&!m.match(/End$/)&&(u=$($({},u),{type:o.type+"Aborted"})),y.dispatch(u);case 21:return t.abrupt("return",o);case 22:case"end":return t.stop()}},t)}))).apply(this,arguments)}function C(t){var e=t.data,n=t.method,r=(t.instance,t.pluginName),r=n+"Aborted"+(r?":"+r:"");t.store.dispatch($($({},e),{},{type:r,_:{called:r,from:"abort"}}))}function D(t,e,n){t=e[t]||n[t];return t&&t.config?t.config:{}}function q(n,t){return t.reduce(function(t,e){return e[n]?t.concat({methodName:n,pluginName:e.name,method:e[n]}):t},[])}function yt(t,e){var n=t.replace(A,""),e=e?":".concat(e):"";return["".concat(t).concat(e),"".concat(n).concat(e),"".concat(n,"End").concat(e)]}function gt(t,e){t=t.abort;return t&&(!0===t||(bt(t,e)||t&&bt(t.plugins,e)))}function mt(t,e){var n=t.abort;if(n){if(!0===n||J(n))return 1;t=n.plugins;return vt(n)&&n.length===e||vt(t)&&t.length===e}}function vt(t){return Array.isArray(t)}function bt(t,e){return!(!t||!vt(t))&&t.includes(e)}function wt(t){t=t.match(/(.*):(.*)/);return!!t&&{method:t[1],name:t[2]}}function xt(y,g,m){var v={};return function(h){return function(d){return function(){var e=G(V.mark(function t(e){var n,r,i,o,a,u,c,s,l,f,p;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.type,r=e.abort,i=e.plugins,o=e,r)return t.abrupt("return",d(e));t.next=4;break;case 4:if(n===rt.enablePlugin&&h.dispatch({type:rt.initializeStart,plugins:i,disabled:[],fromEnable:!0,meta:e.meta}),n===rt.disablePlugin&&setTimeout(function(){return I(e.meta.rid,{payload:e})},0),n===rt.initializeEnd&&(a=g(),u=Object.keys(a),p=u.filter(function(t){return i.includes(t)}).map(function(t){return a[t]}),c=[],s=[],l=e.disabled,f=p.map(function(e){var t=e.loaded,n=e.name;return O(e,t,1e4).then(function(t){return v[n]||(h.dispatch({type:rt.pluginReadyType(n),name:n,events:Object.keys(e).filter(function(t){return!nt.includes(t)})}),v[n]=!0),c=c.concat(n),e}).catch(function(t){if(t instanceof Error)throw new Error(t);return s=s.concat(t.name),t})}),Promise.all(f).then(function(t){var e={plugins:c,failed:s,disabled:l};setTimeout(function(){u.length===f.length+l.length&&h.dispatch($($({},{type:rt.ready}),e))},0)})),n!==rt.bootstrap)return/^ready:([^:]*)$/.test(n)&&setTimeout(function(){return ht(h,g,y)},0),t.next=11,function(){return L.apply(this,arguments)}(e,g,y,h,m);t.next=13;break;case 11:return p=t.sent,t.abrupt("return",d(p));case 13:return t.abrupt("return",d(o));case 14:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}()}}}function Et(){var a=this;kt(this,Et),p(this,"before",[]),p(this,"after",[]),p(this,"addMiddleware",function(t,e){a[e]=a[e].concat(t)}),p(this,"removeMiddleware",function(e,t){var n=a[t].findIndex(function(t){return t===e});-1!==n&&(a[t]=[].concat(R(a[t].slice(0,n)),R(a[t].slice(n+1))))}),p(this,"dynamicMiddlewares",function(o){return function(i){return function(r){return function(t){var e={getState:i.getState,dispatch:function(t){return i.dispatch(t)}},n=a[o].map(function(t){return t(e)});return tt.apply(void 0,R(n))(r)(t)}}}})}var St,It,Ot,kt=function(t,e){if(!(t instanceof e))throw new TypeError("")};function Pt(t,e){return t.substring(e.length+1,t.length)}function _t(t,n,r){return t.reduce(function(t,e){return t[e]=$($({},r[e]),{enabled:n}),t},r)}St=function(){if(!Y)return!1;var t=navigator.appVersion;return~t.indexOf("Win")?"Windows":~t.indexOf("Mac")?"MacOS":~t.indexOf("X11")?"UNIX":~t.indexOf("Linux")?"Linux":"Unknown OS"}(),It=Y?document.referrer:null,Ot=function(){if(Y){var t=navigator,e=t.language,n=t.languages,t=t.userLanguage;return t||(n&&n.length?n[0]:e)}}(),f=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){}}();var jt={initialized:!1,sessionId:Z(),app:null,version:null,debug:!1,offline:!!Y&&!navigator.onLine,os:{name:St},userAgent:Y?navigator.userAgent:"node",library:{name:w,version:"0.10.2"},timezone:f,locale:Ot,campaign:{},referrer:It};function At(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:jt,e=1<arguments.length?arguments[1]:void 0,n=t.initialized,r=e.type,i=e.campaign;switch(r){case rt.campaign:return $($({},t),{campaign:i});case rt.offline:return $($({},t),{offline:!0});case rt.online:return $($({},t),{offline:!1});default:return n?t:$($($({},jt),t),{initialized:!0})}}var Nt=["plugins","reducers","storage"];function Tt(t){var e=t;try{e=JSON.parse(JSON.stringify(t))}catch(t){}return e}var Lt=/#.*$/;function zt(t){var e=function(){if(Y)for(var t,e=document.getElementsByTagName("link"),n=0;t=e[n];n++)if("canonical"===t.getAttribute("rel"))return t.getAttribute("href")}();return e?e.match(/\?/)?e:e+t:window.location.href.replace(Lt,"")}function Mt(t){var e=0<arguments.length&&void 0!==t?t:{};if(!Y)return e;var n=(u=document).title,r=u.referrer,i=window,o=i.location,a=i.innerWidth,t=i.innerHeight,u=o.hash,o=zt(i=o.search),t={title:n,url:o,path:"/"+((o=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(o=o))&&o[3]?o[3].split("?")[0].replace(Lt,""):""),hash:u,search:i,width:a,height:t};return r&&""!==r&&(t.referrer=r),$($({},t),e)}var Ct={last:{},history:[]};function Dt(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ct,e=1<arguments.length?arguments[1]:void 0,n=e.properties,r=e.options,i=e.meta;if(e.type!==rt.page)return t;r=Tt($({properties:n,meta:i},Object.keys(r).length&&{options:r}));return $($({},t),{last:r,history:t.history.concat(r)})}var qt={last:{},history:[]};function Rt(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:qt,e=1<arguments.length?arguments[1]:void 0,n=e.type,r=e.meta,i=e.options,o=e.event,e=e.properties;if(n!==rt.track)return t;r=Tt($($({event:o,properties:e},Object.keys(i).length&&{options:i}),{},{meta:r}));return $($({},t),{last:r,history:t.history.concat(r)})}var Ut={actions:[]};function Vt(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ut,e=1<arguments.length?arguments[1]:void 0,n=e.type,r=e.payload;switch(n){case"queue":var i=r&&r.type&&r.type===rt.identify?[e].concat(t.actions):t.actions.concat(e);return $($({},t),{},{actions:i});case"dequeue":return[];default:return t}}function Gt(t){var e=function(t,e,n){if(!Y)return!1;var r=window[(n?"add":"remove")+"EventListener"];t.split(" ").forEach(function(t){r(t,e)})}.bind(null,"online offline",function(){return Promise.resolve(!navigator.onLine).then(t)});return e(!0),1}function $t(){var o=x+w+x;return B[o]=[],function(i){return function(t,e,n){var n=i(t,e,n),r=n.dispatch;return Object.assign(n,{dispatch:function(t){var e=t.action||t;return B[o].push(e),r(t)}})}}}function Ft(){return function(){return tt(tt.apply(null,arguments),$t())}}function Bt(t){return t?(e=t,Array.isArray(e)?t:[t]):[];var e}function Xt(t,e,n){var r,i,o=0<arguments.length&&void 0!==t?t:{},t=1<arguments.length?e:void 0,e=2<arguments.length?n:void 0,n=Z();return t&&(S[n]=(r=t,i=function(t){return(t||Array.prototype.slice.call(arguments)).reduce(function(t,e){return t||(X(e)?e:t)},!1)}(e),function(t){i&&i(t),r(t)})),$($({},o),{},{rid:n,ts:(new Date).getTime()},t?{hasCallback:!0}:{})}function Jt(){function t(){return c}function u(){throw new Error("Abort disabled inListener")}var r,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=e.reducers||{},i=e.initialUser||{},a=(e.plugins||[]).reduce(function(t,n){if(X(n))return t.middlewares=t.middlewares.concat(n),t;if(n.NAMESPACE&&(n.name=n.NAMESPACE),!n.name)throw new Error("https://lytics.dev/errors/1");var e=n.EVENTS?Object.keys(n.EVENTS).map(function(t){return n.EVENTS[t]}):[],r=!(!1===n.enabled),i=!(n.config&&!1===n.config.enabled);t.pluginEnabled[n.name]=r&&i,delete n.enabled,n.methods&&(t.methods[n.name]=Object.keys(n.methods).reduce(function(t,e){var r;return t[e]=(r=n.methods[e],function(){var n=Array.prototype.slice.call(arguments),t=Array.apply(null,Array(r.length)).map(function(){}).map(function(t,e){if(n[e]||!1===n[e]||null===n[e])return n[e]}).concat(j);return r.apply({instance:j},t)}),t},{}),delete n.methods);e=Object.keys(n).concat(e),e=new Set(t.events.concat(e));if(t.events=Array.from(e),t.pluginsArray=t.pluginsArray.concat(n),t.plugins[n.name])throw new Error(n.name+"AlreadyLoaded");return t.plugins[n.name]=n,t.plugins[n.name].loaded||(t.plugins[n.name].loaded=function(){return!0}),t},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),o=e.storage||{getItem:function(t){return B[t]},setItem:function(t,e){return B[t]=e},removeItem:function(t){return B[t]=void 0}},l=(r=o,function(t,e,n){e=e.getState("user")[t];if(e)return e;if(n&&W(n)&&n[t])return n[t];n=pt(r)[t];return n||(B[dt(t)]?B[dt(t)]:null)}),c=a.plugins,s=a.events.filter(function(t){return!nt.includes(t)}),f=new Set(s.concat(et).filter(function(t){return!nt.includes(t)})),p=Array.from(f).sort(),d=s.sort(),h=new Et,y=h.addMiddleware,g=h.removeMiddleware,m=h.dynamicMiddlewares,f=H(),s=pt(o),h=$($($($({},s),i),f.an_uid?{userId:f.an_uid}:{}),f.an_aid?{anonymousId:f.an_aid}:{});h.anonymousId||(h.anonymousId=Z());var v,b,w,x,E,S,I,O,k,P,_,i=$({enable:function(e,n){return new Promise(function(t){L.dispatch({type:rt.enablePlugin,plugins:Bt(e),_:{originalAction:rt.enablePlugin}},t,[n])})},disable:function(e,n){return new Promise(function(t){L.dispatch({type:rt.disablePlugin,plugins:Bt(e),_:{originalAction:rt.disablePlugin}},t,[n])})}},a.methods),j={identify:(w=G(V.mark(function t(e,n,r,i){var o,a,u,c,s;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=J(e)?e:null,a=W(e)?e:n,u=r||{},c=j.user(),B[dt(it)]=o,s=o||a.userId||l(it,j,a),t.abrupt("return",new Promise(function(t){L.dispatch($({type:rt.identifyStart,userId:s,traits:a||{},options:u,anonymousId:c.anonymousId},c.id&&c.id!==o&&{previousId:c.id}),t,[n,r,i])}));case 7:case"end":return t.stop()}},t)})),function(t,e,n,r){return w.apply(this,arguments)}),track:(b=G(V.mark(function t(e,n,r,i){var o,a,u;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((o=W(e)?e.event:e)&&J(o)){t.next=3;break}throw new Error("EventMissing");case 3:return a=W(e)?e:n||{},u=W(r)?r:{},t.abrupt("return",new Promise(function(t){L.dispatch({type:rt.trackStart,event:o,properties:a,options:u,userId:l(it,j,n),anonymousId:l(ot,j,n)},t,[n,r,i])}));case 6:case"end":return t.stop()}},t)})),function(t,e,n,r){return b.apply(this,arguments)}),page:(v=G(V.mark(function t(n,r,i){var o,a;return V.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=W(n)?n:{},a=W(r)?r:{},t.abrupt("return",new Promise(function(t,e){L.dispatch({type:rt.pageStart,properties:Mt(o),options:a,userId:l(it,j,o),anonymousId:l(ot,j,o)},t,[n,r,i])}));case 3:case"end":return t.stop()}},t)})),function(t,e,n){return v.apply(this,arguments)}),user:function(t){if(t===it||"id"===t)return l(it,j);if(t===ot||"anonId"===t)return l(ot,j);var e=j.getState("user");return t?F(e,t):e},reset:function(n){return new Promise(function(t,e){L.dispatch({type:rt.resetStart},t,n)})},ready:function(t){return j.on(rt.ready,t)},on:function(n,r){if(!n||!X(r))return!1;if(n===rt.bootstrap)throw new Error(".on disabled for "+n);var i=/Start$|Start:/;if("*"===n){var t=function(){return function(e){return function(t){return t.type.match(i)&&r({payload:t,instance:j,plugins:c}),e(t)}}},e=function(){return function(e){return function(t){return t.type.match(i)||r({payload:t,instance:j,plugins:c}),e(t)}}};return y(t,Wt),y(e,Yt),function(){g(t,Wt),g(e,Yt)}}function o(){return function(e){return function(t){return t.type===n&&r({payload:t,instance:j,plugins:c,abort:u}),e(t)}}}var a=n.match(i)?Wt:Yt;return y(o,a),function(){return g(o,a)}},once:function(t,e){if(!t||!X(e))return!1;if(t===rt.bootstrap)throw new Error(".once disabled for "+t);var n=j.on(t,function(t){t=t.payload;e({payload:t,instance:j,plugins:c,abort:u}),n()});return n},getState:function(t){var e=L.getState();return t?F(e,t):Object.assign({},e)},dispatch:function(t){var e,n=J(t)?{type:t}:t;if(e=n.type,et.includes(e))throw new Error("reserved action "+n.type);t=t._||{},t=$($({},n),{},{_:$({originalAction:n.type},t)});L.dispatch(t)},enablePlugin:i.enable,disablePlugin:i.disable,plugins:i,storage:{getItem:o.getItem,setItem:function(t,e,n){L.dispatch({type:rt.setItemStart,key:t,value:e,options:n})},removeItem:function(t,e){L.dispatch({type:rt.removeItemStart,key:t,options:e})}},setAnonymousId:function(t,e){j.storage.setItem(at,t,e)},events:{all:p,core:et,plugins:d}},p=a.middlewares.concat([function(){return function(e){return function(t){return t.meta||(t.meta=Xt()),e(t)}}},m(Wt),xt(j,t,{all:p,plugins:d}),(k=o,function(t){return function(o){return function(t){var e=t.type,n=t.key,r=t.value,i=t.options;if(e===rt.setItem||e===rt.removeItem){if(t.abort)return o(t);e===rt.setItem?k.setItem(n,r,i):k.removeItem(n,i)}return o(t)}}}),(p=(I=j).storage,O=p.setItem,p.getItem,function(c){return function(u){return function(t){var r,e,n,i,o,a;return t.type===rt.bootstrap&&(r=t.params,n=t.user,(e=t.persistedUser).anonymousId!==n.anonymousId&&O(at,n.anonymousId),e.userId!==n.userId&&O(ut,n.userId),(n=Object.keys(t.params)).length&&(i=r.an_uid,o=r.an_event,a=n.reduce(function(t,e){var n;return(e.match(st)||e.match(/^(d|g)clid/))&&(n="campaign"===(n=e.replace(st,""))?"name":n,t.campaign[n]=r[e]),e.match(lt)&&(t.props[e.replace(lt,"")]=r[e]),e.match(ft)&&(t.traits[e.replace(ft,"")]=r[e]),t},{campaign:{},props:{},traits:{}}),c.dispatch($($({type:rt.params,raw:r},a),i?{userId:i}:{})),i&&setTimeout(function(){return I.identify(i,a.traits)},0),o&&setTimeout(function(){return I.track(o,a.props)},0),Object.keys(a.campaign).length&&c.dispatch({type:rt.campaign,campaign:a.campaign}))),u(t)}}}),(x=(d=(d=j).storage).setItem,E=d.removeItem,S=d.getItem,function(u){return function(a){return function(t){var e,n,r=t.userId,i=t.traits,o=t.options;return t.type===rt.reset&&([ut,ct,at].forEach(function(t){E(t)}),[it,ot,"traits"].forEach(function(t){B[dt(t)]=void 0})),t.type===rt.identify&&(S(at)||x(at,Z()),e=S(ut),n=S(ct)||{},e&&e!==r&&u.dispatch({type:rt.userIdChanged,old:{userId:e,traits:n},new:{userId:r,traits:i},options:o}),r&&x(ut,r),i&&x(ct,$($({},n),i))),a(t)}}}),m(Yt)]),d={context:At,user:(_=o,function(t,e){var n=0<arguments.length&&void 0!==t?t:{},r=1<arguments.length&&void 0!==e?e:{};if(r.type===rt.setItemEnd){if(r.key===at)return $($({},n),{anonymousId:r.value});if(r.key===ut)return $($({},n),{userId:r.value})}switch(r.type){case rt.identify:return Object.assign({},n,{userId:r.userId,traits:$($({},n.traits),r.traits)});case rt.reset:return[ut,at,ct].forEach(function(t){_.removeItem(t)}),Object.assign({},n,{userId:null,anonymousId:null,traits:{}});default:return n}}),page:Dt,track:Rt,plugins:(P=t,function(t,e){var n=0<arguments.length&&void 0!==t?t:{},r=1<arguments.length?e:void 0,t={};if("initialize:aborted"===r.type)return n;if(/^registerPlugin:([^:]*)$/.test(r.type)){var e=Pt(r.type,"registerPlugin"),i=P()[e];if(!i||!e)return n;var o=r.enabled;return t[e]={enabled:o,initialized:!!o&&Boolean(!i.initialize),loaded:!!o&&Boolean(i.loaded()),config:i.config||{}},$($({},n),t)}if(/^initialize:([^:]*)$/.test(r.type)){o=Pt(r.type,rt.initialize),i=P()[o];return i&&o?(t[o]=$($({},n[o]),{initialized:!0,loaded:Boolean(i.loaded())}),$($({},n),t)):n}if(/^ready:([^:]*)$/.test(r.type))return t[r.name]=$($({},n[r.name]),{loaded:!0}),$($({},n),t);switch(r.type){case rt.disablePlugin:return $($({},n),_t(r.plugins,!1,n));case rt.enablePlugin:return $($({},n),_t(r.plugins,!0,n));default:return n}}),queue:Vt},m=tt,o=tt;Y&&e.debug&&((T=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__)&&(m=T({trace:!0,traceLimit:25})),o=function(t){return 0===arguments.length?$t():W(U(t))?Ft():Ft().apply(null,arguments)});var A,N,T=(A=e,Object.keys(A).reduce(function(t,e){return Nt.includes(e)||(t[e]=A[e]),t},{})),e={context:T,user:h,plugins:a.pluginsArray.reduce(function(t,e){var n=e.name,r=e.config,i=e.loaded,o=a.pluginEnabled[n];return t[n]={enabled:o,initialized:!!o&&Boolean(!e.initialize),loaded:Boolean(i()),config:r||{}},t},{})},L=K(Q($($({},d),n)),e,o(m(function(){for(var t=arguments.length,a=new Array(t),e=0;e<t;e++)a[e]=arguments[e];return function(o){return function(t,e,n){var e=o(t,e,n),r=e.dispatch,n=[],i={getState:e.getState,dispatch:function(t){return r(t)}},n=a.map(function(t){return t(i)}),r=tt.apply(void 0,R(n))(e.dispatch);return $($({},e),{},{dispatch:r})}}}.apply(void 0,R(p)))));L.dispatch=(N=L.dispatch,function(t,e,n){n=Xt(t.meta,e,Bt(n)),n=$($({},t),{meta:n});return N.apply(null,[n])});p=Object.keys(c);L.dispatch({type:rt.bootstrap,plugins:p,config:T,params:f,user:h,persistedUser:s});var z,M,C,D=p.filter(function(t){return a.pluginEnabled[t]}),q=p.filter(function(t){return!a.pluginEnabled[t]});return L.dispatch({type:rt.registerPlugins,plugins:p,enabled:a.pluginEnabled}),a.pluginsArray.map(function(t,e){var n=t.bootstrap,r=t.config,i=t.name;n&&X(n)&&n({instance:j,config:r,payload:t}),L.dispatch({type:rt.registerPluginType(i),name:i,enabled:a.pluginEnabled[i],plugin:t}),a.pluginsArray.length===e+1&&L.dispatch({type:rt.initializeStart,plugins:D,disabled:q})}),Gt(function(t){L.dispatch({type:t?rt.offline:rt.online})}),z=L,M=t,C=j,setInterval(function(){return ht(z,M,C)},3e3),j}var Wt="before",Yt="after";return t.default=Jt,t.init=Jt,t.Analytics=Jt,t.EVENTS=rt,t.CONSTANTS=E,t}({});

@@ -135,3 +135,3 @@ declare module "analytics" {

plugins: Plugins;
};
}

@@ -455,3 +455,3 @@ /**

height?: string;
};
}

@@ -485,3 +485,3 @@ /**

ready?: (...params: any[]) => any;
};
}

@@ -488,0 +488,0 @@

{
"name": "@analytics/core",
"version": "0.10.2",
"version": "0.10.3",
"description": "Lightweight analytics library for tracking events, page views, & identifying users. Works with any third party analytics provider via an extendable plugin system.",

@@ -80,3 +80,3 @@ "keywords": [

},
"gitHead": "7966cbb80d42f6843b1db5b100f45707b286eba5"
"gitHead": "9d0442997d98a2b0c29710b91c9df0fbb8221901"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc