@artisan-commerce/analytics-web 0.2.0-canary.27 → 0.2.0-canary.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/build/main.bundle.js +1 -1
- package/package.json +3 -3
package/build/main.bundle.js
CHANGED
|
@@ -43,4 +43,4 @@ e.read=function(t,e,r,n,o){var a,i,u=8*o-n-1,c=(1<<u)-1,l=c>>1,s=-7,f=r?o-1:0,p=
|
|
|
43
43
|
*/
|
|
44
44
|
var n=r(7),o=r(8),a=r(9);function i(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,e){if(i()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,r){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return l(this,t,e,r)}function l(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=p(t,e),t}(t,e,r,n):"string"==typeof e?function(t,e,r){if("string"==typeof r&&""!==r||(r="utf8"),!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),o=(t=u(t,n)).write(e,r);return o!==n&&(t=t.slice(0,o)),t}(t,e,r):function(t,e){if(c.isBuffer(e)){var r=0|y(e.length);return 0===(t=u(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?u(t,0):p(t,e);if("Buffer"===e.type&&a(e.data))return p(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(s(e),t=u(t,e<0?0:0|y(e)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function p(t,e){var r=e.length<0?0:0|y(e.length);t=u(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function y(t){if(t>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function d(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return D(t).length;e=(""+e).toLowerCase(),n=!0}}function h(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return E(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return A(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,o);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,o){var a,i=1,u=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;i=2,u/=2,c/=2,r/=2}function l(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}if(o){var s=-1;for(a=r;a<u;a++)if(l(t,a)===l(e,-1===s?0:a-s)){if(-1===s&&(s=a),a-s+1===c)return s*i}else-1!==s&&(a-=a-s),s=-1}else for(r+c>u&&(r=u-c),a=r;a>=0;a--){for(var f=!0,p=0;p<c;p++)if(l(t,a+p)!==l(e,p)){f=!1;break}if(f)return a}return-1}function O(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var i=0;i<n;++i){var u=parseInt(e.substr(2*i,2),16);if(isNaN(u))return i;t[r+i]=u}return i}function m(t,e,r,n){return q(D(e,t.length-r),t,r,n)}function w(t,e,r,n){return q(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function j(t,e,r,n){return w(t,e,r,n)}function P(t,e,r,n){return q(Y(e),t,r,n)}function I(t,e,r,n){return q(function(t,e){for(var r,n,o,a=[],i=0;i<t.length&&!((e-=2)<0);++i)n=(r=t.charCodeAt(i))>>8,o=r%256,a.push(o),a.push(n);return a}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var a,i,u,c,l=t[o],s=null,f=l>239?4:l>223?3:l>191?2:1;if(o+f<=r)switch(f){case 1:l<128&&(s=l);break;case 2:128==(192&(a=t[o+1]))&&(c=(31&l)<<6|63&a)>127&&(s=c);break;case 3:a=t[o+1],i=t[o+2],128==(192&a)&&128==(192&i)&&(c=(15&l)<<12|(63&a)<<6|63&i)>2047&&(c<55296||c>57343)&&(s=c);break;case 4:a=t[o+1],i=t[o+2],u=t[o+3],128==(192&a)&&128==(192&i)&&128==(192&u)&&(c=(15&l)<<18|(63&a)<<12|(63&i)<<6|63&u)>65535&&c<1114112&&(s=c)}null===s?(s=65533,f=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),o+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}function k(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function A(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function E(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",a=e;a<r;++a)o+=N(t[a]);return o}function _(t,e,r){for(var n=t.slice(e,r),o="",a=0;a<n.length;a+=2)o+=String.fromCharCode(n[a]+256*n[a+1]);return o}function T(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,r,n,o,a){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<a)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function R(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,a=Math.min(t.length-r,2);o<a;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function B(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,a=Math.min(t.length-r,4);o<a;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function U(t,e,r,n,o,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(t,e,r,n,a){return a||U(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function L(t,e,r,n,a){return a||U(t,0,r,8),o.write(t,e,r,n,52,8),r+8}e.Buffer=c,e.SlowBuffer=function(t){return+t!=t&&(t=0),c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=i(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,r){return l(null,t,e,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,r){return function(t,e,r,n){return s(e),e<=0?u(t,e):void 0!==r?"string"==typeof n?u(t,e).fill(r,n):u(t,e).fill(r):u(t,e)}(null,t,e,r)},c.allocUnsafe=function(t){return f(null,t)},c.allocUnsafeSlow=function(t){return f(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,a=Math.min(r,n);o<a;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!a(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=c.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];if(!c.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},c.byteLength=d,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?x(this,0,t):h.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,r,n,o){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(o>>>=0)-(n>>>=0),i=(r>>>=0)-(e>>>=0),u=Math.min(a,i),l=this.slice(n,o),s=t.slice(e,r),f=0;f<u;++f)if(l[f]!==s[f]){a=l[f],i=s[f];break}return a<i?-1:i<a?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return O(this,t,e,r);case"utf8":case"utf-8":return m(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return j(this,t,e,r);case"base64":return P(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},c.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=c.prototype;else{var o=e-t;r=new c(o,void 0);for(var a=0;a<o;++a)r[a]=this[a+t]}return r},c.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=this[t],o=1,a=0;++a<e&&(o*=256);)n+=this[t+a]*o;return n},c.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},c.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=this[t],o=1,a=0;++a<e&&(o*=256);)n+=this[t+a]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=e,o=1,a=this[t+--n];n>0&&(o*=256);)a+=this[t+--n]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*e)),a},c.prototype.readInt8=function(t,e){return e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,r,n){t=+t,e|=0,r|=0,n||C(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,a=0;for(this[e]=255&t;++a<r&&(o*=256);)this[e+a]=t/o&255;return e+r},c.prototype.writeUIntBE=function(t,e,r,n){t=+t,e|=0,r|=0,n||C(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,a=1;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=t/a&255;return e+r},c.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):B(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);C(this,t,e,r,o-1,-o)}var a=0,i=1,u=0;for(this[e]=255&t;++a<r&&(i*=256);)t<0&&0===u&&0!==this[e+a-1]&&(u=1),this[e+a]=(t/i>>0)-u&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);C(this,t,e,r,o-1,-o)}var a=r-1,i=1,u=0;for(this[e+a]=255&t;--a>=0&&(i*=256);)t<0&&0===u&&0!==this[e+a+1]&&(u=1),this[e+a]=(t/i>>0)-u&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):B(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,r){return M(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return M(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,a=n-r;if(this===t&&r<e&&e<n)for(o=a-1;o>=0;--o)t[o+e]=this[o+r];else if(a<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),e);return a},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var a;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=e;a<r;++a)this[a]=t;else{var i=c.isBuffer(t)?t:D(new c(t,n).toString()),u=i.length;for(a=0;a<r-e;++a)this[a+e]=i[a%u]}return this};var H=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,e){var r;e=e||1/0;for(var n=t.length,o=null,a=[],i=0;i<n;++i){if((r=t.charCodeAt(i))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(i+1===n){(e-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function Y(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}}).call(this,r(6))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";e.byteLength=function(t){var e=l(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=l(t),i=n[0],u=n[1],c=new a(function(t,e,r){return 3*(e+r)/4-r}(0,i,u)),s=0,f=u>0?i-4:i;for(r=0;r<f;r+=4)e=o[t.charCodeAt(r)]<<18|o[t.charCodeAt(r+1)]<<12|o[t.charCodeAt(r+2)]<<6|o[t.charCodeAt(r+3)],c[s++]=e>>16&255,c[s++]=e>>8&255,c[s++]=255&e;return 2===u&&(e=o[t.charCodeAt(r)]<<2|o[t.charCodeAt(r+1)]>>4,c[s++]=255&e),1===u&&(e=o[t.charCodeAt(r)]<<10|o[t.charCodeAt(r+1)]<<4|o[t.charCodeAt(r+2)]>>2,c[s++]=e>>8&255,c[s++]=255&e),c},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,a=[],i=0,u=r-o;i<u;i+=16383)a.push(s(t,i,i+16383>u?u:i+16383));return 1===o?(e=t[r-1],a.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),a.join("")};for(var n=[],o=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,c=i.length;u<c;++u)n[u]=i[u],o[i.charCodeAt(u)]=u;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function s(t,e,r){for(var o,a,i=[],u=e;u<r;u+=3)o=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),i.push(n[(a=o)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e){
|
|
45
45
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
46
|
-
e.read=function(t,e,r,n,o){var a,i,u=8*o-n-1,c=(1<<u)-1,l=c>>1,s=-7,f=r?o-1:0,p=r?-1:1,y=t[e+f];for(f+=p,a=y&(1<<-s)-1,y>>=-s,s+=u;s>0;a=256*a+t[e+f],f+=p,s-=8);for(i=a&(1<<-s)-1,a>>=-s,s+=n;s>0;i=256*i+t[e+f],f+=p,s-=8);if(0===a)a=1-l;else{if(a===c)return i?NaN:1/0*(y?-1:1);i+=Math.pow(2,n),a-=l}return(y?-1:1)*i*Math.pow(2,a-n)},e.write=function(t,e,r,n,o,a){var i,u,c,l=8*a-o-1,s=(1<<l)-1,f=s>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:a-1,d=n?1:-1,h=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,i=s):(i=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-i))<1&&(i--,c*=2),(e+=i+f>=1?p/c:p*Math.pow(2,1-f))*c>=2&&(i++,c/=2),i+f>=s?(u=0,i=s):i+f>=1?(u=(e*c-1)*Math.pow(2,o),i+=f):(u=e*Math.pow(2,f-1)*Math.pow(2,o),i=0));o>=8;t[r+y]=255&u,y+=d,u/=256,o-=8);for(i=i<<o|u,l+=o;l>0;t[r+y]=255&i,y+=d,i/=256,l-=8);t[r+y-d]|=128*h}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e){var r,n;r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=n.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},bytesToBase64:function(t){for(var e=[],n=0;n<t.length;n+=3)for(var o=t[n]<<16|t[n+1]<<8|t[n+2],a=0;a<4;a++)8*n+6*a<=8*t.length?e.push(r.charAt(o>>>6*(3-a)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],n=0,o=0;n<t.length;o=++n%4)0!=o&&e.push((r.indexOf(t.charAt(n-1))&Math.pow(2,-2*o+8)-1)<<2*o|r.indexOf(t.charAt(n))>>>6-2*o);return e}},t.exports=n},,function(t,e,r){"use strict";r.r(e),r.d(e,"initShoppingCart",(function(){return p})),r.d(e,"closeShoppingCart",(function(){return y})),r.d(e,"listenShoppingCart",(function(){return R})),r.d(e,"getShoppingCart",(function(){return C})),r.d(e,"addProduct",(function(){return st})),r.d(e,"subtractProduct",(function(){return bt})),r.d(e,"removeProduct",(function(){return wt})),r.d(e,"setProduct",(function(){return At})),r.d(e,"replaceProduct",(function(){return Tt})),r.d(e,"createShoppingCart",(function(){return Ut})),r.d(e,"emptyShoppingCart",(function(){return Ht})),r.d(e,"deleteShoppingCart",(function(){return Nt})),r.d(e,"getShoppingCartTotal",(function(){return et})),r.d(e,"getShoppingCartProducts",(function(){return rt})),r.d(e,"validateShoppingCart",(function(){return Zt})),r.d(e,"setShoppingCartAdditionalInfo",(function(){return te})),r.d(e,"getProductHash",(function(){return X})),r.d(e,"listenBenefitsWallet",(function(){return ve})),r.d(e,"applyBenefit",(function(){return je})),r.d(e,"removeBenefit",(function(){return Ee})),r.d(e,"redeemCoupon",(function(){return Me})),r.d(e,"mergeShoppingCart",(function(){return Le})),r.d(e,"checkInit",(function(){return z})),r.d(e,"findProduct",(function(){return V}));var n="YYYY-MM-DD hh:mm:ss.SSS",o="default",a=function(){return(a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},i={artisnApp:void 0,accountId:void 0,customerId:void 0,activeShoppingCart:o,maxShoppingCarts:2,wallets:{},anonymous:!1,initialized:!1};Object.freeze(i);var u=a({},i);Object.seal(u);var c=function(t){u=a(a({},u),t)},l=function(){return a({},u)},s=function(){return(s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},f=o,p=function(t,e){if(void 0===e&&(e={}),l().initialized)console.warn("initShoppingCart has been called more than once. \n This behavior will very likely result in unexpected outcomes so its \n call was skipped. Please make sure initShoppingCart is only called once");else{var r=e.shoppingCartName;c(s(s({artisnApp:t},e),{activeShoppingCart:null!=r?r:f})),"undefined"==typeof window||c({initialized:!0})}},y=function(){c(s({},i))},d=function(t,e,r){var n=e[t],o=r[t];return n>o?1:o>n?-1:0},h=function(t,e){return d("productId",t,e)},g=function(t,e){return d("questionId",t,e)},b=function(t){console.error(t)},v=function(t){var e=(null!=t?t:{}).store,r=(null!=t?t:{}).accountId,n=(null!=t?t:{}).anonymous,o=(null!=t?t:{}).customerId,a=(null!=t?t:{}).shoppingCartName,i=(null!=t?t:{}).maxShoppingCarts,u=l().accountId,c=l().customerId,s=l(),f=s.store,p=s.anonymous,y=l().activeShoppingCart,d=l().maxShoppingCarts;return{shoppingCartName:null!=a?a:y,customerId:null!=o?o:c,store:null!=e?e:f,accountId:null!=r?r:u,anonymous:null!=n?n:p,maxShoppingCarts:null!=i?i:d}},O=function(t){if(void 0===t&&(t=""),!l().artisnApp)throw new Error("Artisn app must be provided, you probably forgot to initialize the shopping cart. Please make sure initShoppingCart has been called beforehand. "+t)},m=function(t,e){void 0===e&&(e="");var r=l().accountId;if(void 0===t&&void 0===r)throw new Error("AccountId must be defined. Either provide a global accountId or at the function call level. "+e)},w=function(t,e){void 0===e&&(e="");var r=l().customerId;if(void 0===t&&void 0===r)throw new Error("CustomerId must be defined. Either provide a global customerId or at the function call level. "+e)},j=function(t,e){void 0===e&&(e="");var r=l().store;if(void 0===t&&void 0===r)throw new Error("StoreId must be defined. Either provide a global storeId or at the function call level. "+e)},P=function(t){void 0===t&&(t={});var e=t.accountId,r=t.customerId;m(e),w(r)},I=function(t,e,r){var n=(null!=r?r:{}).benefitId,o=t[e],a=null==o?void 0:o.benefits;if(S(n),!o||!a)return"No benefits wallet available for "+e+", you probably forgot to call listenBenefitsWallet beforehand."},S=function(t){if(void 0===t)throw new Error("BenefitId must be defined. Provide it at the function call level.")},x=function(t){var e=null!=t?t:{},r=e.Platform,n=e.account;!function(t,e){void 0===e&&(e="");var r=l().artisnApp.settings.platform;if(void 0===t&&void 0===r)throw new Error("Platform must be defined. Either provide a global Plafform in the artisn object or at the function call level. "+e)}(r),m(n)},k=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},A=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},E=o,_=function(t){return void 0===t&&(t={}),k(void 0,void 0,void 0,(function(){var e,r,n,o,a,i,u,c,s,f,p;return A(this,(function(y){switch(y.label){case 0:return e=l(),r=e.artisnApp,n=e.accountId,o=l().customerId,a=l().anonymous,i=t.accountId,u=t.customerId,O(),P(t),c=a?"anonymousShoppingCartByUser":"shoppingCartByUser",s=null==r?void 0:r.__internals__.firestore(),[4,null===(p=null===(f=null==s?void 0:s.collection(c))||void 0===f?void 0:f.doc(String(null!=u?u:o)))||void 0===p?void 0:p.collection(String(null!=i?i:n))];case 1:return[2,y.sent()]}}))}))},T=function(t){return k(void 0,void 0,void 0,(function(){var e,r;return A(this,(function(n){switch(n.label){case 0:return e=v(t).shoppingCartName,[4,_(t)];case 1:return(r=n.sent())&&z()?[4,r.where("name","==",e).get().then((function(t){return t.docs[0]}))]:[2,void 0];case 2:return[2,n.sent()]}}))}))},C=function(t){return k(void 0,void 0,void 0,(function(){var e,r;return A(this,(function(n){switch(n.label){case 0:return e=v(t).shoppingCartName,[4,T(t)];case 1:return(r=n.sent())&&z()?(c({activeShoppingCart:e}),[2,r.data()]):[2]}}))}))},R=function(t,e){return void 0===e&&(e={}),k(void 0,void 0,void 0,(function(){var r,n,o;return A(this,(function(a){switch(a.label){case 0:return r=v(e),n=r.shoppingCartName,[4,_(e)];case 1:return(o=a.sent())&&z()?(c({activeShoppingCart:n}),[2,o.where("name","==",n).onSnapshot((function(e){return k(void 0,void 0,void 0,(function(){var r;return A(this,(function(o){switch(o.label){case 0:return e.docs[0]?[4,e.docs[0].data()]:(n!==E&&console.warn("Failed to fetch a shopping cart with name "+n+" because there wasn't any."),[2,t(void 0)]);case 1:return r=o.sent(),[2,t(r)]}}))}))}))]):[2,function(){}]}}))}))},B=r(1),U=r.n(B),M=r(0),L=function(){return(L=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},H=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},N=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},D=o,Y=function(t){return void 0===t&&(t=D),H(void 0,void 0,void 0,(function(){var e;return N(this,(function(r){switch(r.label){case 0:return[4,T({shoppingCartName:t})];case 1:return[2,null==(e=r.sent())?void 0:e.id]}}))}))},q=function(t){if(void 0!==t)return"number"==typeof t?t:t.storeId},F=function(t,e){var r=q(t);return L("number"!=typeof t?L({},t):{},e[r])},z=function(){return l().initialized},V=function(t){return H(void 0,void 0,void 0,(function(){var e,r,n,o,a,i,u,c,l;return N(this,(function(s){switch(s.label){case 0:e=t.shoppingCartName,r=t.accountId,n=t.customerId,o=t.hash,a=t.productId,i=t.store,s.label=1;case 1:if(s.trys.push([1,3,,4]),!o&&void 0===a)throw new Error("You must provide either a product id or a product hash,\n but none were given.");return[4,C({accountId:r,customerId:n,store:i,shoppingCartName:e})];case 2:return(u=s.sent())?(c=rt(u),[2,o?c.find((function(t){return t.hash===o})):c.find((function(t){return t.productId===a}))]):[2];case 3:return l=s.sent(),console.error(l),[2,void 0];case 4:return[2]}}))}))},$=function(t){var e=t.store,r=t.amount,n=q(e);j(n),function(t){if("number"!=typeof t)throw new Error("Invalid amount recieved, please make sure you include a valid amount.");if(t<0)throw new Error("Cannot receive a negative amount of an item. Please ensure you have added a proper amount of items.");if(0===t)throw new Error("Attempting to pass 0 amount. This might indicate a problem with your code. Please ensure you have added a proper amount of items.")}(r)},G=r(3),W=r.n(G),K=function(){return(K=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},J=function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},Q=M.transformers.toCartProduct,Z=M.modifierUtils.divideProductQA,X=function(t){var e=Z(t),r=e.productId,n=e.questionsAndAnswers,o=e.priceCategory,a=r+"-"+tt(n).sort(g).reduce((function(t,e){var r=e.answers.sort(h).reduce((function(t,e,r){var n=e.productId,o=e.amount,a=X(e),i=a?"{"+a+"}":"";return 0===r?n+"="+o+i:t+"|"+n+"="+o+i}),""),n=e.questionId+":"+r;return""===t?""+n:t+"-"+n}),"")+"*"+o;return W()(a)},tt=function(t){return t.reduce((function(t,e){var r=e.answers.filter((function(t){return t.amount>0})).map((function(t){var e=tt(t.questionsAndAnswers);return K(K({},t),{questionsAndAnswers:e})}));return J(J([],t),[K(K({},e),{answers:r})])}),[]).filter((function(t){return t.answers.length>0}))},et=function(t,e){void 0===e&&(e={});var r=rt(t).reduce((function(t,e){var r=Q(e),n=r.priceCategory,o=Object(M.getProductTotals)(r),a="POINTS"===n,i=a?o.netPrice:0,u=a?0:o.netPrice,c=a?0:o.grossPrice;return{subtotal:t.subtotal+c,totalDiscounts:t.totalDiscounts+o.totalDiscounts,totalTaxes:t.totalTaxes+o.totalTaxes,totalPoints:t.totalPoints+i,total:t.total+u}}),{subtotal:0,totalDiscounts:0,totalTaxes:0,totalPoints:0,total:0}),n=nt(null==t?void 0:t.additional_info,null==t?void 0:t.benefits,r),o=e.shippingCost,a=void 0===o?t.shippingCost:o;if(!a)return n;var i=a.grossPrice,u=a.netPrice,c=a.taxTotal,l=a.discountTotal;return{subtotal:n.subtotal+i,totalDiscounts:n.totalDiscounts+l,totalTaxes:n.totalTaxes+c,shippingCost:u,totalPoints:n.totalPoints,total:n.total+u}},rt=function(t,e){return(void 0===e?Object.values(t.stores):[t.stores[e]]).reduce((function(t,e){if(!e)return t;var r=Object.values(e.products);return J(J([],t),r)}),[])},nt=function(t,e,r){return e?Object.values(e).reduce((function(e,r){return"DISCOUNT"===r.type?ot(r,e,t):e}),r):r},ot=function(t,e,r){var n=e.subtotal,o=e.total,a=e.totalDiscounts,i=.01*t.discountPercentage;if(void 0!==(null==r?void 0:r.copayment)){var u=null==r?void 0:r.copayment,c=u*i,l=a+c,s=(u-c).toFixed(4);return K(K({},e),{totalDiscounts:l,total:Number(s)})}var f=n*i,p=a+f,y=o-f;return K(K({},e),{totalDiscounts:p,total:y})},at=function(){return(at=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},it=n,ut=M.transformers.toCartProduct,ct=M.modifierUtils.multiplyProductQA,lt=M.modifierUtils.divideProductQA,st=function(t,e){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(a){switch(a.label){case 0:return $(e),[4,T(e)];case 1:return(r=a.sent())?[4,r.data()]:(console.warn("Cannot add a product because no shopping cart nodes found. Please ensure you have a shopping cart before continue."),[2]);case 2:return n=a.sent(),o=ft(n,t,e),[4,r.ref.set(o)];case 3:return a.sent(),[2]}}))}))},ft=function(t,e,r){var n=e.amount||1,o=ut(e,at(at({},r),{amount:null!=n?n:1})),a=ut(e,r),i=l().store,u=r.store,c=null!=u?u:i,s=q(c),f=X(o),p=at({},t),y=at({},t.stores),d=F(c,y),h=at({},d.products),g=h[f],b=U()().format(it);g?(h[f]=lt(h[f]),h[f].amount+=a.amount):(h[f]=a,h[f].hash=f,h[f].createdAt=b),h[f].updatedAt=b;var v=h[f],O=(v=ct(v)).questionsAndAnswers,m=tt(O);return h[f]=at(at({},v),{questionsAndAnswers:m}),d.products=h,y[s]=d,p.stores=y,p},pt=function(){return(pt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},yt=n,dt=M.transformers.toCartProduct,ht=M.modifierUtils.multiplyProductQA,gt=M.modifierUtils.divideProductQA,bt=function(t,e){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(a){switch(a.label){case 0:return $(e),[4,T(e)];case 1:return(r=a.sent())?[4,r.data()]:(console.warn("Cannot subtract product because no shopping cart nodes found. Please ensure you have a shopping cart before continue."),[2]);case 2:return n=a.sent(),o=vt(n,t,e),[4,r.ref.set(o)];case 3:return a.sent(),[2]}}))}))},vt=function(t,e,r){var n=e.amount||1,o=dt(e,pt(pt({},r),{amount:null!=n?n:1})),a=dt(e,r),i=l().store,u=r.store,c=null!=u?u:i,s=q(c),f=X(o),p=pt({},t),y=pt({},t.stores);if(void 0===y[s])return console.warn("StoreId given is invalid. There is no store with id "+s+" on the shopping cart."),t;var d=F(c,y),h=pt({},d.products),g=h[f],b=U()().format(yt);if(!g)return console.warn("Attempting to subtract the amount of product that is not in the given shopping cart store."),t;h[f]=gt(h[f]);var v=h[f].amount-a.amount;return v>0?(h[f].amount=v,h[f].updatedAt=b,h[f]=ht(h[f])):delete h[f],d.products=h,Object.keys(d.products).length?y[s]=d:delete y[s],p.stores=y,p},Ot=function(){return(Ot=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},mt=M.transformers.toCartProduct,wt=function(t,e){return void 0===e&&(e={}),function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(a){switch(a.label){case 0:return function(t){var e=t.store,r=q(e);j(r)}(e),[4,T(e)];case 1:return(r=a.sent())?[4,r.data()]:(console.warn("Cannot remove a product because no shopping cart nodes found. Please ensure you have a shopping cart before continue."),[2]);case 2:return n=a.sent(),o=jt(n,t,e),[4,r.ref.set(o)];case 3:return a.sent(),[2]}}))}))},jt=function(t,e,r){var n=e.hash;if(!n){var o=mt(e);n=X(o)}var a=l().store,i=r.store,u=null!=i?i:a,c=q(u),s=Ot({},t),f=Ot({},t.stores);if(void 0===f[c])return console.warn("StoreId given is invalid. There is no store with id "+c+" on the shopping cart."),t;var p=F(u,f),y=Ot({},p.products);return y[n]?(delete y[n],p.products=y,Object.keys(p.products).length?f[c]=p:delete f[c],s.stores=f,s):(console.warn("Attempting to remove product that is not in the given shopping cart store."),t)},Pt=function(){return(Pt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},It=n,St=M.transformers.toCartProduct,xt=M.modifierUtils.multiplyProductQA,kt=M.modifierUtils.divideProductQA,At=function(t,e){return void 0===e&&(e={}),function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o,a,i,u,c,l;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(s){switch(s.label){case 0:return r=null!==(l=null!==(u=e.amount)&&void 0!==u?u:null===(c=t)||void 0===c?void 0:c.amount)&&void 0!==l?l:1,n=Pt(Pt({},e),{amount:r}),$(n),[4,T(e)];case 1:return(o=s.sent())?[4,o.data()]:(console.warn("Cannot set product because no shopping cart nodes found. Please ensure you have a shopping cart before continue."),[2]);case 2:return a=s.sent(),i=Et(a,t,n),[4,o.ref.set(i)];case 3:return s.sent(),[2]}}))}))},Et=function(t,e,r){var n,o,a=null!==(o=null===(n=e)||void 0===n?void 0:n.amount)&&void 0!==o?o:1,i=St(e,Pt(Pt({},r),{amount:a})),u=l().store,c=r.store,s=null!=c?c:u,f=q(s),p=X(i),y=Pt({},t),d=Pt({},t.stores),h=F(s,d),g=Pt({},h.products),b=g[p],v=U()().format(It);g[p]=i,b?g[p]=kt(g[p]):(g[p].createdAt=v,g[p].hash=p),g[p].updatedAt=v;var O=St(g[p],r),m=(O=xt(O)).questionsAndAnswers,w=tt(m);return g[p]=Pt(Pt({},O),{questionsAndAnswers:w}),h.products=g,d[f]=h,y.stores=d,y},_t=function(){return(_t=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Tt=function(t,e){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(a){switch(a.label){case 0:return function(t){var e=t.store,r=q(e);j(r)}(e),[4,T(e)];case 1:return(r=a.sent())?[4,r.data()]:(console.warn("Cannot replace product because no shopping cart nodes found. Please ensure you have a shopping cart before continue."),[2]);case 2:return n=a.sent(),o=Ct(n,t,e),[4,r.ref.set(o)];case 3:return a.sent(),[2]}}))}))},Ct=function(t,e,r){var n=r.hash,o=null!=n?n:e.hash,a=l().store,i=r.store,u=null!=i?i:a,c=q(u),s=_t({},t.stores),f=F(u,s),p=_t({},f.products);if(!p[o])return console.warn("Cannot replace a product because no product was found in the given store"),t;delete p[o],f.products=p,Object.keys(f.products).length?s[c]=f:delete s[c];var y=_t({},t);y.stores=s;var d=_t(_t({},e),{amount:0});return ft(y,d,r)},Rt=function(){return(Rt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bt=o,Ut=function(t,e){return void 0===t&&(t={}),function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o,a,i,u,c,s;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(f){switch(f.label){case 0:return r=v(e),[4,_(r)];case 1:return n=f.sent(),o=Mt(t),n?(a=o.name,[4,n.get()]):(console.warn("Couldn't find a shopping cart collection with the given config. \n Please make sure everything is correct in your configuration \n before continue."),[2]);case 2:if(i=null===(s=f.sent())||void 0===s?void 0:s.docs.length,u=l().maxShoppingCarts,i>=u)throw new Error("Cannot add more carts. Carts limit ("+u+") reached.");return[4,n.where("name","==",a).get()];case 3:if(f.sent().docs.length>0)throw new Error("Attempted to add a shopping cart with the name "+a+", but there is already one shopping cart with that name.");return[4,n.add(o)];case 4:return(c=f.sent())?[4,c.set(Rt(Rt({},o),{id:c.id}))]:(console.error("Failed to create a new shopping cart"),[2]);case 5:return f.sent(),[2]}}))}))},Mt=function(t){void 0===t&&(t={});var e=(new Date).toISOString();return Rt({id:"",name:Bt,latitude:-1,longitude:-1,createdAt:e,updatedAt:e,channelId:1,stores:{},billTotal:{},shippingCost:null},t)},Lt=function(){return(Lt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ht=function(t){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var e,r,n,o;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(a){switch(a.label){case 0:return[4,T(t)];case 1:return e=a.sent(),r=v(t).shoppingCartName,e?[4,e.data()]:(console.warn("Cannot empty cart, shopping cart nodes not found. Please ensure you have a shopping cart with name "+r+" before continue."),[2]);case 2:return n=a.sent(),o=Lt(Lt({},n),{stores:{}}),[4,e.ref.set(o)];case 3:return a.sent(),[2]}}))}))},Nt=function(t){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var e,r;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(n){switch(n.label){case 0:return[4,T(t)];case 1:return e=n.sent(),r=v(t).shoppingCartName,e?[4,e.ref.delete()]:(console.warn("Couldn't find any shopping cart with name "+r+" with the given config."),[2]);case 2:return n.sent(),[2]}}))}))},Dt=r(4),Yt={"Content-Type":"application/json"},qt=function(){return(qt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ft=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},zt=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Vt=function(t){return Ft(void 0,void 0,void 0,(function(){var e,r,n,o,a,i,u,c,s,f,p,y,d,h,g,b,v,O,m;return zt(this,(function(w){switch(w.label){case 0:return e=l(),r=e.artisnApp,n=e.accountId,o=r.settings,a=o.platform,i=o.accountId,u=null!==(g=null!==(h=null!==(d=null===(y=t.account)||void 0===y?void 0:y.toString())&&void 0!==d?d:null==n?void 0:n.toString())&&void 0!==h?h:null==i?void 0:i.toString())&&void 0!==g?g:"",c=null!==(v=null!==(b=null==t?void 0:t.Platform)&&void 0!==b?b:a)&&void 0!==v?v:"",s=c,null===(O=null==t?void 0:t.Authorization)||void 0===O?[3,1]:(p=O,[3,3]);case 1:return[4,$t()];case 2:p=w.sent(),w.label=3;case 3:return f=null!==(m=p)&&void 0!==m?m:"",[2,new Headers(qt(qt(qt({},Yt),t),{Authorization:f,Platform:s,account:u}))]}}))}))},$t=function(t){return Ft(void 0,void 0,void 0,(function(){var e,r,n;return zt(this,(function(o){switch(o.label){case 0:return(e=l().artisnApp)?[4,null===(n=Object(Dt.initAuth)(e).currentUser)||void 0===n?void 0:n.getIdToken(t)]:[2];case 1:return(r=o.sent())?[2,"Bearer "+r]:(b("Please make sure you are authenticated before trying to call a restricted action."),[2])}}))}))},Gt=function(){return(Gt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Wt=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},Kt=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Jt=function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},Qt=function(t,e){return Wt(void 0,void 0,void 0,(function(){var r,n,o,a,i,u,c,s,f,p;return Kt(this,(function(y){switch(y.label){case 0:return r=l().artisnApp.apiURL,n=t.id,o=t.latitude,a=t.longitude,[4,Vt(Gt({},e))];case 1:i=y.sent(),y.label=2;case 2:return y.trys.push([2,4,,5]),[4,fetch(r+"/api/shopping-cart/"+n+"/validateShoppingCart?latitude="+o+"&longitude="+a,{headers:i}).then((function(t){return Wt(void 0,void 0,void 0,(function(){return Kt(this,(function(e){switch(e.label){case 0:return[4,t.json()];case 1:return[2,e.sent()]}}))}))}))];case 3:if(u=y.sent(),!(c=u.data))throw new Error("No shopping cart was found.");return s=Object.values(c.stores).reduce((function(t,e){return e.alerts.length?Jt(Jt([],t),e.alerts):t}),[]),f=Object.values(c.stores).some((function(t){return!!t.alerts.length||Object.values(t.products).some((function(t){return t.alerts.length}))})),[2,{stores:s,products:f}];case 4:return p=y.sent(),console.error(p.message),[2,{stores:[{errorLevel:1,message:"Occurrió un error desconocido, comuníquese con soporte",type:""}],products:!1}];case 5:return[2]}}))}))},Zt=function(t,e,r){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var n,o,a,i;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(u){switch(u.label){case 0:return function(t,e){!function(t,e){void 0===e&&(e="");var r=l().artisnApp.apiURL;if(void 0===t&&void 0===r)throw new Error("ApiURL must be defined. Either provide a global ApiURL or at the function call level. "+e)}(t.apiURL),x(e)}(t,e),n=null!=r?r:l().activeShoppingCart,[4,Y(n)];case 1:return void 0===(o=u.sent())?(console.error("Cannot use undefined as a shopping cart id. Shopping cart "+n+" was not found. Validation canceled."),[2]):(a=t.latitude,i=t.longitude,[4,Qt({id:o,latitude:a,longitude:i},e)]);case 2:return[2,u.sent()]}}))}))},Xt=function(){return(Xt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},te=function(t,e){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o,a;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(i){switch(i.label){case 0:return[4,T({shoppingCartName:e})];case 1:return(r=i.sent())?[4,r.data()]:(n=null!=e?e:l().activeShoppingCart,console.warn("Cannot set additional info because no shopping cart was found. Please ensure you create a shopping cart with name "+n+" before continue."),[2]);case 2:return o=i.sent(),a=ee(o,t),[4,r.ref.set(a)];case 3:return i.sent(),[2]}}))}))},ee=function(t,e){return Xt(Xt({},t),{additional_info:e(t.additional_info)})},re=function(){return(re=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ne=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},oe=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},ae=function(t){return void 0===t&&(t={}),re({benefits:[]},t)},ie=function(t,e){var r,n=l().wallets,o=re(re({},n),((r={})[t]=re({},e),r));c({wallets:o})},ue=function(t){return void 0===t&&(t={}),ne(void 0,void 0,void 0,(function(){var e,r,n,o,a,i,u,c,s;return oe(this,(function(f){switch(f.label){case 0:return e=l(),r=e.artisnApp,n=e.customerId,o=e.accountId,a=t.accountId,i=t.customerId,O(),P(t),u=null==r?void 0:r.__internals__.firestore(),[4,null===(s=null===(c=null==u?void 0:u.collection("benefitsByUser"))||void 0===c?void 0:c.doc(String(null!=i?i:n)))||void 0===s?void 0:s.collection(String(null!=a?a:o))];case 1:return[2,f.sent()]}}))}))},ce=function(t){return ne(void 0,void 0,void 0,(function(){var e;return oe(this,(function(r){switch(r.label){case 0:return[4,ue(t)];case 1:return(e=r.sent())?[4,e.get().then((function(t){return t.docs[0]}))]:[2];case 2:return[2,r.sent()]}}))}))},le=function(t){return ne(void 0,void 0,void 0,(function(){var e,r;return oe(this,(function(n){switch(n.label){case 0:return[4,ce(t)];case 1:return(e=n.sent())?0===Object.keys(e.data()).length?[2,[]]:(r=e.id,[2,Object.values(e.data()).map((function(t){return re(re({},t),{hash:r})}))]):[2]}}))}))},se=function(){return(se=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},fe=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},pe=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},ye=function(t,e){return fe(void 0,void 0,void 0,(function(){var r,n,o,a,i;return pe(this,(function(u){switch(u.label){case 0:return r=l().artisnApp.apiURL,n=t.vendorId,o=t.customerId,[4,Vt(se(se({},e),{uid:o.toString()}))];case 1:return a=u.sent(),i="/api/shopping-cart/retrieveBenefits",n&&(i=i+"?vendorId="+n),[4,fetch(""+r+i,{headers:a}).then((function(t){return fe(void 0,void 0,void 0,(function(){return pe(this,(function(e){switch(e.label){case 0:return[4,t.json()];case 1:return[2,e.sent()]}}))}))}))];case 2:if(!u.sent())throw new Error("The benefits wallet is not defined. Make sure coupons are well configured");return[2]}}))}))},de=function(t,e,r){return fe(void 0,void 0,void 0,(function(){var n,o,a,i,u,c;return pe(this,(function(s){switch(s.label){case 0:return n=l().artisnApp.apiURL,o=t.customerId,[4,Vt(se(se({},r),{uid:o.toString()}))];case 1:a=s.sent(),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,fetch(n+"/api/wallet_profit/apply",{method:"post",body:JSON.stringify({code:e}),headers:a}).then((function(t){return fe(void 0,void 0,void 0,(function(){return pe(this,(function(e){switch(e.label){case 0:return[4,t.json()];case 1:return[2,e.sent()]}}))}))}))];case 3:if(i=s.sent(),200===(u=i).code)return[2,!0];if(null===u.data||!u.data)throw new Error(u.message);return b("Unhandled response when redeeming coupon "+JSON.stringify(u,void 0,2)),[2,!1];case 4:throw c=s.sent(),new Error("Failed to redeem coupon "+e+". "+c.message);case 5:return[2]}}))}))},he=function(){return(he=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ge=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},be=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},ve=function(t,e,r){!function(t){var e=(null!=t?t:{}).customerId;w(e)}(e),x(r);var n=(null!=e?e:{}).shoppingCartName,o=(null!=e?e:{}).customerId,a=l().customerId,i=l(),u=i.activeShoppingCart,c=i.wallets,s=null!=n?n:u,f=c[s],p=null!=o?o:a;if(f)return b("There is already a listener for wallet of name "+s+". Either unsubscribe to the other listener or create a new listener for a different cart"),function(){return Oe(s)};var y=ae();ie(s,he(he({},y),{onSnapshot:t}));var d=void 0;return ge(void 0,void 0,void 0,(function(){var n,o;return be(this,(function(a){switch(a.label){case 0:n=he(he({},e),{customerId:p}),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,ye(n,r)];case 2:return a.sent(),[3,4];case 3:return a.sent(),console.error("Failed to retrieve the user's wallet"),[2];case 4:return[4,ue(e)];case 5:return(o=a.sent())?(d=o.onSnapshot((function(e){return ge(void 0,void 0,void 0,(function(){var r,n,o,a,i,u,c;return be(this,(function(l){return r=null!==(c=null===(u=e.docs[0])||void 0===u?void 0:u.data())&&void 0!==c?c:{},0===Object.keys(r).length?(n=ae(),ie(s,he(he({},n),{onSnapshot:t})),t(n),[2]):(o=e.docs[0].id,a=function(t,e){return Object.values(t).map((function(t){return re(re({},t),{hash:e})}))}(r,o),i=ae({benefits:a}),ie(s,he(he({},i),{onSnapshot:t})),t(i),[2])}))}))})),[2]):(console.error("Failed to retrieve the benefits wallet node"),[2])}}))})),function(){return Oe(s,d)}},Oe=function(t,e){var r=l().wallets,n=he({},r);delete n[t],c({wallets:n}),e&&e()},me=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},we=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},je=function(t){return me(void 0,void 0,void 0,(function(){var e,r,n,o,a,i,u,c,s,f;return we(this,(function(p){if(P(t),e=t.benefitId,r=t.shoppingCartName,n=l(),o=n.activeShoppingCart,a=n.wallets,u=I(a,i=null!=r?r:o,t))return b(u),[2];if(c=a[i],s=c.benefits,!(f=s.find((function(t){return t.benefitId===e}))))return b("No benefit was found in the benefits wallet with the benefitId provided."),[2];switch(f.type){case"PRODUCT":return[2,Pe(t,f)];case"ALTER_DELIVERY":return[2,Ie(t,f)];default:b("The benefit to be applied is not of type PRODUCT or ALTER_DELIVERY.")}return[2]}))}))},Pe=function(t,e){return me(void 0,void 0,void 0,(function(){var r,n,o;return we(this,(function(a){switch(a.label){case 0:return r=t.product,n=t.productConfig,o=e.benefitId,r&&n?(r.benefitId=o,[4,Se(t,e)]):(b("The product or the product configuration has not been provided to apply the selected benefit."),[2]);case 1:return a.sent(),[4,st(r,n)];case 2:return a.sent(),[2]}}))}))},Ie=function(t,e){return me(void 0,void 0,void 0,(function(){var r,n,o,a,i,u,c,l,s,f;return we(this,(function(p){switch(p.label){case 0:return r=t.shippingCost,n=t.latitude,o=t.longitude,r&&n&&o?(a=e.benefitWalletId,i=e.award,Array.isArray(i)&&i.length?(u=i[0],c=u.benefitId,l=u.discountPercentage,s=r.subtotalBeforeTaxes,(f=[]).push({benefitWalletId:a,benefitId:c,discountBase:s,percentage:l,priceCategory:"NORMAL",value:s*(l/100)}),r.discounts=f,[4,Se(t,e,r)]):(b("The award array associated with the benefit is empty."),[2])):(b("The shippingCost, latitude and longitude are required to apply the selected benefit."),[2]);case 1:return p.sent(),[4,Zt({latitude:n,longitude:o})];case 2:return p.sent(),[2]}}))}))},Se=function(t,e,r){return me(void 0,void 0,void 0,(function(){var n,o,a,i,u;return we(this,(function(c){switch(c.label){case 0:return n=t.customerId,o=t.shoppingCartName,[4,T({customerId:n,shoppingCartName:o})];case 1:return(a=c.sent())?[4,a.data()]:(console.warn("Cannot add benefit because no shopping cart nodes were found. Please ensure you have a shopping cart before continue."),[2]);case 2:return i=c.sent(),u=xe(i,e,r),[4,a.ref.set(u)];case 3:return c.sent(),[2]}}))}))},xe=function(t,e,r){var n=e.hash,o=t.benefits,a=null!=o?o:[];return a.push(e),t.benefits=a,t.benefitsHash=n,r&&(t.shippingCost=r),t},ke=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},Ae=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Ee=function(t){return ke(void 0,void 0,void 0,(function(){var e,r,n,o,a,i,u,c,s,f;return Ae(this,(function(p){if(P(t),e=t.benefitId,r=t.shoppingCartName,n=l(),o=n.activeShoppingCart,a=n.wallets,u=I(a,i=null!=r?r:o,t))return b(u),[2];if(c=a[i],s=c.benefits,!(f=s.find((function(t){return t.benefitId===e}))))return b("No benefit was found in the benefits wallet with the benefitId provided."),[2];switch(f.type){case"PRODUCT":return[2,_e(t,f)];case"ALTER_DELIVERY":return[2,Te(t,f)];default:b("The benefit to be removed is not of type PRODUCT or ALTER_DELIVERY.")}return[2]}))}))},_e=function(t,e){return ke(void 0,void 0,void 0,(function(){var r,n,o,a;return Ae(this,(function(i){switch(i.label){case 0:return n=(r=null!=t?t:{}).product,o=r.productConfig,a=(null!=o?o:{}).store,n&&a?[4,Ce(t,e)]:(b("The cart product and the store, inside benefitProductConfig object, are required to remove the selected benefit."),[2]);case 1:return i.sent(),[4,wt(n,o)];case 2:return i.sent(),[2]}}))}))},Te=function(t,e){return ke(void 0,void 0,void 0,(function(){var r;return Ae(this,(function(n){return(r=t.shippingCost)?[2,Ce(t,e,r)]:(b("The shippingCost is require to remove the selected benefit."),[2])}))}))},Ce=function(t,e,r){return ke(void 0,void 0,void 0,(function(){var n,o,a,i,u;return Ae(this,(function(c){switch(c.label){case 0:return n=t.customerId,o=t.shoppingCartName,[4,T({customerId:n,shoppingCartName:o})];case 1:return(a=c.sent())?[4,a.data()]:(console.warn("Cannot remove benefit because no shopping cart nodes were found. Please ensure you have a shopping cart before continue."),[2]);case 2:return i=c.sent(),u=Re(i,e,r),[4,a.ref.set(u)];case 3:return c.sent(),[2]}}))}))},Re=function(t,e,r){var n=t.benefits,o=e.benefitId;if(!n)return console.warn("Cannot remove benefit because the shopping cart does not have benefits applied."),t;var a=n.findIndex((function(t){return t.benefitId===o}));return a<0?(console.warn("This benefit cannot be removed because it is not applied to the shopping cart."),t):(n.splice(a,1),t.benefitsHash=void 0,r&&(t.shippingCost=r),t)},Be=function(){return(Be=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ue=function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},Me=function(t,e,r){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var n,o,a,i,u,s,f,p,y,d,h,g,v,O,m;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(w){switch(w.label){case 0:return n=l().customerId,P(t),x(r),o=t.customerId,a=t.shoppingCartName,i=l(),u=i.activeShoppingCart,s=i.wallets,(p=s[f=null!=a?a:u])||b("No benefits wallet available for "+f+", you probably forgot to call listenBenefitsWallet beforehand."),y=null!=o?o:n,d=Be(Be({},t),{customerId:y}),[4,de(d,e,r)];case 1:return w.sent(),[4,ye(d,r)];case 2:return w.sent(),[4,le()];case 3:if(!(h=w.sent()))throw new Error("Failed to fetch benefits from firestore for the current customer after redeeming coupon");return g=ae({benefits:h}),v={benefits:Ue([],g.benefits),onSnapshot:p.onSnapshot},O=Be(Be({},s),((m={})[f]=v,m)),c({wallets:O}),p.onSnapshot(g),[2]}}))}))},Le=function(t,e){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o,a;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(i){switch(i.label){case 0:return[4,T(e)];case 1:return(r=i.sent())?[4,r.data()]:(console.warn("Cannot merge the shopping carts because no shopping cart nodes were found. Please ensure you have a shopping cart before continue."),[2]);case 2:return n=i.sent(),o=Object.values(t.stores),a=Object.keys(t.stores),o.forEach((function(t,e){var r=Object.values(t.products),o=t.storeId;r.forEach((function(r){var i=r.amount;n=ft(n,r,{store:o?t:+a[e],amount:i})}))})),[4,r.ref.set(n)];case 3:return i.sent(),[2]}}))}))}}])},function(t,e,r){t.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([,function(t,e,r){"use strict";r.r(e),r.d(e,"checkInit",(function(){return c})),r.d(e,"getState",(function(){return u})),r.d(e,"initState",(function(){return a})),r.d(e,"setState",(function(){return i}));var n=function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=null,a=function(t){Object.freeze(t),o=n({},t),Object.seal(o)},i=function(t){var e=o?n({},o):{};o=null,o=n(n({},e),t),Object.seal(o)},u=function(){if(null===o)throw new Error("The state has not been initialized, make sure to call initState beforehand");return n({},o)},c=function(){return!!o}}])},function(t){t.exports=JSON.parse('{"name":"@artisan-commerce/analytics-web","description":"Artisn commerce analytics web library","version":"0.2.0-canary.26","main":"./build/main.bundle.js","types":"./build/src/index.d.ts","files":["build/","LICENSE","README.md"],"scripts":{"compile":"webpack --config webpack.dev.js","dev":"yarn compile","build":"webpack --config webpack.prod.js","compile:build":"nodemon ./build/main.bundle.js","test":"jest --watchAll --runInBand","test:all":"yarn test --watchAll=false --coverage","test:ci":"cross-env CI=true jest --runInBand","test:staged":"yarn test:ci --findRelatedTests ./src","check-types":"tsc --noEmit","lint":"eslint --ignore-path .gitignore --ignore-pattern !cypress/.eslintrc.js --ext .js,jsx,.ts,.tsx .","lint:staged":"yarn lint --max-warnings=0","prettier":"prettier --ignore-path .gitignore \\"**/*.+(js|jsx|ts|tsx|json|css|scss|html)\\"","format":"yarn prettier --write","check-format":"yarn prettier --list-different","validate":"cross-env CI=true npm-run-all --parallel test:ci check-types check-format lint build","validate:ci":"npm-run-all --parallel check-types check-format lint"},"author":"Luis Eduardo Andrade","license":"MIT","dependencies":{"@artisan-commerce/state":"0.3.0-canary.1","snake-case":"^3.0.4"},"devDependencies":{"@artisan-commerce/products":"0.9.0-canary.19","@artisan-commerce/shopping-cart":"0.12.0-canary.25","@artisan-commerce/types":"0.14.0-canary.15","@babel/core":"^7.10.5","@babel/preset-env":"^7.10.4","@babel/preset-react":"^7.10.4","@types/faker":"^4.1.12","@types/jest":"^26.0.5","@types/jest-in-case":"^1.0.2","@types/node":"^14.0.24","@typescript-eslint/eslint-plugin":"^4.15.2","@typescript-eslint/parser":"^4.15.2","avn":"^0.2.4","avn-nvm":"^0.2.2","clean-webpack-plugin":"^3.0.0","dotenv-webpack":"^2.0.0","env-cmd":"^10.1.0","eslint":"^7.5.0","eslint-config-prettier":"^6.11.0","eslint-config-react-app":"^5.2.1","eslint-config-universe":"^4.0.0","eslint-plugin-cypress":"^2.11.1","eslint-plugin-flowtype":"^5.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.20.3","eslint-plugin-react-hooks":"^4.0.8","is-ci-cli":"^2.1.2","jest-axe":"^3.5.0","jest-extended":"^0.11.5","jest-in-case":"^1.0.2","jest-styled-components":"^7.0.2","nodemon":"^2.0.4","npm-run-all":"^4.1.5","prettier":"^2.0.5","start-server-and-test":"^1.11.2","test-data-bot":"^0.8.0","ts-jest":"^26.1.4","ts-loader":"^8.0.2","webpack":"^4.43.0","webpack-bundle-analyzer":"^4.4.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0","webpack-merge":"^5.0.9"},"peerDependencies":{"@artisan-commerce/products":"*","@artisan-commerce/shopping-cart":"*"}}')},,function(t,e,r){"use strict";r.r(e),r.d(e,"initAnalytics",(function(){return _})),r.d(e,"Providers",(function(){return x})),r.d(e,"events",(function(){return Wh})),r.d(e,"updateActiveVendor",(function(){return l})),r.d(e,"identifyUser",(function(){return Kh})),r.d(e,"checkInit",(function(){return N}));var n=r(2),o=r(3),a=function(){return(a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},i={providers:[],activeVendor:void 0,vendors:void 0,shareArtisnAnalytics:!1,debug:!1,initialized:!1,meta:{accountId:void 0,vendorId:void 0,vendorName:void 0,storeId:void 0,storeName:void 0,catalogueId:void 0,catalogueName:void 0,appName:void 0,platform:"web",versionApp:void 0,versionSDK:o.version}},u=function(){return Object(n.getState)()},c=function(t){return Object(n.setState)(t)},l=function(t){var e=typeof t;if("number"!==e&&"object"!==e&&"undefined"!==e)return y("The type of vendor must be a number or Vendor type","severe");var r=u();if("number"==typeof t||void 0===t)c(a(a({},r),{activeVendor:t,meta:a(a({},r.meta),{vendorName:void 0,vendorId:t})}));else{var n=t.id,o=t.name;c(a(a({},r),{activeVendor:n,meta:a(a({},r.meta),{vendorName:o,vendorId:n})}))}},s={GLOBAL_TRACKING_ID:"G-JZ7R91ZNMB"},f=function(){return(f=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},p=function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},y=function(t,e){var r=u().debug,n="artisn/analytics";if("debug"!==e||r)switch(e){case"debug":console.log("%c(Debug) %c"+n+":\n"+t,"font-weight: bold","font-weight: normal");break;case"log":console.log("%c(Log) %c"+n+":\n"+t,"font-weight: bold","font-weight: normal");break;case"warn":console.warn("%c(Warning) %c"+n+":\n"+t,"font-weight: bold","font-weight: normal");break;case"error":console.error("%c(Error) %c"+n+":\n"+t,"font-weight: bold","font-weight: normal");break;case"severe":throw new Error(n+": \n"+t);default:throw new Error("Log message "+t+" of type "+e+" is not a supported type.")}},d=function(){function t(){this.initialized=!1,this._type="GOOGLE_ANALYTICS",this._name="__GLOBAL_PROVIDER__",this._trackingId=s.GLOBAL_TRACKING_ID,this._sampleRate=100,this._currency="USD"}return Object.defineProperty(t.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trackingId",{get:function(){return this._trackingId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sampleRate",{get:function(){return this._sampleRate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"language",{get:function(){return this._language},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currency",{get:function(){return this._currency},enumerable:!1,configurable:!0}),Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vendors",{get:function(){var t,e=u().vendors;return null!==(t=this._vendors)&&void 0!==t?t:e},enumerable:!1,configurable:!0}),t.prototype.setVendors=function(t){this._vendors=t},t.prototype.init=function(){if("undefined"!=typeof window){if(this.initialized)return y("Provider "+this._name+" was already initialized. Do not call init unless you know what you are doing.","severe");this.initialized=!0;var t=document.createElement("script");t.setAttribute("async","true"),t.setAttribute("src","https://www.googletagmanager.com/gtag/js?id="+this._trackingId);var e=document.createElement("script");e.innerText="window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', '"+this._trackingId+"', {'send_page_view': "+!1+"});gtag('event', 'page_view')",document.body.appendChild(t),document.body.appendChild(e)}},t.prototype.updateConfig=function(t){void 0===t&&(t={});var e=Object.entries(t).filter((function(t){return void 0!==t[1]})).map((function(t){return t[0]})),r=t.userId,n=t.currency,o=t.language;e.includes("userId")&&(this._userId=r),e.includes("currency")&&(this._currency=n),e.includes("language")&&(this._language=o),gtag("set",this._trackingId,t)},t._instance=new t,t}(),h=function(){function t(t){this.initialized=!1;var e=t.type,r=t.name,n=t.trackingId,o=t.vendors;this.type=e,this.name=r,this.trackingId=n,this._vendors=o}return Object.defineProperty(t.prototype,"vendors",{get:function(){var t,e=u().vendors;return null!==(t=this._vendors)&&void 0!==t?t:e},enumerable:!1,configurable:!0}),t.prototype.init=function(){if("undefined"!=typeof window)return this.initialized?y("Provider "+this.name+" was already initialized. Do not call init unless you know what you are doing.","severe"):void(this.initialized=!0)},t.prototype.updateConfig=function(t){!function(t,e){if(t.trackingId!==s.GLOBAL_TRACKING_ID){var r=Object.entries(e).reduce((function(t,e,r){var n=e[0],o=e[1];return 0===r?n+": "+o:t+"\n"+n+": "+o}),"");y(t.name+" config updated for the following fields.\n "+r,"debug")}}(this,t),d.instance.updateConfig(t)},t}(),g=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),b=function(){return(b=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},v=function(t){function e(e){var r=this,n=e.version,o=e.currency;return(r=t.call(this,b(b({},e),{type:"FACEBOOK_PIXEL"}))||this)._version=null!=n?n:"10.0",r._currency=null!=o?o:"USD",r}return g(e,t),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currency",{get:function(){return this._currency},enumerable:!1,configurable:!0}),e.prototype.init=function(){t.prototype.init.call(this);var e=document.createElement("link");e.setAttribute("rel","preconnect"),e.setAttribute("href","https://connect.facebook.net/en_US/fbevents.js");var r=document.createElement("script");r.setAttribute("async","true"),r.innerText="!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='"+this.version+"';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','https://connect.facebook.net/en_US/fbevents.js');fbq('init', '"+this.trackingId+"');fbq('trackSingle', '"+this.trackingId+"', 'PageView');";var n=document.createElement("noscript");n.innerHTML='\n <img height="1" width="1" style="display:none" \n src="https://www.facebook.com/tr?id={'+this.trackingId+'}&noscript=1"/>\n ',document.head.appendChild(e),document.head.appendChild(r),document.head.appendChild(n)},e.prototype.updateConfig=function(e){void 0===e&&(e={});var r=Object.entries(e).filter((function(t){return void 0!==t[1]})).map((function(t){return t[0]})),n=e.currency;r.includes("currency")&&(this._currency=n),t.prototype.updateConfig.call(this,e)},e}(h),O=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),m=function(){return(m=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},w=function(t){function e(e){var r=t.call(this,m(m({},e),{type:"GOOGLE_ANALYTICS"}))||this,n=e.userId,o=e.currency,a=e.language,i=e.sampleRate;return r._sampleRate=i,r._userId=n,r._language=a,r._currency=null!=o?o:"USD",r}return O(e,t),Object.defineProperty(e.prototype,"sampleRate",{get:function(){return this._sampleRate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userId",{get:function(){return this._userId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"language",{get:function(){return this._language},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currency",{get:function(){return this._currency},enumerable:!1,configurable:!0}),e.prototype.init=function(){t.prototype.init.call(this);var e=document.createElement("link");e.setAttribute("rel","preconnect"),e.setAttribute("href","https://www.googletagmanager.com/gtag/js?id="+this.trackingId);var r=document.createElement("script");r.setAttribute("async","true"),r.setAttribute("src","https://www.googletagmanager.com/gtag/js?id="+this.trackingId);var n=document.createElement("script");n.innerText="window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', '"+this.trackingId+"', {'send_page_view': "+!1+"});gtag('event', 'page_view')",document.head.appendChild(e),document.head.appendChild(r),document.head.appendChild(n)},e.prototype.updateConfig=function(e){void 0===e&&(e={});var r=Object.entries(e).filter((function(t){return void 0!==t[1]})).map((function(t){return t[0]})),n=e.userId,o=e.currency,a=e.language;r.includes("userId")&&(this._userId=n),r.includes("currency")&&(this._currency=o),r.includes("language")&&(this._language=a),gtag("set",this.trackingId,e),t.prototype.updateConfig.call(this,e)},e}(h),j=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),P=function(){return(P=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},I=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},S=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},x={FacebookPixel:v,GoogleAnalytics:w,Segment:function(t){function e(e){var r=t.call(this,P(P({},e),{type:"SEGMENT"}))||this,n=e.writeKey,o=e.currency;return r._writeKey=n,r._currency=null!=o?o:"USD",r}return j(e,t),e.prototype.init=function(){return I(this,void 0,void 0,(function(){var e;return S(this,(function(r){return t.prototype.init.call(this),(e=document.createElement("script")).setAttribute("async","true"),e.innerText='\n !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e<analytics.methods.length;e++){var key=analytics.methods[e];analytics[key]=analytics.factory(key)}analytics.load=function(key,e){var t=document.createElement("script");t.type="text/javascript";t.async=!0;t.src="https://cdn.segment.com/analytics.js/v1/" + key + "/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n);analytics._loadOptions=e};analytics._writeKey="'+this._writeKey+'";analytics.SNIPPET_VERSION="4.13.2";\n analytics.load("'+this._writeKey+'");\n analytics.page();\n }}();\n ',document.head.appendChild(e),[2]}))}))},e.prototype.updateConfig=function(e){void 0===e&&(e={});var r=Object.entries(e).filter((function(t){return void 0!==t[1]})).map((function(t){return t[0]})),n=e.currency;r.includes("currency")&&(this._currency=n),t.prototype.updateConfig.call(this,e)},e}(h)},k=function(){return(k=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},A=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},E=function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},_=function(t){if(!("undefined"==typeof window))if(Object(n.initState)(i),u().initialized)y("initAnalytics has been called more than once. This behaviour will very likely result in unexpected outcomes so its call was skipped. Please make sure initAnalytics is only called once.","warn");else{var e=t.providers,r=t.shareArtisnAnalytics;if(!e.length)return y("At least one provider should be included but none were found","severe");if(!function(t){var e=t.map((function(t){return t.name}));return new Set(e).size===e.length}(e))return y("Providers names must be unique, check that no provider names are repeated","severe");if(!function(t){var e=t.map((function(t){return t.trackingId}));return new Set(e).size===e.length}(e))return y("Providers trackerId must be unique, check that no provider trackerId are repeated","severe");var a=t.meta,l=A(t,["meta"]),s=r?E([d.instance],e):e,f=k(k({},l),{providers:s,meta:k(k({},a),{vendorId:l.activeVendor,platform:"web",versionSDK:o.version})});c(f),e.forEach((function(t){var e=t.vendors,r=t.name;e||y("The provider "+r+" has no set vendors, as a result no events will be skipped for this provider","debug")}));var p,h={};s.forEach((function(t){h=k(k({},h),t),t.init()})),p=(null==(p=s.reduce((function(t,e){return e.vendors?E(E([],t),e.vendors):t}),[]))?void 0:p.length)?p:void 0,d.instance.updateConfig(h),d.instance.setVendors(p),c({initialized:!0})}};var T=function(){return(T=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.create;Object.create;function C(t){return t.toLowerCase()}var R=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],B=/[^A-Z0-9]+/gi;function U(t,e,r){return e instanceof RegExp?t.replace(e,r):e.reduce((function(t,e){return t.replace(e,r)}),t)}function M(t,e){return void 0===e&&(e={}),function(t,e){void 0===e&&(e={});for(var r=e.splitRegexp,n=void 0===r?R:r,o=e.stripRegexp,a=void 0===o?B:o,i=e.transform,u=void 0===i?C:i,c=e.delimiter,l=void 0===c?" ":c,s=U(U(t,n,"$1\0$2"),a,"\0"),f=0,p=s.length;"\0"===s.charAt(f);)f++;for(;"\0"===s.charAt(p-1);)p--;return s.slice(f,p).split("\0").map(u).join(l)}(t,T({delimiter:"."},e))}var L=function(){return(L=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},H=function(t){return Object.entries(t).reduce((function(t,e){var r,n,o=e[0],a=e[1],i=(void 0===n&&(n={}),M(o,T({delimiter:"_"},n)));return L(L({},t),((r={})[i]=a,r))}),{})},N=function(){try{return u().initialized}catch(t){return!1}},D=function(){return(D=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Y=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},q=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Y(e,["callback","userId"]),c=null!=a?a:n,l=D(D({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","change_password_attempt",D(D({send_to:r,event_callback:o},s),p))},F=function(){return(F=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},z=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},V=function(t,e){var r=t.trackingId,n=z(e,[]);delete n.userId;var o=F({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ChangePasswordAttempt",F(F({},a),c))},$=function(){return($=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},G=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},W=function(t,e){var r=G(e,[]);delete r.userId;var n=$({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Change Password Attempt",$($({},o),i))},K=r(1),J=r(0),Q=function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},Z=function(t,e){var r=e.vendors,n=u().activeVendor;return-1!==n&&(void 0!==r&&((!n||!r.includes(n))&&(void 0===n?y("No active vendor is set. Please make sure you configure an active vendor before trying to emit an event","warn"):function(t,e){var r=u().activeVendor;e.trackingId!==s.GLOBAL_TRACKING_ID&&y("Skipping vendor "+r+" for event "+t+" of provider "+e.name+" as configured","debug")}(t,e),!0)))},X=function(t){if(!t.length)return y("No providers found, the initAnalytics probably hasn't been run yet","severe"),!1;var e=function(t){var e=new Set(t.map((function(t){return t.type})));return Array.from(e).reduce((function(t,e){switch(e){case"GOOGLE_ANALYTICS":if("undefined"==typeof gtag)return Q(Q([],t),[e]);break;case"FACEBOOK_PIXEL":if("undefined"==typeof fbq)return Q(Q([],t),[e]);break;case"SEGMENT":if("undefined"==typeof analytics)return Q(Q([],t),[e]);break;default:throw new Error("Profiver of type "+e+" is not supported")}return t}),[])}(t);return!e.length||(e.forEach((function(t){!function(t){y(t+" SDK not initialized. Please make sure the SDK is initialized before trying to emit an event","severe")}(t)})),!1)},tt=function(){return(tt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},et=function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},rt=function(t,e,r){var n=r.facebookPixelHandler,o=r.googleAnalyticsHandler,a=r.segmentHandler,i=u().providers;if(X(i)){var c=tt(tt({},e),{artisnEvent:t}),l=i.reduce((function(e,r){if(Z(t,r))return e;switch(r.type){case"FACEBOOK_PIXEL":n(r,c);break;case"GOOGLE_ANALYTICS":o(r,c);break;case"SEGMENT":a(r,c);break;default:throw new Error("Provider of type "+r.type+" is not supported")}return et(et([],e),[r])}),[]);!function(t,e){var r=e.reduce((function(t,e){var r,n;if(e.trackingId===s.GLOBAL_TRACKING_ID)return t;var o=e.name,a=e.type,i=null!==(n=t[a])&&void 0!==n?n:[];return f(f({},t),((r={})[a]=p(p([],i),[o]),r))}),{}),n=Object.entries(r).reduce((function(t,e){var r=e[0],n=e[1];return""+t+(r.charAt(0).toUpperCase()+r.slice(1))+": "+n.join(", ")+"\n"}),"");y("Event "+t+" was successfully sent to the following providers "+n,"debug")}(t,l)}},nt=function(t){return Object(K.getShoppingCartProducts)(t).map((function(t){return t.productId}))},ot=function(t){return Object(K.getShoppingCartProducts)(t).map((function(t){return at(t)}))},at=function(t){var e=Object(J.getProductTotals)(t);return t.name+":"+e.netPrice},it=function(t,e){return Object(K.getShoppingCartProducts)(t).map((function(t){return ut(t,e)}))},ut=function(t,e){var r=Object(J.getProductTotals)(t);return{item_id:t.productId,item_name:t.name,quantity:t.amount,price:r.netPrice,currency:e}},ct=function(t){return t.join(",")},lt=function(t){return t.map((function(t){return function(t){return{product_id:t.productId,name:t.name,price:Object(J.getProductTotals)(t).netPrice}}(t)}))},st=function(t){rt("changePasswordAttempt",t,{googleAnalyticsHandler:q,facebookPixelHandler:V,segmentHandler:W})},ft=function(){return(ft=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},pt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},yt=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=pt(e,["callback","userId"]),c=null!=a?a:n,l=ft(ft({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","sign_up_attempt",ft(ft({send_to:r,event_callback:o},s),p))},dt=function(){return(dt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ht=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},gt=function(t,e){var r=t.trackingId,n=ht(e,[]);delete n.userId;var o=dt({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SignUpAttempt",dt(dt({},a),c))},bt=function(){return(bt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},vt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ot=function(t,e){var r=vt(e,[]);delete r.userId;var n=bt({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Sign Up Attempt",bt(bt({},o),i))},mt=function(t){rt("signUpAttempt",t,{googleAnalyticsHandler:yt,facebookPixelHandler:gt,segmentHandler:Ot})},wt=function(){return(wt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},jt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Pt=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=jt(e,["callback","userId"]),c=null!=a?a:n,l=wt(wt({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","change_password_fail",wt(wt({send_to:r,event_callback:o},s),p))},It=function(){return(It=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},St=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},xt=function(t,e){var r=t.trackingId,n=St(e,[]);delete n.userId;var o=It({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ChangePasswordFail",It(It({},a),c))},kt=function(){return(kt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},At=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Et=function(t,e){var r=At(e,[]);delete r.userId;var n=kt({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Change Password Fail",kt(kt({},o),i))},_t=function(t){rt("changePasswordFail",t,{googleAnalyticsHandler:Pt,facebookPixelHandler:xt,segmentHandler:Et})},Tt=function(){return(Tt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ct=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Rt=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Ct(e,["callback","userId"]),c=null!=a?a:n,l=Tt(Tt({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","change_password_success",Tt(Tt({send_to:r,event_callback:o},s),p))},Bt=function(){return(Bt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ut=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Mt=function(t,e){var r=t.trackingId,n=Ut(e,[]);delete n.userId;var o=Bt({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ChangePasswordSuccess",Bt(Bt({},a),c))},Lt=function(){return(Lt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ht=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Nt=function(t,e){var r=Ht(e,[]);delete r.userId;var n=Lt({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Change Password Success",Lt(Lt({},o),i))},Dt=function(t){rt("changePasswordSuccess",t,{googleAnalyticsHandler:Rt,facebookPixelHandler:Mt,segmentHandler:Nt})},Yt=function(){return(Yt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},qt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ft=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=qt(e,["callback","userId"]);delete i.identify;var c=null!=a?a:n,l=Yt(Yt({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","login",Yt(Yt({send_to:r,event_callback:o},s),p))},zt=function(){return(zt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Vt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},$t=function(t,e){var r=t.trackingId,n=Vt(e,[]);delete n.userId,delete n.identify;var o=zt({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SignIn",zt(zt({},a),c))},Gt=function(){return(Gt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Wt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Kt=function(t,e){var r=e.name,n=e.identify,o=Wt(e,["name","identify"]);delete o.userId;var a=Gt(Gt({},o),{username:r}),i=H(a),c=u().meta,l=H(c);if(analytics.track("Signed In",Gt(Gt({},i),l)),n){var s=n.name,f=void 0===s?r:s,p=Wt(n,["name"]);analytics.identify(n.id,Gt({name:f},p))}},Jt=function(t){rt("signIn",t,{googleAnalyticsHandler:Ft,facebookPixelHandler:$t,segmentHandler:Kt})},Qt=function(){return(Qt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Zt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Xt=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Zt(e,["callback","userId"]),c=null!=a?a:n,l=Qt(Qt({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","sign_out",Qt(Qt({send_to:r,event_callback:o},s),p))},te=function(){return(te=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ee=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},re=function(t,e){var r=t.trackingId,n=ee(e,[]);delete n.userId;var o=te({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SignOut",te(te({},a),c))},ne=function(){return(ne=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},oe=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ae=function(t,e){var r=e.name,n=oe(e,["name"]);delete n.userId;var o=ne(ne({},n),{username:r}),a=H(o),i=u().meta,c=H(i);analytics.track("Signed Out",ne(ne({},a),c)),analytics.reset()},ie=function(t){rt("signOut",t,{googleAnalyticsHandler:Xt,facebookPixelHandler:re,segmentHandler:ae})},ue=function(){return(ue=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ce=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},le=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=ce(e,["callback","userId"]);delete i.identify;var c=null!=a?a:n,l=ue(ue({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","sign_up",ue(ue({send_to:r,event_callback:o},s),p))},se=function(){return(se=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},fe=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},pe=function(t,e){var r=t.trackingId,n=fe(e,[]);delete n.userId,delete n.identify;var o=se({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingle",r,"CompleteRegistration",se(se({},a),c))},ye=function(){return(ye=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},de=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},he=function(t,e){var r=e.name,n=e.method,o=e.identify,a=de(e,["name","method","identify"]);delete a.userId;var i=ye(ye({},a),{username:r,type:n}),c=H(i),l=u().meta,s=H(l);if(analytics.track("Signed Up",ye(ye({},c),s)),o){var f=o.name,p=void 0===f?r:f,y=o.email,d=void 0===y?a.email:y,h=de(o,["name","email"]);analytics.identify(o.id,ye({name:p,email:d},h))}},ge=function(t){rt("signUp",t,{googleAnalyticsHandler:le,facebookPixelHandler:pe,segmentHandler:he})},be={logChangePasswordAttempt:st,logSignUpAttempt:mt,logChangePasswordFail:_t,logChangePasswordSuccess:Dt,logSignIn:Jt,logSignOut:ie,logSignUp:ge},ve=be,Oe=function(){return(Oe=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},me=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},we=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=me(e,["callback","userId"]),c=null!=a?a:n,l=Oe(Oe({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","banner_impression",Oe(Oe({send_to:r,event_callback:o},s),p))},je=function(){return(je=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Pe=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ie=function(t,e){var r=t.trackingId,n=Pe(e,[]);delete n.userId;var o=je({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"BannerImpression",je(je({},a),c))},Se=function(){return(Se=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},xe=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ke=function(t,e){var r=xe(e,[]);delete r.userId;var n=Se({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Banner Impression",Se(Se({},o),i))},Ae=function(t){rt("bannerImpression",t,{googleAnalyticsHandler:we,facebookPixelHandler:Ie,segmentHandler:ke})},Ee=function(){return(Ee=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},_e=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Te=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=_e(e,["callback","userId"]),c=null!=a?a:n,l=Ee(Ee({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","select_content",Ee(Ee({send_to:r,event_callback:o,content_type:"banner"},s),p))},Ce=function(){return(Ce=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Re=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Be=function(t,e){var r=t.trackingId,n=Re(e,[]);delete n.userId;var o=Ce({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SelectBanner",Ce(Ce({},a),c))},Ue=function(){return(Ue=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Me=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Le=function(t,e){var r=Me(e,[]);delete r.userId;var n=Ue({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Select Banner",Ue(Ue({},o),i))},He=function(t){rt("selectBanner",t,{googleAnalyticsHandler:Te,facebookPixelHandler:Be,segmentHandler:Le})},Ne={logBannerImpression:Ae,logSelectBanner:He},De=Ne,Ye=function(){return(Ye=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},qe=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Fe=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=qe(e,["callback","userId"]),c=null!=a?a:n,l=Ye(Ye({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","add_billing_info",Ye(Ye({send_to:r,event_callback:o},s),p))},ze=function(){return(ze=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ve=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},$e=function(t,e){var r=t.trackingId,n=Ve(e,[]);delete n.userId;var o=ze({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"AddBillingInfo",ze(ze({},a),c))},Ge=function(){return(Ge=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},We=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ke=function(t,e){var r=We(e,[]);delete r.userId;var n=Ge({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Add Billing Info",Ge(Ge({},o),i))},Je=function(t){rt("addBillingInfo",t,{googleAnalyticsHandler:Fe,facebookPixelHandler:$e,segmentHandler:Ke})},Qe=function(){return(Qe=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ze=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Xe=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Ze(e,["callback","userId"]),c=null!=a?a:n,l=Qe(Qe({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","select_billing_info",Qe(Qe({send_to:r,event_callback:o},s),p))},tr=function(){return(tr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},er=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},rr=function(t,e){var r=t.trackingId,n=er(e,[]);delete n.userId;var o=tr({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SelectBillingInfo",tr(tr({},a),c))},nr=function(){return(nr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},or=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ar=function(t,e){var r=or(e,[]);delete r.userId;var n=nr({},r),o=H(n),a=u().meta,i=H(a);analytics.track("SelectBilling Info",nr(nr({},o),i))},ir=function(t){rt("selectBillingInfo",t,{googleAnalyticsHandler:Xe,facebookPixelHandler:rr,segmentHandler:ar})},ur=function(){return(ur=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},cr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},lr=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=cr(e,["callback","userId"]),c=null!=a?a:n,l=ur(ur({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","update_billing_info",ur(ur({send_to:r,event_callback:o},s),p))},sr=function(){return(sr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},fr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},pr=function(t,e){var r=t.trackingId,n=fr(e,[]);delete n.userId;var o=sr({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"UpdateBillingInfo",sr(sr({},a),c))},yr=function(){return(yr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},dr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},hr=function(t,e){var r=e.fields,n=dr(e,["fields"]);delete n.userId;var o=yr(yr({},n),{fields:ct(r)}),a=H(o),i=u().meta,c=H(i);analytics.track("Update Billing Info",yr(yr({},a),c))},gr=function(t){rt("updateBillingInfo",t,{googleAnalyticsHandler:lr,facebookPixelHandler:pr,segmentHandler:hr})},br={logAddBillingInfo:Je,logSelectBillingInfo:ir,logUpdateBillingInfo:gr},vr=br,Or=function(){return(Or=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},mr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},wr=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=mr(e,["callback","userId"]),c=null!=a?a:n,l=Or(Or({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","book_appointment",Or(Or({send_to:r,event_callback:o},s),p))},jr=function(){return(jr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Pr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ir=function(t,e){var r=t.trackingId,n=Pr(e,[]);delete n.userId;var o=jr({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingle",r,"Schedule",jr(jr({},a),c))},Sr=function(){return(Sr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},xr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},kr=function(t,e){var r=xr(e,[]);delete r.userId;var n=Sr({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Book Appointment",Sr(Sr({},o),i))},Ar=function(t){rt("bookAppointment",t,{googleAnalyticsHandler:wr,facebookPixelHandler:Ir,segmentHandler:kr})},Er={logBookAppointment:Ar},_r=Er,Tr=function(){return(Tr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Cr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Rr=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.category,c=e.list,l=e.itemBrand,s=Cr(e,["callback","userId","category","list","itemBrand"]),f=e.position,p=[{item_brand:l,item_id:""+i.categoryId,item_list_name:c,item_name:i.name,index:f}],y=null!=a?a:n,d=Tr(Tr({},s),{userId:y}),h=H(d),g=u().meta,b=H(g);gtag("event","view_item_list",Tr(Tr({send_to:r,event_callback:o,item_list_name:c,items:p},h),b))},Br=function(){return(Br=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ur=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Mr=function(t,e){var r=t.trackingId,n=e.category,o=Ur(e,["category"]);delete o.userId;var a=n.categoryId,i=n.name,c=Br(Br({},o),{categoryId:a,categoryName:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"CategoryImpression",Br(Br({},l),f))},Lr=function(){return(Lr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Hr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Nr=function(t,e){var r=e.category,n=Hr(e,["category"]);delete n.userId;var o=r.categoryId,a=r.name,i=Lr(Lr({},n),{categoryId:o,categoryName:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Category Impression",Lr(Lr({},c),s))},Dr=function(t){rt("categoryImpression",t,{googleAnalyticsHandler:Rr,facebookPixelHandler:Mr,segmentHandler:Nr})},Yr=function(){return(Yr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},qr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Fr=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.query,c=qr(e,["callback","userId","query"]),l=null!=a?a:n,s=Yr(Yr({},c),{userId:l}),f=H(s),p=u().meta,y=H(p);gtag("event","search",Yr(Yr({send_to:r,event_callback:o,search_term:i},f),y))},zr=function(){return(zr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Vr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},$r=function(t,e){var r=t.trackingId,n=e.query,o=Vr(e,["query"]);delete o.userId;var a=zr({},o),i=H(a),c=u().meta,l=H(c);fbq("trackSingle",r,"Search",zr(zr({search_string:n},i),l))},Gr=function(){return(Gr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Wr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Kr=function(t,e){var r=Wr(e,[]);delete r.userId;var n=Gr({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Search Category",Gr(Gr({},o),i))},Jr=function(t){rt("searchCategoryAttempt",t,{googleAnalyticsHandler:Fr,facebookPixelHandler:$r,segmentHandler:Kr})},Qr=function(){return(Qr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Zr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Xr=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.category,c=Zr(e,["callback","userId","category"]);c.contentType&&delete c.contentType;var l=i.categoryId,s=i.name,f=null!=a?a:n,p=Qr(Qr({},c),{userId:f,categoryId:l,categoryName:s}),y=H(p),d=u().meta,h=H(d);gtag("event","select_content",Qr(Qr({send_to:r,event_callback:o,content_type:"category"},y),h))},tn=function(){return(tn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},en=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},rn=function(t,e){var r=t.trackingId,n=e.category,o=en(e,["category"]);delete o.userId;var a=n.categoryId,i=n.name,c=tn(tn({},o),{categoryId:a,categoryName:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"SelectCategory",tn(tn({},l),f))},nn=function(){return(nn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},on=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},an=function(t,e){var r=e.category,n=on(e,["category"]);delete n.userId;var o=r.categoryId,a=r.name,i=nn(nn({},n),{categoryId:o,categoryName:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Select Category",nn(nn({},c),s))},un=function(t){rt("selectCategory",t,{googleAnalyticsHandler:Xr,facebookPixelHandler:rn,segmentHandler:an})},cn=function(){return(cn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ln=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},sn=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.category,c=ln(e,["callback","userId","category"]),l=i.categoryId,s=i.name,f=null!=a?a:n,p=cn(cn({},c),{userId:f,categoryId:l,categoryName:s}),y=H(p),d=u().meta,h=H(d);gtag("event","view_cateogry",cn(cn({send_to:r,event_callback:o},y),h))},fn=function(){return(fn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},pn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},yn=function(t,e){var r=t.trackingId,n=e.category,o=pn(e,["category"]);delete o.userId;var a=n.categoryId,i=n.name,c=fn(fn({},o),{categoryId:a,categoryName:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"ViewCategory",fn(fn({},l),f))},dn=function(){return(dn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},hn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},gn=function(t,e){var r=e.category,n=e.products,o=hn(e,["category","products"]);delete o.userId;var a=r.categoryId,i=r.name,c=dn(dn({},o),{listId:a,category:i}),l=H(c),s=u().meta,f=H(s);analytics.track("Product List Viewed",dn(dn({products:lt(n)},l),f))},bn=function(t){rt("viewCategory",t,{googleAnalyticsHandler:sn,facebookPixelHandler:yn,segmentHandler:gn})},vn={logCategoryImpression:Dr,logSearchCategoryAttempt:Jr,logSelectCategory:un,logViewCategory:bn},On=vn,mn=function(){return(mn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},wn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},jn=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=wn(e,["callback","userId"]),l=null!=i?i:n,s=mn(mn({},c),{userId:l,currency:o}),f=H(s),p=u().meta,y=H(p);gtag("event","checkout_action",mn(mn({send_to:r,event_callback:a},f),y))},Pn=function(){return(Pn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},In=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Sn=function(t,e){var r=t.trackingId,n=In(e,[]);delete n.userId;var o=Pn({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"CheckoutAction",Pn(Pn({},a),c))},xn=function(){return(xn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},kn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},An=function(t,e){var r=kn(e,[]);delete r.userId;var n=xn({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Checkout Step Completed",xn(xn({},o),i))},En=function(t){rt("checkoutAction",t,{googleAnalyticsHandler:jn,facebookPixelHandler:Sn,segmentHandler:An})},_n=function(){return(_n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Tn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Cn=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.shoppingCart,l=e.currency,s=Tn(e,["callback","userId","shoppingCart","currency"]),f=null!=i?i:n,p=null!=l?l:o,y=_n(_n({},s),{userId:f,currency:p}),d=H(y),h=u().meta,g=H(h),b=Object(K.getShoppingCartTotal)(c),v=b.total,O=b.totalPoints;gtag("event","begin_checkout",_n(_n({send_to:r,event_callback:a,items:it(c,p),value:v,points:O},d),g))},Rn=function(){return(Rn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Un=function(t,e){var r=t.trackingId,n=t.currency,o=e.shoppingCart,a=e.currency,i=Bn(e,["shoppingCart","currency"]);delete i.userId;var c=null!=a?a:n,l=Rn(Rn({},i),{currency:c}),s=H(l),f=u().meta,p=H(f),y=nt(o),d=Object(K.getShoppingCartTotal)(o),h=d.total,g=d.totalPoints;fbq("trackSingle",r,"InitiateCheckout",Rn(Rn({content_ids:y,contents:ot(o),num_items:y.length,value:h,points:g},s),p))},Mn=function(){return(Mn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ln=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Hn=function(t,e){var r=t.currency,n=e.shoppingCart,o=e.currency,a=Ln(e,["shoppingCart","currency"]);delete a.userId;var i=null!=o?o:r,c=Mn(Mn({},a),{currency:i}),l=H(c),s=u().meta,f=H(s),p=Object(K.getShoppingCartProducts)(n),y=Object(K.getShoppingCartTotal)(n),d=y.total,h=y.totalTaxes,g=y.shippingCost,b=y.totalPoints;analytics.track("Initiate Checkout",Mn(Mn({total:d,revenue:d-h-(null!=g?g:0),shipping:g,tax:h,products:lt(p),points:b},l),f))},Nn=function(t){rt("initiateCheckout",t,{googleAnalyticsHandler:Cn,facebookPixelHandler:Un,segmentHandler:Hn})},Dn={logCheckoutAction:En,logInitiateCheckout:Nn},Yn=Dn,qn=function(){return(qn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Fn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},zn=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=Fn(e,["callback","userId","currency"]),s=null!=i?i:n,f=null!=c?c:o,p=qn(qn({},l),{userId:s,currency:f}),y=H(p),d=u().meta,h=H(d);gtag("event","apply_benefit",qn(qn({send_to:r,event_callback:a},y),h))},Vn=function(){return(Vn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$n=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Gn=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=$n(e,["currency"]);delete a.userId;var i=null!=o?o:n,c=Vn(Vn({},a),{currency:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"ApplyBenefit",Vn(Vn({},l),f))},Wn=function(){return(Wn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Kn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Jn=function(t,e){var r=t.currency,n=e.currency,o=Kn(e,["currency"]);delete o.userId;var a=null!=n?n:r,i=Wn(Wn({},o),{currency:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Apply Benefit",Wn(Wn({},c),s))},Qn=function(t){rt("applyBenefit",t,{googleAnalyticsHandler:zn,facebookPixelHandler:Gn,segmentHandler:Jn})},Zn=function(){return(Zn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Xn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},to=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=Xn(e,["callback","userId","currency"]),s=null!=i?i:n,f=null!=c?c:o,p=Zn(Zn({},l),{userId:s,currency:f}),y=H(p),d=u().meta,h=H(d);gtag("event","coupon_code_error",Zn(Zn({send_to:r,event_callback:a},y),h))},eo=function(){return(eo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ro=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},no=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=ro(e,["currency"]);delete a.userId;var i=null!=o?o:n,c=eo(eo({},a),{currency:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"CouponCodeError",eo(eo({},l),f))},oo=function(){return(oo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ao=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},io=function(t,e){var r=t.currency,n=e.currency,o=ao(e,["currency"]);delete o.userId;var a=null!=n?n:r,i=oo(oo({},o),{currency:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Coupon Code Error",oo(oo({},c),s))},uo=function(t){rt("couponCodeError",t,{googleAnalyticsHandler:to,facebookPixelHandler:no,segmentHandler:io})},co=function(){return(co=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},lo=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},so=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=lo(e,["callback","userId"]),c=null!=a?a:n,l=co(co({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","redeem_coupon_code",co(co({send_to:r,event_callback:o},s),p))},fo=function(){return(fo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},po=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},yo=function(t,e){var r=t.trackingId,n=po(e,[]);delete n.userId;var o=fo({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"RedeemCouponCode",fo(fo({},a),c))},ho=function(){return(ho=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},go=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},bo=function(t,e){var r=go(e,[]);delete r.userId;var n=ho({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Redeem Coupon Code",ho(ho({},o),i))},vo=function(t){rt("redeemCouponCode",t,{googleAnalyticsHandler:so,facebookPixelHandler:yo,segmentHandler:bo})},Oo=function(){return(Oo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},mo=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},wo=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=mo(e,["callback","userId","currency"]),s=null!=i?i:n,f=null!=c?c:o,p=Oo(Oo({},l),{userId:s,currency:f}),y=H(p),d=u().meta,h=H(d);gtag("event","remove_benefit",Oo(Oo({send_to:r,event_callback:a},y),h))},jo=function(){return(jo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Po=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Io=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=Po(e,["currency"]);delete a.userId;var i=null!=o?o:n,c=jo(jo({},a),{currency:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"RemoveBenefit",jo(jo({},l),f))},So=function(){return(So=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},xo=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ko=function(t,e){var r=t.currency,n=e.currency,o=xo(e,["currency"]);delete o.userId;var a=null!=n?n:r,i=So(So({},o),{currency:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Remove Benefit",So(So({},c),s))},Ao=function(t){rt("removeBenefit",t,{googleAnalyticsHandler:wo,facebookPixelHandler:Io,segmentHandler:ko})},Eo=function(){return(Eo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},_o=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},To=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=_o(e,["callback","userId","currency"]),s=null!=i?i:n,f=null!=c?c:o,p=Eo(Eo({},l),{userId:s,currency:f}),y=H(p),d=u().meta,h=H(d);gtag("event","view_benefit_details",Eo(Eo({send_to:r,event_callback:a},y),h))},Co=function(){return(Co=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ro=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Bo=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=Ro(e,["currency"]);delete a.userId;var i=null!=o?o:n,c=Co(Co({},a),{currency:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"ViewBenefitDetails",Co(Co({},l),f))},Uo=function(){return(Uo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Mo=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Lo=function(t,e){var r=t.currency,n=e.currency,o=Mo(e,["currency"]);delete o.userId;var a=null!=n?n:r,i=Uo(Uo({},o),{currency:a}),c=H(i),l=u().meta,s=H(l);analytics.track("View Benefit Details",Uo(Uo({},c),s))},Ho=function(t){rt("viewBenefitDetails",t,{googleAnalyticsHandler:To,facebookPixelHandler:Bo,segmentHandler:Lo})},No=function(){return(No=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Do=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Yo=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Do(e,["callback","userId"]),c=null!=a?a:n,l=No(No({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_benefits_wallet",No(No({send_to:r,event_callback:o},s),p))},qo=function(){return(qo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Fo=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},zo=function(t,e){var r=t.trackingId,n=Fo(e,[]);delete n.userId;var o=qo({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewBenefitsWallet",qo(qo({},a),c))},Vo=function(){return(Vo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$o=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Go=function(t,e){var r=$o(e,[]);delete r.userId;var n=Vo({},r),o=H(n),a=u().meta,i=H(a);analytics.track("View Benefits Wallet",Vo(Vo({},o),i))},Wo=function(t){rt("viewBenefitsWallet",t,{googleAnalyticsHandler:Yo,facebookPixelHandler:zo,segmentHandler:Go})},Ko=function(){return(Ko=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Jo=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Qo=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Jo(e,["callback","userId"]),c=null!=a?a:n,l=Ko(Ko({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_qr_store_coupon",Ko(Ko({send_to:r,event_callback:o},s),p))},Zo=function(){return(Zo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Xo=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ta=function(t,e){var r=t.trackingId,n=Xo(e,[]);delete n.userId;var o=Zo({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewQRStoreCoupon",Zo(Zo({},a),c))},ea=function(){return(ea=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ra=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},na=function(t,e){var r=ra(e,[]);delete r.userId;var n=ea({},r),o=H(n),a=u().meta,i=H(a);analytics.track("View QR Store Coupon",ea(ea({},o),i))},oa=function(t){void 0===t&&(t={}),rt("viewQRStoreCoupon",t,{googleAnalyticsHandler:Qo,facebookPixelHandler:ta,segmentHandler:na})},aa={logApplyBenefit:Qn,logCouponCodeError:uo,logRedeemCouponCode:vo,logRemoveBenefit:Ao,logViewBenefitDetails:Ho,logViewBenefitsWallet:Wo,logViewQRStoreCoupon:oa},ia=aa,ua=function(){return(ua=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ca=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},la=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=e.amount,s=ca(e,["callback","userId","currency","amount"]),f=null!=i?i:n,p=null!=c?c:o,y=ua(ua({},s),{userId:f,currency:p,amount:l,value:l}),d=H(y),h=u().meta,g=H(h);gtag("event","add_credits",ua(ua({send_to:r,event_callback:a},d),g))},sa=function(){return(sa=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},fa=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},pa=function(t,e){var r=t.trackingId,n=t.currency,o=e.amount,a=e.currency,i=fa(e,["amount","currency"]);delete i.userId;var c=null!=a?a:n,l=sa(sa({},i),{currency:c,amount:o,value:o}),s=H(l),f=u().meta,p=H(f);fbq("trackSingleCustom",r,"AddCredits",sa(sa({},s),p))},ya=function(){return(ya=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},da=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ha=function(t,e){var r=t.currency,n=e.amount,o=e.currency,a=da(e,["amount","currency"]);delete a.userId;var i=null!=o?o:r,c=ya(ya({},a),{currency:i,amount:n,value:n}),l=H(c),s=u().meta,f=H(s);analytics.track("Add Credits",ya(ya({},l),f))},ga=function(t){rt("addCredits",t,{googleAnalyticsHandler:la,facebookPixelHandler:pa,segmentHandler:ha})},ba=function(){return(ba=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},va=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Oa=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=e.amount,s=va(e,["callback","userId","currency","amount"]),f=null!=i?i:n,p=null!=c?c:o,y=ba(ba({},s),{userId:f,currency:p,amount:l,value:l}),d=H(y),h=u().meta,g=H(h);gtag("event","spend_credits",ba(ba({send_to:r,event_callback:a},d),g))},ma=function(){return(ma=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},wa=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ja=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=e.amount,i=wa(e,["currency","amount"]);delete i.userId;var c=null!=o?o:n,l=ma(ma({},i),{currency:c,amount:a,value:a}),s=H(l),f=u().meta,p=H(f);fbq("trackSingle",r,"SpendCredits",ma(ma({},s),p))},Pa=function(){return(Pa=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ia=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Sa=function(t,e){var r=t.currency,n=e.currency,o=e.amount,a=Ia(e,["currency","amount"]);delete a.userId;var i=null!=n?n:r,c=Pa(Pa({},a),{currency:i,amount:o,value:o}),l=H(c),s=u().meta,f=H(s);analytics.track("Spend Credits",Pa(Pa({},l),f))},xa=function(t){rt("spendCredits",t,{googleAnalyticsHandler:Oa,facebookPixelHandler:ja,segmentHandler:Sa})},ka=function(){return(ka=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Aa=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ea=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Aa(e,["callback","userId"]),c=null!=a?a:n,l=ka(ka({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_credits",ka(ka({send_to:r,event_callback:o},s),p))},_a=function(){return(_a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ta=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ca=function(t,e){var r=t.trackingId,n=Ta(e,[]);delete n.userId;var o=_a({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewCredits",_a(_a({},a),c))},Ra=function(){return(Ra=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ba=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ua=function(t,e){var r=Ba(e,[]);delete r.userId;var n=Ra({},r),o=H(n),a=u().meta,i=H(a);analytics.track("View Credits",Ra(Ra({},o),i))},Ma=function(t){rt("viewCredits",t,{googleAnalyticsHandler:Ea,facebookPixelHandler:Ca,segmentHandler:Ua})},La={logAddCredits:ga,logSpendCredits:xa,logViewCredits:Ma},Ha=La,Na=function(){return(Na=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Da=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ya=function(t,e,r){var n=e.trackingId,o=e.userId,a=r.callback,i=r.userId,c=Da(r,["callback","userId"]),l=null!=i?i:o,s=Na(Na({},c),{userId:l}),f=H(s),p=u().meta,y=H(p);gtag("event",t,Na(Na(Na({send_to:n,event_callback:a},f),{artisn_event:"custom_event"}),y))},qa=function(){return(qa=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Fa=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},za=function(t,e,r){var n=e.trackingId,o=Fa(r,[]);delete o.userId;var a=qa({},o),i=H(a),c=u().meta,l=H(c);fbq("trackSingleCustom",n,t,qa(qa(qa({},i),{artisn_event:"CustomEvent"}),l))},Va=function(){return(Va=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$a=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ga=function(t,e,r){var n=$a(r,[]);delete n.userId;var o=Va({},n),a=H(o),i=u().meta,c=H(i);analytics.track(t,Va(Va(Va({},a),{artisn_event:"Custom Event"}),c))},Wa=function(t,e){void 0===e&&(e={}),rt(t,e,{googleAnalyticsHandler:function(e,r){return Ya(t,e,r)},facebookPixelHandler:function(e,r){return za(t,e,r)},segmentHandler:function(e,r){return Ga(t,e,r)}})},Ka=function(){return(Ka=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ja=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Qa=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Ja(e,["callback","userId"]),c=null!=a?a:n,l=Ka(Ka({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_fulfillment_step",Ka(Ka({send_to:r,event_callback:o},s),p))},Za=function(){return(Za=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Xa=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ti=function(t,e){var r=t.trackingId,n=Xa(e,[]);delete n.userId;var o=Za({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewFulfillmentStep",Za(Za({},a),c))},ei=function(){return(ei=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ri=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ni=function(t,e){var r=ri(e,[]);delete r.userId;var n=ei({},r),o=H(n),a=u().meta,i=H(a);analytics.track("View Fulfillment Step",ei(ei({},o),i))},oi=function(t){rt("viewFulfillmentStep",t,{googleAnalyticsHandler:Qa,facebookPixelHandler:ti,segmentHandler:ni})},ai=function(){return(ai=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ii=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ui=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=ii(e,["callback","userId"]),c=null!=a?a:n,l=ai(ai({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_tracking",ai(ai({send_to:r,event_callback:o},s),p))},ci=function(){return(ci=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},li=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},si=function(t,e){var r=t.trackingId,n=li(e,[]);delete n.userId;var o=ci({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewTracking",ci(ci({},a),c))},fi=function(){return(fi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},pi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},yi=function(t,e){var r=pi(e,[]);delete r.userId;var n=fi({},r),o=H(n),a=u().meta,i=H(a);analytics.track("View Tracking",fi(fi({},o),i))},di=function(t){rt("viewTracking",t,{googleAnalyticsHandler:ui,facebookPixelHandler:si,segmentHandler:yi})},hi={logViewFulfillmentStep:oi,logViewTracking:di},gi=hi,bi=function(){return(bi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},vi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Oi=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=vi(e,["callback","userId"]),c=null!=a?a:n,l=bi(bi({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","change_location",bi(bi({send_to:r,event_callback:o},s),p))},mi=function(){return(mi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},wi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ji=function(t,e){var r=t.trackingId,n=wi(e,[]);delete n.userId;var o=mi({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ChangeLocation",mi(mi({},a),c))},Pi=function(){return(Pi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ii=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Si=function(t,e){var r=Ii(e,[]);delete r.userId;var n=Pi({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Change Location",Pi(Pi({},o),i))},xi=function(t){void 0===t&&(t={}),rt("changeLocation",t,{googleAnalyticsHandler:Oi,facebookPixelHandler:ji,segmentHandler:Si})},ki=function(){return(ki=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ai=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ei=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Ai(e,["callback","userId"]),c=null!=a?a:n,l=ki(ki({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","find_location",ki(ki({send_to:r,event_callback:o},s),p))},_i=function(){return(_i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ti=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ci=function(t,e){var r=t.trackingId,n=Ti(e,[]);delete n.userId;var o=_i({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingle",r,"FindLocation",_i(_i({},a),c))},Ri=function(){return(Ri=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ui=function(t,e){var r=Bi(e,[]);delete r.userId;var n=Ri({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Find Location",Ri(Ri({},o),i))},Mi=function(t){void 0===t&&(t={}),rt("findLocation",t,{googleAnalyticsHandler:Ei,facebookPixelHandler:Ci,segmentHandler:Ui})},Li=function(){return(Li=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Hi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ni=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Hi(e,["callback","userId"]),c=null!=a?a:n,l=Li(Li({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","out_of_coverage",Li(Li({send_to:r,event_callback:o},s),p))},Di=function(){return(Di=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Yi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},qi=function(t,e){var r=t.trackingId,n=Yi(e,[]);delete n.userId;var o=Di({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"OutOfCoverage",Di(Di({},a),c))},Fi=function(){return(Fi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},zi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Vi=function(t,e){var r=zi(e,[]);delete r.userId;var n=Fi({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Out Of Coverage",Fi(Fi({},o),i))},$i=function(t){void 0===t&&(t={}),rt("outOfCoverage",t,{googleAnalyticsHandler:Ni,facebookPixelHandler:qi,segmentHandler:Vi})},Gi=function(){return(Gi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Wi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ki=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Wi(e,["callback","userId"]),c=null!=a?a:n,l=Gi(Gi({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","set_location",Gi(Gi({send_to:r,event_callback:o},s),p))},Ji=function(){return(Ji=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Qi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Zi=function(t,e){var r=t.trackingId,n=Qi(e,[]);delete n.userId;var o=Ji({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SetLocation",Ji(Ji({},a),c))},Xi=function(){return(Xi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},tu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},eu=function(t,e){var r=e.lat,n=e.lng,o=tu(e,["lat","lng"]);delete o.userId;var a=r&&n?r+", "+n:"Not available",i=Xi(Xi({},o),{location:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Set Location",Xi(Xi({},c),s))},ru=function(t){void 0===t&&(t={}),rt("setLocation",t,{googleAnalyticsHandler:Ki,facebookPixelHandler:Zi,segmentHandler:eu})},nu={logChangeLocation:xi,logFindLocation:Mi,logOutOfCoverage:$i,logSetLocation:ru},ou=nu,au=function(){return(au=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},iu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},uu=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=iu(e,["callback","userId"]),c=null!=a?a:n,l=au(au({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","request_assistance",au(au({send_to:r,event_callback:o},s),p))},cu=function(){return(cu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},lu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},su=function(t,e){var r=t.trackingId,n=lu(e,[]);delete n.userId;var o=cu({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingle",r,"Contact",cu(cu({},a),c))},fu=function(){return(fu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},pu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},yu=function(t,e){var r=pu(e,[]);delete r.userId;var n=fu({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Request Assistance",fu(fu({},o),i))},du=function(t){rt("requestAssistance",t,{googleAnalyticsHandler:uu,facebookPixelHandler:su,segmentHandler:yu})},hu={logRequestAssistance:du},gu=hu,bu=function(){return(bu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},vu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ou=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.currencyName,c=e.amount,l=vu(e,["callback","userId","currencyName","amount"]),s=null!=a?a:n,f=bu(bu({},l),{userId:s}),p=H(f),y=u().meta,d=H(y);gtag("event","earn_virtual_currency",bu(bu({send_to:r,event_callback:o,virtual_currency_name:i,value:c},p),d))},mu=function(){return(mu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},wu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ju=function(t,e){var r=t.trackingId,n=wu(e,[]);delete n.userId;var o=mu({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"EarnPoints",mu(mu({},a),c))},Pu=function(){return(Pu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Iu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Su=function(t,e){var r=Iu(e,[]);delete r.userId;var n=Pu({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Earn Points",Pu(Pu({},o),i))},xu=function(t){rt("earnPoints",t,{googleAnalyticsHandler:Ou,facebookPixelHandler:ju,segmentHandler:Su})},ku=function(){return(ku=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Au=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Eu=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Au(e,["callback","userId"]),c=null!=a?a:n,l=ku(ku({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","share_points",ku(ku({send_to:r,event_callback:o},s),p))},_u=function(){return(_u=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Tu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Cu=function(t,e){var r=t.trackingId,n=Tu(e,[]);delete n.userId;var o=_u({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SharePoints",_u(_u({},a),c))},Ru=function(){return(Ru=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Uu=function(t,e){var r=Bu(e,[]);delete r.userId;var n=Ru({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Share Points",Ru(Ru({},o),i))},Mu=function(t){rt("sharePoints",t,{googleAnalyticsHandler:Eu,facebookPixelHandler:Cu,segmentHandler:Uu})},Lu=function(){return(Lu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Hu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Nu=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.currencyName,c=e.amount,l=Hu(e,["callback","userId","currencyName","amount"]),s=null!=a?a:n,f=Lu(Lu({},l),{userId:s}),p=H(f),y=u().meta,d=H(y);gtag("event","spend_virtual_currency",Lu(Lu({send_to:r,event_callback:o,virtual_currency_name:i,value:c},p),d))},Du=function(){return(Du=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Yu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},qu=function(t,e){var r=t.trackingId,n=Yu(e,[]);delete n.userId;var o=Du({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SpendPoints",Du(Du({},a),c))},Fu=function(){return(Fu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},zu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Vu=function(t,e){var r=zu(e,[]);delete r.userId;var n=Fu({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Spend Points",Fu(Fu({},o),i))},$u=function(t){rt("spendPoints",t,{googleAnalyticsHandler:Nu,facebookPixelHandler:qu,segmentHandler:Vu})},Gu=function(){return(Gu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Wu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ku=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Wu(e,["callback","userId"]),c=null!=a?a:n,l=Gu(Gu({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_loyalty_level",Gu(Gu({send_to:r,event_callback:o},s),p))},Ju=function(){return(Ju=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Qu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Zu=function(t,e){var r=t.trackingId,n=Qu(e,[]);delete n.userId;var o=Ju({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewLoyaltyLevel",Ju(Ju({},a),c))},Xu=function(){return(Xu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},tc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ec=function(t,e){var r=tc(e,[]);delete r.userId;var n=Xu({},r),o=H(n),a=u().meta,i=H(a);analytics.track("View Loyalty Level",Xu(Xu({},o),i))},rc=function(t){rt("viewLoyaltyLevel",t,{googleAnalyticsHandler:Ku,facebookPixelHandler:Zu,segmentHandler:ec})},nc={logEarnPoints:xu,logSharePoints:Mu,logSpendPoints:$u,logViewLoyaltyLevel:rc},oc=nc,ac=function(){return(ac=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ic=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},uc=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=ic(e,["callback","userId"]),c=null!=a?a:n,l=ac(ac({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","cancel_order",ac(ac({send_to:r,event_callback:o},s),p))},cc=function(){return(cc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},lc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},sc=function(t,e){var r=t.trackingId,n=lc(e,[]);delete n.userId;var o=cc({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"CancelOrder",cc(cc({},a),c))},fc=function(){return(fc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},pc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},yc=function(t,e){var r=t.currency,n=e.currency,o=e.orderTotal,a=e.products,i=pc(e,["currency","orderTotal","products"]);delete i.userId;var c=null!=n?n:r,l=fc(fc({},i),{revenue:o,currency:c}),s=H(l),f=u().meta,p=H(f);analytics.track("Order Cancelled",fc(fc({products:lt(a)},s),p))},dc=function(t){rt("cancelOrder",t,{googleAnalyticsHandler:uc,facebookPixelHandler:sc,segmentHandler:yc})},hc=function(){return(hc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},gc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},bc=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=gc(e,["callback","userId"]),c=null!=a?a:n,l=hc(hc({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","rate_order",hc(hc({send_to:r,event_callback:o},s),p))},vc=function(){return(vc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Oc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},mc=function(t,e){var r=t.trackingId,n=e.maxScore,o=e.score,a=Oc(e,["maxScore","score"]);delete a.userId;var i=vc(vc({},a),{maxScore:n,score:o}),c=H(i),l=u().meta,s=H(l);fbq("trackSingleCustom",r,"RateOrder",vc(vc({max_rating_value:n,value:o},c),s))},wc=function(){return(wc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},jc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Pc=function(t,e){var r=jc(e,[]);delete r.userId;var n=wc({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Rate Order",wc(wc({},o),i))},Ic=function(t){rt("rateOrder",t,{googleAnalyticsHandler:bc,facebookPixelHandler:mc,segmentHandler:Pc})},Sc=function(){return(Sc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},xc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},kc=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=e.orderId,s=e.orderTotal,f=xc(e,["callback","userId","currency","orderId","orderTotal"]),p=null!=i?i:n,y=null!=c?c:o,d=Sc(Sc({},f),{userId:p,currency:y}),h=H(d),g=u().meta,b=H(g);gtag("event","refund",Sc(Sc({send_to:r,event_callback:a,transaction_id:l,value:s},h),b))},Ac=function(){return(Ac=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ec=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},_c=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=e.orderTotal,i=Ec(e,["currency","orderTotal"]);delete i.userId;var c=null!=o?o:n,l=Ac(Ac({},i),{currency:c}),s=H(l),f=u().meta,p=H(f);fbq("trackSingleCustom",r,"RequestRefund",Ac(Ac({value:a},s),p))},Tc=function(){return(Tc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Cc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Rc=function(t,e){var r=t.currency,n=e.currency,o=e.orderTotal,a=e.products,i=Cc(e,["currency","orderTotal","products"]);delete i.userId;var c=null!=n?n:r,l=Tc(Tc({},i),{revenue:o,currency:c}),s=H(l),f=u().meta,p=H(f);analytics.track("Order Refunded",Tc(Tc({products:lt(a)},s),p))},Bc=function(t){rt("requestRefund",t,{googleAnalyticsHandler:kc,facebookPixelHandler:_c,segmentHandler:Rc})},Uc={logCancelOrder:dc,logRateOrder:Ic,logRequestRefund:Bc},Mc=Uc,Lc=function(){return(Lc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Hc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Nc=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Hc(e,["callback","userId"]),c=null!=a?a:n,l=Lc(Lc({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","generate_lead",Lc(Lc({send_to:r,event_callback:o},s),p))},Dc=function(){return(Dc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Yc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},qc=function(t,e){var r=t.trackingId,n=Yc(e,[]);delete n.userId;var o=Dc({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingle",r,"Lead",Dc(Dc({},a),c))},Fc=function(){return(Fc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},zc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Vc=function(t,e){var r=zc(e,[]);delete r.userId;var n=Fc({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Generate Lead",Fc(Fc({},o),i))},$c=function(t){void 0===t&&(t={}),rt("generateLead",t,{googleAnalyticsHandler:Nc,facebookPixelHandler:qc,segmentHandler:Vc})},Gc=function(){return(Gc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Wc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Kc=function(t,e){void 0===e&&(e={});var r=t.trackingId,n=Wc(e,[]);delete n.userId;var o=Gc({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingle",r,"PageView",Gc(Gc({},a),c))},Jc=function(){return(Jc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Qc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Zc=function(t,e){void 0===e&&(e={});var r=t.trackingId,n=t.userId,o=e.pathname,a=e.name,i=e.callback,c=e.userId,l=Qc(e,["pathname","name","callback","userId"]),s=null!=c?c:n,f=Jc(Jc({},l),{userId:s}),p=H(f),y=u().meta,d=H(y);gtag("event","page_view",Jc(Jc({page_title:a,page_path:o,send_to:r,event_callback:i},p),d))},Xc=function(){return(Xc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},tl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},el=function(t,e){var r=e.name,n=tl(e,["name"]),o=H(n),a=u().meta,i=H(a);analytics.page(r,Xc(Xc({},o),i))},rl=function(t){rt("pageView",t,{googleAnalyticsHandler:Zc,facebookPixelHandler:Kc,segmentHandler:el})},nl=function(){return(nl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ol=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},al=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.query,c=ol(e,["callback","userId","query"]),l=null!=a?a:n,s=nl(nl({},c),{userId:l}),f=H(s),p=u().meta,y=H(p);gtag("event","search",nl(nl({send_to:r,event_callback:o,search_term:i},f),y))},il=function(){return(il=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ul=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},cl=function(t,e){var r=t.trackingId,n=e.query,o=ul(e,["query"]);delete o.userId;var a=il({},o),i=H(a),c=u().meta,l=H(c);fbq("trackSingle",r,"Search",il(il({search_string:n},i),l))},ll=function(){return(ll=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},sl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},fl=function(t,e){var r=sl(e,[]);delete r.userId;var n=ll({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Search Page Content",ll(ll({},o),i))},pl=function(t){rt("searchPageContent",t,{googleAnalyticsHandler:al,facebookPixelHandler:cl,segmentHandler:fl})},yl={logGenerateLead:$c,logPageView:rl,logSearchPageContent:pl},dl=yl,hl=function(){return(hl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},gl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},bl=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=gl(e,["callback","userId","currency"]),s=null!=i?i:n,f=null!=c?c:o,p=hl(hl({},l),{userId:s,currency:f}),y=H(p),d=u().meta,h=H(d);gtag("event","change_payment_type",hl(hl({send_to:r,event_callback:a},y),h))},vl=function(){return(vl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ol=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ml=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=Ol(e,["currency"]);delete a.userId;var i=null!=o?o:n,c=vl(vl({},a),{currency:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"ChangePaymentType",vl(vl({},l),f))},wl=function(){return(wl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},jl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Pl=function(t,e){var r=t.currency,n=e.currency,o=jl(e,["currency"]);delete o.userId;var a=null!=n?n:r,i=wl(wl({},o),{currency:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Change Payment Type",wl(wl({},c),s))},Il=function(t){rt("changePaymentType",t,{googleAnalyticsHandler:bl,facebookPixelHandler:ml,segmentHandler:Pl})},Sl=function(){return(Sl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},xl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},kl=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=xl(e,["callback","userId","currency"]),s=null!=i?i:n,f=null!=c?c:o,p=Sl(Sl({},l),{userId:s,currency:f}),y=H(p),d=u().meta,h=H(d);gtag("event","select_payment_type",Sl(Sl({send_to:r,event_callback:a},y),h))},Al=function(){return(Al=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},El=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},_l=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=El(e,["currency"]);delete a.userId;var i=null!=o?o:n,c=Al(Al({},a),{currency:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"SelectPaymentType",Al(Al({},l),f))},Tl=function(){return(Tl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Cl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Rl=function(t,e){var r=t.currency,n=e.currency,o=Cl(e,["currency"]);delete o.userId;var a=null!=n?n:r,i=Tl(Tl({},o),{currency:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Select Payment Type",Tl(Tl({},c),s))},Bl=function(t){rt("selectPaymentType",t,{googleAnalyticsHandler:kl,facebookPixelHandler:_l,segmentHandler:Rl})},Ul=function(){return(Ul=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ml=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ll=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=Ml(e,["callback","userId","currency"]),s=null!=i?i:n,f=null!=c?c:o,p=Ul(Ul({},l),{userId:s,currency:f}),y=H(p),d=u().meta,h=H(d);gtag("event","add_payment_info",Ul(Ul({send_to:r,event_callback:a},y),h))},Hl=function(){return(Hl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Nl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Dl=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=Nl(e,["currency"]);delete a.userId;var i=null!=o?o:n,c=Hl(Hl({},a),{currency:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingle",r,"AddPaymentInfo",Hl(Hl({success:1},l),f))},Yl=function(){return(Yl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ql=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Fl=function(t,e){var r=t.currency,n=e.currency,o=ql(e,["currency"]);delete o.userId;var a=null!=n?n:r,i=Yl(Yl({},o),{currency:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Set Payment Info",Yl(Yl({},c),s))},zl=function(t){rt("setPaymentInfo",t,{googleAnalyticsHandler:Ll,facebookPixelHandler:Dl,segmentHandler:Fl})},Vl={logChangePaymentType:Il,logSelectPaymentType:Bl,logSetPaymentInfo:zl},$l=Vl,Gl=function(){return(Gl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Wl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Kl=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.product,c=Wl(e,["callback","userId","product"]),l=null!=a?a:n,s=i.productId,f=i.name,p=Gl(Gl({},c),{userId:l,productId:s,productName:f}),y=H(p),d=u().meta,h=H(d);gtag("event","customize_product",Gl(Gl({send_to:r,event_callback:o},y),h))},Jl=function(){return(Jl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ql=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Zl=function(t,e){var r=t.trackingId,n=e.product,o=Ql(e,["product"]);delete o.userId;var a=n.productId,i=n.name,c=Jl(Jl({},o),{productId:a,productName:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingle",r,"CustomizeProduct",Jl(Jl({},l),f))},Xl=function(){return(Xl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ts=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},es=function(t,e){var r=e.product,n=ts(e,["product"]);delete n.userId;var o=r.productId,a=r.name,i=Xl(Xl({},n),{productId:o,productName:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Customize Product",Xl(Xl({},c),s))},rs=function(t){rt("customizeProduct",t,{googleAnalyticsHandler:Kl,facebookPixelHandler:Zl,segmentHandler:es})},ns=function(){return(ns=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},os=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},as=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=os(e,["callback","userId"]),c=null!=a?a:n,l=ns(ns({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","filter_products",ns(ns({send_to:r,event_callback:o},s),p))},is=function(){return(is=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},us=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},cs=function(t,e){var r=t.trackingId,n=us(e,[]);delete n.userId;var o=is({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"FilterProducts",is(is({},a),c))},ls=function(){return(ls=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ss=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},fs=function(t,e){var r=e.filterBy,n=ss(e,["filterBy"]);delete n.userId;var o=ls(ls({},n),{filterBy:ct(r)}),a=H(o),i=u().meta,c=H(i);analytics.track("Filter Products",ls(ls({},a),c))},ps=function(t){rt("filterProducts",t,{googleAnalyticsHandler:as,facebookPixelHandler:cs,segmentHandler:fs})},ys=function(){return(ys=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ds=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},hs=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=ds(e,["callback","userId","product","currency"]),f=null!=i?i:n,p=null!=l?l:o,y=c.productId,d=c.name,h=ys(ys({},s),{userId:f,productId:y,productName:d,currency:p}),g=Object(J.getProductTotals)(c),b=H(h),v=u().meta,O=H(v);gtag("event","product_impression",ys(ys({send_to:r,event_callback:a,value:g.netPrice},b),O))},gs=function(){return(gs=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},bs=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},vs=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.currency,i=bs(e,["product","currency"]);delete i.userId;var c=null!=a?a:n,l=o.productId,s=o.name,f=Object(J.getProductTotals)(o),p=gs(gs({},i),{productId:l,productName:s,currency:c}),y=H(p),d=u().meta,h=H(d);fbq("trackSingleCustom",r,"ProductImpression",gs(gs({value:f.netPrice},y),h))},Os=function(){return(Os=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ms=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ws=function(t,e){var r=t.currency,n=e.product,o=e.currency,a=ms(e,["product","currency"]);delete a.userId;var i=null!=o?o:r,c=n.productId,l=n.name,s=Os(Os({},a),{productId:c,name:l,currency:i}),f=H(s),p=u().meta,y=H(p),d=Object(J.getProductTotals)(n);analytics.track("Product Viewed",Os(Os({price:d.netPrice},f),y))},js=function(t){rt("productImpression",t,{googleAnalyticsHandler:hs,facebookPixelHandler:vs,segmentHandler:ws})},Ps=function(){return(Ps=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Is=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ss=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Is(e,["callback","userId"]),c=null!=a?a:n,l=Ps(Ps({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","search_product_success",Ps(Ps({send_to:r,event_callback:o},s),p))},xs=function(){return(xs=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ks=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},As=function(t,e){var r=t.trackingId,n=e.query,o=ks(e,["query"]);delete o.userId;var a=xs({},o),i=H(a),c=u().meta,l=H(c);fbq("trackSingle",r,"Search",xs(xs({search_string:n,success:1},i),l))},Es=function(){return(Es=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},_s=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ts=function(t,e){var r=_s(e,[]);delete r.userId;var n=Es({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Products Searched",Es(Es({},o),i))},Cs=function(t){rt("searchProductSuccess",t,{googleAnalyticsHandler:Ss,facebookPixelHandler:As,segmentHandler:Ts})},Rs=function(){return(Rs=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bs=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Us=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.query,c=Bs(e,["callback","userId","query"]),l=null!=a?a:n,s=Rs(Rs({},c),{userId:l}),f=H(s),p=u().meta,y=H(p);gtag("event","search",Rs(Rs({send_to:r,event_callback:o,search_term:i},f),y))},Ms=function(){return(Ms=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ls=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Hs=function(t,e){var r=t.trackingId,n=e.query,o=Ls(e,["query"]);delete o.userId;var a=Ms({},o),i=H(a),c=u().meta,l=H(c);fbq("trackSingle",r,"Search",Ms(Ms({search_string:n},i),l))},Ns=function(){return(Ns=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ds=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ys=function(t,e){var r=Ds(e,[]);delete r.userId;var n=Ns({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Search Product Attempt",Ns(Ns({},o),i))},qs=function(t){rt("searchProductAttempt",t,{googleAnalyticsHandler:Us,facebookPixelHandler:Hs,segmentHandler:Ys})},Fs=function(){return(Fs=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},zs=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Vs=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=zs(e,["callback","userId"]),c=null!=a?a:n,l=Fs(Fs({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","search_product_not_found",Fs(Fs({send_to:r,event_callback:o},s),p))},$s=function(){return($s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Gs=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ws=function(t,e){var r=t.trackingId,n=e.query,o=Gs(e,["query"]);delete o.userId;var a=$s({},o),i=H(a),c=u().meta,l=H(c);fbq("trackSingle",r,"Search",$s($s({search_string:n,success:0},i),l))},Ks=function(){return(Ks=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Js=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Qs=function(t,e){var r=Js(e,[]);delete r.userId;var n=Ks({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Search Product Not Found",Ks(Ks({},o),i))},Zs=function(t){rt("searchProductNotFound",t,{googleAnalyticsHandler:Vs,facebookPixelHandler:Ws,segmentHandler:Qs})},Xs=function(){return(Xs=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},tf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ef=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=tf(e,["callback","userId","product","currency"]);s.contentType&&delete s.contentType;var f=null!=i?i:n,p=null!=l?l:o,y=c.productId,d=c.name,h=Xs(Xs({},s),{userId:f,productId:y,productName:d,currency:p}),g=Object(J.getProductTotals)(c),b=H(h),v=u().meta,O=H(v);gtag("event","select_content",Xs(Xs({send_to:r,event_callback:a,content_type:"product",value:g.netPrice},b),O))},rf=function(){return(rf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},nf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},of=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.currency,i=nf(e,["product","currency"]);delete i.userId;var c=null!=a?a:n,l=o.productId,s=o.name,f=Object(J.getProductTotals)(o),p=rf(rf({},i),{productId:l,productName:s,currency:c}),y=H(p),d=u().meta,h=H(d);fbq("trackSingleCustom",r,"SelectProduct",rf(rf({value:f.netPrice},y),h))},af=function(){return(af=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},uf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},cf=function(t,e){var r=t.currency,n=e.product,o=e.currency,a=uf(e,["product","currency"]);delete a.userId;var i=null!=o?o:r,c=n.productId,l=n.name,s=af(af({},a),{productId:c,name:l,currency:i}),f=H(s),p=u().meta,y=H(p),d=Object(J.getProductTotals)(n);analytics.track("Product Clicked",af(af({price:d.netPrice},f),y))},lf=function(t){rt("selectProduct",t,{googleAnalyticsHandler:ef,facebookPixelHandler:of,segmentHandler:cf})},sf=function(){return(sf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ff=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},pf=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=ff(e,["callback","userId"]),c=null!=a?a:n,l=sf(sf({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","sort_products",sf(sf({send_to:r,event_callback:o},s),p))},yf=function(){return(yf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},df=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},hf=function(t,e){var r=t.trackingId,n=df(e,[]);delete n.userId;var o=yf({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SortProducts",yf(yf({},a),c))},gf=function(){return(gf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},bf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},vf=function(t,e){var r=bf(e,[]);delete r.userId;var n=gf({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Sort Products",gf(gf({},o),i))},Of=function(t){rt("sortProducts",t,{googleAnalyticsHandler:pf,facebookPixelHandler:hf,segmentHandler:vf})},mf=function(){return(mf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},wf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},jf=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=wf(e,["callback","userId","product","currency"]),f=null!=i?i:n,p=null!=l?l:o,y=c.productId,d=c.name,h=mf(mf({},s),{userId:f,productId:y,productName:d,currency:p}),g=Object(J.getProductTotals)(c),b=H(h),v=u().meta,O=H(v);gtag("event","view_item",mf(mf({send_to:r,event_callback:a,value:g.netPrice},b),O))},Pf=function(){return(Pf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},If=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Sf=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.currency,i=If(e,["product","currency"]);delete i.userId;var c=null!=a?a:n,l=o.productId,s=o.name,f=Object(J.getProductTotals)(o),p=Pf(Pf({},i),{productId:l,productName:s,currency:c}),y=H(p),d=u().meta,h=H(d);fbq("trackSingle",r,"ViewContent",Pf(Pf({value:f.netPrice},y),h))},xf=function(){return(xf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},kf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Af=function(t,e){var r=t.currency,n=e.product,o=e.currency,a=kf(e,["product","currency"]);delete a.userId;var i=null!=o?o:r,c=n.productId,l=n.name,s=xf(xf({},a),{productId:c,name:l,currency:i}),f=H(s),p=u().meta,y=H(p),d=Object(J.getProductTotals)(n);analytics.track("View Product Details",xf(xf({price:d.netPrice},f),y))},Ef=function(t){rt("viewProductDetails",t,{googleAnalyticsHandler:jf,facebookPixelHandler:Sf,segmentHandler:Af})},_f={logCustomizeProduct:rs,logFilterProducts:ps,logProductImpression:js,logSearchProductSuccess:Cs,logSearchProductAttempt:qs,logSearchProductNotFound:Zs,logSelectProduct:lf,logSortProducts:Of,logViewProductDetails:Ef},Tf=_f,Cf=function(){return(Cf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Rf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Bf=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=e.shoppingCart,s=Rf(e,["callback","userId","currency","shoppingCart"]),f=null!=i?i:n,p=null!=c?c:o,y=Cf(Cf({},s),{userId:f,currency:p}),d=H(y),h=u().meta,g=H(h),b=Object(K.getShoppingCartTotal)(l),v=b.total,O=b.totalPoints;gtag("event","purchase_attempt",Cf(Cf({send_to:r,event_callback:a,items:it(l,p),value:v,points:O},d),g))},Uf=function(){return(Uf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Mf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Lf=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=e.shoppingCart,i=Mf(e,["currency","shoppingCart"]);delete i.userId;var c=null!=o?o:n,l=Uf(Uf({},i),{currency:c}),s=H(l),f=u().meta,p=H(f),y=nt(a),d=Object(K.getShoppingCartTotal)(a),h=d.total,g=d.totalPoints;fbq("trackSingleCustom",r,"PurchaseAttempt",Uf(Uf({content_ids:y,contents:ot(a),num_items:y.length,value:h,points:g},s),p))},Hf=function(){return(Hf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Nf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Df=function(t,e){var r=t.currency,n=e.currency,o=e.shoppingCart,a=Nf(e,["currency","shoppingCart"]);delete a.userId;var i=null!=n?n:r,c=Hf(Hf({},a),{currency:i}),l=H(c),s=u().meta,f=H(s),p=Object(K.getShoppingCartProducts)(o),y=Object(K.getShoppingCartTotal)(o),d=y.total,h=y.totalTaxes,g=y.shippingCost,b=y.totalPoints;analytics.track("Purchase Attempt",Hf(Hf({total:d,revenue:d-h-(null!=g?g:0),shipping:g,tax:h,products:lt(p),points:b},l),f))},Yf=function(t){rt("purchaseAttempt",t,{googleAnalyticsHandler:Bf,facebookPixelHandler:Lf,segmentHandler:Df})},qf=function(){return(qf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ff=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},zf=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=e.shoppingCart,s=Ff(e,["callback","userId","currency","shoppingCart"]),f=null!=i?i:n,p=null!=c?c:o,y=qf(qf({},s),{userId:f,currency:p}),d=H(y),h=u().meta,g=H(h),b=Object(K.getShoppingCartTotal)(l),v=b.total,O=b.totalPoints;gtag("event","purchase_fail",qf(qf({send_to:r,event_callback:a,items:it(l,p),value:v,points:O},d),g))},Vf=function(){return(Vf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$f=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Gf=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=e.shoppingCart,i=$f(e,["currency","shoppingCart"]);delete i.userId;var c=null!=o?o:n,l=Vf(Vf({},i),{currency:c}),s=H(l),f=u().meta,p=H(f),y=nt(a),d=Object(K.getShoppingCartTotal)(a),h=d.total,g=d.totalPoints;fbq("trackSingleCustom",r,"PurchaseFail",Vf(Vf({content_ids:y,contents:ot(a),num_items:y.length,value:h,points:g},s),p))},Wf=function(){return(Wf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Kf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Jf=function(t,e){var r=t.currency,n=e.currency,o=e.shoppingCart,a=Kf(e,["currency","shoppingCart"]);delete a.userId;var i=null!=n?n:r,c=Wf(Wf({},a),{currency:i}),l=H(c),s=u().meta,f=H(s),p=Object(K.getShoppingCartProducts)(o),y=Object(K.getShoppingCartTotal)(o),d=y.total,h=y.totalTaxes,g=y.shippingCost,b=y.totalPoints;analytics.track("Purchase Fail",Wf(Wf({total:d,revenue:d-h-(null!=g?g:0),shipping:g,tax:h,products:lt(p),points:b},l),f))},Qf=function(t){rt("purchaseFail",t,{googleAnalyticsHandler:zf,facebookPixelHandler:Gf,segmentHandler:Jf})},Zf=function(){return(Zf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Xf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},tp=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=e.shoppingCart,s=e.orderId,f=Xf(e,["callback","userId","currency","shoppingCart","orderId"]),p=null!=i?i:n,y=null!=c?c:o,d=Zf(Zf({},f),{userId:p,currency:y}),h=Object(K.getShoppingCartTotal)(l),g=h.total,b=h.shippingCost,v=h.totalTaxes,O=h.totalPoints,m=H(d),w=u().meta,j=H(w);gtag("event","purchase",Zf(Zf({send_to:r,event_callback:a,items:it(l,y),value:g,points:O,transaction_id:s,shipping:b,tax:v},m),j))},ep=function(){return(ep=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},rp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},np=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=e.shoppingCart,i=rp(e,["currency","shoppingCart"]);delete i.userId;var c=null!=o?o:n,l=ep(ep({},i),{currency:c}),s=H(l),f=u().meta,p=H(f),y=nt(a),d=Object(K.getShoppingCartTotal)(a),h=d.total,g=d.totalPoints;fbq("trackSingle",r,"Purchase",ep(ep({content_ids:y,contents:ot(a),num_items:y.length,value:h,points:g},s),p))},op=function(){return(op=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ap=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ip=function(t,e){var r=t.currency,n=e.currency,o=e.shoppingCart,a=ap(e,["currency","shoppingCart"]);delete a.userId;var i=null!=n?n:r,c=op(op({},a),{currency:i}),l=H(c),s=u().meta,f=H(s),p=Object(K.getShoppingCartProducts)(o),y=Object(K.getShoppingCartTotal)(o),d=y.total,h=y.totalTaxes,g=y.shippingCost,b=y.totalPoints;analytics.track("Order Completed",op(op({total:d,revenue:d-h-(null!=g?g:0),shipping:g,tax:h,products:lt(p),points:b},l),f))},up=function(t){rt("purchaseSuccess",t,{googleAnalyticsHandler:tp,facebookPixelHandler:np,segmentHandler:ip})},cp={logPurchaseAttempt:Yf,logPurchaseFail:Qf,logPurchaseSuccess:up},lp=cp,sp=function(){return(sp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},fp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},pp=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=fp(e,["callback","userId"]),c=null!=a?a:n,l=sp(sp({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_settings",sp(sp({send_to:r,event_callback:o},s),p))},yp=function(){return(yp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},dp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},hp=function(t,e){var r=t.trackingId,n=dp(e,[]);delete n.userId;var o=yp({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewSettings",yp(yp({},a),c))},gp=function(){return(gp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},bp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},vp=function(t,e){var r=bp(e,[]);delete r.userId;var n=gp({},r),o=H(n),a=u().meta,i=H(a);analytics.track("View Settings",gp(gp({},o),i))},Op=function(t){void 0===t&&(t={}),rt("viewSettings",t,{googleAnalyticsHandler:pp,facebookPixelHandler:hp,segmentHandler:vp})},mp={logViewSettings:Op},wp=mp,jp=function(){return(jp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Pp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ip=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Pp(e,["callback","userId"]);delete i.identify;var c=null!=a?a:n,l=jp(jp({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","add_shipping_info",jp(jp({send_to:r,event_callback:o},s),p))},Sp=function(){return(Sp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},xp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},kp=function(t,e){var r=t.trackingId,n=xp(e,[]);delete n.userId,delete n.identify;var o=Sp({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"AddShippingAddress",Sp(Sp({},a),c))},Ap=function(){return(Ap=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ep=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},_p=function(t,e){var r=e.identify,n=Ep(e,["identify"]);delete n.userId;var o=Ap({},n),a=H(o),i=u().meta,c=H(i);analytics.track("Add Shipping Address",Ap(Ap({},a),c)),r&&analytics.identify(r.id,r)},Tp=function(t){rt("addShippingAddress",t,{googleAnalyticsHandler:Ip,facebookPixelHandler:kp,segmentHandler:_p})},Cp=function(){return(Cp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Rp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Bp=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Rp(e,["callback","userId"]);delete i.identify;var c=null!=a?a:n,l=Cp(Cp({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","select_shipping_address",Cp(Cp({send_to:r,event_callback:o},s),p))},Up=function(){return(Up=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Mp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Lp=function(t,e){var r=t.trackingId,n=Mp(e,[]);delete n.userId,delete n.identify;var o=Up({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SelectShippingAddress",Up(Up({},a),c))},Hp=function(){return(Hp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Np=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Dp=function(t,e){var r=e.identify,n=Np(e,["identify"]);delete n.userId;var o=Hp({},n),a=H(o),i=u().meta,c=H(i);analytics.track("Select Shipping Address",Hp(Hp({},a),c)),r&&analytics.identify(r.id,r)},Yp=function(t){rt("selectShippingAddress",t,{googleAnalyticsHandler:Bp,facebookPixelHandler:Lp,segmentHandler:Dp})},qp=function(){return(qp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Fp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},zp=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Fp(e,["callback","userId"]);delete i.identify;var c=null!=a?a:n,l=qp(qp({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","update_shipping_info",qp(qp({send_to:r,event_callback:o},s),p))},Vp=function(){return(Vp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$p=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Gp=function(t,e){var r=t.trackingId,n=$p(e,[]);delete n.userId,delete n.identify;var o=Vp({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"UpdateShippingAddress",Vp(Vp({},a),c))},Wp=function(){return(Wp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Kp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Jp=function(t,e){var r=e.fields,n=e.identify,o=Kp(e,["fields","identify"]);delete o.userId;var a=Wp(Wp({},o),{fields:ct(r)}),i=H(a),c=u().meta,l=H(c);analytics.track("Update Shipping Address",Wp(Wp({},i),l)),n&&analytics.identify(n.id,n)},Qp=function(t){rt("updateShippingAddress",t,{googleAnalyticsHandler:zp,facebookPixelHandler:Gp,segmentHandler:Jp})},Zp={logAddShippingAddress:Tp,logSelectShippingAddress:Yp,logUpdateShippingAddress:Qp},Xp=Zp,ty=function(){return(ty=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ey=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ry=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=e.store,f=e.priceCategory,p=ey(e,["callback","userId","product","currency","store","priceCategory"]),y=null!=i?i:n,d=null!=l?l:o,h=s.storeName,g=s.storeId,b=ty(ty({},p),{userId:y,storeId:g,storeName:h,currency:d}),v=H(b),O=u().meta,m=H(O),w=Object(J.getProductTotals)(c).netPrice,j=c.priceCategory,P=null!=f?f:j,I="NORMAL"===P?w:0,S="POINTS"===P?w:0;gtag("event","add_to_cart",ty(ty({send_to:r,event_callback:a,items:[ut(c,d)],value:I,points:S},v),m))},ny=function(){return(ny=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},oy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ay=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.store,i=e.currency,c=e.priceCategory,l=oy(e,["product","store","currency","priceCategory"]);delete l.userId;var s=null!=i?i:n,f=o.productId,p=o.name,y=o.amount,d=a.storeName,h=a.storeId,g=ny(ny({},l),{storeId:h,storeName:d,amount:y,currency:s}),b=H(g),v=u().meta,O=H(v),m=Object(J.getProductTotals)(o).netPrice,w=o.priceCategory,j=null!=c?c:w,P="NORMAL"===j?m:0,I="POINTS"===j?m:0;fbq("trackSingle",r,"AddToCart",ny(ny({content_id:f,content_name:p,content:at(o),value:P,points:I},b),O))},iy=function(){return(iy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},uy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},cy=function(t,e){var r=t.currency,n=e.product,o=e.store,a=e.currency,i=e.priceCategory,c=uy(e,["product","store","currency","priceCategory"]);delete c.userId;var l=null!=a?a:r,s=n.productId,f=n.name,p=n.amount,y=o.storeName,d=o.storeId,h=iy(iy({},c),{storeId:d,storeName:y,productId:s,quantity:p,name:f,currency:l}),g=H(h),b=u().meta,v=H(b),O=n.priceCategory,m=null!=i?i:O,w=Object(J.getProductTotals)(n).netPrice,j="NORMAL"===m?w:0,P="POINTS"===m?w:0;analytics.track("Product Added",iy(iy({price:j,points:P},g),v))},ly=function(t){rt("addProductToCart",t,{googleAnalyticsHandler:ry,facebookPixelHandler:ay,segmentHandler:cy})},sy=function(){return(sy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},fy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},py=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=e.priceCategory,f=fy(e,["callback","userId","product","currency","priceCategory"]),p=null!=i?i:n,y=null!=l?l:o,d=sy(sy({},f),{userId:p,currency:y}),h=H(d),g=u().meta,b=H(g),v=Object(J.getProductTotals)(c).netPrice,O=c.priceCategory,m=null!=s?s:O,w="NORMAL"===m?v:0,j="POINTS"===m?v:0;gtag("event","add_to_wishlist",sy(sy({send_to:r,event_callback:a,items:[ut(c,y)],value:w,points:j},h),b))},yy=function(){return(yy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},dy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},hy=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.currency,i=e.priceCategory,c=dy(e,["product","currency","priceCategory"]);delete c.userId;var l=null!=a?a:n,s=o.productId,f=o.name,p=o.amount,y=yy(yy({},c),{amount:p,currency:l}),d=H(y),h=u().meta,g=Object(J.getProductTotals)(o).netPrice,b=o.priceCategory,v=null!=i?i:b,O="NORMAL"===v?g:0,m="POINTS"===v?g:0,w=H(h);fbq("trackSingle",r,"AddToWishlist",yy(yy({content_id:s,content_name:f,content:at(o),value:O,points:m},d),w))},gy=function(){return(gy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},by=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},vy=function(t,e){var r=t.currency,n=e.product,o=e.currency,a=e.priceCategory,i=by(e,["product","currency","priceCategory"]);delete i.userId;var c=null!=o?o:r,l=n.productId,s=n.name,f=n.amount,p=gy(gy({},i),{productId:l,quantity:f,name:s,currency:c}),y=H(p),d=u().meta,h=H(d),g=n.priceCategory,b=null!=a?a:g,v=Object(J.getProductTotals)(n).netPrice,O="NORMAL"===b?v:0,m="POINTS"===b?v:0;analytics.track("Add Product To Wishlist",gy(gy({price:O,points:m},y),h))},Oy=function(t){rt("addProductToWishlist",t,{googleAnalyticsHandler:py,facebookPixelHandler:hy,segmentHandler:vy})},my=function(){return(my=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},wy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},jy=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=wy(e,["callback","userId"]),c=null!=a?a:n,l=my(my({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","clear_cart",my(my({send_to:r,event_callback:o},s),p))},Py=function(){return(Py=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Iy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Sy=function(t,e){var r=t.trackingId,n=Iy(e,[]);delete n.userId;var o=Py({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ClearCart",Py(Py({},a),c))},xy=function(){return(xy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ky=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ay=function(t,e){var r=ky(e,[]);delete r.userId;var n=xy({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Clear Cart",xy(xy({},o),i))},Ey=function(t){rt("clearCart",t,{googleAnalyticsHandler:jy,facebookPixelHandler:Sy,segmentHandler:Ay})},_y=function(){return(_y=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ty=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Cy=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=e.store,f=e.priceCategory,p=Ty(e,["callback","userId","product","currency","store","priceCategory"]),y=null!=i?i:n,d=null!=l?l:o,h=c.productId,g=c.name,b=s.storeName,v=s.storeId,O=_y(_y({},p),{userId:y,productId:h,productName:g,storeId:v,storeName:b,currency:d}),m=H(O),w=u().meta,j=H(w),P=Object(J.getProductTotals)(c).netPrice,I=c.priceCategory,S=null!=f?f:I;gtag("event","remove_product_from_cart",_y(_y({send_to:r,event_callback:a,value:"NORMAL"===S?P:0,points:"POINTS"===S?P:0},m),j))},Ry=function(){return(Ry=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},By=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Uy=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.store,i=e.currency,c=e.priceCategory,l=By(e,["product","store","currency","priceCategory"]);delete l.userId;var s=null!=i?i:n,f=o.productId,p=o.name,y=o.amount,d=a.storeName,h=a.storeId,g=Ry(Ry({},l),{storeId:h,storeName:d,amount:y,currency:s}),b=H(g),v=u().meta,O=H(v),m=Object(J.getProductTotals)(o).netPrice,w=o.priceCategory,j=null!=c?c:w,P="NORMAL"===j?m:0,I="POINTS"===j?m:0;fbq("trackSingleCustom",r,"RemoveProductFromCart",Ry(Ry({content_id:f,content_name:p,content:at(o),value:P,points:I},b),O))},My=function(){return(My=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ly=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Hy=function(t,e){var r=t.currency,n=e.product,o=e.store,a=e.currency,i=e.priceCategory,c=Ly(e,["product","store","currency","priceCategory"]);delete c.userId;var l=null!=a?a:r,s=n.productId,f=n.name,p=n.amount,y=o.storeName,d=o.storeId,h=My(My({},c),{storeId:d,storeName:y,productId:s,quantity:p,name:f,currency:l}),g=H(h),b=u().meta,v=H(b),O=n.priceCategory,m=null!=i?i:O,w=Object(J.getProductTotals)(n).netPrice,j="NORMAL"===m?w:0,P="POINTS"===m?w:0;analytics.track("Product Removed",My(My({price:j,points:P},g),v))},Ny=function(){return(Ny=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Dy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Yy=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=e.priceCategory,f=Dy(e,["callback","userId","product","currency","priceCategory"]),p=null!=i?i:n,y=null!=l?l:o,d=c.productId,h=c.name,g=Ny(Ny({},f),{userId:p,productId:d,productName:h,currency:y}),b=H(g),v=u().meta,O=H(v),m=Object(J.getProductTotals)(c).netPrice,w=c.priceCategory,j=null!=s?s:w;gtag("event","remove_product_from_wishlist",Ny(Ny({send_to:r,event_callback:a,value:"NORMAL"===j?m:0,points:"POINTS"===j?m:0},b),O))},qy=function(){return(qy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Fy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},zy=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.currency,i=e.priceCategory,c=Fy(e,["product","currency","priceCategory"]);delete c.userId;var l=null!=a?a:n,s=o.productId,f=o.name,p=o.amount,y=qy(qy({},c),{amount:p,currency:l}),d=H(y),h=u().meta,g=H(h),b=Object(J.getProductTotals)(o).netPrice,v=o.priceCategory,O=null!=i?i:v,m="NORMAL"===O?b:0,w="POINTS"===O?b:0;fbq("trackSingleCustom",r,"RemoveProductFromWishlist",qy(qy({content_id:s,content_name:f,content:at(o),value:m,points:w},d),g))},Vy=function(){return(Vy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$y=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Gy=function(t,e){var r=t.currency,n=e.product,o=e.currency,a=e.priceCategory,i=$y(e,["product","currency","priceCategory"]);delete i.userId;var c=null!=o?o:r,l=n.productId,s=n.name,f=n.amount,p=Vy(Vy({},i),{productId:l,quantity:f,name:s,currency:c}),y=H(p),d=u().meta,h=H(d),g=n.priceCategory,b=null!=a?a:g,v=Object(J.getProductTotals)(n).netPrice,O="NORMAL"===b?v:0,m="POINTS"===b?v:0;analytics.track("Remove Product From Wishlist",Vy(Vy({price:O,points:m},y),h))},Wy=function(){return(Wy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ky=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Jy=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=e.store,f=e.priceCategory,p=Ky(e,["callback","userId","product","currency","store","priceCategory"]),y=c.productId,d=c.name,h=null!=i?i:n,g=null!=l?l:o,b=s.storeName,v=s.storeId,O=Wy(Wy({},p),{userId:h,storeId:v,storeName:b,productId:y,productName:d,currency:g}),m=H(O),w=u().meta,j=H(w),P=Object(J.getProductTotals)(c).netPrice,I=c.priceCategory,S=null!=f?f:I;gtag("event","update_product_in_cart",Wy(Wy({send_to:r,event_callback:a,value:"NORMAL"===S?P:0,points:"POINTS"===S?P:0},m),j))},Qy=function(){return(Qy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Zy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Xy=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.store,i=e.currency,c=e.priceCategory,l=Zy(e,["product","store","currency","priceCategory"]);delete l.userId;var s=null!=i?i:n,f=o.productId,p=o.name,y=o.amount,d=a.storeName,h=a.storeId,g=Qy(Qy({},l),{storeId:h,storeName:d,amount:y,currency:s}),b=H(g),v=u().meta,O=H(v),m=Object(J.getProductTotals)(o).netPrice,w=o.priceCategory,j=null!=c?c:w,P="NORMAL"===j?m:0,I="POINTS"===j?m:0;fbq("trackSingleCustom",r,"UpdateProductInCart",Qy(Qy({content_id:f,content_name:p,content:at(o),value:P,points:I},b),O))},td=function(){return(td=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ed=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},rd=function(t,e){var r=t.currency,n=e.product,o=e.store,a=e.currency,i=e.fields,c=e.priceCategory,l=ed(e,["product","store","currency","fields","priceCategory"]);delete l.userId;var s=null!=a?a:r,f=n.productId,p=n.name,y=n.amount,d=o.storeName,h=o.storeId,g=td(td({},l),{storeId:h,storeName:d,productId:f,quantity:y,name:p,currency:s,fields:ct(i)}),b=H(g),v=u().meta,O=H(v),m=n.priceCategory,w=null!=c?c:m,j=Object(J.getProductTotals)(n).netPrice,P="NORMAL"===w?j:0,I="POINTS"===w?j:0;analytics.track("Update Product In Cart",td(td({price:P,points:I},b),O))},nd=function(){return(nd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},od=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ad=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=e.priceCategory,f=od(e,["callback","userId","product","currency","priceCategory"]),p=c.productId,y=c.name,d=null!=i?i:n,h=null!=l?l:o,g=nd(nd({},f),{userId:d,productId:p,productName:y,currency:h}),b=H(g),v=u().meta,O=H(v),m=Object(J.getProductTotals)(c).netPrice,w=c.priceCategory,j=null!=s?s:w;gtag("event","update_product_in_wishlist",nd(nd({send_to:r,event_callback:a,value:"NORMAL"===j?m:0,points:"POINTS"===j?m:0},b),O))},id=function(){return(id=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ud=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},cd=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.currency,i=e.priceCategory,c=ud(e,["product","currency","priceCategory"]);delete c.userId;var l=null!=a?a:n,s=o.productId,f=o.name,p=o.amount,y=id(id({},c),{amount:p,currency:l}),d=H(y),h=u().meta,g=H(h),b=Object(J.getProductTotals)(o).netPrice,v=o.priceCategory,O=null!=i?i:v,m="NORMAL"===O?b:0,w="POINTS"===O?b:0;fbq("trackSingleCustom",r,"UpdateProductInWishlist",id(id({content_id:s,content_name:f,content:at(o),value:m,points:w},d),g))},ld=function(){return(ld=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},sd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},fd=function(t,e){var r=t.currency,n=e.product,o=e.currency,a=e.fields,i=e.priceCategory,c=sd(e,["product","currency","fields","priceCategory"]);delete c.userId;var l=null!=o?o:r,s=n.productId,f=n.name,p=n.amount,y=ld(ld({},c),{productId:s,quantity:p,name:f,currency:l,fields:ct(a)}),d=H(y),h=u().meta,g=H(h),b=n.priceCategory,v=null!=i?i:b,O=Object(J.getProductTotals)(n).netPrice,m="NORMAL"===v?O:0,w="POINTS"===v?O:0;analytics.track("Update Product In Wishlist",ld(ld({price:m,points:w},d),g))},pd=function(){return(pd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},yd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},dd=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=yd(e,["callback","userId"]),c=null!=a?a:n,l=pd(pd({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_cart",pd(pd({send_to:r,event_callback:o},s),p))},hd=function(){return(hd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},gd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},bd=function(t,e){var r=t.trackingId,n=gd(e,[]);delete n.userId;var o=hd({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewCart",hd(hd({},a),c))},vd=function(){return(vd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Od=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},md=function(t,e){var r=e.products,n=Od(e,["products"]);delete n.userId;var o=vd({},n),a=H(o),i=u().meta,c=H(i);analytics.track("Cart Viewed",vd(vd({products:lt(r)},a),c))},wd=function(){return(wd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},jd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Pd=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.shareTarget,c=e.itemId,l=jd(e,["callback","userId","shareTarget","itemId"]),s=null!=a?a:n,f=wd(wd({},l),{userId:s}),p=H(f),y=u().meta,d=H(y);gtag("event","share",wd(wd({send_to:r,event_callback:o,method:i,content_id:c},p),d))},Id=function(){return(Id=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Sd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},xd=function(t,e){var r=t.trackingId,n=Sd(e,[]);delete n.userId;var o=Id({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"Share",Id(Id({},a),c))},kd=function(){return(kd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ad=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ed=function(t,e){var r=e.shareTarget,n=Ad(e,["shareTarget"]);delete n.userId;var o=kd(kd({},n),{shareVia:r}),a=H(o),i=u().meta,c=H(i);analytics.track("Share",kd(kd({},a),c))},_d=function(){return(_d=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Td=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Cd=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.previousStore,c=e.nextStore,l=Td(e,["callback","userId","previousStore","nextStore"]),s=i.storeId,f=i.storeName,p=c.storeId,y=c.storeName,d=null!=a?a:n,h=_d(_d({},l),{userId:d,previousStoreId:s,previousStoreName:f,nextStoreId:p,nextStoreName:y}),g=H(h),b=u().meta,v=H(b);gtag("event","change_store",_d(_d({send_to:r,event_callback:o},g),v))},Rd=function(){return(Rd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ud=function(t,e){var r=t.trackingId,n=e.previousStore,o=e.nextStore,a=Bd(e,["previousStore","nextStore"]);delete a.userId;var i=n.storeId,c=n.storeName,l=o.storeId,s=o.storeName,f=Rd(Rd({},a),{previousStoreId:i,previousStoreName:c,nextStoreId:l,nextStoreName:s}),p=H(f),y=u().meta,d=H(y);fbq("trackSingleCustom",r,"ChangeStore",Rd(Rd({},p),d))},Md=function(){return(Md=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ld=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Hd=function(t,e){var r=e.previousStore,n=e.nextStore,o=Ld(e,["previousStore","nextStore"]);delete o.userId;var a=r.storeId,i=r.storeName,c=n.storeId,l=n.storeName,s=Md(Md({},o),{previousStoreId:a,previousStoreName:i,nextStoreId:c,nextStoreName:l}),f=H(s),p=u().meta,y=H(p);analytics.track("Change Store",Md(Md({},f),y))},Nd=function(){return(Nd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Dd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Yd=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.store,c=Dd(e,["callback","userId","store"]),l=i.storeId,s=i.storeName,f=null!=a?a:n,p=Nd(Nd({},c),{userId:f,storeId:l,storeName:s}),y=H(p),d=u().meta,h=H(d);gtag("event","set_store",Nd(Nd({send_to:r,event_callback:o},y),h))},qd=function(){return(qd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Fd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},zd=function(t,e){var r=t.trackingId,n=e.store,o=Fd(e,["store"]);delete o.userId;var a=n.storeId,i=n.storeName,c=qd(qd({},o),{storeId:a,storeName:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"SetStore",qd(qd({},l),f))},Vd=function(){return(Vd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$d=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Gd=function(t,e){var r=e.store,n=$d(e,["store"]);delete n.userId;var o=r.storeId,a=r.storeName,i=Vd(Vd({},n),{storeId:o,storeName:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Set Store",Vd(Vd({},c),s))},Wd=function(){return(Wd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Kd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Jd=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Kd(e,["callback","userId"]);delete i.identify;var c=null!=a?a:n,l=Wd(Wd({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","set_user_info",Wd(Wd({send_to:r,event_callback:o},s),p))},Qd=function(){return(Qd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Zd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Xd=function(t,e){var r=t.trackingId,n=Zd(e,[]);delete n.userId,delete n.identify;var o=Qd({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SetUserInfo",Qd(Qd({},a),c))},th=function(){return(th=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},eh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},rh=function(t,e){var r=e.identify,n=eh(e,["identify"]);delete n.userId;var o=th({},n),a=H(o),i=u().meta,c=H(i);analytics.track("Set User Info",th(th({},a),c)),r&&analytics.identify(r.id,r)},nh=function(){return(nh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},oh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ah=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=oh(e,["callback","userId"]);delete i.identify;var c=null!=a?a:n,l=nh(nh({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","update_user_info",nh(nh({send_to:r,event_callback:o},s),p))},ih=function(){return(ih=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},uh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ch=function(t,e){var r=t.trackingId,n=uh(e,[]);delete n.userId,delete n.identify;var o=ih({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"UpdateUserInfo",ih(ih({},a),c))},lh=function(){return(lh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},sh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},fh=function(t,e){var r=e.fields,n=e.identify,o=sh(e,["fields","identify"]);delete o.userId;var a=lh(lh({},o),{fields:ct(r)}),i=H(a),c=u().meta,l=H(c);analytics.track("Update User Info",lh(lh({},i),l)),n&&analytics.identify(n.id,n)},ph=function(){return(ph=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},yh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},dh=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=yh(e,["callback","userId"]),c=null!=a?a:n,l=ph(ph({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","change_vendor",ph(ph({send_to:r,event_callback:o},s),p))},hh=function(){return(hh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},gh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},bh=function(t,e){var r=t.trackingId,n=gh(e,[]);delete n.userId;var o=hh({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ChangeVendor",hh(hh({},a),c))},vh=function(){return(vh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Oh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},mh=function(t,e){var r=Oh(e,[]);delete r.userId;var n=vh({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Change Vendor",vh(vh({},o),i))},wh=function(){return(wh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},jh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ph=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=jh(e,["callback","userId"]),c=null!=a?a:n,l=wh(wh({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","set_vendor",wh(wh({send_to:r,event_callback:o},s),p))},Ih=function(){return(Ih=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Sh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},xh=function(t,e){var r=t.trackingId,n=Sh(e,[]);delete n.userId;var o=Ih({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SetVendor",Ih(Ih({},a),c))},kh=function(){return(kh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ah=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Eh=function(t,e){var r=Ah(e,[]);delete r.userId;var n=kh({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Set Vendor",kh(kh({},o),i))},_h=function(){return(_h=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Th=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ch=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Th(e,["callback","userId"]),c=null!=a?a:n,l=_h(_h({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","select_workflow",_h(_h({send_to:r,event_callback:o},s),p))},Rh=function(){return(Rh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Uh=function(t,e){var r=t.trackingId,n=Bh(e,[]);delete n.userId;var o=Rh({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SelectWorkflow",Rh(Rh({},a),c))},Mh=function(){return(Mh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Lh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Hh=function(t,e){var r=Lh(e,[]);delete r.userId;var n=Mh({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Select Workflow",Mh(Mh({},o),i))},Nh=function(){return(Nh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Dh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Yh=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Dh(e,["callback","userId"]),c=null!=a?a:n,l=Nh(Nh({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","update_workflow",Nh(Nh({send_to:r,event_callback:o},s),p))},qh=function(){return(qh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Fh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},zh=function(t,e){var r=t.trackingId,n=Fh(e,[]);delete n.userId;var o=qh({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"UpdateWorkflow",qh(qh({},a),c))},Vh=function(){return(Vh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$h=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Gh=function(t,e){var r=$h(e,[]);delete r.userId;var n=Vh({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Update Workflow",Vh(Vh({},o),i))},Wh={auth:ve,banner:De,billing:vr,booking:_r,category:On,checkout:Yn,coupon:ia,credit:Ha,fulfillment:gi,geo:ou,help:gu,logCustomEvent:Wa,loyalty:oc,order:Mc,other:dl,payment:$l,product:Tf,purchase:lp,settings:wp,shipping:Xp,shoppingCart:{logAddProductToCart:ly,logAddProductToWishlist:Oy,logClearCart:Ey,logRemoveProductFromCart:function(t){rt("removeProductFromCart",t,{googleAnalyticsHandler:Cy,facebookPixelHandler:Uy,segmentHandler:Hy})},logRemoveProductFromWishlist:function(t){rt("removeProductFromWishlist",t,{googleAnalyticsHandler:Yy,facebookPixelHandler:zy,segmentHandler:Gy})},logUpdateProductInCart:function(t){rt("updateProductInCart",t,{googleAnalyticsHandler:Jy,facebookPixelHandler:Xy,segmentHandler:rd})},logUpdateProductInWishlist:function(t){rt("updateProductInWishlist",t,{googleAnalyticsHandler:ad,facebookPixelHandler:cd,segmentHandler:fd})},logViewCart:function(t){rt("viewCart",t,{googleAnalyticsHandler:dd,facebookPixelHandler:bd,segmentHandler:md})}},social:{logShare:function(t){rt("share",t,{googleAnalyticsHandler:Pd,facebookPixelHandler:xd,segmentHandler:Ed})}},store:{logChangeStore:function(t){rt("changeStore",t,{googleAnalyticsHandler:Cd,facebookPixelHandler:Ud,segmentHandler:Hd})},logSetStore:function(t){rt("setStore",t,{googleAnalyticsHandler:Yd,facebookPixelHandler:zd,segmentHandler:Gd})}},user:{logSetUserInfo:function(t){rt("setUserInfo",t,{googleAnalyticsHandler:Jd,facebookPixelHandler:Xd,segmentHandler:rh})},logUpdateUserInfo:function(t){rt("updateUserInfo",t,{googleAnalyticsHandler:ah,facebookPixelHandler:ch,segmentHandler:fh})}},vendor:{logChangeVendor:function(t){rt("changeVendor",t,{googleAnalyticsHandler:dh,facebookPixelHandler:bh,segmentHandler:mh})},logSetVendor:function(t){rt("setVendor",t,{googleAnalyticsHandler:Ph,facebookPixelHandler:xh,segmentHandler:Eh})}},workflow:{logSelectWorkflow:function(t){rt("selectWorkflow",t,{googleAnalyticsHandler:Ch,facebookPixelHandler:Uh,segmentHandler:Hh})},logUpdateWorkflow:function(t){rt("updateWorkflow",t,{googleAnalyticsHandler:Yh,facebookPixelHandler:zh,segmentHandler:Gh})}}},Kh=function(t){analytics.identify(t.id,t)}}])}));
|
|
46
|
+
e.read=function(t,e,r,n,o){var a,i,u=8*o-n-1,c=(1<<u)-1,l=c>>1,s=-7,f=r?o-1:0,p=r?-1:1,y=t[e+f];for(f+=p,a=y&(1<<-s)-1,y>>=-s,s+=u;s>0;a=256*a+t[e+f],f+=p,s-=8);for(i=a&(1<<-s)-1,a>>=-s,s+=n;s>0;i=256*i+t[e+f],f+=p,s-=8);if(0===a)a=1-l;else{if(a===c)return i?NaN:1/0*(y?-1:1);i+=Math.pow(2,n),a-=l}return(y?-1:1)*i*Math.pow(2,a-n)},e.write=function(t,e,r,n,o,a){var i,u,c,l=8*a-o-1,s=(1<<l)-1,f=s>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:a-1,d=n?1:-1,h=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,i=s):(i=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-i))<1&&(i--,c*=2),(e+=i+f>=1?p/c:p*Math.pow(2,1-f))*c>=2&&(i++,c/=2),i+f>=s?(u=0,i=s):i+f>=1?(u=(e*c-1)*Math.pow(2,o),i+=f):(u=e*Math.pow(2,f-1)*Math.pow(2,o),i=0));o>=8;t[r+y]=255&u,y+=d,u/=256,o-=8);for(i=i<<o|u,l+=o;l>0;t[r+y]=255&i,y+=d,i/=256,l-=8);t[r+y-d]|=128*h}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e){var r,n;r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=n.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},bytesToBase64:function(t){for(var e=[],n=0;n<t.length;n+=3)for(var o=t[n]<<16|t[n+1]<<8|t[n+2],a=0;a<4;a++)8*n+6*a<=8*t.length?e.push(r.charAt(o>>>6*(3-a)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],n=0,o=0;n<t.length;o=++n%4)0!=o&&e.push((r.indexOf(t.charAt(n-1))&Math.pow(2,-2*o+8)-1)<<2*o|r.indexOf(t.charAt(n))>>>6-2*o);return e}},t.exports=n},,function(t,e,r){"use strict";r.r(e),r.d(e,"initShoppingCart",(function(){return p})),r.d(e,"closeShoppingCart",(function(){return y})),r.d(e,"listenShoppingCart",(function(){return R})),r.d(e,"getShoppingCart",(function(){return C})),r.d(e,"addProduct",(function(){return st})),r.d(e,"subtractProduct",(function(){return bt})),r.d(e,"removeProduct",(function(){return wt})),r.d(e,"setProduct",(function(){return At})),r.d(e,"replaceProduct",(function(){return Tt})),r.d(e,"createShoppingCart",(function(){return Ut})),r.d(e,"emptyShoppingCart",(function(){return Ht})),r.d(e,"deleteShoppingCart",(function(){return Nt})),r.d(e,"getShoppingCartTotal",(function(){return et})),r.d(e,"getShoppingCartProducts",(function(){return rt})),r.d(e,"validateShoppingCart",(function(){return Zt})),r.d(e,"setShoppingCartAdditionalInfo",(function(){return te})),r.d(e,"getProductHash",(function(){return X})),r.d(e,"listenBenefitsWallet",(function(){return ve})),r.d(e,"applyBenefit",(function(){return je})),r.d(e,"removeBenefit",(function(){return Ee})),r.d(e,"redeemCoupon",(function(){return Me})),r.d(e,"mergeShoppingCart",(function(){return Le})),r.d(e,"checkInit",(function(){return z})),r.d(e,"findProduct",(function(){return V}));var n="YYYY-MM-DD hh:mm:ss.SSS",o="default",a=function(){return(a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},i={artisnApp:void 0,accountId:void 0,customerId:void 0,activeShoppingCart:o,maxShoppingCarts:2,wallets:{},anonymous:!1,initialized:!1};Object.freeze(i);var u=a({},i);Object.seal(u);var c=function(t){u=a(a({},u),t)},l=function(){return a({},u)},s=function(){return(s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},f=o,p=function(t,e){if(void 0===e&&(e={}),l().initialized)console.warn("initShoppingCart has been called more than once. \n This behavior will very likely result in unexpected outcomes so its \n call was skipped. Please make sure initShoppingCart is only called once");else{var r=e.shoppingCartName;c(s(s({artisnApp:t},e),{activeShoppingCart:null!=r?r:f})),"undefined"==typeof window||c({initialized:!0})}},y=function(){c(s({},i))},d=function(t,e,r){var n=e[t],o=r[t];return n>o?1:o>n?-1:0},h=function(t,e){return d("productId",t,e)},g=function(t,e){return d("questionId",t,e)},b=function(t){console.error(t)},v=function(t){var e=(null!=t?t:{}).store,r=(null!=t?t:{}).accountId,n=(null!=t?t:{}).anonymous,o=(null!=t?t:{}).customerId,a=(null!=t?t:{}).shoppingCartName,i=(null!=t?t:{}).maxShoppingCarts,u=l().accountId,c=l().customerId,s=l(),f=s.store,p=s.anonymous,y=l().activeShoppingCart,d=l().maxShoppingCarts;return{shoppingCartName:null!=a?a:y,customerId:null!=o?o:c,store:null!=e?e:f,accountId:null!=r?r:u,anonymous:null!=n?n:p,maxShoppingCarts:null!=i?i:d}},O=function(t){if(void 0===t&&(t=""),!l().artisnApp)throw new Error("Artisn app must be provided, you probably forgot to initialize the shopping cart. Please make sure initShoppingCart has been called beforehand. "+t)},m=function(t,e){void 0===e&&(e="");var r=l().accountId;if(void 0===t&&void 0===r)throw new Error("AccountId must be defined. Either provide a global accountId or at the function call level. "+e)},w=function(t,e){void 0===e&&(e="");var r=l().customerId;if(void 0===t&&void 0===r)throw new Error("CustomerId must be defined. Either provide a global customerId or at the function call level. "+e)},j=function(t,e){void 0===e&&(e="");var r=l().store;if(void 0===t&&void 0===r)throw new Error("StoreId must be defined. Either provide a global storeId or at the function call level. "+e)},P=function(t){void 0===t&&(t={});var e=t.accountId,r=t.customerId;m(e),w(r)},I=function(t,e,r){var n=(null!=r?r:{}).benefitId,o=t[e],a=null==o?void 0:o.benefits;if(S(n),!o||!a)return"No benefits wallet available for "+e+", you probably forgot to call listenBenefitsWallet beforehand."},S=function(t){if(void 0===t)throw new Error("BenefitId must be defined. Provide it at the function call level.")},x=function(t){var e=null!=t?t:{},r=e.Platform,n=e.account;!function(t,e){void 0===e&&(e="");var r=l().artisnApp.settings.platform;if(void 0===t&&void 0===r)throw new Error("Platform must be defined. Either provide a global Plafform in the artisn object or at the function call level. "+e)}(r),m(n)},k=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},A=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},E=o,_=function(t){return void 0===t&&(t={}),k(void 0,void 0,void 0,(function(){var e,r,n,o,a,i,u,c,s,f,p;return A(this,(function(y){switch(y.label){case 0:return e=l(),r=e.artisnApp,n=e.accountId,o=l().customerId,a=l().anonymous,i=t.accountId,u=t.customerId,O(),P(t),c=a?"anonymousShoppingCartByUser":"shoppingCartByUser",s=null==r?void 0:r.__internals__.firestore(),[4,null===(p=null===(f=null==s?void 0:s.collection(c))||void 0===f?void 0:f.doc(String(null!=u?u:o)))||void 0===p?void 0:p.collection(String(null!=i?i:n))];case 1:return[2,y.sent()]}}))}))},T=function(t){return k(void 0,void 0,void 0,(function(){var e,r;return A(this,(function(n){switch(n.label){case 0:return e=v(t).shoppingCartName,[4,_(t)];case 1:return(r=n.sent())&&z()?[4,r.where("name","==",e).get().then((function(t){return t.docs[0]}))]:[2,void 0];case 2:return[2,n.sent()]}}))}))},C=function(t){return k(void 0,void 0,void 0,(function(){var e,r;return A(this,(function(n){switch(n.label){case 0:return e=v(t).shoppingCartName,[4,T(t)];case 1:return(r=n.sent())&&z()?(c({activeShoppingCart:e}),[2,r.data()]):[2]}}))}))},R=function(t,e){return void 0===e&&(e={}),k(void 0,void 0,void 0,(function(){var r,n,o;return A(this,(function(a){switch(a.label){case 0:return r=v(e),n=r.shoppingCartName,[4,_(e)];case 1:return(o=a.sent())&&z()?(c({activeShoppingCart:n}),[2,o.where("name","==",n).onSnapshot((function(e){return k(void 0,void 0,void 0,(function(){var r;return A(this,(function(o){switch(o.label){case 0:return e.docs[0]?[4,e.docs[0].data()]:(n!==E&&console.warn("Failed to fetch a shopping cart with name "+n+" because there wasn't any."),[2,t(void 0)]);case 1:return r=o.sent(),[2,t(r)]}}))}))}))]):[2,function(){}]}}))}))},B=r(1),U=r.n(B),M=r(0),L=function(){return(L=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},H=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},N=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},D=o,Y=function(t){return void 0===t&&(t=D),H(void 0,void 0,void 0,(function(){var e;return N(this,(function(r){switch(r.label){case 0:return[4,T({shoppingCartName:t})];case 1:return[2,null==(e=r.sent())?void 0:e.id]}}))}))},q=function(t){if(void 0!==t)return"number"==typeof t?t:t.storeId},F=function(t,e){var r=q(t);return L("number"!=typeof t?L({},t):{},e[r])},z=function(){return l().initialized},V=function(t){return H(void 0,void 0,void 0,(function(){var e,r,n,o,a,i,u,c,l;return N(this,(function(s){switch(s.label){case 0:e=t.shoppingCartName,r=t.accountId,n=t.customerId,o=t.hash,a=t.productId,i=t.store,s.label=1;case 1:if(s.trys.push([1,3,,4]),!o&&void 0===a)throw new Error("You must provide either a product id or a product hash,\n but none were given.");return[4,C({accountId:r,customerId:n,store:i,shoppingCartName:e})];case 2:return(u=s.sent())?(c=rt(u),[2,o?c.find((function(t){return t.hash===o})):c.find((function(t){return t.productId===a}))]):[2];case 3:return l=s.sent(),console.error(l),[2,void 0];case 4:return[2]}}))}))},$=function(t){var e=t.store,r=t.amount,n=q(e);j(n),function(t){if("number"!=typeof t)throw new Error("Invalid amount recieved, please make sure you include a valid amount.");if(t<0)throw new Error("Cannot receive a negative amount of an item. Please ensure you have added a proper amount of items.");if(0===t)throw new Error("Attempting to pass 0 amount. This might indicate a problem with your code. Please ensure you have added a proper amount of items.")}(r)},G=r(3),W=r.n(G),K=function(){return(K=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},J=function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},Q=M.transformers.toCartProduct,Z=M.modifierUtils.divideProductQA,X=function(t){var e=Z(t),r=e.productId,n=e.questionsAndAnswers,o=e.priceCategory,a=r+"-"+tt(n).sort(g).reduce((function(t,e){var r=e.answers.sort(h).reduce((function(t,e,r){var n=e.productId,o=e.amount,a=X(e),i=a?"{"+a+"}":"";return 0===r?n+"="+o+i:t+"|"+n+"="+o+i}),""),n=e.questionId+":"+r;return""===t?""+n:t+"-"+n}),"")+"*"+o;return W()(a)},tt=function(t){return t.reduce((function(t,e){var r=e.answers.filter((function(t){return t.amount>0})).map((function(t){var e=tt(t.questionsAndAnswers);return K(K({},t),{questionsAndAnswers:e})}));return J(J([],t),[K(K({},e),{answers:r})])}),[]).filter((function(t){return t.answers.length>0}))},et=function(t,e){void 0===e&&(e={});var r=rt(t).reduce((function(t,e){var r=Q(e),n=r.priceCategory,o=Object(M.getProductTotals)(r),a="POINTS"===n,i=a?o.netPrice:0,u=a?0:o.netPrice,c=a?0:o.grossPrice;return{subtotal:t.subtotal+c,totalDiscounts:t.totalDiscounts+o.totalDiscounts,totalTaxes:t.totalTaxes+o.totalTaxes,totalPoints:t.totalPoints+i,total:t.total+u}}),{subtotal:0,totalDiscounts:0,totalTaxes:0,totalPoints:0,total:0}),n=nt(null==t?void 0:t.additional_info,null==t?void 0:t.benefits,r),o=e.shippingCost,a=void 0===o?t.shippingCost:o;if(!a)return n;var i=a.grossPrice,u=a.netPrice,c=a.taxTotal,l=a.discountTotal;return{subtotal:n.subtotal+i,totalDiscounts:n.totalDiscounts+l,totalTaxes:n.totalTaxes+c,shippingCost:u,totalPoints:n.totalPoints,total:n.total+u}},rt=function(t,e){return(void 0===e?Object.values(t.stores):[t.stores[e]]).reduce((function(t,e){if(!e)return t;var r=Object.values(e.products);return J(J([],t),r)}),[])},nt=function(t,e,r){return e?Object.values(e).reduce((function(e,r){return"DISCOUNT"===r.type?ot(r,e,t):e}),r):r},ot=function(t,e,r){var n=e.subtotal,o=e.total,a=e.totalDiscounts,i=.01*t.discountPercentage;if(void 0!==(null==r?void 0:r.copayment)){var u=null==r?void 0:r.copayment,c=u*i,l=a+c,s=(u-c).toFixed(4);return K(K({},e),{totalDiscounts:l,total:Number(s)})}var f=n*i,p=a+f,y=o-f;return K(K({},e),{totalDiscounts:p,total:y})},at=function(){return(at=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},it=n,ut=M.transformers.toCartProduct,ct=M.modifierUtils.multiplyProductQA,lt=M.modifierUtils.divideProductQA,st=function(t,e){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(a){switch(a.label){case 0:return $(e),[4,T(e)];case 1:return(r=a.sent())?[4,r.data()]:(console.warn("Cannot add a product because no shopping cart nodes found. Please ensure you have a shopping cart before continue."),[2]);case 2:return n=a.sent(),o=ft(n,t,e),[4,r.ref.set(o)];case 3:return a.sent(),[2]}}))}))},ft=function(t,e,r){var n=e.amount||1,o=ut(e,at(at({},r),{amount:null!=n?n:1})),a=ut(e,r),i=l().store,u=r.store,c=null!=u?u:i,s=q(c),f=X(o),p=at({},t),y=at({},t.stores),d=F(c,y),h=at({},d.products),g=h[f],b=U()().format(it);g?(h[f]=lt(h[f]),h[f].amount+=a.amount):(h[f]=a,h[f].hash=f,h[f].createdAt=b),h[f].updatedAt=b;var v=h[f],O=(v=ct(v)).questionsAndAnswers,m=tt(O);return h[f]=at(at({},v),{questionsAndAnswers:m}),d.products=h,y[s]=d,p.stores=y,p},pt=function(){return(pt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},yt=n,dt=M.transformers.toCartProduct,ht=M.modifierUtils.multiplyProductQA,gt=M.modifierUtils.divideProductQA,bt=function(t,e){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(a){switch(a.label){case 0:return $(e),[4,T(e)];case 1:return(r=a.sent())?[4,r.data()]:(console.warn("Cannot subtract product because no shopping cart nodes found. Please ensure you have a shopping cart before continue."),[2]);case 2:return n=a.sent(),o=vt(n,t,e),[4,r.ref.set(o)];case 3:return a.sent(),[2]}}))}))},vt=function(t,e,r){var n=e.amount||1,o=dt(e,pt(pt({},r),{amount:null!=n?n:1})),a=dt(e,r),i=l().store,u=r.store,c=null!=u?u:i,s=q(c),f=X(o),p=pt({},t),y=pt({},t.stores);if(void 0===y[s])return console.warn("StoreId given is invalid. There is no store with id "+s+" on the shopping cart."),t;var d=F(c,y),h=pt({},d.products),g=h[f],b=U()().format(yt);if(!g)return console.warn("Attempting to subtract the amount of product that is not in the given shopping cart store."),t;h[f]=gt(h[f]);var v=h[f].amount-a.amount;return v>0?(h[f].amount=v,h[f].updatedAt=b,h[f]=ht(h[f])):delete h[f],d.products=h,Object.keys(d.products).length?y[s]=d:delete y[s],p.stores=y,p},Ot=function(){return(Ot=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},mt=M.transformers.toCartProduct,wt=function(t,e){return void 0===e&&(e={}),function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(a){switch(a.label){case 0:return function(t){var e=t.store,r=q(e);j(r)}(e),[4,T(e)];case 1:return(r=a.sent())?[4,r.data()]:(console.warn("Cannot remove a product because no shopping cart nodes found. Please ensure you have a shopping cart before continue."),[2]);case 2:return n=a.sent(),o=jt(n,t,e),[4,r.ref.set(o)];case 3:return a.sent(),[2]}}))}))},jt=function(t,e,r){var n=e.hash;if(!n){var o=mt(e);n=X(o)}var a=l().store,i=r.store,u=null!=i?i:a,c=q(u),s=Ot({},t),f=Ot({},t.stores);if(void 0===f[c])return console.warn("StoreId given is invalid. There is no store with id "+c+" on the shopping cart."),t;var p=F(u,f),y=Ot({},p.products);return y[n]?(delete y[n],p.products=y,Object.keys(p.products).length?f[c]=p:delete f[c],s.stores=f,s):(console.warn("Attempting to remove product that is not in the given shopping cart store."),t)},Pt=function(){return(Pt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},It=n,St=M.transformers.toCartProduct,xt=M.modifierUtils.multiplyProductQA,kt=M.modifierUtils.divideProductQA,At=function(t,e){return void 0===e&&(e={}),function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o,a,i,u,c,l;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(s){switch(s.label){case 0:return r=null!==(l=null!==(u=e.amount)&&void 0!==u?u:null===(c=t)||void 0===c?void 0:c.amount)&&void 0!==l?l:1,n=Pt(Pt({},e),{amount:r}),$(n),[4,T(e)];case 1:return(o=s.sent())?[4,o.data()]:(console.warn("Cannot set product because no shopping cart nodes found. Please ensure you have a shopping cart before continue."),[2]);case 2:return a=s.sent(),i=Et(a,t,n),[4,o.ref.set(i)];case 3:return s.sent(),[2]}}))}))},Et=function(t,e,r){var n,o,a=null!==(o=null===(n=e)||void 0===n?void 0:n.amount)&&void 0!==o?o:1,i=St(e,Pt(Pt({},r),{amount:a})),u=l().store,c=r.store,s=null!=c?c:u,f=q(s),p=X(i),y=Pt({},t),d=Pt({},t.stores),h=F(s,d),g=Pt({},h.products),b=g[p],v=U()().format(It);g[p]=i,b?g[p]=kt(g[p]):(g[p].createdAt=v,g[p].hash=p),g[p].updatedAt=v;var O=St(g[p],r),m=(O=xt(O)).questionsAndAnswers,w=tt(m);return g[p]=Pt(Pt({},O),{questionsAndAnswers:w}),h.products=g,d[f]=h,y.stores=d,y},_t=function(){return(_t=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Tt=function(t,e){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(a){switch(a.label){case 0:return function(t){var e=t.store,r=q(e);j(r)}(e),[4,T(e)];case 1:return(r=a.sent())?[4,r.data()]:(console.warn("Cannot replace product because no shopping cart nodes found. Please ensure you have a shopping cart before continue."),[2]);case 2:return n=a.sent(),o=Ct(n,t,e),[4,r.ref.set(o)];case 3:return a.sent(),[2]}}))}))},Ct=function(t,e,r){var n=r.hash,o=null!=n?n:e.hash,a=l().store,i=r.store,u=null!=i?i:a,c=q(u),s=_t({},t.stores),f=F(u,s),p=_t({},f.products);if(!p[o])return console.warn("Cannot replace a product because no product was found in the given store"),t;delete p[o],f.products=p,Object.keys(f.products).length?s[c]=f:delete s[c];var y=_t({},t);y.stores=s;var d=_t(_t({},e),{amount:0});return ft(y,d,r)},Rt=function(){return(Rt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bt=o,Ut=function(t,e){return void 0===t&&(t={}),function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o,a,i,u,c,s;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(f){switch(f.label){case 0:return r=v(e),[4,_(r)];case 1:return n=f.sent(),o=Mt(t),n?(a=o.name,[4,n.get()]):(console.warn("Couldn't find a shopping cart collection with the given config. \n Please make sure everything is correct in your configuration \n before continue."),[2]);case 2:if(i=null===(s=f.sent())||void 0===s?void 0:s.docs.length,u=l().maxShoppingCarts,i>=u)throw new Error("Cannot add more carts. Carts limit ("+u+") reached.");return[4,n.where("name","==",a).get()];case 3:if(f.sent().docs.length>0)throw new Error("Attempted to add a shopping cart with the name "+a+", but there is already one shopping cart with that name.");return[4,n.add(o)];case 4:return(c=f.sent())?[4,c.set(Rt(Rt({},o),{id:c.id}))]:(console.error("Failed to create a new shopping cart"),[2]);case 5:return f.sent(),[2]}}))}))},Mt=function(t){void 0===t&&(t={});var e=(new Date).toISOString();return Rt({id:"",name:Bt,latitude:-1,longitude:-1,createdAt:e,updatedAt:e,channelId:1,stores:{},billTotal:{},shippingCost:null},t)},Lt=function(){return(Lt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ht=function(t){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var e,r,n,o;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(a){switch(a.label){case 0:return[4,T(t)];case 1:return e=a.sent(),r=v(t).shoppingCartName,e?[4,e.data()]:(console.warn("Cannot empty cart, shopping cart nodes not found. Please ensure you have a shopping cart with name "+r+" before continue."),[2]);case 2:return n=a.sent(),o=Lt(Lt({},n),{stores:{}}),[4,e.ref.set(o)];case 3:return a.sent(),[2]}}))}))},Nt=function(t){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var e,r;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(n){switch(n.label){case 0:return[4,T(t)];case 1:return e=n.sent(),r=v(t).shoppingCartName,e?[4,e.ref.delete()]:(console.warn("Couldn't find any shopping cart with name "+r+" with the given config."),[2]);case 2:return n.sent(),[2]}}))}))},Dt=r(4),Yt={"Content-Type":"application/json"},qt=function(){return(qt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ft=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},zt=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Vt=function(t){return Ft(void 0,void 0,void 0,(function(){var e,r,n,o,a,i,u,c,s,f,p,y,d,h,g,b,v,O,m;return zt(this,(function(w){switch(w.label){case 0:return e=l(),r=e.artisnApp,n=e.accountId,o=r.settings,a=o.platform,i=o.accountId,u=null!==(g=null!==(h=null!==(d=null===(y=t.account)||void 0===y?void 0:y.toString())&&void 0!==d?d:null==n?void 0:n.toString())&&void 0!==h?h:null==i?void 0:i.toString())&&void 0!==g?g:"",c=null!==(v=null!==(b=null==t?void 0:t.Platform)&&void 0!==b?b:a)&&void 0!==v?v:"",s=c,null===(O=null==t?void 0:t.Authorization)||void 0===O?[3,1]:(p=O,[3,3]);case 1:return[4,$t()];case 2:p=w.sent(),w.label=3;case 3:return f=null!==(m=p)&&void 0!==m?m:"",[2,new Headers(qt(qt(qt({},Yt),t),{Authorization:f,Platform:s,account:u}))]}}))}))},$t=function(t){return Ft(void 0,void 0,void 0,(function(){var e,r,n;return zt(this,(function(o){switch(o.label){case 0:return(e=l().artisnApp)?[4,null===(n=Object(Dt.initAuth)(e).currentUser)||void 0===n?void 0:n.getIdToken(t)]:[2];case 1:return(r=o.sent())?[2,"Bearer "+r]:(b("Please make sure you are authenticated before trying to call a restricted action."),[2])}}))}))},Gt=function(){return(Gt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Wt=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},Kt=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Jt=function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},Qt=function(t,e){return Wt(void 0,void 0,void 0,(function(){var r,n,o,a,i,u,c,s,f,p;return Kt(this,(function(y){switch(y.label){case 0:return r=l().artisnApp.apiURL,n=t.id,o=t.latitude,a=t.longitude,[4,Vt(Gt({},e))];case 1:i=y.sent(),y.label=2;case 2:return y.trys.push([2,4,,5]),[4,fetch(r+"/api/shopping-cart/"+n+"/validateShoppingCart?latitude="+o+"&longitude="+a,{headers:i}).then((function(t){return Wt(void 0,void 0,void 0,(function(){return Kt(this,(function(e){switch(e.label){case 0:return[4,t.json()];case 1:return[2,e.sent()]}}))}))}))];case 3:if(u=y.sent(),!(c=u.data))throw new Error("No shopping cart was found.");return s=Object.values(c.stores).reduce((function(t,e){return e.alerts.length?Jt(Jt([],t),e.alerts):t}),[]),f=Object.values(c.stores).some((function(t){return!!t.alerts.length||Object.values(t.products).some((function(t){return t.alerts.length}))})),[2,{stores:s,products:f}];case 4:return p=y.sent(),console.error(p.message),[2,{stores:[{errorLevel:1,message:"Occurrió un error desconocido, comuníquese con soporte",type:""}],products:!1}];case 5:return[2]}}))}))},Zt=function(t,e,r){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var n,o,a,i;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(u){switch(u.label){case 0:return function(t,e){!function(t,e){void 0===e&&(e="");var r=l().artisnApp.apiURL;if(void 0===t&&void 0===r)throw new Error("ApiURL must be defined. Either provide a global ApiURL or at the function call level. "+e)}(t.apiURL),x(e)}(t,e),n=null!=r?r:l().activeShoppingCart,[4,Y(n)];case 1:return void 0===(o=u.sent())?(console.error("Cannot use undefined as a shopping cart id. Shopping cart "+n+" was not found. Validation canceled."),[2]):(a=t.latitude,i=t.longitude,[4,Qt({id:o,latitude:a,longitude:i},e)]);case 2:return[2,u.sent()]}}))}))},Xt=function(){return(Xt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},te=function(t,e){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o,a;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(i){switch(i.label){case 0:return[4,T({shoppingCartName:e})];case 1:return(r=i.sent())?[4,r.data()]:(n=null!=e?e:l().activeShoppingCart,console.warn("Cannot set additional info because no shopping cart was found. Please ensure you create a shopping cart with name "+n+" before continue."),[2]);case 2:return o=i.sent(),a=ee(o,t),[4,r.ref.set(a)];case 3:return i.sent(),[2]}}))}))},ee=function(t,e){return Xt(Xt({},t),{additional_info:e(t.additional_info)})},re=function(){return(re=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ne=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},oe=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},ae=function(t){return void 0===t&&(t={}),re({benefits:[]},t)},ie=function(t,e){var r,n=l().wallets,o=re(re({},n),((r={})[t]=re({},e),r));c({wallets:o})},ue=function(t){return void 0===t&&(t={}),ne(void 0,void 0,void 0,(function(){var e,r,n,o,a,i,u,c,s;return oe(this,(function(f){switch(f.label){case 0:return e=l(),r=e.artisnApp,n=e.customerId,o=e.accountId,a=t.accountId,i=t.customerId,O(),P(t),u=null==r?void 0:r.__internals__.firestore(),[4,null===(s=null===(c=null==u?void 0:u.collection("benefitsByUser"))||void 0===c?void 0:c.doc(String(null!=i?i:n)))||void 0===s?void 0:s.collection(String(null!=a?a:o))];case 1:return[2,f.sent()]}}))}))},ce=function(t){return ne(void 0,void 0,void 0,(function(){var e;return oe(this,(function(r){switch(r.label){case 0:return[4,ue(t)];case 1:return(e=r.sent())?[4,e.get().then((function(t){return t.docs[0]}))]:[2];case 2:return[2,r.sent()]}}))}))},le=function(t){return ne(void 0,void 0,void 0,(function(){var e,r;return oe(this,(function(n){switch(n.label){case 0:return[4,ce(t)];case 1:return(e=n.sent())?0===Object.keys(e.data()).length?[2,[]]:(r=e.id,[2,Object.values(e.data()).map((function(t){return re(re({},t),{hash:r})}))]):[2]}}))}))},se=function(){return(se=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},fe=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},pe=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},ye=function(t,e){return fe(void 0,void 0,void 0,(function(){var r,n,o,a,i;return pe(this,(function(u){switch(u.label){case 0:return r=l().artisnApp.apiURL,n=t.vendorId,o=t.customerId,[4,Vt(se(se({},e),{uid:o.toString()}))];case 1:return a=u.sent(),i="/api/shopping-cart/retrieveBenefits",n&&(i=i+"?vendorId="+n),[4,fetch(""+r+i,{headers:a}).then((function(t){return fe(void 0,void 0,void 0,(function(){return pe(this,(function(e){switch(e.label){case 0:return[4,t.json()];case 1:return[2,e.sent()]}}))}))}))];case 2:if(!u.sent())throw new Error("The benefits wallet is not defined. Make sure coupons are well configured");return[2]}}))}))},de=function(t,e,r){return fe(void 0,void 0,void 0,(function(){var n,o,a,i,u,c;return pe(this,(function(s){switch(s.label){case 0:return n=l().artisnApp.apiURL,o=t.customerId,[4,Vt(se(se({},r),{uid:o.toString()}))];case 1:a=s.sent(),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,fetch(n+"/api/wallet_profit/apply",{method:"post",body:JSON.stringify({code:e}),headers:a}).then((function(t){return fe(void 0,void 0,void 0,(function(){return pe(this,(function(e){switch(e.label){case 0:return[4,t.json()];case 1:return[2,e.sent()]}}))}))}))];case 3:if(i=s.sent(),200===(u=i).code)return[2,!0];if(null===u.data||!u.data)throw new Error(u.message);return b("Unhandled response when redeeming coupon "+JSON.stringify(u,void 0,2)),[2,!1];case 4:throw c=s.sent(),new Error("Failed to redeem coupon "+e+". "+c.message);case 5:return[2]}}))}))},he=function(){return(he=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ge=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},be=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},ve=function(t,e,r){!function(t){var e=(null!=t?t:{}).customerId;w(e)}(e),x(r);var n=(null!=e?e:{}).shoppingCartName,o=(null!=e?e:{}).customerId,a=l().customerId,i=l(),u=i.activeShoppingCart,c=i.wallets,s=null!=n?n:u,f=c[s],p=null!=o?o:a;if(f)return b("There is already a listener for wallet of name "+s+". Either unsubscribe to the other listener or create a new listener for a different cart"),function(){return Oe(s)};var y=ae();ie(s,he(he({},y),{onSnapshot:t}));var d=void 0;return ge(void 0,void 0,void 0,(function(){var n,o;return be(this,(function(a){switch(a.label){case 0:n=he(he({},e),{customerId:p}),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,ye(n,r)];case 2:return a.sent(),[3,4];case 3:return a.sent(),console.error("Failed to retrieve the user's wallet"),[2];case 4:return[4,ue(e)];case 5:return(o=a.sent())?(d=o.onSnapshot((function(e){return ge(void 0,void 0,void 0,(function(){var r,n,o,a,i,u,c;return be(this,(function(l){return r=null!==(c=null===(u=e.docs[0])||void 0===u?void 0:u.data())&&void 0!==c?c:{},0===Object.keys(r).length?(n=ae(),ie(s,he(he({},n),{onSnapshot:t})),t(n),[2]):(o=e.docs[0].id,a=function(t,e){return Object.values(t).map((function(t){return re(re({},t),{hash:e})}))}(r,o),i=ae({benefits:a}),ie(s,he(he({},i),{onSnapshot:t})),t(i),[2])}))}))})),[2]):(console.error("Failed to retrieve the benefits wallet node"),[2])}}))})),function(){return Oe(s,d)}},Oe=function(t,e){var r=l().wallets,n=he({},r);delete n[t],c({wallets:n}),e&&e()},me=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},we=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},je=function(t){return me(void 0,void 0,void 0,(function(){var e,r,n,o,a,i,u,c,s,f;return we(this,(function(p){if(P(t),e=t.benefitId,r=t.shoppingCartName,n=l(),o=n.activeShoppingCart,a=n.wallets,u=I(a,i=null!=r?r:o,t))return b(u),[2];if(c=a[i],s=c.benefits,!(f=s.find((function(t){return t.benefitId===e}))))return b("No benefit was found in the benefits wallet with the benefitId provided."),[2];switch(f.type){case"PRODUCT":return[2,Pe(t,f)];case"ALTER_DELIVERY":return[2,Ie(t,f)];default:b("The benefit to be applied is not of type PRODUCT or ALTER_DELIVERY.")}return[2]}))}))},Pe=function(t,e){return me(void 0,void 0,void 0,(function(){var r,n,o;return we(this,(function(a){switch(a.label){case 0:return r=t.product,n=t.productConfig,o=e.benefitId,r&&n?(r.benefitId=o,[4,Se(t,e)]):(b("The product or the product configuration has not been provided to apply the selected benefit."),[2]);case 1:return a.sent(),[4,st(r,n)];case 2:return a.sent(),[2]}}))}))},Ie=function(t,e){return me(void 0,void 0,void 0,(function(){var r,n,o,a,i,u,c,l,s,f;return we(this,(function(p){switch(p.label){case 0:return r=t.shippingCost,n=t.latitude,o=t.longitude,r&&n&&o?(a=e.benefitWalletId,i=e.award,Array.isArray(i)&&i.length?(u=i[0],c=u.benefitId,l=u.discountPercentage,s=r.subtotalBeforeTaxes,(f=[]).push({benefitWalletId:a,benefitId:c,discountBase:s,percentage:l,priceCategory:"NORMAL",value:s*(l/100)}),r.discounts=f,[4,Se(t,e,r)]):(b("The award array associated with the benefit is empty."),[2])):(b("The shippingCost, latitude and longitude are required to apply the selected benefit."),[2]);case 1:return p.sent(),[4,Zt({latitude:n,longitude:o})];case 2:return p.sent(),[2]}}))}))},Se=function(t,e,r){return me(void 0,void 0,void 0,(function(){var n,o,a,i,u;return we(this,(function(c){switch(c.label){case 0:return n=t.customerId,o=t.shoppingCartName,[4,T({customerId:n,shoppingCartName:o})];case 1:return(a=c.sent())?[4,a.data()]:(console.warn("Cannot add benefit because no shopping cart nodes were found. Please ensure you have a shopping cart before continue."),[2]);case 2:return i=c.sent(),u=xe(i,e,r),[4,a.ref.set(u)];case 3:return c.sent(),[2]}}))}))},xe=function(t,e,r){var n=e.hash,o=t.benefits,a=null!=o?o:[];return a.push(e),t.benefits=a,t.benefitsHash=n,r&&(t.shippingCost=r),t},ke=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},Ae=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Ee=function(t){return ke(void 0,void 0,void 0,(function(){var e,r,n,o,a,i,u,c,s,f;return Ae(this,(function(p){if(P(t),e=t.benefitId,r=t.shoppingCartName,n=l(),o=n.activeShoppingCart,a=n.wallets,u=I(a,i=null!=r?r:o,t))return b(u),[2];if(c=a[i],s=c.benefits,!(f=s.find((function(t){return t.benefitId===e}))))return b("No benefit was found in the benefits wallet with the benefitId provided."),[2];switch(f.type){case"PRODUCT":return[2,_e(t,f)];case"ALTER_DELIVERY":return[2,Te(t,f)];default:b("The benefit to be removed is not of type PRODUCT or ALTER_DELIVERY.")}return[2]}))}))},_e=function(t,e){return ke(void 0,void 0,void 0,(function(){var r,n,o,a;return Ae(this,(function(i){switch(i.label){case 0:return n=(r=null!=t?t:{}).product,o=r.productConfig,a=(null!=o?o:{}).store,n&&a?[4,Ce(t,e)]:(b("The cart product and the store, inside benefitProductConfig object, are required to remove the selected benefit."),[2]);case 1:return i.sent(),[4,wt(n,o)];case 2:return i.sent(),[2]}}))}))},Te=function(t,e){return ke(void 0,void 0,void 0,(function(){var r;return Ae(this,(function(n){return(r=t.shippingCost)?[2,Ce(t,e,r)]:(b("The shippingCost is require to remove the selected benefit."),[2])}))}))},Ce=function(t,e,r){return ke(void 0,void 0,void 0,(function(){var n,o,a,i,u;return Ae(this,(function(c){switch(c.label){case 0:return n=t.customerId,o=t.shoppingCartName,[4,T({customerId:n,shoppingCartName:o})];case 1:return(a=c.sent())?[4,a.data()]:(console.warn("Cannot remove benefit because no shopping cart nodes were found. Please ensure you have a shopping cart before continue."),[2]);case 2:return i=c.sent(),u=Re(i,e,r),[4,a.ref.set(u)];case 3:return c.sent(),[2]}}))}))},Re=function(t,e,r){var n=t.benefits,o=e.benefitId;if(!n)return console.warn("Cannot remove benefit because the shopping cart does not have benefits applied."),t;var a=n.findIndex((function(t){return t.benefitId===o}));return a<0?(console.warn("This benefit cannot be removed because it is not applied to the shopping cart."),t):(n.splice(a,1),t.benefitsHash=void 0,r&&(t.shippingCost=r),t)},Be=function(){return(Be=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ue=function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},Me=function(t,e,r){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var n,o,a,i,u,s,f,p,y,d,h,g,v,O,m;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(w){switch(w.label){case 0:return n=l().customerId,P(t),x(r),o=t.customerId,a=t.shoppingCartName,i=l(),u=i.activeShoppingCart,s=i.wallets,(p=s[f=null!=a?a:u])||b("No benefits wallet available for "+f+", you probably forgot to call listenBenefitsWallet beforehand."),y=null!=o?o:n,d=Be(Be({},t),{customerId:y}),[4,de(d,e,r)];case 1:return w.sent(),[4,ye(d,r)];case 2:return w.sent(),[4,le()];case 3:if(!(h=w.sent()))throw new Error("Failed to fetch benefits from firestore for the current customer after redeeming coupon");return g=ae({benefits:h}),v={benefits:Ue([],g.benefits),onSnapshot:p.onSnapshot},O=Be(Be({},s),((m={})[f]=v,m)),c({wallets:O}),p.onSnapshot(g),[2]}}))}))},Le=function(t,e){return function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))}(void 0,void 0,void 0,(function(){var r,n,o,a;return function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(i){switch(i.label){case 0:return[4,T(e)];case 1:return(r=i.sent())?[4,r.data()]:(console.warn("Cannot merge the shopping carts because no shopping cart nodes were found. Please ensure you have a shopping cart before continue."),[2]);case 2:return n=i.sent(),o=Object.values(t.stores),a=Object.keys(t.stores),o.forEach((function(t,e){var r=Object.values(t.products),o=t.storeId;r.forEach((function(r){var i=r.amount;n=ft(n,r,{store:o?t:+a[e],amount:i})}))})),[4,r.ref.set(n)];case 3:return i.sent(),[2]}}))}))}}])},function(t,e,r){t.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([,function(t,e,r){"use strict";r.r(e),r.d(e,"checkInit",(function(){return c})),r.d(e,"getState",(function(){return u})),r.d(e,"initState",(function(){return a})),r.d(e,"setState",(function(){return i}));var n=function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=null,a=function(t){Object.freeze(t),o=n({},t),Object.seal(o)},i=function(t){var e=o?n({},o):{};o=null,o=n(n({},e),t),Object.seal(o)},u=function(){if(null===o)throw new Error("The state has not been initialized, make sure to call initState beforehand");return n({},o)},c=function(){return!!o}}])},function(t){t.exports=JSON.parse('{"name":"@artisan-commerce/analytics-web","description":"Artisn commerce analytics web library","version":"0.2.0-canary.27","main":"./build/main.bundle.js","types":"./build/src/index.d.ts","files":["build/","LICENSE","README.md"],"scripts":{"compile":"webpack --config webpack.dev.js","dev":"yarn compile","build":"webpack --config webpack.prod.js","compile:build":"nodemon ./build/main.bundle.js","test":"jest --watchAll --runInBand","test:all":"yarn test --watchAll=false --coverage","test:ci":"cross-env CI=true jest --runInBand","test:staged":"yarn test:ci --findRelatedTests ./src","check-types":"tsc --noEmit","lint":"eslint --ignore-path .gitignore --ignore-pattern !cypress/.eslintrc.js --ext .js,jsx,.ts,.tsx .","lint:staged":"yarn lint --max-warnings=0","prettier":"prettier --ignore-path .gitignore \\"**/*.+(js|jsx|ts|tsx|json|css|scss|html)\\"","format":"yarn prettier --write","check-format":"yarn prettier --list-different","validate":"cross-env CI=true npm-run-all --parallel test:ci check-types check-format lint build","validate:ci":"npm-run-all --parallel check-types check-format lint"},"author":"Luis Eduardo Andrade","license":"MIT","dependencies":{"@artisan-commerce/state":"0.3.0-canary.1","snake-case":"^3.0.4"},"devDependencies":{"@artisan-commerce/products":"0.9.0-canary.20","@artisan-commerce/shopping-cart":"0.12.0-canary.26","@artisan-commerce/types":"0.14.0-canary.16","@babel/core":"^7.10.5","@babel/preset-env":"^7.10.4","@babel/preset-react":"^7.10.4","@types/faker":"^4.1.12","@types/jest":"^26.0.5","@types/jest-in-case":"^1.0.2","@types/node":"^14.0.24","@typescript-eslint/eslint-plugin":"^4.15.2","@typescript-eslint/parser":"^4.15.2","avn":"^0.2.4","avn-nvm":"^0.2.2","clean-webpack-plugin":"^3.0.0","dotenv-webpack":"^2.0.0","env-cmd":"^10.1.0","eslint":"^7.5.0","eslint-config-prettier":"^6.11.0","eslint-config-react-app":"^5.2.1","eslint-config-universe":"^4.0.0","eslint-plugin-cypress":"^2.11.1","eslint-plugin-flowtype":"^5.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-jsx-a11y":"^6.3.1","eslint-plugin-react":"^7.20.3","eslint-plugin-react-hooks":"^4.0.8","is-ci-cli":"^2.1.2","jest-axe":"^3.5.0","jest-extended":"^0.11.5","jest-in-case":"^1.0.2","jest-styled-components":"^7.0.2","nodemon":"^2.0.4","npm-run-all":"^4.1.5","prettier":"^2.0.5","start-server-and-test":"^1.11.2","test-data-bot":"^0.8.0","ts-jest":"^26.1.4","ts-loader":"^8.0.2","webpack":"^4.43.0","webpack-bundle-analyzer":"^4.4.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.0","webpack-merge":"^5.0.9"},"peerDependencies":{"@artisan-commerce/products":"*","@artisan-commerce/shopping-cart":"*"}}')},,function(t,e,r){"use strict";r.r(e),r.d(e,"initAnalytics",(function(){return _})),r.d(e,"Providers",(function(){return x})),r.d(e,"events",(function(){return Wh})),r.d(e,"updateActiveVendor",(function(){return l})),r.d(e,"identifyUser",(function(){return Kh})),r.d(e,"checkInit",(function(){return N}));var n=r(2),o=r(3),a=function(){return(a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},i={providers:[],activeVendor:void 0,vendors:void 0,shareArtisnAnalytics:!1,debug:!1,initialized:!1,meta:{accountId:void 0,vendorId:void 0,vendorName:void 0,storeId:void 0,storeName:void 0,catalogueId:void 0,catalogueName:void 0,appName:void 0,platform:"web",versionApp:void 0,versionSDK:o.version}},u=function(){return Object(n.getState)()},c=function(t){return Object(n.setState)(t)},l=function(t){var e=typeof t;if("number"!==e&&"object"!==e&&"undefined"!==e)return y("The type of vendor must be a number or Vendor type","severe");var r=u();if("number"==typeof t||void 0===t)c(a(a({},r),{activeVendor:t,meta:a(a({},r.meta),{vendorName:void 0,vendorId:t})}));else{var n=t.id,o=t.name;c(a(a({},r),{activeVendor:n,meta:a(a({},r.meta),{vendorName:o,vendorId:n})}))}},s={GLOBAL_TRACKING_ID:"G-JZ7R91ZNMB"},f=function(){return(f=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},p=function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},y=function(t,e){var r=u().debug,n="artisn/analytics";if("debug"!==e||r)switch(e){case"debug":console.log("%c(Debug) %c"+n+":\n"+t,"font-weight: bold","font-weight: normal");break;case"log":console.log("%c(Log) %c"+n+":\n"+t,"font-weight: bold","font-weight: normal");break;case"warn":console.warn("%c(Warning) %c"+n+":\n"+t,"font-weight: bold","font-weight: normal");break;case"error":console.error("%c(Error) %c"+n+":\n"+t,"font-weight: bold","font-weight: normal");break;case"severe":throw new Error(n+": \n"+t);default:throw new Error("Log message "+t+" of type "+e+" is not a supported type.")}},d=function(){function t(){this.initialized=!1,this._type="GOOGLE_ANALYTICS",this._name="__GLOBAL_PROVIDER__",this._trackingId=s.GLOBAL_TRACKING_ID,this._sampleRate=100,this._currency="USD"}return Object.defineProperty(t.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trackingId",{get:function(){return this._trackingId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sampleRate",{get:function(){return this._sampleRate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"language",{get:function(){return this._language},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currency",{get:function(){return this._currency},enumerable:!1,configurable:!0}),Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vendors",{get:function(){var t,e=u().vendors;return null!==(t=this._vendors)&&void 0!==t?t:e},enumerable:!1,configurable:!0}),t.prototype.setVendors=function(t){this._vendors=t},t.prototype.init=function(){if("undefined"!=typeof window){if(this.initialized)return y("Provider "+this._name+" was already initialized. Do not call init unless you know what you are doing.","severe");this.initialized=!0;var t=document.createElement("script");t.setAttribute("async","true"),t.setAttribute("src","https://www.googletagmanager.com/gtag/js?id="+this._trackingId);var e=document.createElement("script");e.innerText="window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', '"+this._trackingId+"', {'send_page_view': "+!1+"});gtag('event', 'page_view')",document.body.appendChild(t),document.body.appendChild(e)}},t.prototype.updateConfig=function(t){void 0===t&&(t={});var e=Object.entries(t).filter((function(t){return void 0!==t[1]})).map((function(t){return t[0]})),r=t.userId,n=t.currency,o=t.language;e.includes("userId")&&(this._userId=r),e.includes("currency")&&(this._currency=n),e.includes("language")&&(this._language=o),gtag("set",this._trackingId,t)},t._instance=new t,t}(),h=function(){function t(t){this.initialized=!1;var e=t.type,r=t.name,n=t.trackingId,o=t.vendors;this.type=e,this.name=r,this.trackingId=n,this._vendors=o}return Object.defineProperty(t.prototype,"vendors",{get:function(){var t,e=u().vendors;return null!==(t=this._vendors)&&void 0!==t?t:e},enumerable:!1,configurable:!0}),t.prototype.init=function(){if("undefined"!=typeof window)return this.initialized?y("Provider "+this.name+" was already initialized. Do not call init unless you know what you are doing.","severe"):void(this.initialized=!0)},t.prototype.updateConfig=function(t){!function(t,e){if(t.trackingId!==s.GLOBAL_TRACKING_ID){var r=Object.entries(e).reduce((function(t,e,r){var n=e[0],o=e[1];return 0===r?n+": "+o:t+"\n"+n+": "+o}),"");y(t.name+" config updated for the following fields.\n "+r,"debug")}}(this,t),d.instance.updateConfig(t)},t}(),g=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),b=function(){return(b=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},v=function(t){function e(e){var r=this,n=e.version,o=e.currency;return(r=t.call(this,b(b({},e),{type:"FACEBOOK_PIXEL"}))||this)._version=null!=n?n:"10.0",r._currency=null!=o?o:"USD",r}return g(e,t),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currency",{get:function(){return this._currency},enumerable:!1,configurable:!0}),e.prototype.init=function(){t.prototype.init.call(this);var e=document.createElement("link");e.setAttribute("rel","preconnect"),e.setAttribute("href","https://connect.facebook.net/en_US/fbevents.js");var r=document.createElement("script");r.setAttribute("async","true"),r.innerText="!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='"+this.version+"';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','https://connect.facebook.net/en_US/fbevents.js');fbq('init', '"+this.trackingId+"');fbq('trackSingle', '"+this.trackingId+"', 'PageView');";var n=document.createElement("noscript");n.innerHTML='\n <img height="1" width="1" style="display:none" \n src="https://www.facebook.com/tr?id={'+this.trackingId+'}&noscript=1"/>\n ',document.head.appendChild(e),document.head.appendChild(r),document.head.appendChild(n)},e.prototype.updateConfig=function(e){void 0===e&&(e={});var r=Object.entries(e).filter((function(t){return void 0!==t[1]})).map((function(t){return t[0]})),n=e.currency;r.includes("currency")&&(this._currency=n),t.prototype.updateConfig.call(this,e)},e}(h),O=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),m=function(){return(m=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},w=function(t){function e(e){var r=t.call(this,m(m({},e),{type:"GOOGLE_ANALYTICS"}))||this,n=e.userId,o=e.currency,a=e.language,i=e.sampleRate;return r._sampleRate=i,r._userId=n,r._language=a,r._currency=null!=o?o:"USD",r}return O(e,t),Object.defineProperty(e.prototype,"sampleRate",{get:function(){return this._sampleRate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userId",{get:function(){return this._userId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"language",{get:function(){return this._language},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currency",{get:function(){return this._currency},enumerable:!1,configurable:!0}),e.prototype.init=function(){t.prototype.init.call(this);var e=document.createElement("link");e.setAttribute("rel","preconnect"),e.setAttribute("href","https://www.googletagmanager.com/gtag/js?id="+this.trackingId);var r=document.createElement("script");r.setAttribute("async","true"),r.setAttribute("src","https://www.googletagmanager.com/gtag/js?id="+this.trackingId);var n=document.createElement("script");n.innerText="window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', '"+this.trackingId+"', {'send_page_view': "+!1+"});gtag('event', 'page_view')",document.head.appendChild(e),document.head.appendChild(r),document.head.appendChild(n)},e.prototype.updateConfig=function(e){void 0===e&&(e={});var r=Object.entries(e).filter((function(t){return void 0!==t[1]})).map((function(t){return t[0]})),n=e.userId,o=e.currency,a=e.language;r.includes("userId")&&(this._userId=n),r.includes("currency")&&(this._currency=o),r.includes("language")&&(this._language=a),gtag("set",this.trackingId,e),t.prototype.updateConfig.call(this,e)},e}(h),j=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),P=function(){return(P=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},I=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function u(t){try{c(n.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,u)}c((n=n.apply(t,e||[])).next())}))},S=function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},x={FacebookPixel:v,GoogleAnalytics:w,Segment:function(t){function e(e){var r=t.call(this,P(P({},e),{type:"SEGMENT"}))||this,n=e.writeKey,o=e.currency;return r._writeKey=n,r._currency=null!=o?o:"USD",r}return j(e,t),e.prototype.init=function(){return I(this,void 0,void 0,(function(){var e;return S(this,(function(r){return t.prototype.init.call(this),(e=document.createElement("script")).setAttribute("async","true"),e.innerText='\n !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e<analytics.methods.length;e++){var key=analytics.methods[e];analytics[key]=analytics.factory(key)}analytics.load=function(key,e){var t=document.createElement("script");t.type="text/javascript";t.async=!0;t.src="https://cdn.segment.com/analytics.js/v1/" + key + "/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n);analytics._loadOptions=e};analytics._writeKey="'+this._writeKey+'";analytics.SNIPPET_VERSION="4.13.2";\n analytics.load("'+this._writeKey+'");\n analytics.page();\n }}();\n ',document.head.appendChild(e),[2]}))}))},e.prototype.updateConfig=function(e){void 0===e&&(e={});var r=Object.entries(e).filter((function(t){return void 0!==t[1]})).map((function(t){return t[0]})),n=e.currency;r.includes("currency")&&(this._currency=n),t.prototype.updateConfig.call(this,e)},e}(h)},k=function(){return(k=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},A=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},E=function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},_=function(t){if(!("undefined"==typeof window))if(Object(n.initState)(i),u().initialized)y("initAnalytics has been called more than once. This behaviour will very likely result in unexpected outcomes so its call was skipped. Please make sure initAnalytics is only called once.","warn");else{var e=t.providers,r=t.shareArtisnAnalytics;if(!e.length)return y("At least one provider should be included but none were found","severe");if(!function(t){var e=t.map((function(t){return t.name}));return new Set(e).size===e.length}(e))return y("Providers names must be unique, check that no provider names are repeated","severe");if(!function(t){var e=t.map((function(t){return t.trackingId}));return new Set(e).size===e.length}(e))return y("Providers trackerId must be unique, check that no provider trackerId are repeated","severe");var a=t.meta,l=A(t,["meta"]),s=r?E([d.instance],e):e,f=k(k({},l),{providers:s,meta:k(k({},a),{vendorId:l.activeVendor,platform:"web",versionSDK:o.version})});c(f),e.forEach((function(t){var e=t.vendors,r=t.name;e||y("The provider "+r+" has no set vendors, as a result no events will be skipped for this provider","debug")}));var p,h={};s.forEach((function(t){h=k(k({},h),t),t.init()})),p=(null==(p=s.reduce((function(t,e){return e.vendors?E(E([],t),e.vendors):t}),[]))?void 0:p.length)?p:void 0,d.instance.updateConfig(h),d.instance.setVendors(p),c({initialized:!0})}};var T=function(){return(T=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.create;Object.create;function C(t){return t.toLowerCase()}var R=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],B=/[^A-Z0-9]+/gi;function U(t,e,r){return e instanceof RegExp?t.replace(e,r):e.reduce((function(t,e){return t.replace(e,r)}),t)}function M(t,e){return void 0===e&&(e={}),function(t,e){void 0===e&&(e={});for(var r=e.splitRegexp,n=void 0===r?R:r,o=e.stripRegexp,a=void 0===o?B:o,i=e.transform,u=void 0===i?C:i,c=e.delimiter,l=void 0===c?" ":c,s=U(U(t,n,"$1\0$2"),a,"\0"),f=0,p=s.length;"\0"===s.charAt(f);)f++;for(;"\0"===s.charAt(p-1);)p--;return s.slice(f,p).split("\0").map(u).join(l)}(t,T({delimiter:"."},e))}var L=function(){return(L=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},H=function(t){return Object.entries(t).reduce((function(t,e){var r,n,o=e[0],a=e[1],i=(void 0===n&&(n={}),M(o,T({delimiter:"_"},n)));return L(L({},t),((r={})[i]=a,r))}),{})},N=function(){try{return u().initialized}catch(t){return!1}},D=function(){return(D=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Y=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},q=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Y(e,["callback","userId"]),c=null!=a?a:n,l=D(D({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","change_password_attempt",D(D({send_to:r,event_callback:o},s),p))},F=function(){return(F=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},z=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},V=function(t,e){var r=t.trackingId,n=z(e,[]);delete n.userId;var o=F({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ChangePasswordAttempt",F(F({},a),c))},$=function(){return($=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},G=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},W=function(t,e){var r=G(e,[]);delete r.userId;var n=$({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Change Password Attempt",$($({},o),i))},K=r(1),J=r(0),Q=function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},Z=function(t,e){var r=e.vendors,n=u().activeVendor;return-1!==n&&(void 0!==r&&((!n||!r.includes(n))&&(void 0===n?y("No active vendor is set. Please make sure you configure an active vendor before trying to emit an event","warn"):function(t,e){var r=u().activeVendor;e.trackingId!==s.GLOBAL_TRACKING_ID&&y("Skipping vendor "+r+" for event "+t+" of provider "+e.name+" as configured","debug")}(t,e),!0)))},X=function(t){if(!t.length)return y("No providers found, the initAnalytics probably hasn't been run yet","severe"),!1;var e=function(t){var e=new Set(t.map((function(t){return t.type})));return Array.from(e).reduce((function(t,e){switch(e){case"GOOGLE_ANALYTICS":if("undefined"==typeof gtag)return Q(Q([],t),[e]);break;case"FACEBOOK_PIXEL":if("undefined"==typeof fbq)return Q(Q([],t),[e]);break;case"SEGMENT":if("undefined"==typeof analytics)return Q(Q([],t),[e]);break;default:throw new Error("Profiver of type "+e+" is not supported")}return t}),[])}(t);return!e.length||(e.forEach((function(t){!function(t){y(t+" SDK not initialized. Please make sure the SDK is initialized before trying to emit an event","severe")}(t)})),!1)},tt=function(){return(tt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},et=function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},rt=function(t,e,r){var n=r.facebookPixelHandler,o=r.googleAnalyticsHandler,a=r.segmentHandler,i=u().providers;if(X(i)){var c=tt(tt({},e),{artisnEvent:t}),l=i.reduce((function(e,r){if(Z(t,r))return e;switch(r.type){case"FACEBOOK_PIXEL":n(r,c);break;case"GOOGLE_ANALYTICS":o(r,c);break;case"SEGMENT":a(r,c);break;default:throw new Error("Provider of type "+r.type+" is not supported")}return et(et([],e),[r])}),[]);!function(t,e){var r=e.reduce((function(t,e){var r,n;if(e.trackingId===s.GLOBAL_TRACKING_ID)return t;var o=e.name,a=e.type,i=null!==(n=t[a])&&void 0!==n?n:[];return f(f({},t),((r={})[a]=p(p([],i),[o]),r))}),{}),n=Object.entries(r).reduce((function(t,e){var r=e[0],n=e[1];return""+t+(r.charAt(0).toUpperCase()+r.slice(1))+": "+n.join(", ")+"\n"}),"");y("Event "+t+" was successfully sent to the following providers "+n,"debug")}(t,l)}},nt=function(t){return Object(K.getShoppingCartProducts)(t).map((function(t){return t.productId}))},ot=function(t){return Object(K.getShoppingCartProducts)(t).map((function(t){return at(t)}))},at=function(t){var e=Object(J.getProductTotals)(t);return t.name+":"+e.netPrice},it=function(t,e){return Object(K.getShoppingCartProducts)(t).map((function(t){return ut(t,e)}))},ut=function(t,e){var r=Object(J.getProductTotals)(t);return{item_id:t.productId,item_name:t.name,quantity:t.amount,price:r.netPrice,currency:e}},ct=function(t){return t.join(",")},lt=function(t){return t.map((function(t){return function(t){return{product_id:t.productId,name:t.name,price:Object(J.getProductTotals)(t).netPrice}}(t)}))},st=function(t){rt("changePasswordAttempt",t,{googleAnalyticsHandler:q,facebookPixelHandler:V,segmentHandler:W})},ft=function(){return(ft=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},pt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},yt=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=pt(e,["callback","userId"]),c=null!=a?a:n,l=ft(ft({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","sign_up_attempt",ft(ft({send_to:r,event_callback:o},s),p))},dt=function(){return(dt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ht=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},gt=function(t,e){var r=t.trackingId,n=ht(e,[]);delete n.userId;var o=dt({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SignUpAttempt",dt(dt({},a),c))},bt=function(){return(bt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},vt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ot=function(t,e){var r=vt(e,[]);delete r.userId;var n=bt({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Sign Up Attempt",bt(bt({},o),i))},mt=function(t){rt("signUpAttempt",t,{googleAnalyticsHandler:yt,facebookPixelHandler:gt,segmentHandler:Ot})},wt=function(){return(wt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},jt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Pt=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=jt(e,["callback","userId"]),c=null!=a?a:n,l=wt(wt({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","change_password_fail",wt(wt({send_to:r,event_callback:o},s),p))},It=function(){return(It=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},St=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},xt=function(t,e){var r=t.trackingId,n=St(e,[]);delete n.userId;var o=It({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ChangePasswordFail",It(It({},a),c))},kt=function(){return(kt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},At=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Et=function(t,e){var r=At(e,[]);delete r.userId;var n=kt({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Change Password Fail",kt(kt({},o),i))},_t=function(t){rt("changePasswordFail",t,{googleAnalyticsHandler:Pt,facebookPixelHandler:xt,segmentHandler:Et})},Tt=function(){return(Tt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ct=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Rt=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Ct(e,["callback","userId"]),c=null!=a?a:n,l=Tt(Tt({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","change_password_success",Tt(Tt({send_to:r,event_callback:o},s),p))},Bt=function(){return(Bt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ut=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Mt=function(t,e){var r=t.trackingId,n=Ut(e,[]);delete n.userId;var o=Bt({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ChangePasswordSuccess",Bt(Bt({},a),c))},Lt=function(){return(Lt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ht=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Nt=function(t,e){var r=Ht(e,[]);delete r.userId;var n=Lt({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Change Password Success",Lt(Lt({},o),i))},Dt=function(t){rt("changePasswordSuccess",t,{googleAnalyticsHandler:Rt,facebookPixelHandler:Mt,segmentHandler:Nt})},Yt=function(){return(Yt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},qt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ft=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=qt(e,["callback","userId"]);delete i.identify;var c=null!=a?a:n,l=Yt(Yt({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","login",Yt(Yt({send_to:r,event_callback:o},s),p))},zt=function(){return(zt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Vt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},$t=function(t,e){var r=t.trackingId,n=Vt(e,[]);delete n.userId,delete n.identify;var o=zt({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SignIn",zt(zt({},a),c))},Gt=function(){return(Gt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Wt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Kt=function(t,e){var r=e.name,n=e.identify,o=Wt(e,["name","identify"]);delete o.userId;var a=Gt(Gt({},o),{username:r}),i=H(a),c=u().meta,l=H(c);if(analytics.track("Signed In",Gt(Gt({},i),l)),n){var s=n.name,f=void 0===s?r:s,p=Wt(n,["name"]);analytics.identify(n.id,Gt({name:f},p))}},Jt=function(t){rt("signIn",t,{googleAnalyticsHandler:Ft,facebookPixelHandler:$t,segmentHandler:Kt})},Qt=function(){return(Qt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Zt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Xt=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Zt(e,["callback","userId"]),c=null!=a?a:n,l=Qt(Qt({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","sign_out",Qt(Qt({send_to:r,event_callback:o},s),p))},te=function(){return(te=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ee=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},re=function(t,e){var r=t.trackingId,n=ee(e,[]);delete n.userId;var o=te({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SignOut",te(te({},a),c))},ne=function(){return(ne=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},oe=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ae=function(t,e){var r=e.name,n=oe(e,["name"]);delete n.userId;var o=ne(ne({},n),{username:r}),a=H(o),i=u().meta,c=H(i);analytics.track("Signed Out",ne(ne({},a),c)),analytics.reset()},ie=function(t){rt("signOut",t,{googleAnalyticsHandler:Xt,facebookPixelHandler:re,segmentHandler:ae})},ue=function(){return(ue=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ce=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},le=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=ce(e,["callback","userId"]);delete i.identify;var c=null!=a?a:n,l=ue(ue({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","sign_up",ue(ue({send_to:r,event_callback:o},s),p))},se=function(){return(se=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},fe=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},pe=function(t,e){var r=t.trackingId,n=fe(e,[]);delete n.userId,delete n.identify;var o=se({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingle",r,"CompleteRegistration",se(se({},a),c))},ye=function(){return(ye=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},de=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},he=function(t,e){var r=e.name,n=e.method,o=e.identify,a=de(e,["name","method","identify"]);delete a.userId;var i=ye(ye({},a),{username:r,type:n}),c=H(i),l=u().meta,s=H(l);if(analytics.track("Signed Up",ye(ye({},c),s)),o){var f=o.name,p=void 0===f?r:f,y=o.email,d=void 0===y?a.email:y,h=de(o,["name","email"]);analytics.identify(o.id,ye({name:p,email:d},h))}},ge=function(t){rt("signUp",t,{googleAnalyticsHandler:le,facebookPixelHandler:pe,segmentHandler:he})},be={logChangePasswordAttempt:st,logSignUpAttempt:mt,logChangePasswordFail:_t,logChangePasswordSuccess:Dt,logSignIn:Jt,logSignOut:ie,logSignUp:ge},ve=be,Oe=function(){return(Oe=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},me=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},we=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=me(e,["callback","userId"]),c=null!=a?a:n,l=Oe(Oe({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","banner_impression",Oe(Oe({send_to:r,event_callback:o},s),p))},je=function(){return(je=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Pe=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ie=function(t,e){var r=t.trackingId,n=Pe(e,[]);delete n.userId;var o=je({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"BannerImpression",je(je({},a),c))},Se=function(){return(Se=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},xe=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ke=function(t,e){var r=xe(e,[]);delete r.userId;var n=Se({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Banner Impression",Se(Se({},o),i))},Ae=function(t){rt("bannerImpression",t,{googleAnalyticsHandler:we,facebookPixelHandler:Ie,segmentHandler:ke})},Ee=function(){return(Ee=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},_e=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Te=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=_e(e,["callback","userId"]),c=null!=a?a:n,l=Ee(Ee({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","select_content",Ee(Ee({send_to:r,event_callback:o,content_type:"banner"},s),p))},Ce=function(){return(Ce=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Re=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Be=function(t,e){var r=t.trackingId,n=Re(e,[]);delete n.userId;var o=Ce({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SelectBanner",Ce(Ce({},a),c))},Ue=function(){return(Ue=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Me=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Le=function(t,e){var r=Me(e,[]);delete r.userId;var n=Ue({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Select Banner",Ue(Ue({},o),i))},He=function(t){rt("selectBanner",t,{googleAnalyticsHandler:Te,facebookPixelHandler:Be,segmentHandler:Le})},Ne={logBannerImpression:Ae,logSelectBanner:He},De=Ne,Ye=function(){return(Ye=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},qe=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Fe=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=qe(e,["callback","userId"]),c=null!=a?a:n,l=Ye(Ye({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","add_billing_info",Ye(Ye({send_to:r,event_callback:o},s),p))},ze=function(){return(ze=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ve=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},$e=function(t,e){var r=t.trackingId,n=Ve(e,[]);delete n.userId;var o=ze({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"AddBillingInfo",ze(ze({},a),c))},Ge=function(){return(Ge=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},We=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ke=function(t,e){var r=We(e,[]);delete r.userId;var n=Ge({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Add Billing Info",Ge(Ge({},o),i))},Je=function(t){rt("addBillingInfo",t,{googleAnalyticsHandler:Fe,facebookPixelHandler:$e,segmentHandler:Ke})},Qe=function(){return(Qe=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ze=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Xe=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Ze(e,["callback","userId"]),c=null!=a?a:n,l=Qe(Qe({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","select_billing_info",Qe(Qe({send_to:r,event_callback:o},s),p))},tr=function(){return(tr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},er=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},rr=function(t,e){var r=t.trackingId,n=er(e,[]);delete n.userId;var o=tr({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SelectBillingInfo",tr(tr({},a),c))},nr=function(){return(nr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},or=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ar=function(t,e){var r=or(e,[]);delete r.userId;var n=nr({},r),o=H(n),a=u().meta,i=H(a);analytics.track("SelectBilling Info",nr(nr({},o),i))},ir=function(t){rt("selectBillingInfo",t,{googleAnalyticsHandler:Xe,facebookPixelHandler:rr,segmentHandler:ar})},ur=function(){return(ur=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},cr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},lr=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=cr(e,["callback","userId"]),c=null!=a?a:n,l=ur(ur({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","update_billing_info",ur(ur({send_to:r,event_callback:o},s),p))},sr=function(){return(sr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},fr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},pr=function(t,e){var r=t.trackingId,n=fr(e,[]);delete n.userId;var o=sr({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"UpdateBillingInfo",sr(sr({},a),c))},yr=function(){return(yr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},dr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},hr=function(t,e){var r=e.fields,n=dr(e,["fields"]);delete n.userId;var o=yr(yr({},n),{fields:ct(r)}),a=H(o),i=u().meta,c=H(i);analytics.track("Update Billing Info",yr(yr({},a),c))},gr=function(t){rt("updateBillingInfo",t,{googleAnalyticsHandler:lr,facebookPixelHandler:pr,segmentHandler:hr})},br={logAddBillingInfo:Je,logSelectBillingInfo:ir,logUpdateBillingInfo:gr},vr=br,Or=function(){return(Or=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},mr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},wr=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=mr(e,["callback","userId"]),c=null!=a?a:n,l=Or(Or({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","book_appointment",Or(Or({send_to:r,event_callback:o},s),p))},jr=function(){return(jr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Pr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ir=function(t,e){var r=t.trackingId,n=Pr(e,[]);delete n.userId;var o=jr({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingle",r,"Schedule",jr(jr({},a),c))},Sr=function(){return(Sr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},xr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},kr=function(t,e){var r=xr(e,[]);delete r.userId;var n=Sr({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Book Appointment",Sr(Sr({},o),i))},Ar=function(t){rt("bookAppointment",t,{googleAnalyticsHandler:wr,facebookPixelHandler:Ir,segmentHandler:kr})},Er={logBookAppointment:Ar},_r=Er,Tr=function(){return(Tr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Cr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Rr=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.category,c=e.list,l=e.itemBrand,s=Cr(e,["callback","userId","category","list","itemBrand"]),f=e.position,p=[{item_brand:l,item_id:""+i.categoryId,item_list_name:c,item_name:i.name,index:f}],y=null!=a?a:n,d=Tr(Tr({},s),{userId:y}),h=H(d),g=u().meta,b=H(g);gtag("event","view_item_list",Tr(Tr({send_to:r,event_callback:o,item_list_name:c,items:p},h),b))},Br=function(){return(Br=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ur=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Mr=function(t,e){var r=t.trackingId,n=e.category,o=Ur(e,["category"]);delete o.userId;var a=n.categoryId,i=n.name,c=Br(Br({},o),{categoryId:a,categoryName:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"CategoryImpression",Br(Br({},l),f))},Lr=function(){return(Lr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Hr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Nr=function(t,e){var r=e.category,n=Hr(e,["category"]);delete n.userId;var o=r.categoryId,a=r.name,i=Lr(Lr({},n),{categoryId:o,categoryName:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Category Impression",Lr(Lr({},c),s))},Dr=function(t){rt("categoryImpression",t,{googleAnalyticsHandler:Rr,facebookPixelHandler:Mr,segmentHandler:Nr})},Yr=function(){return(Yr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},qr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Fr=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.query,c=qr(e,["callback","userId","query"]),l=null!=a?a:n,s=Yr(Yr({},c),{userId:l}),f=H(s),p=u().meta,y=H(p);gtag("event","search",Yr(Yr({send_to:r,event_callback:o,search_term:i},f),y))},zr=function(){return(zr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Vr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},$r=function(t,e){var r=t.trackingId,n=e.query,o=Vr(e,["query"]);delete o.userId;var a=zr({},o),i=H(a),c=u().meta,l=H(c);fbq("trackSingle",r,"Search",zr(zr({search_string:n},i),l))},Gr=function(){return(Gr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Wr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Kr=function(t,e){var r=Wr(e,[]);delete r.userId;var n=Gr({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Search Category",Gr(Gr({},o),i))},Jr=function(t){rt("searchCategoryAttempt",t,{googleAnalyticsHandler:Fr,facebookPixelHandler:$r,segmentHandler:Kr})},Qr=function(){return(Qr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Zr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Xr=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.category,c=Zr(e,["callback","userId","category"]);c.contentType&&delete c.contentType;var l=i.categoryId,s=i.name,f=null!=a?a:n,p=Qr(Qr({},c),{userId:f,categoryId:l,categoryName:s}),y=H(p),d=u().meta,h=H(d);gtag("event","select_content",Qr(Qr({send_to:r,event_callback:o,content_type:"category"},y),h))},tn=function(){return(tn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},en=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},rn=function(t,e){var r=t.trackingId,n=e.category,o=en(e,["category"]);delete o.userId;var a=n.categoryId,i=n.name,c=tn(tn({},o),{categoryId:a,categoryName:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"SelectCategory",tn(tn({},l),f))},nn=function(){return(nn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},on=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},an=function(t,e){var r=e.category,n=on(e,["category"]);delete n.userId;var o=r.categoryId,a=r.name,i=nn(nn({},n),{categoryId:o,categoryName:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Select Category",nn(nn({},c),s))},un=function(t){rt("selectCategory",t,{googleAnalyticsHandler:Xr,facebookPixelHandler:rn,segmentHandler:an})},cn=function(){return(cn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ln=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},sn=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.category,c=ln(e,["callback","userId","category"]),l=i.categoryId,s=i.name,f=null!=a?a:n,p=cn(cn({},c),{userId:f,categoryId:l,categoryName:s}),y=H(p),d=u().meta,h=H(d);gtag("event","view_cateogry",cn(cn({send_to:r,event_callback:o},y),h))},fn=function(){return(fn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},pn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},yn=function(t,e){var r=t.trackingId,n=e.category,o=pn(e,["category"]);delete o.userId;var a=n.categoryId,i=n.name,c=fn(fn({},o),{categoryId:a,categoryName:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"ViewCategory",fn(fn({},l),f))},dn=function(){return(dn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},hn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},gn=function(t,e){var r=e.category,n=e.products,o=hn(e,["category","products"]);delete o.userId;var a=r.categoryId,i=r.name,c=dn(dn({},o),{listId:a,category:i}),l=H(c),s=u().meta,f=H(s);analytics.track("Product List Viewed",dn(dn({products:lt(n)},l),f))},bn=function(t){rt("viewCategory",t,{googleAnalyticsHandler:sn,facebookPixelHandler:yn,segmentHandler:gn})},vn={logCategoryImpression:Dr,logSearchCategoryAttempt:Jr,logSelectCategory:un,logViewCategory:bn},On=vn,mn=function(){return(mn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},wn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},jn=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=wn(e,["callback","userId"]),l=null!=i?i:n,s=mn(mn({},c),{userId:l,currency:o}),f=H(s),p=u().meta,y=H(p);gtag("event","checkout_action",mn(mn({send_to:r,event_callback:a},f),y))},Pn=function(){return(Pn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},In=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Sn=function(t,e){var r=t.trackingId,n=In(e,[]);delete n.userId;var o=Pn({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"CheckoutAction",Pn(Pn({},a),c))},xn=function(){return(xn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},kn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},An=function(t,e){var r=kn(e,[]);delete r.userId;var n=xn({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Checkout Step Completed",xn(xn({},o),i))},En=function(t){rt("checkoutAction",t,{googleAnalyticsHandler:jn,facebookPixelHandler:Sn,segmentHandler:An})},_n=function(){return(_n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Tn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Cn=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.shoppingCart,l=e.currency,s=Tn(e,["callback","userId","shoppingCart","currency"]),f=null!=i?i:n,p=null!=l?l:o,y=_n(_n({},s),{userId:f,currency:p}),d=H(y),h=u().meta,g=H(h),b=Object(K.getShoppingCartTotal)(c),v=b.total,O=b.totalPoints;gtag("event","begin_checkout",_n(_n({send_to:r,event_callback:a,items:it(c,p),value:v,points:O},d),g))},Rn=function(){return(Rn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Un=function(t,e){var r=t.trackingId,n=t.currency,o=e.shoppingCart,a=e.currency,i=Bn(e,["shoppingCart","currency"]);delete i.userId;var c=null!=a?a:n,l=Rn(Rn({},i),{currency:c}),s=H(l),f=u().meta,p=H(f),y=nt(o),d=Object(K.getShoppingCartTotal)(o),h=d.total,g=d.totalPoints;fbq("trackSingle",r,"InitiateCheckout",Rn(Rn({content_ids:y,contents:ot(o),num_items:y.length,value:h,points:g},s),p))},Mn=function(){return(Mn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ln=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Hn=function(t,e){var r=t.currency,n=e.shoppingCart,o=e.currency,a=Ln(e,["shoppingCart","currency"]);delete a.userId;var i=null!=o?o:r,c=Mn(Mn({},a),{currency:i}),l=H(c),s=u().meta,f=H(s),p=Object(K.getShoppingCartProducts)(n),y=Object(K.getShoppingCartTotal)(n),d=y.total,h=y.totalTaxes,g=y.shippingCost,b=y.totalPoints;analytics.track("Initiate Checkout",Mn(Mn({total:d,revenue:d-h-(null!=g?g:0),shipping:g,tax:h,products:lt(p),points:b},l),f))},Nn=function(t){rt("initiateCheckout",t,{googleAnalyticsHandler:Cn,facebookPixelHandler:Un,segmentHandler:Hn})},Dn={logCheckoutAction:En,logInitiateCheckout:Nn},Yn=Dn,qn=function(){return(qn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Fn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},zn=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=Fn(e,["callback","userId","currency"]),s=null!=i?i:n,f=null!=c?c:o,p=qn(qn({},l),{userId:s,currency:f}),y=H(p),d=u().meta,h=H(d);gtag("event","apply_benefit",qn(qn({send_to:r,event_callback:a},y),h))},Vn=function(){return(Vn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$n=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Gn=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=$n(e,["currency"]);delete a.userId;var i=null!=o?o:n,c=Vn(Vn({},a),{currency:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"ApplyBenefit",Vn(Vn({},l),f))},Wn=function(){return(Wn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Kn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Jn=function(t,e){var r=t.currency,n=e.currency,o=Kn(e,["currency"]);delete o.userId;var a=null!=n?n:r,i=Wn(Wn({},o),{currency:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Apply Benefit",Wn(Wn({},c),s))},Qn=function(t){rt("applyBenefit",t,{googleAnalyticsHandler:zn,facebookPixelHandler:Gn,segmentHandler:Jn})},Zn=function(){return(Zn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Xn=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},to=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=Xn(e,["callback","userId","currency"]),s=null!=i?i:n,f=null!=c?c:o,p=Zn(Zn({},l),{userId:s,currency:f}),y=H(p),d=u().meta,h=H(d);gtag("event","coupon_code_error",Zn(Zn({send_to:r,event_callback:a},y),h))},eo=function(){return(eo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ro=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},no=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=ro(e,["currency"]);delete a.userId;var i=null!=o?o:n,c=eo(eo({},a),{currency:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"CouponCodeError",eo(eo({},l),f))},oo=function(){return(oo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ao=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},io=function(t,e){var r=t.currency,n=e.currency,o=ao(e,["currency"]);delete o.userId;var a=null!=n?n:r,i=oo(oo({},o),{currency:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Coupon Code Error",oo(oo({},c),s))},uo=function(t){rt("couponCodeError",t,{googleAnalyticsHandler:to,facebookPixelHandler:no,segmentHandler:io})},co=function(){return(co=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},lo=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},so=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=lo(e,["callback","userId"]),c=null!=a?a:n,l=co(co({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","redeem_coupon_code",co(co({send_to:r,event_callback:o},s),p))},fo=function(){return(fo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},po=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},yo=function(t,e){var r=t.trackingId,n=po(e,[]);delete n.userId;var o=fo({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"RedeemCouponCode",fo(fo({},a),c))},ho=function(){return(ho=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},go=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},bo=function(t,e){var r=go(e,[]);delete r.userId;var n=ho({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Redeem Coupon Code",ho(ho({},o),i))},vo=function(t){rt("redeemCouponCode",t,{googleAnalyticsHandler:so,facebookPixelHandler:yo,segmentHandler:bo})},Oo=function(){return(Oo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},mo=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},wo=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=mo(e,["callback","userId","currency"]),s=null!=i?i:n,f=null!=c?c:o,p=Oo(Oo({},l),{userId:s,currency:f}),y=H(p),d=u().meta,h=H(d);gtag("event","remove_benefit",Oo(Oo({send_to:r,event_callback:a},y),h))},jo=function(){return(jo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Po=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Io=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=Po(e,["currency"]);delete a.userId;var i=null!=o?o:n,c=jo(jo({},a),{currency:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"RemoveBenefit",jo(jo({},l),f))},So=function(){return(So=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},xo=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ko=function(t,e){var r=t.currency,n=e.currency,o=xo(e,["currency"]);delete o.userId;var a=null!=n?n:r,i=So(So({},o),{currency:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Remove Benefit",So(So({},c),s))},Ao=function(t){rt("removeBenefit",t,{googleAnalyticsHandler:wo,facebookPixelHandler:Io,segmentHandler:ko})},Eo=function(){return(Eo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},_o=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},To=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=_o(e,["callback","userId","currency"]),s=null!=i?i:n,f=null!=c?c:o,p=Eo(Eo({},l),{userId:s,currency:f}),y=H(p),d=u().meta,h=H(d);gtag("event","view_benefit_details",Eo(Eo({send_to:r,event_callback:a},y),h))},Co=function(){return(Co=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ro=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Bo=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=Ro(e,["currency"]);delete a.userId;var i=null!=o?o:n,c=Co(Co({},a),{currency:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"ViewBenefitDetails",Co(Co({},l),f))},Uo=function(){return(Uo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Mo=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Lo=function(t,e){var r=t.currency,n=e.currency,o=Mo(e,["currency"]);delete o.userId;var a=null!=n?n:r,i=Uo(Uo({},o),{currency:a}),c=H(i),l=u().meta,s=H(l);analytics.track("View Benefit Details",Uo(Uo({},c),s))},Ho=function(t){rt("viewBenefitDetails",t,{googleAnalyticsHandler:To,facebookPixelHandler:Bo,segmentHandler:Lo})},No=function(){return(No=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Do=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Yo=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Do(e,["callback","userId"]),c=null!=a?a:n,l=No(No({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_benefits_wallet",No(No({send_to:r,event_callback:o},s),p))},qo=function(){return(qo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Fo=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},zo=function(t,e){var r=t.trackingId,n=Fo(e,[]);delete n.userId;var o=qo({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewBenefitsWallet",qo(qo({},a),c))},Vo=function(){return(Vo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$o=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Go=function(t,e){var r=$o(e,[]);delete r.userId;var n=Vo({},r),o=H(n),a=u().meta,i=H(a);analytics.track("View Benefits Wallet",Vo(Vo({},o),i))},Wo=function(t){rt("viewBenefitsWallet",t,{googleAnalyticsHandler:Yo,facebookPixelHandler:zo,segmentHandler:Go})},Ko=function(){return(Ko=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Jo=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Qo=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Jo(e,["callback","userId"]),c=null!=a?a:n,l=Ko(Ko({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_qr_store_coupon",Ko(Ko({send_to:r,event_callback:o},s),p))},Zo=function(){return(Zo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Xo=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ta=function(t,e){var r=t.trackingId,n=Xo(e,[]);delete n.userId;var o=Zo({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewQRStoreCoupon",Zo(Zo({},a),c))},ea=function(){return(ea=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ra=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},na=function(t,e){var r=ra(e,[]);delete r.userId;var n=ea({},r),o=H(n),a=u().meta,i=H(a);analytics.track("View QR Store Coupon",ea(ea({},o),i))},oa=function(t){void 0===t&&(t={}),rt("viewQRStoreCoupon",t,{googleAnalyticsHandler:Qo,facebookPixelHandler:ta,segmentHandler:na})},aa={logApplyBenefit:Qn,logCouponCodeError:uo,logRedeemCouponCode:vo,logRemoveBenefit:Ao,logViewBenefitDetails:Ho,logViewBenefitsWallet:Wo,logViewQRStoreCoupon:oa},ia=aa,ua=function(){return(ua=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ca=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},la=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=e.amount,s=ca(e,["callback","userId","currency","amount"]),f=null!=i?i:n,p=null!=c?c:o,y=ua(ua({},s),{userId:f,currency:p,amount:l,value:l}),d=H(y),h=u().meta,g=H(h);gtag("event","add_credits",ua(ua({send_to:r,event_callback:a},d),g))},sa=function(){return(sa=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},fa=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},pa=function(t,e){var r=t.trackingId,n=t.currency,o=e.amount,a=e.currency,i=fa(e,["amount","currency"]);delete i.userId;var c=null!=a?a:n,l=sa(sa({},i),{currency:c,amount:o,value:o}),s=H(l),f=u().meta,p=H(f);fbq("trackSingleCustom",r,"AddCredits",sa(sa({},s),p))},ya=function(){return(ya=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},da=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ha=function(t,e){var r=t.currency,n=e.amount,o=e.currency,a=da(e,["amount","currency"]);delete a.userId;var i=null!=o?o:r,c=ya(ya({},a),{currency:i,amount:n,value:n}),l=H(c),s=u().meta,f=H(s);analytics.track("Add Credits",ya(ya({},l),f))},ga=function(t){rt("addCredits",t,{googleAnalyticsHandler:la,facebookPixelHandler:pa,segmentHandler:ha})},ba=function(){return(ba=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},va=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Oa=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=e.amount,s=va(e,["callback","userId","currency","amount"]),f=null!=i?i:n,p=null!=c?c:o,y=ba(ba({},s),{userId:f,currency:p,amount:l,value:l}),d=H(y),h=u().meta,g=H(h);gtag("event","spend_credits",ba(ba({send_to:r,event_callback:a},d),g))},ma=function(){return(ma=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},wa=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ja=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=e.amount,i=wa(e,["currency","amount"]);delete i.userId;var c=null!=o?o:n,l=ma(ma({},i),{currency:c,amount:a,value:a}),s=H(l),f=u().meta,p=H(f);fbq("trackSingle",r,"SpendCredits",ma(ma({},s),p))},Pa=function(){return(Pa=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ia=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Sa=function(t,e){var r=t.currency,n=e.currency,o=e.amount,a=Ia(e,["currency","amount"]);delete a.userId;var i=null!=n?n:r,c=Pa(Pa({},a),{currency:i,amount:o,value:o}),l=H(c),s=u().meta,f=H(s);analytics.track("Spend Credits",Pa(Pa({},l),f))},xa=function(t){rt("spendCredits",t,{googleAnalyticsHandler:Oa,facebookPixelHandler:ja,segmentHandler:Sa})},ka=function(){return(ka=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Aa=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ea=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Aa(e,["callback","userId"]),c=null!=a?a:n,l=ka(ka({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_credits",ka(ka({send_to:r,event_callback:o},s),p))},_a=function(){return(_a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ta=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ca=function(t,e){var r=t.trackingId,n=Ta(e,[]);delete n.userId;var o=_a({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewCredits",_a(_a({},a),c))},Ra=function(){return(Ra=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ba=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ua=function(t,e){var r=Ba(e,[]);delete r.userId;var n=Ra({},r),o=H(n),a=u().meta,i=H(a);analytics.track("View Credits",Ra(Ra({},o),i))},Ma=function(t){rt("viewCredits",t,{googleAnalyticsHandler:Ea,facebookPixelHandler:Ca,segmentHandler:Ua})},La={logAddCredits:ga,logSpendCredits:xa,logViewCredits:Ma},Ha=La,Na=function(){return(Na=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Da=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ya=function(t,e,r){var n=e.trackingId,o=e.userId,a=r.callback,i=r.userId,c=Da(r,["callback","userId"]),l=null!=i?i:o,s=Na(Na({},c),{userId:l}),f=H(s),p=u().meta,y=H(p);gtag("event",t,Na(Na(Na({send_to:n,event_callback:a},f),{artisn_event:"custom_event"}),y))},qa=function(){return(qa=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Fa=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},za=function(t,e,r){var n=e.trackingId,o=Fa(r,[]);delete o.userId;var a=qa({},o),i=H(a),c=u().meta,l=H(c);fbq("trackSingleCustom",n,t,qa(qa(qa({},i),{artisn_event:"CustomEvent"}),l))},Va=function(){return(Va=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$a=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ga=function(t,e,r){var n=$a(r,[]);delete n.userId;var o=Va({},n),a=H(o),i=u().meta,c=H(i);analytics.track(t,Va(Va(Va({},a),{artisn_event:"Custom Event"}),c))},Wa=function(t,e){void 0===e&&(e={}),rt(t,e,{googleAnalyticsHandler:function(e,r){return Ya(t,e,r)},facebookPixelHandler:function(e,r){return za(t,e,r)},segmentHandler:function(e,r){return Ga(t,e,r)}})},Ka=function(){return(Ka=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ja=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Qa=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Ja(e,["callback","userId"]),c=null!=a?a:n,l=Ka(Ka({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_fulfillment_step",Ka(Ka({send_to:r,event_callback:o},s),p))},Za=function(){return(Za=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Xa=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ti=function(t,e){var r=t.trackingId,n=Xa(e,[]);delete n.userId;var o=Za({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewFulfillmentStep",Za(Za({},a),c))},ei=function(){return(ei=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ri=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ni=function(t,e){var r=ri(e,[]);delete r.userId;var n=ei({},r),o=H(n),a=u().meta,i=H(a);analytics.track("View Fulfillment Step",ei(ei({},o),i))},oi=function(t){rt("viewFulfillmentStep",t,{googleAnalyticsHandler:Qa,facebookPixelHandler:ti,segmentHandler:ni})},ai=function(){return(ai=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ii=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ui=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=ii(e,["callback","userId"]),c=null!=a?a:n,l=ai(ai({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_tracking",ai(ai({send_to:r,event_callback:o},s),p))},ci=function(){return(ci=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},li=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},si=function(t,e){var r=t.trackingId,n=li(e,[]);delete n.userId;var o=ci({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewTracking",ci(ci({},a),c))},fi=function(){return(fi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},pi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},yi=function(t,e){var r=pi(e,[]);delete r.userId;var n=fi({},r),o=H(n),a=u().meta,i=H(a);analytics.track("View Tracking",fi(fi({},o),i))},di=function(t){rt("viewTracking",t,{googleAnalyticsHandler:ui,facebookPixelHandler:si,segmentHandler:yi})},hi={logViewFulfillmentStep:oi,logViewTracking:di},gi=hi,bi=function(){return(bi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},vi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Oi=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=vi(e,["callback","userId"]),c=null!=a?a:n,l=bi(bi({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","change_location",bi(bi({send_to:r,event_callback:o},s),p))},mi=function(){return(mi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},wi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ji=function(t,e){var r=t.trackingId,n=wi(e,[]);delete n.userId;var o=mi({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ChangeLocation",mi(mi({},a),c))},Pi=function(){return(Pi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ii=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Si=function(t,e){var r=Ii(e,[]);delete r.userId;var n=Pi({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Change Location",Pi(Pi({},o),i))},xi=function(t){void 0===t&&(t={}),rt("changeLocation",t,{googleAnalyticsHandler:Oi,facebookPixelHandler:ji,segmentHandler:Si})},ki=function(){return(ki=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ai=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ei=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Ai(e,["callback","userId"]),c=null!=a?a:n,l=ki(ki({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","find_location",ki(ki({send_to:r,event_callback:o},s),p))},_i=function(){return(_i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ti=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ci=function(t,e){var r=t.trackingId,n=Ti(e,[]);delete n.userId;var o=_i({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingle",r,"FindLocation",_i(_i({},a),c))},Ri=function(){return(Ri=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ui=function(t,e){var r=Bi(e,[]);delete r.userId;var n=Ri({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Find Location",Ri(Ri({},o),i))},Mi=function(t){void 0===t&&(t={}),rt("findLocation",t,{googleAnalyticsHandler:Ei,facebookPixelHandler:Ci,segmentHandler:Ui})},Li=function(){return(Li=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Hi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ni=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Hi(e,["callback","userId"]),c=null!=a?a:n,l=Li(Li({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","out_of_coverage",Li(Li({send_to:r,event_callback:o},s),p))},Di=function(){return(Di=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Yi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},qi=function(t,e){var r=t.trackingId,n=Yi(e,[]);delete n.userId;var o=Di({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"OutOfCoverage",Di(Di({},a),c))},Fi=function(){return(Fi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},zi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Vi=function(t,e){var r=zi(e,[]);delete r.userId;var n=Fi({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Out Of Coverage",Fi(Fi({},o),i))},$i=function(t){void 0===t&&(t={}),rt("outOfCoverage",t,{googleAnalyticsHandler:Ni,facebookPixelHandler:qi,segmentHandler:Vi})},Gi=function(){return(Gi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Wi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ki=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Wi(e,["callback","userId"]),c=null!=a?a:n,l=Gi(Gi({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","set_location",Gi(Gi({send_to:r,event_callback:o},s),p))},Ji=function(){return(Ji=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Qi=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Zi=function(t,e){var r=t.trackingId,n=Qi(e,[]);delete n.userId;var o=Ji({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SetLocation",Ji(Ji({},a),c))},Xi=function(){return(Xi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},tu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},eu=function(t,e){var r=e.lat,n=e.lng,o=tu(e,["lat","lng"]);delete o.userId;var a=r&&n?r+", "+n:"Not available",i=Xi(Xi({},o),{location:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Set Location",Xi(Xi({},c),s))},ru=function(t){void 0===t&&(t={}),rt("setLocation",t,{googleAnalyticsHandler:Ki,facebookPixelHandler:Zi,segmentHandler:eu})},nu={logChangeLocation:xi,logFindLocation:Mi,logOutOfCoverage:$i,logSetLocation:ru},ou=nu,au=function(){return(au=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},iu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},uu=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=iu(e,["callback","userId"]),c=null!=a?a:n,l=au(au({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","request_assistance",au(au({send_to:r,event_callback:o},s),p))},cu=function(){return(cu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},lu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},su=function(t,e){var r=t.trackingId,n=lu(e,[]);delete n.userId;var o=cu({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingle",r,"Contact",cu(cu({},a),c))},fu=function(){return(fu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},pu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},yu=function(t,e){var r=pu(e,[]);delete r.userId;var n=fu({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Request Assistance",fu(fu({},o),i))},du=function(t){rt("requestAssistance",t,{googleAnalyticsHandler:uu,facebookPixelHandler:su,segmentHandler:yu})},hu={logRequestAssistance:du},gu=hu,bu=function(){return(bu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},vu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ou=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.currencyName,c=e.amount,l=vu(e,["callback","userId","currencyName","amount"]),s=null!=a?a:n,f=bu(bu({},l),{userId:s}),p=H(f),y=u().meta,d=H(y);gtag("event","earn_virtual_currency",bu(bu({send_to:r,event_callback:o,virtual_currency_name:i,value:c},p),d))},mu=function(){return(mu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},wu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ju=function(t,e){var r=t.trackingId,n=wu(e,[]);delete n.userId;var o=mu({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"EarnPoints",mu(mu({},a),c))},Pu=function(){return(Pu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Iu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Su=function(t,e){var r=Iu(e,[]);delete r.userId;var n=Pu({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Earn Points",Pu(Pu({},o),i))},xu=function(t){rt("earnPoints",t,{googleAnalyticsHandler:Ou,facebookPixelHandler:ju,segmentHandler:Su})},ku=function(){return(ku=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Au=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Eu=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Au(e,["callback","userId"]),c=null!=a?a:n,l=ku(ku({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","share_points",ku(ku({send_to:r,event_callback:o},s),p))},_u=function(){return(_u=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Tu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Cu=function(t,e){var r=t.trackingId,n=Tu(e,[]);delete n.userId;var o=_u({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SharePoints",_u(_u({},a),c))},Ru=function(){return(Ru=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Uu=function(t,e){var r=Bu(e,[]);delete r.userId;var n=Ru({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Share Points",Ru(Ru({},o),i))},Mu=function(t){rt("sharePoints",t,{googleAnalyticsHandler:Eu,facebookPixelHandler:Cu,segmentHandler:Uu})},Lu=function(){return(Lu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Hu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Nu=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.currencyName,c=e.amount,l=Hu(e,["callback","userId","currencyName","amount"]),s=null!=a?a:n,f=Lu(Lu({},l),{userId:s}),p=H(f),y=u().meta,d=H(y);gtag("event","spend_virtual_currency",Lu(Lu({send_to:r,event_callback:o,virtual_currency_name:i,value:c},p),d))},Du=function(){return(Du=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Yu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},qu=function(t,e){var r=t.trackingId,n=Yu(e,[]);delete n.userId;var o=Du({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SpendPoints",Du(Du({},a),c))},Fu=function(){return(Fu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},zu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Vu=function(t,e){var r=zu(e,[]);delete r.userId;var n=Fu({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Spend Points",Fu(Fu({},o),i))},$u=function(t){rt("spendPoints",t,{googleAnalyticsHandler:Nu,facebookPixelHandler:qu,segmentHandler:Vu})},Gu=function(){return(Gu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Wu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ku=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Wu(e,["callback","userId"]),c=null!=a?a:n,l=Gu(Gu({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_loyalty_level",Gu(Gu({send_to:r,event_callback:o},s),p))},Ju=function(){return(Ju=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Qu=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Zu=function(t,e){var r=t.trackingId,n=Qu(e,[]);delete n.userId;var o=Ju({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewLoyaltyLevel",Ju(Ju({},a),c))},Xu=function(){return(Xu=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},tc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ec=function(t,e){var r=tc(e,[]);delete r.userId;var n=Xu({},r),o=H(n),a=u().meta,i=H(a);analytics.track("View Loyalty Level",Xu(Xu({},o),i))},rc=function(t){rt("viewLoyaltyLevel",t,{googleAnalyticsHandler:Ku,facebookPixelHandler:Zu,segmentHandler:ec})},nc={logEarnPoints:xu,logSharePoints:Mu,logSpendPoints:$u,logViewLoyaltyLevel:rc},oc=nc,ac=function(){return(ac=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ic=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},uc=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=ic(e,["callback","userId"]),c=null!=a?a:n,l=ac(ac({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","cancel_order",ac(ac({send_to:r,event_callback:o},s),p))},cc=function(){return(cc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},lc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},sc=function(t,e){var r=t.trackingId,n=lc(e,[]);delete n.userId;var o=cc({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"CancelOrder",cc(cc({},a),c))},fc=function(){return(fc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},pc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},yc=function(t,e){var r=t.currency,n=e.currency,o=e.orderTotal,a=e.products,i=pc(e,["currency","orderTotal","products"]);delete i.userId;var c=null!=n?n:r,l=fc(fc({},i),{revenue:o,currency:c}),s=H(l),f=u().meta,p=H(f);analytics.track("Order Cancelled",fc(fc({products:lt(a)},s),p))},dc=function(t){rt("cancelOrder",t,{googleAnalyticsHandler:uc,facebookPixelHandler:sc,segmentHandler:yc})},hc=function(){return(hc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},gc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},bc=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=gc(e,["callback","userId"]),c=null!=a?a:n,l=hc(hc({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","rate_order",hc(hc({send_to:r,event_callback:o},s),p))},vc=function(){return(vc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Oc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},mc=function(t,e){var r=t.trackingId,n=e.maxScore,o=e.score,a=Oc(e,["maxScore","score"]);delete a.userId;var i=vc(vc({},a),{maxScore:n,score:o}),c=H(i),l=u().meta,s=H(l);fbq("trackSingleCustom",r,"RateOrder",vc(vc({max_rating_value:n,value:o},c),s))},wc=function(){return(wc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},jc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Pc=function(t,e){var r=jc(e,[]);delete r.userId;var n=wc({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Rate Order",wc(wc({},o),i))},Ic=function(t){rt("rateOrder",t,{googleAnalyticsHandler:bc,facebookPixelHandler:mc,segmentHandler:Pc})},Sc=function(){return(Sc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},xc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},kc=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=e.orderId,s=e.orderTotal,f=xc(e,["callback","userId","currency","orderId","orderTotal"]),p=null!=i?i:n,y=null!=c?c:o,d=Sc(Sc({},f),{userId:p,currency:y}),h=H(d),g=u().meta,b=H(g);gtag("event","refund",Sc(Sc({send_to:r,event_callback:a,transaction_id:l,value:s},h),b))},Ac=function(){return(Ac=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ec=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},_c=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=e.orderTotal,i=Ec(e,["currency","orderTotal"]);delete i.userId;var c=null!=o?o:n,l=Ac(Ac({},i),{currency:c}),s=H(l),f=u().meta,p=H(f);fbq("trackSingleCustom",r,"RequestRefund",Ac(Ac({value:a},s),p))},Tc=function(){return(Tc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Cc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Rc=function(t,e){var r=t.currency,n=e.currency,o=e.orderTotal,a=e.products,i=Cc(e,["currency","orderTotal","products"]);delete i.userId;var c=null!=n?n:r,l=Tc(Tc({},i),{revenue:o,currency:c}),s=H(l),f=u().meta,p=H(f);analytics.track("Order Refunded",Tc(Tc({products:lt(a)},s),p))},Bc=function(t){rt("requestRefund",t,{googleAnalyticsHandler:kc,facebookPixelHandler:_c,segmentHandler:Rc})},Uc={logCancelOrder:dc,logRateOrder:Ic,logRequestRefund:Bc},Mc=Uc,Lc=function(){return(Lc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Hc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Nc=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Hc(e,["callback","userId"]),c=null!=a?a:n,l=Lc(Lc({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","generate_lead",Lc(Lc({send_to:r,event_callback:o},s),p))},Dc=function(){return(Dc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Yc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},qc=function(t,e){var r=t.trackingId,n=Yc(e,[]);delete n.userId;var o=Dc({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingle",r,"Lead",Dc(Dc({},a),c))},Fc=function(){return(Fc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},zc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Vc=function(t,e){var r=zc(e,[]);delete r.userId;var n=Fc({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Generate Lead",Fc(Fc({},o),i))},$c=function(t){void 0===t&&(t={}),rt("generateLead",t,{googleAnalyticsHandler:Nc,facebookPixelHandler:qc,segmentHandler:Vc})},Gc=function(){return(Gc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Wc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Kc=function(t,e){void 0===e&&(e={});var r=t.trackingId,n=Wc(e,[]);delete n.userId;var o=Gc({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingle",r,"PageView",Gc(Gc({},a),c))},Jc=function(){return(Jc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Qc=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Zc=function(t,e){void 0===e&&(e={});var r=t.trackingId,n=t.userId,o=e.pathname,a=e.name,i=e.callback,c=e.userId,l=Qc(e,["pathname","name","callback","userId"]),s=null!=c?c:n,f=Jc(Jc({},l),{userId:s}),p=H(f),y=u().meta,d=H(y);gtag("event","page_view",Jc(Jc({page_title:a,page_path:o,send_to:r,event_callback:i},p),d))},Xc=function(){return(Xc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},tl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},el=function(t,e){var r=e.name,n=tl(e,["name"]),o=H(n),a=u().meta,i=H(a);analytics.page(r,Xc(Xc({},o),i))},rl=function(t){rt("pageView",t,{googleAnalyticsHandler:Zc,facebookPixelHandler:Kc,segmentHandler:el})},nl=function(){return(nl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ol=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},al=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.query,c=ol(e,["callback","userId","query"]),l=null!=a?a:n,s=nl(nl({},c),{userId:l}),f=H(s),p=u().meta,y=H(p);gtag("event","search",nl(nl({send_to:r,event_callback:o,search_term:i},f),y))},il=function(){return(il=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ul=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},cl=function(t,e){var r=t.trackingId,n=e.query,o=ul(e,["query"]);delete o.userId;var a=il({},o),i=H(a),c=u().meta,l=H(c);fbq("trackSingle",r,"Search",il(il({search_string:n},i),l))},ll=function(){return(ll=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},sl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},fl=function(t,e){var r=sl(e,[]);delete r.userId;var n=ll({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Search Page Content",ll(ll({},o),i))},pl=function(t){rt("searchPageContent",t,{googleAnalyticsHandler:al,facebookPixelHandler:cl,segmentHandler:fl})},yl={logGenerateLead:$c,logPageView:rl,logSearchPageContent:pl},dl=yl,hl=function(){return(hl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},gl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},bl=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=gl(e,["callback","userId","currency"]),s=null!=i?i:n,f=null!=c?c:o,p=hl(hl({},l),{userId:s,currency:f}),y=H(p),d=u().meta,h=H(d);gtag("event","change_payment_type",hl(hl({send_to:r,event_callback:a},y),h))},vl=function(){return(vl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ol=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ml=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=Ol(e,["currency"]);delete a.userId;var i=null!=o?o:n,c=vl(vl({},a),{currency:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"ChangePaymentType",vl(vl({},l),f))},wl=function(){return(wl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},jl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Pl=function(t,e){var r=t.currency,n=e.currency,o=jl(e,["currency"]);delete o.userId;var a=null!=n?n:r,i=wl(wl({},o),{currency:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Change Payment Type",wl(wl({},c),s))},Il=function(t){rt("changePaymentType",t,{googleAnalyticsHandler:bl,facebookPixelHandler:ml,segmentHandler:Pl})},Sl=function(){return(Sl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},xl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},kl=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=xl(e,["callback","userId","currency"]),s=null!=i?i:n,f=null!=c?c:o,p=Sl(Sl({},l),{userId:s,currency:f}),y=H(p),d=u().meta,h=H(d);gtag("event","select_payment_type",Sl(Sl({send_to:r,event_callback:a},y),h))},Al=function(){return(Al=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},El=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},_l=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=El(e,["currency"]);delete a.userId;var i=null!=o?o:n,c=Al(Al({},a),{currency:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"SelectPaymentType",Al(Al({},l),f))},Tl=function(){return(Tl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Cl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Rl=function(t,e){var r=t.currency,n=e.currency,o=Cl(e,["currency"]);delete o.userId;var a=null!=n?n:r,i=Tl(Tl({},o),{currency:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Select Payment Type",Tl(Tl({},c),s))},Bl=function(t){rt("selectPaymentType",t,{googleAnalyticsHandler:kl,facebookPixelHandler:_l,segmentHandler:Rl})},Ul=function(){return(Ul=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ml=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ll=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=Ml(e,["callback","userId","currency"]),s=null!=i?i:n,f=null!=c?c:o,p=Ul(Ul({},l),{userId:s,currency:f}),y=H(p),d=u().meta,h=H(d);gtag("event","add_payment_info",Ul(Ul({send_to:r,event_callback:a},y),h))},Hl=function(){return(Hl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Nl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Dl=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=Nl(e,["currency"]);delete a.userId;var i=null!=o?o:n,c=Hl(Hl({},a),{currency:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingle",r,"AddPaymentInfo",Hl(Hl({success:1},l),f))},Yl=function(){return(Yl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ql=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Fl=function(t,e){var r=t.currency,n=e.currency,o=ql(e,["currency"]);delete o.userId;var a=null!=n?n:r,i=Yl(Yl({},o),{currency:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Set Payment Info",Yl(Yl({},c),s))},zl=function(t){rt("setPaymentInfo",t,{googleAnalyticsHandler:Ll,facebookPixelHandler:Dl,segmentHandler:Fl})},Vl={logChangePaymentType:Il,logSelectPaymentType:Bl,logSetPaymentInfo:zl},$l=Vl,Gl=function(){return(Gl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Wl=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Kl=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.product,c=Wl(e,["callback","userId","product"]),l=null!=a?a:n,s=i.productId,f=i.name,p=Gl(Gl({},c),{userId:l,productId:s,productName:f}),y=H(p),d=u().meta,h=H(d);gtag("event","customize_product",Gl(Gl({send_to:r,event_callback:o},y),h))},Jl=function(){return(Jl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ql=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Zl=function(t,e){var r=t.trackingId,n=e.product,o=Ql(e,["product"]);delete o.userId;var a=n.productId,i=n.name,c=Jl(Jl({},o),{productId:a,productName:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingle",r,"CustomizeProduct",Jl(Jl({},l),f))},Xl=function(){return(Xl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ts=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},es=function(t,e){var r=e.product,n=ts(e,["product"]);delete n.userId;var o=r.productId,a=r.name,i=Xl(Xl({},n),{productId:o,productName:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Customize Product",Xl(Xl({},c),s))},rs=function(t){rt("customizeProduct",t,{googleAnalyticsHandler:Kl,facebookPixelHandler:Zl,segmentHandler:es})},ns=function(){return(ns=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},os=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},as=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=os(e,["callback","userId"]),c=null!=a?a:n,l=ns(ns({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","filter_products",ns(ns({send_to:r,event_callback:o},s),p))},is=function(){return(is=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},us=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},cs=function(t,e){var r=t.trackingId,n=us(e,[]);delete n.userId;var o=is({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"FilterProducts",is(is({},a),c))},ls=function(){return(ls=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ss=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},fs=function(t,e){var r=e.filterBy,n=ss(e,["filterBy"]);delete n.userId;var o=ls(ls({},n),{filterBy:ct(r)}),a=H(o),i=u().meta,c=H(i);analytics.track("Filter Products",ls(ls({},a),c))},ps=function(t){rt("filterProducts",t,{googleAnalyticsHandler:as,facebookPixelHandler:cs,segmentHandler:fs})},ys=function(){return(ys=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ds=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},hs=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=ds(e,["callback","userId","product","currency"]),f=null!=i?i:n,p=null!=l?l:o,y=c.productId,d=c.name,h=ys(ys({},s),{userId:f,productId:y,productName:d,currency:p}),g=Object(J.getProductTotals)(c),b=H(h),v=u().meta,O=H(v);gtag("event","product_impression",ys(ys({send_to:r,event_callback:a,value:g.netPrice},b),O))},gs=function(){return(gs=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},bs=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},vs=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.currency,i=bs(e,["product","currency"]);delete i.userId;var c=null!=a?a:n,l=o.productId,s=o.name,f=Object(J.getProductTotals)(o),p=gs(gs({},i),{productId:l,productName:s,currency:c}),y=H(p),d=u().meta,h=H(d);fbq("trackSingleCustom",r,"ProductImpression",gs(gs({value:f.netPrice},y),h))},Os=function(){return(Os=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ms=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ws=function(t,e){var r=t.currency,n=e.product,o=e.currency,a=ms(e,["product","currency"]);delete a.userId;var i=null!=o?o:r,c=n.productId,l=n.name,s=Os(Os({},a),{productId:c,name:l,currency:i}),f=H(s),p=u().meta,y=H(p),d=Object(J.getProductTotals)(n);analytics.track("Product Viewed",Os(Os({price:d.netPrice},f),y))},js=function(t){rt("productImpression",t,{googleAnalyticsHandler:hs,facebookPixelHandler:vs,segmentHandler:ws})},Ps=function(){return(Ps=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Is=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ss=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Is(e,["callback","userId"]),c=null!=a?a:n,l=Ps(Ps({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","search_product_success",Ps(Ps({send_to:r,event_callback:o},s),p))},xs=function(){return(xs=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ks=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},As=function(t,e){var r=t.trackingId,n=e.query,o=ks(e,["query"]);delete o.userId;var a=xs({},o),i=H(a),c=u().meta,l=H(c);fbq("trackSingle",r,"Search",xs(xs({search_string:n,success:1},i),l))},Es=function(){return(Es=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},_s=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ts=function(t,e){var r=_s(e,[]);delete r.userId;var n=Es({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Products Searched",Es(Es({},o),i))},Cs=function(t){rt("searchProductSuccess",t,{googleAnalyticsHandler:Ss,facebookPixelHandler:As,segmentHandler:Ts})},Rs=function(){return(Rs=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bs=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Us=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.query,c=Bs(e,["callback","userId","query"]),l=null!=a?a:n,s=Rs(Rs({},c),{userId:l}),f=H(s),p=u().meta,y=H(p);gtag("event","search",Rs(Rs({send_to:r,event_callback:o,search_term:i},f),y))},Ms=function(){return(Ms=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ls=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Hs=function(t,e){var r=t.trackingId,n=e.query,o=Ls(e,["query"]);delete o.userId;var a=Ms({},o),i=H(a),c=u().meta,l=H(c);fbq("trackSingle",r,"Search",Ms(Ms({search_string:n},i),l))},Ns=function(){return(Ns=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ds=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ys=function(t,e){var r=Ds(e,[]);delete r.userId;var n=Ns({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Search Product Attempt",Ns(Ns({},o),i))},qs=function(t){rt("searchProductAttempt",t,{googleAnalyticsHandler:Us,facebookPixelHandler:Hs,segmentHandler:Ys})},Fs=function(){return(Fs=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},zs=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Vs=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=zs(e,["callback","userId"]),c=null!=a?a:n,l=Fs(Fs({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","search_product_not_found",Fs(Fs({send_to:r,event_callback:o},s),p))},$s=function(){return($s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Gs=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ws=function(t,e){var r=t.trackingId,n=e.query,o=Gs(e,["query"]);delete o.userId;var a=$s({},o),i=H(a),c=u().meta,l=H(c);fbq("trackSingle",r,"Search",$s($s({search_string:n,success:0},i),l))},Ks=function(){return(Ks=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Js=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Qs=function(t,e){var r=Js(e,[]);delete r.userId;var n=Ks({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Search Product Not Found",Ks(Ks({},o),i))},Zs=function(t){rt("searchProductNotFound",t,{googleAnalyticsHandler:Vs,facebookPixelHandler:Ws,segmentHandler:Qs})},Xs=function(){return(Xs=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},tf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ef=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=tf(e,["callback","userId","product","currency"]);s.contentType&&delete s.contentType;var f=null!=i?i:n,p=null!=l?l:o,y=c.productId,d=c.name,h=Xs(Xs({},s),{userId:f,productId:y,productName:d,currency:p}),g=Object(J.getProductTotals)(c),b=H(h),v=u().meta,O=H(v);gtag("event","select_content",Xs(Xs({send_to:r,event_callback:a,content_type:"product",value:g.netPrice},b),O))},rf=function(){return(rf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},nf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},of=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.currency,i=nf(e,["product","currency"]);delete i.userId;var c=null!=a?a:n,l=o.productId,s=o.name,f=Object(J.getProductTotals)(o),p=rf(rf({},i),{productId:l,productName:s,currency:c}),y=H(p),d=u().meta,h=H(d);fbq("trackSingleCustom",r,"SelectProduct",rf(rf({value:f.netPrice},y),h))},af=function(){return(af=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},uf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},cf=function(t,e){var r=t.currency,n=e.product,o=e.currency,a=uf(e,["product","currency"]);delete a.userId;var i=null!=o?o:r,c=n.productId,l=n.name,s=af(af({},a),{productId:c,name:l,currency:i}),f=H(s),p=u().meta,y=H(p),d=Object(J.getProductTotals)(n);analytics.track("Product Clicked",af(af({price:d.netPrice},f),y))},lf=function(t){rt("selectProduct",t,{googleAnalyticsHandler:ef,facebookPixelHandler:of,segmentHandler:cf})},sf=function(){return(sf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ff=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},pf=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=ff(e,["callback","userId"]),c=null!=a?a:n,l=sf(sf({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","sort_products",sf(sf({send_to:r,event_callback:o},s),p))},yf=function(){return(yf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},df=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},hf=function(t,e){var r=t.trackingId,n=df(e,[]);delete n.userId;var o=yf({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SortProducts",yf(yf({},a),c))},gf=function(){return(gf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},bf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},vf=function(t,e){var r=bf(e,[]);delete r.userId;var n=gf({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Sort Products",gf(gf({},o),i))},Of=function(t){rt("sortProducts",t,{googleAnalyticsHandler:pf,facebookPixelHandler:hf,segmentHandler:vf})},mf=function(){return(mf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},wf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},jf=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=wf(e,["callback","userId","product","currency"]),f=null!=i?i:n,p=null!=l?l:o,y=c.productId,d=c.name,h=mf(mf({},s),{userId:f,productId:y,productName:d,currency:p}),g=Object(J.getProductTotals)(c),b=H(h),v=u().meta,O=H(v);gtag("event","view_item",mf(mf({send_to:r,event_callback:a,value:g.netPrice},b),O))},Pf=function(){return(Pf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},If=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Sf=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.currency,i=If(e,["product","currency"]);delete i.userId;var c=null!=a?a:n,l=o.productId,s=o.name,f=Object(J.getProductTotals)(o),p=Pf(Pf({},i),{productId:l,productName:s,currency:c}),y=H(p),d=u().meta,h=H(d);fbq("trackSingle",r,"ViewContent",Pf(Pf({value:f.netPrice},y),h))},xf=function(){return(xf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},kf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Af=function(t,e){var r=t.currency,n=e.product,o=e.currency,a=kf(e,["product","currency"]);delete a.userId;var i=null!=o?o:r,c=n.productId,l=n.name,s=xf(xf({},a),{productId:c,name:l,currency:i}),f=H(s),p=u().meta,y=H(p),d=Object(J.getProductTotals)(n);analytics.track("View Product Details",xf(xf({price:d.netPrice},f),y))},Ef=function(t){rt("viewProductDetails",t,{googleAnalyticsHandler:jf,facebookPixelHandler:Sf,segmentHandler:Af})},_f={logCustomizeProduct:rs,logFilterProducts:ps,logProductImpression:js,logSearchProductSuccess:Cs,logSearchProductAttempt:qs,logSearchProductNotFound:Zs,logSelectProduct:lf,logSortProducts:Of,logViewProductDetails:Ef},Tf=_f,Cf=function(){return(Cf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Rf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Bf=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=e.shoppingCart,s=Rf(e,["callback","userId","currency","shoppingCart"]),f=null!=i?i:n,p=null!=c?c:o,y=Cf(Cf({},s),{userId:f,currency:p}),d=H(y),h=u().meta,g=H(h),b=Object(K.getShoppingCartTotal)(l),v=b.total,O=b.totalPoints;gtag("event","purchase_attempt",Cf(Cf({send_to:r,event_callback:a,items:it(l,p),value:v,points:O},d),g))},Uf=function(){return(Uf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Mf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Lf=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=e.shoppingCart,i=Mf(e,["currency","shoppingCart"]);delete i.userId;var c=null!=o?o:n,l=Uf(Uf({},i),{currency:c}),s=H(l),f=u().meta,p=H(f),y=nt(a),d=Object(K.getShoppingCartTotal)(a),h=d.total,g=d.totalPoints;fbq("trackSingleCustom",r,"PurchaseAttempt",Uf(Uf({content_ids:y,contents:ot(a),num_items:y.length,value:h,points:g},s),p))},Hf=function(){return(Hf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Nf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Df=function(t,e){var r=t.currency,n=e.currency,o=e.shoppingCart,a=Nf(e,["currency","shoppingCart"]);delete a.userId;var i=null!=n?n:r,c=Hf(Hf({},a),{currency:i}),l=H(c),s=u().meta,f=H(s),p=Object(K.getShoppingCartProducts)(o),y=Object(K.getShoppingCartTotal)(o),d=y.total,h=y.totalTaxes,g=y.shippingCost,b=y.totalPoints;analytics.track("Purchase Attempt",Hf(Hf({total:d,revenue:d-h-(null!=g?g:0),shipping:g,tax:h,products:lt(p),points:b},l),f))},Yf=function(t){rt("purchaseAttempt",t,{googleAnalyticsHandler:Bf,facebookPixelHandler:Lf,segmentHandler:Df})},qf=function(){return(qf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ff=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},zf=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=e.shoppingCart,s=Ff(e,["callback","userId","currency","shoppingCart"]),f=null!=i?i:n,p=null!=c?c:o,y=qf(qf({},s),{userId:f,currency:p}),d=H(y),h=u().meta,g=H(h),b=Object(K.getShoppingCartTotal)(l),v=b.total,O=b.totalPoints;gtag("event","purchase_fail",qf(qf({send_to:r,event_callback:a,items:it(l,p),value:v,points:O},d),g))},Vf=function(){return(Vf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$f=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Gf=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=e.shoppingCart,i=$f(e,["currency","shoppingCart"]);delete i.userId;var c=null!=o?o:n,l=Vf(Vf({},i),{currency:c}),s=H(l),f=u().meta,p=H(f),y=nt(a),d=Object(K.getShoppingCartTotal)(a),h=d.total,g=d.totalPoints;fbq("trackSingleCustom",r,"PurchaseFail",Vf(Vf({content_ids:y,contents:ot(a),num_items:y.length,value:h,points:g},s),p))},Wf=function(){return(Wf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Kf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Jf=function(t,e){var r=t.currency,n=e.currency,o=e.shoppingCart,a=Kf(e,["currency","shoppingCart"]);delete a.userId;var i=null!=n?n:r,c=Wf(Wf({},a),{currency:i}),l=H(c),s=u().meta,f=H(s),p=Object(K.getShoppingCartProducts)(o),y=Object(K.getShoppingCartTotal)(o),d=y.total,h=y.totalTaxes,g=y.shippingCost,b=y.totalPoints;analytics.track("Purchase Fail",Wf(Wf({total:d,revenue:d-h-(null!=g?g:0),shipping:g,tax:h,products:lt(p),points:b},l),f))},Qf=function(t){rt("purchaseFail",t,{googleAnalyticsHandler:zf,facebookPixelHandler:Gf,segmentHandler:Jf})},Zf=function(){return(Zf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Xf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},tp=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.currency,l=e.shoppingCart,s=e.orderId,f=Xf(e,["callback","userId","currency","shoppingCart","orderId"]),p=null!=i?i:n,y=null!=c?c:o,d=Zf(Zf({},f),{userId:p,currency:y}),h=Object(K.getShoppingCartTotal)(l),g=h.total,b=h.shippingCost,v=h.totalTaxes,O=h.totalPoints,m=H(d),w=u().meta,j=H(w);gtag("event","purchase",Zf(Zf({send_to:r,event_callback:a,items:it(l,y),value:g,points:O,transaction_id:s,shipping:b,tax:v},m),j))},ep=function(){return(ep=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},rp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},np=function(t,e){var r=t.trackingId,n=t.currency,o=e.currency,a=e.shoppingCart,i=rp(e,["currency","shoppingCart"]);delete i.userId;var c=null!=o?o:n,l=ep(ep({},i),{currency:c}),s=H(l),f=u().meta,p=H(f),y=nt(a),d=Object(K.getShoppingCartTotal)(a),h=d.total,g=d.totalPoints;fbq("trackSingle",r,"Purchase",ep(ep({content_ids:y,contents:ot(a),num_items:y.length,value:h,points:g},s),p))},op=function(){return(op=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ap=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ip=function(t,e){var r=t.currency,n=e.currency,o=e.shoppingCart,a=ap(e,["currency","shoppingCart"]);delete a.userId;var i=null!=n?n:r,c=op(op({},a),{currency:i}),l=H(c),s=u().meta,f=H(s),p=Object(K.getShoppingCartProducts)(o),y=Object(K.getShoppingCartTotal)(o),d=y.total,h=y.totalTaxes,g=y.shippingCost,b=y.totalPoints;analytics.track("Order Completed",op(op({total:d,revenue:d-h-(null!=g?g:0),shipping:g,tax:h,products:lt(p),points:b},l),f))},up=function(t){rt("purchaseSuccess",t,{googleAnalyticsHandler:tp,facebookPixelHandler:np,segmentHandler:ip})},cp={logPurchaseAttempt:Yf,logPurchaseFail:Qf,logPurchaseSuccess:up},lp=cp,sp=function(){return(sp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},fp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},pp=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=fp(e,["callback","userId"]),c=null!=a?a:n,l=sp(sp({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_settings",sp(sp({send_to:r,event_callback:o},s),p))},yp=function(){return(yp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},dp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},hp=function(t,e){var r=t.trackingId,n=dp(e,[]);delete n.userId;var o=yp({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewSettings",yp(yp({},a),c))},gp=function(){return(gp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},bp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},vp=function(t,e){var r=bp(e,[]);delete r.userId;var n=gp({},r),o=H(n),a=u().meta,i=H(a);analytics.track("View Settings",gp(gp({},o),i))},Op=function(t){void 0===t&&(t={}),rt("viewSettings",t,{googleAnalyticsHandler:pp,facebookPixelHandler:hp,segmentHandler:vp})},mp={logViewSettings:Op},wp=mp,jp=function(){return(jp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Pp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ip=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Pp(e,["callback","userId"]);delete i.identify;var c=null!=a?a:n,l=jp(jp({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","add_shipping_info",jp(jp({send_to:r,event_callback:o},s),p))},Sp=function(){return(Sp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},xp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},kp=function(t,e){var r=t.trackingId,n=xp(e,[]);delete n.userId,delete n.identify;var o=Sp({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"AddShippingAddress",Sp(Sp({},a),c))},Ap=function(){return(Ap=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ep=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},_p=function(t,e){var r=e.identify,n=Ep(e,["identify"]);delete n.userId;var o=Ap({},n),a=H(o),i=u().meta,c=H(i);analytics.track("Add Shipping Address",Ap(Ap({},a),c)),r&&analytics.identify(r.id,r)},Tp=function(t){rt("addShippingAddress",t,{googleAnalyticsHandler:Ip,facebookPixelHandler:kp,segmentHandler:_p})},Cp=function(){return(Cp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Rp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Bp=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Rp(e,["callback","userId"]);delete i.identify;var c=null!=a?a:n,l=Cp(Cp({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","select_shipping_address",Cp(Cp({send_to:r,event_callback:o},s),p))},Up=function(){return(Up=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Mp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Lp=function(t,e){var r=t.trackingId,n=Mp(e,[]);delete n.userId,delete n.identify;var o=Up({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SelectShippingAddress",Up(Up({},a),c))},Hp=function(){return(Hp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Np=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Dp=function(t,e){var r=e.identify,n=Np(e,["identify"]);delete n.userId;var o=Hp({},n),a=H(o),i=u().meta,c=H(i);analytics.track("Select Shipping Address",Hp(Hp({},a),c)),r&&analytics.identify(r.id,r)},Yp=function(t){rt("selectShippingAddress",t,{googleAnalyticsHandler:Bp,facebookPixelHandler:Lp,segmentHandler:Dp})},qp=function(){return(qp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Fp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},zp=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Fp(e,["callback","userId"]);delete i.identify;var c=null!=a?a:n,l=qp(qp({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","update_shipping_info",qp(qp({send_to:r,event_callback:o},s),p))},Vp=function(){return(Vp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$p=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Gp=function(t,e){var r=t.trackingId,n=$p(e,[]);delete n.userId,delete n.identify;var o=Vp({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"UpdateShippingAddress",Vp(Vp({},a),c))},Wp=function(){return(Wp=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Kp=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Jp=function(t,e){var r=e.fields,n=e.identify,o=Kp(e,["fields","identify"]);delete o.userId;var a=Wp(Wp({},o),{fields:ct(r)}),i=H(a),c=u().meta,l=H(c);analytics.track("Update Shipping Address",Wp(Wp({},i),l)),n&&analytics.identify(n.id,n)},Qp=function(t){rt("updateShippingAddress",t,{googleAnalyticsHandler:zp,facebookPixelHandler:Gp,segmentHandler:Jp})},Zp={logAddShippingAddress:Tp,logSelectShippingAddress:Yp,logUpdateShippingAddress:Qp},Xp=Zp,ty=function(){return(ty=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ey=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ry=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=e.store,f=e.priceCategory,p=ey(e,["callback","userId","product","currency","store","priceCategory"]),y=null!=i?i:n,d=null!=l?l:o,h=s.storeName,g=s.storeId,b=ty(ty({},p),{userId:y,storeId:g,storeName:h,currency:d}),v=H(b),O=u().meta,m=H(O),w=Object(J.getProductTotals)(c).netPrice,j=c.priceCategory,P=null!=f?f:j,I="NORMAL"===P?w:0,S="POINTS"===P?w:0;gtag("event","add_to_cart",ty(ty({send_to:r,event_callback:a,items:[ut(c,d)],value:I,points:S},v),m))},ny=function(){return(ny=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},oy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ay=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.store,i=e.currency,c=e.priceCategory,l=oy(e,["product","store","currency","priceCategory"]);delete l.userId;var s=null!=i?i:n,f=o.productId,p=o.name,y=o.amount,d=a.storeName,h=a.storeId,g=ny(ny({},l),{storeId:h,storeName:d,amount:y,currency:s}),b=H(g),v=u().meta,O=H(v),m=Object(J.getProductTotals)(o).netPrice,w=o.priceCategory,j=null!=c?c:w,P="NORMAL"===j?m:0,I="POINTS"===j?m:0;fbq("trackSingle",r,"AddToCart",ny(ny({content_id:f,content_name:p,content:at(o),value:P,points:I},b),O))},iy=function(){return(iy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},uy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},cy=function(t,e){var r=t.currency,n=e.product,o=e.store,a=e.currency,i=e.priceCategory,c=uy(e,["product","store","currency","priceCategory"]);delete c.userId;var l=null!=a?a:r,s=n.productId,f=n.name,p=n.amount,y=o.storeName,d=o.storeId,h=iy(iy({},c),{storeId:d,storeName:y,productId:s,quantity:p,name:f,currency:l}),g=H(h),b=u().meta,v=H(b),O=n.priceCategory,m=null!=i?i:O,w=Object(J.getProductTotals)(n).netPrice,j="NORMAL"===m?w:0,P="POINTS"===m?w:0;analytics.track("Product Added",iy(iy({price:j,points:P},g),v))},ly=function(t){rt("addProductToCart",t,{googleAnalyticsHandler:ry,facebookPixelHandler:ay,segmentHandler:cy})},sy=function(){return(sy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},fy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},py=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=e.priceCategory,f=fy(e,["callback","userId","product","currency","priceCategory"]),p=null!=i?i:n,y=null!=l?l:o,d=sy(sy({},f),{userId:p,currency:y}),h=H(d),g=u().meta,b=H(g),v=Object(J.getProductTotals)(c).netPrice,O=c.priceCategory,m=null!=s?s:O,w="NORMAL"===m?v:0,j="POINTS"===m?v:0;gtag("event","add_to_wishlist",sy(sy({send_to:r,event_callback:a,items:[ut(c,y)],value:w,points:j},h),b))},yy=function(){return(yy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},dy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},hy=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.currency,i=e.priceCategory,c=dy(e,["product","currency","priceCategory"]);delete c.userId;var l=null!=a?a:n,s=o.productId,f=o.name,p=o.amount,y=yy(yy({},c),{amount:p,currency:l}),d=H(y),h=u().meta,g=Object(J.getProductTotals)(o).netPrice,b=o.priceCategory,v=null!=i?i:b,O="NORMAL"===v?g:0,m="POINTS"===v?g:0,w=H(h);fbq("trackSingle",r,"AddToWishlist",yy(yy({content_id:s,content_name:f,content:at(o),value:O,points:m},d),w))},gy=function(){return(gy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},by=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},vy=function(t,e){var r=t.currency,n=e.product,o=e.currency,a=e.priceCategory,i=by(e,["product","currency","priceCategory"]);delete i.userId;var c=null!=o?o:r,l=n.productId,s=n.name,f=n.amount,p=gy(gy({},i),{productId:l,quantity:f,name:s,currency:c}),y=H(p),d=u().meta,h=H(d),g=n.priceCategory,b=null!=a?a:g,v=Object(J.getProductTotals)(n).netPrice,O="NORMAL"===b?v:0,m="POINTS"===b?v:0;analytics.track("Add Product To Wishlist",gy(gy({price:O,points:m},y),h))},Oy=function(t){rt("addProductToWishlist",t,{googleAnalyticsHandler:py,facebookPixelHandler:hy,segmentHandler:vy})},my=function(){return(my=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},wy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},jy=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=wy(e,["callback","userId"]),c=null!=a?a:n,l=my(my({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","clear_cart",my(my({send_to:r,event_callback:o},s),p))},Py=function(){return(Py=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Iy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Sy=function(t,e){var r=t.trackingId,n=Iy(e,[]);delete n.userId;var o=Py({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ClearCart",Py(Py({},a),c))},xy=function(){return(xy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ky=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ay=function(t,e){var r=ky(e,[]);delete r.userId;var n=xy({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Clear Cart",xy(xy({},o),i))},Ey=function(t){rt("clearCart",t,{googleAnalyticsHandler:jy,facebookPixelHandler:Sy,segmentHandler:Ay})},_y=function(){return(_y=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ty=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Cy=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=e.store,f=e.priceCategory,p=Ty(e,["callback","userId","product","currency","store","priceCategory"]),y=null!=i?i:n,d=null!=l?l:o,h=c.productId,g=c.name,b=s.storeName,v=s.storeId,O=_y(_y({},p),{userId:y,productId:h,productName:g,storeId:v,storeName:b,currency:d}),m=H(O),w=u().meta,j=H(w),P=Object(J.getProductTotals)(c).netPrice,I=c.priceCategory,S=null!=f?f:I;gtag("event","remove_product_from_cart",_y(_y({send_to:r,event_callback:a,value:"NORMAL"===S?P:0,points:"POINTS"===S?P:0},m),j))},Ry=function(){return(Ry=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},By=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Uy=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.store,i=e.currency,c=e.priceCategory,l=By(e,["product","store","currency","priceCategory"]);delete l.userId;var s=null!=i?i:n,f=o.productId,p=o.name,y=o.amount,d=a.storeName,h=a.storeId,g=Ry(Ry({},l),{storeId:h,storeName:d,amount:y,currency:s}),b=H(g),v=u().meta,O=H(v),m=Object(J.getProductTotals)(o).netPrice,w=o.priceCategory,j=null!=c?c:w,P="NORMAL"===j?m:0,I="POINTS"===j?m:0;fbq("trackSingleCustom",r,"RemoveProductFromCart",Ry(Ry({content_id:f,content_name:p,content:at(o),value:P,points:I},b),O))},My=function(){return(My=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ly=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Hy=function(t,e){var r=t.currency,n=e.product,o=e.store,a=e.currency,i=e.priceCategory,c=Ly(e,["product","store","currency","priceCategory"]);delete c.userId;var l=null!=a?a:r,s=n.productId,f=n.name,p=n.amount,y=o.storeName,d=o.storeId,h=My(My({},c),{storeId:d,storeName:y,productId:s,quantity:p,name:f,currency:l}),g=H(h),b=u().meta,v=H(b),O=n.priceCategory,m=null!=i?i:O,w=Object(J.getProductTotals)(n).netPrice,j="NORMAL"===m?w:0,P="POINTS"===m?w:0;analytics.track("Product Removed",My(My({price:j,points:P},g),v))},Ny=function(){return(Ny=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Dy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Yy=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=e.priceCategory,f=Dy(e,["callback","userId","product","currency","priceCategory"]),p=null!=i?i:n,y=null!=l?l:o,d=c.productId,h=c.name,g=Ny(Ny({},f),{userId:p,productId:d,productName:h,currency:y}),b=H(g),v=u().meta,O=H(v),m=Object(J.getProductTotals)(c).netPrice,w=c.priceCategory,j=null!=s?s:w;gtag("event","remove_product_from_wishlist",Ny(Ny({send_to:r,event_callback:a,value:"NORMAL"===j?m:0,points:"POINTS"===j?m:0},b),O))},qy=function(){return(qy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Fy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},zy=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.currency,i=e.priceCategory,c=Fy(e,["product","currency","priceCategory"]);delete c.userId;var l=null!=a?a:n,s=o.productId,f=o.name,p=o.amount,y=qy(qy({},c),{amount:p,currency:l}),d=H(y),h=u().meta,g=H(h),b=Object(J.getProductTotals)(o).netPrice,v=o.priceCategory,O=null!=i?i:v,m="NORMAL"===O?b:0,w="POINTS"===O?b:0;fbq("trackSingleCustom",r,"RemoveProductFromWishlist",qy(qy({content_id:s,content_name:f,content:at(o),value:m,points:w},d),g))},Vy=function(){return(Vy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$y=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Gy=function(t,e){var r=t.currency,n=e.product,o=e.currency,a=e.priceCategory,i=$y(e,["product","currency","priceCategory"]);delete i.userId;var c=null!=o?o:r,l=n.productId,s=n.name,f=n.amount,p=Vy(Vy({},i),{productId:l,quantity:f,name:s,currency:c}),y=H(p),d=u().meta,h=H(d),g=n.priceCategory,b=null!=a?a:g,v=Object(J.getProductTotals)(n).netPrice,O="NORMAL"===b?v:0,m="POINTS"===b?v:0;analytics.track("Remove Product From Wishlist",Vy(Vy({price:O,points:m},y),h))},Wy=function(){return(Wy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ky=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Jy=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=e.store,f=e.priceCategory,p=Ky(e,["callback","userId","product","currency","store","priceCategory"]),y=c.productId,d=c.name,h=null!=i?i:n,g=null!=l?l:o,b=s.storeName,v=s.storeId,O=Wy(Wy({},p),{userId:h,storeId:v,storeName:b,productId:y,productName:d,currency:g}),m=H(O),w=u().meta,j=H(w),P=Object(J.getProductTotals)(c).netPrice,I=c.priceCategory,S=null!=f?f:I;gtag("event","update_product_in_cart",Wy(Wy({send_to:r,event_callback:a,value:"NORMAL"===S?P:0,points:"POINTS"===S?P:0},m),j))},Qy=function(){return(Qy=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Zy=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Xy=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.store,i=e.currency,c=e.priceCategory,l=Zy(e,["product","store","currency","priceCategory"]);delete l.userId;var s=null!=i?i:n,f=o.productId,p=o.name,y=o.amount,d=a.storeName,h=a.storeId,g=Qy(Qy({},l),{storeId:h,storeName:d,amount:y,currency:s}),b=H(g),v=u().meta,O=H(v),m=Object(J.getProductTotals)(o).netPrice,w=o.priceCategory,j=null!=c?c:w,P="NORMAL"===j?m:0,I="POINTS"===j?m:0;fbq("trackSingleCustom",r,"UpdateProductInCart",Qy(Qy({content_id:f,content_name:p,content:at(o),value:P,points:I},b),O))},td=function(){return(td=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ed=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},rd=function(t,e){var r=t.currency,n=e.product,o=e.store,a=e.currency,i=e.fields,c=e.priceCategory,l=ed(e,["product","store","currency","fields","priceCategory"]);delete l.userId;var s=null!=a?a:r,f=n.productId,p=n.name,y=n.amount,d=o.storeName,h=o.storeId,g=td(td({},l),{storeId:h,storeName:d,productId:f,quantity:y,name:p,currency:s,fields:ct(i)}),b=H(g),v=u().meta,O=H(v),m=n.priceCategory,w=null!=c?c:m,j=Object(J.getProductTotals)(n).netPrice,P="NORMAL"===w?j:0,I="POINTS"===w?j:0;analytics.track("Update Product In Cart",td(td({price:P,points:I},b),O))},nd=function(){return(nd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},od=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ad=function(t,e){var r=t.trackingId,n=t.userId,o=t.currency,a=e.callback,i=e.userId,c=e.product,l=e.currency,s=e.priceCategory,f=od(e,["callback","userId","product","currency","priceCategory"]),p=c.productId,y=c.name,d=null!=i?i:n,h=null!=l?l:o,g=nd(nd({},f),{userId:d,productId:p,productName:y,currency:h}),b=H(g),v=u().meta,O=H(v),m=Object(J.getProductTotals)(c).netPrice,w=c.priceCategory,j=null!=s?s:w;gtag("event","update_product_in_wishlist",nd(nd({send_to:r,event_callback:a,value:"NORMAL"===j?m:0,points:"POINTS"===j?m:0},b),O))},id=function(){return(id=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ud=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},cd=function(t,e){var r=t.trackingId,n=t.currency,o=e.product,a=e.currency,i=e.priceCategory,c=ud(e,["product","currency","priceCategory"]);delete c.userId;var l=null!=a?a:n,s=o.productId,f=o.name,p=o.amount,y=id(id({},c),{amount:p,currency:l}),d=H(y),h=u().meta,g=H(h),b=Object(J.getProductTotals)(o).netPrice,v=o.priceCategory,O=null!=i?i:v,m="NORMAL"===O?b:0,w="POINTS"===O?b:0;fbq("trackSingleCustom",r,"UpdateProductInWishlist",id(id({content_id:s,content_name:f,content:at(o),value:m,points:w},d),g))},ld=function(){return(ld=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},sd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},fd=function(t,e){var r=t.currency,n=e.product,o=e.currency,a=e.fields,i=e.priceCategory,c=sd(e,["product","currency","fields","priceCategory"]);delete c.userId;var l=null!=o?o:r,s=n.productId,f=n.name,p=n.amount,y=ld(ld({},c),{productId:s,quantity:p,name:f,currency:l,fields:ct(a)}),d=H(y),h=u().meta,g=H(h),b=n.priceCategory,v=null!=i?i:b,O=Object(J.getProductTotals)(n).netPrice,m="NORMAL"===v?O:0,w="POINTS"===v?O:0;analytics.track("Update Product In Wishlist",ld(ld({price:m,points:w},d),g))},pd=function(){return(pd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},yd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},dd=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=yd(e,["callback","userId"]),c=null!=a?a:n,l=pd(pd({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","view_cart",pd(pd({send_to:r,event_callback:o},s),p))},hd=function(){return(hd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},gd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},bd=function(t,e){var r=t.trackingId,n=gd(e,[]);delete n.userId;var o=hd({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ViewCart",hd(hd({},a),c))},vd=function(){return(vd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Od=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},md=function(t,e){var r=e.products,n=Od(e,["products"]);delete n.userId;var o=vd({},n),a=H(o),i=u().meta,c=H(i);analytics.track("Cart Viewed",vd(vd({products:lt(r)},a),c))},wd=function(){return(wd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},jd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Pd=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.shareTarget,c=e.itemId,l=jd(e,["callback","userId","shareTarget","itemId"]),s=null!=a?a:n,f=wd(wd({},l),{userId:s}),p=H(f),y=u().meta,d=H(y);gtag("event","share",wd(wd({send_to:r,event_callback:o,method:i,content_id:c},p),d))},Id=function(){return(Id=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Sd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},xd=function(t,e){var r=t.trackingId,n=Sd(e,[]);delete n.userId;var o=Id({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"Share",Id(Id({},a),c))},kd=function(){return(kd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ad=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ed=function(t,e){var r=e.shareTarget,n=Ad(e,["shareTarget"]);delete n.userId;var o=kd(kd({},n),{shareVia:r}),a=H(o),i=u().meta,c=H(i);analytics.track("Share",kd(kd({},a),c))},_d=function(){return(_d=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Td=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Cd=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.previousStore,c=e.nextStore,l=Td(e,["callback","userId","previousStore","nextStore"]),s=i.storeId,f=i.storeName,p=c.storeId,y=c.storeName,d=null!=a?a:n,h=_d(_d({},l),{userId:d,previousStoreId:s,previousStoreName:f,nextStoreId:p,nextStoreName:y}),g=H(h),b=u().meta,v=H(b);gtag("event","change_store",_d(_d({send_to:r,event_callback:o},g),v))},Rd=function(){return(Rd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ud=function(t,e){var r=t.trackingId,n=e.previousStore,o=e.nextStore,a=Bd(e,["previousStore","nextStore"]);delete a.userId;var i=n.storeId,c=n.storeName,l=o.storeId,s=o.storeName,f=Rd(Rd({},a),{previousStoreId:i,previousStoreName:c,nextStoreId:l,nextStoreName:s}),p=H(f),y=u().meta,d=H(y);fbq("trackSingleCustom",r,"ChangeStore",Rd(Rd({},p),d))},Md=function(){return(Md=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ld=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Hd=function(t,e){var r=e.previousStore,n=e.nextStore,o=Ld(e,["previousStore","nextStore"]);delete o.userId;var a=r.storeId,i=r.storeName,c=n.storeId,l=n.storeName,s=Md(Md({},o),{previousStoreId:a,previousStoreName:i,nextStoreId:c,nextStoreName:l}),f=H(s),p=u().meta,y=H(p);analytics.track("Change Store",Md(Md({},f),y))},Nd=function(){return(Nd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Dd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Yd=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=e.store,c=Dd(e,["callback","userId","store"]),l=i.storeId,s=i.storeName,f=null!=a?a:n,p=Nd(Nd({},c),{userId:f,storeId:l,storeName:s}),y=H(p),d=u().meta,h=H(d);gtag("event","set_store",Nd(Nd({send_to:r,event_callback:o},y),h))},qd=function(){return(qd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Fd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},zd=function(t,e){var r=t.trackingId,n=e.store,o=Fd(e,["store"]);delete o.userId;var a=n.storeId,i=n.storeName,c=qd(qd({},o),{storeId:a,storeName:i}),l=H(c),s=u().meta,f=H(s);fbq("trackSingleCustom",r,"SetStore",qd(qd({},l),f))},Vd=function(){return(Vd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$d=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Gd=function(t,e){var r=e.store,n=$d(e,["store"]);delete n.userId;var o=r.storeId,a=r.storeName,i=Vd(Vd({},n),{storeId:o,storeName:a}),c=H(i),l=u().meta,s=H(l);analytics.track("Set Store",Vd(Vd({},c),s))},Wd=function(){return(Wd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Kd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Jd=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Kd(e,["callback","userId"]);delete i.identify;var c=null!=a?a:n,l=Wd(Wd({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","set_user_info",Wd(Wd({send_to:r,event_callback:o},s),p))},Qd=function(){return(Qd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Zd=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Xd=function(t,e){var r=t.trackingId,n=Zd(e,[]);delete n.userId,delete n.identify;var o=Qd({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SetUserInfo",Qd(Qd({},a),c))},th=function(){return(th=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},eh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},rh=function(t,e){var r=e.identify,n=eh(e,["identify"]);delete n.userId;var o=th({},n),a=H(o),i=u().meta,c=H(i);analytics.track("Set User Info",th(th({},a),c)),r&&analytics.identify(r.id,r)},nh=function(){return(nh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},oh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ah=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=oh(e,["callback","userId"]);delete i.identify;var c=null!=a?a:n,l=nh(nh({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","update_user_info",nh(nh({send_to:r,event_callback:o},s),p))},ih=function(){return(ih=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},uh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},ch=function(t,e){var r=t.trackingId,n=uh(e,[]);delete n.userId,delete n.identify;var o=ih({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"UpdateUserInfo",ih(ih({},a),c))},lh=function(){return(lh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},sh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},fh=function(t,e){var r=e.fields,n=e.identify,o=sh(e,["fields","identify"]);delete o.userId;var a=lh(lh({},o),{fields:ct(r)}),i=H(a),c=u().meta,l=H(c);analytics.track("Update User Info",lh(lh({},i),l)),n&&analytics.identify(n.id,n)},ph=function(){return(ph=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},yh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},dh=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=yh(e,["callback","userId"]),c=null!=a?a:n,l=ph(ph({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","change_vendor",ph(ph({send_to:r,event_callback:o},s),p))},hh=function(){return(hh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},gh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},bh=function(t,e){var r=t.trackingId,n=gh(e,[]);delete n.userId;var o=hh({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"ChangeVendor",hh(hh({},a),c))},vh=function(){return(vh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Oh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},mh=function(t,e){var r=Oh(e,[]);delete r.userId;var n=vh({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Change Vendor",vh(vh({},o),i))},wh=function(){return(wh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},jh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ph=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=jh(e,["callback","userId"]),c=null!=a?a:n,l=wh(wh({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","set_vendor",wh(wh({send_to:r,event_callback:o},s),p))},Ih=function(){return(Ih=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Sh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},xh=function(t,e){var r=t.trackingId,n=Sh(e,[]);delete n.userId;var o=Ih({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SetVendor",Ih(Ih({},a),c))},kh=function(){return(kh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ah=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Eh=function(t,e){var r=Ah(e,[]);delete r.userId;var n=kh({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Set Vendor",kh(kh({},o),i))},_h=function(){return(_h=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Th=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Ch=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Th(e,["callback","userId"]),c=null!=a?a:n,l=_h(_h({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","select_workflow",_h(_h({send_to:r,event_callback:o},s),p))},Rh=function(){return(Rh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Uh=function(t,e){var r=t.trackingId,n=Bh(e,[]);delete n.userId;var o=Rh({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"SelectWorkflow",Rh(Rh({},a),c))},Mh=function(){return(Mh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Lh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Hh=function(t,e){var r=Lh(e,[]);delete r.userId;var n=Mh({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Select Workflow",Mh(Mh({},o),i))},Nh=function(){return(Nh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Dh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Yh=function(t,e){var r=t.trackingId,n=t.userId,o=e.callback,a=e.userId,i=Dh(e,["callback","userId"]),c=null!=a?a:n,l=Nh(Nh({},i),{userId:c}),s=H(l),f=u().meta,p=H(f);gtag("event","update_workflow",Nh(Nh({send_to:r,event_callback:o},s),p))},qh=function(){return(qh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Fh=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},zh=function(t,e){var r=t.trackingId,n=Fh(e,[]);delete n.userId;var o=qh({},n),a=H(o),i=u().meta,c=H(i);fbq("trackSingleCustom",r,"UpdateWorkflow",qh(qh({},a),c))},Vh=function(){return(Vh=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$h=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},Gh=function(t,e){var r=$h(e,[]);delete r.userId;var n=Vh({},r),o=H(n),a=u().meta,i=H(a);analytics.track("Update Workflow",Vh(Vh({},o),i))},Wh={auth:ve,banner:De,billing:vr,booking:_r,category:On,checkout:Yn,coupon:ia,credit:Ha,fulfillment:gi,geo:ou,help:gu,logCustomEvent:Wa,loyalty:oc,order:Mc,other:dl,payment:$l,product:Tf,purchase:lp,settings:wp,shipping:Xp,shoppingCart:{logAddProductToCart:ly,logAddProductToWishlist:Oy,logClearCart:Ey,logRemoveProductFromCart:function(t){rt("removeProductFromCart",t,{googleAnalyticsHandler:Cy,facebookPixelHandler:Uy,segmentHandler:Hy})},logRemoveProductFromWishlist:function(t){rt("removeProductFromWishlist",t,{googleAnalyticsHandler:Yy,facebookPixelHandler:zy,segmentHandler:Gy})},logUpdateProductInCart:function(t){rt("updateProductInCart",t,{googleAnalyticsHandler:Jy,facebookPixelHandler:Xy,segmentHandler:rd})},logUpdateProductInWishlist:function(t){rt("updateProductInWishlist",t,{googleAnalyticsHandler:ad,facebookPixelHandler:cd,segmentHandler:fd})},logViewCart:function(t){rt("viewCart",t,{googleAnalyticsHandler:dd,facebookPixelHandler:bd,segmentHandler:md})}},social:{logShare:function(t){rt("share",t,{googleAnalyticsHandler:Pd,facebookPixelHandler:xd,segmentHandler:Ed})}},store:{logChangeStore:function(t){rt("changeStore",t,{googleAnalyticsHandler:Cd,facebookPixelHandler:Ud,segmentHandler:Hd})},logSetStore:function(t){rt("setStore",t,{googleAnalyticsHandler:Yd,facebookPixelHandler:zd,segmentHandler:Gd})}},user:{logSetUserInfo:function(t){rt("setUserInfo",t,{googleAnalyticsHandler:Jd,facebookPixelHandler:Xd,segmentHandler:rh})},logUpdateUserInfo:function(t){rt("updateUserInfo",t,{googleAnalyticsHandler:ah,facebookPixelHandler:ch,segmentHandler:fh})}},vendor:{logChangeVendor:function(t){rt("changeVendor",t,{googleAnalyticsHandler:dh,facebookPixelHandler:bh,segmentHandler:mh})},logSetVendor:function(t){rt("setVendor",t,{googleAnalyticsHandler:Ph,facebookPixelHandler:xh,segmentHandler:Eh})}},workflow:{logSelectWorkflow:function(t){rt("selectWorkflow",t,{googleAnalyticsHandler:Ch,facebookPixelHandler:Uh,segmentHandler:Hh})},logUpdateWorkflow:function(t){rt("updateWorkflow",t,{googleAnalyticsHandler:Yh,facebookPixelHandler:zh,segmentHandler:Gh})}}},Kh=function(t){analytics.identify(t.id,t)}}])}));
|