/*! For license information please see amplitude.min.js.LICENSE.txt */ (()=>{"use strict";var e,t,n,r,i={7496:(e,t,n)=>{n.d(t,{ls:()=>qr,Ts:()=>Yr,u4:()=>Mr});var r,i=n(1635);!function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(r||(r={}));var o,u=function(e){return function(){var t=(0,i.Cl)({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},s=function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var o=(0,i.Ju)(t.split("-11.html")),u=o.next();!u.done;u=o.next()){var s=u.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e},a=function(e,t){return function(){var n,r,o={};try{for(var u=(0,i.Ju)(t),a=u.next();!a.done;a=u.next()){var c=a.value;o[c]=s(e,c)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return o}},c=function(e,t,n,i,o){return void 0===o&&(o=null),function(){for(var u=[],s=0;s>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,w)};function S(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var _=function(){function e(){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return e.prototype.setup=function(e){var t;return(0,i.sH)(this,void 0,void 0,(function(){var n,r=this;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(f.fS,"_-9.html").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?void 0:t.get(this.storageKey)];case 1:return(n=i.sent())&&n.length>0&&Promise.all(n.map((function(e){return r.execute(e)}))).catch(),[2,Promise.resolve(void 0)]}}))}))},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=w()),new Promise((function(n){var r={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.addToQueue(r)}))},e.prototype.getTryableList=function(e){var t=this;return e.filter((function(e){return e.attempts0&&t.schedule(e)}))}),e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),(0,i.sH)(this,void 0,void 0,(function(){var t,n,r,o=this;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return this.config.offline?(this.config.loggerProvider.debug("skipping%20flush%20while%20offline-5.html"),[2]):(t=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?t.push(e):n.push(e)})),this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),u=t,s=this.config.flushQueueSize,a=Math.max(s,1),r=u.reduce((function(e,t,n){var r=Math.floor(n/a);return e[r]||(e[r]=[]),e[r].push(t),e}),[]),[4,Promise.all(r.map((function(t){return o.send(t,e)})))]);case 1:return i.sent(),this.scheduleTryable(n),[2]}var u,s,a}))}))},e.prototype.send=function(e,t){return void 0===t&&(t=!0),(0,i.sH)(this,void 0,void 0,(function(){var n,r,u,s,a;return(0,i.YH)(this,(function(c){switch(c.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];n={api_key:this.config.apiKey,events:e.map((function(e){var t=e.event;t.extra;return(0,i.Tt)(t,["extra"])})),options:{min_id_length:this.config.minIdLength},client_upload_time:(new Date).toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new b,c.label=1;case 1:return c.trys.push([1,3,,4]),r=m(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(r,n)];case 2:return null===(u=c.sent())?(this.fulfillRequest(e,0,"Unexpected error occurred"),[2]):t?(this.handleResponse(u,e),[3,4]):("body"in u?this.fulfillRequest(e,u.statusCode,"".concat(u.status,": ").concat(S(u))):this.fulfillRequest(e,u.statusCode,u.status),[2]);case 3:return s=c.sent(),a=(l=s)instanceof Error?l.message:String(l),this.config.loggerProvider.error(a),this.handleResponse({status:o.Failed,statusCode:0},e),[3,4];case 4:return[2]}var l}))}))},e.prototype.handleResponse=function(e,t){var n=e.status;switch(n){case o.Success:this.handleSuccessResponse(e,t);break;case o.Invalid:this.handleInvalidResponse(e,t);break;case o.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case o.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(n,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key"))this.fulfillRequest(t,e.statusCode,e.body.error);else{var r=(0,i.fX)((0,i.fX)((0,i.fX)((0,i.fX)([],(0,i.zs)(Object.values(e.body.eventsWithInvalidFields)),!1),(0,i.zs)(Object.values(e.body.eventsWithMissingFields)),!1),(0,i.zs)(Object.values(e.body.eventsWithInvalidIdLengths)),!1),(0,i.zs)(e.body.silencedEvents),!1).flat(),o=new Set(r),u=t.filter((function(t,r){if(!o.has(r))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));u.length>0&&this.config.loggerProvider.warn(S(e));var s=this.getTryableList(u);this.scheduleTryable(s)}},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1!==t.length){this.config.loggerProvider.warn(S(e)),this.config.flushQueueSize/=2;var n=this.getTryableList(t);this.scheduleTryable(n)}else this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,u=new Set(r),s=new Set(i),a=new Set(o),c=t.filter((function(t,r){if(!(t.event.user_id&&u.has(t.event.user_id)||t.event.device_id&&s.has(t.event.device_id)))return a.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));c.length>0&&this.config.loggerProvider.warn(S(e));var l=this.getTryableList(c);this.scheduleTryable(l)},e.prototype.handleOtherResponse=function(e){var t=this,n=e.map((function(e){return e.timeout=e.attempts*t.retryTimeout,e})),r=this.getTryableList(n);this.scheduleTryable(r)},e.prototype.fulfillRequest=function(e,t,n){this.removeEvents(e),e.forEach((function(e){return e.callback(d(e.event,t,n))}))},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map((function(e){return e.event}));this.config.storageProvider.set(this.storageKey,e)}},e.prototype.removeEvents=function(e){this.queue=this.queue.filter((function(t){return!e.some((function(e){return e.event.insert_id===t.event.insert_id}))})),this.saveEvents()},e}(),E=n(1145),I=n(4039),T=n(2763),k=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(0,T.a)(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?(0,i.Cl)({},this.properties):{};return e[I.Kl.REVENUE_PRODUCT_ID]=this.productId,e[I.Kl.REVENUE_QUANTITY]=this.quantity,e[I.Kl.REVENUE_PRICE]=this.price,e[I.Kl.REVENUE_TYPE]=this.revenueType,e[I.Kl.REVENUE]=this.revenue,e},e}(),O=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return e.prototype.register=function(e,t){var n,r;return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(i){switch(i.label){case 0:return this.plugins.some((function(t){return t.name===e.name}))?(t.loggerProvider.warn("Plugin with name ".concat(e.name," already exists, skipping registration")),[2]):(void 0===e.name&&(e.name=w(),t.loggerProvider.warn("Plugin name is undefined. \n Generating a random UUID for plugin name: ".concat(e.name,"-11.html\n Set a name for the plugin to prevent it from being added multiple times."))),e.type=null!==(n=e.type)&&void 0!==n?n:"enrichment",[4,null===(r=e.setup)||void 0===r?void 0:r.call(e,t,this.client)]);case 1:return i.sent(),this.plugins.push(e),[2]}}))}))},e.prototype.deregister=function(e){var t;return(0,i.sH)(this,void 0,void 0,(function(){var n,r;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return n=this.plugins.findIndex((function(t){return t.name===e})),r=this.plugins[n],this.plugins.splice(n,1),[4,null===(t=r.teardown)||void 0===t?void 0:t.call(r)];case 1:return i.sent(),[2]}}))}))},e.prototype.reset=function(e){this.applying=!1,this.plugins.map((function(e){var t;return null===(t=e.teardown)||void 0===t?void 0:t.call(e)})),this.plugins=[],this.client=e},e.prototype.push=function(e){var t=this;return new Promise((function(n){t.queue.push([e,n]),t.scheduleApply(0)}))},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout((function(){t.apply(t.queue.shift()).then((function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)}))}),e))},e.prototype.apply=function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,r,o,u,s,a,c,l,f,p,h,v,g,y,m,b,w,S,_;return(0,i.YH)(this,(function(E){switch(E.label){case 0:if(!e)return[2];t=(0,i.zs)(e,1),n=t[0],r=(0,i.zs)(e,2),o=r[1],u=this.plugins.filter((function(e){return"before"===e.type})),E.label=1;case 1:E.trys.push([1,6,7,8]),s=(0,i.Ju)(u),a=s.next(),E.label=2;case 2:return a.done?[3,5]:(h=a.value).execute?[4,h.execute((0,i.Cl)({},n))]:[3,4];case 3:if(null===(v=E.sent()))return o({event:n,code:0,message:""}),[2];n=v,E.label=4;case 4:return a=s.next(),[3,2];case 5:return[3,8];case 6:return c=E.sent(),b={error:c},[3,8];case 7:try{a&&!a.done&&(w=s.return)&&w.call(s)}finally{if(b)throw b.error}return[7];case 8:l=this.plugins.filter((function(e){return"enrichment"===e.type||void 0===e.type})),E.label=9;case 9:E.trys.push([9,14,15,16]),f=(0,i.Ju)(l),p=f.next(),E.label=10;case 10:return p.done?[3,13]:(h=p.value).execute?[4,h.execute((0,i.Cl)({},n))]:[3,12];case 11:if(null===(v=E.sent()))return o({event:n,code:0,message:""}),[2];n=v,E.label=12;case 12:return p=f.next(),[3,10];case 13:return[3,16];case 14:return g=E.sent(),S={error:g},[3,16];case 15:try{p&&!p.done&&(_=f.return)&&_.call(f)}finally{if(S)throw S.error}return[7];case 16:return y=this.plugins.filter((function(e){return"destination"===e.type})),m=y.map((function(e){var t=(0,i.Cl)({},n);return e.execute(t).catch((function(e){return d(t,0,String(e))}))})),Promise.all(m).then((function(e){var t=(0,i.zs)(e,1)[0]||d(n,100,"Event not tracked, no destination plugins on the instance");o(t)})),[2]}}))}))},e.prototype.flush=function(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t,n,r=this;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return r.apply(e)})))];case 1:return i.sent(),t=this.plugins.filter((function(e){return"destination"===e.type})),n=t.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(n)];case 2:return i.sent(),[2]}}))}))},e}(),C=function(e,t){return(0,i.Cl)((0,i.Cl)({},t),{event_type:I.SE.IDENTIFY,user_properties:e.getUserProperties()})},P=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new O(this),this.name=e}return e.prototype._init=function(e){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),[4,this.runQueuedFunctions("q-5.html")];case 1:return t.sent(),this.isReady=!0,[2]}}))}))},e.prototype.runQueuedFunctions=function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,r,o,u,s,a,c;return(0,i.YH)(this,(function(l){switch(l.label){case 0:t=this[e],this[e]=[],l.label=1;case 1:l.trys.push([1,8,9,10]),n=(0,i.Ju)(t),r=n.next(),l.label=2;case 2:return r.done?[3,7]:(o=r.value,(u=o())&&"promise"in u?[4,u.promise]:[3,4]);case 3:return l.sent(),[3,6];case 4:return[4,u];case 5:l.sent(),l.label=6;case 6:return r=n.next(),[3,2];case 7:return[3,10];case 8:return s=l.sent(),a={error:s},[3,10];case 9:try{r&&!r.done&&(c=n.return)&&c.call(n)}finally{if(a)throw a.error}return[7];case 10:return this[e].length?[4,this.runQueuedFunctions(e)]:[3,12];case 11:l.sent(),l.label=12;case 12:return[2]}}))}))},e.prototype.track=function(e,t,n){var r=function(e,t,n){var r="string"==typeof e?{event_type:e}:e;return(0,i.Cl)((0,i.Cl)((0,i.Cl)({},r),n),t&&{event_properties:t})}(e,t,n);return l(this.dispatch(r))},e.prototype.identify=function(e,t){var n=C(e,t);return l(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var o=function(e,t,n,r){var o;return(0,i.Cl)((0,i.Cl)({},r),{event_type:I.SE.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(o={},o[e]=t,o)})}(e,t,n,r);return l(this.dispatch(o))},e.prototype.setGroup=function(e,t,n){var r=function(e,t,n){var r,o=new E.T;return o.set(e,t),(0,i.Cl)((0,i.Cl)({},n),{event_type:I.SE.IDENTIFY,user_properties:o.getUserProperties(),groups:(r={},r[e]=t,r)})}(e,t,n);return l(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=function(e,t){return(0,i.Cl)((0,i.Cl)({},t),{event_type:I.SE.REVENUE,event_properties:e.getEventProperties()})}(e,t);return l(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),l())},e.prototype._addPlugin=function(e){return l(this.timeline.register(e,this.config))},e.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),l())},e.prototype._removePlugin=function(e){return l(this.timeline.deregister(e))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(d(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t=this;return(0,i.YH)(this,(function(n){return this.isReady?[2,this.process(e)]:[2,new Promise((function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))}))]}))}))},e.prototype.process=function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,r;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.config.optOut?[2,d(e,0,"Event skipped due to optOut config")]:[4,this.timeline.push(e)];case 1:return 200===(r=i.sent()).code?this.config.loggerProvider.log(r.message):100===r.code?this.config.loggerProvider.warn(r.message):this.config.loggerProvider.error(r.message),[2,r];case 2:return t=i.sent(),n=String(t),this.config.loggerProvider.error(n),[2,r=d(e,0,n)];case 3:return[2]}}))}))},e.prototype.setOptOut=function(e){this.isReady?this._setOptOut(e):this.q.push(this._setOptOut.bind(this,Boolean(e)))},e.prototype._setOptOut=function(e){this.config.optOut=Boolean(e)},e.prototype.flush=function(){return l(this.timeline.flush())},e}(),x=function(e,t){return"boolean"==typeof e?e:!1!==(null==e?void 0:e[t])},A=function(e){return x(e,"attribution")},R=function(e){return x(e,"pageViews")},N=function(e){return x(e,"sessions")},L=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},H=function(e){if(L(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},j=function(e){var t,n=function(){return!1},r=void 0,i=e.pageCounter;return R(e.defaultTracking)&&(n=void 0,t=void 0,e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.pageViews&&"object"==typeof e.defaultTracking.pageViews&&("trackOn"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(t=e.defaultTracking.pageViews.eventType))),{trackOn:n,trackHistoryChanges:r,eventType:t,pageCounter:i}},U="dclid",D="fbclid",q="gbraid",Y="gclid",M="ko_click_id",F="li_fat_id",z="msclkid",V="rtd_cid",J="ttclid",K="twclid",X="wbraid",B={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rtd_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},$=function(e){var t=e.split("-11.html");return t.length<=2?e:t.slice(t.length-2,t.length).join("-11.html")},G=function(e,t,n,r){void 0===r&&(r=!0);e.referrer;var o=e.referring_domain,u=(0,i.Tt)(e,["referrer","referring_domain"]),s=t||{},a=(s.referrer,s.referring_domain),c=(0,i.Tt)(s,["referrer","referring_domain"]);if(Q(n.excludeReferrers,e.referring_domain))return!1;if(!r&&function(e){return Object.values(e).every((function(e){return!e}))}(e)&&t)return!1;var l=JSON.stringify(u)!==JSON.stringify(c),f=$(o||"")!==$(a||"");return!t||l||f},Q=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some((function(e){return e instanceof RegExp?e.test(t):e===t}))},W=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==n.g?n.g:void 0},Z=function(){var e,t=W();return(null===(e=null==t?void 0:t.location)||void 0===e?void 0:e.search)?t.location.search.substring(1).split("%26-7.html").filter(Boolean).reduce((function(e,t){var n=t.split("%3d-5.html",2),r=ee(n[0]),i=ee(n[1]);return i?(e[r]=i,e):e}),{}):{}},ee=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},te=function(){function e(){}return e.prototype.parse=function(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){return[2,(0,i.Cl)((0,i.Cl)((0,i.Cl)((0,i.Cl)({},B),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=Z();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("index.html")[2])&&void 0!==t?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=Z();return(e={})[U]=t[U],e[D]=t[D],e[q]=t[q],e[Y]=t[Y],e[M]=t[M],e[F]=t[F],e[z]=t[z],e[V]=t[V],e[J]=t[J],e[K]=t[K],e[X]=t[X],e},e}(),ne=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},re=function(){function e(e,t){var n,r,o,u,s,a;this.shouldTrackNewCampaign=!1,this.options=(0,i.Cl)({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:(r=null===(n=t.cookieOptions)||void 0===n?void 0:n.domain,o=r,o?(o.startsWith("-11.html")&&(o=o.substring(1)),[new RegExp("".concat(o.replace("-11.html","#\\."),"%24-5.html"))]):[])},e),this.storage=t.cookieStorage,this.storageKey=(u=t.apiKey,void 0===(s="MKTG")&&(s=""),void 0===a&&(a=10),[f.r,s,u.substring(0,a)].filter(Boolean).join("_-9.html")),this.currentCampaign=B,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,t.loggerProvider.log("installing%20web%20attribution%20tracking-5.html")}return e.prototype.init=function(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t;return(0,i.YH)(this,(function(n){switch(n.label){case 0:return[4,this.fetchCampaign()];case 1:return t=i.zs.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||ne(this.sessionTimeout,this.lastEventTime),G(this.currentCampaign,this.previousCampaign,this.options,e)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))},e.prototype.fetchCampaign=function(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([(new te).parse(),this.storage.get(this.storageKey)])];case 1:return[2,e.sent()]}}))}))},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t,n,r,o,u=(t=this.currentCampaign,n=this.options,r=(0,i.Cl)((0,i.Cl)({},B),t),o=Object.entries(r).reduce((function(e,t){var r,o=(0,i.zs)(t,2),u=o[0],s=o[1];return e.setOnce("initial_".concat(u),null!==(r=null!=s?s:n.initialEmptyValue)&&void 0!==r?r:"EMPTY"),s?e.set(u,s):e.unset(u)}),new E.T),C(o));return e&&(u.event_id=e),u},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),ie=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:oe(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),oe=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},ue=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach((function(t){e(t)})),this.queue=[])},e}(),se=function(){return se=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ce(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}"function"==typeof SuppressedError&&SuppressedError;var le=function(e,t){var n,r,i=typeof e;if(i!==typeof t)return!1;try{for(var o=ae(["string","number","boolean","undefined"]),u=o.next();!u.done;u=o.next()){if(u.value===i)return e===t}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;var s=Array.isArray(e),a=Array.isArray(t);if(s!==a)return!1;if(!s||!a){var c=Object.keys(e).sort(),l=Object.keys(t).sort();if(!le(c,l))return!1;var f=!0;return Object.keys(e).forEach((function(n){le(e[n],t[n])||(f=!1)})),f}for(var d=0;d=200&&e<300?o.Success:429===e?o.RateLimit:413===e?o.PayloadTooLarge:408===e?o.Timeout:e>=400&&e<500?o.Invalid:e>=500?o.Failed:o.Unknown},e}(),Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t.prototype.send=function(e,t){return(0,i.sH)(this,void 0,void 0,(function(){var n,r,o;return(0,i.YH)(this,(function(i){switch(i.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return n={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"},[4,fetch(e,n)];case 1:return[4,(r=i.sent()).text()];case 2:o=i.sent();try{return[2,this.buildResponse(JSON.parse(o))]}catch(e){return[2,this.buildResponse({code:r.status})]}return[2]}}))}))},t}(ke),Ce=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,r;return(0,i.YH)(this,(function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t;return(0,i.YH)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[2,void 0];case 2:return n.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var t;return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(n){return[2,(null===(t=this.storage)||void 0===t?void 0:t.getItem(e))||void 0]}))}))},e.prototype.set=function(e,t){var n;return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(r){try{null===(n=this.storage)||void 0===n||n.setItem(e,JSON.stringify(t))}catch(e){}return[2]}))}))},e.prototype.remove=function(e){var t;return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(n){try{null===(t=this.storage)||void 0===t||t.removeItem(e)}catch(e){}return[2]}))}))},e.prototype.reset=function(){var e;return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(t){try{null===(e=this.storage)||void 0===e||e.clear()}catch(e){}return[2]}))}))},e}(),Pe=1e3,xe=function(e){function t(t){var n,r=this;return(r=e.call(this,null===(n=W())||void 0===n?void 0:n.localStorage)||this).loggerProvider=null==t?void 0:t.loggerProvider,r}return(0,i.C6)(t,e),t.prototype.set=function(t,n){var r;return(0,i.sH)(this,void 0,void 0,(function(){var o;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return Array.isArray(n)&&n.length>Pe?(o=n.length-Pe,[4,e.prototype.set.call(this,t,n.slice(0,Pe))]):[3,2];case 1:return i.sent(),null===(r=this.loggerProvider)||void 0===r||r.error("Failed to save ".concat(o," events because the queue length exceeded ").concat(Pe,"-11.html")),[3,4];case 2:return[4,e.prototype.set.call(this,t,n)];case 3:i.sent(),i.label=4;case 4:return[2]}}))}))},t}(Ce),Ae=function(e){function t(){var t;return e.call(this,null===(t=W())||void 0===t?void 0:t.sessionStorage)||this}return(0,i.C6)(t,e),t}(Ce),Re=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return(0,i.C6)(t,e),t.prototype.send=function(e,t){return(0,i.sH)(this,void 0,void 0,(function(){var n=this;return(0,i.YH)(this,(function(r){return[2,new Promise((function(r,i){"undefined"==typeof XMLHttpRequest&&i(new Error("xhrtransport%20is%20not%20supported-5.html"));var o=new XMLHttpRequest;o.open("post-7.html",e,!0),o.onreadystatechange=function(){if(o.readyState===n.state.done){var e=o.responseText;try{r(n.buildResponse(JSON.parse(e)))}catch(e){r(n.buildResponse({code:o.status}))}}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(t))}))]}))}))},t}(ke),Ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t.prototype.send=function(e,t){return(0,i.sH)(this,void 0,void 0,(function(){var n=this;return(0,i.YH)(this,(function(r){return[2,new Promise((function(r,i){var o=W();if(!(null==o?void 0:o.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var u=JSON.stringify(t);return r(o.navigator.sendBeacon(e,JSON.stringify(t))?n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:u.length,server_upload_time:Date.now()}):n.buildResponse({code:500}))}catch(e){i(e)}}))]}))}))},t}(ke),Le=function(e,t,n){return void 0===n&&(n=!0),(0,i.sH)(void 0,void 0,void 0,(function(){var r,o,u,s,a,c,l,d,p;return(0,i.YH)(this,(function(h){switch(h.label){case 0:return r=function(e){return"".concat(f.r.toLowerCase(),"_-9.html").concat(e.substring(0,6))}(e),[4,t.getRaw(r)];case 1:return(o=h.sent())?n?[4,t.remove(r)]:[3,3]:[2,{optOut:!1}];case 2:h.sent(),h.label=3;case 3:return u=(0,i.zs)(o.split("-11.html"),6),s=u[0],a=u[1],c=u[2],l=u[3],d=u[4],p=u[5],[2,{deviceId:s,userId:je(a),sessionId:He(l),lastEventId:He(p),lastEventTime:He(d),optOut:Boolean(c)}]}}))}))},He=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},je=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},Ue="[Amplitude]",De=("".concat(Ue," Page Viewed"),"".concat(Ue," Form Started")),qe="".concat(Ue," Form Submitted"),Ye="".concat(Ue," File Downloaded"),Me="session_start",Fe="session_end",ze="".concat(Ue," File Extension"),Ve="".concat(Ue," File Name"),Je="".concat(Ue," Link ID"),Ke="".concat(Ue," Link Text"),Xe="".concat(Ue," Link URL"),Be="".concat(Ue," Form ID"),$e="".concat(Ue," Form Name"),Ge="".concat(Ue," Form Destination"),Qe="cookie",We=function(e){function t(t,n,i,o,u,s,a,c,l,f,d,p,v,g,y,m,b,w,S,_,E,I,T,k,O,C,P,x,A,R,N,L,H,j){void 0===i&&(i=new Se),void 0===o&&(o={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===c&&(c=1e3),void 0===l&&(l=5),void 0===f&&(f=30),void 0===d&&(d=Qe),void 0===m&&(m=new h),void 0===b&&(b=r.Warn),void 0===S&&(S=!1),void 0===_&&(_=!1),void 0===T&&(T=""),void 0===k&&(k="US"),void 0===C&&(C=18e5),void 0===P&&(P=new xe({loggerProvider:m})),void 0===x&&(x={ipAddress:!0,language:!0,platform:!0}),void 0===A&&(A="fetch"),void 0===R&&(R=!1),void 0===N&&(N=!1);var U=e.call(this,{apiKey:t,storageProvider:P,transportProvider:tt(A)})||this;return U.apiKey=t,U.appVersion=n,U.cookieOptions=o,U.defaultTracking=u,U.autocapture=s,U.flushIntervalMillis=c,U.flushMaxRetries=l,U.flushQueueSize=f,U.identityStorage=d,U.ingestionMetadata=p,U.instanceName=v,U.loggerProvider=m,U.logLevel=b,U.minIdLength=w,U.offline=S,U.partnerId=E,U.plan=I,U.serverUrl=T,U.serverZone=k,U.sessionTimeout=C,U.storageProvider=P,U.trackingOptions=x,U.transport=A,U.useBatch=R,U.fetchRemoteConfig=N,U._optOut=!1,U._cookieStorage=i,U.deviceId=a,U.lastEventId=g,U.lastEventTime=y,U.optOut=_,U.sessionId=O,U.pageCounter=H,U.userId=L,U.debugLogsEnabled=j,U.loggerProvider.enable(j?r.Debug:U.logLevel),U}return(0,i.C6)(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled};this.cookieStorage.set(_e(this.apiKey),e)},t}(g),Ze=function(e,t,n){return void 0===t&&(t={}),(0,i.sH)(void 0,void 0,void 0,(function(){var r,o,u,s,a,c,l,f,d,p,h,v,g,y,m,b,S,_,E,I,T,k,O,C,P,x,A,R,N,L,H,j,U,D,q,Y,M,F,z,V,J,K,X;return(0,i.YH)(this,(function(B){switch(B.label){case 0:return r=t.identityStorage||Qe,E={},r===Qe?[3,1]:(u="",[3,5]);case 1:return null===(T=null===(I=t.cookieOptions)||void 0===I?void 0:I.domain)||void 0===T?[3,2]:(s=T,[3,4]);case 2:return[4,nt()];case 3:s=B.sent(),B.label=4;case 4:u=s,B.label=5;case 5:return o=i.Cl.apply(void 0,[(E.domain=u,E.expiration=365,E.sameSite="Lax",E.secure=!1,E.upgrade=!0,E),t.cookieOptions]),a=et(t.identityStorage,o),[4,Le(e,a,null===(O=null===(k=t.cookieOptions)||void 0===k?void 0:k.upgrade)||void 0===O||O)];case 6:return c=B.sent(),[4,a.get(_e(e))];case 7:return l=B.sent(),f=Z(),d=null!==(R=null!==(A=null!==(x=null!==(P=null!==(C=t.deviceId)&&void 0!==C?C:f.ampDeviceId)&&void 0!==P?P:f.deviceId)&&void 0!==x?x:null==l?void 0:l.deviceId)&&void 0!==A?A:c.deviceId)&&void 0!==R?R:w(),p=null!==(N=null==l?void 0:l.lastEventId)&&void 0!==N?N:c.lastEventId,h=null!==(L=null==l?void 0:l.lastEventTime)&&void 0!==L?L:c.lastEventTime,v=null!==(j=null!==(H=t.optOut)&&void 0!==H?H:null==l?void 0:l.optOut)&&void 0!==j?j:c.optOut,g=null!==(U=null==l?void 0:l.sessionId)&&void 0!==U?U:c.sessionId,y=null!==(q=null!==(D=t.userId)&&void 0!==D?D:null==l?void 0:l.userId)&&void 0!==q?q:c.userId,n.previousSessionDeviceId=null!==(Y=null==l?void 0:l.deviceId)&&void 0!==Y?Y:c.deviceId,n.previousSessionUserId=null!==(M=null==l?void 0:l.userId)&&void 0!==M?M:c.userId,m={ipAddress:null===(z=null===(F=t.trackingOptions)||void 0===F?void 0:F.ipAddress)||void 0===z||z,language:null===(J=null===(V=t.trackingOptions)||void 0===V?void 0:V.language)||void 0===J||J,platform:null===(X=null===(K=t.trackingOptions)||void 0===K?void 0:K.platform)||void 0===X||X},b=null==l?void 0:l.pageCounter,S=null==l?void 0:l.debugLogsEnabled,void 0!==t.autocapture&&(t.defaultTracking=t.autocapture),[4,(_=new We(e,t.appVersion,a,o,t.defaultTracking,t.autocapture,d,t.flushIntervalMillis,t.flushMaxRetries,t.flushQueueSize,r,t.ingestionMetadata,t.instanceName,p,h,t.loggerProvider,t.logLevel,t.minIdLength,t.offline,v,t.partnerId,t.plan,t.serverUrl,t.serverZone,g,t.sessionTimeout,t.storageProvider,m,t.transport,t.useBatch,t.fetchRemoteConfig,y,b,S)).storageProvider.isEnabled()];case 8:return B.sent()||(_.loggerProvider.warn("Storage provider ".concat(_.storageProvider.constructor.name,"is%20not%20enabled.%20falling%20back%20to%20memorystorage-5.html")),_.storageProvider=new Se),[2,_]}}))}))},et=function(e,t){switch(void 0===e&&(e=Qe),void 0===t&&(t={}),e){case"localStorage":return new xe;case"sessionStorage":return new Ae;case"none":return new Se;default:return new Ee((0,i.Cl)((0,i.Cl)({},t),{expirationDays:t.expiration}))}},tt=function(e){return"xhr"===e?new Re:"beacon"===e?new Ne:new Oe},nt=function(e){return(0,i.sH)(void 0,void 0,void 0,(function(){var t,n,r,o,u,s,a;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return[4,(new Ee).isEnabled()];case 1:if(!i.sent()||!e&&("undefined"==typeof location||!location.hostname))return[2,""];for(t=null!=e?e:location.hostname,n=t.split("-11.html"),r=[],o="AMP_TLDTEST",u=n.length-2;u>=0;--u)r.push(n.slice(u).join("-11.html"));u=0,i.label=2;case 2:return u=this.localConfig.flushMaxRetries)return[2,this.completeRequest({err:"Remote config fetch rejected due to exceeded retry count"})];if(e.aborted)return[2,this.completeRequest({err:pt})];t!==this.lastFetchedSessionId&&(this.lastFetchedSessionId=t,this.attempts=0),g.label=1;case 1:g.trys.push([1,3,,4]),n=new URLSearchParams({api_key:this.localConfig.apiKey});try{for(r=(0,i.Ju)(this.configKeys),u=r.next();!u.done;u=r.next())s=u.value,n.append("config_keys",s)}catch(e){p={error:e}}finally{try{u&&!u.done&&(h=r.return)&&h.call(r)}finally{if(p)throw p.error}}return t&&n.set("session_id",String(t)),a={headers:{Accept:"*/*"},method:"GET"},c="".concat(this.getServerUrl(),"?").concat(n.toString()),this.attempts+=1,[4,fetch(c,(0,i.Cl)((0,i.Cl)({},a),{signal:e}))];case 2:if(null===(l=g.sent()))return[2,this.completeRequest({err:ht})];switch((new ke).buildStatus(l.status)){case o.Success:return this.attempts=0,[2,this.parseAndStoreConfig(l)];case o.Failed:return[2,this.retryFetch(e,t)];default:return[2,this.completeRequest({err:"Network error occurred, remote config fetch failed"})]}return[3,4];case 3:return f=g.sent(),d=f,e.aborted?[2,this.completeRequest({err:pt})]:[2,this.completeRequest({err:null!==(v=d.message)&&void 0!==v?v:ht})];case 4:return[2]}}))}))},this.retryFetch=function(e,t){return(0,i.sH)(r,void 0,void 0,(function(){var n=this;return(0,i.YH)(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(e){return setTimeout(e,n.attempts*n.retryTimeout)}))];case 1:return r.sent(),[2,this.fetchRemoteConfig(e,t)]}}))}))},this.parseAndStoreConfig=function(e){return(0,i.sH)(r,void 0,void 0,(function(){var t;return(0,i.YH)(this,(function(n){switch(n.label){case 0:return[4,e.json()];case 1:return t=n.sent(),this.completeRequest({success:"Remote config successfully fetched"}),[2,t]}}))}))},this.localConfig=t,this.configKeys=n}return e.prototype.getServerUrl=function(){return this.localConfig.serverZone===fe.STAGING?"https://sr-client-cfg.stag2.amplitude.com/config":this.localConfig.serverZone===fe.EU?"https://sr-client-cfg.eu.amplitude.com/config":"https://sr-client-cfg.amplitude.com/config"},e.prototype.completeRequest=function(e){var t=e.err,n=e.success;if(t)throw new Error(t);n&&this.localConfig.loggerProvider.log(n)},e}(),gt=function(e){var t=e.localConfig,n=e.configKeys;return(0,i.sH)(void 0,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){return[2,new vt({localConfig:t,configKeys:n})]}))}))},yt=function(){function e(e){this.config=e,this.config.loggerProvider.debug("Local configuration before merging with remote config",JSON.stringify(this.config,null,2))}return e.prototype.initialize=function(){return(0,i.sH)(this,void 0,void 0,(function(){var e;return(0,i.YH)(this,(function(t){switch(t.label){case 0:return e=this,[4,gt({localConfig:this.config,configKeys:["analyticsSDK"]})];case 1:return e.remoteConfigFetch=t.sent(),[2]}}))}))},e.prototype.generateJoinedConfig=function(){var e,t,n,r;return(0,i.sH)(this,void 0,void 0,(function(){var o,u,s;return(0,i.YH)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),(u=this.remoteConfigFetch)?[4,this.remoteConfigFetch.getRemoteConfig("analyticsSDK","browserSDK",this.config.sessionId)]:[3,2];case 1:u=a.sent(),a.label=2;case 2:return o=u,this.config.loggerProvider.debug("Remote configuration:",JSON.stringify(o,null,2)),o&&"autocapture"in o&&("boolean"==typeof o.autocapture&&(this.config.autocapture=o.autocapture),"object"==typeof o.autocapture&&(void 0===this.config.autocapture&&(this.config.autocapture=o.autocapture),"boolean"==typeof this.config.autocapture&&(this.config.autocapture=(0,i.Cl)({attribution:this.config.autocapture,fileDownloads:this.config.autocapture,formInteractions:this.config.autocapture,pageViews:this.config.autocapture,sessions:this.config.autocapture,elementInteractions:this.config.autocapture},o.autocapture)),"object"==typeof this.config.autocapture&&(this.config.autocapture=(0,i.Cl)((0,i.Cl)({},this.config.autocapture),o.autocapture))),this.config.defaultTracking=this.config.autocapture),this.config.loggerProvider.debug("Joined configuration: ",JSON.stringify(this.config,null,2)),null!==(e=(r=this.config).requestMetadata)&&void 0!==e||(r.requestMetadata=new b),(null===(t=this.remoteConfigFetch)||void 0===t?void 0:t.metrics.fetchTimeAPISuccess)&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_success",this.remoteConfigFetch.metrics.fetchTimeAPISuccess),(null===(n=this.remoteConfigFetch)||void 0===n?void 0:n.metrics.fetchTimeAPIFail)&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_fail",this.remoteConfigFetch.metrics.fetchTimeAPIFail),[3,4];case 3:return s=a.sent(),this.config.loggerProvider.error("Failed to fetch remote configuration because of error: ",s),[3,4];case 4:return[2,this.config]}}))}))},e}(),mt=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],bt=["div","span","h1","h2","h3","h4","h5","h6"],wt="[Amplitude] Element Clicked",St="[Amplitude] Element Tag",_t="[Amplitude] Element Text",Et="[Amplitude] Element Selector",It="[Amplitude] Page URL",Tt="https://app.amplitude.com/",kt={US:Tt,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},Ot="amp-visual-tagging-selector-highlight",Ct=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Pt(e){return"function"==typeof e}function xt(e){return Pt(null==e?void 0:e.then)}function At(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Rt=At((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function Nt(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Lt=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,o;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var s=(0,i.Ju)(u),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else u.remove(this);var c=this.initialTeardown;if(Pt(c))try{c()}catch(e){o=e instanceof Rt?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var f=(0,i.Ju)(l),d=f.next();!d.done;d=f.next()){var p=d.value;try{jt(p)}catch(e){o=null!=o?o:[],e instanceof Rt?o=(0,i.fX)((0,i.fX)([],(0,i.zs)(o)),(0,i.zs)(e.errors)):o.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}}if(o)throw new Rt(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)jt(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Nt(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&Nt(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();Lt.EMPTY;function Ht(e){return e instanceof Lt||e&&"closed"in e&&Pt(e.remove)&&Pt(e.add)&&Pt(e.unsubscribe)}function jt(e){Pt(e)?e():e.unsubscribe()}var Ut={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Dt={setTimeout:function(e,t){for(var n=[],r=2;r0&&(r=o[0]),An(r)}throw new Error("selector%20was%20not%20found-5.html")}function Pn(e,t,n){for(var r=null,o=[],u=e,s=0,a=function(){var e,a,c=jn(function(e){var t=e.getAttribute("id");if(t&&Sn.idName(t))return{name:"#"+CSS.escape(t),penalty:0};return null}(u))||jn.apply(void 0,(0,i.fX)([],(0,i.zs)(function(e){var t=Array.from(e.attributes).filter((function(e){return Sn.attr(e.name,e.value)}));return t.map((function(e){return{name:"[".concat(CSS.escape(e.name),'="').concat(CSS.escape(e.value),'"]'),penalty:.5}}))}(u)),!1))||jn.apply(void 0,(0,i.fX)([],(0,i.zs)(function(e){var t=Array.from(e.classList).filter(Sn.className);return t.map((function(e){return{name:"."+CSS.escape(e),penalty:1}}))}(u)),!1))||jn(function(e){var t=e.tagName.toLowerCase();if(Sn.tagName(t))return{name:t,penalty:2};return null}(u))||[{name:"*",penalty:3}],l=function(e){var t=e.parentNode;if(!t)return null;var n=t.firstChild;if(!n)return null;var r=0;for(;n&&(n.nodeType===Node.ELEMENT_NODE&&r++,n!==e);)n=n.nextSibling;return r}(u);if("all"==t)l&&(c=c.concat(c.filter(Hn).map((function(e){return Ln(e,l)}))));else if("two"==t)c=c.slice(0,1),l&&(c=c.concat(c.filter(Hn).map((function(e){return Ln(e,l)}))));else if("one"==t){var f=(0,i.zs)(c=c.slice(0,1),1)[0];l&&Hn(f)&&(c=[Ln(f,l)])}else"none"==t&&(c=[{name:"*",penalty:3}],l&&(c=[Ln(c[0],l)]));try{for(var d=(e=void 0,(0,i.Ju)(c)),p=d.next();!p.done;p=d.next()){(f=p.value).level=s}}catch(t){e={error:t}}finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(e)throw e.error}}if(o.push(c),o.length>=Sn.seedMinLength&&(r=xn(o,n)))return"break";u=u.parentElement,s++};u;){if("break"===a())break}return r||(r=xn(o,n)),!r&&n?n():r}function xn(e,t){var n,r;if(e.reduce((function(e,t){return e*t.length}),1)>Sn.threshold)return t?t():null;var o=qn(Dn(e));try{for(var u=(0,i.Ju)(o),s=u.next();!s.done;s=u.next()){var a=s.value;if(Nn(a))return a}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return null}function An(e){for(var t=e[0],n=t.name,r=1;r ").concat(n):"".concat(e[r].name," ").concat(n),t=e[r]}return n}function Rn(e){return e.map((function(e){return e.penalty})).reduce((function(e,t){return e+t}),0)}function Nn(e){var t=An(e);switch(_n.querySelectorAll(t).length){case 0:throw new Error("Can't select any node with this selector: ".concat(t));case 1:return!0;default:return!1}}function Ln(e,t){return{name:e.name+":nth-child(".concat(t,")-6.html"),penalty:e.penalty+1}}function Hn(e){return"html"!==e.name&&!e.name.startsWith("#")}function jn(){for(var e=[],t=0;t0?n:null}function Un(e){return null!=e}function Dn(e,t){var n,r,o,u,s,a;return void 0===t&&(t=[]),(0,i.YH)(this,(function(c){switch(c.label){case 0:if(!(e.length>0))return[3,9];c.label=1;case 1:c.trys.push([1,6,7,8]),n=(0,i.Ju)(e[0]),r=n.next(),c.label=2;case 2:return r.done?[3,5]:(o=r.value,[5,(0,i.Ju)(Dn(e.slice(1,e.length),t.concat(o)))]);case 3:c.sent(),c.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return u=c.sent(),s={error:u},[3,8];case 7:try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}return[7];case 8:return[3,11];case 9:return[4,t];case 10:c.sent(),c.label=11;case 11:return[2]}}))}function qn(e){return(0,i.fX)([],(0,i.zs)(e),!1).sort((function(e,t){return Rn(e)-Rn(t)}))}function Yn(e,t,n){var r,o,u;return void 0===n&&(n={counter:0,visited:new Map}),(0,i.YH)(this,(function(s){switch(s.label){case 0:if(!(e.length>2&&e.length>Sn.optimizedMinLength))return[3,5];r=1,s.label=1;case 1:return rSn.maxNumberOfTries?[2]:(n.counter+=1,(o=(0,i.fX)([],(0,i.zs)(e),!1)).splice(r,1),u=An(o),n.visited.has(u)?[2]:Nn(o)&&function(e,t){return _n.querySelector(An(e))===t}(o,t)?[4,o]:[3,4]):[3,5];case 2:return s.sent(),n.visited.set(u,!0),[5,(0,i.Ju)(Yn(o,t,n))];case 3:s.sent(),s.label=4;case 4:return r++,[3,1];case 5:return[2]}}))}var Mn=["input","select","textarea"],Fn=function(e,t){return function(n,r){var i,o,u,s=e.pageUrlAllowlist,a=e.shouldTrackEventResolver,c=null===(o=null===(i=null==r?void 0:r.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===o?void 0:o.call(i);if(!c)return!1;if(a)return a(n,r);if(!Xn(window.location.href,s))return!1;var l=String(null==r?void 0:r.getAttribute("type"))||"";if("string"==typeof l)switch(l.toLowerCase()){case"hidden":case"password":return!1}if(t){var f=t.some((function(e){var t;return!!(null===(t=null==r?void 0:r.matches)||void 0===t?void 0:t.call(r,e))}));if(!f)return!1}switch(c){case"input":case"select":case"textarea":return"change"===n||"click"===n;default:var d=null===(u=null===window||void 0===window?void 0:window.getComputedStyle)||void 0===u?void 0:u.call(window,r);return!(!d||"pointer"!==d.getPropertyValue("cursor")||"click"!==n)||"click"===n}}},zn=function(e){if(null==e)return!1;if("string"==typeof e){if(/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,"")))return!1;if(/(^\d{3}-?\d{2}-?\d{4}$)/.test(e))return!1}return!0},Vn=function(e){var t,n,r,i=null===(n=null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase)||void 0===n?void 0:n.call(t),o=e instanceof HTMLElement&&"true"===(null===(r=e.getAttribute("contenteditable"))||void 0===r?void 0:r.toLowerCase());return!Mn.includes(i)&&!o},Jn=function(e){var t="";return Vn(e)&&e.childNodes&&e.childNodes.length&&e.childNodes.forEach((function(e){var n,r="";(n=e)&&3===n.nodeType?e.textContent&&(r=e.textContent):r=Jn(e),t+=r.split(/(\s+)/).filter(zn).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)})),t},Kn=function(e,t){var n,r,i="";try{return i=Cn(e,{className:function(e){return e!==Ot},maxNumberOfTries:1e3})}catch(e){if(t){var o=e;t.warn("Failed to get selector with finder, use fallback strategy instead: ".concat(o.toString()))}}var u=null===(r=null===(n=null==e?void 0:e.tagName)||void 0===n?void 0:n.toLowerCase)||void 0===r?void 0:r.call(n);u&&(i=u);var s=e.getAttribute("id"),a=e.getAttribute("class");if(s)i="#".concat(s);else if(a){var c=a.split(" ").filter((function(e){return e!==Ot})).join("-11.html");c&&(i="".concat(i,"-11.html").concat(c))}return i},Xn=function(e,t){return!t||!t.length||t.some((function(t){return"string"==typeof t?e===t:e.match(t)}))},Bn=function(e){return Object.keys(e).reduce((function(t,n){var r=e[n];return function(e){return null==e||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length}(r)||(t[n]=r),t}),{})},$n=function(e){var t,n=e.parentElement;if(!n)return"";try{t=n.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}if(t){var r=t.textContent||"";return zn(r)?r:""}return $n(n)},Gn=function(e,t){return e?t.some((function(t){var n;return null===(n=null==e?void 0:e.matches)||void 0===n?void 0:n.call(e,t)}))?e:Gn(null==e?void 0:e.parentElement,t):null},Qn=function(e,t){var n,r,i;if(!e)return{};var o=null===(i=null===(r=null==e?void 0:e.tagName)||void 0===r?void 0:r.toLowerCase)||void 0===i?void 0:i.call(r),u=Kn(e,t),s=((n={})[St]=o,n[_t]=Jn(e),n[Et]=u,n[It]=window.location.href.split("?")[0],n);return Bn(s)};var Wn=function(e){return!(null===e.event.target||!e.closestTrackedAncestor)},Zn=function(){function e(e){var t=(void 0===e?{}:e).origin,n=void 0===t?Tt:t,r=this;this.endpoint=Tt,this.requestCallbacks={},this.onSelect=function(e){r.notify({action:"element-selected",data:e})},this.onTrack=function(e,t){"selector-mode-changed"===e?r.notify({action:"track-selector-mode-changed",data:t}):"selector-moved"===e&&r.notify({action:"track-selector-moved",data:t})},this.endpoint=n}return e.prototype.notify=function(e){var t,n,r,i;null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message sent: ",JSON.stringify(e)),null===(i=null===(r=window.opener)||void 0===r?void 0:r.postMessage)||void 0===i||i.call(r,e,this.endpoint)},e.prototype.sendRequest=function(e,t,n){var r=this;void 0===n&&(n={timeout:15e3});var i="".concat(Date.now(),"-12.html").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise((function(t,u){r.requestCallbacks[i]={resolve:t,reject:u},r.notify(o),(null==n?void 0:n.timeout)>0&&setTimeout((function(){u(new Error("".concat(e," timed out (id: ").concat(i,")-6.html"))),delete r.requestCallbacks[i]}),n.timeout)}))},e.prototype.handleResponse=function(e){var t;this.requestCallbacks[e.id]?(this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]):null===(t=this.logger)||void 0===t||t.warn("No callback found for request id: ".concat(e.id))},e.prototype.setup=function(e){var t=this,n=void 0===e?{}:e,r=n.logger,i=n.endpoint,o=n.isElementSelectable,u=n.cssSelectorAllowlist,s=n.actionClickAllowlist;this.logger=r,i&&this.endpoint===Tt&&(this.endpoint=i);var a=null;window.addEventListener("message",(function(e){var n,r,i,c,l;if(null===(r=null===(n=t.logger)||void 0===n?void 0:n.debug)||void 0===r||r.call(n,"Message received: ",JSON.stringify(e)),t.endpoint===e.origin){var f,d=null==e?void 0:e.data,p=null==d?void 0:d.action;if(p)if("id"in d)null===(c=null===(i=t.logger)||void 0===i?void 0:i.debug)||void 0===c||c.call(i,"Received Response to previous request: ",JSON.stringify(e)),t.handleResponse(d);else if("ping"===p)t.notify({action:"pong"});else if("initialize-visual-tagging-selector"===p){var h=null==d?void 0:d.data;(f="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",new Promise((function(e,t){var n;try{var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=f,r.addEventListener("load",(function(){e({status:!0})}),{once:!0}),r.addEventListener("error",(function(){t({status:!1,message:"Failed to load the script ".concat(f)})})),null===(n=document.head)||void 0===n||n.appendChild(r)}catch(e){t(e)}}))).then((function(){var e;a=null===(e=null===window||void 0===window?void 0:window.amplitudeVisualTaggingSelector)||void 0===e?void 0:e.call(window,{getEventTagProps:Qn,isElementSelectable:function(e){return!o||o((null==h?void 0:h.actionType)||"click",e)},onTrack:t.onTrack,onSelect:t.onSelect,visualHighlightClass:Ot,messenger:t,cssSelectorAllowlist:u,actionClickAllowlist:s}),t.notify({action:"selector-loaded"})})).catch((function(){var e;null===(e=t.logger)||void 0===e||e.warn("Failed to initialize visual tagging selector")}))}else"close-visual-tagging-selector"===p&&(null===(l=null==a?void 0:a.close)||void 0===l||l.call(a))}})),this.notify({action:"page-loaded"})},e}(),er=["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot"],tr=["type"],nr=["svg","path","g"],rr=["password","hidden"];var ir=function(e){var t;return e?(t=function(e,t){for(var n=0,r=0;rt)return e.slice(0,r)}return e}(function(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t}(e).map((function(e){return function(e){var t,n,r,o,u,s;if(null===e)return null;var a=String(e.tagName).toLowerCase(),c={tag:a},l=Array.from(null!==(o=null===(r=e.parentElement)||void 0===r?void 0:r.children)&&void 0!==o?o:[]);l.length&&(c.index=l.indexOf(e),c.indexOfType=l.filter((function(t){return t.tagName===e.tagName})).indexOf(e));var f=null===(s=null===(u=e.previousElementSibling)||void 0===u?void 0:u.tagName)||void 0===s?void 0:s.toLowerCase();f&&(c.prevSib=String(f));var d=e.getAttribute("id");d&&(c.id=String(d));var p=Array.from(e.classList);p.length&&(c.classes=p);var h={},v=Array.from(e.attributes).filter((function(e){return!er.includes(e.name)})),g=!Vn(e);if(!rr.includes(String(e.getAttribute("type")))&&!nr.includes(a))try{for(var y=(0,i.Ju)(v),m=y.next();!m.done;m=y.next()){var b=m.value;g&&!tr.includes(b.name)||(h[b.name]=String(b.value).substring(0,128))}}catch(e){t={error:e}}finally{try{m&&!m.done&&(n=y.return)&&n.call(y)}finally{if(t)throw t.error}}return Object.keys(h).length&&(c.attrs=h),c}(e)})),1024),t):[]};function or(e,t){void 0===t&&(t=!1);try{if(null==e)return t?"None":null;if("string"==typeof e)return t?(e=e.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")).includes('"')?"'".concat(e,"'"):e.includes("'")?'"'.concat(e.replace(/'/g,"\\'"),'"'):"'".concat(e,"'"):e;if("boolean"==typeof e)return e?"True":"False";if(Array.isArray(e)){var n=e.map((function(e){return or(e,!0)}));return"[".concat(n.join(", "),"%5d-5.html")}if("object"==typeof e){var r=Object.entries(e).filter((function(e){return null!=(0,i.zs)(e,1)[0]})).map((function(e){var t=(0,i.zs)(e,2),n=t[0],r=t[1];return"".concat(String(or(n,!0)),": ").concat(String(or(r,!0)))})),o="{".concat(r.join(", "),"%7d-5.html");return o.includes("\\'")&&(o=o.replace(/'/g,"'").replace(/'/g,"\\'")),o}return e.toString()}catch(e){return null}}function ur(e,t){return pn((function(n,r){var i=0;n.subscribe(hn(r,(function(n){return e.call(t,n,i++)&&r.next(n)})))}))}var sr=function(e){function t(t,n){return e.call(this)||this}return(0,i.C6)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(Lt),ar={setInterval:function(e,t){for(var n=[],r=2;r0&&f(i)}),void 0,void 0,(function(){(null==o?void 0:o.closed)||null==o||o.unsubscribe(),s=null}))),!c&&f(null!=r?"number"==typeof r?r:+r-a.now():i)}))}({first:500,with:function(){return vr}}),gn((function(){return e})))},pn((function(e,t){var n=null,r=0,i=!1,o=function(){return i&&!n&&t.complete()};e.subscribe(hn(t,(function(e){null==n||n.unsubscribe();var i=0,u=r++;fn(p(e,u)).subscribe(n=hn(t,(function(n){return t.next(h?h(e,n,u,i++):n)}),(function(){n=null,o()})))}),(function(){i=!0,o()})))}))));return g.subscribe((function(e){null==t||t.track(wt,o("click",e.closestTrackedAncestor),{time:e.timestamp})}))}!function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable"}(Ar||(Ar={}));var Hr=function(e){var t,n,r;void 0===e&&(e={});var o=e.dataAttributePrefix,u=void 0===o?"data-amp-track-":o,s=e.visualTaggingOptions,a=void 0===s?{enabled:!0,messenger:new Zn}:s;e.cssSelectorAllowlist=null!==(t=e.cssSelectorAllowlist)&&void 0!==t?t:mt,e.actionClickAllowlist=null!==(n=e.actionClickAllowlist)&&void 0!==n?n:bt,e.debounceTime=null!==(r=e.debounceTime)&&void 0!==r?r:0;var c="@amplitude/plugin-autocapture-browser",l=[],f=void 0,d=function(e,t){var n,r,i,o=null===(i=null===(r=null==t?void 0:t.tagName)||void 0===r?void 0:r.toLowerCase)||void 0===i?void 0:i.call(r),s="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},a=t.getAttribute("aria-label"),c=function(e,t){return e.getAttributeNames().reduce((function(n,r){if(r.startsWith(t)){var i=r.replace(t,""),o=e.getAttribute(r);i&&(n[i]=o||"")}return n}),{})}(t,u),l=$n(t),d=Kn(t,f),p=((n={})["[Amplitude] Element ID"]=t.getAttribute("id")||"",n["[Amplitude] Element Class"]=t.getAttribute("class"),n["[Amplitude] Element Hierarchy"]=ir(t),n[St]=o,n[_t]=Jn(t),n["[Amplitude] Element Position Left"]=null==s.left?null:Math.round(s.left),n["[Amplitude] Element Position Top"]=null==s.top?null:Math.round(s.top),n["[Amplitude] Element Aria Label"]=a,n["[Amplitude] Element Attributes"]=c,n[Et]=d,n["[Amplitude] Element Parent Label"]=l,n[It]=window.location.href.split("?")[0],n["[Amplitude] Page Title"]="undefined"!=typeof document&&document.title||"",n["[Amplitude] Viewport Height"]=window.innerHeight,n["[Amplitude] Viewport Width"]=window.innerWidth,n);return"a"===o&&"click"===e&&t instanceof HTMLAnchorElement&&(p["[Amplitude] Element Href"]=t.href),Bn(p)},p=function(t,n){var r={event:t,timestamp:Date.now(),type:n};if(function(e){return"click"===e.type||"change"===e.type}(r)&&null!==r.event.target){var i=Gn(r.event.target,e.cssSelectorAllowlist);return i&&(r.closestTrackedAncestor=i,r.targetElementProperties=d(r.type,i)),r}return r};return{name:c,type:"enrichment",setup:function(t,n){return(0,i.sH)(void 0,void 0,void 0,(function(){var r,o,u,s,h,v,g,y,m,b;return(0,i.YH)(this,(function(w){return f=t.loggerProvider,"undefined"==typeof document||(r=Fn(e,e.cssSelectorAllowlist),o=Fn(e,e.actionClickAllowlist),u=function(){var e,t,n=kn(document,"click",{capture:!0}).pipe(gn((function(e){return p(e,"click")}))),r=kn(document,"change",{capture:!0}).pipe(gn((function(e){return p(e,"change")})));window.navigation&&(t=kn(window.navigation,"navigate").pipe(gn((function(e){return p(e,"navigate")}))));var i=new tn((function(e){var t=new MutationObserver((function(t){e.next(t)}));return t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})).pipe(gn((function(e){return p(e,"mutation")})));return(e={})[Ar.ClickObservable]=n,e[Ar.ChangeObservable]=r,e[Ar.NavigateObservable]=t,e[Ar.MutationObservable]=i,e}(),s=xr({allObservables:u,options:e,amplitude:n,shouldTrackEvent:r}),l.push(s),h=function(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackEvent;return n.changeObservable.pipe(ur(Wn),ur((function(e){return i("change",e.closestTrackedAncestor)}))).subscribe((function(e){null==t||t.track("[Amplitude] Element Changed",r("change",e.closestTrackedAncestor))}))}({allObservables:u,getEventProperties:d,amplitude:n,shouldTrackEvent:r}),l.push(h),v=Lr({allObservables:u,options:e,getEventProperties:d,amplitude:n,shouldTrackEvent:r,shouldTrackActionClick:o}),l.push(v),null===(m=null==t?void 0:t.loggerProvider)||void 0===m||m.log("".concat(c,"has%20been%20successfully%20added-5.html")),window.opener&&a.enabled&&(g=e.cssSelectorAllowlist,y=e.actionClickAllowlist,null===(b=a.messenger)||void 0===b||b.setup((0,i.Cl)((0,i.Cl)({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:kt[t.serverZone]}),{isElementSelectable:Fn(e,(0,i.fX)((0,i.fX)([],(0,i.zs)(g),!1),(0,i.zs)(y),!1)),cssSelectorAllowlist:g,actionClickAllowlist:y})))),[2]}))}))},execute:function(e){return(0,i.sH)(void 0,void 0,void 0,(function(){return(0,i.YH)(this,(function(t){return[2,e]}))}))},teardown:function(){return(0,i.sH)(void 0,void 0,void 0,(function(){var e,t,n,r;return(0,i.YH)(this,(function(o){try{for(e=(0,i.Ju)(l),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(r=e.return)&&r.call(e)}finally{if(n)throw n.error}}return[2]}))}))}}},jr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t.prototype.init=function(e,t,n){var r,o;return void 0===e&&(e=""),arguments.length>2?(r=t,o=n):"string"==typeof t?(r=t,o=void 0):(r=null==t?void 0:t.userId,o=t),l(this._init((0,i.Cl)((0,i.Cl)({},o),{userId:r,apiKey:e})))},t.prototype._init=function(t){var n,r,o;return(0,i.sH)(this,void 0,void 0,(function(){var u,s,a,c,l,f=this;return(0,i.YH)(this,(function(d){switch(d.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,Ze(t.apiKey,t,this)]);case 1:return u=d.sent(),t.fetchRemoteConfig?[4,(h=u,(0,i.sH)(void 0,void 0,void 0,(function(){var e;return(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,(e=new yt(h)).initialize()];case 1:return t.sent(),[2,e]}}))})))]:[3,4];case 2:return[4,d.sent().generateJoinedConfig()];case 3:u=d.sent(),d.label=4;case 4:return[4,e.prototype._init.call(this,u)];case 5:return d.sent(),this.logBrowserOptions(u),A(this.config.defaultTracking)?(s=function(e){return A(e.defaultTracking)&&e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.attribution&&"object"==typeof e.defaultTracking.attribution?(0,i.Cl)({},e.defaultTracking.attribution):{}}(this.config),this.webAttribution=new re(s,this.config),[4,this.webAttribution.init()]):[3,7];case 6:d.sent(),d.label=7;case 7:return a=Z(),c=Number.isNaN(Number(a.ampSessionId))?void 0:Number(a.ampSessionId),this.setSessionId(null!==(o=null!==(r=null!==(n=t.sessionId)&&void 0!==n?n:c)&&void 0!==r?r:this.config.sessionId)&&void 0!==o?o:Date.now()),(l=ve(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),null===this.config.offline?[3,9]:[4,this.add(dt()).promise];case 8:d.sent(),d.label=9;case 9:return[4,this.add(new _).promise];case 10:return d.sent(),[4,this.add(new we).promise];case 11:return d.sent(),[4,this.add(new ge).promise];case 12:return d.sent(),function(e){ft||void 0!==e.defaultTracking||(e.loggerProvider.warn("`options.defaultTracking` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to `options.defaultTracking`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:\n\namplitude.init(, {\n defaultTracking: true,\n});\n\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details."),ft=!0)}(this.config),p=this.config.defaultTracking,x(p,"fileDownloads")?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(lt()).promise]):[3,14];case 13:d.sent(),d.label=14;case 14:return function(e){return x(e,"formInteractions")}(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(at()).promise]):[3,16];case 15:d.sent(),d.label=16;case 16:return R(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(it(j(this.config))).promise]):[3,18];case 17:d.sent(),d.label=18;case 18:return L(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(Hr(H(this.config))).promise]):[3,20];case 19:d.sent(),d.label=20;case 20:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 21:return d.sent(),l.eventBridge.setEventReceiver((function(e){f.track(e.eventType,e.eventProperties)})),[2]}var p,h}))}))},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){this.config?(this.config.loggerProvider.debug("function setUserId: ",e),e===this.config.userId&&void 0!==e||(this.config.userId=e,function(e,t){ve(t).identityStore.editIdentity().setUserId(e).commit()}(e,this.config.instanceName))):this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",e),this.config.deviceId=e,function(e,t){ve(t).identityStore.editIdentity().setDeviceId(e).commit()}(e,this.config.instanceName)):this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setDeviceId(w()),this.setUserId(void 0)},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,n=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),l(Promise.resolve());if(e===this.config.sessionId)return l(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId(),i=this.config.lastEventTime,o=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,N(this.config.defaultTracking)&&(r&&i&&n.push(this.track(Fe,void 0,{device_id:this.previousSessionDeviceId,event_id:++o,session_id:r,time:i+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var u=this.trackCampaignEventIfNeeded(++o,n);return N(this.config.defaultTracking)&&n.push(this.track(Me,void 0,{event_id:u?++o:o,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,l(Promise.all(n))},t.prototype.extendSession=function(){this.config?this.config.lastEventTime=Date.now():this.q.push(this.extendSession.bind(this))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=tt(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,n){if(me(t)){var r=t._q;t._q=[],t=ye(new E.T,r)}return(null==n?void 0:n.user_id)&&this.setUserId(n.user_id),(null==n?void 0:n.device_id)&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(me(r)){var o=r._q;r._q=[],r=ye(new E.T,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(me(t)){var r=t._q;t._q=[],t=ye(new k,r)}return e.prototype.revenue.call(this,t,n)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var n=this.webAttribution.generateCampaignEvent(e);return t?t.push(this.track(n).promise):this.track(n),this.config.loggerProvider.log("tracking%20attribution-5.html"),!0},t.prototype.process=function(t){return(0,i.sH)(this,void 0,void 0,(function(){var n,r,o;return(0,i.YH)(this,(function(i){return n=Date.now(),r=ne(this.config.sessionTimeout,this.config.lastEventTime),o=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type===Me||t.event_type===Fe||t.session_id&&t.session_id!==this.getSessionId()||(r||o?(this.setSessionId(n),o&&this.config.loggerProvider.log("created%20a%20new%20session%20for%20new%20campaign-5.html")):r||this.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,t)]}))}))},t.prototype.logBrowserOptions=function(e){try{var t=(0,i.Cl)((0,i.Cl)({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",JSON.stringify(t))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},t}(P);const Ur=(Dr=new jr,{init:c(Dr.init.bind(Dr),"init",u(Dr),a(Dr,["config"])),add:c(Dr.add.bind(Dr),"add",u(Dr),a(Dr,["config.apiKey","timeline.plugins"])),remove:c(Dr.remove.bind(Dr),"remove",u(Dr),a(Dr,["config.apiKey","timeline.plugins"])),track:c(Dr.track.bind(Dr),"track",u(Dr),a(Dr,["config.apiKey","timeline.queue.length"])),logEvent:c(Dr.logEvent.bind(Dr),"logEvent",u(Dr),a(Dr,["config.apiKey","timeline.queue.length"])),identify:c(Dr.identify.bind(Dr),"identify",u(Dr),a(Dr,["config.apiKey","timeline.queue.length"])),groupIdentify:c(Dr.groupIdentify.bind(Dr),"groupIdentify",u(Dr),a(Dr,["config.apiKey","timeline.queue.length"])),setGroup:c(Dr.setGroup.bind(Dr),"setGroup",u(Dr),a(Dr,["config.apiKey","timeline.queue.length"])),revenue:c(Dr.revenue.bind(Dr),"revenue",u(Dr),a(Dr,["config.apiKey","timeline.queue.length"])),flush:c(Dr.flush.bind(Dr),"flush",u(Dr),a(Dr,["config.apiKey","timeline.queue.length"])),getUserId:c(Dr.getUserId.bind(Dr),"getUserId",u(Dr),a(Dr,["config","config.userId"])),setUserId:c(Dr.setUserId.bind(Dr),"setUserId",u(Dr),a(Dr,["config","config.userId"])),getDeviceId:c(Dr.getDeviceId.bind(Dr),"getDeviceId",u(Dr),a(Dr,["config","config.deviceId"])),setDeviceId:c(Dr.setDeviceId.bind(Dr),"setDeviceId",u(Dr),a(Dr,["config","config.deviceId"])),reset:c(Dr.reset.bind(Dr),"reset",u(Dr),a(Dr,["config","config.userId","config.deviceId"])),getSessionId:c(Dr.getSessionId.bind(Dr),"getSessionId",u(Dr),a(Dr,["config"])),setSessionId:c(Dr.setSessionId.bind(Dr),"setSessionId",u(Dr),a(Dr,["config"])),extendSession:c(Dr.extendSession.bind(Dr),"extendSession",u(Dr),a(Dr,["config"])),setOptOut:c(Dr.setOptOut.bind(Dr),"setOptOut",u(Dr),a(Dr,["config"])),setTransport:c(Dr.setTransport.bind(Dr),"setTransport",u(Dr),a(Dr,["config"]))});var Dr,qr=Ur.identify,Yr=Ur.init,Mr=Ur.track},9544:(e,t,n)=>{n.d(t,{OP:()=>c,bu:()=>s,fS:()=>o,mG:()=>r,mJ:()=>u,pL:()=>a,r:()=>i});var r="-12.html",i="AMP",o="".concat(i,"_unsent"),u="https://api2.amplitude.com/2/httpapi",s="https://api.eu.amplitude.com/2/httpapi",a="https://api2.amplitude.com/batch",c="https://api.eu.amplitude.com/batch"},1145:(e,t,n)=>{n.d(t,{T:()=>s});var r=n(1635),i=n(4039),o=n(9544),u=n(2763),s=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return(0,r.Cl)({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(i.eX.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(i.eX.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(i.eX.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(i.eX.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(i.eX.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(i.eX.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(i.eX.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(i.eX.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(i.eX.UNSET,e,o.mG),this},e.prototype.clearAll=function(){return this._properties={},this._properties[i.eX.CLEAR_ALL]=o.mG,this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[i.eX.CLEAR_ALL]&&(!this._propertySet.has(t)&&(e===i.eX.ADD?"number"==typeof n:e===i.eX.UNSET||e===i.eX.REMOVE||(0,u.E)(t,n)))},e}()},2763:(e,t,n)=>{n.d(t,{E:()=>o,a:()=>i});var r=n(1635),i=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!o(t,n))return!1}return!0},o=function(e,t){var n,o;if("string"!=typeof e)return!1;if(Array.isArray(t)){var u=!0;try{for(var s=(0,r.Ju)(t),a=s.next();!a.done;a=s.next()){var c=a.value;if(Array.isArray(c))return!1;if("object"==typeof c)u=u&&i(c);else if(!["number","string"].includes(typeof c))return!1;if(!u)return!1}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}}else{if(null==t)return!1;if("object"==typeof t)return i(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0}},4039:(e,t,n)=>{var r,i,o;n.d(t,{Kl:()=>i,SE:()=>o,eX:()=>r}),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"}(r||(r={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(i||(i={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(o||(o={}))},6593:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{R2:()=>i});(function(){return!["undefined"==typeof window?"undefined":r(window),"undefined"==typeof document?"undefined":r(document)].includes("undefined")})&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent);var i=function(){if(window.location.host.includes("localhost"))return"localhost";var e=window.location.host.split("-11.html");return 2!==e.length&&e.shift(),e.join("-11.html")}},3885:(e,t,n)=>{n.a(e,(async(e,t)=>{try{var r=n(7496),i=n(1145),o=n(8987),u=n(2699),s=n(1305),a=n(1133),c=n(1246),l=n(6593);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function S(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _(e,t){if(e){if("string"==typeof e)return E(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;--o){var u=this.tryEntries[o],s=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var a=r.call(u,"catchLoc"),c=r.call(u,"finallyLoc");if(a&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function R(e,t,n,r,i,o,u){try{var s=e[o](u),a=s.value}catch(e){return void n(e)}s.done?t(a):Promise.resolve(a).then(r,i)}function N(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function u(e){R(o,r,i,u,s,"next",e)}function s(e){R(o,r,i,u,s,"throw",e)}u(void 0)}))}}amplitude_js.base_url;var f=amplitude_js.api_key||void 0,d=amplitude_js.analytics_url||void 0,p=amplitude_js.domain||void 0,h=amplitude_js.reseller_id||void 0;function L(){return H.apply(this,arguments)}function H(){return(H=N(A().mark((function e(){var t,n,r;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(0,a.R)("hostingerDeviceIdLocal")){e.next=14;break}return e.prev=2,e.next=5,fetch("set-hostinger-device-id.html",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer www.hostinger.com"},credentials:"include"}).then((function(e){return e.json()}));case 5:return n=e.sent,r=n.data.hostingerDeviceId,o.A.set("hostingerDeviceIdLocal",String(r),{expires:30,path:"/",domain:(0,l.R2)()}),e.abrupt("return",r);case 11:e.prev=11,e.t0=e.catch(2),console.error("error%20while%20generating%20device%20id-5.html");case 14:return e.abrupt("return","".concat(t));case 15:case"end":return e.stop()}}),e,null,[[2,11]])})))).apply(this,arguments)}var v=function(){var e=N(A().mark((function e(){var t,n;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f&&p&&d&&h){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,L();case 4:t=e.sent,r.Ts(f,{serverUrl:d,deviceId:t,defaultTracking:{attribution:!1,pageViews:!1,sessions:!1,formInteractions:!1,fileDownloads:!1},cookieOptions:{domain:p},transport:"beacon",flushIntervalMillis:0,flushQueueSize:1}),(n=new i.T).setOnce("device_id",t),Object.values(u.t).forEach((function(e){var t=(0,a.R)(e);t&&n.setOnce(e,t)})),r.ls(n),g();case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),g=function(){var e=new URLSearchParams(document.location.search);Object.values(u.t).forEach((function(t){var n=e.get(String(t));n&&n.length>0&&(0,a.T)(String(t),String(n))}))},y=function(){var e=N(A().mark((function e(t){var n,i;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=b({current_document_referrer:document.referrer,original_document_referrer:m()}),r.u4(t.name,(0,c.hN)(O(O(O({userGaId:(null===(n=(0,a.R)("_ga"))||void 0===n?void 0:n.toString())||void 0,resellerId:h,brand:p.replace("www-5.html","")},Object.values(u.t).reduce((function(e,t){return(0,a.R)(t).length>0?O(O({},e),{},C({},t,(0,a.R)(t))):O({},e)}),{})),{},{creationLocation:window.location.pathname.replaceAll("index.html","_-9.html"),creationPath:window.location.pathname.replace(/\/$/,""),deviceType:(0,s.U)(),full_url:window.location.href},i),t.properties||{})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){return(0,a.R)("originalReferrer")||(0,a.T)("originalReferrer",String(document.referrer)),(0,a.R)("originalReferrer")},b=function(e){return Object.fromEntries(Object.entries(e).filter((function(e){var t,n,r=(n=2,T(t=e)||I(t,n)||_(t,n)||S()),i=(r[0],r[1]);return null!=i&&""!==i})))};await v().then((function(){y({name:"website.enter"})}));t()}catch(j){t(j)}}),1)},2699:(e,t,n)=>{n.d(t,{t:()=>r});var r={UTM_SOURCE:"utm_source",UTM_CAMPAIGN:"utm_campaign",UTM_MEDIUM:"utm_medium",UTM_TERM:"utm_term",UTM_CONTENT:"utm_content",REFERRER:"referrer",REFERRING_DOMAIN:"referring_domain",GCLID:"gclid",FBCLID:"fbclid"}},1133:(e,t,n)=>{function r(e,t,n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3);var i="expires="+r.toUTCString();document.cookie=e+"="+t+";"+i+";path=/"}function i(e){for(var t=e+"=",n=decodeURIComponent(document.cookie).split("%3b-5.html"),r=0;ri,T:()=>r})},1246:(e,t,n)=>{function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,u,s=[],a=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);a=!0);}catch(e){c=!0,i=e}finally{try{if(!a&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nu});var u=function(e){if("object"===o(n=e)&&null!==n&&!Array.isArray(e)){var t={};return Object.keys(e).forEach((function(n){var i,o=(i=n)?i.replace(/(^[A-Z])/,(function(e){return(r(e,1)[0]||"").toLowerCase()})).replace(/([A-Z])/g,(function(e){var t=r(e,1)[0];return"_".concat((t||"").toLowerCase())})):"";if(o)return t[o]=u(e[n])})),t}var n;if(Array.isArray(e)){var i=[];return e.forEach((function(e){return i.push(u(e))})),i}return e}},1305:(e,t,n)=>{n.d(t,{U:()=>r});var r=function(){var e,t;if(!window)return"";var n=(null===(e=window)||void 0===e?void 0:e.outerWidth)||(null===(t=window)||void 0===t?void 0:t.innerWidth);return n>1024?"desktop":n>767?"tablet":"mobile"}},8987:(e,t,n)=>{function r(e){for(var t=1;ti});var i=function e(t,n){function i(e,i,o){if("undefined"!=typeof document){"number"==typeof(o=r({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var s in o)o[s]&&(u+="; "+s,!0!==o[s]&&(u+="%3d-5.html"+o[s].split("%3b-5.html")[0]));return document.cookie=e+"="+t.write(i,e)+u}}return Object.create({set:i,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i{n.d(t,{AQ:()=>p,C6:()=>i,Cl:()=>o,Ju:()=>c,N3:()=>d,Tt:()=>u,YH:()=>a,fX:()=>f,sH:()=>s,xN:()=>h,zs:()=>l});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}function f(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i1||s(e,t)}))},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=i[e](t)).value instanceof d?Promise.resolve(n.value.v).then(a,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function a(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function h(e){if(!Symbol.asyncIterator)throw new TypeError("symbol.asynciterator%20is%20not%20defined-4.html");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=c(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError}},o={};function u(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return i[e](n,n.exports,u),n.exports}e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",n="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",r=e=>{e&&e.d<1&&(e.d=1,e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},u.a=(i,o,u)=>{var s;u&&((s=[]).d=-1);var a,c,l,f=new Set,d=i.exports,p=new Promise(((e,t)=>{l=t,c=e}));p[t]=d,p[e]=e=>(s&&e(s),f.forEach(e),p.catch((e=>{}))),i.exports=p,o((i=>{var o;a=(i=>i.map((i=>{if(null!==i&&"object"==typeof i){if(i[e])return i;if(i.then){var o=[];o.d=0,i.then((e=>{u[t]=e,r(o)}),(e=>{u[n]=e,r(o)}));var u={};return u[e]=e=>e(o),u}}var s={};return s[e]=e=>{},s[t]=i,s})))(i);var u=()=>a.map((e=>{if(e[n])throw e[n];return e[t]})),c=new Promise((t=>{(o=()=>t(u)).r=0;var n=e=>e!==s&&!f.has(e)&&(f.add(e),e&&!e.d&&(o.r++,e.push(o)));a.map((t=>t[e](n)))}));return o.r?c:u()}),(e=>(e?l(p[n]=e):c(d),r(s)))),s&&s.d<0&&(s.d=0)},u.d=(e,t)=>{for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);u(3885)})(); //# sourceMappingURL=amplitude.min.js.map