(this.webpackChunk_gorgias_chat_client=this.webpackChunk_gorgias_chat_client||[]).push([[265],{2806:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Identify:()=>y,Revenue:()=>O,Types:()=>d,add:()=>me,getDeviceId:()=>xe,getSessionId:()=>Ue,getUserId:()=>Pe,groupIdentify:()=>Ie,identify:()=>ke,init:()=>we,logEvent:()=>Ee,remove:()=>Se,revenue:()=>Oe,runQueuedFunctions:()=>j,setDeviceId:()=>Ne,setGroup:()=>Te,setOptOut:()=>qe,setSessionId:()=>Le,setTransport:()=>Ae,setUserId:()=>Re,track:()=>_e});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(e,t)};function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var r=function(){return r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i0&&o[o.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(e,t){var i="function"===typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}return s}function l(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o1e3)return!1;for(var t in e){var i=e[t];if(!b(t,i))return!1}return!0},b=function(e,t){var i,n;if("string"!==typeof e)return!1;if(Array.isArray(t)){var o=!0;try{for(var r=u(t),s=r.next();!s.done;s=r.next()){var a=s.value;if(Array.isArray(a))return!1;if("object"===typeof a)o=o&&h(a);else if(!["number","string"].includes(typeof a))return!1;if(!o)return!1}}catch(c){i={error:c}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}else{if("object"===typeof t)return h(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0},y=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return r({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(d.IdentifyOperation.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(d.IdentifyOperation.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(d.IdentifyOperation.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(d.IdentifyOperation.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(d.IdentifyOperation.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(d.IdentifyOperation.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(d.IdentifyOperation.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(d.IdentifyOperation.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(d.IdentifyOperation.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[d.IdentifyOperation.CLEAR_ALL]="-",this},e.prototype._safeSet=function(e,t,i){if(this._validate(e,t,i)){var n=this._properties[e];return void 0===n&&(n={},this._properties[e]=n),n[t]=i,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,i){return void 0===this._properties[d.IdentifyOperation.CLEAR_ALL]&&(!this._propertySet.has(t)&&(e===d.IdentifyOperation.ADD?"number"===typeof i:e===d.IdentifyOperation.UNSET||e===d.IdentifyOperation.REMOVE||b(t,i)))},e}(),g=function(e,t,i){return void 0===t&&(t=0),void 0===i&&(i=d.Status.Unknown),{event:e,code:t,message:i}},w=[],m=!1,S=function(e,t){return s(void 0,void 0,void 0,(function(){return a(this,(function(i){switch(i.label){case 0:return[4,e.setup(t)];case 1:return i.sent(),t.plugins.push(e),[2]}}))}))},_=function(e,t){return t.plugins.splice(t.plugins.findIndex((function(t){return t.name===e})),1),Promise.resolve()},E=function(e,t){return new Promise((function(i){t.optOut?i(g(e,0,"Event skipped due to optOut config")):(w.push([e,i,t.plugins]),k(0))}))},k=function e(t){m||(m=!0,setTimeout((function(){I().then((function(){m=!1,w.length>0&&e(0)}))}),t))},I=function(){return s(void 0,void 0,void 0,(function(){var e,t,i,n,o,s,l,p,v,f,h,b,y,m,S,_,E,k,I,T;return a(this,(function(a){switch(a.label){case 0:if(!(e=w.shift()))return[2];t=c(e,1),i=t[0],n=c(e,3),o=n[1],s=n[2],l=s.filter((function(e){return e.type===d.PluginType.BEFORE})),a.label=1;case 1:a.trys.push([1,6,7,8]),p=u(l),v=p.next(),a.label=2;case 2:return v.done?[3,5]:[4,v.value.execute(r({},i))];case 3:i=a.sent(),a.label=4;case 4:return v=p.next(),[3,2];case 5:return[3,8];case 6:return f=a.sent(),E={error:f},[3,8];case 7:try{v&&!v.done&&(k=p.return)&&k.call(p)}finally{if(E)throw E.error}return[7];case 8:h=s.filter((function(e){return e.type===d.PluginType.ENRICHMENT})),a.label=9;case 9:a.trys.push([9,14,15,16]),b=u(h),y=b.next(),a.label=10;case 10:return y.done?[3,13]:[4,y.value.execute(r({},i))];case 11:i=a.sent(),a.label=12;case 12:return y=b.next(),[3,10];case 13:return[3,16];case 14:return m=a.sent(),I={error:m},[3,16];case 15:try{y&&!y.done&&(T=b.return)&&T.call(b)}finally{if(I)throw I.error}return[7];case 16:return S=s.filter((function(e){return e.type===d.PluginType.DESTINATION})),_=S.map((function(e){var t=r({},i);return e.execute(t).catch((function(e){return g(t,0,String(e))}))})),Promise.all(_).then((function(e){var t=c(e,1)[0];o(t)})),[2]}}))}))},T=function(){function e(e){void 0===e&&(e="$default"),this.logEvent=this.track.bind(this),this.name=e}return e.prototype.init=function(e,t,i){return this.config=i,Promise.resolve()},e.prototype.track=function(e,t,i){var n=function(e,t,i){return r(r(r({},"string"===typeof e?{event_type:e}:e),i),t&&{event_properties:t})}(e,t,i);return this.dispatch(n)},e.prototype.identify=function(e,t,i,n){var o=function(e,t,i,n){var o=r(r({},n),{event_type:d.SpecialEventType.IDENTIFY,user_properties:i.getUserProperties(),user_id:e});return void 0!==t&&t.length>0&&(o.device_id=t),o}(i,n,e,t);return this.dispatch(o)},e.prototype.groupIdentify=function(e,t,i,n,o,s){var a=function(e,t,i,n,o,s){var a,u=r(r({},s),{event_type:d.SpecialEventType.GROUP_IDENTIFY,group_properties:o.getUserProperties(),groups:(a={},a[i]=n,a),user_id:e});return void 0!==t&&t.length>0&&(u.device_id=t),u}(o,s,e,t,i,n);return this.dispatch(a)},e.prototype.setGroup=function(e,t){var i=function(e,t){var i,n=new y;return n.set(e,t),{event_type:d.SpecialEventType.IDENTIFY,user_properties:n.getUserProperties(),groups:(i={},i[e]=t,i)}}(e,t);return this.dispatch(i)},e.prototype.revenue=function(e,t){var i=function(e,t){return r(r({},t),{event_type:d.SpecialEventType.REVENUE,event_properties:e.getEventProperties()})}(e,t);return this.dispatch(i)},e.prototype.add=function(e){return s(this,void 0,void 0,(function(){var t;return a(this,(function(i){return t=this.config,[2,S(e,t)]}))}))},e.prototype.remove=function(e){return s(this,void 0,void 0,(function(){var t;return a(this,(function(i){return t=this.config,[2,_(e,t)]}))}))},e.prototype.dispatch=function(e){return s(this,void 0,void 0,(function(){var t,i,n;return a(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,E(e,this.config)];case 1:return 200===(t=o.sent()).code?this.config.loggerProvider.log(t.message):this.config.loggerProvider.error(t.message),[2,t];case 2:return i=o.sent(),n=String(i),this.config.loggerProvider.error(n),[2,g(e,0,n)];case 3:return[2]}}))}))},e.prototype.setOptOut=function(e){this.config.optOut=Boolean(e)},e}(),O=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setEventProperties=function(e){return h(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?r({},this.properties):{};return e[d.RevenueProperty.REVENUE_PRODUCT_ID]=this.productId,e[d.RevenueProperty.REVENUE_QUANTITY]=this.quantity,e[d.RevenueProperty.REVENUE_PRICE]=this.price,e[d.RevenueProperty.REVENUE_TYPE]=this.revenueType,e[d.RevenueProperty.REVENUE]=this.revenue,e},e}(),P="Amplitude Logger ",R=function(){function e(){this.logLevel=d.LogLevel.None}return e.prototype.disable=function(){this.logLevel=d.LogLevel.None},e.prototype.enable=function(e){void 0===e&&(e=d.LogLevel.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t0&&Promise.all(i.map((function(e){return t.execute(e)}))).catch(),Promise.resolve(void 0)},e.prototype.execute=function(e){var t=this;return new Promise((function(i){var n={event:e,attempts:0,callback:function(e){return i(e)},delay:0};t.addToQueue(n)}))},e.prototype.addToQueue=function(){for(var e=this,t=[],i=0;i0&&t.schedule(e)}))}),e))},e.prototype.flush=function(){return s(this,void 0,void 0,(function(){var e,t,i=this;return a(this,(function(n){switch(n.label){case 0:return e=this.queue,this.queue=[],t=function(e,t){var i=Math.max(t,1);return e.reduce((function(e,t,n){var o=Math.floor(n/i);return e[o]||(e[o]=[]),e[o].push(t),e}),[])}(e,this.config.flushQueueSize),[4,Promise.all(t.map((function(e){return i.send(e)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.send=function(e){return s(this,void 0,void 0,(function(){var t,i,n,o;return a(this,(function(r){switch(r.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];t={api_key:this.config.apiKey,events:e.map((function(e){return e.event})),options:{min_id_length:this.config.minIdLength}},r.label=1;case 1:return r.trys.push([1,3,,4]),i=L(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(i,t)];case 2:return null===(n=r.sent())?(this.fulfillRequest(e,0,"Unexpected error occurred"),[2]):(this.handleReponse(n,e),[3,4]);case 3:return o=r.sent(),this.fulfillRequest(e,0,String(o)),[3,4];case 4:return[2]}}))}))},e.prototype.handleReponse=function(e,t){switch(e.status){case d.Status.Success:this.handleSuccessResponse(e,t);break;case d.Status.Invalid:this.handleInvalidResponse(e,t);break;case d.Status.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case d.Status.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var i=this;if(e.body.missingField)this.fulfillRequest(t,e.statusCode,e.body.error);else{var n=l(l(l(l([],c(Object.values(e.body.eventsWithInvalidFields)),!1),c(Object.values(e.body.eventsWithMissingFields)),!1),c(Object.values(e.body.eventsWithInvalidIdLengths)),!1),c(e.body.silencedEvents),!1).flat(),o=new Set(n),r=t.filter((function(t,n){if(!o.has(n))return!0;i.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,l([],c(r),!1))}},e.prototype.handlePayloadTooLargeResponse=function(e,t){1!==t.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,l([],c(t),!1))):this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var i=this,n=Object.keys(e.body.exceededDailyQuotaUsers),o=Object.keys(e.body.exceededDailyQuotaDevices),r=e.body.throttledEvents,s=new Set(n),a=new Set(o),u=new Set(r),d=t.filter((function(t,n){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&a.has(t.event.device_id)))return u.has(n)&&(t.delay=i.throttle),!0;i.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,l([],c(d),!1))},e.prototype.handleOtherReponse=function(e){this.addToQueue.apply(this,l([],c(e),!1))},e.prototype.fulfillRequest=function(e,t,i){this.removeFromBackup.apply(this,l([],c(e.map((function(e){return e.event}))),!1)),e.forEach((function(e){return e.callback(g(e.event,t,i))}))},e.prototype.addToBackup=function(){for(var e=this,t=[],i=0;i=200&&e<300?d.Status.Success:429===e?d.Status.RateLimit:413===e?d.Status.PayloadTooLarge:408===e?d.Status.Timeout:e>=400&&e<500?d.Status.Invalid:e>=500?d.Status.Failed:d.Status.Unknown},e}(),j=function(e,t){C(e,t)},C=function(e,t){for(var i=0;i>t/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,e)},F=function(){var e,t,i,n;if("undefined"===typeof navigator)return"";var o=navigator.userLanguage;return null!==(n=null!==(i=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==i?i:o)&&void 0!==n?n:""},Z=function(e,t){var i,n=$(e.apiKey);e.cookieStorage.set(n,{userId:e.userId,deviceId:e.deviceId,sessionId:e.sessionId,lastEventTime:null!==t&&void 0!==t?t:null===(i=e.cookieStorage.get(n))||void 0===i?void 0:i.lastEventTime,optOut:Boolean(e.optOut)})},$=function(e,t){return void 0===t&&(t=10),"".concat(p,"_").concat(e.substring(0,t))},Q=function(){function e(){var e;this.name="context",this.type=d.PluginType.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat("0.4.1"),"undefined"!==typeof navigator&&(e=navigator.userAgent),this.uaResult=new(V())(e).getResult()}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){var t=this;return new Promise((function(i){var n=(new Date).getTime(),o=t.uaResult.browser.name,s=t.uaResult.browser.version,a=t.uaResult.device.model||t.uaResult.os.name,u=t.uaResult.device.vendor;return function(e){var t,i=$(e.apiKey),n=null===(t=e.cookieStorage.get(i))||void 0===t?void 0:t.lastEventTime,o=Date.now();n&&o-n>=e.sessionTimeout&&(e.sessionId=o,Z(e))}(t.config),Z(t.config,n),i(r(r(r(r(r(r(r(r(r(r(r({user_id:t.config.userId,device_id:t.config.deviceId,session_id:t.config.sessionId,time:n},t.config.appVersion&&{app_version:t.config.appVersion}),t.config.trackingOptions.platform&&{platform:"Web"}),t.config.trackingOptions.osName&&{os_name:o}),t.config.trackingOptions.osVersion&&{os_version:s}),t.config.trackingOptions.deviceManufacturer&&{device_manufacturer:u}),t.config.trackingOptions.deviceModel&&{device_model:a}),t.config.trackingOptions.language&&{language:F()}),t.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:z(),partner_id:t.config.partnerId}),e),{event_id:t.eventId++,library:t.library}))}))},e}(),W=function(){function e(e){this.options=r({},e)}return e.prototype.isEnabled=function(){if("undefined"===typeof window)return!1;var t=String(Date.now()),i=new e,n="AMP_TEST";try{return i.set(n,t),i.get(n)===t}catch(o){return!1}finally{i.remove(n)}},e.prototype.get=function(e){var t=this.getRaw(e);if(t)try{return JSON.parse(t)}catch(i){return}},e.prototype.getRaw=function(e){var t=window.document.cookie.split("; ").find((function(t){return 0===t.indexOf(e+"=")}));if(t)return t.substring(e.length+1)},e.prototype.set=function(e,t){var i;try{var n=null!==(i=this.options.expirationDays)&&void 0!==i?i:0,o=null!==t?n:-1,r=void 0;if(o){var s=new Date;s.setTime(s.getTime()+24*o*60*60*1e3),r=s}var a="".concat(e,"=").concat(JSON.stringify(t));r&&(a+="; expires=".concat(r.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite)),window.document.cookie=a}catch(u){}},e.prototype.remove=function(e){this.set(e,null)},e.prototype.reset=function(){},e}(),G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.send=function(e,t){return s(this,void 0,void 0,(function(){var i,n;return a(this,(function(o){switch(o.label){case 0:if("undefined"===typeof fetch)throw new Error("FetchTransport is not supported");return i={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"},[4,fetch(e,i)];case 1:return[4,o.sent().json()];case 2:return n=o.sent(),[2,this.buildResponse(n)]}}))}))},t}(D),H=function(){function e(){}return e.prototype.isEnabled=function(){if("undefined"===typeof window)return!1;var t=String(Date.now()),i=new e,n="AMP_TEST";try{return i.set(n,t),i.get(n)===t}catch(o){return!1}finally{i.remove(n)}},e.prototype.get=function(e){try{var t=this.getRaw(e);if(!t)return;return JSON.parse(t)}catch(i){return}},e.prototype.getRaw=function(e){return window.localStorage.getItem(e)||void 0},e.prototype.set=function(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch(i){}},e.prototype.remove=function(e){try{window.localStorage.removeItem(e)}catch(t){}},e.prototype.reset=function(){try{window.localStorage.clear()}catch(e){}},e}(),K=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return!0},e.prototype.get=function(e){return this.memoryStorage.get(e)},e.prototype.getRaw=function(e){var t=this.get(e);return t?JSON.stringify(t):void 0},e.prototype.set=function(e,t){this.memoryStorage.set(e,t)},e.prototype.remove=function(e){this.memoryStorage.delete(e)},e.prototype.reset=function(){this.memoryStorage.clear()},e}(),J=function(){return"undefined"===typeof window?{}:window.location.search.substring(1).split("&").filter(Boolean).reduce((function(e,t){var i=c(t.split("=",2),2),n=i[0],o=i[1],r=void 0===o?"":o;return r?(e[decodeURIComponent(n)]=decodeURIComponent(r),e):e}),{})},Y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return o(t,e),t.prototype.send=function(e,t){return s(this,void 0,void 0,(function(){var i=this;return a(this,(function(n){return[2,new Promise((function(n,o){"undefined"===typeof XMLHttpRequest&&o(new Error("XHRTransport is not supported."));var r=new XMLHttpRequest;r.open("POST",e,!0),r.onreadystatechange=function(){if(r.readyState===i.state.done)try{var e=r.responseText,t=JSON.parse(e),s=i.buildResponse(t);n(s)}catch(a){o(a)}},r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("Accept","*/*"),r.send(JSON.stringify(t))}))]}))}))},t}(D),X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.send=function(e,t){return s(this,void 0,void 0,(function(){var i=this;return a(this,(function(n){return[2,new Promise((function(n,o){if("undefined"===typeof window||"undefined"===typeof window.navigator||"undefined"===typeof window.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var r=JSON.stringify(t);return n(window.navigator.sendBeacon(e,JSON.stringify(t))?i.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:r.length,server_upload_time:Date.now()}):i.buildResponse({code:500}))}catch(s){o(s)}}))]}))}))},t}(D),ee=function(){return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:new K,disableCookies:!1,domain:"",includeGclid:!0,includeFbclid:!0,includeReferrer:!0,includeUtm:!0,sessionTimeout:18e5,storageProvider:new K,trackingOptions:{city:!0,country:!0,carrier:!0,deviceManufacturer:!0,deviceModel:!0,dma:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0,region:!0,versionName:!0},transportProvider:new G}},te=function(e){function t(t,i,n){var o,s,a,u,c,l,d,p,v,f,h,b,y,g,w=this,m=ee();return(w=e.call(this,r(r({},n),{apiKey:t,userId:i,optOut:Boolean(null===n||void 0===n?void 0:n.optOut),storageProvider:null!==(o=null===n||void 0===n?void 0:n.storageProvider)&&void 0!==o?o:m.storageProvider,transportProvider:null!==(s=null===n||void 0===n?void 0:n.transportProvider)&&void 0!==s?s:m.transportProvider}))||this).cookieExpiration=null!==(a=null===n||void 0===n?void 0:n.cookieExpiration)&&void 0!==a?a:m.cookieExpiration,w.cookieSameSite=null!==(u=null===n||void 0===n?void 0:n.cookieSameSite)&&void 0!==u?u:m.cookieSameSite,w.cookieSecure=null!==(c=null===n||void 0===n?void 0:n.cookieSecure)&&void 0!==c?c:m.cookieSecure,w.cookieStorage=null!==(l=null===n||void 0===n?void 0:n.cookieStorage)&&void 0!==l?l:m.cookieStorage,w.disableCookies=null!==(d=null===n||void 0===n?void 0:n.disableCookies)&&void 0!==d?d:m.disableCookies,w.domain=null!==(p=null===n||void 0===n?void 0:n.domain)&&void 0!==p?p:m.domain,w.includeGclid=null!==(v=null===n||void 0===n?void 0:n.includeGclid)&&void 0!==v?v:m.includeGclid,w.includeFbclid=null!==(f=null===n||void 0===n?void 0:n.includeFbclid)&&void 0!==f?f:m.includeFbclid,w.includeReferrer=null!==(h=null===n||void 0===n?void 0:n.includeReferrer)&&void 0!==h?h:m.includeReferrer,w.includeUtm=null!==(b=null===n||void 0===n?void 0:n.includeUtm)&&void 0!==b?b:m.includeUtm,w.sessionTimeout=null!==(y=null===n||void 0===n?void 0:n.sessionTimeout)&&void 0!==y?y:m.sessionTimeout,w.trackingOptions=null!==(g=null===n||void 0===n?void 0:n.trackingOptions)&&void 0!==g?g:m.trackingOptions,w}return o(t,e),t}(N),ie=function(e,t){void 0===t&&(t=ee());var i=r(r({},t),e),n=null===e||void 0===e?void 0:e.cookieStorage;return n&&n.isEnabled()||(n=new W({domain:i.domain,expirationDays:i.cookieExpiration,sameSite:i.cookieSameSite,secure:i.cookieSecure}),!i.disableCookies&&n.isEnabled()||(n=new H).isEnabled()||(n=new K)),n},ne=function(e){var t=null===e||void 0===e?void 0:e.storageProvider;return t&&t.isEnabled()||(t=new H).isEnabled()||(t=new K),t},oe=function(e,t,i){return t||i||e||z()},re=function(e,t,i,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),e&&Date.now()-i{Object.defineProperty(t,"__esModule",{value:!0}),t.ServerZone=void 0,function(e){e.US="US",e.EU="EU"}(t.ServerZone||(t.ServerZone={}))},4008:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialEventType=t.RevenueProperty=t.IdentifyOperation=void 0,function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(t.IdentifyOperation||(t.IdentifyOperation={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(t.RevenueProperty||(t.RevenueProperty={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(t.SpecialEventType||(t.SpecialEventType={}))},8627:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TransportType=t.Status=t.PluginType=t.LogLevel=t.RevenueProperty=t.IdentifyOperation=t.SpecialEventType=t.ServerZone=void 0;var n=i(948);Object.defineProperty(t,"ServerZone",{enumerable:!0,get:function(){return n.ServerZone}});var o=i(4008);Object.defineProperty(t,"SpecialEventType",{enumerable:!0,get:function(){return o.SpecialEventType}}),Object.defineProperty(t,"IdentifyOperation",{enumerable:!0,get:function(){return o.IdentifyOperation}}),Object.defineProperty(t,"RevenueProperty",{enumerable:!0,get:function(){return o.RevenueProperty}});var r=i(9830);Object.defineProperty(t,"LogLevel",{enumerable:!0,get:function(){return r.LogLevel}});var s=i(9238);Object.defineProperty(t,"PluginType",{enumerable:!0,get:function(){return s.PluginType}});var a=i(5764);Object.defineProperty(t,"Status",{enumerable:!0,get:function(){return a.Status}});var u=i(1513);Object.defineProperty(t,"TransportType",{enumerable:!0,get:function(){return u.TransportType}})},9830:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose"}(t.LogLevel||(t.LogLevel={}))},9238:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PluginType=void 0,function(e){e.BEFORE="before",e.ENRICHMENT="enrichment",e.DESTINATION="destination"}(t.PluginType||(t.PluginType={}))},5764:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Status=void 0,function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(t.Status||(t.Status={}))},1513:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TransportType=void 0,function(e){e.XHR="xhr",e.SendBeacon="beacon",e.Fetch="fetch"}(t.TransportType||(t.TransportType={}))},2404:function(e,t,i){var n;!function(o,r){"use strict";var s="function",a="undefined",u="object",c="string",l="model",d="name",p="type",v="vendor",f="version",h="architecture",b="console",y="mobile",g="tablet",w="smarttv",m="wearable",S="embedded",_="Amazon",E="Apple",k="ASUS",I="BlackBerry",T="Browser",O="Chrome",P="Firefox",R="Google",x="Huawei",N="LG",U="Microsoft",L="Motorola",q="Opera",A="Samsung",D="Sharp",j="Sony",C="Xiaomi",M="Zebra",B="Facebook",V=function(e){for(var t={},i=0;i0?2===a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3===a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):r:this[a[0]]=l?a[1].call(this,l,a[2]):r:4===a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):r):this[a]=l||r;d+=2}},Q=function(e,t){for(var i in t)if(typeof t[i]===u&&t[i].length>0){for(var n=0;n350?Z(e,350):e,this},this.setUA(n),this};H.VERSION="0.7.33",H.BROWSER=V([d,f,"major"]),H.CPU=V([h]),H.DEVICE=V([l,v,p,b,y,w,g,m,S]),H.ENGINE=H.OS=V([d,f]),typeof t!==a?(e.exports&&(t=e.exports=H),t.UAParser=H):i.amdO?(n=function(){return H}.call(t,i,t,e))===r||(e.exports=n):typeof o!==a&&(o.UAParser=H);var K=typeof o!==a&&(o.jQuery||o.Zepto);if(K&&!K.ua){var J=new H;K.ua=J.getResult(),K.ua.get=function(){return J.getUA()},K.ua.set=function(e){J.setUA(e);var t=J.getResult();for(var i in t)K.ua[i]=t[i]}}}("object"===typeof window?window:this)}}]); //# sourceMappingURL=amplitude.23e0310f8f57cf98.js.map