forked from bombastictranz/Slack-api-platform
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathping.min.js.download
1 lines (1 loc) · 26.3 KB
/
ping.min.js.download
1
!function(e){var r={};function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(t,n,e){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(n,t){if(1&t&&(n=o(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var r in n)o.d(e,r,function(t){return n[t]}.bind(null,r));return e},o.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(n,"a",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p="",o(o.s=7)}([function(t,n,e){"use strict";var r,o=e(4),i=(function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(u,r=o),u);function u(t,n,e){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,u),r.call(this,t),this.listener=n,this.context=e}t.exports=i},function(t,n,e){"use strict";t.exports=function(t,n,e,r,o,i,u,c){var f,s,a;if(!t)throw void 0===n?a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."):(f=[e,r,o,i,u,c],s=0,(a=new Error(n.replace(/%s/g,function(){return f[s++]}))).name="Invariant Violation"),a.framesToPop=1,a}},function(t,n,e){var r={EventEmitter:e(3),EmitterSubscription:e(0)};t.exports=r},function(t,n,e){"use strict";var r=e(0),o=e(5),i=e(6),u=e(1),c=(f.prototype.addListener=function(t,n,e){return this._subscriber.addSubscription(t,new r(this._subscriber,n,e))},f.prototype.once=function(t,n,e){var r=this;return this.addListener(t,function(){r.removeCurrentListener(),n.apply(e,arguments)})},f.prototype.removeAllListeners=function(t){this._subscriber.removeAllSubscriptions(t)},f.prototype.removeCurrentListener=function(){this._currentSubscription||u(!1),this._subscriber.removeSubscription(this._currentSubscription)},f.prototype.listeners=function(t){var n=this._subscriber.getSubscriptionsForType(t);return n?n.filter(i.thatReturnsTrue).map(function(t){return t.listener}):[]},f.prototype.emit=function(t){var n=this._subscriber.getSubscriptionsForType(t);if(n){for(var e=Object.keys(n),r=0;r<e.length;r++){var o=n[e[r]];o&&(this._currentSubscription=o,this.__emitToSubscription.apply(this,[o].concat(Array.prototype.slice.call(arguments))))}this._currentSubscription=null}},f.prototype.__emitToSubscription=function(t,n){var e=Array.prototype.slice.call(arguments,2);t.listener.apply(t.context,e)},f);function f(){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,f),this._subscriber=new o,this._currentSubscription=null}t.exports=c},function(t,n,e){"use strict";var r=(o.prototype.remove=function(){this.subscriber&&(this.subscriber.removeSubscription(this),this.subscriber=null)},o);function o(t){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,o),this.subscriber=t}t.exports=r},function(t,n,e){"use strict";var r=e(1),o=(i.prototype.addSubscription=function(t,n){n.subscriber!==this&&r(!1),this._subscriptionsForType[t]||(this._subscriptionsForType[t]=[]);var e=this._subscriptionsForType[t].length;return this._subscriptionsForType[t].push(n),n.eventType=t,n.key=e,n},i.prototype.removeAllSubscriptions=function(t){void 0===t?this._subscriptionsForType={}:delete this._subscriptionsForType[t]},i.prototype.removeSubscription=function(t){var n=t.eventType,e=t.key,r=this._subscriptionsForType[n];r&&delete r[e]},i.prototype.getSubscriptionsForType=function(t){return this._subscriptionsForType[t]},i);function i(){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,i),this._subscriptionsForType={},this._currentSubscription=null}t.exports=o},function(t,n,e){"use strict";function r(t){return function(){return t}}function o(){}o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(t){return t},t.exports=o},function(t,n,e){"use strict";e.r(n);var r=e(2),i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),u=new Uint8Array(16);for(var o=[],c=0;c<256;++c)o.push((c+256).toString(16).substr(1));var f=function(t,n){var e=n||0;return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()};var s=function(t,n,e){var r=(t=t||{}).random||(t.rng||function(){if(!i)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(u)})();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,n){e=e||0;for(var o=0;o<16;++o)n[e+o]=r[o];return n}return f(r)};function a(t){return parseFloat(t.toString().replace(/(\d{3})$/,".$1"))}function l(){return a((new Date).getTime())}function p(){return s().replace(/-/g,"")}function y(){d={key:null,lifetime:365,group:null,label:null,experiment:null}}var d={},b=!1;function h(t){return Object.prototype.hasOwnProperty.call(d,t)?d[t]:null}y();function m(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var v={string:function(){return function(t){return"string"==typeof t?t:"number"==typeof t?t.toString():null}},timestamp:function(){return function(t){return"number"==typeof t?1262322000570<t?a(t):1262322e3<t?t:null:t instanceof Date?a(t.getTime()):null}},int:function(){return function(t){var n=parseInt(t,10);return isNaN(n)?null:n}},float:function(){return function(t){var n=parseFloat(t,10);return isNaN(n)?null:n}},boolean:function(){return function(t){return-1<["True","true","1",1,!0].indexOf(t)||!(-1<["False","false","0",0,!1].indexOf(t))&&null}},list:function(r){return function(t){var n;if(Array.isArray(t))n=t;else{if(null==t)return null;n=[t]}return r?n.map(function(e){return Object.keys(r).reduce(function(t,n){return t[n]=r[n](e[n]),t},{})}):n}},object:function(r){return function(e){return e?r?Object.keys(r).reduce(function(t,n){return t[n]=r[n](e[n]),t},{}):e:{}}},price:function(){return function(t){if("number"==typeof t&&(t=(100*t).toString()),"string"==typeof t){if(-1<t.indexOf(",")&&-1===t.indexOf(".")&&(t+="00"),-1<t.indexOf(".")){for(var n=t.indexOf("."),e=t.substr(n+1,2),r=e.length,o=0;o<2-r;o++)e+="0";t=t.substring(0,n)+e}return t.replace(/,/g,"")}}}},g=function(){function t(){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.time=l(),this.action=null,this.group=null,this.label=null,this.experiment=null}var n,e,r;return n=t,(e=[{key:"update",value:function(e){var r=this;e&&Object.keys(this.fields).reduce(function(t,n){n in e&&(r[n]=e[n])},{})}},{key:"data",value:function(){var e=this;return{action:this.action,time:this.time,group:null!==this.group?this.group:h("group"),label:null!==this.label?this.label:h("label"),experiment:null!==this.experiment?this.experiment:h("experiment"),body:Object.keys(this.fields).reduce(function(t,n){return t[n]=e.fields[n](e[n]),t},{})}}}])&&m(n.prototype,e),r&&m(n,r),t}();function w(t){return(w="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 _(t,n){return(_=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function O(i){var u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,n,e,r,o=S(i);return n=u?(t=S(this).constructor,Reflect.construct(o,arguments,t)):o.apply(this,arguments),e=this,!(r=n)||"object"!==w(r)&&"function"!=typeof r?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):r}}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var j=function(){try{return window.self!==window.top}catch(t){return!0}},R=function(){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&_(t,n)}(r,g);var e=O(r);function r(t){var n;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,r),(n=e.call(this)).action="init",n.fields={url:v.string(),referrer:v.string(),inIframe:v.boolean(),windowWidth:v.int(),windowHeight:v.int(),timezoneOffset:v.int(),params:v.object({source:v.string(),placement:v.string(),from:v.string()})},n.url=t.url?t.url:window.location.toString(),n.referrer=t.referrer?t.referrer:document.referrer,n.inIframe=j(),n.windowWidth=window.innerWidth,n.windowHeight=window.innerHeight,n.timezoneOffset=(new Date).getTimezoneOffset(),n.params={source:t.source?t.source:null,placement:t.placement?t.placement:null,from:t.from?t.from:null},n}return r}(),P=["url","referrer"];var T=function(t,n,e){var r,o="";e&&((r=new Date).setTime(r.getTime()+24*e*60*60*1e3),o="; expires=".concat(r.toUTCString())),document.cookie="".concat(t,"=").concat(n).concat(o,"; SameSite=Strict; path=/")},x=function(t){for(var n="".concat(t,"="),e=document.cookie.split(";"),r=0;r<e.length;r+=1){for(var o=e[r];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(n))return o.substring(n.length,o.length)}return null},E="__pdst",k=function(){var t=x(E);return t||(t=p(),T(E,t,h("lifetime")),t=x(E)),t||"0"},C=function(){var t="0";return window.sessionStorage&&((t=sessionStorage.getItem(E))||(sessionStorage.setItem(E,p()),t=sessionStorage.getItem(E))),t||"0"},D={user:k(),session:C(),page:p()};function L(t){if(t){var n="pdst-".concat(l(),"-").concat(parseInt(1e3*Math.random(),10)),e={order:0,pid:A.page,sid:A.session,event:t};try{e.order=localStorage.length,localStorage.setItem(n,JSON.stringify(e))}catch(t){e.order=Object.keys(I).length,I[n]=e}return 1}}var A=D,I={};var F=[],q=function(t){var n=function(){var t=Object.keys(I).map(function(t){return I[t]});if(window.localStorage)for(var n=0;n<localStorage.length;n+=1){var e=localStorage.key(n);/^pdst-[.\d]+-\d+/.test(e)&&t.push(JSON.parse(localStorage.getItem(e)))}var r=t.reduce(function(t,n){var e="".concat(n.sid,".").concat(n.pid);return e in t?t[e].push(n):t[e]=[n],t},{});return Object.keys(r).map(function(t){return r[t].sort(function(t,n){return t.order-n.order})}).sort(function(t,n){return t[0].order-n[0].order}).map(function(t){return{pid:t[0].pid,sid:t[0].sid,events:t.map(function(t){return t.event})}})}();if(!function(){for(var t=window.localStorage?localStorage.length:0,n=[],e=0;e<=t;e+=1){var r=localStorage.key(e);/^pdst-[.\d]+-\d+/.test(r)&&n.push(r)}n.forEach(function(t){localStorage.removeItem(t)}),I={}}(),0===n.length)return!1;var e=A.page;n.forEach(function(t){t.pid===e&&(F=F.concat(t.events))});var r=n.map(function(t){return Object.assign(t,{uid:A.user,key:h("key"),time:l()})});return t.emit("api.capture",r),!0};function N(e){e.addListener("api.capture",function(t){var n;n=t,fetch("https://us-central1-adaptive-growth.cloudfunctions.net/pdst-events-prod-sink",{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(n)}).catch(function(){}).then(function(){e.emit("api.captured")})})}function M(t){return(M="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 V(t,n){return(V=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function U(i){var u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,n,e,r,o=z(i);return n=u?(t=z(this).constructor,Reflect.construct(o,arguments,t)):o.apply(this,arguments),e=this,!(r=n)||"object"!==M(r)&&"function"!=typeof r?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):r}}function z(t){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var H=function(){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&V(t,n)}(r,g);var e=U(r);function r(t){var n;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,r),(n=e.call(this)).action="alias",n.fields={id:v.string()},n.update(t),n}return r}();function J(t){return(J="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 W(t,n){return(W=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function $(i){var u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,n,e,r,o=B(i);return n=u?(t=B(this).constructor,Reflect.construct(o,arguments,t)):o.apply(this,arguments),e=this,!(r=n)||"object"!==J(r)&&"function"!=typeof r?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):r}}function B(t){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var G=function(){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&W(t,n)}(r,g);var e=$(r);function r(t){var n;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,r),(n=e.call(this)).action="product",n.fields={value:v.float(),currency:v.string(),product_id:v.string(),product_name:v.string(),product_type:v.string(),product_vendor:v.string()},n.update(t),n}return r}();function K(t){return(K="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 Q(t,n){return(Q=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function X(i){var u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,n,e,r,o=Y(i);return n=u?(t=Y(this).constructor,Reflect.construct(o,arguments,t)):o.apply(this,arguments),e=this,!(r=n)||"object"!==K(r)&&"function"!=typeof r?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):r}}function Y(t){return(Y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Z=function(){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&Q(t,n)}(r,g);var e=X(r);function r(t){var n;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,r),(n=e.call(this)).action="addtocart",n.fields={value:v.float(),quantity:v.int(),currency:v.string(),product_id:v.string(),product_name:v.string(),product_type:v.string(),product_vendor:v.string(),variant_id:v.string(),variant_name:v.string()},n.update(t),n}return r}();function tt(t){return(tt="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 nt(t,n){return(nt=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function et(i){var u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,n,e,r,o=rt(i);return n=u?(t=rt(this).constructor,Reflect.construct(o,arguments,t)):o.apply(this,arguments),e=this,!(r=n)||"object"!==tt(r)&&"function"!=typeof r?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):r}}function rt(t){return(rt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ot=function(){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&nt(t,n)}(r,g);var e=et(r);function r(t){var n;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,r),(n=e.call(this)).action="purchase",n.fields={value:v.float(),quantity:v.int(),currency:v.string(),discount_code:v.string(),order_id:v.string(),is_new_customer:v.boolean(),line_items:v.list({value:v.float(),quantity:v.int(),product_id:v.string(),product_name:v.string(),product_type:v.string(),product_vendor:v.string(),variant_id:v.string(),variant_name:v.string()})},n.update(t),n}return r}();function it(t){return(it="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 ut(t,n){return(ut=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function ct(i){var u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,n,e,r,o=ft(i);return n=u?(t=ft(this).constructor,Reflect.construct(o,arguments,t)):o.apply(this,arguments),e=this,!(r=n)||"object"!==it(r)&&"function"!=typeof r?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):r}}function ft(t){return(ft=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var st=function(){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&ut(t,n)}(r,g);var e=ct(r);function r(t){var n;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,r),(n=e.call(this)).action="checkout",n.fields={value:v.float(),quantity:v.int(),currency:v.string(),discount_code:v.string(),line_items:v.list({value:v.float(),quantity:v.int(),product_id:v.string(),product_name:v.string(),product_type:v.string(),product_vendor:v.string(),variant_id:v.string(),variant_name:v.string()})},n.update(t),n}return r}();function at(t){return(at="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 lt(t,n){return(lt=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function pt(i){var u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,n,e,r,o=yt(i);return n=u?(t=yt(this).constructor,Reflect.construct(o,arguments,t)):o.apply(this,arguments),e=this,!(r=n)||"object"!==at(r)&&"function"!=typeof r?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):r}}function yt(t){return(yt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var dt=function(){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&<(t,n)}(r,g);var e=pt(r);function r(t){var n;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,r),(n=e.call(this)).action="lead",n.fields={type:v.string(),category:v.string(),value:v.float(),currency:v.string()},n.update(t),n}return r}();function bt(t){return(bt="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 ht(t,n){return(ht=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function mt(i){var u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,n,e,r,o=vt(i);return n=u?(t=vt(this).constructor,Reflect.construct(o,arguments,t)):o.apply(this,arguments),e=this,!(r=n)||"object"!==bt(r)&&"function"!=typeof r?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):r}}function vt(t){return(vt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var gt=function(){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&ht(t,n)}(r,g);var e=mt(r);function r(t){var n;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,r),(n=e.call(this)).action="click",n.fields={type:v.string(),category:v.string()},n.update(t),n}return r}(),wt="__pdst_opt_out";function _t(t){return function(t){if(Array.isArray(t))return Ot(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return Ot(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Ot(t,n)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ot(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}var St,jt,Rt,Pt,Tt,xt,Et,kt,Ct,Dt=new r.EventEmitter;"function"==typeof window.fetch&&"function"==typeof Array.from&&(St=Dt,function(){if(x(wt))return 1;var t=window.location.search;return 0<t.slice("?"==t.charAt(0)?1:0).split("&").map(function(t){return t.split("=").map(decodeURIComponent)}).filter(function(t){return"pdst_opt_out"==t[0]}).length&&(T(wt,"1",3650),1)}()||((jt=St).addListener("event",function(t,n){L(t.data()),1==n&&jt.emit("send.events")}),(Rt=St).addListener("debug.events",function(t){Rt.addListener("event",t)}),(Pt=St).addListener("alias",function(t,n){Pt.emit("event",new H(t),n)}),(Tt=St).addListener("product",function(t,n){Tt.emit("event",new G(t),n)}),Tt.addListener("addtocart",function(t,n){Tt.emit("event",new Z(t),n)}),Tt.addListener("purchase",function(t,n){Tt.emit("event",new ot(t),!1!==n)}),Tt.addListener("checkout",function(t,n){Tt.emit("event",new st(t,n))}),(xt=St).addListener("lead",function(t,n){xt.emit("event",new dt(t),!1!==n)}),(Et=St).addListener("click",function(t,n){Et.emit("event",new gt(t),!1!==n)}),(kt=St).addListener("view",function(n,t){var e=window.location,r=(e.pathname,e.search,e.hash,{});n&&n.hasOwnProperty&&P.forEach(function(t){n.hasOwnProperty(t)&&"string"==typeof n[t]&&(r[t]=n[t])}),kt.emit("event",new R(r),t)}),N(St),(Ct=St).addListener("configure",function(t){b?console.hasOwnProperty("warn")&&console.warn("pdst already configured."):(b=!0,d=Object.assign({},d,t),Ct.emit("configured",d),Ct.emit("view"))}),Ct.addListener("conf",function(e){b?console.hasOwnProperty("warn")&&console.warn("pdst already configured."):(b=!0,e&&(d=Object.keys(e).reduce(function(t,n){return d.hasOwnProperty(n)&&(t[n]=e[n]),t},Object.assign({},d))),Ct.emit("configured",d))}),setTimeout(function(){!function(t,n){n=n||5e3,q(t);var e=setInterval(function(){q(t)},n);setTimeout(function(){clearInterval(e)},6e6),t.addListener("send.events",function(){q(t)})}(St)},1)));function Lt(t,n,e){if(0<arguments.length)return Dt.emit(arguments.length<=0?void 0:t,arguments.length<=1?void 0:n,arguments.length<=2?void 0:e),new Promise(function(t){Dt.once("api.captured",function(){t()})})}window.pdst&&window.pdst.q&&window.pdst.q.length&&window.pdst.q.forEach(function(t){Lt.apply(void 0,_t(t))}),window.pdst=function(){return Lt.apply(void 0,arguments)},window.hasOwnProperty("onPDSTReady")&&window.onPDSTReady()}]);