vendor: 6,038 bytes, lines 1-4
1import{n as Ti}from"./navigation.BVwrKc6P.js";import{Q as Oi,G as _i,j as Ii,e as xi,S as ki,w as Ai}from"./web-vitals.D2fGf8fN.js";function X(e,t){return typeof e===t}function et(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function Pn(e,t){try{return e instanceof t}catch{return!1}}const Me=(e=>X(e,"null")),je=(e=>X(e,"string")),Pi=(e=>X(e,"number")&&!isNaN(e)||X(e,"bigint")),Ri=(e=>X(e,"boolean")),$=(e=>!Me(e)&&X(e,"object")),Ue=(e=>X(e,"function")),Pe=(e=>et(e,"Array")),Ni=(e=>!$(e)&&!Ue(e)),Mi=typeof Event<"u",ji=(e=>Mi&&Pn(e,Event)),Ui=typeof Error<"u",Nt=(e=>Ui&&Pn(e,Error)),Ci=(e=>et(e,"ErrorEvent")),Di=(e=>et(e,"DOMError")),Li=(e=>et(e,"DOMException"));function re(e){return e==null?!0:Pe(e)||je(e)?e.length===0:$(e)?Object.keys(e).length===0:!1}function se(e,t){if(e===t)return!0;if(X(e,"number")&&isNaN(e))return X(t,"number")&&isNaN(t);const n=Pe(e),i=Pe(t);if(n!==i)return!1;if(n&&i){const o=e.length;if(o!==t.length)return!1;for(let a=o;a--!==0;)if(!se(e[a],t[a]))return!1;return!0}const s=$(e),r=$(t);if(s!==r)return!1;if(e&&t&&s&&r){const o=Object.keys(e),a=Object.keys(t),u=o.length,f=a.length;if(u!==f)return!1;for(let d of o)if(!a.includes(d))return!1;for(let d of o)if(!se(e[d],t[d]))return!1;return!0}return!1}function ne(){return Date.now()}function tt(){return new Date().toISOString()}function nt(e){return new Date(e).toISOString()}var U;(function(e){e.TRACE="trace",e.DEBUG="debug",e.INFO="info",e.LOG="log",e.WARN="warn",e.ERROR="error"})(U||(U={}));const Bi=U.LOG,Fi=[U.TRACE,U.DEBUG,U.INFO,U.LOG,U.WARN,U.ERROR];function Y(){}function zi(e){const{size:t,concurrency:n}=e,i=[];let s=0;const r=()=>{if(s<n&&i.length){const{producer:a,resolve:u,reject:f}=i.shift();s++,a().then(d=>{s--,r(),u(d)},d=>{s--,r(),f(d)})}};return{add:a=>{if(i.length+s>=t)throw new Error("Task buffer full");return new Promise((u,f)=>{i.push({producer:a,resolve:u,reject:f}),r()})}}}const nn="abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789";function ue(e=10){return Array.from(Array(e)).map(()=>nn[Math.floor(Math.random()*nn.length)]).join("")}const ae=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:void 0;function Vi(e){return ae?.[`__faroBundleId_${e}`]}function qi(){const e=new WeakSet;return function(t,n){if($(n)&&n!==null){if(e.has(n))return null;e.add(n)}return n}}function Ce(e={}){return JSON.stringify(e??{},qi())}function he(e={}){const t={};for(const[n,i]of Object.entries(e))t[n]=$(i)&&i!==null?Ce(i):String(i);return t}class V{constructor(){this.subscribers=[]}subscribe(t){return this.subscribers.push(t),{unsubscribe:()=>this.unsubscribe(t)}}unsubscribe(t){this.subscribers=this.subscribers.filter(n=>n!==t)}notify(t){this.subscribers.forEach(n=>n(t))}first(){const t=new V,n=r=>{t.notify(r),i.unsubscribe()},i=this.subscribe(n),s=t.unsubscribe.bind(t);return this.withUnsubscribeOverride(t,s,n)}takeWhile(t){const n=new V,i=r=>{t(r)?n.notify(r):n.unsubscribe(i)};this.subscribe(i);const s=n.unsubscribe.bind(n);return this.withUnsubscribeOverride(n,s,i)}filter(t){const n=new V,i=r=>{t(r)&&n.notify(r)};this.subscribe(i);const s=n.unsubscribe.bind(n);return this.withUnsubscribeOverride(n,s,i)}merge(...t){const n=new V,i=[];t.forEach(r=>{const o=r.subscribe(a=>{n.notify(a)});i.push(o)});const s=n.unsubscribeAll.bind(n);return n.unsubscribe=()=>{i.forEach(r=>r.unsubscribe()),s()},n}withUnsubscribeOverride(t,n,i){return t.unsubscribe=s=>{n(s),this.unsubscribe(i)},t}unsubscribeAll(){this.subscribers=[]}}const Hi=250,Gi=50;class $i{constructor(t,n){var i,s;this.signalBuffer=[],this.itemLimit=(i=n?.itemLimit)!==null&&i!==void 0?i:Gi,this.sendTimeout=(s=n?.sendTimeout)!==null&&s!==void 0?s:Hi,this.paused=n?.paused||!1,this.sendFn=t,this.flushInterval=-1,this.paused||this.start(),document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&this.flush()})}addItem(t){this.paused||(this.signalBuffer.push(t),this.signalBuffer.length>=this.itemLimit&&this.flush())}start(){this.paused=!1,this.sendTimeout>0&&(this.flushInterval=window.setInterval(()=>this.flush(),this.sendTimeout))}pause(){this.paused=!0,clearInterval(this.flushInterval)}groupItems(t){const n=new Map;return t.forEach(i=>{const s=JSON.stringify(i.meta);let r=n.get(s);r===void 0?r=[i]:r=[...r,i],n.set(s,r)}),Array.from(n.values())}flush(){if(this.paused||this.signalBuffer.length===0)return;this.groupItems(this.signalBuffer).forEach(this.sendFn),this.signalBuffer=[]}}var N;(function(e){e.EXCEPTION="exception",e.LOG="log",e.MEASUREMENT="measurement",e.TRACE="trace",e.EVENT="event"})(N||(N={}));const Wi={[N.EXCEPTION]:"exceptions",[N.LOG]:"logs",[N.MEASUREMENT]:"measurements",[N.TRACE]:"traces",[N.EVENT]:"events"};function Ki(e,t,n,i){var s;t.debug("Initializing transports");const r=[];let o=n.paused,a=[];const u=(...S)=>{t.debug("Adding transports"),S.forEach(w=>{if(t.debug(`Adding "${w.name}" transport`),r.some(M=>M===w)){t.warn(`Transport ${w.name} is already added`);return}w.unpatchedConsole=e,w.internalLogger=t,w.config=n,w.metas=i,r.push(w)})},f=(...S)=>{t.debug(`Adding beforeSendHooks 2`,a),S.forEach(w=>{w&&a.push(w)})},d=S=>{let w=S;for(const O of a){const M=w.map(O).filter(Boolean);if(M.length===0)return[];w=Yi(M,n)}return w},v=S=>{const w=d(S);if(w.length!==0)for(const O of r)t.debug(`Transporting item using ${O.name} 3`,w),O.isBatched()&&O.send(w)},c=S=>{var w,O;if(!((w=n.batching)===null||w===void 0)&&w.enabled&&r.every(j=>j.isBatched()))return;const[M]=d([S]);if(M!==void 0)for(const j of r)t.debug(`Transporting item using ${j.name} 4`,M),j.isBatched()?!((O=n.batching)===null||O===void 0)&&O.enabled||j.send([M]):j.send(M)};let b;return!((s=n.batching)===null||s===void 0)&&s.enabled&&(b=new $i(v,{sendTimeout:n.batching.sendTimeout,itemLimit:n.batching.itemLimit,paused:o})),{add:u,addBeforeSendHooks:f,getBeforeSendHooks:()=>[...a],execute:S=>{var w;o||(!((w=n.batching)===null||w===void 0)&&w.enabled&&b?.addItem(S),c(S))},isPaused:()=>o,pause:()=>{t.debug("Pausing transports"),b?.pause(),o=!0},remove:(...S)=>
4{t.debug("Removing transports"),S.forEach(w=>{t.debug(`Removing "${w.name}" transport`);const O=r.indexOf(w);if(O===-1){t.warn(`Transport "${w.name}" is not added`);return}r.splice(O,1)})},removeBeforeSendHooks:(...S)=>{a.filter(w=>!S.includes(w))},get transports(){return[...r]},unpause:()=>{t.debug("Unpausing transports"),b?.start(),o=!1}}}function Yi(e,t){if(t.preserveOriginalError)for(const n of e)n.type===N.EXCEPTION&&delete n.payload.originalError;return e}var Q;(function(e){e[e.OFF=0]="OFF",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.VERBOSE=4]="VERBOSE"})(Q||(Q={}));const Xi="Faro",Mt={debug:Y,error:Y,info:Y,prefix:Xi,warn:Y},Rn=Q.ERROR,it=Object.assign({},console);let gt=it;function Ji(e){var t;return gt=(t=e.unpatchedConsole)!==null&&t!==void 0?t:gt,gt}function Nn(e=it,t=Rn){const n=Mt;return t>Q.OFF&&(n.error=t>=Q.ERROR?function(...i){e.error(`${n.prefix} 5`,...i)}:Y,n.warn=t>=Q.WARN?function(...i){e.warn(`${n.prefix} 6`,...i)}:Y,n.info=t>=Q.INFO?function(...i){e.info(`${n.prefix} 7`,...i)}:Y,n.debug=t>=Q.VERBOSE?function(...i){e.debug(`${n.prefix} 8`,...i)}:Y),n}let sn=Mt;function Zi(e,t){return sn=Nn(e,t.internalLoggerLevel),sn}class Mn{constructor(){this.unpatchedConsole=it,this.internalLogger=Mt,this.config={},this.metas={}}logDebug(...t){this.internalLogger.debug(`${this.name} 9`,...t)}logInfo(...t){this.internalLogger.info(`${this.name} 10`,...t)}logWarn(...t){this.internalLogger.warn(`${this.name} 11`,...t)}logError(...t){this.internalLogger.error(`${this.name} 12`,...t)}}class Qi extends Mn{isBatched(){return!1}getIgnoreUrls(){return[]}}function es(e){e.transports.add(...e.config.transports),e.transports.addBeforeSendHooks(e.config.beforeSend)}function ts(e,t){var n,i;if(t===void 0)return e;if(e===void 0)return{resourceSpans:t};const s=(n=e.resourceSpans)===null||n===void 0?void 0:n[0];if(s===void 0)return e;const r=s?.scopeSpans||[],o=((i=t?.[0])===null||i===void 0?void 0:i.scopeSpans)||[];return Object.assign(Object.assign({},e),{resourceSpans:[Object.assign(Object.assign({},s),{scopeSpans:[...r,...o]})]})}function ns(e){let t={meta:{}};return e[0]!==void 0&&(t.meta=e[0].meta),e.forEach(n=>{switch(n.type){case N.LOG:case N.EVENT:case N.EXCEPTION:case N.MEASUREMENT:const i=Wi[n.type],s=t[i];t=Object.assign(Object.assign({},t),{[i]:s===void 0?[n.payload]:[...s,n.payload]});break;case N.TRACE:t=Object.assign(Object.assign({},t),{traces:ts(t.traces,n.payload.resourceSpans)});break}}),t}const ge="user-action-start",jn="user-action-end",Un="user-action-cancel",Cn="user-action-halt";function is({internalLogger:e,config:t,metas:n,transports:i,tracesApi:s,actionBuffer:r,getMessage:o}){let a=null;return{pushEvent:(f,d,v,{skipDedupe:c,spanContext:b,timestampOverwriteMs:l,customPayloadTransformer:p=m=>m}={})=>{try{const m=he(d),y={meta:n.value,payload:p({name:f,domain:v??t.eventDomain,attributes:re(m)?void 0:m,timestamp:l?nt(l):tt(),trace:b?{trace_id:b.traceId,span_id:b.spanId}:s.getTraceContext()}),type:N.EVENT},x={name:y.payload.name,attributes:y.payload.attributes,domain:y.payload.domain};if(!c&&t.dedupe&&!Me(a)&&se(x,a)){e.debug(`Skipping event push because it is the same as the last one 13`,y.payload);return}a=x,e.debug(`Pushing event 14`,y);const g=o();g&&g.type===ge?r.addItem(y):i.execute(y)}catch(m){e.error("Error pushing event",m)}}}}const Dn="Error",rn=e=>e.map(t=>$(t)?Ce(t):String(t)).join(" ");function ss(e,t){return e.some(n=>je(n)?t.includes(n):!!t.match(n))}let Z;function rs({internalLogger:e,config:t,metas:n,transports:i,tracesApi:s,actionBuffer:r,getMessage:o}){var a;e.debug("Initializing exceptions API");let u=null;Z=(a=t.parseStacktrace)!==null&&a!==void 0?a:Z;const f=l=>{e.debug("Changing stacktrace parser"),Z=l??Z},d=()=>Z,{ignoreErrors:v=[],preserveOriginalError:c}=t,b=(l,{skipDedupe:p,stackFrames:m,type:y,context:x,spanContext:g,timestampOverwriteMs:h,originalError:S}={})=>{if(!as(v,S??l))try{const w=he(Object.assign(Object.assign({},os(S??l)),x??{})),O={meta:n.value,payload:Object.assign(Object.assign({type:y||l.name||Dn,value:l.message,timestamp:h?nt(h):tt(),trace:g?{trace_id:g.traceId,span_id:g.spanId}:s.getTraceContext()},re(w)?{}:{context:w}),c?{originalError:S}:{}),type:N.EXCEPTION};m=m??(l.stack?Z?.(l).frames:void 0),m?.length&&(O.payload.stacktrace={frames:m});const M={type:O.payload.type,value:O.payload.value,stackTrace:O.payload.stacktrace,context:O.payload.context};if(!p&&t.dedupe&&!Me(u)&&se(M,u)){e.debug(`Skipping error push because it is the same as the last one 15`,O.payload);return}u=M,e.debug(`Pushing exception 16`,O);const j=o();j&&j.type===ge?r.addItem(O):i.execute(O)}catch(w){e.error("Error pushing event",w)}};return f(t.parseStacktrace),{changeStacktraceParser:f,getStacktraceParser:d,pushError:b}}function os(e){let t=e.cause;return Nt(t)?t=e.cause.toString():t!==null&&($(e.cause)||Pe(e.cause))?t=Ce(e.cause):t!=null&&(t=e.cause.toString()),t==null?{}:{cause:t}}function as(e,t){const{message:n,name:i,stack:s}=t;return ss(e,n+" "+i+" "+s)}const Xe=e=>e.map(t=>{try{return String(t)}catch{return""}}).join(" ");function us({internalLogger:e,config:t,metas:n,transports:i,tracesApi:s,actionBuffer:r,getMessage:o}){var a;e.debug("Initializing logs API");let u=null;
16const f=(a=t.logArgsSerializer)!==null&&a!==void 0?a:Xe;return{pushLog:(v,{context:c,level:b,skipDedupe:l,spanContext:p,timestampOverwriteMs:m}={})=>{try{const y=he(c),x={type:N.LOG,payload:{message:f(v),level:b??Bi,context:re(y)?void 0:y,timestamp:m?nt(m):tt(),trace:p?{trace_id:p.traceId,span_id:p.spanId}:s.getTraceContext()},meta:n.value},g={message:x.payload.message,level:x.payload.level,context:x.payload.context};if(!l&&t.dedupe&&!Me(u)&&se(g,u)){e.debug(`Skipping log push because it is the same as the last one 17`,x.payload);return}u=g,e.debug(`Pushing log 18`,x);const h=o();h&&h.type===ge?r.addItem(x):i.execute(x)}catch(y){e.error(`Error pushing log 19`,y)}}}}function cs({internalLogger:e,config:t,metas:n,transports:i,tracesApi:s,actionBuffer:r,getMessage:o}){e.debug("Initializing measurements API");let a=null;return{pushMeasurement:(f,{skipDedupe:d,context:v,spanContext:c,timestampOverwriteMs:b}={})=>{try{const l=he(v),p={type:N.MEASUREMENT,payload:Object.assign(Object.assign({},f),{trace:c?{trace_id:c.traceId,span_id:c.spanId}:s.getTraceContext(),timestamp:b?nt(b):tt(),context:re(l)?void 0:l}),meta:n.value},m={type:p.payload.type,values:p.payload.values,context:p.payload.context};if(!d&&t.dedupe&&!Me(a)&&se(m,a)){e.debug(`Skipping measurement push because it is the same as the last one 20`,p.payload);return}a=m,e.debug(`Pushing measurement 21`,p);const y=o();y&&y.type===ge?r.addItem(p):i.execute(p)}catch(l){e.error(`Error pushing measurement 22`,l)}}}}function ls({internalLogger:e,metas:t}){e.debug("Initializing meta API");let n,i,s,r;const o=b=>{i&&t.remove(i),i={user:b},t.add(i)},a=(b,l)=>{var p;const m=l?.overrides,y=m?{overrides:Object.assign(Object.assign({},(p=n?.session)===null||p===void 0?void 0:p.overrides),m)}:{};n&&t.remove(n),n={session:Object.assign(Object.assign({},re(b)?void 0:b),y)},t.add(n)},u=()=>t.value.session,f=(b,l)=>{var p;if(l?.overrides&&a(u(),{overrides:l.overrides}),((p=s?.view)===null||p===void 0?void 0:p.name)===b?.name)return;const m=s;s={view:b},t.add(s),m&&t.remove(m)},d=()=>t.value.view,v=b=>{var l;const p=je(b)?Object.assign(Object.assign({},(l=r?.page)!==null&&l!==void 0?l:c()),{id:b}):b;r&&t.remove(r),r={page:p},t.add(r)},c=()=>t.value.page;return{setUser:o,resetUser:o,setSession:a,resetSession:a,getSession:u,setView:f,getView:d,setPage:v,getPage:c}}function ds(e,t,n,i,s){t.debug("Initializing traces API");let r;return{getOTEL:()=>r,getTraceContext:()=>{const v=r?.trace.getSpanContext(r.context.active());return v?{trace_id:v.traceId,span_id:v.spanId}:void 0},initOTEL:(v,c)=>{t.debug("Initializing OpenTelemetry"),r={trace:v,context:c}},isOTELInitialized:()=>!!r,pushTraces:v=>{try{const c={type:N.TRACE,payload:v,meta:i.value};t.debug(`Pushing trace 23`,c),s.execute(c)}catch(c){t.error(`Error pushing trace 24`,c)}}}}class fs{constructor(){this.buffer=[]}addItem(t){this.buffer.push(t)}flushBuffer(t){if(Ue(t))for(const n of this.buffer)t(n);this.buffer.length=0}size(){return this.buffer.length}}function ps({apiMessageBus:e,transports:t,config:n}){const i=new fs,s=n.trackUserActionsExcludeItem;let r;return e.subscribe(a=>{if(ge===a.type||Cn===a.type){r=a;return}if(a.type===jn){const{id:u,name:f}=a;i.flushBuffer(d=>{if(bs(d,s)){t.execute(d);return}const v=Object.assign(Object.assign({},d),{payload:Object.assign(Object.assign({},d.payload),{action:{parentId:u,name:f}})});t.execute(v)}),r=void 0;return}a.type===Un&&(r=void 0,i.flushBuffer(u=>{t.execute(u)}))}),{actionBuffer:i,getMessage:()=>r}}function bs(e,t){return t?.(e)||e.type===N.MEASUREMENT&&e.payload.type==="web-vitals"}const Re=new V;function vs(e,t,n,i,s){t.debug("Initializing API");const{actionBuffer:r,getMessage:o}=ps({apiMessageBus:Re,transports:s,config:n}),a=ds(e,t,n,i,s),u={unpatchedConsole:e,internalLogger:t,config:n,metas:i,transports:s,tracesApi:a,actionBuffer:r,getMessage:o};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a),rs(u)),ls(u)),us(u)),cs(u)),is(u))}class oe extends Mn{constructor(){super(...arguments),this.api={},this.transports={}}}function ms(e,t,n,i,s,r){t.debug("Initializing instrumentations");const o=[];return{add:(...f)=>{t.debug("Adding instrumentations"),f.forEach(d=>{if(t.debug(`Adding "${d.name}" instrumentation`),o.some(c=>c.name===d.name)){t.warn(`Instrumentation ${d.name} is already added`);return}d.unpatchedConsole=e,d.internalLogger=t,d.config=n,d.metas=i,d.transports=s,d.api=r,o.push(d),d.initialize()})}
vendor: 13,004 bytes, lines 24-28
24,get instrumentations(){return[...o]},remove:(...f)=>{t.debug("Removing instrumentations"),f.forEach(d=>{var v,c;t.debug(`Removing "${d.name}" instrumentation`);const b=o.reduce((l,p,m)=>l===null&&p.name===d.name?m:null,null);if(b===null){t.warn(`Instrumentation "${d.name}" is not added`);return}(c=(v=o[b]).destroy)===null||c===void 0||c.call(v),o.splice(b,1)})}}}function hs(e){e.instrumentations.add(...e.config.instrumentations)}function gs(e,t,n){let i=[],s=[];const r=()=>i.reduce((v,c)=>Object.assign(v,Ue(c)?c():c),{}),o=()=>{if(s.length){const v=r();s.forEach(c=>c(v))}};return{add:(...v)=>{t.debug(`Adding metas 25`,v),i.push(...v),o()},remove:(...v)=>{t.debug(`Removing metas 26`,v),i=i.filter(c=>!v.includes(c)),o()},addListener:v=>{t.debug(`Adding metas listener 27`,v),s.push(v)},removeListener:v=>{t.debug(`Removing metas listener 28`,v),s=s.filter(c=>c!==v)},get value(){return r()}}}const W="1.19.0";function ws(e){var t,n;const i={sdk:{version:W},app:{bundleId:e.config.app.name&&Vi(e.config.app.name)}},s=(t=e.config.sessionTracking)===null||t===void 0?void 0:t.session;s&&e.api.setSession(s),e.config.app&&(i.app=Object.assign(Object.assign({},e.config.app),i.app)),e.config.user&&(i.user=e.config.user),e.config.view&&(i.view=e.config.view),e.metas.add(i,...(n=e.config.metas)!==null&&n!==void 0?n:[])}const Ln="_faroInternal";function ys(e){if(e.config.preventGlobalExposure)e.internalLogger.debug("Skipping registering public Faro instance in the global scope");else{if(e.internalLogger.debug(`Registering public faro reference in the global scope using "${e.config.globalObjectKey}" key`),e.config.globalObjectKey in ae){e.internalLogger.warn(`Skipping global registration due to key "${e.config.globalObjectKey}" being used already. Please set "globalObjectKey" to something else or set "preventGlobalExposure" to "true"`);return}Object.defineProperty(ae,e.config.globalObjectKey,{configurable:!1,writable:!1,value:e})}}function Ss(e){e.config.isolate?e.internalLogger.debug("Skipping registering internal Faro instance on global object"):(e.internalLogger.debug("Registering internal Faro instance on global object"),Object.defineProperty(ae,Ln,{configurable:!1,enumerable:!1,writable:!1,value:e}))}function Es(){return Ln in ae}let P={};function Ts(e,t,n,i,s,r,o){return t.debug("Initializing Faro"),P={api:r,config:n,instrumentations:o,internalLogger:t,metas:i,pause:s.pause,transports:s,unpatchedConsole:e,unpause:s.unpause},Ss(P),ys(P),P}function Os(e){const t=Ji(e),n=Zi(t,e);if(Es()&&!e.isolate){n.error('Faro is already registered. Either add instrumentations, transports etc. to the global faro instance or use the "isolate" property');return}n.debug("Initializing");const i=gs(t,n),s=Ki(t,n,e,i),r=vs(t,n,e,i,s),o=ms(t,n,e,i,s,r),a=Ts(t,n,e,i,s,r,o);return ws(a),es(a),hs(a),a}const _s="faro",Is={enabled:!0,sendTimeout:250,itemLimit:50},xs="view_changed",$e="session_start",wt="session_resume",ks="session_extend",As="service_name_override",C="unknown";var Ie={exports:{}},Ps=Ie.exports,on;function Rs(){return on||(on=1,(function(e,t){(function(n,i){var s="1.0.41",r="",o="?",a="function",u="undefined",f="object",d="string",v="major",c="model",b="name",l="type",p="vendor",m="version",y="architecture",x="console",g="mobile",h="tablet",S="smarttv",w="wearable",O="embedded",M=500,j="Amazon",de="Apple",Vt="ASUS",qt="BlackBerry",Be="Browser",Fe="Chrome",gi="Edge",ze="Firefox",Ve="Google",Ht="Honor",Gt="Huawei",wi="Lenovo",qe="LG",lt="Microsoft",dt="Motorola",ft="Nvidia",$t="OnePlus",ye="Opera",pt="OPPO",Se="Samsung",Wt="Sharp",Ee="Sony",bt="Xiaomi",vt="Zebra",Kt="Facebook",Yt="Chromium OS",Xt="Mac OS",Jt=" Browser",yi=function(_,I){var T={};for(var A in _)I[A]&&I[A].length%2===0?T[A]=I[A].concat(_[A]):T[A]=_[A];return T},He=function(_){for(var I={},T=0;T<_.length;T++)I[_[T].toUpperCase()]=_[T];return I},Zt=function(_,I){return typeof _===d?Te(I).indexOf(Te(_))!==-1:!1},Te=function(_){return _.toLowerCase()},Si=function(_){return typeof _===d?_.replace(/[^\d\.]/g,r).split(".")[0]:i},mt=function(_,I){if(typeof _===d)return _=_.replace(/^\s\s*/,r),typeof I===u?_:_.substring(0,M)},Oe=function(_,I){for(var T=0,A,K,q,k,E,H;T<I.length&&!E;){var ht=I[T],tn=I[T+1];for(A=K=0;A<ht.length&&!E&&ht[A];)if(E=ht[A++].exec(_),E)for(q=0;q<tn.length;q++)H=E[++K],k=tn[q],typeof k===f&&k.length>0?k.length===2?typeof k[1]==a?this[k[0]]=k[1].call(this,H):this[k[0]]=k[1]:k.length===3?typeof k[1]===a&&!(k[1].exec&&k[1].test)?this[k[0]]=H?k[1].call(this,H,k[2]):i:this[k[0]]=H?H.replace(k[1],k[2]):i:k.length===4&&(this[k[0]]=H?k[3].call(this,H.replace(k[1],k[2])):i):this[k]=H||i;T+=2}},_e=function(_,I){for(var T in I)if(typeof I[T]===f&&I[T].length>0){for(var A=0;A<I[T].length;A++)if(Zt(I[T][A],_))return T===o?i:T}else if(Zt(I[T],_))return T===o?i:T;return I.hasOwnProperty("*")?I["*"]:_},Ei={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Qt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},en={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[m,[b,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[m,[b,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[b,m],[/opios[\/ ]+([\w\.]+)/i],[m,[b,ye+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[m,[b,ye+" GX"]],[/\bopr\/([\w\.]+)/i],[m,[b,ye]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[m,[b,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[m,[b,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[b,m],[/quark(?:pc)?\/([-\w\.]+)/i],[m,[b,"Quark"]],[/\bddg\/([\w\.]+)/i],[m,[b,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[m,[b,"UC"+Be]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[m,[b,"WeChat"]],[/konqueror\/([\w\.]+)/i],[m,[b,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[m,[b,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[m,[b,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[m,[b,"Smart Lenovo "+Be]],[/(avast|avg)\/([\w\.]+)/i],[[b,/(.+)/,"$1 Secure "+Be],m],[/\bfocus\/([\w\.]+)/i],[m,[b,ze+" Focus"]],[/\bopt\/([\w\.]+)/i],[m,[b,ye+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[m,[b,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[m,[b,"Dolphin"]],[/coast\/([\w\.]+)/i],[m,[b,ye+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[m,[b,"MIUI"+Jt]],[/fxios\/([\w\.-]+)/i],[m,[b,ze]],[/\bqihoobrowser\/?([\w\.]*)/i],[m,[b,"360"]],[/\b(qq)\/([\w\.]+)/i],[[b,/(.+)/,"$1Browser"],m],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[b,/(.+)/,"$1"+Jt],m],[/samsungbrowser\/([\w\.]+)/i],[m,[b,Se+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[m,[b,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[b,"Sogou Mobile"],m],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[b,m],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[b],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[m,b],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[b,Kt],m],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[b,m],[/\bgsa\/([\w\.]+) .*safari\//i],[m,[b,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[m,[b,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[m,[b,Fe+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[b,Fe+" WebView"],m],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[m,[b,"Android "+Be]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[b,m],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[m,[b,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[m,b],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[b,[m,_e,Ei]],[/(webkit|khtml)\/([\w\.]+)/i],[b,m],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[b,"Netscape"],m],[/(wolvic|librewolf)\/([\w\.]+)/i],[b,m],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[m,[b,ze+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[b,[m,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[b,[m,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[y,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[y,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[y,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[y,/ower/,r,Te]],[/ sun4\w[;\)]/i],[[y,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[y,Te]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[p,Se],[l,h]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[p,Se],[l,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[p,de],[l,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[p,de],[l,h]],[/(macintosh);/i],[c,[p,de]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[p,Wt],[l,g]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[c,[p,Ht],[l,h]],[/honor([-\w ]+)[;\)]/i],[c,[p,Ht],[l,g]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[c,[p,Gt],[l,h]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[p,Gt],[l,g]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[c,/_/g," "],[p,bt],[l,h]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[c,/_/g," "],[p,bt],[l,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[p,pt],[l,g]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[c,[p,_e,{OnePlus:["304","403","203"],"*":pt}],[l,h]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[p,"Vivo"],[l,g]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[p,"Realme"],[l,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[p,dt],[l,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[p,dt],[l,h]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[p,qe],[l,h]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[p,qe],[l,g]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[c,[p,wi],[l,h]],[/(nokia) (t[12][01])/i],[p,c,[l,h]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[c,/_/g," "],[l,g],[p,"Nokia"]],[/(pixel (c|tablet))\b/i],[c,[p,Ve],[l,h]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[p,Ve],[l,g]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[p,Ee],[l,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[p,Ee],[l,h]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[p,$t],[l,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[p,j],[l,h]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)
vendor: 4,658 bytes, line 28
28/g,"Fire Phone $1"],[p,j],[l,g]],[/(playbook);[-\w\),; ]+(rim)/i],[c,p,[l,h]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[p,qt],[l,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[p,Vt],[l,h]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[p,Vt],[l,g]],[/(nexus 9)/i],[c,[p,"HTC"],[l,h]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[c,/_/g," "],[l,g]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[c,[p,"TCL"],[l,h]],[/(itel) ((\w+))/i],[[p,Te],c,[l,_e,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[p,"Acer"],[l,h]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[p,"Meizu"],[l,g]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[p,"Ulefone"],[l,g]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[c,[p,"Energizer"],[l,g]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[c,[p,"Cat"],[l,g]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[c,[p,"Smartfren"],[l,g]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[p,"Nothing"],[l,g]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[c,[p,"Archos"],[l,h]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[c,[p,"Archos"],[l,g]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[p,c,[l,h]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[p,c,[l,g]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,c,[l,h]],[/(surface duo)/i],[c,[p,lt],[l,h]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[p,"Fairphone"],[l,g]],[/(u304aa)/i],[c,[p,"AT&T"],[l,g]],[/\bsie-(\w*)/i],[c,[p,"Siemens"],[l,g]],[/\b(rct\w+) b/i],[c,[p,"RCA"],[l,h]],[/\b(venue[\d ]{2,7}) b/i],[c,[p,"Dell"],[l,h]],[/\b(q(?:mv|ta)\w+) b/i],[c,[p,"Verizon"],[l,h]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[p,"Barnes & Noble"],[l,h]],[/\b(tm\d{3}\w+) b/i],[c,[p,"NuVision"],[l,h]],[/\b(k88) b/i],[c,[p,"ZTE"],[l,h]],[/\b(nx\d{3}j) b/i],[c,[p,"ZTE"],[l,g]],[/\b(gen\d{3}) b.+49h/i],[c,[p,"Swiss"],[l,g]],[/\b(zur\d{3}) b/i],[c,[p,"Swiss"],[l,h]],[/\b((zeki)?tb.*\b) b/i],[c,[p,"Zeki"],[l,h]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],c,[l,h]],[/\b(ns-?\w{0,9}) b/i],[c,[p,"Insignia"],[l,h]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[p,"NextBook"],[l,h]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],c,[l,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],c,[l,g]],[/\b(ph-1) /i],[c,[p,"Essential"],[l,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[p,"Envizen"],[l,h]],[/\b(trio[-\w\. ]+) b/i],[c,[p,"MachSpeed"],[l,h]],[/\btu_(1491) b/i],[c,[p,"Rotor"],[l,h]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[c,[p,ft],[l,h]],[/(sprint) (\w+)/i],[p,c,[l,g]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[p,lt],[l,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[p,vt],[l,h]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[p,vt],[l,g]],[/smart-tv.+(samsung)/i],[p,[l,S]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[p,Se],[l,S]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,qe],[l,S]],[/(apple) ?tv/i],[p,[c,de+" TV"],[l,S]],[/crkey/i],[[c,Fe+"cast"],[p,Ve],[l,S]],[/droid.+aft(\w+)( bui|\))/i],[c,[p,j],[l,S]],[/(shield \w+ tv)/i],[c,[p,ft],[l,S]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[p,Wt],[l,S]],[/(bravia[\w ]+)( bui|\))/i],[c,[p,Ee],[l,S]],[/(mi(tv|box)-?\w+) bui/i],[c,[p,bt],[l,S]],[/Hbbtv.*(technisat) (.*);/i],[p,c,[l,S]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,mt],[c,mt],[l,S]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[c,[l,S]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,S]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,c,[l,x]],[/droid.+; (shield)( bui|\))/i],[c,[p,ft],[l,x]],[/(playstation \w+)/i],[c,[p,Ee],[l,x]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[p,lt],[l,x]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[c,[p,Se],[l,w]],[/((pebble))app/i,/(asu
vendor: 6,545 bytes, line 28
28s|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[p,c,[l,w]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[c,[p,pt],[l,w]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[p,de],[l,w]],[/(opwwe\d{3})/i],[c,[p,$t],[l,w]],[/(moto 360)/i],[c,[p,dt],[l,w]],[/(smartwatch 3)/i],[c,[p,Ee],[l,w]],[/(g watch r)/i],[c,[p,qe],[l,w]],[/droid.+; (wt63?0{2,3})\)/i],[c,[p,vt],[l,w]],[/droid.+; (glass) \d/i],[c,[p,Ve],[l,w]],[/(pico) (4|neo3(?: link|pro)?)/i],[p,c,[l,w]],[/; (quest( \d| pro)?)/i],[c,[p,Kt],[l,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[l,O]],[/(aeobc)\b/i],[c,[p,j],[l,O]],[/(homepod).+mac os/i],[c,[p,de],[l,O]],[/windows iot/i],[[l,O]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[l,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[l,h]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,h]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[l,g]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[c,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[m,[b,gi+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[b,m],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[m,[b,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[b,m],[/ladybird\//i],[[b,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[m,b]],os:[[/microsoft (windows) (vista|xp)/i],[b,m],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[b,[m,_e,Qt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[m,_e,Qt],[b,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[m,/_/g,"."],[b,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[b,Xt],[m,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[m,b],[/(ubuntu) ([\w\.]+) like android/i],[[b,/(.+)/,"$1 Touch"],m],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[b,m],[/\(bb(10);/i],[m,[b,qt]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[m,[b,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[m,[b,ze+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[m,[b,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[m,[b,"watchOS"]],[/crkey\/([\d\.]+)/i],[m,[b,Fe+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[b,Yt],m],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[b,m],[/(sunos) ?([\w\.\d]*)/i],[[b,"Solaris"],m],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[b,m]]},B=function(_,I){if(typeof _===f&&(I=_,_=i),!(this instanceof B))return new B(_,I).getResult();var T=typeof n!==u&&n.navigator?n.navigator:i,A=_||(T&&T.userAgent?T.userAgent:r),K=T&&T.userAgentData?T.userAgentData:i,q=I?yi(en,I):en,k=T&&T.userAgent==A;return this.getBrowser=function(){var E={};return E[b]=i,E[m]=i,Oe.call(E,A,q.browser),E[v]=Si(E[m]),k&&T&&T.brave&&typeof T.brave.isBrave==a&&(E[b]="Brave"),E},this.getCPU=function(){var E={};return E[y]=i,Oe.call(E,A,q.cpu),E},this.getDevice=function(){var E={};return E[p]=i,E[c]=i,E[l]=i,Oe.call(E,A,q.device),k&&!E[l]&&K&&K.mobile&&(E[l]=g),k&&E[c]=="Macintosh"&&T&&typeof T.standalone!==u&&T.maxTouchPoints&&T.maxTouchPoints>2&&(E[c]="iPad",E[l]=h),E},this.getEngine=function(){var E={};return E[b]=i,E[m]=i,Oe.call(E,A,q.engine),E},this.getOS=function(){var E={};return E[b]=i,E[m]=i,Oe.call(E,A,q.os),k&&!E[b]&&K&&K.platform&&K.platform!="Unknown"&&(E[b]=K.platform.replace(/chrome os/i,Yt).replace(/macos/i,Xt)),E},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return A},this.setUA=function(E){return A=typeof E===d&&E.length>M?mt(E,M):E,this},this.setUA(A),this};B.VERSION=s,B.BROWSER=He([b,m,v]),B.CPU=He([y]),B.DEVICE=He([c,p,l,x,g,S,h,w,O]),B.ENGINE=B.OS=He([b,m]),e.exports&&(t=e.exports=B),t.UAParser=B;var fe=typeof n!==u&&(n.jQuery||n.Zepto);if(fe&&!fe.ua){var Ge=new B;fe.ua=Ge.getResult(),fe.ua.get=function(){return Ge.getUA()},fe.ua.set=function(_){Ge.setUA(_);var I=Ge.getResult();for(var T in I)fe.ua[T]=I[T]}}})(typeof window=="object"?window:Ps)})(Ie,Ie.exports)),Ie.exports}var Ns=Rs();const Ms=()=>{const e=new Ns.UAParser,{name:t,version:n}=e.getBrowser(),{name:i,version:s}=e.getOS(),r=e.getUA(),o=navigator.language,a=navigator.userAgent.includes("Mobi"),u=f();return{browser:{name:t??C,version:n??C,os:`${i??C} ${s??C}`,userAgent:r??C,language:o??C,mobile:a,brands:u??C,viewportWidth:`${window.innerWidth}`,viewportHeight:`${window.innerHeight}`}};function f(){if(!(!t||!n)&&"userAgentData"in navigator&&navigator.userAgentData)return navigator.userAgentData.brands}};function js(e){var t,n,i,s;return{id:(s=(i=(n=(t=P.config)===null||t===void 0?void 0:t.sessionTracking)===null||n===void 0?void 0:n.generateSessionId)===null||i===void 0?void 0:i.call(n))!==null&&s!==void 0?s:ue(),attributes:e}}const J={session:"sessionStorage",local:"localStorage"};function Bn(e){var t;try{let n;n=window[e];const i="__faro_storage_test__";return n.setItem(i,i),n.removeItem(i),!0}catch(n){return(t=P.internalLogger)===null||t===void 0||t.info(`Web storage of type ${e} is not available. Reason: ${n}`),!1}}function st(e,t){return Ut(t)?window[t].getItem(e):null}function jt(e,t,n){if(Ut(n))try{window[n].setItem(e,t)}catch{}}function Fn(e,t){Ut(t)&&window[t].removeItem(e)}const zn=Bn(J.local),Vn=Bn(J.session);function Ut(e){return e===J.local?zn:e===J.session?Vn:!1}function qn(e,t){let n=!1,i;const s=()=>
28{if(i==null){n=!1;return}e(...i),i=null,setTimeout(s,t)};return(...r)=>{if(n){i=r;return}e(...r),n=!0,setTimeout(s,t)}}function Us(){return P.transports.transports.flatMap(e=>e.getIgnoreUrls())}function rt(e=""){return Us().some(t=>e&&e.match(t)!=null)}function Cs(e){if(je(e))return e;if(e instanceof URL)return e.href;if(!re(e)&&Ue(e?.toString))return e.toString()}const be="com.grafana.faro.session",Ds=14400*1e3,Hn=900*1e3,Gn=1*1e3,Ls=Hn,Bs={enabled:!0,persistent:!1,maxSessionPersistenceTime:Ls};function Ct(){var e,t,n;const s=P.config.sessionTracking;let r=(n=(t=(e=s?.sampler)===null||e===void 0?void 0:e.call(s,{metas:P.metas.value}))!==null&&t!==void 0?t:s?.samplingRate)!==null&&n!==void 0?n:1;return typeof r!="number"&&(r=0),Math.random()<r}function Je({sessionId:e,started:t,lastActivity:n,isSampled:i=!0}={}){var s,r;const o=ne(),a=(r=(s=P.config)===null||s===void 0?void 0:s.sessionTracking)===null||r===void 0?void 0:r.generateSessionId;return e==null&&(e=typeof a=="function"?a():ue()),{sessionId:e,lastActivity:n??o,started:t??o,isSampled:i}}function $n(e){if(e==null)return!1;const t=ne();return t-e.started<Ds?t-e.lastActivity<Hn:!1}function Dt({fetchUserSession:e,storeUserSession:t}){return function({forceSessionExtend:i}={forceSessionExtend:!1}){var s,r,o;if(!e||!t)return;const a=P.config.sessionTracking,u=a?.persistent;if(u&&!zn||!u&&!Vn)return;const f=e();if(i===!1&&$n(f))t(Object.assign(Object.assign({},f),{lastActivity:ne()}));else{let d=Wn(Je({isSampled:Ct()}),f);t(d),(s=P.api)===null||s===void 0||s.setSession(d.sessionMeta),(r=a?.onSessionChange)===null||r===void 0||r.call(a,(o=f?.sessionMeta)!==null&&o!==void 0?o:null,d.sessionMeta)}}}function Wn(e,t){var n,i,s,r,o,a,u;const f=Object.assign(Object.assign({},e),{sessionMeta:{id:e.sessionId,attributes:Object.assign(Object.assign(Object.assign({},(i=(n=P.config.sessionTracking)===null||n===void 0?void 0:n.session)===null||i===void 0?void 0:i.attributes),(r=(s=P.metas.value.session)===null||s===void 0?void 0:s.attributes)!==null&&r!==void 0?r:{}),{isSampled:e.isSampled.toString()})}}),d=(a=(o=P.metas.value.session)===null||o===void 0?void 0:o.overrides)!==null&&a!==void 0?a:(u=t?.sessionMeta)===null||u===void 0?void 0:u.overrides;re(d)||(f.sessionMeta.overrides=d);const v=t?.sessionId;return v!=null&&(f.sessionMeta.attributes.previousSession=v),f}function Kn({fetchUserSession:e,storeUserSession:t}){return function(i){const s=i.session,r=e();let o=s?.id;const a=s?.attributes,u=s?.overrides,f=r?.sessionMeta,d=f?.overrides,v=!!u&&!se(u,d),c=!!a&&!se(a,f?.attributes);if(!!s&&o!==r?.sessionId||c||v){const l=Wn(Je({sessionId:o,isSampled:Ct()}),r);t(l),Fs(v,u,d),P.api.setSession(l.sessionMeta)}}}function Fs(e,t={},n={}){var i,s,r;if(!e)return;const o=t.serviceName,a=(r=(i=n.serviceName)!==null&&i!==void 0?i:(s=P.metas.value.app)===null||s===void 0?void 0:s.name)!==null&&r!==void 0?r:"";o&&o!==a&&P.api.pushEvent(As,{serviceName:o,previousServiceName:a})}class F{constructor(){this.updateSession=qn(()=>this.updateUserSession(),Gn),this.updateUserSession=Dt({fetchUserSession:F.fetchUserSession,storeUserSession:F.storeUserSession}),this.init()}static removeUserSession(){Fn(be,F.storageTypeLocal)}static storeUserSession(t){jt(be,Ce(t),F.storageTypeLocal)}static fetchUserSession(){const t=st(be,F.storageTypeLocal);return t?JSON.parse(t):null}init(){document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&this.updateSession()}),P.metas.addListener(Kn({fetchUserSession:F.fetchUserSession,storeUserSession:F.storeUserSession}))}}F.storageTypeLocal=J.local;class G{constructor(){this.updateSession=qn(()=>this.updateUserSession(),Gn),this.updateUserSession=Dt({fetchUserSession:G.fetchUserSession,storeUserSession:G.storeUserSession}),this.init()}static removeUserSession(){Fn(be,G.storageTypeSession)}static storeUserSession(t){jt(be,Ce(t),G.storageTypeSession)}static fetchUserSession(){const t=st(be,G.storageTypeSession);return t?JSON.parse(t):null}init(){document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&this.updateSession()}),P.metas.addListener(Kn({fetchUserSession:G.fetchUserSession,storeUserSession:G.storeUserSession}))}}G.storageTypeSession=J.session;function Yn(e){return e?.persistent?F:G}class zs extends oe{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-se
28ssion",this.version=W}sendSessionStartEvent(t){var n,i;const s=t.session;if(s&&s.id!==((n=this.notifiedSession)===null||n===void 0?void 0:n.id)){if(this.notifiedSession&&this.notifiedSession.id===((i=s.attributes)===null||i===void 0?void 0:i.previousSession)){this.api.pushEvent(ks,{},void 0,{skipDedupe:!0}),this.notifiedSession=s;return}this.notifiedSession=s,this.api.pushEvent($e,{},void 0,{skipDedupe:!0})}}createInitialSession(t,n){var i,s,r,o,a,u;let f=t.fetchUserSession();if(n.persistent&&n.maxSessionPersistenceTime&&f){const c=ne();f.lastActivity<c-n.maxSessionPersistenceTime&&(F.removeUserSession(),f=null)}let d,v;if($n(f)){const c=f?.sessionId;v=Je({sessionId:c,isSampled:f.isSampled||!1,started:f?.started});const b=f?.sessionMeta,l=Object.assign(Object.assign({},(i=n.session)===null||i===void 0?void 0:i.overrides),b?.overrides);v.sessionMeta=Object.assign(Object.assign({},n.session),{id:c,attributes:Object.assign(Object.assign(Object.assign({},(s=n.session)===null||s===void 0?void 0:s.attributes),b?.attributes),{isSampled:v.isSampled.toString()}),overrides:l}),d=wt}else{const c=(o=(r=n.session)===null||r===void 0?void 0:r.id)!==null&&o!==void 0?o:js().id;v=Je({sessionId:c,isSampled:Ct()});const b=(a=n.session)===null||a===void 0?void 0:a.overrides;v.sessionMeta=Object.assign({id:c,attributes:Object.assign({isSampled:v.isSampled.toString()},(u=n.session)===null||u===void 0?void 0:u.attributes)},b?{overrides:b}:{}),d=$e}return{initialSession:v,lifecycleType:d}}registerBeforeSendHook(t){var n;const{updateSession:i}=new t;(n=this.transports)===null||n===void 0||n.addBeforeSendHooks(s=>{var r,o,a;i();const u=(r=s.meta.session)===null||r===void 0?void 0:r.attributes;if(u&&u?.isSampled==="true"){let f=JSON.parse(JSON.stringify(s));const d=(o=f.meta.session)===null||o===void 0?void 0:o.attributes;return d==null||delete d.isSampled,Object.keys(d??{}).length===0&&((a=f.meta.session)===null||a===void 0||delete a.attributes),f}return null})}initialize(){this.logDebug("init session instrumentation");const t=this.config.sessionTracking;if(t?.enabled){const n=Yn(t);this.registerBeforeSendHook(n);const{initialSession:i,lifecycleType:s}=this.createInitialSession(n,t);n.storeUserSession(i);const r=i.sessionMeta;this.notifiedSession=r,this.api.setSession(r),s===$e&&this.api.pushEvent($e,{},void 0,{skipDedupe:!0}),s===wt&&this.api.pushEvent(wt,{},void 0,{skipDedupe:!0})}this.metas.addListener(this.sendSessionStartEvent.bind(this))}}const Vs="Non-Error promise rejection captured with value:",qs="UnhandledRejection",Hs="DOMError",Gs="DOMException",$s="Non-Error exception captured with keys:",Ws="?",Ks=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function Ys(e){var t,n;const i=e.match(Ks),s=(t=i?.[1])!==null&&t!==void 0?t:Dn;return[(n=i?.[2])!==null&&n!==void 0?n:e,s]}const an=` 29`,Xs="eval",Js="?",un="@",Zs=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Qs=/\((\S*)(?::(\d+))(?::(\d+))\)/,er="eval",Xn="address at ",tr=Xn.length,nr=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ir=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,sr=" > eval",cn="safari-extension",ln="safari-web-extension",rr=/Minified React error #\d+;/i;function Jn(e,t,n,i){const s={filename:e||document.location.href,function:t||Js};return n!==void 0&&(s.lineno=n),i!==void 0&&(s.colno=i),s}function dn(e,t){const n=e?.includes(cn),i=!n&&e?.includes(ln);return!n&&!i?[e,t]:[e?.includes(un)?e.split(un)[0]:e,n?`${cn}:${t}`:`${ln}:${t}`]}function It(e){let t=[];e.stacktrace?t=e.stacktrace.split(an).filter((i,s)=>s%2===0):e.stack&&(t=e.stack.split(an));const n=t.reduce((i,s,r)=>{let o,a,u,f,d;if(o=Zs.exec(s)){if(a=o[1],u=o[2],f=o[3],d=o[4],u?.startsWith(er)){const v=Qs.exec(u);v&&(u=v[1],f=v[2],d=v[3])}u=u?.startsWith(Xn)?u.substring(tr):u,[a,u]=dn(a,u)}else if(o=nr.exec(s)){if(a=o[1],u=o[3],f=o[4],d=o[5],u&&u.includes(sr)){const v=ir.exec(u);v&&(a=a||Xs,u=v[1],f=v[2])}else r===0&&!d&&Pi(e.columnNumber)&&(d=String(e.columnNumber+1));[a,u]=dn(a,u)}return(u||a)&&i.push(Jn(u,a,f?Number(f):void 0,d?Number(d):void 0)),i},[]);return rr.test(e.message)?n.slice(1):n}function or(e){return{frames:It(e)}}function Zn(e){let t,n,i=[],s,r;if(Ci(e)&&e.error)t=e.error.message,n=e.error.name,i=It(e.error);else if((s=Di(e))||Li(e)){const{name:o,message:a}=e;
29n=o??(s?Hs:Gs),t=a?`${n}: ${a}`:n}else Nt(e)?(t=e.message,i=It(e)):($(e)||(r=ji(e)))&&(n=r?e.constructor.name:void 0,t=`${$s} ${Object.keys(e)}`);return[t,n,i]}function Qn(e){const[t,n,i,s,r]=e;let o,a,u=[];const f=je(t),d=Jn(n,Ws,i,s);return r||!f?([o,a,u]=Zn(r??t),u.length===0&&(u=[d])):f&&([o,a]=Ys(t),u=[d]),{value:o,type:a,stackFrames:u}}function fn(e,t){return Nt(e[0])?Qn(e):{value:t(e)}}class ie extends oe{constructor(t={}){super(),this.options=t,this.name="@grafana/faro-web-sdk:instrumentation-console",this.version=W,this.errorSerializer=Xe}initialize(){var t,n,i,s;this.options=Object.assign(Object.assign({},this.options),this.config.consoleInstrumentation);const r=((t=this.options)===null||t===void 0?void 0:t.serializeErrors)||!!(!((n=this.options)===null||n===void 0)&&n.errorSerializer);this.errorSerializer=r?(s=(i=this.options)===null||i===void 0?void 0:i.errorSerializer)!==null&&s!==void 0?s:rn:Xe,Fi.filter(o=>{var a,u;return!((u=(a=this.options)===null||a===void 0?void 0:a.disabledLevels)!==null&&u!==void 0?u:ie.defaultDisabledLevels).includes(o)}).forEach(o=>{console[o]=(...a)=>{var u,f;try{if(o===U.ERROR&&!(!((u=this.options)===null||u===void 0)&&u.consoleErrorAsLog)){const{value:d,type:v,stackFrames:c}=fn(a,this.errorSerializer);if(d&&!v&&!c){this.api.pushError(new Error(ie.consoleErrorPrefix+d));return}this.api.pushError(new Error(ie.consoleErrorPrefix+d),{type:v,stackFrames:c})}else if(o===U.ERROR&&(!((f=this.options)===null||f===void 0)&&f.consoleErrorAsLog)){const{value:d,type:v,stackFrames:c}=fn(a,this.errorSerializer);this.api.pushLog(d?[ie.consoleErrorPrefix+d]:a,{level:o,context:{value:d??"",type:v??"",stackFrames:c?.length?rn(c):""}})}else this.api.pushLog(a,{level:o})}catch(d){this.logError(d)}finally{this.unpatchedConsole[o](...a)}}})}}ie.defaultDisabledLevels=[U.DEBUG,U.TRACE,U.LOG];ie.consoleErrorPrefix="console.error: ";function ar(e){const t=window.onerror;window.onerror=(...n)=>{try{const{value:i,type:s,stackFrames:r}=Qn(n),o=n[4];if(i){const a={type:s,stackFrames:r};o!=null&&(a.originalError=o),e.pushError(new Error(i),a)}}finally{t?.apply(window,n)}}}function ur(e){window.addEventListener("unhandledrejection",t=>{var n,i;let s=t;s.reason?s=t.reason:!((n=t.detail)===null||n===void 0)&&n.reason&&(s=(i=t.detail)===null||i===void 0?void 0:i.reason);let r,o,a=[];Ni(s)?(r=`${Vs} ${String(s)}`,o=qs):[r,o,a]=Zn(s),r&&e.pushError(new Error(r),{type:o,stackFrames:a})})}class ei extends oe{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-errors",this.version=W}initialize(){this.logDebug("Initializing"),ar(this.api),ur(this.api)}}class cr extends oe{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-view",this.version=W}sendViewChangedEvent(t){var n,i,s,r;const o=t.view;o&&o.name!==((n=this.notifiedView)===null||n===void 0?void 0:n.name)&&(this.api.pushEvent(xs,{fromView:(s=(i=this.notifiedView)===null||i===void 0?void 0:i.name)!==null&&s!==void 0?s:C,toView:(r=o.name)!==null&&r!==void 0?r:C},void 0,{skipDedupe:!0}),this.notifiedView=o)}initialize(){this.metas.addListener(this.sendViewChangedEvent.bind(this))}}class ot{constructor(t,n){this.pushMeasurement=t,this.webVitalConfig=n}initialize(){Object.entries(ot.mapping).forEach(([t,n])=>{var i;n(s=>{this.pushMeasurement({type:"web-vitals",values:{[t]:s.value}})},{reportAllChanges:(i=this.webVitalConfig)===null||i===void 0?void 0:i.reportAllChanges})})}}ot.mapping={cls:Ai,fcp:ki,fid:xi,inp:Ii,lcp:_i,ttfb:Oi};var xt,pn,we=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Ne=function(e){if(document.readyState==="loading")return"loading";var t=we();if(t){if(e<t.domInteractive)return"loading";if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return"dom-interactive";if(t.domComplete===0||e<t.domComplete)return"dom-content-loaded"}return"complete"},lr=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},at=function(e,t){var n="";try{for(;e&&e.nodeType!==9;){var i=e,s=i.id?"#"+i.id:lr(i)+(i.classList&&i.classList.value&&i.classList.value.trim()&&i.classList.value.trim().length?"."+i.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+s.length>(t||100)-1)return n||s;if(n=n?s+">"+n:s,i.id)break;e=i.parentNode}}catch{}return n},ti=-1,ni=function(){return ti},ce=function(e){addEventListener("pageshow",(function(t){t.persisted&&(ti=t.t
vendor: 9,547 bytes, line 29
29imeStamp,e(t))}),!0)},ut=function(){var e=we();return e&&e.activationStart||0},D=function(e,t){var n=we(),i="navigate";return ni()>=0?i="back-forward-cache":n&&(document.prerendering||ut()>0?i="prerender":document.wasDiscarded?i="restore":n.type&&(i=n.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},le=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var i=new PerformanceObserver((function(s){Promise.resolve().then((function(){t(s.getEntries())}))}));return i.observe(Object.assign({type:e,buffered:!0},n||{})),i}}catch{}},L=function(e,t,n,i){var s,r;return function(o){t.value>=0&&(o||i)&&((r=t.value-(s||0))||s===void 0)&&(s=t.value,t.delta=r,t.rating=(function(a,u){return a>u[1]?"poor":a>u[0]?"needs-improvement":"good"})(t.value,n),e(t))}},Lt=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},De=function(e){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&e()}))},ct=function(e){var t=!1;return function(){t||(e(),t=!0)}},pe=-1,bn=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Ze=function(e){document.visibilityState==="hidden"&&pe>-1&&(pe=e.type==="visibilitychange"?e.timeStamp:0,dr())},vn=function(){addEventListener("visibilitychange",Ze,!0),addEventListener("prerenderingchange",Ze,!0)},dr=function(){removeEventListener("visibilitychange",Ze,!0),removeEventListener("prerenderingchange",Ze,!0)},Bt=function(){return pe<0&&(pe=bn(),vn(),ce((function(){setTimeout((function(){pe=bn(),vn()}),0)}))),{get firstHiddenTime(){return pe}}},Le=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},mn=[1800,3e3],ii=function(e,t){t=t||{},Le((function(){var n,i=Bt(),s=D("FCP"),r=le("paint",(function(o){o.forEach((function(a){a.name==="first-contentful-paint"&&(r.disconnect(),a.startTime<i.firstHiddenTime&&(s.value=Math.max(a.startTime-ut(),0),s.entries.push(a),n(!0)))}))}));r&&(n=L(e,s,mn,t.reportAllChanges),ce((function(o){s=D("FCP"),n=L(e,s,mn,t.reportAllChanges),Lt((function(){s.value=performance.now()-o.timeStamp,n(!0)}))})))}))},hn=[.1,.25],fr=function(e,t){(function(n,i){i=i||{},ii(ct((function(){var s,r=D("CLS",0),o=0,a=[],u=function(d){d.forEach((function(v){if(!v.hadRecentInput){var c=a[0],b=a[a.length-1];o&&v.startTime-b.startTime<1e3&&v.startTime-c.startTime<5e3?(o+=v.value,a.push(v)):(o=v.value,a=[v])}})),o>r.value&&(r.value=o,r.entries=a,s())},f=le("layout-shift",u);f&&(s=L(n,r,hn,i.reportAllChanges),De((function(){u(f.takeRecords()),s(!0)})),ce((function(){o=0,r=D("CLS",0),s=L(n,r,hn,i.reportAllChanges),Lt((function(){return s()}))})),setTimeout(s,0))})))})((function(n){var i=(function(s){var r,o={};if(s.entries.length){var a=s.entries.reduce((function(f,d){return f&&f.value>d.value?f:d}));if(a&&a.sources&&a.sources.length){var u=(r=a.sources).find((function(f){return f.node&&f.node.nodeType===1}))||r[0];u&&(o={largestShiftTarget:at(u.node),largestShiftTime:a.startTime,largestShiftValue:a.value,largestShiftSource:u,largestShiftEntry:a,loadState:Ne(a.startTime)})}}return Object.assign(s,{attribution:o})})(n);e(i)}),t)},pr=function(e,t){ii((function(n){var i=(function(s){var r={timeToFirstByte:0,firstByteToFCP:s.value,loadState:Ne(ni())};if(s.entries.length){var o=we(),a=s.entries[s.entries.length-1];if(o){var u=o.activationStart||0,f=Math.max(0,o.responseStart-u);r={timeToFirstByte:f,firstByteToFCP:s.value-f,loadState:Ne(s.entries[0].startTime),navigationEntry:o,fcpEntry:a}}}return Object.assign(s,{attribution:r})})(n);e(i)}),t)},si=0,yt=1/0,We=0,br=function(e){e.forEach((function(t){t.interactionId&&(yt=Math.min(yt,t.interactionId),We=Math.max(We,t.interactionId),si=We?(We-yt)/7+1:0)}))},ri=function(){return xt?si:performance.interactionCount||0},vr=function(){"interactionCount"in performance||xt||(xt=le("event",br,{type:"event",buffered:!0,durationThreshold:0}))},z=[],ke=new Map,oi=0,mr=function(){var e=Math.min(z.length-1,Math.floor((ri()-oi)/50));return z[e]},ai=[],hr=function(e){if(ai.forEach((function(s){return s(e)})),e.interactionId||e.entryType==="first-input"){var t=z[z.length-1],n=ke.get(e.interactionId);if(n||z.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var i={id:e.interactionId,latency:e.duration,entries:[e]};ke.set(i.id,i),z.push(i)}z.sort((function(s,r){return r.latency-s.latency})),z.length>10&&z.splice(10).forEach((function(s){return ke.delete(s.id)}))}}},Ft=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=ct(e),document.visibilityState==="hidden"?e():(n=t(e),De(e)),n},gn=[200,500],gr=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},Le((function(){var n;vr();var i,s=D("INP"),r=function(a){Ft((function(){a.forEach(hr);var u=mr();u&&u.latency!==s.value&&(s.value=u.latency,s.entries=u.entries,i())}))},o=le("event",r,{durationThreshold:(n=t.durationThreshold)!==null&&n!==void 0?n:40});i=L(e,s,gn,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),De((function(){r(o.takeRecords()),i(!0)})),ce((function(){oi=ri(),z.length=0,ke.clear(),s=D("INP"),i=L(e,s,gn,t.reportAllChanges)})))})))},ve=[],ee=[],kt=0,zt=new WeakMap,me=new Map,At=-1,wr=function(e){ve=ve.concat(e),ui()},ui=function(){At<0&&(At=Ft(yr))},yr=function(){me.size>10&&me.forEach((function(o,a){ke.has(a)||me.delete(a)}));var e=z.map((function(o){return zt.get(o.entries[0])})),t=ee.length-50;ee=ee.filter((function(o,a){return a>=t||e.includes(o)}));for(var n=new Set,i=0;i<ee.length;i++){var s=ee[i];li(s.startTime,s.processingEnd).forEach((function(o){n.add(o)}))}var r=ve.length-1-50;ve=ve.filter((function(o,a){return o.startTime>kt&&a>r||n.has(o)})),At=-1};ai.push((function(e){e.interactionId&&e.target&&!me.has(e.interactionId)&&me.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;kt=Math.max(kt,e.processingEnd);for(var i=ee.length-1;i>=0;i--){var s=ee[i];if(Math.abs(n-s.renderTime)<=8){(t=s).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:[e]},ee.push(t)),(e.interactionId||e.entryType==="first-input")&&zt.set(e,t),ui()}));var te,Ae,ci,Qe,li=function(e,t){for(var n,i=[],s=0;n=ve[s];s++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;i.push(n)}return i},Sr=function(e,t){pn||(pn=le("long-animation-frame",wr)),gr((function(n){var i=(function(s){var r=s.entries[0],o=zt.get(r),a=r.processingStart,u=o.processingEnd,f=o.entries.sort((function(m,y){return m.processingStart-y.processingStart})),d=li(r.startTime,u),v=s.entries.find((function(m){return m.target})),c=v&&v.target||me.get(r.interactionId),b=[r.startTime+r.duration,u].concat(d.map((function(m){return m.startTime+m.duration}))),l=Math.max.apply(Math,b),p={interactionTarget:at(c),interactionTargetElement:c,interactionType:r.name.startsWith("key")?"keyboard":"pointer",interactionTime:r.startTime,nextPaintTime:l,processedEventEntries:f,longAnimationFrameEntries:d,inputDelay:a-r.startTime,processingDuration:u-a,presentationDelay:Math.max(l-u,0),loadState:Ne(r.startTime)};return Object.assign(s,{attribution:p})})(n);e(i)}),t)},wn=[2500,4e3],St={},Er=function(e,t){(function(n,i){i=i||{},Le((function(){var s,r=Bt(),o=D("LCP"),a=function(d){i.reportAllChanges||(d=d.slice(-1)),d.forEach((function(v){v.startTime<r.firstHiddenTime&&(o.value=Math.max(v.startTime-ut(),0),o.entries=[v],s())}))},u=le("largest-contentful-paint",a);if(u){s=L(n,o,wn,i.reportAllChanges);var f=ct((function(){St[o.id]||(a(u.takeRecords()),u.disconnect(),St[o.id]=!0,s(!0))}));["keydown","click"].forEach((function(d){addEventListener(d,(function(){return Ft(f)}),{once:!0,capture:!0})})),De(f),ce((function(d){o=D("LCP"),s=L(n,o,wn,i.reportAllChanges),Lt((function(){o.value=performance.now()-d.timeStamp,St[o.id]=!0,s(!0)}))}))}}))})((function(n){var i=(function(s){var r={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:s.value};if(s.entries.length){var o=we();if(o){var a=o.activationStart||0,u=s.entries[s.entries.length-1],f=u.url&&performance.getEntriesByType("resource").filter((function(l){return l.name===u.url}))[0],d=Math.max(0,o.responseStart-a),v=Math.max(d,f?(f.requestStart||f.startTime)-a:0),c=Math.max(v,f?f.responseEnd-a:0),b=Math.max(c,u.startTime-a);r={element:at(u.element),timeToFirstByte:d,resourceLoadDelay:v-d,resourceLoadDuration:c-v,elementRenderDelay:b-c,navigationEntry:o,lcpEntry:u},u.url&&(r.url=u.url),f&&(r.lcpResourceEntry=f)}}return Object.assign(s,{attribution:r})})(n);e(i)}),t)},yn=[800,1800],Tr=function e(t){document.prerendering?Le((function(){return e(t)})):document.readyState!=="complete"?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Or=function(e,t){t=t||{};var n=D("TTFB"),i=L(e,n,yn,t.reportAllChanges);Tr((function(){var s=we();s&&(n.value=Math.max(s.responseStart-ut(),0),n.entries=[s],i(!0),ce((function(){n=D("TTFB",0),(i=L(e,n,yn,t.reportAllChanges))(!0)})))}))},_r=function(e,t){Or((function(n){var i=(function(s){var r={waitingDuration:0,
29cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(s.entries.length){var o=s.entries[0],a=o.activationStart||0,u=Math.max((o.workerStart||o.fetchStart)-a,0),f=Math.max(o.domainLookupStart-a,0),d=Math.max(o.connectStart-a,0),v=Math.max(o.connectEnd-a,0);r={waitingDuration:u,cacheDuration:f-u,dnsDuration:d-f,connectionDuration:v-d,requestDuration:s.value-v,navigationEntry:o}}return Object.assign(s,{attribution:r})})(n);e(i)}),t)},xe={passive:!0,capture:!0},Ir=new Date,Sn=function(e,t){te||(te=t,Ae=e,ci=new Date,fi(removeEventListener),di())},di=function(){if(Ae>=0&&Ae<ci-Ir){var e={entryType:"first-input",name:te.type,target:te.target,cancelable:te.cancelable,startTime:te.timeStamp,processingStart:te.timeStamp+Ae};Qe.forEach((function(t){t(e)})),Qe=[]}},xr=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?(function(n,i){var s=function(){Sn(n,i),o()},r=function(){o()},o=function(){removeEventListener("pointerup",s,xe),removeEventListener("pointercancel",r,xe)};addEventListener("pointerup",s,xe),addEventListener("pointercancel",r,xe)})(t,e):Sn(t,e)}},fi=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,xr,xe)}))},En=[100,300],kr=function(e,t){t=t||{},Le((function(){var n,i=Bt(),s=D("FID"),r=function(u){u.startTime<i.firstHiddenTime&&(s.value=u.processingStart-u.startTime,s.entries.push(u),n(!0))},o=function(u){u.forEach(r)},a=le("first-input",o);n=L(e,s,En,t.reportAllChanges),a&&(De(ct((function(){o(a.takeRecords()),a.disconnect()}))),ce((function(){var u;s=D("FID"),n=L(e,s,En,t.reportAllChanges),Qe=[],Ae=-1,te=null,fi(addEventListener),u=r,Qe.push(u),di()})))}))},Ar=function(e,t){kr((function(n){var i=(function(s){var r=s.entries[0],o={eventTarget:at(r.target),eventType:r.name,eventTime:r.startTime,eventEntry:r,loadState:Ne(r.startTime)};return Object.assign(s,{attribution:o})})(n);e(i)}),t)};const Pt="com.grafana.faro.lastNavigationId",Ke="load_state",Tn="time_to_first_byte";class Pr{constructor(t,n){this.corePushMeasurement=t,this.webVitalConfig=n}initialize(){this.measureCLS(),this.measureFCP(),this.measureFID(),this.measureINP(),this.measureLCP(),this.measureTTFB()}measureCLS(){var t;fr(n=>{const{loadState:i,largestShiftValue:s,largestShiftTime:r,largestShiftTarget:o}=n.attribution,a=this.buildInitialValues(n);this.addIfPresent(a,"largest_shift_value",s),this.addIfPresent(a,"largest_shift_time",r);const u=this.buildInitialContext(n);this.addIfPresent(u,Ke,i),this.addIfPresent(u,"largest_shift_target",o),this.pushMeasurement(a,u)},{reportAllChanges:(t=this.webVitalConfig)===null||t===void 0?void 0:t.reportAllChanges})}measureFCP(){var t;pr(n=>{const{firstByteToFCP:i,timeToFirstByte:s,loadState:r}=n.attribution,o=this.buildInitialValues(n);this.addIfPresent(o,"first_byte_to_fcp",i),this.addIfPresent(o,Tn,s);const a=this.buildInitialContext(n);this.addIfPresent(a,Ke,r),this.pushMeasurement(o,a)},{reportAllChanges:(t=this.webVitalConfig)===null||t===void 0?void 0:t.reportAllChanges})}measureFID(){var t;Ar(n=>{const{eventTime:i,eventTarget:s,eventType:r,loadState:o}=n.attribution,a=this.buildInitialValues(n);this.addIfPresent(a,"event_time",i);const u=this.buildInitialContext(n);this.addIfPresent(u,"event_target",s),this.addIfPresent(u,"event_type",r),this.addIfPresent(u,Ke,o),this.pushMeasurement(a,u)},{reportAllChanges:(t=this.webVitalConfig)===null||t===void 0?void 0:t.reportAllChanges})}measureINP(){var t;Sr(n=>{const{interactionTime:i,presentationDelay:s,inputDelay:r,processingDuration:o,nextPaintTime:a,loadState:u,interactionTarget:f,interactionType:d}=n.attribution,v=this.buildInitialValues(n);this.addIfPresent(v,"interaction_time",i),this.addIfPresent(v,"presentation_delay",s),this.addIfPresent(v,"input_delay",r),this.addIfPresent(v,"processing_duration",o),this.addIfPresent(v,"next_paint_time",a);const c=this.buildInitialContext(n);this.addIfPresent(c,Ke,u),this.addIfPresent(c,"interaction_target",f),this.addIfPresent(c,"interaction_type",d),this.pushMeasurement(v,c)},{reportAllChanges:(t=this.webVitalConfig)===null||t===void 0?void 0:t.reportAllChanges})}measureLCP(){var t;Er(n=>{const{elementRenderDelay:i,resourceLoadDelay:s,resourceLoadDuration:r,timeToFirstByte:o,element:a}=n.attribution,u=this.buildInitialValues(n);this.addIfPresent(u,"element_render_delay",i),this.addIfPresent(u,"resource_load_delay",s),this.addIfPresent(u,"resource_load_duration",r),this.addIfPresent(u,Tn,o);const f=this.buildInitialContext(n);this.addIfPresent(f,"element",a),this.pushMeasurement(u,f)},{reportAllChanges:(t=this.webVitalConfig)===null||t===void 0?void 0:t.reportAllChanges})}measureTTFB(){var t;_r(n=>{const{dnsDuration:i,connectionDuration:s,requestDuration:r,waitingDuration:o,cacheDuration:a}=n.attribution,u=this.buildInitialValues(n);this.addIfPresent(u,"dns_duration",i),this.addIfPresent(u,"connection_duration",s),this.addIfPresent(u,"request_duration",r),this.addIfPresent(u,"waiting_duration",o),this.addIfPresent(u,"cache_duration",a);const f=this.buildInitialContext(n);this.pushMeasurement(u,f)},{reportAllChanges:(t=this.webVitalConfig)===null||t===void 0?void 0:t.reportAllChanges})}buildInitialValues(t){return{[t.name.toLowerCase()]:t.value,delta:t.delta}}buildInitialContext(t){var n;const i=(n=st(Pt,J.session))!==null&&n!==void 0?n:C;return{id:t.id,rating:t.rating,navigation_type:t.navigationType,navigation_entry_id:i}}pushMeasurement(t,n){this.corePushMeasurement({type:"web-vitals",values:t},{context:n})}addIfPresent(t,n,i){i&&(t[n]=i)}}class Rr extends oe{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-web-vitals",this.version=W}initialize(){this.logDebug("Initializing"),this.intializeWebVitalsInstrumentation().initialize()}intializeWebVitalsInstrumentation(){var t,n,i;return((t=this.config)===null||t===void 0?void 0:t.trackWebVitalsAttribution)===!1||((i=(n=this.config)===null||n===void 0?void 0:n.webVitalsInstrumentation)===null||i===void 0?void 0:i.trackAttribution)===!1?new ot(this.api.pushMeasurement,this.config.webVitalsInstrumentation):new Pr(this.api.pushMeasurement,this.config.webVitalsInstrumentation)}}const Nr="navigation",Rt="resource",Mr=/^00-[a-f0-9]{32}-[a-f0-9]{16}-[0-9]{1,2}$/;function pi(e=[]){for(const t of e)if(t.name==="traceparent"){if(!Mr.test(t.description))continue;const[,n,i]=t.description.split("-");if(n!=null&&i!=null)return{traceId:n,spanId:i};break}}function jr(){return"PerformanceObserver"in window}function Ur(e){if(document.readyState==="complete")e();else{const t=()=>{document.readyState==="complete"&&(e(),document.removeEventListener("readystatechange",t))};document.addEventListener("readystatechange",t)}}function Cr(e,t={}){for(const[n,i]of Object.entries(t)){const s=e[n];return s==null?!1:Pe(i)?i.includes(s):s===i}return!0}function bi(e){const{connectEnd:t,connectStart:n,decodedBodySize:i,domainLookupEnd:s,domainLookupStart:r,duration:o,encodedBodySize:a,fetchStart:u,initiatorType:f,name:d,nextHopProtocol:v,redirectEnd:c,redirectStart:b,renderBlockingStatus:l,requestStart:p,responseEnd:m,responseStart:y,responseStatus:x,secureConnectionStart:g,transferSize:h,workerStart:S}=e;return{name:d,duration:R(o),tcpHandshakeTime:R(t-n),dnsLookupTime:R(s-r),tlsNegotiationTime:R(t-g),responseStatus:R(x),redirectTime:R(c-b),requestTime:R(y-p),responseTime:R(m-y),fetchTime:R(m-u),serviceWorkerTime:R(u-S),decodedBodySize:R(i),encodedBodySize:R(a),cacheHitStatus:w(),renderBlockingStatus:R(l),protocol:v,initiatorType:f,visibilityState:document.visibilityState,ttfb:R(y-p),transferSize:R(h)};function w(){let O="fullLoad";return h===0?i>0&&(O="cache"):x!=null?x===304&&(O="conditionalFetch"):a>0&&h<a&&(O="conditionalFetch"),O}}function Dr(e){const{activationStart:t,domComplete:n,domContentLoadedEventEnd:i,domContentLoadedEventStart:s,domInteractive:r,fetchStart:o,loadEventEnd:a,loadEventStart:u,responseStart:f,type:d}=e,v=Lr();return Object.assign(Object.assign({},bi(e)),{pageLoadTime:R(n-o),documentParsingTime:R(v?r-v:null),domProcessingTime:R(n-r),domContentLoadHandlerTime:R(i-s),onLoadTime:R(a-u),ttfb:R(Math.max(f-(t??0),0)),type:d})}function Lr(){var e;return((e=performance.timing)===null||e===void 0?void 0:e.domLoading)!=null?performance.timing.domLoading-performance.timeOrigin:null}function R(e){return e==null?C:typeof e=="number"?Math.round(e>0?e:0).toString():e.toString()}function Br(e){let t;const n=new Promise(s=>{t=s});return new PerformanceObserver(s=>{var r;const[o]=s.getEntries();if(o==null||rt(o.name))return;const a=o.toJSON();let u=pi(a?.serverTiming);const f=(r=st(Pt,J.session))!==null&&r!==void 0?r:C,d=Object.assign(Object.assign({},Dr(a)),{faroNavigationId:ue(),faroPreviousNavigationId:f});jt(Pt,d.faroNavigationId,J.session),e("faro.performance.navigation",d,void 0,{spanContext:u,timestampOverwriteMs:performance.timeOrigin+a.startTime}
29),t(d)}).observe({type:Nr,buffered:!0}),n}const Fr={initiatorType:["xmlhttprequest","fetch"]};function zr(e,t,n){const i=P.config.trackResources;new PerformanceObserver(r=>{const o=r.getEntries();for(const a of o){if(rt(a.name))return;const u=a.toJSON();let f=pi(u?.serverTiming);if(i==null&&Cr(u,Fr)||i){const d=Object.assign(Object.assign({},bi(u)),{faroNavigationId:e,faroResourceId:ue()});P.config.trackUserActionsPreview&&n?.notify({type:Rt}),t("faro.performance.resource",d,void 0,{spanContext:f,timestampOverwriteMs:performance.timeOrigin+u.startTime})}}}).observe({type:Rt,buffered:!0})}var Vr=function(e,t,n,i){function s(r){return r instanceof n?r:new n(function(o){o(r)})}return new(n||(n=Promise))(function(r,o){function a(d){try{f(i.next(d))}catch(v){o(v)}}function u(d){try{f(i.throw(d))}catch(v){o(v)}}function f(d){d.done?r(d.value):s(d.value).then(a,u)}f((i=i.apply(e,t||[])).next())})};const vi=new V;class qr extends oe{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-performance",this.version=W}initialize(){if(!jr()){this.logDebug("performance observer not supported. Disable performance instrumentation.");return}Ur(()=>Vr(this,void 0,void 0,function*(){const t=this.api.pushEvent,{faroNavigationId:n}=yield Br(t);n!=null&&zr(n,t,vi)}))}}const Hr="resource-entry",mi="http-request-start",hi="http-request-end",Gr="dom-mutation",$r="faroUserActionName",Wr="data-faro-user-action-name",Kr="faroApiCall";function Yr(){const e=new V;return new MutationObserver((n,i)=>{e.notify({type:Gr})}).observe(document,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),e}const Et="fetch",Ye="xhr";function Xr(){const e=new V;function t(i){e.notify({type:mi,request:i})}function n(i){e.notify({type:hi,request:i})}return Zr({onRequestStart:t,onRequestEnd:n}),Jr({onRequestStart:t,onRequestEnd:n}),e}function Jr({onRequestStart:e,onRequestEnd:t}){const n=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){const i=arguments[1],s=rt(i),r=arguments[0],o=ue();this.addEventListener("loadstart",function(){s||e({url:i,method:r,requestId:o,apiType:Ye})}),this.addEventListener("load",function(){s||t({url:i,method:r,requestId:o,apiType:Ye})}),this.addEventListener("error",function(){s||t({url:i,method:r,requestId:o,apiType:Ye})}),this.addEventListener("abort",function(){s||t({url:i,method:r,requestId:o,apiType:Ye})}),n.apply(this,arguments)}}function Zr({onRequestEnd:e,onRequestStart:t}){const n=window.fetch;window.fetch=function(){var i,s;const r=(i=Cs(arguments[0]))!==null&&i!==void 0?i:"",o=rt(r),a=((s=arguments[1])!==null&&s!==void 0?s:{}).method,u=ue();return o||t({url:r,method:a,requestId:u,apiType:Et}),n.apply(this,arguments).then(f=>(o||e({url:r,method:a,requestId:u,apiType:Et}),f)).catch(f=>{throw o||e({url:r,method:a,requestId:u,apiType:Et}),f})}}function Qr(){const e=new V;return vi.subscribe(t=>{t.type===Rt&&e.notify({type:Hr})}),e}function eo(e){const t=e.split("data-")[1],n=t?.replace(/-(.)/g,(i,s)=>s.toUpperCase());return n?.replace(/-/g,"")}const On=100;function to(e){const{api:t,config:n}=e,i=Xr(),s=Yr(),r=Qr();let o,a=!1;function u(f){var d;let v;const c=ro(f);if(c?v=f.name:v=no(f.target,(d=n.trackUserActionsDataAttributeName)!==null&&d!==void 0?d:$r),a||v==null)return;a=!0;const b=ne();let l;const p=ue();Re.notify({type:ge,name:v,startTime:b,parentId:p}),o=Tt(o,()=>{l=ne(),a=!1,io(v,p)},On);const m=new Map;let y=!1,x;const g=new V().merge(i,s,r).takeWhile(()=>a).filter(h=>!(y&&!(xn(h)&&m.has(h.request.requestId)))).subscribe(h=>{so(h)&&m.set(h.request.requestId,h.request),xn(h)&&m.delete(h.request.requestId),o=Tt(o,()=>{l=ne();const S=Object.assign({api:t,userActionName:v,startTime:b,endTime:l,actionId:p,event:f},c?{attributes:f.attributes}:{}),w=m.size>0;y&&!w&&(clearTimeout(x),y=!1),w?(y=!0,Re.notify({type:Cn,name:v,parentId:p,reason:"pending-requests",haltTime:ne()}),x=Tt(void 0,()=>{In(g),_n(S),a=!1,y=!1},1e3*10)):(In(g),_n(S),a=!1,y=!1)},On)})}return u}function _n(e){const{api:t,userActionName:n,startTime:i,endTime:s,actionId:r,event:o,attributes:a}=e,u=s-i,f=o.type;Re.notify({type:jn,name:n,id:r,startTime:i,endTime:s,duration:u,eventType:f}),t.pushEvent(n,Object.assign({userActionStartTime:i.toString(),userActionEndTime:s.toString(),userActionDuration:u.toString(),userActionTrigger:f}
29,he(a)),void 0,{timestampOverwriteMs:i,customPayloadTransformer:d=>(d.action={id:r,name:n},d)})}function no(e,t){const n=eo(t),i=e.dataset;for(const s in i)if(s===n)return i[s]}function Tt(e,t,n){return e&&clearTimeout(e),e=setTimeout(()=>{t()},n),e}function io(e,t){Re.notify({type:Un,name:e,parentId:t})}function In(e){e?.unsubscribe(),e=void 0}function so(e){return e.type===mi}function xn(e){return e.type===hi}function ro(e){return e.type===Kr&&typeof e.name=="string"}let Ot;class oo extends oe{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-user-action",this.version=W}initialize(){Ot=to(P),window.addEventListener("pointerdown",Ot),window.addEventListener("keydown",Ot)}}class ao extends oe{constructor(){super(),this.name="@grafana/faro-web-sdk:instrumentation-csp",this.version=W}initialize(){document.addEventListener("securitypolicyviolation",this.securitypolicyviolationHandler.bind(this))}destroy(){document.removeEventListener("securitypolicyviolation",this.securitypolicyviolationHandler)}securitypolicyviolationHandler(t){this.api.pushEvent("securitypolicyviolation",he(t))}}function uo(e={}){const t=[new oo,new ei,new Rr,new zs,new cr];return e.enablePerformanceInstrumentation!==!1&&t.unshift(new qr),e.enableContentSecurityPolicyInstrumentation!==!1&&t.push(new ao),e.captureConsole!==!1&&t.push(new ie({disabledLevels:e.captureConsoleDisabledLevels})),t}const co="browser",lo=()=>{const e=window.k6;return{k6:Object.assign({isK6Browser:!0},e?.testRunId&&{testRunId:e?.testRunId})}};let kn,_t;function fo({generatePageId:e,initialPageMeta:t}={}){return()=>{const i=location.href;return Ue(e)&&kn!==i&&(kn=i,_t=e(location)),{page:Object.assign(Object.assign({url:i},_t?{id:_t}:{}),t)}}}var An=function(e,t,n,i){function s(r){return r instanceof n?r:new n(function(o){o(r)})}return new(n||(n=Promise))(function(r,o){function a(d){try{f(i.next(d))}catch(v){o(v)}}function u(d){try{f(i.throw(d))}catch(v){o(v)}}function f(d){d.done?r(d.value):s(d.value).then(a,u)}f((i=i.apply(e,t||[])).next())})},po=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]]);return n};const bo=30,vo=5,mo=5e3,ho=6e4,go=429,wo=202;class yo extends Qi{constructor(t){var n,i,s,r;super(),this.options=t,this.name="@grafana/faro-web-sdk:transport-fetch",this.version=W,this.disabledUntil=new Date,this.rateLimitBackoffMs=(n=t.defaultRateLimitBackoffMs)!==null&&n!==void 0?n:mo,this.getNow=(i=t.getNow)!==null&&i!==void 0?i:(()=>Date.now()),this.promiseBuffer=zi({size:(s=t.bufferSize)!==null&&s!==void 0?s:bo,
29concurrency:(r=t.concurrency)!==null&&r!==void 0?r:vo})}send(t){return An(this,void 0,void 0,function*(){try{if(this.disabledUntil>new Date(this.getNow()))return this.logWarn(`Dropping transport item due to too many requests. Backoff until ${this.disabledUntil}`),Promise.resolve();yield this.promiseBuffer.add(()=>{const n=JSON.stringify(ns(t)),{url:i,requestOptions:s,apiKey:r}=this.options,o=s??{},{headers:a}=o,u=po(o,["headers"]);let f;const d=this.metas.value.session;return d!=null&&(f=d.id),fetch(i,Object.assign({method:"POST",headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},a??{}),r?{"x-api-key":r}:{}),f?{"x-faro-session-id":f}:{}),body:n,keepalive:n.length<=ho},u??{})).then(v=>An(this,void 0,void 0,function*(){return v.status===wo&&v.headers.get("X-Faro-Session-Status")==="invalid"&&this.extendFaroSession(this.config,this.logDebug),v.status===go&&(this.disabledUntil=this.getRetryAfterDate(v),this.logWarn(`Too many requests, backing off until ${this.disabledUntil}`)),v.text().catch(Y),v})).catch(v=>{this.logError(`Failed sending payload to the receiver 30`,JSON.parse(n),v)})})}catch(n){this.logError(n)}})}getIgnoreUrls(){var t;return[this.options.url].concat((t=this.config.ignoreUrls)!==null&&t!==void 0?t:[])}isBatched(){return!0}getRetryAfterDate(t){const n=this.getNow(),i=t.headers.get("Retry-After");if(i){const s=Number(i);if(!isNaN(s))return new Date(s*1e3+n);const r=Date.parse(i);if(!isNaN(r))return new Date(r)}return new Date(n+this.rateLimitBackoffMs)}extendFaroSession(t,n){const i="Session expired",s=t.sessionTracking;if(s?.enabled){const{fetchUserSession:r,storeUserSession:o}=Yn(s);Dt({fetchUserSession:r,storeUserSession:o})({forceSessionExtend:!0}),n(`${i} created new session.`)}else n(`${i}.`)}}var So=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]]);return n};function Eo(e){var t;const n=[],i=Nn(e.unpatchedConsole,e.internalLoggerLevel);e.transports?((e.url||e.apiKey)&&i.error('if "transports" is defined, "url" and "apiKey" should not be defined'),n.push(...e.transports)):e.url?n.push(new yo({url:e.url,apiKey:e.apiKey})):i.error('either "url" or "transports" must be defined');const{dedupe:s=!0,eventDomain:r=co,globalObjectKey:o=_s,instrumentations:a=uo(),internalLoggerLevel:u=Rn,isolate:f=!1,logArgsSerializer:d=Xe,metas:v=Oo(e),paused:c=!1,preventGlobalExposure:b=!1,unpatchedConsole:l=it,trackUserActionsPreview:p=!1,trackUserActionsDataAttributeName:m=Wr,url:y}=e,x=So(e,["dedupe","eventDomain","globalObjectKey","instrumentations","internalLoggerLevel","isolate","logArg
30sSerializer","metas","paused","preventGlobalExposure","unpatchedConsole","trackUserActionsPreview","trackUserActionsDataAttributeName","url"]);return Object.assign(Object.assign({},x),{batching:Object.assign(Object.assign({},Is),e.batching),dedupe:s,globalObjectKey:o,instrumentations:To(a,e),internalLoggerLevel:u,isolate:f,logArgsSerializer:d,metas:v,parseStacktrace:or,paused:c,preventGlobalExposure:b,transports:n,unpatchedConsole:l,eventDomain:r,ignoreUrls:[...(t=e.ignoreUrls)!==null&&t!==void 0?t:[],...y?[y]:[],/\/collect(?:\/[\w]*)?$/],sessionTracking:Object.assign(Object.assign(Object.assign({},Bs),e.sessionTracking),_o({trackGeolocation:e.trackGeolocation,sessionTracking:e.sessionTracking})),trackUserActionsPreview:p,trackUserActionsDataAttributeName:m})}function To(e,{trackUserActionsPreview:t}){return e.filter(n=>!(n.name==="@grafana/faro-web-sdk:instrumentation-user-action"&&!t))}function Oo(e){var t,n;const{page:i,generatePageId:s}=(t=e?.pageTracking)!==null&&t!==void 0?t:{},r=[Ms,fo({generatePageId:s,initialPageMeta:i}),...(n=e.metas)!==null&&n!==void 0?n:[]];return $(window.k6)?[...r,lo]:r}function _o({trackGeolocation:e,sessionTracking:t}){var n;const i={};return Ri(e)&&(i.geoLocationTrackingEnabled=e),re(i)?{}:{session:Object.assign(Object.assign({},(n=t?.session)!==null&&n!==void 0?n:{}),{overrides:i})}}function Io(e){const t=Eo(e);if(t)return Os(t)}function xo({appName:e,tenant:t}){Io({url:Ti("/log/collect"),app:{name:e,version:"1.0.0",environment:"production"},user:{attributes:{tenant:t}},instrumentations:[new ei]})}window?.account?.faroEnabled&&xo({appName:"Account",tenant:window?.account?.livedomain});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.