PageSourceSearch

https://wwws.betterment.com/build/assets/dist-DKo5RuAg.js

js betterment.com collected 2026-09-24 08:33:22 UTC 657,250 bytes, 47 lines download raw bytes

1import{o as e,r as t,t as n}from"./rolldown-runtime-DAXXjFlN.js";import{n as r,t as i}from"./jsx-runtime-BTND-Rlb.js";import{br as a}from"./dist-BVOpp2ea.js";import{t as o}from"./preload-helper-B6JZccWF.js";import{$ as s,A as c,B as l,C as u,Ct as d,D as f,Dt as p,E as m,Et as h,F as g,G as _,H as v,I as y,J as b,K as x,L as S,M as C,N as w,O as T,P as E,Q as D,R as O,S as k,St as A,T as j,Tt as M,U as ee,V as te,W as N,X as ne,Y as re,Z as ie,_t as ae,a as oe,at as se,b as ce,bt as le,c as ue,ct as de,dt as fe,et as pe,f as me,ft as he,g as ge,gt as _e,h as ve,ht as ye,i as be,it as P,j as xe,k as Se,l as Ce,lt as we,m as Te,mt as Ee,n as De,nt as Oe,o as ke,ot as Ae,p as F,pt as je,q as Me,r as Ne,rt as Pe,s as Fe,st as Ie,t as Le,tt as Re,u as ze,ut as Be,v as Ve,vt as He,w as Ue,wt as We,x as Ge,xt as Ke,y as qe,yt as Je,z as Ye}from"./hub-DAWU9pcD.js";var Xe=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ze=/^[\\/]{2}/;function Qe(e,t){return t+e.replace(/\\/g,`/`)}var $e=function(e){return e.Pop=`POP`,e.Push=`PUSH`,e.Replace=`REPLACE`,e}({}),et=`popstate`;function tt(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function nt(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return ot(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:st(t)}return lt(t,n,null,e)}function I(e,t){if(e===!1||e==null)throw Error(t)}function rt(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function it(){return Math.random().toString(36).substring(2,10)}function at(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ot(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?ct(t):t,state:n,key:t&&t.key||r||it(),mask:i}}function st({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function ct(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function lt(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=tt(e)?e:ot(h.location,e,t);n&&n(r,e),l=u()+1;let d=at(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=tt(e)?e:ot(h.location,e,t);n&&n(r,e),l=u();let i=at(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ut(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(et,d),c=e,()=>{i.removeEventListener(et,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function ut(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),I(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:st(t);return i=i.replace(/ $/,`%20`),!n&&Ze.test(i)&&(i=r+i),new URL(i,r)}var L=e(r(),1),dt=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},ft=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function pt(e){return ft.has(e)}var mt=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function ht(e){return mt.has(e)}function gt(e){return e.index===!0}function _t(e){let t={};return e.Component&&Object.assign(t,{element:L.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:L.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:L.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function vt(e,t=_t,n=[],r={},i=!1){return e.map((e,a)=>
1{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(I(e.index!==!0||!e.children,`Cannot specify children on an index route`),I(i||!r[s],`Found a route id collision on id "${s}".  Route id's must be globally unique within Data Router usages`),gt(e)){let n={...e,id:s};return r[s]=yt(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=yt(n,t(n)),e.children&&(n.children=vt(e.children,t,o,r,i)),n}})}function yt(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function bt(e,t,n=`/`){return xt(e,t,n,!1)}function xt(e,t,n,r,i){let a=Ut((typeof t==`string`?ct(t):t).pathname||`/`,n);if(a==null)return null;let o=i??Ct(e),s=null,c=Ht(a);for(let e=0;s==null&&e<o.length;++e)s=Rt(o[e],c,r);return s}function St(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function Ct(e){let t=wt(e);return Et(t),t}function wt(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;I(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=$t([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(I(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),wt(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:It(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Vt(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Tt(e.path))a(e,t,!0,n)}),t}function Tt(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Tt(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function Et(e){e.sort((e,t)=>e.score===t.score?Lt(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Dt=/^:[\w-]+$/,Ot=/^:[\w-]+/,kt=3.5,At=3,jt=2,Mt=1,Nt=10,Pt=-2,Ft=e=>e===`*`;function It(e,t){let n=e.split(`/`),r=n.length;return n.some(Ft)&&(r+=Pt),t&&(r+=jt),n.filter(e=>!Ft(e)).reduce((e,t)=>e+(Dt.test(t)?At:Ot.test(t)?kt:t===``?Mt:Nt),r)}function Lt(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Rt(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Bt(u,l,s.matcher,s.compiledParams):zt(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=zt({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;
1Object.assign(i,d.params),o.push({params:i,pathname:$t([a,d.pathname]),pathnameBase:tn($t([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=$t([a,d.pathnameBase]))}return o}function zt(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Vt(e.path,e.caseSensitive,e.end);return Bt(e,t,n,r)}function Bt(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Vt(e,t=!1,n=!0){rt(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Ht(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return rt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ut(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Wt({basename:e,pathname:t}){return t===`/`?e:$t([e,t])}var Gt=e=>Xe.test(e);function Kt(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?ct(e):e,a;return n?(n=Qt(n),a=n.startsWith(`/`)?qt(n.substring(1),`/`):qt(n,t)):a=t,{pathname:a,search:nn(r),hash:rn(i)}}function qt(e,t){let n=en(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Jt(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Yt(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Xt(e){let t=Yt(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Zt(e,t,n,r=!1){let i;typeof e==`string`?i=ct(e):(i={...e},I(!i.pathname||!i.pathname.includes(`?`),Jt(`?`,`pathname`,`search`,i)),I(!i.pathname||!i.pathname.includes(`#`),Jt(`#`,`pathname`,`hash`,i)),I(!i.search||!i.search.includes(`#`),Jt(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Kt(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Qt=e=>e.replace(/[\\/]{2,}/g,`/`),$t=e=>Qt(e.join(`/`)),en=e=>e.replace(/\/+$/,``),tn=e=>en(e).replace(/^\/*/,`/`),nn=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,rn=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,an=(e,t=302)=>{let n=t;typeof n==`number`?n={status:n}:n.status===void 0&&(n.status=302);let r=new Headers(n.headers);return r.set(`Location`,e),new Response(null,{...n,headers:r})},on=(e,t)=>{let n=an(e,t);return n.headers.set(`X-Remix-Reload-Document`,`true`),n},sn=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],cn=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ln(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function un(e){return $t(e.map(e=>
1e.route.path).filter(Boolean))||`/`}function dn(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?ct(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}var fn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function pn(e,t){let n=e;if(typeof n!=`string`||!Xe.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(fn)try{let e=new URL(window.location.href),r=Ze.test(n)?new URL(Qe(n,e.protocol)):new URL(n),a=Ut(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{rt(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var mn=Symbol(`Uninstrumented`),hn=new WeakMap;function gn(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){e.lazy!=null&&n.lazy.push(e.lazy),e[`lazy.loader`]!=null&&n[`lazy.loader`].push(e[`lazy.loader`]),e[`lazy.action`]!=null&&n[`lazy.action`].push(e[`lazy.action`]),e[`lazy.middleware`]!=null&&n[`lazy.middleware`].push(e[`lazy.middleware`]),e.middleware!=null&&n.middleware.push(e.middleware),e.loader!=null&&n.loader.push(e.loader),e.action!=null&&n.action.push(e.action)}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=t.lazy;r.lazy=async(...t)=>Sn(await Cn(n.lazy,void 0,()=>e(...t),wn))}if(typeof t.lazy==`object`){let e=t.lazy;if(typeof e.middleware==`function`&&n[`lazy.middleware`].length>0){let t=e.middleware;r.lazy=Object.assign(r.lazy||{},{middleware:async(...e)=>Sn(await Cn(n[`lazy.middleware`],void 0,()=>t(...e),wn))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>Sn(await Cn(n[`lazy.loader`],void 0,()=>t(...e),wn))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>Sn(await Cn(n[`lazy.action`],void 0,()=>t(...e),wn))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=vn(t.loader),i=async(...t)=>Sn(await Cn(n.loader,Tn(t[0]),()=>e(...t),wn));e.hydrate===!0&&(i.hydrate=!0),yn(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=vn(t.action),i=async(...t)=>Sn(await Cn(n.action,Tn(t[0]),()=>e(...t),wn));yn(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=vn(e),r=async(...e)=>Sn(await Cn(n.middleware,Tn(e[0]),()=>t(...e),wn));return yn(r,t),r})),r}function _n(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){e.navigate!=null&&n.navigate.push(e.navigate),e.fetch!=null&&n.fetch.push(e.fetch)}})),n.navigate.length>0){let t=vn(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?st(i):`.`,...En(e,a??{})};return Sn(await Cn(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=bn(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...wn(e),meta:o})))};yn(r,t),e.navigate=r}if(n.fetch.length>0){let t=vn(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return Sn(await Cn(n.fetch,{href:o??`.`,fetcherKey:i,...En(e,s??{})},async()=>{let n=bn(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...wn(e),meta:c})))};yn(r,t),e.fetch=r}return e}function vn(e){return e[mn]??e}function yn(e,t){e[mn]=t}function bn(e,t){return hn.set(e,t),()=>{hn.get(e)===t&&hn.delete(e)}}function xn(e){let t=hn.get(e);return hn.delete(e),t}function Sn(e){if(e.type===`error`)throw e.value;return e.value}async function Cn(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,c=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=Cn(e,t,n,r,i,a-1),await s,I(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await c(),await s}else{try{i.result={type:`success`,value:await n()}}catch(e){i.result={type:`error`,value:e}}i.innerResult=r(i.result,t)}return i.result?i.result:(i.result={type:`error`,value:Error(`No result assigned in instrumentation chain.`)},i.innerResult=r(i.result,t),i.result)}function wn(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function Tn(e){let{request:t,context:n,params:r}=e;return{...e,request:Dn(t),params:{...r},context:On(n)}}function En(e,t){return{currentUrl:st(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function Dn(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function On(e){return{get:t=>e.get(t)}}var kn=[`POST`,`PUT`,`PATCH`,`DELETE`],An=new Set(kn),jn=[`GET`,...kn],Mn=new Set(jn),Nn=new Set([301,302,303,307,308]),Pn=new Set([307,308]),Fn={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},In={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ln={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Rn=`remix-router-transitions`,zn=Symbol(`ResetLoaderData`),Bn=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=Ct(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#n??this.#e}get branches(){return this.#r??this.#t}get hasHMRRoutes(){return this.#n!=null}setRoutes(e){this.#e=e,this.#t=Ct(e)}setHmrRoutes(e){this.#n=e,this.#r=Ct(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function Vn(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;I(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...gn(t.map(e=>
1e.route).filter(Boolean),e)})}let o={},s=new Bn(vt(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||ir,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=xt(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=Or(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Dr(s.activeRoutes);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&Je(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=Je(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,S=!x;else if(!v.some(e=>Kn(e.route)))x=!0,S=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}S=!1,x=!0,r.forEach(e=>{let r=qn(e.route,t,n);S||=r.renderFallback,x&&=!r.shouldLoad})}let C,w={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:Fn,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=`POP`,E=null,D=!1,O,k=!1,A=new Map,j=null,M=!1,ee=!1,te=new Set,N=new Map,ne=0,re=-1,ie=new Map,ae=new Set,oe=new Map,se=new Map,ce=new Set,le=new Map,ue,de=null;function fe(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(ue){ue(),ue=void 0;return}rt(le.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=He({currentLocation:w.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{ue=e});e.history.go(r*-1),Ve(i,{state:`blocked`,location:n,proceed(){Ve(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(w.blockers);e.set(i,Ln),he({blockers:e})}}),E?.resolve(),E=null;return}return ye(t,n)}),n){$r(t,A);let e=()=>ei(t,A);t.addEventListener(`pagehide`,e),j=()=>t.removeEventListener(`pagehide`,e)}return w.initialized||ye(`POP`,w.location,{initialHydration:!0}),C}function pe(){d&&d(),j&&j(),f.clear(),O&&O.abort(),w.fetchers.forEach((e,t)=>Ne(w.fetchers,t)),w.blockers.forEach((e,t)=>Be(t))}function me(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(w,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function he(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),w={...w,...e};let n=[],r=[];w.fetchers.forEach((e,t)=>{e.state===`idle`&&(ce.has(t)?n.push(t):r.push(t))}),ce.forEach(e=>{!w.fetchers.has(e)&&!N.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(w,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ne(w.fetchers,e)),r.forEach(e=>w.fetchers.delete(e))}function ge(t,n,{flushSync:r}={}){let i=w.actionData!=null&&w.navigation.formMethod!=null&&Ur(w.navigation.formMethod)&&w.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?w.actionData:null;let o=n.loaderData?wr(w.loaderData,n.loaderData,n.matches||[],n.errors):w.loaderData,c=w.blockers;c.size>0&&!M&&(c=new Map(c),c.forEach((e,t)=>c.set(t,Ln)));let l=!M&&qe(t,n.matches||w.matches),u=D===!0||w.navigation.formMethod!=null&&Ur(w.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),M||T===`POP`||(T===`PUSH`?e.history.push(t,t.state):T===`REPLACE`&&e.history.replace(t,t.state));let d;if(T===`POP`){let e=A.get(w.location.pathname);e&&e.has(t.pathname)?d={currentLocation:w.location,nextLocation:t}:A.has(t.pathname)&&(d={currentLocation:t,nextLocation:w.location})}else if(k){let e=A.get(w.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),A.set(w.location.pathname,e)),d={currentLocation:w.location,nextLocation:t}}he({...n,actionData:a,loaderData:o,historyAction:T,location:t,initialized:!0,renderFallback:!1,navigation:Fn,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),T=`POP`,D=!1,k=!1,M=!1,ee=!1,E?.resolve(),E=null,de?.resolve(),de=null}async function _e(t,n){if(E?.resolve(),E=null,typeof t==`number`){E||=ti();let n=E.promise;return e.history.go(t),n}let r=xn(C),{path:i,submission:a,error:o}=Wn(!1,Un(w.location,w.matches,c,t,n?.fromRouteId,n?.relative),n),s;n?.mask&&(s={pathname:``,search:``,hash:``,...typeof n.mask==`string`?ct(n.mask):{...w.location.mask,...n.mask}});let l=w.location,u=ot(l,i,n&&n.state,void 0,s);u={...u,...e.history.encodeLocation(u)};let d=n&&n.replace!=null?n.replace:void 0,f=`PUSH`;d===!0?f=`REPLACE`:d===!1||a!=null&&Ur(a.formMethod)&&a.formAction===w.location.pathname+w.location.search&&(f=`REPLACE`);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,h=He({currentLocation:l,nextLocation:u,historyAction:f});if(h){Ve(h,{state:`blocked`,location:u,proceed(){Ve(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),_e(t,n)},reset(){let e=new Map(w.blockers);e.set(h,Ln),he({blockers:e})}});return}await ye(f,u,{submission:a,pendingError:o,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function ve(){de||=ti(),ke(),he({revalidation:`loading`});let e=de.promise;return w.navigation.state===`submitting`?e:w.navigation.state===`idle`?(ye(w.historyAction,w.location,{startUninterruptedRevalidation:!0}
1),e):(ye(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:k===!0}),e)}async function ye(t,n,r){O&&O.abort(),O=null,T=t,M=(r&&r.startUninterruptedRevalidation)===!0,Ke(w.location,w.matches),D=(r&&r.preventScrollReset)===!0,k=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&w.matches&&w.matches.length>0&&!y?w.matches:xt(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&w.initialized&&!ee&&jr(w.location,n)&&!(r&&r.submission&&Ur(r.submission.formMethod))){ge(n,{matches:a},{flushSync:o});return}let l=Je(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),r?.instrumentationNavigateMetaReceiver){let t=Kr(e.history,n,a);r.instrumentationNavigateMetaReceiver(t)}if(!a){let{error:e,notFoundMatches:t,route:r}=Ue(n.pathname);ge(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;O=new AbortController;let d=yr(e.history,n,O.signal,r&&r.submission),f=e.getContext?await e.getContext():new dt,p;if(r&&r.pendingError)p=[Er(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Ur(r.submission.formMethod)){let i=await be(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(Ir(t)&&ln(t.error)&&t.error.status===404){O=null,ge(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=Jr(n,a,t,r.submission),o=!1,l.active=!1,d=yr(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await P(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(O=null,ge(n,{matches:h||a,...Tr(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function be(t,n,i,l,u,d,f,p,m={}){if(ke(),he({navigation:Yr(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await Ye(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Dr(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Er(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Ue(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=Gr(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:Or(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await De(t,n,ur(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(Lr(h)){let n;return n=m&&m.replace!=null?m.replace:vr(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===w.location.pathname+w.location.search,await Ee(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Ir(h)){let e=Er(l,g.route.id);return(m&&m.replace)!==!0&&(T=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function P(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||Jr(n,i,l,p),x=p||m||qr(b),S=!M&&!g;if(d){if(S){let e=xe(v);he({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await Ye(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Dr(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Er(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Ue(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:T,revalidatingFetchers:E}=Gn(t,u,a,o,e.history,w,i,x,n,g?[]:r,g===!0,ee,te,ce,oe,ae,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(re=++ne,!e.dataStrategy&&!T.some(e=>e.shouldLoad)&&!T.some(e=>e.route.middleware&&e.route.middleware.length>0)&&E.length===0){let e=new Map(w.fetchers),t=Le(e);return ge(n,{matches:i,loaderData:{},errors:v&&Ir(v[1])?{[v[0]]:v[1].error}:null,...Tr(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=xe(v);t!==void 0&&(e.actionData=t)}E.length>0&&(e.fetchers=Se(E)),he(e,{flushSync:_})}
1E.forEach(e=>{Fe(e.key),e.controller&&N.set(e.key,e.controller)});let D=()=>E.forEach(e=>Fe(e.key));O&&O.signal.addEventListener(`abort`,D);let{loaderResults:k,fetcherResults:A}=await Oe(T,E,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener(`abort`,D),E.forEach(e=>N.delete(e.key));let j=kr(k);if(j)return await Ee(t,j.result,!0,{replace:h}),{shortCircuited:!0};if(j=kr(A),j)return ae.add(j.key),await Ee(t,j.result,!0,{replace:h}),{shortCircuited:!0};let ie=new Map(w.fetchers),{loaderData:se,errors:le}=Cr(w,i,k,v,E,A,ie);g&&w.errors&&(le={...w.errors,...le});let ue=Le(ie),de=Re(re,ie),fe=ue||de||E.length>0;return{matches:i,loaderData:se,errors:le,...fe?{workingFetchers:ie}:{}}}function xe(e){if(e&&!Ir(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function Se(e){let t=new Map(w.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Xr(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Ce(t,n,r,i){Fe(t);let a=(i&&i.flushSync)===!0,o=xn(C),l=s.activeRoutes,u=Un(w.location,w.matches,c,r,n,i?.relative),d=xt(l,u,c,!1,s.branches),f=Je(d,l,u);if(f.active&&f.matches&&(d=f.matches),o&&o(Kr(e.history,u,d)),!d){F(t,n,Or(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=Wn(!0,u,i);if(h){F(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new dt,_=(i&&i.preventScrollReset)===!0;if(m&&Ur(m.formMethod)){await we(t,n,p,d,g,f.active,a,_,m,i&&i.defaultShouldRevalidate);return}oe.set(t,{routeId:n,path:p}),await Te(t,n,p,d,g,f.active,a,_,m)}async function we(t,n,i,l,u,d,f,p,m,h){ke(),oe.delete(t),Ae(t,Zr(m,w.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=yr(e.history,i,g.signal,m);if(d){let e=await Ye(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){F(t,n,e.error,{flushSync:f});return}else if(e.matches)l=e.matches;else{F(t,n,Or(404,{pathname:i}),{flushSync:f});return}}let v=Gr(l,i);if(!v.route.action&&!v.route.lazy){F(t,n,Or(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}N.set(t,g);let y=ne,b=ur(a,o,_,i,l,v,r,u),x=await De(_,i,b,u,t),S=x[v.route.id];if(!S){for(let e of b)if(x[e.route.id]){S=x[e.route.id];break}}if(_.signal.aborted){N.get(t)===g&&N.delete(t);return}if(ce.has(t)){if(Lr(S)||Ir(S)){Ae(t,Qr(void 0));return}}else{if(Lr(S))if(N.delete(t),re>y){Ae(t,Qr(void 0));return}else return ae.add(t),Ae(t,Xr(m)),Ee(_,S,!1,{fetcherSubmission:m,preventScrollReset:p});if(Ir(S)){F(t,n,S.error);return}}let C=w.navigation.location||w.location,E=yr(e.history,C,g.signal),D=s.activeRoutes,k=w.navigation.state===`idle`?w.matches:xt(D,w.navigation.location,c,!1,s.branches);I(k,`Didn't find any matches after fetcher action`);let A=++ne;ie.set(t,A);let{dsMatches:j,revalidatingFetchers:M}=Gn(E,u,a,o,e.history,w,k,m,C,r,!1,ee,te,ce,oe,ae,D,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,S],h),se=Xr(m,S.data),le=new Map(w.fetchers);le.set(t,se),M.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=le.get(t),r=Xr(void 0,n?n.data:void 0);le.set(t,r),Fe(t),e.controller&&N.set(t,e.controller)}),he({fetchers:le});let ue=()=>M.forEach(e=>Fe(e.key));g.signal.addEventListener(`abort`,ue);let{loaderResults:de,fetcherResults:fe}=await Oe(j,M,E,C,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,ue),ie.delete(t),N.delete(t),M.forEach(e=>N.delete(e.key));let pe=w.fetchers.has(t),me=e=>{if(!pe)return e;let n=new Map(e.fetchers);return n.set(t,Qr(S.data)),{...e,fetchers:n}},_e=kr(de);
1if(_e)return w=me(w),Ee(E,_e.result,!1,{preventScrollReset:p});if(_e=kr(fe),_e)return ae.add(_e.key),w=me(w),Ee(E,_e.result,!1,{preventScrollReset:p});let ve=new Map(w.fetchers);pe&&ve.set(t,Qr(S.data));let{loaderData:ye,errors:be}=Cr(w,k,de,void 0,M,fe,ve);Re(A,ve),w.navigation.state===`loading`&&A>re?(I(T,`Expected pending action`),O&&O.abort(),ge(w.navigation.location,{matches:k,loaderData:ye,errors:be,fetchers:ve})):(he({errors:be,loaderData:wr(w.loaderData,ye,k,be),fetchers:ve}),ee=!1)}async function Te(t,n,i,s,c,l,u,d,f){let p=w.fetchers.get(t);Ae(t,Xr(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=yr(e.history,i,m.signal);if(l){let e=await Ye(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){F(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{F(t,n,Or(404,{pathname:i}),{flushSync:u});return}}let g=Gr(s,i);N.set(t,m);let _=ne,v=await De(h,i,ur(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(N.get(t)===m&&N.delete(t),!h.signal.aborted){if(ce.has(t)){Ae(t,Qr(void 0));return}if(Lr(y))if(re>_){Ae(t,Qr(void 0));return}else{ae.add(t),await Ee(h,y,!1,{preventScrollReset:d});return}if(Ir(y)){F(t,n,y.error);return}Ae(t,Qr(y.data))}}async function Ee(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(E?.resolve(),E=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ee=!0);let d=i.response.headers.get(`Location`);I(d,`Expected a Location header on the redirect Response`),d=vr(d,new URL(r.url),c,e.history);let f=ot(w.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Gt(d)){let n=ut(t,d,!0);e=n.origin!==t.location.origin||Ut(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}O=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=w.navigation;!o&&!s&&m&&h&&g&&(o=qr(w.navigation));let _=o||s;Pn.has(i.response.status)&&_&&Ur(_.formMethod)?await ye(p,f,{submission:{..._,formAction:d},preventScrollReset:l||D,enableViewTransition:a?k:void 0}):await ye(p,f,{overrideNavigation:Jr(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||D,enableViewTransition:a?k:void 0})}async function De(e,t,n,r,i){let a,o={};try{a=await dr(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!Ur(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!w.loaderData.hasOwnProperty(e.route.id)&&(!w.errors||!w.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(Fr(r)){let i=r.result;o[t]={type:`redirect`,response:hr(i,e,t,n,c)}}else o[t]=await mr(r);return o}async function Oe(e,t,n,r,i){let a=De(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await De(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:Or(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function ke(){ee=!0,oe.forEach((e,t)=>{N.has(t)&&te.add(t),Fe(t)})}function Ae(e,t,n={}){let r=new Map(w.fetchers);r.set(e,t),he({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function F(e,t,n,r={}){let i=Er(w.matches,t),a=new Map(w.fetchers);Ne(a,e),he({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function je(e){return se.set(e,(se.get(e)||0)+1),ce.has(e)&&ce.delete(e),w.fetchers.get(e)||In}function Me(e,t){Fe(e,t?.reason),Ae(e,Qr(null))}function Ne(e,t){let n=w.fetchers.get(t);N.has(t)&&!(n&&n.state===`loading`&&ie.has(t))&&Fe(t),oe.delete(t),ie.delete(t),ae.delete(t),ce.delete(t),te.delete(t),e.delete(t)}function Pe(e){let t=(se.get(e)||0)-1;t<=0?(se.delete(e),ce.add(e)):se.set(e,t),he({fetchers:new Map(w.fetchers)})}function Fe(e,t){let n=N.get(e);n&&(n.abort(t),N.delete(e))}function Ie(e,t){for(let n of e){let e=t.get(n);I(e,`Expected fetcher: ${n}`);let r=Qr(e.data);t.set(n,r)}}function Le(e){let t=[],n=!1;for(let r of ae){let i=e.get(r);I(i,`Expected fetcher: ${r}`),i.state===`loading`&&(ae.delete(r),t.push(r),n=!0)}return Ie(t,e),n}function Re(e,t){let n=[];for(let[r,i]of ie)if(i<e){let e=t.get(r);I(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Fe(r),ie.delete(r),n.push(r))}return Ie(n,t),n.length>0}function ze(e,t){let n=w.blockers.get(e)||Ln;return le.get(e)!==t&&le.set(e,t),n}function Be(e){w.blockers.delete(e),le.delete(e)}function Ve(e,t){let n=w.blockers.get(e)||Ln;I(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(w.blockers);r.set(e,t),he({blockers:r})}function He({currentLocation:e,nextLocation:t,historyAction:n}){if(le.size===0)return;le.size>1&&rt(!1,`A router only supports one blocker at a time`);let r=Array.from(le.entries()),[i,a]=r[r.length-1],o=w.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Ue(e){let t=Or(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=Dr(n);return{notFoundMatches:r,route:i,error:t}}function We(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===Fn){_=!0;let e=qe(w.location,w.matches);e!=null&&he({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function Ge(e,t){return h&&h(e,t.map(e=>St(e,w.loaderData)))||e.key}function Ke(e,t){if(m&&g){let n=Ge(e,t);m[n]=g()}}function qe(e,t){if(m){let n=Ge(e,t),r=m[n];if(typeof r==`number`)return r}return null}function Je(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:xt(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:xt(n,r,c,!0,e)}}return{active:!1,matches:null}}async function Ye(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||Zn(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=xt(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=xt(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&Xe(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=xt(s.activeRoutes,n,c,!0,u),!f||Xe(l,f))return{type:`success`,matches:null};l=f}}function Xe(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function Ze(e){o={},s.setHmrRoutes(vt(e,a,void 0,o))}function Qe(e,t,n=!1){Zn(e,t,s,o,a,n),s.hasHMRRoutes||he({})}return C={get basename(){return c},get future(){return u},get state(){return w},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:fe,subscribe:me,enableScrollRestoration:We,navigate:_e,fetch:Ce,revalidate:ve,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:je,resetFetcher:Me,deleteFetcher:Pe,dispose:pe,getBlocker:ze,deleteBlocker:Be,patchRoutes:Qe,_internalFetchControllers:N,_internalSetRoutes:Ze,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){he(e)}},e.instrumentations&&(C=_n(C,e.instrumentations.map(e=>
1e.router).filter(Boolean))),C}function Hn(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Un(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Zt(r||`.`,Xt(o),Ut(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Wr(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=Wt({basename:n,pathname:c.pathname})),st(c)}function Wn(e,t,n){if(!n||!Hn(n))return{path:t};if(n.formMethod&&!Hr(n.formMethod))return{path:t,error:Or(405,{method:n.formMethod})};let r=()=>({path:t,error:Or(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Ar(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Ur(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}\n`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!Ur(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}I(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=br(n.formData),s=n.formData;else if(n.body instanceof FormData)o=br(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=xr(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=xr(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Ur(c.formMethod))return{path:t,submission:c};let l=ct(t);return e&&l.search&&Wr(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:st(l),submission:c}}function Gn(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?Ir(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&Ir(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=un(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!Kn(s))f=!1;else if(u){let{shouldLoad:e}=qn(s,a.loaderData,a.errors);f=e}else Jn(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return lr(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?Yn(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p};return lr(n,r,e,c,k,i,l,t,Xn(i,m),m,x)}),j=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=xt(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=Gr(b,e.path),C=new AbortController,w=yr(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=ur(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=ur(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};Xn(S,a)&&(T=ur(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function Kn(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function qn(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Kn(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}
1function Jn(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Yn(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Xn(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Zn(e,t,n,r,i,a){let o;if(e){let t=r[e];I(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Qn(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=vt(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=vt([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function Qn(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>Qn(e,t)))??!1:!1}var $n=new WeakMap,er=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(I(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=$n.get(i);o||(o={},$n.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=pt(e),n=i[e]!==void 0;if(t)rt(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)rt(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},tr=new WeakMap;function nr(e,t,n,r,i){let a=n[e.id];if(I(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=tr.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{I(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=ht(e),o=a[e]!==void 0;i?rt(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?rt(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return tr.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=er({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function rr(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function ir(e){return e.matches.some(e=>e.route.middleware)?ar(e,()=>rr(e)):rr(e)}function ar(e,t){return or(e,t,e=>{if(Vr(e))throw e;return e},Nr,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[Er(r,a).route.id]:{type:`error`,result:t}}}}}async function or(e,t,n,r,i){let{matches:a,...o}=e;return await sr(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function sr(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>
1{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await sr(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function cr(e,t,n,r,i){let a=er({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=nr(r.route,Ur(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function lr(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=cr(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Xn(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Xn(a,{...l,defaultShouldRevalidate:e}):Xn(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Ur(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Ur(n.method)||!p)?fr({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function ur(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?lr(e,t,n,r,un(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:cr(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function dr(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:dn(t,n),pattern:un(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response.  You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return ar(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function fr({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Ur(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:dn(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a)if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw Or(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}else if(t)c=await f(t);else{let t=new URL(e.url);throw Or(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function pr(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function mr(e){let{result:t,type:n}=e;if(zr(t)){let e;try{e=await pr(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new cn(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?Rr(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:Mr(t),statusCode:ln(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:ln(t)?t.status:void 0}:Rr(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function hr(e,t,n,r,i){let a=e.headers.get(`Location`);if(I(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Gt(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Un(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var gr=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function _r(e){try{return gr.includes(new URL(e).protocol)}catch{return!1}}function vr(e,t,n,r){if(Gt(e)){let r=e,i=Ze.test(r)?new URL(Qe(r,t.protocol)):new URL(r);if(_r(i.toString()))throw Error(`Invalid redirect location`);let a=Ut(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Qt(i.pathname)+i.search+i.hash}try{if(_r(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function yr(e,t,n,r){let i=e.createURL(Ar(t)).toString(),a={signal:n};if(r&&Ur(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=br(r.formData):a.body=r.formData}
1return new Request(i,a)}function br(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function xr(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Sr(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Ir(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(I(!Lr(f),`Cannot handle redirect results in processLoaderData`),Ir(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=Er(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=zn),c||(c=!0,s=ln(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Cr(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Sr(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(I(s,`Did not find corresponding fetcher result`),Ir(s)){let t=Er(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(Lr(s))I(!1,`Unhandled fetcher revalidation redirect`);else{let e=Qr(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function wr(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==zn).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function Tr(e){return e?Ir(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Er(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function Dr(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function Or(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new cn(e||500,o,Error(s),!0)}function kr(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Lr(r))return{key:n,result:r}}}function Ar(e){return st({...typeof e==`string`?ct(e):e,hash:``})}function jr(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function Mr(e){return new cn(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Nr(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Pr(t))}function Pr(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Fr(e){return zr(e.result)&&Nn.has(e.result.status)}function Ir(e){return e.type===`error`}function Lr(e){return(e&&e.type)===`redirect`}function Rr(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function zr(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Br(e){return Nn.has(e)}function Vr(e){return zr(e)&&Br(e.status)&&e.headers.has(`Location`)}function Hr(e){return Mn.has(e.toUpperCase())}function Ur(e){return An.has(e.toUpperCase())}function Wr(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Gr(e,t){let n=typeof t==`string`?ct(t).search:t.search;if(e[e.length-1].route.index&&Wr(n||``))return e[e.length-1];let r=Yt(e);return r[r.length-1]}function Kr(e,t,n){return{url:dn(e.createURL(t),t),pattern:n?un(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function qr(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Jr(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Yr(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Xr(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Zr(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Qr(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function $r(e,t){try{let n=e.sessionStorage.getItem(Rn);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function ei(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Rn,JSON.stringify(n))}catch(e){rt(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function ti(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var ni=L.createContext(null);ni.displayName=`DataRouter`;var ri=L.createContext(null);ri.displayName=`DataRouterState`;var ii=L.createContext(!1);function ai(){return L.useContext(ii)}var oi=L.createContext({isTransitioning:!1});oi.displayName=`ViewTransition`;var si=L.createContext(new Map);si.displayName=`Fetchers`;var ci=L.createContext(null);ci.displayName=`Await`;var li=L.createContext(null);li.displayName=`Navigation`;var ui=L.createContext(null);ui.displayName=`Location`;var di=L.createContext({outlet:null,matches:[],isDataRoute:!1});di.displayName=`Route`;var fi=L.createContext(null);fi.displayName=`RouteError`;var pi=`REACT_ROUTER_ERROR`,mi=`REDIRECT`,hi=`ROUTE_ERROR_RESPONSE`;function gi(e){if(e.startsWith(`${pi}:${mi}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function _i(e){if(e.startsWith(`${pi}:${hi}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new cn(t.status,t.statusText,t.data)}catch{}}function vi(e,{relative:t}={}){I(yi(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=L.useContext(li),{hash:i,pathname:a,search:o}=ki(e,{relative:t}),s=a;
1return n!==`/`&&(s=a===`/`?n:$t([n,a])),r.createHref({pathname:s,search:o,hash:i})}function yi(){return L.useContext(ui)!=null}function bi(){return I(yi(),`useLocation() may be used only in the context of a <Router> component.`),L.useContext(ui).location}function xi(){return L.useContext(ui).navigationType}function Si(e){I(yi(),`useMatch() may be used only in the context of a <Router> component.`);let{pathname:t}=bi();return L.useMemo(()=>zt(e,Ht(t)),[t,e])}var Ci=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function wi(){let{isDataRoute:e}=L.useContext(di);return e?Yi():Ti()}function Ti(){I(yi(),`useNavigate() may be used only in the context of a <Router> component.`);let e=L.useContext(ni),{basename:t,navigator:n}=L.useContext(li),{matches:r}=L.useContext(di),{pathname:i}=bi(),a=JSON.stringify(Xt(r)),o=L.useRef(!1);return L.useLayoutEffect(()=>{o.current=!0}),L.useCallback((r,s={})=>{if(rt(o.current,Ci),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Zt(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:$t([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Ei=L.createContext(null);function Di(e){let t=L.useContext(di).outlet;return L.useMemo(()=>t&&L.createElement(Ei.Provider,{value:e},t),[t,e])}function Oi(){let{matches:e}=L.useContext(di);return e[e.length-1]?.params??{}}function ki(e,{relative:t}={}){let{matches:n}=L.useContext(di),{pathname:r}=bi(),i=JSON.stringify(Xt(n));return L.useMemo(()=>Zt(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Ai(e,t){return ji(e,t)}function ji(e,t,n){I(yi(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=L.useContext(li),{matches:i}=L.useContext(di),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=bi(),l;if(t){let e=typeof t==`string`?ct(t):t;I(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):bt(e,{pathname:d}),p=Ri(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:$t([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:$t([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?L.createElement(ui.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function Mi(){let e=Ji(),t=ln(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return L.createElement(L.Fragment,null,L.createElement(`h2`,null,`Unexpected Application Error!`),L.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?L.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Ni=L.createElement(Mi,null),Pi=class extends L.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=ii;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=_i(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:L.createElement(di.Provider,{value:this.props.routeContext},L.createElement(fi.Provider,{value:e,children:this.props.component}));return this.context?L.createElement(Ii,{error:e},t):t}},Fi=new WeakMap;function Ii({children:e,error:t}){let{basename:n}=L.useContext(li);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=gi(t.digest);if(e){let r=Fi.get(t);if(r)throw r;let i=pn(e.location,n),a=i.absoluteURL||i.to;
1if(_r(a))throw Error(`Invalid redirect location`);if(fn&&!Fi.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Fi.set(t,n),n}return L.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Li({routeContext:e,match:t,children:n}){let r=L.useContext(ni);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),L.createElement(di.Provider,{value:e},n)}function Ri(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);I(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:un(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Ni,o&&(s<0&&c===0?(Zi(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?L.createElement(n.route.Component,null):n.route.element?n.route.element:e,L.createElement(Li,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?L.createElement(Pi,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function zi(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bi(e){let t=L.useContext(ni);return I(t,zi(e)),t}function Vi(e){let t=L.useContext(ri);return I(t,zi(e)),t}function Hi(e){let t=L.useContext(di);return I(t,zi(e)),t}function Ui(e){let t=Hi(e),n=t.matches[t.matches.length-1];return I(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Wi(){return Ui(`useRouteId`)}function Gi(){let e=Vi(`useNavigation`);return L.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function Ki(){let{matches:e,loaderData:t}=Vi(`useMatches`);return L.useMemo(()=>e.map(e=>St(e,t)),[e,t])}function qi(){let e=Vi(`useLoaderData`),t=Ui(`useLoaderData`);return e.loaderData[t]}function Ji(){let e=L.useContext(fi),t=Vi(`useRouteError`),n=Ui(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Yi(){let{router:e}=Bi(`useNavigate`),t=Ui(`useNavigate`),n=L.useRef(!1);return L.useLayoutEffect(()=>{n.current=!0}),L.useCallback(async(r,i={})=>{rt(n.current,Ci),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Xi={};function Zi(e,t,n){!t&&!Xi[e]&&(Xi[e]=!0,rt(!1,n))}var Qi={};function $i(e,t){!e&&!Qi[t]&&(Qi[t]=!0,console.warn(t))}var ea=[`HydrateFallback`,`hydrateFallbackElement`],ta=class{status=`pending`;promise;resolve;reject;
1constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function na({router:e,flushSync:t,onError:n,useTransitions:r}){r=ai()||r;let[i,a]=L.useState(e.state),[o,s]=(0,L.useOptimistic)(i),[c,l]=L.useState(),[u,d]=L.useState({isTransitioning:!1}),[f,p]=L.useState(),[m,h]=L.useState(),[g,_]=L.useState(),v=L.useRef(new Map),y=L.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:un(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),$i(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if($i(g==null||y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!g||!y){t&&u?t(()=>a(i)):r===!1?a(i):L.startTransition(()=>{r===!0&&s(e=>ra(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);L.useLayoutEffect(()=>e.subscribe(y),[e,y]),L.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new ta)},[u]),L.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):L.startTransition(()=>{r===!0&&s(e=>ra(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),L.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),L.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let b=L.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),x=e.basename||`/`,S=L.useMemo(()=>({router:e,navigator:b,static:!1,basename:x,onError:n}),[e,b,x,n]);return L.createElement(L.Fragment,null,L.createElement(ni.Provider,{value:S},L.createElement(ri.Provider,{value:o},L.createElement(si.Provider,{value:v.current},L.createElement(oi.Provider,{value:u},L.createElement(la,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},L.createElement(ia,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function ra(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var ia=L.memo(aa);function aa({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return ji(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function oa({to:e,replace:t,state:n,relative:r}){I(yi(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=L.useContext(li);rt(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=L.useContext(di),{pathname:o}=bi(),s=wi(),c=Zt(e,Xt(a),o,r===`path`),l=JSON.stringify(c);return L.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function sa(e){return Di(e.context)}function ca(e){I(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function la({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){I(!yi(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=L.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=ct(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=L.useMemo(()=>{let e=Ut(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);
1return rt(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:L.createElement(li.Provider,{value:c},L.createElement(ui.Provider,{children:t,value:h}))}function ua({children:e,location:t}){return Ai(da(e),t)}L.Component;function da(e,t=[]){let n=[];return L.Children.forEach(e,(e,r)=>{if(!L.isValidElement(e))return;let i=[...t,r];if(e.type===L.Fragment){n.push.apply(n,da(e.props.children,i));return}I(e.type===ca,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let a=e.props;I(!a.index||!a.children,`An index route cannot have child routes.`);let o={id:a.id||i.join(`-`),caseSensitive:a.caseSensitive,element:a.element,Component:a.Component,index:a.index,path:a.path,middleware:a.middleware,loader:a.loader,action:a.action,hydrateFallbackElement:a.hydrateFallbackElement,HydrateFallback:a.HydrateFallback,errorElement:a.errorElement,ErrorBoundary:a.ErrorBoundary,shouldRevalidate:a.shouldRevalidate,handle:a.handle,lazy:a.lazy};a.children&&(o.children=da(a.children,i)),n.push(o)}),n}var fa=`application/x-www-form-urlencoded`;function pa(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function ma(e){return pa(e)&&e.tagName.toLowerCase()===`button`}function ha(e){return pa(e)&&e.tagName.toLowerCase()===`form`}function ga(e){return pa(e)&&e.tagName.toLowerCase()===`input`}function _a(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function va(e,t){return e.button===0&&(!t||t===`_self`)&&!_a(e)}function ya(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function ba(e,t){let n=ya(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var xa=null;function Sa(){if(xa===null)try{new FormData(document.createElement(`form`),0),xa=!1}catch{xa=!0}return xa}var Ca=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function wa(e){return e!=null&&!Ca.has(e)?(rt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${fa}"`),null):e}function Ta(e,t){let n,r,i,a,o;if(ha(e)){let o=e.getAttribute(`action`);r=o?Ut(o,t):null,n=e.getAttribute(`method`)||`get`,i=wa(e.getAttribute(`enctype`))||fa,a=new FormData(e)}else if(ma(e)||ga(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Ut(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=wa(e.getAttribute(`formenctype`))||wa(o.getAttribute(`enctype`))||fa,a=new FormData(o,e),!Sa()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(pa(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=fa,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function Ea(e,t){if(e===!1||e==null)throw Error(t)}var Da={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Oa=/[&><\u2028\u2029]/g;function ka(e){return e.replace(Oa,e=>Da[e])}function Aa(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname.endsWith(`/`)?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}async function ja(e,t){if(e.id in t)return t[e.id];try{let n=await o(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ma(e){return e!=null&&typeof e.page==`string`}function Na(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Pa(e,t,n){return za((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await ja(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Na).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Fa(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>
1o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Ia(e,t,{includeHydrateFallback:n}={}){return La(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function La(e){return[...new Set(e)]}function Ra(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function za(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Ma(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Ra(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Ba(){let e=L.useContext(ni);return Ea(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Va(){let e=L.useContext(ri);return Ea(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Ha=L.createContext(void 0);Ha.displayName=`FrameworkContext`;function Ua(){let e=L.useContext(Ha);return Ea(e,`You must render this element inside a <HydratedRouter> element`),e}function Wa(e,t){let n=L.useContext(Ha),[r,i]=L.useState(!1),[a,o]=L.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=L.useRef(null);L.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),L.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Ga(s,p),onBlur:Ga(c,m),onMouseEnter:Ga(l,p),onMouseLeave:Ga(u,m),onTouchStart:Ga(d,p)}]:[a,f,{}]:[!1,f,{}]}function Ga(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ka({page:e,...t}){let n=ai(),{nonce:r}=Ua(),{router:i}=Ba(),a=L.useMemo(()=>bt(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?L.createElement(Ja,{page:e,matches:a,...t}):L.createElement(Ya,{page:e,matches:a,...t})):null}function qa(e){let{manifest:t,routeModules:n}=Ua(),[r,i]=L.useState([]);return L.useEffect(()=>{let r=!1;return Pa(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ja({page:e,matches:t,...n}){let r=bi(),i=L.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Aa(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return L.createElement(L.Fragment,null,i.map(e=>L.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Ya({page:e,matches:t,...n}){let r=bi(),{manifest:i,routeModules:a}=Ua(),{loaderData:o,matches:s}=Va(),c=L.useMemo(()=>Fa(e,t,s,i,r,`data`),[e,t,s,i,r]),l=L.useMemo(()=>Fa(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=L.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=Aa(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=L.useMemo(()=>Ia(l,i),[l,i]),f=qa(l);return L.createElement(L.Fragment,null,u.map(e=>L.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>L.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>L.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Xa(...e){return t=>
1{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Za=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Za&&(window.__reactRouterVersion=`8.3.0`)}catch{}function Qa(e,t){return Vn({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:nt({window:t?.window}),hydrationData:t?.hydrationData||$a(),routes:e,mapRouteProperties:_t,hydrationRouteProperties:ea,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function $a(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:eo(e.errors)}),e}function eo(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new cn(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&sn.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}function to({basename:e,children:t,useTransitions:n,window:r}){let i=L.useRef(null);i.current??=nt({window:r,v5Compat:!0});let a=i.current,[o,s]=L.useState({action:a.action,location:a.location}),c=L.useCallback(e=>{n===!1?s(e):L.startTransition(()=>s(e))},[n]);return L.useLayoutEffect(()=>a.listen(c),[a,c]),L.createElement(la,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function no({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=L.useState({action:n.action,location:n.location}),o=L.useCallback(e=>{r===!1?a(e):L.startTransition(()=>a(e))},[r]);return L.useLayoutEffect(()=>n.listen(o),[n,o]),L.createElement(la,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}no.displayName=`unstable_HistoryRouter`;var ro=L.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=L.useContext(li),v=typeof l==`string`&&Xe.test(l),y=pn(l,h);l=y.to;let b=vi(l,{relative:r}),x=bi(),S=null;if(o){let e=Zt(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:$t([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=Wa(n,p),E=uo(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function D(t){e&&e(t),t.defaultPrevented||E(t)}let O=!(y.isExternal||i),k=L.createElement(`a`,{...p,...T,href:(O?S:void 0)||y.absoluteURL||b,onClick:O?D:e,ref:Xa(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?L.createElement(L.Fragment,null,k,L.createElement(Ka,{page:b})):k});ro.displayName=`Link`;var io=L.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=ki(a,{relative:c.relative}),d=bi(),f=L.useContext(ri),{navigator:p,basename:m}=L.useContext(li),h=f!=null&&So(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=Ut(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(y)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return L.createElement(ro,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});
1io.displayName=`NavLink`;var ao=L.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=L.useContext(li),g=ho(),_=go(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&Xe.test(s);return L.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?L.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});ao.displayName=`Form`;function oo({getKey:e,storageKey:t,...n}){let r=L.useContext(Ha),{basename:i}=L.useContext(li),a=bi(),o=Ki();bo({getKey:e,storageKey:t});let s=L.useMemo(()=>{if(!r||!e)return null;let t=yo(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];
1typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),L.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${ka(JSON.stringify(t||_o))}, ${ka(JSON.stringify(s))})`}})}oo.displayName=`ScrollRestoration`;function so(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function co(e){let t=L.useContext(ni);return I(t,so(e)),t}function lo(e){let t=L.useContext(ri);return I(t,so(e)),t}function uo(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=wi(),d=bi(),f=ki(e,{relative:o});return L.useCallback(p=>{if(va(p,t)){p.preventDefault();let t=n===void 0?st(d)===st(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?L.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function fo(e){rt(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=L.useRef(ya(e)),n=L.useRef(!1),r=bi(),i=L.useMemo(()=>ba(r.search,n.current?null:t.current),[r.search]),a=wi();return[i,L.useCallback((e,t)=>{let r=ya(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var po=0,mo=()=>`__${String(++po)}__`;function ho(){let{router:e}=co(`useSubmit`),{basename:t}=L.useContext(li),n=Wi(),r=e.fetch,i=e.navigate;return L.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Ta(e,t);a.navigate===!1?await r(a.fetcherKey||mo(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function go(e,{relative:t}={}){let{basename:n}=L.useContext(li),r=L.useContext(di);I(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...ki(e||`.`,{relative:t})},o=bi();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:$t([n,a.pathname])),st(a)}var _o=`react-router-scroll-positions`,vo={};function yo(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:Ut(e.pathname,n)||e.pathname},t)),i??=e.key,i}function bo({getKey:e,storageKey:t}={}){let{router:n}=co(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=lo(`useScrollRestoration`),{basename:a}=L.useContext(li),o=bi(),s=Ki(),c=Gi();L.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),xo(L.useCallback(()=>{if(c.state===`idle`){let t=yo(o,s,a,e);vo[t]=window.scrollY}try{sessionStorage.setItem(t||_o,JSON.stringify(vo))}catch(e){rt(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(L.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||_o);e&&(vo=JSON.parse(e))}catch{}},[t]),L.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(vo,()=>window.scrollY,e?(t,n)=>yo(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),L.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{rt(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function xo(e,t){let{capture:n}=t||{};L.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function So(e,{relative:t}={}){let n=L.useContext(oi);I(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=co(`useViewTransitionState`),i=ki(e,{relative:t});if(!n.isTransitioning)return!1;let a=Ut(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ut(n.nextLocation.pathname,r)||n.nextLocation.pathname;return zt(i.pathname,o)!=null||zt(i.pathname,a)!=null}function Co(e){return Array.isArray(e)?e:Array.from(e)}function wo(e){return Number.isSafeInteger(e)&&e>=0}function To(e){return e!=null&&typeof e!=`function`&&wo(e.length)}function Eo(e){return e===`__proto__`}function Do(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}function Oo(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`
1:String(e)}function ko(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(ko).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function Ao(e){if(Array.isArray(e))return e.map(Oo);if(typeof e==`symbol`)return[e];e=ko(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&(t.push(``),r++);r<n;){let s=e[r];a?s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s:o?s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s:s===`[`?(o=!0,i&&=(t.push(i),``)):s===`.`?i&&=(t.push(i),``):i+=s,r++}return i&&t.push(i),t}function jo(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(Eo(t))return n;let r=e[t];return r===void 0?Do(t)?jo(e,Ao(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=Oo(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Mo(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),Eo(t))return n;let r=e[t];return r===void 0?n:r}}}function Mo(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||Eo(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}function No(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function Po(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function Fo(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Io(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Lo(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Ro=`[object RegExp]`,zo=`[object String]`,Bo=`[object Number]`,Vo=`[object Boolean]`,Ho=`[object Arguments]`,Uo=`[object Symbol]`,Wo=`[object Date]`,Go=`[object Map]`,Ko=`[object Set]`,qo=`[object Array]`,Jo=`[object Function]`,Yo=`[object ArrayBuffer]`,Xo=`[object Object]`,Zo=`[object Error]`,Qo=`[object DataView]`,$o=`[object Uint8Array]`,es=`[object Uint8ClampedArray]`,ts=`[object Uint16Array]`,ns=`[object Uint32Array]`,rs=`[object BigUint64Array]`,is=`[object Int8Array]`,as=`[object Int16Array]`,os=`[object Int32Array]`,ss=`[object BigInt64Array]`,cs=`[object Float32Array]`,ls=`[object Float64Array]`;function us(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ds(e,t){return fs(e,void 0,e,new Map,t)}function fs(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(Po(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=fs(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,fs(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(fs(a,void 0,n,r,i));return t}if(typeof Buffer<`u`&&Buffer.isBuffer(e))return e.subarray();if(us(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=fs(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),ps(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),ps(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),ps(t,e,n,r,i),t}if(e instanceof Error){let t=new e.constructor;return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,ps(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),ps(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),ps(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),ps(t,e,n,r,i),t}if(typeof e==`object`&&ms(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),ps(t,e,n,r,i),t}return e}function ps(e,t,n=e,r,i){let a=[...Object.keys(t),...Io(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=fs(t[s],s,n,r,i))}}function ms(e){switch(Lo(e)){case Ho:case qo:case Yo:case Qo:case Vo:case Wo:case cs:case ls:case is:case as:case os:case Go:case Bo:case Xo:case Ro:case Ko:case zo:case Uo:case $o:case es:case ts:case ns:return!0;default:return!1}}function hs(e,t){return ds(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`)switch(Object.prototype.toString.call(e)){case Bo:case zo:case Vo:{let t=new e.constructor(e?.valueOf());return ps(t,e),t}case Ho:{let t={};return ps(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}})}var gs=/^(?:0|[1-9]\d*)$/;function _s(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return gs.test(e)}}function vs(e){return typeof e==`object`&&!!e&&Lo(e)===`[object Arguments]`}function ys(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&Do(t)&&e?.[t]==null?Ao(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||vs(r))&&_s(t)&&t<r.length))return!1;r=r[t]}return!0}function bs(e){return typeof e==`object`&&!!e}function xs(e){return bs(e)&&To(e)}function Ss(e){return e[e.length-1]}function Cs(e){if(To(e))return Ss(Co(e))}function ws(e){return typeof e==`symbol`||e instanceof Symbol}function Ts(e){return ws(e)?NaN:Number(e)}function Es(e){return e?(e=Ts(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function Ds(e){let t=Es(e),n=t%1;return n?t-n:t}function Os(e){return e[0]}function ks(e){if(To(e))return Os(Co(e))}function As(e,t=1){let n=[],r=Math.floor(t);if(!To(e))return n;let i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];
vendor: 5,096 bytes, line 1
1t<r&&(Array.isArray(o)||o?.[Symbol.isConcatSpreadable]||typeof o==`object`&&o&&Object.prototype.toString.call(o)===`[object Arguments]`)?i(Array.isArray(o)?o:Array.from(o),t+1):n.push(o)}};return i(Array.from(e),0),n}var js=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ms=/^\w*$/;function Ns(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||ws(e)?!0:typeof e==`string`&&(Ms.test(e)||!js.test(e))||t!=null&&Object.hasOwn(t,e)}function Ps(e,t){if(e==null)return!0;switch(typeof t){case`symbol`:case`number`:case`object`:if(Array.isArray(t))return Fs(e,t);if(typeof t==`number`?t=Oo(t):typeof t==`object`&&(t=Object.is(t?.valueOf(),-0)?`-0`:String(t)),Eo(t))return!1;if(e?.[t]===void 0)return!0;try{return delete e[t],!0}catch{return!1}case`string`:if(e?.[t]===void 0&&Do(t))return Fs(e,Ao(t));if(Eo(t))return!1;try{return delete e[t],!0}catch{return!1}}}function Fs(e,t){let n=t.length===1?e:jo(e,t.slice(0,-1)),r=t[t.length-1];if(n?.[r]===void 0)return!0;if(Eo(r))return!1;try{return delete n[r],!0}catch{return!1}}function Is(e){return e==null}function Ls(...e){let t=0;for(let n=0;n<e.length;n++)e[n].length>t&&(t=e[n].length);let n=e.length,r=Array(t);for(let i=0;i<t;++i){let t=Array(n);for(let r=0;r<n;++r)t[r]=e[r][i];r[i]=t}return r}function Rs(...e){return e.length?Ls(...e.filter(e=>xs(e))):[]}var zs=(e,t,n)=>{let r=e[t];(!(Object.hasOwn(e,t)&&Fo(r,n))||n===void 0&&!(t in e))&&(e[t]=n)};function Bs(e,t,n,r){if(e==null&&!No(e))return e;let i;i=Ns(t,e)?[t]:Array.isArray(t)?t:Ao(t);let a=n(jo(e,i)),o=e;for(let t=0;t<i.length&&o!=null;t++){let n=Oo(i[t]);if(Eo(n))continue;let s;if(t===i.length-1)s=a;else{let a=o[n],c=r?.(a,n,e);s=c===void 0?No(a)?a:_s(i[t+1])?[]:{}:c}zs(o,n,s),o=o[n]}return e}function Vs(e,t,n){return Bs(e,t,()=>n,()=>void 0)}function Hs(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)===`[object Object]`:!1}function Us(e,t,n){return Ws(e,t,void 0,void 0,void 0,void 0,n)}function Ws(e,t,n,r,i,a,o){let s=o(e,t,n,r,i,a);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case`bigint`:case`string`:case`boolean`:case`symbol`:case`undefined`:return e===t;case`number`:return e===t||Object.is(e,t);case`function`:return e===t;case`object`:return Gs(e,t,a,o)}return Gs(e,t,a,o)}function Gs(e,t,n,r){if(Object.is(e,t))return!0;let i=Lo(e),a=Lo(t);if(i===`[object Arguments]`&&(i=Xo),a===`[object Arguments]`&&(a=Xo),i!==a)return!1;switch(i){case zo:return e.toString()===t.toString();case Bo:return Fo(e.valueOf(),t.valueOf());case Vo:case Wo:case Uo:return Object.is(e.valueOf(),t.valueOf());case Ro:return e.source===t.source&&e.flags===t.flags;case Jo:return e===t}n??=new Map;let o=n.get(e),s=n.get(t);if(o!=null&&s!=null)return o===t;n.set(e,t),n.set(t,e);try{switch(i){case Go:if(e.size!==t.size)return!1;for(let[i,a]of e.entries())if(!t.has(i)||!Ws(a,t.get(i),i,e,t,n,r))return!1;return!0;case Ko:{if(e.size!==t.size)return!1;let i=Array.from(e.values()),a=Array.from(t.values());for(let o=0;o<i.length;o++){let s=i[o],c=a.findIndex(i=>Ws(s,i,void 0,e,t,n,r));if(c===-1)return!1;a.splice(c,1)}return!0}case qo:case $o:case es:case ts:case ns:case rs:case is:case as:case os:case ss:case cs:case ls:if(typeof Buffer<`u`&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Ws(e[i],t[i],i,e,t,n,r))return!1;return!0;case Yo:return e.byteLength===t.byteLength&&Gs(new Uint8Array(e),new Uint8Array(t),n,r);case Qo:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:Gs(new Uint8Array(e),new Uint8Array(t),n,r);case Zo:return e.name===t.name&&e.message===t.message;case Xo:{if(!(Gs(e.constructor,t.constructor,n,r)||Hs(e)&&Hs(t)))return!1;let i=[...Object.keys(e),...Io(e)],a=[...Object.keys(t),...Io(t)];if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++){let o=i[a],s=e[o];if(!Object.hasOwn(t,o))return!1;let c=t[o];if(!Ws(s,c,o,e,t,n,r))return!1}return!0}default:return!1}}finally{n.delete(e),n.delete(t)}}function Ks(){}function qs(e,t){return Us(e,t,Ks)}function Js(e){return typeof Buffer<`u`&&Buffer.isBuffer(e)}function Ys(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function Xs(e){return us(e)}function Zs(e,t){if(e=Ds(e),e<1||!Number.isSafeInteger(e))return[];let n=Array(e);for(let r=0;r<e;r++)n[r]=typeof t==`function`?t(r):r;return n}function Qs(e){if(e==null)return[];switch(typeof e){case`object`:case`function`:return To(e)?tc(e):Ys(e)?ec(e):$s(e);default:return $s(Object(e))}}function $s(e){let t=[];for(let n in e)t.push(n);return t}function ec(e){return $s(e).filter(e=>e!==`constructor`)}function tc(e){let t=Zs(e.length,e=>`${e}`),n=new Set(t);Js(e)&&(n.add(`offset`),n.add(`parent`)),Xs(e)&&(n.add(`buffer`),n.add(`byteLength`),n.add(`byteOffset`));let r=$s(e).filter(e=>!n.has(e));return Array.isArray(e)?[...t,...r]:[...t.filter(t=>Object.hasOwn(e,t)),...r]}function nc(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;
1if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function rc(e){let t=[];for(;e;)t.push(...Io(e)),e=Object.getPrototypeOf(e);return t}function ic(e,...t){if(e==null)return{};t=As(t);let n=ac(e,t);for(let e=0;e<t.length;e++){let r=t[e];switch(typeof r){case`object`:Array.isArray(r)||(r=Array.from(r));for(let e=0;e<r.length;e++){let t=r[e];Ps(n,t)}break;case`string`:case`symbol`:case`number`:Ps(n,r);break}}return n}function ac(e,t){return t.some(e=>Array.isArray(e)||Do(e))?sc(e):oc(e)}function oc(e){let t={},n=[...Qs(e),...rc(e)];for(let r=0;r<n.length;r++){let i=n[r];t[i]=e[i]}return t}function sc(e){let t={},n=[...Qs(e),...rc(e)];for(let r=0;r<n.length;r++){let i=n[r];t[i]=hs(e[i],e=>{if(!nc(e))return e})}return t}function cc(e,...t){if(Is(e))return{};let n={};for(let r=0;r<t.length;r++){let i=t[r];switch(typeof i){case`object`:Array.isArray(i)||(i=To(i)?Array.from(i):[i]);break;case`string`:case`symbol`:case`number`:i=[i];break}for(let t of i){let r=jo(e,t);r===void 0&&!ys(e,t)||(typeof t==`string`&&Object.hasOwn(e,t)?n[t]=r:Vs(n,t,r))}}return n}function lc(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}var uc=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function dc(e){return Array.from(e.match(uc)??[])}function fc(e){let t=dc(e);if(t.length===0)return``;let[n,...r]=t;return`${n.toLowerCase()}${r.map(e=>lc(e)).join(``)}`}function pc(e){return typeof e!=`string`&&(e=ko(e)),e.replace(/['\u2019]/g,``)}function mc(e){return fc(pc(e))}function hc(e){return dc(e).map(e=>e.toLowerCase()).join(`_`)}function gc(e){return hc(pc(e))}function _c(e){return e.substring(0,1).toUpperCase()+e.substring(1)}function vc(e){return _c(ko(e))}var yc=a(),bc=`Invariant failed`;function xc(e,t){if(!e)throw Error(bc)}function Sc(e){return{enumerable:!0,value:e}}function Cc(e){return{enumerable:!0,writable:!0,value:e}}var wc={},Tc=()=>!0,Ec=()=>({}),Dc=e=>e,Oc=(e,t,n,r)=>e.apply(n,r)&&t.apply(n,r),kc=(e,t,n,[r,i])=>t.call(n,e.call(n,r,i),i),Ac=(e,t)=>Object.freeze(Object.create(e,t));function jc(e,t,n){return e.reduce((e,t)=>function(...r){return n(e,t,this,r)},t)}function Mc(e){return Ac(this,{fn:Sc(e)})}var Nc={},Pc=Mc.bind(Nc),Fc={},Ic=Mc.bind(Fc);function Lc(e,t){return t.filter(t=>e.isPrototypeOf(t))}function Rc(e,t,...n){let r=jc(Lc(Fc,n).map(e=>e.fn),Tc,Oc),i=jc(Lc(Nc,n).map(e=>e.fn),Dc,kc);return Ac(this,{from:Sc(e),to:Sc(t),guards:Sc(r),reducers:Sc(i)})}var zc={},Bc={},Vc=Rc.bind(zc);Rc.bind(Bc,null);function Hc(e,t,n){return Jc(t,e,n,this.immediates)||e}function Uc(e){let t=new Map;for(let n of e)t.has(n.from)||t.set(n.from,[]),t.get(n.from).push(n);return t}var Wc={enter:Dc};function Gc(...e){let t=Lc(zc,e),n=Lc(Bc,e),r={final:Sc(e.length===0),transitions:Sc(Uc(t))};return n.length&&(r.immediates=Sc(n),r.enter=Sc(Hc)),Ac(Wc,r)}var Kc={get state(){return{name:this.current,value:this.states[this.current]}}};function qc(e,t,n=Ec){return typeof e!=`string`&&(n=t||Ec,t=e,e=Object.keys(t)[0]),wc._create&&wc._create(e,t),Ac(Kc,{context:Sc(n),current:Sc(e),states:Sc(t)})}function Jc(e,t,n,r){let{context:i}=e;for(let{to:a,guards:o,reducers:s}of r)if(o(i,n)){e.context=s.call(e,i,n);let r=t.original||t,o=Ac(r,{current:Sc(a),original:{value:r}});return wc._onEnter&&wc._onEnter(t,a,e.context,i,n),o.state.value.enter(o,e,n)}}function Yc(e,t){let n=t.type||t,{machine:r}=e,{value:i,name:a}=r.state;return i.transitions.has(n)?Jc(e,r,t,i.transitions.get(n))||r:(wc._send&&wc._send(n,a),r)}var Xc={send(e){this.machine=Yc(this,e),this.onChange(this)}};function Zc(e,t,n,r){let i=Object.create(Xc,{machine:Cc(e),context:Cc(e.context(n,r)),onChange:Sc(t)});return i.send=i.send.bind(i),i.machine=i.machine.state.value.enter(i.machine,i,r),i}var Qc=n(((e,t)=>{t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)})),$c=n(((e,t)=>{var n=`%[a-f0-9]{2}
1`,r=RegExp(`(`+n+`)|([^%]+?)`,`gi`),i=RegExp(`(`+n+`)+`,`gi`);function a(e,t){try{return[decodeURIComponent(e.join(``))]}catch{}if(e.length===1)return e;t||=1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],a(n),a(r))}function o(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(r)||[],n=1;n<t.length;n++)e=a(t,n).join(``),t=e.match(r)||[];return e}}function s(e){for(var t={"%FE%FF":`��`,"%FF%FE":`��`},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{var r=o(n[0]);r!==n[0]&&(t[n[0]]=r)}n=i.exec(e)}t[`%C2`]=`�`;for(var a=Object.keys(t),s=0;s<a.length;s++){var c=a[s];e=e.replace(new RegExp(c,`g`),t[c])}return e}t.exports=function(e){if(typeof e!=`string`)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g,` `),decodeURIComponent(e)}catch{return s(e)}}})),el=n(((e,t)=>{t.exports=(e,t)=>{if(!(typeof e==`string`&&typeof t==`string`))throw TypeError("Expected the arguments to be of type `string`");if(t===``)return[e];let n=e.indexOf(t);return n===-1?[e]:[e.slice(0,n),e.slice(n+t.length)]}})),tl=n(((e,t)=>{t.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),a=0;a<r.length;a++){var o=r[a],s=e[o];(i?t.indexOf(o)!==-1:t(o,s,e))&&(n[o]=s)}return n}})),nl=n((e=>{var t=Qc(),n=$c(),r=el(),i=tl(),a=e=>e==null;function o(e){switch(e.arrayFormat){case`index`:return t=>(n,r)=>{let i=n.length;return r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,[l(t,e),`[`,i,`]`].join(``)]:[...n,[l(t,e),`[`,l(i,e),`]=`,l(r,e)].join(``)]};case`bracket`:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,[l(t,e),`[]`].join(``)]:[...n,[l(t,e),`[]=`,l(r,e)].join(``)];case`comma`:case`separator`:return t=>(n,r)=>r==null||r.length===0?n:n.length===0?[[l(t,e),`=`,l(r,e)].join(``)]:[[n,l(r,e)].join(e.arrayFormatSeparator)];default:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,l(t,e)]:[...n,[l(t,e),`=`,l(r,e)].join(``)]}}function s(e){let t;switch(e.arrayFormat){case`index`:return(e,n,r)=>{if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,``),!t){r[e]=n;return}r[e]===void 0&&(r[e]={}),r[e][t[1]]=n};case`bracket`:return(e,n,r)=>{if(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,``),!t){r[e]=n;return}if(r[e]===void 0){r[e]=[n];return}r[e]=[].concat(r[e],n)};case`comma`:case`separator`:return(t,n,r)=>{let i=typeof n==`string`&&n.includes(e.arrayFormatSeparator),a=typeof n==`string`&&!i&&u(n,e).includes(e.arrayFormatSeparator);n=a?u(n,e):n,r[t]=i||a?n.split(e.arrayFormatSeparator).map(t=>u(t,e)):n===null?n:u(n,e)};default:return(e,t,n)=>{if(n[e]===void 0){n[e]=t;return}n[e]=[].concat(n[e],t)}}}function c(e){if(typeof e!=`string`||e.length!==1)throw TypeError(`arrayFormatSeparator must be single character string`)}function l(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function u(e,t){return t.decode?n(e):e}function d(e){return Array.isArray(e)?e.sort():typeof e==`object`?d(Object.keys(e)).sort((e,t)=>Number(e)-Number(t)).map(t=>e[t]):e}function f(e){let t=e.indexOf(`#`);return t!==-1&&(e=e.slice(0,t)),e}function p(e){let t=``,n=e.indexOf(`#`);return n!==-1&&(t=e.slice(n)),t}function m(e){e=f(e);let t=e.indexOf(`?`);return t===-1?``:e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e==`string`&&e.trim()!==``?e=Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()===`true`||e.toLowerCase()===`false`)&&(e=e.toLowerCase()===`true`),e}function g(e,t){t=Object.assign({decode:!0,sort:!0,arrayFormat:`none`,arrayFormatSeparator:`,`,parseNumbers:!1,parseBooleans:!1},t),c(t.arrayFormatSeparator);let n=s(t),i=Object.create(null);if(typeof e!=`string`||(e=e.trim().replace(/^[?#&]/,``),!e))return i;for(let a of e.split(`&`)){if(a===``)continue;let[e,o]=r(t.decode?a.replace(/\+/g,` `):a,`=`);o=o===void 0?null:[`comma`,`separator`].includes(t.arrayFormat)?o:u(o,t),n(u(e,t),o,i)}for(let e of Object.keys(i)){let n=i[e];if(typeof n==`object`&&n)for(let e of Object.keys(n))n[e]=h(n[e],t);else i[e]=h(n,t)}return t.sort===!1?i:(t.sort===!0?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce((e,t)=>
1{let n=i[t];return n&&typeof n==`object`&&!Array.isArray(n)?e[t]=d(n):e[t]=n,e},Object.create(null))}e.extract=m,e.parse=g,e.stringify=(e,t)=>{if(!e)return``;t=Object.assign({encode:!0,strict:!0,arrayFormat:`none`,arrayFormatSeparator:`,`},t),c(t.arrayFormatSeparator);let n=n=>t.skipNull&&a(e[n])||t.skipEmptyString&&e[n]===``,r=o(t),i={};for(let t of Object.keys(e))n(t)||(i[t]=e[t]);let s=Object.keys(i);return t.sort!==!1&&s.sort(t.sort),s.map(n=>{let i=e[n];return i===void 0?``:i===null?l(n,t):Array.isArray(i)?i.reduce(r(n),[]).join(`&`):l(n,t)+`=`+l(i,t)}).filter(e=>e.length>0).join(`&`)},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[n,i]=r(e,`#`);return Object.assign({url:n.split(`?`)[0]||``,query:g(m(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:u(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0},n);let r=f(t.url).split(`?`)[0]||``,i=e.extract(t.url),a=e.parse(i,{sort:!1}),o=Object.assign(a,t.query),s=e.stringify(o,n);s&&=`?${s}`;let c=p(t.url);return t.fragmentIdentifier&&(c=`#${l(t.fragmentIdentifier,n)}`),`${r}${s}${c}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0},r);let{url:a,query:o,fragmentIdentifier:s}=e.parseUrl(t,r);return e.stringifyUrl({url:a,query:i(o,n),fragmentIdentifier:s},r)},e.exclude=(t,n,r)=>{let i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}})),rl=e(nl(),1),il=i(),al;(function(e){e.Backspace=`Backspace`,e.Tab=`Tab`,e.Enter=`Enter`,e.Shift=`Shift`,e.Control=`Control`,e.Alt=`Alt`,e.CapsLock=`CapsLock`,e.Escape=`Escape`,e.Esc=`Esc`,e.Space=` `,e.PageUp=`PageUp`,e.PageDown=`PageDown`,e.End=`End`,e.Home=`Home`,e.ArrowLeft=`ArrowLeft`,e.ArrowUp=`ArrowUp`,e.ArrowRight=`ArrowRight`,e.ArrowDown=`ArrowDown`,e.Left=`Left`,e.Up=`Up`,e.Right=`Right`,e.Down=`Down`,e.Insert=`Insert`,e.Delete=`Delete`,e.Zero=`0`,e.ClosedParen=`)`,e.One=`1`,e.ExclamationMark=`!`,e.Two=`2`,e.AtSign=`@`,e.Three=`3`,e.PoundSign=`£`,e.Hash=`#`,e.Four=`4`,e.DollarSign=`$`,e.Five=`5`,e.PercentSign=`%`,e.Six=`6`,e.Caret=`^`,e.Hat=`^`,e.Seven=`7`,e.Ampersand=`&`,e.Eight=`8`,e.Star=`*`,e.Asterisk=`*`,e.Nine=`9`,e.OpenParen=`(`,e.a=`a`,e.b=`b`,e.c=`c`,e.d=`d`,e.e=`e`,e.f=`f`,e.g=`g`,e.h=`h`,e.i=`i`,e.j=`j`,e.k=`k`,e.l=`l`,e.m=`m`,e.n=`n`,e.o=`o`,e.p=`p`,e.q=`q`,e.r=`r`,e.s=`s`,e.t=`t`,e.u=`u`,e.v=`v`,e.w=`w`,e.x=`x`,e.y=`y`,e.z=`z`,e.A=`A`,e.B=`B`,e.C=`C`,e.D=`D`,e.E=`E`,e.F=`F`,e.G=`G`,e.H=`H`,e.I=`I`,e.J=`J`,e.K=`K`,e.L=`L`,e.M=`M`,e.N=`N`,e.O=`O`,e.P=`P`,e.Q=`Q`,e.R=`R`,e.S=`S`,e.T=`T`,e.U=`U`,e.V=`V`,e.W=`W`,e.X=`X`,e.Y=`Y`,e.Z=`Z`,e.Meta=`Meta`,e.LeftWindowKey=`Meta`,e.RightWindowKey=`Meta`,e.Numpad0=`0`,e.Numpad1=`1`,e.Numpad2=`2`,e.Numpad3=`3`,e.Numpad4=`4`,e.Numpad5=`5`,e.Numpad6=`6`,e.Numpad7=`7`,e.Numpad8=`8`,e.Numpad9=`9`,e.Multiply=`*`,e.Add=`+`,e.Subtract=`-`,e.DecimalPoint=`.`,e.MSDecimalPoint=`Decimal`,e.Divide=`/`,e.F1=`F1`,e.F2=`F2`,e.F3=`F3`,e.F4=`F4`,e.F5=`F5`,e.F6=`F6`,e.F7=`F7`,e.F8=`F8`,e.F9=`F9`,e.F10=`F10`,e.F11=`F11`,e.F12=`F12`,e.NumLock=`NumLock`,e.ScrollLock=`ScrollLock`,e.SemiColon=`;`,e.Equals=`=`,e.Comma=`,`,e.Dash=`-`,e.Period=`.`,e.UnderScore=`_`,e.PlusSign=`+`,e.ForwardSlash=`/`,e.Tilde=`~`,e.GraveAccent="`",e.OpenBracket=`[`,e.ClosedBracket=`]`,e.Quote=`'`})(al||={});function ol(e,t){return function(){return e.apply(t,arguments)}}var{toString:sl}=Object.prototype,{getPrototypeOf:cl}=Object,{iterator:ll,toStringTag:ul}=Symbol,dl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),fl=(e,t)=>{let n=e,r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),dl(n,t))return!0;n=cl(n)}return!1},pl=(e,t)=>e!=null&&fl(e,t)?e[t]:void 0,ml=(e=>t=>{let n=sl.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),hl=e=>(e=e.toLowerCase(),t=>ml(t)===e),gl=e=>t=>typeof t===e,{isArray:_l}=Array,vl=gl(`undefined`);function yl(e){return e!==null&&!vl(e)&&e.constructor!==null&&!vl(e.constructor)&&Cl(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var bl=hl(`ArrayBuffer`);function xl(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&bl(e.buffer),t}var Sl=gl(`string`),Cl=gl(`function`),wl=gl(`number`),Tl=e=>typeof e==`object`&&!!e,El=e=>e===!0||e===!1,Dl=e=>{if(!Tl(e))return!1;let t=cl(e);return(t===null||t===Object.prototype||cl(t)===null)&&!fl(e,ul)&&!fl(e,ll)},Ol=e=>{if(!Tl(e)||yl(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},kl=hl(`Date`),Al=hl(`File`),jl=e=>!!(e&&e.uri!==void 0),Ml=e=>e&&e.getParts!==void 0,Nl=hl(`Blob`),Pl=hl(`FileList`),Fl=hl(`Set`),Il=e=>Tl(e)&&Cl(e.pipe);function Ll(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var Rl=Ll(),zl=Rl.FormData===void 0?void 0:Rl.FormData,Bl=e=>{if(!e)return!1;if(zl&&e instanceof zl)return!0;let t=cl(e);if(!t||t===Object.prototype||!Cl(e.append))return!1;let n=ml(e);return n===`formdata`||n===`object`&&Cl(e.toString)&&e.toString()===`[object FormData]`}
1,Vl=hl(`URLSearchParams`),[Hl,Ul,Wl,Gl]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(hl),Kl=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function ql(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),_l(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(yl(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function Jl(e,t){if(yl(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-->0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Yl=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,Xl=e=>!vl(e)&&e!==Yl;function Zl(...e){let{caseless:t,skipUndefined:n}=Xl(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&typeof i==`string`&&Jl(r,i)||i,o=dl(r,a)?r[a]:void 0;Dl(o)&&Dl(e)?r[a]=Zl(o,e):Dl(e)?r[a]=Zl({},e):_l(e)?r[a]=e.slice():(!n||!vl(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++){let n=e[t];if(!n||yl(n)||(ql(n,i),typeof n!=`object`||_l(n)))continue;let r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){let t=r[e];lu.call(n,t)&&i(n[t],t)}}return r}var Ql=(e,t,n,{allOwnKeys:r}={})=>(ql(t,(t,r)=>{n&&Cl(t)?Object.defineProperty(e,r,{__proto__:null,value:ol(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),$l=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),eu=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},tu=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-->0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&cl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},nu=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},ru=e=>{if(!e)return null;if(_l(e))return e;let t=e.length;if(!wl(t))return null;let n=Array(t);for(;t-->0;)n[t]=e[t];return n},iu=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&cl(Uint8Array)),au=(e,t)=>{let n=(e&&e[ll]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},ou=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},su=hl(`HTMLFormElement`),cu=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:lu}=Object.prototype,uu=hl(`RegExp`),du=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};ql(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},fu=e=>{du(e,(t,n)=>{if(Cl(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(Cl(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},pu=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return _l(e)?r(e):r(String(e).split(t)),n},mu=()=>{},hu=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function gu(e){return!!(e&&Cl(e.append)&&e[ul]===`FormData`&&e[ll])}var _u=e=>{let t=new WeakSet,n=e=>{if(Tl(e)){if(t.has(e))return;if(yl(e))return e;if(!(`toJSON`in e)){t.add(e);let r;if(Fl(e)){r=[];for(let t of e){let e=n(t);!vl(e)&&r.push(e)}}else r=_l(e)?[]:{},ql(e,(e,t)=>{let i=n(e);!vl(i)&&(r[t]=i)});return t.delete(e),r}}return e};return n(e)},vu=hl(`AsyncFunction`),yu=e=>e&&(Tl(e)||Cl(e))&&Cl(e.then)&&Cl(e.catch),bu=((e,t)=>e?setImmediate:t?((e,t)=>(Yl.addEventListener(`message`,({source:n,data:r})=>{n===Yl&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),Yl.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,Cl(Yl.postMessage)),xu=typeof queueMicrotask<`u`?queueMicrotask.bind(Yl):typeof process<`u`&&process.nextTick||bu,Su=e=>e!=null&&Cl(e[ll]),R={isArray:_l,isArrayBuffer:bl,isBuffer:yl,isFormData:Bl,isArrayBufferView:xl,isString:Sl,isNumber:wl,isBoolean:El,isObject:Tl,isPlainObject:Dl,isEmptyObject:Ol,isReadableStream:Hl,isRequest:Ul,isResponse:Wl,isHeaders:Gl,isUndefined:vl,isDate:kl,isFile:Al,isReactNativeBlob:jl,isReactNative:Ml,isBlob:Nl,isRegExp:uu,isFunction:Cl,isStream:Il,isURLSearchParams:Vl,isTypedArray:iu,isFileList:Pl,forEach:ql,merge:Zl,extend:Ql,trim:Kl,stripBOM:$l,inherits:eu,toFlatObject:tu,kindOf:ml,kindOfTest:hl,endsWith:nu,toArray:ru,forEachEntry:au,matchAll:ou,isHTMLF
1orm:su,hasOwnProperty:dl,hasOwnProp:dl,hasOwnInPrototypeChain:fl,getSafeProp:pl,reduceDescriptors:du,freezeMethods:fu,toObjectSet:pu,toCamelCase:cu,noop:mu,toFiniteNumber:hu,findKey:Jl,global:Yl,isContextDefined:Xl,isSpecCompliantForm:gu,toJSONObject:_u,isAsyncFn:vu,isThenable:yu,setImmediate:bu,asap:xu,isIterable:Su,isSafeIterable:e=>e!=null&&fl(e,ll)&&Su(e)},Cu=R.toObjectSet([`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`]),wu=e=>{let t={},n,r,i;return e&&e.split(`
2`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim();let a=R.hasOwnProp(t,n);!n||a&&R.hasOwnProp(Cu,n)||(n===`set-cookie`?a?t[n].push(r):t[n]=[r]:t[n]=a?t[n]+`, `+r:r)}),t};function Tu(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}var Eu=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),Du=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function Ou(e,t){return R.isArray(e)?e.map(e=>Ou(e,t)):Tu(String(e).replace(t,``))}var ku=e=>Ou(e,Eu),Au=e=>Ou(e,Du);function ju(e){let t=Object.create(null);return R.forEach(e.toJSON(),(e,n)=>{t[n]=Au(e)}),t}var Mu=Symbol(`internals`);function Nu(e){return e&&String(e).trim().toLowerCase()}function Pu(e){return e===!1||e==null?e:R.isArray(e)?e.map(Pu):ku(String(e))}function Fu(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var Iu=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Lu(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function Ru(e){let t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n=``;for(let r=1;r<t;r++){let i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function zu(e){let t=Object.create(null),n=String(e),r=0,i=!1,a=!1;function o(e){let i=Lu(n.slice(r,e)),a=i.indexOf(`=`);if(a<1)return;let o=Lu(i.slice(0,a));if(!Iu.test(o))return;let s=o.toLowerCase();if(s===`__proto__`||s===`constructor`||s===`prototype`)return;let c=Lu(i.slice(a+1));t[s]=Ru(c)}for(let e=0;e<n.length;e++){let t=n.charCodeAt(e);i?a?a=!1:t===92?a=!0:t===34&&(i=!1):t===34?i=!0:(t===44||t===59)&&(o(e),r=e+1)}return o(n.length),t}var Bu=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Vu(e,t,n,r,i){if(R.isFunction(r))return r.call(this,t,n);if(i&&(t=n),R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function Hu(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function Uu(e,t){let n=R.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var Wu=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=Nu(t);if(!i)return;let a=R.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=Pu(e))}let a=(e,t)=>R.forEach(e,(e,n)=>i(e,n,t));if(R.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(R.isString(e)&&(e=e.trim())&&!Bu(e))a(wu(e),t);else if(R.isObject(e)&&R.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!R.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],R.hasOwnProp(n,i)?(r=n[i],n[i]=R.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=Nu(e),e){let n=R.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return Fu(e);if(R.isFunction(t))return t.call(this,e,n);if(R.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=Nu(e),e){let n=R.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Vu(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=Nu(e),e){let i=R.findKey(n,e);i&&(!t||Vu(n,n[i],i,t))&&(delete n[i],r=!0)}}return R.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||Vu(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return R.forEach(this,(r,i)=>{let a=R.findKey(n,i);if(a){t[a]=Pu(r),delete t[i];return}let o=e?Hu(i):String(i).trim();o!==i&&delete t[i],t[o]=Pu(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return R.forEach(this,(n,r)=>
2{n!=null&&n!==!1&&(t[r]=e&&R.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
3`)}getSetCookie(){let e=this.get(`set-cookie`);return R.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return zu(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[Mu]=this[Mu]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=Nu(e);t[r]||(Uu(n,e),t[r]=!0)}return R.isArray(e)?e.forEach(r):r(e),this}};Wu.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),R.reduceDescriptors(Wu.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),R.freezeMethods(Wu);var Gu=`[REDACTED ****]`;function Ku(e){if(R.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(R.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function qu(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||R.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof Wu&&(e=e.toJSON()),r.push(e);let t;if(R.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);R.isUndefined(r)||(t[n]=r)});else{if(!R.isPlainObject(e)&&Ku(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?Gu:i(a);R.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}function Ju(e){try{return String(e)}catch{return``}}function Yu(e){return e.errors.map(e=>{try{return e&&e.message?Ju(e.message):Ju(e)}catch{return``}}).filter(Boolean).join(`; `)||e.name||`AggregateError`}var z=class e extends Error{static from(t,n,r,i,a,o){let s=t.message;!s&&R.isArray(t.errors)&&t.errors.length&&(s=Yu(t));let c=new e(s,n||t.code,r,i,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&R.hasOwnProp(e,`redact`)?e.redact:void 0,n=R.isArray(t)&&t.length>0?qu(e,t):R.toJSONObject(e);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:n,code:this.code,status:this.status}}};z.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,z.ERR_BAD_OPTION=`ERR_BAD_OPTION`,z.ECONNABORTED=`ECONNABORTED`,z.ETIMEDOUT=`ETIMEDOUT`,z.ECONNREFUSED=`ECONNREFUSED`,z.ERR_NETWORK=`ERR_NETWORK`,z.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,z.ERR_DEPRECATED=`ERR_DEPRECATED`,z.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,z.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,z.ERR_CANCELED=`ERR_CANCELED`,z.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,z.ERR_INVALID_URL=`ERR_INVALID_URL`,z.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function Xu(e){return R.isPlainObject(e)||R.isArray(e)}function Zu(e){return R.endsWith(e,`[]`)?e.slice(0,-2):e}function Qu(e,t,n){return e?e.concat(t).map(function(e,t){return e=Zu(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function $u(e){return R.isArray(e)&&!e.some(Xu)}var ed=R.toFlatObject(R,{},null,function(e){return/^is[A-Z]/.test(e)});function td(e,t,n){if(!R.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!R.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||m,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&R.isSpecCompliantForm(t),u=[];if(!R.isFunction(i))throw TypeError(`visitor must be a function`);function d(e){if(e===null)return``;if(R.isDate(e))return e.toISOString();if(R.isBoolean(e))return e.toString();if(!l&&R.isBlob(e))throw new z(`Blob is not supported. Use a Buffer instead.`);if(R.isArrayBuffer(e)||R.isTypedArray(e)){if(l&&typeof s==`function`)return new s([e]);throw new z(`Blob is not supported. Use a Buffer instead.`,z.ERR_NOT_SUPPORT)}return e}function f(e){if(e>c)throw new z(`Object is too deeply nested (`+e+` levels). Max depth: `+c,z.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(e,t){if(c===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!R.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),f(t+n.length-1),r})}function m(e,n,i){let s=e;if(R.isReactNative(t)&&R.isReactNativeBlob(e))return t.append(Qu(i,n,a),d(e)),!1;if(e&&!i&&typeof e==`object`){if(R.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=p(e,1);else if(R.isArray(e)&&$u(e)||(R.isFileList(e)||R.endsWith(n,`[]`))&&(s=R.toArray(e)))return n=Zu(n),s.forEac
3h(function(e,r){!(R.isUndefined(e)||e===null)&&t.append(o===!0?Qu([n],r,a):o===null?n:n+`[]`,d(e))}),!1}return Xu(e)?!0:(t.append(Qu(i,n,a),d(e)),!1)}let h=Object.assign(ed,{defaultVisitor:m,convertValue:d,isVisitable:Xu});function g(e,n,r=0){if(!R.isUndefined(e)){if(f(r),u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),R.forEach(e,function(e,a){(!(R.isUndefined(e)||e===null)&&i.call(t,e,R.isString(a)?a.trim():a,n,h))===!0&&g(e,n?n.concat(a):[a],r+1)}),u.pop()}}if(!R.isObject(e))throw TypeError(`data must be an object`);return g(e),t}function nd(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function rd(e,t){this._pairs=[],e&&td(e,this,t)}var id=rd.prototype;id.append=function(e,t){this._pairs.push([e,t])},id.toString=function(e){let t=e?t=>e.call(this,t,nd):nd;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function ad(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function od(e,t,n){if(!t)return e;e||=``;let r=R.isFunction(n)?{serialize:n}:n,i=R.getSafeProp(r,`encode`)||ad,a=R.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):R.isURLSearchParams(t)?t.toString():new rd(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var sd=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){R.forEach(this.handlers,function(t){t!==null&&e(t)})}},cd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},ld={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:rd,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},ud=t({hasBrowserEnv:()=>dd,hasStandardBrowserEnv:()=>pd,hasStandardBrowserWebWorkerEnv:()=>md,navigator:()=>fd,origin:()=>hd}),dd=typeof window<`u`&&typeof document<`u`,fd=typeof navigator==`object`&&navigator||void 0,pd=dd&&(!fd||[`ReactNative`,`NativeScript`,`NS`].indexOf(fd.product)<0),md=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,hd=dd&&window.location.href||`http://localhost`,gd={...ud,...ld};function _d(e,t){return td(e,new gd.classes.URLSearchParams,{visitor:function(e,t,n,r){return gd.isNode&&R.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var vd=100;function yd(e){if(e>vd)throw new z(`FormData field is too deeply nested (`+e+` levels). Max depth: `+vd,z.ERR_FORM_DATA_DEPTH_EXCEEDED)}function bd(e){let t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g,r;for(;(r=n.exec(e))!==null;)yd(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function xd(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Sd(e){function t(e,n,r,i){yd(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&R.isArray(r)?r.length:a,s?(R.hasOwnProp(r,a)?r[a]=R.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!R.hasOwnProp(r,a)||!R.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&R.isArray(r[a])&&(r[a]=xd(r[a])),!o)}if(R.isFormData(e)&&R.isFunction(e.entries)){let n={};return R.forEachEntry(e,(e,r)=>{t(bd(e),r,n,0)}),n}return null}var Cd=(e,t)=>e!=null&&R.hasOwnProp(e,t)?e[t]:void 0;function wd(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var Td={transitional:cd,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=R.isObject(e);if(i&&R.isHTMLForm(e)&&(e=new FormData(e)),R.isFormData(e))return r?JSON.stringify(Sd(e)):e;if(R.isArrayBuffer(e)||R.isBuffer(e)||R.isStream(e)||R.isFile(e)||R.isBlob(e)||R.isReadableStream(e))return e;if(R.isArrayBufferView(e))return e.buffer;if(R.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;
3if(i){let t=Cd(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return _d(e,t).toString();if((a=R.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=Cd(this,`env`),r=n&&n.FormData;return td(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),wd(e)):e}],transformResponse:[function(e){let t=Cd(this,`transitional`)||Td.transitional,n=t&&t.forcedJSONParsing,r=Cd(this,`responseType`),i=r===`json`;if(R.isResponse(e)||R.isReadableStream(e))return e;if(e&&R.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,Cd(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?z.from(e,z.ERR_BAD_RESPONSE,this,null,Cd(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:gd.classes.FormData,Blob:gd.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};R.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{Td.headers[e]={}});function Ed(e,t){let n=this||Td,r=t||n,i=Wu.from(r.headers),a=r.data;return R.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Dd(e){return!!(e&&e.__CANCEL__)}var Od=class extends z{constructor(e,t,n){super(e??`canceled`,z.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function kd(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new z(`Request failed with status code `+n.status,n.status>=400&&n.status<500?z.ERR_BAD_REQUEST:z.ERR_BAD_RESPONSE,n.config,n.request,n))}function Ad(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function jd(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function Md(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var Nd=(e,t,n=3)=>{let r=0,i=jd(50,250);return Md(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=Math.max(0,o==null?a:Math.min(a,o)),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Pd=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Fd=(e,t=R.asap)=>(...n)=>t(()=>e(...n)),Id=gd.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,gd.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(gd.origin),gd.navigator&&/(msie|trident)/i.test(gd.navigator.userAgent)):()=>!0,Ld=gd.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];R.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),R.isString(r)&&s.push(`path=${r}`),R.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),R.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function Rd(e){return typeof e==`string`&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function zd(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+`/`+t.replace(/^\/+/,``)}var Bd=/^https?:(?!\/\/)/i,Vd=/[\t\n\r]/g;function Hd(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Ud(e){return Hd(e).replace(Vd,``)}function Wd(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n=``)=>`${t}${n}${Gu}`)}function Gd(e){let t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Gu}@`),n=t.indexOf(`#`),r=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Gu}`);return n===-1?r:`${r}#${Wd(t.slice(n+1))}`}function Kd(e,t){if(typeof e==`string`){let n=Ud(e);if(Bd.test(n))throw new z(`Invalid URL ${JSON.stringify(Gd(n))}: missing "//" after protocol`,z.ERR_INVALID_URL,t)}}function qd(e,t,n,r){Kd(t,r);let i=!Rd(t);return e&&(i||n===!1)?(Kd(e,r),zd(e,t)):t}var Jd=e=>e instanceof Wu?{...e}:e,Yd=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Xd(e,t){e||={},t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return R.isPlainObject(e)&&R.isPlainObject(t)?R.merge.call({caseless:r}
3,e,t):R.isPlainObject(t)?R.merge({},t):R.isArray(t)?t.slice():t}function i(e,t,n,i){if(!R.isUndefined(t))return r(e,t,n,i);if(!R.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!R.isUndefined(t))return r(void 0,t)}function o(e,t){if(!R.isUndefined(t))return r(void 0,t);if(!R.isUndefined(e))return r(void 0,e)}function s(n){let r=R.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!R.isUndefined(r))if(R.isPlainObject(r)){if(R.hasOwnProp(r,n))return r[n]}else return;let i=R.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(R.isPlainObject(i)&&R.hasOwnProp(i,n))return i[n]}function c(n,i,a){if(R.hasOwnProp(t,a))return r(n,i);if(R.hasOwnProp(e,a))return r(void 0,n)}let l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(e,t,n)=>i(Jd(e),Jd(t),n,!0)};return R.forEach(Yd({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=R.hasOwnProp(l,r)?l[r]:i,o=a(R.hasOwnProp(e,r)?e[r]:void 0,R.hasOwnProp(t,r)?t[r]:void 0,r);R.isUndefined(o)&&a!==c||(n[r]=o)}),R.hasOwnProp(t,`validateStatus`)&&R.isUndefined(t.validateStatus)&&s(`validateStatusUndefinedResolves`)===!1&&(R.hasOwnProp(e,`validateStatus`)?n.validateStatus=r(void 0,e.validateStatus):delete n.val
3idateStatus),n}var Zd=[`content-type`,`content-length`];function Qd(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t||{}).forEach(([t,n])=>{Zd.includes(t.toLowerCase())&&e.set(t,n)})}var $d=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function ef(e){let t=Xd({},e),n=e=>R.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=Wu.from(s),t.url=od(qd(l,d,u,t),n(`params`),n(`paramsSerializer`)),c){let t=R.getSafeProp(c,`username`)||``,n=R.getSafeProp(c,`password`)||``;try{s.set(`Authorization`,`Basic `+btoa(t+`:`+(n?$d(n):``)))}catch(t){throw z.from(t,z.ERR_BAD_OPTION_VALUE,e)}}if(R.isFormData(r)&&(gd.hasStandardBrowserEnv||gd.hasStandardBrowserWebWorkerEnv||R.isReactNative(r)?s.setContentType(void 0):R.isFunction(r.getHeaders)&&Qd(s,r.getHeaders(),n(`formDataHeaderPolicy`))),gd.hasStandardBrowserEnv&&(R.isFunction(i)&&(i=i(t)),i===!0||i==null&&Id(t.url))){let e=a&&o&&Ld.read(o);e&&s.set(a,e)}return t}var tf=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=ef(e),i=r.data,a=Wu.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=Wu.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());kd(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&=(n(new z(`Request aborted`,z.ECONNABORTED,e,h)),m(),null)},h.onerror=function(t){let r=new z(t&&t.message?t.message:`Network Error`,z.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||cd;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new z(t,i.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&R.forEach(ju(a),function(e,t){h.setRequestHeader(t,e)}),R.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=Nd(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=Nd(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new Od(null,e,h):t),h.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=Ad(r.url);if(_&&!gd.protocols.includes(_)){n(new z(`Unsupported protocol `+_+`:`,z.ERR_BAD_REQUEST,e)),m();return}h.send(i||null)})},nf=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof z?t:new Od(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new z(`timeout of ${t}ms exceeded`,z.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>{if(!r){if(e.aborted){i.call(e);return}e.addEventListener(`abort`,i,{once:!0})}});let{signal:s}=n;return s.unsubscribe=()=>R.asap(o),s},rf=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},af=async function*(e,t){for await(let n of of(e))yield*rf(n,t)},of=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},sf=(e,t,n,r)=>{let i=af(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},cf=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,lf=(e,t,n)=>t+2<n&&cf(e.charCodeAt(t+1))&&cf(e.charCodeAt(t+2)),uf=e=>e<=57?e-48:(e&223)-55,df=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,ff=e=>e===9||e===10||e===12||e===13||e===32,pf=e=>{let t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},mf=e=>{let t=e.length,n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},hf=e=>{let t=e.length,n=0,r=0,i=!1;for(let a=0;a<t;a++){let o=e.charCodeAt(a);if(o===37&&lf(e,a,t)&&(o=uf(e.charCodeAt(a+1))*16+uf(e.charCodeAt(a+2)),a+=2),!ff(o)){if(o===61){r++;continue}if(!df(o)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!=0||n%4==1?mf(e):pf(n)},gf=(e,t)=>{if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let n=e.indexOf(`,`);if(n<0)return 0;let r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let a=0;for(let e=0,t=i.length;e<t;e++){let n=i.charCodeAt(e);if(n===37&&lf(i,e,t))a+=1,e+=2;else if(n<128)a+=1;else if(n<2048)a+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=i.charCodeAt(e+1);t>
3=56320&&t<=57343?(a+=4,e++):a+=3}else a+=3}return a};function _f(e){let t=typeof e==`string`?e.indexOf(`#`):-1;return gf(t===-1?e:e.slice(0,t),hf)}var vf=`1.19.0`,yf=64*1024,{isFunction:bf}=R,xf=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),Sf=e=>{if(!R.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Cf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},wf=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},Tf=e=>{let t=R.global!==void 0&&R.global!==null?R.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=R.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?bf(i):typeof fetch==`function`,c=bf(a),l=bf(o);if(!s)return!1;let u=s&&bf(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&Cf(()=>{let e=!1,t=new a(gd.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&Cf(()=>R.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new z(`Response type '${e}' is not supported`,z.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new a(gd.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e+=``),R.isString(e))return(await d(e)).byteLength},g=async(e,t)=>R.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:d,timeout:_,onDownloadProgress:v,onUploadProgress:y,responseType:b,headers:x,withCredentials:S=`same-origin`,fetchOptions:C,maxContentLength:w,maxBodyLength:T}=ef(e),E=R.isNumber(w)&&w>-1,D=R.isNumber(T)&&T>-1,O=t=>R.hasOwnProp(e,t)?e[t]:void 0,k=i||fetch;b=b?(b+``).toLowerCase():`text`;let A=nf([l,d&&d.toAbortSignal()],_),j=null,M=A&&A.unsubscribe&&(()=>{A.unsubscribe()}),ee,te=null,N=()=>new z(`Request body larger than maxBodyLength limit`,z.ERR_BAD_REQUEST,e,j);try{let i,l=O(`auth`);if(l&&(i={username:R.getSafeProp(l,`username`)||``,password:R.getSafeProp(l,`password`)||``}),wf(t)){let e=new URL(t,gd.origin);!i&&(e.username||e.password)&&(i={username:Sf(e.username),password:Sf(e.password)}),(e.username||e.password)&&(e.username=``,e.password=``,t=e.href)}if(i&&(x.delete(`authorization`),x.set(`Authorization`,`Basic `+btoa(xf((i.username||``)+`:`+(i.password||``))))),E&&typeof t==`string`&&t.startsWith(`data:`)&&_f(t)>w)throw new z(`maxContentLength size of `+w+` exceeded`,z.ERR_BAD_RESPONSE,e,j);if(D&&n!==`get`&&n!==`head`){let e=await h(s);if(typeof e==`number`&&isFinite(e)&&(ee=e,e>T))throw N()}let d=D&&(R.isReadableStream(s)||R.isStream(s)),_=(e,t,n)=>sf(e,yf,e=>{if(D&&e>T)throw te=N();t&&t(e)},n);if(f&&n!==`get`&&n!==`head`&&(y||d)){if(ee??=await g(x,s),ee!==0||d){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(R.isFormData(s)&&(n=e.headers.get(`content-type`))&&x.setContentType(n),e.body){let[t,n]=y&&Pd(ee,Nd(Fd(y)))||[];s=_(e.body,t,n)}}}else if(d&&!c&&u&&n!==`get`&&n!==`head`)s=_(s);else if(d&&c&&!f&&n!==`get`&&n!==`head`)throw new z(`Stream request bodies are not supported by the current fetch implementation`,z.ERR_NOT_SUPPORT,e,j);R.isString(S)||(S=S?`include`:`omit`);let ne=c&&`credentials`in a.prototype;if(R.isFormData(s)){let e=x.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&x.delete(`content-type`)}x.set(`User-Agent`,`axios/`+vf,!1);let re={...C,signal:A,method:n.toUpperCase(),headers:ju(x.normalize()),body:s,duplex:`half`,credentials:ne?S:void 0};j=c&&new a(t,re);let ie=await(c?k(j,C):k(t,re)),ae=Wu.from(ie.headers);if(E){let t=R.toFiniteNumber(ae.getContentLength());if(t!=null&&t>w)throw new z(`maxContentLength size of `+w+` exceeded`,z.ERR_BAD_RESPONSE,e,j)}let oe=p&&(b===`stream`||b===`response`);if(p&&ie.body&&(v||E||oe&&M)){let t={};
3[`status`,`statusText`,`headers`].forEach(e=>{t[e]=ie[e]});let n=R.toFiniteNumber(ae.getContentLength()),[r,i]=v&&Pd(n,Nd(Fd(v),!0))||[],a=0;ie=new o(sf(ie.body,yf,t=>{if(E&&(a=t,a>w))throw new z(`maxContentLength size of `+w+` exceeded`,z.ERR_BAD_RESPONSE,e,j);r&&r(t)},()=>{i&&i(),M&&M()}),t)}b||=`text`;let se=await m[R.findKey(m,b)||`text`](ie,e);if(E&&!p&&!oe){let t;if(se!=null&&(typeof se.byteLength==`number`?t=se.byteLength:typeof se.size==`number`?t=se.size:typeof se==`string`&&(t=typeof r==`function`?new r().encode(se).byteLength:se.length)),typeof t==`number`&&t>w)throw new z(`maxContentLength size of `+w+` exceeded`,z.ERR_BAD_RESPONSE,e,j)}return!oe&&M&&M(),await new Promise((t,n)=>{kd(t,n,{data:se,headers:Wu.from(ie.headers),status:ie.status,statusText:ie.statusText,config:e,request:j})})}catch(t){if(M&&M(),A&&A.aborted&&A.reason instanceof z){let n=A.reason;throw n.config=e,j&&(n.request=j),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(te)throw j&&!te.request&&(te.request=j),te;if(t instanceof z)throw j&&!t.request&&(t.request=j),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new z(`Network Error`,z.ERR_NETWORK,e,j,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw z.from(t,t&&t.code,e,j,t&&t.response)}}},Ef=new Map,Df=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=Ef;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Tf(t)),l=c;return c};Df();var Of={http:null,xhr:tf,fetch:{get:Df}};R.forEach(Of,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var kf=e=>`- ${e}`,Af=e=>R.isFunction(e)||e===null||e===!1;function jf(e,t){e=R.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!Af(r)&&(i=Of[(n=String(r)).toLowerCase()],i===void 0))throw new z(`Unknown adapter '${n}'`);if(i&&(R.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new z(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
4`+e.map(kf).join(`
5`):` `+kf(e[0]):`as no adapter specified`),z.ERR_NOT_SUPPORT)}return i}var Mf={getAdapter:jf,adapters:Of};function Nf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Od(null,e)}function Pf(e){return Nf(e),e.headers=Wu.from(e.headers),e.data=Ed.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),Mf.getAdapter(e.adapter||Td.adapter,e)(e).then(function(t){Nf(e),e.response=t;try{t.data=Ed.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=Wu.from(t.headers),t},function(t){if(!Dd(t)&&(Nf(e),t&&t.response)){e.response=t.response;try{t.response.data=Ed.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=Wu.from(t.response.headers)}return Promise.reject(t)})}var Ff={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{Ff[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var If={};Ff.transitional=function(e,t,n){function r(e,t){return`[Axios v`+vf+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new z(r(i,` has been removed`+(t?` in `+t:``)),z.ERR_DEPRECATED);return t&&!If[i]&&(If[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),!e||e(n,i,a)}},Ff.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Lf(e,t,n){if(typeof e!=`object`||!e)throw new z(`options must be an object`,z.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-->0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new z(`option `+a+` must be `+n,z.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new z(`Unknown option `+a,z.ERR_BAD_OPTION)}}var Rf={assertOptions:Lf,validators:Ff},zf=Rf.validators,Bf=class{constructor(e){this.defaults=e||{},this.interceptors={request:new sd,response:new sd}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>
5{if(!t.stack)return``;let e=t.stack.indexOf(`
6`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
7`),r=t===-1?-1:n.indexOf(`
8`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=`
9`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=Xd(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Rf.assertOptions(n,{silentJSONParsing:zf.transitional(zf.boolean),forcedJSONParsing:zf.transitional(zf.boolean),clarifyTimeoutError:zf.transitional(zf.boolean),legacyInterceptorReqResOrdering:zf.transitional(zf.boolean),advertiseZstdAcceptEncoding:zf.transitional(zf.boolean),validateStatusUndefinedResolves:zf.transitional(zf.boolean)},!1),r!=null&&(R.isFunction(r)?t.paramsSerializer={serialize:r}:Rf.assertOptions(r,{encode:zf.function,serialize:zf.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Rf.assertOptions(t,{baseUrl:zf.spelling(`baseURL`),withXsrfToken:zf.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&R.merge(i.common,i[t.method]);i&&R.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=Wu.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||cd;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Pf.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e?e(f):f}catch(e){if(!t){l=Promise.reject(e);break}try{let n=t.call(this,e);R.isThenable(n)&&(l=Promise.resolve(n).then(()=>Pf.call(this,f)))}catch(e){l=Promise.reject(e)}break}}if(!l)try{l=Pf.call(this,f)}catch(e){l=Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=Xd(this.defaults,e),od(qd(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};R.forEach([`delete`,`get`,`head`,`options`],function(e){Bf.prototype[e]=function(t,n){return this.request(Xd(n||{},{method:e,url:t,data:n&&R.hasOwnProp(n,`data`)?n.data:void 0}))}}),R.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(Xd(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Bf.prototype[e]=t(),e!==`query`&&(Bf.prototype[e+`Form`]=t(!0))});var Vf=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-->0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Od(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Hf(e){return function(t){return e.apply(null,t)}}function Uf(e){return R.isObject(e)&&e.isAxiosError===!0}var Wf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
9alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Wf).forEach(([e,t])=>{Wf[t]=e});function Gf(e){let t=new Bf(e),n=ol(Bf.prototype.request,t);return R.extend(n,Bf.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Gf(Xd(e,t))},n}var Kf=Gf(Td);Kf.Axios=Bf,Kf.CanceledError=Od,Kf.CancelToken=Vf,Kf.isCancel=Dd,Kf.VERSION=vf,Kf.toFormData=td,Kf.AxiosError=z,Kf.Cancel=Kf.CanceledError,Kf.all=function(e){return Promise.all(e)},Kf.spread=Hf,Kf.isAxiosError=Uf,Kf.mergeConfig=Xd,Kf.AxiosHeaders=Wu,Kf.formToJSON=e=>Sd(R.isHTMLForm(e)?new FormData(e):e),Kf.getAdapter=Mf.getAdapter,Kf.HttpStatusCode=Wf,Kf.default=Kf;var{Axios:qf,AxiosError:Jf,CanceledError:Yf,isCancel:Xf,CancelToken:Zf,VERSION:Qf,all:$f,Cancel:ep,isAxiosError:tp,spread:np,toFormData:rp,AxiosHeaders:ip,HttpStatusCode:ap,formToJSON:op,getAdapter:sp,mergeConfig:cp,create:lp}=Kf,up={log:`log`,debug:`debug`,info:`info`,warn:`warn`,error:`error`},dp=console,fp={};Object.keys(up).forEach(function(e){fp[e]=dp[e]});var pp=`Datadog Browser SDK:`,B={debug:fp.debug.bind(dp,pp),log:fp.log.bind(dp,pp),info:fp.info.bind(dp,pp),warn:fp.warn.bind(dp,pp),error:fp.error.bind(dp,pp)},mp=`https://docs.datadoghq.com`,hp=`${mp}/real_user_monitoring/browser/troubleshooting`,gp=`More details:`;function _p(e,t){return function(){var n=[...arguments];try{return e.apply(void 0,n)}catch(e){B.error(t,e)}}}function vp(e){return e!==0&&Math.random()*100<=e}function yp(e,t){return+e.toFixed(t)}function bp(e){return xp(e)&&e>=0&&e<=100}function xp(e){return typeof e==`number`}var Sp=1e3,Cp=60*Sp,wp=60*Cp,Tp=24*wp*365;function Ep(e){return{relative:e,timeStamp:Op(e)}}function Dp(e){return{relative:Lp(e),timeStamp:e}}function Op(e){var t=Ap()-performance.now();return t>Vp()?Math.round(Ip(t,e)):Rp(e)}function kp(){return Math.round(Ap()-Ip(Vp(),performance.now()))}function V(e){return xp(e)?yp(e*1e6,0):e}function Ap(){return new Date().getTime()}function jp(){return Ap()}function Mp(){return performance.now()}function Np(){return{relative:Mp(),timeStamp:jp()}}function Pp(){return{relative:0,timeStamp:Vp()}}function Fp(e,t){return t-e}function Ip(e,t){return e+t}function Lp(e){return e-Vp()}function Rp(e){return Math.round(Ip(Vp(),e))}function zp(e){return e<Tp}var Bp;function Vp(){return Bp===void 0&&(Bp=performance.timing.navigationStart),Bp}var Hp=1024,Up=1024*Hp,Wp=/[^\u0000-\u007F]/;function Gp(e){return Wp.test(e)?window.TextEncoder===void 0?new Blob([e]).size:new TextEncoder().encode(e).length:e.length}function Kp(e){for(var t=e.reduce(function(e,t){return e+t.length},0),n=new Uint8Array(t),r=0,i=0,a=e;i<a.length;i++){var o=a[i];n.set(o,r),r+=o.length}return n}function qp(e,t){return e.indexOf(t)!==-1}function Jp(e){if(Array.from)return Array.from(e);var t=[];if(e instanceof Set)e.forEach(function(e){return t.push(e)});else for(var n=0;n<e.length;n++)t.push(e[n]);return t}function Yp(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n))return r}}function Xp(e,t){for(var n=e.length-1;n>=0;--n){var r=e[n];if(t(r,n,e))return r}}function Zp(e,t){Array.prototype.forEach.call(e,t)}function Qp(e){return Object.keys(e).map(function(t){return e[t]})}function $p(e){return Object.keys(e).map(function(t){return[t,e[t]]})}function em(e,t){return e.slice(0,t.length)===t}function tm(e,t){return e.slice(-t.length)===t}
9function H(e){return[...arguments].slice(1).forEach(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}),e}function nm(e){return H({},e)}function rm(e,t){return Object.keys(e).some(function(n){return e[n]===t})}function im(e){return Object.keys(e).length===0}function am(e,t){for(var n={},r=0,i=Object.keys(e);r<i.length;r++){var a=i[r];n[a]=t(e[a])}return n}function om(){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`&&(e=typeof self==`object`?self:typeof window==`object`?window:{}),e}function sm(e,t){var n=om(),r;return n.Zone&&typeof n.Zone.__symbol__==`function`&&(r=e[n.Zone.__symbol__(t)]),r||=e[t],r}var cm=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},lm,um=!1;function dm(e){lm=e}function fm(e){um=e}function pm(e,t,n){var r=n.value;n.value=function(){var e=[...arguments];return(lm?U(r):r).apply(this,e)}}function U(e){return function(){return mm(e,this,arguments)}}function mm(e,t,n){try{return e.apply(t,n)}catch(e){if(hm(e),lm)try{lm(e)}catch(e){hm(e)}}}function hm(){var e=[...arguments];um&&B.error.apply(B,cm([`[MONITOR]`],e,!1))}function gm(e,t){return sm(om(),`setTimeout`)(U(e),t)}function _m(e){sm(om(),`clearTimeout`)(e)}function vm(e,t){return sm(om(),`setInterval`)(U(e),t)}function ym(e){sm(om(),`clearInterval`)(e)}var W=function(){function e(e){this.onFirstSubscribe=e,this.observers=[]}return e.prototype.subscribe=function(e){var t=this;return this.observers.push(e),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0),{unsubscribe:function(){t.observers=t.observers.filter(function(t){return e!==t}),!t.observers.length&&t.onLastUnsubscribe&&t.onLastUnsubscribe()}}},e.prototype.notify=function(e){this.observers.forEach(function(t){return t(e)})},e}();function bm(){var e=[...arguments];return new W(function(t){var n=e.map(function(e){return e.subscribe(function(e){return t.notify(e)})});return function(){return n.forEach(function(e){return e.unsubscribe()})}})}function xm(e,t,n){var r=n&&n.leading!==void 0?n.leading:!0,i=n&&n.trailing!==void 0?n.trailing:!0,a=!1,o,s;return{throttled:function(){var n=[...arguments];if(a){o=n;return}r?e.apply(void 0,n):o=n,a=!0,s=gm(function(){i&&o&&e.apply(void 0,o),a=!1,o=void 0},t)},cancel:function(){_m(s),a=!1,o=void 0}}}function G(){}function Sm(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,Sm)}var Cm=/([\w-]+)\s*=\s*([^;]+)/g;function wm(e,t){for(Cm.lastIndex=0;;){var n=Cm.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function Tm(e){var t=new Map;for(Cm.lastIndex=0;;){var n=Cm.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function Em(e,t,n){n===void 0&&(n=``);var r=e.charCodeAt(t-1),i=r>=55296&&r<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${n}`}function Dm(){return jm()===0}function Om(){return jm()===1}function km(){return jm()===2}var Am;function jm(){return Am??=Mm()}function Mm(e){e===void 0&&(e=window);var t=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(t)?1:e.navigator.vendor?.indexOf(`Apple`)===0||/safari/i.test(t)&&!/chrome|android/i.test(t)?2:e.document.documentMode?0:3}function Nm(e,t,n,r){var i=new Date;i.setTime(i.getTime()+n);var a=`expires=${i.toUTCString()}`,o=r&&r.crossSite?`none`:`strict`,s=r&&r.domain?`;domain=${r.domain}`:``,c=r&&r.secure?`;secure`:``,l=r&&r.partitioned?`;partitioned`:``;document.cookie=`${e}=${t};${a};path=/;samesite=${o}${s}${c}${l}`}function Pm(e){return wm(document.cookie,e)}var Fm;function Im(e){return Fm||=Tm(document.cookie),Fm.get(e)}function Lm(e,t){Nm(e,``,0,t)}function Rm(e){if(document.cookie===void 0||document.cookie===null)return!1;try{var t=`dd_cookie_test_${Sm()}`,n=`test`;Nm(t,n,Cp,e);var r=Pm(t)===n;return Lm(t,e),r}catch(e){return B.error(e),!1}}var zm;function Bm(){if(zm===void 0){for(var e=`dd_site_test_${Sm()}`,t=`test`,n=window.location.hostname.split(`.`),r=n.pop();n.length&&!Pm(e);)r=`${n.pop()}.${r}`,Nm(e,t,Sp,{domain:r});Lm(e,{domain:r}),zm=r}return zm}var Vm=`_dd_s`,Hm=4*wp,Um=15*Cp,Wm=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Gm=`&`;function Km(){return{isExpired:`1`}}function qm(e){return im(e)}function Jm(e){return!qm(e)}function Ym(e){return e.isExpired!==void 0||!Xm(e)}function Xm(e){return(e.created===void 0||Ap()-Number(e.created)<Hm)&&(e.expire===void 0||Ap()<Number(e.expire))}function Zm(e){e.expire=String(Ap()+Um)}function Qm(e){return $p(e).map(function(e){return`${e[0]}=${e[1]}`}).join(Gm)}function $m(e){var t={};return eh(e)&&e.split(Gm).forEach(function(e){var n=Wm.exec(e);if(n!==null){var r=n[1];t[r]=n[2]}}),t}function eh(e){return!!e&&(e.indexOf(Gm)!==-1||Wm.test(e))}var th=`_dd_r`,nh=`_dd_l`,rh=`logs`;function ih(e){if(!Im(`_dd_s`)){var t=Im(`_dd`),n=Im(th),r=Im(nh),i={};t&&(i.id=t),r&&/^[01]$/.test(r)&&(i[rh]=r),n&&/^[012]$/.test(n)&&(i.rum=n),Jm(i)&&(Zm(i),e.persistSession(i))}}function ah(e){var t=uh(e);return Rm(t)?{type:`Cookie`,cookieOptions:t}:void 0}function oh(e){var t={isLockEnabled:Om(),persistSession:sh(e),retrieveSession:lh,expireSession:function(){return ch(e)}};return ih(t),t}function sh(e){return function(t){Nm(Vm,Qm(t),Um,e)}}function ch(e){Nm(Vm,Qm(Km()),Hm,e)}function lh(){return $m(Pm(Vm))}function uh(e){var t={};return t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie||!!e.useCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie||!!e.useCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=Bm()),t}var dh=`_dd_test_`;function fh(){try{var e=Sm(),t=`${dh}${e}`;localStorage.setItem(t,e);var n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:`LocalStorage`}:void 0}catch{return}}function ph(){return{isLockEnabled:!1,persistSession:mh,retrieveSession:hh,expireSession:gh}}function mh(e){localStorage.setItem(Vm,Qm(e))}function hh(){return $m(localStorage.getItem(Vm))}function gh(){mh(Km())}var _h=[],vh;
9function yh(e,t,n){var r;n===void 0&&(n=0);var i=t.isLockEnabled,a=t.persistSession,o=t.expireSession,s=function(e){return a(H({},e,{lock:l}))},c=function(){var e=t.retrieveSession(),n=e.lock;return e.lock&&delete e.lock,{session:e,lock:n}};if(vh||=e,e!==vh){_h.push(e);return}if(i&&n>=100){xh(t);return}var l,u=c();if(i){if(u.lock){bh(e,t,n);return}if(l=Sm(),s(u.session),u=c(),u.lock!==l){bh(e,t,n);return}}var d=e.process(u.session);if(i&&(u=c(),u.lock!==l)){bh(e,t,n);return}if(d&&(Ym(d)?o():(Zm(d),i?s(d):a(d))),i&&!(d&&Ym(d))){if(u=c(),u.lock!==l){bh(e,t,n);return}a(u.session),d=u.session}(r=e.after)==null||r.call(e,d||u.session),xh(t)}function bh(e,t,n){gm(function(){yh(e,t,n+1)},10)}function xh(e){vh=void 0;var t=_h.shift();t&&yh(t,e)}var Sh=Sp;function Ch(e){var t=ah(e);return!t&&e.allowFallbackToLocalStorage&&(t=fh()),t}function wh(e,t,n){var r=new W,i=new W,a=new W,o=e.type===`Cookie`?oh(e.cookieOptions):ph(),s=o.expireSession,c=vm(m,Sh),l;g();var u=xm(function(){yh({process:function(e){if(!qm(e)){var t=h(e);return _(t),t}},after:function(e){Jm(e)&&!v()&&x(e),l=e}},o)},Sh),d=u.throttled,f=u.cancel;function p(){yh({process:function(e){return v()?h(e):void 0}},o)}function m(){yh({process:function(e){return Ym(e)?Km():void 0},after:h},o)}function h(e){return Ym(e)&&(e=Km()),v()&&(y(e)?b():(a.notify({previousState:l,newState:e}),l=e)),e}function g(){yh({process:function(e){if(qm(e))return Km()},after:function(e){l=e}},o)}function _(e){if(qm(e))return!1;var r=n(e[t]),i=r.trackingType,a=r.isTracked;e[t]=i,delete e.isExpired,a&&!e.id&&(e.id=Sm(),e.created=String(Ap()))}function v(){return l[t]!==void 0}function y(e){return l.id!==e.id||l[t]!==e[t]}function b(){l=Km(),i.notify()}function x(e){l=e,r.notify()}function S(e){yh({process:function(t){return H({},t,e)},after:h},o)}return{expandOrRenewSession:d,expandSession:p,getSession:function(){return l},renewObservable:r,expireObservable:i,sessionStateUpdateObservable:a,restartSession:g,expire:function(){f(),s(),h(Km())},stop:function(){ym(c)},updateSessionState:S}}var Th={GRANTED:`granted`,NOT_GRANTED:`not-granted`};function Eh(e){var t=new W;return{tryToInit:function(t){e||=t},update:function(n){e=n,t.notify()},isGranted:function(){return e===Th.GRANTED},observable:t}}function Dh(e,t,n){if(typeof e!=`object`||!e)return JSON.stringify(e);var r=Oh(Object.prototype),i=Oh(Array.prototype),a=Oh(Object.getPrototypeOf(e)),o=Oh(e);try{return JSON.stringify(e,t,n)}catch{return`<error: unable to serialize object>`}finally{r(),i(),a(),o()}}function Oh(e){var t=e,n=t.toJSON;return n?(delete t.toJSON,function(){t.toJSON=n}):G}function kh(e){return Mh(e,location.href).href}function Ah(e){try{return!!Mh(e)}catch{return!1}}function jh(e){var t=Mh(e).pathname;return t[0]===`/`?t:`/${t}`}function Mh(e,t){var n=Fh();if(n)try{return t===void 0?new n(e):new n(e,t)}catch(n){throw Error(`Failed to construct URL: ${String(n)} ${Dh({url:e,base:t})}`)}if(t===void 0&&!/:/.test(e))throw Error(`Invalid URL: '${e}'`);var r=document,i=r.createElement(`a`);if(t!==void 0){r=document.implementation.createHTMLDocument(``);var a=r.createElement(`base`);a.href=t,r.head.appendChild(a),r.body.appendChild(i)}return i.href=e,i}var Nh=URL,Ph;function Fh(){if(Ph===void 0)try{Ph=new Nh(`http://test/path`).href===`http://test/path`}catch{Ph=!1}return Ph?Nh:void 0}var Ih=`datad0g.com`,Lh=`datadoghq.com`,Rh=`datadoghq.eu`,zh=`ddog-gov.com`,Bh=`pci.browser-intake-datadoghq.com`;function Vh(e,t,n){var r=Hh(e,t);return{build:function(i,a){return r(Wh(e,t,n,i,a))},urlPrefix:r(``),trackType:t}}function Hh(e,t){var n=`/api/v2/${t}`,r=e.proxy;if(typeof r==`string`){var i=kh(r);return function(e){return`${i}?ddforward=${encodeURIComponent(`${n}?${e}`)}`}}if(typeof r==`function`)return function(e){return r({path:n,parameters:e})};var a=Uh(t,e);return function(e){return`https://${a}${n}?${e}`}}function Uh(e,t){var n=t.site,r=n===void 0?Lh:n,i=t.internalAnalyticsSubdomain;if(e===`logs`&&t.usePciIntake&&r===`datadoghq.com`)return Bh;if(i&&r===`datadoghq.com`)return`${i}.${Lh}`;if(r===`dd0g-gov.com`)return`http-intake.logs.${r}`;var a=r.split(`.`),o=a.pop();return`browser-intake-${a.join(`-`)}.${o}`}function Wh(e,t,n,r,i){var a=e.clientToken,o=e.internalAnalyticsSubdomain,s=i.retry,c=i.encoding,l=[`sdk_version:5.29.0`,`api:${r}`].concat(n);s&&l.push(`retry_count:${s.count}`,`retry_after:${s.lastFailureStatus}`);var u=[`ddsource=browser`,`ddtags=${encodeURIComponent(l.join(`,`))}`,`dd-api-key=${a}`,`dd-evp-origin-version=5.29.0`,`dd-evp-origin=browser`,`dd-request-id=${Sm()}`];return c&&u.push(`dd-evp-encoding=${c}`),t===`rum`&&u.push(`batch_time=${jp()}`),o&&u.reverse(),u.join(`&`)}function Gh(e){var t=e.env,n=e.service,r=e.version,i=e.datacenter,a=[];return t&&a.push(Kh(`env`,t)),n&&a.push(Kh(`service`,n)),r&&a.push(Kh(`version`,r)),i&&a.push(Kh(`datacenter`,i)),a}function Kh(e,t){var n=200-e.length-1;return(t.length>n||qh(t))&&B.warn(`${e} value doesn't meet tag requirements and will be sanitized. ${gp} ${mp}/getting_started/tagging/#defining-tags`),`${e}:${t.replace(/,/g,`_`)}`}function qh(e){return Jh()?RegExp(`[^\\p{Ll}\\p{Lo}0-9_:./-]`,`u`).test(e):!1}function Jh(){try{return!0}catch{return!1}}function Yh(e){var t=e.site||`datadoghq.com`,n=Gh(e),r=Xh(e,n),i=Qh(r,t);return H({isIntakeUrl:function(e){return i.some(function(t){return e.indexOf(t)===0})},replica:Zh(e,i,n),site:t},r)}function Xh(e,t){return{logsEndpointBuilder:Vh(e,`logs`,t),rumEndpointBuilder:Vh(e,`rum`,t),sessionReplayEndpointBuilder:Vh(e,`replay`,t)}}function Zh(e,t,n){if(e.replica){var r=H({},e,{site:Lh,clientToken:e.replica.clientToken}),i={logsEndpointBuilder:Vh(r,`logs`,n),rumEndpointBuilder:Vh(r,`rum`,n)};return t.push.apply(t,Qp(i).map(function(e){return e.urlPrefix})),H({applicationId:e.replica.applicationId},i)}}function Qh(e,t){var n=Qp(e).map(function(e){return e.urlPrefix});return t===`datadoghq.com`&&n.push(`https://${Bh}/`),n}var $h={ALLOW:`allow`,MASK:`mask`,MASK_USER_INPUT:`mask-user-input`},eg={ALL:`all`,SAMPLED:`sampled`};function tg(e,t){return e!=null&&typeof e!=`string`?(B.error(`${t} must be defined as a string`),!1):!0}function ng(e){return e&&typeof e==`string`&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(B.error(`Site should be a valid Datadog site. ${gp} ${mp}/getting_started/site/.`),!1):!0}function rg(e,t){return e!==void 0&&!bp(e)?(B.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function ig(e){if(!e||!e.clientToken){B.error(`Client Token is not configured, we will not send any data.`);return}if(!(!ng(e.site)||!rg(e.sessionSampleRate,`Session`)||!rg(e.telemetrySampleRate,`Telemetry`)||!rg(e.telemetryConfigurationSampleRate,`Telemetry Configuration`)||!rg(e.telemetryUsageSampleRate,`Telemetry Usage`)||!tg(e.version,`Version`)||!tg(e.env,`Env`)||!tg(e.service,`Service`))){if
9(e.trackingConsent!==void 0&&!rm(Th,e.trackingConsent)){B.error(`Tracking Consent should be either "granted" or "not-granted"`);return}return H({beforeSend:e.beforeSend&&_p(e.beforeSend,`beforeSend threw an error:`),sessionStoreStrategyType:Ch(e),sessionSampleRate:e.sessionSampleRate??100,telemetrySampleRate:e.telemetrySampleRate??20,telemetryConfigurationSampleRate:e.telemetryConfigurationSampleRate??5,telemetryUsageSampleRate:e.telemetryUsageSampleRate??5,service:e.service||void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:e.trackingConsent??Th.GRANTED,storeContextsAcrossPages:!!e.storeContextsAcrossPages,batchBytesLimit:16*Hp,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*Sp,batchMessagesLimit:50,messageBytesLimit:256*Hp},Yh(e))}}function ag(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_cross_site_session_cookie:e.useCrossSiteSessionCookie,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent}}var og;(function(e){e.WRITABLE_RESOURCE_GRAPHQL=`writable_resource_graphql`,e.REMOTE_CONFIGURATION=`remote_configuration`,e.UPDATE_VIEW_NAME=`update_view_name`,e.LONG_ANIMATION_FRAME=`long_animation_frame`,e.REDUCE_SEGMENT_LIMIT_BATCH_TIME=`reduce_segment_limit_batch_time`})(og||={});var sg=new Set;function cg(e){Array.isArray(e)&&lg(e.filter(function(e){return rm(og,e)}))}function lg(e){e.forEach(function(e){sg.add(e)})}function ug(e){return sg.has(e)}function dg(){return sg}var fg=`?`;function pg(e){var t=[],n=Eg(e,`stack`),r=String(e);return n&&em(n,r)&&(n=n.slice(r.length)),n&&n.split(`
10`).forEach(function(e){var n=vg(e)||bg(e)||Sg(e)||Tg(e);n&&(!n.func&&n.line&&(n.func=fg),t.push(n))}),{message:Eg(e,`message`),name:Eg(e,`name`),stack:t}}var mg=`((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)`,hg=`(?::(\\d+))`,gg=RegExp(`^\\s*at (.*?) ?\\(${mg}${hg}?${hg}?\\)?\\s*\$`,`i`),_g=RegExp(`\\((\\S*)${hg}${hg}\\)`);function vg(e){var t=gg.exec(e);if(t){var n=t[2]&&t[2].indexOf(`native`)===0,r=t[2]&&t[2].indexOf(`eval`)===0,i=_g.exec(t[2]);return r&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||fg,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}}var yg=RegExp(`^\\s*at ?${mg}${hg}?${hg}??\\s*\$`,`i`);function bg(e){var t=yg.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:fg,line:t[2]?+t[2]:void 0,url:t[1]}}var xg=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Sg(e){var t=xg.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||fg,line:+t[3],url:t[2]}}var Cg=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,wg=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Tg(e){var t=Cg.exec(e);if(t){var n=t[3]&&t[3].indexOf(` > eval`)>-1,r=wg.exec(t[3]);return n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0),{args:t[2]?t[2].split(`,`):[],column:t[5]?+t[5]:void 0,func:t[1]||fg,line:t[4]?+t[4]:void 0,url:t[3]}}}function Eg(e,t){if(!(typeof e!=`object`||!e||!(t in e))){var n=e[t];return typeof n==`string`?n:void 0}}function Dg(e,t,n,r){var i=[{url:t,column:r,line:n}],a=kg(e);return{name:a.name,message:a.message,stack:i}}var Og=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function kg(e){var t,n,r;return{}.toString.call(e)===`[object String]`&&(t=Og.exec(e),n=t[1],r=t[2]),{name:n,message:r}}function Ag(){var e=Error(),t;if(!e.stack)try{throw e}catch{}return mm(function(){var n=pg(e);n.stack=n.stack.slice(2),t=jg(n)}),t}function jg(e){var t=Mg(e);return e.stack.forEach(function(e){var n=e.func===`?`?`<anonymous>`:e.func,r=e.args&&e.args.length>0?`(${e.args.join(`, `)})`:``,i=e.line?`:${e.line}`:``,a=e.line&&e.column?`:${e.column}`:``;t+=`
11  at ${n}${r} @ ${e.url}${i}${a}`}),t}function Mg(e){return`${e.name||`Error`}: ${e.message}`}function Ng(e,t,n,r){var i=(r===void 0?{}:r).computeHandlingStack,a=e[t];if(typeof a!=`function`)if(t in e&&em(t,`on`))a=G;else return{stop:G};var o=!1,s=function(){if(o)return a.apply(this,arguments);var e=Jp(arguments),t;mm(n,null,[{target:this,parameters:e,onPostCall:function(e){t=e},handlingStack:i?Ag():void 0}]);var r=a.apply(this,e);return t&&mm(t,null,[r]),r};return e[t]=s,{stop:function(){o=!0,e[t]===s&&(e[t]=a)}}}function Pg(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r.set||!r.configurable)return{stop:G};var i=G,a=function(e,t){gm(function(){a!==i&&n(e,t)},0)},o=function(e){r.set.call(this,e),a(this,e)};
11return Object.defineProperty(e,t,{set:o}),{stop:function(){Object.getOwnPropertyDescriptor(e,t)?.set===o&&Object.defineProperty(e,t,r),a=i}}}var Fg=220*Hp,Ig=`$`,Lg=3;function Rg(e,t){t===void 0&&(t=Fg);var n=Oh(Object.prototype),r=Oh(Array.prototype),i=[],a=new WeakMap,o=zg(e,Ig,void 0,i,a),s=JSON.stringify(o),c=s?s.length:0;if(c>t){Ug(t,`discarded`,e);return}for(;i.length>0&&c<t;){var l=i.shift(),u=0;if(Array.isArray(l.source))for(var d=0;d<l.source.length;d++){var f=zg(l.source[d],l.path,d,i,a);if(f===void 0?c+=4:c+=JSON.stringify(f).length,c+=u,u=1,c>t){Ug(t,`truncated`,e);break}l.target[d]=f}else for(var d in l.source)if(Object.prototype.hasOwnProperty.call(l.source,d)){var f=zg(l.source[d],l.path,d,i,a);if(f!==void 0&&(c+=JSON.stringify(f).length+u+d.length+Lg,u=1),c>t){Ug(t,`truncated`,e);break}l.target[d]=f}}return n(),r(),o}function zg(e,t,n,r,i){var a=Hg(e);if(!a||typeof a!=`object`)return Bg(a);var o=Vg(a);if(o!==`[Object]`&&o!==`[Array]`&&o!==`[Error]`)return o;var s=e;if(i.has(s))return`[Reference seen at ${i.get(s)}]`;var c=n===void 0?t:`${t}.${n}`,l=Array.isArray(a)?[]:{};return i.set(s,c),r.push({source:a,target:l,path:c}),l}function Bg(e){return typeof e==`bigint`?`[BigInt] ${e.toString()}`:typeof e==`function`?`[Function] ${e.name||`unknown`}`:typeof e==`symbol`?`[Symbol] ${e.description||e.toString()}`:e}function Vg(e){try{if(e instanceof Event)return{isTrusted:e.isTrusted};var t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t&&t[1])return`[${t[1]}]`}catch{}return`[Unserializable]`}function Hg(e){var t=e;if(t&&typeof t.toJSON==`function`)try{return t.toJSON()}catch{}return e}function Ug(e,t,n){B.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}var Wg=`No stack, consider using an instance of Error`;function Gg(e){var t=e.stackTrace,n=e.originalError,r=e.handlingStack,i=e.startClocks,a=e.nonErrorPrefix,o=e.source,s=e.handling,c=n instanceof Error,l=Kg(t,c,a,n),u=qg(c,t)?jg(t):Wg,d=c?Xg(n,o):void 0;return{startClocks:i,source:o,handling:s,handlingStack:r,originalError:n,type:t?t.name:void 0,message:l,stack:u,causes:d,fingerprint:Jg(n)}}function Kg(e,t,n,r){return e?.message&&e?.name?e.message:t?`Empty message`:`${n} ${Dh(Rg(r))}`}function qg(e,t){return t===void 0?!1:e?!0:t.stack.length>0&&(t.stack.length>1||t.stack[0].url!==void 0)}function Jg(e){return e instanceof Error&&`dd_fingerprint`in e?String(e.dd_fingerprint):void 0}function Yg(e){return/@ (.+)/.exec(e)?.[1]}function Xg(e,t){for(var n=e,r=[];n?.cause instanceof Error&&r.length<10;){var i=pg(n.cause);r.push({message:n.cause.message,source:t,type:i?.name,stack:i&&jg(i)}),n=n.cause}return r.length?r:void 0}var Zg={AGENT:`agent`,CONSOLE:`console`,CUSTOM:`custom`,LOGGER:`logger`,NETWORK:`network`,SOURCE:`source`,REPORT:`report`};function Qg(e){var t=function(t,n){var r=Gg({stackTrace:t,originalError:n,startClocks:Np(),nonErrorPrefix:`Uncaught`,source:Zg.SOURCE,handling:`unhandled`});e.notify(r)},n=$g(t).stop,r=e_(t).stop;return{stop:function(){n(),r()}}}function $g(e){return Ng(window,`onerror`,function(t){var n=t.parameters,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4];e(s instanceof Error?pg(s):Dg(r,i,a,o),s??r)})}function e_(e){return Ng(window,`onunhandledrejection`,function(t){var n=t.parameters[0].reason||`Empty reason`;e(pg(n),n)})}function t_(e){var t=H({version:`5.29.0`,onReady:function(e){e()}},e);return Object.defineProperty(t,"_setDebug",{get:function(){return fm},enumerable:!1}),t}function n_(e,t,n){var r=e[t];r&&!r.q&&r.version&&B.warn(`SDK is loaded more than once. This is unsupported and might have unexpected behavior.`),e[t]=n,r&&r.q&&r.q.forEach(function(e){return _p(e,`onReady callback threw an error:`)()})}function r_(e,t){t.silentMultipleInit||B.error(`${e} is already initialized.`)}function i_(e,t,n,r,i){return a_(e,t,[n],r,i)}function a_(e,t,n,r,i){var a=i===void 0?{}:i,o=a.once,s=a.capture,c=a.passive,l=U(function(t){!t.isTrusted&&!t.__ddIsTrusted&&!e.allowUntrustedEvents||(o&&f(),r(t))}),u=c?{capture:s,passive:c}:s,d=sm(t,`addEventListener`);n.forEach(function(e){return d.call(t,e,l,u)});function f(){var e=sm(t,`removeEventListener`);
11n.forEach(function(n){return e.call(t,n,l,u)})}return{stop:f}}var o_={intervention:`intervention`,deprecation:`deprecation`,cspViolation:`csp_violation`};function s_(e,t){var n=[];qp(t,o_.cspViolation)&&n.push(l_(e));var r=t.filter(function(e){return e!==o_.cspViolation});return r.length&&n.push(c_(r)),bm.apply(void 0,n)}function c_(e){return new W(function(t){if(window.ReportingObserver){var n=U(function(e,n){return e.forEach(function(e){return t.notify(u_(e))})}),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),function(){r.disconnect()}}})}function l_(e){return new W(function(t){return i_(e,document,`securitypolicyviolation`,function(e){t.notify(d_(e))}).stop})}function u_(e){var t=e.type,n=e.body;return f_({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:p_(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}function d_(e){var t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return f_({type:e.effectiveDirective,message:`${o_.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:p_(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${Em(e.originalPolicy,100,`...`)}"`:`no policy`,e.sourceFile,e.lineNumber,e.columnNumber)})}function f_(e){return H({startClocks:Np(),source:Zg.REPORT,handling:`unhandled`},e)}function p_(e,t,n,r,i){return n?jg({name:e,message:t,stack:[{func:`?`,url:n,line:r??void 0,column:i??void 0}]}):void 0}function m_(e,t){var n=window.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}function h_(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e}function g_(e,t,n){if(n===void 0&&(n=y_()),t===void 0)return e;if(typeof t!=`object`||!t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){var r=t.flags||[t.global?`g`:``,t.ignoreCase?`i`:``,t.multiline?`m`:``,t.sticky?`y`:``,t.unicode?`u`:``].join(``);return new RegExp(t.source,r)}if(!n.hasAlreadyBeenSeen(t)){if(Array.isArray(t)){for(var i=Array.isArray(e)?e:[],a=0;a<t.length;++a)i[a]=g_(i[a],t[a],n);return i}var o=h_(e)===`object`?e:{};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(o[s]=g_(o[s],t[s],n));return o}}function __(e){return g_(void 0,e)}function v_(){for(var e=[...arguments],t,n=0,r=e;n<r.length;n++){var i=r[n];i!=null&&(t=g_(t,i))}return t}function y_(){if(typeof WeakSet<`u`){var e=new WeakSet;return{hasAlreadyBeenSeen:function(t){var n=e.has(t);return n||e.add(t),n}}}var t=[];return{hasAlreadyBeenSeen:function(e){var n=t.indexOf(e)>=0;return n||t.push(e),n}}}function b_(){var e=window.navigator;return{status:e.onLine?`connected`:`not_connected`,interfaces:e.connection&&e.connection.type?[e.connection.type]:void 0,effective_type:e.connection?.effectiveType}}function x_(e){var t=new Set;return e.forEach(function(e){return t.add(e)}),Jp(t)}function S_(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}var C_=500;function w_(){var e=[];return{add:function(t){e.push(t)>C_&&e.splice(0,1)},remove:function(t){S_(e,t)},drain:function(t){e.forEach(function(e){return e(t)}),e.length=0}}}var T_={log:`log`,configuration:`configuration`,usage:`usage`},E_=[`https://www.datadoghq-browser-agent.com`,`https://www.datad0g-browser-agent.com`,`https://d3uc069fcn7uxw.cloudfront.net`,`https://d20xtzwzcl0ceb.cloudfront.net`,`http://localhost`,`<anonymous>`],D_=[zh],O_=w_(),k_=function(e){O_.add(function(){return k_(e)})};function A_(e,t){var n,r,i=new W,a=new Set,o=!qp(D_,t.site)&&vp(t.telemetrySampleRate),s=(n={},n[T_.log]=o,n[T_.configuration]=o&&vp(t.telemetryConfigurationSampleRate),n[T_.usage]=o&&vp(t.telemetryUsageSampleRate),n),c=j_();k_=function(n){var r=Dh(n);if(s[n.type]&&a.size<t.maxTelemetryEventsPerPage&&!a.has(r)){var o=l(e,n,c);i.notify(o),m_(`telemetry`,o),a.add(r)}},dm(F_);function l(e,t,n){return v_({type:`telemetry`,date:jp(),service:e,version:`5.29.0`,source:`browser`,_dd:{format_version:2},telemetry:v_(t,{runtime_env:n,connectivity:b_(),sdk_setup:`npm`}),experimental_features:Jp(dg())},r===void 0?{}:r())}return{setContextProvider:function(e){r=e},observable:i,enabled:o}}function j_(){return{is_local_file:window.location.protocol===`file:`,is_worker:`WorkerGlobalScope`in self}}function M_(){O_.drain()}function N_(e){return e.site===Ih}function P_(e,t){hm(up.debug,e,t),k_(H({type:T_.log,message:e,status:`debug`},t))}function F_(e,t){k_(H({type:T_.log,status:`error`},R_(e),t))}function I_(e){k_({type:T_.configuration,configuration:e})}function L_(e){k_({type:T_.usage,usage:e})}function R_(e){if(e instanceof Error){var t=pg(e);return{error:{kind:t.name,stack:jg(z_(t))},message:t.message}}return{error:{stack:Wg},message:`Uncaught ${Dh(e)}`}}function z_(e){return e.stack=e.stack.filter(function(e){return!e.url||E_.some(function(t){return em(e.url,t)})}),e}var B_=1/0,V_=Cp;function H_(e){var t=e.expireDelay,n=e.maxEntries,r=[],i=vm(function(){return a()},V_);function a(){for(var e=Mp()-t;r.length>0&&r[r.length-1].endTime<e;)r.pop()}function o(e,t){var i={value:e,startTime:t,endTime:B_,remove:function(){S_(r,i)},close:function(e){i.endTime=e}};return n&&r.length>=n&&r.pop(),r.unshift(i),i}function s(e,t){e===void 0&&(e=B_),t===void 0&&(t={returnInactive:!1});for(var n=0,i=r;n<i.length;n++){var a=i[n];if(a.startTime<=e){if(t.returnInactive||e<=a.endTime)return a.value;break}}}function c(e){var t=r[0];t&&t.endTime===B_&&t.close(e)}function l(e,t){e===void 0&&(e=B_),t===void 0&&(t=0);var n=Ip(e,t);return r.filter(function(t){return t.startTime<=n&&e<=t.endTime}).map(function(e){return e.value})}function u(){r=[]}function d(){ym(i)}return{add:o,find:s,closeActive:c,findAll:l,reset:u,stop:d}}var U_=Cp,W_=Hm,G_=[];function K_(e,t,n,r){var i=new W,a=new W,o=wh(e.sessionStoreStrategyType,t,n);G_.push(function(){return o.stop()});var s=H_({expireDelay:W_});G_.push(function(){return s.stop()}),o.renewObservable.subscribe(function(){s.add(c(),Mp()),i.notify()}),o.expireObservable.subscribe(function(){a.notify(),s.closeActive(Mp())}),o.expandOrRenewSession(),s.add(c(),Pp().relative),r.observable.subscribe(function(){r.isGranted()?o.expandOrRenewSession():o.expire()}),q_(e,function(){r.isGranted()&&o.expandOrRenewSession()}),J_(e,function(){return o.expandSession()}),Y_(e,function(){return o.restartSession()});function c(){return{id:o.getSession().id,trackingType:o.getSession()[t],isReplayForced:!!o.getSession().forcedReplay}}return{findSession:function(e,t){return s.find(e,t)}
11,renewObservable:i,expireObservable:a,sessionStateUpdateObservable:o.sessionStateUpdateObservable,expire:o.expire,updateSessionState:o.updateSessionState}}function q_(e,t){var n=a_(e,window,[`click`,`touchstart`,`keydown`,`scroll`],t,{capture:!0,passive:!0}).stop;G_.push(n)}function J_(e,t){var n=function(){document.visibilityState===`visible`&&t()},r=i_(e,document,`visibilitychange`,n).stop;G_.push(r);var i=vm(n,U_);G_.push(function(){ym(i)})}function Y_(e,t){var n=i_(e,window,`resume`,t,{capture:!0}).stop;G_.push(n)}function X_(e){return e>=500}function Z_(e){try{return e.clone()}catch{return}}var Q_=80*Hp,$_=3*Up,ev=Cp,tv=Sp;function nv(e,t,n,r,i){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?iv(e,t,n,{onSuccess:function(){return av(0,t,n,r,i)},onFailure:function(){t.queuedPayloads.enqueue(e),rv(t,n,r,i)}}):t.queuedPayloads.enqueue(e)}function rv(e,t,n,r){e.transportStatus===2&&gm(function(){iv(e.queuedPayloads.first(),e,t,{onSuccess:function(){e.queuedPayloads.dequeue(),e.currentBackoffTime=tv,av(1,e,t,n,r)},onFailure:function(){e.currentBackoffTime=Math.min(ev,e.currentBackoffTime*2),rv(e,t,n,r)}})},e.currentBackoffTime)}function iv(e,t,n,r){var i=r.onSuccess,a=r.onFailure;t.bandwidthMonitor.add(e),n(e,function(n){t.bandwidthMonitor.remove(e),ov(n)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:n.status},a()):(t.transportStatus=0,i())})}function av(e,t,n,r,i){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i({message:`Reached max ${r} events size queued for upload: ${$_/Up}MiB`,source:Zg.AGENT,startClocks:Np()}),t.queueFullReported=!0);var a=t.queuedPayloads;for(t.queuedPayloads=cv();a.size()>0;)nv(a.dequeue(),t,n,r,i)}function ov(e){return e.type!==`opaque`&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||X_(e.status))}function sv(){return{transportStatus:0,currentBackoffTime:tv,bandwidthMonitor:lv(),queuedPayloads:cv(),queueFullReported:!1}}function cv(){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>=$_}}}function lv(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=Q_&&this.ongoingRequestCount<32},add:function(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove:function(e){--this.ongoingRequestCount,this.ongoingByteCount-=e.bytesCount}}}function uv(e,t,n,r){var i=sv(),a=function(r,i){return mv(e,t,n,r,i)};return{send:function(e){nv(e,i,a,t.trackType,r)},sendOnExit:function(r){dv(e,t,n,r)}}}function dv(e,t,n,r){if(navigator.sendBeacon&&r.bytesCount<n)try{var i=t.build(`beacon`,r);if(navigator.sendBeacon(i,r.data))return}catch(e){pv(e)}gv(e,t.build(`xhr`,r),r.data)}var fv=!1;function pv(e){fv||(fv=!0,F_(e))}function mv(e,t,n,r,i){if(hv()&&r.bytesCount<n){var a=t.build(`fetch`,r);fetch(a,{method:`POST`,body:r.data,keepalive:!0,mode:`cors`}).then(U(function(e){return i?.({status:e.status,type:e.type})}),U(function(){gv(e,t.build(`xhr`,r),r.data,i)}))}else gv(e,t.build(`xhr`,r),r.data,i)}function hv(){try{return window.Request&&`keepalive`in new Request(`http://a`)}catch{return!1}}function gv(e,t,n,r){var i=new XMLHttpRequest;i.open(`POST`,t,!0),n instanceof Blob&&i.setRequestHeader(`Content-Type`,n.type),i_(e,i,`loadend`,function(){r?.({status:i.status})},{once:!0}),i.send(n)}function _v(){var e=bv();if(e)return{getCapabilities:function(){return JSON.parse(e.getCapabilities?.call(e)||`[]`)},getPrivacyLevel:function(){return e.getPrivacyLevel?.call(e)},getAllowedWebViewHosts:function(){return JSON.parse(e.getAllowedWebViewHosts())},send:function(t,n,r){var i=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:i}))}}}function vv(e){var t=_v();return!!t&&qp(t.getCapabilities(),e)}function yv(e){e===void 0&&(e=om().location?.hostname);var t=_v();return!!t&&t.getAllowedWebViewHosts().some(function(t){return e===t||tm(e,`.${t}`)})}function bv(){return om().DatadogEventBridge}var xv={HIDDEN:`visibility_hidden`,UNLOADING:`before_unload`,PAGEHIDE:`page_hide`,FROZEN:`page_frozen`};function Sv(e){return new W(function(t){var n=a_(e,window,[`visibilitychange`,`freeze`],function(e){e.type===`visibilitychange`&&document.visibilityState===`hidden`?t.notify({reason:xv.HIDDEN}):e.type===`freeze`&&t.notify({reason:xv.FROZEN})},{capture:!0}).stop,r=i_(e,window,`beforeunload`,function(){t.notify({reason:xv.UNLOADING})}).stop;return function(){n(),r()}})}function Cv(e){return qp(Qp(xv),e)}function wv(e){var t=e.encoder,n=e.request,r=e.flushController,i=e.messageBytesLimit,a={},o=r.flushObservable.subscribe(function(e){return d(e)});function s(e,n,i){r.notifyBeforeAddMessage(n),i===void 0?t.write(t.isEmpty?e:`
12${e}`,function(e){r.notifyAfterAddMessage(e-n)}):(a[i]=e,r.notifyAfterAddMessage())}function c(e){return e!==void 0&&a[e]!==void 0}function l(e){var n=a[e];delete a[e];var i=t.estimateEncodedBytesCount(n);r.notifyAfterRemoveMessage(i)}function u(e,n){var r=Dh(e),a=t.estimateEncodedBytesCount(r);if(a>=i){B.warn(`Discarded a message whose size was bigger than the maximum allowed size ${i}KB. ${gp} ${hp}/#technical-limitations`);return}c(n)&&l(n),s(r,a,n)}function d(e){var r=Qp(a).join(`
13`);a={};var i=Cv(e.reason),o=i?n.sendOnExit:n.send;if(i&&t.isAsync){var s=t.finishSync();s.outputBytesCount&&o(Tv(s));
13var c=[s.pendingData,r].filter(Boolean).join(`
14`);c&&o({data:c,bytesCount:Gp(c)})}else r&&t.write(t.isEmpty?r:`
15${r}`),t.finish(function(e){o(Tv(e))})}return{flushController:r,add:u,upsert:u,stop:o.unsubscribe}}function Tv(e){return{data:typeof e.output==`string`?e.output:new Blob([e.output],{type:`text/plain`}),bytesCount:e.outputBytesCount,encoding:e.encoding}}function Ev(e){var t=e.messagesLimit,n=e.bytesLimit,r=e.durationLimit,i=e.pageExitObservable,a=e.sessionExpireObservable,o=i.subscribe(function(e){return d(e.reason)}),s=a.subscribe(function(){return d(`session_expire`)}),c=new W(function(){return function(){o.unsubscribe(),s.unsubscribe()}}),l=0,u=0;function d(e){if(u!==0){var t=u,n=l;u=0,l=0,m(),c.notify({reason:e,messagesCount:t,bytesCount:n})}}var f;function p(){f===void 0&&(f=gm(function(){d(`duration_limit`)},r))}function m(){_m(f),f=void 0}return{flushObservable:c,get messagesCount(){return u},notifyBeforeAddMessage:function(e){l+e>=n&&d(`bytes_limit`),u+=1,l+=e,p()},notifyAfterAddMessage:function(e){e===void 0&&(e=0),l+=e,u>=t?d(`messages_limit`):l>=n&&d(`bytes_limit`)},notifyAfterRemoveMessage:function(e){l-=e,--u,u===0&&m()}}}function Dv(e,t,n,r,i,a,o){o===void 0&&(o=wv);var s=l(e,t),c=n&&l(e,n);function l(e,t){var n=t.endpoint,s=t.encoder;return o({encoder:s,request:uv(e,n,e.batchBytesLimit,r),flushController:Ev({messagesLimit:e.batchMessagesLimit,bytesLimit:e.batchBytesLimit,durationLimit:e.flushTimeout,pageExitObservable:i,sessionExpireObservable:a}),messageBytesLimit:e.messageBytesLimit})}return{flushObservable:s.flushController.flushObservable,add:function(e,t){t===void 0&&(t=!0),s.add(e),c&&t&&c.add(n.transformMessage?n.transformMessage(e):e)},upsert:function(e,t){s.upsert(e,t),c&&c.upsert(n.transformMessage?n.transformMessage(e):e,t)},stop:function(){s.stop(),c&&c.stop()}}}function Ov(){var e=``,t=0;return{isAsync:!1,get isEmpty(){return!e},write:function(n,r){var i=Gp(n);t+=i,e+=n,r&&r(i)},finish:function(e){e(this.finishSync())},finishSync:function(){var n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:``};return e=``,t=0,n},estimateEncodedBytesCount:function(e){return e.length}}}var kv=function(){function e(){this.callbacks={}}return e.prototype.notify=function(e,t){var n=this.callbacks[e];n&&n.forEach(function(e){return e(t)})},e.prototype.subscribe=function(e,t){var n=this;return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:function(){n.callbacks[e]=n.callbacks[e].filter(function(e){return t!==e})}}},e}();function Av(e,t,n){var r=0,i=!1;return{isLimitReached:function(){if(r===0&&gm(function(){r=0},Cp),r+=1,r<=t||i)return i=!1,!1;if(r===t+1){i=!0;try{n({message:`Reached max number of ${e}s by minute: ${t}`,source:Zg.AGENT,startClocks:Np()})}finally{i=!1}}return!0}}}function jv(e,t,n){return document.readyState===t||document.readyState===`complete`?(n(),{stop:G}):i_(e,window,t===`complete`?`load`:`DOMContentLoaded`,n,{once:!0})}var Mv,Nv=new WeakMap;function Pv(e){return Mv||=Fv(e),Mv}function Fv(e){return new W(function(t){var n=Ng(XMLHttpRequest.prototype,`open`,Iv).stop,r=Ng(XMLHttpRequest.prototype,`send`,function(n){Lv(n,e,t)},{computeHandlingStack:!0}).stop,i=Ng(XMLHttpRequest.prototype,`abort`,Rv).stop;return function(){n(),r(),i()}})}function Iv(e){var t=e.target,n=e.parameters,r=n[0],i=n[1];Nv.set(t,{state:`open`,method:String(r).toUpperCase(),url:kh(String(i))})}function Lv(e,t,n){var r=e.target,i=e.handlingStack,a=Nv.get(r);if(a){var o=a;o.state=`start`,o.startClocks=Np(),o.isAborted=!1,o.xhr=r,o.handlingStack=i;var s=!1,c=Ng(r,`onreadystatechange`,function(){r.readyState===XMLHttpRequest.DONE&&l()}).stop,l=function(){if(u(),c(),!s){s=!0;var e=a;e.state=`complete`,e.duration=Fp(o.startClocks.timeStamp,jp()),e.status=r.status,n.notify(nm(e))}},u=i_(t,r,`loadend`,l).stop;n.notify(o)}}function Rv(e){var t=e.target,n=Nv.get(t);n&&(n.isAborted=!0)}var zv;function Bv(){return zv||=Vv(),zv}function Vv(){return new W(function(e){if(window.fetch)return Ng(window,`fetch`,function(t){return Hv(t,e)},{computeHandlingStack:!0}).stop})}function Hv(e,t){var n=e.parameters,r=e.onPostCall,i=e.handlingStack,a=n[0],o=n[1],s=o&&o.method;s===void 0&&a instanceof Request&&(s=a.method);var c=s===void 0?`GET`:String(s).toUpperCase(),l=a instanceof Request?a.url:kh(String(a)),u={state:`start`,init:o,input
15:a,method:c,startClocks:Np(),url:l,handlingStack:i};t.notify(u),n[0]=u.input,n[1]=u.init,r(function(e){return Uv(t,e,u)})}function Uv(e,t,n){var r=n;function i(t){r.state=`resolve`,H(r,t),e.notify(r)}t.then(U(function(e){i({response:e,responseType:e.type,status:e.status,isAborted:!1})}),U(function(e){i({status:0,isAborted:r.init?.signal?.aborted||e instanceof DOMException&&e.code===DOMException.ABORT_ERR,error:e})}))}var Wv={};function Gv(e){var t=e.map(function(e){return Wv[e]||(Wv[e]=Kv(e)),Wv[e]});return bm.apply(void 0,t)}function Kv(e){return new W(function(t){var n=dp[e];return dp[e]=function(){var r=[...arguments];n.apply(console,r);var i=Ag();mm(function(){t.notify(qv(r,e,i))})},function(){dp[e]=n}})}function qv(e,t,n){var r=e.map(function(e){return Jv(e)}).join(` `),i;if(t===up.error){var a=Yp(e,function(e){return e instanceof Error});i={stack:a?jg(pg(a)):void 0,fingerprint:Jg(a),causes:a?Xg(a,`console`):void 0,startClocks:Np(),message:r,source:Zg.CONSOLE,handling:`handled`,handlingStack:n}}return{api:t,message:r,error:i,handlingStack:n}}function Jv(e){return typeof e==`string`?Rg(e):e instanceof Error?Mg(pg(e)):Dh(Rg(e),void 0,2)}function Yv(e){var t={},n=new W,r={getContext:function(){return __(t)},setContext:function(i){h_(i)===`object`?(t=Rg(i),e&&e.updateCustomerData(t)):r.clearContext(),n.notify()},setContextProperty:function(r,i){t[r]=Rg(i),e&&e.updateCustomerData(t),n.notify()},removeContextProperty:function(r){delete t[r],e&&e.updateCustomerData(t),n.notify()},clearContext:function(){t={},e&&e.resetCustomerData(),n.notify()},changeObservable:n};return r}var Xv=`_dd_c`,Zv=[];function Qv(e,t,n,r){var i=$v(n,r);Zv.push(i_(e,window,`storage`,function(e){i===e.key&&a()})),t.changeObservable.subscribe(o),t.setContext(v_(s(),t.getContext()));function a(){t.setContext(s())}function o(){localStorage.setItem(i,JSON.stringify(t.getContext()))}function s(){var e=localStorage.getItem(i);return e===null?{}:JSON.parse(e)}}function $v(e,t){return`${Xv}_${e}_${t}`}var ey=3*Hp,ty=16*Hp;function ny(e){e===void 0&&(e=2);var t=new Map,n=!1;function r(r){if(r===void 0&&(r=0),!(n||e===0)){var i=e===2?ey:ty,a=r;t.forEach(function(e){a+=e.getBytesCount()}),a>i&&(iy(i),n=!0)}}return{createDetachedTracker:function(){var e=ry(function(){return r(e.getBytesCount())});return e},getOrCreateTracker:function(e){return t.has(e)||t.set(e,ry(r)),t.get(e)},setCompressionStatus:function(t){e===0&&(e=t,r())},getCompressionStatus:function(){return e},stop:function(){t.forEach(function(e){return e.stop()}),t.clear()}}}function ry(e){var t=0,n=xm(function(n){t=Gp(Dh(n)),e()},200),r=n.throttled,i=n.cancel,a=function(){i(),t=0};return{updateCustomerData:function(e){im(e)?a():r(e)},resetCustomerData:a,getBytesCount:function(){return t},stop:function(){i()}}}function iy(e){B.warn(`Customer data exceeds the recommended ${e/Hp}KiB threshold. ${gp} ${hp}/#customer-data-exceeds-the-recommended-threshold-warning`)}function ay(e,t,n){var r=e.getReader(),i=[],a=0;o();function o(){r.read().then(U(function(e){if(e.done){s();return}n.collectStreamBody&&i.push(e.value),a+=e.value.length,a>n.bytesLimit?s():o()}),U(function(e){return t(e)}))}function s(){r.cancel().catch(G);var e,o;if(n.collectStreamBody){var s;if(i.length===1)s=i[0];else{s=new Uint8Array(a);var c=0;i.forEach(function(e){s.set(e,c),c+=e.length})}e=s.slice(0,n.bytesLimit),o=s.length>n.bytesLimit}t(void 0,e,o)}}function oy(){return!!(window._DATADOG_SYNTHETICS_INJECTS_RUM||Im(`datadog-synthetics-injects-rum`))}function sy(){var e=window._DATADOG_SYNTHETICS_PUBLIC_ID||Im(`datadog-synthetics-public-id`);return typeof e==`string`?e:void 0}function cy(){var e=window._DATADOG_SYNTHETICS_RESULT_ID||Im(`datadog-synthetics-result-id`);return typeof e==`string`?e:void 0}function ly(e){var t=H({},e);return[`id`,`name`,`email`].forEach(function(e){e in t&&(t[e]=String(t[e]))}),t}function uy(e){var t=h_(e)===`object`;return t||B.error(`Unsupported user:`,e),t}function dy(e){var t=h_(e);return t===`string`||t===`function`||e instanceof RegExp}function fy(e,t,n){return n===void 0&&(n=!1),e.some(function(e){try{if(typeof e==`function`)return e(t);if(e instanceof RegExp)return e.test(t);if(typeof e==`string`)return n?em(t,e):e===t}catch(e){B.error(e)}return!1})}var py;
15function my(e,t,n){var r=n.getHandler(),i=Array.isArray(r)?r:[r];return hy[e]>=hy[n.getLevel()]&&qp(i,t)}var K={ok:`ok`,debug:`debug`,info:`info`,notice:`notice`,warn:`warn`,error:`error`,critical:`critical`,alert:`alert`,emerg:`emerg`},hy=(py={},py[K.ok]=0,py[K.debug]=1,py[K.info]=2,py[K.notice]=4,py[K.warn]=5,py[K.error]=6,py[K.critical]=7,py[K.alert]=8,py[K.emerg]=9,py);function gy(e,t){var n=(t===void 0?{}:t).includeMessage,r=n!==void 0&&n;return{stack:e.stack,kind:e.type,message:r?e.message:void 0,causes:e.causes,fingerprint:e.fingerprint,handling:e.handling}}var _y=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},vy={console:`console`,http:`http`,silent:`silent`},yy=Object.keys(K),by=function(){function e(e,t,n,r,i,a){r===void 0&&(r=vy.http),i===void 0&&(i=K.debug),a===void 0&&(a={}),this.handleLogStrategy=e,this.handlerType=r,this.level=i,this.contextManager=Yv(t),this.contextManager.setContext(a),n&&this.contextManager.setContextProperty(`logger`,{name:n})}return e.prototype.logImplementation=function(e,t,n,r,i){n===void 0&&(n=K.info);var a=Rg(t),o=r==null?a:v_({error:gy(Gg({stackTrace:r instanceof Error?pg(r):void 0,originalError:r,nonErrorPrefix:`Provided`,source:Zg.LOGGER,handling:`handled`,startClocks:Np()}),{includeMessage:!0})},a);this.handleLogStrategy({message:Rg(e),context:o,status:n},this,i)},e.prototype.log=function(e,t,n,r){n===void 0&&(n=K.info);var i;my(n,vy.http,this)&&(i=Ag()),this.logImplementation(e,t,n,r,i)},e.prototype.setContext=function(e){this.contextManager.setContext(e)},e.prototype.getContext=function(){return this.contextManager.getContext()},e.prototype.setContextProperty=function(e,t){this.contextManager.setContextProperty(e,t)},e.prototype.removeContextProperty=function(e){this.contextManager.removeContextProperty(e)},e.prototype.clearContext=function(){this.contextManager.clearContext()},e.prototype.setHandler=function(e){this.handlerType=e},e.prototype.getHandler=function(){return this.handlerType},e.prototype.setLevel=function(e){this.level=e},e.prototype.getLevel=function(){return this.level},_y([pm],e.prototype,`logImplementation`,null),e}();by.prototype.ok=xy(K.ok),by.prototype.debug=xy(K.debug),by.prototype.info=xy(K.info),by.prototype.notice=xy(K.notice),by.prototype.warn=xy(K.warn),by.prototype.error=xy(K.error),by.prototype.critical=xy(K.critical),by.prototype.alert=xy(K.alert),by.prototype.emerg=xy(K.emerg);function xy(e){return function(t,n,r){var i;my(e,vy.http,this)&&(i=Ag()),this.logImplementation(t,n,e,r,i)}}function Sy(e,t){return{view:{referrer:document.referrer,url:window.location.href},context:e.getContext(),user:t.getContext()}}var Cy=32*Hp;function wy(e){e.usePciIntake===!0&&e.site&&e.site!==`datadoghq.com`&&B.warn(`PCI compliance for Logs is only available for Datadog organizations in the US1 site. Default intake will be used.`);var t=ig(e),n=Ty(e.forwardConsoleLogs,Qp(up),`Forward Console Logs`),r=Ty(e.forwardReports,Qp(o_),`Forward Reports`);if(!(!t||!n||!r))return e.forwardErrorsToLogs&&!qp(n,up.error)&&n.push(up.error),H({forwardErrorsToLogs:e.forwardErrorsToLogs!==!1,forwardConsoleLogs:n,forwardReports:r,requestErrorResponseLengthLimit:Cy,sendLogsAfterSessionExpiration:!!e.sendLogsAfterSessionExpiration},t)}function Ty(e,t,n){if(e===void 0)return[];if(!(e===`all`||Array.isArray(e)&&e.every(function(e){return qp(t,e)}))){B.error(`${n} should be "all" or an array with allowed values "${t.join(`", "`)}"`);return}return e===`all`?t:x_(e)}function Ey(e){var t=ag(e);return H({forward_errors_to_logs:e.forwardErrorsToLogs,forward_console_logs:e.forwardConsoleLogs,forward_reports:e.forwardReports,use_pci_intake:e.usePciIntake,send_logs_after_session_expiration:e.sendLogsAfterSessionExpiration},t)}function Dy(e,t,n){var r=w_(),i,a,o=t.observable.subscribe(s);function s(){if(!(!a||!i||!t.isGranted())){o.unsubscribe();var e=n(i,a);r.drain(e)}}return{init:function(e){if(!e){B.error(`Missing configuration`);return}if(cg(e.enableExperimentalFeatures),yv()&&(e=Oy(e)),i=e,a){r_(`DD_LOGS`,e);return}var n=wy(e);n&&(a=n,Bv().subscribe(G),t.tryToInit(n.trackingConsent),s())},get initConfiguration(){return i},getInternalContext:G,handleLog:function(t,n,i,a,o){a===void 0&&(a=e()),o===void 0&&(o=jp()),r.add(function(e){return e.handleLog(t,n,i,a,o)})}}}function Oy(e){return H({},e,{clientToken:`empty`})}var ky=`logs`;function Ay(e){var t=ny(),n=Yv(t.getOrCreateTracker(2)),r=Yv(t.getOrCreateTracker(1)),i=Eh();function a(){return Sy(n,r)}var o=Dy(a,i,function(t,s){t.storeContextsAcrossPages&&(Qv(s,n,ky,2),Qv(s,r,ky,1));var c=e(t,s,a,i);return o=jy(t,c),c}),s={};return t_({logger:new by(function(){var e=[...arguments];return o.handleLog.apply(o,e)},t.createDetachedTracker()),init:U(function(e){return o.init(e)}),setTrackingConsent:U(function(e){i.update(e),L_({feature:`set-tracking-consent`,tracking_consent:e})}),getGlobalContext:U(function(){return n.getContext()}),setGlobalContext:U(function(e){return n.setContext(e)}
15),setGlobalContextProperty:U(function(e,t){return n.setContextProperty(e,t)}),removeGlobalContextProperty:U(function(e){return n.removeContextProperty(e)}),clearGlobalContext:U(function(){return n.clearContext()}),createLogger:U(function(e,n){return n===void 0&&(n={}),s[e]=new by(function(){var e=[...arguments];return o.handleLog.apply(o,e)},t.createDetachedTracker(),Rg(e),n.handler,n.level,Rg(n.context)),s[e]}),getLogger:U(function(e){return s[e]}),getInitConfiguration:U(function(){return __(o.initConfiguration)}),getInternalContext:U(function(e){return o.getInternalContext(e)}),setUser:U(function(e){uy(e)&&r.setContext(ly(e))}),getUser:U(function(){return r.getContext()}),setUserProperty:U(function(e,t){var n,i=ly((n={},n[e]=t,n))[e];r.setContextProperty(e,i)}),removeUserProperty:U(function(e){return r.removeContextProperty(e)}),clearUser:U(function(){return r.clearContext()})})}function jy(e,t){return H({init:function(e){r_(`DD_LOGS`,e)},initConfiguration:e},t)}var My=`logs`;function Ny(e,t){var n=K_(e,My,function(t){return Iy(e,t)},t);return{findTrackedSession:function(e,t){t===void 0&&(t={returnInactive:!1});var r=n.findSession(e,t);return r&&r.trackingType===`1`?{id:r.id}:void 0},expireObservable:n.expireObservable}}function Py(e){var t=Fy(e)===`1`?{}:void 0;return{findTrackedSession:function(){return t},expireObservable:new W}}function Fy(e){return vp(e.sessionSampleRate)?`1`:`0`}function Iy(e,t){var n=Ly(t)?t:Fy(e);return{trackingType:n,isTracked:n===`1`}}function Ly(e){return e===`0`||e===`1`}var Ry=!1;function zy(e){var t=window;if(oy()){var n=r(t.DD_RUM_SYNTHETICS);return!n&&!Ry&&(Ry=!0,P_(`Logs sent before RUM is injected by the synthetics worker`,{testId:sy(),resultId:cy()})),n}return r(t.DD_RUM);function r(t){if(t&&t.getInternalContext)return t.getInternalContext(e)}}function By(e,t,n,r,i){var a=yy.concat([`custom`]),o={};a.forEach(function(e){o[e]=Av(e,t.eventRateLimiterThreshold,i)}),n.subscribe(0,function(i){var a=i.rawLogsEvent,s=i.messageContext,c=s===void 0?void 0:s,l=i.savedCommonContext,u=l===void 0?void 0:l,d=i.domainContext,f=Lp(a.date),p=e.findTrackedSession(f);if(!(!p&&(!t.sendLogsAfterSessionExpiration||!e.findTrackedSession(f,{returnInactive:!0})))){var m=u||r(),h=v_({service:t.service,session_id:p?p.id:void 0,usr:im(m.user)?void 0:m.user,view:m.view},m.context,zy(f),a,c);t.beforeSend?.call(t,h,d)===!1||h.origin!==Zg.AGENT&&(o[h.status]??o.custom).isLimitReached()||n.notify(1,h)}})}var Vy,Hy=(Vy={},Vy[up.log]=K.info,Vy[up.debug]=K.debug,Vy[up.info]=K.info,Vy[up.warn]=K.warn,Vy[up.error]=K.error,Vy);function Uy(e,t){var n=Gv(e.forwardConsoleLogs).subscribe(function(e){var n={rawLogsEvent:{date:jp(),message:e.message,origin:Zg.CONSOLE,error:e.error&&gy(e.error),status:Hy[e.api]},domainContext:{handlingStack:e.handlingStack}};t.notify(0,n)});return{stop:function(){n.unsubscribe()}}}function Wy(e,t){var n=s_(e,e.forwardReports).subscribe(function(e){var n=e.message,r,i=e.originalError.type===`deprecation`?K.warn:K.error;i===K.error?r=gy(e):e.stack&&(n+=` Found in ${Yg(e.stack)}`),t.notify(0,{rawLogsEvent:{date:jp(),message:n,origin:Zg.REPORT,error:r,status:i}})});return{stop:function(){n.unsubscribe()}}}function Gy(e,t){if(!e.forwardErrorsToLogs)return{stop:G};var n=Pv(e).subscribe(function(e){e.state===`complete`&&i(`xhr`,e)}),r=Bv().subscribe(function(e){e.state===`resolve`&&i(`fetch`,e)});function i(n,r){!e.isIntakeUrl(r.url)&&(Yy(r)||X_(r.status))&&(`xhr`in r?Ky(r.xhr,e,i):r.response?Jy(r.response,e,i):r.error&&qy(r.error,e,i));function i(e){var i={isAborted:r.isAborted,handlingStack:r.handlingStack};t.notify(0,{rawLogsEvent:{message:`${Zy(n)} error ${r.method} ${r.url}`,date:r.startClocks.timeStamp,error:{stack:e||`Failed to load`,handling:void 0},http:{method:r.method,status_code:r.status,url:r.url},status:K.error,origin:Zg.NETWORK},domainContext:i})}}return{stop:function(){n.unsubscribe(),r.unsubscribe()}}}function Ky(e,t,n){typeof e.response==`string`?n(Xy(e.response,t)):n(e.response)}
15function qy(e,t,n){n(Xy(jg(pg(e)),t))}function Jy(e,t,n){var r=Z_(e);!r||!r.body?n():window.TextDecoder?Qy(r.body,t.requestErrorResponseLengthLimit,function(e,t){n(e?`Unable to retrieve response: ${e}`:t)}):r.text().then(U(function(e){return n(Xy(e,t))}),U(function(e){return n(`Unable to retrieve response: ${e}`)}))}function Yy(e){return e.status===0&&e.responseType!==`opaque`}function Xy(e,t){return e.length>t.requestErrorResponseLengthLimit?`${e.substring(0,t.requestErrorResponseLengthLimit)}...`:e}function Zy(e){return e===`xhr`?`XHR`:`Fetch`}function Qy(e,t,n){ay(e,function(e,t,r){if(e)n(e);else{var i=new TextDecoder().decode(t);r&&(i+=`...`),n(void 0,i)}},{bytesLimit:t,collectStreamBody:!0})}function $y(e,t){if(!e.forwardErrorsToLogs)return{stop:G};var n=new W,r=Qg(n).stop,i=n.subscribe(function(e){t.notify(0,{rawLogsEvent:{message:e.message,date:e.startClocks.timeStamp,error:gy(e),origin:Zg.SOURCE,status:K.error}})});return{stop:function(){r(),i.unsubscribe()}}}var eb=kv,tb;function nb(e){function t(t,n,r,i,a){var o=v_(n.getContext(),t.context);if(my(t.status,vy.console,n)&&ib(t,o),my(t.status,vy.http,n)){var s={rawLogsEvent:{date:a||jp(),message:t.message,status:t.status,origin:Zg.LOGGER},messageContext:o,savedCommonContext:i};r&&(s.domainContext={handlingStack:r}),e.notify(0,s)}}return{handleLog:t}}var rb=(tb={},tb[K.ok]=up.debug,tb[K.debug]=up.debug,tb[K.info]=up.info,tb[K.notice]=up.info,tb[K.warn]=up.warn,tb[K.error]=up.error,tb[K.critical]=up.error,tb[K.alert]=up.error,tb[K.emerg]=up.error,tb);function ib(e,t){var n=e.status,r=e.message;fp[rb[n]].call(dp,r,t)}function ab(e,t,n,r,i){var a=Dv(e,{endpoint:e.logsEndpointBuilder,encoder:Ov()},e.replica&&{endpoint:e.replica.logsEndpointBuilder,encoder:Ov()},n,r,i.expireObservable);return t.subscribe(1,function(e){a.add(e)}),a}function ob(e){var t=_v();e.subscribe(1,function(e){t.send(`log`,e)})}function sb(e){return{get:function(t){var n=e.findTrackedSession(t);if(n)return{session_id:n.id}}}}function cb(e){return function(t){e.notify(0,{rawLogsEvent:{message:t.message,date:t.startClocks.timeStamp,origin:Zg.AGENT,status:K.error}}),P_(`Error reported to customer`,{"error.message":t.message})}}function lb(e,t,n,r,i){var a=A_(`browser-logs-sdk`,t);a.setContextProvider(function(){return{application:{id:zy()?.application_id},session:{id:i.findTrackedSession()?.id},view:{id:zy()?.view?.id},action:{id:zy()?.user_action?.id}}});var o=[];if(yv()){var s=_v(),c=a.observable.subscribe(function(e){return s.send(`internal_telemetry`,e)});o.push(function(){return c.unsubscribe()})}else{var l=Dv(t,{endpoint:t.rumEndpointBuilder,encoder:Ov()},t.replica&&{endpoint:t.replica.rumEndpointBuilder,encoder:Ov()},n,r,i.expireObservable);o.push(function(){return l.stop()});var u=a.observable.subscribe(function(e){return l.add(e,N_(t))});o.push(function(){return u.unsubscribe()})}return M_(),I_(Ey(e)),{telemetry:a,stop:function(){o.forEach(function(e){return e()})}}}function ub(e,t,n,r){var i=new eb,a=[];i.subscribe(1,function(e){return m_(`logs`,e)});var o=cb(i),s=Sv(t),c=t.sessionStoreStrategyType&&!yv()&&!oy()?Ny(t,r):Py(t),l=lb(e,t,o,s,c).stop;a.push(function(){return l()}),Gy(t,i),$y(t,i),Uy(t,i),Wy(t,i);var u=nb(i).handleLog;if(By(c,t,i,n,o),yv())ob(i);else{var d=ab(t,i,o,s,c).stop;a.push(function(){return d()})}return{handleLog:u,getInternalContext:sb(c).get,stop:function(){a.forEach(function(e){return e()})}}}var db=Ay(ub);n_(om(),`DD_LOGS`,db);function fb(e,t,n){return{context:e.getContext(),user:t.getContext(),hasReplay:n.isRecording()?!0:void 0}}function pb(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function mb(e,t,n){function r(e){return!t.wasInPageStateDuringPeriod(`frozen`,e.startClocks.relative,e.duration)}function i(t){r(t)&&e.notify(11,vb(t,!0))}return{addDurationVital:i,startDurationVital:function(e,t){return t===void 0&&(t={}),hb(n,e,t)},stopDurationVital:function(e,t){t===void 0&&(t={}),gb(i,n,e,t)}}}function hb(e,t,n){var r=e.vitalsByName,i=e.vitalsByReference;n===void 0&&(n={});var a={name:t,startClocks:Np(),context:n.context,description:n.description},o={__dd_vital_reference:!0};return r.set(t,a),i.set(o,a),o}function gb(e,t,n,r){var i=t.vitalsByName,a=t.vitalsByReference;r===void 0&&(r={});var o=typeof n==`string`?i.get(n):a.get(n);o&&(e(_b(o,o.startClocks,r,Np())),typeof n==`string`?i.delete(n):a.delete(n))}function _b(e,t,n,r){return{name:e.name,type:`duration`,startClocks:t,duration:Fp(t.timeStamp,r.timeStamp),context:v_(e.context,n.context),description:n.description??e.description}}function vb(e,t){var n={date:e.startClocks.timeStamp,vital:{id:Sm(),type:e.type,name:e.name,duration:V(e.duration),description:e.description},type:`vital`};return t&&(n._dd={vital:{computed_value:!0}}),{rawRumEvent:n,startTime:e.startClocks.relative,customerContext:e.context,domainContext:{}}}function yb(e){var t=e;return h_(t)===`object`&&dy(t.match)&&Array.isArray(t.propagatorTypes)}function bb(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function xb(e,t){return{clearTracingIfNeeded:bb,traceFetch:function(n){return Sb(e,n,t,function(e){if(n.input instanceof Request&&!n.init?.headers)n.input=new Request
15(n.input),Object.keys(e).forEach(function(t){n.input.headers.append(t,e[t])});else{n.init=nm(n.init);var t=[];n.init.headers instanceof Headers?n.init.headers.forEach(function(e,n){t.push([n,e])}):Array.isArray(n.init.headers)?n.init.headers.forEach(function(e){t.push(e)}):n.init.headers&&Object.keys(n.init.headers).forEach(function(e){t.push([e,n.init.headers[e]])}),n.init.headers=t.concat($p(e))}})},traceXhr:function(n,r){return Sb(e,n,t,function(e){Object.keys(e).forEach(function(t){r.setRequestHeader(t,e[t])})})}}}function Sb(e,t,n,r){if(!(!Cb()||!n.findTrackedSession())){var i=Yp(e.allowedTracingUrls,function(e){return fy([e.match],t.url,!0)});i&&(t.traceSampled=!xp(e.traceSampleRate)||vp(e.traceSampleRate),!(!t.traceSampled&&e.traceContextInjection!==eg.ALL)&&(t.traceId=Eb(),t.spanId=Eb(),r(Tb(t.traceId,t.spanId,t.traceSampled,i.propagatorTypes))))}}function Cb(){return wb()!==void 0}function wb(){return window.crypto||window.msCrypto}function Tb(e,t,n,r){var i={};return r.forEach(function(r){switch(r){case`datadog`:H(i,{"x-datadog-origin":`rum`,"x-datadog-parent-id":t.toDecimalString(),"x-datadog-sampling-priority":n?`1`:`0`,"x-datadog-trace-id":e.toDecimalString()});break;case`tracecontext`:H(i,{traceparent:`00-0000000000000000${e.toPaddedHexadecimalString()}-${t.toPaddedHexadecimalString()}-0${n?`1`:`0`}`});break;case`b3`:H(i,{b3:`${e.toPaddedHexadecimalString()}-${t.toPaddedHexadecimalString()}-${n?`1`:`0`}`});break;case`b3multi`:H(i,{"X-B3-TraceId":e.toPaddedHexadecimalString(),"X-B3-SpanId":t.toPaddedHexadecimalString(),"X-B3-Sampled":n?`1`:`0`});break}}),i}function Eb(){var e=new Uint8Array(8);wb().getRandomValues(e),e[0]&=127;function t(t){return e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]}function n(e){var n=t(0),r=t(4),i=``;do{var a=n%e*4294967296+r;n=Math.floor(n/e),r=Math.floor(a/e),i=(a%e).toString(e)+i}while(n||r);return i}function r(){return n(10)}function i(){var e=n(16);return Array(17-e.length).join(`0`)+e}return{toDecimalString:r,toPaddedHexadecimalString:i}}var Db=[`tracecontext`,`datadog`];function Ob(e){if(!e.applicationId){B.error(`Application ID is not configured, no RUM data will be collected.`);return}if(!(!rg(e.sessionReplaySampleRate,`Session Replay`)||!rg(e.traceSampleRate,`Trace`))){if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){B.error(`Excluded Activity Urls should be an array`);return}var t=kb(e);if(t){var n=ig(e);if(n)return H({applicationId:e.applicationId,version:e.version||void 0,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:e.sessionReplaySampleRate??0,startSessionReplayRecordingManually:!!e.startSessionReplayRecordingManually,traceSampleRate:e.traceSampleRate,allowedTracingUrls:t,excludedActivityUrls:e.excludedActivityUrls??[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!e.trackUserInteractions,trackViewsManually:!!e.trackViewsManually,trackResources:!!e.trackResources,trackLongTasks:!!e.trackLongTasks,subdomain:e.subdomain,defaultPrivacyLevel:rm($h,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:$h.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,customerDataTelemetrySampleRate:1,traceContextInjection:rm(eg,e.traceContextInjection)?e.traceContextInjection:eg.ALL,plugins:e.betaPlugins||[]},n)}}}function kb(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){B.error(`Allowed Tracing URLs should be an array`);return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){B.error(`Service needs to be configured when tracing is enabled`);return}var t=[];return e.allowedTracingUrls.forEach(function(e){dy(e)?t.push({match:e,propagatorTypes:Db}):yb(e)?t.push(e):B.warn(`Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter`,e)}),t}function Ab(e){var t=new Set;return Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0&&e.allowedTracingUrls.forEach(function(e){dy(e)?Db.forEach(function(e){return t.add(e)}):h_(e)===`object`&&Array.isArray(e.propagatorTypes)&&e.propagatorTypes.forEac
15h(function(e){return t.add(e)})}),Jp(t)}function jb(e){var t=ag(e);return H({session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0,selected_tracing_propagators:Ab(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:Array.isArray(e.excludedActivityUrls)&&e.excludedActivityUrls.length>0,use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,plugins:e.betaPlugins?.map(function(e){return H({name:e.name},e.getConfigurationTelemetry?.call(e))})},t)}var Mb=`https://d3uc069fcn7uxw.cloudfront.net/configuration`;function Nb(e,t){Fb(e,function(n){t(Pb(e,n))})}function Pb(e,t){return H({},e,t)}function Fb(e,t){var n=new XMLHttpRequest;i_(e,n,`load`,function(){n.status===200?t(JSON.parse(n.responseText)):Ib()}),i_(e,n,`error`,function(){Ib()}),n.open(`GET`,`${Mb}/${encodeURIComponent(e.remoteConfigurationId)}.json`),n.send()}function Ib(){B.error(`Error fetching the remote configuration.`)}function Lb(e,t,n){if(e)for(var r=0,i=e;r<i.length;r++){var a=i[r][t];a&&a(n)}}function Rb(e,t,n,r,i){var a=e.ignoreInitIfSyntheticsWillInjectRum,o=e.startDeflateWorker,s=w_(),c,l,u,d,f=n.observable.subscribe(p);function p(){if(!(!u||!d||!n.isGranted())){f.unsubscribe();var e;if(d.trackViewsManually){if(!c)return;s.remove(c.callback),e=c.options}var t=i(d,l,e);s.drain(t)}}function m(e){var t=yv();if(t&&(e=zb(e)),u=e,I_(jb(e)),d){r_(`DD_RUM`,e);return}var r=Ob(e);if(r){if(!t&&!r.sessionStoreStrategyType){B.warn(`No storage available for session. We will not send any data.`);return}r.compressIntakeRequests&&!t&&o&&(l=o(r,`Datadog RUM`,G),!l)||(d=r,Bv().subscribe(G),n.tryToInit(r.trackingConsent),p())}}var h=function(e){s.add(function(t){return t.addDurationVital(e)})};return{init:function(e,t){if(!e){B.error(`Missing configuration`);return}cg(e.enableExperimentalFeatures),u=e,!(a&&oy())&&(Lb(e.betaPlugins,`onInit`,{initConfiguration:e,publicApi:t}),e.remoteConfigurationId&&ug(og.REMOTE_CONFIGURATION)?Nb(e,m):m(e))},get initConfiguration(){return u},getInternalContext:G,stopSession:G,addTiming:function(e,t){t===void 0&&(t=jp()),s.add(function(n){return n.addTiming(e,t)})},startView:function(e,t){t===void 0&&(t=Np());var n=function(n){n.startView(e,t)};s.add(n),c||(c={options:e,callback:n},p())},updateViewName:function(e){s.add(function(t){return t.updateViewName(e)})},setViewContext:function(e){s.add(function(t){return t.setViewContext(e)})},setViewContextProperty:function(e,t){s.add(function(n){return n.setViewContextProperty(e,t)})}
15,addAction:function(e,n){n===void 0&&(n=t()),s.add(function(t){return t.addAction(e,n)})},addError:function(e,n){n===void 0&&(n=t()),s.add(function(t){return t.addError(e,n)})},addFeatureFlagEvaluation:function(e,t){s.add(function(n){return n.addFeatureFlagEvaluation(e,t)})},startDurationVital:function(e,t){return hb(r,e,t)},stopDurationVital:function(e,t){gb(h,r,e,t)},addDurationVital:h}}function zb(e){return H({},e,{applicationId:`00000000-aaaa-0000-aaaa-000000000000`,clientToken:`empty`,sessionSampleRate:100,defaultPrivacyLevel:e.defaultPrivacyLevel??_v()?.getPrivacyLevel()})}var Bb=`rum`;function Vb(e,t,n){n===void 0&&(n={});var r=ny(0),i=Yv(r.getOrCreateTracker(2)),a=Yv(r.getOrCreateTracker(1)),o=Eh(),s=pb();function c(){return fb(i,a,t)}var l=Rb(n,c,o,s,function(u,d,f){u.storeContextsAcrossPages&&(Qv(u,i,Bb,2),Qv(u,a,Bb,1)),r.setCompressionStatus(d?1:2);var p=e(u,t,r,c,f,d&&n.createDeflateEncoder?function(e){return n.createDeflateEncoder(u,d,e)}:Ov,o,s);return t.onRumStart(p.lifeCycle,u,p.session,p.viewHistory,d),l=Hb(l,p),p}),u=U(function(e){var t=typeof e==`object`?e:{name:e};t.context&&r.getOrCreateTracker(3).updateCustomerData(t.context),l.startView(t),L_({feature:`start-view`})}),d=t_({init:U(function(e){l.init(e,d),ug(og.UPDATE_VIEW_NAME)&&(d.updateViewName=U(function(e){l.updateViewName(e)}))}),setTrackingConsent:U(function(e){o.update(e),L_({feature:`set-tracking-consent`,tracking_consent:e})}),setViewContext:U(function(e){l.setViewContext(e)}),setViewContextProperty:U(function(e,t){l.setViewContextProperty(e,t)}),setGlobalContext:U(function(e){i.setContext(e),L_({feature:`set-global-context`})}),getGlobalContext:U(function(){return i.getContext()}),setGlobalContextProperty:U(function(e,t){i.setContextProperty(e,t),L_({feature:`set-global-context`})}),removeGlobalContextProperty:U(function(e){return i.removeContextProperty(e)}),clearGlobalContext:U(function(){return i.clearContext()}),getInternalContext:U(function(e){return l.getInternalContext(e)}),getInitConfiguration:U(function(){return __(l.initConfiguration)}),addAction:function(e,t){var n=Ag();mm(function(){l.addAction({name:Rg(e),context:Rg(t),startClocks:Np(),type:`custom`,handlingStack:n}),L_({feature:`add-action`})})},addError:function(e,t){var n=Ag();mm(function(){l.addError({error:e,handlingStack:n,context:Rg(t),startClocks:Np()}),L_({feature:`add-error`})})},addTiming:U(function(e,t){l.addTiming(Rg(e),t)}),setUser:U(function(e){uy(e)&&a.setContext(ly(e)),L_({feature:`set-user`})}),getUser:U(function(){return a.getContext()}),setUserProperty:U(function(e,t){var n,r=ly((n={},n[e]=t,n))[e];a.setContextProperty(e,r),L_({feature:`set-user`})}),removeUserProperty:U(function(e){return a.removeContextProperty(e)}),clearUser:U(function(){return a.clearContext()}),startView:u,stopSession:U(function(){l.stopSession(),L_({feature:`stop-session`})}),addFeatureFlagEvaluation:U(function(e,t){l.addFeatureFlagEvaluation(Rg(e),Rg(t)),L_({feature:`add-feature-flag-evaluation`})}),getSessionReplayLink:U(function(){return t.getSessionReplayLink()}),startSessionReplayRecording:U(function(e){t.start(e),L_({feature:`start-session-replay-recording`,force:e&&e.force})}),stopSessionReplayRecording:U(function(){return t.stop()}),addDurationVital:U(function(e,t){L_({feature:`add-duration-vital`}),l.addDurationVital({name:Rg(e),type:`duration`,startClocks:Dp(t.startTime),duration:t.duration,context:Rg(t&&t.context),description:Rg(t&&t.description)})}),startDurationVital:U(function(e,t){return L_({feature:`start-duration-vital`}),l.startDurationVital(Rg(e),{context:Rg(t&&t.context),description:Rg(t&&t.description)})}),stopDurationVital:U(function(e,t){L_({feature:`stop-duration-vital`}),l.stopDurationVital(typeof e==`string`?Rg(e):e,{context:Rg(t&&t.context),description:Rg(t&&t.description)})})});return d}function Hb(e,t){return H({init:function(e){r_(`DD_RUM`,e)},initConfiguration:e.initConfiguration},t)}function Ub(){var e=Wb();return new W(function(t){if(e){var n=new e(U(function(){return t.notify()}));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return n.disconnect()}}})}function Wb(){var e,t=window;if(t.Zone&&(e=sm(t,`MutationObserver`),t.MutationObserver&&e===t.MutationObserver)){var n=sm(new t.MutationObserver(G),`originalInstance`);e=n&&n.constructor}return e||=t.MutationObserver,e}function Gb(){var e=sy(),t=cy();if(e&&t)return{test_id:e,result_id:t,injected:oy()}}function Kb(e,t,n){var r=__(e),i=n(r);return $p(t).forEach(function(t){var n=t[0],i=t[1],a=qb(r,n),o=h_(a);o===i?Jb(e,n,Rg(a)):i===`object`&&(o===`undefined`||o===`null`)&&Jb(e,n,{})}),i}function qb(e,t){for(var n=e,r=0,i=t.split(`.`);r<i.length;r++){var a=i[r];if(!Xb(n,a))return;n=n[a]}return n}function Jb(e,t,n){for(var r=e,i=t.split(`.`),a=0;a<i.length;a+=1){var o=i[a];if(!Yb(r))return;a===i.length-1?r[o]=n:r=r[o]}}function Yb(e){return h_(e)===`object`}function Xb(e,t){return Yb(e)&&Object.prototype.hasOwnProperty.call(e,t)}var Zb={"view.name":`string`,"view.url":`string`,"view.referrer":`string`},Qb={context:`object`},$b={service:`string`,version:`string`},ex;function tx(e,t,n,r,i,a,o,s,c,l){var u,d;ex=(u={},u.view=H({},Qb,Zb),u.error=H({"error.message":`string`,"error.stack":`string`,"error.resource.url":`string`,"error.fingerprint":`string`},Qb,Zb,$b),u.resource=H({"resource.url":`string`},ug(og.WRITABLE_RESOURCE_GRAPHQL)?{"resource.graphql":`object`}:{},Qb,Zb,$b),u.action=H({"action.target.name":`string`},Qb,Zb,$b),u.long_task=H({},Qb,Zb),u.vital=H({},Qb,Zb),u);var f=(d={},d.error=Av(`error`,e.eventRateLimiterThreshold,l),d.action=Av(`action`,e.eventRateLimiterThreshold,l),d.vital=Av(`vital`,e.eventRateLimiterThreshold,l),d),p=Gb();t.subscribe(11,function(l){var u=l.startTime,d=l.rawRumEvent,m=l.domainContext,h=l.savedCommonContext,g=l.customerContext,_=r.findView(u),v=i.findUrl(u),y=n.findTrackedSession(u);if(y&&_&&v){var b=h||c(),x=a.findActionId(u),S=v_({_dd:{format_version:2,drift:kp(),configuration:{session_sample_rate:yp(e.sessionSampleRate,3),session_replay_sample_rate:yp(e.sessionReplaySampleRate,3)},browser_sdk_version:yv()?`5.29.0`:void 0},application:{id:e.applicationId},date:jp(),service:_.service||e.service,version:_.version||e.version,source:`browser`,session:{id:y.id,type:p?`synthetics`:s.get()?`ci_test`:`user`}
15,view:{id:_.id,name:_.name,url:v.url,referrer:v.referrer},action:rx(d)&&x?{id:x}:void 0,synthetics:p,ci_test:s.get(),display:o.get(),connectivity:b_()},d);S.context=v_(b.context,_.context,g),`has_replay`in S.session||(S.session.has_replay=b.hasReplay),S.type===`view`&&(S.session.sampled_for_replay=y.sessionReplay===1),im(b.user)||(S.usr=b.user),nx(S,e.beforeSend,m,f)&&(im(S.context)&&delete S.context,t.notify(12,S))}})}function nx(e,t,n,r){if(t){var i=Kb(e,ex[e.type],function(e){return t(e,n)});if(i===!1&&e.type!==`view`)return!1;i===!1&&B.warn(`Can't dismiss view events using beforeSend!`)}return!r[e.type]?.isLimitReached()}function rx(e){return[`error`,`resource`,`long_task`].indexOf(e.type)!==-1}function ix(e,t,n,r,i){return{get:function(a){var o=n.findView(a),s=i.findUrl(a),c=t.findTrackedSession(a);if(c&&o&&s){var l=r.findActionId(a);return{application_id:e,session_id:c.id,user_action:l?{id:l}:void 0,view:{id:o.id,name:o.name,referrer:s.referrer,url:s.url}}}}}}var ax=kv,ox=Hm;function sx(e){var t=H_({expireDelay:ox});e.subscribe(1,function(e){t.add(n(e),e.startClocks.relative)}),e.subscribe(5,function(e){var n=e.endClocks;t.closeActive(n.relative)}),e.subscribe(3,function(e){var n=t.find(e.startClocks.relative);n&&e.name&&(n.name=e.name),n&&e.context&&(n.context=e.context)}),e.subscribe(9,function(){t.reset()});function n(e){return{service:e.service,version:e.version,context:e.context,id:e.id,name:e.name,startClocks:e.startClocks}}return{findView:function(e){return t.find(e)},stop:function(){t.stop()}}}var cx=`initial_document`,lx=[[`document`,function(e){return cx===e}],[`xhr`,function(e){return e===`xmlhttprequest`}],[`fetch`,function(e){return e===`fetch`}],[`beacon`,function(e){return e===`beacon`}],[`css`,function(e,t){return/\.css$/i.test(t)}],[`js`,function(e,t){return/\.js$/i.test(t)}],[`image`,function(e,t){return qp([`image`,`img`,`icon`],e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null}],[`font`,function(e,t){return/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null}],[`media`,function(e,t){return qp([`audio`,`video`],e)||/\.(mp3|mp4)$/i.exec(t)!==null}]];function ux(e){var t=e.name;if(!Ah(t))return P_(`Failed to construct URL for "${e.name}"`),`other`;for(var n=jh(t),r=0,i=lx;r<i.length;r++){var a=i[r],o=a[0],s=a[1];if(s(e.initiatorType,n))return o}return`other`}function dx(){for(var e=[...arguments],t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function fx(e){return e.initiatorType===`xmlhttprequest`||e.initiatorType===`fetch`}function px(e){var t=e.duration,n=e.startTime,r=e.responseEnd;return V(t===0&&n<r?Fp(n,r):t)}function mx(e){if(gx(e)){var t=e.startTime,n=e.fetchStart,r=e.redirectStart,i=e.redirectEnd,a=e.domainLookupStart,o=e.domainLookupEnd,s=e.connectStart,c=e.secureConnectionStart,l=e.connectEnd,u=e.requestStart,d=e.responseStart,f=e.responseEnd,p={download:vx(t,d,f),first_byte:vx(t,u,d)};return n<l&&(p.connect=vx(t,s,l),s<=c&&c<=l&&(p.ssl=vx(t,c,l))),n<o&&(p.dns=vx(t,a,o)),t<i&&(p.redirect=vx(t,r,i)),p}}function hx(e){return e.duration>=0}function gx(e){var t=dx(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=!_x(e)||dx(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart);return t&&n}function _x(e){return e.redirectEnd>e.startTime}function vx(e,t,n){if(e<=t&&t<=n)return{duration:V(Fp(t,n)),start:V(Fp(e,t))}}function yx(e){if(e.startTime<e.responseStart){var t=e.encodedBodySize,n=e.decodedBodySize;return{size:n,encoded_body_size:t,decoded_body_size:n,transfer_size:e.transferSize}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function bx(e,t){return t&&!e.isIntakeUrl(t)}var xx=/data:(.+)?(;base64)?,/g,Sx=24e3;function Cx(e){return e.length<=24e3?!1:e.substring(0,5)===`data:`?(e=e.substring(0,Sx),!0):!1}function wx(e){return`${e.match(xx)[0]}[...]`}var Tx=1;function Ex(e,t,n){var r=xb(t,n);Dx(e,t,r),Ox(e,t,r)}function Dx(e,t,n){var r=Pv(t).subscribe(function(r){var i=r;if(bx(t,i.url))switch(i.state){case`start`:n.traceXhr(i,i.xhr),i.requestIndex=kx(),e.notify(6,{requestIndex:i.requestIndex,url:i.url});break;case`complete`:n.clearTracingIfNeeded(i),e.notify(7,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:`xhr`,url:i.url,xhr:i.xhr,isAborted:i.isAborted,handlingStack:i.handlingStack});break}});return{stop:function(){return r.unsubscribe()}}}function Ox(e,t,n){var r=Bv().subscribe(function(r){var i=r;if(bx(t,i.url))switch(i.state){case`start`:n.traceFetch(i),i.requestIndex=kx(),e.notify(6,{requestIndex:i.requestIndex,url:i.url});break;case`resolve`:Ax(i,function(t){n.clearTracingIfNeeded(i),e.notify(7,{duration:t,method:i.method,requestIndex:i.requestIndex,responseType:i.responseType,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:`fetch`,url:i.url,response:i.response,init:i.init,input:i.input,isAborted:i.isAborted,handlingStack:i.handlingStack})});break}});return{stop:function(){return r.unsubscribe()}}}function kx(){var e=Tx;return Tx+=1,e}function Ax(e,t){var n=e.response&&Z_(e.response);
15!n||!n.body?t(Fp(e.startClocks.timeStamp,jp())):ay(n.body,function(){t(Fp(e.startClocks.timeStamp,jp()))},{bytesLimit:1/0,collectStreamBody:!1})}function jx(e){return xp(e)&&e<0?void 0:e}function Mx(e){var t=e.lifeCycle,n=e.isChildEvent,r=e.onChange,i=r===void 0?G:r,a={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=t.subscribe(12,function(e){if(!(e.type===`view`||e.type===`vital`||!n(e)))switch(e.type){case`error`:a.errorCount+=1,i();break;case`action`:a.actionCount+=1,e.action.frustration&&(a.frustrationCount+=e.action.frustration.type.length),i();break;case`long_task`:a.longTaskCount+=1,i();break;case`resource`:e._dd?.discarded||(a.resourceCount+=1,i());break}});return{stop:function(){o.unsubscribe()},eventCounts:a}}function Nx(e,t){var n=Ap(),r=!1,i=a_(e,window,[`click`,`mousedown`,`keydown`,`touchstart`,`pointerdown`],function(t){if(t.cancelable){var n={entryType:`first-input`,processingStart:Mp(),processingEnd:Mp(),startTime:t.timeStamp,duration:0,name:``,cancelable:!1,target:null,toJSON:function(){return{}}};t.type===`pointerdown`?a(e,n):o(n)}},{passive:!0,capture:!0}).stop;return{stop:i};function a(e,t){a_(e,window,[`pointerup`,`pointercancel`],function(e){e.type===`pointerup`&&o(t)},{once:!0})}function o(e){if(!r){r=!0,i();var a=e.processingStart-e.startTime;a>=0&&a<Ap()-n&&t(e)}}}var Px;(function(e){e.EVENT=`event`,e.FIRST_INPUT=`first-input`,e.LARGEST_CONTENTFUL_PAINT=`largest-contentful-paint`,e.LAYOUT_SHIFT=`layout-shift`,e.LONG_TASK=`longtask`,e.LONG_ANIMATION_FRAME=`long-animation-frame`,e.NAVIGATION=`navigation`,e.PAINT=`paint`,e.RESOURCE=`resource`})(Px||={});function Fx(e,t){return new W(function(n){if(window.PerformanceObserver){var r=function(t){var r=Bx(e,t);r.length>0&&n.notify(r)},i,a=!0,o=new PerformanceObserver(U(function(e){a?i=gm(function(){return r(e.getEntries())}):r(e.getEntries())}));try{o.observe(t)}catch{if(qp([Px.RESOURCE,Px.NAVIGATION,Px.LONG_TASK,Px.PAINT],t.type)){t.buffered&&(i=gm(function(){return r(performance.getEntriesByType(t.type))}));try{o.observe({entryTypes:[t.type]})}catch{return}}}a=!1,Lx(e);var s;return!zx(Px.FIRST_INPUT)&&t.type===Px.FIRST_INPUT&&(s=Nx(e,function(e){r([e])}).stop),function(){o.disconnect(),s&&s(),_m(i)}}})}var Ix;function Lx(e){return!Ix&&Rx()&&`addEventListener`in performance&&(Ix=i_(e,performance,`resourcetimingbufferfull`,function(){performance.clearResourceTimings()})),function(){Ix?.stop()}}function Rx(){return window.performance!==void 0&&`getEntries`in performance}function zx(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function Bx(e,t){return t.filter(function(t){return!Vx(e,t)})}function Vx(e,t){return t.entryType===Px.RESOURCE&&(!bx(e,t.name)||!hx(t))}function Hx(e,t,n,r,i){return Ux(Wx(e,t,n),r,i)}function Ux(e,t,n){var r,i=!1,a=gm(U(function(){return l({hadActivity:!1})}),100),o=n===void 0?void 0:gm(U(function(){return l({hadActivity:!0,end:jp()})}),n),s=e.subscribe(function(e){var t=e.isBusy;_m(a),_m(r);var n=jp();t||(r=gm(U(function(){return l({hadActivity:!0,end:n})}),100))}),c=function(){i=!0,_m(a),_m(r),_m(o),s.unsubscribe()};function l(e){i||(c(),t(e))}return{stop:c}}function Wx(e,t,n){return new W(function(r){var i=[],a,o=0;i.push(t.subscribe(c),Fx(n,{type:Px.RESOURCE}).subscribe(function(e){e.some(function(e){return!Gx(n,e.name)})&&c()}),e.subscribe(6,function(e){Gx(n,e.url)||(a===void 0&&(a=e.requestIndex),o+=1,c())}),e.subscribe(7,function(e){Gx(n,e.url)||a===void 0||e.requestIndex<a||(--o,c())}));var s=Kx(c).stop;return function(){s(),i.forEach(function(e){return e.unsubscribe()})};function c(){r.notify({isBusy:o>0})}})}function Gx(e,t){return fy(e.excludedActivityUrls,t)}function Kx(e){return Ng(window,`open`,e)}function qx(e){return window.CSS&&window.CSS.escape?window.CSS.escape(e):e.replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(e,t){return t?e===`\0`?`�`:`${e.slice(0,-1)}\\${e.charCodeAt(e.length-1).toString(16)} `:`\\${e}`})}function Jx(e,t){return e.matches?e.matches(t):e.msMatchesSelector?e.msMatchesSelector(t):!1}function Yx(e){if(e.parentElement)return e.parentElement;for(;e.parentNode;){if(e.parentNode.nodeType===Node.ELEMENT_NODE)return e.parentNode;e=e.parentNode}return null}function Xx(e){if(e.classList)return e.classList;var t=(e.getAttribute(`class`)||``).trim();return t?t.split(/\s+/):[]}var Zx=1,Qx=function(){function e(e){var t=this;this.map=new WeakMap,e&&e.forEach(function(e){return t.map.set(e,Zx)})}return e.prototype.add=function(e){return this.map.set(e,Zx),this},e.prototype.delete=function(e){return this.map.delete(e)},e.prototype.has=function(e){return this.map.has(e)},e}();
15function $x(e){return e.nodeType===Node.TEXT_NODE}function eS(e){return e.nodeType===Node.COMMENT_NODE}function tS(e){return e.nodeType===Node.ELEMENT_NODE}function nS(e){return tS(e)&&!!e.shadowRoot}function rS(e){var t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&tS(t.host)}function iS(e){return e.childNodes.length>0||nS(e)}function aS(e,t){for(var n=e.firstChild;n;)t(n),n=n.nextSibling;nS(e)&&t(e.shadowRoot)}function oS(e){return rS(e)?e.host:e.parentNode}var q={IGNORE:`ignore`,HIDDEN:`hidden`,ALLOW:$h.ALLOW,MASK:$h.MASK,MASK_USER_INPUT:$h.MASK_USER_INPUT},sS=`data-dd-privacy`,cS=`hidden`,lS=`dd-privacy-`,uS=`data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`,dS={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},fS=`x`;function pS(e,t,n){if(n&&n.has(e))return n.get(e);var r=oS(e),i=r?pS(r,t,n):t,a=mS(hS(e),i);return n&&n.set(e,a),a}function mS(e,t){switch(t){case q.HIDDEN:case q.IGNORE:return t}switch(e){case q.ALLOW:case q.MASK:case q.MASK_USER_INPUT:case q.HIDDEN:case q.IGNORE:return e;default:return t}}function hS(e){if(tS(e)){if(e.tagName===`BASE`)return q.ALLOW;if(e.tagName===`INPUT`){var t=e;if(t.type===`password`||t.type===`email`||t.type===`tel`||t.type===`hidden`)return q.MASK;var n=t.getAttribute(`autocomplete`);if(n&&n.indexOf(`cc-`)===0)return q.MASK}if(Jx(e,xS(q.HIDDEN)))return q.HIDDEN;if(Jx(e,xS(q.MASK)))return q.MASK;if(Jx(e,xS(q.MASK_USER_INPUT)))return q.MASK_USER_INPUT;if(Jx(e,xS(q.ALLOW)))return q.ALLOW;if(bS(e))return q.IGNORE}}function gS(e,t){switch(t){case q.MASK:case q.HIDDEN:case q.IGNORE:return!0;case q.MASK_USER_INPUT:return $x(e)?_S(e.parentNode):_S(e);default:return!1}}function _S(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;var t=e;if(t.tagName===`INPUT`)switch(t.type){case`button`:case`color`:case`reset`:case`submit`:return!1}return!!dS[t.tagName]}var vS=function(e){return e.replace(/\S/g,fS)};function yS(e,t,n){var r=e.parentElement?.tagName,i=e.textContent||``;if(!(t&&!i.trim())){var a=n;if(r===`SCRIPT`)i=`***`;else if(a===q.HIDDEN)i=`***`;else if(gS(e,a))if(r===`DATALIST`||r===`SELECT`||r===`OPTGROUP`){if(!i.trim())return}else i=r===`OPTION`?`***`:vS(i);return i}}function bS(e){if(e.nodeName===`SCRIPT`)return!0;if(e.nodeName===`LINK`){var t=i(`rel`);return/preload|prefetch/i.test(t)&&i(`as`)===`script`||t===`shortcut icon`||t===`icon`}if(e.nodeName===`META`){var n=i(`name`),t=i(`rel`),r=i(`property`);return/^msapplication-tile(image|color)$/.test(n)||n===`application-name`||t===`icon`||t===`apple-touch-icon`||t===`shortcut icon`||n===`keywords`||n===`description`||/^(og|twitter|fb):/.test(r)||/^(og|twitter):/.test(n)||n===`pinterest`||n===`robots`||n===`googlebot`||n===`bingbot`||e.hasAttribute(`http-equiv`)||n===`author`||n===`generator`||n===`framework`||n===`publisher`||n===`progid`||/^article:/.test(r)||/^product:/.test(r)||n===`google-site-verification`||n===`yandex-verification`||n===`csrf-token`||n===`p:domain_verify`||n===`verify-v1`||n===`verification`||n===`shopify-checkout-api-token`}function i(t){return(e.getAttribute(t)||``).toLowerCase()}return!1}function xS(e){return`[${sS}="${e}"], .${lS}${e}`}var SS=`data-dd-action-name`;function CS(e,t,n){var r=t.enablePrivacyForActionName,i=t.actionNameAttribute,a=wS(e,`data-dd-action-name`)||i&&wS(e,i);return n===q.MASK?a||`Masked Element`:a||OS(e,i,TS,r)||OS(e,i,ES,r)||``}function wS(e,t){var n;if(LS())n=e.closest(`[${t}]`);else for(var r=e;r;){if(r.hasAttribute(t)){n=r;break}r=Yx(r)}if(n)return AS(kS(n.getAttribute(t).trim()))}var TS=[function(e,t,n){if(FS()){if(`labels`in e&&e.labels&&e.labels.length>0)return MS(e.labels[0],t)}else if(e.id){var r=e.ownerDocument&&Yp(e.ownerDocument.querySelectorAll(`label`),function(t){return t.htmlFor===e.id});return r&&MS(r,t,n)}},function(e){if(e.nodeName===`INPUT`){var t=e,n=t.getAttribute(`type`);if(n===`button`||n===`submit`||n===`reset`)return t.value}},function(e,t,n){if(e.nodeName===`BUTTON`||e.nodeName===`LABEL`||e.getAttribute(`role`)===`button`)return MS(e,t,n)},function(e){return e.getAttribute(`aria-label`)},function(e,t,n){var r=e.getAttribute(`aria-labelledby`);if(r)return r.split(/\s+/).map(function(t){return jS(e,t)}).filter(function(e){return!!e}).map(function(e){return MS(e,t,n)}).join(` `)},function(e){return e.getAttribute(`alt`)},function(e){return e.getAttribute(`name`)},function(e){return e.getAttribute(`title`)},function(e){return e.getAttribute(`placeholder`)},function(e,t){if(`options`in e&&e.options.length>0)return MS(e.options[0],t)}],ES=[function(e,t,n){return MS(e,t,n)}],DS=10;function OS(e,t,n,r){for(var i=e,a=0;a<=DS&&i&&i.nodeName!==`BODY`&&i.nodeName!==`HTML`&&i.nodeName!==`HEAD`;){for(var o=0,s=n;o<s.length;o++){var c=s[o],l=c(i,t,r);if(typeof l==`string`){var u=l.trim();if(u)return AS(kS(u))}}if(i.nodeName===`FORM`)break;i=Yx(i),a+=1}}function kS(e){return e.replace(/\s+/g,` `)}function AS(e){return e.length>100?`${Em(e,100)} [...]`:e}function jS(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}function MS(e,t,n){if(!e.isContentEditable){if(`innerText`in e){var r=e.innerText,i=function(t){for(var n=e.querySelectorAll(t),i=0;i<n.length;i+=1){var a=n[i];if(`innerText`in a){var o=a.innerText;o&&o.trim().length>0&&(r=r.replace(o,``))}}};return NS()||i(`script, style`),i(`[${SS}]`),t&&i(`[${t}]`),n&&i(`${xS(q.HIDDEN)}, ${xS(q.MASK)}`),r}return e.textContent}}function NS(){return!Dm()}var PS;function FS(){return PS===void 0&&(PS=`labels`in HTMLInputElement.prototype),PS}var IS;function LS(){return IS===void 0&&(IS=`closest`in HTMLElement.prototype),IS}var RS=[SS,`data-testid`,`data-test`,`data-qa`,`data-cy`,`data-test-id`,`data-qa-id`,`data-testing`,`data-component`,`data-element`,`data-source-file`],zS=[KS,US],BS=[KS,WS,GS];function VS(e,t){if(eC(e)){for(var n,r=e;
15r&&r.nodeName!==`HTML`;){var i=JS(r,zS,YS,t,n);if(i)return i;n=JS(r,BS,XS,t,n)||ZS(qS(r),n),r=Yx(r)}return n}}function HS(e){return/[0-9]/.test(e)}function US(e){if(e.id&&!HS(e.id))return`#${qx(e.id)}`}function WS(e){if(e.tagName!==`BODY`)for(var t=Xx(e),n=0;n<t.length;n+=1){var r=t[n];if(!HS(r))return`${qx(e.tagName)}.${qx(r)}`}}function GS(e){return qx(e.tagName)}function KS(e,t){if(t){var n=o(t);if(n)return n}for(var r=0,i=RS;r<i.length;r++){var a=i[r],n=o(a);if(n)return n}function o(t){if(e.hasAttribute(t))return`${qx(e.tagName)}[${t}="${qx(e.getAttribute(t))}"]`}}function qS(e){for(var t=Yx(e).firstElementChild,n=1;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return`${qx(e.tagName)}:nth-of-type(${n})`}function JS(e,t,n,r,i){for(var a=0,o=t;a<o.length;a++){var s=o[a],c=s(e,r);if(c&&n(e,c,i))return ZS(c,i)}}function YS(e,t,n){return e.ownerDocument.querySelectorAll(ZS(t,n)).length===1}function XS(e,t,n){var r;if(n===void 0)r=function(e){return Jx(e,t)};else{var i=$S()?ZS(`${t}:scope`,n):ZS(t,n);r=function(e){return e.querySelector(i)!==null}}for(var a=Yx(e).firstElementChild;a;){if(a!==e&&r(a))return!1;a=a.nextElementSibling}return!0}function ZS(e,t){return t?`${e}>${t}`:e}var QS;function $S(){if(QS===void 0)try{document.querySelector(`:scope`),QS=!0}catch{QS=!1}return QS}function eC(e){return`isConnected`in e?e.isConnected:e.ownerDocument.documentElement.contains(e)}var tC=Sp;function nC(e,t){var n=[],r=0,i;a(e);function a(e){e.stopObservable.subscribe(o),n.push(e),_m(i),i=gm(s,tC)}function o(){r===1&&n.every(function(e){return e.isStopped()})&&(r=2,t(n))}function s(){_m(i),r===0&&(r=1,o())}return{tryAppend:function(e){return r===0?n.length>0&&!rC(n[n.length-1].event,e.event)?(s(),!1):(a(e),!0):!1},stop:function(){s()}}}function rC(e,t){return e.target===t.target&&iC(e,t)<=100&&e.timeStamp-t.timeStamp<=tC}function iC(e,t){return Math.sqrt((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2)}function aC(e,t){var n=t.onPointerDown,r=t.onPointerUp,i,a={selection:!1,input:!1,scroll:!1},o,s=[i_(e,window,`pointerdown`,function(e){sC(e)&&(i=oC(),a={selection:!1,input:!1,scroll:!1},o=n(e))},{capture:!0}),i_(e,window,`selectionchange`,function(){(!i||!oC())&&(a.selection=!0)},{capture:!0}),i_(e,window,`scroll`,function(){a.scroll=!0},{capture:!0,passive:!0}),i_(e,window,`pointerup`,function(e){if(sC(e)&&o){var t=a;r(o,e,function(){return t}),o=void 0}},{capture:!0}),i_(e,window,`input`,function(){a.input=!0},{capture:!0})];return{stop:function(){s.forEach(function(e){return e.stop()})}}}function oC(){var e=window.getSelection();return!e||e.isCollapsed}function sC(e){return e.target instanceof Element&&e.isPrimary!==!1}var cC=3;function lC(e,t){if(uC(e))return t.addFrustration(`rage_click`),e.some(fC)&&t.addFrustration(`dead_click`),t.hasError&&t.addFrustration(`error_click`),{isRage:!0};var n=e.some(function(e){return e.getUserActivity().selection});return e.forEach(function(e){e.hasError&&e.addFrustration(`error_click`),fC(e)&&!n&&e.addFrustration(`dead_click`)}),{isRage:!1}}function uC(e){if(e.some(function(e){return e.getUserActivity().selection||e.getUserActivity().scroll}))return!1;for(var t=0;t<e.length-(cC-1);t+=1)if(e[t+cC-1].event.timeStamp-e[t].event.timeStamp<=1e3)return!0;return!1}var dC=`input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *`;function fC(e){return e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll?!1:!Jx(e.event.target,dC)}var pC=10*Sp,mC=new Map;function hC(e){var t=mC.get(e);return mC.delete(e),t}function gC(e,t){mC.set(e,t),mC.forEach(function(e,t){Fp(t,Mp())>pC&&mC.delete(t)})}var _C=5*Cp;function vC(e,t,n){var r=H_({expireDelay:_C}),i=new W,a;e.subscribe(9,function(){r.reset()}),e.subscribe(4,c);var o=aC(n,{onPointerDown:function(r){return yC(n,e,t,r)},onPointerUp:function(a,o,c){var l=a.clickActionBase,u=a.hadActivityOnPointerDown;bC(n,e,t,r,i,s,l,o,c,u)}}).stop;return{stop:function(){c(),i.notify(),o()},actionContexts:{findActionId:function(e){return r.findAll(e)}}};function s(e){if(!a||!a.tryAppend(e)){var t=e.clone();a=nC(e,function(e){CC(e,t)})}}function c(){a&&a.stop()}}
15function yC(e,t,n,r){var i=e.enablePrivacyForActionName?pS(r.target,e.defaultPrivacyLevel):q.ALLOW;if(i!==q.HIDDEN){var a=xC(r,i,e),o=!1;return Hx(t,n,e,function(e){o=e.hadActivity},100),{clickActionBase:a,hadActivityOnPointerDown:function(){return o}}}}function bC(e,t,n,r,i,a,o,s,c,l){var u=SC(t,r,c,o,s);a(u);var d=o?.target?.selector;d&&gC(s.timeStamp,d);var f=Hx(t,n,e,function(e){e.hadActivity&&e.end<u.startClocks.timeStamp?u.discard():e.hadActivity?u.stop(e.end):l()?u.stop(u.startClocks.timeStamp):u.stop()},pC).stop,p=t.subscribe(4,function(e){var t=e.endClocks;u.stop(t.timeStamp)}),m=i.subscribe(function(){u.stop()});u.stopObservable.subscribe(function(){p.unsubscribe(),f(),m.unsubscribe()})}function xC(e,t,n){var r=e.target.getBoundingClientRect(),i=VS(e.target,n.actionNameAttribute);return i&&gC(e.timeStamp,i),{type:`click`,target:{width:Math.round(r.width),height:Math.round(r.height),selector:i},position:{x:Math.round(e.clientX-r.left),y:Math.round(e.clientY-r.top)},name:CS(e.target,n,t)}}function SC(e,t,n,r,i){var a=Sm(),o=Np(),s=t.add(a,o.relative),c=Mx({lifeCycle:e,isChildEvent:function(e){return e.action!==void 0&&(Array.isArray(e.action.id)?qp(e.action.id,a):e.action.id===a)}}),l=0,u,d=[],f=new W;function p(e){l===0&&(u=e,l=1,u?s.close(Lp(u)):s.remove(),c.stop(),f.notify())}return{event:i,stop:p,stopObservable:f,get hasError(){return c.eventCounts.errorCount>0},get hasPageActivity(){return u!==void 0},getUserActivity:n,addFrustration:function(e){d.push(e)},startClocks:o,isStopped:function(){return l===1||l===2},clone:function(){return SC(e,t,n,r,i)},validate:function(t){if(p(),l===1){var n=c.eventCounts,s=n.resourceCount,f=n.errorCount,m=n.longTaskCount,h=H({type:`click`,duration:u&&Fp(o.timeStamp,u),startClocks:o,id:a,frustrationTypes:d,counts:{resourceCount:s,errorCount:f,longTaskCount:m},events:t??[i],event:i},r);e.notify(0,h),l=2}},discard:function(){p(),l=2}}}function CC(e,t){lC(e,t).isRage?(e.forEach(function(e){return e.discard()}),t.stop(jp()),t.validate(e.map(function(e){return e.event}))):(t.discard(),e.forEach(function(e){return e.validate()}))}function wC(e,t,n,r){e.subscribe(0,function(t){return e.notify(11,TC(t,r))});var i={findActionId:G};return n.trackUserInteractions&&(i=vC(e,t,n).actionContexts),{addAction:function(t,n){e.notify(11,H({savedCommonContext:n},TC(t,r)))},actionContexts:i}}function TC(e,t){var n=EC(e)?{action:{id:e.id,loading_time:jx(V(e.duration)),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position}}}:void 0,r=EC(e)?void 0:e.context,i=v_({action:{id:Sm(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:`action`,view:{in_foreground:t.wasInPageStateAt(`active`,e.startClocks.relative)}},n),a=EC(e)?{events:e.events}:{};return!EC(e)&&e.handlingStack&&(a.handlingStack=e.handlingStack),{customerContext:r,rawRumEvent:i,startTime:e.startClocks.relative,domainContext:a}}function EC(e){return e.type!==`custom`}function DC(e){var t=Gv([up.error]).subscribe(function(t){return e.notify(t.error)});return{stop:function(){t.unsubscribe()}}}function OC(e,t){var n=s_(e,[o_.cspViolation,o_.intervention]).subscribe(function(e){return t.notify(e)});return{stop:function(){n.unsubscribe()}}}function kC(e,t,n,r){var i=new W;return DC(i),Qg(i),OC(t,i),i.subscribe(function(t){return e.notify(13,{error:t})}),AC(e,n,r)}function AC(e,t,n){return e.subscribe(13,function(r){var i=r.error,a=r.customerContext,o=r.savedCommonContext;e.notify(11,H({customerContext:a,savedCommonContext:o},jC(i,t,n)))}),{addError:function(t,n){var r=t.error,i=t.handlingStack,a=t.startClocks,o=t.context,s=Gg({stackTrace:r instanceof Error?pg(r):void 0,originalError:r,handlingStack:i,startClocks:a,nonErrorPrefix:`Provided`,source:Zg.CUSTOM,handling:`handled`});e.notify(13,{customerContext:o,savedCommonContext:n,error:s})}}}function jC(e,t,n){var r={date:e.startClocks.timeStamp,error:{id:Sm(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,type:e.type,handling:e.handling,causes:e.causes,source_type:`browser`,fingerprint:e.fingerprint,csp:e.csp},type:`error`,view:{in_foreground:t.wasInPageStateAt(`active`,e.startClocks.relative)}},i=n.findFeatureFlagEvaluations(e.startClocks.relative);i&&!im(i)&&(r.feature_flags=i);var a={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:r,startTime:e.startClocks.relative,domainContext:a}}function MC(e,t){var n=Fx(t,{type:Px.LONG_TASK,buffered:!0}).subscribe(function(n){for(var r=0,i=n;r<i.length;r++){var a=i[r];if(a.entryType!==Px.LONG_TASK||!t.trackLongTasks)break;var o=Ep(a.startTime),s={date:o.timeStamp,long_task:{id:Sm(),entry_type:`long-task`,duration:V(a.duration)},type:`long_task`,_dd:{discarded:!1}};e.notify(11,{rawRumEvent:s,startTime:o.relative,domainContext:{performanceEntry:a}})}});return{stop:function(){n.unsubscribe()}}}var NC=new Qx;function PC(e){if(!(!performance||!(`getEntriesByName`in performance))){var t=performance.getEntriesByName(e.url,`resource`);if(!(!t.length||!(`toJSON`in t[0]))){var n=t.filter(function(e){return!NC.has(e)}).filter(function(e){return hx(e)&&gx(e)}).filter(function(t){return IC(t,e.startClocks.relative,FC({startTime:e.startClocks.relative,duration:e.duration}))});if(n.length===1)return NC.add(n[0]),n[0].toJSON()}}}function FC(e){return Ip(e.startTime,e.duration)}function IC(e,t,n){var r=1;return e.startTime>=t-r&&FC(e)<=Ip(n,r)}var LC=2*Cp;function RC(e){var t=zC(e)||BC(e);if(!(!t||t.traceTime<=Ap()-LC))return t.traceId}function zC(e){var t=e.querySelector(`meta[name=dd-trace-id]`),n=e.querySelector(`meta[name=dd-trace-time]`);return VC(t&&t.content,n&&n.content)}function BC(e){var t=HC(e);if(t)return VC(wm(t,`trace-id`),wm(t,`trace-time`))}function VC(e,t){var n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function HC(e){for(var t=0;t<e.childNodes.length;t+=1){var n=UC(e.childNodes[t]);if(n)return n}if(e.body)for(var t=e.body.childNodes.length-1;t>=0;--t){var r=e.body.childNodes[t],n=UC(r);if(n)return n;if(!$x(r))break}}function UC(e){if(e&&eS(e)){var t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function WC(){if(zx(Px.NAVIGATION)){var e=performance.getEntriesByType(Px.NAVIGATION)[0];if(e)return e}var t=GC(),n=H({entryType:Px.NAVIGATION,initiatorType:`navigation`,name:window.location.href,startTime:0,duration:t.responseEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,toJSON:function(){return H({},n,{toJSON:void 0})}},t);return n}function GC(){var e={},t=performance.timing;for(var n in t)if(xp(t[n])){var r=n,i=t[r];e[r]=i===0?0:Lp(i)}return e}function KC(e,t){jv(e,`interactive`,function(){var e=H(WC().toJSON(),{entryType:Px.RESOURCE,initiatorType:cx,traceId:RC(document),toJSON:function(){return H({},e,{toJSON:void 0})}});t(e)})}function qC(e,t,n,r){r===void 0&&(r=KC),e.subscribe(7,function(r){var i=JC(r,t,n);i&&e.notify(11,i)});var i=Fx(t,{type:Px.RESOURCE,buffered:!0}).subscribe(function(n){for(var r=0,i=n;r<i.length;r++){var a=i[r];if(!fx(a)){var o=YC(a,t);o&&e.notify(11,o)}}});return r(t,function(n){var r=YC(n,t);r&&e.notify(11,r)}),{stop:function(){i.unsubscribe()}}}function JC(e,t,n){var r=PC(e),i=r?Ep(r.startTime):e.startClocks,a=ZC(e,t);if(!(!t.trackResources&&!a)){var o=e.type===`xhr`?`xhr`:`fetch`,s=r?XC(r):void 0,c=ew(n,i,e.duration),l=v_({date:i.timeStamp,resource:{id:Sm(),type:o,duration:c,method:e.method,status_code:e.status,url:Cx(e.url)?wx(e.url):e.url},type:`resource`,_dd:{discarded:!t.trackResources}},a,s);return{startTime:i.relative,rawRumEvent:l,domainContext:{performanceEntry:r,xhr:e.xhr,response:e.response,requestInput:e.input,requestInit:e.init,error:e.error,isAborted:e.isAborted,handlingStack:e.handlingStack}}}}function YC(e,t){var n=Ep(e.startTime),r=QC(e,t);if(!(!t.trackResources&&!r)){var i=ux(e),a=XC(e),o=v_({date:n.timeStamp,resource:{id:Sm(),type:i,url:e.name,status_code:tw(e.responseStatus)},type:`resource`,_dd:{discarded:!t.trackResources}},r,a);return{startTime:n.relative,rawRumEvent:o,domainContext:{performanceEntry:e}}}}function XC(e){var t=e.renderBlockingStatus;return{resource:H({duration:px(e),render_blocking_status:t},yx(e),mx(e))}}function ZC(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toDecimalString(),trace_id:e.traceId.toDecimalString(),rule_psr:$C(t)}}}function QC(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:Eb().toDecimalString(),rule_psr:$C(t)}}}function $C(e){return xp(e.traceSampleRate)?e.traceSampleRate/100:void 0}
15function ew(e,t,n){return e.wasInPageStateDuringPeriod(`frozen`,t.relative,n)?void 0:V(n)}function tw(e){return e===0?void 0:e}function nw(e,t,n){var r=Mx({lifeCycle:e,isChildEvent:function(e){return e.view.id===t},onChange:n});return{stop:r.stop,eventCounts:r.eventCounts}}var rw=10*Cp;function iw(e,t,n){return{stop:Fx(e,{type:Px.PAINT,buffered:!0}).subscribe(function(e){var r=Yp(e,function(e){return e.name===`first-contentful-paint`&&e.startTime<t.timeStamp&&e.startTime<rw});r&&n(r.startTime)}).unsubscribe}}function aw(e,t,n){var r=Fx(e,{type:Px.FIRST_INPUT,buffered:!0}).subscribe(function(r){var i=Yp(r,function(e){return e.startTime<t.timeStamp});if(i){var a=Fp(i.startTime,i.processingStart),o=void 0;i.target&&tS(i.target)&&(o=VS(i.target,e.actionNameAttribute)),n({delay:a>=0?a:0,time:i.startTime,targetSelector:o})}});return{stop:function(){r.unsubscribe()}}}function ow(e,t,n){return n===void 0&&(n=WC),lw(e,function(){var e=n();cw(e)||t(sw(e))})}function sw(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:e.responseStart>=0&&e.responseStart<=Mp()?e.responseStart:void 0}}function cw(e){return e.loadEventEnd<=0}function lw(e,t){var n,r=jv(e,`complete`,function(){n=gm(function(){return t()})}).stop;return{stop:function(){r(),_m(n)}}}var uw=10*Cp;function dw(e,t,n,r){var i=1/0,a=a_(e,n,[`pointerdown`,`keydown`],function(e){i=e.timeStamp},{capture:!0,once:!0}).stop,o=0,s=Fx(e,{type:Px.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(function(n){var a=Xp(n,function(e){return e.entryType===Px.LARGEST_CONTENTFUL_PAINT&&e.startTime<i&&e.startTime<t.timeStamp&&e.startTime<uw&&e.size>o});if(a){var s=void 0;a.element&&(s=VS(a.element,e.actionNameAttribute)),r({value:a.startTime,targetSelector:s}),o=a.size}});return{stop:function(){a(),s.unsubscribe()}}}function fw(e,t){t===void 0&&(t=window);var n,r;return document.visibilityState===`hidden`?n=0:(n=1/0,r=a_(e,t,[`pagehide`,`visibilitychange`],function(e){(e.type===`pagehide`||document.visibilityState===`hidden`)&&(n=e.timeStamp,r())},{capture:!0}).stop),{get timeStamp(){return n},stop:function(){r?.()}}}function pw(e,t,n){var r={},i=ow(e,function(e){t(e.loadEvent),r.navigationTimings=e,n()}).stop,a=fw(e),o=iw(e,a,function(e){r.firstContentfulPaint=e,n()}).stop,s=dw(e,a,window,function(e){r.largestContentfulPaint=e,n()}).stop,c=aw(e,a,function(e){r.firstInput=e,n()}).stop;function l(){i(),o(),s(),c(),a.stop()}return{stop:l,initialViewMetrics:r}}
15function mw(e,t,n){if(!yw())return{stop:G};var r=0,i,a;n({value:0});var o=vw(),s=Fx(e,{type:Px.LAYOUT_SHIFT,buffered:!0}).subscribe(function(s){for(var c=0,l=s;c<l.length;c++){var u=l[c];if(!(u.hadRecentInput||u.startTime<t)){var d=o.update(u),f=d.cumulatedValue;if(d.isMaxValue){var p=hw(u.sources);i=p?new WeakRef(p):void 0,a=Fp(t,u.startTime)}if(f>r){r=f;var p=i?.deref();n({value:yp(r,4),targetSelector:p&&VS(p,e.actionNameAttribute),time:a})}}}});return{stop:function(){s.unsubscribe()}}}function hw(e){if(e)return Yp(e,function(e){return!!e.node&&tS(e.node)})?.node}var gw=5*Sp,_w=Sp;function vw(){var e=0,t,n,r=0;return{update:function(i){var a=t===void 0||i.startTime-n>=_w||i.startTime-t>=gw,o;return a?(t=n=i.startTime,r=e=i.value,o=!0):(e+=i.value,n=i.startTime,o=i.value>r,o&&(r=i.value)),{cumulatedValue:e,isMaxValue:o}}}}function yw(){return zx(Px.LAYOUT_SHIFT)&&`WeakRef`in window}var bw,xw=0,Sw=1/0,Cw=0;function ww(){`interactionCount`in performance||bw||(bw=new window.PerformanceObserver(U(function(e){e.getEntries().forEach(function(e){var t=e;t.interactionId&&(Sw=Math.min(Sw,t.interactionId),Cw=Math.max(Cw,t.interactionId),xw=(Cw-Sw)/7+1)})})),bw.observe({type:`event`,buffered:!0,durationThreshold:0}))}var Tw=function(){return bw?xw:window.performance.interactionCount||0},Ew=10,Dw=1*Cp;function Ow(e,t,n){if(!jw())return{getInteractionToNextPaint:function(){},setViewEnd:G,stop:G};var r=Aw(n),i=r.getViewInteractionCount,a=r.stopViewInteractionCount,o=1/0,s=kw(i),c=-1,l,u;function d(n){for(var r=0,i=n;r<i.length;r++){var a=i[r];a.interactionId&&a.startTime>=t&&a.startTime<=o&&s.process(a)}var d=s.estimateP98Interaction();d&&d.duration!==c&&(c=d.duration,u=Fp(t,d.startTime),l=hC(d.startTime),!l&&d.target&&tS(d.target)&&(l=VS(d.target,e.actionNameAttribute)))}var f=Fx(e,{type:Px.FIRST_INPUT,buffered:!0}).subscribe(d),p=Fx(e,{type:Px.EVENT,durationThreshold:40,buffered:!0}).subscribe(d);return{getInteractionToNextPaint:function(){if(c>=0)return{value:Math.min(c,Dw),targetSelector:l,time:u};if(i())return{value:0}}
15,setViewEnd:function(e){o=e,a()},stop:function(){p.unsubscribe(),f.unsubscribe()}}}function kw(e){var t=[];function n(){t.sort(function(e,t){return t.duration-e.duration}).splice(Ew)}return{process:function(e){var r=t.findIndex(function(t){return e.interactionId===t.interactionId}),i=t[t.length-1];r===-1?(t.length<Ew||e.duration>i.duration)&&(t.push(e),n()):e.duration>t[r].duration&&(t[r]=e,n())},estimateP98Interaction:function(){return t[Math.min(t.length-1,Math.floor(e()/50))]}}}function Aw(e){ww();var t=e===`initial_load`?0:Tw(),n={stopped:!1};function r(){return Tw()-t}return{getViewInteractionCount:function(){return n.stopped?n.interactionCount:r()},stopViewInteractionCount:function(){n={stopped:!0,interactionCount:r()}}}}function jw(){return zx(Px.EVENT)&&window.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype}function Mw(e,t,n,r,i,a){var o=r===`initial_load`,s=!0,c=[],l=fw(n);function u(){if(!s&&!o&&c.length>0){var e=Math.max.apply(Math,c);e<l.timeStamp&&a(e)}}var d=Hx(e,t,n,function(e){s&&(s=!1,e.hadActivity&&c.push(Fp(i.timeStamp,e.end)),u())}).stop;return{stop:function(){d(),l.stop()},setLoadEvent:function(e){o&&(o=!1,c.push(e),u())}}}function Nw(){var e,t=window.visualViewport;return e=t?t.pageLeft-t.offsetLeft:window.scrollX===void 0?window.pageXOffset||0:window.scrollX,Math.round(e)}function Pw(){var e,t=window.visualViewport;return e=t?t.pageTop-t.offsetTop:window.scrollY===void 0?window.pageYOffset||0:window.scrollY,Math.round(e)}var Fw;function Iw(e){return Fw||=Lw(e),Fw}function Lw(e){return new W(function(t){var n=xm(function(){t.notify(Rw())},200).throttled;return i_(e,window,`resize`,n,{capture:!0,passive:!0}).stop})}function Rw(){var e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}var zw=Sp;function Bw(e,t,n,r){r===void 0&&(r=Hw(e));var i=0,a=0,o=0,s=r.subscribe(function(e){var r=e.scrollDepth,s=e.scrollTop,c=e.scrollHeight,l=!1;if(r>i&&(i=r,l=!0),c>a){a=c;var u=Mp();o=Fp(t.relative,u),l=!0}l&&n({maxDepth:Math.min(i,a),maxDepthScrollTop:s,maxScrollHeight:a,maxScrollHeightTime:o})});return{stop:function(){return s.unsubscribe()}}}function Vw(){var e=Pw(),t=Rw().height;return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(t+e),scrollTop:e}}function Hw(e,t){return t===void 0&&(t=zw),new W(function(n){function r(){n.notify(Vw())}if(window.ResizeObserver){var i=xm(r,t,{leading:!1,trailing:!0}),a=document.scrollingElement||document.documentElement,o=new ResizeObserver(U(i.throttled));o.observe(a);var s=i_(e,window,`scroll`,i.throttled,{passive:!0});return function(){i.cancel(),o.unobserve(a),s.stop()}}})}function Uw(e,t,n,r,i,a){var o={},s=Mw(e,t,n,i,a,function(e){o.loadingTime=e,r()}),c=s.stop,l=s.setLoadEvent,u=Bw(n,a,function(e){o.scroll=e}).stop,d=mw(n,a.relative,function(e){o.cumulativeLayoutShift=e,r()}).stop,f=Ow(n,a.relative,i),p=f.stop,m=f.getInteractionToNextPaint;return{stop:function(){c(),d(),u()},stopINPTracking:p,setLoadEvent:l,setViewEnd:f.setViewEnd,getCommonViewMetrics:function(){return o.interactionToNextPaint=m(),o}}}var Ww=3e3,Gw=5*Cp,Kw=5*Cp;function qw(e,t,n,r,i,a,o){var s=new Set,c=u(`initial_load`,Pp(),o);d();var l;a&&(l=f(i));function u(i,a,o){var c=Jw(t,n,r,e,i,a,o);return s.add(c),c.stopObservable.subscribe(function(){s.delete(c)}),c}function d(){t.subscribe(9,function(){c=u(`route_change`,void 0,{name:c.name,service:c.service,version:c.version,context:c.contextManager.getContext()})}),t.subscribe(8,function(){c.end({sessionIsActive:!1})}),t.subscribe(10,function(e){e.reason===xv.UNLOADING&&c.end()})}function f(e){return e.subscribe(function(e){var t=e.oldLocation,n=e.newLocation;Xw(t,n)&&(c.end(),c=u(`route_change`))})}return{addTiming:function(e,t){t===void 0&&(t=jp()),c.addTiming(e,t)},startView:function(e,t){c.end({endClocks:t}),c=u(`route_change`,t,e)},setViewContext:function(e){c.contextManager.setContext(e)},setViewContextProperty:function(e,t){c.contextManager.setContextProperty(e,t)},updateViewName:function(e){c.updateViewName(e)}
15,stop:function(){l&&l.unsubscribe(),c.end(),s.forEach(function(e){return e.stop()})}}}function Jw(e,t,n,r,i,a,o){a===void 0&&(a=Np());var s=Sm(),c=new W,l={},u=0,d,f=nm(r),p=Yv(),m=!0,h,g,_,v;o&&(h=o.name,g=o.service||void 0,_=o.version||void 0,o.context&&(v=o.context,p.setContext(v)));var y={id:s,name:h,startClocks:a,service:g,version:_,context:v};e.notify(1,y),e.notify(2,y);var b=xm(ne,Ww,{leading:!1}),x=b.throttled,S=b.cancel,C=Uw(e,t,n,x,i,a),w=C.setLoadEvent,T=C.setViewEnd,E=C.stop,D=C.stopINPTracking,O=C.getCommonViewMetrics,k=i===`initial_load`?pw(n,w,x):{stop:G,initialViewMetrics:{}},A=k.stop,j=k.initialViewMetrics,M=nw(e,s,x),ee=M.stop,te=M.eventCounts,N=vm(ne,Gw);ne(),p.changeObservable.subscribe(ne);function ne(){S(),u+=1;var t=d===void 0?jp():d.timeStamp;e.notify(3,{customTimings:l,documentVersion:u,id:s,name:h,service:g,version:_,context:p.getContext(),loadingType:i,location:f,startClocks:a,commonViewMetrics:O(),initialViewMetrics:j,duration:Fp(a.timeStamp,t),isActive:d===void 0,sessionIsActive:m,eventCounts:te})}return{get name(){return h},service:g,version:_,contextManager:p,stopObservable:c,end:function(t){var n=this;t===void 0&&(t={}),!d&&(d=t.endClocks??Np(),m=t.sessionIsActive??!0,e.notify(4,{endClocks:d}),e.notify(5,{endClocks:d}),ym(N),T(d.relative),E(),ne(),gm(function(){n.stop()},Kw))},stop:function(){A(),ee(),D(),c.notify()},addTiming:function(e,t){if(!d){var n=zp(t)?t:Fp(a.timeStamp,t);l[Yw(e)]=n,x()}},updateViewName:function(e){ug(og.UPDATE_VIEW_NAME)&&(h=e,ne())}}}function Yw(e){var t=e.replace(/[^a-zA-Z0-9-_.@$]/g,`_`);return t!==e&&B.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function Xw(e,t){return e.pathname!==t.pathname||!Zw(t.hash)&&Qw(t.hash)!==Qw(e.hash)}function Zw(e){var t=e.substring(1);return t!==``&&!!document.getElementById(t)}function Qw(e){var t=e.indexOf(`?`);return t<0?e:e.slice(0,t)}function $w(e,t,n,r,i,a,o,s,c){return e.subscribe(3,function(n){return e.notify(11,eT(n,t,a,s,o))}),qw(n,e,r,t,i,!t.trackViewsManually,c)}function eT(e,t,n,r,i){var a=r.getReplayStats(e.id),o=n.findFeatureFlagEvaluations(e.startClocks.relative),s=i.findAll(e.startClocks.relative,e.duration),c={_dd:{document_version:e.documentVersion,replay_stats:a,page_states:s,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:`view`,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:e.commonViewMetrics.cumulativeLayoutShift?.value,cumulative_layout_shift_time:V(e.commonViewMetrics.cumulativeLayoutShift?.time),cumulative_layout_shift_target_selector:e.commonViewMetrics.cumulativeLayoutShift?.targetSelector,first_byte:V(e.initialViewMetrics.navigationTimings?.firstByte),dom_complete:V(e.initialViewMetrics.navigationTimings?.domComplete),dom_content_loaded:V(e.initialViewMetrics.navigationTimings?.domContentLoaded),dom_interactive:V(e.initialViewMetrics.navigationTimings?.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:V(e.initialViewMetrics.firstContentfulPaint),first_input_delay:V(e.initialViewMetrics.firstInput?.delay),first_input_time:V(e.initialViewMetrics.firstInput?.time),first_input_target_selector:e.initialViewMetrics.firstInput?.targetSelector,interaction_to_next_paint:V(e.commonViewMetrics.interactionToNextPaint?.value),interaction_to_next_paint_time:V(e.commonViewMetrics.interactionToNextPaint?.time),interaction_to_next_paint_target_selector:e.commonViewMetrics.interactionToNextPaint?.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:V(e.initialViewMetrics.largestContentfulPaint?.value),largest_contentful_paint_target_selector:e.initialViewMetrics.largestContentfulPaint?.targetSelector,load_event:V(e.initialViewMetrics.navigationTimings?.loadEvent),loading_time:jx(V(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},resource:{count:e.eventCounts.resourceCount},time_spent:V(e.duration)},feature_flags:o&&!im(o)?o:void 0,display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:V(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,session:{has_replay:a?!0:void 0,is_active:e.sessionIsActive?void 0:!1},privacy:{replay_level:t.defaultPrivacyLevel}};return im(e.customTimings)||(c.view.custom_timings=am(e.customTimings,V)),{rawRumEvent:c,startTime:e.startClocks.relative,domainContext:{location:e.location}}}function tT(e,t,n){var r=K_(e,`rum`,function(t){return rT(e,t)},n);return r.expireObservable.subscribe(function(){t.notify(8)}),r.renewObservable.subscribe(function(){t.notify(9)}
15),r.sessionStateUpdateObservable.subscribe(function(e){var t=e.previousState,n=e.newState;if(!t.forcedReplay&&n.forcedReplay){var i=r.findSession();i&&(i.isReplayForced=!0)}}),{findTrackedSession:function(e){var t=r.findSession(e);if(!(!t||!aT(t.trackingType)))return{id:t.id,sessionReplay:t.trackingType===`1`?1:t.isReplayForced?2:0}},expire:r.expire,expireObservable:r.expireObservable,setForcedReplay:function(){return r.updateSessionState({forcedReplay:`1`})}}}function nT(){var e={id:`00000000-aaaa-0000-aaaa-000000000000`,sessionReplay:+!!vv(`records`)};return{findTrackedSession:function(){return e},expire:G,expireObservable:new W,setForcedReplay:G}}function rT(e,t){var n=iT(t)?t:vp(e.sessionSampleRate)?vp(e.sessionReplaySampleRate)?`1`:`2`:`0`;return{trackingType:n,isTracked:aT(n)}}function iT(e){return e===`0`||e===`1`||e===`2`}function aT(e){return e===`2`||e===`1`}function oT(e,t,n,r,i,a,o){var s=e.replica,c=Dv(e,{endpoint:e.rumEndpointBuilder,encoder:o(2)},s&&{endpoint:s.rumEndpointBuilder,transformMessage:function(e){return v_(e,{application:{id:s.applicationId}})},encoder:o(3)},r,i,a);return t.subscribe(12,function(e){e.type===`view`?c.upsert(e,e.view.id):c.add(e)}),n.subscribe(function(t){return c.add(t,N_(e))}),c}function sT(e){var t=_v();e.subscribe(12,function(e){t.send(`rum`,e)})}var cT=Hm;function lT(e,t,n){var r=H_({expireDelay:cT}),i;e.subscribe(1,function(e){var t=e.startClocks,a=n.href;r.add(o({url:a,referrer:i||document.referrer}),t.relative),i=a}),e.subscribe(5,function(e){var t=e.endClocks;r.closeActive(t.relative)});var a=t.subscribe(function(e){var t=e.newLocation,n=r.find();if(n){var i=Mp();r.closeActive(i),r.add(o({url:t.href,referrer:n.referrer}),i)}});function o(e){return{url:e.url,referrer:e.referrer}}return{findUrl:function(e){return r.find(e)},stop:function(){a.unsubscribe(),r.stop()}}}function uT(e,t){var n=nm(t);return new W(function(r){var i=dT(e,o).stop,a=fT(e,o).stop;function o(){if(n.href!==t.href){var e=nm(t);r.notify({newLocation:e,oldLocation:n}),n=e}}return function(){i(),a()}})}function dT(e,t){var n=Ng(pT(`pushState`),`pushState`,function(e){var n=e.onPostCall;n(t)}).stop,r=Ng(pT(`replaceState`),`replaceState`,function(e){var n=e.onPostCall;n(t)}).stop,i=i_(e,window,`popstate`,t).stop;return{stop:function(){n(),r(),i()}}}function fT(e,t){return i_(e,window,`hashchange`,t)}function pT(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}var mT=Hm;function hT(e,t){var n=H_({expireDelay:mT});return e.subscribe(1,function(e){var r=e.startClocks;n.add({},r.relative),t.resetCustomerData()}),e.subscribe(5,function(e){var t=e.endClocks;n.closeActive(t.relative)}),{findFeatureFlagEvaluations:function(e){return n.find(e)},addFeatureFlagEvaluation:function(e,r){var i=n.find();i&&(i[e]=r,t.updateCustomerData(i))},stop:function(){return t.stop()}}}var gT=10*Sp,_T,vT,yT;function bT(e,t,n,r,i){t.enabled&&vp(e.customerDataTelemetrySampleRate)&&(TT(),ET(),n.subscribe(12,function(e){yT=!0,CT(vT.globalContextBytes,r.getOrCreateTracker(2).getBytesCount()),CT(vT.userContextBytes,r.getOrCreateTracker(1).getBytesCount()),CT(vT.featureFlagBytes,qp([`view`,`error`],e.type)?r.getOrCreateTracker(0).getBytesCount():0)}),i.subscribe(function(e){var t=e.bytesCount,n=e.messagesCount;yT&&(_T.batchCount+=1,CT(_T.batchBytesCount,t),CT(_T.batchMessagesCount,n),wT(_T.globalContextBytes,vT.globalContextBytes),wT(_T.userContextBytes,vT.userContextBytes),wT(_T.featureFlagBytes,vT.featureFlagBytes),ET())}),vm(xT,gT))}function xT(){_T.batchCount!==0&&(P_(`Customer data measures`,_T),TT())}function ST(){return{min:1/0,max:0,sum:0}}function CT(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function wT(e,t){e.sum+=t.sum,e.min=Math.min(e.min,t.min),e.max=Math.max(e.max,t.max)}function TT(){_T={batchCount:0,batchBytesCount:ST(),batchMessagesCount:ST(),globalContextBytes:ST(),userContextBytes:ST(),featureFlagBytes:ST()}}function ET(){yT=!1,vT={globalContextBytes:ST(),userContextBytes:ST(),featureFlagBytes:ST()}}var DT=4e3,OT=Hm;function kT(e,t){t===void 0&&(t=500);var n=H_({expireDelay:OT,maxEntries:DT}),r;a(jT(),Mp());var i=a_(e,window,[`pageshow`,`focus`,`blur`,`visibilitychange`,`resume`,`freeze`,`pagehide`],function(e){a(AT(e),e.timeStamp)},{capture:!0}).stop;function a(e,t){t===void 0&&(t=Mp()),e!==r&&(r=e,n.closeActive(t),n.add({state:r,startTime:t},t))}var o={findAll:function(e,r){var i=n.findAll(e,r);if(i.length!==0){for(var a=[],o=Math.max(0,i.length-t),s=i.length-1;s>=o;s--){var c=i[s],l=Fp(e,c.startTime);a.push({state:c.state,start:V(l)})}return a}},wasInPageStateAt:function(e,t){return o.wasInPageStateDuringPeriod(e,t,0)},wasInPageStateDuringPeriod:function(e,t,r){return n.findAll(t,r).some(function(t){return t.state===e})},addPageState:a,stop:function(){i(),n.stop()}};return o}function AT(e){return e.type===`freeze`?`frozen`:e.type===`pagehide`?e.persisted?`frozen`:`terminated`:jT()}function jT(){return document.visibilityState===`hidden`?`hidden`:document.hasFocus()?`active`:`passive`}function MT(e){var t=Rw();return{get:function(){return{viewport:t}},stop:Iw(e).subscribe(function(e){t=e}).unsubscribe}}function NT(e,t){var n=window.cookieStore?PT(e):IT;return new W(function(e){return n(t,function(t){return e.notify(t)})})}function PT(e){return function(t,n){return i_(e,window.cookieStore,`change`,function(e){var r=Yp(e.changed,function(e){return e.name===t})||Yp(e.deleted,function(e){return e.name===t});r&&n(r.value)}).stop}}var FT=Sp;function IT(e,t){var n=wm(document.cookie,e),r=vm(function(){var r=wm(document.cookie,e);r!==n&&t(r)},FT);return function(){ym(r)}}var LT=`datadog-ci-visibility-test-execution-id`;function RT(e,t){t===void 0&&(t=NT(e,LT));var n=Im(`datadog-ci-visibility-test-execution-id`)||window.Cypress?.env(`traceId`),r=t.subscribe(function(e){n=e});return{get:function(){if(typeof n==`string`)return{test_execution_id:n}},stop:function(){return r.unsubscribe()}}}function zT(e,t){var n=Fx(t,{type:Px.LONG_ANIMATION_FRAME,buffered:!0}).subscribe(function(t){for(var n=0,r=t;n<r.length;n++){var i=r[n],a=Ep(i.startTime),o={date:a.timeStamp,long_task:{id:Sm(),entry_type:`long-animation-frame`,duration:V(i.duration),blocking_duration:V(i.blockingDuration),first_ui_event_timestamp:V(i.firstUIEventTimestamp),render_start:V(i.renderStart),style_and_layout_start:V(i.styleAndLayoutStart),start_time:V(i.startTime),scripts:i.scripts.map(function(e){return{duration:V(e.duration),pause_duration:V(e.pauseDuration),forced_style_and_layout_duration:V(e.forcedStyleAndLayoutDuration),start_time:V(e.startTime),execution_start:V(e.executionStart),source_url:e.sourceURL,source_function_name:e.sourceFunctionName,source_char_position:e.sourceCharPosition,invoker:e.invoker,invoker_type:e.invokerType,window_attribution:e.windowAttribution}})},type:`long_task`,_dd:{discarded:!1}};e.notify(11,{rawRumEvent:o,startTime:a.relative,domainContext:{performanceEntry:i}})}});return{stop:function(){return n.unsubscribe()}}}function BT(e,t,n,r,i,a,o,s){var c=[],l=new ax;l.subscribe(12,function(e){return m_(`rum`,e)});var u=VT(e);u.setContextProvider(function(){return{application:{id:e.applicationId},session:{id:h.findTrackedSession()?.id},view:{id:x.findView()?.id},action:{id:C.findActionId()}}});var d=function(e){l.notify(13,{error:e}),P_(`Error reported to customer`,{"error.message":e.message})},f=hT(l,n.getOrCreateTracker(0)),p=Sv(e),m=p.subscribe(function(e){l.notify(10,e)});c.push(function(){return m.unsubscribe()});var h=yv()?nT():tT(e,l,o);if(yv())sT(l);else{var g=oT(e,l,u.observable,d,p,h.expireObservable,a);c.push(function(){return g.stop()}),bT(e,u,l,n,g.flushObservable)}var _=Ub(),v=uT(e,location),y=kT(e),b=HT(l,e,location,h,y,v,_,r,d),x=b.viewHistory,S=b.urlContexts,C=b.actionContexts,w=b.addAction,T=b.stop;c.push(T),M_();var E=$w(l,e,location,_,v,f,y,t,i),D=E.addTiming,O=E.startView,k=E.updateViewName,A=E.setViewContext,j=E.setViewContextProperty,M=E.stop;c.push(M);var ee=qC(l,e,y).stop;if(c.push(ee),ug(og.LONG_ANIMATION_FRAME)){if(e.trackLongTasks){var te=zT(l,e).stop;c.push(te)}}else MC(l,e);var N=kC(l,e,y,f).addError;Ex(l,e,h);var ne=mb(l,y,s),re=ix(e.applicationId,h,x,C,S);return{addAction:w,addError:N,addTiming:D,addFeatureFlagEvaluation:f.addFeatureFlagEvaluation,startView:O,setViewContext:A,setViewContextProperty:j,updateViewName:k,lifeCycle:l,viewHistory:x,session:h,stopSession:function(){return h.expire()},getInternalContext:re.get,startDurationVital:ne.startDurationVital,stopDurationVital:ne.stopDurationVital,addDurationVital:ne.addDurationVital,stop:function(){c.forEac
15h(function(e){return e()})}}}function VT(e){var t=A_(`browser-rum-sdk`,e);if(yv()){var n=_v();t.observable.subscribe(function(e){return n.send(`internal_telemetry`,e)})}return t}function HT(e,t,n,r,i,a,o,s,c){var l=sx(e),u=lT(e,a,n),d=wC(e,o,t,i),f=d.addAction,p=d.actionContexts,m=MT(t),h=RT(t);return tx(t,e,r,l,u,p,m,h,s,c),{viewHistory:l,pageStateHistory:i,urlContexts:u,addAction:f,actionContexts:p,stop:function(){h.stop(),m.stop(),u.stop(),l.stop(),i.stop()}}}function UT(e,t){var n=t.session,r=t.viewContext,i=t.errorType,a=n?n.id:`no-session-id`,o=[];return i!==void 0&&o.push(`error-type=${i}`),r&&(o.push(`seed=${r.id}`),o.push(`from=${r.startClocks.timeStamp}`)),`${WT(e)}${`/rum/replay/sessions/${a}`}?${o.join(`&`)}`}function WT(e){var t=e.site,n=e.subdomain||GT(e);return`https://${n?`${n}.`:``}${t}`}function GT(e){switch(e.site){case Lh:case Rh:return`app`;case Ih:return`dd`;default:return}}var KT;function qT(e){return QT(e).segments_count}function JT(e){QT(e).segments_count+=1}function YT(e){QT(e).records_count+=1}function XT(e,t){QT(e).segments_total_raw_size+=t}function ZT(e){return KT?.get(e)}function QT(e){KT||=new Map;var t;return KT.has(e)?t=KT.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},KT.set(e,t),KT.size>10&&$T()),t}function $T(){if(KT)if(KT.keys){var e=KT.keys().next().value;e&&KT.delete(e)}else{var t=!0;KT.forEach(function(e,n){t&&=(KT.delete(n),!1)})}}var eE=new WeakMap;function tE(e){return eE.has(e)}function nE(e){for(var t=e;t;){if(!tE(t)&&!rS(t))return!1;t=oS(t)}return!0}function rE(e){return eE.get(e)}function iE(e,t){eE.set(e,t)}function aE(e,t){var n=e.tagName,r=e.value;if(gS(e,t)){var i=e.type;return n===`INPUT`&&(i===`button`||i===`submit`||i===`reset`)?r:!r||n===`OPTION`?void 0:`***`}if(n===`OPTION`||n===`SELECT`)return e.value;if(!(n!==`INPUT`&&n!==`TEXTAREA`))return r}var oE=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,sE=/^[A-Za-z]+:|^\/\//,cE=/^data:.*,/i;function lE(e,t){return e.replace(oE,function(e,n,r,i,a,o){var s=r||a||o;if(!t||!s||sE.test(s)||cE.test(s))return e;var c=n||i||``;return`url(${c}${uE(s,t)}${c})`})}function uE(e,t){try{return Mh(e,t).href}catch{return e}}var dE=/[^a-z1-6-_]/;function fE(e){var t=e.toLowerCase().trim();return dE.test(t)?`div`:t}function pE(e,t){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${t}' style='background-color:silver'%3E%3C/svg%3E`}var mE={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},hE={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},gE={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},_E={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},vE={Play:0,Pause:1};function yE(e){if(!(e===void 0||e.length===0))return e.map(function(e){var t=e.cssRules||e.rules;return{cssRules:Array.from(t,function(e){return e.cssText}),disabled:e.disabled||void 0,media:e.media.length>0?Array.from(e.media):void 0}})}function bE(e,t,n,r){if(t===q.HIDDEN)return null;var i=e.getAttribute(n);if(t===q.MASK&&n!==`data-dd-privacy`&&!RS.includes(n)&&n!==r.actionNameAttribute){var a=e.tagName;switch(n){case`title`:case`alt`:case`placeholder`:return`***`}if(a===`IMG`&&(n===`src`||n===`srcset`)){var o=e;if(o.naturalWidth>0)return pE(o.naturalWidth,o.naturalHeight);var s=e.getBoundingClientRect(),c=s.width,l=s.height;return c>0||l>0?pE(c,l):uS}if(a===`SOURCE`&&(n===`src`||n===`srcset`))return uS;if(a===`A`&&n===`href`||i&&em(n,`data-`)||a===`IFRAME`&&n===`srcdoc`)return`***`}return!i||typeof i!=`string`?i:Cx(i)?wx(i):i}function xE(e,t,n){var r;if(t===q.HIDDEN)return{};for(var i={},a=fE(e.tagName),o=e.ownerDocument,s=0;s<e.attributes.length;s+=1){var c=e.attributes.item(s).name,l=bE(e,t,c,n.configuration);l!==null&&(i[c]=l)}if(e.value&&(a===`textarea`||a===`select`||a===`option`||a===`input`)){var u=aE(e,t);u!==void 0&&(i.value=u)}if(a===`option`&&t===q.ALLOW){var d=e;d.selected&&(i.selected=d.selected)}if(a===`link`){var f=Array.from(o.styleSheets).find(function(t){return t.href===e.href}),p=SE(f);p&&f&&(i._cssText=p)}if(a===`style`&&e.sheet){var p=SE(e.sheet);p&&(i._cssText=p)}var m=e;a===`input`&&(m.type===`radio`||m.type===`checkbox`)&&(t===q.ALLOW?i.checked=!!m.checked:gS(m,t)&&delete i.checked),(a===`audio`||a===`video`)&&(i.rr_mediaState=e.paused?`paused`:`played`);var h,g,_=n.serializationContext;switch(_.status){case 0:h=Math.round(e.scrollTop),g=Math.round(e.scrollLeft),(h||g)&&_.elementsScrollPositions.set(e,{scrollTop:h,scrollLeft:g});break;case 1:_.elementsScrollPositions.has(e)&&(r=_.elementsScrollPositions.get(e),h=r.scrollTop,g=r.scrollLeft);break}return g&&(i.rr_scrollLeft=g),h&&(i.rr_scrollTop=h),i}function SE(e){if(!e)return null;var t;try{t=e.rules||e.cssRules}catch{}return t?lE(Array.from(t,km()?CE:wE).join(``),e.href):null}function CE(e){return EE(e)&&e.selectorText.includes(`:`)?e.cssText.replace(/(\[[\w-]+[^\\])(:[^\]]+\])/g,`$1\\$2`):wE(e)}function wE(e){return TE(e)&&SE(e.styleSheet)||e.cssText}function TE(e){return`styleSheet`in e}function EE(e){return`selectorText`in e}function DE(e,t){var n=jE(e,t);if(!n)return null;var r=rE(e)||kE(),i=n;return i.id=r,iE(e,r),t.serializedNodeIds&&t.serializedNodeIds.add(r),i}var OE=1;function kE(){return OE++}function AE(e,t){var n=[];return aS(e,function(e){var r=DE(e,t);r&&n.push(r)}),n}function jE(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return ME(e,t);case e.DOCUMENT_FRAGMENT_NODE:return NE(e,t);case e.DOCUMENT_TYPE_NODE:return PE(e);case e.ELEMENT_NODE:return FE(e,t);case e.TEXT_NODE:return LE(e,t);case e.CDATA_SECTION_NODE:return RE()}}function ME(e,t){return{type:hE.Document,childNodes:AE(e,t),adoptedStyleSheets:yE(e.adoptedStyleSheets)}}function NE(e,t){var n=rS(e);return n&&t.serializationContext.shadowRootsController.addShadowRoot(e),{type:hE.DocumentFragment,childNodes:AE(e,t),isShadowRoot:n,adoptedStyleSheets:n?yE(e.adoptedStyleSheets):void 0}}function PE(e){return{type:hE.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId}}function FE(e,t){var n,r=fE(e.tagName),i=IE(e)||void 0,a=mS(hS(e),t.parentNodePrivacyLevel);if(a===q.HIDDEN){var o=e.getBoundingClientRect(),s=o.width,c=o.height;return{type:hE.Element,tagName:r,attributes:(n={rr_width:`${s}px`,rr_height:`${c}px`},n[sS]=cS,n),childNodes:[],isSVG:i}}if(a!==q.IGNORE){var l=xE(e,a,t),u=[];
15if(iS(e)&&r!==`style`){var d=void 0;d=t.parentNodePrivacyLevel===a&&t.ignoreWhiteSpace===(r===`head`)?t:H({},t,{parentNodePrivacyLevel:a,ignoreWhiteSpace:r===`head`}),u=AE(e,d)}return{type:hE.Element,tagName:r,attributes:l,childNodes:u,isSVG:i}}}function IE(e){return e.tagName===`svg`||e instanceof SVGElement}function LE(e,t){var n=yS(e,t.ignoreWhiteSpace||!1,t.parentNodePrivacyLevel);if(n!==void 0)return{type:hE.Text,textContent:n}}function RE(){return{type:hE.CDATA,textContent:``}}function zE(e,t,n){return DE(e,{serializationContext:n,parentNodePrivacyLevel:t.defaultPrivacyLevel,configuration:t})}function BE(e){return!!e.changedTouches}function VE(e){return e.composed===!0&&nS(e.target)?e.composedPath()[0]:e.target}var HE=25;function UE(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>HE||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>HE}var WE=function(e,t){var n=window.visualViewport,r={layoutViewportX:e,layoutViewportY:t,visualViewportX:e,visualViewportY:t};if(n)UE(n)?(r.layoutViewportX=Math.round(e+n.offsetLeft),r.layoutViewportY=Math.round(t+n.offsetTop)):(r.visualViewportX=Math.round(e-n.offsetLeft),r.visualVie
15wportY=Math.round(t-n.offsetTop));else return r;return r},GE=function(e){return{scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width}};function KE(e,t){return{data:H({source:e},t),type:mE.IncrementalSnapshot,timestamp:jp()}}var qE=50;function JE(e,t){var n=xm(function(e){var n=VE(e);if(tE(n)){var r=YE(e);if(!r)return;var i={id:rE(n),timeOffset:0,x:r.x,y:r.y};t(KE(BE(e)?gE.TouchMove:gE.MouseMove,{positions:[i]}))}},qE,{trailing:!1}),r=n.throttled,i=n.cancel,a=a_(e,document,[`mousemove`,`touchmove`],r,{capture:!0,passive:!0}).stop;return{stop:function(){a(),i()}}}function YE(e){var t=BE(e)?e.changedTouches[0]:e,n=t.clientX,r=t.clientY;if(window.visualViewport){var i=WE(n,r),a=i.visualViewportX,o=i.visualViewportY;n=a,r=o}if(!Number.isFinite(n)||!Number.isFinite(r)){e.isTrusted&&P_(`mouse/touch event without x/y`);return}return{x:n,y:r}}var XE,ZE=(XE={},XE.pointerup=_E.MouseUp,XE.mousedown=_E.MouseDown,XE.click=_E.Click,XE.contextmenu=_E.ContextMenu,XE.dblclick=_E.DblClick,XE.focus=_E.Focus,XE.blur=_E.Blur,XE.touchstart=_E.TouchStart,XE.touchend=_E.TouchEnd,XE);function QE(e,t,n){return a_(e,document,Object.keys(ZE),function(r){var i=VE(r);if(!(pS(i,e.defaultPrivacyLevel)===q.HIDDEN||!tE(i))){var a=rE(i),o=ZE[r.type],s;if(o!==_E.Blur&&o!==_E.Focus){var c=YE(r);if(!c)return;s={id:a,type:o,x:c.x,y:c.y}}else s={id:a,type:o};t(H({id:n.getIdForEvent(r)},KE(gE.MouseInteraction,s)))}},{capture:!0,passive:!0})}var $E=100;function eD(e,t,n,r){r===void 0&&(r=document);var i=xm(function(r){var i=VE(r);if(!(!i||pS(i,e.defaultPrivacyLevel)===q.HIDDEN||!tE(i))){var a=rE(i),o=i===document?{scrollTop:Pw(),scrollLeft:Nw()}:{scrollTop:Math.round(i.scrollTop),scrollLeft:Math.round(i.scrollLeft)};n.set(i,o),t(KE(gE.Scroll,{id:a,x:o.scrollLeft,y:o.scrollTop}))}},$E),a=i.throttled,o=i.cancel,s=i_(e,r,`scroll`,a,{capture:!0,passive:!0}).stop;return{stop:function(){s(),o()}}}var tD=200;function nD(e,t){var n=Iw(e).subscribe(function(e){t(KE(gE.ViewportResize,e))});return{stop:function(){n.unsubscribe()}}}function rD(e,t){var n=window.visualViewport;if(!n)return{stop:G};var r=xm(function(){t({data:GE(n),type:mE.VisualViewport,timestamp:jp()})},tD,{trailing:!1}),i=r.throttled,a=r.cancel,o=a_(e,n,[`resize`,`scroll`],i,{capture:!0,passive:!0}).stop;return{stop:function(){o(),a()}}}function iD(e,t){return a_(e,document,[`play`,`pause`],function(n){var r=VE(n);!r||pS(r,e.defaultPrivacyLevel)===q.HIDDEN||!tE(r)||t(KE(gE.MediaInteraction,{id:rE(r),type:n.type===`play`?vE.Play:vE.Pause}))},{capture:!0,passive:!0})}function aD(e){function t(e,t){e&&tE(e.ownerNode)&&t(rE(e.ownerNode))}var n=[Ng(CSSStyleSheet.prototype,`insertRule`,function(n){var r=n.target,i=n.parameters,a=i[0],o=i[1];t(r,function(t){return e(KE(gE.StyleSheetRule,{id:t,adds:[{rule:a,index:o}]}))})}),Ng(CSSStyleSheet.prototype,`deleteRule`,function(n){var r=n.target,i=n.parameters[0];t(r,function(t){return e(KE(gE.StyleSheetRule,{id:t,removes:[{index:i}]}))})})];typeof CSSGroupingRule<`u`?r(CSSGroupingRule):(r(CSSMediaRule),r(CSSSupportsRule));function r(r){n.push(Ng(r.prototype,`insertRule`,function(n){var r=n.target,i=n.parameters,a=i[0],o=i[1];t(r.parentStyleSheet,function(t){var n=oD(r);n&&(n.push(o||0),e(KE(gE.StyleSheetRule,{id:t,adds:[{rule:a,index:n}]})))})}),Ng(r.prototype,`deleteRule`,function(n){var r=n.target,i=n.parameters[0];t(r.parentStyleSheet,function(t){var n=oD(r);n&&(n.push(i),e(KE(gE.StyleSheetRule,{id:t,removes:[{index:n}]})))})}))}return{stop:function(){n.forEach(function(e){return e.stop()})}}}function oD(e){for(var t=[],n=e;n.parentRule;){var r=Array.from(n.parentRule.cssRules).indexOf(n);t.unshift(r),n=n.parentRule}if(n.parentStyleSheet){var i=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return t.unshift(i),t}}function sD(e,t){return a_(e,window,[`focus`,`blur`],function(){t({data:{has_focus:document.hasFocus()},type:mE.Focus,timestamp:jp()})})}function cD(e,t,n){var r=e.subscribe(11,function(e){e.rawRumEvent.type===`action`&&e.rawRumEvent.action.type===`click`&&e.rawRumEvent.action.frustration?.type?.length&&`events`in e.domainContext&&e.domainContext.events&&e.domainContext.events.length&&t({timestamp:e.rawRumEvent.date,type:mE.FrustrationRecord,data:{frustrationTypes:e.rawRumEvent.action.frustration.type,recordIds:e.domainContext.events.map(function(e){return n.getIdForEvent(e)})}})});return{stop:function(){r.unsubscribe()}}}function lD(e,t){var n=e.subscribe(4,function(){t({timestamp:jp(),type:mE.ViewEnd})});return{stop:function(){n.unsubscribe()}}}function uD(e,t,n){n===void 0&&(n=document);var r=e.defaultPrivacyLevel,i=new WeakMap,a=n!==document,o=a_(e,n,a?[`change`]:[`input`,`change`],function(e){var t=VE(e);(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)&&l(t)},{capture:!0,passive:!0}).stop,s;if(a)s=G;else{var c=[Pg(HTMLInputElement.prototype,`value`,l),Pg(HTMLInputElement.prototype,`checked`,l),Pg(HTMLSelectElement.prototype,`value`,l),Pg(HTMLTextAreaElement.prototype,`value`,l),Pg(HTMLSelectElement.prototype,`selectedIndex`,l)];
15s=function(){c.forEach(function(e){return e.stop()})}}return{stop:function(){s(),o()}};function l(e){var t=pS(e,r);if(t!==q.HIDDEN){var n=e.type,i;if(n===`radio`||n===`checkbox`){if(gS(e,t))return;i={isChecked:e.checked}}else{var a=aE(e,t);if(a===void 0)return;i={text:a}}u(e,i);var o=e.name;n===`radio`&&o&&e.checked&&Zp(document.querySelectorAll(`input[type="radio"][name="${qx(o)}"]`),function(t){t!==e&&u(t,{isChecked:!1})})}}function u(e,n){if(tE(e)){var r=i.get(e);(!r||r.text!==n.text||r.isChecked!==n.isChecked)&&(i.set(e,n),t(KE(gE.Input,H({id:rE(e)},n))))}}}var dD=100;function fD(e){var t=G,n=[];function r(){t(),e(n),n=[]}var i=xm(r,16,{leading:!1}),a=i.throttled,o=i.cancel;return{addMutations:function(e){n.length===0&&(t=pD(a,{timeout:dD})),n.push.apply(n,e)},flush:r,stop:function(){t(),o()}}}function pD(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){var n=window.requestIdleCallback(U(e),t);return function(){return window.cancelIdleCallback(n)}}var r=window.requestAnimationFrame(U(e));return function(){return window.cancelAnimationFrame(r)}}function mD(e,t,n,r){var i=Wb();if(!i)return{stop:G,flush:G};var a=fD(function(r){hD(r.concat(o.takeRecords()),e,t,n)}),o=new i(U(a.addMutations));return o.observe(r,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:function(){o.disconnect(),a.stop()},flush:function(){a.flush()}}}function hD(e,t,n,r){var i=new Map;e.filter(function(e){return e.type===`childList`}
15).forEach(function(e){e.removedNodes.forEach(function(e){bD(e,r.removeShadowRoot)})});var a=e.filter(function(e){return e.target.isConnected&&nE(e.target)&&pS(e.target,n.defaultPrivacyLevel,i)!==q.HIDDEN}),o=gD(a.filter(function(e){return e.type===`childList`}),n,r,i),s=o.adds,c=o.removes,l=o.hasBeenSerialized,u=_D(a.filter(function(e){return e.type===`characterData`&&!l(e.target)}),n,i),d=vD(a.filter(function(e){return e.type===`attributes`&&!l(e.target)}),n,i);!u.length&&!d.length&&!c.length&&!s.length||t(KE(gE.Mutation,{adds:s,removes:c,texts:u,attributes:d}))}function gD(e,t,n,r){for(var i=new Set,a=new Map,o=function(e){e.addedNodes.forEach(function(e){i.add(e)}),e.removedNodes.forEach(function(t){i.has(t)||a.set(t,e.target),i.delete(t)})},s=0,c=e;s<c.length;s++){var l=c[s];o(l)}var u=Array.from(i);yD(u);for(var d=new Set,f=[],p=0,m=u;p<m.length;p++){var h=m[p];if(!b(h)){var g=pS(h.parentNode,t.defaultPrivacyLevel,r);if(!(g===q.HIDDEN||g===q.IGNORE)){var _=DE(h,{serializedNodeIds:d,parentNodePrivacyLevel:g,serializationContext:{status:2,shadowRootsController:n},configuration:t});if(_){var v=oS(h);f.push({nextId:x(h),parentId:rE(v),node:_})}}}}var y=[];return a.forEach(function(e,t){tE(t)&&y.push({parentId:rE(e),id:rE(t)})}),{adds:f,removes:y,hasBeenSerialized:b};function b(e){return tE(e)&&d.has(rE(e))}function x(e){for(var t=e.nextSibling;t;){if(tE(t))return rE(t);t=t.nextSibling}return null}}function _D(e,t,n){for(var r=[],i=new Set,a=e.filter(function(e){return i.has(e.target)?!1:(i.add(e.target),!0)}),o=0,s=a;o<s.length;o++){var c=s[o];if(c.target.textContent!==c.oldValue){var l=pS(oS(c.target),t.defaultPrivacyLevel,n);l===q.HIDDEN||l===q.IGNORE||r.push({id:rE(c.target),value:yS(c.target,!1,l)??null})}}return r}function vD(e,t,n){for(var r=[],i=new Map,a=e.filter(function(e){var t=i.get(e.target);return t&&t.has(e.attributeName)?!1:(t?t.add(e.attributeName):i.set(e.target,new Set([e.attributeName])),!0)}),o=new Map,s=0,c=a;s<c.length;s++){var l=c[s];if(l.target.getAttribute(l.attributeName)!==l.oldValue){var u=pS(l.target,t.defaultPrivacyLevel,n),d=bE(l.target,u,l.attributeName,t),f=void 0;if(l.attributeName===`value`){var p=aE(l.target,u);if(p===void 0)continue;f=p}else f=typeof d==`string`?d:null;var m=o.get(l.target);m||(m={id:rE(l.target),attributes:{}},r.push(m),o.set(l.target,m)),m.attributes[l.attributeName]=f}}return r}function yD(e){e.sort(function(e,t){var n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_CONTAINS||n&Node.DOCUMENT_POSITION_FOLLOWING?1:n&Node.DOCUMENT_POSITION_PRECEDING?-1:0})}function bD(e,t){nS(e)&&t(e.shadowRoot),aS(e,function(e){return bD(e,t)})}function xD(){var e=new WeakMap;return{set:function(t,n){t===document&&!document.scrollingElement||e.set(t===document?document.scrollingElement:t,n)},get:function(t){return e.get(t)},has:function(t){return e.has(t)}}}var SD=function(e,t,n){var r=new Map,i={addShadowRoot:function(a){if(!r.has(a)){var o=mD(t,e,i,a),s=uD(e,t,a),c=eD(e,t,n,a);r.set(a,{flush:function(){return o.flush()},stop:function(){o.stop(),s.stop(),c.stop()}})}},removeShadowRoot:function(e){var t=r.get(e);t&&(t.stop(),r.delete(e))},stop:function(){r.forEach(function(e){var t=e.stop;return t()})},flush:function(){r.forEach(function(e){var t=e.flush;return t()})}};return i};function CD(e,t,n,r,i,a){var o=function(n,i){n===void 0&&(n=jp()),i===void 0&&(i={status:0,elementsScrollPositions:e,shadowRootsController:t});var a=Rw(),o=a.width,s=[{data:{height:a.height,href:window.location.href,width:o},type:mE.Meta,timestamp:n},{data:{has_focus:document.hasFocus()},type:mE.Focus,timestamp:n},{data:{node:zE(document,r,i),initialOffset:{left:Nw(),top:Pw()}},type:mE.FullSnapshot,timestamp:n}];return window.visualViewport&&s.push({data:GE(window.visualViewport),type:mE.VisualViewport,timestamp:n}),s};return a(o()),{stop:n.subscribe(2,function(n){i(),a(o(n.startClocks.timeStamp,{shadowRootsController:t,status:1,elementsScrollPositions:e}))}).unsubscribe}}function wD(){var e=new WeakMap,t=1;return{getIdForEvent:function(n){return e.has(n)||e.set(n,t++),e.get(n)}}}function TD(e){var t=e.emit,n=e.configuration,r=e.lifeCycle;if(!t)throw Error(`emit function is required`);var i=function(n){t(n),m_(`record`,{record:n}),YT(e.viewHistory.findView().id)},a=xD(),o=SD(n,i,a),s=CD(a,o,r,n,c,function(e){return e.forEach(function(e){return i(e)})}).stop;function c(){o.flush(),u.flush()}var l=wD(),u=mD(i,n,o,document),d=[u,JE(n,i),QE(n,i,l),eD(n,i,a,document),nD(n,i),uD(n,i),iD(n,i),aD(i),sD(n,i),rD(n,i),cD(r,i,l),lD(r,function(e){c(),i(e)})];return{stop:function(){o.stop(),d.forEach(function(e){return e.stop()}),s()},flushMutations:c,shadowRootsController:o}}function ED(e,t,n){var r=new FormData;
15r.append(`segment`,new Blob([e],{type:`application/octet-stream`}),`${t.session.id}-${t.start}`);var i=H({raw_segment_size:n,compressed_segment_size:e.byteLength},t),a=JSON.stringify(i);return r.append(`event`,new Blob([a],{type:`application/json`})),{data:r,bytesCount:e.byteLength}}function DD(e){var t=e.context,n=e.creationReason,r=e.encoder,i=0,a=t.view.id,o=H({start:1/0,end:-1/0,creation_reason:n,records_count:0,has_full_snapshot:!1,index_in_view:qT(a),source:`browser`},t);JT(a);function s(e,t){o.start=Math.min(o.start,e.timestamp),o.end=Math.max(o.end,e.timestamp),o.records_count+=1,o.has_full_snapshot||=e.type===mE.FullSnapshot;var n=r.isEmpty?`{"records":[`:`,`;r.write(n+JSON.stringify(e),function(e){i+=e,t(i)})}function c(e){if(r.isEmpty)throw Error(`Empty segment flushed`);r.write(`],${JSON.stringify(o).slice(1)}
16`),r.finish(function(t){XT(o.view.id,t.rawBytesCount),e(o,t)})}return{addRecord:s,flush:c}}function OD(){return ug(og.REDUCE_SEGMENT_LIMIT_BATCH_TIME)?5*Sp:30*Sp}var kD=6e4;function AD(e,t,n,r,i,a){return jD(e,function(){return MD(t.applicationId,n,r)},i,a)}function jD(e,t,n,r){var i={status:0,nextSegmentCreationReason:`init`},a=e.subscribe(2,function(){s(`view_change`)}).unsubscribe,o=e.subscribe(10,function(e){s(e.reason)}).unsubscribe;function s(e){i.status===1&&(i.segment.flush(function(t,r){var i=ED(r.output,t,r.rawBytesCount);Cv(e)?n.sendOnExit(i):n.send(i)}),_m(i.expirationTimeoutId)),i=e===`stop`?{status:2}:{status:0,nextSegmentCreationReason:e}}return{addRecord:function(e){if(i.status!==2){if(i.status===0){var n=t();if(!n)return;i={status:1,segment:DD({encoder:r,context:n,creationReason:i.nextSegmentCreationReason}),expirationTimeoutId:gm(function(){s(`segment_duration_limit`)},OD())}}i.segment.addRecord(e,function(e){e>kD&&s(`segment_bytes_limit`)})}},stop:function(){s(`stop`),a(),o()}}}function MD(e,t,n){var r=t.findTrackedSession(),i=n.findView();if(!(!r||!i))return{application:{id:e},session:{id:r.id},view:{id:i.id}}}function ND(e){var t=_v();return{addRecord:function(n){var r=e.findView();t.send(`record`,n,r.id)}}}function PD(e,t,n,r,i,a){var o=[],s=a||uv(t,t.sessionReplayEndpointBuilder,kD,function(t){e.notify(13,{error:t}),P_(`Error reported to customer`,{"error.message":t.message})}),c;if(yv())c=ND(r).addRecord;else{var l=AD(e,t,n,r,s,i);c=l.addRecord,o.push(l.stop)}var u=TD({emit:c,configuration:t,lifeCycle:e,viewHistory:r}).stop;return o.push(u),{stop:function(){o.forEach(function(e){return e()})}}}function FD(){return typeof Array.from==`function`&&typeof CSSSupportsRule==`function`&&typeof URL.createObjectURL==`function`&&`forEach`in NodeList.prototype}function ID(e,t,n,r){var i=t.findTrackedSession(),a=LD(i,r);return UT(e,{viewContext:n.findView(),errorType:a,session:i})}function LD(e,t){if(!FD())return`browser-not-supported`;if(!e)return`rum-not-tracked`;if(e.sessionReplay===0)return`incorrect-session-plan`;if(!t)return`replay-not-started`}function RD(e,t,n){var r=0,i=[],a,o=0,s=[],c=i_(e,t,`message`,function(e){var t=e.data;if(!(t.type!==`wrote`||t.streamId!==n)){r+=t.additionalBytesCount,i.push(t.result),a=t.trailer;var o=s.shift();o&&o.id===t.id?o.writeCallback?o.writeCallback(t.result.byteLength):o.finishCallback&&o.finishCallback():(c(),P_(`Worker responses received out of order.`))}}).stop;function l(){var e=i.length===0?new Uint8Array:Kp(i.concat(a)),t={rawBytesCount:r,output:e,outputBytesCount:e.byteLength,encoding:`deflate`};return r=0,i=[],t}function u(){o>0&&(t.postMessage({action:`reset`,streamId:n}),o=0)}return{isAsync:!0,get isEmpty(){return o===0},write:function(e,r){t.postMessage({action:`write`,id:o,data:e,streamId:n}),s.push({id:o,writeCallback:r,data:e}),o+=1},finish:function(e){u(),s.length?(s.forEach(function(e){delete e.writeCallback}),s[s.length-1].finishCallback=function(){return e(l())}):e(l())},finishSync:function(){u();var e=s.map(function(e){return delete e.writeCallback,delete e.finishCallback,e.data}).join(``);return H(l(),{pendingData:e})},estimateEncodedBytesCount:function(e){return e.length/8},stop:function(){c()}}}var zD=30*Sp;function BD(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob([`!function(){"use strict";function t(t){for(var e=t.reduce((function(t,e){return t+e.length}),0),a=new Uint8Array(e),n=0,r=0,i=t;r<i.length;r++){var s=i[r];a.set(s,n),n+=s.length}return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,n=286,r=30,i=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),_=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),l=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=new Array(576);e(o);var d=new Array(60);e(d);var u=new Array(512);e(u);var f=new Array(256);e(f);var c=new Array(29);e(c);var p,g,w,v=new Array(r);function b(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function m(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(v);var y=function(t){return t<256?u[t]:u[256+(t>>
vendor: 4,441 bytes, line 16
16>7)]},k=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},z=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,k(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},x=function(t,e,a){z(t,a[2*e],a[2*e+1])},A=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=function(t,e,a){var n,r,s=new Array(16),_=0;for(n=1;n<=i;n++)s[n]=_=_+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=A(s[h]++,h))}},Z=function(t){var e;for(e=0;e<n;e++)t.dyn_ltree[2*e]=0;for(e=0;e<r;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},U=function(t){t.bi_valid>8?k(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},R=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&S(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!S(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},L=function(t,e,n){var r,i,h,l,o=0;if(0!==t.last_lit)do{r=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],i=t.pending_buf[t.l_buf+o],o++,0===r?x(t,i,e):(h=f[i],x(t,h+a+1,e),0!==(l=s[h])&&(i-=c[h],z(t,i,l)),r--,h=y(r),x(t,h,n),0!==(l=_[h])&&(r-=v[h],z(t,r,l)))}while(o<t.last_lit);x(t,256,e)},F=function(t,e){var a,n,r,s=e.dyn_tree,_=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,o=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==s[2*a]?(t.heap[++t.heap_len]=o=a,t.depth[a]=0):s[2*a+1]=0;for(;t.heap_len<2;)s[2*(r=t.heap[++t.heap_len]=o<2?++o:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=_[2*r+1]);for(e.max_code=o,a=t.heap_len>>1;a>=1;a--)R(t,s,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],R(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*r]=s[2*a]+s[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=r,t.heap[1]=r++,R(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,s,_,h,l=e.dyn_tree,o=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(s=0;s<=i;s++)t.bl_count[s]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=l[2*l[2*(n=t.heap[a])+1]+1]+1)>p&&(s=p,g++),l[2*n+1]=s,n>o||(t.bl_count[s]++,_=0,n>=c&&(_=f[n-c]),h=l[2*n],t.opt_len+=h*(s+_),u&&(t.static_len+=h*(d[2*n+1]+_)));if(0!==g){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(s=p;0!==s;s--)for(n=t.bl_count[s];0!==n;)(r=t.heap[--a])>o||(l[2*r+1]!==s&&(t.opt_len+=(s-l[2*r+1])*l[2*r],l[2*r+1]=s),n--)}}(t,e),E(s,o,t.bl_count)},T=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++_<h&&r===s||(_<l?t.bl_tree[2*r]+=_:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):_<=10?t.bl_tree[34]++:t.bl_tree[36]++,_=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4))},I=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++_<h&&r===s)){if(_<l)do{x(t,r,t.bl_tree)}while(0!=--_);else 0!==r?(r!==i&&(x(t,r,t.bl_tree),_--),x(t,16,t.bl_tree),z(t,_-3,2)):_<=10?(x(t,17,t.bl_tree),z(t,_-3,3)):(x(t,18,t.bl_tree),z(t,_-11,7));_=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4)}},N=!1,O=function(t,e,a,n){z(t,0+(n?1:0),3),function(t,e,a,n){U(t),n&&(k(t,a),k(t,~a)),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a,!0)},D=function(t,e,n,r){var i,s,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),F(t,t.l_desc),F(t,t.d_desc),_=function(t){var e;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),F(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*l[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==e?O(t,e,n,r):4===t.strategy||s===i?(z(t,2+(r?1:0),3),L(t,o,d)):(z(t,4+(r?1:0),3),function(t,e,a,n){var r;for(z(t,e-257,5),z(t,a-1,5),z(t,n-4,4),r=0;r<n;r++)z(t,t.bl_tree[2*l[r]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,a-1)}
16(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),L(t,t.dyn_ltree,t.dyn_dtree)),Z(t),r&&U(t)},B={_tr_init:function(t){N||(!function(){var t,e,a,l,m,y=new Array(16);for(a=0,l=0;l<28;l++)for(c[l]=a,t=0;t<1<<s[l];t++)f[a++]=l;for(f[a-1]=l,m=0,l=0;l<16;l++)for(v[l]=m,t=0;t<1<<_[l];t++)u[m++]=l;for(m>>=7;l<r;l++)for(v[l]=m<<7,t=0;t<1<<_[l]-7;t++)u[256+m++]=l;for(e=0;e<=i;e++)y[e]=0;for(t=0;t<=143;)o[2*t+1]=8,t++,y[8]++;for(;t<=255;)o[2*t+1]=9,t++,y[9]++;for(;t<=279;)o[2*t+1]=7,t++,y[7]++;for(;t<=287;)o[2*t+1]=8,t++,y[8]++;for(E(o,287,y),t=0;t<r;t++)d[2*t+1]=5,d[2*t]=A(t,5);p=new b(o,s,257,n,i),g=new b(d,_,0,r,i),w=new b(new Array(0),h,0,19,7)}(),N=!0),t.l_desc=new m(t.dyn_ltree,p),t.d_desc=new m(t.dyn_dtree,g),t.bl_desc=new m(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,Z(t)},_tr_stored_block:O,_tr_flush_block:D,_tr_tally:function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(f[n]+a+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){z(t,2,3),x(t,256,o),function(t){16===t.bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},C=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16|0},H=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),M=function(t,e,a,n){var r=H,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},Y={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},P=B._tr_init,j=B._tr_stored_block,G=B._tr_flush_block,X=B._tr_tally,W=B._tr_align,q=K.Z_NO_FLUSH,J=K.Z_PARTIAL_FLUSH,Q=K.Z_FULL_FLUSH,V=K.Z_FINISH,$=K.Z_BLOCK,tt=K.Z_OK,et=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,nt=K.Z_DATA_ERROR,rt=K.Z_BUF_ERROR,it=K.Z_DEFAULT_COMPRESSION,st=K.Z_FILTERED,_t=K.Z_HUFFMAN_ONLY,ht=K.Z_RLE,lt=K.Z_FIXED,ot=K.Z_DEFAULT_STRATEGY,dt=K.Z_UNKNOWN,ut=K.Z_DEFLATED,ft=258,ct=262,pt=103,gt=113,wt=666,vt=function(t,e){return t.msg=Y[e],e},bt=function(t){return(t<<1)-(t>4?9:0)},mt=function(t){for(var e=t.length;--e>=0;)t[e]=0},yt=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},kt=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},zt=function(t,e){G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,kt(t.strm)},xt=function(t,e){t.pending_buf[t.pending++]=e},At=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,_=t.nice_match,h=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,l=t.window,o=t.w_mask,d=t.prev,u=t.strstart+ft,f=l[i+s-1],c=l[i+s];t.prev_length>=t.good_match&&(r>>=2),_>t.lookahead&&(_=t.lookahead);do{if(l[(a=e)+s]===c&&l[a+s-1]===f&&l[a]===l[i]&&l[++a]===l[i+1]){i+=2,a++;do{}while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&i<u);if(n=ft-(u-i),i=u-ft,n>s){if(t.match_start=e,s=n,n>=_)break;f=l[i+s-1],c=l[i+s]}}}while((e=d[e&o])>h&&0!=--r);return s<=t.lookahead?s:t.lookahead},Zt=function(t){var e,a,n,r,i,s,_,h,l,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-ct)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,_=t.window,h=t.strstart+t.lookahead,l=r,o=void 0,(o=s.avail_in)>l&&(o=l),a=0===o?0:(s.avail_in-=o,_.set(s.input.subarray(s.next_in,s.next_in+o),h),1===s.state.wrap?s.adler=C(s.adler,_,o,h):2===s.state.wrap&&(s.adler=M(s.adler,_,o,h)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=yt(t,t.ins_h,t.window[i+1]
16);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<ct&&0!==t.strm.avail_in)},Ut=function(t,e){for(var a,n;;){if(t.lookahead<ct){if(Zt(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a)),t.match_length>=3)if(n=X(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2},St=function(t,e){for(var a,n,r;;){if(t.lookahead<ct){if(Zt(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a),t.match_length<=5&&(t.strategy===st||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=X(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(zt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=X(t,0,t.window[t.strstart-1]))&&zt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=X(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2};function Rt(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var Lt=[new Rt(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Zt(t),0===t.lookahead&&e===q)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,zt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-ct&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(zt(t,!1),t.strm.avail_out),1)})),new Rt(4,4,8,4,Ut),new Rt(4,5,16,8,Ut),new Rt(4,6,32,32,Ut),new Rt(4,4,16,16,St),new Rt(8,16,32,32,St),new Rt(8,16,128,128,St),new Rt(8,32,128,256,St),new Rt(32,128,258,1024,St),new Rt(32,258,258,4096,St)];function Ft(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ut,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),mt(this.dyn_ltree),mt(this.dyn_dtree),mt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),mt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),mt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Tt=function(t){if(!t||!t.state)return vt(t,at);t.total_in=t.total_out=0,t.data_type=dt;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:gt,t.adler=2===e.wrap?0:1,e.last_flush=q,P(e),tt},It=function(t){var e,a=Tt(t);return a===tt&&((e=t.state).window_size=2*e.w_size,mt(e.head),e.max_lazy_match=Lt[e.level].max_lazy,e.good_match=Lt[e.level].good_length,e.nice_match=Lt[e.level].nice_length,e.max_chain_length=Lt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Nt=function(t,e,a,n,r,i){if(!t)return at;var s=1;if(e===it&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||a!==ut||n<8||n>15||e<0||e>9||i<0||i>lt)return vt(t,at);8===n&&(n=9);var _=new Ft;return t.state=_,_.strm=t,_.wrap=s,_.gzhead=null,_.w_bits=n,_.w_size=1<<_.w_bits,_.w_mask=_.w_size-1,_.hash_bits=r+7,_.hash_size=1<<_.hash_bits,_.hash_mask=_.hash_size-1,_.hash_shift=~~((_.hash_bits+3-1)/3),_.window=new Uint8Array(2*_.w_size),_.head=new Uint16Array(_.hash_size),_.prev=new Uint16Array(_.w_size),_.lit_bufsize=1<<r+6,_.pending_buf_size=4*_.lit_bufsize,_.pending_buf=new Uint8Array(_.pending_buf_size),_.d_buf=1*_.lit_bufsize,_.l_buf=3*_.lit_bufsize,_.level=e,_.strategy=i,_.method=a,It(t)}
16,Ot={deflateInit:function(t,e){return Nt(t,e,ut,15,8,ot)},deflateInit2:Nt,deflateReset:It,deflateResetKeep:Tt,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?at:(t.state.gzhead=e,tt):at},deflate:function(t,e){var a,n;if(!t||!t.state||e>$||e<0)return t?vt(t,at):at;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===wt&&e!==V)return vt(t,0===t.avail_out?rt:at);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,xt(r,31),xt(r,139),xt(r,8),r.gzhead?(xt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),xt(r,255&r.gzhead.time),xt(r,r.gzhead.time>>8&255),xt(r,r.gzhead.time>>16&255),xt(r,r.gzhead.time>>24&255),xt(r,9===r.level?2:r.strategy>=_t||r.level<2?4:0),xt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(xt(r,255&r.gzhead.extra.length),xt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=M(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(xt(r,0),xt(r,0),xt(r,0),xt(r,0),xt(r,0),xt(r,9===r.level?2:r.strategy>=_t||r.level<2?4:0),xt(r,3),r.status=gt);else{var s=ut+(r.w_bits-8<<4)<<8;s|=(r.strategy>=_t||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(s|=32),s+=31-s%31,r.status=gt,At(r,s),0!==r.strstart&&(At(r,t.adler>>>16),At(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending!==r.pending_buf_size));)xt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,xt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,xt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=pt)}else r.status=pt;if(r.status===pt&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&kt(t),r.pending+2<=r.pending_buf_size&&(xt(r,255&t.adler),xt(r,t.adler>>8&255),t.adler=0,r.status=gt)):r.status=gt),0!==r.pending){if(kt(t),0===t.avail_out)return r.last_flush=-1,tt}else if(0===t.avail_in&&bt(e)<=bt(i)&&e!==V)return vt(t,rt);if(r.status===wt&&0!==t.avail_in)return vt(t,rt);if(0!==t.avail_in||0!==r.lookahead||e!==q&&r.status!==wt){var _=r.strategy===_t?function(t,e){for(var a;;){if(0===t.lookahead&&(Zt(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===ht?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=ft){if(Zt(t),t.lookahead<=ft&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+ft;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=ft-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2}(r,e):Lt[r.level].func(r,e);if(3!==_&&4!==_||(r.status=wt),1===_||3===_)return 0===t.avail_out&&(r.last_flush=-1),tt;if(2===_&&(e===J?W(r):e!==$&&(j(r,0,0,!1),e===Q&&(mt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),kt(t),0===t.avail_out))return r.last_flush=-1,tt}return e!==V?tt:r.wrap<=0?et:(2===r.wrap?(xt(r,255&t.adler),xt(r,t.adler>>8&255),xt(r,t.adler>>16&255),xt(r,t.adler>>24&255),xt(r,255&t.total_in),xt(r,t.total_in>>8&255),xt(r,t.total_in>>16&255),xt(r,t.total_in>>24&255)):(At(r,t.adler>>>16),At(r,65535&t.adler)),kt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?tt:et)},deflateEnd:function(t){if(!t||!t.state)return at;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==pt&&e!==gt&&e!==wt?vt(t,at):(t.state=null,e===gt?vt(t,nt):tt)},deflateSetDictionary:function(t,e){var a=e.length;if(!t||!t.state)return at;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return at;if(1===r&&(t.adler=C(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(mt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);
16i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,_=t.next_in,h=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Zt(n);n.lookahead>=3;){var l=n.strstart,o=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[l+3-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++}while(--o);n.strstart=l,n.lookahead=2,Zt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=_,t.input=h,t.avail_in=s,n.wrap=r,tt},deflateInfo:"pako deflate (from Nodeca project)"};for(var Dt=new Uint8Array(256),Bt=0;Bt<256;Bt++)Dt[Bt]=Bt>=252?6:Bt>=248?5:Bt>=240?4:Bt>=224?3:Bt>=192?2:1;Dt[254]=Dt[254]=1;var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Ht=Object.prototype.toString,Mt=K.Z_NO_FLUSH,Yt=K.Z_SYNC_FLUSH,Kt=K.Z_FULL_FLUSH,Pt=K.Z_FINISH,jt=K.Z_OK,Gt=K.Z_STREAM_END,Xt=K.Z_DEFAULT_COMPRESSION,Wt=K.Z_DEFAULT_STRATEGY,qt=K.Z_DEFLATED;function Jt(){this.options={level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;var e=Ot.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==jt)throw new Error(Y[e]);if(t.header&&Ot.deflateSetHeader(this.strm,t.header),t.dictionary){var a;if(a="[object ArrayBuffer]"===Ht.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(e=Ot.deflateSetDictionary(this.strm,a))!==jt)throw new Error(Y[e]);this._dict_set=!0}}function Qt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:String(e),streamId:a})}}function Vt(t){var e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}Jt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?Pt:Mt,"[object ArrayBuffer]"===Ht.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===Yt||n===Kt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((a=Ot.deflate(r,n))===Gt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Ot.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===jt;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===jt&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,_=t.length;i<_;i++){var h=t[i];r.set(h,s),s+=h.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e){void 0===e&&(e=self);try{var a=new Map;e.addEventListener("message",(function(n){try{var r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"5.29.0"};case"write":var n=e.get(a.streamId);n||(n=new Jt,e.set(a.streamId,n));var r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);var e,a,n,r,i,s=t.length,_=0;for(r=0;r<s;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<s&&56320==(64512&(n=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(n-56320),r++),_+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(_),i=0,r=0;i<_;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<s&&56320==(64512&(n=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(n-56320),r++),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,K.Z_SYNC_FLUSH),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:Vt(n),additionalBytesCount:i.length};case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){Qt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}}))}catch(t){Qt(e,t)}}()}();`])))}var VD={status:0};function HD(e,t,n,r){switch(r===void 0&&(r=BD),VD.status===0&&WD(e,t,r),VD.status){case 1:return VD.initializationFailureCallbacks.push(n),VD.worker;case 3:return VD.worker}}function UD(){return VD.status}function WD(e,t,n){n===void 0&&(n=BD);try{var r=n(e),i=i_(e,r,`error`,function(n){qD(e,t,n)}).stop,a=i_(e,r,`message`,function(n){var r=n.data;r.type===`errored`?qD(e,t,r.error,r.streamId):r.type===`initialized`&&KD(r.version)}).stop;r.postMessage({action:`init`}),gm(function(){return GD(t)},zD),VD={status:1,worker:r,stop:function(){i(),a()},initializationFailureCallbacks:[]}}catch(n){qD(e,t,n)}}function GD(e){VD.status===1&&(B.error(`${e} failed to start: a timeout occurred while initializing the Worker`),VD.initializationFailureCallbacks.forEach(function(e){return e()}),VD={status:2})}function KD(e){VD.status===1&&(VD={status:3,worker:VD.worker,stop:VD.stop,version:e})}function qD(e,t,n,r){if(VD.status===1||VD.status===0){if(B.error(`${t} failed to start: an error occurred while creating the Worker:`,n),n instanceof Event||n instanceof Error&&JD(n.message)){var i=void 0;i=e.workerUrl?`Please make sure the Worker URL ${e.workerUrl} is correct and CSP is correctly configured.`:`Please make sure CSP is correctly configured.`,B.error(`${i} See documentation at ${mp}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else F_(n);VD.status===1&&VD.initializationFailureCallbacks.forEach(function(e){return e()}),VD={status:2}}else F_(n,{worker_version:VD.status===3&&VD.version,stream_id:r})}function JD(e){return qp(e,`Content Security Policy`)||qp(e,`requires 'TrustedScriptURL'`)}function YD(e,t){if(yv()&&!vv(`records`)||!FD())return{start:G,stop:G,getReplayStats:function(){},onRumStart:G,isRecording:function(){return!1},getSessionReplayLink:function(){}};var n={status:1},r=function(){n={status:1}},i=function(){n={status:0}},a=G;return{start:function(e){return r(e)},stop:function(){return i()},getSessionReplayLink:function(){return a()},onRumStart:function(o,s,c,l,u){s.startSessionReplayRecordingManually&&(n={status:0}),o.subscribe(8,function(){(n.status===2||n.status===3)&&(i(),n={status:1})}),o.subscribe(10,function(e){e.reason===xv.UNLOADING&&i()}),o.subscribe(9,function(){n.status===1&&r()});var d;function f(){return d||(u||=HD(s,`Datadog Session Replay`,function(){i()},t),u&&(d=RD(s,u,1))),d}r=function(t){var r=c.findTrackedSession();if(!r||r.sessionReplay===0&&(!t||!t.force)){n={status:1};return}n.status===2||n.status===3||(n={status:2},jv(s,`interactive`,function(){if(n.status===2){var t=f();if(!t){n={status:0};return}n={status:3,stopRecording:e(o,s,c,l,t).stop}}}),t&&t.force&&r.sessionReplay===0&&c.setForcedReplay())},i=function(){n.status!==0&&(n.status===3&&n.stopRecording(),n={status:0})},a=function(){return ID(s,c,l,n.status!==0)},n.status===1&&r()},isRecording:function(){return UD()===3&&n.status===3},getReplayStats:function(e){return UD()===3?ZT(e):void 0}}}var XD=Vb(BT,YD(PD),{startDeflateWorker:HD,createDeflateEncoder:RD});n_(om(),`DD_RUM`,XD);var ZD=365.2425,QD=6048e5,$D=864e5,eO=6e4,tO=36e5,nO=1e3,rO=3600*24;rO*7,rO*ZD/12*3;var iO=Symbol.for(`constructDateFrom`);function aO(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&iO in e?e[iO](t):e instanceof Date?new e.constructor(t):new Date(t)}function oO(e,t){return aO(t||e,e)}var sO={};function cO(){return sO}function lO(e,t){let n=cO(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=oO(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function uO(e,t){return lO(e,{...t,weekStartsOn:1}
vendor: 18,313 bytes, line 16
16)}function dO(e,t){let n=oO(e,t?.in),r=n.getFullYear(),i=aO(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=uO(i),o=aO(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=uO(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function fO(e){let t=oO(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function pO(e,...t){let n=aO.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function mO(e,t){let n=oO(e,t?.in);return n.setHours(0,0,0,0),n}function hO(e,t,n){let[r,i]=pO(n?.in,e,t),a=mO(r),o=mO(i),s=+a-fO(a),c=+o-fO(o);return Math.round((s-c)/$D)}function gO(e,t){let n=dO(e,t),r=aO(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),uO(r)}function _O(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function vO(e){return!(!_O(e)&&typeof e!=`number`||isNaN(+oO(e)))}function yO(e,t){let n=oO(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}var bO={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},xO=(e,t,n)=>{let r,i=bO[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function SO(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var CO={date:SO({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:SO({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:SO({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},wO={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},TO=(e,t,n,r)=>wO[e];function EO(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var DO={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:EO({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:EO({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:EO({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:EO({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:EO({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function OO(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?AO(s,e=>e.test(o)):kO(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function kO(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function AO(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function jO(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var MO={code:`en-US`,formatDistance:xO,formatLong:CO,formatRelative:TO,localize:DO,match:{ordinalNumber:jO({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:OO({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:OO({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:OO({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:OO({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:OO({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function NO(e,t){let n=oO(e,t?.in);return hO(n,yO(n))+1}function PO(e,t){let n=oO(e,t?.in),r=uO(n)-+gO(n);return Math.round(r/QD)+1}function FO(e,t){let n=oO(e,t?.in),r=n.getFullYear(),i=cO(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=aO(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=lO(o,t),c=aO(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=lO(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function IO(e,t){let n=cO(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=FO(e,t),a=aO(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),lO(a,t)}function LO(e,t){let n=oO(e,t?.in),r=lO(n,t)-+IO(n,t);return Math.round(r/QD)+1}function J(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var RO={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return J(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):J(n+1,2)},d(e,t){return J(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return J(e.getHours()%12||12,t.length)},H(e,t){return J(e.getHours(),t.length)},m(e,t){return J(e.getMinutes(),t.length)},s(e,t){return J(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return J(Math.trunc(r*10**(n-3)),t.length)}},zO={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},BO={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return RO.y(e,t)},Y:function(e,t,n,r){let i=FO(e,r),a=i>0?i:1-i;return t===`YY`?J(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):J(a,t.length)},R:function(e,t){return J(dO(e),t.length)},u:function(e,t){return J(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return J(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return J(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return RO.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return J(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=LO(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):J(i,t.length)},I:function(e,t,n){let r=PO(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):J(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):RO.d(e,t)},D:function(e,t,n){let r=NO(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):J(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return J(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return J(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return J(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?zO.noon:r===0?zO.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?zO.evening:r>=12?zO.afternoon:r>=4?zO.morning:zO.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return RO.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):RO.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):J(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):J(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):RO.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):RO.s(e,t)},S:function(e,t){return RO.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return HO(r);case`XXXX`:case`XX`:return UO(r);default:return UO(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return HO(r);case`xxxx`:case`xx`:return UO(r);default:return UO(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+VO(r,`:`);default:return`GMT`+UO(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+VO(r,`:`);default:return`GMT`+UO(r,`:`)}},t:function(e,t,n){return J(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return J(+e,t.length)}};function VO(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+J(a,2)}function HO(e,t){return e%60==0?(e>0?`-`:`+`)+J(Math.abs(e)/60,2):UO(e,t)}function UO(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=J(Math.trunc(r/60),2),a=J(r%60,2);return n+i+t+a}var WO=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},GO=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},KO={p:GO,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return WO(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,WO(r,t)).replace(`{{time}}`,GO(i,t))}},qO=/^D+$/,JO=/^Y+$/,YO=[`D`,`DD`,`YY`,`YYYY`];function XO(e){return qO.test(e)}function ZO(e){return JO.test(e)}function QO(e,t,n){let r=$O(e,t,n);if(console.warn(r),YO.includes(e))throw RangeError(r)}function $O(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var ek=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nk=/^'([^]*?)'?$/,rk=/''/g,ik=/[a-zA-Z]/;function ak(e,t,n){let r=cO(),i=n?.locale??r.locale??MO,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=oO(e,n?.in);if(!vO(s))throw RangeError(`Invalid time value`);let c=t.match(tk).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=KO[t];return n(e,i.formatLong)}return e}).join(``).match(ek).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:ok(e)};if(BO[t])return{isToken:!0,value:e};
16if(t.match(ik))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&ZO(a)||!n?.useAdditionalDayOfYearTokens&&XO(a))&&QO(a,t,String(e));let o=BO[a[0]];return o(s,a,i.localize,l)}).join(``)}function ok(e){let t=e.match(nk);return t?t[1].replace(rk,`'`):e}function sk(e,t){let n=()=>aO(t?.in,NaN),r=t?.additionalDigits??2,i=fk(e),a;if(i.date){let e=pk(i.date,r);a=mk(e.restDateString,e.year)}if(!a||isNaN(+a))return n();let o=+a,s=0,c;if(i.time&&(s=gk(i.time),isNaN(s)))return n();if(i.timezone){if(c=vk(i.timezone),isNaN(c))return n()}else{let e=new Date(o+s),n=oO(0,t?.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return oO(o+s+c,t?.in)}var ck={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},lk=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,uk=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,dk=/^([+-])(\d{2})(?::?(\d{2}))?$/;function fk(e){let t={},n=e.split(ck.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],ck.timeZoneDelimiter.test(t.date)&&(t.date=e.split(ck.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){let e=ck.timezone.exec(r);e?(t.time=r.replace(e[1],``),t.timezone=e[1]):t.time=r}return t}function pk(e,t){let n=RegExp(`^(?:(\\d{4}|[+-]\\d{`+(4+t)+`})|(\\d{2}|[+-]\\d{`+(2+t)+`})$)`),r=e.match(n);if(!r)return{year:NaN,restDateString:``};let i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function mk(e,t){if(t===null)return new Date(NaN);let n=e.match(lk);if(!n)return new Date(NaN);let r=!!n[4],i=hk(n[1]),a=hk(n[2])-1,o=hk(n[3]),s=hk(n[4]),c=hk(n[5])-1;if(r)return wk(t,s,c)?yk(t,s,c):new Date(NaN);{let e=new Date(0);return!Sk(t,a,o)||!Ck(t,i)?new Date(NaN):(e.setUTCFullYear(t,a,Math.max(i,o)),e)}}function hk(e){return e?parseInt(e):1}function gk(e){let t=e.match(uk);if(!t)return NaN;let n=_k(t[1]),r=_k(t[2]),i=_k(t[3]);return Tk(n,r,i)?n*tO+r*eO+i*1e3:NaN}function _k(e){return e&&parseFloat(e.replace(`,`,`.`))||0}function vk(e){if(e===`Z`)return 0;let t=e.match(dk);if(!t)return 0;let n=t[1]===`+`?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Ek(r,i)?n*(r*tO+i*eO):NaN}function yk(e,t,n){let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var bk=[31,null,31,30,31,30,31,31,30,31,30,31];function xk(e){return e%400==0||e%4==0&&e%100!=0}function Sk(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(bk[t]||(xk(e)?29:28))}function Ck(e,t){return t>=1&&t<=(xk(e)?366:365)}function wk(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Tk(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Ek(e,t){return t>=0&&t<=59}var Dk=[];for(let e=0;e<256;++e)Dk.push((e+256).toString(16).slice(1));function Ok(e,t=0){return(Dk[e[t+0]]+Dk[e[t+1]]+Dk[e[t+2]]+Dk[e[t+3]]+`-`+Dk[e[t+4]]+Dk[e[t+5]]+`-`+Dk[e[t+6]]+Dk[e[t+7]]+`-`+Dk[e[t+8]]+Dk[e[t+9]]+`-`+Dk[e[t+10]]+Dk[e[t+11]]+Dk[e[t+12]]+Dk[e[t+13]]+Dk[e[t+14]]+Dk[e[t+15]]).toLowerCase()}var kk,Ak=new Uint8Array(16);function jk(){if(!kk){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);kk=crypto.getRandomValues.bind(crypto)}return kk(Ak)}var Mk={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Nk(e,t,n){e||={};let r=e.random??e.rng?.()??jk();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Ok(r)}
16function Pk(e,t,n){return Mk.randomUUID&&!t&&!e?Mk.randomUUID():Nk(e,t,n)}function Fk(e){let t=new Map;return{get(e){return t.get(e)},set(n,r){!t.has(n)&&t.size>=e&&t.delete(t.keys().next().value),t.set(n,r)},clear(){t.clear()}}}var Ik=function(e){return e.iso8601=`yyyy-MM-dd`,e.longOrdinal=`MMMM d, yyyy`,e.longOrdinalShortMonth=`MMM d, yyyy`,e.longOrdinalSlashed=`MM/dd/yyyy`,e.longOrdinalSlashedNonPadded=`M/d/yyyy`,e.longOrdinalWithDay=`EEEE, MMMM dd, yyyy`,e.longOrdinalWithTimeAndZone=`MMMM dd, yyyy h:mma xxxxx`,e.month=`MMMM`,e.shortOrdinal=`MMMM d`,e.shortOrdinalShortMonth=`MMM d`,e}({}),Lk=(e,t=`longOrdinal`)=>(typeof e==`string`&&(e=sk(e)),ak(e,Ik[t])),Rk={raw:{style:`decimal`,minimumFractionDigits:0,maximumFractionDigits:2,useGrouping:!1},credit:{style:`currency`,currency:`USD`,signDisplay:`always`,minimumFractionDigits:2,maximumFractionDigits:2},debit:{style:`currency`,currency:`USD`,signDisplay:`always`,minimumFractionDigits:2,maximumFractionDigits:2},default:{style:`currency`,currency:`USD`,minimumFractionDigits:2,maximumFractionDigits:2},creditOptional:{style:`currency`,currency:`USD`,signDisplay:`always`,minimumFractionDigits:0,maximumFractionDigits:2},debitOptional:{style:`currency`,currency:`USD`,signDisplay:`always`,minimumFractionDigits:0,maximumFractionDigits:2},defaultOptional:{style:`currency`,currency:`USD`,minimumFractionDigits:0,maximumFractionDigits:2},creditDollar:{style:`currency`,currency:`USD`,signDisplay:`always`,minimumFractionDigits:0,maximumFractionDigits:0},debitDollar:{style:`currency`,currency:`USD`,signDisplay:`always`,minimumFractionDigits:0,maximumFractionDigits:0},defaultDollar:{style:`currency`,currency:`USD`,minimumFractionDigits:0,maximumFractionDigits:0},compact:{style:`currency`,currency:`USD`,notation:`compact`,compactDisplay:`short`,minimumFractionDigits:1,maximumFractionDigits:1},compactOptional:{style:`currency`,currency:`USD`,notation:`compact`,compactDisplay:`short`,minimumFractionDigits:0,maximumFractionDigits:1}},zk=e=>Number.isInteger(e),Bk=e=>typeof e==`object`&&!!e&&e.$type===`Money`&&typeof e.cents==`number`,Vk=e=>Bk(e)&&zk(e.cents),Hk=e=>Object.freeze({$type:`Money`,cents:Number(e.toFixed(0))}),Uk=e=>{if(Vk(e))return e;if(Number.isFinite(e))return Hk(e);throw TypeError("An invalid value was passed to `Money`")},Wk=e=>{if(typeof e!=`number`)throw TypeError(`Invalid cents`);return Number.isFinite(e)||console.warn("DEPRECATED: `toMoney` received invalid cents"),Hk(e)},Gk=e=>Math.round(parseFloat(e)*100)*1e4/1e4,Kk=e=>{let t=Gk(e.replace(/[^\d.-]/g,``));return zk(t)?Uk(t):null},qk=e=>{if(!Bk(e))throw TypeError(`Invalid money`);return e.cents/100},Jk=(e,t=`default`)=>{let n=qk(e);return Number.isFinite(n)||(n=0),/^debit/.exec(t)&&(n=-Math.abs(n)),new Intl.NumberFormat(`en-US`,Rk[t]).format(n)};function Yk(){return Pk()}function Xk(e,t,n=250,r,i,a,o){if(!a.exception||!a.exception.values||!o||!Ke(o.originalException,Error))return;let s=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;s&&(a.exception.values=eA(Zk(e,t,i,o.originalException,r,a.exception.values,s,0),n))}function Zk(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(Ke(r[i],Error)){Qk(o,s);let a=e(t,r[i]),l=c.length;$k(a,i,l,s),c=Zk(e,t,n,r[i],i,[a,...c],a,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,a)=>{if(Ke(r,Error)){Qk(o,s);let l=e(t,r),u=c.length;$k(l,`errors[${a}]`,u,s),c=Zk(e,t,n,r,i,[l,...c],l,u)}}),c}function Qk(e,t){e.mechanism=e.mechanism||{type:`generic`,handled:!0},e.mechanism={...e.mechanism,...e.type===`AggregateError`&&{is_exception_group:!0},exception_id:t}}function $k(e,t,n,r){e.mechanism=e.mechanism||{type:`generic`,handled:!0},e.mechanism={...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function eA(e,t){return e.map(e=>(e.value&&=ye(e.value,t),e))}var tA=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function nA(e){return e===`http`||e===`https`}function rA(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function iA(e){let t=tA.exec(e);if(!t){Pe(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a,o=``,s]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return aA({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function aA(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function oA(e){if(!Ae)return!0;let{port:t,projectId:n,protocol:r}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>e[t]?!1:(P.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:n.match(/^\d+$/)?nA(r)?t&&isNaN(parseInt(t,10))?(P.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(P.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(P.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function sA(e){let t=typeof e==`string`?iA(e):aA(e);if(!(!t||!oA(t)))return t}
16var cA=class extends Error{constructor(e,t=`warn`){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}},lA={},uA={};function dA(e,t){lA[e]=lA[e]||[],lA[e].push(t)}function fA(e,t){uA[e]||(t(),uA[e]=!0)}function pA(e,t){let n=e&&lA[e];if(n)for(let r of n)try{r(t)}catch(t){Ae&&P.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Me(r)}\nError:`,t)}}function mA(e){let t=`console`;dA(t,e),fA(t,hA)}function hA(){`console`in fe&&Oe.forEach(function(e){e in fe.console&&D(fe.console,e,function(t){return se[e]=t,function(...t){pA(`console`,{args:t,level:e});let n=se[e];n&&n.apply(fe.console,t)}})})}var gA=fe,_A=1e3,vA,yA,bA;function xA(e){dA(`dom`,e),fA(`dom`,SA)}function SA(){if(!gA.document)return;let e=pA.bind(null,`dom`),t=TA(e,!0);gA.document.addEventListener(`click`,t,!1),gA.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=gA[t]&&gA[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty(`addEventListener`)||(D(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this,a=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},o=a[n]=a[n]||{refCount:0};if(!o.handler){let r=TA(e);o.handler=r,t.call(this,n,r,i)}o.refCount++}catch{}return t.call(this,n,r,i)}}),D(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this,i=n.__sentry_instrumentation_handlers__||{},a=i[t];a&&(a.refCount--,a.refCount<=0&&(e.call(this,t,a.handler,r),a.handler=void 0,delete i[t]),Object.keys(i).length===0&&delete n.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function CA(e){if(e.type!==yA)return!1;try{if(!e.target||e.target._sentryId!==bA)return!1}catch{}return!0}function wA(e,t){return e===`keypress`?!t||!t.tagName||!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!1}function TA(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=EA(n);if(wA(n.type,r))return;re(n,`_sentryCaptured`,!0),r&&!r._sentryId&&re(r,`_sentryId`,_());let i=n.type===`keypress`?`input`:n.type;CA(n)||(e({event:n,name:i,global:t}),yA=n.type,bA=r?r._sentryId:void 0),clearTimeout(vA),vA=gA.setTimeout(()=>{bA=void 0,yA=void 0},_A)}}function EA(e){try{return e.target}catch{return null}}var DA=he();function OA(){if(!(`fetch`in DA))return!1;try{return new Headers,new Request(`http://www.example.com`),new Response,!0}catch{return!1}}function kA(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function AA(){if(typeof EdgeRuntime==`string`)return!0;if(!OA())return!1;if(kA(DA.fetch))return!0;let e=!1,t=DA.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);
16n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=kA(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){Ae&&P.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function jA(e){let t=`fetch`;dA(t,e),fA(t,MA)}function MA(){AA()&&D(fe,`fetch`,function(e){return function(...t){let{method:n,url:r}=FA(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return pA(`fetch`,{...i}),e.apply(fe,t).then(e=>(pA(`fetch`,{...i,endTimestamp:Date.now(),response:e}),e),e=>{throw pA(`fetch`,{...i,endTimestamp:Date.now(),error:e}),e})}})}function NA(e,t){return!!e&&typeof e==`object`&&!!e[t]}function PA(e){return typeof e==`string`?e:e?NA(e,`url`)?e.url:e.toString?e.toString():``:``}function FA(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:PA(t),method:NA(n,`method`)?String(n.method).toUpperCase():`GET`}}let t=e[0];return{url:PA(t),method:NA(t,`method`)?String(t.method).toUpperCase():`GET`}}var IA=null;function LA(e){let t=`error`;dA(t,e),fA(t,RA)}function RA(){IA=fe.onerror,fe.onerror=function(e,t,n,r,i){return pA(`error`,{column:r,error:i,line:n,msg:e,url:t}),IA&&!IA.__SENTRY_LOADER__?IA.apply(this,arguments):!1},fe.onerror.__SENTRY_INSTRUMENTED__=!0}var zA=null;function BA(e){let t=`unhandledrejection`;dA(t,e),fA(t,VA)}function VA(){zA=fe.onunhandledrejection,fe.onunhandledrejection=function(e){return pA(`unhandledrejection`,e),zA&&!zA.__SENTRY_LOADER__?zA.apply(this,arguments):!0},fe.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var HA=he();function UA(){let e=HA.chrome,t=e&&e.app&&e.app.runtime,n=`history`in HA&&!!HA.history.pushState&&!!HA.history.replaceState;return!t&&n}var WA=fe,GA;function KA(e){let t=`history`;dA(t,e),fA(t,qA)}function qA(){if(!UA())return;let e=WA.onpopstate;WA.onpopstate=function(...t){let n=WA.location.href,r=GA;if(GA=n,pA(`history`,{from:r,to:n}),e)try{return e.apply(this,t)}catch{}};function t(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let e=GA,t=String(n);GA=t,pA(`history`,{from:e,to:t})}return e.apply(this,t)}}D(WA.history,`pushState`,t),D(WA.history,`replaceState`,t)}var JA=fe,YA=`__sentry_xhr_v3__`;function XA(e){dA(`xhr`,e),fA(`xhr`,ZA)}function ZA(){if(!JA.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;D(e,`open`,function(e){return function(...t){let n=Date.now(),r=h(t[0])?t[0].toUpperCase():void 0,i=QA(t[1]);if(!r||!i)return e.apply(this,t);this[YA]={method:r,url:i,request_headers:{}},r===`POST`&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let a=()=>{let e=this[YA];if(e&&this.readyState===4){try{e.status_code=this.status}catch{}pA(`xhr`,{args:[r,i],endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return`onreadystatechange`in this&&typeof this.onreadystatechange==`function`?D(this,`onreadystatechange`,function(e){return function(...t){return a(),e.apply(this,t)}}):this.addEventListener(`readystatechange`,a),D(this,`setRequestHeader`,function(e){return function(...t){let[n,r]=t,i=this[YA];return i&&h(n)&&h(r)&&(i.request_headers[n.toLowerCase()]=r),e.apply(this,t)}}),e.apply(this,t)}}),D(e,`send`,function(e){return function(...t){let n=this[YA];return n?(t[0]!==void 0&&(n.body=t[0]),pA(`xhr`,{args:[n.method,n.url],startTimestamp:Date.now(),xhr:this}),e.apply(this,t)):e.apply(this,t)}})}function QA(e){if(h(e))return e;try{return e.toString()}catch{}}function $A(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function ej(){return`npm`}function tj(){return!$A()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function nj(){return typeof window<`u`&&(!tj()||rj())}function rj(){return fe.process!==void 0&&fe.process.type===`renderer`}function ij(e){let t=[];function n(){return e===void 0||t.length<e}function r(e){return t.splice(t.indexOf(e),1)[0]}function i(e){if(!n())return y(new cA(`Not adding Promise because buffer limit was reached.`));let i=e();return t.indexOf(i)===-1&&t.push(i),i.then(()=>r(i)).then(null,()=>r(i).then(null,()=>{})),i}function a(e){return new g((n,r)=>{let i=t.length;if(!i)return n(!0);let a=setTimeout(()=>{e&&e>0&&n(!1)},e);
16t.forEach(e=>{S(e).then(()=>{--i||(clearTimeout(a),n(!0))},r)})})}return{$:t,add:i,drain:a}}function aj(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}var oj=[`fatal`,`error`,`warning`,`log`,`info`,`debug`];function sj(e){return e===`warn`?`warning`:oj.includes(e)?e:`log`}function cj(e,t=[]){return[e,t]}function lj(e,t){let[n,r]=e;return[n,[...r,t]]}function uj(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function dj(e,t){return(t||new TextEncoder).encode(e)}function fj(e,t){let[n,r]=e,i=JSON.stringify(n);function a(e){typeof i==`string`?i=typeof e==`string`?i+e:[dj(i,t),e]:i.push(typeof e==`string`?dj(e,t):e)}for(let e of r){let[t,n]=e;if(a(`\n${JSON.stringify(t)}\n`),typeof n==`string`||n instanceof Uint8Array)a(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(O(n))}a(e)}}return typeof i==`string`?i:pj(i)}function pj(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function mj(e,t){let n=typeof e.data==`string`?dj(e.data,t):e.data;return[ne({type:`attachment`,length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var hj={session:`session`,sessions:`session`,attachment:`attachment`,transaction:`transaction`,event:`error`,client_report:`internal`,user_report:`default`,profile:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,feedback:`feedback`,span:`span`,statsd:`metric_bucket`};function gj(e){return hj[e]}function _j(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function vj(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:rA(r)},...i&&{trace:ne({...i})}}}function yj(e,t,n){let r=[{type:`client_report`},{timestamp:n||w(),discarded_events:e}];return cj(t?{dsn:t}:{},[r])}var bj=60*1e3;function xj(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?bj:r-t}function Sj(e,t){return e[t]||e.all||0}function Cj(e,t,n=Date.now()){return Sj(e,t)>n}function wj(e,{statusCode:t,headers:n},r=Date.now()){let i={...e},a=n&&n[`x-sentry-rate-limits`],o=n&&n[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+xj(o,r):t===429&&(i.all=r+60*1e3);return i}function Tj(e,t){return e??t()}function Ej(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}function Dj(e){return(e||Le()).getScope().getTransaction()}var Oj=!1;function kj(){Oj||(Oj=!0,LA(Aj),BA(Aj))}function Aj(){let e=Dj();if(e){let t=`internal_error`;f&&P.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}Aj.tag=`sentry_tracingErrorCallback`;var jj;(function(e){e.Ok=`ok`,e.DeadlineExceeded=`deadline_exceeded`,e.Unauthenticated=`unauthenticated`,e.PermissionDenied=`permission_denied`,e.NotFound=`not_found`,e.Re
16sourceExhausted=`resource_exhausted`,e.InvalidArgument=`invalid_argument`,e.Unimplemented=`unimplemented`,e.Unavailable=`unavailable`,e.InternalError=`internal_error`,e.UnknownError=`unknown_error`,e.Cancelled=`cancelled`,e.AlreadyExists=`already_exists`,e.FailedPrecondition=`failed_precondition`,e.Aborted=`aborted`,e.OutOfRange=`out_of_range`,e.DataLoss=`data_loss`})(jj||={});function Mj(e){if(e<400&&e>=100)return`ok`;if(e>=400&&e<500)switch(e){case 401:return`unauthenticated`;case 403:return`permission_denied`;case 404:return`not_found`;case 409:return`already_exists`;case 413:return`failed_precondition`;case 429:return`resource_exhausted`;default:return`invalid_argument`}if(e>=500&&e<600)switch(e){case 501:return`unimplemented`;case 503:return`unavailable`;case 504:return`deadline_exceeded`;default:return`internal_error`}return`unknown_error`}function Nj(e,t){e.setTag(`http.status_code`,String(t)),e.setData(`http.response.status_code`,t);let n=Mj(t);n!==`unknown_error`&&e.setStatus(n)}function Pj(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=F(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||`tracesSampleRate`in n||`tracesSampler`in n)}function Fj(e){if(!Pj())return;let t=Rj(e),n=Le(),r=e.scope?e.scope.getSpan():Ij();if(e.onlyIfParent&&!r)return;let i=(e.scope||Te()).clone();return Lj(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:i})}function Ij(){return Te().getSpan()}function Lj(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:i}){if(!Pj())return;let a=De(),o;if(t&&!r)o=t.startChild(n);else if(t){let r=ke(t),{traceId:i,spanId:a}=t.spanContext(),s=ce(t);o=e.startTransaction({traceId:i,parentSpanId:a,parentSampled:s,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}else{let{traceId:t,dsc:r,parentSpanId:s,sampled:c}={...a.getPropagationContext(),...i.getPropagationContext()};o=e.startTransaction({traceId:t,parentSpanId:s,parentSampled:c,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}return i.setSpan(o),Vj(o,i,a),o}function Rj(e){if(e.startTime){let t={...e};return t.startTimestamp=Ge(e.startTime),delete t.startTime,t}return e}var zj=`_sentryScope`,Bj=`_sentryIsolationScope`;function Vj(e,t,n){e&&(re(e,Bj,n),re(e,zj,t))}function Hj(e){return{scope:e[zj],isolationScope:e[Bj]}}var Uj;function Wj(e){return Uj?Uj.get(e):void 0}function Gj(e){let t=Wj(e);if(!t)return;let n={};for(let[,[e,r]]of t)n[e]||(n[e]=[]),n[e].push(ne(r));return n}var Kj=`sentry.source`,qj=`sentry.sample_rate`,Jj=`sentry.op`,Yj=`sentry.origin`,Xj=`profile_id`,Zj=class{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}},Qj=class e{constructor(e={}){this._traceId=e.traceId||_(),this._spanId=e.spanId||_().substring(16),this._startTime=e.startTimestamp||E(),this.tags=e.tags?{...e.tags}:{},this.data=e.data?{...e.data}:{},this.instrumenter=e.instrumenter||`sentry`,this._attributes={},this.setAttributes({[Yj]:e.origin||`manual`,[Jj]:e.op,...e.attributes}),this._name=e.name||e.description,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),`sampled`in e&&(this._sampled=e.sampled),e.status&&(this._status=e.status),e.endTimestamp&&(this._endTime=e.endTimestamp),e.exclusiveTime!==void 0&&(this._exclusiveTime=e.exclusiveTime),this._measurements=e.measurements?{...e.measurements}:{}}get name(){return this._name||``}set name(e){this.updateName(e)}get description(){return this._name}set description(e){this._name=e}get traceId(){return this._traceId}set traceId(e){this._traceId=e}get spanId(){return this._spanId}set spanId(e){this._spanId=e}set parentSpanId(e){this._parentSpanId=e}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(e){this._sampled=e}get attributes(){return this._attributes}set attributes(e){this._attributes=e}get startTimestamp(){return this._startTime}set startTimestamp(e){this._startTime=e}get endTimestamp(){return this._endTime}set endTimestamp(e){this._endTime=e}get status(){return this._status}set status(e){this._status=e}get op(){return this._attributes[Jj]}set op(e){this.setAttribute(Jj,e)}get origin(){return this._attributes[Yj]}set origin(e){this.setAttribute(Yj,e)}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}startChild(t){let n=new e({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);let r=Fe(this);if(n.transaction=r,f&&r){let e=`[Tracing] Starting '${t&&t.op||`< unknown op >`}' span on transaction '${k(n).description||`< unknown name >`}' (${r.spanContext().spanId}).`;P.log(e),this._logMessage=e}return n}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setAttribute(e,t){t===void 0?delete this._attributes[e]:this._attributes[e]=t}setAttributes(e){Object.keys(e).forEach(t=>this.setAttribute(t,e[t]))}setStatus(e){return this._status=e,this}setHttpStatus(e){return Nj(this,e),this}setName(e){this.updateName(e)}updateName(e){return this._name=e,this}isSuccess(){return this._status===`ok`}finish(e){return this.end(e)}end(e){if(this._endTime)return;let t=Fe(this);if(f&&t&&t.spanContext().spanId!==this._spanId){let e=this._logMessage;e&&P.log(e.replace(`Starting`,`Finishing`))}this._endTime=Ge(e)}toTraceparent(){return Ue(this)}toContext(){return ne({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(e){return this.data=e.data||{},this._name=e.name||e.description,this._endTime=e.endTimestamp,this.op=e.op,this._parentSpanId=e.parentSpanId,this._sampled=e.sampled,this._spanId=e.spanId||this._spanId,this._startTime=e.startTimestamp||this._startTime,this._status=e.status,this.tags=e.tags||{},this._traceId=e.traceId||this._traceId,this}getTraceContext(){return u(this)}getSpanJSON(){return ne({data:this._getData(),description:this._name,op:this._attributes[Jj],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Yj],_metrics_summary:Gj(this),profile_id:this._attributes[Xj],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}
16toJSON(){return this.getSpanJSON()}_getData(){let{data:e,_attributes:t}=this,n=Object.keys(e).length>0,r=Object.keys(t).length>0;if(!(!n&&!r))return n&&r?{...e,...t}:n?e:t}},$j=class extends Qj{constructor(e,t){super(e),this._contexts={},this._hub=t||Le(),this._name=e.name||``,this._metadata={...e.metadata},this._trimEnd=e.trimEnd,this.transaction=this;let n=this._metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}get metadata(){return{source:`custom`,spanMetadata:{},...this._metadata,...this._attributes[`sentry.source`]&&{source:this._attributes[`sentry.source`]},...this._attributes[`sentry.sample_rate`]&&{sampleRate:this._attributes[`sentry.sample_rate`]}}}set metadata(e){this._metadata=e}setName(e,t=`custom`){this._name=e,this.setAttribute(Kj,t)}updateName(e){return this._name=e,this}initSpanRecorder(e=1e3){this.spanRecorder||=new Zj(e),this.spanRecorder.add(this)}setContext(e,t){t===null?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=``){this._measurements[e]={value:t,unit:n}}setMetadata(e){this._metadata={...this._metadata,...e}}end(e){let t=Ge(e),n=this._finishTransaction(t);if(n)return this._hub.captureEvent(n)}toContext(){return ne({...super.toContext(),name:this._name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this._name=e.name||``,this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){return ke(this)}setHub(e){this._hub=e}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(e){if(this._endTime!==void 0)return;this._name||=(f&&P.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`),super.end(e);let t=this._hub.getClient();if(t&&t.emit&&t.emit(`finishTransaction`,this),this._sampled!==!0){f&&P.log(`[Tracing] Discarding transaction because its trace was not chosen to be sampled.`),t&&t.recordDroppedEvent(`sample_rate`,`transaction`);return}let n=this.spanRecorder?this.spanRecorder.spans.filter(e=>e!==this&&k(e).timestamp):[];if(this._trimEnd&&n.length>0){let e=n.map(e=>k(e).timestamp).filter(Boolean);this._endTime=e.reduce((e,t)=>e>t?e:t)}let{scope:r,isolationScope:i}=Hj(this),{metadata:a}=this,{source:o}=a,s={contexts:{...this._contexts,trace:u(this)},spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{...a,capturedSpanScope:r,capturedSpanIsolationScope:i,...ne({dynamicSamplingContext:ke(this)})},_metrics_summary:Gj(this),...o&&{transaction_info:{source:o}}};return Object.keys(this._measurements).length>0&&(f&&P.log(`[Measurements] Adding measurements to transaction`,JSON.stringify(this._measurements,void 0,2)),s.measurements=this._measurements),f&&P.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),s}},eM={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},tM=`finishReason`,nM=[`heartbeatFailed`,`idleTimeout`,`documentHidden`,`finalTimeout`,`externalFinish`,`cancelled`],rM=class extends Zj{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){if(e.spanContext().spanId!==this.transactionSpanId){let t=e.end;e.end=(...n)=>(this._popActivity(e.spanContext().spanId),t.apply(e,n)),k(e).timestamp===void 0&&this._pushActivity(e.spanContext().spanId)}super.add(e)}},iM=class extends $j{constructor(e,t,n=eM.idleTimeout,r=eM.finalTimeout,i=eM.heartbeatInterval,a=!1,o=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=i,this._onScope=a,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=nM[4],this._autoFinishAllowed=!o,a&&(f&&P.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),t.getScope().setSpan(this)),o||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus(`deadline_exceeded`),this._finishReason=nM[3],this.end())},this._finalTimeout)}end(e){let t=Ge(e);if(this._finished=!0,this.activities={},this.op===`ui.action.click`&&this.setAttribute(tM,this._finishReason),this.spanRecorder){f&&P.log(`[Tracing] finishing IdleTransaction`,new Date(t*1e3).toISOString(),this.op);for(let e of this._beforeFinishCallbacks)e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter(e=>{if(e.spanContext().spanId===this.spanContext().spanId)return!0;k(e).timestamp||(e.setStatus(`cancelled`),e.end(t),f&&P.log(`[Tracing] cancelling span since transaction ended early`,JSON.stringify(e,void 0,2)));let{start_timestamp:n,timestamp:r}=k(e),i=n&&n<t,a=(this._finalTimeout+this._idleTimeout)/1e3,o=r&&n&&r-n<a;if(f){let t=JSON.stringify(e,void 0,2);i?o||P.log(`[Tracing] discarding Span since it finished after Transaction final timeout`,t):P.log(`[Tracing] discarding Span since it happened after Transaction was finished`,t)}return i&&o}),f&&P.log(`[Tracing] flushing IdleTransaction`)}else f&&P.log(`[Tracing] No active IdleTransaction`);if(this._onScope){let e=this._idleHub.getScope();e.getTransaction()===this&&e.setSpan(void 0)}return super.end(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){let t=e=>{this._finished||this._pushActivity(e)},n=e=>{this._finished||this._popActivity(e)};this.spanRecorder=new rM(t,n,this.spanContext().spanId,e),f&&P.log(`Starting heartbeat`),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=t===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=nM[5],this.end(e)))}setFinishReason(e){this._finishReason=e}sendAutoFinishSignal(){this._autoFinishAllowed||=(f&&P.log(`[Tracing] Received finish signal for idle transaction.`),this._restartIdleTimeout(),!0)}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=nM[1],this.end(e))},this._idleTimeout)}
16_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),f&&P.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,f&&P.log(`[Tracing] new activities count`,Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(f&&P.log(`[Tracing] popActivity ${e}`),delete this.activities[e],f&&P.log(`[Tracing] new activities count`,Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let e=E();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=nM[5],this.end(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let e=Object.keys(this.activities).join(``);e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?this._autoFinishAllowed&&(f&&P.log(`[Tracing] Transaction finished because of no change for 3 heart beats`),this.setStatus(`deadline_exceeded`),this._finishReason=nM[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){f&&P.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};function aM(e,t,n){if(!Pj(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(qj,Number(e.sampled)),e;let r;return typeof t.tracesSampler==`function`?(r=t.tracesSampler(n),e.setAttribute(qj,Number(r))):n.parentSampled===void 0?t.tracesSampleRate===void 0?(r=1,e.setAttribute(qj,r)):(r=t.tracesSampleRate,e.setAttribute(qj,Number(r))):r=n.parentSampled,oM(r)?r?(e.sampled=Math.random()<r,e.sampled?(f&&P.log(`[Tracing] starting ${e.op} transaction - ${k(e).description}`),e):(f&&P.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):(f&&P.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),e.sampled=!1,e):(f&&P.warn(`[Tracing] Discarding transaction because of invalid sample rate.`),e.sampled=!1,e)}function oM(e){return A(e)||!(typeof e==`number`||typeof e==`boolean`)?(f&&P.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e<0||e>1?(f&&P.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function sM(){let e=this.getScope().getSpan();return e?{"sentry-trace":Ue(e)}:{}}function cM(e,t){let n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||`sentry`,a=e.instrumenter||`sentry`;i!==a&&(f&&P.error(`A transaction was started with instrumenter=\`${a}\`, but the SDK is configured with the \`${i}\` instrumenter.
17The transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),e.sampled=!1);let o=new $j(e,this);return o=aM(o,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),o.isRecording()&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit(`startTransaction`,o),o}function lM(e,t,n,r,i,a,o,s=!1){let c=e.getClient(),l=c&&c.getOptions()||{},u=new iM(t,e,n,r,o,i,s);return u=aM(u,l,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...a}),u.isRecording()&&u.initSpanRecorder(l._experiments&&l._experiments.maxSpans),c&&c.emit&&c.emit(`startTransaction`,u),u}function uM(){let e=Ne();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=cM),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=sM),kj())}function dM(e,t,n){let r=Dj();r&&r.setMeasurement(e,t,n)}function fM(e,t){return t?(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]],e):e}function pM(e,t,n,r){let i=_j(n);return cj({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:rA(t)}
17},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function mM(e,t,n,r){let i=_j(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;fM(e,n&&n.sdk);let o=vj(e,i,r,t);return delete e.sdkProcessingMetadata,cj(o,[[{type:a},e]])}var hM=`7`;function gM(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function _M(e){return`${gM(e)}${e.projectId}/envelope/`}function vM(e,t){return Re({sentry_key:e.publicKey,sentry_version:hM,...t&&{sentry_client:`${t.name}/${t.version}`}})}function yM(e,t={}){let n=typeof t==`string`?t:t.tunnel,r=typeof t==`string`||!t._metadata?void 0:t._metadata.sdk;return n||`${_M(e)}?${vM(e,r)}`}function bM(e,t){let n=sA(e);if(!n)return``;let r=`${gM(n)}embed/error-page/`,i=`dsn=${rA(n)}`;for(let e in t)if(e!==`dsn`&&e!==`onClose`)if(e===`user`){let e=t.user;if(!e)continue;e.name&&(i+=`&name=${encodeURIComponent(e.name)}`),e.email&&(i+=`&email=${encodeURIComponent(e.email)}`)}else i+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${i}`}var xM=[];function SM(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.keys(t).map(e=>t[e])}function CM(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;r=Array.isArray(n)?[...t,...n]:typeof n==`function`?v(n(t)):t;let i=SM(r),a=DM(i,e=>e.name===`Debug`);if(a!==-1){let[e]=i.splice(a,1);i.push(e)}return i}function wM(e,t){let n={};return t.forEach(t=>{t&&EM(e,t,n)}),n}function TM(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function EM(e,t,n){if(n[t.name]){f&&P.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,xM.indexOf(t.name)===-1&&(t.setupOnce(m,Le),xM.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),e.on&&typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(e.addEventProcessor&&typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}f&&P.log(`Integration installed: ${t.name}`)}function DM(e,t){for(let n=0;n<e.length;n++)if(t(e[n])===!0)return n;return-1}function OM(e,t){return Object.assign(function(...e){return t(...e)},{id:e})}function kM(e){return e}function AM(e){let t=``;for(let n of e){let e=Object.entries(n.tags),r=e.length>0?`|#${e.map(([e,t])=>`${e}:${t}`).join(`,`)}`:``;t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return t}function jM(e,t,n,r){let i={sent_at:new Date().toISOString()};return n&&n.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(i.dsn=rA(t)),cj(i,[MM(e)])}function MM(e){let t=AM(e);return[{type:`statsd`,length:t.length},t]}var NM=`Not capturing exception because it's already been captured.`,PM=class{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=sA(e.dsn):f&&P.warn(`No DSN provided, client will not send events.`),this._dsn){let t=yM(this._dsn,e);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(ee(e)){f&&P.log(NM);return}let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,n)).then(e=>{r=e})),r}captureMessage(e,t,n,r){let i=n&&n.event_id,a=d(e)?e:String(e),o=M(e)?this.eventFromMessage(a,t,n):this.eventFromException(e,n);return this._process(o.then(e=>this._captureEvent(e,n,r)).then(e=>{i=e})),i}captureEvent(e,t,n){if(t&&t.originalException&&ee(t.originalException)){f&&P.log(NM);return}let r=t&&t.event_id,i=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,t,i||n).then(e=>{r=e})),r}captureSession(e){typeof e.release==`string`?(this.sendSession(e),j(e,{init:!1})):f&&P.warn(`Discarded session because of missing or non-string release`)}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isCl
17ientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):S(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return f&&P.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){let t=this._integrations[e.name];EM(this,e,this._integrations),t||TM(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=mM(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=lj(n,mj(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));let r=this._sendEnvelope(n);r&&r.then(t=>this.emit(`afterSendEvent`,e,t),null)}sendSession(e){let t=pM(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=typeof n==`number`?n:1,i=`${e}:${t}`;f&&P.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}captureAggregateMetrics(e){f&&P.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);let t=jM(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach(e=>e(...t))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=wM(this,e),TM(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,t){let n=!1,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;for(let e of i){let t=e.mechanism;if(t&&t.handled===!1){n=!0;break}}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(j(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new g(t=>{let n=0,r=setInterval(()=>{this._numProcessing==0?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r=De()){let i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),qe(i,e,t,n,this,r).then(e=>{if(e===null)return e;let t={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(e.contexts&&e.contexts.trace)&&t){let{traceId:r,spanId:i,parentSpanId:a,dsc:o}=t;e.contexts={trace:{trace_id:r,span_id:i,parent_span_id:a},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:o||oe(r,this,n),...e.sdkProcessingMetadata}}return e})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{if(f){let t=e;t.logLevel===`log`?P.log(t.message):P.warn(t)}})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,a=RM(e),o=LM(e),s=e.type||`error`,c=`before send for type \`${s}\``;if(o&&typeof i==`number`&&Math.random()>i)return this.recordDroppedEvent(`sample_rate`,`error`,e),y(new cA(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,`log`));let l=s===`replay_event`?`replay`:s,u=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,u).then(n=>{if(n===null)throw this.recordDroppedEvent(`event_processor`,l,e),new cA("An event processor returned `null`, will not send event.",`log`);return t.data&&t.data.__sentry__===!0?n:FM(IM(r,n,t),c)}).then(r=>{if(r===null){if(this.recordDroppedEvent(`before_send`,l,e),a){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw new cA(`${c} returned \`null\`, will not send event.`,`log`)}let i=n&&n.getSession();if(!a&&i&&this._updateSessionFromEvent(i,r),a){let e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let o=r.transaction_info;return a&&o&&r.transaction!==e.transaction&&(r.transaction_info={...o,source:`custom`}),this.sendEvent(r,t),r}).then(null,e=>{throw e instanceof cA?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new cA(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}
17_sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,e=>{f&&P.error(`Error while sending event:`,e)});f&&P.error(`Transport disabled`)}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{let[n,r]=t.split(`:`);return{reason:n,category:r,quantity:e[t]}})}};function FM(e,t){let n=`${t} must return \`null\` or a valid event.`;if(p(e))return e.then(e=>{if(!We(e)&&e!==null)throw new cA(n);return e},e=>{throw new cA(`${t} rejected with ${e}`)});if(!We(e)&&e!==null)throw new cA(n);return e}function IM(e,t,n){let{beforeSend:r,beforeSendTransaction:i}=e;if(LM(t)&&r)return r(t,n);if(RM(t)&&i){if(t.spans){let e=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(t,n)}return t}function LM(e){return e.type===void 0}function RM(e){return e.type===`transaction`}function zM(e){let t=F();!t||!t.addEventProcessor||t.addEventProcessor(e)}function BM(e,t){t.debug===!0&&(f?P.enable():Pe(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Te().update(t.initialScope);let n=new e(t);VM(n),HM(n)}function VM(e){let t=Le().getStackTop();t.client=e,t.scope.setClient(e)}function HM(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}function UM(e,t,n=ij(e.bufferSize||30)){let r={},i=e=>n.drain(e);function a(i){let a=[];if(uj(i,(t,n)=>{let i=gj(n);if(Cj(r,i)){let r=WM(t,n);e.recordDroppedEvent(`ratelimit_backoff`,i,r)}else a.push(t)}),a.length===0)return S();let o=cj(i[0],a),s=t=>{uj(o,(n,r)=>{let i=WM(n,r);e.recordDroppedEvent(t,gj(r),i)})};return n.add(()=>t({body:fj(o,e.textEncoder)}).then(e=>(e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&f&&P.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=wj(r,e),e),e=>{throw s(`network_error`),e})).then(e=>e,e=>{if(e instanceof cA)return f&&P.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),S();throw e})}return a.__sentry__baseTransport__=!0,{send:a,flush:i}}function WM(e,t){if(!(t!==`event`&&t!==`transaction`))return Array.isArray(e)?e[1]:void 0}function GM(e,t){let n={sent_at:new Date().toISOString()};return t&&(n.dsn=rA(t)),cj(n,e.map(KM))}function KM(e){return[{type:`span`},e]}function qM(e,t){let n=t&&ZM(t)?t.getClient():t,r=n&&n.getDsn(),i=n&&n.getOptions().tunnel;return YM(e,r)||JM(e,i)}function JM(e,t){return t?XM(e)===XM(t):!1}function YM(e,t){return t?e.includes(t.host):!1}function XM(e){return e[e.length-1]===`/`?e.slice(0,-1):e}function ZM(e){return e.getClient!==void 0}function QM(e,t,n=[t],r=`npm`){let i=e._metadata||{};i.sdk||={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:be})),version:be},e._metadata=i}var $M=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],eN=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],tN=`InboundFilters`,nN=kM(((e={})=>({name:tN,setupOnce(){},processEvent(t,n,r){return iN(t,rN(e,r.getOptions()))?null:t}})));OM(tN,nN);function rN(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:$M],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:eN],ignoreInternal:e.ignoreInternal===void 0||e.ignoreInternal}}function iN(e,t){return t.ignoreInternal&&uN(e)?(f&&P.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${N(e)}`),!0):aN(e,t.ignoreErrors)?(f&&P.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${N(e)}`),!0):oN(e,t.ignoreTransactions)?(f&&P.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${N(e)}`),!0):sN(e,t.denyUrls)?(f&&P.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${N(e)}.\nUrl: ${fN(e)}`),!0):cN(e,t.allowUrls)?!1:(f&&P.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${N(e)}.\nUrl: ${fN(e)}`),!0)}function aN(e,t){return e.type||!t||!t.length?!1:lN(e).some(e=>Ee(e,t))}function oN(e,t){if(e.type!==`transaction`||!t||!t.length)return!1;let n=e.transaction;return n?Ee(n,t):!1}function sN(e,t){if(!t||!t.length)return!1;let n=fN(e);return n?Ee(n,t):!1}function cN(e,t){if(!t||!t.length)return!0;let n=fN(e);return!n||Ee(n,t)}function lN(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),f&&t.length===0&&P.error(`Could not extract message for event ${N(e)}`),t}function uN(e){try{return e.exception.values[0].type===`SentryError`}catch{}return!1}function dN(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function fN(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?dN(t):null}catch{return f&&P.error(`Cannot extract url for event ${N(e)}`),null}}var pN,mN=`FunctionToString`,hN=new WeakMap,gN=kM((()=>({name:mN,setupOnce(){pN=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=s(this),n=hN.has(F())&&t!==void 0?t:this;return pN.apply(n,e)}}catch{}},setup(e){hN.set(e,!0)}})));OM(mN,gN);var _N=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Y=fe;function vN(){Y.document?Y.document.addEventListener(`visibilitychange`,()=>{let e=Dj();if(Y.document.hidden&&e){let t=`cancelled`,{op:n,status:r}=k(e);_N&&P.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus(t),e.setTag(`visibilitychange`,`document.hidden`),e.end()}}):_N&&P.warn(`[Tracing] Could not set up background tab detection due to lack of global document`)}var yN=(e,t,n)=>{let r,i;return a=>{t.value>=0&&(a||n)&&(i=t.value-(r||0),(i||r===void 0)&&(r=t.value,t.delta=i,e(t)))}},bN=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+0xe8d4a51000}`,xN=()=>{let e=Y.performance.timing,t=Y.performance.navigation.type,n={entryType:`navigation`,startTime:0,type:t==2?`back_forward`:t===1?`reload`:`navigate`};for(let t in e)t!==`navigationStart`&&t!==`toJSON`&&(n[t]=Math.max(e[t]-e.navigationStart,0));return n},SN=()=>Y.__WEB_VITALS_POLYFILL__?Y.performance&&(performance.getEntriesByType&&performance.getEntriesByType(`navigation`)[0]||xN()):Y.performance&&performance.getEntriesByType&&performance.getEntriesByType(`navigation`)[0],CN=()=>{let e=SN();return e&&e.activationStart||0},wN=(e,t)=>{let n=SN(),r=`navigate`;return n&&(r=Y.document&&Y.document.prerendering||CN()>0?`prerender`:n.type.replace(/_/g,`-`)),{name:e,value:t===void 0?-1:t,rating:`good`,delta:0,entries:[],id:bN(),navigationType:r}},TN=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{t(e.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},EN=(e,t)=>{let n=r=>{(r.type===`pagehide`||Y.document.visibilityState===`hidden`)&&(e(r),t&&(removeEventListener(`visibilitychange`,n,!0),removeEventListener(`pagehide`,n,!0)))};Y.document&&(addEventListener(`visibilitychange`,n,!0),addEventListener(`pagehide`,n,!0))},DN=(e,t={})=>{let n=wN(`CLS`,0),r,i=0,a=[],o=e=>
17{e.forEach(e=>{if(!e.hadRecentInput){let t=a[0],o=a[a.length-1];i&&a.length!==0&&e.startTime-o.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e]),i>n.value&&(n.value=i,n.entries=a,r&&r())}})},s=TN(`layout-shift`,o);if(s){r=yN(e,n,t.reportAllChanges);let i=()=>{o(s.takeRecords()),r(!0)};return EN(i),i}},ON=-1,kN=()=>{Y.document&&Y.document.visibilityState&&(ON=Y.document.visibilityState===`hidden`&&!Y.document.prerendering?0:1/0)},AN=()=>{EN(({timeStamp:e})=>{ON=e},!0)},jN=()=>(ON<0&&(kN(),AN()),{get firstHiddenTime(){return ON}}),MN=e=>{let t=jN(),n=wN(`FID`),r,i=e=>{e.startTime<t.firstHiddenTime&&(n.value=e.processingStart-e.startTime,n.entries.push(e),r(!0))},a=e=>{e.forEach(i)},o=TN(`first-input`,a);r=yN(e,n),o&&EN(()=>{a(o.takeRecords()),o.disconnect()},!0)},NN=0,PN=1/0,FN=0,IN=e=>{e.forEach(e=>{e.interactionId&&(PN=Math.min(PN,e.interactionId),FN=Math.max(FN,e.interactionId),NN=FN?(FN-PN)/7+1:0)})},LN,RN=()=>LN?NN:performance.interactionCount||0,zN=()=>{`interactionCount`in performance||LN||(LN=TN(`event`,IN,{type:`event`,buffered:!0,durationThreshold:0}))},BN=()=>RN(),VN=10,HN=[],UN={},WN=e=>{let t=HN[HN.length-1],n=UN[e.interactionId];if(n||HN.length<VN||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{let t={id:e.interactionId,latency:e.duration,entries:[e]};UN[t.id]=t,HN.push(t)}HN.sort((e,t)=>t.latency-e.latency),HN.splice(VN).forEach(e=>{delete UN[e.id]})}},GN=()=>HN[Math.min(HN.length-1,Math.floor(BN()/50))],KN=(e,t)=>{t||={},zN();let n=wN(`INP`),r,i=e=>{e.forEach(e=>{e.interactionId&&WN(e),e.entryType===`first-input`&&(HN.some(t=>t.entries.some(t=>e.duration===t.duration&&e.startTime===t.startTime))||WN(e))});let t=GN();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())},a=TN(`event`,i,{durationThreshold:t.durationThreshold||40});r=yN(e,n,t.reportAllChanges),a&&(a.observe({type:`first-input`,buffered:!0}),EN(()=>{i(a.takeRecords()),n.value<0&&BN()>0&&(n.value=0,n.entries=[]),r(!0)}))},qN={},JN=e=>{let t=jN(),n=wN(`LCP`),r,i=e=>{let i=e[e.length-1];if(i){let e=Math.max(i.startTime-CN(),0);e<t.firstHiddenTime&&(n.value=e,n.entries=[i],r())}},a=TN(`largest-contentful-paint`,i);if(a){r=yN(e,n);let t=()=>{qN[n.id]||(i(a.takeRecords()),a.disconnect(),qN[n.id]=!0,r(!0))};return[`keydown`,`click`].forEach(e=>{Y.document&&addEventListener(e,t,{once:!0,capture:!0})}),EN(t,!0),t}},YN=e=>{Y.document&&(Y.document.prerendering?addEventListener(`prerenderingchange`,()=>YN(e),!0):Y.document.readyState===`complete`?setTimeout(e,0):addEventListener(`load`,()=>YN(e),!0))},XN=(e,t)=>{t||={};let n=wN(`TTFB`),r=yN(e,n,t.reportAllChanges);YN(()=>{let e=SN();if(e){if(n.value=Math.max(e.responseStart-CN(),0),n.value<0||n.value>performance.now())return;n.entries=[e],r(!0)}})},ZN={},QN={},$N,eP,tP,nP,rP;function iP(e,t=!1){return gP(`cls`,e,dP,$N,t)}function aP(e,t=!1){return gP(`lcp`,e,pP,tP,t)}function oP(e){return gP(`ttfb`,e,mP,nP)}function sP(e){return gP(`fid`,e,fP,eP)}function cP(e){return gP(`inp`,e,hP,rP)}function lP(e,t){return vP(e,t),QN[e]||(_P(e),QN[e]=!0),yP(e,t)}function uP(e,t){let n=ZN[e];if(!(!n||!n.length))for(let r of n)try{r(t)}catch(t){_N&&P.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Me(r)}\nError:`,t)}}function dP(){return DN(e=>{uP(`cls`,{metric:e}),$N=e},{reportAllChanges:!0})}function fP(){return MN(e=>{uP(`fid`,{metric:e}),eP=e})}function pP(){return JN(e=>{uP(`lcp`,{metric:e}),tP=e})}function mP(){return XN(e=>{uP(`ttfb`,{metric:e}),nP=e})}function hP(){return KN(e=>{uP(`inp`,{metric:e}),rP=e})}function gP(e,t,n,r,i=!1){vP(e,t);let a;return QN[e]||(a=n(),QN[e]=!0),r&&t({metric:r}),yP(e,t,i?a:void 0)}function _P(e){let t={};e===`event`&&(t.durationThreshold=0),TN(e,t=>{uP(e,{entries:t})},t)}function vP(e,t){ZN[e]=ZN[e]||[],ZN[e].push(t)}function yP(e,t,n){return()=>{n&&n();let r=ZN[e];if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function bP(e){return typeof e==`number`&&isFinite(e)}function xP(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}var SP=2147483647;function CP(e){return e/1e3}function wP(){return Y&&Y.addEventListener&&Y.performance}var TP=0,EP={},DP,OP;function kP(){let e=wP();if(e&&C){e.mark&&Y.performance.mark(`sentry-tracing-init`);
17let t=FP(),n=NP(),r=PP(),i=IP();return()=>{t(),n(),r(),i()}}return()=>void 0}function AP(){lP(`longtask`,({entries:e})=>{for(let t of e){let e=Dj();if(!e)return;let n=CP(C+t.startTime),r=CP(t.duration);e.startChild({description:`Main UI thread blocked`,op:`ui.long-task`,origin:`auto.ui.browser.metrics`,startTimestamp:n,endTimestamp:n+r})}})}function jP(){lP(`event`,({entries:e})=>{for(let t of e){let e=Dj();if(!e)return;if(t.name===`click`){let n=CP(C+t.startTime),r=CP(t.duration),i={description:Be(t.target),op:`ui.interaction.${t.name}`,origin:`auto.ui.browser.metrics`,startTimestamp:n,endTimestamp:n+r},a=Ie(t.target);a&&(i.attributes={"ui.component_name":a}),e.startChild(i)}}})}function MP(e,t){if(wP()&&C){let n=RP(e,t);return()=>{n()}}return()=>void 0}function NP(){return iP(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(_N&&P.log(`[Measurements] Adding CLS`),EP.cls={value:e.value,unit:``},OP=t)},!0)}function PP(){return aP(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(_N&&P.log(`[Measurements] Adding LCP`),EP.lcp={value:e.value,unit:`millisecond`},DP=t)},!0)}function FP(){return sP(({metric:e})=>{let t=e.entries[e.entries.length-1];if(!t)return;let n=CP(C),r=CP(t.startTime);_N&&P.log(`[Measurements] Adding FID`),EP.fid={value:e.value,unit:`millisecond`},EP[`mark.fid`]={value:n+r,unit:`second`}})}function IP(){return oP(({metric:e})=>{e.entries[e.entries.length-1]&&(_N&&P.log(`[Measurements] Adding TTFB`),EP.ttfb={value:e.value,unit:`millisecond`})})}var LP={click:`click`,pointerdown:`click`,pointerup:`click`,mousedown:`click`,mouseup:`click`,touchstart:`click`,touchend:`click`,mouseover:`hover`,mouseout:`hover`,mouseenter:`hover`,mouseleave:`hover`,pointerover:`hover`,pointerout:`hover`,pointerenter:`hover`,pointerleave:`hover`,dragstart:`drag`,dragend:`drag`,drag:`drag`,dragenter:`drag`,dragleave:`drag`,dragover:`drag`,drop:`drag`,keydown:`press`,keyup:`press`,keypress:`press`,input:`press`};function RP(e,t){return cP(({metric:n})=>{if(n.value===void 0)return;let r=n.entries.find(e=>e.duration===n.value&&LP[e.name]!==void 0),i=F();if(!r||!i)return;let a=LP[r.name],o=i.getOptions(),s=CP(C+r.startTime),c=CP(n.value),l=r.interactionId===void 0?void 0:e[r.interactionId];if(l===void 0)return;let{routeName:u,parentContext:d,activeTransaction:f,user:p,replayId:m}=l,h=p===void 0?void 0:p.email||p.id||p.ip_address,g=f===void 0?void 0:f.getProfileId(),_=new Qj({startTimestamp:s,endTimestamp:s+c,op:`ui.interaction.${a}`,name:Be(r.target),attributes:{release:o.release,environment:o.environment,transaction:u,...h!==void 0&&h!==``?{user:h}:{},...g===void 0?{}:{profile_id:g},...m===void 0?{}:{replay_id:m}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:`millisecond`}}}),v=YP(d,o,t);if(v&&Math.random()<v){let e=_?GM([_],i.getDsn()):void 0,t=i&&i.getTransport();t&&e&&t.send(e).then(null,e=>{_N&&P.error(`Error while sending interaction:`,e)});return}})}function zP(e){let t=wP();if(!t||!Y.performance.getEntries||!C)return;_N&&P.log(`[Tracing] Adding & adjusting spans using Performance API`);let n=CP(C),r=t.getEntries(),{op:i,start_timestamp:a}=k(e);if(r.slice(TP).forEach(t=>{let r=CP(t.startTime),i=CP(t.duration);if(!(e.op===`navigation`&&a&&n+r<a))switch(t.entryType){case`navigation`:VP(e,t,n);break;case`mark`:case`paint`:case`measure`:{BP(e,t,r,i,n);let a=jN(),o=t.startTime<a.firstHiddenTime;t.name===`first-paint`&&o&&(_N&&P.log(`[Measurements] Adding FP`),EP.fp={value:t.startTime,unit:`millisecond`}),t.name===`first-contentful-paint`&&o&&(_N&&P.log(`[Measurements] Adding FCP`),EP.fcp={value:t.startTime,unit:`millisecond`});break}case`resource`:WP(e,t,t.name,r,i,n);break}}),TP=Math.max(r.length-1,0),GP(e),i===`pageload`){JP(EP),[`fcp`,`fp`,`lcp`].forEach(e=>{if(!EP[e]||!a||n>=a)return;let t=EP[e].value,r=n+CP(t),i=Math.abs((r-a)*1e3),o=i-t;_N&&P.log(`[Measurements] Normalized ${e} from ${t} to ${i} (${o})`),EP[e].value=i});let t=EP[`mark.fid`];t&&EP.fid&&(xP(e,{description:`first input delay`,endTimestamp:t.value+CP(EP.fid.value),op:`ui.action`,origin:`auto.ui.browser.metrics`,startTimestamp:t.value}),delete EP[`mark.fid`]),`fcp`in EP||delete EP.cls,Object.keys(EP).forEach(e
17=>{dM(e,EP[e].value,EP[e].unit)}),KP(e)}DP=void 0,OP=void 0,EP={}}function BP(e,t,n,r,i){let a=i+n,o=a+r;return xP(e,{description:t.name,endTimestamp:o,op:t.entryType,origin:`auto.resource.browser.metrics`,startTimestamp:a}),a}function VP(e,t,n){[`unloadEvent`,`redirect`,`domContentLoadedEvent`,`loadEvent`,`connect`].forEach(r=>{HP(e,t,r,n)}),HP(e,t,`secureConnection`,n,`TLS/SSL`,`connectEnd`),HP(e,t,`fetch`,n,`cache`,`domainLookupStart`),HP(e,t,`domainLookup`,n,`DNS`),UP(e,t,n)}function HP(e,t,n,r,i,a){let o=a?t[a]:t[`${n}End`],s=t[`${n}Start`];!s||!o||xP(e,{op:`browser`,origin:`auto.browser.browser.metrics`,description:i||n,startTimestamp:r+CP(s),endTimestamp:r+CP(o)})}function UP(e,t,n){t.responseEnd&&(xP(e,{op:`browser`,origin:`auto.browser.browser.metrics`,description:`request`,startTimestamp:n+CP(t.requestStart),endTimestamp:n+CP(t.responseEnd)}),xP(e,{op:`browser`,origin:`auto.browser.browser.metrics`,description:`response`,startTimestamp:n+CP(t.responseStart),endTimestamp:n+CP(t.responseEnd)}))}function WP(e,t,n,r,i,a){if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let o=aj(n),s={};qP(s,t,`transferSize`,`http.response_transfer_size`),qP(s,t,`encodedBodySize`,`http.response_content_length`),qP(s,t,`decodedBodySize`,`http.decoded_response_content_length`),`renderBlockingStatus`in t&&(s[`resource.render_blocking_status`]=t.renderBlockingStatus),o.protocol&&(s[`url.scheme`]=o.protocol.split(`:`).pop()),o.host&&(s[`server.address`]=o.host),s[`url.same_origin`]=n.includes(Y.location.origin);let c=a+r,l=c+i;xP(e,{description:n.replace(Y.location.origin,``),endTimestamp:l,op:t.initiatorType?`resource.${t.initiatorType}`:`resource.other`,origin:`auto.resource.browser.metrics`,startTimestamp:c,data:s})}function GP(e){let t=Y.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setTag(`effectiveConnectionType`,n.effectiveType),n.type&&e.setTag(`connectionType`,n.type),bP(n.rtt)&&(EP[`connection.rtt`]={value:n.rtt,unit:`millisecond`})),bP(t.deviceMemory)&&e.setTag(`deviceMemory`,`${t.deviceMemory} GB`),bP(t.hardwareConcurrency)&&e.setTag(`hardwareConcurrency`,String(t.hardwareConcurrency))}function KP(e){DP&&(_N&&P.log(`[Measurements] Adding LCP Data`),DP.element&&e.setTag(`lcp.element`,Be(DP.element)),DP.id&&e.setTag(`lcp.id`,DP.id),DP.url&&e.setTag(`lcp.url`,DP.url.trim().slice(0,200)),e.setTag(`lcp.size`,DP.size)),OP&&OP.sources&&(_N&&P.log(`[Measurements] Adding CLS Data`),OP.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,Be(t.node))))}function qP(e,t,n,r){let i=t[n];i!=null&&i<SP&&(e[r]=i)}function JP(e){let t=SN();if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(_N&&P.log(`[Measurements] Adding TTFB Request Time`),e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}function YP(e,t,n){if(!Pj(t))return!1;let r;return r=e!==void 0&&typeof t.tracesSampler==`function`?t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:Y.location}):e!==void 0&&e.sampled!==void 0?e.sampled:t.tracesSampleRate===void 0?1:t.tracesSampleRate,oM(r)?r===!0?n:r===!1?0:r*n:(_N&&P.warn(`[Tracing] Discarding interaction span because of invalid sample rate.`),!1)}function XP(e,t,n,r,i=`auto.http.browser`){if(!Pj()||!e.fetchData)return;let a=t(e.fetchData.url);if(e.endTimestamp&&a){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&($P(n,e),delete r[t]);return}let o=Te(),s=F(),{method:c,url:l}=e.fetchData,u=QP(l),d=u?aj(u).host:void 0,f=a?Fj({name:`${c} ${l}`,onlyIfParent:!0,attributes:{url:l,type:`fetch`,"http.method":c,"http.url":u,"server.address":d,[Yj]:i},op:`http.client`}):void 0;if(f&&(e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f),n(e.fetchData.url)&&s){let t=e.args[0];e.args[1]=e.args[1]||{};let n=e.args[1];n.headers=ZP(t,s,o,n,f)}return f}function ZP(e,t,n,r,i){let a=i||n.getSpan(),{traceId:o,spanId:s,sampled:l,dsc:u}={...De().getPropagationContext(),...n.getPropagationContext()},d=a?Ue(a):T(o,s,l),f=xe(u||(a?ke(a):oe(o,t,n))),p=r.headers||(typeof Request<`u`&&Ke(e,Request)?e.headers:void 0);if(!p)return{"sentry-trace":d,baggage:f};if(typeof Headers<`u`&&Ke(p,Headers)){let e=new Headers(p);return e.append(`sentry-trace`,d),f&&e.append(c,f),e}else if(Array.isArray(p)){let e=[...p,[`sentry-trace`,d]];return f&&e.push([c,f]),e}else{let e=`baggage`in p?p.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),f&&t.push(f),{...p,"sentry-trace":d,baggage:t.length>0?t.join(`,`):void 0}}}function QP(e){try{return new URL(e).href}catch{return}}function $P(e,t){if(t.response){Nj(e,t.response.status);let n=t.response&&t.response.headers&&t.response.headers.get(`content-length`);if(n){let t=parseInt(n);t>0&&e.setAttribute(`http.response_content_length`,t)}}else t.error&&e.setStatus(`internal_error`);e.end()}var eF=[`localhost`,/^\/(?!\/)/],tF={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:eF,tracePropagationTargets:eF};function nF(e){let{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:a,enableHTTPTimings:o}={traceFetch:tF.traceFetch,traceXHR:tF.traceXHR,...e},s=typeof a==`function`?a:e=>!0,c=e=>cF(e,r||i),l={};t&&jA(e=>{let t=XP(e,s,c,l);if(t){let n=dF(e.fetchData.url),r=n?aj(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r})}o&&t&&iF(t)}),n&&XA(e=>{let t=lF(e,s,c,l);o&&t&&iF(t)})}function rF(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function iF(e){let{url:t}=k(e).data||{};if(!t||typeof t!=`string`)return;let n=lP(`resource`,({entries:r})=>{r.forEach(r=>
17{rF(r)&&r.name.endsWith(t)&&(sF(r).forEach(t=>e.setAttribute(...t)),setTimeout(n))})})}function aF(e){let t=`unknown`,n=`unknown`,r=``;for(let i of e){if(i===`/`){[t,n]=e.split(`/`);break}if(!isNaN(Number(i))){t=r===`h`?`http`:r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function oF(e=0){return((C||performance.timeOrigin)+e)/1e3}function sF(e){let{name:t,version:n}=aF(e.nextHopProtocol),r=[];return r.push([`network.protocol.version`,n],[`network.protocol.name`,t]),C?[...r,[`http.request.redirect_start`,oF(e.redirectStart)],[`http.request.fetch_start`,oF(e.fetchStart)],[`http.request.domain_lookup_start`,oF(e.domainLookupStart)],[`http.request.domain_lookup_end`,oF(e.domainLookupEnd)],[`http.request.connect_start`,oF(e.connectStart)],[`http.request.secure_connection_start`,oF(e.secureConnectionStart)],[`http.request.connection_end`,oF(e.connectEnd)],[`http.request.request_start`,oF(e.requestStart)],[`http.request.response_start`,oF(e.responseStart)],[`http.request.response_end`,oF(e.responseEnd)]]:r}function cF(e,t){return Ee(e,t||eF)}function lF(e,t,n,r){let i=e.xhr,a=i&&i.__sentry_xhr_v3__;if(!Pj()||!i||i.__sentry_own_request__||!a)return;let o=t(a.url);if(e.endTimestamp&&o){let e=i.__sentry_xhr_span_id__;if(!e)return;let t=r[e];t&&a.status_code!==void 0&&(Nj(t,a.status_code),t.end(),delete r[e]);return}let s=Te(),c=De(),l=dF(a.url),u=l?aj(l).host:void 0,d=o?Fj({name:`${a.method} ${a.url}`,onlyIfParent:!0,attributes:{type:`xhr`,"http.method":a.method,"http.url":l,url:a.url,"server.address":u,[Yj]:`auto.http.browser`},op:`http.client`}):void 0;d&&(i.__sentry_xhr_span_id__=d.spanContext().spanId,r[i.__sentry_xhr_span_id__]=d);let f=F();if(i.setRequestHeader&&n(a.url)&&f){let{traceId:e,spanId:t,sampled:n,dsc:r}={...c.getPropagationContext(),...s.getPropagationContext()};uF(i,d?Ue(d):T(e,t,n),xe(r||(d?ke(d):oe(e,f,s))))}return d}function uF(e,t,n){try{e.setRequestHeader(`sentry-trace`,t),n&&e.setRequestHeader(c,n)}catch{}}function dF(e){try{return new URL(e,Y.location.origin).href}catch{return}}var fF=`BrowserTracing`,pF={...eM,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...tF},mF=((e={})=>{let t=_N?!!(e.tracePropagationTargets||e.tracingOrigins):!1;uM(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);let n={...pF,...e},r=kP(),i={};n.enableInp&&MP(i,n.interactionsSampleRate),n.enableLongTask&&AP(),n._experiments.enableInteractions&&jP();let a={name:void 0,context:void 0};function o(e){let t=Le(),{beforeStartSpan:i,idleTimeout:o,finalTimeout:s,heartbeatInterval:c}=n,l=e.op===`pageload`,u;if(l){let{traceId:t,dsc:n,parentSpanId:r,sampled:i}=Se(l?_F(`sentry-trace`):``,l?_F(`baggage`):void 0);u={traceId:t,parentSpanId:r,parentSampled:i,...e,metadata:{...e.metadata,dynamicSamplingContext:n},trimEnd:!0}}else u={trimEnd:!0,...e};let d=i?i(u):u;d.metadata=d.name===u.name?d.metadata:{...d.metadata,source:`custom`},a.name=d.name,a.context=d,d.sampled===!1&&_N&&P.log(`[Tracing] Will not send ${d.op} transaction because of beforeNavigate.`),_N&&P.log(`[Tracing] Starting ${d.op} transaction on scope`);let{location:f}=Y,p=lM(t,d,o,s,!0,{location:f},c,l);return l&&Y.document&&(Y.document.addEventListener(`readystatechange`,()=>{[`interactive`,`complete`].includes(Y.document.readyState)&&p.sendAutoFinishSignal()}),[`interactive`,`complete`].includes(Y.document.readyState)&&p.sendAutoFinishSignal()),p.registerBeforeFinishCallback(e=>{r(),zP(e)}),p}return{name:fF,setupOnce:()=>{},afterAllSetup(e){let r=e.getOptions(),{markBackgroundSpan:s,traceFetch:c,traceXHR:l,shouldCreateSpanForRequest:u,enableHTTPTimings:d,_experiments:f}=n,p=r&&r.tracePropagationTargets,m=p||n.tracePropagationTargets;_N&&t&&p&&P.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.");let h,g=Y.location&&Y.location.href;e.on&&(e.on(`startNavigationSpan`,e=>{h&&(_N&&P.log(`[Tracing] Finishing current transaction with op: ${k(h).op}`),h.end()),h=o({op:`navigation`,...e})}),e.on(`startPageLoadSpan`,e=>{h&&(_N&&P.log(`[Tracing] Finishing current transaction with op: ${k(h).op}`),h.end()),h=o({op:`pageload`,...e})})),n.instrumentPageLoad&&e.emit&&Y.location&&hF(e,{name:Y.location.pathname,startTimestamp:C?C/1e3:void 0,origin:`auto.pageload.browser`,attributes:{[Kj]:`url`}}),n.instrumentNavigation&&e.emit&&Y.location&&KA(({to:t,from:n})=>{if(n===void 0&&g&&g.indexOf(t)!==-1){g=void 0;return}n!==t&&(g=void 0,gF(e,{name:Y.location.pathname,origin:`auto.navigation.browser`,attributes:{[Kj]:`url`}}))}),s&&vN(),f.enableInteractions&&vF(n,a),n.enableInp&&xF(i,a),nF({traceFetch:c,traceXHR:l,tracePropagationTargets:m,shouldCreateSpanForRequest:u,enableHTTPTimings:d})},options:n}});function hF(e,t){if(!e.emit)return;e.emit(`startPageLoadSpan`,t);let n=Ij();return(n&&k(n).op)===`pageload`?n:void 0}function gF(e,t){if(!e.emit)return;e.emit(`startNavigationSpan`,t);let n=Ij();return(n&&k(n).op)===`navigation`?n:void 0}function _F(e){let t=de(`meta[name=${e}]`);return t?t.getAttribute(`content`):void 0}function vF(e,t){let n,r=()=>{let{idleTimeout:r,finalTimeout:i,heartbeatInterval:a}=e,o=`ui.action.click`,s=Dj();if(s&&s.op&&[`navigation`,`pageload`].includes(s.op)){_N&&P.warn(`[Tracing] Did not create ${o} transaction because a pageload or navigation transaction is in progress.`);return}if(n&&=(n.setFinishReason(`interactionInterrupted`),n.end(),void 0),!t.name){_N&&P.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}let{location:c}=Y,l={name:t.name,op:o,trimEnd:!0,data:{[Kj]:t.context?SF(t.context):`url`}};n=lM(Le(),l,r,i,!0,{location:c},a)};
17[`click`].forEach(e=>{Y.document&&addEventListener(e,r,{once:!1,capture:!0})})}function yF(e){return`duration`in e}var bF=10;function xF(e,t){let n=({entries:n})=>{let r=F(),i=r!==void 0&&r.getIntegrationByName!==void 0?r.getIntegrationByName(`Replay`):void 0,a=i===void 0?void 0:i.getReplayId(),o=Dj(),s=Te(),c=s===void 0?void 0:s.getUser();n.forEach(n=>{if(yF(n)){let r=n.interactionId;if(r===void 0)return;let i=e[r],s=n.duration,l=n.startTime,u=Object.keys(e),d=u.length>0?u.reduce((t,n)=>e[t].duration<e[n].duration?t:n):void 0;if(n.entryType===`first-input`&&u.map(t=>e[t]).some(e=>e.duration===s&&e.startTime===l)||!r)return;if(i)i.duration=Math.max(i.duration,s);else if(u.length<bF||d===void 0||s>e[d].duration){let n=t.name,i=t.context;n&&i&&(d&&Object.keys(e).length>=bF&&delete e[d],e[r]={routeName:n,duration:s,parentContext:i,user:c,activeTransaction:o,replayId:a,startTime:l})}}})};lP(`event`,n),lP(`first-input`,n)}function SF(e){let t=e.attributes&&e.attributes[`sentry.source`],n=e.data&&e.data[`sentry.source`],r=e.metadata&&e.metadata.source;return t||n||r}var X=fe,CF=0;function wF(){return CF>0}function TF(){CF++,setTimeout(()=>{CF--})}function EF(e,t={},n){if(typeof e!=`function`)return e;try{let t=e.__sentry_wrapped__;if(t)return typeof t==`function`?t:e;if(s(e))return e}catch{return e}let r=function(){let r=Array.prototype.slice.call(arguments);try{n&&typeof n==`function`&&n.apply(this,arguments);let i=r.map(e=>EF(e,t));return e.apply(this,i)}catch(e){throw TF(),Ve(n=>{n.addEventProcessor(e=>(t.mechanism&&(te(e,void 0,void 0),l(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),ze(e)}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}pe(r,e),re(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var DF=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function OF(e,t){let n=jF(e,t),r={type:t&&t.name,value:PF(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function kF(e,t,n,r){let i=F(),a=i&&i.getOptions().normalizeDepth,o={exception:{values:[{type:le(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:zF(t,{isUnhandledRejection:r})}]},extra:{__serialized__:Ye(t,a)}};if(n){let t=jF(e,n);t.length&&(o.exception.values[0].stacktrace={frames:t})}return o}function AF(e,t){return{exception:{values:[OF(e,t)]}}}function jF(e,t){let n=t.stacktrace||t.stack||``,r=NF(t);try{return e(n,r)}catch{}return[]}var MF=/Minified React error #\d+;/i;function NF(e){if(e){if(typeof e.framesToPop==`number`)return e.framesToPop;if(MF.test(e.message))return 1}return 0}function PF(e){let t=e&&e.message;return t?t.error&&typeof t.error.message==`string`?t.error.message:t:`No error message`}function FF(e,t,n,r){let i=LF(e,t,n&&n.syntheticException||void 0,r);return l(i),i.level=`error`,n&&n.event_id&&(i.event_id=n.event_id),S(i)}function IF(e,t,n=`info`,r,i){let a=RF(e,t,r&&r.syntheticException||void 0,i);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),S(a)}function LF(e,t,n,r,i){let a;if(Je(t)&&t.error)return AF(e,t.error);if(_e(t)||ae(t)){let i=t;if(`stack`in t)a=AF(e,t);else{let t=i.name||(_e(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=RF(e,o,n,r),te(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return He(t)?AF(e,t):We(t)||le(t)?(a=kF(e,t,n,i),l(a,{synthetic:!0}),a):(a=RF(e,t,n,r),te(a,`${t}`,void 0),l(a,{synthetic:!0}),a)}function RF(e,t,n,r){let i={};if(r&&n){let r=jF(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}if(d(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function zF(e,{isUnhandledRejection:t}){let n=ie(e),r=t?`promise rejection`:`exception`;return Je(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:le(e)?`Event \`${BF(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function BF(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function VF(e,{metadata:t,tunnel:n,dsn:r}){return cj({event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:rA(r)}},[HF(e)])}function HF(e){return[{type:`user_report`},e]}var UF=class extends PM{constructor(e){QM(e,`browser`,[`browser`],X.SENTRY_SDK_SOURCE||ej()),super(e),e.sendClientReports&&X.document&&X.document.addEventListener(`visibilitychange`,()=>{X.document.visibilityState===`hidden`&&this._flushOutcomes()})}eventFromException(e,t){return FF(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return IF(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){DF&&P.warn(`SDK not enabled, will not capture user feedback.`);return}let t=VF(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){DF&&P.log(`No outcomes to send`);return}if(!this._dsn){DF&&P.log(`No dsn provided, will not send outcomes`);return}DF&&P.log(`Sending outcomes:`,e);let t=yj(e,this._options.tunnel&&rA(this._dsn));this._sendEnvelope(t)}},WF=void 0;function GF(){if(WF)return WF;if(kA(X.fetch))return WF=X.fetch.bind(X);let e=X.document,t=X.fetch;if(e&&typeof e.createElement==`function`)try{let n=e.createElement(`iframe`);n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){DF&&P.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return WF=t.bind(X)}function KF(){WF=void 0}function qF(e,t=GF()){let n=0,r=0;function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,o).then(e=>(n-=a,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get(`X-Sentry-Rate-Limits`),"retry-after":e.headers.get(`Retry-After`)}}))}catch(e){return KF(),n-=a,r--,y(e)}}return UM(e,i)}var JF=4;function YF(e){function t(t){return new g((n,r)=>{let i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{i.readyState===JF&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader(`X-Sentry-Rate-Limits`),"retry-after":i.getResponseHeader(`Retry-After`)}})},i.open(`POST`,e.url);for(let t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&i.setRequestHeader(t,e.headers[t]);i.send(t.body)})}return UM(e,t)}var XF=`?`,ZF=30,QF=40,$F=50;
17function eI(e,t,n,r){let i={filename:e,function:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var tI=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,nI=/\((\S*)(?::(\d+))(?::(\d+))\)/,rI=[ZF,e=>{let t=tI.exec(e);if(t){if(t[2]&&t[2].indexOf(`eval`)===0){let e=nI.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}let[e,n]=lI(t[1]||XF,t[2]);return eI(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],iI=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,aI=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,oI=[$F,e=>{let t=iI.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=aI.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||XF;return[n,e]=lI(n,e),eI(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],sI=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,cI=x(rI,oI,[QF,e=>{let t=sI.exec(e);return t?eI(t[2],t[1]||XF,+t[3],t[4]?+t[4]:void 0):void 0}]),lI=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?XF:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},uI=1024,dI=`Breadcrumbs`,fI=kM(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:dI,setupOnce(){},setup(e){t.console&&mA(hI(e)),t.dom&&xA(mI(e,t.dom)),t.xhr&&XA(gI(e)),t.fetch&&jA(_I(e)),t.history&&KA(vI(e)),t.sentry&&e.on&&e.on(`beforeSendEvent`,pI(e))}}}));OM(dI,fI);function pI(e){return function(t){F()===e&&ue({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:N(t)},{event:t})}}function mI(e,t){return function(n){if(F()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>uI&&(DF&&P.warn(`\`dom.maxStringLength\` cannot exceed ${uI}, but a value of ${o} was configured. Sentry will use ${uI} instead.`),o=uI),typeof a==`string`&&(a=[a]);try{let e=n.event,t=yI(e)?e.target:e;r=Be(t,{keyAttrs:a,maxStringLength:o}),i=Ie(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),ue(s,{event:n.event,name:n.name,global:n.global})}}function hI(e){return function(t){if(F()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:sj(t.level),message:je(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${je(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;ue(n,{input:t.args,level:t.level})}}function gI(e){return function(t){if(F()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[YA];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};ue({category:`xhr`,data:l,type:`http`},u)}}function _I(e){return function(t){if(F()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let e=t.fetchData,i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r};ue({category:`fetch`,data:e,level:`error`,type:`http`},i)}else{let e=t.response,i={...t.fetchData,status_code:e&&e.status},a={input:t.args,response:e,startTimestamp:n,endTimestamp:r};ue({category:`fetch`,data:i,type:`http`},a)}}}function vI(e){return function(t){if(F()!==e)return;let n=t.from,r=t.to,i=aj(X.location.href),a=n?aj(n):void 0,o=aj(r);(!a||!a.path)&&(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),ue({category:`navigation`,data:{from:n,to:r}})}}function yI(e){return!!e&&!!e.target}var bI=`Dedupe`,xI=kM((()=>{let e;return{name:bI,setupOnce(){},processEvent(t){if(t.type)return t;try{if(SI(t,e))return DF&&P.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}));OM(bI,xI);function SI(e,t){return t?!!(CI(e,t)||wI(e,t)):!1}function CI(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!EI(e,t)||!TI(e,t))}function wI(e,t){let n=DI(t),r=DI(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!EI(e,t)||!TI(e,t))}function TI(e,t){let n=OI(e),r=OI(t);
17if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function EI(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function DI(e){return e.exception&&e.exception.values&&e.exception.values[0]}function OI(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}var kI=`GlobalHandlers`,AI=kM(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:kI,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(jI(e),LI(`onerror`)),t.onunhandledrejection&&(MI(e),LI(`onunhandledrejection`))}}}));OM(kI,AI);function jI(e){LA(t=>{let{stackParser:n,attachStacktrace:r}=RI();if(F()!==e||wF())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=c===void 0&&h(i)?FI(i,a,o,s):II(LF(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Ce(l,{originalException:c,mechanism:{handled:!1,type:`onerror`}})})}function MI(e){BA(t=>{let{stackParser:n,attachStacktrace:r}=RI();if(F()!==e||wF())return;let i=NI(t),a=M(i)?PI(i):LF(n,i,void 0,r,!0);a.level=`error`,Ce(a,{originalException:i,mechanism:{handled:!1,type:`onunhandledrejection`}})})}function NI(e){if(M(e))return e;let t=e;try{if(`reason`in t)return t.reason;if(`detail`in t&&`reason`in t.detail)return t.detail.reason}catch{}return e}function PI(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function FI(e,t,n,r){let i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,a=Je(e)?e.message:e,o=`Error`,s=a.match(i);return s&&(o=s[1],a=s[2]),II({exception:{values:[{type:o,value:a}]}},t,n,r)}function II(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=h(t)&&t.length>0?t:we();return c.length===0&&c.push({colno:l,filename:d,function:`?`,in_app:!0,lineno:u}),e}function LI(e){DF&&P.log(`Global Handler attached: ${e}`)}function RI(){let e=F();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var zI=`HttpContext`,BI=kM((()=>({name:zI,setupOnce(){},preprocessEvent(e){if(!X.navigator&&!X.location&&!X.document)return;let t=e.request&&e.request.url||X.location&&X.location.href,{referrer:n}=X.document||{},{userAgent:r}=X.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}};e.request={...e.request,...t&&{url:t},headers:i}}})));OM(zI,BI);var VI=`cause`,HI=5,UI=`LinkedErrors`,WI=kM(((e={})=>{let t=e.limit||HI,n=e.key||VI;return{name:UI,setupOnce(){},preprocessEvent(e,r,i){let a=i.getOptions();Xk(OF,a.stackParser,a.maxValueLength,n,t,e,r)}}}));OM(UI,WI);var GI=`EventTarget.Window.Node.ApplicationCache.AudioTrackList.BroadcastChannel.ChannelMergerNode.CryptoOperation.EventSource.FileReader.HTMLUnknownElement.IDBDatabase.IDBRequest.IDBTransaction.KeyOperation.MediaController.MessagePort.ModalWindow.Notification.SVGElementInstance.Screen.SharedWorker.TextTrack.TextTrackCue.TextTrackList.WebSocket.WebSocketWorker.Worker.XMLHttpRequest.XMLHttpRequestEventTarget.XMLHttpRequestUpload`.split(`.`),KI=`TryCatch`,qI=kM(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:KI,setupOnce(){t.setTimeout&&D(X,`setTimeout`,JI),t.setInterval&&D(X,`setInterval`,JI),t.requestAnimationFrame&&D(X,`requestAnimationFrame`,YI),t.XMLHttpRequest&&`XMLHttpRequest`in X&&D(XMLHttpRequest.prototype,`send`,XI);let e=t.eventTarget;e&&(Array.isArray(e)?e:GI).forEach(ZI)}}}));OM(KI,qI);function JI(e){return function(...t){let n=t[0];return t[0]=EF(n,{mechanism:{data:{function:Me(e)},handled:!1,type:`instrument`}}),e.apply(this,t)}}function YI(e){return function(t){return e.apply(this,[EF(t,{mechanism:{data:{function:`requestAnimationFrame`,handler:Me(e)},handled:!1,type:`instrument`}})])}}function XI(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e
17=>{e in n&&typeof n[e]==`function`&&D(n,e,function(t){let n={mechanism:{data:{function:e,handler:Me(t)},handled:!1,type:`instrument`}},r=s(t);return r&&(n.mechanism.data.handler=Me(r)),EF(t,n)})}),e.apply(this,t)}}function ZI(e){let t=X,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty(`addEventListener`)||(D(n,`addEventListener`,function(t){return function(n,r,i){try{typeof r.handleEvent==`function`&&(r.handleEvent=EF(r.handleEvent,{mechanism:{data:{function:`handleEvent`,handler:Me(r),target:e},handled:!1,type:`instrument`}}))}catch{}return t.apply(this,[n,EF(r,{mechanism:{data:{function:`addEventListener`,handler:Me(r),target:e},handled:!1,type:`instrument`}}),i])}}),D(n,`removeEventListener`,function(e){return function(t,n,r){let i=n;try{let n=i&&i.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch{}return e.call(this,t,i,r)}}))}var QI=[nN(),gN(),qI(),fI(),AI(),WI(),xI(),BI()];function $I(e){return[...QI]}function eL(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=$I()),e.release===void 0&&(typeof __SENTRY_RELEASE__==`string`&&(e.release=__SENTRY_RELEASE__),X.SENTRY_RELEASE&&X.SENTRY_RELEASE.id&&(e.release=X.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0),BM(UF,{...e,stackParser:b(e.stackParser||cI),integrations:CM(e),transport:e.transport||(OA()?qF:YF)}),e.autoSessionTracking&&nL()}var tL=(e={},t=Le())=>{if(!X.document){DF&&P.error(`Global document not defined in showReportDialog call`);return}let{client:n,scope:r}=t.getStackTop(),i=e.dsn||n&&n.getDsn();if(!i){DF&&P.error(`DSN not configured for showReportDialog call`);return}r&&(e.user={...r.getUser(),...e.user}),e.eventId||=t.lastEventId();let a=X.document.createElement(`script`);a.async=!0,a.crossOrigin=`anonymous`,a.src=bM(i,e),e.onLoad&&(a.onload=e.onLoad);let{onClose:o}=e;if(o){let e=t=>{if(t.data===`__sentry_reportdialog_closed__`)try{o()}finally{X.removeEventListener(`message`,e)}};X.addEventListener(`message`,e)}let s=X.document.head||X.document.body;s?s.appendChild(a):DF&&P.error(`Not injecting report dialog. No injection point found in HTML`)};function nL(){if(X.document===void 0){DF&&P.warn(`Session tracking in non-browser environment with @sentry/browser is not supported.`);return}ge({ignoreDuration:!0}),me(),KA(({from:e,to:t})=>{e!==void 0&&e!==t&&(ge({ignoreDuration:!0}),me())})}var rL=fe,iL=`sentryReplaySession`,aL=`replay_event`,oL=`Unable to send Replay`,sL=3e5,cL=9e5,lL=5e3,uL=5500,dL=6e4,fL=5e3,pL=3,mL=15e4,hL=5e3,gL=3e3,_L=300,vL=2e7,yL=4999,bL=15e3,xL=36e5;function SL(e,t){return e??t()}function CL(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}var wL;(function(e){e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`})(wL||={});function TL(e){return e.nodeType===e.ELEMENT_NODE}function EL(e){return CL([CL([e,`optionalAccess`,e=>e.host]),`optionalAccess`,e=>e.shadowRoot])===e}function DL(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function OL(e){return e.includes(` background-clip: text;`)&&!e.includes(` -webkit-background-clip: text;`)&&(e=e.replace(` background-clip: text;`,` -webkit-background-clip: text; background-clip: text;`)),e}function kL(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let n=[`@import`,`url(${JSON.stringify(e.href)})`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function AL(e){try{let t=e.rules||e.cssRules;return t?OL(Array.from(t,jL).join(``)):null}catch{return null}}function jL(e){let t;if(NL(e))try{t=AL(e.styleSheet)||kL(e)}catch{}else if(PL(e)&&e.selectorText.includes(`:`))return ML(e.cssText);return t||e.cssText}function ML(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function NL(e){return`styleSheet`in e}function PL(e){return`selectorText`in e}var FL=class{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){return e?SL(CL([this,`access`,e=>e.getMeta,`call`,t=>t(e),`optionalAccess`,e=>e.id]),()=>-1):-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);
17this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function IL(){return new FL}function LL({maskInputOptions:e,tagName:t,type:n}){return t===`OPTION`&&(t=`SELECT`),!!(e[t.toLowerCase()]||n&&e[n]||n===`password`||t===`INPUT`&&!n&&e.text)}function RL({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||``;return e?(r&&(i=r(i,t)),`*`.repeat(i.length)):i}function zL(e){return e.toLowerCase()}function BL(e){return e.toUpperCase()}var VL=`__rrweb_original__`;function HL(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=VL in i?i[VL]:i;if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function UL(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?zL(t):null}function WL(e,t,n){return t===`INPUT`&&(n===`radio`||n===`checkbox`)?e.getAttribute(`value`)||``:e.value}var GL=1,KL=RegExp(`[^a-z0-9-_:]`),qL=-2;function JL(){return GL++}function YL(e){if(e instanceof HTMLFormElement)return`form`;let t=zL(e.tagName);return KL.test(t)?`div`:t}function XL(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var ZL,QL,$L=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,eR=/^(?:[a-z+]+:)?\/\//i,tR=/^www\..*/i,nR=/^(data:)([^,]*),(.*)/i;function rR(e,t){return(e||``).replace($L,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(eR.test(s)||tR.test(s)||nR.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${XL(t)+s}${c})`;let l=t.split(`/`),u=s.split(`/`);l.pop();for(let e of u)if(e===`.`)continue;else e===`..`?l.pop():l.push(e);return`url(${c}${l.join(`/`)}${c})`})}var iR=/^[^ \t\n\r\u000c]+/,aR=/^[, \t\n\r\u000c]+/;function oR(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(aR),!(n>=t.length);){let a=r(iR);if(a.slice(-1)===`,`)a=sR(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=sR(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}else if(o)e===`)`&&(o=!1);else if(e===`,`){n+=1,i.push((a+r).trim());break}else e===`(`&&(o=!0);r+=e,n+=1}}}return i.join(`, `)}function sR(e,t){if(!t||t.trim()===``)return t;let n=e.createElement(`a`);return n.href=t,n.href}function cR(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function lR(){let e=document.createElement(`a`);return e.href=``,e.href}function uR(e,t,n,r,i,a){return r&&(n===`src`||n===`href`&&!(t===`use`&&r[0]===`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&(t===`table`||t===`td`||t===`th`)?sR(e,r):n===`srcset`?oR(e,r):n===`style`?rR(r,lR()):t===`object`&&n===`data`?sR(e,r):typeof a==`function`?a(n,r,i):r)}function dR(e,t,n){return(e===`video`||e===`audio`)&&t===`autoplay`}function fR(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t==`string`){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function pR(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function mR(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:mR(e.parentNode,t,n,r+1)}function hR(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(pR(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function gR(e,t,n,r,i,a){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName===`INPUT`){let e=o.getAttribute(`autocomplete`);if([`current-password`,`new-password`,`cc-number`,`cc-exp`,`cc-exp-month`,`cc-exp-year`,`cc-csc`].includes(e))return!0}let s=-1,c=-1;
17if(a){if(c=mR(o,hR(r,i)),c<0)return!0;s=mR(o,hR(t,n),c>=0?c:1/0)}else{if(s=mR(o,hR(t,n)),s<0)return!1;c=mR(o,hR(r,i),s>=0?s:1/0)}return s>=0?c>=0?s<=c:!0:c>=0?!1:!!a}catch{}return!!a}function _R(e,t,n){let r=e.contentWindow;if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=setTimeout(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{clearTimeout(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return setTimeout(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function vR(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;let a=setTimeout(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{clearTimeout(a),r=!0,t()})}function yR(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:h,maskInputFn:g,dataURLOptions:_={},inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x=!1}=t,S=bR(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:wL.Document,childNodes:[]}:{type:wL.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:wL.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:S};case e.ELEMENT_NODE:return SR(e,{doc:n,blockClass:i,blockSelector:a,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:_,inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x,rootId:S,maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return xR(e,{maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:h,maskInputOptions:m,maskInputFn:g,rootId:S});case e.CDATA_SECTION_NODE:return{type:wL.CDATA,textContent:``,rootId:S};case e.COMMENT_NODE:return{type:wL.Comment,textContent:e.textContent||``,rootId:S};default:return!1}}function bR(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function xR(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:a,unmaskTextSelector:o,maskTextFn:s,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,f=e.textContent,p=d===`STYLE`||void 0,m=d===`SCRIPT`||void 0,h=d===`TEXTAREA`||void 0;if(p&&f){try{e.nextSibling||e.previousSibling||CL([e,`access`,e=>e.parentNode,`access`,e=>e.sheet,`optionalAccess`,e=>e.cssRules])&&(f=AL(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}f=rR(f,lR())}m&&(f=`SCRIPT_PLACEHOLDER`);let g=gR(e,r,a,i,o,n);return!p&&!m&&!h&&f&&g&&(f=s?s(f,e.parentElement):f.replace(/[\S]/g,`*`)),h&&f&&(c.textarea||g)&&(f=l?l(f,e.parentNode):f.replace(/[\S]/g,`*`)),d===`OPTION`&&f&&(f=RL({isMasked:gR(e,r,a,i,o,LL({type:null,tagName:d,maskInputOptions:c})),element:e,value:f,maskInputFn:l})),{type:wL.Text,textContent:f||``,isStyle:p,rootId:u}}function SR(e,t){let{doc:n,blockClass:r,blockSelector:i,unblockSelector:a,inlineStylesheet:o,maskInputOptions:s={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:h,maskAllText:g,maskTextClass:_,unmaskTextClass:v,maskTextSelector:y,unmaskTextSelector:b}=t,x=fR(e,r,i,a),S=YL(e),C={},w=e.attributes.length;for(let t=0;t<w;t++){let r=e.attributes[t];r.name&&!dR(S,r.name,r.value)&&(C[r.name]=uR(n,S,zL(r.name),r.value,e,c))}if(S===`link`&&o){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=AL(t)),r&&(delete C.rel,delete C.href,C._cssText=rR(r,t.href))}if(S===`style`&&e.sheet&&!(e.innerText||e.textContent||``).trim().length){let t=AL(e.sheet);t&&(C._cssText=rR(t,lR()))}if(S===`input`||S===`textarea`||S===`select`||S===`option`){let t=e,n=UL(t),r=WL(t,BL(S),n),i=t.checked;if(n!==`submit`&&n!==`button`&&r){let e=gR(t,_,y,v,b,LL({type:n,tagName:BL(S),maskInputOptions:s}));C.value=RL({isMasked:e,element:t,value:r,maskInputFn:l})}i&&(C.checked=i)}if(S===`option`&&(e.selected&&!s.select?C.selected=!0:delete C.selected),S===`canvas`&&f){if(e.__context===`2d`)HL(e)||(C.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!(`__context`in e)){let t=e.toDataURL(u.type,u.quality),n=document.createElement(`canvas`);n.width=e.width,n.height=e.height,t!==n.toDataURL(u.type,u.quality)&&(C.rr_dataURL=t)}}if(S===`img`&&d){ZL||(ZL=n.createElement(`canvas`),QL=ZL.getContext(`2d`));let t=e,r=t.crossOrigin;t.crossOrigin=`anonymous`;let i=()=>{t.removeEventListener(`load`,i);
17try{ZL.width=t.naturalWidth,ZL.height=t.naturalHeight,QL.drawImage(t,0,0),C.rr_dataURL=ZL.toDataURL(u.type,u.quality)}catch(e){console.warn(`Cannot inline img src=${t.currentSrc}! Error: ${e}`)}r?C.crossOrigin=r:t.removeAttribute(`crossorigin`)};t.complete&&t.naturalWidth!==0?i():t.addEventListener(`load`,i)}if((S===`audio`||S===`video`)&&(C.rr_mediaState=e.paused?`paused`:`played`,C.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),x){let{width:t,height:n}=e.getBoundingClientRect();C={class:C.class,rr_width:`${t}px`,rr_height:`${n}px`}}S===`iframe`&&!p(C.src)&&(e.contentDocument||(C.rr_src=C.src),delete C.src);let T;try{customElements.get(S)&&(T=!0)}catch{}return{type:wL.Element,tagName:S,attributes:C,childNodes:[],isSVG:cR(e)||void 0,needBlock:x,rootId:h,isCustom:T}}function CR(e){return e==null?``:e.toLowerCase()}function wR(e,t){return!!(t.comment&&e.type===wL.Comment||e.type===wL.Element&&(t.script&&(e.tagName===`script`||e.tagName===`link`&&(e.attributes.rel===`preload`||e.attributes.rel===`modulepreload`)&&e.attributes.as===`script`||e.tagName===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&e.attributes.href.endsWith(`.js`))||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(CR(e.attributes.name).match(/^msapplication-tile(image|color)$/)||CR(e.attributes.name)===`application-name`||CR(e.attributes.rel)===`icon`||CR(e.attributes.rel)===`apple-touch-icon`||CR(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&CR(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(CR(e.attributes.property).match(/^(og|twitter|fb):/)||CR(e.attributes.name).match(/^(og|twitter):/)||CR(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(CR(e.attributes.name)===`robots`||CR(e.attributes.name)===`googlebot`||CR(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(CR(e.attributes.name)===`author`||CR(e.attributes.name)===`generator`||CR(e.attributes.name)===`framework`||CR(e.attributes.name)===`publisher`||CR(e.attributes.name)===`progid`||CR(e.attributes.property).match(/^article:/)||CR(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(CR(e.attributes.name)===`google-site-verification`||CR(e.attributes.name)===`yandex-verification`||CR(e.attributes.name)===`csrf-token`||CR(e.attributes.name)===`p:domain_verify`||CR(e.attributes.name)===`verify-v1`||CR(e.attributes.name)===`verification`||CR(e.attributes.name)===`shopify-checkout-api-token`))))}function TR(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y={},inlineImages:b=!1,recordCanvas:x=!1,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:D=()=>!1,newlyAddedElement:O=!1}=t,{preserveWhiteSpace:k=!0}=t,A=yR(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,dataURLOptions:y,inlineImages:b,recordCanvas:x,keepIframeSrcFn:D,newlyAddedElement:O});if(!A)return console.warn(e,`not serialized`),null;let j;j=r.hasNode(e)?r.getId(e):wR(A,v)||!k&&A.type===wL.Text&&!A.isStyle&&!A.textContent.replace(/^\s+|\s+$/gm,``).length?qL:JL();let M=Object.assign(A,{id:j});if(r.add(e,M),j===qL)return null;S&&S(e);let ee=!f;if(M.type===wL.Element){ee&&=!M.needBlock,delete M.needBlock;let t=e.shadowRoot;t&&DL(t)&&(M.isShadowHost=!0)}if((M.type===wL.Document||M.type===wL.Element)&&ee){v.headWhitespace&&M.type===wL.Element&&M.tagName===`head`&&(k=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:k,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:D};for(let n of Array.from(e.childNodes)){let e=TR(n,t);e&&M.childNodes.push(e)}if(TL(e)&&e.shadowRoot)for(let n of Array.from(e.shadowRoot.childNodes)){let r=TR(n,t);r&&(DL(e.shadowRoot)&&(r.isShadow=!0),M.childNodes.push(r))}}return e.parentNode&&EL(e.parentNode)&&DL(e.parentNode)&&(M.isShadow=!0),M.type===wL.Element&&M.tagName===`iframe`&&_R(e,()=>{let t=e.contentDocument;if(t&&C){let n=TR(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:k,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:D});n&&C(e,n)}},w),M.type===wL.Element&&M.tagName===`link`&&M.attributes.rel===`stylesheet`&&vR(e,()=>{if(T){let t=TR(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:k,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:D});t&&T(e,t)}},E),M}function ER(e,t){let{mirror:n=new FL,blockClass:r=`rr-block`,blockSelector:i=null,unblockSelector:a=null,maskAllText:o=!1,maskTextClass:s=`rr-mask`,unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inl
17ineImages:f=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOM:v=!1,dataURLOptions:y,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:w,stylesheetLoadTimeout:T,keepIframeSrcFn:E=()=>!1}=t||{};return TR(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,maskAllText:o,maskTextClass:s,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v===!0||v===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v===`all`,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:y,inlineImages:f,recordCanvas:p,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:w,stylesheetLoadTimeout:T,keepIframeSrcFn:E,newlyAddedElement:!1})}function DR(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}function OR(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var kR=`Please stop import mirror directly. Instead of that,\r
18now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
19or you can use record.mirror to access the mirror instance during recording.`,AR={map:{},getId(){return console.error(kR),-1},getNode(){return console.error(kR),null},removeNodeFromMap(){console.error(kR)},has(){return console.error(kR),!1},reset(){console.error(kR)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(AR=new Proxy(AR,{get(e,t,n){return t===`map`&&console.error(kR),Reflect.get(e,t,n)}}));function jR(e,t,n={}){let r=null,i=0;return function(...a){let o=Date.now();!i&&n.leading===!1&&(i=o);let s=t-(o-i),c=this;s<=0||s>t?(r&&=(rz(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=nz(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function MR(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){nz(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>MR(e,t,a||{},!0)}function NR(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var PR=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(PR=()=>new Date().getTime());function FR(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset===void 0?DR([t,`optionalAccess`,e=>e.documentElement,`access`,e=>e.scrollLeft])||DR([t,`optionalAccess`,e=>e.body,`optionalAccess`,e=>e.parentElement,`optionalAccess`,e=>e.scrollLeft])||DR([t,`optionalAccess`,e=>e.body,`optionalAccess`,e=>e.scrollLeft])||0:e.pageXOffset,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset===void 0?DR([t,`optionalAccess`,e=>e.documentElement,`access`,e=>e.scrollTop])||DR([t,`optionalAccess`,e=>e.body,`optionalAccess`,e=>e.parentElement,`optionalAccess`,e=>e.scrollTop])||DR([t,`optionalAccess`,e=>e.body,`optionalAccess`,e=>e.scrollTop])||0:e.pageYOffset}}function IR(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function LR(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function RR(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function zR(e,t,n,r,i){if(!e)return!1;let a=RR(e);if(!a)return!1;let o=hR(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=mR(a,o),c=-1;return s<0?!1:(r&&(c=mR(a,hR(null,r))),s>-1&&c<0||s<c)}function BR(e,t){return t.getId(e)!==-1}function VR(e,t){return t.getId(e)===qL}function HR(e,t){if(EL(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:!e.parentNode||HR(e.parentNode,t):!0}function UR(e){return!!e.changedTouches}function WR(e=window){`NodeList`in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),`DOMTokenList`in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError(`1 argument is required`);do if(this===t)return!0;while(t&&=t.parentNode);return!1})}function GR(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function KR(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function qR(e){return!!DR([e,`optionalAccess`,e=>e.shadowRoot])}var JR=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return Tj(this.styleIDMap.get(e),()=>-1)}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=t===void 0?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function YR(e){let t=null;return DR([e,`access`,e=>e.getRootNode,`optionalCall`,e=>e(),`optionalAccess`,e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function XR(e){let t=e,n;for(;n=YR(t);)t=n;return t}function ZR(e){let t=e.ownerDocument;if(!t)return!1;let n=XR(e);return t.contains(n)}function QR(e){let t=e.ownerDocument;return t?t.contains(e)||ZR(e):!1}var $R={};function ez(e){let t=$R[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return $R[e]=r.bind(window)}function tz(...e){return ez(`requestAnimationFrame`)(...e)}function nz(...e){return ez(`setTimeout`)(...e)}function rz(...e){return ez(`clearTimeout`)(...e)}var Z=(e=>(e[e.DomContentLoaded=0]=`DomContentLoaded`,e[e.Load=1]=`Load`,e[e.FullSnapshot=2]=`FullSnapshot`,e[e.IncrementalSnapshot=3]=`IncrementalSnapshot`,e[e.Meta=4]=`Meta`,e[e.Custom=5]=`Custom`,e[e.Plugin=6]=`Plugin`,e))(Z||{}),Q=(e=>(e[e.Mutation=0]=`Mutation`,e[e.MouseMove=1]=`MouseMove`,e[e.MouseInteraction=2]=`MouseInteraction`,e[e.Scroll=3]=`Scroll`,e[e.ViewportResize=4]=`ViewportResize`,e[e.Input=5]=`Input`,e[e.TouchMove=6]=`TouchMove`,e[e.MediaInteraction=7]=`MediaInteraction`,e[e.StyleSheetRule=8]=`StyleSheetRule`,e[e.CanvasMutation=9]=`CanvasMutation`,e[e.Font=10]=`Font`,e[e.Log=11]=`Log`,e[e.Drag=12]=`Drag`,e[e.StyleDeclaration=13]=`StyleDeclaration`,e[e.Selection=14]=`Selection`,e[e.AdoptedStyleSheet=15]=`AdoptedStyleSheet`,e[e.CustomElement=16]=`CustomElement`,e))(Q||{}),iz=(e=>(e[e.MouseUp=0]=`MouseUp`,e[e.MouseDown=1]=`MouseDown`,e[e.Click=2]=`Click`,e[e.ContextMenu=3]=`ContextMenu`,e[e.DblClick=4]=`DblClick`,e[e.Focus=5]=`Focus`,e[e.Blur=6]=`Blur`,e[e.TouchStart=7]=`TouchStart`,e[e.TouchMove_Departed=8]=`TouchMove_Departed`,e[e.TouchEnd=9]=`TouchEnd`,e[e.TouchCancel=10]=`TouchCancel`,e))(iz||{}),az=(e=>(e[e.Mouse=0]=`Mouse`,e[e.Pen=1]=`Pen`,e[e.Touch=2]=`Touch`,e))(az||{});function oz(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}function sz(e){return`__ln`in e}var cz=class{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error(`Position outside of list range`);let t=this.head;for(let n=0;n<e;n++)t=oz([t,`optionalAccess`,e=>e.next])||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&sz(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&
19(n.previous=t)}else if(e.nextSibling&&sz(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},lz=(e,t)=>`${e}@${t}`,uz=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new cz,r=e=>{let t=e,n=qL;for(;n===qL;)t&&=t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!QR(i))return;let a=EL(i.parentNode)?this.mirror.getId(YR(i)):this.mirror.getId(i.parentNode),o=r(i);if(a===-1||o===-1)return n.addNode(i);let s=TR(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{GR(e,this.mirror)&&this.iframeManager.addIframe(e),KR(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),qR(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});s&&(e.push({parentId:a,nextId:o,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)fz(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||i(e);for(let e of this.addedSet)!mz(this.droppedSet,e)&&!fz(this.removes,e,this.mirror)||mz(this.movedSet,e)?i(e):this.droppedSet.add(e);let a=null;for(;n.length;){let e=null;if(a){let t=this.mirror.getId(a.value.parentNode),n=r(a.value);t!==-1&&n!==-1&&(e=a)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(n.value.parentNode);if(r(n.value)===-1)continue;if(t!==-1){e=n;break}else{let t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(this.mirror.getId(r)!==-1){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}a=e.previous,n.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if(typeof t.style==`string`){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split(`var(`).length===t.style.split(`var(`).length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=e=>{if(!VR(e.target,this.mirror))switch(e.type){case`characterData`:{let t=e.target.textContent;!zR(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:gR(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,RR(e.target)):t.replace(/[\S]/g,`*`):t,node:e.target});break}case`attributes`:{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if(n===`value`){let n=UL(t),i=t.tagName;r=WL(t,i,n);let a=LL({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=RL({isMasked:gR(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a),element:t,value:r,maskInputFn:this.maskInputFn})}if(zR(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName===`IFRAME`&&n===`src`&&!this.keepIframeSrcFn(r))if(!t.contentDocument)n=`rr_src`;else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}
19,this.attributes.push(i),this.attributeMap.set(e.target,i)),n===`type`&&t.tagName===`INPUT`&&(e.oldValue||``).toLowerCase()===`password`&&t.setAttribute(`data-rr-is-password`,`true`),!dR(t.tagName,n)&&(i.attributes[n]=uR(this.doc,zL(t.tagName),zL(n),r,t,this.maskAttributeFn),n===`style`)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let n=this.unattachedDoc.createElement(`span`);e.oldValue&&n.setAttribute(`style`,e.oldValue);for(let e of Array.from(t.style)){let r=t.style.getPropertyValue(e),a=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||a!==n.style.getPropertyPriority(e)?a===``?i.styleDiff[e]=r:i.styleDiff[e]=[r,a]:i._unchangedStyles[e]=[r,a]}for(let e of Array.from(n.style))t.style.getPropertyValue(e)===``&&(i.styleDiff[e]=!1)}break}case`childList`:if(zR(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=EL(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);zR(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||VR(t,this.mirror)||!BR(t,this.mirror)||(this.addedSet.has(t)?(dz(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||HR(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[lz(n,r)]?dz(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:EL(e.target)&&DL(e.target)?!0:void 0})),this.mapRemoves.push(t))});break}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(VR(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[lz(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);zR(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach(e=>this.genAdds(e)),qR(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){`mutationCb.blockClass.blockSelector.unblockSelector.maskAllText.maskTextClass.unmaskTextClass.maskTextSelector.unmaskTextSelector.inlineStylesheet.maskInputOptions.maskAttributeFn.maskTextFn.maskInputFn.keepIframeSrcFn.recordCanvas.inlineImages.slimDOMOptions.dataURLOptions.doc.mirror.iframeManager.stylesheetManager.shadowDomManager.canvasManager.processedNodeManager`.split(`.`).forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function dz(e,t){e.delete(t),t.childNodes.forEach(t=>dz(e,t))}function fz(e,t,n){return e.length!==0&&pz(e,t,n)}function pz(e,t,n){let{parentNode:r}=t;if(!r)return!1;let i=n.getId(r);return e.some(e=>e.id===i)?!0:pz(e,r,n)}function mz(e,t){return e.size!==0&&hz(e,t)}function hz(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:hz(e,n):!1}var gz;function _z(e){gz=e}function vz(){gz=void 0}var $=e=>gz?((...t)=>{try{return e(...t)}catch(e){if(gz&&gz(e)===!0)return()=>{};throw e}}):e;function yz(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}var bz=[];function xz(e){try{if(`composedPath`in e){let t=e.composedPath();if(t.length)return t[0]}else if(`path`in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Sz(e,t){let n=new uz;bz.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,i=yz([window,`optionalAccess`,e=>e.Zone,`optionalAccess`,e=>e.__symbol__,`optionalCall`,e=>e(`MutationObserver`)]);i&&window[i]&&(r=window[i]);let a=new r($(t=>{e.onMutation&&e.onMutation(t)===!1||n.processMutations.bind(n)(t)}));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function Cz({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove==`number`?t.mousemove:50,a=typeof t.mousemoveCallback==`number`?t.mousemoveCallback:500,o=[],s,c=jR($(t=>{let n=Date.now()-s;e(o.map(e=>(e.timeOffset-=n,e)),t),o=[],s=null}),a),l=$(jR($(e=>{let t=xz(e),{clientX:n,clientY:i}=UR(e)?e.changedTouches[0]:e;s||=PR(),o.push({x:n,y:i,id:r.getId(t),timeOffset:PR()-s}),c(typeof DragEvent<`u`&&e instanceof DragEvent?Q.Drag:e instanceof MouseEvent?Q.MouseMove:Q.TouchMove)}),i,{trailing:!1})),u=[OR(`mousemove`,l,n),OR(`touchmove`,l,n),OR(`drag`,l,n)];return $(()=>
19{u.forEach(e=>e())})}function wz({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],l=null,u=t=>o=>{let s=xz(o);if(zR(s,r,i,a,!0))return;let c=null,u=t;if(`pointerType`in o){switch(o.pointerType){case`mouse`:c=az.Mouse;break;case`touch`:c=az.Touch;break;case`pen`:c=az.Pen;break}c===az.Touch?iz[t]===iz.MouseDown?u=`TouchStart`:iz[t]===iz.MouseUp&&(u=`TouchEnd`):az.Pen}else UR(o)&&(c=az.Touch);c===null?iz[t]===iz.Click&&(c=l,l=null):(l=c,(u.startsWith(`Touch`)&&c===az.Touch||u.startsWith(`Mouse`)&&c===az.Mouse)&&(c=null));let d=UR(o)?o.changedTouches[0]:o;if(!d)return;let f=n.getId(s),{clientX:p,clientY:m}=d;$(e)({type:iz[u],id:f,x:p,y:m,...c!==null&&{pointerType:c}})};return Object.keys(iz).filter(e=>Number.isNaN(Number(e))&&!e.endsWith(`_Departed`)&&s[e]!==!1).forEach(e=>{let n=zL(e),r=u(e);if(window.PointerEvent)switch(iz[e]){case iz.MouseDown:case iz.MouseUp:n=n.replace(`mouse`,`pointer`);break;case iz.TouchStart:case iz.TouchEnd:return}c.push(OR(n,r,t))}),$(()=>{c.forEach(e=>e())})}function Tz({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){return OR(`scroll`,$(jR($(o=>{let s=xz(o);if(!s||zR(s,r,i,a,!0))return;let c=n.getId(s);if(s===t&&t.defaultView){let n=FR(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100)),t)}function Ez({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return OR(`resize`,$(jR($(()=>{let t=IR(),i=LR();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}var Dz=[`INPUT`,`TEXTAREA`,`SELECT`],Oz=new WeakMap;function kz({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,ignoreClass:o,ignoreSelector:s,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:h}){function g(e){let n=xz(e),u=e.isTrusted,g=n&&BL(n.tagName);if(g===`OPTION`&&(n=n.parentElement),!n||!g||Dz.indexOf(g)<0||zR(n,r,i,a,!0))return;let v=n;if(v.classList.contains(o)||s&&v.matches(s))return;let y=UL(n),b=WL(v,g,y),x=!1,S=LL({maskInputOptions:c,tagName:g,type:y}),C=gR(n,f,m,p,h,S);(y===`radio`||y===`checkbox`)&&(x=n.checked),b=RL({isMasked:C,element:n,value:b,maskInputFn:l}),_(n,d?{text:b,isChecked:x,userTriggered:u}:{text:b,isChecked:x});let w=n.name;y===`radio`&&w&&x&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach(e=>{if(e!==n){let t=RL({isMasked:C,element:e,value:WL(e,g,y),maskInputFn:l});_(e,d?{text:t,isChecked:!x,userTriggered:!1}:{text:t,isChecked:!x})}})}function _(t,r){let i=Oz.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){Oz.set(t,r);let i=n.getId(t);$(e)({...r,id:i})}}let v=(u.input===`last`?[`change`]:[`input`,`change`]).map(e=>OR(e,$(g),t)),y=t.defaultView;if(!y)return()=>{v.forEach(e=>e())};let b=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,`value`),x=[[y.HTMLInputElement.prototype,`value`],[y.HTMLInputElement.prototype,`checked`],[y.HTMLSelectElement.prototype,`value`],[y.HTMLTextAreaElement.prototype,`value`],[y.HTMLSelectElement.prototype,`selectedIndex`],[y.HTMLOptionElement.prototype,`selected`]];return b&&b.set&&v.push(...x.map(e=>MR(e[0],e[1],{set(){$(g)({target:this,isTrusted:!1})}},!1,y))),$(()=>{v.forEach(e=>e())})}function Az(e){let t=[];function n(e,t){if(Bz(`CSSGroupingRule`)&&e.parentRule instanceof CSSGroupingRule||Bz(`CSSMediaRule`)&&e.parentRule instanceof CSSMediaRule||Bz(`CSSSupportsRule`)&&e.parentRule instanceof CSSSupportsRule||Bz(`CSSConditionRule`)&&e.parentRule instanceof CSSConditionRule){let n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){let n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}return n(e,t)}function jz(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function Mz({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:$((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=jz(i,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:s}]}),r.apply(i,a)})});let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:$((r,i,a)=>{let[o]=a,{id:s,styleId:c}=jz(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:o}]}),r.apply(i,a)})});let o;
19r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:$((r,i,a)=>{let[o]=a,{id:s,styleId:c}=jz(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replace:o}),r.apply(i,a)})}));let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:$((r,i,a)=>{let[o]=a,{id:s,styleId:c}=jz(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replaceSync:o}),r.apply(i,a)})}));let c={};Vz(`CSSGroupingRule`)?c.CSSGroupingRule=r.CSSGroupingRule:(Vz(`CSSMediaRule`)&&(c.CSSMediaRule=r.CSSMediaRule),Vz(`CSSConditionRule`)&&(c.CSSConditionRule=r.CSSConditionRule),Vz(`CSSSupportsRule`)&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:$((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=jz(i.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:[...Az(i),s||0]}]}),r.apply(i,a)})}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:$((r,i,a)=>{let[o]=a,{id:s,styleId:c}=jz(i.parentStyleSheet,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:[...Az(i),o]}]}),r.apply(i,a)})})}),$(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=a,o&&(r.CSSStyleSheet.prototype.replace=o),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}function Nz({mirror:e,stylesheetManager:t},n){let r=null;r=n.nodeName===`#document`?e.getId(n):e.getId(n.host);let i=n.nodeName===`#document`?yz([n,`access`,e=>e.defaultView,`optionalAccess`,e=>e.Document]):yz([n,`access`,e=>e.ownerDocument,`optionalAccess`,e=>e.defaultView,`optionalAccess`,e=>e.ShadowRoot]),a=yz([i,`optionalAccess`,e=>e.prototype])?Object.getOwnPropertyDescriptor(yz([i,`optionalAccess`,e=>e.prototype]),`adoptedStyleSheets`):void 0;return r===null||r===-1||!i||!a?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){return yz([a,`access`,e=>e.get,`optionalAccess`,e=>e.call,`call`,e=>e(this)])},set(e){let n=yz([a,`access`,e=>e.set,`optionalAccess`,e=>e.call,`call`,t=>t(this,e)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(e,r)}catch{}return n}}),$(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Pz({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:$((i,o,s)=>{let[c,l,u]=s;if(n.has(c))return a.apply(o,[c,l,u]);let{id:d,styleId:f}=jz(yz([o,`access`,e=>e.parentRule,`optionalAccess`,e=>e.parentStyleSheet]),t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:c,value:l,priority:u},index:Az(o.parentRule)}),i.apply(o,s)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:$((i,a,s)=>{let[c]=s;if(n.has(c))return o.apply(a,[c]);let{id:l,styleId:u}=jz(yz([a,`access`,e=>e.parentRule,`optionalAccess`,e=>e.parentStyleSheet]),t,r.styleMirror);return(l&&l!==-1||u&&u!==-1)&&e({id:l,styleId:u,remove:{property:c},index:Az(a.parentRule)}),i.apply(a,s)})}),$(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Fz({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:a,doc:o}){let s=$(o=>jR($(a=>{let s=xz(a);if(!s||zR(s,t,n,r,!0))return;let{currentTime:c,volume:l,muted:u,playbackRate:d}=s;e({type:o,id:i.getId(s),currentTime:c,volume:l,muted:u,playbackRate:d})}),a.media||500)),c=[OR(`play`,s(0),o),OR(`pause`,s(1),o),OR(`seeked`,s(2),o),OR(`volumechange`,s(3),o),OR(`ratechange`,s(4),o)];return $(()=>
19{c.forEach(e=>e())})}function Iz({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){let r=new a(e,t,n);return i.set(r,{family:e,buffer:typeof t!=`string`,descriptors:n,fontSource:typeof t==`string`?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=NR(t.fonts,`add`,function(t){return function(n){return nz($(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=a}),r.push(o),$(()=>{r.forEach(e=>e())})}function Lz(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,selectionCb:o}=e,s=!0,c=$(()=>{let e=t.getSelection();if(!e||s&&yz([e,`optionalAccess`,e=>e.isCollapsed]))return;s=e.isCollapsed||!1;let c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let{startContainer:o,startOffset:s,endContainer:l,endOffset:u}=e.getRangeAt(t);zR(o,r,i,a,!0)||zR(l,r,i,a,!0)||c.push({start:n.getId(o),startOffset:s,end:n.getId(l),endOffset:u})}o({ranges:c})});return c(),OR(`selectionchange`,c)}function Rz({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:NR(n.customElements,`define`,function(e){return function(n,r,i){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,i])}})}function zz(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r=Sz(e,e.doc),i=Cz(e),a=wz(e),o=Tz(e),s=Ez(e,{win:n}),c=kz(e),l=Fz(e),u=Mz(e,{win:n}),d=Nz(e,e.doc),f=Pz(e,{win:n}),p=e.collectFonts?Iz(e):()=>{},m=Lz(e),h=Rz(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,n,t.options));return $(()=>{bz.forEach(e=>e.reset()),r.disconnect(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g.forEach(e=>e())})}function Bz(e){return window[e]!==void 0}function Vz(e){return!!(window[e]!==void 0&&window[e].prototype&&`insertRule`in window[e].prototype&&`deleteRule`in window[e].prototype)}var Hz=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),a.set(o,t)),o}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}
19getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return typeof t==`number`?r.get(t)||-1:t}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}};function Uz(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}var Wz=class{constructor(){this.crossOriginIframeMirror=new Hz(JL),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},Gz=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Hz(JL),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Hz(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener(`message`,this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Uz([this,`access`,e=>e.loadListener,`optionalCall`,t=>t(e)]),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if(t.data.type!==`rrweb`||t.origin!==t.data.origin||!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case Z.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Z.IncrementalSnapshot,data:{source:Q.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Z.Meta:case Z.Load:case Z.DomContentLoaded:return!1;case Z.Plugin:return t;case Z.Custom:return this.replaceIds(t.data.payload,e,[`id`,`parentId`,`previousId`,`nextId`]),t;case Z.IncrementalSnapshot:switch(t.data.source){case Q.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,[`parentId`,`nextId`,`previousId`]),this.replaceIdOnNode(t.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,[`parentId`,`id`])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,[`id`])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case Q.Drag:case Q.TouchMove:case Q.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case Q.ViewportResize:return!1;case Q.MediaInteraction:case Q.MouseInteraction:case Q.Scroll:case Q.CanvasMutation:case Q.Input:return this.replaceIds(t.data,e,[`id`]),t;case Q.StyleSheetRule:case Q.StyleDeclaration:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleId`]),t;case Q.Font:return t;case Q.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,[`start`,`end`])}),t;case Q.AdoptedStyleSheet:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleIds`]),Uz([t,`access`,e=>e.data,`access`,e=>e.styles,`optionalAccess`,e=>e.forEach,`call`,t=>t(t=>{this.replaceStyleIds(t,e,[`styleId`])})]),t}}return!1}replace(e,t,n,r){for(let i of r)!Array.isArray(t[i])&&typeof t[i]!=`number`||(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,[`id`,`rootId`]),`childNodes`in e&&e.childNodes.forEac
19h(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type!==wL.Document&&!e.rootId&&(e.rootId=t),`childNodes`in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}},Kz=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},qz=class{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!DL(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let n=Sz({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Tz({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),nz(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Nz({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(NR(e.prototype,`attachShadow`,function(e){return function(r){let i=e.call(this,r);return this.shadowRoot&&QR(this)&&n.addShadowRoot(this.shadowRoot,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Jz=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}},Yz=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new JR,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:jL(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},Xz=class{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){tz(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}},Zz,Qz,$z=IL();function eB(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,unblockSelector:o=null,ignoreClass:s=`rr-ignore`,ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u=`rr-mask`,unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:h,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,maxCanvasSize:x=null,packFn:S,sampling:C={},dataURLOptions:w={},mousemoveWait:T,recordCanvas:E=!1,recordCrossOriginIframes:D=!1,recordAfter:O=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:k=!1,collectFonts:A=!1,inlineImages:j=!1,plugins:M,keepIframeSrcFn:ee=()=>!1,ignoreCSSAttributes:te=new Set([]),errorHandler:N,onMutation:ne,getCanvasManager:re}=e;_z(N);let ie=!D||window.parent===window,ae=!1;if(!ie)try{window.parent.document&&(ae=!1)}catch{ae=!0}if(ie&&!t)throw Error(`emit function is required`);T!==void 0&&C.mousemove===void 0&&(C.mousemove=T),$z.reset();let oe=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g===void 0?{}:g,se=_===!0||_===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_===`all`,headMetaDescKeywords:_===`all`}:_||{};WR();let ce,le=0,ue=e=>{for(let t of M||[])t.eventProcessor&&(e=t.eventProcessor(e));return S&&!ae&&(e=S(e)),e};Zz=(e,i)=>{let a=e;if(a.timestamp=PR(),Ej([bz,`access`,e=>e[0],`optionalAccess`,e=>e.isFrozen,`call`,e=>e()])&&a.type!==Z.FullSnapshot&&!(a.type===Z.IncrementalSnapshot&&a.data.source===Q.Mutation)&&bz.forEach(e
19=>e.unfreeze()),ie)Ej([t,`optionalCall`,e=>e(ue(a),i)]);else if(ae){let e={type:`rrweb`,event:ue(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(a.type===Z.FullSnapshot)ce=a,le=0;else if(a.type===Z.IncrementalSnapshot){if(a.data.source===Q.Mutation&&a.data.isAttachIframe)return;le++;let e=r&&le>=r,t=n&&ce&&a.timestamp-ce.timestamp>n;(e||t)&&ye(!0)}};let de=e=>{Zz({type:Z.IncrementalSnapshot,data:{source:Q.Mutation,...e}})},fe=e=>Zz({type:Z.IncrementalSnapshot,data:{source:Q.Scroll,...e}}),pe=e=>Zz({type:Z.IncrementalSnapshot,data:{source:Q.CanvasMutation,...e}}),me=new Yz({mutationCb:de,adoptedStyleSheetCb:e=>Zz({type:Z.IncrementalSnapshot,data:{source:Q.AdoptedStyleSheet,...e}})}),he=typeof __RRWEB_EXCLUDE_IFRAME__==`boolean`&&__RRWEB_EXCLUDE_IFRAME__?new Wz:new Gz({mirror:$z,mutationCb:de,stylesheetManager:me,recordCrossOriginIframes:D,wrappedEmit:Zz});for(let e of M||[])e.getMirror&&e.getMirror({nodeMirror:$z,crossOriginIframeMirror:he.crossOriginIframeMirror,crossOriginIframeStyleMirror:he.crossOriginIframeStyleMirror});let ge=new Xz,_e=nB(re,{mirror:$z,win:window,mutationCb:e=>Zz({type:Z.IncrementalSnapshot,data:{source:Q.CanvasMutation,...e}}),recordCanvas:E,blockClass:i,blockSelector:a,unblockSelector:o,maxCanvasSize:x,sampling:C.canvas,dataURLOptions:w,errorHandler:N}),ve=typeof __RRWEB_EXCLUDE_SHADOW_DOM__==`boolean`&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Kz:new qz({mutationCb:de,scrollCb:fe,bypassOptions:{onMutation:ne,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:oe,dataURLOptions:w,maskAttributeFn:v,maskTextFn:b,maskInputFn:y,recordCanvas:E,inlineImages:j,sampling:C,slimDOMOptions:se,iframeManager:he,stylesheetManager:me,canvasManager:_e,keepIframeSrcFn:ee,processedNodeManager:ge},mirror:$z}),ye=(e=!1)=>{Zz({type:Z.Meta,data:{href:window.location.href,width:LR(),height:IR()}},e),me.reset(),ve.init(),bz.forEach(e=>e.lock());let t=ER(document,{mirror:$z,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:oe,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,slimDOM:se,dataURLOptions:w,recordCanvas:E,inlineImages:j,onSerialize:e=>{GR(e,$z)&&he.addIframe(e),KR(e,$z)&&me.trackLinkElement(e),qR(e)&&ve.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{he.attachIframe(e,t),ve.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{me.attachLinkElement(e,t)},keepIframeSrcFn:ee});if(!t)return console.warn(`Failed to snapshot the document`);Zz({type:Z.FullSnapshot,data:{node:t,initialOffset:FR(window)}}),bz.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&me.adoptStyleSheets(document.adoptedStyleSheets,$z.getId(document))};Qz=ye;try{let e=[],t=e=>$(zz)({onMutation:ne,mutationCb:de,mousemoveCb:(e,t)=>Zz({type:Z.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Zz({type:Z.IncrementalSnapshot,data:{source:Q.MouseInteraction,...e}}),scrollCb:fe,viewportResizeCb:e=>Zz({type:Z.IncrementalSnapshot,data:{source:Q.ViewportResize,...e}}),inputCb:e=>Zz({type:Z.IncrementalSnapshot,data:{source:Q.Input,...e}}),mediaInteractionCb:e=>Zz({type:Z.IncrementalSnapshot,data:{source:Q.MediaInteraction,...e}}),styleSheetRuleCb:e=>Zz({type:Z.IncrementalSnapshot,data:{source:Q.StyleSheetRule,...e}}),styleDeclarationCb:e=>Zz({type:Z.IncrementalSnapshot,data:{source:Q.StyleDeclaration,...e}}),canvasMutationCb:pe,fontCb:e=>Zz({type:Z.IncrementalSnapshot,data:{source:Q.Font,...e}}),selectionCb:e=>{Zz({type:Z.IncrementalSnapshot,data:{source:Q.Selection,...e}})},customElementCb:e=>{Zz({type:Z.IncrementalSnapshot,data:{source:Q.CustomElement,...e}})},blockClass:i,ignoreClass:s,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:oe,inlineStylesheet:m,sampling:C,recordCanvas:E,inlineImages:j,userTriggeredOnInput:k,collectFonts:A,doc:e,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,keepIframeSrcFn:ee,blockSelector:a,unblockSelector:o,slimDOMOptions:se,dataURLOptions:w,mirror:$z,iframeManager:he,stylesheetManager:me,shadowDomManager:ve,processedNodeManager:ge,canvasManager:_e,ignoreCSSAttributes:te,plugins:Ej([M,`optionalAccess`,e=>e.filter,`call`,e=>e(e=>e.observer),`optionalAccess`,e=>e.map,`call`,e=>e(e=>({observer:e.observer,options:e.options,callback:t=>Zz({type:Z.Plugin,data:{plugin:e.name,payload:t}}
19)}))])||[]},{});he.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{ye(),e.push(t(document))};return document.readyState===`interactive`||document.readyState===`complete`?n():(e.push(OR(`DOMContentLoaded`,()=>{Zz({type:Z.DomContentLoaded,data:{}}),O===`DOMContentLoaded`&&n()})),e.push(OR(`load`,()=>{Zz({type:Z.Load,data:{}}),O===`load`&&n()},window))),()=>{e.forEach(e=>e()),ge.destroy(),Qz=void 0,vz()}}catch(e){console.warn(e)}}function tB(e){if(!Qz)throw Error(`please take full snapshot after start recording`);Qz(e)}eB.mirror=$z,eB.takeFullSnapshot=tB;function nB(e,t){try{return e?e(t):new Jz}catch{return console.warn(`Unable to initialize CanvasManager`),new Jz}}var rB=3,iB=5;function aB(e){return e>9999999999?e:e*1e3}function oB(e){return e>9999999999?e/1e3:e}function sB(e,t){t.category!==`sentry.transaction`&&([`ui.click`,`ui.input`].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Z.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:`breadcrumb`,payload:O(t,10,1e3)}}),t.category===`console`)))}var cB=`button,a`;function lB(e){return e.closest(cB)||e}function uB(e){let t=dB(e);return!t||!(t instanceof Element)?t:lB(t)}function dB(e){return fB(e)?e.target:e}function fB(e){return typeof e==`object`&&!!e&&`target`in e}var pB;function mB(e){return pB||(pB=[],hB()),pB.push(e),()=>{let t=pB?pB.indexOf(e):-1;t>-1&&pB.splice(t,1)}}function hB(){D(rL,`open`,function(e){return function(...t){if(pB)try{pB.forEach(e=>e())}catch{}return e.apply(rL,t)}})}function gB(e,t,n){e.handleClick(t,n)}var _B=class{constructor(e,t,n=sB){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){let e=mB(()=>{this._lastMutation=xB()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(yB(t,this._ignoreSelector)||!bB(e))return;let n={timestamp:oB(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=oB(e)}registerScroll(e=Date.now()){this._lastScroll=oB(e)}registerClick(e){let t=lB(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=xB();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(let t of e){let e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!n&&!r,{clickCount:a,clickBreadcrumb:o}=e;if(i){let n=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,r=n<this._timeout*1e3?`mutation`:`timeout`,i={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.slowClickDetected`,data:{...o.data,url:rL.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:a||1}};this._addBreadcrumbEvent(t,i);return}if(a>1){let e={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.multiClick`,data:{...o.data,url:rL.location.href,route:t.getCurrentRoute(),clickCount:a,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}},vB=[`A`,`BUTTON`,`INPUT`];function yB(e,t){return!!(!vB.includes(e.tagName)||e.tagName===`INPUT`&&![`submit`,`button`].includes(e.getAttribute(`type`)||``)||e.tagName===`A`&&(e.hasAttribute(`download`)||e.hasAttribute(`target`)&&e.getAttribute(`target`)!==`_self`)||t&&e.matches(t))}
19function bB(e){return!!(e.data&&typeof e.data.nodeId==`number`&&e.timestamp)}function xB(){return Date.now()/1e3}function SB(e,t){try{if(!CB(t))return;let{source:n}=t.data;if(n===Q.Mutation&&e.registerMutation(t.timestamp),n===Q.Scroll&&e.registerScroll(t.timestamp),wB(t)){let{type:n,id:r}=t.data,i=eB.mirror.getNode(r);i instanceof HTMLElement&&n===iz.Click&&e.registerClick(i)}}catch{}}function CB(e){return e.type===rB}function wB(e){return e.data.source===Q.MouseInteraction}function TB(e){return{timestamp:Date.now()/1e3,type:`default`,...e}}var EB;(function(e){e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`})(EB||={});var DB=new Set([`id`,`class`,`aria-label`,`role`,`name`,`alt`,`title`,`data-test-id`,`data-testid`,`disabled`,`aria-disabled`,`data-sentry-component`]);function OB(e){let t={};for(let n in e)if(DB.has(n)){let r=n;(n===`data-testid`||n===`data-test-id`)&&(r=`testId`),t[r]=e[n]}return t}var kB=e=>t=>{if(!e.isEnabled())return;let n=jB(t);if(!n)return;let r=t.name===`click`,i=r?t.event:void 0;r&&e.clickDetector&&i&&i.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&gB(e.clickDetector,n,uB(t.event)),sB(e,n)};function AB(e,t){let n=eB.mirror.getId(e),r=n&&eB.mirror.getNode(n),i=r&&eB.mirror.getMeta(r),a=i&&NB(i)?i:null;return{message:t,data:a?{nodeId:n,node:{id:n,tagName:a.tagName,textContent:Array.from(a.childNodes).map(e=>e.type===EB.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(``),attributes:OB(a.attributes)}}:{}}}function jB(e){let{target:t,message:n}=MB(e);return TB({category:`ui.${e.name}`,...AB(t,n)})}function MB(e){let t=e.name===`click`,n,r=null;try{r=t?uB(e.event):dB(e.event),n=Be(r,{maxStringLength:200})||`<unknown>`}catch{n=`<unknown>`}return{target:r,message:n}}function NB(e){return e.type===EB.Element}function PB(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=FB(t);n&&sB(e,n)}function FB(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a,target:o}=e;if(!o||IB(o)||!a)return null;let s=t||r||i,c=a.length===1;if(!s&&c)return null;let l=Be(o,{maxStringLength:200})||`<unknown>`;return TB({category:`ui.keyDown`,message:l,data:{...AB(o,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a}})}function IB(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.isContentEditable}var LB={resource:UB,paint:VB,navigation:HB};function RB(e){return e.map(zB).filter(Boolean)}function zB(e){return LB[e.entryType]?LB[e.entryType](e):null}function BB(e){return((C||rL.performance.timeOrigin)+e)/1e3}function VB(e){let{duration:t,entryType:n,name:r,startTime:i}=e,a=BB(i);return{type:n,name:r,start:a,end:a+t,data:void 0}}function HB(e){let{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:a,encodedBodySize:o,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:m,type:h}=e;return i===0?null:{type:`${t}.${h}`,start:BB(p),end:BB(a),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:l,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:a,redirectCount:f}}}function UB(e){let{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:a,decodedBodySize:o,encodedBodySize:s,responseStatus:c,transferSize:l}=e;return[`fetch`,`xmlhttprequest`].includes(n)?null:{type:`${t}.${n}`,start:BB(a),end:BB(i),name:r,data:{size:l,statusCode:c,decodedBodySize:o,encodedBodySize:s}}}function WB(e){let t=e.entries,n=t[t.length-1],r=n?n.element:void 0,i=e.value,a=BB(i);return{type:`largest-contentful-paint`,name:`largest-contentful-paint`,start:a,end:a,data:{value:i,size:i,nodeId:r?eB.mirror.getId(r):void 0}}}function GB(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}let r=[];return[`navigation`,`paint`,`resource`].forEach(e=>{r.push(lP(e,n))}),r.push(aP(({metric:t})=>{e.replayPerformanceEntries.push(WB(t))})),()=>{r.forEach(e=>e())}}var KB=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,qB=`var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}
vendor: 5,353 bytes, line 19
19},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;
19++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});`;function JB(){let e=new Blob([qB]);return URL.createObjectURL(e)}function YB(e,t){KB&&(P.info(e),t&&ZB(e))}function XB(e,t){KB&&(P.info(e),t&&setTimeout(()=>{ZB(e)},0))}function ZB(e){ue({category:`console`,data:{logger:`replay`},level:`info`,message:e},{level:`info`})}
19var QB=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${vL}.`)}},$B=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return`sync`}destroy(){this.events=[]}async addEvent(e){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>vL)throw new QB;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=this.events.map(e=>e.timestamp).sort()[0];return e?aB(e):null}},eV=class{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||=new Promise((e,t)=>{this._worker.addEventListener(`message`,({data:n})=>{n.success?e():t()},{once:!0}),this._worker.addEventListener(`error`,e=>{t(e)},{once:!0})}),this._ensureReadyPromise}destroy(){YB(`[Replay] Destroying compression worker`),this._worker.terminate()}postMessage(e,t){let n=this._getAndIncrementId();return new Promise((r,i)=>{let a=({data:t})=>{let o=t;if(o.method===e&&o.id===n){if(this._worker.removeEventListener(`message`,a),!o.success){KB&&P.error(`[Replay]`,o.response),i(Error(`Error in compression worker`));return}r(o.response)}};this._worker.addEventListener(`message`,a),this._worker.postMessage({id:n,method:e,arg:t})})}_getAndIncrementId(){return this._id++}},tV=class{constructor(e){this._worker=new eV(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return`worker`}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){let t=aB(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>vL?Promise.reject(new QB):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage(`clear`).then(null,e=>{KB&&P.warn(`[Replay] Sending "clear" message to worker failed`,e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage(`addEvent`,e)}async _finishRequest(){let e=await this._worker.postMessage(`finish`);return this._earliestTimestamp=null,this._totalSize=0,e}},nV=class{constructor(e){this._fallback=new $B,this._compression=new tV(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch{YB(`[Replay] Failed to load the compression worker, falling back to simple buffer`);return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t}=this._fallback,n=[];for(let t of e)n.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._used=this._compression;try{await Promise.all(n)}catch(e){KB&&P.warn(`[Replay] Failed to add events when switching buffers.`,e)}}};function rV({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=iV(t);if(e)return e}return YB(`[Replay] Using simple buffer`),new $B}function iV(e){try{let t=e||aV();return t?(YB(`[Replay] Using compression worker${e?` from ${e}`:``}`),new nV(new Worker(t))):void 0}catch{YB(`[Replay] Failed to create compression worker`)}}function aV(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>`u`||!__SENTRY_EXCLUDE_REPLAY_WORKER__?JB():``}function oV(){try{return`sessionStorage`in rL&&!!rL.sessionStorage}catch{return!1}}function sV(e){cV(),e.session=void 0}function cV(){if(oV())try{rL.sessionStorage.removeItem(iL)}catch{}}function lV(e){return e!==void 0&&Math.random()<e}function uV(e){let t=Date.now();return{id:e.id||_(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function dV(e){if(oV())try{rL.sessionStorage.setItem(iL,JSON.stringify(e))}catch{}}function fV(e,t){return lV(e)?`session`:t?`buffer`:!1}function pV({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let i=uV({sampled:fV(e,t),previousSessionId:r});return n&&dV(i),i}function mV(e){if(!oV())return null;try{let t=rL.sessionStorage.getItem(iL);if(!t)return null;let n=JSON.parse(t);return XB(`[Replay] Loading existing session`,e),uV(n)}catch{return null}}function hV(e,t,n=+new Date){return e===null||t===void 0||t<0||t!==0&&e+t<=n}function gV(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return hV(e.started,t,r)||hV(e.lastActivity,n,r)}function _V(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!gV(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled===`buffer`&&e.segmentId===0)}function vV({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:r},i){let a=i.stickySession&&mV(e);return a?_V(a,{sessionIdleExpire:t,maxReplayDuration:n})?(XB(`[Replay] Session in sessionStorage is expired, creating new one...`),pV(i,{previousSessionId:a.id})):a:(XB(`[Replay] Creating new session`,e),pV(i,{previousSessionId:r}))}function yV(e){return e.type===Z.Custom}
19function bV(e,t,n){return CV(e,t)?(SV(e,t,n),!0):!1}function xV(e,t,n){return CV(e,t)?SV(e,t,n):Promise.resolve(null)}async function SV(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode===`buffer`&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);let r=wV(t,e.getOptions().beforeAddRecordingEvent);return r?await e.eventBuffer.addEvent(r):void 0}catch(t){let n=t&&t instanceof QB?`addEventSizeExceeded`:`addEvent`;KB&&P.error(t),await e.stop({reason:n});let r=F();r&&r.recordDroppedEvent(`internal_sdk_error`,`replay`)}}function CV(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=aB(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(YB(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1):!0}function wV(e,t){try{if(typeof t==`function`&&yV(e))return t(e)}catch(e){return KB&&P.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",e),null}return e}function TV(e){return!e.type}function EV(e){return e.type===`transaction`}function DV(e){return e.type===`replay_event`}function OV(e){return e.type===`feedback`}function kV(e){let t=MV();return(n,r)=>{if(!e.isEnabled()||!TV(n)&&!EV(n))return;let i=r&&r.statusCode;if(!(t&&(!i||i<200||i>=300))){if(EV(n)){AV(e,n);return}jV(e,n)}}}function AV(e,t){let n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function jV(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!==`buffer`||!t.tags||!t.tags.replayId)return;let{beforeErrorSampling:r}=e.getOptions();typeof r==`function`&&!r(t)||setTimeout(()=>{e.sendBufferedReplayOrFlush()})}function MV(){let e=F();if(!e)return!1;let t=e.getTransport();return t&&t.send.__sentry__baseTransport__||!1}function NV(e){return t=>{!e.isEnabled()||!TV(t)||PV(e,t)}}function PV(e,t){let n=t.exception&&t.exception.values&&t.exception.values[0].value;typeof n==`string`&&(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&sB(e,TB({category:`replay.hydrate-error`}))}function FV(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function IV(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Z.Custom,timestamp:t.timestamp*1e3,data:{tag:`breadcrumb`,payload:{timestamp:t.timestamp,type:`default`,category:`sentry.feedback`,data:{feedbackId:t.event_id}}}}),!1):!0)}function LV(e,t){return e.recordingMode!==`buffer`||t.message===oL||!t.exception||t.type?!1:lV(e.getOptions().errorSampleRate)}function RV(e,t=!1){let n=t?kV(e):void 0;return Object.assign((t,r)=>e.isEnabled()?DV(t)?(delete t.breadcrumbs,t):!TV(t)&&!EV(t)&&!OV(t)||!e.checkAndHandleExpiredSession()?t:OV(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),IV(e,t),t):FV(t,r)&&!e.getOptions()._experiments.captureExceptions?(KB&&P.log(`[Replay] Ignoring error from rrweb internals`,t),null):((LV(e,t)||e.recordingMode===`session`)&&(t.tags={...t.tags,replayId:e.getSessionId()}),n&&n(t,{statusCode:200}),t):t,{id:`Replay`})}function zV(e,t){return t.map(({type:t,start:n,end:r,name:i,data:a})=>{let o=e.throttledAddEvent({type:Z.Custom,timestamp:n,data:{tag:`performanceSpan`,payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:a}}});return typeof o==`string`?Promise.resolve(null):o})}function BV(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:`navigation.push`,start:r,end:r,name:n,data:{previous:t}}}function VV(e){return t=>{if(!e.isEnabled())return;let n=BV(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(zV(e,[n]),!1)))}}function HV(e,t){return KB&&e.getOptions()._experiments.traceInternals?!1:qM(t,F())}function UV(e,t){e.isEnabled()&&t!==null&&(HV(e,t.name)||e.addUpdate(()=>(zV(e,[t]),!0)))}function WV(e){let{startTimestamp:t,endTimestamp:n,fetchData:r,response:i}=e;if(!n)return null;let{method:a,url:o}=r;return{type:`resource.fetch`,start:t/1e3,end:n/1e3,name:o,data:{method:a,statusCode:i?i.status:void 0}}}function GV(e){return t=>{e.isEnabled()&&UV(e,WV(t))}}function KV(e){let{startTimestamp:t,endTimestamp:n,xhr:r}=e,i=r[YA];if(!t||!n||!i)return null;let{method:a,url:o,status_code:s}=i;return o===void 0?null:{type:`resource.xhr`,name:o,start:t/1e3,end:n/1e3,data:{method:a,statusCode:s}}}function qV(e){return t=>{e.isEnabled()&&UV(e,KV(t))}}function JV(e,t){if(e)try{if(typeof e==`string`)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=nH(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function YV(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function XV(e){try{if(typeof e==`string`)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[nH(e)];if(!e)return[void 0]}catch{return KB&&P.warn(`[Replay] Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return KB&&P.info(`[Replay] Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function ZV(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function QV(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:a,statusCode:o,request:s,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:ne({method:a,statusCode:o,request:s,response:c})}}function $V(e){return{headers:{},size:e,_meta:{warnings:[`URL_SKIPPED`]}}}function eH(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:i,warnings:a}=rH(n);return r.body=i,a&&a.length>0&&(r._meta={warnings:a}),r}function tH(e,t){return Object.keys(e).reduce((n,r)=>{let i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=e[r]),n},{})}function nH(e){return new URLSearchParams(e).toString()}function rH(e){if(!e||typeof e!=`string`)return{body:e};let t=e.length>mL,n=iH(e);if(t){let t=e.slice(0,mL);return n?{body:t,warnings:[`MAYBE_JSON_TRUNCATED`]}:{body:`${t}…`,warnings:[`TEXT_TRUNCATED`]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function iH(e){let t=e[0],n=e[e.length-1];return t===`[`&&n===`]`||t===`{`&&n===`}`}function aH(e,t){return Ee(oH(e),t)}function oH(e,t=rL.document.baseURI){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(rL.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith(`/`)&&r.endsWith(`/`)?r.slice(0,-1):r}
19async function sH(e,t,n){try{let r=QV(`resource.fetch`,await lH(e,t,n));UV(n.replay,r)}catch(e){KB&&P.error(`[Replay] Failed to capture fetch breadcrumb`,e)}}function cH(e,t,n){let{input:r,response:i}=t,a=JV(r?mH(r):void 0,n.textEncoder),o=i?YV(i.headers.get(`content-length`)):void 0;a!==void 0&&(e.data.request_body_size=a),o!==void 0&&(e.data.response_body_size=o)}async function lH(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r}=t,{url:o,method:s,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=aH(o,n.networkDetailAllowUrls)&&!aH(o,n.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:a,url:o,method:s,statusCode:c,request:d?uH(n,t.input,l):$V(l),response:await dH(d,n,t.response,u)}}function uH({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let i=n?gH(n,t):{};if(!e)return eH(i,r,void 0);let[a,o]=XV(mH(n)),s=eH(i,r,a);return o?ZV(s,o):s}async function dH(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},i,a){if(!e&&a!==void 0)return $V(a);let o=i?hH(i.headers,r):{};if(!i||!t&&a!==void 0)return eH(o,a,void 0);let[s,c]=await pH(i),l=fH(s,{networkCaptureBodies:t,textEncoder:n,responseBodySize:a,captureDetails:e,headers:o});return c?ZV(l,c):l}function fH(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:i,headers:a}){try{let o=e&&e.length&&r===void 0?JV(e,n):r;return i?t?eH(a,o,e):eH(a,o,void 0):$V(o)}catch(e){return KB&&P.warn(`[Replay] Failed to serialize response body`,e),eH(a,r,void 0)}}async function pH(e){let t=vH(e);if(!t)return[void 0,`BODY_PARSE_ERROR`];try{return[await yH(t)]}catch(e){return KB&&P.warn(`[Replay] Failed to get text body from response`,e),[void 0,`BODY_PARSE_ERROR`]}}function mH(e=[]){if(!(e.length!==2||typeof e[1]!=`object`))return e[1].body}function hH(e,t){let n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function gH(e,t){return e.length===1&&typeof e[0]!=`string`?_H(e[0],t):e.length===2?_H(e[1],t):{}}function _H(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?hH(n,t):Array.isArray(n)?{}:tH(n,t):{}}function vH(e){try{return e.clone()}catch(e){KB&&P.warn(`[Replay] Failed to clone response body`,e)}}function yH(e){return new Promise((t,n)=>{let r=setTimeout(()=>n(Error(`Timeout while trying to read response body`)),500);bH(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}async function bH(e){return await e.text()}async function xH(e,t,n){try{let r=QV(`resource.xhr`,CH(e,t,n));UV(n.replay,r)}catch(e){KB&&P.error(`[Replay] Failed to capture xhr breadcrumb`,e)}}function SH(e,t,n){let{xhr:r,input:i}=t;if(!r)return;let a=JV(i,n.textEncoder),o=r.getResponseHeader(`content-length`)?YV(r.getResponseHeader(`content-length`)):DH(r.response,r.responseType,n.textEncoder);a!==void 0&&(e.data.request_body_size=a),o!==void 0&&(e.data.response_body_size=o)}function CH(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r,input:o,xhr:s}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!s||!aH(c,n.networkDetailAllowUrls)||aH(c,n.networkDetailDenyUrls))return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:$V(d),response:$V(f)};let p=s[YA],m=p?tH(p.request_headers,n.networkRequestHeaders):{},h=tH(wH(s),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?XV(o):[void 0],[v,y]=n.networkCaptureBodies?TH(s):[void 0],b=eH(m,d,g),x=eH(h,f,v);return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:_?ZV(b,_):b,response:y?ZV(x,y):x}}function wH(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
20`).reduce((e,t)=>{let[n,r]=t.split(`: `);return e[n.toLowerCase()]=r,e},{}):{}}function TH(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return EH(e.response,e.responseType)}catch(e){t.push(e)}return KB&&P.warn(`[Replay] Failed to get xhr response body`,...t),[void 0]}function EH(e,t){try{if(typeof e==`string`)return[e];if(e instanceof Document)return[e.body.outerHTML];if(t===`json`&&e&&typeof e==`object`)return[JSON.stringify(e)];if(!e)return[void 0]}catch{return KB&&P.warn(`[Replay] Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return KB&&P.info(`[Replay] Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function DH(e,t,n){try{return JV(t===`json`&&e&&typeof e==`object`?JSON.stringify(e):e,n)}catch{return}}function OH(e){let t=F();try{let n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:i,networkCaptureBodies:a,networkRequestHeaders:o,networkResponseHeaders:s}=e.getOptions(),c={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:i,networkCaptureBodies:a,networkRequestHeaders:o,networkResponseHeaders:s};t&&t.on?t.on(`beforeAddBreadcrumb`,(e,t)=>
20kH(c,e,t)):(jA(GV(e)),XA(qV(e)))}catch{}}function kH(e,t,n){if(t.data)try{AH(t)&&MH(n)&&(SH(t,n,e),xH(t,n,e)),jH(t)&&NH(n)&&(cH(t,n,e),sH(t,n,e))}catch{KB&&P.warn(`Error when enriching network breadcrumb`)}}function AH(e){return e.category===`xhr`}function jH(e){return e.category===`fetch`}function MH(e){return e&&e.xhr}function NH(e){return e&&e.response}var PH=null;function FH(e){return!!e.category}var IH=e=>t=>{if(!e.isEnabled())return;let n=LH(t);n&&sB(e,n)};function LH(e){let t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return PH===t||!t||(PH=t,!FH(t)||[`fetch`,`xhr`,`sentry.event`,`sentry.transaction`].includes(t.category)||t.category.startsWith(`ui.`))?null:t.category===`console`?RH(t):TB(t)}function RH(e){let t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return TB(e);let n=!1,r=t.map(e=>{if(!e)return e;if(typeof e==`string`)return e.length>hL?(n=!0,`${e.slice(0,hL)}…`):e;if(typeof e==`object`)try{let t=O(e,7);return JSON.stringify(t).length>hL?(n=!0,`${JSON.stringify(t,null,2).slice(0,hL)}…`):t}catch{}return e});return TB({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:[`CONSOLE_ARG_TRUNCATED`]}}:{}}})}function zH(e){let t=Te(),n=F();t.addScopeListener(IH(e)),xA(kB(e)),KA(VV(e)),OH(e);let r=RV(e,!BH(n));n&&n.addEventProcessor?n.addEventProcessor(r):zM(r),BH(n)&&(n.on(`beforeSendEvent`,NV(e)),n.on(`afterSendEvent`,kV(e)),n.on(`createDsc`,t=>{let n=e.getSessionId();n&&e.isEnabled()&&e.recordingMode===`session`&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),n.on(`startTransaction`,t=>{e.lastTransaction=t}),n.on(`finishTransaction`,t=>{e.lastTransaction=t}),n.on(`beforeSendFeedback`,(t,n)=>{let r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)}))}function BH(e){return!!(e&&e.on)}async function VH(e){try{return Promise.all(zV(e,[HH(rL.performance.memory)]))}catch{return[]}}function HH(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:`memory`,name:`memory`,start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function UH(e,t,n){let r,i,a,o=n&&n.maxWait?Math.max(n.maxWait,t):0;function s(){return c(),r=e(),r}function c(){i!==void 0&&clearTimeout(i),a!==void 0&&clearTimeout(a),i=a=void 0}function l(){return i!==void 0||a!==void 0?s():r}function u(){return i&&clearTimeout(i),i=setTimeout(s,t),o&&a===void 0&&(a=setTimeout(s,o)),r}return u.cancel=c,u.flush=l,u}function WH(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){KB&&P.warn(`[Replay] Received replay event after session expired.`);return}let i=r||!t;t=!0,e.clickDetector&&SB(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode===`buffer`&&i&&e.setInitialState(),!bV(e,n,i))return!0;if(!i)return!1;if(KH(e,i),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode===`buffer`&&e.session&&e.eventBuffer){let t=e.eventBuffer.getEarliestTimestamp();t&&(YB(`[Replay] Updating session start time to earliest event in buffer to ${new Date(t)}`,e.getOptions()._experiments.traceInternals),e.session.started=t,e.getOptions().stickySession&&dV(e.session))}return e.recordingMode===`session`&&e.flush(),!0})}}function GH(e){let t=e.getOptions();return{type:Z.Custom,timestamp:Date.now(),data:{tag:`options`,payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type===`worker`:!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function KH(e,t){!t||!e.session||e.session.segmentId!==0||bV(e,GH(e),!1)}function qH(e,t,n,r){return cj(vj(e,_j(e),r,n),[[{type:`replay_event`},e],[{type:`replay_recording`,length:typeof t==`string`?new TextEncoder().encode(t).length:t.length},t]])}function JH({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)}
21`;if(typeof e==`string`)n=`${r}${e}`;else{let t=new TextEncoder().encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function YH({client:e,scope:t,replayId:n,event:r}){let i={event_id:n,integrations:typeof e._integrations==`object`&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0};e.emit&&e.emit(`preprocessEvent`,r,i);let a=await qe(e.getOptions(),r,i,t,e,De());if(!a)return null;a.platform=a.platform||`javascript`;let o=e.getSdkMetadata&&e.getSdkMetadata(),{name:s,version:c}=o&&o.sdk||{};return a.sdk={...a.sdk,name:s||`sentry.javascript.unknown`,version:c||`0.0.0`},a}async function XH({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:a}){let o=JH({recordingData:e,headers:{segment_id:n}}),{urls:s,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=F(),f=Te(),p=d&&d.getTransport(),m=d&&d.getDsn();if(!d||!p||!m||!a.sampled)return;
21let h={type:aL,replay_start_timestamp:u/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,urls:s,replay_id:t,segment_id:n,replay_type:a.sampled},g=await YH({scope:f,client:d,replayId:t,event:h});if(!g){d.recordDroppedEvent(`event_processor`,`replay`,h),YB("An event processor returned `null`, will not send event.");return}delete g.sdkProcessingMetadata;let _=qH(g,o,m,d.getOptions().tunnel),v;try{v=await p.send(_)}catch(e){let t=Error(oL);try{t.cause=e}catch{}throw t}if(!v)return v;if(typeof v.statusCode==`number`&&(v.statusCode<200||v.statusCode>=300))throw new ZH(v.statusCode);let y=wj({},v);if(Cj(y,`replay`))throw new QH(y);return v}var ZH=class extends Error{constructor(e){super(`Transport returned status code ${e}`)}},QH=class extends Error{constructor(e){super(`Rate limit hit`),this.rateLimits=e}};async function $H(e,t={count:0,interval:fL}){let{recordingData:n,options:r}=e;if(n.length)try{return await XH(e),!0}catch(n){if(n instanceof ZH||n instanceof QH)throw n;if(ve(`Replays`,{_retryCount:t.count}),KB&&r._experiments&&r._experiments.captureExceptions&&ze(n),t.count>=pL){let e=Error(`${oL} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{setTimeout(async()=>{try{await $H(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}var eU=`__THROTTLED`,tU=`__SKIPPED`;function nU(e,t,n){let r=new Map,i=e=>{let t=e-n;r.forEach((e,n)=>{n<t&&r.delete(n)})},a=()=>[...r.values()].reduce((e,t)=>e+t,0),o=!1;return(...n)=>{let s=Math.floor(Date.now()/1e3);if(i(s),a()>=t){let e=o;return o=!0,e?tU:eU}o=!1;let c=r.get(s)||0;return r.set(s,c+1),e(...n)}}var rU=class e{constructor({options:t,recordingOptions:n}){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode=`session`,this.timeouts={sessionIdlePause:sL,sessionIdleExpire:cL},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:``},this._recordingOptions=n,this._options=t,this._debouncedFlush=UH(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=nU((e,t)=>xV(this,e,t),300,5);let{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),a=r?{threshold:Math.min(gL,r),timeout:r,scrollTimeout:_L,ignoreSelector:i?i.join(`,`):``}:void 0;a&&(this.clickDetector=new _B(this,a))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:n}=this._options;if(!(t<=0&&n<=0)){if(this._initializeSessionForSampling(e),!this.session){this._handleException(Error(`Unable to initialize and create session`));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled===`buffer`&&this.session.segmentId===0?`buffer`:`session`,XB(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode===`session`)throw Error(`Replay recording is already in progress`);if(this._isEnabled&&this.recordingMode===`buffer`)throw Error("Replay buffering is in progress, call `flush()` to save the replay");XB(`[Replay] Starting replay in session mode`,this._options._experiments.traceInternals),this._updateUserActivity();let e=vV({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw Error(`Replay recording is already in progress`);XB(`[Replay] Starting replay in buffer mode`,this._options._experiments.traceInternals);let e=vV({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode=`buffer`,this._initializeRecording()}startRecording(){try{let e=this._canvas;this._stopRecording=eB({...this._recordingOptions,...this.recordingMode===`buffer`&&{checkoutEveryNms:dL},emit:WH(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this._handleException(e)}}stopRecording(){try{return this._stopRecording&&=(this._stopRecording(),void 0),!0}catch(e){return this._handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{YB(`[Replay] Stopping Replay${t?` triggered by ${t}`:``}`,this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,sV(this)}catch(e){this._handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),YB(`[Replay] Pausing replay`,this._options._experiments.traceInternals))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),YB(`[Replay] Resuming replay`,this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode===`session`)return this.flushImmediate();let t=Date.now();
21YB(`[Replay] Converting buffer to session`,this._options._experiments.traceInternals),await this.flushImmediate();let n=this.stopRecording();!e||!n||this.recordingMode!==`session`&&(this.recordingMode=`session`,this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){let t=e();this.recordingMode!==`buffer`&&t!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode===`buffer`?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&hV(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled===`session`){this.pause();return}return!!this._checkSession()}setInitialState(){let e=`${rL.location.pathname}${rL.location.hash}${rL.location.search}`,t=`${rL.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){let n=this._throttledAddEvent(e,t);if(n===eU){let e=TB({category:`replay.throttled`});this.addUpdate(()=>!bV(this,{type:iB,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e,metric:!0}}))}return n}getCurrentRoute(){let e=this.lastTransaction||Te().getTransaction(),t=(e&&k(e).data||{})[Kj];if(!(!e||!t||![`route`,`custom`].includes(t)))return k(e).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=rV({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){KB&&P.error(`[Replay]`,e),KB&&this._options._experiments&&this._options._experiments.captureExceptions&&ze(e)}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,n=vV({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;let e=this.session;return _V(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(e),!1):!0}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:`refresh session`}),this.initializeSampling(e.id))}_addListeners(){try{rL.document.addEventListener(`visibilitychange`,this._handleVisibilityChange),rL.addEventListener(`blur`,this._handleWindowBlur),rL.addEventListener(`focus`,this._handleWindowFocus),rL.addEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||=(zH(this),!0)}catch(e){this._handleException(e)}this._performanceCleanupCallback=GB(this)}_removeListeners(){try{rL.document.removeEventListener(`visibilitychange`,this._handleVisibilityChange),rL.removeEventListener(`blur`,this._handleWindowBlur),rL.removeEventListener(`focus`,this._handleWindowFocus),rL.removeEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{rL.document.visibilityState===`visible`?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{let e=TB({category:`ui.blur`});
21this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{let e=TB({category:`ui.focus`});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{PB(this,e)}}_doChangeToBackgroundTasks(e){this.session&&(gV(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush()))}_doChangeToForegroundTasks(e){if(this.session){if(!this.checkAndHandleExpiredSession()){YB(`[Replay] Document has become active, but session has expired`);return}e&&this._createCustomBreadcrumb(e)}}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:Z.Custom,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e}})})}_addPerformanceEntries(){let e=RB(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(zV(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||e.segmentId)return;let n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}
21_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){let e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){KB&&P.error(`[Replay] No session or eventBuffer found to flush.`);return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await VH(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw Error(`Session is too long, not sending replay`);let n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await $H({replayId:e,recordingData:await this.eventBuffer.finish(),segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:t})}catch(e){this._handleException(e),this.stop({reason:`sendReplay`});let t=F();t&&t.recordDroppedEvent(`send_error`,`replay`)}}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){KB&&P.error(`[Replay] Attempting to finish replay event after session expired.`);return}if(!this.session)return;let t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();let r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){YB(`[Replay] Session duration (${Math.floor(n/1e3)}s) is too ${r?`short`:`long`}, not sending replay.`,this._options._experiments.traceInternals),r&&this._debouncedFlush();return}let a=this.eventBuffer;if(a&&this.session.segmentId===0&&!a.hasCheckout&&YB(`[Replay] Flushing initial segment without checkout.`,this._options._experiments.traceInternals),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(e){KB&&P.error(e)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&dV(this.session)}__init6(){this._onMutationHandler=e=>{let t=e.length,n=this._options.mutationLimit,r=this._options.mutationBreadcrumbLimit,i=n&&t>n;if(t>r||i){let e=TB({category:`replay.mutations`,data:{count:t,limit:i}});this._createCustomBreadcrumb(e)}return i?(this.stop({reason:`mutationLimit`,forceFlush:this.recordingMode===`session`}),!1):!0}}};function iU(e,t,n,r){let i=typeof r==`string`?r.split(`,`):[],a=[...e,...i,...t];return n!==void 0&&(typeof n==`string`&&a.push(`.${n}`),Pe(()=>{console.warn(`[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.`)})),a.join(`,`)}function aU({mask:e,unmask:t,block:n,unblock:r,ignore:i,blockClass:a,blockSelector:o,maskTextClass:s,maskTextSelector:c,ignoreClass:l}){let u={maskTextSelector:iU(e,[`.sentry-mask`,`[data-sentry-mask]`],s,c),unmaskTextSelector:iU(t,[`.sentry-unmask`,`[data-sentry-unmask]`]),blockSelector:iU(n,[`.sentry-block`,`[data-sentry-block]`,`base[href="/"]`],a,o),unblockSelector:iU(r,[`.sentry-unblock`,`[data-sentry-unblock]`]),ignoreSelector:iU(i,[`.sentry-ignore`,`[data-sentry-ignore]`,`input[type="file"]`],l)};return a instanceof RegExp&&(u.blockClass=a),s instanceof RegExp&&(u.maskTextClass=s),u}function oU({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:a}){return!r||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?a:n.includes(t)||t===`value`&&e.tagName===`INPUT`&&[`submit`,`button`].includes(e.getAttribute(`type`)||``)?a.replace(/[\S]/g,`*`):a}var sU=`img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]`,cU=[`content-length`,`content-type`,`accept`],lU=!1,uU=(e=>new dU(e)),dU=class e{static __initStatic(){this.id=`Replay`}constructor({flushMinDelay:t=lL,flushMaxDelay:n=uL,minReplayDuration:r=yL,maxReplayDuration:i=xL,stickySession:a=!0,useCompression:o=!0,workerUrl:s,_experiments:c={},sessionSampleRate:l,errorSampleRate:u,maskAllText:d=!0,maskAllInputs:f=!0,blockAllMedia:p=!0,mutationBreadcrumbLimit:m=750,mutationLimit:h=1e4,slowClickTimeout:g=7e3,slowClickIgnoreSelectors:_=[],networkDetailAllowUrls:v=[],networkDetailDenyUrls:y=[],networkCaptureBodies:b=!0,networkRequestHeaders:x=[],networkResponseHeaders:S=[],mask:C=[],maskAttributes:w=[`title`,`placeholder`],unmask:T=[],block:E=[],unblock:D=[],ignore:O=[],maskFn:k,beforeAddRecordingEvent:A,beforeErrorSampling:j,blockClass:M,blockSelector:ee,maskInputOptions:te,maskTextClass:N,maskTextSelector:ne,ignoreClass:re}={}){this.name=e.id;let ie=aU({mask:C,unmask:T,block:E,unblock:D,ignore:O,blockClass:M,blockSelector:ee,maskTextClass:N,maskTextSelector:ne,ignoreClass:re});if(this._recordingOptions={maskAllInputs:f,maskAllText:d,maskInputOptions:{...te||{},password:!0},maskTextFn:k,maskInputFn:k,maskAttributeFn:(e,t,n)=>oU({maskAttributes:w,maskAllText:d,privacyOptions:ie,key:e,value:t,el:n}),...ie,slimDOMOptions:`all`,inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,bL),maxReplayDuration:Math.min(i,xL),stickySession:a,sessionSampleRate:l,errorSampleRate:u,useCompression:o,workerUrl:s,blockAllMedia:p,maskAllInputs:f,maskAllText:d,mutationBreadcrumbLimit:m,mutationLimit:h,slowClickTimeout:g,slowClickIgnoreSelectors:_,networkDetailAllowUrls:v,networkDetailDenyUrls:y,networkCaptureBodies:b,networkRequestHeaders:pU(x),networkResponseHeaders:pU(S),beforeAddRecordingEvent:A,beforeErrorSampling:j,_experiments:c},typeof l==`number`&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.
22This option is deprecated and will be removed soon.
23Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:
24Sentry.init({ replaysSessionSampleRate: ${l} })`),this._initialOptions.sessionSampleRate=l),typeof u==`number`&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.
25This option is deprecated and will be removed soon.
26Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:
27Sentry.init({ replaysOnErrorSampleRate: ${u} })`),this._initialOptions.errorSampleRate=u),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${sU}`:sU),this._isInitialized&&nj())throw Error(`Multiple Sentry Session Replay instances are not supported`);this._isInitialized=!0}get _isInitialized(){return lU}set _isInitialized(e){lU=e}setupOnce(){nj()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}
27startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode===`session`}):Promise.resolve()}flush(e){return!this._replay||!this._replay.isEnabled()?Promise.resolve():this._replay.sendBufferedReplayOrFlush(e)}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){let e=fU(this._initialOptions);this._replay=new rU({options:e,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{let e=F().getIntegrationByName(`ReplayCanvas`);if(!e)return;this._replay._canvas=e.getOptions()}catch{}}};dU.__initStatic();function fU(e){let t=F(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...ne(e)};return n?(e.sessionSampleRate==null&&e.errorSampleRate==null&&n.replaysSessionSampleRate==null&&n.replaysOnErrorSampleRate==null&&Pe(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),typeof n.replaysSessionSampleRate==`number`&&(r.sessionSampleRate=n.replaysSessionSampleRate),typeof n.replaysOnErrorSampleRate==`number`&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(Pe(()=>{console.warn(`SDK client is not available.`)}),r)}function pU(e){return[...cU,...e.map(e=>e.toLowerCase())]}var mU=class{constructor(e,t,n){this.eventTarget=e,this.eventName=t,this.eventOptions=n,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(e){this.unorderedBindings.add(e)}bindingDisconnected(e){this.unorderedBindings.delete(e)}handleEvent(e){let t=hU(e);for(let e of this.bindings)if(t.immediatePropagationStopped)break;else e.handleEvent(t)}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort((e,t)=>{let n=e.index,r=t.index;return n<r?-1:+(n>r)})}};function hU(e){if(`immediatePropagationStopped`in e)return e;{let{stopImmediatePropagation:t}=e;return Object.assign(e,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,t.call(this)}})}}var gU=class{constructor(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach(e=>e.connect()))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach(e=>e.disconnect()))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce((e,t)=>e.concat(Array.from(t.values())),[])}bindingConnected(e){this.fetchEventListenerForBinding(e).bindingConnected(e)}bindingDisconnected(e,t=!1){this.fetchEventListenerForBinding(e).bindingDisconnected(e),t&&this.clearEventListenersForBinding(e)}handleError(e,t,n={}){this.application.handleError(e,`Error ${t}`,n)}clearEventListenersForBinding(e){let t=this.fetchEventListenerForBinding(e);t.hasBindings()||(t.disconnect(),this.removeMappedEventListenerFor(e))}removeMappedEventListenerFor(e){let{eventTarget:t,eventName:n,eventOptions:r}=e,i=this.fetchEventListenerMapForEventTarget(t),a=this.cacheKey(n,r);i.delete(a),i.size==0&&this.eventListenerMaps.delete(t)}fetchEventListenerForBinding(e){let{eventTarget:t,eventName:n,eventOptions:r}=e;return this.fetchEventListener(t,n,r)}fetchEventListener(e,t,n){let r=this.fetchEventListenerMapForEventTarget(e),i=this.cacheKey(t,n),a=r.get(i);return a||(a=this.createEventListener(e,t,n),r.set(i,a)),a}createEventListener(e,t,n){let r=new mU(e,t,n);return this.started&&r.connect(),r}fetchEventListenerMapForEventTarget(e){let t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t}cacheKey(e,t){let n=[e];return Object.keys(t).sort().forEach(e=>{n.push(`${t[e]?``:`!`}${e}`)}),n.join(`:`)}},_U={stop({event:e,value:t}){return t&&e.stopPropagation(),!0},prevent({event:e,value:t}){return t&&e.preventDefault(),!0},self({event:e,value:t,element:n}){return!t||n===e.target}},vU=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function yU(e){let t=e.trim().match(vU)||[],n=t[2],r=t[3];return r&&![`keydown`,`keyup`,`keypress`].includes(n)&&(n+=`.${r}`,r=``),{eventTarget:bU(t[4]),eventName:n,eventOptions:t[7]?xU(t[7]):{},identifier:t[5],methodName:t[6],keyFilter:t[1]||r}}function bU(e){if(e==`window`)return window;if(e==`document`)return document}function xU(e){return e.split(`:`).reduce((e,t)=>
27Object.assign(e,{[t.replace(/^!/,``)]:!/^!/.test(t)}),{})}function SU(e){if(e==window)return`window`;if(e==document)return`document`}function CU(e){return e.replace(/(?:[_-])([a-z0-9])/g,(e,t)=>t.toUpperCase())}function wU(e){return CU(e.replace(/--/g,`-`).replace(/__/g,`_`))}function TU(e){return e.charAt(0).toUpperCase()+e.slice(1)}function EU(e){return e.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`)}function DU(e){return e.match(/[^\s]+/g)||[]}function OU(e){return e!=null}function kU(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var AU=[`meta`,`ctrl`,`alt`,`shift`],jU=class{constructor(e,t,n,r){this.element=e,this.index=t,this.eventTarget=n.eventTarget||e,this.eventName=n.eventName||NU(e)||PU(`missing event name`),this.eventOptions=n.eventOptions||{},this.identifier=n.identifier||PU(`missing identifier`),this.methodName=n.methodName||PU(`missing method name`),this.keyFilter=n.keyFilter||``,this.schema=r}static forToken(e,t){return new this(e.element,e.index,yU(e.content),t)}toString(){let e=this.keyFilter?`.${this.keyFilter}`:``,t=this.eventTargetName?`@${this.eventTargetName}`:``;return`${this.eventName}${e}${t}->${this.identifier}#${this.methodName}`}shouldIgnoreKeyboardEvent(e){if(!this.keyFilter)return!1;let t=this.keyFilter.split(`+`);if(this.keyFilterDissatisfied(e,t))return!0;let n=t.filter(e=>!AU.includes(e))[0];return n?(kU(this.keyMappings,n)||PU(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[n].toLowerCase()!==e.key.toLowerCase()):!1}shouldIgnoreMouseEvent(e){if(!this.keyFilter)return!1;let t=[this.keyFilter];return!!this.keyFilterDissatisfied(e,t)}get params(){let e={},t=RegExp(`^data-${this.identifier}-(.+)-param$`,`i`);for(let{name:n,value:r}of Array.from(this.element.attributes)){let i=n.match(t),a=i&&i[1];a&&(e[CU(a)]=FU(r))}return e}get eventTargetName(){return SU(this.eventTarget)}get keyMappings(){return this.schema.keyMappings}keyFilterDissatisfied(e,t){let[n,r,i,a]=AU.map(e=>t.includes(e));return e.metaKey!==n||e.ctrlKey!==r||e.altKey!==i||e.shiftKey!==a}},MU={a:()=>`click`,button:()=>`click`,form:()=>`submit`,details:()=>`toggle`,input:e=>e.getAttribute(`type`)==`submit`?`click`:`input`,select:()=>`change`,textarea:()=>`input`};function NU(e){let t=e.tagName.toLowerCase();if(t in MU)return MU[t](e)}function PU(e){throw Error(e)}function FU(e){try{return JSON.parse(e)}catch{return e}}var IU=class{constructor(e,t){this.context=e,this.action=t}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(e){let t=this.prepareActionEvent(e);this.willBeInvokedByEvent(e)&&this.applyEventModifiers(t)&&this.invokeWithEvent(t)}get eventName(){return this.action.eventName}get method(){let e=this.controller[this.methodName];if(typeof e==`function`)return e;throw Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(e){let{element:t}=this.action,{actionDescriptorFilters:n}=this.context.application,{controller:r}=this.context,i=!0;for(let[a,o]of Object.entries(this.eventOptions))if(a in n){let s=n[a];i&&=s({name:a,value:o,event:e,element:t,controller:r})}else continue;return i}prepareActionEvent(e){return Object.assign(e,{params:this.action.params})}invokeWithEvent(e){let{target:t,currentTarget:n}=e;try{this.method.call(this.controller,e),this.context.logDebugActivity(this.methodName,{event:e,target:t,currentTarget:n,action:this.methodName})}catch(t){let{identifier:n,controller:r,element:i,index:a}=this,o={identifier:n,controller:r,element:i,index:a,event:e};this.context.handleError(t,`invoking action "${this.action}"`,o)}}willBeInvokedByEvent(e){let t=e.target;return e instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(e)||e instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(e)?!1:this.element===t?!0:t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element)}get controller(){return this.context.controller}get methodName(){return this.action.methodName}
27get element(){return this.scope.element}get scope(){return this.context.scope}},LU=class{constructor(e,t){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver(e=>this.processMutations(e))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(e){this.started&&=(this.mutationObserver.disconnect(),!1),e(),this.started||=(this.mutationObserver.observe(this.element,this.mutationObserverInit),!0)}stop(){this.started&&=(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),!1)}refresh(){if(this.started){let e=new Set(this.matchElementsInTree());for(let t of Array.from(this.elements))e.has(t)||this.removeElement(t);for(let t of Array.from(e))this.addElement(t)}}processMutations(e){if(this.started)for(let t of e)this.processMutation(t)}processMutation(e){e.type==`attributes`?this.processAttributeChange(e.target,e.attributeName):e.type==`childList`&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))}processAttributeChange(e,t){this.elements.has(e)?this.delegate.elementAttributeChanged&&this.matchElement(e)?this.delegate.elementAttributeChanged(e,t):this.removeElement(e):this.matchElement(e)&&this.addElement(e)}processRemovedNodes(e){for(let t of Array.from(e)){let e=this.elementFromNode(t);e&&this.processTree(e,this.removeElement)}}processAddedNodes(e){for(let t of Array.from(e)){let e=this.elementFromNode(t);e&&this.elementIsActive(e)&&this.processTree(e,this.addElement)}}matchElement(e){return this.delegate.matchElement(e)}matchElementsInTree(e=this.element){return this.delegate.matchElementsInTree(e)}processTree(e,t){for(let n of this.matchElementsInTree(e))t.call(this,n)}elementFromNode(e){if(e.nodeType==Node.ELEMENT_NODE)return e}elementIsActive(e){return e.isConnected==this.element.isConnected&&this.element.contains(e)}addElement(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))}removeElement(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))}},RU=class{constructor(e,t,n){this.attributeName=t,this.delegate=n,this.elementObserver=new LU(e,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(e){return e.hasAttribute(this.attributeName)}matchElementsInTree(e){let t=this.matchElement(e)?[e]:[],n=Array.from(e.querySelectorAll(this.selector));return t.concat(n)}elementMatched(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)}elementUnmatched(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)}elementAttributeChanged(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)}};function zU(e,t,n){VU(e,t).add(n)}function BU(e,t,n){VU(e,t).delete(n),HU(e,t)}function VU(e,t){let n=e.get(t);return n||(n=new Set,e.set(t,n)),n}function HU(e,t){let n=e.get(t);n!=null&&n.size==0&&e.delete(t)}var UU=class{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce((e,t)=>e.concat(Array.from(t)),[])}get size(){return Array.from(this.valuesByKey.values()).reduce((e,t)=>e+t.size,0)}add(e,t){zU(this.valuesByKey,e,t)}delete(e,t){BU(this.valuesByKey,e,t)}has(e,t){let n=this.valuesByKey.get(e);return n!=null&&n.has(t)}hasKey(e){return this.valuesByKey.has(e)}hasValue(e){return Array.from(this.valuesByKey.values()).some(t=>t.has(e))}getValuesForKey(e){let t=this.valuesByKey.get(e);return t?Array.from(t):[]}getKeysForValue(e){return Array.from(this.valuesByKey).filter(([t,n])=>n.has(e)).map(([e,t])=>e)}},WU=class{constructor(e,t,n,r){this._selector=t,this.details=r,this.elementObserver=new LU(e,this),this.delegate=n,this.matchesByElement=new UU}get started(){return this.elementObserver.started}get selector(){return this._selector}set selector(e){this._selector=e,this.refresh()}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}
27get element(){return this.elementObserver.element}matchElement(e){let{selector:t}=this;if(t){let n=e.matches(t);return this.delegate.selectorMatchElement?n&&this.delegate.selectorMatchElement(e,this.details):n}else return!1}matchElementsInTree(e){let{selector:t}=this;if(t){let n=this.matchElement(e)?[e]:[],r=Array.from(e.querySelectorAll(t)).filter(e=>this.matchElement(e));return n.concat(r)}else return[]}elementMatched(e){let{selector:t}=this;t&&this.selectorMatched(e,t)}elementUnmatched(e){let t=this.matchesByElement.getKeysForValue(e);for(let n of t)this.selectorUnmatched(e,n)}elementAttributeChanged(e,t){let{selector:n}=this;if(n){let t=this.matchElement(e),r=this.matchesByElement.has(n,e);t&&!r?this.selectorMatched(e,n):!t&&r&&this.selectorUnmatched(e,n)}}selectorMatched(e,t){this.delegate.selectorMatched(e,t,this.details),this.matchesByElement.add(t,e)}selectorUnmatched(e,t){this.delegate.selectorUnmatched(e,t,this.details),this.matchesByElement.delete(t,e)}},GU=class{constructor(e,t){this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver(e=>this.processMutations(e))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&=(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),!1)}refresh(){if(this.started)for(let e of this.knownAttributeNames)this.refreshAttribute(e,null)}processMutations(e){if(this.started)for(let t of e)this.processMutation(t)}processMutation(e){let t=e.attributeName;t&&this.refreshAttribute(t,e.oldValue)}refreshAttribute(e,t){let n=this.delegate.getStringMapKeyForAttribute(e);if(n!=null){this.stringMap.has(e)||this.stringMapKeyAdded(n,e);let r=this.element.getAttribute(e);if(this.stringMap.get(e)!=r&&this.stringMapValueChanged(r,n,t),r==null){let t=this.stringMap.get(e);this.stringMap.delete(e),t&&this.stringMapKeyRemoved(n,e,t)}else this.stringMap.set(e,r)}}stringMapKeyAdded(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)}stringMapValueChanged(e,t,n){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t,n)}stringMapKeyRemoved(e,t,n){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t,n)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map(e=>e.name)}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}},KU=class{constructor(e,t,n){this.attributeObserver=new RU(e,t,this),this.delegate=n,this.tokensByElement=new UU}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(e){this.attributeObserver.pause(e)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(e){this.tokensMatched(this.readTokensForElement(e))}elementAttributeValueChanged(e){let[t,n]=this.refreshTokensForElement(e);this.tokensUnmatched(t),this.tokensMatched(n)}elementUnmatchedAttribute(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))}tokensMatched(e){e.forEach(e=>this.tokenMatched(e))}tokensUnmatched(e){e.forEach(e=>this.tokenUnmatched(e))}tokenMatched(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)}tokenUnmatched(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)}refreshTokensForElement(e){let t=this.tokensByElement.getValuesForKey(e),n=this.readTokensForElement(e),r=JU(t,n).findIndex(([e,t])=>!YU(e,t));return r==-1?[[],[]]:[t.slice(r),n.slice(r)]}readTokensForElement(e){let t=this.attributeName;return qU(e.getAttribute(t)||``,e,t)}};function qU(e,t,n){return e.trim().split(/\s+/).filter(e=>e.length).map((e,r)=>({element:t,attributeName:n,content:e,index:r}))}function JU(e,t){let n=Math.max(e.length,t.length);return Array.from({length:n},(n,r)=>[e[r],t[r]])}function YU(e,t){return e&&t&&e.index==t.index&&e.content==t.content}var XU=class{constructor(e,t,n){this.tokenListObserver=new KU(e,t,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}
27get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(e){let{element:t}=e,{value:n}=this.fetchParseResultForToken(e);n&&(this.fetchValuesByTokenForElement(t).set(e,n),this.delegate.elementMatchedValue(t,n))}tokenUnmatched(e){let{element:t}=e,{value:n}=this.fetchParseResultForToken(e);n&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,n))}fetchParseResultForToken(e){let t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t}fetchValuesByTokenForElement(e){let t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t}parseToken(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(e){return{error:e}}}},ZU=class{constructor(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new XU(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(e){let t=new IU(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)}disconnectAction(e){let t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))}
27disconnectAllActions(){this.bindings.forEach(e=>this.delegate.bindingDisconnected(e,!0)),this.bindingsByAction.clear()}parseValueForToken(e){let t=jU.forToken(e,this.schema);if(t.identifier==this.identifier)return t}elementMatchedValue(e,t){this.connectAction(t)}elementUnmatchedValue(e,t){this.disconnectAction(t)}},QU=class{constructor(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new GU(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name}stringMapKeyAdded(e,t){let n=this.valueDescriptorMap[t];this.hasValue(e)||this.invokeChangedCallback(e,n.writer(this.receiver[e]),n.writer(n.defaultValue))}stringMapValueChanged(e,t,n){let r=this.valueDescriptorNameMap[t];e!==null&&(n===null&&(n=r.writer(r.defaultValue)),this.invokeChangedCallback(t,e,n))}stringMapKeyRemoved(e,t,n){let r=this.valueDescriptorNameMap[e];this.hasValue(e)?this.invokeChangedCallback(e,r.writer(this.receiver[e]),n):this.invokeChangedCallback(e,r.writer(r.defaultValue),n)}invokeChangedCallbacksForDefaultValues(){for(let{key:e,name:t,defaultValue:n,writer:r}of this.valueDescriptors)n!=null&&!this.controller.data.has(e)&&this.invokeChangedCallback(t,r(n),void 0)}invokeChangedCallback(e,t,n){let r=`${e}Changed`,i=this.receiver[r];if(typeof i==`function`){let r=this.valueDescriptorNameMap[e];try{let e=r.reader(t),a=n;n&&(a=r.reader(n)),i.call(this.receiver,e,a)}catch(e){throw e instanceof TypeError&&(e.message=`Stimulus Value "${this.context.identifier}.${r.name}" - ${e.message}`),e}}}get valueDescriptors(){let{valueDescriptorMap:e}=this;return Object.keys(e).map(t=>e[t])}get valueDescriptorNameMap(){let e={};return Object.keys(this.valueDescriptorMap).forEach(t=>{let n=this.valueDescriptorMap[t];e[n.name]=n}),e}hasValue(e){let t=this.valueDescriptorNameMap[e],n=`has${TU(t.name)}`;return this.receiver[n]}},$U=class{constructor(e,t){this.context=e,this.delegate=t,this.targetsByName=new UU}start(){this.tokenListObserver||(this.tokenListObserver=new KU(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:e,content:t}){this.scope.containsElement(e)&&this.connectTarget(e,t)}tokenUnmatched({element:e,content:t}){this.disconnectTarget(e,t)}connectTarget(e,t){var n;this.targetsByName.has(t,e)||(this.targetsByName.add(t,e),(n=this.tokenListObserver)==null||n.pause(()=>this.delegate.targetConnected(e,t)))}disconnectTarget(e,t){var n;this.targetsByName.has(t,e)&&(this.targetsByName.delete(t,e),(n=this.tokenListObserver)==null||n.pause(()=>this.delegate.targetDisconnected(e,t)))}disconnectAllTargets(){for(let e of this.targetsByName.keys)for(let t of this.targetsByName.getValuesForKey(e))this.disconnectTarget(t,e)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}};function eW(e,t){let n=nW(e);return Array.from(n.reduce((e,n)=>(rW(n,t).forEach(t=>e.add(t)),e),new Set))}function tW(e,t){return nW(e).reduce((e,n)=>(e.push(...iW(n,t)),e),[])}function nW(e){let t=[];for(;e;)t.push(e),e=Object.getPrototypeOf(e);return t.reverse()}function rW(e,t){let n=e[t];return Array.isArray(n)?n:[]}function iW(e,t){let n=e[t];return n?Object.keys(n).map(e=>[e,n[e]]):[]}var aW=class{constructor(e,t){this.started=!1,this.context=e,this.delegate=t,this.outletsByName=new UU,this.outletElementsByName=new UU,this.selectorObserverMap=new Map,this.attributeObserverMap=new Map}start(){this.started||(this.outletDefinitions.forEach(e=>{this.setupSelectorObserverForOutlet(e),this.setupAttributeObserverForOutlet(e)}
27),this.started=!0,this.dependentContexts.forEach(e=>e.refresh()))}refresh(){this.selectorObserverMap.forEach(e=>e.refresh()),this.attributeObserverMap.forEach(e=>e.refresh())}stop(){this.started&&(this.started=!1,this.disconnectAllOutlets(),this.stopSelectorObservers(),this.stopAttributeObservers())}stopSelectorObservers(){this.selectorObserverMap.size>0&&(this.selectorObserverMap.forEach(e=>e.stop()),this.selectorObserverMap.clear())}stopAttributeObservers(){this.attributeObserverMap.size>0&&(this.attributeObserverMap.forEach(e=>e.stop()),this.attributeObserverMap.clear())}selectorMatched(e,t,{outletName:n}){let r=this.getOutlet(e,n);r&&this.connectOutlet(r,e,n)}selectorUnmatched(e,t,{outletName:n}){let r=this.getOutletFromMap(e,n);r&&this.disconnectOutlet(r,e,n)}selectorMatchElement(e,{outletName:t}){let n=this.selector(t),r=this.hasOutlet(e,t),i=e.matches(`[${this.schema.controllerAttribute}~=${t}]`);return n?r&&i&&e.matches(n):!1}elementMatchedAttribute(e,t){let n=this.getOutletNameFromOutletAttributeName(t);n&&this.updateSelectorObserverForOutlet(n)}elementAttributeValueChanged(e,t){let n=this.getOutletNameFromOutletAttributeName(t);n&&this.updateSelectorObserverForOutlet(n)}elementUnmatchedAttribute(e,t){let n=this.getOutletNameFromOutletAttributeName(t);n&&this.updateSelectorObserverForOutlet(n)}connectOutlet(e,t,n){var r;this.outletElementsByName.has(n,t)||(this.outletsByName.add(n,e),this.outletElementsByName.add(n,t),(r=this.selectorObserverMap.get(n))==null||r.pause(()=>this.delegate.outletConnected(e,t,n)))}disconnectOutlet(e,t,n){var r;this.outletElementsByName.has(n,t)&&(this.outletsByName.delete(n,e),this.outletElementsByName.delete(n,t),(r=this.selectorObserverMap.get(n))==null||r.pause(()=>this.delegate.outletDisconnected(e,t,n)))}disconnectAllOutlets(){for(let e of this.outletElementsByName.keys)for(let t of this.outletElementsByName.getValuesForKey(e))for(let n of this.outletsByName.getValuesForKey(e))this.disconnectOutlet(n,t,e)}updateSelectorObserverForOutlet(e){let t=this.selectorObserverMap.get(e);t&&(t.selector=this.selector(e))}setupSelectorObserverForOutlet(e){let t=this.selector(e),n=new WU(document.body,t,this,{outletName:e});this.selectorObserverMap.set(e,n),n.start()}setupAttributeObserverForOutlet(e){let t=this.attributeNameForOutletName(e),n=new RU(this.scope.element,t,this);this.attributeObserverMap.set(e,n),n.start()}selector(e){return this.scope.outlets.getSelectorForOutletName(e)}attributeNameForOutletName(e){return this.scope.schema.outletAttributeForScope(this.identifier,e)}getOutletNameFromOutletAttributeName(e){return this.outletDefinitions.find(t=>this.attributeNameForOutletName(t)===e)}get outletDependencies(){let e=new UU;return this.router.modules.forEach(t=>{let n=t.definition.controllerConstructor;eW(n,`outlets`).forEach(n=>e.add(n,t.identifier))}),e}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){let e=this.dependentControllerIdentifiers;return this.router.contexts.filter(t=>e.includes(t.identifier))}hasOutlet(e,t){return!!this.getOutlet(e,t)||!!this.getOutletFromMap(e,t)}getOutlet(e,t){return this.application.getControllerForElementAndIdentifier(e,t)}getOutletFromMap(e,t){return this.outletsByName.getValuesForKey(t).find(t=>t.element===e)}get scope(){return this.context.scope}get schema(){return this.context.schema}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}},oW=class{constructor(e,t){this.logDebugActivity=(e,t={})=>{let{identifier:n,controller:r,element:i}=this;t=Object.assign({identifier:n,controller:r,element:i},t),this.application.logDebugActivity(this.identifier,e,t)},this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new ZU(this,this.dispatcher),this.valueObserver=new QU(this,this.controller),this.targetObserver=new $U(this,this),this.outletObserver=new aW(this,this);try{this.controller.initialize(),this.logDebugActivity(`initialize`)}catch(e){this.handleError(e,`initializing controller`)}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity(`connect`)}catch(e){this.handleError(e,`connecting controller`)}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity(`disconnect`)}catch(e){this.handleError(e,`disconnecting controller`)}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}
27get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,t,n={}){let{identifier:r,controller:i,element:a}=this;n=Object.assign({identifier:r,controller:i,element:a},n),this.application.handleError(e,`Error ${t}`,n)}targetConnected(e,t){this.invokeControllerMethod(`${t}TargetConnected`,e)}targetDisconnected(e,t){this.invokeControllerMethod(`${t}TargetDisconnected`,e)}outletConnected(e,t,n){this.invokeControllerMethod(`${wU(n)}OutletConnected`,e,t)}outletDisconnected(e,t,n){this.invokeControllerMethod(`${wU(n)}OutletDisconnected`,e,t)}invokeControllerMethod(e,...t){let n=this.controller;typeof n[e]==`function`&&n[e](...t)}};function sW(e){return cW(e,lW(e))}function cW(e,t){let n=pW(e),r=uW(e.prototype,t);return Object.defineProperties(n.prototype,r),n}function lW(e){return eW(e,`blessings`).reduce((t,n)=>{let r=n(e);for(let e in r){let n=t[e]||{};t[e]=Object.assign(n,r[e])}return t},{})}function uW(e,t){return fW(t).reduce((n,r)=>{let i=dW(e,t,r);return i&&Object.assign(n,{[r]:i}),n},{})}function dW(e,t,n){let r=Object.getOwnPropertyDescriptor(e,n);if(!(r&&`value`in r)){let e=Object.getOwnPropertyDescriptor(t,n).value;return r&&(e.get=r.get||e.get,e.set=r.set||e.set),e}}var fW=typeof Object.getOwnPropertySymbols==`function`?e=>[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)]:Object.getOwnPropertyNames,pW=(()=>{function e(e){function t(){return Reflect.construct(e,arguments,new.target)}return t.prototype=Object.create(e.prototype,{constructor:{value:t}}),Reflect.setPrototypeOf(t,e),t}function t(){let t=e(function(){this.a.call(this)});return t.prototype.a=function(){},new t}try{return t(),e}catch{return e=>class extends e{}}})();function mW(e){return{identifier:e.identifier,controllerConstructor:sW(e.controllerConstructor)}}var hW=class{constructor(e,t){this.application=e,this.definition=mW(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(e){let t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()}disconnectContextForScope(e){let t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())}fetchContextForScope(e){let t=this.contextsByScope.get(e);return t||(t=new oW(this,e),this.contextsByScope.set(e,t)),t}},gW=class{constructor(e){this.scope=e}has(e){return this.data.has(this.getDataKey(e))}get(e){return this.getAll(e)[0]}getAll(e){return DU(this.data.get(this.getDataKey(e))||``)}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}},_W=class{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(e){let t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)}set(e,t){let n=this.getAttributeNameForKey(e);return this.element.setAttribute(n,t),this.get(e)}has(e){let t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)}delete(e){if(this.has(e)){let t=this.getAttributeNameForKey(e);return this.element.removeAttribute(t),!0}else return!1}getAttributeNameForKey(e){return`data-${this.identifier}-${EU(e)}`}},vW=class{constructor(e){this.warnedKeysByObject=new WeakMap,this.logger=e}warn(e,t,n){let r=this.warnedKeysByObject.get(e);r||(r=new Set,this.warnedKeysByObject.set(e,r)),r.has(t)||(r.add(t),this.logger.warn(n,e))}};function yW(e,t){return`[${e}~="${t}"]`}var bW=class{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return this.find(e)!=null}find(...e){return e.reduce((e,t)=>e||this.findTarget(t)||this.findLegacyTarget(t),void 0)}findAll(...e){return e.reduce((e,t)=>[...e,...this.findAllTargets(t),...this.findAllLegacyTargets(t)],[])}findTarget(e){let t=this.getSelectorForTargetName(e);return this.scope.findElement(t)}findAllTargets(e){let t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)}getSelectorForTargetName(e){return yW(this.schema.targetAttributeForScope(this.identifier),e)}findLegacyTarget(e){let t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)}findAllLegacyTargets(e){let t=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(t).map(t=>this.deprecate(t,e))}getLegacySelectorForTargetName(e){let t=`${this.identifier}.${e}`;return yW(this.schema.targetAttribute,t)}deprecate(e,t){if(e){let{identifier:n}=this,r=this.schema.targetAttribute,i=this.schema.targetAttributeForScope(n);this.guide.warn(e,`target:${t}`,`Please replace ${r}="${n}.${t}" with ${i}="${t}". The ${r} attribute is deprecated and will be removed in a future version of Stimulus.`)}return e}get guide(){return this.scope.guide}},xW=class{constructor(e,t){this.scope=e,this.controllerElement=t}
27get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return this.find(e)!=null}find(...e){return e.reduce((e,t)=>e||this.findOutlet(t),void 0)}findAll(...e){return e.reduce((e,t)=>[...e,...this.findAllOutlets(t)],[])}getSelectorForOutletName(e){let t=this.schema.outletAttributeForScope(this.identifier,e);return this.controllerElement.getAttribute(t)}findOutlet(e){let t=this.getSelectorForOutletName(e);if(t)return this.findElement(t,e)}findAllOutlets(e){let t=this.getSelectorForOutletName(e);return t?this.findAllElements(t,e):[]}findElement(e,t){return this.scope.queryElements(e).filter(n=>this.matchesElement(n,e,t))[0]}findAllElements(e,t){return this.scope.queryElements(e).filter(n=>this.matchesElement(n,e,t))}matchesElement(e,t,n){let r=e.getAttribute(this.scope.schema.controllerAttribute)||``;return e.matches(t)&&r.split(` `).includes(n)}},SW=class e{constructor(e,t,n,r){this.targets=new bW(this),this.classes=new gW(this),this.data=new _W(this),this.containsElement=e=>e.closest(this.controllerSelector)===this.element,this.schema=e,this.element=t,this.identifier=n,this.guide=new vW(r),this.outlets=new xW(this.documentScope,t)}findElement(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)}findAllElements(e){return[...this.element.matches(e)?[this.element]:[],...this.queryElements(e).filter(this.containsElement)]}queryElements(e){return Array.from(this.element.querySelectorAll(e))}get controllerSelector(){return yW(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new e(this.schema,document.documentElement,this.identifier,this.guide.logger)}},CW=class{constructor(e,t,n){this.element=e,this.schema=t,this.delegate=n,this.valueListObserver=new XU(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(e){let{element:t,content:n}=e;return this.parseValueForElementAndIdentifier(t,n)}parseValueForElementAndIdentifier(e,t){let n=this.fetchScopesByIdentifierForElement(e),r=n.get(t);return r||(r=this.delegate.createScopeForElementAndIdentifier(e,t),n.set(t,r)),r}elementMatchedValue(e,t){let n=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,n),n==1&&this.delegate.scopeConnected(t)}elementUnmatchedValue(e,t){let n=this.scopeReferenceCounts.get(t);n&&(this.scopeReferenceCounts.set(t,n-1),n==1&&this.delegate.scopeDisconnected(t))}fetchScopesByIdentifierForElement(e){let t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t}},wW=class{constructor(e){this.application=e,this.scopeObserver=new CW(this.element,this.schema,this),this.scopesByIdentifier=new UU,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce((e,t)=>e.concat(t.contexts),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(e){this.unloadIdentifier(e.identifier);let t=new hW(this.application,e);this.connectModule(t);let n=e.controllerConstructor.afterLoad;n&&n.call(e.controllerConstructor,e.identifier,this.application)}unloadIdentifier(e){let t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)}getContextForElementAndIdentifier(e,t){let n=this.modulesByIdentifier.get(t);if(n)return n.contexts.find(t=>t.element==e)}proposeToConnectScopeForElementAndIdentifier(e,t){let n=this.scopeObserver.parseValueForElementAndIdentifier(e,t);n?this.scopeObserver.elementMatchedValue(n.element,n):console.error(`Couldn't find or create scope for identifier: "${t}" and element:`,e)}handleError(e,t,n){this.application.handleError(e,t,n)}createScopeForElementAndIdentifier(e,t){return new SW(this.schema,e,t,this.logger)}scopeConnected(e){this.scopesByIdentifier.add(e.identifier,e);let t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)}scopeDisconnected(e){this.scopesByIdentifier.delete(e.identifier,e);let t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)}connectModule(e){this.modulesByIdentifier.set(e.identifier,e),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(t=>e.connectContextForScope(t))}disconnectModule(e){this.modulesByIdentifier.delete(e.identifier),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(t=>e.disconnectContextForScope(t))}},TW={controllerAttribute:`data-controller`,actionAttribute:`data-action`,targetAttribute:`data-target`,targetAttributeForScope:e=>`data-${e}-target`,outletAttributeForScope:(e,t)=>`data-${e}-${t}
27-outlet`,keyMappings:Object.assign(Object.assign({enter:`Enter`,tab:`Tab`,esc:`Escape`,space:` `,up:`ArrowUp`,down:`ArrowDown`,left:`ArrowLeft`,right:`ArrowRight`,home:`Home`,end:`End`,page_up:`PageUp`,page_down:`PageDown`},EW(`abcdefghijklmnopqrstuvwxyz`.split(``).map(e=>[e,e]))),EW(`0123456789`.split(``).map(e=>[e,e])))};function EW(e){return e.reduce((e,[t,n])=>Object.assign(Object.assign({},e),{[t]:n}),{})}var DW=class{constructor(e=document.documentElement,t=TW){this.logger=console,this.debug=!1,this.logDebugActivity=(e,t,n={})=>{this.debug&&this.logFormattedMessage(e,t,n)},this.element=e,this.schema=t,this.dispatcher=new gU(this),this.router=new wW(this),this.actionDescriptorFilters=Object.assign({},_U)}static start(e,t){let n=new this(e,t);return n.start(),n}async start(){await OW(),this.logDebugActivity(`application`,`starting`),this.dispatcher.start(),this.router.start(),this.logDebugActivity(`application`,`start`)}stop(){this.logDebugActivity(`application`,`stopping`),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity(`application`,`stop`)}register(e,t){this.load({identifier:e,controllerConstructor:t})}registerActionOption(e,t){this.actionDescriptorFilters[e]=t}load(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(e=>{e.controllerConstructor.shouldLoad&&this.router.loadDefinition(e)})}unload(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(e=>this.router.unloadIdentifier(e))}get controllers(){return this.router.contexts.map(e=>e.controller)}getControllerForElementAndIdentifier(e,t){let n=this.router.getContextForElementAndIdentifier(e,t);return n?n.controller:null}handleError(e,t,n){var r;this.logger.error(`%s
28
29%o
30
31%o`,t,e,n),(r=window.onerror)==null||r.call(window,t,``,0,0,e)}logFormattedMessage(e,t,n={}){n=Object.assign({application:this},n),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log(`details:`,Object.assign({},n)),this.logger.groupEnd()}};function OW(){return new Promise(e=>{document.readyState==`loading`?document.addEventListener(`DOMContentLoaded`,()=>e()):e()})}function kW(e){return eW(e,`classes`).reduce((e,t)=>Object.assign(e,AW(t)),{})}function AW(e){return{[`${e}Class`]:{get(){let{classes:t}=this;if(t.has(e))return t.get(e);{let n=t.getAttributeName(e);throw Error(`Missing attribute "${n}"`)}}},[`${e}Classes`]:{get(){return this.classes.getAll(e)}},[`has${TU(e)}Class`]:{get(){return this.classes.has(e)}}}}function jW(e){return eW(e,`outlets`).reduce((e,t)=>Object.assign(e,PW(t)),{})}function MW(e,t,n){return e.application.getControllerForElementAndIdentifier(t,n)}function NW(e,t,n){let r=MW(e,t,n);if(r||(e.application.router.proposeToConnectScopeForElementAndIdentifier(t,n),r=MW(e,t,n),r))return r}function PW(e){let t=wU(e);return{[`${t}Outlet`]:{get(){let t=this.outlets.find(e),n=this.outlets.getSelectorForOutletName(e);if(t){let n=NW(this,t,e);if(n)return n;throw Error(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`)}throw Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${n}".`)}},[`${t}Outlets`]:{get(){let t=this.outlets.findAll(e);return t.length>0?t.map(t=>{let n=NW(this,t,e);if(n)return n;console.warn(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`,t)}).filter(e=>e):[]}},[`${t}OutletElement`]:{get(){let t=this.outlets.find(e),n=this.outlets.getSelectorForOutletName(e);if(t)return t;throw Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${n}".`)}},[`${t}OutletElements`]:{get(){return this.outlets.findAll(e)}},[`has${TU(t)}Outlet`]:{get(){return this.outlets.has(e)}}}}function FW(e){return eW(e,`targets`).reduce((e,t)=>Object.assign(e,IW(t)),{})}function IW(e){return{[`${e}Target`]:{get(){let t=this.targets.find(e);if(t)return t;throw Error(`Missing target element "${e}" for "${this.identifier}" controller`)}},[`${e}Targets`]:{get(){return this.targets.findAll(e)}},[`has${TU(e)}Target`]:{get(){return this.targets.has(e)}}}}function LW(e){let t=tW(e,`values`);return t.reduce((e,t)=>
31Object.assign(e,RW(t)),{valueDescriptorMap:{get(){return t.reduce((e,t)=>{let n=zW(t,this.identifier),r=this.data.getAttributeNameForKey(n.key);return Object.assign(e,{[r]:n})},{})}}})}function RW(e,t){let n=zW(e,t),{key:r,name:i,reader:a,writer:o}=n;return{[i]:{get(){let e=this.data.get(r);return e===null?n.defaultValue:a(e)},set(e){e===void 0?this.data.delete(r):this.data.set(r,o(e))}},[`has${TU(i)}`]:{get(){return this.data.has(r)||n.hasCustomDefaultValue}}}}function zW([e,t],n){return GW({controller:n,token:e,typeDefinition:t})}function BW(e){switch(e){case Array:return`array`;case Boolean:return`boolean`;case Number:return`number`;case Object:return`object`;case String:return`string`}}function VW(e){switch(typeof e){case`boolean`:return`boolean`;case`number`:return`number`;case`string`:return`string`}if(Array.isArray(e))return`array`;if(Object.prototype.toString.call(e)===`[object Object]`)return`object`}function HW(e){let{controller:t,token:n,typeObject:r}=e,i=OU(r.type),a=OU(r.default),o=i&&a,s=i&&!a,c=!i&&a,l=BW(r.type),u=VW(e.typeObject.default);if(s)return l;if(c)return u;if(l!==u){let e=t?`${t}.${n}`:n;throw Error(`The specified default value for the Stimulus Value "${e}" must match the defined type "${l}". The provided default value of "${r.default}" is of type "${u}".`)}if(o)return l}function UW(e){let{controller:t,token:n,typeDefinition:r}=e,i=HW({controller:t,token:n,typeObject:r}),a=VW(r),o=BW(r),s=i||a||o;if(s)return s;let c=t?`${t}.${r}`:n;throw Error(`Unknown value type "${c}" for "${n}" value`)}function WW(e){let t=BW(e);
31if(t)return KW[t];let n=kU(e,`default`),r=kU(e,`type`),i=e;if(n)return i.default;if(r){let{type:e}=i,t=BW(e);if(t)return KW[t]}return e}function GW(e){let{token:t,typeDefinition:n}=e,r=`${EU(t)}-value`,i=UW(e);return{type:i,key:r,name:CU(r),get defaultValue(){return WW(n)},get hasCustomDefaultValue(){return VW(n)!==void 0},reader:qW[i],writer:JW[i]||JW.default}}var KW={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:``},qW={array(e){let t=JSON.parse(e);if(!Array.isArray(t))throw TypeError(`expected value of type "array" but instead got value "${e}" of type "${VW(t)}"`);return t},boolean(e){return!(e==`0`||String(e).toLowerCase()==`false`)},number(e){return Number(e.replace(/_/g,``))},object(e){let t=JSON.parse(e);if(typeof t!=`object`||!t||Array.isArray(t))throw TypeError(`expected value of type "object" but instead got value "${e}" of type "${VW(t)}"`);return t},string(e){return e}},JW={default:XW,array:YW,object:YW};function YW(e){return JSON.stringify(e)}function XW(e){return`${e}`}var ZW=class{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,t){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:n={},prefix:r=this.identifier,bubbles:i=!0,cancelable:a=!0}={}){let o=r?`${r}:${e}`:e,s=new CustomEvent(o,{detail:n,bubbles:i,cancelable:a});return t.dispatchEvent(s),s}};ZW.blessings=[kW,FW,LW,jW],ZW.targets=[],ZW.outlets=[],ZW.values={};function QW(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)r!==`__proto__`&&(e[r]=n[r])}return e}var $W={read:function(e){return e[0]===`"`&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function eG(e,t){function n(n,r,i){if(!(typeof document>`u`)){i=QW({},t,i),typeof i.expires==`number`&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&=i.expires.toUTCString(),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a=``;for(var o in i)i[o]&&(a+=`; `+o,i[o]!==!0&&(a+=`=`+i[o].split(`;`)[0]));return document.cookie=n+`=`+e.write(r,n)+a}}function r(t){if(!(typeof document>`u`||arguments.length&&!t)){for(var n=document.cookie?document.cookie.split(`; `):[],r={},i=0;i<n.length;i++){var a=n[i].split(`=`),o=a.slice(1).join(`=`);try{var s=decodeURIComponent(a[0]);if(s in r||(r[s]=e.read(o,s)),t===s)break}catch{}}return t?r[t]:r}}return Object.create({set:n,get:r,remove:function(e,t){n(e,``,QW({},t,{expires:-1}))},withAttributes:function(e){return eG(this.converter,QW({},this.attributes,e))},withConverter:function(e){return eG(QW({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var tG=eG($W,{path:`/`}),nG=(0,L.createContext)(void 0),rG=(e,t)=>e.includes(t)?(e.indexOf(t)+1)/e.length*100:0;function iG(){let e=(0,yc.c)(33),t=(0,L.useContext)(nG);xc(t,`useFlowState must be used within a FlowContextProvider.`);let{flow:n,basePath:r}=t,i;e[0]===n?i=e[1]:(i=e=>{n.send({type:e})},e[0]=n,e[1]=i);let a=i,o;e[2]===n?o=e[3]:(o=e=>{n.send({type:`updateValues`,values:e})},e[2]=n,e[3]=o);let s=o,c;e[4]!==r||e[5]!==t.steps||e[6]!==n||e[7]!==s?(c=(e,i)=>{xc(t.steps.includes(e),`unknown step: "${e}". Must be one of ${t.steps.map(oG).join(`, `)} `),i&&s(i),n.send({type:e,basePath:r})},e[4]=r,e[5]=t.steps,e[6]=n,e[7]=s,e[8]=c):c=e[8];let l=c,u;e[9]!==r||e[10]!==n?(u=e=>{let t=e===void 0?{}:e;n.send({type:`next`,values:t,basePath:r})},e[9]=r,e[10]=n,e[11]=u):u=e[11];let d=u,f;e[12]!==r||e[13]!==n?(f=()=>{n.send({type:`previous`,basePath:r})},e[12]=r,e[13]=n,e[14]=f):f=e[14];let p=f,m;e[15]===n.machine.state.value.transitions?m=e[16]:(m=e=>()=>{let t=n.machine.state.value.transitions.get(e);if(t)return t[0].to},e[15]=n.machine.state.value.transitions,e[16]=m);let h=m,g;e[17]!==t.currentStep||e[18]!==t.steps?(g=rG(t.steps,t.currentStep),e[17]=t.currentStep,e[18]=t.steps,e[19]=g):g=e[19];let _=g,v;e[20]===t?v=e[21]:(v=ic(t,[`flow`]),e[20]=t,e[21]=v);let y;e[22]===h?y=e[23]:(y=h(`previous`),e[22]=h,e[23]=y);let b;
31return e[24]!==d||e[25]!==p||e[26]!==l||e[27]!==_||e[28]!==a||e[29]!==v||e[30]!==y||e[31]!==s?(b={flowState:v,sync:a,updateValues:s,progressPercent:_,goToStep:l,goToNextStep:d,goToPreviousStep:p,getNextStep:aG,getPreviousStep:y},e[24]=d,e[25]=p,e[26]=l,e[27]=_,e[28]=a,e[29]=v,e[30]=y,e[31]=s,e[32]=b):b=e[32],b}function aG(){throw Error(`do NOT use this method, it does not work as expected with custom step progression`)}function oG(e){return`"${e}"`}function sG(e){let t=(0,yc.c)(6),{children:n}=e,r=wi(),i=bi(),a=Si(i.pathname),o=iG(),s;if(t[0]!==n||t[1]!==i||t[2]!==a||t[3]!==r||t[4]!==o){let e={navigate:r,location:i,match:a,...o};s=typeof n==`function`?n(e):n,t[0]=n,t[1]=i,t[2]=a,t[3]=r,t[4]=o,t[5]=s}else s=t[5];return s}var cG=(e,t)=>(t.endsWith(`/`)||(t=`${t}/`),e.startsWith(t)?e.substring(t.length):``),lG=()=>Pc((e,t)=>({...e,...t.values})),uG=e=>Ic(e),dG=(e,...t)=>Vc(`next`,e,...t,lG()),fG=(e,...t)=>Vc(`previous`,e,...t),pG=e=>({[e]:[Vc(`updateValues`,e,lG())]}),mG=(e,t,n)=>{let r=e.map(e=>Object.keys(e)[0]),i=r.reduce((t,n,i)=>{let a=[...e[i][n],...r.map(e=>Vc(e,e)),Vc(`reset`,ks(r))];return{...t,[n]:Gc(...a)}},{});return qc(n||Object.keys(i)[0],i,e=>e?{...t,...e}:t)},hG=(e,t)=>{let[n,...r]=typeof e==`string`?[e]:e;return t(n,...r)},gG=(e,t,n)=>{let r=Object.keys(e);return mG(r.map(t=>{let n=pG(t),{next:i,previous:a}=e[t];return i?(typeof i==`string`&&(i=[i]),n[t].push(...i.map(e=>hG(e,dG)))):i!==!1&&t!==Cs(r)&&n[t].push(dG(r[r.indexOf(t)+1])),a?(typeof a==`string`&&(a=[a]),n[t].push(...a.map(e=>hG(e,fG)))):a!==!1&&t!==ks(r)&&n[t].push(fG(r[r.indexOf(t)-1])),n}),t,n)};function _G(e,t){switch(t.type){case`UPDATE`:return{...e,currentState:t.nextState,context:t.nextContext};default:return e}}var vG=(e,t)=>{let n=wi(),r=bi(),i=(0,L.useRef)(e),a=(0,L.useRef)(null),o=(0,L.useRef)(null),s=(0,L.useCallback)((e,t)=>{try{return Zc(e,e=>{a.current?.machine.current!==e.machine.current&&(a.current.machine=qc(e.machine.current,i.current.states,()=>e.context)),o.current?.({type:`UPDATE`,nextState:e.machine.current,nextContext:e.context})},t||{})}catch(e){throw e instanceof Error&&e.name===`TypeError`&&e.message.includes(`enter`)?Error(`Current step (${i.current.current}) is unknown to this flow. Please make sure the missing step is included as one of your configured steps: [${Object.keys(i.current.states).join(`,`)}]`):e}},[]);a.current===null&&(a.current=s(i.current,i.current.context));let[{currentState:c,context:l},u]=(0,L.useReducer)((e,t)=>_G(e,t),{currentState:a.current.machine.current,context:a.current.context});return o.current=u,(0,L.useEffect)(()=>{qs(Object.keys(i.current.states),Object.keys(e.states))||(i.current=e,a.current=s(e,a.current.context))},[e,s]),(0,L.useEffect)(()=>{let e=cG(r.pathname,t);e&&e!==c&&n(`${t}/${c}`)},[c,t,n,r.pathname]),[c,l,a.current]},yG=({children:e})=>{let t=L.Children.toArray(e).find(e=>{let t=e?.type,n=typeof t==`function`&&t.name||``;return t===ua||n===`Routes`||typeof t==`function`&&t.toString().includes(`function Routes`)});if(!t)throw Error(`FlowContextProvider must be used with a <Routes> element as a direct child`);return L.Children.toArray(t.props.children).reduce((e,t)=>{if(!L.isValidElement(t))return e;let n=t.type,r=typeof n==`function`&&n.name||``;if(!(n===ca||r===`Route`))return e;let i=t.props,a=i.element??(i.children?L.Children.only(i.children):void 0);if(!L.isValidElement(a))return e;let o=a;if(o.type!==sG)throw Error(`All Routes used with FlowContextProvider must have StepWrapper as a direct and only child`);let{name:s,next:c,previous:l}=o.props;return e[s]={next:c,previous:l},e},{})},bG=e=>{let t=(0,yc.c)(16),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({to:i,preserveQueryParams:r,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=r===void 0||r,{search:o}=bi();if(a){if(typeof i==`string`)if(i.includes(`?`)){let e;if(t[4]!==o||t[5]!==i){let[n,r]=i.split(`?`);i={pathname:n},e=(0,rl.stringify)({...(0,rl.parse)(o),...(0,rl.parse)(r)},{sort:!1}),t[4]=o,t[5]=i,t[6]=e,t[7]=i}else e=t[6],i=t[7];o=e}else{let e;t[8]===i?e=t[9]:(e={pathname:i},t[8]=i,t[9]=e),i=e}let e;t[10]!==o||t[11]!==i?(e={...i,search:o},t[10]=o,t[11]=i,t[12]=e):e=t[12],i=e}let s;return t[13]!==n||t[14]!==i?(s=(0,il.jsx)(oa,{to:i,replace:!0,...n}),t[13]=n,t[14]=i,t[15]=s):s=t[15],s},xG=e=>e.key===al.Enter,SG=e=>e.tagName.toLowerCase()===`button`||e.getAttribute(`role`)===`button`,CG=e=>e.key===al.Space,wG=(e,t)=>
31CG(t)&&SG(e),TG=(e,t)=>xG(t)||wG(e,t),EG=[/\.bettermentforadvisors.com$/,/\.betterment\.com$/,/\.betterment\.io$/,/\.betterment\.qa$/,/^bettermentforadvisors\.com$/,/^betterment\.com$/,/^betterment\.io$/,/^betterment\.qa$/,/test$/,/^localhost$/],DG=`(?!401k)[0-9]+`,OG=`[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`,kG=/^[A-Za-z0-9_-]+={0,2}$/,AG=RegExp(`^[_A-Za-z][_0-9A-Za-z]*:(?:${OG}|${DG})$`),jG=RegExp(`^${DG}$`),MG=RegExp(`^${OG}$`),NG=e=>{if(e.length<8||e.length%4!=0||!kG.test(e))return!1;try{return AG.test(atob(e.replace(/-/g,`+`).replace(/_/g,`/`)))}catch{return!1}},PG=e=>e.split(`/`).map(e=>NG(e)||MG.test(e)||jG.test(e)?`_`:e).join(`/`),FG=()=>PG(window.location.pathname),IG=()=>{let{token:e,...t}=rl.parse(window.location.search);return e?rl.stringify({token:`_`,...t}):window.location.search},LG=()=>{let e=IG();return`${window.location.origin}${PG(window.location.pathname)}${e?`?${e}`:``}`},RG=e=>e.endsWith(`/`)?e.replace(/\/+$/,``):e;function zG(e){try{let t=new URL(e);return[`http:`,`https:`].find(e=>t.protocol===e)?EG.find(e=>RegExp(e).exec(t.hostname)):!1}catch{return!0}}function BG(e,t=``){if(!e)return t;let n=decodeURI(e).replace(/[^\x20-\x7EÀ-ž]/gim,``).replace(/[\<\>\"\'\%\;\(\)]/g,``).trim();return zG(n)?n:t}var VG=(e=``)=>{"use no memo";let[t]=fo();return(0,L.useMemo)(()=>BG(t.get(`return_to`)??t.get(`returnTo`),e),[])},HG=(e=``)=>{"use no memo";let[t]=fo();return(0,L.useMemo)(()=>BG(t.get(`exit_to`)??t.get(`exitTo`),e),[])};function UG(e){window.location.assign(e)}function WG(e){window.location.replace(e)}var GG=()=>window.analytics,KG=`[data-track-event="ElementClicked"], [data-track-event="AppStoreSelected"]`,qG=`[data-track-event="ElementHovered"]`,JG=`[data-track-event="ElementViewed"]`,YG=`data-hover-listener-registered`,XG=`data-view-listener-registered`,ZG=`data-interaction-listener-registered`,QG=`true`,$G,eK,tK=new Promise(e=>{eK=e}),nK=()=>{let e=window.navigator.userAgent;return/Android.*Betterment/.test(e)?`AndroidWebView`:/Android/.test(e)?`AndroidMobileWeb`:/(iPhone|iPod|iPad).*Safari/.test(e)?`iOSMobileWeb`:/(iPhone|iPod|iPad)/.test(e)?`iOSWebView`:`Web`},rK=e=>{let t=e.getAttribute(`data-track-name`),n=e.textContent||void 0;return{name:t||vc(mc(n)),flow:e.getAttribute(`data-track-flow`),module:e.getAttribute(`data-track-module`),location:e.getAttribute(`data-track-location`)}},iK=()=>({application:$G,client:nK(),path:FG(),search:IG(),url:LG()}),aK=(e,t,n)=>{let r={...iK(),...t};tK.then(()=>{GG().track(e,r,n)})},oK=(e,t)=>{let n=e.getAttribute(`data-track-event`);(n===`ElementClicked`||n===`AppStoreSelected`)&&aK(n,{...rK(e),interaction:t})},sK=(e,t)=>{TG(e,t)&&oK(e,`keydown`)},cK=e=>{let t=e.getAttribute(`data-track-event`);(t===`ElementHovered`||t===`ElementViewed`)&&aK(t,{...rK(e)})},lK=()=>window._DATADOG_SYNTHETICS_BROWSER===void 0,uK=()=>{[].slice.call(document.querySelectorAll(KG)).forEach(e=>{e.getAttribute(ZG)!==QG&&(e.addEventListener(`click`,()=>oK(e,`click`)),e.addEventListener(`keydown`,t=>sK(e,t)),e.setAttribute(ZG,QG))})},dK=()=>{[].slice.call(document.querySelectorAll(JG)).forEach(e=>{if(e.getAttribute(XG)!==QG){let t=new IntersectionObserver(n=>{n.every(e=>e.isIntersecting)&&(t.unobserve(e),cK(e))},{threshold:1});t.observe(e),e.setAttribute(XG,QG)}})},fK=()=>{[].slice.call(document.querySelectorAll(qG)).forEach(e=>{e.getAttribute(YG)!==QG&&(e.addEventListener(`mouseenter`,()=>cK(e),{once:!0}),e.setAttribute(YG,QG))})},pK=()=>{uK(),fK(),dK()},mK=(e={})=>{tK.then(()=>{GG().page({...iK(),...e})})},hK=()=>{mK(),pK()},gK=()=>{let e=window.history.pushState.bind(window.history),t=window.history.replaceState.bind(window.history);window.history.pushState=function(t,n,r){return hK(),e.apply(this,[t,n,r])},window.history.replaceState=function(e,n,r){return hK(),t.apply(this,[e,n,r])}},_K=new MutationObserver(()=>{pK()}),vK=(e,t,n)=>{$G=t,GG().ready(()=>{GG().user().id()!==e&&GG().identify(e),lK()&&eK(!0),mK(n),gK(),pK(),_K.observe(document,{childList:!0,subtree:!0})})},yK=()=>{let e=document.querySelector(`meta[name="csrf-token"]`);return e?e.content:null};function bK(e,t){let n=L.useRef(void 0);return(!n.current||!qs(t,n.current.key))&&(n.current={key:t,value:e()}),n.current.value}function xK(e,t){return Array.isArray(e)?e.map(e=>xK(e,t)):No(e)?Object.keys(e).reduce((n,r)=>({...n,[t(r)]:xK(e[r],t)}),{}):e}var SK=e=>e?xK(e,e=>mc(e)):null,CK=e=>e?xK(e,e=>gc(e)):null,wK={messages:{base:[`Looks like something went wrong`]},status:503},TK=[200,201,422,401];async function EK(e,t){let{status:n}=e,r;return`cancelled`in e?{data:void 0,meta:void 0,errors:void 0}:n===204?{data:{}}:n===404?{errors:{messages:{base:[`Looks like something went wrong`]},status:n}}:n===503?{errors:wK}:TK.includes(n)?(n===422?(r=await t(e),r={data:r.data,errors:{messages:r.errors,status:n},meta:r.meta}
31):r=await t(e),SK(r)):{errors:{messages:{base:[`Looks like something went wrong`]},status:n}}}function DK(e){return e?e.status===404:!1}var OK=Kf.create({headers:{"X-Requested-With":`XMLHttpRequest`,"Content-Type":`application/json`},withCredentials:!0});OK.interceptors.request.use(e=>(e.headers[`X-CSRF-Token`]=yK(),e));var kK=L.createContext(null),AK=e=>{let t=(0,yc.c)(5),{client:n,children:r}=e,i=n===void 0?OK:n,a;t[0]===i?a=t[1]:(a={client:i},t[0]=i,t[1]=a);let o;return t[2]!==r||t[3]!==a?(o=(0,il.jsx)(kK.Provider,{value:a,children:r}),t[2]=r,t[3]=a,t[4]=o):o=t[4],o};function jK(e,[t,n]){switch(t){case 0:return{...e,loading:!0,errors:null,networkError:null};case 1:return{...e,loading:!1,...n};case 2:return{...e,loading:!1,networkError:n};case 3:return{...e,loading:!1};default:return e}}async function MK(e,t,n,r){if(!r.url)throw Error(`url required!`);e([0]);let i;try{i=await n(r)}catch(n){if(Xf(n)||tp(n)&&n.code===`ECONNABORTED`&&n.message===`Request aborted`)i={cancelled:!0,data:null,status:0,statusText:`Cancelled`,headers:{},config:r};else if(n.response)i=n.response;else throw t.current&&e([2,n]),n}let a=await EK(i,({data:e})=>Promise.resolve(e||{}));return t.current&&(`cancelled`in i?e([3]):e([1,a])),a}function NK(e,t){let n=(0,yc.c)(18),r;n[0]===t?r=n[1]:(r=t===void 0?{qs:null,skip:!1}:t,n[0]=t,n[1]=r);let i=r,a=L.useContext(kK);if(!a)throw Error(`Must be under DataFetchProvider`);let{client:o}=a,{qs:s,skip:c}=i,l;n[2]===s?l=n[3]:(l=()=>s,n[2]=s,n[3]=l);let u=bK(l,s),d=L.useRef(!0),f=!c,p;n[4]===f?p=n[5]:(p={loading:f,data:null,meta:null,errors:null,networkError:null},n[4]=f,n[5]=p);let[m,h]=L.useReducer(jK,p),g=L.useRef(void 0),_;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>g.current?.cancel(e),n[6]=_):_=n[6];let v=_,y;n[7]!==o||n[8]!==u||n[9]!==e?(y=t=>{let n=t===void 0?{}:t;return g.current=Kf.CancelToken.source(),MK(h,d,o,{url:e,params:CK(n.qs||u),cancelToken:g.current.token})},n[7]=o,n[8]=u,n[9]=e,n[10]=y):y=n[10];let b=y,x,S;n[11]!==b||n[12]!==c?(x=()=>(d.current=!0,c||b(),()=>{d.current=!1,v(`Request was automatically cancelled`)}),S=[b,c,v],n[11]=b,n[12]=c,n[13]=x,n[14]=S):(x=n[13],S=n[14]),L.useEffect(x,S);let C;return n[15]!==b||n[16]!==m?(C={...m,refetch:b,cancel:v},n[15]=b,n[16]=m,n[17]=C):C=n[17],C}function PK(e,t){let n=(0,yc.c)(18),r;n[0]===t?r=n[1]:(r=t===void 0?{qs:null,method:`post`}:t,n[0]=t,n[1]=r);let i=r,a=L.useContext(kK);if(!a)throw Error(`Must be under DataFetchProvider`);let{client:o}=a,{qs:s,method:c}=i,l=L.useRef(!0),u;n[2]===s?u=n[3]:(u=()=>s,n[2]=s,n[3]=u);let d=bK(u,s),f;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(f={loading:!1,data:null,meta:null,errors:null,networkError:null},n[4]=f):f=n[4];let[p,m]=L.useReducer(jK,f),h=L.useRef(void 0),g;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>h.current?.cancel(e),n[5]=g):g=n[5];let _=g,v;n[6]!==o||n[7]!==c||n[8]!==d||n[9]!==e?(v=t=>(h.current=Kf.CancelToken.source(),MK(m,l,o,{url:e,method:c,params:CK(d),data:CK(t),cancelToken:h.current.token})),n[6]=o,n[7]=c,n[8]=d,n[9]=e,n[10]=v):v=n[10];let y=v,b,x;n[11]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>()=>{l.current=!1,_(`Request was automatically cancelled`)},x=[_],n[11]=b,n[12]=x):(b=n[11],x=n[12]),L.useEffect(b,x);let S;n[13]===p?S=n[14]:(S={...p,cancel:_},n[13]=p,n[14]=S);let C;return n[15]!==y||n[16]!==S?(C=[y,S],n[15]=y,n[16]=S,n[17]=C):C=n[17],C}var FK={atLeastSmall:`(min-width: 500px)`,atLeastMedium:`(min-width: 700px)`,atLeastLarge:`(min-width: 964px)`,atLeastExtraLarge:`(min-width: 1224px)`};function IK(e){let t=(0,yc.c)(7),n=FK[e],r;t[0]===n?r=t[1]:(r=window.matchMedia(n),t[0]=n,t[1]=r);
31let i=r,[a,o]=(0,L.useState)(i.matches),s;t[2]===i?s=t[3]:(s=()=>{let e=e=>{let{matches:t}=e;return o(t)};return i.addListener(e),()=>{i.removeListener(e)}},t[2]=i,t[3]=s);let c;return t[4]!==i||t[5]!==n?(c=[i,n],t[4]=i,t[5]=n,t[6]=c):c=t[6],(0,L.useEffect)(s,c),a}function LK(e,...t){let n=As(Rs(e,t)).join(``),r=URL.createObjectURL(new Blob([n],{type:`text/javascript`}));return new Worker(r)}function RK(e){return function(t){if(t.data.type===`cacheResponse`){let n=Number(new Date),r=Object.keys(t.data.cache).reduce((e,r)=>{if(r.substring(0,r.indexOf(`.`))===`bmt`){let i=JSON.parse(t.data.cache[r]);return i.expiry&&n>i.expiry?e.concat(r):e}return e},[]);e.postMessage({type:`clearKeys`,keys:r})}}}function zK(){let e=LK`
32    self.onmessage = ${RK.toString()}(self)
33
34    var interval = setInterval(function () {
35      self.postMessage({ type: 'checkCache' });
36    }, 1000 * 60 * 10);
37
38    self.postMessage({ type: 'checkCache' });
39  `;e.addEventListener(`message`,({data:t})=>{if(t.type===`checkCache`){let t=Object.keys(sessionStorage).reduce((e,t)=>({...e,[t]:sessionStorage.getItem(t)}),{});e.postMessage({type:`cacheResponse`,cache:t})}t.type===`clearKeys`&&t.keys.forEach(e=>sessionStorage.removeItem(e))}),e.onerror=e=>{console.warn(`Cache worker encountered an error ${e.type}: ${e.message} ${e.error}`)}}var BK=class{config;datadogLogs;datadogRum;constructor(e){this.config=e,this.datadogLogs=db,this.datadogRum=XD}initialize(){this.config?.isRumEnabled&&(XD.init({applicationId:this.config.applicationId,clientToken:this.config.clientToken,site:this.config.site,service:this.config.service,env:this.config.env||`production`,sessionSampleRate:this.config.sampleRate??100,sessionReplaySampleRate:this.config.replaySampleRate??0,trackResources:!0,trackLongTasks:!0,trackUserInteractions:!0,defaultPrivacyLevel:`mask-user-input`,allowedTracingUrls:this.config.allowedTracingUrls}),XD.startSessionReplayRecording()),this.config?.isLoggingEnabled&&db.init({clientToken:this.config.clientToken,site:`datadoghq.com`,forwardErrorsToLogs:!0,sessionSampleRate:this.config.logSampleRate??100,service:this.config.service,env:this.config.env})}},VK=class extends Error{status;constructor(e,t){super(e),this.name=`EchoServerError`,this.status=t}};function HK(e,t){if(!e)throw typeof t==`string`?Error(t):t}var UK=(0,L.createContext)(null);function WK(){let e=(0,yc.c)(2),t=(0,L.useContext)(UK),n;return e[0]===t?n=e[1]:(n={matchReactRoute:e=>{if(!t)return null;let n=new URL(e,window.location.href);if(n.origin!==window.location.origin)return null;let r=bt(t.routes,n.pathname,t.basename),i=r?.[r.length-1];return i?{pathname:i.pathname+n.search+n.hash}:null}},e[0]=t,e[1]=n),n}function GK(){let e=(0,yc.c)(3),t=wi(),{matchReactRoute:n}=WK(),r;return e[0]!==n||e[1]!==t?(r=async(e,r)=>{let{replace:i}=r===void 0?{}:r,a=n(e);a?await t(a.pathname,{replace:i}):i?WG(e):UG(e)},e[0]=n,e[1]=t,e[2]=r):r=e[2],r}function KK(e){let t=(0,yc.c)(5),{to:n,replace:r}=e,i=GK(),a,o;return t[0]!==i||t[1]!==r||t[2]!==n?(a=()=>void i(n,{replace:r}),o=[n,r,i],t[0]=i,t[1]=r,t[2]=n,t[3]=a,t[4]=o):(a=t[3],o=t[4]),(0,L.useEffect)(a,o),null}function qK(e){return e.hasAttribute(`data-echo`)&&e.getAttribute(`data-echo`)!==`false`&&e.getAttribute(`data-remote`)!==`true`}function JK(e,t){return(t?.getAttribute(`formmethod`)??e.getAttribute(`method`)??`GET`).toUpperCase()}function YK(e,t){return t?.getAttribute(`formaction`)??e.getAttribute(`action`)??window.location.href}function XK(e,t){e.dispatchEvent(new CustomEvent(`echo:submit-start`,{bubbles:!0,detail:t}))}function ZK(e,t){e.dispatchEvent(new CustomEvent(`echo:submit-end`,{bubbles:!0,detail:t}))}function QK(e){let t=e.querySelectorAll(`
40    input[data-disable-with]:enabled,
41    button[data-disable-with]:enabled,
42    textarea[data-disable-with]:enabled,
43    input[data-disable]:enabled,
44    button[data-disable]:enabled,
45    textarea[data-disable]:enabled
46  `);Array.from(t).forEach(e=>{let t=e.getAttribute(`data-disable-with`);t&&e instanceof HTMLButtonElement?e.textContent=t:t&&(e.value=t),e.disabled=!0})}function $K(e){return e.button!==0||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey}function eq(e){let t=e.target;return t&&t.closest(`a[href]:not([target^=_]):not([download]):not([data-echo="false"]):not([data-remote="true"]):not([data-method])`)}function tq(e){let t=(0,yc.c)(12),{className:n,slot:r,onSubmit:i}=e,a=(0,L.useRef)(null),o=GK(),{matchReactRoute:s}=WK(),c,l;t[0]===r?(c=t[1],l=t[2]):(c=()=>{a.current?.replaceChildren(r.cloneNode(!0))},l=[r],t[0]=r,t[1]=c,t[2]=l),(0,L.useLayoutEffect)(c,l);let u;t[3]!==s||t[4]!==o?(u=e=>{if(e.defaultPrevented||$K(e))return;let t=eq(e);t&&s(t.href)&&(e.preventDefault(),o(t.href))},t[3]=s,t[4]=o,t[5]=u):u=t[5];let d=u,f;t[6]===i?f=t[7]:(f=e=>{let t=e.target,{submitter:n}=e.nativeEvent;e.defaultPrevented||qK(t)&&(e.preventDefault(),e.stopPropagation(),i(t,n))},t[6]=i,t[7]=f);let p=f,m;return t[8]!==n||t[9]!==d||t[10]!==p?(m=(0,il.jsx)(`div`,{className:n,ref:a,onClick:d,onSubmit:p}),t[8]=n,t[9]=d,t[10]=p,t[11]=m):m=t[11],m}function nq(){let e=(0,yc.c)(2),t=GK(),n;return e[0]===t?n=e[1]:(n=async e=>{let{location:n,reload:r,replace:i}=e;r&&i?WG(n):r?UG(n):await t(n,{replace:i})},e[0]=t,e[1]=n),n}function rq(e){let t=(0,yc.c)(4),{echo:n,fallback:r}=e,i=nq(),a,o;return t[0]!==n||t[1]!==i?(a=()=>{i(n)},o=[n,i],t[0]=n,t[1]=i,t[2]=a,t[3]=o):(a=t[2],o=t[3]),(0,L.useEffect)(a,o),r}async function iq(e){let t={type:`view`,props:{},slots:{},status:e.status},n=document.createElement(`template`);return n.innerHTML=await e.text(),HK(n.content.querySelectorAll(`script`).length<=1,`<script> must not appear more than once`),Array.from(n.content.children).forEac
46h(e=>{if(e instanceof HTMLScriptElement)HK(e.type===`application/json`,`<script> has an incorrect content type`),t.props=JSON.parse(e.textContent);else if(e instanceof HTMLTemplateElement)HK(e.id&&!t.slots[e.id],`<template> must have a unique id`),HK(!e.content.querySelector(`script`),`<template> must not include inline scripts`),t.slots[e.id]=e.content;else throw Error(`Echo response contains invalid top-level elements`)}),t}function aq(e){let t=e.headers.get(`X-Echo-Redirect`);if(!t)return null;let n=e.headers.get(`X-Echo-Reload`)===`true`,r=new URL(t).origin===window.location.origin;return HK(e.status===204,`X-Echo-Redirect requires a 204 status code`),HK(r,`X-Echo-Redirect must not redirect to an external location`),{type:`navigation`,location:t,reload:n}}function oq(e,t){let n=new URLSearchParams;Array.from(t.entries()).forEach(([e,t])=>{HK(!(t instanceof File),`Echo submission form data keys cannot be files`),n.append(e,t)});let r=new URL(e);return r.search=n.toString(),{type:`navigation`,location:r.toString(),replace:!1,reload:!1}}var sq=`text/vnd.betterment.echo.html`;function cq(e){return(e.headers.get(`Content-Type`)??``).startsWith(sq)}async function lq({url:e,signal:t}){let n=await fetch(e,{signal:t,headers:{accept:sq}}),r=aq(n);return r?{...r,replace:!0}:(HK(n.ok,new VK(`Echo rendering failed with HTTP status ${n.status}`,n.status)),HK(cq(n),new VK(`Echo rendering failed because the response was invalid`,n.status)),iq(n))}async function uq({action:e,method:t,body:n}){let r=new URL(e,window.location.href);if(t.toUpperCase()===`GET`)return oq(r,n);HK(n.has(`authenticity_token`),`Echo submission requires an authenticity token field`);let i=await fetch(r,{method:t,body:n,headers:{accept:sq}}),a=aq(i);return a?{...a,replace:!1}:(HK(cq(i),new VK(`Echo submission failed because the response was invalid`,i.status)),iq(i))}var dq=Fk(10);async function fq(e){let t=await lq(e);return t.type===`view`&&dq.set(e.url,t),t}async function pq({url:e,signal:t}){let n=dq.get(e);return n?{url:e,echo:n,isPreview:!0,id:Yk()}:{url:e,echo:await fq({url:e,signal:t}),isPreview:!1,id:Yk()}}var mq=({request:e})=>pq({url:e.url,signal:e.signal});function hq(e,t){let n=(0,yc.c)(9),{id:r,url:i,isPreview:a}=e,o;n[0]!==a||n[1]!==t||n[2]!==i?(o=()=>{let e=new AbortController,n=n=>{e.signal.aborted||t(n)};return a&&fq({url:i,signal:e.signal}).then(e=>n({status:`ok`,echo:e,isPreview:!1}),e=>n({status:`error`,error:e})),()=>e.abort()},n[0]=a,n[1]=t,n[2]=i,n[3]=o):o=n[3];let s;n[4]!==r||n[5]!==a||n[6]!==t||n[7]!==i?(s=[r,i,a,t],n[4]=r,n[5]=a,n[6]=t,n[7]=i,n[8]=s):s=n[8],(0,L.useEffect)(o,s)}function gq(e){let t=(0,yc.c)(9),{echo:n,isPreview:r}=e,i;t[0]!==n||t[1]!==r?(i={status:`ok`,echo:n,isPreview:r},t[0]=n,t[1]=r,t[2]=i):i=t[2];
46let[a,o]=(0,L.useState)(i),s,c;t[3]!==n||t[4]!==r?(s=()=>o({status:`ok`,echo:n,isPreview:r}),c=[n,r,o],t[3]=n,t[4]=r,t[5]=s,t[6]=c):(s=t[5],c=t[6]),(0,L.useEffect)(s,c);let l;return t[7]===a?l=t[8]:(l=[a,o],t[7]=a,t[8]=l),l}async function _q(e){try{return{status:`ok`,echo:await uq(e),isPreview:!1}}catch(e){return{status:`error`,error:e}}}function vq(e){let t=(0,yc.c)(3),n=nq(),r;return t[0]!==n||t[1]!==e?(r=async(t,r)=>{let i=JK(t,r),a=YK(t,r),o=new URL(a,window.location.href),s=new FormData(t,r);XK(t,{method:i,url:o}),QK(t);let c=await _q({method:i,action:a,body:s});c.status===`error`?(e(c),ZK(t,{method:i,url:o,status:null})):c.echo.type===`navigation`?(await n(c.echo),ZK(t,{method:i,url:o,status:204})):(e(c),ZK(t,{method:i,url:o,status:c.echo.status}))},t[0]=n,t[1]=e,t[2]=r):r=t[2],r}function yq(e){let t=(0,yc.c)(4),[n,r]=gq(e),i=vq(r);if(hq(e,r),n.status===`error`)throw n.error;let a;return t[0]!==i||t[1]!==n.echo||t[2]!==n.isPreview?(a={echo:n.echo,isPreview:n.isPreview,onSubmit:i},t[0]=i,t[1]=n.echo,t[2]=n.isPreview,t[3]=a):a=t[3],a}var bq=Object.freeze(`accountNumber.addGoalCustomImageData.address.address1.address2.answer.cashflowCategory.cashflowSubcategory.city.confirmPassword.customImageData.dateOfBirth.dobYear.dobMonth.documentContent.email.employer.encodedFile.federalTaxIdNumber.firstName.lastName.legalName.memo.nickname.password.performerPassword.question.phone.phoneNumber.proofOfAddress.routingNumber.secondaryDocument.secret.securityAnswer1.securityAnswer2.socialSecurityNumber.ssn.taxId.taxpayerIdentificationNumber.usGovId.userName.zip.zipCode`.split(`.`)),xq=(e,t)=>{let n=`bmt.${e}`;if(t&&!sessionStorage.getItem(n)){let e=Object.fromEntries(Object.entries(t).filter(([e])=>!bq.includes(mc(e))));sessionStorage.setItem(n,JSON.stringify({value:e}))}let r=sessionStorage.getItem(n),i=null;return r&&(i=JSON.parse(r).value),{values:i,saveValues:e=>{sessionStorage.setItem(n,JSON.stringify({value:e}))},clearValues:()=>sessionStorage.removeItem(n)}};function Sq(e){let t=(0,yc.c)(9),{sessionKey:n,safeFields:r}=e,{saveValues:i}=xq(n),{flowState:a}=iG(),o;t[0]!==a.values||t[1]!==r?(o=r?cc(a.values,r):a.values,t[0]=a.values,t[1]=r,t[2]=o):o=t[2];let s=o,c;t[3]===s?c=t[4]:(c=()=>s,t[3]=s,t[4]=c);let l=bK(c,s),u,d;return t[5]!==l||t[6]!==i?(u=()=>{i(l)},d=[i,l],t[5]=l,t[6]=i,t[7]=u,t[8]=d):(u=t[7],d=t[8]),(0,L.useEffect)(u,d),null}var Cq=()=>{let e=(0,yc.c)(8),t=xi(),n=bi(),{sync:r,flowState:i}=iG(),a;e[0]!==i.basePath||e[1]!==n.pathname?(a=cG(n.pathname,i.basePath),e[0]=i.basePath,e[1]=n.pathname,e[2]=a):a=e[2];let o=a,s,c;return e[3]!==t||e[4]!==o||e[5]!==r?(s=()=>{t===$e.Pop&&o&&r(o)},c=[t,o,r],e[3]=t,e[4]=o,e[5]=r,e[6]=s,e[7]=c):(s=e[6],c=e[7]),(0,L.useEffect)(s,c),null};function wq(e){let t=(0,yc.c)(42),{basePath:n,routePath:r,children:i,currentStep:a,initialValues:o,defaultStep:s,returnToPath:c}=e,l=n===void 0?``:n,u=r===void 0?l:r,d;t[0]===o?d=t[1]:(d=o===void 0?{}:o,t[0]=o,t[1]=d);let f=d,p=bi(),m;t[2]===i?m=t[3]:(m=yG({children:i}),t[2]=i,t[3]=m);let h=m,g;t[4]===h?g=t[5]:(g=Object.keys(h),t[4]=h,t[5]=g);let _=g,v=VG(c),y;t[6]!==l||t[7]!==a||t[8]!==s||t[9]!==p||t[10]!==_?(l=RG(l),s||=_[0],y=a||cG(p.pathname,l)||s,t[6]=l,t[7]=a,t[8]=s,t[9]=p,t[10]=_,t[11]=y,t[12]=l,t[13]=s):(y=t[11],l=t[12],s=t[13]),a=y;let b;t[14]!==a||t[15]!==f||t[16]!==h?(b=gG(h,f,a),t[14]=a,t[15]=f,t[16]=h,t[17]=b):b=t[17];let[x,S,C]=vG(b,l),w;t[18]!==l||t[19]!==x||t[20]!==C||t[21]!==v||t[22]!==_||t[23]!==S?(w={basePath:l,currentStep:x,flow:C,steps:_,returnToPath:v,values:S},t[18]=l,t[19]=x,t[20]=C,t[21]=v,t[22]=_,t[23]=S,t[24]=w):w=t[24];let T=w,E;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,il.jsx)(Cq,{}),t[25]=E):E=t[25];let D=`${u}/`,O=`${l}/${s}`,k;t[26]===O?k=t[27]:(k=(0,il.jsx)(bG,{to:O}),t[26]=O,t[27]=k);let A;t[28]!==D||t[29]!==k?(A=(0,il.jsx)(ca,{path:D,element:k}),t[28]=D,t[29]=k,t[30]=A):A=t[30];let j;t[31]!==l||t[32]!==s||t[33]!==u?(j=l&&(0,il.jsx)(ca,{path:u,element:(0,il.jsx)(bG,{to:`${l}/${s}`})}),t[31]=l,t[32]=s,t[33]=u,t[34]=j):j=t[34];let M;t[35]!==A||t[36]!==j?(M=(0,il.jsxs)(ua,{children:[A,j]}),t[35]=A,t[36]=j,t[37]=M):M=t[37];let ee;return t[38]!==i||t[39]!==M||t[40]!==T?(ee=(0,il.jsxs)(nG.Provider,{value:T,children:[E,i,M]}),t[38]=i,t[39]=M,t[40]=T,t[41]=ee):ee=t[41],ee}var Tq=e=>{let t=(0,yc.c)(3),{baseTo:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=Yk(),t[0]=r):r=t[0];let i=`${n}/${r}`,a;return t[1]===i?a=t[2]:(a=(0,il.jsx)(bG,{to:i}),t[1]=i,t[2]=a),a},Eq=e=>{let t=(0,yc.c)(17),{path:n,routePath:r,children:i}=e,a=r===void 0?n:r,o;t[0]===n?o=t[1]:(o=(0,il.jsx)(Tq,{baseTo:n}),t[0]=n,t[1]=o);let s;t[2]!==a||t[3]!==o?(s=(0,il.jsx)(ca,{path:a,element:o}),t[2]=a,t[3]=o,t[4]=s):s=t[4];let c=`${a}/new`,l;t[5]===n?l=t[6]:(l=(0,il.jsx)(Tq,{baseTo:n}),t[5]=n,t[6]=l);let u;
46t[7]!==c||t[8]!==l?(u=(0,il.jsx)(ca,{path:c,element:l}),t[7]=c,t[8]=l,t[9]=u):u=t[9];let d=`${a}/:id/*`,f;t[10]!==i||t[11]!==d?(f=(0,il.jsx)(ca,{path:d,element:i}),t[10]=i,t[11]=d,t[12]=f):f=t[12];let p;return t[13]!==s||t[14]!==u||t[15]!==f?(p=(0,il.jsxs)(ua,{children:[s,u,f]}),t[13]=s,t[14]=u,t[15]=f,t[16]=p):p=t[16],p},Dq=e=>{let t=(0,yc.c)(23),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({to:s,children:n,prefetch:r,preventScrollReset:i,reloadDocument:o,viewTransition:c,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let{matchReactRoute:l}=WK(),u;t[8]!==l||t[9]!==s?(u=l(s),t[8]=l,t[9]=s,t[10]=u):u=t[10];let d=u;if(d){let e;return t[11]!==n||t[12]!==d.pathname||t[13]!==r||t[14]!==i||t[15]!==a||t[16]!==o||t[17]!==c?(e=(0,il.jsx)(ro,{to:d.pathname,prefetch:r,viewTransition:c,preventScrollReset:i,reloadDocument:o,...a,children:n}),t[11]=n,t[12]=d.pathname,t[13]=r,t[14]=i,t[15]=a,t[16]=o,t[17]=c,t[18]=e):e=t[18],e}let f;return t[19]!==n||t[20]!==a||t[21]!==s?(f=(0,il.jsx)(`a`,{href:s,...a,children:n}),t[19]=n,t[20]=a,t[21]=s,t[22]=f):f=t[22],f};function Oq(e){return e.replace(/^[/]+/,``).replace(/[/]+$/,``)}function kq(e,t,n){let r=e===`/`,i=`/${t.map(Oq).join(`/`)}`,a=(e={})=>rl.stringifyUrl({url:i,query:{...n,...e}});return a.path=i,a.absolutePath=r?i:`${e}${i}`,a.absolute=r?a:kq(`/`,[e,...t],n),a}function Aq(e,t,n){let r=e===`/`,i=`/${t.map(e=>typeof e==`string`?Oq(e):`:${e.param}`).join(`/`)}`,a=t.filter(e=>typeof e!=`string`).map(({param:e})=>e),o=e=>{let r=`/${t.map(t=>typeof t==`string`?Oq(t):e[t.param]).join(`/`)}`,i=a.reduce((e,t)=>({...e,[t]:void 0}),{...n,...e});return rl.stringifyUrl({url:r,query:i})};return o.path=i,o.absolutePath=r?i:`${e}${i}`,o.absolute=r?o:Aq(`/`,[e,...t],n),o}function jq(e,t,n={}){let r=t.filter(e=>typeof e==`string`);return t.toString()===r.toString()?kq(e,r,n):Aq(e,t,n)}function Mq(e){var t=window.analytics=window.analytics||[];if(!t.initialize){if(t.invoked){window.console&&console.error&&console.error(`Segment snippet included twice.`);return}t.invoked=!0,t.methods=[`trackSubmit`,`trackClick`,`trackLink`,`trackForm`,`pageview`,`identify`,`reset`,`group`,`track`,`ready`,`alias`,`debug`,`page`,`once`,`off`,`on`],t.factory=function(e){return function(){var n=Array.prototype.slice.call(arguments);return n.unshift(e),t.push(n),t}};for(var n=0;n<t.methods.length;n++){var r=t.methods[n];t[r]=t.factory(r)}t.load=function(e,n){var r=document.createElement(`script`);r.type=`text/javascript`,r.async=!0,r.src=`https://cdn.segment.com/analytics.js/v1/`+e+`/analytics.min.js`;var i=document.getElementsByTagName(`script`)[0];i.parentNode.insertBefore(r,i),t._loadOptions=n},t.SNIPPET_VERSION=`4.1.0`,t.load(e)}}var Nq=e=>{Mq(e)},Pq=class{config;constructor(e){this.config=e}initialize(){let e=[mF()];this.config.isReplayEnabled&&e.push(uU(this.config.sentryReplayIntegrationOptions??{blockAllMedia:!1})),eL({debug:this.config.debug,dsn:this.config.sentryApiToken,environment:this.config.sentryEnvironment,beforeBreadcrumb:this.excludeMiniProfiler.bind(this),release:this.config.sentryRelease,allowUrls:this.config.sentryWhitelistUrls,denyUrls:this.config.sentryDisallowListUrls??[],integrations:e,tracesSampleRate:this.config.sentryTracesSampleRate??.2,replaysSessionSampleRate:this.config.sentrySessionReplaySampleRate??0,replaysOnErrorSampleRate:this.config.sentryErrorReplaySampleRate??.25,tracePropagationTargets:this.config.sentryTracePropagationTargets,ignoreErrors:[`TypeError: Load failed`,`TypeError: Failed to fetch`,`TypeError: NetworkError when attempting to fetch resource.`,`AxiosError: Network Error`,`AbortError`]});let t=Te(),{plan_manager_id:n,id:r,retail_user_id:i}=this.config.user;n?t.setUser({plan_manager_id:n}):t.setUser({id:r,retail_user_id:i})}excludeMiniProfiler(e){return e.category===`xhr`&&e.data&&e.data.url===`/mini-profiler-resources/results`?null:e}},Fq=class{sentryInitializer;sentryAppConfig;dataDogConfig;dataDogInitializer;definitions;constructor(e,t,n){this.definitions=e,this.sentryAppConfig=t,this.dataDogConfig=n,this.sentryInitializer=new Pq(this.sentryAppConfig),this.dataDogInitializer=this.dataDogConfig?new BK(this.dataDogConfig):void 0}initialize(){let e=DW.start();return this.sentryAppConfig.sentryApiToken&&this.sentryInitializer.initialize(),this.dataDogInitializer&&this.dataDogInitializer.initialize(),this.loadApplication(e)}async loadApplication(e){return await this.domReady(),e.load(this.definitions),e}domReady(){return new Promise(e=>{document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,()=>e()):e()})}},Iq=function(e){return e.IDLE=`idle`,e.LOADING=`loading`,e.READY=`ready`,e.ERROR=`error`,e}({});function Lq(e,t){let n=(0,yc.c)(12),r=(0,L.useRef)(null),[i,a]=(0,L.use
46State)(e?`loading`:`idle`),o;n[0]===t?.attributes?o=n[1]:(o=t?.attributes??{},n[0]=t?.attributes,n[1]=o);let s=o,c;n[2]===s?c=n[3]:(c=JSON.stringify(s),n[2]=s,n[3]=c);let l=c,u=t?.domNode??`head`,d=t?.isScriptRemovable,f,p;n[4]!==u||n[5]!==d||n[6]!==e||n[7]!==l?(f=()=>{if(!e)return a(`idle`);let t=document.querySelector(`script[src="${e}"]`);if(t)a(t.getAttribute(`data-status`)??`loading`);else{t=document.createElement(`script`),t.src=e,t.setAttribute(`data-status`,`loading`);let n=JSON.parse(l);Object.keys(n).forEach(e=>{t.setAttribute(e,n[e])}),t.onerror=()=>t?.setAttribute(`data-status`,`error`),t.onload=()=>t?.setAttribute(`data-status`,`ready`),document[u].appendChild(t)}let n=e=>{a(e.type===`load`?`ready`:`error`)};return t.addEventListener(`load`,n),t.addEventListener(`error`,n),()=>{t?.removeEventListener(`load`,n),t?.removeEventListener(`error`,n),d&&t?.remove()}},p=[e,u,l,d],n[4]=u,n[5]=d,n[6]=e,n[7]=l,n[8]=f,n[9]=p):(f=n[8],p=n[9]),(0,L.useEffect)(f,p);let m;return n[10]===i?m=n[11]:(m={status:i,scriptRef:r},n[10]=i,n[11]=m),m}function Rq(e){return e.reduce((e,{attr:t,direction:n})=>[...e.filter(e=>e.attr!==t),{attr:t,direction:n}],[])}var zq=[`number`,`string`,`bigint`,`boolean`];function Bq(e,t){return e<t?-1:+(e>t)}function Vq(e,t){let n=e===null?`null`:typeof e,r=t===null?`null`:typeof t,i=zq.indexOf(n)!==-1,a=zq.indexOf(r)!==-1;return i&&!a?-1:!i&&a?1:i?n===r?Bq(e,t):Bq(n,r):Bq(e.toString(),t.toString())}function Hq(e,t,n){let r=t.slice().reverse();return n.map((e,t)=>({item:e,index:t})).sort((t,n)=>{let i=r.reduce((r,{attr:i,direction:a})=>{if(r!==0)return r;let o=(e[i]??Vq)(t.item[i],n.item[i]);return o===0?r:a===`asc`?o:-o},0);return i===0?t.index-n.index:i}).map(({item:e})=>e)}function Uq(e){return(t,n)=>{function r(e){return[...e.filter(e=>e.attr!==t),{attr:t,direction:n}]}e(r)}}function Wq(e){let t={};return e.forEach(({attr:e,direction:n})=>{t[e]=n}),t}function Gq(e,t){let n=(0,yc.c)(19),r;n[0]===t?r=n[1]:(r=t===void 0?{}:t,n[0]=t,n[1]=r);let{initialSorts:i,compareFunctions:a}=r,o;n[2]===i?o=n[3]:(o=i===void 0?[]:i,n[2]=i,n[3]=o);let s=o,c;n[4]===a?c=n[5]:(c=a===void 0?{}:a,n[4]=a,n[5]=c);let l=c,u;n[6]===s?u=n[7]:(u=()=>Rq(s),n[6]=s,n[7]=u);let[d,f]=(0,L.useState)(u),p;n[8]===Symbol.for(`react.memo_cache_sentinel`)?(p=Uq(f),n[8]=p):p=n[8];let m;n[9]===d?m=n[10]:(m=Wq(d),n[9]=d,n[10]=m);let h;n[11]!==d||n[12]!==l||n[13]!==e?(h=Hq(l,d,e),n[11]=d,n[12]=l,n[13]=e,n[14]=h):h=n[14];let g;return n[15]!==d||n[16]!==m||n[17]!==h?(g={sortBy:p,sortState:m,activeSorts:d,sortedItems:h},n[15]=d,n[16]=m,n[17]=h,n[18]=g):g=n[18],g}Gq.defaultCompare=Vq;function Kq(e){let t=(0,yc.c)(2),[n,r]=(0,L.useReducer)(qq,e),i;return t[0]===n?i=t[1]:(i=[n,r],t[0]=n,t[1]=i),i}function qq(e){return!e}var Jq=`bmt_user_states`,Yq=365,Xq=class{userId;userCookies;cookies;constructor(e){this.userId=e,this.cookies=this.getCookies,this.userCookies=this.getUserCookies}setStateFor(e,t){this.cookies=this.getCookies,this.userCookies=this.getUserCookies,this.cookies[`user_${this.userId}`]={...this.userCookies,[e]:t},tG.set(Jq,JSON.stringify(this.cookies),{expires:Yq})}getStateFor(e){return this.cookies=this.getCookies,this.userCookies=this.getUserCookies,this.userCookies[e]}get getCookies(){let e=tG.get(Jq);return e?JSON.parse(e):{}}get getUserCookies(){return this.cookies[`user_${this.userId}`]||{}}};export{Wk as $,_s as $t,yq as A,ki as An,pc as At,uG as B,Ys as Bt,Nq as C,ua as Cn,eO as Ct,aK as D,wi as Dn,nl as Dt,zK as E,Si as En,Kf as Et,NK as F,rc as Ft,Ik as G,Ds as Gt,ZW as H,Ks as Ht,VG as I,nc as It,Lk as J,Cs as Jt,Uk as K,Es as Kt,Lq as L,Qs as Lt,iG as M,zt as Mn,lc as Mt,IK as N,on as Nn,cc as Nt,WK as O,Gi as On,vc as Ot,PK as P,ic as Pt,Gk as Q,vs as Qt,xq as R,Zs as Rt,BG as S,na as Sn,tO as St,vK as T,bi as Tn,db as Tt,tL as U,Is as Ut,tG as V,qs as Vt,Fj as W,Ns as Wt,Kk as X,bs as Xt,Jk as Y,xs as Yt,Yk as Z,ys as Zt,mq as _,Qa as _n,uO as _t,rq as a,Po as an,QO as at,UG as b,sa as bn,oO as bt,wq as c,Ao as cn,LO as ct,Sq as d,Eo as dn,MO as dt,hs as en,Pk as et,Iq as f,To as fn,vO as ft,SK as g,io as gn,fO as gt,Xq as h,ro as hn,pO as ht,AK as i,Fo as in,ZO as it,HG as j,Ji as jn,dc as jt,GK as k,Oi as kn,mc as kt,Eq as l,ko as ln,FO as lt,Fq as m,to as mn,mO as mt,UK as n,us as nn,ak as nt,VK as o,No as on,KO as ot,sG as p,Co as pn,_O as pt,qk as q,ws as qt,KK as r,Io as rn,XO as rt,tq as s,jo as sn,J as st,Dq as t,fs as tn,sk as tt,bG as u,Oo as un,PO as ut,yK as v,fo as vn,lO as vt,CK as w,qi as wn,nO as wt,jq as x,ca as xn,aO as xt,DK as y,oa as yn,cO as yt,Kq as z,Xs as zt};
47//# sourceMappingURL=dist-DKo5RuAg.js.map

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.