@v-tilt/browser 1.0.10 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/LICENSE +21 -0
  2. package/dist/array.js +1 -1
  3. package/dist/array.js.map +1 -1
  4. package/dist/array.no-external.js +1 -1
  5. package/dist/array.no-external.js.map +1 -1
  6. package/dist/constants.d.ts +1 -0
  7. package/dist/main.js +1 -1
  8. package/dist/main.js.map +1 -1
  9. package/dist/module.d.ts +57 -4
  10. package/dist/module.js +1 -1
  11. package/dist/module.js.map +1 -1
  12. package/dist/module.no-external.d.ts +57 -4
  13. package/dist/module.no-external.js +1 -1
  14. package/dist/module.no-external.js.map +1 -1
  15. package/dist/rate-limiter.d.ts +52 -0
  16. package/dist/request-queue.d.ts +78 -0
  17. package/dist/request.d.ts +54 -0
  18. package/dist/retry-queue.d.ts +64 -0
  19. package/dist/types.d.ts +1 -0
  20. package/dist/user-manager.d.ts +21 -0
  21. package/dist/utils/event-utils.d.ts +35 -17
  22. package/dist/utils/index.d.ts +21 -0
  23. package/dist/utils/request-utils.d.ts +17 -0
  24. package/dist/vtilt.d.ts +40 -8
  25. package/lib/constants.d.ts +1 -0
  26. package/lib/constants.js +2 -1
  27. package/lib/rate-limiter.d.ts +52 -0
  28. package/lib/rate-limiter.js +80 -0
  29. package/lib/request-queue.d.ts +78 -0
  30. package/lib/request-queue.js +156 -0
  31. package/lib/request.d.ts +54 -0
  32. package/lib/request.js +265 -0
  33. package/lib/retry-queue.d.ts +64 -0
  34. package/lib/retry-queue.js +182 -0
  35. package/lib/types.d.ts +1 -0
  36. package/lib/user-manager.d.ts +21 -0
  37. package/lib/user-manager.js +66 -0
  38. package/lib/utils/event-utils.d.ts +35 -17
  39. package/lib/utils/event-utils.js +247 -118
  40. package/lib/utils/index.d.ts +21 -0
  41. package/lib/utils/index.js +58 -0
  42. package/lib/utils/request-utils.d.ts +17 -0
  43. package/lib/utils/request-utils.js +80 -0
  44. package/lib/vtilt.d.ts +40 -8
  45. package/lib/vtilt.js +161 -11
  46. package/package.json +61 -61
@@ -1,2 +1,2 @@
1
- !function(){"use strict";function e(){return e=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},e.apply(null,arguments)}class i{constructor(e){void 0===e&&(e={}),this.config=this.parseConfigFromScript(e)}parseConfigFromScript(i){if(!document.currentScript)return e({projectId:i.projectId||"",token:i.token||""},i);var t=document.currentScript,a=e({projectId:"",token:""},i);if(a.host=t.getAttribute("data-host")||i.host,a.proxy=t.getAttribute("data-proxy")||i.proxy,a.proxyUrl=t.getAttribute("data-proxy-url")||i.proxyUrl,a.token=t.getAttribute("data-token")||i.token||"",a.projectId=t.getAttribute("data-project-id")||i.projectId||"",a.domain=t.getAttribute("data-domain")||i.domain,a.storage=t.getAttribute("data-storage")||i.storage,a.stringifyPayload="false"!==t.getAttribute("data-stringify-payload"),a.webVitals="true"===t.getAttribute("web-vitals")||"true"===t.getAttribute("data-web-vitals")||i.webVitals,a.proxy&&a.proxyUrl)throw console.error("Error: Both data-proxy and data-proxy-url are specified. Please use only one of them."),new Error("Both data-proxy and data-proxy-url are specified. Please use only one of them.");for(var r of(a.globalAttributes=e({},i.globalAttributes),Array.from(t.attributes)))r.name.startsWith("tb_")&&(a.globalAttributes[r.name.slice(3).replace(/-/g,"_")]=r.value),r.name.startsWith("data-tb-")&&(a.globalAttributes[r.name.slice(8).replace(/-/g,"_")]=r.value);return a}getConfig(){return e({},this.config)}updateConfig(i){this.config=e({},this.config,i)}}var t="vt_session_id",a="vt_window_id",r="vt_primary_window_exists",s="vt_anonymous_id",n="vt_distinct_id",o="vt_device_id",u="vt_user_properties",c="vt_user_state",d="localStorage",l="sessionStorage",h={"Asia/Barnaul":"RU","Africa/Nouakchott":"MR","Africa/Lusaka":"ZM","Asia/Pyongyang":"KP","Europe/Bratislava":"SK","America/Belize":"BZ","America/Maceio":"BR","Pacific/Chuuk":"FM","Indian/Comoro":"KM","Pacific/Palau":"PW","Asia/Jakarta":"ID","Africa/Windhoek":"NA","America/Chihuahua":"MX","America/Nome":"US","Africa/Mbabane":"SZ","Africa/Porto-Novo":"BJ","Europe/San_Marino":"SM","Pacific/Fakaofo":"TK","America/Denver":"US","Europe/Belgrade":"RS","America/Indiana/Tell_City":"US","America/Fortaleza":"BR","America/Halifax":"CA","Europe/Bucharest":"RO","America/Indiana/Petersburg":"US","Europe/Kirov":"RU","Europe/Athens":"GR","America/Argentina/Ushuaia":"AR","Europe/Monaco":"MC","Europe/Vilnius":"LT","Europe/Copenhagen":"DK","Pacific/Kanton":"KI","America/Caracas":"VE","Asia/Almaty":"KZ","Europe/Paris":"FR","Africa/Blantyre":"MW","Asia/Muscat":"OM","America/North_Dakota/Beulah":"US","America/Matamoros":"MX","Asia/Irkutsk":"RU","America/Costa_Rica":"CR","America/Araguaina":"BR","Atlantic/Canary":"ES","America/Santo_Domingo":"DO","America/Vancouver":"CA","Africa/Addis_Ababa":"ET","Africa/Accra":"GH","Pacific/Kwajalein":"MH","Asia/Baghdad":"IQ","Australia/Adelaide":"AU","Australia/Hobart":"AU","America/Guayaquil":"EC","America/Argentina/Tucuman":"AR","Australia/Lindeman":"AU","America/New_York":"US","Pacific/Fiji":"FJ","America/Antigua":"AG","Africa/Casablanca":"MA","America/Paramaribo":"SR","Africa/Cairo":"EG","America/Cayenne":"GF","America/Detroit":"US","Antarctica/Syowa":"AQ","Africa/Douala":"CM","America/Argentina/La_Rioja":"AR","Africa/Lagos":"NG","America/St_Barthelemy":"BL","Asia/Nicosia":"CY","Asia/Macau":"MO","Europe/Riga":"LV","Asia/Ashgabat":"TM","Indian/Antananarivo":"MG","America/Argentina/San_Juan":"AR","Asia/Aden":"YE","Asia/Tomsk":"RU","America/Asuncion":"PY","Pacific/Bougainville":"PG","Asia/Vientiane":"LA","America/Mazatlan":"MX","Africa/Luanda":"AO","Europe/Oslo":"NO","Africa/Kinshasa":"CD","Europe/Warsaw":"PL","America/Grand_Turk":"TC","Asia/Seoul":"KR","Africa/Tripoli":"LY","America/St_Thomas":"VI","Asia/Kathmandu":"NP","Pacific/Pitcairn":"PN","Pacific/Nauru":"NR","America/Curacao":"CW","Asia/Kabul":"AF","Pacific/Tongatapu":"TO","Europe/Simferopol":"UA","Asia/Ust-Nera":"RU","Africa/Mogadishu":"SO","Indian/Mayotte":"YT","Pacific/Niue":"NU","America/Thunder_Bay":"CA","Atlantic/Azores":"PT","Pacific/Gambier":"PF","Europe/Stockholm":"SE","Africa/Libreville":"GA","America/Punta_Arenas":"CL","America/Guatemala":"GT","America/Noronha":"BR","Europe/Helsinki":"FI","Asia/Gaza":"PS","Pacific/Kosrae":"FM","America/Aruba":"AW","America/Nassau":"BS","Asia/Choibalsan":"MN","America/Winnipeg":"CA","America/Anguilla":"AI","Asia/Thimphu":"BT","Asia/Beirut":"LB","Atlantic/Faroe":"FO","Europe/Berlin":"DE","Europe/Amsterdam":"NL","Pacific/Honolulu":"US","America/Regina":"CA","America/Scoresbysund":"GL","Europe/Vienna":"AT","Europe/Tirane":"AL","Africa/El_Aaiun":"EH","America/Creston":"CA","Asia/Qostanay":"KZ","Asia/Ho_Chi_Minh":"VN","Europe/Samara":"RU","Europe/Rome":"IT","Australia/Eucla":"AU","America/El_Salvador":"SV","America/Chicago":"US","Africa/Abidjan":"CI","Asia/Kamchatka":"RU","Pacific/Tarawa":"KI","America/Santiago":"CL","America/Bahia":"BR","Indian/Christmas":"CX","Asia/Atyrau":"KZ","Asia/Dushanbe":"TJ","Europe/Ulyanovsk":"RU","America/Yellowknife":"CA","America/Recife":"BR","Australia/Sydney":"AU","America/Fort_Nelson":"CA","Pacific/Efate":"VU","Europe/Saratov":"RU","Africa/Banjul":"GM","Asia/Omsk":"RU","Europe/Ljubljana":"SI","Europe/Budapest":"HU","Europe/Astrakhan":"RU","America/Argentina/Buenos_Aires":"AR","Pacific/Chatham":"NZ","America/Argentina/Salta":"AR","Africa/Niamey":"NE","Asia/Pontianak":"ID","Indian/Reunion":"RE","Asia/Hong_Kong":"HK","Antarctica/McMurdo":"AQ","Africa/Malabo":"GQ","America/Los_Angeles":"US","America/Argentina/Cordoba":"AR","Pacific/Pohnpei":"FM","America/Tijuana":"MX","America/Campo_Grande":"BR","America/Dawson_Creek":"CA","Asia/Novosibirsk":"RU","Pacific/Pago_Pago":"AS","Asia/Jerusalem":"IL","Europe/Sarajevo":"BA","Africa/Freetown":"SL","Asia/Yekaterinburg":"RU","America/Juneau":"US","Africa/Ouagadougou":"BF","Africa/Monrovia":"LR","Europe/Kiev":"UA","America/Argentina/San_Luis":"AR","Asia/Tokyo":"JP","Asia/Qatar":"QA","America/La_Paz":"BO","America/Bogota":"CO","America/Thule":"GL","Asia/Manila":"PH","Asia/Hovd":"MN","Asia/Tehran":"IR","Atlantic/Madeira":"PT","America/Metlakatla":"US","Europe/Vatican":"VA","Asia/Bishkek":"KG","Asia/Dili":"TL","Antarctica/Palmer":"AQ","Atlantic/Cape_Verde":"CV","Indian/Chagos":"IO","America/Kentucky/Monticello":"US","Africa/Algiers":"DZ","Africa/Maseru":"LS","Asia/Kuala_Lumpur":"MY","Africa/Khartoum":"SD","America/Argentina/Rio_Gallegos":"AR","America/Blanc-Sablon":"CA","Africa/Maputo":"MZ","America/Tortola":"VG","Atlantic/Bermuda":"BM","America/Argentina/Catamarca":"AR","America/Cayman":"KY","America/Puerto_Rico":"PR","Pacific/Majuro":"MH","Europe/Busingen":"DE","Pacific/Midway":"UM","Indian/Cocos":"CC","Asia/Singapore":"SG","America/Boise":"US","America/Nuuk":"GL","America/Goose_Bay":"CA","Australia/Broken_Hill":"AU","Africa/Dar_es_Salaam":"TZ","Africa/Asmara":"ER","Asia/Samarkand":"UZ","Asia/Tbilisi":"GE","America/Argentina/Jujuy":"AR","America/Indiana/Winamac":"US","America/Porto_Velho":"BR","Asia/Magadan":"RU","Europe/Zaporozhye":"UA","Antarctica/Casey":"AQ","Asia/Shanghai":"CN","Pacific/Norfolk":"NF","Europe/Guernsey":"GG","Australia/Brisbane":"AU","Antarctica/DumontDUrville":"AQ","America/Havana":"CU","America/Atikokan":"CA","America/Mexico_City":"MX","America/Rankin_Inlet":"CA","America/Cuiaba":"BR","America/Resolute":"CA","Africa/Ceuta":"ES","Arctic/Longyearbyen":"SJ","Pacific/Guam":"GU","Asia/Damascus":"SY","Asia/Colombo":"LK","Asia/Yerevan":"AM","America/Montserrat":"MS","America/Belem":"BR","Europe/Kaliningrad":"RU","Atlantic/South_Georgia":"GS","Asia/Tashkent":"UZ","Asia/Kolkata":"IN","America/St_Johns":"CA","Asia/Srednekolymsk":"RU","Asia/Yakutsk":"RU","Europe/Prague":"CZ","Africa/Djibouti":"DJ","Asia/Dubai":"AE","Europe/Uzhgorod":"UA","America/Edmonton":"CA","Asia/Famagusta":"CY","America/Indiana/Knox":"US","Asia/Hebron":"PS","Asia/Taipei":"TW","Europe/London":"GB","Africa/Dakar":"SN","Australia/Darwin":"AU","America/Glace_Bay":"CA","Antarctica/Vostok":"AQ","America/Indiana/Vincennes":"US","America/Nipigon":"CA","Asia/Kuwait":"KW","Pacific/Guadalcanal":"SB","America/Toronto":"CA","Africa/Gaborone":"BW","Africa/Bujumbura":"BI","Africa/Lubumbashi":"CD","America/Merida":"MX","America/Marigot":"MF","Europe/Zagreb":"HR","Pacific/Easter":"CL","America/Santarem":"BR","Pacific/Noumea":"NC","America/Sitka":"US","Atlantic/Stanley":"FK","Pacific/Funafuti":"TV","America/Iqaluit":"CA","America/Rainy_River":"CA","America/Anchorage":"US","America/Lima":"PE","Asia/Baku":"AZ","America/Indiana/Vevay":"US","Asia/Ulaanbaatar":"MN","America/Managua":"NI","Asia/Krasnoyarsk":"RU","Asia/Qyzylorda":"KZ","America/Eirunepe":"BR","Europe/Podgorica":"ME","Europe/Chisinau":"MD","Europe/Mariehamn":"AX","Europe/Volgograd":"RU","Africa/Nairobi":"KE","Europe/Isle_of_Man":"IM","America/Menominee":"US","Africa/Harare":"ZW","Asia/Anadyr":"RU","America/Moncton":"CA","Indian/Maldives":"MV","America/Whitehorse":"CA","Antarctica/Mawson":"AQ","Europe/Madrid":"ES","America/Argentina/Mendoza":"AR","America/Manaus":"BR","Africa/Bangui":"CF","Indian/Mauritius":"MU","Africa/Tunis":"TN","Australia/Lord_Howe":"AU","America/Kentucky/Louisville":"US","America/North_Dakota/Center":"US","Asia/Novokuznetsk":"RU","Asia/Makassar":"ID","America/Port_of_Spain":"TT","America/Bahia_Banderas":"MX","Pacific/Auckland":"NZ","America/Sao_Paulo":"BR","Asia/Dhaka":"BD","America/Pangnirtung":"CA","Europe/Dublin":"IE","Asia/Brunei":"BN","Africa/Brazzaville":"CG","America/Montevideo":"UY","America/Jamaica":"JM","America/Indiana/Indianapolis":"US","America/Kralendijk":"BQ","Europe/Gibraltar":"GI","Pacific/Marquesas":"PF","Pacific/Apia":"WS","Europe/Jersey":"JE","America/Phoenix":"US","Africa/Ndjamena":"TD","Asia/Karachi":"PK","Africa/Kampala":"UG","Asia/Sakhalin":"RU","America/Martinique":"MQ","Europe/Moscow":"RU","Africa/Conakry":"GN","America/Barbados":"BB","Africa/Lome":"TG","America/Ojinaga":"MX","America/Tegucigalpa":"HN","Asia/Bangkok":"TH","Africa/Johannesburg":"ZA","Europe/Vaduz":"LI","Africa/Sao_Tome":"ST","America/Cambridge_Bay":"CA","America/Lower_Princes":"SX","America/Miquelon":"PM","America/St_Kitts":"KN","Australia/Melbourne":"AU","Europe/Minsk":"BY","Asia/Vladivostok":"RU","Europe/Sofia":"BG","Antarctica/Davis":"AQ","Pacific/Galapagos":"EC","America/North_Dakota/New_Salem":"US","Asia/Amman":"JO","Pacific/Wallis":"WF","America/Hermosillo":"MX","Pacific/Kiritimati":"KI","Antarctica/Macquarie":"AU","America/Guyana":"GY","Asia/Riyadh":"SA","Pacific/Tahiti":"PF","America/St_Vincent":"VC","America/Cancun":"MX","America/Grenada":"GD","Pacific/Wake":"UM","America/Dawson":"CA","Europe/Brussels":"BE","Indian/Kerguelen":"TF","America/Yakutat":"US","Indian/Mahe":"SC","Atlantic/Reykjavik":"IS","America/Panama":"PA","America/Guadeloupe":"GP","Europe/Malta":"MT","Antarctica/Troll":"AQ","Asia/Jayapura":"ID","Asia/Bahrain":"BH","Asia/Chita":"RU","Europe/Tallinn":"EE","Asia/Khandyga":"RU","America/Rio_Branco":"BR","Atlantic/St_Helena":"SH","Africa/Juba":"SS","America/Adak":"US","Pacific/Saipan":"MP","America/St_Lucia":"LC","America/Inuvik":"CA","Europe/Luxembourg":"LU","Africa/Bissau":"GW","Asia/Oral":"KZ","America/Boa_Vista":"BR","Europe/Skopje":"MK","America/Port-au-Prince":"HT","Pacific/Port_Moresby":"PG","Europe/Andorra":"AD","America/Indiana/Marengo":"US","Africa/Kigali":"RW","Africa/Bamako":"ML","America/Dominica":"DM","Asia/Aqtobe":"KZ","Europe/Istanbul":"TR","Pacific/Rarotonga":"CK","America/Danmarkshavn":"GL","Europe/Zurich":"CH","Asia/Yangon":"MM","America/Monterrey":"MX","Europe/Lisbon":"PT","Asia/Kuching":"MY","Antarctica/Rothera":"AQ","Australia/Perth":"AU","Asia/Phnom_Penh":"KH","America/Swift_Current":"CA","Asia/Aqtau":"KZ","Asia/Urumqi":"CN","Asia/Calcutta":"IN"};function A(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16))}function g(e){return!(!e||"string"!=typeof e)&&!(e.length<2||e.length>10240)}function p(e,i,t){if(e)if(Array.isArray(e))e.forEach((e,a)=>{i.call(t,e,a)});else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&i.call(t,e[a],a)}function m(e,i,t,a){var{capture:r=!1,passive:s=!0}=null!=a?a:{};null==e||e.addEventListener(i,t,{capture:r,passive:s})}var f="undefined"!=typeof window?window:void 0,v="undefined"!=typeof globalThis?globalThis:f,_=null==v?void 0:v.navigator,y=null==v?void 0:v.document,S=null==v?void 0:v.location,I=null==v?void 0:v.fetch,w=(null==v?void 0:v.XMLHttpRequest)&&"withCredentials"in new v.XMLHttpRequest?v.XMLHttpRequest:void 0;null==v||v.AbortController;var M=null==_?void 0:_.userAgent,b=null!=f?f:{};class E{constructor(e,i){void 0===e&&(e="cookie"),this.storageMethod=e,this.domain=i,this._windowId=void 0,this._initializeWindowId()}_isWebStorage(){return this.storageMethod===d||this.storageMethod===l}_getStorage(){return this._isWebStorage()?this.storageMethod===d?localStorage:sessionStorage:null}_createSessionData(e){return{value:e,expiry:(new Date).getTime()+18e5}}_storeSessionIdInWebStorage(e){var i=this._getStorage();if(i){var a=this._createSessionData(e);i.setItem(t,JSON.stringify(a))}}getSessionIdFromCookie(){var e={};return document.cookie.split(";").forEach(function(i){var[t,a]=i.split("=");e[t.trim()]=a}),e[t]||null}setSessionIdFromCookie(e){var i=t+"="+e+"; Max-Age=1800; path=/; secure";this.domain&&(i+="; domain="+this.domain),document.cookie=i}_storeSessionId(e){this._isWebStorage()?this._storeSessionIdInWebStorage(e):this.setSessionIdFromCookie(e)}_getSessionIdRaw(){var e=this._getStorage();if(e){var i=e.getItem(t);if(!i)return null;var a=null;try{a=JSON.parse(i)}catch(e){return null}return"object"!=typeof a||null===a?null:(new Date).getTime()>a.expiry?(e.removeItem(t),null):a.value}return this.getSessionIdFromCookie()}getSessionId(){var e=this._getSessionIdRaw();return e||(e=A(),this._storeSessionId(e)),e}setSessionId(){var e=this._getSessionIdRaw()||A();return this._storeSessionId(e),e}_clearSessionId(){var e=this._getStorage();if(e)e.removeItem(t);else{var i="Thu, 01 Jan 1970 00:00:00 UTC";document.cookie=t+"=; expires="+i+"; path=/;",this.domain&&(document.cookie=t+"=; expires="+i+"; path=/; domain="+this.domain+";")}}resetSessionId(){this._clearSessionId(),this.setSessionId(),this._setWindowId(A())}getWindowId(){if(this._windowId)return this._windowId;if(this._canUseSessionStorage()&&f){var e=f.sessionStorage.getItem(a);if(e)return this._windowId=e,e}var i=A();return this._setWindowId(i),i}_setWindowId(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&f&&f.sessionStorage.setItem(a,e))}_canUseSessionStorage(){if(void 0===f||!f.sessionStorage)return!1;try{var e="__vt_session_storage_test__";return f.sessionStorage.setItem(e,"test"),f.sessionStorage.removeItem(e),!0}catch(e){return!1}}_initializeWindowId(){if(this._canUseSessionStorage()&&f){var e=f.sessionStorage.getItem(r),i=f.sessionStorage.getItem(a);i&&!e?this._windowId=i:(i&&f.sessionStorage.removeItem(a),this._setWindowId(A())),f.sessionStorage.setItem(r,"true"),this._listenToUnload()}else this._windowId=A()}_listenToUnload(){f&&this._canUseSessionStorage()&&m(f,"beforeunload",()=>{f&&f.sessionStorage&&f.sessionStorage.removeItem(r)},{capture:!1})}}class P{constructor(e,i){void 0===e&&(e="localStorage"),this._cachedPersonProperties=null,this.storageMethod=e,this.domain=i,this.userIdentity=this.loadUserIdentity()}getUserIdentity(){return e({},this.userIdentity)}getDistinctId(){return this.userIdentity.distinct_id}getAnonymousId(){return this.userIdentity.anonymous_id||(this.userIdentity.anonymous_id=this.generateAnonymousId(),this.saveUserIdentity()),this.userIdentity.anonymous_id}getUserProperties(){return e({},this.userIdentity.properties)}identify(i,t,a){if("number"==typeof i&&(i=i.toString(),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),i)if(this.isDistinctIdStringLike(i))console.error('The string "'+i+'" was set in vTilt.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if("COOKIELESS_SENTINEL_VALUE"!==i){var r=this.userIdentity.distinct_id;if(this.userIdentity.distinct_id=i,!this.userIdentity.device_id){var s=r||this.userIdentity.anonymous_id;this.userIdentity.device_id=s,this.userIdentity.properties=e({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:s})}i!==r&&(this.userIdentity.distinct_id=i);var n="anonymous"===this.userIdentity.user_state;i!==r&&n?(this.userIdentity.user_state="identified",t&&(this.userIdentity.properties=e({},this.userIdentity.properties,t)),a&&Object.keys(a).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=a[e])}),this.saveUserIdentity()):t||a?("anonymous"===this.userIdentity.user_state&&(this.userIdentity.user_state="identified"),t&&(this.userIdentity.properties=e({},this.userIdentity.properties,t)),a&&Object.keys(a).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=a[e])}),this.saveUserIdentity()):i!==r&&(this.userIdentity.user_state="identified",this.saveUserIdentity())}else console.error('The string "'+i+'" was set in vTilt.identify which indicates an error. This ID is only used as a sentinel value.');else console.error("Unique user id has not been set in vTilt.identify")}setUserProperties(i,t){if(!i&&!t)return!1;var a=this.userIdentity.distinct_id||this.userIdentity.anonymous_id,r=this.getPersonPropertiesHash(a,i,t);return this._cachedPersonProperties===r?(console.info("VTilt: A duplicate setUserProperties call was made with the same properties. It has been ignored."),!1):(i&&(this.userIdentity.properties=e({},this.userIdentity.properties,i)),t&&Object.keys(t).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=t[e])}),this.saveUserIdentity(),this._cachedPersonProperties=r,!0)}getPersonPropertiesHash(e,i,t){return JSON.stringify({distinct_id:e,userPropertiesToSet:i,userPropertiesToSetOnce:t})}reset(i){var t=this.generateAnonymousId(),a=this.userIdentity.device_id,r=i?this.generateDeviceId():a;this.userIdentity={distinct_id:null,anonymous_id:t,device_id:r,properties:{},user_state:"anonymous"},this._cachedPersonProperties=null,this.saveUserIdentity(),this.userIdentity.properties=e({},this.userIdentity.properties,{$last_vtilt_reset:(new Date).toISOString()}),this.saveUserIdentity()}getEffectiveId(){return this.userIdentity.distinct_id||this.getAnonymousId()}getDeviceId(){return this.userIdentity.device_id}getUserState(){return this.userIdentity.user_state}setDistinctId(e){this.userIdentity.distinct_id=e,this.saveUserIdentity()}setUserState(e){this.userIdentity.user_state=e,this.saveUserIdentity()}updateUserProperties(i,t){i&&(this.userIdentity.properties=e({},this.userIdentity.properties,i)),t&&Object.keys(t).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=t[e])}),this.saveUserIdentity()}ensureDeviceId(i){this.userIdentity.device_id||(this.userIdentity.device_id=i,this.userIdentity.properties=e({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:i}),this.saveUserIdentity())}isDistinctIdStringLikePublic(e){return this.isDistinctIdStringLike(e)}createAlias(e,i){return this.isValidDistinctId(e)?(void 0===i&&(i=this.getDistinctId()||this.getAnonymousId()),this.isValidDistinctId(i)?e===i?(console.warn("alias matches current distinct_id - should use identify instead"),null):{distinct_id:e,original:i}:(console.warn("Invalid original distinct ID"),null)):(console.warn("Invalid alias provided"),null)}isValidDistinctId(e){if(!e||"string"!=typeof e)return!1;var i=e.toLowerCase().trim();return!["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none"].includes(i)&&0!==e.trim().length}isDistinctIdStringLike(e){if(!e||"string"!=typeof e)return!1;var i=e.toLowerCase().trim();return["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none","demo","example","sample","placeholder"].includes(i)}loadUserIdentity(){var e=this.getStoredValue(s)||this.generateAnonymousId(),i=this.getStoredValue(n)||null,t=this.getStoredValue(o)||this.generateDeviceId(),a=this.getStoredUserProperties(),r=this.getStoredValue(c)||"anonymous";return{distinct_id:i,anonymous_id:e||this.generateAnonymousId(),device_id:t,properties:a,user_state:r}}saveUserIdentity(){this.setStoredValue(s,this.userIdentity.anonymous_id),this.setStoredValue(o,this.userIdentity.device_id),this.setStoredValue(c,this.userIdentity.user_state),this.userIdentity.distinct_id?this.setStoredValue(n,this.userIdentity.distinct_id):this.removeStoredValue(n),this.setStoredUserProperties(this.userIdentity.properties)}generateAnonymousId(){return"anon_"+A()}generateDeviceId(){return"device_"+A()}getStoredValue(e){try{return this.storageMethod===d?localStorage.getItem(e):this.storageMethod===l?sessionStorage.getItem(e):this.getCookieValue(e)}catch(e){return console.warn("Failed to access storage:",e),null}}setStoredValue(e,i){try{this.storageMethod===d?localStorage.setItem(e,i):this.storageMethod===l?sessionStorage.setItem(e,i):this.setCookieValue(e,i)}catch(e){console.warn("Failed to save to storage:",e)}}removeStoredValue(e){this.storageMethod===d?localStorage.removeItem(e):this.storageMethod===l?sessionStorage.removeItem(e):this.removeCookieValue(e)}getStoredUserProperties(){var e=this.getStoredValue(u);if(!e)return{};try{return JSON.parse(e)}catch(e){return{}}}setStoredUserProperties(e){this.setStoredValue(u,JSON.stringify(e))}getCookieValue(e){var i=document.cookie.split(";");for(var t of i){var[a,r]=t.trim().split("=");if(a===e)return decodeURIComponent(r)}return null}setCookieValue(e,i){var t=e+"="+encodeURIComponent(i)+"; Max-Age=31536000; path=/; secure; SameSite=Lax";this.domain&&(t+="; domain="+this.domain),document.cookie=t}removeCookieValue(e){var i=e+"=; Max-Age=0; path=/";this.domain&&(i+="; domain="+this.domain),document.cookie=i}}class C{constructor(e,i){if(this.instance=i,e.webVitals&&f)try{this.webVitals=require("web-vitals"),this.initializeWebVitals()}catch(e){console.warn("web-vitals library not found. Please install it to enable web vitals tracking.",e)}}initializeWebVitals(){if(this.webVitals){var e=e=>{try{if(!(f&&y&&_&&S))return;var{country:i,locale:t}=function(){var e,i;if(!_)return{country:e,locale:i};try{var t=Intl.DateTimeFormat().resolvedOptions().timeZone;e=h[t],i=_.languages&&_.languages.length?_.languages[0]:_.userLanguage||_.language||_.browserLanguage||"en"}catch(e){}return{country:e,locale:i}}();this.instance.capture("web_vital",{name:e.name,value:e.value,delta:e.delta,rating:e.rating,id:e.id,navigationType:e.navigationType,pathname:S.pathname,href:S.href,"user-agent":_.userAgent,locale:t,location:i,referrer:y.referrer})}catch(e){console.error("Error sending web vital:",e)}};this.webVitals.onCLS&&this.webVitals.onCLS(e),this.webVitals.onFCP&&this.webVitals.onFCP(e),this.webVitals.onLCP&&this.webVitals.onLCP(e),this.webVitals.onTTFB&&this.webVitals.onTTFB(e),this.webVitals.onINP&&this.webVitals.onINP(e)}}}function U(e){return"function"==typeof e}function R(e,i,t){try{if(!(i in e))return()=>{};var a=e[i],r=t(a);return U(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__vtilt_wrapped__:{enumerable:!1,value:!0}})),e[i]=r,()=>{e[i]=a}}catch(e){return()=>{}}}class k{constructor(e){var i;this._instance=e,this._lastPathname=(null===(i=null==f?void 0:f.location)||void 0===i?void 0:i.pathname)||""}get isEnabled(){return!0}startIfEnabled(){this.isEnabled&&this.monitorHistoryChanges()}stop(){this._popstateListener&&this._popstateListener(),this._popstateListener=void 0}monitorHistoryChanges(){var e,i;if(f&&S&&(this._lastPathname=S.pathname||"",f.history)){var t=this;(null===(e=f.history.pushState)||void 0===e?void 0:e.__vtilt_wrapped__)||R(f.history,"pushState",e=>function(i,a,r){e.call(this,i,a,r),t._capturePageview("pushState")}),(null===(i=f.history.replaceState)||void 0===i?void 0:i.__vtilt_wrapped__)||R(f.history,"replaceState",e=>function(i,a,r){e.call(this,i,a,r),t._capturePageview("replaceState")}),this._setupPopstateListener()}}_capturePageview(e){var i;try{var t=null===(i=null==f?void 0:f.location)||void 0===i?void 0:i.pathname;if(!t||!S||!y)return;if(t!==this._lastPathname&&this.isEnabled){var a={navigation_type:e};this._instance.capture("$pageview",a)}this._lastPathname=t}catch(i){console.error("Error capturing "+e+" pageview",i)}}_setupPopstateListener(){if(!this._popstateListener&&f){var e=()=>{this._capturePageview("popstate")};m(f,"popstate",e),this._popstateListener=()=>{f&&f.removeEventListener("popstate",e)}}}}var T="Mobile",B="iOS",L="Android",D="Tablet",x=L+" "+D,V="iPad",N="Apple",O=N+" Watch",K="Safari",G="BlackBerry",$="Samsung",W=$+"Browser",F=$+" Internet",j="Chrome",H=j+" OS",q=j+" "+B,z="Internet Explorer",J=z+" "+T,Z="Opera",Q=Z+" Mini",X="Edge",Y="Microsoft "+X,ee="Firefox",ie=ee+" "+B,te="Nintendo",ae="PlayStation",re="Xbox",se=L+" "+T,ne=T+" "+K,oe="Windows",ue=oe+" Phone",ce="Nokia",de="Ouya",le="Generic",he=le+" "+T.toLowerCase(),Ae=le+" "+D.toLowerCase(),ge="Konqueror",pe="(\\d+(\\.\\d+)?)",me=new RegExp("Version/"+pe),fe=new RegExp(re,"i"),ve=new RegExp(ae+" \\w+","i"),_e=new RegExp(te+" \\w+","i"),ye=new RegExp(G+"|PlayBook|BB10","i"),Se={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"};function Ie(e,i){return e.toLowerCase().includes(i.toLowerCase())}var we=(e,i)=>i&&Ie(i,N)||function(e){return Ie(e,K)&&!Ie(e,j)&&!Ie(e,L)}(e),Me=function(e,i){return i=i||"",Ie(e," OPR/")&&Ie(e,"Mini")?Q:Ie(e," OPR/")?Z:ye.test(e)?G:Ie(e,"IE"+T)||Ie(e,"WPDesktop")?J:Ie(e,W)?F:Ie(e,X)||Ie(e,"Edg/")?Y:Ie(e,"FBIOS")?"Facebook "+T:Ie(e,"UCWEB")||Ie(e,"UCBrowser")?"UC Browser":Ie(e,"CriOS")?q:Ie(e,"CrMo")||Ie(e,j)?j:Ie(e,L)&&Ie(e,K)?se:Ie(e,"FxiOS")?ie:Ie(e.toLowerCase(),ge.toLowerCase())?ge:we(e,i)?Ie(e,T)?ne:K:Ie(e,ee)?ee:Ie(e,"MSIE")||Ie(e,"Trident/")?z:Ie(e,"Gecko")?ee:""},be={[J]:[new RegExp("rv:"+pe)],[Y]:[new RegExp(X+"?\\/"+pe)],[j]:[new RegExp("("+j+"|CrMo)\\/"+pe)],[q]:[new RegExp("CriOS\\/"+pe)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+pe)],[K]:[me],[ne]:[me],[Z]:[new RegExp("(Opera|OPR)\\/"+pe)],[ee]:[new RegExp(ee+"\\/"+pe)],[ie]:[new RegExp("FxiOS\\/"+pe)],[ge]:[new RegExp("Konqueror[:/]?"+pe,"i")],[G]:[new RegExp(G+" "+pe),me],[se]:[new RegExp("android\\s"+pe,"i")],[F]:[new RegExp(W+"\\/"+pe)],[z]:[new RegExp("(rv:|MSIE )"+pe)],Mozilla:[new RegExp("rv:"+pe)]},Ee=[[new RegExp(re+"; "+re+" (.*?)[);]","i"),e=>[re,e&&e[1]||""]],[new RegExp(te,"i"),[te,""]],[new RegExp(ae,"i"),[ae,""]],[ye,[G,""]],[new RegExp(oe,"i"),(e,i)=>{if(/Phone/.test(i)||/WPDesktop/.test(i))return[ue,""];if(new RegExp(T).test(i)&&!/IEMobile\b/.test(i))return[oe+" "+T,""];var t=/Windows NT ([0-9.]+)/i.exec(i);if(t&&t[1]){var a=t[1],r=Se[a]||"";return/arm/i.test(i)&&(r="RT"),[oe,r]}return[oe,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var i=[e[3],e[4],e[5]||"0"];return[B,i.join(".")]}return[B,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var i="";return e&&e.length>=3&&(i=void 0===e[2]?e[3]:e[2]),["watchOS",i]}],[new RegExp("("+L+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+L+")","i"),e=>{if(e&&e[2]){var i=[e[2],e[3],e[4]||"0"];return[L,i.join(".")]}return[L,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var i=["Mac OS X",""];if(e&&e[1]){var t=[e[1],e[2],e[3]||"0"];i[1]=t.join(".")}return i}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[H,""]],[/Linux|debian/i,["Linux",""]]],Pe=function(e){return _e.test(e)?te:ve.test(e)?ae:fe.test(e)?re:new RegExp(de,"i").test(e)?de:new RegExp("("+ue+"|WPDesktop)","i").test(e)?ue:/iPad/.test(e)?V:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?O:ye.test(e)?G:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(ce,"i").test(e)?ce:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp(T).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?L:x:L:new RegExp("(pda|"+T+")","i").test(e)?he:new RegExp(D,"i").test(e)&&!new RegExp(D+" pc","i").test(e)?Ae:""};function Ce(){if(void 0!==_)return _.language||_.userLanguage}function Ue(){var e={};if(!M)return e;var[i,t]=function(e){for(var i=0;i<Ee.length;i++){var[t,a]=Ee[i],r=t.exec(e),s=r&&(U(a)?a(r,e):a);if(s)return s}return["",""]}(M);i&&(e.$os=i),t&&(e.$os_version=t);var a=Me(M,null==_?void 0:_.vendor);a&&(e.$browser=a);var r=function(e,i){var t=Me(e,i),a=be[t];if(void 0===a)return null;for(var r=0;r<a.length;r++){var s=a[r],n=e.match(s);if(n)return parseFloat(n[n.length-2])}return null}(M,null==_?void 0:_.vendor);r&&(e.$browser_version=r);var s=Pe(M);s&&(e.$device=s);var n=function(e){var i=Pe(e);return i===V||i===x||"Kobo"===i||"Kindle Fire"===i||i===Ae?D:i===te||i===re||i===ae||i===de?"Console":i===O?"Wearable":i?T:"Desktop"}(M);n&&(e.$device_type=n);var o=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}();o&&(e.$timezone=o);var u=function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}();void 0!==u&&(e.$timezone_offset=u),S&&(e.$current_url=S.href,e.$host=S.host,e.$pathname=S.pathname),M&&(e.$raw_user_agent=M.length>1e3?M.substring(0,997)+"...":M);var c,d=Ce(),l="string"==typeof(c=Ce())?c.split("-")[0]:void 0;return d&&(e.$browser_language=d),l&&(e.$browser_language_prefix=l),(null==f?void 0:f.screen)&&(f.screen.height&&(e.$screen_height=f.screen.height),f.screen.width&&(e.$screen_width=f.screen.width)),f&&(f.innerHeight&&(e.$viewport_height=f.innerHeight),f.innerWidth&&(e.$viewport_width=f.innerWidth)),e.$lib="web",e.$lib_version="1.0.7",e.$insert_id=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),e.$time=Date.now()/1e3,e.$referrer=(null==y?void 0:y.referrer)||"$direct",e.$referring_domain=function(){if(!(null==y?void 0:y.referrer))return"$direct";try{return new URL(y.referrer).host||"$direct"}catch(e){return"$direct"}}(),e}var Re=Array.isArray;class ke{constructor(e){void 0===e&&(e={}),this.__loaded=!1,this._initialPageviewCaptured=!1,this._visibilityStateListener=null,this.__request_queue=[],this._hasWarnedAboutConfig=!1,this.configManager=new i(e);var t=this.configManager.getConfig(),a=t.domain;!a&&S&&(a=this.getCurrentDomain()),this.sessionManager=new E(t.storage||"cookie",a),this.userManager=new P(t.persistence||"localStorage",a),this.webVitalsManager=new C(t,this)}init(e,i,t){var a;if(t&&t!==Be){var r=null!==(a=Te[t])&&void 0!==a?a:new ke;return r._init(e,i,t),Te[t]=r,Te[Be][t]=r,r}return this._init(e,i,t)}_init(i,t,a){return void 0===t&&(t={}),this.__loaded?(console.warn("vTilt: You have already initialized vTilt! Re-initializing is a no-op"),this):(this.updateConfig(e({},t,{projectId:i||t.projectId,name:a})),this.__loaded=!0,this.historyAutocapture=new k(this),this.historyAutocapture.startIfEnabled(),this._captureInitialPageview(),this)}toString(){var e,i=null!==(e=this.configManager.getConfig().name)&&void 0!==e?e:Be;return i!==Be&&(i=Be+"."+i),i}getCurrentDomain(){if(!S)return"";var e=S.protocol,i=S.hostname,t=S.port;return e+"//"+i+(t?":"+t:"")}_isConfigured(){var e=this.configManager.getConfig();return!(!e.projectId||!e.token)||(this._hasWarnedAboutConfig||(console.warn("VTilt: projectId and token are required for tracking. Events will be skipped until init() or updateConfig() is called with these fields."),this._hasWarnedAboutConfig=!0),!1)}buildUrl(){var e=this.configManager.getConfig(),{proxyUrl:i,proxy:t,host:a,token:r}=e;return i||(t?t+"/api/tracking?token="+r:a?a.replace(/\/+$/gm,"")+"/api/tracking?token="+r:"/api/tracking?token="+r)}sendRequest(e,i,t){if(this._isConfigured()){if(t&&void 0!==f)if(f.__VTILT_ENQUEUE_REQUESTS)return void this.__request_queue.push({url:e,event:i});var a=new XMLHttpRequest;a.open("POST",e,!0),a.setRequestHeader("Content-Type","application/json"),a.send(JSON.stringify(i))}}_send_retriable_request(e){this.sendRequest(e.url,e.event,!1)}capture(i,t){if(this.sessionManager.setSessionId(),_&&_.userAgent&&function(e){return!(e&&"string"==typeof e&&e.length>500)}(_.userAgent)){var a=this.buildUrl(),r=Ue(),s=this.userManager.getUserProperties(),n=this.sessionManager.getSessionId(),o=this.sessionManager.getWindowId(),u=this.userManager.getAnonymousId(),c=e({},r,s,{$session_id:n,$window_id:o},u?{$anon_distinct_id:u}:{},t);"$pageview"===i&&y&&(c.title=y.title);var d,l,h=this.configManager.getConfig();if(!1!==h.stringifyPayload){if(d=Object.assign({},c,h.globalAttributes),!g(d=JSON.stringify(d)))return}else if(d=Object.assign({},c,h.globalAttributes),!g(JSON.stringify(d)))return;l="$identify"===i?this.userManager.getAnonymousId():this.userManager.getDistinctId()||this.userManager.getAnonymousId();var A={timestamp:(new Date).toISOString(),event:i,project_id:h.projectId||"",domain:h.domain||this.getCurrentDomain(),payload:d,distinct_id:l,anonymous_id:u};this.sendRequest(a,A,!0)}}trackEvent(e,i){void 0===i&&(i={}),this.capture(e,i)}identify(e,i,t){if("number"==typeof e&&(e=String(e),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),e)if(this.userManager.isDistinctIdStringLikePublic(e))console.error('The string "'+e+'" was set in vTilt.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if("COOKIELESS_SENTINEL_VALUE"!==e){var a=this.userManager.getDistinctId(),r=this.userManager.getAnonymousId(),s=this.userManager.getDeviceId(),n="anonymous"===this.userManager.getUserState();if(!s){var o=a||r;this.userManager.ensureDeviceId(o)}e!==a&&n?(this.userManager.setUserState("identified"),this.userManager.updateUserProperties(i,t),this.capture("$identify",{distinct_id:e,$anon_distinct_id:a||r,$set:i||{},$set_once:t||{}}),this.userManager.setDistinctId(e)):i||t?(n&&this.userManager.setUserState("identified"),this.userManager.updateUserProperties(i,t),this.capture("$set",{$set:i||{},$set_once:t||{}})):e!==a&&(this.userManager.setUserState("identified"),this.userManager.setDistinctId(e))}else console.error('The string "'+e+'" was set in vTilt.identify which indicates an error. This ID is only used as a sentinel value.');else console.error("Unique user id has not been set in vTilt.identify")}setUserProperties(e,i){this.userManager.setUserProperties(e,i)&&this.capture("$set",{$set:e||{},$set_once:i||{}})}resetUser(e){this.sessionManager.resetSessionId(),this.userManager.reset(e)}getUserIdentity(){return this.userManager.getUserIdentity()}getDeviceId(){return this.userManager.getDeviceId()}getUserState(){return this.userManager.getUserState()}createAlias(e,i){var t=this.userManager.createAlias(e,i);t?this.capture("$alias",{$original_id:t.original,$alias_id:t.distinct_id}):e===(i||this.userManager.getDistinctId()||this.userManager.getAnonymousId())&&this.identify(e)}_captureInitialPageview(){y&&("visible"===y.visibilityState?this._initialPageviewCaptured||(this._initialPageviewCaptured=!0,setTimeout(()=>{if(y&&S){this.capture("$pageview",{navigation_type:"initial_load"})}},300),this._visibilityStateListener&&(y.removeEventListener("visibilitychange",this._visibilityStateListener),this._visibilityStateListener=null)):this._visibilityStateListener||(this._visibilityStateListener=()=>{this._captureInitialPageview()},m(y,"visibilitychange",this._visibilityStateListener)))}getConfig(){return this.configManager.getConfig()}getSessionId(){return this.sessionManager.getSessionId()}updateConfig(e){this.configManager.updateConfig(e);var i=this.configManager.getConfig(),t=i.domain;!t&&S&&(t=this.getCurrentDomain()),this.sessionManager=new E(i.storage||"cookie",t),this.userManager=new P(i.persistence||"localStorage",t),this.webVitalsManager=new C(i,this)}_execute_array(e){Array.isArray(e)&&e.forEach(e=>{if(e&&Array.isArray(e)&&e.length>0){var i=e[0],t=e.slice(1);if("function"==typeof this[i])try{this[i](...t)}catch(e){console.error("vTilt: Error executing queued call "+i+":",e)}}})}_dom_loaded(){this.__request_queue.forEach(e=>{this._send_retriable_request(e)}),this.__request_queue=[]}}var Te={},Be="vt",Le=!(void 0!==w||void 0!==I)&&-1===(null==M?void 0:M.indexOf("MSIE"))&&-1===(null==M?void 0:M.indexOf("Mozilla"));f&&(f.__VTILT_ENQUEUE_REQUESTS=Le);var De,xe;De=Te[Be]=new ke,(xe=b.vt)&&p(xe._i,function(e){if(e&&Re(e)){var i=De.init(e[0],e[1],e[2]),t=xe[e[2]||"vt"]||xe;i&&i._execute_array(t)}}),b.vt=De,function(){function e(){e.done||(e.done=!0,Le=!1,void 0!==f&&(f.__VTILT_ENQUEUE_REQUESTS=!1),p(Te,function(e){e._dom_loaded()}))}y&&"function"==typeof y.addEventListener?"complete"===y.readyState?e():m(y,"DOMContentLoaded",e,{capture:!1}):f&&console.error("Browser doesn't support `document.addEventListener` so vTilt couldn't be initialized")}()}();
1
+ !function(){"use strict";function e(e,t,i,r,a,n,s){try{var o=e[n](s),u=o.value}catch(e){return void i(e)}o.done?t(u):Promise.resolve(u).then(r,a)}function t(t){return function(){var i=this,r=arguments;return new Promise(function(a,n){var s=t.apply(i,r);function o(t){e(s,a,n,o,u,"next",t)}function u(t){e(s,a,n,o,u,"throw",t)}o(void 0)})}}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},i.apply(null,arguments)}class r{constructor(e){void 0===e&&(e={}),this.config=this.parseConfigFromScript(e)}parseConfigFromScript(e){if(!document.currentScript)return i({projectId:e.projectId||"",token:e.token||""},e);var t=document.currentScript,r=i({projectId:"",token:""},e);if(r.host=t.getAttribute("data-host")||e.host,r.proxy=t.getAttribute("data-proxy")||e.proxy,r.proxyUrl=t.getAttribute("data-proxy-url")||e.proxyUrl,r.token=t.getAttribute("data-token")||e.token||"",r.projectId=t.getAttribute("data-project-id")||e.projectId||"",r.domain=t.getAttribute("data-domain")||e.domain,r.storage=t.getAttribute("data-storage")||e.storage,r.stringifyPayload="false"!==t.getAttribute("data-stringify-payload"),r.webVitals="true"===t.getAttribute("web-vitals")||"true"===t.getAttribute("data-web-vitals")||e.webVitals,r.proxy&&r.proxyUrl)throw console.error("Error: Both data-proxy and data-proxy-url are specified. Please use only one of them."),new Error("Both data-proxy and data-proxy-url are specified. Please use only one of them.");for(var a of(r.globalAttributes=i({},e.globalAttributes),Array.from(t.attributes)))a.name.startsWith("tb_")&&(r.globalAttributes[a.name.slice(3).replace(/-/g,"_")]=a.value),a.name.startsWith("data-tb-")&&(r.globalAttributes[a.name.slice(8).replace(/-/g,"_")]=a.value);return r}getConfig(){return i({},this.config)}updateConfig(e){this.config=i({},this.config,e)}}var a="vt_session_id",n="vt_window_id",s="vt_primary_window_exists",o="vt_anonymous_id",u="vt_distinct_id",c="vt_device_id",l="vt_user_properties",d="vt_user_state",h="$initial_person_info",g="localStorage",f="sessionStorage",p={"Asia/Barnaul":"RU","Africa/Nouakchott":"MR","Africa/Lusaka":"ZM","Asia/Pyongyang":"KP","Europe/Bratislava":"SK","America/Belize":"BZ","America/Maceio":"BR","Pacific/Chuuk":"FM","Indian/Comoro":"KM","Pacific/Palau":"PW","Asia/Jakarta":"ID","Africa/Windhoek":"NA","America/Chihuahua":"MX","America/Nome":"US","Africa/Mbabane":"SZ","Africa/Porto-Novo":"BJ","Europe/San_Marino":"SM","Pacific/Fakaofo":"TK","America/Denver":"US","Europe/Belgrade":"RS","America/Indiana/Tell_City":"US","America/Fortaleza":"BR","America/Halifax":"CA","Europe/Bucharest":"RO","America/Indiana/Petersburg":"US","Europe/Kirov":"RU","Europe/Athens":"GR","America/Argentina/Ushuaia":"AR","Europe/Monaco":"MC","Europe/Vilnius":"LT","Europe/Copenhagen":"DK","Pacific/Kanton":"KI","America/Caracas":"VE","Asia/Almaty":"KZ","Europe/Paris":"FR","Africa/Blantyre":"MW","Asia/Muscat":"OM","America/North_Dakota/Beulah":"US","America/Matamoros":"MX","Asia/Irkutsk":"RU","America/Costa_Rica":"CR","America/Araguaina":"BR","Atlantic/Canary":"ES","America/Santo_Domingo":"DO","America/Vancouver":"CA","Africa/Addis_Ababa":"ET","Africa/Accra":"GH","Pacific/Kwajalein":"MH","Asia/Baghdad":"IQ","Australia/Adelaide":"AU","Australia/Hobart":"AU","America/Guayaquil":"EC","America/Argentina/Tucuman":"AR","Australia/Lindeman":"AU","America/New_York":"US","Pacific/Fiji":"FJ","America/Antigua":"AG","Africa/Casablanca":"MA","America/Paramaribo":"SR","Africa/Cairo":"EG","America/Cayenne":"GF","America/Detroit":"US","Antarctica/Syowa":"AQ","Africa/Douala":"CM","America/Argentina/La_Rioja":"AR","Africa/Lagos":"NG","America/St_Barthelemy":"BL","Asia/Nicosia":"CY","Asia/Macau":"MO","Europe/Riga":"LV","Asia/Ashgabat":"TM","Indian/Antananarivo":"MG","America/Argentina/San_Juan":"AR","Asia/Aden":"YE","Asia/Tomsk":"RU","America/Asuncion":"PY","Pacific/Bougainville":"PG","Asia/Vientiane":"LA","America/Mazatlan":"MX","Africa/Luanda":"AO","Europe/Oslo":"NO","Africa/Kinshasa":"CD","Europe/Warsaw":"PL","America/Grand_Turk":"TC","Asia/Seoul":"KR","Africa/Tripoli":"LY","America/St_Thomas":"VI","Asia/Kathmandu":"NP","Pacific/Pitcairn":"PN","Pacific/Nauru":"NR","America/Curacao":"CW","Asia/Kabul":"AF","Pacific/Tongatapu":"TO","Europe/Simferopol":"UA","Asia/Ust-Nera":"RU","Africa/Mogadishu":"SO","Indian/Mayotte":"YT","Pacific/Niue":"NU","America/Thunder_Bay":"CA","Atlantic/Azores":"PT","Pacific/Gambier":"PF","Europe/Stockholm":"SE","Africa/Libreville":"GA","America/Punta_Arenas":"CL","America/Guatemala":"GT","America/Noronha":"BR","Europe/Helsinki":"FI","Asia/Gaza":"PS","Pacific/Kosrae":"FM","America/Aruba":"AW","America/Nassau":"BS","Asia/Choibalsan":"MN","America/Winnipeg":"CA","America/Anguilla":"AI","Asia/Thimphu":"BT","Asia/Beirut":"LB","Atlantic/Faroe":"FO","Europe/Berlin":"DE","Europe/Amsterdam":"NL","Pacific/Honolulu":"US","America/Regina":"CA","America/Scoresbysund":"GL","Europe/Vienna":"AT","Europe/Tirane":"AL","Africa/El_Aaiun":"EH","America/Creston":"CA","Asia/Qostanay":"KZ","Asia/Ho_Chi_Minh":"VN","Europe/Samara":"RU","Europe/Rome":"IT","Australia/Eucla":"AU","America/El_Salvador":"SV","America/Chicago":"US","Africa/Abidjan":"CI","Asia/Kamchatka":"RU","Pacific/Tarawa":"KI","America/Santiago":"CL","America/Bahia":"BR","Indian/Christmas":"CX","Asia/Atyrau":"KZ","Asia/Dushanbe":"TJ","Europe/Ulyanovsk":"RU","America/Yellowknife":"CA","America/Recife":"BR","Australia/Sydney":"AU","America/Fort_Nelson":"CA","Pacific/Efate":"VU","Europe/Saratov":"RU","Africa/Banjul":"GM","Asia/Omsk":"RU","Europe/Ljubljana":"SI","Europe/Budapest":"HU","Europe/Astrakhan":"RU","America/Argentina/Buenos_Aires":"AR","Pacific/Chatham":"NZ","America/Argentina/Salta":"AR","Africa/Niamey":"NE","Asia/Pontianak":"ID","Indian/Reunion":"RE","Asia/Hong_Kong":"HK","Antarctica/McMurdo":"AQ","Africa/Malabo":"GQ","America/Los_Angeles":"US","America/Argentina/Cordoba":"AR","Pacific/Pohnpei":"FM","America/Tijuana":"MX","America/Campo_Grande":"BR","America/Dawson_Creek":"CA","Asia/Novosibirsk":"RU","Pacific/Pago_Pago":"AS","Asia/Jerusalem":"IL","Europe/Sarajevo":"BA","Africa/Freetown":"SL","Asia/Yekaterinburg":"RU","America/Juneau":"US","Africa/Ouagadougou":"BF","Africa/Monrovia":"LR","Europe/Kiev":"UA","America/Argentina/San_Luis":"AR","Asia/Tokyo":"JP","Asia/Qatar":"QA","America/La_Paz":"BO","America/Bogota":"CO","America/Thule":"GL","Asia/Manila":"PH","Asia/Hovd":"MN","Asia/Tehran":"IR","Atlantic/Madeira":"PT","America/Metlakatla":"US","Europe/Vatican":"VA","Asia/Bishkek":"KG","Asia/Dili":"TL","Antarctica/Palmer":"AQ","Atlantic/Cape_Verde":"CV","Indian/Chagos":"IO","America/Kentucky/Monticello":"US","Africa/Algiers":"DZ","Africa/Maseru":"LS","Asia/Kuala_Lumpur":"MY","Africa/Khartoum":"SD","America/Argentina/Rio_Gallegos":"AR","America/Blanc-Sablon":"CA","Africa/Maputo":"MZ","America/Tortola":"VG","Atlantic/Bermuda":"BM","America/Argentina/Catamarca":"AR","America/Cayman":"KY","America/Puerto_Rico":"PR","Pacific/Majuro":"MH","Europe/Busingen":"DE","Pacific/Midway":"UM","Indian/Cocos":"CC","Asia/Singapore":"SG","America/Boise":"US","America/Nuuk":"GL","America/Goose_Bay":"CA","Australia/Broken_Hill":"AU","Africa/Dar_es_Salaam":"TZ","Africa/Asmara":"ER","Asia/Samarkand":"UZ","Asia/Tbilisi":"GE","America/Argentina/Jujuy":"AR","America/Indiana/Winamac":"US","America/Porto_Velho":"BR","Asia/Magadan":"RU","Europe/Zaporozhye":"UA","Antarctica/Casey":"AQ","Asia/Shanghai":"CN","Pacific/Norfolk":"NF","Europe/Guernsey":"GG","Australia/Brisbane":"AU","Antarctica/DumontDUrville":"AQ","America/Havana":"CU","America/Atikokan":"CA","America/Mexico_City":"MX","America/Rankin_Inlet":"CA","America/Cuiaba":"BR","America/Resolute":"CA","Africa/Ceuta":"ES","Arctic/Longyearbyen":"SJ","Pacific/Guam":"GU","Asia/Damascus":"SY","Asia/Colombo":"LK","Asia/Yerevan":"AM","America/Montserrat":"MS","America/Belem":"BR","Europe/Kaliningrad":"RU","Atlantic/South_Georgia":"GS","Asia/Tashkent":"UZ","Asia/Kolkata":"IN","America/St_Johns":"CA","Asia/Srednekolymsk":"RU","Asia/Yakutsk":"RU","Europe/Prague":"CZ","Africa/Djibouti":"DJ","Asia/Dubai":"AE","Europe/Uzhgorod":"UA","America/Edmonton":"CA","Asia/Famagusta":"CY","America/Indiana/Knox":"US","Asia/Hebron":"PS","Asia/Taipei":"TW","Europe/London":"GB","Africa/Dakar":"SN","Australia/Darwin":"AU","America/Glace_Bay":"CA","Antarctica/Vostok":"AQ","America/Indiana/Vincennes":"US","America/Nipigon":"CA","Asia/Kuwait":"KW","Pacific/Guadalcanal":"SB","America/Toronto":"CA","Africa/Gaborone":"BW","Africa/Bujumbura":"BI","Africa/Lubumbashi":"CD","America/Merida":"MX","America/Marigot":"MF","Europe/Zagreb":"HR","Pacific/Easter":"CL","America/Santarem":"BR","Pacific/Noumea":"NC","America/Sitka":"US","Atlantic/Stanley":"FK","Pacific/Funafuti":"TV","America/Iqaluit":"CA","America/Rainy_River":"CA","America/Anchorage":"US","America/Lima":"PE","Asia/Baku":"AZ","America/Indiana/Vevay":"US","Asia/Ulaanbaatar":"MN","America/Managua":"NI","Asia/Krasnoyarsk":"RU","Asia/Qyzylorda":"KZ","America/Eirunepe":"BR","Europe/Podgorica":"ME","Europe/Chisinau":"MD","Europe/Mariehamn":"AX","Europe/Volgograd":"RU","Africa/Nairobi":"KE","Europe/Isle_of_Man":"IM","America/Menominee":"US","Africa/Harare":"ZW","Asia/Anadyr":"RU","America/Moncton":"CA","Indian/Maldives":"MV","America/Whitehorse":"CA","Antarctica/Mawson":"AQ","Europe/Madrid":"ES","America/Argentina/Mendoza":"AR","America/Manaus":"BR","Africa/Bangui":"CF","Indian/Mauritius":"MU","Africa/Tunis":"TN","Australia/Lord_Howe":"AU","America/Kentucky/Louisville":"US","America/North_Dakota/Center":"US","Asia/Novokuznetsk":"RU","Asia/Makassar":"ID","America/Port_of_Spain":"TT","America/Bahia_Banderas":"MX","Pacific/Auckland":"NZ","America/Sao_Paulo":"BR","Asia/Dhaka":"BD","America/Pangnirtung":"CA","Europe/Dublin":"IE","Asia/Brunei":"BN","Africa/Brazzaville":"CG","America/Montevideo":"UY","America/Jamaica":"JM","America/Indiana/Indianapolis":"US","America/Kralendijk":"BQ","Europe/Gibraltar":"GI","Pacific/Marquesas":"PF","Pacific/Apia":"WS","Europe/Jersey":"JE","America/Phoenix":"US","Africa/Ndjamena":"TD","Asia/Karachi":"PK","Africa/Kampala":"UG","Asia/Sakhalin":"RU","America/Martinique":"MQ","Europe/Moscow":"RU","Africa/Conakry":"GN","America/Barbados":"BB","Africa/Lome":"TG","America/Ojinaga":"MX","America/Tegucigalpa":"HN","Asia/Bangkok":"TH","Africa/Johannesburg":"ZA","Europe/Vaduz":"LI","Africa/Sao_Tome":"ST","America/Cambridge_Bay":"CA","America/Lower_Princes":"SX","America/Miquelon":"PM","America/St_Kitts":"KN","Australia/Melbourne":"AU","Europe/Minsk":"BY","Asia/Vladivostok":"RU","Europe/Sofia":"BG","Antarctica/Davis":"AQ","Pacific/Galapagos":"EC","America/North_Dakota/New_Salem":"US","Asia/Amman":"JO","Pacific/Wallis":"WF","America/Hermosillo":"MX","Pacific/Kiritimati":"KI","Antarctica/Macquarie":"AU","America/Guyana":"GY","Asia/Riyadh":"SA","Pacific/Tahiti":"PF","America/St_Vincent":"VC","America/Cancun":"MX","America/Grenada":"GD","Pacific/Wake":"UM","America/Dawson":"CA","Europe/Brussels":"BE","Indian/Kerguelen":"TF","America/Yakutat":"US","Indian/Mahe":"SC","Atlantic/Reykjavik":"IS","America/Panama":"PA","America/Guadeloupe":"GP","Europe/Malta":"MT","Antarctica/Troll":"AQ","Asia/Jayapura":"ID","Asia/Bahrain":"BH","Asia/Chita":"RU","Europe/Tallinn":"EE","Asia/Khandyga":"RU","America/Rio_Branco":"BR","Atlantic/St_Helena":"SH","Africa/Juba":"SS","America/Adak":"US","Pacific/Saipan":"MP","America/St_Lucia":"LC","America/Inuvik":"CA","Europe/Luxembourg":"LU","Africa/Bissau":"GW","Asia/Oral":"KZ","America/Boa_Vista":"BR","Europe/Skopje":"MK","America/Port-au-Prince":"HT","Pacific/Port_Moresby":"PG","Europe/Andorra":"AD","America/Indiana/Marengo":"US","Africa/Kigali":"RW","Africa/Bamako":"ML","America/Dominica":"DM","Asia/Aqtobe":"KZ","Europe/Istanbul":"TR","Pacific/Rarotonga":"CK","America/Danmarkshavn":"GL","Europe/Zurich":"CH","Asia/Yangon":"MM","America/Monterrey":"MX","Europe/Lisbon":"PT","Asia/Kuching":"MY","Antarctica/Rothera":"AQ","Australia/Perth":"AU","Asia/Phnom_Penh":"KH","America/Swift_Current":"CA","Asia/Aqtau":"KZ","Asia/Urumqi":"CN","Asia/Calcutta":"IN"};function v(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16))}function m(e){return!(!e||"string"!=typeof e)&&!(e.length<2||e.length>10240)}function A(e,t,i){if(e)if(Array.isArray(e))e.forEach((e,r)=>{t.call(i,e,r)});else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(i,e[r],r)}function _(e,t,i,r){var{capture:a=!1,passive:n=!0}=null!=r?r:{};null==e||e.addEventListener(t,i,{capture:a,passive:n})}function y(e,t){if(!t)return e;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}function S(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];for(var a of i)for(var n of a)e.push(n);return e}var w="undefined"!=typeof window?window:void 0,I="undefined"!=typeof globalThis?globalThis:w,b=null==I?void 0:I.navigator,M=null==I?void 0:I.document,P=null==I?void 0:I.location,E=null==I?void 0:I.fetch,C=(null==I?void 0:I.XMLHttpRequest)&&"withCredentials"in new I.XMLHttpRequest?I.XMLHttpRequest:void 0;null==I||I.AbortController;var R=null==b?void 0:b.userAgent,U=null!=w?w:{};class T{constructor(e,t){void 0===e&&(e="cookie"),this.storageMethod=e,this.domain=t,this._windowId=void 0,this._initializeWindowId()}_isWebStorage(){return this.storageMethod===g||this.storageMethod===f}_getStorage(){return this._isWebStorage()?this.storageMethod===g?localStorage:sessionStorage:null}_createSessionData(e){return{value:e,expiry:(new Date).getTime()+18e5}}_storeSessionIdInWebStorage(e){var t=this._getStorage();if(t){var i=this._createSessionData(e);t.setItem(a,JSON.stringify(i))}}getSessionIdFromCookie(){var e={};return document.cookie.split(";").forEach(function(t){var[i,r]=t.split("=");e[i.trim()]=r}),e[a]||null}setSessionIdFromCookie(e){var t=a+"="+e+"; Max-Age=1800; path=/; secure";this.domain&&(t+="; domain="+this.domain),document.cookie=t}_storeSessionId(e){this._isWebStorage()?this._storeSessionIdInWebStorage(e):this.setSessionIdFromCookie(e)}_getSessionIdRaw(){var e=this._getStorage();if(e){var t=e.getItem(a);if(!t)return null;var i=null;try{i=JSON.parse(t)}catch(e){return null}return"object"!=typeof i||null===i?null:(new Date).getTime()>i.expiry?(e.removeItem(a),null):i.value}return this.getSessionIdFromCookie()}getSessionId(){var e=this._getSessionIdRaw();return e||(e=v(),this._storeSessionId(e)),e}setSessionId(){var e=this._getSessionIdRaw()||v();return this._storeSessionId(e),e}_clearSessionId(){var e=this._getStorage();if(e)e.removeItem(a);else{var t="Thu, 01 Jan 1970 00:00:00 UTC";document.cookie=a+"=; expires="+t+"; path=/;",this.domain&&(document.cookie=a+"=; expires="+t+"; path=/; domain="+this.domain+";")}}resetSessionId(){this._clearSessionId(),this.setSessionId(),this._setWindowId(v())}getWindowId(){if(this._windowId)return this._windowId;if(this._canUseSessionStorage()&&w){var e=w.sessionStorage.getItem(n);if(e)return this._windowId=e,e}var t=v();return this._setWindowId(t),t}_setWindowId(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&w&&w.sessionStorage.setItem(n,e))}_canUseSessionStorage(){if(void 0===w||!w.sessionStorage)return!1;try{var e="__vt_session_storage_test__";return w.sessionStorage.setItem(e,"test"),w.sessionStorage.removeItem(e),!0}catch(e){return!1}}_initializeWindowId(){if(this._canUseSessionStorage()&&w){var e=w.sessionStorage.getItem(s),t=w.sessionStorage.getItem(n);t&&!e?this._windowId=t:(t&&w.sessionStorage.removeItem(n),this._setWindowId(v())),w.sessionStorage.setItem(s,"true"),this._listenToUnload()}else this._windowId=v()}_listenToUnload(){w&&this._canUseSessionStorage()&&_(w,"beforeunload",()=>{w&&w.sessionStorage&&w.sessionStorage.removeItem(s)},{capture:!1})}}function k(e){if(!M)return null;var t=M.createElement("a");return t.href=e,t}function B(e,t){for(var i=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;r<i.length;r++){var a=i[r].split("=");if(a[0]===t){if(a.length<2)return"";var n=a[1];try{n=decodeURIComponent(n)}catch(e){}return n.replace(/\+/g," ")}}return""}function L(e,t,i){if(!e||!t||!t.length)return e;for(var r=e.split("#"),a=r[0]||"",n=r[1],s=a.split("?"),o=s[1],u=s[0],c=(o||"").split("&"),l=[],d=0;d<c.length;d++){var h=c[d].split("="),g=h[0],f=h.slice(1).join("=");-1!==t.indexOf(g)?l.push(g+"="+i):g&&l.push(g+(f?"="+f:""))}var p=l.join("&");return u+(p?"?"+p:"")+(n?"#"+n:"")}function D(e){return"function"==typeof e}var O="Mobile",x="iOS",q="Android",N="Tablet",V=q+" "+N,$="iPad",K="Apple",G=K+" Watch",F="Safari",j="BlackBerry",W="Samsung",H=W+"Browser",z=W+" Internet",J="Chrome",Q=J+" OS",Z=J+" "+x,X="Internet Explorer",Y=X+" "+O,ee="Opera",te=ee+" Mini",ie="Edge",re="Microsoft "+ie,ae="Firefox",ne=ae+" "+x,se="Nintendo",oe="PlayStation",ue="Xbox",ce=q+" "+O,le=O+" "+F,de="Windows",he=de+" Phone",ge="Nokia",fe="Ouya",pe="Generic",ve=pe+" "+O.toLowerCase(),me=pe+" "+N.toLowerCase(),Ae="Konqueror",_e="(\\d+(\\.\\d+)?)",ye=new RegExp("Version/"+_e),Se=new RegExp(ue,"i"),we=new RegExp(oe+" \\w+","i"),Ie=new RegExp(se+" \\w+","i"),be=new RegExp(j+"|PlayBook|BB10","i"),Me={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"};function Pe(e,t){return e.toLowerCase().includes(t.toLowerCase())}var Ee=(e,t)=>t&&Pe(t,K)||function(e){return Pe(e,F)&&!Pe(e,J)&&!Pe(e,q)}(e),Ce=function(e,t){return t=t||"",Pe(e," OPR/")&&Pe(e,"Mini")?te:Pe(e," OPR/")?ee:be.test(e)?j:Pe(e,"IE"+O)||Pe(e,"WPDesktop")?Y:Pe(e,H)?z:Pe(e,ie)||Pe(e,"Edg/")?re:Pe(e,"FBIOS")?"Facebook "+O:Pe(e,"UCWEB")||Pe(e,"UCBrowser")?"UC Browser":Pe(e,"CriOS")?Z:Pe(e,"CrMo")||Pe(e,J)?J:Pe(e,q)&&Pe(e,F)?ce:Pe(e,"FxiOS")?ne:Pe(e.toLowerCase(),Ae.toLowerCase())?Ae:Ee(e,t)?Pe(e,O)?le:F:Pe(e,ae)?ae:Pe(e,"MSIE")||Pe(e,"Trident/")?X:Pe(e,"Gecko")?ae:""},Re={[Y]:[new RegExp("rv:"+_e)],[re]:[new RegExp(ie+"?\\/"+_e)],[J]:[new RegExp("("+J+"|CrMo)\\/"+_e)],[Z]:[new RegExp("CriOS\\/"+_e)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+_e)],[F]:[ye],[le]:[ye],[ee]:[new RegExp("(Opera|OPR)\\/"+_e)],[ae]:[new RegExp(ae+"\\/"+_e)],[ne]:[new RegExp("FxiOS\\/"+_e)],[Ae]:[new RegExp("Konqueror[:/]?"+_e,"i")],[j]:[new RegExp(j+" "+_e),ye],[ce]:[new RegExp("android\\s"+_e,"i")],[z]:[new RegExp(H+"\\/"+_e)],[X]:[new RegExp("(rv:|MSIE )"+_e)],Mozilla:[new RegExp("rv:"+_e)]},Ue=function(e,t){var i=Ce(e,t),r=Re[i];if(void 0===r)return null;for(var a=0;a<r.length;a++){var n=r[a],s=e.match(n);if(s)return parseFloat(s[s.length-2])}return null},Te=[[new RegExp(ue+"; "+ue+" (.*?)[);]","i"),e=>[ue,e&&e[1]||""]],[new RegExp(se,"i"),[se,""]],[new RegExp(oe,"i"),[oe,""]],[be,[j,""]],[new RegExp(de,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[he,""];if(new RegExp(O).test(t)&&!/IEMobile\b/.test(t))return[de+" "+O,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var r=i[1],a=Me[r]||"";return/arm/i.test(t)&&(a="RT"),[de,a]}return[de,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[x,t.join(".")]}return[x,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=void 0===e[2]?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+q+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+q+")","i"),e=>{if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[q,t.join(".")]}return[q,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];if(e&&e[1]){var i=[e[1],e[2],e[3]||"0"];t[1]=i.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Q,""]],[/Linux|debian/i,["Linux",""]]],ke=function(e){return Ie.test(e)?se:we.test(e)?oe:Se.test(e)?ue:new RegExp(fe,"i").test(e)?fe:new RegExp("("+he+"|WPDesktop)","i").test(e)?he:/iPad/.test(e)?$:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?G:be.test(e)?j:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(ge,"i").test(e)?ge:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp(O).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?q:V:q:new RegExp("(pda|"+O+")","i").test(e)?ve:new RegExp(N,"i").test(e)&&!new RegExp(N+" pc","i").test(e)?me:""},Be="https?://(.*)",Le=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],De=S(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Le),Oe="<masked>";function xe(e){var t=function(e){return e?0===e.search(Be+"google.([^/?]*)")?"google":0===e.search(Be+"bing.com")?"bing":0===e.search(Be+"yahoo.com")?"yahoo":0===e.search(Be+"duckduckgo.com")?"duckduckgo":null:null}(e),i="yahoo"!==t?"q":"p",r={};if(null!==t){r.$search_engine=t;var a=M?B(M.referrer,i):"";a.length&&(r.ph_keyword=a)}return r}function qe(){if("undefined"!=typeof navigator)return navigator.language||navigator.userLanguage}function Ne(){return(null==M?void 0:M.referrer)||"$direct"}function Ve(){var e;return(null==M?void 0:M.referrer)&&(null===(e=k(M.referrer))||void 0===e?void 0:e.host)||"$direct"}function $e(e){var t,{r:i,u:r}=e,a={$referrer:i,$referring_domain:null==i?void 0:"$direct"===i?"$direct":null===(t=k(i))||void 0===t?void 0:t.host};if(r){a.$current_url=r;var n=k(r);a.$host=null==n?void 0:n.host,a.$pathname=null==n?void 0:n.pathname;var s=function(e){var t=De.concat([]),i={};return A(t,function(t){var r=B(e,t);i[t]=r||null}),i}(r);y(a,s)}i&&y(a,xe(i));return a}function Ke(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}function Ge(){try{return(new Date).getTimezoneOffset()}catch(e){return}}function Fe(e,t){if(!R)return{};var i,r,a,[n,s]=function(e){for(var t=0;t<Te.length;t++){var[i,r]=Te[t],a=i.exec(e),n=a&&(D(r)?r(a,e):r);if(n)return n}return["",""]}(R);return y(function(e){var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=e[i];null!=r&&""!==r&&(t[i]=r)}return t}({$os:n,$os_version:s,$browser:Ce(R,navigator.vendor),$device:ke(R),$device_type:(r=R,a=ke(r),a===$||a===V||"Kobo"===a||"Kindle Fire"===a||a===me?N:a===se||a===ue||a===oe||a===fe?"Console":a===G?"Wearable":a?O:"Desktop"),$timezone:Ke(),$timezone_offset:Ge()}),{$current_url:L(null==P?void 0:P.href,[],Oe),$host:null==P?void 0:P.host,$pathname:null==P?void 0:P.pathname,$raw_user_agent:R.length>1e3?R.substring(0,997)+"...":R,$browser_version:Ue(R,navigator.vendor),$browser_language:qe(),$browser_language_prefix:(i=qe(),"string"==typeof i?i.split("-")[0]:void 0),$screen_height:null==w?void 0:w.screen.height,$screen_width:null==w?void 0:w.screen.width,$viewport_height:null==w?void 0:w.innerHeight,$viewport_width:null==w?void 0:w.innerWidth,$lib:"web",$lib_version:"1.0.7",$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}class je{constructor(e,t){void 0===e&&(e="localStorage"),this._cachedPersonProperties=null,this.storageMethod=e,this.domain=t,this.userIdentity=this.loadUserIdentity()}getUserIdentity(){return i({},this.userIdentity)}getDistinctId(){return this.userIdentity.distinct_id}getAnonymousId(){return this.userIdentity.anonymous_id||(this.userIdentity.anonymous_id=this.generateAnonymousId(),this.saveUserIdentity()),this.userIdentity.anonymous_id}getUserProperties(){return i({},this.userIdentity.properties)}identify(e,t,r){if("number"==typeof e&&(e=e.toString(),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),e)if(this.isDistinctIdStringLike(e))console.error('The string "'+e+'" was set in vTilt.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if("COOKIELESS_SENTINEL_VALUE"!==e){var a=this.userIdentity.distinct_id;if(this.userIdentity.distinct_id=e,!this.userIdentity.device_id){var n=a||this.userIdentity.anonymous_id;this.userIdentity.device_id=n,this.userIdentity.properties=i({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:n})}e!==a&&(this.userIdentity.distinct_id=e);var s="anonymous"===this.userIdentity.user_state;e!==a&&s?(this.userIdentity.user_state="identified",t&&(this.userIdentity.properties=i({},this.userIdentity.properties,t)),r&&Object.keys(r).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=r[e])}),this.saveUserIdentity()):t||r?("anonymous"===this.userIdentity.user_state&&(this.userIdentity.user_state="identified"),t&&(this.userIdentity.properties=i({},this.userIdentity.properties,t)),r&&Object.keys(r).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=r[e])}),this.saveUserIdentity()):e!==a&&(this.userIdentity.user_state="identified",this.saveUserIdentity())}else console.error('The string "'+e+'" was set in vTilt.identify which indicates an error. This ID is only used as a sentinel value.');else console.error("Unique user id has not been set in vTilt.identify")}setUserProperties(e,t){if(!e&&!t)return!1;var r=this.userIdentity.distinct_id||this.userIdentity.anonymous_id,a=this.getPersonPropertiesHash(r,e,t);return this._cachedPersonProperties===a?(console.info("VTilt: A duplicate setUserProperties call was made with the same properties. It has been ignored."),!1):(e&&(this.userIdentity.properties=i({},this.userIdentity.properties,e)),t&&Object.keys(t).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=t[e])}),this.saveUserIdentity(),this._cachedPersonProperties=a,!0)}getPersonPropertiesHash(e,t,i){return JSON.stringify({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}reset(e){var t=this.generateAnonymousId(),r=this.userIdentity.device_id,a=e?this.generateDeviceId():r;this.userIdentity={distinct_id:null,anonymous_id:t,device_id:a,properties:{},user_state:"anonymous"},this._cachedPersonProperties=null,this.saveUserIdentity(),this.userIdentity.properties=i({},this.userIdentity.properties,{$last_vtilt_reset:(new Date).toISOString()}),this.saveUserIdentity()}getEffectiveId(){return this.userIdentity.distinct_id||this.getAnonymousId()}getDeviceId(){return this.userIdentity.device_id}getUserState(){return this.userIdentity.user_state}setDistinctId(e){this.userIdentity.distinct_id=e,this.saveUserIdentity()}setUserState(e){this.userIdentity.user_state=e,this.saveUserIdentity()}updateUserProperties(e,t){e&&(this.userIdentity.properties=i({},this.userIdentity.properties,e)),t&&Object.keys(t).forEach(e=>{e in this.userIdentity.properties||(this.userIdentity.properties[e]=t[e])}),this.saveUserIdentity()}ensureDeviceId(e){this.userIdentity.device_id||(this.userIdentity.device_id=e,this.userIdentity.properties=i({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:e}),this.saveUserIdentity())}isDistinctIdStringLikePublic(e){return this.isDistinctIdStringLike(e)}createAlias(e,t){return this.isValidDistinctId(e)?(void 0===t&&(t=this.getDistinctId()||this.getAnonymousId()),this.isValidDistinctId(t)?e===t?(console.warn("alias matches current distinct_id - should use identify instead"),null):{distinct_id:e,original:t}:(console.warn("Invalid original distinct ID"),null)):(console.warn("Invalid alias provided"),null)}isValidDistinctId(e){if(!e||"string"!=typeof e)return!1;var t=e.toLowerCase().trim();return!["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none"].includes(t)&&0!==e.trim().length}isDistinctIdStringLike(e){if(!e||"string"!=typeof e)return!1;var t=e.toLowerCase().trim();return["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none","demo","example","sample","placeholder"].includes(t)}loadUserIdentity(){var e=this.getStoredValue(o)||this.generateAnonymousId(),t=this.getStoredValue(u)||null,i=this.getStoredValue(c)||this.generateDeviceId(),r=this.getStoredUserProperties(),a=this.getStoredValue(d)||"anonymous";return{distinct_id:t,anonymous_id:e||this.generateAnonymousId(),device_id:i,properties:r,user_state:a}}saveUserIdentity(){this.setStoredValue(o,this.userIdentity.anonymous_id),this.setStoredValue(c,this.userIdentity.device_id),this.setStoredValue(d,this.userIdentity.user_state),this.userIdentity.distinct_id?this.setStoredValue(u,this.userIdentity.distinct_id):this.removeStoredValue(u),this.setStoredUserProperties(this.userIdentity.properties)}generateAnonymousId(){return"anon_"+v()}generateDeviceId(){return"device_"+v()}getStoredValue(e){try{return this.storageMethod===g?localStorage.getItem(e):this.storageMethod===f?sessionStorage.getItem(e):this.getCookieValue(e)}catch(e){return console.warn("Failed to access storage:",e),null}}setStoredValue(e,t){try{this.storageMethod===g?localStorage.setItem(e,t):this.storageMethod===f?sessionStorage.setItem(e,t):this.setCookieValue(e,t)}catch(e){console.warn("Failed to save to storage:",e)}}removeStoredValue(e){this.storageMethod===g?localStorage.removeItem(e):this.storageMethod===f?sessionStorage.removeItem(e):this.removeCookieValue(e)}getStoredUserProperties(){var e=this.getStoredValue(l);if(!e)return{};try{return JSON.parse(e)}catch(e){return{}}}setStoredUserProperties(e){this.setStoredValue(l,JSON.stringify(e))}getCookieValue(e){var t=document.cookie.split(";");for(var i of t){var[r,a]=i.trim().split("=");if(r===e)return decodeURIComponent(a)}return null}setCookieValue(e,t){var i=e+"="+encodeURIComponent(t)+"; Max-Age=31536000; path=/; secure; SameSite=Lax";this.domain&&(i+="; domain="+this.domain),document.cookie=i}removeCookieValue(e){var t=e+"=; Max-Age=0; path=/";this.domain&&(t+="; domain="+this.domain),document.cookie=t}register_once(e,t){var i=this.getStoredUserProperties(),r=!1;for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(a in i||(i[a]=e[a],r=!0));if(t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(n in i||(i[n]=t[n],r=!0));r&&this.setStoredUserProperties(i)}set_initial_person_info(e,t){if(!this.getStoredUserProperties()[h]){var i=function(e,t){var i=e?S([],Le,t||[]):[],r=null==P?void 0:P.href.substring(0,1e3);return{r:Ne().substring(0,1e3),u:r?L(r,i,Oe):void 0}}(e,t);this.register_once({[h]:i},void 0)}}get_initial_props(){var e,t,i=this.getStoredUserProperties()[h];return i?(e=$e(i),t={},A(e,function(e,i){var r;t["$initial_"+(r=String(i),r.startsWith("$")?r.substring(1):r)]=e}),t):{}}update_referrer_info(){var e={$referrer:Ne(),$referring_domain:Ve()};this.register_once(e,void 0)}}class We{constructor(e,t){if(this.instance=t,e.webVitals&&w)try{this.webVitals=require("web-vitals"),this.initializeWebVitals()}catch(e){console.warn("web-vitals library not found. Please install it to enable web vitals tracking.",e)}}initializeWebVitals(){if(this.webVitals){var e=e=>{try{if(!(w&&M&&b&&P))return;var{country:t,locale:i}=function(){var e,t;if(!b)return{country:e,locale:t};try{var i=Intl.DateTimeFormat().resolvedOptions().timeZone;e=p[i],t=b.languages&&b.languages.length?b.languages[0]:b.userLanguage||b.language||b.browserLanguage||"en"}catch(e){}return{country:e,locale:t}}();this.instance.capture("web_vital",{name:e.name,value:e.value,delta:e.delta,rating:e.rating,id:e.id,navigationType:e.navigationType,pathname:P.pathname,href:P.href,"user-agent":b.userAgent,locale:i,location:t,referrer:M.referrer})}catch(e){console.error("Error sending web vital:",e)}};this.webVitals.onCLS&&this.webVitals.onCLS(e),this.webVitals.onFCP&&this.webVitals.onFCP(e),this.webVitals.onLCP&&this.webVitals.onLCP(e),this.webVitals.onTTFB&&this.webVitals.onTTFB(e),this.webVitals.onINP&&this.webVitals.onINP(e)}}}function He(e,t,i){try{if(!(t in e))return()=>{};var r=e[t],a=i(r);return D(a)&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__vtilt_wrapped__:{enumerable:!1,value:!0}})),e[t]=a,()=>{e[t]=r}}catch(e){return()=>{}}}class ze{constructor(e){var t;this._instance=e,this._lastPathname=(null===(t=null==w?void 0:w.location)||void 0===t?void 0:t.pathname)||""}get isEnabled(){return!0}startIfEnabled(){this.isEnabled&&this.monitorHistoryChanges()}stop(){this._popstateListener&&this._popstateListener(),this._popstateListener=void 0}monitorHistoryChanges(){var e,t;if(w&&P&&(this._lastPathname=P.pathname||"",w.history)){var i=this;(null===(e=w.history.pushState)||void 0===e?void 0:e.__vtilt_wrapped__)||He(w.history,"pushState",e=>function(t,r,a){e.call(this,t,r,a),i._capturePageview("pushState")}),(null===(t=w.history.replaceState)||void 0===t?void 0:t.__vtilt_wrapped__)||He(w.history,"replaceState",e=>function(t,r,a){e.call(this,t,r,a),i._capturePageview("replaceState")}),this._setupPopstateListener()}}_capturePageview(e){var t;try{var i=null===(t=null==w?void 0:w.location)||void 0===t?void 0:t.pathname;if(!i||!P||!M)return;if(i!==this._lastPathname&&this.isEnabled){var r={navigation_type:e};this._instance.capture("$pageview",r)}this._lastPathname=i}catch(t){console.error("Error capturing "+e+" pageview",t)}}_setupPopstateListener(){if(!this._popstateListener&&w){var e=()=>{this._capturePageview("popstate")};_(w,"popstate",e),this._popstateListener=()=>{w&&w.removeEventListener("popstate",e)}}}}var Je=Uint8Array,Qe=Uint16Array,Ze=Int32Array,Xe=new Je([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ye=new Je([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),et=new Je([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),tt=function(e,t){for(var i=new Qe(31),r=0;r<31;++r)i[r]=t+=1<<e[r-1];var a=new Ze(i[30]);for(r=1;r<30;++r)for(var n=i[r];n<i[r+1];++n)a[n]=n-i[r]<<5|r;return{b:i,r:a}},it=tt(Xe,2),rt=it.b,at=it.r;rt[28]=258,at[258]=28;for(var nt=tt(Ye,0).r,st=new Qe(32768),ot=0;ot<32768;++ot){var ut=(43690&ot)>>1|(21845&ot)<<1;ut=(61680&(ut=(52428&ut)>>2|(13107&ut)<<2))>>4|(3855&ut)<<4,st[ot]=((65280&ut)>>8|(255&ut)<<8)>>1}var ct=function(e,t,i){for(var r=e.length,a=0,n=new Qe(t);a<r;++a)e[a]&&++n[e[a]-1];var s,o=new Qe(t);for(a=1;a<t;++a)o[a]=o[a-1]+n[a-1]<<1;if(i){s=new Qe(1<<t);var u=15-t;for(a=0;a<r;++a)if(e[a])for(var c=a<<4|e[a],l=t-e[a],d=o[e[a]-1]++<<l,h=d|(1<<l)-1;d<=h;++d)s[st[d]>>u]=c}else for(s=new Qe(r),a=0;a<r;++a)e[a]&&(s[a]=st[o[e[a]-1]++]>>15-e[a]);return s},lt=new Je(288);for(ot=0;ot<144;++ot)lt[ot]=8;for(ot=144;ot<256;++ot)lt[ot]=9;for(ot=256;ot<280;++ot)lt[ot]=7;for(ot=280;ot<288;++ot)lt[ot]=8;var dt=new Je(32);for(ot=0;ot<32;++ot)dt[ot]=5;var ht=ct(lt,9,0),gt=ct(dt,5,0),ft=function(e){return(e+7)/8|0},pt=function(e,t,i){return(null==i||i>e.length)&&(i=e.length),new Je(e.subarray(t,i))},vt=function(e,t,i){i<<=7&t;var r=t/8|0;e[r]|=i,e[r+1]|=i>>8},mt=function(e,t,i){i<<=7&t;var r=t/8|0;e[r]|=i,e[r+1]|=i>>8,e[r+2]|=i>>16},At=function(e,t){for(var i=[],r=0;r<e.length;++r)e[r]&&i.push({s:r,f:e[r]});var a=i.length,n=i.slice();if(!a)return{t:Mt,l:0};if(1==a){var s=new Je(i[0].s+1);return s[i[0].s]=1,{t:s,l:1}}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var o=i[0],u=i[1],c=0,l=1,d=2;for(i[0]={s:-1,f:o.f+u.f,l:o,r:u};l!=a-1;)o=i[i[c].f<i[d].f?c++:d++],u=i[c!=l&&i[c].f<i[d].f?c++:d++],i[l++]={s:-1,f:o.f+u.f,l:o,r:u};var h=n[0].s;for(r=1;r<a;++r)n[r].s>h&&(h=n[r].s);var g=new Qe(h+1),f=_t(i[l-1],g,0);if(f>t){r=0;var p=0,v=f-t,m=1<<v;for(n.sort(function(e,t){return g[t.s]-g[e.s]||e.f-t.f});r<a;++r){var A=n[r].s;if(!(g[A]>t))break;p+=m-(1<<f-g[A]),g[A]=t}for(p>>=v;p>0;){var _=n[r].s;g[_]<t?p-=1<<t-g[_]++-1:++r}for(;r>=0&&p;--r){var y=n[r].s;g[y]==t&&(--g[y],++p)}f=t}return{t:new Je(g),l:f}},_t=function(e,t,i){return-1==e.s?Math.max(_t(e.l,t,i+1),_t(e.r,t,i+1)):t[e.s]=i},yt=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new Qe(++t),r=0,a=e[0],n=1,s=function(e){i[r++]=e},o=1;o<=t;++o)if(e[o]==a&&o!=t)++n;else{if(!a&&n>2){for(;n>138;n-=138)s(32754);n>2&&(s(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(s(a),--n;n>6;n-=6)s(8304);n>2&&(s(n-3<<5|8208),n=0)}for(;n--;)s(a);n=1,a=e[o]}return{c:i.subarray(0,r),n:t}},St=function(e,t){for(var i=0,r=0;r<t.length;++r)i+=e[r]*t[r];return i},wt=function(e,t,i){var r=i.length,a=ft(t+2);e[a]=255&r,e[a+1]=r>>8,e[a+2]=255^e[a],e[a+3]=255^e[a+1];for(var n=0;n<r;++n)e[a+n+4]=i[n];return 8*(a+4+r)},It=function(e,t,i,r,a,n,s,o,u,c,l){vt(t,l++,i),++a[256];for(var d=At(a,15),h=d.t,g=d.l,f=At(n,15),p=f.t,v=f.l,m=yt(h),A=m.c,_=m.n,y=yt(p),S=y.c,w=y.n,I=new Qe(19),b=0;b<A.length;++b)++I[31&A[b]];for(b=0;b<S.length;++b)++I[31&S[b]];for(var M=At(I,7),P=M.t,E=M.l,C=19;C>4&&!P[et[C-1]];--C);var R,U,T,k,B=c+5<<3,L=St(a,lt)+St(n,dt)+s,D=St(a,h)+St(n,p)+s+14+3*C+St(I,P)+2*I[16]+3*I[17]+7*I[18];if(u>=0&&B<=L&&B<=D)return wt(t,l,e.subarray(u,u+c));if(vt(t,l,1+(D<L)),l+=2,D<L){R=ct(h,g,0),U=h,T=ct(p,v,0),k=p;var O=ct(P,E,0);vt(t,l,_-257),vt(t,l+5,w-1),vt(t,l+10,C-4),l+=14;for(b=0;b<C;++b)vt(t,l+3*b,P[et[b]]);l+=3*C;for(var x=[A,S],q=0;q<2;++q){var N=x[q];for(b=0;b<N.length;++b){var V=31&N[b];vt(t,l,O[V]),l+=P[V],V>15&&(vt(t,l,N[b]>>5&127),l+=N[b]>>12)}}}else R=ht,U=lt,T=gt,k=dt;for(b=0;b<o;++b){var $=r[b];if($>255){mt(t,l,R[(V=$>>18&31)+257]),l+=U[V+257],V>7&&(vt(t,l,$>>23&31),l+=Xe[V]);var K=31&$;mt(t,l,T[K]),l+=k[K],K>3&&(mt(t,l,$>>5&8191),l+=Ye[K])}else mt(t,l,R[$]),l+=U[$]}return mt(t,l,R[256]),l+U[256]},bt=new Ze([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Mt=new Je(0),Pt=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var i=t,r=9;--r;)i=(1&i&&-306674912)^i>>>1;e[t]=i}return e}(),Et=function(e,t,i,r,a){if(!a&&(a={l:1},t.dictionary)){var n=t.dictionary.subarray(-32768),s=new Je(n.length+e.length);s.set(n),s.set(e,n.length),e=s,a.w=n.length}return function(e,t,i,r,a,n){var s=n.z||e.length,o=new Je(r+s+5*(1+Math.ceil(s/7e3))+a),u=o.subarray(r,o.length-a),c=n.l,l=7&(n.r||0);if(t){l&&(u[0]=n.r>>3);for(var d=bt[t-1],h=d>>13,g=8191&d,f=(1<<i)-1,p=n.p||new Qe(32768),v=n.h||new Qe(f+1),m=Math.ceil(i/3),A=2*m,_=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<A)&f},y=new Ze(25e3),S=new Qe(288),w=new Qe(32),I=0,b=0,M=n.i||0,P=0,E=n.w||0,C=0;M+2<s;++M){var R=_(M),U=32767&M,T=v[R];if(p[U]=T,v[R]=U,E<=M){var k=s-M;if((I>7e3||P>24576)&&(k>423||!c)){l=It(e,u,0,y,S,w,b,P,C,M-C,l),P=I=b=0,C=M;for(var B=0;B<286;++B)S[B]=0;for(B=0;B<30;++B)w[B]=0}var L=2,D=0,O=g,x=U-T&32767;if(k>2&&R==_(M-x))for(var q=Math.min(h,k)-1,N=Math.min(32767,M),V=Math.min(258,k);x<=N&&--O&&U!=T;){if(e[M+L]==e[M+L-x]){for(var $=0;$<V&&e[M+$]==e[M+$-x];++$);if($>L){if(L=$,D=x,$>q)break;var K=Math.min(x,$-2),G=0;for(B=0;B<K;++B){var F=M-x+B&32767,j=F-p[F]&32767;j>G&&(G=j,T=F)}}}x+=(U=T)-(T=p[U])&32767}if(D){y[P++]=268435456|at[L]<<18|nt[D];var W=31&at[L],H=31&nt[D];b+=Xe[W]+Ye[H],++S[257+W],++w[H],E=M+L,++I}else y[P++]=e[M],++S[e[M]]}}for(M=Math.max(M,E);M<s;++M)y[P++]=e[M],++S[e[M]];l=It(e,u,c,y,S,w,b,P,C,M-C,l),c||(n.r=7&l|u[l/8|0]<<3,l-=7,n.h=v,n.p=p,n.i=M,n.w=E)}else{for(M=n.w||0;M<s+c;M+=65535){var z=M+65535;z>=s&&(u[l/8|0]=c,z=s),l=wt(u,l+1,e.subarray(M,z))}n.i=s}return pt(o,0,r+ft(l)+a)}(e,null==t.level?6:t.level,null==t.mem?a.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,i,r,a)},Ct=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8};function Rt(e,t){t||(t={});var i=function(){var e=-1;return{p:function(t){for(var i=e,r=0;r<t.length;++r)i=Pt[255&i^t[r]]^i>>>8;e=i},d:function(){return~e}}}(),r=e.length;i.p(e);var a,n=Et(e,t,10+((a=t).filename?a.filename.length+1:0),8),s=n.length;return function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&Ct(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var r=0;r<=i.length;++r)e[r+10]=i.charCodeAt(r)}}(n,t),Ct(n,s-8,i.d()),Ct(n,s-4,r),n}var Ut="undefined"!=typeof TextEncoder&&new TextEncoder,Tt="undefined"!=typeof TextDecoder&&new TextDecoder;try{Tt.decode(Mt,{stream:!0})}catch(e){}var kt,Bt="text/plain";!function(e){e.GZipJS="gzip-js",e.None="none"}(kt||(kt={}));var Lt=e=>{var{data:t,compression:i}=e;if(t){var r=(e=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t))(t),a=new Blob([r]).size;if(i===kt.GZipJS&&a>=1024)try{var n=Rt(function(e,t){if(Ut)return Ut.encode(e);for(var i=e.length,r=new Je(e.length+(e.length>>1)),a=0,n=function(e){r[a++]=e},s=0;s<i;++s){if(a+5>r.length){var o=new Je(a+8+(i-s<<1));o.set(r),r=o}var u=e.charCodeAt(s);u<128||t?n(u):u<2048?(n(192|u>>6),n(128|63&u)):u>55295&&u<57344?(n(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++s))>>18),n(128|u>>12&63),n(128|u>>6&63),n(128|63&u)):(n(224|u>>12),n(128|u>>6&63),n(128|63&u))}return pt(r,0,a)}(r),{mtime:0}),s=new Blob([n],{type:Bt});if(s.size<.95*a)return{contentType:Bt,body:s,estimatedSize:s.size}}catch(e){}return{contentType:"application/json",body:r,estimatedSize:a}}},Dt=[{name:"fetch",available:"undefined"!=typeof fetch,method:e=>{var r=Lt(e);if(r){var{contentType:a,body:n,estimatedSize:s}=r,o=i({"Content-Type":a},e.headers||{});a===Bt&&e.compression===kt.GZipJS&&(o["Content-Encoding"]="gzip");var u=new AbortController,c=e.timeout?setTimeout(()=>u.abort(),e.timeout):null;fetch(e.url,{method:e.method||"POST",headers:o,body:n,keepalive:s<52428.8,signal:u.signal}).then(function(){var i=t(function*(t){var i,r=yield t.text(),a={statusCode:t.status,text:r};if(200===t.status)try{a.json=JSON.parse(r)}catch(e){}null===(i=e.callback)||void 0===i||i.call(e,a)});return function(e){return i.apply(this,arguments)}}()).catch(()=>{var t;null===(t=e.callback)||void 0===t||t.call(e,{statusCode:0})}).finally(()=>{c&&clearTimeout(c)})}}},{name:"XHR",available:"undefined"!=typeof XMLHttpRequest,method:e=>{var t=new XMLHttpRequest;t.open(e.method||"POST",e.url,!0);var i=Lt(e);if(i){var{contentType:r,body:a}=i;e.headers&&Object.entries(e.headers).forEach(e=>{var[i,r]=e;t.setRequestHeader(i,r)}),t.setRequestHeader("Content-Type",r),r===Bt&&e.compression===kt.GZipJS&&t.setRequestHeader("Content-Encoding","gzip"),e.timeout&&(t.timeout=e.timeout),t.onreadystatechange=()=>{var i;if(4===t.readyState){var r={statusCode:t.status,text:t.responseText};if(200===t.status)try{r.json=JSON.parse(t.responseText)}catch(e){}null===(i=e.callback)||void 0===i||i.call(e,r)}},t.onerror=()=>{var t;null===(t=e.callback)||void 0===t||t.call(e,{statusCode:0})},t.send(a)}}},{name:"sendBeacon",available:"undefined"!=typeof navigator&&!!navigator.sendBeacon,method:e=>{var t=Lt(e);if(t){var{contentType:i,body:r}=t;try{var a="string"==typeof r?new Blob([r],{type:i}):r,n=e.compression===kt.GZipJS&&i===Bt?e.url+(e.url.includes("?")?"&":"?")+"compression=gzip-js":e.url;navigator.sendBeacon(n,a)}catch(e){}}}}],Ot=e=>{var t,i=e.transport||"fetch",r=Dt.find(e=>e.name===i&&e.available)||Dt.find(e=>e.available);if(!r)return console.error("vTilt: No available transport method"),void(null===(t=e.callback)||void 0===t||t.call(e,{statusCode:0}));r.method(e)};class xt{constructor(e,t){var i,r,a,n;this._isPaused=!0,this._queue=[],this._flushTimeoutMs=(i=(null==t?void 0:t.flush_interval_ms)||3e3,r=250,a=5e3,n=3e3,"number"!=typeof i||isNaN(i)?n:Math.min(Math.max(i,r),a)),this._sendRequest=e}get length(){return this._queue.length}enqueue(e){this._queue.push(e),this._flushTimeout||this._setFlushTimeout()}unload(){if(this._clearFlushTimeout(),0!==this._queue.length){var e=this._formatQueue();for(var t in e){var r=e[t];this._sendRequest(i({},r,{transport:"sendBeacon"}))}}}enable(){this._isPaused=!1,this._setFlushTimeout()}pause(){this._isPaused=!0,this._clearFlushTimeout()}flush(){this._clearFlushTimeout(),this._flushNow(),this._setFlushTimeout()}_setFlushTimeout(){this._isPaused||(this._flushTimeout=setTimeout(()=>{this._clearFlushTimeout(),this._flushNow(),this._queue.length>0&&this._setFlushTimeout()},this._flushTimeoutMs))}_clearFlushTimeout(){this._flushTimeout&&(clearTimeout(this._flushTimeout),this._flushTimeout=void 0)}_flushNow(){if(0!==this._queue.length){var e=this._formatQueue(),t=Date.now();for(var i in e){var r=e[i];r.events.forEach(e=>{var i=new Date(e.timestamp).getTime();e.$offset=Math.abs(i-t)}),this._sendRequest(r)}}}_formatQueue(){var e={};return this._queue.forEach(t=>{var i=t.batchKey||t.url;e[i]||(e[i]={url:t.url,events:[],batchKey:t.batchKey}),e[i].events.push(t.event)}),this._queue=[],e}}class qt{constructor(e){this._isPolling=!1,this._pollIntervalMs=3e3,this._queue=[],this._areWeOnline=!0,this._sendRequest=e.sendRequest,this._sendBeacon=e.sendBeacon,w&&void 0!==b&&"onLine"in b&&(this._areWeOnline=b.onLine,_(w,"online",()=>{this._areWeOnline=!0,this._flush()}),_(w,"offline",()=>{this._areWeOnline=!1}))}get length(){return this._queue.length}enqueue(e,t){if(void 0===t&&(t=0),t>=10)console.warn("VTilt: Request failed after 10 retries, giving up");else{var i=function(e){var t=3e3*Math.pow(2,e),i=t/2,r=Math.min(18e5,t),a=(Math.random()-.5)*(r-i);return Math.ceil(r+a)}(t),r=Date.now()+i;this._queue.push({retryAt:r,request:e,retriesPerformedSoFar:t+1});var a="VTilt: Enqueued failed request for retry in "+Math.round(i/1e3)+"s";this._areWeOnline||(a+=" (Browser is offline)"),console.warn(a),this._isPolling||(this._isPolling=!0,this._poll())}}retriableRequest(e){var i=this;return t(function*(){try{var t=yield i._sendRequest(e);200!==t.statusCode&&(t.statusCode<400||t.statusCode>=500)&&i.enqueue(e,0)}catch(t){i.enqueue(e,0)}})()}_poll(){this._poller&&clearTimeout(this._poller),this._poller=setTimeout(()=>{this._areWeOnline&&this._queue.length>0&&this._flush(),this._queue.length>0?this._poll():this._isPolling=!1},this._pollIntervalMs)}_flush(){var e=this,i=Date.now(),r=[],a=[];this._queue.forEach(e=>{e.retryAt<i?a.push(e):r.push(e)}),this._queue=r,a.forEach(function(){var i=t(function*(t){var{request:i,retriesPerformedSoFar:r}=t;try{var a=yield e._sendRequest(i);200!==a.statusCode&&(a.statusCode<400||a.statusCode>=500)&&e.enqueue(i,r)}catch(t){e.enqueue(i,r)}});return function(e){return i.apply(this,arguments)}}())}unload(){this._poller&&(clearTimeout(this._poller),this._poller=void 0),this._queue.forEach(e=>{var{request:t}=e;try{this._sendBeacon(t)}catch(e){console.error("VTilt: Failed to send beacon on unload",e)}}),this._queue=[]}}var Nt="vt_rate_limit";class Vt{constructor(e){var t,i;void 0===e&&(e={}),this.lastEventRateLimited=!1,this.eventsPerSecond=null!==(t=e.eventsPerSecond)&&void 0!==t?t:10,this.eventsBurstLimit=Math.max(null!==(i=e.eventsBurstLimit)&&void 0!==i?i:10*this.eventsPerSecond,this.eventsPerSecond),this.persistence=e.persistence,this.captureWarning=e.captureWarning,this.lastEventRateLimited=this.checkRateLimit(!0).isRateLimited}checkRateLimit(e){var t,i,r,a;void 0===e&&(e=!1);var n=Date.now(),s=null!==(i=null===(t=this.persistence)||void 0===t?void 0:t.get(Nt))&&void 0!==i?i:{tokens:this.eventsBurstLimit,last:n},o=(n-s.last)/1e3;s.tokens+=o*this.eventsPerSecond,s.last=n,s.tokens>this.eventsBurstLimit&&(s.tokens=this.eventsBurstLimit);var u=s.tokens<1;return u||e||(s.tokens=Math.max(0,s.tokens-1)),!u||this.lastEventRateLimited||e||null===(r=this.captureWarning)||void 0===r||r.call(this,"vTilt client rate limited. Config: "+this.eventsPerSecond+" events/second, "+this.eventsBurstLimit+" burst limit."),this.lastEventRateLimited=u,null===(a=this.persistence)||void 0===a||a.set(Nt,s),{isRateLimited:u,remainingTokens:s.tokens}}shouldAllowEvent(){return!this.checkRateLimit(!1).isRateLimited}getRemainingTokens(){return this.checkRateLimit(!0).remainingTokens}}var $t=Array.isArray;class Kt{constructor(e){void 0===e&&(e={}),this.__loaded=!1,this._initialPageviewCaptured=!1,this._visibilityStateListener=null,this.__request_queue=[],this._hasWarnedAboutConfig=!1,this._setOncePropertiesSent=!1,this.configManager=new r(e);var t=this.configManager.getConfig(),i=t.domain;!i&&P&&(i=this.getCurrentDomain()),this.sessionManager=new T(t.storage||"cookie",i),this.userManager=new je(t.persistence||"localStorage",i),this.webVitalsManager=new We(t,this),this.rateLimiter=new Vt({eventsPerSecond:10,eventsBurstLimit:100,captureWarning:e=>{this._captureInternal("$$client_ingestion_warning",{$$client_ingestion_warning_message:e})}}),this.retryQueue=new qt({sendRequest:e=>this._sendHttpRequest(e),sendBeacon:e=>this._sendBeaconRequest(e)}),this.requestQueue=new xt(e=>this._sendBatchedRequest(e),{flush_interval_ms:3e3})}init(e,t,i){var r;if(i&&i!==Ft){var a=null!==(r=Gt[i])&&void 0!==r?r:new Kt;return a._init(e,t,i),Gt[i]=a,Gt[Ft][i]=a,a}return this._init(e,t,i)}_init(e,t,r){if(void 0===t&&(t={}),this.__loaded)return console.warn("vTilt: You have already initialized vTilt! Re-initializing is a no-op"),this;this.updateConfig(i({},t,{projectId:e||t.projectId,name:r})),this.__loaded=!0;var a=this.configManager.getConfig();return this.userManager.set_initial_person_info(a.mask_personal_data_properties,a.custom_personal_data_properties),this.historyAutocapture=new ze(this),this.historyAutocapture.startIfEnabled(),this._setupUnloadHandler(),this._captureInitialPageview(),this}_setupUnloadHandler(){if(w){var e=()=>{this.requestQueue.unload(),this.retryQueue.unload()};_(w,"beforeunload",e),_(w,"pagehide",e)}}toString(){var e,t=null!==(e=this.configManager.getConfig().name)&&void 0!==e?e:Ft;return t!==Ft&&(t=Ft+"."+t),t}getCurrentDomain(){if(!P)return"";var e=P.protocol,t=P.hostname,i=P.port;return e+"//"+t+(i?":"+i:"")}_isConfigured(){var e=this.configManager.getConfig();return!(!e.projectId||!e.token)||(this._hasWarnedAboutConfig||(console.warn("VTilt: projectId and token are required for tracking. Events will be skipped until init() or updateConfig() is called with these fields."),this._hasWarnedAboutConfig=!0),!1)}buildUrl(){var e=this.configManager.getConfig(),{proxyUrl:t,proxy:i,host:r,token:a}=e;return t||(i?i+"/api/tracking?token="+a:r?r.replace(/\/+$/gm,"")+"/api/tracking?token="+a:"/api/tracking?token="+a)}sendRequest(e,t,i){if(this._isConfigured()){if(i&&void 0!==w)if(w.__VTILT_ENQUEUE_REQUESTS)return void this.__request_queue.push({url:e,event:t});this.requestQueue.enqueue({url:e,event:t})}}_sendBatchedRequest(e){var{transport:t}=e;"sendBeacon"!==t?this.retryQueue.retriableRequest(e):this._sendBeaconRequest(e)}_sendHttpRequest(e){return new Promise(t=>{var{url:i,events:r}=e,a=1===r.length?r[0]:{events:r},n=this.configManager.getConfig().disable_compression?kt.None:kt.GZipJS;Ot({url:i,data:a,method:"POST",transport:"XHR",compression:n,callback:e=>{t({statusCode:e.statusCode})}})})}_sendBeaconRequest(e){var{url:t,events:i}=e,r=1===i.length?i[0]:{events:i},a=this.configManager.getConfig().disable_compression?kt.None:kt.GZipJS;Ot({url:t,data:r,method:"POST",transport:"sendBeacon",compression:a})}_send_retriable_request(e){this.sendRequest(e.url,e.event,!1)}capture(e,t,r){if(this.sessionManager.setSessionId(),b&&b.userAgent&&function(e){return!(e&&"string"==typeof e&&e.length>500)}(b.userAgent)&&((null==r?void 0:r.skip_client_rate_limiting)||this.rateLimiter.shouldAllowEvent())){var a=this.buildUrl(),n=Fe(),s=this.userManager.getUserProperties(),o=this.userManager.get_initial_props(),u=this.sessionManager.getSessionId(),c=this.sessionManager.getWindowId(),l=this.userManager.getAnonymousId(),d={};!this._setOncePropertiesSent&&Object.keys(o).length>0&&Object.assign(d,o),t.$set_once&&Object.assign(d,t.$set_once);var h=i({},n,s,{$session_id:u,$window_id:c},l?{$anon_distinct_id:l}:{},Object.keys(d).length>0?{$set_once:d}:{},t.$set?{$set:t.$set}:{},t);!this._setOncePropertiesSent&&Object.keys(o).length>0&&(this._setOncePropertiesSent=!0),"$pageview"===e&&M&&(h.title=M.title);var g,f,p=this.configManager.getConfig();if(!1!==p.stringifyPayload){if(g=Object.assign({},h,p.globalAttributes),!m(g=JSON.stringify(g)))return}else if(g=Object.assign({},h,p.globalAttributes),!m(JSON.stringify(g)))return;f="$identify"===e?this.userManager.getAnonymousId():this.userManager.getDistinctId()||this.userManager.getAnonymousId();var v={timestamp:(new Date).toISOString(),event:e,project_id:p.projectId||"",domain:p.domain||this.getCurrentDomain(),payload:g,distinct_id:f,anonymous_id:l};this.sendRequest(a,v,!0)}}_captureInternal(e,t){this.capture(e,t,{skip_client_rate_limiting:!0})}trackEvent(e,t){void 0===t&&(t={}),this.capture(e,t)}identify(e,t,i){if("number"==typeof e&&(e=String(e),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),e)if(this.userManager.isDistinctIdStringLikePublic(e))console.error('The string "'+e+'" was set in vTilt.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if("COOKIELESS_SENTINEL_VALUE"!==e){var r=this.userManager.getDistinctId(),a=this.userManager.getAnonymousId(),n=this.userManager.getDeviceId(),s="anonymous"===this.userManager.getUserState();if(!n){var o=r||a;this.userManager.ensureDeviceId(o)}e!==r&&s?(this.userManager.setUserState("identified"),this.userManager.updateUserProperties(t,i),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r||a,$set:t||{},$set_once:i||{}}),this.userManager.setDistinctId(e)):t||i?(s&&this.userManager.setUserState("identified"),this.userManager.updateUserProperties(t,i),this.capture("$set",{$set:t||{},$set_once:i||{}})):e!==r&&(this.userManager.setUserState("identified"),this.userManager.setDistinctId(e))}else console.error('The string "'+e+'" was set in vTilt.identify which indicates an error. This ID is only used as a sentinel value.');else console.error("Unique user id has not been set in vTilt.identify")}setUserProperties(e,t){this.userManager.setUserProperties(e,t)&&this.capture("$set",{$set:e||{},$set_once:t||{}})}resetUser(e){this.sessionManager.resetSessionId(),this.userManager.reset(e)}getUserIdentity(){return this.userManager.getUserIdentity()}getDeviceId(){return this.userManager.getDeviceId()}getUserState(){return this.userManager.getUserState()}createAlias(e,t){var i=this.userManager.createAlias(e,t);i?this.capture("$alias",{$original_id:i.original,$alias_id:i.distinct_id}):e===(t||this.userManager.getDistinctId()||this.userManager.getAnonymousId())&&this.identify(e)}_captureInitialPageview(){M&&("visible"===M.visibilityState?this._initialPageviewCaptured||(this._initialPageviewCaptured=!0,setTimeout(()=>{if(M&&P){this.capture("$pageview",{navigation_type:"initial_load"})}},300),this._visibilityStateListener&&(M.removeEventListener("visibilitychange",this._visibilityStateListener),this._visibilityStateListener=null)):this._visibilityStateListener||(this._visibilityStateListener=()=>{this._captureInitialPageview()},_(M,"visibilitychange",this._visibilityStateListener)))}getConfig(){return this.configManager.getConfig()}getSessionId(){return this.sessionManager.getSessionId()}updateConfig(e){this.configManager.updateConfig(e);var t=this.configManager.getConfig(),i=t.domain;!i&&P&&(i=this.getCurrentDomain()),this.sessionManager=new T(t.storage||"cookie",i),this.userManager=new je(t.persistence||"localStorage",i),this.webVitalsManager=new We(t,this)}_execute_array(e){Array.isArray(e)&&e.forEach(e=>{if(e&&Array.isArray(e)&&e.length>0){var t=e[0],i=e.slice(1);if("function"==typeof this[t])try{this[t](...i)}catch(e){console.error("vTilt: Error executing queued call "+t+":",e)}}})}_dom_loaded(){this.requestQueue.enable(),this.__request_queue.forEach(e=>{this._send_retriable_request(e)}),this.__request_queue=[]}}var Gt={},Ft="vt",jt=!(void 0!==C||void 0!==E)&&-1===(null==R?void 0:R.indexOf("MSIE"))&&-1===(null==R?void 0:R.indexOf("Mozilla"));w&&(w.__VTILT_ENQUEUE_REQUESTS=jt);var Wt,Ht;Wt=Gt[Ft]=new Kt,(Ht=U.vt)&&A(Ht._i,function(e){if(e&&$t(e)){var t=Wt.init(e[0],e[1],e[2]),i=Ht[e[2]||"vt"]||Ht;t&&t._execute_array(i)}}),U.vt=Wt,function(){function e(){e.done||(e.done=!0,jt=!1,void 0!==w&&(w.__VTILT_ENQUEUE_REQUESTS=!1),A(Gt,function(e){e._dom_loaded()}))}M&&"function"==typeof M.addEventListener?"complete"===M.readyState?e():_(M,"DOMContentLoaded",e,{capture:!1}):w&&console.error("Browser doesn't support `document.addEventListener` so vTilt couldn't be initialized")}()}();
2
2
  //# sourceMappingURL=array.no-external.js.map