1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,75883,e=>{"use strict";var t=e.i(62751),r=e.i(9874);let n="px-4 sm:px-6 md:px-8 lg:px-10";e.s(["CaseStudyGirdle",0,({children:e,className:n,noPadding:i=!1,...o})=>(0,t.jsx)("div",{className:(0,r.cx)("max-w-[704px] lg:max-w-7xl mx-auto w-full",i?"px-0":"px-4 sm:px-6 md:px-8 lg:px-10",n),...o,children:e}),"GIRDLE_CLASSNAME",0,n,"GIRDLE_LEFT_CLASSNAME",0,"pl-4 sm:pl-6 md:pl-8 lg:pl-10","MarketingGirdle",0,({children:e,className:i,noPadding:o=!1,...a})=>(0,t.jsx)("div",{className:(0,r.cx)("max-w-7xl mx-auto w-full",o?"px-0":n,i),...a,children:e}),"MarketingGirdleLeftHalf",0,({children:e,className:n,...i})=>(0,t.jsx)("div",{className:(0,r.cx)("max-w-[40rem] ml-auto w-full px-4 sm:px-6 md:pl-8 lg:pl-10",n),...i,children:e}),"MarketingGirdleNoPaddingMobile",0,({children:e,className:n,noPadding:i=!1,...o})=>(0,t.jsx)("div",{className:(0,r.cx)("max-w-7xl mx-auto w-full",i?"px-0":"px-0 sm:px-6 md:px-8 lg:px-10",n),...o,children:e}),"MarketingGirdleRightHalf",0,({children:e,className:n,...i})=>(0,t.jsx)("div",{className:(0,r.cx)("max-w-[40rem] mr-auto w-full px-4 sm:px-6 md:pr-8 lg:pr-10",n),...i,children:e})])},81141,e=>{"use strict";var t=e.i(62751);e.s(["CustomChevron",0,({fill:e,...r})=>(0,t.jsx)("svg",{width:"12",height:"23",viewBox:"0 0 12 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:(0,t.jsx)("path",{d:"M9.6145 11.5L0 23H2.3855L12 11.5L2.3855 0H0L9.6145 11.5Z",fill:e})})])},25071,e=>{"use strict";var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,r)};function r(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function o(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function a(e,t){return function(r,n){t(r,n,e)}}function s(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})}function c(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){var c=[s,u];if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var l=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);
vendor: 4,124 bytes, line 1
1(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function d(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||l(t,e,r)}function f(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function p(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function v(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function y(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),n[Symbol.asyncIterator]=function(){return this},n;function a(e,t){i[e]&&(n[e]=function(t){return new Promise(function(r,n){o.push([e,t,r,n])>1||s(e,t)})},t&&(n[e]=t(n[e])))}function s(e,t){try{var r;(r=i[e](t)).value instanceof m?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function b(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:m(e[n](t)),done:!1}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=f(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){var o,a,s;o=n,a=i,s=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){o({value:e,done:s})},a)})}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&l(t,e,r);return k(t,e),t}function S(e){return e&&e.__esModule?e:{default:e}}function T(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function x(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function A(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function C(e,t,r){if(null!=t){var n,i;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");
1if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var I="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function P(e){function t(t){e.error=e.hasError?new I(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function i(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(o).then(i,function(e){return t(e),i()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}let O={__extends:r,__assign:n,__rest:i,__decorate:o,__param:a,__metadata:s,__awaiter:u,__generator:c,__createBinding:l,__exportStar:d,__values:f,__read:h,__spread:g,__spreadArrays:p,__spreadArray:v,__await:m,__asyncGenerator:y,__asyncDelegator:b,__asyncValues:_,__makeTemplateOb
1ject:w,__importStar:E,__importDefault:S,__classPrivateFieldGet:T,__classPrivateFieldSet:x,__classPrivateFieldIn:A,__addDisposableResource:C,__disposeResources:P};e.s(["__addDisposableResource",0,C,"__assign",()=>n,"__asyncDelegator",0,b,"__asyncGenerator",0,y,"__asyncValues",0,_,"__await",0,m,"__awaiter",0,u,"__classPrivateFieldGet",0,T,"__classPrivateFieldIn",0,A,"__classPrivateFieldSet",0,x,"__createBinding",0,l,"__decorate",0,o,"__disposeResources",0,P,"__esDecorate",0,function(e,t,r,n,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),f=!1,h=r.length-1;h>=0;h--){var g={};for(var p in n)g[p]="access"===p?{}:n[p];for(var p in n.access)g.access[p]=n.access[p];g.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var v=(0,r[h])("accessor"===u?{get:d.get,set:d.set}:d[c],g);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw TypeError("Object expected");(s=a(v.get))&&(d.get=s),(s=a(v.set))&&(d.set=s),(s=a(v.init))&&i.unshift(s)}else(s=a(v))&&("field"===u?i.unshift(s):d[c]=s)}l&&Object.defineProperty(l,n.name,d),f=!0},"__exportStar",0,d,"__extends",0,r,"__generator",0,c,"__importDefault",0,S,"__importStar",0,E,"__makeTemplateOb
1ject",0,w,"__metadata",0,s,"__param",0,a,"__propKey",0,function(e){return"symbol"==typeof e?e:"".concat(e)},"__read",0,h,"__rest",0,i,"__runInitializers",0,function(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0},"__setFunctionName",0,function(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})},"__spread",0,g,"__spreadArray",0,v,"__spreadArrays",0,p,"__values",0,f,"default",0,O])},90602,(e,t,r)=>{t.exports=e.r(82611)},19002,65696,27184,e=>{"use strict";let t;var r,n,i,o,a,s,u,c,l,d,f,h,g,p,v,m,y,b,_,w,k,E,S,T,x,A=e.i(68796),C=e.i(25071),I="".concat("AMP","_unsent"),P="$default_instance",O="https://api2.amplitude.com/2/httpapi",M="dclid",R="fbclid",L="gbraid",N="gclid",D="ko_click_id",j="li_fat_id",U="msclkid",F="rdt_cid",B="ttclid",q="twclid",G="wbraid",H={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},z=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],V=["authorization","cookie","set-cookie"],$=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var r=e[t];if(!K(t,r))return!1}return!0},K=function(e,t){var r,n;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=(0,C.__values)(t),a=o.next();!a.done;a=o.next()){var s=a.value;if(Array.isArray(s))return!1;if("object"==typeof s)i=i&&$(s);else if(!["number","string"].includes(typeof s))return!1;if(!i)return!1}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}else if(null==t)return!1;else if("object"==typeof t)return $(t);else if(!["number","string","boolean"].includes(typeof t))return!1;return!0},W=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return(0,C.__assign)({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(g.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(g.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(g.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(g.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(g.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(g.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(g.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(g.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(g.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[g.CLEAR_ALL]="-",this},e.prototype._safeSet=function(e,t,r){if(this._validate(e,t,r)){var n=this._properties[e];return void 0===n&&(n={},this._properties[e]=n),n[t]=r,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,r){return!(void 0!==this._properties[g.CLEAR_ALL]||this._propertySet.has(t))&&(e===g.ADD?"number"==typeof r:e===g.UNSET||e===g.REMOVE||K(t,r))},e}();(r=g||(g={})).SET="$set",r.SET_ONCE="$setOnce",r.ADD="$add",r.APPEND="$append",r.PREPEND="$prepend",r.REMOVE="$remove",r.PREINSERT="$preInsert",r.POSTINSERT="$postInsert",r.UNSET="$unset",r.CLEAR_ALL="$clearAll";var J=[g.CLEAR_ALL,g.UNSET,g.SET,g.SET_ONCE,g.ADD,g.APPEND,g.PREPEND,g.PREINSERT,g.POSTINSERT,g.REMOVE];e.s(["Identify",0,W,"OrderedIdentifyOperations",0,J],65696),(n=p||(p={}))[n.None=0]="None",n[n.Error=1]="Error",n[n.Warn=2]="Warn",n[n.Verbose
1=3]="Verbose",n[n.Debug=4]="Debug";var Y=function(e){return void 0===e&&(e=0),(Error().stack||"").split("\n").slice(2+e).map(function(e){return e.trim()})},Q=function(e){return function(){var t=(0,C.__assign)({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},Z=function(e,t){var r,n;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=(0,C.__values)(t.split(".")),o=i.next();!o.done;o=i.next()){var a=o.value;if(!(a in e))return;e=e[a]}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e},X=function(e,t){return function(){var r,n,i={};try{for(var o=(0,C.__values)(t),a=o.next();!a.done;a=o.next()){var s=a.value;i[s]=Z(e,s)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}},ee=function(e,t,r,n,i){return void 0===i&&(i=null),function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var s=r(),u=s.logger,c=s.logLevel;if(c&&c<p.Debug||!c||!u)return e.apply(i,o);var l={type:"invoke public method",name:t,args:o,stacktrace:Y(1),time:{start:new Date().toISOString()},states:{}};n&&l.states&&(l.states.before=n());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){n&&l.states&&(l.states.after=n()),l.time&&(l.time.end=new Date().toISOString()),u.debug(JSON.stringify(l,null,2))}):(n&&l.states&&(l.states.after=n()),l.time&&(l.time.end=new Date().toISOString()),u.debug(JSON.stringify(l,null,2))),d}};(i=v||(v={})).SET="$set",i.SET_ONCE="$setOnce",i.ADD="$add",i.APPEND="$append",i.PREPEND="$prepend",i.REMOVE="$remove",i.PREINSERT="$preInsert",i.POSTINSERT="$postInsert",i.UNSET="$unset",i.CLEAR_ALL="$clearAll",(o=m||(m={})).IDENTIFY="$identify",o.GROUP_IDENTIFY="$groupidentify",o.REVENUE="revenue_amount",(a=y||(y={})).Unknown="unknown",a.Skipped="skipped",a.Success="success",a.RateLimit="rate_limit",a.PayloadTooLarge="payload_too_large",a.Invalid="invalid",a.Failed="failed",a.Timeout="Timeout",a.SystemError="SystemError";var et=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=y.Unknown),{event:e,code:t,message:r}},er=function(){var t="ampIntegrationContext";return"u">typeof globalThis&&void 0!==globalThis[t]?globalThis[t]:"u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof self?self:e.g},en=(0,C.__spreadArray)([],(0,C.__read)(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),ei=function(e){var t,r=er();if(!(null==(t=null==r?void 0:r.crypto)?void 0:t.getRandomValues))return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,ei);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,(0,C.__spreadArray)([],(0,C.__read)(n.entries()),!1).map(function(e){var t=(0,C.__read)(e,2),r=t[0],n=t[1];return[4,6,8,10].includes(r)?"-".concat(en[n]):en[n]}).join("")},eo=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return e.prototype.register=function(e,t){var r,n;return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(i){switch(i.label){case 0:if(this.plugins.some(function(t){return t.name===e.name}))return this.loggerProvider.warn("Plugin with name ".concat(e.name," already exists, skipping registration")),[2];return void 0===e.name&&(e.name=ei(),this.loggerProvider.warn("Plugin name is undefined. \n Generating a random UUID for plugin name: ".concat(e.name,". \n Set a name for the plugin to prevent it from being added multiple times."))),e.type=null!=(r=e.type)?r:"enrichment",[4,null==(n=e.setup)?void 0:n.call(e,t,this.client)];case 1:return i.sent(),this.plugins.push(e),[2]}})})},e.prototype.deregister=function(e,t){var r;return(0,C.__awaiter)(this,void 0,void 0,function(){var n,i;return(0,C.__generator)(this,function(o){switch(o.label){case 0:if(-1===(n=this.plugins.findIndex(function(t){return t.name===e})))return t.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2];return i=this.plugins[n],this.plugins.splice(n,1),[4,null==(r=i.teardown)?void 0:r.call(i)];case 1:return o.sent(),[2]}})})},e.prototype.reset=function(e){this.applying=!1,this.plugins.map(function(e){var t;return null==(t=e.teardown)?void 0:t.call(e)}),this.plugins=[],this.client=e},e.prototype.push=function(e){var t=this;return new Promise(function(r){t.queue.push([e,r]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o,a,s,u,c,l,d,f,h,g,p;return(0,C.__generator)(this,function(v){switch(v.label){case 0:if(!e)return[2];t=(0,C.__read)(e,1)[0],r=(0,C.__read)(e,2)[1],this.loggerProvider.log("Timeline.apply: Initial event",t),n=this.plugins.filter(function(e){return"before"===e.type}),v.label=1;case 1:v.trys.push([1,6,7,8]),o=(i=(0,C.__values)(n)).next(),v.label=2;case 2:if(o.done)return[3,5];if(!(a=o.value).execute)return[3,4];return[4,a.execute((0,C.__assign)({},t))];case 3:if(null===(s=v.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(a.name),"', event: ").concat(JSON.stringify(t))),r({event:t,code:0,message:""}),[2];t=s,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(a.name),"', event: ").concat(JSON.stringify(t))),v.label=4;case 4:return o=i.next(),[3,2];case 5:return[3,8];case 6:return f={error:v.sent()},[3,8];case 7:try{o&&!o.done&&(h=i.return)&&h.call(i)}finally{if(f)throw f.error}
1return[7];case 8:u=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),v.label=9;case 9:v.trys.push([9,14,15,16]),l=(c=(0,C.__values)(u)).next(),v.label=10;case 10:if(l.done)return[3,13];if(!(a=l.value).execute)return[3,12];return[4,a.execute((0,C.__assign)({},t))];case 11:if(null===(s=v.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(a.name),"', event: ").concat(JSON.stringify(t))),r({event:t,code:0,message:""}),[2];t=s,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(a.name),"', event: ").concat(JSON.stringify(t))),v.label=12;case 12:return l=c.next(),[3,10];case 13:return[3,16];case 14:return g={error:v.sent()},[3,16];case 15:try{l&&!l.done&&(p=c.return)&&p.call(c)}finally{if(g)throw g.error}return[7];case 16:return d=this.plugins.filter(function(e){return"destination"===e.type}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(t))),Promise.all(d.map(function(e){var r=(0,C.__assign)({},t);return e.execute(r).catch(function(e){return et(r,0,String(e))})})).then(function(e){var n=(0,C.__read)(e,1)[0]||et(t,100,"Event not tracked, no destination plugins on the instance");r(n)}),[2]}})})},e.prototype.flush=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t=this;return(0,C.__generator)(this,function(r){switch(r.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return t.apply(e)}))];case 1:return r.sent(),[4,Promise.all(this.plugins.filter(function(e){return"destination"===e.type}).map(function(e){return e.flush&&e.flush()}))];case 2:return r.sent(),[2]}})})},e.prototype.onIdentityChanged=function(e){this.plugins.forEach(function(t){var r;null==(r=t.onIdentityChanged)||r.call(t,e)})},e.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(t){var r;null==(r=t.onSessionIdChanged)||r.call(t,e)})},e.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(t){var r;null==(r=t.onOptOutChanged)||r.call(t,e)})},e.prototype.onReset=function(){this.plugins.forEach(function(e){var t;null==(t=e.onReset)||t.call(e)})},e}(),ea=function(e,t){return(0,C.__assign)((0,C.__assign)({},t),{event_type:m.IDENTIFY,user_properties:e.getUserProperties()})},es=function(e,t,r,n){var i;return(0,C.__assign)((0,C.__assign)({},n),{event_type:m.GROUP_IDENTIFY,group_properties:r.getUserProperties(),groups:((i={})[e]=t,i)})},eu=function(e,t,r){var n,i=new W;return i.set(e,t),(0,C.__assign)((0,C.__assign)({},r),{event_type:m.IDENTIFY,user_properties:i.getUserProperties(),groups:((n={})[e]=t,n)})},ec=function(e){return{promise:e||Promise.resolve()}},el=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new eo(this),this.name=e}return e.prototype._init=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o,a;return(0,C.__generator)(this,function(s){switch(s.label){case 0:t=this[e],this[e]=[],s.label=1;case 1:s.trys.push([1,8,9,10]),n=(r=(0,C.__values)(t)).next(),s.label=2;case 2:if(n.done)return[3,7];if(!((i=(0,n.value)())&&"promise"in i))return[3,4];return[4,i.promise];case 3:return s.sent(),[3,6];case 4:return[4,i];case 5:s.sent(),s.label=6;case 6:return n=r.next(),[3,2];case 7:return[3,10];case 8:return o={error:s.sent()},[3,10];case 9:try{n&&!n.done&&(a=r.return)&&a.call(r)}finally{if(o)throw o.error}return[7];case 10:if(!this[e].length)return[3,12];return[4,this.runQueuedFunctions(e)];case 11:s.sent(),s.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,r){var n=(0,C.__assign)((0,C.__assign)((0,C.__assign)({},"string"==typeof e?{event_type:e}:e),r),t&&{event_properties:t});return ec(this.dispatch(n))},e.prototype.identify=function(e,t){var r=ea(e,t);return ec(this.dispatch(r))},e.prototype.groupIdentify=function(e,t,r,n){var i=es(e,t,r,n);return ec(this.dispatch(i))},e.prototype.setGroup=function(e,t,r){var n=eu(e,t,r);return ec(this.dispatch(n))},e.prototype.revenue=function(e,t){var r=(0,C.__assign)((0,C.__assign)({},t),{event_type:m.REVENUE,event_properties:e.getEventProperties()});return ec(this.dispatch(r))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),ec())},e.prototype._addPlugin=function(e){return ec(this.timeline.register(e,this.config))},e.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),ec())},e.prototype._removePlugin=function(e){return ec(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(et(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t=this;return(0,C.__generator)(this,function(r){return this.isReady?[2,this.process(e)]:[2,new Promise(function(r){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,r))})]})})},e.prototype.getOperationAppliedUserProperties=function(e){var t={};if(void 0===e)return t;var r={};return Object.keys(e).forEach(function(t){Object.values(v).includes(t)||(r[t]=e[t])}),J.forEach(function(r){if(Object.keys(e).includes(r)){var n=e[r];switch(r){case v.CLEAR_ALL:Object.keys(t).forEach(function(e){delete t[e]});break;
1case v.UNSET:Object.keys(n).forEach(function(e){delete t[e]});break;case v.SET:Object.assign(t,n)}}}),Object.assign(t,r),t},e.prototype.process=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,C.__generator)(this,function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),this.config.optOut)return[2,et(e,0,"Event skipped due to optOut config")];return e.event_type===m.IDENTIFY&&(t=this.getOperationAppliedUserProperties(e.user_properties),this.timeline.onIdentityChanged({userProperties:t})),[4,this.timeline.push(e)];case 1:return 200===(r=i.sent()).code?this.config.loggerProvider.log(r.message):100===r.code?this.config.loggerProvider.warn(r.message):this.config.loggerProvider.error(r.message),[2,r];case 2:return n=String(i.sent()),this.config.loggerProvider.error(n),[2,r=et(e,0,n)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){this.isReady?this._setOptOut(e):this.q.push(this._setOptOut.bind(this,!!e))},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.timeline.onOptOutChanged(e),this.config.optOut=!!e)},e.prototype.flush=function(){return ec(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});return void 0===t?void this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e)):t},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return t instanceof e})},e}(),ed=function(e,t){var r=Math.max(t,1);return e.reduce(function(e,t,n){var i=Math.floor(n/r);return e[i]||(e[i]=[]),e[i].push(t),e},[])},ef="Amplitude Logger ",eh=function(){function e(){this.logLevel=p.None}return e.prototype.disable=function(){this.logLevel=p.None},e.prototype.enable=function(e){void 0===e&&(e=p.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<p.Verbose||console.log("".concat(ef,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<p.Warn||console.warn("".concat(ef,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<p.Error||console.error("".concat(ef,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<p.Debug||console.log("".concat(ef,"[Debug]: ").concat(e.join(" ")))},e}(),eg=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:P,logLevel:p.Warn,loggerProvider:new eh,offline:!1,optOut:!1,serverUrl:O,serverZone:"US",useBatch:!1}},ep=function(){function e(e){this._optOut=!1;var t,r,n,i,o=eg();this.apiKey=e.apiKey,this.flushIntervalMillis=null!=(t=e.flushIntervalMillis)?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!=(r=e.logLevel)?r:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!=(n=e.optOut)?n:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!=(i=e.useBatch)?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var a=ev(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),ev=function(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=eg().serverZone),void 0===r&&(r=eg().useBatch),e)return{serverUrl:e,serverZone:void 0};var n,i=["US","EU"].includes(t)?t:eg().serverZone;return{serverZone:i,serverUrl:(n=r,"EU"===i?n?"https://api.eu.amplitude.com/batch":"https://api.eu.amplitude.com/2/httpapi":n?"https://api2.amplitude.com/batch":O)}},em=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}();function ey(e){return e>=200&&e<300}function eb(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var e_=function(){function e(e){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=null==e?void 0:e.diagnosticsClient}return e.prototype.setup=function(e){var t;return(0,C.__awaiter)(this,void 0,void 0,function(){var r,n=this;return(0,C.__generator)(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(I,"_").concat(this.config.apiKey.substring(0,10)),[4,null==(t=this.config.storageProvider)?void 0:t.get(this.storageKey)];case 1:return(r=i.sent())&&r.length>0&&Promise.all(r.map(function(e){return n.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=ei()),new Promise(function(r){t.queue.push({event:e,attempts:0,callback:function(e){return r(e)},timeout:0}),t.schedule(t.config.flushIntervalMillis),t.saveEvents()})}
1,e.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter(function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries||(t.fulfillRequest([e],500,"Event rejected due to exceeded retry count"),!1)})},e.prototype.scheduleEvents=function(e){var t=this;e.forEach(function(e){t.schedule(0===e.timeout?t.config.flushIntervalMillis:e.timeout)})},e.prototype.schedule=function(e){var t=this;if(!this.config.offline&&(null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout)){this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e);return}},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return void 0===e&&(e=!1),(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n=this;return(0,C.__generator)(this,function(i){switch(i.label){case 0:if(this.config.offline)return this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2];if(this.flushId)return this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2];return this.flushId=this.scheduleId,this.resetSchedule(),t=[],r=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):r.push(e)}),[4,ed(t,this.config.flushQueueSize).reduce(function(t,r){return(0,C.__awaiter)(n,void 0,void 0,function(){return(0,C.__generator)(this,function(n){switch(n.label){case 0:return[4,t];case 1:return n.sent(),[4,this.send(r,e)];case 2:return[2,n.sent()]}})})},Promise.resolve())];case 1:return i.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}})})},e.prototype.send=function(e,t){var r;return void 0===t&&(t=!0),(0,C.__awaiter)(this,void 0,void 0,function(){var n,i,o,a;return(0,C.__generator)(this,function(s){switch(s.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];n={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,(0,C.__rest)(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new em,s.label=1;case 1:return s.trys.push([1,3,,4]),i=ev(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(i,n)];case 2:if(null===(o=s.sent()))return this.fulfillRequest(e,0,"Unexpected error occurred"),[2];if(!t)return"body"in o?this.fulfillRequest(e,o.statusCode,"".concat(o.status,": ").concat(eb(o))):this.fulfillRequest(e,o.statusCode,o.status),[2];return this.handleResponse(o,e),[3,4];case 3:var u;return a=(u=s.sent())instanceof Error?u.message:String(u),this.config.loggerProvider.error(a),null==(r=this.diagnosticsClient)||r.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:e.map(function(e){return e.event.event_type}),message:a,stack_trace:Y()}),this.handleResponse({status:y.Failed,statusCode:0},e),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(e,t){ey(e.statusCode)||null==(r=this.diagnosticsClient)||r.recordEvent("analytics.events.unsuccessful",{events:t.map(function(e){return e.event.event_type}),code:e.statusCode,status:e.status,body:eb(e),stack_trace:Y()});var r,n=e.status;switch(n){case y.Success:this.handleSuccessResponse(e,t);break;case y.Invalid:this.handleInvalidResponse(e,t);break;case y.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case y.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(n,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var r=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key"))return void this.fulfillRequest(t,e.statusCode,e.body.error);var n=new Set((0,C.__spreadArray)((0,C.__spreadArray)((0,C.__spreadArray)((0,C.__spreadArray)([],(0,C.__read)(Object.values(e.body.eventsWithInvalidFields)),!1),(0,C.__read)(Object.values(e.body.eventsWithMissingFields)),!1),(0,C.__read)(Object.values(e.body.eventsWithInvalidIdLengths)),!1),(0,C.__read)(e.body.silencedEvents),!1).flat()),i=t.filter(function(t,i){return!n.has(i)||void r.fulfillRequest([t],e.statusCode,e.body.error)});i.length>0&&this.config.loggerProvider.warn(eb(e));
1var o=this.removeEventsExceedFlushMaxRetries(i);this.scheduleEvents(o)},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1===t.length)return void this.fulfillRequest(t,e.statusCode,e.body.error);this.config.loggerProvider.warn(eb(e)),this.config.flushQueueSize/=2;var r=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(r)},e.prototype.handleRateLimitResponse=function(e,t){var r=this,n=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,a=new Set(n),s=new Set(i),u=new Set(o),c=t.filter(function(t,n){return t.event.user_id&&a.has(t.event.user_id)||t.event.device_id&&s.has(t.event.device_id)?void r.fulfillRequest([t],e.statusCode,e.body.error):(u.has(n)&&(t.timeout=r.throttleTimeout),!0)});c.length>0&&this.config.loggerProvider.warn(eb(e));var l=this.removeEventsExceedFlushMaxRetries(c);this.scheduleEvents(l)},e.prototype.handleOtherResponse=function(e){var t=this,r=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),n=this.removeEventsExceedFlushMaxRetries(r);this.scheduleEvents(n)},e.prototype.fulfillRequest=function(e,t,r){var n,i,o;ey(t)?null==(o=this.diagnosticsClient)||o.increment("analytics.events.sent",e.length):(null==(n=this.diagnosticsClient)||n.increment("analytics.events.dropped",e.length),null==(i=this.diagnosticsClient)||i.recordEvent("analytics.events.dropped",{events:e.map(function(e){return e.event.event_type}),code:t,message:r,stack_trace:Y()})),this.removeEvents(e),e.forEach(function(e){return e.callback(et(e.event,t,r))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map(function(e){return e.event});this.config.storageProvider.set(this.storageKey,e)}},e.prototype.removeEvents=function(e){this.queue=this.queue.filter(function(t){return!e.some(function(e){return e.event.insert_id===t.event.insert_id})}),this.saveEvents()},e}(),ew=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setCurrency=function(e){return this.currency=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setReceipt=function(e){return this.receipt=e,this},e.prototype.setReceiptSig=function(e){return this.receiptSig=e,this},e.prototype.setEventProperties=function(e){return $(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?(0,C.__assign)({},this.properties):{};return e[b.REVENUE_PRODUCT_ID]=this.productId,e[b.REVENUE_QUANTITY]=this.quantity,e[b.REVENUE_PRICE]=this.price,e[b.REVENUE_TYPE]=this.revenueType,e[b.REVENUE_CURRENCY]=this.currency,e[b.REVENUE]=this.revenue,e[b.RECEIPT]=this.receipt,e[b.RECEIPT_SIG]=this.receiptSig,e},e}();(s=b||(b={})).REVENUE_PRODUCT_ID="$productId",s.REVENUE_QUANTITY="$quantity",s.REVENUE_PRICE="$price",s.REVENUE_TYPE="$revenueType",s.REVENUE_CURRENCY="$currency",s.REVENUE="$revenue",s.RECEIPT="$receipt",s.RECEIPT_SIG="$receiptSig";var ek=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:eE(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),eE=function(){return"u">typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},eS=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),eT=function(){return(eT=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function ex(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);
1if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function eA(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}"function"==typeof SuppressedError&&SuppressedError;var eC=function(e,t){var r,n,i=typeof e;if(i!==typeof t)return!1;try{for(var o=ex(["string","number","boolean","undefined"]),a=o.next();!a.done;a=o.next())if(a.value===i)return e===t}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;var s=Array.isArray(e),u=Array.isArray(t);if(s!==u)return!1;if(s&&u){for(var c=0;c<e.length;c++)if(!eC(e[c],t[c]))return!1}else{if(!eC(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var l=!0;return Object.keys(e).forEach(function(r){eC(e[r],t[r])||(l=!1)}),l}return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});var eI=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=eT({},this.identity.userProperties),r=eT(eT({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},setOptOut:function(e){return r.optOut=e,this},updateUserProperties:function(e){var t,n,i,o,a,s,u=r.userProperties||{};try{for(var c=ex(Object.entries(e)),l=c.next();!l.done;l=c.next()){var d=eA(l.value,2),f=d[0],h=d[1];switch(f){case"$set":try{for(var g=(i=void 0,ex(Object.entries(h))),p=g.next();!p.done;p=g.next()){var v=eA(p.value,2),m=v[0],y=v[1];u[m]=y}}catch(e){i={error:e}}finally{try{p&&!p.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}break;case"$unset":try{for(var b=(a=void 0,ex(Object.keys(h))),_=b.next();!_.done;_=b.next()){var m=_.value;delete u[m]}}catch(e){a={error:e}}finally{try{_&&!_.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}break;case"$clearAll":u={}}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return r.userProperties=u,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return eT({},this.identity)},e.prototype.setIdentity=function(e){var t=eT({},this.identity);this.identity=eT({},e),eC(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),eP="u">typeof globalThis?globalThis:e.g,eO=function(){function e(){this.identityStore=new eI,this.eventBridge=new eS,this.applicationContextProvider=new ek}return e.getInstance=function(t){return eP.analyticsConnectorInstances||(eP.analyticsConnectorInstances={}),eP.analyticsConnectorInstances[t]||(eP.analyticsConnectorInstances[t]=new e),eP.analyticsConnectorInstances[t]},e}(),eM=function(e){return void 0===e&&(e=P),eO.getInstance(e)},eR=function(e,t){eM(t).identityStore.editIdentity().setUserId(e).commit()},eL=function(e,t){eM(t).identityStore.editIdentity().setDeviceId(e).commit()},eN=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},eD=function(){function e(){this.name="identity",this.type="before",this.identityStore=eM().identityStore}return e.prototype.execute=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t;return(0,C.__generator)(this,function(r){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(t){return e.instanceName&&(this.identityStore=eM(e.instanceName).identityStore),[2]})})},e}(),ej=function(){var e,t=er();return(null==(e=null==t?void 0:t.location)?void 0:e.search)?t.location.search.substring(1).split("&").filter(
1Boolean).reduce(function(e,t){var r=t.split("=",2),n=eU(r[0]),i=eU(r[1]);return i&&(e[n]=i),e},{}):{}},eU=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},eF=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var r=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(r))),Promise.resolve({remoteConfig:r.remoteConfig,lastFetch:new Date(r.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}(),eB=function(){function e(e,t,r,n){void 0===r&&(r="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.apiKey=e,this.serverUrl=n||("US"===r?"https://sr-client-cfg.amplitude.com/config":"https://sr-client-cfg.eu.amplitude.com/config"),this.logger=t,this.storage=new eF(e,t)}return e.prototype.subscribe=function(e,t,r){var n=ei(),i={id:n,key:e,deliveryMode:t,callback:r};return this.callbackInfos.push(i),"all"===t?this.subscribeAll(i):this.subscribeWaitForRemote(i,t.timeout),n},e.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex(function(t){return t.id===e});return -1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},e.prototype.updateConfigs=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t=this;return(0,C.__generator)(this,function(r){switch(r.label){case 0:if(this.lastSuccessfulFetch&&Date.now()-this.lastSuccessfulFetch<3e5)return this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2];return[4,this.getOrCreateFetchPromise()];case 1:return e=r.sent(),this.storage.setConfig(e),this.callbackInfos.forEach(function(r){t.sendCallback(r,e,"remote")}),[2]}})})},e.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise||(this.fetchPromise=this.fetch().then(function(t){return null!==t.remoteConfig&&(e.lastSuccessfulFetch=Date.now()),t}).finally(function(){e.fetchPromise=null})),this.fetchPromise},e.prototype.subscribeAll=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,C.__generator)(this,function(o){switch(o.label){case 0:return t=this.getOrCreateFetchPromise().then(function(t){i.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(t))),i.sendCallback(e,t,"remote"),i.storage.setConfig(t)}),r=this.storage.fetchConfig().then(function(e){return e}),[4,Promise.race([t,r])];case 1:return void 0!==(n=o.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(n))),null!==n.remoteConfig?this.sendCallback(e,n,"cache"):this.logger.debug("Remote config client skips sending c
1allback because cache is empty (first time user).")),[4,t];case 2:return o.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return(0,C.__awaiter)(this,void 0,void 0,function(){var r,n;return(0,C.__generator)(this,function(i){switch(i.label){case 0:r=new Promise(function(e,r){setTimeout(function(){r("Timeout exceeded")},t)}),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),r])];case 2:return n=i.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(e,n,"remote"),this.storage.setConfig(n),[3,5];case 3:return i.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(n=i.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(e,n,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(e,n,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,r){var n;e.lastCallback=new Date,n=e.key?e.key.split(".").reduce(function(e,t){return null===e?e:t in e?e[t]:null},t.remoteConfig):t.remoteConfig,e.callback(n,r,t.lastFetch)},e.prototype.fetch=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=1e3),(0,C.__awaiter)(this,void 0,void 0,function(){var r,n,i,o,a,s,u=this;return(0,C.__generator)(this,function(c){switch(c.label){case 0:r=t/e,n={remoteConfig:null,lastFetch:new Date},i=function(n){var i,a,s,c,l;return(0,C.__generator)(this,function(d){switch(d.label){case 0:i=new AbortController,a=setTimeout(function(){return i.abort()},t),d.label=1;case 1:return d.trys.push([1,7,8,9]),[4,fetch(o.getUrlParams(),{method:"GET",headers:{Accept:"*/*"},signal:i.signal})];case 2:if((s=d.sent()).ok)return[3,4];return[4,s.text()];case 3:return c=d.sent(),o.logger.debug("Remote config client fetch with retry time ".concat(e," failed with ").concat(s.status,": ").concat(c)),[3,6];case 4:return[4,s.json()];case 5:return[2,{value:{remoteConfig:d.sent(),lastFetch:new Date}}];case 6:return[3,9];case 7:return(l=d.sent())instanceof Error&&"AbortError"===l.name?o.logger.debug("Remote config client fetch with retry time ".concat(e," timed out after ").concat(t,"ms")):o.logger.debug("Remote config client fetch with retry time ".concat(e," is rejected because: "),l),[3,9];case 8:return clearTimeout(a),[7];case 9:if(!(n<e-1))return[3,11];return[4,new Promise(function(e){return setTimeout(e,u.getJitterDelay(r))})];case 10:d.sent(),d.label=11;case 11:return[2]}})},o=this,a=0,c.label=1;case 1:if(!(a<e))return[3,4];return[5,i(a)];case 2:if("object"==typeof(s=c.sent()))return[2,s.value];c.label=3;case 3:return a++,[3,1];case 4:return[2,n]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),r=new URLSearchParams;return r.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(r.toString())},e.CONFIG_GROUP="browser",e}(),eq="tags",eG="counters",eH="histograms",ez="events",eV="internal",e$="last_flush_timestamp",eK=function(){function e(e,t){this.dbPromise=null,this.logger=t,this.dbName="AMP_diagnostics_".concat(e.substring(0,10))}return e.isSupported=function(){var e;return(null==(e=er())?void 0:e.indexedDB)!==void 0},e.prototype.getDB=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(e){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var e=this;return new Promise(function(t,r){var n=indexedDB.open(e.dbName,1);n.onerror=function(){e.dbPromise=null,r(Error("Failed to open IndexedDB"))},n.onsuccess=function(){var r=n.result;r.onclose=function(){e.dbPromise=null,e.logger.debug("DiagnosticsStorage: DB connection closed.")},r.onerror=function(t){e.logger.debug("DiagnosticsStorage: A global database error occurred.",t),r.close()},t(r)},n.onupgradeneeded=function(t){var r=t.target.result;e.createTables(r)}})},e.prototype.createTables=function(e){e.objectStoreNames.contains(eq)||e.createObjectStore(eq,{keyPath:"key"}),e.objectStoreNames.contains(eG)||e.createObjectStore(eG,{keyPath:"key"}),e.objectStoreNames.contains(eH)||e.createObjectStore(eH,{keyPath:"key"}),e.objectStoreNames.contains(ez)||e.createObjectStore(ez,{keyPath:"id",autoIncrement:!0}).createIndex("time_idx","time",{unique:!1}),e.objectStoreNames.contains(eV)||e.createObjectStore(eV,{keyPath:"key"})},e.prototype.setTags=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,C.__generator)(this,function(o){switch(o.label){case 0:if(o.tr
1ys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([eq],"readwrite")).objectStore(eq),[2,new Promise(function(n){var o=Object.entries(e);t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to set tags",e),n()},o.forEach(function(e){var t=(0,C.__read)(e,2),n=t[0],o=t[1];r.put({key:n,value:o}).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to set tag",n,o,e)}})})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",n),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,C.__generator)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([eG],"readwrite")).objectStore(eG),[2,new Promise(function(n){var o=Object.entries(e);t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to increment counters",e),n()},o.forEach(function(e){var t=(0,C.__read)(e,2),n=t[0],o=t[1],a=r.get(n);a.onsuccess=function(){var e=a.result,t=e?e.value:0;r.put({key:n,value:t+o}).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to update counter",n,e)}},a.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to read existing counter",n,e)}})})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",n),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,C.__generator)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),0===Object.entries(e).length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([eH],"readwrite")).objectStore(eH),[2,new Promise(function(n){var o=Object.entries(e);t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to set histogram stats",e),n()},o.forEach(function(e){var t=(0,C.__read)(e,2),n=t[0],o=t[1],a=r.get(n);a.onsuccess=function(){var e,t=a.result;e=t?{key:n,count:t.count+o.count,min:Math.min(t.min,o.min),max:Math.max(t.max,o.max),sum:t.sum+o.sum}:{key:n,count:o.count,min:o.min,max:o.max,sum:o.sum},r.put(e).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n,e)}},a.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",n,e)}})})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n,i=this;return(0,C.__generator)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,2,,3]),0===e.length)return[2];return[4,this.getDB()];case 1:return r=(t=o.sent().transaction([ez],"readwrite")).objectStore(ez),[2,new Promise(function(n){t.oncomplete=function(){n()},t.onabort=function(e){i.logger.debug("DiagnosticsStorage: Failed to add event records",e),n()};var o=r.count();o.onsuccess=function(){var t=Math.max(0,10-o.result);t<e.length&&i.logger.debug("DiagnosticsStorage: Only added ".concat(t," of ").concat(e.length," events due to storage limit")),e.slice(0,t).forEach(function(e){r.add(e).onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to add event record",e)}})},o.onerror=function(e){i.logger.debug("DiagnosticsStorage: Failed to count existing events",e)}})];case 2:return n=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",n),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(e,t){return(0,C.__awaiter)(this,void 0,void 0,function(){var r,n,i;return(0,C.__generator)(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=(r=o.sent().transaction([eV],"readwrite")).objectStore(eV),[2,new Promise(function(i,o){r.onabort=function(){return o(Error("Failed to set internal value"))};var a=n.put({key:e,value:t});a.onsuccess=function(){return i()},a.onerror=function(){return o(Error("Failed to set internal value"))}})];case 2:return i=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",i),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,C.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getDB()];case 1:return r=(t=i.sent().transaction([eV],"readonly")).objectStore(eV),[2,new Promise(function(n,i){t.onabort=function(){return i(Error("Failed to get internal value"))};var o=r.get(e);o.onsuccess=function(){return n(o.result)},o.onerror=function(){return i(Error("Failed to get internal value"))}})];case 2:return n=i.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",n),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t;return(0,C.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getInternal(e$)];case 1:return[2,(e=r.sent())?parseInt(e.value,10):void 0];case 2:return t=r.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",t),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t;return(0,C.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.setInternal(e$,e.toString())];case 1:return r.sent(),[3,3];case 2:return t=r.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",t),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(e,t){return new Promise(function(r,n){var i=e.objectStore(t).clear();i.onsuccess=function(){return r()},i.onerror=function(){return n(Error("Failed to clear table ".concat(t)))}})},e.prototype.getAllAndClear=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t,r,n,i,o,a;return(0,C.__generator)(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,5]),[4,this.getDB()];case 1:return e=s.sent().transaction([eq,eG,eH,ez],"readwrite"),[4,Promise.all([this.getAllFromStore(e,eq),this.getAllFromStore(e,eG),this.getAllFromStore(e,eH),this.getAllFromStore(e,ez)])];case 2:return r=(t=C.__read.apply(void 0,[s.sent(),4]))[0],n=t[1],i=t[2],o=t[3],[4,Promise.all([this.clearTable(e,eG),this.clearTable(e,eH),this.clearTable(e,ez)])];case 3:return s.sent(),[2,{tags:r,counters:n,histogramStats:i,events:o}];case 4:return a=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",a),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(e,t){return new Promise(function(r,n){var i=e.objectStore(t).getAll();i.onsuccess=function(){return r(i.result)},i.onerror=function(){return n(Error("Failed to get all from ".concat(t)))}})},e}(),eW=function(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return t}
1,eJ=function(e,t){return 31*Math.abs(eW(e.toString()))%1e5/1e5<t},eY=function(){var e=er();return null==e?void 0:e.__AMPLITUDE_SCRIPT_URL__},eQ=function(e){var t=er();if(t&&"function"==typeof t.addEventListener){var r=function(t){e.recordEvent("sdk.error.uncaught",(0,C.__assign)({type:t.type,message:t.message,filename:t.filename,error_name:t.errorName,stack:t.stack},t.metadata))};t.addEventListener("error",function(e){var t=e.error instanceof Error?e.error:void 0,n=null==t?void 0:t.stack,i=eZ({filename:e.filename,stack:n});i&&r({type:"error",message:e.message,stack:n,filename:e.filename,errorName:null==t?void 0:t.name,metadata:{colno:e.colno,lineno:e.lineno,isTrusted:e.isTrusted,matchReason:i}})},!0),t.addEventListener("unhandledrejection",function(e){var t,n=e.reason instanceof Error?e.reason:void 0,i=null==n?void 0:n.stack,o=eX(i),a=eZ({filename:o,stack:i});a&&r({type:"unhandledrejection",message:null!=(t=null==n?void 0:n.message)?t:e0(e.reason),stack:i,filename:o,errorName:null==n?void 0:n.name,metadata:{isTrusted:e.isTrusted,matchReason:a}})},!0)}},eZ=function(e){var t=eY();if(t){if(e.filename&&e.filename.includes(t))return"filename";if(e.stack&&e.stack.includes(t))return"stack"}},eX=function(e){if(e){var t=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return t?t[1]:void 0}},e0=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(e){return"[object Object]"}},e1=function(){function e(e,t,r,n){void 0===r&&(r="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=t,this.serverUrl="US"===r?"https://diagnostics.prod.us-west-2.amplitude.com/v1/capture":"https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(n,null,2)),this.config=(0,C.__assign)({enabled:!0,sampleRate:0},n),this.startTimestamp=Date.now(),this.shouldTrack=eJ(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,eK.isSupported()?this.storage=new eK(e,t):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&(this.increment("sdk.diagnostics.sampled.in.and.enabled"),eQ(this))}return e.prototype.isStorageAndTrackEnabled=function(){return!!this.storage&&!!this.shouldTrack},e.prototype.setTag=function(e,t){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryTags).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit");this.inMemoryTags[e]=t,this.startTimersIfNeeded()}},e.prototype.increment=function(e,t){if(void 0===t&&(t=1),this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryCounters).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit");this.inMemoryCounters[e]=(this.inMemoryCounters[e]||0)+t,this.startTimersIfNeeded()}},e.prototype.recordHistogram=function(e,t){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryHistograms).length>=1e4)return void this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");var r=this.inMemoryHistograms[e];r?(r.count+=1,r.min=Math.min(r.min,t),r.max=Math.max(r.max,t),r.sum+=t):this.inMemoryHistograms[e]={count:1,min:t,max:t,sum:t},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(e,t){if(this.isStorageAndTrackEnabled()){if(this.inMemoryEvents.length>=10)return void this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit");this.inMemoryEvents.push({event_name:e,time:Date.now(),event_properties:t}),this.startTimersIfNeeded()}},e.prototype.startTimersIfNeeded=function(){var e=this;this.saveTimer||(this.saveTimer=setTimeout(function(){e.saveAllDataToStorage().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to save all data to storage",t)}).finally(function(){e.saveTimer=null})},1e3)),this.flushTimer||(this.flushTimer=setTimeout(function(){e._flush().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to flush",t)}).finally(function(){e.flushTimer=null})},3e5))},e.prototype.saveAllDataToStorage=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t,r,n;return(0,C.__generator)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2];return e=(0,C.__assign)({},this.inMemoryTags),t=(0,C.__assign)({},this.inMemoryCounters),r=(0,C.__assign)({},this.inMemoryHistograms),n=(0,C.__spreadArray)([],(0,C.__read)(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(e),this.storage.incrementCounters(t),this.storage.setHistogramStats(r),this.storage.addEventRecords(n)])];case 1:return i.sent(),[2]}})})},e.prototype._flush=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t,r,n,i,o,a,s,u,c;return(0,C.__generator)(this,function(l){switch(l.label){case 0:if(!this.storage)return[2];return[4,this.saveAllDataToStorage()];case 1:return l.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:if(t=(e=l.sent()).tags,r=e.counters,n=e.histogramStats,i=e.events,this.storage.setLastFlushTimestamp(Date.now()),o={},t.forEach(function(e){o[e.key]=e.value}),a={},r.forEach(function(e){a[e.key]=e.value}),s={}
1,n.forEach(function(e){s[e.key]={count:e.count,min:e.min,max:e.max,avg:Math.round(e.sum/e.count*100)/100}}),u=i.map(function(e){return{event_name:e.event_name,time:e.time,event_properties:e.event_properties}}),0===Object.keys(a).length&&0===Object.keys(s).length&&0===u.length)return[2];return c={tags:o,histogram:s,counters:a,events:u},this.fetch(c),[2]}})})},e.prototype.fetch=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t;return(0,C.__generator)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,2,,3]),!er())throw Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(e)})];case 1:if(!r.sent().ok)return this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2];return this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3];case 2:return t=r.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",t),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t,r;return(0,C.__generator)(this,function(n){switch(n.label){case 0:if(!this.storage)return[2];return e=Date.now(),[4,this.storage.getLastFlushTimestamp()];case 1:if(-1===(t=n.sent()||-1))return this.storage.setLastFlushTimestamp(e),this._setFlushTimer(3e5),[2];return(r=e-t)>=3e5?this._flush():this._setFlushTimer(3e5-r),[2]}})})},e.prototype._setFlushTimer=function(e){var t=this;this.flushTimer=setTimeout(function(){t._flush().catch(function(e){t.logger.debug("DiagnosticsClient: Failed to flush",e)}).finally(function(){t.flushTimer=null})},e)},e.prototype._setSampleRate=function(e){this.logger.debug("DiagnosticsClient: Setting sample rate to",e),this.config.sampleRate=e,this.shouldTrack=eJ(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e}(),e2=function(e,t){return"boolean"==typeof e?e:(null==e?void 0:e[t])!==!1},e3=function(e){return e2(e,"attribution")},e4=function(e){return e2(e,"pageViews")},e5=function(e){return e2(e,"sessions")},e6=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.networkTracking||"object"==typeof e.networkTracking)},e8=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},e7=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.frustrationInteractions||"object"==typeof e.frustrationInteractions)},e9=function(e){if(e8(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},te=function(e){if(e7(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.frustrationInteractions)return e.autocapture.frustrationInteractions},tt=function(e){var t;if(e6(e.autocapture)){var r=void 0;return"object"==typeof e.autocapture&&"object"==typeof e.autocapture.networkTracking?r=e.autocapture.networkTracking:e.networkTrackingOptions&&(r=e.networkTrackingOptions),(0,C.__assign)((0,C.__assign)({},r),{captureRules:null==(t=null==r?void 0:r.captureRules)?void 0:t.map(function(t){var r,n,i;if((null==(r=t.urls)?void 0:r.length)&&(null==(n=t.hosts)?void 0:n.length)){var o=JSON.stringify(t.hosts),a=JSON.stringify(t.urls);return null==(i=e.loggerProvider)||i.warn("Found network capture rule with both urls='".concat(a,"' and hosts='").concat(o,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),(0,C.__assign)((0,C.__assign)({},t),{hosts:void 0})}return t})})}},tr=function(e){var t,r=function(){return!1},n=void 0,i=e.pageCounter;return e4(e.defaultTracking)&&(r=void 0,t=void 0,e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.pageViews&&"object"==typeof e.defaultTracking.pageViews&&("trackOn"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(t=e.defaultTracking.pageViews.eventType))),{trackOn:r,trackHistoryChanges:n,eventType:t,pageCounter:i}},tn=function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.name,o=n.args,a=n.resolve,s=e&&e[i];if("function"==typeof s){var u=s.apply(e,o);"function"==typeof a&&a(null==u?void 0:u.promise)}}return e},ti=function(e){return e&&void 0!==e._q},to=function(){if("u"<typeof navigator)return"";var e,t,r,n,i=navigator.userLanguage;return null!=(n=null!=(r=null!=(t=null==(e=navigator.languages)?void 0:e[0])?t:navigator.language)?r:i)?n:""},ta="2.32.0",ts="amplitude-ts",tu=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(ts,"/").concat(ta),"u">typeof navigator&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){var t,r;return(0,C.__awaiter)(this,void 0,void 0,function(){var n,i,o;return(0,C.__generator)(this,function(a){return n=new Date().getTime(),i=null!=(t=this.config.lastEventId)?t:-1,o=null!=(r=e.event_id)?r:i+1,this.config.lastEventId=o,e.time||(this.config.lastEventTime=n),[2,(0,C.__assign)((0,C.__assign)((0,C.__assign)((0,C.__assign)((0,C.__assign)((0,C.__assign)((0,C.__assign)((0,C.__assign)({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:n},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:to()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:ei(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:o,library:this.library,user_agent:this.userAgent})]})})},e}(),tc=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t;return(0,C.__generator)(this,function(r){switch(r.label){case 0:return[4,this.get(e)];case 1:return[2,(t=r.sent())?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(r){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),tl=function(){function e(e){this.options=(0,C.__assign)({},e)}return e.prototype.isEnabled=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r;return(0,C.__generator)(this,function(n){switch(n.label){case 0:if(!er())return[2,!1];e.testValue=String(Date.now()),t=new e(this.options),r="AMP_TEST",n.label=1;case 1:return n.trys.push([1,4,5,7]),[4,t.set(r,e.testValue)];case 2:return n.sent(),[4,t.get(r)];case 3:return[2,n.sent()===e.testValue];case 4:return n.sent(),[2,!1];case 5:return[4,t.remove(r)];case 6:return n.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){var t;return(0,C.__awaiter)(this,void 0,void 0,function(){var r,n;return(0,C.__generator)(this,function(i){switch(i.label){case 0:return[4,this.getRaw(e)];case 1:if(!(r=i.sent()))return[2,void 0];try{if(n=null!=(t=td(r))?t:tf(r),void 0===n)return console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(r)),[2,void 0];return[2,JSON.parse(n)]}catch(t){return console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(r)),[2,void 0]}}})})},e.prototype.getRaw=function(e){var t,r;return(0,C.__awaiter)(this,void 0,void 0,function(){var n,i;return(0,C.__generator)(this,function(o){return(i=(null!=(r=null==(t=null==(n=er())?void 0:n.document)?void 0:t.cookie.split("; "))?r:[]).find(function(t){return 0===t.indexOf(e+"=")}))?[2,i.substring(e.length+1)]:[2,void 0]})})},e.prototype.set=function(e,t){var r;return(0,C.__awaiter)(this,void 0,void 0,function(){var n,i,o,a,s,u,c;return(0,C.__generator)(this,function(l){try{n=null!=(r=this.options.expirationDays)?r:0,i=null!==t?n:-1,o=void 0,i&&((a=new Date).setTime(a.getTime()+24*i*36e5),o=a),s="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t)))),o&&(s+="; expires=".concat(o.toUTCString())),s+="; path=/",this.options.domain&&(s+="; domain=".concat(this.options.domain)),this.options.secure&&(s+="; Secure"),this.options.sameSite&&(s+="; SameSite=".concat(this.options.sameSite)),(u=er())&&(u.document.cookie=s)}catch(t){c=t instanceof Error?t.message:String(t),console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(c))}return[2]})})},e.prototype.remove=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(e){return[2]})})},e}(),td=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}},tf=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}},th=function(e,t,r){return void 0===t&&(t=""),void 0===r&&(r=10),["AMP",t,e.substring(0,r)].filter(
1Boolean).join("_")},tg=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){if("object"!=typeof e)return null;var t,r,n,i,o,a,s,u,c,l,d,f,h,g,p,v,m,b,_,w,k,E,S=e.code||0,T=this.buildStatus(S);switch(T){case y.Success:return{status:T,statusCode:S,body:{eventsIngested:null!=(t=e.events_ingested)?t:0,payloadSizeBytes:null!=(r=e.payload_size_bytes)?r:0,serverUploadTime:null!=(n=e.server_upload_time)?n:0}};case y.Invalid:return{status:T,statusCode:S,body:{error:null!=(i=e.error)?i:"",missingField:null!=(o=e.missing_field)?o:"",eventsWithInvalidFields:null!=(a=e.events_with_invalid_fields)?a:{},eventsWithMissingFields:null!=(s=e.events_with_missing_fields)?s:{},eventsWithInvalidIdLengths:null!=(u=e.events_with_invalid_id_lengths)?u:{},epsThreshold:null!=(c=e.eps_threshold)?c:0,exceededDailyQuotaDevices:null!=(l=e.exceeded_daily_quota_devices)?l:{},silencedDevices:null!=(d=e.silenced_devices)?d:[],silencedEvents:null!=(f=e.silenced_events)?f:[],throttledDevices:null!=(h=e.throttled_devices)?h:{},throttledEvents:null!=(g=e.throttled_events)?g:[]}};case y.PayloadTooLarge:return{status:T,statusCode:S,body:{error:null!=(p=e.error)?p:""}};case y.RateLimit:return{status:T,statusCode:S,body:{error:null!=(v=e.error)?v:"",epsThreshold:null!=(m=e.eps_threshold)?m:0,throttledDevices:null!=(b=e.throttled_devices)?b:{},throttledUsers:null!=(_=e.throttled_users)?_:{},exceededDailyQuotaDevices:null!=(w=e.exceeded_daily_quota_devices)?w:{},exceededDailyQuotaUsers:null!=(k=e.exceeded_daily_quota_users)?k:{},throttledEvents:null!=(E=e.throttled_events)?E:[]}};case y.Timeout:default:return{status:T,statusCode:S}}},e.prototype.buildStatus=function(e){return ey(e)?y.Success:429===e?y.RateLimit:413===e?y.PayloadTooLarge:408===e?y.Timeout:e>=400&&e<500?y.Invalid:e>=500?y.Failed:y.Unknown},e}(),tp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,C.__extends)(t,e),t.prototype.send=function(e,t){return(0,C.__awaiter)(this,void 0,void 0,function(){var r,n;return(0,C.__generator)(this,function(i){switch(i.label){case 0:if("u"<typeof fetch)throw Error("FetchTransport is not supported");return[4,fetch(e,{headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"})];case 1:return[4,(r=i.sent()).text()];case 2:n=i.sent();try{return[2,this.buildResponse(JSON.parse(n))]}catch(e){return[2,this.buildResponse({code:r.status})]}}})})},t}(tg),tv=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,C.__generator)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),r=new e(this.storage),n="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,r.set(n,t)];case 2:return i.sent(),[4,r.get(n)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,r.remove(n)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t;return(0,C.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:if(!(t=r.sent()))return[2,void 0];return[2,JSON.parse(t)];case 2:return r.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){var t;return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(r){return[2,(null==(t=this.storage)?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var r;return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(n){try{null==(r=this.storage)||r.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(r){try{null==(t=this.storage)||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(t){try{null==(e=this.storage)||e.clear()}catch(e){}return[2]})})},e}(),tm=function(e){function t(t){var r,n,i,o=this;try{i=null==(r=er())?void 0:r.localStorage}catch(e){null==(n=null==t?void 0:t.loggerProvider)||n.debug("Failed to access localStorage. error=".concat(JSON.stringify(e))),i=void 0}return(o=e.call(this,i)||this).loggerProvider=null==t?void 0:t.loggerProvider,o}return(0,C.__extends)(t,e),t.prototype.set=function(t,r){var n;return(0,C.__awaiter)(this,void 0,void 0,function(){var i;return(0,C.__generator)(this,function(o){switch(o.label){case 0:if(!(Array.isArray(r)&&r.length>1e3))return[3,2];return i=r.length-1e3,[4,e.prototype.set.call(this,t,r.slice(0,1e3))];case 1:return o.sent(),null==(n=this.loggerProvider)||n.error("Failed to save ".concat(i," events because the queue length exceeded ").concat(1e3,".")),[3,4];case 2:return[4,e.prototype.set.call(this,t,r)];case 3:o.sent(),o.label=4;case 4:return[2]}})})},t}(tv),ty=function(e){function t(){var t;return e.call(this,null==(t=er())?void 0:t.sessionStorage)||this}return(0,C.__extends)(t,e),t}(tv),tb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return(0,C.__extends)(t,e),t.prototype.send=function(e,t){return(0,C.__awaiter)(this,void 0,void 0,function(){var r=this;return(0,C.__generator)(this,function(n){return[2,new Promise(function(n,i){"u"<typeof XMLHttpRequest&&i(Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",e,!0),o.onreadystatechange=function(){if(o.readyState===r.state.done){var e=o.responseText;try{n(r.buildResponse(JSON.parse(e)))}catch(e){n(r.buildResponse({code:o.status}))}}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(t))})]})})},t}(tg),t_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,C.__extends)(t,e),t.prototype.send=function(e,t){return(0,C.__awaiter)(this,void 0,void 0,function(){var r=this;return(0,C.__generator)(this,function(n){return[2,new Promise(function(n,i){var o=er();if(!(null==o?void 0:o.navigator.sendBeacon))throw Error("SendBeaconTransport is not supported");try{var a=JSON.stringify(t);if(o.navigator.sendBeacon(e,JSON.stringify(t)))return n(r.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:a.length,server_upload_time:Date.now()}));return n(r.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(tg),tw=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},tk=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},tE="[Amplitude]",tS="".concat(tE," Form Started"),tT="".concat(tE," Form Submitted"),tx="".concat(tE," File Downloaded"),tA="session_start",tC="session_end",tI="".concat(tE," File Extension"),tP="".concat(tE," File Name"),tO="".concat(tE," Link ID"),tM="".concat(tE," Link Text"),tR="".concat(tE," Link URL"),tL="".concat(tE," Form ID"),tN="".concat(tE," Form Name"),tD="".concat(tE," Form Destination"),tj="cookie",tU=function(e){function t(t,r,n,i,o,a,s,u,c,l,d,f,h,g,v,m,y,b,_,w,k,E,S,T,x,A,C,I,P,O,M,R,L,N,D,j,U,F,B,q){void 0===n&&(n=new tc),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===u&&(u=1e3),void 0===c&&(c=5),void 0===l&&(l=30),void 0===d&&(d=tj),void 0===m&&(m=new eh),void 0===y&&(y=p.Warn),void 0===_&&(_=!1),void 0===w&&(w=!1),void 0===S&&(S=""),void 0===T&&(T="US"),void 0===A&&(A=18e5),void 0===C&&(C=new tm({loggerProvider:m})),void 0===I&&(I={ipAddress:!0,language:!0,platform:!0}),void 0===P&&(P="fetch"),void 0===O&&(O=!1),void 0===M&&(M=!0),void 0===U&&(U=!0),void 0===F&&(F=0);var G=e.call(this,{apiKey:t,storageProvider:C,transportProvider:tB(P)})||this;return G.apiKey=t,G.appVersion=r,G.cookieOptions=i,G.defaultTracking=o,G.autocapture=a,G.flushIntervalMillis=u,G.flushMaxRetries=c,G.flushQueueSize=l,G.identityStorage=d,G.ingestionMetadata=f,G.instanceName=h,G.loggerProvider=m,G.logLevel=y,G.minIdLength=b,G.offline=_,G.partnerId=k,G.plan=E,G.serverUrl=S,G.serverZone=T,G.sessionTimeout=A,G.storageProvider=C,G.trackingOptions=I,G.transport=P,G.useBatch=O,G.fetchRemoteConfig=M,G.networkTrackingOptions=D,G.identify=j,G.enableDiagnostics=U,G.diagnosticsSampleRate=F,G.diagnosticsClient=B,G.remoteConfig=q,G.version=ta,G._optOut=!1,G._cookieStorage=n,G.deviceId=s,G.lastEventId=g,G.lastEventTime=v,G.optOut=w,G.sessionId=x,G.pageCounter=L,G.userId=R,G.debugLogsEnabled=N,G.loggerProvider.enable(N?p.Debug:G.logLevel),G.networkTrackingOptions=D,G.identify=j,G.enableDiagnostics=U,G.diagnosticsSampleRate=F,G.diagnosticsClient=B,M&&(G.remoteConfig||(G.remoteConfig={fetchRemoteConfig:M}),G.remoteConfig.fetchRemoteConfig||(G.remoteConfig.fetchRemoteConfig=M)),G}return(0,C.__extends)(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled};this.cookieStorage.set(th(this.apiKey),e)},t}(ep),tF=function(e,t){switch(void 0===e&&(e=tj),void 0===t&&(t={}),e){case"localStorage":return new tm;case"sessionStorage":return new ty;case"none":return new tc;default:return new tl((0,C.__assign)((0,C.__assign)({},t),{expirationDays:t.expiration}))}},tB=function(e){return"xhr"===e?new tb:"beacon"===e?new t_:new tp},tq="data-amp-mask",tG="*****",tH=/\b(?:\d[ -]*?){13,16}\b/,tz=/(\d{3}-?\d{2}-?\d{4})/g,tV=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,t$=function(e,t){if(void 0===t&&(t=[]),"string"!=typeof e)return"";var r,n,i=e;i=(i=(i=i.replace(tH,tG)).replace(tz,tG)).replace(tV,tG);try{for(var o=(0,C.__values)(t),a=o.next();!a.done;a=o.next()){var s=a.value;try{i=i.replace(s,tG)}catch(e){}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},tK=function(e){if("u"<typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(tq)?tG:e?e(document.title):document.title},tW=function(){function e(){}return e.prototype.parse=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(e){return[2,(0,C.__assign)((0,C.__assign)((0,C.__assign)((0,C.__assign)({},H),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=ej();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=null!=(t=null==(e=r.referrer)?void 0:e.split("/")[2])?t:void 0}catch(e){}return r},e.prototype.getClickIds=function(){var e,t=ej();return(e={})[M]=t[M],e[R]=t[R],e[L]=t[L],e[N]=t[N],e[D]=t[D],e[j]=t[j],e[U]=t[U],e[F]=t[F],e[B]=t[B],e[q]=t[q],e[G]=t[G],e},e}(),tJ=function(e){var t={};for(var r in e){var n=e[r];n&&(t[r]=n)}return t},tY=function(e){void 0===e&&(e={});var t,r,n=er(),i=void 0,o=!1,a=e.trackOn,s=e.trackHistoryChanges,u=e.eventType,c=void 0===u?"[Amplitude] Page Viewed":u,l=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==i||i.error("Malformed URI sequence: ",e)}return t},d=function(){return(0,C.__awaiter)(void 0,void 0,void 0,function(){var e,t,r;return(0,C.__generator)(this,function(n){switch(n.label){case 0:return e=l("u">typeof location&&location.href||""),r={event_type:c},t=[{}],[4,tQ()];case 1:return[2,(r.event_properties=C.__assign.apply(void 0,[C.__assign.apply(void 0,t.concat([n.sent()])),{"[Amplitude] Page Domain":"u">typeof location&&location.hostname||"","[Amplitude] Page Location":e,"[Amplitude] Page Path":"u">typeof location&&l(location.pathname)||"","[Amplitude] Page Title":tK(t$),"[Amplitude] Page URL":e.split("?")[0]}]),r)]}})})},f=function(){return void 0===a||"function"==typeof a&&a()},h="u">typeof location?location.href:null,g=function(){return(0,C.__awaiter)(void 0,void 0,void 0,function(){var e,r,n,o;return(0,C.__generator)(this,function(a){switch(a.label){case 0:if(r=tX(s,e=location.href,h||"")&&f(),h=e,!r)return[3,4];if(null==i||i.log("Tracking page view event"),null!=t)return[3,1];return[3,3];case 1:return o=(n=t).track,[4,d()];case 2:o.apply(n,[a.sent()]),a.label=3;case 3:a.label=4;case 4:return[2]}})})},p=function(){g()};return{name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,a){return(0,C.__awaiter)(void 0,void 0,void 0,function(){var s,u;return(0,C.__generator)(this,function(c){switch(c.label){case 0:if(t=a,r=e,(i=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),o=!0,n&&(n.addEventListener("popstate",p),n.history.pushState=new Proxy(n.history.pushState,{apply:function(e,t,r){var n=(0,C.__read)(r,3),i=n[0],a=n[1],s=n[2];e.apply(t,[i,a,s]),o&&g()}})),!f())return[3,2];return i.log("Tracking page view event"),u=(s=t).track,[4,d()];case 1:u.apply(s,[c.sent()]),c.label=2;case 2:return[2]}})})},execute:function(e){return(0,C.__awaiter)(void 0,void 0,void 0,function(){var t;return(0,C.__generator)(this,function(n){switch(n.label){case 0:if(!("attribution"===a&&tZ(e)))return[3,2];
1return null==i||i.log("Enriching campaign event to page view event with campaign parameters"),[4,d()];case 1:e.event_type=(t=n.sent()).event_type,e.event_properties=(0,C.__assign)((0,C.__assign)({},e.event_properties),t.event_properties),n.label=2;case 2:return r&&e.event_type===c&&(r.pageCounter=r.pageCounter?r.pageCounter+1:1,e.event_properties=(0,C.__assign)((0,C.__assign)({},e.event_properties),{"[Amplitude] Page Counter":r.pageCounter})),[2,e]}})})},teardown:function(){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(e){return n&&(n.removeEventListener("popstate",p),o=!1),[2]})})}}},tQ=function(){return(0,C.__awaiter)(void 0,void 0,void 0,function(){var e;return(0,C.__generator)(this,function(t){switch(t.label){case 0:return e=tJ,[4,new tW().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},tZ=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,r=t[v.SET]||{},n=t[v.UNSET]||{},i=(0,C.__spreadArray)((0,C.__spreadArray)([],(0,C.__read)(Object.keys(r)),!1),(0,C.__read)(Object.keys(n)),!1);return Object.keys(H).every(function(e){return i.includes(e)})}return!1},tX=function(e,t,r){if("pathOnly"!==e)return t!==r;if(""==r)return!0;var n=new URL(t),i=new URL(r);return n.origin+n.pathname!==i.origin+i.pathname},t0=function(){var e,t=[],r=function(e,r,n){e.addEventListener(r,n),t.push({element:e,type:r,handler:n})},n=function(){t.forEach(function(e){var t=e.element,r=e.type,n=e.handler;null==t||t.removeEventListener(r,n)}),t=[]};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(t,n){return(0,C.__awaiter)(void 0,void 0,void 0,function(){var i,o;return(0,C.__generator)(this,function(a){return i=function(){if(!n)return void t.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");if("u">typeof document){var i=function(e){var t=!1;r(e,"change",function(){var r,i=t2(e);t||n.track(tS,((r={})[tL]=t1(e.id),r[tN]=t1(e.name),r[tD]=i,r)),t=!0}),r(e,"submit",function(){var r,i,o=t2(e);t||n.track(tS,((r={})[tL]=t1(e.id),r[tN]=t1(e.name),r[tD]=o,r)),n.track(tT,((i={})[tL]=t1(e.id),i[tN]=t1(e.name),i[tD]=o,i)),t=!1})};Array.from(document.getElementsByTagName("form")).forEach(i),"u">typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}},"complete"===document.readyState?i():(o=er())?o.addEventListener("load",i):t.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]})})},execute:function(e){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(t){return null==e||e.disconnect(),n(),[2]})})}}},t1=function(e){if("string"==typeof e)return e},t2=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(null!=t?t:""),window.location.href).href}catch(e){}return t},t3=function(){var e,t=[],r=function(e,r,n){e.addEventListener(r,n),t.push({element:e,type:r,handler:n})},n=function(){t.forEach(function(e){var t=e.element,r=e.type,n=e.handler;null==t||t.removeEventListener(r,n)}),t=[]};return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(t,n){return(0,C.__awaiter)(void 0,void 0,void 0,function(){var i,o;return(0,C.__generator)(this,function(a){return i=function(){if(!n)return void t.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");if("u">typeof document){var i=function(e){try{t=new URL(e.href,window.location.href)}catch(e){return}var t,i=o.exec(t.href),a=null==i?void 0:i[1];a&&r(e,"click",function(){var r;a&&n.track(tx,((r={})[tI]=a,r[tP]=t.pathname,r[tO]=e.id,r[tM]=e.text,r[tR]=e.href,r))})},o=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/;
1Array.from(document.getElementsByTagName("a")).forEach(i),"u">typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}},"complete"===document.readyState?i():(o=er())?o.addEventListener("load",i):t.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]})})},execute:function(e){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(t){return null==e||e.disconnect(),n(),[2]})})}}},t4=!1,t5=function(e){t4||void 0!==e.defaultTracking||(e.loggerProvider.warn("`options.defaultTracking` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to `options.defaultTracking`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:\n\namplitude.init(<YOUR_API_KEY>, {\n defaultTracking: true,\n});\n\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details."),t4=!0)},t6=function(){var e=er(),t=[],r=function(r,n){(null==e?void 0:e.addEventListener)&&(null==e||e.addEventListener(r,n),t.push({type:r,handler:n}))},n=function(){t.forEach(function(t){var r=t.type,n=t.handler;null==e||e.removeEventListener(r,n)}),t=[]};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(n){return"u"<typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1):(e.offline=!navigator.onLine,r("online",function(){e.loggerProvider.debug("Network connectivity changed to online."),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis)}),r("offline",function(){e.loggerProvider.debug("Network connectivity changed to offline."),e.offline=!0})),[2]})})},teardown:function(){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(e){return n(),[2]})})}}};function t8(e,t,r){var n,i,o=[];try{for(var a=(0,C.__values)(null!=t?t:[]),s=a.next();!s.done;s=a.next()){var u=s.value;try{o.push(new RegExp(u))}catch(e){r.loggerProvider.warn("Invalid regex pattern: ".concat(u),e)}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return e.concat(o)}var t7=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],t9="data-amp-track-",re=["div","span","h1","h2","h3","h4","h5","h6"];function rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function rr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rn(e,t,r){return t&&rr(e.prototype,t),r&&rr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var ri=function(){return"function"==typeof Symbol},ro=function(e){return ri()&&!!Symbol[e]},ra=function(e){return ro(e)?Symbol[e]:"@@"+e};ri()&&!ro("observable")&&(Symbol.observable=Symbol("observable"));var rs=ra("iterator"),ru=ra("observable"),rc=ra("species");function rl(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw TypeError(r+" is not a function");return r}}function rd(e){var t=e.constructor;return void 0!==t&&null===(t=t[rc])&&(t=void 0),void 0!==t?t:r_}function rf(e){rf.log?rf.log(e):setTimeout(function(){throw e})}function rh(e){Promise.resolve().then(function(){try{e()}catch(e){rf(e)}})}function rg(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=rl(t,"unsubscribe");r&&r.call(t)}}catch(e){rf(e)}}function rp(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function rv(e,t,r){e._state="running";var n=e._observer;try{var i=rl(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(rp(e),i)i.call(n,r);else throw r;break;case"complete":rp(e),i&&i.call(n)}}catch(e){rf(e)}"closed"===e._state?rg(e):"running"===e._state&&(e._state="ready")}function rm(e,t,r){if("closed"!==e._state){if("buffering"===e._state)return void e._queue.push({type:t,value:r});if("ready"!==e._state){e._state="buffering",e._queue=[{type:t,value:r}],rh(function(){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(rv(e,t[r].type,t[r].value),"closed"!==e._state);++r);}});return}rv(e,t,r)}}var ry=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var r=new rb(this);try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(rp(this),rg(this))},rn(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),rb=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){rm(this._subscription,"next",e)},t.error=function(e){rm(this._subscription,"error",e)},t.complete=function(){rm(this._subscription,"complete")},rn(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),r_=function(){function e(t){if(!(this instanceof e))throw TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return("object"!=typeof e||null===e)&&(e={next:e,error:arguments[1],complete:arguments[2]}),new ry(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise(function(r,n){if("function"!=typeof e)return void n(TypeError(e+" is not a function"));function i(){o.unsubscribe(),r()}var o=t.subscribe({next:function(t){try{e(t,i)}catch(e){n(e),o.unsubscribe()}},error:n,complete:r})})},t.map=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");return new(rd(this))(function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})})},t.filter=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");return new(rd(this))(function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})})},t.reduce=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");var r=rd(this),n=arguments.length>1,i=!1,o=arguments[1],a=o;return new r(function(r){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||n)try{a=e(a,t)}catch(e){return r.error(e)}else a=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(TypeError("Cannot reduce an empty sequence"));r.next(a),r.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=rd(this);return new i(function(t){var n,o=0;return!function e(a){n=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]
1))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}})},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");var r=rd(this);return new r(function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){n.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),o.unsubscribe()}})},t[ru]=function(){return this},e.from=function(t){var r="function"==typeof this?this:e;if(null==t)throw TypeError(t+" is not an object");var n=rl(t,ru);if(n){var i=n.call(t);if(Object(i)!==i)throw TypeError(i+" is not an object");return i instanceof r_&&i.constructor===r?i:new r(function(e){return i.subscribe(e)})}if(ro("iterator")&&(n=rl(t,rs)))return new r(function(e){rh(function(){if(!e.closed){for(var r,i=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return rt(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rt(e,void 0)}}(e))){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n.call(t));!(r=i()).done;){var o=r.value;if(e.next(o),e.closed)return}e.complete()}})});if(Array.isArray(t))return new r(function(e){rh(function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}})});throw TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return new("function"==typeof this?this:e)(function(e){rh(function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}})})},rn(e,null,[{key:rc,get:function(){return this}}]),e}();function rw(e,t){return new r_(function(r){e.subscribe({next:function(e){t(e).then(function(e){return r.next(e)}).catch(function(e){return r.error(e)})},error:function(e){r.error(e)},complete:function(){r.complete()}})})}function rk(e,t){return new r_(function(r){var n=!1,i=new Set,o=function(){var e,t;n=!0;try{for(var r=(0,C.__values)(i),o=r.next();!o.done;o=r.next()){var a=o.value;try{a.unsubscribe()}catch(e){}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}i.clear()},a=function(e){var t=e.subscribe({next:function(e){n||r.next(e)},error:function(e){n||(n=!0,r.error(e),o())},complete:function(){i.delete(t),n||0!==i.size||(r.complete(),o(),n=!0)}});i.add(t)};return a(e),a(t),o})}function rE(e){var t=new Set,r=null;function n(){null==r||r.unsubscribe(),r=null,t.clear()}return new r_(function(i){return t.add(i),null===r&&(r=e.subscribe({next:function(e){try{for(var r,n,i,o=(0,C.__values)(t),a=o.next();!a.done;a=o.next()){var s=a.value;null==(i=s.next)||i.call(s,e)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},error:function(e){try{for(var r,i,o,a=(0,C.__values)(t),s=a.next();!s.done;s=a.next()){var u=s.value;null==(o=u.error)||o.call(u,e)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}n()},complete:function(){try{for(var e,r,i,o=(0,C.__values)(t),a=o.next();!a.done;a=o.next()){var s=a.value;null==(i=s.complete)||i.call(s)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}n()}})),function(){t.delete(i),0===t.size&&r&&(r.unsubscribe(),r=null)}})}ri()&&Object.defineProperty(r_,Symbol("extensions"),{value:{symbol:ru,hostReportError:rf},configurable:!0});var rS="1.18.1",rT="[Amplitude] Element Clicked",rx="[Amplitude] Element Tag",rA="[Amplitude] Element Text",rC="[Amplitude] Page URL",rI="https://app.amplitude.com",rP={US:rI,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},rO="data-amp-mask-attributes",rM=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},rR=function(e,t){var r=e;try{r=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return r},rL=["input","select","textarea"],rN=function(e,t){var r,n=null==(r=null==window?void 0:window.getComputedStyle)?void 0:r.call(window,e);return(null==n?void 0:n.getPropertyValue("cursor"))==="pointer"&&"click"===t},rD=function(e,t,r){return void 0===r&&(r=!1),function(n,i){var o,a,s=e.pageUrlAllowlist,u=e.pageUrlExcludelist,c=e.shouldTrackEventResolver,l=null==(a=null==(o=null==i?void 0:i.tagName)?void 0:o.toLowerCase)?void 0:a.call(o);if(!l)return!1;if(c)return c(n,i);if(!rM(window.location.href,s)||u&&u.length>0&&rM(window.location.href,u))return!1;var d=String(null==i?void 0:i.getAttribute("type"))||"";if("string"==typeof d)switch(d.toLowerCase()){case"hidden":case"password":return!1}var f=rN(i,n);if(r&&f)return!0;
1if(t&&!t.some(function(e){var t;return!!(null==(t=null==i?void 0:i.matches)?void 0:t.call(i,e))}))return!1;switch(l){case"input":case"select":case"textarea":return"change"===n||"click"===n;default:if(f)return!0;return"click"===n}}},rj=function(e){var t,r,n,i=null==(r=null==(t=null==e?void 0:e.tagName)?void 0:t.toLowerCase)?void 0:r.call(t),o=e instanceof HTMLElement&&(null==(n=e.getAttribute("contenteditable"))?void 0:n.toLowerCase())==="true";return!rL.includes(i)&&!o},rU=function(e){return Object.keys(e).reduce(function(t,r){var n=e[r];return null!=n&&("object"!=typeof n||0!==Object.keys(n).length)&&("string"!=typeof n||0!==n.trim().length)&&(t[r]=n),t},{})},rF=function(e,t){return e?t.some(function(t){var r;return null==(r=null==e?void 0:e.matches)?void 0:r.call(e,t)})?e:rF(null==e?void 0:e.parentElement,t):null},rB=function(e){return null!==e.event.target&&!!e.closestTrackedAncestor},rq=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",rO,tq]),rG=["type"],rH=["svg","path","g"],rz=["password","hidden"],rV=function(e,t){try{if("DOM_ELEMENT"===e.sourceType){var r=document.documentElement;if(e.scope&&t&&(r=t.closest(e.scope)),r&&e.selector)return r.querySelector(e.selector);return r}}catch(e){}},r$=function(e,t,r){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var n=r.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=n}})},rK=function(e,t){var r,n,i,o=this;this.replaceSensitiveString=function(e){return t$(e,o.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,r,n,i,a=performance.now(),s=[];if(!e)return[];for(var u=function(e){var t=[];if(!e)return t;
1t.push(e);for(var r=e.parentElement;r&&"HTML"!==r.tagName;)t.push(r),r=r.parentElement;return t}(e),c=new Map,l=u.length-1;l>=0;l--){var d=u[l];if(d){var f,h=(f=d.getAttribute(rO))?f.split(",").map(function(e){return e.trim()}).filter(function(e){return e.length>0&&"id"!==e&&"class"!==e}):[],g=l===u.length-1?[]:null!=(n=c.get(u[l+1]))?n:new Set,p=new Set((0,C.__spreadArray)((0,C.__spreadArray)([],(0,C.__read)(g),!1),(0,C.__read)(h),!1));c.set(d,p)}}s=u.map(function(e){var t;return function(e,t){if(null===e)return null;var r,n,i,o,a,s,u=String(e.tagName).toLowerCase(),c={tag:u},l=Array.from(null!=(o=null==(i=e.parentElement)?void 0:i.children)?o:[]);l.length&&(c.index=l.indexOf(e),c.indexOfType=l.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var d=null==(s=null==(a=e.previousElementSibling)?void 0:a.tagName)?void 0:s.toLowerCase();d&&(c.prevSib=String(d));var f=e.getAttribute("id");f&&(c.id=String(f));var h=Array.from(e.classList);h.length&&(c.classes=h);var g={},p=Array.from(e.attributes).filter(function(e){return!rq.has(e.name)}),v=!rj(e);if(!rz.includes(String(e.getAttribute("type")))&&!rH.includes(u))try{for(var m=(0,C.__values)(p),y=m.next();!y.done;y=m.next()){var b=y.value;if(!v||rG.includes(b.name)){if(t.has(b.name)){g[b.name]=tG;continue}g[b.name]=String(b.value).substring(0,128)}}}catch(e){r={error:e}}finally{try{y&&!y.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}return Object.keys(g).length&&(c.attrs=g),c}(e,null!=(t=c.get(e))?t:new Set)});var v=function(e){(null==e?void 0:e.attrs)&&Object.entries(e.attrs).forEach(function(t){var r=(0,C.__read)(t,2),n=r[0],i=r[1];e.attrs&&(e.attrs[n]=o.replaceSensitiveString(i))})};try{for(var m=(0,C.__values)(s),y=m.next();!y.done;y=m.next()){var b=y.value;v(b)}}catch(e){t={error:e}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(t)throw t.error}}var _=performance.now();return null==(i=o.diagnosticsClient)||i.recordHistogram("autocapturePlugin.getHierarchy",_-a),s},this.getNearestLabel=function(e){var t,r=e.parentElement;if(!r)return"";try{t=r.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}return t?o.getText(t):o.getNearestLabel(r)},this.getEventProperties=function(e,t,r){var n,i,a,s,u=null==(a=null==(i=null==t?void 0:t.tagName)?void 0:i.toLowerCase)?void 0:a.call(i),c="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},l=o.getHierarchy(t),d=null==(s=l[0])?void 0:s.attrs,f=o.getNearestLabel(t),h=Object.entries(null!=d?d:{}).reduce(function(e,t){var n=(0,C.__read)(t,2),i=n[0],o=n[1];if(i.startsWith(r)){var a=i.replace(r,"");a&&(e[a]=o||"")}return e},{}),g=((n={})["[Amplitude] Element Hierarchy"]=l,n[rx]=u,n[rA]=o.getText(t),n["[Amplitude] Element Position Left"]=null==c.left?null:Math.round(c.left),n["[Amplitude] Element Position Top"]=null==c.top?null:Math.round(c.top),n["[Amplitude] Element Attributes"]=h,n["[Amplitude] Element Parent Label"]=f,n[rC]=rR(window.location.href.split("?")[0]),n["[Amplitude] Page Title"]=tK(o.replaceSensitiveString),n["[Amplitude] Viewport Height"]=window.innerHeight,n["[Amplitude] Viewport Width"]=window.innerWidth,n);if(g["[Amplitude] Element ID"]=t.getAttribute("id")||"",g["[Amplitude] Element Class"]=t.getAttribute("class"),g["[Amplitude] Element Aria Label"]=null==d?void 0:d["aria-label"],"a"===u&&"click"===e&&t instanceof HTMLAnchorElement){var p=t.href.substring(0,128);g["[Amplitude] Element Href"]=o.replaceSensitiveString(p)}return rU(g)},this.addAdditionalEventProperties=function(e,t,r,n,i){void 0===i&&(i=!1);var a={event:e,timestamp:Date.now(),type:t};if(("click"===a.type||"change"===a.type)&&null!==a.event.target){if(i&&rN(a.event.target,a.type))return a.closestTrackedAncestor=a.event.target,a.targetElementProperties=o.getEventProperties(a.type,a.closestTrackedAncestor,n),a;var s=rF(a.event.target,r);s&&(a.closestTrackedAncestor=s,a.targetElementProperties=o.getEventProperties(a.type,s,n))}return a},this.extractDataFromDataSource=function(e,t){if("DOM_ELEMENT"===e.sourceType){var r=rV(e,t);if(r){if("TEXT"===e.elementExtractType)return o.getText(r);if("ATTRIBUTE"===e.elementExtractType&&e.attribute)return r.getAttribute(e.attribute)}}},this.getText=function(e){if(null!==e.closest("[".concat(tq,"]")))return tG;var t="";if(e.querySelector("[".concat(tq,"], [contenteditable]"))){var r=e.cloneNode(!0);r.querySelectorAll("[".concat(tq,"], [contenteditable]")).forEac
1h(function(e){e.innerText=tG}),t=r.innerText||""}else t=e.innerText||"";return o.replaceSensitiveString(t.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(e){if(!e)return{};var t,r,n,i=null==(n=null==(r=null==e?void 0:e.tagName)?void 0:r.toLowerCase)?void 0:n.call(r);return rU(((t={})[rx]=i,t[rA]=o.getText(e),t[rC]=window.location.href.split("?")[0],t))},this.diagnosticsClient=null==t?void 0:t.diagnosticsClient;var a=null!=(i=e.maskTextRegex)?i:[],s=[];try{for(var u=(0,C.__values)(a),c=u.next();!c.done;c=u.next()){var l=c.value;if(s.length>=25)break;if(l instanceof RegExp)s.push(l);else if("pattern"in l&&"string"==typeof l.pattern)try{s.push(RegExp(l.pattern,"i"))}catch(e){}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}this.additionalMaskTextPatterns=s},rW=function(){function e(e){var t=(void 0===e?{}:e).origin,r=this;this.endpoint=rI,this.requestCallbacks={},this.onSelect=function(e){r.notify({action:"element-selected",data:e})},this.onTrack=function(e,t){"selector-mode-changed"===e?r.notify({action:"track-selector-mode-changed",data:t}):"selector-moved"===e&&r.notify({action:"track-selector-moved",data:t})},this.endpoint=void 0===t?rI:t}return e.prototype.notify=function(e){var t,r,n,i;null==(r=null==(t=this.logger)?void 0:t.debug)||r.call(t,"Message sent: ",JSON.stringify(e)),null==(i=null==(n=window.opener)?void 0:n.postMessage)||i.call(n,e,this.endpoint)},e.prototype.sendRequest=function(e,t,r){var n=this;void 0===r&&(r={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise(function(t,a){n.requestCallbacks[i]={resolve:t,reject:a},n.notify(o),(null==r?void 0:r.timeout)>0&&setTimeout(function(){a(Error("".concat(e," timed out (id: ").concat(i,")"))),delete n.requestCallbacks[i]},r.timeout)})},e.prototype.handleResponse=function(e){var t;if(!this.requestCallbacks[e.id]){null==(t=this.logger)||t.warn("No callback found for request id: ".concat(e.id));return}this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]},e.prototype.setup=function(e){var t=this,r=void 0===e?{dataExtractor:new rK({})}:e,n=r.logger,i=r.endpoint,o=r.isElementSelectable,a=r.cssSelectorAllowlist,s=r.actionClickAllowlist,u=r.dataExtractor;this.logger=n,i&&this.endpoint===rI&&(this.endpoint=i);var c=null;window.addEventListener("message",function(e){if(null==(n=null==(r=t.logger)?void 0:r.debug)||n.call(r,"Message received: ",JSON.stringify(e)),t.endpoint===e.origin){var r,n,i,l,d,f=null==e?void 0:e.data,h=null==f?void 0:f.action;if(h)if("id"in f)null==(l=null==(i=t.logger)?void 0:i.debug)||l.call(i,"Received Response to previous request: ",JSON.stringify(e)),t.handleResponse(f);else if("ping"===h)t.notify({action:"pong"});else if("initialize-visual-tagging-selector"===h){var g,p=null==f?void 0:f.data;(g="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",new Promise(function(e,t){var r;try{var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=g,n.addEventListener("load",function(){e({status:!0})},{once:!0}),n.addEventListener("error",function(){t({status:!1,message:"Failed to load the script ".concat(g)})}),null==(r=document.head)||r.appendChild(n)}catch(e){t(e)}})).then(function(){var e;c=null==(e=null==window?void 0:window.amplitudeVisualTaggingSelector)?void 0:e.call(window,{getEventTagProps:u.getEventTagProps,isElementSelectable:function(e){return!o||o((null==p?void 0:p.actionType)||"click",e)},onTrack:t.onTrack,onSelect:t.onSelect,visualHighlightClass:"amp-visual-tagging-selector-highlight",messenger:t,cssSelectorAllowlist:a,actionClickAllowlist:s,extractDataFromDataSource:u.extractDataFromDataSource,dataExtractor:u,diagnostics:{autocapture:{version:rS}}}),t.notify({action:"selector-loaded"})}).catch(function(){var e;null==(e=t.logger)||e.warn("Failed to initialize visual tagging selector")})}else"close-visual-tagging-selector"===h&&(null==(d=null==c?void 0:c.close)||d.call(c))}}),this.notify({action:"page-loaded"})},e}(),rJ=function(){return new r_(function(e){var t=new MutationObserver(function(t){e.next(t)});return document.body&&t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},rY=function(e){return void 0===e&&(e="click"),new r_(function(t){var r,n=function(e){t.next(e)};return null==(r=er())||r.document.addEventListener(e,n,{capture:!0}),function(){var t;null==(t=er())||t.document.removeEventListener(e,n,{capture:!0})}})},rQ=function(e,t){try{if("[Amplitude] Element Text"===t.subprop_key)return"is"===t.subprop_op&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if("[Amplitude] Element Hierarchy"===t.subprop_key)return"autotrack css match"===t.subprop_op&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(e){console.error("Error matching event to filter",e)}return!1},rZ={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},rX=function(e){var t,r,n,i,o=Object.values(rZ).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return o;try{for(var a=(0,C.__values)(e),s=a.next();!s.done;s=a.next()){var u=s.value;try{try{for(var c=(n=void 0,(0,C.__values)(u.definition)),l=c.next();!l.done;l=c.next()){var d=rZ[l.value.event_type];d&&o[d].add(u.id)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}}catch(e){console.warn("Skipping Labeled Event due to malformed definition",null==u?void 0:u.id,e)}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return o},r0=function(e){var t,r,n,i,o=new Map;try{for(var a=(0,C.__values)(e),s=a.next();!s.done;s=a.next()){var u=s.value;try{for(var c=(n=void 0,(0,C.__values)(u.conditions)),l=c.next();!l.done;l=c.next()){var d=l.value;if("LABELED_EVENT"===d.type){var f=d.match.eventId,h=o.get(f);h||(h=[],o.set(f,h)),h.push(u)}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return o},r1=function(e,t){var r,n,i,o,a=new Set;try{for(var s=(0,C.__values)(e),u=s.next();!u.done;u=s.next()){var c=u.value,l=t.get(c.id);if(l)try{for(var d=(i=void 0,(0,C.__values)(l)),f=d.next();!f.done;f=d.next()){var h=f.value;a.add(h)}}catch(e){i={error:e}}
1finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return Array.from(a)},r2=function(){function e(e,t,r,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=r,this.options=n}return e.prototype.evaluate=function(e){var t,r,n=this.options.pageActions;if(!n)return e;var i=r1(Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return n.labeledEvents[e]}).filter(function(t){return t.definition.some(function(t){return rZ[t.event_type]===e.type&&t.filters.every(function(t){return rQ(e,t)})})}),this.labeledEventToTriggerMap);try{for(var o=(0,C.__values)(i),a=o.next();!a.done;a=o.next()){var s=a.value;r$(s.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=r},e}();(u=_||(_={})).ClickObservable="clickObservable",u.ChangeObservable="changeObservable",u.NavigateObservable="navigateObservable",u.MutationObservable="mutationObservable";var r3=function(e,t){void 0===e&&(e={}),null==t||t.diagnosticsClient.setTag("plugin.autocapture.version",rS);var r,n,i,o,a,s,u,c,l=e.dataAttributePrefix,d=void 0===l?t9:l,f=e.visualTaggingOptions,h=void 0===f?{enabled:!0,messenger:new rW}:f;e.cssSelectorAllowlist=null!=(r=e.cssSelectorAllowlist)?r:t7,e.actionClickAllowlist=null!=(n=e.actionClickAllowlist)?n:re,e.debounceTime=null!=(i=e.debounceTime)?i:0,e.pageUrlExcludelist=null==(o=e.pageUrlExcludelist)?void 0:o.reduce(function(e,t){if("string"==typeof t&&e.push(t),t instanceof RegExp&&e.push(t),"object"==typeof t&&null!==t&&"pattern"in t)try{e.push(new RegExp(t.pattern))}catch(e){console.warn("Invalid regex pattern: ".concat(t.pattern),e)}return e},[]);var g="@amplitude/plugin-autocapture-browser",p=[],v=new rK(e,t),m=function(){var t,r,n=rE(rY().map(function(t){return v.addAdditionalEventProperties(t,"click",e.cssSelectorAllowlist,d)})),i=rE(new r_(function(t){var r,n=function(r){var n=v.addAdditionalEventProperties(r,"change",e.cssSelectorAllowlist,d);t.next(n)};return null==(r=er())||r.document.addEventListener("change",n,{capture:!0}),function(){var e;return null==(e=er())?void 0:e.document.removeEventListener("change",n)}}));window.navigation&&(r=rE(new r_(function(t){var r=function(r){var n=v.addAdditionalEventProperties(r,"navigate",e.cssSelectorAllowlist,d);t.next(n)};return window.navigation.addEventListener("navigate",r),function(){window.navigation.removeEventListener("navigate",r)}})));var o=rE(rJ().map(function(t){return v.addAdditionalEventProperties(t,"mutation",e.cssSelectorAllowlist,d)}));return(t={})[_.ChangeObservable]=i,t[_.ClickObservable]=n,t[_.MutationObservable]=o,t[_.NavigateObservable]=r,t},y=rX(Object.values(null!=(s=null==(a=e.pageActions)?void 0:a.labeledEvents)?s:{})),b=r0(null!=(c=null==(u=e.pageActions)?void 0:u.triggers)?c:[]),w=new r2(y,b,v,e),k=function(t){var r,n;t&&(e.pageActions=(0,C.__assign)((0,C.__assign)({},e.pageActions),t),y=rX(Object.values(null!=(r=e.pageActions.labeledEvents)?r:{})),b=r0(null!=(n=e.pageActions.triggers)?n:[]),w.update(y,b,e))};return{name:g,type:"enrichment",setup:function(t,r){return(0,C.__awaiter)(void 0,void 0,void 0,function(){var n,i,o,a,s,u,c,l,f,y;return(0,C.__generator)(this,function(b){var _,E,S,T,x,A,I,P,O,M,R,L,N,D,j,U,F,B,q,G,H,z,V,$,K,W;return"u"<typeof document?[2]:(t.fetchRemoteConfig&&(t.remoteConfigClient?t.remoteConfigClient.subscribe("analyticsSDK.pageActions","all",function(e){k(e)}):t.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),n=rD(e,e.cssSelectorAllowlist),i=rD(e,e.actionClickAllowlist),E=(_={allObservables:o=m(),amplitude:r,shouldTrackEvent:n,evaluateTriggers:w.evaluate.bind(w)}).amplitude,S=_.allObservables,T=_.shouldTrackEvent,x=_.evaluateTriggers,a=S.clickObservable.filter(rB).filter(function(e){return T("click",e.closestTrackedAncestor)}).map(function(e){return x(e)}).subscribe(function(e){null==E||E.track(rT,e.targetElementProperties)}),p.push(a),I=(A={allObservables:o,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v.getEventProperties.apply(v,(0,C.__spreadArray)((0,C.__spreadArray)([],(0,C.__read)(e),!1),[d],!1))},amplitude:r,shouldTrackEvent:n,evaluateTriggers:w.evaluate.bind(w)}).amplitude,P=A.allObservables,O=A.getEventProperties,M=A.shouldTrackEvent,R=A.evaluateTriggers,s=P.changeObservable.filter(rB).filter(function(e){return M("change",e.closestTrackedAncestor)}).map(function(e){return R(e)}).subscribe(function(e){null==I||I.track("[Amplitude] Element Changed",O("change",e.closestTrackedAncestor))}),p.push(s),N=(L={allObservables:o,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v.getEventProperties.apply(v,(0,C.__spreadArray)((0,C.__spreadArray)([],(0,C.__read)(e),!1),[d],!1))},amplitude:r,shouldTrackEvent:n,shouldTrackActionClick:i}).amplitude,D=L.allObservables,j=L.options,U=L.getEventProperties,F=L.shouldTrackEvent,B=L.shouldTrackActionClick,q=D.clickObservable,G=D.mutationObservable,H=D.navigateObservable,z=q.filter(function(e){return!F("click",e.closestTrackedAncestor)}).map(function(e){var t=rF(e.event.target,j.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=U(e.type,e.closestTrackedAncestor)),e}).filter(rB).filter(function(e){return B("click",e.closestTrackedAncestor)}),V=H?rk(G,H):G,$=rk(z,V),K=null,W=null,(u=rw($,function(e){if(K&&(clearTimeout(K),K=null),"click"===e.type)W=e,K=setTimeout(function(){K=null,W=null},500);else if(W){var t=W;return W=null,Promise.resolve(t)}return Promise.resolve(null)}).subscribe(function(e){e&&(null==N||N.track(rT,U("click",e.closestTrackedAncestor)))}))&&p.push(u),null==(f=null==t?void 0:t.loggerProvider)||f.log("".concat(g," has been successfully added.")),window.opener&&h.enabled&&(c=e.cssSelectorAllowlist,l=e.actionClickAllowlist,null==(y=
1h.messenger)||y.setup((0,C.__assign)((0,C.__assign)({dataExtractor:v,logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:rP[t.serverZone]}),{isElementSelectable:rD(e,(0,C.__spreadArray)((0,C.__spreadArray)([],(0,C.__read)(c),!1),(0,C.__read)(l),!1)),cssSelectorAllowlist:c,actionClickAllowlist:l}))),[2])})})},execute:function(e){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,C.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n;return(0,C.__generator)(this,function(i){try{for(t=(e=(0,C.__values)(p)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(n=e.return)&&n.call(e)}finally{if(r)throw r.error}}return[2]})})}}},r4=(0,C.__spreadArray)(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],(0,C.__read)(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),r5=["*"],r6=["mutation","navigate"];function r8(e,t){var r,n,i,o,a=t.event,s=a.clientX,u=a.clientY;e.yMin=Math.min(null!=(r=e.yMin)?r:u,u),e.yMax=Math.max(null!=(n=e.yMax)?n:u,u),e.xMin=Math.min(null!=(i=e.xMin)?i:s,s),e.xMax=Math.max(null!=(o=e.xMax)?o:s,s),e.isOutOfBounds=e.yMax-e.yMin>50||e.xMax-e.xMin>50}function r7(e){if(0===e.length)return null;var t=e[0],r=e[e.length-1];return{rageClickEvent:(0,C.__assign)({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(r.timestamp).toISOString(),"[Amplitude] Duration":r.timestamp-t.timestamp,"[Amplitude] Clicks":e.map(function(e){return{X:e.event.clientX,Y:e.event.clientY,Time:e.timestamp}}),"[Amplitude] Click Count":e.length},t.targetElementProperties),time:t.timestamp}}var r9=function(e){void 0===e&&(e={});var t,r,n,i,o,a="@amplitude/plugin-frustration-browser",s=[],u=null!=(r=null==(t=e.rageClicks)?void 0:t.cssSelectorAllowlist)?r:r5,c=null!=(i=null==(n=e.deadClicks)?void 0:n.cssSelectorAllowlist)?i:r4,l=null!=(o=e.dataAttributePrefix)?o:t9,d=new rK(e),f=(0,C.__spreadArray)([],(0,C.__read)(new Set((0,C.__spreadArray)((0,C.__spreadArray)([],(0,C.__read)(u),!1),(0,C.__read)(c),!1))),!1),h=function(){var e,t,r=rE(rY("pointerdown").map(function(e){return d.addAdditionalEventProperties(e,"click",f,l,!0)})),n=rE(rJ().map(function(e){return d.addAdditionalEventProperties(e,"mutation",f,l)}));return window.navigation&&(t=rE(new r_(function(e){var t=function(t){e.next((0,C.__assign)((0,C.__assign)({},t),{type:"navigate"}))};return window.navigation.addEventListener("navigate",t),function(){window.navigation.removeEventListener("navigate",t)}}).map(function(e){return d.addAdditionalEventProperties(e,"navigate",f,l)}))),(e={})[_.ClickObservable]=r,e[_.MutationObservable]=n,e[_.NavigateObservable]=t,e};return{name:a,type:"enrichment",setup:function(t,r){return(0,C.__awaiter)(void 0,void 0,void 0,function(){var n,i,o,f,g,p;return(0,C.__generator)(this,function(v){var m,y,b,_,w,k,E,S,T,x,A,I;return"u"<typeof document?[2]:(n=rD(e,u),i=rD(e,c),f=function(e){var t=this,r=e.amplitude,n=e.allObservables,i=e.shouldTrackRageClick,o=n.clickObservable,a=[],s={},u=null;return rw(o.filter(function(e){return i("click",e.closestTrackedAncestor)}),function(e){return(0,C.__awaiter)(t,void 0,void 0,function(){var t;return(0,C.__generator)(this,function(r){var n,i,o,c;return(r8(s,e),t=null,0===a.length||(n=a).length>0&&n[n.length-1].closestTrackedAncestor!==e.closestTrackedAncestor||(o=Math.max(0,(i=a).length-4+1),c=i[o],e.timestamp-c.timestamp>=1e3)||s.isOutOfBounds)?(u&&(t=r7(a)),a=[],s={},e&&(r8(s,e),a.push(e))):a.push(e),(u&&(clearTimeout(u.timerId),u.resolve(t),u=null),a.length>=4)?[2,new Promise(function(e){u={resolve:e,timerId:setTimeout(function(){e(r7(a))},1e3)}})]:[2,null]})})}).subscribe(function(e){null!==e&&r.track("[Amplitude] Rage Click",e.rageClickEvent,{time:e.time})})}({allObservables:o=h(),amplitude:r,shouldTrackRageClick:n}),s.push(f),y=(m={amplitude:r,allObservables:o,getEventProperties:function(e,t){return d.getEventProperties(e,t,l)},shouldTrackDeadClick:i}).amplitude,b=m.allObservables,_=m.getEventProperties,w=m.shouldTrackDeadClick,k=b.clickObservable,E=b.mutationObservable,S=b.navigateObservable,T=k.filter(function(e){return rB(e)&&w("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')}),x=S?rk(E,S):E,A=rk(T,x),I=null,g=rw(A,function(e){if(I&&r6.includes(e.type))clearTimeout(I),I=null;else if("click"===e.type)return I?Promise.resolve(null):new Promise(function(t){I=setTimeout(function(){t(e),I=null},3e3)});return Promise.resolve(null)}).subscribe(function(e){if(e){var t={"[Amplitude] X":e.event.clientX,"[Amplitude] Y":e.event.clientY};y.track("[Amplitude] Dead Click",(0,C.__assign)((0,C.__assign)({},_("click",e.closestTrackedAncestor)),t),{time:e.timestamp})}}),s.push(g),null==(p=null==t?void 0:t.loggerProvider)||p.log("".concat(a," has been successfully added.")),[2])})})},execute:function(e){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,C.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n;return(0,C.__generator)(this,function(i){try{for(t=(e=(0,C.__values)(s)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(n=e.return)&&n.call(e)}finally{if(r)throw r.error}}return[2]})})}}};function ne(e,t,r){e&&function e(t){var r,n,i=t.json,o=t.targetObject,a=t.allowlist,s=t.excludelist,u=t.ancestors,c=t.parentObject,l=t.targetKey;o||(o=i);var d=Object.keys(o);try{for(var f=(0,C.__values)(d),h=f.next();!h.done;h=f.next()){var g,p=h.value,v=(0,C.__spreadArray)((0,C.__spreadArray)([],(0,C.__read)(u),!1),[p],!1);(g=o[p],"string"==typeof g||"number"==typeof g||"boolean"==typeof g||null==g)?(!nr(v,a)||nr(v,s))&&delete o[p]:e({json:i,targetObject:o[p],allowlist:a,excludelist:s,ancestors:v,parentObject:o,targetKey:p})}}catch(e){r={error:e}}finally{try{h&&!h.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}0===Object.keys(o).length&&c&&l&&delete c[l]}({json:e,allowlist:t.map(nt),excludelist:r.map(nt),ancestors:[]})}function nt(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})}function nr(e,t){return t.some(function(t){return function e(t,r,n,i){if(void 0===n&&(n=0),void 0===i&&(i=0),i===r.length)return n===t.length;if(n===t.length){for(;i<r.length&&"**"===r[i];)i++;return i===r.length}var o=r[i];if("**"===o){if(i+1===r.length)return!0;for(var a=n;a<=t.length;a++)if(e(t,r,a,i+1))return!0;return!1}return("*"===o||o===t[n])&&e(t,r,n+1,i+1)}(e,t)})}var nn=function(){function e(e){this.request=e}return e.prototype.headers=function(e){void 0===e&&(e=[]);var t,r,n=this.request.headers,i={};if(Array.isArray(n))n.forEach(function(e){var t=(0,C.__read)(e,2),r=t[0],n=t[1];i[r]=n});else if(n instanceof Headers)n.forEach(function(e,t){i[t]=e});else if("object"==typeof n&&null!==n)try{for(var o=(0,C.__values)(Object.entries(n)),a=o.next();!a.done;a=o.next()){var s=(0,C.__read)(a.value,2),u=s[0],c=s[1];i[u]=c}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return nl(i,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=er();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=no(t,100),this._bodySize}}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(r){return 0===e.length?[2,null]:[2,nu(this.body,e,t)]})})},e}(),ni=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),nl(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return no(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(r){return 0===e.length?[2,null]:[2,nu(this.body,e,t)]})})},e}();function no(e,t){var r,n,i,o,a=er(),s=null==a?void 0:a.TextEncoder;if(s){if("string"==typeof e)o=e,i=new s().encode(o).length;else if(e instanceof Blob)i=(o=e).size;else if(e instanceof URLSearchParams)o=e,i=new s().encode(o.toString()).length;else if(ArrayBuffer.isView(e))i=(o=e).byteLength;else if(e instanceof ArrayBuffer)i=(o=e).byteLength;else if(e instanceof FormData){var u=0,c=0;try{for(var l=(0,C.__values)(e.entries()),d=l.next();!d.done;d=l.next()){var f=(0,C.__read)(d.value,2),h=f[0],g=f[1];if(u+=h.length,"string"==typeof g)u+=new s().encode(g).length;else{if(!(g instanceof Blob))return;u+=g.size}if(++c>=t)return}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}i=u}else if(e instanceof ReadableStream){o=e;return}return i}}var na=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),this.response.headers instanceof Headers){var r=this.response.headers,n={};return null==(t=null==r?void 0:r.forEach)||t.call(r,function(e,t){n[t]=e}),nl(n,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){if(void 0!==this._bodySize)return this._bodySize;var e,t,r=null==(t=null==(e=this.response.headers)?void 0:e.get)?void 0:t.call(e,"content-length"),n=r?parseInt(r,10):void 0;return this._bodySize=n,n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(e){switch(e.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.race([this.clonedResponse.text(),new Promise(function(e){return setTimeout(function(){return e(null)},500)})])];case 2:return[2,e.sent()];case 3:return e.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(r){switch(r.label){case 0:if(0===e.length)return[2,null];return[4,this.text()];case 1:return[2,nu(r.sent(),e,t)]}})})},e}(),ns=function(){function e(e,t,r,n){this.statusCode=e,this.headersString=t,this.size=r,this.getJson=n}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){if(void 0===e&&(e=[]),!this.headersString)return{};var t,r,n={},i=this.headersString.split("\r\n");try{for(var o=(0,C.__values)(i),a=o.next();!a.done;a=o.next()){var s=a.value,u=(0,C.__read)(s.split(": "),2),c=u[0],l=u[1];c&&l&&(n[c]=l)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return nl(n,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),(0,C.__awaiter)(this,void 0,void 0,function(){var r;return(0,C.__generator)(this,function(n){return 0===e.length?[2,null]:(r=this.getJson())?(ne(r,e,t),[2,r]):[2,null]})})},e}();function nu(e,t,r){if(!e)return null;try{var n=JSON.parse(e);return ne(n,t,r),n}catch(e){return null}}(c=w||(w={})).REDACT="redact",c.REMOVE="remove";var nc="[REDACTED]",nl=function(e,t){var r,n,i=t.allow,o=void 0===i?[]:i,a=t.strategy,s=void 0===a?w.REMOVE:a,u=(0,C.__spreadArray)([],(0,C.__read)(V),!1),c={};try{for(var l=(0,C.__values)(Object.keys(e)),d=l.next();!d.done;d=l.next()){var f=d.value;!function(t){var r=t.toLowerCase();u.find(function(e){return e.toLowerCase()===r})?s===w.REDACT&&(c[t]=nc):o.find(function(e){return e.toLowerCase()===r})?c[t]=e[t]:s===w.REDACT&&(c[t]=nc)}(f)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}return c},nd=function(){function e(e,t,r,n,i,o,a,s,u,c,l){void 0===a&&(a=0),this.type=e,this.method=t,this.timestamp=r,this.startTime=n,this.url=i,this.requestWrapper=o,this.status=a,this.duration=s,this.responseWrapper=u,this.error=c,this.endTime=l}return e.prototype.toSerializable=function(){var e,t,r,n;
1return Object.fromEntries(Object.entries({type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null==(e=this.requestWrapper)?void 0:e.headers((0,C.__spreadArray)([],(0,C.__read)(z),!1)),requestBodySize:null==(t=this.requestWrapper)?void 0:t.bodySize,responseHeaders:null==(r=this.responseWrapper)?void 0:r.headers((0,C.__spreadArray)([],(0,C.__read)(z),!1)),responseBodySize:null==(n=this.responseWrapper)?void 0:n.bodySize}).filter(function(e){var t=(0,C.__read)(e,2);return void 0!==(t[0],t[1])}))},e}(),nf=function(e,t){void 0===t&&(t=ei()),this.callback=e,this.id=t},nh=new(function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var r=er();e.isSupported()&&(this.globalScope=r)}return e.isSupported=function(){var e=er();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var r,n,i,o,a,s,u,c,l,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var f=null==(i=null==(n=null==(r=this.globalScope)?void 0:r.XMLHttpRequest)?void 0:n.prototype)?void 0:i.open,h=null==(s=null==(a=null==(o=this.globalScope)?void 0:o.XMLHttpRequest)?void 0:a.prototype)?void 0:s.send,g=null==(l=null==(c=null==(u=this.globalScope)?void 0:u.XMLHttpRequest)?void 0:c.prototype)?void 0:l.setRequestHeader;f&&h&&g&&this.observeXhr(f,h,g);var p=null==(d=this.globalScope)?void 0:d.fetch;p&&this.observeFetch(p),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(r){var n;try{r.callback(e)}catch(e){null==(n=t.logger)||n.debug("an unexpected error occurred while triggering event callbacks",e)}})},e.prototype.handleNetworkRequestEvent=function(e,t,r,n,i,o,a){if(void 0!==o&&void 0!==a){var s,u,c,l,d="GET";if("object"==typeof t&&null!==t&&"url"in t&&"method"in t?(u=t.url,d=t.method):u=null==(s=null==t?void 0:t.toString)?void 0:s.call(t),u)try{var f=new URL(u);u="".concat(f.protocol,"//").concat(f.host).concat(f.pathname).concat(f.search).concat(f.hash)}catch(e){}d=(null==r?void 0:r.method)||d,n&&(c=n.status),i&&(l={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},c=0);var h=Math.floor(performance.now()-a),g=Math.floor(o+h),p=new nd(e,d,o,o,u,r,c,h,n,l,g);this.triggerEventCallbacks(p)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null==(e=Date.now)?void 0:e.call(Date),durationStart:null==(t=null==performance?void 0:performance.now)?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(r,n){return(0,C.__awaiter)(t,void 0,void 0,function(){var t,i,o,a,s;return(0,C.__generator)(this,function(u){switch(u.label){case 0:try{t=this.getTimestamps()}catch(e){null==(a=this.logger)||a.debug("an unexpected error occurred while retrieving timestamps",e)}u.label=1;case 1:return u.trys.push([1,3,,4]),[4,e(r,n)];case 2:return i=u.sent(),[3,4];case 3:return o=u.sent(),[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",r,n?new nn(n):void 0,i?new na(i):void 0,o,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){null==(s=this.logger)||s.debug("an unexpected error occurred while handling fetch",e)}if(i)return[2,i];throw o}})})})},e.createXhrJsonParser=function(e,t){return function(){var r,n;try{if("json"===e.responseType){if(null==(r=t.globalScope)?void 0:r.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(r){r instanceof Error&&"InvalidStateError"===r.name&&(null==(n=t.logger)||n.error("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'")))}return null}},e.prototype.observeXhr=function(t,r,n){if(this.globalScope&&t&&r){var i=this.globalScope.XMLHttpRequest.prototype,o=this;i.open=function(){for(var e,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=(0,C.__read)(n,2),s=a[0],u=a[1];try{this.$$AmplitudeAnalyticsEvent=(0,C.__assign)({method:s,url:null==(e=null==u?void 0:u.toString)?void 0:e.call(u),headers:{}},o.getTimestamps())}catch(e){null==(r=o.logger)||r.error("an unexpected error occurred while calling xhr open",e)}return t.apply(this,n)},i.send=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this,a=e.createXhrJsonParser(this,o),s=t[0],u=i.$$AmplitudeAnalyticsEvent;return i.addEventListener("loadend",function(){var e;try{var t=i.getAllResponseHeaders(),r=i.getResponseHeader("content-length"),n=new ns(i.status,t,r?parseInt(r,10):void 0,a),c=i.$$AmplitudeAnalyticsEvent.headers,l=new ni(s,c);
1u.status=i.status,o.handleNetworkRequestEvent("xhr",{url:u.url,method:u.method},l,n,void 0,u.startTime,u.durationStart)}catch(t){null==(e=o.logger)||e.error("an unexpected error occurred while handling xhr send",t)}}),r.apply(i,t)},i.setRequestHeader=function(e,t){var r;try{this.$$AmplitudeAnalyticsEvent.headers[e]=t}catch(e){null==(r=o.logger)||r.error("an unexpected error occurred while calling xhr setRequestHeader",e)}n.apply(this,[e,t])}}},e}()),ng="[Amplitude] Network Request",np="500-599";function nv(e,t){return RegExp("^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$").test(e)}function nm(e,t){var r,n,i=t.split(",");try{for(var o=(0,C.__values)(i),a=o.next();!a.done;a=o.next()){var s=a.value,u=(0,C.__read)(s.split("-").map(Number),2),c=u[0],l=u[1];if(e===c&&void 0===l||e>=c&&e<=l)return!0}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1}function ny(e){var t;if(e)try{var r=null==(t=er())?void 0:t.location.href,n=new URL(e,r),i=n.searchParams.toString(),o=n.hash.replace("#",""),a=n.href,s=n.host;n.hash="",n.search="";var u=n.href;return{query:i,fragment:o,href:a,hrefWithoutQueryOrHash:u,host:s}}catch(e){return}}function nb(e){return"object"!=typeof e||null===e?e?(0,C.__spreadArray)([],(0,C.__read)(z),!1):void 0:0!==e.length?e:void 0}function n_(e){var t,r;return!(null==(t=null==e?void 0:e.allowlist)?void 0:t.length)&&!(null==(r=null==e?void 0:e.blocklist)?void 0:r.length)}(k||(k={})).NetworkObservable="networkObservable";var nw=function(e){void 0===e&&(e={});var t,r="@amplitude/plugin-network-capture-browser",n=function(){var e,r=new r_(function(e){var r=new nf(function(t){var r={event:t,timestamp:Date.now(),type:"network"};e.next(r)});return nh.subscribe(r,t),function(){nh.unsubscribe(r)}});return(e={})[k.NetworkObservable]=r,e};return{name:r,type:"enrichment",setup:function(i,o){return(0,C.__awaiter)(void 0,void 0,void 0,function(){var a;return(0,C.__generator)(this,function(s){var u,c,l,d,f;return"u"<typeof document?[2]:(a=n(),t=null==i?void 0:i.loggerProvider,c=(u={allObservables:a,networkTrackingOptions:e,amplitude:o,loggerProvider:t}).allObservables,l=u.networkTrackingOptions,d=u.amplitude,f=u.loggerProvider,E=c.networkObservable.filter(function(e){return function(e,t){void 0===t&&(t={});var r,n,i=ny(e.url);if(!i)return!1;var o=i.host;return!(!1!==t.ignoreAmplitudeRequests&&(nv(o,"*.amplitude.com")||nv(o,"amplitude.com"))||(null==(r=t.ignoreHosts)?void 0:r.find(function(e){return nv(o,e)})))&&(!!t.captureRules||void 0===e.status||!!nm(e.status,np))&&(!t.captureRules||((0,C.__spreadArray)([],(0,C.__read)(t.captureRules),!1).reverse().find(function(t){if(n=function(e,t,r,n,i){if((!e.hosts||e.hosts.find(function(e){return nv(t,e)}))&&(!n||!e.urls||rM(n,e.urls))&&(!i||!e.methods||e.methods.find(function(e){return i.toLowerCase()===e.toLowerCase()||"*"===e})))return(!r&&0!==r||!!nm(r,e.statusCodeRange||np))&&!0}(t,o,e.status,e.url,e.method)){var r=nb(t.responseHeaders);if(e.responseWrapper&&r){var i=e.responseWrapper.headers(r);i&&(e.responseHeaders=i)}var a=nb(t.requestHeaders);if(e.requestWrapper&&a){var s=e.requestWrapper.headers(a);s&&(e.requestHeaders=s)}e.responseWrapper&&t.responseBody&&!n_(t.responseBody)&&(e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,t.responseBody.blocklist)),e.requestWrapper&&t.requestBody&&!n_(t.requestBody)&&(e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,t.requestBody.blocklist))}return void 0!==n}),!!n))&&!(e.requestWrapper&&function(e,t){if(e.includes("amplitude.com"))try{var r=t.body;if("string"!=typeof r)return!1;if(JSON.parse(r).events.find(function(e){return e.event_type===ng}))return!0}catch(e){}return!1}(o,e.requestWrapper))}(e.event,l)}).subscribe(function(e){var t,r,n,i=e.event,o=ny(i.url);if(o){var a=null==(r=i.responseWrapper)?void 0:r.bodySize,s=null==(n=i.requestWrapper)?void 0:n.bodySize;!function(e,t,r,n){(0,C.__awaiter)(this,void 0,void 0,function(){var i,o,a;return(0,C.__generator)(this,function(s){switch(s.label){case 0:if(!(t.requestBodyJson||t.responseBodyJson))return[3,2];return[4,Promise.all([t.requestBodyJson,t.responseBodyJson])];case 1:if(o=(i=C.__read.apply(void 0,[s.sent(),2]))[0],a=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(e){null==n||n.debug("Failed to stringify request body",e)}if(a)try{e["[Amplitude] Response Body"]=JSON.stringify(a)}catch(e){null==n||n.debug("Failed to stringify response body")}s.label=2;case 2:return null==r||r.track(ng,e),[2]}})})}(((t={})["[Amplitude] URL"]=o.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=o.query,t["[Amplitude] URL Fragment"]=o.fragment,t["[Amplitude] Request Method"]=i.method,t["[Amplitude] Status Code"]=i.status,t["[Amplitude] Start Time"]=i.startTime,t["[Amplitude] Completion Time"]=i.endTime,t["[Amplitude] Duration"]=i.duration,t["[Amplitude] Request Body Size"]=s,t["[Amplitude] Response Body Size"]=a,t["[Amplitude] Request Type"]=i.type,t["[Amplitude] Request Headers"]=i.requestHeaders,t["[Amplitude] Response Headers"]=i.responseHeaders,t),i,d,f)}}),null==t||t.log("".concat(r," has been successfully added.")),[2])})})},execute:function(e){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(e){return E.unsubscribe(),[2]})})}}};let nk=-1,nE=e=>{addEventListener("pageshow",t=>{t.persisted&&(nk=t.timeStamp,e(t))},!0)},nS=(e,t,r,n)=>{let i,o;return a=>{let s;t.value>=0&&(a||n)&&((o=t.value-(i??0))||void 0===i)&&(i=t.value,t.delta=o,s=t.value,t.rating=s>r[1]?"poor":s>r[0]?"needs-improvement":"good",e(t))}},nT=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},nx=()=>{let e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},nA=()=>{let e=nx();return e?.activationStart??0},nC=(e,t=-1)=>{let r=nx(),n="navigate";return nk>=0?n="back-forward-cache":r&&(document.prerendering||nA()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(0x82f79cd8fff*Math.random())+1e12}`,navigationType:n}},nI=new WeakMap;function nP(e,t){return nI.get(e)||nI.set(e,new t),nI.get(e)}class nO{t;i=0;o=[];h(e){if(e.hadRecentInput)return;let t=this.o[0],r=this.o.at(-1);this.i&&t&&r&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}let nM=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let n=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return n.observe({type:e,buffered:!0,...r}),n}}catch{}},nR=e=>{let t=!1;return()=>{t||(e(),t=!0)}},nL=-1,nN=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,nD=e=>{"hidden"===document.visibilityState&&nL>-1&&(nL="visibilitychange"===e.type?e.timeStamp:0,nU())},nj=()=>{addEventListener("visibilitychange",nD,!0),addEventListener("prerenderingchange",nD,!0)},nU=()=>{removeEventListener("visibilitychange",nD,!0),removeEventListener("prerenderingchange",nD,!0)},nF=()=>
1{if(nL<0){let e=nA();nL=(document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime)??nN(),nj(),nE(()=>{setTimeout(()=>{nL=nN(),nj()})})}return{get firstHiddenTime(){return nL}}},nB=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},nq=[1800,3e3],nG=(e,t={})=>{nB(()=>{let r=nF(),n,i=nC("FCP"),o=nM("paint",e=>{for(let t of e)"first-contentful-paint"===t.name&&(o.disconnect(),t.startTime<r.firstHiddenTime&&(i.value=Math.max(t.startTime-nA(),0),i.entries.push(t),n(!0)))});o&&(n=nS(e,i,nq,t.reportAllChanges),nE(r=>{n=nS(e,i=nC("FCP"),nq,t.reportAllChanges),nT(()=>{i.value=performance.now()-r.timeStamp,n(!0)})}))})},nH=[.1,.25],nz=0,nV=1/0,n$=0,nK=e=>{for(let t of e)t.interactionId&&(nV=Math.min(nV,t.interactionId),nz=(n$=Math.max(n$,t.interactionId))?(n$-nV)/7+1:0)},nW=()=>t?nz:performance.interactionCount??0,nJ=0;class nY{u=[];l=new Map;m;p;v(){nJ=nW(),this.u.length=0,this.l.clear()}P(){let e=Math.min(this.u.length-1,Math.floor((nW()-nJ)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;let t=this.u.at(-1),r=this.l.get(e.interactionId);if(r||this.u.length<10||e.duration>t.T){if(r?e.duration>r.T?(r.entries=[e],r.T=e.duration):e.duration===r.T&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],T:e.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((e,t)=>t.T-e.T),this.u.length>10)for(let e of this.u.splice(10))this.l.delete(e.id);this.p?.(r)}}}let nQ=e=>{let t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(t(e=nR(e)),document.addEventListener("visibilitychange",e,{once:!0}))},nZ=[200,500];class nX{m;h(e){this.m?.(e)}}let n0=[2500,4e3],n1=[800,1800],n2=e=>{document.prerendering?nB(()=>n2(e)):"complete"!==document.readyState?addEventListener("load",()=>n2(e),!0):setTimeout(e)};function n3(e){var t,r;return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor((r=(null==(t=e.entries[0])?void 0:t.startTime)||0,performance.timeOrigin+r)),navigationStart:Math.floor(performance.timeOrigin)}}var n4=function(){var e=null,r=er(),n=null==r?void 0:r.document,i=null==r?void 0:r.location;return{name:"web-vitals-browser",type:"enrichment",setup:function(r,o){return(0,C.__awaiter)(void 0,void 0,void 0,function(){var a,s;return(0,C.__generator)(this,function(u){return void 0===n||(a=rR((null==i?void 0:i.href)||"",r.loggerProvider),s={"[Amplitude] Page Domain":(null==i?void 0:i.hostname)||"","[Amplitude] Page Location":a,"[Amplitude] Page Path":rR((null==i?void 0:i.pathname)||"",r.loggerProvider),"[Amplitude] Page Title":"u">typeof document&&document.title||"","[Amplitude] Page URL":rR(a.split("?")[0],r.loggerProvider)},((e,t={})=>{nB(()=>{let r=nF(),n,i=nC("LCP"),o=nP(t,nX),a=e=>{for(let a of(t.reportAllChanges||(e=e.slice(-1)),e))o.h(a),a.startTime<r.firstHiddenTime&&(i.value=Math.max(a.startTime-nA(),0),i.entries=[a],n())},s=nM("largest-contentful-paint",a);if(s){n=nS(e,i,n0,t.reportAllChanges);let r=nR(()=>{a(s.takeRecords()),s.disconnect(),n(!0)});for(let e of["keydown","click","visibilitychange"])addEventListener(e,()=>nQ(r),{capture:!0,once:!0});nE(r=>{n=nS(e,i=nC("LCP"),n0,t.reportAllChanges),nT(()=>{i.value=performance.now()-r.timeStamp,n(!0)})})}})})(function(e){s["[Amplitude] LCP"]=n3(e)}),nG(function(e){s["[Amplitude] FCP"]=n3(e)}),((e,r={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&nB(()=>{"interactionCount"in performance||t||(t=nM("event",nK,{type:"event",buffered:!0,durationThreshold:0}));let n,i=nC("INP"),o=nP(r,nY),a=e=>{nQ(()=>{for(let t of e)o.h(t);let t=o.P();t&&t.T!==i.value&&(i.value=t.T,i.entries=t.entries,n())})},s=nM("event",a,{durationThreshold:r.durationThreshold??40});n=nS(e,i,nZ,r.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(a(s.takeRecords()),n(!0))}),nE(()=>{o.v(),n=nS(e,i=nC("INP"),nZ,r.reportAllChanges)}))})})(function(e){s["[Amplitude] INP"]=n3(e)}),((e,t={})=>{nG(nR(()=>{let r,n=nC("CLS",0),i=nP(t,nO),o=e=>{for(let t of e)i.h(t);i.i>n.value&&(n.value=i.i,n.entries=i.o,r())},a=nM("layout-shift",o);a&&(r=nS(e,n,nH,t.reportAllChanges),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(o(a.takeRecords()),r(!0))}),nE(()=>{i.i=0,r=nS(e,n=nC("CLS",0),nH,t.reportAllChanges),nT(()=>r())}),setTimeout(r))}))})(function(e){s["[Amplitude] CLS"]=n3(e)}),((e,t={})=>{let r=nC("TTFB"),n=nS(e,r,n1,t.reportAllChanges);n2(()=>{let i=nx();i&&(r.value=Math.max(i.responseStart-nA(),0),r.entries=[i],n(!0),nE(()=>{(n=nS(e,r=nC("TTFB",0),n1,t.reportAllChanges))(!0)}))})})(function(e){s["[Amplitude] TTFB"]=n3(e)}),e=function(){"hidden"===n.visibilityState&&e&&(o.track("[Amplitude] Web Vitals",s),n.removeEventListener("visibilitychange",e),e=null)},n.addEventListener("visibilitychange",e)),[2]})})},execute:function(e){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(t){return e&&(null==n||n.removeEventListener("visibilitychange",e)),[2]})})}}},n5=function(e,t,r){return void 0===t&&(t=""),void 0===r&&(r=10),["AMP",t,e.substring(0,r)].filter(
1Boolean).join("_")},n6=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},n8=function(e,t,r,n,i){void 0===i&&(i=!0),e.referrer;var o=e.referring_domain,a=(0,C.__rest)(e,["referrer","referring_domain"]),s=t||{},u=(s.referrer,s.referring_domain),c=(0,C.__rest)(s,["referrer","referring_domain"]);if(n7(r.excludeReferrers,e.referring_domain))return n.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&Object.values(e).every(function(e){return!e})&&t)return n.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var l=JSON.stringify(a)!==JSON.stringify(c),d=n6(o||"")!==n6(u||""),f=!t||l||d;return f?n.debug("This is a new campaign. An $identify event will be sent."):n.debug("This is not a new campaign because it's the same as the previous one."),f},n7=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some(function(e){return e instanceof RegExp?e.test(t):e===t})},n9=function(e){var t=e;return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},ie=function(){function e(e,t){var r;this.shouldTrackNewCampaign=!1,this.options=(0,C.__assign)({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:n9(null==(r=t.cookieOptions)?void 0:r.domain)},e),this.storage=t.cookieStorage,this.storageKey=n5(t.apiKey,"MKTG"),this.webExpStorageKey=n5(t.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=H,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,this.logger=t.loggerProvider,t.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t;return(0,C.__generator)(this,function(r){switch(r.label){case 0:return[4,this.fetchCampaign()];case 1:if(t=C.__read.apply(void 0,[r.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||eN(this.sessionTimeout,this.lastEventTime),!n8(this.currentCampaign,this.previousCampaign,this.options,this.logger,e))return[3,3];return this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e;return(0,C.__generator)(this,function(t){switch(t.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:if(!(e=t.sent()))return[3,3];return[4,this.storage.remove(this.webExpStorageKey)];case 2:t.sent(),t.label=3;case 3:return[4,Promise.all([e||new tW().parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t,r,n=(t=this.currentCampaign,r=this.options,ea(Object.entries((0,C.__assign)((0,C.__assign)({},H),t)).reduce(function(e,t){var n,i=(0,C.__read)(t,2),o=i[0],a=i[1];return(e.setOnce("initial_".concat(o),null!=(n=null!=a?a:r.initialEmptyValue)?n:"EMPTY"),a)?e.set(o,a):e.unset(o)},new W)));return e&&(n.event_id=e),n},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),it="AMP_CURRENT_PAGE",ir="AMP_PREVIOUS_PAGE",ii="AMP_URL_INFO";(l=S||(S={})).Direct="direct",l.Internal="internal",l.External="external";var io=new Set([m.IDENTIFY,m.GROUP_IDENTIFY,m.REVENUE]),ia=function(){var e=er(),t=void 0,r=!1,n=void 0,i=!1,o=!1,a=function(e){var t;try{var r=rR(e,n);t=new URL(r).hostname}catch(e){null==n||n.error("Could not parse URL: ",e)}return t},s=function(e){var t="u">typeof location&&location.hostname||"";switch(e?a(e):void 0){case void 0:return S.Direct;case t:return S.Internal;default:return S.External}},u=function(){(0,C.__awaiter)(void 0,void 0,void 0,function(){var e,n,i,o,a;return(0,C.__generator)(this,function(s){switch(s.label){case 0:if(!(t&&r))return[3,3];return[4,t.get(ii)];case 1:return e=s.sent(),n=rR("u">typeof location&&location.href||""),i=(null==e?void 0:e[it])||"",o=void 0,o=n===i?(null==e?void 0:e[ir])||"":i||document.referrer||"",[4,t.set(ii,((a={})[it]=n,a[ir]=o,a))];case 2:s.sent(),s.label=3;case 3:return[2]}})})};return{name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(a,s){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(s){switch(s.label){case 0:if((n=a.loggerProvider).log("Installing @amplitude/plugin-page-url-enrichment-browser"),o=!0,!e)return[3,2];
1return[4,(t=new tv(e.sessionStorage)).isEnabled()];case 1:r=s.sent(),e.addEventListener("popstate",u),i||(e.history.pushState=new Proxy(e.history.pushState,{apply:function(e,t,r){var n=(0,C.__read)(r,3),i=n[0],a=n[1],s=n[2];e.apply(t,[i,a,s]),o&&u()}}),e.history.replaceState=new Proxy(e.history.replaceState,{apply:function(e,t,r){var n=(0,C.__read)(r,3),i=n[0],a=n[1],s=n[2];e.apply(t,[i,a,s]),o&&u()}}),i=!0),s.label=2;case 2:return[2]}})})},execute:function(e){return(0,C.__awaiter)(void 0,void 0,void 0,function(){var n,i,o,a,u;return(0,C.__generator)(this,function(c){switch(c.label){case 0:if(n=rR("u">typeof location&&location.href||""),!(t&&r))return[3,5];return[4,t.get(ii)];case 1:if(null==(i=c.sent())?void 0:i[it])return[3,3];return[4,t.set(ii,((u={})[it]=n,u[ir]=document.referrer||"",u))];case 2:c.sent(),c.label=3;case 3:return[4,t.get(ii)];case 4:if(o=c.sent(),a="",o&&(a=o[ir]||""),io.has(e.event_type))return[2,e];e.event_properties=(0,C.__assign)((0,C.__assign)({},e.event_properties||{}),{"[Amplitude] Page Domain":is(e,"[Amplitude] Page Domain","u">typeof location&&location.hostname||""),"[Amplitude] Page Location":is(e,"[Amplitude] Page Location",n),"[Amplitude] Page Path":is(e,"[Amplitude] Page Path","u">typeof location&&rR(location.pathname)||""),"[Amplitude] Page Title":is(e,"[Amplitude] Page Title",tK(t$)),"[Amplitude] Page URL":is(e,"[Amplitude] Page URL",n.split("?")[0]),"[Amplitude] Previous Page Location":a,"[Amplitude] Previous Page Type":s(a)}),c.label=5;case 5:return[2,e]}})})},teardown:function(){return(0,C.__awaiter)(void 0,void 0,void 0,function(){return(0,C.__generator)(this,function(n){switch(n.label){case 0:if(e&&(e.removeEventListener("popstate",u),o=!1),!(t&&r))return[3,2];return[4,t.set(ii,{})];case 1:n.sent(),n.label=2;case 2:return[2]}})})}}};function is(e,t,r){return(e.event_properties||(e.event_properties={}),void 0===e.event_properties[t])?r:e.event_properties[t]}let iu={init:ee((d=new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._diagnosticsSampleRate=0,t}return(0,C.__extends)(t,e),t.prototype.init=function(e,t,r){var n,i;return void 0===e&&(e=""),arguments.length>2?(n=t,i=r):"string"==typeof t?(n=t,i=void 0):(n=null==t?void 0:t.userId,i=t),ec(this._init((0,C.__assign)((0,C.__assign)({},i),{userId:n,apiKey:e})))},t.prototype._init=function(t){var r,n,i,o,a;return(0,C.__awaiter)(this,void 0,void 0,function(){var s,u,c,l,d,f,h,g,p=this;return(0,C.__generator)(this,function(v){var m,y,b,_,w;switch(v.label){case 0:if(this.initializing)return[2];return this.initializing=!0,[4,(m=t.apiKey,y=t,b=this,void 0===y&&(y={}),(0,C.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n,i,o,a,s,u,c,l,d,f,h,g,p,v,_,w,k,E,S,T,x,A,I,P,O,M,R,L,N,D,j,U,F,B,q,G,H,z,V,$,K,W;return(0,C.__generator)(this,function(J){switch(J.label){case 0:if(e=y.identityStorage||tj,E={},e===tj)return[3,1];return r="",[3,5];case 1:if(null==(T=null==(S=y.cookieOptions)?void 0:S.domain))return[3,2];return n=T,[3,4];case 2:return[4,(0,C.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n,i,o;return(0,C.__generator)(this,function(a){switch(a.label){case 0:return[4,new tl().isEnabled()];case 1:if(!a.sent()||"u"<typeof location||!location.hostname)return[2,""];for(e=(0,location.hostname).split("."),t=[],r="AMP_TLDTEST",n=e.length-2;n>=0;--n)t.push(e.slice(n).join("."));n=0,a.label=2;case 2:if(!(n<t.length))return[3,7];return[4,(o=new tl({domain:"."+(i=t[n])})).set(r,1)];case 3:return a.sent(),[4,o.get(r)];case 4:if(!a.sent())return[3,6];return[4,o.remove(r)];case 5:return a.sent(),[2,"."+i];case 6:return n++,[3,2];case 7:return[2,""]}})})];case 3:n=J.sent(),J.label=4;case 4:r=n,J.label=5;case 5:var Y,Q;return t=C.__assign.apply(void 0,[(E.domain=r,E.expiration=365,E.sameSite="Lax",E.secure=!1,E.upgrade=!0,E),y.cookieOptions]),[4,(Y=i=tF(y.identityStorage,t),void 0===(Q=null==(A=null==(x=y.cookieOptions)?void 0:x.upgrade)||A)&&(Q=!0),(0,C.__awaiter)(void 0,void 0,void 0,function(){var e,t,r,n,i,o,a,s,u;return(0,C.__generator)(this,function(c){switch(c.label){case 0:return e="".concat("amp","_").concat(m.substring(0,6)),[4,Y.getRaw(e)];case 1:if(!(t=c.sent()))return[2,{optOut:!1}];if(!Q)return[3,3];
1return[4,Y.remove(e)];case 2:c.sent(),c.label=3;case 3:return n=(r=(0,C.__read)(t.split("."),6))[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],[2,{deviceId:n,userId:tk(i),sessionId:tw(a),lastEventId:tw(u),lastEventTime:tw(s),optOut:!!o}]}})}))];case 6:return o=J.sent(),[4,i.get(th(m))];case 7:return a=J.sent(),c=!(u=(s=ej()).ampTimestamp?Number(s.ampTimestamp):void 0)||Date.now()<u,l=null!=(R=null!=(M=null!=(O=null!=(I=y.deviceId)?I:c?null!=(P=s.ampDeviceId)?P:s.deviceId:void 0)?O:null==a?void 0:a.deviceId)?M:o.deviceId)?R:ei(),d=null!=(L=null==a?void 0:a.lastEventId)?L:o.lastEventId,f=null!=(N=null==a?void 0:a.lastEventTime)?N:o.lastEventTime,h=null!=(j=null!=(D=y.optOut)?D:null==a?void 0:a.optOut)?j:o.optOut,g=null!=(U=null==a?void 0:a.sessionId)?U:o.sessionId,p=null!=(B=null!=(F=y.userId)?F:null==a?void 0:a.userId)?B:o.userId,b.previousSessionDeviceId=null!=(q=null==a?void 0:a.deviceId)?q:o.deviceId,b.previousSessionUserId=null!=(G=null==a?void 0:a.userId)?G:o.userId,v={ipAddress:null==(z=null==(H=y.trackingOptions)?void 0:H.ipAddress)||z,language:null==($=null==(V=y.trackingOptions)?void 0:V.language)||$,platform:null==(W=null==(K=y.trackingOptions)?void 0:K.platform)||W},_=null==a?void 0:a.pageCounter,w=null==a?void 0:a.debugLogsEnabled,void 0!==y.autocapture&&(y.defaultTracking=y.autocapture),[4,(k=new tU(m,y.appVersion,i,t,y.defaultTracking,y.autocapture,l,y.flushIntervalMillis,y.flushMaxRetries,y.flushQueueSize,e,y.ingestionMetadata,y.instanceName,d,f,y.loggerProvider,y.logLevel,y.minIdLength,y.offline,h,y.partnerId,y.plan,y.serverUrl,y.serverZone,g,y.sessionTimeout,y.storageProvider,v,y.transport,y.useBatch,y.fetchRemoteConfig,p,_,w,y.networkTrackingOptions,y.identify,y.enableDiagnostics,b._diagnosticsSampleRate,void 0,y.remoteConfig)).storageProvider.isEnabled()];case 8:return J.sent()||(k.loggerProvider.warn("Storage provider ".concat(k.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),k.storageProvider=new tc),[2,k]}})}))];case 1:if(!(null==(r=(s=v.sent()).remoteConfig)?void 0:r.fetchRemoteConfig))return[3,4];return u=new eB(s.apiKey,s.loggerProvider,s.serverZone,null==(n=s.remoteConfig)?void 0:n.serverUrl),[4,new Promise(function(e){null==u||u.subscribe("configs.analyticsSDK.browserSDK","all",function(t,r,n){s.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:t,source:r,lastFetch:n},null,2)),t&&function(e,t){if(e){!function e(t){if("object"==typeof t&&null!==t&&!Array.isArray(t)){var r,n,i,o,a,s,u,c,l,d,f,h=Object.keys(t);try{for(var g=(0,C.__values)(h),p=g.next();!p.done;p=g.next()){var v=p.value;try{var m=t[v];"boolean"==typeof(null==m?void 0:m.enabled)&&(m.enabled?(delete m.enabled,0===Object.keys(m).length&&(t[v]=!0)):t[v]=!1),e(m)}catch(e){}}}catch(e){r={error:e}}finally{try{p&&!p.done&&(n=g.return)&&n.call(g)}finally{if(r)throw r.error}}try{if(null==(l=null==(c=null==(u=t.autocapture)?void 0:u.networkTracking)?void 0:c.captureRules)?void 0:l.length)try{for(var y=(0,C.__values)(t.autocapture.networkTracking.captureRules),b=y.next();!b.done;b=y.next()){var _=b.value;try{for(var w=(a=void 0,(0,C.__values)(["responseHeaders","requestHeaders"])),k=w.next();!k.done;k=w.next()){var E=k.value,S=null!=(d=_[E])?d:{},T=S.captureSafeHeaders,x=S.allowlist;if(T||x){if(void 0!==x&&!Array.isArray(x)){delete _[E];continue}_[E]=(0,C.__spreadArray)((0,C.__spreadArray)([],(0,C.__read)(T?z:[]),!1),(0,C.__read)(null!=x?x:[]),!1)}}}catch(e){a={error:e}}finally{try{k&&!k.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}}}catch(e){i={error:e}}finally{try{b&&!b.done&&(o=y.return)&&o.call(y)}finally{if(i)throw i.error}}}catch(e){}var A=null==(f=t.autocapture)?void 0:f.frustrationInteractions;A&&(A.rageClick&&(A.rageClicks=A.rageClick,delete A.rageClick),A.deadClick&&(A.deadClicks=A.deadClick,delete A.deadClick))}}(e);try{var r,n,i,o,a,s,u;if(t.loggerProvider.debug("Update browser config with remote configuration:",JSON.stringify(e)),e&&"autocapture"in e){if("boolean"==typeof e.autocapture&&(t.autocapture=e.autocapture),"object"==typeof e.autocapture&&null!==e.autocapture){var c=(0,C.__assign)({},e.autocapture);if(void 0===t.autocapture&&(t.autocapture=e.autocapture),"object"==typeof e.autocapture.elementInteractions&&null!==e.autocapture.elementInteractions&&(null==(i=e.autocapture.elementInteractions.pageUrlAllowlistRegex)?void 0:i.length)){c.elementInteractions=(0,C.__assign)({},e.autocapture.elementInteractions);var l=c.elementInteractions,d=null!=(o=l.pageUrlAllowlist)?o:[],f=e.autocapture.elementInteractions.pageUrlAllowlistRegex;l.pageUrlAllowlist=t8(d,f,t),delete l.pageUrlAllowlistRegex}
1if("object"==typeof e.autocapture.networkTracking&&null!==e.autocapture.networkTracking&&(null==(a=e.autocapture.networkTracking.captureRules)?void 0:a.length)){c.networkTracking=(0,C.__assign)({},e.autocapture.networkTracking);var h=null!=(s=c.networkTracking.captureRules)?s:[];try{for(var g=(0,C.__values)(h),p=g.next();!p.done;p=g.next()){var v=p.value;v.urls=t8(null!=(u=v.urls)?u:[],v.urlsRegex,t),delete v.urlsRegex}}catch(e){r={error:e}}finally{try{p&&!p.done&&(n=g.return)&&n.call(g)}finally{if(r)throw r.error}}}"boolean"==typeof t.autocapture&&(t.autocapture=(0,C.__assign)({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},c)),"object"==typeof t.autocapture&&(t.autocapture=(0,C.__assign)((0,C.__assign)({},t.autocapture),c))}t.defaultTracking=t.autocapture}t.loggerProvider.debug("Browser config after remote config update:",JSON.stringify(t))}catch(e){t.loggerProvider.error("Failed to apply remote configuration because of error: ",e)}}}(t,s),e()})})];case 2:return v.sent(),[4,new Promise(function(e){null==u||u.subscribe("configs.diagnostics.browserSDK","all",function(t,r,n){if(s.loggerProvider.debug("Diagnostics remote configuration received:",JSON.stringify({remoteConfig:t,source:r,lastFetch:n},null,2)),t){var i=t.sampleRate;"number"!=typeof i||isNaN(i)||(s.diagnosticsSampleRate=i);var o=t.enabled;"boolean"==typeof o&&(s.enableDiagnostics=o)}e()})})];case 3:v.sent(),v.label=4;case 4:return(c=new e1(s.apiKey,s.loggerProvider,s.serverZone,{enabled:s.enableDiagnostics,sampleRate:s.diagnosticsSampleRate})).setTag("library","".concat(ts,"/").concat(ta)),[4,e.prototype._init.call(this,s)];case 5:if(v.sent(),this.logBrowserOptions(s),this.config.diagnosticsClient=c,this.config.remoteConfigClient=u,!e3(this.config.defaultTracking))return[3,7];return l=e3((_=this.config).defaultTracking)&&_.defaultTracking&&"object"==typeof _.defaultTracking&&_.defaultTracking.attribution&&"object"==typeof _.defaultTracking.attribution?(0,C.__assign)({},_.defaultTracking.attribution):{},this.webAttribution=new ie(l,this.config),[4,this.webAttribution.init()];case 6:v.sent(),v.label=7;case 7:if(h=!(!(f=(d=ej()).ampTimestamp?Number(d.ampTimestamp):void 0)||Date.now()<f)||Number.isNaN(Number(d.ampSessionId))?void 0:Number(d.ampSessionId),this.setSessionId(null!=(a=null!=(o=null!=(i=t.sessionId)?i:h)?o:this.config.sessionId)?a:Date.now()),(g=eM(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),null===this.config.offline)return[3,9];return[4,this.add(t6()).promise];case 8:v.sent(),v.label=9;case 9:return[4,this.add(new e_({diagnosticsClient:c})).promise];case 10:return v.sent(),[4,this.add(new tu).promise];case 11:return v.sent(),[4,this.add(new eD).promise];case 12:if(v.sent(),t5(this.config),!e2(this.config.defaultTracking,"fileDownloads"))return[3,14];return this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(t3()).promise];case 13:v.sent(),v.label=14;case 14:if(!e2(this.config.defaultTracking,"formInteractions"))return[3,16];return this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(t0()).promise];case 15:v.sent(),v.label=16;case 16:if(!e4(this.config.defaultTracking))return[3,18];return this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(tY(tr(this.config))).promise];case 17:v.sent(),v.label=18;case 18:if(!e8(this.config.autocapture))return[3,20];return this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(r3(e9(this.config),{diagnosticsClient:c})).promise];case 19:v.sent(),v.label=20;case 20:if(!e7(this.config.autocapture))return[3,22];return this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(r9(te(this.config))).promise];case 21:v.sent(),v.label=22;case 22:if(!e6(this.config.autocapture))return[3,24];return this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(nw(tt(this.config))).promise];case 23:v.sent(),v.label=24;case 24:if(!("boolean"==typeof(w=this.config.autocapture)?w:"object"==typeof w&&!0===w.webVitals))return[3,26];return this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(n4()).promise];case 25:v.sent(),v.label=26;case 26:if(!e2(this.config.autocapture,"pageUrlEnrichment"))return[3,28];return this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(ia()).promise];case 27:v.sent(),v.label=28;case 28:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 29:return v.sent(),g.eventBridge.setEventReceiver(function(e){var t=e.eventProperties||{},r=t.time,n=(0,C.__rest)(t,["time"]);p.track(e.eventType,n,"number"==typeof r?{time:r}:void 0)}),[2]}})})},t.prototype.getUserId=function(){var e;return null==(e=this.config)?void 0:e.userId},t.prototype.setUserId=function(e){this.config?(this.config.loggerProvider.debug("function setUserId: ",e),(e!==this.config.userId||void 0===e)&&(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),eR(e,this.config.instanceName))):this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null==(e=this.config)?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),eL(e,this.config.instanceName))):this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setDeviceId(ei()),this.setUserId(void 0),this.timeline.onReset()},t.prototype.getIdentity=function(){var e,t;return{deviceId:null==(e=this.config)?void 0:e.deviceId,userId:null==(t=this.config)?void 0:t.userId,userProperties:this.userProperties}},t.prototype.getOptOut=function(){var e;return null==(e=this.config)?void 0:e.optOut},t.prototype.getSessionId=function(){var e;return null==(e=this.config)?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,r=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),ec(Promise.resolve());if(e===this.config.sessionId)return ec(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var n=this.getSessionId();n!==e&&this.timeline.onSessionIdChanged(e);var i=this.config.lastEventTime,o=null!=(t=this.config.lastEventId)?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,e5(this.config.defaultTracking)&&(n&&i&&r.push(this.track(tC,void 0,{device_id:this.previousSessionDeviceId,event_id:++o,session_id:n,time:i+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var a=this.trackCampaignEventIfNeeded(++o,r);return this.config.identify&&r.push(this.track(ea(this.config.identify)).promise),e5(this.config.defaultTracking)&&r.push(this.track(tA,void 0,{event_id:a?++o:o,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,ec(Promise.all(r))},t.prototype.extendSession=function(){this.config?this.config.lastEventTime=
1Date.now():this.q.push(this.extendSession.bind(this))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=tB(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,r){if(ti(t)){var n=t._q;t._q=[],t=tn(new W,n)}return(null==r?void 0:r.user_id)&&this.setUserId(r.user_id),(null==r?void 0:r.device_id)&&this.setDeviceId(r.device_id),e.prototype.identify.call(this,t,r)},t.prototype.groupIdentify=function(t,r,n,i){if(ti(n)){var o=n._q;n._q=[],n=tn(new W,o)}return e.prototype.groupIdentify.call(this,t,r,n,i)},t.prototype.revenue=function(t,r){if(ti(t)){var n=t._q;t._q=[],t=tn(new ew,n)}return e.prototype.revenue.call(this,t,r)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var r=this.webAttribution.generateCampaignEvent(e);return t?t.push(this.track(r).promise):this.track(r),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(t){return(0,C.__awaiter)(this,void 0,void 0,function(){var r,n,i;return(0,C.__generator)(this,function(o){return r=Date.now(),n=eN(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type!==tA&&t.event_type!==tC&&(!t.session_id||t.session_id===this.getSessionId())&&(n||i?(this.setSessionId(r),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):n||this.trackCampaignEventIfNeeded()),t.event_type===m.IDENTIFY&&t.user_properties&&(this.userProperties=this.getOperationAppliedUserProperties(t.user_properties)),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=(0,C.__assign)((0,C.__assign)({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",JSON.stringify(t))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},t.prototype._setDiagnosticsSampleRate=function(e){if(!(e>1)&&!(e<0)&&!this.config){this._diagnosticsSampleRate=e;return}},t}(el))).init.bind(d),"init",Q(d),X(d,["config"])),add:ee(d.add.bind(d),"add",Q(d),X(d,["config.apiKey","timeline.plugins"])),remove:ee(d.remove.bind(d),"remove",Q(d),X(d,["config.apiKey","timeline.plugins"])),track:ee(d.track.bind(d),"track",Q(d),X(d,["config.apiKey","timeline.queue.length"])),logEvent:ee(d.logEvent.bind(d),"logEvent",Q(d),X(d,["config.apiKey","timeline.queue.length"])),identify:ee(d.identify.bind(d),"identify",Q(d),X(d,["config.apiKey","timeline.queue.length"])),groupIdentify:ee(d.groupIdentify.bind(d),"groupIdentify",Q(d),X(d,["config.apiKey","timeline.queue.length"])),setGroup:ee(d.setGroup.bind(d),"setGroup",Q(d),X(d,["config.apiKey","timeline.queue.length"])),revenue:ee(d.revenue.bind(d),"revenue",Q(d),X(d,["config.apiKey","timeline.queue.length"])),flush:ee(d.flush.bind(d),"flush",Q(d),X(d,["config.apiKey","timeline.queue.length"])),getUserId:ee(d.getUserId.bind(d),"getUserId",Q(d),X(d,["config","config.userId"])),setUserId:ee(d.setUserId.bind(d),"setUserId",Q(d),X(d,["config","config.userId"])),getDeviceId:ee(d.getDeviceId.bind(d),"getDeviceId",Q(d),X(d,["config","config.deviceId"])),setDeviceId:ee(d.setDeviceId.bind(d),"setDeviceId",Q(d),X(d,["config","config.deviceId"])),reset:ee(d.reset.bind(d),"reset",Q(d),X(d,["config","config.userId","config.deviceId"])),getSessionId:ee(d.getSessionId.bind(d),"getSessionId",Q(d),X(d,["config"])),setSessionId:ee(d.setSessionId.bind(d),"setSessionId",Q(d),X(d,["config"])),extendSession:ee(d.extendSession.bind(d),"extendSession",Q(d),X(d,["config"])),setOptOut:ee(d.setOptOut.bind(d),"setOptOut",Q(d),X(d,["config"])),setTransport:ee(d.setTransport.bind(d),"setTransport",Q(d),X(d,["config"])),getIdentity:ee(d.getIdentity.bind(d),"getIdentity",Q(d),X(d,["config"])),getOptOut:ee(d.getOptOut.bind(d),"getOptOut",Q(d),X(d,["config"])),_setDiagnosticsSampleRate:ee(d._setDiagnosticsSampleRate.bind(d),"_setDiagnosticsSampleRate",Q(d),X(d,["config"]))};e.s([],64686),e.i(64686),(f=T||(T={})).US="US",f.EU="EU",f.STAGING="STAGING",e.s(["DEFAULT_ACTION_CLICK_ALLOWLIST",0,re,"DEFAULT_CSS_SELECTOR_ALLOWLIST",0,t7,"DEFAULT_DATA_ATTRIBUTE_PREFIX",0,t9,"IdentifyOperation",0,v,"LogLevel",0,p,"OfflineDisabled",0,null,"RevenueProperty",0,b,"ServerZone",0,T,"SpecialEventType",0,m],8148),e.i(8148),iu.add,iu.extendSession,iu.flush,iu.getDeviceId,iu.getIdentity,iu.getOptOut,iu.getSessionId,iu.getUserId,iu.groupIdentify;var ic=iu.identify,il=iu.init,id=(iu.logEvent,iu.remove,iu.reset,iu.revenue,iu.setDeviceId,iu.setGroup,iu.setOptOut,iu.setSessionId,iu.setTransport,iu.setUserId),ih=iu.track;iu._setDiagnosticsSampleRate,e.s(["identify",0,ic,"init",0,il,"setUserId",0,id,"track",0,ih],27184),(h=x||(x={}))[h.None=0]="None",h[h.Error=1]="Error",h[h.Warn=2]="Warn",h[h.Verbose
1=3]="Verbose",h[h.Debug=4]="Debug";var ig=e.i(56379),ip=e.i(90602),iv=e.i(41598);let im=(e,...t)=>{if(e)return ih(...t)};e.s(["amplitudeTrack",0,im,"useAmplitudePageview",0,e=>{let t=(0,ig.useSession)(),r=(0,ip.useRouter)(),{NEXT_PUBLIC_AMPLITUDE_API_KEY:n}=(0,A.useNextEnvVars)(),i=t.data?.userId??null,o=t.data?.teamId??null,a=r.asPath.split(/[?#]/)[0];(0,iv.useEffect)(()=>{(async()=>{var t;"1"===(!(t=document.cookie)?{}:t.split(";").map(e=>e.split("=")).reduce((e,t)=>(e[decodeURIComponent(t[0].trim())]=decodeURIComponent(t[1].trim()),e),{})).ddog?console.log("Skipping ampl instrumentation; ddog synthetic"):n&&(await il(n,void 0,{serverUrl:"/api/am",defaultTracking:!1,logLevel:x.None,cookieOptions:{secure:!0}}).promise,null!=i&&id(i),null!=o&&((e,t)=>{if(!e)return;let r=new W;for(let[e,n]of Object.entries(t))null!=n&&r.set(e,n);return ic(r)})(n,{team_id:o}),im(n,e,{path:a,routerPath:r.pathname}))})().catch(e=>console.error(e))},[n,e,a,r.pathname,o,i])}],19002)},13660,(e,t,r)=>{t.exports=function(){this.__data__=[],this.size=0}},43047,(e,t,r)=>{var n=e.r(49001);t.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return -1}},24368,(e,t,r)=>{var n=e.r(43047),i=Array.prototype.splice;t.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():i.call(t,r,1),--this.size,!0)}},90613,(e,t,r)=>{var n=e.r(43047);t.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},35897,(e,t,r)=>{var n=e.r(43047);t.exports=function(e){return n(this.__data__,e)>-1}},72722,(e,t,r)=>{var n=e.r(43047);t.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},97287,(e,t,r)=>{var n=e.r(13660),i=e.r(24368),o=e.r(90613),a=e.r(35897),s=e.r(72722);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},89950,(e,t,r)=>{var n=e.r(97287);t.exports=function(){this.__data__=new n,this.size=0}},45873,(e,t,r)=>{t.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},89423,(e,t,r)=>{t.exports=function(e){return this.__data__.get(e)}},66197,(e,t,r)=>{t.exports=function(e){return this.__data__.has(e)}},11036,(e,t,r)=>{t.exports=e.r(50731)["__core-js_shared__"]},15412,(e,t,r)=>{var n,i=e.r(11036),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(e){return!!o&&o in e}},14531,(e,t,r)=>{var n=Function.prototype.toString;t.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},28662,(e,t,r)=>{var n=e.r(95299),i=e.r(15412),o=e.r(71641),a=e.r(14531),s=/^\[object .+?Constructor\]$/,u=Object.prototype,c=Function.prototype.toString,l=u.hasOwnProperty,d=RegExp("^"+c.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(e){return!(!o(e)||i(e))&&(n(e)?d:s).test(a(e))}},97174,(e,t,r)=>{t.exports=function(e,t){return null==e?void 0:e[t]}},45487,(e,t,r)=>{var n=e.r(28662),i=e.r(97174);t.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},72196,(e,t,r)=>{t.exports=e.r(45487)(e.r(50731),"Map")},58011,(e,t,r)=>{t.exports=e.r(45487)(Object,"create")},18140,(e,t,r)=>{var n=e.r(58011);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},76992,(e,t,r)=>{t.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}},59121,(e,t,r)=>{var n=e.r(58011),i=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},30919,(e,t,r)=>{var n=e.r(58011),i=Object.prototype.hasOwnProperty;t.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},57371,(e,t,r)=>{var n=e.r(58011);t.exports=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},89578,(e,t,r)=>{var n=e.r(18140),i=e.r(76992),o=e.r(59121),a=e.r(30919),s=e.r(57371);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exp
1orts=u},62604,(e,t,r)=>{var n=e.r(89578),i=e.r(97287),o=e.r(72196);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},46475,(e,t,r)=>{t.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},63354,(e,t,r)=>{var n=e.r(46475);t.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},37998,(e,t,r)=>{var n=e.r(63354);t.exports=function(e){var t=n(this,e).delete(e);return this.size-=!!t,t}},87109,(e,t,r)=>{var n=e.r(63354);t.exports=function(e){return n(this,e).get(e)}},19316,(e,t,r)=>{var n=e.r(63354);t.exports=function(e){return n(this,e).has(e)}},20672,(e,t,r)=>{var n=e.r(63354);t.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=+(r.size!=i),this}},42885,(e,t,r)=>{var n=e.r(62604),i=e.r(37998),o=e.r(87109),a=e.r(19316),s=e.r(20672);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},96602,(e,t,r)=>{var n=e.r(97287),i=e.r(72196),o=e.r(42885);t.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(e,t),this.size=r.size,this}},8356,(e,t,r)=>{var n=e.r(97287),i=e.r(89950),o=e.r(45873),a=e.r(89423),s=e.r(66197),u=e.r(96602);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},37744,(e,t,r)=>{t.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},8669,(e,t,r)=>{t.exports=function(e){return this.__data__.has(e)}},70546,(e,t,r)=>{var n=e.r(42885),i=e.r(37744),o=e.r(8669);function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,t.exports=a},70335,(e,t,r)=>{t.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},6123,(e,t,r)=>{t.exports=function(e,t){return e.has(t)}},30037,(e,t,r)=>{var n=e.r(70546),i=e.r(70335),o=e.r(6123);t.exports=function(e,t,r,a,s,u){var c=1&r,l=e.length,d=t.length;if(l!=d&&!(c&&d>l))return!1;var f=u.get(e),h=u.get(t);if(f&&h)return f==t&&h==e;var g=-1,p=!0,v=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++g<l;){var m=e[g],y=t[g];if(a)var b=c?a(y,m,g,t,e,u):a(m,y,g,e,t,u);if(void 0!==b){if(b)continue;p=!1;break}if(v){if(!i(t,function(e,t){if(!o(v,t)&&(m===e||s(m,e,r,a,u)))return v.push(t)})){p=!1;break}}else if(!(m===y||s(m,y,r,a,u))){p=!1;break}}return u.delete(e),u.delete(t),p}},63236,(e,t,r)=>{t.exports=e.r(50731).Uint8Array},2422,(e,t,r)=>{t.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},72980,(e,t,r)=>{t.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}},87572,(e,t,r)=>{var n=e.r(40664),i=e.r(63236),o=e.r(49001),a=e.r(30037),s=e.r(2422),u=e.r(72980),c=n?n.prototype:void 0,l=c?c.valueOf
1:void 0;t.exports=function(e,t,r,n,c,d,f){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!d(new i(e),new i(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=s;case"[object Set]":var g=1&n;if(h||(h=u),e.size!=t.size&&!g)break;var p=f.get(e);if(p)return p==t;n|=2,f.set(e,t);var v=a(h(e),h(t),n,c,d,f);return f.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},11838,(e,t,r)=>{t.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},57875,(e,t,r)=>{t.exports=Array.isArray},36240,(e,t,r)=>{var n=e.r(11838),i=e.r(57875);t.exports=function(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},76833,(e,t,r)=>{t.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}},43372,(e,t,r)=>{t.exports=function(){return[]}},75309,(e,t,r)=>{var n=e.r(76833),i=e.r(43372),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return null==e?[]:n(a(e=Object(e)),function(t){return o.call(e,t)})}:i},689,(e,t,r)=>{t.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},22500,(e,t,r)=>{var n=e.r(26981),i=e.r(15925);t.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},34380,(e,t,r)=>{var n=e.r(22500),i=e.r(15925),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")}},38905,(e,t,r)=>{t.exports=function(){return!1}},70798,(e,t,r)=>{var n=e.r(50731),i=e.r(38905),o=r&&!r.nodeType&&r,a=o&&t&&!t.nodeType&&t,s=a&&a.exports===o?n.Buffer:void 0;t.exports=(s?s.isBuffer:void 0)||i},37814,(e,t,r)=>{var n=e.r(26981),i=e.r(47483),o=e.r(15925),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(e){return o(e)&&i(e.length)&&!!a[n(e)]}},54050,(e,t,r)=>{t.exports=function(e){return function(t){return e(t)}}},86426,(e,t,r)=>{var n=e.r(54745),i=r&&!r.nodeType&&r,o=i&&t&&!t.nodeType&&t,a=o&&o.exports===i&&n.process;t.exports=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return a&&a.binding&&a.binding("util")}catch(e){}}()},14342,(e,t,r)=>{var n=e.r(37814),i=e.r(54050),o=e.r(86426),a=o&&o.isTypedArray;t.exports=a?i(a):n},95905,(e,t,r)=>{var n=e.r(689),i=e.r(34380),o=e.r(57875),a=e.r(70798),s=e.r(29410),u=e.r(14342),c=Object.prototype.hasOwnProperty;t.exports=function(e,t){var r=o(e),l=!r&&i(e),d=!r&&!l&&a(e),f=!r&&!l&&!d&&u(e),h=r||l||d||f,g=h?n(e.length,String):[],p=g.length;for(var v in e)(t||c.call(e,v))&&!(h&&("length"==v||d&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,p)))&&g.push(v);return g}},85500,(e,t,r)=>{var n=Object.prototype;t.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},21745,(e,t,r)=>{t.exports=function(e,t){return function(r){return e(t(r))}}},64761,(e,t,r)=>{t.exports=e.r(21745)(Object.keys,Object)},72692,(e,t,r)=>{var n=e.r(85500),i=e.r(64761),o=Object.prototype.hasOwnProperty;t.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},68923,(e,t,r)=>{var n=e.r(95905),i=e.r(72692),o=e.r(24308);t.exports=function(e){return o(e)?n(e):i(e)}},91601,(e,t,r)=>{var n=e.r(36240),i=e.r(75309),o=e.r(68923);t.exports=function(e){return n(e,o,i)}},54379,(e,t,r)=>{var n=e.r(91601),i=Object.prototype.hasOwnProperty;t.exports=function(e,t,r,o,a,s){var u=1&r,c=n(e),l=c.length;if(l!=n(t).length&&!u)return!1;for(var d=l;d--;){var f=c[d];if(!(u?f in t:i.call(t,f)))return!1}var h=s.get(e),g=s.get(t);if(h&&g)return h==t&&g==e;var p=!0;s.set(e,t),s.set(t,e);for(var v=u;++d<l;){var m=e[f=c[d]],y=t[f];if(o)var b=u?o(y,m,f,t,e,s):o(m,y,f,e,t,s);if(!(void 0===b?m===y||a(m,y,r,o,s):b)){p=!1;break}v||(v="constructor"==f)}if(p&&!v){var _=e.constructor,w=t.constructor;_!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(p=!1)}return s.delete(e),s.delete(t),p}},21774,(e,t,r)=>{t.exports=e.r(45487)(e.r(50731),"DataView")},87769,(e,t,r)=>{t.exports=e.r(45487)(e.r(50731),"Promise")},24349,(e,t,r)=>{t.exports=e.r(45487)(e.r(50731),"Set")},91366,(e,t,r)=>{t.exports=e.r(45487)(e.r(50731),"WeakMap")},71266,(e,t,r)=>{var n=e.r(21774),i=e.r(72196),o=e.r(87769),a=e.r(24349),s=e.r(91366),u=e.r(26981),c=e.r(14531),l="[object Map]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",g="[object DataView]",p=c(n),v=c(i),m=c(o),y=c(a),b=c(s),_=u;(n&&_(new n(new ArrayBuffer(1)))!=g||i&&_(new i)!=l||o&&_(o.resolve())!=d||a&&_(new a)!=f||s&&_(new s)!=h)&&
1(_=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case p:return g;case v:return l;case m:return d;case y:return f;case b:return h}return t}),t.exports=_},34599,(e,t,r)=>{var n=e.r(8356),i=e.r(30037),o=e.r(87572),a=e.r(54379),s=e.r(71266),u=e.r(57875),c=e.r(70798),l=e.r(14342),d="[object Arguments]",f="[object Array]",h="[object Object]",g=Object.prototype.hasOwnProperty;t.exports=function(e,t,r,p,v,m){var y=u(e),b=u(t),_=y?f:s(e),w=b?f:s(t);_=_==d?h:_,w=w==d?h:w;var k=_==h,E=w==h,S=_==w;if(S&&c(e)){if(!c(t))return!1;y=!0,k=!1}if(S&&!k)return m||(m=new n),y||l(e)?i(e,t,r,p,v,m):o(e,t,_,r,p,v,m);if(!(1&r)){var T=k&&g.call(e,"__wrapped__"),x=E&&g.call(t,"__wrapped__");if(T||x){var A=T?e.value():e,C=x?t.value():t;return m||(m=new n),v(A,C,r,p,m)}}return!!S&&(m||(m=new n),a(e,t,r,p,v,m))}},80438,(e,t,r)=>{var n=e.r(34599),i=e.r(15925);t.exports=function e(t,r,o,a,s){return t===r||(null!=t&&null!=r&&(i(t)||i(r))?n(t,r,o,a,e,s):t!=t&&r!=r)}},97909,(e,t,r)=>{var n=e.r(80438);t.exports=function(e,t){return n(e,t)}},82824,e=>{"use strict";var t=e.i(41598);e.i(96498),e.i(97909);let r=(e,t)=>e===t||Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every(([e,r])=>t[e]===r);e.s(["useStableObject",0,(e,n=r)=>{var i;let o;return o=(0,t.useRef)(e),n(e,o.current)||(i?.(o.current,e),o.current=e),o.current}])},97996,e=>{"use strict";var t,r=e.i(62751),n=e.i(68796),i=e.i(19002),o=e.i(82824),a=e.i(90602),s=e.i(41598),u=((t={}).VIEW_MARKETING_PAGE="view marketing page",t.MARKETING_CLICK="marketing page click",t.MARKETING_SUBMIT_HUBSPOT="marketing: submit hubspot form",t.VIEW_PAGE="view page",t.BRANCH_NAVBAR_CLICK="navigation: branch sidebar click",t.DEPLOYMENT_NAVBAR_CLICK="navigation: deployment sidebar click",t.SETTINGS_NAVBAR_CLICK="navigation: settings sidebar click",t.PROJECT_NAVBAR_CLICK="navigation: main project sidebar click",t.TEAM_NAVBAR_CLICK="navigation: main team sidebar click",t.TEST_NAVBAR_CLICK="navigation: test components sidebar click",t.TOGGLE_DARK_MODE="navigation: toggle dark mode",t.NAVBAR_CHANGE_LAYOUT="navigation: toggle v2 layout",t.TAB_ITEM_CLICK="navigation: tab item click",t.NAVIGATION_SUBMIT_FEEDBACK="navigation: submit feedback",t);e.s(["AmplitudeEvent",()=>u,"AmplitudeScript",0,()=>(0,r.jsx)(r.Fragment,{}),"useAmplitudeOnClick",0,function(e){let t=(0,a.useRouter)(),r=(0,o.useStableObject)(e.extraProperties??{}),{NEXT_PUBLIC_AMPLITUDE_API_KEY:u}=(0,n.useNextEnvVars)();return(0,s.useCallback)(n=>{null!=e.event&&(0,i.amplitudeTrack)(u,e.event,{path:t.asPath,component:e.component,href:e.href,text:e.text,description:e.description,...r,...n})},[e.event,e.component,e.href,e.text,e.description,u,t.asPath,r])}])},83214,e=>{"use strict";e.s(["downloadBlob",0,function(e,t,r){let n=new Blob([e],{type:r}),i=URL.createObjectURL(n),o=document.createElement("a");o.href=i,o.setAttribute("download",t),document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(i)},"urlIsDocsLink",0,function(e){return e.includes("docs.chalk.ai")},"urlIsSameDomain",0,function(e){return e.startsWith("/")}])},22034,(e,t,r)=>{var n={675:function(e,t){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,o=u(e),a=o[0],s=o[1],c=new i((a+s)*3/4-s),l=0,d=s>0?a-4:a;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(function(e,t,n){for(var i,o=[],a=t;a<n;a+=3)i=(e[a]<<16&0xff0000)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,a,a+16383>s?s:a+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],i="u">typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/",a=0,s=o.length;a<s;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},72:function(e,t,r){"use strict";var n=r(675),i=r(783),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return l(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e){var n=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!s.isEncoding(i))throw TypeError("Unknown encoding: "+i);var o=0|h(n,i),u=a(o),c=u.write(n,i);return c!==o&&(u=u.slice(0,c)),u}if(ArrayBuffer.isView(e))return d(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(I(e,ArrayBuffer)||e&&I(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(I(e,SharedArrayBuffer)||e&&I(e.buffer,SharedArrayBuffer)))return function(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),s.prototype),n}(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var l=e.valueOf&&e.valueOf();if(null!=l&&l!==e)return s.from(l,t,r);var g=function(e){if(s.isBuffer(e)){var t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(g)return g;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return c(e),a(e<0?0:0|f(e))}function d(e){for(var t=e.length<0?0:0|f(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!s.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return(c(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},s.allocUnsafe=function(e){return l(e)},s.allocUnsafeSlow=function(e){return l(e)};function f(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||I(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return T(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return A(e).length;default:if(i)return n?-1:T(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){var i,o,a,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=P[e[o]];return i}(this,t,r);case"utf8":case"utf-8":return y(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return i=this,o=t,a=r,0===o&&a===i.length?n.fromByteArray(i):n.fromByteArray(i.slice(o,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}(this,t,r);default:if(s)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}function p(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){var o;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return m(e,[t],r,n,i)}throw TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;o<s;
vendor: 12,407 bytes, line 1
1o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else -1!==l&&(o-=o-l),l=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var d=!0,f=0;f<u;f++)if(c(e,o+f)!==c(t,f)){d=!1;break}if(d)return o}return -1}s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(I(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),I(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:+(n<r)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=s.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(I(o,Uint8Array)&&(o=s.from(o)),!s.isBuffer(o))throw TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)p(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?y(this,0,e):g.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,i){if(I(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,a=r-t,u=Math.min(o,a),c=this.slice(n,i),l=e.slice(t,r),d=0;d<u;++d)if(c[d]!==l[d]){o=c[d],a=l[d];break}return o<a?-1:+(a<o)},s.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)};function y(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],l=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=r)switch(d){case 1:c<128&&(l=c);break;case 2:(192&(o=e[i+1]))==128&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],(192&o)==128&&(192&a)==128&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],(192&o)==128&&(192&a)==128&&(192&s)==128&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=d}var f=n,h=f.length;if(h<=4096)return String.fromCharCode.apply(String,f);for(var g="",p=0;p<h;)g+=String.fromCharCode.apply(String,f.slice(p,p+=4096));return g}function b(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,n,i,o){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function w(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function k(e,t,r,n,o){return t*=1,r>>>=0,o||w(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function E(e,t,r,n,o){return t*=1,r>>>=0,o||w(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}s.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,a,s,u,c,l,d,f=this.length-t;if((void 0===r||r>f)&&(r=f),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var h=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s,u=parseInt(t.substr(2*a,2),16);if((s=u)!=s)break;e[r+a]=u}return a}(this,e,t,r);case"utf8":case"utf-8":return i=t,o=r,C(T(e,this.length-i),this,i,o);case"ascii":return a=t,s=r,C(x(e),this,a,s);case"latin1":case"binary":return function(e,t,r,n){return C(x(t),e,r,n)}(this,e,t,r);case"base64":return u=t,c=r,C(A(e),this,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=t,d=r,C(function(e,t){for(var r,n,i=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(e,this.length-l),this,l,d);default:if(h)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),h=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return(e>>>=0,t||b(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var o=1,a=0;for(this[t]=255&e;++a<r&&(o*=256);)this[t+a]=e/o&255;return t+r},s.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var o=r-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return E(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return E(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var o=i-1;o>=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var a=s.isBuffer(e)?e:s.from(e,n),u=a.length;
1if(0===u)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=a[i%u]}return this};var S=/[^+/0-9A-Za-z-_]/g;function T(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function x(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function A(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(S,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function C(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function I(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var P=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},783:function(e,t){t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+d],d+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,d=l>>1,f=5960464477539062e-23*(23===i),h=n?0:o-1,g=n?1:-1,p=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+d>=1?t+=f/u:t+=f*Math.pow(2,1-d),t*u>=2&&(a++,u/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*u-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=g,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+h]=255&a,h+=g,a/=256,c-=8);e[r+h-g]|=128*p}}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}},a=!0;try{n[e](r,r.exports,o),a=!1}finally{a&&delete i[e]}return r.exports}o.ab="/ROOT/marketing-frontend/node_modules/next/dist/compiled/buffer/",t.exports=o(72)},37787,48389,e=>{"use strict";let t;var r=e.i(62751),n=e.i(8569),i=e.i(81141),o=e.i(91333),a=e.i(97996),s=e.i(9874),u=e.i(83214),c=e.i(2951),l=e.i(41598),d=e.i(22034),f=Object.defineProperty,h=Object.defineProperties,g=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,y=(e,t,r)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t)=>{for(var r in t||(t={}))v.call(t,r)&&y(e,r,t[r]);if(p)for(var r of p(t))m.call(t,r)&&y(e,r,t[r]);return e},_="https://api.unifyintent.com/analytics/v1",w=/^[A-Za-z0-9._+%-]+@[A-Za-z0-9.-]+[.][A-Za-z]+$/,k=["identify","page"];function E(e){return!!e&&"object"==typeof e&&!Array.isArray(e)&&k.every(t=>t in e)}function S(e,t){var r;return(null!=(r=null==t?void 0:t.getTime())?r:new Date().getTime())+60*e*1e3}var T=e=>({path:null!=e?e:window.location.pathname,query:C(window.location.href),referrer:document.referrer,title:document.title,url:void 0!==e?function({location:e,pathname:t}){let r=new URL(e.href);return r.pathname=t,r.toString()}({location:window.location,pathname:e}):window.location.href}),x=()=>({userAgent:window.navigator.userAgent,userAgentData:void 0!==navigator.userAgentData?navigator.userAgentData:void 0}),A=e=>{if(w.test(e))return e},C=e=>{let t=new URL(e).searchParams,r={};for(let[e,n]of t.entries())r[e]=n;return r};function I(e){try{return new URL(e.startsWith("http")?e:`https://${e}`).hostname}catch(e){return null}}function P(e){var t;return null!=(t=e.split("@").at(1))?t:null}var O,M=class{constructor(e){this.getBaseActivityPayload=()=>{var e,t,r,n,i;let o,a;return{type:this.getActivityType(),visitorId:this._intentContext.
1identityManager.getOrCreateVisitorId(),sessionId:this._intentContext.sessionManager.getOrCreateSession().sessionId,context:(a={source:null!=(e=(o=new URL(location.href)).searchParams.get("utm_source"))?e:void 0,medium:null!=(t=o.searchParams.get("utm_medium"))?t:void 0,campaign:null!=(r=o.searchParams.get("utm_campaign"))?r:void 0,term:null!=(n=o.searchParams.get("utm_term"))?n:void 0,content:null!=(i=o.searchParams.get("utm_content"))?i:void 0},h(b({locale:navigator.language},x()),g({utm:a}))),timestamp:new Date().toISOString()}},this._intentContext=e}track(){this._intentContext.apiClient.post(this.getActivityURL(),this.getTrackPayload())}getTrackPayload(){return b(b({},this.getBaseActivityPayload()),this.getActivityData())}},R=`${_}/page`,L=class extends M{constructor(e,t){super(e),this.getActivityData=()=>{var e;return{type:"page",properties:T(null==(e=this._options)?void 0:e.pathname)}},this._options=t}getActivityType(){return"page"}getActivityURL(){return R}},N=`${_}/identify`,D=class extends M{constructor(e,{email:t,person:r,company:n}){super(e),this.getActivityData=()=>{var e;let t=this._company&&I(null==(e=this._company)?void 0:e.domain),r=P(this._email),n=t&&t===r?this._company:void 0;return b({type:"identify",person:h(b({},this._person),g({email:this._email}))},n&&{company:this._company})},this._email=t,this._person=r,this._company=n}getActivityType(){return"identify"}getActivityURL(){return N}},j=`${_}/track`,U=class extends M{constructor(e,{name:t,properties:r}){super(e),this.getActivityData=()=>({type:"track",name:this._name,properties:b(b({},T()),this._properties)}),this._name=t,this._properties=r}getActivityType(){return"track"}getActivityURL(){return j}},F=new Uint8Array(16),B=[];for(let e=0;e<256;++e)B.push((e+256).toString(16).slice(1));var q="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),G=function(e,t,r){if(q&&!t&&!e)return q();let n=(e=e||{}).random||(e.rng||function(){if(!O&&!(O="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return O(F)})();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return B[e[t+0]]+B[e[t+1]]+B[e[t+2]]+B[e[t+3]]+"-"+B[e[t+4]]+B[e[t+5]]+"-"+B[e[t+6]]+B[e[t+7]]+"-"+B[e[t+8]]+B[e[t+9]]+"-"+B[e[t+10]]+B[e[t+11]]+B[e[t+12]]+B[e[t+13]]+B[e[t+14]]+B[e[t+15]]}(n)};function H(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var z=function e(t,r){function n(e,n,i){if("u">typeof document){"number"==typeof(i=H({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(n,e)+o}}return Object.create({set:n,get:function(e){if(!("u"<typeof document||arguments.length&&!e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},i=0;i<r.length;i++){var o=r[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(n[s]=t.read(a,s),e===s)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){n(e,"",H({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,H({},this.attributes,t))},withConverter:function(t){return e(H({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),V="function"==typeof d.Buffer,$="function"==typeof TextDecoder?new TextDecoder:void 0,K="function"==typeof TextEncoder?new TextEncoder:void 0,W=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),J=(t={},W.forEach((e,r)=>t[e]=r),t),Y=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Q=String.fromCharCode.bind(String),Z="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),X="function"==typeof btoa?e=>btoa(e):V?e=>d.Buffer.from(e,"binary").toString("base64"):e=>{let t,r,n,i,o="",a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw TypeError("invalid character found");o+=W[(t=r<<16|n<<8|i)>>18&63]+W[t>>12&63]+W[t>>6&63]+W[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},ee=V?e=>d.Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(Q.apply(null,e.subarray(r,r+4096)));return X(t.join(""))},et=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?Q(192|t>>>6)+Q(128|63&t):Q(224|t>>>12&15)+Q(128|t>>>6&63)+Q(128|63&t)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return Q(240|t>>>18&7)+Q(128|t>>>12&63)+Q(128|t>>>6&63)+Q(128|63&t)},er=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,en=V?e=>d.Buffer.from(e,"utf8").toString("base64"):K?e=>ee(K.encode(e)):e=>X(e.replace(er,et)),ei=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,eo=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return Q((t>>>10)+55296)+Q((1023&t)+56320);case 3:return Q((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return Q((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},ea="function"==typeof atob?e=>atob(e.replace(/[^A-Za-z0-9\+\/]/g,"")):V?e=>d.Buffer.from(e,"base64").toString("binary"):e=>
1{if(e=e.replace(/\s+/g,""),!Y.test(e))throw TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r="",n,i;for(let o=0;o<e.length;)t=J[e.charAt(o++)]<<18|J[e.charAt(o++)]<<12|(n=J[e.charAt(o++)])<<6|(i=J[e.charAt(o++)]),r+=64===n?Q(t>>16&255):64===i?Q(t>>16&255,t>>8&255):Q(t>>16&255,t>>8&255,255&t);return r},es=V?e=>Z(d.Buffer.from(e,"base64")):e=>Z(ea(e).split("").map(e=>e.charCodeAt(0))),eu=V?e=>d.Buffer.from(e,"base64").toString("utf8"):$?e=>$.decode(es(e)):e=>ea(e).replace(ei,eo),ec="test";function el(e){try{return JSON.parse(e)}catch(t){return e}}function ed(e){return((e,t=!1)=>t?en(e).replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"):en(e))(JSON.stringify(e))}var ef=class{constructor(e){this.get=e=>{let t=this.retrieveValue(e);return t?el(t):this.legacyGet(e)},this.legacyGet=e=>{let t=this.retrieveValue(this.buildKey(e));return t?el(eu(t.replace(/[-_]/g,e=>"-"==e?"+":"/").replace(/[^A-Za-z0-9\+\/]/g,""))):null},this.set=(e,t)=>{this.storeValue(e,"string"==typeof t?t:JSON.stringify(t)),this.legacySet(e,t)},this.legacySet=(e,t)=>{this.storeValue(this.buildKey(e),ed(t))},this.buildKey=e=>ed(`${this._writeKey}_${e}`),this._writeKey=e}},eh=class extends ef{retrieveValue(e){var t;let r=null!=(t=z.get(e))?t:null;return r&&this.storeValue(e,r),r}storeValue(e,t){z.set(e,t,{domain:`.${window.location.hostname.split(".").slice(-2).join(".")}`,expires:400})}},eg=class extends ef{constructor(e){super(e),this.retrieveValue=e=>this._localStorageAvailable?localStorage.getItem(e):null,this.storeValue=(e,t)=>{this._localStorageAvailable&&localStorage.setItem(e,t)},this._localStorageAvailable=function(){try{return localStorage.setItem(ec,ec),localStorage.removeItem(ec),!0}catch(e){return!1}}()}},ep="unify_visitor_id",ev=class{constructor(e){this.getOrCreateVisitorId=()=>{if(this._visitorId)return this._visitorId;let e=this.getVisitorId()||this.createVisitorId();return this._visitorId=e,e},this.getVisitorId=()=>{let e=this._storageService.get(ep);if(e)return e;let t=this._storageService.get("anonymousUserId");return t&&this._storageService.set(ep,t),t},this.createVisitorId=()=>{let e=G();return this._storageService.set(ep,e),e},this._storageService=new eh(e),this._visitorId=null}},em={durationMinutes:30},ey="unify_session",eb=class{constructor(e,t){this.getOrCreateSession=()=>this.getAndUpdateSession()||this.createSession(),this.getAndUpdateSession=()=>{let e=this._currentSession||this.getStoredSession();if(e&&e.expiration>new Date().getTime())return this.updateSessionExpiration(e)},this.createSession=()=>{var e;let t=b({sessionId:G(),startTime:new Date,expiration:S(null!=(e=this._options.durationMinutes)?e:30),initial:T()},x());return this._currentSession=t,this.setStoredSession(t),t},this.updateSessionExpiration=e=>{var t;let r=h(b({},e),g({expiration:S(null!=(t=this._options.durationMinutes)?t:30)}));return this._currentSession=r,this.setStoredSession(r),r},this.getStoredSession=()=>{let e=this._storageService.get(ey);if(e)return e;let t=this._storageService.get("clientSession");return t&&this.setStoredSession(t),t},this.setStoredSession=e=>{this._storageService.set(ey,e),this._cookieStorageService.set("unify_session_id",e.sessionId)},this._writeKey=e,this._options=null!=t?t:em,this._storageService=new eg(this._writeKey),this._cookieStorageService=new eh(this._writeKey),this._currentSession=null}},e_=class{constructor(e){this.post=(e,t)=>{let r=JSON.stringify(t);if(fetch)fetch(e,{method:"POST",body:r,headers:{"Content-type":"application/json; charset=UTF-8","X-Write-Key":this._writeKey},keepalive:!0}).catch(()=>{});else{let t=new XMLHttpRequest;t.open("POST",e,!0),t.setRequestHeader("Content-type","application/json; charset=UTF-8"),t.setRequestHeader("X-Write-Key",this._writeKey),t.send(r)}},this._writeKey=e}};function ew({message:e,error:t,attrs:r,apiClient:n}){console.debug(`%c[Unify]: %c${e}${t?`: ${t.message}`:""}${r?`, data: ${JSON.stringify(r)}`:""}`,"font-weight: bold;","");let i=r&&Object.entries(r).reduce((e,[t,r])=>h(b({},e),g({[t]:"string"==typeof r?r:JSON.stringify(r)})),{});null==n||n.post("https://api.unifyintent.com/analytics/v1/_internal/logs",{status:"error",message:e,attrs:i,name:null==t?void 0:t.name,stack:null==t?void 0:t.stack,version:"1.8.0"})}var ek="unifyAttr",eE=["default.form_completed","deafult.form_page_submitted","default.form_page_submitted"];function eS(e){return eE.includes(e.event)}function eT(e,t,r){var n,i;return null!=(i=null==(n=r.find(({object:r,name:n})=>r===t&&n===e))?void 0:n.value)?i:null}function ex(e,t=80){if(!e)return null;let r=e.replace(/\s+/g," ").trim();return r?r.length>t?r.slice(0,t-1)+"...":r:null}function eA(e){return e.innerText||e.textContent||""}var eC=class{constructor(e){var t,r;this._monitoredInputs=new Set,this._submittedEmails=new Set,this._historyMonitored=!1,this._isTrackingClicks=!1,this.startAutoPage=()=>{this._historyMonitored||this.monitorHistory(),this._autoPage=!0},this.stopAutoPage=()=>{this._historyMonitored&&window.removeEventListener("popstate",this.maybeTrackPage),this._autoPage=!1},this.startAutoIdentify=()=>{this._autoIdentify=!0,this.refreshMonitoredInputs(),setInterval(this.refreshMonitoredInputs,2e3),this.subscribeToThirdPartyMessages()},this.stopAutoIdentify=()=>
1{this._monitoredInputs.forEach(e=>{e.isConnected&&(e.removeEventListener("blur",this.handleInputBlur),e.removeEventListener("keydown",this.handleInputKeydown))}),this._monitoredInputs.clear(),this.unsubscribeFromThirdPartyMessages(),this._autoIdentify=!1},this.startAutoTrack=e=>{e&&(this._autoTrackOptions=e),this.startTrackingClicks()},this.stopAutoTrack=()=>{this.stopTrackingClicks()},this.monitorHistory=()=>{try{let e=history.pushState;history.pushState=(...t)=>{e.apply(history,t),this.maybeTrackPage()};let t=history.replaceState;history.replaceState=(...e)=>{t.apply(history,e),this.maybeTrackPage()},window.addEventListener("popstate",this.maybeTrackPage),this._historyMonitored=!0}catch(e){this.logError("Error occurred in monitorHistory",e)}},this.maybeTrackPage=()=>{if(this._autoPage)try{var e,t;this._lastLocation&&(e=this._lastLocation,t=window.location,e.hostname===t.hostname&&e.pathname===t.pathname)||(new L(this._intentContext).track(),this._lastLocation=b({},window.location))}catch(e){this.logError("Error occurred in maybeTrackPage",e)}},this.startTrackingClicks=()=>{this._isTrackingClicks||(document.addEventListener("click",this.handleDocumentClick),this._isTrackingClicks=!0)},this.stopTrackingClicks=()=>{this._isTrackingClicks&&(document.removeEventListener("click",this.handleDocumentClick),this._isTrackingClicks=!1)},this.handleDocumentClick=e=>{var t;try{let r=e.target;if(!r)return;let n=["[data-unify-track-clicks]",...null!=(t=this._autoTrackOptions.clickTrackingSelectors)?t:[]],i=r.closest(n.join(", "));if(!i||!(i instanceof HTMLElement))return;this.maybeTrackClick(i)}catch(e){this.logError("Error occurred in handleDocumentClick",e)}},this.refreshMonitoredInputs=()=>{if(this._autoIdentify)try{this._monitoredInputs.forEach(e=>{e.isConnected||this._monitoredInputs.delete(e)}),Array.from(document.getElementsByTagName("input")).filter(e=>{var t;return!this._monitoredInputs.has(e)&&(t=e,"email"===t.type||"text"===t.type)}).forEach(e=>{e.addEventListener("blur",this.handleInputBlur),e.addEventListener("keydown",this.handleInputKeydown),this._monitoredInputs.add(e)})}catch(e){this.logError("Error occurred in refreshMonitoredInputs",e)}},this.subscribeToThirdPartyMessages=()=>{window.addEventListener("message",this.handleThirdPartyMessage)},this.unsubscribeFromThirdPartyMessages=()=>{window.removeEventListener("message",this.handleThirdPartyMessage)},this.handleThirdPartyMessage=e=>{if(this._autoIdentify)try{switch(e.origin){case"https://forms.default.com":this.handleDefaultFormMessage(e);break;case"https://capture.navattic.com":this.handleNavatticDemoMessage(e)}}catch(e){this.logError("Error occurred in handleThirdPartyMessage",e)}},this.handleDefaultFormMessage=e=>{if(this._autoIdentify)try{if(eS(e.data)){let t=e.data.payload.email;t&&this.maybeIdentifyInputEmail(t,function(e,t){if(eS(e))try{let{email:t,attributes:r}=e.payload,n=b({email:t},r&&b(b(b(b({},r.first_name&&{first_name:r.first_name}),r.last_name&&{last_name:r.last_name}),r.phone&&{mobile_phone:r.phone}),r.title&&{title:r.title})),i=null!=r&&r.website?I(r.website):null,o;if(i&&i===P(t)){let e=r&&!isNaN(Number(r.head_count))?Number(r.head_count):void 0;o=b({domain:i},r&&b(b(b({},r.company&&{name:r.company}),r.industry_group&&{industry:r.industry_group}),e&&{employee_count:e}))}return b({person:n},o&&{company:o})}catch(e){ew({message:`Error occurred while parsing attributes from Default event payload: ${e}`,error:e,apiClient:t});return}}(e.data,this._intentContext.apiClient))}}catch(e){this.logError("Error occurred in handleDefaultFormMessage",e)}},this.handleNavatticDemoMessage=e=>{var t,r;if(this._autoIdentify)try{let n=(null!=(r=null==(t=e.data)?void 0:t.properties)?r:[]).find(({object:e,name:t})=>"END_USER"===e&&"email"===t);n&&this.maybeIdentifyInputEmail(n.value,function(e,t){var r,n,i,o,a;try{let t=null!=(r=e.properties)?r:[],s=eT("email","END_USER",t);if(!s)return;let u=eT("fullName","END_USER",t),c=u?u.split(" ")[0]:eT("firstName","END_USER",t),l=u?u.split(" ")[1]:eT("lastName","END_USER",t),d=eT("phone","END_USER",t),f=b(b(b({email:s},c&&{first_name:c}),l&&{last_name:l}),d&&{mobile_phone:d}),h=eT("domain","COMPANY_ACCOUNT",t),g=h?I(h):null,p;if(g&&g===P(s)){let e=null!=(n=eT("name","COMPANY_ACCOUNT",t))?n:void 0,r=null!=(i=eT("description","COMPANY_ACCOUNT",t))?i:void 0,s=null!=(o=eT("linkedin","COMPANY_ACCOUNT",t))?o:void 0,u=eT("industry","COMPANY_ACCOUNT",t),c=eT("foundedYear","COMPANY_ACCOUNT",t),l=null!=(a=eT("employeeCount","COMPANY_ACCOUNT",t))?a:void 0,d=isNaN(Number(l))?void 0:Number(l);p=b(b(b(b(b(b({domain:g},e&&{name:e}),r&&{description:r}),s&&{linkedin_url:s}),u&&{industry:u}),c&&{founded:c}),d&&{employee_count:d})}return b({person:f}
1,p&&{company:p})}catch(e){ew({message:`Error occurred while parsing attributes from Navattic event payload: ${e}`,error:e,apiClient:t});return}}(e.data,this._intentContext.apiClient))}catch(e){this.logError("Error occurred in handleNavatticDemoMessage",e)}},this.handleInputBlur=e=>{if(this._autoIdentify)try{e.target instanceof HTMLInputElement&&this.maybeIdentifyInputEmail(e.target.value)}catch(e){this.logError("Error occurred in handleInputBlur",e)}},this.handleInputKeydown=e=>{if(this._autoIdentify)try{"Enter"===e.key&&e.target instanceof HTMLInputElement&&this.maybeIdentifyInputEmail(e.target.value)}catch(e){this.logError("Error occurred in handleInputKeyDown",e)}},this.maybeIdentifyInputEmail=(e,t)=>{if(this._autoIdentify)try{if(e){if(!A(e)||this._submittedEmails.has(e))return;new D(this._intentContext,{email:e,person:null==t?void 0:t.person,company:null==t?void 0:t.company}).track(),this._submittedEmails.add(e)}}catch(e){this.logError("Error occurred in maybeIdentifyInputEmail",e)}},this.maybeTrackClick=e=>{try{let t,r;if(!(e instanceof HTMLElement)||function(e){if(!(e instanceof HTMLElement))return!1;if(e.hidden||"true"===e.getAttribute("aria-hidden"))return!0;let t=getComputedStyle(e);return"none"===t.display||"hidden"===t.visibility}(e)||e.matches(":disabled")||"true"===e.getAttribute("aria-disabled")||e.classList.contains("disabled")||function(e,t){if(!(e instanceof HTMLElement))return!1;let{dataset:r}=e;return!!r[t]}(e,"unifyExclude"))return;let n=function(e){let t,r,n=function(e,t){if(!(e instanceof HTMLElement))return null;let{dataset:r}=e;return r[t]?String(r[t]):null}(e,"unifyLabel");if(n)return n;let i=eA(e);if(i)return ex(i);let o=e.getAttribute("aria-label");if(o)return ex(o);let a=(t=e.getAttribute("aria-labelledby"))?t.split(/\s+/).map(e=>{let t=document.getElementById(e);return t?eA(t):null}).filter(e=>!!e).join(" "):null;if(a)return ex(a);let s=(r=e.querySelector("img[alt]"),(null==r?void 0:r.alt)||null);return s?ex(s):null}(e);if(!n)return;let i=function(e){if(!(e instanceof HTMLElement))return{};let t={};return Object.entries(e.dataset).forEach(([e,r])=>{if(e.startsWith(ek)&&r){let n=e.slice(ek.length);n&&(t[`${n.charAt(0).toLowerCase()}${n.slice(1)}`]=r)}}),t}(e);new U(this._intentContext,{name:"Element Clicked",properties:(t=b({},i),r={elementName:n,wasAutoTracked:!0},h(t,g(r)))}).track()}catch(e){this.logError("Error occurred in maybeTrackClick",e)}},this.logError=(e,t)=>{ew({message:`UnifyIntentAgent: ${e}`,error:t,apiClient:this._intentContext.apiClient})},this.__getMonitoredInputs=()=>this._monitoredInputs,this.__getSubmittedEmails=()=>this._submittedEmails,this._intentContext=e,this._autoPage=null!=(t=e.clientConfig.autoPage)&&t,this._autoIdentify=null!=(r=e.clientConfig.autoIdentify)&&r,this._autoTrackOptions=b({},e.clientConfig.autoTrackOptions),this._autoPage&&(this.startAutoPage(),this.maybeTrackPage()),this._autoIdentify&&this.startAutoIdentify(),this.startAutoTrack()}},eI={autoPage:!1,autoIdentify:!1,sessionDurationMinutes:30};function eP(){return{identify:[],page:[],track:[]}}var eO=class{constructor(e,t=eI){this._mounted=!1,this._eventBuffers=eP(),this.isMounted=()=>this._mounted,this.mount=()=>{if("u">typeof window)try{var e,t;if(E(window.unify)||E(window.unifyBrowser))return void ew({message:"UnifyIntentClient already exists on window, a new one will not be created."});let r=new e_(this._writeKey),n=new eb(this._writeKey,{durationMinutes:this._config.sessionDurationMinutes});n.getOrCreateSession();let i=new ev(this._writeKey);i.getOrCreateVisitorId(),this._context={writeKey:this._writeKey,clientConfig:this._config,apiClient:r,sessionManager:n,identityManager:i},this._intentAgent=new eC(this._context),this._mounted=!0,e=this,t=r,(Array.isArray(window.unify)?[...window.unify]:Array.isArray(window.unifyBrowser)?[...window.unifyBrowser]:[]).forEach(([r,n])=>{if("function"==typeof e[r])try{Array.isArray(n)?e[r].call(e,...n):e[r].call(e)}catch(e){ew({message:`Error occurred while flushing queue: ${null==e?void 0:e.message}`,error:e,apiClient:t})}}
1),this._eventBuffers.identify.forEach(e=>this.identify(...e)),this._eventBuffers.page.forEach(e=>this.page(...e)),this._eventBuffers.track.forEach(e=>this.track(...e)),this._eventBuffers=eP(),window.unify=this,window.unifyBrowser=this}catch(e){this.logError("Error occurred in mount",e)}},this.unmount=()=>{if("u">typeof window)try{this._config.autoPage&&this.stopAutoPage(),this._config.autoIdentify&&this.stopAutoIdentify(),this.stopAutoTrack(),this._mounted=!1,window.unify=void 0,window.unifyBrowser=void 0}catch(e){this.logError("Error occurred in unmount",e)}},this.page=e=>{if(!this._mounted)return void this._eventBuffers.page.push([e]);try{new L(this._context,e).track()}catch(e){this.logError("Error occurred in page",e)}},this.getPagePayload=e=>{if(this._mounted)try{return new L(this._context,e).getTrackPayload()}catch(e){this.logError("Error occurred in getPagePayload",e)}},this.identify=(e,t)=>{try{let r=A(e);if(r)return this._mounted?new D(this._context,{email:r,person:null==t?void 0:t.person,company:null==t?void 0:t.company}).track():this._eventBuffers.identify.push([e,t]),!0}catch(e){this.logError("Error occurred in identify",e)}return!1},this.getIdentifyPayload=(e,t)=>{if(!this._mounted)return!1;try{let r=A(e);if(r)return new D(this._context,{email:r,person:null==t?void 0:t.person,company:null==t?void 0:t.company}).getTrackPayload()}catch(e){this.logError("Error occurred in getIdentifyPayload",e)}},this.track=(e,t)=>{if(!this._mounted)return void this._eventBuffers.track.push([e,t]);try{new U(this._context,{name:e,properties:t}).track()}catch(e){this.logError("Error occurred in track",e)}},this.getTrackPayload=(e,t)=>{if(this._mounted)try{return new U(this._context,{name:e,properties:t}).getTrackPayload()}catch(e){this.logError("Error occurred in getTrackPayload",e)}},this.startAutoPage=()=>{if(this._mounted)try{this._intentAgent||(this._intentAgent=new eC(this._context)),this._intentAgent.startAutoPage()}catch(e){this.logError("Error occurred in startAutoPage",e)}},this.stopAutoPage=()=>{var e;if(this._mounted)try{null==(e=this._intentAgent)||e.stopAutoPage()}catch(e){this.logError("Error occurred in stopAutoPage",e)}},this.startAutoIdentify=()=>
1{if(this._mounted)try{this._intentAgent||(this._intentAgent=new eC(this._context)),this._intentAgent.startAutoIdentify()}catch(e){this.logError("Error occurred in startAutoIdentify",e)}},this.stopAutoIdentify=()=>{var e;if(this._mounted)try{null==(e=this._intentAgent)||e.stopAutoIdentify()}catch(e){this.logError("Error occurred in stopAutoIdentify",e)}},this.startAutoTrack=e=>{if(this._mounted)try{e&&(this._config.autoTrackOptions=e),this._intentAgent||(this._intentAgent=new eC(this._context)),this._intentAgent.startAutoTrack(e)}catch(e){this.logError("Error occurred in startAutoTrack",e)}},this.stopAutoTrack=()=>{var e;if(this._mounted)try{null==(e=this._intentAgent)||e.stopAutoTrack()}catch(e){this.logError("Error occurred in stopAutoTrack",e)}},this.logError=(e,t)=>{ew({message:`UnifyIntentClient: ${e}`,error:t,apiClient:this._context.apiClient})},this.__getEventBuffers=()=>this._eventBuffers,this._writeKey=e,this._config=t}};let eM={unifyClient:null,duckDB:null},eR={autoPage:!0,autoIdentify:!1},eL=()=>{let e=(window.__CHALK_INTERNAL_HOOK__||(window.__CHALK_INTERNAL_HOOK__=eM),eM);return e.unifyClient??=new eO("wk_Wwm4qdeM_2YAvx6jgzeXAD3kP1acAj4AHBcKxdQ2z",eR),e.unifyClient};e.s(["initializeUnifyClient",0,eL],48389);var eN=e.i(90602);e.s(["MarketingButton",0,({onClick:e,href:t,className:d,chevronClassName:f,children:h,theme:g,type:p,disabled:v,loading:m,style:y,analyticsDescription:b,ctaContextGA4:_,id:w,dataAttributes:k,target:E})=>{let S=(0,eN.useRouter)(),T=(0,a.useAmplitudeOnClick)({event:a.AmplitudeEvent.MARKETING_CLICK,component:"MarketingButton",href:t,text:"string"==typeof h?h:void 0,description:b}),x={role:"button",onClick:()=>{T(),eL()?.track("marketing button click",{properties:{path:S.asPath,location:window.location.href,color:g,text:"string"==typeof h?h:void 0,description:b,href:t}}),e?.()},className:(0,s.cx)("rounded-[20px] text-[13px] py-[10px] font-[400]","leading-[15px] tracking-wider px-4 uppercase","font-marketing-mono","intro-chevron"===g?"flex items-center":void 0,"[&>svg{&:hover}]:translate-x-0.5",(e=>{let t="";switch(e){case"header":t="text-marketing-mint-green bg-marketing-green-400 hover:bg-marketing-mint-green hover:text-marketing-green-400";break;case"mintgreen-navy-text":t="text-marketing-navy-blue border border-marketing-mint-green bg-marketing-mint-green hover:bg-transparent active:bg-transparent hover:text-marketing-mint-green active:text-marketing-mint-green-dark";break;case"darkgreen":t="text-marketing-mint-green bg-marketing-green-400 hover:bg-marketing-green-400/80 active:bg-marketing-green-400/90";break;case"darkgreen-mint-text":t="text-marketing-mint-green bg-marketing-green-1 hover:bg-marketing-green-1/70 active:bg-marketing-green-1/90";break;case"darkgreen-white-text":t="text-white border border-marketing-green-1 bg-marketing-green-1 hover:bg-transparent active:bg-transparent hover:text-marketing-green-1 active:text-marketing-green-1";break;case"darkgreen-text":t="text-marketing-green-1 hover:opacity-70 active:opacity-80";break;case"extradarkgreen-white-text":t="text-white border border-marketing-green-2 bg-marketing-green-2 hover:bg-marketing-green-1 hover:text-marketing-green-6 active:text-marketing-green-6";break;case"navyblue":t="bg-marketing-navy-blue border border-marketing-navy-blue text-white hover:text-marketing-navy-blue hover:bg-transparent";break;case"navyblue-text":t="text-marketing-navy-blue hover:opacity-70 active:opacity-80";break;case"darkgreen-white-background":t="text-marketing-green-1 bg-white border border-marketing-green-1 hover:bg-marketing-green-1/20 active:bg-marketing-green-1/30";break;case"intro":t=(0,s.cx)("border","border-marketing-chartreuse bg-marketing-chartreuse text-marketing-darkgreen-bg","hover:text-marketing-chartreuse hover:bg-marketing-darkgreen-bg");break;case"orange":t="text-marketing-green-500 bg-marketing-orange";break;case"purple":t="text-white bg-marketing-purple border border-marketing-purple hover:bg-transparent hover:text-marketing-purple";break;case"green":t="text-marketing-green-500 bg-marketing-mint-green hover:bg-marketing-mint-green/80 active:bg-marketing-mint-green-dark/80";break;case"green-secondary":t="bg-inherit border border-marketing-mint-green-dark text-marketing-mint-green-dark hover:bg-marketing-mint-green hover:text-marketing-green-1";break;case"chevron":t="text-marketing-red-500 bg-transparent";break;case"transparent-darkgreen":t="text-marketing-green-1 bg-transparent border border-marketing-green-1 hover:bg-marketing-green-1 hover:text-marketing-mint-green-dark";break;case"transparent-chevron":case"transparent":t="bg-transparent";break;case"violet-text":t="text-marketing-violet border border-marketing-violet bg-white hover:bg-marketing-violet hover:text-white";break;case"violet-white-text":t="text-white border border-marketing-violet bg-marketing-violet hover:bg-white hover:text-marketing-violet active:bg-white active:text-marketing-violet";break;case"intro-chevron":t="text-marketing-mint-green bg-transparent";break;case"chartreuse-chevron":t="group text-marketing-chartreuse bg-transparent px-0 flex items-center";break;case"chartreuse":t="text-marketing-chartreuse border-marketing-chartreuse border hover:bg-marketing-chartreuse hover:text-marketing-green-1";break;case"lime":t="text-marketing-green-7 bg-marketing-green-5";break;case"lime-text":t="text-secondary-lime-500 border-none";break;case"chartreuse-primary":t="text-marketing-mediumgreen-bg bg-marketing-chartreuse hover:bg-marketing-chartreuse-
1dark";break;case"demo-video":t="text-marketing-chartreuse bg-transparent border border-marketing-chartreuse border-opacity-20 hover:bg-marketing-chartreuse hover:text-marketing-green-1 hover:border-marketing-chartreuse hover:border-opacity-100";break;case"white":t="text-white border border-white hover:bg-white hover:text-marketing-green-1";break;case"white-text":t="text-white underline hover:text-opacity-70";break;default:t="text-marketing-mint-green bg-marketing-green-400"}return t})(g),d),style:y},A=(0,r.jsxs)(r.Fragment,{children:[h,("chevron"===g||"transparent-chevron"===g)&&(0,r.jsx)(i.CustomChevron,{className:(0,s.cx)("chevron-link-chev transition-transform duration-100 ml-1",f),style:y,height:14,width:24}),"chartreuse-chevron"===g&&(0,r.jsxs)("span",{"aria-hidden":!0,className:(0,s.cx)("ml-1 inline-flex items-center gap-0 transition-transform duration-[180ms]","group-hover:translate-x-1 group-focus-visible:translate-x-1"),children:[(0,r.jsx)("span",{className:(0,s.cx)("block h-px w-0 bg-current transition-[width] duration-[180ms]","group-hover:w-2 group-focus-visible:w-2")}),(0,r.jsx)(o.Icon,{name:"chevronRight",size:"xs",className:f})]}),"intro-chevron"===g&&(0,r.jsx)(i.CustomChevron,{className:"chevron-link-chev transition-transform duration-100 fill-marketing-mint-green",style:y,height:14,width:24})]}),C=(0,l.useMemo)(()=>({"data-cta-context":_,...k}),[_,k]);if(null==t)return(0,r.jsx)("button",{...x,type:p,disabled:v||m,...C,id:w,children:m?(0,r.jsx)(n.LoadingDots,{}):A});if(!(0,u.urlIsSameDomain)(t))return(0,r.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",...x,...C,id:w,children:A});{let e=(0,u.urlIsDocsLink)(t)?{target:"_blank",rel:"noreferrer"}:{};return(0,r.jsx)(c.default,{href:t,target:E,...e,...x,...C,id:w,children:A})}}],37787)},70480,e=>{"use strict";var t,r,n,i,o,a,s,u=e.i(62751),c=e.i(37787),l=e.i(9874),d=e.i(42206),f=((t={}).CaseStudyBuildFaster="case_study_build_faster",t.BlogIndexAboveFooter="blog_index_above_footer",t.HomepageAboveFold="homepage_above_fold",t.HomepageStartBuildingSection="homepage_start_building",t.HomepageExploreChalkSection="homepage_explore_chalk",t.HomepageFooterContactLink="homepage_footer_contact_link",t.MarketingNavbarDesktop="marketing_navbar_desktop",t.MarketingNavbarMobile="marketing_navbar_mobile",t.WatchDemoModal="watch_demo_modal",t.KeywordLandingPageHero="keyword_landing_page_above_hero",t.KeywordLandingPageFlowchartSection="keyword_landing_page_flowchart_section",t.KeywordLandingPageAboveFooter="keyword_landing_page_above_footer",t.SolutionsIntroHero="solutions_intro_hero",t.SolutionsAboveFooter="solutions_above_footer",t.CustomerStoriesHero="customer_stories_hero",t.CustomerStoriesAboveFooter="customer_stories_above_footer",t.ProductsIntroHero="products_intro_hero",t.ProductsAboveFooter="products_above_footer",t.LoginFormCta="login_form_cta",t),h=((r={}).HomepageAboveFold="homepage_above_fold",r.HomepageExploreChalkSection="homepage_explore_chalk",r.CaseStudyBuildFaster="case_study_build_faster",r.BlogIndexAboveFooter="blog_index_above_footer",r.SolutionsAboveFooter="solutions_above_footer",r.CustomerStoriesAboveFooter="customer_stories_above_footer",r.ProductsPageLLMRealTimeServingSection="products_page_real_time_serving_section",r),g=((n={}).AboutPageApplyCareers="about_page_apply_careers",n),p=((i={}).CustomersPage="customers_page",i.HomepageAboveFold="homepage_above_fold",i.BlogIndexPage="blog_index_page",i.BlogPageRelatedPosts="blog_page_related_posts",i.CustomersPageAboveFooter="customers_page_above_footer",i),v=((o={}).MarketingNavbarDesktop="marketing_navbar_desktop",o.MarketingNavbarMobile="marketing_navbar_mobile",o),m=((a={}).AboutPageContactUs="about_page_contact_us",a),y=((s={}).CodeExamplesListPage="code_examples_list_page",s.HomepageExamplesSection="homepage_examples_section",s.SolutionsPageExamplesSection="solutions_page_examples_section",s.ProductsPageExamplesSection="products_page_examples_section",s);e.s(["MarketingAboutPageCareersCTAContextGA4",()=>g,"MarketingBookDemoButton",0,({className:e,ctaContextGA4:t,textOverride:r,...n})=>(0,u.jsx)(c.MarketingButton,{...n,ctaContextGA4:t,className:(0,l.cx)(e,"whitespace-nowrap"),href:d.Routes.bookDemo,children:r??"Book Demo"}),"MarketingBookDemoCTAContextGA4",()=>f,"MarketingCaseStudyCTAContextGA4",()=>p,"MarketingCodeExamplesCTAContextGA4",()=>y,"MarketingContactUsCTAContextGA4",()=>m,"MarketingExploreDocsButton",0,({className:e,ctaContextGA4:t,textOverride:r,hrefOverride:n,...i})=>(0,u.jsx)(c.MarketingButton,{...i,ctaContextGA4:t,className:(0,l.cx)(e,"whitespace-nowrap"),href:n??d.Routes.docsSite.whatIsChalk,id:"explore-docs-cta",children:r??"Explore Docs"}),"MarketingExploreDocsCTAContextGA4",()=>h,"MarketingLoginCTAContextGA4",()=>v])},75713,11436,e=>{"use strict";function t(e){}e.s(["assertNever",0,function(e){throw Error(`Unreachable code has been reached via value ${e}`)},"compileOnlyAssertNever",0,t],11436);var r,n=e.i(96474),i=((r={}).LightGreen="lightgreen",r.Black="black",r.MediumGreen="mediumgreen",r.DarkGreen="darkgreen",r.Slate="slate",r.LightGray="lightgray",r.DarkGreenCMS="darkgreen-cms",r.LightGrayCMS="lightgray-cms",r.LightGreenCMS="lightgreen-cms",r.MediumGreenCMS="mediumgreen-cms",r.MintGreenCMS="mintgreen-cms",r.PersianFableGreenCMS="persian-fable-green-cms",r.SeafoamCMS="seafoam-cms",r.NavyBlueCMS="navyblue-cms",r.PurpleCMS="purple-cms",r.BlackCMS="black-cms",r.VioletLightCMS="violet-light-cms",r);
1let o={black:"bg-black",darkgreen:"bg-marketing-darkgreen-bg","darkgreen-cms":"bg-marketing-darkgreen-bg",mediumgreen:"bg-marketing-mediumgreen-bg","mediumgreen-cms":"bg-marketing-green-19","lightgreen-cms":"bg-marketing-mediumgreen-bg",lightgray:"bg-marketing-lightgray-bg","lightgray-cms":"bg-marketing-lightgray-bg",lightgreen:"bg-marketing-lightgreen-bg",slate:"bg-marketing-slate-bg","mintgreen-cms":"bg-marketing-mint-green","persian-fable-green-cms":"bg-marketing-persian-fable-green","seafoam-cms":"bg-marketing-accent-seafoam","navyblue-cms":"bg-marketing-navy-blue","purple-cms":"bg-marketing-violet","black-cms":"bg-black","violet-light-cms":"bg-white"},a=new Set(["mediumgreen-cms","mintgreen-cms","persian-fable-green-cms","lightgreen","seafoam-cms","violet-light-cms"]),s=o.darkgreen,u=[o.black,o.darkgreen,o.mediumgreen,o.lightgreen,o.slate,"bg-white"];e.s(["MarketingLightThemes",0,a,"MarketingTheme",()=>i,"allThemeBGs",0,u,"bgForTheme",0,e=>null!=e&&e in o?o[e]:s,"colorsForTheme",0,e=>{let r=(0,n.getTailwindConfig)().theme.colors.marketing;switch(e){case"black":case"darkgreen":case"darkgreen-cms":return{theme:e,...r.darkgreen};case"mediumgreen":case"lightgreen-cms":case"mediumgreen-cms":return{theme:e,...r.mediumgreen};case"seafoam-cms":return{theme:e,...r["seafoam-cms"]};case"black-cms":return{theme:e,...r.darkgreen,bg:"#000000",title:"#FFFFFF",subtitle:"#FFFFFF",header:"#FFFFFF",navText:"#FFFFFF",navHighlight:"#FFFFFF",textPrimary:"#FFFFFF",textSecondary:"#FFFFFF"};case"navyblue-cms":return{theme:e,...r["navyblue-cms"]};case"purple-cms":return{theme:e,...r["purple-cms"]};case"mintgreen-cms":return{theme:e,...r["mintgreen-cms"]};case"violet-light-cms":return{theme:e,...r["violet-light-cms"]};case"persian-fable-green-cms":return{theme:e,...r["persian-fable-green-cms"]};case"lightgray":case"lightgray-cms":return{theme:e,...r.lightgray};case"lightgreen":return{theme:e,...r.lightgreen};case"slate":return{theme:e,...r.slate};default:return t(e),{theme:e,...r.darkgreen}}},"linkColorClassesForTheme",0,e=>{switch(e){case"black":case"darkgreen":case void 0:default:return"text-marketing-darkgreen-textPrimary hover:text-white";case"darkgreen-cms":return"text-white hover:text-marketing-mint-green";case"black-cms":case"purple-cms":return"text-white hover:opacity-70";case"mediumgreen":return"text-marketing-mediumgreen-textPrimary hover:text-white";case"persian-fable-green-cms":return"text-marketing-fablegreen-textPrimary hover:opacity-70";case"lightgreen":return"text-marketing-lightgreen-textPrimary hover:text-white";case"lightgray":return"text-marketing-lightgreen-textPrimary hover:text-marketing-lightgreen-textSecondary";case"slate":return"text-marketing-slate-textPrimary hover:text-white"}},"marketingMultiColors",0,()=>(0,n.getTailwindConfig)().theme.colors.marketing.colors],75713)},78715,e=>{"use strict";e.s(["COLOR_DELAY_CLASSNAME",0,"transition-colors ease-[cubic-bezier(0.5,1,0.6,1)] duration-300","TRANSITION_DELAY_CLASSNAME",0,"transition-all ease-[cubic-bezier(0.5,1,0.6,1)] duration-300"])},43888,38401,63473,e=>{"use strict";var t=e.i(75713),r=e.i(11436),n=e.i(9874),i=e.i(78715);e.s(["backgroundForTheme",0,e=>{switch(e){case t.MarketingTheme.DarkGreenCMS:return(0,n.cx)("bg-marketing-green-1 group-hover/main-navbar:bg-marketing-green-2",i.COLOR_DELAY_CLASSNAME);case t.MarketingTheme.MediumGreenCMS:return(0,n.cx)("bg-marketing-green-19 group-hover/main-navbar:bg-marketing-green-20",i.COLOR_DELAY_CLASSNAME);case t.MarketingTheme.SeafoamCMS:return(0,n.cx)("bg-marketing-seafoam-cms-bg group-hover/main-navbar:bg-marketing-mintgreen-cms-bg",i.COLOR_DELAY_CLASSNAME);case t.MarketingTheme.MintGreenCMS:return(0,n.cx)("bg-marketing-mintgreen-cms-bg group-hover/main-navbar:bg-marketing-mint-green",i.COLOR_DELAY_CLASSNAME);case t.MarketingTheme.LightGreenCMS:return(0,n.cx)("bg-marketing-lightgreen-bg group-hover/main-navbar:bg-marketing-green-12",i.COLOR_DELAY_CLASSNAME);case t.MarketingTheme.LightGrayCMS:return(0,n.cx)("bg-marketing-gray-2 group-hover/main-navbar:bg-marketing-gray-1 transition-colors ease-in-out",i.COLOR_DELAY_CLASSNAME)}(0,r.assertNever)(e)},"borderBottomClassNameForTheme",0,e=>{switch(e){case t.MarketingTheme.DarkGreenCMS:return"border-b border-b-marketing-green-14";case t.MarketingTheme.MediumGreenCMS:return"border-b border-b-[rgba(115,209,156,0.30)]";case t.MarketingTheme.LightGreenCMS:return"border-b border-b-marketing-lightgreen-bg";case t.MarketingTheme.MintGreenCMS:case t.MarketingTheme.SeafoamCMS:return"border-b border-marketing-green-1";case t.MarketingTheme.LightGrayCMS:return"border-b border-b-marketing-gray-4"}(0,r.assertNever)(e)},"borderClassNameForTheme",0,e=>{switch(e){case t.MarketingTheme.DarkGreenCMS:return"border-t border-t-marketing-green-14";case t.MarketingTheme.MediumGreenCMS:case t.MarketingTheme.LightGreenCMS:return"border-t border-t-marketing-lightgreen-bg";case t.MarketingTheme.MintGreenCMS:case t.MarketingTheme.SeafoamCMS:return"border-t border-marketing-green-1";case t.MarketingTheme.LightGrayCMS:return"border-t border-t-marketing-gray-4"}(0,r.assertNever)(e)},"borderRightClassNameForTheme",0,e=>{switch(e){case t.MarketingTheme.DarkGreenCMS:return"border-r border-r-marketing-green-14";case t.MarketingTheme.MediumGreenCMS:case t.MarketingTheme.LightGreenCMS:return"border-r border-r-marketing-lightgreen-bg";case t.MarketingTheme.MintGreenCMS:case t.MarketingTheme.SeafoamCMS:return"border-r border-r-marketing-green-1";case t.MarketingTheme.LightGrayCMS:return"border-r border-r-marketing-gray-4"}(0,r.assertNever)(e)},"headerClassNameForTheme",0,e=>{switch(e){case t.MarketingTheme.DarkGreenCMS:return"text-marketing-mint-green";case t.MarketingTheme.MediumGreenCMS:return"text-marketing-green-21";case t.MarketingTheme.MintGreenCMS:case t.MarketingTheme.SeafoamCMS:return"text-marketing-green-1";case t.MarketingTheme.LightGreenCMS:case t.MarketingTheme.LightGrayCMS:return"text-marketing-mint-green-dark"}(0,r.assertNever)(e)},"linkClassNameForTheme",0,(e,i=!1)=>{switch(e){case t.MarketingTheme.DarkGreenCMS:return(0,n.cx)("text-white",!i&&"hover:text-marketing-mint-green");case t.MarketingTheme.MediumGreenCMS:case t.MarketingTheme.LightGreenCMS:return(0,n.cx)("text-marketing-green-2",!i&&"hover:text-marketing-mint-green-dark");case t.MarketingTheme.MintGreenCMS:return(0,n.cx)("text-marketing-green-1",!i&&"hover:text-marketing-green-1/70");case t.MarketingTheme.SeafoamCMS:case t.MarketingTheme.LightGrayCMS:return(0,n.cx)("text-marketing-green-1",!i&&"hover:text-marketing-mint-green-dark")}(0,r.assertNever)(e)},"linkExplicitHoverClassNameForTheme",0,e=>{switch(e){case t.MarketingTheme.DarkGreenCMS:return"!text-marketing-mint-green";case t.MarketingTheme.MediumGreenCMS:case t.MarketingTheme.LightGreenCMS:case t.MarketingTheme.MintGreenCMS:case t.MarketingTheme.SeafoamCMS:case t.MarketingTheme.LightGrayCMS:return"!text-marketing-mint-green-dark"}(0,r.assertNever)(e)},"linkHighlightClassNameForTheme",0,e=>{switch(e){case t.MarketingTheme.DarkGreenCMS:return"bg-marketing-mint-green";case t.MarketingTheme.MediumGreenCMS:case t.MarketingTheme.LightGreenCMS:case t.MarketingTheme.MintGreenCMS:case t.MarketingTheme.SeafoamCMS:case t.MarketingTheme.LightGrayCMS:return"bg-marketing-mint-green-dark"}(0,r.assertNever)(e)},"linkWithEmphasisClassNameForTheme",0,e=>{switch(e){case t.MarketingTheme.DarkGreenCMS:return"text-white hover:!text-marketing-mint-green group-hover/main-navbar:text-marketing-lightgreen-bg";case t.MarketingTheme.MediumGreenCMS:case t.MarketingTheme.LightGreenCMS:return"text-marketing-green-2 hover:!text-marketing-mint-green-dark group-hover/main-navbar:text-marketing-green-16";case t.MarketingTheme.MintGreenCMS:case t.MarketingTheme.SeafoamCMS:case t.MarketingTheme.LightGrayCMS:return"text-marketing-green-1 hover:!text-marketing-mint-green-dark group-hover/main-navbar:text-marketing-green-16"}(0,r.assertNever)(e)}
1,"mobileBackgroundForTheme",0,(e,o)=>{switch(e){case t.MarketingTheme.DarkGreenCMS:return(0,n.cx)(o?"bg-marketing-green-2":"bg-marketing-green-1",i.COLOR_DELAY_CLASSNAME);case t.MarketingTheme.MediumGreenCMS:return(0,n.cx)(o?"bg-marketing-green-20":"bg-marketing-green-19",i.COLOR_DELAY_CLASSNAME);case t.MarketingTheme.SeafoamCMS:case t.MarketingTheme.MintGreenCMS:return(0,n.cx)("bg-marketing-mintgreen-cms-bg",i.COLOR_DELAY_CLASSNAME);case t.MarketingTheme.LightGreenCMS:return(0,n.cx)(o?"bg-marketing-green-12":"bg-marketing-lightgreen-bg",i.COLOR_DELAY_CLASSNAME);case t.MarketingTheme.LightGrayCMS:return(0,n.cx)(o?"bg-marketing-gray-1":"bg-marketing-gray-2",i.COLOR_DELAY_CLASSNAME)}(0,r.assertNever)(e)},"textClassNameForTheme",0,e=>{switch(e){case t.MarketingTheme.DarkGreenCMS:return"text-marketing-green-17";case t.MarketingTheme.MediumGreenCMS:case t.MarketingTheme.LightGreenCMS:case t.MarketingTheme.SeafoamCMS:case t.MarketingTheme.MintGreenCMS:return"text-[#5E8679]";case t.MarketingTheme.LightGrayCMS:return"text-marketing-gray-3"}(0,r.assertNever)(e)},"themeToCMS",0,e=>{switch(e){case t.MarketingTheme.Black:case t.MarketingTheme.DarkGreen:case t.MarketingTheme.MediumGreen:case t.MarketingTheme.BlackCMS:case t.MarketingTheme.DarkGreenCMS:case t.MarketingTheme.NavyBlueCMS:case t.MarketingTheme.PurpleCMS:return t.MarketingTheme.DarkGreenCMS;case t.MarketingTheme.MediumGreenCMS:return t.MarketingTheme.MediumGreenCMS;case t.MarketingTheme.MintGreenCMS:case t.MarketingTheme.PersianFableGreenCMS:return t.MarketingTheme.MintGreenCMS;case t.MarketingTheme.SeafoamCMS:return t.MarketingTheme.SeafoamCMS;case t.MarketingTheme.LightGrayCMS:case t.MarketingTheme.LightGray:case t.MarketingTheme.Slate:return t.MarketingTheme.LightGrayCMS;case t.MarketingTheme.LightGreenCMS:case t.MarketingTheme.LightGreen:return t.MarketingTheme.LightGreenCMS;case t.MarketingTheme.VioletLightCMS:return t.MarketingTheme.MintGreenCMS}return(0,r.compileOnlyAssertNever)(e),t.MarketingTheme.DarkGreenCMS}],43888);var o=e.i(41598);let a=({color:e="currentColor",direction:t="left",distance:r="md",duration:n=.4,easing:i="cubic-bezier(0, 0, 0, 1)",hideOutline:a=!0,label:s,lines:u=3,onToggle:c,render:l,rounded:d=!1,size:f=32,toggle:h,toggled:g})=>{let[p,v]=(0,o.useState)(!1),m=Math.max(12,Math.min(48,f)),y=Math.round((48-m)/2),b=m/12,_=Math.round(b),w=m/(u*(("lg"===r?.25:"sm"===r?.75:.5)+(3===u?1:1.25))),k=Math.round(w),E=Math.round((48-(_*u+k*(u-1)))/2),S=(b-_+(w-k))/(3===u?1:2),T=parseFloat((m/(3===u?"lg"===r?4.0425:"sm"===r?5.1625:4.6325:"lg"===r?6.7875:"sm"===r?8.4875:7.6675)-S/(4/3)).toFixed(2)),x=Math.max(0,n),A={cursor:"pointer",height:"48px",position:"relative",transition:`${x}s ${i}`,userSelect:"none",width:"48px"},C={background:e,height:`${_}px`,left:`${y}px`,position:"absolute"};a&&(A.outline="none"),d&&(C.borderRadius="9em");let I=h||v,P=void 0!==g?g:p;return l({barHeight:_,barStyles:C,burgerStyles:A,easing:i,handler:()=>{I(!P),"function"==typeof c&&c(!P)},isLeft:"left"===t,isToggled:P,label:s,margin:k,move:T,time:x,topOffset:E,width:m})};function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}e.s(["Burger",0,a],38401),e.s(["Cross",0,e=>o.default.createElement(a,s({},e,{lines:2,render:e=>o.default.createElement("div",{className:"hamburger-react","aria-label":e.label,"aria-expanded":e.isToggled,onClick:e.handler,onKeyUp:t=>"Enter"===t.key&&e.handler(),role:"button",style:e.burgerStyles,tabIndex:0},o.default.createElement("div",{style:{...e.barStyles,width:`${e.width}px`,top:`${e.topOffset}px`,transition:`${e.time}s ${e.easing}`,transform:`${e.isToggled?`rotate(${45*(e.isLeft?-1:1)}deg) translate(${e.move*(e.isLeft?-1:1)}px, ${e.move}px)`:"none"}`}}),o.default.createElement("div",{style:{...e.barStyles,width:`${e.width}px`,top:`${e.topOffset+e.barHeight+e.margin}px`,transition:`${e.time}s ${e.easing}`,transform:`${e.isToggled?`rotate(${45*(e.isLeft?1:-1)}deg) translate(${e.move*(e.isLeft?-1:1)}px, ${-1*e.move}px)`:"none"}`}}))}))],63473)},2299,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0}),r.SlideDown=void 0;var n=e.r(25071),i=(0,n.__importStar)(e.r(41598)),o=function(e){function t(t){var r=e.call(this,t)||this;return r.outerRef=null,r.handleRef=function(e){if(r.outerRef=e,r.props.forwardedRef)if("function"==typeof r.props.forwardedRef)r.props.forwardedRef(e);else if("object"==typeof r.props.forwardedRef)r.props.forwardedRef.current=e;else throw Error("Invalid forwardedRef ".concat(r.props.forwardedRef))},r.handleTransitionEnd=function(e){e.target===r.outerRef&&"height"===e.propertyName&&(r.state.childrenLeaving?r.setState({children:null,childrenLeaving:!1},function(){return r.endTransition()}):r.endTransition())},r.state={children:t.children,childrenLeaving:!1},r}return(0,n.__extends)(t,e),t.prototype.componentDidMount=function(){this.outerRef&&(this.props.closed||!this.props.children?(this.outerRef.classList.add("closed"),this.outerRef.style.height="0px"):this.props.transitionOnAppear?this.startTransition("0px"):this.outerRef.style.height="auto")},t.prototype.getSnapshotBeforeUpdate=function(){return this.outerRef?this.outerRef.getBoundingClientRect().height+"px":null},t.getDerivedStateFromProps=function(e,t){return e.children?{children:e.children,childrenLeaving:!1}:t.children?{children:t.children,childrenLeaving:!0}:null},t.prototype.componentDidUpdate=function(e,t,r){this.outerRef&&this.startTransition(r)},t.prototype.startTransition=function(e){var t="0px";this.props.closed||this.state.childrenLeaving||!this.state.children||(this.outerRef.classList.remove("closed"),this.outerRef.style.height="auto",t=getComputedStyle(this.outerRef).height),parseFloat(t).toFixed(2)!==parseFloat(e).toFixed(2)&&(this.outerRef.classList.add("transitioning"),this.outerRef.style.height=e,this.outerRef.offsetHeight,this.outerRef.style.transitionProperty="height",this.outerRef.style.height=t)},t.prototype.endTransition=function(){this.outerRef.classList.remove("transitioning"),this.outerRef.style.transitionProperty="none",this.outerRef.style.height=this.props.closed?"0px":"auto",(this.props.closed||!this.state.children)&&this.outerRef.classList.add("closed")},t.prototype.render=function(){var e=this.props,t=e.as,r=(e.children,e.className),o=(e.closed,e.transitionOnAppear,e.forwardedRef,(0,n.__rest)(e,["as","children","className","closed","transitionOnAppear","forwardedRef"]));return i.default.createElement(void 0===t?"div":t,(0,n.__assign)({ref:this.handleRef,className:r?"react-slidedown "+r:"react-slidedown",onTransitionEnd:this.handleTransitionEnd},o),this.state.children)},t.defaultProps={transitionOnAppear:!0,closed:!1},t}(i.Component);r.SlideDown=(0,i.forwardRef)(function(e,t){return i.default.createElement(o,(0,n.__assign)({},e,{forwardedRef:t}))}),r.default=r.SlideDown},21809,e=>{"use strict";e.s(["GOOGLE_ANALYTICS_SITE_VERIFICATION_ID",0,"s3Im4_BFg3tdovxUlrUF-wBxOETUWT_cyCexivZtJCU","GOOGLE_SEARCH_CONSOLE_SITE_VERIFICATION_ID",0,"Yks_LI5bjwUJxsGfWkvR2QfhAf4QLGx3vWitNB32SgQ"])},25896,e=>{"use strict";var t=e.i(68796),r=e.i(90602);function n(e){return e.includes("chalk.dev")}function i(e){return e.includes("staging.chalk.ai")}function o(e){return e.includes("localhost")}e.s(["canonicalUrlIsChalkDev",0,n,"canonicalUrlIsChalkPreprod",0,i,"canonicalUrlIsLocal",0,o,"canonicalUrlIsProduction",0,function(e){return!n(e)&&!i(e)&&!o(e)},"urlIsRelative",0,function(e){return!e.startsWith("http")},"useCurrentCanonicalUrl",0,function(){let e=(0,r.useRouter)(),{CHALK_FRONTEND_HOST:n}=(0,t.useNextEnvVars)();return new URL(e.asPath,n||"https://chalk.ai").toString().replace("www.","")}])},64800,e=>{"use strict";var t=e.i(75713),r=e.i(41598);let n=r.default.createContext({theme:t.MarketingTheme.DarkGreen,customTitleColor:void 0});e.s(["MarketingThemeContext",0,n,"useMarketingTheme",0,()=>{let{theme:e,customTitleColor:i}=(0,r.useContext)(n),o=(0,t.colorsForTheme)(e);return{...o,title:i??o.title,header:i??o.header}}])},65142,(e,t,r)=>{t.exports=e.r(77620)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.