(function(){"use strict";var df=Object.defineProperty;var Ef=(J,V,X)=>V in J?df(J,V,{enumerable:!0,configurable:!0,writable:!0,value:X}):J[V]=X;var H=(J,V,X)=>(Ef(J,typeof V!="symbol"?V+"":V,X),X);const J="fvLogs",V="fvLog",X=e=>({queue:e?[e]:[],identify(...t){this.queue.push({type:"identify",payload:t})}});function ct(e,t,r){const n=r.value,o=function(...i){if(!(!self.localStorage||localStorage.getItem(V)!=="true"))return n.apply(this,i)};return r.value=o,r}var lt=globalThis&&globalThis.__decorate||function(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},q=globalThis&&globalThis.__metadata||function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};class _e{constructor(){self.localStorage&&localStorage.removeItem(J)}get logger(){return self.console}log(t,...r){this.logger.log(this.cookArea(t),...r)}warn(t,...r){this.logger.warn(this.cookArea(t),...r)}error(t,...r){this.logger.error(this.cookArea(t),...r)}clone(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this)}cookArea(t){return`[fv/${t}]`}}lt([ct,q("design:type",Function),q("design:paramtypes",[String,Object]),q("design:returntype",void 0)],_e.prototype,"log",null),lt([ct,q("design:type",Function),q("design:paramtypes",[String,Object]),q("design:returntype",void 0)],_e.prototype,"warn",null),lt([ct,q("design:type",Function),q("design:paramtypes",[String,Object]),q("design:returntype",void 0)],_e.prototype,"error",null);var C={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},N=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];Object.prototype.hasOwnProperty.call(C,e)||(e=C.log),N[e].apply(N,t)};N.debug=console.debug.bind(console),N.log=console.log.bind(console),N.info=console.info.bind(console),N.warn=console.warn.bind(console),N.error=console.error.bind(console);var fi=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))},Be,cr=!1;function di(e){Be=e}function Ei(e){cr=e}function hi(e,t,r){var n=r.value;r.value=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var s=Be?O(n):n;return s.apply(this,o)}}function O(e){return function(){return Q(e,this,arguments)}}function Q(e,t,r){try{return e.apply(t,r)}catch(n){if(ft(C.error,n),Be)try{Be(n)}catch(o){ft(C.error,o)}}}function ft(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];cr&&N.apply(void 0,fi([e,"[MONITOR]"],t,!1))}var se=1e3,ae=60*se,vi=60*ae,Ne=1024,lr=1024*Ne;function pi(e,t,r){var n=r&&r.leading!==void 0?r.leading:!0,o=r&&r.trailing!==void 0?r.trailing:!0,i=!1,s,a;return{throttled:function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];if(i){s=u;return}n?e.apply(void 0,u):s=u,i=!0,a=setTimeout(function(){o&&s&&e.apply(void 0,s),i=!1,s=void 0},t)},cancel:function(){clearTimeout(a),i=!1,s=void 0}}}function U(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.forEach(function(n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}),e}function gi(e){return U({},e)}function ue(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,ue)}function fr(e){return e!==0&&Math.random()*100<=e}function we(){}function je(e,t,r){if(typeof e!="object"||e===null)return JSON.stringify(e);var n=Ge(Object.prototype),o=Ge(Array.prototype),i=Ge(Object.getPrototypeOf(e)),s=Ge(e);try{return JSON.stringify(e,t,r)}catch{return"<error: unable to serialize object>"}finally{n(),o(),i(),s()}}function Ge(e){var t=e,r=t.toJSON;return r?(delete t.toJSON,function(){t.toJSON=r}):we}function ce(e,t){return e.indexOf(t)!==-1}function dr(e){if(Array.from)return Array.from(e);var t=[];if(e instanceof Set)e.forEach(function(n){return t.push(n)});else for(var r=0;r<e.length;r++)t.push(e[r]);return t}function mi(e,t){for(var r=0;r<e.length;r+=1){var n=e[r];if(t(n,r))return n}}function Er(e){return Si(e)&&e>=0&&e<=100}function Si(e){return typeof e=="number"}function Te(e){return Object.keys(e).map(function(t){return e[t]})}function Oi(e){return Object.keys(e).map(function(t){return[t,e[t]]})}function bi(e){return Object.keys(e).length===0}function hr(e,t){return e.slice(0,t.length)===t}function Ii(e,t){return e.slice(-t.length)===t}function dt(){if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var e=_dd_temp_;return delete Object.prototype._dd_temp_,typeof e!="object"&&(typeof self=="object"?e=self:typeof window=="object"?e=window:e={}),e}function Ri(){return _i(window.location)}function _i(e){if(e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return"".concat(e.protocol,"//").concat(t)}function Ni(e,t){var r=new RegExp("(?:^|;)\\s*".concat(t,"\\s*=\\s*([^;]+)")),n=r.exec(e);return n?n[1]:void 0}function wi(e,t,r){r===void 0&&(r="");var n=e.charCodeAt(t-1),o=n>=55296&&n<=56319,i=o?t+1:t;return e.length<=i?e:"".concat(e.slice(0,i)).concat(r)}function Ae(e,t,r,n){return vr(e,[t],r,n)}function vr(e,t,r,n){var o=n===void 0?{}:n,i=o.once,s=o.capture,a=o.passive,u=O(i?function(c){f(),r(c)}:r),d=a?{capture:s,passive:a}:s;t.forEach(function(c){return e.addEventListener(c,u,d)});var f=function(){return t.forEach(function(c){return e.removeEventListener(c,u,d)})};return{stop:f}}function Ti(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function Ai(){if(typeof WeakSet<"u"){var e=new WeakSet;return{hasAlreadyBeenSeen:function(r){var n=e.has(r);return n||e.add(r),n}}}var t=[];return{hasAlreadyBeenSeen:function(r){var n=t.indexOf(r)>=0;return n||t.push(r),n}}}function He(e,t,r){if(r===void 0&&(r=Ai()),t===void 0)return e;if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){var n=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,n)}if(!r.hasAlreadyBeenSeen(t)){if(Array.isArray(t)){for(var o=Array.isArray(e)?e:[],i=0;i<t.length;++i)o[i]=He(o[i],t[i],r);return o}var s=Ti(e)==="object"?e:{};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(s[a]=He(s[a],t[a],r));return s}}function le(e){return He(void 0,e)}function Ve(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r,n=0,o=e;n<o.length;n++){var i=o[n];i!=null&&(r=He(r,i))}return r}function Ci(e){var t=new Set;return e.forEach(function(r){return t.add(r)}),dr(t)}var pr=se;function Ce(e,t,r,n){var o=new Date;o.setTime(o.getTime()+r);var i="expires=".concat(o.toUTCString()),s=n&&n.crossSite?"none":"strict",a=n&&n.domain?";domain=".concat(n.domain):"",u=n&&n.secure?";secure":"";document.cookie="".concat(e,"=").concat(t,";").concat(i,";path=/;samesite=").concat(s).concat(a).concat(u)}function B(e){return Ni(document.cookie,e)}function gr(e,t){Ce(e,"",0,t)}function yi(e){if(document.cookie===void 0||document.cookie===null)return!1;try{var t="dd_cookie_test_".concat(ue()),r="test";Ce(t,r,se,e);var n=B(t)===r;return gr(t,e),n}catch(o){return N.error(o),!1}}var Et;function Li(){if(Et===void 0){for(var e="dd_site_test_".concat(ue()),t="test",r=window.location.hostname.split("."),n=r.pop();r.length&&!B(e);)n="".concat(r.pop(),".").concat(n),Ce(e,t,se,{domain:n});gr(e,{domain:n}),Et=n}return Et}function mr(e,t){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{return e.apply(void 0,r)}catch(o){N.error(t,o)}}}var fe;function Di(e){!Array.isArray(e)||(fe||(fe=new Set(e)),e.filter(function(t){return typeof t=="string"}).forEach(function(t){ce(t,"-")&&N.warn("please use snake case for '".concat(t,"'")),fe.add(t)}))}function Sr(e){return!!fe&&fe.has(e)}function Pi(){return fe||new Set}function de(){return new Date().getTime()}function Y(){return de()}function ye(){return performance.now()}function Le(){return{relative:ye(),timeStamp:Y()}}function Ui(){return{relative:0,timeStamp:br()}}function Or(e,t){return t-e}function xi(e){return e-br()}var ht;function br(){return ht===void 0&&(ht=performance.timing.navigationStart),ht}var Z;function ki(e,t,r){e&&t&&r&&(Z={start:new Date(e).getTime(),end:new Date(t).getTime(),label:r})}function qe(){var e=de();return Z!==void 0&&e>=Z.start&&e<=Z.end}function Ir(){return Z==null?void 0:Z.label}function vt(e){return Fi(e,Ri()).href}function Fi(e,t){if(Mi())return t!==void 0?new URL(e,t):new URL(e);if(t===void 0&&!/:/.test(e))throw new Error("Invalid URL: '".concat(e,"'"));var r=document,n=r.createElement("a");if(t!==void 0){r=document.implementation.createHTMLDocument("");var o=r.createElement("base");o.href=t,r.head.appendChild(o),r.body.appendChild(n)}return n.href=e,n}var Ee;function Mi(){if(Ee!==void 0)return Ee;try{var e=new URL("http://test/path");return Ee=e.href==="http://test/path",Ee}catch{Ee=!1}return Ee}var $i="datad0g.com",pt="datadoghq.com",Bi="ddog-gov.com",ji={logs:"logs",rum:"rum",sessionReplay:"session-replay"},Gi={logs:"logs",rum:"rum",sessionReplay:"replay"};function De(e,t,r){var n=e.site,o=n===void 0?pt:n,i=e.clientToken,s=o.split("."),a=s.pop(),u="".concat(ji[t],".browser-intake-").concat(s.join("-"),".").concat(a),d="https://".concat(u,"/api/v2/").concat(Gi[t]),f=e.proxyUrl&&vt(e.proxyUrl);return{build:function(){var c="ddsource=browser"+"&ddtags=".concat(encodeURIComponent(["sdk_version:".concat("4.21.2")].concat(r).join(",")))+"&dd-api-key=".concat(i)+"&dd-evp-origin-version=".concat(encodeURIComponent("4.21.2"))+"&dd-evp-origin=browser"+"&dd-request-id=".concat(ue());t==="rum"&&(c+="&batch_time=".concat(Y()));var E="".concat(d,"?").concat(c);return f?"".concat(f,"?ddforward=").concat(encodeURIComponent(E)):E},buildIntakeUrl:function(){return f?"".concat(f,"?ddforward"):d},endpointType:t}}var Hi=200;function Vi(e){var t=e.env,r=e.service,n=e.version,o=e.datacenter,i=[];return t&&i.push(Ye("env",t)),r&&i.push(Ye("service",r)),n&&i.push(Ye("version",n)),o&&i.push(Ye("datacenter",o)),i}var qi=/[^a-z0-9_:./-]/;function Ye(e,t){var r=Hi-e.length-1;(t.length>r||qi.test(t))&&N.warn("".concat(e," value doesn't meet tag requirements and will be sanitized"));var n=t.replace(/,/g,"_");return"".concat(e,":").concat(n)}function Yi(e){var t=Vi(e),r=Xi(e,t),n=Te(r).map(function(i){return i.buildIntakeUrl()}),o=Wi(e,n,t);return U({isIntakeUrl:function(i){return n.some(function(s){return i.indexOf(s)===0})},replica:o,site:e.site||pt},r)}function Xi(e,t){return{logsEndpointBuilder:De(e,"logs",t),rumEndpointBuilder:De(e,"rum",t),sessionReplayEndpointBuilder:De(e,"sessionReplay",t)}}function Wi(e,t,r){if(!!e.replica){var n=U({},e,{site:pt,clientToken:e.replica.clientToken}),o={logsEndpointBuilder:De(n,"logs",r),rumEndpointBuilder:De(n,"rum",r)};return t.push.apply(t,Te(o).map(function(i){return i.buildIntakeUrl()})),U({applicationId:e.replica.applicationId},o)}}function Ki(e){var t,r;if(!e||!e.clientToken){N.error("Client Token is not configured, we will not send any data.");return}if(e.sampleRate!==void 0&&!Er(e.sampleRate)){N.error("Sample Rate should be a number between 0 and 100");return}if(e.telemetrySampleRate!==void 0&&!Er(e.telemetrySampleRate)){N.error("Telemetry Sample Rate should be a number between 0 and 100");return}return Di(e.enableExperimentalFeatures),ki(e.simulationStart,e.simulationEnd,e.simulationLabel),U({beforeSend:e.beforeSend&&mr(e.beforeSend,"beforeSend threw an error:"),cookieOptions:zi(e),sampleRate:(t=e.sampleRate)!==null&&t!==void 0?t:100,telemetrySampleRate:(r=e.telemetrySampleRate)!==null&&r!==void 0?r:20,service:e.service,silentMultipleInit:!!e.silentMultipleInit,batchBytesLimit:16*Ne,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*se,batchMessagesLimit:50,messageBytesLimit:256*Ne},Yi(e))}function zi(e){var t={};return t.secure=Ji(e),t.crossSite=!!e.useCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=Li()),t}function Ji(e){return!!e.useSecureSessionCookie||!!e.useCrossSiteSessionCookie}var Pe="?";function W(e){var t=[],r=gt(e,"stack"),n=String(e);return r&&hr(r,n)&&(r=r.slice(n.length)),r&&r.split(`
`).forEach(function(o){var i=es(o)||rs(o)||os(o)||as(o);i&&(!i.func&&i.line&&(i.func=Pe),t.push(i))}),{message:gt(e,"message"),name:gt(e,"name"),stack:t}}var Rr="((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\w+\\.|\\/).*?)",he="(?::(\\d+))",Qi=new RegExp("^\\s*at (.*?) ?\\(".concat(Rr).concat(he,"?").concat(he,"?\\)?\\s*$"),"i"),Zi=new RegExp("\\((\\S*)".concat(he).concat(he,"\\)"));function es(e){var t=Qi.exec(e);if(!!t){var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,o=Zi.exec(t[2]);return n&&o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{args:r?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||Pe,line:t[3]?+t[3]:void 0,url:r?void 0:t[2]}}}var ts=new RegExp("^\\s*at ?".concat(Rr).concat(he,"?").concat(he,"??\\s*$"),"i");function rs(e){var t=ts.exec(e);if(!!t)return{args:[],column:t[3]?+t[3]:void 0,func:Pe,line:t[2]?+t[2]:void 0,url:t[1]}}var ns=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function os(e){var t=ns.exec(e);if(!!t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Pe,line:+t[3],url:t[2]}}var is=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,ss=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function as(e){var t=is.exec(e);if(!!t){var r=t[3]&&t[3].indexOf(" > eval")>-1,n=ss.exec(t[3]);return r&&n&&(t[3]=n[1],t[4]=n[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||Pe,line:t[4]?+t[4]:void 0,url:t[3]}}}function gt(e,t){if(!(typeof e!="object"||!e||!(t in e))){var r=e[t];return typeof r=="string"?r:void 0}}function _r(e,t,r){var n=e[t],o=r(n),i=function(){if(typeof o=="function")return o.apply(this,arguments)};return e[t]=i,{stop:function(){e[t]===i?e[t]=n:o=n}}}function ve(e,t,r){var n=r.before,o=r.after;return _r(e,t,function(i){return function(){var s=arguments,a;return n&&Q(n,this,s),typeof i=="function"&&(a=i.apply(this,s)),o&&Q(o,this,s),a}})}var us=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function cs(e){var t=ls(e).stop,r=fs(e).stop;return{stop:function(){t(),r()}}}function ls(e){return ve(window,"onerror",{before:function(t,r,n,o,i){var s;if(i)s=W(i),e(s,i);else{var a={url:r,column:o,line:n},u,d=t;if({}.toString.call(t)==="[object String]"){var f=us.exec(d);f&&(u=f[1],d=f[2])}s={name:u,message:typeof d=="string"?d:void 0,stack:[a]},e(s,t)}}})}function fs(e){return ve(window,"onunhandledrejection",{before:function(t){var r=t.reason||"Empty reason",n=W(r);e(n,r)}})}var T={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function ds(e){var t=e.stackTrace,r=e.originalError,n=e.handlingStack,o=e.startClocks,i=e.nonErrorPrefix,s=e.source,a=e.handling;return!t||t.message===void 0&&!(r instanceof Error)?{startClocks:o,source:s,handling:a,originalError:r,message:"".concat(i," ").concat(je(r)),stack:"No stack, consider using an instance of Error",handlingStack:n,type:t&&t.name}:{startClocks:o,source:s,handling:a,originalError:r,message:t.message||"Empty message",stack:ee(t),handlingStack:n,type:t.name,causes:vs(r,s)}}function ee(e){var t=Nr(e);return e.stack.forEach(function(r){var n=r.func==="?"?"<anonymous>":r.func,o=r.args&&r.args.length>0?"(".concat(r.args.join(", "),")"):"",i=r.line?":".concat(r.line):"",s=r.line&&r.column?":".concat(r.column):"";t+=`
  at `.concat(n).concat(o," @ ").concat(r.url).concat(i).concat(s)}),t}function Es(e){var t;return(t=/@ (.+)/.exec(e))===null||t===void 0?void 0:t[1]}function Nr(e){return"".concat(e.name||"Error",": ").concat(e.message)}function hs(){var e=2,t=new Error,r;if(!t.stack)try{throw t}catch{}return Q(function(){var n=W(t);n.stack=n.stack.slice(e),r=ee(n)}),r}function vs(e,t){for(var r=e,n=[];(r==null?void 0:r.cause)instanceof Error&&n.length<10;){var o=W(r.cause);n.push({message:r.cause.message,source:t,type:o==null?void 0:o.name,stack:o&&ee(o)}),r=r.cause}return n.length?n:void 0}function ps(e){return cs(function(t,r){e.notify(ds({stackTrace:t,originalError:r,startClocks:Le(),nonErrorPrefix:"Uncaught",source:T.SOURCE,handling:"unhandled"}))})}function gs(e){var t=U({version:"4.21.2",onReady:function(r){r()}},e);return Object.defineProperty(t,"_setDebug",{get:function(){return Ei},enumerable:!1}),t}function ms(e,t,r){var n=e[t];e[t]=r,n&&n.q&&n.q.forEach(function(o){return mr(o,"onReady callback threw an error:")()})}var j=function(){function e(t){this.onFirstSubscribe=t,this.observers=[]}return e.prototype.subscribe=function(t){var r=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(t),{unsubscribe:function(){r.observers=r.observers.filter(function(n){return t!==n}),!r.observers.length&&r.onLastUnsubscribe&&r.onLastUnsubscribe()}}},e.prototype.notify=function(t){this.observers.forEach(function(r){return r(t)})},e}();function wr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=new j(function(){var n=e.map(function(o){return o.subscribe(function(i){return r.notify(i)})});return function(){return n.forEach(function(o){return o.unsubscribe()})}});return r}var K={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function Ss(e){var t=[];ce(e,K.cspViolation)&&t.push(bs());var r=e.filter(function(n){return n!==K.cspViolation});return r.length&&t.push(Os(r)),wr.apply(void 0,t)}function Os(e){var t=new j(function(){if(!!window.ReportingObserver){var r=O(function(o){return o.forEach(function(i){t.notify(Is(i))})}),n=new window.ReportingObserver(r,{types:e,buffered:!0});return n.observe(),function(){n.disconnect()}}});return t}function bs(){var e=new j(function(){var t=O(function(n){e.notify(Rs(n))}),r=Ae(document,"securitypolicyviolation",t).stop;return r});return e}function Is(e){var t=e.type,r=e.body;return{type:t,subtype:r.id,message:"".concat(t,": ").concat(r.message),stack:Tr(r.id,r.message,r.sourceFile,r.lineNumber,r.columnNumber)}}function Rs(e){var t=K.cspViolation,r="'".concat(e.blockedURI,"' blocked by '").concat(e.effectiveDirective,"' directive");return{type:K.cspViolation,subtype:e.effectiveDirective,message:"".concat(t,": ").concat(r),stack:Tr(e.effectiveDirective,e.originalPolicy?"".concat(r,' of the policy "').concat(wi(e.originalPolicy,100,"..."),'"'):"no policy",e.sourceFile,e.lineNumber,e.columnNumber)}}function Tr(e,t,r,n,o){return r&&ee({name:e,message:t,stack:[{func:"?",url:r,line:n,column:o}]})}var _s=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","http://localhost","<anonymous>"],Ns=[Bi],pe={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1},mt;function ws(e){var t,r=new j;pe.telemetryEnabled=fr(e.telemetrySampleRate),mt=function(o){!ce(Ns,e.site)&&pe.telemetryEnabled&&r.notify(n(o))},di(Cr),U(pe,{maxEventsPerPage:e.maxTelemetryEventsPerPage,sentEventCount:0});function n(o){return Ve({type:"telemetry",date:Y(),service:"browser-sdk",version:"4.21.2",source:"browser",_dd:{format_version:2},telemetry:o,experimental_features:dr(Pi())},t!==void 0?t():{},qe()?{telemetry:{simulation_label:Ir()}}:{})}return{setContextProvider:function(o){t=o},observable:r}}function Ts(e){return e.site===$i}function Ar(e,t){ft(C.debug,e,t),yr(U({message:e,status:"debug"},t))}function Cr(e){yr(U({status:"error"},As(e)))}function yr(e){mt&&pe.sentEventCount<pe.maxEventsPerPage&&(pe.sentEventCount+=1,mt(e))}function As(e){if(e instanceof Error){var t=W(e);return{error:{kind:t.name,stack:ee(Cs(t))},message:t.message}}return{error:{stack:"Not an instance of error"},message:"Uncaught ".concat(je(e))}}function Cs(e){return e.stack=e.stack.filter(function(t){return!t.url||_s.some(function(r){return hr(t.url,r)})}),e}var Xe=1/0,ys=ae,Ls=function(){function e(t){var r=this;this.expireDelay=t,this.entries=[],this.clearOldContextsInterval=setInterval(function(){return r.clearOldContexts()},ys)}return e.prototype.add=function(t,r){var n=this,o={context:t,startTime:r,endTime:Xe,remove:function(){var i=n.entries.indexOf(o);i>=0&&n.entries.splice(i,1)},close:function(i){o.endTime=i}};return this.entries.unshift(o),o},e.prototype.find=function(t){t===void 0&&(t=Xe);for(var r=0,n=this.entries;r<n.length;r++){var o=n[r];if(o.startTime<=t){if(t<=o.endTime)return o.context;break}}},e.prototype.closeActive=function(t){var r=this.entries[0];r&&r.endTime===Xe&&r.close(t)},e.prototype.findAll=function(t){return t===void 0&&(t=Xe),this.entries.filter(function(r){return r.startTime<=t&&t<=r.endTime}).map(function(r){return r.context})},e.prototype.reset=function(){this.entries=[]},e.prototype.stop=function(){clearInterval(this.clearOldContextsInterval)},e.prototype.clearOldContexts=function(){for(var t=ye()-this.expireDelay;this.entries.length>0&&this.entries[this.entries.length-1].endTime<t;)this.entries.pop()},e}();function Ds(){return!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent)}var Lr=4*vi,Dr=15*ae,Pr=/^([a-z]+)=([a-z0-9-]+)$/,St="&",We="_dd_s",Ps=10,Us=100,Ur=[],Ke;function Ue(e,t){var r;if(t===void 0&&(t=0),Ke||(Ke=e),e!==Ke){Ur.push(e);return}if(t>=Us){xr();return}var n,o=xe();if(Ot()){if(o.lock){ze(e,t);return}if(n=ue(),o.lock=n,bt(o,e.options),o=xe(),o.lock!==n){ze(e,t);return}}var i=e.process(o);if(Ot()&&(o=xe(),o.lock!==n)){ze(e,t);return}if(i&&kr(i,e.options),Ot()&&!(i&&Fr(i))){if(o=xe(),o.lock!==n){ze(e,t);return}delete o.lock,bt(o,e.options),i=o}(r=e.after)===null||r===void 0||r.call(e,i||o),xr()}function Ot(){return Ds()}function ze(e,t){setTimeout(O(function(){Ue(e,t+1)}),Ps)}function xr(){Ke=void 0;var e=Ur.shift();e&&Ue(e)}function kr(e,t){if(Fr(e)){Fs(t);return}e.expire=String(de()+Dr),bt(e,t)}function bt(e,t){Ce(We,xs(e),Dr,t)}function xs(e){return Oi(e).map(function(t){var r=t[0],n=t[1];return"".concat(r,"=").concat(n)}).join(St)}function xe(){var e=B(We),t={};return ks(e)&&e.split(St).forEach(function(r){var n=Pr.exec(r);if(n!==null){var o=n[1],i=n[2];t[o]=i}}),t}function ks(e){return e!==void 0&&(e.indexOf(St)!==-1||Pr.test(e))}function Fr(e){return bi(e)}function Fs(e){Ce(We,"",0,e)}var Ms="_dd",$s="_dd_r",Bs="_dd_l",js="rum",Gs="logs";function Hs(e){var t=B(We),r=B(Ms),n=B($s),o=B(Bs);if(!t){var i={};r&&(i.id=r),o&&/^[01]$/.test(o)&&(i[Gs]=o),n&&/^[012]$/.test(n)&&(i[js]=n),kr(i,e)}}function Vs(e,t,r){var n=new j,o=new j,i=setInterval(O(d),pr),s=m();function a(){var g;Ue({options:e,process:function(b){var p=f(b);return g=c(p),p},after:function(b){g&&!E()&&I(b),s=b}})}function u(){Ue({options:e,process:function(g){return E()?f(g):void 0}})}function d(){Ue({options:e,process:function(g){return _(g)?void 0:{}},after:f})}function f(g){return _(g)||(g={}),E()&&(v(g)?S():s=g),g}function c(g){var b=r(g[t]),p=b.trackingType,P=b.isTracked;return g[t]=p,P&&!g.id&&(g.id=ue(),g.created=String(de())),P}function E(){return s[t]!==void 0}function v(g){return s.id!==g.id||s[t]!==g[t]}function S(){s={},o.notify()}function I(g){s=g,n.notify()}function m(){var g=xe();return _(g)?g:{}}function _(g){return(g.created===void 0||de()-Number(g.created)<Lr)&&(g.expire===void 0||de()<Number(g.expire))}return{expandOrRenewSession:pi(O(a),pr).throttled,expandSession:u,getSession:function(){return s},renewObservable:n,expireObservable:o,stop:function(){clearInterval(i)}}}var qs=ae,Ys=Lr;function Xs(e,t,r){Hs(e);var n=Vs(e,t,r),o=new Ls(Ys);n.renewObservable.subscribe(function(){o.add(i(),ye())}),n.expireObservable.subscribe(function(){o.closeActive(ye())}),n.expandOrRenewSession(),o.add(i(),Ui().relative),Ws(function(){return n.expandOrRenewSession()}),Ks(function(){return n.expandSession()});function i(){return{id:n.getSession().id,trackingType:n.getSession()[t]}}return{findActiveSession:function(s){return o.find(s)},renewObservable:n.renewObservable,expireObservable:n.expireObservable}}function Ws(e){vr(window,["click","touchstart","keydown","scroll"],e,{capture:!0,passive:!0}).stop}function Ks(e){var t=O(function(){document.visibilityState==="visible"&&e()});Ae(document,"visibilitychange",t).stop,setInterval(t,qs)}var zs=80*Ne,Js=32,Mr=3*lr,Qs=ae,$r=se;function Br(e,t,r,n,o,i){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?Gr(e,t,r,o,{onSuccess:function(){return Hr(0,t,r,n,o,i)},onFailure:function(){t.queuedPayloads.enqueue(e),jr(t,r,n,o,i)}}):t.queuedPayloads.enqueue(e)}function jr(e,t,r,n,o){e.transportStatus===2&&setTimeout(O(function(){var i=e.queuedPayloads.first();Gr(i,e,t,n,{onSuccess:function(){e.queuedPayloads.dequeue(),e.lastFailureStatus!==0&&Ar("resuming after transport down",{failureStatus:e.lastFailureStatus}),e.currentBackoffTime=$r,Hr(1,e,t,r,n,o)},onFailure:function(){e.currentBackoffTime=Math.min(Qs,e.currentBackoffTime*2),jr(e,t,r,n,o)}})}),e.currentBackoffTime)}function Gr(e,t,r,n,o){var i=o.onSuccess,s=o.onFailure;if(qe()&&n){t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,t.lastFailureStatus=555,s();return}t.bandwidthMonitor.add(e),r(e,function(a){t.bandwidthMonitor.remove(e),Zs(a)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,t.lastFailureStatus=a.status,s()):(t.transportStatus=0,i())})}function Hr(e,t,r,n,o,i){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i({message:"Reached max ".concat(n," events size queued for upload: ").concat(Mr/lr,"MiB"),source:T.AGENT,startClocks:Le()}),t.queueFullReported=!0);var s=t.queuedPayloads;for(t.queuedPayloads=Vr();s.size()>0;)Br(s.dequeue(),t,r,n,o,i)}function Zs(e){return e.status===0||e.status===408||e.status===429||e.status>=500}function ea(){return{transportStatus:0,lastFailureStatus:0,currentBackoffTime:$r,bandwidthMonitor:ta(),queuedPayloads:Vr(),queueFullReported:!1}}function Vr(){var e=[];return{bytesCount:0,enqueue:function(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first:function(){return e[0]},dequeue:function(){var t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size:function(){return e.length},isFull:function(){return this.bytesCount>=Mr}}}function ta(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=zs&&this.ongoingRequestCount<Js},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}}}function ra(e,t,r,n){var o=ea(),i=function(s,a){return Yr(e,t,s,a)};return{send:function(s){Sr("retry")?Br(s,o,i,e.endpointType,n,r):Yr(e,t,s)},sendOnExit:function(s){Sr("retry")&&e.endpointType!=="sessionReplay"&&n&&qe()||na(e,t,s)}}}function na(e,t,r){var n=r.data,o=r.bytesCount,i=e.build(),s=!!navigator.sendBeacon&&o<t;if(s)try{var a=navigator.sendBeacon(i,n);if(a)return}catch(u){oa(u)}It(i,n)}var qr=!1;function oa(e){qr||(qr=!0,Cr(e))}function Yr(e,t,r,n){var o=r.data,i=r.bytesCount,s=e.build(),a=ia()&&i<t;a?fetch(s,{method:"POST",body:o,keepalive:!0}).then(O(function(u){return n==null?void 0:n({status:u.status})}),O(function(){It(s,o,n)})):It(s,o,n)}function ia(){try{return window.Request&&"keepalive"in new Request("http://a")}catch{return!1}}function It(e,t,r){var n=new XMLHttpRequest;n.open("POST",e,!0),n.send(t),n.addEventListener("loadend",O(function(){r==null||r({status:n.status})}))}var sa=/[^\u0000-\u007F]/,aa=function(){function e(t,r,n,o,i,s){s===void 0&&(s=we),this.request=t,this.batchMessagesLimit=r,this.batchBytesLimit=n,this.messageBytesLimit=o,this.flushTimeout=i,this.beforeUnloadCallback=s,this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesCount=0,this.bufferMessagesCount=0,this.setupFlushOnExit(),this.flushPeriodically()}return e.prototype.add=function(t){this.addOrUpdate(t)},e.prototype.upsert=function(t,r){this.addOrUpdate(t,r)},e.prototype.flush=function(t){if(t===void 0&&(t=this.request.send),this.bufferMessagesCount!==0){var r=this.pushOnlyBuffer.concat(Te(this.upsertBuffer)),n=this.bufferBytesCount;this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesCount=0,this.bufferMessagesCount=0,t({data:r.join(`
`),bytesCount:n})}},e.prototype.flushOnExit=function(){this.flush(this.request.sendOnExit)},e.prototype.computeBytesCount=function(t){return sa.test(t)?window.TextEncoder!==void 0?new TextEncoder().encode(t).length:new Blob([t]).size:t.length},e.prototype.addOrUpdate=function(t,r){var n=this.process(t),o=n.processedMessage,i=n.messageBytesCount;if(i>=this.messageBytesLimit){N.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB."));return}this.hasMessageFor(r)&&this.remove(r),this.willReachedBytesLimitWith(i)&&this.flush(),this.push(o,i,r),this.isFull()&&this.flush()},e.prototype.process=function(t){var r=je(t),n=this.computeBytesCount(r);return{processedMessage:r,messageBytesCount:n}},e.prototype.push=function(t,r,n){this.bufferMessagesCount>0&&(this.bufferBytesCount+=1),n!==void 0?this.upsertBuffer[n]=t:this.pushOnlyBuffer.push(t),this.bufferBytesCount+=r,this.bufferMessagesCount+=1},e.prototype.remove=function(t){var r=this.upsertBuffer[t];delete this.upsertBuffer[t];var n=this.computeBytesCount(r);this.bufferBytesCount-=n,this.bufferMessagesCount-=1,this.bufferMessagesCount>0&&(this.bufferBytesCount-=1)},e.prototype.hasMessageFor=function(t){return t!==void 0&&this.upsertBuffer[t]!==void 0},e.prototype.willReachedBytesLimitWith=function(t){return this.bufferBytesCount+t+1>=this.batchBytesLimit},e.prototype.isFull=function(){return this.bufferMessagesCount===this.batchMessagesLimit||this.bufferBytesCount>=this.batchBytesLimit},e.prototype.flushPeriodically=function(){var t=this;setTimeout(O(function(){t.flush(),t.flushPeriodically()}),this.flushTimeout)},e.prototype.setupFlushOnExit=function(){var t=this;navigator.sendBeacon&&(Ae(window,"beforeunload",this.beforeUnloadCallback),Ae(document,"visibilitychange",function(){document.visibilityState==="hidden"&&t.flushOnExit()}),Ae(window,"beforeunload",function(){return t.flushOnExit()}))},e}();function Rt(){var e=ua();if(!!e)return{getAllowedWebViewHosts:function(){return JSON.parse(e.getAllowedWebViewHosts())},send:function(t,r){e.send(JSON.stringify({eventType:t,event:r}))}}}function Je(e){var t;e===void 0&&(e=(t=dt().location)===null||t===void 0?void 0:t.hostname);var r=Rt();return!!r&&r.getAllowedWebViewHosts().some(function(n){return e===n||Ii(e,".".concat(n))})}function ua(){return dt().DatadogEventBridge}function Xr(e,t,r,n){var o=s(t,!0),i;n&&(i=s(n,!1));function s(a,u){return new aa(ra(a,e.batchBytesLimit,r,u),e.batchMessagesLimit,e.batchBytesLimit,e.messageBytesLimit,e.flushTimeout)}return{add:function(a,u){u===void 0&&(u=!0),o.add(a),i&&u&&i.add(a)}}}function ca(e,t,r){var n=0,o=!1;return{isLimitReached:function(){if(n===0&&setTimeout(function(){n=0},ae),n+=1,n<=t||o)return o=!1,!1;if(n===t+1){o=!0;try{r({message:"Reached max number of ".concat(e,"s by minute: ").concat(t),source:T.AGENT,startClocks:Le()})}finally{o=!1}}return!0}}}var _t,Nt=new WeakMap;function la(){return _t||(_t=fa()),_t}function fa(){var e=new j(function(){var t=ve(XMLHttpRequest.prototype,"open",{before:da}).stop,r=ve(XMLHttpRequest.prototype,"send",{before:function(){Ea.call(this,e)}}).stop,n=ve(XMLHttpRequest.prototype,"abort",{before:ha}).stop;return function(){t(),r(),n()}});return e}function da(e,t){Nt.set(this,{state:"open",method:e,url:vt(String(t))})}function Ea(e){var t=this,r=Nt.get(this);if(!!r){var n=r;n.state="start",n.startTime=ye(),n.startClocks=Le(),n.isAborted=!1,n.xhr=this;var o=!1,i=ve(this,"onreadystatechange",{before:function(){this.readyState===XMLHttpRequest.DONE&&s()}}).stop,s=O(function(){if(t.removeEventListener("loadend",s),i(),!o){o=!0;var a=r;a.state="complete",a.duration=Or(n.startClocks.timeStamp,Y()),a.status=t.status,e.notify(gi(a))}});this.addEventListener("loadend",s),e.notify(n)}}function ha(){var e=Nt.get(this);e&&(e.isAborted=!0)}var wt;function va(){return wt||(wt=pa()),wt}function pa(){var e=new j(function(){if(!!window.fetch){var t=_r(window,"fetch",function(r){return function(n,o){var i,s=Q(ga,null,[e,n,o]);return s?(i=r.call(this,s.input,s.init),Q(ma,null,[e,i,s])):i=r.call(this,n,o),i}}).stop;return t}});return e}function ga(e,t,r){var n=r&&r.method||typeof t=="object"&&t.method||"GET",o=vt(typeof t=="object"&&t.url||t),i=Le(),s={state:"start",init:r,input:t,method:n,startClocks:i,url:o};return e.notify(s),s}function ma(e,t,r){var n=function(o){var i=r;i.state="complete",i.duration=Or(i.startClocks.timeStamp,Y()),"stack"in o||o instanceof Error?(i.status=0,i.isAborted=o instanceof DOMException&&o.code===DOMException.ABORT_ERR,i.error=o,e.notify(i)):"status"in o&&(i.response=o,i.responseType=o.type,i.status=o.status,i.isAborted=!1,e.notify(i))};t.then(O(n),O(n))}var Tt={};function Sa(e){var t=e.map(function(r){return Tt[r]||(Tt[r]=Oa(r)),Tt[r]});return wr.apply(void 0,t)}function Oa(e){var t=new j(function(){var r=console[e];return console[e]=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];r.apply(console,n);var i=hs();Q(function(){t.notify(ba(n,e,i))})},function(){console[e]=r}});return t}function ba(e,t,r){var n=e.map(function(s){return Ia(s)}).join(" "),o;if(t===C.error){var i=mi(e,function(s){return s instanceof Error});o=i?ee(W(i)):void 0,n="console error: ".concat(n)}return{api:t,message:n,stack:o,handlingStack:r}}function Ia(e){return typeof e=="string"?e:e instanceof Error?Nr(W(e)):je(e,void 0,2)}var Ra=500,_a=function(){function e(){this.buffer=[]}return e.prototype.add=function(t){var r=this.buffer.push(t);r>Ra&&this.buffer.splice(0,1)},e.prototype.drain=function(){this.buffer.forEach(function(t){return t()}),this.buffer.length=0},e}();function Wr(){var e={};return{get:function(){return e},add:function(t,r){e[t]=r},remove:function(t){delete e[t]},set:function(t){e=t},getContext:function(){return le(e)},setContext:function(t){e=le(t)},setContextProperty:function(t,r){e[t]=le(r)},removeContextProperty:function(t){delete e[t]},clearContext:function(){e={}}}}var Na="datadog-synthetics-public-id",wa="datadog-synthetics-result-id",Ta="datadog-synthetics-injects-rum";function Kr(){return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM||B(Ta))}function Aa(){var e=window._DATADOG_SYNTHETICS_PUBLIC_ID||B(Na);return typeof e=="string"?e:void 0}function Ca(){var e=window._DATADOG_SYNTHETICS_RESULT_ID||B(wa);return typeof e=="string"?e:void 0}var ya=32*Ne;function La(e){var t=Ki(e),r=zr(e.forwardConsoleLogs,Te(C),"Forward Console Logs"),n=zr(e.forwardReports,Te(K),"Forward Reports");if(!(!t||!r||!n))return e.forwardErrorsToLogs&&!ce(r,C.error)&&r.push(C.error),U({forwardErrorsToLogs:e.forwardErrorsToLogs!==!1,forwardConsoleLogs:r,forwardReports:n,requestErrorResponseLengthLimit:ya},t)}function zr(e,t,r){if(e===void 0)return[];if(!(e==="all"||Array.isArray(e)&&e.every(function(n){return ce(t,n)}))){N.error("".concat(r,' should be "all" or an array with allowed values "').concat(t.join('", "'),'"'));return}return e==="all"?t:Ci(e)}var Da=globalThis&&globalThis.__decorate||function(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},R={debug:"debug",error:"error",info:"info",warn:"warn"},At={console:"console",http:"http",silent:"silent"},Pa=Object.keys(R),Jr=function(){function e(t,r,n,o,i){n===void 0&&(n=At.http),o===void 0&&(o=R.debug),i===void 0&&(i={}),this.handleLogStrategy=t,this.handlerType=n,this.level=o,this.contextManager=Wr(),this.contextManager.set(U({},i,r?{logger:{name:r}}:void 0))}return e.prototype.log=function(t,r,n){n===void 0&&(n=R.info),this.handleLogStrategy({message:t,context:le(r),status:n},this)},e.prototype.debug=function(t,r){this.log(t,r,R.debug)},e.prototype.info=function(t,r){this.log(t,r,R.info)},e.prototype.warn=function(t,r){this.log(t,r,R.warn)},e.prototype.error=function(t,r){var n={error:{origin:T.LOGGER}};this.log(t,Ve(n,r),R.error)},e.prototype.setContext=function(t){this.contextManager.set(t)},e.prototype.getContext=function(){return this.contextManager.get()},e.prototype.addContext=function(t,r){this.contextManager.add(t,r)},e.prototype.removeContext=function(t){this.contextManager.remove(t)},e.prototype.setHandler=function(t){this.handlerType=t},e.prototype.getHandler=function(){return this.handlerType},e.prototype.setLevel=function(t){this.level=t},e.prototype.getLevel=function(){return this.level},Da([hi],e.prototype,"log",null),e}();function Ua(e){var t=!1,r=Wr(),n={},o=function(){},i=new _a,s=function(E,v,S,I){S===void 0&&(S=le(d())),I===void 0&&(I=Y()),i.add(function(){return s(E,v,S,I)})},a=function(){},u=new Jr(function(){for(var E=[],v=0;v<arguments.length;v++)E[v]=arguments[v];return s.apply(void 0,E)});function d(){return{view:{referrer:document.referrer,url:window.location.href},context:r.get()}}return gs({logger:u,init:O(function(E){var v;if(Je()&&(E=f(E)),!!c(E)){var S=La(E);!S||(v=e(S,d,u),s=v.handleLog,o=v.getInternalContext,a=function(){return le(E)},i.drain(),t=!0)}}),getLoggerGlobalContext:O(r.get),getGlobalContext:O(r.getContext),setLoggerGlobalContext:O(r.set),setGlobalContext:O(r.setContext),addLoggerGlobalContext:O(r.add),setGlobalContextProperty:O(r.setContextProperty),removeLoggerGlobalContext:O(r.remove),removeGlobalContextProperty:O(r.removeContextProperty),clearGlobalContext:O(r.clearContext),createLogger:O(function(E,v){return v===void 0&&(v={}),n[E]=new Jr(function(){for(var S=[],I=0;I<arguments.length;I++)S[I]=arguments[I];return s.apply(void 0,S)},E,v.handler,v.level,v.context),n[E]}),getLogger:O(function(E){return n[E]}),getInitConfiguration:O(function(){return a()}),getInternalContext:O(function(E){return o(E)})});function f(E){return U({},E,{clientToken:"empty"})}function c(E){return t?(E.silentMultipleInit||N.error("DD_LOGS is already initialized."),!1):!0}}var xa="logs";function ka(e){var t=Xs(e.cookieOptions,xa,function(r){return Ma(e,r)});return{findTrackedSession:function(r){var n=t.findActiveSession(r);return n&&n.trackingType==="1"?{id:n.id}:void 0}}}function Fa(e){var t=Qr(e)==="1",r=t?{}:void 0;return{findTrackedSession:function(){return r}}}function Qr(e){return fr(e.sampleRate)?"1":"0"}function Ma(e,t){var r=$a(t)?t:Qr(e);return{trackingType:r,isTracked:r==="1"}}function $a(e){return e==="0"||e==="1"}var ge,Zr=(ge={},ge[R.debug]=0,ge[R.info]=1,ge[R.warn]=2,ge[R.error]=3,ge);function Ba(e){function t(r,n,o,i){var s=r.context;en(r.status,At.console,n)&&N(r.status,r.message,Ve(n.getContext(),s)),e.notify(0,{rawLogsEvent:{date:i||Y(),message:r.message,status:r.status,origin:T.LOGGER},messageContext:s,savedCommonContext:o,logger:n})}return{handleLog:t}}function en(e,t,r){var n=r.getHandler(),o=Array.isArray(n)?n:[n];return Zr[e]>=Zr[r.getLevel()]&&ce(o,t)}function ja(e,t,r,n,o,i){var s=Pa.concat(["custom"]),a={};s.forEach(function(u){a[u]=ca(u,t.eventRateLimiterThreshold,i)}),r.subscribe(0,function(u){var d,f,c,E=u.rawLogsEvent,v=u.messageContext,S=v===void 0?void 0:v,I=u.savedCommonContext,m=I===void 0?void 0:I,_=u.logger,g=_===void 0?o:_,b=xi(E.date),p=e.findTrackedSession(b);if(!!p){var P=m||n(),oe=Ve({service:t.service,session_id:p.id,view:P.view},P.context,Qe(b),E,g.getContext(),S);qe()&&(oe.simulation_label=Ir()),!(!en(E.status,At.http,g)||((d=t.beforeSend)===null||d===void 0?void 0:d.call(t,oe))===!1||((f=oe.error)===null||f===void 0?void 0:f.origin)!==T.AGENT&&((c=a[oe.status])!==null&&c!==void 0?c:a.custom).isLimitReached())&&r.notify(1,oe)}})}var tn=!1;function Qe(e){var t=window;if(Kr()){var r=n(t.DD_RUM_SYNTHETICS);return!r&&!tn&&(tn=!0,Ar("Logs sent before RUM is injected by the synthetics worker",{testId:Aa(),resultId:Ca()})),r}return n(t.DD_RUM);function n(o){if(o&&o.getInternalContext)return o.getInternalContext(e)}}var te,Ga=(te={},te[C.log]=R.info,te[C.debug]=R.debug,te[C.info]=R.info,te[C.warn]=R.warn,te[C.error]=R.error,te);function Ha(e,t){var r=Sa(e.forwardConsoleLogs).subscribe(function(n){t.notify(0,{rawLogsEvent:{date:Y(),message:n.message,origin:T.CONSOLE,error:n.api===C.error?{origin:T.CONSOLE,stack:n.stack}:void 0,status:Ga[n.api]}})});return{stop:function(){r.unsubscribe()}}}var ke,Va=(ke={},ke[K.cspViolation]=R.error,ke[K.intervention]=R.error,ke[K.deprecation]=R.warn,ke);function qa(e,t){var r=Ss(e.forwardReports).subscribe(function(n){var o=n.message,i=Va[n.type],s;i===R.error?s={kind:n.subtype,origin:T.REPORT,stack:n.stack}:n.stack&&(o+=" Found in ".concat(Es(n.stack))),t.notify(0,{rawLogsEvent:{date:Y(),message:o,origin:T.REPORT,error:s,status:i}})});return{stop:function(){r.unsubscribe()}}}function Ya(e,t){if(!e.forwardErrorsToLogs)return{stop:we};var r=la().subscribe(function(i){i.state==="complete"&&o("xhr",i)}),n=va().subscribe(function(i){i.state==="complete"&&o("fetch",i)});function o(i,s){!e.isIntakeUrl(s.url)&&(za(s)||Ja(s))&&("xhr"in s?Xa(s.xhr,e,a):s.response?Ka(s.response,e,a):s.error&&Wa(s.error,e,a));function a(u){t.notify(0,{rawLogsEvent:{message:"".concat(Qa(i)," error ").concat(s.method," ").concat(s.url),date:s.startClocks.timeStamp,error:{origin:T.NETWORK,stack:u||"Failed to load"},http:{method:s.method,status_code:s.status,url:s.url},status:R.error,origin:T.NETWORK}})}}return{stop:function(){r.unsubscribe(),n.unsubscribe()}}}function Xa(e,t,r){typeof e.response=="string"?r(Ct(e.response,t)):r(e.response)}function Wa(e,t,r){r(Ct(ee(W(e)),t))}function Ka(e,t,r){window.TextDecoder?e.body?Za(e.clone().body,t.requestErrorResponseLengthLimit,function(n,o){r(n?"Unable to retrieve response: ".concat(n):o)}):r():e.clone().text().then(O(function(n){return r(Ct(n,t))}),O(function(n){return r("Unable to retrieve response: ".concat(n))}))}function za(e){return e.status===0&&e.responseType!=="opaque"}function Ja(e){return e.status>=500}function Ct(e,t){return e.length>t.requestErrorResponseLengthLimit?"".concat(e.substring(0,t.requestErrorResponseLengthLimit),"..."):e}function Qa(e){return e==="xhr"?"XHR":"Fetch"}function Za(e,t,r){eu(e,t,function(n,o,i){if(n)r(n);else{var s=new TextDecoder().decode(o);i&&(s+="..."),r(void 0,s)}})}function eu(e,t,r){var n=e.getReader(),o=[],i=0;s();function s(){n.read().then(O(function(u){if(u.done){a();return}o.push(u.value),i+=u.value.length,i>t?a():s()}),O(function(u){return r(u)}))}function a(){n.cancel().catch(we);var u;if(o.length===1)u=o[0];else{u=new Uint8Array(i);var d=0;o.forEach(function(f){u.set(f,d),d+=f.length})}r(void 0,u.slice(0,t),u.length>t)}}function tu(e,t){if(!e.forwardErrorsToLogs)return{stop:we};var r=new j,n=ps(r).stop,o=r.subscribe(function(i){t.notify(0,{rawLogsEvent:{message:i.message,date:i.startClocks.timeStamp,error:{kind:i.type,origin:T.SOURCE,stack:i.stack},origin:T.SOURCE,status:R.error}})});return{stop:function(){n(),o.unsubscribe()}}}var ru=function(){function e(){this.callbacks={}}return e.prototype.notify=function(t,r){var n=this.callbacks[t];n&&n.forEach(function(o){return o(r)})},e.prototype.subscribe=function(t,r){var n=this;return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(r),{unsubscribe:function(){n.callbacks[t]=n.callbacks[t].filter(function(o){return r!==o})}}},e}();function nu(e,t,r){var n,o=Xr(e,e.logsEndpointBuilder,r,(n=e.replica)===null||n===void 0?void 0:n.logsEndpointBuilder);t.subscribe(1,function(i){o.add(i)})}function ou(e){var t=Rt();e.subscribe(1,function(r){t.send("log",r)})}function iu(e){return{get:function(t){var r=e.findTrackedSession(t);if(r)return{session_id:r.id}}}}function su(e,t,r){var n=new ru,o=function(d){return n.notify(0,{rawLogsEvent:{message:d.message,date:d.startClocks.timeStamp,error:{origin:T.AGENT},origin:T.AGENT,status:R.error}})},i=au(e,o);i.setContextProvider(function(){var d,f,c,E,v,S;return{application:{id:(d=Qe())===null||d===void 0?void 0:d.application_id},session:{id:(f=a.findTrackedSession())===null||f===void 0?void 0:f.id},view:{id:(E=(c=Qe())===null||c===void 0?void 0:c.view)===null||E===void 0?void 0:E.id},action:{id:(S=(v=Qe())===null||v===void 0?void 0:v.user_action)===null||S===void 0?void 0:S.id}}}),Ya(e,n),tu(e,n),Ha(e,n),qa(e,n);var s=Ba(n).handleLog,a=yi(e.cookieOptions)&&!Je()&&!Kr()?ka(e):Fa(e);ja(a,e,n,t,r,o),Je()?ou(n):nu(e,n,o);var u=iu(a);return{handleLog:s,getInternalContext:u.get}}function au(e,t){var r,n=ws(e);if(Je()){var o=Rt();n.observable.subscribe(function(s){return o.send("internal_telemetry",s)})}else{var i=Xr(e,e.rumEndpointBuilder,t,(r=e.replica)===null||r===void 0?void 0:r.rumEndpointBuilder);n.observable.subscribe(function(s){return i.add(s,Ts(e))})}return n}var yt=Ua(su);ms(dt(),"DD_LOGS",yt);const uu=["APP_LOCAL"];function rn(e){let t;if(typeof e=="string")try{t=JSON.parse(e)}catch{t=null}else t=e;return typeof t=="string"&&(["true","false"].includes(t)?t=Boolean(t):isNaN(+t)||(t=+t)),t}function cu(){return Object.keys({APP_ENV:'"prod"',APP_VERSION:'"1.183.0"',APP_NAME:'"sdk-loader"'}).filter(e=>/^APP_/.test(e)&&!uu.includes(e)).reduce((e,t)=>{const r={APP_ENV:'"prod"',APP_VERSION:'"1.183.0"',APP_NAME:'"sdk-loader"'}[t],n=t.split("_").slice(1).map((o,i)=>`${o[0][i===0?"toLowerCase":"toUpperCase"]()}${o.slice(1).toLowerCase()}`).join("");return Object.assign(e,{[n]:rn(r)})},{})}function lu(){const e=["dev","stage","prod"];let t='"prod"'.toLowerCase();return e.indexOf(t)===-1&&(t=rn(t)),e.indexOf(t)===-1&&(t="dev"),t}function nn(){const e=lu();return{...cu(),env:e,isLocalProcess:Boolean({APP_ENV:'"prod"',APP_VERSION:'"1.183.0"',APP_NAME:'"sdk-loader"'}.APP_LOCAL),isDev:e==="dev",isStage:e==="stage",isProd:e==="prod"}}class A{constructor(t){H(this,"runtime");H(this,"local");H(this,"dev");H(this,"stage");H(this,"prod");this.local=t.local,this.dev=t.dev,this.stage=t.stage,this.prod=t.prod,this.runtime=nn()}get url(){return this.runtime.isLocalProcess&&!!this.local?this.local:this[this.runtime.env]}}new A({dev:"https://account.dev.fullview.services",stage:"https://account.stage.fullview.services",prod:"https://account.fullview.services"});const fu=new A({dev:"https://logs.dev.fullview.services",stage:"https://logs.stage.fullview.services",prod:"https://logs.fullview.services"});new A({dev:"https://organisation.dev.fullview.services",stage:"https://organisation.stage.fullview.services",prod:"https://organisation.fullview.services"}),new A({dev:"https://administrator.dev.fullview.services",stage:"https://administrator.stage.fullview.services",prod:"https://administrator.fullview.services"}),new A({dev:"https://customer.dev.fullview.services",stage:"https://customer.stage.fullview.services",prod:"https://customer.fullview.services"});const du=new A({dev:"https://atlas.dev.fullview.services",stage:"https://atlas.stage.fullview.services",prod:"https://atlas.fullview.services"});new A({local:"http://localhost:3003",dev:"https://call.dev.fullview.io",stage:"https://call.stage.fullview.io",prod:"https://call.fullview.io"}),new A({dev:"wss://atlas.dev.fullview.services",stage:"wss://atlas.stage.fullview.services",prod:"wss://atlas.fullview.services"}),new A({dev:"https://assets.dev.fullview.io",stage:"https://assets.stage.fullview.io",prod:"https://assets.fullview.io"});const Eu=new A({local:"http://localhost:3001/src/index.ts",dev:"https://install.dev.fullview.io",stage:"https://install.stage.fullview.io",prod:"https://install.fullview.io"}),hu=new A({local:"http://localhost:3002/src/index.tsx",dev:"https://install.dev.fullview.io/sdk.js",stage:"https://install.stage.fullview.io/sdk.js",prod:"https://install.fullview.io/sdk.js"});new A({dev:"wss://call.dev.fullview.services",stage:"wss://call.stage.fullview.services",prod:"wss://call.fullview.services"}),new A({dev:"wss://replays.dev.fullview.services",stage:"wss://replays.stage.fullview.services",prod:"wss://replays.fullview.services"}),new A({dev:"wss://cobrowse.dev.fullview.services",stage:"wss://cobrowse.stage.fullview.services",prod:"wss://cobrowse.fullview.services"}),new A({local:"http://localhost:3004/build/sdkWorker.js",dev:"https://install.dev.fullview.io/sdkWorker.js",stage:"https://install.stage.fullview.io/sdkWorker.js",prod:"https://install.fullview.io/sdkWorker.js"}),new A({local:"http://localhost:3005/build/dashboardWorker.js",dev:"https://dev.fullview.io/workers/dashboardWorker.js",stage:"https://stage.fullview.io/workers/dashboardWorker.js",prod:"https://app.fullview.io/workers/dashboardWorker.js"});function vu(e){return(t,r,n)=>{const o=n.value,i=function(s,...a){if(this.ignoreFilter)return o.apply(this,[s,...a]);if(!!e.test(s))return o.apply(this,[s,...a])};return n.value=i,n}}var pu=globalThis&&globalThis.__decorate||function(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},Lt=globalThis&&globalThis.__metadata||function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const gu=vu(/-ddog/);class mu{constructor({clientToken:t,env:r,service:n}){H(this,"meta");H(this,"ignoreFilter");yt.init({clientToken:t,site:"datadoghq.eu",forwardErrorsToLogs:!1,sampleRate:100,env:r,service:n,proxyUrl:fu[r],silentMultipleInit:!0})}get logger(){return yt.logger}log(t,r,...n){this.logger.info(`${this.cookArea(t)} ${r}`,this.cookPayload(t,n))}warn(t,r,...n){this.logger.warn(`${this.cookArea(t)} ${r}`,this.cookPayload(t,n))}error(t,r,...n){this.logger.error(`${this.cookArea(t)} ${r}`,this.cookPayload(t,n))}setMeta(t){this.meta={...this.meta,...t}}setIgnoreFilter(t){this.ignoreFilter=t}clone(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this)}cookArea(t,r=!1){const n=t.replace(/(-ddog)/g,"");return r?n:`[${n}]`}cookPayload(t,r){return r.length===1&&typeof r[0]=="object"&&!(r[0]instanceof Array)&&!(r[0]instanceof Error)?Object.assign(r[0],{area:this.cookArea(t,!0),args:r.slice(1),...this.meta}):{area:this.cookArea(t,!0),args:r,...this.meta}}}pu([gu,Lt("design:type",Function),Lt("design:paramtypes",[String,String,Object]),Lt("design:returntype",void 0)],mu.prototype,"log",null);class Su{constructor(){H(this,"sinks",[])}addLogger(t){this.sinks.push(t)}log(t,r,...n){this.sinks.forEach(o=>o.log(t,r,...n))}error(t,r,...n){this.sinks.forEach(o=>o.error(t,r,...n))}warn(t,r,...n){this.sinks.forEach(o=>o.warn(t,r,...n))}setMeta(t){this.sinks.forEach(r=>{var n;return(n=r.setMeta)==null?void 0:n.call(r,t)})}setIgnoreFilter(t){this.sinks.forEach(r=>{var n;return(n=r.setIgnoreFilter)==null?void 0:n.call(r,t)})}clone(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this,{sinks:this.sinks.map(t=>t.clone())})}with(t){var n;const r=this.clone();return(n=r.setMeta)==null||n.call(r,t),r}removeConsoleLogger(){this.sinks=this.sinks.filter(t=>!(t instanceof _e))}}const L=new Su;L.addLogger(new _e);var on;(function(e){e[e.UI=1]="UI",e[e.Console=2]="Console"})(on||(on={}));var x={shared:{dom:{types:{whitelist:["mouse","focus"]},tags:{blacklist:["html"]}}},other:{console:{blacklist:["[fv/","logging and telemetry enabled","subscribing to all tracks","joining session","session id","rtc joined meeting","connected to signaling server","room","participant id","participant joined","fetching stun info from twilio","getUserMedia called with constraints","making new stream with current audio track","stopping video in setCam","stopping video track in mute-local-video","stopping audio in setCam","stopping audio at meeting exit","stopping local screen tracks at meeting exit","starting display-media capture of desktop","screen-capture-ended","removing stream by id","participant left","audio input device update:","audio output device update:","video device update:"]},network:{blacklist:["fullview.services","gs.daily.co"]}}},sn;(function(e){e.Sink="sink",e.Replays="replays",e.Customer="customer"})(sn||(sn={}));var an;(function(e){e.CALLING="CALLING",e.CONNECTED="CONNECTED",e.DISCONNECTED="DISCONNECTED",e.DENIED="DENIED",e.CANCELED="CANCELED",e.END_CALL="END_CALL"})(an||(an={}));var un;(function(e){e.CREATED="CREATED",e.INVITED="INVITED",e.UPDATED="UPDATED",e.DENIED="DENIED",e.REQUEST_SCREEN_SHARE="REQUEST_SCREEN_SHARE",e.DENY_SCREEN_SHARE="DENY_SCREEN_SHARE",e.REFRESH_RRWEB="REFRESH_RRWEB",e.ENDED="ENDED",e.DISCONNECTED="DISCONNECTED"})(un||(un={}));var cn;(function(e){e.HOST="HOST",e.CUSTOMER="CUSTOMER",e.AGENT="AGENT"})(cn||(cn={}));var ln;(function(e){e.BLOCKED="blocked",e.OFF="off",e.SENDABLE="sendable",e.LOADING="loading",e.INTERRUPTED="interrupted",e.PLAYABLE="playable"})(ln||(ln={}));var fn;(function(e){e.INCREMENT="increment",e.DECREMENT="decrement"})(fn||(fn={}));var dn;(function(e){e.USERS="users",e.REPLAYS="replays",e.REPLAYS_TOTAL_WITH_INVALID="replays_total_with_invalid",e.REPLAYS_WATCHED="replays_watched",e.CUSTOMER_VALID_REPLAYS="customer_valid_replays",e.CUSTOMER_INVALID_REPLAYS="customer_invalid_replays",e.UNDEFINED="undefined"})(dn||(dn={}));var En;(function(e){e.ONLINE="0_ONLINE",e.IDLE="1_IDLE",e.OFFLINE="2_OFFLINE"})(En||(En={}));var hn;(function(e){e.SessionReplay="customer-session-replay"})(hn||(hn={}));var vn;(function(e){e.Console="Console",e.Network="Network",e.DOM="DOM",e.Navigation="Navigation",e.Window="Window",e.Custom="Custom"})(vn||(vn={}));var pn;(function(e){e[e.None=0]="None",e[e.Replay=1]="Replay",e[e.Cobrowsing=2]="Cobrowsing"})(pn||(pn={}));var gn;(function(e){e.log="log",e.info="info",e.warn="warn",e.error="error"})(gn||(gn={}));var mn;(function(e){e.ui="ui",e.focus="focus",e.mouse="mouse",e.keyboard="keyboard",e.form="form",e.mutation="mutation",e.html5="html5",e.css="css"})(mn||(mn={}));var Sn;(function(e){e.userStep="userStep",e.warn="warn",e.error="error"})(Sn||(Sn={}));var On;(function(e){e[e.none=0]="none",e[e.userStep=1]="userStep",e[e.warning=2]="warning",e[e.error=3]="error"})(On||(On={}));var bn;(function(e){e.SIGNUP="SIGNUP",e.RECOVER_ACCOUNT="RECOVER_ACCOUNT",e.INVITE_USER="INVITE_USER",e.REQUEST_ACCESS="REQUEST_ACCESS",e.SETUP_FULLVIEW="SETUP_FULLVIEW",e.ACCEPT_REQUEST_ACCESS="ACCEPT_REQUEST_ACCESS",e.ACCEPT_INVITATION="ACCEPT_INVITATION",e.SESSION_REPLAY_ACCESS_REQUEST="SESSION_REPLAY_ACCESS_REQUEST",e.SESSION_REPLAY_UPGRADE_REQUEST="SESSION_REPLAY_UPGRADE_REQUEST"})(bn||(bn={}));var In;(function(e){e.AWS_EVENTS="aws.events",e.FV_EVENT="fv.event"})(In||(In={}));var Rn;(function(e){e.FV_WS_MESSAGE="fv.ws-message",e.FV_SEND_EMAIL="fv.send-email",e.FV_WS_SESSION_LINK_IDENTITY="fv.ws-session-link-identity",e.FV_CUSTOMER_IDENTITY="fv.customer-identity",e.FV_SYNC_ROLES="fv.sync-roles",e.FV_USER_SIGNED_UP="fv.user-signed-up",e.FV_USER_SIGNED_IN="fv.user-signed-in",e.FV_SCRIPT_INJECTED="fv.script-injected",e.FV_SCRIPT_INSTALLED="fv.script-installed",e.FV_API_INTEGRATED="fv.api-integrated",e.FV_CALL_CREATED="fv.call-created",e.FV_FIRST_CALL_CREATED="fv.first-call-created",e.FV_USER_FORCE_CHANGED_PASSWORD="fv.user-force-changed-password",e.FV_WS_BROADCAST_MESSAGE="fv.ws-broadcast-message",e.FV_USER_UPDATE="fv.user-update",e.FV_ACCEPT_INVITATION="fv.accept-invitation",e.FV_SESSION_REPLAY_METRIC="fv.session-replay-metric",e.FV_FIRST_WATCHED_SESSION_REPLAY="fv.first-watched-session-replay",e.FV_VALID_SESSION_REPLAY_PROCESSED="fv.valid-session-replay-processed",e.FV_ADMIN_ACCEPTED_ACCESS_REQUEST="fv.admin-accepted-access-request",e.FV_ORGANISATION_CREATED="fv.organisation-created",e.FV_WORKSPACE_ACTIVATED="fv.workspace-activated",e.FV_INTEGRATION_AUTHORIZED="fv.integration-authorized"})(Rn||(Rn={}));var _n;(function(e){e.SessionReplay_Data="fv-session-replay-data",e.SessionReplay_EnrichedData="fv-session-replay-enriched-data",e.SessionReplay_SessionCreated="fv-session-replay-created",e.SessionReplay_SessionMerged="fv-session-replay-merged",e.SessionReplay_SessionFinished="fv-session-replay-aggregates",e.SessionReplay_MaxLimitReached="fv-session-replay-max-limit-reached",e.Customer_Activity="fv-customer-activity",e.Customer_Activity_Throttled="fv-customer-activity-throttled",e.Customer_Join_Room="fv-customer-join-room",e.Customer_Replay_Updates="fv-customer-replay-updates",e.SessionReplay_Events="fv-replay-events",e.SessionReplay_EnrichedEvents="fv-replay-events-enriched",e.Counts="fv-counts",e.Counts_Throttled="fv-counts-throttled"})(_n||(_n={}));var Nn;(function(e){e.INTERCOM="intercom",e.ZENDESK="zendesk",e.SALESFORCE="salesforce"})(Nn||(Nn={}));var wn;(function(e){e.ACCEPT_INVITATION="ACCEPT_INVITATION"})(wn||(wn={}));var Tn;(function(e){e.Presence="presence",e.Replays="replays",e.Generic="generic"})(Tn||(Tn={}));var An;(function(e){e.Start="start",e.Finish="finish",e.Discarded="discarded",e.Snapshot="snapshot",e.Computing="computing"})(An||(An={}));var Cn;(function(e){e[e.Unspecified=0]="Unspecified",e[e.Count=1]="Count",e[e.Rate=2]="Rate",e[e.Gauge=3]="Gauge"})(Cn||(Cn={}));var yn;(function(e){e.ADMIN="admin",e.USER="user",e.SYSTEM_USERS="system-users",e.SUPER_ADMIN="super-admin"})(yn||(yn={}));var Ln;(function(e){e.ASSIGN_ROLE="ASSIGN_ROLE",e.REMOVE_ROLE="REMOVE_ROLE"})(Ln||(Ln={}));var Dn;(function(e){e.CREATED="CREATED",e.INITIALIZED="INITIALIZED",e.READY="READY",e.DENIED="DENIED",e.CONNECTED="CONNECTED",e.DISCONNECTED="DISCONNECTED",e.SCHEDULED_FOR_CLOSE="SCHEDULED_FOR_CLOSE",e.CLOSED="CLOSED",e.FORCE_CLOSED="FORCE_CLOSED",e.CONNECTION_REQUESTED="CONNECTION_REQUESTED",e.CONNECTION_DENIED="CONNECTION_DENIED",e.CONNECTION_APPROVED="CONNECTION_APPROVED"})(Dn||(Dn={}));var Pn;(function(e){e.CREATE="CREATE",e.INITIALIZE="INITIALIZE",e.READY="READY",e.DENY="DENY",e.CONNECT="CONNECT",e.DISCONNECT="DISCONNECT",e.SCHEDULE_FOR_CLOSE="SCHEDULE_FOR_CLOSE",e.CLOSE="CLOSE",e.FORCE_CLOSE="FORCE_CLOSE",e.REQUEST_CONNECTION="REQUEST_CONNECTION",e.APPROVE_CONNECTION="APPROVE_CONNECTION",e.DENY_CONNECTION="DENY_CONNECTION"})(Pn||(Pn={}));var Un;(function(e){e.WATCHED_REPLAY="WATCHED_REPLAY"})(Un||(Un={}));var xn;(function(e){e[e.MONGODB=0]="MONGODB",e[e.S3=1]="S3",e[e.CASSANDRA=2]="CASSANDRA",e[e.REDIS=3]="REDIS"})(xn||(xn={}));var kn;(function(e){e[e.ACTIVE=0]="ACTIVE",e[e.COMPLETED=1]="COMPLETED",e[e.FAILED=2]="FAILED",e[e.COMPUTING=3]="COMPUTING"})(kn||(kn={}));var Fn;(function(e){e[e.None=0]="None",e[e.Replay=1]="Replay",e[e.Cobrowsing=2]="Cobrowsing"})(Fn||(Fn={}));var Mn;(function(e){e.SessionReplay="SessionReplay",e.Console="Console"})(Mn||(Mn={}));var $n;(function(e){e.Data="session-replay-data",e.Command="session-replay-command",e.Subscribe="session-replay-subscribe",e.Unsubscribe="session-replay-unsubscribe",e.GetServerTime="get-time",e.OnServerTime="time"})($n||($n={}));var Bn;(function(e){e.SessionReplays="SessionReplays",e.CoBrowsing="CoBrowsing",e.Call="Call",e.Customer="Customer"})(Bn||(Bn={}));var jn;(function(e){e.ServerRequestsFS="ServerRequestsFS",e.Started="SessionStarted",e.Completed="SessionCompleted",e.Discarded="SessionDiscarded",e.Computing="SessionComputing",e.MaxLimitReached="SessionMaxLimitReached"})(jn||(jn={}));var Gn;(function(e){e.CREATED="CREATED",e.ACTIVE="ACTIVE"})(Gn||(Gn={}));var Hn;(function(e){e.LAST_ACTIVITY="LAST_ACTIVITY"})(Hn||(Hn={}));var Vn;(function(e){e.GOOGLE="google",e.MICROSOFT="microsoft",e.OKTA="okta"})(Vn||(Vn={}));var qn;(function(e){e.SESSION="SESSION",e.HEALTHCHECK="HEALTHCHECK",e.CALL="CALL",e.CUSTOMER="CUSTOMER",e.SESSION_REPLAY="SESSION_REPLAY"})(qn||(qn={}));var Yn;(function(e){e.LINK_IDENTITY="LINK_IDENTITY",e.HANDSHAKE="HANDSHAKE",e.MESSAGE="MESSAGE",e.CLIENT_CONFIRMATION="CLIENT_CONFIRMATION",e.META_EVENTS="META_EVENTS",e.UPDATE="UPDATE",e.HISTORY_ENTRY="HISTORY_ENTRY",e.OPEN_CALL_WINDOW="OPEN_CALL_WINDOW",e.ENRICH_WS_CONNECTION="ENRICH_WS_CONNECTION",e.PING="PING",e.CUSTOMER_PRESENCE="CUSTOMER_PRESENCE",e.ADD="ADD",e.ACCEPT_INVITATION="ACCEPT_INVITATION",e.ENRICH_IDENTITY="ENRICH_IDENTITY",e.ENRICH_ANONYMOUS_IDENTITY="ENRICH_ANONYMOUS_IDENTITY",e.IN_CALL="IN_CALL",e.COMPLETED="COMPLETED",e.STARTED="STARTED",e.DISCARDED="DISCARDED",e.COMPUTING="COMPUTING",e.MAX_SESSIONS_LIMIT_REACHED="MAX_SESSIONS_LIMIT_REACHED"})(Yn||(Yn={}));var Xn;(function(e){e.DASHBOARD="DASHBOARD",e.SDK="SDK",e.CALL="CALL"})(Xn||(Xn={}));var Wn;(function(e){e.SUPPORT="ticket_sidebar",e.CHAT="chat_sidebar"})(Wn||(Wn={}));var h;(function(e){e.E0000="E0000",e.E0040="E0040",e.E0041="E0041",e.E0050="E0050",e.E0090="E0090",e.E0091="E0091",e.E0092="E0092",e.E0093="E0093",e.E2000="E2000",e.E2001="E2001",e.E2002="E2002",e.E2050="E2050",e.E2051="E2051",e.E2052="E2052",e.E2053="E2053",e.E2054="E2054",e.E2055="E2055",e.E2056="E2056",e.E2057="E2057",e.E2058="E2058",e.E2059="E2059",e.E2060="E2060",e.E2061="E2061",e.E3000="E3000",e.E4000="E4000",e.E4050="E4050",e.E5000="E5000",e.E5001="E5001",e.E5002="E5002",e.E5003="E5003",e.E5004="E5004",e.E5005="E5005",e.E5006="E5006",e.E5007="E5007",e.E5008="E5008",e.E5009="E5009",e.E5010="E5010",e.E5011="E5011",e.E5012="E5012",e.E5013="E5013",e.E5014="E5014",e.E5015="E5015",e.E6000="E6000",e.E6001="E6001",e.E6002="E6002",e.E6003="E6003",e.E7000="E7000",e.E7001="E7001",e.E7002="E7002",e.E7003="E7003",e.E7004="E7004",e.E7500="E7500",e.E7501="E7501",e.E7502="E7502",e.E7503="E7503",e.E7504="E7504",e.E7505="E7505",e.E8000="E8000",e.E8001="E8001",e.E8002="E8002",e.E8003="E8003",e.E8004="E8004",e.E8005="E8005",e.E9000="E9000",e.E10000="E10000"})(h||(h={}));var Kn;(function(e){e.ERROR="Error",e.LOG="LogError",e.ADD_LOG="AddLogError",e.USER_NOT_FOUND="UserNotFoundError",e.USER_EXISTS="UserExistsError",e.USER_CREATION="UserCreationError",e.ORGANISATION_EXISTS="OrganisationExistsError",e.ORGANISATION_NOT_FOUND="OrganisationNotFoundError",e.ORGANISATION_CREATION="OrganisationCreationError",e.ORGANISATION_ACCESS_REQUEST_CREATION="OrganisationAccessRequestCreationError",e.ORGANISATION_ACCESS_REQUEST_EXISTS="OrganisationAccessRequestExists",e.ORGANISATION_ACCESS_REQUEST_NOT_FOUND="OrganisationAccessRequestNotFound",e.ORGANISATION_INVITATION_CREATION="OrganisationInvitationCreationError",e.ORGANISATION_INVITATION_EXISTS="OrganisationInvitationExists",e.ORGANISATION_INVITATION_NOT_FOUND="OrganisationInvitationNotFound",e.ORGANISATION_JOIN_LINK_CREATION="OrganisationJoinLinkCreationError",e.ORGANISATION_JOIN_LINK_NOT_FOUND="OrganisationJoinLinkNotFoundError",e.ORGANISATION_SCRIPT_NOT_INSTALLED="OrganisationScriptNotInstalled",e.VALIDATION="ValidationError",e.EMAIL_HANDLER="EmailHandlerError",e.INVALID_USERNAME_PASSWORD="InvalidUsernamePasswordError",e.INVALID_TOKEN="InvalidTokenError",e.FORCE_CHANGE_PASSWORD="ForceChangePasswordError",e.FORGOT_PASSWORD="ForgotPasswordError",e.DAILY_ROOM_CREATION="DailyRoomCreationError",e.ROLE_ASSIGNMENT="AssignRoleError",e.ROLE_REMOVAL="RemoveRoleError",e.GET_USERS_BY_ROLE="GetUsersByRoleError",e.LOGIN="LoginError",e.AUTH="AuthError",e.LOGOUT="LogoutError",e.REFRESH_TOKEN="RefreshTokenError",e.SIGNUP="SignupError",e.PASSWORD_RESET_REQUEST="PasswordResetRequestError",e.PASSWORD_RESET_REQUEST_CREATION="PasswordResetRequestCreationError",e.PASSWORD_RESET_REQUEST_NOT_FOUND="PasswordResetRequestNotFoundError",e.PASSWORD_CHANGE="PasswordChangeError",e.WEAK_PASSWORD="WeakPasswordError",e.INVALID_EMAIL_DOMAIN="InvalidEmailDomainError",e.OKTA_DOMAIN_NOT_CONFIGURED="OktaDomainNotConfiguredError",e.ZENDSEK_CLIENT_NOT_AUTHORISED="ZendeskClientNotAuthorisedError",e.SESSION_UNKNOWN="SessionUnknownError",e.SESSION="SessionError",e.SESSION_WORKFLOW="SessionWorkflowError",e.SESSION_NOT_FOUND="SessionNotFoundError",e.WEBSOCKET="WebsocketError",e.WEBSOCKET_CONNECTION="WebsocketConnectionError",e.WEBSOCKET_MESSAGE="WebsocketMessageError",e.WEBSOCKET_STATE="WebsocketStateError",e.WEBSOCKET_STATE_NOT_FOUND="WebsocketStateNotFoundError",e.CUSTOMER="CustomerError",e.CUSTOMER_CREATION="CustomerCreationError",e.CUSTOMER_UPDATE="CustomerUpdateError",e.CUSTOMER_NOT_FOUND="CustomerNotFoundError",e.CUSTOMER_NO_ACTIVE_CONNECTION_FOUND="CustomerNoActiveConnectionFoundError",e.CUSTOMER_IN_ANOTHER_CALL="CustomerInAnotherCallError",e.MONGODB_SERVER_ERROR="MongoDbServerError",e.CALL="CallError",e.CALL_NOT_FOUND="CallNotFoundError",e.PARTICIPANT_NOT_INVITED="ParticipantNotInvitedError",e.CALL_ENDED="CallEndedError",e.PARTICIPANT_ALREADY_JOINED="ParticipantAlreadyJoinedError",e.CALL_DOES_NOT_BELONG_TO_THE_SAME_ORGANISATION="CallDoesNotBelongToTheSameOrganisationError"})(Kn||(Kn={}));var l=function(){function e(r,n){this.code=r,this.description=n}e.get=function(n){var o=Object.entries(e).find(function(i){var s=i[0],a=e[s];return a.code===n});if(o)return o[1];throw new Error("Unknown error code provided: "+n)};var t=e.prototype;return t.toString=function(){return"["+this.code+"]: "+this.description},e}();l.E0000=new l(h.E0000,"An unknown error has occurred."),l.E0040=new l(h.E0040,"Log Error"),l.E0041=new l(h.E0041,"Cannot add log"),l.E0050=new l(h.E0050,"Room cannot be created."),l.E0090=new l(h.E0090,"Role cannot be assigned."),l.E0091=new l(h.E0091,"Role cannot be removed."),l.E0092=new l(h.E0092,"Cannot get users by role."),l.E0093=new l(h.E0093,"User doesn't have the required role."),l.E2000=new l(h.E2000,"The user could not be found."),l.E2001=new l(h.E2001,"The user already exists."),l.E2002=new l(h.E2002,"User cannot be created"),l.E2050=new l(h.E2050,"The organisation already exists."),l.E2051=new l(h.E2051,"The organisation could not be found."),l.E2052=new l(h.E2052,"The organisation could not be created."),l.E2053=new l(h.E2053,"Organisation access request cannot be created."),l.E2054=new l(h.E2054,"Organisation access already requested."),l.E2055=new l(h.E2055,"Organisation access request not found."),l.E2056=new l(h.E2056,"Organisation invitation cannot be created."),l.E2057=new l(h.E2057,"Organisation invitation already sent."),l.E2058=new l(h.E2058,"Organisation invitation not found."),l.E2059=new l(h.E2059,"Organisation join link cannot be created."),l.E2060=new l(h.E2060,"Organisation join link not found."),l.E2061=new l(h.E2061,"Organisation doesn't has script installed."),l.E3000=new l(h.E3000,"The data is invalid."),l.E4000=new l(h.E4000,"No email event handler was found to handle the event, this should not have happened!"),l.E4050=new l(h.E4050,"Zendesk client not authorised."),l.E5000=new l(h.E5000,"The username or password is invalid."),l.E5001=new l(h.E5001,"The token provided is invalid."),l.E5002=new l(h.E5002,"Cannot force change password"),l.E5003=new l(h.E5003,"Cannot login"),l.E5004=new l(h.E5004,"Cannot proceed on authentication process"),l.E5005=new l(h.E5005,"Cannot logout"),l.E5006=new l(h.E5006,"Cannot refresh token"),l.E5007=new l(h.E5007,"Cannot signup"),l.E5008=new l(h.E5008,"Cannot move forward with the forgot password flow"),l.E5009=new l(h.E5009,"The password reset flow encountered an error"),l.E5010=new l(h.E5010,"Cannot create password reset request"),l.E5011=new l(h.E5011,"Password reset request not found"),l.E5012=new l(h.E5012,"Password cannot be changed"),l.E5013=new l(h.E5013,"Password too weak"),l.E5014=new l(h.E5014,"Invalid domain for email"),l.E5015=new l(h.E5015,"Okta domain not configured"),l.E6000=new l(h.E6000,"Unknown session error occurred: this should not have happened"),l.E6001=new l(h.E6001,"A session error occurred"),l.E6002=new l(h.E6002,"The session workflow encountered an error"),l.E6003=new l(h.E6003,"The session could not be found"),l.E7000=new l(h.E7000,"A websocket error occurred"),l.E7001=new l(h.E7001,"A websocket connection error occurred"),l.E7002=new l(h.E7002,"A websocket message error occurred"),l.E7003=new l(h.E7003,"A websocket state error occurred"),l.E7004=new l(h.E7004,"The websocket session was not found"),l.E7500=new l(h.E7500,"A call error occurred"),l.E7501=new l(h.E7501,"The call not found"),l.E7502=new l(h.E7502,"Participant was not invited to the call"),l.E7503=new l(h.E7503,"Call has already ended"),l.E7504=new l(h.E7504,"Participant has already joined the call"),l.E7505=new l(h.E7505,"Call does not belong to the same organisation"),l.E8000=new l(h.E8000,"A customer error occurred"),l.E8001=new l(h.E8001,"Customer cannot be created"),l.E8002=new l(h.E8002,"Customer cannot be updated"),l.E8003=new l(h.E8003,"Customer could not be found"),l.E8004=new l(h.E8004,"No active end user connections found"),l.E8005=new l(h.E8005,"Customer is in another call"),l.E9000=new l(h.E9000,"A database error has occurred"),l.E10000=new l(h.E10000,"Missing or invalid customer identity");const Ou=(e,{accessToken:t}={})=>(e.headers={"content-type":"application/json"},t&&(e.headers.authorization=`Bearer ${t}`),e);var bu=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis;const Iu=bu;var Ru=typeof self=="object"&&self&&self.Object===Object&&self,_u=Iu||Ru||Function("return this")();const Dt=_u;var Nu=Dt.Symbol;const me=Nu;var zn=Object.prototype,wu=zn.hasOwnProperty,Tu=zn.toString,Fe=me?me.toStringTag:void 0;function Au(e){var t=wu.call(e,Fe),r=e[Fe];try{e[Fe]=void 0;var n=!0}catch{}var o=Tu.call(e);return n&&(t?e[Fe]=r:delete e[Fe]),o}var Cu=Object.prototype,yu=Cu.toString;function Lu(e){return yu.call(e)}var Du="[object Null]",Pu="[object Undefined]",Jn=me?me.toStringTag:void 0;function Qn(e){return e==null?e===void 0?Pu:Du:Jn&&Jn in Object(e)?Au(e):Lu(e)}function Uu(e){return e!=null&&typeof e=="object"}var xu="[object Symbol]";function Pt(e){return typeof e=="symbol"||Uu(e)&&Qn(e)==xu}function ku(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Fu=Array.isArray;const Ut=Fu;var Mu=1/0,Zn=me?me.prototype:void 0,eo=Zn?Zn.toString:void 0;function to(e){if(typeof e=="string")return e;if(Ut(e))return ku(e,to)+"";if(Pt(e))return eo?eo.call(e):"";var t=e+"";return t=="0"&&1/e==-Mu?"-0":t}function ro(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var $u="[object AsyncFunction]",Bu="[object Function]",ju="[object GeneratorFunction]",Gu="[object Proxy]";function Hu(e){if(!ro(e))return!1;var t=Qn(e);return t==Bu||t==ju||t==$u||t==Gu}var Vu=Dt["__core-js_shared__"];const xt=Vu;var no=function(){var e=/[^.]+$/.exec(xt&&xt.keys&&xt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function qu(e){return!!no&&no in e}var Yu=Function.prototype,Xu=Yu.toString;function Wu(e){if(e!=null){try{return Xu.call(e)}catch{}try{return e+""}catch{}}return""}var Ku=/[\\^$.*+?()[\]{}|]/g,zu=/^\[object .+?Constructor\]$/,Ju=Function.prototype,Qu=Object.prototype,Zu=Ju.toString,ec=Qu.hasOwnProperty,tc=RegExp("^"+Zu.call(ec).replace(Ku,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rc(e){if(!ro(e)||qu(e))return!1;var t=Hu(e)?tc:zu;return t.test(Wu(e))}function nc(e,t){return e==null?void 0:e[t]}function oo(e,t){var r=nc(e,t);return rc(r)?r:void 0}function oc(e,t){return e===t||e!==e&&t!==t}var ic=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sc=/^\w*$/;function ac(e,t){if(Ut(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Pt(e)?!0:sc.test(e)||!ic.test(e)||t!=null&&e in Object(t)}var uc=oo(Object,"create");const Me=uc;function cc(){this.__data__=Me?Me(null):{},this.size=0}function lc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var fc="__lodash_hash_undefined__",dc=Object.prototype,Ec=dc.hasOwnProperty;function hc(e){var t=this.__data__;if(Me){var r=t[e];return r===fc?void 0:r}return Ec.call(t,e)?t[e]:void 0}var vc=Object.prototype,pc=vc.hasOwnProperty;function gc(e){var t=this.__data__;return Me?t[e]!==void 0:pc.call(t,e)}var mc="__lodash_hash_undefined__";function Sc(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Me&&t===void 0?mc:t,this}function re(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}re.prototype.clear=cc,re.prototype.delete=lc,re.prototype.get=hc,re.prototype.has=gc,re.prototype.set=Sc;function Oc(){this.__data__=[],this.size=0}function Ze(e,t){for(var r=e.length;r--;)if(oc(e[r][0],t))return r;return-1}var bc=Array.prototype,Ic=bc.splice;function Rc(e){var t=this.__data__,r=Ze(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Ic.call(t,r,1),--this.size,!0}function _c(e){var t=this.__data__,r=Ze(t,e);return r<0?void 0:t[r][1]}function Nc(e){return Ze(this.__data__,e)>-1}function wc(e,t){var r=this.__data__,n=Ze(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Se(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Se.prototype.clear=Oc,Se.prototype.delete=Rc,Se.prototype.get=_c,Se.prototype.has=Nc,Se.prototype.set=wc;var Tc=oo(Dt,"Map");const Ac=Tc;function Cc(){this.size=0,this.__data__={hash:new re,map:new(Ac||Se),string:new re}}function yc(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function et(e,t){var r=e.__data__;return yc(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Lc(e){var t=et(this,e).delete(e);return this.size-=t?1:0,t}function Dc(e){return et(this,e).get(e)}function Pc(e){return et(this,e).has(e)}function Uc(e,t){var r=et(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function ne(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ne.prototype.clear=Cc,ne.prototype.delete=Lc,ne.prototype.get=Dc,ne.prototype.has=Pc,ne.prototype.set=Uc;var xc="Expected a function";function kt(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(xc);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(kt.Cache||ne),r}kt.Cache=ne;var kc=500;function Fc(e){var t=kt(e,function(n){return r.size===kc&&r.clear(),n}),r=t.cache;return t}var Mc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$c=/\\(\\)?/g,Bc=Fc(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Mc,function(r,n,o,i){t.push(o?i.replace($c,"$1"):n||r)}),t});const jc=Bc;function Gc(e){return e==null?"":to(e)}function Hc(e,t){return Ut(e)?e:ac(e,t)?[e]:jc(Gc(e))}var Vc=1/0;function qc(e){if(typeof e=="string"||Pt(e))return e;var t=e+"";return t=="0"&&1/e==-Vc?"-0":t}function Yc(e,t){t=Hc(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[qc(t[r++])];return r&&r==n?e:void 0}function k(e,t,r){var n=e==null?void 0:Yc(e,t);return n===void 0?r:n}const io=k(x,"shared.console.blacklist",[]);io.concat(k(x,"fullview.console.blacklist",[])),io.concat(k(x,"other.console.blacklist",[]));const so=k(x,"shared.dom.types.whitelist",[]);so.concat(k(x,"fullview.dom.types.whitelist",[])),so.concat(k(x,"other.dom.types.whitelist",[]));const ao=k(x,"shared.dom.tags.blacklist",[]);ao.concat(k(x,"fullview.dom.tags.blacklist",[])),ao.concat(k(x,"other.dom.tags.blacklist",[]));const uo=k(x,"shared.network.blacklist",[]);uo.concat(k(x,"fullview.network.blacklist",[])),uo.concat(k(x,"other.network.blacklist",[]));function Xc(e,t){const r=t.isActualSDK?hu:Eu,n=new URL(t.isLocalProcess&&r.local||r[e]);return(t.isLocalProcess||!1)&&n.searchParams.set("o",t.organisationId),!t.isLocalProcess&&t.addVersionInParams&&n.searchParams.set("v",t.addVersionInParams),n.toString().replace(/^https?:/,"").replace(/\/$/,"")}const co=(e,t)=>{const r=Xc(e,t),n=document.createElement("script");return n.async=!0,n.src=r,n.dataset.org=t.organisationId,n};typeof window<"u"&&(window.$fvSDKScript=document.currentScript);function Wc(e){var d;const t="fvOrg",r=[/install\.(?:[a-z0-9-]+.)?fullview\.io/i];e||r.push(/localhost:30\d\d/i);let n;const o=new URLSearchParams(location.search),i=o.get("o"),s=localStorage.getItem(t),a=o.get("overrule"),u=r.map(f=>f.test(location.host)).reduce((f,c)=>f||c,!1);if(s||i&&(u||!!a))n=s||i||void 0;else if(window.$fvSDKScript&&window.$fvSDKScript.dataset.org)n=window.$fvSDKScript.dataset.org;else{const f=(d=Array.from(document.querySelectorAll("script")).filter(c=>r.map(E=>E.test(c.src)).reduce((E,v)=>E||v,!1))[0])==null?void 0:d.src;if(f){const c=(f||"").split("?")[1];n=new URLSearchParams(c).get("o")||void 0}}return{organisationId:n}}var lo;(function(e){e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.At=64]="At",e[e.Blank=32]="Blank",e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.Return=13]="Return"})(lo||(lo={}));function Kc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fo=typeof process=="object"&&{APP_ENV:'"prod"',APP_VERSION:'"1.183.0"',APP_NAME:'"sdk-loader"'}&&{APP_ENV:'"prod"',APP_VERSION:'"1.183.0"',APP_NAME:'"sdk-loader"'}.NODE_DEBUG&&/\bsemver\b/i.test({APP_ENV:'"prod"',APP_VERSION:'"1.183.0"',APP_NAME:'"sdk-loader"'}.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};const zc="2.0.0",Jc=256,Qc=Number.MAX_SAFE_INTEGER||9007199254740991;var Eo={SEMVER_SPEC_VERSION:zc,MAX_LENGTH:Jc,MAX_SAFE_INTEGER:Qc,MAX_SAFE_COMPONENT_LENGTH:16},Ft={exports:{}};(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r}=Eo,n=fo;t=e.exports={};const o=t.re=[],i=t.src=[],s=t.t={};let a=0;const u=(d,f,c)=>{const E=a++;n(d,E,f),s[d]=E,i[E]=f,o[E]=new RegExp(f,c?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","[0-9]+"),u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),u("MAINVERSION",`(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${i[s.NUMERICIDENTIFIER]}|${i[s.NONNUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${i[s.NUMERICIDENTIFIERLOOSE]}|${i[s.NONNUMERICIDENTIFIER]})`),u("PRERELEASE",`(?:-(${i[s.PRERELEASEIDENTIFIER]}(?:\\.${i[s.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${i[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[s.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER","[0-9A-Za-z-]+"),u("BUILD",`(?:\\+(${i[s.BUILDIDENTIFIER]}(?:\\.${i[s.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${i[s.MAINVERSION]}${i[s.PRERELEASE]}?${i[s.BUILD]}?`),u("FULL",`^${i[s.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${i[s.MAINVERSIONLOOSE]}${i[s.PRERELEASELOOSE]}?${i[s.BUILD]}?`),u("LOOSE",`^${i[s.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",`${i[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),u("XRANGEIDENTIFIER",`${i[s.NUMERICIDENTIFIER]}|x|X|\\*`),u("XRANGEPLAIN",`[v=\\s]*(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:${i[s.PRERELEASE]})?${i[s.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:${i[s.PRERELEASELOOSE]})?${i[s.BUILD]}?)?)?`),u("XRANGE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAINLOOSE]}$`),u("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),u("COERCERTL",i[s.COERCE],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${i[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",u("TILDE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${i[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",u("CARET",`^${i[s.LONECARET]}${i[s.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${i[s.LONECARET]}${i[s.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${i[s.GTLT]}\\s*(${i[s.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]}|${i[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${i[s.XRANGEPLAIN]})\\s+-\\s+(${i[s.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${i[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[s.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Ft,Ft.exports);const Zc=["includePrerelease","loose","rtl"];var el=e=>e?typeof e!="object"?{loose:!0}:Zc.filter(t=>e[t]).reduce((t,r)=>(t[r]=!0,t),{}):{};const ho=/^[0-9]+$/,vo=(e,t)=>{const r=ho.test(e),n=ho.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1};var tl={compareIdentifiers:vo,rcompareIdentifiers:(e,t)=>vo(t,e)};const tt=fo,{MAX_LENGTH:po,MAX_SAFE_INTEGER:rt}=Eo,{re:go,t:mo}=Ft.exports,rl=el,{compareIdentifiers:Oe}=tl;class M{constructor(t,r){if(r=rl(r),t instanceof M){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid Version: ${t}`);if(t.length>po)throw new TypeError(`version is longer than ${po} characters`);tt("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?go[mo.LOOSE]:go[mo.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>rt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>rt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>rt||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){const i=+o;if(i>=0&&i<rt)return i}return o}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(tt("SemVer.compare",this.version,this.options,t),!(t instanceof M)){if(typeof t=="string"&&t===this.version)return 0;t=new M(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof M||(t=new M(t,this.options)),Oe(this.major,t.major)||Oe(this.minor,t.minor)||Oe(this.patch,t.patch)}comparePre(t){if(t instanceof M||(t=new M(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{const n=this.prerelease[r],o=t.prerelease[r];if(tt("prerelease compare",r,n,o),n===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(n===void 0)return-1;if(n===o)continue;return Oe(n,o)}while(++r)}compareBuild(t){t instanceof M||(t=new M(t,this.options));let r=0;do{const n=this.build[r],o=t.build[r];if(tt("prerelease compare",r,n,o),n===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(n===void 0)return-1;if(n===o)continue;return Oe(n,o)}while(++r)}inc(t,r){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}r&&(Oe(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${t}`)}return this.format(),this.raw=this.version,this}}var nl=M;const So=nl;var ol=(e,t,r)=>new So(e,r).compare(new So(t,r));const il=ol;var sl=(e,t,r)=>il(e,t,r)<0;function al(e,t){return sl(e,t)}var Oo={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(u,d,f){this.fn=u,this.context=d,this.once=f||!1}function i(u,d,f,c,E){if(typeof f!="function")throw new TypeError("The listener must be a function");var v=new o(f,c||u,E),S=r?r+d:d;return u._events[S]?u._events[S].fn?u._events[S]=[u._events[S],v]:u._events[S].push(v):(u._events[S]=v,u._eventsCount++),u}function s(u,d){--u._eventsCount===0?u._events=new n:delete u._events[d]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var d=[],f,c;if(this._eventsCount===0)return d;for(c in f=this._events)t.call(f,c)&&d.push(r?c.slice(1):c);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(f)):d},a.prototype.listeners=function(d){var f=r?r+d:d,c=this._events[f];if(!c)return[];if(c.fn)return[c.fn];for(var E=0,v=c.length,S=new Array(v);E<v;E++)S[E]=c[E].fn;return S},a.prototype.listenerCount=function(d){var f=r?r+d:d,c=this._events[f];return c?c.fn?1:c.length:0},a.prototype.emit=function(d,f,c,E,v,S){var I=r?r+d:d;if(!this._events[I])return!1;var m=this._events[I],_=arguments.length,g,b;if(m.fn){switch(m.once&&this.removeListener(d,m.fn,void 0,!0),_){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,f),!0;case 3:return m.fn.call(m.context,f,c),!0;case 4:return m.fn.call(m.context,f,c,E),!0;case 5:return m.fn.call(m.context,f,c,E,v),!0;case 6:return m.fn.call(m.context,f,c,E,v,S),!0}for(b=1,g=new Array(_-1);b<_;b++)g[b-1]=arguments[b];m.fn.apply(m.context,g)}else{var p=m.length,P;for(b=0;b<p;b++)switch(m[b].once&&this.removeListener(d,m[b].fn,void 0,!0),_){case 1:m[b].fn.call(m[b].context);break;case 2:m[b].fn.call(m[b].context,f);break;case 3:m[b].fn.call(m[b].context,f,c);break;case 4:m[b].fn.call(m[b].context,f,c,E);break;default:if(!g)for(P=1,g=new Array(_-1);P<_;P++)g[P-1]=arguments[P];m[b].fn.apply(m[b].context,g)}}return!0},a.prototype.on=function(d,f,c){return i(this,d,f,c,!1)},a.prototype.once=function(d,f,c){return i(this,d,f,c,!0)},a.prototype.removeListener=function(d,f,c,E){var v=r?r+d:d;if(!this._events[v])return this;if(!f)return s(this,v),this;var S=this._events[v];if(S.fn)S.fn===f&&(!E||S.once)&&(!c||S.context===c)&&s(this,v);else{for(var I=0,m=[],_=S.length;I<_;I++)(S[I].fn!==f||E&&!S[I].once||c&&S[I].context!==c)&&m.push(S[I]);m.length?this._events[v]=m.length===1?m[0]:m:s(this,v)}return this},a.prototype.removeAllListeners=function(d){var f;return d?(f=r?r+d:d,this._events[f]&&s(this,f)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a})(Oo);class ul{constructor(){H(this,"emitter",new Oo.exports.EventEmitter)}emit(t,...r){this.emitter.emit(t,...r)}off(t,r){this.emitter.off(t,r)}offPipe(t,r){return this.off(t,r),this}on(t,r){return this.emitter.on(t,r),()=>this.off(t,r)}onPipe(t,r){return this.on(t,r),this}once(t,r){return this.emitter.once(t,r),()=>this.off(t,r)}oncePipe(t,r){return this.once(t,r),this}}const cl=new ul,F={...nn(),context:"sdk-loader"};function ll(){return L.setMeta({runtime:F}),L.log("runtime",`v${F.version}`,F),()=>{}}function fl(){return window.Fullview=X(window.$fvLastIdentify),()=>{window.Fullview=X()}}var bo={exports:{}},Mt={exports:{}},Io=function(t,r){return function(){for(var o=new Array(arguments.length),i=0;i<o.length;i++)o[i]=arguments[i];return t.apply(r,o)}},dl=Io,z=Object.prototype.toString;function $t(e){return Array.isArray(e)}function Bt(e){return typeof e>"u"}function El(e){return e!==null&&!Bt(e)&&e.constructor!==null&&!Bt(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Ro(e){return z.call(e)==="[object ArrayBuffer]"}function hl(e){return z.call(e)==="[object FormData]"}function vl(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ro(e.buffer),t}function pl(e){return typeof e=="string"}function gl(e){return typeof e=="number"}function _o(e){return e!==null&&typeof e=="object"}function nt(e){if(z.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function ml(e){return z.call(e)==="[object Date]"}function Sl(e){return z.call(e)==="[object File]"}function Ol(e){return z.call(e)==="[object Blob]"}function No(e){return z.call(e)==="[object Function]"}function bl(e){return _o(e)&&No(e.pipe)}function Il(e){return z.call(e)==="[object URLSearchParams]"}function Rl(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function _l(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function jt(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),$t(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}function Gt(){var e={};function t(o,i){nt(e[i])&&nt(o)?e[i]=Gt(e[i],o):nt(o)?e[i]=Gt({},o):$t(o)?e[i]=o.slice():e[i]=o}for(var r=0,n=arguments.length;r<n;r++)jt(arguments[r],t);return e}function Nl(e,t,r){return jt(t,function(o,i){r&&typeof o=="function"?e[i]=dl(o,r):e[i]=o}),e}function wl(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var y={isArray:$t,isArrayBuffer:Ro,isBuffer:El,isFormData:hl,isArrayBufferView:vl,isString:pl,isNumber:gl,isObject:_o,isPlainObject:nt,isUndefined:Bt,isDate:ml,isFile:Sl,isBlob:Ol,isFunction:No,isStream:bl,isURLSearchParams:Il,isStandardBrowserEnv:_l,forEach:jt,merge:Gt,extend:Nl,trim:Rl,stripBOM:wl},be=y;function wo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var To=function(t,r,n){if(!r)return t;var o;if(n)o=n(r);else if(be.isURLSearchParams(r))o=r.toString();else{var i=[];be.forEach(r,function(u,d){u===null||typeof u>"u"||(be.isArray(u)?d=d+"[]":u=[u],be.forEach(u,function(c){be.isDate(c)?c=c.toISOString():be.isObject(c)&&(c=JSON.stringify(c)),i.push(wo(d)+"="+wo(c))}))}),o=i.join("&")}if(o){var s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t},Tl=y;function ot(){this.handlers=[]}ot.prototype.use=function(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1},ot.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},ot.prototype.forEach=function(t){Tl.forEach(this.handlers,function(n){n!==null&&t(n)})};var Al=ot,Cl=y,yl=function(t,r){Cl.forEach(t,function(o,i){i!==r&&i.toUpperCase()===r.toUpperCase()&&(t[r]=o,delete t[i])})},Ao=function(t,r,n,o,i){return t.config=r,n&&(t.code=n),t.request=o,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t},Co={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ht,yo;function Lo(){if(yo)return Ht;yo=1;var e=Ao;return Ht=function(r,n,o,i,s){var a=new Error(r);return e(a,n,o,i,s)},Ht}var Vt,Do;function Ll(){if(Do)return Vt;Do=1;var e=Lo();return Vt=function(r,n,o){var i=o.config.validateStatus;!o.status||!i||i(o.status)?r(o):n(e("Request failed with status code "+o.status,o.config,null,o.request,o))},Vt}var qt,Po;function Dl(){if(Po)return qt;Po=1;var e=y;return qt=e.isStandardBrowserEnv()?function(){return{write:function(n,o,i,s,a,u){var d=[];d.push(n+"="+encodeURIComponent(o)),e.isNumber(i)&&d.push("expires="+new Date(i).toGMTString()),e.isString(s)&&d.push("path="+s),e.isString(a)&&d.push("domain="+a),u===!0&&d.push("secure"),document.cookie=d.join("; ")},read:function(n){var o=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),qt}var Yt,Uo;function Pl(){return Uo||(Uo=1,Yt=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),Yt}var Xt,xo;function Ul(){return xo||(xo=1,Xt=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t}),Xt}var Wt,ko;function xl(){if(ko)return Wt;ko=1;var e=Pl(),t=Ul();return Wt=function(n,o){return n&&!e(o)?t(n,o):o},Wt}var Kt,Fo;function kl(){if(Fo)return Kt;Fo=1;var e=y,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Kt=function(n){var o={},i,s,a;return n&&e.forEach(n.split(`
`),function(d){if(a=d.indexOf(":"),i=e.trim(d.substr(0,a)).toLowerCase(),s=e.trim(d.substr(a+1)),i){if(o[i]&&t.indexOf(i)>=0)return;i==="set-cookie"?o[i]=(o[i]?o[i]:[]).concat([s]):o[i]=o[i]?o[i]+", "+s:s}}),o},Kt}var zt,Mo;function Fl(){if(Mo)return zt;Mo=1;var e=y;return zt=e.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),o;function i(s){var a=s;return r&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=i(window.location.href),function(a){var u=e.isString(a)?i(a):a;return u.protocol===o.protocol&&u.host===o.host}}():function(){return function(){return!0}}(),zt}var Jt,$o;function it(){if($o)return Jt;$o=1;function e(t){this.message=t}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,Jt=e,Jt}var Qt,Bo;function jo(){if(Bo)return Qt;Bo=1;var e=y,t=Ll(),r=Dl(),n=To,o=xl(),i=kl(),s=Fl(),a=Lo(),u=Co,d=it();return Qt=function(c){return new Promise(function(v,S){var I=c.data,m=c.headers,_=c.responseType,g;function b(){c.cancelToken&&c.cancelToken.unsubscribe(g),c.signal&&c.signal.removeEventListener("abort",g)}e.isFormData(I)&&delete m["Content-Type"];var p=new XMLHttpRequest;if(c.auth){var P=c.auth.username||"",oe=c.auth.password?unescape(encodeURIComponent(c.auth.password)):"";m.Authorization="Basic "+btoa(P+":"+oe)}var ui=o(c.baseURL,c.url);p.open(c.method.toUpperCase(),n(ui,c.params,c.paramsSerializer),!0),p.timeout=c.timeout;function ci(){if(!!p){var $="getAllResponseHeaders"in p?i(p.getAllResponseHeaders()):null,Re=!_||_==="text"||_==="json"?p.responseText:p.response,ie={data:Re,status:p.status,statusText:p.statusText,headers:$,config:c,request:p};t(function(ur){v(ur),b()},function(ur){S(ur),b()},ie),p=null}}if("onloadend"in p?p.onloadend=ci:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(ci)},p.onabort=function(){!p||(S(a("Request aborted",c,"ECONNABORTED",p)),p=null)},p.onerror=function(){S(a("Network Error",c,null,p)),p=null},p.ontimeout=function(){var Re=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded",ie=c.transitional||u;c.timeoutErrorMessage&&(Re=c.timeoutErrorMessage),S(a(Re,c,ie.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},e.isStandardBrowserEnv()){var li=(c.withCredentials||s(ui))&&c.xsrfCookieName?r.read(c.xsrfCookieName):void 0;li&&(m[c.xsrfHeaderName]=li)}"setRequestHeader"in p&&e.forEach(m,function(Re,ie){typeof I>"u"&&ie.toLowerCase()==="content-type"?delete m[ie]:p.setRequestHeader(ie,Re)}),e.isUndefined(c.withCredentials)||(p.withCredentials=!!c.withCredentials),_&&_!=="json"&&(p.responseType=c.responseType),typeof c.onDownloadProgress=="function"&&p.addEventListener("progress",c.onDownloadProgress),typeof c.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",c.onUploadProgress),(c.cancelToken||c.signal)&&(g=function($){!p||(S(!$||$&&$.type?new d("canceled"):$),p.abort(),p=null)},c.cancelToken&&c.cancelToken.subscribe(g),c.signal&&(c.signal.aborted?g():c.signal.addEventListener("abort",g))),I||(I=null),p.send(I)})},Qt}var w=y,Go=yl,Ml=Ao,$l=Co,Bl={"Content-Type":"application/x-www-form-urlencoded"};function Ho(e,t){!w.isUndefined(e)&&w.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function jl(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=jo()),e}function Gl(e,t,r){if(w.isString(e))try{return(t||JSON.parse)(e),w.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var st={transitional:$l,adapter:jl(),transformRequest:[function(t,r){return Go(r,"Accept"),Go(r,"Content-Type"),w.isFormData(t)||w.isArrayBuffer(t)||w.isBuffer(t)||w.isStream(t)||w.isFile(t)||w.isBlob(t)?t:w.isArrayBufferView(t)?t.buffer:w.isURLSearchParams(t)?(Ho(r,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):w.isObject(t)||r&&r["Content-Type"]==="application/json"?(Ho(r,"application/json"),Gl(t)):t}],transformResponse:[function(t){var r=this.transitional||st.transitional,n=r&&r.silentJSONParsing,o=r&&r.forcedJSONParsing,i=!n&&this.responseType==="json";if(i||o&&w.isString(t)&&t.length)try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?Ml(s,this,"E_JSON_PARSE"):s}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};w.forEach(["delete","get","head"],function(t){st.headers[t]={}}),w.forEach(["post","put","patch"],function(t){st.headers[t]=w.merge(Bl)});var Zt=st,Hl=y,Vl=Zt,ql=function(t,r,n){var o=this||Vl;return Hl.forEach(n,function(s){t=s.call(o,t,r)}),t},er,Vo;function qo(){return Vo||(Vo=1,er=function(t){return!!(t&&t.__CANCEL__)}),er}var Yo=y,tr=ql,Yl=qo(),Xl=Zt,Wl=it();function rr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wl("canceled")}var Kl=function(t){rr(t),t.headers=t.headers||{},t.data=tr.call(t,t.data,t.headers,t.transformRequest),t.headers=Yo.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Yo.forEach(["delete","get","head","post","put","patch","common"],function(o){delete t.headers[o]});var r=t.adapter||Xl.adapter;return r(t).then(function(o){return rr(t),o.data=tr.call(t,o.data,o.headers,t.transformResponse),o},function(o){return Yl(o)||(rr(t),o&&o.response&&(o.response.data=tr.call(t,o.response.data,o.response.headers,t.transformResponse))),Promise.reject(o)})},D=y,Xo=function(t,r){r=r||{};var n={};function o(f,c){return D.isPlainObject(f)&&D.isPlainObject(c)?D.merge(f,c):D.isPlainObject(c)?D.merge({},c):D.isArray(c)?c.slice():c}function i(f){if(D.isUndefined(r[f])){if(!D.isUndefined(t[f]))return o(void 0,t[f])}else return o(t[f],r[f])}function s(f){if(!D.isUndefined(r[f]))return o(void 0,r[f])}function a(f){if(D.isUndefined(r[f])){if(!D.isUndefined(t[f]))return o(void 0,t[f])}else return o(void 0,r[f])}function u(f){if(f in r)return o(t[f],r[f]);if(f in t)return o(void 0,t[f])}var d={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return D.forEach(Object.keys(t).concat(Object.keys(r)),function(c){var E=d[c]||i,v=E(c);D.isUndefined(v)&&E!==u||(n[c]=v)}),n},nr,Wo;function Ko(){return Wo||(Wo=1,nr={version:"0.26.1"}),nr}var zl=Ko().version,or={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){or[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var zo={};or.transitional=function(t,r,n){function o(i,s){return"[Axios v"+zl+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return function(i,s,a){if(t===!1)throw new Error(o(s," has been removed"+(r?" in "+r:"")));return r&&!zo[s]&&(zo[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,a):!0}};function Jl(e,t,r){if(typeof e!="object")throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],s=t[i];if(s){var a=e[i],u=a===void 0||s(a,i,e);if(u!==!0)throw new TypeError("option "+i+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+i)}}var Ql={assertOptions:Jl,validators:or},Jo=y,Zl=To,Qo=Al,Zo=Kl,at=Xo,ei=Ql,Ie=ei.validators;function $e(e){this.defaults=e,this.interceptors={request:new Qo,response:new Qo}}$e.prototype.request=function(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=at(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var n=r.transitional;n!==void 0&&ei.assertOptions(n,{silentJSONParsing:Ie.transitional(Ie.boolean),forcedJSONParsing:Ie.transitional(Ie.boolean),clarifyTimeoutError:Ie.transitional(Ie.boolean)},!1);var o=[],i=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(i=i&&v.synchronous,o.unshift(v.fulfilled,v.rejected))});var s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});var a;if(!i){var u=[Zo,void 0];for(Array.prototype.unshift.apply(u,o),u=u.concat(s),a=Promise.resolve(r);u.length;)a=a.then(u.shift(),u.shift());return a}for(var d=r;o.length;){var f=o.shift(),c=o.shift();try{d=f(d)}catch(E){c(E);break}}try{a=Zo(d)}catch(E){return Promise.reject(E)}for(;s.length;)a=a.then(s.shift(),s.shift());return a},$e.prototype.getUri=function(t){return t=at(this.defaults,t),Zl(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},Jo.forEach(["delete","get","head","options"],function(t){$e.prototype[t]=function(r,n){return this.request(at(n||{},{method:t,url:r,data:(n||{}).data}))}}),Jo.forEach(["post","put","patch"],function(t){$e.prototype[t]=function(r,n,o){return this.request(at(o||{},{method:t,url:r,data:n}))}});var ef=$e,ir,ti;function tf(){if(ti)return ir;ti=1;var e=it();function t(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(s){n=s});var o=this;this.promise.then(function(i){if(!!o._listeners){var s,a=o._listeners.length;for(s=0;s<a;s++)o._listeners[s](i);o._listeners=null}}),this.promise.then=function(i){var s,a=new Promise(function(u){o.subscribe(u),s=u}).then(i);return a.cancel=function(){o.unsubscribe(s)},a},r(function(s){o.reason||(o.reason=new e(s),n(o.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]},t.prototype.unsubscribe=function(n){if(!!this._listeners){var o=this._listeners.indexOf(n);o!==-1&&this._listeners.splice(o,1)}},t.source=function(){var n,o=new t(function(s){n=s});return{token:o,cancel:n}},ir=t,ir}var sr,ri;function rf(){return ri||(ri=1,sr=function(t){return function(n){return t.apply(null,n)}}),sr}var ar,ni;function nf(){if(ni)return ar;ni=1;var e=y;return ar=function(r){return e.isObject(r)&&r.isAxiosError===!0},ar}var oi=y,of=Io,ut=ef,sf=Xo,af=Zt;function ii(e){var t=new ut(e),r=of(ut.prototype.request,t);return oi.extend(r,ut.prototype,t),oi.extend(r,t),r.create=function(o){return ii(sf(e,o))},r}var G=ii(af);G.Axios=ut,G.Cancel=it(),G.CancelToken=tf(),G.isCancel=qo(),G.VERSION=Ko().version,G.all=function(t){return Promise.all(t)},G.spread=rf(),G.isAxiosError=nf(),Mt.exports=G,Mt.exports.default=G,function(e){e.exports=Mt.exports}(bo);const si=Kc(bo.exports).create();si.interceptors.request.use(e=>Ou(e));function ai(e,t){return si.get(`${du[F.env]}/api/v1/config/frontend/${t}/${e}`)}const uf=1e3*60*60*1;function cf(e){if(F.isLocalProcess)return()=>{};const t=document.currentScript,r=()=>{ai(e,"sdk-loader").then(o=>{var f,c;const{version:i,isBlocked:s}=o.data.data;if(s||!i||i==="n/a"){(f=window.$fvUnloadSDKLoader)==null||f.call(window),L.log("version",`Organisation ${e} is blocked or SDK version is not provided`);return}const a=F.version,u=i;if(a===u){L.log("version",`SDK version same as the running one (v${a}) \u2013 no update needed`);return}if(!al(a,u)){L.log("version",`SDK reference version (v${u}) is behind running one (v${a}) \u2013 no update needed`);return}if(!(t instanceof HTMLScriptElement)){L.error("version","SDK loader script not found");return}L.warn("version",`SDK new version available v${a} \u2192 v${u}`),(c=window.$fvUnloadSDKLoader)==null||c.call(window);const d=co(F.env,{organisationId:e,isLocalProcess:F.isLocalProcess,addVersionInParams:u});document.head.insertBefore(d,document.head.firstChild)}).catch(()=>{})},n=window.setInterval(r,uf);return()=>{window.clearInterval(n),t==null||t.remove()}}function lf(){const{organisationId:e}=Wc(F.isProd);if(!e)return L.warn("runtime","No organisation ID provided. SDK will not be loaded."),()=>{};let t=()=>{},r=()=>{};return ai(e,"sdk").then(n=>{const{version:o,isBlocked:i}=n.data.data;if(!i&&!!o){const s=co(F.env,{organisationId:e,isLocalProcess:F.isLocalProcess,addVersionInParams:o,isActualSDK:!0});F.isLocalProcess&&(s.type="module"),document.head.insertBefore(s,document.head.firstChild),t=()=>{s.remove()},r=cf(e)}else L.log("version",`Organisation ${e} is blocked or SDK version is not provided`)}).catch(n=>{L.error("runtime","No SDK version provided. SDK will not be loaded.",{err:n})}),()=>{t(),r()}}try{const e=[fl(),ll(),lf()];window.$fvUnloadSDKLoader=()=>{var t;L.log("process","Unloading SDK loader"),(t=window.$fvUnloadSDK)==null||t.call(window),cl.emit("unload"),e.forEach(r=>r()),delete window.$fvUnloadSDKLoader}}catch(e){L.error("unhandled","Top level error",e)}})();
