forked from bombastictranz/OKX-EXCHANGE
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamplitude-8.21.8-min.gz.js.download
1 lines (1 loc) · 98.1 KB
/
amplitude-8.21.8-min.gz.js.download
1
var amplitude=function(){"use strict";function e(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function t(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?e(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function i(e){return i="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},i(e)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function o(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,i){return(t=l(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function l(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function p(){return"object"==typeof window&&void 0!==(null===window||void 0===window?void 0:window.document)}var d="$default_instance",h=2,f=4096,v=1e3,b="$identify",m="$groupidentify",g="api.amplitude.com",y="api.eu.amplitude.com",w="regionconfig.amplitude.com",_="regionconfig.eu.amplitude.com",I=0,k=1,S=2,x=3,O=4,E=5,N=6,C=7,A="amp_cookie_test",j="amp",q="",T="cookies",P="none",R="localStorage",D="sessionStorage",U="revenue_amount",z="$productId",F="$quantity",M="$price",K="$revenueType",$="amp_device_id",B="amp_referrer",L="referrer",V="referring_domain",G="utm_source",W="utm_medium",Z="utm_campaign",J="utm_term",H="utm_content",X="[Amplitude] Attribution Captured",Q="http",Y="beacon",ee=function(e){for(var t="",i=0;i<e.length;i++){var n=e.charCodeAt(i);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t},te=function(e){for(var t="",i=0,n=0,r=0,o=0;i<e.length;)(n=e.charCodeAt(i))<128?(t+=String.fromCharCode(n),i++):n>191&&n<224?(r=e.charCodeAt(i+1),t+=String.fromCharCode((31&n)<<6|63&r),i+=2):(r=e.charCodeAt(i+1),o=e.charCodeAt(i+2),t+=String.fromCharCode((15&n)<<12|(63&r)<<6|63&o),i+=3);return t},ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0,ne={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){try{if(ie.btoa&&ie.atob)return ie.btoa(unescape(encodeURIComponent(e)))}catch(e){}return ne._encode(e)},_encode:function(e){var t,i,n,r,o,s,a,u="",c=0;for(e=ee(e);c<e.length;)r=(t=e.charCodeAt(c++))>>2,o=(3&t)<<4|(i=e.charCodeAt(c++))>>4,s=(15&i)<<2|(n=e.charCodeAt(c++))>>6,a=63&n,isNaN(i)?s=a=64:isNaN(n)&&(a=64),u=u+ne._keyStr.charAt(r)+ne._keyStr.charAt(o)+ne._keyStr.charAt(s)+ne._keyStr.charAt(a);return u},decode:function(e){try{if(ie.btoa&&ie.atob)return decodeURIComponent(escape(ie.atob(e)))}catch(e){}return ne._decode(e)},_decode:function(e){var t,i,n,r,o,s,a="",u=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");u<e.length;)t=ne._keyStr.indexOf(e.charAt(u++))<<2|(r=ne._keyStr.indexOf(e.charAt(u++)))>>4,i=(15&r)<<4|(o=ne._keyStr.indexOf(e.charAt(u++)))>>2,n=(3&o)<<6|(s=ne._keyStr.indexOf(e.charAt(u++))),a+=String.fromCharCode(t),64!==o&&(a+=String.fromCharCode(i)),64!==s&&(a+=String.fromCharCode(n));return a=te(a)}},re=Object.prototype.toString;function oe(e){switch(re.call(e)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}return null===e?"null":void 0===e?"undefined":e!=e?"nan":e&&1===e.nodeType?"element":"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e)?"buffer":i(e=e.valueOf?e.valueOf():Object.prototype.valueOf.apply(e))}var se,ae={DISABLE:0,ERROR:1,WARN:2,INFO:3},ue=ae.WARN,ce={error:function(e){ue>=ae.ERROR&&le(e)},warn:function(e){ue>=ae.WARN&&le(e)},info:function(e){ue>=ae.INFO&&le(e)}},le=function(e){try{console.log("[Amplitude] "+e)}catch(e){}},pe=function(e){return"string"===oe(e)&&e.length>f?e.substring(0,f):e},de=function(e,t,i){return oe(e)===i||(ce.error("Invalid "+t+" input type. Expected "+i+" but received "+oe(e)),!1)},he=function(e){var t=oe(e);if("object"!==t)return ce.error("Error: invalid properties format. Expecting Javascript object, received "+t+", ignoring"),{};if(Object.keys(e).length>v)return ce.error("Error: too many properties (more than 1000), ignoring"),{};var i={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=n,o=oe(r);"string"!==o&&(r=String(r),ce.warn("WARNING: Non-string property key, received type "+o+', coercing to string "'+r+'"'));var s=ve(r,e[n]);null!==s&&(i[r]=s)}return i},fe=["nan","function","arguments","regexp","element"],ve=function e(t,i){var n=oe(i);if(-1!==fe.indexOf(n))ce.warn('WARNING: Property key "'+t+'" with invalid value type '+n+", ignoring"),i=null;else if("undefined"===n)i=null;else if("error"===n)i=String(i),ce.warn('WARNING: Property key "'+t+'" with value type error, coercing to '+i);else if("array"===n){for(var r=[],o=0;o<i.length;o++){var s=i[o],a=oe(s);"array"!==a?"object"===a?r.push(he(s)):r.push(e(t,s)):ce.warn("WARNING: Cannot have "+a+" nested in an array property value, skipping")}i=r}else"object"===n&&(i=he(i));return i},be=function(e,t){var i=oe(t);if("string"===i)return t;if("date"===i||"number"===i||"boolean"===i)return t=String(t),ce.warn("WARNING: Non-string groupName, received type "+i+', coercing to string "'+t+'"'),t;if("array"===i){for(var n=[],r=0;r<t.length;r++){var o=t[r],s=oe(o);"array"!==s&&"object"!==s?"string"===s?n.push(o):"date"!==s&&"number"!==s&&"boolean"!==s||(o=String(o),ce.warn("WARNING: Non-string groupName, received type "+s+', coercing to string "'+o+'"'),n.push(o)):ce.warn("WARNING: Skipping nested "+s+" in array groupName")}return n}ce.warn("WARNING: Non-string groupName, received type "+i+". Please use strings or array of strings for groupName")},me=function(e){Object.prototype.hasOwnProperty.call(ae,e)&&(ue=ae[e])},ge=ce,ye=function(e){return!e||0===e.length},we=function(){return"undefined"!=typeof WorkerGlobalScope},_e=function(e,t){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===i?void 0:decodeURIComponent(i[1].replace(/\+/g," "))},Ie=function e(t){if("array"===oe(t))for(var i=0;i<t.length;i++)t[i]=e(t[i]);else if("object"===oe(t))for(var n in t)n in t&&(t[n]=e(t[n]));else t=pe(t);return t},ke=function(e){var t=oe(e);if("object"!==t)return ce.error("Error: invalid groups format. Expecting Javascript object, received "+t+", ignoring"),{};var i={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=n,o=oe(r);"string"!==o&&(r=String(r),ce.warn("WARNING: Non-string groupType, received type "+o+', coercing to string "'+r+'"'));var s=be(r,e[n]);null!==s&&(i[r]=s)}return i},Se=de,xe=he,Oe=function(e){return!!de(e,"deviceId","string")&&(!(e.indexOf(".")>=0)||(ce.error("Device IDs may not contain '.' characters. Value will be ignored: \"".concat(e,'"')),!1))},Ee=function(e){return!!de(e,"transport","string")&&(e!==Q&&e!==Y?(ce.error("transport value must be one of '".concat(Y,"' or '").concat(Q,"'")),!1):!(e!==Q&&"undefined"!=typeof navigator&&!navigator.sendBeacon)||(ce.error("browser does not support sendBeacon, so transport must be HTTP"),!1))},Ne=function(e){return!!(de(e,"sessionId","number")&&new Date(e).getTime()>0)||(ce.error("sessionId value must in milliseconds since epoch (Unix Timestamp)"),!1)},Ce=function(){return ie.location},Ae=function(e){var t=ie.location?ie.location.hostname:"";if(e){if("undefined"!=typeof document){var i=document.createElement("a");return i.href=e,i.hostname||t}if("function"==typeof URL)return new URL(e).hostname||t}return t},je=function(e){try{for(var t=document.cookie.split(";"),i=null,n=0;n<t.length;n++){for(var r=t[n];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(e)){i=r.substring(e.length,r.length);break}}return i}catch(e){return null}},qe=function(e,t,i){var n=null!==t?i.expirationDays:-1;if(n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3),n=r}var o=e+"="+t;n&&(o+="; expires="+n.toUTCString()),o+="; path=/",i.domain&&(o+="; domain="+i.domain),i.secure&&(o+="; Secure"),i.sameSite&&(o+="; SameSite="+i.sameSite),document.cookie=o},Te=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=t.split(".")[O];return i&&(e=parseInt(i,32)),e||(ge.warn("unable to parse malformed cookie: ".concat(t)),0)},Pe=qe,Re=je,De=function(e){try{var t,i=document.cookie.split(";").map((function(e){return e.trimStart()})),n=[],r=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=u(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}(i);try{for(r.s();!(t=r.n()).done;){for(var o=t.value;" "===o.charAt(0);)o=o.substring(1);0===o.indexOf(e)&&n.push(o.substring(e.length))}}catch(e){r.e(e)}finally{r.f()}return n}catch(e){return[]}},Ue=function(e){return a(e).sort((function(e,t){var i=Te(e);return Te(t)-i}))},ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=A;if("undefined"==typeof document)return!1;var i=!1;try{var n=String(Date.now());qe(t,n,e),ge.info("Testing if cookies available"),i=je(t+"=")===n}catch(e){ge.warn('Error thrown when checking for cookies. Reason: "'.concat(e,'"'))}finally{ge.info("Cleaning up cookies availability test"),qe(t,null,e)}return i},Fe=function(){for(var e="",t=0;t<22;++t)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(Math.floor(64*Math.random()));return e},Me=function(e){var t=Ae(e).split("."),i=[],n="_tldtest_"+Fe();if(we())return"";for(var r=t.length-2;r>=0;--r)i.push(t.slice(r).join("."));for(var o=0;o<i.length;++o){var s=i[o],a={domain:"."+s};if(Pe(n,1,a),Re(n))return Pe(n,null,a),s}return""},Ke={expirationDays:void 0,domain:void 0},$e=function(e){var t="";return Ke.domain&&(t="."===Ke.domain.charAt(0)?Ke.domain.substring(1):Ke.domain),e+t},Be=function(e){var t=$e(e)+"=",i=Re(t);try{if(i)return JSON.parse(ne.decode(i))}catch(e){return null}return null},Le=function(e,t){try{return Pe($e(e),ne.encode(JSON.stringify(t)),Ke),!0}catch(e){return!1}},Ve=function(e){try{return Pe($e(e),null,Ke),!0}catch(e){return!1}},Ge={reset:function(){Ke={expirationDays:void 0,domain:void 0}},options:function(e){if(0===arguments.length)return Ke;e=e||{},Ke.expirationDays=e.expirationDays,Ke.secure=e.secure,Ke.sameSite=e.sameSite;var t=ye(e.domain)?"."+Me(Ce().href):e.domain,i=Math.random();Ke.domain=t,Le("amplitude_test",i);var n=Be("amplitude_test");return n&&n===i||(t=null),Ve("amplitude_test"),Ke.domain=t,Ke},get:Be,set:Le,remove:Ve,setRaw:function(e,t){try{return Pe($e(e),t,Ke),!0}catch(e){return!1}},getRaw:function(e){var t=$e(e)+"=";return Re(t)}},We=function(){function e(){n(this,e),this.map=new Map,this.length=0}return o(e,[{key:"key",value:function(e){var t=Array.from(this.map.keys())[e];return this.map.get(t)}},{key:"getItem",value:function(e){return this.map.get(e)}},{key:"setItem",value:function(e,t){this.map.has(e)||(this.length+=1),this.map.set(e,t)}},{key:"removeItem",value:function(e){this.map.has(e)&&(this.length-=1,this.map.delete(e))}},{key:"clear",value:function(){this.map.clear(),this.length=0}}]),e}();if(function(){var e,t=new Date;try{return ie.localStorage.setItem(t,t),e=ie.localStorage.getItem(t)===String(t),ie.localStorage.removeItem(t),e}catch(e){}return!1}())se=ie.localStorage;else if(void 0!==ie&&ie.globalStorage)try{se=ie.globalStorage[ie.location.hostname]}catch(e){}else if("undefined"!=typeof document){var Ze=document.createElement("div"),Je="localStorage";Ze.style.display="none",document.getElementsByTagName("head")[0].appendChild(Ze),Ze.addBehavior&&(Ze.addBehavior("#default#userdata"),se={length:0,setItem:function(e,t){Ze.load(Je),Ze.getAttribute(e)||this.length++,Ze.setAttribute(e,t),Ze.save(Je)},getItem:function(e){return Ze.load(Je),Ze.getAttribute(e)},removeItem:function(e){Ze.load(Je),Ze.getAttribute(e)&&this.length--,Ze.removeAttribute(e),Ze.save(Je)},clear:function(){Ze.load(Je);for(var e,t=0;e=Ze.XMLDocument.documentElement.attributes[t++];)Ze.removeAttribute(e.name);Ze.save(Je),this.length=0},key:function(e){return Ze.load(Je),Ze.XMLDocument.documentElement.attributes[e]}},Ze.load(Je),se.length=Ze.XMLDocument.documentElement.attributes.length)}else we()&&(se=new We);se||(se={length:0,setItem:function(e,t){},getItem:function(e){},removeItem:function(e){},clear:function(){},key:function(e){}});var He,Xe=se,Qe=function(){this.storage=null};Qe.prototype.getStorage=function(e){if(null!==this.storage)return this.storage;if(!e&&ze())this.storage=Ge;else{var t="amp_cookiestore_";this.storage={_options:{expirationDays:void 0,domain:void 0,secure:!1},reset:function(){this._options={expirationDays:void 0,domain:void 0,secure:!1}},options:function(e){return 0===arguments.length?this._options:(e=e||{},this._options.expirationDays=e.expirationDays||this._options.expirationDays,this._options.domain=e.domain||this._options.domain||ie&&ie.location&&ie.location.hostname,this._options.secure=e.secure||!1)},get:function(e){try{return JSON.parse(Xe.getItem(t+e))}catch(e){}return null},set:function(e,i){try{return Xe.setItem(t+e,JSON.stringify(i)),!0}catch(e){}return!1},remove:function(e){try{Xe.removeItem(t+e)}catch(e){return!1}}}}return this.storage};var Ye=(s(He={},T,!0),s(He,P,!0),s(He,R,!0),s(He,D,!0),He),et=function(){function e(t){var i=t.storageKey,r=t.disableCookies,o=t.domain,s=t.secure,a=t.sameSite,u=t.expirationDays,c=t.storage;n(this,e),this.storageKey=i,this.domain=o,this.secure=s,this.sameSite=a,this.expirationDays=u,this.cookieDomain="";var l=Ce()?Ce().href:void 0,p=r?"":Me(l);if(this.cookieDomain=o||(p?"."+p:null),Ye[c])this.storage=c;else{var d=r||!ze({domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:this.expirationDays});this.storage=d?R:T}}return o(e,[{key:"getCookieStorageKey",value:function(){if(!this.domain)return this.storageKey;var e="."===this.domain.charAt(0)?this.domain.substring(1):this.domain;return"".concat(this.storageKey).concat(e?"_".concat(e):"")}},{key:"save",value:function(e){var t=e.deviceId,i=e.userId,n=e.optOut,r=e.sessionId,o=e.lastEventTime,s=e.eventId,a=e.identifyId,u=e.sequenceNumber;if(this.storage!==P){var c=[t,ne.encode(i||""),n?"1":"",r?r.toString(32):"0",o?o.toString(32):"0",s?s.toString(32):"0",a?a.toString(32):"0",u?u.toString(32):"0"].join(".");switch(this.storage){case D:ie.sessionStorage&&ie.sessionStorage.setItem(this.storageKey,c);break;case R:Xe.setItem(this.storageKey,c);break;case T:this.saveCookie(c)}}}},{key:"saveCookie",value:function(e){Pe(this.getCookieStorageKey(),e,{domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:this.expirationDays})}},{key:"load",value:function(){var e,t=this;if(this.storage===T){var i=this.getCookieStorageKey()+"=",n=De(i);if(0===n.length||1===n.length)e=n[0];else{var r=Ue(n)[0];n.forEach((function(){return Pe(t.getCookieStorageKey(),null,{})})),this.saveCookie(r),e=Re(i)}}if(e||(e=Xe.getItem(this.storageKey)),!e)try{e=ie.sessionStorage&&ie.sessionStorage.getItem(this.storageKey)}catch(e){ge.info('window.sessionStorage unavailable. Reason: "'.concat(e,'"'))}if(!e)return null;var o=e.split("."),s=null;if(o[k])try{s=ne.decode(o[k])}catch(e){s=null}return{deviceId:o[I],userId:s,optOut:"1"===o[S],sessionId:parseInt(o[x],32),lastEventTime:parseInt(o[O],32),eventId:parseInt(o[E],32),identifyId:parseInt(o[N],32),sequenceNumber:parseInt(o[C],32)}}},{key:"clear",value:function(){var e;if(this.storage===T&&(e=Re(this.getCookieStorageKey()+"="),Pe(this.getCookieStorageKey(),null,{domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:0})),e||(e=Xe.getItem(this.storageKey),Xe.clear()),!e)try{e=ie.sessionStorage&&ie.sessionStorage.getItem(this.storageKey),ie.sessionStorage.clear()}catch(e){ge.info('window.sessionStorage unavailable. Reason: "'.concat(e,'"'))}return!!e}}]),e}(),tt="$clearAll",it=function(){this.userPropertiesOperations={},this.properties=[]};it.prototype.add=function(e,t){return"number"===oe(t)||"string"===oe(t)?this._addOperation("$add",e,t):ge.error("Unsupported type for value: "+oe(t)+", expecting number or string"),this},it.prototype.append=function(e,t){return this._addOperation("$append",e,t),this},it.prototype.clearAll=function(){return Object.keys(this.userPropertiesOperations).length>0?(Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,tt)||ge.error("Need to send $clearAll on its own Identify object without any other operations, skipping $clearAll"),this):(this.userPropertiesOperations[tt]="-",this)},it.prototype.prepend=function(e,t){return this._addOperation("$prepend",e,t),this},it.prototype.set=function(e,t){return this._addOperation("$set",e,t),this},it.prototype.setOnce=function(e,t){return this._addOperation("$setOnce",e,t),this},it.prototype.unset=function(e){return this._addOperation("$unset",e,"-"),this},it.prototype.preInsert=function(e,t){return this._addOperation("$preInsert",e,t),this},it.prototype.postInsert=function(e,t){return this._addOperation("$postInsert",e,t),this},it.prototype.remove=function(e,t){return this._addOperation("$remove",e,t),this},it.prototype._addOperation=function(e,t,i){Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,tt)?ge.error("This identify already contains a $clearAll operation, skipping operation "+e):-1===this.properties.indexOf(t)?(Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,e)||(this.userPropertiesOperations[e]={}),this.userPropertiesOperations[e][t]=i,this.properties.push(t)):ge.error('User property "'+t+'" already used in this identify, skipping operation '+e)};var nt,rt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ot={};nt={get exports(){return ot},set exports(e){ot=e}},function(e){function t(e,t){var i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function i(e,i,n,r,o,s){return t((a=t(t(i,e),t(r,s)))<<(u=o)|a>>>32-u,n);var a,u}function n(e,t,n,r,o,s,a){return i(t&n|~t&r,e,t,o,s,a)}function r(e,t,n,r,o,s,a){return i(t&r|n&~r,e,t,o,s,a)}function o(e,t,n,r,o,s,a){return i(t^n^r,e,t,o,s,a)}function s(e,t,n,r,o,s,a){return i(n^(t|~r),e,t,o,s,a)}function a(e,i){var a,u,c,l,p;e[i>>5]|=128<<i%32,e[14+(i+64>>>9<<4)]=i;var d=1732584193,h=-271733879,f=-1732584194,v=271733878;for(a=0;a<e.length;a+=16)u=d,c=h,l=f,p=v,d=n(d,h,f,v,e[a],7,-680876936),v=n(v,d,h,f,e[a+1],12,-389564586),f=n(f,v,d,h,e[a+2],17,606105819),h=n(h,f,v,d,e[a+3],22,-1044525330),d=n(d,h,f,v,e[a+4],7,-176418897),v=n(v,d,h,f,e[a+5],12,1200080426),f=n(f,v,d,h,e[a+6],17,-1473231341),h=n(h,f,v,d,e[a+7],22,-45705983),d=n(d,h,f,v,e[a+8],7,1770035416),v=n(v,d,h,f,e[a+9],12,-1958414417),f=n(f,v,d,h,e[a+10],17,-42063),h=n(h,f,v,d,e[a+11],22,-1990404162),d=n(d,h,f,v,e[a+12],7,1804603682),v=n(v,d,h,f,e[a+13],12,-40341101),f=n(f,v,d,h,e[a+14],17,-1502002290),d=r(d,h=n(h,f,v,d,e[a+15],22,1236535329),f,v,e[a+1],5,-165796510),v=r(v,d,h,f,e[a+6],9,-1069501632),f=r(f,v,d,h,e[a+11],14,643717713),h=r(h,f,v,d,e[a],20,-373897302),d=r(d,h,f,v,e[a+5],5,-701558691),v=r(v,d,h,f,e[a+10],9,38016083),f=r(f,v,d,h,e[a+15],14,-660478335),h=r(h,f,v,d,e[a+4],20,-405537848),d=r(d,h,f,v,e[a+9],5,568446438),v=r(v,d,h,f,e[a+14],9,-1019803690),f=r(f,v,d,h,e[a+3],14,-187363961),h=r(h,f,v,d,e[a+8],20,1163531501),d=r(d,h,f,v,e[a+13],5,-1444681467),v=r(v,d,h,f,e[a+2],9,-51403784),f=r(f,v,d,h,e[a+7],14,1735328473),d=o(d,h=r(h,f,v,d,e[a+12],20,-1926607734),f,v,e[a+5],4,-378558),v=o(v,d,h,f,e[a+8],11,-2022574463),f=o(f,v,d,h,e[a+11],16,1839030562),h=o(h,f,v,d,e[a+14],23,-35309556),d=o(d,h,f,v,e[a+1],4,-1530992060),v=o(v,d,h,f,e[a+4],11,1272893353),f=o(f,v,d,h,e[a+7],16,-155497632),h=o(h,f,v,d,e[a+10],23,-1094730640),d=o(d,h,f,v,e[a+13],4,681279174),v=o(v,d,h,f,e[a],11,-358537222),f=o(f,v,d,h,e[a+3],16,-722521979),h=o(h,f,v,d,e[a+6],23,76029189),d=o(d,h,f,v,e[a+9],4,-640364487),v=o(v,d,h,f,e[a+12],11,-421815835),f=o(f,v,d,h,e[a+15],16,530742520),d=s(d,h=o(h,f,v,d,e[a+2],23,-995338651),f,v,e[a],6,-198630844),v=s(v,d,h,f,e[a+7],10,1126891415),f=s(f,v,d,h,e[a+14],15,-1416354905),h=s(h,f,v,d,e[a+5],21,-57434055),d=s(d,h,f,v,e[a+12],6,1700485571),v=s(v,d,h,f,e[a+3],10,-1894986606),f=s(f,v,d,h,e[a+10],15,-1051523),h=s(h,f,v,d,e[a+1],21,-2054922799),d=s(d,h,f,v,e[a+8],6,1873313359),v=s(v,d,h,f,e[a+15],10,-30611744),f=s(f,v,d,h,e[a+6],15,-1560198380),h=s(h,f,v,d,e[a+13],21,1309151649),d=s(d,h,f,v,e[a+4],6,-145523070),v=s(v,d,h,f,e[a+11],10,-1120210379),f=s(f,v,d,h,e[a+2],15,718787259),h=s(h,f,v,d,e[a+9],21,-343485551),d=t(d,u),h=t(h,c),f=t(f,l),v=t(v,p);return[d,h,f,v]}function u(e){var t,i="",n=32*e.length;for(t=0;t<n;t+=8)i+=String.fromCharCode(e[t>>5]>>>t%32&255);return i}function c(e){var t,i=[];for(i[(e.length>>2)-1]=void 0,t=0;t<i.length;t+=1)i[t]=0;var n=8*e.length;for(t=0;t<n;t+=8)i[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return i}function l(e){var t,i,n="0123456789abcdef",r="";for(i=0;i<e.length;i+=1)t=e.charCodeAt(i),r+=n.charAt(t>>>4&15)+n.charAt(15&t);return r}function p(e){return unescape(encodeURIComponent(e))}function d(e){return function(e){return u(a(c(e),8*e.length))}(p(e))}function h(e,t){return function(e,t){var i,n,r=c(e),o=[],s=[];for(o[15]=s[15]=void 0,r.length>16&&(r=a(r,8*e.length)),i=0;i<16;i+=1)o[i]=909522486^r[i],s[i]=1549556828^r[i];return n=a(o.concat(c(t)),512+8*t.length),u(a(s.concat(n),640))}(p(e),p(t))}function f(e,t,i){return t?i?h(t,e):l(h(t,e)):i?d(e):l(d(e))}nt.exports?nt.exports=f:e.md5=f}(rt);var st=ot;const at="%[a-f0-9]{2}",ut=new RegExp("("+at+")|([^%]+?)","gi"),ct=new RegExp("("+at+")+","gi");function lt(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;const i=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],lt(i),lt(n))}function pt(e){try{return decodeURIComponent(e)}catch{let t=e.match(ut)||[];for(let i=1;i<t.length;i++)t=(e=lt(t,i).join("")).match(ut)||[];return e}}function dt(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return function(e){const t={"%FE%FF":"��","%FF%FE":"��"};let i=ct.exec(e);for(;i;){try{t[i[0]]=decodeURIComponent(i[0])}catch{const e=pt(i[0]);e!==i[0]&&(t[i[0]]=e)}i=ct.exec(e)}t["%C2"]="�";const n=Object.keys(t);for(const i of n)e=e.replace(new RegExp(i,"g"),t[i]);return e}(e)}}function ht(e,t){if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===e||""===t)return[];const i=e.indexOf(t);return-1===i?[]:[e.slice(0,i),e.slice(i+t.length)]}function ft(e,t){const i={};if(Array.isArray(t))for(const n of t){const t=Object.getOwnPropertyDescriptor(e,n);t?.enumerable&&Object.defineProperty(i,n,t)}else for(const n of Reflect.ownKeys(e)){const r=Object.getOwnPropertyDescriptor(e,n);if(r.enumerable){t(n,e[n],e)&&Object.defineProperty(i,n,r)}}return i}const vt=e=>null==e,bt=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),mt=Symbol("encodeFragmentIdentifier");function gt(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function yt(e,t){return t.encode?t.strict?bt(e):encodeURIComponent(e):e}function wt(e,t){return t.decode?dt(e):e}function _t(e){return Array.isArray(e)?e.sort():"object"==typeof e?_t(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function It(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function kt(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function St(e){const t=(e=It(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function xt(e,t){gt((t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t}).arrayFormatSeparator);const i=function(e){let t;switch(e.arrayFormat){case"index":return(e,i,n)=>{t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=i):n[e]=i};case"bracket":return(e,i,n)=>{t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),t?void 0!==n[e]?n[e]=[...n[e],i]:n[e]=[i]:n[e]=i};case"colon-list-separator":return(e,i,n)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==n[e]?n[e]=[...n[e],i]:n[e]=[i]:n[e]=i};case"comma":case"separator":return(t,i,n)=>{const r="string"==typeof i&&i.includes(e.arrayFormatSeparator),o="string"==typeof i&&!r&&wt(i,e).includes(e.arrayFormatSeparator);i=o?wt(i,e):i;const s=r||o?i.split(e.arrayFormatSeparator).map((t=>wt(t,e))):null===i?i:wt(i,e);n[t]=s};case"bracket-separator":return(t,i,n)=>{const r=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!r)return void(n[t]=i?wt(i,e):i);const o=null===i?[]:i.split(e.arrayFormatSeparator).map((t=>wt(t,e)));void 0!==n[t]?n[t]=[...n[t],...o]:n[t]=o};default:return(e,t,i)=>{void 0!==i[e]?i[e]=[...[i[e]].flat(),t]:i[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const r of e.split("&")){if(""===r)continue;const e=t.decode?r.replace(/\+/g," "):r;let[o,s]=ht(e,"=");void 0===o&&(o=e),s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:wt(s,t),i(wt(o,t),s,n)}for(const[e,i]of Object.entries(n))if("object"==typeof i&&null!==i)for(const[e,n]of Object.entries(i))i[e]=kt(n,t);else n[e]=kt(i,t);return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{const i=n[t];return Boolean(i)&&"object"==typeof i&&!Array.isArray(i)?e[t]=_t(i):e[t]=i,e}),Object.create(null))}function Ot(e,t){if(!e)return"";gt((t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t}).arrayFormatSeparator);const i=i=>t.skipNull&&vt(e[i])||t.skipEmptyString&&""===e[i],n=function(e){switch(e.arrayFormat){case"index":return t=>(i,n)=>{const r=i.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?i:null===n?[...i,[yt(t,e),"[",r,"]"].join("")]:[...i,[yt(t,e),"[",yt(r,e),"]=",yt(n,e)].join("")]};case"bracket":return t=>(i,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?i:null===n?[...i,[yt(t,e),"[]"].join("")]:[...i,[yt(t,e),"[]=",yt(n,e)].join("")];case"colon-list-separator":return t=>(i,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?i:null===n?[...i,[yt(t,e),":list="].join("")]:[...i,[yt(t,e),":list=",yt(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return i=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:(r=null===r?"":r,0===n.length?[[yt(i,e),t,yt(r,e)].join("")]:[[n,yt(r,e)].join(e.arrayFormatSeparator)])}default:return t=>(i,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?i:null===n?[...i,yt(t,e)]:[...i,[yt(t,e),"=",yt(n,e)].join("")]}}(t),r={};for(const[t,n]of Object.entries(e))i(t)||(r[t]=n);const o=Object.keys(r);return!1!==t.sort&&o.sort(t.sort),o.map((i=>{const r=e[i];return void 0===r?"":null===r?yt(i,t):Array.isArray(r)?0===r.length&&"bracket-separator"===t.arrayFormat?yt(i,t)+"[]":r.reduce(n(i),[]).join("&"):yt(i,t)+"="+yt(r,t)})).filter((e=>e.length>0)).join("&")}function Et(e,t){t={decode:!0,...t};let[i,n]=ht(e,"#");return void 0===i&&(i=e),{url:i?.split("?")?.[0]??"",query:xt(St(e),t),...t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:wt(n,t)}:{}}}function Nt(e,t){t={encode:!0,strict:!0,[mt]:!0,...t};const i=It(e.url).split("?")[0]||"";let n=Ot({...xt(St(e.url),{sort:!1}),...e.query},t);n&&(n=`?${n}`);let r=function(e){let t="";const i=e.indexOf("#");return-1!==i&&(t=e.slice(i)),t}(e.url);if(e.fragmentIdentifier){const n=new URL(i);n.hash=e.fragmentIdentifier,r=t[mt]?n.hash:`#${e.fragmentIdentifier}`}return`${i}${n}${r}`}function Ct(e,t,i){i={parseFragmentIdentifier:!0,[mt]:!1,...i};const{url:n,query:r,fragmentIdentifier:o}=Et(e,i);return Nt({url:n,query:ft(r,t),fragmentIdentifier:o},i)}var At=Object.freeze({__proto__:null,extract:St,parse:xt,stringify:Ot,parseUrl:Et,stringifyUrl:Nt,pick:Ct,exclude:function(e,t,i){return Ct(e,Array.isArray(t)?e=>!t.includes(e):(e,i)=>!t(e,i),i)}}),jt=function(e,t,i){this.url=e,this.data=t||{},this.headers=i},qt="Cross-Origin-Resource-Policy";jt.prototype.send=function(e){if(!!ie.XDomainRequest){var t=new ie.XDomainRequest;t.open("POST",this.url,!0),t.onload=function(){e(200,t.responseText)},t.onerror=function(){"Request Entity Too Large"===t.responseText?e(413,t.responseText):e(500,t.responseText)},t.ontimeout=function(){},t.onprogress=function(){},t.send(At.stringify(this.data))}else if("undefined"!=typeof XMLHttpRequest){var i=new XMLHttpRequest;i.open("POST",this.url,!0),i.onreadystatechange=function(){4===i.readyState&&e(i.status,i.responseText)},function(e,t){for(var i in t)(i!==qt||t[i])&&e.setRequestHeader(i,t[i])}(i,this.headers),i.send(At.stringify(this.data))}else{var n=void 0;fetch(this.url,{method:"POST",headers:this.headers,body:At.stringify(this.data)}).then((function(e){return n=e.status,e.text()})).then((function(t){e(n,t)}))}};var Tt=function(){this._price=null,this._productId=null,this._quantity=1,this._revenueType=null,this._properties=null};Tt.prototype.setProductId=function(e){return"string"!==oe(e)?ge.error("Unsupported type for productId: "+oe(e)+", expecting string"):ye(e)?ge.error("Invalid empty productId"):this._productId=e,this},Tt.prototype.setQuantity=function(e){return"number"!==oe(e)?ge.error("Unsupported type for quantity: "+oe(e)+", expecting number"):this._quantity=parseInt(e),this},Tt.prototype.setPrice=function(e){return"number"!==oe(e)?ge.error("Unsupported type for price: "+oe(e)+", expecting number"):this._price=e,this},Tt.prototype.setRevenueType=function(e){return"string"!==oe(e)?ge.error("Unsupported type for revenueType: "+oe(e)+", expecting string"):this._revenueType=e,this},Tt.prototype.setEventProperties=function(e){return"object"!==oe(e)?ge.error("Unsupported type for eventProperties: "+oe(e)+", expecting object"):this._properties=xe(e),this},Tt.prototype._isValidRevenue=function(){return"number"===oe(this._price)||(ge.error("Invalid revenue, need to set price field"),!1)},Tt.prototype._toJSONObject=function(){var e="object"===oe(this._properties)?this._properties:{};return null!==this._productId&&(e[z]=this._productId),null!==this._quantity&&(e[F]=this._quantity),null!==this._price&&(e[M]=this._price),null!==this._revenueType&&(e[K]=this._revenueType),e};var Pt={};!function(e,t){!function(i,n){var r="function",o="undefined",s="object",a="string",u="model",c="name",l="type",p="vendor",d="version",h="architecture",f="console",v="mobile",b="tablet",m="smarttv",g="wearable",y="embedded",w="Amazon",_="Apple",I="ASUS",k="BlackBerry",S="Browser",x="Chrome",O="Firefox",E="Google",N="Huawei",C="LG",A="Microsoft",j="Motorola",q="Opera",T="Samsung",P="Sharp",R="Sony",D="Xiaomi",U="Zebra",z="Facebook",F=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},M=function(e,t){return typeof e===a&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},$=function(e,t){if(typeof e===a)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,350)},B=function(e,t){for(var i,o,a,u,c,l,p=0;p<t.length&&!c;){var d=t[p],h=t[p+1];for(i=o=0;i<d.length&&!c;)if(c=d[i++].exec(e))for(a=0;a<h.length;a++)l=c[++o],typeof(u=h[a])===s&&u.length>0?2===u.length?typeof u[1]==r?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?typeof u[1]!==r||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):n:this[u[0]]=l?u[1].call(this,l,u[2]):n:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):n):this[u]=l||n;p+=2}},L=function(e,t){for(var i in t)if(typeof t[i]===s&&t[i].length>0){for(var r=0;r<t[i].length;r++)if(M(t[i][r],e))return"?"===i?n:i}else if(M(t[i],e))return"?"===i?n:i;return e},V={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},G={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,d],[/opios[\/ ]+([\w\.]+)/i],[d,[c,q+" Mini"]],[/\bopr\/([\w\.]+)/i],[d,[c,q]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,d],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[d,[c,"UC"+S]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[d,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[d,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+S],d],[/\bfocus\/([\w\.]+)/i],[d,[c,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[d,[c,q+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[d,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[c,q+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[d,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[d,[c,O]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+S]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+S],d],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,d],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,z],d],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,d],[/\bgsa\/([\w\.]+) .*safari\//i],[d,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[d,[c,x+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,x+" WebView"],d],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[d,[c,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,d],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[d,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[d,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[d,L,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,d],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],d],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[d,[c,O+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,d],[/(cobalt)\/([\w\.]+)/i],[c,[d,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[h,"amd64"]],[/(ia32(?=;))/i],[[h,K]],[/((?:i[346]|x)86)[;\)]/i],[[h,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/windows (ce|mobile); ppc;/i],[[h,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[h,/ower/,"",K]],[/(sun4\w)[;\)]/i],[[h,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[h,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[p,T],[l,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[p,T],[l,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[p,_],[l,v]],[/(ipad\d+,\d+)/i],[u,[p,_],[l,b]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[p,_],[l,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[p,_],[l,b]],[/(macintosh);/i],[u,[p,_]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[p,N],[l,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[p,N],[l,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[p,D],[l,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[p,D],[l,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[p,"OPPO"],[l,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[p,"Vivo"],[l,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[p,"Realme"],[l,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[p,j],[l,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[p,j],[l,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[p,C],[l,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[p,C],[l,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[p,"Lenovo"],[l,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[p,"Nokia"],[l,v]],[/(pixel c)\b/i],[u,[p,E],[l,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[p,E],[l,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[p,R],[l,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[p,R],[l,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[p,"OnePlus"],[l,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[p,w],[l,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[p,w],[l,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,p,[l,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[p,k],[l,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[p,I],[l,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[p,I],[l,v]],[/(nexus 9)/i],[u,[p,"HTC"],[l,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[u,/_/g," "],[l,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[p,"Acer"],[l,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[p,"Meizu"],[l,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[p,P],[l,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,u,[l,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,u,[l,b]],[/(surface duo)/i],[u,[p,A],[l,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[p,"Fairphone"],[l,v]],[/(u304aa)/i],[u,[p,"AT&T"],[l,v]],[/\bsie-(\w*)/i],[u,[p,"Siemens"],[l,v]],[/\b(rct\w+) b/i],[u,[p,"RCA"],[l,b]],[/\b(venue[\d ]{2,7}) b/i],[u,[p,"Dell"],[l,b]],[/\b(q(?:mv|ta)\w+) b/i],[u,[p,"Verizon"],[l,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[p,"Barnes & Noble"],[l,b]],[/\b(tm\d{3}\w+) b/i],[u,[p,"NuVision"],[l,b]],[/\b(k88) b/i],[u,[p,"ZTE"],[l,b]],[/\b(nx\d{3}j) b/i],[u,[p,"ZTE"],[l,v]],[/\b(gen\d{3}) b.+49h/i],[u,[p,"Swiss"],[l,v]],[/\b(zur\d{3}) b/i],[u,[p,"Swiss"],[l,b]],[/\b((zeki)?tb.*\b) b/i],[u,[p,"Zeki"],[l,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],u,[l,b]],[/\b(ns-?\w{0,9}) b/i],[u,[p,"Insignia"],[l,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[p,"NextBook"],[l,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],u,[l,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],u,[l,v]],[/\b(ph-1) /i],[u,[p,"Essential"],[l,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[p,"Envizen"],[l,b]],[/\b(trio[-\w\. ]+) b/i],[u,[p,"MachSpeed"],[l,b]],[/\btu_(1491) b/i],[u,[p,"Rotor"],[l,b]],[/(shield[\w ]+) b/i],[u,[p,"Nvidia"],[l,b]],[/(sprint) (\w+)/i],[p,u,[l,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[p,A],[l,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[p,U],[l,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[p,U],[l,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,u,[l,f]],[/droid.+; (shield) bui/i],[u,[p,"Nvidia"],[l,f]],[/(playstation [345portablevi]+)/i],[u,[p,R],[l,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[p,A],[l,f]],[/smart-tv.+(samsung)/i],[p,[l,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[p,T],[l,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,C],[l,m]],[/(apple) ?tv/i],[p,[u,_+" TV"],[l,m]],[/crkey/i],[[u,x+"cast"],[p,E],[l,m]],[/droid.+aft(\w)( bui|\))/i],[u,[p,w],[l,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[p,P],[l,m]],[/(bravia[\w ]+)( bui|\))/i],[u,[p,R],[l,m]],[/(mitv-\w{5}) bui/i],[u,[p,D],[l,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[p,$],[u,$],[l,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,m]],[/((pebble))app/i],[p,u,[l,g]],[/droid.+; (glass) \d/i],[u,[p,E],[l,g]],[/droid.+; (wt63?0{2,3})\)/i],[u,[p,U],[l,g]],[/(quest( 2)?)/i],[u,[p,z],[l,g]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[l,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[l,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[l,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[l,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[d,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,d],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[d,L,V]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[d,L,V]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[d,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[d,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,d],[/\(bb(10);/i],[d,[c,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[d,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[d,[c,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[c,x+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],d],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,d],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],d],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,d]]},W=function(e,t){if(typeof e===s&&(t=e,e=n),!(this instanceof W))return new W(e,t).getResult();var r=e||(typeof i!==o&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),f=t?function(e,t){var i={};for(var n in e)t[n]&&t[n].length%2==0?i[n]=t[n].concat(e[n]):i[n]=e[n];return i}(G,t):G;return this.getBrowser=function(){var e={};return e[c]=n,e[d]=n,B.call(e,r,f.browser),e.major=function(e){return typeof e===a?e.replace(/[^\d\.]/g,"").split(".")[0]:n}(e.version),e},this.getCPU=function(){var e={};return e[h]=n,B.call(e,r,f.cpu),e},this.getDevice=function(){var e={};return e[p]=n,e[u]=n,e[l]=n,B.call(e,r,f.device),e},this.getEngine=function(){var e={};return e[c]=n,e[d]=n,B.call(e,r,f.engine),e},this.getOS=function(){var e={};return e[c]=n,e[d]=n,B.call(e,r,f.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===a&&e.length>350?$(e,350):e,this},this.setUA(r),this};W.VERSION="0.7.33",W.BROWSER=F([c,d,"major"]),W.CPU=F([h]),W.DEVICE=F([u,p,l,f,v,m,b,g,y]),W.ENGINE=W.OS=F([c,d]),e.exports&&(t=e.exports=W),t.UAParser=W;var Z=typeof i!==o&&(i.jQuery||i.Zepto);if(Z&&!Z.ua){var J=new W;Z.ua=J.getResult(),Z.ua.get=function(){return J.getUA()},Z.ua.set=function(e){J.setUA(e);var t=J.getResult();for(var i in t)Z.ua[i]=t[i]}}}("object"==typeof window?window:rt)}({get exports(){return Pt},set exports(e){Pt=e}},Pt);var Rt=Pt,Dt=function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)},Ut="US",zt="EU",Ft=function(e){var t=g;switch(e){case zt:t=y;break;case Ut:t=g}return t},Mt="8.21.8",Kt={apiEndpoint:g,batchEvents:!1,cookieExpiration:365,cookieName:"amplitude_id",sameSiteCookie:"Lax",cookieForceUpgrade:!1,deferInitialization:!1,disableCookies:!1,deviceIdFromUrlParam:!1,domain:"",eventUploadPeriodMillis:3e4,eventUploadThreshold:30,forceHttps:!0,includeFbclid:!1,includeGclid:!1,includeReferrer:!1,includeUtm:!1,ingestionMetadata:{sourceName:"",sourceVersion:""},language:function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||""}(),library:{name:"amplitude-js",version:Mt},logLevel:"WARN",logAttributionCapturedEvent:!1,optOut:!1,onError:function(){},onExitPage:function(){},onNewSessionStart:function(){},plan:{branch:"",source:"",version:"",versionId:""},platform:"Web",savedMaxCount:1e3,saveEvents:!0,saveParamsReferrerOncePerSession:!0,secureCookie:!1,sessionTimeout:18e5,storage:q,trackingOptions:{city:!0,country:!0,carrier:!0,device_manufacturer:!0,device_model:!0,dma:!0,ip_address:!0,language:!0,os_name:!0,os_version:!0,platform:!0,region:!0,version_name:!0},transport:Q,unsetParamsReferrerOnNewSession:!1,unsentKey:"amplitude_unsent",unsentIdentifyKey:"amplitude_unsent_identify",uploadBatchSize:100,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","Cross-Origin-Resource-Policy":"cross-origin"},serverZone:Ut,useDynamicConfig:!1,serverZoneBasedApi:!1,sessionId:null,partnerId:""},$t=new(function(){function e(){return n(this,e),e.instance||(this.ingestionEndpoint=g,e.instance=this),e.instance}return o(e,[{key:"refresh",value:function(e,t,i){var n="https";t||"https:"===ie.location.protocol||(n="http");var r=n+"://"+function(e){var t=w;switch(e){case zt:t=_;break;case Ut:t=w}return t}(e),o=this;if(!!ie.XDomainRequest){var s=new ie.XDomainRequest;s.open("GET",r,!0),s.onload=function(){var e=JSON.parse(s.responseText);o.ingestionEndpoint=e.ingestionEndpoint,i&&i()},s.onerror=function(){},s.ontimeout=function(){},s.onprogress=function(){},s.send()}else{var a=new XMLHttpRequest;a.open("GET",r,!0),a.onreadystatechange=function(){if(4===a.readyState&&200===a.status){var e=JSON.parse(a.responseText);o.ingestionEndpoint=e.ingestionEndpoint,i&&i()}},a.send()}}}]),e}()),Bt={};!function(e,t){!function(i,n){var r="function",o="undefined",s="object",a="string",u="model",c="name",l="type",p="vendor",d="version",h="architecture",f="console",v="mobile",b="tablet",m="smarttv",g="wearable",y="embedded",w="Amazon",_="Apple",I="ASUS",k="BlackBerry",S="Browser",x="Chrome",O="Firefox",E="Google",N="Huawei",C="LG",A="Microsoft",j="Motorola",q="Opera",T="Samsung",P="Sony",R="Xiaomi",D="Zebra",U="Facebook",z=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},F=function(e,t){return typeof e===a&&-1!==M(t).indexOf(M(e))},M=function(e){return e.toLowerCase()},K=function(e,t){if(typeof e===a)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===o?e:e.substring(0,275)},$=function(e,t){for(var i,o,a,u,c,l,p=0;p<t.length&&!c;){var d=t[p],h=t[p+1];for(i=o=0;i<d.length&&!c;)if(c=d[i++].exec(e))for(a=0;a<h.length;a++)l=c[++o],typeof(u=h[a])===s&&u.length>0?2===u.length?typeof u[1]==r?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?typeof u[1]!==r||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):n:this[u[0]]=l?u[1].call(this,l,u[2]):n:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):n):this[u]=l||n;p+=2}},B=function(e,t){for(var i in t)if(typeof t[i]===s&&t[i].length>0){for(var r=0;r<t[i].length;r++)if(F(t[i][r],e))return"?"===i?n:i}else if(F(t[i],e))return"?"===i?n:i;return e},L={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},V={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,d],[/opios[\/ ]+([\w\.]+)/i],[d,[c,q+" Mini"]],[/\bopr\/([\w\.]+)/i],[d,[c,q]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,d],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[d,[c,"UC"+S]],[/\bqbcore\/([\w\.]+)/i],[d,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[d,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+S],d],[/\bfocus\/([\w\.]+)/i],[d,[c,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[d,[c,q+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[d,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[c,q+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[d,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[d,[c,O]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+S]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+S],d],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,d],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,U],d],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,d],[/\bgsa\/([\w\.]+) .*safari\//i],[d,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[d,[c,x+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,x+" WebView"],d],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[d,[c,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,d],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[d,[c,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[d,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[d,B,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,d],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],d],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[d,[c,O+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[h,"amd64"]],[/(ia32(?=;))/i],[[h,M]],[/((?:i[346]|x)86)[;\)]/i],[[h,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/windows (ce|mobile); ppc;/i],[[h,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[h,/ower/,"",M]],[/(sun4\w)[;\)]/i],[[h,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[h,M]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[p,T],[l,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[p,T],[l,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[p,_],[l,v]],[/(ipad\d+,\d+)/i],[u,[p,_],[l,b]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[p,_],[l,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[p,_],[l,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[p,N],[l,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[p,N],[l,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[p,R],[l,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[p,R],[l,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[p,"OPPO"],[l,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[p,"Vivo"],[l,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[p,"Realme"],[l,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[p,j],[l,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[p,j],[l,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[p,C],[l,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[p,C],[l,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[p,"Lenovo"],[l,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[p,"Nokia"],[l,v]],[/(pixel c)\b/i],[u,[p,E],[l,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[p,E],[l,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[p,P],[l,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[p,P],[l,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[p,"OnePlus"],[l,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[p,w],[l,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[p,w],[l,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,p,[l,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[p,k],[l,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[p,I],[l,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[p,I],[l,v]],[/(nexus 9)/i],[u,[p,"HTC"],[l,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[u,/_/g," "],[l,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[p,"Acer"],[l,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[p,"Meizu"],[l,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[p,"Sharp"],[l,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,u,[l,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,u,[l,b]],[/(surface duo)/i],[u,[p,A],[l,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[p,"Fairphone"],[l,v]],[/(u304aa)/i],[u,[p,"AT&T"],[l,v]],[/\bsie-(\w*)/i],[u,[p,"Siemens"],[l,v]],[/\b(rct\w+) b/i],[u,[p,"RCA"],[l,b]],[/\b(venue[\d ]{2,7}) b/i],[u,[p,"Dell"],[l,b]],[/\b(q(?:mv|ta)\w+) b/i],[u,[p,"Verizon"],[l,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[p,"Barnes & Noble"],[l,b]],[/\b(tm\d{3}\w+) b/i],[u,[p,"NuVision"],[l,b]],[/\b(k88) b/i],[u,[p,"ZTE"],[l,b]],[/\b(nx\d{3}j) b/i],[u,[p,"ZTE"],[l,v]],[/\b(gen\d{3}) b.+49h/i],[u,[p,"Swiss"],[l,v]],[/\b(zur\d{3}) b/i],[u,[p,"Swiss"],[l,b]],[/\b((zeki)?tb.*\b) b/i],[u,[p,"Zeki"],[l,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],u,[l,b]],[/\b(ns-?\w{0,9}) b/i],[u,[p,"Insignia"],[l,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[p,"NextBook"],[l,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],u,[l,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],u,[l,v]],[/\b(ph-1) /i],[u,[p,"Essential"],[l,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[p,"Envizen"],[l,b]],[/\b(trio[-\w\. ]+) b/i],[u,[p,"MachSpeed"],[l,b]],[/\btu_(1491) b/i],[u,[p,"Rotor"],[l,b]],[/(shield[\w ]+) b/i],[u,[p,"Nvidia"],[l,b]],[/(sprint) (\w+)/i],[p,u,[l,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[p,A],[l,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[p,D],[l,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[p,D],[l,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,u,[l,f]],[/droid.+; (shield) bui/i],[u,[p,"Nvidia"],[l,f]],[/(playstation [345portablevi]+)/i],[u,[p,P],[l,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[p,A],[l,f]],[/smart-tv.+(samsung)/i],[p,[l,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[p,T],[l,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,C],[l,m]],[/(apple) ?tv/i],[p,[u,_+" TV"],[l,m]],[/crkey/i],[[u,x+"cast"],[p,E],[l,m]],[/droid.+aft(\w)( bui|\))/i],[u,[p,w],[l,m]],[/\(dtv[\);].+(aquos)/i],[u,[p,"Sharp"],[l,m]],[/(bravia[\w- ]+) bui/i],[u,[p,P],[l,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[p,K],[u,K],[l,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,m]],[/((pebble))app/i],[p,u,[l,g]],[/droid.+; (glass) \d/i],[u,[p,E],[l,g]],[/droid.+; (wt63?0{2,3})\)/i],[u,[p,D],[l,g]],[/(quest( 2)?)/i],[u,[p,U],[l,g]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[l,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[l,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[l,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,b]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[l,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[d,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,d],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[d,B,L]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[d,B,L]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[d,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[d,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,d],[/\(bb(10);/i],[d,[c,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[d,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[d,[c,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[c,x+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],d],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,d],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],d],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,d]]},G=function(e,t){if(typeof e===s&&(t=e,e=n),!(this instanceof G))return new G(e,t).getResult();var r=e||(typeof i!==o&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),f=t?function(e,t){var i={};for(var n in e)t[n]&&t[n].length%2==0?i[n]=t[n].concat(e[n]):i[n]=e[n];return i}(V,t):V;return this.getBrowser=function(){var e={};return e[c]=n,e[d]=n,$.call(e,r,f.browser),e.major=function(e){return typeof e===a?e.replace(/[^\d\.]/g,"").split(".")[0]:n}(e.version),e},this.getCPU=function(){var e={};return e[h]=n,$.call(e,r,f.cpu),e},this.getDevice=function(){var e={};return e[p]=n,e[u]=n,e[l]=n,$.call(e,r,f.device),e},this.getEngine=function(){var e={};return e[c]=n,e[d]=n,$.call(e,r,f.engine),e},this.getOS=function(){var e={};return e[c]=n,e[d]=n,$.call(e,r,f.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===a&&e.length>275?K(e,275):e,this},this.setUA(r),this};G.VERSION="0.7.31",G.BROWSER=z([c,d,"major"]),G.CPU=z([h]),G.DEVICE=z([u,p,l,f,v,m,b,g,y]),G.ENGINE=G.OS=z([c,d]),e.exports&&(t=e.exports=G),t.UAParser=G;var W=typeof i!==o&&(i.jQuery||i.Zepto);if(W&&!W.ua){var Z=new G;W.ua=Z.getResult(),W.ua.get=function(){return Z.getUA()},W.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var i in t)W.ua[i]=t[i]}}}("object"==typeof window?window:rt)}({get exports(){return Bt},set exports(e){Bt=e}},Bt);var Lt=function(){function e(){this.ua=new Bt.UAParser("undefined"!=typeof navigator?navigator.userAgent:null).getResult()}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:Wt(),platform:"Web",os:Vt(this.ua),deviceModel:Gt(this.ua)}},e}(),Vt=function(e){var t,i;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(i=e.browser)||void 0===i?void 0:i.major].filter((function(e){return null!=e})).join(" ")},Gt=function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name},Wt=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},Zt=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}(),Jt=function(){return Jt=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Jt.apply(this,arguments)},Ht=function(e,t){var i=typeof e;if(i!==typeof t)return!1;for(var n=0,r=["string","number","boolean","undefined"];n<r.length;n++){if(r[n]===i)return e===t}if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;var o=Array.isArray(e),s=Array.isArray(t);if(o!==s)return!1;if(!o||!s){var a=Object.keys(e).sort(),u=Object.keys(t).sort();if(!Ht(a,u))return!1;var c=!0;return Object.keys(e).forEach((function(i){Ht(e[i],t[i])||(c=!1)})),c}for(var l=0;l<e.length;l++)if(!Ht(e[l],t[l]))return!1;return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),i=t.length,n=new Array(i);i--;)n[i]=[t[i],e[t[i]]];return n});var Xt=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=Jt({},this.identity.userProperties),i=Jt(Jt({},this.identity),{userProperties:t});return{setUserId:function(e){return i.userId=e,this},setDeviceId:function(e){return i.deviceId=e,this},setUserProperties:function(e){return i.userProperties=e,this},updateUserProperties:function(e){for(var t=i.userProperties||{},n=0,r=Object.entries(e);n<r.length;n++){var o=r[n],s=o[0],a=o[1];switch(s){case"$set":for(var u=0,c=Object.entries(a);u<c.length;u++){var l=c[u],p=l[0],d=l[1];t[p]=d}break;case"$unset":for(var h=0,f=Object.keys(a);h<f.length;h++){delete t[p=f[h]]}break;case"$clearAll":t={}}}return i.userProperties=t,this},commit:function(){return e.setIdentity(i),this}}},e.prototype.getIdentity=function(){return Jt({},this.identity)},e.prototype.setIdentity=function(e){var t=Jt({},this.identity);this.identity=Jt({},e),Ht(t,this.identity)||this.listeners.forEach((function(t){t(e)}))},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),Qt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,Yt=function(){function e(){this.identityStore=new Xt,this.eventBridge=new Zt,this.applicationContextProvider=new Lt}return e.getInstance=function(t){return Qt.analyticsConnectorInstances||(Qt.analyticsConnectorInstances={}),Qt.analyticsConnectorInstances[t]||(Qt.analyticsConnectorInstances[t]=new e),Qt.analyticsConnectorInstances[t]},e}(),ei=function(e){p()||we()||ge.warn("amplitude-js will not work in a non-browser environment. If you are planning to add Amplitude to a node environment, please use @amplitude/node"),this._instanceName=ye(e)?d:e.toLowerCase(),this._unsentEvents=[],this._unsentIdentifys=[],this.options=t(t({},Kt),{},{headers:t({},Kt.headers),ingestionMetadata:t({},Kt.ingestionMetadata),library:t({},Kt.library),plan:t({},Kt.plan),trackingOptions:t({},Kt.trackingOptions)}),this._q=[],this._sending=!1,this._updateScheduled=!1,this._onInitCallbacks=[],this._onNewSessionStartCallbacks=[],this._eventId=0,this._identifyId=0,this._lastEventTime=null,this._newSession=!1,this._sequenceNumber=0,this._sessionId=null,this._isInitialized=!1,this._connector=null,this._userAgent="undefined"!=typeof navigator&&navigator&&navigator.userAgent||null,this._ua=new Rt(this._userAgent).getResult()};ei.prototype.Identify=it,ei.prototype.Revenue=Tt,ei.prototype.init=function(e,t,i,n){var r=this;if("string"!==oe(e)||ye(e))ge.error("Invalid apiKey. Please re-initialize with a valid apiKey");else try{this._connector=Yt.getInstance(this._instanceName),ii(this.options,i),(p()||we())&&void 0!==ie.Prototype&&Array.prototype.toJSON&&(!function(){var e;if(p()){var t=window,i=Array;if(void 0!==t.Prototype&&void 0!==(null===(e=i.prototype)||void 0===e?void 0:e.toJSON))return delete i.prototype.toJSON,!0}}(),ge.warn("Prototype.js injected Array.prototype.toJSON. Deleting Array.prototype.toJSON to prevent double-stringify")),this.options.cookieName!==Kt.cookieName&&ge.warn("The cookieName option is deprecated. We will be ignoring it for newer cookies"),this.options.serverZoneBasedApi&&(this.options.apiEndpoint=Ft(this.options.serverZone)),this._refreshDynamicConfig(),this.options.apiKey=e,this._storageSuffix="_"+e+(this._instanceName===d?"":"_"+this._instanceName),this._storageSuffixV5=e.slice(0,6),this._oldCookiename=this.options.cookieName+this._storageSuffix,this._unsentKey=this.options.unsentKey+this._storageSuffix,this._unsentIdentifyKey=this.options.unsentIdentifyKey+this._storageSuffix,this._cookieName=j+"_"+this._storageSuffixV5,this.cookieStorage=(new Qe).getStorage(this.options.disableCookies),this.cookieStorage.options({expirationDays:this.options.cookieExpiration,domain:this.options.domain,secure:this.options.secureCookie,sameSite:this.options.sameSiteCookie}),this._metadataStorage=new et({storageKey:this._cookieName,disableCookies:this.options.disableCookies,expirationDays:this.options.cookieExpiration,domain:this.options.domain,secure:this.options.secureCookie,sameSite:this.options.sameSiteCookie,storage:this.options.storage});var o=!!this.cookieStorage.get(this._oldCookiename),s=!!this._metadataStorage.load();this._useOldCookie=!s&&o&&!this.options.cookieForceUpgrade;var a=s||o;if(this.options.deferInitialization&&!a)return void this._deferInitialization(e,t,i,n);this.options.domain=this.cookieStorage.options().domain,"string"===oe(this.options.logLevel)&&me(this.options.logLevel);var u=di(this);this._apiPropertiesTrackingOptions=Object.keys(u).length>0?{tracking_options:u}:{},this.options.cookieForceUpgrade&&o&&(s||ri(this),this.cookieStorage.remove(this._oldCookiename)),ni(this),this._pendingReadStorage=!0;this.options.saveEvents&&(this._unsentEvents=this._loadSavedUnsentEvents(this.options.unsentKey).map((function(e){return{event:e}})).concat(this._unsentEvents),this._unsentIdentifys=this._loadSavedUnsentEvents(this.options.unsentIdentifyKey).map((function(e){return{event:e}})).concat(this._unsentIdentifys)),i&&i.onNewSessionStart&&this.onNewSessionStart(this.options.onNewSessionStart),function(e){i&&i.deviceId&&!Oe(i.deviceId)&&(ge.error('Invalid device ID rejected. Randomly generated UUID will be used instead of "'.concat(i.deviceId,'"')),delete i.deviceId),r.options.deviceId=r._getInitialDeviceId(i&&i.deviceId,e),r.options.userId="string"===oe(t)&&!ye(t)&&t||"number"===oe(t)&&t.toString()||r.options.userId||null;var n=(new Date).getTime(),o=!r._sessionId||!r._lastEventTime||n-r._lastEventTime>r.options.sessionTimeout||r.options.sessionId;o&&(r.options.unsetParamsReferrerOnNewSession&&r._unsetUTMParams(),r._newSession=!0,r._sessionId=r.options.sessionId||n,r.options.sessionId=void 0,r.options.saveParamsReferrerOncePerSession&&r._trackParamsAndReferrer()),r.options.saveParamsReferrerOncePerSession||r._trackParamsAndReferrer(),r.options.saveEvents&&(ti(r._unsentEvents),ti(r._unsentIdentifys)),r._lastEventTime=n,si(r),r._pendingReadStorage=!1,r._sendEventsIfReady();for(var s=0;s<r._onInitCallbacks.length;s++)r._onInitCallbacks[s](r);r._onInitCallbacks=[],r._isInitialized=!0,o&&r._runNewSessionStartCallbacks()}(),this.runQueuedFunctions(),"function"===oe(n)&&n(this);var c=this.options.onExitPage;if("function"===oe(c)&&ie.addEventListener&&!this.pageHandlersAdded){this.pageHandlersAdded=!0;ie.addEventListener("pagehide",(function(){var e;e=r.options.transport,r.setTransport(Y),c(),r.setTransport(e)}),!1)}this._connector.eventBridge.setEventReceiver((function(e){r._logEvent(e.eventType,e.eventProperties,e.userProperties)}));var l=this._connector.identityStore.editIdentity();this.options.deviceId&&l.setDeviceId(this.options.deviceId),this.options.userId&&l.setUserId(this.options.userId),l.commit()}catch(e){ge.error(e),i&&"function"===oe(i.onError)&&i.onError(e)}},ei.prototype._runNewSessionStartCallbacks=function(){for(var e=0;e<this._onNewSessionStartCallbacks.length;e++)this._onNewSessionStartCallbacks[e](this)},ei.prototype.deleteLowerLevelDomainCookies=function(){var e=Ae(),t=this.options.domain&&"."===this.options.domain[0]?this.options.domain.slice(1):this.options.domain;if(t&&we()&&e!==t&&new RegExp(t+"$").test(e)){for(var i=e.split("."),n=t.split("."),r=i.length;r>n.length;--r){var o=i.slice(i.length-r).join(".");Pe(this._cookieName,null,{domain:"."+o})}Pe(this._cookieName,null,{})}},ei.prototype._getInitialDeviceId=function(e,t){if(e)return e;if(this.options.deviceIdFromUrlParam){var i=this._getDeviceIdFromUrlParam(this._getUrlParams());if(i)return i}return this.options.deviceId?this.options.deviceId:t||Fe()};var ti=function(e){for(var t=0;t<e.length;t++){var i=e[t].event.user_properties,n=e[t].event.event_properties,r=e[t].event.groups;e[t].event.user_properties=xe(i),e[t].event.event_properties=xe(n),e[t].event.groups=ke(r)}};ei.prototype._trackParamsAndReferrer=function(){var e,i,n,r;if(this.options.includeUtm&&(e=this._initUtmData()),this.options.includeReferrer&&(i=this._saveReferrer(this._getReferrer())),this.options.includeGclid&&(n=this._saveGclid(this._getUrlParams())),this.options.includeFbclid&&(r=this._saveFbclid(this._getUrlParams())),this.options.logAttributionCapturedEvent){var o=t(t(t(t({},e),i),n),r);Object.keys(o).length>0&&this.logEvent(X,o)}};var ii=function e(i,n){if("object"===oe(n)){var r=new Set(["headers"]),o=function(t){if(Object.prototype.hasOwnProperty.call(i,t)){var r=n[t],o=oe(i[t]);("transport"!==t||Ee(r))&&("sessionId"!==t||null===r?Se(r,t+" option",o)&&("boolean"===o?i[t]=!!r:"string"===o&&!ye(r)||"number"===o&&r>0||"function"===o?i[t]=r:"object"===o&&e(i[t],r)):i[t]=Ne(r)?r:null)}};for(var s in n)r.has(s)?i[s]=t(t({},i[s]),n[s]):Object.prototype.hasOwnProperty.call(n,s)&&o(s)}};ei.prototype.runQueuedFunctions=function(){var e=this._q;this._q=[];for(var t=0;t<e.length;t++){var i=this[e[t][0]];"function"===oe(i)&&i.apply(this,e[t].slice(1))}},ei.prototype._apiKeySet=function(e){return!ye(this.options.apiKey)||(ge.error("Invalid apiKey. Please set a valid apiKey with init() before calling "+e),!1)},ei.prototype._loadSavedUnsentEvents=function(e){var t=this._getFromStorage(Xe,e),i=this._parseSavedUnsentEventsString(t,e);return this._setInStorage(Xe,e,JSON.stringify(i)),i},ei.prototype._parseSavedUnsentEventsString=function(e,t){if(ye(e))return[];if("string"===oe(e))try{var i=JSON.parse(e);if("array"===oe(i))return i}catch(e){}return ge.error("Unable to load "+t+" events. Restart with a new empty queue."),[]},ei.prototype.isNewSession=function(){return this._newSession},ei.prototype.onInit=function(e){this._isInitialized?e(this):this._onInitCallbacks.push(e)},ei.prototype.onNewSessionStart=function(e){this._onNewSessionStartCallbacks.push(e)},ei.prototype.getSessionId=function(){return this._sessionId},ei.prototype.nextEventId=function(){return this._eventId++,this._eventId},ei.prototype.nextIdentifyId=function(){return this._identifyId++,this._identifyId},ei.prototype.nextSequenceNumber=function(){return this._sequenceNumber++,this._sequenceNumber},ei.prototype._unsentCount=function(){return this._unsentEvents.length+this._unsentIdentifys.length},ei.prototype._sendEventsIfReady=function(){return 0!==this._unsentCount()&&(this.options.batchEvents?this._unsentCount()>=this.options.eventUploadThreshold||this.options.transport===Y?(this.sendEvents(),!0):(this._updateScheduled||(this._updateScheduled=!0,setTimeout(function(){this._updateScheduled=!1,this.sendEvents()}.bind(this),this.options.eventUploadPeriodMillis)),!1):(this.sendEvents(),!0))},ei.prototype.clearStorage=function(){return this._metadataStorage.clear()},ei.prototype._getFromStorage=function(e,t){return e.getItem(t+this._storageSuffix)},ei.prototype._setInStorage=function(e,t,i){e.setItem(t+this._storageSuffix,i)};var ni=function(e){if(e._useOldCookie){var t=e.cookieStorage.get(e._oldCookiename);"object"!==oe(t)||oi(e,t)}else{var i=e._metadataStorage.load();"object"===oe(i)&&oi(e,i)}},ri=function(e){var t=e.cookieStorage.get(e._oldCookiename);"object"===oe(t)&&(oi(e,t),si(e))},oi=function(e,t){t.deviceId&&(e.options.deviceId=t.deviceId),t.userId&&(e.options.userId=t.userId),null!==t.optOut&&void 0!==t.optOut&&!1!==t.optOut&&(e.options.optOut=t.optOut),t.sessionId&&(e._sessionId=parseInt(t.sessionId,10)),t.lastEventTime&&(e._lastEventTime=parseInt(t.lastEventTime,10)),t.eventId&&(e._eventId=parseInt(t.eventId,10)),t.identifyId&&(e._identifyId=parseInt(t.identifyId,10)),t.sequenceNumber&&(e._sequenceNumber=parseInt(t.sequenceNumber,10))},si=function(e){var t={deviceId:e.options.deviceId,userId:e.options.userId,optOut:e.options.optOut,sessionId:e._sessionId,lastEventTime:e._lastEventTime,eventId:e._eventId,identifyId:e._identifyId,sequenceNumber:e._sequenceNumber};e._useOldCookie?e.cookieStorage.set(e.options.cookieName+e._storageSuffix,t):e._metadataStorage.save(t)};ei.prototype._initUtmData=function(e,t){e=e||this._getUrlParams(),t=t||this.cookieStorage.get("__utmz");var i,n,r,o,s,a,u,c,l,p,d,h=(n=e,r=(i=t)?"?"+i.split(".").slice(-1)[0].replace(/\|/g,"&"):"",o=function(e,t,i,n){return _e(e,t)||_e(i,n)},s=o(G,n,"utmcsr",r),a=o(W,n,"utmcmd",r),u=o(Z,n,"utmccn",r),c=o(J,n,"utmctr",r),l=o(H,n,"utmcct",r),p={},(d=function(e,t){ye(t)||(p[e]=t)})(G,s),d(W,a),d(Z,u),d(J,c),d(H,l),p);return ai(this,h),h},ei.prototype._unsetUTMParams=function(){var e=new it;e.unset(L),e.unset(V),e.unset(G),e.unset(W),e.unset(Z),e.unset(J),e.unset(H),this.identify(e)};var ai=function(e,t){if("object"===oe(t)&&0!==Object.keys(t).length){var i=new it;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i.setOnce("initial_"+n,t[n]),i.set(n,t[n]));e.identify(i)}};ei.prototype._getReferrer=function(){var e=this._getReferrerFromUrlParam(this._getUrlParams());return e||("undefined"!=typeof document?document.referrer:"")},ei.prototype._getUrlParams=function(){return ie.location.search},ei.prototype._saveGclid=function(e){var t=_e("gclid",e);if(!ye(t)){var i={gclid:t};return ai(this,i),i}},ei.prototype._saveFbclid=function(e){var t=_e("fbclid",e);if(!ye(t)){var i={fbclid:t};return ai(this,i),i}},ei.prototype._getDeviceIdFromUrlParam=function(e){return _e($,e)},ei.prototype._getReferrerFromUrlParam=function(e){return _e(B,e)},ei.prototype._getReferringDomain=function(e){if(ye(e))return null;var t=e.split("/");return t.length>=3?t[2]:null},ei.prototype._saveReferrer=function(e){if(!ye(e)){var t={referrer:e,referring_domain:this._getReferringDomain(e)};return ai(this,t),t}},ei.prototype.saveEvents=function(){try{var e=JSON.stringify(this._unsentEvents.map((function(e){return e.event})));this._setInStorage(Xe,this.options.unsentKey,e)}catch(e){}try{var t=JSON.stringify(this._unsentIdentifys.map((function(e){return e.event})));this._setInStorage(Xe,this.options.unsentIdentifyKey,t)}catch(e){}},ei.prototype.setDomain=function(e){if(this._shouldDeferCall())return this._q.push(["setDomain"].concat(Array.prototype.slice.call(arguments,0)));if(Se(e,"domain","string"))try{this.cookieStorage.options({expirationDays:this.options.cookieExpiration,secure:this.options.secureCookie,domain:e,sameSite:this.options.sameSiteCookie}),this.options.domain=this.cookieStorage.options().domain,ni(this),si(this)}catch(e){ge.error(e)}},ei.prototype.setUserId=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Se(t,"startNewSession","boolean")){if(this._shouldDeferCall())return this._q.push(["setUserId"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.userId=null!=e&&""+e||null,t&&(this.options.unsetParamsReferrerOnNewSession&&this._unsetUTMParams(),this._newSession=!0,this._sessionId=(new Date).getTime(),this._runNewSessionStartCallbacks(),this.options.saveParamsReferrerOncePerSession&&this._trackParamsAndReferrer()),si(this),this._connector&&this._connector.identityStore.editIdentity().setUserId(this.options.userId).commit()}catch(e){ge.error(e)}}},ei.prototype.setGroup=function(e,t){if(this._shouldDeferCall())return this._q.push(["setGroup"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("setGroup()")&&Se(e,"groupType","string")&&!ye(e)){var i={};i[e]=t;var n=(new it).set(e,t);this._logEvent(b,null,null,n.userPropertiesOperations,i,null,null,null)}},ei.prototype.setOptOut=function(e){if(this._shouldDeferCall())return this._q.push(["setOptOut"].concat(Array.prototype.slice.call(arguments,0)));if(Se(e,"enable","boolean"))try{this.options.optOut=e,si(this)}catch(e){ge.error(e)}},ei.prototype.setSessionId=function(e){if(Se(e,"sessionId","number"))try{this._sessionId=e,si(this)}catch(e){ge.error(e)}},ei.prototype.resetSessionId=function(){this.setSessionId((new Date).getTime())},ei.prototype.regenerateDeviceId=function(){if(this._shouldDeferCall())return this._q.push(["regenerateDeviceId"].concat(Array.prototype.slice.call(arguments,0)));this.setDeviceId(Fe())},ei.prototype.setDeviceId=function(e){if(this._shouldDeferCall())return this._q.push(["setDeviceId"].concat(Array.prototype.slice.call(arguments,0)));if(Oe(e))try{ye(e)||(this.options.deviceId=""+e,si(this),this._connector&&this._connector.identityStore.editIdentity().setDeviceId(this.options.deviceId).commit())}catch(e){ge.error(e)}},ei.prototype.setTransport=function(e){if(this._shouldDeferCall())return this._q.push(["setTransport"].concat(Array.prototype.slice.call(arguments,0)));Ee(e)&&(this.options.transport=e)},ei.prototype.setUserProperties=function(e){if(this._shouldDeferCall())return this._q.push(["setUserProperties"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("setUserProperties()")&&Se(e,"userProperties","object")){var t=Ie(xe(e));if(0!==Object.keys(t).length){var i=new it;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&i.set(n,t[n]);this.identify(i)}}},ei.prototype.clearUserProperties=function(){if(this._shouldDeferCall())return this._q.push(["clearUserProperties"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("clearUserProperties()")){var e=new it;e.clearAll(),this.identify(e)}};var ui=function(e,t){for(var i=0;i<t._q.length;i++){var n=e[t._q[i][0]];"function"===oe(n)&&n.apply(e,t._q[i].slice(1))}return e};ei.prototype.identify=function(e,t,i,n){if(this._shouldDeferCall())return this._q.push(["identify"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("identify()"))if("object"===oe(e)&&Object.prototype.hasOwnProperty.call(e,"_q")&&(e=ui(new it,e)),e instanceof it){if(Object.keys(e.userPropertiesOperations).length>0)return this._logEvent(b,null,null,e.userPropertiesOperations,null,null,null,t,i,n);fi(t,i,0,"No request sent",{reason:"No user property operations"})}else ge.error("Invalid identify input type. Expected Identify object but saw "+oe(e)),fi(t,i,0,"No request sent",{reason:"Invalid identify input type"});else fi(t,i,0,"No request sent",{reason:"API key is not set"})},ei.prototype.groupIdentify=function(e,t,i,n,r,o){if(this._shouldDeferCall())return this._q.push(["groupIdentify"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("groupIdentify()"))if(Se(e,"group_type","string")&&!ye(e))if(null!=t)if("object"===oe(i)&&Object.prototype.hasOwnProperty.call(i,"_q")&&(i=ui(new it,i)),i instanceof it){if(Object.keys(i.userPropertiesOperations).length>0)return this._logEvent(m,null,null,null,s({},e,t),i.userPropertiesOperations,null,n,r,o);fi(n,r,0,"No request sent",{reason:"No group property operations"})}else ge.error("Invalid identify input type. Expected Identify object but saw "+oe(i)),fi(n,r,0,"No request sent",{reason:"Invalid identify input type"});else fi(n,r,0,"No request sent",{reason:"Invalid group name"});else fi(n,r,0,"No request sent",{reason:"Invalid group type"});else fi(n,r,0,"No request sent",{reason:"API key is not set"})},ei.prototype.setVersionName=function(e){if(this._shouldDeferCall())return this._q.push(["setVersionName"].concat(Array.prototype.slice.call(arguments,0)));Se(e,"versionName","string")&&(this.options.versionName=e)},ei.prototype._logEvent=function(e,i,n,r,o,s,a,u,c,l){if(ni(this),e)if(this.options.optOut)fi(u,c,0,"No request sent",{reason:"optOut is set to true"});else try{var p;p=e===b||e===m?this.nextIdentifyId():this.nextEventId();var d=this.nextSequenceNumber(),h="number"===oe(a)?a:(new Date).getTime();l?this._sessionId=-1:(!this._sessionId||!this._lastEventTime||h-this._lastEventTime>this.options.sessionTimeout)&&(this._sessionId=h,this._runNewSessionStartCallbacks()),this._lastEventTime=h,si(this);var f=this._ua.browser.name,v=this._ua.browser.major,g=this._ua.device.model||this._ua.os.name,y=this._ua.device.vendor;r=r||{};var w=t({},this._apiPropertiesTrackingOptions);n=t(t({},n||{}),w),i=i||{},o=o||{},s=s||{};var _={device_id:this.options.deviceId,user_id:this.options.userId,timestamp:h,event_id:p,session_id:this._sessionId||-1,event_type:e,version_name:this.options.versionName||null,platform:pi(this,"platform")?this.options.platform:null,os_name:pi(this,"os_name")&&f||null,os_version:pi(this,"os_version")&&v||null,device_model:pi(this,"device_model")&&g||null,device_manufacturer:pi(this,"device_manufacturer")&&y||null,language:pi(this,"language")?this.options.language:null,api_properties:n,event_properties:Ie(xe(i)),user_properties:Ie(xe(r)),uuid:Dt(),library:this.options.library,sequence_number:d,groups:Ie(ke(o)),group_properties:Ie(xe(s)),user_agent:this._userAgent,partner_id:this.options.partnerId||null};return ci(this)&&(_.plan={branch:this.options.plan.branch||void 0,source:this.options.plan.source||void 0,version:this.options.plan.version||void 0,versionId:this.options.plan.versionId||void 0}),li(this)&&(_.ingestion_metadata={source_name:this.options.ingestionMetadata.sourceName||void 0,source_version:this.options.ingestionMetadata.sourceVersion||void 0}),e===b||e===m?(this._unsentIdentifys.push({event:_,callback:u,errorCallback:c}),this._limitEventsQueued(this._unsentIdentifys)):(this._unsentEvents.push({event:_,callback:u,errorCallback:c}),this._limitEventsQueued(this._unsentEvents)),this.options.saveEvents&&this.saveEvents(),this._sendEventsIfReady(),e===b&&this._connector&&this._connector.identityStore.editIdentity().updateUserProperties(Ie(xe(r))).commit(),p}catch(e){ge.error(e)}else fi(u,c,0,"No request sent",{reason:"Missing eventType"})};var ci=function(e){return e.options.plan&&(e.options.plan.source||e.options.plan.branch||e.options.plan.version||e.options.plan.versionId)},li=function(e){return e.options.ingestionMetadata&&(e.options.ingestionMetadata.sourceName||e.options.ingestionMetadata.sourceVersion)},pi=function(e,t){return!!e.options.trackingOptions[t]},di=function(e){for(var t=["city","country","dma","ip_address","region"],i={},n=0;n<t.length;n++){var r=t[n];pi(e,r)||(i[r]=!1)}return i};ei.prototype._limitEventsQueued=function(e){e.length>this.options.savedMaxCount&&e.splice(0,e.length-this.options.savedMaxCount).forEach((function(e){fi(e.callback,e.errorCallback,0,"No request sent",{reason:"Event dropped because options.savedMaxCount exceeded. User may be offline or have a content blocker"})}))},ei.prototype.logEvent=function(e,t,i,n){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return this._shouldDeferCall()?this._q.push(["logEvent"].concat(Array.prototype.slice.call(arguments,0))):this.logEventWithTimestamp(e,t,null,i,n,r)},ei.prototype.logEventWithTimestamp=function(e,t,i,n,r){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return this._shouldDeferCall()?this._q.push(["logEventWithTimestamp"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logEvent()")?Se(e,"eventType","string")?ye(e)?(fi(n,r,0,"No request sent",{reason:"Missing eventType"}),-1):(Se(o,"outOfSession","boolean")||fi(n,r,0,"No request sent",{reason:"Invalid outOfSession value"}),this._logEvent(e,t,null,null,null,null,i,n,r,o)):(fi(n,r,0,"No request sent",{reason:"Invalid type for eventType"}),-1):(fi(n,r,0,"No request sent",{reason:"API key not set"}),-1)},ei.prototype.logEventWithGroups=function(e,t,i,n,r){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return this._shouldDeferCall()?this._q.push(["logEventWithGroups"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logEventWithGroups()")?Se(e,"eventType","string")?(Se(o,"outOfSession","boolean")||fi(event.callback,event.errorCallback,0,"No request sent",{reason:"Invalid outOfSession value"}),this._logEvent(e,t,null,null,i,null,null,n,r,o)):(fi(event.callback,event.errorCallback,0,"No request sent",{reason:"Invalid type for eventType"}),-1):(fi(event.callback,event.errorCallback,0,"No request sent",{reason:"API key not set"}),-1)};var hi=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},fi=function(e,t,i,n,r){"function"===oe(e)&&e(i,n,r),"function"===oe(t)&&t(i,n,r)};ei.prototype.logRevenueV2=function(e){if(this._shouldDeferCall())return this._q.push(["logRevenueV2"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("logRevenueV2()"))if("object"===oe(e)&&Object.prototype.hasOwnProperty.call(e,"_q")&&(e=ui(new Tt,e)),e instanceof Tt){if(e&&e._isValidRevenue())return this.logEvent(U,e._toJSONObject())}else ge.error("Invalid revenue input type. Expected Revenue object but saw "+oe(e))},ei.prototype.logRevenue=function(e,t,i){return this._shouldDeferCall()?this._q.push(["logRevenue"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logRevenue()")&&hi(e)&&(void 0===t||hi(t))?this._logEvent(U,{},{productId:i,special:"revenue_amount",quantity:t||1,price:e},null,null,null,null,null):-1},ei.prototype._logErrorsOnEvents=function(e,t,i,n){for(var r=["_unsentEvents","_unsentIdentifys"],o=0;o<r.length;o++)for(var s=r[o],a="_unsentEvents"===s?e:t,u=0;u<this[s].length;u++){var c=this[s][u];c.event.event_id<=a&&c.errorCallback&&c.errorCallback(i,n)}},ei.prototype.removeEvents=function(e,t,i,n){vi(this,"_unsentEvents",e,i,n),vi(this,"_unsentIdentifys",t,i,n)};var vi=function(e,t,i,n,r){if(!(i<0)){for(var o=[],s=0;s<e[t].length;s++){var a=e[t][s];a.event.event_id>i?o.push(a):a.callback&&a.callback(n,r)}e[t]=o}};ei.prototype.sendEvents=function(){if(this._apiKeySet("sendEvents()")){if(this.options.optOut)this.removeEvents(1/0,1/0,0,"No request sent",{reason:"Opt out is set to true"});else if(0!==this._unsentCount()){if(this.options.transport!==Y){if(this._sending)return;this._sending=!0}var e=(this.options.forceHttps||"https:"===ie.location.protocol?"https":"http")+"://"+this.options.apiEndpoint,t=Math.min(this._unsentCount(),this.options.uploadBatchSize),i=this._mergeEventsAndIdentifys(t),n=i.maxEventId,r=i.maxIdentifyId,o=JSON.stringify(i.eventsToSend.map((function(e){return e.event}))),s=(new Date).getTime(),a={client:this.options.apiKey,e:o,v:h,upload_time:s,checksum:st(h+this.options.apiKey+o+s)};if(this.options.transport!==Y||"undefined"==typeof navigator){var u=this;try{new jt(e,a,this.options.headers).send((function(e,i){u._sending=!1;try{200===e?(u.removeEvents(n,r,e,i),u.options.saveEvents&&u.saveEvents(),u._sendEventsIfReady()):(u._logErrorsOnEvents(n,r,e,i),413===e&&(1===u.options.uploadBatchSize&&u.removeEvents(n,r,e,i),u.options.uploadBatchSize=Math.ceil(t/2),u.sendEvents()))}catch(e){}}))}catch(e){var c="Request failed to send";ge.error(c),u._logErrorsOnEvents(n,r,0,c),u.removeEvents(n,r,0,c,{reason:e.message})}}else{navigator.sendBeacon(e,new URLSearchParams(a))?(this.removeEvents(n,r,200,"success"),this.options.saveEvents&&this.saveEvents()):this._logErrorsOnEvents(n,r,0,"")}}}else this.removeEvents(1/0,1/0,0,"No request sent",{reason:"API key not set"})},ei.prototype._mergeEventsAndIdentifys=function(e){for(var t=[],i=0,n=-1,r=0,o=-1;t.length<e;){var s=void 0,a=r>=this._unsentIdentifys.length,u=i>=this._unsentEvents.length;if(u&&a){ge.error("Merging Events and Identifys, less events and identifys than expected");break}a?n=(s=this._unsentEvents[i++]).event.event_id:u?o=(s=this._unsentIdentifys[r++]).event.event_id:!("sequence_number"in this._unsentEvents[i].event)||this._unsentEvents[i].event.sequence_number<this._unsentIdentifys[r].event.sequence_number?n=(s=this._unsentEvents[i++]).event.event_id:o=(s=this._unsentIdentifys[r++]).event.event_id,t.push(s)}return{eventsToSend:t,maxEventId:n,maxIdentifyId:o}},ei.prototype.setGlobalUserProperties=function(e){this.setUserProperties(e)},ei.prototype.__VERSION__=function(){return this.options.library.version},ei.prototype.setLibrary=function(e,t){null!=e&&(this.options.library.name=e),null!=t&&(this.options.library.version=t)},ei.prototype._shouldDeferCall=function(){return this._pendingReadStorage||this._initializationDeferred},ei.prototype._deferInitialization=function(){this._initializationDeferred=!0,this._q.push(["init"].concat(Array.prototype.slice.call(arguments,0)))},ei.prototype.enableTracking=function(){this._initializationDeferred=!1,si(this),this.runQueuedFunctions()},ei.prototype._refreshDynamicConfig=function(){this.options.useDynamicConfig&&$t.refresh(this.options.serverZone,this.options.forceHttps,function(){this.options.apiEndpoint=$t.ingestionEndpoint}.bind(this))},ei.prototype.getDeviceId=function(){return this.options.deviceId},ei.prototype.getUserId=function(){return this.options.userId},ei.prototype.setMinTimeBetweenSessionsMillis=function(e){if(Se(e,"timeInMillis","number")){if(this._shouldDeferCall())return this._q.push(["setMinTimeBetweenSessionsMillis"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.sessionTimeout=e}catch(e){ge.error(e)}}},ei.prototype.setEventUploadThreshold=function(e){if(Se(e,"eventUploadThreshold","number")){if(this._shouldDeferCall())return this._q.push(["setEventUploadThreshold"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.eventUploadThreshold=e}catch(e){ge.error(e)}}},ei.prototype.setUseDynamicConfig=function(e){if(Se(e,"useDynamicConfig","boolean")){if(this._shouldDeferCall())return this._q.push(["setUseDynamicConfig"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.useDynamicConfig=e,this._refreshDynamicConfig()}catch(e){ge.error(e)}}},ei.prototype.setServerZone=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if((e===zt||e===Ut)&&Se(t,"serverZoneBasedApi","boolean")){if(this._shouldDeferCall())return this._q.push(["setServerZone"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.serverZone=e,this.options.serverZoneBasedApi=t,t&&(this.options.apiEndpoint=Ft(this.options.serverZone))}catch(e){ge.error(e)}}},ei.prototype.setServerUrl=function(e){if(Se(e,"serverUrl","string")){if(this._shouldDeferCall())return this._q.push(["setServerUrl"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.apiEndpoint=e}catch(e){ge.error(e)}}};var bi=function(){this.options=t({},Kt),this._q=[],this._instances={}};bi.prototype.Identify=it,bi.prototype.Revenue=Tt,bi.prototype.getInstance=function(e){e=ye(e)?d:e.toLowerCase();var t=this._instances[e];return void 0===t&&(t=new ei(e),this._instances[e]=t),t},bi.prototype.runQueuedFunctions=function(){for(var e=0;e<this._q.length;e++){var t=this[this._q[e][0]];"function"===oe(t)&&t.apply(this,this._q[e].slice(1))}for(var i in this._q=[],this._instances)Object.prototype.hasOwnProperty.call(this._instances,i)&&this._instances[i].runQueuedFunctions()},bi.prototype.init=function(e,t,i,n){this.getInstance().init(e,t,i,function(e){this.options=e.options,"function"===oe(n)&&n(e)}.bind(this))},bi.prototype.isNewSession=function(){return this.getInstance().isNewSession()},bi.prototype.getSessionId=function(){return this.getInstance().getSessionId()},bi.prototype.nextEventId=function(){return this.getInstance().nextEventId()},bi.prototype.nextIdentifyId=function(){return this.getInstance().nextIdentifyId()},bi.prototype.nextSequenceNumber=function(){return this.getInstance().nextSequenceNumber()},bi.prototype.saveEvents=function(){this.getInstance().saveEvents()},bi.prototype.setDomain=function(e){this.getInstance().setDomain(e)},bi.prototype.setUserId=function(e){this.getInstance().setUserId(e)},bi.prototype.setGroup=function(e,t){this.getInstance().setGroup(e,t)},bi.prototype.setOptOut=function(e){this.getInstance().setOptOut(e)},bi.prototype.regenerateDeviceId=function(){this.getInstance().regenerateDeviceId()},bi.prototype.setDeviceId=function(e){this.getInstance().setDeviceId(e)},bi.prototype.setUserProperties=function(e){this.getInstance().setUserProperties(e)},bi.prototype.clearUserProperties=function(){this.getInstance().clearUserProperties()},bi.prototype.identify=function(e,t){this.getInstance().identify(e,t)},bi.prototype.setVersionName=function(e){this.getInstance().setVersionName(e)},bi.prototype.logEvent=function(e,t,i){return this.getInstance().logEvent(e,t,i)},bi.prototype.logEventWithGroups=function(e,t,i,n){return this.getInstance().logEventWithGroups(e,t,i,n)},bi.prototype.logRevenueV2=function(e){return this.getInstance().logRevenueV2(e)},bi.prototype.logRevenue=function(e,t,i){return this.getInstance().logRevenue(e,t,i)},bi.prototype.removeEvents=function(e,t){this.getInstance().removeEvents(e,t)},bi.prototype.sendEvents=function(e){this.getInstance().sendEvents(e)},bi.prototype.setGlobalUserProperties=function(e){this.getInstance().setUserProperties(e)},bi.prototype.__VERSION__=Mt;var mi=void 0!==ie&&ie.amplitude||{},gi=new bi;for(var yi in gi._q=mi._q||[],mi._iq)Object.prototype.hasOwnProperty.call(mi._iq,yi)&&(gi.getInstance(yi)._q=mi._iq[yi]._q||[]);return gi.runQueuedFunctions(),gi}();