@v-tilt/browser 1.2.0 → 1.3.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 (41) hide show
  1. package/dist/all-external-dependencies.js +2 -0
  2. package/dist/all-external-dependencies.js.map +1 -0
  3. package/dist/array.full.js +2 -0
  4. package/dist/array.full.js.map +1 -0
  5. package/dist/array.js +1 -1
  6. package/dist/array.js.map +1 -1
  7. package/dist/array.no-external.js +1 -1
  8. package/dist/array.no-external.js.map +1 -1
  9. package/dist/entrypoints/all-external-dependencies.d.ts +8 -0
  10. package/dist/entrypoints/array.full.d.ts +17 -0
  11. package/dist/entrypoints/web-vitals.d.ts +14 -0
  12. package/dist/external-scripts-loader.js +1 -1
  13. package/dist/external-scripts-loader.js.map +1 -1
  14. package/dist/main.js +1 -1
  15. package/dist/main.js.map +1 -1
  16. package/dist/module.d.ts +34 -4
  17. package/dist/module.js +1 -1
  18. package/dist/module.js.map +1 -1
  19. package/dist/module.no-external.d.ts +34 -4
  20. package/dist/module.no-external.js +1 -1
  21. package/dist/module.no-external.js.map +1 -1
  22. package/dist/recorder.js.map +1 -1
  23. package/dist/types.d.ts +32 -2
  24. package/dist/utils/globals.d.ts +27 -0
  25. package/dist/web-vitals.d.ts +89 -5
  26. package/dist/web-vitals.js +2 -0
  27. package/dist/web-vitals.js.map +1 -0
  28. package/lib/config.js +5 -3
  29. package/lib/entrypoints/all-external-dependencies.d.ts +8 -0
  30. package/lib/entrypoints/all-external-dependencies.js +10 -0
  31. package/lib/entrypoints/array.full.d.ts +17 -0
  32. package/lib/entrypoints/array.full.js +19 -0
  33. package/lib/entrypoints/external-scripts-loader.js +1 -1
  34. package/lib/entrypoints/web-vitals.d.ts +14 -0
  35. package/lib/entrypoints/web-vitals.js +29 -0
  36. package/lib/types.d.ts +32 -2
  37. package/lib/types.js +16 -0
  38. package/lib/utils/globals.d.ts +27 -0
  39. package/lib/web-vitals.d.ts +89 -5
  40. package/lib/web-vitals.js +354 -46
  41. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ /**
2
+ * All External Dependencies
3
+ *
4
+ * This file imports all external dependency entrypoints.
5
+ * Used by array.full.ts for the full bundle that includes everything.
6
+ */
7
+ import "./recorder";
8
+ import "./web-vitals";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Full Bundle Entrypoint
3
+ *
4
+ * Same as array.ts but includes all external dependencies bundled in.
5
+ * This is useful for users who want a single script tag without lazy loading.
6
+ *
7
+ * Usage:
8
+ * <script src="https://cdn.example.com/dist/array.full.js"></script>
9
+ *
10
+ * This bundle includes:
11
+ * - Core SDK (array.no-external.ts)
12
+ * - External scripts loader
13
+ * - Session recording (rrweb)
14
+ * - Web Vitals tracking
15
+ */
16
+ import "./all-external-dependencies";
17
+ import "./array";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Web Vitals Extension Entrypoint
3
+ *
4
+ * This file imports the web-vitals library and registers its callbacks
5
+ * on the global __VTiltExtensions__ object. The main SDK checks for these
6
+ * callbacks and uses them if available.
7
+ *
8
+ * Usage:
9
+ * - Include this entrypoint in the full bundle (array.full.ts)
10
+ * - Or load it dynamically via loadExternalDependency('web-vitals', callback)
11
+ */
12
+ import { WebVitalsCallbacks } from "../utils/globals";
13
+ declare const vtiltWebVitalsCallbacks: WebVitalsCallbacks;
14
+ export default vtiltWebVitalsCallbacks;
@@ -1,2 +1,2 @@
1
- !function(n){"use strict";var i="undefined"!=typeof window?window:void 0,l="undefined"!=typeof globalThis?globalThis:i,r=null==l?void 0:l.navigator,o=null==l?void 0:l.document;null==l||l.location,null==l||l.fetch,(null==l?void 0:l.XMLHttpRequest)&&"withCredentials"in new l.XMLHttpRequest&&l.XMLHttpRequest,null==l||l.AbortController,null==r||r.userAgent;var t=null!=i?i:{},d=(n,i,l)=>{if(n.getConfig().disable_external_dependency_loading)return console.warn("[ExternalScriptsLoader] "+i+" was requested but loading of external scripts is disabled."),l("Loading of external scripts is disabled");var r=null==o?void 0:o.querySelectorAll("script");if(r)for(var t,d=function(){if(r[e].src===i){var n=r[e];return n.__vtilt_loading_callback_fired?{v:l()}:(n.addEventListener("load",i=>{n.__vtilt_loading_callback_fired=!0,l(void 0,i)}),n.onerror=n=>l(n),{v:void 0})}},e=0;e<r.length;e++)if(t=d())return t.v;var a=()=>{var n;if(!o)return l("document not found");var r=o.createElement("script");r.type="text/javascript",r.crossOrigin="anonymous",r.src=i,r.onload=n=>{r.__vtilt_loading_callback_fired=!0,l(void 0,n)},r.onerror=n=>l(n);var t=o.querySelectorAll("body > script");t.length>0?null===(n=t[0].parentNode)||void 0===n||n.insertBefore(r,t[0]):o.body.appendChild(r)};(null==o?void 0:o.body)?a():null==o||o.addEventListener("DOMContentLoaded",a)},e=(n,i)=>{var l=n.getConfig();return l.script_host?l.script_host.replace(/\/+$/gm,"")+"/dist/"+i+".js":"https://unpkg.com/@v-tilt/browser@1.1.5/dist/"+i+".js"};t.__VTiltExtensions__=t.__VTiltExtensions__||{},t.__VTiltExtensions__.loadExternalDependency=(n,i,l)=>{var r=e(n,i);d(n,r,l)},n.getExtensionUrl=e,n.loadScript=d}({});
1
+ !function(n){"use strict";var i="undefined"!=typeof window?window:void 0,l="undefined"!=typeof globalThis?globalThis:i,r=null==l?void 0:l.navigator,o=null==l?void 0:l.document;null==l||l.location,null==l||l.fetch,(null==l?void 0:l.XMLHttpRequest)&&"withCredentials"in new l.XMLHttpRequest&&l.XMLHttpRequest,null==l||l.AbortController,null==r||r.userAgent;var t=null!=i?i:{},d=(n,i,l)=>{if(n.getConfig().disable_external_dependency_loading)return console.warn("[ExternalScriptsLoader] "+i+" was requested but loading of external scripts is disabled."),l("Loading of external scripts is disabled");var r=null==o?void 0:o.querySelectorAll("script");if(r)for(var t,d=function(){if(r[e].src===i){var n=r[e];return n.__vtilt_loading_callback_fired?{v:l()}:(n.addEventListener("load",i=>{n.__vtilt_loading_callback_fired=!0,l(void 0,i)}),n.onerror=n=>l(n),{v:void 0})}},e=0;e<r.length;e++)if(t=d())return t.v;var a=()=>{var n;if(!o)return l("document not found");var r=o.createElement("script");r.type="text/javascript",r.crossOrigin="anonymous",r.src=i,r.onload=n=>{r.__vtilt_loading_callback_fired=!0,l(void 0,n)},r.onerror=n=>l(n);var t=o.querySelectorAll("body > script");t.length>0?null===(n=t[0].parentNode)||void 0===n||n.insertBefore(r,t[0]):o.body.appendChild(r)};(null==o?void 0:o.body)?a():null==o||o.addEventListener("DOMContentLoaded",a)},e=(n,i)=>{var l=n.getConfig();return l.script_host?l.script_host.replace(/\/+$/gm,"")+"/dist/"+i+".js":"https://unpkg.com/@v-tilt/browser@1.3.0/dist/"+i+".js"};t.__VTiltExtensions__=t.__VTiltExtensions__||{},t.__VTiltExtensions__.loadExternalDependency=(n,i,l)=>{var r=e(n,i);d(n,r,l)},n.getExtensionUrl=e,n.loadScript=d}({});
2
2
  //# sourceMappingURL=external-scripts-loader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"external-scripts-loader.js","sources":["../src/utils/globals.ts","../src/entrypoints/external-scripts-loader.ts"],"sourcesContent":[null,null],"names":["win","window","undefined","global","globalThis","navigator","document","location","fetch","XMLHttpRequest","AbortController","userAgent","assignableWindow","loadScript","vtilt","url","callback","getConfig","disable_external_dependency_loading","console","warn","LOGGER_PREFIX","existingScripts","querySelectorAll","_ret","_loop","i","src","alreadyExistingScriptTag","__vtilt_loading_callback_fired","v","addEventListener","event","onerror","error","length","addScript","scriptTag","createElement","type","crossOrigin","onload","scripts","_a","parentNode","insertBefore","body","appendChild","getExtensionUrl","kind","config","script_host","replace","__VTiltExtensions__","loadExternalDependency"],"mappings":"0BAaA,IAAMA,EACc,oBAAXC,OAAyBA,YAASC,EA8DrCC,EACkB,oBAAfC,WAA6BA,WAAaJ,EAMtCK,EAAYF,aAAM,EAANA,EAAQE,UACpBC,EAAWH,aAAM,EAANA,EAAQG,SACRH,SAAAA,EAAQI,SACXJ,SAAAA,EAAQK,OAE3BL,aAAM,EAANA,EAAQM,iBAAkB,oBAAqB,IAAIN,EAAOM,gBACtDN,EAAOM,eAEkBN,SAAAA,EAAQO,gBACdL,SAAAA,EAAWM,UAC7B,IAAMC,EAAqCZ,QAAAA,EAAQ,CAAA,EC1EpDa,EAAaA,CACjBC,EACAC,EACAC,KAKA,GAHeF,EAAMG,YAGDC,oCAIlB,OAHAC,QAAQC,KACHC,2BAAiBN,iEAEfC,EAAS,2CAIlB,IAAMM,EAAkBhB,aAAQ,EAARA,EAAUiB,iBAAiB,UACnD,GAAID,EACF,IADmB,IAuBlBE,EAvBkBC,EAAA,WAEjB,GAAIH,EAAgBI,GAAGC,MAAQZ,EAAK,CAClC,IAAMa,EAA2BN,EAC/BI,GAKF,OAAIE,EAAyBC,+BAC3B,CAAAC,EACOd,MAITY,EAAyBG,iBAAiB,OAASC,IACjDJ,EAAyBC,gCAAiC,EAC1Db,OAASd,EAAW8B,KAEtBJ,EAAyBK,QAAWC,GAAUlB,EAASkB,GAAO,CAAAJ,OAAA,GAGhE,CACF,EAtBSJ,EAAI,EAAGA,EAAIJ,EAAgBa,OAAQT,IAAG,GAAAF,EAAAC,IAAA,OAAAD,EAAAM,EAyBjD,IAAMM,EAAYA,WAChB,IAAK9B,EACH,OAAOU,EAAS,sBAGlB,IAAMqB,EAAY/B,EAASgC,cAAc,UAGzCD,EAAUE,KAAO,kBACjBF,EAAUG,YAAc,YACxBH,EAAUV,IAAMZ,EAChBsB,EAAUI,OAAUT,IAClBK,EAAUR,gCAAiC,EAC3Cb,OAASd,EAAW8B,IAEtBK,EAAUJ,QAAWC,GAAUlB,EAASkB,GAExC,IAAMQ,EAAUpC,EAASiB,iBAAiB,iBACtCmB,EAAQP,OAAS,EACE,QAArBQ,EAAAD,EAAQ,GAAGE,kBAAU,IAAAD,GAAAA,EAAEE,aAAaR,EAAWK,EAAQ,IAEvDpC,EAASwC,KAAKC,YAAYV,KAI1B/B,aAAQ,EAARA,EAAUwC,MACZV,IAEA9B,SAAAA,EAAUyB,iBAAiB,mBAAoBK,IAmB7CY,EAAkBA,CAAClC,EAAcmC,KACrC,IAAMC,EAASpC,EAAMG,YAGrB,OAAIiC,EAAOC,YACSD,EAAOC,YAAYC,QAAQ,SAAU,aAC3BH,EAAI,MAKlC,gDAAgEA,EAAI,OAItErC,EAAiByC,oBACfzC,EAAiByC,qBAAuB,CAAA,EAK1CzC,EAAiByC,oBAAoBC,uBAAyB,CAC5DxC,EACAmC,EACAjC,KAEA,IAAMD,EAAMiC,EAAgBlC,EAAOmC,GACnCpC,EAAWC,EAAOC,EAAKC"}
1
+ {"version":3,"file":"external-scripts-loader.js","sources":["../src/utils/globals.ts","../src/entrypoints/external-scripts-loader.ts"],"sourcesContent":[null,null],"names":["win","window","undefined","global","globalThis","navigator","document","location","fetch","XMLHttpRequest","AbortController","userAgent","assignableWindow","loadScript","vtilt","url","callback","getConfig","disable_external_dependency_loading","console","warn","LOGGER_PREFIX","existingScripts","querySelectorAll","_ret","_loop","i","src","alreadyExistingScriptTag","__vtilt_loading_callback_fired","v","addEventListener","event","onerror","error","length","addScript","scriptTag","createElement","type","crossOrigin","onload","scripts","_a","parentNode","insertBefore","body","appendChild","getExtensionUrl","kind","config","script_host","replace","__VTiltExtensions__","loadExternalDependency"],"mappings":"0BAaA,IAAMA,EACc,oBAAXC,OAAyBA,YAASC,EAiGrCC,EACkB,oBAAfC,WAA6BA,WAAaJ,EAMtCK,EAAYF,aAAM,EAANA,EAAQE,UACpBC,EAAWH,aAAM,EAANA,EAAQG,SACRH,SAAAA,EAAQI,SACXJ,SAAAA,EAAQK,OAE3BL,aAAM,EAANA,EAAQM,iBAAkB,oBAAqB,IAAIN,EAAOM,gBACtDN,EAAOM,eAEkBN,SAAAA,EAAQO,gBACdL,SAAAA,EAAWM,UAC7B,IAAMC,EAAqCZ,QAAAA,EAAQ,CAAA,EC7GpDa,EAAaA,CACjBC,EACAC,EACAC,KAKA,GAHeF,EAAMG,YAGDC,oCAIlB,OAHAC,QAAQC,KACHC,2BAAiBN,iEAEfC,EAAS,2CAIlB,IAAMM,EAAkBhB,aAAQ,EAARA,EAAUiB,iBAAiB,UACnD,GAAID,EACF,IADmB,IAuBlBE,EAvBkBC,EAAA,WAEjB,GAAIH,EAAgBI,GAAGC,MAAQZ,EAAK,CAClC,IAAMa,EAA2BN,EAC/BI,GAKF,OAAIE,EAAyBC,+BAC3B,CAAAC,EACOd,MAITY,EAAyBG,iBAAiB,OAASC,IACjDJ,EAAyBC,gCAAiC,EAC1Db,OAASd,EAAW8B,KAEtBJ,EAAyBK,QAAWC,GAAUlB,EAASkB,GAAO,CAAAJ,OAAA,GAGhE,CACF,EAtBSJ,EAAI,EAAGA,EAAIJ,EAAgBa,OAAQT,IAAG,GAAAF,EAAAC,IAAA,OAAAD,EAAAM,EAyBjD,IAAMM,EAAYA,WAChB,IAAK9B,EACH,OAAOU,EAAS,sBAGlB,IAAMqB,EAAY/B,EAASgC,cAAc,UAGzCD,EAAUE,KAAO,kBACjBF,EAAUG,YAAc,YACxBH,EAAUV,IAAMZ,EAChBsB,EAAUI,OAAUT,IAClBK,EAAUR,gCAAiC,EAC3Cb,OAASd,EAAW8B,IAEtBK,EAAUJ,QAAWC,GAAUlB,EAASkB,GAExC,IAAMQ,EAAUpC,EAASiB,iBAAiB,iBACtCmB,EAAQP,OAAS,EACE,QAArBQ,EAAAD,EAAQ,GAAGE,kBAAU,IAAAD,GAAAA,EAAEE,aAAaR,EAAWK,EAAQ,IAEvDpC,EAASwC,KAAKC,YAAYV,KAI1B/B,aAAQ,EAARA,EAAUwC,MACZV,IAEA9B,SAAAA,EAAUyB,iBAAiB,mBAAoBK,IAmB7CY,EAAkBA,CAAClC,EAAcmC,KACrC,IAAMC,EAASpC,EAAMG,YAGrB,OAAIiC,EAAOC,YACSD,EAAOC,YAAYC,QAAQ,SAAU,aAC3BH,EAAI,MAKlC,gDAAgEA,EAAI,OAItErC,EAAiByC,oBACfzC,EAAiByC,qBAAuB,CAAA,EAK1CzC,EAAiByC,oBAAoBC,uBAAyB,CAC5DxC,EACAmC,EACAjC,KAEA,IAAMD,EAAMiC,EAAgBlC,EAAOmC,GACnCpC,EAAWC,EAAOC,EAAKC"}
package/dist/main.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";function i(i,e,t,r,a,n,s){try{var o=i[n](s),u=o.value}catch(i){return void t(i)}o.done?e(u):Promise.resolve(u).then(r,a)}function e(e){return function(){var t=this,r=arguments;return new Promise(function(a,n){var s=e.apply(t,r);function o(e){i(s,a,n,o,u,"next",e)}function u(e){i(s,a,n,o,u,"throw",e)}o(void 0)})}}function t(){return t=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},t.apply(null,arguments)}Object.defineProperty(exports,"__esModule",{value:!0});class r{constructor(i){void 0===i&&(i={}),this.config=this.parseConfigFromScript(i)}parseConfigFromScript(i){if(!document.currentScript)return t({token:i.token||""},i);var e=document.currentScript,r=t({token:""},i);if(r.api_host=e.getAttribute("data-api-host")||e.getAttribute("data-host")||i.api_host,r.script_host=e.getAttribute("data-script-host")||i.script_host,r.proxy=e.getAttribute("data-proxy")||i.proxy,r.proxyUrl=e.getAttribute("data-proxy-url")||i.proxyUrl,r.token=e.getAttribute("data-token")||i.token||"",r.projectId=e.getAttribute("data-project-id")||i.projectId||"",r.domain=e.getAttribute("data-domain")||i.domain,r.storage=e.getAttribute("data-storage")||i.storage,r.stringifyPayload="false"!==e.getAttribute("data-stringify-payload"),r.capture_performance="true"===e.getAttribute("data-capture-performance")||i.capture_performance,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=t({},i.globalAttributes),Array.from(e.attributes)))a.name.startsWith("data-vt-")&&(r.globalAttributes[a.name.slice(8).replace(/-/g,"_")]=a.value);return r}getConfig(){return t({},this.config)}updateConfig(i){this.config=t({},this.config,i)}}var a="__vt_session",n="__vt_window_id",s="__vt_primary_window",o="__vt_user_state",u="__vt_device_id",c="__vt_anonymous_id",l="__vt_distinct_id",h="__vt_user_properties",d="localStorage",v="localStorage+cookie",f="sessionStorage",A="memory",m="$initial_person_info",p={"Europe/Andorra":"AD","Asia/Dubai":"AE","Asia/Kabul":"AF","America/Antigua":"AG","America/Anguilla":"AI","Europe/Tirane":"AL","Asia/Yerevan":"AM","Africa/Luanda":"AO","Antarctica/Casey":"AQ","Antarctica/Davis":"AQ","Antarctica/DumontDUrville":"AQ","Antarctica/Mawson":"AQ","Antarctica/McMurdo":"AQ","Antarctica/Palmer":"AQ","Antarctica/Rothera":"AQ","Antarctica/Syowa":"AQ","Antarctica/Troll":"AQ","Antarctica/Vostok":"AQ","America/Argentina/Buenos_Aires":"AR","America/Argentina/Catamarca":"AR","America/Argentina/Cordoba":"AR","America/Argentina/Jujuy":"AR","America/Argentina/La_Rioja":"AR","America/Argentina/Mendoza":"AR","America/Argentina/Rio_Gallegos":"AR","America/Argentina/Salta":"AR","America/Argentina/San_Juan":"AR","America/Argentina/San_Luis":"AR","America/Argentina/Tucuman":"AR","America/Argentina/Ushuaia":"AR","Pacific/Pago_Pago":"AS","Europe/Vienna":"AT","Australia/Adelaide":"AU","Australia/Brisbane":"AU","Australia/Broken_Hill":"AU","Australia/Darwin":"AU","Australia/Eucla":"AU","Australia/Hobart":"AU","Australia/Lindeman":"AU","Australia/Lord_Howe":"AU","Australia/Melbourne":"AU","Australia/Perth":"AU","Australia/Sydney":"AU","America/Aruba":"AW","Europe/Mariehamn":"AX","Asia/Baku":"AZ","Europe/Sarajevo":"BA","America/Barbados":"BB","Asia/Dhaka":"BD","Europe/Brussels":"BE","Africa/Ouagadougou":"BF","Europe/Sofia":"BG","Asia/Bahrain":"BH","Africa/Bujumbura":"BI","Africa/Porto-Novo":"BJ","America/St_Barthelemy":"BL","Atlantic/Bermuda":"BM","Asia/Brunei":"BN","America/La_Paz":"BO","America/Kralendijk":"BQ","America/Araguaina":"BR","America/Bahia":"BR","America/Belem":"BR","America/Boa_Vista":"BR","America/Campo_Grande":"BR","America/Cuiaba":"BR","America/Eirunepe":"BR","America/Fortaleza":"BR","America/Maceio":"BR","America/Manaus":"BR","America/Noronha":"BR","America/Porto_Velho":"BR","America/Recife":"BR","America/Rio_Branco":"BR","America/Santarem":"BR","America/Sao_Paulo":"BR","America/Nassau":"BS","Asia/Thimphu":"BT","Africa/Gaborone":"BW","Europe/Minsk":"BY","America/Belize":"BZ","America/Atikokan":"CA","America/Blanc-Sablon":"CA","America/Cambridge_Bay":"CA","America/Creston":"CA","America/Dawson":"CA","America/Dawson_Creek":"CA","America/Edmonton":"CA","America/Fort_Nelson":"CA","America/Glace_Bay":"CA","America/Goose_Bay":"CA","America/Halifax":"CA","America/Inuvik":"CA","America/Iqaluit":"CA","America/Moncton":"CA","America/Nipigon":"CA","America/Pangnirtung":"CA","America/Rainy_River":"CA","America/Rankin_Inlet":"CA","America/Regina":"CA","America/Resolute":"CA","America/St_Johns":"CA","America/Swift_Current":"CA","America/Thunder_Bay":"CA","America/Toronto":"CA","America/Vancouver":"CA","America/Whitehorse":"CA","America/Winnipeg":"CA","America/Yellowknife":"CA","Indian/Cocos":"CC","Africa/Kinshasa":"CD","Africa/Lubumbashi":"CD","Africa/Bangui":"CF","Africa/Brazzaville":"CG","Europe/Zurich":"CH","Africa/Abidjan":"CI","Pacific/Rarotonga":"CK","America/Punta_Arenas":"CL","America/Santiago":"CL","Pacific/Easter":"CL","Africa/Douala":"CM","Asia/Shanghai":"CN","Asia/Urumqi":"CN","America/Bogota":"CO","America/Costa_Rica":"CR","America/Havana":"CU","Atlantic/Cape_Verde":"CV","America/Curacao":"CW","Indian/Christmas":"CX","Asia/Famagusta":"CY","Asia/Nicosia":"CY","Europe/Prague":"CZ","Europe/Berlin":"DE","Europe/Busingen":"DE","Africa/Djibouti":"DJ","Europe/Copenhagen":"DK","America/Dominica":"DM","America/Santo_Domingo":"DO","Africa/Algiers":"DZ","America/Guayaquil":"EC","Pacific/Galapagos":"EC","Europe/Tallinn":"EE","Africa/Cairo":"EG","Africa/El_Aaiun":"EH","Africa/Asmara":"ER","Africa/Ceuta":"ES","Atlantic/Canary":"ES","Europe/Madrid":"ES","Africa/Addis_Ababa":"ET","Europe/Helsinki":"FI","Pacific/Fiji":"FJ","Atlantic/Stanley":"FK","Pacific/Chuuk":"FM","Pacific/Kosrae":"FM","Pacific/Pohnpei":"FM","Atlantic/Faroe":"FO","Europe/Paris":"FR","Africa/Libreville":"GA","Europe/London":"GB","America/Grenada":"GD","Asia/Tbilisi":"GE","America/Cayenne":"GF","Europe/Guernsey":"GG","Africa/Accra":"GH","Europe/Gibraltar":"GI","America/Danmarkshavn":"GL","America/Nuuk":"GL","America/Scoresbysund":"GL","America/Thule":"GL","Africa/Banjul":"GM","Africa/Conakry":"GN","America/Guadeloupe":"GP","Africa/Malabo":"GQ","Europe/Athens":"GR","Atlantic/South_Georgia":"GS","America/Guatemala":"GT","Pacific/Guam":"GU","Africa/Bissau":"GW","America/Guyana":"GY","Asia/Hong_Kong":"HK","America/Tegucigalpa":"HN","Europe/Zagreb":"HR","America/Port-au-Prince":"HT","Europe/Budapest":"HU","Asia/Jakarta":"ID","Asia/Jayapura":"ID","Asia/Makassar":"ID","Asia/Pontianak":"ID","Europe/Dublin":"IE","Asia/Jerusalem":"IL","Europe/Isle_of_Man":"IM","Asia/Kolkata":"IN","Indian/Chagos":"IO","Asia/Baghdad":"IQ","Asia/Tehran":"IR","Atlantic/Reykjavik":"IS","Europe/Rome":"IT","Europe/Jersey":"JE","America/Jamaica":"JM","Asia/Amman":"JO","Asia/Tokyo":"JP","Africa/Nairobi":"KE","Asia/Bishkek":"KG","Asia/Phnom_Penh":"KH","Pacific/Enderbury":"KI","Pacific/Kiritimati":"KI","Pacific/Tarawa":"KI","Indian/Comoro":"KM","America/St_Kitts":"KN","Asia/Pyongyang":"KP","Asia/Seoul":"KR","Asia/Kuwait":"KW","America/Cayman":"KY","Asia/Almaty":"KZ","Asia/Aqtau":"KZ","Asia/Aqtobe":"KZ","Asia/Atyrau":"KZ","Asia/Oral":"KZ","Asia/Qostanay":"KZ","Asia/Qyzylorda":"KZ","Asia/Vientiane":"LA","Asia/Beirut":"LB","America/St_Lucia":"LC","Europe/Vaduz":"LI","Asia/Colombo":"LK","Africa/Monrovia":"LR","Africa/Maseru":"LS","Europe/Vilnius":"LT","Europe/Luxembourg":"LU","Europe/Riga":"LV","Africa/Tripoli":"LY","Africa/Casablanca":"MA","Europe/Monaco":"MC","Europe/Chisinau":"MD","Europe/Podgorica":"ME","America/Marigot":"MF","Indian/Antananarivo":"MG","Pacific/Kwajalein":"MH","Pacific/Majuro":"MH","Europe/Skopje":"MK","Africa/Bamako":"ML","Asia/Yangon":"MM","Asia/Choibalsan":"MN","Asia/Hovd":"MN","Asia/Ulaanbaatar":"MN","Asia/Macau":"MO","Pacific/Saipan":"MP","America/Martinique":"MQ","Africa/Nouakchott":"MR","America/Montserrat":"MS","Europe/Malta":"MT","Indian/Mauritius":"MU","Indian/Maldives":"MV","Africa/Blantyre":"MW","America/Bahia_Banderas":"MX","America/Cancun":"MX","America/Chihuahua":"MX","America/Hermosillo":"MX","America/Matamoros":"MX","America/Mazatlan":"MX","America/Merida":"MX","America/Mexico_City":"MX","America/Monterrey":"MX","America/Ojinaga":"MX","America/Tijuana":"MX","Asia/Kuala_Lumpur":"MY","Asia/Kuching":"MY","Africa/Maputo":"MZ","Africa/Windhoek":"NA","Pacific/Noumea":"NC","Africa/Niamey":"NE","Pacific/Norfolk":"NF","Africa/Lagos":"NG","America/Managua":"NI","Europe/Amsterdam":"NL","Europe/Oslo":"NO","Asia/Kathmandu":"NP","Pacific/Nauru":"NR","Pacific/Niue":"NU","Pacific/Auckland":"NZ","Pacific/Chatham":"NZ","Asia/Muscat":"OM","America/Panama":"PA","America/Lima":"PE","Pacific/Gambier":"PF","Pacific/Marquesas":"PF","Pacific/Tahiti":"PF","Pacific/Bougainville":"PG","Pacific/Port_Moresby":"PG","Asia/Manila":"PH","Asia/Karachi":"PK","Europe/Warsaw":"PL","America/Miquelon":"PM","Pacific/Pitcairn":"PN","America/Puerto_Rico":"PR","Asia/Gaza":"PS","Asia/Hebron":"PS","Atlantic/Azores":"PT","Atlantic/Madeira":"PT","Europe/Lisbon":"PT","Pacific/Palau":"PW","America/Asuncion":"PY","Asia/Qatar":"QA","Indian/Reunion":"RE","Europe/Bucharest":"RO","Europe/Belgrade":"RS","Asia/Anadyr":"RU","Asia/Barnaul":"RU","Asia/Chita":"RU","Asia/Irkutsk":"RU","Asia/Kamchatka":"RU","Asia/Khandyga":"RU","Asia/Krasnoyarsk":"RU","Asia/Magadan":"RU","Asia/Novokuznetsk":"RU","Asia/Novosibirsk":"RU","Asia/Omsk":"RU","Asia/Sakhalin":"RU","Asia/Srednekolymsk":"RU","Asia/Tomsk":"RU","Asia/Ust-Nera":"RU","Asia/Vladivostok":"RU","Asia/Yakutsk":"RU","Asia/Yekaterinburg":"RU","Europe/Astrakhan":"RU","Europe/Kaliningrad":"RU","Europe/Kirov":"RU","Europe/Moscow":"RU","Europe/Samara":"RU","Europe/Saratov":"RU","Europe/Ulyanovsk":"RU","Europe/Volgograd":"RU","Africa/Kigali":"RW","Asia/Riyadh":"SA","Pacific/Guadalcanal":"SB","Indian/Mahe":"SC","Africa/Khartoum":"SD","Europe/Stockholm":"SE","Asia/Singapore":"SG","Atlantic/St_Helena":"SH","Europe/Ljubljana":"SI","Arctic/Longyearbyen":"SJ","Europe/Bratislava":"SK","Africa/Freetown":"SL","Europe/San_Marino":"SM","Africa/Dakar":"SN","Africa/Mogadishu":"SO","America/Paramaribo":"SR","Africa/Juba":"SS","Africa/Sao_Tome":"ST","America/El_Salvador":"SV","America/Lower_Princes":"SX","Asia/Damascus":"SY","Africa/Mbabane":"SZ","America/Grand_Turk":"TC","Africa/Ndjamena":"TD","Indian/Kerguelen":"TF","Africa/Lome":"TG","Asia/Bangkok":"TH","Asia/Dushanbe":"TJ","Pacific/Fakaofo":"TK","Asia/Dili":"TL","Asia/Ashgabat":"TM","Africa/Tunis":"TN","Pacific/Tongatapu":"TO","Europe/Istanbul":"TR","America/Port_of_Spain":"TT","Pacific/Funafuti":"TV","Asia/Taipei":"TW","Africa/Dar_es_Salaam":"TZ","Europe/Kiev":"UA","Europe/Simferopol":"UA","Europe/Uzhgorod":"UA","Europe/Zaporozhye":"UA","Africa/Kampala":"UG","Pacific/Midway":"UM","Pacific/Wake":"UM","America/Adak":"US","America/Anchorage":"US","America/Boise":"US","America/Chicago":"US","America/Denver":"US","America/Detroit":"US","America/Indiana/Indianapolis":"US","America/Indiana/Knox":"US","America/Indiana/Marengo":"US","America/Indiana/Petersburg":"US","America/Indiana/Tell_City":"US","America/Indiana/Vevay":"US","America/Indiana/Vincennes":"US","America/Indiana/Winamac":"US","America/Juneau":"US","America/Kentucky/Louisville":"US","America/Kentucky/Monticello":"US","America/Los_Angeles":"US","America/Menominee":"US","America/Metlakatla":"US","America/New_York":"US","America/Nome":"US","America/North_Dakota/Beulah":"US","America/North_Dakota/Center":"US","America/North_Dakota/New_Salem":"US","America/Phoenix":"US","America/Sitka":"US","America/Yakutat":"US","Pacific/Honolulu":"US","America/Montevideo":"UY","Asia/Samarkand":"UZ","Asia/Tashkent":"UZ","Europe/Vatican":"VA","America/St_Vincent":"VC","America/Caracas":"VE","America/Tortola":"VG","America/St_Thomas":"VI","Asia/Ho_Chi_Minh":"VN","Pacific/Efate":"VU","Pacific/Wallis":"WF","Pacific/Apia":"WS","Asia/Aden":"YE","Indian/Mayotte":"YT","Africa/Johannesburg":"ZA","Africa/Lusaka":"ZM","Africa/Harare":"ZW"};function g(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16))}function _(i){return!(!i||"string"!=typeof i)&&!(i.length<2||i.length>10240)}function S(i,e,t){if(i)if(Array.isArray(i))i.forEach((i,r)=>{e.call(t,i,r)});else for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&e.call(t,i[r],r)}function y(i,e,t,r){var{capture:a=!1,passive:n=!0}=null!=r?r:{};null==i||i.addEventListener(e,t,{capture:a,passive:n})}function w(i,e){if(!e)return i;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);return i}function b(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];for(var a of t)for(var n of a)i.push(n);return i}var M="undefined"!=typeof window?window:void 0,E="undefined"!=typeof globalThis?globalThis:M,R=null==E?void 0:E.navigator,C=null==E?void 0:E.document,P=null==E?void 0:E.location,T=null==E?void 0:E.fetch,k=(null==E?void 0:E.XMLHttpRequest)&&"withCredentials"in new E.XMLHttpRequest?E.XMLHttpRequest:void 0;null==E||E.AbortController;var U=null==R?void 0:R.userAgent,I=null!=M?M:{},B=31536e3,x=["herokuapp.com","vercel.app","netlify.app"];function D(i){var e;if(!i)return"";if("undefined"==typeof document)return"";var t=null===(e=document.location)||void 0===e?void 0:e.hostname;if(!t)return"";var r=t.match(/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i);return r?"."+r[0]:""}class O{constructor(i){var e,t;this.memoryStorage=new Map,this.method=i.method,this.cross_subdomain=null!==(e=i.cross_subdomain)&&void 0!==e?e:function(){var i;if("undefined"==typeof document)return!1;var e=null===(i=document.location)||void 0===i?void 0:i.hostname;if(!e)return!1;var t=e.split(".").slice(-2).join(".");for(var r of x)if(t===r)return!1;return!0}(),this.sameSite=i.sameSite||"Lax",this.secure=null!==(t=i.secure)&&void 0!==t?t:"undefined"!=typeof location&&"https:"===location.protocol}get(i){var e;try{if(this.method===A)return null!==(e=this.memoryStorage.get(i))&&void 0!==e?e:null;if(this.usesLocalStorage()){var t=localStorage.getItem(i);return null!==t?t:this.method===v?this.getCookie(i):null}return this.usesSessionStorage()?sessionStorage.getItem(i):this.getCookie(i)}catch(e){return console.warn('[StorageManager] Failed to get "'+i+'":',e),null}}set(i,e,t){try{if(this.method===A)return void this.memoryStorage.set(i,e);if(this.usesLocalStorage())return localStorage.setItem(i,e),void(this.method===v&&this.setCookie(i,e,t||B));if(this.usesSessionStorage())return void sessionStorage.setItem(i,e);this.setCookie(i,e,t||B)}catch(e){console.warn('[StorageManager] Failed to set "'+i+'":',e)}}remove(i){try{if(this.method===A)return void this.memoryStorage.delete(i);if(this.usesLocalStorage())return localStorage.removeItem(i),void(this.method===v&&this.removeCookie(i));if(this.usesSessionStorage())return void sessionStorage.removeItem(i);this.removeCookie(i)}catch(e){console.warn('[StorageManager] Failed to remove "'+i+'":',e)}}getWithExpiry(i){var e=this.get(i);if(!e)return null;try{var t=JSON.parse(e);return t.expiry&&Date.now()>t.expiry?(this.remove(i),null):t.value}catch(i){return null}}setWithExpiry(i,e,r){var a=t({value:e},r?{expiry:Date.now()+r}:{});this.set(i,JSON.stringify(a))}getJSON(i){var e=this.get(i);if(!e)return null;try{return JSON.parse(e)}catch(i){return null}}setJSON(i,e,t){this.set(i,JSON.stringify(e),t)}getCookie(i){if("undefined"==typeof document)return null;var e=document.cookie.split(";");for(var t of e){var[r,...a]=t.trim().split("=");if(r===i){var n=a.join("=");try{return decodeURIComponent(n)}catch(i){return n}}}return null}setCookie(i,e,t){if("undefined"!=typeof document){var r=i+"="+encodeURIComponent(e);r+="; Max-Age="+t,r+="; path=/",r+="; SameSite="+this.sameSite,this.secure&&(r+="; Secure");var a=D(this.cross_subdomain);a&&(r+="; domain="+a),document.cookie=r}}removeCookie(i){if("undefined"!=typeof document){var e=D(this.cross_subdomain),t=i+"=; Max-Age=0; path=/";e&&(t+="; domain="+e),document.cookie=t,document.cookie=i+"=; Max-Age=0; path=/"}}usesLocalStorage(){return this.method===d||this.method===v}usesSessionStorage(){return this.method===f}canUseSessionStorage(){if(void 0===M||!(null==M?void 0:M.sessionStorage))return!1;try{var i="__vt_storage_test__";return M.sessionStorage.setItem(i,"test"),M.sessionStorage.removeItem(i),!0}catch(i){return!1}}getSessionStorage(){var i;return this.canUseSessionStorage()&&null!==(i=null==M?void 0:M.sessionStorage)&&void 0!==i?i:null}setMethod(i){this.method=i}getMethod(){return this.method}}class N{constructor(i,e){void 0===i&&(i="cookie"),this.storage=new O({method:i,cross_subdomain:e,sameSite:"Lax"}),this.o=void 0,this.v()}getSessionId(){var i=this.A();return i||(i=g(),this.m(i)),i}setSessionId(){var i=this.A()||g();return this.m(i),i}resetSessionId(){this.S(),this.setSessionId(),this.M(g())}A(){return this.storage.get(a)}m(i){this.storage.set(a,i,1800)}S(){this.storage.remove(a)}getWindowId(){if(this.o)return this.o;var i=this.storage.getSessionStorage();if(i){var e=i.getItem(n);if(e)return this.o=e,e}var t=g();return this.M(t),t}M(i){if(i!==this.o){this.o=i;var e=this.storage.getSessionStorage();e&&e.setItem(n,i)}}v(){var i=this.storage.getSessionStorage();if(i){var e=i.getItem(s),t=i.getItem(n);t&&!e?this.o=t:(t&&i.removeItem(n),this.M(g())),i.setItem(s,"true"),this.R()}else this.o=g()}R(){var i=this.storage.getSessionStorage();M&&i&&y(M,"beforeunload",()=>{var i=this.storage.getSessionStorage();i&&i.removeItem(s)},{capture:!1})}updateStorageMethod(i,e){this.storage=new O({method:i,cross_subdomain:e,sameSite:"Lax"})}}function L(i){if(!C)return null;var e=C.createElement("a");return e.href=i,e}function K(i,e){for(var t=((i.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;r<t.length;r++){var a=t[r].split("=");if(a[0]===e){if(a.length<2)return"";var n=a[1];try{n=decodeURIComponent(n)}catch(i){}return n.replace(/\+/g," ")}}return""}function G(i,e,t){if(!i||!e||!e.length)return i;for(var r=i.split("#"),a=r[0]||"",n=r[1],s=a.split("?"),o=s[1],u=s[0],c=(o||"").split("&"),l=[],h=0;h<c.length;h++){var d=c[h].split("="),v=d[0],f=d.slice(1).join("=");-1!==e.indexOf(v)?l.push(v+"="+t):v&&l.push(v+(f?"="+f:""))}var A=l.join("&");return u+(A?"?"+A:"")+(n?"#"+n:"")}function j(i){return"function"==typeof i}var F="Mobile",z="iOS",V="Android",H="Tablet",q=V+" "+H,W="iPad",J="Apple",Z=J+" Watch",X="Safari",Q="BlackBerry",Y="Samsung",ii=Y+"Browser",ei=Y+" Internet",ti="Chrome",ri=ti+" OS",ai=ti+" "+z,ni="Internet Explorer",si=ni+" "+F,oi="Opera",ui=oi+" Mini",ci="Edge",li="Microsoft "+ci,hi="Firefox",di=hi+" "+z,vi="Nintendo",fi="PlayStation",Ai="Xbox",mi=V+" "+F,pi=F+" "+X,gi="Windows",_i=gi+" Phone",Si="Nokia",yi="Ouya",wi="Generic",bi=wi+" "+F.toLowerCase(),Mi=wi+" "+H.toLowerCase(),Ei="Konqueror",Ri="(\\d+(\\.\\d+)?)",Ci=new RegExp("Version/"+Ri),Pi=new RegExp(Ai,"i"),Ti=new RegExp(fi+" \\w+","i"),ki=new RegExp(vi+" \\w+","i"),Ui=new RegExp(Q+"|PlayBook|BB10","i"),Ii={"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 Bi(i,e){return i.toLowerCase().includes(e.toLowerCase())}var xi=(i,e)=>e&&Bi(e,J)||function(i){return Bi(i,X)&&!Bi(i,ti)&&!Bi(i,V)}(i),Di=function(i,e){return e=e||"",Bi(i," OPR/")&&Bi(i,"Mini")?ui:Bi(i," OPR/")?oi:Ui.test(i)?Q:Bi(i,"IE"+F)||Bi(i,"WPDesktop")?si:Bi(i,ii)?ei:Bi(i,ci)||Bi(i,"Edg/")?li:Bi(i,"FBIOS")?"Facebook "+F:Bi(i,"UCWEB")||Bi(i,"UCBrowser")?"UC Browser":Bi(i,"CriOS")?ai:Bi(i,"CrMo")||Bi(i,ti)?ti:Bi(i,V)&&Bi(i,X)?mi:Bi(i,"FxiOS")?di:Bi(i.toLowerCase(),Ei.toLowerCase())?Ei:xi(i,e)?Bi(i,F)?pi:X:Bi(i,hi)?hi:Bi(i,"MSIE")||Bi(i,"Trident/")?ni:Bi(i,"Gecko")?hi:""},Oi={[si]:[new RegExp("rv:"+Ri)],[li]:[new RegExp(ci+"?\\/"+Ri)],[ti]:[new RegExp("("+ti+"|CrMo)\\/"+Ri)],[ai]:[new RegExp("CriOS\\/"+Ri)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Ri)],[X]:[Ci],[pi]:[Ci],[oi]:[new RegExp("(Opera|OPR)\\/"+Ri)],[hi]:[new RegExp(hi+"\\/"+Ri)],[di]:[new RegExp("FxiOS\\/"+Ri)],[Ei]:[new RegExp("Konqueror[:/]?"+Ri,"i")],[Q]:[new RegExp(Q+" "+Ri),Ci],[mi]:[new RegExp("android\\s"+Ri,"i")],[ei]:[new RegExp(ii+"\\/"+Ri)],[ni]:[new RegExp("(rv:|MSIE )"+Ri)],Mozilla:[new RegExp("rv:"+Ri)]},Ni=function(i,e){var t=Di(i,e),r=Oi[t];if(void 0===r)return null;for(var a=0;a<r.length;a++){var n=r[a],s=i.match(n);if(s)return parseFloat(s[s.length-2])}return null},Li=[[new RegExp(Ai+"; "+Ai+" (.*?)[);]","i"),i=>[Ai,i&&i[1]||""]],[new RegExp(vi,"i"),[vi,""]],[new RegExp(fi,"i"),[fi,""]],[Ui,[Q,""]],[new RegExp(gi,"i"),(i,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[_i,""];if(new RegExp(F).test(e)&&!/IEMobile\b/.test(e))return[gi+" "+F,""];var t=/Windows NT ([0-9.]+)/i.exec(e);if(t&&t[1]){var r=t[1],a=Ii[r]||"";return/arm/i.test(e)&&(a="RT"),[gi,a]}return[gi,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,i=>{if(i&&i[3]){var e=[i[3],i[4],i[5]||"0"];return[z,e.join(".")]}return[z,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,i=>{var e="";return i&&i.length>=3&&(e=void 0===i[2]?i[3]:i[2]),["watchOS",e]}],[new RegExp("("+V+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+V+")","i"),i=>{if(i&&i[2]){var e=[i[2],i[3],i[4]||"0"];return[V,e.join(".")]}return[V,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,i=>{var e=["Mac OS X",""];if(i&&i[1]){var t=[i[1],i[2],i[3]||"0"];e[1]=t.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[ri,""]],[/Linux|debian/i,["Linux",""]]],$i=function(i){return ki.test(i)?vi:Ti.test(i)?fi:Pi.test(i)?Ai:new RegExp(yi,"i").test(i)?yi:new RegExp("("+_i+"|WPDesktop)","i").test(i)?_i:/iPad/.test(i)?W:/iPod/.test(i)?"iPod Touch":/iPhone/.test(i)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(i)?Z:Ui.test(i)?Q:/(kobo)\s(ereader|touch)/i.test(i)?"Kobo":new RegExp(Si,"i").test(i)?Si:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(i)||/(kf[a-z]+)( bui|\)).+silk\//i.test(i)?"Kindle Fire":/(Android|ZTE)/i.test(i)?!new RegExp(F).test(i)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(i)?/pixel[\daxl ]{1,6}/i.test(i)&&!/pixel c/i.test(i)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(i)||/lmy47v/i.test(i)&&!/QTAQZ3/i.test(i)?V:q:V:new RegExp("(pda|"+F+")","i").test(i)?bi:new RegExp(H,"i").test(i)&&!new RegExp(H+" pc","i").test(i)?Mi:""},Ki="https?://(.*)",Gi=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],ji=b(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Gi),Fi="<masked>";function zi(i){var e=function(i){return i?0===i.search(Ki+"google.([^/?]*)")?"google":0===i.search(Ki+"bing.com")?"bing":0===i.search(Ki+"yahoo.com")?"yahoo":0===i.search(Ki+"duckduckgo.com")?"duckduckgo":null:null}(i),t="yahoo"!==e?"q":"p",r={};if(null!==e){r.$search_engine=e;var a=C?K(C.referrer,t):"";a.length&&(r.ph_keyword=a)}return r}function Vi(){if("undefined"!=typeof navigator)return navigator.language||navigator.userLanguage}function Hi(){return(null==C?void 0:C.referrer)||"$direct"}function qi(){var i;return(null==C?void 0:C.referrer)&&(null===(i=L(C.referrer))||void 0===i?void 0:i.host)||"$direct"}function Wi(i){var e,{r:t,u:r}=i,a={$referrer:t,$referring_domain:null==t?void 0:"$direct"===t?"$direct":null===(e=L(t))||void 0===e?void 0:e.host};if(r){a.$current_url=r;var n=L(r);a.$host=null==n?void 0:n.host,a.$pathname=null==n?void 0:n.pathname;var s=function(i){var e=ji.concat([]),t={};return S(e,function(e){var r=K(i,e);t[e]=r||null}),t}(r);w(a,s)}t&&w(a,zi(t));return a}function Ji(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(i){return}}function Zi(){try{return(new Date).getTimezoneOffset()}catch(i){return}}function Xi(i,e){if(!U)return{};var t,r,a,[n,s]=function(i){for(var e=0;e<Li.length;e++){var[t,r]=Li[e],a=t.exec(i),n=a&&(j(r)?r(a,i):r);if(n)return n}return["",""]}(U);return w(function(i){var e={};for(var t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var r=i[t];null!=r&&""!==r&&(e[t]=r)}return e}({$os:n,$os_version:s,$browser:Di(U,navigator.vendor),$device:$i(U),$device_type:(r=U,a=$i(r),a===W||a===q||"Kobo"===a||"Kindle Fire"===a||a===Mi?H:a===vi||a===Ai||a===fi||a===yi?"Console":a===Z?"Wearable":a?F:"Desktop"),$timezone:Ji(),$timezone_offset:Zi()}),{$current_url:G(null==P?void 0:P.href,[],Fi),$host:null==P?void 0:P.host,$pathname:null==P?void 0:P.pathname,$raw_user_agent:U.length>1e3?U.substring(0,997)+"...":U,$browser_version:Ni(U,navigator.vendor),$browser_language:Vi(),$browser_language_prefix:(t=Vi(),"string"==typeof t?t.split("-")[0]:void 0),$screen_height:null==M?void 0:M.screen.height,$screen_width:null==M?void 0:M.screen.width,$viewport_height:null==M?void 0:M.innerHeight,$viewport_width:null==M?void 0:M.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 Qi{constructor(i,e){void 0===i&&(i="localStorage"),this.C=null,this.storage=new O({method:i,cross_subdomain:e,sameSite:"Lax"}),this.userIdentity=this.loadUserIdentity()}getUserIdentity(){return t({},this.userIdentity)}getDistinctId(){return this.userIdentity.distinct_id}getAnonymousId(){return this.userIdentity.anonymous_id||(this.userIdentity.anonymous_id=this.generateAnonymousId(),this.storage.set(c,this.userIdentity.anonymous_id,B)),this.userIdentity.anonymous_id}getUserProperties(){return t({},this.userIdentity.properties)}getEffectiveId(){return this.userIdentity.distinct_id||this.getAnonymousId()}getDeviceId(){return this.userIdentity.device_id}getUserState(){return this.userIdentity.user_state}identify(i,e,r){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 a=this.userIdentity.distinct_id;if(this.userIdentity.distinct_id=i,!this.userIdentity.device_id){var n=a||this.userIdentity.anonymous_id;this.userIdentity.device_id=n,this.userIdentity.properties=t({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:n})}i!==a&&(this.userIdentity.distinct_id=i);var s="anonymous"===this.userIdentity.user_state;i!==a&&s?(this.userIdentity.user_state="identified",e&&(this.userIdentity.properties=t({},this.userIdentity.properties,e)),r&&Object.keys(r).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=r[i])}),this.saveUserIdentity()):e||r?("anonymous"===this.userIdentity.user_state&&(this.userIdentity.user_state="identified"),e&&(this.userIdentity.properties=t({},this.userIdentity.properties,e)),r&&Object.keys(r).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=r[i])}),this.saveUserIdentity()):i!==a&&(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,e){if(!i&&!e)return!1;var r=this.userIdentity.distinct_id||this.userIdentity.anonymous_id,a=this.getPersonPropertiesHash(r,i,e);return this.C===a?(console.info("VTilt: A duplicate setUserProperties call was made with the same properties. It has been ignored."),!1):(i&&(this.userIdentity.properties=t({},this.userIdentity.properties,i)),e&&Object.keys(e).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=e[i])}),this.saveUserIdentity(),this.C=a,!0)}reset(i){var e=this.generateAnonymousId(),r=this.userIdentity.device_id,a=i?this.generateDeviceId():r;this.userIdentity={distinct_id:null,anonymous_id:e,device_id:a,properties:{},user_state:"anonymous"},this.C=null,this.saveUserIdentity(),this.userIdentity.properties=t({},this.userIdentity.properties,{$last_vtilt_reset:(new Date).toISOString()}),this.saveUserIdentity()}setDistinctId(i){this.userIdentity.distinct_id=i,this.saveUserIdentity()}setUserState(i){this.userIdentity.user_state=i,this.saveUserIdentity()}updateUserProperties(i,e){i&&(this.userIdentity.properties=t({},this.userIdentity.properties,i)),e&&Object.keys(e).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=e[i])}),this.saveUserIdentity()}ensureDeviceId(i){this.userIdentity.device_id||(this.userIdentity.device_id=i,this.userIdentity.properties=t({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:i}),this.saveUserIdentity())}createAlias(i,e){return this.isValidDistinctId(i)?(void 0===e&&(e=this.getDistinctId()||this.getAnonymousId()),this.isValidDistinctId(e)?i===e?(console.warn("alias matches current distinct_id - should use identify instead"),null):{distinct_id:i,original:e}:(console.warn("Invalid original distinct ID"),null)):(console.warn("Invalid alias provided"),null)}isDistinctIdStringLikePublic(i){return this.isDistinctIdStringLike(i)}set_initial_person_info(i,e){if(!this.getStoredUserProperties()[m]){var t=function(i,e){var t=i?b([],Gi,e||[]):[],r=null==P?void 0:P.href.substring(0,1e3);return{r:Hi().substring(0,1e3),u:r?G(r,t,Fi):void 0}}(i,e);this.register_once({[m]:t},void 0)}}get_initial_props(){var i,e,t=this.getStoredUserProperties()[m];return t?(i=Wi(t),e={},S(i,function(i,t){var r;e["$initial_"+(r=String(t),r.startsWith("$")?r.substring(1):r)]=i}),e):{}}update_referrer_info(){var i={$referrer:Hi(),$referring_domain:qi()};this.register_once(i,void 0)}loadUserIdentity(){var i=this.storage.get(c)||this.generateAnonymousId(),e=this.storage.get(l)||null,t=this.storage.get(u)||this.generateDeviceId(),r=this.getStoredUserProperties(),a=this.storage.get(o)||"anonymous";return{distinct_id:e,anonymous_id:i||this.generateAnonymousId(),device_id:t,properties:r,user_state:a}}saveUserIdentity(){this.storage.set(c,this.userIdentity.anonymous_id,B),this.storage.set(u,this.userIdentity.device_id,B),this.storage.set(o,this.userIdentity.user_state,B),this.userIdentity.distinct_id?this.storage.set(l,this.userIdentity.distinct_id,B):this.storage.remove(l),this.setStoredUserProperties(this.userIdentity.properties)}getStoredUserProperties(){return this.storage.getJSON(h)||{}}setStoredUserProperties(i){this.storage.setJSON(h,i,B)}register_once(i,e){var t=this.getStoredUserProperties(),r=!1;for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(a in t||(t[a]=i[a],r=!0));if(e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(n in t||(t[n]=e[n],r=!0));r&&this.setStoredUserProperties(t)}generateAnonymousId(){return"anon_"+g()}generateDeviceId(){return"device_"+g()}getPersonPropertiesHash(i,e,t){return JSON.stringify({distinct_id:i,userPropertiesToSet:e,userPropertiesToSetOnce:t})}isValidDistinctId(i){if(!i||"string"!=typeof i)return!1;var e=i.toLowerCase().trim();return!["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none"].includes(e)&&0!==i.trim().length}isDistinctIdStringLike(i){if(!i||"string"!=typeof i)return!1;var e=i.toLowerCase().trim();return["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none","demo","example","sample","placeholder"].includes(e)}updateStorageMethod(i,e){this.storage=new O({method:i,cross_subdomain:e,sameSite:"Lax"}),this.userIdentity=this.loadUserIdentity()}}class Yi{constructor(i,e){if(this.instance=e,i.capture_performance&&M)try{this.webVitals=require("web-vitals"),this.initializeWebVitals()}catch(i){console.warn("web-vitals library not found. Please install it to enable web vitals tracking.",i)}}initializeWebVitals(){if(this.webVitals){var i=i=>{try{if(!(M&&C&&R&&P))return;var{country:e,locale:t}=function(){var i,e;if(!R)return{country:i,locale:e};try{var t=Intl.DateTimeFormat().resolvedOptions().timeZone;i=p[t],e=R.languages&&R.languages.length?R.languages[0]:R.userLanguage||R.language||R.browserLanguage||"en"}catch(i){}return{country:i,locale:e}}();this.instance.capture("web_vital",{name:i.name,value:i.value,delta:i.delta,rating:i.rating,id:i.id,navigationType:i.navigationType,pathname:P.pathname,href:P.href,"user-agent":R.userAgent,locale:t,location:e,referrer:C.referrer})}catch(i){console.error("Error sending web vital:",i)}};this.webVitals.onCLS&&this.webVitals.onCLS(i),this.webVitals.onFCP&&this.webVitals.onFCP(i),this.webVitals.onLCP&&this.webVitals.onLCP(i),this.webVitals.onTTFB&&this.webVitals.onTTFB(i),this.webVitals.onINP&&this.webVitals.onINP(i)}}}function ie(i,e,t){try{if(!(e in i))return()=>{};var r=i[e],a=t(r);return j(a)&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__vtilt_wrapped__:{enumerable:!1,value:!0}})),i[e]=a,()=>{i[e]=r}}catch(i){return()=>{}}}class ee{constructor(i){var e;this._instance=i,this.P=(null===(e=null==M?void 0:M.location)||void 0===e?void 0:e.pathname)||""}get isEnabled(){return!0}startIfEnabled(){this.isEnabled&&this.monitorHistoryChanges()}stop(){this.T&&this.T(),this.T=void 0}monitorHistoryChanges(){var i,e;if(M&&P&&(this.P=P.pathname||"",M.history)){var t=this;(null===(i=M.history.pushState)||void 0===i?void 0:i.__vtilt_wrapped__)||ie(M.history,"pushState",i=>function(e,r,a){i.call(this,e,r,a),t.k("pushState")}),(null===(e=M.history.replaceState)||void 0===e?void 0:e.__vtilt_wrapped__)||ie(M.history,"replaceState",i=>function(e,r,a){i.call(this,e,r,a),t.k("replaceState")}),this.U()}}k(i){var e;try{var t=null===(e=null==M?void 0:M.location)||void 0===e?void 0:e.pathname;if(!t||!P||!C)return;if(t!==this.P&&this.isEnabled){var r={navigation_type:i};this._instance.capture("$pageview",r)}this.P=t}catch(e){console.error("Error capturing "+i+" pageview",e)}}U(){if(!this.T&&M){var i=()=>{this.k("popstate")};y(M,"popstate",i),this.T=()=>{M&&M.removeEventListener("popstate",i)}}}}var te="[SessionRecording]";class re{constructor(i,e){void 0===e&&(e={}),this._instance=i,this.I=e}get started(){var i;return!!(null===(i=this.B)||void 0===i?void 0:i.isStarted)}get status(){var i;return(null===(i=this.B)||void 0===i?void 0:i.status)||"lazy_loading"}get sessionId(){var i;return(null===(i=this.B)||void 0===i?void 0:i.sessionId)||""}startIfEnabledOrStop(i){var e;if(!this.D||!(null===(e=this.B)||void 0===e?void 0:e.isStarted)){var t=void 0!==Object.assign&&void 0!==Array.from;this.D&&t?(this.O(i),console.info(te+" starting")):this.stopRecording()}}stopRecording(){var i;null===(i=this.B)||void 0===i||i.stop()}log(i,e){var t;void 0===e&&(e="log"),(null===(t=this.B)||void 0===t?void 0:t.log)?this.B.log(i,e):console.warn(te+" log called before recorder was ready")}updateConfig(i){var e;this.I=t({},this.I,i),null===(e=this.B)||void 0===e||e.updateConfig(this.I)}get D(){var i,e=this._instance.getConfig(),t=null!==(i=this.I.enabled)&&void 0!==i&&i,r=!e.disable_session_recording;return!!M&&t&&r}get N(){return"recorder"}O(i){var e,t,r,a;if(this.D)if((null===(t=null===(e=null==I?void 0:I.__VTiltExtensions__)||void 0===e?void 0:e.rrweb)||void 0===t?void 0:t.record)&&(null===(r=I.__VTiltExtensions__)||void 0===r?void 0:r.initSessionRecording))this.L(i);else{var n=null===(a=I.__VTiltExtensions__)||void 0===a?void 0:a.loadExternalDependency;n?n(this._instance,this.N,e=>{e?console.error(te+" could not load recorder:",e):this.L(i)}):console.error(te+" loadExternalDependency not available. Session recording cannot start.")}}L(i){var e,t=null===(e=I.__VTiltExtensions__)||void 0===e?void 0:e.initSessionRecording;t?(this.B||(this.B=t(this._instance,this.I)),this.B.start(i)):console.error(te+" initSessionRecording not available after script load")}}var ae=(i=>(i[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i))(ae||{}),ne=Uint8Array,se=Uint16Array,oe=Int32Array,ue=new ne([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]),ce=new ne([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]),le=new ne([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),he=function(i,e){for(var t=new se(31),r=0;r<31;++r)t[r]=e+=1<<i[r-1];var a=new oe(t[30]);for(r=1;r<30;++r)for(var n=t[r];n<t[r+1];++n)a[n]=n-t[r]<<5|r;return{b:t,r:a}},de=he(ue,2),ve=de.b,fe=de.r;ve[28]=258,fe[258]=28;for(var Ae=he(ce,0).r,me=new se(32768),pe=0;pe<32768;++pe){var ge=(43690&pe)>>1|(21845&pe)<<1;ge=(61680&(ge=(52428&ge)>>2|(13107&ge)<<2))>>4|(3855&ge)<<4,me[pe]=((65280&ge)>>8|(255&ge)<<8)>>1}var _e=function(i,e,t){for(var r=i.length,a=0,n=new se(e);a<r;++a)i[a]&&++n[i[a]-1];var s,o=new se(e);for(a=1;a<e;++a)o[a]=o[a-1]+n[a-1]<<1;if(t){s=new se(1<<e);var u=15-e;for(a=0;a<r;++a)if(i[a])for(var c=a<<4|i[a],l=e-i[a],h=o[i[a]-1]++<<l,d=h|(1<<l)-1;h<=d;++h)s[me[h]>>u]=c}else for(s=new se(r),a=0;a<r;++a)i[a]&&(s[a]=me[o[i[a]-1]++]>>15-i[a]);return s},Se=new ne(288);for(pe=0;pe<144;++pe)Se[pe]=8;for(pe=144;pe<256;++pe)Se[pe]=9;for(pe=256;pe<280;++pe)Se[pe]=7;for(pe=280;pe<288;++pe)Se[pe]=8;var ye=new ne(32);for(pe=0;pe<32;++pe)ye[pe]=5;var we=_e(Se,9,0),be=_e(ye,5,0),Me=function(i){return(i+7)/8|0},Ee=function(i,e,t){return(null==t||t>i.length)&&(t=i.length),new ne(i.subarray(e,t))},Re=function(i,e,t){t<<=7&e;var r=e/8|0;i[r]|=t,i[r+1]|=t>>8},Ce=function(i,e,t){t<<=7&e;var r=e/8|0;i[r]|=t,i[r+1]|=t>>8,i[r+2]|=t>>16},Pe=function(i,e){for(var t=[],r=0;r<i.length;++r)i[r]&&t.push({s:r,f:i[r]});var a=t.length,n=t.slice();if(!a)return{t:De,l:0};if(1==a){var s=new ne(t[0].s+1);return s[t[0].s]=1,{t:s,l:1}}t.sort(function(i,e){return i.f-e.f}),t.push({s:-1,f:25001});var o=t[0],u=t[1],c=0,l=1,h=2;for(t[0]={s:-1,f:o.f+u.f,l:o,r:u};l!=a-1;)o=t[t[c].f<t[h].f?c++:h++],u=t[c!=l&&t[c].f<t[h].f?c++:h++],t[l++]={s:-1,f:o.f+u.f,l:o,r:u};var d=n[0].s;for(r=1;r<a;++r)n[r].s>d&&(d=n[r].s);var v=new se(d+1),f=Te(t[l-1],v,0);if(f>e){r=0;var A=0,m=f-e,p=1<<m;for(n.sort(function(i,e){return v[e.s]-v[i.s]||i.f-e.f});r<a;++r){var g=n[r].s;if(!(v[g]>e))break;A+=p-(1<<f-v[g]),v[g]=e}for(A>>=m;A>0;){var _=n[r].s;v[_]<e?A-=1<<e-v[_]++-1:++r}for(;r>=0&&A;--r){var S=n[r].s;v[S]==e&&(--v[S],++A)}f=e}return{t:new ne(v),l:f}},Te=function(i,e,t){return-1==i.s?Math.max(Te(i.l,e,t+1),Te(i.r,e,t+1)):e[i.s]=t},ke=function(i){for(var e=i.length;e&&!i[--e];);for(var t=new se(++e),r=0,a=i[0],n=1,s=function(i){t[r++]=i},o=1;o<=e;++o)if(i[o]==a&&o!=e)++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=i[o]}return{c:t.subarray(0,r),n:e}},Ue=function(i,e){for(var t=0,r=0;r<e.length;++r)t+=i[r]*e[r];return t},Ie=function(i,e,t){var r=t.length,a=Me(e+2);i[a]=255&r,i[a+1]=r>>8,i[a+2]=255^i[a],i[a+3]=255^i[a+1];for(var n=0;n<r;++n)i[a+n+4]=t[n];return 8*(a+4+r)},Be=function(i,e,t,r,a,n,s,o,u,c,l){Re(e,l++,t),++a[256];for(var h=Pe(a,15),d=h.t,v=h.l,f=Pe(n,15),A=f.t,m=f.l,p=ke(d),g=p.c,_=p.n,S=ke(A),y=S.c,w=S.n,b=new se(19),M=0;M<g.length;++M)++b[31&g[M]];for(M=0;M<y.length;++M)++b[31&y[M]];for(var E=Pe(b,7),R=E.t,C=E.l,P=19;P>4&&!R[le[P-1]];--P);var T,k,U,I,B=c+5<<3,x=Ue(a,Se)+Ue(n,ye)+s,D=Ue(a,d)+Ue(n,A)+s+14+3*P+Ue(b,R)+2*b[16]+3*b[17]+7*b[18];if(u>=0&&B<=x&&B<=D)return Ie(e,l,i.subarray(u,u+c));if(Re(e,l,1+(D<x)),l+=2,D<x){T=_e(d,v,0),k=d,U=_e(A,m,0),I=A;var O=_e(R,C,0);Re(e,l,_-257),Re(e,l+5,w-1),Re(e,l+10,P-4),l+=14;for(M=0;M<P;++M)Re(e,l+3*M,R[le[M]]);l+=3*P;for(var N=[g,y],L=0;L<2;++L){var K=N[L];for(M=0;M<K.length;++M){var G=31&K[M];Re(e,l,O[G]),l+=R[G],G>15&&(Re(e,l,K[M]>>5&127),l+=K[M]>>12)}}}else T=we,k=Se,U=be,I=ye;for(M=0;M<o;++M){var j=r[M];if(j>255){Ce(e,l,T[(G=j>>18&31)+257]),l+=k[G+257],G>7&&(Re(e,l,j>>23&31),l+=ue[G]);var F=31&j;Ce(e,l,U[F]),l+=I[F],F>3&&(Ce(e,l,j>>5&8191),l+=ce[F])}else Ce(e,l,T[j]),l+=k[j]}return Ce(e,l,T[256]),l+k[256]},xe=new oe([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),De=new ne(0),Oe=function(){for(var i=new Int32Array(256),e=0;e<256;++e){for(var t=e,r=9;--r;)t=(1&t&&-306674912)^t>>>1;i[e]=t}return i}(),Ne=function(i,e,t,r,a){if(!a&&(a={l:1},e.dictionary)){var n=e.dictionary.subarray(-32768),s=new ne(n.length+i.length);s.set(n),s.set(i,n.length),i=s,a.w=n.length}return function(i,e,t,r,a,n){var s=n.z||i.length,o=new ne(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(e){l&&(u[0]=n.r>>3);for(var h=xe[e-1],d=h>>13,v=8191&h,f=(1<<t)-1,A=n.p||new se(32768),m=n.h||new se(f+1),p=Math.ceil(t/3),g=2*p,_=function(e){return(i[e]^i[e+1]<<p^i[e+2]<<g)&f},S=new oe(25e3),y=new se(288),w=new se(32),b=0,M=0,E=n.i||0,R=0,C=n.w||0,P=0;E+2<s;++E){var T=_(E),k=32767&E,U=m[T];if(A[k]=U,m[T]=k,C<=E){var I=s-E;if((b>7e3||R>24576)&&(I>423||!c)){l=Be(i,u,0,S,y,w,M,R,P,E-P,l),R=b=M=0,P=E;for(var B=0;B<286;++B)y[B]=0;for(B=0;B<30;++B)w[B]=0}var x=2,D=0,O=v,N=k-U&32767;if(I>2&&T==_(E-N))for(var L=Math.min(d,I)-1,K=Math.min(32767,E),G=Math.min(258,I);N<=K&&--O&&k!=U;){if(i[E+x]==i[E+x-N]){for(var j=0;j<G&&i[E+j]==i[E+j-N];++j);if(j>x){if(x=j,D=N,j>L)break;var F=Math.min(N,j-2),z=0;for(B=0;B<F;++B){var V=E-N+B&32767,H=V-A[V]&32767;H>z&&(z=H,U=V)}}}N+=(k=U)-(U=A[k])&32767}if(D){S[R++]=268435456|fe[x]<<18|Ae[D];var q=31&fe[x],W=31&Ae[D];M+=ue[q]+ce[W],++y[257+q],++w[W],C=E+x,++b}else S[R++]=i[E],++y[i[E]]}}for(E=Math.max(E,C);E<s;++E)S[R++]=i[E],++y[i[E]];l=Be(i,u,c,S,y,w,M,R,P,E-P,l),c||(n.r=7&l|u[l/8|0]<<3,l-=7,n.h=m,n.p=A,n.i=E,n.w=C)}else{for(E=n.w||0;E<s+c;E+=65535){var J=E+65535;J>=s&&(u[l/8|0]=c,J=s),l=Ie(u,l+1,i.subarray(E,J))}n.i=s}return Ee(o,0,r+Me(l)+a)}(i,null==e.level?6:e.level,null==e.mem?a.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):20:12+e.mem,t,r,a)},Le=function(i,e,t){for(;t;++e)i[e]=t,t>>>=8};function $e(i,e){e||(e={});var t=function(){var i=-1;return{p:function(e){for(var t=i,r=0;r<e.length;++r)t=Oe[255&t^e[r]]^t>>>8;i=t},d:function(){return~i}}}(),r=i.length;t.p(i);var a,n=Ne(i,e,10+((a=e).filename?a.filename.length+1:0),8),s=n.length;return function(i,e){var t=e.filename;if(i[0]=31,i[1]=139,i[2]=8,i[8]=e.level<2?4:9==e.level?2:0,i[9]=3,0!=e.mtime&&Le(i,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),t){i[3]=8;for(var r=0;r<=t.length;++r)i[r+10]=t.charCodeAt(r)}}(n,e),Le(n,s-8,t.d()),Le(n,s-4,r),n}var Ke="undefined"!=typeof TextEncoder&&new TextEncoder,Ge="undefined"!=typeof TextDecoder&&new TextDecoder;try{Ge.decode(De,{stream:!0})}catch(i){}ae.MouseMove,ae.MouseInteraction,ae.Scroll,ae.ViewportResize,ae.Input,ae.TouchMove,ae.MediaInteraction,ae.Drag;var je,Fe="text/plain";!function(i){i.GZipJS="gzip-js",i.None="none"}(je||(je={}));var ze=i=>{var{data:e,compression:t}=i;if(e){var r=(i=>JSON.stringify(i,(i,e)=>"bigint"==typeof e?e.toString():e))(e),a=new Blob([r]).size;if(t===je.GZipJS&&a>=1024)try{var n=$e(function(i,e){if(Ke)return Ke.encode(i);for(var t=i.length,r=new ne(i.length+(i.length>>1)),a=0,n=function(i){r[a++]=i},s=0;s<t;++s){if(a+5>r.length){var o=new ne(a+8+(t-s<<1));o.set(r),r=o}var u=i.charCodeAt(s);u<128||e?n(u):u<2048?(n(192|u>>6),n(128|63&u)):u>55295&&u<57344?(n(240|(u=65536+(1047552&u)|1023&i.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 Ee(r,0,a)}(r),{mtime:0}),s=new Blob([n],{type:Fe});if(s.size<.95*a)return{contentType:Fe,body:s,estimatedSize:s.size}}catch(i){}return{contentType:"application/json",body:r,estimatedSize:a}}},Ve=[{name:"fetch",available:"undefined"!=typeof fetch,method:i=>{var r=ze(i);if(r){var{contentType:a,body:n,estimatedSize:s}=r,o=i.compression===je.GZipJS&&a===Fe?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url,u=t({"Content-Type":a},i.headers||{}),c=new AbortController,l=i.timeout?setTimeout(()=>c.abort(),i.timeout):null;fetch(o,{method:i.method||"POST",headers:u,body:n,keepalive:s<52428.8,signal:c.signal}).then(function(){var t=e(function*(e){var t,r=yield e.text(),a={statusCode:e.status,text:r};if(200===e.status)try{a.json=JSON.parse(r)}catch(i){}null===(t=i.callback)||void 0===t||t.call(i,a)});return function(i){return t.apply(this,arguments)}}()).catch(()=>{var e;null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0})}).finally(()=>{l&&clearTimeout(l)})}}},{name:"XHR",available:"undefined"!=typeof XMLHttpRequest,method:i=>{var e=ze(i);if(e){var{contentType:t,body:r}=e,a=i.compression===je.GZipJS&&t===Fe?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url,n=new XMLHttpRequest;n.open(i.method||"POST",a,!0),i.headers&&Object.entries(i.headers).forEach(i=>{var[e,t]=i;n.setRequestHeader(e,t)}),n.setRequestHeader("Content-Type",t),i.timeout&&(n.timeout=i.timeout),n.onreadystatechange=()=>{var e;if(4===n.readyState){var t={statusCode:n.status,text:n.responseText};if(200===n.status)try{t.json=JSON.parse(n.responseText)}catch(i){}null===(e=i.callback)||void 0===e||e.call(i,t)}},n.onerror=()=>{var e;null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0})},n.send(r)}}},{name:"sendBeacon",available:"undefined"!=typeof navigator&&!!navigator.sendBeacon,method:i=>{var e=ze(i);if(e){var{contentType:t,body:r}=e;try{var a="string"==typeof r?new Blob([r],{type:t}):r,n=i.compression===je.GZipJS&&t===Fe?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url;navigator.sendBeacon(n,a)}catch(i){}}}}],He=i=>{var e,t=i.transport||"fetch",r=Ve.find(i=>i.name===t&&i.available)||Ve.find(i=>i.available);if(!r)return console.error("vTilt: No available transport method"),void(null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0}));r.method(i)};class qe{constructor(i,e){var t,r,a,n;this.$=!0,this.K=[],this.G=(t=(null==e?void 0:e.flush_interval_ms)||3e3,r=250,a=5e3,n=3e3,"number"!=typeof t||isNaN(t)?n:Math.min(Math.max(t,r),a)),this.j=i}get length(){return this.K.length}enqueue(i){this.K.push(i),this.F||this.V()}unload(){if(this.H(),0!==this.K.length){var i=this.q();for(var e in i){var r=i[e];this.j(t({},r,{transport:"sendBeacon"}))}}}enable(){this.$=!1,this.V()}pause(){this.$=!0,this.H()}flush(){this.H(),this.W(),this.V()}V(){this.$||(this.F=setTimeout(()=>{this.H(),this.W(),this.K.length>0&&this.V()},this.G))}H(){this.F&&(clearTimeout(this.F),this.F=void 0)}W(){if(0!==this.K.length){var i=this.q(),e=Date.now();for(var t in i){var r=i[t];r.events.forEach(i=>{var t=new Date(i.timestamp).getTime();i.$offset=Math.abs(t-e)}),this.j(r)}}}q(){var i={};return this.K.forEach(e=>{var t=e.batchKey||e.url;i[t]||(i[t]={url:e.url,events:[],batchKey:e.batchKey}),i[t].events.push(e.event)}),this.K=[],i}}class We{constructor(i){this.J=!1,this.Z=3e3,this.K=[],this.X=!0,this.j=i.sendRequest,this.Y=i.sendBeacon,M&&void 0!==R&&"onLine"in R&&(this.X=R.onLine,y(M,"online",()=>{this.X=!0,this.ii()}),y(M,"offline",()=>{this.X=!1}))}get length(){return this.K.length}enqueue(i,e){if(void 0===e&&(e=0),e>=10)console.warn("VTilt: Request failed after 10 retries, giving up");else{var t=function(i){var e=3e3*Math.pow(2,i),t=e/2,r=Math.min(18e5,e),a=(Math.random()-.5)*(r-t);return Math.ceil(r+a)}(e),r=Date.now()+t;this.K.push({retryAt:r,request:i,retriesPerformedSoFar:e+1});var a="VTilt: Enqueued failed request for retry in "+Math.round(t/1e3)+"s";this.X||(a+=" (Browser is offline)"),console.warn(a),this.J||(this.J=!0,this.ei())}}retriableRequest(i){var t=this;return e(function*(){try{var e=yield t.j(i);200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&t.enqueue(i,0)}catch(e){t.enqueue(i,0)}})()}ei(){this.ti&&clearTimeout(this.ti),this.ti=setTimeout(()=>{this.X&&this.K.length>0&&this.ii(),this.K.length>0?this.ei():this.J=!1},this.Z)}ii(){var i=this,t=Date.now(),r=[],a=[];this.K.forEach(i=>{i.retryAt<t?a.push(i):r.push(i)}),this.K=r,a.forEach(function(){var t=e(function*(e){var{request:t,retriesPerformedSoFar:r}=e;try{var a=yield i.j(t);200!==a.statusCode&&(a.statusCode<400||a.statusCode>=500)&&i.enqueue(t,r)}catch(e){i.enqueue(t,r)}});return function(i){return t.apply(this,arguments)}}())}unload(){this.ti&&(clearTimeout(this.ti),this.ti=void 0),this.K.forEach(i=>{var{request:e}=i;try{this.Y(e)}catch(i){console.error("VTilt: Failed to send beacon on unload",i)}}),this.K=[]}}var Je="vt_rate_limit";class Ze{constructor(i){var e,t;void 0===i&&(i={}),this.lastEventRateLimited=!1,this.eventsPerSecond=null!==(e=i.eventsPerSecond)&&void 0!==e?e:10,this.eventsBurstLimit=Math.max(null!==(t=i.eventsBurstLimit)&&void 0!==t?t:10*this.eventsPerSecond,this.eventsPerSecond),this.persistence=i.persistence,this.captureWarning=i.captureWarning,this.lastEventRateLimited=this.checkRateLimit(!0).isRateLimited}checkRateLimit(i){var e,t,r,a;void 0===i&&(i=!1);var n=Date.now(),s=null!==(t=null===(e=this.persistence)||void 0===e?void 0:e.get(Je))&&void 0!==t?t:{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||i||(s.tokens=Math.max(0,s.tokens-1)),!u||this.lastEventRateLimited||i||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(Je,s),{isRateLimited:u,remainingTokens:s.tokens}}shouldAllowEvent(){return!this.checkRateLimit(!1).isRateLimited}getRemainingTokens(){return this.checkRateLimit(!0).remainingTokens}}var Xe=Array.isArray;class Qe{constructor(i){void 0===i&&(i={}),this.version="1.1.5",this.__loaded=!1,this.ri=!1,this.ai=null,this.__request_queue=[],this.ni=!1,this.si=!1,this.configManager=new r(i);var e=this.configManager.getConfig();this.sessionManager=new N(e.storage||"cookie",e.cross_subdomain_cookie),this.userManager=new Qi(e.persistence||"localStorage",e.cross_subdomain_cookie),this.webVitalsManager=new Yi(e,this),this.rateLimiter=new Ze({eventsPerSecond:10,eventsBurstLimit:100,captureWarning:i=>{this.oi("$$client_ingestion_warning",{$$client_ingestion_warning_message:i})}}),this.retryQueue=new We({sendRequest:i=>this.ui(i),sendBeacon:i=>this.ci(i)}),this.requestQueue=new qe(i=>this.li(i),{flush_interval_ms:3e3})}init(i,e,t){var r;if(t&&t!==it){var a=null!==(r=Ye[t])&&void 0!==r?r:new Qe;return a._init(i,e,t),Ye[t]=a,Ye[it][t]=a,a}return this._init(i,e,t)}_init(i,e,r){if(void 0===e&&(e={}),this.__loaded)return console.warn("vTilt: You have already initialized vTilt! Re-initializing is a no-op"),this;this.updateConfig(t({},e,{projectId:i||e.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 ee(this),this.historyAutocapture.startIfEnabled(),this.hi(),this.di(),this.fi(),!1!==a.capture_pageview&&this.Ai(),this}fi(){this.requestQueue.enable()}di(){if(M){var i=()=>{this.requestQueue.unload(),this.retryQueue.unload()};y(M,"beforeunload",i),y(M,"pagehide",i)}}toString(){var i,e=null!==(i=this.configManager.getConfig().name)&&void 0!==i?i:it;return e!==it&&(e=it+"."+e),e}getCurrentDomain(){if(!P)return"";var i=P.protocol,e=P.hostname,t=P.port;return i+"//"+e+(t?":"+t:"")}mi(){var i=this.configManager.getConfig();return!(!i.projectId||!i.token)||(this.ni||(console.warn("VTilt: projectId and token are required for tracking. Events will be skipped until init() or updateConfig() is called with these fields."),this.ni=!0),!1)}buildUrl(){var i=this.configManager.getConfig(),{proxyUrl:e,proxy:t,api_host:r,token:a}=i;return e||(t?t+"/api/tracking?token="+a:r?r.replace(/\/+$/gm,"")+"/api/tracking?token="+a:"/api/tracking?token="+a)}sendRequest(i,e,t){if(this.mi()){if(t&&void 0!==M)if(M.__VTILT_ENQUEUE_REQUESTS)return void this.__request_queue.push({url:i,event:e});this.requestQueue.enqueue({url:i,event:e})}}li(i){var{transport:e}=i;"sendBeacon"!==e?this.retryQueue.retriableRequest(i):this.ci(i)}ui(i){return new Promise(e=>{var{url:t,events:r}=i,a=1===r.length?r[0]:{events:r},n=this.configManager.getConfig().disable_compression?je.None:je.GZipJS;He({url:t,data:a,method:"POST",transport:"XHR",compression:n,callback:i=>{e({statusCode:i.statusCode})}})})}ci(i){var{url:e,events:t}=i,r=1===t.length?t[0]:{events:t},a=this.configManager.getConfig().disable_compression?je.None:je.GZipJS;He({url:e,data:r,method:"POST",transport:"sendBeacon",compression:a})}pi(i){this.sendRequest(i.url,i.event,!1)}capture(i,e,r){if(this.sessionManager.setSessionId(),R&&R.userAgent&&function(i){return!(i&&"string"==typeof i&&i.length>500)}(R.userAgent)&&((null==r?void 0:r.skip_client_rate_limiting)||this.rateLimiter.shouldAllowEvent())){var a=this.buildUrl(),n=Xi(),s=this.userManager.getUserProperties(),o=this.userManager.get_initial_props(),u=this.sessionManager.getSessionId(),c=this.sessionManager.getWindowId(),l=this.userManager.getAnonymousId(),h={};!this.si&&Object.keys(o).length>0&&Object.assign(h,o),e.$set_once&&Object.assign(h,e.$set_once);var d=t({},n,s,{$session_id:u,$window_id:c},l?{$anon_distinct_id:l}:{},Object.keys(h).length>0?{$set_once:h}:{},e.$set?{$set:e.$set}:{},e);!this.si&&Object.keys(o).length>0&&(this.si=!0),"$pageview"===i&&C&&(d.title=C.title);var v,f,A=this.configManager.getConfig();if(!1!==A.stringifyPayload){if(v=Object.assign({},d,A.globalAttributes),!_(v=JSON.stringify(v)))return}else if(v=Object.assign({},d,A.globalAttributes),!_(JSON.stringify(v)))return;f="$identify"===i?this.userManager.getAnonymousId():this.userManager.getDistinctId()||this.userManager.getAnonymousId();var m={timestamp:(new Date).toISOString(),event:i,project_id:A.projectId||"",payload:v,distinct_id:f,anonymous_id:l};this.sendRequest(a,m,!0)}}oi(i,e){this.capture(i,e,{skip_client_rate_limiting:!0})}trackEvent(i,e){void 0===e&&(e={}),this.capture(i,e)}identify(i,e,t){if("number"==typeof i&&(i=String(i),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.userManager.isDistinctIdStringLikePublic(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.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)}i!==r&&s?(this.userManager.setUserState("identified"),this.userManager.updateUserProperties(e,t),this.capture("$identify",{distinct_id:i,$anon_distinct_id:a,$set:e||{},$set_once:t||{}}),this.userManager.setDistinctId(i)):e||t?(s&&this.userManager.setUserState("identified"),this.userManager.updateUserProperties(e,t),this.capture("$set",{$set:e||{},$set_once:t||{}})):i!==r&&(this.userManager.setUserState("identified"),this.userManager.setDistinctId(i))}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,e){this.userManager.setUserProperties(i,e)&&this.capture("$set",{$set:i||{},$set_once:e||{}})}resetUser(i){this.sessionManager.resetSessionId(),this.userManager.reset(i)}getUserIdentity(){return this.userManager.getUserIdentity()}getDeviceId(){return this.userManager.getDeviceId()}getUserState(){return this.userManager.getUserState()}createAlias(i,e){var t=this.userManager.createAlias(i,e);t?this.capture("$alias",{$original_id:t.original,$alias_id:t.distinct_id}):i===(e||this.userManager.getDistinctId()||this.userManager.getAnonymousId())&&this.identify(i)}Ai(){C&&("visible"===C.visibilityState?this.ri||(this.ri=!0,setTimeout(()=>{if(C&&P){this.capture("$pageview",{navigation_type:"initial_load"})}},300),this.ai&&(C.removeEventListener("visibilitychange",this.ai),this.ai=null)):this.ai||(this.ai=()=>{this.Ai()},y(C,"visibilitychange",this.ai)))}getConfig(){return this.configManager.getConfig()}getSessionId(){return this.sessionManager.getSessionId()}getDistinctId(){return this.userManager.getDistinctId()||this.userManager.getAnonymousId()}getAnonymousId(){return this.userManager.getAnonymousId()}updateConfig(i){this.configManager.updateConfig(i);var e=this.configManager.getConfig();this.sessionManager=new N(e.storage||"cookie",e.cross_subdomain_cookie),this.userManager=new Qi(e.persistence||"localStorage",e.cross_subdomain_cookie),this.webVitalsManager=new Yi(e,this),this.sessionRecording&&e.session_recording&&this.sessionRecording.updateConfig(this.gi(e))}hi(){var i=this.configManager.getConfig();if(!i.disable_session_recording){var e=this.gi(i);this.sessionRecording=new re(this,e),e.enabled&&this.sessionRecording.startIfEnabledOrStop("recording_initialized")}}gi(i){var e,t,r,a=i.session_recording||{};return{enabled:null!==(e=a.enabled)&&void 0!==e&&e,sampleRate:a.sampleRate,minimumDurationMs:a.minimumDurationMs,sessionIdleThresholdMs:a.sessionIdleThresholdMs,fullSnapshotIntervalMs:a.fullSnapshotIntervalMs,captureConsole:null!==(t=a.captureConsole)&&void 0!==t&&t,captureNetwork:null!==(r=a.captureNetwork)&&void 0!==r&&r,captureCanvas:a.captureCanvas,blockClass:a.blockClass,blockSelector:a.blockSelector,ignoreClass:a.ignoreClass,maskTextClass:a.maskTextClass,maskTextSelector:a.maskTextSelector,maskAllInputs:a.maskAllInputs,maskInputOptions:a.maskInputOptions,masking:a.masking,recordHeaders:a.recordHeaders,recordBody:a.recordBody,compressEvents:a.compressEvents,__mutationThrottlerRefillRate:a.__mutationThrottlerRefillRate,__mutationThrottlerBucketSize:a.__mutationThrottlerBucketSize}}startSessionRecording(){if(!this.sessionRecording){var i=this.configManager.getConfig(),e=this.gi(i);e.enabled=!0,this.sessionRecording=new re(this,e)}this.sessionRecording.startIfEnabledOrStop("recording_initialized")}stopSessionRecording(){var i;null===(i=this.sessionRecording)||void 0===i||i.stopRecording()}isSessionRecordingActive(){var i;return"active"===(null===(i=this.sessionRecording)||void 0===i?void 0:i.status)}getSessionRecordingId(){var i;return(null===(i=this.sessionRecording)||void 0===i?void 0:i.sessionId)||null}_execute_array(i){Array.isArray(i)&&i.forEach(i=>{if(i&&Array.isArray(i)&&i.length>0){var e=i[0],t=i.slice(1);if("function"==typeof this[e])try{this[e](...t)}catch(i){console.error("vTilt: Error executing queued call "+e+":",i)}}})}_dom_loaded(){this.__request_queue.forEach(i=>{this.pi(i)}),this.__request_queue=[],this.fi()}}var Ye={},it="vt",et=!(void 0!==k||void 0!==T)&&-1===(null==U?void 0:U.indexOf("MSIE"))&&-1===(null==U?void 0:U.indexOf("Mozilla"));null!=M&&(M.__VTILT_ENQUEUE_REQUESTS=et);var tt,rt,at=function(){function i(){i.done||(i.done=!0,et=!1,null!=M&&(M.__VTILT_ENQUEUE_REQUESTS=!1),S(Ye,function(i){i._dom_loaded()}))}C&&"function"==typeof C.addEventListener?"complete"===C.readyState?i():y(C,"DOMContentLoaded",i,{capture:!1}):M&&console.error("Browser doesn't support `document.addEventListener` so vTilt couldn't be initialized")};"undefined"!=typeof window&&window.vt&&Array.isArray(window.vt)&&(tt=Ye[it]=new Qe,(rt=I.vt)&&S(rt._i,function(i){if(i&&Xe(i)){var e=tt.init(i[0],i[1],i[2]),t=rt[i[2]||"vt"]||rt;e&&e._execute_array(t)}}),I.vt=tt,at());var nt=function(){var i=Ye[it]=new Qe;return at(),i}();exports.VTilt=Qe,exports.default=nt,exports.vt=nt;
1
+ "use strict";function t(t,i,e,r,n,s,o){try{var a=t[s](o),h=a.value}catch(t){return void e(t)}a.done?i(h):Promise.resolve(h).then(r,n)}function i(i){return function(){var e=this,r=arguments;return new Promise(function(n,s){var o=i.apply(e,r);function a(i){t(o,n,s,a,h,"next",i)}function h(i){t(o,n,s,a,h,"throw",i)}a(void 0)})}}function e(){return e=Object.assign?Object.assign.bind():function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},e.apply(null,arguments)}Object.defineProperty(exports,"__esModule",{value:!0});class r{constructor(t){void 0===t&&(t={}),this.config=this.parseConfigFromScript(t)}parseConfigFromScript(t){if(!document.currentScript)return e({token:t.token||""},t);var i=document.currentScript,r=e({token:""},t);r.api_host=i.getAttribute("data-api-host")||i.getAttribute("data-host")||t.api_host,r.script_host=i.getAttribute("data-script-host")||t.script_host,r.proxy=i.getAttribute("data-proxy")||t.proxy,r.proxyUrl=i.getAttribute("data-proxy-url")||t.proxyUrl,r.token=i.getAttribute("data-token")||t.token||"",r.projectId=i.getAttribute("data-project-id")||t.projectId||"",r.domain=i.getAttribute("data-domain")||t.domain,r.storage=i.getAttribute("data-storage")||t.storage,r.stringifyPayload="false"!==i.getAttribute("data-stringify-payload");var n="true"===i.getAttribute("data-capture-performance");if(r.capture_performance=!!n||t.capture_performance,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 s of(r.globalAttributes=e({},t.globalAttributes),Array.from(i.attributes)))s.name.startsWith("data-vt-")&&(r.globalAttributes[s.name.slice(8).replace(/-/g,"_")]=s.value);return r}getConfig(){return e({},this.config)}updateConfig(t){this.config=e({},this.config,t)}}var n="__vt_session",s="__vt_window_id",o="__vt_primary_window",a="__vt_user_state",h="__vt_device_id",u="__vt_anonymous_id",l="__vt_distinct_id",d="__vt_user_properties",v="localStorage",c="localStorage+cookie",f="sessionStorage",p="memory",g="$initial_person_info";function _(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,t=>(+t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+t/4).toString(16))}function w(t){return!(!t||"string"!=typeof t)&&!(t.length<2||t.length>10240)}function m(t,i,e){if(t)if(Array.isArray(t))t.forEach((t,r)=>{i.call(e,t,r)});else for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&i.call(e,t[r],r)}function y(t,i,e,r){var{capture:n=!1,passive:s=!0}=null!=r?r:{};null==t||t.addEventListener(i,e,{capture:n,passive:s})}function b(t,i){if(!i)return t;for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t}function S(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),r=1;r<i;r++)e[r-1]=arguments[r];for(var n of e)for(var s of n)t.push(s);return t}var T="undefined"!=typeof window?window:void 0,x="undefined"!=typeof globalThis?globalThis:T,E=null==x?void 0:x.navigator,I=null==x?void 0:x.document,M=null==x?void 0:x.location,k=null==x?void 0:x.fetch,R=(null==x?void 0:x.XMLHttpRequest)&&"withCredentials"in new x.XMLHttpRequest?x.XMLHttpRequest:void 0;null==x||x.AbortController;var C=null==E?void 0:E.userAgent,O=null!=T?T:{},P=31536e3,A=["herokuapp.com","vercel.app","netlify.app"];function D(t){var i;if(!t)return"";if("undefined"==typeof document)return"";var e=null===(i=document.location)||void 0===i?void 0:i.hostname;if(!e)return"";var r=e.match(/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i);return r?"."+r[0]:""}class U{constructor(t){var i,e;this.memoryStorage=new Map,this.method=t.method,this.cross_subdomain=null!==(i=t.cross_subdomain)&&void 0!==i?i:function(){var t;if("undefined"==typeof document)return!1;var i=null===(t=document.location)||void 0===t?void 0:t.hostname;if(!i)return!1;var e=i.split(".").slice(-2).join(".");for(var r of A)if(e===r)return!1;return!0}(),this.sameSite=t.sameSite||"Lax",this.secure=null!==(e=t.secure)&&void 0!==e?e:"undefined"!=typeof location&&"https:"===location.protocol}get(t){var i;try{if(this.method===p)return null!==(i=this.memoryStorage.get(t))&&void 0!==i?i:null;if(this.usesLocalStorage()){var e=localStorage.getItem(t);return null!==e?e:this.method===c?this.getCookie(t):null}return this.usesSessionStorage()?sessionStorage.getItem(t):this.getCookie(t)}catch(i){return console.warn('[StorageManager] Failed to get "'+t+'":',i),null}}set(t,i,e){try{if(this.method===p)return void this.memoryStorage.set(t,i);if(this.usesLocalStorage())return localStorage.setItem(t,i),void(this.method===c&&this.setCookie(t,i,e||P));if(this.usesSessionStorage())return void sessionStorage.setItem(t,i);this.setCookie(t,i,e||P)}catch(i){console.warn('[StorageManager] Failed to set "'+t+'":',i)}}remove(t){try{if(this.method===p)return void this.memoryStorage.delete(t);if(this.usesLocalStorage())return localStorage.removeItem(t),void(this.method===c&&this.removeCookie(t));if(this.usesSessionStorage())return void sessionStorage.removeItem(t);this.removeCookie(t)}catch(i){console.warn('[StorageManager] Failed to remove "'+t+'":',i)}}getWithExpiry(t){var i=this.get(t);if(!i)return null;try{var e=JSON.parse(i);return e.expiry&&Date.now()>e.expiry?(this.remove(t),null):e.value}catch(t){return null}}setWithExpiry(t,i,r){var n=e({value:i},r?{expiry:Date.now()+r}:{});this.set(t,JSON.stringify(n))}getJSON(t){var i=this.get(t);if(!i)return null;try{return JSON.parse(i)}catch(t){return null}}setJSON(t,i,e){this.set(t,JSON.stringify(i),e)}getCookie(t){if("undefined"==typeof document)return null;var i=document.cookie.split(";");for(var e of i){var[r,...n]=e.trim().split("=");if(r===t){var s=n.join("=");try{return decodeURIComponent(s)}catch(t){return s}}}return null}setCookie(t,i,e){if("undefined"!=typeof document){var r=t+"="+encodeURIComponent(i);r+="; Max-Age="+e,r+="; path=/",r+="; SameSite="+this.sameSite,this.secure&&(r+="; Secure");var n=D(this.cross_subdomain);n&&(r+="; domain="+n),document.cookie=r}}removeCookie(t){if("undefined"!=typeof document){var i=D(this.cross_subdomain),e=t+"=; Max-Age=0; path=/";i&&(e+="; domain="+i),document.cookie=e,document.cookie=t+"=; Max-Age=0; path=/"}}usesLocalStorage(){return this.method===v||this.method===c}usesSessionStorage(){return this.method===f}canUseSessionStorage(){if(void 0===T||!(null==T?void 0:T.sessionStorage))return!1;try{var t="__vt_storage_test__";return T.sessionStorage.setItem(t,"test"),T.sessionStorage.removeItem(t),!0}catch(t){return!1}}getSessionStorage(){var t;return this.canUseSessionStorage()&&null!==(t=null==T?void 0:T.sessionStorage)&&void 0!==t?t:null}setMethod(t){this.method=t}getMethod(){return this.method}}class B{constructor(t,i){void 0===t&&(t="cookie"),this.storage=new U({method:t,cross_subdomain:i,sameSite:"Lax"}),this.o=void 0,this.v()}getSessionId(){var t=this.m();return t||(t=_(),this.S(t)),t}setSessionId(){var t=this.m()||_();return this.S(t),t}resetSessionId(){this.T(),this.setSessionId(),this.I(_())}m(){return this.storage.get(n)}S(t){this.storage.set(n,t,1800)}T(){this.storage.remove(n)}getWindowId(){if(this.o)return this.o;var t=this.storage.getSessionStorage();if(t){var i=t.getItem(s);if(i)return this.o=i,i}var e=_();return this.I(e),e}I(t){if(t!==this.o){this.o=t;var i=this.storage.getSessionStorage();i&&i.setItem(s,t)}}v(){var t=this.storage.getSessionStorage();if(t){var i=t.getItem(o),e=t.getItem(s);e&&!i?this.o=e:(e&&t.removeItem(s),this.I(_())),t.setItem(o,"true"),this.$()}else this.o=_()}$(){var t=this.storage.getSessionStorage();T&&t&&y(T,"beforeunload",()=>{var t=this.storage.getSessionStorage();t&&t.removeItem(o)},{capture:!1})}updateStorageMethod(t,i){this.storage=new U({method:t,cross_subdomain:i,sameSite:"Lax"})}}function L(t){if(!I)return null;var i=I.createElement("a");return i.href=t,i}function j(t,i){for(var e=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;r<e.length;r++){var n=e[r].split("=");if(n[0]===i){if(n.length<2)return"";var s=n[1];try{s=decodeURIComponent(s)}catch(t){}return s.replace(/\+/g," ")}}return""}function N(t,i,e){if(!t||!i||!i.length)return t;for(var r=t.split("#"),n=r[0]||"",s=r[1],o=n.split("?"),a=o[1],h=o[0],u=(a||"").split("&"),l=[],d=0;d<u.length;d++){var v=u[d].split("="),c=v[0],f=v.slice(1).join("=");-1!==i.indexOf(c)?l.push(c+"="+e):c&&l.push(c+(f?"="+f:""))}var p=l.join("&");return h+(p?"?"+p:"")+(s?"#"+s:"")}function q(t){return"function"==typeof t}var z="Mobile",F="iOS",W="Android",V="Tablet",J=W+" "+V,X="iPad",H="Apple",K=H+" Watch",G="Safari",Q="BlackBerry",Z="Samsung",Y=Z+"Browser",tt=Z+" Internet",it="Chrome",et=it+" OS",rt=it+" "+F,nt="Internet Explorer",st=nt+" "+z,ot="Opera",at=ot+" Mini",ht="Edge",ut="Microsoft "+ht,lt="Firefox",dt=lt+" "+F,vt="Nintendo",ct="PlayStation",ft="Xbox",pt=W+" "+z,gt=z+" "+G,_t="Windows",wt=_t+" Phone",mt="Nokia",yt="Ouya",bt="Generic",St=bt+" "+z.toLowerCase(),Tt=bt+" "+V.toLowerCase(),xt="Konqueror",Et="(\\d+(\\.\\d+)?)",It=new RegExp("Version/"+Et),$t=new RegExp(ft,"i"),Mt=new RegExp(ct+" \\w+","i"),kt=new RegExp(vt+" \\w+","i"),Rt=new RegExp(Q+"|PlayBook|BB10","i"),Ct={"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 Ot(t,i){return t.toLowerCase().includes(i.toLowerCase())}var Pt=(t,i)=>i&&Ot(i,H)||function(t){return Ot(t,G)&&!Ot(t,it)&&!Ot(t,W)}(t),At=function(t,i){return i=i||"",Ot(t," OPR/")&&Ot(t,"Mini")?at:Ot(t," OPR/")?ot:Rt.test(t)?Q:Ot(t,"IE"+z)||Ot(t,"WPDesktop")?st:Ot(t,Y)?tt:Ot(t,ht)||Ot(t,"Edg/")?ut:Ot(t,"FBIOS")?"Facebook "+z:Ot(t,"UCWEB")||Ot(t,"UCBrowser")?"UC Browser":Ot(t,"CriOS")?rt:Ot(t,"CrMo")||Ot(t,it)?it:Ot(t,W)&&Ot(t,G)?pt:Ot(t,"FxiOS")?dt:Ot(t.toLowerCase(),xt.toLowerCase())?xt:Pt(t,i)?Ot(t,z)?gt:G:Ot(t,lt)?lt:Ot(t,"MSIE")||Ot(t,"Trident/")?nt:Ot(t,"Gecko")?lt:""},Dt={[st]:[new RegExp("rv:"+Et)],[ut]:[new RegExp(ht+"?\\/"+Et)],[it]:[new RegExp("("+it+"|CrMo)\\/"+Et)],[rt]:[new RegExp("CriOS\\/"+Et)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Et)],[G]:[It],[gt]:[It],[ot]:[new RegExp("(Opera|OPR)\\/"+Et)],[lt]:[new RegExp(lt+"\\/"+Et)],[dt]:[new RegExp("FxiOS\\/"+Et)],[xt]:[new RegExp("Konqueror[:/]?"+Et,"i")],[Q]:[new RegExp(Q+" "+Et),It],[pt]:[new RegExp("android\\s"+Et,"i")],[tt]:[new RegExp(Y+"\\/"+Et)],[nt]:[new RegExp("(rv:|MSIE )"+Et)],Mozilla:[new RegExp("rv:"+Et)]},Ut=function(t,i){var e=At(t,i),r=Dt[e];if(void 0===r)return null;for(var n=0;n<r.length;n++){var s=r[n],o=t.match(s);if(o)return parseFloat(o[o.length-2])}return null},Bt=[[new RegExp(ft+"; "+ft+" (.*?)[);]","i"),t=>[ft,t&&t[1]||""]],[new RegExp(vt,"i"),[vt,""]],[new RegExp(ct,"i"),[ct,""]],[Rt,[Q,""]],[new RegExp(_t,"i"),(t,i)=>{if(/Phone/.test(i)||/WPDesktop/.test(i))return[wt,""];if(new RegExp(z).test(i)&&!/IEMobile\b/.test(i))return[_t+" "+z,""];var e=/Windows NT ([0-9.]+)/i.exec(i);if(e&&e[1]){var r=e[1],n=Ct[r]||"";return/arm/i.test(i)&&(n="RT"),[_t,n]}return[_t,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>{if(t&&t[3]){var i=[t[3],t[4],t[5]||"0"];return[F,i.join(".")]}return[F,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var i="";return t&&t.length>=3&&(i=void 0===t[2]?t[3]:t[2]),["watchOS",i]}],[new RegExp("("+W+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+W+")","i"),t=>{if(t&&t[2]){var i=[t[2],t[3],t[4]||"0"];return[W,i.join(".")]}return[W,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var i=["Mac OS X",""];if(t&&t[1]){var e=[t[1],t[2],t[3]||"0"];i[1]=e.join(".")}return i}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[et,""]],[/Linux|debian/i,["Linux",""]]],Lt=function(t){return kt.test(t)?vt:Mt.test(t)?ct:$t.test(t)?ft:new RegExp(yt,"i").test(t)?yt:new RegExp("("+wt+"|WPDesktop)","i").test(t)?wt:/iPad/.test(t)?X:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?K:Rt.test(t)?Q:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(mt,"i").test(t)?mt:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?!new RegExp(z).test(t)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)?/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?W:J:W:new RegExp("(pda|"+z+")","i").test(t)?St:new RegExp(V,"i").test(t)&&!new RegExp(V+" pc","i").test(t)?Tt:""},jt="https?://(.*)",Nt=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],qt=S(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Nt),zt="<masked>";function Ft(t){var i=function(t){return t?0===t.search(jt+"google.([^/?]*)")?"google":0===t.search(jt+"bing.com")?"bing":0===t.search(jt+"yahoo.com")?"yahoo":0===t.search(jt+"duckduckgo.com")?"duckduckgo":null:null}(t),e="yahoo"!==i?"q":"p",r={};if(null!==i){r.$search_engine=i;var n=I?j(I.referrer,e):"";n.length&&(r.ph_keyword=n)}return r}function Wt(){if("undefined"!=typeof navigator)return navigator.language||navigator.userLanguage}function Vt(){return(null==I?void 0:I.referrer)||"$direct"}function Jt(){var t;return(null==I?void 0:I.referrer)&&(null===(t=L(I.referrer))||void 0===t?void 0:t.host)||"$direct"}function Xt(t){var i,{r:e,u:r}=t,n={$referrer:e,$referring_domain:null==e?void 0:"$direct"===e?"$direct":null===(i=L(e))||void 0===i?void 0:i.host};if(r){n.$current_url=r;var s=L(r);n.$host=null==s?void 0:s.host,n.$pathname=null==s?void 0:s.pathname;var o=function(t){var i=qt.concat([]),e={};return m(i,function(i){var r=j(t,i);e[i]=r||null}),e}(r);b(n,o)}e&&b(n,Ft(e));return n}function Ht(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){return}}function Kt(){try{return(new Date).getTimezoneOffset()}catch(t){return}}function Gt(t,i){if(!C)return{};var e,r,n,[s,o]=function(t){for(var i=0;i<Bt.length;i++){var[e,r]=Bt[i],n=e.exec(t),s=n&&(q(r)?r(n,t):r);if(s)return s}return["",""]}(C);return b(function(t){var i={};for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=t[e];null!=r&&""!==r&&(i[e]=r)}return i}({$os:s,$os_version:o,$browser:At(C,navigator.vendor),$device:Lt(C),$device_type:(r=C,n=Lt(r),n===X||n===J||"Kobo"===n||"Kindle Fire"===n||n===Tt?V:n===vt||n===ft||n===ct||n===yt?"Console":n===K?"Wearable":n?z:"Desktop"),$timezone:Ht(),$timezone_offset:Kt()}),{$current_url:N(null==M?void 0:M.href,[],zt),$host:null==M?void 0:M.host,$pathname:null==M?void 0:M.pathname,$raw_user_agent:C.length>1e3?C.substring(0,997)+"...":C,$browser_version:Ut(C,navigator.vendor),$browser_language:Wt(),$browser_language_prefix:(e=Wt(),"string"==typeof e?e.split("-")[0]:void 0),$screen_height:null==T?void 0:T.screen.height,$screen_width:null==T?void 0:T.screen.width,$viewport_height:null==T?void 0:T.innerHeight,$viewport_width:null==T?void 0:T.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 Qt{constructor(t,i){void 0===t&&(t="localStorage"),this.M=null,this.storage=new U({method:t,cross_subdomain:i,sameSite:"Lax"}),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.storage.set(u,this.userIdentity.anonymous_id,P)),this.userIdentity.anonymous_id}getUserProperties(){return e({},this.userIdentity.properties)}getEffectiveId(){return this.userIdentity.distinct_id||this.getAnonymousId()}getDeviceId(){return this.userIdentity.device_id}getUserState(){return this.userIdentity.user_state}identify(t,i,r){if("number"==typeof t&&(t=t.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.")),t)if(this.isDistinctIdStringLike(t))console.error('The string "'+t+'" 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"!==t){var n=this.userIdentity.distinct_id;if(this.userIdentity.distinct_id=t,!this.userIdentity.device_id){var s=n||this.userIdentity.anonymous_id;this.userIdentity.device_id=s,this.userIdentity.properties=e({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:s})}t!==n&&(this.userIdentity.distinct_id=t);var o="anonymous"===this.userIdentity.user_state;t!==n&&o?(this.userIdentity.user_state="identified",i&&(this.userIdentity.properties=e({},this.userIdentity.properties,i)),r&&Object.keys(r).forEach(t=>{t in this.userIdentity.properties||(this.userIdentity.properties[t]=r[t])}),this.saveUserIdentity()):i||r?("anonymous"===this.userIdentity.user_state&&(this.userIdentity.user_state="identified"),i&&(this.userIdentity.properties=e({},this.userIdentity.properties,i)),r&&Object.keys(r).forEach(t=>{t in this.userIdentity.properties||(this.userIdentity.properties[t]=r[t])}),this.saveUserIdentity()):t!==n&&(this.userIdentity.user_state="identified",this.saveUserIdentity())}else console.error('The string "'+t+'" 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(t,i){if(!t&&!i)return!1;var r=this.userIdentity.distinct_id||this.userIdentity.anonymous_id,n=this.getPersonPropertiesHash(r,t,i);return this.M===n?(console.info("VTilt: A duplicate setUserProperties call was made with the same properties. It has been ignored."),!1):(t&&(this.userIdentity.properties=e({},this.userIdentity.properties,t)),i&&Object.keys(i).forEach(t=>{t in this.userIdentity.properties||(this.userIdentity.properties[t]=i[t])}),this.saveUserIdentity(),this.M=n,!0)}reset(t){var i=this.generateAnonymousId(),r=this.userIdentity.device_id,n=t?this.generateDeviceId():r;this.userIdentity={distinct_id:null,anonymous_id:i,device_id:n,properties:{},user_state:"anonymous"},this.M=null,this.saveUserIdentity(),this.userIdentity.properties=e({},this.userIdentity.properties,{$last_vtilt_reset:(new Date).toISOString()}),this.saveUserIdentity()}setDistinctId(t){this.userIdentity.distinct_id=t,this.saveUserIdentity()}setUserState(t){this.userIdentity.user_state=t,this.saveUserIdentity()}updateUserProperties(t,i){t&&(this.userIdentity.properties=e({},this.userIdentity.properties,t)),i&&Object.keys(i).forEach(t=>{t in this.userIdentity.properties||(this.userIdentity.properties[t]=i[t])}),this.saveUserIdentity()}ensureDeviceId(t){this.userIdentity.device_id||(this.userIdentity.device_id=t,this.userIdentity.properties=e({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:t}),this.saveUserIdentity())}createAlias(t,i){return this.isValidDistinctId(t)?(void 0===i&&(i=this.getDistinctId()||this.getAnonymousId()),this.isValidDistinctId(i)?t===i?(console.warn("alias matches current distinct_id - should use identify instead"),null):{distinct_id:t,original:i}:(console.warn("Invalid original distinct ID"),null)):(console.warn("Invalid alias provided"),null)}isDistinctIdStringLikePublic(t){return this.isDistinctIdStringLike(t)}set_initial_person_info(t,i){if(!this.getStoredUserProperties()[g]){var e=function(t,i){var e=t?S([],Nt,i||[]):[],r=null==M?void 0:M.href.substring(0,1e3);return{r:Vt().substring(0,1e3),u:r?N(r,e,zt):void 0}}(t,i);this.register_once({[g]:e},void 0)}}get_initial_props(){var t,i,e=this.getStoredUserProperties()[g];return e?(t=Xt(e),i={},m(t,function(t,e){var r;i["$initial_"+(r=String(e),r.startsWith("$")?r.substring(1):r)]=t}),i):{}}update_referrer_info(){var t={$referrer:Vt(),$referring_domain:Jt()};this.register_once(t,void 0)}loadUserIdentity(){var t=this.storage.get(u)||this.generateAnonymousId(),i=this.storage.get(l)||null,e=this.storage.get(h)||this.generateDeviceId(),r=this.getStoredUserProperties(),n=this.storage.get(a)||"anonymous";return{distinct_id:i,anonymous_id:t||this.generateAnonymousId(),device_id:e,properties:r,user_state:n}}saveUserIdentity(){this.storage.set(u,this.userIdentity.anonymous_id,P),this.storage.set(h,this.userIdentity.device_id,P),this.storage.set(a,this.userIdentity.user_state,P),this.userIdentity.distinct_id?this.storage.set(l,this.userIdentity.distinct_id,P):this.storage.remove(l),this.setStoredUserProperties(this.userIdentity.properties)}getStoredUserProperties(){return this.storage.getJSON(d)||{}}setStoredUserProperties(t){this.storage.setJSON(d,t,P)}register_once(t,i){var e=this.getStoredUserProperties(),r=!1;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(n in e||(e[n]=t[n],r=!0));if(i)for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(s in e||(e[s]=i[s],r=!0));r&&this.setStoredUserProperties(e)}generateAnonymousId(){return"anon_"+_()}generateDeviceId(){return"device_"+_()}getPersonPropertiesHash(t,i,e){return JSON.stringify({distinct_id:t,userPropertiesToSet:i,userPropertiesToSetOnce:e})}isValidDistinctId(t){if(!t||"string"!=typeof t)return!1;var i=t.toLowerCase().trim();return!["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none"].includes(i)&&0!==t.trim().length}isDistinctIdStringLike(t){if(!t||"string"!=typeof t)return!1;var i=t.toLowerCase().trim();return["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none","demo","example","sample","placeholder"].includes(i)}updateStorageMethod(t,i){this.storage=new U({method:t,cross_subdomain:i,sameSite:"Lax"}),this.userIdentity=this.loadUserIdentity()}}var Zt=["LCP","CLS","FCP","INP"],Yt=9e5,ti="[WebVitals]";class ii{constructor(t,i){this.initialized=!1,this.instance=i,this.buffer=this.createEmptyBuffer(),this.config=this.parseConfig(t.capture_performance),this.isEnabled&&T&&this.startIfEnabled()}parseConfig(t){return"boolean"==typeof t?{web_vitals:t}:"object"==typeof t&&null!==t?t:{web_vitals:!1}}get isEnabled(){var t=null==M?void 0:M.protocol;return("http:"===t||"https:"===t)&&!1!==this.config.web_vitals}get allowedMetrics(){return this.config.web_vitals_allowed_metrics||Zt}get flushTimeoutMs(){return this.config.web_vitals_delayed_flush_ms||5e3}get maxAllowedValue(){var t=this.config.__web_vitals_max_value;return void 0===t?Yt:0===t?0:t<6e4?Yt:t}createEmptyBuffer(){return{url:void 0,pathname:void 0,metrics:[],firstMetricTimestamp:void 0}}getWebVitalsCallbacks(){var t;return null===(t=O.__VTiltExtensions__)||void 0===t?void 0:t.webVitalsCallbacks}startIfEnabled(){if(this.isEnabled&&!this.initialized){var t=this.getWebVitalsCallbacks();t?this.startCapturing(t):this.loadWebVitals()}}loadWebVitals(){var t,i=null===(t=O.__VTiltExtensions__)||void 0===t?void 0:t.loadExternalDependency;i?i(this.instance,"web-vitals",t=>{if(t)console.error(ti+" Failed to load web-vitals:",t);else{var i=this.getWebVitalsCallbacks();i?this.startCapturing(i):console.error(ti+" web-vitals loaded but callbacks not registered")}}):console.warn(ti+" External dependency loader not available. Include web-vitals.ts entrypoint or use array.full.js bundle.")}startCapturing(t){if(!this.initialized){var i=this.allowedMetrics,e=this.addToBuffer.bind(this);i.includes("LCP")&&t.onLCP&&t.onLCP(e),i.includes("CLS")&&t.onCLS&&t.onCLS(e,{reportAllChanges:!0}),i.includes("FCP")&&t.onFCP&&t.onFCP(e),i.includes("INP")&&t.onINP&&t.onINP(e),i.includes("TTFB")&&t.onTTFB&&t.onTTFB(e),this.initialized=!0}}getCurrentUrl(){var t;return null===(t=null==T?void 0:T.location)||void 0===t?void 0:t.href}getCurrentPathname(){return null==M?void 0:M.pathname}addToBuffer(t){try{if(!T||!I||!M)return;if(!(null==t?void 0:t.name)||void 0===(null==t?void 0:t.value))return void console.warn(ti+" Invalid metric received",t);if(this.maxAllowedValue>0&&t.value>=this.maxAllowedValue&&"CLS"!==t.name)return void console.warn(ti+" Ignoring "+t.name+" with value >= "+this.maxAllowedValue+"ms");var i=this.getCurrentUrl(),r=this.getCurrentPathname();if(!i)return void console.warn(ti+" Could not determine current URL");this.buffer.url&&this.buffer.url!==i&&this.flush(),this.buffer.url||(this.buffer.url=i,this.buffer.pathname=r),this.buffer.firstMetricTimestamp||(this.buffer.firstMetricTimestamp=Date.now());var n=this.cleanAttribution(t.attribution),s=this.instance.getSessionId(),o=this.getWindowId(),a=e({},t,{attribution:n,timestamp:Date.now(),$current_url:i,$session_id:s,$window_id:o}),h=this.buffer.metrics.findIndex(i=>i.name===t.name);h>=0?this.buffer.metrics[h]=a:this.buffer.metrics.push(a),this.scheduleFlush(),this.buffer.metrics.length>=this.allowedMetrics.length&&this.flush()}catch(t){console.error(ti+" Error adding metric to buffer:",t)}}cleanAttribution(t){if(t){var i=e({},t);return"interactionTargetElement"in i&&delete i.interactionTargetElement,i}}getWindowId(){var t;try{return(null===(t=this.instance.sessionManager)||void 0===t?void 0:t.getWindowId())||null}catch(t){return null}}scheduleFlush(){this.flushTimer&&clearTimeout(this.flushTimer),this.flushTimer=setTimeout(()=>{this.flush()},this.flushTimeoutMs)}flush(){if(this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=void 0),0!==this.buffer.metrics.length){try{var t={$pathname:this.buffer.pathname,$current_url:this.buffer.url};for(var i of this.buffer.metrics)t["$web_vitals_"+i.name+"_value"]=i.value,t["$web_vitals_"+i.name+"_event"]={name:i.name,value:i.value,delta:i.delta,rating:i.rating,id:i.id,navigationType:i.navigationType,attribution:i.attribution,$session_id:i.$session_id,$window_id:i.$window_id};this.instance.capture("$web_vitals",t)}catch(t){console.error(ti+" Error flushing metrics:",t)}this.buffer=this.createEmptyBuffer()}}}function ei(t,i,e){try{if(!(i in t))return()=>{};var r=t[i],n=e(r);return q(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__vtilt_wrapped__:{enumerable:!1,value:!0}})),t[i]=n,()=>{t[i]=r}}catch(t){return()=>{}}}class ri{constructor(t){var i;this._instance=t,this.k=(null===(i=null==T?void 0:T.location)||void 0===i?void 0:i.pathname)||""}get isEnabled(){return!0}startIfEnabled(){this.isEnabled&&this.monitorHistoryChanges()}stop(){this.R&&this.R(),this.R=void 0}monitorHistoryChanges(){var t,i;if(T&&M&&(this.k=M.pathname||"",T.history)){var e=this;(null===(t=T.history.pushState)||void 0===t?void 0:t.__vtilt_wrapped__)||ei(T.history,"pushState",t=>function(i,r,n){t.call(this,i,r,n),e.C("pushState")}),(null===(i=T.history.replaceState)||void 0===i?void 0:i.__vtilt_wrapped__)||ei(T.history,"replaceState",t=>function(i,r,n){t.call(this,i,r,n),e.C("replaceState")}),this.O()}}C(t){var i;try{var e=null===(i=null==T?void 0:T.location)||void 0===i?void 0:i.pathname;if(!e||!M||!I)return;if(e!==this.k&&this.isEnabled){var r={navigation_type:t};this._instance.capture("$pageview",r)}this.k=e}catch(i){console.error("Error capturing "+t+" pageview",i)}}O(){if(!this.R&&T){var t=()=>{this.C("popstate")};y(T,"popstate",t),this.R=()=>{T&&T.removeEventListener("popstate",t)}}}}var ni="[SessionRecording]";class si{constructor(t,i){void 0===i&&(i={}),this._instance=t,this.P=i}get started(){var t;return!!(null===(t=this.A)||void 0===t?void 0:t.isStarted)}get status(){var t;return(null===(t=this.A)||void 0===t?void 0:t.status)||"lazy_loading"}get sessionId(){var t;return(null===(t=this.A)||void 0===t?void 0:t.sessionId)||""}startIfEnabledOrStop(t){var i;if(!this.D||!(null===(i=this.A)||void 0===i?void 0:i.isStarted)){var e=void 0!==Object.assign&&void 0!==Array.from;this.D&&e?(this.U(t),console.info(ni+" starting")):this.stopRecording()}}stopRecording(){var t;null===(t=this.A)||void 0===t||t.stop()}log(t,i){var e;void 0===i&&(i="log"),(null===(e=this.A)||void 0===e?void 0:e.log)?this.A.log(t,i):console.warn(ni+" log called before recorder was ready")}updateConfig(t){var i;this.P=e({},this.P,t),null===(i=this.A)||void 0===i||i.updateConfig(this.P)}get D(){var t,i=this._instance.getConfig(),e=null!==(t=this.P.enabled)&&void 0!==t&&t,r=!i.disable_session_recording;return!!T&&e&&r}get B(){return"recorder"}U(t){var i,e,r,n;if(this.D)if((null===(e=null===(i=null==O?void 0:O.__VTiltExtensions__)||void 0===i?void 0:i.rrweb)||void 0===e?void 0:e.record)&&(null===(r=O.__VTiltExtensions__)||void 0===r?void 0:r.initSessionRecording))this.L(t);else{var s=null===(n=O.__VTiltExtensions__)||void 0===n?void 0:n.loadExternalDependency;s?s(this._instance,this.B,i=>{i?console.error(ni+" could not load recorder:",i):this.L(t)}):console.error(ni+" loadExternalDependency not available. Session recording cannot start.")}}L(t){var i,e=null===(i=O.__VTiltExtensions__)||void 0===i?void 0:i.initSessionRecording;e?(this.A||(this.A=e(this._instance,this.P)),this.A.start(t)):console.error(ni+" initSessionRecording not available after script load")}}var oi=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(oi||{}),ai=Uint8Array,hi=Uint16Array,ui=Int32Array,li=new ai([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]),di=new ai([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]),vi=new ai([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ci=function(t,i){for(var e=new hi(31),r=0;r<31;++r)e[r]=i+=1<<t[r-1];var n=new ui(e[30]);for(r=1;r<30;++r)for(var s=e[r];s<e[r+1];++s)n[s]=s-e[r]<<5|r;return{b:e,r:n}},fi=ci(li,2),pi=fi.b,gi=fi.r;pi[28]=258,gi[258]=28;for(var _i=ci(di,0).r,wi=new hi(32768),mi=0;mi<32768;++mi){var yi=(43690&mi)>>1|(21845&mi)<<1;yi=(61680&(yi=(52428&yi)>>2|(13107&yi)<<2))>>4|(3855&yi)<<4,wi[mi]=((65280&yi)>>8|(255&yi)<<8)>>1}var bi=function(t,i,e){for(var r=t.length,n=0,s=new hi(i);n<r;++n)t[n]&&++s[t[n]-1];var o,a=new hi(i);for(n=1;n<i;++n)a[n]=a[n-1]+s[n-1]<<1;if(e){o=new hi(1<<i);var h=15-i;for(n=0;n<r;++n)if(t[n])for(var u=n<<4|t[n],l=i-t[n],d=a[t[n]-1]++<<l,v=d|(1<<l)-1;d<=v;++d)o[wi[d]>>h]=u}else for(o=new hi(r),n=0;n<r;++n)t[n]&&(o[n]=wi[a[t[n]-1]++]>>15-t[n]);return o},Si=new ai(288);for(mi=0;mi<144;++mi)Si[mi]=8;for(mi=144;mi<256;++mi)Si[mi]=9;for(mi=256;mi<280;++mi)Si[mi]=7;for(mi=280;mi<288;++mi)Si[mi]=8;var Ti=new ai(32);for(mi=0;mi<32;++mi)Ti[mi]=5;var xi=bi(Si,9,0),Ei=bi(Ti,5,0),Ii=function(t){return(t+7)/8|0},$i=function(t,i,e){return(null==e||e>t.length)&&(e=t.length),new ai(t.subarray(i,e))},Mi=function(t,i,e){e<<=7&i;var r=i/8|0;t[r]|=e,t[r+1]|=e>>8},ki=function(t,i,e){e<<=7&i;var r=i/8|0;t[r]|=e,t[r+1]|=e>>8,t[r+2]|=e>>16},Ri=function(t,i){for(var e=[],r=0;r<t.length;++r)t[r]&&e.push({s:r,f:t[r]});var n=e.length,s=e.slice();if(!n)return{t:Bi,l:0};if(1==n){var o=new ai(e[0].s+1);return o[e[0].s]=1,{t:o,l:1}}e.sort(function(t,i){return t.f-i.f}),e.push({s:-1,f:25001});var a=e[0],h=e[1],u=0,l=1,d=2;for(e[0]={s:-1,f:a.f+h.f,l:a,r:h};l!=n-1;)a=e[e[u].f<e[d].f?u++:d++],h=e[u!=l&&e[u].f<e[d].f?u++:d++],e[l++]={s:-1,f:a.f+h.f,l:a,r:h};var v=s[0].s;for(r=1;r<n;++r)s[r].s>v&&(v=s[r].s);var c=new hi(v+1),f=Ci(e[l-1],c,0);if(f>i){r=0;var p=0,g=f-i,_=1<<g;for(s.sort(function(t,i){return c[i.s]-c[t.s]||t.f-i.f});r<n;++r){var w=s[r].s;if(!(c[w]>i))break;p+=_-(1<<f-c[w]),c[w]=i}for(p>>=g;p>0;){var m=s[r].s;c[m]<i?p-=1<<i-c[m]++-1:++r}for(;r>=0&&p;--r){var y=s[r].s;c[y]==i&&(--c[y],++p)}f=i}return{t:new ai(c),l:f}},Ci=function(t,i,e){return-1==t.s?Math.max(Ci(t.l,i,e+1),Ci(t.r,i,e+1)):i[t.s]=e},Oi=function(t){for(var i=t.length;i&&!t[--i];);for(var e=new hi(++i),r=0,n=t[0],s=1,o=function(t){e[r++]=t},a=1;a<=i;++a)if(t[a]==n&&a!=i)++s;else{if(!n&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(n),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(n);s=1,n=t[a]}return{c:e.subarray(0,r),n:i}},Pi=function(t,i){for(var e=0,r=0;r<i.length;++r)e+=t[r]*i[r];return e},Ai=function(t,i,e){var r=e.length,n=Ii(i+2);t[n]=255&r,t[n+1]=r>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;s<r;++s)t[n+s+4]=e[s];return 8*(n+4+r)},Di=function(t,i,e,r,n,s,o,a,h,u,l){Mi(i,l++,e),++n[256];for(var d=Ri(n,15),v=d.t,c=d.l,f=Ri(s,15),p=f.t,g=f.l,_=Oi(v),w=_.c,m=_.n,y=Oi(p),b=y.c,S=y.n,T=new hi(19),x=0;x<w.length;++x)++T[31&w[x]];for(x=0;x<b.length;++x)++T[31&b[x]];for(var E=Ri(T,7),I=E.t,M=E.l,k=19;k>4&&!I[vi[k-1]];--k);var R,C,O,P,A=u+5<<3,D=Pi(n,Si)+Pi(s,Ti)+o,U=Pi(n,v)+Pi(s,p)+o+14+3*k+Pi(T,I)+2*T[16]+3*T[17]+7*T[18];if(h>=0&&A<=D&&A<=U)return Ai(i,l,t.subarray(h,h+u));if(Mi(i,l,1+(U<D)),l+=2,U<D){R=bi(v,c,0),C=v,O=bi(p,g,0),P=p;var B=bi(I,M,0);Mi(i,l,m-257),Mi(i,l+5,S-1),Mi(i,l+10,k-4),l+=14;for(x=0;x<k;++x)Mi(i,l+3*x,I[vi[x]]);l+=3*k;for(var L=[w,b],j=0;j<2;++j){var N=L[j];for(x=0;x<N.length;++x){var q=31&N[x];Mi(i,l,B[q]),l+=I[q],q>15&&(Mi(i,l,N[x]>>5&127),l+=N[x]>>12)}}}else R=xi,C=Si,O=Ei,P=Ti;for(x=0;x<a;++x){var z=r[x];if(z>255){ki(i,l,R[(q=z>>18&31)+257]),l+=C[q+257],q>7&&(Mi(i,l,z>>23&31),l+=li[q]);var F=31&z;ki(i,l,O[F]),l+=P[F],F>3&&(ki(i,l,z>>5&8191),l+=di[F])}else ki(i,l,R[z]),l+=C[z]}return ki(i,l,R[256]),l+C[256]},Ui=new ui([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Bi=new ai(0),Li=function(){for(var t=new Int32Array(256),i=0;i<256;++i){for(var e=i,r=9;--r;)e=(1&e&&-306674912)^e>>>1;t[i]=e}return t}(),ji=function(t,i,e,r,n){if(!n&&(n={l:1},i.dictionary)){var s=i.dictionary.subarray(-32768),o=new ai(s.length+t.length);o.set(s),o.set(t,s.length),t=o,n.w=s.length}return function(t,i,e,r,n,s){var o=s.z||t.length,a=new ai(r+o+5*(1+Math.ceil(o/7e3))+n),h=a.subarray(r,a.length-n),u=s.l,l=7&(s.r||0);if(i){l&&(h[0]=s.r>>3);for(var d=Ui[i-1],v=d>>13,c=8191&d,f=(1<<e)-1,p=s.p||new hi(32768),g=s.h||new hi(f+1),_=Math.ceil(e/3),w=2*_,m=function(i){return(t[i]^t[i+1]<<_^t[i+2]<<w)&f},y=new ui(25e3),b=new hi(288),S=new hi(32),T=0,x=0,E=s.i||0,I=0,M=s.w||0,k=0;E+2<o;++E){var R=m(E),C=32767&E,O=g[R];if(p[C]=O,g[R]=C,M<=E){var P=o-E;if((T>7e3||I>24576)&&(P>423||!u)){l=Di(t,h,0,y,b,S,x,I,k,E-k,l),I=T=x=0,k=E;for(var A=0;A<286;++A)b[A]=0;for(A=0;A<30;++A)S[A]=0}var D=2,U=0,B=c,L=C-O&32767;if(P>2&&R==m(E-L))for(var j=Math.min(v,P)-1,N=Math.min(32767,E),q=Math.min(258,P);L<=N&&--B&&C!=O;){if(t[E+D]==t[E+D-L]){for(var z=0;z<q&&t[E+z]==t[E+z-L];++z);if(z>D){if(D=z,U=L,z>j)break;var F=Math.min(L,z-2),W=0;for(A=0;A<F;++A){var V=E-L+A&32767,J=V-p[V]&32767;J>W&&(W=J,O=V)}}}L+=(C=O)-(O=p[C])&32767}if(U){y[I++]=268435456|gi[D]<<18|_i[U];var X=31&gi[D],H=31&_i[U];x+=li[X]+di[H],++b[257+X],++S[H],M=E+D,++T}else y[I++]=t[E],++b[t[E]]}}for(E=Math.max(E,M);E<o;++E)y[I++]=t[E],++b[t[E]];l=Di(t,h,u,y,b,S,x,I,k,E-k,l),u||(s.r=7&l|h[l/8|0]<<3,l-=7,s.h=g,s.p=p,s.i=E,s.w=M)}else{for(E=s.w||0;E<o+u;E+=65535){var K=E+65535;K>=o&&(h[l/8|0]=u,K=o),l=Ai(h,l+1,t.subarray(E,K))}s.i=o}return $i(a,0,r+Ii(l)+n)}(t,null==i.level?6:i.level,null==i.mem?n.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):20:12+i.mem,e,r,n)},Ni=function(t,i,e){for(;e;++i)t[i]=e,e>>>=8};function qi(t,i){i||(i={});var e=function(){var t=-1;return{p:function(i){for(var e=t,r=0;r<i.length;++r)e=Li[255&e^i[r]]^e>>>8;t=e},d:function(){return~t}}}(),r=t.length;e.p(t);var n,s=ji(t,i,10+((n=i).filename?n.filename.length+1:0),8),o=s.length;return function(t,i){var e=i.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=i.level<2?4:9==i.level?2:0,t[9]=3,0!=i.mtime&&Ni(t,4,Math.floor(new Date(i.mtime||Date.now())/1e3)),e){t[3]=8;for(var r=0;r<=e.length;++r)t[r+10]=e.charCodeAt(r)}}(s,i),Ni(s,o-8,e.d()),Ni(s,o-4,r),s}var zi="undefined"!=typeof TextEncoder&&new TextEncoder,Fi="undefined"!=typeof TextDecoder&&new TextDecoder;try{Fi.decode(Bi,{stream:!0})}catch(t){}oi.MouseMove,oi.MouseInteraction,oi.Scroll,oi.ViewportResize,oi.Input,oi.TouchMove,oi.MediaInteraction,oi.Drag;var Wi,Vi="text/plain";!function(t){t.GZipJS="gzip-js",t.None="none"}(Wi||(Wi={}));var Ji=t=>{var{data:i,compression:e}=t;if(i){var r=(t=>JSON.stringify(t,(t,i)=>"bigint"==typeof i?i.toString():i))(i),n=new Blob([r]).size;if(e===Wi.GZipJS&&n>=1024)try{var s=qi(function(t,i){if(zi)return zi.encode(t);for(var e=t.length,r=new ai(t.length+(t.length>>1)),n=0,s=function(t){r[n++]=t},o=0;o<e;++o){if(n+5>r.length){var a=new ai(n+8+(e-o<<1));a.set(r),r=a}var h=t.charCodeAt(o);h<128||i?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&t.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return $i(r,0,n)}(r),{mtime:0}),o=new Blob([s],{type:Vi});if(o.size<.95*n)return{contentType:Vi,body:o,estimatedSize:o.size}}catch(t){}return{contentType:"application/json",body:r,estimatedSize:n}}},Xi=[{name:"fetch",available:"undefined"!=typeof fetch,method:t=>{var r=Ji(t);if(r){var{contentType:n,body:s,estimatedSize:o}=r,a=t.compression===Wi.GZipJS&&n===Vi?t.url+(t.url.includes("?")?"&":"?")+"compression=gzip-js":t.url,h=e({"Content-Type":n},t.headers||{}),u=new AbortController,l=t.timeout?setTimeout(()=>u.abort(),t.timeout):null;fetch(a,{method:t.method||"POST",headers:h,body:s,keepalive:o<52428.8,signal:u.signal}).then(function(){var e=i(function*(i){var e,r=yield i.text(),n={statusCode:i.status,text:r};if(200===i.status)try{n.json=JSON.parse(r)}catch(t){}null===(e=t.callback)||void 0===e||e.call(t,n)});return function(t){return e.apply(this,arguments)}}()).catch(()=>{var i;null===(i=t.callback)||void 0===i||i.call(t,{statusCode:0})}).finally(()=>{l&&clearTimeout(l)})}}},{name:"XHR",available:"undefined"!=typeof XMLHttpRequest,method:t=>{var i=Ji(t);if(i){var{contentType:e,body:r}=i,n=t.compression===Wi.GZipJS&&e===Vi?t.url+(t.url.includes("?")?"&":"?")+"compression=gzip-js":t.url,s=new XMLHttpRequest;s.open(t.method||"POST",n,!0),t.headers&&Object.entries(t.headers).forEach(t=>{var[i,e]=t;s.setRequestHeader(i,e)}),s.setRequestHeader("Content-Type",e),t.timeout&&(s.timeout=t.timeout),s.onreadystatechange=()=>{var i;if(4===s.readyState){var e={statusCode:s.status,text:s.responseText};if(200===s.status)try{e.json=JSON.parse(s.responseText)}catch(t){}null===(i=t.callback)||void 0===i||i.call(t,e)}},s.onerror=()=>{var i;null===(i=t.callback)||void 0===i||i.call(t,{statusCode:0})},s.send(r)}}},{name:"sendBeacon",available:"undefined"!=typeof navigator&&!!navigator.sendBeacon,method:t=>{var i=Ji(t);if(i){var{contentType:e,body:r}=i;try{var n="string"==typeof r?new Blob([r],{type:e}):r,s=t.compression===Wi.GZipJS&&e===Vi?t.url+(t.url.includes("?")?"&":"?")+"compression=gzip-js":t.url;navigator.sendBeacon(s,n)}catch(t){}}}}],Hi=t=>{var i,e=t.transport||"fetch",r=Xi.find(t=>t.name===e&&t.available)||Xi.find(t=>t.available);if(!r)return console.error("vTilt: No available transport method"),void(null===(i=t.callback)||void 0===i||i.call(t,{statusCode:0}));r.method(t)};class Ki{constructor(t,i){var e,r,n,s;this.j=!0,this.N=[],this.q=(e=(null==i?void 0:i.flush_interval_ms)||3e3,r=250,n=5e3,s=3e3,"number"!=typeof e||isNaN(e)?s:Math.min(Math.max(e,r),n)),this.F=t}get length(){return this.N.length}enqueue(t){this.N.push(t),this.W||this.V()}unload(){if(this.J(),0!==this.N.length){var t=this.X();for(var i in t){var r=t[i];this.F(e({},r,{transport:"sendBeacon"}))}}}enable(){this.j=!1,this.V()}pause(){this.j=!0,this.J()}flush(){this.J(),this.H(),this.V()}V(){this.j||(this.W=setTimeout(()=>{this.J(),this.H(),this.N.length>0&&this.V()},this.q))}J(){this.W&&(clearTimeout(this.W),this.W=void 0)}H(){if(0!==this.N.length){var t=this.X(),i=Date.now();for(var e in t){var r=t[e];r.events.forEach(t=>{var e=new Date(t.timestamp).getTime();t.$offset=Math.abs(e-i)}),this.F(r)}}}X(){var t={};return this.N.forEach(i=>{var e=i.batchKey||i.url;t[e]||(t[e]={url:i.url,events:[],batchKey:i.batchKey}),t[e].events.push(i.event)}),this.N=[],t}}class Gi{constructor(t){this.K=!1,this.G=3e3,this.N=[],this.Z=!0,this.F=t.sendRequest,this.Y=t.sendBeacon,T&&void 0!==E&&"onLine"in E&&(this.Z=E.onLine,y(T,"online",()=>{this.Z=!0,this.tt()}),y(T,"offline",()=>{this.Z=!1}))}get length(){return this.N.length}enqueue(t,i){if(void 0===i&&(i=0),i>=10)console.warn("VTilt: Request failed after 10 retries, giving up");else{var e=function(t){var i=3e3*Math.pow(2,t),e=i/2,r=Math.min(18e5,i),n=(Math.random()-.5)*(r-e);return Math.ceil(r+n)}(i),r=Date.now()+e;this.N.push({retryAt:r,request:t,retriesPerformedSoFar:i+1});var n="VTilt: Enqueued failed request for retry in "+Math.round(e/1e3)+"s";this.Z||(n+=" (Browser is offline)"),console.warn(n),this.K||(this.K=!0,this.it())}}retriableRequest(t){var e=this;return i(function*(){try{var i=yield e.F(t);200!==i.statusCode&&(i.statusCode<400||i.statusCode>=500)&&e.enqueue(t,0)}catch(i){e.enqueue(t,0)}})()}it(){this.et&&clearTimeout(this.et),this.et=setTimeout(()=>{this.Z&&this.N.length>0&&this.tt(),this.N.length>0?this.it():this.K=!1},this.G)}tt(){var t=this,e=Date.now(),r=[],n=[];this.N.forEach(t=>{t.retryAt<e?n.push(t):r.push(t)}),this.N=r,n.forEach(function(){var e=i(function*(i){var{request:e,retriesPerformedSoFar:r}=i;try{var n=yield t.F(e);200!==n.statusCode&&(n.statusCode<400||n.statusCode>=500)&&t.enqueue(e,r)}catch(i){t.enqueue(e,r)}});return function(t){return e.apply(this,arguments)}}())}unload(){this.et&&(clearTimeout(this.et),this.et=void 0),this.N.forEach(t=>{var{request:i}=t;try{this.Y(i)}catch(t){console.error("VTilt: Failed to send beacon on unload",t)}}),this.N=[]}}var Qi="vt_rate_limit";class Zi{constructor(t){var i,e;void 0===t&&(t={}),this.lastEventRateLimited=!1,this.eventsPerSecond=null!==(i=t.eventsPerSecond)&&void 0!==i?i:10,this.eventsBurstLimit=Math.max(null!==(e=t.eventsBurstLimit)&&void 0!==e?e:10*this.eventsPerSecond,this.eventsPerSecond),this.persistence=t.persistence,this.captureWarning=t.captureWarning,this.lastEventRateLimited=this.checkRateLimit(!0).isRateLimited}checkRateLimit(t){var i,e,r,n;void 0===t&&(t=!1);var s=Date.now(),o=null!==(e=null===(i=this.persistence)||void 0===i?void 0:i.get(Qi))&&void 0!==e?e:{tokens:this.eventsBurstLimit,last:s},a=(s-o.last)/1e3;o.tokens+=a*this.eventsPerSecond,o.last=s,o.tokens>this.eventsBurstLimit&&(o.tokens=this.eventsBurstLimit);var h=o.tokens<1;return h||t||(o.tokens=Math.max(0,o.tokens-1)),!h||this.lastEventRateLimited||t||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=h,null===(n=this.persistence)||void 0===n||n.set(Qi,o),{isRateLimited:h,remainingTokens:o.tokens}}shouldAllowEvent(){return!this.checkRateLimit(!1).isRateLimited}getRemainingTokens(){return this.checkRateLimit(!0).remainingTokens}}var Yi=Array.isArray;class te{constructor(t){void 0===t&&(t={}),this.version="1.1.5",this.__loaded=!1,this.rt=!1,this.nt=null,this.__request_queue=[],this.st=!1,this.ot=!1,this.configManager=new r(t);var i=this.configManager.getConfig();this.sessionManager=new B(i.storage||"cookie",i.cross_subdomain_cookie),this.userManager=new Qt(i.persistence||"localStorage",i.cross_subdomain_cookie),this.webVitalsManager=new ii(i,this),this.rateLimiter=new Zi({eventsPerSecond:10,eventsBurstLimit:100,captureWarning:t=>{this.ht("$$client_ingestion_warning",{$$client_ingestion_warning_message:t})}}),this.retryQueue=new Gi({sendRequest:t=>this.ut(t),sendBeacon:t=>this.lt(t)}),this.requestQueue=new Ki(t=>this.dt(t),{flush_interval_ms:3e3})}init(t,i,e){var r;if(e&&e!==ee){var n=null!==(r=ie[e])&&void 0!==r?r:new te;return n._init(t,i,e),ie[e]=n,ie[ee][e]=n,n}return this._init(t,i,e)}_init(t,i,r){if(void 0===i&&(i={}),this.__loaded)return console.warn("vTilt: You have already initialized vTilt! Re-initializing is a no-op"),this;this.updateConfig(e({},i,{projectId:t||i.projectId,name:r})),this.__loaded=!0;var n=this.configManager.getConfig();return this.userManager.set_initial_person_info(n.mask_personal_data_properties,n.custom_personal_data_properties),this.historyAutocapture=new ri(this),this.historyAutocapture.startIfEnabled(),this.ct(),this.ft(),this.gt(),!1!==n.capture_pageview&&this._t(),this}gt(){this.requestQueue.enable()}ft(){if(T){var t=()=>{this.requestQueue.unload(),this.retryQueue.unload()};y(T,"beforeunload",t),y(T,"pagehide",t)}}toString(){var t,i=null!==(t=this.configManager.getConfig().name)&&void 0!==t?t:ee;return i!==ee&&(i=ee+"."+i),i}getCurrentDomain(){if(!M)return"";var t=M.protocol,i=M.hostname,e=M.port;return t+"//"+i+(e?":"+e:"")}wt(){var t=this.configManager.getConfig();return!(!t.projectId||!t.token)||(this.st||(console.warn("VTilt: projectId and token are required for tracking. Events will be skipped until init() or updateConfig() is called with these fields."),this.st=!0),!1)}buildUrl(){var t=this.configManager.getConfig(),{proxyUrl:i,proxy:e,api_host:r,token:n}=t;return i||(e?e+"/api/tracking?token="+n:r?r.replace(/\/+$/gm,"")+"/api/tracking?token="+n:"/api/tracking?token="+n)}sendRequest(t,i,e){if(this.wt()){if(e&&void 0!==T)if(T.__VTILT_ENQUEUE_REQUESTS)return void this.__request_queue.push({url:t,event:i});this.requestQueue.enqueue({url:t,event:i})}}dt(t){var{transport:i}=t;"sendBeacon"!==i?this.retryQueue.retriableRequest(t):this.lt(t)}ut(t){return new Promise(i=>{var{url:e,events:r}=t,n=1===r.length?r[0]:{events:r},s=this.configManager.getConfig().disable_compression?Wi.None:Wi.GZipJS;Hi({url:e,data:n,method:"POST",transport:"XHR",compression:s,callback:t=>{i({statusCode:t.statusCode})}})})}lt(t){var{url:i,events:e}=t,r=1===e.length?e[0]:{events:e},n=this.configManager.getConfig().disable_compression?Wi.None:Wi.GZipJS;Hi({url:i,data:r,method:"POST",transport:"sendBeacon",compression:n})}yt(t){this.sendRequest(t.url,t.event,!1)}capture(t,i,r){if(this.sessionManager.setSessionId(),E&&E.userAgent&&function(t){return!(t&&"string"==typeof t&&t.length>500)}(E.userAgent)&&((null==r?void 0:r.skip_client_rate_limiting)||this.rateLimiter.shouldAllowEvent())){var n=this.buildUrl(),s=Gt(),o=this.userManager.getUserProperties(),a=this.userManager.get_initial_props(),h=this.sessionManager.getSessionId(),u=this.sessionManager.getWindowId(),l=this.userManager.getAnonymousId(),d={};!this.ot&&Object.keys(a).length>0&&Object.assign(d,a),i.$set_once&&Object.assign(d,i.$set_once);var v=e({},s,o,{$session_id:h,$window_id:u},l?{$anon_distinct_id:l}:{},Object.keys(d).length>0?{$set_once:d}:{},i.$set?{$set:i.$set}:{},i);!this.ot&&Object.keys(a).length>0&&(this.ot=!0),"$pageview"===t&&I&&(v.title=I.title);var c,f,p=this.configManager.getConfig();if(!1!==p.stringifyPayload){if(c=Object.assign({},v,p.globalAttributes),!w(c=JSON.stringify(c)))return}else if(c=Object.assign({},v,p.globalAttributes),!w(JSON.stringify(c)))return;f="$identify"===t?this.userManager.getAnonymousId():this.userManager.getDistinctId()||this.userManager.getAnonymousId();var g={timestamp:(new Date).toISOString(),event:t,project_id:p.projectId||"",payload:c,distinct_id:f,anonymous_id:l};this.sendRequest(n,g,!0)}}ht(t,i){this.capture(t,i,{skip_client_rate_limiting:!0})}trackEvent(t,i){void 0===i&&(i={}),this.capture(t,i)}identify(t,i,e){if("number"==typeof t&&(t=String(t),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),t)if(this.userManager.isDistinctIdStringLikePublic(t))console.error('The string "'+t+'" 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"!==t){var r=this.userManager.getDistinctId(),n=this.userManager.getAnonymousId(),s=this.userManager.getDeviceId(),o="anonymous"===this.userManager.getUserState();if(!s){var a=r||n;this.userManager.ensureDeviceId(a)}t!==r&&o?(this.userManager.setUserState("identified"),this.userManager.updateUserProperties(i,e),this.capture("$identify",{distinct_id:t,$anon_distinct_id:n,$set:i||{},$set_once:e||{}}),this.userManager.setDistinctId(t)):i||e?(o&&this.userManager.setUserState("identified"),this.userManager.updateUserProperties(i,e),this.capture("$set",{$set:i||{},$set_once:e||{}})):t!==r&&(this.userManager.setUserState("identified"),this.userManager.setDistinctId(t))}else console.error('The string "'+t+'" 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(t,i){this.userManager.setUserProperties(t,i)&&this.capture("$set",{$set:t||{},$set_once:i||{}})}resetUser(t){this.sessionManager.resetSessionId(),this.userManager.reset(t)}getUserIdentity(){return this.userManager.getUserIdentity()}getDeviceId(){return this.userManager.getDeviceId()}getUserState(){return this.userManager.getUserState()}createAlias(t,i){var e=this.userManager.createAlias(t,i);e?this.capture("$alias",{$original_id:e.original,$alias_id:e.distinct_id}):t===(i||this.userManager.getDistinctId()||this.userManager.getAnonymousId())&&this.identify(t)}_t(){I&&("visible"===I.visibilityState?this.rt||(this.rt=!0,setTimeout(()=>{if(I&&M){this.capture("$pageview",{navigation_type:"initial_load"})}},300),this.nt&&(I.removeEventListener("visibilitychange",this.nt),this.nt=null)):this.nt||(this.nt=()=>{this._t()},y(I,"visibilitychange",this.nt)))}getConfig(){return this.configManager.getConfig()}getSessionId(){return this.sessionManager.getSessionId()}getDistinctId(){return this.userManager.getDistinctId()||this.userManager.getAnonymousId()}getAnonymousId(){return this.userManager.getAnonymousId()}updateConfig(t){this.configManager.updateConfig(t);var i=this.configManager.getConfig();this.sessionManager=new B(i.storage||"cookie",i.cross_subdomain_cookie),this.userManager=new Qt(i.persistence||"localStorage",i.cross_subdomain_cookie),this.webVitalsManager=new ii(i,this),this.sessionRecording&&i.session_recording&&this.sessionRecording.updateConfig(this.bt(i))}ct(){var t=this.configManager.getConfig();if(!t.disable_session_recording){var i=this.bt(t);this.sessionRecording=new si(this,i),i.enabled&&this.sessionRecording.startIfEnabledOrStop("recording_initialized")}}bt(t){var i,e,r,n=t.session_recording||{};return{enabled:null!==(i=n.enabled)&&void 0!==i&&i,sampleRate:n.sampleRate,minimumDurationMs:n.minimumDurationMs,sessionIdleThresholdMs:n.sessionIdleThresholdMs,fullSnapshotIntervalMs:n.fullSnapshotIntervalMs,captureConsole:null!==(e=n.captureConsole)&&void 0!==e&&e,captureNetwork:null!==(r=n.captureNetwork)&&void 0!==r&&r,captureCanvas:n.captureCanvas,blockClass:n.blockClass,blockSelector:n.blockSelector,ignoreClass:n.ignoreClass,maskTextClass:n.maskTextClass,maskTextSelector:n.maskTextSelector,maskAllInputs:n.maskAllInputs,maskInputOptions:n.maskInputOptions,masking:n.masking,recordHeaders:n.recordHeaders,recordBody:n.recordBody,compressEvents:n.compressEvents,__mutationThrottlerRefillRate:n.__mutationThrottlerRefillRate,__mutationThrottlerBucketSize:n.__mutationThrottlerBucketSize}}startSessionRecording(){if(!this.sessionRecording){var t=this.configManager.getConfig(),i=this.bt(t);i.enabled=!0,this.sessionRecording=new si(this,i)}this.sessionRecording.startIfEnabledOrStop("recording_initialized")}stopSessionRecording(){var t;null===(t=this.sessionRecording)||void 0===t||t.stopRecording()}isSessionRecordingActive(){var t;return"active"===(null===(t=this.sessionRecording)||void 0===t?void 0:t.status)}getSessionRecordingId(){var t;return(null===(t=this.sessionRecording)||void 0===t?void 0:t.sessionId)||null}_execute_array(t){Array.isArray(t)&&t.forEach(t=>{if(t&&Array.isArray(t)&&t.length>0){var i=t[0],e=t.slice(1);if("function"==typeof this[i])try{this[i](...e)}catch(t){console.error("vTilt: Error executing queued call "+i+":",t)}}})}_dom_loaded(){this.__request_queue.forEach(t=>{this.yt(t)}),this.__request_queue=[],this.gt()}}var ie={},ee="vt",re=!(void 0!==R||void 0!==k)&&-1===(null==C?void 0:C.indexOf("MSIE"))&&-1===(null==C?void 0:C.indexOf("Mozilla"));null!=T&&(T.__VTILT_ENQUEUE_REQUESTS=re);var ne,se,oe=function(){function t(){t.done||(t.done=!0,re=!1,null!=T&&(T.__VTILT_ENQUEUE_REQUESTS=!1),m(ie,function(t){t._dom_loaded()}))}I&&"function"==typeof I.addEventListener?"complete"===I.readyState?t():y(I,"DOMContentLoaded",t,{capture:!1}):T&&console.error("Browser doesn't support `document.addEventListener` so vTilt couldn't be initialized")};"undefined"!=typeof window&&window.vt&&Array.isArray(window.vt)&&(ne=ie[ee]=new te,(se=O.vt)&&m(se._i,function(t){if(t&&Yi(t)){var i=ne.init(t[0],t[1],t[2]),e=se[t[2]||"vt"]||se;i&&i._execute_array(e)}}),O.vt=ne,oe());var ae=function(){var t=ie[ee]=new te;return oe(),t}();exports.ALL_WEB_VITALS_METRICS=["LCP","CLS","FCP","INP","TTFB"],exports.DEFAULT_WEB_VITALS_METRICS=Zt,exports.VTilt=te,exports.default=ae,exports.vt=ae;
2
2
  //# sourceMappingURL=main.js.map